@atlaskit/editor-plugin-expand 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-expand
|
|
2
2
|
|
|
3
|
+
## 0.1.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#58763](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/58763) [`0fdbd64522bf`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0fdbd64522bf) - update ADF schema
|
|
8
|
+
|
|
9
|
+
## 0.1.6
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#56790](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/56790) [`ff577a7969d4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ff577a7969d4) - ED-21266: Updated @atlaskit/adf-schema to 34.0.1
|
|
14
|
+
|
|
3
15
|
## 0.1.5
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -15,7 +15,6 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
15
15
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
16
16
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
17
17
|
var _react = _interopRequireWildcard(require("react"));
|
|
18
|
-
var _react2 = require("@emotion/react");
|
|
19
18
|
var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
|
|
20
19
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
21
20
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
@@ -28,7 +27,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
28
27
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
29
28
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
30
29
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
31
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
30
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
32
31
|
var withTooltip = exports.withTooltip = function withTooltip(WrapperComponent) {
|
|
33
32
|
return /*#__PURE__*/function (_React$Component) {
|
|
34
33
|
(0, _inherits2.default)(WithSortableColumn, _React$Component);
|
|
@@ -41,11 +40,11 @@ var withTooltip = exports.withTooltip = function withTooltip(WrapperComponent) {
|
|
|
41
40
|
key: "render",
|
|
42
41
|
value: function render() {
|
|
43
42
|
var label = this.props.label;
|
|
44
|
-
return
|
|
43
|
+
return /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
45
44
|
content: label,
|
|
46
45
|
position: "top",
|
|
47
46
|
tag: _ui.ExpandLayoutWrapperWithRef
|
|
48
|
-
},
|
|
47
|
+
}, /*#__PURE__*/_react.default.createElement(WrapperComponent, this.props));
|
|
49
48
|
}
|
|
50
49
|
}]);
|
|
51
50
|
return WithSortableColumn;
|
|
@@ -68,10 +67,10 @@ var CustomButton = exports.CustomButton = function CustomButton(props) {
|
|
|
68
67
|
})
|
|
69
68
|
}, rest);
|
|
70
69
|
}, [props]);
|
|
71
|
-
return
|
|
70
|
+
return /*#__PURE__*/_react.default.createElement(_customThemeButton.default, {
|
|
72
71
|
appearance: "subtle",
|
|
73
72
|
className: _styles.expandClassNames.iconContainer,
|
|
74
|
-
iconBefore:
|
|
73
|
+
iconBefore: /*#__PURE__*/_react.default.createElement(_chevronRight.default, {
|
|
75
74
|
label: label
|
|
76
75
|
}),
|
|
77
76
|
shouldFitContainer: true,
|
|
@@ -92,15 +91,16 @@ var ExpandIconButton = exports.ExpandIconButton = function ExpandIconButton(prop
|
|
|
92
91
|
|
|
93
92
|
// hoverEventCheck is to disable tooltips for mobile to prevent incorrect hover state causing issues on iOS
|
|
94
93
|
if (props.allowInteractiveExpand && hoverEventCheck) {
|
|
95
|
-
return
|
|
94
|
+
return /*#__PURE__*/_react.default.createElement(ButtonWithTooltip, (0, _extends2.default)({
|
|
96
95
|
label: label
|
|
97
96
|
}, props));
|
|
98
97
|
}
|
|
99
98
|
return (
|
|
99
|
+
/*#__PURE__*/
|
|
100
100
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
101
|
-
|
|
101
|
+
_react.default.createElement("div", {
|
|
102
102
|
css: _ui.expandLayoutWrapperStyle
|
|
103
|
-
},
|
|
103
|
+
}, /*#__PURE__*/_react.default.createElement(ButtonWithoutTooltip, (0, _extends2.default)({
|
|
104
104
|
label: label
|
|
105
105
|
}, props)))
|
|
106
106
|
);
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
/** @jsx jsx */
|
|
3
2
|
import React, { useCallback } from 'react';
|
|
4
|
-
import { jsx } from '@emotion/react';
|
|
5
3
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
6
4
|
import { expandClassNames } from '@atlaskit/editor-common/styles';
|
|
7
5
|
import { expandLayoutWrapperStyle, ExpandLayoutWrapperWithRef, expandMessages } from '@atlaskit/editor-common/ui';
|
|
@@ -17,11 +15,11 @@ export const withTooltip = WrapperComponent => {
|
|
|
17
15
|
const {
|
|
18
16
|
label
|
|
19
17
|
} = this.props;
|
|
20
|
-
return
|
|
18
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
21
19
|
content: label,
|
|
22
20
|
position: "top",
|
|
23
21
|
tag: ExpandLayoutWrapperWithRef
|
|
24
|
-
},
|
|
22
|
+
}, /*#__PURE__*/React.createElement(WrapperComponent, this.props));
|
|
25
23
|
}
|
|
26
24
|
};
|
|
27
25
|
};
|
|
@@ -47,10 +45,10 @@ export const CustomButton = props => {
|
|
|
47
45
|
...rest
|
|
48
46
|
};
|
|
49
47
|
}, [props]);
|
|
50
|
-
return
|
|
48
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
51
49
|
appearance: "subtle",
|
|
52
50
|
className: expandClassNames.iconContainer,
|
|
53
|
-
iconBefore:
|
|
51
|
+
iconBefore: /*#__PURE__*/React.createElement(ChevronRightIcon, {
|
|
54
52
|
label: label
|
|
55
53
|
}),
|
|
56
54
|
shouldFitContainer: true,
|
|
@@ -73,15 +71,16 @@ export const ExpandIconButton = props => {
|
|
|
73
71
|
|
|
74
72
|
// hoverEventCheck is to disable tooltips for mobile to prevent incorrect hover state causing issues on iOS
|
|
75
73
|
if (props.allowInteractiveExpand && hoverEventCheck) {
|
|
76
|
-
return
|
|
74
|
+
return /*#__PURE__*/React.createElement(ButtonWithTooltip, _extends({
|
|
77
75
|
label: label
|
|
78
76
|
}, props));
|
|
79
77
|
}
|
|
80
78
|
return (
|
|
79
|
+
/*#__PURE__*/
|
|
81
80
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
82
|
-
|
|
81
|
+
React.createElement("div", {
|
|
83
82
|
css: expandLayoutWrapperStyle
|
|
84
|
-
},
|
|
83
|
+
}, /*#__PURE__*/React.createElement(ButtonWithoutTooltip, _extends({
|
|
85
84
|
label: label
|
|
86
85
|
}, props)))
|
|
87
86
|
);
|
|
@@ -11,9 +11,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
11
11
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
12
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
13
13
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
14
|
-
/** @jsx jsx */
|
|
15
14
|
import React, { useCallback } from 'react';
|
|
16
|
-
import { jsx } from '@emotion/react';
|
|
17
15
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
18
16
|
import { expandClassNames } from '@atlaskit/editor-common/styles';
|
|
19
17
|
import { expandLayoutWrapperStyle, ExpandLayoutWrapperWithRef, expandMessages } from '@atlaskit/editor-common/ui';
|
|
@@ -32,11 +30,11 @@ export var withTooltip = function withTooltip(WrapperComponent) {
|
|
|
32
30
|
key: "render",
|
|
33
31
|
value: function render() {
|
|
34
32
|
var label = this.props.label;
|
|
35
|
-
return
|
|
33
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
36
34
|
content: label,
|
|
37
35
|
position: "top",
|
|
38
36
|
tag: ExpandLayoutWrapperWithRef
|
|
39
|
-
},
|
|
37
|
+
}, /*#__PURE__*/React.createElement(WrapperComponent, this.props));
|
|
40
38
|
}
|
|
41
39
|
}]);
|
|
42
40
|
return WithSortableColumn;
|
|
@@ -59,10 +57,10 @@ export var CustomButton = function CustomButton(props) {
|
|
|
59
57
|
})
|
|
60
58
|
}, rest);
|
|
61
59
|
}, [props]);
|
|
62
|
-
return
|
|
60
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
63
61
|
appearance: "subtle",
|
|
64
62
|
className: expandClassNames.iconContainer,
|
|
65
|
-
iconBefore:
|
|
63
|
+
iconBefore: /*#__PURE__*/React.createElement(ChevronRightIcon, {
|
|
66
64
|
label: label
|
|
67
65
|
}),
|
|
68
66
|
shouldFitContainer: true,
|
|
@@ -83,15 +81,16 @@ export var ExpandIconButton = function ExpandIconButton(props) {
|
|
|
83
81
|
|
|
84
82
|
// hoverEventCheck is to disable tooltips for mobile to prevent incorrect hover state causing issues on iOS
|
|
85
83
|
if (props.allowInteractiveExpand && hoverEventCheck) {
|
|
86
|
-
return
|
|
84
|
+
return /*#__PURE__*/React.createElement(ButtonWithTooltip, _extends({
|
|
87
85
|
label: label
|
|
88
86
|
}, props));
|
|
89
87
|
}
|
|
90
88
|
return (
|
|
89
|
+
/*#__PURE__*/
|
|
91
90
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
92
|
-
|
|
91
|
+
React.createElement("div", {
|
|
93
92
|
css: expandLayoutWrapperStyle
|
|
94
|
-
},
|
|
93
|
+
}, /*#__PURE__*/React.createElement(ButtonWithoutTooltip, _extends({
|
|
95
94
|
label: label
|
|
96
95
|
}, props)))
|
|
97
96
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-expand",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Expand plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
".": "./src/index.ts"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@atlaskit/adf-schema": "^
|
|
34
|
+
"@atlaskit/adf-schema": "^35.0.0",
|
|
35
35
|
"@atlaskit/button": "^16.17.0",
|
|
36
|
-
"@atlaskit/editor-common": "^76.
|
|
36
|
+
"@atlaskit/editor-common": "^76.24.0",
|
|
37
37
|
"@atlaskit/editor-plugin-analytics": "^0.3.0",
|
|
38
38
|
"@atlaskit/editor-plugin-decorations": "^0.2.0",
|
|
39
39
|
"@atlaskit/editor-plugin-feature-flags": "^1.0.1",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@atlaskit/editor-plugin-content-insertion": "^0.1.0",
|
|
58
58
|
"@atlaskit/editor-plugin-guideline": "^0.5.0",
|
|
59
59
|
"@atlaskit/editor-plugin-quick-insert": "^0.2.0",
|
|
60
|
-
"@atlaskit/editor-plugin-table": "^5.
|
|
60
|
+
"@atlaskit/editor-plugin-table": "^5.4.0",
|
|
61
61
|
"@atlaskit/editor-plugin-type-ahead": "^0.7.0",
|
|
62
62
|
"@atlaskit/editor-plugin-width": "^0.2.0",
|
|
63
63
|
"@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
|
package/tmp/api-report-tmp.d.ts
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/editor-plugin-expand"
|
|
2
|
-
|
|
3
|
-
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
|
|
7
|
-
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
8
|
-
import type { Command } from '@atlaskit/editor-common/types';
|
|
9
|
-
import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
10
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
11
|
-
import type { EditorAppearance } from '@atlaskit/editor-common/types';
|
|
12
|
-
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
13
|
-
import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
|
|
14
|
-
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
15
|
-
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
16
|
-
import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
17
|
-
|
|
18
|
-
// @public (undocumented)
|
|
19
|
-
export type ExpandPlugin = NextEditorPlugin<'expand', {
|
|
20
|
-
pluginConfiguration: ExpandPluginOptions_2 | undefined;
|
|
21
|
-
dependencies: [
|
|
22
|
-
OptionalPlugin<FeatureFlagsPlugin>,
|
|
23
|
-
DecorationsPlugin,
|
|
24
|
-
SelectionPlugin,
|
|
25
|
-
OptionalPlugin<AnalyticsPlugin>
|
|
26
|
-
];
|
|
27
|
-
actions: {
|
|
28
|
-
insertExpand: ReturnType<typeof insertExpand>;
|
|
29
|
-
};
|
|
30
|
-
}>;
|
|
31
|
-
|
|
32
|
-
// @public (undocumented)
|
|
33
|
-
export const expandPlugin: ExpandPlugin;
|
|
34
|
-
|
|
35
|
-
// @public (undocumented)
|
|
36
|
-
export interface ExpandPluginOptions extends LongPressSelectionPluginOptions {
|
|
37
|
-
// (undocumented)
|
|
38
|
-
allowInsertion?: boolean;
|
|
39
|
-
// (undocumented)
|
|
40
|
-
appearance?: EditorAppearance;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// @public (undocumented)
|
|
44
|
-
interface ExpandPluginOptions_2 extends LongPressSelectionPluginOptions {
|
|
45
|
-
// (undocumented)
|
|
46
|
-
allowInsertion?: boolean;
|
|
47
|
-
// (undocumented)
|
|
48
|
-
appearance?: EditorAppearance;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// @public (undocumented)
|
|
52
|
-
export interface ExpandPluginState {
|
|
53
|
-
// (undocumented)
|
|
54
|
-
expandRef?: HTMLDivElement | null;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// @public (undocumented)
|
|
58
|
-
const insertExpand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
|
|
59
|
-
|
|
60
|
-
// (No @packageDocumentation comment for this package)
|
|
61
|
-
|
|
62
|
-
```
|