@atlaskit/adf-schema 25.6.4 → 25.8.0
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 +12 -0
- package/dist/cjs/index.js +6 -0
- package/dist/cjs/schema/default-schema.js +2 -1
- package/dist/cjs/schema/index.js +6 -0
- package/dist/cjs/schema/nodes/block-card.js +15 -3
- package/dist/cjs/schema/nodes/index.js +6 -0
- package/dist/cjs/schema/nodes/tableNodes.js +20 -7
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/schema/default-schema.js +3 -2
- package/dist/es2019/schema/index.js +1 -1
- package/dist/es2019/schema/nodes/block-card.js +15 -3
- package/dist/es2019/schema/nodes/index.js +1 -1
- package/dist/es2019/schema/nodes/tableNodes.js +16 -7
- package/dist/es2019/version.json +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/schema/default-schema.js +3 -2
- package/dist/esm/schema/index.js +1 -1
- package/dist/esm/schema/nodes/block-card.js +15 -3
- package/dist/esm/schema/nodes/index.js +1 -1
- package/dist/esm/schema/nodes/tableNodes.js +18 -6
- package/dist/esm/version.json +1 -1
- package/dist/json-schema/v1/stage-0.json +63 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/schema/index.d.ts +2 -2
- package/dist/types/schema/nodes/block-card.d.ts +20 -1
- package/dist/types/schema/nodes/index.d.ts +2 -2
- package/dist/types/schema/nodes/tableNodes.d.ts +5 -0
- package/dist/types-ts4.5/index.d.ts +2 -2
- package/dist/types-ts4.5/schema/index.d.ts +2 -2
- package/dist/types-ts4.5/schema/nodes/block-card.d.ts +22 -1
- package/dist/types-ts4.5/schema/nodes/index.d.ts +2 -2
- package/dist/types-ts4.5/schema/nodes/tableNodes.d.ts +5 -0
- package/json-schema/v1/stage-0.json +63 -0
- package/package.json +4 -4
- package/report.api.md +28 -1
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# @atlaskit/adf-schema
|
2
2
|
|
3
|
+
## 25.8.0
|
4
|
+
|
5
|
+
### Minor Changes
|
6
|
+
|
7
|
+
- [`f3d2c08d61b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f3d2c08d61b) - Adds new datasource attribute to existing blockCard node
|
8
|
+
|
9
|
+
## 25.7.0
|
10
|
+
|
11
|
+
### Minor Changes
|
12
|
+
|
13
|
+
- [`94561f309f3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/94561f309f3) - New stage-0 change: custom "width" attribute on Tables nodes
|
14
|
+
|
3
15
|
## 25.6.4
|
4
16
|
|
5
17
|
### Patch Changes
|
package/dist/cjs/index.js
CHANGED
@@ -915,6 +915,12 @@ Object.defineProperty(exports, "tableToJSON", {
|
|
915
915
|
return _schema.tableToJSON;
|
916
916
|
}
|
917
917
|
});
|
918
|
+
Object.defineProperty(exports, "tableWithCustomWidth", {
|
919
|
+
enumerable: true,
|
920
|
+
get: function get() {
|
921
|
+
return _schema.tableWithCustomWidth;
|
922
|
+
}
|
923
|
+
});
|
918
924
|
Object.defineProperty(exports, "taskItem", {
|
919
925
|
enumerable: true,
|
920
926
|
get: function get() {
|
@@ -23,7 +23,8 @@ var getSchemaBasedOnStage = function getSchemaBasedOnStage() {
|
|
23
23
|
var defaultSchemaConfig = getDefaultSchemaConfig();
|
24
24
|
if (stage === 'stage0') {
|
25
25
|
defaultSchemaConfig.customNodeSpecs = {
|
26
|
-
layoutSection: _nodes.layoutSectionWithSingleColumn
|
26
|
+
layoutSection: _nodes.layoutSectionWithSingleColumn,
|
27
|
+
table: _nodes.tableWithCustomWidth
|
27
28
|
};
|
28
29
|
defaultSchemaConfig.customMarkSpecs = {
|
29
30
|
border: _marks.border
|
package/dist/cjs/schema/index.js
CHANGED
@@ -555,6 +555,12 @@ Object.defineProperty(exports, "tableToJSON", {
|
|
555
555
|
return _nodes.tableToJSON;
|
556
556
|
}
|
557
557
|
});
|
558
|
+
Object.defineProperty(exports, "tableWithCustomWidth", {
|
559
|
+
enumerable: true,
|
560
|
+
get: function get() {
|
561
|
+
return _nodes.tableWithCustomWidth;
|
562
|
+
}
|
563
|
+
});
|
558
564
|
Object.defineProperty(exports, "taskItem", {
|
559
565
|
enumerable: true,
|
560
566
|
get: function get() {
|
@@ -4,6 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.blockCard = void 0;
|
7
|
+
/**
|
8
|
+
* @stage 0
|
9
|
+
*/
|
10
|
+
|
7
11
|
/**
|
8
12
|
* @name blockCard_node
|
9
13
|
*/
|
@@ -19,6 +23,9 @@ var blockCard = {
|
|
19
23
|
},
|
20
24
|
data: {
|
21
25
|
default: null
|
26
|
+
},
|
27
|
+
datasource: {
|
28
|
+
default: null
|
22
29
|
}
|
23
30
|
},
|
24
31
|
parseDOM: [{
|
@@ -28,9 +35,11 @@ var blockCard = {
|
|
28
35
|
getAttrs: function getAttrs(dom) {
|
29
36
|
var anchor = dom;
|
30
37
|
var data = anchor.getAttribute('data-card-data');
|
38
|
+
var datasource = anchor.getAttribute('data-datasource');
|
31
39
|
return {
|
32
40
|
url: anchor.getAttribute('href') || null,
|
33
|
-
data: data ? JSON.parse(data) : null
|
41
|
+
data: data ? JSON.parse(data) : null,
|
42
|
+
datasource: datasource ? JSON.parse(datasource) : null
|
34
43
|
};
|
35
44
|
}
|
36
45
|
}, {
|
@@ -38,9 +47,11 @@ var blockCard = {
|
|
38
47
|
getAttrs: function getAttrs(dom) {
|
39
48
|
var anchor = dom;
|
40
49
|
var data = anchor.getAttribute('data-card-data');
|
50
|
+
var datasource = anchor.getAttribute('data-datasource');
|
41
51
|
return {
|
42
52
|
url: anchor.getAttribute('data-card-url') || null,
|
43
|
-
data: data ? JSON.parse(data) : null
|
53
|
+
data: data ? JSON.parse(data) : null,
|
54
|
+
datasource: datasource ? JSON.parse(datasource) : null
|
44
55
|
};
|
45
56
|
}
|
46
57
|
}],
|
@@ -49,7 +60,8 @@ var blockCard = {
|
|
49
60
|
var attrs = {
|
50
61
|
'data-block-card': '',
|
51
62
|
href: node.attrs.url || '',
|
52
|
-
'data-card-data': node.attrs.data ? JSON.stringify(node.attrs.data) : ''
|
63
|
+
'data-card-data': node.attrs.data ? JSON.stringify(node.attrs.data) : '',
|
64
|
+
'data-datasource': node.attrs.datasource ? JSON.stringify(node.attrs.datasource) : ''
|
53
65
|
};
|
54
66
|
return ['a', attrs, (node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.url) || ' '];
|
55
67
|
}
|
@@ -394,6 +394,12 @@ Object.defineProperty(exports, "tableToJSON", {
|
|
394
394
|
return _tableNodes.tableToJSON;
|
395
395
|
}
|
396
396
|
});
|
397
|
+
Object.defineProperty(exports, "tableWithCustomWidth", {
|
398
|
+
enumerable: true,
|
399
|
+
get: function get() {
|
400
|
+
return _tableNodes.tableWithCustomWidth;
|
401
|
+
}
|
402
|
+
});
|
397
403
|
Object.defineProperty(exports, "taskItem", {
|
398
404
|
enumerable: true,
|
399
405
|
get: function get() {
|
@@ -4,12 +4,15 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
5
5
|
value: true
|
6
6
|
});
|
7
|
-
exports.toJSONTableHeader = exports.toJSONTableCell = exports.tableToJSON = exports.tableRow = exports.tablePrefixSelector = exports.tableHeaderSelector = exports.tableHeader = exports.tableCellSelector = exports.tableCellContentWrapperSelector = exports.tableCellContentDomSelector = exports.tableCell = exports.tableBackgroundColorPalette = exports.tableBackgroundColorNames = exports.tableBackgroundBorderColor = exports.table = exports.getCellDomAttrs = exports.getCellAttrs = void 0;
|
7
|
+
exports.toJSONTableHeader = exports.toJSONTableCell = exports.tableWithCustomWidth = exports.tableToJSON = exports.tableRow = exports.tablePrefixSelector = exports.tableHeaderSelector = exports.tableHeader = exports.tableCellSelector = exports.tableCellContentWrapperSelector = exports.tableCellContentDomSelector = exports.tableCell = exports.tableBackgroundColorPalette = exports.tableBackgroundColorNames = exports.tableBackgroundBorderColor = exports.table = exports.getCellDomAttrs = exports.getCellAttrs = void 0;
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
8
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
9
10
|
var _editorPalette = require("@atlaskit/editor-palette");
|
10
11
|
var _tokens = require("@atlaskit/tokens");
|
11
12
|
var _colors = require("../../utils/colors");
|
12
13
|
var _uuid = require("../../utils/uuid");
|
14
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
15
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
13
16
|
var tablePrefixSelector = 'pm-table';
|
14
17
|
exports.tablePrefixSelector = tablePrefixSelector;
|
15
18
|
var tableCellSelector = "".concat(tablePrefixSelector, "-cell-content-wrap");
|
@@ -159,6 +162,7 @@ exports.tableBackgroundColorNames = tableBackgroundColorNames;
|
|
159
162
|
|
160
163
|
// TODO: Fix any, potential issue. ED-5048
|
161
164
|
var createTableSpec = function createTableSpec() {
|
165
|
+
var allowCustomWidth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
162
166
|
var attrs = {
|
163
167
|
isNumberColumnEnabled: {
|
164
168
|
default: false
|
@@ -173,9 +177,14 @@ var createTableSpec = function createTableSpec() {
|
|
173
177
|
default: ''
|
174
178
|
}
|
175
179
|
};
|
180
|
+
var finalAttrs = allowCustomWidth ? _objectSpread(_objectSpread({}, attrs), {}, {
|
181
|
+
width: {
|
182
|
+
default: null
|
183
|
+
}
|
184
|
+
}) : attrs;
|
176
185
|
var tableNodeSpec = {
|
177
186
|
content: 'tableRow+',
|
178
|
-
attrs:
|
187
|
+
attrs: finalAttrs,
|
179
188
|
marks: 'unsupportedMark unsupportedNodeAttribute',
|
180
189
|
tableRole: 'table',
|
181
190
|
isolating: true,
|
@@ -188,13 +197,14 @@ var createTableSpec = function createTableSpec() {
|
|
188
197
|
var dom = node;
|
189
198
|
var breakoutWrapper = (_dom$parentElement = dom.parentElement) === null || _dom$parentElement === void 0 ? void 0 : _dom$parentElement.parentElement;
|
190
199
|
return {
|
191
|
-
isNumberColumnEnabled: dom.getAttribute('data-number-column') === 'true'
|
200
|
+
isNumberColumnEnabled: dom.getAttribute('data-number-column') === 'true',
|
192
201
|
layout:
|
193
202
|
// copying from editor
|
194
203
|
dom.getAttribute('data-layout') || ( // copying from renderer
|
195
204
|
breakoutWrapper === null || breakoutWrapper === void 0 ? void 0 : breakoutWrapper.getAttribute('data-layout')) || 'default',
|
196
|
-
__autoSize: dom.getAttribute('data-autosize') === 'true'
|
197
|
-
localId: dom.getAttribute('data-table-local-id') || _uuid.uuid.generate()
|
205
|
+
__autoSize: dom.getAttribute('data-autosize') === 'true',
|
206
|
+
localId: dom.getAttribute('data-table-local-id') || _uuid.uuid.generate(),
|
207
|
+
width: Number(dom.getAttribute('data-table-width')) || null
|
198
208
|
};
|
199
209
|
}
|
200
210
|
}],
|
@@ -203,15 +213,18 @@ var createTableSpec = function createTableSpec() {
|
|
203
213
|
'data-number-column': node.attrs.isNumberColumnEnabled,
|
204
214
|
'data-layout': node.attrs.layout,
|
205
215
|
'data-autosize': node.attrs.__autoSize,
|
206
|
-
'data-table-local-id': node.attrs.localId
|
216
|
+
'data-table-local-id': node.attrs.localId,
|
217
|
+
'data-table-width': node.attrs.width
|
207
218
|
};
|
208
219
|
return ['table', attrs, ['tbody', 0]];
|
209
220
|
}
|
210
221
|
};
|
211
222
|
return tableNodeSpec;
|
212
223
|
};
|
213
|
-
var table = createTableSpec();
|
224
|
+
var table = createTableSpec(false);
|
214
225
|
exports.table = table;
|
226
|
+
var tableWithCustomWidth = createTableSpec(true);
|
227
|
+
exports.tableWithCustomWidth = tableWithCustomWidth;
|
215
228
|
var shouldIncludeAttribute = function shouldIncludeAttribute(key, value) {
|
216
229
|
return !key.startsWith('__') && (key !== 'localId' || !!value);
|
217
230
|
};
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/index.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockquote, bodiedExtension, breakout, bulletList, bulletListSelector, caption, code, codeBlock, codeBlockToJSON, colorPalette, /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
2
|
-
colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, emoji, expand, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineExtension, inlineNodes, layoutColumn, layoutSection, link, linkToJSON, listItem, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, paragraph, placeholder, rule, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette } from './schema';
|
2
|
+
colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, emoji, expand, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineExtension, inlineNodes, layoutColumn, layoutSection, link, linkToJSON, listItem, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, paragraph, placeholder, rule, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette } from './schema';
|
3
3
|
export { B100, B400, B50, B500, B75, G200, G300, G400, G50, G500, G75, N0, N20, N200, N30, N300, N40, N50, N500, N60, N80, N800, N90, P100, P300, P400, P50, P500, P75, R100, R300, R400, R50, R500, R75, T100, T300, T50, T500, T75, Y200, Y400, Y50, Y500, Y75, acNameToEmoji, acShortcutToEmoji, emojiIdToAcName, generateUuid, getEmojiAcName, getLinkMatch, hexToRgb, hexToRgba, isHex, isRgb, isSafeUrl, linkify, linkifyMatch, normalizeHexColor, normalizeUrl, rgbToHex, uuid } from './utils';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { layoutSectionWithSingleColumn } from './nodes';
|
1
|
+
import { layoutSectionWithSingleColumn, tableWithCustomWidth } from './nodes';
|
2
2
|
import { border } from './marks';
|
3
3
|
import { createSchema } from './create-schema';
|
4
4
|
const getDefaultSchemaConfig = () => {
|
@@ -15,7 +15,8 @@ export const getSchemaBasedOnStage = (stage = 'final') => {
|
|
15
15
|
const defaultSchemaConfig = getDefaultSchemaConfig();
|
16
16
|
if (stage === 'stage0') {
|
17
17
|
defaultSchemaConfig.customNodeSpecs = {
|
18
|
-
layoutSection: layoutSectionWithSingleColumn
|
18
|
+
layoutSection: layoutSectionWithSingleColumn,
|
19
|
+
table: tableWithCustomWidth
|
19
20
|
};
|
20
21
|
defaultSchemaConfig.customMarkSpecs = {
|
21
22
|
border
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export { PanelType, blockCard, blockquote, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineExtension, layoutColumn, layoutSection, layoutSectionWithSingleColumn, listItem, media, mediaGroup, mediaSingle, mediaInline, mediaSingleWithCaption, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, paragraph, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline } from './nodes';
|
1
|
+
export { PanelType, blockCard, blockquote, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineExtension, layoutColumn, layoutSection, layoutSectionWithSingleColumn, listItem, media, mediaGroup, mediaSingle, mediaInline, mediaSingleWithCaption, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, paragraph, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline } from './nodes';
|
2
2
|
export { AnnotationTypes, alignment, alignmentPositionMap, annotation, breakout, code, colorPalette, /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
3
3
|
colorPaletteExtended, confluenceInlineComment, dataConsumer, dataConsumerToJSON, em, fragment, fragmentToJSON, indentation, link, linkToJSON, strike, strong, subsup, textColor, typeAheadQuery, underline, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette } from './marks';
|
4
4
|
export { unsupportedNodeTypesForMediaCards } from './unsupported';
|
@@ -1,3 +1,7 @@
|
|
1
|
+
/**
|
2
|
+
* @stage 0
|
3
|
+
*/
|
4
|
+
|
1
5
|
/**
|
2
6
|
* @name blockCard_node
|
3
7
|
*/
|
@@ -13,6 +17,9 @@ export const blockCard = {
|
|
13
17
|
},
|
14
18
|
data: {
|
15
19
|
default: null
|
20
|
+
},
|
21
|
+
datasource: {
|
22
|
+
default: null
|
16
23
|
}
|
17
24
|
},
|
18
25
|
parseDOM: [{
|
@@ -22,9 +29,11 @@ export const blockCard = {
|
|
22
29
|
getAttrs: dom => {
|
23
30
|
const anchor = dom;
|
24
31
|
const data = anchor.getAttribute('data-card-data');
|
32
|
+
const datasource = anchor.getAttribute('data-datasource');
|
25
33
|
return {
|
26
34
|
url: anchor.getAttribute('href') || null,
|
27
|
-
data: data ? JSON.parse(data) : null
|
35
|
+
data: data ? JSON.parse(data) : null,
|
36
|
+
datasource: datasource ? JSON.parse(datasource) : null
|
28
37
|
};
|
29
38
|
}
|
30
39
|
}, {
|
@@ -32,9 +41,11 @@ export const blockCard = {
|
|
32
41
|
getAttrs: dom => {
|
33
42
|
const anchor = dom;
|
34
43
|
const data = anchor.getAttribute('data-card-data');
|
44
|
+
const datasource = anchor.getAttribute('data-datasource');
|
35
45
|
return {
|
36
46
|
url: anchor.getAttribute('data-card-url') || null,
|
37
|
-
data: data ? JSON.parse(data) : null
|
47
|
+
data: data ? JSON.parse(data) : null,
|
48
|
+
datasource: datasource ? JSON.parse(datasource) : null
|
38
49
|
};
|
39
50
|
}
|
40
51
|
}],
|
@@ -43,7 +54,8 @@ export const blockCard = {
|
|
43
54
|
const attrs = {
|
44
55
|
'data-block-card': '',
|
45
56
|
href: node.attrs.url || '',
|
46
|
-
'data-card-data': node.attrs.data ? JSON.stringify(node.attrs.data) : ''
|
57
|
+
'data-card-data': node.attrs.data ? JSON.stringify(node.attrs.data) : '',
|
58
|
+
'data-datasource': node.attrs.datasource ? JSON.stringify(node.attrs.datasource) : ''
|
47
59
|
};
|
48
60
|
return ['a', attrs, (node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.url) || ' '];
|
49
61
|
}
|
@@ -23,7 +23,7 @@ export { media, copyPrivateAttributes as copyPrivateMediaAttributes, toJSON as m
|
|
23
23
|
export { mediaGroup } from './media-group';
|
24
24
|
export { mediaInline } from './media-inline';
|
25
25
|
export { mediaSingle, mediaSingleWithCaption, toJSON as mediaSingleToJSON } from './media-single';
|
26
|
-
export { table, tableToJSON, tableCell, toJSONTableCell, tableHeader, toJSONTableHeader, tableRow, tableBackgroundColorPalette, tableBackgroundBorderColor, tableBackgroundColorNames, getCellAttrs, getCellDomAttrs, tablePrefixSelector, tableCellSelector, tableHeaderSelector, tableCellContentWrapperSelector, tableCellContentDomSelector } from './tableNodes';
|
26
|
+
export { table, tableWithCustomWidth, tableToJSON, tableCell, toJSONTableCell, tableHeader, toJSONTableHeader, tableRow, tableBackgroundColorPalette, tableBackgroundBorderColor, tableBackgroundColorNames, getCellAttrs, getCellDomAttrs, tablePrefixSelector, tableCellSelector, tableHeaderSelector, tableCellContentWrapperSelector, tableCellContentDomSelector } from './tableNodes';
|
27
27
|
export { decisionList, decisionListSelector } from './decision-list';
|
28
28
|
export { decisionItem } from './decision-item';
|
29
29
|
export { taskList, taskListSelector } from './task-list';
|
@@ -138,7 +138,7 @@ export const tableBackgroundColorNames = new Map();
|
|
138
138
|
*/
|
139
139
|
|
140
140
|
// TODO: Fix any, potential issue. ED-5048
|
141
|
-
const createTableSpec = () => {
|
141
|
+
const createTableSpec = (allowCustomWidth = false) => {
|
142
142
|
const attrs = {
|
143
143
|
isNumberColumnEnabled: {
|
144
144
|
default: false
|
@@ -153,9 +153,15 @@ const createTableSpec = () => {
|
|
153
153
|
default: ''
|
154
154
|
}
|
155
155
|
};
|
156
|
+
const finalAttrs = allowCustomWidth ? {
|
157
|
+
...attrs,
|
158
|
+
width: {
|
159
|
+
default: null
|
160
|
+
}
|
161
|
+
} : attrs;
|
156
162
|
const tableNodeSpec = {
|
157
163
|
content: 'tableRow+',
|
158
|
-
attrs:
|
164
|
+
attrs: finalAttrs,
|
159
165
|
marks: 'unsupportedMark unsupportedNodeAttribute',
|
160
166
|
tableRole: 'table',
|
161
167
|
isolating: true,
|
@@ -168,13 +174,14 @@ const createTableSpec = () => {
|
|
168
174
|
const dom = node;
|
169
175
|
const breakoutWrapper = (_dom$parentElement = dom.parentElement) === null || _dom$parentElement === void 0 ? void 0 : _dom$parentElement.parentElement;
|
170
176
|
return {
|
171
|
-
isNumberColumnEnabled: dom.getAttribute('data-number-column') === 'true'
|
177
|
+
isNumberColumnEnabled: dom.getAttribute('data-number-column') === 'true',
|
172
178
|
layout:
|
173
179
|
// copying from editor
|
174
180
|
dom.getAttribute('data-layout') || ( // copying from renderer
|
175
181
|
breakoutWrapper === null || breakoutWrapper === void 0 ? void 0 : breakoutWrapper.getAttribute('data-layout')) || 'default',
|
176
|
-
__autoSize: dom.getAttribute('data-autosize') === 'true'
|
177
|
-
localId: dom.getAttribute('data-table-local-id') || uuid.generate()
|
182
|
+
__autoSize: dom.getAttribute('data-autosize') === 'true',
|
183
|
+
localId: dom.getAttribute('data-table-local-id') || uuid.generate(),
|
184
|
+
width: Number(dom.getAttribute('data-table-width')) || null
|
178
185
|
};
|
179
186
|
}
|
180
187
|
}],
|
@@ -183,14 +190,16 @@ const createTableSpec = () => {
|
|
183
190
|
'data-number-column': node.attrs.isNumberColumnEnabled,
|
184
191
|
'data-layout': node.attrs.layout,
|
185
192
|
'data-autosize': node.attrs.__autoSize,
|
186
|
-
'data-table-local-id': node.attrs.localId
|
193
|
+
'data-table-local-id': node.attrs.localId,
|
194
|
+
'data-table-width': node.attrs.width
|
187
195
|
};
|
188
196
|
return ['table', attrs, ['tbody', 0]];
|
189
197
|
}
|
190
198
|
};
|
191
199
|
return tableNodeSpec;
|
192
200
|
};
|
193
|
-
export const table = createTableSpec();
|
201
|
+
export const table = createTableSpec(false);
|
202
|
+
export const tableWithCustomWidth = createTableSpec(true);
|
194
203
|
const shouldIncludeAttribute = (key, value) => !key.startsWith('__') && (key !== 'localId' || !!value);
|
195
204
|
export const tableToJSON = node => ({
|
196
205
|
attrs: Object.keys(node.attrs).filter(key => shouldIncludeAttribute(key, node.attrs[key])).reduce((obj, key) => {
|
package/dist/es2019/version.json
CHANGED
package/dist/esm/index.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockquote, bodiedExtension, breakout, bulletList, bulletListSelector, caption, code, codeBlock, codeBlockToJSON, colorPalette, /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
2
|
-
colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, emoji, expand, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineExtension, inlineNodes, layoutColumn, layoutSection, link, linkToJSON, listItem, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, paragraph, placeholder, rule, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette } from './schema';
|
2
|
+
colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, emoji, expand, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineExtension, inlineNodes, layoutColumn, layoutSection, link, linkToJSON, listItem, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, paragraph, placeholder, rule, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette } from './schema';
|
3
3
|
export { B100, B400, B50, B500, B75, G200, G300, G400, G50, G500, G75, N0, N20, N200, N30, N300, N40, N50, N500, N60, N80, N800, N90, P100, P300, P400, P50, P500, P75, R100, R300, R400, R50, R500, R75, T100, T300, T50, T500, T75, Y200, Y400, Y50, Y500, Y75, acNameToEmoji, acShortcutToEmoji, emojiIdToAcName, generateUuid, getEmojiAcName, getLinkMatch, hexToRgb, hexToRgba, isHex, isRgb, isSafeUrl, linkify, linkifyMatch, normalizeHexColor, normalizeUrl, rgbToHex, uuid } from './utils';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { layoutSectionWithSingleColumn } from './nodes';
|
1
|
+
import { layoutSectionWithSingleColumn, tableWithCustomWidth } from './nodes';
|
2
2
|
import { border } from './marks';
|
3
3
|
import { createSchema } from './create-schema';
|
4
4
|
var getDefaultSchemaConfig = function getDefaultSchemaConfig() {
|
@@ -16,7 +16,8 @@ export var getSchemaBasedOnStage = function getSchemaBasedOnStage() {
|
|
16
16
|
var defaultSchemaConfig = getDefaultSchemaConfig();
|
17
17
|
if (stage === 'stage0') {
|
18
18
|
defaultSchemaConfig.customNodeSpecs = {
|
19
|
-
layoutSection: layoutSectionWithSingleColumn
|
19
|
+
layoutSection: layoutSectionWithSingleColumn,
|
20
|
+
table: tableWithCustomWidth
|
20
21
|
};
|
21
22
|
defaultSchemaConfig.customMarkSpecs = {
|
22
23
|
border: border
|
package/dist/esm/schema/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
export { PanelType, blockCard, blockquote, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineExtension, layoutColumn, layoutSection, layoutSectionWithSingleColumn, listItem, media, mediaGroup, mediaSingle, mediaInline, mediaSingleWithCaption, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, paragraph, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline } from './nodes';
|
1
|
+
export { PanelType, blockCard, blockquote, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineExtension, layoutColumn, layoutSection, layoutSectionWithSingleColumn, listItem, media, mediaGroup, mediaSingle, mediaInline, mediaSingleWithCaption, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, paragraph, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline } from './nodes';
|
2
2
|
export { AnnotationTypes, alignment, alignmentPositionMap, annotation, breakout, code, colorPalette, /** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
3
3
|
colorPaletteExtended, confluenceInlineComment, dataConsumer, dataConsumerToJSON, em, fragment, fragmentToJSON, indentation, link, linkToJSON, strike, strong, subsup, textColor, typeAheadQuery, underline, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette } from './marks';
|
4
4
|
export { unsupportedNodeTypesForMediaCards } from './unsupported';
|
@@ -1,3 +1,7 @@
|
|
1
|
+
/**
|
2
|
+
* @stage 0
|
3
|
+
*/
|
4
|
+
|
1
5
|
/**
|
2
6
|
* @name blockCard_node
|
3
7
|
*/
|
@@ -13,6 +17,9 @@ export var blockCard = {
|
|
13
17
|
},
|
14
18
|
data: {
|
15
19
|
default: null
|
20
|
+
},
|
21
|
+
datasource: {
|
22
|
+
default: null
|
16
23
|
}
|
17
24
|
},
|
18
25
|
parseDOM: [{
|
@@ -22,9 +29,11 @@ export var blockCard = {
|
|
22
29
|
getAttrs: function getAttrs(dom) {
|
23
30
|
var anchor = dom;
|
24
31
|
var data = anchor.getAttribute('data-card-data');
|
32
|
+
var datasource = anchor.getAttribute('data-datasource');
|
25
33
|
return {
|
26
34
|
url: anchor.getAttribute('href') || null,
|
27
|
-
data: data ? JSON.parse(data) : null
|
35
|
+
data: data ? JSON.parse(data) : null,
|
36
|
+
datasource: datasource ? JSON.parse(datasource) : null
|
28
37
|
};
|
29
38
|
}
|
30
39
|
}, {
|
@@ -32,9 +41,11 @@ export var blockCard = {
|
|
32
41
|
getAttrs: function getAttrs(dom) {
|
33
42
|
var anchor = dom;
|
34
43
|
var data = anchor.getAttribute('data-card-data');
|
44
|
+
var datasource = anchor.getAttribute('data-datasource');
|
35
45
|
return {
|
36
46
|
url: anchor.getAttribute('data-card-url') || null,
|
37
|
-
data: data ? JSON.parse(data) : null
|
47
|
+
data: data ? JSON.parse(data) : null,
|
48
|
+
datasource: datasource ? JSON.parse(datasource) : null
|
38
49
|
};
|
39
50
|
}
|
40
51
|
}],
|
@@ -43,7 +54,8 @@ export var blockCard = {
|
|
43
54
|
var attrs = {
|
44
55
|
'data-block-card': '',
|
45
56
|
href: node.attrs.url || '',
|
46
|
-
'data-card-data': node.attrs.data ? JSON.stringify(node.attrs.data) : ''
|
57
|
+
'data-card-data': node.attrs.data ? JSON.stringify(node.attrs.data) : '',
|
58
|
+
'data-datasource': node.attrs.datasource ? JSON.stringify(node.attrs.datasource) : ''
|
47
59
|
};
|
48
60
|
return ['a', attrs, (node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.url) || ' '];
|
49
61
|
}
|
@@ -23,7 +23,7 @@ export { media, copyPrivateAttributes as copyPrivateMediaAttributes, toJSON as m
|
|
23
23
|
export { mediaGroup } from './media-group';
|
24
24
|
export { mediaInline } from './media-inline';
|
25
25
|
export { mediaSingle, mediaSingleWithCaption, toJSON as mediaSingleToJSON } from './media-single';
|
26
|
-
export { table, tableToJSON, tableCell, toJSONTableCell, tableHeader, toJSONTableHeader, tableRow, tableBackgroundColorPalette, tableBackgroundBorderColor, tableBackgroundColorNames, getCellAttrs, getCellDomAttrs, tablePrefixSelector, tableCellSelector, tableHeaderSelector, tableCellContentWrapperSelector, tableCellContentDomSelector } from './tableNodes';
|
26
|
+
export { table, tableWithCustomWidth, tableToJSON, tableCell, toJSONTableCell, tableHeader, toJSONTableHeader, tableRow, tableBackgroundColorPalette, tableBackgroundBorderColor, tableBackgroundColorNames, getCellAttrs, getCellDomAttrs, tablePrefixSelector, tableCellSelector, tableHeaderSelector, tableCellContentWrapperSelector, tableCellContentDomSelector } from './tableNodes';
|
27
27
|
export { decisionList, decisionListSelector } from './decision-list';
|
28
28
|
export { decisionItem } from './decision-item';
|
29
29
|
export { taskList, taskListSelector } from './task-list';
|
@@ -1,4 +1,7 @@
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
1
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
4
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
2
5
|
import { hexToEditorBackgroundPaletteColorTokenName } from '@atlaskit/editor-palette';
|
3
6
|
import { getTokenValue } from '@atlaskit/tokens';
|
4
7
|
import { B100, B50, B75, G200, G50, G75, hexToRgba, isHex, isRgb, N0, N20, N60, N800, P100, P50, P75, R100, R50, R75, rgbToHex, T100, T50, T75, Y200, Y50, Y75 } from '../../utils/colors';
|
@@ -142,6 +145,7 @@ export var tableBackgroundColorNames = new Map();
|
|
142
145
|
|
143
146
|
// TODO: Fix any, potential issue. ED-5048
|
144
147
|
var createTableSpec = function createTableSpec() {
|
148
|
+
var allowCustomWidth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
145
149
|
var attrs = {
|
146
150
|
isNumberColumnEnabled: {
|
147
151
|
default: false
|
@@ -156,9 +160,14 @@ var createTableSpec = function createTableSpec() {
|
|
156
160
|
default: ''
|
157
161
|
}
|
158
162
|
};
|
163
|
+
var finalAttrs = allowCustomWidth ? _objectSpread(_objectSpread({}, attrs), {}, {
|
164
|
+
width: {
|
165
|
+
default: null
|
166
|
+
}
|
167
|
+
}) : attrs;
|
159
168
|
var tableNodeSpec = {
|
160
169
|
content: 'tableRow+',
|
161
|
-
attrs:
|
170
|
+
attrs: finalAttrs,
|
162
171
|
marks: 'unsupportedMark unsupportedNodeAttribute',
|
163
172
|
tableRole: 'table',
|
164
173
|
isolating: true,
|
@@ -171,13 +180,14 @@ var createTableSpec = function createTableSpec() {
|
|
171
180
|
var dom = node;
|
172
181
|
var breakoutWrapper = (_dom$parentElement = dom.parentElement) === null || _dom$parentElement === void 0 ? void 0 : _dom$parentElement.parentElement;
|
173
182
|
return {
|
174
|
-
isNumberColumnEnabled: dom.getAttribute('data-number-column') === 'true'
|
183
|
+
isNumberColumnEnabled: dom.getAttribute('data-number-column') === 'true',
|
175
184
|
layout:
|
176
185
|
// copying from editor
|
177
186
|
dom.getAttribute('data-layout') || ( // copying from renderer
|
178
187
|
breakoutWrapper === null || breakoutWrapper === void 0 ? void 0 : breakoutWrapper.getAttribute('data-layout')) || 'default',
|
179
|
-
__autoSize: dom.getAttribute('data-autosize') === 'true'
|
180
|
-
localId: dom.getAttribute('data-table-local-id') || uuid.generate()
|
188
|
+
__autoSize: dom.getAttribute('data-autosize') === 'true',
|
189
|
+
localId: dom.getAttribute('data-table-local-id') || uuid.generate(),
|
190
|
+
width: Number(dom.getAttribute('data-table-width')) || null
|
181
191
|
};
|
182
192
|
}
|
183
193
|
}],
|
@@ -186,14 +196,16 @@ var createTableSpec = function createTableSpec() {
|
|
186
196
|
'data-number-column': node.attrs.isNumberColumnEnabled,
|
187
197
|
'data-layout': node.attrs.layout,
|
188
198
|
'data-autosize': node.attrs.__autoSize,
|
189
|
-
'data-table-local-id': node.attrs.localId
|
199
|
+
'data-table-local-id': node.attrs.localId,
|
200
|
+
'data-table-width': node.attrs.width
|
190
201
|
};
|
191
202
|
return ['table', attrs, ['tbody', 0]];
|
192
203
|
}
|
193
204
|
};
|
194
205
|
return tableNodeSpec;
|
195
206
|
};
|
196
|
-
export var table = createTableSpec();
|
207
|
+
export var table = createTableSpec(false);
|
208
|
+
export var tableWithCustomWidth = createTableSpec(true);
|
197
209
|
var shouldIncludeAttribute = function shouldIncludeAttribute(key, value) {
|
198
210
|
return !key.startsWith('__') && (key !== 'localId' || !!value);
|
199
211
|
};
|
package/dist/esm/version.json
CHANGED
@@ -746,6 +746,66 @@
|
|
746
746
|
"data"
|
747
747
|
],
|
748
748
|
"additionalProperties": false
|
749
|
+
},
|
750
|
+
{
|
751
|
+
"type": "object",
|
752
|
+
"properties": {
|
753
|
+
"url": {
|
754
|
+
"type": "string"
|
755
|
+
},
|
756
|
+
"datasource": {
|
757
|
+
"type": "object",
|
758
|
+
"properties": {
|
759
|
+
"id": {
|
760
|
+
"type": "string"
|
761
|
+
},
|
762
|
+
"parameters": {},
|
763
|
+
"views": {
|
764
|
+
"type": "array",
|
765
|
+
"items": {
|
766
|
+
"type": "object",
|
767
|
+
"properties": {
|
768
|
+
"type": {
|
769
|
+
"type": "string"
|
770
|
+
},
|
771
|
+
"properties": {}
|
772
|
+
},
|
773
|
+
"required": [
|
774
|
+
"type"
|
775
|
+
],
|
776
|
+
"additionalProperties": false
|
777
|
+
}
|
778
|
+
},
|
779
|
+
"width": {
|
780
|
+
"type": "number",
|
781
|
+
"minimum": 0,
|
782
|
+
"maximum": 100
|
783
|
+
},
|
784
|
+
"layout": {
|
785
|
+
"enum": [
|
786
|
+
"wide",
|
787
|
+
"full-width",
|
788
|
+
"center",
|
789
|
+
"wrap-right",
|
790
|
+
"wrap-left",
|
791
|
+
"align-end",
|
792
|
+
"align-start"
|
793
|
+
]
|
794
|
+
}
|
795
|
+
},
|
796
|
+
"required": [
|
797
|
+
"id",
|
798
|
+
"parameters",
|
799
|
+
"views",
|
800
|
+
"layout"
|
801
|
+
],
|
802
|
+
"additionalProperties": false
|
803
|
+
}
|
804
|
+
},
|
805
|
+
"additionalProperties": false,
|
806
|
+
"required": [
|
807
|
+
"datasource"
|
808
|
+
]
|
749
809
|
}
|
750
810
|
]
|
751
811
|
}
|
@@ -2045,6 +2105,9 @@
|
|
2045
2105
|
"localId": {
|
2046
2106
|
"type": "string",
|
2047
2107
|
"minLength": 1
|
2108
|
+
},
|
2109
|
+
"width": {
|
2110
|
+
"type": "number"
|
2048
2111
|
}
|
2049
2112
|
},
|
2050
2113
|
"additionalProperties": false
|
package/dist/types/index.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockquote, bodiedExtension, breakout, bulletList, bulletListSelector, caption, code, codeBlock, codeBlockToJSON, colorPalette,
|
2
2
|
/** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
3
|
-
colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, emoji, expand, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineExtension, inlineNodes, layoutColumn, layoutSection, link, linkToJSON, listItem, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, paragraph, placeholder, rule, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, } from './schema';
|
4
|
-
export type { AlignmentAttributes, AlignmentMarkDefinition, AnnotationMarkAttributes, AnnotationMarkDefinition, BlockCardDefinition, BlockContent, BlockQuoteDefinition, BodiedExtensionDefinition, BreakoutMarkAttrs, BreakoutMarkDefinition, BulletListDefinition, CaptionDefinition, CardAttributes, CellAttributes, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockDefinition, CodeBlockWithMarksDefinition, CodeDefinition, DataConsumerAttributes, DataConsumerDefinition, DataType, DateDefinition, DecisionItemDefinition, DecisionListDefinition, DocNode, EmbedCardDefinition, EmbedCardAttributes, EmDefinition, EmojiAttributes, EmojiDefinition, ExpandDefinition, ExtensionDefinition, ExtensionLayout, ExternalMediaAttributes, FragmentAttributes, FragmentDefinition, HardBreakDefinition, HeadingBaseDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, IndentationMarkAttributes, IndentationMarkDefinition, Inline, InlineAtomic, InlineCardDefinition, InlineCode, InlineExtensionDefinition, InlineFormattedText, InlineLinkText, LayoutColumnDefinition, LayoutSectionDefinition, LayoutSectionFullDefinition, LayoutSectionWithSingleColumnDefinition, LinkAttributes, LinkDefinition, ListItemArray, ListItemDefinition, MarksObject, MediaADFAttrs, MediaAttributes, MediaInlineAttributes, MediaInlineDefinition, MediaBaseAttributes, MediaDefinition, MediaDisplayType, MediaGroupDefinition, MediaSingleDefinition, MediaType, MentionAttributes, MentionDefinition, MentionUserType, NestedExpandContent, NestedExpandDefinition, NoMark, NonNestableBlockContent, OrderedListDefinition, PanelAttributes, PanelDefinition, ParagraphBaseDefinition, ParagraphDefinition, ParagraphWithAlignmentDefinition, ParagraphWithIndentationDefinition, ParagraphWithMarksDefinition, PlaceholderDefinition, RuleDefinition, StatusDefinition, StrikeDefinition, StrongDefinition, SubSupAttributes, SubSupDefinition, TableAttributes, TableCellDefinition, TableDefinition, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, TaskListContent, TaskListDefinition, TextColorAttributes, TextColorDefinition, TextDefinition, UnderlineDefinition, UrlType, AnnotationId, RichMediaAttributes, RichMediaLayout, AnnotationDataAttributes, CellDomAttrs, BorderMarkAttributes, BorderMarkDefinition, } from './schema';
|
3
|
+
colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, emoji, expand, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineExtension, inlineNodes, layoutColumn, layoutSection, link, linkToJSON, listItem, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, paragraph, placeholder, rule, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, } from './schema';
|
4
|
+
export type { AlignmentAttributes, AlignmentMarkDefinition, AnnotationMarkAttributes, AnnotationMarkDefinition, BlockCardDefinition, BlockContent, BlockQuoteDefinition, BodiedExtensionDefinition, BreakoutMarkAttrs, BreakoutMarkDefinition, BulletListDefinition, CaptionDefinition, CardAttributes, CellAttributes, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockDefinition, CodeBlockWithMarksDefinition, CodeDefinition, DatasourceAttributes, DataConsumerAttributes, DataConsumerDefinition, DataType, DateDefinition, DecisionItemDefinition, DecisionListDefinition, DocNode, EmbedCardDefinition, EmbedCardAttributes, EmDefinition, EmojiAttributes, EmojiDefinition, ExpandDefinition, ExtensionDefinition, ExtensionLayout, ExternalMediaAttributes, FragmentAttributes, FragmentDefinition, HardBreakDefinition, HeadingBaseDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, IndentationMarkAttributes, IndentationMarkDefinition, Inline, InlineAtomic, InlineCardDefinition, InlineCode, InlineExtensionDefinition, InlineFormattedText, InlineLinkText, LayoutColumnDefinition, LayoutSectionDefinition, LayoutSectionFullDefinition, LayoutSectionWithSingleColumnDefinition, LinkAttributes, LinkDefinition, ListItemArray, ListItemDefinition, MarksObject, MediaADFAttrs, MediaAttributes, MediaInlineAttributes, MediaInlineDefinition, MediaBaseAttributes, MediaDefinition, MediaDisplayType, MediaGroupDefinition, MediaSingleDefinition, MediaType, MentionAttributes, MentionDefinition, MentionUserType, NestedExpandContent, NestedExpandDefinition, NoMark, NonNestableBlockContent, OrderedListDefinition, PanelAttributes, PanelDefinition, ParagraphBaseDefinition, ParagraphDefinition, ParagraphWithAlignmentDefinition, ParagraphWithIndentationDefinition, ParagraphWithMarksDefinition, PlaceholderDefinition, RuleDefinition, StatusDefinition, StrikeDefinition, StrongDefinition, SubSupAttributes, SubSupDefinition, TableAttributes, TableCellDefinition, TableDefinition, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, TaskListContent, TaskListDefinition, TextColorAttributes, TextColorDefinition, TextDefinition, UnderlineDefinition, UrlType, AnnotationId, RichMediaAttributes, RichMediaLayout, AnnotationDataAttributes, CellDomAttrs, BorderMarkAttributes, BorderMarkDefinition, } from './schema';
|
5
5
|
export { B100, B400, B50, B500, B75, G200, G300, G400, G50, G500, G75, N0, N20, N200, N30, N300, N40, N50, N500, N60, N80, N800, N90, P100, P300, P400, P50, P500, P75, R100, R300, R400, R50, R500, R75, T100, T300, T50, T500, T75, Y200, Y400, Y50, Y500, Y75, acNameToEmoji, acShortcutToEmoji, emojiIdToAcName, generateUuid, getEmojiAcName, getLinkMatch, hexToRgb, hexToRgba, isHex, isRgb, isSafeUrl, linkify, linkifyMatch, normalizeHexColor, normalizeUrl, rgbToHex, uuid, } from './utils';
|
6
6
|
export type { Match, NameToEmoji } from './utils';
|
@@ -1,5 +1,5 @@
|
|
1
|
-
export { PanelType, blockCard, blockquote, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineExtension, layoutColumn, layoutSection, layoutSectionWithSingleColumn, listItem, media, mediaGroup, mediaSingle, mediaInline, mediaSingleWithCaption, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, paragraph, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, } from './nodes';
|
2
|
-
export type { BlockCardDefinition, BlockContent, BlockQuoteDefinition, BodiedExtensionDefinition, BulletListDefinition, CaptionDefinition, CardAttributes, CellAttributes, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockDefinition, CodeBlockWithMarksDefinition, DataType, DateDefinition, DecisionItemDefinition, DecisionListDefinition, DocNode, EmbedCardDefinition, EmbedCardAttributes, EmojiAttributes, EmojiDefinition, ExpandDefinition, ExtensionDefinition, ExtensionLayout, ExternalMediaAttributes, HardBreakDefinition, HeadingBaseDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, Inline, InlineAtomic, InlineCardDefinition, InlineCode, InlineExtensionDefinition, InlineFormattedText, InlineLinkText, LayoutColumnDefinition, LayoutSectionDefinition, LayoutSectionBaseDefinition, LayoutSectionFullDefinition, LayoutSectionWithSingleColumnDefinition, ListItemArray, ListItemDefinition, MarksObject, MediaADFAttrs, MediaAttributes, MediaInlineAttributes, MediaInlineDefinition, MediaBaseAttributes, MediaDefinition, MediaDisplayType, MediaGroupDefinition, MediaSingleDefinition, MediaType, MentionAttributes, MentionDefinition, MentionUserType, NestedExpandContent, NestedExpandDefinition, NoMark, NonNestableBlockContent, OrderedListDefinition, PanelAttributes, PanelDefinition, ParagraphBaseDefinition, ParagraphDefinition, ParagraphWithAlignmentDefinition, ParagraphWithIndentationDefinition, ParagraphWithMarksDefinition, PlaceholderDefinition, RuleDefinition, StatusDefinition, TableAttributes, TableCellDefinition, TableDefinition, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, TaskListContent, TaskListDefinition, TextDefinition, UrlType, RichMediaAttributes, RichMediaLayout, CellDomAttrs, } from './nodes';
|
1
|
+
export { PanelType, blockCard, blockquote, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineExtension, layoutColumn, layoutSection, layoutSectionWithSingleColumn, listItem, media, mediaGroup, mediaSingle, mediaInline, mediaSingleWithCaption, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, paragraph, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, } from './nodes';
|
2
|
+
export type { BlockCardDefinition, BlockContent, BlockQuoteDefinition, BodiedExtensionDefinition, BulletListDefinition, CaptionDefinition, CardAttributes, CellAttributes, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockDefinition, CodeBlockWithMarksDefinition, DatasourceAttributes, DatasourceAttributeProperties, DataType, DateDefinition, DecisionItemDefinition, DecisionListDefinition, DocNode, EmbedCardDefinition, EmbedCardAttributes, EmojiAttributes, EmojiDefinition, ExpandDefinition, ExtensionDefinition, ExtensionLayout, ExternalMediaAttributes, HardBreakDefinition, HeadingBaseDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, Inline, InlineAtomic, InlineCardDefinition, InlineCode, InlineExtensionDefinition, InlineFormattedText, InlineLinkText, LayoutColumnDefinition, LayoutSectionDefinition, LayoutSectionBaseDefinition, LayoutSectionFullDefinition, LayoutSectionWithSingleColumnDefinition, ListItemArray, ListItemDefinition, MarksObject, MediaADFAttrs, MediaAttributes, MediaInlineAttributes, MediaInlineDefinition, MediaBaseAttributes, MediaDefinition, MediaDisplayType, MediaGroupDefinition, MediaSingleDefinition, MediaType, MentionAttributes, MentionDefinition, MentionUserType, NestedExpandContent, NestedExpandDefinition, NoMark, NonNestableBlockContent, OrderedListDefinition, PanelAttributes, PanelDefinition, ParagraphBaseDefinition, ParagraphDefinition, ParagraphWithAlignmentDefinition, ParagraphWithIndentationDefinition, ParagraphWithMarksDefinition, PlaceholderDefinition, RuleDefinition, StatusDefinition, TableAttributes, TableCellDefinition, TableDefinition, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, TaskListContent, TaskListDefinition, TextDefinition, UrlType, RichMediaAttributes, RichMediaLayout, CellDomAttrs, } from './nodes';
|
3
3
|
export { AnnotationTypes, alignment, alignmentPositionMap, annotation, breakout, code, colorPalette,
|
4
4
|
/** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
5
5
|
colorPaletteExtended, confluenceInlineComment, dataConsumer, dataConsumerToJSON, em, fragment, fragmentToJSON, indentation, link, linkToJSON, strike, strong, subsup, textColor, typeAheadQuery, underline, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, } from './marks';
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { NodeSpec } from 'prosemirror-model';
|
2
|
+
import { RichMediaAttributes } from './types/rich-media-common';
|
2
3
|
export interface UrlType {
|
3
4
|
/**
|
4
5
|
* @validatorFn safeUrl
|
@@ -11,12 +12,30 @@ export interface DataType {
|
|
11
12
|
*/
|
12
13
|
data: object;
|
13
14
|
}
|
15
|
+
export interface DatasourceAttributeProperties extends RichMediaAttributes {
|
16
|
+
id: string;
|
17
|
+
parameters: object;
|
18
|
+
views: [{
|
19
|
+
type: string;
|
20
|
+
properties?: object;
|
21
|
+
}];
|
22
|
+
}
|
23
|
+
/**
|
24
|
+
* @stage 0
|
25
|
+
*/
|
26
|
+
export interface DatasourceAttributes {
|
27
|
+
/**
|
28
|
+
* @validatorFn safeUrl
|
29
|
+
*/
|
30
|
+
url?: string;
|
31
|
+
datasource: DatasourceAttributeProperties;
|
32
|
+
}
|
14
33
|
export type CardAttributes = UrlType | DataType;
|
15
34
|
/**
|
16
35
|
* @name blockCard_node
|
17
36
|
*/
|
18
37
|
export interface BlockCardDefinition {
|
19
38
|
type: 'blockCard';
|
20
|
-
attrs: CardAttributes;
|
39
|
+
attrs: CardAttributes | DatasourceAttributes;
|
21
40
|
}
|
22
41
|
export declare const blockCard: NodeSpec;
|
@@ -43,7 +43,7 @@ export type { MediaInlineAttributes, MediaInlineDefinition, } from './media-inli
|
|
43
43
|
export type { MediaGroupDefinition } from './media-group';
|
44
44
|
export { mediaSingle, mediaSingleWithCaption, toJSON as mediaSingleToJSON, } from './media-single';
|
45
45
|
export type { MediaSingleDefinition } from './media-single';
|
46
|
-
export { table, tableToJSON, tableCell, toJSONTableCell, tableHeader, toJSONTableHeader, tableRow, tableBackgroundColorPalette, tableBackgroundBorderColor, tableBackgroundColorNames, getCellAttrs, getCellDomAttrs, tablePrefixSelector, tableCellSelector, tableHeaderSelector, tableCellContentWrapperSelector, tableCellContentDomSelector, } from './tableNodes';
|
46
|
+
export { table, tableWithCustomWidth, tableToJSON, tableCell, toJSONTableCell, tableHeader, toJSONTableHeader, tableRow, tableBackgroundColorPalette, tableBackgroundBorderColor, tableBackgroundColorNames, getCellAttrs, getCellDomAttrs, tablePrefixSelector, tableCellSelector, tableHeaderSelector, tableCellContentWrapperSelector, tableCellContentDomSelector, } from './tableNodes';
|
47
47
|
export type { TableAttributes, CellAttributes, Layout as TableLayout, TableDefinition, TableCell as TableCellDefinition, TableHeader as TableHeaderDefinition, TableRow as TableRowDefinition, CellDomAttrs, } from './tableNodes';
|
48
48
|
export { decisionList, decisionListSelector } from './decision-list';
|
49
49
|
export type { DecisionListDefinition } from './decision-list';
|
@@ -70,7 +70,7 @@ export type { LayoutColumnDefinition } from './layout-column';
|
|
70
70
|
export { inlineCard } from './inline-card';
|
71
71
|
export type { InlineCardDefinition } from './inline-card';
|
72
72
|
export { blockCard } from './block-card';
|
73
|
-
export type { UrlType, DataType, CardAttributes, BlockCardDefinition, } from './block-card';
|
73
|
+
export type { UrlType, DataType, DatasourceAttributes, DatasourceAttributeProperties, CardAttributes, BlockCardDefinition, } from './block-card';
|
74
74
|
export { unsupportedBlock } from './unsupported-block';
|
75
75
|
export { unsupportedInline } from './unsupported-inline';
|
76
76
|
export { status } from './status';
|
@@ -55,6 +55,10 @@ export interface TableAttributes {
|
|
55
55
|
* @minLength 1
|
56
56
|
*/
|
57
57
|
localId?: string;
|
58
|
+
/**
|
59
|
+
* @stage 0
|
60
|
+
*/
|
61
|
+
width?: number;
|
58
62
|
}
|
59
63
|
/**
|
60
64
|
* @name table_node
|
@@ -98,6 +102,7 @@ export interface TableHeader {
|
|
98
102
|
content: TableCellContent;
|
99
103
|
}
|
100
104
|
export declare const table: NodeSpec;
|
105
|
+
export declare const tableWithCustomWidth: NodeSpec;
|
101
106
|
export declare const tableToJSON: (node: PmNode) => {
|
102
107
|
attrs: {
|
103
108
|
[key: string]: any;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
export { PanelType, AnnotationTypes, alignment, alignmentPositionMap, annotation, blockCard, blockquote, bodiedExtension, breakout, bulletList, bulletListSelector, caption, code, codeBlock, codeBlockToJSON, colorPalette,
|
2
2
|
/** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
3
|
-
colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, emoji, expand, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineExtension, inlineNodes, layoutColumn, layoutSection, link, linkToJSON, listItem, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, paragraph, placeholder, rule, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, } from './schema';
|
4
|
-
export type { AlignmentAttributes, AlignmentMarkDefinition, AnnotationMarkAttributes, AnnotationMarkDefinition, BlockCardDefinition, BlockContent, BlockQuoteDefinition, BodiedExtensionDefinition, BreakoutMarkAttrs, BreakoutMarkDefinition, BulletListDefinition, CaptionDefinition, CardAttributes, CellAttributes, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockDefinition, CodeBlockWithMarksDefinition, CodeDefinition, DataConsumerAttributes, DataConsumerDefinition, DataType, DateDefinition, DecisionItemDefinition, DecisionListDefinition, DocNode, EmbedCardDefinition, EmbedCardAttributes, EmDefinition, EmojiAttributes, EmojiDefinition, ExpandDefinition, ExtensionDefinition, ExtensionLayout, ExternalMediaAttributes, FragmentAttributes, FragmentDefinition, HardBreakDefinition, HeadingBaseDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, IndentationMarkAttributes, IndentationMarkDefinition, Inline, InlineAtomic, InlineCardDefinition, InlineCode, InlineExtensionDefinition, InlineFormattedText, InlineLinkText, LayoutColumnDefinition, LayoutSectionDefinition, LayoutSectionFullDefinition, LayoutSectionWithSingleColumnDefinition, LinkAttributes, LinkDefinition, ListItemArray, ListItemDefinition, MarksObject, MediaADFAttrs, MediaAttributes, MediaInlineAttributes, MediaInlineDefinition, MediaBaseAttributes, MediaDefinition, MediaDisplayType, MediaGroupDefinition, MediaSingleDefinition, MediaType, MentionAttributes, MentionDefinition, MentionUserType, NestedExpandContent, NestedExpandDefinition, NoMark, NonNestableBlockContent, OrderedListDefinition, PanelAttributes, PanelDefinition, ParagraphBaseDefinition, ParagraphDefinition, ParagraphWithAlignmentDefinition, ParagraphWithIndentationDefinition, ParagraphWithMarksDefinition, PlaceholderDefinition, RuleDefinition, StatusDefinition, StrikeDefinition, StrongDefinition, SubSupAttributes, SubSupDefinition, TableAttributes, TableCellDefinition, TableDefinition, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, TaskListContent, TaskListDefinition, TextColorAttributes, TextColorDefinition, TextDefinition, UnderlineDefinition, UrlType, AnnotationId, RichMediaAttributes, RichMediaLayout, AnnotationDataAttributes, CellDomAttrs, BorderMarkAttributes, BorderMarkDefinition, } from './schema';
|
3
|
+
colorPaletteExtended, confluenceInlineComment, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, createSchema, dataConsumer, dataConsumerToJSON, date, decisionItem, decisionList, decisionListSelector, doc, em, embedCard, emoji, expand, expandToJSON, extension, fragment, fragmentToJSON, hardBreak, heading, image, indentation, inlineCard, inlineExtension, inlineNodes, layoutColumn, layoutSection, link, linkToJSON, listItem, media, mediaGroup, mediaSingle, mediaSingleWithCaption, mediaInline, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, paragraph, placeholder, rule, sanitizeNodes, getCellAttrs, getCellDomAttrs, status, strike, strong, subsup, table, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, textColor, toJSONTableCell, toJSONTableHeader, typeAheadQuery, underline, unknownBlock, unsupportedBlock, unsupportedInline, unsupportedNodeTypesForMediaCards, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, } from './schema';
|
4
|
+
export type { AlignmentAttributes, AlignmentMarkDefinition, AnnotationMarkAttributes, AnnotationMarkDefinition, BlockCardDefinition, BlockContent, BlockQuoteDefinition, BodiedExtensionDefinition, BreakoutMarkAttrs, BreakoutMarkDefinition, BulletListDefinition, CaptionDefinition, CardAttributes, CellAttributes, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockDefinition, CodeBlockWithMarksDefinition, CodeDefinition, DatasourceAttributes, DataConsumerAttributes, DataConsumerDefinition, DataType, DateDefinition, DecisionItemDefinition, DecisionListDefinition, DocNode, EmbedCardDefinition, EmbedCardAttributes, EmDefinition, EmojiAttributes, EmojiDefinition, ExpandDefinition, ExtensionDefinition, ExtensionLayout, ExternalMediaAttributes, FragmentAttributes, FragmentDefinition, HardBreakDefinition, HeadingBaseDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, IndentationMarkAttributes, IndentationMarkDefinition, Inline, InlineAtomic, InlineCardDefinition, InlineCode, InlineExtensionDefinition, InlineFormattedText, InlineLinkText, LayoutColumnDefinition, LayoutSectionDefinition, LayoutSectionFullDefinition, LayoutSectionWithSingleColumnDefinition, LinkAttributes, LinkDefinition, ListItemArray, ListItemDefinition, MarksObject, MediaADFAttrs, MediaAttributes, MediaInlineAttributes, MediaInlineDefinition, MediaBaseAttributes, MediaDefinition, MediaDisplayType, MediaGroupDefinition, MediaSingleDefinition, MediaType, MentionAttributes, MentionDefinition, MentionUserType, NestedExpandContent, NestedExpandDefinition, NoMark, NonNestableBlockContent, OrderedListDefinition, PanelAttributes, PanelDefinition, ParagraphBaseDefinition, ParagraphDefinition, ParagraphWithAlignmentDefinition, ParagraphWithIndentationDefinition, ParagraphWithMarksDefinition, PlaceholderDefinition, RuleDefinition, StatusDefinition, StrikeDefinition, StrongDefinition, SubSupAttributes, SubSupDefinition, TableAttributes, TableCellDefinition, TableDefinition, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, TaskListContent, TaskListDefinition, TextColorAttributes, TextColorDefinition, TextDefinition, UnderlineDefinition, UrlType, AnnotationId, RichMediaAttributes, RichMediaLayout, AnnotationDataAttributes, CellDomAttrs, BorderMarkAttributes, BorderMarkDefinition, } from './schema';
|
5
5
|
export { B100, B400, B50, B500, B75, G200, G300, G400, G50, G500, G75, N0, N20, N200, N30, N300, N40, N50, N500, N60, N80, N800, N90, P100, P300, P400, P50, P500, P75, R100, R300, R400, R50, R500, R75, T100, T300, T50, T500, T75, Y200, Y400, Y50, Y500, Y75, acNameToEmoji, acShortcutToEmoji, emojiIdToAcName, generateUuid, getEmojiAcName, getLinkMatch, hexToRgb, hexToRgba, isHex, isRgb, isSafeUrl, linkify, linkifyMatch, normalizeHexColor, normalizeUrl, rgbToHex, uuid, } from './utils';
|
6
6
|
export type { Match, NameToEmoji } from './utils';
|
@@ -1,5 +1,5 @@
|
|
1
|
-
export { PanelType, blockCard, blockquote, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineExtension, layoutColumn, layoutSection, layoutSectionWithSingleColumn, listItem, media, mediaGroup, mediaSingle, mediaInline, mediaSingleWithCaption, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, paragraph, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, } from './nodes';
|
2
|
-
export type { BlockCardDefinition, BlockContent, BlockQuoteDefinition, BodiedExtensionDefinition, BulletListDefinition, CaptionDefinition, CardAttributes, CellAttributes, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockDefinition, CodeBlockWithMarksDefinition, DataType, DateDefinition, DecisionItemDefinition, DecisionListDefinition, DocNode, EmbedCardDefinition, EmbedCardAttributes, EmojiAttributes, EmojiDefinition, ExpandDefinition, ExtensionDefinition, ExtensionLayout, ExternalMediaAttributes, HardBreakDefinition, HeadingBaseDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, Inline, InlineAtomic, InlineCardDefinition, InlineCode, InlineExtensionDefinition, InlineFormattedText, InlineLinkText, LayoutColumnDefinition, LayoutSectionDefinition, LayoutSectionBaseDefinition, LayoutSectionFullDefinition, LayoutSectionWithSingleColumnDefinition, ListItemArray, ListItemDefinition, MarksObject, MediaADFAttrs, MediaAttributes, MediaInlineAttributes, MediaInlineDefinition, MediaBaseAttributes, MediaDefinition, MediaDisplayType, MediaGroupDefinition, MediaSingleDefinition, MediaType, MentionAttributes, MentionDefinition, MentionUserType, NestedExpandContent, NestedExpandDefinition, NoMark, NonNestableBlockContent, OrderedListDefinition, PanelAttributes, PanelDefinition, ParagraphBaseDefinition, ParagraphDefinition, ParagraphWithAlignmentDefinition, ParagraphWithIndentationDefinition, ParagraphWithMarksDefinition, PlaceholderDefinition, RuleDefinition, StatusDefinition, TableAttributes, TableCellDefinition, TableDefinition, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, TaskListContent, TaskListDefinition, TextDefinition, UrlType, RichMediaAttributes, RichMediaLayout, CellDomAttrs, } from './nodes';
|
1
|
+
export { PanelType, blockCard, blockquote, bodiedExtension, bulletList, bulletListSelector, caption, codeBlock, codeBlockToJSON, confluenceJiraIssue, confluenceUnsupportedBlock, confluenceUnsupportedInline, copyPrivateMediaAttributes, date, decisionItem, decisionList, decisionListSelector, doc, embedCard, emoji, expand, expandToJSON, extension, hardBreak, heading, image, inlineCard, inlineExtension, layoutColumn, layoutSection, layoutSectionWithSingleColumn, listItem, media, mediaGroup, mediaSingle, mediaInline, mediaSingleWithCaption, mediaSingleToJSON, mediaToJSON, mention, mentionToJSON, nestedExpand, orderedList, orderedListSelector, orderedListWithOrder, panel, paragraph, placeholder, rule, getCellAttrs, getCellDomAttrs, status, table, tableWithCustomWidth, tableBackgroundBorderColor, tableBackgroundColorNames, tableBackgroundColorPalette, tableCell, tableCellContentDomSelector, tableCellContentWrapperSelector, tableCellSelector, tableHeader, tableHeaderSelector, tablePrefixSelector, tableRow, tableToJSON, taskItem, taskList, taskListSelector, text, toJSONTableCell, toJSONTableHeader, unknownBlock, unsupportedBlock, unsupportedInline, } from './nodes';
|
2
|
+
export type { BlockCardDefinition, BlockContent, BlockQuoteDefinition, BodiedExtensionDefinition, BulletListDefinition, CaptionDefinition, CardAttributes, CellAttributes, CodeBlockAttrs, CodeBlockBaseDefinition, CodeBlockDefinition, CodeBlockWithMarksDefinition, DatasourceAttributes, DatasourceAttributeProperties, DataType, DateDefinition, DecisionItemDefinition, DecisionListDefinition, DocNode, EmbedCardDefinition, EmbedCardAttributes, EmojiAttributes, EmojiDefinition, ExpandDefinition, ExtensionDefinition, ExtensionLayout, ExternalMediaAttributes, HardBreakDefinition, HeadingBaseDefinition, HeadingDefinition, HeadingWithAlignmentDefinition, HeadingWithIndentationDefinition, HeadingWithMarksDefinition, Inline, InlineAtomic, InlineCardDefinition, InlineCode, InlineExtensionDefinition, InlineFormattedText, InlineLinkText, LayoutColumnDefinition, LayoutSectionDefinition, LayoutSectionBaseDefinition, LayoutSectionFullDefinition, LayoutSectionWithSingleColumnDefinition, ListItemArray, ListItemDefinition, MarksObject, MediaADFAttrs, MediaAttributes, MediaInlineAttributes, MediaInlineDefinition, MediaBaseAttributes, MediaDefinition, MediaDisplayType, MediaGroupDefinition, MediaSingleDefinition, MediaType, MentionAttributes, MentionDefinition, MentionUserType, NestedExpandContent, NestedExpandDefinition, NoMark, NonNestableBlockContent, OrderedListDefinition, PanelAttributes, PanelDefinition, ParagraphBaseDefinition, ParagraphDefinition, ParagraphWithAlignmentDefinition, ParagraphWithIndentationDefinition, ParagraphWithMarksDefinition, PlaceholderDefinition, RuleDefinition, StatusDefinition, TableAttributes, TableCellDefinition, TableDefinition, TableHeaderDefinition, TableLayout, TableRowDefinition, TaskItemDefinition, TaskListContent, TaskListDefinition, TextDefinition, UrlType, RichMediaAttributes, RichMediaLayout, CellDomAttrs, } from './nodes';
|
3
3
|
export { AnnotationTypes, alignment, alignmentPositionMap, annotation, breakout, code, colorPalette,
|
4
4
|
/** @deprecated [ED-15849] The extended palette is now rolled into the main one. Use `colorPalette` instead. */
|
5
5
|
colorPaletteExtended, confluenceInlineComment, dataConsumer, dataConsumerToJSON, em, fragment, fragmentToJSON, indentation, link, linkToJSON, strike, strong, subsup, textColor, typeAheadQuery, underline, buildAnnotationMarkDataAttributes, AnnotationMarkStates, unsupportedMark, unsupportedNodeAttribute, border, borderColorPalette, } from './marks';
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { NodeSpec } from 'prosemirror-model';
|
2
|
+
import { RichMediaAttributes } from './types/rich-media-common';
|
2
3
|
export interface UrlType {
|
3
4
|
/**
|
4
5
|
* @validatorFn safeUrl
|
@@ -11,12 +12,32 @@ export interface DataType {
|
|
11
12
|
*/
|
12
13
|
data: object;
|
13
14
|
}
|
15
|
+
export interface DatasourceAttributeProperties extends RichMediaAttributes {
|
16
|
+
id: string;
|
17
|
+
parameters: object;
|
18
|
+
views: [
|
19
|
+
{
|
20
|
+
type: string;
|
21
|
+
properties?: object;
|
22
|
+
}
|
23
|
+
];
|
24
|
+
}
|
25
|
+
/**
|
26
|
+
* @stage 0
|
27
|
+
*/
|
28
|
+
export interface DatasourceAttributes {
|
29
|
+
/**
|
30
|
+
* @validatorFn safeUrl
|
31
|
+
*/
|
32
|
+
url?: string;
|
33
|
+
datasource: DatasourceAttributeProperties;
|
34
|
+
}
|
14
35
|
export type CardAttributes = UrlType | DataType;
|
15
36
|
/**
|
16
37
|
* @name blockCard_node
|
17
38
|
*/
|
18
39
|
export interface BlockCardDefinition {
|
19
40
|
type: 'blockCard';
|
20
|
-
attrs: CardAttributes;
|
41
|
+
attrs: CardAttributes | DatasourceAttributes;
|
21
42
|
}
|
22
43
|
export declare const blockCard: NodeSpec;
|
@@ -43,7 +43,7 @@ export type { MediaInlineAttributes, MediaInlineDefinition, } from './media-inli
|
|
43
43
|
export type { MediaGroupDefinition } from './media-group';
|
44
44
|
export { mediaSingle, mediaSingleWithCaption, toJSON as mediaSingleToJSON, } from './media-single';
|
45
45
|
export type { MediaSingleDefinition } from './media-single';
|
46
|
-
export { table, tableToJSON, tableCell, toJSONTableCell, tableHeader, toJSONTableHeader, tableRow, tableBackgroundColorPalette, tableBackgroundBorderColor, tableBackgroundColorNames, getCellAttrs, getCellDomAttrs, tablePrefixSelector, tableCellSelector, tableHeaderSelector, tableCellContentWrapperSelector, tableCellContentDomSelector, } from './tableNodes';
|
46
|
+
export { table, tableWithCustomWidth, tableToJSON, tableCell, toJSONTableCell, tableHeader, toJSONTableHeader, tableRow, tableBackgroundColorPalette, tableBackgroundBorderColor, tableBackgroundColorNames, getCellAttrs, getCellDomAttrs, tablePrefixSelector, tableCellSelector, tableHeaderSelector, tableCellContentWrapperSelector, tableCellContentDomSelector, } from './tableNodes';
|
47
47
|
export type { TableAttributes, CellAttributes, Layout as TableLayout, TableDefinition, TableCell as TableCellDefinition, TableHeader as TableHeaderDefinition, TableRow as TableRowDefinition, CellDomAttrs, } from './tableNodes';
|
48
48
|
export { decisionList, decisionListSelector } from './decision-list';
|
49
49
|
export type { DecisionListDefinition } from './decision-list';
|
@@ -70,7 +70,7 @@ export type { LayoutColumnDefinition } from './layout-column';
|
|
70
70
|
export { inlineCard } from './inline-card';
|
71
71
|
export type { InlineCardDefinition } from './inline-card';
|
72
72
|
export { blockCard } from './block-card';
|
73
|
-
export type { UrlType, DataType, CardAttributes, BlockCardDefinition, } from './block-card';
|
73
|
+
export type { UrlType, DataType, DatasourceAttributes, DatasourceAttributeProperties, CardAttributes, BlockCardDefinition, } from './block-card';
|
74
74
|
export { unsupportedBlock } from './unsupported-block';
|
75
75
|
export { unsupportedInline } from './unsupported-inline';
|
76
76
|
export { status } from './status';
|
@@ -55,6 +55,10 @@ export interface TableAttributes {
|
|
55
55
|
* @minLength 1
|
56
56
|
*/
|
57
57
|
localId?: string;
|
58
|
+
/**
|
59
|
+
* @stage 0
|
60
|
+
*/
|
61
|
+
width?: number;
|
58
62
|
}
|
59
63
|
/**
|
60
64
|
* @name table_node
|
@@ -98,6 +102,7 @@ export interface TableHeader {
|
|
98
102
|
content: TableCellContent;
|
99
103
|
}
|
100
104
|
export declare const table: NodeSpec;
|
105
|
+
export declare const tableWithCustomWidth: NodeSpec;
|
101
106
|
export declare const tableToJSON: (node: PmNode) => {
|
102
107
|
attrs: {
|
103
108
|
[key: string]: any;
|
@@ -746,6 +746,66 @@
|
|
746
746
|
"data"
|
747
747
|
],
|
748
748
|
"additionalProperties": false
|
749
|
+
},
|
750
|
+
{
|
751
|
+
"type": "object",
|
752
|
+
"properties": {
|
753
|
+
"url": {
|
754
|
+
"type": "string"
|
755
|
+
},
|
756
|
+
"datasource": {
|
757
|
+
"type": "object",
|
758
|
+
"properties": {
|
759
|
+
"id": {
|
760
|
+
"type": "string"
|
761
|
+
},
|
762
|
+
"parameters": {},
|
763
|
+
"views": {
|
764
|
+
"type": "array",
|
765
|
+
"items": {
|
766
|
+
"type": "object",
|
767
|
+
"properties": {
|
768
|
+
"type": {
|
769
|
+
"type": "string"
|
770
|
+
},
|
771
|
+
"properties": {}
|
772
|
+
},
|
773
|
+
"required": [
|
774
|
+
"type"
|
775
|
+
],
|
776
|
+
"additionalProperties": false
|
777
|
+
}
|
778
|
+
},
|
779
|
+
"width": {
|
780
|
+
"type": "number",
|
781
|
+
"minimum": 0,
|
782
|
+
"maximum": 100
|
783
|
+
},
|
784
|
+
"layout": {
|
785
|
+
"enum": [
|
786
|
+
"wide",
|
787
|
+
"full-width",
|
788
|
+
"center",
|
789
|
+
"wrap-right",
|
790
|
+
"wrap-left",
|
791
|
+
"align-end",
|
792
|
+
"align-start"
|
793
|
+
]
|
794
|
+
}
|
795
|
+
},
|
796
|
+
"required": [
|
797
|
+
"id",
|
798
|
+
"parameters",
|
799
|
+
"views",
|
800
|
+
"layout"
|
801
|
+
],
|
802
|
+
"additionalProperties": false
|
803
|
+
}
|
804
|
+
},
|
805
|
+
"additionalProperties": false,
|
806
|
+
"required": [
|
807
|
+
"datasource"
|
808
|
+
]
|
749
809
|
}
|
750
810
|
]
|
751
811
|
}
|
@@ -2045,6 +2105,9 @@
|
|
2045
2105
|
"localId": {
|
2046
2106
|
"type": "string",
|
2047
2107
|
"minLength": 1
|
2108
|
+
},
|
2109
|
+
"width": {
|
2110
|
+
"type": "number"
|
2048
2111
|
}
|
2049
2112
|
},
|
2050
2113
|
"additionalProperties": false
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atlaskit/adf-schema",
|
3
|
-
"version": "25.
|
3
|
+
"version": "25.8.0",
|
4
4
|
"description": "Shared package that contains the ADF-schema (json) and ProseMirror node/mark specs",
|
5
5
|
"publishConfig": {
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
@@ -50,7 +50,7 @@
|
|
50
50
|
"@atlaskit/codemod-utils": "^4.2.0",
|
51
51
|
"@atlaskit/editor-palette": "1.4.2",
|
52
52
|
"@atlaskit/editor-tables": "^2.3.0",
|
53
|
-
"@atlaskit/tokens": "^1.
|
53
|
+
"@atlaskit/tokens": "^1.5.0",
|
54
54
|
"@babel/runtime": "^7.0.0",
|
55
55
|
"@types/linkify-it": "^2.0.4",
|
56
56
|
"@types/prosemirror-model": "^1.11.0",
|
@@ -62,9 +62,9 @@
|
|
62
62
|
"prosemirror-transform": "1.3.2"
|
63
63
|
},
|
64
64
|
"devDependencies": {
|
65
|
-
"@atlaskit/adf-utils": "^18.
|
65
|
+
"@atlaskit/adf-utils": "^18.3.0",
|
66
66
|
"@atlaskit/editor-json-transformer": "^8.9.0",
|
67
|
-
"@atlaskit/editor-test-helpers": "^18.
|
67
|
+
"@atlaskit/editor-test-helpers": "^18.5.0",
|
68
68
|
"@atlaskit/json-schema-generator": "^3.3.0",
|
69
69
|
"@atlassian/adf-sample": "^1.1.0",
|
70
70
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
package/report.api.md
CHANGED
@@ -150,7 +150,7 @@ export const blockCard: NodeSpec;
|
|
150
150
|
// @public
|
151
151
|
export interface BlockCardDefinition {
|
152
152
|
// (undocumented)
|
153
|
-
attrs: CardAttributes;
|
153
|
+
attrs: CardAttributes | DatasourceAttributes;
|
154
154
|
// (undocumented)
|
155
155
|
type: 'blockCard';
|
156
156
|
}
|
@@ -426,6 +426,28 @@ export const dataConsumerToJSON: (mark: Mark) => {
|
|
426
426
|
};
|
427
427
|
};
|
428
428
|
|
429
|
+
// @public (undocumented)
|
430
|
+
interface DatasourceAttributeProperties extends RichMediaAttributes {
|
431
|
+
// (undocumented)
|
432
|
+
id: string;
|
433
|
+
// (undocumented)
|
434
|
+
parameters: object;
|
435
|
+
// (undocumented)
|
436
|
+
views: [
|
437
|
+
{
|
438
|
+
type: string;
|
439
|
+
properties?: object;
|
440
|
+
},
|
441
|
+
];
|
442
|
+
}
|
443
|
+
|
444
|
+
// @public (undocumented)
|
445
|
+
export interface DatasourceAttributes {
|
446
|
+
// (undocumented)
|
447
|
+
datasource: DatasourceAttributeProperties;
|
448
|
+
url?: string;
|
449
|
+
}
|
450
|
+
|
429
451
|
// @public (undocumented)
|
430
452
|
export interface DataType {
|
431
453
|
data: object;
|
@@ -1561,6 +1583,8 @@ export interface TableAttributes {
|
|
1561
1583
|
layout?: TableLayout;
|
1562
1584
|
// (undocumented)
|
1563
1585
|
localId?: string;
|
1586
|
+
// (undocumented)
|
1587
|
+
width?: number;
|
1564
1588
|
}
|
1565
1589
|
|
1566
1590
|
// @public (undocumented)
|
@@ -1668,6 +1692,9 @@ export const tableToJSON: (node: Node_2) => {
|
|
1668
1692
|
};
|
1669
1693
|
};
|
1670
1694
|
|
1695
|
+
// @public (undocumented)
|
1696
|
+
export const tableWithCustomWidth: NodeSpec;
|
1697
|
+
|
1671
1698
|
// @public (undocumented)
|
1672
1699
|
export const taskItem: NodeSpec;
|
1673
1700
|
|