@atlaskit/editor-common 111.7.1 → 111.7.3
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 +18 -0
- package/afm-cc/tsconfig.json +1 -1
- package/dist/cjs/element-browser/ElementBrowser.js +0 -2
- package/dist/cjs/element-browser/components/StatelessElementBrowser.js +2 -10
- package/dist/cjs/keymaps/index.js +2 -1
- package/dist/cjs/link/ConfigureLinkOverlay/Dropdown.js +2 -5
- package/dist/cjs/link/ConfigureLinkOverlay/index.js +0 -1
- package/dist/cjs/media-inline/views/error-view.js +1 -5
- package/dist/cjs/media-single/ExternalImageBadge.js +0 -1
- package/dist/cjs/messages/placeholder-text.js +4 -4
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/Messages/index.js +0 -3
- package/dist/cjs/ui/UnsupportedBlock/index.js +1 -2
- package/dist/cjs/ui/UnsupportedInline/index.js +1 -2
- package/dist/cjs/utils/imageLoader.js +4 -131
- package/dist/es2019/element-browser/ElementBrowser.js +0 -2
- package/dist/es2019/element-browser/components/StatelessElementBrowser.js +3 -11
- package/dist/es2019/keymaps/index.js +1 -0
- package/dist/es2019/link/ConfigureLinkOverlay/Dropdown.js +2 -5
- package/dist/es2019/link/ConfigureLinkOverlay/index.js +0 -1
- package/dist/es2019/media-inline/views/error-view.js +1 -4
- package/dist/es2019/media-single/ExternalImageBadge.js +0 -1
- package/dist/es2019/messages/placeholder-text.js +4 -4
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/Messages/index.js +0 -3
- package/dist/es2019/ui/UnsupportedBlock/index.js +1 -2
- package/dist/es2019/ui/UnsupportedInline/index.js +1 -2
- package/dist/es2019/utils/imageLoader.js +1 -111
- package/dist/esm/element-browser/ElementBrowser.js +0 -2
- package/dist/esm/element-browser/components/StatelessElementBrowser.js +3 -11
- package/dist/esm/keymaps/index.js +1 -0
- package/dist/esm/link/ConfigureLinkOverlay/Dropdown.js +2 -5
- package/dist/esm/link/ConfigureLinkOverlay/index.js +0 -1
- package/dist/esm/media-inline/views/error-view.js +1 -5
- package/dist/esm/media-single/ExternalImageBadge.js +0 -1
- package/dist/esm/messages/placeholder-text.js +4 -4
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/Messages/index.js +0 -3
- package/dist/esm/ui/UnsupportedBlock/index.js +1 -2
- package/dist/esm/ui/UnsupportedInline/index.js +1 -2
- package/dist/esm/utils/imageLoader.js +3 -130
- package/dist/types/element-browser/ElementBrowser.d.ts +0 -7
- package/dist/types/element-browser/components/StatelessElementBrowser.d.ts +0 -14
- package/dist/types/keymaps/index.d.ts +1 -0
- package/dist/types/media-inline/views/error-view.d.ts +1 -3
- package/dist/types/messages/placeholder-text.d.ts +1 -1
- package/dist/types/utils/imageLoader.d.ts +0 -1
- package/dist/types-ts4.5/element-browser/ElementBrowser.d.ts +0 -7
- package/dist/types-ts4.5/element-browser/components/StatelessElementBrowser.d.ts +0 -14
- package/dist/types-ts4.5/keymaps/index.d.ts +1 -0
- package/dist/types-ts4.5/media-inline/views/error-view.d.ts +1 -3
- package/dist/types-ts4.5/messages/placeholder-text.d.ts +1 -1
- package/dist/types-ts4.5/utils/imageLoader.d.ts +0 -1
- package/package.json +7 -10
- package/dist/cjs/element-browser/ViewMore.js +0 -58
- package/dist/es2019/element-browser/ViewMore.js +0 -52
- package/dist/esm/element-browser/ViewMore.js +0 -51
- package/dist/types/element-browser/ViewMore.d.ts +0 -6
- package/dist/types-ts4.5/element-browser/ViewMore.d.ts +0 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 111.7.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`38c83ce57623b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/38c83ce57623b) -
|
|
8
|
+
[ux] [EDITOR-3853] Update copy for sync block placeholder and copy flag
|
|
9
|
+
- [`11bd6ea9cb0ba`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/11bd6ea9cb0ba) -
|
|
10
|
+
[ux] Clean up platform_editor_refactor_view_more
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 111.7.2
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [`819348f0857f5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/819348f0857f5) -
|
|
18
|
+
[ux] [EDITOR-3769] added shortcut to track changes button
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 111.7.1
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
|
@@ -119,7 +119,6 @@ var ElementBrowser = exports.default = /*#__PURE__*/function (_PureComponent) {
|
|
|
119
119
|
showCategories = _this$props.showCategories,
|
|
120
120
|
mode = _this$props.mode,
|
|
121
121
|
emptyStateHandler = _this$props.emptyStateHandler,
|
|
122
|
-
viewMoreItem = _this$props.viewMoreItem,
|
|
123
122
|
onViewMore = _this$props.onViewMore,
|
|
124
123
|
cache = _this$props.cache,
|
|
125
124
|
autoFocusSearch = _this$props.autoFocusSearch;
|
|
@@ -141,7 +140,6 @@ var ElementBrowser = exports.default = /*#__PURE__*/function (_PureComponent) {
|
|
|
141
140
|
mode: mode,
|
|
142
141
|
searchTerm: searchTerm,
|
|
143
142
|
emptyStateHandler: emptyStateHandler,
|
|
144
|
-
viewMoreItem: viewMoreItem,
|
|
145
143
|
cache: cache,
|
|
146
144
|
onViewMore: onViewMore,
|
|
147
145
|
autoFocusSearch: autoFocusSearch
|
|
@@ -13,7 +13,6 @@ var _react2 = require("@emotion/react");
|
|
|
13
13
|
var _reactIntlNext = require("react-intl-next");
|
|
14
14
|
var _withAnalyticsContext = _interopRequireDefault(require("@atlaskit/analytics-next/withAnalyticsContext"));
|
|
15
15
|
var _withAnalyticsEvents = _interopRequireDefault(require("@atlaskit/analytics-next/withAnalyticsEvents"));
|
|
16
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
16
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
18
17
|
var _analytics = require("../../analytics");
|
|
19
18
|
var _getEditorUgcToken = _interopRequireDefault(require("../../ugc-tokens/get-editor-ugc-token"));
|
|
@@ -21,7 +20,6 @@ var _ViewMore = require("../components/ViewMore");
|
|
|
21
20
|
var _constants = require("../constants");
|
|
22
21
|
var _useContainerWidth2 = _interopRequireDefault(require("../hooks/use-container-width"));
|
|
23
22
|
var _useSelectAndFocusOnArrowNavigation = _interopRequireDefault(require("../hooks/use-select-and-focus-on-arrow-navigation"));
|
|
24
|
-
var _ViewMore2 = require("../ViewMore");
|
|
25
23
|
var _CategoryList = _interopRequireDefault(require("./CategoryList"));
|
|
26
24
|
var _ElementList = _interopRequireDefault(require("./ElementList/ElementList"));
|
|
27
25
|
var _ElementSearch = _interopRequireDefault(require("./ElementSearch"));
|
|
@@ -130,7 +128,6 @@ function StatelessElementBrowser(props) {
|
|
|
130
128
|
var items = props.items,
|
|
131
129
|
onSelectItem = props.onSelectItem,
|
|
132
130
|
onInsertItem = props.onInsertItem,
|
|
133
|
-
viewMoreItem = props.viewMoreItem,
|
|
134
131
|
onViewMore = props.onViewMore,
|
|
135
132
|
selectedCategory = props.selectedCategory,
|
|
136
133
|
onSelectCategory = props.onSelectCategory,
|
|
@@ -170,7 +167,7 @@ function StatelessElementBrowser(props) {
|
|
|
170
167
|
var _items$index$isDisabl, _items$index;
|
|
171
168
|
return (_items$index$isDisabl = (_items$index = items[index]) === null || _items$index === void 0 ? void 0 : _items$index.isDisabled) !== null && _items$index$isDisabl !== void 0 ? _items$index$isDisabl : false;
|
|
172
169
|
}, [items]);
|
|
173
|
-
var _useSelectAndFocusOnA = (0, _useSelectAndFocusOnArrowNavigation.default)(items.length - 1, columnCount,
|
|
170
|
+
var _useSelectAndFocusOnA = (0, _useSelectAndFocusOnArrowNavigation.default)(items.length - 1, columnCount, !!onViewMore, itemIsDisabled, isFocusSearch, autoFocusSearch),
|
|
174
171
|
selectedItemIndex = _useSelectAndFocusOnA.selectedItemIndex,
|
|
175
172
|
focusedItemIndex = _useSelectAndFocusOnA.focusedItemIndex,
|
|
176
173
|
setFocusedItemIndex = _useSelectAndFocusOnA.setFocusedItemIndex,
|
|
@@ -272,7 +269,6 @@ function StatelessElementBrowser(props) {
|
|
|
272
269
|
setFocusOnSearch: setFocusOnSearch,
|
|
273
270
|
onKeyPress: onItemsEnterTabKeyPress,
|
|
274
271
|
onKeyDown: onKeyDown,
|
|
275
|
-
viewMoreItem: viewMoreItem,
|
|
276
272
|
onViewMore: onViewMore,
|
|
277
273
|
focusOnViewMore: focusOnViewMore,
|
|
278
274
|
cache: cache
|
|
@@ -323,7 +319,6 @@ function MobileBrowser(_ref) {
|
|
|
323
319
|
searchTerm = _ref.searchTerm,
|
|
324
320
|
createAnalyticsEvent = _ref.createAnalyticsEvent,
|
|
325
321
|
emptyStateHandler = _ref.emptyStateHandler,
|
|
326
|
-
viewMoreItem = _ref.viewMoreItem,
|
|
327
322
|
onViewMore = _ref.onViewMore,
|
|
328
323
|
cache = _ref.cache,
|
|
329
324
|
_ref$focusOnEmptyStat = _ref.focusOnEmptyStateButton,
|
|
@@ -375,12 +370,9 @@ function MobileBrowser(_ref) {
|
|
|
375
370
|
selectedCategory: selectedCategory,
|
|
376
371
|
searchTerm: searchTerm,
|
|
377
372
|
cache: cache
|
|
378
|
-
})), onViewMore && (0,
|
|
373
|
+
})), onViewMore && (0, _react2.jsx)(_ViewMore.ViewMore, {
|
|
379
374
|
onViewMore: onViewMore,
|
|
380
375
|
focus: focusOnViewMore
|
|
381
|
-
}), viewMoreItem && !(0, _platformFeatureFlags.fg)('platform_editor_refactor_view_more') && (0, _react2.jsx)(_ViewMore2.ViewMore, {
|
|
382
|
-
item: viewMoreItem,
|
|
383
|
-
focus: focusOnViewMore
|
|
384
376
|
}))
|
|
385
377
|
);
|
|
386
378
|
}
|
|
@@ -103,7 +103,7 @@ exports.makeKeyMapArrayWithCommon = makeKeyMapArrayWithCommon;
|
|
|
103
103
|
exports.makeKeyMapWithCommon = makeKeyMapWithCommon;
|
|
104
104
|
exports.makeKeymap = makeKeymap;
|
|
105
105
|
exports.shiftBackspace = exports.shiftArrowUp = exports.setNormalText = exports.selectTable = exports.selectRow = exports.selectColumn = exports.redoAlt = exports.redo = exports.previousCell = exports.pastePlainText = exports.paste = exports.outdentList = exports.outdent = exports.openHelp = exports.nextCell = exports.navToFloatingToolbar = exports.navToEditorToolbar = exports.moveUp = exports.moveRowUp = exports.moveRowDown = exports.moveRight = exports.moveLeft = exports.moveDown = exports.moveColumnRight = exports.moveColumnLeft = void 0;
|
|
106
|
-
exports.toggleUnderline = exports.toggleTaskList = exports.toggleTaskItemCheckbox = exports.toggleTable = exports.toggleSuperscript = exports.toggleSubscript = exports.toggleStrikethrough = exports.toggleOrderedList = exports.toggleItalic = exports.toggleHighlightPalette = exports.toggleHeading6 = exports.toggleHeading5 = exports.toggleHeading4 = exports.toggleHeading3 = exports.toggleHeading2 = exports.toggleHeading1 = exports.toggleCodeBlock = exports.toggleCode = exports.toggleBulletList = exports.toggleBold = exports.toggleBlockQuote = exports.tab = exports.submit = exports.startColumnResizing = exports.splitListItem = exports.splitCodeBlock = exports.space = exports.showElementDragHandle = exports.shiftTab = exports.shiftEnter = void 0;
|
|
106
|
+
exports.toggleViewChanges = exports.toggleUnderline = exports.toggleTaskList = exports.toggleTaskItemCheckbox = exports.toggleTable = exports.toggleSuperscript = exports.toggleSubscript = exports.toggleStrikethrough = exports.toggleOrderedList = exports.toggleItalic = exports.toggleHighlightPalette = exports.toggleHeading6 = exports.toggleHeading5 = exports.toggleHeading4 = exports.toggleHeading3 = exports.toggleHeading2 = exports.toggleHeading1 = exports.toggleCodeBlock = exports.toggleCode = exports.toggleBulletList = exports.toggleBold = exports.toggleBlockQuote = exports.tab = exports.submit = exports.startColumnResizing = exports.splitListItem = exports.splitCodeBlock = exports.space = exports.showElementDragHandle = exports.shiftTab = exports.shiftEnter = void 0;
|
|
107
107
|
exports.tooltip = tooltip;
|
|
108
108
|
exports.undo = void 0;
|
|
109
109
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
@@ -124,6 +124,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
124
124
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
125
125
|
|
|
126
126
|
var addAltText = exports.addAltText = makeKeyMapWithCommon('Add Alt Text', 'Mod-Alt-y');
|
|
127
|
+
var toggleViewChanges = exports.toggleViewChanges = makeKeyMapWithCommon('View changes', 'Mod-Alt-z');
|
|
127
128
|
var navToEditorToolbar = exports.navToEditorToolbar = makeKeyMapWithCommon('Navigate to editor toolbar', 'Alt-F9');
|
|
128
129
|
var navToFloatingToolbar = exports.navToFloatingToolbar = makeKeyMapWithCommon('Navigate to floating toolbar', 'Alt-F10');
|
|
129
130
|
var askAIQuickInsert = exports.askAIQuickInsert = makeKeyMapWithCommon('Ask AI', "Mod-'");
|
|
@@ -82,7 +82,6 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
82
82
|
}, props, {
|
|
83
83
|
iconBefore: (0, _react2.jsx)(_chevronDown.default, {
|
|
84
84
|
label: configureLinkLabel,
|
|
85
|
-
LEGACY_size: "small",
|
|
86
85
|
size: "small"
|
|
87
86
|
}),
|
|
88
87
|
onClick: function onClick(e) {
|
|
@@ -95,15 +94,13 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
95
94
|
onOpenChange: onOpenChange
|
|
96
95
|
}, (0, _react2.jsx)(_dropdownMenu.DropdownItemGroup, null, (0, _react2.jsx)(_dropdownMenu.DropdownItem, {
|
|
97
96
|
elemBefore: (0, _react2.jsx)(_linkExternal.default, {
|
|
98
|
-
label: goToLinkLabel
|
|
99
|
-
LEGACY_size: "medium"
|
|
97
|
+
label: goToLinkLabel
|
|
100
98
|
}),
|
|
101
99
|
testId: "".concat(testId, "-dropdown-item-open-link"),
|
|
102
100
|
onClick: onGoToLinkClick
|
|
103
101
|
}, goToLinkLabel), (0, _react2.jsx)(_dropdownMenu.DropdownItem, {
|
|
104
102
|
elemBefore: (0, _react2.jsx)(_customize.default, {
|
|
105
|
-
label: configureLinkLabel
|
|
106
|
-
LEGACY_size: "medium"
|
|
103
|
+
label: configureLinkLabel
|
|
107
104
|
}),
|
|
108
105
|
onClick: onConfigureClick,
|
|
109
106
|
testId: "".concat(testId, "-dropdown-item-configure")
|
|
@@ -108,7 +108,6 @@ var OverlayButton = exports.OverlayButton = (0, _withAnalyticsContext.default)()
|
|
|
108
108
|
onClick: handleConfigureClickWithAnalytics,
|
|
109
109
|
iconBefore: (0, _react2.jsx)(_customize.default, {
|
|
110
110
|
label: configureLinkLabel,
|
|
111
|
-
LEGACY_size: "small",
|
|
112
111
|
testId: "".concat(testId, "-configure-icon")
|
|
113
112
|
})
|
|
114
113
|
})));
|
|
@@ -8,7 +8,6 @@ exports.InlineImageCardErrorView = void 0;
|
|
|
8
8
|
var _react = require("@emotion/react");
|
|
9
9
|
var _statusWarning = _interopRequireDefault(require("@atlaskit/icon/core/status-warning"));
|
|
10
10
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
11
|
-
var _constants = require("./constants");
|
|
12
11
|
var _frame = require("./frame");
|
|
13
12
|
var _iconWrapper = require("./icon-wrapper");
|
|
14
13
|
/**
|
|
@@ -22,9 +21,7 @@ var InlineImageCardErrorView = exports.InlineImageCardErrorView = function Inlin
|
|
|
22
21
|
var _ref$testId = _ref.testId,
|
|
23
22
|
testId = _ref$testId === void 0 ? 'media-inline-image-card-error-view' : _ref$testId,
|
|
24
23
|
message = _ref.message,
|
|
25
|
-
icon = _ref.icon
|
|
26
|
-
_ref$height = _ref.height,
|
|
27
|
-
height = _ref$height === void 0 ? _constants.ICON_SIZE_THRESOLD : _ref$height;
|
|
24
|
+
icon = _ref.icon;
|
|
28
25
|
return (0, _react.jsx)(_frame.Frame, {
|
|
29
26
|
testId: testId
|
|
30
27
|
}, (0, _react.jsx)(_tooltip.default, {
|
|
@@ -34,7 +31,6 @@ var InlineImageCardErrorView = exports.InlineImageCardErrorView = function Inlin
|
|
|
34
31
|
hideTooltipOnClick: true
|
|
35
32
|
}, (0, _react.jsx)(_iconWrapper.IconWrapper, null, icon || (0, _react.jsx)(_statusWarning.default, {
|
|
36
33
|
label: "error",
|
|
37
|
-
LEGACY_size: height > _constants.ICON_SIZE_THRESOLD ? 'medium' : 'small',
|
|
38
34
|
color: "var(--ds-icon-danger, #C9372C)"
|
|
39
35
|
}))));
|
|
40
36
|
};
|
|
@@ -46,9 +46,9 @@ var placeholderTextMessages = exports.placeholderTextMessages = (0, _reactIntlNe
|
|
|
46
46
|
defaultMessage: ' to insert elements',
|
|
47
47
|
description: 'Text after slash in long empty node placeholder'
|
|
48
48
|
},
|
|
49
|
-
|
|
50
|
-
id: 'fabric.editor.
|
|
51
|
-
defaultMessage: 'Add content
|
|
52
|
-
description: 'Placeholder text for sync block'
|
|
49
|
+
sourceSyncBlockPlaceholderText: {
|
|
50
|
+
id: 'fabric.editor.sourceSyncBlockPlaceholderText',
|
|
51
|
+
defaultMessage: 'Add content you want to reuse. Copy and paste this block to sync in other locations.',
|
|
52
|
+
description: 'Placeholder text for source sync block'
|
|
53
53
|
}
|
|
54
54
|
});
|
|
@@ -19,7 +19,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
19
19
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
20
20
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
21
21
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
22
|
-
var packageVersion = "111.7.
|
|
22
|
+
var packageVersion = "111.7.2";
|
|
23
23
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
24
24
|
// Remove URL as it has UGC
|
|
25
25
|
// Ignored via go/ees007
|
|
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
24
24
|
* @jsx jsx
|
|
25
25
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
26
26
|
var packageName = "@atlaskit/editor-common";
|
|
27
|
-
var packageVersion = "111.7.
|
|
27
|
+
var packageVersion = "111.7.2";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -63,7 +63,6 @@ var ErrorMessage = exports.ErrorMessage = function ErrorMessage(_ref2) {
|
|
|
63
63
|
}, (0, _react.jsx)("span", {
|
|
64
64
|
css: iconWrapperStyle
|
|
65
65
|
}, (0, _react.jsx)(_statusError.default, {
|
|
66
|
-
LEGACY_size: "small",
|
|
67
66
|
label: (0, _platformFeatureFlags.fg)('platform_editor_dec_a11y_fixes') ? intl.formatMessage(_messages.default.error) : "error",
|
|
68
67
|
"aria-label": (0, _platformFeatureFlags.fg)('platform_editor_dec_a11y_fixes') ? undefined : "error"
|
|
69
68
|
})), children);
|
|
@@ -78,10 +77,8 @@ var ValidMessage = exports.ValidMessage = function ValidMessage(_ref3) {
|
|
|
78
77
|
}, (0, _react.jsx)("span", {
|
|
79
78
|
css: iconWrapperStyle
|
|
80
79
|
}, (0, _platformFeatureFlags.fg)('platform_editor_dec_a11y_fixes') ? (0, _react.jsx)(_statusSuccess.default, {
|
|
81
|
-
LEGACY_size: "small",
|
|
82
80
|
label: intl.formatMessage(_messages.default.success)
|
|
83
81
|
}) : (0, _react.jsx)(_statusSuccess.default, {
|
|
84
|
-
LEGACY_size: "small",
|
|
85
82
|
label: "success"
|
|
86
83
|
})), children);
|
|
87
84
|
};
|
|
@@ -66,8 +66,7 @@ var UnsupportedInlineNode = function UnsupportedInlineNode(_ref) {
|
|
|
66
66
|
}, (0, _react2.jsx)("span", {
|
|
67
67
|
style: style
|
|
68
68
|
}, (0, _react2.jsx)(_questionCircle.default, {
|
|
69
|
-
label: "?"
|
|
70
|
-
LEGACY_size: "small"
|
|
69
|
+
label: "?"
|
|
71
70
|
}))));
|
|
72
71
|
};
|
|
73
72
|
var _default = exports.default = (0, _reactIntlNext.injectIntl)(UnsupportedInlineNode);
|
|
@@ -5,7 +5,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.withImageLoader = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
@@ -17,7 +17,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
17
17
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
18
18
|
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)); }
|
|
19
19
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
20
|
-
var
|
|
20
|
+
var withImageLoader = exports.withImageLoader = function withImageLoader(Wrapped) {
|
|
21
21
|
return /*#__PURE__*/function (_Component) {
|
|
22
22
|
function WithImageLoader() {
|
|
23
23
|
var _this;
|
|
@@ -49,130 +49,6 @@ var withImageLoaderOld = exports.withImageLoaderOld = function withImageLoaderOl
|
|
|
49
49
|
return _this;
|
|
50
50
|
}
|
|
51
51
|
(0, _inherits2.default)(WithImageLoader, _Component);
|
|
52
|
-
return (0, _createClass2.default)(WithImageLoader, [{
|
|
53
|
-
key: "componentDidMount",
|
|
54
|
-
value:
|
|
55
|
-
/**
|
|
56
|
-
*
|
|
57
|
-
* @example
|
|
58
|
-
*/
|
|
59
|
-
function componentDidMount() {
|
|
60
|
-
this.fetchImage(this.props);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
*
|
|
65
|
-
* @param nextProps
|
|
66
|
-
* @example
|
|
67
|
-
*/
|
|
68
|
-
// Ignored via go/ees005
|
|
69
|
-
// eslint-disable-next-line react/no-unsafe
|
|
70
|
-
}, {
|
|
71
|
-
key: "UNSAFE_componentWillReceiveProps",
|
|
72
|
-
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
73
|
-
if (nextProps.url !== this.props.url) {
|
|
74
|
-
this.setState({
|
|
75
|
-
imageStatus: 'loading'
|
|
76
|
-
});
|
|
77
|
-
this.fetchImage(nextProps);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
*
|
|
83
|
-
* @example
|
|
84
|
-
*/
|
|
85
|
-
}, {
|
|
86
|
-
key: "componentWillUnmount",
|
|
87
|
-
value: function componentWillUnmount() {
|
|
88
|
-
if (this.img) {
|
|
89
|
-
if (!process.env.REACT_SSR) {
|
|
90
|
-
// Ignored via go/ees005
|
|
91
|
-
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
92
|
-
this.img.removeEventListener('load', this.onLoad);
|
|
93
|
-
// Ignored via go/ees005
|
|
94
|
-
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
95
|
-
this.img.removeEventListener('error', this.onError);
|
|
96
|
-
this.img = null;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
*
|
|
103
|
-
* @param root0
|
|
104
|
-
* @param root0.url
|
|
105
|
-
* @example
|
|
106
|
-
*/
|
|
107
|
-
}, {
|
|
108
|
-
key: "fetchImage",
|
|
109
|
-
value: function fetchImage(_ref) {
|
|
110
|
-
var url = _ref.url;
|
|
111
|
-
if (url) {
|
|
112
|
-
if (!this.img) {
|
|
113
|
-
this.img = new Image();
|
|
114
|
-
if (!process.env.REACT_SSR) {
|
|
115
|
-
// Ignored via go/ees005
|
|
116
|
-
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
117
|
-
this.img.addEventListener('load', this.onLoad);
|
|
118
|
-
// Ignored via go/ees005
|
|
119
|
-
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
120
|
-
this.img.addEventListener('error', this.onError);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
this.img.src = url;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}, {
|
|
127
|
-
key: "render",
|
|
128
|
-
value:
|
|
129
|
-
/**
|
|
130
|
-
*
|
|
131
|
-
* @example
|
|
132
|
-
*/
|
|
133
|
-
function render() {
|
|
134
|
-
var imageStatus = this.state.imageStatus;
|
|
135
|
-
// Ignored via go/ees005
|
|
136
|
-
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
137
|
-
return /*#__PURE__*/_react.default.createElement(Wrapped, (0, _extends2.default)({}, this.props, {
|
|
138
|
-
imageStatus: imageStatus
|
|
139
|
-
}));
|
|
140
|
-
}
|
|
141
|
-
}]);
|
|
142
|
-
}(_react.Component);
|
|
143
|
-
};
|
|
144
|
-
var withImageLoaderNew = function withImageLoaderNew(Wrapped) {
|
|
145
|
-
return /*#__PURE__*/function (_Component2) {
|
|
146
|
-
function WithImageLoader() {
|
|
147
|
-
var _this2;
|
|
148
|
-
(0, _classCallCheck2.default)(this, WithImageLoader);
|
|
149
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
150
|
-
args[_key2] = arguments[_key2];
|
|
151
|
-
}
|
|
152
|
-
_this2 = _callSuper(this, WithImageLoader, [].concat(args));
|
|
153
|
-
(0, _defineProperty2.default)(_this2, "state", {
|
|
154
|
-
imageStatus: 'loading'
|
|
155
|
-
});
|
|
156
|
-
(0, _defineProperty2.default)(_this2, "onLoad", function () {
|
|
157
|
-
_this2.setState({
|
|
158
|
-
imageStatus: 'complete'
|
|
159
|
-
});
|
|
160
|
-
var onExternalImageLoaded = _this2.props.onExternalImageLoaded;
|
|
161
|
-
if (onExternalImageLoaded && _this2.img) {
|
|
162
|
-
onExternalImageLoaded({
|
|
163
|
-
width: _this2.img.naturalWidth,
|
|
164
|
-
height: _this2.img.naturalHeight
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
|
-
(0, _defineProperty2.default)(_this2, "onError", function () {
|
|
169
|
-
_this2.setState({
|
|
170
|
-
imageStatus: 'error'
|
|
171
|
-
});
|
|
172
|
-
});
|
|
173
|
-
return _this2;
|
|
174
|
-
}
|
|
175
|
-
(0, _inherits2.default)(WithImageLoader, _Component2);
|
|
176
52
|
return (0, _createClass2.default)(WithImageLoader, [{
|
|
177
53
|
key: "componentDidMount",
|
|
178
54
|
value: function componentDidMount() {
|
|
@@ -205,8 +81,8 @@ var withImageLoaderNew = function withImageLoaderNew(Wrapped) {
|
|
|
205
81
|
}
|
|
206
82
|
}, {
|
|
207
83
|
key: "fetchImage",
|
|
208
|
-
value: function fetchImage(
|
|
209
|
-
var url =
|
|
84
|
+
value: function fetchImage(_ref) {
|
|
85
|
+
var url = _ref.url;
|
|
210
86
|
if (url) {
|
|
211
87
|
if (!this.img) {
|
|
212
88
|
this.img = new Image();
|
|
@@ -234,7 +110,4 @@ var withImageLoaderNew = function withImageLoaderNew(Wrapped) {
|
|
|
234
110
|
}
|
|
235
111
|
}]);
|
|
236
112
|
}(_react.Component);
|
|
237
|
-
};
|
|
238
|
-
var withImageLoader = exports.withImageLoader = function withImageLoader(Wrapped) {
|
|
239
|
-
return withImageLoaderNew(Wrapped);
|
|
240
113
|
};
|
|
@@ -88,7 +88,6 @@ export default class ElementBrowser extends PureComponent {
|
|
|
88
88
|
showCategories,
|
|
89
89
|
mode,
|
|
90
90
|
emptyStateHandler,
|
|
91
|
-
viewMoreItem,
|
|
92
91
|
onViewMore,
|
|
93
92
|
cache,
|
|
94
93
|
autoFocusSearch
|
|
@@ -112,7 +111,6 @@ export default class ElementBrowser extends PureComponent {
|
|
|
112
111
|
mode: mode,
|
|
113
112
|
searchTerm: searchTerm,
|
|
114
113
|
emptyStateHandler: emptyStateHandler,
|
|
115
|
-
viewMoreItem: viewMoreItem,
|
|
116
114
|
cache: cache,
|
|
117
115
|
onViewMore: onViewMore,
|
|
118
116
|
autoFocusSearch: autoFocusSearch
|
|
@@ -10,15 +10,13 @@ import { css, jsx } from '@emotion/react';
|
|
|
10
10
|
import { FormattedMessage } from 'react-intl-next';
|
|
11
11
|
import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext';
|
|
12
12
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
13
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
13
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
15
14
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent } from '../../analytics';
|
|
16
15
|
import editorUGCToken from '../../ugc-tokens/get-editor-ugc-token';
|
|
17
|
-
import { ViewMore
|
|
16
|
+
import { ViewMore } from '../components/ViewMore';
|
|
18
17
|
import { DEVICE_BREAKPOINT_NUMBERS, ELEMENT_BROWSER_ID, ELEMENT_BROWSER_LIST_ID, GRID_SIZE, INLINE_SIDEBAR_HEIGHT, SIDEBAR_HEADING_WRAPPER_HEIGHT, SIDEBAR_WIDTH } from '../constants';
|
|
19
18
|
import useContainerWidth from '../hooks/use-container-width';
|
|
20
19
|
import useSelectAndFocusOnArrowNavigation from '../hooks/use-select-and-focus-on-arrow-navigation';
|
|
21
|
-
import { ViewMore } from '../ViewMore';
|
|
22
20
|
import CategoryList from './CategoryList';
|
|
23
21
|
import ElementList from './ElementList/ElementList';
|
|
24
22
|
import ElementSearch from './ElementSearch';
|
|
@@ -120,7 +118,6 @@ function StatelessElementBrowser(props) {
|
|
|
120
118
|
items,
|
|
121
119
|
onSelectItem,
|
|
122
120
|
onInsertItem,
|
|
123
|
-
viewMoreItem,
|
|
124
121
|
onViewMore,
|
|
125
122
|
selectedCategory,
|
|
126
123
|
onSelectCategory,
|
|
@@ -166,7 +163,7 @@ function StatelessElementBrowser(props) {
|
|
|
166
163
|
focusOnViewMore,
|
|
167
164
|
onKeyDown,
|
|
168
165
|
setFocusOnSearch
|
|
169
|
-
} = useSelectAndFocusOnArrowNavigation(items.length - 1, columnCount,
|
|
166
|
+
} = useSelectAndFocusOnArrowNavigation(items.length - 1, columnCount, !!onViewMore, itemIsDisabled, isFocusSearch, autoFocusSearch);
|
|
170
167
|
useEffect(() => {
|
|
171
168
|
fireAnalyticsEvent(props.createAnalyticsEvent)({
|
|
172
169
|
payload: {
|
|
@@ -258,7 +255,6 @@ function StatelessElementBrowser(props) {
|
|
|
258
255
|
setFocusOnSearch: setFocusOnSearch,
|
|
259
256
|
onKeyPress: onItemsEnterTabKeyPress,
|
|
260
257
|
onKeyDown: onKeyDown,
|
|
261
|
-
viewMoreItem: viewMoreItem,
|
|
262
258
|
onViewMore: onViewMore,
|
|
263
259
|
focusOnViewMore: focusOnViewMore,
|
|
264
260
|
cache: cache
|
|
@@ -309,7 +305,6 @@ function MobileBrowser({
|
|
|
309
305
|
searchTerm,
|
|
310
306
|
createAnalyticsEvent,
|
|
311
307
|
emptyStateHandler,
|
|
312
|
-
viewMoreItem,
|
|
313
308
|
onViewMore,
|
|
314
309
|
cache,
|
|
315
310
|
focusOnEmptyStateButton = false
|
|
@@ -361,12 +356,9 @@ function MobileBrowser({
|
|
|
361
356
|
selectedCategory: selectedCategory,
|
|
362
357
|
searchTerm: searchTerm,
|
|
363
358
|
cache: cache
|
|
364
|
-
})), onViewMore &&
|
|
359
|
+
})), onViewMore && jsx(ViewMore, {
|
|
365
360
|
onViewMore: onViewMore,
|
|
366
361
|
focus: focusOnViewMore
|
|
367
|
-
}), viewMoreItem && !fg('platform_editor_refactor_view_more') && jsx(ViewMore, {
|
|
368
|
-
item: viewMoreItem,
|
|
369
|
-
focus: focusOnViewMore
|
|
370
362
|
}))
|
|
371
363
|
);
|
|
372
364
|
}
|
|
@@ -11,6 +11,7 @@ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
|
11
11
|
import { editorCommandToPMCommand } from '../preset/editor-commands';
|
|
12
12
|
import { browser as browserLegacy, getBrowserInfo } from '../utils/browser';
|
|
13
13
|
export const addAltText = makeKeyMapWithCommon('Add Alt Text', 'Mod-Alt-y');
|
|
14
|
+
export const toggleViewChanges = makeKeyMapWithCommon('View changes', 'Mod-Alt-z');
|
|
14
15
|
export const navToEditorToolbar = makeKeyMapWithCommon('Navigate to editor toolbar', 'Alt-F9');
|
|
15
16
|
export const navToFloatingToolbar = makeKeyMapWithCommon('Navigate to floating toolbar', 'Alt-F10');
|
|
16
17
|
export const askAIQuickInsert = makeKeyMapWithCommon('Ask AI', "Mod-'");
|
|
@@ -74,7 +74,6 @@ const Dropdown = ({
|
|
|
74
74
|
}, props, {
|
|
75
75
|
iconBefore: jsx(ChevronDownIcon, {
|
|
76
76
|
label: configureLinkLabel,
|
|
77
|
-
LEGACY_size: "small",
|
|
78
77
|
size: "small"
|
|
79
78
|
}),
|
|
80
79
|
onClick: e => {
|
|
@@ -86,15 +85,13 @@ const Dropdown = ({
|
|
|
86
85
|
onOpenChange: onOpenChange
|
|
87
86
|
}, jsx(DropdownItemGroup, null, jsx(DropdownItem, {
|
|
88
87
|
elemBefore: jsx(LinkExternalIcon, {
|
|
89
|
-
label: goToLinkLabel
|
|
90
|
-
LEGACY_size: "medium"
|
|
88
|
+
label: goToLinkLabel
|
|
91
89
|
}),
|
|
92
90
|
testId: `${testId}-dropdown-item-open-link`,
|
|
93
91
|
onClick: onGoToLinkClick
|
|
94
92
|
}, goToLinkLabel), jsx(DropdownItem, {
|
|
95
93
|
elemBefore: jsx(PreferencesIcon, {
|
|
96
|
-
label: configureLinkLabel
|
|
97
|
-
LEGACY_size: "medium"
|
|
94
|
+
label: configureLinkLabel
|
|
98
95
|
}),
|
|
99
96
|
onClick: onConfigureClick,
|
|
100
97
|
testId: `${testId}-dropdown-item-configure`
|
|
@@ -7,14 +7,12 @@
|
|
|
7
7
|
import { jsx } from '@emotion/react';
|
|
8
8
|
import WarningIcon from '@atlaskit/icon/core/status-warning';
|
|
9
9
|
import Tooltip from '@atlaskit/tooltip';
|
|
10
|
-
import { ICON_SIZE_THRESOLD } from './constants';
|
|
11
10
|
import { Frame } from './frame';
|
|
12
11
|
import { IconWrapper } from './icon-wrapper';
|
|
13
12
|
export const InlineImageCardErrorView = ({
|
|
14
13
|
testId = 'media-inline-image-card-error-view',
|
|
15
14
|
message,
|
|
16
|
-
icon
|
|
17
|
-
height = ICON_SIZE_THRESOLD
|
|
15
|
+
icon
|
|
18
16
|
}) => {
|
|
19
17
|
return jsx(Frame, {
|
|
20
18
|
testId: testId
|
|
@@ -25,7 +23,6 @@ export const InlineImageCardErrorView = ({
|
|
|
25
23
|
hideTooltipOnClick: true
|
|
26
24
|
}, jsx(IconWrapper, null, icon || jsx(WarningIcon, {
|
|
27
25
|
label: "error",
|
|
28
|
-
LEGACY_size: height > ICON_SIZE_THRESOLD ? 'medium' : 'small',
|
|
29
26
|
color: "var(--ds-icon-danger, #C9372C)"
|
|
30
27
|
}))));
|
|
31
28
|
};
|
|
@@ -40,9 +40,9 @@ export const placeholderTextMessages = defineMessages({
|
|
|
40
40
|
defaultMessage: ' to insert elements',
|
|
41
41
|
description: 'Text after slash in long empty node placeholder'
|
|
42
42
|
},
|
|
43
|
-
|
|
44
|
-
id: 'fabric.editor.
|
|
45
|
-
defaultMessage: 'Add content
|
|
46
|
-
description: 'Placeholder text for sync block'
|
|
43
|
+
sourceSyncBlockPlaceholderText: {
|
|
44
|
+
id: 'fabric.editor.sourceSyncBlockPlaceholderText',
|
|
45
|
+
defaultMessage: 'Add content you want to reuse. Copy and paste this block to sync in other locations.',
|
|
46
|
+
description: 'Placeholder text for source sync block'
|
|
47
47
|
}
|
|
48
48
|
});
|
|
@@ -4,7 +4,7 @@ import { isFedRamp } from './environment';
|
|
|
4
4
|
import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
|
|
5
5
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
6
6
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
7
|
-
const packageVersion = "111.7.
|
|
7
|
+
const packageVersion = "111.7.2";
|
|
8
8
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
9
9
|
// Remove URL as it has UGC
|
|
10
10
|
// Ignored via go/ees007
|
|
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
15
|
import Layer from '../Layer';
|
|
16
16
|
const packageName = "@atlaskit/editor-common";
|
|
17
|
-
const packageVersion = "111.7.
|
|
17
|
+
const packageVersion = "111.7.2";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|