@atlaskit/editor-plugin-table 1.6.0 → 1.6.2

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,17 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 1.6.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 1.6.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [`b48d0a5f88f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b48d0a5f88f) - Create new placeholder for the floating toolbar plugin and use a new action to replace the forceFocusSelector action.
14
+
3
15
  ## 1.6.0
4
16
 
5
17
  ### Minor Changes
@@ -90,12 +90,13 @@ var tablesPlugin = function tablesPlugin(options, api) {
90
90
  var plugins = [{
91
91
  name: 'table',
92
92
  plugin: function plugin(_ref) {
93
+ var _api$dependencies$ana;
93
94
  var dispatchAnalyticsEvent = _ref.dispatchAnalyticsEvent,
94
95
  dispatch = _ref.dispatch,
95
96
  portalProviderAPI = _ref.portalProviderAPI,
96
97
  eventDispatcher = _ref.eventDispatcher;
97
98
  var _ref2 = options || {
98
- editorAnalyticsAPI: api === null || api === void 0 ? void 0 : api.dependencies.analytics.actions
99
+ editorAnalyticsAPI: api === null || api === void 0 ? void 0 : (_api$dependencies$ana = api.dependencies.analytics) === null || _api$dependencies$ana === void 0 ? void 0 : _api$dependencies$ana.actions
99
100
  },
100
101
  fullWidthEnabled = _ref2.fullWidthEnabled,
101
102
  wasFullWidthEnabled = _ref2.wasFullWidthEnabled,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
4
4
  "sideEffects": false
5
5
  }
@@ -84,6 +84,7 @@ const tablesPlugin = (options, api) => {
84
84
  portalProviderAPI,
85
85
  eventDispatcher
86
86
  }) => {
87
+ var _api$dependencies$ana;
87
88
  const {
88
89
  fullWidthEnabled,
89
90
  wasFullWidthEnabled,
@@ -92,7 +93,7 @@ const tablesPlugin = (options, api) => {
92
93
  editorAnalyticsAPI,
93
94
  getEditorFeatureFlags
94
95
  } = options || {
95
- editorAnalyticsAPI: api === null || api === void 0 ? void 0 : api.dependencies.analytics.actions
96
+ editorAnalyticsAPI: api === null || api === void 0 ? void 0 : (_api$dependencies$ana = api.dependencies.analytics) === null || _api$dependencies$ana === void 0 ? void 0 : _api$dependencies$ana.actions
96
97
  };
97
98
  return createPlugin(dispatchAnalyticsEvent, dispatch, portalProviderAPI, eventDispatcher, pluginConfig(tableOptions), defaultGetEditorContainerWidth, getEditorFeatureFlags || defaultGetEditorFeatureFlags, breakoutEnabled, fullWidthEnabled, wasFullWidthEnabled, editorAnalyticsAPI);
98
99
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
4
4
  "sideEffects": false
5
5
  }
@@ -83,12 +83,13 @@ var tablesPlugin = function tablesPlugin(options, api) {
83
83
  var plugins = [{
84
84
  name: 'table',
85
85
  plugin: function plugin(_ref) {
86
+ var _api$dependencies$ana;
86
87
  var dispatchAnalyticsEvent = _ref.dispatchAnalyticsEvent,
87
88
  dispatch = _ref.dispatch,
88
89
  portalProviderAPI = _ref.portalProviderAPI,
89
90
  eventDispatcher = _ref.eventDispatcher;
90
91
  var _ref2 = options || {
91
- editorAnalyticsAPI: api === null || api === void 0 ? void 0 : api.dependencies.analytics.actions
92
+ editorAnalyticsAPI: api === null || api === void 0 ? void 0 : (_api$dependencies$ana = api.dependencies.analytics) === null || _api$dependencies$ana === void 0 ? void 0 : _api$dependencies$ana.actions
92
93
  },
93
94
  fullWidthEnabled = _ref2.fullWidthEnabled,
94
95
  wasFullWidthEnabled = _ref2.wasFullWidthEnabled,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -28,7 +28,7 @@
28
28
  "dependencies": {
29
29
  "@atlaskit/adf-schema": "^25.8.0",
30
30
  "@atlaskit/editor-common": "^74.7.0",
31
- "@atlaskit/editor-palette": "1.4.3",
31
+ "@atlaskit/editor-palette": "1.5.0",
32
32
  "@atlaskit/editor-plugin-analytics": "^0.0.2",
33
33
  "@atlaskit/editor-plugin-content-insertion": "^0.0.2",
34
34
  "@atlaskit/editor-shared-styles": "^2.4.0",
@@ -59,6 +59,8 @@ import panelPlugin from '@atlaskit/editor-core/src/plugins/panel';
59
59
  import expandPlugin from '@atlaskit/editor-core/src/plugins/expand';
60
60
  import extensionPlugin from '@atlaskit/editor-core/src/plugins/extension';
61
61
  import mediaPlugin from '@atlaskit/editor-core/src/plugins/media';
62
+ import floatingToolbarPlugin from '@atlaskit/editor-core/src/plugins/floating-toolbar';
63
+
62
64
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
63
65
  import { gridPlugin } from '@atlaskit/editor-plugin-grid';
64
66
  import textFormattingPlugin from '@atlaskit/editor-core/src/plugins/text-formatting';
@@ -94,6 +96,7 @@ describe('table plugin: actions', () => {
94
96
  .add(panelPlugin)
95
97
  .add(textFormattingPlugin)
96
98
  .add(extensionPlugin)
99
+ .add(floatingToolbarPlugin)
97
100
  .add([mediaPlugin, { allowMediaSingle: true }])
98
101
  .add(expandPlugin),
99
102
  pluginKey,
@@ -35,6 +35,7 @@ import { pluginKey } from '../../plugins/table/pm-plugins/plugin-key';
35
35
  import { TableCssClassName as ClassName } from '../../plugins/table/types';
36
36
  import tablePlugin from '../../plugins/table-plugin';
37
37
  import mediaPlugin from '@atlaskit/editor-core/src/plugins/media';
38
+ import floatingToolbarPlugin from '@atlaskit/editor-core/src/plugins/floating-toolbar';
38
39
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
39
40
  import { gridPlugin } from '@atlaskit/editor-plugin-grid';
40
41
  import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
@@ -172,6 +173,7 @@ describe('table event handlers', () => {
172
173
  .add(widthPlugin)
173
174
  .add(gridPlugin)
174
175
  .add(tablePlugin)
176
+ .add(floatingToolbarPlugin)
175
177
  .add([
176
178
  mediaPlugin,
177
179
  {
@@ -57,6 +57,7 @@ import deprecatedAnalyticsPlugin from '@atlaskit/editor-core/src/plugins/analyti
57
57
  import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
58
58
  import mediaPlugin from '@atlaskit/editor-core/src/plugins/media';
59
59
  import selectionPlugin from '@atlaskit/editor-core/src/plugins/selection';
60
+ import floatingToolbarPlugin from '@atlaskit/editor-core/src/plugins/floating-toolbar';
60
61
  import { widthPlugin } from '@atlaskit/editor-plugin-width';
61
62
  import { gridPlugin } from '@atlaskit/editor-plugin-grid';
62
63
  import { insertMediaAsMediaSingle } from '@atlaskit/editor-core/src/plugins/media/utils/media-single';
@@ -105,6 +106,7 @@ describe('table plugin', () => {
105
106
  .add(widthPlugin)
106
107
  .add(gridPlugin)
107
108
  .add([tablePlugin, { tableOptions }])
109
+ .add(floatingToolbarPlugin)
108
110
  .add([mediaPlugin, { allowMediaSingle: true }])
109
111
  .add(textFormattingPlugin)
110
112
  .add(listPlugin)
@@ -55,6 +55,7 @@ import extensionPlugin from '@atlaskit/editor-core/src/plugins/extension';
55
55
  import datePlugin from '@atlaskit/editor-core/src/plugins/date';
56
56
  import layoutPlugin from '@atlaskit/editor-core/src/plugins/layout';
57
57
  import statusPlugin from '@atlaskit/editor-core/src/plugins/status';
58
+ import floatingToolbarPlugin from '@atlaskit/editor-core/src/plugins/floating-toolbar';
58
59
  import tablePlugin from '../../plugins/table';
59
60
  import { TablePluginState } from '../../plugins/table/types';
60
61
  import { pluginKey } from '../../plugins/table/pm-plugins/plugin-key';
@@ -113,6 +114,7 @@ describe('table keymap', () => {
113
114
  .add(datePlugin)
114
115
  .add(layoutPlugin)
115
116
  .add([statusPlugin, { menuDisabled: false }])
117
+ .add(floatingToolbarPlugin)
116
118
  .add([mediaPlugin, { allowMediaSingle: true }]);
117
119
 
118
120
  const editor = (doc: DocBuilder) =>
@@ -43,20 +43,6 @@ jest.mock('@atlaskit/editor-common/utils', () => ({
43
43
  },
44
44
  }));
45
45
 
46
- jest.mock('@atlaskit/editor-palette', () => ({
47
- ...jest.requireActual<Object>('@atlaskit/editor-palette'),
48
- hexToEditorBackgroundPaletteColorTokenName: jest.fn((hexColor: string) => {
49
- return hexColor;
50
- }),
51
- }));
52
-
53
- jest.mock('@atlaskit/tokens', () => ({
54
- ...jest.requireActual<Object>('@atlaskit/tokens'),
55
- getTokenValue: jest.fn((tokenId: string, fallback: string = '') => {
56
- return tokenId || fallback;
57
- }),
58
- }));
59
-
60
46
  describe('table -> nodeviews -> tableCell.tsx', () => {
61
47
  const TABLE_LOCAL_ID = 'test-table-local-id';
62
48
  const createEditor = createProsemirrorEditorFactory();
@@ -169,7 +169,7 @@ const tablesPlugin: NextEditorPlugin<
169
169
  } =
170
170
  options ||
171
171
  ({
172
- editorAnalyticsAPI: api?.dependencies.analytics.actions,
172
+ editorAnalyticsAPI: api?.dependencies.analytics?.actions,
173
173
  } as TablePluginOptions);
174
174
  return createPlugin(
175
175
  dispatchAnalyticsEvent,