@univerjs/drawing-ui 1.0.0-rc.0 → 1.0.1
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 +3939 -2385
- package/lib/cjs/locale/ar-SA.js +6 -1
- package/lib/cjs/locale/ca-ES.js +6 -1
- package/lib/cjs/locale/de-DE.js +6 -1
- package/lib/cjs/locale/en-US.js +6 -1
- package/lib/cjs/locale/es-ES.js +6 -1
- package/lib/cjs/locale/fa-IR.js +6 -1
- package/lib/cjs/locale/fr-FR.js +6 -1
- package/lib/cjs/locale/id-ID.js +6 -1
- package/lib/cjs/locale/it-IT.js +6 -1
- package/lib/cjs/locale/ja-JP.js +6 -1
- package/lib/cjs/locale/ko-KR.js +6 -1
- package/lib/cjs/locale/pl-PL.js +6 -1
- package/lib/cjs/locale/pt-BR.js +6 -1
- package/lib/cjs/locale/ru-RU.js +6 -1
- package/lib/cjs/locale/sk-SK.js +6 -1
- package/lib/cjs/locale/vi-VN.js +6 -1
- package/lib/cjs/locale/zh-CN.js +6 -1
- package/lib/cjs/locale/zh-HK.js +6 -1
- package/lib/cjs/locale/zh-TW.js +6 -1
- package/lib/es/index.js +3944 -2390
- package/lib/es/locale/ar-SA.js +6 -0
- package/lib/es/locale/ca-ES.js +6 -0
- package/lib/es/locale/de-DE.js +6 -0
- package/lib/es/locale/en-US.js +6 -0
- package/lib/es/locale/es-ES.js +6 -0
- package/lib/es/locale/fa-IR.js +6 -0
- package/lib/es/locale/fr-FR.js +6 -0
- package/lib/es/locale/id-ID.js +6 -0
- package/lib/es/locale/it-IT.js +6 -0
- package/lib/es/locale/ja-JP.js +6 -0
- package/lib/es/locale/ko-KR.js +6 -0
- package/lib/es/locale/pl-PL.js +6 -0
- package/lib/es/locale/pt-BR.js +6 -0
- package/lib/es/locale/ru-RU.js +6 -0
- package/lib/es/locale/sk-SK.js +6 -0
- package/lib/es/locale/vi-VN.js +6 -0
- package/lib/es/locale/zh-CN.js +6 -0
- package/lib/es/locale/zh-HK.js +6 -0
- package/lib/es/locale/zh-TW.js +6 -0
- package/lib/index.css +135 -0
- package/lib/index.js +3944 -2390
- package/lib/locale/ar-SA.js +6 -0
- package/lib/locale/ca-ES.js +6 -0
- package/lib/locale/de-DE.js +6 -0
- package/lib/locale/en-US.js +6 -0
- package/lib/locale/es-ES.js +6 -0
- package/lib/locale/fa-IR.js +6 -0
- package/lib/locale/fr-FR.js +6 -0
- package/lib/locale/id-ID.js +6 -0
- package/lib/locale/it-IT.js +6 -0
- package/lib/locale/ja-JP.js +6 -0
- package/lib/locale/ko-KR.js +6 -0
- package/lib/locale/pl-PL.js +6 -0
- package/lib/locale/pt-BR.js +6 -0
- package/lib/locale/ru-RU.js +6 -0
- package/lib/locale/sk-SK.js +6 -0
- package/lib/locale/vi-VN.js +6 -0
- package/lib/locale/zh-CN.js +6 -0
- package/lib/locale/zh-HK.js +6 -0
- package/lib/locale/zh-TW.js +6 -0
- package/lib/types/commands/operations/drawing-group.operation.d.ts +1 -1
- package/lib/types/controllers/image-cropper.controller.d.ts +2 -1
- package/lib/types/controllers/image-update.controller.d.ts +2 -5
- package/lib/types/controllers/mobile/image-cropper.controller.d.ts +51 -0
- package/lib/types/controllers/mobile/image-update.controller.d.ts +39 -0
- package/lib/types/controllers/mobile/ui.controller.d.ts +27 -0
- package/lib/types/controllers/utils.d.ts +5 -3
- package/lib/types/index.d.ts +4 -1
- package/lib/types/locale/en-US.d.ts +6 -0
- package/lib/types/utils/image-crop-transform.d.ts +31 -0
- package/lib/types/views/crop/MobileCropActions.d.ts +16 -0
- package/lib/types/views/image-popup-menu/ImagePopupMenu.d.ts +2 -1
- package/lib/types/views/image-popup-menu/MobileImagePopupMenu.d.ts +2 -1
- package/lib/types/views/image-preview/mobile-image-preview-button.d.ts +37 -0
- package/lib/types/views/object-list-panel/MobileObjectListPanel.d.ts +17 -0
- package/lib/types/views/object-list-panel/ObjectListPanelBase.d.ts +71 -6
- package/lib/types/views/panel/DrawingCommonPanel.d.ts +1 -0
- package/lib/types/views/panel/ImageCropper.d.ts +1 -0
- package/lib/types/views/panel/MobileDrawingArrange.d.ts +22 -0
- package/lib/types/views/panel/MobileDrawingControls.d.ts +32 -0
- package/lib/types/views/panel/MobileImageCropper.d.ts +17 -0
- package/lib/types/views/panel/component-name.d.ts +20 -0
- package/lib/types/views/panel/use-image-cropper.d.ts +31 -0
- package/lib/umd/index.js +8 -2
- package/lib/umd/locale/ar-SA.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.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/id-ID.js +1 -1
- package/lib/umd/locale/it-IT.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/pl-PL.js +1 -1
- package/lib/umd/locale/pt-BR.js +1 -1
- 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 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +10 -10
package/lib/locale/ar-SA.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
//#region src/locale/ar-SA.ts
|
|
2
2
|
const locale = { "drawing-ui": {
|
|
3
|
+
mobile: {
|
|
4
|
+
close: "إغلاق",
|
|
5
|
+
more: "المزيد"
|
|
6
|
+
},
|
|
3
7
|
"image-cropper": { error: "لا يمكن قص الكائنات غير الصورية." },
|
|
4
8
|
objectListPanel: {
|
|
5
9
|
title: "الطبقات",
|
|
@@ -68,6 +72,8 @@ const locale = { "drawing-ui": {
|
|
|
68
72
|
lock: "قفل النسبة (%)"
|
|
69
73
|
},
|
|
70
74
|
crop: {
|
|
75
|
+
cancel: "إلغاء",
|
|
76
|
+
apply: "تم",
|
|
71
77
|
title: "قص",
|
|
72
78
|
start: "بدء القص",
|
|
73
79
|
mode: "حر"
|
package/lib/locale/ca-ES.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
//#region src/locale/ca-ES.ts
|
|
2
2
|
const locale = { "drawing-ui": {
|
|
3
|
+
mobile: {
|
|
4
|
+
close: "Tanca",
|
|
5
|
+
more: "Més"
|
|
6
|
+
},
|
|
3
7
|
"image-cropper": { error: "No es poden retallar objectes que no siguin imatges." },
|
|
4
8
|
objectListPanel: {
|
|
5
9
|
title: "Capes",
|
|
@@ -68,6 +72,8 @@ const locale = { "drawing-ui": {
|
|
|
68
72
|
lock: "Bloca proporció (%)"
|
|
69
73
|
},
|
|
70
74
|
crop: {
|
|
75
|
+
cancel: "Cancel·la",
|
|
76
|
+
apply: "Fet",
|
|
71
77
|
title: "Retalla",
|
|
72
78
|
start: "Inicia retallada",
|
|
73
79
|
mode: "Lliure"
|
package/lib/locale/de-DE.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
//#region src/locale/de-DE.ts
|
|
2
2
|
const locale = { "drawing-ui": {
|
|
3
|
+
mobile: {
|
|
4
|
+
close: "Schließen",
|
|
5
|
+
more: "Mehr"
|
|
6
|
+
},
|
|
3
7
|
"image-cropper": { error: "Nicht-Bildobjekte können nicht zugeschnitten werden." },
|
|
4
8
|
objectListPanel: {
|
|
5
9
|
title: "Ebenen",
|
|
@@ -68,6 +72,8 @@ const locale = { "drawing-ui": {
|
|
|
68
72
|
lock: "Verhältnis sperren (%)"
|
|
69
73
|
},
|
|
70
74
|
crop: {
|
|
75
|
+
cancel: "Abbrechen",
|
|
76
|
+
apply: "Fertig",
|
|
71
77
|
title: "Zuschneiden",
|
|
72
78
|
start: "Zuschneiden starten",
|
|
73
79
|
mode: "Frei"
|
package/lib/locale/en-US.js
CHANGED
|
@@ -15,6 +15,10 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
const locale = { "drawing-ui": {
|
|
18
|
+
mobile: {
|
|
19
|
+
close: "Close",
|
|
20
|
+
more: "More"
|
|
21
|
+
},
|
|
18
22
|
"image-cropper": { error: "Cannot crop non-image objects." },
|
|
19
23
|
objectListPanel: {
|
|
20
24
|
title: "Layers",
|
|
@@ -83,6 +87,8 @@ const locale = { "drawing-ui": {
|
|
|
83
87
|
lock: "Lock Ratio (%)"
|
|
84
88
|
},
|
|
85
89
|
crop: {
|
|
90
|
+
cancel: "Cancel",
|
|
91
|
+
apply: "Done",
|
|
86
92
|
title: "Crop",
|
|
87
93
|
start: "Start Crop",
|
|
88
94
|
mode: "Free"
|
package/lib/locale/es-ES.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
//#region src/locale/es-ES.ts
|
|
2
2
|
const locale = { "drawing-ui": {
|
|
3
|
+
mobile: {
|
|
4
|
+
close: "Cerrar",
|
|
5
|
+
more: "Más"
|
|
6
|
+
},
|
|
3
7
|
"image-cropper": { error: "No se pueden recortar objetos que no sean imágenes." },
|
|
4
8
|
objectListPanel: {
|
|
5
9
|
title: "Capas",
|
|
@@ -68,6 +72,8 @@ const locale = { "drawing-ui": {
|
|
|
68
72
|
lock: "Bloquear proporción (%)"
|
|
69
73
|
},
|
|
70
74
|
crop: {
|
|
75
|
+
cancel: "Cancelar",
|
|
76
|
+
apply: "Listo",
|
|
71
77
|
title: "Recortar",
|
|
72
78
|
start: "Iniciar recorte",
|
|
73
79
|
mode: "Libre"
|
package/lib/locale/fa-IR.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
//#region src/locale/fa-IR.ts
|
|
2
2
|
const locale = { "drawing-ui": {
|
|
3
|
+
mobile: {
|
|
4
|
+
close: "بستن",
|
|
5
|
+
more: "بیشتر"
|
|
6
|
+
},
|
|
3
7
|
"image-cropper": { error: "کراپ کردن اشیاء غیرتصویری امکانپذیر نیست." },
|
|
4
8
|
objectListPanel: {
|
|
5
9
|
title: "لایهها",
|
|
@@ -68,6 +72,8 @@ const locale = { "drawing-ui": {
|
|
|
68
72
|
lock: "قفل نسبت (%)"
|
|
69
73
|
},
|
|
70
74
|
crop: {
|
|
75
|
+
cancel: "لغو",
|
|
76
|
+
apply: "انجام شد",
|
|
71
77
|
title: "کراپ",
|
|
72
78
|
start: "شروع کراپ",
|
|
73
79
|
mode: "آزاد"
|
package/lib/locale/fr-FR.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
//#region src/locale/fr-FR.ts
|
|
2
2
|
const locale = { "drawing-ui": {
|
|
3
|
+
mobile: {
|
|
4
|
+
close: "Fermer",
|
|
5
|
+
more: "Plus"
|
|
6
|
+
},
|
|
3
7
|
"image-cropper": { error: "Impossible de rogner des objets non image." },
|
|
4
8
|
objectListPanel: {
|
|
5
9
|
title: "Calques",
|
|
@@ -68,6 +72,8 @@ const locale = { "drawing-ui": {
|
|
|
68
72
|
lock: "Verrouiller le ratio (%)"
|
|
69
73
|
},
|
|
70
74
|
crop: {
|
|
75
|
+
cancel: "Annuler",
|
|
76
|
+
apply: "Terminé",
|
|
71
77
|
title: "Rogner",
|
|
72
78
|
start: "Commencer à rogner",
|
|
73
79
|
mode: "Libre"
|
package/lib/locale/id-ID.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
//#region src/locale/id-ID.ts
|
|
2
2
|
const locale = { "drawing-ui": {
|
|
3
|
+
mobile: {
|
|
4
|
+
close: "Tutup",
|
|
5
|
+
more: "Lebih Banyak"
|
|
6
|
+
},
|
|
3
7
|
"image-cropper": { error: "Tidak dapat memangkas objek non-gambar." },
|
|
4
8
|
objectListPanel: {
|
|
5
9
|
title: "Lapisan",
|
|
@@ -68,6 +72,8 @@ const locale = { "drawing-ui": {
|
|
|
68
72
|
lock: "Kunci Rasio (%)"
|
|
69
73
|
},
|
|
70
74
|
crop: {
|
|
75
|
+
cancel: "Batal",
|
|
76
|
+
apply: "Selesai",
|
|
71
77
|
title: "Pangkas",
|
|
72
78
|
start: "Mulai Pangkas",
|
|
73
79
|
mode: "Bebas"
|
package/lib/locale/it-IT.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
//#region src/locale/it-IT.ts
|
|
2
2
|
const locale = { "drawing-ui": {
|
|
3
|
+
mobile: {
|
|
4
|
+
close: "Chiudi",
|
|
5
|
+
more: "Altro"
|
|
6
|
+
},
|
|
3
7
|
"image-cropper": { error: "Impossibile ritagliare oggetti non immagine." },
|
|
4
8
|
objectListPanel: {
|
|
5
9
|
title: "Livelli",
|
|
@@ -68,6 +72,8 @@ const locale = { "drawing-ui": {
|
|
|
68
72
|
lock: "Blocca proporzioni (%)"
|
|
69
73
|
},
|
|
70
74
|
crop: {
|
|
75
|
+
cancel: "Annulla",
|
|
76
|
+
apply: "Fine",
|
|
71
77
|
title: "Ritaglia",
|
|
72
78
|
start: "Inizia ritaglio",
|
|
73
79
|
mode: "Libero"
|
package/lib/locale/ja-JP.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
//#region src/locale/ja-JP.ts
|
|
2
2
|
const locale = { "drawing-ui": {
|
|
3
|
+
mobile: {
|
|
4
|
+
close: "閉じる",
|
|
5
|
+
more: "もっと見る"
|
|
6
|
+
},
|
|
3
7
|
"image-cropper": { error: "画像以外のオブジェクトはトリミングできません。" },
|
|
4
8
|
objectListPanel: {
|
|
5
9
|
title: "レイヤー",
|
|
@@ -68,6 +72,8 @@ const locale = { "drawing-ui": {
|
|
|
68
72
|
lock: "縦横比を固定 (%)"
|
|
69
73
|
},
|
|
70
74
|
crop: {
|
|
75
|
+
cancel: "キャンセル",
|
|
76
|
+
apply: "完了",
|
|
71
77
|
title: "トリミング",
|
|
72
78
|
start: "トリミングを開始",
|
|
73
79
|
mode: "自由モード"
|
package/lib/locale/ko-KR.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
//#region src/locale/ko-KR.ts
|
|
2
2
|
const locale = { "drawing-ui": {
|
|
3
|
+
mobile: {
|
|
4
|
+
close: "닫기",
|
|
5
|
+
more: "더 보기"
|
|
6
|
+
},
|
|
3
7
|
"image-cropper": { error: "이미지가 아닌 객체는 자를 수 없습니다." },
|
|
4
8
|
objectListPanel: {
|
|
5
9
|
title: "레이어",
|
|
@@ -68,6 +72,8 @@ const locale = { "drawing-ui": {
|
|
|
68
72
|
lock: "비율 고정 (%)"
|
|
69
73
|
},
|
|
70
74
|
crop: {
|
|
75
|
+
cancel: "취소",
|
|
76
|
+
apply: "완료",
|
|
71
77
|
title: "자르기",
|
|
72
78
|
start: "자르기 시작",
|
|
73
79
|
mode: "자유 모드"
|
package/lib/locale/pl-PL.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
//#region src/locale/pl-PL.ts
|
|
2
2
|
const locale = { "drawing-ui": {
|
|
3
|
+
mobile: {
|
|
4
|
+
close: "Zamknij",
|
|
5
|
+
more: "Więcej"
|
|
6
|
+
},
|
|
3
7
|
"image-cropper": { error: "Nie można przyciąć obiektów innych niż obraz." },
|
|
4
8
|
objectListPanel: {
|
|
5
9
|
title: "Warstwy",
|
|
@@ -68,6 +72,8 @@ const locale = { "drawing-ui": {
|
|
|
68
72
|
lock: "Zablokuj proporcje (%)"
|
|
69
73
|
},
|
|
70
74
|
crop: {
|
|
75
|
+
cancel: "Anuluj",
|
|
76
|
+
apply: "Gotowe",
|
|
71
77
|
title: "Przytnij",
|
|
72
78
|
start: "Rozpocznij przycinanie",
|
|
73
79
|
mode: "Dowolny"
|
package/lib/locale/pt-BR.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
//#region src/locale/pt-BR.ts
|
|
2
2
|
const locale = { "drawing-ui": {
|
|
3
|
+
mobile: {
|
|
4
|
+
close: "Fechar",
|
|
5
|
+
more: "Mais"
|
|
6
|
+
},
|
|
3
7
|
"image-cropper": { error: "Não é possível cortar objetos que não são imagens." },
|
|
4
8
|
objectListPanel: {
|
|
5
9
|
title: "Camadas",
|
|
@@ -68,6 +72,8 @@ const locale = { "drawing-ui": {
|
|
|
68
72
|
lock: "Bloquear proporção (%)"
|
|
69
73
|
},
|
|
70
74
|
crop: {
|
|
75
|
+
cancel: "Cancelar",
|
|
76
|
+
apply: "Concluído",
|
|
71
77
|
title: "Cortar",
|
|
72
78
|
start: "Iniciar corte",
|
|
73
79
|
mode: "Livre"
|
package/lib/locale/ru-RU.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
//#region src/locale/ru-RU.ts
|
|
2
2
|
const locale = { "drawing-ui": {
|
|
3
|
+
mobile: {
|
|
4
|
+
close: "Закрыть",
|
|
5
|
+
more: "Больше"
|
|
6
|
+
},
|
|
3
7
|
"image-cropper": { error: "Невозможно обрезать не изображения." },
|
|
4
8
|
objectListPanel: {
|
|
5
9
|
title: "Слои",
|
|
@@ -68,6 +72,8 @@ const locale = { "drawing-ui": {
|
|
|
68
72
|
lock: "Заблокировать пропорции (%)"
|
|
69
73
|
},
|
|
70
74
|
crop: {
|
|
75
|
+
cancel: "Отмена",
|
|
76
|
+
apply: "Готово",
|
|
71
77
|
title: "Обрезка",
|
|
72
78
|
start: "Начать обрезку",
|
|
73
79
|
mode: "Свободный"
|
package/lib/locale/sk-SK.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
//#region src/locale/sk-SK.ts
|
|
2
2
|
const locale = { "drawing-ui": {
|
|
3
|
+
mobile: {
|
|
4
|
+
close: "Zavrieť",
|
|
5
|
+
more: "Viac"
|
|
6
|
+
},
|
|
3
7
|
"image-cropper": { error: "Nedá sa orezať neobrázkový objekt." },
|
|
4
8
|
objectListPanel: {
|
|
5
9
|
title: "Vrstvy",
|
|
@@ -68,6 +72,8 @@ const locale = { "drawing-ui": {
|
|
|
68
72
|
lock: "Uzamknúť pomer (%)"
|
|
69
73
|
},
|
|
70
74
|
crop: {
|
|
75
|
+
cancel: "Zrušiť",
|
|
76
|
+
apply: "Hotovo",
|
|
71
77
|
title: "Orezanie",
|
|
72
78
|
start: "Začať orezanie",
|
|
73
79
|
mode: "Voľne"
|
package/lib/locale/vi-VN.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
//#region src/locale/vi-VN.ts
|
|
2
2
|
const locale = { "drawing-ui": {
|
|
3
|
+
mobile: {
|
|
4
|
+
close: "Đóng",
|
|
5
|
+
more: "Thêm"
|
|
6
|
+
},
|
|
3
7
|
"image-cropper": { error: "Không thể cắt phần tử không phải hình ảnh" },
|
|
4
8
|
objectListPanel: {
|
|
5
9
|
title: "Lớp",
|
|
@@ -68,6 +72,8 @@ const locale = { "drawing-ui": {
|
|
|
68
72
|
lock: "Khóa tỷ lệ (%)"
|
|
69
73
|
},
|
|
70
74
|
crop: {
|
|
75
|
+
cancel: "Hủy",
|
|
76
|
+
apply: "Xong",
|
|
71
77
|
title: "Cắt",
|
|
72
78
|
start: "Bắt đầu cắt",
|
|
73
79
|
mode: "Cắt tự do tỷ lệ"
|
package/lib/locale/zh-CN.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
//#region src/locale/zh-CN.ts
|
|
2
2
|
const locale = { "drawing-ui": {
|
|
3
|
+
mobile: {
|
|
4
|
+
close: "关闭",
|
|
5
|
+
more: "更多"
|
|
6
|
+
},
|
|
3
7
|
"image-cropper": { error: "无法裁剪非图片元素" },
|
|
4
8
|
objectListPanel: {
|
|
5
9
|
title: "图层",
|
|
@@ -68,6 +72,8 @@ const locale = { "drawing-ui": {
|
|
|
68
72
|
lock: "锁定比例 (%)"
|
|
69
73
|
},
|
|
70
74
|
crop: {
|
|
75
|
+
cancel: "取消",
|
|
76
|
+
apply: "完成",
|
|
71
77
|
title: "裁剪",
|
|
72
78
|
start: "开始裁剪",
|
|
73
79
|
mode: "自由比例裁剪"
|
package/lib/locale/zh-HK.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
//#region src/locale/zh-HK.ts
|
|
2
2
|
const locale = { "drawing-ui": {
|
|
3
|
+
mobile: {
|
|
4
|
+
close: "關閉",
|
|
5
|
+
more: "更多"
|
|
6
|
+
},
|
|
3
7
|
"image-cropper": { error: "無法裁切非圖片元素" },
|
|
4
8
|
objectListPanel: {
|
|
5
9
|
title: "圖層",
|
|
@@ -68,6 +72,8 @@ const locale = { "drawing-ui": {
|
|
|
68
72
|
lock: "鎖定比例 (%)"
|
|
69
73
|
},
|
|
70
74
|
crop: {
|
|
75
|
+
cancel: "取消",
|
|
76
|
+
apply: "完成",
|
|
71
77
|
title: "裁切",
|
|
72
78
|
start: "開始裁切",
|
|
73
79
|
mode: "自由比例裁切"
|
package/lib/locale/zh-TW.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
//#region src/locale/zh-TW.ts
|
|
2
2
|
const locale = { "drawing-ui": {
|
|
3
|
+
mobile: {
|
|
4
|
+
close: "關閉",
|
|
5
|
+
more: "更多"
|
|
6
|
+
},
|
|
3
7
|
"image-cropper": { error: "無法裁切非圖片元素" },
|
|
4
8
|
objectListPanel: {
|
|
5
9
|
title: "圖層",
|
|
@@ -68,6 +72,8 @@ const locale = { "drawing-ui": {
|
|
|
68
72
|
lock: "鎖定比例 (%)"
|
|
69
73
|
},
|
|
70
74
|
crop: {
|
|
75
|
+
cancel: "取消",
|
|
76
|
+
apply: "完成",
|
|
71
77
|
title: "裁切",
|
|
72
78
|
start: "開始裁切",
|
|
73
79
|
mode: "自由比例裁切"
|
|
@@ -18,7 +18,7 @@ import { DrawingTypeEnum } from '@univerjs/core';
|
|
|
18
18
|
/**
|
|
19
19
|
* Now only support grouping images, shapes, charts, and groups.
|
|
20
20
|
*/
|
|
21
|
-
export declare const DRAWING_GROUP_TYPES: readonly [DrawingTypeEnum.DRAWING_IMAGE, DrawingTypeEnum.DRAWING_SHAPE, DrawingTypeEnum.DRAWING_CHART, DrawingTypeEnum.DRAWING_GROUP];
|
|
21
|
+
export declare const DRAWING_GROUP_TYPES: readonly [DrawingTypeEnum.DRAWING_IMAGE, DrawingTypeEnum.DRAWING_SHAPE, DrawingTypeEnum.DRAWING_CHART, DrawingTypeEnum.DRAWING_SLICER, DrawingTypeEnum.DRAWING_TIMELINE, DrawingTypeEnum.DRAWING_GROUP];
|
|
22
22
|
export interface IDrawingGroupOperationParams {
|
|
23
23
|
drawings?: IDrawingParam[];
|
|
24
24
|
}
|
|
@@ -31,6 +31,8 @@ export declare class ImageCropperController extends Disposable {
|
|
|
31
31
|
private readonly _cropSnapshots;
|
|
32
32
|
private _pendingCropSnapshot;
|
|
33
33
|
private _activeCropSession;
|
|
34
|
+
private readonly _cropping$;
|
|
35
|
+
readonly cropping$: import("rxjs").Observable<boolean>;
|
|
34
36
|
constructor(_commandService: ICommandService, _drawingManagerService: IDrawingManagerService, _renderManagerService: IRenderManagerService, _univerInstanceService: IUniverInstanceService, _messageService: IMessageService, _localeService: LocaleService, _shortcutService: IShortcutService, _layoutService: ILayoutService);
|
|
35
37
|
private _init;
|
|
36
38
|
private _initAutoCrop;
|
|
@@ -46,5 +48,4 @@ export declare class ImageCropperController extends Disposable {
|
|
|
46
48
|
private _addListenerOnImage;
|
|
47
49
|
private _addHoverForImageCopper;
|
|
48
50
|
private _endCropListener;
|
|
49
|
-
private _getSrcRectByTransformState;
|
|
50
51
|
}
|
|
@@ -13,20 +13,17 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { Disposable, ICommandService,
|
|
16
|
+
import { Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
|
|
17
17
|
import { IDrawingManagerService } from '@univerjs/drawing';
|
|
18
18
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
19
|
-
import { IDialogService } from '@univerjs/ui';
|
|
20
19
|
import { DrawingRenderService } from '../services/drawing-render.service';
|
|
21
20
|
export declare class ImageUpdateController extends Disposable {
|
|
22
21
|
private readonly _commandService;
|
|
23
22
|
private readonly _renderManagerService;
|
|
24
23
|
private readonly _drawingManagerService;
|
|
25
|
-
private readonly _dialogService;
|
|
26
|
-
private readonly _imageIoService;
|
|
27
24
|
private readonly _currentUniverService;
|
|
28
25
|
private readonly _drawingRenderService;
|
|
29
|
-
constructor(_commandService: ICommandService, _renderManagerService: IRenderManagerService, _drawingManagerService: IDrawingManagerService,
|
|
26
|
+
constructor(_commandService: ICommandService, _renderManagerService: IRenderManagerService, _drawingManagerService: IDrawingManagerService, _currentUniverService: IUniverInstanceService, _drawingRenderService: DrawingRenderService);
|
|
30
27
|
dispose(): void;
|
|
31
28
|
private _initialize;
|
|
32
29
|
private _commandExecutedListener;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { Disposable, ICommandService, IUniverInstanceService, LocaleService } from '@univerjs/core';
|
|
17
|
+
import { IDrawingManagerService } from '@univerjs/drawing';
|
|
18
|
+
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
19
|
+
import { ILayoutService, IMessageService, IShortcutService } from '@univerjs/ui';
|
|
20
|
+
export declare class MobileImageCropperController extends Disposable {
|
|
21
|
+
private readonly _commandService;
|
|
22
|
+
private readonly _drawingManagerService;
|
|
23
|
+
private readonly _renderManagerService;
|
|
24
|
+
private readonly _univerInstanceService;
|
|
25
|
+
private readonly _messageService;
|
|
26
|
+
private readonly _localeService;
|
|
27
|
+
private readonly _shortcutService;
|
|
28
|
+
private readonly _layoutService;
|
|
29
|
+
private _sceneListenerOnImageMap;
|
|
30
|
+
private readonly _cropShortcutDisposables;
|
|
31
|
+
private readonly _cropSnapshots;
|
|
32
|
+
private _pendingCropSnapshot;
|
|
33
|
+
private _activeCropSession;
|
|
34
|
+
private readonly _cropping$;
|
|
35
|
+
readonly cropping$: import("rxjs").Observable<boolean>;
|
|
36
|
+
constructor(_commandService: ICommandService, _drawingManagerService: IDrawingManagerService, _renderManagerService: IRenderManagerService, _univerInstanceService: IUniverInstanceService, _messageService: IMessageService, _localeService: LocaleService, _shortcutService: IShortcutService, _layoutService: ILayoutService);
|
|
37
|
+
private _init;
|
|
38
|
+
private _initAutoCrop;
|
|
39
|
+
private _calculateSrcRectByRatio;
|
|
40
|
+
private _updateCropperObject;
|
|
41
|
+
private _initOpenCrop;
|
|
42
|
+
private _searchCropObject;
|
|
43
|
+
private _initCloseCrop;
|
|
44
|
+
private _getApplyObjectByCropObject;
|
|
45
|
+
private _captureCropSnapshot;
|
|
46
|
+
private _restoreCropSnapshot;
|
|
47
|
+
private _registerCropShortcuts;
|
|
48
|
+
private _addListenerOnImage;
|
|
49
|
+
private _addHoverForImageCopper;
|
|
50
|
+
private _endCropListener;
|
|
51
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { Disposable, ICommandService, IUniverInstanceService, ThemeService } from '@univerjs/core';
|
|
17
|
+
import { IDrawingManagerService } from '@univerjs/drawing';
|
|
18
|
+
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
19
|
+
import { DrawingRenderService } from '../../services/drawing-render.service';
|
|
20
|
+
import { MobileImageCropperController } from './image-cropper.controller';
|
|
21
|
+
export declare class MobileImageUpdateController extends Disposable {
|
|
22
|
+
private readonly _commandService;
|
|
23
|
+
private readonly _renderManagerService;
|
|
24
|
+
private readonly _drawingManagerService;
|
|
25
|
+
private readonly _currentUniverService;
|
|
26
|
+
private readonly _drawingRenderService;
|
|
27
|
+
private readonly _themeService;
|
|
28
|
+
private readonly _imageCropperController;
|
|
29
|
+
constructor(_commandService: ICommandService, _renderManagerService: IRenderManagerService, _drawingManagerService: IDrawingManagerService, _currentUniverService: IUniverInstanceService, _drawingRenderService: DrawingRenderService, _themeService: ThemeService, _imageCropperController: MobileImageCropperController);
|
|
30
|
+
private _initialize;
|
|
31
|
+
private _commandExecutedListener;
|
|
32
|
+
private _getSceneAndTransformerByDrawingSearch;
|
|
33
|
+
private _resetImageSize;
|
|
34
|
+
private _drawingAddListener;
|
|
35
|
+
private _insertImages;
|
|
36
|
+
private _imageUpdateListener;
|
|
37
|
+
private _addHoverForImage;
|
|
38
|
+
private _addDialogForImage;
|
|
39
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { Disposable, ICommandService, Injector } from '@univerjs/core';
|
|
17
|
+
import { IMenuManagerService, IUIPartsService } from '@univerjs/ui';
|
|
18
|
+
export declare class MobileDrawingUIController extends Disposable {
|
|
19
|
+
private readonly _commandService;
|
|
20
|
+
private readonly _menuManagerService;
|
|
21
|
+
private readonly _uiPartsService;
|
|
22
|
+
private readonly _injector;
|
|
23
|
+
constructor(_commandService: ICommandService, _menuManagerService: IMenuManagerService, _uiPartsService: IUIPartsService, _injector: Injector);
|
|
24
|
+
private _initMenus;
|
|
25
|
+
private _initCommands;
|
|
26
|
+
private _initUiParts;
|
|
27
|
+
}
|
|
@@ -16,12 +16,14 @@
|
|
|
16
16
|
import type { IDrawingParam, IDrawingSearch, IUniverInstanceService, Nullable } from '@univerjs/core';
|
|
17
17
|
import type { IDrawingManagerService } from '@univerjs/drawing';
|
|
18
18
|
import type { BaseObject, Scene } from '@univerjs/engine-render';
|
|
19
|
-
import { UniverInstanceType } from '@univerjs/core';
|
|
19
|
+
import { BooleanNumber, UniverInstanceType } from '@univerjs/core';
|
|
20
20
|
import { Group } from '@univerjs/engine-render';
|
|
21
21
|
export declare function getDrawingRenderObject(scene: Scene, drawingSearch: IDrawingSearch): BaseObject | null;
|
|
22
|
-
export declare function disposeDrawingRenderObject(scene: Scene, drawingSearch: IDrawingSearch
|
|
22
|
+
export declare function disposeDrawingRenderObject(scene: Scene, drawingSearch: IDrawingSearch & {
|
|
23
|
+
isMultiTransform?: BooleanNumber;
|
|
24
|
+
}): boolean;
|
|
23
25
|
export declare function syncGroupRotateEnabled(group: Group, groupParam: IDrawingParam, scene: Scene, drawingManagerService: IDrawingManagerService, children?: readonly IDrawingParam[]): void;
|
|
24
|
-
export declare function insertGroupObject(objectParam: IDrawingSearch, object: BaseObject, scene: Scene, drawingManagerService: IDrawingManagerService): void;
|
|
26
|
+
export declare function insertGroupObject(objectParam: IDrawingSearch, object: BaseObject, scene: Scene, drawingManagerService: IDrawingManagerService, transformIndex?: number, attachTransformer?: boolean): void;
|
|
25
27
|
export declare function getCurrentUnitInfo(currentUniverService: IUniverInstanceService, propUnitId?: string): {
|
|
26
28
|
unitId: string;
|
|
27
29
|
subUnitId: Nullable<string>;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -31,10 +31,13 @@ export type { ImageShapeClipDelegate } from './services/drawing-image-clip.servi
|
|
|
31
31
|
export { DrawingRenderService } from './services/drawing-render.service';
|
|
32
32
|
export { extractClipboardHtmlImageFiles, extractClipboardImageFiles, extractClipboardTextImageFile, isClipboardTextImage, isImageOnlyClipboardHtml, normalizeClipboardImageFile, svgImageFileToDataUrl, writeImageSourceToClipboard, } from './utils/clipboard-image';
|
|
33
33
|
export { getUpdateParams } from './utils/get-update-params';
|
|
34
|
+
export { getImageCropRect } from './utils/image-crop-transform';
|
|
34
35
|
export { ImageCropperObject } from './views/crop/image-cropper-object';
|
|
35
36
|
export { COMPONENT_IMAGE_POPUP_MENU, COMPONENT_MOBILE_IMAGE_POPUP_MENU, } from './views/image-popup-menu/component-name';
|
|
37
|
+
export type { IImagePopupMenuItem } from './views/image-popup-menu/ImagePopupMenu';
|
|
38
|
+
export { MobileObjectListPanel } from './views/object-list-panel/MobileObjectListPanel';
|
|
36
39
|
export { getObjectListPanelSectionIdForDrawingType, isFloatingObjectListDrawingType, OBJECT_LIST_CANVAS_SECTION_ID, OBJECT_LIST_FLOATING_SECTION_ID, } from './views/object-list-panel/object-list-panel-layer';
|
|
37
40
|
export type { ObjectListPanelSectionId } from './views/object-list-panel/object-list-panel-layer';
|
|
38
|
-
export {
|
|
41
|
+
export { ObjectListPanelBase, } from './views/object-list-panel/ObjectListPanelBase';
|
|
39
42
|
export type { IDrawingObjectListItem, IDrawingObjectListPanelLabels, IDrawingObjectListPanelProps, IObjectListPanelBaseProps, IObjectListPanelItem, IObjectListPanelLabels, ObjectListPanelTypeNameKey, } from './views/object-list-panel/ObjectListPanelBase';
|
|
40
43
|
export { DrawingCommonPanel } from './views/panel/DrawingCommonPanel';
|
|
@@ -15,6 +15,10 @@
|
|
|
15
15
|
*/
|
|
16
16
|
declare const locale: {
|
|
17
17
|
'drawing-ui': {
|
|
18
|
+
mobile: {
|
|
19
|
+
close: string;
|
|
20
|
+
more: string;
|
|
21
|
+
};
|
|
18
22
|
'image-cropper': {
|
|
19
23
|
error: string;
|
|
20
24
|
};
|
|
@@ -85,6 +89,8 @@ declare const locale: {
|
|
|
85
89
|
lock: string;
|
|
86
90
|
};
|
|
87
91
|
crop: {
|
|
92
|
+
cancel: string;
|
|
93
|
+
apply: string;
|
|
88
94
|
title: string;
|
|
89
95
|
start: string;
|
|
90
96
|
mode: string;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import type { BaseObject } from '@univerjs/engine-render';
|
|
17
|
+
/** Crop insets in image coordinates, accounting for rotation around different centers. */
|
|
18
|
+
export declare function getImageCropRect(image: Pick<BaseObject, 'left' | 'top' | 'width' | 'height' | 'angle'>, crop: Pick<BaseObject, 'left' | 'top' | 'width' | 'height'>): {
|
|
19
|
+
srcRect: {
|
|
20
|
+
left: number;
|
|
21
|
+
top: number;
|
|
22
|
+
right: number;
|
|
23
|
+
bottom: number;
|
|
24
|
+
};
|
|
25
|
+
srcRectAngle: {
|
|
26
|
+
left: number;
|
|
27
|
+
top: number;
|
|
28
|
+
right: number;
|
|
29
|
+
bottom: number;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export declare function MobileCropActions(): import("react").JSX.Element | null;
|