@atlaskit/editor-core 182.0.2 → 182.1.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.
Files changed (266) hide show
  1. package/.eslintrc.js +2 -0
  2. package/CHANGELOG.md +46 -0
  3. package/README.md +20 -0
  4. package/architecture/0001-record-architecture-decisions.md +25 -0
  5. package/architecture/0002-deep-equality-check-for-getsharedstate.md +67 -0
  6. package/architecture/0003-explicit-plugin-dependencies.md +291 -0
  7. package/dist/cjs/actions/index.js +17 -6
  8. package/dist/cjs/analytics-api/attach-payload-into-transaction.js +2 -1
  9. package/dist/cjs/create-editor/ErrorBoundary.js +1 -16
  10. package/dist/cjs/create-editor/ReactEditorViewInternal.js +3 -3
  11. package/dist/cjs/editor-next/editor-internal.js +2 -1
  12. package/dist/cjs/editor-next/index.js +5 -1
  13. package/dist/cjs/editor.js +9 -5
  14. package/dist/cjs/keymaps/index.js +12 -0
  15. package/dist/cjs/labs/next/internal/hooks/use-editor/index.js +5 -7
  16. package/dist/cjs/labs/next/presets/default.js +1 -2
  17. package/dist/cjs/plugins/card/index.js +16 -5
  18. package/dist/cjs/plugins/card/pm-plugins/actions.js +10 -1
  19. package/dist/cjs/plugins/card/pm-plugins/analytics/create-analytics-queue.js +48 -0
  20. package/dist/cjs/plugins/card/pm-plugins/analytics/events-from-tr.js +337 -0
  21. package/dist/cjs/plugins/card/pm-plugins/analytics/index.js +19 -0
  22. package/dist/cjs/plugins/card/pm-plugins/analytics/types.js +5 -0
  23. package/dist/cjs/plugins/card/pm-plugins/analytics/utils.js +139 -0
  24. package/dist/cjs/plugins/card/pm-plugins/doc.js +99 -22
  25. package/dist/cjs/plugins/card/pm-plugins/main.js +16 -10
  26. package/dist/cjs/plugins/card/pm-plugins/reducers.js +7 -0
  27. package/dist/cjs/plugins/card/pm-plugins/util/resolve.js +3 -7
  28. package/dist/cjs/plugins/card/toolbar.js +18 -8
  29. package/dist/cjs/plugins/card/ui/EditLinkToolbar.js +12 -8
  30. package/dist/cjs/plugins/card/ui/EditorSmartCardEventsNext.js +202 -0
  31. package/dist/cjs/plugins/card/ui/LinkToolbarAppearance.js +12 -4
  32. package/dist/cjs/plugins/card/utils.js +4 -2
  33. package/dist/cjs/plugins/extension/context-panel.js +3 -2
  34. package/dist/cjs/plugins/extension/index.js +4 -1
  35. package/dist/cjs/plugins/help-dialog/ui/index.js +29 -8
  36. package/dist/cjs/plugins/hyperlink/Toolbar.js +12 -2
  37. package/dist/cjs/plugins/hyperlink/commands.js +9 -5
  38. package/dist/cjs/plugins/hyperlink/pm-plugins/input-rule.js +4 -0
  39. package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +2 -2
  40. package/dist/cjs/plugins/index.js +0 -7
  41. package/dist/cjs/plugins/insert-block/index.js +5 -1
  42. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +25 -23
  43. package/dist/cjs/plugins/media/index.js +9 -5
  44. package/dist/cjs/plugins/media/nodeviews/mediaNodeView/media.js +7 -1
  45. package/dist/cjs/plugins/media/pm-plugins/main.js +5 -4
  46. package/dist/cjs/plugins/media/utils/media-single.js +1 -4
  47. package/dist/cjs/plugins/panel/pm-plugins/keymaps.js +2 -1
  48. package/dist/cjs/plugins/paste/handlers.js +5 -5
  49. package/dist/cjs/plugins/paste/index.js +4 -2
  50. package/dist/cjs/plugins/paste/pm-plugins/main.js +6 -4
  51. package/dist/cjs/plugins/rule/commands.js +2 -2
  52. package/dist/cjs/plugins/rule/index.js +5 -4
  53. package/dist/cjs/plugins/rule/pm-plugins/input-rule.js +6 -8
  54. package/dist/cjs/plugins/rule/pm-plugins/keymap.js +2 -2
  55. package/dist/cjs/plugins/text-color/index.js +5 -2
  56. package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/index.js +3 -4
  57. package/dist/cjs/plugins/text-formatting/ui/Toolbar/toolbar-messages.js +10 -0
  58. package/dist/cjs/ui/Appearance/FullPage/FullPage.js +2 -4
  59. package/dist/cjs/ui/ColorPalette/index.js +6 -0
  60. package/dist/cjs/ui/ConfigPanel/ConfigPanel.js +15 -10
  61. package/dist/cjs/ui/ConfigPanel/ConfigPanelFieldsLoader.js +3 -1
  62. package/dist/cjs/ui/ConfigPanel/Fields/ColorPicker.js +248 -17
  63. package/dist/cjs/ui/ConfigPanel/FormContent.js +12 -6
  64. package/dist/cjs/ui/ConfigPanel/utils.js +2 -12
  65. package/dist/cjs/ui/ContentStyles/index.js +2 -5
  66. package/dist/cjs/ui/MediaAndEmbedsToolbar/index.js +16 -8
  67. package/dist/cjs/utils/document.js +5 -3
  68. package/dist/cjs/version-wrapper.js +1 -1
  69. package/dist/cjs/version.json +1 -1
  70. package/dist/es2019/actions/index.js +10 -4
  71. package/dist/es2019/analytics-api/attach-payload-into-transaction.js +2 -1
  72. package/dist/es2019/create-editor/ErrorBoundary.js +1 -13
  73. package/dist/es2019/create-editor/ReactEditorViewInternal.js +2 -2
  74. package/dist/es2019/editor-next/editor-internal.js +2 -1
  75. package/dist/es2019/editor-next/index.js +5 -1
  76. package/dist/es2019/editor.js +5 -2
  77. package/dist/es2019/keymaps/index.js +1 -1
  78. package/dist/es2019/labs/next/internal/hooks/use-editor/index.js +4 -6
  79. package/dist/es2019/labs/next/presets/default.js +1 -2
  80. package/dist/es2019/plugins/card/index.js +15 -5
  81. package/dist/es2019/plugins/card/pm-plugins/actions.js +4 -0
  82. package/dist/es2019/plugins/card/pm-plugins/analytics/create-analytics-queue.js +38 -0
  83. package/dist/es2019/plugins/card/pm-plugins/analytics/events-from-tr.js +316 -0
  84. package/dist/es2019/plugins/card/pm-plugins/analytics/index.js +2 -0
  85. package/dist/es2019/plugins/card/pm-plugins/analytics/types.js +1 -0
  86. package/dist/es2019/plugins/card/pm-plugins/analytics/utils.js +124 -0
  87. package/dist/es2019/plugins/card/pm-plugins/doc.js +94 -20
  88. package/dist/es2019/plugins/card/pm-plugins/main.js +17 -8
  89. package/dist/es2019/plugins/card/pm-plugins/reducers.js +8 -0
  90. package/dist/es2019/plugins/card/pm-plugins/util/resolve.js +3 -7
  91. package/dist/es2019/plugins/card/toolbar.js +16 -8
  92. package/dist/es2019/plugins/card/ui/EditLinkToolbar.js +13 -9
  93. package/dist/es2019/plugins/card/ui/EditorSmartCardEventsNext.js +180 -0
  94. package/dist/es2019/plugins/card/ui/LinkToolbarAppearance.js +11 -2
  95. package/dist/es2019/plugins/card/utils.js +6 -2
  96. package/dist/es2019/plugins/extension/context-panel.js +3 -2
  97. package/dist/es2019/plugins/extension/index.js +45 -41
  98. package/dist/es2019/plugins/help-dialog/ui/index.js +17 -1
  99. package/dist/es2019/plugins/hyperlink/Toolbar.js +13 -4
  100. package/dist/es2019/plugins/hyperlink/commands.js +9 -6
  101. package/dist/es2019/plugins/hyperlink/pm-plugins/input-rule.js +4 -0
  102. package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +2 -2
  103. package/dist/es2019/plugins/index.js +0 -1
  104. package/dist/es2019/plugins/insert-block/index.js +96 -91
  105. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +3 -2
  106. package/dist/es2019/plugins/media/index.js +202 -198
  107. package/dist/es2019/plugins/media/nodeviews/mediaNodeView/media.js +9 -1
  108. package/dist/es2019/plugins/media/pm-plugins/main.js +5 -4
  109. package/dist/es2019/plugins/media/utils/media-single.js +1 -5
  110. package/dist/es2019/plugins/panel/pm-plugins/keymaps.js +3 -2
  111. package/dist/es2019/plugins/paste/handlers.js +6 -6
  112. package/dist/es2019/plugins/paste/index.js +18 -14
  113. package/dist/es2019/plugins/paste/pm-plugins/main.js +7 -5
  114. package/dist/es2019/plugins/rule/commands.js +2 -2
  115. package/dist/es2019/plugins/rule/index.js +49 -46
  116. package/dist/es2019/plugins/rule/pm-plugins/input-rule.js +6 -7
  117. package/dist/es2019/plugins/rule/pm-plugins/keymap.js +2 -2
  118. package/dist/es2019/plugins/text-color/index.js +49 -44
  119. package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/index.js +3 -3
  120. package/dist/es2019/plugins/text-formatting/ui/Toolbar/toolbar-messages.js +10 -0
  121. package/dist/es2019/ui/Appearance/FullPage/FullPage.js +2 -4
  122. package/dist/es2019/ui/ColorPalette/index.js +2 -2
  123. package/dist/es2019/ui/ConfigPanel/ConfigPanel.js +8 -4
  124. package/dist/es2019/ui/ConfigPanel/ConfigPanelFieldsLoader.js +3 -1
  125. package/dist/es2019/ui/ConfigPanel/Fields/ColorPicker.js +238 -13
  126. package/dist/es2019/ui/ConfigPanel/FormContent.js +12 -6
  127. package/dist/es2019/ui/ConfigPanel/utils.js +1 -11
  128. package/dist/es2019/ui/ContentStyles/index.js +2 -5
  129. package/dist/es2019/ui/MediaAndEmbedsToolbar/index.js +12 -10
  130. package/dist/es2019/utils/document.js +5 -3
  131. package/dist/es2019/version-wrapper.js +1 -1
  132. package/dist/es2019/version.json +1 -1
  133. package/dist/esm/actions/index.js +17 -6
  134. package/dist/esm/analytics-api/attach-payload-into-transaction.js +2 -1
  135. package/dist/esm/create-editor/ErrorBoundary.js +1 -16
  136. package/dist/esm/create-editor/ReactEditorViewInternal.js +2 -2
  137. package/dist/esm/editor-next/editor-internal.js +2 -1
  138. package/dist/esm/editor-next/index.js +5 -1
  139. package/dist/esm/editor.js +9 -5
  140. package/dist/esm/keymaps/index.js +1 -1
  141. package/dist/esm/labs/next/internal/hooks/use-editor/index.js +4 -6
  142. package/dist/esm/labs/next/presets/default.js +1 -2
  143. package/dist/esm/plugins/card/index.js +13 -5
  144. package/dist/esm/plugins/card/pm-plugins/actions.js +8 -0
  145. package/dist/esm/plugins/card/pm-plugins/analytics/create-analytics-queue.js +41 -0
  146. package/dist/esm/plugins/card/pm-plugins/analytics/events-from-tr.js +328 -0
  147. package/dist/esm/plugins/card/pm-plugins/analytics/index.js +2 -0
  148. package/dist/esm/plugins/card/pm-plugins/analytics/types.js +1 -0
  149. package/dist/esm/plugins/card/pm-plugins/analytics/utils.js +124 -0
  150. package/dist/esm/plugins/card/pm-plugins/doc.js +98 -22
  151. package/dist/esm/plugins/card/pm-plugins/main.js +16 -10
  152. package/dist/esm/plugins/card/pm-plugins/reducers.js +7 -0
  153. package/dist/esm/plugins/card/pm-plugins/util/resolve.js +3 -7
  154. package/dist/esm/plugins/card/toolbar.js +18 -8
  155. package/dist/esm/plugins/card/ui/EditLinkToolbar.js +13 -9
  156. package/dist/esm/plugins/card/ui/EditorSmartCardEventsNext.js +191 -0
  157. package/dist/esm/plugins/card/ui/LinkToolbarAppearance.js +12 -4
  158. package/dist/esm/plugins/card/utils.js +4 -2
  159. package/dist/esm/plugins/extension/context-panel.js +3 -2
  160. package/dist/esm/plugins/extension/index.js +4 -1
  161. package/dist/esm/plugins/help-dialog/ui/index.js +29 -8
  162. package/dist/esm/plugins/hyperlink/Toolbar.js +13 -3
  163. package/dist/esm/plugins/hyperlink/commands.js +9 -5
  164. package/dist/esm/plugins/hyperlink/pm-plugins/input-rule.js +4 -0
  165. package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/index.js +2 -2
  166. package/dist/esm/plugins/index.js +0 -1
  167. package/dist/esm/plugins/insert-block/index.js +5 -1
  168. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +25 -23
  169. package/dist/esm/plugins/media/index.js +9 -5
  170. package/dist/esm/plugins/media/nodeviews/mediaNodeView/media.js +7 -1
  171. package/dist/esm/plugins/media/pm-plugins/main.js +5 -4
  172. package/dist/esm/plugins/media/utils/media-single.js +1 -4
  173. package/dist/esm/plugins/panel/pm-plugins/keymaps.js +3 -2
  174. package/dist/esm/plugins/paste/handlers.js +6 -6
  175. package/dist/esm/plugins/paste/index.js +4 -2
  176. package/dist/esm/plugins/paste/pm-plugins/main.js +7 -5
  177. package/dist/esm/plugins/rule/commands.js +2 -2
  178. package/dist/esm/plugins/rule/index.js +5 -4
  179. package/dist/esm/plugins/rule/pm-plugins/input-rule.js +6 -8
  180. package/dist/esm/plugins/rule/pm-plugins/keymap.js +2 -2
  181. package/dist/esm/plugins/text-color/index.js +5 -2
  182. package/dist/esm/plugins/text-color/ui/ToolbarTextColor/index.js +3 -4
  183. package/dist/esm/plugins/text-formatting/ui/Toolbar/toolbar-messages.js +10 -0
  184. package/dist/esm/ui/Appearance/FullPage/FullPage.js +2 -4
  185. package/dist/esm/ui/ColorPalette/index.js +2 -2
  186. package/dist/esm/ui/ConfigPanel/ConfigPanel.js +15 -10
  187. package/dist/esm/ui/ConfigPanel/ConfigPanelFieldsLoader.js +3 -1
  188. package/dist/esm/ui/ConfigPanel/Fields/ColorPicker.js +244 -19
  189. package/dist/esm/ui/ConfigPanel/FormContent.js +12 -6
  190. package/dist/esm/ui/ConfigPanel/utils.js +0 -10
  191. package/dist/esm/ui/ContentStyles/index.js +2 -5
  192. package/dist/esm/ui/MediaAndEmbedsToolbar/index.js +16 -8
  193. package/dist/esm/utils/document.js +5 -3
  194. package/dist/esm/version-wrapper.js +1 -1
  195. package/dist/esm/version.json +1 -1
  196. package/dist/types/actions/index.d.ts +3 -2
  197. package/dist/types/create-editor/ErrorBoundary.d.ts +2 -2
  198. package/dist/types/editor-next/index.d.ts +1 -0
  199. package/dist/types/editor.d.ts +1 -0
  200. package/dist/types/keymaps/index.d.ts +1 -1
  201. package/dist/types/labs/next/internal/hooks/use-editor/index.d.ts +2 -1
  202. package/dist/types/labs/next/presets/cxhtml.d.ts +1 -5
  203. package/dist/types/labs/next/presets/default.d.ts +2 -10
  204. package/dist/types/labs/next/presets/mobile.d.ts +1 -5
  205. package/dist/types/plugins/card/pm-plugins/actions.d.ts +2 -1
  206. package/dist/types/plugins/card/pm-plugins/analytics/create-analytics-queue.d.ts +10 -0
  207. package/dist/types/plugins/card/pm-plugins/analytics/events-from-tr.d.ts +17 -0
  208. package/dist/types/plugins/card/pm-plugins/analytics/index.d.ts +2 -0
  209. package/dist/types/plugins/card/pm-plugins/analytics/types.d.ts +10 -0
  210. package/dist/types/plugins/card/pm-plugins/analytics/utils.d.ts +26 -0
  211. package/dist/types/plugins/card/pm-plugins/doc.d.ts +8 -7
  212. package/dist/types/plugins/card/pm-plugins/main.d.ts +1 -1
  213. package/dist/types/plugins/card/pm-plugins/util/resolve.d.ts +2 -2
  214. package/dist/types/plugins/card/pm-plugins/util/state.d.ts +3 -0
  215. package/dist/types/plugins/card/types.d.ts +81 -7
  216. package/dist/types/plugins/card/ui/EditLinkToolbar.d.ts +2 -1
  217. package/dist/types/plugins/card/ui/EditorSmartCardEventsNext.d.ts +18 -0
  218. package/dist/types/plugins/card/utils.d.ts +1 -1
  219. package/dist/types/plugins/extension/context-panel.d.ts +2 -1
  220. package/dist/types/plugins/extension/index.d.ts +2 -0
  221. package/dist/types/plugins/hyperlink/commands.d.ts +3 -2
  222. package/dist/types/plugins/hyperlink/ui/HyperlinkAddToolbar/index.d.ts +2 -1
  223. package/dist/types/plugins/index.d.ts +0 -1
  224. package/dist/types/plugins/insert-block/index.d.ts +2 -0
  225. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/types.d.ts +2 -1
  226. package/dist/types/plugins/media/index.d.ts +2 -0
  227. package/dist/types/plugins/media/pm-plugins/main.d.ts +3 -2
  228. package/dist/types/plugins/media/utils/media-single.d.ts +1 -1
  229. package/dist/types/plugins/paste/index.d.ts +2 -0
  230. package/dist/types/plugins/paste/pm-plugins/main.d.ts +2 -1
  231. package/dist/types/plugins/rule/commands.d.ts +2 -1
  232. package/dist/types/plugins/rule/index.d.ts +5 -1
  233. package/dist/types/plugins/rule/pm-plugins/input-rule.d.ts +1 -1
  234. package/dist/types/plugins/rule/pm-plugins/keymap.d.ts +2 -1
  235. package/dist/types/plugins/text-color/index.d.ts +2 -0
  236. package/dist/types/plugins/text-color/ui/ToolbarTextColor/index.d.ts +2 -0
  237. package/dist/types/plugins/text-formatting/ui/Toolbar/toolbar-messages.d.ts +10 -0
  238. package/dist/types/types/editor-appearance-component.d.ts +1 -1
  239. package/dist/types/types/editor-props.d.ts +1 -0
  240. package/dist/types/ui/Appearance/FullPage/FullPage.d.ts +2 -0
  241. package/dist/types/ui/ColorPalette/index.d.ts +2 -2
  242. package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +3 -1
  243. package/dist/types/ui/ConfigPanel/ConfigPanelFieldsLoader.d.ts +3 -1
  244. package/dist/types/ui/ConfigPanel/Fields/ColorPicker.d.ts +12 -1
  245. package/dist/types/ui/ConfigPanel/FormContent.d.ts +2 -2
  246. package/dist/types/ui/ConfigPanel/types.d.ts +3 -0
  247. package/dist/types/ui/ConfigPanel/utils.d.ts +0 -1
  248. package/dist/types/ui/MediaAndEmbedsToolbar/index.d.ts +1 -1
  249. package/package.json +14 -13
  250. package/report.api.md +10 -0
  251. package/dist/cjs/plugins/feature-flags-context/get-enabled-feature-flag-keys.js +0 -12
  252. package/dist/cjs/plugins/feature-flags-context/get-feature-flags.js +0 -11
  253. package/dist/cjs/plugins/feature-flags-context/index.js +0 -50
  254. package/dist/cjs/plugins/feature-flags-context/plugin-key.js +0 -9
  255. package/dist/es2019/plugins/feature-flags-context/get-enabled-feature-flag-keys.js +0 -1
  256. package/dist/es2019/plugins/feature-flags-context/get-feature-flags.js +0 -2
  257. package/dist/es2019/plugins/feature-flags-context/index.js +0 -29
  258. package/dist/es2019/plugins/feature-flags-context/plugin-key.js +0 -2
  259. package/dist/esm/plugins/feature-flags-context/get-enabled-feature-flag-keys.js +0 -1
  260. package/dist/esm/plugins/feature-flags-context/get-feature-flags.js +0 -4
  261. package/dist/esm/plugins/feature-flags-context/index.js +0 -40
  262. package/dist/esm/plugins/feature-flags-context/plugin-key.js +0 -2
  263. package/dist/types/plugins/feature-flags-context/get-enabled-feature-flag-keys.d.ts +0 -1
  264. package/dist/types/plugins/feature-flags-context/get-feature-flags.d.ts +0 -3
  265. package/dist/types/plugins/feature-flags-context/index.d.ts +0 -9
  266. package/dist/types/plugins/feature-flags-context/plugin-key.d.ts +0 -2
