@atlaskit/adf-utils 19.1.1 → 19.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/afm-cc/tsconfig.json +0 -3
- package/dist/cjs/builders/nodes/emoji.js +8 -1
- package/dist/cjs/validator/specs/date.js +5 -0
- package/dist/cjs/validator/specs/emoji.js +5 -0
- package/dist/cjs/validator/specs/mention.js +5 -0
- package/dist/cjs/validator/specs/paragraph.js +7 -7
- package/dist/cjs/validator/specs/status.js +5 -0
- package/dist/cjs/validator/validator.js +5 -12
- package/dist/es2019/builders/nodes/emoji.js +13 -4
- package/dist/es2019/validator/specs/date.js +5 -0
- package/dist/es2019/validator/specs/emoji.js +5 -0
- package/dist/es2019/validator/specs/mention.js +5 -0
- package/dist/es2019/validator/specs/paragraph.js +7 -7
- package/dist/es2019/validator/specs/status.js +5 -0
- package/dist/es2019/validator/validator.js +5 -14
- package/dist/esm/builders/nodes/emoji.js +8 -1
- package/dist/esm/validator/specs/date.js +5 -0
- package/dist/esm/validator/specs/emoji.js +5 -0
- package/dist/esm/validator/specs/mention.js +5 -0
- package/dist/esm/validator/specs/paragraph.js +7 -7
- package/dist/esm/validator/specs/status.js +5 -0
- package/dist/esm/validator/validator.js +5 -12
- package/dist/types/builders/nodes/emoji.d.ts +4 -2
- package/dist/types/validator/specs/date.d.ts +5 -0
- package/dist/types/validator/specs/emoji.d.ts +5 -0
- package/dist/types/validator/specs/mention.d.ts +5 -0
- package/dist/types/validator/specs/paragraph.d.ts +6 -6
- package/dist/types/validator/specs/status.d.ts +5 -0
- package/dist/types-ts4.5/builders/nodes/emoji.d.ts +4 -2
- package/dist/types-ts4.5/validator/specs/date.d.ts +5 -0
- package/dist/types-ts4.5/validator/specs/emoji.d.ts +5 -0
- package/dist/types-ts4.5/validator/specs/mention.d.ts +5 -0
- package/dist/types-ts4.5/validator/specs/paragraph.d.ts +6 -6
- package/dist/types-ts4.5/validator/specs/status.d.ts +5 -0
- package/package.json +4 -10
- package/dist/cjs/validator/custom-specs/inline-card-with-annotation.js +0 -35
- package/dist/es2019/validator/custom-specs/inline-card-with-annotation.js +0 -29
- package/dist/esm/validator/custom-specs/inline-card-with-annotation.js +0 -29
- package/dist/types/validator/custom-specs/inline-card-with-annotation.d.ts +0 -30
- package/dist/types-ts4.5/validator/custom-specs/inline-card-with-annotation.d.ts +0 -30
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/adf-utils
|
|
2
2
|
|
|
3
|
+
## 19.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#101524](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/101524)
|
|
8
|
+
[`4821570088e6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4821570088e6) -
|
|
9
|
+
ED-23362 Bump ADF schema to version 36.8.1 and add support for adf validation and transformation
|
|
10
|
+
|
|
11
|
+
## 19.2.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [#99579](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/99579)
|
|
16
|
+
[`f222af5687e9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f222af5687e9) -
|
|
17
|
+
Bump adf-schema to 36.3.0 and adf-schema-json to 1.14.0
|
|
18
|
+
|
|
3
19
|
## 19.1.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
|
@@ -4,7 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.emoji = void 0;
|
|
7
|
-
var emoji = exports.emoji = function emoji(attrs) {
|
|
7
|
+
var emoji = exports.emoji = function emoji(attrs, options) {
|
|
8
|
+
if (options !== null && options !== void 0 && options.marks) {
|
|
9
|
+
return {
|
|
10
|
+
type: 'emoji',
|
|
11
|
+
attrs: attrs,
|
|
12
|
+
marks: options === null || options === void 0 ? void 0 : options.marks
|
|
13
|
+
};
|
|
14
|
+
}
|
|
8
15
|
return {
|
|
9
16
|
type: 'emoji',
|
|
10
17
|
attrs: attrs
|
|
@@ -16,19 +16,19 @@ var _default = exports.default = {
|
|
|
16
16
|
allowUnsupportedInline: true,
|
|
17
17
|
optional: true
|
|
18
18
|
},
|
|
19
|
-
marks: {
|
|
20
|
-
type: 'array',
|
|
21
|
-
items: [],
|
|
22
|
-
optional: true
|
|
23
|
-
},
|
|
24
19
|
attrs: {
|
|
25
|
-
optional: true,
|
|
26
20
|
props: {
|
|
27
21
|
localId: {
|
|
28
22
|
type: 'string',
|
|
29
23
|
optional: true
|
|
30
24
|
}
|
|
31
|
-
}
|
|
25
|
+
},
|
|
26
|
+
optional: true
|
|
27
|
+
},
|
|
28
|
+
marks: {
|
|
29
|
+
type: 'array',
|
|
30
|
+
items: [],
|
|
31
|
+
optional: true
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
};
|
|
@@ -10,9 +10,7 @@ exports.validator = validator;
|
|
|
10
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
11
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
12
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
13
|
var specs = _interopRequireWildcard(require("./specs"));
|
|
15
|
-
var _inlineCardWithAnnotation = require("./custom-specs/inline-card-with-annotation");
|
|
16
14
|
var _utils = require("./utils");
|
|
17
15
|
var _rules = require("./rules");
|
|
18
16
|
var _excluded = ["items"];
|
|
@@ -56,18 +54,14 @@ var partitionObject = function partitionObject(obj, predicate) {
|
|
|
56
54
|
* We denormalised the spec to save bundle size.
|
|
57
55
|
*/
|
|
58
56
|
function createSpec(nodes, marks) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
_specs.inlineCard = _inlineCardWithAnnotation.inlineCardWithAnnotation;
|
|
62
|
-
}
|
|
63
|
-
return Object.keys(_specs).reduce(function (newSpecs, k) {
|
|
64
|
-
var spec = _objectSpread({}, _specs[k]);
|
|
57
|
+
return Object.keys(specs).reduce(function (newSpecs, k) {
|
|
58
|
+
var spec = _objectSpread({}, specs[k]);
|
|
65
59
|
if (spec.props) {
|
|
66
60
|
spec.props = _objectSpread({}, spec.props);
|
|
67
61
|
if (spec.props.content) {
|
|
68
62
|
// 'tableCell_content' => { type: 'array', items: [ ... ] }
|
|
69
63
|
if ((0, _utils.isString)(spec.props.content)) {
|
|
70
|
-
spec.props.content =
|
|
64
|
+
spec.props.content = specs[spec.props.content];
|
|
71
65
|
}
|
|
72
66
|
|
|
73
67
|
// ['inline', 'emoji']
|
|
@@ -95,12 +89,12 @@ function createSpec(nodes, marks) {
|
|
|
95
89
|
// ['inline'] => [['emoji', 'hr', ...]]
|
|
96
90
|
// ['media'] => [['media']]
|
|
97
91
|
.map(function (item) {
|
|
98
|
-
return (0, _utils.isString)(item) ? Array.isArray(
|
|
92
|
+
return (0, _utils.isString)(item) ? Array.isArray(specs[item]) ? specs[item] : [item] : item;
|
|
99
93
|
})
|
|
100
94
|
// [['emoji', 'hr', 'inline_code']] => [['emoji', 'hr', ['text', { marks: {} }]]]
|
|
101
95
|
.map(function (item) {
|
|
102
96
|
return item.map(function (subItem) {
|
|
103
|
-
return Array.isArray(
|
|
97
|
+
return Array.isArray(specs[subItem]) ? specs[subItem] : (0, _utils.isString)(subItem) ? subItem :
|
|
104
98
|
// Now `NoMark` produces `items: []`, should be fixed in generator
|
|
105
99
|
['text', subItem];
|
|
106
100
|
})
|
|
@@ -225,7 +219,6 @@ function validateAttrs(spec, value) {
|
|
|
225
219
|
case 'enum':
|
|
226
220
|
return (0, _utils.isString)(value) && spec.values.indexOf(value) > -1;
|
|
227
221
|
}
|
|
228
|
-
return false;
|
|
229
222
|
}
|
|
230
223
|
var errorMessageFor = function errorMessageFor(type, message) {
|
|
231
224
|
return "".concat(type, ": ").concat(message, ".");
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
export const emoji = attrs =>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export const emoji = (attrs, options) => {
|
|
2
|
+
if (options !== null && options !== void 0 && options.marks) {
|
|
3
|
+
return {
|
|
4
|
+
type: 'emoji',
|
|
5
|
+
attrs,
|
|
6
|
+
marks: options === null || options === void 0 ? void 0 : options.marks
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
return {
|
|
10
|
+
type: 'emoji',
|
|
11
|
+
attrs
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -10,19 +10,19 @@ export default {
|
|
|
10
10
|
allowUnsupportedInline: true,
|
|
11
11
|
optional: true
|
|
12
12
|
},
|
|
13
|
-
marks: {
|
|
14
|
-
type: 'array',
|
|
15
|
-
items: [],
|
|
16
|
-
optional: true
|
|
17
|
-
},
|
|
18
13
|
attrs: {
|
|
19
|
-
optional: true,
|
|
20
14
|
props: {
|
|
21
15
|
localId: {
|
|
22
16
|
type: 'string',
|
|
23
17
|
optional: true
|
|
24
18
|
}
|
|
25
|
-
}
|
|
19
|
+
},
|
|
20
|
+
optional: true
|
|
21
|
+
},
|
|
22
|
+
marks: {
|
|
23
|
+
type: 'array',
|
|
24
|
+
items: [],
|
|
25
|
+
optional: true
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
2
1
|
import * as specs from './specs';
|
|
3
|
-
import { inlineCardWithAnnotation } from './custom-specs/inline-card-with-annotation';
|
|
4
2
|
import { copy, isBoolean, isDefined, isInteger, isNumber, isPlainObject, isString, makeArray } from './utils';
|
|
5
3
|
import { validatorFnMap } from './rules';
|
|
6
4
|
function mapMarksItems(spec, fn = x => x) {
|
|
@@ -38,15 +36,9 @@ const partitionObject = (obj, predicate) => Object.keys(obj).reduce((acc, key) =
|
|
|
38
36
|
* We denormalised the spec to save bundle size.
|
|
39
37
|
*/
|
|
40
38
|
function createSpec(nodes, marks) {
|
|
41
|
-
|
|
42
|
-
...specs
|
|
43
|
-
};
|
|
44
|
-
if (!!getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
|
|
45
|
-
_specs.inlineCard = inlineCardWithAnnotation;
|
|
46
|
-
}
|
|
47
|
-
return Object.keys(_specs).reduce((newSpecs, k) => {
|
|
39
|
+
return Object.keys(specs).reduce((newSpecs, k) => {
|
|
48
40
|
const spec = {
|
|
49
|
-
...
|
|
41
|
+
...specs[k]
|
|
50
42
|
};
|
|
51
43
|
if (spec.props) {
|
|
52
44
|
spec.props = {
|
|
@@ -55,7 +47,7 @@ function createSpec(nodes, marks) {
|
|
|
55
47
|
if (spec.props.content) {
|
|
56
48
|
// 'tableCell_content' => { type: 'array', items: [ ... ] }
|
|
57
49
|
if (isString(spec.props.content)) {
|
|
58
|
-
spec.props.content =
|
|
50
|
+
spec.props.content = specs[spec.props.content];
|
|
59
51
|
}
|
|
60
52
|
|
|
61
53
|
// ['inline', 'emoji']
|
|
@@ -82,9 +74,9 @@ function createSpec(nodes, marks) {
|
|
|
82
74
|
|
|
83
75
|
// ['inline'] => [['emoji', 'hr', ...]]
|
|
84
76
|
// ['media'] => [['media']]
|
|
85
|
-
.map(item => isString(item) ? Array.isArray(
|
|
77
|
+
.map(item => isString(item) ? Array.isArray(specs[item]) ? specs[item] : [item] : item)
|
|
86
78
|
// [['emoji', 'hr', 'inline_code']] => [['emoji', 'hr', ['text', { marks: {} }]]]
|
|
87
|
-
.map(item => item.map(subItem => Array.isArray(
|
|
79
|
+
.map(item => item.map(subItem => Array.isArray(specs[subItem]) ? specs[subItem] : isString(subItem) ? subItem :
|
|
88
80
|
// Now `NoMark` produces `items: []`, should be fixed in generator
|
|
89
81
|
['text', subItem])
|
|
90
82
|
// Remove unsupported nodes & marks
|
|
@@ -189,7 +181,6 @@ export function validateAttrs(spec, value) {
|
|
|
189
181
|
case 'enum':
|
|
190
182
|
return isString(value) && spec.values.indexOf(value) > -1;
|
|
191
183
|
}
|
|
192
|
-
return false;
|
|
193
184
|
}
|
|
194
185
|
const errorMessageFor = (type, message) => `${type}: ${message}.`;
|
|
195
186
|
const getUnsupportedOptions = spec => {
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
export var emoji = function emoji(attrs) {
|
|
1
|
+
export var emoji = function emoji(attrs, options) {
|
|
2
|
+
if (options !== null && options !== void 0 && options.marks) {
|
|
3
|
+
return {
|
|
4
|
+
type: 'emoji',
|
|
5
|
+
attrs: attrs,
|
|
6
|
+
marks: options === null || options === void 0 ? void 0 : options.marks
|
|
7
|
+
};
|
|
8
|
+
}
|
|
2
9
|
return {
|
|
3
10
|
type: 'emoji',
|
|
4
11
|
attrs: attrs
|
|
@@ -10,19 +10,19 @@ export default {
|
|
|
10
10
|
allowUnsupportedInline: true,
|
|
11
11
|
optional: true
|
|
12
12
|
},
|
|
13
|
-
marks: {
|
|
14
|
-
type: 'array',
|
|
15
|
-
items: [],
|
|
16
|
-
optional: true
|
|
17
|
-
},
|
|
18
13
|
attrs: {
|
|
19
|
-
optional: true,
|
|
20
14
|
props: {
|
|
21
15
|
localId: {
|
|
22
16
|
type: 'string',
|
|
23
17
|
optional: true
|
|
24
18
|
}
|
|
25
|
-
}
|
|
19
|
+
},
|
|
20
|
+
optional: true
|
|
21
|
+
},
|
|
22
|
+
marks: {
|
|
23
|
+
type: 'array',
|
|
24
|
+
items: [],
|
|
25
|
+
optional: true
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
};
|
|
@@ -4,9 +4,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
4
4
|
var _excluded = ["items"];
|
|
5
5
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
6
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
import * as specs from './specs';
|
|
9
|
-
import { inlineCardWithAnnotation } from './custom-specs/inline-card-with-annotation';
|
|
10
8
|
import { copy, isBoolean, isDefined, isInteger, isNumber, isPlainObject, isString, makeArray } from './utils';
|
|
11
9
|
import { validatorFnMap } from './rules';
|
|
12
10
|
function mapMarksItems(spec) {
|
|
@@ -45,18 +43,14 @@ var partitionObject = function partitionObject(obj, predicate) {
|
|
|
45
43
|
* We denormalised the spec to save bundle size.
|
|
46
44
|
*/
|
|
47
45
|
function createSpec(nodes, marks) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
_specs.inlineCard = inlineCardWithAnnotation;
|
|
51
|
-
}
|
|
52
|
-
return Object.keys(_specs).reduce(function (newSpecs, k) {
|
|
53
|
-
var spec = _objectSpread({}, _specs[k]);
|
|
46
|
+
return Object.keys(specs).reduce(function (newSpecs, k) {
|
|
47
|
+
var spec = _objectSpread({}, specs[k]);
|
|
54
48
|
if (spec.props) {
|
|
55
49
|
spec.props = _objectSpread({}, spec.props);
|
|
56
50
|
if (spec.props.content) {
|
|
57
51
|
// 'tableCell_content' => { type: 'array', items: [ ... ] }
|
|
58
52
|
if (isString(spec.props.content)) {
|
|
59
|
-
spec.props.content =
|
|
53
|
+
spec.props.content = specs[spec.props.content];
|
|
60
54
|
}
|
|
61
55
|
|
|
62
56
|
// ['inline', 'emoji']
|
|
@@ -84,12 +78,12 @@ function createSpec(nodes, marks) {
|
|
|
84
78
|
// ['inline'] => [['emoji', 'hr', ...]]
|
|
85
79
|
// ['media'] => [['media']]
|
|
86
80
|
.map(function (item) {
|
|
87
|
-
return isString(item) ? Array.isArray(
|
|
81
|
+
return isString(item) ? Array.isArray(specs[item]) ? specs[item] : [item] : item;
|
|
88
82
|
})
|
|
89
83
|
// [['emoji', 'hr', 'inline_code']] => [['emoji', 'hr', ['text', { marks: {} }]]]
|
|
90
84
|
.map(function (item) {
|
|
91
85
|
return item.map(function (subItem) {
|
|
92
|
-
return Array.isArray(
|
|
86
|
+
return Array.isArray(specs[subItem]) ? specs[subItem] : isString(subItem) ? subItem :
|
|
93
87
|
// Now `NoMark` produces `items: []`, should be fixed in generator
|
|
94
88
|
['text', subItem];
|
|
95
89
|
})
|
|
@@ -214,7 +208,6 @@ export function validateAttrs(spec, value) {
|
|
|
214
208
|
case 'enum':
|
|
215
209
|
return isString(value) && spec.values.indexOf(value) > -1;
|
|
216
210
|
}
|
|
217
|
-
return false;
|
|
218
211
|
}
|
|
219
212
|
var errorMessageFor = function errorMessageFor(type, message) {
|
|
220
213
|
return "".concat(type, ": ").concat(message, ".");
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
import { EmojiDefinition, EmojiAttributes } from '@atlaskit/adf-schema';
|
|
2
|
-
export declare const emoji: (attrs: EmojiAttributes
|
|
1
|
+
import { type EmojiDefinition, type EmojiAttributes, type AnnotationMarkDefinition } from '@atlaskit/adf-schema';
|
|
2
|
+
export declare const emoji: (attrs: EmojiAttributes, options?: {
|
|
3
|
+
marks: AnnotationMarkDefinition[];
|
|
4
|
+
}) => EmojiDefinition;
|
|
@@ -10,19 +10,19 @@ declare const _default: {
|
|
|
10
10
|
allowUnsupportedInline: boolean;
|
|
11
11
|
optional: boolean;
|
|
12
12
|
};
|
|
13
|
-
marks: {
|
|
14
|
-
type: string;
|
|
15
|
-
items: never[];
|
|
16
|
-
optional: boolean;
|
|
17
|
-
};
|
|
18
13
|
attrs: {
|
|
19
|
-
optional: boolean;
|
|
20
14
|
props: {
|
|
21
15
|
localId: {
|
|
22
16
|
type: string;
|
|
23
17
|
optional: boolean;
|
|
24
18
|
};
|
|
25
19
|
};
|
|
20
|
+
optional: boolean;
|
|
21
|
+
};
|
|
22
|
+
marks: {
|
|
23
|
+
type: string;
|
|
24
|
+
items: never[];
|
|
25
|
+
optional: boolean;
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
28
|
};
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
import { EmojiDefinition, EmojiAttributes } from '@atlaskit/adf-schema';
|
|
2
|
-
export declare const emoji: (attrs: EmojiAttributes
|
|
1
|
+
import { type EmojiDefinition, type EmojiAttributes, type AnnotationMarkDefinition } from '@atlaskit/adf-schema';
|
|
2
|
+
export declare const emoji: (attrs: EmojiAttributes, options?: {
|
|
3
|
+
marks: AnnotationMarkDefinition[];
|
|
4
|
+
}) => EmojiDefinition;
|
|
@@ -10,19 +10,19 @@ declare const _default: {
|
|
|
10
10
|
allowUnsupportedInline: boolean;
|
|
11
11
|
optional: boolean;
|
|
12
12
|
};
|
|
13
|
-
marks: {
|
|
14
|
-
type: string;
|
|
15
|
-
items: never[];
|
|
16
|
-
optional: boolean;
|
|
17
|
-
};
|
|
18
13
|
attrs: {
|
|
19
|
-
optional: boolean;
|
|
20
14
|
props: {
|
|
21
15
|
localId: {
|
|
22
16
|
type: string;
|
|
23
17
|
optional: boolean;
|
|
24
18
|
};
|
|
25
19
|
};
|
|
20
|
+
optional: boolean;
|
|
21
|
+
};
|
|
22
|
+
marks: {
|
|
23
|
+
type: string;
|
|
24
|
+
items: never[];
|
|
25
|
+
optional: boolean;
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
28
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/adf-utils",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.2.1",
|
|
4
4
|
"description": "Set of utilities to traverse, modify and create ADF documents.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -41,15 +41,13 @@
|
|
|
41
41
|
"generate:spec": "rm -rf ./src/validator/specs/ && yarn json-schema-generator --outDir=./src/validator/specs/ --mode=Spec --stage=0 ./src/validator/entry.ts"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@atlaskit/adf-schema": "^36.
|
|
44
|
+
"@atlaskit/adf-schema": "^36.8.0",
|
|
45
45
|
"@atlaskit/codemod-utils": "^4.2.0",
|
|
46
|
-
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
47
46
|
"@babel/runtime": "^7.0.0"
|
|
48
47
|
},
|
|
49
48
|
"devDependencies": {
|
|
50
|
-
"@atlassian/adf-schema-json": "^1.0
|
|
49
|
+
"@atlassian/adf-schema-json": "^1.14.0",
|
|
51
50
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
52
|
-
"@atlassian/feature-flags-test-utils": "*",
|
|
53
51
|
"jscodeshift": "^0.13.0",
|
|
54
52
|
"react": "^16.8.0",
|
|
55
53
|
"typescript": "~5.4.2",
|
|
@@ -69,9 +67,5 @@
|
|
|
69
67
|
}
|
|
70
68
|
},
|
|
71
69
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1",
|
|
72
|
-
"platform-feature-flags": {
|
|
73
|
-
"platform.editor.allow-inline-comments-for-inline-nodes": {
|
|
74
|
-
"type": "boolean"
|
|
75
|
-
}
|
|
76
|
-
}
|
|
70
|
+
"platform-feature-flags": {}
|
|
77
71
|
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.inlineCardWithAnnotation = void 0;
|
|
7
|
-
// This is a custom spec we're using for inline card till the inline comments feature is fully rolled out.
|
|
8
|
-
var inlineCardWithAnnotation = exports.inlineCardWithAnnotation = {
|
|
9
|
-
props: {
|
|
10
|
-
type: {
|
|
11
|
-
type: 'enum',
|
|
12
|
-
values: ['inlineCard']
|
|
13
|
-
},
|
|
14
|
-
attrs: [{
|
|
15
|
-
props: {
|
|
16
|
-
url: {
|
|
17
|
-
type: 'string',
|
|
18
|
-
validatorFn: 'safeUrl'
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}, {
|
|
22
|
-
props: {
|
|
23
|
-
data: {
|
|
24
|
-
type: 'object'
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}],
|
|
28
|
-
marks: {
|
|
29
|
-
type: 'array',
|
|
30
|
-
items: ['annotation'],
|
|
31
|
-
optional: true
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
required: ['attrs']
|
|
35
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
// This is a custom spec we're using for inline card till the inline comments feature is fully rolled out.
|
|
2
|
-
export const inlineCardWithAnnotation = {
|
|
3
|
-
props: {
|
|
4
|
-
type: {
|
|
5
|
-
type: 'enum',
|
|
6
|
-
values: ['inlineCard']
|
|
7
|
-
},
|
|
8
|
-
attrs: [{
|
|
9
|
-
props: {
|
|
10
|
-
url: {
|
|
11
|
-
type: 'string',
|
|
12
|
-
validatorFn: 'safeUrl'
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}, {
|
|
16
|
-
props: {
|
|
17
|
-
data: {
|
|
18
|
-
type: 'object'
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}],
|
|
22
|
-
marks: {
|
|
23
|
-
type: 'array',
|
|
24
|
-
items: ['annotation'],
|
|
25
|
-
optional: true
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
required: ['attrs']
|
|
29
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
// This is a custom spec we're using for inline card till the inline comments feature is fully rolled out.
|
|
2
|
-
export var inlineCardWithAnnotation = {
|
|
3
|
-
props: {
|
|
4
|
-
type: {
|
|
5
|
-
type: 'enum',
|
|
6
|
-
values: ['inlineCard']
|
|
7
|
-
},
|
|
8
|
-
attrs: [{
|
|
9
|
-
props: {
|
|
10
|
-
url: {
|
|
11
|
-
type: 'string',
|
|
12
|
-
validatorFn: 'safeUrl'
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}, {
|
|
16
|
-
props: {
|
|
17
|
-
data: {
|
|
18
|
-
type: 'object'
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}],
|
|
22
|
-
marks: {
|
|
23
|
-
type: 'array',
|
|
24
|
-
items: ['annotation'],
|
|
25
|
-
optional: true
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
required: ['attrs']
|
|
29
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export declare const inlineCardWithAnnotation: {
|
|
2
|
-
props: {
|
|
3
|
-
type: {
|
|
4
|
-
type: string;
|
|
5
|
-
values: string[];
|
|
6
|
-
};
|
|
7
|
-
attrs: ({
|
|
8
|
-
props: {
|
|
9
|
-
url: {
|
|
10
|
-
type: string;
|
|
11
|
-
validatorFn: string;
|
|
12
|
-
};
|
|
13
|
-
data?: undefined;
|
|
14
|
-
};
|
|
15
|
-
} | {
|
|
16
|
-
props: {
|
|
17
|
-
data: {
|
|
18
|
-
type: string;
|
|
19
|
-
};
|
|
20
|
-
url?: undefined;
|
|
21
|
-
};
|
|
22
|
-
})[];
|
|
23
|
-
marks: {
|
|
24
|
-
type: string;
|
|
25
|
-
items: string[];
|
|
26
|
-
optional: boolean;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
required: string[];
|
|
30
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export declare const inlineCardWithAnnotation: {
|
|
2
|
-
props: {
|
|
3
|
-
type: {
|
|
4
|
-
type: string;
|
|
5
|
-
values: string[];
|
|
6
|
-
};
|
|
7
|
-
attrs: ({
|
|
8
|
-
props: {
|
|
9
|
-
url: {
|
|
10
|
-
type: string;
|
|
11
|
-
validatorFn: string;
|
|
12
|
-
};
|
|
13
|
-
data?: undefined;
|
|
14
|
-
};
|
|
15
|
-
} | {
|
|
16
|
-
props: {
|
|
17
|
-
data: {
|
|
18
|
-
type: string;
|
|
19
|
-
};
|
|
20
|
-
url?: undefined;
|
|
21
|
-
};
|
|
22
|
-
})[];
|
|
23
|
-
marks: {
|
|
24
|
-
type: string;
|
|
25
|
-
items: string[];
|
|
26
|
-
optional: boolean;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
required: string[];
|
|
30
|
-
};
|