@atlaskit/editor-tables 2.5.6 → 2.5.7
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,11 @@
|
|
|
1
1
|
# @atlaskit/editor-tables
|
|
2
2
|
|
|
3
|
+
## 2.5.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#77796](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/77796) [`eab996d08513`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/eab996d08513) - Add new statsig experiement for preserve table width, add support for passing through width to create table. Allow tables to be inserted at full width
|
|
8
|
+
|
|
3
9
|
## 2.5.6
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -25,7 +25,8 @@ var createTable = exports.createTable = function createTable(_ref) {
|
|
|
25
25
|
colsCount = _ref$colsCount === void 0 ? 3 : _ref$colsCount,
|
|
26
26
|
_ref$withHeaderRow = _ref.withHeaderRow,
|
|
27
27
|
withHeaderRow = _ref$withHeaderRow === void 0 ? true : _ref$withHeaderRow,
|
|
28
|
-
cellContent = _ref.cellContent
|
|
28
|
+
cellContent = _ref.cellContent,
|
|
29
|
+
tableWidth = _ref.tableWidth;
|
|
29
30
|
var _tableNodeTypes = (0, _tableNodeTypes2.tableNodeTypes)(schema),
|
|
30
31
|
tableCell = _tableNodeTypes.cell,
|
|
31
32
|
tableHeader = _tableNodeTypes.header_cell,
|
|
@@ -52,7 +53,7 @@ var createTable = exports.createTable = function createTable(_ref) {
|
|
|
52
53
|
if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.custom-table-width')) {
|
|
53
54
|
return table.createChecked({
|
|
54
55
|
localId: _uuid.uuid.generate(),
|
|
55
|
-
width: 760
|
|
56
|
+
width: tableWidth !== null && tableWidth !== void 0 ? tableWidth : 760
|
|
56
57
|
}, rows);
|
|
57
58
|
}
|
|
58
59
|
return table.createChecked({
|
|
@@ -16,7 +16,8 @@ export const createTable = ({
|
|
|
16
16
|
rowsCount = 3,
|
|
17
17
|
colsCount = 3,
|
|
18
18
|
withHeaderRow = true,
|
|
19
|
-
cellContent
|
|
19
|
+
cellContent,
|
|
20
|
+
tableWidth
|
|
20
21
|
}) => {
|
|
21
22
|
const {
|
|
22
23
|
cell: tableCell,
|
|
@@ -45,7 +46,7 @@ export const createTable = ({
|
|
|
45
46
|
if (getBooleanFF('platform.editor.custom-table-width')) {
|
|
46
47
|
return table.createChecked({
|
|
47
48
|
localId: uuid.generate(),
|
|
48
|
-
width: 760
|
|
49
|
+
width: tableWidth !== null && tableWidth !== void 0 ? tableWidth : 760
|
|
49
50
|
}, rows);
|
|
50
51
|
}
|
|
51
52
|
return table.createChecked({
|
|
@@ -19,7 +19,8 @@ export var createTable = function createTable(_ref) {
|
|
|
19
19
|
colsCount = _ref$colsCount === void 0 ? 3 : _ref$colsCount,
|
|
20
20
|
_ref$withHeaderRow = _ref.withHeaderRow,
|
|
21
21
|
withHeaderRow = _ref$withHeaderRow === void 0 ? true : _ref$withHeaderRow,
|
|
22
|
-
cellContent = _ref.cellContent
|
|
22
|
+
cellContent = _ref.cellContent,
|
|
23
|
+
tableWidth = _ref.tableWidth;
|
|
23
24
|
var _tableNodeTypes = tableNodeTypes(schema),
|
|
24
25
|
tableCell = _tableNodeTypes.cell,
|
|
25
26
|
tableHeader = _tableNodeTypes.header_cell,
|
|
@@ -46,7 +47,7 @@ export var createTable = function createTable(_ref) {
|
|
|
46
47
|
if (getBooleanFF('platform.editor.custom-table-width')) {
|
|
47
48
|
return table.createChecked({
|
|
48
49
|
localId: uuid.generate(),
|
|
49
|
-
width: 760
|
|
50
|
+
width: tableWidth !== null && tableWidth !== void 0 ? tableWidth : 760
|
|
50
51
|
}, rows);
|
|
51
52
|
}
|
|
52
53
|
return table.createChecked({
|
|
@@ -5,6 +5,7 @@ type CreateTableProps = {
|
|
|
5
5
|
colsCount?: number;
|
|
6
6
|
withHeaderRow?: boolean;
|
|
7
7
|
cellContent?: PMNode;
|
|
8
|
+
tableWidth?: number;
|
|
8
9
|
};
|
|
9
|
-
export declare const createTable: ({ schema, rowsCount, colsCount, withHeaderRow, cellContent, }: CreateTableProps) => PMNode;
|
|
10
|
+
export declare const createTable: ({ schema, rowsCount, colsCount, withHeaderRow, cellContent, tableWidth, }: CreateTableProps) => PMNode;
|
|
10
11
|
export {};
|
|
@@ -5,6 +5,7 @@ type CreateTableProps = {
|
|
|
5
5
|
colsCount?: number;
|
|
6
6
|
withHeaderRow?: boolean;
|
|
7
7
|
cellContent?: PMNode;
|
|
8
|
+
tableWidth?: number;
|
|
8
9
|
};
|
|
9
|
-
export declare const createTable: ({ schema, rowsCount, colsCount, withHeaderRow, cellContent, }: CreateTableProps) => PMNode;
|
|
10
|
+
export declare const createTable: ({ schema, rowsCount, colsCount, withHeaderRow, cellContent, tableWidth, }: CreateTableProps) => PMNode;
|
|
10
11
|
export {};
|
package/package.json
CHANGED