@@ -35,7 +35,11 @@ var _messages = require("../insert-block/ui/ToolbarInsertBlock/messages");
35
35
  var _mediaNodeView = require("./nodeviews/mediaNodeView");
36
36
  var _mediaInline = require("./nodeviews/mediaInline");
37
37
  var _mediaSingle2 = require("./utils/media-single");
38
- var mediaPlugin = function mediaPlugin(options) {
38
+ var mediaPlugin = function mediaPlugin() {
39
+ var _api$dependencies, _api$dependencies$fea;
40
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
41
+ var api = arguments.length > 1 ? arguments[1] : undefined;
42
+ var featureFlags = (api === null || api === void 0 ? void 0 : (_api$dependencies = api.dependencies) === null || _api$dependencies === void 0 ? void 0 : (_api$dependencies$fea = _api$dependencies.featureFlags) === null || _api$dependencies$fea === void 0 ? void 0 : _api$dependencies$fea.sharedState.currentState()) || {};
39
43
  return {
40
44
  name: 'media',
41
45
  nodes: function nodes() {
@@ -44,9 +48,9 @@ var mediaPlugin = function mediaPlugin(options) {
44
48
  allowMediaGroup = _ref$allowMediaGroup === void 0 ? true : _ref$allowMediaGroup,
45
49
  _ref$allowMediaSingle = _ref.allowMediaSingle,
46
50
  allowMediaSingle = _ref$allowMediaSingle === void 0 ? false : _ref$allowMediaSingle,
47
- featureFlags = _ref.featureFlags;
48
- var captions = (0, _mediaCommon.getMediaFeatureFlag)('captions', featureFlags);
49
- var allowMediaInline = (0, _mediaCommon.getMediaFeatureFlag)('mediaInline', featureFlags);
51
+ mediaFeatureFlags = _ref.featureFlags;
52
+ var captions = (0, _mediaCommon.getMediaFeatureFlag)('captions', mediaFeatureFlags);
53
+ var allowMediaInline = (0, _mediaCommon.getMediaFeatureFlag)('mediaInline', mediaFeatureFlags);
50
54
  var mediaSingleNode = captions ? _adfSchema.mediaSingleWithCaption : _adfSchema.mediaSingle;
51
55
  return [{
52
56
  name: 'mediaGroup',
@@ -100,7 +104,7 @@ var mediaPlugin = function mediaPlugin(options) {
100
104
  customDropzoneContainer: options && options.customDropzoneContainer,
101
105
  customMediaPicker: options && options.customMediaPicker,
102
106
  allowResizing: !!(options && options.allowResizing)
103
- }, reactContext, getIntl, dispatch, options);
107
+ }, reactContext, getIntl, dispatch, options, featureFlags.newInsertionBehaviour);
104
108
  }
105
109
  }, {
106
110
  name: 'mediaKeymap',
@@ -15,6 +15,8 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
15
15
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
16
16
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
17
17
  var _utils = require("@atlaskit/editor-common/utils");
18
+ var _analyticsNext = require("@atlaskit/analytics-next");
19
+ var _analyticsNamespacedContext = require("@atlaskit/analytics-namespaced-context");
18
20
  var _mediaCard = require("@atlaskit/media-card");
19
21
  var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
20
22
  var _react = _interopRequireWildcard(require("react"));
@@ -209,6 +211,10 @@ var MediaNode = /*#__PURE__*/function (_Component) {
209
211
  onContextMenu: this.selectMediaSingle,
210
212
  borderWidth: borderMark === null || borderMark === void 0 ? void 0 : borderMark.attrs.size,
211
213
  selected: selected
214
+ }, /*#__PURE__*/_react.default.createElement(_analyticsNext.AnalyticsContext, {
215
+ data: (0, _defineProperty2.default)({}, _analyticsNamespacedContext.MEDIA_CONTEXT, {
216
+ border: !!borderMark
217
+ })
212
218
  }, /*#__PURE__*/_react.default.createElement(_mediaCard.Card, {
213
219
  mediaClientConfig: mediaClientConfig,
214
220
  resizeMode: "stretchy-fit",
@@ -225,7 +231,7 @@ var MediaNode = /*#__PURE__*/function (_Component) {
225
231
  featureFlags: mediaOptions && mediaOptions.featureFlags,
226
232
  contextId: contextId,
227
233
  alt: alt
228
- }));
234
+ })));
229
235
  }
