@univerjs/ui 0.12.3 → 0.12.4
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/facade.js +1 -1
- package/lib/cjs/index.js +9 -9
- package/lib/cjs/locale/ca-ES.js +1 -1
- 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/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.js +1 -1
- package/lib/cjs/locale/ru-RU.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-TW.js +1 -1
- package/lib/es/facade.js +44 -35
- package/lib/es/index.js +3065 -2936
- package/lib/es/locale/ca-ES.js +14 -16
- package/lib/es/locale/en-US.js +14 -16
- package/lib/es/locale/es-ES.js +14 -16
- package/lib/es/locale/fa-IR.js +16 -18
- package/lib/es/locale/fr-FR.js +14 -16
- package/lib/es/locale/ja-JP.js +16 -18
- package/lib/es/locale/ko-KR.js +16 -18
- package/lib/es/locale/ru-RU.js +16 -18
- package/lib/es/locale/vi-VN.js +14 -16
- package/lib/es/locale/zh-CN.js +14 -16
- package/lib/es/locale/zh-TW.js +14 -16
- package/lib/facade.js +44 -35
- package/lib/index.css +1 -1
- package/lib/index.js +3065 -2936
- package/lib/locale/ca-ES.js +14 -16
- package/lib/locale/en-US.js +14 -16
- package/lib/locale/es-ES.js +14 -16
- package/lib/locale/fa-IR.js +16 -18
- package/lib/locale/fr-FR.js +14 -16
- package/lib/locale/ja-JP.js +16 -18
- package/lib/locale/ko-KR.js +16 -18
- package/lib/locale/ru-RU.js +16 -18
- package/lib/locale/vi-VN.js +14 -16
- package/lib/locale/zh-CN.js +14 -16
- package/lib/locale/zh-TW.js +14 -16
- package/lib/types/components/font-family/FontFamilyItem.d.ts +19 -2
- package/lib/types/components/font-family/index.d.ts +0 -1
- package/lib/types/components/font-family/interface.d.ts +0 -6
- package/lib/types/controllers/config.schema.d.ts +5 -0
- package/lib/types/controllers/ui/ui.controller.d.ts +8 -15
- package/lib/types/facade/f-univer.d.ts +22 -1
- package/lib/types/index.d.ts +2 -1
- package/lib/types/locale/en-US.d.ts +14 -16
- package/lib/types/services/dom/canvas-dom-layer.service.d.ts +1 -0
- package/lib/types/services/font.service.d.ts +91 -0
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +9 -9
- package/lib/umd/locale/ca-ES.js +1 -1
- 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/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/ru-RU.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-TW.js +1 -1
- package/package.json +8 -8
package/lib/es/locale/ca-ES.js
CHANGED
|
@@ -29,22 +29,20 @@ const e = {
|
|
|
29
29
|
more: "Més"
|
|
30
30
|
},
|
|
31
31
|
fontFamily: {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
Anton: "Anton",
|
|
47
|
-
Pacifico: "Pacifico"
|
|
32
|
+
"not-supported": "No s'ha trobat aquesta font al sistema, s'utilitza la font per defecte.",
|
|
33
|
+
arial: "Arial",
|
|
34
|
+
"times-new-roman": "Times New Roman",
|
|
35
|
+
tahoma: "Tahoma",
|
|
36
|
+
verdana: "Verdana",
|
|
37
|
+
"microsoft-yahei": "Microsoft YaHei",
|
|
38
|
+
simsun: "SimSun",
|
|
39
|
+
simhei: "SimHei",
|
|
40
|
+
kaiti: "Kaiti",
|
|
41
|
+
fangsong: "FangSong",
|
|
42
|
+
nsimsun: "NSimSun",
|
|
43
|
+
stxinwei: "STXinwei",
|
|
44
|
+
stxingkai: "STXingkai",
|
|
45
|
+
stliti: "STLiti"
|
|
48
46
|
},
|
|
49
47
|
"shortcut-panel": {
|
|
50
48
|
title: "Dreceres"
|
package/lib/es/locale/en-US.js
CHANGED
|
@@ -29,22 +29,20 @@ const e = {
|
|
|
29
29
|
more: "More"
|
|
30
30
|
},
|
|
31
31
|
fontFamily: {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
Anton: "Anton",
|
|
47
|
-
Pacifico: "Pacifico"
|
|
32
|
+
"not-supported": "No such font found in the system, using default font.",
|
|
33
|
+
arial: "Arial",
|
|
34
|
+
"times-new-roman": "Times New Roman",
|
|
35
|
+
tahoma: "Tahoma",
|
|
36
|
+
verdana: "Verdana",
|
|
37
|
+
"microsoft-yahei": "Microsoft YaHei",
|
|
38
|
+
simsun: "SimSun",
|
|
39
|
+
simhei: "SimHei",
|
|
40
|
+
kaiti: "Kaiti",
|
|
41
|
+
fangsong: "FangSong",
|
|
42
|
+
nsimsun: "NSimSun",
|
|
43
|
+
stxinwei: "STXinwei",
|
|
44
|
+
stxingkai: "STXingkai",
|
|
45
|
+
stliti: "STLiti"
|
|
48
46
|
},
|
|
49
47
|
"shortcut-panel": {
|
|
50
48
|
title: "Shortcuts"
|
package/lib/es/locale/es-ES.js
CHANGED
|
@@ -29,22 +29,20 @@ const a = {
|
|
|
29
29
|
more: "Más"
|
|
30
30
|
},
|
|
31
31
|
fontFamily: {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
Anton: "Anton",
|
|
47
|
-
Pacifico: "Pacifico"
|
|
32
|
+
"not-supported": "No se encontró esta fuente en el sistema, se utiliza la fuente predeterminada.",
|
|
33
|
+
arial: "Arial",
|
|
34
|
+
"times-new-roman": "Times New Roman",
|
|
35
|
+
tahoma: "Tahoma",
|
|
36
|
+
verdana: "Verdana",
|
|
37
|
+
"microsoft-yahei": "Microsoft YaHei",
|
|
38
|
+
simsun: "SimSun",
|
|
39
|
+
simhei: "SimHei",
|
|
40
|
+
kaiti: "Kaiti",
|
|
41
|
+
fangsong: "FangSong",
|
|
42
|
+
nsimsun: "NSimSun",
|
|
43
|
+
stxinwei: "STXinwei",
|
|
44
|
+
stxingkai: "STXingkai",
|
|
45
|
+
stliti: "STLiti"
|
|
48
46
|
},
|
|
49
47
|
"shortcut-panel": {
|
|
50
48
|
title: "Atajos"
|
package/lib/es/locale/fa-IR.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const t = {
|
|
2
2
|
toolbar: {
|
|
3
3
|
heading: {
|
|
4
4
|
normal: "متن عادی",
|
|
@@ -29,22 +29,20 @@ const i = {
|
|
|
29
29
|
more: "بیشتر"
|
|
30
30
|
},
|
|
31
31
|
fontFamily: {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
Anton: "Anton",
|
|
47
|
-
Pacifico: "Pacifico"
|
|
32
|
+
"not-supported": "هیچ فونتی با این نام در سیستم یافت نشد، از فونت پیشفرض استفاده میشود.",
|
|
33
|
+
arial: "Arial",
|
|
34
|
+
"times-new-roman": "Times New Roman",
|
|
35
|
+
tahoma: "Tahoma",
|
|
36
|
+
verdana: "Verdana",
|
|
37
|
+
"microsoft-yahei": "Microsoft YaHei",
|
|
38
|
+
simsun: "SimSun",
|
|
39
|
+
simhei: "SimHei",
|
|
40
|
+
kaiti: "Kaiti",
|
|
41
|
+
fangsong: "FangSong",
|
|
42
|
+
nsimsun: "NSimSun",
|
|
43
|
+
stxinwei: "STXinwei",
|
|
44
|
+
stxingkai: "STXingkai",
|
|
45
|
+
stliti: "STLiti"
|
|
48
46
|
},
|
|
49
47
|
"shortcut-panel": {
|
|
50
48
|
title: "کلیدهای میانبر"
|
|
@@ -83,5 +81,5 @@ const i = {
|
|
|
83
81
|
}
|
|
84
82
|
};
|
|
85
83
|
export {
|
|
86
|
-
|
|
84
|
+
t as default
|
|
87
85
|
};
|
package/lib/es/locale/fr-FR.js
CHANGED
|
@@ -29,22 +29,20 @@ const e = {
|
|
|
29
29
|
more: "Plus"
|
|
30
30
|
},
|
|
31
31
|
fontFamily: {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
Anton: "Anton",
|
|
47
|
-
Pacifico: "Pacifico"
|
|
32
|
+
"not-supported": "Aucune police de ce type trouvée dans le système, utilisation de la police par défaut.",
|
|
33
|
+
arial: "Arial",
|
|
34
|
+
"times-new-roman": "Times New Roman",
|
|
35
|
+
tahoma: "Tahoma",
|
|
36
|
+
verdana: "Verdana",
|
|
37
|
+
"microsoft-yahei": "Microsoft YaHei",
|
|
38
|
+
simsun: "SimSun",
|
|
39
|
+
simhei: "SimHei",
|
|
40
|
+
kaiti: "Kaiti",
|
|
41
|
+
fangsong: "FangSong",
|
|
42
|
+
nsimsun: "NSimSun",
|
|
43
|
+
stxinwei: "STXinwei",
|
|
44
|
+
stxingkai: "STXingkai",
|
|
45
|
+
stliti: "STLiti"
|
|
48
46
|
},
|
|
49
47
|
"shortcut-panel": {
|
|
50
48
|
title: "Raccourcis"
|
package/lib/es/locale/ja-JP.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const t = {
|
|
2
2
|
toolbar: {
|
|
3
3
|
heading: {
|
|
4
4
|
normal: "標準",
|
|
@@ -29,22 +29,20 @@ const i = {
|
|
|
29
29
|
more: "もっと見る"
|
|
30
30
|
},
|
|
31
31
|
fontFamily: {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
Anton: "Anton",
|
|
47
|
-
Pacifico: "Pacifico"
|
|
32
|
+
"not-supported": "システムにそのようなフォントが見つからないため、デフォルトのフォントを使用しています。",
|
|
33
|
+
arial: "Arial",
|
|
34
|
+
"times-new-roman": "Times New Roman",
|
|
35
|
+
tahoma: "Tahoma",
|
|
36
|
+
verdana: "Verdana",
|
|
37
|
+
"microsoft-yahei": "微軟雅黒",
|
|
38
|
+
simsun: "SimSun",
|
|
39
|
+
simhei: "SimHei",
|
|
40
|
+
kaiti: "Kaiti",
|
|
41
|
+
fangsong: "FangSong",
|
|
42
|
+
nsimsun: "NSimSun",
|
|
43
|
+
stxinwei: "STXinwei",
|
|
44
|
+
stxingkai: "STXingkai",
|
|
45
|
+
stliti: "STLiti"
|
|
48
46
|
},
|
|
49
47
|
"shortcut-panel": {
|
|
50
48
|
title: "ショートカット"
|
|
@@ -83,5 +81,5 @@ const i = {
|
|
|
83
81
|
}
|
|
84
82
|
};
|
|
85
83
|
export {
|
|
86
|
-
|
|
84
|
+
t as default
|
|
87
85
|
};
|
package/lib/es/locale/ko-KR.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const t = {
|
|
2
2
|
toolbar: {
|
|
3
3
|
heading: {
|
|
4
4
|
normal: "일반",
|
|
@@ -29,22 +29,20 @@ const i = {
|
|
|
29
29
|
more: "더 보기"
|
|
30
30
|
},
|
|
31
31
|
fontFamily: {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
Anton: "Anton",
|
|
47
|
-
Pacifico: "Pacifico"
|
|
32
|
+
"not-supported": "시스템에 해당 폰트가 없어 기본 폰트를 사용합니다.",
|
|
33
|
+
arial: "Arial",
|
|
34
|
+
"times-new-roman": "Times New Roman",
|
|
35
|
+
tahoma: "Tahoma",
|
|
36
|
+
verdana: "Verdana",
|
|
37
|
+
"microsoft-yahei": "Microsoft YaHei",
|
|
38
|
+
simsun: "SimSun",
|
|
39
|
+
simhei: "SimHei",
|
|
40
|
+
kaiti: "Kaiti",
|
|
41
|
+
fangsong: "FangSong",
|
|
42
|
+
nsimsun: "NSimSun",
|
|
43
|
+
stxinwei: "STXinwei",
|
|
44
|
+
stxingkai: "STXingkai",
|
|
45
|
+
stliti: "STLiti"
|
|
48
46
|
},
|
|
49
47
|
"shortcut-panel": {
|
|
50
48
|
title: "단축키"
|
|
@@ -83,5 +81,5 @@ const i = {
|
|
|
83
81
|
}
|
|
84
82
|
};
|
|
85
83
|
export {
|
|
86
|
-
|
|
84
|
+
t as default
|
|
87
85
|
};
|
package/lib/es/locale/ru-RU.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const t = {
|
|
2
2
|
toolbar: {
|
|
3
3
|
heading: {
|
|
4
4
|
normal: "Обычный текст",
|
|
@@ -29,22 +29,20 @@ const i = {
|
|
|
29
29
|
more: "Больше"
|
|
30
30
|
},
|
|
31
31
|
fontFamily: {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
Anton: "Anton",
|
|
47
|
-
Pacifico: "Pacifico"
|
|
32
|
+
"not-supported": "В системе не найден такой шрифт, используется шрифт по умолчанию.",
|
|
33
|
+
arial: "Arial",
|
|
34
|
+
"times-new-roman": "Times New Roman",
|
|
35
|
+
tahoma: "Tahoma",
|
|
36
|
+
verdana: "Verdana",
|
|
37
|
+
"microsoft-yahei": "Microsoft YaHei",
|
|
38
|
+
simsun: "SimSun",
|
|
39
|
+
simhei: "SimHei",
|
|
40
|
+
kaiti: "Kaiti",
|
|
41
|
+
fangsong: "FangSong",
|
|
42
|
+
nsimsun: "NSimSun",
|
|
43
|
+
stxinwei: "STXinwei",
|
|
44
|
+
stxingkai: "STXingkai",
|
|
45
|
+
stliti: "STLiti"
|
|
48
46
|
},
|
|
49
47
|
"shortcut-panel": {
|
|
50
48
|
title: "Сочетания клавиш"
|
|
@@ -83,5 +81,5 @@ const i = {
|
|
|
83
81
|
}
|
|
84
82
|
};
|
|
85
83
|
export {
|
|
86
|
-
|
|
84
|
+
t as default
|
|
87
85
|
};
|
package/lib/es/locale/vi-VN.js
CHANGED
|
@@ -29,22 +29,20 @@ const t = {
|
|
|
29
29
|
more: "Thêm"
|
|
30
30
|
},
|
|
31
31
|
fontFamily: {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
Anton: "Anton",
|
|
47
|
-
Pacifico: "Pacifico"
|
|
32
|
+
"not-supported": "Không tìm thấy phông chữ này trong hệ thống, sử dụng phông chữ mặc định.",
|
|
33
|
+
arial: "Arial",
|
|
34
|
+
"times-new-roman": "Times New Roman",
|
|
35
|
+
tahoma: "Tahoma",
|
|
36
|
+
verdana: "Verdana",
|
|
37
|
+
"microsoft-yahei": "Microsoft YaHei",
|
|
38
|
+
simsun: "SimSun",
|
|
39
|
+
simhei: "SimHei",
|
|
40
|
+
kaiti: "Kaiti",
|
|
41
|
+
fangsong: "FangSong",
|
|
42
|
+
nsimsun: "NSimSun",
|
|
43
|
+
stxinwei: "STXinwei",
|
|
44
|
+
stxingkai: "STXingkai",
|
|
45
|
+
stliti: "STLiti"
|
|
48
46
|
},
|
|
49
47
|
"shortcut-panel": {
|
|
50
48
|
title: "Bảng phím tắt"
|
package/lib/es/locale/zh-CN.js
CHANGED
|
@@ -29,22 +29,20 @@ const t = {
|
|
|
29
29
|
more: "更多"
|
|
30
30
|
},
|
|
31
31
|
fontFamily: {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
Anton: "Anton",
|
|
47
|
-
Pacifico: "Pacifico"
|
|
32
|
+
"not-supported": "系统中未找到该字体,使用默认字体。",
|
|
33
|
+
arial: "Arial",
|
|
34
|
+
"times-new-roman": "Times New Roman",
|
|
35
|
+
tahoma: "Tahoma",
|
|
36
|
+
verdana: "Verdana",
|
|
37
|
+
"microsoft-yahei": "微软雅黑",
|
|
38
|
+
simsun: "宋体",
|
|
39
|
+
simhei: "黑体",
|
|
40
|
+
kaiti: "楷体",
|
|
41
|
+
fangsong: "仿宋",
|
|
42
|
+
nsimsun: "新宋体",
|
|
43
|
+
stxinwei: "华文新魏",
|
|
44
|
+
stxingkai: "华文行楷",
|
|
45
|
+
stliti: "华文隶书"
|
|
48
46
|
},
|
|
49
47
|
"shortcut-panel": {
|
|
50
48
|
title: "快捷键面板"
|
package/lib/es/locale/zh-TW.js
CHANGED
|
@@ -29,22 +29,20 @@ const t = {
|
|
|
29
29
|
more: "更多"
|
|
30
30
|
},
|
|
31
31
|
fontFamily: {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
Anton: "Anton",
|
|
47
|
-
Pacifico: "Pacifico"
|
|
32
|
+
"not-supported": "系統中未找到該字體,使用預設字體。",
|
|
33
|
+
arial: "Arial",
|
|
34
|
+
"times-new-roman": "Times New Roman",
|
|
35
|
+
tahoma: "Tahoma",
|
|
36
|
+
verdana: "Verdana",
|
|
37
|
+
"microsoft-yahei": "微軟雅黑",
|
|
38
|
+
simsun: "宋體",
|
|
39
|
+
simhei: "黑體",
|
|
40
|
+
kaiti: "楷體",
|
|
41
|
+
fangsong: "仿宋",
|
|
42
|
+
nsimsun: "新宋體",
|
|
43
|
+
stxinwei: "華文新魏",
|
|
44
|
+
stxingkai: "華文行楷",
|
|
45
|
+
stliti: "華文隸書"
|
|
48
46
|
},
|
|
49
47
|
"shortcut-panel": {
|
|
50
48
|
title: "快捷鍵面板"
|
package/lib/facade.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
var
|
|
2
|
-
var R = (n, e, t) => e in n ?
|
|
1
|
+
var B = Object.defineProperty;
|
|
2
|
+
var R = (n, e, t) => e in n ? B(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
3
|
var o = (n, e, t) => R(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import { FBase as C, FUniver as M, FHooks as j, FEnum as y } from "@univerjs/core/facade";
|
|
5
5
|
import { IRenderManagerService as U } from "@univerjs/engine-render";
|
|
6
|
-
import { IMenuManagerService as P, MenuItemType as
|
|
7
|
-
import { Inject as m, Injector as f, ICommandService as u, generateRandomId as
|
|
8
|
-
var
|
|
9
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
6
|
+
import { IMenuManagerService as P, MenuItemType as E, RibbonStartGroup as w, RibbonPosition as T, MenuManagerPosition as O, IShortcutService as G, CopyCommand as v, PasteCommand as _, ISidebarService as V, IDialogService as $, ComponentManager as I, IMessageService as N, IUIPartsService as g, connectInjector as H, IFontService as K, SheetPasteShortKeyCommandName as k, BuiltInUIPart as L, KeyCode as A } from "@univerjs/ui";
|
|
7
|
+
import { Inject as m, Injector as f, ICommandService as u, generateRandomId as W, CommandType as q, IUniverInstanceService as z, UniverInstanceType as J } from "@univerjs/core";
|
|
8
|
+
var Q = Object.getOwnPropertyDescriptor, x = (n, e, t, r) => {
|
|
9
|
+
for (var i = r > 1 ? void 0 : r ? Q(e, t) : e, s = n.length - 1, c; s >= 0; s--)
|
|
10
10
|
(c = n[s]) && (i = c(i) || i);
|
|
11
11
|
return i;
|
|
12
12
|
}, d = (n, e) => (t, r) => e(t, r, n);
|
|
13
|
-
class
|
|
13
|
+
class D extends C {
|
|
14
14
|
/**
|
|
15
15
|
* Append the menu to any menu position on Univer UI.
|
|
16
16
|
* @param {string | string[]} path - Some predefined path to append the menu. The paths can be an array,
|
|
@@ -42,24 +42,24 @@ class E extends C {
|
|
|
42
42
|
const t = typeof e == "string" ? e.split("|") : e, r = t.length, i = {};
|
|
43
43
|
let s = i;
|
|
44
44
|
const c = this.__getSchema();
|
|
45
|
-
t.forEach((S,
|
|
46
|
-
|
|
45
|
+
t.forEach((S, F) => {
|
|
46
|
+
F === r - 1 ? s[S] = c : s[S] = {}, s = s[S];
|
|
47
47
|
}), this._menuManagerService.mergeMenu(i);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
var a;
|
|
51
|
-
let
|
|
51
|
+
let p = (a = class extends D {
|
|
52
52
|
constructor(e, t, r, i) {
|
|
53
53
|
super();
|
|
54
54
|
o(this, "_commandToRegister", /* @__PURE__ */ new Map());
|
|
55
55
|
o(this, "_buildingSchema");
|
|
56
56
|
this._item = e, this._injector = t, this._commandService = r, this._menuManagerService = i;
|
|
57
|
-
const s = typeof e.action == "string" ? e.action :
|
|
57
|
+
const s = typeof e.action == "string" ? e.action : W(12);
|
|
58
58
|
s !== e.action && this._commandToRegister.set(s, e.action), this._buildingSchema = {
|
|
59
59
|
// eslint-disable-next-line ts/explicit-function-return-type
|
|
60
60
|
menuItemFactory: () => ({
|
|
61
61
|
id: e.id,
|
|
62
|
-
type:
|
|
62
|
+
type: E.BUTTON,
|
|
63
63
|
// we only support button for now
|
|
64
64
|
icon: e.icon,
|
|
65
65
|
title: e.title,
|
|
@@ -75,18 +75,18 @@ let _ = (a = class extends E {
|
|
|
75
75
|
return this._commandToRegister.forEach((e, t) => {
|
|
76
76
|
this._commandService.hasCommand(t) || this._commandService.registerCommand({
|
|
77
77
|
id: t,
|
|
78
|
-
type:
|
|
78
|
+
type: q.COMMAND,
|
|
79
79
|
handler: e
|
|
80
80
|
});
|
|
81
81
|
}), { [this._item.id]: this._buildingSchema };
|
|
82
82
|
}
|
|
83
83
|
}, o(a, "RibbonStartGroup", w), o(a, "RibbonPosition", T), o(a, "MenuManagerPosition", O), a);
|
|
84
|
-
|
|
84
|
+
p = x([
|
|
85
85
|
d(1, m(f)),
|
|
86
86
|
d(2, u),
|
|
87
87
|
d(3, P)
|
|
88
|
-
],
|
|
89
|
-
let l = class extends
|
|
88
|
+
], p);
|
|
89
|
+
let l = class extends D {
|
|
90
90
|
constructor(e, t, r) {
|
|
91
91
|
super();
|
|
92
92
|
o(this, "_menuByGroups", []);
|
|
@@ -96,7 +96,7 @@ let l = class extends E {
|
|
|
96
96
|
// eslint-disable-next-line ts/explicit-function-return-type
|
|
97
97
|
menuItemFactory: () => ({
|
|
98
98
|
id: e.id,
|
|
99
|
-
type:
|
|
99
|
+
type: E.SUBITEMS,
|
|
100
100
|
icon: e.icon,
|
|
101
101
|
title: e.title,
|
|
102
102
|
tooltip: e.tooltip
|
|
@@ -186,12 +186,12 @@ let l = class extends E {
|
|
|
186
186
|
}), { [this._item.id]: Object.assign(this._buildingSchema, e) };
|
|
187
187
|
}
|
|
188
188
|
};
|
|
189
|
-
l =
|
|
189
|
+
l = x([
|
|
190
190
|
d(1, m(f)),
|
|
191
191
|
d(2, P)
|
|
192
192
|
], l);
|
|
193
|
-
var
|
|
194
|
-
for (var i = r > 1 ? void 0 : r ?
|
|
193
|
+
var X = Object.getOwnPropertyDescriptor, Y = (n, e, t, r) => {
|
|
194
|
+
for (var i = r > 1 ? void 0 : r ? X(e, t) : e, s = n.length - 1, c; s >= 0; s--)
|
|
195
195
|
(c = n[s]) && (i = c(i) || i);
|
|
196
196
|
return i;
|
|
197
197
|
}, h = (n, e) => (t, r) => e(t, r, n);
|
|
@@ -259,7 +259,7 @@ let b = class extends C {
|
|
|
259
259
|
* ```
|
|
260
260
|
*/
|
|
261
261
|
triggerShortcut(e) {
|
|
262
|
-
const t = this._univerInstanceService.getCurrentUnitForType(
|
|
262
|
+
const t = this._univerInstanceService.getCurrentUnitForType(J.UNIVER_SHEET);
|
|
263
263
|
if (!t)
|
|
264
264
|
return;
|
|
265
265
|
const r = this._renderManagerService.getRenderById(t.getUnitId());
|
|
@@ -285,13 +285,13 @@ let b = class extends C {
|
|
|
285
285
|
return this._shortcutService.dispatch(e);
|
|
286
286
|
}
|
|
287
287
|
};
|
|
288
|
-
b =
|
|
288
|
+
b = Y([
|
|
289
289
|
h(0, m(f)),
|
|
290
290
|
h(1, m(U)),
|
|
291
|
-
h(2,
|
|
291
|
+
h(2, z),
|
|
292
292
|
h(3, G)
|
|
293
293
|
], b);
|
|
294
|
-
class
|
|
294
|
+
class Z extends M {
|
|
295
295
|
getURL() {
|
|
296
296
|
return new URL(window.location.href);
|
|
297
297
|
}
|
|
@@ -302,10 +302,10 @@ class Y extends M {
|
|
|
302
302
|
return this._commandService.executeCommand(v.id);
|
|
303
303
|
}
|
|
304
304
|
paste() {
|
|
305
|
-
return this._commandService.executeCommand(
|
|
305
|
+
return this._commandService.executeCommand(_.id);
|
|
306
306
|
}
|
|
307
307
|
createMenu(e) {
|
|
308
|
-
return this._injector.createInstance(
|
|
308
|
+
return this._injector.createInstance(p, e);
|
|
309
309
|
}
|
|
310
310
|
createSubmenu(e) {
|
|
311
311
|
return this._injector.createInstance(l, e);
|
|
@@ -349,9 +349,18 @@ class Y extends M {
|
|
|
349
349
|
throw new Error("Unit not found");
|
|
350
350
|
this._univerInstanceService.setCurrentUnitForType(e);
|
|
351
351
|
}
|
|
352
|
+
addFonts(e) {
|
|
353
|
+
const t = this._injector.get(K);
|
|
354
|
+
e.forEach((r) => {
|
|
355
|
+
t.addFont({
|
|
356
|
+
...r,
|
|
357
|
+
isCustom: !0
|
|
358
|
+
});
|
|
359
|
+
});
|
|
360
|
+
}
|
|
352
361
|
}
|
|
353
|
-
M.extend(
|
|
354
|
-
class
|
|
362
|
+
M.extend(Z);
|
|
363
|
+
class ee extends j {
|
|
355
364
|
onBeforeCopy(e) {
|
|
356
365
|
return this._injector.get(u).beforeCommandExecuted((r) => {
|
|
357
366
|
r.id === v.id && e();
|
|
@@ -364,22 +373,22 @@ class Z extends j {
|
|
|
364
373
|
}
|
|
365
374
|
onBeforePaste(e) {
|
|
366
375
|
return this._injector.get(u).beforeCommandExecuted((r) => {
|
|
367
|
-
r.id ===
|
|
376
|
+
r.id === _.id && e();
|
|
368
377
|
});
|
|
369
378
|
}
|
|
370
379
|
onPaste(e) {
|
|
371
380
|
return this._injector.get(u).onCommandExecuted((r) => {
|
|
372
|
-
(r.id ===
|
|
381
|
+
(r.id === _.id || r.id === k) && e();
|
|
373
382
|
});
|
|
374
383
|
}
|
|
375
384
|
}
|
|
376
|
-
j.extend(
|
|
377
|
-
class
|
|
385
|
+
j.extend(ee);
|
|
386
|
+
class te extends y {
|
|
378
387
|
get BuiltInUIPart() {
|
|
379
|
-
return
|
|
388
|
+
return L;
|
|
380
389
|
}
|
|
381
390
|
get KeyCode() {
|
|
382
|
-
return
|
|
391
|
+
return A;
|
|
383
392
|
}
|
|
384
393
|
}
|
|
385
|
-
y.extend(
|
|
394
|
+
y.extend(te);
|