@atlaskit/editor-common 77.2.5 → 77.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/emoji.js +10 -1
  3. package/dist/cjs/extensions/index.js +14 -1
  4. package/dist/cjs/extensions/messages.js +141 -0
  5. package/dist/cjs/extensions.js +12 -0
  6. package/dist/cjs/floating-toolbar/index.js +10 -1
  7. package/dist/cjs/floating-toolbar/messages.js +54 -0
  8. package/dist/cjs/lists/index.js +14 -1
  9. package/dist/cjs/lists/messages.js +36 -0
  10. package/dist/cjs/lists/node.js +77 -1
  11. package/dist/cjs/lists/replace-content.js +25 -1
  12. package/dist/cjs/media/index.js +68 -0
  13. package/dist/cjs/media/messages/altText.js +44 -0
  14. package/dist/cjs/media/messages/caption.js +14 -0
  15. package/dist/cjs/media/messages/dropPlaceholder.js +14 -0
  16. package/dist/cjs/media/messages/imageBorder.js +49 -0
  17. package/dist/cjs/media/messages/mediaLinkingToolbar.js +14 -0
  18. package/dist/cjs/media/messages/mediaResizeAnnouncerMess.js +34 -0
  19. package/dist/cjs/media/messages/nodeviews.js +14 -0
  20. package/dist/cjs/media/messages/pixelEntry.js +54 -0
  21. package/dist/cjs/media/messages/toolbarMedia.js +14 -0
  22. package/dist/cjs/messages/alignment.js +5 -0
  23. package/dist/cjs/messages/avatar-group.js +14 -0
  24. package/dist/cjs/messages/codeBlockButton.js +5 -0
  25. package/dist/cjs/messages/date.js +5 -0
  26. package/dist/cjs/messages/find-replace.js +79 -0
  27. package/dist/cjs/messages/help-dialog.js +80 -0
  28. package/dist/cjs/messages/indentation.js +0 -2
  29. package/dist/cjs/messages/index.js +63 -0
  30. package/dist/cjs/messages/mentions.js +29 -0
  31. package/dist/cjs/messages/panel.js +44 -0
  32. package/dist/cjs/messages/paste-options-toolbar.js +29 -0
  33. package/dist/cjs/messages/placeholder-text.js +14 -0
  34. package/dist/cjs/messages/tasks-and-decsisions.js +19 -0
  35. package/dist/cjs/messages/text-color.js +14 -0
  36. package/dist/cjs/monitoring/error.js +1 -1
  37. package/dist/cjs/quick-insert/index.js +8 -1
  38. package/dist/cjs/quick-insert/messages.js +69 -0
  39. package/dist/cjs/transforms/extension.js +10 -0
  40. package/dist/cjs/type-ahead/index.js +7 -0
  41. package/dist/cjs/type-ahead/messages.js +79 -0
  42. package/dist/cjs/ui/DropList/index.js +1 -1
  43. package/dist/es2019/emoji.js +9 -1
  44. package/dist/es2019/extensions/index.js +2 -1
  45. package/dist/es2019/extensions/messages.js +135 -0
  46. package/dist/es2019/extensions.js +1 -1
  47. package/dist/es2019/floating-toolbar/index.js +2 -1
  48. package/dist/es2019/floating-toolbar/messages.js +48 -0
  49. package/dist/es2019/lists/index.js +3 -2
  50. package/dist/es2019/lists/messages.js +29 -0
  51. package/dist/es2019/lists/node.js +76 -0
  52. package/dist/es2019/lists/replace-content.js +24 -0
  53. package/dist/es2019/media/index.js +9 -0
  54. package/dist/es2019/media/messages/altText.js +38 -0
  55. package/dist/es2019/media/messages/caption.js +8 -0
  56. package/dist/es2019/media/messages/dropPlaceholder.js +8 -0
  57. package/dist/es2019/media/messages/imageBorder.js +43 -0
  58. package/dist/es2019/media/messages/mediaLinkingToolbar.js +8 -0
  59. package/dist/es2019/media/messages/mediaResizeAnnouncerMess.js +28 -0
  60. package/dist/es2019/media/messages/nodeviews.js +8 -0
  61. package/dist/es2019/media/messages/pixelEntry.js +48 -0
  62. package/dist/es2019/media/messages/toolbarMedia.js +8 -0
  63. package/dist/es2019/messages/alignment.js +5 -0
  64. package/dist/es2019/messages/avatar-group.js +8 -0
  65. package/dist/es2019/messages/codeBlockButton.js +5 -0
  66. package/dist/es2019/messages/date.js +5 -0
  67. package/dist/es2019/messages/find-replace.js +73 -0
  68. package/dist/es2019/messages/help-dialog.js +74 -0
  69. package/dist/es2019/messages/indentation.js +0 -1
  70. package/dist/es2019/messages/index.js +9 -0
  71. package/dist/es2019/messages/mentions.js +23 -0
  72. package/dist/es2019/messages/panel.js +38 -0
  73. package/dist/es2019/messages/paste-options-toolbar.js +23 -0
  74. package/dist/es2019/messages/placeholder-text.js +8 -0
  75. package/dist/es2019/messages/tasks-and-decsisions.js +13 -0
  76. package/dist/es2019/messages/text-color.js +8 -0
  77. package/dist/es2019/monitoring/error.js +1 -1
  78. package/dist/es2019/quick-insert/index.js +2 -1
  79. package/dist/es2019/quick-insert/messages.js +63 -0
  80. package/dist/es2019/transforms/extension.js +10 -0
  81. package/dist/es2019/type-ahead/index.js +2 -1
  82. package/dist/es2019/type-ahead/messages.js +73 -0
  83. package/dist/es2019/ui/DropList/index.js +1 -1
  84. package/dist/esm/emoji.js +9 -1
  85. package/dist/esm/extensions/index.js +2 -1
  86. package/dist/esm/extensions/messages.js +135 -0
  87. package/dist/esm/extensions.js +1 -1
  88. package/dist/esm/floating-toolbar/index.js +2 -1
  89. package/dist/esm/floating-toolbar/messages.js +48 -0
  90. package/dist/esm/lists/index.js +3 -2
  91. package/dist/esm/lists/messages.js +29 -0
  92. package/dist/esm/lists/node.js +76 -0
  93. package/dist/esm/lists/replace-content.js +24 -0
  94. package/dist/esm/media/index.js +9 -0
  95. package/dist/esm/media/messages/altText.js +38 -0
  96. package/dist/esm/media/messages/caption.js +8 -0
  97. package/dist/esm/media/messages/dropPlaceholder.js +8 -0
  98. package/dist/esm/media/messages/imageBorder.js +43 -0
  99. package/dist/esm/media/messages/mediaLinkingToolbar.js +8 -0
  100. package/dist/esm/media/messages/mediaResizeAnnouncerMess.js +28 -0
  101. package/dist/esm/media/messages/nodeviews.js +8 -0
  102. package/dist/esm/media/messages/pixelEntry.js +48 -0
  103. package/dist/esm/media/messages/toolbarMedia.js +8 -0
  104. package/dist/esm/messages/alignment.js +5 -0
  105. package/dist/esm/messages/avatar-group.js +8 -0
  106. package/dist/esm/messages/codeBlockButton.js +5 -0
  107. package/dist/esm/messages/date.js +5 -0
  108. package/dist/esm/messages/find-replace.js +73 -0
  109. package/dist/esm/messages/help-dialog.js +74 -0
  110. package/dist/esm/messages/indentation.js +0 -1
  111. package/dist/esm/messages/index.js +9 -0
  112. package/dist/esm/messages/mentions.js +23 -0
  113. package/dist/esm/messages/panel.js +38 -0
  114. package/dist/esm/messages/paste-options-toolbar.js +23 -0
  115. package/dist/esm/messages/placeholder-text.js +8 -0
  116. package/dist/esm/messages/tasks-and-decsisions.js +13 -0
  117. package/dist/esm/messages/text-color.js +8 -0
  118. package/dist/esm/monitoring/error.js +1 -1
  119. package/dist/esm/quick-insert/index.js +2 -1
  120. package/dist/esm/quick-insert/messages.js +63 -0
  121. package/dist/esm/transforms/extension.js +10 -0
  122. package/dist/esm/type-ahead/index.js +2 -1
  123. package/dist/esm/type-ahead/messages.js +73 -0
  124. package/dist/esm/ui/DropList/index.js +1 -1
  125. package/dist/types/emoji.d.ts +7 -0
  126. package/dist/types/extensions/index.d.ts +1 -0
  127. package/dist/types/extensions/messages.d.ts +134 -0
  128. package/dist/types/extensions.d.ts +1 -1
  129. package/dist/types/floating-toolbar/index.d.ts +1 -0
  130. package/dist/types/floating-toolbar/messages.d.ts +48 -0
  131. package/dist/types/lists/index.d.ts +2 -1
  132. package/dist/types/lists/messages.d.ts +27 -0
  133. package/dist/types/lists/node.d.ts +1 -0
  134. package/dist/types/lists/replace-content.d.ts +3 -1
  135. package/dist/types/media/index.d.ts +9 -0
  136. package/dist/types/media/messages/altText.d.ts +37 -0
  137. package/dist/types/media/messages/caption.d.ts +7 -0
  138. package/dist/types/media/messages/dropPlaceholder.d.ts +7 -0
  139. package/dist/types/media/messages/imageBorder.d.ts +42 -0
  140. package/dist/types/media/messages/mediaLinkingToolbar.d.ts +7 -0
  141. package/dist/types/media/messages/mediaResizeAnnouncerMess.d.ts +27 -0
  142. package/dist/types/media/messages/nodeviews.d.ts +7 -0
  143. package/dist/types/media/messages/pixelEntry.d.ts +47 -0
  144. package/dist/types/media/messages/toolbarMedia.d.ts +7 -0
  145. package/dist/types/messages/alignment.d.ts +5 -0
  146. package/dist/types/messages/avatar-group.d.ts +7 -0
  147. package/dist/types/messages/codeBlockButton.d.ts +5 -0
  148. package/dist/types/messages/date.d.ts +5 -0
  149. package/dist/types/messages/find-replace.d.ts +72 -0
  150. package/dist/types/messages/help-dialog.d.ts +72 -0
  151. package/dist/types/messages/index.d.ts +9 -0
  152. package/dist/types/messages/mentions.d.ts +22 -0
  153. package/dist/types/messages/panel.d.ts +37 -0
  154. package/dist/types/messages/paste-options-toolbar.d.ts +22 -0
  155. package/dist/types/messages/placeholder-text.d.ts +7 -0
  156. package/dist/types/messages/tasks-and-decsisions.d.ts +12 -0
  157. package/dist/types/messages/text-color.d.ts +7 -0
  158. package/dist/types/quick-insert/index.d.ts +1 -0
  159. package/dist/types/quick-insert/messages.d.ts +62 -0
  160. package/dist/types/type-ahead/index.d.ts +1 -0
  161. package/dist/types/type-ahead/messages.d.ts +72 -0
  162. package/dist/types-ts4.5/emoji.d.ts +7 -0
  163. package/dist/types-ts4.5/extensions/index.d.ts +1 -0
  164. package/dist/types-ts4.5/extensions/messages.d.ts +134 -0
  165. package/dist/types-ts4.5/extensions.d.ts +1 -1
  166. package/dist/types-ts4.5/floating-toolbar/index.d.ts +1 -0
  167. package/dist/types-ts4.5/floating-toolbar/messages.d.ts +48 -0
  168. package/dist/types-ts4.5/lists/index.d.ts +2 -1
  169. package/dist/types-ts4.5/lists/messages.d.ts +27 -0
  170. package/dist/types-ts4.5/lists/node.d.ts +1 -0
  171. package/dist/types-ts4.5/lists/replace-content.d.ts +3 -1
  172. package/dist/types-ts4.5/media/index.d.ts +9 -0
  173. package/dist/types-ts4.5/media/messages/altText.d.ts +37 -0
  174. package/dist/types-ts4.5/media/messages/caption.d.ts +7 -0
  175. package/dist/types-ts4.5/media/messages/dropPlaceholder.d.ts +7 -0
  176. package/dist/types-ts4.5/media/messages/imageBorder.d.ts +42 -0
  177. package/dist/types-ts4.5/media/messages/mediaLinkingToolbar.d.ts +7 -0
  178. package/dist/types-ts4.5/media/messages/mediaResizeAnnouncerMess.d.ts +27 -0
  179. package/dist/types-ts4.5/media/messages/nodeviews.d.ts +7 -0
  180. package/dist/types-ts4.5/media/messages/pixelEntry.d.ts +47 -0
  181. package/dist/types-ts4.5/media/messages/toolbarMedia.d.ts +7 -0
  182. package/dist/types-ts4.5/messages/alignment.d.ts +5 -0
  183. package/dist/types-ts4.5/messages/avatar-group.d.ts +7 -0
  184. package/dist/types-ts4.5/messages/codeBlockButton.d.ts +5 -0
  185. package/dist/types-ts4.5/messages/date.d.ts +5 -0
  186. package/dist/types-ts4.5/messages/find-replace.d.ts +72 -0
  187. package/dist/types-ts4.5/messages/help-dialog.d.ts +72 -0
  188. package/dist/types-ts4.5/messages/index.d.ts +9 -0
  189. package/dist/types-ts4.5/messages/mentions.d.ts +22 -0
  190. package/dist/types-ts4.5/messages/panel.d.ts +37 -0
  191. package/dist/types-ts4.5/messages/paste-options-toolbar.d.ts +22 -0
  192. package/dist/types-ts4.5/messages/placeholder-text.d.ts +7 -0
  193. package/dist/types-ts4.5/messages/tasks-and-decsisions.d.ts +12 -0
  194. package/dist/types-ts4.5/messages/text-color.d.ts +7 -0
  195. package/dist/types-ts4.5/quick-insert/index.d.ts +1 -0
  196. package/dist/types-ts4.5/quick-insert/messages.d.ts +62 -0
  197. package/dist/types-ts4.5/type-ahead/index.d.ts +1 -0
  198. package/dist/types-ts4.5/type-ahead/messages.d.ts +72 -0
  199. package/media/package.json +15 -0
  200. package/package.json +2 -1
  201. package/tsconfig.json +3 -0
