@univerjs/sheets-ui 0.1.0-beta.1 → 0.1.0-beta.2
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/index.js +13 -10
- package/lib/es/index.js +9334 -7759
- package/lib/index.css +1 -1
- package/lib/types/commands/commands/auto-fill.command.d.ts +1 -11
- package/lib/types/commands/commands/set-scroll.command.d.ts +1 -1
- package/lib/types/commands/operations/activate-cell-edit.operation.d.ts +2 -2
- package/lib/types/common/keys.d.ts +1 -0
- package/lib/types/components/font-size/interface.d.ts +2 -0
- package/lib/types/components/menu-item-input/interface.d.ts +2 -0
- package/lib/types/controllers/auto-fill.controller.d.ts +13 -9
- package/lib/types/controllers/clipboard/clipboard.controller.d.ts +5 -1
- package/lib/types/controllers/clipboard/utils.d.ts +16 -14
- package/lib/types/controllers/editor/__tests__/create-test-bed.d.ts +25 -0
- package/lib/types/{commands/commands/set-selection-frozen.command.d.ts → controllers/editor/__tests__/end-edit.controller.spec.d.ts} +1 -2
- package/lib/types/controllers/editor/end-edit.controller.d.ts +3 -0
- package/lib/types/controllers/editor/formula-editor.controller.d.ts +1 -0
- package/lib/types/controllers/editor-bridge.controller.d.ts +2 -5
- package/lib/types/controllers/format-painter/format-painter.controller.d.ts +3 -3
- package/lib/types/controllers/freeze.controller.d.ts +11 -3
- package/lib/types/controllers/header-move.controller.d.ts +1 -1
- package/lib/types/controllers/menu/menu.d.ts +2 -2
- package/lib/types/controllers/scroll.controller.d.ts +2 -2
- package/lib/types/controllers/selection.controller.d.ts +4 -1
- package/lib/types/controllers/status-bar.controller.d.ts +5 -3
- package/lib/types/index.d.ts +1 -1
- package/lib/types/services/auto-fill/auto-fill.service.d.ts +33 -29
- package/lib/types/services/auto-fill/tools.d.ts +10 -2
- package/lib/types/services/auto-fill/type.d.ts +23 -9
- package/lib/types/services/clipboard/__tests__/clipboard-test-bed.d.ts +1 -0
- package/lib/types/services/clipboard/type.d.ts +16 -14
- package/lib/types/services/editor/formula-editor-manager.service.d.ts +4 -0
- package/lib/types/services/editor-bridge.service.d.ts +52 -13
- package/lib/types/services/mark-selection/mark-selection.service.d.ts +14 -2
- package/lib/types/services/selection/__test__/create-service-test-bed.d.ts +25 -0
- package/lib/types/services/selection/__test__/selection-render.test.d.ts +16 -0
- package/lib/types/services/selection/selection-render.service.d.ts +19 -3
- package/lib/types/services/selection/selection-shape-extension.d.ts +7 -2
- package/lib/types/services/selection/selection-shape.d.ts +1 -2
- package/lib/types/services/status-bar.service.d.ts +7 -4
- package/lib/types/views/header-menu-shape.d.ts +2 -2
- package/lib/types/views/header-resize-shape.d.ts +2 -2
- package/lib/types/views/header-unhide-shape.d.ts +2 -2
- package/lib/types/views/status-bar/CopyableStatisticItem.d.ts +2 -1
- package/lib/umd/index.js +13 -10
- package/package.json +22 -21
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-ui-plugin-sheets-font-family{overflow:hidden;width:120px;font-size:var(--font-size-xs);text-overflow:ellipsis;white-space:nowrap}.univer-ui-plugin-sheets-font-family-item{font-size:var(--font-size-xs)}.univer-ui-plugin-sheets-font-size{width:28px;height:24px;font-size:var(--font-size-xs)}.univer-ui-plugin-sheets-font-size-input{height:24px;line-height:24px;background-color:transparent;border:none}.univer-ui-plugin-sheets-font-size-input input{font-size:var(--font-size-xs);background-color:transparent}.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%;padding:6px 0}.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{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{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{-webkit-user-select:none;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;-webkit-user-select:none;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);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-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:start;max-width:96px;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: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-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-ui-plugin-sheets-font-family{overflow:hidden;width:120px;font-size:var(--font-size-xs);text-overflow:ellipsis;white-space:nowrap}.univer-ui-plugin-sheets-font-family-item{font-size:var(--font-size-xs)}.univer-ui-plugin-sheets-font-size{width:28px;height:24px;font-size:var(--font-size-xs)}.univer-ui-plugin-sheets-font-size-input{height:24px;line-height:24px;background-color:transparent;border:none}.univer-ui-plugin-sheets-font-size-input input{font-size:var(--font-size-xs);background-color:transparent}.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%;padding:6px 0}.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{-webkit-user-select:none;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;-webkit-user-select:none;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-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: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: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,18 +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 {
|
|
16
|
+
import type { ICommand, IRange } from '@univerjs/core';
|
|
17
17
|
export interface IAutoFillCommandParams {
|
|
18
|
-
subUnitId?: string;
|
|
19
|
-
unitId?: string;
|
|
20
|
-
applyRange: IRange;
|
|
21
|
-
selectionRange: IRange;
|
|
22
|
-
applyDatas: ICellData[][];
|
|
23
|
-
extendMutations: {
|
|
24
|
-
undo: IMutationInfo[];
|
|
25
|
-
redo: IMutationInfo[];
|
|
26
|
-
};
|
|
27
|
-
applyMergeRanges?: IRange[];
|
|
28
18
|
}
|
|
29
19
|
export declare const AutoFillCommand: ICommand;
|
|
30
20
|
export interface IAutoClearContentCommand {
|
|
@@ -33,6 +33,6 @@ export declare const SetScrollRelativeCommand: ICommand<ISetScrollRelativeComman
|
|
|
33
33
|
*/
|
|
34
34
|
export declare const ScrollCommand: ICommand<IScrollCommandParams>;
|
|
35
35
|
/**
|
|
36
|
-
* This command is reset the scroll position of the current view to 0
|
|
36
|
+
* This command is reset the scroll position of the current view to 0, 0
|
|
37
37
|
*/
|
|
38
38
|
export declare const RestScrollCommand: ICommand<{}>;
|
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import type { IOperation } from '@univerjs/core';
|
|
17
|
-
import type {
|
|
18
|
-
export declare const SetActivateCellEditOperation: IOperation<
|
|
17
|
+
import type { ICurrentEditCellParam } from '../../services/editor-bridge.service';
|
|
18
|
+
export declare const SetActivateCellEditOperation: IOperation<ICurrentEditCellParam>;
|
|
@@ -32,5 +32,6 @@ export declare enum VIEWPORT_KEY {
|
|
|
32
32
|
}
|
|
33
33
|
export declare const SHEET_COMPONENT_MAIN_LAYER_INDEX = 0;
|
|
34
34
|
export declare const SHEET_COMPONENT_HEADER_LAYER_INDEX = 2;
|
|
35
|
+
export declare const SHEET_COMPONENT_SELECTION_LAYER_INDEX = 3;
|
|
35
36
|
export declare const SHEET_ZOOM_RANGE: number[];
|
|
36
37
|
export declare const SHEET_COMPONENT_UNHIDE_LAYER_INDEX = 1001;
|
|
@@ -14,10 +14,12 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import type { ICustomComponentProps } from '@univerjs/ui';
|
|
17
|
+
import type { Observable } from 'rxjs';
|
|
17
18
|
export declare const FONT_SIZE_COMPONENT = "UI_PLUGIN_SHEETS_FONT_SIZE_COMPONENT";
|
|
18
19
|
export interface IFontSizeProps extends ICustomComponentProps<string> {
|
|
19
20
|
value: string;
|
|
20
21
|
min: number;
|
|
21
22
|
max: number;
|
|
22
23
|
onChange: (value: string) => void;
|
|
24
|
+
disabled$?: Observable<boolean>;
|
|
23
25
|
}
|
|
@@ -13,8 +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, IUniverInstanceService } from '@univerjs/core';
|
|
17
|
-
import { SelectionManagerService } from '@univerjs/sheets';
|
|
16
|
+
import { Disposable, ICommandService, IUndoRedoService, IUniverInstanceService } from '@univerjs/core';
|
|
17
|
+
import { SelectionManagerService, SheetInterceptorService } from '@univerjs/sheets';
|
|
18
|
+
import { Injector } from '@wendellhu/redi';
|
|
18
19
|
import { IAutoFillService } from '../services/auto-fill/auto-fill.service';
|
|
19
20
|
import { IEditorBridgeService } from '../services/editor-bridge.service';
|
|
20
21
|
import { ISelectionRenderService } from '../services/selection/selection-render.service';
|
|
@@ -22,21 +23,24 @@ export declare class AutoFillController extends Disposable {
|
|
|
22
23
|
private readonly _univerInstanceService;
|
|
23
24
|
private readonly _selectionRenderService;
|
|
24
25
|
private readonly _commandService;
|
|
26
|
+
private readonly _undoRedoService;
|
|
25
27
|
private readonly _autoFillService;
|
|
26
28
|
private readonly _editorBridgeService;
|
|
29
|
+
private readonly _sheetInterceptorService;
|
|
27
30
|
private readonly _selectionManagerService;
|
|
28
|
-
private
|
|
31
|
+
private readonly _injector;
|
|
29
32
|
private _beforeApplyData;
|
|
30
|
-
private _applyType;
|
|
31
|
-
private _hasFillingStyle;
|
|
32
33
|
private _copyData;
|
|
33
|
-
|
|
34
|
+
private _defaultHook;
|
|
35
|
+
constructor(_univerInstanceService: IUniverInstanceService, _selectionRenderService: ISelectionRenderService, _commandService: ICommandService, _undoRedoService: IUndoRedoService, _autoFillService: IAutoFillService, _editorBridgeService: IEditorBridgeService, _sheetInterceptorService: SheetInterceptorService, _selectionManagerService: SelectionManagerService, _injector: Injector);
|
|
34
36
|
private _init;
|
|
35
|
-
private
|
|
36
|
-
private _detectFillRange;
|
|
37
|
-
private _handleFill;
|
|
37
|
+
private _initDefaultHook;
|
|
38
38
|
private _onSelectionControlFillChanged;
|
|
39
39
|
private _onApplyTypeChanged;
|
|
40
|
+
private _triggerAutoFill;
|
|
41
|
+
private _handleDbClickFill;
|
|
42
|
+
private _detectFillRange;
|
|
43
|
+
private _handleFillData;
|
|
40
44
|
private _getApplyData;
|
|
41
45
|
private _applyFunctions;
|
|
42
46
|
private _getCopyData;
|
|
@@ -17,6 +17,7 @@ import { Disposable, ICommandService, IConfigService, IUniverInstanceService, Lo
|
|
|
17
17
|
import { IMessageService } from '@univerjs/ui';
|
|
18
18
|
import { Injector } from '@wendellhu/redi';
|
|
19
19
|
import { ISheetClipboardService } from '../../services/clipboard/clipboard.service';
|
|
20
|
+
import { SheetSkeletonManagerService } from '../../services/sheet-skeleton-manager.service';
|
|
20
21
|
/**
|
|
21
22
|
* This controller add basic clipboard logic for basic features such as text color / BISU / row widths to the clipboard
|
|
22
23
|
* service. You can create a similar clipboard controller to add logic for your own features.
|
|
@@ -27,12 +28,15 @@ export declare class SheetClipboardController extends Disposable {
|
|
|
27
28
|
private readonly _configService;
|
|
28
29
|
private readonly _sheetClipboardService;
|
|
29
30
|
private readonly _messageService;
|
|
31
|
+
private readonly _sheetSkeletonManagerService;
|
|
30
32
|
private readonly _injector;
|
|
31
33
|
private readonly _localService;
|
|
32
|
-
constructor(_currentUniverSheet: IUniverInstanceService, _commandService: ICommandService, _configService: IConfigService, _sheetClipboardService: ISheetClipboardService, _messageService: IMessageService, _injector: Injector, _localService: LocaleService);
|
|
34
|
+
constructor(_currentUniverSheet: IUniverInstanceService, _commandService: ICommandService, _configService: IConfigService, _sheetClipboardService: ISheetClipboardService, _messageService: IMessageService, _sheetSkeletonManagerService: SheetSkeletonManagerService, _injector: Injector, _localService: LocaleService);
|
|
33
35
|
private _init;
|
|
34
36
|
private _initCopyingHooks;
|
|
35
37
|
private _initPastingHook;
|
|
38
|
+
private _generateDocumentDataModelSnapshot;
|
|
39
|
+
private _onPastePlainText;
|
|
36
40
|
private _onPasteCells;
|
|
37
41
|
private _initSpecialPasteHooks;
|
|
38
42
|
private _getWorksheet;
|
|
@@ -13,38 +13,40 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import type { IMutationInfo, IRange } from '@univerjs/core';
|
|
16
|
+
import type { IDocumentBody, IMutationInfo, IRange } from '@univerjs/core';
|
|
17
17
|
import { ObjectMatrix } from '@univerjs/core';
|
|
18
18
|
import type { IAccessor } from '@wendellhu/redi';
|
|
19
|
-
import type { ICellDataWithSpanInfo } from '../../services/clipboard/type';
|
|
20
|
-
|
|
21
|
-
export declare function getDefaultOnPasteCellMutations(pastedRange: IRange, matrix: ObjectMatrix<ICellDataWithSpanInfo>, unitId: string, subUnitId: string, copyInfo: {
|
|
22
|
-
copyType: COPY_TYPE;
|
|
23
|
-
copyRange?: IRange;
|
|
24
|
-
}, accessor: IAccessor): {
|
|
19
|
+
import type { ICellDataWithSpanInfo, ICopyPastePayload, ISheetRangeLocation } from '../../services/clipboard/type';
|
|
20
|
+
export declare function getDefaultOnPasteCellMutations(pasteFrom: ISheetRangeLocation, pasteTo: ISheetRangeLocation, data: ObjectMatrix<ICellDataWithSpanInfo>, payload: ICopyPastePayload, accessor: IAccessor): {
|
|
25
21
|
undos: IMutationInfo<object>[];
|
|
26
22
|
redos: IMutationInfo<object>[];
|
|
27
23
|
};
|
|
28
|
-
export declare function getMoveRangeMutations(
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
export declare function getMoveRangeMutations(from: {
|
|
25
|
+
unitId: string;
|
|
26
|
+
subUnitId: string;
|
|
27
|
+
range?: IRange;
|
|
28
|
+
}, to: {
|
|
29
|
+
unitId: string;
|
|
30
|
+
subUnitId: string;
|
|
31
|
+
range?: IRange;
|
|
31
32
|
}, accessor: IAccessor): {
|
|
32
33
|
undos: IMutationInfo<object>[];
|
|
33
34
|
redos: IMutationInfo<object>[];
|
|
34
35
|
};
|
|
35
|
-
export declare function getSetCellValueMutations(
|
|
36
|
+
export declare function getSetCellValueMutations(pasteTo: ISheetRangeLocation, matrix: ObjectMatrix<ICellDataWithSpanInfo>, accessor: IAccessor): {
|
|
36
37
|
undos: IMutationInfo<object>[];
|
|
37
38
|
redos: IMutationInfo<object>[];
|
|
38
39
|
};
|
|
39
|
-
export declare function getSetCellStyleMutations(
|
|
40
|
+
export declare function getSetCellStyleMutations(pasteTo: ISheetRangeLocation, matrix: ObjectMatrix<ICellDataWithSpanInfo>, accessor: IAccessor): {
|
|
40
41
|
undos: IMutationInfo<object>[];
|
|
41
42
|
redos: IMutationInfo<object>[];
|
|
42
43
|
};
|
|
43
|
-
export declare function getClearCellStyleMutations(
|
|
44
|
+
export declare function getClearCellStyleMutations(pasteTo: ISheetRangeLocation, matrix: ObjectMatrix<ICellDataWithSpanInfo>, accessor: IAccessor): {
|
|
44
45
|
undos: IMutationInfo<object>[];
|
|
45
46
|
redos: IMutationInfo<object>[];
|
|
46
47
|
};
|
|
47
|
-
export declare function getClearAndSetMergeMutations(
|
|
48
|
+
export declare function getClearAndSetMergeMutations(pasteTo: ISheetRangeLocation, matrix: ObjectMatrix<ICellDataWithSpanInfo>, accessor: IAccessor): {
|
|
48
49
|
undos: IMutationInfo<object>[];
|
|
49
50
|
redos: IMutationInfo<object>[];
|
|
50
51
|
};
|
|
52
|
+
export declare function generateBody(text: string): IDocumentBody;
|
|
@@ -0,0 +1,25 @@
|
|
|
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 type { IWorkbookData, Workbook } from '@univerjs/core';
|
|
17
|
+
import { Univer } from '@univerjs/core';
|
|
18
|
+
import type { Dependency } from '@wendellhu/redi';
|
|
19
|
+
import { Injector } from '@wendellhu/redi';
|
|
20
|
+
export interface ITestBed {
|
|
21
|
+
univer: Univer;
|
|
22
|
+
get: Injector['get'];
|
|
23
|
+
sheet: Workbook;
|
|
24
|
+
}
|
|
25
|
+
export declare function createTestBed(workbookConfig?: IWorkbookData, dependencies?: Dependency[]): ITestBed;
|
|
@@ -13,8 +13,10 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import type { ICellData } from '@univerjs/core';
|
|
16
17
|
import { Disposable, ICommandService, IContextService, IUndoRedoService, IUniverInstanceService } from '@univerjs/core';
|
|
17
18
|
import { LexerTreeBuilder } from '@univerjs/engine-formula';
|
|
19
|
+
import type { IDocumentLayoutObject } from '@univerjs/engine-render';
|
|
18
20
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
19
21
|
import { SelectionManagerService, SheetInterceptorService } from '@univerjs/sheets';
|
|
20
22
|
import { ICellEditorManagerService } from '../../services/editor/cell-editor-manager.service';
|
|
@@ -48,3 +50,4 @@ export declare class EndEditController extends Disposable {
|
|
|
48
50
|
private _moveInEditor;
|
|
49
51
|
private _getEditorObject;
|
|
50
52
|
}
|
|
53
|
+
export declare function getCellDataByInput(cellData: ICellData, documentLayoutObject: IDocumentLayoutObject, lexerTreeBuilder: LexerTreeBuilder): ICellData | null;
|
|
@@ -33,6 +33,7 @@ export declare class FormulaEditorController extends RxDisposable {
|
|
|
33
33
|
constructor(_univerInstanceService: IUniverInstanceService, _renderManagerService: IRenderManagerService, _editorBridgeService: IEditorBridgeService, _docSkeletonManagerService: DocSkeletonManagerService, _docViewModelManagerService: DocViewModelManagerService, _commandService: ICommandService, _contextService: IContextService, _formulaEditorManagerService: IFormulaEditorManagerService, _undoRedoService: IUndoRedoService, _textSelectionManagerService: TextSelectionManagerService);
|
|
34
34
|
private _initialize;
|
|
35
35
|
private _listenFxBtnClick;
|
|
36
|
+
private _listenFoldBtnClick;
|
|
36
37
|
private _initialMain;
|
|
37
38
|
private _syncEditorSize;
|
|
38
39
|
private _syncFormulaEditorContent;
|
|
@@ -13,11 +13,10 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { ICommandService, IUniverInstanceService, RxDisposable
|
|
16
|
+
import { ICommandService, IUniverInstanceService, RxDisposable } from '@univerjs/core';
|
|
17
17
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
18
18
|
import { SelectionManagerService } from '@univerjs/sheets';
|
|
19
19
|
import { IEditorBridgeService } from '../services/editor-bridge.service';
|
|
20
|
-
import { ISelectionRenderService } from '../services/selection/selection-render.service';
|
|
21
20
|
import { SheetSkeletonManagerService } from '../services/sheet-skeleton-manager.service';
|
|
22
21
|
export declare class EditorBridgeController extends RxDisposable {
|
|
23
22
|
private readonly _sheetSkeletonManagerService;
|
|
@@ -26,9 +25,7 @@ export declare class EditorBridgeController extends RxDisposable {
|
|
|
26
25
|
private readonly _renderManagerService;
|
|
27
26
|
private readonly _editorBridgeService;
|
|
28
27
|
private readonly _selectionManagerService;
|
|
29
|
-
|
|
30
|
-
private readonly _themeService;
|
|
31
|
-
constructor(_sheetSkeletonManagerService: SheetSkeletonManagerService, _currentUniverService: IUniverInstanceService, _commandService: ICommandService, _renderManagerService: IRenderManagerService, _editorBridgeService: IEditorBridgeService, _selectionManagerService: SelectionManagerService, _selectionRenderService: ISelectionRenderService, _themeService: ThemeService);
|
|
28
|
+
constructor(_sheetSkeletonManagerService: SheetSkeletonManagerService, _currentUniverService: IUniverInstanceService, _commandService: ICommandService, _renderManagerService: IRenderManagerService, _editorBridgeService: IEditorBridgeService, _selectionManagerService: SelectionManagerService);
|
|
32
29
|
dispose(): void;
|
|
33
30
|
private _initialize;
|
|
34
31
|
private _initSelectionChangeListener;
|
|
@@ -15,15 +15,15 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
|
|
17
17
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
18
|
-
import { SelectionManagerService } from '@univerjs/sheets';
|
|
19
18
|
import { IFormatPainterService } from '../../services/format-painter/format-painter.service';
|
|
19
|
+
import { ISelectionRenderService } from '../../services/selection/selection-render.service';
|
|
20
20
|
export declare class FormatPainterController extends Disposable {
|
|
21
21
|
private readonly _commandService;
|
|
22
22
|
private readonly _formatPainterService;
|
|
23
23
|
private readonly _currentUniverService;
|
|
24
24
|
private readonly _renderManagerService;
|
|
25
|
-
private readonly
|
|
26
|
-
constructor(_commandService: ICommandService, _formatPainterService: IFormatPainterService, _currentUniverService: IUniverInstanceService, _renderManagerService: IRenderManagerService,
|
|
25
|
+
private readonly _selectionRenderService;
|
|
26
|
+
constructor(_commandService: ICommandService, _formatPainterService: IFormatPainterService, _currentUniverService: IUniverInstanceService, _renderManagerService: IRenderManagerService, _selectionRenderService: ISelectionRenderService);
|
|
27
27
|
private _initialize;
|
|
28
28
|
private _bindFormatPainterStatus;
|
|
29
29
|
private _commandExecutedListener;
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { Disposable, ICommandService, IUniverInstanceService, ThemeService } from '@univerjs/core';
|
|
17
17
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
18
|
-
import { SelectionManagerService } from '@univerjs/sheets';
|
|
18
|
+
import { SelectionManagerService, SheetInterceptorService } from '@univerjs/sheets';
|
|
19
|
+
import { Injector } from '@wendellhu/redi';
|
|
19
20
|
import { ScrollManagerService } from '../services/scroll-manager.service';
|
|
20
21
|
import { ISelectionRenderService } from '../services/selection/selection-render.service';
|
|
21
22
|
import { SheetSkeletonManagerService } from '../services/sheet-skeleton-manager.service';
|
|
@@ -28,6 +29,8 @@ export declare class FreezeController extends Disposable {
|
|
|
28
29
|
private readonly _selectionManagerService;
|
|
29
30
|
private readonly _scrollManagerService;
|
|
30
31
|
private readonly _themeService;
|
|
32
|
+
private _sheetInterceptorService;
|
|
33
|
+
private _injector;
|
|
31
34
|
private _rowFreezeHeaderRect;
|
|
32
35
|
private _rowFreezeMainRect;
|
|
33
36
|
private _columnFreezeHeaderRect;
|
|
@@ -37,22 +40,26 @@ export declare class FreezeController extends Disposable {
|
|
|
37
40
|
private _freezeLeaveObservers;
|
|
38
41
|
private _moveObserver;
|
|
39
42
|
private _upObserver;
|
|
40
|
-
private _viewportObservers;
|
|
41
43
|
private _changeToRow;
|
|
42
44
|
private _changeToColumn;
|
|
43
45
|
private _changeToOffsetX;
|
|
44
46
|
private _changeToOffsetY;
|
|
47
|
+
private _activeViewport;
|
|
45
48
|
private _freezeNormalHeaderColor;
|
|
46
49
|
private _freezeNormalMainColor;
|
|
47
50
|
private _freezeActiveColor;
|
|
48
51
|
private _freezeHoverColor;
|
|
49
|
-
|
|
52
|
+
private _lastFreeze;
|
|
53
|
+
constructor(_sheetSkeletonManagerService: SheetSkeletonManagerService, _currentUniverService: IUniverInstanceService, _commandService: ICommandService, _renderManagerService: IRenderManagerService, _selectionRenderService: ISelectionRenderService, _selectionManagerService: SelectionManagerService, _scrollManagerService: ScrollManagerService, _themeService: ThemeService, _sheetInterceptorService: SheetInterceptorService, _injector: Injector);
|
|
50
54
|
dispose(): void;
|
|
51
55
|
private _initialize;
|
|
52
56
|
private _createFreeze;
|
|
53
57
|
private _eventBinding;
|
|
54
58
|
private _getCurrentLastVisibleRow;
|
|
59
|
+
private _getActiveViewport;
|
|
55
60
|
private _freezeDown;
|
|
61
|
+
private _getViewports;
|
|
62
|
+
private _bindViewportScroll;
|
|
56
63
|
private _updateViewport;
|
|
57
64
|
/**
|
|
58
65
|
* When switching sheet tabs, it is necessary to update the frozen state of the current view.
|
|
@@ -61,6 +68,7 @@ export declare class FreezeController extends Disposable {
|
|
|
61
68
|
private _refreshCurrent;
|
|
62
69
|
private _themeChangeListener;
|
|
63
70
|
private _themeChange;
|
|
71
|
+
private _interceptorCommands;
|
|
64
72
|
private _commandExecutedListener;
|
|
65
73
|
private _clearObserverEvent;
|
|
66
74
|
private _clearFreeze;
|
|
@@ -44,7 +44,7 @@ export declare class HeaderMoveController extends Disposable {
|
|
|
44
44
|
constructor(_sheetSkeletonManagerService: SheetSkeletonManagerService, _currentUniverService: IUniverInstanceService, _renderManagerService: IRenderManagerService, _commandService: ICommandService, _selectionRenderService: ISelectionRenderService, _selectionManagerService: SelectionManagerService);
|
|
45
45
|
private _initialize;
|
|
46
46
|
private _initialRowOrColumn;
|
|
47
|
-
private
|
|
47
|
+
private _rowColumnMoving;
|
|
48
48
|
private _checkInHeaderRange;
|
|
49
49
|
private _clearObserverEvent;
|
|
50
50
|
private _newBackgroundAndLine;
|
|
@@ -36,9 +36,9 @@ export declare const FONT_FAMILY_CHILDREN: {
|
|
|
36
36
|
}[];
|
|
37
37
|
export declare function FontFamilySelectorMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<string>;
|
|
38
38
|
export declare function FontSizeSelectorMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<number>;
|
|
39
|
-
export declare function ResetTextColorMenuItemFactory(): IMenuButtonItem;
|
|
39
|
+
export declare function ResetTextColorMenuItemFactory(accessor: IAccessor): IMenuButtonItem;
|
|
40
40
|
export declare function TextColorSelectorMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<string>;
|
|
41
|
-
export declare function ResetBackgroundColorMenuItemFactory(): IMenuButtonItem;
|
|
41
|
+
export declare function ResetBackgroundColorMenuItemFactory(accessor: IAccessor): IMenuButtonItem;
|
|
42
42
|
export declare function BackgroundColorSelectorMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<string>;
|
|
43
43
|
export declare const HORIZONTAL_ALIGN_CHILDREN: {
|
|
44
44
|
label: string;
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import type { Direction } from '@univerjs/core';
|
|
17
16
|
import { Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
|
|
18
17
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
19
18
|
import { SelectionManagerService } from '@univerjs/sheets';
|
|
@@ -27,10 +26,11 @@ export declare class ScrollController extends Disposable {
|
|
|
27
26
|
private readonly _selectionManagerService;
|
|
28
27
|
private readonly _scrollManagerService;
|
|
29
28
|
constructor(_sheetSkeletonManagerService: SheetSkeletonManagerService, _currentUniverService: IUniverInstanceService, _commandService: ICommandService, _renderManagerService: IRenderManagerService, _selectionManagerService: SelectionManagerService, _scrollManagerService: ScrollManagerService);
|
|
29
|
+
scrollToVisible(targetIsActualRowAndColumn?: boolean): void;
|
|
30
30
|
dispose(): void;
|
|
31
31
|
private _initialize;
|
|
32
|
+
private _getFreeze;
|
|
32
33
|
private _scrollEventBinding;
|
|
33
|
-
scrollToVisible(direction: Direction): void;
|
|
34
34
|
private _scrollSubscribeBinding;
|
|
35
35
|
private _skeletonListener;
|
|
36
36
|
private _updateSceneSize;
|
|
@@ -18,6 +18,7 @@ import { IRenderManagerService } from '@univerjs/engine-render';
|
|
|
18
18
|
import { SelectionManagerService } from '@univerjs/sheets';
|
|
19
19
|
import { ISelectionRenderService } from '../services/selection/selection-render.service';
|
|
20
20
|
import { SheetSkeletonManagerService } from '../services/sheet-skeleton-manager.service';
|
|
21
|
+
import { ScrollController } from './scroll.controller';
|
|
21
22
|
export declare class SelectionController extends Disposable {
|
|
22
23
|
private readonly _sheetSkeletonManagerService;
|
|
23
24
|
private readonly _currentUniverService;
|
|
@@ -26,8 +27,10 @@ export declare class SelectionController extends Disposable {
|
|
|
26
27
|
private readonly _selectionRenderService;
|
|
27
28
|
private readonly _selectionManagerService;
|
|
28
29
|
private readonly _themeService;
|
|
29
|
-
|
|
30
|
+
private readonly _scrollController;
|
|
31
|
+
constructor(_sheetSkeletonManagerService: SheetSkeletonManagerService, _currentUniverService: IUniverInstanceService, _commandService: ICommandService, _renderManagerService: IRenderManagerService, _selectionRenderService: ISelectionRenderService, _selectionManagerService: SelectionManagerService, _themeService: ThemeService, _scrollController: ScrollController);
|
|
30
32
|
private _initialize;
|
|
33
|
+
private _getActiveViewport;
|
|
31
34
|
private _initViewMainListener;
|
|
32
35
|
private _initThemeChangeListener;
|
|
33
36
|
private _refreshSelection;
|
|
@@ -13,18 +13,20 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { Disposable, IUniverInstanceService } from '@univerjs/core';
|
|
16
|
+
import { Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
|
|
17
17
|
import { FormulaDataModel, IFunctionService } from '@univerjs/engine-formula';
|
|
18
|
-
import { SelectionManagerService } from '@univerjs/sheets';
|
|
18
|
+
import { INumfmtService, SelectionManagerService } from '@univerjs/sheets';
|
|
19
19
|
import { IStatusBarService } from '../services/status-bar.service';
|
|
20
20
|
export declare class StatusBarController extends Disposable {
|
|
21
21
|
private readonly _univerInstanceService;
|
|
22
22
|
private readonly _selectionManagerService;
|
|
23
23
|
private readonly _functionService;
|
|
24
24
|
private readonly _statusBarService;
|
|
25
|
+
private readonly _commandService;
|
|
25
26
|
private readonly _formulaDataModel;
|
|
27
|
+
private _numfmtService;
|
|
26
28
|
private _calculateTimeout;
|
|
27
|
-
constructor(_univerInstanceService: IUniverInstanceService, _selectionManagerService: SelectionManagerService, _functionService: IFunctionService, _statusBarService: IStatusBarService, _formulaDataModel: FormulaDataModel);
|
|
29
|
+
constructor(_univerInstanceService: IUniverInstanceService, _selectionManagerService: SelectionManagerService, _functionService: IFunctionService, _statusBarService: IStatusBarService, _commandService: ICommandService, _formulaDataModel: FormulaDataModel, _numfmtService: INumfmtService);
|
|
28
30
|
private _init;
|
|
29
31
|
private _registerSelectionListener;
|
|
30
32
|
private _calculateSelection;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export { getCoordByCell, getCoordByOffset, getSheetObject, getTransformCoord, }
|
|
|
32
32
|
export { enUS, zhCN } from './locale';
|
|
33
33
|
export { AutoFillService, IAutoFillService } from './services/auto-fill/auto-fill.service';
|
|
34
34
|
export { getAutoFillRepeatRange } from './services/auto-fill/tools';
|
|
35
|
-
export type {
|
|
35
|
+
export type { ICopyDataPiece, ISheetAutoFillHook } from './services/auto-fill/type';
|
|
36
36
|
export { APPLY_TYPE, DATA_TYPE, type IAutoFillRule } from './services/auto-fill/type';
|
|
37
37
|
export { type ICopyDataInTypeIndexInfo } from './services/auto-fill/type';
|
|
38
38
|
export { ISheetClipboardService, PREDEFINED_HOOK_NAME, SheetClipboardService, } from './services/clipboard/clipboard.service';
|
|
@@ -13,31 +13,31 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import type {
|
|
17
|
-
import { Disposable, IUniverInstanceService } from '@univerjs/core';
|
|
16
|
+
import type { Nullable } from '@univerjs/core';
|
|
17
|
+
import { Direction, Disposable, IUniverInstanceService } from '@univerjs/core';
|
|
18
18
|
import { SelectionManagerService, SheetInterceptorService } from '@univerjs/sheets';
|
|
19
19
|
import type { IDisposable } from '@wendellhu/redi';
|
|
20
20
|
import type { Observable } from 'rxjs';
|
|
21
|
-
import type {
|
|
21
|
+
import type { IAutoFillLocation, IAutoFillRule, ISheetAutoFillHook } from './type';
|
|
22
22
|
import { APPLY_TYPE } from './type';
|
|
23
23
|
export interface IAutoFillService {
|
|
24
|
-
getRules(): IAutoFillRule[];
|
|
25
|
-
getApplyType(): APPLY_TYPE;
|
|
26
|
-
isFillingStyle(): boolean;
|
|
27
|
-
setApplyType(type: APPLY_TYPE): void;
|
|
28
|
-
setRanges(sourceRange: IRange, destRange: IRange, applyRange: IRange): void;
|
|
29
|
-
getRanges(): {
|
|
30
|
-
sourceRange: IRange | null;
|
|
31
|
-
destRange: IRange | null;
|
|
32
|
-
applyRange: IRange | null;
|
|
33
|
-
};
|
|
34
|
-
setFillingStyle(isFillingStyle: boolean): void;
|
|
35
24
|
applyType$: Observable<APPLY_TYPE>;
|
|
25
|
+
applyType: APPLY_TYPE;
|
|
26
|
+
direction: Direction;
|
|
36
27
|
menu$: Observable<IApplyMenuItem[]>;
|
|
28
|
+
menu: IApplyMenuItem[];
|
|
29
|
+
showMenu$: Observable<boolean>;
|
|
30
|
+
setShowMenu: (show: boolean) => void;
|
|
37
31
|
setDisableApplyType: (type: APPLY_TYPE, disable: boolean) => void;
|
|
32
|
+
getRules(): IAutoFillRule[];
|
|
33
|
+
isFillingStyle(): boolean;
|
|
34
|
+
autoFillLocation$: Observable<Nullable<IAutoFillLocation>>;
|
|
35
|
+
autoFillLocation: Nullable<IAutoFillLocation>;
|
|
36
|
+
setFillingStyle(isFillingStyle: boolean): void;
|
|
38
37
|
registerRule(rule: IAutoFillRule): void;
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
getAllHooks(): ISheetAutoFillHook[];
|
|
39
|
+
getActiveHooks(): ISheetAutoFillHook[];
|
|
40
|
+
addHook(hook: ISheetAutoFillHook): IDisposable;
|
|
41
41
|
}
|
|
42
42
|
export interface IApplyMenuItem {
|
|
43
43
|
label: string;
|
|
@@ -52,28 +52,32 @@ export declare class AutoFillService extends Disposable implements IAutoFillServ
|
|
|
52
52
|
private _hooks;
|
|
53
53
|
private readonly _applyType$;
|
|
54
54
|
private _isFillingStyle;
|
|
55
|
-
private
|
|
56
|
-
|
|
57
|
-
private
|
|
55
|
+
private readonly _autoFillLocation$;
|
|
56
|
+
readonly autoFillLocation$: Observable<Nullable<IAutoFillLocation>>;
|
|
57
|
+
private readonly _showMenu$;
|
|
58
|
+
readonly showMenu$: Observable<boolean>;
|
|
59
|
+
private _direction;
|
|
58
60
|
readonly applyType$: Observable<APPLY_TYPE>;
|
|
59
61
|
private readonly _menu$;
|
|
60
62
|
readonly menu$: Observable<IApplyMenuItem[]>;
|
|
61
63
|
constructor(_sheetInterceptorService: SheetInterceptorService, _univerInstanceService: IUniverInstanceService, _selectionManagerService: SelectionManagerService);
|
|
62
64
|
private _init;
|
|
63
|
-
|
|
65
|
+
private getOneByPriority;
|
|
66
|
+
addHook(hook: ISheetAutoFillHook): IDisposable;
|
|
64
67
|
registerRule(rule: IAutoFillRule): void;
|
|
65
68
|
getRules(): IAutoFillRule[];
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
+
getAllHooks(): ISheetAutoFillHook[];
|
|
70
|
+
getActiveHooks(): ISheetAutoFillHook[];
|
|
71
|
+
get applyType(): APPLY_TYPE;
|
|
72
|
+
set applyType(type: APPLY_TYPE);
|
|
73
|
+
get menu(): IApplyMenuItem[];
|
|
74
|
+
get direction(): Direction;
|
|
75
|
+
set direction(direction: Direction);
|
|
69
76
|
isFillingStyle(): boolean;
|
|
70
77
|
setFillingStyle(isFillingStyle: boolean): void;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
sourceRange: IRange | null;
|
|
74
|
-
destRange: IRange | null;
|
|
75
|
-
applyRange: IRange | null;
|
|
76
|
-
};
|
|
78
|
+
get autoFillLocation(): Nullable<IAutoFillLocation>;
|
|
79
|
+
set autoFillLocation(location: Nullable<IAutoFillLocation>);
|
|
77
80
|
setDisableApplyType(type: APPLY_TYPE, disable: boolean): void;
|
|
81
|
+
setShowMenu(show: boolean): void;
|
|
78
82
|
}
|
|
79
83
|
export declare const IAutoFillService: import("@wendellhu/redi").IdentifierDecorator<AutoFillService>;
|