@univerjs/sheets-drawing-ui 0.25.1 → 1.0.0-alpha.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.
Files changed (98) hide show
  1. package/lib/cjs/facade.js +7 -1
  2. package/lib/cjs/index.js +365 -346
  3. package/lib/cjs/locale/ar-SA.js +1 -0
  4. package/lib/cjs/locale/ca-ES.js +1 -0
  5. package/lib/cjs/locale/de-DE.js +1 -0
  6. package/lib/cjs/locale/en-US.js +1 -0
  7. package/lib/cjs/locale/es-ES.js +1 -0
  8. package/lib/cjs/locale/fa-IR.js +1 -0
  9. package/lib/cjs/locale/fr-FR.js +1 -0
  10. package/lib/cjs/locale/id-ID.js +1 -0
  11. package/lib/cjs/locale/it-IT.js +1 -0
  12. package/lib/cjs/locale/ja-JP.js +1 -0
  13. package/lib/cjs/locale/ko-KR.js +1 -0
  14. package/lib/cjs/locale/pl-PL.js +1 -0
  15. package/lib/cjs/locale/pt-BR.js +1 -0
  16. package/lib/cjs/locale/ru-RU.js +1 -0
  17. package/lib/cjs/locale/sk-SK.js +1 -0
  18. package/lib/cjs/locale/vi-VN.js +1 -0
  19. package/lib/cjs/locale/zh-CN.js +1 -0
  20. package/lib/cjs/locale/zh-HK.js +1 -0
  21. package/lib/cjs/locale/zh-TW.js +1 -0
  22. package/lib/es/facade.js +7 -1
  23. package/lib/es/index.js +367 -348
  24. package/lib/es/locale/ar-SA.js +1 -0
  25. package/lib/es/locale/ca-ES.js +1 -0
  26. package/lib/es/locale/de-DE.js +1 -0
  27. package/lib/es/locale/en-US.js +1 -0
  28. package/lib/es/locale/es-ES.js +1 -0
  29. package/lib/es/locale/fa-IR.js +1 -0
  30. package/lib/es/locale/fr-FR.js +1 -0
  31. package/lib/es/locale/id-ID.js +1 -0
  32. package/lib/es/locale/it-IT.js +1 -0
  33. package/lib/es/locale/ja-JP.js +1 -0
  34. package/lib/es/locale/ko-KR.js +1 -0
  35. package/lib/es/locale/pl-PL.js +1 -0
  36. package/lib/es/locale/pt-BR.js +1 -0
  37. package/lib/es/locale/ru-RU.js +1 -0
  38. package/lib/es/locale/sk-SK.js +1 -0
  39. package/lib/es/locale/vi-VN.js +1 -0
  40. package/lib/es/locale/zh-CN.js +1 -0
  41. package/lib/es/locale/zh-HK.js +1 -0
  42. package/lib/es/locale/zh-TW.js +1 -0
  43. package/lib/facade.js +7 -1
  44. package/lib/index.js +367 -348
  45. package/lib/locale/ar-SA.js +1 -0
  46. package/lib/locale/ca-ES.js +1 -0
  47. package/lib/locale/de-DE.js +1 -0
  48. package/lib/locale/en-US.js +1 -0
  49. package/lib/locale/es-ES.js +1 -0
  50. package/lib/locale/fa-IR.js +1 -0
  51. package/lib/locale/fr-FR.js +1 -0
  52. package/lib/locale/id-ID.js +1 -0
  53. package/lib/locale/it-IT.js +1 -0
  54. package/lib/locale/ja-JP.js +1 -0
  55. package/lib/locale/ko-KR.js +1 -0
  56. package/lib/locale/pl-PL.js +1 -0
  57. package/lib/locale/pt-BR.js +1 -0
  58. package/lib/locale/ru-RU.js +1 -0
  59. package/lib/locale/sk-SK.js +1 -0
  60. package/lib/locale/vi-VN.js +1 -0
  61. package/lib/locale/zh-CN.js +1 -0
  62. package/lib/locale/zh-HK.js +1 -0
  63. package/lib/locale/zh-TW.js +1 -0
  64. package/lib/types/controllers/components.controller.d.ts +22 -0
  65. package/lib/types/controllers/sheet-cell-image.controller.d.ts +2 -3
  66. package/lib/types/controllers/sheet-drawing-printing.controller.d.ts +1 -3
  67. package/lib/types/controllers/{sheet-drawing.controller.d.ts → ui.controller.d.ts} +2 -3
  68. package/lib/types/index.d.ts +6 -3
  69. package/lib/types/locale/en-US.d.ts +3 -0
  70. package/lib/types/locale/types.d.ts +18 -0
  71. package/lib/types/menu/image.menu.d.ts +4 -3
  72. package/lib/types/menu/save-images.menu.d.ts +2 -1
  73. package/lib/types/views/{printing-float-dom/index.d.ts → PrintingFloatDom.d.ts} +3 -2
  74. package/lib/types/views/batch-save-images/BatchSaveImagesDialog.d.ts +1 -1
  75. package/lib/types/views/sheet-image-panel/SheetDrawingAnchor.d.ts +1 -1
  76. package/lib/types/views/sheet-image-panel/SheetDrawingPanel.d.ts +1 -1
  77. package/lib/umd/facade.js +1 -1
  78. package/lib/umd/index.js +2 -2
  79. package/lib/umd/locale/ar-SA.js +1 -1
  80. package/lib/umd/locale/ca-ES.js +1 -1
  81. package/lib/umd/locale/de-DE.js +1 -1
  82. package/lib/umd/locale/en-US.js +1 -1
  83. package/lib/umd/locale/es-ES.js +1 -1
  84. package/lib/umd/locale/fa-IR.js +1 -1
  85. package/lib/umd/locale/fr-FR.js +1 -1
  86. package/lib/umd/locale/id-ID.js +1 -1
  87. package/lib/umd/locale/it-IT.js +1 -1
  88. package/lib/umd/locale/ja-JP.js +1 -1
  89. package/lib/umd/locale/ko-KR.js +1 -1
  90. package/lib/umd/locale/pl-PL.js +1 -1
  91. package/lib/umd/locale/pt-BR.js +1 -1
  92. package/lib/umd/locale/ru-RU.js +1 -1
  93. package/lib/umd/locale/sk-SK.js +1 -1
  94. package/lib/umd/locale/vi-VN.js +1 -1
  95. package/lib/umd/locale/zh-CN.js +1 -1
  96. package/lib/umd/locale/zh-HK.js +1 -1
  97. package/lib/umd/locale/zh-TW.js +1 -1
  98. package/package.json +14 -14
