@univerjs/sheets-drawing-ui 1.0.3 → 1.0.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.
Files changed (88) hide show
  1. package/lib/cjs/index.js +425 -12
  2. package/lib/cjs/locale/ar-SA.js +1 -0
  3. package/lib/cjs/locale/ca-ES.js +1 -0
  4. package/lib/cjs/locale/de-DE.js +1 -0
  5. package/lib/cjs/locale/en-US.js +1 -0
  6. package/lib/cjs/locale/es-ES.js +1 -0
  7. package/lib/cjs/locale/fa-IR.js +1 -0
  8. package/lib/cjs/locale/fr-FR.js +1 -0
  9. package/lib/cjs/locale/id-ID.js +1 -0
  10. package/lib/cjs/locale/it-IT.js +1 -0
  11. package/lib/cjs/locale/ja-JP.js +1 -0
  12. package/lib/cjs/locale/ko-KR.js +1 -0
  13. package/lib/cjs/locale/pl-PL.js +1 -0
  14. package/lib/cjs/locale/pt-BR.js +1 -0
  15. package/lib/cjs/locale/ru-RU.js +1 -0
  16. package/lib/cjs/locale/sk-SK.js +1 -0
  17. package/lib/cjs/locale/vi-VN.js +1 -0
  18. package/lib/cjs/locale/zh-CN.js +1 -0
  19. package/lib/cjs/locale/zh-HK.js +1 -0
  20. package/lib/cjs/locale/zh-TW.js +1 -0
  21. package/lib/es/index.js +430 -17
  22. package/lib/es/locale/ar-SA.js +1 -0
  23. package/lib/es/locale/ca-ES.js +1 -0
  24. package/lib/es/locale/de-DE.js +1 -0
  25. package/lib/es/locale/en-US.js +1 -0
  26. package/lib/es/locale/es-ES.js +1 -0
  27. package/lib/es/locale/fa-IR.js +1 -0
  28. package/lib/es/locale/fr-FR.js +1 -0
  29. package/lib/es/locale/id-ID.js +1 -0
  30. package/lib/es/locale/it-IT.js +1 -0
  31. package/lib/es/locale/ja-JP.js +1 -0
  32. package/lib/es/locale/ko-KR.js +1 -0
  33. package/lib/es/locale/pl-PL.js +1 -0
  34. package/lib/es/locale/pt-BR.js +1 -0
  35. package/lib/es/locale/ru-RU.js +1 -0
  36. package/lib/es/locale/sk-SK.js +1 -0
  37. package/lib/es/locale/vi-VN.js +1 -0
  38. package/lib/es/locale/zh-CN.js +1 -0
  39. package/lib/es/locale/zh-HK.js +1 -0
  40. package/lib/es/locale/zh-TW.js +1 -0
  41. package/lib/index.css +290 -0
  42. package/lib/index.js +430 -17
  43. package/lib/locale/ar-SA.js +1 -0
  44. package/lib/locale/ca-ES.js +1 -0
  45. package/lib/locale/de-DE.js +1 -0
  46. package/lib/locale/en-US.js +1 -0
  47. package/lib/locale/es-ES.js +1 -0
  48. package/lib/locale/fa-IR.js +1 -0
  49. package/lib/locale/fr-FR.js +1 -0
  50. package/lib/locale/id-ID.js +1 -0
  51. package/lib/locale/it-IT.js +1 -0
  52. package/lib/locale/ja-JP.js +1 -0
  53. package/lib/locale/ko-KR.js +1 -0
  54. package/lib/locale/pl-PL.js +1 -0
  55. package/lib/locale/pt-BR.js +1 -0
  56. package/lib/locale/ru-RU.js +1 -0
  57. package/lib/locale/sk-SK.js +1 -0
  58. package/lib/locale/vi-VN.js +1 -0
  59. package/lib/locale/zh-CN.js +1 -0
  60. package/lib/locale/zh-HK.js +1 -0
  61. package/lib/locale/zh-TW.js +1 -0
  62. package/lib/types/commands/operations/preview-sheet-image-opacity.operation.d.ts +20 -0
  63. package/lib/types/controllers/sheet-drawing-active-render.controller.d.ts +4 -0
  64. package/lib/types/locale/en-US.d.ts +3 -0
  65. package/lib/types/views/sheet-image-panel/SheetImageTransparency.d.ts +20 -0
  66. package/lib/types/views/sheet-image-panel/SheetImageTransparencySlider.d.ts +24 -0
  67. package/lib/types/views/sheet-image-panel/sheet-drawing-panel.util.d.ts +18 -0
  68. package/lib/umd/index.js +2 -2
  69. package/lib/umd/locale/ar-SA.js +1 -1
  70. package/lib/umd/locale/ca-ES.js +1 -1
  71. package/lib/umd/locale/de-DE.js +1 -1
  72. package/lib/umd/locale/en-US.js +1 -1
  73. package/lib/umd/locale/es-ES.js +1 -1
  74. package/lib/umd/locale/fa-IR.js +1 -1
  75. package/lib/umd/locale/fr-FR.js +1 -1
  76. package/lib/umd/locale/id-ID.js +1 -1
  77. package/lib/umd/locale/it-IT.js +1 -1
  78. package/lib/umd/locale/ja-JP.js +1 -1
  79. package/lib/umd/locale/ko-KR.js +1 -1
  80. package/lib/umd/locale/pl-PL.js +1 -1
  81. package/lib/umd/locale/pt-BR.js +1 -1
  82. package/lib/umd/locale/ru-RU.js +1 -1
  83. package/lib/umd/locale/sk-SK.js +1 -1
  84. package/lib/umd/locale/vi-VN.js +1 -1
  85. package/lib/umd/locale/zh-CN.js +1 -1
  86. package/lib/umd/locale/zh-HK.js +1 -1
  87. package/lib/umd/locale/zh-TW.js +1 -1
  88. package/package.json +14 -14
