@atlaskit/editor-plugin-alignment 1.14.2 → 1.14.4
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 +16 -0
- package/dist/cjs/ui/ToolbarAlignment/index.js +13 -16
- package/dist/es2019/index.js +3 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/ui/ToolbarAlignment/index.js +13 -16
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-alignment
|
|
2
2
|
|
|
3
|
+
## 1.14.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 1.14.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#175552](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/175552)
|
|
14
|
+
[`b29361001f720`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b29361001f720) -
|
|
15
|
+
refactor: remediate re-exports in editor-plugin-ai-definitions, editor-plugin-alignment,
|
|
16
|
+
editor-plugin-analytics, editor-plugin-annotation
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 1.14.2
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -7,10 +7,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = exports.AlignmentToolbar = void 0;
|
|
8
8
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
9
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
11
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
12
10
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
13
11
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
12
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
13
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
14
|
var _react = _interopRequireDefault(require("react"));
|
|
16
15
|
var _react2 = require("@emotion/react");
|
|
@@ -25,38 +24,36 @@ var _types = require("../../pm-plugins/types");
|
|
|
25
24
|
var _Alignment = _interopRequireDefault(require("../Alignment"));
|
|
26
25
|
var _iconMap = require("./icon-map");
|
|
27
26
|
var _styles2 = require("./styles");
|
|
28
|
-
function
|
|
27
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
29
28
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
|
|
30
29
|
* @jsxRuntime classic
|
|
31
30
|
* @jsx jsx
|
|
32
31
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
33
32
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
34
33
|
var AlignmentToolbar = exports.AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
35
|
-
(0, _inherits2.default)(AlignmentToolbar, _React$Component);
|
|
36
|
-
var _super = _createSuper(AlignmentToolbar);
|
|
37
34
|
function AlignmentToolbar() {
|
|
38
35
|
var _this;
|
|
39
36
|
(0, _classCallCheck2.default)(this, AlignmentToolbar);
|
|
40
37
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
41
38
|
args[_key] = arguments[_key];
|
|
42
39
|
}
|
|
43
|
-
_this =
|
|
44
|
-
(0, _defineProperty2.default)(
|
|
45
|
-
(0, _defineProperty2.default)(
|
|
40
|
+
_this = _callSuper(this, AlignmentToolbar, [].concat(args));
|
|
41
|
+
(0, _defineProperty2.default)(_this, "toolbarItemRef", /*#__PURE__*/_react.default.createRef());
|
|
42
|
+
(0, _defineProperty2.default)(_this, "state", {
|
|
46
43
|
isOpen: false
|
|
47
44
|
});
|
|
48
|
-
(0, _defineProperty2.default)(
|
|
45
|
+
(0, _defineProperty2.default)(_this, "changeAlignment", function (align, togglePopup) {
|
|
49
46
|
if (togglePopup) {
|
|
50
47
|
_this.toggleOpen();
|
|
51
48
|
}
|
|
52
49
|
return _this.props.changeAlignment(align);
|
|
53
50
|
});
|
|
54
|
-
(0, _defineProperty2.default)(
|
|
51
|
+
(0, _defineProperty2.default)(_this, "toggleOpen", function () {
|
|
55
52
|
_this.setState({
|
|
56
53
|
isOpen: !_this.state.isOpen
|
|
57
54
|
});
|
|
58
55
|
});
|
|
59
|
-
(0, _defineProperty2.default)(
|
|
56
|
+
(0, _defineProperty2.default)(_this, "toggleOpenByKeyboard", function (event) {
|
|
60
57
|
if (event.key === 'Enter' || event.key === ' ') {
|
|
61
58
|
event.preventDefault();
|
|
62
59
|
_this.setState({
|
|
@@ -64,7 +61,7 @@ var AlignmentToolbar = exports.AlignmentToolbar = /*#__PURE__*/function (_React$
|
|
|
64
61
|
});
|
|
65
62
|
}
|
|
66
63
|
});
|
|
67
|
-
(0, _defineProperty2.default)(
|
|
64
|
+
(0, _defineProperty2.default)(_this, "hide", function (attrs) {
|
|
68
65
|
if (_this.state.isOpen) {
|
|
69
66
|
_this.setState({
|
|
70
67
|
isOpen: false
|
|
@@ -75,19 +72,20 @@ var AlignmentToolbar = exports.AlignmentToolbar = /*#__PURE__*/function (_React$
|
|
|
75
72
|
}
|
|
76
73
|
}
|
|
77
74
|
});
|
|
78
|
-
(0, _defineProperty2.default)(
|
|
75
|
+
(0, _defineProperty2.default)(_this, "hideOnEscape", function () {
|
|
79
76
|
var _this$toolbarItemRef2;
|
|
80
77
|
_this.hide();
|
|
81
78
|
(_this$toolbarItemRef2 = _this.toolbarItemRef) === null || _this$toolbarItemRef2 === void 0 || (_this$toolbarItemRef2 = _this$toolbarItemRef2.current) === null || _this$toolbarItemRef2 === void 0 || _this$toolbarItemRef2.focus();
|
|
82
79
|
});
|
|
83
|
-
(0, _defineProperty2.default)(
|
|
80
|
+
(0, _defineProperty2.default)(_this, "onOpenChange", function () {
|
|
84
81
|
_this.setState({
|
|
85
82
|
isOpen: false
|
|
86
83
|
});
|
|
87
84
|
});
|
|
88
85
|
return _this;
|
|
89
86
|
}
|
|
90
|
-
(0,
|
|
87
|
+
(0, _inherits2.default)(AlignmentToolbar, _React$Component);
|
|
88
|
+
return (0, _createClass2.default)(AlignmentToolbar, [{
|
|
91
89
|
key: "render",
|
|
92
90
|
value: function render() {
|
|
93
91
|
var _pluginState$align,
|
|
@@ -198,7 +196,6 @@ var AlignmentToolbar = exports.AlignmentToolbar = /*#__PURE__*/function (_React$
|
|
|
198
196
|
}
|
|
199
197
|
}
|
|
200
198
|
}]);
|
|
201
|
-
return AlignmentToolbar;
|
|
202
199
|
}(_react.default.Component);
|
|
203
200
|
(0, _defineProperty2.default)(AlignmentToolbar, "displayName", 'AlignmentToolbar');
|
|
204
201
|
var _default = exports.default = (0, _reactIntlNext.injectIntl)(AlignmentToolbar);
|
package/dist/es2019/index.js
CHANGED
package/dist/esm/index.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
function
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
9
|
/**
|
|
11
10
|
* @jsxRuntime classic
|
|
@@ -28,31 +27,29 @@ import { IconMap } from './icon-map';
|
|
|
28
27
|
import { triggerWrapper, wrapper } from './styles';
|
|
29
28
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
30
29
|
export var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
31
|
-
_inherits(AlignmentToolbar, _React$Component);
|
|
32
|
-
var _super = _createSuper(AlignmentToolbar);
|
|
33
30
|
function AlignmentToolbar() {
|
|
34
31
|
var _this;
|
|
35
32
|
_classCallCheck(this, AlignmentToolbar);
|
|
36
33
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
37
34
|
args[_key] = arguments[_key];
|
|
38
35
|
}
|
|
39
|
-
_this =
|
|
40
|
-
_defineProperty(
|
|
41
|
-
_defineProperty(
|
|
36
|
+
_this = _callSuper(this, AlignmentToolbar, [].concat(args));
|
|
37
|
+
_defineProperty(_this, "toolbarItemRef", /*#__PURE__*/React.createRef());
|
|
38
|
+
_defineProperty(_this, "state", {
|
|
42
39
|
isOpen: false
|
|
43
40
|
});
|
|
44
|
-
_defineProperty(
|
|
41
|
+
_defineProperty(_this, "changeAlignment", function (align, togglePopup) {
|
|
45
42
|
if (togglePopup) {
|
|
46
43
|
_this.toggleOpen();
|
|
47
44
|
}
|
|
48
45
|
return _this.props.changeAlignment(align);
|
|
49
46
|
});
|
|
50
|
-
_defineProperty(
|
|
47
|
+
_defineProperty(_this, "toggleOpen", function () {
|
|
51
48
|
_this.setState({
|
|
52
49
|
isOpen: !_this.state.isOpen
|
|
53
50
|
});
|
|
54
51
|
});
|
|
55
|
-
_defineProperty(
|
|
52
|
+
_defineProperty(_this, "toggleOpenByKeyboard", function (event) {
|
|
56
53
|
if (event.key === 'Enter' || event.key === ' ') {
|
|
57
54
|
event.preventDefault();
|
|
58
55
|
_this.setState({
|
|
@@ -60,7 +57,7 @@ export var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
60
57
|
});
|
|
61
58
|
}
|
|
62
59
|
});
|
|
63
|
-
_defineProperty(
|
|
60
|
+
_defineProperty(_this, "hide", function (attrs) {
|
|
64
61
|
if (_this.state.isOpen) {
|
|
65
62
|
_this.setState({
|
|
66
63
|
isOpen: false
|
|
@@ -71,19 +68,20 @@ export var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
71
68
|
}
|
|
72
69
|
}
|
|
73
70
|
});
|
|
74
|
-
_defineProperty(
|
|
71
|
+
_defineProperty(_this, "hideOnEscape", function () {
|
|
75
72
|
var _this$toolbarItemRef2;
|
|
76
73
|
_this.hide();
|
|
77
74
|
(_this$toolbarItemRef2 = _this.toolbarItemRef) === null || _this$toolbarItemRef2 === void 0 || (_this$toolbarItemRef2 = _this$toolbarItemRef2.current) === null || _this$toolbarItemRef2 === void 0 || _this$toolbarItemRef2.focus();
|
|
78
75
|
});
|
|
79
|
-
_defineProperty(
|
|
76
|
+
_defineProperty(_this, "onOpenChange", function () {
|
|
80
77
|
_this.setState({
|
|
81
78
|
isOpen: false
|
|
82
79
|
});
|
|
83
80
|
});
|
|
84
81
|
return _this;
|
|
85
82
|
}
|
|
86
|
-
|
|
83
|
+
_inherits(AlignmentToolbar, _React$Component);
|
|
84
|
+
return _createClass(AlignmentToolbar, [{
|
|
87
85
|
key: "render",
|
|
88
86
|
value: function render() {
|
|
89
87
|
var _pluginState$align,
|
|
@@ -194,7 +192,6 @@ export var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
194
192
|
}
|
|
195
193
|
}
|
|
196
194
|
}]);
|
|
197
|
-
return AlignmentToolbar;
|
|
198
195
|
}(React.Component);
|
|
199
196
|
_defineProperty(AlignmentToolbar, "displayName", 'AlignmentToolbar');
|
|
200
197
|
export default injectIntl(AlignmentToolbar);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-alignment",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.4",
|
|
4
4
|
"description": "Alignment plugin for @atlaskit/editor-core",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@atlaskit/adf-schema": "^46.1.0",
|
|
24
|
-
"@atlaskit/editor-common": "^
|
|
25
|
-
"@atlaskit/editor-plugin-primary-toolbar": "^2.
|
|
24
|
+
"@atlaskit/editor-common": "^97.0.0",
|
|
25
|
+
"@atlaskit/editor-plugin-primary-toolbar": "^2.1.0",
|
|
26
26
|
"@atlaskit/editor-prosemirror": "6.2.1",
|
|
27
27
|
"@atlaskit/editor-tables": "^2.8.0",
|
|
28
|
-
"@atlaskit/icon": "^23.
|
|
28
|
+
"@atlaskit/icon": "^23.1.0",
|
|
29
29
|
"@atlaskit/platform-feature-flags": "0.3.0",
|
|
30
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
31
|
-
"@atlaskit/tokens": "^2.
|
|
30
|
+
"@atlaskit/tmp-editor-statsig": "^2.29.0",
|
|
31
|
+
"@atlaskit/tokens": "^2.5.0",
|
|
32
32
|
"@babel/runtime": "^7.0.0",
|
|
33
33
|
"@emotion/react": "^11.7.1"
|
|
34
34
|
},
|