@atlaskit/editor-plugin-type-ahead 2.7.20 → 3.0.1

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.
Files changed (37) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/cjs/pm-plugins/actions.js +1 -0
  3. package/dist/cjs/pm-plugins/commands/clear-list-error.js +20 -0
  4. package/dist/cjs/pm-plugins/reducer.js +5 -0
  5. package/dist/cjs/ui/TypeAheadErrorFallback/index.js +3 -3
  6. package/dist/cjs/ui/TypeAheadPopup.js +3 -3
  7. package/dist/cjs/ui/WrapperTypeAhead.js +3 -3
  8. package/dist/cjs/ui/hooks/use-load-items.js +8 -1
  9. package/dist/es2019/pm-plugins/actions.js +1 -0
  10. package/dist/es2019/pm-plugins/commands/clear-list-error.js +15 -0
  11. package/dist/es2019/pm-plugins/reducer.js +6 -0
  12. package/dist/es2019/ui/TypeAheadErrorFallback/index.js +3 -3
  13. package/dist/es2019/ui/TypeAheadPopup.js +3 -3
  14. package/dist/es2019/ui/WrapperTypeAhead.js +3 -3
  15. package/dist/es2019/ui/hooks/use-load-items.js +8 -1
  16. package/dist/esm/pm-plugins/actions.js +1 -0
  17. package/dist/esm/pm-plugins/commands/clear-list-error.js +14 -0
  18. package/dist/esm/pm-plugins/reducer.js +5 -0
  19. package/dist/esm/ui/TypeAheadErrorFallback/index.js +3 -3
  20. package/dist/esm/ui/TypeAheadPopup.js +3 -3
  21. package/dist/esm/ui/WrapperTypeAhead.js +3 -3
  22. package/dist/esm/ui/hooks/use-load-items.js +8 -1
  23. package/dist/types/pm-plugins/actions.d.ts +1 -0
  24. package/dist/types/pm-plugins/analytics.d.ts +1 -1
  25. package/dist/types/pm-plugins/api.d.ts +3 -3
  26. package/dist/types/pm-plugins/commands/clear-list-error.d.ts +2 -0
  27. package/dist/types/ui/MoreOptions.d.ts +0 -1
  28. package/dist/types/ui/TypeAheadList.d.ts +8 -8
  29. package/dist/types/ui/hooks/use-load-items.d.ts +3 -2
  30. package/dist/types-ts4.5/pm-plugins/actions.d.ts +1 -0
  31. package/dist/types-ts4.5/pm-plugins/analytics.d.ts +1 -1
  32. package/dist/types-ts4.5/pm-plugins/api.d.ts +3 -3
  33. package/dist/types-ts4.5/pm-plugins/commands/clear-list-error.d.ts +2 -0
  34. package/dist/types-ts4.5/ui/MoreOptions.d.ts +0 -1
  35. package/dist/types-ts4.5/ui/TypeAheadList.d.ts +8 -8
  36. package/dist/types-ts4.5/ui/hooks/use-load-items.d.ts +3 -2
  37. package/package.json +10 -14
package/CHANGELOG.md CHANGED
@@ -1,5 +1,55 @@
1
1
  # @atlaskit/editor-plugin-type-ahead
2
2
 
