@atlaskit/editor-plugin-table 2.11.0 → 2.12.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.
Files changed (76) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +30 -0
  3. package/dist/cjs/plugins/table/commands/misc.js +2 -2
  4. package/dist/cjs/plugins/table/commands/toggle.js +2 -2
  5. package/dist/cjs/plugins/table/commands-with-analytics.js +2 -2
  6. package/dist/cjs/plugins/table/create-plugin-config.js +2 -2
  7. package/dist/cjs/plugins/table/handlers.js +2 -2
  8. package/dist/cjs/plugins/table/index.js +4 -0
  9. package/dist/cjs/plugins/table/nodeviews/TableComponent.js +2 -2
  10. package/dist/cjs/plugins/table/nodeviews/TableResizer.js +2 -2
  11. package/dist/cjs/plugins/table/pm-plugins/main.js +2 -2
  12. package/dist/cjs/plugins/table/pm-plugins/plugin-factory.js +2 -2
  13. package/dist/cjs/plugins/table/pm-plugins/sticky-headers/plugin-state.js +2 -2
  14. package/dist/cjs/plugins/table/pm-plugins/table-local-id.js +13 -13
  15. package/dist/cjs/plugins/table/pm-plugins/table-resizing/plugin-factory.js +2 -2
  16. package/dist/cjs/plugins/table/pm-plugins/table-resizing/reducer.js +2 -2
  17. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/resize-logic.js +2 -2
  18. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +2 -2
  19. package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +2 -2
  20. package/dist/cjs/plugins/table/pm-plugins/table-width.js +2 -2
  21. package/dist/cjs/plugins/table/reducer.js +2 -2
  22. package/dist/cjs/plugins/table/transforms/column-width.js +2 -2
  23. package/dist/cjs/plugins/table/transforms/delete-columns.js +2 -2
  24. package/dist/cjs/plugins/table/transforms/delete-rows.js +2 -2
  25. package/dist/cjs/plugins/table/transforms/fix-tables.js +2 -2
  26. package/dist/cjs/plugins/table/transforms/merge.js +2 -2
  27. package/dist/cjs/plugins/table/transforms/split.js +2 -2
  28. package/dist/cjs/plugins/table/types.js +2 -2
  29. package/dist/cjs/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +2 -2
  30. package/dist/cjs/plugins/table/ui/FloatingDeleteButton/getPopUpOptions.js +2 -2
  31. package/dist/cjs/plugins/table/ui/FloatingDeleteButton/index.js +2 -2
  32. package/dist/cjs/plugins/table/ui/FloatingInsertButton/getPopupOptions.js +2 -2
  33. package/dist/cjs/plugins/table/ui/LayoutButton/index.js +2 -2
  34. package/dist/cjs/plugins/table/utils/row-controls.js +2 -2
  35. package/dist/es2019/plugins/table/index.js +4 -0
  36. package/dist/esm/plugins/table/commands/misc.js +2 -2
  37. package/dist/esm/plugins/table/commands/toggle.js +2 -2
  38. package/dist/esm/plugins/table/commands-with-analytics.js +2 -2
  39. package/dist/esm/plugins/table/create-plugin-config.js +2 -2
  40. package/dist/esm/plugins/table/handlers.js +2 -2
  41. package/dist/esm/plugins/table/index.js +4 -0
  42. package/dist/esm/plugins/table/nodeviews/TableComponent.js +2 -2
  43. package/dist/esm/plugins/table/nodeviews/TableResizer.js +2 -2
  44. package/dist/esm/plugins/table/pm-plugins/main.js +2 -2
  45. package/dist/esm/plugins/table/pm-plugins/plugin-factory.js +2 -2
  46. package/dist/esm/plugins/table/pm-plugins/sticky-headers/plugin-state.js +2 -2
  47. package/dist/esm/plugins/table/pm-plugins/table-local-id.js +2 -2
  48. package/dist/esm/plugins/table/pm-plugins/table-resizing/plugin-factory.js +2 -2
  49. package/dist/esm/plugins/table/pm-plugins/table-resizing/reducer.js +2 -2
  50. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/resize-logic.js +2 -2
  51. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +2 -2
  52. package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +2 -2
  53. package/dist/esm/plugins/table/pm-plugins/table-width.js +2 -2
  54. package/dist/esm/plugins/table/reducer.js +2 -2
  55. package/dist/esm/plugins/table/transforms/column-width.js +2 -2
  56. package/dist/esm/plugins/table/transforms/delete-columns.js +2 -2
  57. package/dist/esm/plugins/table/transforms/delete-rows.js +2 -2
  58. package/dist/esm/plugins/table/transforms/fix-tables.js +2 -2
  59. package/dist/esm/plugins/table/transforms/merge.js +2 -2
  60. package/dist/esm/plugins/table/transforms/split.js +2 -2
  61. package/dist/esm/plugins/table/types.js +2 -2
  62. package/dist/esm/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +2 -2
  63. package/dist/esm/plugins/table/ui/FloatingDeleteButton/getPopUpOptions.js +2 -2
  64. package/dist/esm/plugins/table/ui/FloatingDeleteButton/index.js +2 -2
  65. package/dist/esm/plugins/table/ui/FloatingInsertButton/getPopupOptions.js +2 -2
  66. package/dist/esm/plugins/table/ui/LayoutButton/index.js +2 -2
  67. package/dist/esm/plugins/table/utils/row-controls.js +2 -2
  68. package/dist/types/plugins/table/index.d.ts +4 -0
  69. package/dist/types-ts4.5/plugins/table/index.d.ts +4 -0
  70. package/docs/0-intro.tsx +53 -0
  71. package/package.json +11 -11
  72. package/report.api.md +1 -1
  73. package/src/plugins/table/index.tsx +4 -0
  74. package/tmp/api-report-tmp.d.ts +1 -1
  75. package/tsconfig.app.json +82 -0
  76. package/tsconfig.dev.json +112 -0