230
236
  }]);
231
237
  return MediaNode;
@@ -69,7 +69,7 @@ var MEDIA_RESOLVED_STATES = ['ready', 'error', 'cancelled'];
69
69
  var MediaPluginStateImplementation = /*#__PURE__*/function () {
70
70
  // @ts-ignore: private is OK
71
71
 
72
- function MediaPluginStateImplementation(_state, options, mediaOptions, _dispatch) {
72
+ function MediaPluginStateImplementation(_state, options, mediaOptions, newInsertionBehaviour, _dispatch) {
73
73
  var _this = this;
74
74
  (0, _classCallCheck2.default)(this, MediaPluginStateImplementation);
75
75
  (0, _defineProperty2.default)(this, "allowsUploads", false);
@@ -237,7 +237,7 @@ var MediaPluginStateImplementation = /*#__PURE__*/function () {
237
237
  });
238
238
  }
239
239
  if ((0, _mediaSingle.isMediaSingle)(state.schema, mediaStateWithContext.fileMimeType)) {
240
- (0, _mediaSingle.insertMediaSingleNode)(_this.view, mediaStateWithContext, _this.getInputMethod(pickerType), collection, _this.mediaOptions && _this.mediaOptions.alignLeftOnInsert);
240
+ (0, _mediaSingle.insertMediaSingleNode)(_this.view, mediaStateWithContext, _this.getInputMethod(pickerType), collection, _this.mediaOptions && _this.mediaOptions.alignLeftOnInsert, _this.newInsertionBehaviour);
241
241
  } else if ((0, _mediaCommon2.getMediaFeatureFlag)('mediaInline', (_this$mediaOptions2 = _this.mediaOptions) === null || _this$mediaOptions2 === void 0 ? void 0 : _this$mediaOptions2.featureFlags) && !(0, _document.isInEmptyLine)(state) && (!(0, _mediaCommon.isInsidePotentialEmptyParagraph)(state) || (0, _utils2.isInListItem)(state)) && (0, _mediaFiles.canInsertMediaInline)(state)) {
242
242
  (0, _mediaFiles.insertMediaInlineNode)(_this.view, mediaStateWithContext, collection, _this.getInputMethod(pickerType));
243
243
  } else {
@@ -436,6 +436,7 @@ var MediaPluginStateImplementation = /*#__PURE__*/function () {
436
436
  });
437
437
  this.options = options;
438
438
  this.mediaOptions = mediaOptions;
439
+ this.newInsertionBehaviour = newInsertionBehaviour;
439
440
  this.dispatch = _dispatch;
440
441
  this.waitForMediaUpload = options.waitForMediaUpload === undefined ? true : options.waitForMediaUpload;
441
442
  var nodes = _state.schema.nodes;
@@ -608,13 +609,13 @@ var getMediaPluginState = function getMediaPluginState(state) {
608
609
  return _pluginKey.stateKey.getState(state);
609
610
  };
610
611
  exports.getMediaPluginState = getMediaPluginState;
611
- var createPlugin = function createPlugin(_schema, options, reactContext, getIntl, dispatch, mediaOptions) {
612
+ var createPlugin = function createPlugin(_schema, options, reactContext, getIntl, dispatch, mediaOptions, newInsertionBehaviour) {
612
613
  var intl = getIntl();
613
614
  var dropPlaceholder = createDropPlaceholder(intl, mediaOptions && mediaOptions.allowDropzoneDropLine);
614
615
  return new _safePlugin.SafePlugin({
615
616
  state: {
616
617
  init: function init(_config, state) {
617
- return new MediaPluginStateImplementation(state, options, mediaOptions, dispatch);
618
+ return new MediaPluginStateImplementation(state, options, mediaOptions, newInsertionBehaviour, dispatch);
618
619
  },
619
620
  apply: function apply(tr, pluginState) {
620
621
  // remap editing media single position if we're in collab
@@ -18,7 +18,6 @@ var _mediaCommon = require("../utils/media-common");
18
18
  var _slice = require("../../../utils/slice");
19
19
  var _analytics = require("../../analytics");
20
20
  var _insert = require("../../../utils/insert");
21
- var _featureFlagsContext = require("../../feature-flags-context");
22
21
  var _isImage = require("./is-image");
23
22
  var _position = require("../../../utils/prosemirror/position");
24
23
  var _mediaCommon2 = require("@atlaskit/media-common");
@@ -90,7 +89,7 @@ var insertMediaAsMediaSingle = function insertMediaAsMediaSingle(view, node, inp
90
89
  return insertNodesWithOptionalParagraph(nodes, analyticsAttributes)(state, dispatch);
91
90
  };
92
91
  exports.insertMediaAsMediaSingle = insertMediaAsMediaSingle;
93
- var insertMediaSingleNode = function insertMediaSingleNode(view, mediaState, inputMethod, collection, alignLeftOnInsert) {
92
+ var insertMediaSingleNode = function insertMediaSingleNode(view, mediaState, inputMethod, collection, alignLeftOnInsert, newInsertionBehaviour) {
94
93
  var _state$selection$$fro;
95
94
  if (collection === undefined) {
96
95
  return false;
@@ -117,8 +116,6 @@ var insertMediaSingleNode = function insertMediaSingleNode(view, mediaState, inp
117
116
  inputMethod: inputMethod
118
117
  })(state, dispatch);
119
118
  } else {
120
- var _getFeatureFlags = (0, _featureFlagsContext.getFeatureFlags)(view.state),
121
- newInsertionBehaviour = _getFeatureFlags.newInsertionBehaviour;
122
119
  var tr = null;
123
120
  if (newInsertionBehaviour) {
124
121
  tr = (0, _insert.safeInsert)(node, state.selection.from)(state.tr);
@@ -50,7 +50,8 @@ function keymapPlugin() {
50
50
  var isParentNodeAPanel = parentNodeType === panel;
51
51
 
52
52
  // Stops merging panels when deleting empty paragraph in between
53
- if (isPreviousNodeAPanel && !isParentNodeAPanel || isInsideAnEmptyNode(selection, panel, state.schema) || isInsideAnEmptyNode(selection, blockquote, state.schema)) {
53
+ // Stops merging blockquotes with panels when deleting from start of blockquote
54
+ if (isPreviousNodeAPanel && !isParentNodeAPanel || isInsideAnEmptyNode(selection, panel, state.schema) || (0, _prosemirrorUtils.hasParentNodeOfType)(blockquote)(selection)) {
54
55
  var content = $from.node($from.depth).content;
55
56
  var insertPos = previousPos.pos;
56
57
  deleteCurrentItem($from, tr).insert(insertPos, content);
@@ -126,7 +126,7 @@ function handlePasteIntoTaskOrDecisionOrPanel(slice) {
126
126
  // This maintains both the selection (destination) and the slice (paste content).
127
127
  (0, _prosemirrorUtils.safeInsert)(transformedSlice.content)(tr).scrollIntoView();
128
128
  }
129
- (0, _doc.queueCardsFromChangedTr)(state, tr, _analytics.INPUT_METHOD.CLIPBOARD);
129
+ (0, _doc.queueCardsFromChangedTr)(state, tr, _analytics.INPUT_METHOD.CLIPBOARD, _analytics.ACTION.PASTED);
130
130
  if (dispatch) {
131
131
  dispatch(tr);
132
132
  }
@@ -384,7 +384,7 @@ function handlePastePreservingMarks(slice) {
384
384
  // special case for plainTextSlice & linkMark: merge into existing link
385
385
  if (isPlainTextSlice && linkMark.isInSet(selectionMarks) && selectionMarks.length === 1) {
386
386
  var tr = (0, _prosemirrorHistory.closeHistory)(state.tr).replaceSelectionWith(slice.content.firstChild.firstChild, true).setStoredMarks(selectionMarks).scrollIntoView();
387
- (0, _doc.queueCardsFromChangedTr)(state, tr, _analytics.INPUT_METHOD.CLIPBOARD);
387
+ (0, _doc.queueCardsFromChangedTr)(state, tr, _analytics.INPUT_METHOD.CLIPBOARD, _analytics.ACTION.PASTED);
388
388
  if (dispatch) {
389
389
  dispatch(tr);
390
390
  }
@@ -396,7 +396,7 @@ function handlePastePreservingMarks(slice) {
396
396
  if ((0, _util.hasOnlyNodesOfType)(bulletList, hardBreak, heading, listItem, paragraph, text, emoji, mention, orderedList)(slice)) {
397
397
  var transformedSlice = (0, _util.applyTextMarksToSlice)(schema, selectionMarks)(slice);
398
398
  var _tr2 = (0, _prosemirrorHistory.closeHistory)(state.tr).replaceSelection(transformedSlice).setStoredMarks(selectionMarks).scrollIntoView();
399
- (0, _doc.queueCardsFromChangedTr)(state, _tr2, _analytics.INPUT_METHOD.CLIPBOARD);
399
+ (0, _doc.queueCardsFromChangedTr)(state, _tr2, _analytics.INPUT_METHOD.CLIPBOARD, _analytics.ACTION.PASTED);
400
400
  if (dispatch) {
401
401
  dispatch(_tr2);
402
402
  }
@@ -614,7 +614,7 @@ function handleMarkdown(markdownSlice, from, to) {
614
614
  tr.replaceSelection(markdownSlice);
615
615
  }
616
616
  tr.setSelection(_prosemirrorState.TextSelection.near(tr.doc.resolve(pastesFrom + markdownSlice.size), -1));
617
- (0, _doc.queueCardsFromChangedTr)(state, tr, _analytics.INPUT_METHOD.CLIPBOARD);
617
+ (0, _doc.queueCardsFromChangedTr)(state, tr, _analytics.INPUT_METHOD.CLIPBOARD, _analytics.ACTION.PASTED);
618
618
  if (dispatch) {
619
619
  dispatch(tr.scrollIntoView());
620
620
  }
@@ -838,7 +838,7 @@ function handleRichText(slice) {
838
838
 
839
839
  // queue link cards, ignoring any errors
840
840
  if (dispatch) {
841
- dispatch((0, _doc.queueCardsFromChangedTr)(state, tr, _analytics.INPUT_METHOD.CLIPBOARD));
841
+ dispatch((0, _doc.queueCardsFromChangedTr)(state, tr, _analytics.INPUT_METHOD.CLIPBOARD, _analytics.ACTION.PASTED));
842
842
  }
843
843
  return true;
844
844
  };
@@ -5,9 +5,11 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var _main = require("./pm-plugins/main");
8
- var pastePlugin = function pastePlugin(_ref) {
8
+ var pastePlugin = function pastePlugin(_ref, api) {
9
+ var _api$dependencies, _api$dependencies$fea;
9
10
  var cardOptions = _ref.cardOptions,
10
11
  sanitizePrivateContent = _ref.sanitizePrivateContent;
12
+ var featureFlags = (api === null || api === void 0 ? void 0 : (_api$dependencies = api.dependencies) === null || _api$dependencies === void 0 ? void 0 : (_api$dependencies$fea = _api$dependencies.featureFlags) === null || _api$dependencies$fea === void 0 ? void 0 : _api$dependencies$fea.sharedState.currentState()) || {};
11
13
  return {
12
14
  name: 'paste',
13
15
  pmPlugins: function pmPlugins() {
@@ -18,7 +20,7 @@ var pastePlugin = function pastePlugin(_ref) {
18
20
  providerFactory = _ref2.providerFactory,
19
21
  dispatchAnalyticsEvent = _ref2.dispatchAnalyticsEvent,
20
22
  dispatch = _ref2.dispatch;
21
- return (0, _main.createPlugin)(schema, dispatchAnalyticsEvent, dispatch, cardOptions, sanitizePrivateContent, providerFactory);
23
+ return (0, _main.createPlugin)(schema, dispatchAnalyticsEvent, dispatch, featureFlags, cardOptions, sanitizePrivateContent, providerFactory);
22
24
  }
23
25
  }];
24
26
  }
@@ -23,6 +23,7 @@ var _prosemirrorModel = require("prosemirror-model");
23
23
  var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
24
24
  var _uuid = _interopRequireDefault(require("uuid"));
25
25
  var _editorMarkdownTransformer = require("@atlaskit/editor-markdown-transformer");
26
+ var _card = require("@atlaskit/editor-common/card");
26
27
  var _slice = require("../../../utils/slice");
27
28
  var _extensions = require("@atlaskit/editor-common/extensions");
28
29
  var clipboard = _interopRequireWildcard(require("../../../utils/clipboard"));
@@ -48,12 +49,10 @@ var _tinyMCE = require("../util/tinyMCE");
48
49
  var _utils9 = require("@atlaskit/editor-tables/utils");
49
50
  var _step = require("../../../utils/step");
50
51
  var _pluginFactory = require("./plugin-factory");
51
- var _featureFlagsContext = require("../../feature-flags-context");
52
52
  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); }
53
53
  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; }
54
54
  function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
55
- _analytics.sendPasteAnalyticsEvent;
56
- function createPlugin(schema, dispatchAnalyticsEvent, dispatch, cardOptions, sanitizePrivateContent, providerFactory) {
55
+ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, cardOptions, sanitizePrivateContent, providerFactory) {
57
56
  var atlassianMarkDownParser = new _editorMarkdownTransformer.MarkdownTransformer(schema, _md.md);
58
57
  function getMarkdownSlice(text, openStart, openEnd) {
59
58
  var textInput = text;
@@ -220,6 +219,10 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, cardOptions, san
220
219
  if (!isPastingTextInsidePlaceholderText && !isPastingTable) {
221
220
  tr.setMeta(_betterTypeHistory.pluginKey, true);
222
221
  }
222
+ (0, _card.addLinkMetadata)(view.state.selection, tr, {
223
+ action: isPlainText ? _analytics2.ACTION.PASTED_AS_PLAIN : _analytics2.ACTION.PASTED,
224
+ inputMethod: _analytics2.INPUT_METHOD.CLIPBOARD
225
+ });
223
226
  view.dispatch(tr);
224
227
  };
225
228
  slice = (0, _handlers.handleParagraphBlockMarks)(state, slice);
@@ -375,7 +378,6 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, cardOptions, san
375
378
  if ((0, _analytics.handlePasteIntoCaptionWithAnalytics)(view, event, slice, _analytics2.PasteTypes.richText)(state, dispatch)) {
376
379
  return true;
377
380
  }
378
- var featureFlags = (0, _featureFlagsContext.getFeatureFlags)(state);
379
381
  if ((0, _analytics.handlePastePanelOrDecisionIntoListWithAnalytics)(view, event, slice)(state, dispatch)) {
380
382
  return true;
381
383
  }
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.insertHorizontalRule = void 0;
7
7
  var _inputRule = require("./pm-plugins/input-rule");
8
- var insertHorizontalRule = function insertHorizontalRule(inputMethod) {
8
+ var insertHorizontalRule = function insertHorizontalRule(inputMethod, featureFlags) {
9
9
  return function (state, dispatch) {
10
- var tr = (0, _inputRule.createHorizontalRule)(state, state.selection.from, state.selection.to, inputMethod);
10
+ var tr = (0, _inputRule.createHorizontalRule)(state, featureFlags, state.selection.from, state.selection.to, inputMethod);
11
11
  if (tr) {
12
12
  if (dispatch) {
13
13
  dispatch(tr);
@@ -12,7 +12,9 @@ var _messages = require("../insert-block/ui/ToolbarInsertBlock/messages");
12
12
  var _assets = require("../quick-insert/assets");
13
13
  var _inputRule = _interopRequireDefault(require("./pm-plugins/input-rule"));
14
14
  var _keymap = _interopRequireDefault(require("./pm-plugins/keymap"));
15
- var rulePlugin = function rulePlugin() {
15
+ var rulePlugin = function rulePlugin(_, api) {
16
+ var _api$dependencies, _api$dependencies$fea;
17
+ var featureFlags = (api === null || api === void 0 ? void 0 : (_api$dependencies = api.dependencies) === null || _api$dependencies === void 0 ? void 0 : (_api$dependencies$fea = _api$dependencies.featureFlags) === null || _api$dependencies$fea === void 0 ? void 0 : _api$dependencies$fea.sharedState.currentState()) || {};
16
18
  return {
17
19
  name: 'rule',
18
20
  nodes: function nodes() {
@@ -25,14 +27,13 @@ var rulePlugin = function rulePlugin() {
25
27
  return [{
26
28
  name: 'ruleInputRule',
27
29
  plugin: function plugin(_ref) {
28
- var schema = _ref.schema,
29
- featureFlags = _ref.featureFlags;
30
+ var schema = _ref.schema;
30
31
  return (0, _inputRule.default)(schema, featureFlags);
31
32
  }
32
33
  }, {
33
34
  name: 'ruleKeymap',
34
35
  plugin: function plugin() {
35
- return (0, _keymap.default)();
36
+ return (0, _keymap.default)(featureFlags);
36
37
  }
37
38
  }];
38
39
  },
@@ -11,15 +11,13 @@ var _prosemirrorInputRules = require("@atlaskit/prosemirror-input-rules");
11
11
  var _insert = require("../../../utils/insert");
12
12
  var _prosemirrorUtils = require("prosemirror-utils");
13
13
  var _analytics = require("../../analytics");
14
- var _featureFlagsContext = require("../../feature-flags-context");
15
- var createHorizontalRule = function createHorizontalRule(state, start, end, inputMethod) {
14
+ var createHorizontalRule = function createHorizontalRule(state, featureFlags, start, end, inputMethod) {
16
15
  if (!state.selection.empty) {
17
16
  return null;
18
17
  }
19
18
  var tr = null;
20
19
  var rule = state.schema.nodes.rule;
21
- var _getFeatureFlags = (0, _featureFlagsContext.getFeatureFlags)(state),
22
- newInsertionBehaviour = _getFeatureFlags.newInsertionBehaviour;
20
+ var newInsertionBehaviour = featureFlags.newInsertionBehaviour;
23
21
  if (newInsertionBehaviour) {
24
22
  /**
25
23
  * This is a workaround to get rid of the typeahead text when using quick insert
@@ -43,19 +41,19 @@ var createHorizontalRule = function createHorizontalRule(state, start, end, inpu
43
41
  });
44
42
  };
45
43
  exports.createHorizontalRule = createHorizontalRule;
46
- var createHorizontalRuleAutoformat = function createHorizontalRuleAutoformat(state, start, end) {
44
+ var createHorizontalRuleAutoformat = function createHorizontalRuleAutoformat(state, featureFlags, start, end) {
47
45
  var listItem = state.schema.nodes.listItem;
48
46
  if ((0, _prosemirrorUtils.hasParentNodeOfType)(listItem)(state.selection)) {
49
47
  return null;
50
48
  }
51
- return createHorizontalRule(state, start, end, _analytics.INPUT_METHOD.FORMATTING);
49
+ return createHorizontalRule(state, featureFlags, start, end, _analytics.INPUT_METHOD.FORMATTING);
52
50
  };
53
51
  function inputRulePlugin(schema, featureFlags) {
54
52
  var rules = [];
55
53
  if (schema.nodes.rule) {
56
54
  // '---' and '***' for hr
57
55
  rules.push((0, _inputRules.createRule)(/^(\-\-\-|\*\*\*)$/, function (state, _match, start, end) {
58
- return createHorizontalRuleAutoformat(state, start, end);
56
+ return createHorizontalRuleAutoformat(state, featureFlags, start, end);
59
57
  }));
60
58
 
61
59
  // '---' and '***' after shift+enter for hr
@@ -64,7 +62,7 @@ function inputRulePlugin(schema, featureFlags) {
64
62
  if (state.doc.resolve(start).nodeAfter.type !== hardBreak) {
65
63
  return null;
66
64
  }
67
- return createHorizontalRuleAutoformat(state, start, end);
65
+ return createHorizontalRuleAutoformat(state, featureFlags, start, end);
68
66
  }));
69
67
  }
70
68
  if (rules.length !== 0) {
@@ -12,9 +12,9 @@ var _analytics = require("../../analytics");
12
12
  var _commands = require("../commands");
13
13
  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); }
14
14
  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; }
15
- function keymapPlugin() {
15
+ function keymapPlugin(featureFlags) {
16
16
  var list = {};
17
- keymaps.bindKeymapWithCommand(keymaps.insertRule.common, (0, _commands.insertHorizontalRule)(_analytics.INPUT_METHOD.SHORTCUT), list);
17
+ keymaps.bindKeymapWithCommand(keymaps.insertRule.common, (0, _commands.insertHorizontalRule)(_analytics.INPUT_METHOD.SHORTCUT, featureFlags), list);
18
18
  keymaps.bindKeymapWithCommand(keymaps.escape.common, function () {
19
19
  return true;
20
20
  }, list);
@@ -22,7 +22,9 @@ var pluginConfig = function pluginConfig(textColorConfig) {
22
22
  }
23
23
  return textColorConfig;
24
24
  };
25
- var textColorPlugin = function textColorPlugin(textColorConfig) {
25
+ var textColorPlugin = function textColorPlugin(textColorConfig, api) {
26
+ var _api$dependencies, _api$dependencies$fea;
27
+ var featureFlags = (api === null || api === void 0 ? void 0 : (_api$dependencies = api.dependencies) === null || _api$dependencies === void 0 ? void 0 : (_api$dependencies$fea = _api$dependencies.featureFlags) === null || _api$dependencies$fea === void 0 ? void 0 : _api$dependencies$fea.sharedState.currentState()) || {};
26
28
  return {
27
29
  name: 'textColor',
28
30
  marks: function marks() {
@@ -62,7 +64,8 @@ var textColorPlugin = function textColorPlugin(textColorConfig) {
62
64
  popupsBoundariesElement: popupsBoundariesElement,
63
65
  popupsScrollableElement: popupsScrollableElement,
64
66
  dispatchAnalyticsEvent: dispatchAnalyticsEvent,
65
- disabled: disabled
67
+ disabled: disabled,
68
+ featureFlags: featureFlags
66
69
  });
67
70
  }
68
71
  });
@@ -29,7 +29,6 @@ var _analytics = require("../../../analytics");
29
29
  var commands = _interopRequireWildcard(require("../../commands/change-color"));
30
30
  var _icon = require("./icon");
31
31
  var _styles2 = require("./styles");
32
- var _getFeatureFlags2 = require("../../../feature-flags-context/get-feature-flags");
33
32
  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); }
34
33
  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; }
35
34
  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; }
@@ -168,11 +167,11 @@ var ToolbarTextColor = /*#__PURE__*/function (_React$Component) {
168
167
  isReducedSpacing = _this$props.isReducedSpacing,
169
168
  pluginState = _this$props.pluginState,
170
169
  formatMessage = _this$props.intl.formatMessage,
171
- disabled = _this$props.disabled;
170
+ disabled = _this$props.disabled,
171
+ featureFlags = _this$props.featureFlags;
172
172
  var labelTextColor = formatMessage(messages.textColor);
173
173
  var palette = pluginState.palette;
174
- var _getFeatureFlags = (0, _getFeatureFlags2.getFeatureFlags)(this.props.editorView.state),
175
- useSomewhatSemanticTextColorNames = _getFeatureFlags.useSomewhatSemanticTextColorNames;
174
+ var useSomewhatSemanticTextColorNames = featureFlags.useSomewhatSemanticTextColorNames;
176
175
  var fitWidth;
177
176
  if (document.body.clientWidth <= 740) {
178
177
  // This was originally hard-coded, but moved here to a const
@@ -80,6 +80,16 @@ var toolbarMessages = (0, _reactIntlNext.defineMessages)({
80
80
  id: 'fabric.editor.text.formatting.off',
81
81
  defaultMessage: 'Text formatting Off',
82
82
  description: 'Reports that text formatting has been turned off'
83
+ },
84
+ navigateToEditorToolbar: {
85
+ id: 'fabric.editor.navigate.toolbar.editor',
86
+ defaultMessage: 'Navigate to editor toolbar',
87
+ description: 'Navigate to the main editor toolbar.'
88
+ },
89
+ navigateToFloatingToolbar: {
90
+ id: 'fabric.editor.navigate.toolbar.floating',
91
+ defaultMessage: 'Navigate to floating toolbar',
92
+ description: 'Navigate to a floating toolbar for relevant nodes (e.g. tables or panels).'
83
93
  }
84
94
  });
85
95
  exports.toolbarMessages = toolbarMessages;
@@ -20,7 +20,6 @@ var _StyledComponents = require("./StyledComponents");
20
20
  var _context = require("../../ContextPanel/context");
21
21
  var _FullPageContentArea = require("./FullPageContentArea");
22
22
  var _FullPageToolbar = require("./FullPageToolbar");
23
- var _featureFlagsContext = require("../../../plugins/feature-flags-context");
24
23
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
25
24
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /** @jsx jsx */
26
25
  var FullPageEditor = /*#__PURE__*/function (_React$Component) {
@@ -69,6 +68,7 @@ var FullPageEditor = /*#__PURE__*/function (_React$Component) {
69
68
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleResize", function () {
70
69
  _this.updateToolbarKeyline();
71
70
  });
71
+ _this.featureFlags = props.featureFlags;
72
72
  if (props.innerRef) {
73
73
  _this.wrapperElementRef = props.innerRef;
74
74
  }
@@ -88,10 +88,8 @@ var FullPageEditor = /*#__PURE__*/function (_React$Component) {
88
88
  }, {
89
89
  key: "render",
90
90
  value: function render() {
91
- var _props$editorView;
92
91
  var props = this.props;
93
92
  var showKeyline = this.state.showKeyline;
94
- var featureFlags = (_props$editorView = props.editorView) !== null && _props$editorView !== void 0 && _props$editorView.state ? (0, _featureFlagsContext.getFeatureFlags)(props.editorView.state) : undefined;
95
93
  return (0, _react2.jsx)(_context.ContextPanelWidthProvider, null, (0, _react2.jsx)("div", {
96
94
  css: _StyledComponents.fullPageEditorWrapper,
97
95
  className: "akEditor",
@@ -115,7 +113,7 @@ var FullPageEditor = /*#__PURE__*/function (_React$Component) {
115
113
  primaryToolbarComponents: props.primaryToolbarComponents,
116
114
  providerFactory: props.providerFactory,
117
115
  showKeyline: showKeyline,
118
- featureFlags: featureFlags
116
+ featureFlags: this.featureFlags
119
117
  }), (0, _react2.jsx)(_FullPageContentArea.FullPageContentArea, {
120
118
  appearance: props.appearance,
121
119
  contentArea: this.contentArea,
@@ -15,6 +15,12 @@ Object.defineProperty(exports, "backgroundPaletteTooltipMessages", {
15
15
  return _uiColor.backgroundPaletteTooltipMessages;
16
16
  }
17
17
  });
18
+ Object.defineProperty(exports, "chartsColorPaletteTooltipMessages", {
19
+ enumerable: true,
20
+ get: function get() {
21
+ return _uiColor.chartsColorPaletteTooltipMessages;
22
+ }
23
+ });
18
24
  exports.default = void 0;
19
25
  Object.defineProperty(exports, "textPaletteTooltipMessages", {
20
26
  enumerable: true,
@@ -53,7 +53,8 @@ function ConfigForm(_ref) {
53
53
  onFieldChange = _ref.onFieldChange,
54
54
  parameters = _ref.parameters,
55
55
  submitting = _ref.submitting,
56
- contextIdentifierProvider = _ref.contextIdentifierProvider;
56
+ contextIdentifierProvider = _ref.contextIdentifierProvider,
57
+ featureFlags = _ref.featureFlags;
57
58
  (0, _react.useEffect)(function () {
58
59
  if (fields) {
59
60
  var firstDuplicateField = (0, _transformers.findDuplicateFields)(fields);
@@ -76,7 +77,8 @@ function ConfigForm(_ref) {
76
77
  extensionManifest: extensionManifest,
77
78
  onFieldChange: onFieldChange,
78
79
  firstVisibleFieldName: firstVisibleFieldName,
79
- contextIdentifierProvider: contextIdentifierProvider
80
+ contextIdentifierProvider: contextIdentifierProvider,
81
+ featureFlags: featureFlags
80
82
  }), /*#__PURE__*/_react.default.createElement("div", {
81
83
  style: canSave ? {} : {
82
84
  display: 'none'
@@ -391,16 +393,18 @@ var ConfigPanel = /*#__PURE__*/function (_React$Component) {
391
393
  key: "render",
392
394
  value: function render() {
393
395
  var _this2 = this;
394
- var extensionManifest = this.props.extensionManifest;
396
+ var _this$props6 = this.props,
397
+ extensionManifest = _this$props6.extensionManifest,
398
+ featureFlags = _this$props6.featureFlags;
395
399
  if (!extensionManifest) {
396
400
  return /*#__PURE__*/_react.default.createElement(_LoadingState.default, null);
397
401
  }
398
- var _this$props6 = this.props,
399
- autoSave = _this$props6.autoSave,
400
- errorMessage = _this$props6.errorMessage,
401
- fields = _this$props6.fields,
402
- isLoading = _this$props6.isLoading,
403
- onCancel = _this$props6.onCancel;
402
+ var _this$props7 = this.props,
403
+ autoSave = _this$props7.autoSave,
404
+ errorMessage = _this$props7.errorMessage,
405
+ fields = _this$props7.fields,
406
+ isLoading = _this$props7.isLoading,
407
+ onCancel = _this$props7.onCancel;
404
408
  var _this$state = this.state,
405
409
  currentParameters = _this$state.currentParameters,
406
410
  hasParsedParameters = _this$state.hasParsedParameters,
@@ -445,7 +449,8 @@ var ConfigPanel = /*#__PURE__*/function (_React$Component) {
445
449
  onFieldChange: onFieldChange,
446
450
  parameters: currentParameters,
447
451
  submitting: submitting,
448
- contextIdentifierProvider: extension === null || extension === void 0 ? void 0 : extension.contextIdentifierProvider
452
+ contextIdentifierProvider: extension === null || extension === void 0 ? void 0 : extension.contextIdentifierProvider,
453
+ featureFlags: featureFlags
449
454
  }));
450
455
  }
451
456
  }));
@@ -85,6 +85,7 @@ function FieldsLoader(_ref) {
85
85
  autoSaveReject = _ref.autoSaveReject,
86
86
  closeOnEsc = _ref.closeOnEsc,
87
87
  showHeader = _ref.showHeader,
88
+ featureFlags = _ref.featureFlags,
88
89
  onChange = _ref.onChange,
89
90
  onCancel = _ref.onCancel;
90
91
  var _useStateFromPromise = (0, _useStateFromPromise3.useStateFromPromise)(function () {
@@ -114,7 +115,8 @@ function FieldsLoader(_ref) {
114
115
  showHeader: showHeader,
115
116
  onChange: onChange,
116
117
  onCancel: onCancel,
117
- errorMessage: errorMessage
118
+ errorMessage: errorMessage,
119
+ featureFlags: featureFlags
118
120
  });
119
121
  });
120
122
  }