@atlaskit/editor-core 209.1.5 → 209.1.7

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,23 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 209.1.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [#186321](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/186321)
8
+ [`777290660084a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/777290660084a) -
9
+ ED-28528 fix mentions selected state box shadow disappearing
10
+ - Updated dependencies
11
+
12
+ ## 209.1.6
13
+
14
+ ### Patch Changes
15
+
16
+ - [#185630](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/185630)
17
+ [`3535873b417f3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3535873b417f3) -
18
+ Remove FG platform_editor_migrate_state_updates
19
+ - Updated dependencies
20
+
3
21
  ## 209.1.5
4
22
 
5
23
  ### Patch Changes
@@ -368,6 +368,7 @@ function ReactEditorView(props) {
368
368
  }));
369
369
  }, [blur, dispatchAnalyticsEvent, eventDispatcher, dispatch, errorReporter, featureFlags]);
370
370
  var onEditorViewUpdated = (0, _react.useCallback)(function (_ref2) {
371
+ var _config$current;
371
372
  var originalTransaction = _ref2.originalTransaction,
372
373
  transactions = _ref2.transactions,
373
374
  oldEditorState = _ref2.oldEditorState,
@@ -378,17 +379,14 @@ function ReactEditorView(props) {
378
379
  oldEditorState: oldEditorState
379
380
  });
380
381
  }
381
- if (!(0, _platformFeatureFlags.fg)('platform_editor_migrate_state_updates')) {
382
- var _config$current;
383
- (_config$current = config.current) === null || _config$current === void 0 || _config$current.onEditorViewStateUpdatedCallbacks.forEach(function (entry) {
384
- entry.callback({
385
- originalTransaction: originalTransaction,
386
- transactions: transactions,
387
- oldEditorState: oldEditorState,
388
- newEditorState: newEditorState
389
- });
382
+ (_config$current = config.current) === null || _config$current === void 0 || _config$current.onEditorViewStateUpdatedCallbacks.forEach(function (entry) {
383
+ entry.callback({
384
+ originalTransaction: originalTransaction,
385
+ transactions: transactions,
386
+ oldEditorState: oldEditorState,
387
+ newEditorState: newEditorState
390
388
  });
391
- }
389
+ });
392
390
  }, []);