@@ -0,0 +1,53 @@
1
+ import React from 'react';
2
+
3
+ import { AtlassianInternalWarning, code, md } from '@atlaskit/docs';
4
+ import { createEditorUseOnlyNotice } from '@atlaskit/editor-core/docs/editor-use-only';
5
+ import { token } from '@atlaskit/tokens';
6
+
7
+ export default md`
8
+
9
+ ${createEditorUseOnlyNotice('Editor Plugin Table', [
10
+ { name: 'Editor Core', link: '/packages/editor/editor-core' },
11
+ ])}
12
+
13
+
14
+ ${(
15
+ <div style={{ marginTop: token('space.100', '8px') }}>
16
+ <AtlassianInternalWarning />
17
+ </div>
18
+ )}
19
+
20
+ This package includes the table plugin used by \`@atlaskit/editor-core\`.
21
+
22
+ ## Usage
23
+ ---
24
+
25
+ The \`dependencies\`, \`configuration\`, \`state\`, \`actions\`, and \`commands\` of the plugin are defined
26
+ below:
27
+
28
+ ${code`
29
+ type TablePlugin = NextEditorPlugin<
30
+ 'table',
31
+ {
32
+ pluginConfiguration: TablePluginOptions | undefined;
33
+ actions: {
34
+ insertTable: InsertTableAction;
35
+ };
36
+ dependencies: [
37
+ AnalyticsPlugin,
38
+ ContentInsertionPlugin,
39
+ WidthPlugin,
40
+ GuidelinePlugin,
41
+ ];
42
+ }
43
+ >;
44
+ `}
45
+
46
+
47
+ ## Support
48
+ ---
49
+ For internal Atlassian, visit the slack channel [#help-editor](https://atlassian.slack.com/archives/CFG3PSQ9E) for support or visit [go/editor-help](https://go/editor-help) to submit a bug.
50
+ ## License
51
+ ---
52
+ Please see [Atlassian Frontend - License](https://developer.atlassian.com/cloud/framework/atlassian-frontend/#license) for more licensing information.
53
+ `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "2.11.0",
3
+ "version": "2.12.0",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -28,17 +28,17 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@atlaskit/adf-schema": "28.1.2",
31
- "@atlaskit/editor-common": "^74.54.0",
31
+ "@atlaskit/editor-common": "^74.55.0",
32
32
  "@atlaskit/editor-palette": "1.5.1",
33
- "@atlaskit/editor-plugin-analytics": "^0.1.0",
34
- "@atlaskit/editor-plugin-content-insertion": "^0.0.11",
33
+ "@atlaskit/editor-plugin-analytics": "^0.2.0",
34
+ "@atlaskit/editor-plugin-content-insertion": "^0.1.0",
35
35
  "@atlaskit/editor-prosemirror": "1.1.0",
36
36
  "@atlaskit/editor-shared-styles": "^2.6.0",
37
37
  "@atlaskit/editor-tables": "^2.3.0",
38
38
  "@atlaskit/icon": "^21.12.0",
39
39
  "@atlaskit/platform-feature-flags": "^0.2.1",
40
40
  "@atlaskit/theme": "^12.5.0",
41
- "@atlaskit/tokens": "^1.17.0",
41
+ "@atlaskit/tokens": "^1.18.0",
42
42
  "@atlaskit/tooltip": "^17.8.0",
43
43
  "@babel/runtime": "^7.0.0",
44
44
  "@emotion/react": "^11.7.1",
@@ -55,12 +55,12 @@
55
55
  },
