@atlaskit/editor-plugin-table 12.1.14 → 12.1.15
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 +13 -0
- package/afm-cc/tsconfig.json +3 -0
- package/afm-dev-agents/tsconfig.json +3 -0
- package/afm-jira/tsconfig.json +3 -0
- package/afm-passionfruit/tsconfig.json +117 -0
- package/afm-post-office/tsconfig.json +3 -0
- package/afm-rovo-extension/tsconfig.json +3 -0
- package/afm-townsquare/tsconfig.json +3 -0
- package/afm-volt/tsconfig.json +13 -4
- package/dist/cjs/nodeviews/TableComponent.js +4 -4
- package/dist/cjs/nodeviews/TableRow.js +24 -1
- package/dist/cjs/nodeviews/table-node-views.js +1 -1
- package/dist/cjs/nodeviews/table.js +10 -5
- package/dist/cjs/pm-plugins/main.js +2 -1
- package/dist/cjs/ui/TableFloatingControls/NumberColumn/index.js +2 -7
- package/dist/es2019/nodeviews/TableComponent.js +4 -4
- package/dist/es2019/nodeviews/TableRow.js +24 -1
- package/dist/es2019/nodeviews/table-node-views.js +1 -1
- package/dist/es2019/nodeviews/table.js +9 -4
- package/dist/es2019/pm-plugins/main.js +2 -1
- package/dist/es2019/ui/TableFloatingControls/NumberColumn/index.js +5 -14
- package/dist/esm/nodeviews/TableComponent.js +4 -4
- package/dist/esm/nodeviews/TableRow.js +24 -1
- package/dist/esm/nodeviews/table-node-views.js +1 -1
- package/dist/esm/nodeviews/table.js +10 -5
- package/dist/esm/pm-plugins/main.js +2 -1
- package/dist/esm/ui/TableFloatingControls/NumberColumn/index.js +1 -6
- package/dist/types/nodeviews/ExternalDropTargets.d.ts +1 -1
- package/dist/types/nodeviews/TableComponent.d.ts +1 -0
- package/dist/types/nodeviews/TableRow.d.ts +3 -1
- package/dist/types/nodeviews/table.d.ts +1 -1
- package/dist/types/pm-plugins/analytics/commands.d.ts +2 -2
- package/dist/types/pm-plugins/analytics/plugin-factory.d.ts +1 -1
- package/dist/types/pm-plugins/analytics/utils/moved-event.d.ts +1 -1
- package/dist/types/pm-plugins/commands/column-resize.d.ts +10 -10
- package/dist/types/pm-plugins/commands/commands-with-analytics.d.ts +1 -1
- package/dist/types/pm-plugins/commands/go-to-next-cell.d.ts +1 -1
- package/dist/types/pm-plugins/commands/misc.d.ts +2 -2
- package/dist/types/pm-plugins/commands/selection.d.ts +6 -6
- package/dist/types/pm-plugins/drag-and-drop/commands-with-analytics.d.ts +3 -3
- package/dist/types/pm-plugins/drag-and-drop/commands.d.ts +1 -1
- package/dist/types/pm-plugins/drag-and-drop/plugin-factory.d.ts +1 -1
- package/dist/types/pm-plugins/plugin-factory.d.ts +1 -1
- package/dist/types/pm-plugins/sticky-headers/plugin-state.d.ts +1 -1
- package/dist/types/pm-plugins/table-resizing/plugin-factory.d.ts +1 -1
- package/dist/types/pm-plugins/utils/create.d.ts +10 -10
- package/dist/types/pm-plugins/utils/decoration.d.ts +3 -3
- package/dist/types/pm-plugins/utils/dom.d.ts +2 -2
- package/dist/types/pm-plugins/utils/drag-menu.d.ts +3 -3
- package/dist/types/pm-plugins/utils/merged-cells.d.ts +3 -2
- package/dist/types/tablePluginType.d.ts +2 -0
- package/dist/types/ui/DragHandle/index.d.ts +4 -14
- package/dist/types/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +1 -7
- package/dist/types/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +4 -14
- package/dist/types/ui/TableFloatingControls/RowControls/DragControls.d.ts +1 -1
- package/dist/types/ui/TableFloatingControls/index.d.ts +1 -7
- package/dist/types/ui/global-styles.d.ts +2 -8
- package/dist/types/ui/hooks/useInternalTablePluginStateSelector.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/ExternalDropTargets.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/TableComponent.d.ts +1 -0
- package/dist/types-ts4.5/nodeviews/TableRow.d.ts +3 -1
- package/dist/types-ts4.5/nodeviews/table.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/analytics/commands.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/analytics/plugin-factory.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/analytics/utils/moved-event.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/commands/column-resize.d.ts +10 -10
- package/dist/types-ts4.5/pm-plugins/commands/commands-with-analytics.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/commands/go-to-next-cell.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/commands/misc.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/commands/selection.d.ts +6 -6
- package/dist/types-ts4.5/pm-plugins/drag-and-drop/commands-with-analytics.d.ts +3 -3
- package/dist/types-ts4.5/pm-plugins/drag-and-drop/commands.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/drag-and-drop/plugin-factory.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/plugin-factory.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/sticky-headers/plugin-state.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/table-resizing/plugin-factory.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/utils/create.d.ts +10 -10
- package/dist/types-ts4.5/pm-plugins/utils/decoration.d.ts +3 -3
- package/dist/types-ts4.5/pm-plugins/utils/dom.d.ts +2 -2
- package/dist/types-ts4.5/pm-plugins/utils/drag-menu.d.ts +3 -3
- package/dist/types-ts4.5/pm-plugins/utils/merged-cells.d.ts +3 -2
- package/dist/types-ts4.5/tablePluginType.d.ts +2 -0
- package/dist/types-ts4.5/ui/DragHandle/index.d.ts +4 -14
- package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +1 -7
- package/dist/types-ts4.5/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +4 -14
- package/dist/types-ts4.5/ui/TableFloatingControls/RowControls/DragControls.d.ts +1 -1
- package/dist/types-ts4.5/ui/TableFloatingControls/index.d.ts +1 -7
- package/dist/types-ts4.5/ui/global-styles.d.ts +2 -8
- package/dist/types-ts4.5/ui/hooks/useInternalTablePluginStateSelector.d.ts +1 -1
- package/package.json +6 -8
- package/src/nodeviews/TableComponent.tsx +8 -4
- package/src/nodeviews/TableRow.ts +38 -1
- package/src/nodeviews/table-node-views.ts +1 -1
- package/src/nodeviews/table.tsx +9 -0
- package/src/pm-plugins/main.ts +1 -1
- package/src/tablePluginType.ts +2 -0
- package/src/ui/TableFloatingControls/NumberColumn/index.tsx +5 -14
- package/tsconfig.app.json +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 12.1.15
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#199851](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/199851)
|
|
8
|
+
[`a37fa5c2adf4a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a37fa5c2adf4a) -
|
|
9
|
+
[ux] EDITOR-346 Clean up nested tables feature gate
|
|
10
|
+
`platform_editor_nested_tables_number_column_fixes`
|
|
11
|
+
- [#200948](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/200948)
|
|
12
|
+
[`8dd9a944113d5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8dd9a944113d5) -
|
|
13
|
+
Opt out of throttling rendering
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 12.1.14
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
package/afm-jira/tsconfig.json
CHANGED
|
@@ -0,0 +1,117 @@
|
|
|
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": "../../../pragmatic-drag-and-drop/core/afm-passionfruit/tsconfig.json"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"path": "../../../pragmatic-drag-and-drop/auto-scroll/afm-passionfruit/tsconfig.json"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"path": "../../../pragmatic-drag-and-drop/hitbox/afm-passionfruit/tsconfig.json"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"path": "../../../design-system/primitives/afm-passionfruit/tsconfig.json"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"path": "../../../react-ufo/atlaskit/afm-passionfruit/tsconfig.json"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"path": "../../../design-system/theme/afm-passionfruit/tsconfig.json"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"path": "../../tmp-editor-statsig/afm-passionfruit/tsconfig.json"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"path": "../../../design-system/toggle/afm-passionfruit/tsconfig.json"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"path": "../../../design-system/tokens/afm-passionfruit/tsconfig.json"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"path": "../../../design-system/tooltip/afm-passionfruit/tsconfig.json"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"path": "../../editor-common/afm-passionfruit/tsconfig.json"
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
}
|
|
@@ -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
|
},
|
package/afm-volt/tsconfig.json
CHANGED
|
@@ -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
|
}
|
|
@@ -940,7 +940,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
940
940
|
,
|
|
941
941
|
selection: view.state.selection,
|
|
942
942
|
headerRowHeight: headerRow ? headerRow.offsetHeight : undefined,
|
|
943
|
-
stickyHeader: this.state.stickyHeader,
|
|
943
|
+
stickyHeader: !this.props.limitedMode ? this.state.stickyHeader : undefined,
|
|
944
944
|
tableWrapperWidth: this.state.tableWrapperWidth,
|
|
945
945
|
api: pluginInjectionApi,
|
|
946
946
|
isChromelessEditor: options === null || options === void 0 ? void 0 : options.isChromelessEditor
|
|
@@ -962,7 +962,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
962
962
|
,
|
|
963
963
|
selection: view.state.selection,
|
|
964
964
|
headerRowHeight: headerRow ? headerRow.offsetHeight : undefined,
|
|
965
|
-
stickyHeader: this.state.stickyHeader,
|
|
965
|
+
stickyHeader: !this.props.limitedMode ? this.state.stickyHeader : undefined,
|
|
966
966
|
getEditorFeatureFlags: getEditorFeatureFlags,
|
|
967
967
|
tableContainerWidth: tableContainerWidth,
|
|
968
968
|
isNumberColumnEnabled: node.attrs.isNumberColumnEnabled,
|
|
@@ -995,7 +995,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
995
995
|
var isNested = (0, _nodes.isTableNested)(view.state, tablePos);
|
|
996
996
|
var topShadowPadding = isDragAndDropEnabled ? 0 : shadowPadding;
|
|
997
997
|
var topOffset = 0;
|
|
998
|
-
var topStickyShadowPosition = this.state.stickyHeader && topOffset + this.state.stickyHeader.padding + topShadowPadding + 2;
|
|
998
|
+
var topStickyShadowPosition = !this.props.limitedMode && this.state.stickyHeader && topOffset + this.state.stickyHeader.padding + topShadowPadding + 2;
|
|
999
999
|
var _getEditorFeatureFlag7 = getEditorFeatureFlags(),
|
|
1000
1000
|
_getEditorFeatureFlag8 = _getEditorFeatureFlag7.tableWithFixedColumnWidthsOption,
|
|
1001
1001
|
tableWithFixedColumnWidthsOption = _getEditorFeatureFlag8 === void 0 ? false : _getEditorFeatureFlag8;
|
|
@@ -1003,7 +1003,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
1003
1003
|
return /*#__PURE__*/_react.default.createElement(_TableContainer.TableContainer
|
|
1004
1004
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
1005
1005
|
, {
|
|
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)),
|
|
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.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
1007
|
editorView: view,
|
|
1008
1008
|
getPos: getPos,
|
|
1009
1009
|
node: node
|
|
@@ -35,10 +35,25 @@ var HEADER_ROW_SCROLL_THROTTLE_TIMEOUT = 200;
|
|
|
35
35
|
// if too short it would trigger too many dom updates.
|
|
36
36
|
var HEADER_ROW_SCROLL_RESET_DEBOUNCE_TIMEOUT = 400;
|
|
37
37
|
var TableRow = exports.default = /*#__PURE__*/function (_TableNodeView) {
|
|
38
|
-
function TableRow(node, view, getPos, eventDispatcher) {
|
|
38
|
+
function TableRow(node, view, getPos, eventDispatcher, api) {
|
|
39
|
+
var _api$limitedMode;
|
|
39
40
|
var _this;
|
|
40
41
|
(0, _classCallCheck2.default)(this, TableRow);
|
|
41
42
|
_this = _callSuper(this, TableRow, [node, view, getPos, eventDispatcher]);
|
|
43
|
+
(0, _defineProperty2.default)(_this, "cleanup", function () {
|
|
44
|
+
if (_this.isStickyHeaderEnabled) {
|
|
45
|
+
_this.unsubscribe();
|
|
46
|
+
_this.nodeVisibilityObserverCleanupFn && _this.nodeVisibilityObserverCleanupFn();
|
|
47
|
+
var tree = (0, _dom2.getTree)(_this.dom);
|
|
48
|
+
if (tree) {
|
|
49
|
+
_this.makeRowHeaderNotSticky(tree.table, true);
|
|
50
|
+
}
|
|
51
|
+
_this.emitOff(false);
|
|
52
|
+
}
|
|
53
|
+
if (_this.tableContainerObserver) {
|
|
54
|
+
_this.tableContainerObserver.disconnect();
|
|
55
|
+
}
|
|
56
|
+
});
|
|
42
57
|
(0, _defineProperty2.default)(_this, "colControlsOffset", 0);
|
|
43
58
|
(0, _defineProperty2.default)(_this, "focused", false);
|
|
44
59
|
(0, _defineProperty2.default)(_this, "topPosEditorElement", 0);
|
|
@@ -78,6 +93,11 @@ var TableRow = exports.default = /*#__PURE__*/function (_TableNodeView) {
|
|
|
78
93
|
var _getPluginState = (0, _pluginFactory.getPluginState)(view.state),
|
|
79
94
|
pluginConfig = _getPluginState.pluginConfig;
|
|
80
95
|
_this.isStickyHeaderEnabled = !!pluginConfig.stickyHeaders;
|
|
96
|
+
if (api !== null && api !== void 0 && (_api$limitedMode = api.limitedMode) !== null && _api$limitedMode !== void 0 && (_api$limitedMode = _api$limitedMode.sharedState.currentState()) !== null && _api$limitedMode !== void 0 && (_api$limitedMode = _api$limitedMode.limitedModePluginKey.getState(view.state)) !== null && _api$limitedMode !== void 0 && _api$limitedMode.documentSizeBreachesThreshold) {
|
|
97
|
+
_this.isStickyHeaderEnabled = false;
|
|
98
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
99
|
+
document.addEventListener('limited-mode-activated', _this.cleanup);
|
|
100
|
+
}
|
|
81
101
|
var pos = _this.getPos();
|
|
82
102
|
_this.isInNestedTable = false;
|
|
83
103
|
if (pos) {
|
|
@@ -160,6 +180,9 @@ var TableRow = exports.default = /*#__PURE__*/function (_TableNodeView) {
|
|
|
160
180
|
}
|
|
161
181
|
this.emitOff(true);
|
|
162
182
|
}
|
|
183
|
+
|
|
184
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
185
|
+
document.removeEventListener('limited-mode-activated', this.cleanup);
|
|
163
186
|
if (this.tableContainerObserver) {
|
|
164
187
|
this.tableContainerObserver.disconnect();
|
|
165
188
|
}
|
|
@@ -29,6 +29,6 @@ var tableHeaderView = exports.tableHeaderView = function tableHeaderView(options
|
|
|
29
29
|
};
|
|
30
30
|
var tableRowView = exports.tableRowView = function tableRowView(options) {
|
|
31
31
|
return function (node, view, getPos) {
|
|
32
|
-
return new _TableRow.default(node, view, getPos, options.eventDispatcher);
|
|
32
|
+
return new _TableRow.default(node, view, getPos, options.eventDispatcher, options.pluginInjectionApi);
|
|
33
33
|
};
|
|
34
34
|
};
|
|
@@ -69,7 +69,9 @@ var TableView = exports.default = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
69
69
|
function TableView(props) {
|
|
70
70
|
var _this;
|
|
71
71
|
(0, _classCallCheck2.default)(this, TableView);
|
|
72
|
-
_this = _callSuper(this, TableView, [props.node, props.view, props.getPos, props.portalProviderAPI, props.eventDispatcher, props
|
|
72
|
+
_this = _callSuper(this, TableView, [props.node, props.view, props.getPos, props.portalProviderAPI, props.eventDispatcher, props, undefined, undefined,
|
|
73
|
+
// @portal-render-immediately
|
|
74
|
+
true]);
|
|
73
75
|
(0, _defineProperty2.default)(_this, "getNode", function () {
|
|
74
76
|
return _this.node;
|
|
75
77
|
});
|
|
@@ -204,7 +206,8 @@ var TableView = exports.default = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
204
206
|
}, {
|
|
205
207
|
key: "render",
|
|
206
208
|
value: function render(props, forwardRef) {
|
|
207
|
-
var
|
|
209
|
+
var _props$pluginInjectio,
|
|
210
|
+
_this4 = this;
|
|
208
211
|
if ((0, _platformFeatureFlags.fg)('platform_editor_table_use_shared_state_hook_fg')) {
|
|
209
212
|
return /*#__PURE__*/_react.default.createElement(_TableComponentWithSharedState.TableComponentWithSharedState, {
|
|
210
213
|
forwardRef: forwardRef,
|
|
@@ -250,11 +253,12 @@ var TableView = exports.default = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
250
253
|
tableWidthPluginState: _tableWidth.pluginKey,
|
|
251
254
|
widthPlugin: fakePluginKey,
|
|
252
255
|
mediaState: fakeMediaPluginKey,
|
|
253
|
-
tableDragAndDropState: _pluginKey.pluginKey
|
|
256
|
+
tableDragAndDropState: _pluginKey.pluginKey,
|
|
257
|
+
limitedModePlugin: (_props$pluginInjectio = props.pluginInjectionApi) === null || _props$pluginInjectio === void 0 || (_props$pluginInjectio = _props$pluginInjectio.limitedMode) === null || _props$pluginInjectio === void 0 || (_props$pluginInjectio = _props$pluginInjectio.sharedState.currentState()) === null || _props$pluginInjectio === void 0 ? void 0 : _props$pluginInjectio.limitedModePluginKey
|
|
254
258
|
},
|
|
255
259
|
editorView: props.view,
|
|
256
260
|
render: function render(pluginStates) {
|
|
257
|
-
var _props$options;
|
|
261
|
+
var _props$options, _pluginStates$limited, _pluginStates$limited2;
|
|
258
262
|
var tableResizingPluginState = pluginStates.tableResizingPluginState,
|
|
259
263
|
tableWidthPluginState = pluginStates.tableWidthPluginState,
|
|
260
264
|
pluginState = pluginStates.pluginState,
|
|
@@ -321,7 +325,8 @@ var TableView = exports.default = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
321
325
|
contentDOM: forwardRef,
|
|
322
326
|
getEditorFeatureFlags: props.getEditorFeatureFlags,
|
|
323
327
|
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
|
|
324
|
-
pluginInjectionApi: props.pluginInjectionApi
|
|
328
|
+
pluginInjectionApi: props.pluginInjectionApi,
|
|
329
|
+
limitedMode: (_pluginStates$limited = (_pluginStates$limited2 = pluginStates.limitedModePlugin) === null || _pluginStates$limited2 === void 0 ? void 0 : _pluginStates$limited2.documentSizeBreachesThreshold) !== null && _pluginStates$limited !== void 0 ? _pluginStates$limited : false
|
|
325
330
|
});
|
|
326
331
|
}
|
|
327
332
|
});
|
|
@@ -71,7 +71,8 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatchAnalytic
|
|
|
71
71
|
isChromelessEditor: isChromelessEditor
|
|
72
72
|
}),
|
|
73
73
|
tableRow: (0, _tableNodeViews.tableRowView)({
|
|
74
|
-
eventDispatcher: eventDispatcher
|
|
74
|
+
eventDispatcher: eventDispatcher,
|
|
75
|
+
pluginInjectionApi: pluginInjectionApi
|
|
75
76
|
}),
|
|
76
77
|
tableCell: (0, _tableNodeViews.tableCellView)({
|
|
77
78
|
eventDispatcher: eventDispatcher,
|
|
@@ -13,10 +13,9 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
13
13
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
15
|
var _react = _interopRequireWildcard(require("react"));
|
|
16
|
-
var
|
|
16
|
+
var _classnames2 = _interopRequireDefault(require("classnames"));
|
|
17
17
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
18
18
|
var _utils = require("@atlaskit/editor-tables/utils");
|
|
19
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
19
|
var _commands = require("../../../pm-plugins/commands");
|
|
21
20
|
var _rowControls = require("../../../pm-plugins/utils/row-controls");
|
|
22
21
|
var _types = require("../../../types");
|
|
@@ -94,11 +93,7 @@ var NumberColumn = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
94
93
|
isResizing = _this$props4.isResizing,
|
|
95
94
|
tableActive = _this$props4.tableActive;
|
|
96
95
|
var isActive = (0, _utils.isRowSelected)(index)(editorView.state.selection) || (hoveredRows || []).indexOf(index) !== -1 && !isResizing;
|
|
97
|
-
|
|
98
|
-
return (0, _classnames3.default)(_types.TableCssClassName.NUMBERED_COLUMN_BUTTON, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON_DISABLED, isButtonDisabled), _types.TableCssClassName.HOVERED_CELL_IN_DANGER, tableActive && isActive && isInDanger), _types.TableCssClassName.HOVERED_CELL_ACTIVE, tableActive && isActive));
|
|
99
|
-
} else {
|
|
100
|
-
return (0, _classnames3.default)(_types.TableCssClassName.NUMBERED_COLUMN_BUTTON, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON_DISABLED, isButtonDisabled), _types.TableCssClassName.HOVERED_CELL_IN_DANGER, isActive && isInDanger), _types.TableCssClassName.HOVERED_CELL_ACTIVE, isActive));
|
|
101
|
-
}
|
|
96
|
+
return (0, _classnames2.default)(_types.TableCssClassName.NUMBERED_COLUMN_BUTTON, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON_DISABLED, isButtonDisabled), _types.TableCssClassName.HOVERED_CELL_IN_DANGER, tableActive && isActive && isInDanger), _types.TableCssClassName.HOVERED_CELL_ACTIVE, tableActive && isActive));
|
|
102
97
|
});
|
|
103
98
|
return _this;
|
|
104
99
|
}
|
|
@@ -909,7 +909,7 @@ class TableComponent extends React.Component {
|
|
|
909
909
|
,
|
|
910
910
|
selection: view.state.selection,
|
|
911
911
|
headerRowHeight: headerRow ? headerRow.offsetHeight : undefined,
|
|
912
|
-
stickyHeader: this.state.stickyHeader,
|
|
912
|
+
stickyHeader: !this.props.limitedMode ? this.state.stickyHeader : undefined,
|
|
913
913
|
tableWrapperWidth: this.state.tableWrapperWidth,
|
|
914
914
|
api: pluginInjectionApi,
|
|
915
915
|
isChromelessEditor: options === null || options === void 0 ? void 0 : options.isChromelessEditor
|
|
@@ -931,7 +931,7 @@ class TableComponent extends React.Component {
|
|
|
931
931
|
,
|
|
932
932
|
selection: view.state.selection,
|
|
933
933
|
headerRowHeight: headerRow ? headerRow.offsetHeight : undefined,
|
|
934
|
-
stickyHeader: this.state.stickyHeader,
|
|
934
|
+
stickyHeader: !this.props.limitedMode ? this.state.stickyHeader : undefined,
|
|
935
935
|
getEditorFeatureFlags: getEditorFeatureFlags,
|
|
936
936
|
tableContainerWidth: tableContainerWidth,
|
|
937
937
|
isNumberColumnEnabled: node.attrs.isNumberColumnEnabled,
|
|
@@ -962,7 +962,7 @@ class TableComponent extends React.Component {
|
|
|
962
962
|
const isNested = isTableNested(view.state, tablePos);
|
|
963
963
|
const topShadowPadding = isDragAndDropEnabled ? 0 : shadowPadding;
|
|
964
964
|
const topOffset = 0;
|
|
965
|
-
const topStickyShadowPosition = this.state.stickyHeader && topOffset + this.state.stickyHeader.padding + topShadowPadding + 2;
|
|
965
|
+
const topStickyShadowPosition = !this.props.limitedMode && this.state.stickyHeader && topOffset + this.state.stickyHeader.padding + topShadowPadding + 2;
|
|
966
966
|
const {
|
|
967
967
|
tableWithFixedColumnWidthsOption = false
|
|
968
968
|
} = getEditorFeatureFlags();
|
|
@@ -972,7 +972,7 @@ class TableComponent extends React.Component {
|
|
|
972
972
|
, {
|
|
973
973
|
className: classnames(ClassName.TABLE_CONTAINER, {
|
|
974
974
|
[ClassName.WITH_CONTROLS]: allowControls && tableActive,
|
|
975
|
-
[ClassName.TABLE_STICKY]: this.state.stickyHeader && hasHeaderRow,
|
|
975
|
+
[ClassName.TABLE_STICKY]: !this.props.limitedMode && this.state.stickyHeader && hasHeaderRow,
|
|
976
976
|
[ClassName.HOVERED_DELETE_BUTTON]: isInDanger,
|
|
977
977
|
[ClassName.TABLE_SELECTED]: isTableSelected(selection !== null && selection !== void 0 ? selection : view.state.selection),
|
|
978
978
|
[ClassName.NESTED_TABLE_WITH_CONTROLS]: tableActive && allowControls && this.isNestedInTable
|
|
@@ -21,8 +21,23 @@ const HEADER_ROW_SCROLL_THROTTLE_TIMEOUT = 200;
|
|
|
21
21
|
// if too short it would trigger too many dom updates.
|
|
22
22
|
const HEADER_ROW_SCROLL_RESET_DEBOUNCE_TIMEOUT = 400;
|
|
23
23
|
export default class TableRow extends TableNodeView {
|
|
24
|
-
constructor(node, view, getPos, eventDispatcher) {
|
|
24
|
+
constructor(node, view, getPos, eventDispatcher, api) {
|
|
25
|
+
var _api$limitedMode, _api$limitedMode$shar, _api$limitedMode$shar2;
|
|
25
26
|
super(node, view, getPos, eventDispatcher);
|
|
27
|
+
_defineProperty(this, "cleanup", () => {
|
|
28
|
+
if (this.isStickyHeaderEnabled) {
|
|
29
|
+
this.unsubscribe();
|
|
30
|
+
this.nodeVisibilityObserverCleanupFn && this.nodeVisibilityObserverCleanupFn();
|
|
31
|
+
const tree = getTree(this.dom);
|
|
32
|
+
if (tree) {
|
|
33
|
+
this.makeRowHeaderNotSticky(tree.table, true);
|
|
34
|
+
}
|
|
35
|
+
this.emitOff(false);
|
|
36
|
+
}
|
|
37
|
+
if (this.tableContainerObserver) {
|
|
38
|
+
this.tableContainerObserver.disconnect();
|
|
39
|
+
}
|
|
40
|
+
});
|
|
26
41
|
_defineProperty(this, "colControlsOffset", 0);
|
|
27
42
|
_defineProperty(this, "focused", false);
|
|
28
43
|
_defineProperty(this, "topPosEditorElement", 0);
|
|
@@ -63,6 +78,11 @@ export default class TableRow extends TableNodeView {
|
|
|
63
78
|
pluginConfig
|
|
64
79
|
} = getPluginState(view.state);
|
|
65
80
|
this.isStickyHeaderEnabled = !!pluginConfig.stickyHeaders;
|
|
81
|
+
if (api !== null && api !== void 0 && (_api$limitedMode = api.limitedMode) !== null && _api$limitedMode !== void 0 && (_api$limitedMode$shar = _api$limitedMode.sharedState.currentState()) !== null && _api$limitedMode$shar !== void 0 && (_api$limitedMode$shar2 = _api$limitedMode$shar.limitedModePluginKey.getState(view.state)) !== null && _api$limitedMode$shar2 !== void 0 && _api$limitedMode$shar2.documentSizeBreachesThreshold) {
|
|
82
|
+
this.isStickyHeaderEnabled = false;
|
|
83
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
84
|
+
document.addEventListener('limited-mode-activated', this.cleanup);
|
|
85
|
+
}
|
|
66
86
|
const pos = this.getPos();
|
|
67
87
|
this.isInNestedTable = false;
|
|
68
88
|
if (pos) {
|
|
@@ -138,6 +158,9 @@ export default class TableRow extends TableNodeView {
|
|
|
138
158
|
}
|
|
139
159
|
this.emitOff(true);
|
|
140
160
|
}
|
|
161
|
+
|
|
162
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
163
|
+
document.removeEventListener('limited-mode-activated', this.cleanup);
|
|
141
164
|
if (this.tableContainerObserver) {
|
|
142
165
|
this.tableContainerObserver.disconnect();
|
|
143
166
|
}
|
|
@@ -21,6 +21,6 @@ export const tableHeaderView = options => {
|
|
|
21
21
|
};
|
|
22
22
|
export const tableRowView = options => {
|
|
23
23
|
return (node, view, getPos) => {
|
|
24
|
-
return new TableRow(node, view, getPos, options.eventDispatcher);
|
|
24
|
+
return new TableRow(node, view, getPos, options.eventDispatcher, options.pluginInjectionApi);
|
|
25
25
|
};
|
|
26
26
|
};
|
|
@@ -50,7 +50,9 @@ const handleInlineTableWidth = (table, width) => {
|
|
|
50
50
|
};
|
|
51
51
|
export default class TableView extends ReactNodeView {
|
|
52
52
|
constructor(props) {
|
|
53
|
-
super(props.node, props.view, props.getPos, props.portalProviderAPI, props.eventDispatcher, props
|
|
53
|
+
super(props.node, props.view, props.getPos, props.portalProviderAPI, props.eventDispatcher, props, undefined, undefined,
|
|
54
|
+
// @portal-render-immediately
|
|
55
|
+
true);
|
|
54
56
|
_defineProperty(this, "getNode", () => {
|
|
55
57
|
return this.node;
|
|
56
58
|
});
|
|
@@ -169,6 +171,7 @@ export default class TableView extends ReactNodeView {
|
|
|
169
171
|
}
|
|
170
172
|
}
|
|
171
173
|
render(props, forwardRef) {
|
|
174
|
+
var _props$pluginInjectio, _props$pluginInjectio2, _props$pluginInjectio3;
|
|
172
175
|
if (fg('platform_editor_table_use_shared_state_hook_fg')) {
|
|
173
176
|
return /*#__PURE__*/React.createElement(TableComponentWithSharedState, {
|
|
174
177
|
forwardRef: forwardRef,
|
|
@@ -214,11 +217,12 @@ export default class TableView extends ReactNodeView {
|
|
|
214
217
|
tableWidthPluginState: tableWidthPluginKey,
|
|
215
218
|
widthPlugin: fakePluginKey,
|
|
216
219
|
mediaState: fakeMediaPluginKey,
|
|
217
|
-
tableDragAndDropState: tableDragAndDropPluginKey
|
|
220
|
+
tableDragAndDropState: tableDragAndDropPluginKey,
|
|
221
|
+
limitedModePlugin: (_props$pluginInjectio = props.pluginInjectionApi) === null || _props$pluginInjectio === void 0 ? void 0 : (_props$pluginInjectio2 = _props$pluginInjectio.limitedMode) === null || _props$pluginInjectio2 === void 0 ? void 0 : (_props$pluginInjectio3 = _props$pluginInjectio2.sharedState.currentState()) === null || _props$pluginInjectio3 === void 0 ? void 0 : _props$pluginInjectio3.limitedModePluginKey
|
|
218
222
|
},
|
|
219
223
|
editorView: props.view,
|
|
220
224
|
render: pluginStates => {
|
|
221
|
-
var _props$options;
|
|
225
|
+
var _props$options, _pluginStates$limited, _pluginStates$limited2;
|
|
222
226
|
const {
|
|
223
227
|
tableResizingPluginState,
|
|
224
228
|
tableWidthPluginState,
|
|
@@ -287,7 +291,8 @@ export default class TableView extends ReactNodeView {
|
|
|
287
291
|
contentDOM: forwardRef,
|
|
288
292
|
getEditorFeatureFlags: props.getEditorFeatureFlags,
|
|
289
293
|
dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
|
|
290
|
-
pluginInjectionApi: props.pluginInjectionApi
|
|
294
|
+
pluginInjectionApi: props.pluginInjectionApi,
|
|
295
|
+
limitedMode: (_pluginStates$limited = (_pluginStates$limited2 = pluginStates.limitedModePlugin) === null || _pluginStates$limited2 === void 0 ? void 0 : _pluginStates$limited2.documentSizeBreachesThreshold) !== null && _pluginStates$limited !== void 0 ? _pluginStates$limited : false
|
|
291
296
|
});
|
|
292
297
|
}
|
|
293
298
|
});
|
|
@@ -3,7 +3,6 @@ import React, { Component } from 'react';
|
|
|
3
3
|
import classnames from 'classnames';
|
|
4
4
|
import { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import { isRowSelected } from '@atlaskit/editor-tables/utils';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { clearHoverSelection } from '../../../pm-plugins/commands';
|
|
8
7
|
import { getRowHeights } from '../../../pm-plugins/utils/row-controls';
|
|
9
8
|
import { TableCssClassName as ClassName } from '../../../types';
|
|
@@ -79,19 +78,11 @@ export default class NumberColumn extends Component {
|
|
|
79
78
|
tableActive
|
|
80
79
|
} = this.props;
|
|
81
80
|
const isActive = isRowSelected(index)(editorView.state.selection) || (hoveredRows || []).indexOf(index) !== -1 && !isResizing;
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
});
|
|
88
|
-
} else {
|
|
89
|
-
return classnames(ClassName.NUMBERED_COLUMN_BUTTON, {
|
|
90
|
-
[ClassName.NUMBERED_COLUMN_BUTTON_DISABLED]: isButtonDisabled,
|
|
91
|
-
[ClassName.HOVERED_CELL_IN_DANGER]: isActive && isInDanger,
|
|
92
|
-
[ClassName.HOVERED_CELL_ACTIVE]: isActive
|
|
93
|
-
});
|
|
94
|
-
}
|
|
81
|
+
return classnames(ClassName.NUMBERED_COLUMN_BUTTON, {
|
|
82
|
+
[ClassName.NUMBERED_COLUMN_BUTTON_DISABLED]: isButtonDisabled,
|
|
83
|
+
[ClassName.HOVERED_CELL_IN_DANGER]: tableActive && isActive && isInDanger,
|
|
84
|
+
[ClassName.HOVERED_CELL_ACTIVE]: tableActive && isActive
|
|
85
|
+
});
|
|
95
86
|
});
|
|
96
87
|
}
|
|
97
88
|
render() {
|
|
@@ -934,7 +934,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
934
934
|
,
|
|
935
935
|
selection: view.state.selection,
|
|
936
936
|
headerRowHeight: headerRow ? headerRow.offsetHeight : undefined,
|
|
937
|
-
stickyHeader: this.state.stickyHeader,
|
|
937
|
+
stickyHeader: !this.props.limitedMode ? this.state.stickyHeader : undefined,
|
|
938
938
|
tableWrapperWidth: this.state.tableWrapperWidth,
|
|
939
939
|
api: pluginInjectionApi,
|
|
940
940
|
isChromelessEditor: options === null || options === void 0 ? void 0 : options.isChromelessEditor
|
|
@@ -956,7 +956,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
956
956
|
,
|
|
957
957
|
selection: view.state.selection,
|
|
958
958
|
headerRowHeight: headerRow ? headerRow.offsetHeight : undefined,
|
|
959
|
-
stickyHeader: this.state.stickyHeader,
|
|
959
|
+
stickyHeader: !this.props.limitedMode ? this.state.stickyHeader : undefined,
|
|
960
960
|
getEditorFeatureFlags: getEditorFeatureFlags,
|
|
961
961
|
tableContainerWidth: tableContainerWidth,
|
|
962
962
|
isNumberColumnEnabled: node.attrs.isNumberColumnEnabled,
|
|
@@ -989,7 +989,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
989
989
|
var isNested = isTableNested(view.state, tablePos);
|
|
990
990
|
var topShadowPadding = isDragAndDropEnabled ? 0 : shadowPadding;
|
|
991
991
|
var topOffset = 0;
|
|
992
|
-
var topStickyShadowPosition = this.state.stickyHeader && topOffset + this.state.stickyHeader.padding + topShadowPadding + 2;
|
|
992
|
+
var topStickyShadowPosition = !this.props.limitedMode && this.state.stickyHeader && topOffset + this.state.stickyHeader.padding + topShadowPadding + 2;
|
|
993
993
|
var _getEditorFeatureFlag7 = getEditorFeatureFlags(),
|
|
994
994
|
_getEditorFeatureFlag8 = _getEditorFeatureFlag7.tableWithFixedColumnWidthsOption,
|
|
995
995
|
tableWithFixedColumnWidthsOption = _getEditorFeatureFlag8 === void 0 ? false : _getEditorFeatureFlag8;
|
|
@@ -997,7 +997,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
997
997
|
return /*#__PURE__*/React.createElement(TableContainer
|
|
998
998
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
999
999
|
, {
|
|
1000
|
-
className: classnames(ClassName.TABLE_CONTAINER, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ClassName.WITH_CONTROLS, allowControls && tableActive), ClassName.TABLE_STICKY, this.state.stickyHeader && hasHeaderRow), ClassName.HOVERED_DELETE_BUTTON, isInDanger), ClassName.TABLE_SELECTED, isTableSelected(selection !== null && selection !== void 0 ? selection : view.state.selection)), ClassName.NESTED_TABLE_WITH_CONTROLS, tableActive && allowControls && this.isNestedInTable)),
|
|
1000
|
+
className: classnames(ClassName.TABLE_CONTAINER, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ClassName.WITH_CONTROLS, allowControls && tableActive), ClassName.TABLE_STICKY, !this.props.limitedMode && this.state.stickyHeader && hasHeaderRow), ClassName.HOVERED_DELETE_BUTTON, isInDanger), ClassName.TABLE_SELECTED, isTableSelected(selection !== null && selection !== void 0 ? selection : view.state.selection)), ClassName.NESTED_TABLE_WITH_CONTROLS, tableActive && allowControls && this.isNestedInTable)),
|
|
1001
1001
|
editorView: view,
|
|
1002
1002
|
getPos: getPos,
|
|
1003
1003
|
node: node
|