@atlaskit/editor-plugin-alignment 1.11.1 → 1.12.0
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 +12 -0
- package/dist/cjs/ui/ToolbarAlignment/icon-map.js +4 -10
- package/dist/cjs/ui/ToolbarAlignment/index.js +10 -14
- package/dist/es2019/ui/ToolbarAlignment/icon-map.js +4 -10
- package/dist/es2019/ui/ToolbarAlignment/index.js +9 -13
- package/dist/esm/ui/ToolbarAlignment/icon-map.js +4 -10
- package/dist/esm/ui/ToolbarAlignment/index.js +9 -13
- package/package.json +2 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-alignment
|
|
2
2
|
|
|
3
|
+
## 1.12.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#133191](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/133191)
|
|
8
|
+
[`78a1927084934`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/78a1927084934) -
|
|
9
|
+
[ux] Remove icon migration feature gate and migrate new icons on primary toolbar
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 1.11.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -11,21 +11,17 @@ var _messages = require("@atlaskit/editor-common/messages");
|
|
|
11
11
|
var _alignCenterEditorAlignCenter = _interopRequireDefault(require("@atlaskit/icon/core/migration/align-center--editor-align-center"));
|
|
12
12
|
var _alignLeftEditorAlignLeft = _interopRequireDefault(require("@atlaskit/icon/core/migration/align-left--editor-align-left"));
|
|
13
13
|
var _alignRightEditorAlignRight = _interopRequireDefault(require("@atlaskit/icon/core/migration/align-right--editor-align-right"));
|
|
14
|
-
var _alignCenter = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/align-center"));
|
|
15
|
-
var _alignLeft = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/align-left"));
|
|
16
|
-
var _alignRight = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/align-right"));
|
|
17
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
14
|
var iconAndMessageMap = {
|
|
19
15
|
start: {
|
|
20
|
-
Component:
|
|
16
|
+
Component: _alignLeftEditorAlignLeft.default,
|
|
21
17
|
label: _messages.alignmentMessages.alignLeft
|
|
22
18
|
},
|
|
23
19
|
end: {
|
|
24
|
-
Component:
|
|
20
|
+
Component: _alignRightEditorAlignRight.default,
|
|
25
21
|
label: _messages.alignmentMessages.alignRight
|
|
26
22
|
},
|
|
27
23
|
center: {
|
|
28
|
-
Component:
|
|
24
|
+
Component: _alignCenterEditorAlignCenter.default,
|
|
29
25
|
label: _messages.alignmentMessages.alignCenter
|
|
30
26
|
}
|
|
31
27
|
};
|
|
@@ -34,11 +30,9 @@ var IconMap = exports.IconMap = function IconMap(props) {
|
|
|
34
30
|
Component = _iconAndMessageMap$pr.Component,
|
|
35
31
|
label = _iconAndMessageMap$pr.label;
|
|
36
32
|
var intl = (0, _reactIntlNext.useIntl)();
|
|
37
|
-
return
|
|
33
|
+
return /*#__PURE__*/_react.default.createElement(Component, {
|
|
38
34
|
label: intl.formatMessage(label),
|
|
39
35
|
color: "currentColor",
|
|
40
36
|
spacing: "spacious"
|
|
41
|
-
}) : /*#__PURE__*/_react.default.createElement(Component, {
|
|
42
|
-
label: intl.formatMessage(label)
|
|
43
37
|
});
|
|
44
38
|
};
|
|
@@ -18,8 +18,7 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
18
18
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
19
19
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
20
20
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
21
|
-
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/
|
|
22
|
-
var _chevronDown2 = _interopRequireDefault(require("@atlaskit/icon/utility/migration/chevron-down"));
|
|
21
|
+
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/utility/migration/chevron-down"));
|
|
23
22
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
24
23
|
var _Alignment = _interopRequireDefault(require("../Alignment"));
|
|
25
24
|
var _iconMap = require("./icon-map");
|
|
@@ -147,19 +146,16 @@ var AlignmentToolbar = exports.AlignmentToolbar = /*#__PURE__*/function (_React$
|
|
|
147
146
|
css: _styles2.triggerWrapper
|
|
148
147
|
}, (0, _react2.jsx)(_iconMap.IconMap, {
|
|
149
148
|
alignment: alignment
|
|
150
|
-
}), (0,
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
color: "currentColor"
|
|
157
|
-
})) :
|
|
158
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
159
|
-
(0, _react2.jsx)("span", {
|
|
160
|
-
css: _styles2.expandIconWrapper
|
|
149
|
+
}), (0, _react2.jsx)("span", {
|
|
150
|
+
css: [
|
|
151
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-registration
|
|
152
|
+
(0, _platformFeatureFlags.fg)('platform.design-system-team.enable-new-icons') &&
|
|
153
|
+
//eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
154
|
+
_styles.expandIconContainerStyle]
|
|
161
155
|
}, (0, _react2.jsx)(_chevronDown.default, {
|
|
162
|
-
label: ""
|
|
156
|
+
label: "",
|
|
157
|
+
color: "currentColor",
|
|
158
|
+
LEGACY_margin: "0 0 0 -8px"
|
|
163
159
|
}))),
|
|
164
160
|
ref: this.toolbarItemRef
|
|
165
161
|
})
|
|
@@ -4,21 +4,17 @@ import { alignmentMessages as messages } from '@atlaskit/editor-common/messages'
|
|
|
4
4
|
import AlignCenterIcon from '@atlaskit/icon/core/migration/align-center--editor-align-center';
|
|
5
5
|
import AlignLeftIcon from '@atlaskit/icon/core/migration/align-left--editor-align-left';
|
|
6
6
|
import AlignRightIcon from '@atlaskit/icon/core/migration/align-right--editor-align-right';
|
|
7
|
-
import EditorAlignCenterIcon from '@atlaskit/icon/glyph/editor/align-center';
|
|
8
|
-
import EditorAlignLeftIcon from '@atlaskit/icon/glyph/editor/align-left';
|
|
9
|
-
import EditorAlignRightIcon from '@atlaskit/icon/glyph/editor/align-right';
|
|
10
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
7
|
const iconAndMessageMap = {
|
|
12
8
|
start: {
|
|
13
|
-
Component:
|
|
9
|
+
Component: AlignLeftIcon,
|
|
14
10
|
label: messages.alignLeft
|
|
15
11
|
},
|
|
16
12
|
end: {
|
|
17
|
-
Component:
|
|
13
|
+
Component: AlignRightIcon,
|
|
18
14
|
label: messages.alignRight
|
|
19
15
|
},
|
|
20
16
|
center: {
|
|
21
|
-
Component:
|
|
17
|
+
Component: AlignCenterIcon,
|
|
22
18
|
label: messages.alignCenter
|
|
23
19
|
}
|
|
24
20
|
};
|
|
@@ -28,11 +24,9 @@ export const IconMap = props => {
|
|
|
28
24
|
label
|
|
29
25
|
} = iconAndMessageMap[props.alignment];
|
|
30
26
|
const intl = useIntl();
|
|
31
|
-
return
|
|
27
|
+
return /*#__PURE__*/React.createElement(Component, {
|
|
32
28
|
label: intl.formatMessage(label),
|
|
33
29
|
color: "currentColor",
|
|
34
30
|
spacing: "spacious"
|
|
35
|
-
}) : /*#__PURE__*/React.createElement(Component, {
|
|
36
|
-
label: intl.formatMessage(label)
|
|
37
31
|
});
|
|
38
32
|
};
|
|
@@ -11,12 +11,11 @@ import { injectIntl } from 'react-intl-next';
|
|
|
11
11
|
import { alignmentMessages as messages } from '@atlaskit/editor-common/messages';
|
|
12
12
|
import { expandIconContainerStyle, separatorStyles } from '@atlaskit/editor-common/styles';
|
|
13
13
|
import { ArrowKeyNavigationType, DropdownContainer as Dropdown, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
14
|
-
import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
15
14
|
import ChevronDownIcon from '@atlaskit/icon/utility/migration/chevron-down';
|
|
16
15
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
16
|
import Alignment from '../Alignment';
|
|
18
17
|
import { IconMap } from './icon-map';
|
|
19
|
-
import {
|
|
18
|
+
import { triggerWrapper, wrapper } from './styles';
|
|
20
19
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
21
20
|
export class AlignmentToolbar extends React.Component {
|
|
22
21
|
constructor(...args) {
|
|
@@ -127,19 +126,16 @@ export class AlignmentToolbar extends React.Component {
|
|
|
127
126
|
css: triggerWrapper
|
|
128
127
|
}, jsx(IconMap, {
|
|
129
128
|
alignment: alignment
|
|
130
|
-
}),
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
129
|
+
}), jsx("span", {
|
|
130
|
+
css: [
|
|
131
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-registration
|
|
132
|
+
fg('platform.design-system-team.enable-new-icons') &&
|
|
133
|
+
//eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
134
|
+
expandIconContainerStyle]
|
|
134
135
|
}, jsx(ChevronDownIcon, {
|
|
135
136
|
label: "",
|
|
136
|
-
color: "currentColor"
|
|
137
|
-
|
|
138
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
139
|
-
jsx("span", {
|
|
140
|
-
css: expandIconWrapper
|
|
141
|
-
}, jsx(ExpandIcon, {
|
|
142
|
-
label: ""
|
|
137
|
+
color: "currentColor",
|
|
138
|
+
LEGACY_margin: "0 0 0 -8px"
|
|
143
139
|
}))),
|
|
144
140
|
ref: this.toolbarItemRef
|
|
145
141
|
})
|
|
@@ -4,21 +4,17 @@ import { alignmentMessages as messages } from '@atlaskit/editor-common/messages'
|
|
|
4
4
|
import AlignCenterIcon from '@atlaskit/icon/core/migration/align-center--editor-align-center';
|
|
5
5
|
import AlignLeftIcon from '@atlaskit/icon/core/migration/align-left--editor-align-left';
|
|
6
6
|
import AlignRightIcon from '@atlaskit/icon/core/migration/align-right--editor-align-right';
|
|
7
|
-
import EditorAlignCenterIcon from '@atlaskit/icon/glyph/editor/align-center';
|
|
8
|
-
import EditorAlignLeftIcon from '@atlaskit/icon/glyph/editor/align-left';
|
|
9
|
-
import EditorAlignRightIcon from '@atlaskit/icon/glyph/editor/align-right';
|
|
10
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
7
|
var iconAndMessageMap = {
|
|
12
8
|
start: {
|
|
13
|
-
Component:
|
|
9
|
+
Component: AlignLeftIcon,
|
|
14
10
|
label: messages.alignLeft
|
|
15
11
|
},
|
|
16
12
|
end: {
|
|
17
|
-
Component:
|
|
13
|
+
Component: AlignRightIcon,
|
|
18
14
|
label: messages.alignRight
|
|
19
15
|
},
|
|
20
16
|
center: {
|
|
21
|
-
Component:
|
|
17
|
+
Component: AlignCenterIcon,
|
|
22
18
|
label: messages.alignCenter
|
|
23
19
|
}
|
|
24
20
|
};
|
|
@@ -27,11 +23,9 @@ export var IconMap = function IconMap(props) {
|
|
|
27
23
|
Component = _iconAndMessageMap$pr.Component,
|
|
28
24
|
label = _iconAndMessageMap$pr.label;
|
|
29
25
|
var intl = useIntl();
|
|
30
|
-
return
|
|
26
|
+
return /*#__PURE__*/React.createElement(Component, {
|
|
31
27
|
label: intl.formatMessage(label),
|
|
32
28
|
color: "currentColor",
|
|
33
29
|
spacing: "spacious"
|
|
34
|
-
}) : /*#__PURE__*/React.createElement(Component, {
|
|
35
|
-
label: intl.formatMessage(label)
|
|
36
30
|
});
|
|
37
31
|
};
|
|
@@ -19,12 +19,11 @@ import { injectIntl } from 'react-intl-next';
|
|
|
19
19
|
import { alignmentMessages as messages } from '@atlaskit/editor-common/messages';
|
|
20
20
|
import { expandIconContainerStyle, separatorStyles } from '@atlaskit/editor-common/styles';
|
|
21
21
|
import { ArrowKeyNavigationType, DropdownContainer as Dropdown, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
22
|
-
import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
23
22
|
import ChevronDownIcon from '@atlaskit/icon/utility/migration/chevron-down';
|
|
24
23
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
25
24
|
import Alignment from '../Alignment';
|
|
26
25
|
import { IconMap } from './icon-map';
|
|
27
|
-
import {
|
|
26
|
+
import { triggerWrapper, wrapper } from './styles';
|
|
28
27
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
29
28
|
export var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
30
29
|
_inherits(AlignmentToolbar, _React$Component);
|
|
@@ -143,19 +142,16 @@ export var AlignmentToolbar = /*#__PURE__*/function (_React$Component) {
|
|
|
143
142
|
css: triggerWrapper
|
|
144
143
|
}, jsx(IconMap, {
|
|
145
144
|
alignment: alignment
|
|
146
|
-
}),
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
145
|
+
}), jsx("span", {
|
|
146
|
+
css: [
|
|
147
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-registration
|
|
148
|
+
fg('platform.design-system-team.enable-new-icons') &&
|
|
149
|
+
//eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
150
|
+
expandIconContainerStyle]
|
|
150
151
|
}, jsx(ChevronDownIcon, {
|
|
151
152
|
label: "",
|
|
152
|
-
color: "currentColor"
|
|
153
|
-
|
|
154
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
155
|
-
jsx("span", {
|
|
156
|
-
css: expandIconWrapper
|
|
157
|
-
}, jsx(ExpandIcon, {
|
|
158
|
-
label: ""
|
|
153
|
+
color: "currentColor",
|
|
154
|
+
LEGACY_margin: "0 0 0 -8px"
|
|
159
155
|
}))),
|
|
160
156
|
ref: this.toolbarItemRef
|
|
161
157
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-alignment",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.0",
|
|
4
4
|
"description": "Alignment plugin for @atlaskit/editor-core",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@atlaskit/adf-schema": "^40.8.1",
|
|
25
|
-
"@atlaskit/editor-common": "^88.
|
|
25
|
+
"@atlaskit/editor-common": "^88.1.0",
|
|
26
26
|
"@atlaskit/editor-plugin-primary-toolbar": "^2.0.0",
|
|
27
27
|
"@atlaskit/editor-prosemirror": "5.0.1",
|
|
28
28
|
"@atlaskit/editor-tables": "^2.8.0",
|
|
@@ -91,10 +91,5 @@
|
|
|
91
91
|
},
|
|
92
92
|
"af:exports": {
|
|
93
93
|
".": "./src/index.ts"
|
|
94
|
-
},
|
|
95
|
-
"platform-feature-flags": {
|
|
96
|
-
"platform_editor_migration_icon_and_typography": {
|
|
97
|
-
"type": "boolean"
|
|
98
|
-
}
|
|
99
94
|
}
|
|
100
95
|
}
|