56
56
  "devDependencies": {
57
57
  "@atlaskit/analytics-next": "^9.1.0",
58
- "@atlaskit/editor-plugin-decorations": "^0.1.0",
59
- "@atlaskit/editor-plugin-feature-flags": "^0.1.3",
60
- "@atlaskit/editor-plugin-grid": "^0.1.0",
61
- "@atlaskit/editor-plugin-guideline": "^0.4.0",
62
- "@atlaskit/editor-plugin-hyperlink": "^0.3.0",
63
- "@atlaskit/editor-plugin-width": "^0.1.0",
58
+ "@atlaskit/editor-plugin-decorations": "^0.2.0",
59
+ "@atlaskit/editor-plugin-feature-flags": "^0.2.0",
60
+ "@atlaskit/editor-plugin-grid": "^0.2.0",
61
+ "@atlaskit/editor-plugin-guideline": "^0.5.0",
62
+ "@atlaskit/editor-plugin-hyperlink": "^0.4.0",
63
+ "@atlaskit/editor-plugin-width": "^0.2.0",
64
64
  "@atlaskit/visual-regression": "*",
65
65
  "@atlaskit/webdriver-runner": "*",
66
66
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
package/report.api.md CHANGED
@@ -117,7 +117,7 @@ interface TablePluginOptions {
117
117
  wasFullWidthEnabled?: boolean;
118
118
  }
119
119
 
120
- // @public (undocumented)
120
+ // @public
121
121
  export const tablesPlugin: TablePlugin;
122
122
 
123
123
  // (No @packageDocumentation comment for this package)
@@ -104,6 +104,10 @@ export type TablePlugin = NextEditorPlugin<
104
104
  }
105
105
  >;
106
106
 
