@atlaskit/editor-plugin-table 12.1.14 → 12.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.
Files changed (137) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/afm-cc/tsconfig.json +6 -0
  3. package/afm-dev-agents/tsconfig.json +6 -0
  4. package/afm-jira/tsconfig.json +6 -0
  5. package/afm-passionfruit/tsconfig.json +120 -0
  6. package/afm-post-office/tsconfig.json +6 -0
  7. package/afm-rovo-extension/tsconfig.json +6 -0
  8. package/afm-townsquare/tsconfig.json +6 -0
  9. package/afm-volt/tsconfig.json +13 -4
  10. package/dist/cjs/nodeviews/TableComponent.js +77 -26
  11. package/dist/cjs/nodeviews/TableContainer.js +270 -10
  12. package/dist/cjs/nodeviews/TableResizer.js +9 -2
  13. package/dist/cjs/nodeviews/TableRow.js +24 -1
  14. package/dist/cjs/nodeviews/table-node-views.js +1 -1
  15. package/dist/cjs/nodeviews/table.js +22 -7
  16. package/dist/cjs/nodeviews/toDOM.js +23 -7
  17. package/dist/cjs/pm-plugins/main.js +57 -22
  18. package/dist/cjs/pm-plugins/table-resizing/utils/colgroup.js +72 -1
  19. package/dist/cjs/pm-plugins/table-resizing/utils/misc.js +70 -1
  20. package/dist/cjs/tablePlugin.js +17 -3
  21. package/dist/cjs/ui/TableFloatingControls/NumberColumn/index.js +2 -7
  22. package/dist/es2019/nodeviews/TableComponent.js +80 -26
  23. package/dist/es2019/nodeviews/TableContainer.js +256 -2
  24. package/dist/es2019/nodeviews/TableResizer.js +9 -2
  25. package/dist/es2019/nodeviews/TableRow.js +24 -1
  26. package/dist/es2019/nodeviews/table-node-views.js +1 -1
  27. package/dist/es2019/nodeviews/table.js +21 -6
  28. package/dist/es2019/nodeviews/toDOM.js +24 -8
  29. package/dist/es2019/pm-plugins/main.js +57 -22
  30. package/dist/es2019/pm-plugins/table-resizing/utils/colgroup.js +72 -3
  31. package/dist/es2019/pm-plugins/table-resizing/utils/misc.js +70 -1
  32. package/dist/es2019/tablePlugin.js +17 -3
  33. package/dist/es2019/ui/TableFloatingControls/NumberColumn/index.js +5 -14
  34. package/dist/esm/nodeviews/TableComponent.js +77 -26
  35. package/dist/esm/nodeviews/TableContainer.js +270 -10
  36. package/dist/esm/nodeviews/TableResizer.js +9 -2
  37. package/dist/esm/nodeviews/TableRow.js +24 -1
  38. package/dist/esm/nodeviews/table-node-views.js +1 -1
  39. package/dist/esm/nodeviews/table.js +22 -7
  40. package/dist/esm/nodeviews/toDOM.js +24 -8
  41. package/dist/esm/pm-plugins/main.js +57 -22
  42. package/dist/esm/pm-plugins/table-resizing/utils/colgroup.js +74 -3
  43. package/dist/esm/pm-plugins/table-resizing/utils/misc.js +70 -1
  44. package/dist/esm/tablePlugin.js +17 -3
  45. package/dist/esm/ui/TableFloatingControls/NumberColumn/index.js +1 -6
  46. package/dist/types/nodeviews/ExternalDropTargets.d.ts +1 -1
  47. package/dist/types/nodeviews/TableComponent.d.ts +1 -0
  48. package/dist/types/nodeviews/TableContainer.d.ts +7 -2
  49. package/dist/types/nodeviews/TableResizer.d.ts +1 -1
  50. package/dist/types/nodeviews/TableRow.d.ts +3 -1
  51. package/dist/types/nodeviews/table.d.ts +1 -1
  52. package/dist/types/nodeviews/toDOM.d.ts +5 -0
  53. package/dist/types/nodeviews/types.d.ts +1 -0
  54. package/dist/types/pm-plugins/analytics/commands.d.ts +2 -2
  55. package/dist/types/pm-plugins/analytics/plugin-factory.d.ts +1 -1
  56. package/dist/types/pm-plugins/analytics/utils/moved-event.d.ts +1 -1
  57. package/dist/types/pm-plugins/commands/column-resize.d.ts +10 -10
  58. package/dist/types/pm-plugins/commands/commands-with-analytics.d.ts +1 -1
  59. package/dist/types/pm-plugins/commands/go-to-next-cell.d.ts +1 -1
  60. package/dist/types/pm-plugins/commands/misc.d.ts +2 -2
  61. package/dist/types/pm-plugins/commands/selection.d.ts +6 -6
  62. package/dist/types/pm-plugins/drag-and-drop/commands-with-analytics.d.ts +3 -3
  63. package/dist/types/pm-plugins/drag-and-drop/commands.d.ts +1 -1
  64. package/dist/types/pm-plugins/drag-and-drop/plugin-factory.d.ts +1 -1
  65. package/dist/types/pm-plugins/plugin-factory.d.ts +1 -1
  66. package/dist/types/pm-plugins/sticky-headers/plugin-state.d.ts +1 -1
  67. package/dist/types/pm-plugins/table-resizing/plugin-factory.d.ts +1 -1
  68. package/dist/types/pm-plugins/table-resizing/utils/colgroup.d.ts +1 -0
  69. package/dist/types/pm-plugins/table-resizing/utils/misc.d.ts +41 -0
  70. package/dist/types/pm-plugins/utils/create.d.ts +10 -10
  71. package/dist/types/pm-plugins/utils/decoration.d.ts +3 -3
  72. package/dist/types/pm-plugins/utils/dom.d.ts +2 -2
  73. package/dist/types/pm-plugins/utils/drag-menu.d.ts +3 -3
  74. package/dist/types/pm-plugins/utils/merged-cells.d.ts +3 -2
  75. package/dist/types/tablePluginType.d.ts +2 -0
  76. package/dist/types/ui/DragHandle/index.d.ts +4 -14
  77. package/dist/types/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +1 -7
  78. package/dist/types/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +4 -14
  79. package/dist/types/ui/TableFloatingControls/RowControls/DragControls.d.ts +1 -1
  80. package/dist/types/ui/TableFloatingControls/index.d.ts +1 -7
  81. package/dist/types/ui/global-styles.d.ts +2 -8
  82. package/dist/types/ui/hooks/useInternalTablePluginStateSelector.d.ts +1 -1
  83. package/dist/types-ts4.5/nodeviews/ExternalDropTargets.d.ts +1 -1
  84. package/dist/types-ts4.5/nodeviews/TableComponent.d.ts +1 -0
  85. package/dist/types-ts4.5/nodeviews/TableContainer.d.ts +7 -2
  86. package/dist/types-ts4.5/nodeviews/TableResizer.d.ts +1 -1
  87. package/dist/types-ts4.5/nodeviews/TableRow.d.ts +3 -1
  88. package/dist/types-ts4.5/nodeviews/table.d.ts +1 -1
  89. package/dist/types-ts4.5/nodeviews/toDOM.d.ts +5 -0
  90. package/dist/types-ts4.5/nodeviews/types.d.ts +1 -0
  91. package/dist/types-ts4.5/pm-plugins/analytics/commands.d.ts +2 -2
  92. package/dist/types-ts4.5/pm-plugins/analytics/plugin-factory.d.ts +1 -1
  93. package/dist/types-ts4.5/pm-plugins/analytics/utils/moved-event.d.ts +1 -1
  94. package/dist/types-ts4.5/pm-plugins/commands/column-resize.d.ts +10 -10
  95. package/dist/types-ts4.5/pm-plugins/commands/commands-with-analytics.d.ts +1 -1
  96. package/dist/types-ts4.5/pm-plugins/commands/go-to-next-cell.d.ts +1 -1
  97. package/dist/types-ts4.5/pm-plugins/commands/misc.d.ts +2 -2
  98. package/dist/types-ts4.5/pm-plugins/commands/selection.d.ts +6 -6
  99. package/dist/types-ts4.5/pm-plugins/drag-and-drop/commands-with-analytics.d.ts +3 -3
  100. package/dist/types-ts4.5/pm-plugins/drag-and-drop/commands.d.ts +1 -1
  101. package/dist/types-ts4.5/pm-plugins/drag-and-drop/plugin-factory.d.ts +1 -1
  102. package/dist/types-ts4.5/pm-plugins/plugin-factory.d.ts +1 -1
  103. package/dist/types-ts4.5/pm-plugins/sticky-headers/plugin-state.d.ts +1 -1
  104. package/dist/types-ts4.5/pm-plugins/table-resizing/plugin-factory.d.ts +1 -1
  105. package/dist/types-ts4.5/pm-plugins/table-resizing/utils/colgroup.d.ts +1 -0
  106. package/dist/types-ts4.5/pm-plugins/table-resizing/utils/misc.d.ts +41 -0
  107. package/dist/types-ts4.5/pm-plugins/utils/create.d.ts +10 -10
  108. package/dist/types-ts4.5/pm-plugins/utils/decoration.d.ts +3 -3
  109. package/dist/types-ts4.5/pm-plugins/utils/dom.d.ts +2 -2
  110. package/dist/types-ts4.5/pm-plugins/utils/drag-menu.d.ts +3 -3
  111. package/dist/types-ts4.5/pm-plugins/utils/merged-cells.d.ts +3 -2
  112. package/dist/types-ts4.5/tablePluginType.d.ts +2 -0
  113. package/dist/types-ts4.5/ui/DragHandle/index.d.ts +4 -14
  114. package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +1 -7
  115. package/dist/types-ts4.5/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +4 -14
  116. package/dist/types-ts4.5/ui/TableFloatingControls/RowControls/DragControls.d.ts +1 -1
  117. package/dist/types-ts4.5/ui/TableFloatingControls/index.d.ts +1 -7
  118. package/dist/types-ts4.5/ui/global-styles.d.ts +2 -8
  119. package/dist/types-ts4.5/ui/hooks/useInternalTablePluginStateSelector.d.ts +1 -1
  120. package/package.json +10 -11
  121. package/src/nodeviews/TableComponent.tsx +113 -23
  122. package/src/nodeviews/TableContainer.tsx +331 -2
  123. package/src/nodeviews/TableResizer.tsx +10 -5
  124. package/src/nodeviews/TableRow.ts +38 -1
  125. package/src/nodeviews/table-node-views.ts +1 -1
  126. package/src/nodeviews/table.tsx +23 -0
  127. package/src/nodeviews/toDOM.ts +75 -9
  128. package/src/nodeviews/types.ts +1 -0
  129. package/src/pm-plugins/main.ts +41 -18
  130. package/src/pm-plugins/table-resizing/utils/colgroup.ts +139 -6
  131. package/src/pm-plugins/table-resizing/utils/misc.ts +87 -0
  132. package/src/tablePlugin.tsx +21 -0
  133. package/src/tablePluginType.ts +2 -0
  134. package/src/ui/TableFloatingControls/NumberColumn/index.tsx +5 -14
  135. package/tsconfig.app.json +6 -0
  136. package/types/package.json +1 -1
  137. package/ui/common-styles/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 12.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`021fd485e1f83`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/021fd485e1f83) -
