@atlaskit/editor-core 187.1.3 → 187.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 187.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`e7ed90bad7c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e7ed90bad7c) - Remove platform feature flag calls to editor-core and pass through a new option instead for custom table widths project, allowing for simpler clean up and reference
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+
13
+ ## 187.1.4
14
+
15
+ ### Patch Changes
16
+
17
+ - [`b00f47b4576`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b00f47b4576) - [ED-18035] stop keydown propogation for typeaheadlist
18
+
3
19
  ## 187.1.3
4
20
 
5
21
  ### Patch Changes
@@ -15,6 +15,7 @@ var _editorPluginGrid = require("@atlaskit/editor-plugin-grid");
15
15
  var _editorPluginCard = require("@atlaskit/editor-plugin-card");
16
16
  var _editorPluginTable = require("@atlaskit/editor-plugin-table");
17
17
  var _editorPluginContentInsertion = require("@atlaskit/editor-plugin-content-insertion");
18
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
18
19
  var _isFullPage = require("../../../utils/is-full-page");
19
20
  var _mediaCommon = require("@atlaskit/media-common");
20
21
  var _default = require("./default");
@@ -148,6 +149,9 @@ function createUniversalPreset(appearance, props, featureFlags, prevAppearance,
148
149
  var tableOptions = !props.allowTables || typeof props.allowTables === 'boolean' ? {} : props.allowTables;
149
150
  return builder.add([plugin, {
150
151
  tableOptions: tableOptions,
152
+ // tableResizingEnabled will replace breakoutEnabled once FF is 100% rolled out,
153
+ // logic below is to help codemod during cleanup
154
+ tableResizingEnabled: (0, _platformFeatureFlags.getBooleanFF)('platform.editor.custom-table-width') && ['full-page', 'full-width'].includes(appearance || ''),
151
155
  breakoutEnabled: appearance === 'full-page',
152
156
  allowContextualMenu: !isMobile,
153
157
  fullWidthEnabled: appearance === 'full-width',
@@ -181,10 +181,12 @@ var TypeAheadListComponent = /*#__PURE__*/_react.default.memo(function (_ref2) {
181
181
  case 'ArrowDown':
182
182
  selectNextItem();
183
183
  event.preventDefault();
184
+ event.stopPropagation();
184
185
  break;
185
186
  case 'ArrowUp':
186
187
  selectPreviousItem();
187
188
  event.preventDefault();
189
+ event.stopPropagation();
188
190
  break;
189
191
 
190
192
  // TODO DTR-1401: why is this calling item click when hitting tab? fix this in DTR-1401
@@ -263,7 +265,7 @@ var TypeAheadListComponent = /*#__PURE__*/_react.default.memo(function (_ref2) {
263
265
  overscanRowCount: 3,
264
266
  containerRole: "presentation",
265
267
  role: "listbox",
266
- css: (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n button {\n padding: 12px 12px 11px;\n span:last-child span:last-child {\n white-space: normal;\n }\n }\n "])))
268
+ css: (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n button {\n padding: ", "\n ", " 11px;\n span:last-child span:last-child {\n white-space: normal;\n }\n }\n "])), "var(--ds-space-150, 12px)", "var(--ds-space-150, 12px)")
267
269
  }), (0, _react2.jsx)(TypeaheadAssistiveTextPureComponent, {
268
270
  numberOfResults: items.length.toString()
269
271
  })));
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.version = exports.nextMajorVersion = exports.name = void 0;
7
7
  var name = "@atlaskit/editor-core";
8
8
  exports.name = name;
9
- var version = "187.1.3";
9
+ var version = "187.2.0";
10
10
  exports.version = version;
11
11
  var nextMajorVersion = function nextMajorVersion() {
12
12
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "187.1.3",
3
+ "version": "187.2.0",
4
4
  "sideEffects": false
5
5
  }
@@ -6,6 +6,7 @@ import { gridPlugin } from '@atlaskit/editor-plugin-grid';
6
6
  import { cardPlugin } from '@atlaskit/editor-plugin-card';
7
7
  import { tablesPlugin } from '@atlaskit/editor-plugin-table';
8
8
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
9
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
9
10
  import { isFullPage as fullPageCheck } from '../../../utils/is-full-page';
10
11
  import { getMediaFeatureFlag } from '@atlaskit/media-common';
11
12
  import { createDefaultPreset } from './default';
@@ -137,6 +138,9 @@ export default function createUniversalPreset(appearance, props, featureFlags, p
137
138
  const tableOptions = !props.allowTables || typeof props.allowTables === 'boolean' ? {} : props.allowTables;
138
139
  return builder.add([plugin, {
139
140
  tableOptions,
141
+ // tableResizingEnabled will replace breakoutEnabled once FF is 100% rolled out,
142
+ // logic below is to help codemod during cleanup
143
+ tableResizingEnabled: getBooleanFF('platform.editor.custom-table-width') && ['full-page', 'full-width'].includes(appearance || ''),
140
144
  breakoutEnabled: appearance === 'full-page',
141
145
  allowContextualMenu: !isMobile,
142
146
  fullWidthEnabled: appearance === 'full-width',
@@ -1,4 +1,5 @@
1
1
  /** @jsx jsx */
2
+
2
3
  import React, { useMemo, useRef, useCallback, useLayoutEffect, useState } from 'react';
3
4
  import { jsx, css } from '@emotion/react';
4
5
  import { MenuGroup } from '@atlaskit/menu';
@@ -161,10 +162,12 @@ const TypeAheadListComponent = /*#__PURE__*/React.memo(({
161
162
  case 'ArrowDown':
162
163
  selectNextItem();
163
164
  event.preventDefault();
165
+ event.stopPropagation();
164
166
  break;
165
167
  case 'ArrowUp':
166
168
  selectPreviousItem();
167
169
  event.preventDefault();
170
+ event.stopPropagation();
168
171
  break;
169
172
 
170
173
  // TODO DTR-1401: why is this calling item click when hitting tab? fix this in DTR-1401
@@ -246,7 +249,8 @@ const TypeAheadListComponent = /*#__PURE__*/React.memo(({
246
249
  role: "listbox",
247
250
  css: css`
