@univerjs/sheets-ui 1.0.0-alpha.2 → 1.0.0-alpha.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.
- package/lib/cjs/facade.js +47 -37
- package/lib/cjs/index.js +8906 -7574
- package/lib/cjs/locale/ar-SA.js +9 -1
- package/lib/cjs/locale/ca-ES.js +9 -1
- package/lib/cjs/locale/de-DE.js +9 -1
- package/lib/cjs/locale/en-US.js +9 -1
- package/lib/cjs/locale/es-ES.js +10 -2
- package/lib/cjs/locale/fa-IR.js +9 -1
- package/lib/cjs/locale/fr-FR.js +9 -1
- package/lib/cjs/locale/id-ID.js +9 -1
- package/lib/cjs/locale/it-IT.js +9 -1
- package/lib/cjs/locale/ja-JP.js +9 -1
- package/lib/cjs/locale/ko-KR.js +9 -1
- package/lib/cjs/locale/pl-PL.js +9 -1
- package/lib/cjs/locale/pt-BR.js +9 -1
- package/lib/cjs/locale/ru-RU.js +9 -1
- package/lib/cjs/locale/sk-SK.js +9 -1
- package/lib/cjs/locale/vi-VN.js +9 -1
- package/lib/cjs/locale/zh-CN.js +9 -1
- package/lib/cjs/locale/zh-HK.js +9 -1
- package/lib/cjs/locale/zh-TW.js +9 -1
- package/lib/es/facade.js +47 -37
- package/lib/es/index.js +8894 -7559
- package/lib/es/locale/ar-SA.js +9 -1
- package/lib/es/locale/ca-ES.js +9 -1
- package/lib/es/locale/de-DE.js +9 -1
- package/lib/es/locale/en-US.js +9 -1
- package/lib/es/locale/es-ES.js +10 -2
- package/lib/es/locale/fa-IR.js +9 -1
- package/lib/es/locale/fr-FR.js +9 -1
- package/lib/es/locale/id-ID.js +9 -1
- package/lib/es/locale/it-IT.js +9 -1
- package/lib/es/locale/ja-JP.js +9 -1
- package/lib/es/locale/ko-KR.js +9 -1
- package/lib/es/locale/pl-PL.js +9 -1
- package/lib/es/locale/pt-BR.js +9 -1
- package/lib/es/locale/ru-RU.js +9 -1
- package/lib/es/locale/sk-SK.js +9 -1
- package/lib/es/locale/vi-VN.js +9 -1
- package/lib/es/locale/zh-CN.js +9 -1
- package/lib/es/locale/zh-HK.js +9 -1
- package/lib/es/locale/zh-TW.js +9 -1
- package/lib/facade.js +47 -37
- package/lib/index.css +49 -0
- package/lib/index.js +8894 -7559
- package/lib/locale/ar-SA.js +9 -1
- package/lib/locale/ca-ES.js +9 -1
- package/lib/locale/de-DE.js +9 -1
- package/lib/locale/en-US.js +9 -1
- package/lib/locale/es-ES.js +10 -2
- package/lib/locale/fa-IR.js +9 -1
- package/lib/locale/fr-FR.js +9 -1
- package/lib/locale/id-ID.js +9 -1
- package/lib/locale/it-IT.js +9 -1
- package/lib/locale/ja-JP.js +9 -1
- package/lib/locale/ko-KR.js +9 -1
- package/lib/locale/pl-PL.js +9 -1
- package/lib/locale/pt-BR.js +9 -1
- package/lib/locale/ru-RU.js +9 -1
- package/lib/locale/sk-SK.js +9 -1
- package/lib/locale/vi-VN.js +9 -1
- package/lib/locale/zh-CN.js +9 -1
- package/lib/locale/zh-HK.js +9 -1
- package/lib/locale/zh-TW.js +9 -1
- package/lib/types/commands/commands/set-scroll.command.d.ts +3 -0
- package/lib/types/{controllers/cell-alert.controller.d.ts → commands/commands/set-zoom-ratio-from-toolbar.command.d.ts} +4 -8
- package/lib/types/controllers/editor/editing.render-controller.d.ts +1 -0
- package/lib/types/controllers/editor/formula-editor.controller.d.ts +1 -0
- package/lib/types/controllers/permission/sheet-permission-render.controller.d.ts +1 -9
- package/lib/types/controllers/render-controllers/contextmenu.render-controller.d.ts +7 -2
- package/lib/types/controllers/render-controllers/editor-bridge.render-controller.d.ts +7 -1
- package/lib/types/controllers/render-controllers/header-unhide.render-controller.d.ts +0 -1
- package/lib/types/embed-tab-anchor.d.ts +23 -0
- package/lib/types/facade/f-univer.d.ts +1 -0
- package/lib/types/index.d.ts +17 -3
- package/lib/types/locale/en-US.d.ts +9 -1
- package/lib/types/menu/frozen.menu.d.ts +2 -0
- package/lib/types/menu/fullscreen.menu.d.ts +19 -0
- package/lib/types/menu/menu.d.ts +1 -0
- package/lib/types/menu/text-to-number.menu.d.ts +0 -2
- package/lib/types/menu/zoom.menu.d.ts +20 -0
- package/lib/types/services/canvas-pop-manager.service.d.ts +9 -0
- package/lib/types/services/cell-dropdown-manager.service.d.ts +1 -3
- package/lib/types/services/cell-popup-manager.service.d.ts +1 -0
- package/lib/types/services/editor/cell-editor-resize.service.d.ts +4 -1
- package/lib/types/services/editor-bridge.service.d.ts +2 -0
- package/lib/types/services/print-interceptor.service.d.ts +8 -0
- package/lib/types/services/selection/base-selection-render.service.d.ts +1 -0
- package/lib/types/services/sheet-embed-integration.service.d.ts +126 -0
- package/lib/types/services/sheet-embed-runtime.service.d.ts +26 -0
- package/lib/types/services/sheet-host-chrome-override.service.d.ts +25 -0
- package/lib/types/services/sheet-loading-render.service.d.ts +65 -0
- package/lib/types/services/sheet-skeleton-manager.service.d.ts +2 -0
- package/lib/types/views/CellPopup.d.ts +2 -2
- package/lib/types/views/border-panel/interface.d.ts +63 -2
- package/lib/types/views/defined-name/DefinedNameInput.d.ts +1 -1
- package/lib/types/views/dropdown/CascaderDropdown.d.ts +2 -2
- package/lib/types/views/dropdown/ColorDropdown.d.ts +2 -2
- package/lib/types/views/dropdown/DateDropdown.d.ts +2 -2
- package/lib/types/views/dropdown/ListDropDown.d.ts +2 -2
- package/lib/types/views/editor-container/EditorContainer.d.ts +7 -5
- package/lib/types/{menu/mobile-menu.d.ts → views/editor-container/EditorContainer.spec.d.ts} +1 -1
- package/lib/types/views/editor-container/focus-editor.d.ts +25 -0
- package/lib/types/views/hook.d.ts +4 -0
- package/lib/types/views/sheet-bar/sheet-bar-tabs/SheetBarItem.d.ts +2 -1
- package/lib/types/views/sheet-bar/sheet-bar-tabs/utils/sheet-tab-drag-sort.d.ts +1 -0
- package/lib/types/views/sheet-bar/sheet-bar-tabs/utils/slide-tab-bar.d.ts +2 -1
- package/lib/types/views/sheet-slider/SheetZoomInput.d.ts +18 -0
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +12 -12
- 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 +16 -16
package/lib/cjs/facade.js
CHANGED
|
@@ -449,7 +449,7 @@ var FUniverSheetsUIMixin = class extends _univerjs_core_facade.FUniver {
|
|
|
449
449
|
if (!workbook) return;
|
|
450
450
|
combined$Disposable.dispose();
|
|
451
451
|
const scrollManagerService = sheetRenderUnit.with(_univerjs_sheets_ui.SheetScrollManagerService);
|
|
452
|
-
const selectionService =
|
|
452
|
+
const selectionService = this._tryGetRenderDependency(sheetRenderUnit, _univerjs_sheets.SheetsSelectionsService);
|
|
453
453
|
combined$Disposable.add(this.registerEventHandler(this.Event.Scroll, () => scrollManagerService.validViewportScrollInfo$.subscribe((params) => {
|
|
454
454
|
if (!params) return;
|
|
455
455
|
const eventParams = {
|
|
@@ -459,46 +459,56 @@ var FUniverSheetsUIMixin = class extends _univerjs_core_facade.FUniver {
|
|
|
459
459
|
};
|
|
460
460
|
this.fireEvent(this.Event.Scroll, eventParams);
|
|
461
461
|
})));
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
462
|
+
if (selectionService) {
|
|
463
|
+
combined$Disposable.add(this.registerEventHandler(this.Event.SelectionMoveStart, () => selectionService.selectionMoveStart$.subscribe((selections) => {
|
|
464
|
+
var _selections$map;
|
|
465
|
+
const eventParams = {
|
|
466
|
+
workbook,
|
|
467
|
+
worksheet: workbook.getActiveSheet(),
|
|
468
|
+
selections: (_selections$map = selections === null || selections === void 0 ? void 0 : selections.map((s) => s.range)) !== null && _selections$map !== void 0 ? _selections$map : []
|
|
469
|
+
};
|
|
470
|
+
this.fireEvent(this.Event.SelectionMoveStart, eventParams);
|
|
471
|
+
})));
|
|
472
|
+
combined$Disposable.add(this.registerEventHandler(this.Event.SelectionMoving, () => selectionService.selectionMoving$.subscribe((selections) => {
|
|
473
|
+
var _selections$map2;
|
|
474
|
+
const eventParams = {
|
|
475
|
+
workbook,
|
|
476
|
+
worksheet: workbook.getActiveSheet(),
|
|
477
|
+
selections: (_selections$map2 = selections === null || selections === void 0 ? void 0 : selections.map((s) => s.range)) !== null && _selections$map2 !== void 0 ? _selections$map2 : []
|
|
478
|
+
};
|
|
479
|
+
this.fireEvent(this.Event.SelectionMoving, eventParams);
|
|
480
|
+
})));
|
|
481
|
+
combined$Disposable.add(this.registerEventHandler(this.Event.SelectionMoveEnd, () => selectionService.selectionMoveEnd$.subscribe((selections) => {
|
|
482
|
+
var _selections$map3;
|
|
483
|
+
const eventParams = {
|
|
484
|
+
workbook,
|
|
485
|
+
worksheet: workbook.getActiveSheet(),
|
|
486
|
+
selections: (_selections$map3 = selections === null || selections === void 0 ? void 0 : selections.map((s) => s.range)) !== null && _selections$map3 !== void 0 ? _selections$map3 : []
|
|
487
|
+
};
|
|
488
|
+
this.fireEvent(this.Event.SelectionMoveEnd, eventParams);
|
|
489
|
+
})));
|
|
490
|
+
combined$Disposable.add(this.registerEventHandler(this.Event.SelectionChanged, () => selectionService.selectionChanged$.subscribe((selections) => {
|
|
491
|
+
var _selections$map4;
|
|
492
|
+
const eventParams = {
|
|
493
|
+
workbook,
|
|
494
|
+
worksheet: workbook.getActiveSheet(),
|
|
495
|
+
selections: (_selections$map4 = selections === null || selections === void 0 ? void 0 : selections.map((s) => s.range)) !== null && _selections$map4 !== void 0 ? _selections$map4 : []
|
|
496
|
+
};
|
|
497
|
+
this.fireEvent(this.Event.SelectionChanged, eventParams);
|
|
498
|
+
})));
|
|
499
|
+
}
|
|
498
500
|
sheetRenderUnit = null;
|
|
499
501
|
this.disposeWithMe(combined$Disposable);
|
|
500
502
|
}));
|
|
501
503
|
}
|
|
504
|
+
_tryGetRenderDependency(render, dependency) {
|
|
505
|
+
try {
|
|
506
|
+
return render.with(dependency);
|
|
507
|
+
} catch (error) {
|
|
508
|
+
if (error instanceof Error && (error.message.includes("DependencyNotFoundError") || error.message.includes("Cannot find"))) return null;
|
|
509
|
+
throw error;
|
|
510
|
+
}
|
|
511
|
+
}
|
|
502
512
|
/**
|
|
503
513
|
* @ignore
|
|
504
514
|
*/
|