@@ -0,0 +1,73 @@
1
+ import { defineMessages } from 'react-intl-next';
2
+ export const typeAheadListMessages = defineMessages({
3
+ typeAheadPopupLabel: {
4
+ id: 'fabric.editor.typeAhead.popupLabel',
5
+ defaultMessage: 'Typeahead results',
6
+ description: 'the result of a typeahead, similar to autocomplete results+'
7
+ },
8
+ quickInsertPopupLabel: {
9
+ id: 'fabric.editor.typeAhead.quickInsertPopupLabel',
10
+ defaultMessage: 'Shortcuts for inserts and formatting',
11
+ description: 'the result of a quick insert typeahead, similar to autocomplete results+'
12
+ },
13
+ quickInsertInputLabel: {
14
+ id: 'fabric.editor.typeAhead.quickInsertInputLabel',
15
+ defaultMessage: 'Begin typing to search or filter shortcut options',
16
+ description: 'assisitve text for typeahed input field'
17
+ },
18
+ emojiPopupLabel: {
19
+ id: 'fabric.editor.typeahead.emojiPopupLabel',
20
+ defaultMessage: 'Emoji shortcuts',
21
+ description: 'the result of a emoji typeahead, similar to autocomplete results+'
22
+ },
23
+ emojiInputLabel: {
24
+ id: 'fabric.editor.typeahead.emojiInputLabel',
25
+ defaultMessage: 'Begin typing to search or filter emoji options',
26
+ description: 'assisitve text for typeahed input field'
27
+ },
28
+ mentionPopupLabel: {
29
+ id: 'fabric.editor.typeahead.mentionPopupLabel',
30
+ defaultMessage: 'Users you can tag',
31
+ description: 'the aria label of a mention typeahead popup'
32
+ },
33
+ mentionInputLabel: {
34
+ id: 'fabric.editor.typeahead.mentionInputLabel',
35
+ defaultMessage: 'Begin typing to search for users to tag',
36
+ description: 'assisitve text for typeahed input field'
37
+ },
38
+ metionListItemLabel: {
39
+ id: 'fabric.editor.typeahead.metionListItemLabel',
40
+ defaultMessage: 'User {name} @{shortName}',
41
+ description: 'assistive text for user mention items username and nickname'
42
+ },
43
+ emojiListItemLabel: {
44
+ id: 'fabric.editor.typeahead.emojiListItemLabel',
45
+ defaultMessage: 'Emoji {name} Text Shortcut {shortcut}',
46
+ description: 'assistive text for emoji name and shortcut'
47
+ },
48
+ inputQueryAssistiveLabel: {
49
+ id: 'fabric.editor.inputQueryAssistiveTxt',
50
+ defaultMessage: 'When autocomplete results are available use up and down arrows to review and enter to select. Touch device users, explore by touch or with swipe gestures.',
51
+ description: 'Assistive text to the user when using typeahead shortcut'
52
+ },
53
+ searchResultsLabel: {
54
+ id: 'fabric.editor.searchResults',
55
+ defaultMessage: '{itemsLength, plural, one {# search result} other {# search results}} available. Use Up and Down arrow keys to navigate amongst the options. Press Enter to select an option.',
56
+ description: 'Assistive text to the user when using typeahead shortcut and it preceeds with a number - Ex: 10 search results available'
57
+ },
58
+ noSearchResultsLabel: {
59
+ id: 'fabric.editor.noSearchResults',
60
+ defaultMessage: 'No search results',
61
+ description: 'Assistive text to the user when using typeahead shortcut'
62
+ },
63
+ descriptionLabel: {
64
+ id: 'fabric.editor.description',
65
+ defaultMessage: 'Description',
66
+ description: 'Description'
67
+ },
68
+ shortcutLabel: {
69
+ id: 'fabric.editor.shortcut',
70
+ defaultMessage: 'Text shortcut',
71
+ description: 'Text shortcut'
72
+ }
73
+ });
@@ -7,7 +7,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
7
7
  import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
