@atlaskit/editor-plugin-extension 29.0.3 → 29.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/cjs/editor-actions/actions.js +9 -8
- package/dist/cjs/editor-commands/commands.js +28 -27
- package/dist/cjs/pm-plugins/extension-api.js +20 -19
- package/dist/cjs/pm-plugins/macro/actions.js +9 -8
- package/dist/cjs/pm-plugins/main.js +8 -7
- package/dist/cjs/pm-plugins/plugin-factory.js +2 -2
- package/dist/cjs/pm-plugins/toDOM-fixes/bodiedExtension.js +4 -4
- package/dist/cjs/pm-plugins/toolbar.js +41 -39
- package/dist/cjs/pm-plugins/unique-id.js +2 -2
- package/dist/cjs/pm-plugins/update-edit-button.js +2 -2
- package/dist/cjs/pm-plugins/utils.js +12 -11
- package/dist/cjs/ui/ConfigPanel/ConfigPanel.js +14 -12
- package/dist/cjs/ui/ConfigPanel/ConfigPanelFieldsLoader.js +3 -3
- package/dist/cjs/ui/ConfigPanel/Fields/ColorPicker.js +7 -6
- package/dist/cjs/ui/ConfigPanel/Fields/CustomSelect.js +2 -1
- package/dist/cjs/ui/ConfigPanel/Fields/UserSelect.js +2 -2
- package/dist/cjs/ui/ConfigPanel/FormContent.js +2 -2
- package/dist/cjs/ui/ConfigPanel/FormErrorBoundary.js +4 -3
- package/dist/cjs/ui/ConfigPanel/Header.js +2 -2
- package/dist/cjs/ui/ConfigPanel/LoadingState.js +2 -2
- package/dist/cjs/ui/ConfigPanel/transformers.js +16 -15
- package/dist/cjs/ui/SaveIndicator/SaveIndicator.js +2 -2
- package/dist/cjs/ui/context-panel.js +3 -3
- package/dist/cjs/ui/useConfigPanelPluginHook.js +5 -5
- package/dist/es2019/editor-actions/actions.js +2 -1
- package/dist/es2019/editor-commands/commands.js +3 -2
- package/dist/es2019/pm-plugins/extension-api.js +3 -2
- package/dist/es2019/pm-plugins/macro/actions.js +3 -2
- package/dist/es2019/pm-plugins/main.js +3 -2
- package/dist/es2019/pm-plugins/plugin-factory.js +1 -1
- package/dist/es2019/pm-plugins/toDOM-fixes/bodiedExtension.js +1 -1
- package/dist/es2019/pm-plugins/toolbar.js +7 -5
- package/dist/es2019/pm-plugins/unique-id.js +1 -1
- package/dist/es2019/pm-plugins/update-edit-button.js +1 -1
- package/dist/es2019/pm-plugins/utils.js +3 -2
- package/dist/es2019/ui/ConfigPanel/ConfigPanel.js +5 -3
- package/dist/es2019/ui/ConfigPanel/ConfigPanelFieldsLoader.js +2 -2
- package/dist/es2019/ui/ConfigPanel/Fields/ColorPicker.js +3 -2
- package/dist/es2019/ui/ConfigPanel/Fields/CustomSelect.js +2 -1
- package/dist/es2019/ui/ConfigPanel/Fields/UserSelect.js +1 -1
- package/dist/es2019/ui/ConfigPanel/FormContent.js +1 -1
- package/dist/es2019/ui/ConfigPanel/FormErrorBoundary.js +2 -1
- package/dist/es2019/ui/ConfigPanel/Header.js +2 -2
- package/dist/es2019/ui/ConfigPanel/LoadingState.js +1 -1
- package/dist/es2019/ui/ConfigPanel/transformers.js +2 -1
- package/dist/es2019/ui/SaveIndicator/SaveIndicator.js +1 -1
- package/dist/es2019/ui/context-panel.js +2 -2
- package/dist/es2019/ui/useConfigPanelPluginHook.js +2 -2
- package/dist/esm/editor-actions/actions.js +2 -1
- package/dist/esm/editor-commands/commands.js +3 -2
- package/dist/esm/pm-plugins/extension-api.js +3 -2
- package/dist/esm/pm-plugins/macro/actions.js +3 -2
- package/dist/esm/pm-plugins/main.js +3 -2
- package/dist/esm/pm-plugins/plugin-factory.js +1 -1
- package/dist/esm/pm-plugins/toDOM-fixes/bodiedExtension.js +1 -1
- package/dist/esm/pm-plugins/toolbar.js +7 -5
- package/dist/esm/pm-plugins/unique-id.js +1 -1
- package/dist/esm/pm-plugins/update-edit-button.js +1 -1
- package/dist/esm/pm-plugins/utils.js +3 -2
- package/dist/esm/ui/ConfigPanel/ConfigPanel.js +5 -3
- package/dist/esm/ui/ConfigPanel/ConfigPanelFieldsLoader.js +2 -2
- package/dist/esm/ui/ConfigPanel/Fields/ColorPicker.js +3 -2
- package/dist/esm/ui/ConfigPanel/Fields/CustomSelect.js +2 -1
- package/dist/esm/ui/ConfigPanel/Fields/UserSelect.js +1 -1
- package/dist/esm/ui/ConfigPanel/FormContent.js +1 -1
- package/dist/esm/ui/ConfigPanel/FormErrorBoundary.js +2 -1
- package/dist/esm/ui/ConfigPanel/Header.js +2 -2
- package/dist/esm/ui/ConfigPanel/LoadingState.js +1 -1
- package/dist/esm/ui/ConfigPanel/transformers.js +2 -1
- package/dist/esm/ui/SaveIndicator/SaveIndicator.js +1 -1
- package/dist/esm/ui/context-panel.js +2 -2
- package/dist/esm/ui/useConfigPanelPluginHook.js +2 -2
- package/dist/types/editor-actions/actions.d.ts +5 -5
- package/dist/types/editor-commands/commands.d.ts +6 -4
- package/dist/types/extensionPluginType.d.ts +20 -16
- package/dist/types/pm-plugins/extension-api.d.ts +2 -2
- package/dist/types/pm-plugins/keymap.d.ts +1 -1
- package/dist/types/pm-plugins/macro/actions.d.ts +3 -2
- package/dist/types/pm-plugins/macro/plugin.d.ts +1 -1
- package/dist/types/pm-plugins/macro/types.d.ts +1 -1
- package/dist/types/pm-plugins/main.d.ts +9 -6
- package/dist/types/pm-plugins/plugin-factory.d.ts +1 -1
- package/dist/types/pm-plugins/toolbar.d.ts +10 -8
- package/dist/types/pm-plugins/update-edit-button.d.ts +2 -1
- package/dist/types/pm-plugins/utils.d.ts +3 -3
- package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +6 -2
- package/dist/types/ui/ConfigPanel/ConfigPanelFieldsLoader.d.ts +5 -2
- package/dist/types/ui/ConfigPanel/DescriptionSummary.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/Fields/Boolean.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/Fields/CheckboxGroup.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/Fields/ColorPicker.d.ts +3 -3
- package/dist/types/ui/ConfigPanel/Fields/CustomSelect.d.ts +3 -1
- package/dist/types/ui/ConfigPanel/Fields/Date.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/Fields/DateRange.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/Fields/Enum.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/Fields/Expand.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/Fields/Fieldset.d.ts +3 -1
- package/dist/types/ui/ConfigPanel/Fields/Number.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/Fields/RadioGroup.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/Fields/Select.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/Fields/SelectItem.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/Fields/String.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/Fields/TabGroup.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/Fields/UnhandledType.d.ts +1 -1
- package/dist/types/ui/ConfigPanel/Fields/UserSelect.d.ts +2 -1
- package/dist/types/ui/ConfigPanel/FormErrorBoundary.d.ts +2 -2
- package/dist/types/ui/ConfigPanel/Header/HeaderAfterIconElement.d.ts +2 -1
- package/dist/types/ui/ConfigPanel/Header/HeaderIcon.d.ts +2 -1
- package/dist/types/ui/ConfigPanel/Header.d.ts +2 -2
- package/dist/types/ui/ConfigPanel/transformers.d.ts +3 -1
- package/dist/types/ui/ConfigPanel/types.d.ts +5 -3
- package/dist/types/ui/ConfigPanel/utils.d.ts +2 -1
- package/dist/types/ui/ConfigPanel/withExtensionManifest.d.ts +2 -1
- package/dist/types/ui/context-panel.d.ts +2 -1
- package/dist/types/ui/useConfigPanelPluginHook.d.ts +2 -2
- package/example-utils/config-panel/ConfigPanelWithExtensionPicker.tsx +4 -6
- package/example-utils/config-panel/ConfigPanelWithProviders.tsx +3 -3
- package/example-utils/config-panel/ExtensionNodePicker.tsx +3 -3
- package/example-utils/config-panel/FieldTypePicker.tsx +1 -1
- package/example-utils/config-panel/example-manifest-all-fields.ts +4 -3
- package/example-utils/config-panel/example-manifest-individual-fields.ts +4 -3
- package/example-utils/config-panel/fields.ts +1 -1
- package/package.json +2 -2
|
@@ -11,7 +11,8 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
11
11
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
12
12
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
13
13
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
14
|
-
var
|
|
14
|
+
var _extensionFieldsHelpers = require("@atlaskit/editor-common/extensions/extension-fields-helpers");
|
|
15
|
+
var _fieldDefinitions = require("@atlaskit/editor-common/extensions/field-definitions");
|
|
15
16
|
var _utils = require("./utils");
|
|
16
17
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
17
18
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
@@ -30,7 +31,7 @@ function extract(value, field, options) {
|
|
|
30
31
|
});
|
|
31
32
|
} else if (isOption(value)) {
|
|
32
33
|
return value.value;
|
|
33
|
-
} else if ((0,
|
|
34
|
+
} else if ((0, _fieldDefinitions.isDateRange)(value)) {
|
|
34
35
|
return value;
|
|
35
36
|
} else if (value !== undefined && field.type === 'number') {
|
|
36
37
|
if (value === '') {
|
|
@@ -50,9 +51,9 @@ var findDuplicateFields = exports.findDuplicateFields = function findDuplicateFi
|
|
|
50
51
|
var _findDuplicateFieldsInternal = function findDuplicateFieldsInternal(fields) {
|
|
51
52
|
var allowDuplicatesMap = {};
|
|
52
53
|
return fields.find(function (field) {
|
|
53
|
-
if ((0,
|
|
54
|
+
if ((0, _fieldDefinitions.isExpand)(field)) {
|
|
54
55
|
return _findDuplicateFieldsInternal(field.fields);
|
|
55
|
-
} else if ((0,
|
|
56
|
+
} else if ((0, _fieldDefinitions.isTabGroup)(field)) {
|
|
56
57
|
return field.fields.find(function (tabField) {
|
|
57
58
|
return _findDuplicateFieldsInternal(tabField.fields);
|
|
58
59
|
});
|
|
@@ -90,7 +91,7 @@ var serialize = exports.serialize = /*#__PURE__*/function () {
|
|
|
90
91
|
return _regenerator.default.wrap(function (_context) {
|
|
91
92
|
while (1) switch (_context.prev = _context.next) {
|
|
92
93
|
case 0:
|
|
93
|
-
if (!(0,
|
|
94
|
+
if (!(0, _fieldDefinitions.isTabGroup)(field)) {
|
|
94
95
|
_context.next = 2;
|
|
95
96
|
break;
|
|
96
97
|
}
|
|
@@ -102,7 +103,7 @@ var serialize = exports.serialize = /*#__PURE__*/function () {
|
|
|
102
103
|
_context.next = 9;
|
|
103
104
|
break;
|
|
104
105
|
case 2:
|
|
105
|
-
if (!(0,
|
|
106
|
+
if (!(0, _fieldDefinitions.isTabField)(field)) {
|
|
106
107
|
_context.next = 4;
|
|
107
108
|
break;
|
|
108
109
|
}
|
|
@@ -114,7 +115,7 @@ var serialize = exports.serialize = /*#__PURE__*/function () {
|
|
|
114
115
|
_context.next = 9;
|
|
115
116
|
break;
|
|
116
117
|
case 4:
|
|
117
|
-
if (!(0,
|
|
118
|
+
if (!(0, _fieldDefinitions.isExpand)(field)) {
|
|
118
119
|
_context.next = 6;
|
|
119
120
|
break;
|
|
120
121
|
}
|
|
@@ -126,7 +127,7 @@ var serialize = exports.serialize = /*#__PURE__*/function () {
|
|
|
126
127
|
_context.next = 9;
|
|
127
128
|
break;
|
|
128
129
|
case 6:
|
|
129
|
-
if (!((0,
|
|
130
|
+
if (!((0, _fieldDefinitions.isFieldset)(field) && depth === 0)) {
|
|
130
131
|
_context.next = 8;
|
|
131
132
|
break;
|
|
132
133
|
}
|
|
@@ -194,7 +195,7 @@ var serializeFieldset = /*#__PURE__*/function () {
|
|
|
194
195
|
while (1) switch (_context3.prev = _context3.next) {
|
|
195
196
|
case 0:
|
|
196
197
|
_context3.prev = 0;
|
|
197
|
-
fieldSerializer = (0,
|
|
198
|
+
fieldSerializer = (0, _extensionFieldsHelpers.getFieldSerializer)(manifest, field.options.transformer);
|
|
198
199
|
_context3.next = 2;
|
|
199
200
|
break;
|
|
200
201
|
case 1:
|
|
@@ -420,10 +421,10 @@ function injectDefaultValues(data, fields) {
|
|
|
420
421
|
var fieldIndex = copy.findIndex(function (item) {
|
|
421
422
|
return Object.entries(item)[0][0] === name;
|
|
422
423
|
});
|
|
423
|
-
if (fieldIndex >= 0 && !(0,
|
|
424
|
+
if (fieldIndex >= 0 && !(0, _fieldDefinitions.isFieldset)(field)) {
|
|
424
425
|
return 1; // continue
|
|
425
426
|
}
|
|
426
|
-
if ((0,
|
|
427
|
+
if ((0, _fieldDefinitions.isFieldset)(field)) {
|
|
427
428
|
var fieldsetFields = field.fields;
|
|
428
429
|
if (fieldIndex >= 0) {
|
|
429
430
|
var fieldValue = Object.entries(copy[fieldIndex])[0][1];
|
|
@@ -453,7 +454,7 @@ function injectDefaultValues(data, fields) {
|
|
|
453
454
|
*/
|
|
454
455
|
var flattenFields = function flattenFields(fields) {
|
|
455
456
|
var _flattenAccumulator = function flattenAccumulator(accumulator, field) {
|
|
456
|
-
if ((0,
|
|
457
|
+
if ((0, _fieldDefinitions.isTabGroup)(field)) {
|
|
457
458
|
if (field.hasGroupedValues) {
|
|
458
459
|
accumulator.push(field);
|
|
459
460
|
} else {
|
|
@@ -464,7 +465,7 @@ var flattenFields = function flattenFields(fields) {
|
|
|
464
465
|
}, []);
|
|
465
466
|
accumulator.push.apply(accumulator, (0, _toConsumableArray2.default)(flattenedTabs));
|
|
466
467
|
}
|
|
467
|
-
} else if ((0,
|
|
468
|
+
} else if ((0, _fieldDefinitions.isExpand)(field)) {
|
|
468
469
|
if (field.hasGroupedValues) {
|
|
469
470
|
accumulator.push(field);
|
|
470
471
|
} else {
|
|
@@ -524,11 +525,11 @@ var _deserialize = exports.deserialize = /*#__PURE__*/function () {
|
|
|
524
525
|
}
|
|
525
526
|
return _context8.abrupt("return", 0);
|
|
526
527
|
case 2:
|
|
527
|
-
if (!((0,
|
|
528
|
+
if (!((0, _fieldDefinitions.isFieldset)(field) && depth === 0)) {
|
|
528
529
|
_context8.next = 7;
|
|
529
530
|
break;
|
|
530
531
|
}
|
|
531
|
-
fieldDeserializer = (0,
|
|
532
|
+
fieldDeserializer = (0, _extensionFieldsHelpers.getFieldDeserializer)(manifest, field.options.transformer);
|
|
532
533
|
if (!fieldDeserializer) {
|
|
533
534
|
_context8.next = 7;
|
|
534
535
|
break;
|
|
@@ -9,7 +9,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
9
9
|
var _react = require("react");
|
|
10
10
|
var _react2 = require("@emotion/react");
|
|
11
11
|
var _reactIntl = require("react-intl");
|
|
12
|
-
var
|
|
12
|
+
var _messages = require("@atlaskit/editor-common/extensions/messages");
|
|
13
13
|
var _statusSuccess = _interopRequireDefault(require("@atlaskit/icon/core/status-success"));
|
|
14
14
|
var _primitives = require("@atlaskit/primitives");
|
|
15
15
|
/**
|
|
@@ -85,5 +85,5 @@ var SaveIndicator = exports.SaveIndicator = function SaveIndicator(_ref) {
|
|
|
85
85
|
}, (0, _react2.jsx)(_primitives.Text, null, (0, _react2.jsx)(_reactIntl.FormattedMessage
|
|
86
86
|
// Ignored via go/ees005
|
|
87
87
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
88
|
-
,
|
|
88
|
+
, _messages.messages.saveIndicator))))));
|
|
89
89
|
};
|
|
@@ -12,8 +12,8 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
|
12
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
13
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
14
14
|
var _react = _interopRequireDefault(require("react"));
|
|
15
|
-
var
|
|
16
|
-
var _selection = require("@atlaskit/editor-common/selection");
|
|
15
|
+
var _manifestHelpers = require("@atlaskit/editor-common/extensions/manifest-helpers");
|
|
16
|
+
var _selection = require("@atlaskit/editor-common/selection/gap-cursor/selection");
|
|
17
17
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
18
18
|
var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
|
|
19
19
|
var _actions = require("../editor-actions/actions");
|
|
@@ -68,7 +68,7 @@ var getContextPanel = exports.getContextPanel = function getContextPanel(getEdit
|
|
|
68
68
|
extensionType = _nodeWithPos$node$att.extensionType,
|
|
69
69
|
extensionKey = _nodeWithPos$node$att.extensionKey,
|
|
70
70
|
parameters = _nodeWithPos$node$att.parameters;
|
|
71
|
-
var _getExtensionKeyAndNo = (0,
|
|
71
|
+
var _getExtensionKeyAndNo = (0, _manifestHelpers.getExtensionKeyAndNodeKey)(extensionKey, extensionType),
|
|
72
72
|
_getExtensionKeyAndNo2 = (0, _slicedToArray2.default)(_getExtensionKeyAndNo, 2),
|
|
73
73
|
extKey = _getExtensionKeyAndNo2[0],
|
|
74
74
|
nodeKey = _getExtensionKeyAndNo2[1];
|
|
@@ -14,8 +14,8 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"))
|
|
|
14
14
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
15
15
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
16
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
|
-
var
|
|
18
|
-
var
|
|
17
|
+
var _manifestHelpers = require("@atlaskit/editor-common/extensions/manifest-helpers");
|
|
18
|
+
var _useSharedPluginStateWithSelector = require("@atlaskit/editor-common/useSharedPluginStateWithSelector");
|
|
19
19
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
20
20
|
var _commands = require("../editor-commands/commands");
|
|
21
21
|
var _pluginFactory = require("../pm-plugins/plugin-factory");
|
|
@@ -40,7 +40,7 @@ function useConfigPanelPluginHook(_ref) {
|
|
|
40
40
|
configPanelId = _ref.configPanelId,
|
|
41
41
|
api = _ref.api;
|
|
42
42
|
var editorState = editorView.state;
|
|
43
|
-
var _useSharedPluginState = (0,
|
|
43
|
+
var _useSharedPluginState = (0, _useSharedPluginStateWithSelector.useSharedPluginStateWithSelector)(api, ['extension'], selector),
|
|
44
44
|
showContextPanel = _useSharedPluginState.showContextPanel,
|
|
45
45
|
extensionProvider = _useSharedPluginState.extensionProvider,
|
|
46
46
|
processParametersAfter = _useSharedPluginState.processParametersAfter;
|
|
@@ -95,7 +95,7 @@ function showConfigPanel(_ref2) {
|
|
|
95
95
|
* Always get extensionKey from getExtensionKeyAndNodeKey to load
|
|
96
96
|
* extension manifest successfully.
|
|
97
97
|
*/
|
|
98
|
-
var _getExtensionKeyAndNo = (0,
|
|
98
|
+
var _getExtensionKeyAndNo = (0, _manifestHelpers.getExtensionKeyAndNodeKey)(extensionKey, extensionType),
|
|
99
99
|
_getExtensionKeyAndNo2 = (0, _slicedToArray2.default)(_getExtensionKeyAndNo, 2),
|
|
100
100
|
extKey = _getExtensionKeyAndNo2[0],
|
|
101
101
|
_ = _getExtensionKeyAndNo2[1];
|
|
@@ -224,7 +224,7 @@ var getContextPanelBodyComponent = exports.getContextPanelBodyComponent = functi
|
|
|
224
224
|
extensionType = _nodeWithPos$node$att.extensionType,
|
|
225
225
|
extensionKey = _nodeWithPos$node$att.extensionKey,
|
|
226
226
|
parameters = _nodeWithPos$node$att.parameters;
|
|
227
|
-
var _getExtensionKeyAndNo3 = (0,
|
|
227
|
+
var _getExtensionKeyAndNo3 = (0, _manifestHelpers.getExtensionKeyAndNodeKey)(extensionKey, extensionType),
|
|
228
228
|
_getExtensionKeyAndNo4 = (0, _slicedToArray2.default)(_getExtensionKeyAndNo3, 2),
|
|
229
229
|
extKey = _getExtensionKeyAndNo4[0],
|
|
230
230
|
nodeKey = _getExtensionKeyAndNo4[1];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD
|
|
1
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
2
|
+
import { TARGET_SELECTION_SOURCE } from '@atlaskit/editor-common/analytics/types/extension-events';
|
|
2
3
|
|
|
3
4
|
// oxlint-disable-next-line import/no-duplicates
|
|
4
5
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE
|
|
2
|
-
import {
|
|
1
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
2
|
+
import { TARGET_SELECTION_SOURCE } from '@atlaskit/editor-common/analytics/types/extension-events';
|
|
3
|
+
import { removeConnectedNodes } from '@atlaskit/editor-common/utils/referentiality';
|
|
3
4
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
4
5
|
import { findParentNodeOfType, removeParentNodeOfType, removeSelectedNode } from '@atlaskit/editor-prosemirror/utils';
|
|
5
6
|
import { createCommand } from '../pm-plugins/plugin-factory';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { validator } from '@atlaskit/adf-utils/validator';
|
|
2
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import { autoJoinTr
|
|
2
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
3
|
+
import { autoJoinTr } from '@atlaskit/editor-common/utils/autojoin';
|
|
4
|
+
import { nodeToJSON } from '@atlaskit/editor-common/utils/nodes';
|
|
4
5
|
import { JSONTransformer } from '@atlaskit/editor-json-transformer/JSONTransformer-2';
|
|
5
6
|
import { Fragment, Mark } from '@atlaskit/editor-prosemirror/model';
|
|
6
7
|
import { NodeSelection, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import assert from 'assert';
|
|
2
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD
|
|
2
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
3
|
+
import { TARGET_SELECTION_SOURCE } from '@atlaskit/editor-common/analytics/types/extension-events';
|
|
3
4
|
import { normaliseNestedLayout } from '@atlaskit/editor-common/insert';
|
|
4
|
-
import { getValidNode } from '@atlaskit/editor-common/validator';
|
|
5
|
+
import { getValidNode } from '@atlaskit/editor-common/utils/validator';
|
|
5
6
|
import { NodeSelection, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
6
7
|
import { findSelectedNodeOfType, replaceParentNodeOfType, replaceSelectedNode, safeInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
7
8
|
import { getPluginState as getExtensionPluginState } from '../plugin-factory';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ExtensionNodeView from '@atlaskit/editor-common/extensionNodeView';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
-
import {
|
|
3
|
+
import { createSelectionClickHandler, isSelectionAtEndOfNode, isSelectionAtStartOfNode } from '@atlaskit/editor-common/selection';
|
|
4
|
+
import { GapCursorSelection } from '@atlaskit/editor-common/selection/gap-cursor/selection';
|
|
4
5
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
5
6
|
import { findParentNodeOfTypeClosestToPos, findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
6
7
|
import { clearEditingContext, updateState } from '../editor-commands/commands';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { pluginFactory } from '@atlaskit/editor-common/utils';
|
|
1
|
+
import { pluginFactory } from '@atlaskit/editor-common/utils/plugin-state-factory';
|
|
2
2
|
import { pluginKey } from './plugin-key';
|
|
3
3
|
import reducer from './reducer';
|
|
4
4
|
const factory = pluginFactory(pluginKey, reducer, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { bodiedExtension } from '@atlaskit/adf-schema/bodied-extension';
|
|
2
|
-
import { convertToInlineCss } from '@atlaskit/editor-common/
|
|
2
|
+
import { convertToInlineCss } from '@atlaskit/editor-common/css-helper';
|
|
3
3
|
const capitalizeFirstLetter = str => {
|
|
4
4
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
5
5
|
};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { INPUT_METHOD, ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import {
|
|
2
|
+
import { INPUT_METHOD, ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics/types/enums';
|
|
3
|
+
import { isOfflineMode } from '@atlaskit/editor-common/connectivity/isOfflineMode';
|
|
4
|
+
import { AGENT_MANAGED_EXTENSION_KEY, NATIVE_EMBED_EXTENSION_KEY, NATIVE_EMBED_EXTENSION_TYPE } from '@atlaskit/editor-common/extensions/manifest-helpers';
|
|
5
|
+
import { messages } from '@atlaskit/editor-common/extensions/messages';
|
|
4
6
|
import commonMessages from '@atlaskit/editor-common/messages';
|
|
5
|
-
import { BODIED_EXT_MBE_MARGIN_TOP } from '@atlaskit/editor-common/styles';
|
|
7
|
+
import { BODIED_EXT_MBE_MARGIN_TOP } from '@atlaskit/editor-common/styles/extension';
|
|
6
8
|
import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-check';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
+
import { getNodeName } from '@atlaskit/editor-common/utils';
|
|
10
|
+
import { getChildrenInfo, isReferencedSource } from '@atlaskit/editor-common/utils/referentiality';
|
|
9
11
|
import { findParentNodeOfType, hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
10
12
|
import ContentWidthNarrowIcon from '@atlaskit/icon/core/content-width-narrow';
|
|
11
13
|
import ContentWidthWideIcon from '@atlaskit/icon/core/content-width-wide';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SetAttrsStep } from '@atlaskit/adf-schema/steps/set-attrs';
|
|
2
2
|
import { uuid } from '@atlaskit/adf-schema/uuid';
|
|
3
3
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
|
-
import { stepAddsOneOf } from '@atlaskit/editor-common/utils';
|
|
4
|
+
import { stepAddsOneOf } from '@atlaskit/editor-common/utils/editor-core-utils';
|
|
5
5
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
const pluginKey = new PluginKey('extensionUniqueIdPlugin');
|
|
7
7
|
const createPlugin = () => new SafePlugin({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getExtensionModuleNode } from '@atlaskit/editor-common/extensions';
|
|
1
|
+
import { getExtensionModuleNode } from '@atlaskit/editor-common/extensions/extension-handlers';
|
|
2
2
|
import { updateState } from '../editor-commands/commands';
|
|
3
3
|
import { getSelectedExtension } from './utils';
|
|
4
4
|
const maybeGetExtensionModuleNode = async (view, extensionProvider) => {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
1
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
2
2
|
import { copyToClipboard } from '@atlaskit/editor-common/clipboard';
|
|
3
|
-
import { closestElement
|
|
3
|
+
import { closestElement } from '@atlaskit/editor-common/utils/dom';
|
|
4
|
+
import { findNodePosByLocalIds } from '@atlaskit/editor-common/utils/nodes-by-localIds';
|
|
4
5
|
import { JSONTransformer } from '@atlaskit/editor-json-transformer/JSONTransformer-2';
|
|
5
6
|
import { findDomRefAtPos, findParentNodeOfType, findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
6
7
|
import { isResolvingMentionProvider } from '@atlaskit/mention/is-resolving-mention-provider';
|
|
@@ -11,9 +11,11 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
11
11
|
import { getDocument } from '@atlaskit/browser-apis';
|
|
12
12
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
13
13
|
import Button from '@atlaskit/button/default/button';
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
14
|
+
import { fireAnalyticsEvent } from '@atlaskit/editor-common/analytics/fire-analytics-event';
|
|
15
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
16
|
+
import { configPanelMessages as messages } from '@atlaskit/editor-common/extensions';
|
|
17
|
+
import { isTabGroup } from '@atlaskit/editor-common/extensions/field-definitions';
|
|
18
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
17
19
|
import Form from '@atlaskit/form/form';
|
|
18
20
|
import { FormFooter } from '@atlaskit/form/form-footer';
|
|
19
21
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import { bind } from 'bind-event-listener';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { isOfflineMode } from '@atlaskit/editor-common/connectivity/isOfflineMode';
|
|
4
|
+
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/useSharedPluginStateSelector';
|
|
5
5
|
import ConfigPanel from './ConfigPanel';
|
|
6
6
|
import { useStateFromPromise } from './use-state-from-promise';
|
|
7
7
|
const getFieldsDefinitionFn = (extensionManifest, nodeKey) => {
|
|
@@ -6,8 +6,9 @@ import { Fragment } from 'react';
|
|
|
6
6
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
|
-
import { chartsColorPaletteTooltipMessages
|
|
10
|
-
import {
|
|
9
|
+
import { chartsColorPaletteTooltipMessages } from '@atlaskit/editor-common/ui-color/ColorPalette/paletteMessagesTokenModeNames';
|
|
10
|
+
import { DEFAULT_BORDER_COLOR } from '@atlaskit/editor-common/ui-color/ColorPalette/Palettes/common';
|
|
11
|
+
import ColorPickerButton from '@atlaskit/editor-common/ui-menu/ColorPickerButton';
|
|
11
12
|
import Field from '@atlaskit/form/field';
|
|
12
13
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
13
14
|
import FieldMessages from '../FieldMessages';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useEffect, useState } from 'react';
|
|
3
3
|
import { injectIntl } from 'react-intl';
|
|
4
|
-
import {
|
|
4
|
+
import { configPanelMessages as messages } from '@atlaskit/editor-common/extensions';
|
|
5
|
+
import { getCustomFieldResolver } from '@atlaskit/editor-common/extensions/extension-fields-helpers';
|
|
5
6
|
import Field from '@atlaskit/form/field';
|
|
6
7
|
import AsyncCreatableSelect from '@atlaskit/select/async-creatable-select';
|
|
7
8
|
import FieldMessages from '../FieldMessages';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useEffect, useState } from 'react';
|
|
3
|
-
import { getUserFieldContextProvider } from '@atlaskit/editor-common/extensions';
|
|
3
|
+
import { getUserFieldContextProvider } from '@atlaskit/editor-common/extensions/extension-fields-helpers';
|
|
4
4
|
import Field from '@atlaskit/form/field';
|
|
5
5
|
import SmartUserPicker from '@atlaskit/smart-user-picker/components';
|
|
6
6
|
import hydrateDefaultValues from '@atlaskit/smart-user-picker/default-value-hydration-client';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { isFieldset } from '@atlaskit/editor-common/extensions';
|
|
2
|
+
import { isFieldset } from '@atlaskit/editor-common/extensions/field-definitions';
|
|
3
3
|
import Boolean from './Fields/Boolean';
|
|
4
4
|
import ColorPicker from './Fields/ColorPicker';
|
|
5
5
|
import CustomSelect from './Fields/CustomSelect';
|
|
@@ -3,7 +3,8 @@ import React from 'react';
|
|
|
3
3
|
import { injectIntl } from 'react-intl';
|
|
4
4
|
import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext';
|
|
5
5
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
6
|
-
import {
|
|
6
|
+
import { editorAnalyticsChannel } from '@atlaskit/editor-common/analytics';
|
|
7
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
7
8
|
import { configPanelMessages as messages } from '@atlaskit/editor-common/extensions';
|
|
8
9
|
import { Stack, Text } from '@atlaskit/primitives/compiled';
|
|
9
10
|
import SectionMessage from '@atlaskit/section-message/message';
|
|
@@ -8,10 +8,10 @@ import { Fragment, lazy, Suspense, useMemo } from 'react';
|
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import { injectIntl } from 'react-intl';
|
|
10
10
|
import IconButton from '@atlaskit/button/icon/button';
|
|
11
|
+
import { configPanelMessages as messages } from '@atlaskit/editor-common/extensions';
|
|
11
12
|
// oxlint-disable-next-line import/no-duplicates
|
|
12
13
|
|
|
13
|
-
import {
|
|
14
|
-
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
14
|
+
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles/constants';
|
|
15
15
|
import CrossIcon from '@atlaskit/icon/core/cross';
|
|
16
16
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
17
17
|
import { Box, Text, xcss } from '@atlaskit/primitives';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
7
7
|
import { css, jsx } from '@emotion/react';
|
|
8
8
|
import { injectIntl } from 'react-intl';
|
|
9
|
-
import { messages } from '@atlaskit/editor-common/extensions';
|
|
9
|
+
import { messages } from '@atlaskit/editor-common/extensions/messages';
|
|
10
10
|
import SectionMessage from '@atlaskit/section-message/message';
|
|
11
11
|
import Spinner from '@atlaskit/spinner/spinner';
|
|
12
12
|
const spinnerWrapperStyles = css({
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { getFieldDeserializer, getFieldSerializer
|
|
1
|
+
import { getFieldDeserializer, getFieldSerializer } from '@atlaskit/editor-common/extensions/extension-fields-helpers';
|
|
2
|
+
import { isDateRange, isExpand, isFieldset, isTabField, isTabGroup } from '@atlaskit/editor-common/extensions/field-definitions';
|
|
2
3
|
import { getNameFromDuplicateField, isDuplicateField } from './utils';
|
|
3
4
|
const isOption = option => {
|
|
4
5
|
return option && typeof option === 'object' && 'label' in option && 'value' in option;
|
|
@@ -7,7 +7,7 @@ import { Fragment, useCallback, useEffect, useRef, useState } from 'react';
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import { FormattedMessage } from 'react-intl';
|
|
10
|
-
import { messages } from '@atlaskit/editor-common/extensions';
|
|
10
|
+
import { messages } from '@atlaskit/editor-common/extensions/messages';
|
|
11
11
|
import CheckCircleIcon from '@atlaskit/icon/core/status-success';
|
|
12
12
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
13
13
|
import { Box, Text, xcss } from '@atlaskit/primitives';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { getExtensionKeyAndNodeKey } from '@atlaskit/editor-common/extensions';
|
|
3
|
-
import { GapCursorSelection } from '@atlaskit/editor-common/selection';
|
|
2
|
+
import { getExtensionKeyAndNodeKey } from '@atlaskit/editor-common/extensions/manifest-helpers';
|
|
3
|
+
import { GapCursorSelection } from '@atlaskit/editor-common/selection/gap-cursor/selection';
|
|
4
4
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
6
6
|
import { buildExtensionNode } from '../editor-actions/actions';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
|
-
import { getExtensionKeyAndNodeKey } from '@atlaskit/editor-common/extensions';
|
|
3
|
-
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/
|
|
2
|
+
import { getExtensionKeyAndNodeKey } from '@atlaskit/editor-common/extensions/manifest-helpers';
|
|
3
|
+
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
4
4
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
5
5
|
import { clearEditingContext, forceAutoSave } from '../editor-commands/commands';
|
|
6
6
|
import { getPluginState } from '../pm-plugins/plugin-factory';
|
|
@@ -3,7 +3,8 @@ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
|
3
3
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
4
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
5
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD
|
|
6
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
7
|
+
import { TARGET_SELECTION_SOURCE } from '@atlaskit/editor-common/analytics/types/extension-events';
|
|
7
8
|
|
|
8
9
|
// oxlint-disable-next-line import/no-duplicates
|
|
9
10
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE
|
|
5
|
-
import {
|
|
4
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
|
|
5
|
+
import { TARGET_SELECTION_SOURCE } from '@atlaskit/editor-common/analytics/types/extension-events';
|
|
6
|
+
import { removeConnectedNodes } from '@atlaskit/editor-common/utils/referentiality';
|
|
6
7
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
7
8
|
import { findParentNodeOfType, removeParentNodeOfType, removeSelectedNode } from '@atlaskit/editor-prosemirror/utils';
|
|
8
9
|
import { createCommand } from '../pm-plugins/plugin-factory';
|
|
@@ -3,8 +3,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
import { validator } from '@atlaskit/adf-utils/validator';
|
|
6
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
7
|
-
import { autoJoinTr
|
|
6
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
7
|
+
import { autoJoinTr } from '@atlaskit/editor-common/utils/autojoin';
|
|
8
|
+
import { nodeToJSON } from '@atlaskit/editor-common/utils/nodes';
|
|
8
9
|
import { JSONTransformer } from '@atlaskit/editor-json-transformer/JSONTransformer-2';
|
|
9
10
|
import { Fragment, Mark } from '@atlaskit/editor-prosemirror/model';
|
|
10
11
|
import { NodeSelection, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
@@ -4,9 +4,10 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
6
6
|
import assert from 'assert';
|
|
7
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD
|
|
7
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
8
|
+
import { TARGET_SELECTION_SOURCE } from '@atlaskit/editor-common/analytics/types/extension-events';
|
|
8
9
|
import { normaliseNestedLayout } from '@atlaskit/editor-common/insert';
|
|
9
|
-
import { getValidNode } from '@atlaskit/editor-common/validator';
|
|
10
|
+
import { getValidNode } from '@atlaskit/editor-common/utils/validator';
|
|
10
11
|
import { NodeSelection, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
11
12
|
import { findSelectedNodeOfType, replaceParentNodeOfType, replaceSelectedNode, safeInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
12
13
|
import { getPluginState as getExtensionPluginState } from '../plugin-factory';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
2
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
3
3
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
|
-
import
|
|
4
|
+
import ExtensionNodeView from '@atlaskit/editor-common/extensionNodeView';
|
|
5
5
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
6
|
-
import {
|
|
6
|
+
import { createSelectionClickHandler, isSelectionAtEndOfNode, isSelectionAtStartOfNode } from '@atlaskit/editor-common/selection';
|
|
7
|
+
import { GapCursorSelection } from '@atlaskit/editor-common/selection/gap-cursor/selection';
|
|
7
8
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
8
9
|
import { findParentNodeOfTypeClosestToPos, findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
9
10
|
import { clearEditingContext, updateState } from '../editor-commands/commands';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
import { pluginFactory } from '@atlaskit/editor-common/utils';
|
|
4
|
+
import { pluginFactory } from '@atlaskit/editor-common/utils/plugin-state-factory';
|
|
5
5
|
import { pluginKey } from './plugin-key';
|
|
6
6
|
import reducer from './reducer';
|
|
7
7
|
var factory = pluginFactory(pluginKey, reducer, {
|
|
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
import { bodiedExtension } from '@atlaskit/adf-schema/bodied-extension';
|
|
5
|
-
import { convertToInlineCss } from '@atlaskit/editor-common/
|
|
5
|
+
import { convertToInlineCss } from '@atlaskit/editor-common/css-helper';
|
|
6
6
|
var capitalizeFirstLetter = function capitalizeFirstLetter(str) {
|
|
7
7
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
8
8
|
};
|
|
@@ -3,13 +3,15 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import { INPUT_METHOD, ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
7
|
-
import {
|
|
6
|
+
import { INPUT_METHOD, ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics/types/enums';
|
|
7
|
+
import { isOfflineMode } from '@atlaskit/editor-common/connectivity/isOfflineMode';
|
|
8
|
+
import { AGENT_MANAGED_EXTENSION_KEY, NATIVE_EMBED_EXTENSION_KEY, NATIVE_EMBED_EXTENSION_TYPE } from '@atlaskit/editor-common/extensions/manifest-helpers';
|
|
9
|
+
import { messages } from '@atlaskit/editor-common/extensions/messages';
|
|
8
10
|
import commonMessages from '@atlaskit/editor-common/messages';
|
|
9
|
-
import { BODIED_EXT_MBE_MARGIN_TOP } from '@atlaskit/editor-common/styles';
|
|
11
|
+
import { BODIED_EXT_MBE_MARGIN_TOP } from '@atlaskit/editor-common/styles/extension';
|
|
10
12
|
import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-check';
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
+
import { getNodeName } from '@atlaskit/editor-common/utils';
|
|
14
|
+
import { getChildrenInfo as _getChildrenInfo, isReferencedSource } from '@atlaskit/editor-common/utils/referentiality';
|
|
13
15
|
import { findParentNodeOfType, hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
14
16
|
import ContentWidthNarrowIcon from '@atlaskit/icon/core/content-width-narrow';
|
|
15
17
|
import ContentWidthWideIcon from '@atlaskit/icon/core/content-width-wide';
|
|
@@ -4,7 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
import { SetAttrsStep } from '@atlaskit/adf-schema/steps/set-attrs';
|
|
5
5
|
import { uuid } from '@atlaskit/adf-schema/uuid';
|
|
6
6
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
7
|
-
import { stepAddsOneOf } from '@atlaskit/editor-common/utils';
|
|
7
|
+
import { stepAddsOneOf } from '@atlaskit/editor-common/utils/editor-core-utils';
|
|
8
8
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
9
9
|
var pluginKey = new PluginKey('extensionUniqueIdPlugin');
|
|
10
10
|
var createPlugin = function createPlugin() {
|