8
+ fix table flicking issue on page load by improving table scailing and table resizer with css
9
+ instead of js
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 12.1.15
16
+
17
+ ### Patch Changes
18
+
19
+ - [#199851](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/199851)
20
+ [`a37fa5c2adf4a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a37fa5c2adf4a) -
21
+ [ux] EDITOR-346 Clean up nested tables feature gate
22
+ `platform_editor_nested_tables_number_column_fixes`
23
+ - [#200948](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/200948)
24
+ [`8dd9a944113d5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8dd9a944113d5) -
25
+ Opt out of throttling rendering
26
+ - Updated dependencies
27
+
3
28
  ## 12.1.14
4
29
 
5
30
  ### Patch Changes
@@ -56,6 +56,9 @@
56
56
  {
57
57
  "path": "../../editor-plugin-interaction/afm-cc/tsconfig.json"
58
58
  },
59
+ {
60
+ "path": "../../editor-plugin-limited-mode/afm-cc/tsconfig.json"
61
+ },
59
62
  {
60
63
  "path": "../../editor-plugin-selection/afm-cc/tsconfig.json"
61
64
  },
@@ -77,6 +80,9 @@
77
80
  {
78
81
  "path": "../../../platform/feature-flags/afm-cc/tsconfig.json"
79
82
  },
83
+ {
84
+ "path": "../../../platform/feature-flags-react/afm-cc/tsconfig.json"
85
+ },
80
86
  {
81
87
  "path": "../../../pragmatic-drag-and-drop/core/afm-cc/tsconfig.json"
82
88
  },
@@ -56,6 +56,9 @@
56
56
  {
57
57
  "path": "../../editor-plugin-interaction/afm-dev-agents/tsconfig.json"
58
58
  },
59
+ {
60
+ "path": "../../editor-plugin-limited-mode/afm-dev-agents/tsconfig.json"
61
+ },
59
62
  {
60
63
  "path": "../../editor-plugin-selection/afm-dev-agents/tsconfig.json"
61
64
  },
@@ -77,6 +80,9 @@
77
80
  {
78
81
  "path": "../../../platform/feature-flags/afm-dev-agents/tsconfig.json"
79
82
  },
83
+ {
84
+ "path": "../../../platform/feature-flags-react/afm-dev-agents/tsconfig.json"
85
+ },
80
86
  {
81
87
  "path": "../../../pragmatic-drag-and-drop/core/afm-dev-agents/tsconfig.json"
82
88
  },
@@ -56,6 +56,9 @@
56
56
  {
57
57
  "path": "../../editor-plugin-interaction/afm-jira/tsconfig.json"
58
58
  },
59
+ {
60
+ "path": "../../editor-plugin-limited-mode/afm-jira/tsconfig.json"
61
+ },
59
62
  {
60
63
  "path": "../../editor-plugin-selection/afm-jira/tsconfig.json"
61
64
  },
@@ -77,6 +80,9 @@
77
80
  {
78
81
  "path": "../../../platform/feature-flags/afm-jira/tsconfig.json"
79
82
  },
83
+ {
84
+ "path": "../../../platform/feature-flags-react/afm-jira/tsconfig.json"
85
+ },
80
86
  {
81
87
  "path": "../../../pragmatic-drag-and-drop/core/afm-jira/tsconfig.json"
82
88
  },
@@ -0,0 +1,120 @@
1
+ {
2
+ "extends": "../../../../tsconfig.entry-points.passionfruit.json",
3
+ "compilerOptions": {
4
+ "declaration": true,
5
+ "target": "es5",
6
+ "outDir": "../../../../../passionfruit/tsDist/@atlaskit__editor-plugin-table/app",
7
+ "rootDir": "../",
8
+ "composite": true
9
+ },
10
+ "include": [
11
+ "../src/**/*.ts",
12
+ "../src/**/*.tsx"
13
+ ],
14
+ "exclude": [
15
+ "../src/**/__tests__/*",
16
+ "../src/**/*.test.*",
17
+ "../src/**/test.*",
18
+ "../src/**/examples.*",
19
+ "../src/**/examples/*",
20
+ "../src/**/examples/**/*",
21
+ "../src/**/*.stories.*",
22
+ "../src/**/stories/*",
23
+ "../src/**/stories/**/*"
24
+ ],
25
+ "references": [
26
+ {
27
+ "path": "../../../design-system/button/afm-passionfruit/tsconfig.json"
28
+ },
29
+ {
30
+ "path": "../../custom-steps/afm-passionfruit/tsconfig.json"
31
+ },
32
+ {
33
+ "path": "../../editor-palette/afm-passionfruit/tsconfig.json"
34
+ },
35
+ {
36
+ "path": "../../editor-plugin-accessibility-utils/afm-passionfruit/tsconfig.json"
37
+ },
38
+ {
39
+ "path": "../../editor-plugin-analytics/afm-passionfruit/tsconfig.json"
40
+ },
41
+ {
42
+ "path": "../../editor-plugin-batch-attribute-updates/afm-passionfruit/tsconfig.json"
43
+ },
44
+ {
45
+ "path": "../../editor-plugin-content-insertion/afm-passionfruit/tsconfig.json"
46
+ },
47
+ {
48
+ "path": "../../editor-plugin-editor-viewmode/afm-passionfruit/tsconfig.json"
49
+ },
50
+ {
51
+ "path": "../../editor-plugin-extension/afm-passionfruit/tsconfig.json"
52
+ },
53
+ {
54
+ "path": "../../editor-plugin-guideline/afm-passionfruit/tsconfig.json"
55
+ },
56
+ {
57
+ "path": "../../editor-plugin-interaction/afm-passionfruit/tsconfig.json"
58
+ },
59
+ {
60
+ "path": "../../editor-plugin-limited-mode/afm-passionfruit/tsconfig.json"
61
+ },
62
+ {
63
+ "path": "../../editor-plugin-selection/afm-passionfruit/tsconfig.json"
64
+ },
65
+ {
66
+ "path": "../../editor-plugin-width/afm-passionfruit/tsconfig.json"
67
+ },
68
+ {
69
+ "path": "../../editor-shared-styles/afm-passionfruit/tsconfig.json"
70
+ },
71
+ {
72
+ "path": "../../editor-tables/afm-passionfruit/tsconfig.json"
73
+ },
74
+ {
75
+ "path": "../../../design-system/icon/afm-passionfruit/tsconfig.json"
76
+ },
77
+ {
78
+ "path": "../../../design-system/menu/afm-passionfruit/tsconfig.json"
79
+ },
80
+ {
81
+ "path": "../../../platform/feature-flags/afm-passionfruit/tsconfig.json"
82
+ },
83
+ {
84
+ "path": "../../../platform/feature-flags-react/afm-passionfruit/tsconfig.json"
85
+ },
86
+ {
87
+ "path": "../../../pragmatic-drag-and-drop/core/afm-passionfruit/tsconfig.json"
88
+ },
89
+ {
90
+ "path": "../../../pragmatic-drag-and-drop/auto-scroll/afm-passionfruit/tsconfig.json"
91
+ },
92
+ {
93
+ "path": "../../../pragmatic-drag-and-drop/hitbox/afm-passionfruit/tsconfig.json"
94
+ },
95
+ {
96
+ "path": "../../../design-system/primitives/afm-passionfruit/tsconfig.json"
97
+ },
98
+ {
99
+ "path": "../../../react-ufo/atlaskit/afm-passionfruit/tsconfig.json"
100
+ },
101
+ {
102
+ "path": "../../../design-system/theme/afm-passionfruit/tsconfig.json"
103
+ },
104
+ {
105
+ "path": "../../tmp-editor-statsig/afm-passionfruit/tsconfig.json"
106
+ },
107
+ {
108
+ "path": "../../../design-system/toggle/afm-passionfruit/tsconfig.json"
109
+ },
110
+ {
111
+ "path": "../../../design-system/tokens/afm-passionfruit/tsconfig.json"
112
+ },
113
+ {
114
+ "path": "../../../design-system/tooltip/afm-passionfruit/tsconfig.json"
115
+ },
116
+ {
117
+ "path": "../../editor-common/afm-passionfruit/tsconfig.json"
118
+ }
119
+ ]
120
+ }
@@ -56,6 +56,9 @@
56
56
  {
57
57
  "path": "../../editor-plugin-interaction/afm-post-office/tsconfig.json"
58
58
  },
59
+ {
60
+ "path": "../../editor-plugin-limited-mode/afm-post-office/tsconfig.json"
61
+ },
59
62
  {
60
63
  "path": "../../editor-plugin-selection/afm-post-office/tsconfig.json"
61
64
  },
@@ -77,6 +80,9 @@
77
80
  {
78
81
  "path": "../../../platform/feature-flags/afm-post-office/tsconfig.json"
79
82
  },
83
+ {
84
+ "path": "../../../platform/feature-flags-react/afm-post-office/tsconfig.json"
85
+ },
80
86
  {
81
87
  "path": "../../../pragmatic-drag-and-drop/core/afm-post-office/tsconfig.json"
82
88
  },
@@ -56,6 +56,9 @@
56
56
  {
57
57
  "path": "../../editor-plugin-interaction/afm-rovo-extension/tsconfig.json"
58
58
  },
59
+ {
60
+ "path": "../../editor-plugin-limited-mode/afm-rovo-extension/tsconfig.json"
61
+ },
59
62
  {
60
63
  "path": "../../editor-plugin-selection/afm-rovo-extension/tsconfig.json"
61
64
  },
@@ -77,6 +80,9 @@
77
80
  {
78
81
  "path": "../../../platform/feature-flags/afm-rovo-extension/tsconfig.json"
79
82
  },
83
+ {
84
+ "path": "../../../platform/feature-flags-react/afm-rovo-extension/tsconfig.json"
85
+ },
80
86
  {
81
87
  "path": "../../../pragmatic-drag-and-drop/core/afm-rovo-extension/tsconfig.json"
82
88
  },
@@ -56,6 +56,9 @@
56
56
  {
57
57
  "path": "../../editor-plugin-interaction/afm-townsquare/tsconfig.json"
58
58
  },
59
+ {
60
+ "path": "../../editor-plugin-limited-mode/afm-townsquare/tsconfig.json"
61
+ },
59
62
  {
60
63
  "path": "../../editor-plugin-selection/afm-townsquare/tsconfig.json"
61
64
  },
@@ -77,6 +80,9 @@
77
80
  {
78
81
  "path": "../../../platform/feature-flags/afm-townsquare/tsconfig.json"
79
82
  },
83
+ {
84
+ "path": "../../../platform/feature-flags-react/afm-townsquare/tsconfig.json"
85
+ },
80
86
  {
81
87
  "path": "../../../pragmatic-drag-and-drop/core/afm-townsquare/tsconfig.json"
82
88
  },
@@ -14,7 +14,13 @@
14
14
  "exclude": [
15
15
  "../src/**/__tests__/*",
16
16
  "../src/**/*.test.*",
17
- "../src/**/test.*"
17
+ "../src/**/test.*",
18
+ "../src/**/examples.*",
19
+ "../src/**/examples/*",
20
+ "../src/**/examples/**/*",
21
+ "../src/**/*.stories.*",
22
+ "../src/**/stories/*",
23
+ "../src/**/stories/**/*"
18
24
  ],
19
25
  "references": [
20
26
  {
@@ -23,9 +29,6 @@
23
29
  {
24
30
  "path": "../../custom-steps/afm-volt/tsconfig.json"
25
31
  },
26
- {
27
- "path": "../../editor-common/afm-volt/tsconfig.json"
28
- },
29
32
  {
30
33
  "path": "../../editor-palette/afm-volt/tsconfig.json"
31
34
  },
@@ -86,6 +89,9 @@
86
89
  {
87
90
  "path": "../../../design-system/primitives/afm-volt/tsconfig.json"
88
91
  },
92
+ {
93
+ "path": "../../../react-ufo/atlaskit/afm-volt/tsconfig.json"
94
+ },
89
95
  {
90
96
  "path": "../../../design-system/theme/afm-volt/tsconfig.json"
91
97
  },
@@ -100,6 +106,9 @@
100
106
  },
101
107
  {
102
108
  "path": "../../../design-system/tooltip/afm-volt/tsconfig.json"
109
+ },
110
+ {
111
+ "path": "../../editor-common/afm-volt/tsconfig.json"
103
112
  }
104
113
  ]
105
114
  }
