@atlaskit/editor-core 182.1.1 → 182.1.2
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 +6 -0
- package/dist/cjs/analytics-api/attach-payload-into-transaction.js +4 -0
- package/dist/cjs/plugins/analytics/utils.js +2 -0
- package/dist/cjs/plugins/media/toolbar/index.js +3 -0
- package/dist/cjs/plugins/media/ui/ImageBorder/index.js +1 -1
- package/dist/cjs/plugins/media/ui/ImageBorder/styles.js +1 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/analytics-api/attach-payload-into-transaction.js +4 -0
- package/dist/es2019/plugins/analytics/utils.js +2 -0
- package/dist/es2019/plugins/media/toolbar/index.js +3 -0
- package/dist/es2019/plugins/media/ui/ImageBorder/index.js +1 -1
- package/dist/es2019/plugins/media/ui/ImageBorder/styles.js +1 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/analytics-api/attach-payload-into-transaction.js +4 -0
- package/dist/esm/plugins/analytics/utils.js +2 -0
- package/dist/esm/plugins/media/toolbar/index.js +3 -0
- package/dist/esm/plugins/media/ui/ImageBorder/index.js +1 -1
- package/dist/esm/plugins/media/ui/ImageBorder/styles.js +1 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 182.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`a6a3544d04d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a6a3544d04d) - [ux] Fix the image border split button so that both the toggle and the dropdown buttons share the same select state; and add a divider line between it and the align left icon group
|
|
8
|
+
|
|
3
9
|
## 182.1.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -9,6 +9,10 @@ var _mapAttributes = require("./map-attributes");
|
|
|
9
9
|
var _steps = require("@atlaskit/adf-schema/steps");
|
|
10
10
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
11
11
|
var actionsToIgnore = [_analytics.ACTION.INVOKED, _analytics.ACTION.OPENED];
|
|
12
|
+
// This utils was taken as reference in packages/editor/editor-plugin-ai/src/analytics/utils.ts
|
|
13
|
+
// to create new util attachPayloadIntoTransaction in above file.
|
|
14
|
+
// If you make a change here, please review attachPayloadIntoTransaction in above
|
|
15
|
+
// file and update it as well if needed.
|
|
12
16
|
var attachPayloadIntoTransaction = function attachPayloadIntoTransaction(_ref) {
|
|
13
17
|
var payload = _ref.payload,
|
|
14
18
|
editorState = _ref.editorState,
|
|
@@ -52,6 +52,8 @@ function addAnalytics(state, tr, payload) {
|
|
|
52
52
|
});
|
|
53
53
|
return tr;
|
|
54
54
|
}
|
|
55
|
+
// Below function has been copied to packages/editor/editor-plugin-ai/src/utils/analytics.ts
|
|
56
|
+
// If changes are made to this function, please make the same update in the linked file.
|
|
55
57
|
function withAnalytics(payload, channel) {
|
|
56
58
|
return function (command) {
|
|
57
59
|
return function (state, dispatch, view) {
|
|
@@ -226,6 +226,9 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
226
226
|
});
|
|
227
227
|
}
|
|
228
228
|
});
|
|
229
|
+
toolbarButtons.push({
|
|
230
|
+
type: 'separator'
|
|
231
|
+
});
|
|
229
232
|
}
|
|
230
233
|
if (allowAdvancedToolBarOptions) {
|
|
231
234
|
toolbarButtons = [].concat((0, _toConsumableArray2.default)(toolbarButtons), (0, _toConsumableArray2.default)((0, _MediaAndEmbedsToolbar.default)(state, intl, state.schema.nodes.mediaSingle, allowResizing, allowResizingInTables)));
|
|
@@ -145,7 +145,7 @@ var ImageBorder = function ImageBorder(_ref) {
|
|
|
145
145
|
ref: popupTarget
|
|
146
146
|
}, (0, _react.jsx)(_ToolbarButton.default, {
|
|
147
147
|
className: "image-border-toolbar-dropdown",
|
|
148
|
-
selected: isOpen,
|
|
148
|
+
selected: enabled || isOpen,
|
|
149
149
|
"aria-label": formatMessage(_messages.messages.borderOptions),
|
|
150
150
|
title: formatMessage(_messages.messages.borderOptions),
|
|
151
151
|
spacing: "compact",
|
|
@@ -49,6 +49,6 @@ exports.line = line;
|
|
|
49
49
|
var toolbarButtonWrapper = function toolbarButtonWrapper(_ref) {
|
|
50
50
|
var enabled = _ref.enabled,
|
|
51
51
|
isOpen = _ref.isOpen;
|
|
52
|
-
return (0, _react.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n .image-border-toolbar-btn {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n padding: 0;\n & > span {\n margin: 0;\n }\n }\n .image-border-toolbar-dropdown {\n padding: 0;\n & > span {\n margin: 0;\n }\n width: 16px !important;\n border-top-left-radius: 0 !important;\n border-bottom-left-radius: 0 !important;\n margin-left: 1px;\n }\n\n &:hover {\n .image-border-toolbar-btn {\n ", "\n }\n\n .image-border-toolbar-dropdown {\n ", "\n }\n }\n"])), !enabled && " background: ".concat("var(--ds-background-neutral-subtle-hovered, ".concat(colors.N30A, ")"), ";"), !isOpen && "background: ".concat("var(--ds-background-neutral-subtle-hovered, ".concat(colors.N30A, ")"), ";"));
|
|
52
|
+
return (0, _react.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n .image-border-toolbar-btn {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n padding: 0;\n & > span {\n margin: 0;\n }\n }\n .image-border-toolbar-dropdown {\n padding: 0;\n & > span {\n margin: 0;\n }\n width: 16px !important;\n border-top-left-radius: 0 !important;\n border-bottom-left-radius: 0 !important;\n margin-left: 1px;\n }\n\n &:hover {\n .image-border-toolbar-btn {\n ", "\n }\n\n .image-border-toolbar-dropdown {\n ", "\n }\n }\n"])), !enabled && " background: ".concat("var(--ds-background-neutral-subtle-hovered, ".concat(colors.N30A, ")"), ";"), !isOpen && !enabled && "background: ".concat("var(--ds-background-neutral-subtle-hovered, ".concat(colors.N30A, ")"), ";"));
|
|
53
53
|
};
|
|
54
54
|
exports.toolbarButtonWrapper = toolbarButtonWrapper;
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.version = exports.nextMajorVersion = exports.name = void 0;
|
|
7
7
|
var name = "@atlaskit/editor-core";
|
|
8
8
|
exports.name = name;
|
|
9
|
-
var version = "182.1.
|
|
9
|
+
var version = "182.1.2";
|
|
10
10
|
exports.version = version;
|
|
11
11
|
var nextMajorVersion = function nextMajorVersion() {
|
|
12
12
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
package/dist/cjs/version.json
CHANGED
|
@@ -3,6 +3,10 @@ import { mapActionSubjectIdToAttributes } from './map-attributes';
|
|
|
3
3
|
import { AnalyticsStep } from '@atlaskit/adf-schema/steps';
|
|
4
4
|
import { ACTION } from '@atlaskit/editor-common/analytics';
|
|
5
5
|
const actionsToIgnore = [ACTION.INVOKED, ACTION.OPENED];
|
|
6
|
+
// This utils was taken as reference in packages/editor/editor-plugin-ai/src/analytics/utils.ts
|
|
7
|
+
// to create new util attachPayloadIntoTransaction in above file.
|
|
8
|
+
// If you make a change here, please review attachPayloadIntoTransaction in above
|
|
9
|
+
// file and update it as well if needed.
|
|
6
10
|
export const attachPayloadIntoTransaction = ({
|
|
7
11
|
payload,
|
|
8
12
|
editorState,
|
|
@@ -21,6 +21,8 @@ export function addAnalytics(state, tr, payload, channel = editorAnalyticsChanne
|
|
|
21
21
|
});
|
|
22
22
|
return tr;
|
|
23
23
|
}
|
|
24
|
+
// Below function has been copied to packages/editor/editor-plugin-ai/src/utils/analytics.ts
|
|
25
|
+
// If changes are made to this function, please make the same update in the linked file.
|
|
24
26
|
export function withAnalytics(payload, channel) {
|
|
25
27
|
return command => (state, dispatch, view) => command(state, tr => {
|
|
26
28
|
if (dispatch) {
|
|
@@ -225,6 +225,9 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
225
225
|
});
|
|
226
226
|
}
|
|
227
227
|
});
|
|
228
|
+
toolbarButtons.push({
|
|
229
|
+
type: 'separator'
|
|
230
|
+
});
|
|
228
231
|
}
|
|
229
232
|
if (allowAdvancedToolBarOptions) {
|
|
230
233
|
toolbarButtons = [...toolbarButtons, ...buildLayoutButtons(state, intl, state.schema.nodes.mediaSingle, allowResizing, allowResizingInTables)];
|
|
@@ -130,7 +130,7 @@ const ImageBorder = ({
|
|
|
130
130
|
ref: popupTarget
|
|
131
131
|
}, jsx(ToolbarButton, {
|
|
132
132
|
className: "image-border-toolbar-dropdown",
|
|
133
|
-
selected: isOpen,
|
|
133
|
+
selected: enabled || isOpen,
|
|
134
134
|
"aria-label": formatMessage(messages.borderOptions),
|
|
135
135
|
title: formatMessage(messages.borderOptions),
|
|
136
136
|
spacing: "compact",
|
|
@@ -118,7 +118,7 @@ export const toolbarButtonWrapper = ({
|
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
.image-border-toolbar-dropdown {
|
|
121
|
-
${!isOpen && `background: ${`var(--ds-background-neutral-subtle-hovered, ${colors.N30A})`};`}
|
|
121
|
+
${!isOpen && !enabled && `background: ${`var(--ds-background-neutral-subtle-hovered, ${colors.N30A})`};`}
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
`;
|
package/dist/es2019/version.json
CHANGED
|
@@ -3,6 +3,10 @@ import { mapActionSubjectIdToAttributes } from './map-attributes';
|
|
|
3
3
|
import { AnalyticsStep } from '@atlaskit/adf-schema/steps';
|
|
4
4
|
import { ACTION } from '@atlaskit/editor-common/analytics';
|
|
5
5
|
var actionsToIgnore = [ACTION.INVOKED, ACTION.OPENED];
|
|
6
|
+
// This utils was taken as reference in packages/editor/editor-plugin-ai/src/analytics/utils.ts
|
|
7
|
+
// to create new util attachPayloadIntoTransaction in above file.
|
|
8
|
+
// If you make a change here, please review attachPayloadIntoTransaction in above
|
|
9
|
+
// file and update it as well if needed.
|
|
6
10
|
export var attachPayloadIntoTransaction = function attachPayloadIntoTransaction(_ref) {
|
|
7
11
|
var payload = _ref.payload,
|
|
8
12
|
editorState = _ref.editorState,
|
|
@@ -22,6 +22,8 @@ export function addAnalytics(state, tr, payload) {
|
|
|
22
22
|
});
|
|
23
23
|
return tr;
|
|
24
24
|
}
|
|
25
|
+
// Below function has been copied to packages/editor/editor-plugin-ai/src/utils/analytics.ts
|
|
26
|
+
// If changes are made to this function, please make the same update in the linked file.
|
|
25
27
|
export function withAnalytics(payload, channel) {
|
|
26
28
|
return function (command) {
|
|
27
29
|
return function (state, dispatch, view) {
|
|
@@ -219,6 +219,9 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
|
|
|
219
219
|
});
|
|
220
220
|
}
|
|
221
221
|
});
|
|
222
|
+
toolbarButtons.push({
|
|
223
|
+
type: 'separator'
|
|
224
|
+
});
|
|
222
225
|
}
|
|
223
226
|
if (allowAdvancedToolBarOptions) {
|
|
224
227
|
toolbarButtons = [].concat(_toConsumableArray(toolbarButtons), _toConsumableArray(buildLayoutButtons(state, intl, state.schema.nodes.mediaSingle, allowResizing, allowResizingInTables)));
|
|
@@ -138,7 +138,7 @@ var ImageBorder = function ImageBorder(_ref) {
|
|
|
138
138
|
ref: popupTarget
|
|
139
139
|
}, jsx(ToolbarButton, {
|
|
140
140
|
className: "image-border-toolbar-dropdown",
|
|
141
|
-
selected: isOpen,
|
|
141
|
+
selected: enabled || isOpen,
|
|
142
142
|
"aria-label": formatMessage(messages.borderOptions),
|
|
143
143
|
title: formatMessage(messages.borderOptions),
|
|
144
144
|
spacing: "compact",
|
|
@@ -33,5 +33,5 @@ export var line = function line(size, selected) {
|
|
|
33
33
|
export var toolbarButtonWrapper = function toolbarButtonWrapper(_ref) {
|
|
34
34
|
var enabled = _ref.enabled,
|
|
35
35
|
isOpen = _ref.isOpen;
|
|
36
|
-
return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n .image-border-toolbar-btn {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n padding: 0;\n & > span {\n margin: 0;\n }\n }\n .image-border-toolbar-dropdown {\n padding: 0;\n & > span {\n margin: 0;\n }\n width: 16px !important;\n border-top-left-radius: 0 !important;\n border-bottom-left-radius: 0 !important;\n margin-left: 1px;\n }\n\n &:hover {\n .image-border-toolbar-btn {\n ", "\n }\n\n .image-border-toolbar-dropdown {\n ", "\n }\n }\n"])), !enabled && " background: ".concat("var(--ds-background-neutral-subtle-hovered, ".concat(colors.N30A, ")"), ";"), !isOpen && "background: ".concat("var(--ds-background-neutral-subtle-hovered, ".concat(colors.N30A, ")"), ";"));
|
|
36
|
+
return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n .image-border-toolbar-btn {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n padding: 0;\n & > span {\n margin: 0;\n }\n }\n .image-border-toolbar-dropdown {\n padding: 0;\n & > span {\n margin: 0;\n }\n width: 16px !important;\n border-top-left-radius: 0 !important;\n border-bottom-left-radius: 0 !important;\n margin-left: 1px;\n }\n\n &:hover {\n .image-border-toolbar-btn {\n ", "\n }\n\n .image-border-toolbar-dropdown {\n ", "\n }\n }\n"])), !enabled && " background: ".concat("var(--ds-background-neutral-subtle-hovered, ".concat(colors.N30A, ")"), ";"), !isOpen && !enabled && "background: ".concat("var(--ds-background-neutral-subtle-hovered, ".concat(colors.N30A, ")"), ";"));
|
|
37
37
|
};
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "182.1.
|
|
3
|
+
"version": "182.1.2",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"@atlaskit/code": "^14.5.0",
|
|
42
42
|
"@atlaskit/date": "^0.9.0",
|
|
43
43
|
"@atlaskit/datetime-picker": "^12.3.0",
|
|
44
|
-
"@atlaskit/editor-common": "^72.
|
|
44
|
+
"@atlaskit/editor-common": "^72.9.0",
|
|
45
45
|
"@atlaskit/editor-json-transformer": "^8.8.0",
|
|
46
|
-
"@atlaskit/editor-markdown-transformer": "^5.
|
|
46
|
+
"@atlaskit/editor-markdown-transformer": "^5.1.0",
|
|
47
47
|
"@atlaskit/editor-palette": "1.3.0",
|
|
48
48
|
"@atlaskit/editor-plugin-feature-flags": "^0.0.3",
|
|
49
49
|
"@atlaskit/editor-plugin-table": "^1.2.0",
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
"@atlaskit/media-integration-test-helpers": "^2.6.0",
|
|
155
155
|
"@atlaskit/media-test-helpers": "^32.0.0",
|
|
156
156
|
"@atlaskit/menu": "^1.5.0",
|
|
157
|
-
"@atlaskit/page-layout": "^1.
|
|
157
|
+
"@atlaskit/page-layout": "^1.4.0",
|
|
158
158
|
"@atlaskit/profilecard": "^19.2.0",
|
|
159
159
|
"@atlaskit/pubsub": "^6.2.0",
|
|
160
160
|
"@atlaskit/renderer": "^107.3.0",
|