@atlaskit/editor-core 172.3.1 → 173.0.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 +51 -0
- package/dist/cjs/index.js +0 -6
- package/dist/cjs/plugins/base/index.js +8 -0
- package/dist/cjs/plugins/base/pm-plugins/composition.js +60 -0
- package/dist/cjs/plugins/breakout/index.js +5 -4
- package/dist/cjs/plugins/breakout/ui/LayoutButton.js +1 -3
- package/dist/cjs/plugins/card/pm-plugins/doc.js +8 -1
- package/dist/cjs/plugins/code-block/pm-plugins/ide-ux.js +2 -36
- package/dist/cjs/plugins/collab-edit/plugin-state.js +16 -9
- package/dist/cjs/plugins/collab-edit/utils.js +16 -2
- package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +24 -22
- package/dist/cjs/plugins/floating-toolbar/ui/Dropdown.js +20 -15
- package/dist/cjs/plugins/floating-toolbar/ui/DropdownMenu.js +8 -5
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +3 -3
- package/dist/cjs/plugins/paste/actions.js +13 -0
- package/dist/cjs/plugins/paste/commands.js +44 -0
- package/dist/cjs/plugins/paste/handlers.js +48 -7
- package/dist/cjs/plugins/paste/index.js +3 -2
- package/dist/cjs/plugins/paste/pm-plugins/main.js +34 -9
- package/dist/cjs/plugins/paste/pm-plugins/plugin-factory.js +62 -0
- package/dist/cjs/plugins/paste/reducer.js +47 -0
- package/dist/cjs/plugins/paste/types.js +5 -0
- package/dist/cjs/plugins/placeholder/index.js +3 -1
- package/dist/cjs/plugins/placeholder-text/index.js +9 -3
- package/dist/cjs/plugins/status/ui/statusPicker.js +4 -1
- package/dist/cjs/plugins/table/commands-with-analytics.js +59 -52
- package/dist/cjs/plugins/table/index.js +53 -36
- package/dist/cjs/plugins/table/toolbar.js +136 -20
- package/dist/cjs/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +3 -3
- package/dist/cjs/plugins/tasks-and-decisions/commands.js +1 -16
- package/dist/cjs/plugins/type-ahead/constants.js +3 -1
- package/dist/cjs/plugins/type-ahead/messages.js +16 -1
- package/dist/cjs/plugins/type-ahead/pm-plugins/main.js +1 -1
- package/dist/cjs/plugins/type-ahead/pm-plugins/reducer.js +2 -2
- package/dist/cjs/plugins/type-ahead/ui/AssistiveText.js +143 -0
- package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +59 -11
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +156 -31
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadListItem.js +55 -29
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadPopup.js +3 -3
- package/dist/cjs/plugins/type-ahead/ui/WrapperTypeAhead.js +5 -2
- package/dist/cjs/plugins/type-ahead/utils.js +1 -1
- package/dist/cjs/ui/MediaAndEmbedsToolbar/index.js +8 -0
- package/dist/cjs/ui/PortalProvider/PortalProviderThemesProvider.js +2 -6
- package/dist/cjs/ui/PortalProvider/index.js +26 -32
- package/dist/cjs/utils/index.js +8 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/plugins/base/index.js +5 -0
- package/dist/es2019/plugins/base/pm-plugins/composition.js +45 -0
- package/dist/es2019/plugins/breakout/index.js +5 -4
- package/dist/es2019/plugins/breakout/ui/LayoutButton.js +1 -3
- package/dist/es2019/plugins/card/pm-plugins/doc.js +10 -1
- package/dist/es2019/plugins/code-block/pm-plugins/ide-ux.js +3 -40
- package/dist/es2019/plugins/collab-edit/plugin-state.js +9 -3
- package/dist/es2019/plugins/collab-edit/utils.js +17 -3
- package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +24 -22
- package/dist/es2019/plugins/floating-toolbar/ui/Dropdown.js +15 -7
- package/dist/es2019/plugins/floating-toolbar/ui/DropdownMenu.js +9 -5
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +3 -3
- package/dist/es2019/plugins/paste/actions.js +6 -0
- package/dist/es2019/plugins/paste/commands.js +27 -0
- package/dist/es2019/plugins/paste/handlers.js +50 -8
- package/dist/es2019/plugins/paste/index.js +3 -2
- package/dist/es2019/plugins/paste/pm-plugins/main.js +29 -6
- package/dist/es2019/plugins/paste/pm-plugins/plugin-factory.js +33 -0
- package/dist/es2019/plugins/paste/reducer.js +24 -0
- package/dist/es2019/plugins/paste/types.js +1 -0
- package/dist/es2019/plugins/placeholder/index.js +2 -1
- package/dist/es2019/plugins/placeholder-text/index.js +13 -3
- package/dist/es2019/plugins/status/ui/statusPicker.js +5 -1
- package/dist/es2019/plugins/table/commands-with-analytics.js +6 -3
- package/dist/es2019/plugins/table/index.js +22 -4
- package/dist/es2019/plugins/table/toolbar.js +118 -14
- package/dist/es2019/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +3 -3
- package/dist/es2019/plugins/tasks-and-decisions/commands.js +0 -9
- package/dist/es2019/plugins/type-ahead/constants.js +1 -0
- package/dist/es2019/plugins/type-ahead/messages.js +16 -1
- package/dist/es2019/plugins/type-ahead/pm-plugins/main.js +1 -1
- package/dist/es2019/plugins/type-ahead/pm-plugins/reducer.js +2 -2
- package/dist/es2019/plugins/type-ahead/ui/AssistiveText.js +95 -0
- package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +49 -12
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +143 -29
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +64 -31
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadPopup.js +3 -3
- package/dist/es2019/plugins/type-ahead/ui/WrapperTypeAhead.js +5 -2
- package/dist/es2019/plugins/type-ahead/utils.js +1 -1
- package/dist/es2019/ui/MediaAndEmbedsToolbar/index.js +17 -0
- package/dist/es2019/ui/PortalProvider/PortalProviderThemesProvider.js +2 -5
- package/dist/es2019/ui/PortalProvider/index.js +5 -8
- package/dist/es2019/utils/index.js +6 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/plugins/base/index.js +7 -0
- package/dist/esm/plugins/base/pm-plugins/composition.js +45 -0
- package/dist/esm/plugins/breakout/index.js +5 -4
- package/dist/esm/plugins/breakout/ui/LayoutButton.js +1 -3
- package/dist/esm/plugins/card/pm-plugins/doc.js +8 -1
- package/dist/esm/plugins/code-block/pm-plugins/ide-ux.js +3 -37
- package/dist/esm/plugins/collab-edit/plugin-state.js +9 -3
- package/dist/esm/plugins/collab-edit/utils.js +17 -3
- package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +24 -22
- package/dist/esm/plugins/floating-toolbar/ui/Dropdown.js +20 -15
- package/dist/esm/plugins/floating-toolbar/ui/DropdownMenu.js +8 -5
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +3 -3
- package/dist/esm/plugins/paste/actions.js +6 -0
- package/dist/esm/plugins/paste/commands.js +31 -0
- package/dist/esm/plugins/paste/handlers.js +46 -8
- package/dist/esm/plugins/paste/index.js +3 -2
- package/dist/esm/plugins/paste/pm-plugins/main.js +27 -6
- package/dist/esm/plugins/paste/pm-plugins/plugin-factory.js +46 -0
- package/dist/esm/plugins/paste/reducer.js +34 -0
- package/dist/esm/plugins/paste/types.js +1 -0
- package/dist/esm/plugins/placeholder/index.js +2 -1
- package/dist/esm/plugins/placeholder-text/index.js +9 -3
- package/dist/esm/plugins/status/ui/statusPicker.js +4 -1
- package/dist/esm/plugins/table/commands-with-analytics.js +56 -49
- package/dist/esm/plugins/table/index.js +54 -37
- package/dist/esm/plugins/table/toolbar.js +124 -15
- package/dist/esm/plugins/table/ui/FloatingContextualMenu/ContextualMenu.js +3 -3
- package/dist/esm/plugins/tasks-and-decisions/commands.js +0 -12
- package/dist/esm/plugins/type-ahead/constants.js +1 -0
- package/dist/esm/plugins/type-ahead/messages.js +16 -1
- package/dist/esm/plugins/type-ahead/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/type-ahead/pm-plugins/reducer.js +2 -2
- package/dist/esm/plugins/type-ahead/ui/AssistiveText.js +129 -0
- package/dist/esm/plugins/type-ahead/ui/InputQuery.js +56 -12
- package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +151 -32
- package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +54 -31
- package/dist/esm/plugins/type-ahead/ui/TypeAheadPopup.js +3 -3
- package/dist/esm/plugins/type-ahead/ui/WrapperTypeAhead.js +5 -2
- package/dist/esm/plugins/type-ahead/utils.js +1 -1
- package/dist/esm/ui/MediaAndEmbedsToolbar/index.js +7 -0
- package/dist/esm/ui/PortalProvider/PortalProviderThemesProvider.js +2 -5
- package/dist/esm/ui/PortalProvider/index.js +26 -35
- package/dist/esm/utils/index.js +4 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/plugins/base/pm-plugins/composition.d.ts +8 -0
- package/dist/types/plugins/code-block/pm-plugins/ide-ux.d.ts +1 -4
- package/dist/types/plugins/floating-toolbar/ui/Dropdown.d.ts +2 -0
- package/dist/types/plugins/floating-toolbar/ui/DropdownMenu.d.ts +1 -0
- package/dist/types/plugins/paste/actions.d.ts +15 -0
- package/dist/types/plugins/paste/commands.d.ts +16 -0
- package/dist/types/plugins/paste/handlers.d.ts +1 -1
- package/dist/types/plugins/paste/pm-plugins/main.d.ts +3 -3
- package/dist/types/plugins/paste/pm-plugins/plugin-factory.d.ts +3 -0
- package/dist/types/plugins/paste/reducer.d.ts +3 -0
- package/dist/types/plugins/paste/types.d.ts +6 -0
- package/dist/types/plugins/table/commands-with-analytics.d.ts +5 -5
- package/dist/types/plugins/tasks-and-decisions/commands.d.ts +0 -2
- package/dist/types/plugins/type-ahead/constants.d.ts +1 -0
- package/dist/types/plugins/type-ahead/messages.d.ts +15 -0
- package/dist/types/plugins/type-ahead/ui/AssistiveText.d.ts +33 -0
- package/dist/types/plugins/type-ahead/ui/InputQuery.d.ts +3 -0
- package/dist/types/plugins/type-ahead/ui/TypeAheadList.d.ts +6 -3
- package/dist/types/plugins/type-ahead/ui/TypeAheadListItem.d.ts +2 -2
- package/dist/types/plugins/type-ahead/ui/TypeAheadPopup.d.ts +1 -1
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +2 -2
- package/dist/types/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types-ts4.0/index.d.ts +1 -1
- package/dist/types-ts4.0/plugins/base/pm-plugins/composition.d.ts +8 -0
- package/dist/types-ts4.0/plugins/code-block/pm-plugins/ide-ux.d.ts +1 -4
- package/dist/types-ts4.0/plugins/floating-toolbar/ui/Dropdown.d.ts +2 -0
- package/dist/types-ts4.0/plugins/floating-toolbar/ui/DropdownMenu.d.ts +1 -0
- package/dist/types-ts4.0/plugins/paste/actions.d.ts +15 -0
- package/dist/types-ts4.0/plugins/paste/commands.d.ts +16 -0
- package/dist/types-ts4.0/plugins/paste/handlers.d.ts +1 -1
- package/dist/types-ts4.0/plugins/paste/pm-plugins/main.d.ts +3 -3
- package/dist/types-ts4.0/plugins/paste/pm-plugins/plugin-factory.d.ts +3 -0
- package/dist/types-ts4.0/plugins/paste/reducer.d.ts +3 -0
- package/dist/types-ts4.0/plugins/paste/types.d.ts +6 -0
- package/dist/types-ts4.0/plugins/table/commands-with-analytics.d.ts +5 -5
- package/dist/types-ts4.0/plugins/tasks-and-decisions/commands.d.ts +0 -2
- package/dist/types-ts4.0/plugins/type-ahead/constants.d.ts +1 -0
- package/dist/types-ts4.0/plugins/type-ahead/messages.d.ts +15 -0
- package/dist/types-ts4.0/plugins/type-ahead/ui/AssistiveText.d.ts +33 -0
- package/dist/types-ts4.0/plugins/type-ahead/ui/InputQuery.d.ts +3 -0
- package/dist/types-ts4.0/plugins/type-ahead/ui/TypeAheadList.d.ts +6 -3
- package/dist/types-ts4.0/plugins/type-ahead/ui/TypeAheadListItem.d.ts +2 -2
- package/dist/types-ts4.0/plugins/type-ahead/ui/TypeAheadPopup.d.ts +1 -1
- package/dist/types-ts4.0/ui/Appearance/FullPage/StyledComponents.d.ts +2 -2
- package/dist/types-ts4.0/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types-ts4.0/utils/index.d.ts +1 -0
- package/package.json +31 -32
- package/report.api.md +161 -49
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,56 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 173.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`aed2ee012bc`](https://bitbucket.org/atlassian/atlassian-frontend/commits/aed2ee012bc) - ED-13182 insertTaskDecision has been depreciated and removed from this release in favor of insertTaskDecisionCommand.
|
|
8
|
+
|
|
9
|
+
`insertTaskDecision` was a duplicate of `insertTaskDecisionCommand` with added unnecessary overhead, replace all occurrences with `insertTaskDecisionCommand`. The function signatures are slightly different to remediate remove the first parameter from the function call (`view: EditorView`) and insert a third parameter with a value of `undefined`.
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`e71cf110b81`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e71cf110b81) - [ux] ED-14418 Copied table cell options to the floating toolbar if feature flag is enabled (off by default)
|
|
14
|
+
- [`d8acf7254db`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d8acf7254db) - ED-8567 added tracking for fixTables()
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [`0474f9cedb2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0474f9cedb2) - ED-15443 replace only telepointer and not zero character
|
|
19
|
+
- [`7302b885bb3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7302b885bb3) - Fixed blue selection frame not showing up in typeahead menu.
|
|
20
|
+
- [`adaf9bab9a9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/adaf9bab9a9) - ED-15530 remove styled-component dependency from editor-core
|
|
21
|
+
- [`53c2a7f9eb4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/53c2a7f9eb4) - [ux] ED-15174: Ensure original link paste position is honoured when pasting macro links even if other changes occur while resolving links
|
|
22
|
+
- [`07160af53b7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/07160af53b7) - [ux] ED-15447: Stop breakout width layout button position flickering when user moves selection out and into breakout-supported nodes
|
|
23
|
+
- [`1ee63eda764`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1ee63eda764) - Fixed typeahead selection frame showing with mouse selections.
|
|
24
|
+
- [`0ed72f9c96e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0ed72f9c96e) - [ux] ED-15208 fixed status bar selection issue
|
|
25
|
+
- [`15e418edc1b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/15e418edc1b) - Set Firefox collab telepointer decoration side value to 0 to fix backspace issues
|
|
26
|
+
- [`95f2b5569a5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/95f2b5569a5) - Bump & force prosemirror-dev-tools to 3.0.1
|
|
27
|
+
- [`556bcd32873`](https://bitbucket.org/atlassian/atlassian-frontend/commits/556bcd32873) - ED-15593 Fixed a regression - Adding back the hover style of mention menu items
|
|
28
|
+
- [`dbc1b4943c2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/dbc1b4943c2) - ED-13162 add word joiner before and after telepointer
|
|
29
|
+
- [`da012d93a6a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/da012d93a6a) - [ux] Insert a paragraph beside an embedded smart card when it changes its layout wrap to either left or right, ensuring a user can add text beside it
|
|
30
|
+
- [`13f3001af1e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/13f3001af1e) - ED-15482 Improve esbuild devloop
|
|
31
|
+
|
|
32
|
+
- Bumps esbuild to 0.15.5
|
|
33
|
+
- Unlock locked prosemirror-dev-tools dependency version
|
|
34
|
+
- Add prosemirror-dev-tools to Editor kitchen sink example
|
|
35
|
+
- Partially address translations not working in examples via esbuild
|
|
36
|
+
- Defaults esbuild for non-VR editor-core + renderer devloop
|
|
37
|
+
|
|
38
|
+
- [`8f1264a6bc8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8f1264a6bc8) - Updated date lozenge component from styled components to use Emotion CSS
|
|
39
|
+
- [`5b018789978`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5b018789978) - To fix scroll position of typeahead list elements [ED-15754]
|
|
40
|
+
- [`dbfc8c36104`](https://bitbucket.org/atlassian/atlassian-frontend/commits/dbfc8c36104) - [ux][ux] ED-15655 To add visible focus styles for type ahead list items when focused through navigation
|
|
41
|
+
- [`f5a41e1c164`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f5a41e1c164) - Fixed pasting of plain text content where double slashes collapsed into a single slash.
|
|
42
|
+
- [`e47c25f7cbd`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e47c25f7cbd) - [ux] ED-15388 Fixed - Lose focus when canceling composition input in Japanese at the beginning of page
|
|
43
|
+
- [`d58c77cae8d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d58c77cae8d) - ED-15182 corrected blockquote to blockquote content copy paste bug
|
|
44
|
+
- [`f86e84d3cd8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f86e84d3cd8) - ED-13980 Changes to make typeahead menu accessible by adding assistive text and improving keyboard navigation
|
|
45
|
+
- [`830f3ba0e98`](https://bitbucket.org/atlassian/atlassian-frontend/commits/830f3ba0e98) - [ux] ED-15324 Allow pasted inline nodes to replace placeholder nodes.
|
|
46
|
+
- Updated dependencies
|
|
47
|
+
|
|
48
|
+
## 172.3.2
|
|
49
|
+
|
|
50
|
+
### Patch Changes
|
|
51
|
+
|
|
52
|
+
- Updated dependencies
|
|
53
|
+
|
|
3
54
|
## 172.3.1
|
|
4
55
|
|
|
5
56
|
### Patch Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -367,12 +367,6 @@ Object.defineProperty(exports, "insertMediaSingleNode", {
|
|
|
367
367
|
return _media.insertMediaSingleNode;
|
|
368
368
|
}
|
|
369
369
|
});
|
|
370
|
-
Object.defineProperty(exports, "insertTaskDecision", {
|
|
371
|
-
enumerable: true,
|
|
372
|
-
get: function get() {
|
|
373
|
-
return _commands5.insertTaskDecision;
|
|
374
|
-
}
|
|
375
|
-
});
|
|
376
370
|
Object.defineProperty(exports, "insertTaskDecisionCommand", {
|
|
377
371
|
enumerable: true,
|
|
378
372
|
get: function get() {
|
|
@@ -43,6 +43,8 @@ var _keymap = require("../../utils/keymap");
|
|
|
43
43
|
|
|
44
44
|
var _frozenEditor = _interopRequireDefault(require("./pm-plugins/frozen-editor"));
|
|
45
45
|
|
|
46
|
+
var _composition = _interopRequireDefault(require("./pm-plugins/composition"));
|
|
47
|
+
|
|
46
48
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
47
49
|
|
|
48
50
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -161,6 +163,12 @@ var basePlugin = function basePlugin(options) {
|
|
|
161
163
|
return (0, _disableSpellChecking.default)();
|
|
162
164
|
}
|
|
163
165
|
});
|
|
166
|
+
plugins.push({
|
|
167
|
+
name: 'compositionPlugin',
|
|
168
|
+
plugin: function plugin() {
|
|
169
|
+
return (0, _composition.default)();
|
|
170
|
+
}
|
|
171
|
+
});
|
|
164
172
|
return plugins;
|
|
165
173
|
},
|
|
166
174
|
nodes: function nodes() {
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.isComposing = exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
9
|
+
|
|
10
|
+
var _prosemirrorState = require("prosemirror-state");
|
|
11
|
+
|
|
12
|
+
var compositionPluginKey = new _prosemirrorState.PluginKey('compositionPlugin');
|
|
13
|
+
|
|
14
|
+
var isComposing = function isComposing(state) {
|
|
15
|
+
return compositionPluginKey.getState(state).isComposing;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
exports.isComposing = isComposing;
|
|
19
|
+
|
|
20
|
+
var _default = function _default() {
|
|
21
|
+
return new _safePlugin.SafePlugin({
|
|
22
|
+
key: compositionPluginKey,
|
|
23
|
+
state: {
|
|
24
|
+
init: function init() {
|
|
25
|
+
return {
|
|
26
|
+
isComposing: false
|
|
27
|
+
};
|
|
28
|
+
},
|
|
29
|
+
apply: function apply(tr, value) {
|
|
30
|
+
var isComposing = tr.getMeta(compositionPluginKey);
|
|
31
|
+
|
|
32
|
+
if (typeof isComposing === 'undefined') {
|
|
33
|
+
return value;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return {
|
|
37
|
+
isComposing: isComposing
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
props: {
|
|
42
|
+
handleDOMEvents: {
|
|
43
|
+
compositionstart: function compositionstart(view, event) {
|
|
44
|
+
var tr = view.state.tr;
|
|
45
|
+
tr.setMeta(compositionPluginKey, true);
|
|
46
|
+
view.dispatch(tr);
|
|
47
|
+
return false;
|
|
48
|
+
},
|
|
49
|
+
compositionend: function compositionend(view, event) {
|
|
50
|
+
var tr = view.state.tr;
|
|
51
|
+
tr.setMeta(compositionPluginKey, false);
|
|
52
|
+
view.dispatch(tr);
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
exports.default = _default;
|
|
@@ -185,18 +185,19 @@ var breakoutPlugin = function breakoutPlugin(options) {
|
|
|
185
185
|
|
|
186
186
|
return /*#__PURE__*/_react.default.createElement(_WithPluginState.default, {
|
|
187
187
|
plugins: {
|
|
188
|
-
|
|
188
|
+
breakoutPluginState: _pluginKey.pluginKey,
|
|
189
|
+
widthPluginState: _width.pluginKey
|
|
189
190
|
},
|
|
190
191
|
render: function render(_ref3) {
|
|
191
|
-
var
|
|
192
|
+
var _breakoutPluginState$;
|
|
192
193
|
|
|
193
|
-
var
|
|
194
|
+
var breakoutPluginState = _ref3.breakoutPluginState;
|
|
194
195
|
return /*#__PURE__*/_react.default.createElement(_LayoutButton.default, {
|
|
195
196
|
editorView: editorView,
|
|
196
197
|
mountPoint: popupsMountPoint,
|
|
197
198
|
boundariesElement: popupsBoundariesElement,
|
|
198
199
|
scrollableElement: popupsScrollableElement,
|
|
199
|
-
node: (
|
|
200
|
+
node: (_breakoutPluginState$ = breakoutPluginState === null || breakoutPluginState === void 0 ? void 0 : breakoutPluginState.breakoutNode) !== null && _breakoutPluginState$ !== void 0 ? _breakoutPluginState$ : null
|
|
200
201
|
});
|
|
201
202
|
}
|
|
202
203
|
});
|
|
@@ -179,9 +179,7 @@ var LayoutButton = /*#__PURE__*/function (_React$Component) {
|
|
|
179
179
|
boundariesElement: boundariesElement,
|
|
180
180
|
scrollableElement: scrollableElement,
|
|
181
181
|
stick: true,
|
|
182
|
-
forcePlacement: true
|
|
183
|
-
scheduleExtraLayoutUpdates: true,
|
|
184
|
-
waitForExtraLayoutUpdates: true
|
|
182
|
+
forcePlacement: true
|
|
185
183
|
}, (0, _react2.jsx)("div", {
|
|
186
184
|
css: toolbarButtonWrapper
|
|
187
185
|
}, (0, _react2.jsx)(_ToolbarButton.default, {
|
|
@@ -47,6 +47,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
47
47
|
* Attempt to replace the link into the respective card.
|
|
48
48
|
*/
|
|
49
49
|
function replaceLinksToCards(tr, cardAdf, schema, request) {
|
|
50
|
+
var inlineCard = schema.nodes.inlineCard;
|
|
50
51
|
var url = request.url;
|
|
51
52
|
|
|
52
53
|
if (!(0, _adfSchema.isSafeUrl)(url)) {
|
|
@@ -66,9 +67,15 @@ function replaceLinksToCards(tr, cardAdf, schema, request) {
|
|
|
66
67
|
|
|
67
68
|
if (!replaceLink) {
|
|
68
69
|
return;
|
|
69
|
-
}
|
|
70
|
+
} // ED-5638: add an extra space after inline cards to avoid re-rendering them
|
|
71
|
+
|
|
70
72
|
|
|
71
73
|
var nodes = [cardAdf];
|
|
74
|
+
|
|
75
|
+
if (cardAdf.type === inlineCard) {
|
|
76
|
+
nodes.push(schema.text(' '));
|
|
77
|
+
}
|
|
78
|
+
|
|
72
79
|
tr.replaceWith(pos, pos + (node.text || url).length, nodes);
|
|
73
80
|
return $pos.node($pos.depth - 1).type.name;
|
|
74
81
|
}
|
|
@@ -27,49 +27,15 @@ var _lineHandling = require("../ide-ux/line-handling");
|
|
|
27
27
|
|
|
28
28
|
var _commands2 = require("../ide-ux/commands");
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var _composition = require("../../base/pm-plugins/composition");
|
|
31
31
|
|
|
32
32
|
var _default = new _safePlugin.SafePlugin({
|
|
33
|
-
key: codeBlockIDEKeyBindingsKey,
|
|
34
|
-
state: {
|
|
35
|
-
init: function init() {
|
|
36
|
-
return {
|
|
37
|
-
isComposing: false
|
|
38
|
-
};
|
|
39
|
-
},
|
|
40
|
-
apply: function apply(tr, value) {
|
|
41
|
-
var isComposing = tr.getMeta(codeBlockIDEKeyBindingsKey);
|
|
42
|
-
|
|
43
|
-
if (typeof isComposing === 'undefined') {
|
|
44
|
-
return value;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return {
|
|
48
|
-
isComposing: isComposing
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
33
|
props: {
|
|
53
|
-
handleDOMEvents: {
|
|
54
|
-
compositionstart: function compositionstart(view, event) {
|
|
55
|
-
var tr = view.state.tr;
|
|
56
|
-
tr.setMeta(codeBlockIDEKeyBindingsKey, true);
|
|
57
|
-
view.dispatch(tr);
|
|
58
|
-
return false;
|
|
59
|
-
},
|
|
60
|
-
compositionend: function compositionend(view, event) {
|
|
61
|
-
var tr = view.state.tr;
|
|
62
|
-
tr.setMeta(codeBlockIDEKeyBindingsKey, false);
|
|
63
|
-
view.dispatch(tr);
|
|
64
|
-
return false;
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
34
|
handleTextInput: function handleTextInput(view, from, to, text) {
|
|
68
35
|
var state = view.state,
|
|
69
36
|
dispatch = view.dispatch;
|
|
70
|
-
var isComposing = codeBlockIDEKeyBindingsKey.getState(state).isComposing;
|
|
71
37
|
|
|
72
|
-
if ((0, _lineHandling.isCursorInsideCodeBlock)(state) && !isComposing) {
|
|
38
|
+
if ((0, _lineHandling.isCursorInsideCodeBlock)(state) && !(0, _composition.isComposing)(state)) {
|
|
73
39
|
var beforeText = (0, _lineHandling.getStartOfCurrentLine)(state).text;
|
|
74
40
|
var afterText = (0, _lineHandling.getEndOfCurrentLine)(state).text; // If text is a closing bracket/quote and we've already inserted it, move the selection after
|
|
75
41
|
|
|
@@ -19,9 +19,11 @@ var _prosemirrorView = require("prosemirror-view");
|
|
|
19
19
|
|
|
20
20
|
var _prosemirrorTransform = require("prosemirror-transform");
|
|
21
21
|
|
|
22
|
+
var _utils = require("@atlaskit/editor-common/utils");
|
|
23
|
+
|
|
22
24
|
var _participants = require("./participants");
|
|
23
25
|
|
|
24
|
-
var
|
|
26
|
+
var _utils2 = require("./utils");
|
|
25
27
|
|
|
26
28
|
var isReplaceStep = function isReplaceStep(step) {
|
|
27
29
|
return step instanceof _prosemirrorTransform.ReplaceStep;
|
|
@@ -125,7 +127,7 @@ var PluginState = /*#__PURE__*/function () {
|
|
|
125
127
|
participants = participants.add(joined); // Remove telepointers for users that left
|
|
126
128
|
|
|
127
129
|
left.forEach(function (i) {
|
|
128
|
-
var pointers = (0,
|
|
130
|
+
var pointers = (0, _utils2.findPointers)(i.sessionId, _this.decorationSet);
|
|
129
131
|
|
|
130
132
|
if (pointers) {
|
|
131
133
|
remove = remove.concat(pointers);
|
|
@@ -137,7 +139,7 @@ var PluginState = /*#__PURE__*/function () {
|
|
|
137
139
|
var sessionId = telepointerData.sessionId;
|
|
138
140
|
|
|
139
141
|
if (participants.get(sessionId) && sessionId !== sid) {
|
|
140
|
-
var oldPointers = (0,
|
|
142
|
+
var oldPointers = (0, _utils2.findPointers)(telepointerData.sessionId, this.decorationSet);
|
|
141
143
|
|
|
142
144
|
if (oldPointers) {
|
|
143
145
|
remove = remove.concat(oldPointers);
|
|
@@ -169,7 +171,7 @@ var PluginState = /*#__PURE__*/function () {
|
|
|
169
171
|
this.onError(err);
|
|
170
172
|
}
|
|
171
173
|
|
|
172
|
-
add = add.concat((0,
|
|
174
|
+
add = add.concat((0, _utils2.createTelepointers)(from, to, sessionId, isSelection, this.getInitial(sessionId)));
|
|
173
175
|
}
|
|
174
176
|
}
|
|
175
177
|
|
|
@@ -179,7 +181,7 @@ var PluginState = /*#__PURE__*/function () {
|
|
|
179
181
|
this.decorationSet = this.decorationSet.map(tr.mapping, tr.doc, {
|
|
180
182
|
// Reapplies decorators those got removed by the state change
|
|
181
183
|
onRemove: function onRemove(spec) {
|
|
182
|
-
if (spec.pointer && spec.pointer.sessionId) {
|
|
184
|
+
if (spec.pointer && spec.pointer.sessionId && spec.key === "telepointer-".concat(spec.pointer.sessionId)) {
|
|
183
185
|
var step = tr.steps.filter(isReplaceStep)[0];
|
|
184
186
|
|
|
185
187
|
if (step) {
|
|
@@ -188,7 +190,7 @@ var PluginState = /*#__PURE__*/function () {
|
|
|
188
190
|
size = _ref.slice.content.size,
|
|
189
191
|
_from = _ref.from;
|
|
190
192
|
var pos = getValidPos(tr, size ? Math.min(_from + size, tr.doc.nodeSize - 3) : Math.max(_from, 1));
|
|
191
|
-
add = add.concat((0,
|
|
193
|
+
add = add.concat((0, _utils2.createTelepointers)(pos, pos, _sessionId, false, _this.getInitial(_sessionId)));
|
|
192
194
|
}
|
|
193
195
|
}
|
|
194
196
|
}
|
|
@@ -222,9 +224,14 @@ var PluginState = /*#__PURE__*/function () {
|
|
|
222
224
|
if (deco.from === selection.from && deco.to === selection.to) {
|
|
223
225
|
if (!hasTelepointerDimClass) {
|
|
224
226
|
deco.type.toDOM.classList.add(TELEPOINTER_DIM_CLASS);
|
|
225
|
-
}
|
|
227
|
+
} // Browser condition here to fix ED-14722 where telepointer
|
|
228
|
+
// decorations with side -1 in Firefox causes backspace issues.
|
|
229
|
+
// This is likely caused by contenteditable quirks in Firefox
|
|
226
230
|
|
|
227
|
-
|
|
231
|
+
|
|
232
|
+
if (!_utils.browser.gecko) {
|
|
233
|
+
deco.type.side = -1;
|
|
234
|
+
}
|
|
228
235
|
} else {
|
|
229
236
|
if (hasTelepointerDimClass) {
|
|
230
237
|
deco.type.toDOM.classList.remove(TELEPOINTER_DIM_CLASS);
|
|
@@ -249,7 +256,7 @@ var PluginState = /*#__PURE__*/function () {
|
|
|
249
256
|
var _sessionId2 = telepointerData.sessionId;
|
|
250
257
|
|
|
251
258
|
if (participants.get(_sessionId2)) {
|
|
252
|
-
var positionForScroll = (0,
|
|
259
|
+
var positionForScroll = (0, _utils2.getPositionOfTelepointer)(_sessionId2, this.decorationSet);
|
|
253
260
|
|
|
254
261
|
if (positionForScroll) {
|
|
255
262
|
participants = participants.updateCursorPos(_sessionId2, positionForScroll);
|
|
@@ -87,18 +87,32 @@ var createTelepointers = function createTelepointers(from, to, sessionId, isSele
|
|
|
87
87
|
}));
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
+
var spaceJoinerBefore = document.createElement('span');
|
|
91
|
+
spaceJoinerBefore.textContent = _utils.ZERO_WIDTH_JOINER;
|
|
92
|
+
var spaceJoinerAfter = document.createElement('span');
|
|
93
|
+
spaceJoinerAfter.textContent = _utils.ZERO_WIDTH_JOINER;
|
|
90
94
|
var cursor = document.createElement('span');
|
|
91
|
-
cursor.textContent = _utils.
|
|
95
|
+
cursor.textContent = _utils.ZERO_WIDTH_JOINER;
|
|
92
96
|
cursor.className = "telepointer color-".concat(color, " telepointer-selection-badge");
|
|
93
97
|
cursor.style.cssText = "".concat(style({
|
|
94
98
|
color: avatarColor.color.solid
|
|
95
99
|
}), ";");
|
|
96
100
|
cursor.setAttribute('data-initial', initial);
|
|
97
|
-
return decorations.concat(_prosemirrorView.Decoration.widget(to,
|
|
101
|
+
return decorations.concat(_prosemirrorView.Decoration.widget(to, spaceJoinerAfter, {
|
|
102
|
+
pointer: {
|
|
103
|
+
sessionId: sessionId
|
|
104
|
+
},
|
|
105
|
+
key: "telepointer-".concat(sessionId, "-zero")
|
|
106
|
+
})).concat(_prosemirrorView.Decoration.widget(to, cursor, {
|
|
98
107
|
pointer: {
|
|
99
108
|
sessionId: sessionId
|
|
100
109
|
},
|
|
101
110
|
key: "telepointer-".concat(sessionId)
|
|
111
|
+
})).concat(_prosemirrorView.Decoration.widget(to, spaceJoinerBefore, {
|
|
112
|
+
pointer: {
|
|
113
|
+
sessionId: sessionId
|
|
114
|
+
},
|
|
115
|
+
key: "telepointer-".concat(sessionId, "-zero")
|
|
102
116
|
}));
|
|
103
117
|
};
|
|
104
118
|
|
|
@@ -43,9 +43,10 @@ function getSpellCheck(featureFlags) {
|
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
function createFeatureFlagsFromProps(props) {
|
|
46
|
-
var _props$allowTextColor, _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$
|
|
46
|
+
var _props$featureFlags, _props$allowTextColor, _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$featureFlags2, _props$featureFlags3, _props$allowTables, _props$featureFlags4, _props$featureFlags5, _props$allowTables2, _props$featureFlags6, _props$featureFlags7, _props$allowTables3, _props$featureFlags8, _props$featureFlags9, _props$allowTables4, _props$allowTables5, _props$featureFlags10, _props$featureFlags11, _props$allowTables6, _props$allowExtension, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$featureFlags28, _props$featureFlags29, _props$featureFlags30, _props$featureFlags31, _props$collabEdit, _props$collabEdit2, _props$featureFlags32, _props$featureFlags33, _props$featureFlags34, _props$featureFlags35, _props$featureFlags36, _props$featureFlags37, _props$featureFlags38, _props$featureFlags39, _props$featureFlags40;
|
|
47
47
|
|
|
48
48
|
var normalizedFeatureFlags = (0, _normalizeFeatureFlags.normalizeFeatureFlags)(props.featureFlags);
|
|
49
|
+
var tableCellOptionsInFloatingToolbar = normalizedFeatureFlags.tableCellOptionsInFloatingToolbar || ((_props$featureFlags = props.featureFlags) === null || _props$featureFlags === void 0 ? void 0 : _props$featureFlags.tableCellOptionsInFloatingToolbar) || undefined;
|
|
49
50
|
return _objectSpread(_objectSpread({}, normalizedFeatureFlags), {}, {
|
|
50
51
|
newInsertionBehaviour: props.allowNewInsertionBehaviour,
|
|
51
52
|
interactiveExpand: typeof props.allowExpand === 'boolean' ? props.allowExpand : Boolean(props.allowExpand && props.allowExpand.allowInteractiveExpand !== false),
|
|
@@ -59,29 +60,30 @@ function createFeatureFlagsFromProps(props) {
|
|
|
59
60
|
singleLayout: (0, _typeof2.default)(props.allowLayouts) === 'object' && !!((_props$allowLayouts = props.allowLayouts) !== null && _props$allowLayouts !== void 0 && _props$allowLayouts.UNSAFE_allowSingleColumnLayout),
|
|
60
61
|
undoRedoButtons: props.UNSAFE_allowUndoRedoButtons,
|
|
61
62
|
catchAllTracking: (_props$performanceTra = props.performanceTracking) === null || _props$performanceTra === void 0 ? void 0 : (_props$performanceTra2 = _props$performanceTra.catchAllTracking) === null || _props$performanceTra2 === void 0 ? void 0 : _props$performanceTra2.enabled,
|
|
62
|
-
stickyHeadersOptimization: typeof ((_props$
|
|
63
|
-
initialRenderOptimization: typeof ((_props$
|
|
64
|
-
mouseMoveOptimization: typeof ((_props$
|
|
65
|
-
tableRenderOptimization: typeof ((_props$
|
|
66
|
-
tableOverflowShadowsOptimization: typeof ((_props$
|
|
63
|
+
stickyHeadersOptimization: typeof ((_props$featureFlags2 = props.featureFlags) === null || _props$featureFlags2 === void 0 ? void 0 : _props$featureFlags2.stickyHeadersOptimization) === 'boolean' ? !!((_props$featureFlags3 = props.featureFlags) !== null && _props$featureFlags3 !== void 0 && _props$featureFlags3.stickyHeadersOptimization) : (0, _typeof2.default)(props.allowTables) === 'object' && !!((_props$allowTables = props.allowTables) !== null && _props$allowTables !== void 0 && _props$allowTables.stickyHeadersOptimization),
|
|
64
|
+
initialRenderOptimization: typeof ((_props$featureFlags4 = props.featureFlags) === null || _props$featureFlags4 === void 0 ? void 0 : _props$featureFlags4.initialRenderOptimization) === 'boolean' ? !!((_props$featureFlags5 = props.featureFlags) !== null && _props$featureFlags5 !== void 0 && _props$featureFlags5.initialRenderOptimization) : (0, _typeof2.default)(props.allowTables) === 'object' && !!((_props$allowTables2 = props.allowTables) !== null && _props$allowTables2 !== void 0 && _props$allowTables2.initialRenderOptimization),
|
|
65
|
+
mouseMoveOptimization: typeof ((_props$featureFlags6 = props.featureFlags) === null || _props$featureFlags6 === void 0 ? void 0 : _props$featureFlags6.mouseMoveOptimization) === 'boolean' ? !!((_props$featureFlags7 = props.featureFlags) !== null && _props$featureFlags7 !== void 0 && _props$featureFlags7.mouseMoveOptimization) : (0, _typeof2.default)(props.allowTables) === 'object' && !!((_props$allowTables3 = props.allowTables) !== null && _props$allowTables3 !== void 0 && _props$allowTables3.mouseMoveOptimization),
|
|
66
|
+
tableRenderOptimization: typeof ((_props$featureFlags8 = props.featureFlags) === null || _props$featureFlags8 === void 0 ? void 0 : _props$featureFlags8.tableRenderOptimization) === 'boolean' ? !!((_props$featureFlags9 = props.featureFlags) !== null && _props$featureFlags9 !== void 0 && _props$featureFlags9.tableRenderOptimization) : (0, _typeof2.default)(props.allowTables) === 'object' && typeof ((_props$allowTables4 = props.allowTables) === null || _props$allowTables4 === void 0 ? void 0 : _props$allowTables4.tableRenderOptimization) === 'boolean' ? (_props$allowTables5 = props.allowTables) === null || _props$allowTables5 === void 0 ? void 0 : _props$allowTables5.tableRenderOptimization : true,
|
|
67
|
+
tableOverflowShadowsOptimization: typeof ((_props$featureFlags10 = props.featureFlags) === null || _props$featureFlags10 === void 0 ? void 0 : _props$featureFlags10.tableOverflowShadowsOptimization) === 'boolean' ? !!((_props$featureFlags11 = props.featureFlags) !== null && _props$featureFlags11 !== void 0 && _props$featureFlags11.tableOverflowShadowsOptimization) : (0, _typeof2.default)(props.allowTables) === 'object' && !!((_props$allowTables6 = props.allowTables) !== null && _props$allowTables6 !== void 0 && _props$allowTables6.tableOverflowShadowsOptimization),
|
|
67
68
|
extendFloatingToolbar: Boolean((0, _typeof2.default)(props.allowExtension) === 'object' && ((_props$allowExtension = props.allowExtension) === null || _props$allowExtension === void 0 ? void 0 : _props$allowExtension.allowExtendFloatingToolbars)),
|
|
68
|
-
useUnpredictableInputRule: Boolean(typeof ((_props$
|
|
69
|
-
showAvatarGroupAsPlugin: Boolean(typeof ((_props$
|
|
70
|
-
errorBoundaryDocStructure: Boolean(typeof ((_props$
|
|
71
|
-
synchronyErrorDocStructure: Boolean(typeof ((_props$
|
|
72
|
-
enableViewUpdateSubscription: Boolean(typeof ((_props$
|
|
73
|
-
plainTextPasteLinkification: Boolean(typeof ((_props$
|
|
74
|
-
collabAvatarScroll: Boolean(typeof ((_props$
|
|
75
|
-
ufo: Boolean(typeof ((_props$
|
|
76
|
-
twoLineEditorToolbar: Boolean(typeof ((_props$
|
|
77
|
-
saferDispatchedTransactions: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactions === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactions || (typeof ((_props$
|
|
69
|
+
useUnpredictableInputRule: Boolean(typeof ((_props$featureFlags12 = props.featureFlags) === null || _props$featureFlags12 === void 0 ? void 0 : _props$featureFlags12.useUnpredictableInputRule) === 'boolean' ? !!((_props$featureFlags13 = props.featureFlags) !== null && _props$featureFlags13 !== void 0 && _props$featureFlags13.useUnpredictableInputRule) : props.UNSAFE_allowUndoRedoButtons ? false : true),
|
|
70
|
+
showAvatarGroupAsPlugin: Boolean(typeof ((_props$featureFlags14 = props.featureFlags) === null || _props$featureFlags14 === void 0 ? void 0 : _props$featureFlags14.showAvatarGroupAsPlugin) === 'boolean' ? !!((_props$featureFlags15 = props.featureFlags) !== null && _props$featureFlags15 !== void 0 && _props$featureFlags15.showAvatarGroupAsPlugin) : false),
|
|
71
|
+
errorBoundaryDocStructure: Boolean(typeof ((_props$featureFlags16 = props.featureFlags) === null || _props$featureFlags16 === void 0 ? void 0 : _props$featureFlags16.useErrorBoundaryDocStructure) === 'boolean' ? !!((_props$featureFlags17 = props.featureFlags) !== null && _props$featureFlags17 !== void 0 && _props$featureFlags17.useErrorBoundaryDocStructure) : false),
|
|
72
|
+
synchronyErrorDocStructure: Boolean(typeof ((_props$featureFlags18 = props.featureFlags) === null || _props$featureFlags18 === void 0 ? void 0 : _props$featureFlags18.synchronyErrorDocStructure) === 'boolean' ? !!((_props$featureFlags19 = props.featureFlags) !== null && _props$featureFlags19 !== void 0 && _props$featureFlags19.synchronyErrorDocStructure) : false),
|
|
73
|
+
enableViewUpdateSubscription: Boolean(typeof ((_props$featureFlags20 = props.featureFlags) === null || _props$featureFlags20 === void 0 ? void 0 : _props$featureFlags20.enableViewUpdateSubscription) === 'boolean' ? !!((_props$featureFlags21 = props.featureFlags) !== null && _props$featureFlags21 !== void 0 && _props$featureFlags21.enableViewUpdateSubscription) : false),
|
|
74
|
+
plainTextPasteLinkification: Boolean(typeof ((_props$featureFlags22 = props.featureFlags) === null || _props$featureFlags22 === void 0 ? void 0 : _props$featureFlags22.plainTextPasteLinkification) === 'boolean' ? !!((_props$featureFlags23 = props.featureFlags) !== null && _props$featureFlags23 !== void 0 && _props$featureFlags23.plainTextPasteLinkification) : false),
|
|
75
|
+
collabAvatarScroll: Boolean(typeof ((_props$featureFlags24 = props.featureFlags) === null || _props$featureFlags24 === void 0 ? void 0 : _props$featureFlags24.collabAvatarScroll) === 'boolean' ? !!((_props$featureFlags25 = props.featureFlags) !== null && _props$featureFlags25 !== void 0 && _props$featureFlags25.collabAvatarScroll) : false),
|
|
76
|
+
ufo: Boolean(typeof ((_props$featureFlags26 = props.featureFlags) === null || _props$featureFlags26 === void 0 ? void 0 : _props$featureFlags26.ufo) === 'boolean' ? !!((_props$featureFlags27 = props.featureFlags) !== null && _props$featureFlags27 !== void 0 && _props$featureFlags27.ufo) : false),
|
|
77
|
+
twoLineEditorToolbar: Boolean(typeof ((_props$featureFlags28 = props.featureFlags) === null || _props$featureFlags28 === void 0 ? void 0 : _props$featureFlags28.twoLineEditorToolbar) === 'boolean' ? !!((_props$featureFlags29 = props.featureFlags) !== null && _props$featureFlags29 !== void 0 && _props$featureFlags29.twoLineEditorToolbar) : false),
|
|
78
|
+
saferDispatchedTransactions: Boolean(typeof normalizedFeatureFlags.saferDispatchedTransactions === 'boolean' && !!normalizedFeatureFlags.saferDispatchedTransactions || (typeof ((_props$featureFlags30 = props.featureFlags) === null || _props$featureFlags30 === void 0 ? void 0 : _props$featureFlags30.saferDispatchedTransactions) === 'boolean' ? !!((_props$featureFlags31 = props.featureFlags) !== null && _props$featureFlags31 !== void 0 && _props$featureFlags31.saferDispatchedTransactions) : false)),
|
|
78
79
|
useNativeCollabPlugin: Boolean(typeof ((_props$collabEdit = props.collabEdit) === null || _props$collabEdit === void 0 ? void 0 : _props$collabEdit.useNativePlugin) === 'boolean' ? !!((_props$collabEdit2 = props.collabEdit) !== null && _props$collabEdit2 !== void 0 && _props$collabEdit2.useNativePlugin) : false),
|
|
79
|
-
chromeCursorHandlerFixedVersion: typeof ((_props$
|
|
80
|
-
viewChangingExperimentToolbarStyle: typeof ((_props$
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
80
|
+
chromeCursorHandlerFixedVersion: typeof ((_props$featureFlags32 = props.featureFlags) === null || _props$featureFlags32 === void 0 ? void 0 : _props$featureFlags32.chromeCursorHandlerFixedVersion) === 'string' ? Number(props.featureFlags.chromeCursorHandlerFixedVersion) || undefined : undefined,
|
|
81
|
+
viewChangingExperimentToolbarStyle: typeof ((_props$featureFlags33 = props.featureFlags) === null || _props$featureFlags33 === void 0 ? void 0 : _props$featureFlags33['view-changing-experiment-toolbar-style']) === 'string' ? props.featureFlags['view-changing-experiment-toolbar-style'] || undefined : undefined,
|
|
82
|
+
tableCellOptionsInFloatingToolbar: typeof tableCellOptionsInFloatingToolbar === 'boolean' ? tableCellOptionsInFloatingToolbar : false,
|
|
83
|
+
showHoverPreview: Boolean(typeof ((_props$featureFlags34 = props.featureFlags) === null || _props$featureFlags34 === void 0 ? void 0 : _props$featureFlags34.showHoverPreview) === 'boolean' ? !!((_props$featureFlags35 = props.featureFlags) !== null && _props$featureFlags35 !== void 0 && _props$featureFlags35.showHoverPreview) : false),
|
|
84
|
+
indentationButtonsInTheToolbar: Boolean(typeof normalizedFeatureFlags.indentationButtonsInTheToolbar === 'boolean' && !!normalizedFeatureFlags.indentationButtonsInTheToolbar || (typeof ((_props$featureFlags36 = props.featureFlags) === null || _props$featureFlags36 === void 0 ? void 0 : _props$featureFlags36.indentationButtonsInTheToolbar) === 'boolean' ? !!((_props$featureFlags37 = props.featureFlags) !== null && _props$featureFlags37 !== void 0 && _props$featureFlags37.indentationButtonsInTheToolbar) : false)),
|
|
85
|
+
floatingToolbarCopyButton: Boolean(typeof normalizedFeatureFlags.floatingToolbarCopyButton === 'boolean' && !!normalizedFeatureFlags.floatingToolbarCopyButton || (typeof ((_props$featureFlags38 = props.featureFlags) === null || _props$featureFlags38 === void 0 ? void 0 : _props$featureFlags38.floatingToolbarCopyButton) === 'boolean' ? !!((_props$featureFlags39 = props.featureFlags) !== null && _props$featureFlags39 !== void 0 && _props$featureFlags39.floatingToolbarCopyButton) : false)),
|
|
86
|
+
floatingToolbarLinkSettingsButton: typeof ((_props$featureFlags40 = props.featureFlags) === null || _props$featureFlags40 === void 0 ? void 0 : _props$featureFlags40['floating-toolbar-link-settings-button']) === 'string' ? props.featureFlags['floating-toolbar-link-settings-button'] || undefined : undefined,
|
|
85
87
|
disableSpellcheckByBrowser: getSpellCheck(props.featureFlags)
|
|
86
88
|
});
|
|
87
89
|
}
|
|
@@ -80,10 +80,14 @@ var Dropdown = /*#__PURE__*/function (_Component) {
|
|
|
80
80
|
isOpen: false
|
|
81
81
|
});
|
|
82
82
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderArrayOptions", function (options) {
|
|
83
|
+
var _this$props = _this.props,
|
|
84
|
+
showSelected = _this$props.showSelected,
|
|
85
|
+
dispatchCommand = _this$props.dispatchCommand;
|
|
83
86
|
return (0, _react2.jsx)(_DropdownMenu.default, {
|
|
84
87
|
hide: _this.hide,
|
|
85
|
-
dispatchCommand:
|
|
86
|
-
items: options
|
|
88
|
+
dispatchCommand: dispatchCommand,
|
|
89
|
+
items: options,
|
|
90
|
+
showSelected: showSelected
|
|
87
91
|
});
|
|
88
92
|
});
|
|
89
93
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "toggleOpen", function () {
|
|
@@ -103,18 +107,19 @@ var Dropdown = /*#__PURE__*/function (_Component) {
|
|
|
103
107
|
key: "render",
|
|
104
108
|
value: function render() {
|
|
105
109
|
var isOpen = this.state.isOpen;
|
|
106
|
-
var _this$
|
|
107
|
-
title = _this$
|
|
108
|
-
icon = _this$
|
|
109
|
-
options = _this$
|
|
110
|
-
dispatchCommand = _this$
|
|
111
|
-
mountPoint = _this$
|
|
112
|
-
boundariesElement = _this$
|
|
113
|
-
scrollableElement = _this$
|
|
114
|
-
hideExpandIcon = _this$
|
|
115
|
-
disabled = _this$
|
|
116
|
-
tooltip = _this$
|
|
117
|
-
buttonTestId = _this$
|
|
110
|
+
var _this$props2 = this.props,
|
|
111
|
+
title = _this$props2.title,
|
|
112
|
+
icon = _this$props2.icon,
|
|
113
|
+
options = _this$props2.options,
|
|
114
|
+
dispatchCommand = _this$props2.dispatchCommand,
|
|
115
|
+
mountPoint = _this$props2.mountPoint,
|
|
116
|
+
boundariesElement = _this$props2.boundariesElement,
|
|
117
|
+
scrollableElement = _this$props2.scrollableElement,
|
|
118
|
+
hideExpandIcon = _this$props2.hideExpandIcon,
|
|
119
|
+
disabled = _this$props2.disabled,
|
|
120
|
+
tooltip = _this$props2.tooltip,
|
|
121
|
+
buttonTestId = _this$props2.buttonTestId,
|
|
122
|
+
dropdownWidth = _this$props2.dropdownWidth;
|
|
118
123
|
var trigger;
|
|
119
124
|
|
|
120
125
|
if (icon) {
|
|
@@ -151,7 +156,7 @@ var Dropdown = /*#__PURE__*/function (_Component) {
|
|
|
151
156
|
|
|
152
157
|
|
|
153
158
|
var fitTolerance = 10;
|
|
154
|
-
var fitWidth = Array.isArray(options) ? _DropdownMenu.menuItemDimensions.width : options.width;
|
|
159
|
+
var fitWidth = Array.isArray(options) ? dropdownWidth || _DropdownMenu.menuItemDimensions.width : options.width;
|
|
155
160
|
var fitHeight = Array.isArray(options) ? options.length * _DropdownMenu.menuItemDimensions.height + _DropdownMenu.itemSpacing * 2 : options.height;
|
|
156
161
|
return (0, _react2.jsx)(_Dropdown.default, {
|
|
157
162
|
mountTo: mountPoint,
|
|
@@ -83,6 +83,7 @@ var Dropdown = /*#__PURE__*/function (_Component) {
|
|
|
83
83
|
var itemContent = (0, _react.jsx)(_menu.ButtonItem, {
|
|
84
84
|
key: idx,
|
|
85
85
|
iconBefore: _this.renderSelected(item, intl),
|
|
86
|
+
iconAfter: item.elemAfter,
|
|
86
87
|
onClick: function onClick() {
|
|
87
88
|
/**
|
|
88
89
|
* The order of dispatching the event and hide() is important, because
|
|
@@ -113,19 +114,21 @@ var Dropdown = /*#__PURE__*/function (_Component) {
|
|
|
113
114
|
}, {
|
|
114
115
|
key: "renderSelected",
|
|
115
116
|
value: function renderSelected(item, intl) {
|
|
117
|
+
var _this$props$showSelec = this.props.showSelected,
|
|
118
|
+
showSelected = _this$props$showSelec === void 0 ? true : _this$props$showSelec;
|
|
116
119
|
var selected = item.selected;
|
|
117
120
|
|
|
118
|
-
if (
|
|
119
|
-
return
|
|
121
|
+
if (showSelected && selected) {
|
|
122
|
+
return (0, _react.jsx)(_done.default, {
|
|
120
123
|
primaryColor: (0, _tokens.token)('color.icon.selected', _colors.B400),
|
|
121
124
|
size: "small",
|
|
122
125
|
label: intl.formatMessage(_messages.default.confirmModalOK)
|
|
123
|
-
}) : (0, _react.jsx)("span", {
|
|
124
|
-
css: spacer
|
|
125
126
|
});
|
|
126
127
|
}
|
|
127
128
|
|
|
128
|
-
return
|
|
129
|
+
return (0, _react.jsx)("span", {
|
|
130
|
+
css: spacer
|
|
131
|
+
});
|
|
129
132
|
}
|
|
130
133
|
}]);
|
|
131
134
|
return Dropdown;
|
|
@@ -140,8 +140,6 @@ var isSameItem = function isSameItem(leftItem, rightItem) {
|
|
|
140
140
|
case 'extensions-placeholder':
|
|
141
141
|
return compareItemWithKeys(leftItem, rightItem);
|
|
142
142
|
}
|
|
143
|
-
|
|
144
|
-
return true;
|
|
145
143
|
};
|
|
146
144
|
|
|
147
145
|
exports.isSameItem = isSameItem;
|
|
@@ -330,7 +328,9 @@ var Toolbar = /*#__PURE__*/function (_Component) {
|
|
|
330
328
|
hideExpandIcon: item.hideExpandIcon,
|
|
331
329
|
mountPoint: popupsMountPoint,
|
|
332
330
|
boundariesElement: popupsBoundariesElement,
|
|
333
|
-
scrollableElement: popupsScrollableElement
|
|
331
|
+
scrollableElement: popupsScrollableElement,
|
|
332
|
+
dropdownWidth: item.dropdownWidth,
|
|
333
|
+
showSelected: item.showSelected
|
|
334
334
|
});
|
|
335
335
|
|
|
336
336
|
case 'select':
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.PastePluginActionTypes = void 0;
|
|
7
|
+
var PastePluginActionTypes;
|
|
8
|
+
exports.PastePluginActionTypes = PastePluginActionTypes;
|
|
9
|
+
|
|
10
|
+
(function (PastePluginActionTypes) {
|
|
11
|
+
PastePluginActionTypes["START_TRACKING_PASTED_MACRO_POSITIONS"] = "START_TRACKING_PASTED_MACRO_POSITIONS";
|
|
12
|
+
PastePluginActionTypes["STOP_TRACKING_PASTED_MACRO_POSITIONS"] = "STOP_TRACKING_PASTED_MACRO_POSITIONS";
|
|
13
|
+
})(PastePluginActionTypes || (exports.PastePluginActionTypes = PastePluginActionTypes = {}));
|