@atlaskit/editor-core 183.1.1 → 184.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 +29 -0
- package/dist/cjs/i18n/da.js +1 -1
- package/dist/cjs/i18n/en_ZZ.js +8 -34
- package/dist/cjs/i18n/it.js +1 -1
- package/dist/cjs/i18n/nb.js +3 -3
- package/dist/cjs/i18n/nl.js +4 -4
- package/dist/cjs/i18n/pl.js +1 -1
- package/dist/cjs/i18n/pt_BR.js +1 -1
- package/dist/cjs/i18n/ru.js +1 -1
- package/dist/cjs/i18n/th.js +2 -2
- package/dist/cjs/i18n/uk.js +1 -1
- package/dist/cjs/i18n/vi.js +2 -2
- package/dist/cjs/i18n/zh.js +1 -1
- package/dist/cjs/labs/next/full-page.js +2 -6
- package/dist/cjs/labs/next/presets/create-stub-internal-apis.js +4 -2
- package/dist/cjs/labs/next/presets/default.js +2 -2
- package/dist/cjs/labs/next/presets/universal.js +2 -1
- package/dist/cjs/plugins/breakout/index.js +54 -35
- package/dist/cjs/plugins/card/toolbar.js +4 -3
- package/dist/cjs/plugins/collab-edit/plugin-state.js +2 -3
- package/dist/cjs/plugins/copy-button/commands.js +8 -1
- package/dist/cjs/plugins/extension/index.js +1 -1
- package/dist/cjs/plugins/extension/nodeviews/extension.js +5 -3
- package/dist/cjs/plugins/extension/pm-plugins/main.js +6 -6
- package/dist/cjs/plugins/extension/ui/Extension/Extension/index.js +34 -4
- package/dist/cjs/plugins/extension/ui/Extension/ExtensionComponent.js +4 -2
- package/dist/cjs/plugins/extension/ui/Extension/index.js +4 -2
- package/dist/cjs/plugins/help-dialog/index.js +12 -8
- package/dist/cjs/plugins/index.js +0 -14
- package/dist/cjs/plugins/layout/pm-plugins/main.js +0 -1
- package/dist/cjs/plugins/media/index.js +15 -5
- package/dist/cjs/plugins/media/nodeviews/mediaNodeView/index.js +22 -14
- package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +53 -34
- package/dist/cjs/plugins/media/styles.js +1 -1
- package/dist/cjs/plugins/media/toolbar/index.js +4 -3
- package/dist/cjs/plugins/media/ui/ImageBorder/styles.js +4 -1
- package/dist/cjs/plugins/paste/pm-plugins/main.js +7 -1
- package/dist/cjs/test-utils.js +6 -1
- package/dist/cjs/ui/Appearance/Comment/Comment.js +2 -2
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +2 -2
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +1 -2
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +2 -2
- package/dist/cjs/ui/ContentStyles/index.js +9 -10
- package/dist/cjs/ui/ContextPanel/index.js +67 -56
- package/dist/cjs/ui/MediaAndEmbedsToolbar/index.js +10 -11
- package/dist/cjs/ui/Resizer/index.js +8 -8
- package/dist/cjs/ui/WidthEmitter/index.js +10 -4
- package/dist/cjs/utils/clipboard.js +18 -11
- package/dist/cjs/utils/performance/instrumented-plugin.js +14 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/i18n/da.js +1 -1
- package/dist/es2019/i18n/en_ZZ.js +8 -34
- package/dist/es2019/i18n/it.js +1 -1
- package/dist/es2019/i18n/nb.js +3 -3
- package/dist/es2019/i18n/nl.js +4 -4
- package/dist/es2019/i18n/pl.js +1 -1
- package/dist/es2019/i18n/pt_BR.js +1 -1
- package/dist/es2019/i18n/ru.js +1 -1
- package/dist/es2019/i18n/th.js +2 -2
- package/dist/es2019/i18n/uk.js +1 -1
- package/dist/es2019/i18n/vi.js +2 -2
- package/dist/es2019/i18n/zh.js +1 -1
- package/dist/es2019/labs/next/full-page.js +2 -5
- package/dist/es2019/labs/next/presets/create-stub-internal-apis.js +4 -2
- package/dist/es2019/labs/next/presets/default.js +1 -1
- package/dist/es2019/labs/next/presets/universal.js +2 -1
- package/dist/es2019/plugins/breakout/index.js +48 -31
- package/dist/es2019/plugins/card/toolbar.js +4 -3
- package/dist/es2019/plugins/collab-edit/plugin-state.js +2 -4
- package/dist/es2019/plugins/copy-button/commands.js +9 -2
- package/dist/es2019/plugins/extension/index.js +1 -1
- package/dist/es2019/plugins/extension/nodeviews/extension.js +5 -3
- package/dist/es2019/plugins/extension/pm-plugins/main.js +4 -4
- package/dist/es2019/plugins/extension/ui/Extension/Extension/index.js +38 -2
- package/dist/es2019/plugins/extension/ui/Extension/ExtensionComponent.js +4 -2
- package/dist/es2019/plugins/extension/ui/Extension/index.js +4 -2
- package/dist/es2019/plugins/help-dialog/index.js +14 -9
- package/dist/es2019/plugins/index.js +0 -2
- package/dist/es2019/plugins/layout/pm-plugins/main.js +0 -1
- package/dist/es2019/plugins/media/index.js +15 -5
- package/dist/es2019/plugins/media/nodeviews/mediaNodeView/index.js +21 -10
- package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +53 -33
- package/dist/es2019/plugins/media/styles.js +1 -7
- package/dist/es2019/plugins/media/toolbar/index.js +4 -4
- package/dist/es2019/plugins/media/ui/ImageBorder/styles.js +9 -9
- package/dist/es2019/plugins/paste/pm-plugins/main.js +7 -1
- package/dist/es2019/test-utils.js +6 -1
- package/dist/es2019/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +1 -1
- package/dist/es2019/ui/ContentStyles/index.js +1 -2
- package/dist/es2019/ui/ContextPanel/index.js +66 -43
- package/dist/es2019/ui/MediaAndEmbedsToolbar/index.js +8 -9
- package/dist/es2019/ui/Resizer/index.js +1 -1
- package/dist/es2019/ui/WidthEmitter/index.js +10 -4
- package/dist/es2019/utils/clipboard.js +12 -7
- package/dist/es2019/utils/performance/instrumented-plugin.js +15 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/i18n/da.js +1 -1
- package/dist/esm/i18n/en_ZZ.js +8 -34
- package/dist/esm/i18n/it.js +1 -1
- package/dist/esm/i18n/nb.js +3 -3
- package/dist/esm/i18n/nl.js +4 -4
- package/dist/esm/i18n/pl.js +1 -1
- package/dist/esm/i18n/pt_BR.js +1 -1
- package/dist/esm/i18n/ru.js +1 -1
- package/dist/esm/i18n/th.js +2 -2
- package/dist/esm/i18n/uk.js +1 -1
- package/dist/esm/i18n/vi.js +2 -2
- package/dist/esm/i18n/zh.js +1 -1
- package/dist/esm/labs/next/full-page.js +2 -5
- package/dist/esm/labs/next/presets/create-stub-internal-apis.js +4 -2
- package/dist/esm/labs/next/presets/default.js +1 -1
- package/dist/esm/labs/next/presets/universal.js +2 -1
- package/dist/esm/plugins/breakout/index.js +54 -35
- package/dist/esm/plugins/card/toolbar.js +4 -3
- package/dist/esm/plugins/collab-edit/plugin-state.js +2 -3
- package/dist/esm/plugins/copy-button/commands.js +9 -2
- package/dist/esm/plugins/extension/index.js +1 -1
- package/dist/esm/plugins/extension/nodeviews/extension.js +5 -3
- package/dist/esm/plugins/extension/pm-plugins/main.js +6 -6
- package/dist/esm/plugins/extension/ui/Extension/Extension/index.js +33 -2
- package/dist/esm/plugins/extension/ui/Extension/ExtensionComponent.js +4 -2
- package/dist/esm/plugins/extension/ui/Extension/index.js +4 -2
- package/dist/esm/plugins/help-dialog/index.js +12 -8
- package/dist/esm/plugins/index.js +0 -2
- package/dist/esm/plugins/layout/pm-plugins/main.js +0 -1
- package/dist/esm/plugins/media/index.js +15 -5
- package/dist/esm/plugins/media/nodeviews/mediaNodeView/index.js +22 -14
- package/dist/esm/plugins/media/nodeviews/mediaSingle.js +54 -35
- package/dist/esm/plugins/media/styles.js +2 -2
- package/dist/esm/plugins/media/toolbar/index.js +4 -3
- package/dist/esm/plugins/media/ui/ImageBorder/styles.js +4 -1
- package/dist/esm/plugins/paste/pm-plugins/main.js +7 -1
- package/dist/esm/test-utils.js +6 -1
- package/dist/esm/ui/Appearance/Comment/Comment.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +1 -1
- package/dist/esm/ui/ContentStyles/index.js +1 -2
- package/dist/esm/ui/ContextPanel/index.js +64 -53
- package/dist/esm/ui/MediaAndEmbedsToolbar/index.js +10 -11
- package/dist/esm/ui/Resizer/index.js +1 -1
- package/dist/esm/ui/WidthEmitter/index.js +10 -4
- package/dist/esm/utils/clipboard.js +16 -10
- package/dist/esm/utils/performance/instrumented-plugin.js +14 -2
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/actions/index.d.ts +1 -1
- package/dist/types/create-editor/get-plugins.d.ts +2 -0
- package/dist/types/i18n/en_ZZ.d.ts +2 -28
- package/dist/types/index.d.ts +0 -1
- package/dist/types/plugins/breakout/index.d.ts +4 -0
- package/dist/types/plugins/breakout/ui/LayoutButton.d.ts +1 -1
- package/dist/types/plugins/card/index.d.ts +2 -2
- package/dist/types/plugins/collab-edit/actions.d.ts +3 -2
- package/dist/types/plugins/collab-edit/events/handlers.d.ts +3 -3
- package/dist/types/plugins/collab-edit/events/initialize.d.ts +1 -1
- package/dist/types/plugins/collab-edit/events/send-transaction.d.ts +1 -1
- package/dist/types/plugins/collab-edit/index.d.ts +0 -1
- package/dist/types/plugins/collab-edit/native-collab-provider-plugin.d.ts +2 -2
- package/dist/types/plugins/collab-edit/participants.d.ts +1 -1
- package/dist/types/plugins/collab-edit/plugin.d.ts +0 -2
- package/dist/types/plugins/collab-edit/types.d.ts +1 -3
- package/dist/types/plugins/collab-edit/ui/to-avatar.d.ts +1 -1
- package/dist/types/plugins/collab-edit/utils.d.ts +2 -1
- package/dist/types/plugins/extension/index.d.ts +2 -1
- package/dist/types/plugins/extension/nodeviews/extension.d.ts +4 -1
- package/dist/types/plugins/extension/pm-plugins/main.d.ts +3 -1
- package/dist/types/plugins/extension/ui/Extension/Extension/index.d.ts +6 -0
- package/dist/types/plugins/extension/ui/Extension/ExtensionComponent.d.ts +3 -0
- package/dist/types/plugins/extension/ui/Extension/index.d.ts +3 -0
- package/dist/types/plugins/help-dialog/index.d.ts +3 -1
- package/dist/types/plugins/index.d.ts +0 -3
- package/dist/types/plugins/media/index.d.ts +12 -2
- package/dist/types/plugins/media/nodeviews/mediaNodeView/index.d.ts +4 -2
- package/dist/types/plugins/media/nodeviews/mediaSingle.d.ts +1 -1
- package/dist/types/plugins/media/nodeviews/types.d.ts +2 -1
- package/dist/types/plugins/media/toolbar/index.d.ts +3 -1
- package/dist/types/plugins/media/ui/ResizableMediaSingle/types.d.ts +2 -2
- package/dist/types/test-utils.d.ts +3 -1
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
- package/dist/types/ui/ColorPickerButton/index.d.ts +1 -1
- package/dist/types/ui/ContextPanel/index.d.ts +3 -4
- package/dist/types/ui/MediaAndEmbedsToolbar/index.d.ts +3 -1
- package/dist/types/ui/PluginSlot/index.d.ts +1 -1
- package/dist/types/ui/Resizer/types.d.ts +2 -2
- package/dist/types/utils/clipboard.d.ts +1 -0
- package/dist/types-ts4.5/actions/index.d.ts +1 -1
- package/dist/types-ts4.5/create-editor/get-plugins.d.ts +2 -0
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +2 -28
- package/dist/types-ts4.5/index.d.ts +0 -1
- package/dist/types-ts4.5/plugins/breakout/index.d.ts +6 -0
- package/dist/types-ts4.5/plugins/breakout/ui/LayoutButton.d.ts +1 -1
- package/dist/types-ts4.5/plugins/card/index.d.ts +2 -2
- package/dist/types-ts4.5/plugins/collab-edit/actions.d.ts +3 -2
- package/dist/types-ts4.5/plugins/collab-edit/events/handlers.d.ts +3 -3
- package/dist/types-ts4.5/plugins/collab-edit/events/initialize.d.ts +1 -1
- package/dist/types-ts4.5/plugins/collab-edit/events/send-transaction.d.ts +1 -1
- package/dist/types-ts4.5/plugins/collab-edit/index.d.ts +0 -1
- package/dist/types-ts4.5/plugins/collab-edit/native-collab-provider-plugin.d.ts +2 -2
- package/dist/types-ts4.5/plugins/collab-edit/participants.d.ts +1 -1
- package/dist/types-ts4.5/plugins/collab-edit/plugin.d.ts +0 -2
- package/dist/types-ts4.5/plugins/collab-edit/types.d.ts +1 -3
- package/dist/types-ts4.5/plugins/collab-edit/ui/to-avatar.d.ts +1 -1
- package/dist/types-ts4.5/plugins/collab-edit/utils.d.ts +2 -1
- package/dist/types-ts4.5/plugins/extension/index.d.ts +3 -1
- package/dist/types-ts4.5/plugins/extension/nodeviews/extension.d.ts +4 -1
- package/dist/types-ts4.5/plugins/extension/pm-plugins/main.d.ts +3 -1
- package/dist/types-ts4.5/plugins/extension/ui/Extension/Extension/index.d.ts +6 -0
- package/dist/types-ts4.5/plugins/extension/ui/Extension/ExtensionComponent.d.ts +3 -0
- package/dist/types-ts4.5/plugins/extension/ui/Extension/index.d.ts +3 -0
- package/dist/types-ts4.5/plugins/help-dialog/index.d.ts +5 -1
- package/dist/types-ts4.5/plugins/index.d.ts +0 -3
- package/dist/types-ts4.5/plugins/media/index.d.ts +9 -2
- package/dist/types-ts4.5/plugins/media/nodeviews/mediaNodeView/index.d.ts +4 -2
- package/dist/types-ts4.5/plugins/media/nodeviews/mediaSingle.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/nodeviews/types.d.ts +2 -1
- package/dist/types-ts4.5/plugins/media/toolbar/index.d.ts +3 -1
- package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/types.d.ts +2 -2
- package/dist/types-ts4.5/test-utils.d.ts +3 -1
- package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
- package/dist/types-ts4.5/ui/ColorPickerButton/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/ContextPanel/index.d.ts +3 -4
- package/dist/types-ts4.5/ui/MediaAndEmbedsToolbar/index.d.ts +3 -1
- package/dist/types-ts4.5/ui/PluginSlot/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/Resizer/types.d.ts +2 -2
- package/dist/types-ts4.5/utils/clipboard.d.ts +1 -0
- package/package.json +20 -18
- package/report.api.md +15 -63
- package/dist/cjs/plugins/collab-edit/provider/index.js +0 -5
- package/dist/cjs/plugins/collab-edit/provider/types.js +0 -5
- package/dist/cjs/plugins/grid/index.js +0 -207
- package/dist/cjs/plugins/grid/styles.js +0 -16
- package/dist/cjs/plugins/grid/types.js +0 -5
- package/dist/cjs/plugins/width/index.js +0 -88
- package/dist/cjs/ui/ContextPanel/context.js +0 -89
- package/dist/es2019/plugins/collab-edit/provider/index.js +0 -1
- package/dist/es2019/plugins/collab-edit/provider/types.js +0 -1
- package/dist/es2019/plugins/grid/index.js +0 -168
- package/dist/es2019/plugins/grid/styles.js +0 -36
- package/dist/es2019/plugins/grid/types.js +0 -1
- package/dist/es2019/plugins/width/index.js +0 -72
- package/dist/es2019/ui/ContextPanel/context.js +0 -65
- package/dist/esm/plugins/collab-edit/provider/index.js +0 -1
- package/dist/esm/plugins/collab-edit/provider/types.js +0 -1
- package/dist/esm/plugins/grid/index.js +0 -191
- package/dist/esm/plugins/grid/styles.js +0 -7
- package/dist/esm/plugins/grid/types.js +0 -1
- package/dist/esm/plugins/width/index.js +0 -78
- package/dist/esm/ui/ContextPanel/context.js +0 -79
- package/dist/types/plugins/collab-edit/provider/index.d.ts +0 -1
- package/dist/types/plugins/collab-edit/provider/types.d.ts +0 -1
- package/dist/types/plugins/grid/index.d.ts +0 -25
- package/dist/types/plugins/grid/styles.d.ts +0 -2
- package/dist/types/plugins/grid/types.d.ts +0 -7
- package/dist/types/plugins/width/index.d.ts +0 -18
- package/dist/types/ui/ContextPanel/context.d.ts +0 -24
- package/dist/types-ts4.5/plugins/collab-edit/provider/index.d.ts +0 -1
- package/dist/types-ts4.5/plugins/collab-edit/provider/types.d.ts +0 -1
- package/dist/types-ts4.5/plugins/grid/index.d.ts +0 -27
- package/dist/types-ts4.5/plugins/grid/styles.d.ts +0 -2
- package/dist/types-ts4.5/plugins/grid/types.d.ts +0 -7
- package/dist/types-ts4.5/plugins/width/index.d.ts +0 -18
- package/dist/types-ts4.5/ui/ContextPanel/context.d.ts +0 -24
package/dist/es2019/i18n/nb.js
CHANGED
|
@@ -140,11 +140,11 @@ export default {
|
|
|
140
140
|
'fabric.editor.helpDialogTips': 'Trykk på {keyMap} for å åpne denne dialogen',
|
|
141
141
|
'fabric.editor.hyperlink.linkAriaLabel': 'Koblingsetikett',
|
|
142
142
|
'fabric.editor.hyperlink.searchLinkAriaDescription': 'Forslag vises nedenfor etter hvert som du skriver inn i feltet',
|
|
143
|
-
'fabric.editor.hyperlink.searchLinkResults': '{count, plural, =0 {
|
|
143
|
+
'fabric.editor.hyperlink.searchLinkResults': '{count, plural, =0 {fant ingen resultater} one {fant {count,number} resultat} other {fant {count,number} resultater}}',
|
|
144
144
|
'fabric.editor.hyperlinkToolbarPlaceholder': 'Lim inn eller søk etter kobling',
|
|
145
145
|
'fabric.editor.imageBorderBold': 'Fet',
|
|
146
146
|
'fabric.editor.imageBorderColor': 'Farge',
|
|
147
|
-
'fabric.editor.imageBorderMedium': '
|
|
147
|
+
'fabric.editor.imageBorderMedium': 'Middels',
|
|
148
148
|
'fabric.editor.imageBorderOptions': 'Alternativer for kantlinje',
|
|
149
149
|
'fabric.editor.imageBorderSize': 'Størrelse',
|
|
150
150
|
'fabric.editor.imageBorderSubtle': 'Diskret',
|
|
@@ -158,7 +158,7 @@ export default {
|
|
|
158
158
|
'fabric.editor.inputQueryAssistiveTxt': 'Når resultater for autofullføring er tilgjengelig, bruker du pil opp og pil ned for å se gjennom og enter for å velge. Brukere av berøringsenheter kan utforske ved å berøre eller sveipe.',
|
|
159
159
|
'fabric.editor.invalidDateError': 'Oppgi en gyldig dato',
|
|
160
160
|
'fabric.editor.invalidLink': 'Skriv inn en gyldig kobling.',
|
|
161
|
-
'fabric.editor.inviteItem.title': '{userRole, select, admin {Inviter
|
|
161
|
+
'fabric.editor.inviteItem.title': '{userRole, select, admin {Inviter teammedlemmer til {productName}} trusted {Inviter teammedlemmer til {productName}} other {Legg til teammedlem i {productName}}}',
|
|
162
162
|
'fabric.editor.italic': 'Kursiv',
|
|
163
163
|
'fabric.editor.keyboardShortcuts': 'Tastatursnarveier',
|
|
164
164
|
'fabric.editor.leftSidebar': 'Sidelinje til venstre',
|
package/dist/es2019/i18n/nl.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
//Dutch (Netherlands)
|
|
9
9
|
export default {
|
|
10
10
|
'fabric.editor.addAltText': 'Alt-tekst',
|
|
11
|
-
'fabric.editor.addImageBorder': '
|
|
11
|
+
'fabric.editor.addImageBorder': 'Kader toevoegen',
|
|
12
12
|
'fabric.editor.alignCenter': 'Midden uitgelijnd',
|
|
13
13
|
'fabric.editor.alignLeft': 'Links uitlijnen',
|
|
14
14
|
'fabric.editor.alignRight': 'Rechts uitgelijnd',
|
|
@@ -145,7 +145,7 @@ export default {
|
|
|
145
145
|
'fabric.editor.imageBorderBold': 'Vet',
|
|
146
146
|
'fabric.editor.imageBorderColor': 'Kleur',
|
|
147
147
|
'fabric.editor.imageBorderMedium': 'Medium',
|
|
148
|
-
'fabric.editor.imageBorderOptions': '
|
|
148
|
+
'fabric.editor.imageBorderOptions': 'Kaderopties',
|
|
149
149
|
'fabric.editor.imageBorderSize': 'Grootte',
|
|
150
150
|
'fabric.editor.imageBorderSubtle': 'Subtiel',
|
|
151
151
|
'fabric.editor.improvement': 'Verbetering',
|
|
@@ -158,7 +158,7 @@ export default {
|
|
|
158
158
|
'fabric.editor.inputQueryAssistiveTxt': 'Wanneer resultaten voor automatisch aanvullen beschikbaar zijn, kun je de pijlen naar boven en beneden gebruiken om ze te bekijken en Enter om ze te selecteren. Touch-apparaatgebruikers verkennen door middel van aanraking of met veegbewegingen.',
|
|
159
159
|
'fabric.editor.invalidDateError': 'Voer een geldige datum in',
|
|
160
160
|
'fabric.editor.invalidLink': 'Voer een geldige link in.',
|
|
161
|
-
'fabric.editor.inviteItem.title': '{userRole, select, admin {Nodig
|
|
161
|
+
'fabric.editor.inviteItem.title': '{userRole, select, admin {Nodig teamgenoten uit voor {productName}} trusted {Nodig teamgenoten uit voor {productName}} other {Voeg teamgenoten toe aan {productName}}}',
|
|
162
162
|
'fabric.editor.italic': 'Cursief',
|
|
163
163
|
'fabric.editor.keyboardShortcuts': 'Sneltoetsen',
|
|
164
164
|
'fabric.editor.leftSidebar': 'Zijbalk aan linkerkant',
|
|
@@ -195,7 +195,7 @@ export default {
|
|
|
195
195
|
'fabric.editor.placeholderTextPlaceholder': 'Voeg plaatsaanduidingstekst toe',
|
|
196
196
|
'fabric.editor.quickInsert': 'Snel invoegen',
|
|
197
197
|
'fabric.editor.redo': 'Pas opnieuw toe',
|
|
198
|
-
'fabric.editor.removeImageBorder': '
|
|
198
|
+
'fabric.editor.removeImageBorder': 'Kader verwijderen',
|
|
199
199
|
'fabric.editor.replace': 'Vervangen',
|
|
200
200
|
'fabric.editor.replaceAll': 'Alles vervangen',
|
|
201
201
|
'fabric.editor.replaceWith': 'Vervangen met',
|
package/dist/es2019/i18n/pl.js
CHANGED
|
@@ -140,7 +140,7 @@ export default {
|
|
|
140
140
|
'fabric.editor.helpDialogTips': 'Naciśnij {keyMap}, aby szybko otworzyć okno dialogowe w dowolnym momencie',
|
|
141
141
|
'fabric.editor.hyperlink.linkAriaLabel': 'Etykieta łącza',
|
|
142
142
|
'fabric.editor.hyperlink.searchLinkAriaDescription': 'Sugestie będą pojawiały się poniżej w miarę wpisywania tekstu w polu',
|
|
143
|
-
'fabric.editor.hyperlink.searchLinkResults': '{count, plural, =0 {
|
|
143
|
+
'fabric.editor.hyperlink.searchLinkResults': '{count, plural, =0 {nie znaleziono wyników} one {znaleziono {count,number} wynik} few {znaleziono {count,number} wyniki} many {znaleziono {count,number} wyników} other {znaleziono {count,number} wyniku}}',
|
|
144
144
|
'fabric.editor.hyperlinkToolbarPlaceholder': 'Wklej lub wyszukaj łącze',
|
|
145
145
|
'fabric.editor.imageBorderBold': 'Pogrubiony',
|
|
146
146
|
'fabric.editor.imageBorderColor': 'Kolor',
|
|
@@ -158,7 +158,7 @@ export default {
|
|
|
158
158
|
'fabric.editor.inputQueryAssistiveTxt': 'Quando os resultados do preenchimento automático estiverem disponíveis, use as setas para cima e para baixo para analisar e a tecla enter para selecionar. Toque nos usuários do dispositivo, explore por toque ou com gestos de deslizar.',
|
|
159
159
|
'fabric.editor.invalidDateError': 'Informe uma data válida',
|
|
160
160
|
'fabric.editor.invalidLink': 'Insira um link válido.',
|
|
161
|
-
'fabric.editor.inviteItem.title': '{userRole, select, admin {Convidar colega de equipe para {productName}} trusted {Convidar colega de equipe para {productName}} other {Adicionar colega de equipe
|
|
161
|
+
'fabric.editor.inviteItem.title': '{userRole, select, admin {Convidar colega de equipe para {productName}} trusted {Convidar colega de equipe para {productName}} other {Adicionar colega de equipe para {productName}}}',
|
|
162
162
|
'fabric.editor.italic': 'Itálico',
|
|
163
163
|
'fabric.editor.keyboardShortcuts': 'Atalhos de teclado',
|
|
164
164
|
'fabric.editor.leftSidebar': 'Barra lateral esquerda',
|
package/dist/es2019/i18n/ru.js
CHANGED
|
@@ -140,7 +140,7 @@ export default {
|
|
|
140
140
|
'fabric.editor.helpDialogTips': 'Это окно можно быстро открыть в любое время нажатием {keyMap}',
|
|
141
141
|
'fabric.editor.hyperlink.linkAriaLabel': 'Метка для ссылки',
|
|
142
142
|
'fabric.editor.hyperlink.searchLinkAriaDescription': 'Предложения будут появляться по мере ввода текста в поле',
|
|
143
|
-
'fabric.editor.hyperlink.searchLinkResults': '{count, plural, =0 {
|
|
143
|
+
'fabric.editor.hyperlink.searchLinkResults': '{count, plural, =0 {нет результатов} one {найден {count,number} результат} few {найдено {count,number} результата} many {найдено {count,number} результатов} other {найдено {count,number} результата}}',
|
|
144
144
|
'fabric.editor.hyperlinkToolbarPlaceholder': 'Вставить или искать ссылку',
|
|
145
145
|
'fabric.editor.imageBorderBold': 'Широкая',
|
|
146
146
|
'fabric.editor.imageBorderColor': 'Цвет',
|
package/dist/es2019/i18n/th.js
CHANGED
|
@@ -142,7 +142,7 @@ export default {
|
|
|
142
142
|
'fabric.editor.hyperlink.searchLinkAriaDescription': 'ข้อเสนอแนะจะปรากฏด้านล่างเมื่อคุณพิมพ์ลงในช่อง',
|
|
143
143
|
'fabric.editor.hyperlink.searchLinkResults': '{count, plural, =0 {ไม่พบผลลัพธ์} other {พบผลลัพธ์ {count,number} รายการ}}',
|
|
144
144
|
'fabric.editor.hyperlinkToolbarPlaceholder': 'วางหรือค้นหาลิงก์',
|
|
145
|
-
'fabric.editor.imageBorderBold': '
|
|
145
|
+
'fabric.editor.imageBorderBold': 'ตัวหนา',
|
|
146
146
|
'fabric.editor.imageBorderColor': 'สี',
|
|
147
147
|
'fabric.editor.imageBorderMedium': 'ปานกลาง',
|
|
148
148
|
'fabric.editor.imageBorderOptions': 'ตัวเลือกขอบ',
|
|
@@ -158,7 +158,7 @@ export default {
|
|
|
158
158
|
'fabric.editor.inputQueryAssistiveTxt': 'เมื่อผลการป้อนอัตโนมัติพร้อมใช้งานแล้ว ให้ใช้ลูกศรขึ้นและลงเพื่อตรวจสอบและกด Enter เพื่อเลือก ผู้ใช้อุปกรณ์สัมผัส สำรวจโดยการแตะหรือการปัดนิ้ว',
|
|
159
159
|
'fabric.editor.invalidDateError': 'ป้อนวันที่ที่ถูกต้อง',
|
|
160
160
|
'fabric.editor.invalidLink': 'โปรดป้อนลิงก์ที่ถูกต้อง',
|
|
161
|
-
'fabric.editor.inviteItem.title': '{userRole, select, admin {
|
|
161
|
+
'fabric.editor.inviteItem.title': '{userRole, select, admin {เชิญเพื่อนร่วมทีมให้ไปยัง {productName}} trusted {เชิญเพื่อนร่วมทีมให้ไปยัง {productName}} other {เพิ่มเพื่อนร่วมทีมไปยัง {productName}}}',
|
|
162
162
|
'fabric.editor.italic': 'ตัวเอียง',
|
|
163
163
|
'fabric.editor.keyboardShortcuts': 'ปุ่มลัด',
|
|
164
164
|
'fabric.editor.leftSidebar': 'แถบด้านซ้าย',
|
package/dist/es2019/i18n/uk.js
CHANGED
|
@@ -140,7 +140,7 @@ export default {
|
|
|
140
140
|
'fabric.editor.helpDialogTips': 'Натисніть {keyMap}, щоб відкрити це вікно будь-коли',
|
|
141
141
|
'fabric.editor.hyperlink.linkAriaLabel': 'Мітка посилання',
|
|
142
142
|
'fabric.editor.hyperlink.searchLinkAriaDescription': 'Коли ви будете набирати у полі текст, нижче з’явиться список варіантів',
|
|
143
|
-
'fabric.editor.hyperlink.searchLinkResults': '{count, plural, =0 {
|
|
143
|
+
'fabric.editor.hyperlink.searchLinkResults': '{count, plural, =0 {нічого не знайдено} one {{count,number} результат} few {{count,number} результати} many {{count,number} результатів} other {{count,number} результатів}}',
|
|
144
144
|
'fabric.editor.hyperlinkToolbarPlaceholder': 'Вставте або знайдіть посилання',
|
|
145
145
|
'fabric.editor.imageBorderBold': 'Жирна',
|
|
146
146
|
'fabric.editor.imageBorderColor': 'Колір',
|
package/dist/es2019/i18n/vi.js
CHANGED
|
@@ -140,7 +140,7 @@ export default {
|
|
|
140
140
|
'fabric.editor.helpDialogTips': 'Nhấn {keyMap} để mở nhanh hộp thoại này bất kỳ lúc nào',
|
|
141
141
|
'fabric.editor.hyperlink.linkAriaLabel': 'Nhãn liên kết',
|
|
142
142
|
'fabric.editor.hyperlink.searchLinkAriaDescription': 'Các đề xuất sẽ xuất hiện bên dưới khi bạn nhập thông tin vào trường',
|
|
143
|
-
'fabric.editor.hyperlink.searchLinkResults': '{count, plural, =0 {không tìm thấy kết quả
|
|
143
|
+
'fabric.editor.hyperlink.searchLinkResults': '{count, plural, =0 {không tìm thấy kết quả} other {Đã tìm thấy {count,number} kết quả}}',
|
|
144
144
|
'fabric.editor.hyperlinkToolbarPlaceholder': 'Dán hoặc tìm kiếm liên kết',
|
|
145
145
|
'fabric.editor.imageBorderBold': 'In đậm',
|
|
146
146
|
'fabric.editor.imageBorderColor': 'Màu sắc',
|
|
@@ -158,7 +158,7 @@ export default {
|
|
|
158
158
|
'fabric.editor.inputQueryAssistiveTxt': 'Khi có sẵn kết quả tự hoàn tất, hãy dùng các mũi tên lên và xuống để xem lại và enter để chọn. Người dùng thiết bị cảm ứng, khám phá bằng thao tác chạm hoặc bằng các cử chỉ vuốt.',
|
|
159
159
|
'fabric.editor.invalidDateError': 'Nhập ngày hợp lệ',
|
|
160
160
|
'fabric.editor.invalidLink': 'Vui lòng nhập một liên kết hợp lệ.',
|
|
161
|
-
'fabric.editor.inviteItem.title': '{userRole, select, admin {Mời
|
|
161
|
+
'fabric.editor.inviteItem.title': '{userRole, select, admin {Mời thành viên cùng nhóm vào {productName}} trusted {Mời thành viên cùng nhóm vào {productName}} other {Thêm thành viên cùng nhóm vào {productName}}}',
|
|
162
162
|
'fabric.editor.italic': 'In nghiêng',
|
|
163
163
|
'fabric.editor.keyboardShortcuts': 'Phím tắt bàn phím',
|
|
164
164
|
'fabric.editor.leftSidebar': 'Thanh bên trái',
|
package/dist/es2019/i18n/zh.js
CHANGED
|
@@ -142,7 +142,7 @@ export default {
|
|
|
142
142
|
'fabric.editor.hyperlink.searchLinkAriaDescription': '在字段中输入内容时,下方会显示建议内容',
|
|
143
143
|
'fabric.editor.hyperlink.searchLinkResults': '{count, plural, =0 {未找到结果} other {找到 {count,number} 个结果}}',
|
|
144
144
|
'fabric.editor.hyperlinkToolbarPlaceholder': '粘贴或搜索链接',
|
|
145
|
-
'fabric.editor.imageBorderBold': '
|
|
145
|
+
'fabric.editor.imageBorderBold': '加粗',
|
|
146
146
|
'fabric.editor.imageBorderColor': '颜色',
|
|
147
147
|
'fabric.editor.imageBorderMedium': '中等',
|
|
148
148
|
'fabric.editor.imageBorderOptions': '边框选项',
|
|
@@ -8,7 +8,6 @@ import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
|
8
8
|
import { BaseTheme } from '@atlaskit/editor-common/ui';
|
|
9
9
|
import { akEditorMenuZIndex, akEditorToolbarKeylineHeight } from '@atlaskit/editor-shared-styles';
|
|
10
10
|
import ContentStyles from '../../ui/ContentStyles';
|
|
11
|
-
import WidthEmitter from '../../ui/WidthEmitter';
|
|
12
11
|
import { ClickAreaBlock } from '../../ui/Addon';
|
|
13
12
|
import { scrollbarStyles } from '../../ui/styles';
|
|
14
13
|
import { tableFullPageEditorStyles } from '@atlaskit/editor-plugin-table/ui/common-styles';
|
|
@@ -17,7 +16,7 @@ import { Editor, EditorContent, useEditorSharedConfig } from './Editor';
|
|
|
17
16
|
import { Toolbar } from './Toolbar';
|
|
18
17
|
import { ContentComponents } from './ContentComponents';
|
|
19
18
|
import { useCreateAnalyticsHandler } from './internal/hooks/use-analytics';
|
|
20
|
-
import { ContextPanelWidthProvider } from '
|
|
19
|
+
import { ContextPanelWidthProvider } from '@atlaskit/editor-common/ui';
|
|
21
20
|
const fullPageEditorWrapper = css`
|
|
22
21
|
min-width: 340px;
|
|
23
22
|
height: 100%;
|
|
@@ -186,9 +185,7 @@ function FullPage(props) {
|
|
|
186
185
|
containerElement: scrollContainerRef.current
|
|
187
186
|
}))))), contextPanel && jsx("div", {
|
|
188
187
|
css: sidebarArea
|
|
189
|
-
}, contextPanel)
|
|
190
|
-
editorView: config === null || config === void 0 ? void 0 : config.editorView
|
|
191
|
-
}))))));
|
|
188
|
+
}, contextPanel))))));
|
|
192
189
|
}
|
|
193
190
|
FullPage.displayName = 'FullPageEditor';
|
|
194
191
|
const FullPageWithAnalytics = withAnalyticsEvents()(FullPage);
|
|
@@ -23,8 +23,10 @@ export const createStubInternalApis = () => {
|
|
|
23
23
|
// That means, there is no createAnalyticsEvent available at all.
|
|
24
24
|
// This should not happen, but if it does, we will send a mock function to avoid
|
|
25
25
|
// regression on SmartLinks (they are the only one using this function directly)
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
if (process.env.NODE_ENV === 'development') {
|
|
27
|
+
// eslint-disable-next-line no-console
|
|
28
|
+
console.error('This should never be called, if it does we have a problem');
|
|
29
|
+
}
|
|
28
30
|
return {
|
|
29
31
|
fire: () => {}
|
|
30
32
|
};
|
|
@@ -5,7 +5,7 @@ import blockTypePlugin from '../../../plugins/block-type';
|
|
|
5
5
|
import clearMarksOnChangeToEmptyDocumentPlugin from '../../../plugins/clear-marks-on-change-to-empty-document';
|
|
6
6
|
import hyperlinkPlugin from '../../../plugins/hyperlink';
|
|
7
7
|
import textFormattingPlugin from '../../../plugins/text-formatting';
|
|
8
|
-
import widthPlugin from '
|
|
8
|
+
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
9
9
|
import unsupportedContentPlugin from '../../../plugins/unsupported-content';
|
|
10
10
|
import basePlugin from '../../../plugins/base';
|
|
11
11
|
import editorDisabledPlugin from '../../../plugins/editor-disabled';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, datePlugin, emojiPlugin, extensionPlugin, fragmentMarkPlugin, helpDialogPlugin, imageUploadPlugin, insertBlockPlugin, jiraIssuePlugin, layoutPlugin, listPlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, mediaPlugin, mentionsPlugin, panelPlugin, placeholderTextPlugin, rulePlugin, saveOnEnterPlugin, tasksAndDecisionsPlugin, textColorPlugin,
|
|
1
|
+
import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, datePlugin, emojiPlugin, extensionPlugin, fragmentMarkPlugin, helpDialogPlugin, imageUploadPlugin, insertBlockPlugin, jiraIssuePlugin, layoutPlugin, listPlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, mediaPlugin, mentionsPlugin, panelPlugin, placeholderTextPlugin, rulePlugin, saveOnEnterPlugin, tasksAndDecisionsPlugin, textColorPlugin, statusPlugin, alignmentPlugin, indentationPlugin, customAutoformatPlugin, feedbackDialogPlugin, historyPlugin, expandPlugin, isExpandInsertionEnabled, scrollIntoViewPlugin, mobileDimensionsPlugin, findReplacePlugin, contextPanelPlugin, mobileSelectionPlugin, annotationPlugin, captionPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin, copyButtonPlugin, borderPlugin } from '../../../plugins';
|
|
2
|
+
import { gridPlugin } from '@atlaskit/editor-plugin-grid';
|
|
2
3
|
import cardPlugin from '../../../plugins/card';
|
|
3
4
|
import { tablesPlugin } from '@atlaskit/editor-plugin-table';
|
|
4
5
|
import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
|
|
@@ -3,13 +3,12 @@ import React from 'react';
|
|
|
3
3
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
4
|
import { breakout } from '@atlaskit/adf-schema';
|
|
5
5
|
import { calcBreakoutWidthPx } from '@atlaskit/editor-common/utils';
|
|
6
|
-
import WithPluginState from '../../ui/WithPluginState';
|
|
7
|
-
import { pluginKey as widthPluginKey } from '../width';
|
|
8
6
|
import LayoutButton from './ui/LayoutButton';
|
|
9
7
|
import { BreakoutCssClassName } from './constants';
|
|
10
8
|
import { pluginKey } from './plugin-key';
|
|
11
9
|
import { findSupportedNodeForBreakout } from './utils/find-breakout-node';
|
|
12
10
|
import { akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
|
|
11
|
+
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
13
12
|
class BreakoutView {
|
|
14
13
|
constructor(
|
|
15
14
|
/**
|
|
@@ -17,12 +16,12 @@ class BreakoutView {
|
|
|
17
16
|
* of the prosemirror and prosemirror types mean using PMNode
|
|
18
17
|
* is not problematic.
|
|
19
18
|
*/
|
|
20
|
-
mark, view,
|
|
19
|
+
mark, view, pluginInjectionApi) {
|
|
21
20
|
_defineProperty(this, "updateWidth", widthState => {
|
|
22
21
|
// we skip updating the width of breakout nodes if the editorView dom
|
|
23
22
|
// element was hidden (to avoid breakout width and button thrashing
|
|
24
23
|
// when an editor is hidden, re-rendered and unhidden).
|
|
25
|
-
if (widthState.width === 0) {
|
|
24
|
+
if (widthState === undefined || widthState.width === 0) {
|
|
26
25
|
return;
|
|
27
26
|
}
|
|
28
27
|
let containerStyle = ``;
|
|
@@ -81,14 +80,16 @@ class BreakoutView {
|
|
|
81
80
|
this.mark = mark;
|
|
82
81
|
this.view = view;
|
|
83
82
|
this.contentDOM = contentDOM;
|
|
84
|
-
this.
|
|
85
|
-
|
|
86
|
-
this.updateWidth(
|
|
83
|
+
this.unsubscribe = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.width.sharedState.onChange(({
|
|
84
|
+
nextSharedState
|
|
85
|
+
}) => this.updateWidth(nextSharedState));
|
|
86
|
+
this.updateWidth(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.width.sharedState.currentState());
|
|
87
87
|
}
|
|
88
88
|
// NOTE: Lifecycle events doesn't work for mark NodeView. So currently this is a no-op.
|
|
89
89
|
// @see https://github.com/ProseMirror/prosemirror/issues/1082
|
|
90
90
|
destroy() {
|
|
91
|
-
|
|
91
|
+
var _this$unsubscribe;
|
|
92
|
+
(_this$unsubscribe = this.unsubscribe) === null || _this$unsubscribe === void 0 ? void 0 : _this$unsubscribe.call(this);
|
|
92
93
|
}
|
|
93
94
|
}
|
|
94
95
|
function shouldPluginStateUpdate(newBreakoutNode, currentBreakoutNode) {
|
|
@@ -97,9 +98,8 @@ function shouldPluginStateUpdate(newBreakoutNode, currentBreakoutNode) {
|
|
|
97
98
|
}
|
|
98
99
|
return newBreakoutNode || currentBreakoutNode ? true : false;
|
|
99
100
|
}
|
|
100
|
-
function createPlugin({
|
|
101
|
-
dispatch
|
|
102
|
-
eventDispatcher
|
|
101
|
+
function createPlugin(pluginInjectionApi, {
|
|
102
|
+
dispatch
|
|
103
103
|
}) {
|
|
104
104
|
return new SafePlugin({
|
|
105
105
|
state: {
|
|
@@ -130,18 +130,38 @@ function createPlugin({
|
|
|
130
130
|
// See the following link for more details:
|
|
131
131
|
// https://prosemirror.net/docs/ref/#view.EditorProps.nodeViews.
|
|
132
132
|
breakout: (mark, view) => {
|
|
133
|
-
return new BreakoutView(mark, view,
|
|
133
|
+
return new BreakoutView(mark, view, pluginInjectionApi);
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
|
-
const
|
|
139
|
+
const LayoutButtonWrapper = ({
|
|
140
|
+
api,
|
|
141
|
+
editorView,
|
|
142
|
+
boundariesElement,
|
|
143
|
+
scrollableElement,
|
|
144
|
+
mountPoint
|
|
145
|
+
}) => {
|
|
146
|
+
var _breakoutState$breako;
|
|
147
|
+
// Re-render with `width` (but don't use state) due to https://bitbucket.org/atlassian/%7Bc8e2f021-38d2-46d0-9b7a-b3f7b428f724%7D/pull-requests/24272
|
|
148
|
+
const {
|
|
149
|
+
breakoutState
|
|
150
|
+
} = useSharedPluginState(api, ['width', 'breakout']);
|
|
151
|
+
return /*#__PURE__*/React.createElement(LayoutButton, {
|
|
152
|
+
editorView: editorView,
|
|
153
|
+
mountPoint: mountPoint,
|
|
154
|
+
boundariesElement: boundariesElement,
|
|
155
|
+
scrollableElement: scrollableElement,
|
|
156
|
+
node: (_breakoutState$breako = breakoutState === null || breakoutState === void 0 ? void 0 : breakoutState.breakoutNode) !== null && _breakoutState$breako !== void 0 ? _breakoutState$breako : null
|
|
157
|
+
});
|
|
158
|
+
};
|
|
159
|
+
const breakoutPlugin = (options, api) => ({
|
|
140
160
|
name: 'breakout',
|
|
141
161
|
pmPlugins() {
|
|
142
162
|
return [{
|
|
143
163
|
name: 'breakout',
|
|
144
|
-
plugin: createPlugin
|
|
164
|
+
plugin: props => createPlugin(api, props)
|
|
145
165
|
}];
|
|
146
166
|
},
|
|
147
167
|
marks() {
|
|
@@ -150,6 +170,14 @@ const breakoutPlugin = options => ({
|
|
|
150
170
|
mark: breakout
|
|
151
171
|
}];
|
|
152
172
|
},
|
|
173
|
+
getSharedState(editorState) {
|
|
174
|
+
if (!editorState) {
|
|
175
|
+
return {
|
|
176
|
+
breakoutNode: undefined
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
return pluginKey.getState(editorState);
|
|
180
|
+
},
|
|
153
181
|
contentComponent({
|
|
154
182
|
editorView,
|
|
155
183
|
popupsMountPoint,
|
|
@@ -160,23 +188,12 @@ const breakoutPlugin = options => ({
|
|
|
160
188
|
if (options && !options.allowBreakoutButton) {
|
|
161
189
|
return null;
|
|
162
190
|
}
|
|
163
|
-
return /*#__PURE__*/React.createElement(
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
breakoutPluginState
|
|
170
|
-
}) => {
|
|
171
|
-
var _breakoutPluginState$;
|
|
172
|
-
return /*#__PURE__*/React.createElement(LayoutButton, {
|
|
173
|
-
editorView: editorView,
|
|
174
|
-
mountPoint: popupsMountPoint,
|
|
175
|
-
boundariesElement: popupsBoundariesElement,
|
|
176
|
-
scrollableElement: popupsScrollableElement,
|
|
177
|
-
node: (_breakoutPluginState$ = breakoutPluginState === null || breakoutPluginState === void 0 ? void 0 : breakoutPluginState.breakoutNode) !== null && _breakoutPluginState$ !== void 0 ? _breakoutPluginState$ : null
|
|
178
|
-
});
|
|
179
|
-
}
|
|
191
|
+
return /*#__PURE__*/React.createElement(LayoutButtonWrapper, {
|
|
192
|
+
api: api,
|
|
193
|
+
mountPoint: popupsMountPoint,
|
|
194
|
+
editorView: editorView,
|
|
195
|
+
boundariesElement: popupsBoundariesElement,
|
|
196
|
+
scrollableElement: popupsScrollableElement
|
|
180
197
|
});
|
|
181
198
|
}
|
|
182
199
|
});
|
|
@@ -158,8 +158,8 @@ const unlinkCard = (node, state, editorAnalyticsApi) => {
|
|
|
158
158
|
}
|
|
159
159
|
return () => false;
|
|
160
160
|
};
|
|
161
|
-
const buildAlignmentOptions = (state, intl, cardOptions) => {
|
|
162
|
-
return buildLayoutButtons(state, intl, state.schema.nodes.embedCard, true, true, cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.allowWrapping, cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.allowAlignment);
|
|
161
|
+
const buildAlignmentOptions = (state, intl, widthPluginDependencyApi, cardOptions) => {
|
|
162
|
+
return buildLayoutButtons(state, intl, state.schema.nodes.embedCard, widthPluginDependencyApi, true, true, cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.allowWrapping, cardOptions === null || cardOptions === void 0 ? void 0 : cardOptions.allowAlignment);
|
|
163
163
|
};
|
|
164
164
|
const withToolbarMetadata = command => commandWithMetadata(command, {
|
|
165
165
|
inputMethod: INPUT_METHOD.FLOATING_TB
|
|
@@ -245,7 +245,8 @@ const generateToolbarItems = (state, featureFlags, intl, providerFactory, cardOp
|
|
|
245
245
|
onClick: withToolbarMetadata(removeCard(editorAnalyticsApi))
|
|
246
246
|
}];
|
|
247
247
|
if (currentAppearance === 'embed') {
|
|
248
|
-
|
|
248
|
+
var _pluginInjectionApi$d5;
|
|
249
|
+
const alignmentOptions = buildAlignmentOptions(state, intl, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d5 = pluginInjectionApi.dependencies) === null || _pluginInjectionApi$d5 === void 0 ? void 0 : _pluginInjectionApi$d5.width, cardOptions);
|
|
249
250
|
if (alignmentOptions.length) {
|
|
250
251
|
alignmentOptions.push({
|
|
251
252
|
type: 'separator'
|
|
@@ -89,10 +89,8 @@ export class PluginState {
|
|
|
89
89
|
remove = remove.concat(oldPointers);
|
|
90
90
|
}
|
|
91
91
|
const endOfDocPos = tr.doc.nodeSize - 2;
|
|
92
|
-
const
|
|
93
|
-
|
|
94
|
-
head
|
|
95
|
-
} = telepointerData.selection;
|
|
92
|
+
const anchor = telepointerData.selection.anchor;
|
|
93
|
+
const head = telepointerData.selection.head;
|
|
96
94
|
let rawFrom = anchor < head ? anchor : head;
|
|
97
95
|
let rawTo = anchor >= head ? anchor : head;
|
|
98
96
|
if (rawFrom > endOfDocPos) {
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { copyButtonPluginKey } from './pm-plugins/plugin-key';
|
|
2
2
|
import { hoverDecoration } from '../base/pm-plugins/decoration';
|
|
3
|
-
import {
|
|
3
|
+
import { NodeSelection } from 'prosemirror-state';
|
|
4
|
+
import { copyHTMLToClipboard, copyHTMLToClipboardPolyfill } from '../../utils/clipboard';
|
|
4
5
|
import { getSelectedNodeOrNodeParentByNodeType, toDOM } from './utils';
|
|
5
6
|
import { addAnalytics, ACTION, INPUT_METHOD } from '../analytics';
|
|
6
7
|
import { getAnalyticsPayload } from '../clipboard/pm-plugins/main';
|
|
8
|
+
import { browser } from '@atlaskit/editor-common/utils';
|
|
7
9
|
export function createToolbarCopyCommandForMark(markType) {
|
|
8
10
|
function command(state, dispatch) {
|
|
9
11
|
const textNode = state.tr.selection.$head.parent.maybeChild(state.tr.selection.$head.index());
|
|
@@ -121,7 +123,12 @@ export const createToolbarCopyCommandForNode = nodeType => (state, dispatch) =>
|
|
|
121
123
|
// https://github.com/ProseMirror/prosemirror-view/blob/master/src/clipboard.ts#L32
|
|
122
124
|
div.firstChild.setAttribute('data-pm-slice', '0 0 []');
|
|
123
125
|
}
|
|
124
|
-
|
|
126
|
+
// ED-17083 safari seems have bugs for extension copy because exntension do not have a child text(innerText) and it will not recognized as html in clipboard, this could be merge into one if this extension fixed children issue or safari fix the copy bug
|
|
127
|
+
if (browser.safari && state.selection instanceof NodeSelection && state.selection.node.type === state.schema.nodes.extension) {
|
|
128
|
+
copyHTMLToClipboardPolyfill(div);
|
|
129
|
+
} else {
|
|
130
|
+
copyHTMLToClipboard(div);
|
|
131
|
+
}
|
|
125
132
|
}
|
|
126
133
|
copyToClipboardTr.setMeta('scrollIntoView', false);
|
|
127
134
|
dispatch(copyToClipboardTr);
|
|
@@ -31,7 +31,7 @@ const extensionPlugin = (options = {}, api) => {
|
|
|
31
31
|
eventDispatcher
|
|
32
32
|
}) => {
|
|
33
33
|
const extensionHandlers = options.extensionHandlers || {};
|
|
34
|
-
return createPlugin(dispatch, providerFactory, extensionHandlers, portalProviderAPI, eventDispatcher, options.useLongPressSelection, {
|
|
34
|
+
return createPlugin(dispatch, providerFactory, extensionHandlers, portalProviderAPI, eventDispatcher, api, options.useLongPressSelection, {
|
|
35
35
|
appearance: options.appearance
|
|
36
36
|
});
|
|
37
37
|
}
|
|
@@ -43,17 +43,19 @@ export class ExtensionNode extends ReactNodeView {
|
|
|
43
43
|
providerFactory: props.providerFactory,
|
|
44
44
|
handleContentDOMRef: forwardRef,
|
|
45
45
|
extensionHandlers: props.extensionHandlers,
|
|
46
|
-
editorAppearance: (_props$extensionNodeV = props.extensionNodeViewOptions) === null || _props$extensionNodeV === void 0 ? void 0 : _props$extensionNodeV.appearance
|
|
46
|
+
editorAppearance: (_props$extensionNodeV = props.extensionNodeViewOptions) === null || _props$extensionNodeV === void 0 ? void 0 : _props$extensionNodeV.appearance,
|
|
47
|
+
pluginInjectionApi: props.pluginInjectionApi
|
|
47
48
|
}));
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
|
-
export default function ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions) {
|
|
51
|
+
export default function ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi) {
|
|
51
52
|
return (node, view, getPos) => {
|
|
52
53
|
const hasIntlContext = true;
|
|
53
54
|
return new ExtensionNode(node, view, getPos, portalProviderAPI, eventDispatcher, {
|
|
54
55
|
providerFactory,
|
|
55
56
|
extensionHandlers,
|
|
56
|
-
extensionNodeViewOptions
|
|
57
|
+
extensionNodeViewOptions,
|
|
58
|
+
pluginInjectionApi
|
|
57
59
|
}, undefined, undefined, undefined, hasIntlContext).init();
|
|
58
60
|
};
|
|
59
61
|
}
|
|
@@ -125,7 +125,7 @@ export const handleUpdate = ({
|
|
|
125
125
|
}
|
|
126
126
|
return true;
|
|
127
127
|
};
|
|
128
|
-
const createPlugin = (dispatch, providerFactory, extensionHandlers, portalProviderAPI, eventDispatcher, useLongPressSelection = false, options = {}) => {
|
|
128
|
+
const createPlugin = (dispatch, providerFactory, extensionHandlers, portalProviderAPI, eventDispatcher, pluginInjectionApi, useLongPressSelection = false, options = {}) => {
|
|
129
129
|
const state = createPluginState(dispatch, {
|
|
130
130
|
showEditButton: false,
|
|
131
131
|
showContextPanel: false
|
|
@@ -160,11 +160,11 @@ const createPlugin = (dispatch, providerFactory, extensionHandlers, portalProvid
|
|
|
160
160
|
props: {
|
|
161
161
|
nodeViews: {
|
|
162
162
|
// WARNING: referentiality-plugin also creates these nodeviews
|
|
163
|
-
extension: ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions),
|
|
163
|
+
extension: ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi),
|
|
164
164
|
// WARNING: referentiality-plugin also creates these nodeviews
|
|
165
|
-
bodiedExtension: ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions),
|
|
165
|
+
bodiedExtension: ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi),
|
|
166
166
|
// WARNING: referentiality-plugin also creates these nodeviews
|
|
167
|
-
inlineExtension: ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions)
|
|
167
|
+
inlineExtension: ExtensionNodeView(portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi)
|
|
168
168
|
},
|
|
169
169
|
handleClickOn: createSelectionClickHandler(['extension', 'bodiedExtension'], target => !target.closest('.extension-content'), {
|
|
170
170
|
useLongPressSelection
|
|
@@ -7,9 +7,8 @@ import { calculateBreakoutStyles } from '@atlaskit/editor-common/utils';
|
|
|
7
7
|
import { wrapperStyle, header, content, contentWrapper, widerLayoutClassName } from './styles';
|
|
8
8
|
import { overlay } from '../styles';
|
|
9
9
|
import ExtensionLozenge from '../Lozenge';
|
|
10
|
-
import { pluginKey as widthPluginKey } from '../../../../width';
|
|
11
|
-
import WithPluginState from '../../../../../ui/WithPluginState';
|
|
12
10
|
import classnames from 'classnames';
|
|
11
|
+
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
13
12
|
function ExtensionWithPluginState(props) {
|
|
14
13
|
const {
|
|
15
14
|
node,
|
|
@@ -92,6 +91,39 @@ function ExtensionWithPluginState(props) {
|
|
|
92
91
|
}))));
|
|
93
92
|
}
|
|
94
93
|
const Extension = props => {
|
|
94
|
+
// TODO: ED-17836 This code is here because confluence injects
|
|
95
|
+
// the `editor-referentiality` plugin via `dangerouslyAppendPlugins`
|
|
96
|
+
// which cannot access the `pluginInjectionApi`. When we move
|
|
97
|
+
// Confluence to using presets we can remove this workaround.
|
|
98
|
+
const {
|
|
99
|
+
pluginInjectionApi
|
|
100
|
+
} = props;
|
|
101
|
+
return pluginInjectionApi === undefined ? jsx(ExtensionDeprecated, props) : jsx(ExtensionWithSharedState, props);
|
|
102
|
+
};
|
|
103
|
+
const ExtensionWithSharedState = props => {
|
|
104
|
+
const {
|
|
105
|
+
pluginInjectionApi
|
|
106
|
+
} = props;
|
|
107
|
+
const {
|
|
108
|
+
widthState
|
|
109
|
+
} = useSharedPluginState(pluginInjectionApi, ['width']);
|
|
110
|
+
return jsx(ExtensionWithPluginState, _extends({
|
|
111
|
+
widthState: widthState
|
|
112
|
+
}, props));
|
|
113
|
+
};
|
|
114
|
+
import { WithPluginState } from '@atlaskit/editor-common/with-plugin-state';
|
|
115
|
+
// TODO: ED-17836 This code is here because Confluence injects
|
|
116
|
+
// the `editor-referentiality` plugin via `dangerouslyAppendPlugins`
|
|
117
|
+
// which cannot access the `pluginInjectionApi`. When we move
|
|
118
|
+
// Confluence to using presets we can remove this workaround.
|
|
119
|
+
// @ts-ignore
|
|
120
|
+
const widthPluginKey = {
|
|
121
|
+
key: 'widthPlugin$',
|
|
122
|
+
getState: state => {
|
|
123
|
+
return state['widthPlugin$'];
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
const ExtensionDeprecated = props => {
|
|
95
127
|
return jsx(WithPluginState, {
|
|
96
128
|
editorView: props.view,
|
|
97
129
|
plugins: {
|
|
@@ -104,6 +136,10 @@ const Extension = props => {
|
|
|
104
136
|
}, props))
|
|
105
137
|
});
|
|
106
138
|
};
|
|
139
|
+
/**
|
|
140
|
+
* End workaround
|
|
141
|
+
*/
|
|
142
|
+
|
|
107
143
|
export default overflowShadow(Extension, {
|
|
108
144
|
overflowSelector: '.extension-overflow-wrapper'
|
|
109
145
|
});
|
|
@@ -134,7 +134,8 @@ export default class ExtensionComponent extends Component {
|
|
|
134
134
|
handleContentDOMRef,
|
|
135
135
|
editorView,
|
|
136
136
|
references,
|
|
137
|
-
editorAppearance
|
|
137
|
+
editorAppearance,
|
|
138
|
+
pluginInjectionApi
|
|
138
139
|
} = this.props;
|
|
139
140
|
const extensionHandlerResult = this.tryExtensionHandler();
|
|
140
141
|
switch (node.type.name) {
|
|
@@ -148,7 +149,8 @@ export default class ExtensionComponent extends Component {
|
|
|
148
149
|
handleContentDOMRef: handleContentDOMRef,
|
|
149
150
|
view: editorView,
|
|
150
151
|
editorAppearance: editorAppearance,
|
|
151
|
-
hideFrame: (_this$state$_privateP = this.state._privateProps) === null || _this$state$_privateP === void 0 ? void 0 : _this$state$_privateP.__hideFrame
|
|
152
|
+
hideFrame: (_this$state$_privateP = this.state._privateProps) === null || _this$state$_privateP === void 0 ? void 0 : _this$state$_privateP.__hideFrame,
|
|
153
|
+
pluginInjectionApi: pluginInjectionApi
|
|
152
154
|
}, extensionHandlerResult);
|
|
153
155
|
case 'inlineExtension':
|
|
154
156
|
return /*#__PURE__*/React.createElement(InlineExtension, {
|
|
@@ -16,7 +16,8 @@ export default class Extension extends Component {
|
|
|
16
16
|
handleContentDOMRef,
|
|
17
17
|
extensionHandlers,
|
|
18
18
|
references,
|
|
19
|
-
editorAppearance
|
|
19
|
+
editorAppearance,
|
|
20
|
+
pluginInjectionApi
|
|
20
21
|
} = this.props;
|
|
21
22
|
return /*#__PURE__*/React.createElement(ExtensionComponent, {
|
|
22
23
|
editorView: editorView,
|
|
@@ -26,7 +27,8 @@ export default class Extension extends Component {
|
|
|
26
27
|
extensionProvider: extensionProvider,
|
|
27
28
|
handleContentDOMRef: handleContentDOMRef,
|
|
28
29
|
extensionHandlers: extensionHandlers,
|
|
29
|
-
editorAppearance: editorAppearance
|
|
30
|
+
editorAppearance: editorAppearance,
|
|
31
|
+
pluginInjectionApi: pluginInjectionApi
|
|
30
32
|
});
|
|
31
33
|
});
|
|
32
34
|
this.providerFactory = props.providerFactory || new ProviderFactory();
|