@univerjs/docs-quick-insert-ui 0.24.0 → 0.25.0-insiders.20260604-29ebbff
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/lib/cjs/index.js +18 -18
- package/lib/cjs/locale/ar-SA.js +18 -0
- package/lib/cjs/locale/ca-ES.js +1 -1
- package/lib/cjs/locale/de-DE.js +18 -0
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/es-ES.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/id-ID.js +18 -0
- package/lib/cjs/locale/it-IT.js +18 -0
- package/lib/cjs/locale/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.js +1 -1
- package/lib/cjs/locale/pl-PL.js +18 -0
- package/lib/cjs/locale/pt-BR.js +18 -0
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/sk-SK.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-HK.js +18 -0
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/index.js +20 -20
- package/lib/es/locale/ar-SA.js +17 -0
- package/lib/es/locale/ca-ES.js +1 -1
- package/lib/es/locale/de-DE.js +17 -0
- package/lib/es/locale/en-US.js +1 -1
- package/lib/es/locale/es-ES.js +1 -1
- package/lib/es/locale/fa-IR.js +1 -1
- package/lib/es/locale/fr-FR.js +1 -1
- package/lib/es/locale/id-ID.js +17 -0
- package/lib/es/locale/it-IT.js +17 -0
- package/lib/es/locale/ja-JP.js +1 -1
- package/lib/es/locale/ko-KR.js +1 -1
- package/lib/es/locale/pl-PL.js +17 -0
- package/lib/es/locale/pt-BR.js +17 -0
- package/lib/es/locale/ru-RU.js +1 -1
- package/lib/es/locale/sk-SK.js +1 -1
- package/lib/es/locale/vi-VN.js +1 -1
- package/lib/es/locale/zh-CN.js +1 -1
- package/lib/es/locale/zh-HK.js +17 -0
- package/lib/es/locale/zh-TW.js +1 -1
- package/lib/index.js +20 -20
- package/lib/locale/ar-SA.js +17 -0
- package/lib/locale/ca-ES.js +1 -1
- package/lib/locale/de-DE.js +17 -0
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/es-ES.js +1 -1
- package/lib/locale/fa-IR.js +1 -1
- package/lib/locale/fr-FR.js +1 -1
- package/lib/locale/id-ID.js +17 -0
- package/lib/locale/it-IT.js +17 -0
- package/lib/locale/ja-JP.js +1 -1
- package/lib/locale/ko-KR.js +1 -1
- package/lib/locale/pl-PL.js +17 -0
- package/lib/locale/pt-BR.js +17 -0
- package/lib/locale/ru-RU.js +1 -1
- package/lib/locale/sk-SK.js +1 -1
- package/lib/locale/vi-VN.js +1 -1
- package/lib/locale/zh-CN.js +1 -1
- package/lib/locale/zh-HK.js +17 -0
- package/lib/locale/zh-TW.js +1 -1
- package/lib/types/locale/ar-SA.d.ts +18 -0
- package/lib/types/locale/de-DE.d.ts +18 -0
- package/lib/types/locale/en-US.d.ts +1 -1
- package/lib/types/locale/id-ID.d.ts +18 -0
- package/lib/types/locale/it-IT.d.ts +18 -0
- package/lib/types/locale/pl-PL.d.ts +18 -0
- package/lib/types/locale/pt-BR.d.ts +18 -0
- package/lib/types/locale/zh-HK.d.ts +18 -0
- package/lib/types/services/doc-quick-insert-popup.service.d.ts +2 -2
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ar-SA.js +1 -0
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -0
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/id-ID.js +1 -0
- package/lib/umd/locale/it-IT.js +1 -0
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/pl-PL.js +1 -0
- package/lib/umd/locale/pt-BR.js +1 -0
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-HK.js +1 -0
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +14 -14
- package/LICENSE +0 -176
package/lib/cjs/index.js
CHANGED
|
@@ -51,7 +51,7 @@ function measureTextWidth(text, font) {
|
|
|
51
51
|
}
|
|
52
52
|
const KeywordInputPlaceholder = ({ popup }) => {
|
|
53
53
|
var _popup$extraProps$fon, _popup$extraProps, _popup$extraProps$fon2, _popup$extraProps2, _popup$extraProps$asc, _popup$extraProps3, _popup$extraProps$con, _popup$extraProps4, _popup$extraProps5, _popup$extraProps6, _popup$extraProps7;
|
|
54
|
-
const placeholder = (0, _univerjs_ui.useDependency)(_univerjs_core.LocaleService).t("
|
|
54
|
+
const placeholder = (0, _univerjs_ui.useDependency)(_univerjs_core.LocaleService).t("docs-quick-insert-ui.keywordInputPlaceholder");
|
|
55
55
|
const fontSizePx = (0, _univerjs_engine_render.ptToPixel)((_popup$extraProps$fon = (_popup$extraProps = popup.extraProps) === null || _popup$extraProps === void 0 ? void 0 : _popup$extraProps.fontSize) !== null && _popup$extraProps$fon !== void 0 ? _popup$extraProps$fon : DEFAULT_FONT_SIZE);
|
|
56
56
|
const fontString = (_popup$extraProps$fon2 = (_popup$extraProps2 = popup.extraProps) === null || _popup$extraProps2 === void 0 ? void 0 : _popup$extraProps2.fontString) !== null && _popup$extraProps$fon2 !== void 0 ? _popup$extraProps$fon2 : `${fontSizePx}px sans-serif`;
|
|
57
57
|
const ascent = (_popup$extraProps$asc = (_popup$extraProps3 = popup.extraProps) === null || _popup$extraProps3 === void 0 ? void 0 : _popup$extraProps3.ascent) !== null && _popup$extraProps$asc !== void 0 ? _popup$extraProps$asc : fontSizePx;
|
|
@@ -198,7 +198,7 @@ const QuickInsertPlaceholderComponentKey = "docs.quick.insert.placeholder";
|
|
|
198
198
|
const QuickInsertPlaceholder = () => {
|
|
199
199
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
200
200
|
className: "univer-flex univer-h-full univer-items-center univer-justify-center univer-rounded-lg univer-bg-white univer-px-12 univer-py-6 univer-text-gray-400 univer-shadow-lg",
|
|
201
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: (0, _univerjs_ui.useDependency)(_univerjs_core.LocaleService).t("
|
|
201
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: (0, _univerjs_ui.useDependency)(_univerjs_core.LocaleService).t("docs-quick-insert-ui.placeholder") })
|
|
202
202
|
});
|
|
203
203
|
};
|
|
204
204
|
QuickInsertPlaceholder.componentKey = QuickInsertPlaceholderComponentKey;
|
|
@@ -363,7 +363,7 @@ const QuickInsertPopup = () => {
|
|
|
363
363
|
QuickInsertPopup.componentKey = "docs.quick.insert.popup";
|
|
364
364
|
|
|
365
365
|
//#endregion
|
|
366
|
-
//#region \0@oxc-project+runtime@0.
|
|
366
|
+
//#region \0@oxc-project+runtime@0.133.0/helpers/esm/typeof.js
|
|
367
367
|
function _typeof(o) {
|
|
368
368
|
"@babel/helpers - typeof";
|
|
369
369
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -374,7 +374,7 @@ function _typeof(o) {
|
|
|
374
374
|
}
|
|
375
375
|
|
|
376
376
|
//#endregion
|
|
377
|
-
//#region \0@oxc-project+runtime@0.
|
|
377
|
+
//#region \0@oxc-project+runtime@0.133.0/helpers/esm/toPrimitive.js
|
|
378
378
|
function toPrimitive(t, r) {
|
|
379
379
|
if ("object" != _typeof(t) || !t) return t;
|
|
380
380
|
var e = t[Symbol.toPrimitive];
|
|
@@ -387,14 +387,14 @@ function toPrimitive(t, r) {
|
|
|
387
387
|
}
|
|
388
388
|
|
|
389
389
|
//#endregion
|
|
390
|
-
//#region \0@oxc-project+runtime@0.
|
|
390
|
+
//#region \0@oxc-project+runtime@0.133.0/helpers/esm/toPropertyKey.js
|
|
391
391
|
function toPropertyKey(t) {
|
|
392
392
|
var i = toPrimitive(t, "string");
|
|
393
393
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
394
394
|
}
|
|
395
395
|
|
|
396
396
|
//#endregion
|
|
397
|
-
//#region \0@oxc-project+runtime@0.
|
|
397
|
+
//#region \0@oxc-project+runtime@0.133.0/helpers/esm/defineProperty.js
|
|
398
398
|
function _defineProperty(e, r, t) {
|
|
399
399
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
400
400
|
value: t,
|
|
@@ -405,7 +405,7 @@ function _defineProperty(e, r, t) {
|
|
|
405
405
|
}
|
|
406
406
|
|
|
407
407
|
//#endregion
|
|
408
|
-
//#region \0@oxc-project+runtime@0.
|
|
408
|
+
//#region \0@oxc-project+runtime@0.133.0/helpers/esm/decorateParam.js
|
|
409
409
|
function __decorateParam(paramIndex, decorator) {
|
|
410
410
|
return function(target, key) {
|
|
411
411
|
decorator(target, key, paramIndex);
|
|
@@ -413,7 +413,7 @@ function __decorateParam(paramIndex, decorator) {
|
|
|
413
413
|
}
|
|
414
414
|
|
|
415
415
|
//#endregion
|
|
416
|
-
//#region \0@oxc-project+runtime@0.
|
|
416
|
+
//#region \0@oxc-project+runtime@0.133.0/helpers/esm/decorate.js
|
|
417
417
|
function __decorate(decorators, target, key, desc) {
|
|
418
418
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
419
419
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -665,13 +665,13 @@ const CloseQuickInsertPopupOperation = {
|
|
|
665
665
|
//#region src/menu/menu.ts
|
|
666
666
|
const textMenu = {
|
|
667
667
|
id: "quick-insert.text.menu",
|
|
668
|
-
title: "
|
|
668
|
+
title: "docs-quick-insert-ui.menu.text",
|
|
669
669
|
icon: "TextIcon",
|
|
670
670
|
keywords: ["text"]
|
|
671
671
|
};
|
|
672
672
|
const numberedListMenu = {
|
|
673
673
|
id: _univerjs_docs_ui.OrderListCommand.id,
|
|
674
|
-
title: "
|
|
674
|
+
title: "docs-quick-insert-ui.menu.numberedList",
|
|
675
675
|
icon: "OrderIcon",
|
|
676
676
|
keywords: [
|
|
677
677
|
"numbered",
|
|
@@ -681,7 +681,7 @@ const numberedListMenu = {
|
|
|
681
681
|
};
|
|
682
682
|
const bulletedListMenu = {
|
|
683
683
|
id: _univerjs_docs_ui.BulletListCommand.id,
|
|
684
|
-
title: "
|
|
684
|
+
title: "docs-quick-insert-ui.menu.bulletedList",
|
|
685
685
|
icon: "UnorderIcon",
|
|
686
686
|
keywords: [
|
|
687
687
|
"bulleted",
|
|
@@ -691,7 +691,7 @@ const bulletedListMenu = {
|
|
|
691
691
|
};
|
|
692
692
|
const dividerMenu = {
|
|
693
693
|
id: _univerjs_docs_ui.HorizontalLineCommand.id,
|
|
694
|
-
title: "
|
|
694
|
+
title: "docs-quick-insert-ui.menu.divider",
|
|
695
695
|
icon: "DividerIcon",
|
|
696
696
|
keywords: [
|
|
697
697
|
"divider",
|
|
@@ -701,7 +701,7 @@ const dividerMenu = {
|
|
|
701
701
|
};
|
|
702
702
|
const tableMenu = {
|
|
703
703
|
id: _univerjs_docs_ui.DocCreateTableOperation.id,
|
|
704
|
-
title: "
|
|
704
|
+
title: "docs-quick-insert-ui.menu.table",
|
|
705
705
|
icon: "GridIcon",
|
|
706
706
|
keywords: [
|
|
707
707
|
"table",
|
|
@@ -711,7 +711,7 @@ const tableMenu = {
|
|
|
711
711
|
};
|
|
712
712
|
const imageMenu = {
|
|
713
713
|
id: _univerjs_docs_drawing_ui.InsertDocImageCommand.id,
|
|
714
|
-
title: "
|
|
714
|
+
title: "docs-quick-insert-ui.menu.image",
|
|
715
715
|
icon: "AdditionAndSubtractionIcon",
|
|
716
716
|
keywords: [
|
|
717
717
|
"image",
|
|
@@ -720,7 +720,7 @@ const imageMenu = {
|
|
|
720
720
|
]
|
|
721
721
|
};
|
|
722
722
|
const builtInMenus = [{
|
|
723
|
-
title: "
|
|
723
|
+
title: "docs-quick-insert-ui.group.basics",
|
|
724
724
|
id: "quick.insert.group.basic",
|
|
725
725
|
children: [
|
|
726
726
|
textMenu,
|
|
@@ -763,7 +763,7 @@ let DocQuickInsertTriggerController = class DocQuickInsertTriggerController exte
|
|
|
763
763
|
const { _docQuickInsertPopupService, _textSelectionManagerService, _commandService } = this;
|
|
764
764
|
const documentDataModel = this._univerInstanceService.getCurrentUnitOfType(_univerjs_core.UniverInstanceType.UNIVER_DOC);
|
|
765
765
|
if (documentDataModel === null || documentDataModel === void 0 ? void 0 : documentDataModel.getDisabled()) return;
|
|
766
|
-
if (commandInfo.id ===
|
|
766
|
+
if (commandInfo.id === _univerjs_docs.InsertTextCommand.id) {
|
|
767
767
|
const params = commandInfo.params;
|
|
768
768
|
if (_docQuickInsertPopupService.editPopup) {
|
|
769
769
|
_docQuickInsertPopupService.setInputOffset({
|
|
@@ -805,7 +805,7 @@ let DocQuickInsertTriggerController = class DocQuickInsertTriggerController exte
|
|
|
805
805
|
});
|
|
806
806
|
}
|
|
807
807
|
}
|
|
808
|
-
if (commandInfo.id ===
|
|
808
|
+
if (commandInfo.id === _univerjs_docs.DeleteTextCommand.id) {
|
|
809
809
|
const params = commandInfo.params;
|
|
810
810
|
if (_docQuickInsertPopupService.editPopup && params.direction === _univerjs_core.DeleteDirection.LEFT) {
|
|
811
811
|
var _params$len;
|
|
@@ -1001,7 +1001,7 @@ DocQuickInsertUIController = __decorate([
|
|
|
1001
1001
|
//#endregion
|
|
1002
1002
|
//#region package.json
|
|
1003
1003
|
var name = "@univerjs/docs-quick-insert-ui";
|
|
1004
|
-
var version = "0.
|
|
1004
|
+
var version = "0.25.0-insiders.20260604-29ebbff";
|
|
1005
1005
|
|
|
1006
1006
|
//#endregion
|
|
1007
1007
|
//#region src/config/config.ts
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/locale/ar-SA.ts
|
|
3
|
+
const locale = { "docs-quick-insert-ui": {
|
|
4
|
+
menu: {
|
|
5
|
+
numberedList: "قائمة مرقمة",
|
|
6
|
+
bulletedList: "قائمة نقطية",
|
|
7
|
+
divider: "فاصل",
|
|
8
|
+
text: "نص",
|
|
9
|
+
table: "جدول",
|
|
10
|
+
image: "صورة"
|
|
11
|
+
},
|
|
12
|
+
group: { basics: "أساسيات" },
|
|
13
|
+
placeholder: "لم يُعثر على نتائج",
|
|
14
|
+
keywordInputPlaceholder: "أدخل الكلمات المفتاحية"
|
|
15
|
+
} };
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
module.exports = locale;
|
package/lib/cjs/locale/ca-ES.js
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/locale/de-DE.ts
|
|
3
|
+
const locale = { "docs-quick-insert-ui": {
|
|
4
|
+
menu: {
|
|
5
|
+
numberedList: "Nummerierte Liste",
|
|
6
|
+
bulletedList: "Aufzählungsliste",
|
|
7
|
+
divider: "Trennlinie",
|
|
8
|
+
text: "Text",
|
|
9
|
+
table: "Tabelle",
|
|
10
|
+
image: "Bild"
|
|
11
|
+
},
|
|
12
|
+
group: { basics: "Grundlagen" },
|
|
13
|
+
placeholder: "Keine Ergebnisse gefunden",
|
|
14
|
+
keywordInputPlaceholder: "Stichwörter eingeben"
|
|
15
|
+
} };
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
module.exports = locale;
|
package/lib/cjs/locale/en-US.js
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* See the License for the specific language governing permissions and
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
|
-
const locale = {
|
|
18
|
+
const locale = { "docs-quick-insert-ui": {
|
|
19
19
|
menu: {
|
|
20
20
|
numberedList: "Numbered List",
|
|
21
21
|
bulletedList: "Bulleted List",
|
package/lib/cjs/locale/es-ES.js
CHANGED
package/lib/cjs/locale/fa-IR.js
CHANGED
package/lib/cjs/locale/fr-FR.js
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/locale/id-ID.ts
|
|
3
|
+
const locale = { "docs-quick-insert-ui": {
|
|
4
|
+
menu: {
|
|
5
|
+
numberedList: "Daftar Bernomor",
|
|
6
|
+
bulletedList: "Daftar Berpoin",
|
|
7
|
+
divider: "Pembatas",
|
|
8
|
+
text: "Teks",
|
|
9
|
+
table: "Tabel",
|
|
10
|
+
image: "Gambar"
|
|
11
|
+
},
|
|
12
|
+
group: { basics: "Dasar" },
|
|
13
|
+
placeholder: "Tidak ada hasil ditemukan",
|
|
14
|
+
keywordInputPlaceholder: "Masukkan kata kunci"
|
|
15
|
+
} };
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
module.exports = locale;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/locale/it-IT.ts
|
|
3
|
+
const locale = { "docs-quick-insert-ui": {
|
|
4
|
+
menu: {
|
|
5
|
+
numberedList: "Elenco Numerato",
|
|
6
|
+
bulletedList: "Elenco Puntato",
|
|
7
|
+
divider: "Divisore",
|
|
8
|
+
text: "Testo",
|
|
9
|
+
table: "Tabella",
|
|
10
|
+
image: "Immagine"
|
|
11
|
+
},
|
|
12
|
+
group: { basics: "Elementi Base" },
|
|
13
|
+
placeholder: "Nessun risultato trovato",
|
|
14
|
+
keywordInputPlaceholder: "Inserisci parole chiave"
|
|
15
|
+
} };
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
module.exports = locale;
|
package/lib/cjs/locale/ja-JP.js
CHANGED
package/lib/cjs/locale/ko-KR.js
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/locale/pl-PL.ts
|
|
3
|
+
const locale = { "docs-quick-insert-ui": {
|
|
4
|
+
menu: {
|
|
5
|
+
numberedList: "Lista numerowana",
|
|
6
|
+
bulletedList: "Lista punktowana",
|
|
7
|
+
divider: "Separator",
|
|
8
|
+
text: "Tekst",
|
|
9
|
+
table: "Tabela",
|
|
10
|
+
image: "Obraz"
|
|
11
|
+
},
|
|
12
|
+
group: { basics: "Podstawy" },
|
|
13
|
+
placeholder: "Nie znaleziono wyników",
|
|
14
|
+
keywordInputPlaceholder: "Wpisz słowa kluczowe"
|
|
15
|
+
} };
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
module.exports = locale;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/locale/pt-BR.ts
|
|
3
|
+
const locale = { "docs-quick-insert-ui": {
|
|
4
|
+
menu: {
|
|
5
|
+
numberedList: "Lista Numerada",
|
|
6
|
+
bulletedList: "Lista com Marcadores",
|
|
7
|
+
divider: "Divisória",
|
|
8
|
+
text: "Texto",
|
|
9
|
+
table: "Tabela",
|
|
10
|
+
image: "Imagem"
|
|
11
|
+
},
|
|
12
|
+
group: { basics: "Básicos" },
|
|
13
|
+
placeholder: "Nenhum resultado encontrado",
|
|
14
|
+
keywordInputPlaceholder: "Digite palavras-chave"
|
|
15
|
+
} };
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
module.exports = locale;
|
package/lib/cjs/locale/ru-RU.js
CHANGED
package/lib/cjs/locale/sk-SK.js
CHANGED
package/lib/cjs/locale/vi-VN.js
CHANGED
package/lib/cjs/locale/zh-CN.js
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/locale/zh-HK.ts
|
|
3
|
+
const locale = { "docs-quick-insert-ui": {
|
|
4
|
+
menu: {
|
|
5
|
+
numberedList: "有序列表",
|
|
6
|
+
bulletedList: "無序列表",
|
|
7
|
+
divider: "分隔線",
|
|
8
|
+
text: "文本",
|
|
9
|
+
table: "表格",
|
|
10
|
+
image: "圖片"
|
|
11
|
+
},
|
|
12
|
+
group: { basics: "基礎" },
|
|
13
|
+
placeholder: "無結果",
|
|
14
|
+
keywordInputPlaceholder: "輸入關鍵詞"
|
|
15
|
+
} };
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
module.exports = locale;
|
package/lib/cjs/locale/zh-TW.js
CHANGED
package/lib/es/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CommandType, DeleteDirection, DependentOn, Direction, Disposable, DisposableCollection, ICommandService, IConfigService, IUniverInstanceService, Inject, Injector, LocaleService, Plugin, RANGE_DIRECTION, UniverInstanceType, generateRandomId, merge, toDisposable } from "@univerjs/core";
|
|
2
|
-
import { DocSelectionManagerService, DocSkeletonManagerService, RichTextEditingMutation } from "@univerjs/docs";
|
|
3
|
-
import { BulletListCommand, CutContentCommand,
|
|
2
|
+
import { DeleteTextCommand, DocSelectionManagerService, DocSkeletonManagerService, InsertTextCommand, RichTextEditingMutation } from "@univerjs/docs";
|
|
3
|
+
import { BulletListCommand, CutContentCommand, DeleteLeftCommand, DocCanvasPopManagerService, DocCreateTableOperation, DocEventManagerService, HorizontalLineCommand, IMEInputCommand, MoveCursorOperation, NodePositionConvertToCursor, OrderListCommand, getAnchorBounding } from "@univerjs/docs-ui";
|
|
4
4
|
import { ComponentManager, ILayoutService, IShortcutService, KeyCode, UniverUIPlugin, useDependency, useEvent, useObservable } from "@univerjs/ui";
|
|
5
5
|
import { IRenderManagerService, ptToPixel } from "@univerjs/engine-render";
|
|
6
6
|
import { BehaviorSubject, combineLatest, distinctUntilChanged, map, of, tap } from "rxjs";
|
|
@@ -50,7 +50,7 @@ function measureTextWidth(text, font) {
|
|
|
50
50
|
}
|
|
51
51
|
const KeywordInputPlaceholder = ({ popup }) => {
|
|
52
52
|
var _popup$extraProps$fon, _popup$extraProps, _popup$extraProps$fon2, _popup$extraProps2, _popup$extraProps$asc, _popup$extraProps3, _popup$extraProps$con, _popup$extraProps4, _popup$extraProps5, _popup$extraProps6, _popup$extraProps7;
|
|
53
|
-
const placeholder = useDependency(LocaleService).t("
|
|
53
|
+
const placeholder = useDependency(LocaleService).t("docs-quick-insert-ui.keywordInputPlaceholder");
|
|
54
54
|
const fontSizePx = ptToPixel((_popup$extraProps$fon = (_popup$extraProps = popup.extraProps) === null || _popup$extraProps === void 0 ? void 0 : _popup$extraProps.fontSize) !== null && _popup$extraProps$fon !== void 0 ? _popup$extraProps$fon : DEFAULT_FONT_SIZE);
|
|
55
55
|
const fontString = (_popup$extraProps$fon2 = (_popup$extraProps2 = popup.extraProps) === null || _popup$extraProps2 === void 0 ? void 0 : _popup$extraProps2.fontString) !== null && _popup$extraProps$fon2 !== void 0 ? _popup$extraProps$fon2 : `${fontSizePx}px sans-serif`;
|
|
56
56
|
const ascent = (_popup$extraProps$asc = (_popup$extraProps3 = popup.extraProps) === null || _popup$extraProps3 === void 0 ? void 0 : _popup$extraProps3.ascent) !== null && _popup$extraProps$asc !== void 0 ? _popup$extraProps$asc : fontSizePx;
|
|
@@ -197,7 +197,7 @@ const QuickInsertPlaceholderComponentKey = "docs.quick.insert.placeholder";
|
|
|
197
197
|
const QuickInsertPlaceholder = () => {
|
|
198
198
|
return /* @__PURE__ */ jsx("div", {
|
|
199
199
|
className: "univer-flex univer-h-full univer-items-center univer-justify-center univer-rounded-lg univer-bg-white univer-px-12 univer-py-6 univer-text-gray-400 univer-shadow-lg",
|
|
200
|
-
children: /* @__PURE__ */ jsx("span", { children: useDependency(LocaleService).t("
|
|
200
|
+
children: /* @__PURE__ */ jsx("span", { children: useDependency(LocaleService).t("docs-quick-insert-ui.placeholder") })
|
|
201
201
|
});
|
|
202
202
|
};
|
|
203
203
|
QuickInsertPlaceholder.componentKey = QuickInsertPlaceholderComponentKey;
|
|
@@ -362,7 +362,7 @@ const QuickInsertPopup = () => {
|
|
|
362
362
|
QuickInsertPopup.componentKey = "docs.quick.insert.popup";
|
|
363
363
|
|
|
364
364
|
//#endregion
|
|
365
|
-
//#region \0@oxc-project+runtime@0.
|
|
365
|
+
//#region \0@oxc-project+runtime@0.133.0/helpers/esm/typeof.js
|
|
366
366
|
function _typeof(o) {
|
|
367
367
|
"@babel/helpers - typeof";
|
|
368
368
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -373,7 +373,7 @@ function _typeof(o) {
|
|
|
373
373
|
}
|
|
374
374
|
|
|
375
375
|
//#endregion
|
|
376
|
-
//#region \0@oxc-project+runtime@0.
|
|
376
|
+
//#region \0@oxc-project+runtime@0.133.0/helpers/esm/toPrimitive.js
|
|
377
377
|
function toPrimitive(t, r) {
|
|
378
378
|
if ("object" != _typeof(t) || !t) return t;
|
|
379
379
|
var e = t[Symbol.toPrimitive];
|
|
@@ -386,14 +386,14 @@ function toPrimitive(t, r) {
|
|
|
386
386
|
}
|
|
387
387
|
|
|
388
388
|
//#endregion
|
|
389
|
-
//#region \0@oxc-project+runtime@0.
|
|
389
|
+
//#region \0@oxc-project+runtime@0.133.0/helpers/esm/toPropertyKey.js
|
|
390
390
|
function toPropertyKey(t) {
|
|
391
391
|
var i = toPrimitive(t, "string");
|
|
392
392
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
393
393
|
}
|
|
394
394
|
|
|
395
395
|
//#endregion
|
|
396
|
-
//#region \0@oxc-project+runtime@0.
|
|
396
|
+
//#region \0@oxc-project+runtime@0.133.0/helpers/esm/defineProperty.js
|
|
397
397
|
function _defineProperty(e, r, t) {
|
|
398
398
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
399
399
|
value: t,
|
|
@@ -404,7 +404,7 @@ function _defineProperty(e, r, t) {
|
|
|
404
404
|
}
|
|
405
405
|
|
|
406
406
|
//#endregion
|
|
407
|
-
//#region \0@oxc-project+runtime@0.
|
|
407
|
+
//#region \0@oxc-project+runtime@0.133.0/helpers/esm/decorateParam.js
|
|
408
408
|
function __decorateParam(paramIndex, decorator) {
|
|
409
409
|
return function(target, key) {
|
|
410
410
|
decorator(target, key, paramIndex);
|
|
@@ -412,7 +412,7 @@ function __decorateParam(paramIndex, decorator) {
|
|
|
412
412
|
}
|
|
413
413
|
|
|
414
414
|
//#endregion
|
|
415
|
-
//#region \0@oxc-project+runtime@0.
|
|
415
|
+
//#region \0@oxc-project+runtime@0.133.0/helpers/esm/decorate.js
|
|
416
416
|
function __decorate(decorators, target, key, desc) {
|
|
417
417
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
418
418
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -664,13 +664,13 @@ const CloseQuickInsertPopupOperation = {
|
|
|
664
664
|
//#region src/menu/menu.ts
|
|
665
665
|
const textMenu = {
|
|
666
666
|
id: "quick-insert.text.menu",
|
|
667
|
-
title: "
|
|
667
|
+
title: "docs-quick-insert-ui.menu.text",
|
|
668
668
|
icon: "TextIcon",
|
|
669
669
|
keywords: ["text"]
|
|
670
670
|
};
|
|
671
671
|
const numberedListMenu = {
|
|
672
672
|
id: OrderListCommand.id,
|
|
673
|
-
title: "
|
|
673
|
+
title: "docs-quick-insert-ui.menu.numberedList",
|
|
674
674
|
icon: "OrderIcon",
|
|
675
675
|
keywords: [
|
|
676
676
|
"numbered",
|
|
@@ -680,7 +680,7 @@ const numberedListMenu = {
|
|
|
680
680
|
};
|
|
681
681
|
const bulletedListMenu = {
|
|
682
682
|
id: BulletListCommand.id,
|
|
683
|
-
title: "
|
|
683
|
+
title: "docs-quick-insert-ui.menu.bulletedList",
|
|
684
684
|
icon: "UnorderIcon",
|
|
685
685
|
keywords: [
|
|
686
686
|
"bulleted",
|
|
@@ -690,7 +690,7 @@ const bulletedListMenu = {
|
|
|
690
690
|
};
|
|
691
691
|
const dividerMenu = {
|
|
692
692
|
id: HorizontalLineCommand.id,
|
|
693
|
-
title: "
|
|
693
|
+
title: "docs-quick-insert-ui.menu.divider",
|
|
694
694
|
icon: "DividerIcon",
|
|
695
695
|
keywords: [
|
|
696
696
|
"divider",
|
|
@@ -700,7 +700,7 @@ const dividerMenu = {
|
|
|
700
700
|
};
|
|
701
701
|
const tableMenu = {
|
|
702
702
|
id: DocCreateTableOperation.id,
|
|
703
|
-
title: "
|
|
703
|
+
title: "docs-quick-insert-ui.menu.table",
|
|
704
704
|
icon: "GridIcon",
|
|
705
705
|
keywords: [
|
|
706
706
|
"table",
|
|
@@ -710,7 +710,7 @@ const tableMenu = {
|
|
|
710
710
|
};
|
|
711
711
|
const imageMenu = {
|
|
712
712
|
id: InsertDocImageCommand.id,
|
|
713
|
-
title: "
|
|
713
|
+
title: "docs-quick-insert-ui.menu.image",
|
|
714
714
|
icon: "AdditionAndSubtractionIcon",
|
|
715
715
|
keywords: [
|
|
716
716
|
"image",
|
|
@@ -719,7 +719,7 @@ const imageMenu = {
|
|
|
719
719
|
]
|
|
720
720
|
};
|
|
721
721
|
const builtInMenus = [{
|
|
722
|
-
title: "
|
|
722
|
+
title: "docs-quick-insert-ui.group.basics",
|
|
723
723
|
id: "quick.insert.group.basic",
|
|
724
724
|
children: [
|
|
725
725
|
textMenu,
|
|
@@ -762,7 +762,7 @@ let DocQuickInsertTriggerController = class DocQuickInsertTriggerController exte
|
|
|
762
762
|
const { _docQuickInsertPopupService, _textSelectionManagerService, _commandService } = this;
|
|
763
763
|
const documentDataModel = this._univerInstanceService.getCurrentUnitOfType(UniverInstanceType.UNIVER_DOC);
|
|
764
764
|
if (documentDataModel === null || documentDataModel === void 0 ? void 0 : documentDataModel.getDisabled()) return;
|
|
765
|
-
if (commandInfo.id ===
|
|
765
|
+
if (commandInfo.id === InsertTextCommand.id) {
|
|
766
766
|
const params = commandInfo.params;
|
|
767
767
|
if (_docQuickInsertPopupService.editPopup) {
|
|
768
768
|
_docQuickInsertPopupService.setInputOffset({
|
|
@@ -804,7 +804,7 @@ let DocQuickInsertTriggerController = class DocQuickInsertTriggerController exte
|
|
|
804
804
|
});
|
|
805
805
|
}
|
|
806
806
|
}
|
|
807
|
-
if (commandInfo.id ===
|
|
807
|
+
if (commandInfo.id === DeleteTextCommand.id) {
|
|
808
808
|
const params = commandInfo.params;
|
|
809
809
|
if (_docQuickInsertPopupService.editPopup && params.direction === DeleteDirection.LEFT) {
|
|
810
810
|
var _params$len;
|
|
@@ -1000,7 +1000,7 @@ DocQuickInsertUIController = __decorate([
|
|
|
1000
1000
|
//#endregion
|
|
1001
1001
|
//#region package.json
|
|
1002
1002
|
var name = "@univerjs/docs-quick-insert-ui";
|
|
1003
|
-
var version = "0.
|
|
1003
|
+
var version = "0.25.0-insiders.20260604-29ebbff";
|
|
1004
1004
|
|
|
1005
1005
|
//#endregion
|
|
1006
1006
|
//#region src/config/config.ts
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region src/locale/ar-SA.ts
|
|
2
|
+
const locale = { "docs-quick-insert-ui": {
|
|
3
|
+
menu: {
|
|
4
|
+
numberedList: "قائمة مرقمة",
|
|
5
|
+
bulletedList: "قائمة نقطية",
|
|
6
|
+
divider: "فاصل",
|
|
7
|
+
text: "نص",
|
|
8
|
+
table: "جدول",
|
|
9
|
+
image: "صورة"
|
|
10
|
+
},
|
|
11
|
+
group: { basics: "أساسيات" },
|
|
12
|
+
placeholder: "لم يُعثر على نتائج",
|
|
13
|
+
keywordInputPlaceholder: "أدخل الكلمات المفتاحية"
|
|
14
|
+
} };
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { locale as default };
|
package/lib/es/locale/ca-ES.js
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region src/locale/de-DE.ts
|
|
2
|
+
const locale = { "docs-quick-insert-ui": {
|
|
3
|
+
menu: {
|
|
4
|
+
numberedList: "Nummerierte Liste",
|
|
5
|
+
bulletedList: "Aufzählungsliste",
|
|
6
|
+
divider: "Trennlinie",
|
|
7
|
+
text: "Text",
|
|
8
|
+
table: "Tabelle",
|
|
9
|
+
image: "Bild"
|
|
10
|
+
},
|
|
11
|
+
group: { basics: "Grundlagen" },
|
|
12
|
+
placeholder: "Keine Ergebnisse gefunden",
|
|
13
|
+
keywordInputPlaceholder: "Stichwörter eingeben"
|
|
14
|
+
} };
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { locale as default };
|
package/lib/es/locale/en-US.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
const locale = {
|
|
17
|
+
const locale = { "docs-quick-insert-ui": {
|
|
18
18
|
menu: {
|
|
19
19
|
numberedList: "Numbered List",
|
|
20
20
|
bulletedList: "Bulleted List",
|
package/lib/es/locale/es-ES.js
CHANGED
package/lib/es/locale/fa-IR.js
CHANGED
package/lib/es/locale/fr-FR.js
CHANGED