@univerjs/sheets-drawing-ui 0.4.2 → 0.5.0-alpha.0

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.
@@ -0,0 +1,44 @@
1
+ const e = {
2
+ sheetImage: {
3
+ title: "Image",
4
+ upload: {
5
+ float: "Float Image",
6
+ cell: "Cell Image"
7
+ },
8
+ panel: {
9
+ title: "Edit Image"
10
+ }
11
+ },
12
+ "image-popup": {
13
+ replace: "Replace",
14
+ delete: "Delete",
15
+ edit: "Edit",
16
+ crop: "Crop",
17
+ reset: "Reset Size"
18
+ },
19
+ "drawing-anchor": {
20
+ title: "Anchor Properties",
21
+ both: "Move and size with cells",
22
+ position: "Move but don't size with cells",
23
+ none: "Don't move or size with cells"
24
+ },
25
+ "update-status": {
26
+ exceedMaxSize: "Image size exceeds limit, limit is {0}M",
27
+ invalidImageType: "Invalid image type",
28
+ exceedMaxCount: "Only {0} images can be uploaded at a time",
29
+ invalidImage: "Invalid image"
30
+ },
31
+ "sheet-drawing-view": "Drawing",
32
+ shortcut: {
33
+ sheet: {
34
+ "drawing-move-down": "Move Drawing down",
35
+ "drawing-move-up": "Move Drawing up",
36
+ "drawing-move-left": "Move Drawing left",
37
+ "drawing-move-right": "Move Drawing right",
38
+ "drawing-delete": "Delete Drawing"
39
+ }
40
+ }
41
+ };
42
+ export {
43
+ e as default
44
+ };
@@ -0,0 +1,44 @@
1
+ const e = {
2
+ sheetImage: {
3
+ title: "تصویر",
4
+ upload: {
5
+ float: "شناور کردن تصویر",
6
+ cell: "تصویر سلولی"
7
+ },
8
+ panel: {
9
+ title: "ویرایش تصویر"
10
+ }
11
+ },
12
+ "image-popup": {
13
+ replace: "تعویض",
14
+ delete: "حذف",
15
+ edit: "ویرایش",
16
+ crop: "کراپ",
17
+ reset: "بازنشانی اندازه"
18
+ },
19
+ "drawing-anchor": {
20
+ title: "خواص لنگر",
21
+ both: "جابه‌جایی و تغییر اندازه با سلول‌ها",
22
+ position: "جابه‌جایی اما تغییر اندازه نکردن با سلول‌ها",
23
+ none: "جابه‌جایی یا تغییر اندازه نکردن با سلول‌ها"
24
+ },
25
+ "update-status": {
26
+ exceedMaxSize: "اندازه تصویر از حد مجاز فراتر رفته است، حد مجاز {0}M است",
27
+ invalidImageType: "نوع تصویر نامعتبر است",
28
+ exceedMaxCount: "فقط {0} تصویر می‌توانند همزمان آپلود شوند",
29
+ invalidImage: "تصویر نامعتبر است"
30
+ },
31
+ "sheet-drawing-view": "طراحی",
32
+ shortcut: {
33
+ sheet: {
34
+ "drawing-move-down": "جابه‌جایی طراحی به پایین",
35
+ "drawing-move-up": "جابه‌جایی طراحی به بالا",
36
+ "drawing-move-left": "جابه‌جایی طراحی به چپ",
37
+ "drawing-move-right": "جابه‌جایی طراحی به راست",
38
+ "drawing-delete": "حذف طراحی"
39
+ }
40
+ }
41
+ };
42
+ export {
43
+ e as default
44
+ };
@@ -0,0 +1,44 @@
1
+ const e = {
2
+ sheetImage: {
3
+ title: "Изображение",
4
+ upload: {
5
+ float: "Плавающее изображение",
6
+ cell: "Изображение в ячейке"
7
+ },
8
+ panel: {
9
+ title: "Редактировать изображение"
10
+ }
11
+ },
12
+ "image-popup": {
13
+ replace: "Заменить",
14
+ delete: "Удалить",
15
+ edit: "Редактировать",
16
+ crop: "Обрезать",
17
+ reset: "Сбросить размер"
18
+ },
19
+ "drawing-anchor": {
20
+ title: "Свойства привязки",
21
+ both: "Перемещать и изменять размер с ячейками",
22
+ position: "Перемещать, но не изменять размер с ячейками",
23
+ none: "Не перемещать и не изменять размер с ячейками"
24
+ },
25
+ "update-status": {
26
+ exceedMaxSize: "Размер изображения превышает лимит, лимит составляет {0}М",
27
+ invalidImageType: "Недопустимый тип изображения",
28
+ exceedMaxCount: "За один раз можно загрузить только {0} изображений",
29
+ invalidImage: "Недопустимое изображение"
30
+ },
31
+ "sheet-drawing-view": "Drawing",
32
+ shortcut: {
33
+ sheet: {
34
+ "drawing-move-down": "Move Drawing down",
35
+ "drawing-move-up": "Move Drawing up",
36
+ "drawing-move-left": "Move Drawing left",
37
+ "drawing-move-right": "Move Drawing right",
38
+ "drawing-delete": "Delete Drawing"
39
+ }
40
+ }
41
+ };
42
+ export {
43
+ e as default
44
+ };
@@ -0,0 +1,44 @@
1
+ const h = {
2
+ sheetImage: {
3
+ title: "Hình ảnh",
4
+ upload: {
5
+ float: "Hình ảnh nổi",
6
+ cell: "Hình ảnh trong ô"
7
+ },
8
+ panel: {
9
+ title: "Chỉnh sửa hình ảnh"
10
+ }
11
+ },
12
+ "image-popup": {
13
+ replace: "Thay thế",
14
+ delete: "Xóa",
15
+ edit: "Chỉnh sửa",
16
+ crop: "Cắt",
17
+ reset: "Đặt lại kích thước"
18
+ },
19
+ "drawing-anchor": {
20
+ title: "Thuộc tính neo",
21
+ both: "Di chuyển và thay đổi kích thước cùng với ô",
22
+ position: "Di chuyển nhưng không thay đổi kích thước với ô",
23
+ none: "Không di chuyển hoặc thay đổi kích thước với ô"
24
+ },
25
+ "update-status": {
26
+ exceedMaxSize: "Kích thước hình ảnh vượt quá giới hạn, giới hạn là {0}M",
27
+ invalidImageType: "Loại hình ảnh không hợp lệ",
28
+ exceedMaxCount: "Chỉ có thể tải lên {0} hình ảnh một lần",
29
+ invalidImage: "Hình ảnh không hợp lệ"
30
+ },
31
+ "sheet-drawing-view": "Drawing",
32
+ shortcut: {
33
+ sheet: {
34
+ "drawing-move-down": "Move Drawing down",
35
+ "drawing-move-up": "Move Drawing up",
36
+ "drawing-move-left": "Move Drawing left",
37
+ "drawing-move-right": "Move Drawing right",
38
+ "drawing-delete": "Delete Drawing"
39
+ }
40
+ }
41
+ };
42
+ export {
43
+ h as default
44
+ };
@@ -0,0 +1,44 @@
1
+ const e = {
2
+ sheetImage: {
3
+ title: "图片",
4
+ upload: {
5
+ float: "浮动图片",
6
+ cell: "单元格图片"
7
+ },
8
+ panel: {
9
+ title: "编辑图片"
10
+ }
11
+ },
12
+ "image-popup": {
13
+ replace: "替换",
14
+ delete: "删除",
15
+ edit: "编辑",
16
+ crop: "裁剪",
17
+ reset: "重置大小"
18
+ },
19
+ "drawing-anchor": {
20
+ title: "锚点属性",
21
+ both: "与单元格一起移动和调整大小",
22
+ position: "移动但不调整大小与单元格",
23
+ none: "不要移动或调整大小与单元格"
24
+ },
25
+ "update-status": {
26
+ exceedMaxSize: "图片大小超过限制, 限制为{0}M",
27
+ invalidImageType: "图片类型错误",
28
+ exceedMaxCount: "图片只能一次上传{0}张",
29
+ invalidImage: "无效图片"
30
+ },
31
+ "sheet-drawing-view": "绘图",
32
+ shortcut: {
33
+ sheet: {
34
+ "drawing-move-down": "下移绘图",
35
+ "drawing-move-up": "上移绘图",
36
+ "drawing-move-left": "左移绘图",
37
+ "drawing-move-right": "下移绘图",
38
+ "drawing-delete": "删除绘图"
39
+ }
40
+ }
41
+ };
42
+ export {
43
+ e as default
44
+ };
@@ -0,0 +1,44 @@
1
+ const e = {
2
+ sheetImage: {
3
+ title: "圖片",
4
+ upload: {
5
+ float: "浮動圖片",
6
+ cell: "儲存格圖片"
7
+ },
8
+ panel: {
9
+ title: "編圖"
10
+ }
11
+ },
12
+ "image-popup": {
13
+ replace: "替換",
14
+ delete: "刪除",
15
+ edit: "編輯",
16
+ crop: "裁切",
17
+ reset: "重置大小"
18
+ },
19
+ "drawing-anchor": {
20
+ title: "錨點屬性",
21
+ both: "與儲存格一起移動和調整大小",
22
+ position: "移動但不調整大小與儲存格",
23
+ none: "不要移動或調整大小與單元格"
24
+ },
25
+ "update-status": {
26
+ exceedMaxSize: "圖片大小超過限制, 限制為{0}M",
27
+ invalidImageType: "圖片類型錯誤",
28
+ exceedMaxCount: "圖片只能一次上傳{0}張",
29
+ invalidImage: "無效圖片"
30
+ },
31
+ "sheet-drawing-view": "繪圖",
32
+ shortcut: {
33
+ sheet: {
34
+ "drawing-move-down": "下移繪圖",
35
+ "drawing-move-up": "上移繪圖",
36
+ "drawing-move-left": "左移繪圖",
37
+ "drawing-move-right": "下移繪圖",
38
+ "drawing-delete": "刪除繪圖"
39
+ }
40
+ }
41
+ };
42
+ export {
43
+ e as default
44
+ };
@@ -0,0 +1,22 @@
1
+ import { Nullable } from '@univerjs/core';
2
+ import { ICanvasFloatDom } from '@univerjs/sheets-drawing-ui';
3
+ import { IFComponentKey } from '@univerjs/sheets-ui/facade';
4
+ interface IFICanvasFloatDom extends Omit<ICanvasFloatDom, 'componentKey' | 'unitId' | 'subUnitId'>, IFComponentKey {
5
+ }
6
+ interface IFWorksheetLegacy {
7
+ /**
8
+ * add a float dom to position
9
+ * @param layer float dom config
10
+ * @param id float dom id, if not given will be auto generated
11
+ * @returns float dom id and dispose function
12
+ */
13
+ addFloatDomToPosition(layer: IFICanvasFloatDom, id?: string): Nullable<{
14
+ id: string;
15
+ dispose: () => void;
16
+ }>;
17
+ }
18
+ declare module '@univerjs/sheets/facade' {
19
+ interface FWorksheet extends IFWorksheetLegacy {
20
+ }
21
+ }
22
+ export {};
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
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 './f-worksheet';
@@ -28,3 +28,4 @@ export { ClearSheetDrawingTransformerOperation } from './commands/operations/cle
28
28
  export { EditSheetDrawingOperation } from './commands/operations/edit-sheet-drawing.operation';
