@atlaskit/editor-core 180.1.0 → 181.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +43 -0
- package/dist/cjs/actions/index.js +25 -10
- package/dist/cjs/analytics-api/attach-payload-into-transaction.js +1 -1
- package/dist/cjs/create-editor/ReactEditorView.js +0 -5
- package/dist/cjs/create-editor/ReactEditorViewInternal.js +73 -103
- package/dist/cjs/create-editor/create-plugins-list.js +30 -3
- package/dist/cjs/create-editor/preset-utils.js +27 -0
- package/dist/cjs/editor-next/editor-internal.js +2 -2
- package/dist/cjs/editor-next/editor-migration-component.js +18 -2
- package/dist/cjs/editor-next/hooks/useProviderFactory.js +4 -3
- package/dist/cjs/editor-next/index.js +13 -9
- package/dist/cjs/editor-next/utils/getProvidersFromEditorProps.js +41 -0
- package/dist/cjs/editor-next/utils/handleProviders.js +17 -22
- package/dist/cjs/editor.js +20 -13
- package/dist/cjs/keymaps/consts.js +1 -16
- package/dist/cjs/labs/next/presets/cxhtml.js +56 -55
- package/dist/cjs/labs/next/presets/default.js +15 -42
- package/dist/cjs/labs/next/presets/mobile.js +76 -89
- package/dist/cjs/labs/next/presets/universal.js +330 -257
- package/dist/cjs/labs/next/presets/useUniversalPreset.js +36 -0
- package/dist/cjs/plugins/analytics/plugin.js +6 -0
- package/dist/cjs/plugins/annotation/utils.js +2 -36
- package/dist/cjs/plugins/base/pm-plugins/react-nodeview.js +2 -7
- package/dist/cjs/plugins/block-type/pm-plugins/input-rule.js +0 -10
- package/dist/cjs/plugins/caption/index.js +0 -7
- package/dist/cjs/plugins/card/nodeviews/blockCard.js +9 -4
- package/dist/cjs/plugins/card/nodeviews/inlineCard.js +6 -2
- package/dist/cjs/plugins/card/pm-plugins/main.js +6 -3
- package/dist/cjs/plugins/card/pm-plugins/util/resolve.js +4 -0
- package/dist/cjs/plugins/code-block/pm-plugins/main-state.js +2 -14
- package/dist/cjs/plugins/collab-edit/provider/index.js +1 -8
- package/dist/cjs/plugins/collab-edit/provider/types.js +1 -12
- package/dist/cjs/plugins/context-panel/index.js +1 -6
- package/dist/cjs/plugins/data-consumer/index.js +0 -8
- package/dist/cjs/plugins/date/utils/internal.js +0 -4
- package/dist/cjs/plugins/extension/commands.js +1 -8
- package/dist/cjs/plugins/extension/ui/Extension/Extension/index.js +9 -2
- package/dist/cjs/plugins/extension/ui/Extension/Extension/styles.js +2 -2
- package/dist/cjs/plugins/extension/ui/Extension/Lozenge.js +1 -0
- package/dist/cjs/plugins/feedback-dialog/index.js +1 -4
- package/dist/cjs/plugins/floating-toolbar/ui/Button.js +7 -3
- package/dist/cjs/plugins/floating-toolbar/ui/Dropdown.js +10 -5
- package/dist/cjs/plugins/floating-toolbar/ui/EmojiPickerButton.js +2 -9
- package/dist/cjs/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +1 -0
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +24 -8
- package/dist/cjs/plugins/floating-toolbar/utils.js +0 -12
- package/dist/cjs/plugins/fragment/index.js +0 -8
- package/dist/cjs/plugins/help-dialog/commands.js +2 -6
- package/dist/cjs/plugins/image-upload/pm-plugins/main.js +50 -12
- package/dist/cjs/plugins/layout/styles.js +10 -1
- package/dist/cjs/plugins/list/utils/find.js +0 -28
- package/dist/cjs/plugins/list/utils/indentation.js +1 -25
- package/dist/cjs/plugins/list/utils/node.js +0 -5
- package/dist/cjs/plugins/list/utils/selection.js +2 -15
- package/dist/cjs/plugins/media/utils/media-common.js +1 -20
- package/dist/cjs/plugins/mentions/nodeviews/mention.js +100 -16
- package/dist/cjs/plugins/mentions/type-ahead/index.js +1 -18
- package/dist/cjs/plugins/mentions/ui/InviteItem/index.js +1 -3
- package/dist/cjs/plugins/mobile-dimensions/index.js +1 -4
- package/dist/cjs/plugins/paste/index.js +1 -2
- package/dist/cjs/plugins/paste/pm-plugins/analytics.js +123 -87
- package/dist/cjs/plugins/paste/util/index.js +0 -46
- package/dist/cjs/plugins/quick-insert/assets/index.js +1 -27
- package/dist/cjs/plugins/selection/gap-cursor/actions.js +49 -44
- package/dist/cjs/plugins/status/utils.js +1 -15
- package/dist/cjs/plugins/text-color/pm-plugins/main.js +0 -1
- package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/index.js +7 -5
- package/dist/cjs/plugins/text-formatting/pm-plugins/smart-input-rule.js +8 -2
- package/dist/cjs/plugins/text-formatting/utils.js +1 -26
- package/dist/cjs/plugins/type-ahead/constants.js +1 -7
- package/dist/cjs/plugins/type-ahead/pm-plugins/decorations.js +2 -35
- package/dist/cjs/plugins/type-ahead/utils.js +3 -22
- package/dist/cjs/test-utils.js +4 -12
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +43 -8
- package/dist/cjs/ui/ColorPalette/index.js +18 -0
- package/dist/cjs/ui/ColorPickerButton/index.js +6 -2
- package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +1 -0
- package/dist/cjs/ui/ConfigPanel/utils.js +4 -17
- package/dist/cjs/ui/ContentStyles/index.js +1 -1
- package/dist/cjs/ui/ElementBrowser/ModalElementBrowser.js +1 -1
- package/dist/cjs/ui/ElementBrowser/constants.js +1 -3
- package/dist/cjs/ui/Resizer/utils.js +1 -3
- package/dist/cjs/ui/styles.js +3 -7
- package/dist/cjs/utils/get-editor-plugins.js +1 -3
- package/dist/cjs/utils/index.js +9 -269
- package/dist/cjs/utils/input-rules.js +1 -15
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/actions/index.js +23 -9
- package/dist/es2019/analytics-api/attach-payload-into-transaction.js +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +0 -5
- package/dist/es2019/create-editor/ReactEditorViewInternal.js +67 -82
- package/dist/es2019/create-editor/create-plugins-list.js +25 -3
- package/dist/es2019/create-editor/preset-utils.js +15 -0
- package/dist/es2019/editor-next/editor-internal.js +2 -2
- package/dist/es2019/editor-next/editor-migration-component.js +19 -2
- package/dist/es2019/editor-next/hooks/useProviderFactory.js +4 -3
- package/dist/es2019/editor-next/index.js +13 -7
- package/dist/es2019/editor-next/utils/getProvidersFromEditorProps.js +36 -0
- package/dist/es2019/editor-next/utils/handleProviders.js +18 -24
- package/dist/es2019/editor.js +20 -11
- package/dist/es2019/keymaps/consts.js +7 -11
- package/dist/es2019/labs/next/presets/cxhtml.js +56 -53
- package/dist/es2019/labs/next/presets/default.js +18 -38
- package/dist/es2019/labs/next/presets/mobile.js +88 -88
- package/dist/es2019/labs/next/presets/universal.js +338 -265
- package/dist/es2019/labs/next/presets/useUniversalPreset.js +25 -0
- package/dist/es2019/plugins/analytics/plugin.js +7 -0
- package/dist/es2019/plugins/annotation/utils.js +2 -30
- package/dist/es2019/plugins/base/pm-plugins/react-nodeview.js +1 -3
- package/dist/es2019/plugins/block-type/pm-plugins/input-rule.js +3 -9
- package/dist/es2019/plugins/caption/index.js +0 -2
- package/dist/es2019/plugins/card/nodeviews/blockCard.js +8 -4
- package/dist/es2019/plugins/card/nodeviews/inlineCard.js +6 -2
- package/dist/es2019/plugins/card/pm-plugins/main.js +6 -3
- package/dist/es2019/plugins/card/pm-plugins/util/resolve.js +4 -0
- package/dist/es2019/plugins/code-block/pm-plugins/main-state.js +1 -9
- package/dist/es2019/plugins/collab-edit/provider/index.js +1 -1
- package/dist/es2019/plugins/collab-edit/provider/types.js +1 -10
- package/dist/es2019/plugins/context-panel/index.js +0 -3
- package/dist/es2019/plugins/data-consumer/index.js +0 -7
- package/dist/es2019/plugins/date/utils/internal.js +0 -3
- package/dist/es2019/plugins/extension/commands.js +0 -6
- package/dist/es2019/plugins/extension/ui/Extension/Extension/index.js +12 -2
- package/dist/es2019/plugins/extension/ui/Extension/Extension/styles.js +3 -0
- package/dist/es2019/plugins/extension/ui/Extension/Lozenge.js +1 -0
- package/dist/es2019/plugins/feedback-dialog/index.js +0 -2
- package/dist/es2019/plugins/floating-toolbar/ui/Button.js +7 -3
- package/dist/es2019/plugins/floating-toolbar/ui/Dropdown.js +10 -5
- package/dist/es2019/plugins/floating-toolbar/ui/EmojiPickerButton.js +1 -11
- package/dist/es2019/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +1 -0
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +21 -4
- package/dist/es2019/plugins/floating-toolbar/utils.js +0 -10
- package/dist/es2019/plugins/fragment/index.js +0 -7
- package/dist/es2019/plugins/help-dialog/commands.js +1 -2
- package/dist/es2019/plugins/image-upload/pm-plugins/main.js +47 -5
- package/dist/es2019/plugins/layout/styles.js +12 -4
- package/dist/es2019/plugins/list/utils/find.js +0 -27
- package/dist/es2019/plugins/list/utils/indentation.js +0 -23
- package/dist/es2019/plugins/list/utils/node.js +1 -4
- package/dist/es2019/plugins/list/utils/selection.js +2 -15
- package/dist/es2019/plugins/media/utils/media-common.js +1 -19
- package/dist/es2019/plugins/mentions/nodeviews/mention.js +64 -16
- package/dist/es2019/plugins/mentions/type-ahead/index.js +1 -14
- package/dist/es2019/plugins/mentions/ui/InviteItem/index.js +1 -2
- package/dist/es2019/plugins/mobile-dimensions/index.js +0 -3
- package/dist/es2019/plugins/paste/index.js +1 -2
- package/dist/es2019/plugins/paste/pm-plugins/analytics.js +126 -94
- package/dist/es2019/plugins/paste/util/index.js +5 -45
- package/dist/es2019/plugins/quick-insert/assets/index.js +0 -8
- package/dist/es2019/plugins/selection/gap-cursor/actions.js +56 -56
- package/dist/es2019/plugins/status/utils.js +1 -11
- package/dist/es2019/plugins/text-color/pm-plugins/main.js +1 -1
- package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/index.js +7 -5
- package/dist/es2019/plugins/text-formatting/pm-plugins/smart-input-rule.js +8 -2
- package/dist/es2019/plugins/text-formatting/utils.js +0 -19
- package/dist/es2019/plugins/type-ahead/constants.js +0 -5
- package/dist/es2019/plugins/type-ahead/pm-plugins/decorations.js +0 -35
- package/dist/es2019/plugins/type-ahead/utils.js +0 -23
- package/dist/es2019/test-utils.js +4 -7
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +40 -6
- package/dist/es2019/ui/ColorPalette/index.js +2 -1
- package/dist/es2019/ui/ColorPickerButton/index.js +6 -2
- package/dist/es2019/ui/ConfigPanel/Fields/Expand.js +1 -0
- package/dist/es2019/ui/ConfigPanel/utils.js +0 -6
- package/dist/es2019/ui/ContentStyles/index.js +1 -1
- package/dist/es2019/ui/ElementBrowser/ModalElementBrowser.js +1 -1
- package/dist/es2019/ui/ElementBrowser/constants.js +0 -1
- package/dist/es2019/ui/Resizer/utils.js +0 -1
- package/dist/es2019/ui/styles.js +0 -6
- package/dist/es2019/utils/get-editor-plugins.js +1 -3
- package/dist/es2019/utils/index.js +13 -199
- package/dist/es2019/utils/input-rules.js +0 -14
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/actions/index.js +23 -9
- package/dist/esm/analytics-api/attach-payload-into-transaction.js +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +0 -5
- package/dist/esm/create-editor/ReactEditorViewInternal.js +73 -102
- package/dist/esm/create-editor/create-plugins-list.js +29 -3
- package/dist/esm/create-editor/preset-utils.js +21 -0
- package/dist/esm/editor-next/editor-internal.js +2 -2
- package/dist/esm/editor-next/editor-migration-component.js +18 -2
- package/dist/esm/editor-next/hooks/useProviderFactory.js +4 -3
- package/dist/esm/editor-next/index.js +13 -9
- package/dist/esm/editor-next/utils/getProvidersFromEditorProps.js +35 -0
- package/dist/esm/editor-next/utils/handleProviders.js +17 -22
- package/dist/esm/editor.js +20 -13
- package/dist/esm/keymaps/consts.js +7 -11
- package/dist/esm/labs/next/presets/cxhtml.js +56 -55
- package/dist/esm/labs/next/presets/default.js +18 -41
- package/dist/esm/labs/next/presets/mobile.js +88 -90
- package/dist/esm/labs/next/presets/universal.js +330 -257
- package/dist/esm/labs/next/presets/useUniversalPreset.js +29 -0
- package/dist/esm/plugins/analytics/plugin.js +6 -0
- package/dist/esm/plugins/annotation/utils.js +2 -32
- package/dist/esm/plugins/base/pm-plugins/react-nodeview.js +1 -5
- package/dist/esm/plugins/block-type/pm-plugins/input-rule.js +3 -9
- package/dist/esm/plugins/caption/index.js +0 -2
- package/dist/esm/plugins/card/nodeviews/blockCard.js +9 -4
- package/dist/esm/plugins/card/nodeviews/inlineCard.js +6 -2
- package/dist/esm/plugins/card/pm-plugins/main.js +6 -3
- package/dist/esm/plugins/card/pm-plugins/util/resolve.js +4 -0
- package/dist/esm/plugins/code-block/pm-plugins/main-state.js +0 -10
- package/dist/esm/plugins/collab-edit/provider/index.js +1 -1
- package/dist/esm/plugins/collab-edit/provider/types.js +1 -10
- package/dist/esm/plugins/context-panel/index.js +0 -3
- package/dist/esm/plugins/data-consumer/index.js +0 -7
- package/dist/esm/plugins/date/utils/internal.js +0 -3
- package/dist/esm/plugins/extension/commands.js +0 -6
- package/dist/esm/plugins/extension/ui/Extension/Extension/index.js +9 -2
- package/dist/esm/plugins/extension/ui/Extension/Extension/styles.js +2 -2
- package/dist/esm/plugins/extension/ui/Extension/Lozenge.js +1 -0
- package/dist/esm/plugins/feedback-dialog/index.js +0 -2
- package/dist/esm/plugins/floating-toolbar/ui/Button.js +7 -3
- package/dist/esm/plugins/floating-toolbar/ui/Dropdown.js +10 -5
- package/dist/esm/plugins/floating-toolbar/ui/EmojiPickerButton.js +2 -9
- package/dist/esm/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +1 -0
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +24 -8
- package/dist/esm/plugins/floating-toolbar/utils.js +0 -10
- package/dist/esm/plugins/fragment/index.js +0 -7
- package/dist/esm/plugins/help-dialog/commands.js +0 -3
- package/dist/esm/plugins/image-upload/pm-plugins/main.js +51 -12
- package/dist/esm/plugins/layout/styles.js +11 -2
- package/dist/esm/plugins/list/utils/find.js +0 -27
- package/dist/esm/plugins/list/utils/indentation.js +0 -23
- package/dist/esm/plugins/list/utils/node.js +1 -4
- package/dist/esm/plugins/list/utils/selection.js +2 -12
- package/dist/esm/plugins/media/utils/media-common.js +1 -17
- package/dist/esm/plugins/mentions/nodeviews/mention.js +97 -16
- package/dist/esm/plugins/mentions/type-ahead/index.js +1 -18
- package/dist/esm/plugins/mentions/ui/InviteItem/index.js +1 -2
- package/dist/esm/plugins/mobile-dimensions/index.js +0 -3
- package/dist/esm/plugins/paste/index.js +1 -2
- package/dist/esm/plugins/paste/pm-plugins/analytics.js +122 -86
- package/dist/esm/plugins/paste/util/index.js +5 -45
- package/dist/esm/plugins/quick-insert/assets/index.js +0 -20
- package/dist/esm/plugins/selection/gap-cursor/actions.js +52 -45
- package/dist/esm/plugins/status/utils.js +1 -13
- package/dist/esm/plugins/text-color/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/text-color/ui/ToolbarTextColor/index.js +7 -5
- package/dist/esm/plugins/text-formatting/pm-plugins/smart-input-rule.js +8 -2
- package/dist/esm/plugins/text-formatting/utils.js +0 -21
- package/dist/esm/plugins/type-ahead/constants.js +0 -5
- package/dist/esm/plugins/type-ahead/pm-plugins/decorations.js +0 -31
- package/dist/esm/plugins/type-ahead/utils.js +2 -20
- package/dist/esm/test-utils.js +4 -7
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +41 -6
- package/dist/esm/ui/ColorPalette/index.js +2 -1
- package/dist/esm/ui/ColorPickerButton/index.js +6 -2
- package/dist/esm/ui/ConfigPanel/Fields/Expand.js +1 -0
- package/dist/esm/ui/ConfigPanel/utils.js +3 -14
- package/dist/esm/ui/ContentStyles/index.js +1 -1
- package/dist/esm/ui/ElementBrowser/ModalElementBrowser.js +1 -1
- package/dist/esm/ui/ElementBrowser/constants.js +0 -1
- package/dist/esm/ui/Resizer/utils.js +0 -1
- package/dist/esm/ui/styles.js +2 -5
- package/dist/esm/utils/get-editor-plugins.js +1 -3
- package/dist/esm/utils/index.js +13 -196
- package/dist/esm/utils/input-rules.js +0 -13
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/actions/index.d.ts +4 -4
- package/dist/types/create-editor/ReactEditorView.d.ts +0 -3
- package/dist/types/create-editor/ReactEditorViewInternal.d.ts +9 -7
- package/dist/types/create-editor/ReactEditorViewNext.d.ts +3 -4
- package/dist/types/create-editor/create-plugins-list.d.ts +3 -5
- package/dist/types/create-editor/preset-utils.d.ts +2 -0
- package/dist/types/editor-next/editor-internal.d.ts +9 -9
- package/dist/types/editor-next/hooks/useMeasureEditorMountTime.d.ts +2 -2
- package/dist/types/editor-next/hooks/useProviderFactory.d.ts +2 -2
- package/dist/types/editor-next/index.d.ts +6 -6
- package/dist/types/editor-next/utils/deprecationWarnings.d.ts +2 -2
- package/dist/types/editor-next/utils/editorPropTypes.d.ts +1 -1
- package/dist/types/editor-next/utils/getProvidersFromEditorProps.d.ts +9 -0
- package/dist/types/editor-next/utils/handleProviders.d.ts +2 -2
- package/dist/types/editor-next/utils/onEditorCreated.d.ts +2 -2
- package/dist/types/editor-next/utils/sendDurationAnalytics.d.ts +1 -1
- package/dist/types/editor.d.ts +7 -4
- package/dist/types/keymaps/consts.d.ts +0 -11
- package/dist/types/labs/next/presets/cxhtml.d.ts +33 -1
- package/dist/types/labs/next/presets/default.d.ts +67 -10
- package/dist/types/labs/next/presets/mobile.d.ts +33 -1
- package/dist/types/labs/next/presets/universal.d.ts +5 -13
- package/dist/types/labs/next/presets/useUniversalPreset.d.ts +7 -0
- package/dist/types/nodeviews/context-adapter.d.ts +0 -1
- package/dist/types/nodeviews/index.d.ts +0 -1
- package/dist/types/plugins/alignment/pm-plugins/types.d.ts +0 -11
- package/dist/types/plugins/annotation/utils.d.ts +0 -17
- package/dist/types/plugins/base/pm-plugins/react-nodeview.d.ts +2 -3
- package/dist/types/plugins/block-type/pm-plugins/input-rule.d.ts +2 -6
- package/dist/types/plugins/caption/index.d.ts +0 -2
- package/dist/types/plugins/card/nodeviews/blockCard.d.ts +2 -10
- package/dist/types/plugins/card/nodeviews/genericCard.d.ts +1 -0
- package/dist/types/plugins/card/nodeviews/inlineCard.d.ts +1 -1
- package/dist/types/plugins/code-block/actions.d.ts +0 -4
- package/dist/types/plugins/code-block/pm-plugins/main-state.d.ts +0 -3
- package/dist/types/plugins/collab-edit/provider/index.d.ts +1 -2
- package/dist/types/plugins/collab-edit/provider/types.d.ts +1 -36
- package/dist/types/plugins/context-panel/index.d.ts +2 -3
- package/dist/types/plugins/data-consumer/index.d.ts +0 -2
- package/dist/types/plugins/date/utils/internal.d.ts +0 -1
- package/dist/types/plugins/extension/commands.d.ts +0 -1
- package/dist/types/plugins/extension/nodeviews/extension.d.ts +0 -5
- package/dist/types/plugins/feedback-dialog/index.d.ts +0 -2
- package/dist/types/plugins/floating-toolbar/ui/Button.d.ts +3 -1
- package/dist/types/plugins/floating-toolbar/ui/Dropdown.d.ts +1 -0
- package/dist/types/plugins/floating-toolbar/utils.d.ts +0 -2
- package/dist/types/plugins/fragment/index.d.ts +0 -2
- package/dist/types/plugins/help-dialog/commands.d.ts +0 -1
- package/dist/types/plugins/history/actions.d.ts +1 -2
- package/dist/types/plugins/layout/styles.d.ts +2 -1
- package/dist/types/plugins/list/utils/find.d.ts +0 -1
- package/dist/types/plugins/list/utils/indentation.d.ts +0 -1
- package/dist/types/plugins/list/utils/node.d.ts +0 -2
- package/dist/types/plugins/list/utils/selection.d.ts +0 -3
- package/dist/types/plugins/media/utils/media-common.d.ts +0 -5
- package/dist/types/plugins/mentions/types.d.ts +1 -2
- package/dist/types/plugins/mentions/ui/InviteItem/index.d.ts +2 -3
- package/dist/types/plugins/mentions/ui/InviteItem/styles.d.ts +0 -6
- package/dist/types/plugins/mentions/ui/ToolbarMention/index.d.ts +1 -4
- package/dist/types/plugins/mobile-dimensions/index.d.ts +0 -1
- package/dist/types/plugins/paste/index.d.ts +0 -1
- package/dist/types/plugins/paste/pm-plugins/analytics.d.ts +6 -3
- package/dist/types/plugins/paste/util/index.d.ts +0 -6
- package/dist/types/plugins/quick-insert/assets/index.d.ts +0 -2
- package/dist/types/plugins/status/utils.d.ts +0 -3
- package/dist/types/plugins/tasks-and-decisions/pm-plugins/main.d.ts +0 -6
- package/dist/types/plugins/text-color/pm-plugins/main.d.ts +2 -12
- package/dist/types/plugins/text-formatting/pm-plugins/clear-formatting.d.ts +0 -1
- package/dist/types/plugins/text-formatting/utils.d.ts +0 -4
- package/dist/types/plugins/type-ahead/constants.d.ts +0 -4
- package/dist/types/plugins/type-ahead/pm-plugins/decorations.d.ts +0 -10
- package/dist/types/plugins/type-ahead/utils.d.ts +1 -2
- package/dist/types/test-utils.d.ts +4 -5
- package/dist/types/types/editor-appearance-component.d.ts +2 -2
- package/dist/types/types/editor-props.d.ts +55 -42
- package/dist/types/ui/Appearance/Chromeless.d.ts +0 -5
- package/dist/types/ui/Appearance/Comment/Comment.d.ts +0 -7
- package/dist/types/ui/Appearance/Comment/Toolbar.d.ts +3 -2
- package/dist/types/ui/Appearance/FullPage/MainToolbar.d.ts +0 -4
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +3 -3
- package/dist/types/ui/AppearanceComponents/Mobile.d.ts +2 -5
- package/dist/types/ui/ColorPalette/Palettes/index.d.ts +1 -1
- package/dist/types/ui/ColorPalette/Palettes/type.d.ts +1 -1
- package/dist/types/ui/ColorPalette/index.d.ts +2 -1
- package/dist/types/ui/ColorPickerButton/index.d.ts +4 -2
- package/dist/types/ui/ConfigPanel/types.d.ts +0 -3
- package/dist/types/ui/ConfigPanel/utils.d.ts +2 -3
- package/dist/types/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types/ui/ElementBrowser/ModalElementBrowser.d.ts +0 -3
- package/dist/types/ui/ElementBrowser/constants.d.ts +0 -1
- package/dist/types/ui/ElementBrowser/types.d.ts +0 -5
- package/dist/types/ui/Resizer/utils.d.ts +0 -1
- package/dist/types/ui/styles.d.ts +0 -1
- package/dist/types/utils/index.d.ts +6 -65
- package/dist/types/utils/input-rules.d.ts +1 -2
- package/dist/types/utils/table.d.ts +0 -1
- package/package.json +23 -24
- package/report.api.md +155 -146
- package/dist/cjs/labs/next/presets/preset.js +0 -101
- package/dist/cjs/plugins/analytics/types/type-ahead.js +0 -5
- package/dist/cjs/plugins/collab-edit/provider/channel.js +0 -313
- package/dist/cjs/plugins/collab-edit/provider/logger.js +0 -17
- package/dist/cjs/plugins/collab-edit/provider/mock-users.js +0 -19
- package/dist/cjs/plugins/data-consumer/plugin-key.js +0 -9
- package/dist/cjs/plugins/media/toolbar/toolbar-messages.js +0 -15
- package/dist/cjs/profiler/render-count.js +0 -60
- package/dist/cjs/ui/ColorPalette/Color/index.js +0 -9
- package/dist/cjs/ui/ConfigPanel/FieldDescription.js +0 -19
- package/dist/cjs/ui/WithPluginState/types.js +0 -5
- package/dist/es2019/labs/next/presets/preset.js +0 -68
- package/dist/es2019/plugins/analytics/types/type-ahead.js +0 -1
- package/dist/es2019/plugins/collab-edit/provider/channel.js +0 -179
- package/dist/es2019/plugins/collab-edit/provider/logger.js +0 -8
- package/dist/es2019/plugins/collab-edit/provider/mock-users.js +0 -12
- package/dist/es2019/plugins/data-consumer/plugin-key.js +0 -2
- package/dist/es2019/plugins/media/toolbar/toolbar-messages.js +0 -8
- package/dist/es2019/profiler/render-count.js +0 -53
- package/dist/es2019/ui/ColorPalette/Color/index.js +0 -2
- package/dist/es2019/ui/ConfigPanel/FieldDescription.js +0 -12
- package/dist/es2019/ui/WithPluginState/types.js +0 -1
- package/dist/esm/labs/next/presets/preset.js +0 -93
- package/dist/esm/plugins/analytics/types/type-ahead.js +0 -1
- package/dist/esm/plugins/collab-edit/provider/channel.js +0 -305
- package/dist/esm/plugins/collab-edit/provider/logger.js +0 -10
- package/dist/esm/plugins/collab-edit/provider/mock-users.js +0 -12
- package/dist/esm/plugins/data-consumer/plugin-key.js +0 -2
- package/dist/esm/plugins/media/toolbar/toolbar-messages.js +0 -8
- package/dist/esm/profiler/render-count.js +0 -49
- package/dist/esm/ui/ColorPalette/Color/index.js +0 -2
- package/dist/esm/ui/ConfigPanel/FieldDescription.js +0 -11
- package/dist/esm/ui/WithPluginState/types.js +0 -1
- package/dist/types/labs/next/presets/preset.d.ts +0 -46
- package/dist/types/plugins/analytics/types/type-ahead.d.ts +0 -1
- package/dist/types/plugins/collab-edit/provider/channel.d.ts +0 -48
- package/dist/types/plugins/collab-edit/provider/logger.d.ts +0 -1
- package/dist/types/plugins/collab-edit/provider/mock-users.d.ts +0 -6
- package/dist/types/plugins/data-consumer/plugin-key.d.ts +0 -2
- package/dist/types/plugins/media/toolbar/toolbar-messages.d.ts +0 -7
- package/dist/types/profiler/render-count.d.ts +0 -14
- package/dist/types/ui/ColorPalette/Color/index.d.ts +0 -2
- package/dist/types/ui/ConfigPanel/FieldDescription.d.ts +0 -6
- package/dist/types/ui/WithPluginState/types.d.ts +0 -10
|
@@ -1,313 +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.Channel = void 0;
|
|
8
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
|
-
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
10
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
12
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
|
-
var _utilServiceSupport = require("@atlaskit/util-service-support");
|
|
15
|
-
var _eventemitter = require("eventemitter2");
|
|
16
|
-
var _prosemirrorCollab = require("@atlaskit/prosemirror-collab");
|
|
17
|
-
var _logger = require("./logger");
|
|
18
|
-
var Channel = /*#__PURE__*/function () {
|
|
19
|
-
function Channel(config, pubSubClient) {
|
|
20
|
-
(0, _classCallCheck2.default)(this, Channel);
|
|
21
|
-
(0, _defineProperty2.default)(this, "eventEmitter", new _eventemitter.EventEmitter2());
|
|
22
|
-
this.config = config;
|
|
23
|
-
this.pubSubClient = pubSubClient;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Get initial document from service
|
|
28
|
-
*/
|
|
29
|
-
(0, _createClass2.default)(Channel, [{
|
|
30
|
-
key: "getDocument",
|
|
31
|
-
value: function () {
|
|
32
|
-
var _getDocument = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
33
|
-
var _yield$utils$requestS, doc, version;
|
|
34
|
-
return _regenerator.default.wrap(function _callee$(_context) {
|
|
35
|
-
while (1) {
|
|
36
|
-
switch (_context.prev = _context.next) {
|
|
37
|
-
case 0:
|
|
38
|
-
_context.prev = 0;
|
|
39
|
-
_context.next = 3;
|
|
40
|
-
return _utilServiceSupport.utils.requestService(this.config, {
|
|
41
|
-
path: "document/".concat(this.config.docId)
|
|
42
|
-
});
|
|
43
|
-
case 3:
|
|
44
|
-
_yield$utils$requestS = _context.sent;
|
|
45
|
-
doc = _yield$utils$requestS.doc;
|
|
46
|
-
version = _yield$utils$requestS.version;
|
|
47
|
-
return _context.abrupt("return", {
|
|
48
|
-
doc: doc,
|
|
49
|
-
version: version
|
|
50
|
-
});
|
|
51
|
-
case 9:
|
|
52
|
-
_context.prev = 9;
|
|
53
|
-
_context.t0 = _context["catch"](0);
|
|
54
|
-
(0, _logger.logger)("Collab-Edit: Document \"".concat(this.config.docId, "\" does not exist. Creating one locally."));
|
|
55
|
-
return _context.abrupt("return", {
|
|
56
|
-
doc: {},
|
|
57
|
-
version: 1
|
|
58
|
-
});
|
|
59
|
-
case 13:
|
|
60
|
-
case "end":
|
|
61
|
-
return _context.stop();
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}, _callee, this, [[0, 9]]);
|
|
65
|
-
}));
|
|
66
|
-
function getDocument() {
|
|
67
|
-
return _getDocument.apply(this, arguments);
|
|
68
|
-
}
|
|
69
|
-
return getDocument;
|
|
70
|
-
}()
|
|
71
|
-
/**
|
|
72
|
-
* Connect to pubsub to start receiving events
|
|
73
|
-
*/
|
|
74
|
-
}, {
|
|
75
|
-
key: "connect",
|
|
76
|
-
value: function () {
|
|
77
|
-
var _connect = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
78
|
-
var _this = this;
|
|
79
|
-
var docId, _yield$this$getDocume, doc, version;
|
|
80
|
-
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
81
|
-
while (1) {
|
|
82
|
-
switch (_context2.prev = _context2.next) {
|
|
83
|
-
case 0:
|
|
84
|
-
docId = this.config.docId;
|
|
85
|
-
_context2.next = 3;
|
|
86
|
-
return this.getDocument();
|
|
87
|
-
case 3:
|
|
88
|
-
_yield$this$getDocume = _context2.sent;
|
|
89
|
-
doc = _yield$this$getDocume.doc;
|
|
90
|
-
version = _yield$this$getDocume.version;
|
|
91
|
-
this.pubSubClient.on('CONNECT', function () {
|
|
92
|
-
(0, _logger.logger)('Connected to FPS-service');
|
|
93
|
-
});
|
|
94
|
-
_context2.next = 9;
|
|
95
|
-
return this.pubSubClient.join(["ari:cloud::fabric:collab-service/".concat(docId)]);
|
|
96
|
-
case 9:
|
|
97
|
-
this.pubSubClient.on('avi:pf-collab-service:steps:created', function (_event, payload) {
|
|
98
|
-
(0, _logger.logger)('Received FPS-payload', {
|
|
99
|
-
payload: payload
|
|
100
|
-
});
|
|
101
|
-
_this.emit('data', payload);
|
|
102
|
-
}).on('avi:pf-collab-service:telepointer:updated', function (_event, payload) {
|
|
103
|
-
(0, _logger.logger)('Received telepointer-payload', {
|
|
104
|
-
payload: payload
|
|
105
|
-
});
|
|
106
|
-
_this.emit('telepointer', payload);
|
|
107
|
-
});
|
|
108
|
-
this.eventEmitter.emit('connected', {
|
|
109
|
-
doc: doc,
|
|
110
|
-
version: version
|
|
111
|
-
});
|
|
112
|
-
case 11:
|
|
113
|
-
case "end":
|
|
114
|
-
return _context2.stop();
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}, _callee2, this);
|
|
118
|
-
}));
|
|
119
|
-
function connect() {
|
|
120
|
-
return _connect.apply(this, arguments);
|
|
121
|
-
}
|
|
122
|
-
return connect;
|
|
123
|
-
}()
|
|
124
|
-
}, {
|
|
125
|
-
key: "debounce",
|
|
126
|
-
value: function debounce(getState) {
|
|
127
|
-
var _this2 = this;
|
|
128
|
-
(0, _logger.logger)("Debouncing steps");
|
|
129
|
-
if (this.debounced) {
|
|
130
|
-
clearTimeout(this.debounced);
|
|
131
|
-
}
|
|
132
|
-
this.debounced = window.setTimeout(function () {
|
|
133
|
-
(0, _logger.logger)("Sending debounced");
|
|
134
|
-
_this2.sendSteps(getState(), getState);
|
|
135
|
-
}, 250);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Send steps to service
|
|
140
|
-
*/
|
|
141
|
-
}, {
|
|
142
|
-
key: "sendSteps",
|
|
143
|
-
value: function () {
|
|
144
|
-
var _sendSteps = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(state, getState, localSteps) {
|
|
145
|
-
var version, _ref, steps, response;
|
|
146
|
-
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
147
|
-
while (1) {
|
|
148
|
-
switch (_context3.prev = _context3.next) {
|
|
149
|
-
case 0:
|
|
150
|
-
if (!this.isSending) {
|
|
151
|
-
_context3.next = 3;
|
|
152
|
-
break;
|
|
153
|
-
}
|
|
154
|
-
this.debounce(getState);
|
|
155
|
-
return _context3.abrupt("return");
|
|
156
|
-
case 3:
|
|
157
|
-
version = (0, _prosemirrorCollab.getVersion)(state); // Don't send any steps before we're ready.
|
|
158
|
-
if (!((0, _typeof2.default)(version) === undefined)) {
|
|
159
|
-
_context3.next = 6;
|
|
160
|
-
break;
|
|
161
|
-
}
|
|
162
|
-
return _context3.abrupt("return");
|
|
163
|
-
case 6:
|
|
164
|
-
_ref = localSteps || (0, _prosemirrorCollab.sendableSteps)(state) || {
|
|
165
|
-
steps: []
|
|
166
|
-
}, steps = _ref.steps; // sendableSteps can return null..
|
|
167
|
-
if (!(steps.length === 0)) {
|
|
168
|
-
_context3.next = 10;
|
|
169
|
-
break;
|
|
170
|
-
}
|
|
171
|
-
(0, _logger.logger)("No steps to send. Aborting.");
|
|
172
|
-
return _context3.abrupt("return");
|
|
173
|
-
case 10:
|
|
174
|
-
this.isSending = true;
|
|
175
|
-
_context3.prev = 11;
|
|
176
|
-
_context3.next = 14;
|
|
177
|
-
return _utilServiceSupport.utils.requestService(this.config, {
|
|
178
|
-
path: "document/".concat(this.config.docId, "/steps"),
|
|
179
|
-
requestInit: {
|
|
180
|
-
method: 'POST',
|
|
181
|
-
headers: {
|
|
182
|
-
'Content-Type': 'application/json'
|
|
183
|
-
},
|
|
184
|
-
body: JSON.stringify({
|
|
185
|
-
version: version,
|
|
186
|
-
steps: steps
|
|
187
|
-
})
|
|
188
|
-
}
|
|
189
|
-
});
|
|
190
|
-
case 14:
|
|
191
|
-
response = _context3.sent;
|
|
192
|
-
this.isSending = false;
|
|
193
|
-
(0, _logger.logger)("Steps sent and accepted by service.");
|
|
194
|
-
this.emit('data', response);
|
|
195
|
-
_context3.next = 24;
|
|
196
|
-
break;
|
|
197
|
-
case 20:
|
|
198
|
-
_context3.prev = 20;
|
|
199
|
-
_context3.t0 = _context3["catch"](11);
|
|
200
|
-
this.isSending = false;
|
|
201
|
-
(0, _logger.logger)("Error sending steps: \"".concat(_context3.t0, "\""));
|
|
202
|
-
case 24:
|
|
203
|
-
case "end":
|
|
204
|
-
return _context3.stop();
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}, _callee3, this, [[11, 20]]);
|
|
208
|
-
}));
|
|
209
|
-
function sendSteps(_x, _x2, _x3) {
|
|
210
|
-
return _sendSteps.apply(this, arguments);
|
|
211
|
-
}
|
|
212
|
-
return sendSteps;
|
|
213
|
-
}()
|
|
214
|
-
/**
|
|
215
|
-
* Get steps from version x to latest
|
|
216
|
-
*/
|
|
217
|
-
}, {
|
|
218
|
-
key: "getSteps",
|
|
219
|
-
value: function () {
|
|
220
|
-
var _getSteps = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(version) {
|
|
221
|
-
return _regenerator.default.wrap(function _callee4$(_context4) {
|
|
222
|
-
while (1) {
|
|
223
|
-
switch (_context4.prev = _context4.next) {
|
|
224
|
-
case 0:
|
|
225
|
-
_context4.next = 2;
|
|
226
|
-
return _utilServiceSupport.utils.requestService(this.config, {
|
|
227
|
-
path: "document/".concat(this.config.docId, "/steps"),
|
|
228
|
-
queryParams: {
|
|
229
|
-
version: version
|
|
230
|
-
}
|
|
231
|
-
});
|
|
232
|
-
case 2:
|
|
233
|
-
return _context4.abrupt("return", _context4.sent);
|
|
234
|
-
case 3:
|
|
235
|
-
case "end":
|
|
236
|
-
return _context4.stop();
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
}, _callee4, this);
|
|
240
|
-
}));
|
|
241
|
-
function getSteps(_x4) {
|
|
242
|
-
return _getSteps.apply(this, arguments);
|
|
243
|
-
}
|
|
244
|
-
return getSteps;
|
|
245
|
-
}()
|
|
246
|
-
/**
|
|
247
|
-
* Send telepointer
|
|
248
|
-
*/
|
|
249
|
-
}, {
|
|
250
|
-
key: "sendTelepointer",
|
|
251
|
-
value: function () {
|
|
252
|
-
var _sendTelepointer = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(data) {
|
|
253
|
-
return _regenerator.default.wrap(function _callee5$(_context5) {
|
|
254
|
-
while (1) {
|
|
255
|
-
switch (_context5.prev = _context5.next) {
|
|
256
|
-
case 0:
|
|
257
|
-
(0, _logger.logger)("Sending telepointer", data);
|
|
258
|
-
_context5.next = 3;
|
|
259
|
-
return _utilServiceSupport.utils.requestService(this.config, {
|
|
260
|
-
path: "document/".concat(this.config.docId, "/telepointer"),
|
|
261
|
-
requestInit: {
|
|
262
|
-
method: 'POST',
|
|
263
|
-
headers: {
|
|
264
|
-
'Content-Type': 'application/json'
|
|
265
|
-
},
|
|
266
|
-
body: JSON.stringify(data)
|
|
267
|
-
}
|
|
268
|
-
});
|
|
269
|
-
case 3:
|
|
270
|
-
case "end":
|
|
271
|
-
return _context5.stop();
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
}, _callee5, this);
|
|
275
|
-
}));
|
|
276
|
-
function sendTelepointer(_x5) {
|
|
277
|
-
return _sendTelepointer.apply(this, arguments);
|
|
278
|
-
}
|
|
279
|
-
return sendTelepointer;
|
|
280
|
-
}()
|
|
281
|
-
/**
|
|
282
|
-
* Subscribe to events emitted by this channel
|
|
283
|
-
*/
|
|
284
|
-
}, {
|
|
285
|
-
key: "on",
|
|
286
|
-
value: function on(evt, handler) {
|
|
287
|
-
this.eventEmitter.on(evt, handler);
|
|
288
|
-
return this;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
/**
|
|
292
|
-
* Unsubscribe from events emitted by this channel
|
|
293
|
-
*/
|
|
294
|
-
}, {
|
|
295
|
-
key: "off",
|
|
296
|
-
value: function off(evt, handler) {
|
|
297
|
-
this.eventEmitter.off(evt, handler);
|
|
298
|
-
return this;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
/**
|
|
302
|
-
* Emit events to subscribers
|
|
303
|
-
*/
|
|
304
|
-
}, {
|
|
305
|
-
key: "emit",
|
|
306
|
-
value: function emit(evt, data) {
|
|
307
|
-
this.eventEmitter.emit(evt, data);
|
|
308
|
-
return this;
|
|
309
|
-
}
|
|
310
|
-
}]);
|
|
311
|
-
return Channel;
|
|
312
|
-
}();
|
|
313
|
-
exports.Channel = Channel;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.logger = void 0;
|
|
7
|
-
var logger = function logger(msg) {
|
|
8
|
-
var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
9
|
-
var style = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'color:blue;font-weight:bold;';
|
|
10
|
-
// eslint-disable-next-line no-console
|
|
11
|
-
console.log("%cCollab-Edit: ".concat(msg), style);
|
|
12
|
-
if (data) {
|
|
13
|
-
// eslint-disable-next-line no-console
|
|
14
|
-
console.log(data);
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
exports.logger = logger;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getParticipant = void 0;
|
|
7
|
-
var participants = ['Awilda Mcentire', 'Katie Iddings', 'Serafina Mcdowell', 'Eun Knopp', 'Walker Reighard', 'Keely Muth', 'Allie April', 'Rosamond Paton', 'Lashawnda Peppard', 'Hubert Feingold', 'Idalia Mcquaig', 'Wyatt Byer', 'Genevieve Reeder', 'Dona Elton', 'Jerilyn Holte', 'Salina Erhardt', 'Velda Latour', 'Regina Richer', 'Natisha Tiger', 'Glynda Stuckey', 'Wilson Woodberry', 'Elvie Furtado', 'Lasandra Palmatier', 'Louise Mijares', 'Herma Vanleer', 'Titus Plante', 'James Fiscus', 'Ina Ramero', 'Jeanene Bernabe', 'Lida Lepine', 'Rosalina Palka', 'Dayle Grossi', 'Zack Leister', 'Isobel Fay', 'Elouise Kluge', 'Twyla Machin', 'Diane Herrington', 'Fumiko Elders', 'Kennith Howe', 'Doloris Mccollom', 'Daryl Wherry', 'Sade Albury', 'Roy Cork', 'Hunter Hultgren', 'Mi Miley', 'Isabelle Halperin', 'Kayla Starke', 'Allyson Woomer', 'Sirena Politte', 'Patricia Scovil'];
|
|
8
|
-
var getParticipant = function getParticipant(userId) {
|
|
9
|
-
var id = +userId.split('/')[1];
|
|
10
|
-
// eslint-disable-next-line no-bitwise
|
|
11
|
-
var name = participants[(id | 0) % participants.length];
|
|
12
|
-
return {
|
|
13
|
-
userId: userId,
|
|
14
|
-
name: name,
|
|
15
|
-
avatar: "https://api.adorable.io/avatars/80/".concat(name.replace(/\s/g, ''), ".png"),
|
|
16
|
-
email: "".concat(name.replace(/\s/g, '').toLocaleLowerCase(), "@atlassian.com")
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
exports.getParticipant = getParticipant;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.pluginKey = void 0;
|
|
7
|
-
var _prosemirrorState = require("prosemirror-state");
|
|
8
|
-
var pluginKey = new _prosemirrorState.PluginKey('dataConsumerMarkPlugin');
|
|
9
|
-
exports.pluginKey = pluginKey;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.toolbarMessages = void 0;
|
|
7
|
-
var _reactIntlNext = require("react-intl-next");
|
|
8
|
-
var toolbarMessages = (0, _reactIntlNext.defineMessages)({
|
|
9
|
-
annotate: {
|
|
10
|
-
id: 'fabric.editor.annotate',
|
|
11
|
-
defaultMessage: 'Annotate',
|
|
12
|
-
description: 'Annotate an image by drawing arrows, adding text, or scribbles.'
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
exports.toolbarMessages = toolbarMessages;
|
|
@@ -1,60 +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.RenderCountProfiler = exports.ProfiledComponentIds = void 0;
|
|
9
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _uuid = _interopRequireDefault(require("uuid"));
|
|
11
|
-
var _utils = require("@atlaskit/editor-common/utils");
|
|
12
|
-
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); }
|
|
13
|
-
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; }
|
|
14
|
-
var ProfiledComponentIds;
|
|
15
|
-
exports.ProfiledComponentIds = ProfiledComponentIds;
|
|
16
|
-
(function (ProfiledComponentIds) {
|
|
17
|
-
ProfiledComponentIds["editor"] = "Editor";
|
|
18
|
-
ProfiledComponentIds["appearance"] = "FullPageEditor";
|
|
19
|
-
ProfiledComponentIds["reactEditorView"] = "ReactEditorView";
|
|
20
|
-
ProfiledComponentIds["contentArea"] = "FullPageContentArea";
|
|
21
|
-
ProfiledComponentIds["toolbar"] = "FullPageToolbar";
|
|
22
|
-
ProfiledComponentIds["mention"] = "MentionNodeView";
|
|
23
|
-
})(ProfiledComponentIds || (exports.ProfiledComponentIds = ProfiledComponentIds = {}));
|
|
24
|
-
var CoreRenderCountProfiler = function CoreRenderCountProfiler(_ref) {
|
|
25
|
-
var componentId = _ref.componentId;
|
|
26
|
-
var _useRef = (0, _react.useRef)((0, _uuid.default)()),
|
|
27
|
-
instanceId = _useRef.current;
|
|
28
|
-
var onRender = function onRender(_ref2) {
|
|
29
|
-
var renderCount = _ref2.renderCount;
|
|
30
|
-
var profiler = _utils.RenderCountProfiler.getInstance({
|
|
31
|
-
store: window
|
|
32
|
-
});
|
|
33
|
-
profiler.setRenderCount({
|
|
34
|
-
componentId: componentId,
|
|
35
|
-
instanceId: instanceId,
|
|
36
|
-
renderCount: renderCount
|
|
37
|
-
});
|
|
38
|
-
};
|
|
39
|
-
(0, _utils.useComponentRenderTracking)({
|
|
40
|
-
onRender: onRender,
|
|
41
|
-
propsDiffingOptions: {
|
|
42
|
-
enabled: false
|
|
43
|
-
},
|
|
44
|
-
zeroBasedCount: false
|
|
45
|
-
});
|
|
46
|
-
return null;
|
|
47
|
-
};
|
|
48
|
-
var RenderCountProfiler = function RenderCountProfiler(_ref3) {
|
|
49
|
-
var componentId = _ref3.componentId;
|
|
50
|
-
var profiler = _utils.RenderCountProfiler.getInstance({
|
|
51
|
-
store: window
|
|
52
|
-
});
|
|
53
|
-
if (profiler.isEnabled()) {
|
|
54
|
-
return /*#__PURE__*/_react.default.createElement(CoreRenderCountProfiler, {
|
|
55
|
-
componentId: componentId
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
return null;
|
|
59
|
-
};
|
|
60
|
-
exports.RenderCountProfiler = RenderCountProfiler;
|
|
@@ -1,19 +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.default = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _form = require("@atlaskit/form");
|
|
10
|
-
var FieldDescription = function FieldDescription(_ref) {
|
|
11
|
-
var error = _ref.error,
|
|
12
|
-
description = _ref.description;
|
|
13
|
-
if (error || !description) {
|
|
14
|
-
return null;
|
|
15
|
-
}
|
|
16
|
-
return /*#__PURE__*/_react.default.createElement(_form.HelperMessage, null, description);
|
|
17
|
-
};
|
|
18
|
-
var _default = FieldDescription;
|
|
19
|
-
exports.default = _default;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
export class Preset {
|
|
2
|
-
constructor(...more) {
|
|
3
|
-
this.data = [...more] || [];
|
|
4
|
-
}
|
|
5
|
-
add(nextOrTuple) {
|
|
6
|
-
const newPreset = new Preset(nextOrTuple, ...this.data);
|
|
7
|
-
// TODO: remove this `this.data.push`,
|
|
8
|
-
// once refactoring `create-plugins-list` to address this complexity:
|
|
9
|
-
/**
|
|
10
|
-
* preset.add(x)
|
|
11
|
-
* preset.add(y)
|
|
12
|
-
* preset.add(z)
|
|
13
|
-
*/
|
|
14
|
-
// to:
|
|
15
|
-
/**
|
|
16
|
-
* immutablePreset = preset.add(x).add(foo).add(bar)
|
|
17
|
-
* presetWithY = presetWithY.add(y)
|
|
18
|
-
* presetWithZ = preset.add(z)
|
|
19
|
-
*/
|
|
20
|
-
this.data.push(nextOrTuple);
|
|
21
|
-
return newPreset;
|
|
22
|
-
}
|
|
23
|
-
has(plugin) {
|
|
24
|
-
return this.data.some(pluginPreset => {
|
|
25
|
-
if (Array.isArray(pluginPreset)) {
|
|
26
|
-
return pluginPreset[0] === plugin;
|
|
27
|
-
}
|
|
28
|
-
return pluginPreset === plugin;
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
getEditorPlugins(excludes) {
|
|
32
|
-
const editorPlugins = this.processEditorPlugins();
|
|
33
|
-
return this.removeExcludedPlugins(editorPlugins, excludes);
|
|
34
|
-
}
|
|
35
|
-
processEditorPlugins() {
|
|
36
|
-
const cache = new Map();
|
|
37
|
-
this.data.forEach(pluginEntry => {
|
|
38
|
-
if (Array.isArray(pluginEntry)) {
|
|
39
|
-
const [fn, options] = pluginEntry;
|
|
40
|
-
cache.set(fn, options);
|
|
41
|
-
} else {
|
|
42
|
-
/**
|
|
43
|
-
* Prevent usage of same plugin twice without override.
|
|
44
|
-
* [
|
|
45
|
-
* plugin1,
|
|
46
|
-
* [plugin1, { option1: value }],
|
|
47
|
-
* plugin1, // This will throw
|
|
48
|
-
* ]
|
|
49
|
-
*/
|
|
50
|
-
if (cache.has(pluginEntry) && cache.get(pluginEntry) === undefined) {
|
|
51
|
-
throw new Error(`${pluginEntry} is already included!`);
|
|
52
|
-
}
|
|
53
|
-
cache.set(pluginEntry, undefined);
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
let plugins = [];
|
|
57
|
-
cache.forEach((options, fn) => {
|
|
58
|
-
plugins.push(fn(options));
|
|
59
|
-
});
|
|
60
|
-
return plugins;
|
|
61
|
-
}
|
|
62
|
-
removeExcludedPlugins(plugins, excludes) {
|
|
63
|
-
if (excludes) {
|
|
64
|
-
return plugins.filter(plugin => !plugin || !excludes.has(plugin.name));
|
|
65
|
-
}
|
|
66
|
-
return plugins;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|