@univerjs/sheets-ui 0.1.2 → 0.1.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/README.md +2 -0
- package/lib/cjs/index.js +10 -10
- package/lib/es/index.js +6220 -6419
- package/lib/index.css +1 -1
- package/lib/types/basics/const/index.d.ts +0 -1
- package/lib/types/basics/index.d.ts +0 -1
- package/lib/types/commands/commands/set-scroll.command.d.ts +15 -8
- package/lib/types/common/utils.d.ts +7 -0
- package/lib/types/controllers/editor/formula-editor.controller.d.ts +3 -3
- package/lib/types/controllers/editor/start-edit.controller.d.ts +1 -0
- package/lib/types/controllers/editor-bridge.controller.d.ts +6 -2
- package/lib/types/controllers/scroll.controller.d.ts +11 -5
- package/lib/types/controllers/sheet-render.controller.d.ts +6 -5
- package/lib/types/controllers/sheet-ui.controller.d.ts +3 -3
- package/lib/types/controllers/shortcuts/utils.d.ts +9 -4
- package/lib/types/index.d.ts +6 -2
- package/lib/types/locale/zh-CN.d.ts +4 -0
- package/lib/types/services/canvas-pop-manager.service.d.ts +58 -0
- package/lib/types/services/clipboard/__tests__/clipboard-test-bed.d.ts +9 -1
- package/lib/types/services/clipboard/clipboard.service.d.ts +6 -3
- package/lib/types/services/clipboard/html-to-usm/converter.d.ts +2 -0
- package/lib/types/services/clipboard/utils.d.ts +6 -1
- package/lib/types/services/scroll-manager.service.d.ts +2 -1
- package/lib/types/services/selection/selection-render.service.d.ts +5 -4
- package/lib/types/services/sheet-skeleton-manager.service.d.ts +3 -1
- package/lib/types/views/sheet-container/SheetContainer.d.ts +0 -6
- package/lib/umd/index.js +10 -10
- package/package.json +27 -25
- package/lib/types/basics/const/default-univer-sheet-config.d.ts +0 -141
- package/lib/types/basics/interfaces/cell.d.ts +0 -20
- package/lib/types/basics/interfaces/component-config/i-sheet-ui-plugin-config.d.ts +0 -27
- package/lib/types/basics/interfaces/component-config/index.d.ts +0 -17
- package/lib/types/basics/interfaces/component-config/sheet-container-config.d.ts +0 -34
- package/lib/types/basics/interfaces/component-config/toolbar-config.d.ts +0 -39
- package/lib/types/basics/interfaces/index.d.ts +0 -16
- package/lib/types/components/range-selector/RangeSelector.d.ts +0 -21
- package/lib/types/controllers/navigation/navigation.controller.d.ts +0 -22
package/lib/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.univer-range-selector{overflow:hidden;display:flex;align-items:center;justify-content:space-between;padding:0 var(--padding-sm) 0 var(--padding-base);border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-base)}.univer-range-selector-editor{cursor:text;overflow:hidden;display:inline-block;width:218px;height:20px;padding:6px 0;font-size:var(--font-size-xs);line-height:20px;text-wrap:nowrap;border:0;outline:0}.univer-range-selector-editor::selection{color:rgb(var(--color-white));background-color:rgb(var(--primary-color))}.univer-range-selector-editor:empty:before{content:attr(data-placeholder);color:rgb(var(--grey-400))}.univer-range-selector-icon{cursor:pointer;display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;font-size:var(--font-size-lg);color:rgb(var(--text-color));background-color:transparent;border:none;border-radius:var(--border-radius-base);outline:none}.univer-range-selector-icon:not([disabled]):hover{background-color:rgb(var(--grey-100))}.univer-range-selector-icon[disabled]{cursor:not-allowed;color:rgb(var(--grey-200))}.univer-range-selector-active{border-color:rgb(var(--primary-color))}.univer-range-selector-active .univer-range-selector-icon{color:rgb(var(--primary-color))}.univer-sheets-ui-context-menu-input{display:flex;gap:var(--margin-sm);align-items:center}.univer-sheets-ui-context-menu-input-container{width:72px}.univer-sheets-ui-context-menu-input-number{height:24px}.univer-sheet-container{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;height:36px;padding:0 var(--padding-xl)}.univer-ui-plugin-sheets-border-panel{display:grid;gap:var(--margin-sm)}.univer-ui-plugin-sheets-border-panel-position{display:grid;grid-template-columns:repeat(5,1fr);gap:var(--margin-xxs);box-sizing:border-box;padding-bottom:var(--padding-base);border-bottom:1px solid rgb(var(--border-color))}.univer-ui-plugin-sheets-border-panel-position-item{display:flex;align-items:center;justify-content:center;width:24px;height:24px;font-size:var(--font-size-lg);border-radius:var(--border-radius-base)}.univer-ui-plugin-sheets-border-panel-position-item:hover{background-color:rgb(var(--bg-color-hover))}.univer-ui-plugin-sheets-border-panel-styles{display:flex;gap:var(--margin-xs);align-items:center;justify-content:space-around}.univer-ui-plugin-sheets-border-panel-board{box-sizing:border-box;padding:var(--padding-base);background-color:rgb(var(--bg-color-secondary));border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-lg);box-shadow:var(--box-shadow-base)}.univer-ui-plugin-sheets-border-panel-button{cursor:pointer;position:relative;display:flex;gap:var(--margin-xs);align-items:center;height:24px;padding:0 var(--padding-xs);font-size:var(--font-size-lg);border-radius:var(--border-radius-base);transition:all .15s}.univer-ui-plugin-sheets-border-panel-button:hover{background-color:rgb(var(--bg-color-hover))}.univer-ui-plugin-sheets-border-panel-more-icon{font-size:10px;color:rgb(var(--grey-400))}.univer-count-bar{display:flex;flex:0 0 260px;justify-content:flex-end}.univer-editor-container{position:absolute;z-index:10;top:200px;left:100px;display:flex;width:100px;height:50px;border:1.5px solid rgb(var(--primary-color));outline:1.5px solid rgba(var(--primary-color-hover),.5);box-shadow:none}.univer-editor-container .univer-editor-input{position:relative;display:flex;width:100%;height:100%;background:#fff}.univer-formula-box{display:flex;box-sizing:border-box;height:28px;background:rgb(var(--bg-color-secondary));border-bottom:1px solid rgb(var(--border-color));transition:height .15s}.univer-formula-box .univer-name-ranges{box-sizing:border-box;width:80px;height:100%;position:relative}.univer-formula-box .univer-name-ranges-input{height:100%;border-right:1px solid rgb(var(--border-color))}.univer-formula-box .univer-formula-bar{display:flex;width:100%;height:100%}.univer-formula-box .univer-formula-bar .univer-formula-icon{padding:6px 0}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper{position:relative;display:flex;gap:var(--margin-xs);align-items:center;justify-content:center;box-sizing:border-box;width:80px;height:100%;font-size:var(--font-size-xs);border-right:1px solid rgb(var(--border-color))}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper .univer-icon-container{cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:var(--font-size-lg)}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper .univer-icon-container-success.univer-formula-active{color:rgb(var(--success-color))}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper .univer-icon-container-error.univer-formula-active{color:rgb(var(--error-color))}.univer-formula-box .univer-formula-bar .univer-formula-input{overflow:hidden;display:flex;flex:1;width:100%;padding:0 0 0 10px}.univer-formula-box .univer-formula-bar .univer-formula-input .univer-formula-content{position:relative;width:100%;height:100%;word-wrap:break-word;outline:none}.univer-formula-box .univer-formula-bar .univer-formula-input .univer-arrow-container{cursor:pointer;display:flex;align-items:center;justify-content:center;width:20px;height:100%;font-size:var(--font-size-xs);color:rgb(var(--text-color-secondary))}.univer-operate-container{position:absolute;z-index:1;right:0;left:0;width:0;height:0}.univer-auto-fill-popup-menu{display:grid;gap:var(--margin-xxs);align-items:center;box-sizing:border-box;min-width:128px;margin-top:0;margin-bottom:0;padding:var(--padding-sm);font-size:var(--font-size-base);background-color:rgb(var(--bg-color-secondary));border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-lg);box-shadow:var(--box-shadow-lg)}.univer-auto-fill-popup-menu li{list-style:none}.univer-auto-fill-popup-menu-item{cursor:pointer;position:relative;display:flex;align-items:center;box-sizing:border-box;width:134px;height:28px;padding:var(--padding-xs) 0 var(--padding-xs) 36px;font-size:13px;font-weight:400;font-style:normal;line-height:20px;color:rgb(var(--black, #35322b));text-align:left;border-radius:4px;border-radius:var(--border-radius-base);transition:background .2s}.univer-auto-fill-popup-menu-item:hover{background-color:rgb(var(--bg-color-hover))}.univer-auto-fill-popup-menu-item-icon{position:absolute;top:50%;left:var(--padding-xs);transform:translateY(-50%);display:flex;align-items:center;justify-content:center}.univer-auto-fill-popup-menu-item-title{padding:var(--padding-xs) var(--padding-xs) var(--padding-xs) 0;vertical-align:middle}.univer-auto-fill-popup-menu-item-hide{color:rgb(var(--text-color-secondary))}.univer-auto-fill-popup-menu-item:hover{background:rgb(var(--grey-100))}.univer-btn-container{display:flex;align-items:center;justify-content:center;padding:3px;background:#fff;border:1px solid rgb(var(--grey-200, #e5e5e5));border-radius:4px}.univer-btn-container:hover,.univer-btn-container.univer-btn-container-expand{background:rgb(var(--grey-100, #f5f5f5))}.univer-sheet-bar{position:relative;display:flex;flex:1 1 0px;flex-direction:row;min-width:calc(100% - 592px);max-width:calc(100% - 260px);height:100%;background-color:rgb(var(--bg-color))}.univer-sheet-bar-options{display:flex;flex-direction:row;align-items:center;margin:var(--margin-xxs);transition:display .2s}.univer-sheet-bar-options-divider:after{content:"";display:block;width:1px;height:16px;margin:0 var(--margin-xs);background-color:rgb(var(--grey-400))}.univer-sheet-bar-btn{cursor:pointer;display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;font-size:var(--font-size-lg);color:rgb(var(--text-color-secondary-darker));background-color:transparent;border:none;border-radius:var(--border-radius-base);outline:none}.univer-sheet-bar-btn:not([disabled]):hover{background-color:rgb(var(--bg-color-hover))}.univer-sheet-bar-btn[disabled]{cursor:not-allowed;color:rgb(var(--grey-200))}.univer-sheet-bar-menu{display:grid;gap:var(--margin-xxs);align-items:center;box-sizing:border-box;padding:var(--padding-sm);background-color:rgb(var(--bg-color-secondary));border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-lg);box-shadow:var(--box-shadow-lg)}.univer-sheet-bar-menu li{list-style:none}.univer-sheet-bar-menu-item{cursor:pointer;position:relative;display:flex;box-sizing:border-box;padding:var(--padding-xs) 24px;color:rgb(var(--text-color));border-radius:var(--border-radius-base);transition:background .2s}.univer-sheet-bar-menu-item:hover{background-color:rgb(var(--bg-color-hover))}.univer-sheet-bar-menu-item-icon{position:absolute;top:50%;left:var(--margin-xxs);transform:translateY(-50%);color:transparent}.univer-sheet-bar-menu-item-hide .univer-sheet-bar-menu-item-icon{display:flex;align-items:center;justify-content:center;width:16px;height:16px;color:rgb(var(--grey-400))}.univer-sheet-bar-menu-item-select{font-weight:500;color:rgb(var(--primary-color))}.univer-sheet-bar-menu-item-select .univer-sheet-bar-menu-item-icon{display:flex;align-items:center;justify-content:center;width:16px;height:16px;color:rgb(var(--primary-color))}.univer-sheet-bar-menu-item-label{font-size:var(--font-size-xs);font-weight:400;line-height:20px}.univer-slide-tab-bar-container{overflow:hidden;max-width:calc(100% - 112px)}.univer-slide-tab-bar-container .univer-slide-tab-bar{user-select:none;overflow:hidden;display:flex;flex-direction:row;align-items:center;padding:var(--padding-xs) 6px;transition:box-shadow .2s}.univer-slide-tab-item{cursor:pointer;user-select:none;display:flex;flex-direction:row;flex-grow:1;align-items:center;box-sizing:border-box;margin:0 var(--margin-xxs);font-size:var(--font-size-xs);line-height:16px;color:rgb(var(--grey-1000));border-radius:var(--border-radius-base)}.univer-slide-tab-item:not(.univer-slide-tab-active):hover{background-color:rgb(var(--bg-color-hover))}.univer-slide-tab-item .univer-slide-tab-span{box-sizing:border-box;padding:var(--padding-xs) var(--padding-sm);white-space:nowrap;border:2px solid transparent;border-radius:var(--border-radius-base)}.univer-slide-tab-item .univer-slide-tab-span-edit{cursor:text;outline:none}.univer-slide-tab-item .univer-slide-tab-span-edit::selection{color:rgb(var(--color-white));background-color:rgb(var(--primary-color))}.univer-slide-tab-active{font-weight:700;color:rgb(var(--primary-color));background-color:rgb(var(--bg-color-secondary));box-shadow:0 0 8px #00000014;transition:box-shadow .2s}.univer-slide-tab-item-dropdown{user-select:none;min-width:auto!important}.univer-status-bar{display:flex;align-items:center;max-width:332px}.univer-status-bar.univer-single-mode{max-width:136px}.univer-status-bar-div{width:1px;height:16px;margin-left:10px;background:rgb(var(--grey-400, #ccc))}.univer-statistic-list{display:flex}.univer-statistic-list-column{flex-direction:column}.univer-statistic-list-column .univer-statistic-item{font-size:12px;line-height:140%;color:rgb(var(--grey-500))}.univer-statistic-item{cursor:default;overflow:hidden;display:flex;justify-content:flex-start;max-width:106px;margin-right:8px;font-size:12px;font-weight:400;font-style:normal;line-height:20px;color:rgb(var(--grey-900));text-align:center;text-overflow:ellipsis;white-space:nowrap}.univer-statistic-picker{display:grid;gap:var(--margin-sm);align-items:center;box-sizing:border-box;width:196px;padding:var(--padding-base);font-size:var(--font-size-xs);background-color:rgb(var(--color-white));border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-lg);box-shadow:var(--box-shadow-lg)}.univer-statistic-picker-item{display:flex;align-items:center;justify-content:flex-start}.univer-statistic-more{transform:rotate(90deg);display:flex;align-items:center;justify-content:center;width:24px;height:24px;font-size:12px;color:rgb(var(--grey-600, #e8e8e8));border-radius:4px}.univer-statistic-more:hover{background:rgb(var(--grey-300, #e8e8e8))}
|
|
1
|
+
.univer-sheets-ui-context-menu-input{display:flex;gap:var(--margin-sm);align-items:center}.univer-sheets-ui-context-menu-input-container{width:72px}.univer-sheets-ui-context-menu-input-number{height:24px}.univer-sheet-container{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;height:36px;padding:0 var(--padding-xl)}.univer-ui-plugin-sheets-border-panel{display:grid;gap:var(--margin-sm)}.univer-ui-plugin-sheets-border-panel-position{display:grid;grid-template-columns:repeat(5,1fr);gap:var(--margin-xxs);box-sizing:border-box;padding-bottom:var(--padding-base);border-bottom:1px solid rgb(var(--border-color))}.univer-ui-plugin-sheets-border-panel-position-item{display:flex;align-items:center;justify-content:center;width:24px;height:24px;font-size:var(--font-size-lg);border-radius:var(--border-radius-base)}.univer-ui-plugin-sheets-border-panel-position-item:hover,.univer-ui-plugin-sheets-border-panel-position-item-active{background-color:rgb(var(--bg-color-hover))}.univer-ui-plugin-sheets-border-panel-styles{display:flex;gap:var(--margin-xs);align-items:center;justify-content:space-around}.univer-ui-plugin-sheets-border-panel-board{box-sizing:border-box;padding:var(--padding-base);background-color:rgb(var(--bg-color-secondary));border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-lg);box-shadow:var(--box-shadow-base)}.univer-ui-plugin-sheets-border-panel-button{cursor:pointer;position:relative;display:flex;gap:var(--margin-xs);align-items:center;height:24px;padding:0 var(--padding-xs);font-size:var(--font-size-lg);border-radius:var(--border-radius-base);transition:all .15s}.univer-ui-plugin-sheets-border-panel-button:hover{background-color:rgb(var(--bg-color-hover))}.univer-ui-plugin-sheets-border-panel-more-icon{font-size:10px;color:rgb(var(--grey-400))}.univer-count-bar{display:flex;flex:0 0 260px;justify-content:flex-end}.univer-editor-container{position:absolute;z-index:10;top:200px;left:100px;display:flex;width:100px;height:50px;border:1.5px solid rgb(var(--primary-color));outline:1.5px solid rgba(var(--primary-color-hover),.5);box-shadow:none}.univer-editor-container .univer-editor-input{position:relative;display:flex;width:100%;height:100%;background:#fff}.univer-formula-box{display:flex;box-sizing:border-box;height:28px;background:rgb(var(--bg-color-secondary));border-bottom:1px solid rgb(var(--border-color));transition:height .15s}.univer-formula-box .univer-name-ranges{box-sizing:border-box;width:80px;height:100%;position:relative}.univer-formula-box .univer-name-ranges-input{height:100%;border-right:1px solid rgb(var(--border-color))}.univer-formula-box .univer-formula-bar{display:flex;width:100%;height:100%}.univer-formula-box .univer-formula-bar .univer-formula-icon{padding:6px 0}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper{position:relative;display:flex;gap:var(--margin-xs);align-items:center;justify-content:center;box-sizing:border-box;width:80px;height:100%;font-size:var(--font-size-xs);border-right:1px solid rgb(var(--border-color))}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper .univer-icon-container{cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:var(--font-size-lg)}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper .univer-icon-container-success.univer-formula-active{color:rgb(var(--success-color))}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper .univer-icon-container-error.univer-formula-active{color:rgb(var(--error-color))}.univer-formula-box .univer-formula-bar .univer-formula-input{overflow:hidden;display:flex;flex:1;width:100%;padding:0 0 0 10px}.univer-formula-box .univer-formula-bar .univer-formula-input .univer-formula-content{position:relative;width:100%;height:100%;word-wrap:break-word;outline:none}.univer-formula-box .univer-formula-bar .univer-formula-input .univer-arrow-container{cursor:pointer;display:flex;align-items:center;justify-content:center;width:20px;height:100%;font-size:var(--font-size-xs);color:rgb(var(--text-color-secondary))}.univer-operate-container{position:absolute;z-index:10;right:0;left:0;width:0;height:0}.univer-auto-fill-popup-menu{display:grid;gap:var(--margin-xxs);align-items:center;box-sizing:border-box;min-width:128px;margin-top:0;margin-bottom:0;padding:var(--padding-sm);font-size:var(--font-size-base);background-color:rgb(var(--bg-color-secondary));border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-lg);box-shadow:var(--box-shadow-lg)}.univer-auto-fill-popup-menu li{list-style:none}.univer-auto-fill-popup-menu-item{cursor:pointer;position:relative;display:flex;align-items:center;box-sizing:border-box;width:134px;height:28px;padding:var(--padding-xs) 0 var(--padding-xs) 36px;font-size:13px;font-weight:400;font-style:normal;line-height:20px;color:rgb(var(--black, #35322b));text-align:left;border-radius:4px;border-radius:var(--border-radius-base);transition:background .2s}.univer-auto-fill-popup-menu-item:hover{background-color:rgb(var(--bg-color-hover))}.univer-auto-fill-popup-menu-item-icon{position:absolute;top:50%;left:var(--padding-xs);transform:translateY(-50%);display:flex;align-items:center;justify-content:center}.univer-auto-fill-popup-menu-item-title{padding:var(--padding-xs) var(--padding-xs) var(--padding-xs) 0;vertical-align:middle}.univer-auto-fill-popup-menu-item-hide{color:rgb(var(--text-color-secondary))}.univer-auto-fill-popup-menu-item:hover{background:rgb(var(--grey-100))}.univer-btn-container{display:flex;align-items:center;justify-content:center;padding:3px;background:#fff;border:1px solid rgb(var(--grey-200, #e5e5e5));border-radius:4px}.univer-btn-container:hover,.univer-btn-container.univer-btn-container-expand{background:rgb(var(--grey-100, #f5f5f5))}.univer-sheet-bar{position:relative;display:flex;flex:1 1 0px;flex-direction:row;min-width:calc(100% - 592px);max-width:calc(100% - 260px);height:100%;background-color:rgb(var(--bg-color))}.univer-sheet-bar-options{display:flex;flex-direction:row;align-items:center;margin:var(--margin-xxs);transition:display .2s}.univer-sheet-bar-options-divider:after{content:"";display:block;width:1px;height:16px;margin:0 var(--margin-xs);background-color:rgb(var(--grey-400))}.univer-sheet-bar-btn{cursor:pointer;display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;font-size:var(--font-size-lg);color:rgb(var(--text-color-secondary-darker));background-color:transparent;border:none;border-radius:var(--border-radius-base);outline:none}.univer-sheet-bar-btn:not([disabled]):hover{background-color:rgb(var(--bg-color-hover))}.univer-sheet-bar-btn[disabled]{cursor:not-allowed;color:rgb(var(--grey-200))}.univer-sheet-bar-menu{display:grid;gap:var(--margin-xxs);align-items:center;box-sizing:border-box;padding:var(--padding-sm);background-color:rgb(var(--bg-color-secondary));border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-lg);box-shadow:var(--box-shadow-lg)}.univer-sheet-bar-menu li{list-style:none}.univer-sheet-bar-menu-item{cursor:pointer;position:relative;display:flex;box-sizing:border-box;padding:var(--padding-xs) 24px;color:rgb(var(--text-color));border-radius:var(--border-radius-base);transition:background .2s}.univer-sheet-bar-menu-item:hover{background-color:rgb(var(--bg-color-hover))}.univer-sheet-bar-menu-item-icon{position:absolute;top:50%;left:var(--margin-xxs);transform:translateY(-50%);color:transparent}.univer-sheet-bar-menu-item-hide .univer-sheet-bar-menu-item-icon{display:flex;align-items:center;justify-content:center;width:16px;height:16px;color:rgb(var(--grey-400))}.univer-sheet-bar-menu-item-select{font-weight:500;color:rgb(var(--primary-color))}.univer-sheet-bar-menu-item-select .univer-sheet-bar-menu-item-icon{display:flex;align-items:center;justify-content:center;width:16px;height:16px;color:rgb(var(--primary-color))}.univer-sheet-bar-menu-item-label{font-size:var(--font-size-xs);font-weight:400;line-height:20px}.univer-slide-tab-bar-container{overflow:hidden;max-width:calc(100% - 112px)}.univer-slide-tab-bar-container .univer-slide-tab-bar{user-select:none;overflow:hidden;display:flex;flex-direction:row;align-items:center;padding:var(--padding-xs) 6px;transition:box-shadow .2s}.univer-slide-tab-item{cursor:pointer;user-select:none;display:flex;flex-direction:row;flex-grow:1;align-items:center;box-sizing:border-box;margin:0 var(--margin-xxs);font-size:var(--font-size-xs);line-height:16px;color:rgb(var(--grey-1000));border-radius:var(--border-radius-base)}.univer-slide-tab-item:not(.univer-slide-tab-active):hover{background-color:rgb(var(--bg-color-hover))}.univer-slide-tab-item .univer-slide-tab-span{box-sizing:border-box;padding:var(--padding-xs) var(--padding-sm);white-space:nowrap;border:2px solid transparent;border-radius:var(--border-radius-base)}.univer-slide-tab-item .univer-slide-tab-span-edit{cursor:text;outline:none}.univer-slide-tab-item .univer-slide-tab-span-edit::selection{color:rgb(var(--color-white));background-color:rgb(var(--primary-color))}.univer-slide-tab-active{font-weight:700;color:rgb(var(--primary-color));background-color:rgb(var(--bg-color-secondary));box-shadow:0 0 8px #00000014;transition:box-shadow .2s}.univer-slide-tab-item-dropdown{user-select:none;min-width:auto!important}.univer-status-bar{display:flex;align-items:center;max-width:332px}.univer-status-bar.univer-single-mode{max-width:136px}.univer-status-bar-div{width:1px;height:16px;margin-left:10px;background:rgb(var(--grey-400, #ccc))}.univer-statistic-list{display:flex}.univer-statistic-list-column{flex-direction:column}.univer-statistic-list-column .univer-statistic-item{font-size:12px;line-height:140%;color:rgb(var(--grey-500))}.univer-statistic-item{cursor:default;overflow:hidden;display:flex;justify-content:flex-start;max-width:106px;margin-right:8px;font-size:var(--font-size-xxs);font-weight:400;font-style:normal;line-height:20px;color:rgb(var(--grey-900));text-align:center;text-overflow:ellipsis;white-space:nowrap}.univer-statistic-item:hover{color:rgb(var(--color-black))}.univer-statistic-picker{display:grid;gap:var(--margin-sm);align-items:center;box-sizing:border-box;width:196px;padding:var(--padding-base);font-size:var(--font-size-xs);background-color:rgb(var(--color-white));border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-lg);box-shadow:var(--box-shadow-lg)}.univer-statistic-picker-item{display:flex;align-items:center;justify-content:flex-start}.univer-statistic-more{transform:rotate(90deg);display:flex;align-items:center;justify-content:center;width:24px;height:24px;font-size:12px;color:rgb(var(--grey-600, #e8e8e8));border-radius:4px}.univer-statistic-more:hover{background:rgb(var(--grey-300, #e8e8e8))}
|
|
@@ -13,13 +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 { ICommand } from '@univerjs/core';
|
|
17
|
-
export interface IScrollCommandParams {
|
|
18
|
-
offsetX?: number;
|
|
19
|
-
offsetY?: number;
|
|
20
|
-
sheetViewStartRow?: number;
|
|
21
|
-
sheetViewStartColumn?: number;
|
|
22
|
-
}
|
|
16
|
+
import type { ICommand, IRange } from '@univerjs/core';
|
|
23
17
|
export interface ISetScrollRelativeCommandParams {
|
|
24
18
|
offsetX?: number;
|
|
25
19
|
offsetY?: number;
|
|
@@ -28,11 +22,24 @@ export interface ISetScrollRelativeCommandParams {
|
|
|
28
22
|
* This command is used to manage the scroll by relative offset
|
|
29
23
|
*/
|
|
30
24
|
export declare const SetScrollRelativeCommand: ICommand<ISetScrollRelativeCommandParams>;
|
|
25
|
+
export interface IScrollCommandParams {
|
|
26
|
+
offsetX?: number;
|
|
27
|
+
offsetY?: number;
|
|
28
|
+
sheetViewStartRow?: number;
|
|
29
|
+
sheetViewStartColumn?: number;
|
|
30
|
+
}
|
|
31
31
|
/**
|
|
32
32
|
* This command is used to manage the scroll position of the current view by specifying the cell index of the top left cell
|
|
33
33
|
*/
|
|
34
34
|
export declare const ScrollCommand: ICommand<IScrollCommandParams>;
|
|
35
|
+
export interface IScrollToCellCommandParams {
|
|
36
|
+
range: IRange;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The command is used to scroll to the specific cell if the target cell is not in the viewport.
|
|
40
|
+
*/
|
|
41
|
+
export declare const ScrollToCellCommand: ICommand<IScrollToCellCommandParams>;
|
|
35
42
|
/**
|
|
36
43
|
* This command is reset the scroll position of the current view to 0, 0
|
|
37
44
|
*/
|
|
38
|
-
export declare const
|
|
45
|
+
export declare const ResetScrollCommand: ICommand;
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
import type { ICellData, IMutationInfo, IRange, Nullable, Worksheet } from '@univerjs/core';
|
|
17
17
|
import { ObjectMatrix } from '@univerjs/core';
|
|
18
18
|
import type { IAccessor } from '@wendellhu/redi';
|
|
19
|
+
import type { IBoundRectNoAngle, Scene, SpreadsheetSkeleton } from '@univerjs/engine-render';
|
|
19
20
|
export declare function checkCellContentInRanges(worksheet: Worksheet, ranges: IRange[]): boolean;
|
|
20
21
|
export declare function checkCellContentInRange(worksheet: Worksheet, range: IRange): boolean;
|
|
21
22
|
export declare function getClearContentMutationParamsForRanges(accessor: IAccessor, unitId: string, worksheet: Worksheet, ranges: IRange[]): {
|
|
@@ -23,3 +24,9 @@ export declare function getClearContentMutationParamsForRanges(accessor: IAccess
|
|
|
23
24
|
redos: IMutationInfo[];
|
|
24
25
|
};
|
|
25
26
|
export declare function getClearContentMutationParamForRange(worksheet: Worksheet, range: IRange): ObjectMatrix<Nullable<ICellData>>;
|
|
27
|
+
export declare function getViewportByCell(row: number, column: number, scene: Scene, worksheet: Worksheet): import("@univerjs/engine-render").Viewport | undefined;
|
|
28
|
+
export declare function transformBound2OffsetBound(originBound: IBoundRectNoAngle, scene: Scene, skeleton: SpreadsheetSkeleton, worksheet: Worksheet): IBoundRectNoAngle;
|
|
29
|
+
export declare function transformPosition2Offset(x: number, y: number, scene: Scene, skeleton: SpreadsheetSkeleton, worksheet: Worksheet): {
|
|
30
|
+
x: number;
|
|
31
|
+
y: number;
|
|
32
|
+
};
|
|
@@ -22,15 +22,15 @@ export declare class FormulaEditorController extends RxDisposable {
|
|
|
22
22
|
private readonly _univerInstanceService;
|
|
23
23
|
private readonly _renderManagerService;
|
|
24
24
|
private readonly _editorBridgeService;
|
|
25
|
-
private readonly _docSkeletonManagerService;
|
|
26
|
-
private readonly _docViewModelManagerService;
|
|
27
25
|
private readonly _commandService;
|
|
28
26
|
private readonly _contextService;
|
|
29
27
|
private readonly _formulaEditorManagerService;
|
|
30
28
|
private readonly _undoRedoService;
|
|
29
|
+
private readonly _docSkeletonManagerService;
|
|
30
|
+
private readonly _docViewModelManagerService;
|
|
31
31
|
private readonly _textSelectionManagerService;
|
|
32
32
|
private _loadedMap;
|
|
33
|
-
constructor(_univerInstanceService: IUniverInstanceService, _renderManagerService: IRenderManagerService, _editorBridgeService: IEditorBridgeService,
|
|
33
|
+
constructor(_univerInstanceService: IUniverInstanceService, _renderManagerService: IRenderManagerService, _editorBridgeService: IEditorBridgeService, _commandService: ICommandService, _contextService: IContextService, _formulaEditorManagerService: IFormulaEditorManagerService, _undoRedoService: IUndoRedoService, _docSkeletonManagerService: DocSkeletonManagerService, _docViewModelManagerService: DocViewModelManagerService, _textSelectionManagerService: TextSelectionManagerService);
|
|
34
34
|
private _initialize;
|
|
35
35
|
private _create;
|
|
36
36
|
private _listenFxBtnClick;
|
|
@@ -17,7 +17,7 @@ import { ICommandService, IContextService, IUniverInstanceService, RxDisposable
|
|
|
17
17
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
18
18
|
import { SelectionManagerService } from '@univerjs/sheets';
|
|
19
19
|
import { Injector } from '@wendellhu/redi';
|
|
20
|
-
import { IEditorService, ILayoutService } from '@univerjs/ui';
|
|
20
|
+
import { IEditorService, ILayoutService, IRangeSelectorService } from '@univerjs/ui';
|
|
21
21
|
import { IEditorBridgeService } from '../services/editor-bridge.service';
|
|
22
22
|
import { SheetSkeletonManagerService } from '../services/sheet-skeleton-manager.service';
|
|
23
23
|
export declare class EditorBridgeController extends RxDisposable {
|
|
@@ -31,7 +31,8 @@ export declare class EditorBridgeController extends RxDisposable {
|
|
|
31
31
|
private readonly _editorService;
|
|
32
32
|
private readonly _contextService;
|
|
33
33
|
private readonly _selectionManagerService;
|
|
34
|
-
|
|
34
|
+
private readonly _rangeSelectorService;
|
|
35
|
+
constructor(_injector: Injector, _sheetSkeletonManagerService: SheetSkeletonManagerService, _currentUniverService: IUniverInstanceService, _commandService: ICommandService, _renderManagerService: IRenderManagerService, _editorBridgeService: IEditorBridgeService, _layoutService: ILayoutService, _editorService: IEditorService, _contextService: IContextService, _selectionManagerService: SelectionManagerService, _rangeSelectorService: IRangeSelectorService);
|
|
35
36
|
dispose(): void;
|
|
36
37
|
private _initialize;
|
|
37
38
|
private _initSelectionChangeListener;
|
|
@@ -44,6 +45,9 @@ export declare class EditorBridgeController extends RxDisposable {
|
|
|
44
45
|
*/
|
|
45
46
|
private _keepVisibleHideEditor;
|
|
46
47
|
private _hideEditor;
|
|
48
|
+
private _initialRangeSelector;
|
|
49
|
+
private _rangeSelector;
|
|
50
|
+
private _getCurrentUnitIdAndSheetId;
|
|
47
51
|
private _getSheetObject;
|
|
48
52
|
private _commandExecutedListener;
|
|
49
53
|
}
|
|
@@ -13,11 +13,15 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import type { IRange } from '@univerjs/core';
|
|
16
17
|
import { Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
|
|
17
18
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
18
19
|
import { SelectionManagerService } from '@univerjs/sheets';
|
|
19
20
|
import { ScrollManagerService } from '../services/scroll-manager.service';
|
|
20
21
|
import { SheetSkeletonManagerService } from '../services/sheet-skeleton-manager.service';
|
|
22
|
+
/**
|
|
23
|
+
* This controller handles scroll logic in sheet interaction.
|
|
24
|
+
*/
|
|
21
25
|
export declare class ScrollController extends Disposable {
|
|
22
26
|
private readonly _sheetSkeletonManagerService;
|
|
23
27
|
private readonly _currentUniverService;
|
|
@@ -26,13 +30,15 @@ export declare class ScrollController extends Disposable {
|
|
|
26
30
|
private readonly _selectionManagerService;
|
|
27
31
|
private readonly _scrollManagerService;
|
|
28
32
|
constructor(_sheetSkeletonManagerService: SheetSkeletonManagerService, _currentUniverService: IUniverInstanceService, _commandService: ICommandService, _renderManagerService: IRenderManagerService, _selectionManagerService: SelectionManagerService, _scrollManagerService: ScrollManagerService);
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
private
|
|
33
|
+
scrollToRange(range: IRange): boolean;
|
|
34
|
+
private _init;
|
|
35
|
+
private _initCommandListener;
|
|
32
36
|
private _getFreeze;
|
|
33
|
-
private
|
|
37
|
+
private _initScrollEventListener;
|
|
34
38
|
private _scrollSubscribeBinding;
|
|
35
|
-
private
|
|
39
|
+
private _initSkeletonListener;
|
|
36
40
|
private _updateSceneSize;
|
|
37
41
|
private _getSheetObject;
|
|
42
|
+
private _scrollToSelection;
|
|
43
|
+
private _scrollToCell;
|
|
38
44
|
}
|
|
@@ -13,17 +13,18 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
|
|
16
|
+
import { Disposable, ICommandService, IContextService, IUniverInstanceService } from '@univerjs/core';
|
|
17
17
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
18
18
|
import { SheetSkeletonManagerService } from '../services/sheet-skeleton-manager.service';
|
|
19
19
|
export declare class SheetRenderController extends Disposable {
|
|
20
20
|
private readonly _sheetSkeletonManagerService;
|
|
21
|
+
private readonly _contextService;
|
|
21
22
|
private readonly _currentUniverService;
|
|
22
23
|
private readonly _renderManagerService;
|
|
23
24
|
private readonly _commandService;
|
|
24
|
-
constructor(_sheetSkeletonManagerService: SheetSkeletonManagerService, _currentUniverService: IUniverInstanceService, _renderManagerService: IRenderManagerService, _commandService: ICommandService);
|
|
25
|
-
|
|
26
|
-
private _initialize;
|
|
25
|
+
constructor(_sheetSkeletonManagerService: SheetSkeletonManagerService, _contextService: IContextService, _currentUniverService: IUniverInstanceService, _renderManagerService: IRenderManagerService, _commandService: ICommandService);
|
|
26
|
+
private _init;
|
|
27
27
|
private _initialRenderRefresh;
|
|
28
|
-
private
|
|
28
|
+
private _initCommandListener;
|
|
29
|
+
private _initContextListener;
|
|
29
30
|
}
|
|
@@ -20,17 +20,17 @@ import { Injector } from '@wendellhu/redi';
|
|
|
20
20
|
export declare class SheetUIController extends Disposable {
|
|
21
21
|
private readonly _injector;
|
|
22
22
|
private readonly _componentManager;
|
|
23
|
+
private readonly _layoutService;
|
|
23
24
|
private readonly _commandService;
|
|
24
25
|
private readonly _shortcutService;
|
|
25
26
|
private readonly _menuService;
|
|
26
27
|
private readonly _uiController;
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
constructor(_injector: Injector, _componentManager: ComponentManager, _layoutService: ILayoutService, _commandService: ICommandService, _shortcutService: IShortcutService, _menuService: IMenuService, _uiController: IDesktopUIController);
|
|
29
|
+
private _init;
|
|
29
30
|
private _initCustomComponents;
|
|
30
31
|
private _initCommands;
|
|
31
32
|
private _initMenus;
|
|
32
33
|
private _initShortcuts;
|
|
33
34
|
private _initWorkbenchParts;
|
|
34
|
-
private _init;
|
|
35
35
|
private _initFocusHandler;
|
|
36
36
|
}
|
|
@@ -18,26 +18,31 @@ export declare function whenSheetFocused(contextService: IContextService): boole
|
|
|
18
18
|
/**
|
|
19
19
|
* Requires the currently focused unit to be Workbook and the sheet editor is focused but not activated.
|
|
20
20
|
* @param contextService
|
|
21
|
-
* @returns
|
|
21
|
+
* @returns If the sheet editor is focused but not activated.
|
|
22
22
|
*/
|
|
23
23
|
export declare function whenSheetEditorFocused(contextService: IContextService): boolean;
|
|
24
24
|
/**
|
|
25
25
|
* Requires the currently focused unit to be Workbook and the sheet editor is activated.
|
|
26
26
|
* @param contextService
|
|
27
|
-
* @returns
|
|
27
|
+
* @returns If the sheet editor is activated.
|
|
28
28
|
*/
|
|
29
29
|
export declare function whenSheetEditorActivated(contextService: IContextService): boolean;
|
|
30
30
|
export declare function whenEditorActivated(contextService: IContextService): boolean;
|
|
31
31
|
/**
|
|
32
32
|
* Requires the currently focused editor is a formula editor.
|
|
33
33
|
* @param contextService
|
|
34
|
-
* @returns
|
|
34
|
+
* @returns If the formula editor is focused.
|
|
35
35
|
*/
|
|
36
36
|
export declare function whenFormulaEditorFocused(contextService: IContextService): boolean;
|
|
37
37
|
/**
|
|
38
38
|
* Requires the currently focused editor is a formula editor, and it is activated.
|
|
39
39
|
* @param contextService
|
|
40
|
-
* @returns
|
|
40
|
+
* @returns If the formula editor is activated.
|
|
41
41
|
*/
|
|
42
42
|
export declare function whenFormulaEditorActivated(contextService: IContextService): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Requires the currently focused editor is not a formula editor, and it is activated.
|
|
45
|
+
* @param contextService
|
|
46
|
+
* @returns If the editor is activated and the editor is not the formula editor.
|
|
47
|
+
*/
|
|
43
48
|
export declare function whenEditorDidNotInputFormulaActivated(contextService: IContextService): boolean;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -19,11 +19,12 @@ export { AutoFillCommand } from './commands/commands/auto-fill.command';
|
|
|
19
19
|
export { SheetPasteCommand } from './commands/commands/clipboard.command';
|
|
20
20
|
export { SheetCopyCommand } from './commands/commands/clipboard.command';
|
|
21
21
|
export { ExpandSelectionCommand, JumpOver, MoveSelectionCommand } from './commands/commands/set-selection.command';
|
|
22
|
-
export { SetCellEditVisibleArrowOperation } from './commands/operations/cell-edit.operation';
|
|
22
|
+
export { SetCellEditVisibleArrowOperation, SetCellEditVisibleOperation } from './commands/operations/cell-edit.operation';
|
|
23
23
|
export { SetScrollOperation } from './commands/operations/scroll.operation';
|
|
24
|
+
export { ScrollController } from './controllers/scroll.controller';
|
|
24
25
|
export { SetZoomRatioOperation } from './commands/operations/set-zoom-ratio.operation';
|
|
26
|
+
export { ResetScrollCommand, ScrollCommand, ScrollToCellCommand, SetScrollRelativeCommand, type IScrollCommandParams, type IScrollToCellCommandParams, type ISetScrollRelativeCommandParams, } from './commands/commands/set-scroll.command';
|
|
25
27
|
export { VIEWPORT_KEY } from './common/keys';
|
|
26
|
-
export { RangeSelector } from './components/range-selector/RangeSelector';
|
|
27
28
|
export { AutoFillController } from './controllers/auto-fill.controller';
|
|
28
29
|
export { PASTE_SPECIAL_MENU_ID } from './controllers/menu/menu';
|
|
29
30
|
export { whenFormulaEditorActivated } from './controllers/shortcuts/utils';
|
|
@@ -52,3 +53,6 @@ export type { ISheetSkeletonManagerParam } from './services/sheet-skeleton-manag
|
|
|
52
53
|
export { SheetSkeletonManagerService } from './services/sheet-skeleton-manager.service';
|
|
53
54
|
export { UniverSheetsUIPlugin } from './sheets-ui-plugin';
|
|
54
55
|
export { SheetCanvasView } from './views/sheet-canvas-view';
|
|
56
|
+
export { SHEET_VIEW_KEY } from './common/keys';
|
|
57
|
+
export { CanvasPopManagerService } from './services/canvas-pop-manager.service';
|
|
58
|
+
export { mergeSetRangeValues } from './services/clipboard/utils';
|
|
@@ -0,0 +1,58 @@
|
|
|
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 { Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
|
|
17
|
+
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
18
|
+
import type { BaseObject, Viewport } from '@univerjs/engine-render';
|
|
19
|
+
import { IGlobalPopupManagerService } from '@univerjs/ui';
|
|
20
|
+
import type { IDisposable } from '@wendellhu/redi';
|
|
21
|
+
import { SheetSkeletonManagerService } from './sheet-skeleton-manager.service';
|
|
22
|
+
interface ICanvasPopup {
|
|
23
|
+
componentKey: string;
|
|
24
|
+
mask?: boolean;
|
|
25
|
+
onClickOutside?: (e: MouseEvent) => void;
|
|
26
|
+
direction?: 'vertical' | 'horizontal';
|
|
27
|
+
offset?: [number, number];
|
|
28
|
+
}
|
|
29
|
+
export declare class CanvasPopManagerService extends Disposable {
|
|
30
|
+
private readonly _globalPopupManagerService;
|
|
31
|
+
private readonly _renderManagerService;
|
|
32
|
+
private readonly _univerInstanceService;
|
|
33
|
+
private readonly _sheetSkeletonManagerService;
|
|
34
|
+
private readonly _commandService;
|
|
35
|
+
constructor(_globalPopupManagerService: IGlobalPopupManagerService, _renderManagerService: IRenderManagerService, _univerInstanceService: IUniverInstanceService, _sheetSkeletonManagerService: SheetSkeletonManagerService, _commandService: ICommandService);
|
|
36
|
+
private _calcCellPosition;
|
|
37
|
+
private _createCellPositionObserver;
|
|
38
|
+
private _createObjectPositionObserver;
|
|
39
|
+
/**
|
|
40
|
+
* attach a popup to canvas object
|
|
41
|
+
* @param targetObject target canvas object
|
|
42
|
+
* @param popup popup item
|
|
43
|
+
* @returns disposable
|
|
44
|
+
*/
|
|
45
|
+
attachPopupToObject(targetObject: BaseObject, popup: ICanvasPopup): IDisposable;
|
|
46
|
+
/**
|
|
47
|
+
* attach a popup to given cell
|
|
48
|
+
* @param row cell row index
|
|
49
|
+
* @param col cell column index
|
|
50
|
+
* @param popup popup item
|
|
51
|
+
* @param viewport target viewport
|
|
52
|
+
* @returns disposable
|
|
53
|
+
*/
|
|
54
|
+
attachPopupToCell(row: number, col: number, popup: ICanvasPopup, viewport?: Viewport): {
|
|
55
|
+
dispose: () => void;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export {};
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import type { IWorkbookData } from '@univerjs/core';
|
|
17
17
|
import { Univer } from '@univerjs/core';
|
|
18
|
-
import type { Dependency } from '@wendellhu/redi';
|
|
18
|
+
import type { Dependency, IDisposable } from '@wendellhu/redi';
|
|
19
19
|
export declare class testMarkSelectionService {
|
|
20
20
|
addShape(): string | null;
|
|
21
21
|
removeShape(id: string): void;
|
|
@@ -23,6 +23,14 @@ export declare class testMarkSelectionService {
|
|
|
23
23
|
refreshShapes(): void;
|
|
24
24
|
getShapeMap(): Map<string, any>;
|
|
25
25
|
}
|
|
26
|
+
export declare class testNotificationService {
|
|
27
|
+
show(): IDisposable;
|
|
28
|
+
}
|
|
29
|
+
export declare class testPlatformService {
|
|
30
|
+
isWindows: boolean;
|
|
31
|
+
isMac: boolean;
|
|
32
|
+
isLinux: boolean;
|
|
33
|
+
}
|
|
26
34
|
export declare function clipboardTestBed(workbookConfig?: IWorkbookData, dependencies?: Dependency[]): {
|
|
27
35
|
univer: Univer;
|
|
28
36
|
get: {
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { Disposable, ICommandService, ILogService, IUndoRedoService, IUniverInstanceService } from '@univerjs/core';
|
|
16
|
+
import { Disposable, ICommandService, ILogService, IUndoRedoService, IUniverInstanceService, LocaleService } from '@univerjs/core';
|
|
17
17
|
import { SelectionManagerService } from '@univerjs/sheets';
|
|
18
|
-
import { IClipboardInterfaceService } from '@univerjs/ui';
|
|
18
|
+
import { IClipboardInterfaceService, INotificationService, IPlatformService } from '@univerjs/ui';
|
|
19
19
|
import type { IDisposable } from '@wendellhu/redi';
|
|
20
20
|
import { IMarkSelectionService } from '../mark-selection/mark-selection.service';
|
|
21
21
|
import { SheetSkeletonManagerService } from '../sheet-skeleton-manager.service';
|
|
@@ -49,6 +49,9 @@ export declare class SheetClipboardService extends Disposable implements ISheetC
|
|
|
49
49
|
private readonly _commandService;
|
|
50
50
|
private readonly _markSelectionService;
|
|
51
51
|
private readonly _sheetSkeletonManagerService;
|
|
52
|
+
private readonly _notificationService;
|
|
53
|
+
private readonly _platformService;
|
|
54
|
+
private readonly _localeService;
|
|
52
55
|
private _clipboardHooks;
|
|
53
56
|
private readonly _clipboardHooks$;
|
|
54
57
|
readonly clipboardHooks$: import("rxjs").Observable<ISheetClipboardHook[]>;
|
|
@@ -56,7 +59,7 @@ export declare class SheetClipboardService extends Disposable implements ISheetC
|
|
|
56
59
|
private _usmToHtml;
|
|
57
60
|
private _copyContentCache;
|
|
58
61
|
private _copyMarkId;
|
|
59
|
-
constructor(_logService: ILogService, _currentUniverService: IUniverInstanceService, _selectionManagerService: SelectionManagerService, _clipboardInterfaceService: IClipboardInterfaceService, _undoRedoService: IUndoRedoService, _commandService: ICommandService, _markSelectionService: IMarkSelectionService, _sheetSkeletonManagerService: SheetSkeletonManagerService);
|
|
62
|
+
constructor(_logService: ILogService, _currentUniverService: IUniverInstanceService, _selectionManagerService: SelectionManagerService, _clipboardInterfaceService: IClipboardInterfaceService, _undoRedoService: IUndoRedoService, _commandService: ICommandService, _markSelectionService: IMarkSelectionService, _sheetSkeletonManagerService: SheetSkeletonManagerService, _notificationService: INotificationService, _platformService: IPlatformService, _localeService: LocaleService);
|
|
60
63
|
copyContentCache(): CopyContentCache;
|
|
61
64
|
copy(copyType?: COPY_TYPE): Promise<boolean>;
|
|
62
65
|
cut(): Promise<boolean>;
|
|
@@ -39,11 +39,13 @@ export declare class HtmlToUSMService {
|
|
|
39
39
|
private styleCache;
|
|
40
40
|
private styleRules;
|
|
41
41
|
private afterProcessRules;
|
|
42
|
+
private htmlElement;
|
|
42
43
|
private getCurrentSkeleton;
|
|
43
44
|
constructor(props: IHtmlToUSMServiceProps);
|
|
44
45
|
convert(html: string): IUniverSheetCopyDataModel;
|
|
45
46
|
private _parseTable;
|
|
46
47
|
private _generateDocumentDataModelSnapshot;
|
|
47
48
|
private process;
|
|
49
|
+
dispose(): void;
|
|
48
50
|
}
|
|
49
51
|
export {};
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import type { IRange } from '@univerjs/core';
|
|
16
|
+
import type { ICellData, IMutationInfo, IObjectMatrixPrimitiveType, IRange, Nullable } from '@univerjs/core';
|
|
17
|
+
import type { ISetRangeValuesMutationParams } from '@univerjs/sheets';
|
|
17
18
|
/**
|
|
18
19
|
*
|
|
19
20
|
*
|
|
@@ -26,3 +27,7 @@ export declare const getRepeatRange: (sourceRange: IRange, targetRang: IRange, i
|
|
|
26
27
|
startRange: IRange;
|
|
27
28
|
repeatRelativeRange: IRange;
|
|
28
29
|
}[];
|
|
30
|
+
export declare function clipboardItemIsFromExcel(html: string): Promise<boolean>;
|
|
31
|
+
export declare function mergeCellValues(...cellValues: IObjectMatrixPrimitiveType<Nullable<ICellData>>[]): IObjectMatrixPrimitiveType<Nullable<ICellData>> | IObjectMatrixPrimitiveType<IObjectMatrixPrimitiveType<Nullable<ICellData>>>;
|
|
32
|
+
export declare function getRangeValuesMergeable(m1: IMutationInfo<ISetRangeValuesMutationParams>, m2: IMutationInfo<ISetRangeValuesMutationParams>): boolean;
|
|
33
|
+
export declare function mergeSetRangeValues(mutations: IMutationInfo[]): IMutationInfo<object>[];
|
|
@@ -30,13 +30,14 @@ export type IScrollInfo = Map<string, Map<string, IScrollManagerParam>>;
|
|
|
30
30
|
/**
|
|
31
31
|
* This service manages and sets the virtual scrolling of the canvas content area.
|
|
32
32
|
* It triggers service changes through SetScrollOperation.
|
|
33
|
+
*
|
|
33
34
|
* ScrollController subscribes to the changes in service data to refresh the view scrolling.
|
|
34
35
|
*/
|
|
35
36
|
export declare class ScrollManagerService {
|
|
36
37
|
private readonly _scrollInfo;
|
|
37
|
-
private _currentScroll;
|
|
38
38
|
private readonly _scrollInfo$;
|
|
39
39
|
readonly scrollInfo$: import("rxjs").Observable<Nullable<IScrollManagerParam>>;
|
|
40
|
+
private _currentScroll;
|
|
40
41
|
dispose(): void;
|
|
41
42
|
setCurrentScroll(param: IScrollManagerSearchParam): void;
|
|
42
43
|
getScrollByParam(param: IScrollManagerSearchParam): Readonly<Nullable<IScrollManagerParam>>;
|
|
@@ -61,6 +61,8 @@ export interface ISelectionRenderService {
|
|
|
61
61
|
eventTrigger(evt: IPointerEvent | IMouseEvent, zIndex: number, rangeType: RANGE_TYPE, viewport?: Viewport, scrollTimerType?: ScrollTimerType): void;
|
|
62
62
|
reset(): void;
|
|
63
63
|
refreshSelectionMoveStart(): void;
|
|
64
|
+
enableSingleSelection(): void;
|
|
65
|
+
disableSingleSelection(): void;
|
|
64
66
|
}
|
|
65
67
|
/**
|
|
66
68
|
* TODO 注册 selection 拦截,可能在有公式 ArrayObject 时,fx 公式栏显示不同
|
|
@@ -100,6 +102,7 @@ export declare class SelectionRenderService implements ISelectionRenderService {
|
|
|
100
102
|
private _isShowPreviousEnable;
|
|
101
103
|
private _isRemainLastEnable;
|
|
102
104
|
private _isSkipRemainLastEnable;
|
|
105
|
+
private _isSingleSelection;
|
|
103
106
|
private readonly _selectionMoveEnd$;
|
|
104
107
|
readonly selectionMoveEnd$: Observable<ISelectionWithCoordAndStyle[]>;
|
|
105
108
|
private readonly _selectionMoving$;
|
|
@@ -128,12 +131,13 @@ export declare class SelectionRenderService implements ISelectionRenderService {
|
|
|
128
131
|
disableRemainLast(): void;
|
|
129
132
|
enableSkipRemainLast(): void;
|
|
130
133
|
disableSkipRemainLast(): void;
|
|
134
|
+
enableSingleSelection(): void;
|
|
135
|
+
disableSingleSelection(): void;
|
|
131
136
|
getViewPort(): Viewport;
|
|
132
137
|
/**
|
|
133
138
|
* add a selection
|
|
134
139
|
* @param selectionRange
|
|
135
140
|
* @param curCellRange
|
|
136
|
-
* @returns
|
|
137
141
|
*/
|
|
138
142
|
addControlToCurrentByRangeData(data: ISelectionWithCoordAndStyle): void;
|
|
139
143
|
/**
|
|
@@ -185,9 +189,6 @@ export declare class SelectionRenderService implements ISelectionRenderService {
|
|
|
185
189
|
convertCellRangeToInfo(primary: Nullable<ISelectionCell>): Nullable<ISelectionCellWithCoord>;
|
|
186
190
|
/**
|
|
187
191
|
* When mousedown and mouseup need to go to the coordination and undo stack, when mousemove does not need to go to the coordination and undo stack
|
|
188
|
-
* @param moveEvt
|
|
189
|
-
* @param selectionControl
|
|
190
|
-
* @returns
|
|
191
192
|
*/
|
|
192
193
|
private _moving;
|
|
193
194
|
private _endSelection;
|
|
@@ -17,6 +17,7 @@ import type { Nullable } from '@univerjs/core';
|
|
|
17
17
|
import { IUniverInstanceService, LocaleService } from '@univerjs/core';
|
|
18
18
|
import { SpreadsheetSkeleton } from '@univerjs/engine-render';
|
|
19
19
|
import type { IDisposable } from '@wendellhu/redi';
|
|
20
|
+
import { Injector } from '@wendellhu/redi';
|
|
20
21
|
export interface ISheetSkeletonManagerParam {
|
|
21
22
|
unitId: string;
|
|
22
23
|
sheetId: string;
|
|
@@ -38,6 +39,7 @@ export interface ISheetSkeletonManagerSearch {
|
|
|
38
39
|
*/
|
|
39
40
|
export declare class SheetSkeletonManagerService implements IDisposable {
|
|
40
41
|
private readonly _currentUniverService;
|
|
42
|
+
private readonly _injector;
|
|
41
43
|
private readonly _localeService;
|
|
42
44
|
private _currentSkeleton;
|
|
43
45
|
private _sheetSkeletonParam;
|
|
@@ -48,7 +50,7 @@ export declare class SheetSkeletonManagerService implements IDisposable {
|
|
|
48
50
|
*/
|
|
49
51
|
private readonly _currentSkeletonBefore$;
|
|
50
52
|
readonly currentSkeletonBefore$: import("rxjs").Observable<Nullable<ISheetSkeletonManagerParam>>;
|
|
51
|
-
constructor(_currentUniverService: IUniverInstanceService, _localeService: LocaleService);
|
|
53
|
+
constructor(_currentUniverService: IUniverInstanceService, _injector: Injector, _localeService: LocaleService);
|
|
52
54
|
dispose(): void;
|
|
53
55
|
getCurrent(): Nullable<ISheetSkeletonManagerParam>;
|
|
54
56
|
setCurrent(searchParam: ISheetSkeletonManagerSearch): Nullable<ISheetSkeletonManagerParam>;
|
|
@@ -14,12 +14,6 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import React from 'react';
|
|
17
|
-
import type { IUniverSheetsUIConfig } from '../../basics';
|
|
18
|
-
export interface IBaseSheetContainerProps {
|
|
19
|
-
config: IUniverSheetsUIConfig;
|
|
20
|
-
changeLocale: (locale: string) => void;
|
|
21
|
-
methods?: any;
|
|
22
|
-
}
|
|
23
17
|
export declare function RenderSheetFooter(): React.JSX.Element;
|
|
24
18
|
export declare function RenderSheetHeader(): React.JSX.Element;
|
|
25
19
|
export declare function RenderSheetContent(): React.JSX.Element;
|