@seafile/sdoc-editor 1.0.170 → 1.0.172-alpha-3
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/dist/api/seafile-api.js +2 -2
- package/dist/basic-sdk/extension/commons/file-insert-dialog/index.js +50 -48
- package/dist/basic-sdk/extension/commons/file-insert-dialog/style.css +20 -8
- package/dist/basic-sdk/extension/commons/insert-element-dialog/index.js +15 -6
- package/dist/basic-sdk/extension/commons/select-file-dialog/index.css +68 -0
- package/dist/basic-sdk/extension/commons/select-file-dialog/index.js +63 -2
- package/dist/basic-sdk/extension/commons/select-file-dialog/local-files/index.js +21 -4
- package/dist/basic-sdk/extension/commons/wiki-file-insert-dialog/index.js +274 -0
- package/dist/basic-sdk/extension/commons/wiki-file-insert-dialog/style.css +116 -0
- package/dist/basic-sdk/extension/plugins/file-link/helpers.js +1 -1
- package/dist/basic-sdk/extension/plugins/header/helpers.js +17 -1
- package/dist/basic-sdk/extension/plugins/quick-insert/helper.js +13 -2
- package/dist/basic-sdk/extension/plugins/quick-insert/render-elem.js +4 -3
- package/dist/basic-sdk/extension/plugins/sdoc-link/helpers.js +26 -1
- package/dist/basic-sdk/extension/plugins/sdoc-link/render/render-elem.js +10 -2
- package/dist/basic-sdk/extension/plugins/wiki-link/helpers.js +11 -9
- package/dist/context.js +4 -0
- package/dist/utils/index.js +20 -2
- package/package.json +1 -1
- package/public/locales/cs/sdoc-editor.json +4 -1
- package/public/locales/de/sdoc-editor.json +4 -1
- package/public/locales/en/sdoc-editor.json +4 -1
- package/public/locales/es/sdoc-editor.json +4 -1
- package/public/locales/es_AR/sdoc-editor.json +4 -1
- package/public/locales/es_MX/sdoc-editor.json +4 -1
- package/public/locales/fr/sdoc-editor.json +4 -1
- package/public/locales/it/sdoc-editor.json +4 -1
- package/public/locales/ru/sdoc-editor.json +4 -1
- package/public/locales/zh_CN/sdoc-editor.json +5 -2
package/dist/utils/index.js
CHANGED
|
@@ -25,7 +25,7 @@ Object.defineProperty(exports, "getEventTransfer", {
|
|
|
25
25
|
return _getEventTransfer.default;
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
|
-
exports.resetWebTitle = exports.isMobile = exports.isMac = exports.isEnglish = exports.getSelectionCoords = exports.getImageFileNameWithTimestamp = void 0;
|
|
28
|
+
exports.resetWebTitle = exports.isMobile = exports.isMac = exports.isEnglish = exports.getSelectionCoords = exports.getMaximumCapacity = exports.getImageFileNameWithTimestamp = void 0;
|
|
29
29
|
var _dateUtils = _interopRequireDefault(require("./date-utils"));
|
|
30
30
|
var _localStorageUtils = _interopRequireDefault(require("./local-storage-utils"));
|
|
31
31
|
var _context = _interopRequireDefault(require("../context"));
|
|
@@ -152,4 +152,22 @@ const isEnglish = str => {
|
|
|
152
152
|
}
|
|
153
153
|
return false;
|
|
154
154
|
};
|
|
155
|
-
exports.isEnglish = isEnglish;
|
|
155
|
+
exports.isEnglish = isEnglish;
|
|
156
|
+
const getMaximumCapacity = files => {
|
|
157
|
+
const containerMaxHeight = 350;
|
|
158
|
+
const containerTop = 40;
|
|
159
|
+
const containerBottom = 32;
|
|
160
|
+
const containerMore = 32;
|
|
161
|
+
const availableHeight = containerMaxHeight - containerTop - containerBottom - containerMore;
|
|
162
|
+
let allHeight = 0;
|
|
163
|
+
const newFiles = [];
|
|
164
|
+
files.forEach(file => {
|
|
165
|
+
const itemHeight = file !== null && file !== void 0 && file.path ? 51 : 32;
|
|
166
|
+
allHeight = allHeight + itemHeight;
|
|
167
|
+
if (allHeight <= availableHeight) {
|
|
168
|
+
newFiles.push(file);
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
return newFiles;
|
|
172
|
+
};
|
|
173
|
+
exports.getMaximumCapacity = getMaximumCapacity;
|
package/package.json
CHANGED
|
@@ -575,5 +575,8 @@
|
|
|
575
575
|
"Video": "Video",
|
|
576
576
|
"Upload_local_video": "Upload_local_video",
|
|
577
577
|
"The_current_version_does_not_support_>5MB_video_file": "The_current_version_does_not_support_>5MB_video_file",
|
|
578
|
-
"Token_expired_Please_refresh_the_page": "Token expired. Please refresh the page."
|
|
578
|
+
"Token_expired_Please_refresh_the_page": "Token expired. Please refresh the page.",
|
|
579
|
+
"Link_to_page": "Link to page",
|
|
580
|
+
"No_page_results": "No page results",
|
|
581
|
+
"Page": "Page"
|
|
579
582
|
}
|
|
@@ -575,5 +575,8 @@
|
|
|
575
575
|
"Video": "Video",
|
|
576
576
|
"Upload_local_video": "Upload_local_video",
|
|
577
577
|
"The_current_version_does_not_support_>5MB_video_file": "The_current_version_does_not_support_>5MB_video_file",
|
|
578
|
-
"Token_expired_Please_refresh_the_page": "Token expired. Please refresh the page."
|
|
578
|
+
"Token_expired_Please_refresh_the_page": "Token expired. Please refresh the page.",
|
|
579
|
+
"Link_to_page": "Link to page",
|
|
580
|
+
"No_page_results": "No page results",
|
|
581
|
+
"Page": "Page"
|
|
579
582
|
}
|
|
@@ -575,5 +575,8 @@
|
|
|
575
575
|
"Video": "Video",
|
|
576
576
|
"Upload_local_video": "Upload_local_video",
|
|
577
577
|
"The_current_version_does_not_support_>5MB_video_file": "The_current_version_does_not_support_>5MB_video_file",
|
|
578
|
-
"Token_expired_Please_refresh_the_page": "Token expired. Please refresh the page."
|
|
578
|
+
"Token_expired_Please_refresh_the_page": "Token expired. Please refresh the page.",
|
|
579
|
+
"Link_to_page": "Link to page",
|
|
580
|
+
"No_page_results": "No page results",
|
|
581
|
+
"Page": "Page"
|
|
579
582
|
}
|
|
@@ -575,5 +575,8 @@
|
|
|
575
575
|
"Video": "Video",
|
|
576
576
|
"Upload_local_video": "Upload_local_video",
|
|
577
577
|
"The_current_version_does_not_support_>5MB_video_file": "The_current_version_does_not_support_>5MB_video_file",
|
|
578
|
-
"Token_expired_Please_refresh_the_page": "Token expired. Please refresh the page."
|
|
578
|
+
"Token_expired_Please_refresh_the_page": "Token expired. Please refresh the page.",
|
|
579
|
+
"Link_to_page": "Link to page",
|
|
580
|
+
"No_page_results": "No page results",
|
|
581
|
+
"Page": "Page"
|
|
579
582
|
}
|
|
@@ -575,5 +575,8 @@
|
|
|
575
575
|
"Video": "Video",
|
|
576
576
|
"Upload_local_video": "Upload_local_video",
|
|
577
577
|
"The_current_version_does_not_support_>5MB_video_file": "The_current_version_does_not_support_>5MB_video_file",
|
|
578
|
-
"Token_expired_Please_refresh_the_page": "Token expired. Please refresh the page."
|
|
578
|
+
"Token_expired_Please_refresh_the_page": "Token expired. Please refresh the page.",
|
|
579
|
+
"Link_to_page": "Link to page",
|
|
580
|
+
"No_page_results": "No page results",
|
|
581
|
+
"Page": "Page"
|
|
579
582
|
}
|
|
@@ -575,5 +575,8 @@
|
|
|
575
575
|
"Video": "Video",
|
|
576
576
|
"Upload_local_video": "Upload_local_video",
|
|
577
577
|
"The_current_version_does_not_support_>5MB_video_file": "The_current_version_does_not_support_>5MB_video_file",
|
|
578
|
-
"Token_expired_Please_refresh_the_page": "Token expired. Please refresh the page."
|
|
578
|
+
"Token_expired_Please_refresh_the_page": "Token expired. Please refresh the page.",
|
|
579
|
+
"Link_to_page": "Link to page",
|
|
580
|
+
"No_page_results": "No page results",
|
|
581
|
+
"Page": "Page"
|
|
579
582
|
}
|
|
@@ -575,5 +575,8 @@
|
|
|
575
575
|
"Video": "Vidéo",
|
|
576
576
|
"Upload_local_video": "Upload_local_video",
|
|
577
577
|
"The_current_version_does_not_support_>5MB_video_file": "The_current_version_does_not_support_>5MB_video_file",
|
|
578
|
-
"Token_expired_Please_refresh_the_page": "Token expired. Please refresh the page."
|
|
578
|
+
"Token_expired_Please_refresh_the_page": "Token expired. Please refresh the page.",
|
|
579
|
+
"Link_to_page": "Link to page",
|
|
580
|
+
"No_page_results": "No page results",
|
|
581
|
+
"Page": "Page"
|
|
579
582
|
}
|
|
@@ -575,5 +575,8 @@
|
|
|
575
575
|
"Video": "Video",
|
|
576
576
|
"Upload_local_video": "Upload_local_video",
|
|
577
577
|
"The_current_version_does_not_support_>5MB_video_file": "The_current_version_does_not_support_>5MB_video_file",
|
|
578
|
-
"Token_expired_Please_refresh_the_page": "Token expired. Please refresh the page."
|
|
578
|
+
"Token_expired_Please_refresh_the_page": "Token expired. Please refresh the page.",
|
|
579
|
+
"Link_to_page": "Link to page",
|
|
580
|
+
"No_page_results": "No page results",
|
|
581
|
+
"Page": "Page"
|
|
579
582
|
}
|
|
@@ -575,5 +575,8 @@
|
|
|
575
575
|
"Video": "Видео",
|
|
576
576
|
"Upload_local_video": "Загрузка_локального_видео",
|
|
577
577
|
"The_current_version_does_not_support_>5MB_video_file": "Текущая_версия_не_поддерживает_видео_файл_>5_МБ",
|
|
578
|
-
"Token_expired_Please_refresh_the_page": "
|
|
578
|
+
"Token_expired_Please_refresh_the_page": "Срок действия токена истек. Обновите страницу.",
|
|
579
|
+
"Link_to_page": "Ссылка на страницу",
|
|
580
|
+
"No_page_results": "No page results",
|
|
581
|
+
"Page": "Page"
|
|
579
582
|
}
|
|
@@ -247,7 +247,7 @@
|
|
|
247
247
|
"Server_is_disconnected_Reconnecting": "服务器断开连接。正在重新连接...",
|
|
248
248
|
"Server_is_reconnected": "服务器已重新连接。",
|
|
249
249
|
"Outline": "目录",
|
|
250
|
-
"Headings_you_add_to_the_document_will_appear_here": "
|
|
250
|
+
"Headings_you_add_to_the_document_will_appear_here": "你添加到文档中的标题将显示在此处",
|
|
251
251
|
"Open_parent_folder": "打开父目录",
|
|
252
252
|
"Redo": "重做",
|
|
253
253
|
"Undo": "撤销",
|
|
@@ -575,5 +575,8 @@
|
|
|
575
575
|
"Video": "视频",
|
|
576
576
|
"Upload_local_video": "上传本地视频",
|
|
577
577
|
"The_current_version_does_not_support_>5MB_video_file": "当前版本不支持大于 5MB 的视频文件",
|
|
578
|
-
"Token_expired_Please_refresh_the_page": "Token已过期。请刷新页面。"
|
|
578
|
+
"Token_expired_Please_refresh_the_page": "Token已过期。请刷新页面。",
|
|
579
|
+
"Link_to_page": "链接到页面",
|
|
580
|
+
"No_page_results": "没有页面结果",
|
|
581
|
+
"Page": "页面"
|
|
579
582
|
}
|