@@ -94,10 +94,10 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
94
94
  var _this;
95
95
  (0, _classCallCheck2.default)(this, TableComponent);
96
96
  _this = _callSuper(this, TableComponent, [props]);
97
- (0, _defineProperty3.default)(_this, "state", (0, _defineProperty3.default)((0, _defineProperty3.default)((0, _defineProperty3.default)((0, _defineProperty3.default)({
97
+ (0, _defineProperty3.default)(_this, "state", (0, _defineProperty3.default)((0, _defineProperty3.default)((0, _defineProperty3.default)((0, _defineProperty3.default)((0, _defineProperty3.default)({
98
98
  scroll: 0,
99
99
  parentWidth: undefined
100
- }, _types.ShadowEvent.SHOW_BEFORE_SHADOW, false), _types.ShadowEvent.SHOW_AFTER_SHADOW, false), "tableWrapperWidth", undefined), "tableWrapperHeight", undefined));
100
+ }, _types.ShadowEvent.SHOW_BEFORE_SHADOW, false), _types.ShadowEvent.SHOW_AFTER_SHADOW, false), "tableWrapperWidth", undefined), "tableWrapperHeight", undefined), "windowResized", false));
101
101
  (0, _defineProperty3.default)(_this, "holdCompleted", false);
102
102
  (0, _defineProperty3.default)(_this, "dispatchEventName", "tableResized-".concat(generateUniqueTableId()));
