@univerjs/sheets-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.
Files changed (97) hide show
  1. package/lib/cjs/index.js +542 -73
  2. package/lib/cjs/locale/ar-SA.js +5 -1
  3. package/lib/cjs/locale/ca-ES.js +5 -1
  4. package/lib/cjs/locale/de-DE.js +5 -1
  5. package/lib/cjs/locale/en-US.js +5 -1
  6. package/lib/cjs/locale/es-ES.js +5 -1
  7. package/lib/cjs/locale/fa-IR.js +5 -1
  8. package/lib/cjs/locale/fr-FR.js +5 -1
  9. package/lib/cjs/locale/id-ID.js +5 -1
  10. package/lib/cjs/locale/it-IT.js +5 -1
  11. package/lib/cjs/locale/ja-JP.js +5 -1
  12. package/lib/cjs/locale/ko-KR.js +5 -1
  13. package/lib/cjs/locale/pl-PL.js +5 -1
  14. package/lib/cjs/locale/pt-BR.js +5 -1
  15. package/lib/cjs/locale/ru-RU.js +5 -1
  16. package/lib/cjs/locale/sk-SK.js +5 -1
  17. package/lib/cjs/locale/vi-VN.js +5 -1
  18. package/lib/cjs/locale/zh-CN.js +5 -1
  19. package/lib/cjs/locale/zh-HK.js +5 -1
  20. package/lib/cjs/locale/zh-TW.js +5 -1
  21. package/lib/es/index.js +546 -79
  22. package/lib/es/locale/ar-SA.js +5 -0
  23. package/lib/es/locale/ca-ES.js +5 -0
  24. package/lib/es/locale/de-DE.js +5 -0
  25. package/lib/es/locale/en-US.js +5 -0
  26. package/lib/es/locale/es-ES.js +5 -0
  27. package/lib/es/locale/fa-IR.js +5 -0
  28. package/lib/es/locale/fr-FR.js +5 -0
  29. package/lib/es/locale/id-ID.js +5 -0
  30. package/lib/es/locale/it-IT.js +5 -0
  31. package/lib/es/locale/ja-JP.js +5 -0
  32. package/lib/es/locale/ko-KR.js +5 -0
  33. package/lib/es/locale/pl-PL.js +5 -0
  34. package/lib/es/locale/pt-BR.js +5 -0
  35. package/lib/es/locale/ru-RU.js +5 -0
  36. package/lib/es/locale/sk-SK.js +5 -0
  37. package/lib/es/locale/vi-VN.js +5 -0
  38. package/lib/es/locale/zh-CN.js +5 -0
  39. package/lib/es/locale/zh-HK.js +5 -0
  40. package/lib/es/locale/zh-TW.js +5 -0
  41. package/lib/index.js +546 -79
  42. package/lib/locale/ar-SA.js +5 -0
  43. package/lib/locale/ca-ES.js +5 -0
  44. package/lib/locale/de-DE.js +5 -0
  45. package/lib/locale/en-US.js +5 -0
  46. package/lib/locale/es-ES.js +5 -0
  47. package/lib/locale/fa-IR.js +5 -0
  48. package/lib/locale/fr-FR.js +5 -0
  49. package/lib/locale/id-ID.js +5 -0
  50. package/lib/locale/it-IT.js +5 -0
  51. package/lib/locale/ja-JP.js +5 -0
  52. package/lib/locale/ko-KR.js +5 -0
  53. package/lib/locale/pl-PL.js +5 -0
  54. package/lib/locale/pt-BR.js +5 -0
  55. package/lib/locale/ru-RU.js +5 -0
  56. package/lib/locale/sk-SK.js +5 -0
  57. package/lib/locale/vi-VN.js +5 -0
  58. package/lib/locale/zh-CN.js +5 -0
  59. package/lib/locale/zh-HK.js +5 -0
  60. package/lib/locale/zh-TW.js +5 -0
  61. package/lib/types/commands/commands/worksheet-background-image.command.d.ts +21 -0
  62. package/lib/types/controllers/render-controllers/worksheet-background.render-controller.d.ts +21 -0
  63. package/lib/types/controllers/sheet-drawing-copy-paste.controller.d.ts +2 -2
  64. package/lib/types/controllers/sheet-drawing-group-copy-paste.controller.d.ts +6 -1
  65. package/lib/types/controllers/sheet-drawing-update.controller.d.ts +2 -1
  66. package/lib/types/controllers/ui.controller.d.ts +2 -4
  67. package/lib/types/facade/f-range.d.ts +1 -1
  68. package/lib/types/facade/f-worksheet.d.ts +1 -1
  69. package/lib/types/index.d.ts +3 -0
  70. package/lib/types/locale/en-US.d.ts +5 -0
  71. package/lib/types/menu/mobile-schema.d.ts +17 -0
  72. package/lib/types/menu/mobile-sheet-drawing-menu.controller.d.ts +20 -0
  73. package/lib/types/menu/sheet-drawing-menu.controller.d.ts +20 -0
  74. package/lib/types/menu/worksheet-background-image.menu.d.ts +22 -0
  75. package/lib/types/utils/worksheet-background-image.d.ts +25 -0
  76. package/lib/types/views/background/worksheet-background-image.extension.d.ts +27 -0
  77. package/lib/umd/index.js +2 -2
  78. package/lib/umd/locale/ar-SA.js +1 -1
  79. package/lib/umd/locale/ca-ES.js +1 -1
  80. package/lib/umd/locale/de-DE.js +1 -1
  81. package/lib/umd/locale/en-US.js +1 -1
  82. package/lib/umd/locale/es-ES.js +1 -1
  83. package/lib/umd/locale/fa-IR.js +1 -1
  84. package/lib/umd/locale/fr-FR.js +1 -1
  85. package/lib/umd/locale/id-ID.js +1 -1
  86. package/lib/umd/locale/it-IT.js +1 -1
  87. package/lib/umd/locale/ja-JP.js +1 -1
  88. package/lib/umd/locale/ko-KR.js +1 -1
  89. package/lib/umd/locale/pl-PL.js +1 -1
  90. package/lib/umd/locale/pt-BR.js +1 -1
  91. package/lib/umd/locale/ru-RU.js +1 -1
  92. package/lib/umd/locale/sk-SK.js +1 -1
  93. package/lib/umd/locale/vi-VN.js +1 -1
  94. package/lib/umd/locale/zh-CN.js +1 -1
  95. package/lib/umd/locale/zh-HK.js +1 -1
  96. package/lib/umd/locale/zh-TW.js +1 -1
  97. package/package.json +16 -16
