@atlaskit/editor-plugin-extension 20.0.9 → 21.0.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 +22 -0
- package/dist/cjs/pm-plugins/toolbar.js +1 -2
- package/dist/cjs/ui/ConfigPanel/ConfigPanel.js +3 -15
- package/dist/cjs/ui/ConfigPanel/ConfigPanelFieldsLoader.js +1 -4
- package/dist/cjs/ui/ConfigPanel/FormContent.js +5 -9
- package/dist/cjs/ui/ConfigPanel/LoadingState.js +1 -11
- package/dist/es2019/pm-plugins/toolbar.js +1 -2
- package/dist/es2019/ui/ConfigPanel/ConfigPanel.js +1 -8
- package/dist/es2019/ui/ConfigPanel/ConfigPanelFieldsLoader.js +1 -4
- package/dist/es2019/ui/ConfigPanel/FormContent.js +7 -11
- package/dist/es2019/ui/ConfigPanel/LoadingState.js +1 -9
- package/dist/esm/pm-plugins/toolbar.js +1 -2
- package/dist/esm/ui/ConfigPanel/ConfigPanel.js +3 -15
- package/dist/esm/ui/ConfigPanel/ConfigPanelFieldsLoader.js +1 -4
- package/dist/esm/ui/ConfigPanel/FormContent.js +5 -9
- package/dist/esm/ui/ConfigPanel/LoadingState.js +1 -11
- package/package.json +15 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-extension
|
|
2
2
|
|
|
3
|
+
## 21.0.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 20.0.11
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 20.0.10
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [`962e8dc0188bf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/962e8dc0188bf) -
|
|
20
|
+
Clean up `platform_editor_offline_editing_web` with `isEnabled: true` for Confluence, keeping
|
|
21
|
+
offline editing and recovery behavior enabled. Remove the retired experiment from the editor
|
|
22
|
+
Statsig configuration; consumers must stop querying or overriding this experiment.
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
|
|
3
25
|
## 20.0.9
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
|
@@ -23,7 +23,6 @@ var _edit = _interopRequireDefault(require("@atlaskit/icon/core/edit"));
|
|
|
23
23
|
var _expandHorizontal = _interopRequireDefault(require("@atlaskit/icon/core/expand-horizontal"));
|
|
24
24
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
25
25
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
26
|
-
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
27
26
|
var _actions = require("../editor-actions/actions");
|
|
28
27
|
var _commands = require("../editor-commands/commands");
|
|
29
28
|
var _pluginKey = require("./macro/plugin-key");
|
|
@@ -361,7 +360,7 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(_ref
|
|
|
361
360
|
var applyChangeToContextPanel = extensionApi === null || extensionApi === void 0 || (_extensionApi$context = extensionApi.contextPanel) === null || _extensionApi$context === void 0 ? void 0 : _extensionApi$context.actions.applyChange;
|
|
362
361
|
var editorAnalyticsAPI = extensionApi === null || extensionApi === void 0 || (_extensionApi$analyti2 = extensionApi.analytics) === null || _extensionApi$analyti2 === void 0 ? void 0 : _extensionApi$analyti2.actions;
|
|
363
362
|
var nodeType = [state.schema.nodes.extension, state.schema.nodes.inlineExtension, state.schema.nodes.bodiedExtension, state.schema.nodes.multiBodiedExtension];
|
|
364
|
-
var editButtonItems = editButton(formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI, (0,
|
|
363
|
+
var editButtonItems = editButton(formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI, (0, _editorPluginConnectivity.isOfflineMode)(extensionApi === null || extensionApi === void 0 || (_extensionApi$connect = extensionApi.connectivity) === null || _extensionApi$connect === void 0 || (_extensionApi$connect = _extensionApi$connect.sharedState) === null || _extensionApi$connect === void 0 || (_extensionApi$connect = _extensionApi$connect.currentState()) === null || _extensionApi$connect === void 0 ? void 0 : _extensionApi$connect.mode), extensionApi);
|
|
365
364
|
var breakoutItems = breakoutOptions(state, formatMessage, extensionState, breakoutEnabled, editorAnalyticsAPI, extensionApi);
|
|
366
365
|
var extensionObj = (0, _utils3.getSelectedExtension)(state, true);
|
|
367
366
|
|
|
@@ -32,7 +32,6 @@ var _hooks = require("@atlaskit/editor-common/hooks");
|
|
|
32
32
|
var _form = _interopRequireDefault(require("@atlaskit/form/form"));
|
|
33
33
|
var _formFooter = require("@atlaskit/form/form-footer");
|
|
34
34
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
35
|
-
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
36
35
|
var _constants = require("./constants");
|
|
37
36
|
var _DescriptionSummary = require("./DescriptionSummary");
|
|
38
37
|
var _ErrorMessage = _interopRequireDefault(require("./ErrorMessage"));
|
|
@@ -216,33 +215,22 @@ var ConfigPanel = /*#__PURE__*/function (_React$Component) {
|
|
|
216
215
|
return (0, _transformers.serialize)(extensionManifest, _this.backfillTabFormData(fields, formData, _this.state.currentParameters), fields);
|
|
217
216
|
case 2:
|
|
218
217
|
serializedData = _context.sent;
|
|
219
|
-
if (!(0, _editorExperiment.editorExperiment)('platform_editor_offline_editing_web', true, {
|
|
220
|
-
exposure: true
|
|
221
|
-
})) {
|
|
222
|
-
_context.next = 4;
|
|
223
|
-
break;
|
|
224
|
-
}
|
|
225
218
|
_context.next = 3;
|
|
226
219
|
return onChange(serializedData);
|
|
227
220
|
case 3:
|
|
228
221
|
_context.next = 5;
|
|
229
222
|
break;
|
|
230
223
|
case 4:
|
|
231
|
-
|
|
232
|
-
case 5:
|
|
233
|
-
_context.next = 7;
|
|
234
|
-
break;
|
|
235
|
-
case 6:
|
|
236
|
-
_context.prev = 6;
|
|
224
|
+
_context.prev = 4;
|
|
237
225
|
_t = _context["catch"](1);
|
|
238
226
|
autoSaveReject === null || autoSaveReject === void 0 || autoSaveReject(_t);
|
|
239
227
|
// eslint-disable-next-line no-console
|
|
240
228
|
console.error("Error serializing parameters", _t);
|
|
241
|
-
case
|
|
229
|
+
case 5:
|
|
242
230
|
case "end":
|
|
243
231
|
return _context.stop();
|
|
244
232
|
}
|
|
245
|
-
}, _callee, null, [[1,
|
|
233
|
+
}, _callee, null, [[1, 4]]);
|
|
246
234
|
}));
|
|
247
235
|
return function (_x) {
|
|
248
236
|
return _ref3.apply(this, arguments);
|
|
@@ -11,7 +11,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
var _bindEventListener = require("bind-event-listener");
|
|
12
12
|
var _useSharedPluginStateSelector = require("@atlaskit/editor-common/use-shared-plugin-state-selector");
|
|
13
13
|
var _editorPluginConnectivity = require("@atlaskit/editor-plugin-connectivity");
|
|
14
|
-
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
15
14
|
var _ConfigPanel = _interopRequireDefault(require("./ConfigPanel"));
|
|
16
15
|
var _useStateFromPromise3 = require("./use-state-from-promise");
|
|
17
16
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
@@ -129,9 +128,7 @@ function FieldsLoader(_ref) {
|
|
|
129
128
|
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
130
129
|
errorMessage = _useState6[0],
|
|
131
130
|
setErrorMessage = _useState6[1];
|
|
132
|
-
var connectivityState = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'connectivity.mode'
|
|
133
|
-
disabled: (0, _editorExperiment.editorExperiment)('platform_editor_offline_editing_web', false)
|
|
134
|
-
});
|
|
131
|
+
var connectivityState = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(api, 'connectivity.mode');
|
|
135
132
|
return /*#__PURE__*/_react.default.createElement(FieldDefinitionsPromiseResolver, {
|
|
136
133
|
setErrorMessage: setErrorMessage,
|
|
137
134
|
extensionManifest: extensionManifest,
|
|
@@ -9,7 +9,6 @@ exports.default = FormContent;
|
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
var _extensions = require("@atlaskit/editor-common/extensions");
|
|
12
|
-
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
13
12
|
var _Boolean = _interopRequireDefault(require("./Fields/Boolean"));
|
|
14
13
|
var _ColorPicker = _interopRequireDefault(require("./Fields/ColorPicker"));
|
|
15
14
|
var _CustomSelect = _interopRequireDefault(require("./Fields/CustomSelect"));
|
|
@@ -204,15 +203,12 @@ function FormContent(_ref3) {
|
|
|
204
203
|
contextIdentifierProvider = _ref3.contextIdentifierProvider,
|
|
205
204
|
featureFlags = _ref3.featureFlags,
|
|
206
205
|
isDisabled = _ref3.isDisabled;
|
|
207
|
-
var mappedFields = fields
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
return _objectSpread(_objectSpread({}, field), {}, {
|
|
212
|
-
isDisabled: (_field$isDisabled = field.isDisabled) !== null && _field$isDisabled !== void 0 ? _field$isDisabled : isDisabled
|
|
213
|
-
});
|
|
206
|
+
var mappedFields = fields.map(function (field) {
|
|
207
|
+
var _field$isDisabled;
|
|
208
|
+
return _objectSpread(_objectSpread({}, field), {}, {
|
|
209
|
+
isDisabled: (_field$isDisabled = field.isDisabled) !== null && _field$isDisabled !== void 0 ? _field$isDisabled : isDisabled
|
|
214
210
|
});
|
|
215
|
-
}
|
|
211
|
+
});
|
|
216
212
|
return /*#__PURE__*/_react.default.createElement(_FormErrorBoundary.FormErrorBoundary, {
|
|
217
213
|
contextIdentifierProvider: contextIdentifierProvider,
|
|
218
214
|
extensionKey: extensionManifest.key,
|
|
@@ -10,7 +10,6 @@ var _reactIntl = require("react-intl");
|
|
|
10
10
|
var _extensions = require("@atlaskit/editor-common/extensions");
|
|
11
11
|
var _message = _interopRequireDefault(require("@atlaskit/section-message/message"));
|
|
12
12
|
var _spinner = _interopRequireDefault(require("@atlaskit/spinner/spinner"));
|
|
13
|
-
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
14
13
|
/**
|
|
15
14
|
* @jsxRuntime classic
|
|
16
15
|
* @jsx jsx
|
|
@@ -43,16 +42,7 @@ var LoadingStateWithErrorHandling = (0, _reactIntl.injectIntl)(function (props)
|
|
|
43
42
|
interactionName: "config-panel-spinner"
|
|
44
43
|
}));
|
|
45
44
|
});
|
|
46
|
-
var LoadingStateWithoutErrorHandling = function LoadingStateWithoutErrorHandling() {
|
|
47
|
-
return (0, _react.jsx)("div", {
|
|
48
|
-
css: spinnerWrapperStyles,
|
|
49
|
-
"data-testid": "ConfigPanelLoading"
|
|
50
|
-
}, (0, _react.jsx)(_spinner.default, {
|
|
51
|
-
size: "small",
|
|
52
|
-
interactionName: "config-panel-spinner"
|
|
53
|
-
}));
|
|
54
|
-
};
|
|
55
45
|
var LoadingState = function LoadingState(props) {
|
|
56
|
-
return
|
|
46
|
+
return LoadingStateWithErrorHandling(props);
|
|
57
47
|
};
|
|
58
48
|
var _default = exports.default = LoadingState;
|
|
@@ -14,7 +14,6 @@ import EditIcon from '@atlaskit/icon/core/edit';
|
|
|
14
14
|
import ExpandHorizontalIcon from '@atlaskit/icon/core/expand-horizontal';
|
|
15
15
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
16
16
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
17
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
18
17
|
import { editExtension } from '../editor-actions/actions';
|
|
19
18
|
import { removeDescendantNodes, removeExtension, updateExtensionLayout } from '../editor-commands/commands';
|
|
20
19
|
import { pluginKey as macroPluginKey } from './macro/plugin-key';
|
|
@@ -365,7 +364,7 @@ export const getToolbarConfig = ({
|
|
|
365
364
|
const applyChangeToContextPanel = extensionApi === null || extensionApi === void 0 ? void 0 : (_extensionApi$context = extensionApi.contextPanel) === null || _extensionApi$context === void 0 ? void 0 : _extensionApi$context.actions.applyChange;
|
|
366
365
|
const editorAnalyticsAPI = extensionApi === null || extensionApi === void 0 ? void 0 : (_extensionApi$analyti2 = extensionApi.analytics) === null || _extensionApi$analyti2 === void 0 ? void 0 : _extensionApi$analyti2.actions;
|
|
367
366
|
const nodeType = [state.schema.nodes.extension, state.schema.nodes.inlineExtension, state.schema.nodes.bodiedExtension, state.schema.nodes.multiBodiedExtension];
|
|
368
|
-
const editButtonItems = editButton(formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI,
|
|
367
|
+
const editButtonItems = editButton(formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI, isOfflineMode(extensionApi === null || extensionApi === void 0 ? void 0 : (_extensionApi$connect = extensionApi.connectivity) === null || _extensionApi$connect === void 0 ? void 0 : (_extensionApi$connect2 = _extensionApi$connect.sharedState) === null || _extensionApi$connect2 === void 0 ? void 0 : (_extensionApi$connect3 = _extensionApi$connect2.currentState()) === null || _extensionApi$connect3 === void 0 ? void 0 : _extensionApi$connect3.mode), extensionApi);
|
|
369
368
|
const breakoutItems = breakoutOptions(state, formatMessage, extensionState, breakoutEnabled, editorAnalyticsAPI, extensionApi);
|
|
370
369
|
const extensionObj = getSelectedExtension(state, true);
|
|
371
370
|
|
|
@@ -17,7 +17,6 @@ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks'
|
|
|
17
17
|
import Form from '@atlaskit/form/form';
|
|
18
18
|
import { FormFooter } from '@atlaskit/form/form-footer';
|
|
19
19
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
20
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
21
20
|
import { ALLOWED_LOGGED_MACRO_PARAMS } from './constants';
|
|
22
21
|
import { DescriptionSummary } from './DescriptionSummary';
|
|
23
22
|
import ErrorMessage from './ErrorMessage';
|
|
@@ -192,13 +191,7 @@ class ConfigPanel extends React.Component {
|
|
|
192
191
|
}
|
|
193
192
|
try {
|
|
194
193
|
const serializedData = await serialize(extensionManifest, this.backfillTabFormData(fields, formData, this.state.currentParameters), fields);
|
|
195
|
-
|
|
196
|
-
exposure: true
|
|
197
|
-
})) {
|
|
198
|
-
await onChange(serializedData);
|
|
199
|
-
} else {
|
|
200
|
-
onChange(serializedData);
|
|
201
|
-
}
|
|
194
|
+
await onChange(serializedData);
|
|
202
195
|
} catch (error) {
|
|
203
196
|
autoSaveReject === null || autoSaveReject === void 0 ? void 0 : autoSaveReject(error);
|
|
204
197
|
// eslint-disable-next-line no-console
|
|
@@ -2,7 +2,6 @@ import React, { useEffect, useState } from 'react';
|
|
|
2
2
|
import { bind } from 'bind-event-listener';
|
|
3
3
|
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
4
4
|
import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
|
|
5
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
6
5
|
import ConfigPanel from './ConfigPanel';
|
|
7
6
|
import { useStateFromPromise } from './use-state-from-promise';
|
|
8
7
|
const getFieldsDefinitionFn = (extensionManifest, nodeKey) => {
|
|
@@ -110,9 +109,7 @@ export default function FieldsLoader({
|
|
|
110
109
|
}) {
|
|
111
110
|
const [extensionManifest] = useStateFromPromise(() => extensionProvider.getExtension(extensionType, extensionKey), [extensionProvider, extensionType, extensionKey]);
|
|
112
111
|
const [errorMessage, setErrorMessage] = useState(null);
|
|
113
|
-
const connectivityState = useSharedPluginStateSelector(api, 'connectivity.mode'
|
|
114
|
-
disabled: editorExperiment('platform_editor_offline_editing_web', false)
|
|
115
|
-
});
|
|
112
|
+
const connectivityState = useSharedPluginStateSelector(api, 'connectivity.mode');
|
|
116
113
|
return /*#__PURE__*/React.createElement(FieldDefinitionsPromiseResolver, {
|
|
117
114
|
setErrorMessage: setErrorMessage,
|
|
118
115
|
extensionManifest: extensionManifest,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { isFieldset } from '@atlaskit/editor-common/extensions';
|
|
3
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
4
3
|
import Boolean from './Fields/Boolean';
|
|
5
4
|
import ColorPicker from './Fields/ColorPicker';
|
|
6
5
|
import CustomSelect from './Fields/CustomSelect';
|
|
@@ -196,16 +195,13 @@ export default function FormContent({
|
|
|
196
195
|
featureFlags,
|
|
197
196
|
isDisabled
|
|
198
197
|
}) {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
};
|
|
207
|
-
});
|
|
208
|
-
}
|
|
198
|
+
const mappedFields = fields.map(field => {
|
|
199
|
+
var _field$isDisabled;
|
|
200
|
+
return {
|
|
201
|
+
...field,
|
|
202
|
+
isDisabled: (_field$isDisabled = field.isDisabled) !== null && _field$isDisabled !== void 0 ? _field$isDisabled : isDisabled
|
|
203
|
+
};
|
|
204
|
+
});
|
|
209
205
|
return /*#__PURE__*/React.createElement(FormErrorBoundary, {
|
|
210
206
|
contextIdentifierProvider: contextIdentifierProvider,
|
|
211
207
|
extensionKey: extensionManifest.key,
|
|
@@ -9,7 +9,6 @@ import { injectIntl } from 'react-intl';
|
|
|
9
9
|
import { messages } from '@atlaskit/editor-common/extensions';
|
|
10
10
|
import SectionMessage from '@atlaskit/section-message/message';
|
|
11
11
|
import Spinner from '@atlaskit/spinner/spinner';
|
|
12
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
13
12
|
const spinnerWrapperStyles = css({
|
|
14
13
|
display: 'flex',
|
|
15
14
|
justifyContent: 'center',
|
|
@@ -35,12 +34,5 @@ const LoadingStateWithErrorHandling = injectIntl(props => {
|
|
|
35
34
|
interactionName: "config-panel-spinner"
|
|
36
35
|
}));
|
|
37
36
|
});
|
|
38
|
-
const
|
|
39
|
-
css: spinnerWrapperStyles,
|
|
40
|
-
"data-testid": "ConfigPanelLoading"
|
|
41
|
-
}, jsx(Spinner, {
|
|
42
|
-
size: "small",
|
|
43
|
-
interactionName: "config-panel-spinner"
|
|
44
|
-
}));
|
|
45
|
-
const LoadingState = props => editorExperiment('platform_editor_offline_editing_web', true) ? LoadingStateWithErrorHandling(props) : LoadingStateWithoutErrorHandling();
|
|
37
|
+
const LoadingState = props => LoadingStateWithErrorHandling(props);
|
|
46
38
|
export default LoadingState;
|
|
@@ -18,7 +18,6 @@ import EditIcon from '@atlaskit/icon/core/edit';
|
|
|
18
18
|
import ExpandHorizontalIcon from '@atlaskit/icon/core/expand-horizontal';
|
|
19
19
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
20
20
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
21
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
22
21
|
import { editExtension } from '../editor-actions/actions';
|
|
23
22
|
import { removeDescendantNodes, removeExtension, updateExtensionLayout } from '../editor-commands/commands';
|
|
24
23
|
import { pluginKey as macroPluginKey } from './macro/plugin-key';
|
|
@@ -355,7 +354,7 @@ export var getToolbarConfig = function getToolbarConfig(_ref2) {
|
|
|
355
354
|
var applyChangeToContextPanel = extensionApi === null || extensionApi === void 0 || (_extensionApi$context = extensionApi.contextPanel) === null || _extensionApi$context === void 0 ? void 0 : _extensionApi$context.actions.applyChange;
|
|
356
355
|
var editorAnalyticsAPI = extensionApi === null || extensionApi === void 0 || (_extensionApi$analyti2 = extensionApi.analytics) === null || _extensionApi$analyti2 === void 0 ? void 0 : _extensionApi$analyti2.actions;
|
|
357
356
|
var nodeType = [state.schema.nodes.extension, state.schema.nodes.inlineExtension, state.schema.nodes.bodiedExtension, state.schema.nodes.multiBodiedExtension];
|
|
358
|
-
var editButtonItems = editButton(formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI,
|
|
357
|
+
var editButtonItems = editButton(formatMessage, extensionState, applyChangeToContextPanel, editorAnalyticsAPI, isOfflineMode(extensionApi === null || extensionApi === void 0 || (_extensionApi$connect = extensionApi.connectivity) === null || _extensionApi$connect === void 0 || (_extensionApi$connect = _extensionApi$connect.sharedState) === null || _extensionApi$connect === void 0 || (_extensionApi$connect = _extensionApi$connect.currentState()) === null || _extensionApi$connect === void 0 ? void 0 : _extensionApi$connect.mode), extensionApi);
|
|
359
358
|
var breakoutItems = breakoutOptions(state, formatMessage, extensionState, breakoutEnabled, editorAnalyticsAPI, extensionApi);
|
|
360
359
|
var extensionObj = getSelectedExtension(state, true);
|
|
361
360
|
|
|
@@ -28,7 +28,6 @@ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks'
|
|
|
28
28
|
import Form from '@atlaskit/form/form';
|
|
29
29
|
import { FormFooter } from '@atlaskit/form/form-footer';
|
|
30
30
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
31
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
32
31
|
import { ALLOWED_LOGGED_MACRO_PARAMS } from './constants';
|
|
33
32
|
import { DescriptionSummary } from './DescriptionSummary';
|
|
34
33
|
import ErrorMessage from './ErrorMessage';
|
|
@@ -207,33 +206,22 @@ var ConfigPanel = /*#__PURE__*/function (_React$Component) {
|
|
|
207
206
|
return serialize(extensionManifest, _this.backfillTabFormData(fields, formData, _this.state.currentParameters), fields);
|
|
208
207
|
case 2:
|
|
209
208
|
serializedData = _context.sent;
|
|
210
|
-
if (!editorExperiment('platform_editor_offline_editing_web', true, {
|
|
211
|
-
exposure: true
|
|
212
|
-
})) {
|
|
213
|
-
_context.next = 4;
|
|
214
|
-
break;
|
|
215
|
-
}
|
|
216
209
|
_context.next = 3;
|
|
217
210
|
return onChange(serializedData);
|
|
218
211
|
case 3:
|
|
219
212
|
_context.next = 5;
|
|
220
213
|
break;
|
|
221
214
|
case 4:
|
|
222
|
-
|
|
223
|
-
case 5:
|
|
224
|
-
_context.next = 7;
|
|
225
|
-
break;
|
|
226
|
-
case 6:
|
|
227
|
-
_context.prev = 6;
|
|
215
|
+
_context.prev = 4;
|
|
228
216
|
_t = _context["catch"](1);
|
|
229
217
|
autoSaveReject === null || autoSaveReject === void 0 || autoSaveReject(_t);
|
|
230
218
|
// eslint-disable-next-line no-console
|
|
231
219
|
console.error("Error serializing parameters", _t);
|
|
232
|
-
case
|
|
220
|
+
case 5:
|
|
233
221
|
case "end":
|
|
234
222
|
return _context.stop();
|
|
235
223
|
}
|
|
236
|
-
}, _callee, null, [[1,
|
|
224
|
+
}, _callee, null, [[1, 4]]);
|
|
237
225
|
}));
|
|
238
226
|
return function (_x) {
|
|
239
227
|
return _ref3.apply(this, arguments);
|
|
@@ -3,7 +3,6 @@ import React, { useEffect, useState } from 'react';
|
|
|
3
3
|
import { bind } from 'bind-event-listener';
|
|
4
4
|
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
5
5
|
import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
|
|
6
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
7
6
|
import ConfigPanel from './ConfigPanel';
|
|
8
7
|
import { useStateFromPromise } from './use-state-from-promise';
|
|
9
8
|
var getFieldsDefinitionFn = function getFieldsDefinitionFn(extensionManifest, nodeKey) {
|
|
@@ -120,9 +119,7 @@ export default function FieldsLoader(_ref) {
|
|
|
120
119
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
121
120
|
errorMessage = _useState6[0],
|
|
122
121
|
setErrorMessage = _useState6[1];
|
|
123
|
-
var connectivityState = useSharedPluginStateSelector(api, 'connectivity.mode'
|
|
124
|
-
disabled: editorExperiment('platform_editor_offline_editing_web', false)
|
|
125
|
-
});
|
|
122
|
+
var connectivityState = useSharedPluginStateSelector(api, 'connectivity.mode');
|
|
126
123
|
return /*#__PURE__*/React.createElement(FieldDefinitionsPromiseResolver, {
|
|
127
124
|
setErrorMessage: setErrorMessage,
|
|
128
125
|
extensionManifest: extensionManifest,
|
|
@@ -3,7 +3,6 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
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 React from 'react';
|
|
5
5
|
import { isFieldset } from '@atlaskit/editor-common/extensions';
|
|
6
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
7
6
|
import Boolean from './Fields/Boolean';
|
|
8
7
|
import ColorPicker from './Fields/ColorPicker';
|
|
9
8
|
import CustomSelect from './Fields/CustomSelect';
|
|
@@ -196,15 +195,12 @@ export default function FormContent(_ref3) {
|
|
|
196
195
|
contextIdentifierProvider = _ref3.contextIdentifierProvider,
|
|
197
196
|
featureFlags = _ref3.featureFlags,
|
|
198
197
|
isDisabled = _ref3.isDisabled;
|
|
199
|
-
var mappedFields = fields
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
return _objectSpread(_objectSpread({}, field), {}, {
|
|
204
|
-
isDisabled: (_field$isDisabled = field.isDisabled) !== null && _field$isDisabled !== void 0 ? _field$isDisabled : isDisabled
|
|
205
|
-
});
|
|
198
|
+
var mappedFields = fields.map(function (field) {
|
|
199
|
+
var _field$isDisabled;
|
|
200
|
+
return _objectSpread(_objectSpread({}, field), {}, {
|
|
201
|
+
isDisabled: (_field$isDisabled = field.isDisabled) !== null && _field$isDisabled !== void 0 ? _field$isDisabled : isDisabled
|
|
206
202
|
});
|
|
207
|
-
}
|
|
203
|
+
});
|
|
208
204
|
return /*#__PURE__*/React.createElement(FormErrorBoundary, {
|
|
209
205
|
contextIdentifierProvider: contextIdentifierProvider,
|
|
210
206
|
extensionKey: extensionManifest.key,
|
|
@@ -9,7 +9,6 @@ import { injectIntl } from 'react-intl';
|
|
|
9
9
|
import { messages } from '@atlaskit/editor-common/extensions';
|
|
10
10
|
import SectionMessage from '@atlaskit/section-message/message';
|
|
11
11
|
import Spinner from '@atlaskit/spinner/spinner';
|
|
12
|
-
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
13
12
|
var spinnerWrapperStyles = css({
|
|
14
13
|
display: 'flex',
|
|
15
14
|
justifyContent: 'center',
|
|
@@ -35,16 +34,7 @@ var LoadingStateWithErrorHandling = injectIntl(function (props) {
|
|
|
35
34
|
interactionName: "config-panel-spinner"
|
|
36
35
|
}));
|
|
37
36
|
});
|
|
38
|
-
var LoadingStateWithoutErrorHandling = function LoadingStateWithoutErrorHandling() {
|
|
39
|
-
return jsx("div", {
|
|
40
|
-
css: spinnerWrapperStyles,
|
|
41
|
-
"data-testid": "ConfigPanelLoading"
|
|
42
|
-
}, jsx(Spinner, {
|
|
43
|
-
size: "small",
|
|
44
|
-
interactionName: "config-panel-spinner"
|
|
45
|
-
}));
|
|
46
|
-
};
|
|
47
37
|
var LoadingState = function LoadingState(props) {
|
|
48
|
-
return
|
|
38
|
+
return LoadingStateWithErrorHandling(props);
|
|
49
39
|
};
|
|
50
40
|
export default LoadingState;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-extension",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "21.0.0",
|
|
4
4
|
"description": "editor-plugin-extension plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,17 +31,17 @@
|
|
|
31
31
|
"@atlaskit/code": "^19.2.0",
|
|
32
32
|
"@atlaskit/datetime-picker": "^18.6.0",
|
|
33
33
|
"@atlaskit/editor-json-transformer": "^9.8.0",
|
|
34
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
35
|
-
"@atlaskit/editor-plugin-block-menu": "^
|
|
36
|
-
"@atlaskit/editor-plugin-connectivity": "^
|
|
37
|
-
"@atlaskit/editor-plugin-context-identifier": "^
|
|
38
|
-
"@atlaskit/editor-plugin-context-panel": "^
|
|
39
|
-
"@atlaskit/editor-plugin-copy-button": "^
|
|
40
|
-
"@atlaskit/editor-plugin-decorations": "^
|
|
41
|
-
"@atlaskit/editor-plugin-feature-flags": "^
|
|
42
|
-
"@atlaskit/editor-plugin-mentions": "^
|
|
43
|
-
"@atlaskit/editor-plugin-toolbar": "^
|
|
44
|
-
"@atlaskit/editor-plugin-width": "^
|
|
34
|
+
"@atlaskit/editor-plugin-analytics": "^18.0.0",
|
|
35
|
+
"@atlaskit/editor-plugin-block-menu": "^17.0.0",
|
|
36
|
+
"@atlaskit/editor-plugin-connectivity": "^18.0.0",
|
|
37
|
+
"@atlaskit/editor-plugin-context-identifier": "^18.0.0",
|
|
38
|
+
"@atlaskit/editor-plugin-context-panel": "^20.0.0",
|
|
39
|
+
"@atlaskit/editor-plugin-copy-button": "^18.0.0",
|
|
40
|
+
"@atlaskit/editor-plugin-decorations": "^18.0.0",
|
|
41
|
+
"@atlaskit/editor-plugin-feature-flags": "^17.0.0",
|
|
42
|
+
"@atlaskit/editor-plugin-mentions": "^20.0.0",
|
|
43
|
+
"@atlaskit/editor-plugin-toolbar": "^15.0.0",
|
|
44
|
+
"@atlaskit/editor-plugin-width": "^19.0.0",
|
|
45
45
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
46
46
|
"@atlaskit/editor-shared-styles": "^4.2.0",
|
|
47
47
|
"@atlaskit/editor-tables": "^3.2.0",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@atlaskit/heading": "^7.2.0",
|
|
51
51
|
"@atlaskit/icon": "^37.6.0",
|
|
52
52
|
"@atlaskit/link": "^5.1.0",
|
|
53
|
-
"@atlaskit/mention": "^
|
|
53
|
+
"@atlaskit/mention": "^29.0.0",
|
|
54
54
|
"@atlaskit/menu": "^10.2.0",
|
|
55
55
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
56
56
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"@atlaskit/tabs": "^21.2.0",
|
|
65
65
|
"@atlaskit/textarea": "^10.2.0",
|
|
66
66
|
"@atlaskit/textfield": "^10.2.0",
|
|
67
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
67
|
+
"@atlaskit/tmp-editor-statsig": "^188.0.0",
|
|
68
68
|
"@atlaskit/toggle": "^17.3.0",
|
|
69
69
|
"@atlaskit/tokens": "^16.12.0",
|
|
70
70
|
"@atlaskit/tooltip": "^24.3.0",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"uuid": "^11.1.1"
|
|
80
80
|
},
|
|
81
81
|
"peerDependencies": {
|
|
82
|
-
"@atlaskit/editor-common": "^
|
|
82
|
+
"@atlaskit/editor-common": "^122.0.0",
|
|
83
83
|
"react": "^18.2.0 || ^19.2.0",
|
|
84
84
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
85
85
|
},
|