@univerjs/sheets-ui 0.1.3 → 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 +4601 -4479
- 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/common/utils.d.ts +7 -0
- package/lib/types/index.d.ts +2 -0
- package/lib/types/services/canvas-pop-manager.service.d.ts +58 -0
- package/lib/types/services/clipboard/html-to-usm/converter.d.ts +1 -0
- package/lib/types/services/clipboard/utils.d.ts +5 -1
- package/lib/types/views/sheet-container/SheetContainer.d.ts +0 -6
- package/lib/umd/index.js +10 -10
- package/package.json +24 -22
- 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/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
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: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))}
|
|
@@ -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
|
+
};
|
package/lib/types/index.d.ts
CHANGED
|
@@ -54,3 +54,5 @@ export { SheetSkeletonManagerService } from './services/sheet-skeleton-manager.s
|
|
|
54
54
|
export { UniverSheetsUIPlugin } from './sheets-ui-plugin';
|
|
55
55
|
export { SheetCanvasView } from './views/sheet-canvas-view';
|
|
56
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 {};
|
|
@@ -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
|
*
|
|
@@ -27,3 +28,6 @@ export declare const getRepeatRange: (sourceRange: IRange, targetRang: IRange, i
|
|
|
27
28
|
repeatRelativeRange: IRange;
|
|
28
29
|
}[];
|
|
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>[];
|
|
@@ -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;
|