@atlaskit/editor-jira-transformer 8.1.19 → 8.1.20
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 +6 -0
- package/dist/cjs/index.js +27 -16
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/index.js +27 -16
- package/dist/es2019/version.json +1 -1
- package/dist/esm/index.js +27 -16
- package/dist/esm/version.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/cjs/index.js
CHANGED
|
@@ -122,57 +122,68 @@ var JIRATransformer = /*#__PURE__*/function () {
|
|
|
122
122
|
mediaGroup = _this$schema$nodes.mediaGroup,
|
|
123
123
|
mediaSingle = _this$schema$nodes.mediaSingle,
|
|
124
124
|
media = _this$schema$nodes.media,
|
|
125
|
-
table = _this$schema$nodes.table;
|
|
125
|
+
table = _this$schema$nodes.table; // We compare node type names in this method rather than
|
|
126
|
+
// node types directly as the node comparision fails.
|
|
127
|
+
// This suggests the schema which is coming from
|
|
128
|
+
// the doc has been recreated after being passed
|
|
129
|
+
// to this transformer on setup which is somewhat
|
|
130
|
+
// unexpected.
|
|
131
|
+
// This package is internally (within editor) considered
|
|
132
|
+
// "obsolete", and we are aiming to either hand over
|
|
133
|
+
// or deprecate.
|
|
134
|
+
// This "fix" is being done to unblock an existing
|
|
135
|
+
// consumer so they can apply an unrelated security
|
|
136
|
+
// upgrade.
|
|
126
137
|
|
|
127
138
|
if (node.isText) {
|
|
128
139
|
return this.encodeText(node);
|
|
129
|
-
} else if (node.type === heading) {
|
|
140
|
+
} else if (node.type.name === heading.name) {
|
|
130
141
|
return this.encodeHeading(node);
|
|
131
|
-
} else if (node.type === rule) {
|
|
142
|
+
} else if (node.type.name === rule.name) {
|
|
132
143
|
return this.encodeHorizontalRule();
|
|
133
|
-
} else if (node.type === paragraph) {
|
|
144
|
+
} else if (node.type.name === paragraph.name) {
|
|
134
145
|
return this.encodeParagraph(node);
|
|
135
|
-
} else if (node.type === hardBreak) {
|
|
146
|
+
} else if (node.type.name === hardBreak.name) {
|
|
136
147
|
return this.encodeHardBreak();
|
|
137
148
|
}
|
|
138
149
|
|
|
139
150
|
if ((0, _adfSchema.isSchemaWithLists)(this.schema)) {
|
|
140
|
-
if (node.type === bulletList) {
|
|
151
|
+
if (node.type.name === bulletList.name) {
|
|
141
152
|
return this.encodeBulletList(node);
|
|
142
|
-
} else if (node.type === orderedList) {
|
|
153
|
+
} else if (node.type.name === orderedList.name) {
|
|
143
154
|
return this.encodeOrderedList(node);
|
|
144
|
-
} else if (node.type === listItem) {
|
|
155
|
+
} else if (node.type.name === listItem.name) {
|
|
145
156
|
return this.encodeListItem(node);
|
|
146
157
|
}
|
|
147
158
|
}
|
|
148
159
|
|
|
149
|
-
if ((0, _adfSchema.isSchemaWithMentions)(this.schema) && node.type === mention) {
|
|
160
|
+
if ((0, _adfSchema.isSchemaWithMentions)(this.schema) && node.type.name === mention.name) {
|
|
150
161
|
return this.encodeMention(node, this.customEncoders.mention);
|
|
151
162
|
}
|
|
152
163
|
|
|
153
|
-
if ((0, _adfSchema.isSchemaWithEmojis)(this.schema) && node.type === emoji) {
|
|
164
|
+
if ((0, _adfSchema.isSchemaWithEmojis)(this.schema) && node.type.name === emoji.name) {
|
|
154
165
|
return this.encodeEmoji(node);
|
|
155
166
|
}
|
|
156
167
|
|
|
157
|
-
if ((0, _adfSchema.isSchemaWithCodeBlock)(this.schema) && node.type === codeBlock) {
|
|
168
|
+
if ((0, _adfSchema.isSchemaWithCodeBlock)(this.schema) && node.type.name === codeBlock.name) {
|
|
158
169
|
return this.encodeCodeBlock(node);
|
|
159
170
|
}
|
|
160
171
|
|
|
161
|
-
if ((0, _adfSchema.isSchemaWithBlockQuotes)(this.schema) && node.type === blockquote) {
|
|
172
|
+
if ((0, _adfSchema.isSchemaWithBlockQuotes)(this.schema) && node.type.name === blockquote.name) {
|
|
162
173
|
return this.encodeBlockQuote(node);
|
|
163
174
|
}
|
|
164
175
|
|
|
165
176
|
if ((0, _adfSchema.isSchemaWithMedia)(this.schema)) {
|
|
166
|
-
if (node.type === mediaGroup) {
|
|
177
|
+
if (node.type.name === mediaGroup.name) {
|
|
167
178
|
return this.encodeMediaGroup(node);
|
|
168
|
-
} else if (node.type === mediaSingle) {
|
|
179
|
+
} else if (node.type.name === mediaSingle.name) {
|
|
169
180
|
return this.encodeMediaSingle(node);
|
|
170
|
-
} else if (node.type === media) {
|
|
181
|
+
} else if (node.type.name === media.name) {
|
|
171
182
|
return this.encodeMedia(node);
|
|
172
183
|
}
|
|
173
184
|
}
|
|
174
185
|
|
|
175
|
-
if ((0, _adfSchema.isSchemaWithTables)(this.schema) && node.type === table) {
|
|
186
|
+
if ((0, _adfSchema.isSchemaWithTables)(this.schema) && node.type.name === table.name) {
|
|
176
187
|
return this.encodeTable(node);
|
|
177
188
|
}
|
|
178
189
|
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/index.js
CHANGED
|
@@ -90,57 +90,68 @@ export class JIRATransformer {
|
|
|
90
90
|
mediaSingle,
|
|
91
91
|
media,
|
|
92
92
|
table
|
|
93
|
-
} = this.schema.nodes;
|
|
93
|
+
} = this.schema.nodes; // We compare node type names in this method rather than
|
|
94
|
+
// node types directly as the node comparision fails.
|
|
95
|
+
// This suggests the schema which is coming from
|
|
96
|
+
// the doc has been recreated after being passed
|
|
97
|
+
// to this transformer on setup which is somewhat
|
|
98
|
+
// unexpected.
|
|
99
|
+
// This package is internally (within editor) considered
|
|
100
|
+
// "obsolete", and we are aiming to either hand over
|
|
101
|
+
// or deprecate.
|
|
102
|
+
// This "fix" is being done to unblock an existing
|
|
103
|
+
// consumer so they can apply an unrelated security
|
|
104
|
+
// upgrade.
|
|
94
105
|
|
|
95
106
|
if (node.isText) {
|
|
96
107
|
return this.encodeText(node);
|
|
97
|
-
} else if (node.type === heading) {
|
|
108
|
+
} else if (node.type.name === heading.name) {
|
|
98
109
|
return this.encodeHeading(node);
|
|
99
|
-
} else if (node.type === rule) {
|
|
110
|
+
} else if (node.type.name === rule.name) {
|
|
100
111
|
return this.encodeHorizontalRule();
|
|
101
|
-
} else if (node.type === paragraph) {
|
|
112
|
+
} else if (node.type.name === paragraph.name) {
|
|
102
113
|
return this.encodeParagraph(node);
|
|
103
|
-
} else if (node.type === hardBreak) {
|
|
114
|
+
} else if (node.type.name === hardBreak.name) {
|
|
104
115
|
return this.encodeHardBreak();
|
|
105
116
|
}
|
|
106
117
|
|
|
107
118
|
if (isSchemaWithLists(this.schema)) {
|
|
108
|
-
if (node.type === bulletList) {
|
|
119
|
+
if (node.type.name === bulletList.name) {
|
|
109
120
|
return this.encodeBulletList(node);
|
|
110
|
-
} else if (node.type === orderedList) {
|
|
121
|
+
} else if (node.type.name === orderedList.name) {
|
|
111
122
|
return this.encodeOrderedList(node);
|
|
112
|
-
} else if (node.type === listItem) {
|
|
123
|
+
} else if (node.type.name === listItem.name) {
|
|
113
124
|
return this.encodeListItem(node);
|
|
114
125
|
}
|
|
115
126
|
}
|
|
116
127
|
|
|
117
|
-
if (isSchemaWithMentions(this.schema) && node.type === mention) {
|
|
128
|
+
if (isSchemaWithMentions(this.schema) && node.type.name === mention.name) {
|
|
118
129
|
return this.encodeMention(node, this.customEncoders.mention);
|
|
119
130
|
}
|
|
120
131
|
|
|
121
|
-
if (isSchemaWithEmojis(this.schema) && node.type === emoji) {
|
|
132
|
+
if (isSchemaWithEmojis(this.schema) && node.type.name === emoji.name) {
|
|
122
133
|
return this.encodeEmoji(node);
|
|
123
134
|
}
|
|
124
135
|
|
|
125
|
-
if (isSchemaWithCodeBlock(this.schema) && node.type === codeBlock) {
|
|
136
|
+
if (isSchemaWithCodeBlock(this.schema) && node.type.name === codeBlock.name) {
|
|
126
137
|
return this.encodeCodeBlock(node);
|
|
127
138
|
}
|
|
128
139
|
|
|
129
|
-
if (isSchemaWithBlockQuotes(this.schema) && node.type === blockquote) {
|
|
140
|
+
if (isSchemaWithBlockQuotes(this.schema) && node.type.name === blockquote.name) {
|
|
130
141
|
return this.encodeBlockQuote(node);
|
|
131
142
|
}
|
|
132
143
|
|
|
133
144
|
if (isSchemaWithMedia(this.schema)) {
|
|
134
|
-
if (node.type === mediaGroup) {
|
|
145
|
+
if (node.type.name === mediaGroup.name) {
|
|
135
146
|
return this.encodeMediaGroup(node);
|
|
136
|
-
} else if (node.type === mediaSingle) {
|
|
147
|
+
} else if (node.type.name === mediaSingle.name) {
|
|
137
148
|
return this.encodeMediaSingle(node);
|
|
138
|
-
} else if (node.type === media) {
|
|
149
|
+
} else if (node.type.name === media.name) {
|
|
139
150
|
return this.encodeMedia(node);
|
|
140
151
|
}
|
|
141
152
|
}
|
|
142
153
|
|
|
143
|
-
if (isSchemaWithTables(this.schema) && node.type === table) {
|
|
154
|
+
if (isSchemaWithTables(this.schema) && node.type.name === table.name) {
|
|
144
155
|
return this.encodeTable(node);
|
|
145
156
|
}
|
|
146
157
|
|
package/dist/es2019/version.json
CHANGED
package/dist/esm/index.js
CHANGED
|
@@ -107,57 +107,68 @@ export var JIRATransformer = /*#__PURE__*/function () {
|
|
|
107
107
|
mediaGroup = _this$schema$nodes.mediaGroup,
|
|
108
108
|
mediaSingle = _this$schema$nodes.mediaSingle,
|
|
109
109
|
media = _this$schema$nodes.media,
|
|
110
|
-
table = _this$schema$nodes.table;
|
|
110
|
+
table = _this$schema$nodes.table; // We compare node type names in this method rather than
|
|
111
|
+
// node types directly as the node comparision fails.
|
|
112
|
+
// This suggests the schema which is coming from
|
|
113
|
+
// the doc has been recreated after being passed
|
|
114
|
+
// to this transformer on setup which is somewhat
|
|
115
|
+
// unexpected.
|
|
116
|
+
// This package is internally (within editor) considered
|
|
117
|
+
// "obsolete", and we are aiming to either hand over
|
|
118
|
+
// or deprecate.
|
|
119
|
+
// This "fix" is being done to unblock an existing
|
|
120
|
+
// consumer so they can apply an unrelated security
|
|
121
|
+
// upgrade.
|
|
111
122
|
|
|
112
123
|
if (node.isText) {
|
|
113
124
|
return this.encodeText(node);
|
|
114
|
-
} else if (node.type === heading) {
|
|
125
|
+
} else if (node.type.name === heading.name) {
|
|
115
126
|
return this.encodeHeading(node);
|
|
116
|
-
} else if (node.type === rule) {
|
|
127
|
+
} else if (node.type.name === rule.name) {
|
|
117
128
|
return this.encodeHorizontalRule();
|
|
118
|
-
} else if (node.type === paragraph) {
|
|
129
|
+
} else if (node.type.name === paragraph.name) {
|
|
119
130
|
return this.encodeParagraph(node);
|
|
120
|
-
} else if (node.type === hardBreak) {
|
|
131
|
+
} else if (node.type.name === hardBreak.name) {
|
|
121
132
|
return this.encodeHardBreak();
|
|
122
133
|
}
|
|
123
134
|
|
|
124
135
|
if (isSchemaWithLists(this.schema)) {
|
|
125
|
-
if (node.type === bulletList) {
|
|
136
|
+
if (node.type.name === bulletList.name) {
|
|
126
137
|
return this.encodeBulletList(node);
|
|
127
|
-
} else if (node.type === orderedList) {
|
|
138
|
+
} else if (node.type.name === orderedList.name) {
|
|
128
139
|
return this.encodeOrderedList(node);
|
|
129
|
-
} else if (node.type === listItem) {
|
|
140
|
+
} else if (node.type.name === listItem.name) {
|
|
130
141
|
return this.encodeListItem(node);
|
|
131
142
|
}
|
|
132
143
|
}
|
|
133
144
|
|
|
134
|
-
if (isSchemaWithMentions(this.schema) && node.type === mention) {
|
|
145
|
+
if (isSchemaWithMentions(this.schema) && node.type.name === mention.name) {
|
|
135
146
|
return this.encodeMention(node, this.customEncoders.mention);
|
|
136
147
|
}
|
|
137
148
|
|
|
138
|
-
if (isSchemaWithEmojis(this.schema) && node.type === emoji) {
|
|
149
|
+
if (isSchemaWithEmojis(this.schema) && node.type.name === emoji.name) {
|
|
139
150
|
return this.encodeEmoji(node);
|
|
140
151
|
}
|
|
141
152
|
|
|
142
|
-
if (isSchemaWithCodeBlock(this.schema) && node.type === codeBlock) {
|
|
153
|
+
if (isSchemaWithCodeBlock(this.schema) && node.type.name === codeBlock.name) {
|
|
143
154
|
return this.encodeCodeBlock(node);
|
|
144
155
|
}
|
|
145
156
|
|
|
146
|
-
if (isSchemaWithBlockQuotes(this.schema) && node.type === blockquote) {
|
|
157
|
+
if (isSchemaWithBlockQuotes(this.schema) && node.type.name === blockquote.name) {
|
|
147
158
|
return this.encodeBlockQuote(node);
|
|
148
159
|
}
|
|
149
160
|
|
|
150
161
|
if (isSchemaWithMedia(this.schema)) {
|
|
151
|
-
if (node.type === mediaGroup) {
|
|
162
|
+
if (node.type.name === mediaGroup.name) {
|
|
152
163
|
return this.encodeMediaGroup(node);
|
|
153
|
-
} else if (node.type === mediaSingle) {
|
|
164
|
+
} else if (node.type.name === mediaSingle.name) {
|
|
154
165
|
return this.encodeMediaSingle(node);
|
|
155
|
-
} else if (node.type === media) {
|
|
166
|
+
} else if (node.type.name === media.name) {
|
|
156
167
|
return this.encodeMedia(node);
|
|
157
168
|
}
|
|
158
169
|
}
|
|
159
170
|
|
|
160
|
-
if (isSchemaWithTables(this.schema) && node.type === table) {
|
|
171
|
+
if (isSchemaWithTables(this.schema) && node.type.name === table.name) {
|
|
161
172
|
return this.encodeTable(node);
|
|
162
173
|
}
|
|
163
174
|
|
package/dist/esm/version.json
CHANGED