@seafile/sdoc-editor 1.0.21 → 1.0.23

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.
@@ -39,7 +39,7 @@
39
39
 
40
40
  .sdoc-editor-container .article .sdoc-checkbox-container .sdoc-checkbox-input-wrapper {
41
41
  display: flex;
42
- align-items: baseline;
42
+ align-items: normal;
43
43
  }
44
44
 
45
45
  .sdoc-editor-container .article .sdoc-checkbox-container .sdoc-checkbox-input-wrapper .sdoc-checkbox-input {
@@ -7,7 +7,7 @@ import debounce from '../../../../utils/debounce';
7
7
  import { handleReplaceKeyword, getHighlightInfos, drawHighlights } from '../helper';
8
8
  import ReplaceAllConfirmModal from './replace-all-confirm-modal';
9
9
  import EventBus from '../../../../utils/event-bus';
10
- import { INTERNAL_EVENT } from '../../../../constants';
10
+ import { DOCUMENT_PLUGIN_EDITOR, INTERNAL_EVENT } from '../../../../constants';
11
11
  import context from '../../../../../context';
12
12
  import './index.css';
13
13
  const SearchReplacePopover = _ref => {
@@ -41,10 +41,15 @@ const SearchReplacePopover = _ref => {
41
41
  if (highlightInfos.length) return "".concat(currentSelectIndex + 1, " / ").concat(highlightInfos.length);
42
42
  }, [currentSelectIndex, highlightInfos.length, searchContent.length, t]);
43
43
  useEffect(() => {
44
+ let y = 95;
45
+ if (editor.editorType === DOCUMENT_PLUGIN_EDITOR) {
46
+ y = 201;
47
+ }
44
48
  setPopoverPosition({
45
49
  x: pageInnerSizeRef.current.x - 420,
46
- y: 95
50
+ y
47
51
  });
52
+ // eslint-disable-next-line react-hooks/exhaustive-deps
48
53
  }, []);
49
54
  const isOwnReplacePermission = useMemo(() => {
50
55
  if (readonly) return false;
@@ -23,6 +23,8 @@ export const EMAIL = 'email';
23
23
  export const DURATION = 'duration';
24
24
  export const BUTTON = 'button';
25
25
  export const RATE = 'rate';
26
+ export const DIGITAL_SIGN = 'digital-sign';
27
+ export const DEPARTMENT_SINGLE_SELECT = 'department-single-select';
26
28
 
27
29
  // formula | link-formula column calculate result type
28
30
  export const BOOL = 'bool';
@@ -1,5 +1,5 @@
1
1
  import * as CellType from './cell-types';
2
- export const COLUMNS_ICON_CONFIG = {
2
+ const COLUMNS_ICON_CONFIG = {
3
3
  [CellType.DEFAULT]: 'dtable-font dtable-icon-single-line-text',
4
4
  [CellType.TEXT]: 'dtable-font dtable-icon-single-line-text',
5
5
  [CellType.NUMBER]: 'dtable-font dtable-icon-number',
@@ -24,5 +24,8 @@ export const COLUMNS_ICON_CONFIG = {
24
24
  [CellType.EMAIL]: 'dtable-font dtable-icon-email',
25
25
  [CellType.DURATION]: 'dtable-font dtable-icon-duration',
26
26
  [CellType.BUTTON]: 'dtable-font dtable-icon-button',
27
- [CellType.RATE]: 'dtable-font dtable-icon-rate'
28
- };
27
+ [CellType.RATE]: 'dtable-font dtable-icon-rate',
28
+ [CellType.DIGITAL_SIGN]: 'dtable-font dtable-icon-handwritten-signature',
29
+ [CellType.DEPARTMENT_SINGLE_SELECT]: 'dtable-font dtable-icon-department-single-selection'
30
+ };
31
+ export { COLUMNS_ICON_CONFIG };
@@ -4,6 +4,8 @@
4
4
  background-color: #fff;
5
5
  min-width: 12rem;
6
6
  width: 200px;
7
+ max-height: 500px;
8
+ overflow: auto;
7
9
  }
8
10
 
9
11
  .column-list-menu .column-list-menu-item-container {
@@ -20,6 +22,8 @@
20
22
  .column-list-menu .column-list-menu-item-container .column-list-menu-item .control-icon {
21
23
  margin-right: 10px;
22
24
  flex-shrink: 0;
25
+ font-size: 12px;
26
+ color: #444;
23
27
  }
24
28
 
25
29
  .column-list-menu .column-list-menu-item-container .column-list-menu-item .control-label {
@@ -33,7 +33,6 @@ export default function TableSettings(_ref) {
33
33
  if (timer.current) {
34
34
  clearTimeout(timer.current);
35
35
  }
36
- console.log(updateProperties);
37
36
  timer.current = setTimeout(() => {
38
37
  updateSeaTableTable(editor, updateProperties);
39
38
  }, 300);
@@ -80,11 +79,11 @@ export default function TableSettings(_ref) {
80
79
  alternate_color: value
81
80
  });
82
81
  }, [updatePageSettings]);
83
- const onSelectModuleChange = useCallback(value => {
84
- updatePageSettings({
85
- select_column_display_option_color: value
86
- });
87
- }, [updatePageSettings]);
82
+
83
+ // const onSelectModuleChange = useCallback((value) => {
84
+ // updatePageSettings({ select_column_display_option_color: value });
85
+ // }, [updatePageSettings]);
86
+
88
87
  return /*#__PURE__*/React.createElement("div", {
89
88
  className: "document-seatable-settings-wrapper"
90
89
  }, /*#__PURE__*/React.createElement("div", {
@@ -87,7 +87,7 @@ const InsertToolbar = _ref => {
87
87
  }
88
88
  }, /*#__PURE__*/React.createElement(ImageMenu, props), /*#__PURE__*/React.createElement(TableMenu, props), /*#__PURE__*/React.createElement(LinkMenu, props), /*#__PURE__*/React.createElement(CodeBlockMenu, props), /*#__PURE__*/React.createElement("div", {
89
89
  className: "sdoc-dropdown-menu-divider"
90
- }), editor.columns && /*#__PURE__*/React.createElement(SeaTableColumnMenu, props), editor.tables && /*#__PURE__*/React.createElement(SeaTableTableMenu, props), /*#__PURE__*/React.createElement(SdocLinkMenu, props), /*#__PURE__*/React.createElement(FileLinkMenu, props))));
90
+ }), editor.columns && /*#__PURE__*/React.createElement(SeaTableColumnMenu, props), editor.tables && /*#__PURE__*/React.createElement(SeaTableTableMenu, props), !editor.tables && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SdocLinkMenu, props), /*#__PURE__*/React.createElement(FileLinkMenu, props)))));
91
91
  };
