@atlaskit/editor-core 187.48.7 → 187.48.8

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.
Files changed (142) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/cjs/labs/next/presets/default.js +2 -2
  3. package/dist/cjs/plugins/index.js +0 -7
  4. package/dist/cjs/version-wrapper.js +1 -1
  5. package/dist/es2019/labs/next/presets/default.js +1 -1
  6. package/dist/es2019/plugins/index.js +0 -1
  7. package/dist/es2019/version-wrapper.js +1 -1
  8. package/dist/esm/labs/next/presets/default.js +1 -1
  9. package/dist/esm/plugins/index.js +0 -1
  10. package/dist/esm/version-wrapper.js +1 -1
  11. package/dist/types/plugins/index.d.ts +0 -1
  12. package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
  13. package/dist/types/ui/ContentStyles/index.d.ts +2 -2
  14. package/dist/types-ts4.5/plugins/index.d.ts +0 -1
  15. package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
  16. package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +2 -2
  17. package/package.json +3 -3
  18. package/dist/cjs/plugins/floating-toolbar/index.js +0 -386
  19. package/dist/cjs/plugins/floating-toolbar/pm-plugins/force-focus/index.js +0 -73
  20. package/dist/cjs/plugins/floating-toolbar/pm-plugins/toolbar-data/commands.js +0 -26
  21. package/dist/cjs/plugins/floating-toolbar/pm-plugins/toolbar-data/plugin-factory.js +0 -16
  22. package/dist/cjs/plugins/floating-toolbar/pm-plugins/toolbar-data/plugin-key.js +0 -9
  23. package/dist/cjs/plugins/floating-toolbar/pm-plugins/toolbar-data/plugin.js +0 -16
  24. package/dist/cjs/plugins/floating-toolbar/pm-plugins/toolbar-data/reducer.js +0 -25
  25. package/dist/cjs/plugins/floating-toolbar/pm-plugins/toolbar-data/types.js +0 -5
  26. package/dist/cjs/plugins/floating-toolbar/ui/CheckboxModal.js +0 -83
  27. package/dist/cjs/plugins/floating-toolbar/ui/ConfirmationModal.js +0 -22
  28. package/dist/cjs/plugins/floating-toolbar/ui/Dropdown.js +0 -208
  29. package/dist/cjs/plugins/floating-toolbar/ui/DropdownMenu.js +0 -205
  30. package/dist/cjs/plugins/floating-toolbar/ui/EditorEmojiAddIcon.js +0 -32
  31. package/dist/cjs/plugins/floating-toolbar/ui/EmojiPickerButton.js +0 -120
  32. package/dist/cjs/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +0 -179
  33. package/dist/cjs/plugins/floating-toolbar/ui/Input.js +0 -78
  34. package/dist/cjs/plugins/floating-toolbar/ui/ScrollButtons.js +0 -152
  35. package/dist/cjs/plugins/floating-toolbar/ui/Select.js +0 -74
  36. package/dist/cjs/plugins/floating-toolbar/ui/Separator.js +0 -9
  37. package/dist/cjs/plugins/floating-toolbar/ui/SimpleModal.js +0 -42
  38. package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +0 -427
  39. package/dist/cjs/plugins/floating-toolbar/ui/ToolbarLoader.js +0 -25
  40. package/dist/cjs/plugins/floating-toolbar/ui/messages.js +0 -55
  41. package/dist/cjs/plugins/floating-toolbar/ui/styles.js +0 -79
  42. package/dist/cjs/plugins/floating-toolbar/utils.js +0 -22
  43. package/dist/es2019/plugins/floating-toolbar/index.js +0 -368
  44. package/dist/es2019/plugins/floating-toolbar/pm-plugins/force-focus/index.js +0 -63
  45. package/dist/es2019/plugins/floating-toolbar/pm-plugins/toolbar-data/commands.js +0 -10
  46. package/dist/es2019/plugins/floating-toolbar/pm-plugins/toolbar-data/plugin-factory.js +0 -8
  47. package/dist/es2019/plugins/floating-toolbar/pm-plugins/toolbar-data/plugin-key.js +0 -2
  48. package/dist/es2019/plugins/floating-toolbar/pm-plugins/toolbar-data/plugin.js +0 -9
  49. package/dist/es2019/plugins/floating-toolbar/pm-plugins/toolbar-data/reducer.js +0 -16
  50. package/dist/es2019/plugins/floating-toolbar/pm-plugins/toolbar-data/types.js +0 -1
  51. package/dist/es2019/plugins/floating-toolbar/ui/CheckboxModal.js +0 -71
  52. package/dist/es2019/plugins/floating-toolbar/ui/ConfirmationModal.js +0 -13
  53. package/dist/es2019/plugins/floating-toolbar/ui/Dropdown.js +0 -180
  54. package/dist/es2019/plugins/floating-toolbar/ui/DropdownMenu.js +0 -191
  55. package/dist/es2019/plugins/floating-toolbar/ui/EditorEmojiAddIcon.js +0 -25
  56. package/dist/es2019/plugins/floating-toolbar/ui/EmojiPickerButton.js +0 -107
  57. package/dist/es2019/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +0 -100
  58. package/dist/es2019/plugins/floating-toolbar/ui/Input.js +0 -52
  59. package/dist/es2019/plugins/floating-toolbar/ui/ScrollButtons.js +0 -137
  60. package/dist/es2019/plugins/floating-toolbar/ui/Select.js +0 -62
  61. package/dist/es2019/plugins/floating-toolbar/ui/Separator.js +0 -2
  62. package/dist/es2019/plugins/floating-toolbar/ui/SimpleModal.js +0 -35
  63. package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +0 -419
  64. package/dist/es2019/plugins/floating-toolbar/ui/ToolbarLoader.js +0 -6
  65. package/dist/es2019/plugins/floating-toolbar/ui/messages.js +0 -48
  66. package/dist/es2019/plugins/floating-toolbar/ui/styles.js +0 -64
  67. package/dist/es2019/plugins/floating-toolbar/utils.js +0 -16
  68. package/dist/esm/plugins/floating-toolbar/index.js +0 -375
  69. package/dist/esm/plugins/floating-toolbar/pm-plugins/force-focus/index.js +0 -64
  70. package/dist/esm/plugins/floating-toolbar/pm-plugins/toolbar-data/commands.js +0 -18
  71. package/dist/esm/plugins/floating-toolbar/pm-plugins/toolbar-data/plugin-factory.js +0 -8
  72. package/dist/esm/plugins/floating-toolbar/pm-plugins/toolbar-data/plugin-key.js +0 -2
  73. package/dist/esm/plugins/floating-toolbar/pm-plugins/toolbar-data/plugin.js +0 -9
  74. package/dist/esm/plugins/floating-toolbar/pm-plugins/toolbar-data/reducer.js +0 -17
  75. package/dist/esm/plugins/floating-toolbar/pm-plugins/toolbar-data/types.js +0 -1
  76. package/dist/esm/plugins/floating-toolbar/ui/CheckboxModal.js +0 -72
  77. package/dist/esm/plugins/floating-toolbar/ui/ConfirmationModal.js +0 -14
  78. package/dist/esm/plugins/floating-toolbar/ui/Dropdown.js +0 -199
  79. package/dist/esm/plugins/floating-toolbar/ui/DropdownMenu.js +0 -197
  80. package/dist/esm/plugins/floating-toolbar/ui/EditorEmojiAddIcon.js +0 -25
  81. package/dist/esm/plugins/floating-toolbar/ui/EmojiPickerButton.js +0 -113
  82. package/dist/esm/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +0 -168
  83. package/dist/esm/plugins/floating-toolbar/ui/Input.js +0 -70
  84. package/dist/esm/plugins/floating-toolbar/ui/ScrollButtons.js +0 -141
  85. package/dist/esm/plugins/floating-toolbar/ui/Select.js +0 -64
  86. package/dist/esm/plugins/floating-toolbar/ui/Separator.js +0 -2
  87. package/dist/esm/plugins/floating-toolbar/ui/SimpleModal.js +0 -31
  88. package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +0 -417
  89. package/dist/esm/plugins/floating-toolbar/ui/ToolbarLoader.js +0 -12
  90. package/dist/esm/plugins/floating-toolbar/ui/messages.js +0 -48
  91. package/dist/esm/plugins/floating-toolbar/ui/styles.js +0 -68
  92. package/dist/esm/plugins/floating-toolbar/utils.js +0 -16
  93. package/dist/types/plugins/floating-toolbar/index.d.ts +0 -13
  94. package/dist/types/plugins/floating-toolbar/pm-plugins/force-focus/index.d.ts +0 -21
  95. package/dist/types/plugins/floating-toolbar/pm-plugins/toolbar-data/commands.d.ts +0 -3
  96. package/dist/types/plugins/floating-toolbar/pm-plugins/toolbar-data/plugin-factory.d.ts +0 -1
  97. package/dist/types/plugins/floating-toolbar/pm-plugins/toolbar-data/plugin-key.d.ts +0 -3
  98. package/dist/types/plugins/floating-toolbar/pm-plugins/toolbar-data/plugin.d.ts +0 -3
  99. package/dist/types/plugins/floating-toolbar/pm-plugins/toolbar-data/reducer.d.ts +0 -3
  100. package/dist/types/plugins/floating-toolbar/pm-plugins/toolbar-data/types.d.ts +0 -8
  101. package/dist/types/plugins/floating-toolbar/ui/CheckboxModal.d.ts +0 -4
  102. package/dist/types/plugins/floating-toolbar/ui/ConfirmationModal.d.ts +0 -6
  103. package/dist/types/plugins/floating-toolbar/ui/Dropdown.d.ts +0 -41
  104. package/dist/types/plugins/floating-toolbar/ui/DropdownMenu.d.ts +0 -29
  105. package/dist/types/plugins/floating-toolbar/ui/EditorEmojiAddIcon.d.ts +0 -2
  106. package/dist/types/plugins/floating-toolbar/ui/EmojiPickerButton.d.ts +0 -15
  107. package/dist/types/plugins/floating-toolbar/ui/ExtensionsPlaceholder.d.ts +0 -16
  108. package/dist/types/plugins/floating-toolbar/ui/Input.d.ts +0 -23
  109. package/dist/types/plugins/floating-toolbar/ui/ScrollButtons.d.ts +0 -13
  110. package/dist/types/plugins/floating-toolbar/ui/Select.d.ts +0 -21
  111. package/dist/types/plugins/floating-toolbar/ui/Separator.d.ts +0 -2
  112. package/dist/types/plugins/floating-toolbar/ui/SimpleModal.d.ts +0 -4
  113. package/dist/types/plugins/floating-toolbar/ui/Toolbar.d.ts +0 -44
  114. package/dist/types/plugins/floating-toolbar/ui/ToolbarLoader.d.ts +0 -4
  115. package/dist/types/plugins/floating-toolbar/ui/messages.d.ts +0 -48
  116. package/dist/types/plugins/floating-toolbar/ui/styles.d.ts +0 -20
  117. package/dist/types/plugins/floating-toolbar/utils.d.ts +0 -2
  118. package/dist/types-ts4.5/plugins/floating-toolbar/index.d.ts +0 -13
  119. package/dist/types-ts4.5/plugins/floating-toolbar/pm-plugins/force-focus/index.d.ts +0 -21
  120. package/dist/types-ts4.5/plugins/floating-toolbar/pm-plugins/toolbar-data/commands.d.ts +0 -3
  121. package/dist/types-ts4.5/plugins/floating-toolbar/pm-plugins/toolbar-data/plugin-factory.d.ts +0 -1
  122. package/dist/types-ts4.5/plugins/floating-toolbar/pm-plugins/toolbar-data/plugin-key.d.ts +0 -3
  123. package/dist/types-ts4.5/plugins/floating-toolbar/pm-plugins/toolbar-data/plugin.d.ts +0 -3
  124. package/dist/types-ts4.5/plugins/floating-toolbar/pm-plugins/toolbar-data/reducer.d.ts +0 -3
  125. package/dist/types-ts4.5/plugins/floating-toolbar/pm-plugins/toolbar-data/types.d.ts +0 -8
  126. package/dist/types-ts4.5/plugins/floating-toolbar/ui/CheckboxModal.d.ts +0 -4
  127. package/dist/types-ts4.5/plugins/floating-toolbar/ui/ConfirmationModal.d.ts +0 -6
  128. package/dist/types-ts4.5/plugins/floating-toolbar/ui/Dropdown.d.ts +0 -41
  129. package/dist/types-ts4.5/plugins/floating-toolbar/ui/DropdownMenu.d.ts +0 -29
  130. package/dist/types-ts4.5/plugins/floating-toolbar/ui/EditorEmojiAddIcon.d.ts +0 -2
  131. package/dist/types-ts4.5/plugins/floating-toolbar/ui/EmojiPickerButton.d.ts +0 -15
  132. package/dist/types-ts4.5/plugins/floating-toolbar/ui/ExtensionsPlaceholder.d.ts +0 -16
  133. package/dist/types-ts4.5/plugins/floating-toolbar/ui/Input.d.ts +0 -23
  134. package/dist/types-ts4.5/plugins/floating-toolbar/ui/ScrollButtons.d.ts +0 -13
  135. package/dist/types-ts4.5/plugins/floating-toolbar/ui/Select.d.ts +0 -21
  136. package/dist/types-ts4.5/plugins/floating-toolbar/ui/Separator.d.ts +0 -2
  137. package/dist/types-ts4.5/plugins/floating-toolbar/ui/SimpleModal.d.ts +0 -4
  138. package/dist/types-ts4.5/plugins/floating-toolbar/ui/Toolbar.d.ts +0 -44
  139. package/dist/types-ts4.5/plugins/floating-toolbar/ui/ToolbarLoader.d.ts +0 -4
  140. package/dist/types-ts4.5/plugins/floating-toolbar/ui/messages.d.ts +0 -48
  141. package/dist/types-ts4.5/plugins/floating-toolbar/ui/styles.d.ts +0 -20
  142. package/dist/types-ts4.5/plugins/floating-toolbar/utils.d.ts +0 -2
