@seafile/sdoc-editor 1.0.62 → 1.0.64

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 (29) hide show
  1. package/dist/basic-sdk/assets/css/sdoc-editor-plugins.css +1 -0
  2. package/dist/basic-sdk/editor/editable-article.js +2 -1
  3. package/dist/basic-sdk/extension/commons/color-menu/index.js +2 -0
  4. package/dist/basic-sdk/extension/commons/menu/menu-item.js +3 -1
  5. package/dist/basic-sdk/extension/commons/more-dropdown/index.js +1 -0
  6. package/dist/basic-sdk/extension/constants/menus-config.js +5 -0
  7. package/dist/basic-sdk/extension/plugins/blockquote/menu/index.js +1 -0
  8. package/dist/basic-sdk/extension/plugins/callout/menu/index.js +1 -0
  9. package/dist/basic-sdk/extension/plugins/check-list/menu/index.js +1 -0
  10. package/dist/basic-sdk/extension/plugins/clear-format/menu/index.js +1 -0
  11. package/dist/basic-sdk/extension/plugins/image/hover-menu/index.js +1 -1
  12. package/dist/basic-sdk/extension/plugins/image/render-elem.js +1 -1
  13. package/dist/basic-sdk/extension/plugins/list/menu/index.js +3 -1
  14. package/dist/basic-sdk/extension/plugins/search-replace/menu/index.js +1 -0
  15. package/dist/basic-sdk/extension/plugins/text-align/menu/index.js +1 -0
  16. package/dist/basic-sdk/extension/plugins/text-style/menu/index.js +1 -0
  17. package/dist/basic-sdk/extension/toolbar/header-toolbar/index.js +4 -2
  18. package/dist/basic-sdk/extension/toolbar/header-toolbar/redo-undo.js +2 -0
  19. package/package.json +1 -1
  20. package/public/locales/cs/sdoc-editor.json +1 -1
  21. package/public/locales/de/sdoc-editor.json +1 -1
  22. package/public/locales/en/sdoc-editor.json +1 -1
  23. package/public/locales/es/sdoc-editor.json +1 -1
  24. package/public/locales/es_AR/sdoc-editor.json +1 -1
  25. package/public/locales/es_MX/sdoc-editor.json +1 -1
  26. package/public/locales/fr/sdoc-editor.json +1 -1
  27. package/public/locales/it/sdoc-editor.json +1 -1
  28. package/public/locales/ru/sdoc-editor.json +2 -2
  29. package/public/locales/zh_CN/sdoc-editor.json +1 -1
@@ -86,6 +86,7 @@
86
86
  overflow: hidden;
87
87
  text-overflow: ellipsis;
88
88
  white-space: nowrap;
89
+ caret-color: blue;
89
90
  }
90
91
 