92
92
  InsertToolbar.defaultProps = {
93
93
  isRichEditor: true,
@@ -1,6 +1,7 @@
1
1
  import React, { useEffect, useState } from 'react';
2
2
  import context from '../../context';
3
3
  import { getDiff } from '../utils/diff';
4
+ import InsertElementDialog from '../extension/commons/insert-element-dialog';
4
5
  import SDocViewer from './sdoc-viewer';
5
6
  import Loading from '../../components/loading';
6
7
  import { CollaboratorsProvider } from '../../hooks';
@@ -48,6 +49,8 @@ const RevisionDiffViewer = _ref => {
48
49
  showToolbar: true,
49
50
  showOutline: true,
50
51
  showComment: true
52
+ }), /*#__PURE__*/React.createElement(InsertElementDialog, {
53
+ editor: editor
51
54
  }));
52
55
  };
53
56
  export default RevisionDiffViewer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
4
4
  "private": false,
5
5
  "description": "This is a sdoc editor",
6
6
  "main": "dist/index.js",
@@ -16,7 +16,7 @@
16
16
  "Quote": "Citace",
17
17
  "Ordered_list": "Seřazený seznam",
18
18
  "Unordered_list": "Neseřazený seznam",
19
- "Check_list_item": "Check list item",
19
+ "Check_list": "Check list",
20
20
  "Insert_image": "Insert image",
21
21
  "Insert_formula": "Vložit vzorec",