@@ -1,386 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- var _typeof = require("@babel/runtime/helpers/typeof");
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.pluginKey = exports.getRelevantConfig = exports.default = void 0;
9
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
- var _react = _interopRequireDefault(require("react"));
11
- var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
12
- var _state = require("@atlaskit/editor-prosemirror/state");
13
- var _utils = require("@atlaskit/editor-prosemirror/utils");
14
- var _camelCase = _interopRequireDefault(require("lodash/camelCase"));
15
- var _ui = require("@atlaskit/editor-common/ui");
16
- var _providerFactory = require("@atlaskit/editor-common/provider-factory");
17
- var _types = require("../analytics/types");
18
- var _analytics = require("@atlaskit/editor-common/analytics");
19
- var _pluginKey = require("./pm-plugins/toolbar-data/plugin-key");
20
- var _plugin = require("./pm-plugins/toolbar-data/plugin");
21
- var _commands = require("./pm-plugins/toolbar-data/commands");
22
- var _ConfirmationModal = require("./ui/ConfirmationModal");
23
- var _ToolbarLoader = require("./ui/ToolbarLoader");
24
- var _utils2 = require("./utils");
25
- var _errorBoundary = require("@atlaskit/editor-common/error-boundary");
26
- var _forceFocus = _interopRequireWildcard(require("./pm-plugins/force-focus"));
27
- var _hooks = require("@atlaskit/editor-common/hooks");
28
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
29
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
30
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
31
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } // AFP-2532 TODO: Fix automatic suppressions below
32
- // eslint-disable-next-line @atlassian/tangerine/import/entry-points
33
- var getRelevantConfig = function getRelevantConfig(selection, configs) {
34
- // node selections always take precedence, see if
35
- var configPair;
36
- configs.find(function (config) {
37
- var node = (0, _utils.findSelectedNodeOfType)(config.nodeType)(selection);
38
- if (node) {
39
- configPair = {
40
- node: node.node,
41
- pos: node.pos,
42
- config: config
43
- };
44
- }
45
- return !!node;
46
- });
47
- if (configPair) {
48
- return configPair;
49
- }
50
-
51
- // create mapping of node type name to configs
52
- var configByNodeType = {};
53
- configs.forEach(function (config) {
54
- if (Array.isArray(config.nodeType)) {
55
- config.nodeType.forEach(function (nodeType) {
56
- configByNodeType[nodeType.name] = config;
57
- });
58
- } else {
59
- configByNodeType[config.nodeType.name] = config;
60
- }
61
- });
62
-
63
- // search up the tree from selection
64
- var $from = selection.$from;
65
- for (var i = $from.depth; i > 0; i--) {
66
- var node = $from.node(i);
67
- var matchedConfig = configByNodeType[node.type.name];
68
- if (matchedConfig) {
69
- return {
70
- config: matchedConfig,
71
- node: node,
72
- pos: $from.pos
73
- };
74
- }
75
- }
76
-
77
- // if it is AllSelection (can be result of Cmd+A) - use first node
78
- if (selection instanceof _state.AllSelection) {
79
- var docNode = $from.node(0);
80
- var _matchedConfig = null;
81
- var firstChild = (0, _utils2.findNode)(docNode, function (node) {
82
- _matchedConfig = configByNodeType[node.type.name];
83
- return !!_matchedConfig;
84
- });
85
- if (firstChild && _matchedConfig) {
86
- return {
87
- config: _matchedConfig,
88
- node: firstChild,
89
- pos: $from.pos
90
- };
91
- }
92
- }
93
- return;
94
- };
95
- exports.getRelevantConfig = getRelevantConfig;
96
- var getDomRefFromSelection = function getDomRefFromSelection(view, dispatchAnalyticsEvent) {
97
- try {
98
- return (0, _utils.findDomRefAtPos)(view.state.selection.from, view.domAtPos.bind(view));
99
- } catch (error) {
100
- // eslint-disable-next-line no-console
101
- console.warn(error);
102
- if (dispatchAnalyticsEvent) {
103
- var payload = {
104
- action: _analytics.ACTION.ERRORED,
105
- actionSubject: _analytics.ACTION_SUBJECT.CONTENT_COMPONENT,
106
- eventType: _analytics.EVENT_TYPE.OPERATIONAL,
107
- attributes: {
108
- component: _types.CONTENT_COMPONENT.FLOATING_TOOLBAR,
109
- selection: view.state.selection.toJSON(),
110
- position: view.state.selection.from,
111
- docSize: view.state.doc.nodeSize,
112
- error: error.toString(),
113
- errorStack: error.stack || undefined
114
- }
115
- };
116
- dispatchAnalyticsEvent(payload);
117
- }
118
- }
119
- };
120
- function filterUndefined(x) {
121
- return !!x;
122
- }
123
- var floatingToolbarPlugin = function floatingToolbarPlugin(_ref) {
124
- var api = _ref.api;
125
- return {
126
- name: 'floatingToolbar',
127
- pmPlugins: function pmPlugins() {
128
- var floatingToolbarHandlers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
129
- return [{
130
- // Should be after all toolbar plugins
131
- name: 'floatingToolbar',
132
- plugin: function plugin(_ref2) {
133
- var dispatch = _ref2.dispatch,
134
- providerFactory = _ref2.providerFactory,
135
- getIntl = _ref2.getIntl;
136
- return floatingToolbarPluginFactory({
137
- floatingToolbarHandlers: floatingToolbarHandlers,
138
- dispatch: dispatch,
139
- providerFactory: providerFactory,
140
- getIntl: getIntl
141
- });
142
- }
143
- }, {
144
- name: 'floatingToolbarData',
145
- plugin: function plugin(_ref3) {
146
- var dispatch = _ref3.dispatch;
147
- return (0, _plugin.createPlugin)(dispatch);
148
- }
149
- }, {
150
- name: 'forceFocus',
151
- plugin: function plugin() {
152
- return (0, _forceFocus.default)();
153
- }
154
- }];
155
- },
156
- actions: {
157
- forceFocusSelector: _forceFocus.forceFocusSelector
158
- },
159
- getSharedState: function getSharedState(editorState) {
160
- var _pluginKey$getState$g, _pluginKey$getState, _pluginKey$getState$g2;
161
- if (!editorState) {
162
- return undefined;
163
- }
164
- var configWithNodeInfo = (_pluginKey$getState$g = (_pluginKey$getState = pluginKey.getState(editorState)) === null || _pluginKey$getState === void 0 ? void 0 : (_pluginKey$getState$g2 = _pluginKey$getState.getConfigWithNodeInfo) === null || _pluginKey$getState$g2 === void 0 ? void 0 : _pluginKey$getState$g2.call(_pluginKey$getState, editorState)) !== null && _pluginKey$getState$g !== void 0 ? _pluginKey$getState$g : undefined;
165
- return {
166
- configWithNodeInfo: configWithNodeInfo,
167
- floatingToolbarData: _pluginKey.pluginKey.getState(editorState)
168
- };
169
- },
170
- contentComponent: function contentComponent(_ref4) {
171
- var popupsMountPoint = _ref4.popupsMountPoint,
172
- popupsBoundariesElement = _ref4.popupsBoundariesElement,
173
- popupsScrollableElement = _ref4.popupsScrollableElement,
174
- editorView = _ref4.editorView,
175
- providerFactory = _ref4.providerFactory,
176
- dispatchAnalyticsEvent = _ref4.dispatchAnalyticsEvent;
177
- return /*#__PURE__*/_react.default.createElement(ContentComponent, {
178
- editorView: editorView,
179
- pluginInjectionApi: api,
180
- popupsMountPoint: popupsMountPoint,
181
- popupsBoundariesElement: popupsBoundariesElement,
182
- popupsScrollableElement: popupsScrollableElement,
183
- providerFactory: providerFactory,
184
- dispatchAnalyticsEvent: dispatchAnalyticsEvent
185
- });
186
- }
187
- };
188
- };
189
- function ContentComponent(_ref5) {
190
- var _pluginInjectionApi$f, _configWithNodeInfo$c, _configWithNodeInfo$c2;
191
- var pluginInjectionApi = _ref5.pluginInjectionApi,
192
- editorView = _ref5.editorView,
193
- popupsMountPoint = _ref5.popupsMountPoint,
194
- popupsBoundariesElement = _ref5.popupsBoundariesElement,
195
- popupsScrollableElement = _ref5.popupsScrollableElement,
196
- providerFactory = _ref5.providerFactory,
197
- dispatchAnalyticsEvent = _ref5.dispatchAnalyticsEvent;
198
- var featureFlags = (pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$f = pluginInjectionApi.featureFlags) === null || _pluginInjectionApi$f === void 0 ? void 0 : _pluginInjectionApi$f.sharedState.currentState()) || {};
199
- var _useSharedPluginState = (0, _hooks.useSharedPluginState)(pluginInjectionApi, ['floatingToolbar', 'editorDisabled']),
200
- floatingToolbarState = _useSharedPluginState.floatingToolbarState,
201
- editorDisabledState = _useSharedPluginState.editorDisabledState;
202
- var _ref6 = floatingToolbarState !== null && floatingToolbarState !== void 0 ? floatingToolbarState : {},
203
- configWithNodeInfo = _ref6.configWithNodeInfo,
204
- floatingToolbarData = _ref6.floatingToolbarData;
205
- if (!configWithNodeInfo || !configWithNodeInfo.config || typeof ((_configWithNodeInfo$c = configWithNodeInfo.config) === null || _configWithNodeInfo$c === void 0 ? void 0 : _configWithNodeInfo$c.visible) !== 'undefined' && !((_configWithNodeInfo$c2 = configWithNodeInfo.config) !== null && _configWithNodeInfo$c2 !== void 0 && _configWithNodeInfo$c2.visible)) {
206
- return null;
207
- }
208
- var config = configWithNodeInfo.config,
209
- node = configWithNodeInfo.node;
210
- var title = config.title,
211
- _config$getDomRef = config.getDomRef,
212
- getDomRef = _config$getDomRef === void 0 ? getDomRefFromSelection : _config$getDomRef,
213
- items = config.items,
214
- _config$align = config.align,
215
- align = _config$align === void 0 ? 'center' : _config$align,
216
- _config$className = config.className,
217
- className = _config$className === void 0 ? '' : _config$className,
218
- height = config.height,
219
- width = config.width,
220
- zIndex = config.zIndex,
221
- _config$offset = config.offset,
222
- offset = _config$offset === void 0 ? [0, 12] : _config$offset,
223
- forcePlacement = config.forcePlacement,
224
- preventPopupOverflow = config.preventPopupOverflow,
225
- onPositionCalculated = config.onPositionCalculated,
226
- _config$absoluteOffse = config.absoluteOffset,
227
- absoluteOffset = _config$absoluteOffse === void 0 ? {
228
- top: 0,
229
- left: 0,
230
- right: 0,
231
- bottom: 0
232
- } : _config$absoluteOffse,
233
- focusTrap = config.focusTrap;
234
- var targetRef = getDomRef(editorView, dispatchAnalyticsEvent);
235
- if (!targetRef || editorDisabledState && editorDisabledState.editorDisabled) {
236
- return null;
237
- }
238
- var customPositionCalculation;
239
- var toolbarItems = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.copyButton.actions.processCopyButtonItems(editorView.state)(Array.isArray(items) ? items : items(node), pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.decorations.actions.hoverDecoration);
240
- if (onPositionCalculated) {
241
- customPositionCalculation = function customPositionCalculation(nextPos) {
242
- return onPositionCalculated(editorView, nextPos);
243
- };
244
- }
245
- var dispatchCommand = function dispatchCommand(fn) {
246
- return fn && fn(editorView.state, editorView.dispatch, editorView);
247
- };
248
-
249
- // Confirm dialog
250
- var _ref7 = floatingToolbarData || {},
251
- confirmDialogForItem = _ref7.confirmDialogForItem;
252
- var confirmButtonItem = confirmDialogForItem ? toolbarItems[confirmDialogForItem] : undefined;
253
- var scrollable = config.scrollable;
254
- var confirmDialogOptions = typeof (confirmButtonItem === null || confirmButtonItem === void 0 ? void 0 : confirmButtonItem.confirmDialog) === 'function' ? confirmButtonItem === null || confirmButtonItem === void 0 ? void 0 : confirmButtonItem.confirmDialog() : confirmButtonItem === null || confirmButtonItem === void 0 ? void 0 : confirmButtonItem.confirmDialog;
255
- return /*#__PURE__*/_react.default.createElement(_errorBoundary.ErrorBoundary, {
256
- component: _analytics.ACTION_SUBJECT.FLOATING_TOOLBAR_PLUGIN,
257
- componentId: (0, _camelCase.default)(title),
258
- dispatchAnalyticsEvent: dispatchAnalyticsEvent,
259
- fallbackComponent: null
260
- }, /*#__PURE__*/_react.default.createElement(_ui.Popup, {
261
- ariaLabel: title,
262
- offset: offset,
263
- target: targetRef,
264
- alignY: "bottom",
265
- forcePlacement: forcePlacement,
266
- fitHeight: height,
267
- fitWidth: width,
268
- absoluteOffset: absoluteOffset,
269
- alignX: align,
270
- stick: true,
271
- zIndex: zIndex,
272
- mountTo: popupsMountPoint,
273
- boundariesElement: popupsBoundariesElement,
274
- scrollableElement: popupsScrollableElement,
275
- onPositionCalculated: customPositionCalculation,
276
- style: scrollable ? {
277
- maxWidth: '100%'
278
- } : {},
279
- focusTrap: focusTrap,
280
- preventOverflow: preventPopupOverflow
281
- }, /*#__PURE__*/_react.default.createElement(_providerFactory.WithProviders, {
282
- providerFactory: providerFactory,
283
- providers: ['extensionProvider'],
284
- renderNode: function renderNode(providers) {
285
- return /*#__PURE__*/_react.default.createElement(_ToolbarLoader.ToolbarLoader, {
286
- target: targetRef,
287
- items: toolbarItems,
288
- node: node,
289
- dispatchCommand: dispatchCommand,
290
- editorView: editorView,
291
- className: className,
292
- focusEditor: function focusEditor() {
293
- return editorView.focus();
294
- },
295
- providerFactory: providerFactory,
296
- popupsMountPoint: popupsMountPoint,
297
- popupsBoundariesElement: popupsBoundariesElement,
298
- popupsScrollableElement: popupsScrollableElement,
299
- dispatchAnalyticsEvent: dispatchAnalyticsEvent,
300
- extensionsProvider: providers.extensionProvider,
301
- scrollable: scrollable,
302
- featureFlags: featureFlags,
303
- api: pluginInjectionApi
304
- });
305
- }
306
- })), /*#__PURE__*/_react.default.createElement(_ConfirmationModal.ConfirmationModal, {
307
- testId: "ak-floating-toolbar-confirmation-modal",
308
- options: confirmDialogOptions,
309
- onConfirm: function onConfirm() {
310
- var isChecked = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
311
- if (!!confirmDialogOptions.onConfirm) {
312
- dispatchCommand(confirmDialogOptions.onConfirm(isChecked));
313
- } else {
314
- dispatchCommand(confirmButtonItem.onClick);
315
- }
316
- },
317
- onClose: function onClose() {
318
- dispatchCommand((0, _commands.hideConfirmDialog)());
319
- // Need to set focus to Editor here,
320
- // As when the Confirmation dialog pop up, and user interacts with the dialog, Editor loses focus.
321
- // So when Confirmation dialog is closed, Editor does not have the focus, then cursor goes to the position 1 of the doc,
322
- // instead of the cursor position before the dialog pop up.
323
- if (!editorView.hasFocus()) {
324
- editorView.focus();
325
- }
326
- }
327
- }));
328
- }
329
- var _default = floatingToolbarPlugin;
330
- /**
331
- *
332
- * ProseMirror Plugin
333
- *
334
- */
335
- // We throttle update of this plugin with RAF.
336
- // So from other plugins you will always get the previous state.
337
- exports.default = _default;
338
- var pluginKey = new _state.PluginKey('floatingToolbarPluginKey');
339
-
340
- /**
341
- * Clean up floating toolbar configs from undesired properties.
342
- */
343
- exports.pluginKey = pluginKey;
344
- function sanitizeFloatingToolbarConfig(config) {
345
- // Cleanup from non existing node types
346
- if (Array.isArray(config.nodeType)) {
347
- return _objectSpread(_objectSpread({}, config), {}, {
348
- nodeType: config.nodeType.filter(filterUndefined)
349
- });
350
- }
351
- return config;
352
- }
353
- function floatingToolbarPluginFactory(options) {
354
- var floatingToolbarHandlers = options.floatingToolbarHandlers,
355
- providerFactory = options.providerFactory,
356
- getIntl = options.getIntl;
357
- var intl = getIntl();
358
- var getConfigWithNodeInfo = function getConfigWithNodeInfo(editorState) {
359
- var activeConfigs = floatingToolbarHandlers.map(function (handler) {
360
- return handler(editorState, intl, providerFactory);
361
- }).filter(filterUndefined).map(function (config) {
362
- return sanitizeFloatingToolbarConfig(config);
363
- });
364
- var relevantConfig = activeConfigs && getRelevantConfig(editorState.selection, activeConfigs);
365
- return relevantConfig;
366
- };
367
- var apply = function apply(tr, pluginState) {
368
- var newPluginState = {
369
- getConfigWithNodeInfo: getConfigWithNodeInfo
370
- };
371
- return newPluginState;
372
- };
373
- return new _safePlugin.SafePlugin({
374
- key: pluginKey,
375
- state: {
376
- init: function init() {
377
- // Use this point to preload the UI
378
- _ToolbarLoader.ToolbarLoader.preload();
379
- return {
380
- getConfigWithNodeInfo: getConfigWithNodeInfo
381
- };
382
- },
383
- apply: apply
384
- }
385
- });
386
- }
@@ -1,73 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.checkShouldForceFocusAndApply = checkShouldForceFocusAndApply;
7
- exports.forceFocusStateKey = exports.forceFocusSelector = exports.default = void 0;
8
- var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
9
- var _state = require("@atlaskit/editor-prosemirror/state");
10
- var forceFocusStateKey = new _state.PluginKey('forceFocusStatePlugin');
11
- /**
12
- * Used in cases where a floating toolbar button opens a submenu which destroys
13
- * the button, but the user has pressed ESC to close the submenu and focus needs
14
- * to move back to the button. */
15
- exports.forceFocusStateKey = forceFocusStateKey;
16
- var _default = function _default() {
17
- return new _safePlugin.SafePlugin({
18
- key: forceFocusStateKey,
19
- state: {
20
- init: function init() {
21
- return {
22
- selector: null
23
- };
24
- },
25
- apply: function apply(tr, prevState) {
26
- var meta = tr.getMeta(forceFocusStateKey);
27
- if (meta && 'selector' in meta) {
28
- return {
29
- selector: meta.selector
30
- };
31
- }
32
- return prevState;
33
- }
34
- }
35
- });
36
- };
37
- /**
38
- * The provided selector should be the floating toolbar button that needs focus.
39
- */
40
- exports.default = _default;
41
- var forceFocusSelector = function forceFocusSelector(selector) {
42
- return function (tr) {
43
- return tr.setMeta(forceFocusStateKey, {
44
- selector: selector
45
- });
46
- };
47
- };
48
-
49
- /**
50
- * If a selector is set and the element exists, focus it.
51
- */
52
- exports.forceFocusSelector = forceFocusSelector;
53
- function checkShouldForceFocusAndApply(view) {
54
- var state = view === null || view === void 0 ? void 0 : view.state;
55
- if (state) {
56
- var _forceFocusStateKey$g = forceFocusStateKey.getState(state),
57
- selector = _forceFocusStateKey$g.selector;
58
- if (selector) {
59
- var focusableElement = document.querySelector(selector);
60
- if (focusableElement) {
61
- focusableElement.scrollIntoView({
62
- behavior: 'smooth',
63
- block: 'center',
64
- inline: 'nearest'
65
- });
66
- focusableElement.focus();
67
- var tr = view.state.tr,
68
- dispatch = view.dispatch;
69
- dispatch(forceFocusSelector(null)(tr));
70
- }
71
- }
72
- }
73
- }
@@ -1,26 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.showConfirmDialog = exports.hideConfirmDialog = void 0;
7
- var _pluginFactory = require("./plugin-factory");
8
- var showConfirmDialog = function showConfirmDialog(buttonIndex) {
9
- return (0, _pluginFactory.createCommand)({
10
- type: 'SHOW_CONFIRM_DIALOG',
11
- data: {
12
- buttonIndex: buttonIndex
13
- }
14
- }, function (tr) {
15
- return tr.setMeta('addToHistory', false);
16
- });
17
- };
18
- exports.showConfirmDialog = showConfirmDialog;
19
- var hideConfirmDialog = function hideConfirmDialog() {
20
- return (0, _pluginFactory.createCommand)({
21
- type: 'HIDE_CONFIRM_DIALOG'
22
- }, function (tr) {
23
- return tr.setMeta('addToHistory', false);
24
- });
25
- };
26
- exports.hideConfirmDialog = hideConfirmDialog;
@@ -1,16 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getPluginState = exports.createPluginState = exports.createCommand = void 0;
7
- var _utils = require("@atlaskit/editor-common/utils");
8
- var _pluginKey = require("./plugin-key");
9
- var _reducer = require("./reducer");
10
- var _pluginFactory = (0, _utils.pluginFactory)(_pluginKey.pluginKey, _reducer.reducer),
11
- createPluginState = _pluginFactory.createPluginState,
12
- createCommand = _pluginFactory.createCommand,
13
- getPluginState = _pluginFactory.getPluginState;
14
- exports.getPluginState = getPluginState;
15
- exports.createCommand = createCommand;
16
- exports.createPluginState = createPluginState;
@@ -1,9 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.pluginKey = void 0;
7
- var _state = require("@atlaskit/editor-prosemirror/state");
8
- var pluginKey = new _state.PluginKey('floatingToolbarData');
9
- exports.pluginKey = pluginKey;
@@ -1,16 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.createPlugin = void 0;
7
- var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
8
- var _pluginKey = require("./plugin-key");
9
- var _pluginFactory = require("./plugin-factory");
10
- var createPlugin = function createPlugin(dispatch) {
11
- return new _safePlugin.SafePlugin({
12
- state: (0, _pluginFactory.createPluginState)(dispatch, {}),
13
- key: _pluginKey.pluginKey
14
- });
15
- };
16
- exports.createPlugin = createPlugin;
@@ -1,25 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.reducer = void 0;
8
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
10
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
11
- var reducer = function reducer(pluginState, action) {
12
- switch (action.type) {
13
- case 'SHOW_CONFIRM_DIALOG':
14
- return _objectSpread(_objectSpread({}, pluginState), {}, {
15
- confirmDialogForItem: action.data.buttonIndex
16
- });
17
- case 'HIDE_CONFIRM_DIALOG':
18
- return _objectSpread(_objectSpread({}, pluginState), {}, {
19
- confirmDialogForItem: undefined
20
- });
21
- default:
22
- return pluginState;
23
- }
24
- };
25
- exports.reducer = reducer;
@@ -1,5 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
@@ -1,83 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- var _typeof = require("@babel/runtime/helpers/typeof");
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.CheckboxModal = void 0;
9
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
11
- var _react = _interopRequireWildcard(require("react"));
12
- var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
13
- var _checkbox = require("@atlaskit/checkbox");
14
- var _modalDialog = _interopRequireWildcard(require("@atlaskit/modal-dialog"));
15
- var _messages = _interopRequireDefault(require("./messages"));
16
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
18
- var CheckboxModal = function CheckboxModal(props) {
19
- var _options$getChildrenI;
20
- var _useState = (0, _react.useState)(false),
21
- _useState2 = (0, _slicedToArray2.default)(_useState, 2),
22
- isChecked = _useState2[0],
23
- setCheckbox = _useState2[1];
24
- var onConfirm = props.onConfirm,
25
- onClose = props.onClose,
26
- options = props.options,
27
- formatMessage = props.intl.formatMessage,
28
- testId = props.testId;
29
- var heading = (options === null || options === void 0 ? void 0 : options.title) || formatMessage(_messages.default.confirmModalDefaultHeading);
30
- var okButtonLabel = (options === null || options === void 0 ? void 0 : options.okButtonLabel) || formatMessage(_messages.default.confirmModalOK);
31
- var cancelButtonLabel = (options === null || options === void 0 ? void 0 : options.cancelButtonLabel) || formatMessage(_messages.default.confirmModalCancel);
32
- var checkboxlabel = options === null || options === void 0 ? void 0 : options.checkboxLabel;
33
- var childrenInfo = options === null || options === void 0 ? void 0 : (_options$getChildrenI = options.getChildrenInfo) === null || _options$getChildrenI === void 0 ? void 0 : _options$getChildrenI.call(options);
34
- var ListComponent = function ListComponent(_ref) {
35
- var nodes = _ref.nodes;
36
- if (nodes.length === 0) {
37
- return null;
38
- }
39
- return /*#__PURE__*/_react.default.createElement("ul", null, nodes.map(function (node) {
40
- return /*#__PURE__*/_react.default.createElement(ListItem, (0, _extends2.default)({}, node, {
41
- key: node.id
42
- }));
43
- }));
44
- };
45
- var ListItem = function ListItem(props) {
46
- var id = props.id,
47
- name = props.name,
48
- amount = props.amount;
49
- return /*#__PURE__*/_react.default.createElement("li", {
50
- id: id
51
- }, formatMessage(_messages.default.confirmModalListUnit, {
52
- name: name,
53
- amount: amount
54
- }));
55
- };
56
- return /*#__PURE__*/_react.default.createElement(_modalDialog.default, {
57
- onClose: onClose,
58
- testId: testId
59
- }, /*#__PURE__*/_react.default.createElement(_modalDialog.ModalHeader, null, /*#__PURE__*/_react.default.createElement(_modalDialog.ModalTitle, {
60
- appearance: "warning"
61
- }, heading)), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalBody, null, /*#__PURE__*/_react.default.createElement("p", null, options === null || options === void 0 ? void 0 : options.message), !!(childrenInfo !== null && childrenInfo !== void 0 && childrenInfo.length) && /*#__PURE__*/_react.default.createElement(ListComponent, {
62
- nodes: childrenInfo
63
- }), /*#__PURE__*/_react.default.createElement("p", null, /*#__PURE__*/_react.default.createElement(_checkbox.Checkbox, {
64
- isChecked: isChecked,
65
- onChange: function onChange() {
66
- return setCheckbox(!isChecked);
67
- },
68
- label: checkboxlabel,
69
- testId: testId ? "".concat(testId, "-checkbox") : undefined
70
- }))), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalFooter, null, /*#__PURE__*/_react.default.createElement(_standardButton.default, {
71
- appearance: "default",
72
- onClick: onClose,
73
- testId: testId ? "".concat(testId, "-cancel-button") : undefined
74
- }, cancelButtonLabel), /*#__PURE__*/_react.default.createElement(_standardButton.default, {
75
- appearance: "warning",
76
- onClick: function onClick() {
77
- onConfirm(isChecked);
78
- onClose();
79
- },
80
- testId: testId ? "".concat(testId, "-confirm-button") : undefined
81
- }, okButtonLabel)));
82
- };
83
- exports.CheckboxModal = CheckboxModal;
@@ -1,22 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.ConfirmationModal = void 0;
8
- var _react = _interopRequireDefault(require("react"));
9
- var _reactIntlNext = require("react-intl-next");
10
- var _SimpleModal = require("./SimpleModal");
11
- var _CheckboxModal = require("./CheckboxModal");
12
- var _modalDialog = require("@atlaskit/modal-dialog");
13
- var ConfirmationModalImpl = function ConfirmationModalImpl(props) {
14
- var options = props.options;
15
- var renderModel = function renderModel() {
16
- var isReferentialityDialog = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
17
- return isReferentialityDialog ? /*#__PURE__*/_react.default.createElement(_CheckboxModal.CheckboxModal, props) : /*#__PURE__*/_react.default.createElement(_SimpleModal.SimpleModal, props);
18
- };
19
- return options ? /*#__PURE__*/_react.default.createElement(_modalDialog.ModalTransition, null, renderModel(options === null || options === void 0 ? void 0 : options.isReferentialityDialog)) : null;
20
- };
21
- var ConfirmationModal = (0, _reactIntlNext.injectIntl)(ConfirmationModalImpl);
22
- exports.ConfirmationModal = ConfirmationModal;