@atlaskit/editor-plugin-table 14.0.0 → 14.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/cjs/nodeviews/TableContainer.js +13 -2
- package/dist/cjs/tablePlugin.js +1 -1
- package/dist/cjs/ui/DragPreview/index.js +1 -1
- package/dist/cjs/ui/ui-styles.js +1 -1
- package/dist/es2019/nodeviews/TableContainer.js +13 -2
- package/dist/es2019/tablePlugin.js +1 -1
- package/dist/es2019/ui/DragPreview/index.js +1 -1
- package/dist/es2019/ui/ui-styles.js +1 -1
- package/dist/esm/nodeviews/TableContainer.js +13 -2
- package/dist/esm/tablePlugin.js +1 -1
- package/dist/esm/ui/DragPreview/index.js +1 -1
- package/dist/esm/ui/ui-styles.js +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 14.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`33f34d6fd24f3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/33f34d6fd24f3) -
|
|
8
|
+
NO-ISSUE Prevent tableLocalId plugin running if platform_editor_adf_with_localid is true
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 14.0.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`c0656bad0f992`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c0656bad0f992) -
|
|
16
|
+
EDITOR-1389 fix table container width behind platform_editor_table_container_width_fix
|
|
17
|
+
- [`f0662cd7a143e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f0662cd7a143e) -
|
|
18
|
+
Internal changes to how borders are applied.
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 14.0.0
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -247,7 +247,12 @@ var ResizableTableContainerLegacy = /*#__PURE__*/_react.default.memo(function (_
|
|
|
247
247
|
// padding left = padding right = akEditorGutterPadding = 32
|
|
248
248
|
responsiveContainerWidth = isTableScalingEnabled ? containerWidth - padding * 2 : containerWidth - padding * 2 - resizeHandleSpacing;
|
|
249
249
|
}
|
|
250
|
-
|
|
250
|
+
// Fix for HOT-119925: Ensure table width is properly constrained and responsive
|
|
251
|
+
// For wide tables, ensure they don't exceed container width and can be scrolled
|
|
252
|
+
var calculatedWidth = !node.attrs.width && isCommentEditor ? responsiveContainerWidth : Math.min(tableWidth, responsiveContainerWidth);
|
|
253
|
+
|
|
254
|
+
// Ensure minimum width for usability while respecting container constraints
|
|
255
|
+
var width = (0, _expValEquals.expValEquals)('platform_editor_table_container_width_fix', 'isEnabled', true) ? Math.max(calculatedWidth, Math.min(responsiveContainerWidth * 0.5, 300)) : calculatedWidth;
|
|
251
256
|
if (!isResizing) {
|
|
252
257
|
tableWidthRef.current = width;
|
|
253
258
|
}
|
|
@@ -448,7 +453,13 @@ var ResizableTableContainerNext = /*#__PURE__*/_react.default.memo(function (_re
|
|
|
448
453
|
// padding left = padding right = akEditorGutterPadding = 32
|
|
449
454
|
responsiveContainerWidth = isTableScalingEnabled ? containerWidth - padding * 2 : containerWidth - padding * 2 - resizeHandleSpacing;
|
|
450
455
|
}
|
|
451
|
-
|
|
456
|
+
|
|
457
|
+
// Fix for HOT-119925: Ensure table width is properly constrained and responsive
|
|
458
|
+
// For wide tables, ensure they don't exceed container width and can be scrolled
|
|
459
|
+
var calculatedWidth = !node.attrs.width && isCommentEditor ? responsiveContainerWidth : Math.min(tableWidth, responsiveContainerWidth);
|
|
460
|
+
|
|
461
|
+
// Ensure minimum width for usability while respecting container constraints
|
|
462
|
+
var width = (0, _expValEquals.expValEquals)('platform_editor_table_container_width_fix', 'isEnabled', true) ? Math.max(calculatedWidth, Math.min(responsiveContainerWidth * 0.5, 300)) : calculatedWidth;
|
|
452
463
|
if (!isResizing) {
|
|
453
464
|
tableWidthRef.current = width;
|
|
454
465
|
}
|
package/dist/cjs/tablePlugin.js
CHANGED
|
@@ -374,7 +374,7 @@ var tablePlugin = function tablePlugin(_ref) {
|
|
|
374
374
|
name: 'tableLocalId',
|
|
375
375
|
plugin: function plugin(_ref12) {
|
|
376
376
|
var dispatch = _ref12.dispatch;
|
|
377
|
-
return (0, _tableLocalId.createPlugin)(dispatch);
|
|
377
|
+
return !(0, _platformFeatureFlags.fg)('platform_editor_adf_with_localid') ? (0, _tableLocalId.createPlugin)(dispatch) : undefined;
|
|
378
378
|
}
|
|
379
379
|
}, {
|
|
380
380
|
name: 'tableWidth',
|
|
@@ -14,7 +14,7 @@ var boxStyles = (0, _primitives.xcss)({
|
|
|
14
14
|
borderColor: 'color.border.focused',
|
|
15
15
|
borderStyle: 'solid',
|
|
16
16
|
borderRadius: 'radius.small',
|
|
17
|
-
borderWidth: 'border.width.
|
|
17
|
+
borderWidth: 'border.width.focused',
|
|
18
18
|
backgroundColor: 'color.blanket.selected'
|
|
19
19
|
});
|
|
20
20
|
var DragPreview = exports.DragPreview = function DragPreview(_ref) {
|
package/dist/cjs/ui/ui-styles.js
CHANGED
|
@@ -27,7 +27,7 @@ var Marker = function Marker() {
|
|
|
27
27
|
height: "".concat(_consts.lineMarkerSize, "px"),
|
|
28
28
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
29
29
|
width: "".concat(_consts.lineMarkerSize, "px"),
|
|
30
|
-
borderRadius:
|
|
30
|
+
borderRadius: "var(--ds-radius-full, 9999px)",
|
|
31
31
|
pointerEvents: 'none'
|
|
32
32
|
});
|
|
33
33
|
};
|
|
@@ -240,7 +240,12 @@ const ResizableTableContainerLegacy = /*#__PURE__*/React.memo(({
|
|
|
240
240
|
// padding left = padding right = akEditorGutterPadding = 32
|
|
241
241
|
responsiveContainerWidth = isTableScalingEnabled ? containerWidth - padding * 2 : containerWidth - padding * 2 - resizeHandleSpacing;
|
|
242
242
|
}
|
|
243
|
-
|
|
243
|
+
// Fix for HOT-119925: Ensure table width is properly constrained and responsive
|
|
244
|
+
// For wide tables, ensure they don't exceed container width and can be scrolled
|
|
245
|
+
const calculatedWidth = !node.attrs.width && isCommentEditor ? responsiveContainerWidth : Math.min(tableWidth, responsiveContainerWidth);
|
|
246
|
+
|
|
247
|
+
// Ensure minimum width for usability while respecting container constraints
|
|
248
|
+
const width = expValEquals('platform_editor_table_container_width_fix', 'isEnabled', true) ? Math.max(calculatedWidth, Math.min(responsiveContainerWidth * 0.5, 300)) : calculatedWidth;
|
|
244
249
|
if (!isResizing) {
|
|
245
250
|
tableWidthRef.current = width;
|
|
246
251
|
}
|
|
@@ -437,7 +442,13 @@ const ResizableTableContainerNext = /*#__PURE__*/React.memo(({
|
|
|
437
442
|
// padding left = padding right = akEditorGutterPadding = 32
|
|
438
443
|
responsiveContainerWidth = isTableScalingEnabled ? containerWidth - padding * 2 : containerWidth - padding * 2 - resizeHandleSpacing;
|
|
439
444
|
}
|
|
440
|
-
|
|
445
|
+
|
|
446
|
+
// Fix for HOT-119925: Ensure table width is properly constrained and responsive
|
|
447
|
+
// For wide tables, ensure they don't exceed container width and can be scrolled
|
|
448
|
+
const calculatedWidth = !node.attrs.width && isCommentEditor ? responsiveContainerWidth : Math.min(tableWidth, responsiveContainerWidth);
|
|
449
|
+
|
|
450
|
+
// Ensure minimum width for usability while respecting container constraints
|
|
451
|
+
const width = expValEquals('platform_editor_table_container_width_fix', 'isEnabled', true) ? Math.max(calculatedWidth, Math.min(responsiveContainerWidth * 0.5, 300)) : calculatedWidth;
|
|
441
452
|
if (!isResizing) {
|
|
442
453
|
tableWidthRef.current = width;
|
|
443
454
|
}
|
|
@@ -361,7 +361,7 @@ const tablePlugin = ({
|
|
|
361
361
|
name: 'tableLocalId',
|
|
362
362
|
plugin: ({
|
|
363
363
|
dispatch
|
|
364
|
-
}) => createTableLocalIdPlugin(dispatch)
|
|
364
|
+
}) => !fg('platform_editor_adf_with_localid') ? createTableLocalIdPlugin(dispatch) : undefined
|
|
365
365
|
}, {
|
|
366
366
|
name: 'tableWidth',
|
|
367
367
|
plugin: ({
|
|
@@ -7,7 +7,7 @@ const boxStyles = xcss({
|
|
|
7
7
|
borderColor: 'color.border.focused',
|
|
8
8
|
borderStyle: 'solid',
|
|
9
9
|
borderRadius: 'radius.small',
|
|
10
|
-
borderWidth: 'border.width.
|
|
10
|
+
borderWidth: 'border.width.focused',
|
|
11
11
|
backgroundColor: 'color.blanket.selected'
|
|
12
12
|
});
|
|
13
13
|
export const DragPreview = ({
|
|
@@ -23,7 +23,7 @@ const Marker = () => css({
|
|
|
23
23
|
height: `${lineMarkerSize}px`,
|
|
24
24
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
25
25
|
width: `${lineMarkerSize}px`,
|
|
26
|
-
borderRadius:
|
|
26
|
+
borderRadius: "var(--ds-radius-full, 9999px)",
|
|
27
27
|
pointerEvents: 'none'
|
|
28
28
|
});
|
|
29
29
|
export const InsertMarker = cssString => css`
|
|
@@ -238,7 +238,12 @@ var ResizableTableContainerLegacy = /*#__PURE__*/React.memo(function (_ref4) {
|
|
|
238
238
|
// padding left = padding right = akEditorGutterPadding = 32
|
|
239
239
|
responsiveContainerWidth = isTableScalingEnabled ? containerWidth - padding * 2 : containerWidth - padding * 2 - resizeHandleSpacing;
|
|
240
240
|
}
|
|
241
|
-
|
|
241
|
+
// Fix for HOT-119925: Ensure table width is properly constrained and responsive
|
|
242
|
+
// For wide tables, ensure they don't exceed container width and can be scrolled
|
|
243
|
+
var calculatedWidth = !node.attrs.width && isCommentEditor ? responsiveContainerWidth : Math.min(tableWidth, responsiveContainerWidth);
|
|
244
|
+
|
|
245
|
+
// Ensure minimum width for usability while respecting container constraints
|
|
246
|
+
var width = expValEquals('platform_editor_table_container_width_fix', 'isEnabled', true) ? Math.max(calculatedWidth, Math.min(responsiveContainerWidth * 0.5, 300)) : calculatedWidth;
|
|
242
247
|
if (!isResizing) {
|
|
243
248
|
tableWidthRef.current = width;
|
|
244
249
|
}
|
|
@@ -439,7 +444,13 @@ var ResizableTableContainerNext = /*#__PURE__*/React.memo(function (_ref5) {
|
|
|
439
444
|
// padding left = padding right = akEditorGutterPadding = 32
|
|
440
445
|
responsiveContainerWidth = isTableScalingEnabled ? containerWidth - padding * 2 : containerWidth - padding * 2 - resizeHandleSpacing;
|
|
441
446
|
}
|
|
442
|
-
|
|
447
|
+
|
|
448
|
+
// Fix for HOT-119925: Ensure table width is properly constrained and responsive
|
|
449
|
+
// For wide tables, ensure they don't exceed container width and can be scrolled
|
|
450
|
+
var calculatedWidth = !node.attrs.width && isCommentEditor ? responsiveContainerWidth : Math.min(tableWidth, responsiveContainerWidth);
|
|
451
|
+
|
|
452
|
+
// Ensure minimum width for usability while respecting container constraints
|
|
453
|
+
var width = expValEquals('platform_editor_table_container_width_fix', 'isEnabled', true) ? Math.max(calculatedWidth, Math.min(responsiveContainerWidth * 0.5, 300)) : calculatedWidth;
|
|
443
454
|
if (!isResizing) {
|
|
444
455
|
tableWidthRef.current = width;
|
|
445
456
|
}
|
package/dist/esm/tablePlugin.js
CHANGED
|
@@ -365,7 +365,7 @@ var tablePlugin = function tablePlugin(_ref) {
|
|
|
365
365
|
name: 'tableLocalId',
|
|
366
366
|
plugin: function plugin(_ref12) {
|
|
367
367
|
var dispatch = _ref12.dispatch;
|
|
368
|
-
return createTableLocalIdPlugin(dispatch);
|
|
368
|
+
return !fg('platform_editor_adf_with_localid') ? createTableLocalIdPlugin(dispatch) : undefined;
|
|
369
369
|
}
|
|
370
370
|
}, {
|
|
371
371
|
name: 'tableWidth',
|
|
@@ -7,7 +7,7 @@ var boxStyles = xcss({
|
|
|
7
7
|
borderColor: 'color.border.focused',
|
|
8
8
|
borderStyle: 'solid',
|
|
9
9
|
borderRadius: 'radius.small',
|
|
10
|
-
borderWidth: 'border.width.
|
|
10
|
+
borderWidth: 'border.width.focused',
|
|
11
11
|
backgroundColor: 'color.blanket.selected'
|
|
12
12
|
});
|
|
13
13
|
export var DragPreview = function DragPreview(_ref) {
|
package/dist/esm/ui/ui-styles.js
CHANGED
|
@@ -20,7 +20,7 @@ var Marker = function Marker() {
|
|
|
20
20
|
height: "".concat(lineMarkerSize, "px"),
|
|
21
21
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
22
22
|
width: "".concat(lineMarkerSize, "px"),
|
|
23
|
-
borderRadius:
|
|
23
|
+
borderRadius: "var(--ds-radius-full, 9999px)",
|
|
24
24
|
pointerEvents: 'none'
|
|
25
25
|
});
|
|
26
26
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.2",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
"@atlaskit/editor-plugin-batch-attribute-updates": "^5.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-content-insertion": "^5.0.0",
|
|
39
39
|
"@atlaskit/editor-plugin-editor-viewmode": "^7.0.0",
|
|
40
|
-
"@atlaskit/editor-plugin-extension": "8.0.
|
|
40
|
+
"@atlaskit/editor-plugin-extension": "8.0.1",
|
|
41
41
|
"@atlaskit/editor-plugin-guideline": "^5.0.0",
|
|
42
42
|
"@atlaskit/editor-plugin-interaction": "^7.0.0",
|
|
43
43
|
"@atlaskit/editor-plugin-limited-mode": "^2.0.0",
|
|
44
44
|
"@atlaskit/editor-plugin-selection": "^5.0.0",
|
|
45
|
-
"@atlaskit/editor-plugin-toolbar": "^2.
|
|
45
|
+
"@atlaskit/editor-plugin-toolbar": "^2.1.0",
|
|
46
46
|
"@atlaskit/editor-plugin-user-intent": "^3.0.0",
|
|
47
47
|
"@atlaskit/editor-plugin-width": "^6.0.0",
|
|
48
48
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0",
|
|
59
59
|
"@atlaskit/primitives": "^14.14.0",
|
|
60
60
|
"@atlaskit/react-ufo": "^4.6.0",
|
|
61
|
-
"@atlaskit/theme": "^
|
|
62
|
-
"@atlaskit/tmp-editor-statsig": "^12.
|
|
61
|
+
"@atlaskit/theme": "^21.0.0",
|
|
62
|
+
"@atlaskit/tmp-editor-statsig": "^12.14.0",
|
|
63
63
|
"@atlaskit/toggle": "^15.1.0",
|
|
64
64
|
"@atlaskit/tokens": "^6.3.0",
|
|
65
65
|
"@atlaskit/tooltip": "^20.4.0",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"uuid": "^3.1.0"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"@atlaskit/editor-common": "^109.
|
|
75
|
+
"@atlaskit/editor-common": "^109.2.0",
|
|
76
76
|
"react": "^18.2.0",
|
|
77
77
|
"react-dom": "^18.2.0",
|
|
78
78
|
"react-intl-next": "npm:react-intl@^5.18.1"
|