103
103
  (0, _defineProperty3.default)(_this, "handleMouseOut", function (event) {
@@ -334,6 +334,16 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
334
334
  parentWidth: parentWidth
335
335
  });
336
336
  });
337
+ // This is a new handler for window resize events that sets the windowResized state immediately
338
+ // This is needed to update colgroup on window resize, to enforce the table scaling
339
+ (0, _defineProperty3.default)(_this, "handleWindowResizeNew", function () {
340
+ // Set resizing to true immediately
341
+ if (!_this.state.windowResized) {
342
+ _this.setState({
343
+ windowResized: true
344
+ });
345
+ }
346
+ });
337
347
  (0, _defineProperty3.default)(_this, "getParentNodeWidth", function () {
338
348
  var _this$props6 = _this.props,
339
349
  getPos = _this$props6.getPos,
@@ -355,11 +365,29 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
355
365
  (0, _defineProperty3.default)(_this, "tableNodeLayoutSize", function (node, containerWidth, options) {
356
366
  return (0, _misc.getLayoutSize)(node.attrs.layout, containerWidth || _this.props.containerWidth.width, options || _this.props.options || {});
357
367
  });
368
+ (0, _defineProperty3.default)(_this, "shouldUpdateColgroup", function (params) {
369
+ var _this$props$options, _this$props$options2;
370
+ var isWindowResized = params.isWindowResized,
371
+ isWidthChanged = params.isWidthChanged,
372
+ isTableWidthChanged = params.isTableWidthChanged,
373
+ isColumnsDistributed = params.isColumnsDistributed,
374
+ isTableResizedFullWidth = params.isTableResizedFullWidth,
375
+ isTableDisplayModeChanged = params.isTableDisplayModeChanged,
376
+ isNumberColumnChanged = params.isNumberColumnChanged,
377
+ isNumberOfColumnsChanged = params.isNumberOfColumnsChanged,
378
+ isFullWidthModeAndLineLengthChanged = params.isFullWidthModeAndLineLengthChanged;
379
+ var isFullPageEditor = !((_this$props$options = _this.props.options) !== null && _this$props$options !== void 0 && _this$props$options.isCommentEditor) && !((_this$props$options2 = _this.props.options) !== null && _this$props$options2 !== void 0 && _this$props$options2.isChromelessEditor);
380
+ if ((0, _expValEquals.expValEquals)('platform_editor_tables_scaling_css', 'isEnabled', true) && isFullPageEditor) {
381
+ return !!isWindowResized || isColumnsDistributed || !!isTableResizedFullWidth || isTableDisplayModeChanged || isNumberColumnChanged || isNumberOfColumnsChanged || !!isFullWidthModeAndLineLengthChanged;
382
+ }
383
+ return isWidthChanged || isTableWidthChanged || isColumnsDistributed || !!isTableResizedFullWidth || isTableDisplayModeChanged || isNumberColumnChanged || isNumberOfColumnsChanged || !!isFullWidthModeAndLineLengthChanged;
384
+ });
358
385
  (0, _defineProperty3.default)(_this, "scaleTableDebounced", (0, _rafSchd.default)(_this.scaleTable));
359
386
  (0, _defineProperty3.default)(_this, "handleTableResizingDebounced", (0, _rafSchd.default)(_this.handleTableResizing));
360
387
  (0, _defineProperty3.default)(_this, "handleScrollDebounced", (0, _rafSchd.default)(_this.handleScroll));
361
388
  (0, _defineProperty3.default)(_this, "handleAutoSizeDebounced", (0, _rafSchd.default)(_this.handleAutoSize));
362
389
  (0, _defineProperty3.default)(_this, "handleWindowResizeDebounced", (0, _rafSchd.default)(_this.handleWindowResize));
390
+ (0, _defineProperty3.default)(_this, "handleWindowResizeNewDebounced", (0, _rafSchd.default)(_this.handleWindowResizeNew));
363
391
  (0, _defineProperty3.default)(_this, "updateShadowStateDebounced", (0, _rafSchd.default)(_this.updateShadowState));
364
392
  var _options = props.options,
365
393
  _containerWidth = props.containerWidth,
@@ -465,11 +493,13 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
465
493
  var _getEditorFeatureFlag = getEditorFeatureFlags(),
466
494
  _getEditorFeatureFlag2 = _getEditorFeatureFlag.tableWithFixedColumnWidthsOption,
467
495
  tableWithFixedColumnWidthsOption = _getEditorFeatureFlag2 === void 0 ? false : _getEditorFeatureFlag2;
468
- if (isTableScalingEnabled && !tableWithFixedColumnWidthsOption) {
469
- this.handleColgroupUpdates(true);
470
- }
471
- if (isTableScalingEnabled && tableWithFixedColumnWidthsOption && getNode().attrs.displayMode !== 'fixed') {
472
- this.handleColgroupUpdates(true);
496
+ if (!(0, _expValEquals.expValEquals)('platform_editor_tables_scaling_css', 'isEnabled', true)) {
497
+ if (isTableScalingEnabled && !tableWithFixedColumnWidthsOption) {
498
+ this.handleColgroupUpdates(true);
499
+ }
500
+ if (isTableScalingEnabled && tableWithFixedColumnWidthsOption && getNode().attrs.displayMode !== 'fixed') {
501
+ this.handleColgroupUpdates(true);
502
+ }
473
503
  }
474
504
  if (this.wrapper) {
475
505
  this.wrapperReisizeObserver = new ResizeObserver(function (entries) {
@@ -521,6 +551,8 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
521
551
  // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
522
552
  window.addEventListener('resize', this.handleWindowResizeDebounced);
523
553
  }
554
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
555
+ window.addEventListener('resize', this.handleWindowResizeNewDebounced);
524
556
  this.handleTableResizingDebounced();
525
557
  }
526
558
  var currentStickyState = _pluginKey.pluginKey.getState(this.props.view.state);
@@ -568,11 +600,16 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
568
600
  if (!allowTableResizing) {
569
601
  this.handleWindowResizeDebounced.cancel();
570
602
  }
603
+ this.handleWindowResizeNewDebounced.cancel();
571
604
  if (!allowTableResizing && allowColumnResizing) {
572
605
  // Ignored via go/ees005
573
606
  // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
574
607
  window.removeEventListener('resize', this.handleWindowResizeDebounced);
575
608
  }
609
+ if (allowColumnResizing) {
610
+ // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
611
+ window.removeEventListener('resize', this.handleWindowResizeNewDebounced);
612
+ }
576
613
 
577
614
  // Ignored via go/ees005
578
615
  // eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
@@ -662,22 +699,32 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
662
699
  containerLineLength = containerWidth.lineLength;
663
700
  var isLineLengthChanged = ((_this$containerWidth = this.containerWidth) === null || _this$containerWidth === void 0 ? void 0 : _this$containerWidth.lineLength) !== containerLineLength;
664
701
  var isFullWidthModeAndLineLengthChanged = this.updateColGroupFromFullWidthChange && isLineLengthChanged && (0, _platformFeatureFlags.fg)('platform_editor_table_overflow_in_full_width_fix');
665
- var maybeScale = isTableSquashed || isTableWidthChanged || isTableResizedFullWidth && !(options !== null && options !== void 0 && options.isCommentEditor) || isNumberColumnChanged || isNumberOfColumnsChanged;
702
+ var maybeScale = isTableSquashed || isTableWidthChanged || isTableResizedFullWidth && !(options !== null && options !== void 0 && options.isCommentEditor) || isNumberColumnChanged || isNumberOfColumnsChanged || (0, _expValEquals.expValEquals)('platform_editor_tables_scaling_css', 'isEnabled', true) && this.state.windowResized;
666
703
  if (force || maybeScale || isFullWidthModeAndLineLengthChanged) {
667
- var _this$containerWidth2, _this$props$options, _this$props$options2, _this$props$options3;
704
+ var _this$containerWidth2, _this$props$options3, _this$props$options4, _this$props$options5;
668
705
  var isWidthChanged = ((_this$containerWidth2 = this.containerWidth) === null || _this$containerWidth2 === void 0 ? void 0 : _this$containerWidth2.width) !== containerWidthValue;
669
706
  var wasTableResized = (0, _colgroup.hasTableBeenResized)(this.node);
670
707
  var isTableResized = (0, _colgroup.hasTableBeenResized)(tableNode);
671
708
  var isColumnsDistributed = wasTableResized && !isTableResized;
672
709
  var isTableDisplayModeChanged = this.node.attrs.displayMode !== tableNode.attrs.displayMode;
673
- var shouldUpdateColgroup = isWidthChanged || isColumnsDistributed || isTableResizedFullWidth || isTableWidthChanged || isTableDisplayModeChanged || isNumberColumnChanged || isNumberOfColumnsChanged || isFullWidthModeAndLineLengthChanged;
710
+ var shouldUpdateColgroup = this.shouldUpdateColgroup({
711
+ isWindowResized: this.state.windowResized,
712
+ isWidthChanged: isWidthChanged,
713
+ isTableWidthChanged: isTableWidthChanged,
714
+ isColumnsDistributed: isColumnsDistributed,
715
+ isTableResizedFullWidth: isTableResizedFullWidth,
716
+ isTableDisplayModeChanged: isTableDisplayModeChanged,
717
+ isNumberColumnChanged: isNumberColumnChanged,
718
+ isNumberOfColumnsChanged: isNumberOfColumnsChanged,
719
+ isFullWidthModeAndLineLengthChanged: isFullWidthModeAndLineLengthChanged
720
+ });
674
721
  var _getEditorFeatureFlag3 = getEditorFeatureFlags(),
675
722
  _getEditorFeatureFlag4 = _getEditorFeatureFlag3.tableWithFixedColumnWidthsOption,
676
723
  tableWithFixedColumnWidthsOption = _getEditorFeatureFlag4 === void 0 ? false : _getEditorFeatureFlag4;
677
- var isTableScalingWithFixedColumnWidthsOptionEnabled = !!((_this$props$options = this.props.options) !== null && _this$props$options !== void 0 && _this$props$options.isTableScalingEnabled) && tableWithFixedColumnWidthsOption;
678
- var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled || !!((_this$props$options2 = this.props.options) !== null && _this$props$options2 !== void 0 && _this$props$options2.isTableScalingEnabled) && !!((_this$props$options3 = this.props.options) !== null && _this$props$options3 !== void 0 && _this$props$options3.isCommentEditor);
724
+ var isTableScalingWithFixedColumnWidthsOptionEnabled = !!((_this$props$options3 = this.props.options) !== null && _this$props$options3 !== void 0 && _this$props$options3.isTableScalingEnabled) && tableWithFixedColumnWidthsOption;
725
+ var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled || !!((_this$props$options4 = this.props.options) !== null && _this$props$options4 !== void 0 && _this$props$options4.isTableScalingEnabled) && !!((_this$props$options5 = this.props.options) !== null && _this$props$options5 !== void 0 && _this$props$options5.isCommentEditor);
679
726
  if (force || !isResizing && shouldUpdateColgroup) {
680
- var _this$props$options4, _this$props$options5, _this$props$options6, _this$props$options7;
727
+ var _this$props$options6, _this$props$options7, _this$props$options8, _this$props$options9;
681
728
  var resizeState = (0, _resizeState.getResizeState)({
682
729
  minWidth: _consts.COLUMN_MIN_WIDTH,
683
730
  // When numbered column enabled, we need to subtract the width of the numbered column
@@ -688,16 +735,16 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
688
735
  domAtPos: view.domAtPos.bind(view),
689
736
  isTableScalingEnabled: true,
690
737
  shouldUseIncreasedScalingPercent: shouldUseIncreasedScalingPercent,
691
- isCommentEditor: !!((_this$props$options4 = this.props.options) !== null && _this$props$options4 !== void 0 && _this$props$options4.isCommentEditor)
738
+ isCommentEditor: !!((_this$props$options6 = this.props.options) !== null && _this$props$options6 !== void 0 && _this$props$options6.isCommentEditor)
692
739
  });
693
740
  var shouldScaleOnColgroupUpdate = false;
694
- if ((_this$props$options5 = this.props.options) !== null && _this$props$options5 !== void 0 && _this$props$options5.isTableScalingEnabled && !tableWithFixedColumnWidthsOption) {
741
+ if ((_this$props$options7 = this.props.options) !== null && _this$props$options7 !== void 0 && _this$props$options7.isTableScalingEnabled && !tableWithFixedColumnWidthsOption) {
695
742
  shouldScaleOnColgroupUpdate = true;
696
743
  }
697
744
  if (isTableScalingWithFixedColumnWidthsOptionEnabled && tableNode.attrs.displayMode !== 'fixed') {
698
745
  shouldScaleOnColgroupUpdate = true;
699
746
  }
700
- if ((_this$props$options6 = this.props.options) !== null && _this$props$options6 !== void 0 && _this$props$options6.isTableScalingEnabled && (_this$props$options7 = this.props.options) !== null && _this$props$options7 !== void 0 && _this$props$options7.isCommentEditor) {
747
+ if ((_this$props$options8 = this.props.options) !== null && _this$props$options8 !== void 0 && _this$props$options8.isTableScalingEnabled && (_this$props$options9 = this.props.options) !== null && _this$props$options9 !== void 0 && _this$props$options9.isCommentEditor) {
701
748
  shouldScaleOnColgroupUpdate = true;
702
749
  }
703
750
  var scalePercent = 1;
@@ -746,8 +793,8 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
746
793
  }, {
747
794
  key: "componentDidUpdate",
748
795
  value: function componentDidUpdate(_, prevState) {
749
- var _this$props$options8,
750
- _this$props$options9,
796
+ var _this$props$options0,
797
+ _this$props$options1,
751
798
  _this$wrapper,
752
799
  _this5 = this;
753
800
  var _this$props1 = this.props,
@@ -777,18 +824,21 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
777
824
  shouldHandleColgroupUpdates = true;
778
825
  }
779
826
  var isTableScalingWithFixedColumnWidthsOptionEnabled = !!isTableScalingEnabled && tableWithFixedColumnWidthsOption;
780
- var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled || !!isTableScalingEnabled && !!((_this$props$options8 = this.props.options) !== null && _this$props$options8 !== void 0 && _this$props$options8.isCommentEditor);
827
+ var shouldUseIncreasedScalingPercent = isTableScalingWithFixedColumnWidthsOptionEnabled || !!isTableScalingEnabled && !!((_this$props$options0 = this.props.options) !== null && _this$props$options0 !== void 0 && _this$props$options0.isCommentEditor);
781
828
  if (isTableScalingWithFixedColumnWidthsOptionEnabled && getNode().attrs.displayMode !== 'fixed') {
782
829
  shouldScale = true;
783
830
  shouldHandleColgroupUpdates = true;
784
831
  }
832
+ if ((0, _expValEquals.expValEquals)('platform_editor_tables_scaling_css', 'isEnabled', true) && this.state.windowResized) {
833
+ shouldHandleColgroupUpdates = true;
834
+ }
785
835
  if (shouldHandleColgroupUpdates) {
786
836
  this.handleColgroupUpdates();
787
837
  }
788
838
  if (isInDanger && !table) {
789
839
  (0, _commands.clearHoverSelection)()(view.state, view.dispatch);
790
840
  }
791
- if ((_this$props$options9 = this.props.options) !== null && _this$props$options9 !== void 0 && _this$props$options9.isCommentEditor && allowTableResizing && !(options !== null && options !== void 0 && options.isTableScalingEnabled)) {
841
+ if ((_this$props$options1 = this.props.options) !== null && _this$props$options1 !== void 0 && _this$props$options1.isCommentEditor && allowTableResizing && !(options !== null && options !== void 0 && options.isTableScalingEnabled)) {
792
842
  this.removeInlineTableWidth();
793
843
  }
794
844
  if ((_this$wrapper = this.wrapper) !== null && _this$wrapper !== void 0 && _this$wrapper.parentElement && this.table && !this.overflowShadowsObserver) {
@@ -878,7 +928,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
878
928
  key: "render",
879
929
  value: function render() {
880
930
  var _this6 = this,
881
- _this$props$options0;
931
+ _this$props$options10;
882
932
  var _this$props10 = this.props,
883
933
  view = _this$props10.view,
884
934
  getNode = _this$props10.getNode,
@@ -940,7 +990,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
940
990
  ,
941
991
  selection: view.state.selection,
942
992
  headerRowHeight: headerRow ? headerRow.offsetHeight : undefined,
943
- stickyHeader: this.state.stickyHeader,
993
+ stickyHeader: !this.props.limitedMode ? this.state.stickyHeader : undefined,
944
994
  tableWrapperWidth: this.state.tableWrapperWidth,
945
995
  api: pluginInjectionApi,
946
996
  isChromelessEditor: options === null || options === void 0 ? void 0 : options.isChromelessEditor
@@ -962,7 +1012,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
962
1012
  ,
963
1013
  selection: view.state.selection,
964
1014
  headerRowHeight: headerRow ? headerRow.offsetHeight : undefined,
965
- stickyHeader: this.state.stickyHeader,
1015
+ stickyHeader: !this.props.limitedMode ? this.state.stickyHeader : undefined,
966
1016
  getEditorFeatureFlags: getEditorFeatureFlags,
967
1017
  tableContainerWidth: tableContainerWidth,
968
1018
  isNumberColumnEnabled: node.attrs.isNumberColumnEnabled,
@@ -995,15 +1045,15 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
995
1045
  var isNested = (0, _nodes.isTableNested)(view.state, tablePos);
996
1046
  var topShadowPadding = isDragAndDropEnabled ? 0 : shadowPadding;
997
1047
  var topOffset = 0;
998
- var topStickyShadowPosition = this.state.stickyHeader && topOffset + this.state.stickyHeader.padding + topShadowPadding + 2;
1048
+ var topStickyShadowPosition = !this.props.limitedMode && this.state.stickyHeader && topOffset + this.state.stickyHeader.padding + topShadowPadding + 2;
999
1049
  var _getEditorFeatureFlag7 = getEditorFeatureFlags(),
1000
1050
  _getEditorFeatureFlag8 = _getEditorFeatureFlag7.tableWithFixedColumnWidthsOption,
1001
1051
  tableWithFixedColumnWidthsOption = _getEditorFeatureFlag8 === void 0 ? false : _getEditorFeatureFlag8;
1002
- var shouldUseIncreasedScalingPercent = !!isTableScalingEnabled && (tableWithFixedColumnWidthsOption || !!((_this$props$options0 = this.props.options) !== null && _this$props$options0 !== void 0 && _this$props$options0.isCommentEditor));
1052
+ var shouldUseIncreasedScalingPercent = !!isTableScalingEnabled && (tableWithFixedColumnWidthsOption || !!((_this$props$options10 = this.props.options) !== null && _this$props$options10 !== void 0 && _this$props$options10.isCommentEditor));
1003
1053
  return /*#__PURE__*/_react.default.createElement(_TableContainer.TableContainer
1004
1054
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
1005
1055
  , {
1006
- className: (0, _classnames2.default)(_types.TableCssClassName.TABLE_CONTAINER, (0, _defineProperty3.default)((0, _defineProperty3.default)((0, _defineProperty3.default)((0, _defineProperty3.default)((0, _defineProperty3.default)({}, _types.TableCssClassName.WITH_CONTROLS, allowControls && tableActive), _types.TableCssClassName.TABLE_STICKY, this.state.stickyHeader && hasHeaderRow), _types.TableCssClassName.HOVERED_DELETE_BUTTON, isInDanger), _types.TableCssClassName.TABLE_SELECTED, (0, _utils2.isTableSelected)(selection !== null && selection !== void 0 ? selection : view.state.selection)), _types.TableCssClassName.NESTED_TABLE_WITH_CONTROLS, tableActive && allowControls && this.isNestedInTable)),
1056
+ className: (0, _classnames2.default)(_types.TableCssClassName.TABLE_CONTAINER, (0, _defineProperty3.default)((0, _defineProperty3.default)((0, _defineProperty3.default)((0, _defineProperty3.default)((0, _defineProperty3.default)({}, _types.TableCssClassName.WITH_CONTROLS, allowControls && tableActive), _types.TableCssClassName.TABLE_STICKY, !this.props.limitedMode && this.state.stickyHeader && hasHeaderRow), _types.TableCssClassName.HOVERED_DELETE_BUTTON, isInDanger), _types.TableCssClassName.TABLE_SELECTED, (0, _utils2.isTableSelected)(selection !== null && selection !== void 0 ? selection : view.state.selection)), _types.TableCssClassName.NESTED_TABLE_WITH_CONTROLS, tableActive && allowControls && this.isNestedInTable)),
1007
1057
  editorView: view,
1008
1058
  getPos: getPos,
1009
1059
  node: node
@@ -1017,6 +1067,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
1017
1067
  tableWrapperHeight: this.state.tableWrapperHeight,
1018
1068
  isTableResizingEnabled: allowTableResizing,
1019
1069
  isResizing: isResizing,
1070
+ isWindowResized: this.state.windowResized,
1020
1071
  isTableScalingEnabled: isTableScalingEnabled,
1021
1072
  isTableWithFixedColumnWidthsOptionEnabled: tableWithFixedColumnWidthsOption,
1022
1073
  isWholeTableInDanger: isWholeTableInDanger,