22
22
  "Formula": "Vzorec",
@@ -16,7 +16,7 @@
16
16
  "Quote": "Blockquote",
17
17
  "Ordered_list": "Nummerierte Liste",
18
18
  "Unordered_list": "Ungeordnete Liste",
19
- "Check_list_item": "Check list item",
19
+ "Check_list": "Check list",
20
20
  "Insert_image": "Insert image",
21
21
  "Insert_formula": "Formel einfügen",
22
22
  "Formula": "Formel",
@@ -16,7 +16,7 @@
16
16
  "Quote": "Cita",
17
17
  "Ordered_list": "Lista ordenada",
18
18
  "Unordered_list": "Lista desordenada",
19
- "Check_list_item": "Check list item",
19
+ "Check_list": "Check list",
20
20
  "Insert_image": "Insert image",
21
21
  "Insert_formula": "Insert formula",
22
22
  "Formula": "Fórmula",
@@ -16,7 +16,7 @@
16
16
  "Quote": "Cita",
17
17
  "Ordered_list": "Lista ordenada",
18
18
  "Unordered_list": "Lista desordenada",
19
- "Check_list_item": "Check list item",
19
+ "Check_list": "Check list",
20
20
  "Insert_image": "Insert image",
21
21
  "Insert_formula": "Insert formula",
22
22
  "Formula": "Fórmula",
@@ -16,7 +16,7 @@
16
16
  "Quote": "Cita",
17
17
  "Ordered_list": "Lista ordenada",
18
18
  "Unordered_list": "Lista desordenada",
19
- "Check_list_item": "Check list item",
19
+ "Check_list": "Check list",
20
20
  "Insert_image": "Insert image",
21
21
  "Insert_formula": "Insert formula",
22
22
  "Formula": "Fórmula",
@@ -16,7 +16,7 @@
16
16
  "Quote": "Blockquote",
17
17
  "Ordered_list": "Liste ordonnée",
18
18
  "Unordered_list": "Liste non ordonnée",
19
- "Check_list_item": "Élément de la liste de vérification",
19
+ "Check_list": "Check list",
20
20
  "Insert_image": "Insérer une image",
21
21
  "Insert_formula": "Insérer formule",
22
22
  "Formula": "Formule",
@@ -16,7 +16,7 @@
16
16
  "Quote": "Citazione",
17
17
  "Ordered_list": "Elenco Ordiniato",
18
18
  "Unordered_list": "Elenco non ordinato",
19
- "Check_list_item": "Check list item",
19
+ "Check_list": "Check list",
20
20
  "Insert_image": "Insert image",
21
21
  "Insert_formula": "Insert formula",
22
22
  "Formula": "Formula",
@@ -16,7 +16,7 @@
16
16
  "Quote": "Цитата",
17
17
  "Ordered_list": "Нумерованный список",
18
18
  "Unordered_list": "Маркированный список",
19
- "Check_list_item": "Элемент контрольного списка",
19
+ "Check_list": "Check list",
20
20
  "Insert_image": "Вставить изображение",
21
21
  "Insert_formula": "Вставить формулу",
22
22
  "Formula": "Формула",
@@ -470,96 +470,96 @@
470
470
  "Select_column_display_option_color_tip": "Цвета параметров отображения столбцов с одиночным и множественным выбором",
471
471
  "Header": "Заголовок",
472
472
  "Remove_icon": "Удалить значок",
