@atlaskit/editor-plugin-extension 9.2.8 → 9.2.10

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,21 @@
1
1
  # @atlaskit/editor-plugin-extension
2
2
 
3
+ ## 9.2.10
4
+
5
+ ### Patch Changes
6
+
7
+ - [`40be7d89b624f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/40be7d89b624f) -
8
+ EDITOR-3744 Manual scroll to table when stickyheader improvements is enabled
9
+ - Updated dependencies
10
+
11
+ ## 9.2.9
12
+
13
+ ### Patch Changes
14
+
15
+ - [`e3779b75fdeca`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e3779b75fdeca) -
16
+ EDITOR-1643 Promote syncBlock and bodiedSyncBlock to full schema
17
+ - Updated dependencies
18
+
3
19
  ## 9.2.8
4
20
 
5
21
  ### Patch Changes
@@ -14,6 +14,7 @@ var _editorJsonTransformer = require("@atlaskit/editor-json-transformer");
14
14
  var _model = require("@atlaskit/editor-prosemirror/model");
15
15
  var _state = require("@atlaskit/editor-prosemirror/state");
16
16
  var _utils2 = require("@atlaskit/editor-prosemirror/utils");
17
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
17
18
  var _commands = require("../editor-commands/commands");
18
19
  var _actions = require("./macro/actions");
19
20
  var _pluginKey = require("./macro/plugin-key");
@@ -168,7 +169,6 @@ var createExtensionAPI = exports.createExtensionAPI = function createExtensionAP
168
169
  var nodePos = ensureNodePosByLocalId(localId, {
169
170
  opName: 'scrollTo'
170
171
  });
171
-
172
172
  // Analytics - tracking the api call
173
173
  var apiCallPayload = extensionAPICallPayload('scrollTo');
174
174
  var _options$editorView = options.editorView,
@@ -177,7 +177,20 @@ var createExtensionAPI = exports.createExtensionAPI = function createExtensionAP
177
177
  var tr = state.tr;
178
178
  editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 || editorAnalyticsAPI.attachAnalyticsEvent(apiCallPayload)(tr);
179
179
  tr = (0, _utils2.setTextSelection)(nodePos.pos)(tr);
180
- tr = tr.scrollIntoView();
180
+ var useScrollIntoView = true;
181
+ if (nodePos.node.type.name === 'table' && (0, _expValEquals.expValEquals)('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') && (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true)) {
182
+ var tableDOM = options.editorView.nodeDOM(nodePos.pos);
183
+ if (tableDOM instanceof HTMLElement) {
184
+ tableDOM.scrollIntoView({
185
+ block: 'start',
186
+ behavior: 'smooth'
187
+ });
188
+ useScrollIntoView = false;
189
+ }
190
+ }
191
+ if (useScrollIntoView) {
192
+ tr.scrollIntoView();
193
+ }
181
194
  dispatch(tr);
182
195
  },
183
196
  update: function update(localId, mutationCallback, opts) {
@@ -5,6 +5,7 @@ import { JSONTransformer } from '@atlaskit/editor-json-transformer';
5
5
  import { Fragment, Mark } from '@atlaskit/editor-prosemirror/model';
6
6
  import { NodeSelection, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
7
7
  import { setTextSelection } from '@atlaskit/editor-prosemirror/utils';
8
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
9
  import { setEditingContextToContextPanel } from '../editor-commands/commands';
9
10
  import { insertMacroFromMacroBrowser } from './macro/actions';
10
11
  import { pluginKey as macroPluginKey } from './macro/plugin-key';
@@ -170,7 +171,6 @@ export const createExtensionAPI = options => {
170
171
  const nodePos = ensureNodePosByLocalId(localId, {
171
172
  opName: 'scrollTo'
172
173
  });
173
-
174
174
  // Analytics - tracking the api call
175
175
  const apiCallPayload = extensionAPICallPayload('scrollTo');
176
176
  const {
@@ -184,7 +184,20 @@ export const createExtensionAPI = options => {
184
184
  } = state;
185
185
  editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 ? void 0 : editorAnalyticsAPI.attachAnalyticsEvent(apiCallPayload)(tr);
186
186
  tr = setTextSelection(nodePos.pos)(tr);
187
- tr = tr.scrollIntoView();
187
+ let useScrollIntoView = true;
188
+ if (nodePos.node.type.name === 'table' && expValEquals('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') && expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true)) {
189
+ const tableDOM = options.editorView.nodeDOM(nodePos.pos);
190
+ if (tableDOM instanceof HTMLElement) {
191
+ tableDOM.scrollIntoView({
192
+ block: 'start',
193
+ behavior: 'smooth'
194
+ });
195
+ useScrollIntoView = false;
196
+ }
197
+ }
198
+ if (useScrollIntoView) {
199
+ tr.scrollIntoView();
200
+ }
188
201
  dispatch(tr);
189
202
  },
190
203
  update: (localId, mutationCallback, opts) => {
@@ -9,6 +9,7 @@ import { JSONTransformer } from '@atlaskit/editor-json-transformer';
9
9
  import { Fragment, Mark } from '@atlaskit/editor-prosemirror/model';
10
10
  import { NodeSelection, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
11
11
  import { setTextSelection } from '@atlaskit/editor-prosemirror/utils';
12
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
12
13
  import { setEditingContextToContextPanel } from '../editor-commands/commands';
13
14
  import { insertMacroFromMacroBrowser } from './macro/actions';
14
15
  import { pluginKey as macroPluginKey } from './macro/plugin-key';
@@ -161,7 +162,6 @@ export var createExtensionAPI = function createExtensionAPI(options) {
161
162
  var nodePos = ensureNodePosByLocalId(localId, {
162
163
  opName: 'scrollTo'
163
164
  });
164
-
165
165
  // Analytics - tracking the api call
166
166
  var apiCallPayload = extensionAPICallPayload('scrollTo');
167
167
  var _options$editorView = options.editorView,
@@ -170,7 +170,20 @@ export var createExtensionAPI = function createExtensionAPI(options) {
170
170
  var tr = state.tr;
171
171
  editorAnalyticsAPI === null || editorAnalyticsAPI === void 0 || editorAnalyticsAPI.attachAnalyticsEvent(apiCallPayload)(tr);
172
172
  tr = setTextSelection(nodePos.pos)(tr);
173
- tr = tr.scrollIntoView();
173
+ var useScrollIntoView = true;
174
+ if (nodePos.node.type.name === 'table' && expValEquals('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') && expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true)) {
175
+ var tableDOM = options.editorView.nodeDOM(nodePos.pos);
176
+ if (tableDOM instanceof HTMLElement) {
177
+ tableDOM.scrollIntoView({
178
+ block: 'start',
179
+ behavior: 'smooth'
180
+ });
181
+ useScrollIntoView = false;
182
+ }
183
+ }
184
+ if (useScrollIntoView) {
185
+ tr.scrollIntoView();
186
+ }
174
187
  dispatch(tr);
175
188
  },
176
189
  update: function update(localId, mutationCallback, opts) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-extension",
3
- "version": "9.2.8",
3
+ "version": "9.2.10",
4
4
  "description": "editor-plugin-extension plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -21,7 +21,7 @@
21
21
  ],
22
22
  "atlaskit:src": "src/index.ts",
23
23
  "dependencies": {
24
- "@atlaskit/adf-schema": "^51.4.0",
24
+ "@atlaskit/adf-schema": "^51.5.1",
25
25
  "@atlaskit/adf-utils": "^19.26.0",
26
26
  "@atlaskit/analytics-next": "^11.1.0",
27
27
  "@atlaskit/avatar": "^25.5.0",
@@ -50,16 +50,16 @@
50
50
  "@atlaskit/radio": "^8.3.0",
51
51
  "@atlaskit/section-message": "^8.9.0",
52
52
  "@atlaskit/select": "^21.4.0",
53
- "@atlaskit/smart-user-picker": "^8.4.0",
53
+ "@atlaskit/smart-user-picker": "^8.5.0",
54
54
  "@atlaskit/spinner": "^19.0.0",
55
55
  "@atlaskit/tabs": "^18.2.0",
56
56
  "@atlaskit/textarea": "^8.1.0",
57
57
  "@atlaskit/textfield": "^8.1.0",
58
58
  "@atlaskit/theme": "^21.0.0",
59
- "@atlaskit/tmp-editor-statsig": "^14.2.0",
59
+ "@atlaskit/tmp-editor-statsig": "^14.9.0",
60
60
  "@atlaskit/toggle": "^15.1.0",
61
61
  "@atlaskit/tokens": "^8.4.0",
62
- "@atlaskit/tooltip": "^20.10.0",
62
+ "@atlaskit/tooltip": "^20.11.0",
63
63
  "@babel/runtime": "^7.0.0",
64
64
  "@emotion/react": "^11.7.1",
65
65
  "bind-event-listener": "^3.0.0",
@@ -70,7 +70,7 @@
70
70
  "uuid": "^3.1.0"
71
71
  },
72
72
  "peerDependencies": {
73
- "@atlaskit/editor-common": "^110.36.0",
73
+ "@atlaskit/editor-common": "^110.40.0",
74
74
  "react": "^18.2.0",
75
75
  "react-intl-next": "npm:react-intl@^5.18.1"
76
76
  },