@atlaskit/editor-jira-transformer 24.0.0 → 25.0.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 +17 -0
- package/dist/cjs/index.js +14 -8
- package/dist/cjs/utils.js +24 -15
- package/dist/es2019/index.js +7 -1
- package/dist/es2019/utils.js +11 -2
- package/dist/esm/index.js +7 -1
- package/dist/esm/utils.js +11 -2
- package/package.json +8 -19
- package/report.api.md +0 -80
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-jira-transformer
|
|
2
2
|
|
|
3
|
+
## 25.0.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 24.1.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`bd2c5b0112185`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bd2c5b0112185) -
|
|
14
|
+
Remove stale API report artifacts from published Platform packages.
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 24.0.0
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -11,7 +11,13 @@ var _model = require("@atlaskit/editor-prosemirror/model");
|
|
|
11
11
|
var _parseHtml = _interopRequireDefault(require("./parse-html"));
|
|
12
12
|
var _fixDoc = _interopRequireDefault(require("./fix-doc"));
|
|
13
13
|
var _utils = require("./utils");
|
|
14
|
-
var
|
|
14
|
+
var _isSchemaWithLists = require("@atlaskit/adf-schema/is-schema-with-lists");
|
|
15
|
+
var _isSchemaWithMentions = require("@atlaskit/adf-schema/is-schema-with-mentions");
|
|
16
|
+
var _isSchemaWithEmojis = require("@atlaskit/adf-schema/is-schema-with-emojis");
|
|
17
|
+
var _isSchemaWithCodeBlock = require("@atlaskit/adf-schema/is-schema-with-code-block");
|
|
18
|
+
var _isSchemaWithBlockQuotes = require("@atlaskit/adf-schema/is-schema-with-block-quotes");
|
|
19
|
+
var _isSchemaWithMedia = require("@atlaskit/adf-schema/is-schema-with-media");
|
|
20
|
+
var _isSchemaWithTables = require("@atlaskit/adf-schema/is-schema-with-tables");
|
|
15
21
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
16
22
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
17
23
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
@@ -156,7 +162,7 @@ var JIRATransformer = exports.JIRATransformer = /*#__PURE__*/function () {
|
|
|
156
162
|
} else if (node.type.name === hardBreak.name) {
|
|
157
163
|
return this.encodeHardBreak();
|
|
158
164
|
}
|
|
159
|
-
if ((0,
|
|
165
|
+
if ((0, _isSchemaWithLists.isSchemaWithLists)(this.schema)) {
|
|
160
166
|
if (node.type.name === bulletList.name) {
|
|
161
167
|
return this.encodeBulletList(node);
|
|
162
168
|
} else if (node.type.name === orderedList.name) {
|
|
@@ -165,19 +171,19 @@ var JIRATransformer = exports.JIRATransformer = /*#__PURE__*/function () {
|
|
|
165
171
|
return this.encodeListItem(node);
|
|
166
172
|
}
|
|
167
173
|
}
|
|
168
|
-
if ((0,
|
|
174
|
+
if ((0, _isSchemaWithMentions.isSchemaWithMentions)(this.schema) && node.type.name === mention.name) {
|
|
169
175
|
return this.encodeMention(node, this.customEncoders.mention);
|
|
170
176
|
}
|
|
171
|
-
if ((0,
|
|
177
|
+
if ((0, _isSchemaWithEmojis.isSchemaWithEmojis)(this.schema) && node.type.name === emoji.name) {
|
|
172
178
|
return this.encodeEmoji(node);
|
|
173
179
|
}
|
|
174
|
-
if ((0,
|
|
180
|
+
if ((0, _isSchemaWithCodeBlock.isSchemaWithCodeBlock)(this.schema) && node.type.name === codeBlock.name) {
|
|
175
181
|
return this.encodeCodeBlock(node);
|
|
176
182
|
}
|
|
177
|
-
if ((0,
|
|
183
|
+
if ((0, _isSchemaWithBlockQuotes.isSchemaWithBlockQuotes)(this.schema) && node.type.name === blockquote.name) {
|
|
178
184
|
return this.encodeBlockQuote(node);
|
|
179
185
|
}
|
|
180
|
-
if ((0,
|
|
186
|
+
if ((0, _isSchemaWithMedia.isSchemaWithMedia)(this.schema)) {
|
|
181
187
|
if (node.type.name === mediaGroup.name) {
|
|
182
188
|
return this.encodeMediaGroup(node);
|
|
183
189
|
} else if (node.type.name === mediaSingle.name) {
|
|
@@ -186,7 +192,7 @@ var JIRATransformer = exports.JIRATransformer = /*#__PURE__*/function () {
|
|
|
186
192
|
return this.encodeMedia(node);
|
|
187
193
|
}
|
|
188
194
|
}
|
|
189
|
-
if ((0,
|
|
195
|
+
if ((0, _isSchemaWithTables.isSchemaWithTables)(this.schema) && node.type.name === table.name) {
|
|
190
196
|
return this.encodeTable(node);
|
|
191
197
|
}
|
|
192
198
|
|
package/dist/cjs/utils.js
CHANGED
|
@@ -7,8 +7,17 @@ exports.bfsOrder = bfsOrder;
|
|
|
7
7
|
exports.convert = convert;
|
|
8
8
|
exports.ensureBlocks = ensureBlocks;
|
|
9
9
|
exports.ensureInline = void 0;
|
|
10
|
-
var
|
|
11
|
-
var
|
|
10
|
+
var _normalizeHexColor = require("@atlaskit/adf-schema/normalize-hex-color");
|
|
11
|
+
var _isSchemaWithLists = require("@atlaskit/adf-schema/is-schema-with-lists");
|
|
12
|
+
var _isSchemaWithMentions = require("@atlaskit/adf-schema/is-schema-with-mentions");
|
|
13
|
+
var _isSchemaWithLinks = require("@atlaskit/adf-schema/is-schema-with-links");
|
|
14
|
+
var _isSchemaWithAdvancedTextFormattingMarks = require("@atlaskit/adf-schema/is-schema-with-advanced-text-formatting-marks");
|
|
15
|
+
var _isSchemaWithCodeBlock = require("@atlaskit/adf-schema/is-schema-with-code-block");
|
|
16
|
+
var _isSchemaWithBlockQuotes = require("@atlaskit/adf-schema/is-schema-with-block-quotes");
|
|
17
|
+
var _isSchemaWithMedia = require("@atlaskit/adf-schema/is-schema-with-media");
|
|
18
|
+
var _isSchemaWithSubSupMark = require("@atlaskit/adf-schema/is-schema-with-sub-sup-mark");
|
|
19
|
+
var _isSchemaWithTextColor = require("@atlaskit/adf-schema/is-schema-with-text-color");
|
|
20
|
+
var _isSchemaWithTables = require("@atlaskit/adf-schema/is-schema-with-tables");
|
|
12
21
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
13
22
|
var _emojiHelper = require("./emojiHelper");
|
|
14
23
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
@@ -79,7 +88,7 @@ function convert(content, node, schema) {
|
|
|
79
88
|
switch (tag) {
|
|
80
89
|
// Marks
|
|
81
90
|
case 'DEL':
|
|
82
|
-
if (!(0,
|
|
91
|
+
if (!(0, _isSchemaWithAdvancedTextFormattingMarks.isSchemaWithAdvancedTextFormattingMarks)(schema)) {
|
|
83
92
|
return null;
|
|
84
93
|
}
|
|
85
94
|
// Ignored via go/ees005
|
|
@@ -90,7 +99,7 @@ function convert(content, node, schema) {
|
|
|
90
99
|
case 'EM':
|
|
91
100
|
return addMarks(content, [schema.marks.em.create()]);
|
|
92
101
|
case 'TT':
|
|
93
|
-
if (!(0,
|
|
102
|
+
if (!(0, _isSchemaWithAdvancedTextFormattingMarks.isSchemaWithAdvancedTextFormattingMarks)(schema)) {
|
|
94
103
|
return null;
|
|
95
104
|
}
|
|
96
105
|
// Ignored via go/ees005
|
|
@@ -98,7 +107,7 @@ function convert(content, node, schema) {
|
|
|
98
107
|
return addMarks(content, [schema.marks.code.create()]);
|
|
99
108
|
case 'SUB':
|
|
100
109
|
case 'SUP':
|
|
101
|
-
if (!(0,
|
|
110
|
+
if (!(0, _isSchemaWithSubSupMark.isSchemaWithSubSupMark)(schema)) {
|
|
102
111
|
return null;
|
|
103
112
|
}
|
|
104
113
|
var type = tag === 'SUB' ? 'sub' : 'sup';
|
|
@@ -108,16 +117,16 @@ function convert(content, node, schema) {
|
|
|
108
117
|
case 'INS':
|
|
109
118
|
return addMarks(content, [schema.marks.underline.create()]);
|
|
110
119
|
case 'FONT':
|
|
111
|
-
if (!(0,
|
|
120
|
+
if (!(0, _isSchemaWithTextColor.isSchemaWithTextColor)(schema)) {
|
|
112
121
|
return null;
|
|
113
122
|
}
|
|
114
|
-
var color = (0,
|
|
123
|
+
var color = (0, _normalizeHexColor.normalizeHexColor)(node.getAttribute('color'), '#333333');
|
|
115
124
|
return color ? addMarks(content, [schema.marks.textColor.create({
|
|
116
125
|
color: color
|
|
117
126
|
})]) : content;
|
|
118
127
|
// Nodes
|
|
119
128
|
case 'A':
|
|
120
|
-
if (node.className === 'user-hover' && (0,
|
|
129
|
+
if (node.className === 'user-hover' && (0, _isSchemaWithMentions.isSchemaWithMentions)(schema)) {
|
|
121
130
|
// Ignored via go/ees005
|
|
122
131
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
123
132
|
return schema.nodes.mention.createChecked({
|
|
@@ -125,7 +134,7 @@ function convert(content, node, schema) {
|
|
|
125
134
|
text: node.textContent
|
|
126
135
|
});
|
|
127
136
|
}
|
|
128
|
-
if (node.className.match('jira-issue-macro-key') || !content || !(0,
|
|
137
|
+
if (node.className.match('jira-issue-macro-key') || !content || !(0, _isSchemaWithLinks.isSchemaWithLinks)(schema)) {
|
|
129
138
|
return null;
|
|
130
139
|
}
|
|
131
140
|
var href = node.getAttribute('href');
|
|
@@ -166,7 +175,7 @@ function convert(content, node, schema) {
|
|
|
166
175
|
} else if (node.className.match('code-')) {
|
|
167
176
|
// Removing spans with syntax highlighting from JIRA
|
|
168
177
|
return null;
|
|
169
|
-
} else if (isMedia(node) && (0,
|
|
178
|
+
} else if (isMedia(node) && (0, _isSchemaWithMedia.isSchemaWithMedia)(schema)) {
|
|
170
179
|
var dataNode = node.querySelector('[data-media-services-id]');
|
|
171
180
|
if (dataNode && dataNode instanceof HTMLElement) {
|
|
172
181
|
var id = dataNode.getAttribute('data-media-services-id');
|
|
@@ -246,7 +255,7 @@ function convert(content, node, schema) {
|
|
|
246
255
|
if (hasNonMediaChildren && contentArray.length) {
|
|
247
256
|
fragmentArray.push(paragraph.createChecked({}, contentArray));
|
|
248
257
|
}
|
|
249
|
-
if ((0,
|
|
258
|
+
if ((0, _isSchemaWithMedia.isSchemaWithMedia)(schema) && mediaArray.length) {
|
|
250
259
|
var mediaNodeType = isMediaSingle(node.firstElementChild) ? mediaSingle : mediaGroup;
|
|
251
260
|
fragmentArray.push(mediaNodeType.createChecked({}, mediaArray));
|
|
252
261
|
}
|
|
@@ -259,7 +268,7 @@ function convert(content, node, schema) {
|
|
|
259
268
|
}
|
|
260
269
|
|
|
261
270
|
// lists
|
|
262
|
-
if ((0,
|
|
271
|
+
if ((0, _isSchemaWithLists.isSchemaWithLists)(schema)) {
|
|
263
272
|
switch (tag) {
|
|
264
273
|
case 'UL':
|
|
265
274
|
// Ignored via go/ees005
|
|
@@ -280,7 +289,7 @@ function convert(content, node, schema) {
|
|
|
280
289
|
}
|
|
281
290
|
|
|
282
291
|
// code block
|
|
283
|
-
if ((0,
|
|
292
|
+
if ((0, _isSchemaWithCodeBlock.isSchemaWithCodeBlock)(schema)) {
|
|
284
293
|
switch (tag) {
|
|
285
294
|
case 'DIV':
|
|
286
295
|
if (node.className === 'codeContent panelContent' || node.className.match('preformattedContent')) {
|
|
@@ -306,7 +315,7 @@ function convert(content, node, schema) {
|
|
|
306
315
|
return null;
|
|
307
316
|
}
|
|
308
317
|
}
|
|
309
|
-
if ((0,
|
|
318
|
+
if ((0, _isSchemaWithBlockQuotes.isSchemaWithBlockQuotes)(schema) && tag === 'BLOCKQUOTE') {
|
|
310
319
|
var blockquoteContent =
|
|
311
320
|
// Ignored via go/ees005
|
|
312
321
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -317,7 +326,7 @@ function convert(content, node, schema) {
|
|
|
317
326
|
}
|
|
318
327
|
|
|
319
328
|
// table
|
|
320
|
-
if ((0,
|
|
329
|
+
if ((0, _isSchemaWithTables.isSchemaWithTables)(schema)) {
|
|
321
330
|
switch (tag) {
|
|
322
331
|
case 'TABLE':
|
|
323
332
|
return schema.nodes.table.createChecked({}, content);
|
package/dist/es2019/index.js
CHANGED
|
@@ -2,7 +2,13 @@ import { Fragment, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
|
2
2
|
import parseHtml from './parse-html';
|
|
3
3
|
import fixDoc from './fix-doc';
|
|
4
4
|
import { bfsOrder, convert, ensureBlocks } from './utils';
|
|
5
|
-
import { isSchemaWithLists
|
|
5
|
+
import { isSchemaWithLists } from '@atlaskit/adf-schema/is-schema-with-lists';
|
|
6
|
+
import { isSchemaWithMentions } from '@atlaskit/adf-schema/is-schema-with-mentions';
|
|
7
|
+
import { isSchemaWithEmojis } from '@atlaskit/adf-schema/is-schema-with-emojis';
|
|
8
|
+
import { isSchemaWithCodeBlock } from '@atlaskit/adf-schema/is-schema-with-code-block';
|
|
9
|
+
import { isSchemaWithBlockQuotes } from '@atlaskit/adf-schema/is-schema-with-block-quotes';
|
|
10
|
+
import { isSchemaWithMedia } from '@atlaskit/adf-schema/is-schema-with-media';
|
|
11
|
+
import { isSchemaWithTables } from '@atlaskit/adf-schema/is-schema-with-tables';
|
|
6
12
|
// Ignored via go/ees005
|
|
7
13
|
// eslint-disable-next-line require-unicode-regexp
|
|
8
14
|
const FRAGMENT_HREF_REGEX = /^#/;
|
package/dist/es2019/utils.js
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
import { normalizeHexColor } from '@atlaskit/adf-schema';
|
|
2
|
-
import { isSchemaWithLists
|
|
1
|
+
import { normalizeHexColor } from '@atlaskit/adf-schema/normalize-hex-color';
|
|
2
|
+
import { isSchemaWithLists } from '@atlaskit/adf-schema/is-schema-with-lists';
|
|
3
|
+
import { isSchemaWithMentions } from '@atlaskit/adf-schema/is-schema-with-mentions';
|
|
4
|
+
import { isSchemaWithLinks } from '@atlaskit/adf-schema/is-schema-with-links';
|
|
5
|
+
import { isSchemaWithAdvancedTextFormattingMarks } from '@atlaskit/adf-schema/is-schema-with-advanced-text-formatting-marks';
|
|
6
|
+
import { isSchemaWithCodeBlock } from '@atlaskit/adf-schema/is-schema-with-code-block';
|
|
7
|
+
import { isSchemaWithBlockQuotes } from '@atlaskit/adf-schema/is-schema-with-block-quotes';
|
|
8
|
+
import { isSchemaWithMedia } from '@atlaskit/adf-schema/is-schema-with-media';
|
|
9
|
+
import { isSchemaWithSubSupMark } from '@atlaskit/adf-schema/is-schema-with-sub-sup-mark';
|
|
10
|
+
import { isSchemaWithTextColor } from '@atlaskit/adf-schema/is-schema-with-text-color';
|
|
11
|
+
import { isSchemaWithTables } from '@atlaskit/adf-schema/is-schema-with-tables';
|
|
3
12
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
4
13
|
import { mapImageToEmoji } from './emojiHelper';
|
|
5
14
|
|
package/dist/esm/index.js
CHANGED
|
@@ -7,7 +7,13 @@ import { Fragment, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
|
7
7
|
import parseHtml from './parse-html';
|
|
8
8
|
import fixDoc from './fix-doc';
|
|
9
9
|
import { bfsOrder, convert, ensureBlocks } from './utils';
|
|
10
|
-
import { isSchemaWithLists
|
|
10
|
+
import { isSchemaWithLists } from '@atlaskit/adf-schema/is-schema-with-lists';
|
|
11
|
+
import { isSchemaWithMentions } from '@atlaskit/adf-schema/is-schema-with-mentions';
|
|
12
|
+
import { isSchemaWithEmojis } from '@atlaskit/adf-schema/is-schema-with-emojis';
|
|
13
|
+
import { isSchemaWithCodeBlock } from '@atlaskit/adf-schema/is-schema-with-code-block';
|
|
14
|
+
import { isSchemaWithBlockQuotes } from '@atlaskit/adf-schema/is-schema-with-block-quotes';
|
|
15
|
+
import { isSchemaWithMedia } from '@atlaskit/adf-schema/is-schema-with-media';
|
|
16
|
+
import { isSchemaWithTables } from '@atlaskit/adf-schema/is-schema-with-tables';
|
|
11
17
|
// Ignored via go/ees005
|
|
12
18
|
// eslint-disable-next-line require-unicode-regexp
|
|
13
19
|
var FRAGMENT_HREF_REGEX = /^#/;
|
package/dist/esm/utils.js
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
2
2
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
3
3
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
4
|
-
import { normalizeHexColor } from '@atlaskit/adf-schema';
|
|
5
|
-
import { isSchemaWithLists
|
|
4
|
+
import { normalizeHexColor } from '@atlaskit/adf-schema/normalize-hex-color';
|
|
5
|
+
import { isSchemaWithLists } from '@atlaskit/adf-schema/is-schema-with-lists';
|
|
6
|
+
import { isSchemaWithMentions } from '@atlaskit/adf-schema/is-schema-with-mentions';
|
|
7
|
+
import { isSchemaWithLinks } from '@atlaskit/adf-schema/is-schema-with-links';
|
|
8
|
+
import { isSchemaWithAdvancedTextFormattingMarks } from '@atlaskit/adf-schema/is-schema-with-advanced-text-formatting-marks';
|
|
9
|
+
import { isSchemaWithCodeBlock } from '@atlaskit/adf-schema/is-schema-with-code-block';
|
|
10
|
+
import { isSchemaWithBlockQuotes } from '@atlaskit/adf-schema/is-schema-with-block-quotes';
|
|
11
|
+
import { isSchemaWithMedia } from '@atlaskit/adf-schema/is-schema-with-media';
|
|
12
|
+
import { isSchemaWithSubSupMark } from '@atlaskit/adf-schema/is-schema-with-sub-sup-mark';
|
|
13
|
+
import { isSchemaWithTextColor } from '@atlaskit/adf-schema/is-schema-with-text-color';
|
|
14
|
+
import { isSchemaWithTables } from '@atlaskit/adf-schema/is-schema-with-tables';
|
|
6
15
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
7
16
|
import { mapImageToEmoji } from './emojiHelper';
|
|
8
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-jira-transformer",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "25.0.0",
|
|
4
4
|
"description": "Editor JIRA transformer's",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -21,37 +21,26 @@
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@atlaskit/adf-schema": "^57.
|
|
24
|
+
"@atlaskit/adf-schema": "^57.4.0",
|
|
25
25
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
26
26
|
"@babel/runtime": "^7.0.0",
|
|
27
27
|
"collapse-whitespace": "^1.1.6"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@atlaskit/editor-common": "^
|
|
30
|
+
"@atlaskit/editor-common": "^121.0.0",
|
|
31
31
|
"react": "^18.2.0 || ^19.2.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@atlaskit/activity": "^1.0.1",
|
|
35
|
-
"@atlaskit/editor-core": "^
|
|
36
|
-
"@atlaskit/editor-json-transformer": "^9.
|
|
35
|
+
"@atlaskit/editor-core": "^227.0.0",
|
|
36
|
+
"@atlaskit/editor-json-transformer": "^9.8.0",
|
|
37
37
|
"@atlaskit/editor-test-helpers": "workspace:^",
|
|
38
|
-
"@atlaskit/mention": "^
|
|
39
|
-
"@atlaskit/theme": "^28.
|
|
40
|
-
"@atlaskit/tokens": "^16.
|
|
38
|
+
"@atlaskit/mention": "^28.0.0",
|
|
39
|
+
"@atlaskit/theme": "^28.2.0",
|
|
40
|
+
"@atlaskit/tokens": "^16.11.0",
|
|
41
41
|
"@atlaskit/util-data-test": "^19.1.0",
|
|
42
42
|
"@atlassian/structured-docs-types": "workspace:^",
|
|
43
43
|
"@emotion/react": "^11.7.1",
|
|
44
44
|
"react": "^19.2.0"
|
|
45
|
-
},
|
|
46
|
-
"techstack": {
|
|
47
|
-
"@repo/internal": {
|
|
48
|
-
"design-tokens": [
|
|
49
|
-
"color"
|
|
50
|
-
],
|
|
51
|
-
"deprecation": "no-deprecated-imports",
|
|
52
|
-
"styling": [
|
|
53
|
-
"emotion"
|
|
54
|
-
]
|
|
55
|
-
}
|
|
56
45
|
}
|
|
57
46
|
}
|
package/report.api.md
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
<!-- API Report Version: 2.3 -->
|
|
2
|
-
|
|
3
|
-
## API Report File for "@atlaskit/editor-jira-transformer"
|
|
4
|
-
|
|
5
|
-
> Do not edit this file. This report is auto-generated using
|
|
6
|
-
> [API Extractor](https://api-extractor.com/).
|
|
7
|
-
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
8
|
-
|
|
9
|
-
### Table of contents
|
|
10
|
-
|
|
11
|
-
- [Main Entry Types](#main-entry-types)
|
|
12
|
-
- [Peer Dependencies](#peer-dependencies)
|
|
13
|
-
|
|
14
|
-
### Main Entry Types
|
|
15
|
-
|
|
16
|
-
<!--SECTION START: Main Entry Types-->
|
|
17
|
-
|
|
18
|
-
```ts
|
|
19
|
-
import { Node as Node_2 } from '@atlaskit/editor-prosemirror/model';
|
|
20
|
-
import { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
21
|
-
import { Transformer as Transformer_2 } from '@atlaskit/editor-common/types';
|
|
22
|
-
|
|
23
|
-
// @public (undocumented)
|
|
24
|
-
export interface ContextInfo {
|
|
25
|
-
// (undocumented)
|
|
26
|
-
baseUrl: string;
|
|
27
|
-
// (undocumented)
|
|
28
|
-
clientId: string;
|
|
29
|
-
// (undocumented)
|
|
30
|
-
collection: string;
|
|
31
|
-
// (undocumented)
|
|
32
|
-
token: string;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// @public (undocumented)
|
|
36
|
-
export type CustomEncoder = (userId: string) => string;
|
|
37
|
-
|
|
38
|
-
// @public (undocumented)
|
|
39
|
-
export interface JIRACustomEncoders {
|
|
40
|
-
// (undocumented)
|
|
41
|
-
mention?: CustomEncoder;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// @public (undocumented)
|
|
45
|
-
export class JIRATransformer implements Transformer_2<string> {
|
|
46
|
-
constructor(
|
|
47
|
-
schema: Schema,
|
|
48
|
-
customEncoders?: JIRACustomEncoders,
|
|
49
|
-
mediaContextInfo?: MediaContextInfo,
|
|
50
|
-
);
|
|
51
|
-
// (undocumented)
|
|
52
|
-
encode(node: Node_2): string;
|
|
53
|
-
// (undocumented)
|
|
54
|
-
parse(html: string): Node_2;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// @public (undocumented)
|
|
58
|
-
export interface MediaContextInfo {
|
|
59
|
-
// (undocumented)
|
|
60
|
-
uploadContext?: ContextInfo;
|
|
61
|
-
// (undocumented)
|
|
62
|
-
viewContext?: ContextInfo;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
// (No @packageDocumentation comment for this package)
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
<!--SECTION END: Main Entry Types-->
|
|
69
|
-
|
|
70
|
-
### Peer Dependencies
|
|
71
|
-
|
|
72
|
-
<!--SECTION START: Peer Dependencies-->
|
|
73
|
-
|
|
74
|
-
```json
|
|
75
|
-
{
|
|
76
|
-
"react": "^16.8.0"
|
|
77
|
-
}
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
<!--SECTION END: Peer Dependencies-->
|