8
8
  import Layer from '../Layer';
9
9
  const packageName = "@atlaskit/editor-common";
10
- const packageVersion = "77.2.5";
10
+ const packageVersion = "77.3.1";
11
11
  const halfFocusRing = 1;
12
12
  const dropOffset = '0, 8';
13
13
  class DropList extends Component {
package/dist/esm/emoji.js CHANGED
@@ -1,2 +1,10 @@
1
1
  export { default as Emoji } from './ui/Emoji';
2
- export { EmojiSharedCssClassName } from './styles/shared/emoji';
2
+ export { EmojiSharedCssClassName } from './styles/shared/emoji';
3
+ import { defineMessages } from 'react-intl-next';
4
+ export var messages = defineMessages({
5
+ emojiNodeLabel: {
6
+ id: 'fabric.emoji.label',
7
+ defaultMessage: 'Emoji',
8
+ description: 'Label to indicate emoji node to Screen reader users'
9
+ }
10
+ });
@@ -4,4 +4,5 @@ export { default as DefaultExtensionProvider } from './default-extension-provide
4
4
  export { createAutoConverterRunner, getExtensionAutoConvertersFromProvider, getQuickInsertItemsFromModule, getContextualToolbarItemsFromModule, buildMenuItem } from './module-helpers';
5
5
  export { getExtensionModuleNode, getExtensionModuleNodePrivateProps, getNodeRenderer } from './extension-handlers';
6
6
  export { default as combineExtensionProviders } from './combine-extension-providers';
7
- export { getCustomFieldResolver, getUserFieldContextProvider, getFieldSerializer, getFieldDeserializer } from './extension-fields-helpers';
7
+ export { getCustomFieldResolver, getUserFieldContextProvider, getFieldSerializer, getFieldDeserializer } from './extension-fields-helpers';
8
+ export { messages, configPanelMessages } from './messages';
@@ -0,0 +1,135 @@
1
+ import { defineMessages } from 'react-intl-next';
2
+ export var messages = defineMessages({
3
+ edit: {
4
+ id: 'fabric.editor.edit',
5
+ defaultMessage: 'Edit',
6
+ description: 'Edit the properties for this extension.'
7
+ },
8
+ deleteElementTitle: {
9
+ id: 'fabric.editor.extension.deleteElementTitle',
10
+ defaultMessage: 'Delete element',
11
+ description: 'Title text for confirm modal when deleting an extension linked to a data consumer.'
12
+ },
13
+ unnamedSource: {
14
+ id: 'fabric.editor.extension.sourceNoTitledName',
15
+ defaultMessage: 'this element',
16
+ description: 'The current element without preset name been selected'
17
+ },
18
+ confirmDeleteLinkedModalOKButton: {
19
+ id: 'fabric.editor.extension.confirmDeleteLinkedModalOKButton',
20
+ defaultMessage: 'Delete',
21
+ description: 'Action button label for confirm modal when deleting an extension linked to a data consumer.'
22
+ },
23
+ confirmDeleteLinkedModalMessage: {
24
+ id: 'fabric.editor.extension.confirmDeleteLinkedModalMessage',
25
+ defaultMessage: 'Deleting {nodeName} will break anything connected to it.',
26
+ description: 'Message for confirm modal when deleting a extension linked to an data consumer.'
27
+ },
28
+ confirmModalCheckboxLabel: {
29
+ id: 'fabric.editor.floatingToolbar.confirmModalCheckboxLabel',
30
+ defaultMessage: 'Also delete connected elements',
31
+ description: 'checkbox label text'
32
+ },
33
+ saveIndicator: {
34
+ id: 'fabric.editor.extensions.config-panel.save-indicator',
35
+ defaultMessage: 'All changes are always autosaved',
36
+ description: 'Message shown to the user to notify to them that we save the changes automatically.'
37
+ }
38
+ });
39
+ export var configPanelMessages = defineMessages({
40
+ configFailedToLoad: {
41
+ id: 'fabric.editor.configFailedToLoad',
42
+ defaultMessage: 'Failed to load',
43
+ description: 'Displayed when the config panel fails to load fields'
44
+ },
45
+ submit: {
46
+ id: 'fabric.editor.configPanel.submit',
47
+ defaultMessage: 'Submit',
48
+ description: 'Submit button label'
49
+ },
50
+ cancel: {
51
+ id: 'fabric.editor.configPanel.cancel',
52
+ defaultMessage: 'Cancel',
53
+ description: 'Cancel button label'
54
+ },
55
+ close: {
56
+ id: 'fabric.editor.configPanel.close',
57
+ defaultMessage: 'Close',
58
+ description: 'Close button label'
59
+ },
60
+ required: {
61
+ id: 'fabric.editor.configPanel.required',
62
+ defaultMessage: 'Required field',
63
+ description: 'Validation message for required field'
64
+ },
65
+ invalid: {
66
+ id: 'fabric.editor.configPanel.invalid',
67
+ defaultMessage: 'Invalid field',
68
+ description: 'Validation message when a field value is not acceptable'
69
+ },
70
+ isMultipleAndRadio: {
71
+ id: 'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio',
72
+ defaultMessage: 'Can not combine isMultiple with style: radio',
73
+ description: 'Configuration error'
74
+ },
75
+ addField: {
76
+ id: 'fabric.editor.configPanel.formType.addField',
77
+ defaultMessage: 'Add field',
78
+ description: 'Button to add a new field in nested forms'
79
+ },
80
+ removeField: {
81
+ id: 'fabric.editor.configPanel.formType.removeField',
82
+ defaultMessage: 'Remove field',
83
+ description: 'Button to remove a field in nested forms'
84
+ },
85
+ createOption: {
86
+ id: 'fabric.editor.configPanel.customSelect.createOption',
87
+ defaultMessage: 'Create',
88
+ description: 'Create a new option for a select field'
89
+ },
90
+ documentation: {
91
+ id: 'fabric.editor.configPanel.documentation',
92
+ defaultMessage: 'Documentation',
93
+ description: 'Label for the documentation link'
94
+ },
95
+ help: {
96
+ id: 'fabric.editor.configPanel.help',
97
+ defaultMessage: 'Need help?',
98
+ description: 'Label for documentation link v.2 (to replace "Documentation" text)'
99
+ },
100
+ custom: {
101
+ id: 'fabric.editor.configPanel.dateRange.option.custom',
102
+ defaultMessage: 'Custom',
103
+ description: 'Label for the option "Custom" in the date range UI element'
104
+ },
105
+ from: {
106
+ id: 'fabric.editor.configPanel.dateRange.custom.from',
107
+ defaultMessage: 'From',
108
+ description: 'Label for the initial date when the option "Custom" is selected in the date range UI element'
109
+ },
110
+ to: {
111
+ id: 'fabric.editor.configPanel.dateRange.custom.to',
112
+ defaultMessage: 'To',
113
+ description: 'Label for the end date when the option "Custom" is selected in the date range UI element'
114
+ },
115
+ expand: {
116
+ id: 'fabric.editor.configPanel.dateRange.grouping.expand',
117
+ defaultMessage: 'Expand',
118
+ description: 'Label for expanding a group of fields'
119
+ },
120
+ collapse: {
121
+ id: 'fabric.editor.configPanel.dateRange.grouping.collapse',
122
+ defaultMessage: 'Collapse',
123
+ description: 'Label for collapsing a group of fields'
124
+ },
125
+ errorBoundaryTitle: {
126
+ id: 'fabric.editor.configPanel.errorBoundary.title',
127
+ defaultMessage: 'Something went wrong.',
128
+ description: 'Title for uncaught config panel error'
129
+ },
130
+ errorBoundaryNote: {
131
+ id: 'fabric.editor.configPanel.errorBoundary.note',
132
+ defaultMessage: "We've let the team know. You can still edit and publish this page, or check the error console for more information.",
133
+ description: 'Note for uncaught config panel error'
134
+ }
135
+ });
@@ -1 +1 @@
1
- export { DefaultExtensionProvider, combineExtensionProviders, createAutoConverterRunner, getExtensionAutoConvertersFromProvider, getExtensionKeyAndNodeKey, getExtensionModuleNode, getQuickInsertItemsFromModule, getNodeRenderer, getExtensionModuleNodePrivateProps, getContextualToolbarItemsFromModule, resolveImport, getCustomFieldResolver, getFieldSerializer, getFieldDeserializer, isFieldset, isTabGroup, isTabField, isExpand, isDateRange, getUserFieldContextProvider, buildMenuItem } from './extensions/index';
1
+ export { DefaultExtensionProvider, combineExtensionProviders, createAutoConverterRunner, getExtensionAutoConvertersFromProvider, getExtensionKeyAndNodeKey, getExtensionModuleNode, getQuickInsertItemsFromModule, getNodeRenderer, getExtensionModuleNodePrivateProps, getContextualToolbarItemsFromModule, resolveImport, getCustomFieldResolver, getFieldSerializer, getFieldDeserializer, isFieldset, isTabGroup, isTabField, isExpand, isDateRange, getUserFieldContextProvider, buildMenuItem, configPanelMessages, messages } from './extensions/index';
@@ -98,4 +98,5 @@ export var areSameItems = function areSameItems(leftArr, rightArr) {
98
98
  return leftArr.every(function (item, index) {
99
99
  return isSameItem(rightArr[index], item);
100
100
  });
101
- };
101
+ };
102
+ export { default as messages } from './messages';
@@ -0,0 +1,48 @@
1
+ import { defineMessages } from 'react-intl-next';
2
+ export default defineMessages({
3
+ confirmModalDefaultHeading: {
4
+ id: 'fabric.editor.floatingToolbar.confirmModalHeading',
5
+ defaultMessage: 'Are you sure?',
6
+ description: 'Default heading of floating toolbar confirmation modal.'
7
+ },
8
+ confirmModalOK: {
9
+ id: 'fabric.editor.floatingToolbar.confirmModalOK',
10
+ defaultMessage: 'OK',
11
+ description: 'OK button for floating toolbar confirmation modal.'
12
+ },
13
+ confirmModalCancel: {
14
+ id: 'fabric.editor.floatingToolbar.confirmModalCancel',
15
+ defaultMessage: 'Cancel',
16
+ description: 'Cancel button for floating toolbar confirmation modal.'
17
+ },
18
+ confirmModalListUnit: {
19
+ id: 'fabric.editor.floatingToolbar.confirmModalConnectedUnit',
20
+ defaultMessage: '{name}{amount, plural, =0 {} one { (+1 connected element)} other { (+# connected elements)}}',
21
+ description: 'Text displayed in confirmation modal which highlights the nodes and the amount of connected nodes that will be deleted'
22
+ },
23
+ confirmDeleteLinkedModalMessage: {
24
+ id: 'fabric.editor.extension.confirmDeleteLinkedModalMessage',
25
+ defaultMessage: 'Deleting {nodeName} will break anything connected to it.',
26
+ description: 'Message for confirm modal when deleting a extension linked to an data consumer.'
27
+ },
28
+ floatingToolbarAriaLabel: {
29
+ id: 'fabric.editor.floatingToolbar.floatingToolbarAriaLabel',
30
+ defaultMessage: 'Floating Toolbar',
31
+ description: "a floating toolbar's aria label"
32
+ },
33
+ floatingToolbarAnnouncer: {
34
+ id: 'fabric.editor.floatingToolbar.floatingToolbarAnnouncer',
35
+ defaultMessage: 'Floating toolbar controls have been opened',
36
+ description: 'message that will be announced to screenreaders that the floating toolbar is opened'
37
+ },
38
+ floatingToolbarScrollLeft: {
39
+ id: 'fabric.editor.floatingToolbar.scrollLeft',
40
+ defaultMessage: 'Scroll left',
41
+ description: 'Button to scroll left when the toolbar is in the overflow state'
42
+ },
43
+ floatingToolbarScrollRight: {
44
+ id: 'fabric.editor.floatingToolbar.scrollRight',
45
+ defaultMessage: 'Scroll right',
46
+ description: 'Button to scroll right when the toolbar is in the overflow state'
47
+ }
48
+ });
@@ -1,6 +1,7 @@
1
1
  export { getListItemAttributes, normalizeListItemsSelection } from './selection';