473
- "Hide_columns": "Hide columns",
474
- "1_hidden_column": "1 hidden column",
475
- "hidden_columns": "hidden columns",
476
- "Search_column": "Search column",
477
- "No_columns_available_to_be_hidden": "No columns available to be hidden.",
478
- "Hide_all": "Hide all",
479
- "Show_all": "Show all",
480
- "Sort": "Sort",
481
- "1 Sort": "1 sort",
482
- "Sorts": "sorts",
483
- "No_sorts": "No sorts",
484
- "Add_sort": "Add sort",
485
- "No_sort_added": "No sort added",
486
- "up": "Up",
487
- "down": "Down",
488
- "No_results": "No results",
489
- "Filter": "Filter",
490
- "1 Filter": "1 filter",
491
- "Filters": "filters",
492
- "Add_filter": "Add filter",
493
- "No_filters": "No filters",
494
- "And": "And",
495
- "Or": "Or",
496
- "Select_option(s)": "Select option(s)",
497
- "Select_an_option": "Select an option",
498
- "Search_option": "Search option",
499
- "Add_collaborator": "Add collaborator",
500
- "Add_a_creator": "Add a creator",
501
- "Add_a_last_modifier": "Add a last modifier",
502
- "Invalid_filter": "Invalid filter",
503
- "Department_single_select": "Department single select",
504
- "Search_department": "Search department",
505
- "Select_department": "Select department",
506
- "No_departments_available": "No departments available",
507
- "Current_user_department": "Current user's department",
508
- "Current_user_department_and_sub": "Current user's department and sub-departments",
509
- "Deleted_department": "Deleted department",
510
- "Data_settings": "Data settings",
511
- "Style_settings": "Style settings",
512
- "contains": "contains",
513
- "does_not_contain": "does not contain",
514
- "is": "is",
515
- "is_not": "is not",
516
- "equal": "\u003d",
517
- "not_equal": "\u2260",
518
- "less": "\u003C",
519
- "greater": "\u003E",
520
- "less_or_equal": "\u2264",
521
- "greater_or_equal": "\u2265",
522
- "is_empty": "is empty",
523
- "is_not_empty": "is not empty",
524
- "is_within": "is within",
525
- "is_before": "is before",
526
- "is_after": "is after",
527
- "is_on_or_before": "is on or before",
528
- "is_on_or_after": "is on or after",
529
- "has_any_of": "has any of",
530
- "has_all_of": "has all of",
531
- "has_none_of": "has none of",
532
- "is_exactly": "is exactly",
533
- "is_current_user_ID": "is current user's ID",
534
- "Current_date": "Current date",
535
- "Specific_date": "Specific date",
536
- "x_days_before_current_date": "x days before current date",
537
- "x_days_after_current_date": "x days after current date",
538
- "is_any_of": "is any of",
539
- "is_none_of": "is none of",
540
- "include_me": "include the current user",
541
- "today": "today",
542
- "tomorrow": "tomorrow",
543
- "yesterday": "yesterday",
544
- "one_week_ago": "one week ago",
545
- "one_week_from_now": "one week from now",
546
- "one_month_ago": "one month ago",
547
- "one_month_from_now": "one month from now",
548
- "number_of_days_ago": "number of days ago",
549
- "number_of_days_from_now": "number of days from now",
550
- "exact_date": "exact date",
551
- "last_week": "last week",
552
- "last_month": "last month",
553
- "last_year": "last year",
554
- "this_week": "this week",
555
- "this_month": "this month",
556
- "this_year": "this year",
557
- "the_next_week": "the next week",
558
- "the_next_month": "the next month",
559
- "the_next_year": "the next year",
560
- "the_past_week": "last week",
561
- "the_past_month": "last month",
562
- "the_past_year": "last year",
563
- "the_next_numbers_of_days": "the next numbers of days",
564
- "the_past_numbers_of_days": "the past numbers of days"
473
+ "Hide_columns": "Скрыть столбцы",
474
+ "1_hidden_column": "1 скрытый столбец",
475
+ "hidden_columns": "скрытые столбцы",
476
+ "Search_column": "Столбец поиска",
477
+ "No_columns_available_to_be_hidden": "Нет столбцов, доступных для скрытия.",
478
+ "Hide_all": "Скрыть все",
479
+ "Show_all": "Показать все",
480
+ "Sort": "Сортировка",
481
+ "1 Sort": "1 сортировка",
482
+ "Sorts": "сортировки",
483
+ "No_sorts": "Нет сортировок",
484
+ "Add_sort": "Добавить сортировку",
485
+ "No_sort_added": "Сортировка не добавлена",
486
+ "up": "Вверх",
487
+ "down": "Вниз",
488
+ "No_results": "Ничего не найдено",
489
+ "Filter": "Фильтр",
490
+ "1 Filter": "1 фильтр",
491
+ "Filters": "фильтры",
492
+ "Add_filter": "Добавить фильтр",
493
+ "No_filters": "Без фильтров",
494
+ "And": "И",
495
+ "Or": "Или",
496
+ "Select_option(s)": "Выбор опций",
497
+ "Select_an_option": "Выбрать опцию",
498
+ "Search_option": "Способ поиска",
499
+ "Add_collaborator": "Добавить соавтора",
500
+ "Add_a_creator": "Добавить создателя",
501
+ "Add_a_last_modifier": "Добавить последний модификатор",
502
+ "Invalid_filter": "Недопустимый фильтр",
503
+ "Department_single_select": "Отдельный выбор отдела",
504
+ "Search_department": "Поисковый отдел",
505
+ "Select_department": "Выбрать отдел",
506
+ "No_departments_available": "Нет доступных отделов",
507
+ "Current_user_department": "Текущий отдел пользователя",
508
+ "Current_user_department_and_sub": "Отдел и подотделы текущего пользователя",
509
+ "Deleted_department": "Удаленный отдел",
510
+ "Data_settings": "Настройки данных",
511
+ "Style_settings": "Настройки стиля",
512
+ "contains": "содержит",
513
+ "does_not_contain": "не содержит",
514
+ "is": "является",
515
+ "is_not": "не является",
516
+ "equal": "=",
517
+ "not_equal": "",
518
+ "less": "<",
519
+ "greater": ">",
520
+ "less_or_equal": "",
521
+ "greater_or_equal": "",
522
+ "is_empty": "пусто",
523
+ "is_not_empty": "не пусто",
524
+ "is_within": "внутри",
525
+ "is_before": "до",
526
+ "is_after": "после",
527
+ "is_on_or_before": "включен или до этого",
528
+ "is_on_or_after": "включен или после этого",
529
+ "has_any_of": "есть что-нибудь из",
530
+ "has_all_of": "имеет все",
531
+ "has_none_of": "не имеет ни одного из",
532
+ "is_exactly": "это точно",
533
+ "is_current_user_ID": "текущий идентификатор пользователя",
534
+ "Current_date": "Текущая дата",
535
+ "Specific_date": "Конкретная дата",
536
+ "x_days_before_current_date": "x дней до текущей даты",
537
+ "x_days_after_current_date": "x дней после текущей даты",
538
+ "is_any_of": "является каким-либо из",
539
+ "is_none_of": "не является ни одним из",
540
+ "include_me": "включить текущего пользователя",
541
+ "today": "сегодня",
542
+ "tomorrow": "завтра",
543
+ "yesterday": "вчера",
544
+ "one_week_ago": "неделю назад",
545
+ "one_week_from_now": "через неделю",
546
+ "one_month_ago": "месяц назад",
547
+ "one_month_from_now": "через месяц",
548
+ "number_of_days_ago": "количество дней назад",
549
+ "number_of_days_from_now": "количество дней с этого момента",
550
+ "exact_date": "определенная дата",
551
+ "last_week": "на прошлой неделе",
552
+ "last_month": "в прошлом месяце",
553
+ "last_year": "в прошлом году",
554
+ "this_week": "на этой неделе",
555
+ "this_month": "в этом месяце",
556
+ "this_year": "в этом году",
557
+ "the_next_week": "на следующей неделе",
558
+ "the_next_month": "в следующем месяце",
559
+ "the_next_year": "в следующем году",
560
+ "the_past_week": "на прошлой неделе",
561
+ "the_past_month": "в прошлом месяце",
562
+ "the_past_year": "в прошлом году",
563
+ "the_next_numbers_of_days": "ближайшее количество дней",
564
+ "the_past_numbers_of_days": "прошедшее количество дней"
565
565
  }
@@ -16,7 +16,7 @@
16
16
  "Quote": "引用",
17
17
  "Ordered_list": "有序列表",
18
18
  "Unordered_list": "无序列表",
19
- "Check_list_item": "任务列表",
19
+ "Check_list": "任务列表",
20
20
  "Insert_image": "插入图片",
21
21
  "Insert_formula": "插入公式",
22
22
  "Formula": "公式",