@atlaskit/editor-common 103.4.3 → 103.6.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 +21 -0
- package/dist/cjs/analytics/types/enums.js +1 -0
- package/dist/cjs/card/MediaAndEmbedsToolbar/index.js +11 -11
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/prosemirror-node-view.js +1 -0
- package/dist/cjs/styles/shared/task-decision.js +2 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/analytics/types/enums.js +1 -0
- package/dist/es2019/card/MediaAndEmbedsToolbar/index.js +11 -12
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/prosemirror-node-view.js +0 -0
- package/dist/es2019/styles/shared/task-decision.js +2 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/analytics/types/enums.js +1 -0
- package/dist/esm/card/MediaAndEmbedsToolbar/index.js +11 -11
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/prosemirror-node-view.js +0 -0
- package/dist/esm/styles/shared/task-decision.js +2 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/analytics/types/enums.d.ts +1 -0
- package/dist/types/analytics/types/type-ahead.d.ts +8 -2
- package/dist/types/card/MediaAndEmbedsToolbar/index.d.ts +1 -1
- package/dist/types/prosemirror-node-view.d.ts +0 -0
- package/dist/types/styles/shared/task-decision.d.ts +1 -0
- package/dist/types-ts4.5/analytics/types/enums.d.ts +1 -0
- package/dist/types-ts4.5/analytics/types/type-ahead.d.ts +8 -2
- package/dist/types-ts4.5/card/MediaAndEmbedsToolbar/index.d.ts +1 -1
- package/dist/types-ts4.5/prosemirror-node-view.d.ts +0 -0
- package/dist/types-ts4.5/styles/shared/task-decision.d.ts +1 -0
- package/package.json +2 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 103.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#134613](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/134613)
|
|
8
|
+
[`be20cc186939b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/be20cc186939b) -
|
|
9
|
+
ED-26247 Remove feature flag platform_media_extended_resize_experience and replace it with a new
|
|
10
|
+
media prop which defaults to false allowPixelResizing
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
16
|
+
## 103.5.0
|
|
17
|
+
|
|
18
|
+
### Minor Changes
|
|
19
|
+
|
|
20
|
+
- [#139256](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/139256)
|
|
21
|
+
[`0fea9bc4da71a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0fea9bc4da71a) -
|
|
22
|
+
ED-27447 add typeahead close analytics event
|
|
23
|
+
|
|
3
24
|
## 103.4.3
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -182,6 +182,7 @@ var ACTION = exports.ACTION = /*#__PURE__*/function (ACTION) {
|
|
|
182
182
|
ACTION["RESIZED"] = "resized";
|
|
183
183
|
ACTION["BLOCKS_DRAG_INIT"] = "blocksDragInit";
|
|
184
184
|
ACTION["SINGLE_COL_LAYOUT_DETECTED"] = "singleColumLayoutDetected";
|
|
185
|
+
ACTION["VIEW_MORE"] = "viewMore";
|
|
185
186
|
/**
|
|
186
187
|
* used in Editor AI inline suggestion for a track event when a suggestion is inserted
|
|
187
188
|
* previously tracked events being used by Editor AI proactive suggestion
|
|
@@ -24,7 +24,6 @@ var _alignImageLeft2 = _interopRequireDefault(require("@atlaskit/icon/glyph/edit
|
|
|
24
24
|
var _alignImageRight2 = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/align-image-right"));
|
|
25
25
|
var _mediaWrapLeft = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/media-wrap-left"));
|
|
26
26
|
var _mediaWrapRight = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/media-wrap-right"));
|
|
27
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
28
27
|
var _analytics = require("../../analytics");
|
|
29
28
|
var _coreUtils = require("../../core-utils");
|
|
30
29
|
var _messages = _interopRequireWildcard(require("../../messages"));
|
|
@@ -119,7 +118,7 @@ var getNodeWidth = function getNodeWidth(node, schema) {
|
|
|
119
118
|
}
|
|
120
119
|
return node.firstChild && node.firstChild.attrs.width || node.attrs.width;
|
|
121
120
|
};
|
|
122
|
-
var makeAlign = function makeAlign(layout, nodeType, widthPluginDependencyApi, analyticsApi) {
|
|
121
|
+
var makeAlign = function makeAlign(layout, nodeType, widthPluginDependencyApi, analyticsApi, allowPixelResizing) {
|
|
123
122
|
return function (state, dispatch) {
|
|
124
123
|
var _ref = state.selection,
|
|
125
124
|
node = _ref.node;
|
|
@@ -133,7 +132,7 @@ var makeAlign = function makeAlign(layout, nodeType, widthPluginDependencyApi, a
|
|
|
133
132
|
return false;
|
|
134
133
|
}
|
|
135
134
|
var nodeWidth = getNodeWidth(node, state.schema);
|
|
136
|
-
var newAttrs =
|
|
135
|
+
var newAttrs = allowPixelResizing ? // with extended experience, change alignment does not change media single width
|
|
137
136
|
_objectSpread(_objectSpread({}, node.attrs), {}, {
|
|
138
137
|
layout: layout
|
|
139
138
|
}) : (0, _utils2.alignAttributes)(layout, node.attrs, undefined, nodeWidth, widthPluginState.lineLength);
|
|
@@ -165,13 +164,13 @@ var makeAlign = function makeAlign(layout, nodeType, widthPluginDependencyApi, a
|
|
|
165
164
|
return true;
|
|
166
165
|
};
|
|
167
166
|
};
|
|
168
|
-
var getToolbarLayout = function getToolbarLayout(layout) {
|
|
169
|
-
if (_utils2.nonWrappedLayouts.includes(layout) &&
|
|
167
|
+
var getToolbarLayout = function getToolbarLayout(layout, allowPixelResizing) {
|
|
168
|
+
if (_utils2.nonWrappedLayouts.includes(layout) && allowPixelResizing) {
|
|
170
169
|
return 'center';
|
|
171
170
|
}
|
|
172
171
|
return layout;
|
|
173
172
|
};
|
|
174
|
-
var mapIconsToToolbarItem = function mapIconsToToolbarItem(icons, layout, intl, nodeType, widthPluginDependencyApi, analyticsApi, isChangingLayoutDisabled) {
|
|
173
|
+
var mapIconsToToolbarItem = function mapIconsToToolbarItem(icons, layout, intl, nodeType, widthPluginDependencyApi, analyticsApi, isChangingLayoutDisabled, allowPixelResizing) {
|
|
175
174
|
return icons.map(function (toolbarItem) {
|
|
176
175
|
var id = toolbarItem.id,
|
|
177
176
|
value = toolbarItem.value;
|
|
@@ -180,8 +179,8 @@ var mapIconsToToolbarItem = function mapIconsToToolbarItem(icons, layout, intl,
|
|
|
180
179
|
type: 'button',
|
|
181
180
|
icon: toolbarItem.icon,
|
|
182
181
|
title: intl.formatMessage(layoutToMessages[value]),
|
|
183
|
-
selected: getToolbarLayout(layout) === value,
|
|
184
|
-
onClick: makeAlign(value, nodeType, widthPluginDependencyApi, analyticsApi)
|
|
182
|
+
selected: getToolbarLayout(layout, allowPixelResizing) === value,
|
|
183
|
+
onClick: makeAlign(value, nodeType, widthPluginDependencyApi, analyticsApi, allowPixelResizing)
|
|
185
184
|
}, isChangingLayoutDisabled && {
|
|
186
185
|
disabled: value !== 'center'
|
|
187
186
|
});
|
|
@@ -195,14 +194,15 @@ var buildLayoutButtons = function buildLayoutButtons(state, intl, nodeType, widt
|
|
|
195
194
|
var allowWrapping = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : true;
|
|
196
195
|
var allowAlignment = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : true;
|
|
197
196
|
var isChangingLayoutDisabled = arguments.length > 9 ? arguments[9] : undefined;
|
|
197
|
+
var allowPixelResizing = arguments.length > 10 ? arguments[10] : undefined;
|
|
198
198
|
var selection = state.selection;
|
|
199
199
|
if (!(selection instanceof _state.NodeSelection) || !selection.node || !nodeType || shouldHideLayoutToolbar(selection, state.schema, allowResizingInTables)) {
|
|
200
200
|
return [];
|
|
201
201
|
}
|
|
202
202
|
var layout = selection.node.attrs.layout;
|
|
203
|
-
var alignmentToolbarItems = allowAlignment ? mapIconsToToolbarItem(alignmentIcons, layout, intl, nodeType, widthPluginDependencyApi, analyticsApi, isChangingLayoutDisabled) : [];
|
|
204
|
-
var wrappingToolbarItems = allowWrapping ? mapIconsToToolbarItem(wrappingIcons, layout, intl, nodeType, widthPluginDependencyApi, analyticsApi, isChangingLayoutDisabled) : [];
|
|
205
|
-
var breakOutToolbarItems = !allowResizing ? mapIconsToToolbarItem(breakoutIcons, layout, intl, nodeType, widthPluginDependencyApi, analyticsApi) : [];
|
|
203
|
+
var alignmentToolbarItems = allowAlignment ? mapIconsToToolbarItem(alignmentIcons, layout, intl, nodeType, widthPluginDependencyApi, analyticsApi, isChangingLayoutDisabled, allowPixelResizing) : [];
|
|
204
|
+
var wrappingToolbarItems = allowWrapping ? mapIconsToToolbarItem(wrappingIcons, layout, intl, nodeType, widthPluginDependencyApi, analyticsApi, isChangingLayoutDisabled, allowPixelResizing) : [];
|
|
205
|
+
var breakOutToolbarItems = !allowResizing ? mapIconsToToolbarItem(breakoutIcons, layout, intl, nodeType, widthPluginDependencyApi, analyticsApi, allowPixelResizing) : [];
|
|
206
206
|
var items = [].concat((0, _toConsumableArray2.default)(alignmentToolbarItems), (0, _toConsumableArray2.default)(getSeparatorBetweenAlignmentAndWrapping(allowAlignment, allowWrapping)), (0, _toConsumableArray2.default)(wrappingToolbarItems), (0, _toConsumableArray2.default)(getSeparatorBeforeBreakoutItems(allowAlignment, allowWrapping, allowResizing)), (0, _toConsumableArray2.default)(breakOutToolbarItems));
|
|
207
207
|
return items;
|
|
208
208
|
};
|
|
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
17
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
18
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
19
19
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
20
|
-
var packageVersion = "103.
|
|
20
|
+
var packageVersion = "103.6.0";
|
|
21
21
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
22
22
|
// Remove URL as it has UGC
|
|
23
23
|
// Ignored via go/ees007
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -14,7 +14,8 @@ var _templateObject;
|
|
|
14
14
|
var TaskDecisionSharedCssClassName = exports.TaskDecisionSharedCssClassName = {
|
|
15
15
|
DECISION_CONTAINER: 'decisionItemView-content-wrap',
|
|
16
16
|
TASK_CONTAINER: 'taskItemView-content-wrap',
|
|
17
|
-
TASK_ITEM: 'task-item'
|
|
17
|
+
TASK_ITEM: 'task-item',
|
|
18
|
+
TASK_CHECKBOX_CONTAINER: 'task-item-checkbox-wrap'
|
|
18
19
|
};
|
|
19
20
|
|
|
20
21
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
23
23
|
* @jsx jsx
|
|
24
24
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
25
25
|
var packageName = "@atlaskit/editor-common";
|
|
26
|
-
var packageVersion = "103.
|
|
26
|
+
var packageVersion = "103.6.0";
|
|
27
27
|
var halfFocusRing = 1;
|
|
28
28
|
var dropOffset = '0, 8';
|
|
29
29
|
// Ignored via go/ees005
|
|
@@ -176,6 +176,7 @@ export let ACTION = /*#__PURE__*/function (ACTION) {
|
|
|
176
176
|
ACTION["RESIZED"] = "resized";
|
|
177
177
|
ACTION["BLOCKS_DRAG_INIT"] = "blocksDragInit";
|
|
178
178
|
ACTION["SINGLE_COL_LAYOUT_DETECTED"] = "singleColumLayoutDetected";
|
|
179
|
+
ACTION["VIEW_MORE"] = "viewMore";
|
|
179
180
|
/**
|
|
180
181
|
* used in Editor AI inline suggestion for a track event when a suggestion is inserted
|
|
181
182
|
* previously tracked events being used by Editor AI proactive suggestion
|
|
@@ -14,7 +14,6 @@ import EditorAlignImageLeft from '@atlaskit/icon/glyph/editor/align-image-left';
|
|
|
14
14
|
import EditorAlignImageRight from '@atlaskit/icon/glyph/editor/align-image-right';
|
|
15
15
|
import WrapLeftIcon from '@atlaskit/icon/glyph/editor/media-wrap-left';
|
|
16
16
|
import WrapRightIcon from '@atlaskit/icon/glyph/editor/media-wrap-right';
|
|
17
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
18
17
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../../analytics';
|
|
19
18
|
import { insideTable } from '../../core-utils';
|
|
20
19
|
import commonMessages, { mediaAndEmbedToolbarMessages as toolbarMessages } from '../../messages';
|
|
@@ -98,7 +97,7 @@ const getNodeWidth = (node, schema) => {
|
|
|
98
97
|
}
|
|
99
98
|
return node.firstChild && node.firstChild.attrs.width || node.attrs.width;
|
|
100
99
|
};
|
|
101
|
-
const makeAlign = (layout, nodeType, widthPluginDependencyApi, analyticsApi) => {
|
|
100
|
+
const makeAlign = (layout, nodeType, widthPluginDependencyApi, analyticsApi, allowPixelResizing) => {
|
|
102
101
|
return (state, dispatch) => {
|
|
103
102
|
const {
|
|
104
103
|
node
|
|
@@ -117,7 +116,7 @@ const makeAlign = (layout, nodeType, widthPluginDependencyApi, analyticsApi) =>
|
|
|
117
116
|
return false;
|
|
118
117
|
}
|
|
119
118
|
const nodeWidth = getNodeWidth(node, state.schema);
|
|
120
|
-
const newAttrs =
|
|
119
|
+
const newAttrs = allowPixelResizing ?
|
|
121
120
|
// with extended experience, change alignment does not change media single width
|
|
122
121
|
{
|
|
123
122
|
...node.attrs,
|
|
@@ -161,13 +160,13 @@ const makeAlign = (layout, nodeType, widthPluginDependencyApi, analyticsApi) =>
|
|
|
161
160
|
return true;
|
|
162
161
|
};
|
|
163
162
|
};
|
|
164
|
-
const getToolbarLayout = layout => {
|
|
165
|
-
if (nonWrappedLayouts.includes(layout) &&
|
|
163
|
+
const getToolbarLayout = (layout, allowPixelResizing) => {
|
|
164
|
+
if (nonWrappedLayouts.includes(layout) && allowPixelResizing) {
|
|
166
165
|
return 'center';
|
|
167
166
|
}
|
|
168
167
|
return layout;
|
|
169
168
|
};
|
|
170
|
-
const mapIconsToToolbarItem = (icons, layout, intl, nodeType, widthPluginDependencyApi, analyticsApi, isChangingLayoutDisabled) => icons.map(toolbarItem => {
|
|
169
|
+
const mapIconsToToolbarItem = (icons, layout, intl, nodeType, widthPluginDependencyApi, analyticsApi, isChangingLayoutDisabled, allowPixelResizing) => icons.map(toolbarItem => {
|
|
171
170
|
const {
|
|
172
171
|
id,
|
|
173
172
|
value
|
|
@@ -177,8 +176,8 @@ const mapIconsToToolbarItem = (icons, layout, intl, nodeType, widthPluginDepende
|
|
|
177
176
|
type: 'button',
|
|
178
177
|
icon: toolbarItem.icon,
|
|
179
178
|
title: intl.formatMessage(layoutToMessages[value]),
|
|
180
|
-
selected: getToolbarLayout(layout) === value,
|
|
181
|
-
onClick: makeAlign(value, nodeType, widthPluginDependencyApi, analyticsApi),
|
|
179
|
+
selected: getToolbarLayout(layout, allowPixelResizing) === value,
|
|
180
|
+
onClick: makeAlign(value, nodeType, widthPluginDependencyApi, analyticsApi, allowPixelResizing),
|
|
182
181
|
...(isChangingLayoutDisabled && {
|
|
183
182
|
disabled: value !== 'center'
|
|
184
183
|
})
|
|
@@ -189,7 +188,7 @@ const shouldHideLayoutToolbar = (selection, {
|
|
|
189
188
|
}, allowResizingInTables) => {
|
|
190
189
|
return hasParentNodeOfType([nodes.bodiedExtension, nodes.extensionFrame, nodes.listItem, nodes.expand, nodes.nestedExpand, ...(allowResizingInTables ? [] : [nodes.table])].filter(Boolean))(selection);
|
|
191
190
|
};
|
|
192
|
-
const buildLayoutButtons = (state, intl, nodeType, widthPluginDependencyApi, analyticsApi, allowResizing, allowResizingInTables, allowWrapping = true, allowAlignment = true, isChangingLayoutDisabled) => {
|
|
191
|
+
const buildLayoutButtons = (state, intl, nodeType, widthPluginDependencyApi, analyticsApi, allowResizing, allowResizingInTables, allowWrapping = true, allowAlignment = true, isChangingLayoutDisabled, allowPixelResizing) => {
|
|
193
192
|
const {
|
|
194
193
|
selection
|
|
195
194
|
} = state;
|
|
@@ -199,9 +198,9 @@ const buildLayoutButtons = (state, intl, nodeType, widthPluginDependencyApi, ana
|
|
|
199
198
|
const {
|
|
200
199
|
layout
|
|
201
200
|
} = selection.node.attrs;
|
|
202
|
-
const alignmentToolbarItems = allowAlignment ? mapIconsToToolbarItem(alignmentIcons, layout, intl, nodeType, widthPluginDependencyApi, analyticsApi, isChangingLayoutDisabled) : [];
|
|
203
|
-
const wrappingToolbarItems = allowWrapping ? mapIconsToToolbarItem(wrappingIcons, layout, intl, nodeType, widthPluginDependencyApi, analyticsApi, isChangingLayoutDisabled) : [];
|
|
204
|
-
const breakOutToolbarItems = !allowResizing ? mapIconsToToolbarItem(breakoutIcons, layout, intl, nodeType, widthPluginDependencyApi, analyticsApi) : [];
|
|
201
|
+
const alignmentToolbarItems = allowAlignment ? mapIconsToToolbarItem(alignmentIcons, layout, intl, nodeType, widthPluginDependencyApi, analyticsApi, isChangingLayoutDisabled, allowPixelResizing) : [];
|
|
202
|
+
const wrappingToolbarItems = allowWrapping ? mapIconsToToolbarItem(wrappingIcons, layout, intl, nodeType, widthPluginDependencyApi, analyticsApi, isChangingLayoutDisabled, allowPixelResizing) : [];
|
|
203
|
+
const breakOutToolbarItems = !allowResizing ? mapIconsToToolbarItem(breakoutIcons, layout, intl, nodeType, widthPluginDependencyApi, analyticsApi, allowPixelResizing) : [];
|
|
205
204
|
const items = [...alignmentToolbarItems, ...getSeparatorBetweenAlignmentAndWrapping(allowAlignment, allowWrapping), ...wrappingToolbarItems, ...getSeparatorBeforeBreakoutItems(allowAlignment, allowWrapping, allowResizing), ...breakOutToolbarItems];
|
|
206
205
|
return items;
|
|
207
206
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isFedRamp } from './environment';
|
|
2
2
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
3
3
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
4
|
-
const packageVersion = "103.
|
|
4
|
+
const packageVersion = "103.6.0";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// Ignored via go/ees007
|
|
File without changes
|
|
@@ -5,7 +5,8 @@ import { akEditorLineHeight, akEditorTableCellMinWidth } from '@atlaskit/editor-
|
|
|
5
5
|
export const TaskDecisionSharedCssClassName = {
|
|
6
6
|
DECISION_CONTAINER: 'decisionItemView-content-wrap',
|
|
7
7
|
TASK_CONTAINER: 'taskItemView-content-wrap',
|
|
8
|
-
TASK_ITEM: 'task-item'
|
|
8
|
+
TASK_ITEM: 'task-item',
|
|
9
|
+
TASK_CHECKBOX_CONTAINER: 'task-item-checkbox-wrap'
|
|
9
10
|
};
|
|
10
11
|
|
|
11
12
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
13
13
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
14
14
|
import Layer from '../Layer';
|
|
15
15
|
const packageName = "@atlaskit/editor-common";
|
|
16
|
-
const packageVersion = "103.
|
|
16
|
+
const packageVersion = "103.6.0";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
// Ignored via go/ees005
|
|
@@ -176,6 +176,7 @@ export var ACTION = /*#__PURE__*/function (ACTION) {
|
|
|
176
176
|
ACTION["RESIZED"] = "resized";
|
|
177
177
|
ACTION["BLOCKS_DRAG_INIT"] = "blocksDragInit";
|
|
178
178
|
ACTION["SINGLE_COL_LAYOUT_DETECTED"] = "singleColumLayoutDetected";
|
|
179
|
+
ACTION["VIEW_MORE"] = "viewMore";
|
|
179
180
|
/**
|
|
180
181
|
* used in Editor AI inline suggestion for a track event when a suggestion is inserted
|
|
181
182
|
* previously tracked events being used by Editor AI proactive suggestion
|
|
@@ -18,7 +18,6 @@ import EditorAlignImageLeft from '@atlaskit/icon/glyph/editor/align-image-left';
|
|
|
18
18
|
import EditorAlignImageRight from '@atlaskit/icon/glyph/editor/align-image-right';
|
|
19
19
|
import WrapLeftIcon from '@atlaskit/icon/glyph/editor/media-wrap-left';
|
|
20
20
|
import WrapRightIcon from '@atlaskit/icon/glyph/editor/media-wrap-right';
|
|
21
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
22
21
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../../analytics';
|
|
23
22
|
import { insideTable } from '../../core-utils';
|
|
24
23
|
import commonMessages, { mediaAndEmbedToolbarMessages as toolbarMessages } from '../../messages';
|
|
@@ -110,7 +109,7 @@ var getNodeWidth = function getNodeWidth(node, schema) {
|
|
|
110
109
|
}
|
|
111
110
|
return node.firstChild && node.firstChild.attrs.width || node.attrs.width;
|
|
112
111
|
};
|
|
113
|
-
var makeAlign = function makeAlign(layout, nodeType, widthPluginDependencyApi, analyticsApi) {
|
|
112
|
+
var makeAlign = function makeAlign(layout, nodeType, widthPluginDependencyApi, analyticsApi, allowPixelResizing) {
|
|
114
113
|
return function (state, dispatch) {
|
|
115
114
|
var _ref = state.selection,
|
|
116
115
|
node = _ref.node;
|
|
@@ -124,7 +123,7 @@ var makeAlign = function makeAlign(layout, nodeType, widthPluginDependencyApi, a
|
|
|
124
123
|
return false;
|
|
125
124
|
}
|
|
126
125
|
var nodeWidth = getNodeWidth(node, state.schema);
|
|
127
|
-
var newAttrs =
|
|
126
|
+
var newAttrs = allowPixelResizing ? // with extended experience, change alignment does not change media single width
|
|
128
127
|
_objectSpread(_objectSpread({}, node.attrs), {}, {
|
|
129
128
|
layout: layout
|
|
130
129
|
}) : alignAttributes(layout, node.attrs, undefined, nodeWidth, widthPluginState.lineLength);
|
|
@@ -156,13 +155,13 @@ var makeAlign = function makeAlign(layout, nodeType, widthPluginDependencyApi, a
|
|
|
156
155
|
return true;
|
|
157
156
|
};
|
|
158
157
|
};
|
|
159
|
-
var getToolbarLayout = function getToolbarLayout(layout) {
|
|
160
|
-
if (nonWrappedLayouts.includes(layout) &&
|
|
158
|
+
var getToolbarLayout = function getToolbarLayout(layout, allowPixelResizing) {
|
|
159
|
+
if (nonWrappedLayouts.includes(layout) && allowPixelResizing) {
|
|
161
160
|
return 'center';
|
|
162
161
|
}
|
|
163
162
|
return layout;
|
|
164
163
|
};
|
|
165
|
-
var mapIconsToToolbarItem = function mapIconsToToolbarItem(icons, layout, intl, nodeType, widthPluginDependencyApi, analyticsApi, isChangingLayoutDisabled) {
|
|
164
|
+
var mapIconsToToolbarItem = function mapIconsToToolbarItem(icons, layout, intl, nodeType, widthPluginDependencyApi, analyticsApi, isChangingLayoutDisabled, allowPixelResizing) {
|
|
166
165
|
return icons.map(function (toolbarItem) {
|
|
167
166
|
var id = toolbarItem.id,
|
|
168
167
|
value = toolbarItem.value;
|
|
@@ -171,8 +170,8 @@ var mapIconsToToolbarItem = function mapIconsToToolbarItem(icons, layout, intl,
|
|
|
171
170
|
type: 'button',
|
|
172
171
|
icon: toolbarItem.icon,
|
|
173
172
|
title: intl.formatMessage(layoutToMessages[value]),
|
|
174
|
-
selected: getToolbarLayout(layout) === value,
|
|
175
|
-
onClick: makeAlign(value, nodeType, widthPluginDependencyApi, analyticsApi)
|
|
173
|
+
selected: getToolbarLayout(layout, allowPixelResizing) === value,
|
|
174
|
+
onClick: makeAlign(value, nodeType, widthPluginDependencyApi, analyticsApi, allowPixelResizing)
|
|
176
175
|
}, isChangingLayoutDisabled && {
|
|
177
176
|
disabled: value !== 'center'
|
|
178
177
|
});
|
|
@@ -186,14 +185,15 @@ var buildLayoutButtons = function buildLayoutButtons(state, intl, nodeType, widt
|
|
|
186
185
|
var allowWrapping = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : true;
|
|
187
186
|
var allowAlignment = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : true;
|
|
188
187
|
var isChangingLayoutDisabled = arguments.length > 9 ? arguments[9] : undefined;
|
|
188
|
+
var allowPixelResizing = arguments.length > 10 ? arguments[10] : undefined;
|
|
189
189
|
var selection = state.selection;
|
|
190
190
|
if (!(selection instanceof NodeSelection) || !selection.node || !nodeType || shouldHideLayoutToolbar(selection, state.schema, allowResizingInTables)) {
|
|
191
191
|
return [];
|
|
192
192
|
}
|
|
193
193
|
var layout = selection.node.attrs.layout;
|
|
194
|
-
var alignmentToolbarItems = allowAlignment ? mapIconsToToolbarItem(alignmentIcons, layout, intl, nodeType, widthPluginDependencyApi, analyticsApi, isChangingLayoutDisabled) : [];
|
|
195
|
-
var wrappingToolbarItems = allowWrapping ? mapIconsToToolbarItem(wrappingIcons, layout, intl, nodeType, widthPluginDependencyApi, analyticsApi, isChangingLayoutDisabled) : [];
|
|
196
|
-
var breakOutToolbarItems = !allowResizing ? mapIconsToToolbarItem(breakoutIcons, layout, intl, nodeType, widthPluginDependencyApi, analyticsApi) : [];
|
|
194
|
+
var alignmentToolbarItems = allowAlignment ? mapIconsToToolbarItem(alignmentIcons, layout, intl, nodeType, widthPluginDependencyApi, analyticsApi, isChangingLayoutDisabled, allowPixelResizing) : [];
|
|
195
|
+
var wrappingToolbarItems = allowWrapping ? mapIconsToToolbarItem(wrappingIcons, layout, intl, nodeType, widthPluginDependencyApi, analyticsApi, isChangingLayoutDisabled, allowPixelResizing) : [];
|
|
196
|
+
var breakOutToolbarItems = !allowResizing ? mapIconsToToolbarItem(breakoutIcons, layout, intl, nodeType, widthPluginDependencyApi, analyticsApi, allowPixelResizing) : [];
|
|
197
197
|
var items = [].concat(_toConsumableArray(alignmentToolbarItems), _toConsumableArray(getSeparatorBetweenAlignmentAndWrapping(allowAlignment, allowWrapping)), _toConsumableArray(wrappingToolbarItems), _toConsumableArray(getSeparatorBeforeBreakoutItems(allowAlignment, allowWrapping, allowResizing)), _toConsumableArray(breakOutToolbarItems));
|
|
198
198
|
return items;
|
|
199
199
|
};
|
|
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
import { isFedRamp } from './environment';
|
|
8
8
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
9
9
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
10
|
-
var packageVersion = "103.
|
|
10
|
+
var packageVersion = "103.6.0";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// Ignored via go/ees007
|
|
File without changes
|
|
@@ -7,7 +7,8 @@ import { akEditorLineHeight, akEditorTableCellMinWidth } from '@atlaskit/editor-
|
|
|
7
7
|
export var TaskDecisionSharedCssClassName = {
|
|
8
8
|
DECISION_CONTAINER: 'decisionItemView-content-wrap',
|
|
9
9
|
TASK_CONTAINER: 'taskItemView-content-wrap',
|
|
10
|
-
TASK_ITEM: 'task-item'
|
|
10
|
+
TASK_ITEM: 'task-item',
|
|
11
|
+
TASK_CHECKBOX_CONTAINER: 'task-item-checkbox-wrap'
|
|
11
12
|
};
|
|
12
13
|
|
|
13
14
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
20
20
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
21
21
|
import Layer from '../Layer';
|
|
22
22
|
var packageName = "@atlaskit/editor-common";
|
|
23
|
-
var packageVersion = "103.
|
|
23
|
+
var packageVersion = "103.6.0";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
// Ignored via go/ees005
|
|
@@ -175,6 +175,7 @@ export declare enum ACTION {
|
|
|
175
175
|
RESIZED = "resized",
|
|
176
176
|
BLOCKS_DRAG_INIT = "blocksDragInit",
|
|
177
177
|
SINGLE_COL_LAYOUT_DETECTED = "singleColumLayoutDetected",
|
|
178
|
+
VIEW_MORE = "viewMore",
|
|
178
179
|
/**
|
|
179
180
|
* used in Editor AI inline suggestion for a track event when a suggestion is inserted
|
|
180
181
|
* previously tracked events being used by Editor AI proactive suggestion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TypeAheadAvailableNodes } from '../../type-ahead';
|
|
2
2
|
import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, INPUT_METHOD } from './enums';
|
|
3
|
-
import type { OperationalAEP, UIAEP } from './utils';
|
|
3
|
+
import type { OperationalAEP, TrackAEP, UIAEP } from './utils';
|
|
4
4
|
type TypeAheadRenderedAEP = OperationalAEP<ACTION.RENDERED, ACTION_SUBJECT.TYPEAHEAD, undefined, {
|
|
5
5
|
time?: number;
|
|
6
6
|
items?: number;
|
|
@@ -11,6 +11,12 @@ type TypeAheadItemViewedAEP = OperationalAEP<ACTION.VIEWED, ACTION_SUBJECT.TYPEA
|
|
|
11
11
|
items?: number;
|
|
12
12
|
}>;
|
|
13
13
|
type TypeAheadAEP<ActionSubjectID, Attributes> = UIAEP<ACTION.INVOKED, ACTION_SUBJECT.TYPEAHEAD, ActionSubjectID, Attributes, undefined>;
|
|
14
|
+
type TypeAheadClosedAttributes = {
|
|
15
|
+
inputMethod: INPUT_METHOD.KEYBOARD | INPUT_METHOD.MOUSE | null;
|
|
16
|
+
closeAction: ACTION.INSERTED | ACTION.CANCELLED | ACTION.VIEW_MORE | null;
|
|
17
|
+
hasQuery: boolean;
|
|
18
|
+
};
|
|
19
|
+
type TypeaheadQuickInsertClosedAEP = TrackAEP<ACTION.CLOSED, ACTION_SUBJECT.TYPEAHEAD, ACTION_SUBJECT_ID.TYPEAHEAD_QUICK_INSERT, TypeAheadClosedAttributes, undefined>;
|
|
14
20
|
type TypeAheadEmojiAEP = TypeAheadAEP<ACTION_SUBJECT_ID.TYPEAHEAD_EMOJI | TypeAheadAvailableNodes.EMOJI, {
|
|
15
21
|
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.KEYBOARD
|
|
16
22
|
/**
|
|
@@ -43,6 +49,6 @@ type TypeAheadQuickInsertAEP = TypeAheadAEP<ACTION_SUBJECT_ID.TYPEAHEAD_QUICK_IN
|
|
|
43
49
|
*/
|
|
44
50
|
| 'blockControl';
|
|
45
51
|
}>;
|
|
46
|
-
export type TypeAheadPayload = TypeAheadEmojiAEP | TypeAheadLinkAEP | TypeAheadMentionAEP | TypeAheadQuickInsertAEP | TypeAheadRenderedAEP | TypeAheadItemViewedAEP;
|
|
52
|
+
export type TypeAheadPayload = TypeAheadEmojiAEP | TypeAheadLinkAEP | TypeAheadMentionAEP | TypeAheadQuickInsertAEP | TypeAheadRenderedAEP | TypeAheadItemViewedAEP | TypeaheadQuickInsertClosedAEP;
|
|
47
53
|
export type EventInput = 'keyboard' | 'mouse' | 'floatingToolBar';
|
|
48
54
|
export {};
|
|
@@ -18,5 +18,5 @@ export type IconMap = Array<LayoutIcon | {
|
|
|
18
18
|
export declare const alignmentIcons: LayoutIcon[];
|
|
19
19
|
export declare const wrappingIcons: LayoutIcon[];
|
|
20
20
|
export declare const layoutToMessages: Record<string, any>;
|
|
21
|
-
declare const buildLayoutButtons: (state: EditorState, intl: IntlShape, nodeType: NodeType, widthPluginDependencyApi: WidthPluginDependencyApi, analyticsApi: EditorAnalyticsAPI | undefined, allowResizing?: boolean, allowResizingInTables?: boolean, allowWrapping?: boolean, allowAlignment?: boolean, isChangingLayoutDisabled?: boolean) => FloatingToolbarItem<Command>[];
|
|
21
|
+
declare const buildLayoutButtons: (state: EditorState, intl: IntlShape, nodeType: NodeType, widthPluginDependencyApi: WidthPluginDependencyApi, analyticsApi: EditorAnalyticsAPI | undefined, allowResizing?: boolean, allowResizingInTables?: boolean, allowWrapping?: boolean, allowAlignment?: boolean, isChangingLayoutDisabled?: boolean, allowPixelResizing?: boolean) => FloatingToolbarItem<Command>[];
|
|
22
22
|
export default buildLayoutButtons;
|
|
File without changes
|
|
@@ -175,6 +175,7 @@ export declare enum ACTION {
|
|
|
175
175
|
RESIZED = "resized",
|
|
176
176
|
BLOCKS_DRAG_INIT = "blocksDragInit",
|
|
177
177
|
SINGLE_COL_LAYOUT_DETECTED = "singleColumLayoutDetected",
|
|
178
|
+
VIEW_MORE = "viewMore",
|
|
178
179
|
/**
|
|
179
180
|
* used in Editor AI inline suggestion for a track event when a suggestion is inserted
|
|
180
181
|
* previously tracked events being used by Editor AI proactive suggestion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TypeAheadAvailableNodes } from '../../type-ahead';
|
|
2
2
|
import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, INPUT_METHOD } from './enums';
|
|
3
|
-
import type { OperationalAEP, UIAEP } from './utils';
|
|
3
|
+
import type { OperationalAEP, TrackAEP, UIAEP } from './utils';
|
|
4
4
|
type TypeAheadRenderedAEP = OperationalAEP<ACTION.RENDERED, ACTION_SUBJECT.TYPEAHEAD, undefined, {
|
|
5
5
|
time?: number;
|
|
6
6
|
items?: number;
|
|
@@ -11,6 +11,12 @@ type TypeAheadItemViewedAEP = OperationalAEP<ACTION.VIEWED, ACTION_SUBJECT.TYPEA
|
|
|
11
11
|
items?: number;
|
|
12
12
|
}>;
|
|
13
13
|
type TypeAheadAEP<ActionSubjectID, Attributes> = UIAEP<ACTION.INVOKED, ACTION_SUBJECT.TYPEAHEAD, ActionSubjectID, Attributes, undefined>;
|
|
14
|
+
type TypeAheadClosedAttributes = {
|
|
15
|
+
inputMethod: INPUT_METHOD.KEYBOARD | INPUT_METHOD.MOUSE | null;
|
|
16
|
+
closeAction: ACTION.INSERTED | ACTION.CANCELLED | ACTION.VIEW_MORE | null;
|
|
17
|
+
hasQuery: boolean;
|
|
18
|
+
};
|
|
19
|
+
type TypeaheadQuickInsertClosedAEP = TrackAEP<ACTION.CLOSED, ACTION_SUBJECT.TYPEAHEAD, ACTION_SUBJECT_ID.TYPEAHEAD_QUICK_INSERT, TypeAheadClosedAttributes, undefined>;
|
|
14
20
|
type TypeAheadEmojiAEP = TypeAheadAEP<ACTION_SUBJECT_ID.TYPEAHEAD_EMOJI | TypeAheadAvailableNodes.EMOJI, {
|
|
15
21
|
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.KEYBOARD
|
|
16
22
|
/**
|
|
@@ -43,6 +49,6 @@ type TypeAheadQuickInsertAEP = TypeAheadAEP<ACTION_SUBJECT_ID.TYPEAHEAD_QUICK_IN
|
|
|
43
49
|
*/
|
|
44
50
|
| 'blockControl';
|
|
45
51
|
}>;
|
|
46
|
-
export type TypeAheadPayload = TypeAheadEmojiAEP | TypeAheadLinkAEP | TypeAheadMentionAEP | TypeAheadQuickInsertAEP | TypeAheadRenderedAEP | TypeAheadItemViewedAEP;
|
|
52
|
+
export type TypeAheadPayload = TypeAheadEmojiAEP | TypeAheadLinkAEP | TypeAheadMentionAEP | TypeAheadQuickInsertAEP | TypeAheadRenderedAEP | TypeAheadItemViewedAEP | TypeaheadQuickInsertClosedAEP;
|
|
47
53
|
export type EventInput = 'keyboard' | 'mouse' | 'floatingToolBar';
|
|
48
54
|
export {};
|
|
@@ -18,5 +18,5 @@ export type IconMap = Array<LayoutIcon | {
|
|
|
18
18
|
export declare const alignmentIcons: LayoutIcon[];
|
|
19
19
|
export declare const wrappingIcons: LayoutIcon[];
|
|
20
20
|
export declare const layoutToMessages: Record<string, any>;
|
|
21
|
-
declare const buildLayoutButtons: (state: EditorState, intl: IntlShape, nodeType: NodeType, widthPluginDependencyApi: WidthPluginDependencyApi, analyticsApi: EditorAnalyticsAPI | undefined, allowResizing?: boolean, allowResizingInTables?: boolean, allowWrapping?: boolean, allowAlignment?: boolean, isChangingLayoutDisabled?: boolean) => FloatingToolbarItem<Command>[];
|
|
21
|
+
declare const buildLayoutButtons: (state: EditorState, intl: IntlShape, nodeType: NodeType, widthPluginDependencyApi: WidthPluginDependencyApi, analyticsApi: EditorAnalyticsAPI | undefined, allowResizing?: boolean, allowResizingInTables?: boolean, allowWrapping?: boolean, allowAlignment?: boolean, isChangingLayoutDisabled?: boolean, allowPixelResizing?: boolean) => FloatingToolbarItem<Command>[];
|
|
22
22
|
export default buildLayoutButtons;
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "103.
|
|
3
|
+
"version": "103.6.0",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
"@atlaskit/emoji": "^69.0.0",
|
|
139
139
|
"@atlaskit/icon": "^25.5.0",
|
|
140
140
|
"@atlaskit/icon-object": "^7.0.0",
|
|
141
|
-
"@atlaskit/link-datasource": "^4.
|
|
141
|
+
"@atlaskit/link-datasource": "^4.2.0",
|
|
142
142
|
"@atlaskit/link-picker": "^3.2.0",
|
|
143
143
|
"@atlaskit/media-card": "^79.0.0",
|
|
144
144
|
"@atlaskit/media-client": "^32.0.0",
|
|
@@ -239,9 +239,6 @@
|
|
|
239
239
|
}
|
|
240
240
|
},
|
|
241
241
|
"platform-feature-flags": {
|
|
242
|
-
"platform_editor_media_extended_resize_experience": {
|
|
243
|
-
"type": "boolean"
|
|
244
|
-
},
|
|
245
242
|
"linking_platform_datasource_assets_objects": {
|
|
246
243
|
"type": "boolean"
|
|
247
244
|
},
|