@atlaskit/editor-core 188.10.4 → 188.10.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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 188.10.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [#41549](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41549) [`2b9597a3f14`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2b9597a3f14) - ESS-3896-remove-safer-dispatch-transaction-FF
8
+
3
9
  ## 188.10.4
4
10
 
5
11
  ### Patch Changes
@@ -275,11 +275,10 @@ var ReactEditorView = exports.ReactEditorView = /*#__PURE__*/function (_React$Co
275
275
  }
276
276
  var nodes = (0, _nodes.findChangedNodesFromTransaction)(unsafeTransaction);
277
277
  var changedNodesValid = (0, _nodes.validateNodes)(nodes);
278
- var transaction = _this.featureFlags.saferDispatchedTransactions || _this.featureFlags.saferDispatchedTransactionsAnalyticsOnly ? new Proxy(unsafeTransaction, (0, _saferTransactions.freezeUnsafeTransactionProperties)({
278
+ var transaction = new Proxy(unsafeTransaction, (0, _saferTransactions.freezeUnsafeTransactionProperties)({
279
279
  dispatchAnalyticsEvent: _this.dispatchAnalyticsEvent,
280
- pluginKey: 'unknown-reacteditorview',
281
- analyticsOnly: _this.featureFlags.saferDispatchedTransactionsAnalyticsOnly
282
- })) : unsafeTransaction;
280
+ pluginKey: 'unknown-reacteditorview'
281
+ }));
283
282
  if (changedNodesValid) {
284
283
  var oldEditorState = _this.view.state;
285
284
 
@@ -101,15 +101,14 @@ function createPMPlugins(config) {
101
101
  _config$performanceTr = config.performanceTracking,
102
102
  performanceTracking = _config$performanceTr === void 0 ? {} : _config$performanceTr,
103
103
  transactionTracker = config.transactionTracker,
104
- featureFlags = config.featureFlags,
105
104
  dispatchAnalyticsEvent = config.dispatchAnalyticsEvent;
106
105
  var _performanceTracking$ = performanceTracking.uiTracking,
107
106
  uiTracking = _performanceTracking$ === void 0 ? TRACKING_DEFAULT : _performanceTracking$,
108
107
  _performanceTracking$2 = performanceTracking.transactionTracking,
109
108
  transactionTracking = _performanceTracking$2 === void 0 ? TRACKING_DEFAULT : _performanceTracking$2;
110
- var saferDispatchedTransactions = featureFlags.saferDispatchedTransactions;
111
- var saferDispatchedTransactionsAnalyticsOnly = featureFlags.saferDispatchedTransactionsAnalyticsOnly;
112
- var useInstrumentedPlugin = uiTracking.enabled || transactionTracking.enabled || saferDispatchedTransactions || saferDispatchedTransactionsAnalyticsOnly;
109
+
110
+ // TO-DO need to question editor team about this condition true here
111
+ var useInstrumentedPlugin = uiTracking.enabled || transactionTracking.enabled || true;
113
112
  if (process.env.NODE_ENV === 'development' && transactionTracking.enabled && !transactionTracker) {
114
113
  // eslint-disable-next-line no-console
115
114
  console.warn('createPMPlugins(): tracking is turned on but transactionTracker not defined! Transaction tracking has been disabled');
@@ -118,8 +117,6 @@ function createPMPlugins(config) {
118
117
  return _instrumentedPlugin.InstrumentedPlugin.fromPlugin(plugin, {
119
118
  uiTracking: uiTracking,
120
119
  transactionTracking: transactionTracking,
121
- saferDispatchedTransactions: saferDispatchedTransactions,
122
- saferDispatchedTransactionsAnalyticsOnly: saferDispatchedTransactionsAnalyticsOnly,
123
120
  dispatchAnalyticsEvent: dispatchAnalyticsEvent
124
121
  }, transactionTracker);
125
122
  } : function (plugin) {
@@ -32,7 +32,7 @@ function getSpellCheck(featureFlags) {
32
32
  * which is used by both current and archv3 editors.
33
33
  */
34
34
  function createFeatureFlagsFromProps(props) {
35
- var _props$allowLayouts, _props$performanceTra, _props$allowExtension, _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$featureFlags5, _props$featureFlags6, _props$featureFlags7, _props$featureFlags8, _props$featureFlags9, _props$featureFlags10, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$collabEdit, _props$collabEdit2, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27;
35
+ var _props$allowLayouts, _props$performanceTra, _props$allowExtension, _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$featureFlags5, _props$featureFlags6, _props$featureFlags7, _props$featureFlags8, _props$featureFlags9, _props$featureFlags10, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$collabEdit, _props$collabEdit2, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23;
36
36
  var normalizedFeatureFlags = (0, _normalizeFeatureFlags.normalizeFeatureFlags)(props.featureFlags);
37
37
  return _objectSpread(_objectSpread({}, normalizedFeatureFlags), {}, {
38
38
  newInsertionBehaviour: props.allowNewInsertionBehaviour,
@@ -52,18 +52,16 @@ function createFeatureFlagsFromProps(props) {
52
52
  collabAvatarScroll: Boolean(typeof ((_props$featureFlags9 = props.featureFlags) === null || _props$featureFlags9 === void 0 ? void 0 : _props$featureFlags9.collabAvatarScroll) === 'boolean' ? !!((_props$featureFlags10 = props.featureFlags) !== null && _props$featureFlags10 !== void 0 && _props$featureFlags10.collabAvatarScroll) : false),
53
53
  ufo: Boolean(typeof ((_props$featureFlags11 = props.featureFlags) === null || _props$featureFlags11 === void 0 ? void 0 : _props$featureFlags11.ufo) === 'boolean' ? !!((_props$featureFlags12 = props.featureFlags) !== null && _props$featureFlags12 !== void 0 && _props$featureFlags12.ufo) : false),
54
54
  twoLineEditorToolbar: Boolean(typeof ((_props$featureFlags13 = props.featureFlags) === null || _props$featureFlags13 === void 0 ? void 0 : _props$featureFlags13.twoLineEditorToolbar) === 'boolean' ? !!((_props$featureFlags14 = props.featureFlags) !== null && _props$featureFlags14 !== void 0 && _props$featureFlags14.twoLineEditorToolbar) : false),
55
- saferDispatchedTransactions: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactions === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactions || (typeof ((_props$featureFlags15 = props.featureFlags) === null || _props$featureFlags15 === void 0 ? void 0 : _props$featureFlags15.saferDispatchedTransactions) === 'boolean' ? !!((_props$featureFlags16 = props.featureFlags) !== null && _props$featureFlags16 !== void 0 && _props$featureFlags16.saferDispatchedTransactions) : false)),
56
- saferDispatchedTransactionsAnalyticsOnly: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactionsAnalyticsOnly === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactionsAnalyticsOnly || (typeof ((_props$featureFlags17 = props.featureFlags) === null || _props$featureFlags17 === void 0 ? void 0 : _props$featureFlags17.saferDispatchedTransactionsAnalyticsOnly) === 'boolean' ? !!((_props$featureFlags18 = props.featureFlags) !== null && _props$featureFlags18 !== void 0 && _props$featureFlags18.saferDispatchedTransactionsAnalyticsOnly) : false)),
57
55
  useNativeCollabPlugin: Boolean(typeof ((_props$collabEdit = props.collabEdit) === null || _props$collabEdit === void 0 ? void 0 : _props$collabEdit.useNativePlugin) === 'boolean' ? !!((_props$collabEdit2 = props.collabEdit) !== null && _props$collabEdit2 !== void 0 && _props$collabEdit2.useNativePlugin) : false),
58
- chromeCursorHandlerFixedVersion: typeof ((_props$featureFlags19 = props.featureFlags) === null || _props$featureFlags19 === void 0 ? void 0 : _props$featureFlags19.chromeCursorHandlerFixedVersion) === 'string' ? Number(props.featureFlags.chromeCursorHandlerFixedVersion) || undefined : undefined,
59
- showHoverPreview: Boolean(typeof ((_props$featureFlags20 = props.featureFlags) === null || _props$featureFlags20 === void 0 ? void 0 : _props$featureFlags20.showHoverPreview) === 'boolean' ? !!((_props$featureFlags21 = props.featureFlags) !== null && _props$featureFlags21 !== void 0 && _props$featureFlags21.showHoverPreview) : false),
60
- indentationButtonsInTheToolbar: typeof props.showIndentationButtons === 'boolean' ? props.showIndentationButtons : Boolean(typeof normalizedFeatureFlags.indentationButtonsInTheToolbar === 'boolean' && !!normalizedFeatureFlags.indentationButtonsInTheToolbar || (typeof ((_props$featureFlags22 = props.featureFlags) === null || _props$featureFlags22 === void 0 ? void 0 : _props$featureFlags22.indentationButtonsInTheToolbar) === 'boolean' ? !!((_props$featureFlags23 = props.featureFlags) !== null && _props$featureFlags23 !== void 0 && _props$featureFlags23.indentationButtonsInTheToolbar) : false)),
61
- floatingToolbarLinkSettingsButton: typeof ((_props$featureFlags24 = props.featureFlags) === null || _props$featureFlags24 === void 0 ? void 0 : _props$featureFlags24['floating-toolbar-link-settings-button']) === 'string' ? props.featureFlags['floating-toolbar-link-settings-button'] || undefined : undefined,
56
+ chromeCursorHandlerFixedVersion: typeof ((_props$featureFlags15 = props.featureFlags) === null || _props$featureFlags15 === void 0 ? void 0 : _props$featureFlags15.chromeCursorHandlerFixedVersion) === 'string' ? Number(props.featureFlags.chromeCursorHandlerFixedVersion) || undefined : undefined,
57
+ showHoverPreview: Boolean(typeof ((_props$featureFlags16 = props.featureFlags) === null || _props$featureFlags16 === void 0 ? void 0 : _props$featureFlags16.showHoverPreview) === 'boolean' ? !!((_props$featureFlags17 = props.featureFlags) !== null && _props$featureFlags17 !== void 0 && _props$featureFlags17.showHoverPreview) : false),
58
+ indentationButtonsInTheToolbar: typeof props.showIndentationButtons === 'boolean' ? props.showIndentationButtons : Boolean(typeof normalizedFeatureFlags.indentationButtonsInTheToolbar === 'boolean' && !!normalizedFeatureFlags.indentationButtonsInTheToolbar || (typeof ((_props$featureFlags18 = props.featureFlags) === null || _props$featureFlags18 === void 0 ? void 0 : _props$featureFlags18.indentationButtonsInTheToolbar) === 'boolean' ? !!((_props$featureFlags19 = props.featureFlags) !== null && _props$featureFlags19 !== void 0 && _props$featureFlags19.indentationButtonsInTheToolbar) : false)),
59
+ floatingToolbarLinkSettingsButton: typeof ((_props$featureFlags20 = props.featureFlags) === null || _props$featureFlags20 === void 0 ? void 0 : _props$featureFlags20['floating-toolbar-link-settings-button']) === 'string' ? props.featureFlags['floating-toolbar-link-settings-button'] || undefined : undefined,
62
60
  disableSpellcheckByBrowser: getSpellCheck(props.featureFlags),
63
61
  // Including fallback to props.featureFlags so that mobile feature flags
64
62
  // are included (they are not kebab cased)
65
- restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$featureFlags25 = props.featureFlags) === null || _props$featureFlags25 === void 0 ? void 0 : _props$featureFlags25.restartNumberedLists) === true,
63
+ restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$featureFlags21 = props.featureFlags) === null || _props$featureFlags21 === void 0 ? void 0 : _props$featureFlags21.restartNumberedLists) === true,
66
64
  lpLinkPickerFocusTrap: Boolean(normalizedFeatureFlags.lpLinkPickerFocusTrap),
67
- preventPopupOverflow: Boolean(typeof ((_props$featureFlags26 = props.featureFlags) === null || _props$featureFlags26 === void 0 ? void 0 : _props$featureFlags26['prevent-popup-overflow']) === 'boolean' ? !!((_props$featureFlags27 = props.featureFlags) !== null && _props$featureFlags27 !== void 0 && _props$featureFlags27['prevent-popup-overflow']) : false)
65
+ preventPopupOverflow: Boolean(typeof ((_props$featureFlags22 = props.featureFlags) === null || _props$featureFlags22 === void 0 ? void 0 : _props$featureFlags22['prevent-popup-overflow']) === 'boolean' ? !!((_props$featureFlags23 = props.featureFlags) !== null && _props$featureFlags23 !== void 0 && _props$featureFlags23['prevent-popup-overflow']) : false)
68
66
  });
69
67
  }
@@ -32,21 +32,15 @@ var InstrumentedPlugin = exports.InstrumentedPlugin = /*#__PURE__*/function (_Sa
32
32
  uiTracking = _options$uiTracking === void 0 ? {
33
33
  enabled: false
34
34
  } : _options$uiTracking,
35
- _options$saferDispatc = options.saferDispatchedTransactions,
36
- saferDispatchedTransactions = _options$saferDispatc === void 0 ? false : _options$saferDispatc,
37
- _options$saferDispatc2 = options.saferDispatchedTransactionsAnalyticsOnly,
38
- saferDispatchedTransactionsAnalyticsOnly = _options$saferDispatc2 === void 0 ? false : _options$saferDispatc2,
39
35
  dispatchAnalyticsEvent = options.dispatchAnalyticsEvent;
40
- var shouldOverrideApply = transactionTracking.enabled && transactionTracker || saferDispatchedTransactions || saferDispatchedTransactionsAnalyticsOnly;
41
- if (shouldOverrideApply && spec.state) {
36
+ if (spec.state) {
42
37
  var originalApply = spec.state.apply.bind(spec.state);
43
38
  spec.state.apply = function (aTr, value, oldState, newState) {
44
39
  var self = (0, _assertThisInitialized2.default)(_this);
45
- var tr = saferDispatchedTransactions || saferDispatchedTransactionsAnalyticsOnly ? new Proxy(aTr, (0, _saferTransactions.freezeUnsafeTransactionProperties)({
40
+ var tr = new Proxy(aTr, (0, _saferTransactions.freezeUnsafeTransactionProperties)({
46
41
  dispatchAnalyticsEvent: dispatchAnalyticsEvent,
47
- pluginKey: self.key,
48
- analyticsOnly: saferDispatchedTransactionsAnalyticsOnly
49
- })) : aTr;
42
+ pluginKey: self.key
43
+ }));
50
44
  var shouldTrackTransactions = transactionTracker === null || transactionTracker === void 0 ? void 0 : transactionTracker.shouldTrackTransaction(transactionTracking);
51
45
  if (!shouldTrackTransactions || !transactionTracker) {
52
46
  return originalApply(tr, value, oldState, newState);
@@ -16,8 +16,7 @@ var isReadOnlyProperty = function isReadOnlyProperty(prop) {
16
16
  };
17
17
  var freezeUnsafeTransactionProperties = exports.freezeUnsafeTransactionProperties = function freezeUnsafeTransactionProperties(_ref) {
18
18
  var dispatchAnalyticsEvent = _ref.dispatchAnalyticsEvent,
19
- pluginKey = _ref.pluginKey,
20
- analyticsOnly = _ref.analyticsOnly;
19
+ pluginKey = _ref.pluginKey;
21
20
  var isUnsafe = function isUnsafe() {
22
21
  if (dispatchAnalyticsEvent) {
23
22
  dispatchAnalyticsEvent({
@@ -32,9 +31,7 @@ var freezeUnsafeTransactionProperties = exports.freezeUnsafeTransactionPropertie
32
31
  }
33
32
  });
34
33
  }
35
- if (!analyticsOnly) {
36
- throw new Error(UNSAFE_PROPERTY_SET_ERROR);
37
- }
34
+ throw new Error(UNSAFE_PROPERTY_SET_ERROR);
38
35
  };
39
36
  return {
40
37
  get: function get(target, prop, receiver) {
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.nextMajorVersion = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "188.10.4";
8
+ var version = exports.version = "188.10.5";
9
9
  var nextMajorVersion = exports.nextMajorVersion = function nextMajorVersion() {
10
10
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
11
11
  };
@@ -276,11 +276,10 @@ export class ReactEditorView extends React.Component {
276
276
  }
277
277
  const nodes = findChangedNodesFromTransaction(unsafeTransaction);
278
278
  const changedNodesValid = validateNodes(nodes);
279
- const transaction = this.featureFlags.saferDispatchedTransactions || this.featureFlags.saferDispatchedTransactionsAnalyticsOnly ? new Proxy(unsafeTransaction, freezeUnsafeTransactionProperties({
279
+ const transaction = new Proxy(unsafeTransaction, freezeUnsafeTransactionProperties({
280
280
  dispatchAnalyticsEvent: this.dispatchAnalyticsEvent,
281
- pluginKey: 'unknown-reacteditorview',
282
- analyticsOnly: this.featureFlags.saferDispatchedTransactionsAnalyticsOnly
283
- })) : unsafeTransaction;
281
+ pluginKey: 'unknown-reacteditorview'
282
+ }));
284
283
  if (changedNodesValid) {
285
284
  const oldEditorState = this.view.state;
286
285
 
@@ -82,16 +82,15 @@ export function createPMPlugins(config) {
82
82
  editorConfig,
83
83
  performanceTracking = {},
84
84
  transactionTracker,
85
- featureFlags,
86
85
  dispatchAnalyticsEvent
87
86
  } = config;
88
87
  const {
89
88
  uiTracking = TRACKING_DEFAULT,
90
89
  transactionTracking = TRACKING_DEFAULT
91
90
  } = performanceTracking;
92
- const saferDispatchedTransactions = featureFlags.saferDispatchedTransactions;
93
- const saferDispatchedTransactionsAnalyticsOnly = featureFlags.saferDispatchedTransactionsAnalyticsOnly;
94
- const useInstrumentedPlugin = uiTracking.enabled || transactionTracking.enabled || saferDispatchedTransactions || saferDispatchedTransactionsAnalyticsOnly;
91
+
92
+ // TO-DO need to question editor team about this condition true here
93
+ const useInstrumentedPlugin = uiTracking.enabled || transactionTracking.enabled || true;
95
94
  if (process.env.NODE_ENV === 'development' && transactionTracking.enabled && !transactionTracker) {
96
95
  // eslint-disable-next-line no-console
97
96
  console.warn('createPMPlugins(): tracking is turned on but transactionTracker not defined! Transaction tracking has been disabled');
@@ -99,8 +98,6 @@ export function createPMPlugins(config) {
99
98
  const instrumentPlugin = useInstrumentedPlugin ? plugin => InstrumentedPlugin.fromPlugin(plugin, {
100
99
  uiTracking,
101
100
  transactionTracking,
102
- saferDispatchedTransactions,
103
- saferDispatchedTransactionsAnalyticsOnly,
104
101
  dispatchAnalyticsEvent
105
102
  }, transactionTracker) : plugin => plugin;
106
103
  return editorConfig.pmPlugins.sort(sortByOrder('plugins')).map(({
@@ -21,7 +21,7 @@ function getSpellCheck(featureFlags) {
21
21
  * which is used by both current and archv3 editors.
22
22
  */
23
23
  export function createFeatureFlagsFromProps(props) {
24
- var _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$allowExtension, _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$featureFlags5, _props$featureFlags6, _props$featureFlags7, _props$featureFlags8, _props$featureFlags9, _props$featureFlags10, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$collabEdit, _props$collabEdit2, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27;
24
+ var _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$allowExtension, _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$featureFlags5, _props$featureFlags6, _props$featureFlags7, _props$featureFlags8, _props$featureFlags9, _props$featureFlags10, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$collabEdit, _props$collabEdit2, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23;
25
25
  const normalizedFeatureFlags = normalizeFeatureFlags(props.featureFlags);
26
26
  return {
27
27
  ...normalizedFeatureFlags,
@@ -42,18 +42,16 @@ export function createFeatureFlagsFromProps(props) {
42
42
  collabAvatarScroll: Boolean(typeof ((_props$featureFlags9 = props.featureFlags) === null || _props$featureFlags9 === void 0 ? void 0 : _props$featureFlags9.collabAvatarScroll) === 'boolean' ? !!((_props$featureFlags10 = props.featureFlags) !== null && _props$featureFlags10 !== void 0 && _props$featureFlags10.collabAvatarScroll) : false),
43
43
  ufo: Boolean(typeof ((_props$featureFlags11 = props.featureFlags) === null || _props$featureFlags11 === void 0 ? void 0 : _props$featureFlags11.ufo) === 'boolean' ? !!((_props$featureFlags12 = props.featureFlags) !== null && _props$featureFlags12 !== void 0 && _props$featureFlags12.ufo) : false),
44
44
  twoLineEditorToolbar: Boolean(typeof ((_props$featureFlags13 = props.featureFlags) === null || _props$featureFlags13 === void 0 ? void 0 : _props$featureFlags13.twoLineEditorToolbar) === 'boolean' ? !!((_props$featureFlags14 = props.featureFlags) !== null && _props$featureFlags14 !== void 0 && _props$featureFlags14.twoLineEditorToolbar) : false),
45
- saferDispatchedTransactions: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactions === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactions || (typeof ((_props$featureFlags15 = props.featureFlags) === null || _props$featureFlags15 === void 0 ? void 0 : _props$featureFlags15.saferDispatchedTransactions) === 'boolean' ? !!((_props$featureFlags16 = props.featureFlags) !== null && _props$featureFlags16 !== void 0 && _props$featureFlags16.saferDispatchedTransactions) : false)),
46
- saferDispatchedTransactionsAnalyticsOnly: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactionsAnalyticsOnly === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactionsAnalyticsOnly || (typeof ((_props$featureFlags17 = props.featureFlags) === null || _props$featureFlags17 === void 0 ? void 0 : _props$featureFlags17.saferDispatchedTransactionsAnalyticsOnly) === 'boolean' ? !!((_props$featureFlags18 = props.featureFlags) !== null && _props$featureFlags18 !== void 0 && _props$featureFlags18.saferDispatchedTransactionsAnalyticsOnly) : false)),
47
45
  useNativeCollabPlugin: Boolean(typeof ((_props$collabEdit = props.collabEdit) === null || _props$collabEdit === void 0 ? void 0 : _props$collabEdit.useNativePlugin) === 'boolean' ? !!((_props$collabEdit2 = props.collabEdit) !== null && _props$collabEdit2 !== void 0 && _props$collabEdit2.useNativePlugin) : false),
48
- chromeCursorHandlerFixedVersion: typeof ((_props$featureFlags19 = props.featureFlags) === null || _props$featureFlags19 === void 0 ? void 0 : _props$featureFlags19.chromeCursorHandlerFixedVersion) === 'string' ? Number(props.featureFlags.chromeCursorHandlerFixedVersion) || undefined : undefined,
49
- showHoverPreview: Boolean(typeof ((_props$featureFlags20 = props.featureFlags) === null || _props$featureFlags20 === void 0 ? void 0 : _props$featureFlags20.showHoverPreview) === 'boolean' ? !!((_props$featureFlags21 = props.featureFlags) !== null && _props$featureFlags21 !== void 0 && _props$featureFlags21.showHoverPreview) : false),
50
- indentationButtonsInTheToolbar: typeof props.showIndentationButtons === 'boolean' ? props.showIndentationButtons : Boolean(typeof normalizedFeatureFlags.indentationButtonsInTheToolbar === 'boolean' && !!normalizedFeatureFlags.indentationButtonsInTheToolbar || (typeof ((_props$featureFlags22 = props.featureFlags) === null || _props$featureFlags22 === void 0 ? void 0 : _props$featureFlags22.indentationButtonsInTheToolbar) === 'boolean' ? !!((_props$featureFlags23 = props.featureFlags) !== null && _props$featureFlags23 !== void 0 && _props$featureFlags23.indentationButtonsInTheToolbar) : false)),
51
- floatingToolbarLinkSettingsButton: typeof ((_props$featureFlags24 = props.featureFlags) === null || _props$featureFlags24 === void 0 ? void 0 : _props$featureFlags24['floating-toolbar-link-settings-button']) === 'string' ? props.featureFlags['floating-toolbar-link-settings-button'] || undefined : undefined,
46
+ chromeCursorHandlerFixedVersion: typeof ((_props$featureFlags15 = props.featureFlags) === null || _props$featureFlags15 === void 0 ? void 0 : _props$featureFlags15.chromeCursorHandlerFixedVersion) === 'string' ? Number(props.featureFlags.chromeCursorHandlerFixedVersion) || undefined : undefined,
47
+ showHoverPreview: Boolean(typeof ((_props$featureFlags16 = props.featureFlags) === null || _props$featureFlags16 === void 0 ? void 0 : _props$featureFlags16.showHoverPreview) === 'boolean' ? !!((_props$featureFlags17 = props.featureFlags) !== null && _props$featureFlags17 !== void 0 && _props$featureFlags17.showHoverPreview) : false),
48
+ indentationButtonsInTheToolbar: typeof props.showIndentationButtons === 'boolean' ? props.showIndentationButtons : Boolean(typeof normalizedFeatureFlags.indentationButtonsInTheToolbar === 'boolean' && !!normalizedFeatureFlags.indentationButtonsInTheToolbar || (typeof ((_props$featureFlags18 = props.featureFlags) === null || _props$featureFlags18 === void 0 ? void 0 : _props$featureFlags18.indentationButtonsInTheToolbar) === 'boolean' ? !!((_props$featureFlags19 = props.featureFlags) !== null && _props$featureFlags19 !== void 0 && _props$featureFlags19.indentationButtonsInTheToolbar) : false)),
49
+ floatingToolbarLinkSettingsButton: typeof ((_props$featureFlags20 = props.featureFlags) === null || _props$featureFlags20 === void 0 ? void 0 : _props$featureFlags20['floating-toolbar-link-settings-button']) === 'string' ? props.featureFlags['floating-toolbar-link-settings-button'] || undefined : undefined,
52
50
  disableSpellcheckByBrowser: getSpellCheck(props.featureFlags),
53
51
  // Including fallback to props.featureFlags so that mobile feature flags
54
52
  // are included (they are not kebab cased)
55
- restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$featureFlags25 = props.featureFlags) === null || _props$featureFlags25 === void 0 ? void 0 : _props$featureFlags25.restartNumberedLists) === true,
53
+ restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$featureFlags21 = props.featureFlags) === null || _props$featureFlags21 === void 0 ? void 0 : _props$featureFlags21.restartNumberedLists) === true,
56
54
  lpLinkPickerFocusTrap: Boolean(normalizedFeatureFlags.lpLinkPickerFocusTrap),
57
- preventPopupOverflow: Boolean(typeof ((_props$featureFlags26 = props.featureFlags) === null || _props$featureFlags26 === void 0 ? void 0 : _props$featureFlags26['prevent-popup-overflow']) === 'boolean' ? !!((_props$featureFlags27 = props.featureFlags) !== null && _props$featureFlags27 !== void 0 && _props$featureFlags27['prevent-popup-overflow']) : false)
55
+ preventPopupOverflow: Boolean(typeof ((_props$featureFlags22 = props.featureFlags) === null || _props$featureFlags22 === void 0 ? void 0 : _props$featureFlags22['prevent-popup-overflow']) === 'boolean' ? !!((_props$featureFlags23 = props.featureFlags) !== null && _props$featureFlags23 !== void 0 && _props$featureFlags23['prevent-popup-overflow']) : false)
58
56
  };
59
57
  }
@@ -10,20 +10,16 @@ export class InstrumentedPlugin extends SafePlugin {
10
10
  uiTracking = {
11
11
  enabled: false
12
12
  },
13
- saferDispatchedTransactions = false,
14
- saferDispatchedTransactionsAnalyticsOnly = false,
15
13
  dispatchAnalyticsEvent
16
14
  } = options;
17
- const shouldOverrideApply = transactionTracking.enabled && transactionTracker || saferDispatchedTransactions || saferDispatchedTransactionsAnalyticsOnly;
18
- if (shouldOverrideApply && spec.state) {
15
+ if (spec.state) {
19
16
  const originalApply = spec.state.apply.bind(spec.state);
20
17
  spec.state.apply = (aTr, value, oldState, newState) => {
21
18
  const self = this;
22
- const tr = saferDispatchedTransactions || saferDispatchedTransactionsAnalyticsOnly ? new Proxy(aTr, freezeUnsafeTransactionProperties({
19
+ const tr = new Proxy(aTr, freezeUnsafeTransactionProperties({
23
20
  dispatchAnalyticsEvent,
24
- pluginKey: self.key,
25
- analyticsOnly: saferDispatchedTransactionsAnalyticsOnly
26
- })) : aTr;
21
+ pluginKey: self.key
22
+ }));
27
23
  const shouldTrackTransactions = transactionTracker === null || transactionTracker === void 0 ? void 0 : transactionTracker.shouldTrackTransaction(transactionTracking);
28
24
  if (!shouldTrackTransactions || !transactionTracker) {
29
25
  return originalApply(tr, value, oldState, newState);
@@ -6,8 +6,7 @@ const isUnsafeMethod = prop => ['setSelection'].includes(prop.toString());
6
6
  const isReadOnlyProperty = prop => ['doc', 'docs', 'steps', 'selection'].includes(prop.toString());
7
7
  export const freezeUnsafeTransactionProperties = ({
8
8
  dispatchAnalyticsEvent,
9
- pluginKey,
10
- analyticsOnly
9
+ pluginKey
11
10
  }) => {
12
11
  const isUnsafe = () => {
13
12
  if (dispatchAnalyticsEvent) {
@@ -23,9 +22,7 @@ export const freezeUnsafeTransactionProperties = ({
23
22
  }
24
23
  });
25
24
  }
26
- if (!analyticsOnly) {
27
- throw new Error(UNSAFE_PROPERTY_SET_ERROR);
28
- }
25
+ throw new Error(UNSAFE_PROPERTY_SET_ERROR);
29
26
  };
30
27
  return {
31
28
  get: function (target, prop, receiver) {
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "188.10.4";
2
+ export const version = "188.10.5";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -269,11 +269,10 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
269
269
  }
270
270
  var nodes = findChangedNodesFromTransaction(unsafeTransaction);
271
271
  var changedNodesValid = validateNodes(nodes);
272
- var transaction = _this.featureFlags.saferDispatchedTransactions || _this.featureFlags.saferDispatchedTransactionsAnalyticsOnly ? new Proxy(unsafeTransaction, freezeUnsafeTransactionProperties({
272
+ var transaction = new Proxy(unsafeTransaction, freezeUnsafeTransactionProperties({
273
273
  dispatchAnalyticsEvent: _this.dispatchAnalyticsEvent,
274
- pluginKey: 'unknown-reacteditorview',
275
- analyticsOnly: _this.featureFlags.saferDispatchedTransactionsAnalyticsOnly
276
- })) : unsafeTransaction;
274
+ pluginKey: 'unknown-reacteditorview'
275
+ }));
277
276
  if (changedNodesValid) {
278
277
  var oldEditorState = _this.view.state;
279
278
 
@@ -90,15 +90,14 @@ export function createPMPlugins(config) {
90
90
  _config$performanceTr = config.performanceTracking,
91
91
  performanceTracking = _config$performanceTr === void 0 ? {} : _config$performanceTr,
92
92
  transactionTracker = config.transactionTracker,
93
- featureFlags = config.featureFlags,
94
93
  dispatchAnalyticsEvent = config.dispatchAnalyticsEvent;
95
94
  var _performanceTracking$ = performanceTracking.uiTracking,
96
95
  uiTracking = _performanceTracking$ === void 0 ? TRACKING_DEFAULT : _performanceTracking$,
97
96
  _performanceTracking$2 = performanceTracking.transactionTracking,
98
97
  transactionTracking = _performanceTracking$2 === void 0 ? TRACKING_DEFAULT : _performanceTracking$2;
99
- var saferDispatchedTransactions = featureFlags.saferDispatchedTransactions;
100
- var saferDispatchedTransactionsAnalyticsOnly = featureFlags.saferDispatchedTransactionsAnalyticsOnly;
101
- var useInstrumentedPlugin = uiTracking.enabled || transactionTracking.enabled || saferDispatchedTransactions || saferDispatchedTransactionsAnalyticsOnly;
98
+
99
+ // TO-DO need to question editor team about this condition true here
100
+ var useInstrumentedPlugin = uiTracking.enabled || transactionTracking.enabled || true;
102
101
  if (process.env.NODE_ENV === 'development' && transactionTracking.enabled && !transactionTracker) {
103
102
  // eslint-disable-next-line no-console
104
103
  console.warn('createPMPlugins(): tracking is turned on but transactionTracker not defined! Transaction tracking has been disabled');
@@ -107,8 +106,6 @@ export function createPMPlugins(config) {
107
106
  return InstrumentedPlugin.fromPlugin(plugin, {
108
107
  uiTracking: uiTracking,
109
108
  transactionTracking: transactionTracking,
110
- saferDispatchedTransactions: saferDispatchedTransactions,
111
- saferDispatchedTransactionsAnalyticsOnly: saferDispatchedTransactionsAnalyticsOnly,
112
109
  dispatchAnalyticsEvent: dispatchAnalyticsEvent
113
110
  }, transactionTracker);
114
111
  } : function (plugin) {
@@ -25,7 +25,7 @@ function getSpellCheck(featureFlags) {
25
25
  * which is used by both current and archv3 editors.
26
26
  */
27
27
  export function createFeatureFlagsFromProps(props) {
28
- var _props$allowLayouts, _props$performanceTra, _props$allowExtension, _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$featureFlags5, _props$featureFlags6, _props$featureFlags7, _props$featureFlags8, _props$featureFlags9, _props$featureFlags10, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$collabEdit, _props$collabEdit2, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27;
28
+ var _props$allowLayouts, _props$performanceTra, _props$allowExtension, _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$featureFlags5, _props$featureFlags6, _props$featureFlags7, _props$featureFlags8, _props$featureFlags9, _props$featureFlags10, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$collabEdit, _props$collabEdit2, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23;
29
29
  var normalizedFeatureFlags = normalizeFeatureFlags(props.featureFlags);
30
30
  return _objectSpread(_objectSpread({}, normalizedFeatureFlags), {}, {
31
31
  newInsertionBehaviour: props.allowNewInsertionBehaviour,
@@ -45,18 +45,16 @@ export function createFeatureFlagsFromProps(props) {
45
45
  collabAvatarScroll: Boolean(typeof ((_props$featureFlags9 = props.featureFlags) === null || _props$featureFlags9 === void 0 ? void 0 : _props$featureFlags9.collabAvatarScroll) === 'boolean' ? !!((_props$featureFlags10 = props.featureFlags) !== null && _props$featureFlags10 !== void 0 && _props$featureFlags10.collabAvatarScroll) : false),
46
46
  ufo: Boolean(typeof ((_props$featureFlags11 = props.featureFlags) === null || _props$featureFlags11 === void 0 ? void 0 : _props$featureFlags11.ufo) === 'boolean' ? !!((_props$featureFlags12 = props.featureFlags) !== null && _props$featureFlags12 !== void 0 && _props$featureFlags12.ufo) : false),
47
47
  twoLineEditorToolbar: Boolean(typeof ((_props$featureFlags13 = props.featureFlags) === null || _props$featureFlags13 === void 0 ? void 0 : _props$featureFlags13.twoLineEditorToolbar) === 'boolean' ? !!((_props$featureFlags14 = props.featureFlags) !== null && _props$featureFlags14 !== void 0 && _props$featureFlags14.twoLineEditorToolbar) : false),
48
- saferDispatchedTransactions: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactions === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactions || (typeof ((_props$featureFlags15 = props.featureFlags) === null || _props$featureFlags15 === void 0 ? void 0 : _props$featureFlags15.saferDispatchedTransactions) === 'boolean' ? !!((_props$featureFlags16 = props.featureFlags) !== null && _props$featureFlags16 !== void 0 && _props$featureFlags16.saferDispatchedTransactions) : false)),
49
- saferDispatchedTransactionsAnalyticsOnly: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactionsAnalyticsOnly === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactionsAnalyticsOnly || (typeof ((_props$featureFlags17 = props.featureFlags) === null || _props$featureFlags17 === void 0 ? void 0 : _props$featureFlags17.saferDispatchedTransactionsAnalyticsOnly) === 'boolean' ? !!((_props$featureFlags18 = props.featureFlags) !== null && _props$featureFlags18 !== void 0 && _props$featureFlags18.saferDispatchedTransactionsAnalyticsOnly) : false)),
50
48
  useNativeCollabPlugin: Boolean(typeof ((_props$collabEdit = props.collabEdit) === null || _props$collabEdit === void 0 ? void 0 : _props$collabEdit.useNativePlugin) === 'boolean' ? !!((_props$collabEdit2 = props.collabEdit) !== null && _props$collabEdit2 !== void 0 && _props$collabEdit2.useNativePlugin) : false),
51
- chromeCursorHandlerFixedVersion: typeof ((_props$featureFlags19 = props.featureFlags) === null || _props$featureFlags19 === void 0 ? void 0 : _props$featureFlags19.chromeCursorHandlerFixedVersion) === 'string' ? Number(props.featureFlags.chromeCursorHandlerFixedVersion) || undefined : undefined,
52
- showHoverPreview: Boolean(typeof ((_props$featureFlags20 = props.featureFlags) === null || _props$featureFlags20 === void 0 ? void 0 : _props$featureFlags20.showHoverPreview) === 'boolean' ? !!((_props$featureFlags21 = props.featureFlags) !== null && _props$featureFlags21 !== void 0 && _props$featureFlags21.showHoverPreview) : false),
53
- indentationButtonsInTheToolbar: typeof props.showIndentationButtons === 'boolean' ? props.showIndentationButtons : Boolean(typeof normalizedFeatureFlags.indentationButtonsInTheToolbar === 'boolean' && !!normalizedFeatureFlags.indentationButtonsInTheToolbar || (typeof ((_props$featureFlags22 = props.featureFlags) === null || _props$featureFlags22 === void 0 ? void 0 : _props$featureFlags22.indentationButtonsInTheToolbar) === 'boolean' ? !!((_props$featureFlags23 = props.featureFlags) !== null && _props$featureFlags23 !== void 0 && _props$featureFlags23.indentationButtonsInTheToolbar) : false)),
54
- floatingToolbarLinkSettingsButton: typeof ((_props$featureFlags24 = props.featureFlags) === null || _props$featureFlags24 === void 0 ? void 0 : _props$featureFlags24['floating-toolbar-link-settings-button']) === 'string' ? props.featureFlags['floating-toolbar-link-settings-button'] || undefined : undefined,
49
+ chromeCursorHandlerFixedVersion: typeof ((_props$featureFlags15 = props.featureFlags) === null || _props$featureFlags15 === void 0 ? void 0 : _props$featureFlags15.chromeCursorHandlerFixedVersion) === 'string' ? Number(props.featureFlags.chromeCursorHandlerFixedVersion) || undefined : undefined,
50
+ showHoverPreview: Boolean(typeof ((_props$featureFlags16 = props.featureFlags) === null || _props$featureFlags16 === void 0 ? void 0 : _props$featureFlags16.showHoverPreview) === 'boolean' ? !!((_props$featureFlags17 = props.featureFlags) !== null && _props$featureFlags17 !== void 0 && _props$featureFlags17.showHoverPreview) : false),
51
+ indentationButtonsInTheToolbar: typeof props.showIndentationButtons === 'boolean' ? props.showIndentationButtons : Boolean(typeof normalizedFeatureFlags.indentationButtonsInTheToolbar === 'boolean' && !!normalizedFeatureFlags.indentationButtonsInTheToolbar || (typeof ((_props$featureFlags18 = props.featureFlags) === null || _props$featureFlags18 === void 0 ? void 0 : _props$featureFlags18.indentationButtonsInTheToolbar) === 'boolean' ? !!((_props$featureFlags19 = props.featureFlags) !== null && _props$featureFlags19 !== void 0 && _props$featureFlags19.indentationButtonsInTheToolbar) : false)),
52
+ floatingToolbarLinkSettingsButton: typeof ((_props$featureFlags20 = props.featureFlags) === null || _props$featureFlags20 === void 0 ? void 0 : _props$featureFlags20['floating-toolbar-link-settings-button']) === 'string' ? props.featureFlags['floating-toolbar-link-settings-button'] || undefined : undefined,
55
53
  disableSpellcheckByBrowser: getSpellCheck(props.featureFlags),
56
54
  // Including fallback to props.featureFlags so that mobile feature flags
57
55
  // are included (they are not kebab cased)
58
- restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$featureFlags25 = props.featureFlags) === null || _props$featureFlags25 === void 0 ? void 0 : _props$featureFlags25.restartNumberedLists) === true,
56
+ restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$featureFlags21 = props.featureFlags) === null || _props$featureFlags21 === void 0 ? void 0 : _props$featureFlags21.restartNumberedLists) === true,
59
57
  lpLinkPickerFocusTrap: Boolean(normalizedFeatureFlags.lpLinkPickerFocusTrap),
60
- preventPopupOverflow: Boolean(typeof ((_props$featureFlags26 = props.featureFlags) === null || _props$featureFlags26 === void 0 ? void 0 : _props$featureFlags26['prevent-popup-overflow']) === 'boolean' ? !!((_props$featureFlags27 = props.featureFlags) !== null && _props$featureFlags27 !== void 0 && _props$featureFlags27['prevent-popup-overflow']) : false)
58
+ preventPopupOverflow: Boolean(typeof ((_props$featureFlags22 = props.featureFlags) === null || _props$featureFlags22 === void 0 ? void 0 : _props$featureFlags22['prevent-popup-overflow']) === 'boolean' ? !!((_props$featureFlags23 = props.featureFlags) !== null && _props$featureFlags23 !== void 0 && _props$featureFlags23['prevent-popup-overflow']) : false)
61
59
  });
62
60
  }
@@ -25,21 +25,15 @@ export var InstrumentedPlugin = /*#__PURE__*/function (_SafePlugin) {
25
25
  uiTracking = _options$uiTracking === void 0 ? {
26
26
  enabled: false
27
27
  } : _options$uiTracking,
28
- _options$saferDispatc = options.saferDispatchedTransactions,
29
- saferDispatchedTransactions = _options$saferDispatc === void 0 ? false : _options$saferDispatc,
30
- _options$saferDispatc2 = options.saferDispatchedTransactionsAnalyticsOnly,
31
- saferDispatchedTransactionsAnalyticsOnly = _options$saferDispatc2 === void 0 ? false : _options$saferDispatc2,
32
28
  dispatchAnalyticsEvent = options.dispatchAnalyticsEvent;
33
- var shouldOverrideApply = transactionTracking.enabled && transactionTracker || saferDispatchedTransactions || saferDispatchedTransactionsAnalyticsOnly;
34
- if (shouldOverrideApply && spec.state) {
29
+ if (spec.state) {
35
30
  var originalApply = spec.state.apply.bind(spec.state);
36
31
  spec.state.apply = function (aTr, value, oldState, newState) {
37
32
  var self = _assertThisInitialized(_this);
38
- var tr = saferDispatchedTransactions || saferDispatchedTransactionsAnalyticsOnly ? new Proxy(aTr, freezeUnsafeTransactionProperties({
33
+ var tr = new Proxy(aTr, freezeUnsafeTransactionProperties({
39
34
  dispatchAnalyticsEvent: dispatchAnalyticsEvent,
40
- pluginKey: self.key,
41
- analyticsOnly: saferDispatchedTransactionsAnalyticsOnly
42
- })) : aTr;
35
+ pluginKey: self.key
36
+ }));
43
37
  var shouldTrackTransactions = transactionTracker === null || transactionTracker === void 0 ? void 0 : transactionTracker.shouldTrackTransaction(transactionTracking);
44
38
  if (!shouldTrackTransactions || !transactionTracker) {
45
39
  return originalApply(tr, value, oldState, newState);
@@ -10,8 +10,7 @@ var isReadOnlyProperty = function isReadOnlyProperty(prop) {
10
10
  };
11
11
  export var freezeUnsafeTransactionProperties = function freezeUnsafeTransactionProperties(_ref) {
12
12
  var dispatchAnalyticsEvent = _ref.dispatchAnalyticsEvent,
13
- pluginKey = _ref.pluginKey,
14
- analyticsOnly = _ref.analyticsOnly;
13
+ pluginKey = _ref.pluginKey;
15
14
  var isUnsafe = function isUnsafe() {
16
15
  if (dispatchAnalyticsEvent) {
17
16
  dispatchAnalyticsEvent({
@@ -26,9 +25,7 @@ export var freezeUnsafeTransactionProperties = function freezeUnsafeTransactionP
26
25
  }
27
26
  });
28
27
  }
29
- if (!analyticsOnly) {
30
- throw new Error(UNSAFE_PROPERTY_SET_ERROR);
31
- }
28
+ throw new Error(UNSAFE_PROPERTY_SET_ERROR);
32
29
  };
33
30
  return {
34
31
  get: function get(target, prop, receiver) {
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "188.10.4";
2
+ export var version = "188.10.5";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -2,11 +2,8 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import type { SafePluginSpec } from '@atlaskit/editor-prosemirror/state';
3
3
  import type { EditorProps } from '../../types/editor-props';
4
4
  import type { TransactionTracker } from './track-transactions';
5
- import type { FeatureFlags } from '../../types/feature-flags';
6
5
  import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
7
6
  type InstrumentedPluginOptions = EditorProps['performanceTracking'] & {
8
- saferDispatchedTransactions?: FeatureFlags['saferDispatchedTransactions'];
9
- saferDispatchedTransactionsAnalyticsOnly?: FeatureFlags['saferDispatchedTransactionsAnalyticsOnly'];
10
7
  dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
11
8
  };
12
9
  export declare class InstrumentedPlugin<PluginState> extends SafePlugin<PluginState> {
@@ -3,7 +3,6 @@ export declare const UNSAFE_PROPERTY_SET_ERROR = "Setting an unsafe property on
3
3
  interface FreezeUnsafeTransactionOptions {
4
4
  dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
5
5
  pluginKey?: string;
6
- analyticsOnly?: boolean;
7
6
  }
8
- export declare const freezeUnsafeTransactionProperties: <TrType extends object>({ dispatchAnalyticsEvent, pluginKey, analyticsOnly, }: FreezeUnsafeTransactionOptions) => ProxyHandler<TrType>;
7
+ export declare const freezeUnsafeTransactionProperties: <TrType extends object>({ dispatchAnalyticsEvent, pluginKey, }: FreezeUnsafeTransactionOptions) => ProxyHandler<TrType>;
9
8
  export {};
@@ -2,11 +2,8 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import type { SafePluginSpec } from '@atlaskit/editor-prosemirror/state';
3
3
  import type { EditorProps } from '../../types/editor-props';
4
4
  import type { TransactionTracker } from './track-transactions';
5
- import type { FeatureFlags } from '../../types/feature-flags';
6
5
  import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
7
6
  type InstrumentedPluginOptions = EditorProps['performanceTracking'] & {
8
- saferDispatchedTransactions?: FeatureFlags['saferDispatchedTransactions'];
9
- saferDispatchedTransactionsAnalyticsOnly?: FeatureFlags['saferDispatchedTransactionsAnalyticsOnly'];
10
7
  dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
11
8
  };
12
9
  export declare class InstrumentedPlugin<PluginState> extends SafePlugin<PluginState> {
@@ -3,7 +3,6 @@ export declare const UNSAFE_PROPERTY_SET_ERROR = "Setting an unsafe property on
3
3
  interface FreezeUnsafeTransactionOptions {
4
4
  dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
5
5
  pluginKey?: string;
6
- analyticsOnly?: boolean;
7
6
  }
8
- export declare const freezeUnsafeTransactionProperties: <TrType extends object>({ dispatchAnalyticsEvent, pluginKey, analyticsOnly, }: FreezeUnsafeTransactionOptions) => ProxyHandler<TrType>;
7
+ export declare const freezeUnsafeTransactionProperties: <TrType extends object>({ dispatchAnalyticsEvent, pluginKey, }: FreezeUnsafeTransactionOptions) => ProxyHandler<TrType>;
9
8
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "188.10.4",
3
+ "version": "188.10.5",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"