@atlaskit/editor-plugin-list 8.2.8 → 8.2.10
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/pm-plugins/main.js +22 -0
- package/dist/es2019/pm-plugins/main.js +23 -0
- package/dist/esm/pm-plugins/main.js +22 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-list
|
|
2
2
|
|
|
3
|
+
## 8.2.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`4d676bbdb3ce6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4d676bbdb3ce6) -
|
|
8
|
+
ts-ignore added temporarily to unblock local consumption for help-center, will be removed once
|
|
9
|
+
project refs are setup
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 8.2.9
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [`a05464ea42678`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a05464ea42678) -
|
|
17
|
+
EDITOR-2791 bump adf-schema
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 8.2.8
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -34,6 +34,9 @@ var computeListDecorations = exports.computeListDecorations = function computeLi
|
|
|
34
34
|
|
|
35
35
|
// this stack keeps track of each (nested) list to calculate the indentation level
|
|
36
36
|
var processedListsStack = [];
|
|
37
|
+
|
|
38
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
39
|
+
|
|
37
40
|
doc.nodesBetween(from, to, function (node, currentNodeStartPos) {
|
|
38
41
|
if (processedListsStack.length > 0) {
|
|
39
42
|
var isOutsideLastList = true;
|
|
@@ -78,13 +81,26 @@ var computeListDecorations = exports.computeListDecorations = function computeLi
|
|
|
78
81
|
return decorations;
|
|
79
82
|
};
|
|
80
83
|
var updateListDecorations = exports.updateListDecorations = function updateListDecorations(decorationSet, tr) {
|
|
84
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
85
|
+
|
|
81
86
|
var nextDecorationSet = decorationSet.map(tr.mapping, tr.doc);
|
|
87
|
+
|
|
88
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
89
|
+
|
|
82
90
|
tr.mapping.maps.forEach(function (stepMap, index) {
|
|
91
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
92
|
+
|
|
83
93
|
stepMap.forEach(function (oldStart, oldEnd) {
|
|
94
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
95
|
+
|
|
84
96
|
var start = tr.mapping.slice(index).map(oldStart, -1);
|
|
97
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
98
|
+
|
|
85
99
|
var end = tr.mapping.slice(index).map(oldEnd);
|
|
86
100
|
|
|
87
101
|
// Remove decorations in this range
|
|
102
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
103
|
+
|
|
88
104
|
var decorationsToRemove = nextDecorationSet.find(start, end);
|
|
89
105
|
nextDecorationSet = nextDecorationSet.remove(decorationsToRemove);
|
|
90
106
|
|
|
@@ -105,6 +121,9 @@ var getDecorations = exports.getDecorations = function getDecorations(doc, state
|
|
|
105
121
|
|
|
106
122
|
// this stack keeps track of each (nested) list to calculate the indentation level
|
|
107
123
|
var processedListsStack = [];
|
|
124
|
+
|
|
125
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
126
|
+
|
|
108
127
|
doc.nodesBetween(0, doc.content.size, function (node, currentNodeStartPos) {
|
|
109
128
|
if (processedListsStack.length > 0) {
|
|
110
129
|
var isOutsideLastList = true;
|
|
@@ -248,11 +267,14 @@ var createPlugin = exports.createPlugin = function createPlugin(eventDispatch, f
|
|
|
248
267
|
},
|
|
249
268
|
key: listPluginKey,
|
|
250
269
|
props: {
|
|
270
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
251
271
|
decorations: function decorations(state) {
|
|
252
272
|
var _ref = (0, _expValEquals.expValEquals)('platform_editor_new_list_decorations_logic', 'isEnabled', true) ? listPluginKey.getState(state) : getPluginState(state),
|
|
253
273
|
decorationSet = _ref.decorationSet;
|
|
254
274
|
return decorationSet;
|
|
255
275
|
},
|
|
276
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
277
|
+
|
|
256
278
|
handleClick: function handleClick(view, pos, event) {
|
|
257
279
|
var state = view.state;
|
|
258
280
|
// Ignored via go/ees005
|
|
@@ -22,6 +22,9 @@ export const computeListDecorations = (doc, from = 0, to = doc.content.size) =>
|
|
|
22
22
|
|
|
23
23
|
// this stack keeps track of each (nested) list to calculate the indentation level
|
|
24
24
|
const processedListsStack = [];
|
|
25
|
+
|
|
26
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
27
|
+
|
|
25
28
|
doc.nodesBetween(from, to, (node, currentNodeStartPos) => {
|
|
26
29
|
if (processedListsStack.length > 0) {
|
|
27
30
|
let isOutsideLastList = true;
|
|
@@ -66,13 +69,26 @@ export const computeListDecorations = (doc, from = 0, to = doc.content.size) =>
|
|
|
66
69
|
return decorations;
|
|
67
70
|
};
|
|
68
71
|
export const updateListDecorations = (decorationSet, tr) => {
|
|
72
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
73
|
+
|
|
69
74
|
let nextDecorationSet = decorationSet.map(tr.mapping, tr.doc);
|
|
75
|
+
|
|
76
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
77
|
+
|
|
70
78
|
tr.mapping.maps.forEach((stepMap, index) => {
|
|
79
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
80
|
+
|
|
71
81
|
stepMap.forEach((oldStart, oldEnd) => {
|
|
82
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
83
|
+
|
|
72
84
|
const start = tr.mapping.slice(index).map(oldStart, -1);
|
|
85
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
86
|
+
|
|
73
87
|
const end = tr.mapping.slice(index).map(oldEnd);
|
|
74
88
|
|
|
75
89
|
// Remove decorations in this range
|
|
90
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
91
|
+
|
|
76
92
|
const decorationsToRemove = nextDecorationSet.find(start, end);
|
|
77
93
|
nextDecorationSet = nextDecorationSet.remove(decorationsToRemove);
|
|
78
94
|
|
|
@@ -93,6 +109,9 @@ export const getDecorations = (doc, state, featureFlags) => {
|
|
|
93
109
|
|
|
94
110
|
// this stack keeps track of each (nested) list to calculate the indentation level
|
|
95
111
|
const processedListsStack = [];
|
|
112
|
+
|
|
113
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
114
|
+
|
|
96
115
|
doc.nodesBetween(0, doc.content.size, (node, currentNodeStartPos) => {
|
|
97
116
|
if (processedListsStack.length > 0) {
|
|
98
117
|
let isOutsideLastList = true;
|
|
@@ -239,12 +258,16 @@ export const createPlugin = (eventDispatch, featureFlags, api) => {
|
|
|
239
258
|
},
|
|
240
259
|
key: listPluginKey,
|
|
241
260
|
props: {
|
|
261
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
262
|
+
|
|
242
263
|
decorations(state) {
|
|
243
264
|
const {
|
|
244
265
|
decorationSet
|
|
245
266
|
} = expValEquals('platform_editor_new_list_decorations_logic', 'isEnabled', true) ? listPluginKey.getState(state) : getPluginState(state);
|
|
246
267
|
return decorationSet;
|
|
247
268
|
},
|
|
269
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
270
|
+
|
|
248
271
|
handleClick: (view, pos, event) => {
|
|
249
272
|
const {
|
|
250
273
|
state
|
|
@@ -27,6 +27,9 @@ export var computeListDecorations = function computeListDecorations(doc) {
|
|
|
27
27
|
|
|
28
28
|
// this stack keeps track of each (nested) list to calculate the indentation level
|
|
29
29
|
var processedListsStack = [];
|
|
30
|
+
|
|
31
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
32
|
+
|
|
30
33
|
doc.nodesBetween(from, to, function (node, currentNodeStartPos) {
|
|
31
34
|
if (processedListsStack.length > 0) {
|
|
32
35
|
var isOutsideLastList = true;
|
|
@@ -71,13 +74,26 @@ export var computeListDecorations = function computeListDecorations(doc) {
|
|
|
71
74
|
return decorations;
|
|
72
75
|
};
|
|
73
76
|
export var updateListDecorations = function updateListDecorations(decorationSet, tr) {
|
|
77
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
78
|
+
|
|
74
79
|
var nextDecorationSet = decorationSet.map(tr.mapping, tr.doc);
|
|
80
|
+
|
|
81
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
82
|
+
|
|
75
83
|
tr.mapping.maps.forEach(function (stepMap, index) {
|
|
84
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
85
|
+
|
|
76
86
|
stepMap.forEach(function (oldStart, oldEnd) {
|
|
87
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
88
|
+
|
|
77
89
|
var start = tr.mapping.slice(index).map(oldStart, -1);
|
|
90
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
91
|
+
|
|
78
92
|
var end = tr.mapping.slice(index).map(oldEnd);
|
|
79
93
|
|
|
80
94
|
// Remove decorations in this range
|
|
95
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
96
|
+
|
|
81
97
|
var decorationsToRemove = nextDecorationSet.find(start, end);
|
|
82
98
|
nextDecorationSet = nextDecorationSet.remove(decorationsToRemove);
|
|
83
99
|
|
|
@@ -98,6 +114,9 @@ export var getDecorations = function getDecorations(doc, state, featureFlags) {
|
|
|
98
114
|
|
|
99
115
|
// this stack keeps track of each (nested) list to calculate the indentation level
|
|
100
116
|
var processedListsStack = [];
|
|
117
|
+
|
|
118
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
119
|
+
|
|
101
120
|
doc.nodesBetween(0, doc.content.size, function (node, currentNodeStartPos) {
|
|
102
121
|
if (processedListsStack.length > 0) {
|
|
103
122
|
var isOutsideLastList = true;
|
|
@@ -241,11 +260,14 @@ export var createPlugin = function createPlugin(eventDispatch, featureFlags, api
|
|
|
241
260
|
},
|
|
242
261
|
key: listPluginKey,
|
|
243
262
|
props: {
|
|
263
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
244
264
|
decorations: function decorations(state) {
|
|
245
265
|
var _ref = expValEquals('platform_editor_new_list_decorations_logic', 'isEnabled', true) ? listPluginKey.getState(state) : getPluginState(state),
|
|
246
266
|
decorationSet = _ref.decorationSet;
|
|
247
267
|
return decorationSet;
|
|
248
268
|
},
|
|
269
|
+
// @ts-ignore - Workaround for help-center local consumption
|
|
270
|
+
|
|
249
271
|
handleClick: function handleClick(view, pos, event) {
|
|
250
272
|
var state = view.state;
|
|
251
273
|
// Ignored via go/ees005
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-list",
|
|
3
|
-
"version": "8.2.
|
|
3
|
+
"version": "8.2.10",
|
|
4
4
|
"description": "List plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"sideEffects": false,
|
|
28
28
|
"atlaskit:src": "src/index.ts",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@atlaskit/adf-schema": "^51.
|
|
30
|
+
"@atlaskit/adf-schema": "^51.4.0",
|
|
31
31
|
"@atlaskit/editor-plugin-analytics": "^6.2.0",
|
|
32
32
|
"@atlaskit/editor-plugin-block-menu": "^5.0.0",
|
|
33
33
|
"@atlaskit/editor-plugin-feature-flags": "^5.0.0",
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
40
40
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
41
41
|
"@atlaskit/prosemirror-input-rules": "^3.6.0",
|
|
42
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
42
|
+
"@atlaskit/tmp-editor-statsig": "^13.42.0",
|
|
43
43
|
"@babel/runtime": "^7.0.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"@atlaskit/editor-common": "^110.
|
|
46
|
+
"@atlaskit/editor-common": "^110.34.0",
|
|
47
47
|
"react": "^18.2.0",
|
|
48
48
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
49
49
|
},
|