3
+ ## 3.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#181781](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/181781)
8
+ [`e0060cc2c2eb7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e0060cc2c2eb7) -
9
+ ED-28417 Offline Editing: Update the type ahead error to clear on new requests, and make error
10
+ more generic.
11
+ - Updated dependencies
12
+
13
+ ## 3.0.0
14
+
15
+ ### Major Changes
16
+
17
+ - [#181024](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/181024)
18
+ [`8e80c487ca307`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8e80c487ca307) - ##
19
+ Make `@atlaskit/editor-common` a peer dependency
20
+
21
+ **WHAT:** `@atlaskit/editor-common` has been moved from `dependencies` to `peerDependencies` in
22
+ all editor plugin packages.
23
+
24
+ **WHY:** This change ensures that only a single version of `@atlaskit/editor-common` is used in
25
+ consuming applications, preventing issues caused by multiple versions of singleton libraries (such
26
+ as context mismatches or duplicated state). This is especially important for packages that rely on
27
+ shared context or singletons.
28
+
29
+ **HOW TO ADJUST:**
30
+
31
+ - Consumers must now explicitly install `@atlaskit/editor-common` in their own project if they use
32
+ any of these editor plugins.
33
+ - Ensure the version you install matches the version required by the plugins.
34
+ - You can use the
35
+ [`check-peer-dependencies`](https://www.npmjs.com/package/check-peer-dependencies) package to
36
+ verify that all required peer dependencies are installed and compatible.
37
+ - Example install command:
38
+ ```
39
+ npm install @atlaskit/editor-common
40
+ ```
41
+ or
42
+ ```
43
+ yarn add @atlaskit/editor-common
44
+ ```
45
+
46
+ **Note:** This is a breaking change. If `@atlaskit/editor-common` is not installed at the
47
+ application level, you may see errors or unexpected behavior.
48
+
49
+ ### Patch Changes
50
+
51
+ - Updated dependencies
52
+
3
53
  ## 2.7.20
4
54
 
5
55
  ### Patch Changes
@@ -12,6 +12,7 @@ var ACTIONS = exports.ACTIONS = /*#__PURE__*/function (ACTIONS) {
12
12
  ACTIONS["INSERT_RAW_QUERY"] = "INSERT_RAW_QUERY";
13
13
  ACTIONS["UPDATE_LIST_ITEMS"] = "UPDATE_LIST_ITEMS";
14
14
  ACTIONS["UPDATE_LIST_ERROR"] = "UPDATE_LIST_ERROR";
15
+ ACTIONS["CLEAR_LIST_ERROR"] = "CLEAR_LIST_ERROR";
15
16
  ACTIONS["UPDATE_SELECTED_INDEX"] = "UPDATE_SELECTED_INDEX";
16
17
  return ACTIONS;
17
18
  }({});
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.clearListError = void 0;
7
+ var _actions = require("../actions");
8
+ var _key = require("../key");
9
+ var clearListError = exports.clearListError = function clearListError() {
10
+ return function (_ref) {
11
+ var tr = _ref.tr;
12
+ tr.setMeta(_key.pluginKey, {
13
+ action: _actions.ACTIONS.CLEAR_LIST_ERROR,
14
+ params: {
15
+ errorInfo: null
16
+ }
17
+ });
18
+ return tr;
19
+ };
20
+ };
@@ -114,6 +114,7 @@ var createReducer = exports.createReducer = function createReducer(_ref) {
114
114
  var shouldUpdateListItems = action === _actions.ACTIONS.UPDATE_LIST_ITEMS;
115
115
  var shouldUpdateListError = action === _actions.ACTIONS.UPDATE_LIST_ERROR;
116
116
  var shouldUpdateSelectedIndex = action === _actions.ACTIONS.UPDATE_SELECTED_INDEX;
117
+ var shouldClearListError = action === _actions.ACTIONS.CLEAR_LIST_ERROR;
117
118
  if (shouldOpenMenu) {
118
119
  return openMenu(currentPluginState, {
119
120
  tr: tr,
@@ -146,6 +147,10 @@ var createReducer = exports.createReducer = function createReducer(_ref) {
146
147
  return _objectSpread(_objectSpread({}, currentPluginState), {}, {
147
148
  selectedIndex: params.selectedIndex
148
149
  });
150
+ } else if (shouldClearListError) {
151
+ return _objectSpread(_objectSpread({}, currentPluginState), {}, {
152
+ errorInfo: null
153
+ });
149
154
  }
150
155
  if (tr.docChanged) {
151
156
  var decorationSet = currentPluginState.decorationSet;
@@ -23,10 +23,10 @@ var minHeightComponentStyles = (0, _react.css)({
23
23
  });
24
24
  var TypeAheadErrorFallback = exports.TypeAheadErrorFallback = function TypeAheadErrorFallback() {
25
25
  var intl = (0, _reactIntlNext.useIntl)();
26
- var header = intl.formatMessage(_typeAhead.typeAheadListMessages.offlineErrorFallbackHeading);
27
- var description = intl.formatMessage(_typeAhead.typeAheadListMessages.offlineErrorFallbackDesc);
26
+ var header = intl.formatMessage(_typeAhead.typeAheadListMessages.typeAheadErrorFallbackHeading);
27
+ var description = intl.formatMessage(_typeAhead.typeAheadListMessages.typeAheadErrorFallbackDesc);
28
28
  return (0, _react.jsx)("div", {
29
- "data-testid": "mentions-typeahead-error-boundary-ui",
29
+ "data-testid": "typeahead-error-boundary-ui",
30
30
  css: minHeightComponentStyles
31
31
  }, (0, _react.jsx)(_EmptyState.EmptyState, {
32
32
  header: header,
@@ -310,7 +310,7 @@ var TypeAheadPopup = exports.TypeAheadPopup = /*#__PURE__*/_react.default.memo(f
310
310
  var onMoreOptionsClicked = (0, _react.useCallback)(function () {
311
311
  if (
312
312
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
313
- openElementBrowserModal && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_4') && triggerHandler.id === _typeAhead.TypeAheadAvailableNodes.QUICK_INSERT) {
313
+ openElementBrowserModal && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && triggerHandler.id === _typeAhead.TypeAheadAvailableNodes.QUICK_INSERT) {
314
314
  activityStateRef.current = {
315
315
  inputMethod: _analytics.INPUT_METHOD.MOUSE,
316
316
  closeAction: _analytics.ACTION.VIEW_MORE,
@@ -330,7 +330,7 @@ var TypeAheadPopup = exports.TypeAheadPopup = /*#__PURE__*/_react.default.memo(f
330
330
  ariaLabel: null,
331
331
  preventOverflow: true,
332
332
  onUnmount: function onUnmount() {
333
- if (selectedIndex > -1 && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_4')) {
333
+ if (selectedIndex > -1 && (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')) {
334
334
  // if selectedIndex is -1, it means that the user has not selected any item
335
335
  // will be handled by WrapperTypeAhead
336
336
  (0, _analytics2.fireTypeAheadClosedAnalyticsEvent)(api, activityStateRef.current.closeAction || _analytics.ACTION.CANCELLED, !isEmptyQuery, activityStateRef.current.inputMethod || _analytics.INPUT_METHOD.MOUSE, activityStateRef.current.invocationMethod);
@@ -359,7 +359,7 @@ var TypeAheadPopup = exports.TypeAheadPopup = /*#__PURE__*/_react.default.memo(f
359
359
  items: items,
360
360
  selectedIndex: selectedIndex,
361
361
  onItemClick: function onItemClick(mode, index, inputMethod) {
362
- if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_4')) {
362
+ if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')) {
363
363
  activityStateRef.current = {
364
364
  inputMethod: inputMethod || null,
365
365
  closeAction: _analytics.ACTION.INSERTED,
@@ -50,7 +50,7 @@ var WrapperTypeAhead = exports.WrapperTypeAhead = /*#__PURE__*/_react.default.me
50
50
  setQuery = _useState4[1];
51
51
  var queryRef = (0, _react.useRef)(query);
52
52
  var editorViewRef = (0, _react.useRef)(editorView);
53
- var items = (0, _useLoadItems.useLoadItems)(triggerHandler, editorView, query, showMoreOptionsButton);
53
+ var items = (0, _useLoadItems.useLoadItems)(triggerHandler, editorView, query, showMoreOptionsButton, api);
54
54
  (0, _react.useEffect)(function () {
55
55
  if (!closed && (0, _platformFeatureFlags.fg)('platform_editor_ease_of_use_metrics')) {
56
56
  var _api$metrics;
@@ -86,7 +86,7 @@ var WrapperTypeAhead = exports.WrapperTypeAhead = /*#__PURE__*/_react.default.me
86
86
  addPrefixTrigger = _ref2.addPrefixTrigger,
87
87
  text = _ref2.text,
88
88
  forceFocusOnEditor = _ref2.forceFocusOnEditor;
89
- if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_4')) {
89
+ if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')) {
90
90
  var _getPluginState;
91
91
  (0, _analytics2.fireTypeAheadClosedAnalyticsEvent)(api, _analytics.ACTION.CANCELLED, !!queryRef.current, _analytics.INPUT_METHOD.KEYBOARD, (_getPluginState = (0, _utils.getPluginState)(editorView.state)) === null || _getPluginState === void 0 ? void 0 : _getPluginState.inputMethod);
92
92
  }
@@ -118,7 +118,7 @@ var WrapperTypeAhead = exports.WrapperTypeAhead = /*#__PURE__*/_react.default.me
118
118
  if (safeSelectedIndex === -1) {
119
119
  return;
120
120
  }
121
- if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_4')) {
121
+ if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1')) {
122
122
  var _getPluginState2;
123
123
  (0, _analytics2.fireTypeAheadClosedAnalyticsEvent)(api, _analytics.ACTION.INSERTED, !!queryRef.current, _analytics.INPUT_METHOD.KEYBOARD, (_getPluginState2 = (0, _utils.getPluginState)(editorView.state)) === null || _getPluginState2 === void 0 ? void 0 : _getPluginState2.inputMethod);
124
124
  }
@@ -8,10 +8,11 @@ exports.useLoadItems = void 0;
8
8
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
9
  var _react = require("react");
10
10
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
11
+ var _clearListError = require("../../pm-plugins/commands/clear-list-error");
11
12
  var _updateListError = require("../../pm-plugins/commands/update-list-error");
12
13
  var _updateListItems = require("../../pm-plugins/commands/update-list-items");
13
14
  var EMPTY_LIST_ITEM = [];
14
- var useLoadItems = exports.useLoadItems = function useLoadItems(triggerHandler, editorView, query, showViewMore) {
15
+ var useLoadItems = exports.useLoadItems = function useLoadItems(triggerHandler, editorView, query, showViewMore, api) {
15
16
  var _useState = (0, _react.useState)(EMPTY_LIST_ITEM),
16
17
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
17
18
  items = _useState2[0],
@@ -29,6 +30,12 @@ var useLoadItems = exports.useLoadItems = function useLoadItems(triggerHandler,
29
30
  editorState: editorView.state
30
31
  };
31
32
  var view = editorViewRef.current;
33
+ if ((0, _experiments.editorExperiment)('platform_editor_offline_editing_web', true)) {
34
+ // Clear any existing error state before making a new request
35
+ queueMicrotask(function () {
36
+ api === null || api === void 0 || api.core.actions.execute((0, _clearListError.clearListError)());
37
+ });
38
+ }
32
39
  getItems(options).then(function (result) {
33
40
  var list = result.length > 0 ? result : EMPTY_LIST_ITEM;
34
41
  if (componentIsMounted.current) {
@@ -6,6 +6,7 @@ export let ACTIONS = /*#__PURE__*/function (ACTIONS) {
6
6
  ACTIONS["INSERT_RAW_QUERY"] = "INSERT_RAW_QUERY";
7
7
  ACTIONS["UPDATE_LIST_ITEMS"] = "UPDATE_LIST_ITEMS";
8
8
  ACTIONS["UPDATE_LIST_ERROR"] = "UPDATE_LIST_ERROR";
9
+ ACTIONS["CLEAR_LIST_ERROR"] = "CLEAR_LIST_ERROR";
9
10
  ACTIONS["UPDATE_SELECTED_INDEX"] = "UPDATE_SELECTED_INDEX";
10
11
  return ACTIONS;
11
12
  }({});
@@ -0,0 +1,15 @@
1
+ import { ACTIONS } from '../actions';
2
+ import { pluginKey as typeAheadPluginKey } from '../key';
3
+ export const clearListError = () => {
4
+ return ({
5
+ tr
6
+ }) => {
7
+ tr.setMeta(typeAheadPluginKey, {
8
+ action: ACTIONS.CLEAR_LIST_ERROR,
9
+ params: {
10
+ errorInfo: null
11
+ }
12
+ });
13
+ return tr;
14
+ };
15
+ };
@@ -106,6 +106,7 @@ export const createReducer = ({
106
106
  const shouldUpdateListItems = action === ACTIONS.UPDATE_LIST_ITEMS;
107
107
  const shouldUpdateListError = action === ACTIONS.UPDATE_LIST_ERROR;
108
108
  const shouldUpdateSelectedIndex = action === ACTIONS.UPDATE_SELECTED_INDEX;
109
+ const shouldClearListError = action === ACTIONS.CLEAR_LIST_ERROR;
109
110
  if (shouldOpenMenu) {
110
111
  return openMenu(currentPluginState, {
111
112
  tr,
@@ -148,6 +149,11 @@ export const createReducer = ({
148
149
  ...currentPluginState,
149
150
  selectedIndex: params.selectedIndex
150
151
  };
152
+ } else if (shouldClearListError) {
153
+ return {
154
+ ...currentPluginState,
155
+ errorInfo: null
156
+ };
151
157
  }
152
158
  if (tr.docChanged) {
153
159
  const {
@@ -16,10 +16,10 @@ const minHeightComponentStyles = css({
16
16
  });
17
17
  export const TypeAheadErrorFallback = () => {
18
18
  const intl = useIntl();
19
- const header = intl.formatMessage(messages.offlineErrorFallbackHeading);
20
- const description = intl.formatMessage(messages.offlineErrorFallbackDesc);
19
+ const header = intl.formatMessage(messages.typeAheadErrorFallbackHeading);
20
+ const description = intl.formatMessage(messages.typeAheadErrorFallbackDesc);
21
21
  return jsx("div", {
22
- "data-testid": "mentions-typeahead-error-boundary-ui",
22
+ "data-testid": "typeahead-error-boundary-ui",
23
23
  css: minHeightComponentStyles
24
24
  }, jsx(EmptyState, {
25
25
  header: header,
@@ -307,7 +307,7 @@ export const TypeAheadPopup = /*#__PURE__*/React.memo(props => {
307
307
  const onMoreOptionsClicked = useCallback(() => {
308
308
  if (
309
309
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
310
- openElementBrowserModal && editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_4') && triggerHandler.id === TypeAheadAvailableNodes.QUICK_INSERT) {
310
+ openElementBrowserModal && editorExperiment('platform_editor_controls', 'variant1') && triggerHandler.id === TypeAheadAvailableNodes.QUICK_INSERT) {
311
311
  activityStateRef.current = {
312
312
  inputMethod: INPUT_METHOD.MOUSE,
313
313
  closeAction: ACTION.VIEW_MORE,
@@ -327,7 +327,7 @@ export const TypeAheadPopup = /*#__PURE__*/React.memo(props => {
327
327
  ariaLabel: null,
328
328
  preventOverflow: true,
329
329
  onUnmount: () => {
330
- if (selectedIndex > -1 && editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_4')) {
330
+ if (selectedIndex > -1 && editorExperiment('platform_editor_controls', 'variant1')) {
331
331
  // if selectedIndex is -1, it means that the user has not selected any item
332
332
  // will be handled by WrapperTypeAhead
333
333
  fireTypeAheadClosedAnalyticsEvent(api, activityStateRef.current.closeAction || ACTION.CANCELLED, !isEmptyQuery, activityStateRef.current.inputMethod || INPUT_METHOD.MOUSE, activityStateRef.current.invocationMethod);
@@ -356,7 +356,7 @@ export const TypeAheadPopup = /*#__PURE__*/React.memo(props => {
356
356
  items: items,
357
357
  selectedIndex: selectedIndex,
358
358
  onItemClick: (mode, index, inputMethod) => {
359
- if (editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_4')) {
359
+ if (editorExperiment('platform_editor_controls', 'variant1')) {
360
360
  activityStateRef.current = {
361
361
  inputMethod: inputMethod || null,
362
362
  closeAction: ACTION.INSERTED,
@@ -35,7 +35,7 @@ export const WrapperTypeAhead = /*#__PURE__*/React.memo(({
35
35
  const [query, setQuery] = useState(reopenQuery || '');
36
36
  const queryRef = useRef(query);
37
37
  const editorViewRef = useRef(editorView);
38
- const items = useLoadItems(triggerHandler, editorView, query, showMoreOptionsButton);
38
+ const items = useLoadItems(triggerHandler, editorView, query, showMoreOptionsButton, api);
39
39
  useEffect(() => {
40
40
  if (!closed && fg('platform_editor_ease_of_use_metrics')) {
41
41
  var _api$metrics;
@@ -65,7 +65,7 @@ export const WrapperTypeAhead = /*#__PURE__*/React.memo(({
65
65
  text,
66
66
  forceFocusOnEditor
67
67
  }) => {
68
- if (editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_4')) {
68
+ if (editorExperiment('platform_editor_controls', 'variant1')) {
69
69
  var _getPluginState;
70
70
  fireTypeAheadClosedAnalyticsEvent(api, ACTION.CANCELLED, !!queryRef.current, INPUT_METHOD.KEYBOARD, (_getPluginState = getPluginState(editorView.state)) === null || _getPluginState === void 0 ? void 0 : _getPluginState.inputMethod);
71
71
  }
@@ -97,7 +97,7 @@ export const WrapperTypeAhead = /*#__PURE__*/React.memo(({
97
97
  if (safeSelectedIndex === -1) {
98
98
  return;
99
99
  }
100
- if (editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_4')) {
100
+ if (editorExperiment('platform_editor_controls', 'variant1')) {
101
101
  var _getPluginState2;
102
102
  fireTypeAheadClosedAnalyticsEvent(api, ACTION.INSERTED, !!queryRef.current, INPUT_METHOD.KEYBOARD, (_getPluginState2 = getPluginState(editorView.state)) === null || _getPluginState2 === void 0 ? void 0 : _getPluginState2.inputMethod);
103
103
  }
@@ -1,9 +1,10 @@
1
1
  import { useEffect, useRef, useState } from 'react';
2
2
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
3
+ import { clearListError } from '../../pm-plugins/commands/clear-list-error';
3
4
  import { updateListError } from '../../pm-plugins/commands/update-list-error';
4
5
  import { updateListItem } from '../../pm-plugins/commands/update-list-items';
5
6
  const EMPTY_LIST_ITEM = [];
6
- export const useLoadItems = (triggerHandler, editorView, query, showViewMore) => {
7
+ export const useLoadItems = (triggerHandler, editorView, query, showViewMore, api) => {
7
8
  const [items, setItems] = useState(EMPTY_LIST_ITEM);
8
9
  const componentIsMounted = useRef(true);
9
10
  const editorViewRef = useRef(editorView);
@@ -20,6 +21,12 @@ export const useLoadItems = (triggerHandler, editorView, query, showViewMore) =>
20
21
  const {
21
22
  current: view
22
23
  } = editorViewRef;
24
+ if (editorExperiment('platform_editor_offline_editing_web', true)) {
25
+ // Clear any existing error state before making a new request
26
+ queueMicrotask(() => {
27
+ api === null || api === void 0 ? void 0 : api.core.actions.execute(clearListError());
28
+ });
29
+ }
23
30
  getItems(options).then(result => {
24
31
  const list = result.length > 0 ? result : EMPTY_LIST_ITEM;
25
32
  if (componentIsMounted.current) {
@@ -6,6 +6,7 @@ export var ACTIONS = /*#__PURE__*/function (ACTIONS) {
6
6
  ACTIONS["INSERT_RAW_QUERY"] = "INSERT_RAW_QUERY";
7
7
  ACTIONS["UPDATE_LIST_ITEMS"] = "UPDATE_LIST_ITEMS";
8
8
  ACTIONS["UPDATE_LIST_ERROR"] = "UPDATE_LIST_ERROR";
9
+ ACTIONS["CLEAR_LIST_ERROR"] = "CLEAR_LIST_ERROR";
9
10
  ACTIONS["UPDATE_SELECTED_INDEX"] = "UPDATE_SELECTED_INDEX";
10
11
  return ACTIONS;
11
12
  }({});
@@ -0,0 +1,14 @@
1
+ import { ACTIONS } from '../actions';
2
+ import { pluginKey as typeAheadPluginKey } from '../key';
3
+ export var clearListError = function clearListError() {
4
+ return function (_ref) {
5
+ var tr = _ref.tr;
6
+ tr.setMeta(typeAheadPluginKey, {
7
+ action: ACTIONS.CLEAR_LIST_ERROR,
8
+ params: {
9
+ errorInfo: null
10
+ }
11
+ });
12
+ return tr;
13
+ };
14
+ };
@@ -107,6 +107,7 @@ export var createReducer = function createReducer(_ref) {
107
107
  var shouldUpdateListItems = action === ACTIONS.UPDATE_LIST_ITEMS;
108
108
  var shouldUpdateListError = action === ACTIONS.UPDATE_LIST_ERROR;
109
109
  var shouldUpdateSelectedIndex = action === ACTIONS.UPDATE_SELECTED_INDEX;
110
+ var shouldClearListError = action === ACTIONS.CLEAR_LIST_ERROR;
110
111
  if (shouldOpenMenu) {
111
112
  return openMenu(currentPluginState, {
112
113
  tr: tr,
@@ -139,6 +140,10 @@ export var createReducer = function createReducer(_ref) {
139
140
  return _objectSpread(_objectSpread({}, currentPluginState), {}, {
140
141
  selectedIndex: params.selectedIndex
141
142
  });
143
+ } else if (shouldClearListError) {
144
+ return _objectSpread(_objectSpread({}, currentPluginState), {}, {
145
+ errorInfo: null
146
+ });
142
147
  }
143
148
  if (tr.docChanged) {
144
149
  var decorationSet = currentPluginState.decorationSet;
@@ -16,10 +16,10 @@ var minHeightComponentStyles = css({
16
16
  });
17
17
  export var TypeAheadErrorFallback = function TypeAheadErrorFallback() {
18
18
  var intl = useIntl();
19
- var header = intl.formatMessage(messages.offlineErrorFallbackHeading);
20
- var description = intl.formatMessage(messages.offlineErrorFallbackDesc);
19
+ var header = intl.formatMessage(messages.typeAheadErrorFallbackHeading);
20
+ var description = intl.formatMessage(messages.typeAheadErrorFallbackDesc);
21
21
  return jsx("div", {
22
- "data-testid": "mentions-typeahead-error-boundary-ui",
22
+ "data-testid": "typeahead-error-boundary-ui",
23
23
  css: minHeightComponentStyles
24
24
  }, jsx(EmptyState, {
25
25
  header: header,
@@ -300,7 +300,7 @@ export var TypeAheadPopup = /*#__PURE__*/React.memo(function (props) {
300
300
  var onMoreOptionsClicked = useCallback(function () {
301
301
  if (
302
302
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
303
- openElementBrowserModal && editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_4') && triggerHandler.id === TypeAheadAvailableNodes.QUICK_INSERT) {
303
+ openElementBrowserModal && editorExperiment('platform_editor_controls', 'variant1') && triggerHandler.id === TypeAheadAvailableNodes.QUICK_INSERT) {
304
304
  activityStateRef.current = {
305
305
  inputMethod: INPUT_METHOD.MOUSE,
306
306
  closeAction: ACTION.VIEW_MORE,
@@ -320,7 +320,7 @@ export var TypeAheadPopup = /*#__PURE__*/React.memo(function (props) {
320
320
  ariaLabel: null,
321
321
  preventOverflow: true,
322
322
  onUnmount: function onUnmount() {
323
- if (selectedIndex > -1 && editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_4')) {
323
+ if (selectedIndex > -1 && editorExperiment('platform_editor_controls', 'variant1')) {
324
324
  // if selectedIndex is -1, it means that the user has not selected any item
325
325
  // will be handled by WrapperTypeAhead
326
326
  fireTypeAheadClosedAnalyticsEvent(api, activityStateRef.current.closeAction || ACTION.CANCELLED, !isEmptyQuery, activityStateRef.current.inputMethod || INPUT_METHOD.MOUSE, activityStateRef.current.invocationMethod);
@@ -349,7 +349,7 @@ export var TypeAheadPopup = /*#__PURE__*/React.memo(function (props) {
349
349
  items: items,
350
350
  selectedIndex: selectedIndex,
351
351
  onItemClick: function onItemClick(mode, index, inputMethod) {
352
- if (editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_4')) {
352
+ if (editorExperiment('platform_editor_controls', 'variant1')) {
353
353
  activityStateRef.current = {
354
354
  inputMethod: inputMethod || null,
355
355
  closeAction: ACTION.INSERTED,
@@ -41,7 +41,7 @@ export var WrapperTypeAhead = /*#__PURE__*/React.memo(function (_ref) {
41
41
  setQuery = _useState4[1];
42
42
  var queryRef = useRef(query);
43
43
  var editorViewRef = useRef(editorView);
44
- var items = useLoadItems(triggerHandler, editorView, query, showMoreOptionsButton);
44
+ var items = useLoadItems(triggerHandler, editorView, query, showMoreOptionsButton, api);
45
45
  useEffect(function () {
46
46
  if (!closed && fg('platform_editor_ease_of_use_metrics')) {
47
47
  var _api$metrics;
@@ -77,7 +77,7 @@ export var WrapperTypeAhead = /*#__PURE__*/React.memo(function (_ref) {
77
77
  addPrefixTrigger = _ref2.addPrefixTrigger,
78
78
  text = _ref2.text,
79
79
  forceFocusOnEditor = _ref2.forceFocusOnEditor;
80
- if (editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_4')) {
80
+ if (editorExperiment('platform_editor_controls', 'variant1')) {
81
81
  var _getPluginState;
82
82
  fireTypeAheadClosedAnalyticsEvent(api, ACTION.CANCELLED, !!queryRef.current, INPUT_METHOD.KEYBOARD, (_getPluginState = getPluginState(editorView.state)) === null || _getPluginState === void 0 ? void 0 : _getPluginState.inputMethod);
83
83
  }
@@ -109,7 +109,7 @@ export var WrapperTypeAhead = /*#__PURE__*/React.memo(function (_ref) {
109
109
  if (safeSelectedIndex === -1) {
110
110
  return;
111
111
  }
112
- if (editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_controls_patch_4')) {
112
+ if (editorExperiment('platform_editor_controls', 'variant1')) {
113
113
  var _getPluginState2;
114
114
  fireTypeAheadClosedAnalyticsEvent(api, ACTION.INSERTED, !!queryRef.current, INPUT_METHOD.KEYBOARD, (_getPluginState2 = getPluginState(editorView.state)) === null || _getPluginState2 === void 0 ? void 0 : _getPluginState2.inputMethod);
115
115
  }
@@ -1,10 +1,11 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import { useEffect, useRef, useState } from 'react';
3
3
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
4
+ import { clearListError } from '../../pm-plugins/commands/clear-list-error';
4
5
  import { updateListError } from '../../pm-plugins/commands/update-list-error';
5
6
  import { updateListItem } from '../../pm-plugins/commands/update-list-items';
6
7
  var EMPTY_LIST_ITEM = [];
7
- export var useLoadItems = function useLoadItems(triggerHandler, editorView, query, showViewMore) {
8
+ export var useLoadItems = function useLoadItems(triggerHandler, editorView, query, showViewMore, api) {
8
9
  var _useState = useState(EMPTY_LIST_ITEM),
9
10
  _useState2 = _slicedToArray(_useState, 2),
10
11
  items = _useState2[0],
@@ -22,6 +23,12 @@ export var useLoadItems = function useLoadItems(triggerHandler, editorView, quer
22
23
  editorState: editorView.state
23
24
  };
24
25
  var view = editorViewRef.current;
26
+ if (editorExperiment('platform_editor_offline_editing_web', true)) {
27
+ // Clear any existing error state before making a new request
28
+ queueMicrotask(function () {
29
+ api === null || api === void 0 || api.core.actions.execute(clearListError());
30
+ });
31
+ }
25
32
  getItems(options).then(function (result) {
26
33
  var list = result.length > 0 ? result : EMPTY_LIST_ITEM;
27
34
  if (componentIsMounted.current) {
@@ -6,5 +6,6 @@ export declare enum ACTIONS {
6
6
  INSERT_RAW_QUERY = "INSERT_RAW_QUERY",
7
7
  UPDATE_LIST_ITEMS = "UPDATE_LIST_ITEMS",
8
8
  UPDATE_LIST_ERROR = "UPDATE_LIST_ERROR",
9
+ CLEAR_LIST_ERROR = "CLEAR_LIST_ERROR",
9
10
  UPDATE_SELECTED_INDEX = "UPDATE_SELECTED_INDEX"
10
11
  }
@@ -1,4 +1,4 @@
1
- import { ACTION, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
1
+ import { ACTION, type INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
2
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
3
  import type { TypeAheadPlugin } from '../typeAheadPluginType';
4
4
  import type { TypeAheadInputMethod } from '../types';
@@ -30,7 +30,7 @@ export declare const createTypeAheadTools: (editorView: EditorView) => {
30
30
  close: (options?: CloseOptions) => boolean;
31
31
  insert: ({ index, mode }: {
32
32
  index: number;
33
- mode?: SelectItemMode | undefined;
33
+ mode?: SelectItemMode;
34
34
  }) => Promise<void>;
35
35
  };
36
36
  openQuickInsert: (inputMethod: TypeAheadInputMethod) => boolean;
@@ -40,7 +40,7 @@ export declare const createTypeAheadTools: (editorView: EditorView) => {
40
40
  close: (options?: CloseOptions) => boolean;
41
41
  insert: ({ index, mode }: {
42
42
  index: number;
43
- mode?: SelectItemMode | undefined;
43
+ mode?: SelectItemMode;
44
44
  }) => Promise<void>;
45
45
  };
46
46
  openEmoji: (inputMethod: TypeAheadInputMethod) => boolean;
@@ -50,7 +50,7 @@ export declare const createTypeAheadTools: (editorView: EditorView) => {
50
50
  close: (options?: CloseOptions) => boolean;
51
51
  insert: ({ index, mode }: {
52
52
  index: number;
53
- mode?: SelectItemMode | undefined;
53
+ mode?: SelectItemMode;
54
54
  }) => Promise<void>;
55
55
  };
56
56
  insertItemMention: ({ contentItem, query, sourceListItem }: InsertItemProps) => boolean;
@@ -0,0 +1,2 @@
1
+ import type { EditorCommand } from '@atlaskit/editor-common/types';
2
+ export declare const clearListError: () => EditorCommand;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { jsx } from '@emotion/react';
3
2
  type Props = {
4
3
  onClick: () => void;
@@ -17,11 +17,11 @@ export declare const TypeAheadList: React.FC<import("react-intl-next").WithIntlP
17
17
  onItemClick: (mode: SelectItemMode, index: number, inputMethod?: InputMethodType) => void;
18
18
  fitHeight: number;
19
19
  decorationElement: HTMLElement;
20
- triggerHandler?: TypeAheadHandler | undefined;
21
- moreElementsInQuickInsertViewEnabled?: boolean | undefined;
20
+ triggerHandler?: TypeAheadHandler;
21
+ moreElementsInQuickInsertViewEnabled?: boolean;
22
22
  api: ExtractInjectionAPI<TypeAheadPlugin> | undefined;
23
- showMoreOptionsButton?: boolean | undefined;
24
- onMoreOptionsClicked?: (() => void) | undefined;
23
+ showMoreOptionsButton?: boolean;
24
+ onMoreOptionsClicked?: () => void;
25
25
  } & WrappedComponentProps>> & {
26
26
  WrappedComponent: React.ComponentType<{
27
27
  items: Array<TypeAheadItem>;
@@ -30,10 +30,10 @@ export declare const TypeAheadList: React.FC<import("react-intl-next").WithIntlP
30
30
  onItemClick: (mode: SelectItemMode, index: number, inputMethod?: InputMethodType) => void;
31
31
  fitHeight: number;
32
32
  decorationElement: HTMLElement;
33
- triggerHandler?: TypeAheadHandler | undefined;
34
- moreElementsInQuickInsertViewEnabled?: boolean | undefined;
33
+ triggerHandler?: TypeAheadHandler;
34
+ moreElementsInQuickInsertViewEnabled?: boolean;
35
35
  api: ExtractInjectionAPI<TypeAheadPlugin> | undefined;
36
- showMoreOptionsButton?: boolean | undefined;
37
- onMoreOptionsClicked?: (() => void) | undefined;
36
+ showMoreOptionsButton?: boolean;
37
+ onMoreOptionsClicked?: () => void;
38
38
  } & WrappedComponentProps>;
39
39
  };
@@ -1,3 +1,4 @@
1
- import type { TypeAheadHandler, TypeAheadItem } from '@atlaskit/editor-common/types';
1
+ import type { ExtractInjectionAPI, TypeAheadHandler, TypeAheadItem } from '@atlaskit/editor-common/types';
2
2
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
- export declare const useLoadItems: (triggerHandler: TypeAheadHandler, editorView: EditorView, query: string, showViewMore?: boolean) => Array<TypeAheadItem>;
3
+ import type { TypeAheadPlugin } from '../../typeAheadPluginType';
4
+ export declare const useLoadItems: (triggerHandler: TypeAheadHandler, editorView: EditorView, query: string, showViewMore?: boolean, api?: ExtractInjectionAPI<TypeAheadPlugin> | undefined) => Array<TypeAheadItem>;
@@ -6,5 +6,6 @@ export declare enum ACTIONS {
6
6
  INSERT_RAW_QUERY = "INSERT_RAW_QUERY",
7
7
  UPDATE_LIST_ITEMS = "UPDATE_LIST_ITEMS",
8
8
  UPDATE_LIST_ERROR = "UPDATE_LIST_ERROR",
9
+ CLEAR_LIST_ERROR = "CLEAR_LIST_ERROR",
9
10
  UPDATE_SELECTED_INDEX = "UPDATE_SELECTED_INDEX"
10
11
  }
@@ -1,4 +1,4 @@
1
- import { ACTION, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
1
+ import { ACTION, type INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
2
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
3
  import type { TypeAheadPlugin } from '../typeAheadPluginType';
4
4
  import type { TypeAheadInputMethod } from '../types';
@@ -30,7 +30,7 @@ export declare const createTypeAheadTools: (editorView: EditorView) => {
30
30
  close: (options?: CloseOptions) => boolean;
31
31
  insert: ({ index, mode }: {
32
32
  index: number;
33
- mode?: SelectItemMode | undefined;
33
+ mode?: SelectItemMode;
34
34
  }) => Promise<void>;
35
35
  };
36
36
  openQuickInsert: (inputMethod: TypeAheadInputMethod) => boolean;
@@ -40,7 +40,7 @@ export declare const createTypeAheadTools: (editorView: EditorView) => {
40
40
  close: (options?: CloseOptions) => boolean;
41
41
  insert: ({ index, mode }: {
42
42
  index: number;
43
- mode?: SelectItemMode | undefined;
43
+ mode?: SelectItemMode;
44
44
  }) => Promise<void>;
45
45
  };
46
46
  openEmoji: (inputMethod: TypeAheadInputMethod) => boolean;
@@ -50,7 +50,7 @@ export declare const createTypeAheadTools: (editorView: EditorView) => {
50
50
  close: (options?: CloseOptions) => boolean;
51
51
  insert: ({ index, mode }: {
52
52
  index: number;
53
- mode?: SelectItemMode | undefined;
53
+ mode?: SelectItemMode;
54
54
  }) => Promise<void>;
55
55
  };
56
56
  insertItemMention: ({ contentItem, query, sourceListItem }: InsertItemProps) => boolean;
@@ -0,0 +1,2 @@
1
+ import type { EditorCommand } from '@atlaskit/editor-common/types';
2
+ export declare const clearListError: () => EditorCommand;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { jsx } from '@emotion/react';
3
2
  type Props = {
4
3
  onClick: () => void;
@@ -17,11 +17,11 @@ export declare const TypeAheadList: React.FC<import("react-intl-next").WithIntlP
17
17
  onItemClick: (mode: SelectItemMode, index: number, inputMethod?: InputMethodType) => void;
18
18
  fitHeight: number;
19
19
  decorationElement: HTMLElement;
20
- triggerHandler?: TypeAheadHandler | undefined;
21
- moreElementsInQuickInsertViewEnabled?: boolean | undefined;
20
+ triggerHandler?: TypeAheadHandler;
21
+ moreElementsInQuickInsertViewEnabled?: boolean;
22
22
  api: ExtractInjectionAPI<TypeAheadPlugin> | undefined;
23
- showMoreOptionsButton?: boolean | undefined;
24
- onMoreOptionsClicked?: (() => void) | undefined;
23
+ showMoreOptionsButton?: boolean;
24
+ onMoreOptionsClicked?: () => void;
25
25
  } & WrappedComponentProps>> & {
26
26
  WrappedComponent: React.ComponentType<{
27
27
  items: Array<TypeAheadItem>;
@@ -30,10 +30,10 @@ export declare const TypeAheadList: React.FC<import("react-intl-next").WithIntlP
30
30
  onItemClick: (mode: SelectItemMode, index: number, inputMethod?: InputMethodType) => void;
31
31
  fitHeight: number;
32
32
  decorationElement: HTMLElement;
33
- triggerHandler?: TypeAheadHandler | undefined;
34
- moreElementsInQuickInsertViewEnabled?: boolean | undefined;
33
+ triggerHandler?: TypeAheadHandler;
34
+ moreElementsInQuickInsertViewEnabled?: boolean;
35
35
  api: ExtractInjectionAPI<TypeAheadPlugin> | undefined;
36
- showMoreOptionsButton?: boolean | undefined;
37
- onMoreOptionsClicked?: (() => void) | undefined;
36
+ showMoreOptionsButton?: boolean;
37
+ onMoreOptionsClicked?: () => void;
38
38
  } & WrappedComponentProps>;
39
39
  };
@@ -1,3 +1,4 @@
1
- import type { TypeAheadHandler, TypeAheadItem } from '@atlaskit/editor-common/types';
1
+ import type { ExtractInjectionAPI, TypeAheadHandler, TypeAheadItem } from '@atlaskit/editor-common/types';
2
2
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
- export declare const useLoadItems: (triggerHandler: TypeAheadHandler, editorView: EditorView, query: string, showViewMore?: boolean) => Array<TypeAheadItem>;
3
+ import type { TypeAheadPlugin } from '../../typeAheadPluginType';
4
+ export declare const useLoadItems: (triggerHandler: TypeAheadHandler, editorView: EditorView, query: string, showViewMore?: boolean, api?: ExtractInjectionAPI<TypeAheadPlugin> | undefined) => Array<TypeAheadItem>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-type-ahead",
3
- "version": "2.7.20",
3
+ "version": "3.0.1",
4
4
  "description": "Type-ahead plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -9,8 +9,7 @@
9
9
  },
10
10
  "atlassian": {
11
11
  "team": "Editor: Lego",
12
- "singleton": true,
13
- "runReact18": true
12
+ "singleton": true
14
13
  },
15
14
  "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
16
15
  "main": "dist/cjs/index.js",
@@ -34,22 +33,21 @@
34
33
  },
35
34
  "dependencies": {
36
35
  "@atlaskit/adf-schema": "^47.6.0",
37
- "@atlaskit/editor-common": "^107.2.0",
38
- "@atlaskit/editor-element-browser": "^0.1.0",
39
- "@atlaskit/editor-plugin-analytics": "^2.3.0",
40
- "@atlaskit/editor-plugin-connectivity": "^2.0.0",
41
- "@atlaskit/editor-plugin-context-panel": "^4.1.0",
42
- "@atlaskit/editor-plugin-metrics": "^3.5.0",
36
+ "@atlaskit/editor-element-browser": "^1.0.0",
37
+ "@atlaskit/editor-plugin-analytics": "^3.0.0",
38
+ "@atlaskit/editor-plugin-connectivity": "^3.0.0",
39
+ "@atlaskit/editor-plugin-context-panel": "^5.0.0",
40
+ "@atlaskit/editor-plugin-metrics": "^4.0.0",
43
41
  "@atlaskit/editor-prosemirror": "7.0.0",
44
42
  "@atlaskit/editor-shared-styles": "^3.4.0",
45
43
  "@atlaskit/heading": "^5.2.0",
46
44
  "@atlaskit/icon": "^27.2.0",
47
45
  "@atlaskit/menu": "^8.0.0",
48
46
  "@atlaskit/platform-feature-flags": "^1.1.0",
49
- "@atlaskit/primitives": "^14.9.0",
47
+ "@atlaskit/primitives": "^14.10.0",
50
48
  "@atlaskit/prosemirror-input-rules": "^3.3.0",
51
49
  "@atlaskit/theme": "^18.0.0",
52
- "@atlaskit/tmp-editor-statsig": "^8.2.0",
50
+ "@atlaskit/tmp-editor-statsig": "^8.8.0",
53
51
  "@atlaskit/tokens": "^5.4.0",
54
52
  "@babel/runtime": "^7.0.0",
55
53
  "@emotion/react": "^11.7.1",
@@ -60,6 +58,7 @@
60
58
  "w3c-keyname": "^2.1.8"
61
59
  },
62
60
  "peerDependencies": {
61
+ "@atlaskit/editor-common": "^107.7.0",
63
62
  "react": "^18.2.0",
64
63
  "react-dom": "^18.2.0",
65
64
  "react-intl-next": "npm:react-intl@^5.18.1"
@@ -105,9 +104,6 @@
105
104
  "platform_editor_quick_insert_placeholder": {
106
105
  "type": "boolean"
107
106
  },
108
- "platform_editor_controls_patch_4": {
109
- "type": "boolean"
110
- },
111
107
  "platform_editor_controls_patch_analytics_3": {
112
108
  "type": "boolean"
113
109
  },