@@ -2,6 +2,7 @@
2
2
  //#region src/locale/ar-SA.ts
3
3
  const locale = { "sheets-drawing-ui": {
4
4
  title: "صورة",
5
+ uploadLoading: { loading: "جارٍ التحميل..., المتبقي" },
5
6
  upload: {
6
7
  float: "صورة عائمة",
7
8
  cell: "صورة خلية"
@@ -2,6 +2,7 @@
2
2
  //#region src/locale/ca-ES.ts
3
3
  const locale = { "sheets-drawing-ui": {
4
4
  title: "Imatge",
5
+ uploadLoading: { loading: "S'està carregant..., restant" },
5
6
  upload: {
6
7
  float: "Imatge flotant",
7
8
  cell: "Imatge de cel·la"
@@ -2,6 +2,7 @@
2
2
  //#region src/locale/de-DE.ts
3
3
  const locale = { "sheets-drawing-ui": {
4
4
  title: "Bild",
5
+ uploadLoading: { loading: "Wird geladen..., verbleibend" },
5
6
  upload: {
6
7
  float: "Schwebendes Bild",
7
8
  cell: "Zellenbild"
@@ -17,6 +17,7 @@
17
17
  */
18
18
  const locale = { "sheets-drawing-ui": {
19
19
  title: "Image",
20
+ uploadLoading: { loading: "Loading..., remaining" },
20
21
  upload: {
21
22
  float: "Float Image",
22
23
  cell: "Cell Image"
@@ -2,6 +2,7 @@
2
2
  //#region src/locale/es-ES.ts
3
3
  const locale = { "sheets-drawing-ui": {
4
4
  title: "Imagen",
5
+ uploadLoading: { loading: "Cargando..., restante" },
5
6
  upload: {
6
7
  float: "Imagen flotante",
7
8
  cell: "Imagen de celda"
@@ -2,6 +2,7 @@
2
2
  //#region src/locale/fa-IR.ts
3
3
  const locale = { "sheets-drawing-ui": {
4
4
  title: "تصویر",
5
+ uploadLoading: { loading: "در حال بارگیری...، باقی مانده" },
5
6
  upload: {
6
7
  float: "شناور کردن تصویر",
7
8
  cell: "تصویر سلولی"
@@ -2,6 +2,7 @@
2
2
  //#region src/locale/fr-FR.ts
3
3
  const locale = { "sheets-drawing-ui": {
4
4
  title: "Image",
5
+ uploadLoading: { loading: "Chargement..., restant" },
5
6
  upload: {
6
7
  float: "Image flottante",
7
8
  cell: "Image de cellule"
@@ -2,6 +2,7 @@
2
2
  //#region src/locale/id-ID.ts
3
3
  const locale = { "sheets-drawing-ui": {
4
4
  title: "Gambar",
5
+ uploadLoading: { loading: "Memuat..., tersisa" },
5
6
  upload: {
6
7
  float: "Gambar Mengambang",
7
8
  cell: "Gambar Sel"
@@ -2,6 +2,7 @@
2
2
  //#region src/locale/it-IT.ts
3
3
  const locale = { "sheets-drawing-ui": {
4
4
  title: "Immagine",
5
+ uploadLoading: { loading: "Caricamento..., rimanente" },
5
6
  upload: {
6
7
  float: "Immagine fluttuante",
7
8
  cell: "Immagine cella"
@@ -2,6 +2,7 @@
2
2
  //#region src/locale/ja-JP.ts
3
3
  const locale = { "sheets-drawing-ui": {
4
4
  title: "画像",
5
+ uploadLoading: { loading: "読み込み中..." },
5
6
  upload: {
6
7
  float: "セル上に配置",
7
8
  cell: "セル内に配置"
@@ -2,6 +2,7 @@
2
2
  //#region src/locale/ko-KR.ts
3
3
  const locale = { "sheets-drawing-ui": {
4
4
  title: "이미지",
5
+ uploadLoading: { loading: "로딩중..." },
5
6
  upload: {
6
7
  float: "플로팅 이미지",
7
8
  cell: "셀 내 이미지"
@@ -2,6 +2,7 @@
2
2
  //#region src/locale/pl-PL.ts
3
3
  const locale = { "sheets-drawing-ui": {
4
4
  title: "Obraz",
5
+ uploadLoading: { loading: "Ładowanie..., pozostało" },
5
6
  upload: {
6
7
  float: "Obraz swobodny",
7
8
  cell: "Obraz w komórce"
@@ -2,6 +2,7 @@
2
2
  //#region src/locale/pt-BR.ts
3
3
  const locale = { "sheets-drawing-ui": {
4
4
  title: "Imagem",
5
+ uploadLoading: { loading: "Carregando..., restante" },
5
6
  upload: {
6
7
  float: "Imagem flutuante",
7
8
  cell: "Imagem de célula"
@@ -2,6 +2,7 @@
2
2
  //#region src/locale/ru-RU.ts
3
3
  const locale = { "sheets-drawing-ui": {
4
4
  title: "Изображение",
5
+ uploadLoading: { loading: "Загрузка..." },
5
6
  upload: {
6
7
  float: "Плавающее изображение",
7
8
  cell: "Изображение в ячейке"
@@ -2,6 +2,7 @@
2
2
  //#region src/locale/sk-SK.ts
3
3
  const locale = { "sheets-drawing-ui": {
4
4
  title: "Obrázok",
5
+ uploadLoading: { loading: "Načítava sa..., zostáva" },
5
6
  upload: {
6
7
  float: "Plávajúci obrázok",
7
8
  cell: "Obrázok v bunke"
@@ -2,6 +2,7 @@
2
2
  //#region src/locale/vi-VN.ts
3
3
  const locale = { "sheets-drawing-ui": {
4
4
  title: "Hình ảnh",
5
+ uploadLoading: { loading: "Đang tải lên, hiện còn lại" },
5
6
  upload: {
6
7
  float: "Hình ảnh nổi",
7
8
  cell: "Hình ảnh trong ô"
@@ -2,6 +2,7 @@
2
2
  //#region src/locale/zh-CN.ts
3
3
  const locale = { "sheets-drawing-ui": {
4
4
  title: "图片",
5
+ uploadLoading: { loading: "正在上传,当前剩余" },
5
6
  upload: {
6
7
  float: "浮动图片",
7
8
  cell: "单元格图片"
@@ -2,6 +2,7 @@
2
2
  //#region src/locale/zh-HK.ts
3
3
  const locale = { "sheets-drawing-ui": {
4
4
  title: "圖片",
5
+ uploadLoading: { loading: "正在上傳,目前剩餘" },
5
6
  upload: {
6
7
  float: "浮動圖片",
7
8
  cell: "儲存格圖片"
@@ -2,6 +2,7 @@
2
2
  //#region src/locale/zh-TW.ts
3
3
  const locale = { "sheets-drawing-ui": {
4
4
  title: "圖片",
5
+ uploadLoading: { loading: "正在上傳,目前剩餘" },
5
6
  upload: {
6
7
  float: "浮動圖片",
7
8
  cell: "儲存格圖片"
package/lib/es/facade.js CHANGED
@@ -383,9 +383,15 @@ var FUniverSheetsDrawingUIMixin = class extends FUniver {
383
383
  const workbook = this.getActiveWorkbook();
384
384
  if (workbook == null || params == null) return;
385
385
  const { drawings } = params;
386
+ const floatDomDrawingIds = [];
387
+ for (let i = 0; i < drawings.length; i++) {
388
+ const drawing = drawings[i];
389
+ if (drawing.drawingType === DrawingTypeEnum.DRAWING_DOM) floatDomDrawingIds.push(drawing.drawingId);
390
+ }
391
+ if (floatDomDrawingIds.length === 0) return;
386
392
  const eventParams = {
387
393
  workbook,
388
- drawings: drawings.filter((i) => i.drawingType === DrawingTypeEnum.DRAWING_DOM).map((i) => i.drawingId)
394
+ drawings: floatDomDrawingIds
389
395
  };
390
396
  this.fireEvent(this.Event.FloatDomDeleted, eventParams);
391
397
  })));