@atlaskit/editor-core 202.1.1 → 202.3.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 +30 -0
- package/dist/cjs/actions/index.js +19 -5
- package/dist/cjs/composable-editor/hooks/useMemoEditorProps.js +3 -2
- package/dist/cjs/create-editor/ReactEditorView.js +4 -2
- package/dist/cjs/create-editor/ReactEditorViewNext.js +2 -1
- package/dist/cjs/preset-default.js +6 -0
- package/dist/cjs/ui/ContentStyles/extension.js +1 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/actions/index.js +15 -2
- package/dist/es2019/composable-editor/hooks/useMemoEditorProps.js +3 -2
- package/dist/es2019/create-editor/ReactEditorView.js +4 -2
- package/dist/es2019/create-editor/ReactEditorViewNext.js +2 -1
- package/dist/es2019/preset-default.js +1 -1
- package/dist/es2019/ui/ContentStyles/extension.js +13 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/actions/index.js +17 -3
- package/dist/esm/composable-editor/hooks/useMemoEditorProps.js +3 -2
- package/dist/esm/create-editor/ReactEditorView.js +4 -2
- package/dist/esm/create-editor/ReactEditorViewNext.js +2 -1
- package/dist/esm/preset-default.js +1 -1
- package/dist/esm/ui/ContentStyles/extension.js +1 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/preset-default.d.ts +1 -1
- package/dist/types/types/editor-props.d.ts +1 -0
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
- package/dist/types/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types-ts4.5/preset-default.d.ts +1 -1
- package/dist/types-ts4.5/types/editor-props.d.ts +1 -0
- package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
- package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +2 -2
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 202.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#166206](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/166206)
|
|
8
|
+
[`589f49d62238b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/589f49d62238b) -
|
|
9
|
+
[ux] Adds logic to change bodied macro from edit to view mode and vice versa. Also updates some
|
|
10
|
+
styling/interactions based on this new feature.
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
16
|
+
## 202.2.0
|
|
17
|
+
|
|
18
|
+
### Minor Changes
|
|
19
|
+
|
|
20
|
+
- [#166957](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/166957)
|
|
21
|
+
[`32cc3cebd2ed7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/32cc3cebd2ed7) -
|
|
22
|
+
ED-25632 Ensure table nesting transform errors are logged to analytics. This includes an upgrade
|
|
23
|
+
to core-plugin to allow it to receive an anaylytics callback.
|
|
24
|
+
- [#161325](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/161325)
|
|
25
|
+
[`69312480d1ccc`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/69312480d1ccc) -
|
|
26
|
+
[ux] [ED-25381] add drag and drop disabling and skipValidation options to editor to enable nested
|
|
27
|
+
legacy content editor
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- Updated dependencies
|
|
32
|
+
|
|
3
33
|
## 202.1.1
|
|
4
34
|
|
|
5
35
|
### Patch Changes
|
|
@@ -10,8 +10,9 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
|
10
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
12
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
|
+
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
13
14
|
var _processRawValue = require("@atlaskit/editor-common/process-raw-value");
|
|
14
|
-
var
|
|
15
|
+
var _analytics2 = require("@atlaskit/editor-common/utils/analytics");
|
|
15
16
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
16
17
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
17
18
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
@@ -42,7 +43,7 @@ var EditorActions = exports.default = /*#__PURE__*/function () {
|
|
|
42
43
|
(0, _defineProperty2.default)(this, "dispatchAnalyticsEvent", function (payload) {
|
|
43
44
|
if (_this.eventDispatcher) {
|
|
44
45
|
var dispatch = (0, _eventDispatcher.createDispatch)(_this.eventDispatcher);
|
|
45
|
-
dispatch(
|
|
46
|
+
dispatch(_analytics2.analyticsEventKey, {
|
|
46
47
|
payload: payload
|
|
47
48
|
});
|
|
48
49
|
}
|
|
@@ -241,12 +242,25 @@ var EditorActions = exports.default = /*#__PURE__*/function () {
|
|
|
241
242
|
return _context2.abrupt("return", json);
|
|
242
243
|
case 9:
|
|
243
244
|
nodeSanitized = _model.Node.fromJSON(this.editorView.state.schema, json);
|
|
245
|
+
_context2.prev = 10;
|
|
244
246
|
return _context2.abrupt("return", this.contentEncode(nodeSanitized));
|
|
245
|
-
case
|
|
247
|
+
case 14:
|
|
248
|
+
_context2.prev = 14;
|
|
249
|
+
_context2.t0 = _context2["catch"](10);
|
|
250
|
+
this.dispatchAnalyticsEvent({
|
|
251
|
+
action: _analytics.ACTION.DOCUMENT_PROCESSING_ERROR,
|
|
252
|
+
actionSubject: _analytics.ACTION_SUBJECT.EDITOR,
|
|
253
|
+
eventType: _analytics.EVENT_TYPE.OPERATIONAL,
|
|
254
|
+
attributes: {
|
|
255
|
+
errorMessage: "".concat(_context2.t0 instanceof Error && _context2.t0.name === 'NodeNestingTransformError' ? 'NodeNestingTransformError - Failed to encode one or more nested tables' : undefined)
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
throw _context2.t0;
|
|
259
|
+
case 18:
|
|
246
260
|
case "end":
|
|
247
261
|
return _context2.stop();
|
|
248
262
|
}
|
|
249
|
-
}, _callee2, this);
|
|
263
|
+
}, _callee2, this, [[10, 14]]);
|
|
250
264
|
}));
|
|
251
265
|
function getValue() {
|
|
252
266
|
return _getValue.apply(this, arguments);
|
|
@@ -342,7 +356,7 @@ var EditorActions = exports.default = /*#__PURE__*/function () {
|
|
|
342
356
|
return true;
|
|
343
357
|
}
|
|
344
358
|
var schema = state.schema;
|
|
345
|
-
var content = Array.isArray(rawValue) ? (0, _processRawValue.processRawFragmentValue)(schema, rawValue) : (0, _processRawValue.processRawValue)(schema, rawValue);
|
|
359
|
+
var content = Array.isArray(rawValue) ? (0, _processRawValue.processRawFragmentValue)(schema, rawValue, undefined, undefined, undefined, this.dispatchAnalyticsEvent) : (0, _processRawValue.processRawValue)(schema, rawValue, undefined, undefined, undefined, this.dispatchAnalyticsEvent);
|
|
346
360
|
if (!content) {
|
|
347
361
|
return false;
|
|
348
362
|
}
|
|
@@ -105,7 +105,8 @@ var useMemoEditorProps = exports.useMemoEditorProps = function useMemoEditorProp
|
|
|
105
105
|
textFormatting: passedProps.textFormatting,
|
|
106
106
|
dangerouslyAppendPlugins: passedProps.dangerouslyAppendPlugins,
|
|
107
107
|
__livePage: passedProps.__livePage,
|
|
108
|
-
AppearanceComponent: passedProps.AppearanceComponent
|
|
108
|
+
AppearanceComponent: passedProps.AppearanceComponent,
|
|
109
|
+
skipValidation: passedProps.skipValidation
|
|
109
110
|
};
|
|
110
111
|
var defaultProps = {
|
|
111
112
|
appearance: 'comment',
|
|
@@ -114,7 +115,7 @@ var useMemoEditorProps = exports.useMemoEditorProps = function useMemoEditorProp
|
|
|
114
115
|
};
|
|
115
116
|
var nextProps = _objectSpread(_objectSpread({}, defaultProps), allProps);
|
|
116
117
|
return nextProps;
|
|
117
|
-
}, [passedProps.preset, passedProps.appearance, passedProps.contentComponents, passedProps.primaryToolbarIconBefore, passedProps.secondaryToolbarComponents, passedProps.persistScrollGutter, passedProps.quickInsert, passedProps.shouldFocus, passedProps.disabled, passedProps.contextPanel, passedProps.errorReporterHandler, passedProps.contentTransformerProvider, passedProps.maxHeight, passedProps.minHeight, passedProps.placeholder, passedProps.placeholderBracketHint, passedProps.performanceTracking, passedProps.inputSamplingLimit, passedProps.defaultValue, passedProps.assistiveLabel, passedProps.assistiveDescribedBy, passedProps.popupsMountPoint, passedProps.popupsBoundariesElement, passedProps.popupsScrollableElement, passedProps.editorActions, passedProps.onEditorReady, passedProps.onDestroy, passedProps.onChange, passedProps.onCancel, passedProps.extensionProviders, passedProps.UNSAFE_useAnalyticsContext, passedProps.useStickyToolbar, passedProps.featureFlags, passedProps.onSave, passedProps.sanitizePrivateContent, passedProps.media, passedProps.collabEdit, passedProps.primaryToolbarComponents, passedProps.allowUndoRedoButtons, passedProps.linking, passedProps.activityProvider, passedProps.searchProvider, passedProps.annotationProviders, passedProps.collabEditProvider, passedProps.presenceProvider, passedProps.emojiProvider, passedProps.taskDecisionProvider, passedProps.legacyImageUploadProvider, passedProps.mentionProvider, passedProps.autoformattingProvider, passedProps.macroProvider, passedProps.contextIdentifierProvider, passedProps.allowExpand, passedProps.allowNestedTasks, passedProps.allowBlockType, passedProps.allowTasksAndDecisions, passedProps.allowBreakout, passedProps.allowRule, passedProps.allowHelpDialog, passedProps.allowPanel, passedProps.allowExtension, passedProps.allowConfluenceInlineComment, passedProps.allowTemplatePlaceholders, passedProps.allowDate, passedProps.allowLayouts, passedProps.allowStatus, passedProps.allowTextAlignment, passedProps.allowIndentation, passedProps.showIndentationButtons, passedProps.allowFindReplace, passedProps.allowBorderMark, passedProps.allowFragmentMark, passedProps.autoScrollIntoView, passedProps.elementBrowser, passedProps.maxContentSize, passedProps.saveOnEnter, passedProps.feedbackInfo, passedProps.mention, passedProps.mentionInsertDisplayName, passedProps.uploadErrorHandler, passedProps.waitForMediaUpload, passedProps.extensionHandlers, passedProps.allowTextColor, passedProps.allowTables, passedProps.insertMenuItems, passedProps.UNSAFE_cards, passedProps.smartLinks, passedProps.allowAnalyticsGASV3, passedProps.codeBlock, passedProps.textFormatting, passedProps.dangerouslyAppendPlugins, passedProps.__livePage, passedProps.AppearanceComponent]);
|
|
118
|
+
}, [passedProps.preset, passedProps.appearance, passedProps.contentComponents, passedProps.primaryToolbarIconBefore, passedProps.secondaryToolbarComponents, passedProps.persistScrollGutter, passedProps.quickInsert, passedProps.shouldFocus, passedProps.disabled, passedProps.contextPanel, passedProps.errorReporterHandler, passedProps.contentTransformerProvider, passedProps.maxHeight, passedProps.minHeight, passedProps.placeholder, passedProps.placeholderBracketHint, passedProps.performanceTracking, passedProps.inputSamplingLimit, passedProps.defaultValue, passedProps.assistiveLabel, passedProps.assistiveDescribedBy, passedProps.popupsMountPoint, passedProps.popupsBoundariesElement, passedProps.popupsScrollableElement, passedProps.editorActions, passedProps.onEditorReady, passedProps.onDestroy, passedProps.onChange, passedProps.onCancel, passedProps.extensionProviders, passedProps.UNSAFE_useAnalyticsContext, passedProps.useStickyToolbar, passedProps.featureFlags, passedProps.onSave, passedProps.sanitizePrivateContent, passedProps.media, passedProps.collabEdit, passedProps.primaryToolbarComponents, passedProps.allowUndoRedoButtons, passedProps.linking, passedProps.activityProvider, passedProps.searchProvider, passedProps.annotationProviders, passedProps.collabEditProvider, passedProps.presenceProvider, passedProps.emojiProvider, passedProps.taskDecisionProvider, passedProps.legacyImageUploadProvider, passedProps.mentionProvider, passedProps.autoformattingProvider, passedProps.macroProvider, passedProps.contextIdentifierProvider, passedProps.allowExpand, passedProps.allowNestedTasks, passedProps.allowBlockType, passedProps.allowTasksAndDecisions, passedProps.allowBreakout, passedProps.allowRule, passedProps.allowHelpDialog, passedProps.allowPanel, passedProps.allowExtension, passedProps.allowConfluenceInlineComment, passedProps.allowTemplatePlaceholders, passedProps.allowDate, passedProps.allowLayouts, passedProps.allowStatus, passedProps.allowTextAlignment, passedProps.allowIndentation, passedProps.showIndentationButtons, passedProps.allowFindReplace, passedProps.allowBorderMark, passedProps.allowFragmentMark, passedProps.autoScrollIntoView, passedProps.elementBrowser, passedProps.maxContentSize, passedProps.saveOnEnter, passedProps.feedbackInfo, passedProps.mention, passedProps.mentionInsertDisplayName, passedProps.uploadErrorHandler, passedProps.waitForMediaUpload, passedProps.extensionHandlers, passedProps.allowTextColor, passedProps.allowTables, passedProps.insertMenuItems, passedProps.UNSAFE_cards, passedProps.smartLinks, passedProps.allowAnalyticsGASV3, passedProps.codeBlock, passedProps.textFormatting, passedProps.dangerouslyAppendPlugins, passedProps.__livePage, passedProps.AppearanceComponent, passedProps.skipValidation]);
|
|
118
119
|
return memodProps;
|
|
119
120
|
};
|
|
120
121
|
var _default = exports.default = useMemoEditorProps;
|
|
@@ -220,7 +220,8 @@ var ReactEditorView = exports.ReactEditorView = /*#__PURE__*/function (_React$Co
|
|
|
220
220
|
if (options.doc) {
|
|
221
221
|
// if the collabEdit API is set, skip this validation due to potential pm validation errors
|
|
222
222
|
// from docs that end up with invalid marks after processing (See #hot-111702 for more details)
|
|
223
|
-
|
|
223
|
+
|
|
224
|
+
if ((api === null || api === void 0 ? void 0 : api.collabEdit) !== undefined && (0, _platformFeatureFlags.fg)('editor_load_conf_collab_docs_without_checks') || options.props.editorProps.skipValidation) {
|
|
224
225
|
doc = (0, _processRawValue.processRawValueWithoutValidation)(schema, options.doc, _this.dispatchAnalyticsEvent);
|
|
225
226
|
} else {
|
|
226
227
|
doc = (0, _processRawValue.processRawValue)(schema, options.doc, options.props.providerFactory, options.props.editorProps.sanitizePrivateContent, _this.contentTransformer, _this.dispatchAnalyticsEvent);
|
|
@@ -463,7 +464,8 @@ var ReactEditorView = exports.ReactEditorView = /*#__PURE__*/function (_React$Co
|
|
|
463
464
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "editor", _this.createEditor(_this.props.editorProps.assistiveLabel, (_this$props$editorPro3 = _this.props.editorProps) === null || _this$props$editorPro3 === void 0 ? void 0 : _this$props$editorPro3.assistiveDescribedBy));
|
|
464
465
|
_this.pluginInjectionAPI = new _preset.EditorPluginInjectionAPI({
|
|
465
466
|
getEditorState: _this.getEditorState,
|
|
466
|
-
getEditorView: _this.getEditorView
|
|
467
|
+
getEditorView: _this.getEditorView,
|
|
468
|
+
fireAnalyticsEvent: _this.handleAnalyticsEvent
|
|
467
469
|
});
|
|
468
470
|
var _api = _this.pluginInjectionAPI.api();
|
|
469
471
|
(_props$setEditorAPI = props.setEditorAPI) === null || _props$setEditorAPI === void 0 || _props$setEditorAPI.call(props, _api);
|
|
@@ -106,7 +106,8 @@ function ReactEditorView(props) {
|
|
|
106
106
|
}, [eventDispatcher]);
|
|
107
107
|
var pluginInjectionAPI = (0, _react.useRef)(new _preset.EditorPluginInjectionAPI({
|
|
108
108
|
getEditorState: getEditorState,
|
|
109
|
-
getEditorView: getEditorView
|
|
109
|
+
getEditorView: getEditorView,
|
|
110
|
+
fireAnalyticsEvent: handleAnalyticsEvent
|
|
110
111
|
}));
|
|
111
112
|
(0, _react.useLayoutEffect)(function () {
|
|
112
113
|
setEditorAPI(pluginInjectionAPI.current.api());
|
|
@@ -9,4 +9,10 @@ Object.defineProperty(exports, "createDefaultPreset", {
|
|
|
9
9
|
return _default.createDefaultPreset;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
+
Object.defineProperty(exports, "useDefaultPreset", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _default.useDefaultPreset;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
12
18
|
var _default = require("./presets/default");
|
|
@@ -10,7 +10,7 @@ var _react = require("@emotion/react");
|
|
|
10
10
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
11
11
|
var _templateObject, _templateObject2; // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
12
12
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
13
|
-
var extensionLabelStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t&.danger > span > div > .extension-label {\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t\topacity: 1;\n\t\tbox-shadow: none;\n\t}\n\n\t&:not(.danger).", " > span > div > .extension-label {\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t\topacity: 1;\n\t\tbox-shadow: none;\n\t}\n\n\t// Targets the icon for bodied macro styling in button label\n\t&.danger > span > div > .extension-label > span {\n\t\tdisplay: inline;\n\t}\n\n\t&:not(.danger).", " > span > div .extension-label > span {\n\t\tdisplay: inline;\n\t}\n\n\t//
|
|
13
|
+
var extensionLabelStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t&.danger > span > div > .extension-label {\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t\topacity: 1;\n\t\tbox-shadow: none;\n\t}\n\n\t&:not(.danger).", " > span > div > .extension-label {\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t\topacity: 1;\n\t\tbox-shadow: none;\n\t}\n\n\t// Targets the icon for bodied macro styling in button label\n\t&.danger > span > div > .extension-label > span {\n\t\tdisplay: inline;\n\t}\n\n\t&:not(.danger).", " > span > div .extension-label > span {\n\t\tdisplay: inline;\n\t}\n\n\t// Start of bodied extension edit toggle styles\n\t&.danger.", " > span > .extension-edit-toggle-container {\n\t\topacity: 1;\n\t}\n\n\t&:not(.danger).", " > span > .extension-edit-toggle-container {\n\t\topacity: 1;\n\t}\n\n\t// In view mode of the bodied macro, we never want to show the extension label\n\t&.danger.", " > span > div > .extension-label.always-hide-label {\n\t\topacity: 0;\n\t}\n\n\t&:not(.danger).", "\n\t\t> span\n\t\t> div\n\t\t> .extension-label.always-hide-label {\n\t\topacity: 0;\n\t}\n\n\t// .with-bodied-macro-live-page-styles class will only be added to bodied macros with the renderer mode gate enabled\n\t&:not(.danger).", "\n\t\t> span\n\t\t> div\n\t\t> .extension-label.with-bodied-macro-live-page-styles {\n\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t}\n\n\t&.danger.", "\n\t\t> span\n\t\t> div\n\t\t> .extension-label.with-bodied-macro-live-page-styles {\n\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t}\n\n\t&.danger.", "\n\t\t> span\n\t\t> .extension-edit-toggle-container\n\t\t> .extension-edit-toggle {\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t\tbox-shadow: none;\n\t}\n"])), "var(--ds-background-accent-red-subtler, #FFD5D2)", "var(--ds-text-danger, #AE2E24)", _editorSharedStyles.akEditorSelectedNodeClassName, "var(--ds-background-selected, #E9F2FF)", "var(--ds-text-selected, #0C66E4)", _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border-selected, #0C66E4)", _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border-danger, #E2483D)", _editorSharedStyles.akEditorSelectedNodeClassName, "var(--ds-background-accent-red-subtler, #FFD5D2)", "var(--ds-text-danger, #AE2E24)");
|
|
14
14
|
var dangerOverlayStyles = (0, _react.css)({
|
|
15
15
|
opacity: 0.3,
|
|
16
16
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
2
3
|
import { processRawFragmentValue, processRawValue } from '@atlaskit/editor-common/process-raw-value';
|
|
3
4
|
import { analyticsEventKey } from '@atlaskit/editor-common/utils/analytics';
|
|
4
5
|
import { Node } from '@atlaskit/editor-prosemirror/model';
|
|
@@ -173,7 +174,19 @@ export default class EditorActions {
|
|
|
173
174
|
return json;
|
|
174
175
|
}
|
|
175
176
|
const nodeSanitized = Node.fromJSON(this.editorView.state.schema, json);
|
|
176
|
-
|
|
177
|
+
try {
|
|
178
|
+
return this.contentEncode(nodeSanitized);
|
|
179
|
+
} catch (e) {
|
|
180
|
+
this.dispatchAnalyticsEvent({
|
|
181
|
+
action: ACTION.DOCUMENT_PROCESSING_ERROR,
|
|
182
|
+
actionSubject: ACTION_SUBJECT.EDITOR,
|
|
183
|
+
eventType: EVENT_TYPE.OPERATIONAL,
|
|
184
|
+
attributes: {
|
|
185
|
+
errorMessage: `${e instanceof Error && e.name === 'NodeNestingTransformError' ? 'NodeNestingTransformError - Failed to encode one or more nested tables' : undefined}`
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
throw e;
|
|
189
|
+
}
|
|
177
190
|
}
|
|
178
191
|
getNodeByLocalId(id) {
|
|
179
192
|
var _this$editorView;
|
|
@@ -255,7 +268,7 @@ export default class EditorActions {
|
|
|
255
268
|
const {
|
|
256
269
|
schema
|
|
257
270
|
} = state;
|
|
258
|
-
const content = Array.isArray(rawValue) ? processRawFragmentValue(schema, rawValue) : processRawValue(schema, rawValue);
|
|
271
|
+
const content = Array.isArray(rawValue) ? processRawFragmentValue(schema, rawValue, undefined, undefined, undefined, this.dispatchAnalyticsEvent) : processRawValue(schema, rawValue, undefined, undefined, undefined, this.dispatchAnalyticsEvent);
|
|
259
272
|
if (!content) {
|
|
260
273
|
return false;
|
|
261
274
|
}
|
|
@@ -95,7 +95,8 @@ export const useMemoEditorProps = passedProps => {
|
|
|
95
95
|
textFormatting: passedProps.textFormatting,
|
|
96
96
|
dangerouslyAppendPlugins: passedProps.dangerouslyAppendPlugins,
|
|
97
97
|
__livePage: passedProps.__livePage,
|
|
98
|
-
AppearanceComponent: passedProps.AppearanceComponent
|
|
98
|
+
AppearanceComponent: passedProps.AppearanceComponent,
|
|
99
|
+
skipValidation: passedProps.skipValidation
|
|
99
100
|
};
|
|
100
101
|
const defaultProps = {
|
|
101
102
|
appearance: 'comment',
|
|
@@ -107,7 +108,7 @@ export const useMemoEditorProps = passedProps => {
|
|
|
107
108
|
...allProps
|
|
108
109
|
};
|
|
109
110
|
return nextProps;
|
|
110
|
-
}, [passedProps.preset, passedProps.appearance, passedProps.contentComponents, passedProps.primaryToolbarIconBefore, passedProps.secondaryToolbarComponents, passedProps.persistScrollGutter, passedProps.quickInsert, passedProps.shouldFocus, passedProps.disabled, passedProps.contextPanel, passedProps.errorReporterHandler, passedProps.contentTransformerProvider, passedProps.maxHeight, passedProps.minHeight, passedProps.placeholder, passedProps.placeholderBracketHint, passedProps.performanceTracking, passedProps.inputSamplingLimit, passedProps.defaultValue, passedProps.assistiveLabel, passedProps.assistiveDescribedBy, passedProps.popupsMountPoint, passedProps.popupsBoundariesElement, passedProps.popupsScrollableElement, passedProps.editorActions, passedProps.onEditorReady, passedProps.onDestroy, passedProps.onChange, passedProps.onCancel, passedProps.extensionProviders, passedProps.UNSAFE_useAnalyticsContext, passedProps.useStickyToolbar, passedProps.featureFlags, passedProps.onSave, passedProps.sanitizePrivateContent, passedProps.media, passedProps.collabEdit, passedProps.primaryToolbarComponents, passedProps.allowUndoRedoButtons, passedProps.linking, passedProps.activityProvider, passedProps.searchProvider, passedProps.annotationProviders, passedProps.collabEditProvider, passedProps.presenceProvider, passedProps.emojiProvider, passedProps.taskDecisionProvider, passedProps.legacyImageUploadProvider, passedProps.mentionProvider, passedProps.autoformattingProvider, passedProps.macroProvider, passedProps.contextIdentifierProvider, passedProps.allowExpand, passedProps.allowNestedTasks, passedProps.allowBlockType, passedProps.allowTasksAndDecisions, passedProps.allowBreakout, passedProps.allowRule, passedProps.allowHelpDialog, passedProps.allowPanel, passedProps.allowExtension, passedProps.allowConfluenceInlineComment, passedProps.allowTemplatePlaceholders, passedProps.allowDate, passedProps.allowLayouts, passedProps.allowStatus, passedProps.allowTextAlignment, passedProps.allowIndentation, passedProps.showIndentationButtons, passedProps.allowFindReplace, passedProps.allowBorderMark, passedProps.allowFragmentMark, passedProps.autoScrollIntoView, passedProps.elementBrowser, passedProps.maxContentSize, passedProps.saveOnEnter, passedProps.feedbackInfo, passedProps.mention, passedProps.mentionInsertDisplayName, passedProps.uploadErrorHandler, passedProps.waitForMediaUpload, passedProps.extensionHandlers, passedProps.allowTextColor, passedProps.allowTables, passedProps.insertMenuItems, passedProps.UNSAFE_cards, passedProps.smartLinks, passedProps.allowAnalyticsGASV3, passedProps.codeBlock, passedProps.textFormatting, passedProps.dangerouslyAppendPlugins, passedProps.__livePage, passedProps.AppearanceComponent]);
|
|
111
|
+
}, [passedProps.preset, passedProps.appearance, passedProps.contentComponents, passedProps.primaryToolbarIconBefore, passedProps.secondaryToolbarComponents, passedProps.persistScrollGutter, passedProps.quickInsert, passedProps.shouldFocus, passedProps.disabled, passedProps.contextPanel, passedProps.errorReporterHandler, passedProps.contentTransformerProvider, passedProps.maxHeight, passedProps.minHeight, passedProps.placeholder, passedProps.placeholderBracketHint, passedProps.performanceTracking, passedProps.inputSamplingLimit, passedProps.defaultValue, passedProps.assistiveLabel, passedProps.assistiveDescribedBy, passedProps.popupsMountPoint, passedProps.popupsBoundariesElement, passedProps.popupsScrollableElement, passedProps.editorActions, passedProps.onEditorReady, passedProps.onDestroy, passedProps.onChange, passedProps.onCancel, passedProps.extensionProviders, passedProps.UNSAFE_useAnalyticsContext, passedProps.useStickyToolbar, passedProps.featureFlags, passedProps.onSave, passedProps.sanitizePrivateContent, passedProps.media, passedProps.collabEdit, passedProps.primaryToolbarComponents, passedProps.allowUndoRedoButtons, passedProps.linking, passedProps.activityProvider, passedProps.searchProvider, passedProps.annotationProviders, passedProps.collabEditProvider, passedProps.presenceProvider, passedProps.emojiProvider, passedProps.taskDecisionProvider, passedProps.legacyImageUploadProvider, passedProps.mentionProvider, passedProps.autoformattingProvider, passedProps.macroProvider, passedProps.contextIdentifierProvider, passedProps.allowExpand, passedProps.allowNestedTasks, passedProps.allowBlockType, passedProps.allowTasksAndDecisions, passedProps.allowBreakout, passedProps.allowRule, passedProps.allowHelpDialog, passedProps.allowPanel, passedProps.allowExtension, passedProps.allowConfluenceInlineComment, passedProps.allowTemplatePlaceholders, passedProps.allowDate, passedProps.allowLayouts, passedProps.allowStatus, passedProps.allowTextAlignment, passedProps.allowIndentation, passedProps.showIndentationButtons, passedProps.allowFindReplace, passedProps.allowBorderMark, passedProps.allowFragmentMark, passedProps.autoScrollIntoView, passedProps.elementBrowser, passedProps.maxContentSize, passedProps.saveOnEnter, passedProps.feedbackInfo, passedProps.mention, passedProps.mentionInsertDisplayName, passedProps.uploadErrorHandler, passedProps.waitForMediaUpload, passedProps.extensionHandlers, passedProps.allowTextColor, passedProps.allowTables, passedProps.insertMenuItems, passedProps.UNSAFE_cards, passedProps.smartLinks, passedProps.allowAnalyticsGASV3, passedProps.codeBlock, passedProps.textFormatting, passedProps.dangerouslyAppendPlugins, passedProps.__livePage, passedProps.AppearanceComponent, passedProps.skipValidation]);
|
|
111
112
|
return memodProps;
|
|
112
113
|
};
|
|
113
114
|
export default useMemoEditorProps;
|
|
@@ -211,7 +211,8 @@ export class ReactEditorView extends React.Component {
|
|
|
211
211
|
if (options.doc) {
|
|
212
212
|
// if the collabEdit API is set, skip this validation due to potential pm validation errors
|
|
213
213
|
// from docs that end up with invalid marks after processing (See #hot-111702 for more details)
|
|
214
|
-
|
|
214
|
+
|
|
215
|
+
if ((api === null || api === void 0 ? void 0 : api.collabEdit) !== undefined && fg('editor_load_conf_collab_docs_without_checks') || options.props.editorProps.skipValidation) {
|
|
215
216
|
doc = processRawValueWithoutValidation(schema, options.doc, this.dispatchAnalyticsEvent);
|
|
216
217
|
} else {
|
|
217
218
|
doc = processRawValue(schema, options.doc, options.props.providerFactory, options.props.editorProps.sanitizePrivateContent, this.contentTransformer, this.dispatchAnalyticsEvent);
|
|
@@ -451,7 +452,8 @@ export class ReactEditorView extends React.Component {
|
|
|
451
452
|
_defineProperty(this, "editor", this.createEditor(this.props.editorProps.assistiveLabel, (_this$props$editorPro3 = this.props.editorProps) === null || _this$props$editorPro3 === void 0 ? void 0 : _this$props$editorPro3.assistiveDescribedBy));
|
|
452
453
|
this.pluginInjectionAPI = new EditorPluginInjectionAPI({
|
|
453
454
|
getEditorState: this.getEditorState,
|
|
454
|
-
getEditorView: this.getEditorView
|
|
455
|
+
getEditorView: this.getEditorView,
|
|
456
|
+
fireAnalyticsEvent: this.handleAnalyticsEvent
|
|
455
457
|
});
|
|
456
458
|
const _api = this.pluginInjectionAPI.api();
|
|
457
459
|
(_props$setEditorAPI = props.setEditorAPI) === null || _props$setEditorAPI === void 0 ? void 0 : _props$setEditorAPI.call(props, _api);
|
|
@@ -82,7 +82,8 @@ function ReactEditorView(props) {
|
|
|
82
82
|
}, [eventDispatcher]);
|
|
83
83
|
const pluginInjectionAPI = useRef(new EditorPluginInjectionAPI({
|
|
84
84
|
getEditorState: getEditorState,
|
|
85
|
-
getEditorView: getEditorView
|
|
85
|
+
getEditorView: getEditorView,
|
|
86
|
+
fireAnalyticsEvent: handleAnalyticsEvent
|
|
86
87
|
}));
|
|
87
88
|
useLayoutEffect(() => {
|
|
88
89
|
setEditorAPI(pluginInjectionAPI.current.api());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { createDefaultPreset } from './presets/default';
|
|
1
|
+
export { createDefaultPreset, useDefaultPreset } from './presets/default';
|
|
@@ -26,7 +26,7 @@ const extensionLabelStyles = css`
|
|
|
26
26
|
display: inline;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
//
|
|
29
|
+
// Start of bodied extension edit toggle styles
|
|
30
30
|
&.danger.${akEditorSelectedNodeClassName} > span > .extension-edit-toggle-container {
|
|
31
31
|
opacity: 1;
|
|
32
32
|
}
|
|
@@ -35,6 +35,18 @@ const extensionLabelStyles = css`
|
|
|
35
35
|
opacity: 1;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
// In view mode of the bodied macro, we never want to show the extension label
|
|
39
|
+
&.danger.${akEditorSelectedNodeClassName} > span > div > .extension-label.always-hide-label {
|
|
40
|
+
opacity: 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&:not(.danger).${akEditorSelectedNodeClassName}
|
|
44
|
+
> span
|
|
45
|
+
> div
|
|
46
|
+
> .extension-label.always-hide-label {
|
|
47
|
+
opacity: 0;
|
|
48
|
+
}
|
|
49
|
+
|
|
38
50
|
// .with-bodied-macro-live-page-styles class will only be added to bodied macros with the renderer mode gate enabled
|
|
39
51
|
&:not(.danger).${akEditorSelectedNodeClassName}
|
|
40
52
|
> span
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "202.
|
|
2
|
+
export const version = "202.3.0";
|
|
@@ -3,6 +3,7 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
4
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
5
5
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
6
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
6
7
|
import { processRawFragmentValue, processRawValue } from '@atlaskit/editor-common/process-raw-value';
|
|
7
8
|
import { analyticsEventKey } from '@atlaskit/editor-common/utils/analytics';
|
|
8
9
|
import { Node } from '@atlaskit/editor-prosemirror/model';
|
|
@@ -235,12 +236,25 @@ var EditorActions = /*#__PURE__*/function () {
|
|
|
235
236
|
return _context2.abrupt("return", json);
|
|
236
237
|
case 9:
|
|
237
238
|
nodeSanitized = Node.fromJSON(this.editorView.state.schema, json);
|
|
239
|
+
_context2.prev = 10;
|
|
238
240
|
return _context2.abrupt("return", this.contentEncode(nodeSanitized));
|
|
239
|
-
case
|
|
241
|
+
case 14:
|
|
242
|
+
_context2.prev = 14;
|
|
243
|
+
_context2.t0 = _context2["catch"](10);
|
|
244
|
+
this.dispatchAnalyticsEvent({
|
|
245
|
+
action: ACTION.DOCUMENT_PROCESSING_ERROR,
|
|
246
|
+
actionSubject: ACTION_SUBJECT.EDITOR,
|
|
247
|
+
eventType: EVENT_TYPE.OPERATIONAL,
|
|
248
|
+
attributes: {
|
|
249
|
+
errorMessage: "".concat(_context2.t0 instanceof Error && _context2.t0.name === 'NodeNestingTransformError' ? 'NodeNestingTransformError - Failed to encode one or more nested tables' : undefined)
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
throw _context2.t0;
|
|
253
|
+
case 18:
|
|
240
254
|
case "end":
|
|
241
255
|
return _context2.stop();
|
|
242
256
|
}
|
|
243
|
-
}, _callee2, this);
|
|
257
|
+
}, _callee2, this, [[10, 14]]);
|
|
244
258
|
}));
|
|
245
259
|
function getValue() {
|
|
246
260
|
return _getValue.apply(this, arguments);
|
|
@@ -336,7 +350,7 @@ var EditorActions = /*#__PURE__*/function () {
|
|
|
336
350
|
return true;
|
|
337
351
|
}
|
|
338
352
|
var schema = state.schema;
|
|
339
|
-
var content = Array.isArray(rawValue) ? processRawFragmentValue(schema, rawValue) : processRawValue(schema, rawValue);
|
|
353
|
+
var content = Array.isArray(rawValue) ? processRawFragmentValue(schema, rawValue, undefined, undefined, undefined, this.dispatchAnalyticsEvent) : processRawValue(schema, rawValue, undefined, undefined, undefined, this.dispatchAnalyticsEvent);
|
|
340
354
|
if (!content) {
|
|
341
355
|
return false;
|
|
342
356
|
}
|
|
@@ -98,7 +98,8 @@ export var useMemoEditorProps = function useMemoEditorProps(passedProps) {
|
|
|
98
98
|
textFormatting: passedProps.textFormatting,
|
|
99
99
|
dangerouslyAppendPlugins: passedProps.dangerouslyAppendPlugins,
|
|
100
100
|
__livePage: passedProps.__livePage,
|
|
101
|
-
AppearanceComponent: passedProps.AppearanceComponent
|
|
101
|
+
AppearanceComponent: passedProps.AppearanceComponent,
|
|
102
|
+
skipValidation: passedProps.skipValidation
|
|
102
103
|
};
|
|
103
104
|
var defaultProps = {
|
|
104
105
|
appearance: 'comment',
|
|
@@ -107,7 +108,7 @@ export var useMemoEditorProps = function useMemoEditorProps(passedProps) {
|
|
|
107
108
|
};
|
|
108
109
|
var nextProps = _objectSpread(_objectSpread({}, defaultProps), allProps);
|
|
109
110
|
return nextProps;
|
|
110
|
-
}, [passedProps.preset, passedProps.appearance, passedProps.contentComponents, passedProps.primaryToolbarIconBefore, passedProps.secondaryToolbarComponents, passedProps.persistScrollGutter, passedProps.quickInsert, passedProps.shouldFocus, passedProps.disabled, passedProps.contextPanel, passedProps.errorReporterHandler, passedProps.contentTransformerProvider, passedProps.maxHeight, passedProps.minHeight, passedProps.placeholder, passedProps.placeholderBracketHint, passedProps.performanceTracking, passedProps.inputSamplingLimit, passedProps.defaultValue, passedProps.assistiveLabel, passedProps.assistiveDescribedBy, passedProps.popupsMountPoint, passedProps.popupsBoundariesElement, passedProps.popupsScrollableElement, passedProps.editorActions, passedProps.onEditorReady, passedProps.onDestroy, passedProps.onChange, passedProps.onCancel, passedProps.extensionProviders, passedProps.UNSAFE_useAnalyticsContext, passedProps.useStickyToolbar, passedProps.featureFlags, passedProps.onSave, passedProps.sanitizePrivateContent, passedProps.media, passedProps.collabEdit, passedProps.primaryToolbarComponents, passedProps.allowUndoRedoButtons, passedProps.linking, passedProps.activityProvider, passedProps.searchProvider, passedProps.annotationProviders, passedProps.collabEditProvider, passedProps.presenceProvider, passedProps.emojiProvider, passedProps.taskDecisionProvider, passedProps.legacyImageUploadProvider, passedProps.mentionProvider, passedProps.autoformattingProvider, passedProps.macroProvider, passedProps.contextIdentifierProvider, passedProps.allowExpand, passedProps.allowNestedTasks, passedProps.allowBlockType, passedProps.allowTasksAndDecisions, passedProps.allowBreakout, passedProps.allowRule, passedProps.allowHelpDialog, passedProps.allowPanel, passedProps.allowExtension, passedProps.allowConfluenceInlineComment, passedProps.allowTemplatePlaceholders, passedProps.allowDate, passedProps.allowLayouts, passedProps.allowStatus, passedProps.allowTextAlignment, passedProps.allowIndentation, passedProps.showIndentationButtons, passedProps.allowFindReplace, passedProps.allowBorderMark, passedProps.allowFragmentMark, passedProps.autoScrollIntoView, passedProps.elementBrowser, passedProps.maxContentSize, passedProps.saveOnEnter, passedProps.feedbackInfo, passedProps.mention, passedProps.mentionInsertDisplayName, passedProps.uploadErrorHandler, passedProps.waitForMediaUpload, passedProps.extensionHandlers, passedProps.allowTextColor, passedProps.allowTables, passedProps.insertMenuItems, passedProps.UNSAFE_cards, passedProps.smartLinks, passedProps.allowAnalyticsGASV3, passedProps.codeBlock, passedProps.textFormatting, passedProps.dangerouslyAppendPlugins, passedProps.__livePage, passedProps.AppearanceComponent]);
|
|
111
|
+
}, [passedProps.preset, passedProps.appearance, passedProps.contentComponents, passedProps.primaryToolbarIconBefore, passedProps.secondaryToolbarComponents, passedProps.persistScrollGutter, passedProps.quickInsert, passedProps.shouldFocus, passedProps.disabled, passedProps.contextPanel, passedProps.errorReporterHandler, passedProps.contentTransformerProvider, passedProps.maxHeight, passedProps.minHeight, passedProps.placeholder, passedProps.placeholderBracketHint, passedProps.performanceTracking, passedProps.inputSamplingLimit, passedProps.defaultValue, passedProps.assistiveLabel, passedProps.assistiveDescribedBy, passedProps.popupsMountPoint, passedProps.popupsBoundariesElement, passedProps.popupsScrollableElement, passedProps.editorActions, passedProps.onEditorReady, passedProps.onDestroy, passedProps.onChange, passedProps.onCancel, passedProps.extensionProviders, passedProps.UNSAFE_useAnalyticsContext, passedProps.useStickyToolbar, passedProps.featureFlags, passedProps.onSave, passedProps.sanitizePrivateContent, passedProps.media, passedProps.collabEdit, passedProps.primaryToolbarComponents, passedProps.allowUndoRedoButtons, passedProps.linking, passedProps.activityProvider, passedProps.searchProvider, passedProps.annotationProviders, passedProps.collabEditProvider, passedProps.presenceProvider, passedProps.emojiProvider, passedProps.taskDecisionProvider, passedProps.legacyImageUploadProvider, passedProps.mentionProvider, passedProps.autoformattingProvider, passedProps.macroProvider, passedProps.contextIdentifierProvider, passedProps.allowExpand, passedProps.allowNestedTasks, passedProps.allowBlockType, passedProps.allowTasksAndDecisions, passedProps.allowBreakout, passedProps.allowRule, passedProps.allowHelpDialog, passedProps.allowPanel, passedProps.allowExtension, passedProps.allowConfluenceInlineComment, passedProps.allowTemplatePlaceholders, passedProps.allowDate, passedProps.allowLayouts, passedProps.allowStatus, passedProps.allowTextAlignment, passedProps.allowIndentation, passedProps.showIndentationButtons, passedProps.allowFindReplace, passedProps.allowBorderMark, passedProps.allowFragmentMark, passedProps.autoScrollIntoView, passedProps.elementBrowser, passedProps.maxContentSize, passedProps.saveOnEnter, passedProps.feedbackInfo, passedProps.mention, passedProps.mentionInsertDisplayName, passedProps.uploadErrorHandler, passedProps.waitForMediaUpload, passedProps.extensionHandlers, passedProps.allowTextColor, passedProps.allowTables, passedProps.insertMenuItems, passedProps.UNSAFE_cards, passedProps.smartLinks, passedProps.allowAnalyticsGASV3, passedProps.codeBlock, passedProps.textFormatting, passedProps.dangerouslyAppendPlugins, passedProps.__livePage, passedProps.AppearanceComponent, passedProps.skipValidation]);
|
|
111
112
|
return memodProps;
|
|
112
113
|
};
|
|
113
114
|
export default useMemoEditorProps;
|
|
@@ -213,7 +213,8 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
213
213
|
if (options.doc) {
|
|
214
214
|
// if the collabEdit API is set, skip this validation due to potential pm validation errors
|
|
215
215
|
// from docs that end up with invalid marks after processing (See #hot-111702 for more details)
|
|
216
|
-
|
|
216
|
+
|
|
217
|
+
if ((api === null || api === void 0 ? void 0 : api.collabEdit) !== undefined && fg('editor_load_conf_collab_docs_without_checks') || options.props.editorProps.skipValidation) {
|
|
217
218
|
doc = processRawValueWithoutValidation(schema, options.doc, _this.dispatchAnalyticsEvent);
|
|
218
219
|
} else {
|
|
219
220
|
doc = processRawValue(schema, options.doc, options.props.providerFactory, options.props.editorProps.sanitizePrivateContent, _this.contentTransformer, _this.dispatchAnalyticsEvent);
|
|
@@ -456,7 +457,8 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
456
457
|
_defineProperty(_assertThisInitialized(_this), "editor", _this.createEditor(_this.props.editorProps.assistiveLabel, (_this$props$editorPro3 = _this.props.editorProps) === null || _this$props$editorPro3 === void 0 ? void 0 : _this$props$editorPro3.assistiveDescribedBy));
|
|
457
458
|
_this.pluginInjectionAPI = new EditorPluginInjectionAPI({
|
|
458
459
|
getEditorState: _this.getEditorState,
|
|
459
|
-
getEditorView: _this.getEditorView
|
|
460
|
+
getEditorView: _this.getEditorView,
|
|
461
|
+
fireAnalyticsEvent: _this.handleAnalyticsEvent
|
|
460
462
|
});
|
|
461
463
|
var _api = _this.pluginInjectionAPI.api();
|
|
462
464
|
(_props$setEditorAPI = props.setEditorAPI) === null || _props$setEditorAPI === void 0 || _props$setEditorAPI.call(props, _api);
|
|
@@ -96,7 +96,8 @@ function ReactEditorView(props) {
|
|
|
96
96
|
}, [eventDispatcher]);
|
|
97
97
|
var pluginInjectionAPI = useRef(new EditorPluginInjectionAPI({
|
|
98
98
|
getEditorState: getEditorState,
|
|
99
|
-
getEditorView: getEditorView
|
|
99
|
+
getEditorView: getEditorView,
|
|
100
|
+
fireAnalyticsEvent: handleAnalyticsEvent
|
|
100
101
|
}));
|
|
101
102
|
useLayoutEffect(function () {
|
|
102
103
|
setEditorAPI(pluginInjectionAPI.current.api());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { createDefaultPreset } from './presets/default';
|
|
1
|
+
export { createDefaultPreset, useDefaultPreset } from './presets/default';
|
|
@@ -4,7 +4,7 @@ var _templateObject, _templateObject2;
|
|
|
4
4
|
import { css } from '@emotion/react';
|
|
5
5
|
import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, blockNodesVerticalMargin, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
6
6
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
7
|
-
var extensionLabelStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t&.danger > span > div > .extension-label {\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t\topacity: 1;\n\t\tbox-shadow: none;\n\t}\n\n\t&:not(.danger).", " > span > div > .extension-label {\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t\topacity: 1;\n\t\tbox-shadow: none;\n\t}\n\n\t// Targets the icon for bodied macro styling in button label\n\t&.danger > span > div > .extension-label > span {\n\t\tdisplay: inline;\n\t}\n\n\t&:not(.danger).", " > span > div .extension-label > span {\n\t\tdisplay: inline;\n\t}\n\n\t//
|
|
7
|
+
var extensionLabelStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t&.danger > span > div > .extension-label {\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t\topacity: 1;\n\t\tbox-shadow: none;\n\t}\n\n\t&:not(.danger).", " > span > div > .extension-label {\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t\topacity: 1;\n\t\tbox-shadow: none;\n\t}\n\n\t// Targets the icon for bodied macro styling in button label\n\t&.danger > span > div > .extension-label > span {\n\t\tdisplay: inline;\n\t}\n\n\t&:not(.danger).", " > span > div .extension-label > span {\n\t\tdisplay: inline;\n\t}\n\n\t// Start of bodied extension edit toggle styles\n\t&.danger.", " > span > .extension-edit-toggle-container {\n\t\topacity: 1;\n\t}\n\n\t&:not(.danger).", " > span > .extension-edit-toggle-container {\n\t\topacity: 1;\n\t}\n\n\t// In view mode of the bodied macro, we never want to show the extension label\n\t&.danger.", " > span > div > .extension-label.always-hide-label {\n\t\topacity: 0;\n\t}\n\n\t&:not(.danger).", "\n\t\t> span\n\t\t> div\n\t\t> .extension-label.always-hide-label {\n\t\topacity: 0;\n\t}\n\n\t// .with-bodied-macro-live-page-styles class will only be added to bodied macros with the renderer mode gate enabled\n\t&:not(.danger).", "\n\t\t> span\n\t\t> div\n\t\t> .extension-label.with-bodied-macro-live-page-styles {\n\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t}\n\n\t&.danger.", "\n\t\t> span\n\t\t> div\n\t\t> .extension-label.with-bodied-macro-live-page-styles {\n\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t}\n\n\t&.danger.", "\n\t\t> span\n\t\t> .extension-edit-toggle-container\n\t\t> .extension-edit-toggle {\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t\tbox-shadow: none;\n\t}\n"])), "var(--ds-background-accent-red-subtler, #FFD5D2)", "var(--ds-text-danger, #AE2E24)", akEditorSelectedNodeClassName, "var(--ds-background-selected, #E9F2FF)", "var(--ds-text-selected, #0C66E4)", akEditorSelectedNodeClassName, akEditorSelectedNodeClassName, akEditorSelectedNodeClassName, akEditorSelectedNodeClassName, akEditorSelectedNodeClassName, akEditorSelectedNodeClassName, akEditorSelectedBorderSize, "var(--ds-border-selected, #0C66E4)", akEditorSelectedNodeClassName, akEditorSelectedBorderSize, "var(--ds-border-danger, #E2483D)", akEditorSelectedNodeClassName, "var(--ds-background-accent-red-subtler, #FFD5D2)", "var(--ds-text-danger, #AE2E24)");
|
|
8
8
|
var dangerOverlayStyles = css({
|
|
9
9
|
opacity: 0.3,
|
|
10
10
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "202.
|
|
2
|
+
export var version = "202.3.0";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { createDefaultPreset } from './presets/default';
|
|
1
|
+
export { createDefaultPreset, useDefaultPreset } from './presets/default';
|
|
@@ -6,7 +6,7 @@ export declare const ScrollContainer: import("react").ForwardRefExoticComponent<
|
|
|
6
6
|
featureFlags?: import("@atlaskit/editor-common/types").FeatureFlags | undefined;
|
|
7
7
|
viewMode?: "view" | "edit" | undefined;
|
|
8
8
|
typographyTheme?: "typography" | "typography-adg3" | "typography-modernized" | "typography-refreshed" | undefined;
|
|
9
|
-
} & import("react").HTMLProps<HTMLDivElement>, "headers" | "method" | "key" | "property" | "type" | "content" | "title" | "disabled" | "defaultValue" | "onChange" | "placeholder" | "media" | "name" | "list" | "width" | "open" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "pattern" | "accessKey" | "dir" | "children" | "value" | "className" | "role" | "id" | "
|
|
9
|
+
} & import("react").HTMLProps<HTMLDivElement>, "headers" | "method" | "key" | "property" | "type" | "action" | "content" | "title" | "disabled" | "defaultValue" | "onChange" | "placeholder" | "media" | "name" | "list" | "width" | "open" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "pattern" | "accessKey" | "dir" | "children" | "value" | "className" | "role" | "id" | "step" | "wrap" | "color" | "height" | "translate" | "default" | "hidden" | keyof {
|
|
10
10
|
theme?: import("@emotion/react").Theme | undefined;
|
|
11
11
|
colorMode?: "light" | "dark" | undefined;
|
|
12
12
|
featureFlags?: import("@atlaskit/editor-common/types").FeatureFlags | undefined;
|
|
@@ -20,6 +20,6 @@ export declare const placeholderStyles: SerializedStyles;
|
|
|
20
20
|
*/
|
|
21
21
|
export declare const fixBlockControlStylesSSR: () => SerializedStyles | null;
|
|
22
22
|
type Props = ContentStylesProps & React.HTMLProps<HTMLDivElement>;
|
|
23
|
-
export declare const createEditorContentStyle: (styles?: SerializedStyles) => React.ForwardRefExoticComponent<Pick<Props, "headers" | "method" | "key" | "property" | "type" | "content" | "title" | "disabled" | "defaultValue" | "onChange" | "placeholder" | "media" | "name" | "list" | "width" | "open" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "pattern" | "accessKey" | "dir" | "children" | "value" | "className" | "role" | "id" | "
|
|
24
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<Props, "headers" | "method" | "key" | "property" | "type" | "content" | "title" | "disabled" | "defaultValue" | "onChange" | "placeholder" | "media" | "name" | "list" | "width" | "open" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "pattern" | "accessKey" | "dir" | "children" | "value" | "className" | "role" | "id" | "
|
|
23
|
+
export declare const createEditorContentStyle: (styles?: SerializedStyles) => React.ForwardRefExoticComponent<Pick<Props, "headers" | "method" | "key" | "property" | "type" | "action" | "content" | "title" | "disabled" | "defaultValue" | "onChange" | "placeholder" | "media" | "name" | "list" | "width" | "open" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "pattern" | "accessKey" | "dir" | "children" | "value" | "className" | "role" | "id" | "step" | "wrap" | "color" | "height" | "translate" | "default" | "hidden" | keyof ContentStylesProps | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "mediaGroup" | "min" | "minLength" | "multiple" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "target" | "useMap" | "wmode" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contentEditable" | "contextMenu" | "draggable" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Props, "headers" | "method" | "key" | "property" | "type" | "action" | "content" | "title" | "disabled" | "defaultValue" | "onChange" | "placeholder" | "media" | "name" | "list" | "width" | "open" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "pattern" | "accessKey" | "dir" | "children" | "value" | "className" | "role" | "id" | "step" | "wrap" | "color" | "height" | "translate" | "default" | "hidden" | keyof ContentStylesProps | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "mediaGroup" | "min" | "minLength" | "multiple" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "target" | "useMap" | "wmode" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contentEditable" | "contextMenu" | "draggable" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLDivElement>>;
|
|
25
25
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { createDefaultPreset } from './presets/default';
|
|
1
|
+
export { createDefaultPreset, useDefaultPreset } from './presets/default';
|
|
@@ -6,7 +6,7 @@ export declare const ScrollContainer: import("react").ForwardRefExoticComponent<
|
|
|
6
6
|
featureFlags?: import("@atlaskit/editor-common/types").FeatureFlags | undefined;
|
|
7
7
|
viewMode?: "view" | "edit" | undefined;
|
|
8
8
|
typographyTheme?: "typography" | "typography-adg3" | "typography-modernized" | "typography-refreshed" | undefined;
|
|
9
|
-
} & import("react").HTMLProps<HTMLDivElement>, "headers" | "method" | "key" | "property" | "type" | "content" | "title" | "disabled" | "defaultValue" | "onChange" | "placeholder" | "media" | "name" | "list" | "width" | "open" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "pattern" | "accessKey" | "dir" | "children" | "value" | "className" | "role" | "id" | "
|
|
9
|
+
} & import("react").HTMLProps<HTMLDivElement>, "headers" | "method" | "key" | "property" | "type" | "action" | "content" | "title" | "disabled" | "defaultValue" | "onChange" | "placeholder" | "media" | "name" | "list" | "width" | "open" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "pattern" | "accessKey" | "dir" | "children" | "value" | "className" | "role" | "id" | "step" | "wrap" | "color" | "height" | "translate" | "default" | "hidden" | keyof {
|
|
10
10
|
theme?: import("@emotion/react").Theme | undefined;
|
|
11
11
|
colorMode?: "light" | "dark" | undefined;
|
|
12
12
|
featureFlags?: import("@atlaskit/editor-common/types").FeatureFlags | undefined;
|
|
@@ -20,6 +20,6 @@ export declare const placeholderStyles: SerializedStyles;
|
|
|
20
20
|
*/
|
|
21
21
|
export declare const fixBlockControlStylesSSR: () => SerializedStyles | null;
|
|
22
22
|
type Props = ContentStylesProps & React.HTMLProps<HTMLDivElement>;
|
|
23
|
-
export declare const createEditorContentStyle: (styles?: SerializedStyles) => React.ForwardRefExoticComponent<Pick<Props, "headers" | "method" | "key" | "property" | "type" | "content" | "title" | "disabled" | "defaultValue" | "onChange" | "placeholder" | "media" | "name" | "list" | "width" | "open" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "pattern" | "accessKey" | "dir" | "children" | "value" | "className" | "role" | "id" | "
|
|
24
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<Props, "headers" | "method" | "key" | "property" | "type" | "content" | "title" | "disabled" | "defaultValue" | "onChange" | "placeholder" | "media" | "name" | "list" | "width" | "open" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "pattern" | "accessKey" | "dir" | "children" | "value" | "className" | "role" | "id" | "
|
|
23
|
+
export declare const createEditorContentStyle: (styles?: SerializedStyles) => React.ForwardRefExoticComponent<Pick<Props, "headers" | "method" | "key" | "property" | "type" | "action" | "content" | "title" | "disabled" | "defaultValue" | "onChange" | "placeholder" | "media" | "name" | "list" | "width" | "open" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "pattern" | "accessKey" | "dir" | "children" | "value" | "className" | "role" | "id" | "step" | "wrap" | "color" | "height" | "translate" | "default" | "hidden" | keyof ContentStylesProps | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "mediaGroup" | "min" | "minLength" | "multiple" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "target" | "useMap" | "wmode" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contentEditable" | "contextMenu" | "draggable" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Props, "headers" | "method" | "key" | "property" | "type" | "action" | "content" | "title" | "disabled" | "defaultValue" | "onChange" | "placeholder" | "media" | "name" | "list" | "width" | "open" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "pattern" | "accessKey" | "dir" | "children" | "value" | "className" | "role" | "id" | "step" | "wrap" | "color" | "height" | "translate" | "default" | "hidden" | keyof ContentStylesProps | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "mediaGroup" | "min" | "minLength" | "multiple" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "size" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "target" | "useMap" | "wmode" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contentEditable" | "contextMenu" | "draggable" | "lang" | "spellCheck" | "tabIndex" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLDivElement>>;
|
|
25
25
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "202.
|
|
3
|
+
"version": "202.3.0",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@atlaskit/analytics-next": "^10.1.0",
|
|
44
44
|
"@atlaskit/analytics-next-stable-react-context": "1.0.1",
|
|
45
45
|
"@atlaskit/button": "^20.3.0",
|
|
46
|
-
"@atlaskit/editor-common": "^95.
|
|
46
|
+
"@atlaskit/editor-common": "^95.6.0",
|
|
47
47
|
"@atlaskit/editor-json-transformer": "^8.21.0",
|
|
48
48
|
"@atlaskit/editor-plugin-quick-insert": "1.7.1",
|
|
49
49
|
"@atlaskit/editor-plugins": "^5.6.0",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"uuid": "^3.1.0"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"@atlaskit/link-provider": "^1.
|
|
75
|
+
"@atlaskit/link-provider": "^1.17.0",
|
|
76
76
|
"@atlaskit/media-core": "^34.3.0",
|
|
77
77
|
"react": "^16.8.0 || ^17.0.0 || ~18.2.0",
|
|
78
78
|
"react-dom": "^16.8.0 || ^17.0.0 || ~18.2.0",
|
|
@@ -83,19 +83,19 @@
|
|
|
83
83
|
"@af/visual-regression": "*",
|
|
84
84
|
"@atlaskit/adf-utils": "^19.13.0",
|
|
85
85
|
"@atlaskit/analytics-listeners": "^8.11.0",
|
|
86
|
-
"@atlaskit/collab-provider": "10.
|
|
87
|
-
"@atlaskit/editor-plugin-annotation": "1.
|
|
86
|
+
"@atlaskit/collab-provider": "10.1.0",
|
|
87
|
+
"@atlaskit/editor-plugin-annotation": "1.25.0",
|
|
88
88
|
"@atlaskit/editor-plugin-card": "^4.4.0",
|
|
89
89
|
"@atlaskit/editor-plugin-list": "^3.9.0",
|
|
90
90
|
"@atlaskit/editor-plugin-paste": "^2.0.0",
|
|
91
|
-
"@atlaskit/link-provider": "^1.
|
|
91
|
+
"@atlaskit/link-provider": "^1.17.0",
|
|
92
92
|
"@atlaskit/logo": "^14.3.0",
|
|
93
93
|
"@atlaskit/media-core": "^34.3.0",
|
|
94
94
|
"@atlaskit/media-integration-test-helpers": "^3.1.0",
|
|
95
95
|
"@atlaskit/media-test-helpers": "^34.6.0",
|
|
96
96
|
"@atlaskit/modal-dialog": "^12.17.0",
|
|
97
97
|
"@atlaskit/primitives": "^13.2.0",
|
|
98
|
-
"@atlaskit/renderer": "^112.
|
|
98
|
+
"@atlaskit/renderer": "^112.6.0",
|
|
99
99
|
"@atlaskit/smart-card": "^30.3.0",
|
|
100
100
|
"@atlaskit/synchrony-test-helpers": "^2.5.0",
|
|
101
101
|
"@atlaskit/toggle": "^13.4.0",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"@atlaskit/visual-regression": "*",
|
|
104
104
|
"@atlassian/adf-schema-json": "^1.22.0",
|
|
105
105
|
"@atlassian/feature-flags-test-utils": "*",
|
|
106
|
-
"@atlassian/search-provider": "2.4.
|
|
106
|
+
"@atlassian/search-provider": "2.4.172",
|
|
107
107
|
"@emotion/jest": "^11.8.0",
|
|
108
108
|
"@storybook/addon-knobs": "^6.4.0",
|
|
109
109
|
"@testing-library/react": "^12.1.5",
|