@atlaskit/editor-plugin-expand 8.3.7 → 8.4.0
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/legacyExpand/plugin.js +7 -0
- package/dist/cjs/singlePlayerExpand/plugin.js +7 -0
- package/dist/es2019/legacyExpand/plugin.js +7 -0
- package/dist/es2019/singlePlayerExpand/plugin.js +7 -0
- package/dist/esm/legacyExpand/plugin.js +7 -0
- package/dist/esm/singlePlayerExpand/plugin.js +7 -0
- package/dist/types/types.d.ts +8 -4
- package/dist/types-ts4.5/types.d.ts +8 -4
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-expand
|
|
2
2
|
|
|
3
|
+
## 8.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`342dd44a8575e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/342dd44a8575e) -
|
|
8
|
+
[ux] EDITOR-4609 Add prop to disable pasting expands
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 8.3.8
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 8.3.7
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -12,6 +12,7 @@ var _blockMenu = require("@atlaskit/editor-common/block-menu");
|
|
|
12
12
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
13
13
|
var _quickInsert = require("@atlaskit/editor-common/quick-insert");
|
|
14
14
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
15
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
15
16
|
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
16
17
|
var _toggleExpandRange = require("../editor-commands/toggleExpandRange");
|
|
17
18
|
var _ExpandBlockMenuItem = require("../ui/ExpandBlockMenuItem");
|
|
@@ -65,6 +66,12 @@ var expandPlugin = exports.expandPlugin = function expandPlugin(_ref) {
|
|
|
65
66
|
},
|
|
66
67
|
toggleExpandRange: _toggleExpandRange.toggleExpandRange
|
|
67
68
|
},
|
|
69
|
+
getSharedState: function getSharedState() {
|
|
70
|
+
var _options$allowInserti;
|
|
71
|
+
return (0, _expValEquals.expValEquals)('platform_editor_expand_paste_in_comment_editor', 'isEnabled', true) ? {
|
|
72
|
+
allowInsertion: (_options$allowInserti = options === null || options === void 0 ? void 0 : options.allowInsertion) !== null && _options$allowInserti !== void 0 ? _options$allowInserti : true
|
|
73
|
+
} : undefined;
|
|
74
|
+
},
|
|
68
75
|
pmPlugins: function pmPlugins() {
|
|
69
76
|
return [{
|
|
70
77
|
name: 'expand',
|
|
@@ -13,6 +13,7 @@ var _messages = require("@atlaskit/editor-common/messages");
|
|
|
13
13
|
var _quickInsert = require("@atlaskit/editor-common/quick-insert");
|
|
14
14
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
15
15
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
16
17
|
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
17
18
|
var _toggleExpandRange = require("../editor-commands/toggleExpandRange");
|
|
18
19
|
var _ExpandBlockMenuItem = require("../ui/ExpandBlockMenuItem");
|
|
@@ -65,6 +66,12 @@ var expandPlugin = exports.expandPlugin = function expandPlugin(_ref) {
|
|
|
65
66
|
},
|
|
66
67
|
toggleExpandRange: _toggleExpandRange.toggleExpandRange
|
|
67
68
|
},
|
|
69
|
+
getSharedState: function getSharedState() {
|
|
70
|
+
var _options$allowInserti;
|
|
71
|
+
return (0, _expValEquals.expValEquals)('platform_editor_expand_paste_in_comment_editor', 'isEnabled', true) ? {
|
|
72
|
+
allowInsertion: (_options$allowInserti = options === null || options === void 0 ? void 0 : options.allowInsertion) !== null && _options$allowInserti !== void 0 ? _options$allowInserti : true
|
|
73
|
+
} : undefined;
|
|
74
|
+
},
|
|
68
75
|
pmPlugins: function pmPlugins() {
|
|
69
76
|
return [{
|
|
70
77
|
name: 'expand',
|
|
@@ -5,6 +5,7 @@ import { TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM, TRANSFORM_STRUCTURE_MENU_SECTION,
|
|
|
5
5
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
6
6
|
import { IconExpand } from '@atlaskit/editor-common/quick-insert';
|
|
7
7
|
import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils';
|
|
8
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
9
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
9
10
|
import { toggleExpandRange } from '../editor-commands/toggleExpandRange';
|
|
10
11
|
import { createExpandBlockMenuItem } from '../ui/ExpandBlockMenuItem';
|
|
@@ -57,6 +58,12 @@ export let expandPlugin = ({
|
|
|
57
58
|
toggleExpandWithMatch: selection => toggleExpandWithMatch(selection),
|
|
58
59
|
toggleExpandRange
|
|
59
60
|
},
|
|
61
|
+
getSharedState() {
|
|
62
|
+
var _options$allowInserti;
|
|
63
|
+
return expValEquals('platform_editor_expand_paste_in_comment_editor', 'isEnabled', true) ? {
|
|
64
|
+
allowInsertion: (_options$allowInserti = options === null || options === void 0 ? void 0 : options.allowInsertion) !== null && _options$allowInserti !== void 0 ? _options$allowInserti : true
|
|
65
|
+
} : undefined;
|
|
66
|
+
},
|
|
60
67
|
pmPlugins() {
|
|
61
68
|
return [{
|
|
62
69
|
name: 'expand',
|
|
@@ -6,6 +6,7 @@ import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/
|
|
|
6
6
|
import { IconExpand } from '@atlaskit/editor-common/quick-insert';
|
|
7
7
|
import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils';
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
10
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
10
11
|
import { toggleExpandRange } from '../editor-commands/toggleExpandRange';
|
|
11
12
|
import { createExpandBlockMenuItem } from '../ui/ExpandBlockMenuItem';
|
|
@@ -57,6 +58,12 @@ export let expandPlugin = ({
|
|
|
57
58
|
toggleExpandWithMatch: selection => toggleExpandWithMatch(selection),
|
|
58
59
|
toggleExpandRange
|
|
59
60
|
},
|
|
61
|
+
getSharedState() {
|
|
62
|
+
var _options$allowInserti;
|
|
63
|
+
return expValEquals('platform_editor_expand_paste_in_comment_editor', 'isEnabled', true) ? {
|
|
64
|
+
allowInsertion: (_options$allowInserti = options === null || options === void 0 ? void 0 : options.allowInsertion) !== null && _options$allowInserti !== void 0 ? _options$allowInserti : true
|
|
65
|
+
} : undefined;
|
|
66
|
+
},
|
|
60
67
|
pmPlugins() {
|
|
61
68
|
return [{
|
|
62
69
|
name: 'expand',
|
|
@@ -5,6 +5,7 @@ import { TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM, TRANSFORM_STRUCTURE_MENU_SECTION,
|
|
|
5
5
|
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
6
6
|
import { IconExpand } from '@atlaskit/editor-common/quick-insert';
|
|
7
7
|
import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils';
|
|
8
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
9
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
9
10
|
import { toggleExpandRange } from '../editor-commands/toggleExpandRange';
|
|
10
11
|
import { createExpandBlockMenuItem } from '../ui/ExpandBlockMenuItem';
|
|
@@ -59,6 +60,12 @@ export var expandPlugin = function expandPlugin(_ref) {
|
|
|
59
60
|
},
|
|
60
61
|
toggleExpandRange: toggleExpandRange
|
|
61
62
|
},
|
|
63
|
+
getSharedState: function getSharedState() {
|
|
64
|
+
var _options$allowInserti;
|
|
65
|
+
return expValEquals('platform_editor_expand_paste_in_comment_editor', 'isEnabled', true) ? {
|
|
66
|
+
allowInsertion: (_options$allowInserti = options === null || options === void 0 ? void 0 : options.allowInsertion) !== null && _options$allowInserti !== void 0 ? _options$allowInserti : true
|
|
67
|
+
} : undefined;
|
|
68
|
+
},
|
|
62
69
|
pmPlugins: function pmPlugins() {
|
|
63
70
|
return [{
|
|
64
71
|
name: 'expand',
|
|
@@ -6,6 +6,7 @@ import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/
|
|
|
6
6
|
import { IconExpand } from '@atlaskit/editor-common/quick-insert';
|
|
7
7
|
import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils';
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
10
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
10
11
|
import { toggleExpandRange } from '../editor-commands/toggleExpandRange';
|
|
11
12
|
import { createExpandBlockMenuItem } from '../ui/ExpandBlockMenuItem';
|
|
@@ -59,6 +60,12 @@ export var expandPlugin = function expandPlugin(_ref) {
|
|
|
59
60
|
},
|
|
60
61
|
toggleExpandRange: toggleExpandRange
|
|
61
62
|
},
|
|
63
|
+
getSharedState: function getSharedState() {
|
|
64
|
+
var _options$allowInserti;
|
|
65
|
+
return expValEquals('platform_editor_expand_paste_in_comment_editor', 'isEnabled', true) ? {
|
|
66
|
+
allowInsertion: (_options$allowInserti = options === null || options === void 0 ? void 0 : options.allowInsertion) !== null && _options$allowInserti !== void 0 ? _options$allowInserti : true
|
|
67
|
+
} : undefined;
|
|
68
|
+
},
|
|
62
69
|
pmPlugins: function pmPlugins() {
|
|
63
70
|
return [{
|
|
64
71
|
name: 'expand',
|
package/dist/types/types.d.ts
CHANGED
|
@@ -20,6 +20,9 @@ export type ExpandPluginAction = {
|
|
|
20
20
|
};
|
|
21
21
|
type: 'SET_EXPAND_REF';
|
|
22
22
|
};
|
|
23
|
+
export type ExpandPluginSharedState = {
|
|
24
|
+
allowInsertion?: boolean;
|
|
25
|
+
} | undefined;
|
|
23
26
|
export type InsertMethod = INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.INSERT_MENU;
|
|
24
27
|
export interface ExpandPluginOptions extends LongPressSelectionPluginOptions {
|
|
25
28
|
/**
|
|
@@ -64,10 +67,6 @@ export type ExpandPlugin = NextEditorPlugin<'expand', {
|
|
|
64
67
|
insertExpandWithInputMethod: ReturnType<typeof insertExpandWithInputMethod>;
|
|
65
68
|
};
|
|
66
69
|
commands: {
|
|
67
|
-
/**
|
|
68
|
-
* Toggle the expand or nested expand node open
|
|
69
|
-
*/
|
|
70
|
-
toggleExpandWithMatch: (selection: Selection) => EditorCommand;
|
|
71
70
|
/**
|
|
72
71
|
* Expand or collapse a range of expand nodes. With no parameters
|
|
73
72
|
*
|
|
@@ -96,7 +95,12 @@ export type ExpandPlugin = NextEditorPlugin<'expand', {
|
|
|
96
95
|
* ```
|
|
97
96
|
*/
|
|
98
97
|
toggleExpandRange: (from?: number, to?: number, open?: boolean) => EditorCommand;
|
|
98
|
+
/**
|
|
99
|
+
* Toggle the expand or nested expand node open
|
|
100
|
+
*/
|
|
101
|
+
toggleExpandWithMatch: (selection: Selection) => EditorCommand;
|
|
99
102
|
};
|
|
100
103
|
dependencies: ExpandPluginDependencies;
|
|
101
104
|
pluginConfiguration: ExpandPluginOptions | undefined;
|
|
105
|
+
sharedState: ExpandPluginSharedState;
|
|
102
106
|
}>;
|
|
@@ -20,6 +20,9 @@ export type ExpandPluginAction = {
|
|
|
20
20
|
};
|
|
21
21
|
type: 'SET_EXPAND_REF';
|
|
22
22
|
};
|
|
23
|
+
export type ExpandPluginSharedState = {
|
|
24
|
+
allowInsertion?: boolean;
|
|
25
|
+
} | undefined;
|
|
23
26
|
export type InsertMethod = INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.INSERT_MENU;
|
|
24
27
|
export interface ExpandPluginOptions extends LongPressSelectionPluginOptions {
|
|
25
28
|
/**
|
|
@@ -64,10 +67,6 @@ export type ExpandPlugin = NextEditorPlugin<'expand', {
|
|
|
64
67
|
insertExpandWithInputMethod: ReturnType<typeof insertExpandWithInputMethod>;
|
|
65
68
|
};
|
|
66
69
|
commands: {
|
|
67
|
-
/**
|
|
68
|
-
* Toggle the expand or nested expand node open
|
|
69
|
-
*/
|
|
70
|
-
toggleExpandWithMatch: (selection: Selection) => EditorCommand;
|
|
71
70
|
/**
|
|
72
71
|
* Expand or collapse a range of expand nodes. With no parameters
|
|
73
72
|
*
|
|
@@ -96,7 +95,12 @@ export type ExpandPlugin = NextEditorPlugin<'expand', {
|
|
|
96
95
|
* ```
|
|
97
96
|
*/
|
|
98
97
|
toggleExpandRange: (from?: number, to?: number, open?: boolean) => EditorCommand;
|
|
98
|
+
/**
|
|
99
|
+
* Toggle the expand or nested expand node open
|
|
100
|
+
*/
|
|
101
|
+
toggleExpandWithMatch: (selection: Selection) => EditorCommand;
|
|
99
102
|
};
|
|
100
103
|
dependencies: ExpandPluginDependencies;
|
|
101
104
|
pluginConfiguration: ExpandPluginOptions | undefined;
|
|
105
|
+
sharedState: ExpandPluginSharedState;
|
|
102
106
|
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-expand",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.4.0",
|
|
4
4
|
"description": "Expand plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
],
|
|
30
30
|
"atlaskit:src": "src/index.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@atlaskit/adf-schema": "^52.
|
|
33
|
-
"@atlaskit/button": "^23.
|
|
32
|
+
"@atlaskit/adf-schema": "^52.1.0",
|
|
33
|
+
"@atlaskit/button": "^23.10.0",
|
|
34
34
|
"@atlaskit/editor-plugin-analytics": "^7.0.0",
|
|
35
35
|
"@atlaskit/editor-plugin-block-menu": "^6.1.0",
|
|
36
36
|
"@atlaskit/editor-plugin-decorations": "^7.0.0",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@atlaskit/icon-lab": "^5.17.0",
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
49
49
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
50
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
50
|
+
"@atlaskit/tmp-editor-statsig": "^32.6.0",
|
|
51
51
|
"@atlaskit/tokens": "^11.0.0",
|
|
52
52
|
"@atlaskit/tooltip": "^20.14.0",
|
|
53
53
|
"@babel/runtime": "^7.0.0",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"w3c-keyname": "^2.1.8"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@atlaskit/editor-common": "^111.
|
|
59
|
+
"@atlaskit/editor-common": "^111.23.0",
|
|
60
60
|
"react": "^18.2.0",
|
|
61
61
|
"react-dom": "^18.2.0",
|
|
62
62
|
"react-intl-next": "npm:react-intl@^5.18.1"
|