@atlaskit/editor-tables 2.7.3 → 2.7.4
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,13 @@
|
|
|
1
1
|
# @atlaskit/editor-tables
|
|
2
2
|
|
|
3
|
+
## 2.7.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#102210](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/102210)
|
|
8
|
+
[`fe0d7aa7668a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/fe0d7aa7668a) -
|
|
9
|
+
Set layout attribute for tables to align-left when inserted in full width editor
|
|
10
|
+
|
|
3
11
|
## 2.7.3
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -26,7 +26,9 @@ var createTable = exports.createTable = function createTable(_ref) {
|
|
|
26
26
|
_ref$withHeaderRow = _ref.withHeaderRow,
|
|
27
27
|
withHeaderRow = _ref$withHeaderRow === void 0 ? true : _ref$withHeaderRow,
|
|
28
28
|
cellContent = _ref.cellContent,
|
|
29
|
-
tableWidth = _ref.tableWidth
|
|
29
|
+
tableWidth = _ref.tableWidth,
|
|
30
|
+
_ref$layout = _ref.layout,
|
|
31
|
+
layout = _ref$layout === void 0 ? undefined : _ref$layout;
|
|
30
32
|
var _tableNodeTypes = (0, _tableNodeTypes2.tableNodeTypes)(schema),
|
|
31
33
|
tableCell = _tableNodeTypes.cell,
|
|
32
34
|
tableHeader = _tableNodeTypes.header_cell,
|
|
@@ -52,6 +54,7 @@ var createTable = exports.createTable = function createTable(_ref) {
|
|
|
52
54
|
}
|
|
53
55
|
return table.createChecked({
|
|
54
56
|
localId: _uuid.uuid.generate(),
|
|
55
|
-
width: tableWidth !== null && tableWidth !== void 0 ? tableWidth : 760
|
|
57
|
+
width: tableWidth !== null && tableWidth !== void 0 ? tableWidth : 760,
|
|
58
|
+
layout: layout
|
|
56
59
|
}, rows);
|
|
57
60
|
};
|
|
@@ -17,7 +17,9 @@ export const createTable = ({
|
|
|
17
17
|
colsCount = 3,
|
|
18
18
|
withHeaderRow = true,
|
|
19
19
|
cellContent,
|
|
20
|
-
tableWidth
|
|
20
|
+
tableWidth,
|
|
21
|
+
// default to undefined so PM will use default value defined in schema
|
|
22
|
+
layout = undefined
|
|
21
23
|
}) => {
|
|
22
24
|
const {
|
|
23
25
|
cell: tableCell,
|
|
@@ -45,6 +47,7 @@ export const createTable = ({
|
|
|
45
47
|
}
|
|
46
48
|
return table.createChecked({
|
|
47
49
|
localId: uuid.generate(),
|
|
48
|
-
width: tableWidth !== null && tableWidth !== void 0 ? tableWidth : 760
|
|
50
|
+
width: tableWidth !== null && tableWidth !== void 0 ? tableWidth : 760,
|
|
51
|
+
layout
|
|
49
52
|
}, rows);
|
|
50
53
|
};
|
|
@@ -20,7 +20,9 @@ export var createTable = function createTable(_ref) {
|
|
|
20
20
|
_ref$withHeaderRow = _ref.withHeaderRow,
|
|
21
21
|
withHeaderRow = _ref$withHeaderRow === void 0 ? true : _ref$withHeaderRow,
|
|
22
22
|
cellContent = _ref.cellContent,
|
|
23
|
-
tableWidth = _ref.tableWidth
|
|
23
|
+
tableWidth = _ref.tableWidth,
|
|
24
|
+
_ref$layout = _ref.layout,
|
|
25
|
+
layout = _ref$layout === void 0 ? undefined : _ref$layout;
|
|
24
26
|
var _tableNodeTypes = tableNodeTypes(schema),
|
|
25
27
|
tableCell = _tableNodeTypes.cell,
|
|
26
28
|
tableHeader = _tableNodeTypes.header_cell,
|
|
@@ -46,6 +48,7 @@ export var createTable = function createTable(_ref) {
|
|
|
46
48
|
}
|
|
47
49
|
return table.createChecked({
|
|
48
50
|
localId: uuid.generate(),
|
|
49
|
-
width: tableWidth !== null && tableWidth !== void 0 ? tableWidth : 760
|
|
51
|
+
width: tableWidth !== null && tableWidth !== void 0 ? tableWidth : 760,
|
|
52
|
+
layout: layout
|
|
50
53
|
}, rows);
|
|
51
54
|
};
|
|
@@ -6,6 +6,7 @@ type CreateTableProps = {
|
|
|
6
6
|
withHeaderRow?: boolean;
|
|
7
7
|
cellContent?: PMNode;
|
|
8
8
|
tableWidth?: number;
|
|
9
|
+
layout?: string;
|
|
9
10
|
};
|
|
10
|
-
export declare const createTable: ({ schema, rowsCount, colsCount, withHeaderRow, cellContent, tableWidth, }: CreateTableProps) => PMNode;
|
|
11
|
+
export declare const createTable: ({ schema, rowsCount, colsCount, withHeaderRow, cellContent, tableWidth, layout }: CreateTableProps) => PMNode;
|
|
11
12
|
export {};
|
|
@@ -6,6 +6,7 @@ type CreateTableProps = {
|
|
|
6
6
|
withHeaderRow?: boolean;
|
|
7
7
|
cellContent?: PMNode;
|
|
8
8
|
tableWidth?: number;
|
|
9
|
+
layout?: string;
|
|
9
10
|
};
|
|
10
|
-
export declare const createTable: ({ schema, rowsCount, colsCount, withHeaderRow, cellContent, tableWidth, }: CreateTableProps) => PMNode;
|
|
11
|
+
export declare const createTable: ({ schema, rowsCount, colsCount, withHeaderRow, cellContent, tableWidth, layout }: CreateTableProps) => PMNode;
|
|
11
12
|
export {};
|
package/package.json
CHANGED