2
2
  export { moveTargetIntoList } from './replace-content';
3
- export { JoinDirection, isListNodeValidContent, joinSiblingLists } from './node';
3
+ export { JoinDirection, isListNodeValidContent, joinSiblingLists, processNestedTaskListsInSameLevel } from './node';
4
4
  export { getCommonListAnalyticsAttributes, countListItemsInSelection } from './analytics';
5
5
  export { hasValidListIndentationLevel } from './indentation';
6
- export { isListNode, isListItemNode, isBulletList, isParagraphNode } from '../utils';
6
+ export { isListNode, isListItemNode, isBulletList, isParagraphNode } from '../utils';
7
+ export { messages } from './messages';
@@ -0,0 +1,29 @@
1
+ // Common Translations will live here
2
+ import { defineMessages } from 'react-intl-next';
3
+ export var messages = defineMessages({
4
+ unorderedList: {
5
+ id: 'fabric.editor.unorderedList',
6
+ defaultMessage: 'Bullet list',
7
+ description: 'A list with bullets. Also known as an “unordered” list'
8
+ },
9
+ unorderedListDescription: {
10
+ id: 'fabric.editor.unorderedList.description',
11
+ defaultMessage: 'Create an unordered list',
12
+ description: ''
13
+ },
14
+ orderedList: {
15
+ id: 'fabric.editor.orderedList',
16
+ defaultMessage: 'Numbered list',
17
+ description: 'A list with ordered items 1… 2… 3…'
18
+ },
19
+ orderedListDescription: {
20
+ id: 'fabric.editor.orderedList.description',
21
+ defaultMessage: 'Create an ordered list',
22
+ description: ''
23
+ },
24
+ lists: {
25
+ id: 'fabric.editor.lists',
26
+ defaultMessage: 'Lists',
27
+ description: 'Menu shows ordered/bullet list and unordered/numbered lists'
28
+ }
29
+ });
@@ -1,6 +1,7 @@
1
1
  import { Fragment } from '@atlaskit/editor-prosemirror/model';