29
29
  export { type IInsertImageCommandParams, InsertFloatImageCommand } from './commands/commands/insert-image.command';
30
30
  export { SidebarSheetDrawingOperation } from './commands/operations/open-drawing-panel.operation';
31
+ export type { IDeleteDrawingCommandParams, IInsertDrawingCommandParams } from './commands/commands/interfaces';
@@ -1,8 +1,8 @@
1
1
  import { IDisposable, IPosition, ITransformState, Serializable, Worksheet, Disposable, ICommandService, IUniverInstanceService, LifecycleService } from '@univerjs/core';
2
2
  import { IBoundRectNoAngle, Scene, SpreadsheetSkeleton, IRenderManagerService, Rect } from '@univerjs/engine-render';
3
- import { ISheetFloatDom, ISheetDrawingService } from '@univerjs/sheets-drawing';
4
3
  import { IFloatDomLayout, CanvasFloatDomService } from '@univerjs/ui';
5
4
  import { DrawingTypeEnum, IDrawingManagerService } from '@univerjs/drawing';
5
+ import { ISheetDrawingService } from '@univerjs/sheets-drawing';
6
6
  import { BehaviorSubject } from 'rxjs';
7
7
  export interface ICanvasFloatDom {
8
8
  /**
@@ -96,10 +96,9 @@ export declare class SheetCanvasFloatDomManagerService extends Disposable {
96
96
  private _featureUpdateListener;
97
97
  private _deleteListener;
98
98
  updateFloatDomProps(unitId: string, subUnitId: string, id: string, props: Record<string, any>): void;
99
- addFloatDomToPosition(layer: ICanvasFloatDom, propId?: string, executeCommand?: boolean): {
99
+ addFloatDomToPosition(layer: ICanvasFloatDom, propId?: string): {
100
100
  id: string;
101
101
  dispose: () => void;
102
- sheetDrawingParam: ISheetFloatDom;
103
102
  } | undefined;
104
103
  private _removeDom;
105
104
  addHook(hook: ISheetCanvasFloatDomHook): IDisposable;
@@ -0,0 +1 @@
1
+ (function(e,i){typeof exports=="object"&&typeof module<"u"?i(require("@univerjs/sheets/facade"),require("@univerjs/sheets-drawing-ui"),require("@univerjs/sheets-ui/facade"),require("@univerjs/ui")):typeof define=="function"&&define.amd?define(["@univerjs/sheets/facade","@univerjs/sheets-drawing-ui","@univerjs/sheets-ui/facade","@univerjs/ui"],i):(e=typeof globalThis<"u"?globalThis:e||self,i(e.UniverSheetsFacade,e.UniverSheetsDrawingUi,e.UniverSheetsUiFacade,e.UniverUi))})(this,function(e,i,o,r){"use strict";class d extends e.FWorksheet{addFloatDomToPosition(n,u){const a=this._workbook.getUnitId(),c=this._worksheet.getSheetId(),{key:h,disposableCollection:t}=o.transformComponentKey(n,this._injector.get(r.ComponentManager)),s=this._injector.get(i.SheetCanvasFloatDomManagerService).addFloatDomToPosition({...n,componentKey:h,unitId:a,subUnitId:c},u);return s?(t.add(s.dispose),{id:s.id,dispose:()=>{t.dispose(),s.dispose()}}):(t.dispose(),null)}}e.FWorksheet.extend(d)});