@atlaskit/editor-plugin-table 12.2.1 → 12.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 12.2.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`32ac245da116d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/32ac245da116d) -
8
+ exclude sticky header from TTVC calculation
9
+ - Updated dependencies
10
+
11
+ ## 12.2.2
12
+
13
+ ### Patch Changes
14
+
15
+ - [`20d3223b57972`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/20d3223b57972) -
16
+ Opted out of debounced portal provider
17
+ - Updated dependencies
18
+
3
19
  ## 12.2.1
4
20
 
5
21
  ### Patch Changes
@@ -1134,6 +1134,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
1134
1134
  }, allowControls && colControls), (0, _platformFeatureFlags.fg)('disable-sticky-scrollbar-for-nested-tables') ? !this.isNestedInTable ? /*#__PURE__*/_react.default.createElement("div", {
1135
1135
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
1136
1136
  className: _types.TableCssClassName.TABLE_STICKY_SCROLLBAR_CONTAINER,
1137
+ "data-vc-nvs": "true",
1137
1138
  style: {
1138
1139
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
1139
1140
  height: "var(--ds-space-250, 20px)",
@@ -1148,13 +1149,15 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
1148
1149
  width: tableRef === null || tableRef === void 0 ? void 0 : tableRef.clientWidth,
1149
1150
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
1150
1151
  height: '100%'
1151
- }
1152
+ },
1153
+ "data-vc-nvs": "true"
1152
1154
  })) : /*#__PURE__*/_react.default.createElement("div", {
1153
1155
  style: {
1154
1156
  width: tableRef === null || tableRef === void 0 ? void 0 : tableRef.clientWidth,
1155
1157
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
1156
1158
  height: '100%'
1157
- }
1159
+ },
1160
+ "data-vc-nvs": "true"
1158
1161
  }) : /*#__PURE__*/_react.default.createElement("div", {
1159
1162
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
1160
1163
  className: _types.TableCssClassName.TABLE_STICKY_SCROLLBAR_CONTAINER,
@@ -1166,13 +1169,15 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
1166
1169
  display: 'none',
1167
1170
  // prevent unwanted scroll during table resize without removing scrollbar container from the dom
1168
1171
  width: isResizing ? "var(--ds-space-0, 0px)" : '100%'
1169
- }
1172
+ },
1173
+ "data-vc-nvs": "true"
1170
1174
  }, /*#__PURE__*/_react.default.createElement("div", {
1171
1175
  style: {
1172
1176
  width: tableRef === null || tableRef === void 0 ? void 0 : tableRef.clientWidth,
1173
1177
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
1174
1178
  height: '100%'
1175
- }
1179
+ },
1180
+ "data-vc-nvs": "true"
1176
1181
  })), /*#__PURE__*/_react.default.createElement("div", {
1177
1182
  contentEditable: false
1178
1183
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
@@ -540,6 +540,7 @@ var TableResizer = exports.TableResizer = function TableResizer(_ref) {
540
540
  description: formatMessage(_messages.tableMessages.resizeTable),
541
541
  keymap: _keymaps.focusTableResizer
542
542
  });
543
- }
543
+ },
544
+ "data-vc-nvs": "true"
544
545
  }, children));
545
546
  };
@@ -104,6 +104,7 @@ var TableRow = exports.default = /*#__PURE__*/function (_TableNodeView) {
104
104
  _this.isInNestedTable = (0, _nesting.getParentOfTypeCount)(view.state.schema.nodes.table)(view.state.doc.resolve(pos)) > 1;
105
105
  }
106
106
  if (_this.isHeaderRow) {
107
+ _this.dom.setAttribute('data-vc-nvs', 'true');
107
108
  var _nodeVisibilityManage = (0, _nodeVisibility.nodeVisibilityManager)(view.dom),
108
109
  observe = _nodeVisibilityManage.observe;
109
110
  _this.nodeVisibilityObserverCleanupFn = observe({
@@ -139,7 +139,9 @@ var createPlugin = exports.createPlugin = function createPlugin(api, nodeViewPor
139
139
  onKeyDown: function onKeyDown() {},
140
140
  api: api
141
141
  }));
142
- }, element, decorationRenderKey);
142
+ }, element, decorationRenderKey, undefined,
143
+ // @portal-render-immediately
144
+ true);
143
145
  return element;
144
146
  }, {
145
147
  destroy: function destroy(node) {
@@ -1110,6 +1110,7 @@ class TableComponent extends React.Component {
1110
1110
  }, allowControls && colControls), fg('disable-sticky-scrollbar-for-nested-tables') ? !this.isNestedInTable ? /*#__PURE__*/React.createElement("div", {
1111
1111
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
1112
1112
  className: ClassName.TABLE_STICKY_SCROLLBAR_CONTAINER,
1113
+ "data-vc-nvs": "true",
1113
1114
  style: {
1114
1115
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
1115
1116
  height: "var(--ds-space-250, 20px)",
@@ -1124,13 +1125,15 @@ class TableComponent extends React.Component {
1124
1125
  width: tableRef === null || tableRef === void 0 ? void 0 : tableRef.clientWidth,
1125
1126
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
1126
1127
  height: '100%'
1127
- }
1128
+ },
1129
+ "data-vc-nvs": "true"
1128
1130
  })) : /*#__PURE__*/React.createElement("div", {
1129
1131
  style: {
1130
1132
  width: tableRef === null || tableRef === void 0 ? void 0 : tableRef.clientWidth,
1131
1133
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
1132
1134
  height: '100%'
1133
- }
1135
+ },
1136
+ "data-vc-nvs": "true"
1134
1137
  }) : /*#__PURE__*/React.createElement("div", {
1135
1138
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
1136
1139
  className: ClassName.TABLE_STICKY_SCROLLBAR_CONTAINER,
@@ -1142,13 +1145,15 @@ class TableComponent extends React.Component {
1142
1145
  display: 'none',
1143
1146
  // prevent unwanted scroll during table resize without removing scrollbar container from the dom
1144
1147
  width: isResizing ? "var(--ds-space-0, 0px)" : '100%'
1145
- }
1148
+ },
1149
+ "data-vc-nvs": "true"
1146
1150
  }, /*#__PURE__*/React.createElement("div", {
1147
1151
  style: {
1148
1152
  width: tableRef === null || tableRef === void 0 ? void 0 : tableRef.clientWidth,
1149
1153
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
1150
1154
  height: '100%'
1151
- }
1155
+ },
1156
+ "data-vc-nvs": "true"
1152
1157
  })), /*#__PURE__*/React.createElement("div", {
1153
1158
  contentEditable: false
1154
1159
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
@@ -539,6 +539,7 @@ export const TableResizer = ({
539
539
  description: formatMessage(messages.resizeTable),
540
540
  keymap: focusTableResizer
541
541
  });
542
- }
542
+ },
543
+ "data-vc-nvs": "true"
543
544
  }, children));
544
545
  };
@@ -89,6 +89,7 @@ export default class TableRow extends TableNodeView {
89
89
  this.isInNestedTable = getParentOfTypeCount(view.state.schema.nodes.table)(view.state.doc.resolve(pos)) > 1;
90
90
  }
91
91
  if (this.isHeaderRow) {
92
+ this.dom.setAttribute('data-vc-nvs', 'true');
92
93
  const {
93
94
  observe
94
95
  } = nodeVisibilityManager(view.dom);
@@ -111,7 +111,9 @@ export const createPlugin = (api, nodeViewPortalProviderAPI) => {
111
111
  onClick: () => {},
112
112
  onKeyDown: () => {},
113
113
  api
114
- })), element, decorationRenderKey);
114
+ })), element, decorationRenderKey, undefined,
115
+ // @portal-render-immediately
116
+ true);
115
117
  return element;
116
118
  }, {
117
119
  destroy: node => {
@@ -1128,6 +1128,7 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
1128
1128
  }, allowControls && colControls), fg('disable-sticky-scrollbar-for-nested-tables') ? !this.isNestedInTable ? /*#__PURE__*/React.createElement("div", {
1129
1129
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
1130
1130
  className: ClassName.TABLE_STICKY_SCROLLBAR_CONTAINER,
1131
+ "data-vc-nvs": "true",
1131
1132
  style: {
1132
1133
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
1133
1134
  height: "var(--ds-space-250, 20px)",
@@ -1142,13 +1143,15 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
1142
1143
  width: tableRef === null || tableRef === void 0 ? void 0 : tableRef.clientWidth,
1143
1144
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
1144
1145
  height: '100%'
1145
- }
1146
+ },
1147
+ "data-vc-nvs": "true"
1146
1148
  })) : /*#__PURE__*/React.createElement("div", {
1147
1149
  style: {
1148
1150
  width: tableRef === null || tableRef === void 0 ? void 0 : tableRef.clientWidth,
1149
1151
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
1150
1152
  height: '100%'
1151
- }
1153
+ },
1154
+ "data-vc-nvs": "true"
1152
1155
  }) : /*#__PURE__*/React.createElement("div", {
1153
1156
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
1154
1157
  className: ClassName.TABLE_STICKY_SCROLLBAR_CONTAINER,
@@ -1160,13 +1163,15 @@ var TableComponent = /*#__PURE__*/function (_React$Component) {
1160
1163
  display: 'none',
1161
1164
  // prevent unwanted scroll during table resize without removing scrollbar container from the dom
1162
1165
  width: isResizing ? "var(--ds-space-0, 0px)" : '100%'
1163
- }
1166
+ },
1167
+ "data-vc-nvs": "true"
1164
1168
  }, /*#__PURE__*/React.createElement("div", {
1165
1169
  style: {
1166
1170
  width: tableRef === null || tableRef === void 0 ? void 0 : tableRef.clientWidth,
1167
1171
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
1168
1172
  height: '100%'
1169
- }
1173
+ },
1174
+ "data-vc-nvs": "true"
1170
1175
  })), /*#__PURE__*/React.createElement("div", {
1171
1176
  contentEditable: false
1172
1177
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
@@ -531,6 +531,7 @@ export var TableResizer = function TableResizer(_ref) {
531
531
  description: formatMessage(messages.resizeTable),
532
532
  keymap: focusTableResizer
533
533
  });
534
- }
534
+ },
535
+ "data-vc-nvs": "true"
535
536
  }, children));
536
537
  };
@@ -97,6 +97,7 @@ var TableRow = /*#__PURE__*/function (_TableNodeView) {
97
97
  _this.isInNestedTable = getParentOfTypeCount(view.state.schema.nodes.table)(view.state.doc.resolve(pos)) > 1;
98
98
  }
99
99
  if (_this.isHeaderRow) {
100
+ _this.dom.setAttribute('data-vc-nvs', 'true');
100
101
  var _nodeVisibilityManage = nodeVisibilityManager(view.dom),
101
102
  observe = _nodeVisibilityManage.observe;
102
103
  _this.nodeVisibilityObserverCleanupFn = observe({
@@ -134,7 +134,9 @@ export var createPlugin = function createPlugin(api, nodeViewPortalProviderAPI)
134
134
  onKeyDown: function onKeyDown() {},
135
135
  api: api
136
136
  }));
137
- }, element, decorationRenderKey);
137
+ }, element, decorationRenderKey, undefined,
138
+ // @portal-render-immediately
139
+ true);
138
140
  return element;
139
141
  }, {
140
142
  destroy: function destroy(node) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "12.2.1",
3
+ "version": "12.2.3",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -37,10 +37,10 @@
37
37
  "@atlaskit/editor-plugin-batch-attribute-updates": "^3.0.0",
38
38
  "@atlaskit/editor-plugin-content-insertion": "^3.1.0",
39
39
  "@atlaskit/editor-plugin-editor-viewmode": "^5.0.0",
40
- "@atlaskit/editor-plugin-extension": "6.1.8",
40
+ "@atlaskit/editor-plugin-extension": "6.1.9",
41
41
  "@atlaskit/editor-plugin-guideline": "^3.0.0",
42
42
  "@atlaskit/editor-plugin-interaction": "^5.0.0",
43
- "@atlaskit/editor-plugin-limited-mode": "^0.0.2",
43
+ "@atlaskit/editor-plugin-limited-mode": "^0.0.3",
44
44
  "@atlaskit/editor-plugin-selection": "^3.0.0",
45
45
  "@atlaskit/editor-plugin-user-intent": "^1.1.0",
46
46
  "@atlaskit/editor-plugin-width": "^4.0.0",
@@ -55,9 +55,9 @@
55
55
  "@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.0",
56
56
  "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0",
57
57
  "@atlaskit/primitives": "^14.11.0",
58
- "@atlaskit/react-ufo": "^4.3.0",
58
+ "@atlaskit/react-ufo": "^4.4.0",
59
59
  "@atlaskit/theme": "^19.0.0",
60
- "@atlaskit/tmp-editor-statsig": "^11.0.0",
60
+ "@atlaskit/tmp-editor-statsig": "^11.3.0",
61
61
  "@atlaskit/toggle": "^15.1.0",
62
62
  "@atlaskit/tokens": "^6.0.0",
63
63
  "@atlaskit/tooltip": "^20.4.0",
@@ -70,7 +70,7 @@
70
70
  "uuid": "^3.1.0"
71
71
  },
72
72
  "peerDependencies": {
73
- "@atlaskit/editor-common": "^107.25.0",
73
+ "@atlaskit/editor-common": "^107.26.0",
74
74
  "react": "^18.2.0",
75
75
  "react-dom": "^18.2.0",
76
76
  "react-intl-next": "npm:react-intl@^5.18.1"
@@ -1126,6 +1126,7 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
1126
1126
  <div
1127
1127
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
1128
1128
  className={ClassName.TABLE_STICKY_SCROLLBAR_CONTAINER}
1129
+ data-vc-nvs="true"
1129
1130
  style={{
1130
1131
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
1131
1132
  height: token('space.250', '20px'), // MAX_BROWSER_SCROLLBAR_HEIGHT
@@ -1141,6 +1142,7 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
1141
1142
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
1142
1143
  height: '100%',
1143
1144
  }}
1145
+ data-vc-nvs="true"
1144
1146
  ></div>
1145
1147
  </div>
1146
1148
  ) : (
@@ -1150,6 +1152,7 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
1150
1152
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
1151
1153
  height: '100%',
1152
1154
  }}
1155
+ data-vc-nvs="true"
1153
1156
  ></div>
1154
1157
  )
1155
1158
  ) : (
@@ -1164,6 +1167,7 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
1164
1167
  // prevent unwanted scroll during table resize without removing scrollbar container from the dom
1165
1168
  width: isResizing ? token('space.0', '0px') : '100%',
1166
1169
  }}
1170
+ data-vc-nvs="true"
1167
1171
  >
1168
1172
  <div
1169
1173
  style={{
@@ -1171,6 +1175,7 @@ class TableComponent extends React.Component<ComponentProps, TableState> {
1171
1175
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
1172
1176
  height: '100%',
1173
1177
  }}
1178
+ data-vc-nvs="true"
1174
1179
  ></div>
1175
1180
  </div>
1176
1181
  )}
@@ -875,6 +875,7 @@ export const TableResizer = ({
875
875
  />
876
876
  );
877
877
  }}
878
+ data-vc-nvs="true"
878
879
  >
879
880
  {children}
880
881
  </ResizerNext>
@@ -102,6 +102,7 @@ export default class TableRow extends TableNodeView<HTMLTableRowElement> impleme
102
102
  }
103
103
 
104
104
  if (this.isHeaderRow) {
105
+ this.dom.setAttribute('data-vc-nvs', 'true');
105
106
  const { observe } = nodeVisibilityManager(view.dom);
106
107
  this.nodeVisibilityObserverCleanupFn = observe({
107
108
  element: this.contentDOM,
@@ -108,7 +108,6 @@ export const syncStickyRowToTable = (tableRef?: HTMLElement | null) => {
108
108
  if (!headerRow) {
109
109
  return;
110
110
  }
111
-
112
111
  applyColWidthsToStickyRow(tableRef.querySelector('colgroup'), headerRow);
113
112
  applyTableWidthToStickyRow(tableRef, headerRow);
114
113
  };
@@ -143,6 +143,9 @@ export const createPlugin = (
143
143
  ),
144
144
  element,
145
145
  decorationRenderKey,
146
+ undefined,
147
+ // @portal-render-immediately
148
+ true,
146
149
  );
147
150
 
148
151
  return element;