2
2
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
3
3
  import { isListItemNode, isListNode, isOrderedList, isOrderedListContinuous } from '../utils';
4
+ import { wrapTaskListIntoListAbove } from './replace-content';
4
5
  export function isListNodeValidContent(node) {
5
6
  var bulletList = node.type.schema.nodes.bulletList;
6
7
  if (!bulletList) {
@@ -96,4 +97,79 @@ export var joinSiblingLists = function joinSiblingLists(_ref) {
96
97
  tr.join(joins[i]);
97
98
  }
98
99
  return result;
100
+ };
101
+
102
+ /**
103
+ * Returns the prosemirror position for the child at give index inside the parent node.
104
+ * Example: Considering doc structure as below using the function
105
+ * passing parent resolved position for li and index 2
106
+ * would return starting position of taskList
107
+ * DOC STRUCTURE:
108
+ * ol()
109
+ * ( li(
110
+ * p('text'),
111
+ * ul(content),
112
+ * taskList(),
113
+ * )
114
+ * )
115
+ * @param $from Starting resolved position for the parent node of the child we are looking for.
116
+ * @param index Index of the child node we want the position for.
117
+ * @returns
118
+ */
119
+ var findStartPositionOfChildWithIndex = function findStartPositionOfChildWithIndex($from, index) {
120
+ var parent = $from.node();
121
+ var currentPos = $from.pos + 1;
122
+ for (var i = 0; i < index; i++) {
123
+ currentPos += parent.child(i).nodeSize;
124
+ }
125
+ return currentPos;
126
+ };
127
+ var findGrandParentResolvedPos = function findGrandParentResolvedPos(tr, $from) {
128
+ return $from.depth > 2 ? tr.doc.resolve($from.start($from.depth - 2)) : null;
129
+ };
130
+ var findNestedTaskListsIndexAtSameLevel = function findNestedTaskListsIndexAtSameLevel(tr, $from) {
131
+ /*
132
+ Currently our cursor would be inside a pargraph of a list of type numbered/bullet list,
133
+ we need to find the grandparent of the cursor which is the list at same level of taskList.
134
+ We can get the root list item(inside which various lists are being resolved before outdenting) by going one depth above that list.
135
+ */
136
+ var nestedListResolvedPos = findGrandParentResolvedPos(tr, $from);
137
+ var rootListItem = nestedListResolvedPos === null || nestedListResolvedPos === void 0 ? void 0 : nestedListResolvedPos.node(nestedListResolvedPos.depth - 1);
138
+ var nestedTaskListsIndexes = [];
139
+ var rootListItemChildCount = (rootListItem === null || rootListItem === void 0 ? void 0 : rootListItem.childCount) || 0;
140
+ // first child of list item is always paragraph (i = 0) so we start from 1
141
+ for (var i = 1; i < rootListItemChildCount; i++) {
142
+ if ((rootListItem === null || rootListItem === void 0 ? void 0 : rootListItem.child(i).type.name) === 'taskList') {
143
+ nestedTaskListsIndexes.push(i);
144
+ }
145
+ }
146
+ return nestedTaskListsIndexes;
147
+ };
148
+ export var processNestedTaskListsInSameLevel = function processNestedTaskListsInSameLevel(tr) {
149
+ var $from = tr.selection.$from;
150
+ var nestedTaskListIndexes = findNestedTaskListsIndexAtSameLevel(tr, $from);
151
+ if (nestedTaskListIndexes.length === 0) {
152
+ return;
153
+ }
154
+ var nestedListResolvedPos = findGrandParentResolvedPos(tr, $from);
155
+ var rootListItemStart = nestedListResolvedPos === null || nestedListResolvedPos === void 0 ? void 0 : nestedListResolvedPos.start(nestedListResolvedPos.depth - 1);
156
+
157
+ /* We need not wrap the taskList present above other lists since it doesn't affect the flow. */
158
+ var nestedTaskListIndexesToWrap = nestedTaskListIndexes.filter(function (index) {
159
+ return index > 1;
160
+ });
161
+
162
+ /*
163
+ Wraps the taskLists present at each index mentioned in the nestedTaskListIndexesToWrap to the list above it.
164
+ After each wrap the indexes changes since two lists are being merged into one,
165
+ so we keep track of it and use it to access actual calculated taskList indexes.
166
+ */
167
+ if (rootListItemStart) {
168
+ var taskListsFixedNested = 0;
169
+ nestedTaskListIndexesToWrap.forEach(function (index) {
170
+ wrapTaskListIntoListAbove(tr, findStartPositionOfChildWithIndex(tr.doc.resolve(rootListItemStart), index - taskListsFixedNested), findStartPositionOfChildWithIndex(tr.doc.resolve(rootListItemStart), index - 1 - taskListsFixedNested));
171
+ taskListsFixedNested++;
172
+ });
173
+ }
174
+ return;
99
175
  };
@@ -1,3 +1,4 @@
1
+ import { Fragment } from '@atlaskit/editor-prosemirror/model';
1
2
  import { ReplaceAroundStep, ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
2
3
  export var moveTargetIntoList = function moveTargetIntoList(_ref) {
3
4
  var _$target$nodeAfter;
@@ -14,4 +15,27 @@ export var moveTargetIntoList = function moveTargetIntoList(_ref) {
14
15
  }
15
16
  var step = new ReplaceAroundStep(from, to, gapFrom, gapTo, $target.doc.slice(insertPosition, $target.pos), 0, true);
16
17
  return step;
18
+ };
19
+ export var wrapTaskListIntoListAbove = function wrapTaskListIntoListAbove(tr, taskListStart, previousListStart) {
20
+ var $taskListStart = tr.doc.resolve(taskListStart);
21
+
22
+ /* Safecheck: if not passed a taskList node, return */
23
+ if ($taskListStart.node().type.name !== 'taskList') {
24
+ return;
25
+ }
26
+ var $previousListStart = tr.doc.resolve(previousListStart);
27
+ var taskList = tr.doc.slice($taskListStart.pos, $taskListStart.after());
28
+ var frag = Fragment.from(taskList.content);
29
+
30
+ /*
31
+ Delete the existing taskList at the same level and insert inside above list provided
32
+ 1. To delete the tasklist, we need wrapping positions before and after it to completely delete it.
33
+ $taskListStart.after() would give us closing position enclosed by node itself using it would remove only the contents of taskList
34
+ so we add 1 to it to get the position after the taskList node and completly remove it.
35
+ 2. Inserting the taskList at the end() position safe inserts the taskList to next available position which would lead to deleting and inserting taskList at same place.
36
+ Reason: $previousListStart.end() gives us end position of listItem but we can add content only inside listItem not at same level
37
+ so we subtract 1 to get the position inside the list item and insert the TaskList same level as paragraph/content inside listItem.
38
+ */
39
+ tr.delete($taskListStart.before(), $taskListStart.after() + 1);
40
+ tr.insert($previousListStart.end() - 1, frag);
17
41
  };
@@ -0,0 +1,9 @@
1
+ export { mediaLinkToolbarMessages } from './messages/mediaLinkingToolbar';
2
+ export { imageBorderMessages } from './messages/imageBorder';
3
+ export { nodeViewsMessages } from './messages/nodeviews';
4
+ export { pixelEntryMessages } from './messages/pixelEntry';
5
+ export { toolbarMediaMessages } from './messages/toolbarMedia';
6
+ export { captionMessages } from './messages/caption';
7
+ export { dropPlaceholderMessages } from './messages/dropPlaceholder';
8
+ export { altTextMessages } from './messages/altText';
9
+ export { mediaResizeAnnouncerMessMessages } from './messages/mediaResizeAnnouncerMess';
@@ -0,0 +1,38 @@
1
+ import { defineMessages } from 'react-intl-next';
2
+ export var altTextMessages = defineMessages({
3
+ altText: {
4
+ id: 'fabric.editor.addAltText',
5
+ defaultMessage: 'Alt text',
6
+ description: 'Add an alt text for this image'
7
+ },
8
+ editAltText: {
9
+ id: 'fabric.editor.editAltText',
10
+ defaultMessage: 'Edit alt text',
11
+ description: 'Edit an alt text for this image'
12
+ },
13
+ back: {
14
+ id: 'fabric.editor.closeAltTextEdit',
15
+ defaultMessage: 'Back',
16
+ description: 'Back to toolbar'
17
+ },
18
+ clear: {
19
+ id: 'fabric.editor.clearAltTextEdit',
20
+ defaultMessage: 'Clear alt text',
21
+ description: 'Clear alt text'
22
+ },
23
+ placeholder: {
24
+ id: 'fabric.editor.placeholderAltText',
25
+ defaultMessage: 'Describe this image with alt text',
26
+ description: 'Describe this image with alt text'
27
+ },
28
+ supportText: {
29
+ id: 'fabric.editor.supportAltText',
30
+ defaultMessage: 'Alt text is useful for people using screen readers because of visual limitations.',
31
+ description: 'Alt text is useful for people using screen readers because of visual limitations.'
32
+ },
33
+ validationMessage: {
34
+ id: 'fabric.editor.alttext.validation',
35
+ defaultMessage: 'Please remove any special characters in alt text.',
36
+ description: 'Please remove any special characters in alt text. '
37
+ }
38
+ });
@@ -0,0 +1,8 @@
1
+ import { defineMessages } from 'react-intl-next';
2
+ export var captionMessages = defineMessages({
3
+ placeholder: {
4
+ id: 'fabric.editor.captionPlaceholder',
5
+ defaultMessage: 'Add a caption',
6
+ description: 'Placeholder description for an empty (new) caption in the editor'
7
+ }
8
+ });
@@ -0,0 +1,8 @@
1
+ import { defineMessages } from 'react-intl-next';
2
+ export var dropPlaceholderMessages = defineMessages({
3
+ dropPlaceholderLabel: {
4
+ id: 'fabric.editor.dropPlaceholderLabel',
5
+ defaultMessage: 'Document',
6
+ description: 'document label for an media icon'
7
+ }
8
+ });
@@ -0,0 +1,43 @@
1
+ import { defineMessages } from 'react-intl-next';
2
+ export var imageBorderMessages = defineMessages({
3
+ borderColor: {
4
+ id: 'fabric.editor.imageBorderColor',
5
+ defaultMessage: 'Color',
6
+ description: 'Change the border color of an image.'
7
+ },
8
+ borderSize: {
9
+ id: 'fabric.editor.imageBorderSize',
10
+ defaultMessage: 'Size',
11
+ description: 'Change the border size of an image.'
12
+ },
13
+ addBorder: {
14
+ id: 'fabric.editor.addImageBorder',
15
+ defaultMessage: 'Add border',
16
+ description: 'Add a border to an image.'
17
+ },
18
+ removeBorder: {
19
+ id: 'fabric.editor.removeImageBorder',
20
+ defaultMessage: 'Remove border',
21
+ description: 'Remove the border of an image.'
22
+ },
23
+ borderOptions: {
24
+ id: 'fabric.editor.imageBorderOptions',
25
+ defaultMessage: 'Border options',
26
+ description: 'Display options available for customizing the border of an image.'
27
+ },
28
+ borderSizeSubtle: {
29
+ id: 'fabric.editor.imageBorderSubtle',
30
+ defaultMessage: 'Subtle',
31
+ description: 'Name of a border size.'
32
+ },
33
+ borderSizeMedium: {
34
+ id: 'fabric.editor.imageBorderMedium',
35
+ defaultMessage: 'Medium',
36
+ description: 'Name of a border size.'
37
+ },
38
+ borderSizeBold: {
39
+ id: 'fabric.editor.imageBorderBold',
40
+ defaultMessage: 'Bold',
41
+ description: 'Name of a border size.'
42
+ }
43
+ });
@@ -0,0 +1,8 @@
1
+ import { defineMessages } from 'react-intl-next';
2
+ export var mediaLinkToolbarMessages = defineMessages({
3
+ backLink: {
4
+ id: 'fabric.editor.backLink',
5
+ defaultMessage: 'Go back',
6
+ description: 'Go back from media linking toolbar to main toolbar'
7
+ }
8
+ });
@@ -0,0 +1,28 @@
1
+ import { defineMessages } from 'react-intl-next';
2
+ export var mediaResizeAnnouncerMessMessages = defineMessages({
3
+ MediaWidthIsMax: {
4
+ id: 'fabric.editor.media.pixelEntry.MediaWidthIsMax',
5
+ defaultMessage: 'Media increased to the maximum size',
6
+ description: 'The media has the maximum allowed width'
7
+ },
8
+ MediaWidthIsMin: {
9
+ id: 'fabric.editor.media.MediaWidthIsMin',
10
+ defaultMessage: 'Media decreased to the minimum size',
11
+ description: 'The media has the minimum allowed width'
12
+ },
13
+ DefaultMediaWidth: {
14
+ id: 'fabric.editor.media.DefaultMediaWidth',
15
+ defaultMessage: 'Media width {action} to {newMediaWidth} pixels.',
16
+ description: 'Media width {action} to {newMediaWidth} pixels.'
17
+ },
18
+ IncreasedAction: {
19
+ id: 'fabric.editor.media.increased',
20
+ defaultMessage: 'increased',
21
+ description: 'Increased action'
22
+ },
23
+ DecreasedAction: {
24
+ id: 'fabric.editor.media.decreased',
25
+ defaultMessage: 'decreased',
26
+ description: 'Decreased action'
27
+ }
28
+ });
@@ -0,0 +1,8 @@
1
+ import { defineMessages } from 'react-intl-next';
2
+ export var nodeViewsMessages = defineMessages({
3
+ mediaGroupDeleteLabel: {
4
+ id: 'fabric.editor.mediaGroupDeleteLabel',
5
+ defaultMessage: 'delete',
6
+ description: 'a label for an icon that deletes media'
7
+ }
8
+ });