@@ -1,6 +1,11 @@
1
1
  //#region src/locale/ar-SA.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "صورة",
4
+ backgroundImage: {
5
+ title: "صورة الخلفية",
6
+ add: "إضافة صورة خلفية",
7
+ delete: "حذف صورة الخلفية"
8
+ },
4
9
  uploadLoading: { loading: "جارٍ التحميل..., المتبقي" },
5
10
  upload: {
6
11
  float: "صورة عائمة",
@@ -1,6 +1,11 @@
1
1
  //#region src/locale/ca-ES.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "Imatge",
4
+ backgroundImage: {
5
+ title: "Imatge de fons",
6
+ add: "Afegeix una imatge de fons",
7
+ delete: "Suprimeix la imatge de fons"
8
+ },
4
9
  uploadLoading: { loading: "S'està carregant..., restant" },
5
10
  upload: {
6
11
  float: "Imatge flotant",
@@ -1,6 +1,11 @@
1
1
  //#region src/locale/de-DE.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "Bild",
4
+ backgroundImage: {
5
+ title: "Hintergrundbild",
6
+ add: "Hintergrundbild hinzufügen",
7
+ delete: "Hintergrundbild löschen"
8
+ },
4
9
  uploadLoading: { loading: "Wird geladen..., verbleibend" },
5
10
  upload: {
6
11
  float: "Schwebendes Bild",
@@ -16,6 +16,11 @@
16
16
  */
17
17
  const locale = { "sheets-drawing-ui": {
18
18
  title: "Image",
19
+ backgroundImage: {
20
+ title: "Background Image",
21
+ add: "Add Background Image",
22
+ delete: "Delete Background Image"
23
+ },
19
24
  uploadLoading: { loading: "Loading..., remaining" },
20
25
  upload: {
21
26
  float: "Float Image",
@@ -1,6 +1,11 @@
1
1
  //#region src/locale/es-ES.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "Imagen",
4
+ backgroundImage: {
5
+ title: "Imagen de fondo",
6
+ add: "Añadir imagen de fondo",
7
+ delete: "Eliminar imagen de fondo"
8
+ },
4
9
  uploadLoading: { loading: "Cargando..., restante" },
5
10
  upload: {
6
11
  float: "Imagen flotante",
@@ -1,6 +1,11 @@
1
1
  //#region src/locale/fa-IR.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "تصویر",
4
+ backgroundImage: {
5
+ title: "تصویر پس‌زمینه",
6
+ add: "افزودن تصویر پس‌زمینه",
7
+ delete: "حذف تصویر پس‌زمینه"
8
+ },
4
9
  uploadLoading: { loading: "در حال بارگیری...، باقی مانده" },
5
10
  upload: {
6
11
  float: "شناور کردن تصویر",
@@ -1,6 +1,11 @@
1
1
  //#region src/locale/fr-FR.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "Image",
4
+ backgroundImage: {
5
+ title: "Image d’arrière-plan",
6
+ add: "Ajouter une image d’arrière-plan",
7
+ delete: "Supprimer l’image d’arrière-plan"
8
+ },
4
9
  uploadLoading: { loading: "Chargement..., restant" },
5
10
  upload: {
6
11
  float: "Image flottante",
@@ -1,6 +1,11 @@
1
1
  //#region src/locale/id-ID.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "Gambar",
4
+ backgroundImage: {
5
+ title: "Gambar Latar Belakang",
6
+ add: "Tambahkan Gambar Latar Belakang",
7
+ delete: "Hapus Gambar Latar Belakang"
8
+ },
4
9
  uploadLoading: { loading: "Memuat..., tersisa" },
5
10
  upload: {
6
11
  float: "Gambar Mengambang",
@@ -1,6 +1,11 @@
1
1
  //#region src/locale/it-IT.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "Immagine",
4
+ backgroundImage: {
5
+ title: "Immagine di sfondo",
6
+ add: "Aggiungi immagine di sfondo",
7
+ delete: "Elimina immagine di sfondo"
8
+ },
4
9
  uploadLoading: { loading: "Caricamento..., rimanente" },
5
10
  upload: {
6
11
  float: "Immagine fluttuante",
@@ -1,6 +1,11 @@
1
1
  //#region src/locale/ja-JP.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "画像",
4
+ backgroundImage: {
5
+ title: "背景画像",
6
+ add: "背景画像を追加",
7
+ delete: "背景画像を削除"
8
+ },
4
9
  uploadLoading: { loading: "読み込み中..." },
5
10
  upload: {
6
11
  float: "セル上に配置",
@@ -1,6 +1,11 @@
1
1
  //#region src/locale/ko-KR.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "이미지",
4
+ backgroundImage: {
5
+ title: "배경 이미지",
6
+ add: "배경 이미지 추가",
7
+ delete: "배경 이미지 삭제"
8
+ },
4
9
  uploadLoading: { loading: "로딩중..." },
5
10
  upload: {
6
11
  float: "플로팅 이미지",
@@ -1,6 +1,11 @@
1
1
  //#region src/locale/pl-PL.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "Obraz",
4
+ backgroundImage: {
5
+ title: "Obraz tła",
6
+ add: "Dodaj obraz tła",
7
+ delete: "Usuń obraz tła"
8
+ },
4
9
  uploadLoading: { loading: "Ładowanie..., pozostało" },
5
10
  upload: {
6
11
  float: "Obraz swobodny",
@@ -1,6 +1,11 @@
1
1
  //#region src/locale/pt-BR.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "Imagem",
4
+ backgroundImage: {
5
+ title: "Imagem de fundo",
6
+ add: "Adicionar imagem de fundo",
7
+ delete: "Excluir imagem de fundo"
8
+ },
4
9
  uploadLoading: { loading: "Carregando..., restante" },
5
10
  upload: {
6
11
  float: "Imagem flutuante",
@@ -1,6 +1,11 @@
1
1
  //#region src/locale/ru-RU.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "Изображение",
4
+ backgroundImage: {
5
+ title: "Фоновое изображение",
6
+ add: "Добавить фоновое изображение",
7
+ delete: "Удалить фоновое изображение"
8
+ },
4
9
  uploadLoading: { loading: "Загрузка..." },
5
10
  upload: {
6
11
  float: "Плавающее изображение",
@@ -1,6 +1,11 @@
1
1
  //#region src/locale/sk-SK.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "Obrázok",
4
+ backgroundImage: {
5
+ title: "Obrázok pozadia",
6
+ add: "Pridať obrázok pozadia",
7
+ delete: "Odstrániť obrázok pozadia"
8
+ },
4
9
  uploadLoading: { loading: "Načítava sa..., zostáva" },
5
10
  upload: {
6
11
  float: "Plávajúci obrázok",
@@ -1,6 +1,11 @@
1
1
  //#region src/locale/vi-VN.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "Hình ảnh",
4
+ backgroundImage: {
5
+ title: "Hình nền",
6
+ add: "Thêm hình nền",
7
+ delete: "Xóa hình nền"
8
+ },
4
9
  uploadLoading: { loading: "Đang tải lên, hiện còn lại" },
5
10
  upload: {
6
11
  float: "Hình ảnh nổi",
@@ -1,6 +1,11 @@
1
1
  //#region src/locale/zh-CN.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "图片",
4
+ backgroundImage: {
5
+ title: "背景图片",
6
+ add: "添加背景图片",
7
+ delete: "删除背景图片"
8
+ },
4
9
  uploadLoading: { loading: "正在上传,当前剩余" },
5
10
  upload: {
6
11
  float: "浮动图片",
@@ -1,6 +1,11 @@
1
1
  //#region src/locale/zh-HK.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "圖片",
4
+ backgroundImage: {
5
+ title: "背景圖片",
6
+ add: "新增背景圖片",
7
+ delete: "刪除背景圖片"
8
+ },
4
9
  uploadLoading: { loading: "正在上傳,目前剩餘" },
5
10
  upload: {
6
11
  float: "浮動圖片",
@@ -1,6 +1,11 @@
1
1
  //#region src/locale/zh-TW.ts
2
2
  const locale = { "sheets-drawing-ui": {
3
3
  title: "圖片",
4
+ backgroundImage: {
5
+ title: "背景圖片",
6
+ add: "新增背景圖片",
7
+ delete: "刪除背景圖片"
8
+ },
4
9
  uploadLoading: { loading: "正在上傳,目前剩餘" },
5
10
  upload: {
6
11
  float: "浮動圖片",
@@ -0,0 +1,21 @@
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 { ICommand, Nullable } from '@univerjs/core';
17
+ export interface IAddWorksheetBackgroundImageCommandParams {
18
+ files?: Nullable<File[]>;
19
+ }
20
+ export declare const AddWorksheetBackgroundImageCommand: ICommand<IAddWorksheetBackgroundImageCommandParams>;
21
+ export declare const DeleteWorksheetBackgroundImageCommand: ICommand;
@@ -0,0 +1,21 @@
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 { IRenderContext, IRenderModule } from '@univerjs/engine-render';
17
+ import { Disposable, ICommandService, Injector } from '@univerjs/core';
18
+ export declare class WorksheetBackgroundRenderController extends Disposable implements IRenderModule {
19
+ private readonly _context;
20
+ constructor(_context: IRenderContext, commandService: ICommandService, injector: Injector);
21
+ }
@@ -13,13 +13,13 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { Disposable, ICommandService } from '@univerjs/core';
16
+ import { ICommandService, RxDisposable } from '@univerjs/core';
17
17
  import { IDrawingManagerService } from '@univerjs/drawing';
18
18
  import { IRenderManagerService } from '@univerjs/engine-render';
19
19
  import { SheetSkeletonService } from '@univerjs/sheets';
20
20
  import { ISheetClipboardService } from '@univerjs/sheets-ui';
21
21
  import { IClipboardInterfaceService } from '@univerjs/ui';
22
- export declare class SheetsDrawingCopyPasteController extends Disposable {
22
+ export declare class SheetsDrawingCopyPasteController extends RxDisposable {
23
23
  private _sheetClipboardService;
24
24
  private readonly _renderManagerService;
25
25
  private readonly _sheetSkeletonService;
@@ -13,7 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import type { IDrawingGroupNestedParam, IMutationInfo } from '@univerjs/core';
16
+ import type { IDisposable, IDrawingGroupNestedParam, IMutationInfo } from '@univerjs/core';
17
17
  import { Disposable } from '@univerjs/core';
18
18
  import { IDrawingManagerService } from '@univerjs/drawing';
19
19
  import { IRenderManagerService } from '@univerjs/engine-render';
@@ -37,7 +37,11 @@ export interface IGroupFeaturePasteHookParams {
37
37
  export type GroupFeaturePasteHook = (params: IGroupFeaturePasteHookParams) => {
38
38
  redos: IMutationInfo[];
39
39
  undos: IMutationInfo[];
40
+ cancel?: boolean;
40
41
  };
42
+ export interface IGroupFeaturePasteHookOptions {
43
+ beforeDrawing?: boolean;
44
+ }
41
45
  export declare class SheetsDrawingGroupCopyPasteController extends Disposable {
42
46
  private readonly _sheetClipboardService;
43
47
  private readonly _renderManagerService;
@@ -50,6 +54,7 @@ export declare class SheetsDrawingGroupCopyPasteController extends Disposable {
50
54
  private get _focusedDrawings();
51
55
  private _initCopyPaste;
52
56
  registerFeaturePasteHook(hook: GroupFeaturePasteHook): void;
57
+ registerFeaturePasteHook(hook: GroupFeaturePasteHook, options: IGroupFeaturePasteHookOptions): IDisposable;
53
58
  private _getGroupFeaturePasteMutations;
54
59
  private _generateGroupPasteMutations;
55
60
  dispose(): void;
@@ -13,7 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import type { IAccessor, Workbook } from '@univerjs/core';
16
+ import type { IAccessor, Nullable, Workbook } from '@univerjs/core';
17
17
  import type { IRenderContext, IRenderModule } from '@univerjs/engine-render';
18
18
  import type { ISheetLocationBase } from '@univerjs/sheets';
19
19
  import { Disposable, ICommandService, IContextService, IImageIoService, Injector, IURLImageService, LocaleService } from '@univerjs/core';
@@ -54,6 +54,7 @@ export declare class SheetDrawingUpdateController extends Disposable implements
54
54
  constructor(_context: IRenderContext<Workbook>, _commandService: ICommandService, _sheetInterceptorService: SheetInterceptorService, _selectionRenderService: ISheetSelectionRenderService, _imageIoService: IImageIoService, _fileOpenerService: ILocalFileService, _sheetDrawingService: ISheetDrawingService, _drawingManagerService: IDrawingManagerService, _contextService: IContextService, _messageService: IMessageService, _localeService: LocaleService, selectionManagerService: SheetsSelectionsService, _sheetSkeletonService: SheetSkeletonService, _injector: Injector, _urlImageService: IURLImageService);
55
55
  insertFloatImage(): Promise<boolean>;
56
56
  insertCellImage(): Promise<boolean>;
57
+ setWorksheetBackgroundImage(files?: Nullable<File[]>): Promise<boolean>;
57
58
  insertCellImageByFile(file: File, location?: ISheetLocationBase): Promise<boolean>;
58
59
  insertFloatImageByFile(file: File): Promise<boolean | undefined>;
59
60
  private _insertCellImage;
@@ -15,16 +15,14 @@
15
15
  */
16
16
  import { Disposable, ICommandService } from '@univerjs/core';
17
17
  import { IDrawingManagerService } from '@univerjs/drawing';
18
- import { IMenuManagerService, IShortcutService, ISidebarService } from '@univerjs/ui';
18
+ import { IShortcutService, ISidebarService } from '@univerjs/ui';
19
19
  export declare class SheetDrawingUIController extends Disposable {
20
- private readonly _menuManagerService;
21
20
  private readonly _commandService;
22
21
  private readonly _shortcutService;
23
22
  private readonly _drawingManagerService;
24
23
  private readonly _sidebarService;
25
- constructor(_menuManagerService: IMenuManagerService, _commandService: ICommandService, _shortcutService: IShortcutService, _drawingManagerService: IDrawingManagerService, _sidebarService: ISidebarService);
24
+ constructor(_commandService: ICommandService, _shortcutService: IShortcutService, _drawingManagerService: IDrawingManagerService, _sidebarService: ISidebarService);
26
25
  private _initCustomComponents;
27
- private _initMenus;
28
26
  private _initCommands;
29
27
  private _initShortcuts;
30
28
  private _initImagePanel;
@@ -33,7 +33,7 @@ export interface IFRangeSheetsDrawingUIMixin {
33
33
  * Inserts an image into the current cell.
34
34
  *
35
35
  * @param {string | File} file File or URL string
36
- * @returns True if the image is inserted successfully, otherwise false
36
+ * @returns {Promise<boolean>} True if the image is inserted successfully, otherwise false
37
37
  * @example
38
38
  * ```ts
39
39
  * const fWorkbook = univerAPI.getActiveWorkbook();
@@ -314,7 +314,7 @@ export interface IFWorksheetDrawingUIMixin {
314
314
  * @param {string} [id] - The float dom id, if not given will be auto generated
315
315
  * @returns float dom id and dispose function
316
316
  * @example
317
- * ```ts
317
+ * ```tsx
318
318
  * const fWorksheet = univerAPI.getActiveWorkbook().getSheetByName('Sheet1');
319
319
  * if (!fWorksheet) return;
320
320
  *
@@ -21,10 +21,13 @@ export type { IInsertImageCommandParams } from './commands/commands/insert-image
21
21
  export { MoveDrawingsCommand } from './commands/commands/move-drawings.command';
22
22
  export { SaveCellImagesCommand } from './commands/commands/save-cell-images.command';
23
23
  export { UngroupSheetDrawingCommand } from './commands/commands/ungroup-sheet-drawing.command';
24
+ export { AddWorksheetBackgroundImageCommand, DeleteWorksheetBackgroundImageCommand, } from './commands/commands/worksheet-background-image.command';
25
+ export type { IAddWorksheetBackgroundImageCommandParams } from './commands/commands/worksheet-background-image.command';
24
26
  export { EditSheetDrawingOperation } from './commands/operations/edit-sheet-drawing.operation';
25
27
  export { SidebarSheetDrawingOperation } from './commands/operations/open-drawing-panel.operation';
26
28
  export type { IUniverSheetsDrawingUIConfig } from './config/config';
27
29
  export { SheetsDrawingGroupCopyPasteController } from './controllers/sheet-drawing-group-copy-paste.controller';
30
+ export type { IGroupFeaturePasteHookParams } from './controllers/sheet-drawing-group-copy-paste.controller';
28
31
  export { SheetDrawingUpdateController } from './controllers/sheet-drawing-update.controller';
29
32
  export { registerSheetsDrawingFloatingHostCapability, SHEETS_DRAWING_FLOATING_HOST_DEPENDENCIES } from './embed';
30
33
  export { SHEETS_IMAGE_MENU_ID } from './menu/image.menu';
@@ -16,6 +16,11 @@
16
16
  declare const locale: {
17
17
  'sheets-drawing-ui': {
18
18
  title: string;
19
+ backgroundImage: {
20
+ title: string;
21
+ add: string;
22
+ delete: string;
23
+ };
19
24
  uploadLoading: {
20
25
  loading: string;
21
26
  };
@@ -0,0 +1,17 @@
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 { MenuSchemaType } from '@univerjs/ui';
17
+ export declare const mobileMenuSchema: MenuSchemaType;
@@ -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 { Disposable } from '@univerjs/core';
17
+ import { IMenuManagerService } from '@univerjs/ui';
18
+ export declare class MobileSheetDrawingMenuController extends Disposable {
19
+ constructor(menuManagerService: IMenuManagerService);
20
+ }
@@ -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 { Disposable } from '@univerjs/core';
17
+ import { IMenuManagerService } from '@univerjs/ui';
18
+ export declare class SheetDrawingMenuController extends Disposable {
19
+ constructor(menuManagerService: IMenuManagerService);
20
+ }
@@ -0,0 +1,22 @@
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 { IAccessor } from '@univerjs/core';
17
+ import type { IMenuItem } from '@univerjs/ui';
18
+ import type { LocaleKey } from '../locale/types';
19
+ export declare const WORKSHEET_BACKGROUND_IMAGE_MENU_ID = "sheet.menu.worksheet-background-image";
20
+ export declare function WorksheetBackgroundImageMenuFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
21
+ export declare function AddWorksheetBackgroundImageMenuFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
22
+ export declare function DeleteWorksheetBackgroundImageMenuFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
@@ -0,0 +1,25 @@
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 IWorksheetBackgroundImageScale {
17
+ scaleX: number;
18
+ scaleY: number;
19
+ }
20
+ /**
21
+ * Excel tiles worksheet background images using their physical resolution,
22
+ * while Canvas tiles them using source pixels. Convert the source resolution
23
+ * to Univer's 96-DPI worksheet layout pixels.
24
+ */
25
+ export declare function getWorksheetBackgroundImageScale(source: string): IWorksheetBackgroundImageScale | undefined;
@@ -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 type { Injector, IRange, IScale } from '@univerjs/core';
17
+ import type { IDrawInfo, SpreadsheetSkeleton, UniverRenderingContext } from '@univerjs/engine-render';
18
+ import { SHEET_EXTENSION_TYPE, SheetExtension } from '@univerjs/engine-render';
19
+ export declare const WORKSHEET_BACKGROUND_IMAGE_EXTENSION_KEY = "WorksheetBackgroundImageExtension";
20
+ export declare class WorksheetBackgroundImageExtension extends SheetExtension {
21
+ private readonly _requestRender;
22
+ uKey: string;
23
+ type: SHEET_EXTENSION_TYPE;
24
+ private readonly _imageCache;
25
+ constructor(injector: Injector, _requestRender: () => void);
26
+ draw(ctx: UniverRenderingContext, _parentScale: IScale, spreadsheetSkeleton: SpreadsheetSkeleton, diffRanges: IRange[], drawInfo: IDrawInfo): void;
27
+ }