@atlaskit/editor-plugin-table 13.1.0 → 14.0.1
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 +16 -0
- package/dist/cjs/nodeviews/TableContainer.js +13 -2
- 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/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/ui/DragPreview/index.js +1 -1
- package/dist/esm/ui/ui-styles.js +1 -1
- package/dist/types/ui/FloatingAlignmentButtons/FloatingAlignmentButtons.d.ts +1 -1
- package/dist/types-ts4.5/ui/FloatingAlignmentButtons/FloatingAlignmentButtons.d.ts +1 -1
- package/package.json +19 -19
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-table
|
|
2
2
|
|
|
3
|
+
## 14.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`c0656bad0f992`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c0656bad0f992) -
|
|
8
|
+
EDITOR-1389 fix table container width behind platform_editor_table_container_width_fix
|
|
9
|
+
- [`f0662cd7a143e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f0662cd7a143e) -
|
|
10
|
+
Internal changes to how borders are applied.
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 14.0.0
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 13.1.0
|
|
4
20
|
|
|
5
21
|
### Minor 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
|
}
|
|
@@ -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
|
}
|
|
@@ -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
|
}
|
|
@@ -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
|
};
|
|
@@ -9,5 +9,5 @@ type Props = {
|
|
|
9
9
|
areAnyNewToolbarFlagsEnabled: boolean;
|
|
10
10
|
dispatchCommand: (command: Command) => void;
|
|
11
11
|
};
|
|
12
|
-
export declare const FloatingAlignmentButtons: ({ alignmentButtons, dispatchCommand, areAnyNewToolbarFlagsEnabled }: Props) => jsx.JSX.Element;
|
|
12
|
+
export declare const FloatingAlignmentButtons: ({ alignmentButtons, dispatchCommand, areAnyNewToolbarFlagsEnabled, }: Props) => jsx.JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -9,5 +9,5 @@ type Props = {
|
|
|
9
9
|
areAnyNewToolbarFlagsEnabled: boolean;
|
|
10
10
|
dispatchCommand: (command: Command) => void;
|
|
11
11
|
};
|
|
12
|
-
export declare const FloatingAlignmentButtons: ({ alignmentButtons, dispatchCommand, areAnyNewToolbarFlagsEnabled }: Props) => jsx.JSX.Element;
|
|
12
|
+
export declare const FloatingAlignmentButtons: ({ alignmentButtons, dispatchCommand, areAnyNewToolbarFlagsEnabled, }: Props) => jsx.JSX.Element;
|
|
13
13
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "14.0.1",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -28,23 +28,23 @@
|
|
|
28
28
|
"singleton": true
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@atlaskit/adf-schema": "^
|
|
31
|
+
"@atlaskit/adf-schema": "^51.0.0",
|
|
32
32
|
"@atlaskit/button": "^23.4.0",
|
|
33
33
|
"@atlaskit/custom-steps": "^0.11.0",
|
|
34
34
|
"@atlaskit/editor-palette": "^2.1.0",
|
|
35
|
-
"@atlaskit/editor-plugin-accessibility-utils": "^
|
|
36
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
37
|
-
"@atlaskit/editor-plugin-batch-attribute-updates": "^
|
|
38
|
-
"@atlaskit/editor-plugin-content-insertion": "^
|
|
39
|
-
"@atlaskit/editor-plugin-editor-viewmode": "^
|
|
40
|
-
"@atlaskit/editor-plugin-extension": "
|
|
41
|
-
"@atlaskit/editor-plugin-guideline": "^
|
|
42
|
-
"@atlaskit/editor-plugin-interaction": "^
|
|
43
|
-
"@atlaskit/editor-plugin-limited-mode": "^
|
|
44
|
-
"@atlaskit/editor-plugin-selection": "^
|
|
45
|
-
"@atlaskit/editor-plugin-toolbar": "^1.
|
|
46
|
-
"@atlaskit/editor-plugin-user-intent": "^
|
|
47
|
-
"@atlaskit/editor-plugin-width": "^
|
|
35
|
+
"@atlaskit/editor-plugin-accessibility-utils": "^5.0.0",
|
|
36
|
+
"@atlaskit/editor-plugin-analytics": "^5.0.0",
|
|
37
|
+
"@atlaskit/editor-plugin-batch-attribute-updates": "^5.0.0",
|
|
38
|
+
"@atlaskit/editor-plugin-content-insertion": "^5.0.0",
|
|
39
|
+
"@atlaskit/editor-plugin-editor-viewmode": "^7.0.0",
|
|
40
|
+
"@atlaskit/editor-plugin-extension": "8.0.1",
|
|
41
|
+
"@atlaskit/editor-plugin-guideline": "^5.0.0",
|
|
42
|
+
"@atlaskit/editor-plugin-interaction": "^7.0.0",
|
|
43
|
+
"@atlaskit/editor-plugin-limited-mode": "^2.0.0",
|
|
44
|
+
"@atlaskit/editor-plugin-selection": "^5.0.0",
|
|
45
|
+
"@atlaskit/editor-plugin-toolbar": "^2.1.0",
|
|
46
|
+
"@atlaskit/editor-plugin-user-intent": "^3.0.0",
|
|
47
|
+
"@atlaskit/editor-plugin-width": "^6.0.0",
|
|
48
48
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
49
49
|
"@atlaskit/editor-shared-styles": "^3.6.0",
|
|
50
50
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
@@ -57,9 +57,9 @@
|
|
|
57
57
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.0",
|
|
58
58
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0",
|
|
59
59
|
"@atlaskit/primitives": "^14.14.0",
|
|
60
|
-
"@atlaskit/react-ufo": "^4.
|
|
61
|
-
"@atlaskit/theme": "^
|
|
62
|
-
"@atlaskit/tmp-editor-statsig": "^12.
|
|
60
|
+
"@atlaskit/react-ufo": "^4.6.0",
|
|
61
|
+
"@atlaskit/theme": "^21.0.0",
|
|
62
|
+
"@atlaskit/tmp-editor-statsig": "^12.10.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": "^
|
|
75
|
+
"@atlaskit/editor-common": "^109.1.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"
|