@atlaskit/adf-utils 19.28.0 → 19.29.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 +11 -0
- package/dist/cjs/validator/specs/index.js +12 -0
- package/dist/cjs/validator/validator.js +6 -1
- package/dist/es2019/validator/specs/index.js +1 -1
- package/dist/es2019/validator/validator.js +6 -1
- package/dist/esm/validator/specs/index.js +1 -1
- package/dist/esm/validator/validator.js +6 -1
- package/dist/types/validator/specs/index.d.ts +1 -1
- package/dist/types-ts4.5/validator/specs/index.d.ts +1 -1
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/adf-utils
|
|
2
2
|
|
|
3
|
+
## 19.29.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`2fb1c8a74a856`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2fb1c8a74a856) -
|
|
8
|
+
ADF Change 101: Add wrap and hideLineNumbers attributes to codeBlock stage-0 variants
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
3
14
|
## 19.28.0
|
|
4
15
|
|
|
5
16
|
### Minor Changes
|
|
@@ -111,6 +111,18 @@ Object.defineProperty(exports, "codeBlock_root_only", {
|
|
|
111
111
|
return _schemaValidator.codeBlock_root_only;
|
|
112
112
|
}
|
|
113
113
|
});
|
|
114
|
+
Object.defineProperty(exports, "codeBlock_root_only_with_extended_attributes", {
|
|
115
|
+
enumerable: true,
|
|
116
|
+
get: function get() {
|
|
117
|
+
return _schemaValidator.codeBlock_root_only_with_extended_attributes;
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
Object.defineProperty(exports, "codeBlock_with_extended_attributes", {
|
|
121
|
+
enumerable: true,
|
|
122
|
+
get: function get() {
|
|
123
|
+
return _schemaValidator.codeBlock_with_extended_attributes;
|
|
124
|
+
}
|
|
125
|
+
});
|
|
114
126
|
Object.defineProperty(exports, "confluenceInlineComment", {
|
|
115
127
|
enumerable: true,
|
|
116
128
|
get: function get() {
|
|
@@ -16,6 +16,7 @@ var specs = _interopRequireWildcard(require("./specs"));
|
|
|
16
16
|
var _utils = require("./utils");
|
|
17
17
|
var _extractAllowedContent = require("./extractAllowedContent");
|
|
18
18
|
var _rules = require("./rules");
|
|
19
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
19
20
|
var _excluded = ["items"]; // Ignored via go/ees005
|
|
20
21
|
// eslint-disable-next-line import/no-namespace
|
|
21
22
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof3(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
@@ -355,7 +356,11 @@ var unsupportedNodeAttributesContent = function unsupportedNodeAttributesContent
|
|
|
355
356
|
* under the base spec must also be valid under the variant.
|
|
356
357
|
*/
|
|
357
358
|
var getVariantSpecOverrides = function getVariantSpecOverrides() {
|
|
358
|
-
|
|
359
|
+
var overrides = {};
|
|
360
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_code_block_q4_lovability', 'isEnabled', true)) {
|
|
361
|
+
overrides.codeBlock = 'codeBlock_with_extended_attributes';
|
|
362
|
+
}
|
|
363
|
+
return overrides;
|
|
359
364
|
};
|
|
360
365
|
|
|
361
366
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
-
export { alignment, annotation, backgroundColor, blockCard, block_content, blockRootOnly, blockquote, blockTaskItem, bodiedExtension, bodiedExtension_with_marks, border, breakout, bulletList, caption, code, codeBlock, codeBlock_root_only, text_with_no_marks, confluenceInlineComment, dataConsumer, date, decisionItem, decisionList, doc, em, embedCard, emoji, expand, expand_root_only, extension, extensionFrame, extension_with_marks, fontSize, fragment, hardBreak, heading, heading_with_alignment, heading_with_indentation, heading_with_no_marks, indentation, inlineCard, inlineExtension, inlineExtension_with_marks, inline_content, layoutColumn, layoutSection, layoutSection_full, layoutSection_with_single_column, link, listItem, media, mediaGroup, mediaInline, mediaSingle, mediaSingle_caption, mediaSingle_full, mention, multiBodiedExtension, nestedExpand, nestedExpand_content, nestedExpand_with_no_marks, non_nestable_block_content, orderedList, panel, paragraph, paragraph_with_alignment, paragraph_with_font_size, paragraph_with_font_size_and_alignment, paragraph_with_font_size_and_indentation, paragraph_with_indentation, paragraph_with_no_marks, placeholder, rule, status, strike, strong, subsup, table, tableCell, tableHeader, tableRow, taskItem, taskList, text, textColor, text_code_inline, text_formatted, text_link_inline, underline, syncBlock, bodiedSyncBlock } from '@atlaskit/adf-schema/schema-validator';
|
|
2
|
+
export { alignment, annotation, backgroundColor, blockCard, block_content, blockRootOnly, blockquote, blockTaskItem, bodiedExtension, bodiedExtension_with_marks, border, breakout, bulletList, caption, code, codeBlock, codeBlock_root_only, codeBlock_with_extended_attributes, codeBlock_root_only_with_extended_attributes, text_with_no_marks, confluenceInlineComment, dataConsumer, date, decisionItem, decisionList, doc, em, embedCard, emoji, expand, expand_root_only, extension, extensionFrame, extension_with_marks, fontSize, fragment, hardBreak, heading, heading_with_alignment, heading_with_indentation, heading_with_no_marks, indentation, inlineCard, inlineExtension, inlineExtension_with_marks, inline_content, layoutColumn, layoutSection, layoutSection_full, layoutSection_with_single_column, link, listItem, media, mediaGroup, mediaInline, mediaSingle, mediaSingle_caption, mediaSingle_full, mention, multiBodiedExtension, nestedExpand, nestedExpand_content, nestedExpand_with_no_marks, non_nestable_block_content, orderedList, panel, paragraph, paragraph_with_alignment, paragraph_with_font_size, paragraph_with_font_size_and_alignment, paragraph_with_font_size_and_indentation, paragraph_with_indentation, paragraph_with_no_marks, placeholder, rule, status, strike, strong, subsup, table, tableCell, tableHeader, tableRow, taskItem, taskList, text, textColor, text_code_inline, text_formatted, text_link_inline, underline, syncBlock, bodiedSyncBlock } from '@atlaskit/adf-schema/schema-validator';
|
|
@@ -4,6 +4,7 @@ import * as specs from './specs';
|
|
|
4
4
|
import { copy, isBoolean, isDefined, isInteger, isNumber, isPlainObject, isString, makeArray } from './utils';
|
|
5
5
|
import { extractAllowedContent } from './extractAllowedContent';
|
|
6
6
|
import { validatorFnMap } from './rules';
|
|
7
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
8
|
|
|
8
9
|
// Ignored via go/ees005
|
|
9
10
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -316,7 +317,11 @@ const unsupportedNodeAttributesContent = (entity, errorCode, invalidAttributes,
|
|
|
316
317
|
* under the base spec must also be valid under the variant.
|
|
317
318
|
*/
|
|
318
319
|
const getVariantSpecOverrides = () => {
|
|
319
|
-
|
|
320
|
+
const overrides = {};
|
|
321
|
+
if (expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true)) {
|
|
322
|
+
overrides.codeBlock = 'codeBlock_with_extended_attributes';
|
|
323
|
+
}
|
|
324
|
+
return overrides;
|
|
320
325
|
};
|
|
321
326
|
|
|
322
327
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
2
|
-
export { alignment, annotation, backgroundColor, blockCard, block_content, blockRootOnly, blockquote, blockTaskItem, bodiedExtension, bodiedExtension_with_marks, border, breakout, bulletList, caption, code, codeBlock, codeBlock_root_only, text_with_no_marks, confluenceInlineComment, dataConsumer, date, decisionItem, decisionList, doc, em, embedCard, emoji, expand, expand_root_only, extension, extensionFrame, extension_with_marks, fontSize, fragment, hardBreak, heading, heading_with_alignment, heading_with_indentation, heading_with_no_marks, indentation, inlineCard, inlineExtension, inlineExtension_with_marks, inline_content, layoutColumn, layoutSection, layoutSection_full, layoutSection_with_single_column, link, listItem, media, mediaGroup, mediaInline, mediaSingle, mediaSingle_caption, mediaSingle_full, mention, multiBodiedExtension, nestedExpand, nestedExpand_content, nestedExpand_with_no_marks, non_nestable_block_content, orderedList, panel, paragraph, paragraph_with_alignment, paragraph_with_font_size, paragraph_with_font_size_and_alignment, paragraph_with_font_size_and_indentation, paragraph_with_indentation, paragraph_with_no_marks, placeholder, rule, status, strike, strong, subsup, table, tableCell, tableHeader, tableRow, taskItem, taskList, text, textColor, text_code_inline, text_formatted, text_link_inline, underline, syncBlock, bodiedSyncBlock } from '@atlaskit/adf-schema/schema-validator';
|
|
2
|
+
export { alignment, annotation, backgroundColor, blockCard, block_content, blockRootOnly, blockquote, blockTaskItem, bodiedExtension, bodiedExtension_with_marks, border, breakout, bulletList, caption, code, codeBlock, codeBlock_root_only, codeBlock_with_extended_attributes, codeBlock_root_only_with_extended_attributes, text_with_no_marks, confluenceInlineComment, dataConsumer, date, decisionItem, decisionList, doc, em, embedCard, emoji, expand, expand_root_only, extension, extensionFrame, extension_with_marks, fontSize, fragment, hardBreak, heading, heading_with_alignment, heading_with_indentation, heading_with_no_marks, indentation, inlineCard, inlineExtension, inlineExtension_with_marks, inline_content, layoutColumn, layoutSection, layoutSection_full, layoutSection_with_single_column, link, listItem, media, mediaGroup, mediaInline, mediaSingle, mediaSingle_caption, mediaSingle_full, mention, multiBodiedExtension, nestedExpand, nestedExpand_content, nestedExpand_with_no_marks, non_nestable_block_content, orderedList, panel, paragraph, paragraph_with_alignment, paragraph_with_font_size, paragraph_with_font_size_and_alignment, paragraph_with_font_size_and_indentation, paragraph_with_indentation, paragraph_with_no_marks, placeholder, rule, status, strike, strong, subsup, table, tableCell, tableHeader, tableRow, taskItem, taskList, text, textColor, text_code_inline, text_formatted, text_link_inline, underline, syncBlock, bodiedSyncBlock } from '@atlaskit/adf-schema/schema-validator';
|
|
@@ -14,6 +14,7 @@ import * as specs from './specs';
|
|
|
14
14
|
import { copy, isBoolean, isDefined, isInteger, isNumber, isPlainObject, isString, makeArray } from './utils';
|
|
15
15
|
import { extractAllowedContent } from './extractAllowedContent';
|
|
16
16
|
import { validatorFnMap } from './rules';
|
|
17
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
17
18
|
|
|
18
19
|
// Ignored via go/ees005
|
|
19
20
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -346,7 +347,11 @@ var unsupportedNodeAttributesContent = function unsupportedNodeAttributesContent
|
|
|
346
347
|
* under the base spec must also be valid under the variant.
|
|
347
348
|
*/
|
|
348
349
|
var getVariantSpecOverrides = function getVariantSpecOverrides() {
|
|
349
|
-
|
|
350
|
+
var overrides = {};
|
|
351
|
+
if (expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true)) {
|
|
352
|
+
overrides.codeBlock = 'codeBlock_with_extended_attributes';
|
|
353
|
+
}
|
|
354
|
+
return overrides;
|
|
350
355
|
};
|
|
351
356
|
|
|
352
357
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { alignment, annotation, backgroundColor, blockCard, block_content, blockRootOnly, blockquote, blockTaskItem, bodiedExtension, bodiedExtension_with_marks, border, breakout, bulletList, caption, code, codeBlock, codeBlock_root_only, text_with_no_marks, confluenceInlineComment, dataConsumer, date, decisionItem, decisionList, doc, em, embedCard, emoji, expand, expand_root_only, extension, extensionFrame, extension_with_marks, fontSize, fragment, hardBreak, heading, heading_with_alignment, heading_with_indentation, heading_with_no_marks, indentation, inlineCard, inlineExtension, inlineExtension_with_marks, inline_content, layoutColumn, layoutSection, layoutSection_full, layoutSection_with_single_column, link, listItem, media, mediaGroup, mediaInline, mediaSingle, mediaSingle_caption, mediaSingle_full, mention, multiBodiedExtension, nestedExpand, nestedExpand_content, nestedExpand_with_no_marks, non_nestable_block_content, orderedList, panel, paragraph, paragraph_with_alignment, paragraph_with_font_size, paragraph_with_font_size_and_alignment, paragraph_with_font_size_and_indentation, paragraph_with_indentation, paragraph_with_no_marks, placeholder, rule, status, strike, strong, subsup, table, tableCell, tableHeader, tableRow, taskItem, taskList, text, textColor, text_code_inline, text_formatted, text_link_inline, underline, syncBlock, bodiedSyncBlock, } from '@atlaskit/adf-schema/schema-validator';
|
|
1
|
+
export { alignment, annotation, backgroundColor, blockCard, block_content, blockRootOnly, blockquote, blockTaskItem, bodiedExtension, bodiedExtension_with_marks, border, breakout, bulletList, caption, code, codeBlock, codeBlock_root_only, codeBlock_with_extended_attributes, codeBlock_root_only_with_extended_attributes, text_with_no_marks, confluenceInlineComment, dataConsumer, date, decisionItem, decisionList, doc, em, embedCard, emoji, expand, expand_root_only, extension, extensionFrame, extension_with_marks, fontSize, fragment, hardBreak, heading, heading_with_alignment, heading_with_indentation, heading_with_no_marks, indentation, inlineCard, inlineExtension, inlineExtension_with_marks, inline_content, layoutColumn, layoutSection, layoutSection_full, layoutSection_with_single_column, link, listItem, media, mediaGroup, mediaInline, mediaSingle, mediaSingle_caption, mediaSingle_full, mention, multiBodiedExtension, nestedExpand, nestedExpand_content, nestedExpand_with_no_marks, non_nestable_block_content, orderedList, panel, paragraph, paragraph_with_alignment, paragraph_with_font_size, paragraph_with_font_size_and_alignment, paragraph_with_font_size_and_indentation, paragraph_with_indentation, paragraph_with_no_marks, placeholder, rule, status, strike, strong, subsup, table, tableCell, tableHeader, tableRow, taskItem, taskList, text, textColor, text_code_inline, text_formatted, text_link_inline, underline, syncBlock, bodiedSyncBlock, } from '@atlaskit/adf-schema/schema-validator';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { alignment, annotation, backgroundColor, blockCard, block_content, blockRootOnly, blockquote, blockTaskItem, bodiedExtension, bodiedExtension_with_marks, border, breakout, bulletList, caption, code, codeBlock, codeBlock_root_only, text_with_no_marks, confluenceInlineComment, dataConsumer, date, decisionItem, decisionList, doc, em, embedCard, emoji, expand, expand_root_only, extension, extensionFrame, extension_with_marks, fontSize, fragment, hardBreak, heading, heading_with_alignment, heading_with_indentation, heading_with_no_marks, indentation, inlineCard, inlineExtension, inlineExtension_with_marks, inline_content, layoutColumn, layoutSection, layoutSection_full, layoutSection_with_single_column, link, listItem, media, mediaGroup, mediaInline, mediaSingle, mediaSingle_caption, mediaSingle_full, mention, multiBodiedExtension, nestedExpand, nestedExpand_content, nestedExpand_with_no_marks, non_nestable_block_content, orderedList, panel, paragraph, paragraph_with_alignment, paragraph_with_font_size, paragraph_with_font_size_and_alignment, paragraph_with_font_size_and_indentation, paragraph_with_indentation, paragraph_with_no_marks, placeholder, rule, status, strike, strong, subsup, table, tableCell, tableHeader, tableRow, taskItem, taskList, text, textColor, text_code_inline, text_formatted, text_link_inline, underline, syncBlock, bodiedSyncBlock, } from '@atlaskit/adf-schema/schema-validator';
|
|
1
|
+
export { alignment, annotation, backgroundColor, blockCard, block_content, blockRootOnly, blockquote, blockTaskItem, bodiedExtension, bodiedExtension_with_marks, border, breakout, bulletList, caption, code, codeBlock, codeBlock_root_only, codeBlock_with_extended_attributes, codeBlock_root_only_with_extended_attributes, text_with_no_marks, confluenceInlineComment, dataConsumer, date, decisionItem, decisionList, doc, em, embedCard, emoji, expand, expand_root_only, extension, extensionFrame, extension_with_marks, fontSize, fragment, hardBreak, heading, heading_with_alignment, heading_with_indentation, heading_with_no_marks, indentation, inlineCard, inlineExtension, inlineExtension_with_marks, inline_content, layoutColumn, layoutSection, layoutSection_full, layoutSection_with_single_column, link, listItem, media, mediaGroup, mediaInline, mediaSingle, mediaSingle_caption, mediaSingle_full, mention, multiBodiedExtension, nestedExpand, nestedExpand_content, nestedExpand_with_no_marks, non_nestable_block_content, orderedList, panel, paragraph, paragraph_with_alignment, paragraph_with_font_size, paragraph_with_font_size_and_alignment, paragraph_with_font_size_and_indentation, paragraph_with_indentation, paragraph_with_no_marks, placeholder, rule, status, strike, strong, subsup, table, tableCell, tableHeader, tableRow, taskItem, taskList, text, textColor, text_code_inline, text_formatted, text_link_inline, underline, syncBlock, bodiedSyncBlock, } from '@atlaskit/adf-schema/schema-validator';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/adf-utils",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.29.0",
|
|
4
4
|
"description": "Set of utilities to traverse, modify and create ADF documents.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -26,8 +26,9 @@
|
|
|
26
26
|
"team": "Editor: Collaboration"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@atlaskit/adf-schema": "^52.
|
|
29
|
+
"@atlaskit/adf-schema": "^52.8.0",
|
|
30
30
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
31
|
+
"@atlaskit/tmp-editor-statsig": "^74.7.0",
|
|
31
32
|
"@babel/runtime": "^7.0.0"
|
|
32
33
|
},
|
|
33
34
|
"devDependencies": {
|