@atlaskit/editor-common 60.2.0 → 62.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 +105 -0
- package/card/package.json +7 -0
- package/dist/cjs/card/cardOptions.js +5 -0
- package/dist/cjs/emoji.js +23 -0
- package/dist/cjs/extensions/extension-fields-helpers.js +1 -1
- package/dist/cjs/extensions/index.js +46 -40
- package/dist/cjs/extensions/manifest-helpers.js +3 -1
- package/dist/cjs/extensions/module-helpers.js +3 -1
- package/dist/cjs/extensions/types/field-definitions.js +7 -1
- package/dist/cjs/extensions/types/index.js +14 -8
- package/dist/cjs/extensions.js +38 -32
- package/dist/cjs/i18n/cs.js +1 -0
- package/dist/cjs/i18n/da.js +1 -0
- package/dist/cjs/i18n/de.js +1 -0
- package/dist/cjs/i18n/es.js +1 -0
- package/dist/cjs/i18n/fi.js +1 -0
- package/dist/cjs/i18n/fr.js +1 -0
- package/dist/cjs/i18n/hu.js +1 -0
- package/dist/cjs/i18n/index.js +26 -26
- package/dist/cjs/i18n/it.js +1 -0
- package/dist/cjs/i18n/ja.js +1 -0
- package/dist/cjs/i18n/ko.js +1 -0
- package/dist/cjs/i18n/nb.js +1 -0
- package/dist/cjs/i18n/nl.js +1 -0
- package/dist/cjs/i18n/pl.js +1 -0
- package/dist/cjs/i18n/pt_BR.js +1 -0
- package/dist/cjs/i18n/ru.js +1 -0
- package/dist/cjs/i18n/sv.js +1 -0
- package/dist/cjs/i18n/th.js +1 -0
- package/dist/cjs/i18n/tr.js +1 -0
- package/dist/cjs/i18n/uk.js +1 -0
- package/dist/cjs/i18n/vi.js +1 -0
- package/dist/cjs/i18n/zh.js +1 -1
- package/dist/cjs/i18n/zh_TW.js +1 -0
- package/dist/cjs/in-product.js +14 -14
- package/dist/cjs/index.js +330 -300
- package/dist/cjs/mention.js +23 -0
- package/dist/cjs/messages/codeBidiWarning.js +21 -0
- package/dist/cjs/messages/index.js +8 -0
- package/dist/cjs/messages/link.js +2 -2
- package/dist/cjs/messages/unsupportedContent.js +2 -2
- package/dist/cjs/provider-factory/context.js +1 -1
- package/dist/cjs/provider-factory.js +6 -6
- package/dist/cjs/provider-helpers/promise-helpers.js +1 -1
- package/dist/cjs/styles/index.js +86 -80
- package/dist/cjs/styles/shared/annotation.js +1 -1
- package/dist/cjs/styles/shared/media-single.js +1 -1
- package/dist/cjs/styles/shared/panel.js +90 -37
- package/dist/cjs/styles/shared/table.js +2 -2
- package/dist/cjs/type-ahead/index.js +1 -1
- package/dist/cjs/types/annotation/emitter.js +1 -1
- package/dist/cjs/ufo/experience-store.js +3 -2
- package/dist/cjs/ufo/index.js +4 -4
- package/dist/cjs/ui/BaseTheme/index.js +2 -2
- package/dist/cjs/ui/Caption/index.js +2 -2
- package/dist/cjs/ui/Caption/messages.js +2 -2
- package/dist/cjs/ui/Expand/index.js +3 -3
- package/dist/cjs/ui/IntlLegacyFallbackProvider/index.js +60 -0
- package/dist/cjs/ui/IntlNextErrorBoundary/index.js +90 -0
- package/dist/cjs/ui/LegacyToNextIntlProvider/index.js +67 -0
- package/dist/cjs/ui/MediaSingle/grid.js +2 -2
- package/dist/cjs/ui/MediaSingle/index.js +2 -1
- package/dist/cjs/ui/MediaSingle/styled.js +1 -1
- package/dist/cjs/ui/Messages/index.js +1 -1
- package/dist/cjs/ui/Popup/index.js +1 -1
- package/dist/cjs/ui/Popup/utils.js +5 -5
- package/dist/cjs/ui/UnsupportedBlock/index.js +2 -2
- package/dist/cjs/ui/UnsupportedInline/index.js +2 -2
- package/dist/cjs/ui/WidthProvider/index.js +2 -2
- package/dist/cjs/ui/index.js +92 -62
- package/dist/cjs/utils/analytics.js +6 -5
- package/dist/cjs/utils/breakout.js +1 -1
- package/dist/cjs/utils/compareNodes.js +6 -0
- package/dist/cjs/utils/date.js +3 -4
- package/dist/cjs/utils/index.js +123 -109
- package/dist/cjs/utils/performance/measure-tti.js +2 -2
- package/dist/cjs/utils/performance/measure.js +1 -1
- package/dist/cjs/utils/table.js +1 -1
- package/dist/cjs/utils/validate-using-spec.js +1 -1
- package/dist/cjs/utils/validator.js +13 -16
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/card/cardOptions.js +1 -0
- package/dist/es2019/emoji.js +2 -0
- package/dist/es2019/extensions/index.js +1 -1
- package/dist/es2019/extensions/types/field-definitions.js +3 -0
- package/dist/es2019/extensions/types/index.js +1 -1
- package/dist/es2019/extensions.js +1 -1
- package/dist/es2019/i18n/cs.js +1 -0
- package/dist/es2019/i18n/da.js +1 -0
- package/dist/es2019/i18n/de.js +1 -0
- package/dist/es2019/i18n/es.js +1 -0
- package/dist/es2019/i18n/fi.js +1 -0
- package/dist/es2019/i18n/fr.js +1 -0
- package/dist/es2019/i18n/hu.js +1 -0
- package/dist/es2019/i18n/it.js +1 -0
- package/dist/es2019/i18n/ja.js +1 -0
- package/dist/es2019/i18n/ko.js +1 -0
- package/dist/es2019/i18n/nb.js +1 -0
- package/dist/es2019/i18n/nl.js +1 -0
- package/dist/es2019/i18n/pl.js +1 -0
- package/dist/es2019/i18n/pt_BR.js +1 -0
- package/dist/es2019/i18n/ru.js +1 -0
- package/dist/es2019/i18n/sv.js +1 -0
- package/dist/es2019/i18n/th.js +1 -0
- package/dist/es2019/i18n/tr.js +1 -0
- package/dist/es2019/i18n/uk.js +1 -0
- package/dist/es2019/i18n/vi.js +1 -0
- package/dist/es2019/i18n/zh.js +1 -1
- package/dist/es2019/i18n/zh_TW.js +1 -0
- package/dist/es2019/index.js +26 -8
- package/dist/es2019/mention.js +2 -0
- package/dist/es2019/messages/codeBidiWarning.js +12 -0
- package/dist/es2019/messages/index.js +1 -0
- package/dist/es2019/messages/link.js +1 -1
- package/dist/es2019/messages/unsupportedContent.js +1 -1
- package/dist/es2019/styles/index.js +4 -2
- package/dist/es2019/styles/shared/media-single.js +10 -0
- package/dist/es2019/styles/shared/panel.js +97 -38
- package/dist/es2019/styles/shared/table.js +1 -0
- package/dist/es2019/ufo/experience-store.js +2 -1
- package/dist/es2019/ui/Caption/index.js +1 -1
- package/dist/es2019/ui/Caption/messages.js +1 -1
- package/dist/es2019/ui/Expand/index.js +1 -1
- package/dist/es2019/ui/IntlLegacyFallbackProvider/index.js +21 -0
- package/dist/es2019/ui/IntlNextErrorBoundary/index.js +43 -0
- package/dist/es2019/ui/LegacyToNextIntlProvider/index.js +24 -0
- package/dist/es2019/ui/UnsupportedBlock/index.js +1 -1
- package/dist/es2019/ui/UnsupportedInline/index.js +1 -1
- package/dist/es2019/ui/index.js +12 -4
- package/dist/es2019/utils/compareNodes.js +6 -0
- package/dist/es2019/utils/date.js +2 -3
- package/dist/es2019/utils/index.js +2 -1
- package/dist/es2019/utils/validator.js +11 -13
- package/dist/es2019/version.json +1 -1
- package/dist/esm/card/cardOptions.js +1 -0
- package/dist/esm/emoji.js +2 -0
- package/dist/esm/extensions/index.js +1 -1
- package/dist/esm/extensions/types/field-definitions.js +3 -0
- package/dist/esm/extensions/types/index.js +1 -1
- package/dist/esm/extensions.js +1 -1
- package/dist/esm/i18n/cs.js +1 -0
- package/dist/esm/i18n/da.js +1 -0
- package/dist/esm/i18n/de.js +1 -0
- package/dist/esm/i18n/es.js +1 -0
- package/dist/esm/i18n/fi.js +1 -0
- package/dist/esm/i18n/fr.js +1 -0
- package/dist/esm/i18n/hu.js +1 -0
- package/dist/esm/i18n/it.js +1 -0
- package/dist/esm/i18n/ja.js +1 -0
- package/dist/esm/i18n/ko.js +1 -0
- package/dist/esm/i18n/nb.js +1 -0
- package/dist/esm/i18n/nl.js +1 -0
- package/dist/esm/i18n/pl.js +1 -0
- package/dist/esm/i18n/pt_BR.js +1 -0
- package/dist/esm/i18n/ru.js +1 -0
- package/dist/esm/i18n/sv.js +1 -0
- package/dist/esm/i18n/th.js +1 -0
- package/dist/esm/i18n/tr.js +1 -0
- package/dist/esm/i18n/uk.js +1 -0
- package/dist/esm/i18n/vi.js +1 -0
- package/dist/esm/i18n/zh.js +1 -1
- package/dist/esm/i18n/zh_TW.js +1 -0
- package/dist/esm/index.js +26 -8
- package/dist/esm/mention.js +2 -0
- package/dist/esm/messages/codeBidiWarning.js +12 -0
- package/dist/esm/messages/index.js +1 -0
- package/dist/esm/messages/link.js +1 -1
- package/dist/esm/messages/unsupportedContent.js +1 -1
- package/dist/esm/styles/index.js +4 -2
- package/dist/esm/styles/shared/media-single.js +1 -1
- package/dist/esm/styles/shared/panel.js +84 -37
- package/dist/esm/styles/shared/table.js +1 -1
- package/dist/esm/ufo/experience-store.js +2 -1
- package/dist/esm/ui/Caption/index.js +1 -1
- package/dist/esm/ui/Caption/messages.js +1 -1
- package/dist/esm/ui/Expand/index.js +1 -1
- package/dist/esm/ui/IntlLegacyFallbackProvider/index.js +45 -0
- package/dist/esm/ui/IntlNextErrorBoundary/index.js +73 -0
- package/dist/esm/ui/LegacyToNextIntlProvider/index.js +51 -0
- package/dist/esm/ui/UnsupportedBlock/index.js +1 -1
- package/dist/esm/ui/UnsupportedInline/index.js +1 -1
- package/dist/esm/ui/index.js +12 -4
- package/dist/esm/utils/compareNodes.js +6 -0
- package/dist/esm/utils/date.js +2 -3
- package/dist/esm/utils/index.js +2 -1
- package/dist/esm/utils/validator.js +12 -15
- package/dist/esm/version.json +1 -1
- package/dist/types/card/cardOptions.d.ts +9 -0
- package/dist/types/card/index.d.ts +1 -9
- package/dist/types/collab.d.ts +1 -1
- package/dist/types/emoji.d.ts +3 -0
- package/dist/types/extensions/index.d.ts +1 -1
- package/dist/types/extensions/types/extension-handler.d.ts +7 -2
- package/dist/types/extensions/types/extension-parameters.d.ts +1 -0
- package/dist/types/extensions/types/field-definitions.d.ts +2 -0
- package/dist/types/extensions/types/index.d.ts +1 -1
- package/dist/types/extensions.d.ts +1 -1
- package/dist/types/i18n/cs.d.ts +1 -0
- package/dist/types/i18n/da.d.ts +1 -0
- package/dist/types/i18n/de.d.ts +1 -0
- package/dist/types/i18n/es.d.ts +1 -0
- package/dist/types/i18n/fi.d.ts +1 -0
- package/dist/types/i18n/fr.d.ts +1 -0
- package/dist/types/i18n/hu.d.ts +1 -0
- package/dist/types/i18n/it.d.ts +1 -0
- package/dist/types/i18n/ja.d.ts +1 -0
- package/dist/types/i18n/ko.d.ts +1 -0
- package/dist/types/i18n/nb.d.ts +1 -0
- package/dist/types/i18n/nl.d.ts +1 -0
- package/dist/types/i18n/pl.d.ts +1 -0
- package/dist/types/i18n/pt_BR.d.ts +1 -0
- package/dist/types/i18n/ru.d.ts +1 -0
- package/dist/types/i18n/sv.d.ts +1 -0
- package/dist/types/i18n/th.d.ts +1 -0
- package/dist/types/i18n/tr.d.ts +1 -0
- package/dist/types/i18n/uk.d.ts +1 -0
- package/dist/types/i18n/vi.d.ts +1 -0
- package/dist/types/i18n/zh.d.ts +1 -0
- package/dist/types/i18n/zh_TW.d.ts +1 -0
- package/dist/types/index.d.ts +6 -2
- package/dist/types/mention.d.ts +2 -0
- package/dist/types/messages/codeBidiWarning.d.ts +11 -0
- package/dist/types/messages/index.d.ts +1 -0
- package/dist/types/provider-factory.d.ts +1 -0
- package/dist/types/styles/index.d.ts +1 -1
- package/dist/types/styles/shared/panel.d.ts +2 -0
- package/dist/types/ufo/experience-store.d.ts +3 -2
- package/dist/types/ui/Caption/index.d.ts +4 -4
- package/dist/types/ui/IntlLegacyFallbackProvider/index.d.ts +8 -0
- package/dist/types/ui/IntlNextErrorBoundary/index.d.ts +15 -0
- package/dist/types/ui/LegacyToNextIntlProvider/index.d.ts +8 -0
- package/dist/types/ui/UnsupportedBlock/index.d.ts +3 -3
- package/dist/types/ui/UnsupportedInline/index.d.ts +3 -3
- package/dist/types/ui/index.d.ts +3 -0
- package/dist/types/ui/unsupported-content-helper.d.ts +2 -2
- package/dist/types/utils/date.d.ts +3 -3
- package/dist/types/utils/index.d.ts +1 -0
- package/emoji/package.json +7 -0
- package/mention/package.json +7 -0
- package/package.json +30 -19
- package/provider-helpers/package.json +7 -0
- package/types/package.json +7 -0
- package/ui/package.json +7 -0
- package/utils/package.json +7 -0
package/dist/es2019/i18n/fi.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// Finnish
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': 'Kaksisuuntaiset merkit muuttavat tekstin renderöintijärjestystä. Tätä voidaan hyödyntää haitallisen koodin peittämisessä.',
|
|
9
10
|
'fabric.editor.captionPlaceholder': 'Lisää kuvateksti',
|
|
10
11
|
'fabric.editor.collapseNode': 'piilota sisältö',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': 'Klikkaa tähän laajentaaksesi...',
|
package/dist/es2019/i18n/fr.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// French
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': "Les caractères bidirectionnels changent l'ordre de rendu du texte. Ils peuvent être utilisés pour masquer du code malveillant.",
|
|
9
10
|
'fabric.editor.captionPlaceholder': 'Ajouter une légende',
|
|
10
11
|
'fabric.editor.collapseNode': 'Réduire le contenu',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': 'Cliquez ici pour développer...',
|
package/dist/es2019/i18n/hu.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// Hungarian
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': 'A kétirányú karakterek megváltoztatják a szöveg renderelési sorrendjét. Ez felhasználható rosszindulatú kód elfedésére.',
|
|
9
10
|
'fabric.editor.captionPlaceholder': 'Képaláírás hozzáadása',
|
|
10
11
|
'fabric.editor.collapseNode': 'tartalom összecsukása',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': 'Kattints ide a kibontáshoz…',
|
package/dist/es2019/i18n/it.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// Italian
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': "I caratteri bidirezionali modificano l'ordine in cui è visualizzato il testo. Possono essere utilizzati per nascondere un codice dannoso.",
|
|
9
10
|
'fabric.editor.captionPlaceholder': 'Aggiungi didascalia',
|
|
10
11
|
'fabric.editor.collapseNode': 'Comprimi contenuto',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': 'Clicca qui per espandere...',
|
package/dist/es2019/i18n/ja.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// Japanese
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': '双方向文字はテキストのレンダリング順序を変更します。このため、悪意あるコードを隠すために使用される場合があります。',
|
|
9
10
|
'fabric.editor.captionPlaceholder': 'キャプションを追加',
|
|
10
11
|
'fabric.editor.collapseNode': 'コンテンツを折りたたむ',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': 'こちらをクリックして展開…',
|
package/dist/es2019/i18n/ko.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// Korean
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': '양방향 문자가 텍스트가 렌더링되는 순서를 변경합니다. 악성 코드를 가리는 데 사용할 수 있습니다.',
|
|
9
10
|
'fabric.editor.captionPlaceholder': '캡션 추가',
|
|
10
11
|
'fabric.editor.collapseNode': '콘텐츠 접기',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': '여기를 클릭하여 펼치기...',
|
package/dist/es2019/i18n/nb.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// Norwegian Bokmål
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': 'Toveistegn endrer rekkefølgen som tekst vises i. Dette kan brukes til å skjule skadelig kode.',
|
|
9
10
|
'fabric.editor.captionPlaceholder': 'Legg til bildetekst',
|
|
10
11
|
'fabric.editor.collapseNode': 'Minimer innhold',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': 'Klikk her for å utvide …',
|
package/dist/es2019/i18n/nl.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// Dutch
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': 'Bidirectionele tekens wijzigen de volgorde waarin de tekst wordt weergegeven. Dit kan worden gebruikt om schadelijke code te verdoezelen.',
|
|
9
10
|
'fabric.editor.captionPlaceholder': 'Bijschrift toevoegen',
|
|
10
11
|
'fabric.editor.collapseNode': 'Content inklappen',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': 'Klik hier om uit te breiden...',
|
package/dist/es2019/i18n/pl.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// Polish
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': 'Znaki dwukierunkowe zmieniają kolejność, w jakiej tekst jest renderowany. Może to zostać wykorzystane do ukrycia złośliwego kodu.',
|
|
9
10
|
'fabric.editor.captionPlaceholder': 'Dodaj podpis',
|
|
10
11
|
'fabric.editor.collapseNode': 'Zwiń zawartość',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': 'Kliknij tutaj, aby rozwinąć...',
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// Portuguese (Brazil)
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': 'Caracteres bidirecionais alteram a ordem em que o texto é renderizado. Eles podem ser usados para ocultar códigos mal-intencionados.',
|
|
9
10
|
'fabric.editor.captionPlaceholder': 'Adicionar legenda',
|
|
10
11
|
'fabric.editor.collapseNode': 'Recolher conteúdo',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': 'Clique aqui para expandir...',
|
package/dist/es2019/i18n/ru.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// Russian
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': 'Двунаправленные символы изменяют порядок отображения текста. Они могут использоваться для маскировки вредоносного кода.',
|
|
9
10
|
'fabric.editor.captionPlaceholder': 'Добавьте подпись',
|
|
10
11
|
'fabric.editor.collapseNode': 'Свернуть содержимое',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': 'Нажмите здесь, чтобы развернуть…',
|
package/dist/es2019/i18n/sv.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// Swedish
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': 'Dubbelriktade tecken ändrar återgivningsordningen för text. Detta kan användas för att dölja skadlig kod.',
|
|
9
10
|
'fabric.editor.captionPlaceholder': 'Lägg till en bildtext',
|
|
10
11
|
'fabric.editor.collapseNode': 'komprimera innehåll',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': 'Klicka här för att expandera ...',
|
package/dist/es2019/i18n/th.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// Thai
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': 'ตัวอักษรแบบสองทิศทางเปลี่ยนลำดับการแสดงข้อความ ซึ่งอาจนำไปใช้เพื่อปิดบังรหัสที่มีวัตถุประสงค์ในทางที่ไม่ดีได้',
|
|
9
10
|
'fabric.editor.captionPlaceholder': 'เพิ่มคำอธิบาย',
|
|
10
11
|
'fabric.editor.collapseNode': 'ย่อเนื้อหา',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': 'คลิกที่นี่เพื่อขยาย...',
|
package/dist/es2019/i18n/tr.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// Turkish
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': 'Çift yönlü karakterler metnin oluşturulduğu sırayı değiştirir. Bu, kötü amaçlı kodu gizlemek için kullanılabilir.',
|
|
9
10
|
'fabric.editor.captionPlaceholder': 'Açıklama yazısı ekleyin',
|
|
10
11
|
'fabric.editor.collapseNode': 'içeriği daraltın',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': 'Genişletmek için buraya tıklayın...',
|
package/dist/es2019/i18n/uk.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// Ukrainian
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': 'Двонаправлені символи змінюють порядок відображення тексту. Такий спосіб може використовуватися, щоб приховати зловмисний код.',
|
|
9
10
|
'fabric.editor.captionPlaceholder': 'Додати підпис',
|
|
10
11
|
'fabric.editor.collapseNode': 'Згорніть вміст',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': 'Натисніть, щоб розгорнути…',
|
package/dist/es2019/i18n/vi.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
// Vietnamese
|
|
8
8
|
export default {
|
|
9
|
+
'fabric.editor.codeBidiWarningLabel': 'Ký tự hai chiều thay đổi thứ tự kết xuất văn bản. Điều này có thể được dùng để che giấu mã độc hại.',
|
|
9
10
|
'fabric.editor.captionPlaceholder': 'Thêm chú thích',
|
|
10
11
|
'fabric.editor.collapseNode': 'thu gọn nội dung',
|
|
11
12
|
'fabric.editor.expandDefaultTitle': 'Nhấp vào đây để mở rộng...',
|
package/dist/es2019/i18n/zh.js
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* This file is automatically generated by i18n-tools.
|
|
5
5
|
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
6
|
*/
|
|
7
|
-
// Chinese
|
|
8
7
|
export default {
|
|
8
|
+
'fabric.editor.codeBidiWarningLabel': '双向字符会更改文本的呈现顺序。这可能被用于掩盖恶意代码。',
|
|
9
9
|
'fabric.editor.captionPlaceholder': '添加标题',
|
|
10
10
|
'fabric.editor.collapseNode': '收起内容',
|
|
11
11
|
'fabric.editor.expandDefaultTitle': '点击此处展开...',
|
package/dist/es2019/index.js
CHANGED
|
@@ -1,9 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export {
|
|
1
|
+
// new child entry point ./utils/index.ts
|
|
2
|
+
export { ADFTraversor, ErrorReporter, ZERO_WIDTH_SPACE, absoluteBreakoutWidth, browser, calcBreakoutWidth, breakoutConsts, calcTableColumnWidths, calcWideWidth, clearMeasure, compose, convertProsemirrorTableNodeToArrayOfRows, createCompareNodes, findAndTrackUnsupportedContentNodes, getAnalyticsAppearance, analyticsEventKey, getAnalyticsEventSeverity, getUnsupportedContentLevelData, UNSUPPORTED_CONTENT_LEVEL_SEVERITY_THRESHOLD_DEFAULTS, getExtensionLozengeData, getExtensionRenderer, getMarksByOrder, getModeFromTheme, getResponseEndTime, getValidContent, getValidDocument, getValidMark, getValidNode, getValidUnknownNode, hasMergedCell, isPastDate, isPerformanceAPIAvailable, isPerformanceObserverAvailable, isSameMark, isSubSupType, markOrder, measureRender, startMeasure, stopMeasure, measureTTI, getTTISeverity, TTI_SEVERITY_THRESHOLD_DEFAULTS, TTI_FROM_INVOCATION_SEVERITY_THRESHOLD_DEFAULTS, timestampToIsoFormat, timestampToString, timestampToTaskContext, timestampToUTCDate, todayTimestampInUTC, withImageLoader, canApplyAnnotationOnRange, getAnnotationIdsFromRange, SEVERITY, UNSUPPORTED_CONTENT_LEVEL_SEVERITY, shouldForceTracking, sniffUserBrowserExtensions, RenderCountProfiler } from './utils'; // new child entry point ./utils/index.ts
|
|
3
|
+
|
|
4
|
+
// new child entry point ./types/index.ts
|
|
5
|
+
export { SortOrder, AnnotationUpdateEmitter, AnnotationUpdateEvent } from './types'; // new child entry point ./types/index.ts
|
|
6
|
+
|
|
7
|
+
// already exported by ./extensions.ts
|
|
8
|
+
export { DefaultExtensionProvider, combineExtensionProviders, getExtensionKeyAndNodeKey, getExtensionModuleNode, getExtensionModuleNodePrivateProps, getQuickInsertItemsFromModule, getNodeRenderer, getContextualToolbarItemsFromModule, buildMenuItem, resolveImport } from './extensions'; // already exported by ./extensions.ts
|
|
9
|
+
|
|
10
|
+
// already exported by ./provider-factory.ts
|
|
11
|
+
export { ProviderFactory, WithProviders } from './provider-factory'; // already exported by ./provider-factory.ts
|
|
12
|
+
|
|
13
|
+
// new child entry point ./provider-helpers/index.ts
|
|
14
|
+
export { combineProviders } from './provider-helpers'; // already exported by ./styles/index.ts
|
|
15
|
+
|
|
16
|
+
export { TableSharedCssClassName, blockMarksSharedStyles, blockquoteSharedStyles, calcTableWidth, codeMarkSharedStyles, columnLayoutSharedStyle, dateSharedStyle, DateSharedCssClassName, annotationSharedStyles, AnnotationSharedCSSByState, AnnotationSharedClassNames, headingsSharedStyles, indentationSharedStyles, inlineNodeSharedStyle, linkSharedStyle, listsSharedStyles, richMediaClassName, mediaSingleSharedStyle, getPanelTypeBackground, getPanelBackgroundDarkModeColors, panelSharedStyles, PanelSharedCssClassName, PanelSharedSelectors, paragraphSharedStyles, ruleSharedStyles, shadowSharedStyle, tableCellBorderWidth, tableCellMinWidth, tableCellPadding, tableMarginBottom, tableMarginSides, tableMarginTop, tableNewColumnMinWidth, tableResizeHandleWidth, tableSharedStyle, tasksAndDecisionsStyles, TaskDecisionSharedCssClassName, whitespaceSharedStyles, MentionSharedCssClassName, //exported from ./src/mention.ts
|
|
17
|
+
EmojiSharedCssClassName, //exported from ./src/emoji.ts
|
|
18
|
+
StatusSharedCssClassName, smartCardSharedStyles, SmartCardSharedCssClassName } from './styles'; // new child entry point ./ui/index.tsx
|
|
19
|
+
|
|
20
|
+
export { BaseTheme, Caption, ClearNextSiblingMarginTop, DEFAULT_IMAGE_HEIGHT, DEFAULT_IMAGE_WIDTH, Emoji, //exported from ./src/emoji.ts
|
|
21
|
+
ErrorMessage, ExpandIconWrapper, ExpandLayoutWrapper, HelperMessage, MediaSingle, MediaSingleDimensionHelper, Mention, //exported from ./src/mention.ts
|
|
22
|
+
Popup, UnsupportedBlock, UnsupportedInline, ValidMessage, WidthConsumer, WidthProvider, WithCreateAnalyticsEvent, calcColumnsFromPx, calcPctFromPx, calcPxFromColumns, calcPxFromPct, expandMessages, findOverflowScrollParent, getBreakpoint, layoutSupportsWidth, mapBreakpointToLayoutMaxWidth, overflowShadow, shadowClassNames, sharedExpandStyles, snapToGrid, withOuterListeners, MediaLink, wrappedLayouts, shouldAddDefaultWrappedWidth, IntlNextErrorBoundary, REACT_INTL_ERROR_MESSAGE, IntlLegacyFallbackProvider, LegacyToNextIntlProvider } from './ui'; // new child entry point ./ui/index.tsx
|
|
23
|
+
|
|
24
|
+
// already exported by ./messages/index.ts
|
|
25
|
+
export { linkMessages } from './messages/link'; // new child entry point in ./utils/index.ts
|
|
26
|
+
|
|
9
27
|
export { validateADFEntity, validationErrorHandler } from './utils/validate-using-spec';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl-next';
|
|
2
|
+
export const codeBidiWarningMessages = defineMessages({
|
|
3
|
+
/**
|
|
4
|
+
* Message taken from
|
|
5
|
+
* https://hello.atlassian.net/wiki/spaces/~tswan/pages/1366555782/PSHELP-2943+Investigate+Trojan+Source+Attack+Vulnerability+design
|
|
6
|
+
*/
|
|
7
|
+
label: {
|
|
8
|
+
id: 'fabric.editor.codeBidiWarningLabel',
|
|
9
|
+
defaultMessage: 'Bidirectional characters change the order that text is rendered. This could be used to obscure malicious code.',
|
|
10
|
+
description: 'Tooltip message to present to users when a bidirectional character is encountered in code.'
|
|
11
|
+
}
|
|
12
|
+
});
|
|
@@ -4,7 +4,7 @@ export { columnLayoutSharedStyle } from './shared/column-layout';
|
|
|
4
4
|
export { mediaSingleSharedStyle, richMediaClassName } from './shared/media-single';
|
|
5
5
|
export { blockquoteSharedStyles } from './shared/blockquote';
|
|
6
6
|
export { headingsSharedStyles } from './shared/headings';
|
|
7
|
-
export { getPanelTypeBackground, panelSharedStyles, PanelSharedCssClassName, PanelSharedSelectors } from './shared/panel';
|
|
7
|
+
export { getPanelTypeBackground, panelSharedStyles, PanelSharedCssClassName, PanelSharedSelectors, getPanelBackgroundDarkModeColors } from './shared/panel';
|
|
8
8
|
export { ruleSharedStyles } from './shared/rule';
|
|
9
9
|
export { whitespaceSharedStyles } from './shared/whitespace';
|
|
10
10
|
export { paragraphSharedStyles } from './shared/paragraph';
|
|
@@ -16,7 +16,9 @@ export { blockMarksSharedStyles } from './shared/block-marks';
|
|
|
16
16
|
export { codeMarkSharedStyles } from './shared/code-mark';
|
|
17
17
|
export { shadowSharedStyle } from './shared/shadow';
|
|
18
18
|
export { dateSharedStyle, DateSharedCssClassName } from './shared/date';
|
|
19
|
-
export { tasksAndDecisionsStyles, TaskDecisionSharedCssClassName } from './shared/task-decision';
|
|
19
|
+
export { tasksAndDecisionsStyles, TaskDecisionSharedCssClassName } from './shared/task-decision'; // TODO: ED-13875 Remove MentionSharedCssClassName and EmojiSharedCssClassName
|
|
20
|
+
// exports once root entry point for editor-common has been removed
|
|
21
|
+
|
|
20
22
|
export { MentionSharedCssClassName } from './shared/mention';
|
|
21
23
|
export { EmojiSharedCssClassName } from './shared/emoji';
|
|
22
24
|
export { StatusSharedCssClassName } from './shared/status';
|
|
@@ -14,6 +14,16 @@ const mediaSingleSharedStyle = css`
|
|
|
14
14
|
height: 0;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
&.ua-firefox {
|
|
18
|
+
.mediaSingleView-content-wrap {
|
|
19
|
+
user-select: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.captionView-content-wrap {
|
|
23
|
+
user-select: text;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
17
27
|
.mediaSingleView-content-wrap[layout='center'] {
|
|
18
28
|
clear: both;
|
|
19
29
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { css } from 'styled-components';
|
|
2
|
-
import {
|
|
2
|
+
import { PanelType } from '@atlaskit/adf-schema';
|
|
3
3
|
import { akEditorTableCellMinWidth, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
|
|
4
4
|
import { akEditorCustomIconSize } from '@atlaskit/editor-shared-styles/consts';
|
|
5
5
|
import { emojiImage, emojiSprite } from '@atlaskit/emoji';
|
|
@@ -14,22 +14,67 @@ const lightPanelColor = {
|
|
|
14
14
|
warning: colors.Y50,
|
|
15
15
|
error: colors.R50
|
|
16
16
|
};
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
info:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
17
|
+
const darkPanelColors = {
|
|
18
|
+
// standard panels
|
|
19
|
+
info: '#0C294F',
|
|
20
|
+
error: `#441C13`,
|
|
21
|
+
warning: `#413001`,
|
|
22
|
+
tip: `#052E21`,
|
|
23
|
+
success: `#052E21`,
|
|
24
|
+
note: `#282249`,
|
|
25
|
+
// Reds
|
|
26
|
+
R900: '#601D16',
|
|
27
|
+
// Red Saturated
|
|
28
|
+
R100S: `#FFEFEB`,
|
|
29
|
+
R300S: `#FFB5A3`,
|
|
30
|
+
R500S: `#FF6B47`,
|
|
31
|
+
R800S: `#C4320E`,
|
|
32
|
+
R1200S: `#441C13`,
|
|
33
|
+
// Yellows
|
|
34
|
+
Y900: '#533F04',
|
|
35
|
+
// Yellow Saturated
|
|
36
|
+
Y100S: `#FFF3D1`,
|
|
37
|
+
Y300S: `#FFDC7A`,
|
|
38
|
+
Y500S: `#FFC933`,
|
|
39
|
+
Y800S: `#D8A003`,
|
|
40
|
+
Y1200S: `#413001`,
|
|
41
|
+
// Greens
|
|
42
|
+
G900: '#164B35',
|
|
43
|
+
// Green Saturated
|
|
44
|
+
G100S: `#E3FCF0`,
|
|
45
|
+
G300S: `#95EEC5`,
|
|
46
|
+
G400S: `#60DCA8`,
|
|
47
|
+
G900S: `#086848`,
|
|
48
|
+
G1200S: `#052E21`,
|
|
49
|
+
// Blues
|
|
50
|
+
B900: '#09326C',
|
|
51
|
+
// Saturated Blues
|
|
52
|
+
B100S: '#E5F0FF',
|
|
53
|
+
B300S: '#A3C9FF',
|
|
54
|
+
B500S: '#4794FF',
|
|
55
|
+
B800S: '#0055CC',
|
|
56
|
+
B1200S: '#0C294F',
|
|
57
|
+
// Purples
|
|
58
|
+
P900: `#352C63`,
|
|
59
|
+
// Purple Saturated
|
|
60
|
+
P100S: `#EEEBFF`,
|
|
61
|
+
P300S: `#CCC3FE`,
|
|
62
|
+
P500S: `#A292F7`,
|
|
63
|
+
P800S: `#5E49CA`,
|
|
64
|
+
P1200S: `#282249`,
|
|
65
|
+
// Teals
|
|
66
|
+
T900: '#1D474C',
|
|
67
|
+
// Teal Saturated
|
|
68
|
+
T100S: `#DBFAFF`,
|
|
69
|
+
T300S: `#78EBFC`,
|
|
70
|
+
T400S: `#3AD6EE`,
|
|
71
|
+
T900S: `#056270`,
|
|
72
|
+
T1200S: `#0B3037`,
|
|
73
|
+
// Dark Mode Alpha
|
|
74
|
+
DNA20A: 'rgba(150, 176, 210, 0.53)',
|
|
75
|
+
DNA40A: 'rgba(134, 156, 180, 0.29)',
|
|
76
|
+
DNA80A: '#161A1D',
|
|
77
|
+
TextColor: '#D9DDE3'
|
|
33
78
|
};
|
|
34
79
|
const lightIconColor = {
|
|
35
80
|
info: colors.B400,
|
|
@@ -46,16 +91,20 @@ const darkIconColor = {
|
|
|
46
91
|
success: colors.G200,
|
|
47
92
|
warning: colors.Y100,
|
|
48
93
|
error: colors.R200
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
|
|
94
|
+
}; // New custom icons are a little smaller than predefined icons.
|
|
95
|
+
// To fix alignment issues with custom icons, vertical alignment is updated.
|
|
96
|
+
|
|
97
|
+
const panelEmojiSpriteVerticalAlignment = -(gridSize() * 3 - akEditorCustomIconSize) / 2;
|
|
98
|
+
const panelEmojiImageVerticalAlignment = panelEmojiSpriteVerticalAlignment - 1;
|
|
99
|
+
export const getPanelBackgroundDarkModeColors = [[colors.B50, darkPanelColors.B1200S], [colors.B75, darkPanelColors.B900], [colors.B100, darkPanelColors.B800S], [colors.N0, darkPanelColors.DNA80A], [colors.N20, darkPanelColors.DNA40A], [colors.N60, darkPanelColors.DNA20A], [colors.T50, darkPanelColors.T1200S], [colors.T75, darkPanelColors.T900], [colors.T100, darkPanelColors.T900S], [colors.G50, darkPanelColors.G1200S], [colors.G75, darkPanelColors.G900], [colors.G200, darkPanelColors.G900S], [colors.Y50, darkPanelColors.Y1200S], [colors.Y75, darkPanelColors.Y900], [colors.Y200, darkPanelColors.Y800S], [colors.R50, darkPanelColors.R1200S], [colors.R75, darkPanelColors.R900], [colors.R100, darkPanelColors.R800S], [colors.P50, darkPanelColors.P1200S], [colors.P75, darkPanelColors.P900], [colors.P100, darkPanelColors.P800S]].map(([colorName, colorValue]) => getPanelDarkModeCSS(colorName, colorValue)).join('\n');
|
|
100
|
+
export function getPanelDarkModeCSS(colorName, colorValue) {
|
|
101
|
+
return `
|
|
102
|
+
&[data-panel-color="${colorName}"] {
|
|
103
|
+
background-color: ${colorValue} !important; // !important to override default style color
|
|
104
|
+
color: ${darkPanelColors.TextColor};
|
|
105
|
+
}
|
|
106
|
+
`;
|
|
107
|
+
}
|
|
59
108
|
const prefix = 'ak-editor-panel';
|
|
60
109
|
export const PanelSharedCssClassName = {
|
|
61
110
|
prefix,
|
|
@@ -92,7 +141,7 @@ const iconDynamicStyles = panelType => props => {
|
|
|
92
141
|
|
|
93
142
|
export const getPanelTypeBackground = (panelType, props = {}) => {
|
|
94
143
|
const light = lightPanelColor[panelType];
|
|
95
|
-
const dark =
|
|
144
|
+
const dark = darkPanelColors[panelType];
|
|
96
145
|
const background = themed({
|
|
97
146
|
light,
|
|
98
147
|
dark
|
|
@@ -102,19 +151,12 @@ export const getPanelTypeBackground = (panelType, props = {}) => {
|
|
|
102
151
|
|
|
103
152
|
const mainDynamicStyles = panelType => props => {
|
|
104
153
|
const background = getPanelTypeBackground(panelType, props);
|
|
105
|
-
const darkText = darkTextColor[panelType];
|
|
106
|
-
const darkBorder = '1px solid ' + darkPanelBorderColor[panelType];
|
|
107
|
-
const border = themed({
|
|
108
|
-
light: 'none',
|
|
109
|
-
dark: darkBorder
|
|
110
|
-
})(props);
|
|
111
154
|
const text = themed({
|
|
112
155
|
light: 'inherit',
|
|
113
|
-
dark:
|
|
156
|
+
dark: darkPanelColors.TextColor
|
|
114
157
|
})(props);
|
|
115
158
|
return `
|
|
116
159
|
background-color: ${background};
|
|
117
|
-
border: ${border};
|
|
118
160
|
color: ${text};
|
|
119
161
|
`;
|
|
120
162
|
};
|
|
@@ -150,8 +192,19 @@ export const panelSharedStyles = css`
|
|
|
150
192
|
display: inline;
|
|
151
193
|
}
|
|
152
194
|
|
|
153
|
-
.${emojiSprite}
|
|
154
|
-
vertical-align: ${
|
|
195
|
+
.${emojiSprite} {
|
|
196
|
+
vertical-align: ${panelEmojiSpriteVerticalAlignment}px;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.${emojiImage} {
|
|
200
|
+
vertical-align: ${panelEmojiImageVerticalAlignment}px;
|
|
201
|
+
|
|
202
|
+
// Vertical align only works for inline-block elements in Firefox
|
|
203
|
+
@-moz-document url-prefix() {
|
|
204
|
+
img {
|
|
205
|
+
display: inline-block;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
155
208
|
}
|
|
156
209
|
}
|
|
157
210
|
|
|
@@ -204,5 +257,11 @@ export const panelSharedStyles = css`
|
|
|
204
257
|
${iconDynamicStyles(PanelType.SUCCESS)}
|
|
205
258
|
}
|
|
206
259
|
}
|
|
260
|
+
|
|
261
|
+
&[data-panel-type='${PanelType.CUSTOM}'] {
|
|
262
|
+
${themed({
|
|
263
|
+
dark: getPanelBackgroundDarkModeColors
|
|
264
|
+
})};
|
|
265
|
+
}
|
|
207
266
|
}
|
|
208
267
|
`;
|
|
@@ -40,6 +40,7 @@ const tableSharedStyle = css`
|
|
|
40
40
|
}
|
|
41
41
|
.${TableSharedCssClassName.TABLE_CONTAINER}[data-number-column='true'] {
|
|
42
42
|
padding-left: ${akEditorTableNumberColumnWidth - 1}px;
|
|
43
|
+
clear: both;
|
|
43
44
|
}
|
|
44
45
|
/* avoid applying styles to nested tables (possible via extensions) */
|
|
45
46
|
.${TableSharedCssClassName.TABLE_CONTAINER} > table,
|
|
@@ -13,6 +13,7 @@ export let EditorExperience;
|
|
|
13
13
|
EditorExperience["loadEditor"] = "load";
|
|
14
14
|
EditorExperience["typing"] = "type";
|
|
15
15
|
EditorExperience["interaction"] = "interact";
|
|
16
|
+
EditorExperience["editSession"] = "editSession";
|
|
16
17
|
})(EditorExperience || (EditorExperience = {}));
|
|
17
18
|
|
|
18
19
|
export const RELIABILITY_INTERVAL = 30000;
|
|
@@ -72,7 +73,7 @@ export class ExperienceStore {
|
|
|
72
73
|
success(experienceId, metadata) {
|
|
73
74
|
var _this$getActive;
|
|
74
75
|
|
|
75
|
-
(_this$getActive = this.getActive(experienceId)) === null || _this$getActive === void 0 ? void 0 : _this$getActive.success({
|
|
76
|
+
return (_this$getActive = this.getActive(experienceId)) === null || _this$getActive === void 0 ? void 0 : _this$getActive.success({
|
|
76
77
|
metadata
|
|
77
78
|
});
|
|
78
79
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { injectIntl } from 'react-intl';
|
|
3
|
+
import { injectIntl } from 'react-intl-next';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
5
|
import { N200, N400 } from '@atlaskit/theme/colors';
|
|
6
6
|
import { messages } from './messages';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineMessages } from 'react-intl';
|
|
1
|
+
import { defineMessages } from 'react-intl-next';
|
|
2
2
|
import styled, { css } from 'styled-components';
|
|
3
3
|
import { akEditorLineHeight, akEditorSwoopCubicBezier, akLayoutGutterOffset, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
4
4
|
import * as colors from '@atlaskit/theme/colors';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { IntlProvider, intlShape } from 'react-intl';
|
|
4
|
+
export class IntlLegacyFallbackProvider extends React.Component {
|
|
5
|
+
render() {
|
|
6
|
+
const oldIntl = this.context.intl;
|
|
7
|
+
|
|
8
|
+
if (!oldIntl) {
|
|
9
|
+
return /*#__PURE__*/React.createElement(IntlProvider, {
|
|
10
|
+
locale: "en"
|
|
11
|
+
}, this.props.children);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
return this.props.children;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
_defineProperty(IntlLegacyFallbackProvider, "contextTypes", {
|
|
20
|
+
intl: intlShape
|
|
21
|
+
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { IntlProvider } from 'react-intl-next';
|
|
4
|
+
export const REACT_INTL_ERROR_MESSAGE = '<IntlProvider> needs to exist in the component ancestry';
|
|
5
|
+
|
|
6
|
+
const isMissingIntlProviderInAncestryError = err => {
|
|
7
|
+
var _err$toString;
|
|
8
|
+
|
|
9
|
+
return err === null || err === void 0 ? void 0 : (_err$toString = err.toString()) === null || _err$toString === void 0 ? void 0 : _err$toString.includes('<IntlProvider> needs to exist in the component ancestry');
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export class IntlNextErrorBoundary extends React.Component {
|
|
13
|
+
constructor(...args) {
|
|
14
|
+
super(...args);
|
|
15
|
+
|
|
16
|
+
_defineProperty(this, "state", {
|
|
17
|
+
missingIntlProviderInAncestry: false
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
componentDidCatch(error, errorInfo) {
|
|
22
|
+
// if missing IntlProvider in ancestry, we setup a fallback IntlProvider ourselves
|
|
23
|
+
if (isMissingIntlProviderInAncestryError(error)) {
|
|
24
|
+
this.setState({
|
|
25
|
+
missingIntlProviderInAncestry: true
|
|
26
|
+
});
|
|
27
|
+
} else {
|
|
28
|
+
// else we re-propagate the non-react-intl-next error
|
|
29
|
+
throw error;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
render() {
|
|
34
|
+
if (this.state.missingIntlProviderInAncestry) {
|
|
35
|
+
return /*#__PURE__*/React.createElement(IntlProvider, {
|
|
36
|
+
locale: "en"
|
|
37
|
+
}, this.props.children);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return this.props.children;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { intlShape } from 'react-intl';
|
|
4
|
+
import { createIntl, RawIntlProvider } from 'react-intl-next';
|
|
5
|
+
export class LegacyToNextIntlProvider extends React.Component {
|
|
6
|
+
render() {
|
|
7
|
+
const oldIntl = this.context.intl;
|
|
8
|
+
|
|
9
|
+
if (oldIntl) {
|
|
10
|
+
const nextIntl = createIntl({ ...oldIntl
|
|
11
|
+
});
|
|
12
|
+
return /*#__PURE__*/React.createElement(RawIntlProvider, {
|
|
13
|
+
value: nextIntl
|
|
14
|
+
}, this.props.children);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return this.props.children;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
_defineProperty(LegacyToNextIntlProvider, "contextTypes", {
|
|
23
|
+
intl: intlShape
|
|
24
|
+
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useCallback, useRef } from 'react';
|
|
2
|
-
import { injectIntl } from 'react-intl';
|
|
2
|
+
import { injectIntl } from 'react-intl-next';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
5
5
|
import QuestionsIcon from '@atlaskit/icon/glyph/question-circle';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useCallback, useRef } from 'react';
|
|
2
|
-
import { injectIntl } from 'react-intl';
|
|
2
|
+
import { injectIntl } from 'react-intl-next';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
5
5
|
import QuestionsIcon from '@atlaskit/icon/glyph/question-circle';
|