107
+ /**
108
+ * Table plugin to be added to an `EditorPresetBuilder` and used with `ComposableEditor`
109
+ * from `@atlaskit/editor-core`.
110
+ */
107
111
  const tablesPlugin: TablePlugin = ({ config: options, api }) => {
108
112
  const editorViewRef: Record<'current', EditorView | null> = { current: null };
109
113
  const defaultGetEditorContainerWidth: GetEditorContainerWidth = () => {
@@ -103,7 +103,7 @@ interface TablePluginOptions {
103
103
  wasFullWidthEnabled?: boolean;
104
104
  }
105
105
 
106
- // @public (undocumented)
106
+ // @public
107
107
  export const tablesPlugin: TablePlugin;
108
108
 
109
109
  // (No @packageDocumentation comment for this package)
@@ -0,0 +1,82 @@
1
+ {
2
+ "extends": "../../../tsconfig.base.json",
3
+ "include": ["./src/**/*.ts", "./src/**/*.tsx"],
4
+ "exclude": [
5
+ "**/docs/**/*",
6
+ "**/__tests__/**/*",
7
+ "**/vr-tests/**/*",
8
+ "**/__perf__/**/*",
9
+ "**/*.test.*",
10
+ "**/test.*",
11
+ "**/test-*",
12
+ "**/examples.ts",
13
+ "**/examples.tsx",
14
+ "**/examples/*.ts",
15
+ "**/examples/*.tsx",
16
+ "**/examples/**/*.ts",
17
+ "**/examples/**/*.tsx",
18
+ "**/storybook/**/*",
19
+ "**/constellation/**/*",
20
+ ".storybook/*",
21
+ "./__fixtures__/**/*",
22
+ "./__generated__/**/*",
23
+ "./mocks/**/*",
24
+ "./__mocks__/**/*",
25
+ "**/mock.*",
26
+ "**/codemods/**/*.ts",
27
+ "**/codemods/**/*.tsx",
28
+ "./src/plugins/table/nodeviews/__mocks__/**/*"
29
+ ],
30
+ "compilerOptions": {
31
+ "baseUrl": "./",
32
+ "composite": true,
33
+ "outDir": "../../../tsDist/@atlaskit__editor-plugin-table/app"
34
+ },
35
+ "references": [
36
+ {
37
+ "path": "../adf-schema/tsconfig.app.json"
38
+ },
39
+ {
40
+ "path": "../editor-common/tsconfig.app.json"
41
+ },
42
+ {
43
+ "path": "../editor-palette/tsconfig.app.json"
44
+ },
45
+ {
46
+ "path": "../editor-plugin-analytics/tsconfig.app.json"
47
+ },
48
+ {
49
+ "path": "../editor-plugin-content-insertion/tsconfig.app.json"
50
+ },
51
+ {
52
+ "path": "../editor-plugin-guideline/tsconfig.app.json"
53
+ },
54
+ {
55
+ "path": "../editor-plugin-width/tsconfig.app.json"
56
+ },
57
+ {
58
+ "path": "../editor-prosemirror/tsconfig.app.json"
59
+ },
60
+ {
61
+ "path": "../editor-shared-styles/tsconfig.app.json"
62
+ },
63
+ {
64
+ "path": "../editor-tables/tsconfig.app.json"
65
+ },
66
+ {
67
+ "path": "../../design-system/icon/tsconfig.app.json"
68
+ },
69
+ {
70
+ "path": "../../platform/feature-flags/tsconfig.app.json"
71
+ },
72
+ {
73
+ "path": "../../design-system/theme/tsconfig.app.json"
74
+ },
75
+ {
76
+ "path": "../../design-system/tokens/tsconfig.app.json"
77
+ },
78
+ {
79
+ "path": "../../design-system/tooltip/tsconfig.app.json"
80
+ }
81
+ ]
82
+ }
@@ -0,0 +1,112 @@
1
+ {
2
+ "extends": "../../../tsconfig.base.json",
3
+ "include": [
4
+ "**/docs/**/*",
5
+ "**/__tests__/**/*",
6
+ "**/vr-tests/**/*",
7
+ "**/__perf__/**/*",
8
+ "**/*.test.*",
9
+ "**/test.*",
10
+ "**/test-*",
11
+ "**/examples.ts",
12
+ "**/examples.tsx",
13
+ "**/examples/*.ts",
14
+ "**/examples/*.tsx",
15
+ "**/examples/**/*.ts",
16
+ "**/examples/**/*.tsx",
17
+ "**/storybook/**/*",
18
+ "**/constellation/**/*",
19
+ ".storybook/*",
20
+ "./__fixtures__/**/*",
21
+ "./__generated__/**/*",
22
+ "./mocks/**/*",
23
+ "./__mocks__/**/*",
24
+ "**/mock.*",
25
+ "**/codemods/**/*.ts",
26
+ "**/codemods/**/*.tsx",
27
+ "./src/plugins/table/nodeviews/__mocks__/**/*"
28
+ ],
29
+ "exclude": ["./dist/**/*", "./build/**/*", "./node_modules/**/*"],
30
+ "compilerOptions": {
31
+ "baseUrl": "./",
32
+ "composite": true,
33
+ "outDir": "../../../tsDist/@atlaskit__editor-plugin-table/dev"
34
+ },
35
+ "references": [
36
+ {
37
+ "path": "tsconfig.app.json"
38
+ },
39
+ {
40
+ "path": "../adf-schema/tsconfig.app.json"
41
+ },
42
+ {
43
+ "path": "../../analytics/analytics-next/tsconfig.app.json"
44
+ },
45
+ {
46
+ "path": "../../design-system/button/tsconfig.app.json"
47
+ },
48
+ {
49
+ "path": "../editor-common/tsconfig.app.json"
50
+ },
51
+ {
52
+ "path": "../editor-core/tsconfig.app.json"
53
+ },
54
+ {
55
+ "path": "../editor-plugin-analytics/tsconfig.app.json"
56
+ },
57
+ {
58
+ "path": "../editor-plugin-content-insertion/tsconfig.app.json"
59
+ },
60
+ {
61
+ "path": "../editor-plugin-decorations/tsconfig.app.json"
62
+ },
63
+ {
64
+ "path": "../editor-plugin-feature-flags/tsconfig.app.json"
65
+ },
66
+ {
67
+ "path": "../editor-plugin-grid/tsconfig.app.json"
68
+ },
69
+ {
70
+ "path": "../editor-plugin-guideline/tsconfig.app.json"
71
+ },
72
+ {
73
+ "path": "../editor-plugin-width/tsconfig.app.json"
74
+ },
75
+ {
76
+ "path": "../editor-prosemirror/tsconfig.app.json"
77
+ },
78
+ {
79
+ "path": "../editor-shared-styles/tsconfig.app.json"
80
+ },
81
+ {
82
+ "path": "../editor-tables/tsconfig.app.json"
83
+ },
84
+ {
85
+ "path": "../editor-test-helpers/tsconfig.app.json"
86
+ },
87
+ {
88
+ "path": "../../linking-platform/link-provider/tsconfig.app.json"
89
+ },
90
+ {
91
+ "path": "../../design-system/logo/tsconfig.app.json"
92
+ },
93
+ {
94
+ "path": "../../media/media-integration-test-helpers/tsconfig.app.json"
95
+ },
96
+ {
97
+ "path": "../synchrony-test-helpers/tsconfig.app.json"
98
+ },
99
+ {
100
+ "path": "../../design-system/theme/tsconfig.app.json"
101
+ },
102
+ {
103
+ "path": "../../../build/test-tooling/visual-regression/tsconfig.app.json"
104
+ },
105
+ {
106
+ "path": "../../../build/test-tooling/webdriver-runner/tsconfig.app.json"
107
+ },
108
+ {
109
+ "path": "../../platform/feature-flags-test-utils/tsconfig.app.json"
110
+ }
111
+ ]
112
+ }