@atlaskit/editor-plugin-type-ahead 12.1.11 → 12.1.12
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,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-type-ahead
|
|
2
2
|
|
|
3
|
+
## 12.1.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`c2986ab2c7a01`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c2986ab2c7a01) -
|
|
8
|
+
Cleans up prefer static regex violations and enables e18e rule
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 12.1.11
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -18,6 +18,9 @@ var _decorations = require("./decorations");
|
|
|
18
18
|
var _isInsertionTransaction = require("./isInsertionTransaction");
|
|
19
19
|
var _key = require("./key");
|
|
20
20
|
var _reducer = require("./reducer");
|
|
21
|
+
// Ignored via go/ees005
|
|
22
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
23
|
+
var ASCII_CHAR_REGEX = /^[\x00-\x7F]$/;
|
|
21
24
|
var hasValidTypeAheadStep = function hasValidTypeAheadStep(tr) {
|
|
22
25
|
var steps = tr.steps.filter(function (step) {
|
|
23
26
|
return step instanceof _steps.InsertTypeAheadStep;
|
|
@@ -154,9 +157,7 @@ function createPlugin(_ref) {
|
|
|
154
157
|
// data='/') would cause the Enter-confirm to open the typeahead.
|
|
155
158
|
// Matches any single ASCII character (U+0000–U+007F).
|
|
156
159
|
// No 'u' flag needed for ASCII-only ranges.
|
|
157
|
-
|
|
158
|
-
// eslint-disable-next-line require-unicode-regexp
|
|
159
|
-
if (/^[\x00-\x7F]$/.test(pendingData)) {
|
|
160
|
+
if (ASCII_CHAR_REGEX.test(pendingData)) {
|
|
160
161
|
return false;
|
|
161
162
|
}
|
|
162
163
|
var pattern = new RegExp("^(".concat(handler.customRegex, ")$"), 'u');
|
|
@@ -12,6 +12,10 @@ import { factoryDecorations } from './decorations';
|
|
|
12
12
|
import { isInsertionTransaction } from './isInsertionTransaction';
|
|
13
13
|
import { pluginKey } from './key';
|
|
14
14
|
import { createReducer } from './reducer';
|
|
15
|
+
|
|
16
|
+
// Ignored via go/ees005
|
|
17
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
18
|
+
const ASCII_CHAR_REGEX = /^[\x00-\x7F]$/;
|
|
15
19
|
const hasValidTypeAheadStep = tr => {
|
|
16
20
|
const steps = tr.steps.filter(step => step instanceof InsertTypeAheadStep);
|
|
17
21
|
|
|
@@ -148,9 +152,7 @@ export function createPlugin({
|
|
|
148
152
|
// data='/') would cause the Enter-confirm to open the typeahead.
|
|
149
153
|
// Matches any single ASCII character (U+0000–U+007F).
|
|
150
154
|
// No 'u' flag needed for ASCII-only ranges.
|
|
151
|
-
|
|
152
|
-
// eslint-disable-next-line require-unicode-regexp
|
|
153
|
-
if (/^[\x00-\x7F]$/.test(pendingData)) {
|
|
155
|
+
if (ASCII_CHAR_REGEX.test(pendingData)) {
|
|
154
156
|
return false;
|
|
155
157
|
}
|
|
156
158
|
const pattern = new RegExp(`^(${handler.customRegex})$`, 'u');
|
|
@@ -12,6 +12,10 @@ import { factoryDecorations } from './decorations';
|
|
|
12
12
|
import { isInsertionTransaction } from './isInsertionTransaction';
|
|
13
13
|
import { pluginKey } from './key';
|
|
14
14
|
import { createReducer } from './reducer';
|
|
15
|
+
|
|
16
|
+
// Ignored via go/ees005
|
|
17
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
18
|
+
var ASCII_CHAR_REGEX = /^[\x00-\x7F]$/;
|
|
15
19
|
var hasValidTypeAheadStep = function hasValidTypeAheadStep(tr) {
|
|
16
20
|
var steps = tr.steps.filter(function (step) {
|
|
17
21
|
return step instanceof InsertTypeAheadStep;
|
|
@@ -148,9 +152,7 @@ export function createPlugin(_ref) {
|
|
|
148
152
|
// data='/') would cause the Enter-confirm to open the typeahead.
|
|
149
153
|
// Matches any single ASCII character (U+0000–U+007F).
|
|
150
154
|
// No 'u' flag needed for ASCII-only ranges.
|
|
151
|
-
|
|
152
|
-
// eslint-disable-next-line require-unicode-regexp
|
|
153
|
-
if (/^[\x00-\x7F]$/.test(pendingData)) {
|
|
155
|
+
if (ASCII_CHAR_REGEX.test(pendingData)) {
|
|
154
156
|
return false;
|
|
155
157
|
}
|
|
156
158
|
var pattern = new RegExp("^(".concat(handler.customRegex, ")$"), 'u');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-type-ahead",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.12",
|
|
4
4
|
"description": "Type-ahead plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@atlaskit/primitives": "^20.3.0",
|
|
37
37
|
"@atlaskit/prosemirror-history": "^1.0.0",
|
|
38
38
|
"@atlaskit/prosemirror-input-rules": "^4.0.0",
|
|
39
|
-
"@atlaskit/tmp-editor-statsig": "^120.
|
|
39
|
+
"@atlaskit/tmp-editor-statsig": "^120.1.0",
|
|
40
40
|
"@atlaskit/tokens": "^15.3.0",
|
|
41
41
|
"@atlaskit/visually-hidden": "^4.1.0",
|
|
42
42
|
"@babel/runtime": "^7.0.0",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"w3c-keyname": "^2.1.8"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@atlaskit/editor-common": "^116.
|
|
51
|
+
"@atlaskit/editor-common": "^116.21.0",
|
|
52
52
|
"react": "^18.2.0",
|
|
53
53
|
"react-dom": "^18.2.0",
|
|
54
54
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|