@@ -39,6 +39,7 @@ const locale = { "sheets-drawing-ui": {
39
39
  exceedMaxCount: "За один раз можно загрузить только {0} изображений",
40
40
  invalidImage: "Недопустимое изображение"
41
41
  },
42
+ "image-transparency": { title: "Прозрачность" },
42
43
  "drawing-anchor": {
43
44
  title: "Свойства привязки",
44
45
  both: "Перемещать и изменять размер с ячейками",
@@ -39,6 +39,7 @@ const locale = { "sheets-drawing-ui": {
39
39
  exceedMaxCount: "Naraz možno nahrať iba {0} obrázkov",
40
40
  invalidImage: "Neplatný obrázok"
41
41
  },
42
+ "image-transparency": { title: "Priehľadnosť" },
42
43
  "drawing-anchor": {
43
44
  title: "Vlastnosti ukotvenia",
44
45
  both: "Presúvať a meniť veľkosť s bunkami",
@@ -39,6 +39,7 @@ const locale = { "sheets-drawing-ui": {
39
39
  exceedMaxCount: "Chỉ có thể tải lên {0} hình ảnh một lần",
40
40
  invalidImage: "Hình ảnh không hợp lệ"
41
41
  },
42
+ "image-transparency": { title: "Độ trong suốt" },
42
43
  "drawing-anchor": {
43
44
  title: "Thuộc tính neo",
44
45
  both: "Di chuyển và thay đổi kích thước cùng với ô",
@@ -39,6 +39,7 @@ const locale = { "sheets-drawing-ui": {
39
39
  exceedMaxCount: "图片只能一次上传{0}张",
40
40
  invalidImage: "无效图片"
41
41
  },
42
+ "image-transparency": { title: "透明度" },
42
43
  "drawing-anchor": {
43
44
  title: "锚点属性",
44
45
  both: "与单元格一起移动和调整大小",
@@ -39,6 +39,7 @@ const locale = { "sheets-drawing-ui": {
39
39
  exceedMaxCount: "圖片只能一次上傳{0}張",
40
40
  invalidImage: "無效圖片"
41
41
  },
42
+ "image-transparency": { title: "透明度" },
42
43
  "drawing-anchor": {
43
44
  title: "錨點屬性",
44
45
  both: "與儲存格一起移動和調整大小",
@@ -39,6 +39,7 @@ const locale = { "sheets-drawing-ui": {
39
39
  exceedMaxCount: "圖片只能一次上傳{0}張",
40
40
  invalidImage: "無效圖片"
41
41
  },
42
+ "image-transparency": { title: "透明度" },
42
43
  "drawing-anchor": {
43
44
  title: "錨點屬性",
44
45
  both: "與儲存格一起移動和調整大小",
@@ -0,0 +1,20 @@
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 { IDrawingSearch, IOperation } from '@univerjs/core';
17
+ export interface IPreviewSheetImageOpacityOperationParams extends IDrawingSearch {
18
+ opacity: number;
19
+ }
20
+ export declare const PreviewSheetImageOpacityOperation: IOperation<IPreviewSheetImageOpacityOperationParams>;
@@ -25,7 +25,11 @@ export declare class SheetDrawingActiveRenderController extends Disposable imple
25
25
  private readonly _sheetSkeletonService;
26
26
  private readonly _sheetDrawingService;
27
27
  private readonly _drawingManagerService;
28
+ private _renderTimeout;
28
29
  constructor(_context: IRenderContext<Workbook>, _commandService: ICommandService, _sheetSkeletonService: SheetSkeletonService, _sheetDrawingService: ISheetDrawingService, _drawingManagerService: IDrawingManagerService);
30
+ dispose(): void;
31
+ private _cancelPendingRender;
32
+ private _scheduleRender;
29
33
  private _commandListener;
30
34
  private _clearDrawings;
31
35
  private _updateDrawings;
@@ -58,6 +58,9 @@ declare const locale: {
58
58
  exceedMaxCount: string;
59
59
  invalidImage: string;
60
60
  };
61
+ 'image-transparency': {
62
+ title: string;
63
+ };
61
64
  'drawing-anchor': {
62
65
  title: string;
63
66
  both: string;
@@ -0,0 +1,20 @@
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 { IDrawingParam } from '@univerjs/core';
17
+ export interface ISheetImageTransparencyProps {
18
+ drawings: IDrawingParam[];
19
+ }
20
+ export declare const SheetImageTransparency: ({ drawings }: ISheetImageTransparencyProps) => import("react").JSX.Element | null;
@@ -0,0 +1,24 @@
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 interface ISheetImageTransparencySliderProps {
17
+ value: number;
18
+ shortcuts: number[];
19
+ ariaLabel: string;
20
+ disabled?: boolean;
21
+ onChange?: (value: number) => void;
22
+ onChangeComplete?: (value: number) => void;
23
+ }
24
+ export declare function SheetImageTransparencySlider(props: ISheetImageTransparencySliderProps): import("react").JSX.Element;
@@ -0,0 +1,18 @@
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 { IDrawingParam } from '@univerjs/core';
17
+ import type { ISheetDrawing } from '@univerjs/sheets-drawing';
18
+ export declare function isSheetDrawing(drawing: IDrawingParam | undefined): drawing is ISheetDrawing;