393
391
  var _dispatchTransaction = (0, _useDispatchTransaction.useDispatchTransaction)({
394
392
  onChange: props.editorProps.onChange,
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.createEditorStateNotificationPlugin = void 0;
7
7
  var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
8
8
  var _state = require("@atlaskit/editor-prosemirror/state");
9
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
10
9
  var key = new _state.PluginKey('editorStateNotificationPlugin');
11
10
  var createEditorStateNotificationPlugin = exports.createEditorStateNotificationPlugin = function createEditorStateNotificationPlugin(onEditorStateUpdated, onEditorViewStateUpdatedCallbacks) {
12
11
  var transactions = [];
@@ -28,19 +27,6 @@ var createEditorStateNotificationPlugin = exports.createEditorStateNotificationP
28
27
  view: function view() {
29
28
  return {
30
29
  update: function update(view, oldEditorState) {
31
- var _key$getState;
32
- var originalTransaction = (_key$getState = key.getState(view.state)) === null || _key$getState === void 0 ? void 0 : _key$getState.latestTransaction;
33
- if (originalTransaction && (0, _platformFeatureFlags.fg)('platform_editor_migrate_state_updates')) {
34
- onEditorViewStateUpdatedCallbacks.forEach(function (entry) {
35
- entry.callback({
36
- originalTransaction: originalTransaction,
37
- transactions: transactions,
38
- oldEditorState: oldEditorState,
39
- newEditorState: view.state
40
- });
41
- });
42
- transactions = [];
43
- }
44
30
  onEditorStateUpdated({
45
31
  oldEditorState: oldEditorState,
46
32
  newEditorState: view.state
@@ -142,7 +142,7 @@ var mentionsSelectionStylesWithSearchMatch = exports.mentionsSelectionStylesWith
142
142
  _selectionStyles.backgroundSelectionStyles,
143
143
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
144
144
  _selectionStyles.hideNativeBrowserTextSelectionStyles, mentionsSelectedColor]
145
- }), ".".concat(_editorSharedStyles.akEditorSelectedNodeClassName, ":not('.search-match-block')"), {
145
+ }), ".".concat(_editorSharedStyles.akEditorSelectedNodeClassName, ":not(.search-match-block)"), {
146
146
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
147
147
  '> .editor-mention-primitive, > .editor-mention-primitive.mention-self, > .editor-mention-primitive.mention-restricted':
148
148
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values,
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "209.1.4";
8
+ var version = exports.version = "209.1.6";
@@ -343,23 +343,21 @@ export function ReactEditorView(props) {
343
343
  oldEditorState,
344
344
  newEditorState
345
345
  }) => {
346
+ var _config$current;
346
347
  if (!fg('platform_editor_catch_missing_injection_states')) {
347
348
  pluginInjectionAPI.current.onEditorViewUpdated({
348
349
  newEditorState,
349
350
  oldEditorState
350
351
  });
351
352
  }
352
- if (!fg('platform_editor_migrate_state_updates')) {
353
- var _config$current;
354
- (_config$current = config.current) === null || _config$current === void 0 ? void 0 : _config$current.onEditorViewStateUpdatedCallbacks.forEach(entry => {
355
- entry.callback({
356
- originalTransaction,
357
- transactions,
358
- oldEditorState,
359
- newEditorState
360
- });
353
+ (_config$current = config.current) === null || _config$current === void 0 ? void 0 : _config$current.onEditorViewStateUpdatedCallbacks.forEach(entry => {
354
+ entry.callback({
355
+ originalTransaction,
356
+ transactions,
357
+ oldEditorState,
358
+ newEditorState
361
359
  });
362
- }
360
+ });
363
361
  }, []);
364
362
  const dispatchTransaction = useDispatchTransaction({
365
363
  onChange: props.editorProps.onChange,
@@ -1,9 +1,8 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
3
- import { fg } from '@atlaskit/platform-feature-flags';
4
3
  const key = new PluginKey('editorStateNotificationPlugin');
5
4
  export const createEditorStateNotificationPlugin = (onEditorStateUpdated, onEditorViewStateUpdatedCallbacks) => {
6
- let transactions = [];
5
+ const transactions = [];
7
6
  return new SafePlugin({
8
7
  key: key,
9
8
  state: {
@@ -22,19 +21,6 @@ export const createEditorStateNotificationPlugin = (onEditorStateUpdated, onEdit
22
21
  view: () => {
23
22
  return {
24
23
  update: (view, oldEditorState) => {
25
- var _key$getState;
26
- const originalTransaction = (_key$getState = key.getState(view.state)) === null || _key$getState === void 0 ? void 0 : _key$getState.latestTransaction;
27
- if (originalTransaction && fg('platform_editor_migrate_state_updates')) {
28
- onEditorViewStateUpdatedCallbacks.forEach(entry => {
29
- entry.callback({
30
- originalTransaction,
31
- transactions: transactions,
32
- oldEditorState,
33
- newEditorState: view.state
34
- });
35
- });
36
- transactions = [];
37
- }
38
24
  onEditorStateUpdated({
39
25
  oldEditorState,
40
26
  newEditorState: view.state
@@ -153,7 +153,7 @@ export const mentionsSelectionStylesWithSearchMatch = css({
153
153
  hideNativeBrowserTextSelectionStyles, mentionsSelectedColor]
154
154
  },
155
155
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
156
- [`.${akEditorSelectedNodeClassName}:not('.search-match-block')`]: {
156
+ [`.${akEditorSelectedNodeClassName}:not(.search-match-block)`]: {
157
157
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
158
158
  '> .editor-mention-primitive, > .editor-mention-primitive.mention-self, > .editor-mention-primitive.mention-restricted':
159
159
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values,
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "209.1.4";
2
+ export const version = "209.1.6";
@@ -358,6 +358,7 @@ export function ReactEditorView(props) {
358
358
  }));
359
359
  }, [blur, dispatchAnalyticsEvent, eventDispatcher, dispatch, errorReporter, featureFlags]);
360
360
  var onEditorViewUpdated = useCallback(function (_ref2) {
361
+ var _config$current;
361
362
  var originalTransaction = _ref2.originalTransaction,
362
363
  transactions = _ref2.transactions,
363
364
  oldEditorState = _ref2.oldEditorState,
@@ -368,17 +369,14 @@ export function ReactEditorView(props) {
368
369
  oldEditorState: oldEditorState
369
370
  });
370
371
  }
371
- if (!fg('platform_editor_migrate_state_updates')) {
372
- var _config$current;
373
- (_config$current = config.current) === null || _config$current === void 0 || _config$current.onEditorViewStateUpdatedCallbacks.forEach(function (entry) {
374
- entry.callback({
375
- originalTransaction: originalTransaction,
376
- transactions: transactions,
377
- oldEditorState: oldEditorState,
378
- newEditorState: newEditorState
379
- });
372
+ (_config$current = config.current) === null || _config$current === void 0 || _config$current.onEditorViewStateUpdatedCallbacks.forEach(function (entry) {
373
+ entry.callback({
374
+ originalTransaction: originalTransaction,
375
+ transactions: transactions,
376
+ oldEditorState: oldEditorState,
377
+ newEditorState: newEditorState
380
378
  });
381
- }
379
+ });
382
380
  }, []);
383
381
  var _dispatchTransaction = useDispatchTransaction({
384
382
  onChange: props.editorProps.onChange,
@@ -1,6 +1,5 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
3
- import { fg } from '@atlaskit/platform-feature-flags';
4
3
  var key = new PluginKey('editorStateNotificationPlugin');
5
4
  export var createEditorStateNotificationPlugin = function createEditorStateNotificationPlugin(onEditorStateUpdated, onEditorViewStateUpdatedCallbacks) {
6
5
  var transactions = [];
@@ -22,19 +21,6 @@ export var createEditorStateNotificationPlugin = function createEditorStateNotif
22
21
  view: function view() {
23
22
  return {
24
23
  update: function update(view, oldEditorState) {
25
- var _key$getState;
26
- var originalTransaction = (_key$getState = key.getState(view.state)) === null || _key$getState === void 0 ? void 0 : _key$getState.latestTransaction;
27
- if (originalTransaction && fg('platform_editor_migrate_state_updates')) {
28
- onEditorViewStateUpdatedCallbacks.forEach(function (entry) {
29
- entry.callback({
30
- originalTransaction: originalTransaction,
31
- transactions: transactions,
32
- oldEditorState: oldEditorState,
33
- newEditorState: view.state
34
- });
35
- });
36
- transactions = [];
37
- }
38
24
  onEditorStateUpdated({
39
25
  oldEditorState: oldEditorState,
40
26
  newEditorState: view.state
@@ -135,7 +135,7 @@ export var mentionsSelectionStylesWithSearchMatch = css(_defineProperty(_defineP
135
135
  backgroundSelectionStyles,
136
136
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
137
137
  hideNativeBrowserTextSelectionStyles, mentionsSelectedColor]
138
- }), ".".concat(akEditorSelectedNodeClassName, ":not('.search-match-block')"), {
138
+ }), ".".concat(akEditorSelectedNodeClassName, ":not(.search-match-block)"), {
139
139
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
140
140
  '> .editor-mention-primitive, > .editor-mention-primitive.mention-self, > .editor-mention-primitive.mention-restricted':
141
141
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values,
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "209.1.4";
2
+ export var version = "209.1.6";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "209.1.5",
3
+ "version": "209.1.7",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -61,7 +61,7 @@
61
61
  "@atlaskit/platform-feature-flags-react": "^0.2.0",
62
62
  "@atlaskit/react-ufo": "^4.0.0",
63
63
  "@atlaskit/task-decision": "^19.2.0",
64
- "@atlaskit/tmp-editor-statsig": "^9.6.0",
64
+ "@atlaskit/tmp-editor-statsig": "^9.7.0",
65
65
  "@atlaskit/tokens": "^5.5.0",
66
66
  "@atlaskit/tooltip": "^20.3.0",
67
67
  "@atlaskit/width-detector": "^5.0.0",
@@ -104,7 +104,7 @@
104
104
  "@atlaskit/primitives": "^14.10.0",
105
105
  "@atlaskit/renderer": "^120.1.0",
106
106
  "@atlaskit/section-message": "^8.2.0",
107
- "@atlaskit/smart-card": "^40.0.0",
107
+ "@atlaskit/smart-card": "^40.1.0",
108
108
  "@atlaskit/synchrony-test-helpers": "workspace:^",
109
109
  "@atlaskit/toggle": "^15.0.0",
110
110
  "@atlaskit/util-data-test": "^18.0.0",
@@ -229,9 +229,6 @@
229
229
  "platform_editor_catch_missing_injection_states": {
230
230
  "type": "boolean"
231
231
  },
232
- "platform_editor_migrate_state_updates": {
233
- "type": "boolean"
234
- },
235
232
  "platform_editor_typography_ugc": {
236
233
  "type": "boolean",
237
234
  "referenceOnly": true