248
251
  button {
249
- padding: 12px 12px 11px;
252
+ padding: ${"var(--ds-space-150, 12px)"}
253
+ ${"var(--ds-space-150, 12px)"} 11px;
250
254
  span:last-child span:last-child {
251
255
  white-space: normal;
252
256
  }
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "187.1.3";
2
+ export const version = "187.2.0";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "187.1.3",
3
+ "version": "187.2.0",
4
4
  "sideEffects": false
5
5
  }
@@ -10,6 +10,7 @@ import { gridPlugin } from '@atlaskit/editor-plugin-grid';
10
10
  import { cardPlugin } from '@atlaskit/editor-plugin-card';
11
11
  import { tablesPlugin } from '@atlaskit/editor-plugin-table';
12
12
  import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
13
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
13
14
  import { isFullPage as fullPageCheck } from '../../../utils/is-full-page';
14
15
  import { getMediaFeatureFlag } from '@atlaskit/media-common';
15
16
  import { createDefaultPreset } from './default';
@@ -141,6 +142,9 @@ export default function createUniversalPreset(appearance, props, featureFlags, p
141
142
  var tableOptions = !props.allowTables || typeof props.allowTables === 'boolean' ? {} : props.allowTables;
142
143
  return builder.add([plugin, {
143
144
  tableOptions: tableOptions,
145
+ // tableResizingEnabled will replace breakoutEnabled once FF is 100% rolled out,
146
+ // logic below is to help codemod during cleanup
147
+ tableResizingEnabled: getBooleanFF('platform.editor.custom-table-width') && ['full-page', 'full-width'].includes(appearance || ''),
144
148
  breakoutEnabled: appearance === 'full-page',
145
149
  allowContextualMenu: !isMobile,
146
150
  fullWidthEnabled: appearance === 'full-width',
@@ -2,6 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  var _templateObject;
4
4
  /** @jsx jsx */
5
+
5
6
  import React, { useMemo, useRef, useCallback, useLayoutEffect, useState } from 'react';
6
7
  import { jsx, css } from '@emotion/react';
7
8
  import { MenuGroup } from '@atlaskit/menu';
@@ -171,10 +172,12 @@ var TypeAheadListComponent = /*#__PURE__*/React.memo(function (_ref2) {
171
172
  case 'ArrowDown':
172
173
  selectNextItem();
173
174
  event.preventDefault();
175
+ event.stopPropagation();
174
176
  break;
175
177
  case 'ArrowUp':
176
178
  selectPreviousItem();
177
179
  event.preventDefault();
180
+ event.stopPropagation();
178
181
  break;
179
182
 
180
183
  // TODO DTR-1401: why is this calling item click when hitting tab? fix this in DTR-1401
@@ -253,7 +256,7 @@ var TypeAheadListComponent = /*#__PURE__*/React.memo(function (_ref2) {
253
256
  overscanRowCount: 3,
254
257
  containerRole: "presentation",
255
258
  role: "listbox",
256
- css: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n button {\n padding: 12px 12px 11px;\n span:last-child span:last-child {\n white-space: normal;\n }\n }\n "])))
259
+ css: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n button {\n padding: ", "\n ", " 11px;\n span:last-child span:last-child {\n white-space: normal;\n }\n }\n "])), "var(--ds-space-150, 12px)", "var(--ds-space-150, 12px)")
257
260
  }), jsx(TypeaheadAssistiveTextPureComponent, {
258
261
  numberOfResults: items.length.toString()
259
262
  })));
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "187.1.3";
2
+ export var version = "187.2.0";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "187.1.3",
3
+ "version": "187.2.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,11 +1,11 @@
1
1
  import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
2
2
  import type { EditorAppearance } from '@atlaskit/editor-common/types';
3
- import { DefaultPresetPluginOptions } from './default';
4
- import { EditorPresetProps } from './types';
5
- import { EditorSharedPropsWithPlugins } from '../../../types/editor-props';
6
- import { FeatureFlags } from '../../../types/feature-flags';
7
- import { EditorPluginFeatureProps, EditorProviderProps } from '../../../types/editor-props';
8
- import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
3
+ import type { DefaultPresetPluginOptions } from './default';
4
+ import type { EditorPresetProps } from './types';
5
+ import type { EditorSharedPropsWithPlugins } from '../../../types/editor-props';
6
+ import type { FeatureFlags } from '../../../types/feature-flags';
7
+ import type { EditorPluginFeatureProps, EditorProviderProps } from '../../../types/editor-props';
8
+ import type { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
9
9
  type UniversalPresetProps = EditorPresetProps & DefaultPresetPluginOptions & EditorSharedPropsWithPlugins & EditorPluginFeatureProps & EditorProviderProps;
10
10
  /**
11
11
  * Creates a preset with all of the available plugins.
@@ -1,11 +1,11 @@
1
1
  import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
2
2
  import type { EditorAppearance } from '@atlaskit/editor-common/types';
3
- import { DefaultPresetPluginOptions } from './default';
4
- import { EditorPresetProps } from './types';
5
- import { EditorSharedPropsWithPlugins } from '../../../types/editor-props';
6
- import { FeatureFlags } from '../../../types/feature-flags';
7
- import { EditorPluginFeatureProps, EditorProviderProps } from '../../../types/editor-props';
8
- import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
3
+ import type { DefaultPresetPluginOptions } from './default';
4
+ import type { EditorPresetProps } from './types';
5
+ import type { EditorSharedPropsWithPlugins } from '../../../types/editor-props';
6
+ import type { FeatureFlags } from '../../../types/feature-flags';
7
+ import type { EditorPluginFeatureProps, EditorProviderProps } from '../../../types/editor-props';
8
+ import type { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
9
9
  type UniversalPresetProps = EditorPresetProps & DefaultPresetPluginOptions & EditorSharedPropsWithPlugins & EditorPluginFeatureProps & EditorProviderProps;
10
10
  /**
11
11
  * Creates a preset with all of the available plugins.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "187.1.3",
3
+ "version": "187.2.0",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -69,7 +69,7 @@
69
69
  "@atlaskit/editor-plugin-grid": "^0.1.0",
70
70
  "@atlaskit/editor-plugin-guideline": "^0.3.4",
71
71
  "@atlaskit/editor-plugin-hyperlink": "^0.2.0",
72
- "@atlaskit/editor-plugin-table": "^2.3.0",
72
+ "@atlaskit/editor-plugin-table": "^2.4.0",
73
73
  "@atlaskit/editor-plugin-width": "^0.1.0",
74
74
  "@atlaskit/editor-shared-styles": "^2.4.0",
75
75
  "@atlaskit/editor-tables": "^2.3.0",
@@ -106,7 +106,7 @@
106
106
  "@atlaskit/textfield": "^5.6.0",
107
107
  "@atlaskit/theme": "^12.5.0",
108
108
  "@atlaskit/toggle": "^12.6.0",
109
- "@atlaskit/tokens": "^1.12.0",
109
+ "@atlaskit/tokens": "^1.13.0",
110
110
  "@atlaskit/tooltip": "^17.8.0",
111
111
  "@atlaskit/width-detector": "^4.1.0",
112
112
  "@babel/runtime": "^7.0.0",
@@ -150,7 +150,7 @@
150
150
  "@atlaskit/collab-provider": "9.7.2",
151
151
  "@atlaskit/dropdown-menu": "^11.10.0",
152
152
  "@atlaskit/editor-extension-dropbox": "^0.4.0",
153
- "@atlaskit/editor-plugin-table": "^2.3.0",
153
+ "@atlaskit/editor-plugin-table": "^2.4.0",
154
154
  "@atlaskit/editor-test-helpers": "^18.10.0",
155
155
  "@atlaskit/flag": "^15.2.0",
156
156
  "@atlaskit/icon-object": "^6.3.0",
@@ -235,8 +235,7 @@
235
235
  "type": "boolean"
236
236
  },
237
237
  "platform.editor.custom-table-width": {
238
- "type": "boolean",
239
- "referenceOnly": "true"
238
+ "type": "boolean"
240
239
  },
241
240
  "platform.linking-platform.editor.fix-link-insert-analytics": {
242
241
  "type": "boolean"