91
92
  .sdoc-editor__article .sdoc-image-content .sdoc-image-caption-input-wrapper::placeholder {
@@ -219,7 +219,8 @@ const EditableArticle = _ref => {
219
219
  onCut: eventProxy.onCut,
220
220
  onCopy: eventProxy.onCopy,
221
221
  onCompositionStart: eventProxy.onCompositionStart,
222
- id: "sdoc-editor"
222
+ id: "sdoc-editor",
223
+ "aria-label": "textbox"
223
224
  })), /*#__PURE__*/_react.default.createElement(_extension.SideToolbar, null), showComment && /*#__PURE__*/_react.default.createElement(_comment.default, {
224
225
  editor: editor,
225
226
  type: "editor"
@@ -19,6 +19,7 @@ var _tooltip = _interopRequireDefault(require("../../../../components/tooltip"))
19
19
  require("./index.css");
20
20
  const ColorMenu = _ref => {
21
21
  let {
22
+ ariaLabel,
22
23
  iconClass,
23
24
  id,
24
25
  isRichEditor,
@@ -107,6 +108,7 @@ const ColorMenu = _ref => {
107
108
  const buttonId = `button-${id}`;
108
109
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("button", {
109
110
  type: "button",
111
+ "aria-label": ariaLabel,
110
112
  className: validClassName,
111
113
  id: buttonId,
112
114
  disabled: disabled
@@ -21,7 +21,8 @@ const MenuItem = _ref => {
21
21
  className,
22
22
  iconClass,
23
23
  id,
24
- text
24
+ text,
25
+ ariaLabel
25
26
  } = _ref;
26
27
  const {
27
28
  t
@@ -41,6 +42,7 @@ const MenuItem = _ref => {
41
42
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("button", {
42
43
  id: id,
43
44
  type: "button",
45
+ "aria-label": ariaLabel,
44
46
  className: validClassName,
45
47
  disabled: disabled,
46
48
  "data-active": isActive,
@@ -26,6 +26,7 @@ const MoreDropdown = _ref => {
26
26
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("button", {
27
27
  className: validClassName,
28
28
  type: "button",
29
+ "aria-label": "more",
29
30
  id: buttonId
30
31
  }, /*#__PURE__*/_react.default.createElement("i", {
31
32
  className: "sdocfont sdoc-more"
@@ -96,21 +96,25 @@ const MENUS_CONFIG_MAP = exports.MENUS_CONFIG_MAP = {
96
96
  id: ITALIC,
97
97
  iconClass: 'sdocfont sdoc-italic',
98
98
  text: 'Italic',
99
+ ariaLabel: 'italic',
99
100
  type: TEXT_STYLE_MAP.ITALIC
100
101
  }, {
101
102
  id: BOLD,
102
103
  iconClass: 'sdocfont sdoc-bold',
103
104
  text: 'Bold',
105
+ ariaLabel: 'bold',
104
106
  type: TEXT_STYLE_MAP.BOLD
105
107
  }, {
106
108
  id: UNDERLINE,
107
109
  iconClass: 'sdocfont sdoc-underline',
108
110
  text: 'Underline',
111
+ ariaLabel: 'underline',
109
112
  type: TEXT_STYLE_MAP.UNDERLINE
110
113
  }, {
111
114
  id: `sdoc-${HIGHLIGHT_COLOR}`,
112
115
  iconClass: 'sdocfont sdoc-highlight-color',
113
116
  text: 'Highlight_color',
117
+ ariaLabel: 'background color',
114
118
  type: TEXT_STYLE_MAP.HIGHLIGHT_COLOR,
115
119
  isColor: true,
116
120
  recentUsedColorsKey: _color.RECENT_USED_HIGHLIGHT_COLORS_KEY,
@@ -119,6 +123,7 @@ const MENUS_CONFIG_MAP = exports.MENUS_CONFIG_MAP = {
119
123
  id: `sdoc-font-${COLOR}`,
120
124
  iconClass: 'sdocfont sdoc-font-color',
121
125
  text: 'Font_color',
126
+ ariaLabel: 'font color',
122
127
  type: TEXT_STYLE_MAP.COLOR,
123
128
  defaultColor: _color.DEFAULT_FONT_COLOR,
124
129
  isColor: true,
@@ -43,6 +43,7 @@ class QuoteMenu extends _react.default.Component {
43
43
  const props = {
44
44
  isRichEditor,
45
45
  className,
46
+ ariaLabel: 'blockquote',
46
47
  ...menuConfig,
47
48
  disabled: this.isDisabled(),
48
49
  isActive: this.isActive(),
@@ -40,6 +40,7 @@ const CalloutMenu = _ref => {
40
40
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_commons.MenuItem, Object.assign({
41
41
  isRichEditor: isRichEditor,
42
42
  className: className,
43
+ ariaLabel: "callout",
43
44
  disabled: (0, _helper.isMenuDisabled)(editor, readonly),
44
45
  isActive: (0, _helper.isMenuActive)(editor),
45
46
  onMouseDown: handleClick
@@ -46,6 +46,7 @@ class CheckListMenu extends _react.default.Component {
46
46
  const props = {
47
47
  isRichEditor,
48
48
  className,
49
+ ariaLabel: 'check list',
49
50
  ...menuConfig,
50
51
  disabled: this.isDisabled(),
51
52
  isActive: this.isActive(),
@@ -24,6 +24,7 @@ const ClearFormatMenu = _ref => {
24
24
  const props = {
25
25
  isRichEditor,
26
26
  className,
27
+ ariaLabel: 'clear',
27
28
  ...menuConfig,
28
29
  disabled: (0, _helpers.isMenuDisabled)(editor, readonly),
29
30
  isActive: false,
@@ -225,7 +225,7 @@ const ImageHoverMenu = _ref => {
225
225
  target: "sdoc_image_caption",
226
226
  placement: "top",
227
227
  fade: true
228
- }, t('Insert_caption')))), /*#__PURE__*/_react.default.createElement("span", {
228
+ }, t('Caption')))), /*#__PURE__*/_react.default.createElement("span", {
229
229
  className: "op-group-item"
230
230
  }, /*#__PURE__*/_react.default.createElement("span", {
231
231
  id: "sdoc_image_full_screen_mode",
@@ -261,7 +261,7 @@ const Image = _ref => {
261
261
  style: {
262
262
  width: (data === null || data === void 0 ? void 0 : data.width) || ((_imageRef$current2 = imageRef.current) === null || _imageRef$current2 === void 0 ? void 0 : _imageRef$current2.clientWidth)
263
263
  },
264
- placeholder: t('Insert_caption'),
264
+ placeholder: t('Caption'),
265
265
  autoComplete: "off",
266
266
  value: caption,
267
267
  onBlur: onSetCaption,
@@ -46,12 +46,14 @@ class ListMenu extends _react.default.Component {
46
46
  const {
47
47
  isRichEditor,
48
48
  className,
49
- type
49
+ type,
50
+ ariaLabel
50
51
  } = this.props;
51
52
  const menuConfig = _constants.MENUS_CONFIG_MAP[type];
52
53
  const props = {
53
54
  isRichEditor,
54
55
  className,
56
+ ariaLabel,
55
57
  ...menuConfig,
56
58
  disabled: this.isDisabled(),
57
59
  isActive: this.isActive(),
@@ -70,6 +70,7 @@ const SearchReplaceMenu = _ref => {
70
70
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_commons.MenuItem, Object.assign({
71
71
  isRichEditor: isRichEditor,
72
72
  className: className,
73
+ ariaLabel: "search",
73
74
  disabled: false,
74
75
  isActive: isOpenPopover,
75
76
  onMouseDown: onMouseDown
@@ -57,6 +57,7 @@ const TextAlignMenu = _ref => {
57
57
  curType = 'align_' + curType;
58
58
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("button", {
59
59
  type: "button",
60
+ "aria-label": "text align",
60
61
  className: validClassName,
61
62
  id: buttonId,
62
63
  disabled: disabled
@@ -93,6 +93,7 @@ const TextStyleMenuList = _ref2 => {
93
93
  let itemProps = {
94
94
  isRichEditor,
95
95
  className,
96
+ ariaLabel: item === null || item === void 0 ? void 0 : item.ariaLabel,
96
97
  disabled: isDisabled(),
97
98
  isActive: isActive(item.type),
98
99
  onMouseDown: item.isColor ? () => {} : onMouseDown
@@ -55,11 +55,13 @@ const HeaderToolbar = _ref => {
55
55
  }), /*#__PURE__*/_react.default.createElement(_menu2.default, {
56
56
  editor: editor,
57
57
  type: _constants.UNORDERED_LIST,
58
- readonly: readonly
58
+ readonly: readonly,
59
+ ariaLabel: "unordered list"
59
60
  }), /*#__PURE__*/_react.default.createElement(_menu2.default, {
60
61
  editor: editor,
61
62
  type: _constants.ORDERED_LIST,
62
- readonly: readonly
63
+ readonly: readonly,
64
+ ariaLabel: "ordered list"
63
65
  }), /*#__PURE__*/_react.default.createElement(_menu4.default, {
64
66
  editor: editor,
65
67
  readonly: readonly
@@ -49,6 +49,7 @@ class HistoryMenu extends _react.default.Component {
49
49
  const undoProps = {
50
50
  isRichEditor,
51
51
  className,
52
+ ariaLabel: 'undo',
52
53
  ...undoConfig,
53
54
  disabled: this.isDisabled(_constants.UNDO),
54
55
  isActive: false,
@@ -57,6 +58,7 @@ class HistoryMenu extends _react.default.Component {
57
58
  const redoProps = {
58
59
  isRichEditor,
59
60
  className,
61
+ ariaLabel: 'redo',
60
62
  ...redoConfig,
61
63
  disabled: this.isDisabled(_constants.REDO),
62
64
  isActive: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "1.0.62",
3
+ "version": "1.0.64",
4
4
  "private": false,
5
5
  "description": "This is a sdoc editor",
6
6
  "main": "dist/index.js",
@@ -397,7 +397,7 @@
397
397
  "Published": "Zveřejněné",
398
398
  "Delete_Successfully": "Delete Successfully",
399
399
  "Delete_failed": "Smazání se nezdařilo",
400
- "Insert_caption": "Insert caption",
400
+ "Caption": "Caption",
401
401
  "No_collaborators_available": "No_collaborators_available",
402
402
  "Search_collaborator": "Search collaborator",
403
403
  "Doc_comments": "Document comments",
@@ -397,7 +397,7 @@
397
397
  "Published": "Veröffentlicht",
398
398
  "Delete_Successfully": "Delete Successfully",
399
399
  "Delete_failed": "Löschen fehlgeschlagen",
400
- "Insert_caption": "Insert caption",
400
+ "Caption": "Caption",
401
401
  "No_collaborators_available": "No_collaborators_available",
402
402
  "Search_collaborator": "Search collaborator",
403
403
  "Doc_comments": "Document comments",
@@ -397,7 +397,7 @@
397
397
  "Published": "Published",
398
398
  "Delete_Successfully": "Delete Successfully",
399
399
  "Delete_failed": "Delete failed",
400
- "Insert_caption": "Insert caption",
400
+ "Caption": "Caption",
401
401
  "No_collaborators_available": "No_collaborators_available",
402
402
  "Search_collaborator": "Search collaborator",
403
403
  "Doc_comments": "Document comments",
@@ -397,7 +397,7 @@
397
397
  "Published": "Publicado",
398
398
  "Delete_Successfully": "Delete Successfully",
399
399
  "Delete_failed": "Eliminar falló",
400
- "Insert_caption": "Insert caption",
400
+ "Caption": "Caption",
401
401
  "No_collaborators_available": "No_collaborators_available",
402
402
  "Search_collaborator": "Search collaborator",
403
403
  "Doc_comments": "Document comments",
@@ -397,7 +397,7 @@
397
397
  "Published": "Publicado",
398
398
  "Delete_Successfully": "Delete Successfully",
399
399
  "Delete_failed": "Eliminar falló",
400
- "Insert_caption": "Insert caption",
400
+ "Caption": "Caption",
401
401
  "No_collaborators_available": "No_collaborators_available",
402
402
  "Search_collaborator": "Search collaborator",
403
403
  "Doc_comments": "Document comments",
@@ -397,7 +397,7 @@
397
397
  "Published": "Publicado",
398
398
  "Delete_Successfully": "Delete Successfully",
399
399
  "Delete_failed": "Eliminar falló",
400
- "Insert_caption": "Insert caption",
400
+ "Caption": "Caption",
401
401
  "No_collaborators_available": "No_collaborators_available",
402
402
  "Search_collaborator": "Search collaborator",
403
403
  "Doc_comments": "Document comments",
@@ -397,7 +397,7 @@
397
397
  "Published": "Publié",
398
398
  "Delete_Successfully": "Delete Successfully",
399
399
  "Delete_failed": "Échec de la suppression",
400
- "Insert_caption": "Insert caption",
400
+ "Caption": "Caption",
401
401
  "No_collaborators_available": "No_collaborators_available",
402
402
  "Search_collaborator": "Search collaborator",
403
403
  "Doc_comments": "Document comments",
@@ -397,7 +397,7 @@
397
397
  "Published": "Pubblicato",
398
398
  "Delete_Successfully": "Delete Successfully",
399
399
  "Delete_failed": "Rimozione fallita",
400
- "Insert_caption": "Insert caption",
400
+ "Caption": "Caption",
401
401
  "No_collaborators_available": "No_collaborators_available",
402
402
  "Search_collaborator": "Search collaborator",
403
403
  "Doc_comments": "Document comments",
@@ -397,7 +397,7 @@
397
397
  "Published": "Опубликовано",
398
398
  "Delete_Successfully": "Удалено",
399
399
  "Delete_failed": "Не удалось удалить",
400
- "Insert_caption": "Вставить подпись",
400
+ "Caption": "Caption",
401
401
  "No_collaborators_available": "Нет доступных соавторов",
402
402
  "Search_collaborator": "Поиск соавтора",
403
403
  "Doc_comments": "Комментарии к документу",
@@ -562,5 +562,5 @@
562
562
  "the_past_year": "в прошлом году",
563
563
  "the_next_numbers_of_days": "ближайшее количество дней",
564
564
  "the_past_numbers_of_days": "прошедшее количество дней",
565
- "Double_click_to_enter_edit_mode_and_adjust_field_width" : "Double click to enter edit mode and adjust field width"
565
+ "Double_click_to_enter_edit_mode_and_adjust_field_width" : "Дважды щелкните, чтобы войти в режим редактирования и отрегулировать ширину поля"
566
566
  }
@@ -397,7 +397,7 @@
397
397
  "Published": "已发布",
398
398
  "Delete_Successfully": "删除成功",
399
399
  "Delete_failed": "删除失败",
400
- "Insert_caption": "插入标题",
400
+ "Caption": "标题",
401
401
  "No_collaborators_available": "没有找到协作人",
402
402
  "Search_collaborator": "查找协作人",
403
403
  "Doc_comments": "文档评论",