@atlaskit/editor-plugin-limited-mode 3.1.1 → 3.1.2
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/limitedModePlugin.js +1 -0
- package/dist/cjs/pm-plugins/main.js +3 -0
- package/dist/es2019/limitedModePlugin.js +1 -0
- package/dist/es2019/pm-plugins/main.js +3 -0
- package/dist/esm/limitedModePlugin.js +1 -0
- package/dist/esm/pm-plugins/main.js +3 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -54,6 +54,7 @@ var limitedModePlugin = exports.limitedModePlugin = function limitedModePlugin(_
|
|
|
54
54
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
55
55
|
}, [options.contentId]);
|
|
56
56
|
var checkAndShowFlag = (0, _react.useCallback)(function (isLimitedModeEnabled) {
|
|
57
|
+
// @ts-expect-error - true is not allowed as a default value
|
|
57
58
|
if (!((0, _expVal.expVal)('cc_editor_limited_mode', 'flagEnabled', true) === true)) {
|
|
58
59
|
// Disable the flag behavior entirely if the flag is off
|
|
59
60
|
return;
|
|
@@ -23,6 +23,7 @@ var createPlugin = exports.createPlugin = function createPlugin() {
|
|
|
23
23
|
state: {
|
|
24
24
|
// @ts-ignore - Workaround for help-center local consumption
|
|
25
25
|
init: function init(config, editorState) {
|
|
26
|
+
// @ts-expect-error - true is not allowed as a default value
|
|
26
27
|
if ((0, _expVal.expVal)('cc_editor_limited_mode_include_lcm', 'isEnabled', true)) {
|
|
27
28
|
// calculates the size of the doc, where when there are legacy content macros, the content
|
|
28
29
|
// is stored in the attrs.
|
|
@@ -59,6 +60,8 @@ var createPlugin = exports.createPlugin = function createPlugin() {
|
|
|
59
60
|
if (currentPluginState.documentSizeBreachesThreshold && !tr.getMeta('replaceDocument')) {
|
|
60
61
|
return currentPluginState;
|
|
61
62
|
}
|
|
63
|
+
|
|
64
|
+
// @ts-expect-error - true is not allowed as a default value
|
|
62
65
|
if ((0, _expVal.expVal)('cc_editor_limited_mode_include_lcm', 'isEnabled', true)) {
|
|
63
66
|
// calculates the size of the doc, where when there are legacy content macros, the content
|
|
64
67
|
// is stored in the attrs.
|
|
@@ -48,6 +48,7 @@ export const limitedModePlugin = ({
|
|
|
48
48
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
49
49
|
}, [options.contentId]);
|
|
50
50
|
const checkAndShowFlag = useCallback(isLimitedModeEnabled => {
|
|
51
|
+
// @ts-expect-error - true is not allowed as a default value
|
|
51
52
|
if (!(expVal('cc_editor_limited_mode', 'flagEnabled', true) === true)) {
|
|
52
53
|
// Disable the flag behavior entirely if the flag is off
|
|
53
54
|
return;
|
|
@@ -14,6 +14,7 @@ export const createPlugin = () => {
|
|
|
14
14
|
// @ts-ignore - Workaround for help-center local consumption
|
|
15
15
|
|
|
16
16
|
init(config, editorState) {
|
|
17
|
+
// @ts-expect-error - true is not allowed as a default value
|
|
17
18
|
if (expVal('cc_editor_limited_mode_include_lcm', 'isEnabled', true)) {
|
|
18
19
|
// calculates the size of the doc, where when there are legacy content macros, the content
|
|
19
20
|
// is stored in the attrs.
|
|
@@ -50,6 +51,8 @@ export const createPlugin = () => {
|
|
|
50
51
|
if (currentPluginState.documentSizeBreachesThreshold && !tr.getMeta('replaceDocument')) {
|
|
51
52
|
return currentPluginState;
|
|
52
53
|
}
|
|
54
|
+
|
|
55
|
+
// @ts-expect-error - true is not allowed as a default value
|
|
53
56
|
if (expVal('cc_editor_limited_mode_include_lcm', 'isEnabled', true)) {
|
|
54
57
|
// calculates the size of the doc, where when there are legacy content macros, the content
|
|
55
58
|
// is stored in the attrs.
|
|
@@ -46,6 +46,7 @@ export var limitedModePlugin = function limitedModePlugin(_ref) {
|
|
|
46
46
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
47
47
|
}, [options.contentId]);
|
|
48
48
|
var checkAndShowFlag = useCallback(function (isLimitedModeEnabled) {
|
|
49
|
+
// @ts-expect-error - true is not allowed as a default value
|
|
49
50
|
if (!(expVal('cc_editor_limited_mode', 'flagEnabled', true) === true)) {
|
|
50
51
|
// Disable the flag behavior entirely if the flag is off
|
|
51
52
|
return;
|
|
@@ -16,6 +16,7 @@ export var createPlugin = function createPlugin() {
|
|
|
16
16
|
state: {
|
|
17
17
|
// @ts-ignore - Workaround for help-center local consumption
|
|
18
18
|
init: function init(config, editorState) {
|
|
19
|
+
// @ts-expect-error - true is not allowed as a default value
|
|
19
20
|
if (expVal('cc_editor_limited_mode_include_lcm', 'isEnabled', true)) {
|
|
20
21
|
// calculates the size of the doc, where when there are legacy content macros, the content
|
|
21
22
|
// is stored in the attrs.
|
|
@@ -52,6 +53,8 @@ export var createPlugin = function createPlugin() {
|
|
|
52
53
|
if (currentPluginState.documentSizeBreachesThreshold && !tr.getMeta('replaceDocument')) {
|
|
53
54
|
return currentPluginState;
|
|
54
55
|
}
|
|
56
|
+
|
|
57
|
+
// @ts-expect-error - true is not allowed as a default value
|
|
55
58
|
if (expVal('cc_editor_limited_mode_include_lcm', 'isEnabled', true)) {
|
|
56
59
|
// calculates the size of the doc, where when there are legacy content macros, the content
|
|
57
60
|
// is stored in the attrs.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-limited-mode",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.2",
|
|
4
4
|
"description": "LimitedMode plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
"atlaskit:src": "src/index.ts",
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
32
|
-
"@atlaskit/primitives": "^16.
|
|
33
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
32
|
+
"@atlaskit/primitives": "^16.4.0",
|
|
33
|
+
"@atlaskit/tmp-editor-statsig": "^14.0.0",
|
|
34
34
|
"@babel/runtime": "^7.0.0",
|
|
35
35
|
"bind-event-listener": "^3.0.0",
|
|
36
36
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"@atlaskit/editor-common": "^110.
|
|
39
|
+
"@atlaskit/editor-common": "^110.36.0",
|
|
40
40
|
"react": "^18.2.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|