@atlaskit/editor-plugin-list 14.1.3 → 14.1.5
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
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-list
|
|
2
2
|
|
|
3
|
+
## 14.1.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`346f91cfe1997`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/346f91cfe1997) -
|
|
8
|
+
Clean up prefer static regex violations
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 14.1.4
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 14.1.3
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -7,6 +7,16 @@ exports.default = inputRulePlugin;
|
|
|
7
7
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
8
8
|
var _prosemirrorInputRules = require("@atlaskit/prosemirror-input-rules");
|
|
9
9
|
var _createListInputRule = require("./create-list-input-rule");
|
|
10
|
+
// Using UTF instead of • character
|
|
11
|
+
// because of issue where product converted the
|
|
12
|
+
// character into an escaped version.
|
|
13
|
+
// Ignored via go/ees005
|
|
14
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
15
|
+
var BULLET_LIST_EXPRESSION = /^\s*([\*\-\u2022]) $/;
|
|
16
|
+
|
|
17
|
+
// Ignored via go/ees005
|
|
18
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
19
|
+
var ORDERED_LIST_EXPRESSION = /((^[1-9]{1}[0-9]{0,2})|^(0))[\.\)] $/;
|
|
10
20
|
function inputRulePlugin(schema, editorAnalyticsApi) {
|
|
11
21
|
var _schema$nodes = schema.nodes,
|
|
12
22
|
bulletList = _schema$nodes.bulletList,
|
|
@@ -14,23 +24,14 @@ function inputRulePlugin(schema, editorAnalyticsApi) {
|
|
|
14
24
|
var rules = [];
|
|
15
25
|
if (bulletList) {
|
|
16
26
|
rules.push((0, _createListInputRule.createRuleForListType)({
|
|
17
|
-
|
|
18
|
-
// because of issue where product converted the
|
|
19
|
-
// character into an escaped version.
|
|
20
|
-
// Ignored via go/ees005
|
|
21
|
-
// eslint-disable-next-line require-unicode-regexp
|
|
22
|
-
expression: /^\s*([\*\-\u2022]) $/,
|
|
27
|
+
expression: BULLET_LIST_EXPRESSION,
|
|
23
28
|
listType: bulletList,
|
|
24
29
|
editorAnalyticsApi: editorAnalyticsApi
|
|
25
30
|
}));
|
|
26
31
|
}
|
|
27
|
-
|
|
28
|
-
// Ignored via go/ees005
|
|
29
|
-
// eslint-disable-next-line require-unicode-regexp
|
|
30
|
-
var expression = /((^[1-9]{1}[0-9]{0,2})|^(0))[\.\)] $/;
|
|
31
32
|
if (orderedList) {
|
|
32
33
|
rules.push((0, _createListInputRule.createRuleForListType)({
|
|
33
|
-
expression:
|
|
34
|
+
expression: ORDERED_LIST_EXPRESSION,
|
|
34
35
|
listType: orderedList,
|
|
35
36
|
editorAnalyticsApi: editorAnalyticsApi
|
|
36
37
|
}));
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { createPlugin } from '@atlaskit/prosemirror-input-rules';
|
|
3
3
|
import { createRuleForListType } from './create-list-input-rule';
|
|
4
|
+
|
|
5
|
+
// Using UTF instead of • character
|
|
6
|
+
// because of issue where product converted the
|
|
7
|
+
// character into an escaped version.
|
|
8
|
+
// Ignored via go/ees005
|
|
9
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
10
|
+
const BULLET_LIST_EXPRESSION = /^\s*([\*\-\u2022]) $/;
|
|
11
|
+
|
|
12
|
+
// Ignored via go/ees005
|
|
13
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
14
|
+
const ORDERED_LIST_EXPRESSION = /((^[1-9]{1}[0-9]{0,2})|^(0))[\.\)] $/;
|
|
4
15
|
export default function inputRulePlugin(schema, editorAnalyticsApi) {
|
|
5
16
|
const {
|
|
6
17
|
nodes: {
|
|
@@ -11,23 +22,14 @@ export default function inputRulePlugin(schema, editorAnalyticsApi) {
|
|
|
11
22
|
const rules = [];
|
|
12
23
|
if (bulletList) {
|
|
13
24
|
rules.push(createRuleForListType({
|
|
14
|
-
|
|
15
|
-
// because of issue where product converted the
|
|
16
|
-
// character into an escaped version.
|
|
17
|
-
// Ignored via go/ees005
|
|
18
|
-
// eslint-disable-next-line require-unicode-regexp
|
|
19
|
-
expression: /^\s*([\*\-\u2022]) $/,
|
|
25
|
+
expression: BULLET_LIST_EXPRESSION,
|
|
20
26
|
listType: bulletList,
|
|
21
27
|
editorAnalyticsApi
|
|
22
28
|
}));
|
|
23
29
|
}
|
|
24
|
-
|
|
25
|
-
// Ignored via go/ees005
|
|
26
|
-
// eslint-disable-next-line require-unicode-regexp
|
|
27
|
-
const expression = /((^[1-9]{1}[0-9]{0,2})|^(0))[\.\)] $/;
|
|
28
30
|
if (orderedList) {
|
|
29
31
|
rules.push(createRuleForListType({
|
|
30
|
-
expression,
|
|
32
|
+
expression: ORDERED_LIST_EXPRESSION,
|
|
31
33
|
listType: orderedList,
|
|
32
34
|
editorAnalyticsApi
|
|
33
35
|
}));
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { createPlugin } from '@atlaskit/prosemirror-input-rules';
|
|
3
3
|
import { createRuleForListType } from './create-list-input-rule';
|
|
4
|
+
|
|
5
|
+
// Using UTF instead of • character
|
|
6
|
+
// because of issue where product converted the
|
|
7
|
+
// character into an escaped version.
|
|
8
|
+
// Ignored via go/ees005
|
|
9
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
10
|
+
var BULLET_LIST_EXPRESSION = /^\s*([\*\-\u2022]) $/;
|
|
11
|
+
|
|
12
|
+
// Ignored via go/ees005
|
|
13
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
14
|
+
var ORDERED_LIST_EXPRESSION = /((^[1-9]{1}[0-9]{0,2})|^(0))[\.\)] $/;
|
|
4
15
|
export default function inputRulePlugin(schema, editorAnalyticsApi) {
|
|
5
16
|
var _schema$nodes = schema.nodes,
|
|
6
17
|
bulletList = _schema$nodes.bulletList,
|
|
@@ -8,23 +19,14 @@ export default function inputRulePlugin(schema, editorAnalyticsApi) {
|
|
|
8
19
|
var rules = [];
|
|
9
20
|
if (bulletList) {
|
|
10
21
|
rules.push(createRuleForListType({
|
|
11
|
-
|
|
12
|
-
// because of issue where product converted the
|
|
13
|
-
// character into an escaped version.
|
|
14
|
-
// Ignored via go/ees005
|
|
15
|
-
// eslint-disable-next-line require-unicode-regexp
|
|
16
|
-
expression: /^\s*([\*\-\u2022]) $/,
|
|
22
|
+
expression: BULLET_LIST_EXPRESSION,
|
|
17
23
|
listType: bulletList,
|
|
18
24
|
editorAnalyticsApi: editorAnalyticsApi
|
|
19
25
|
}));
|
|
20
26
|
}
|
|
21
|
-
|
|
22
|
-
// Ignored via go/ees005
|
|
23
|
-
// eslint-disable-next-line require-unicode-regexp
|
|
24
|
-
var expression = /((^[1-9]{1}[0-9]{0,2})|^(0))[\.\)] $/;
|
|
25
27
|
if (orderedList) {
|
|
26
28
|
rules.push(createRuleForListType({
|
|
27
|
-
expression:
|
|
29
|
+
expression: ORDERED_LIST_EXPRESSION,
|
|
28
30
|
listType: orderedList,
|
|
29
31
|
editorAnalyticsApi: editorAnalyticsApi
|
|
30
32
|
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-list",
|
|
3
|
-
"version": "14.1.
|
|
3
|
+
"version": "14.1.5",
|
|
4
4
|
"description": "List plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -25,16 +25,16 @@
|
|
|
25
25
|
"@atlaskit/editor-plugin-feature-flags": "^11.0.0",
|
|
26
26
|
"@atlaskit/editor-plugin-toolbar": "^9.0.0",
|
|
27
27
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
28
|
-
"@atlaskit/editor-toolbar": "^2.
|
|
29
|
-
"@atlaskit/icon": "^36.
|
|
28
|
+
"@atlaskit/editor-toolbar": "^2.1.0",
|
|
29
|
+
"@atlaskit/icon": "^36.1.0",
|
|
30
30
|
"@atlaskit/platform-feature-flags": "^2.0.0",
|
|
31
31
|
"@atlaskit/prosemirror-history": "^1.0.0",
|
|
32
32
|
"@atlaskit/prosemirror-input-rules": "^4.0.0",
|
|
33
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
33
|
+
"@atlaskit/tmp-editor-statsig": "^114.4.0",
|
|
34
34
|
"@babel/runtime": "^7.0.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"@atlaskit/editor-common": "^116.
|
|
37
|
+
"@atlaskit/editor-common": "^116.17.0",
|
|
38
38
|
"react": "^18.2.0",
|
|
39
39
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
40
40
|
},
|