@univerjs/sheets-ui 0.5.2 → 0.5.3-experimental.20250106-e3b7a39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +32 -30
- package/lib/es/facade.js +261 -102
- package/lib/es/index.js +9612 -10128
- package/lib/index.css +1 -1
- package/lib/types/commands/commands/set-scroll.command.d.ts +10 -0
- package/lib/types/controllers/permission/sheet-permission-check-ui.controller.d.ts +24 -0
- package/lib/types/controllers/permission/sheet-permission-interceptor-canvas-render.controller.d.ts +0 -1
- package/lib/types/controllers/permission/sheet-permission-interceptor-clipboard.controller.d.ts +3 -4
- package/lib/types/controllers/permission/sheet-permission-interceptor-formula-render.controller.d.ts +0 -1
- package/lib/types/controllers/render-controllers/scroll.render-controller.d.ts +7 -4
- package/lib/types/facade/f-event.d.ts +121 -0
- package/lib/types/facade/f-permission.d.ts +4 -1
- package/lib/types/facade/f-range.d.ts +48 -5
- package/lib/types/facade/f-sheet-hooks.d.ts +50 -12
- package/lib/types/facade/f-univer.d.ts +18 -15
- package/lib/types/facade/f-workbook.d.ts +37 -24
- package/lib/types/facade/f-worksheet.d.ts +26 -13
- package/lib/types/facade/index.d.ts +1 -0
- package/lib/types/index.d.ts +13 -13
- package/lib/types/services/scroll-manager.service.d.ts +12 -4
- package/lib/types/views/cell-alert/CellAlertPopup.d.ts +1 -1
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +30 -28
- package/package.json +15 -39
- package/LICENSE +0 -176
- package/lib/types/controllers/permission/sheet-permission-init.controller.d.ts +0 -26
- package/lib/types/controllers/permission/sheet-permission-interceptor-base.controller.d.ts +0 -36
- package/lib/types/controllers/permission/sheet-permission-view-model.controller.d.ts +0 -11
package/lib/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(63 131 248 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(63 131 248 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*{scrollbar-color:initial;scrollbar-width:initial}.univer-absolute{position:absolute}.univer-right-0{right:0}.univer-z-\[1001\]{z-index:1001}.univer-m-0{margin:0}.univer-mb-2{margin-bottom:.5rem}.univer-flex{display:flex}.univer-h-full{height:100%}.univer-max-h-\[360px\]{max-height:360px}.univer-w-\[300px\]{width:300px}.univer-w-\[50\%\]{width:50%}.univer-flex-shrink-0{flex-shrink:0}.univer-cursor-not-allowed{cursor:not-allowed}.univer-cursor-pointer{cursor:pointer}.univer-list-none{list-style-type:none}.univer-items-center{align-items:center}.univer-justify-center{justify-content:center}.univer-justify-between{justify-content:space-between}.univer-gap-2{gap:.5rem}.univer-overflow-hidden{overflow:hidden}.univer-overflow-y-auto{overflow-y:auto}.univer-text-ellipsis{text-overflow:ellipsis}.univer-whitespace-nowrap{white-space:nowrap}.univer-border-0{border-width:0px}.univer-border-b{border-bottom-width:1px}.univer-border-solid{border-style:solid}.univer-border-gray-200{--tw-border-opacity: 1;border-color:rgb(227 229 234 / var(--tw-border-opacity, 1))}.univer-bg-transparent{background-color:transparent}.univer-bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.univer-p-0{padding:0}.univer-p-2{padding:.5rem}.univer-px-1{padding-left:.25rem;padding-right:.25rem}.univer-px-2{padding-left:.5rem;padding-right:.5rem}.univer-py-1{padding-top:.25rem;padding-bottom:.25rem}.univer-text-sm{font-size:.875rem;line-height:1.25rem}.univer-text-xs{font-size:.75rem;line-height:1rem}.univer-font-semibold{font-weight:600}.univer-text-gray-300{--tw-text-opacity: 1;color:rgb(205 208 216 / var(--tw-text-opacity, 1))}.univer-text-gray-400{--tw-text-opacity: 1;color:rgb(151 157 172 / var(--tw-text-opacity, 1))}.univer-text-gray-600{--tw-text-opacity: 1;color:rgb(65 70 87 / var(--tw-text-opacity, 1))}.univer-transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.univer-duration-200{transition-duration:.2s}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.univer-duration-200{animation-duration:.2s}.univer-scrollbar-thin::-webkit-scrollbar-track{background-color:var(--scrollbar-track);border-radius:var(--scrollbar-track-radius)}.univer-scrollbar-thin::-webkit-scrollbar-track:hover{background-color:var(--scrollbar-track-hover, var(--scrollbar-track))}.univer-scrollbar-thin::-webkit-scrollbar-track:active{background-color:var(--scrollbar-track-active, var(--scrollbar-track-hover, var(--scrollbar-track)))}.univer-scrollbar-thin::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);border-radius:var(--scrollbar-thumb-radius)}.univer-scrollbar-thin::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover, var(--scrollbar-thumb))}.univer-scrollbar-thin::-webkit-scrollbar-thumb:active{background-color:var(--scrollbar-thumb-active, var(--scrollbar-thumb-hover, var(--scrollbar-thumb)))}.univer-scrollbar-thin::-webkit-scrollbar-corner{background-color:var(--scrollbar-corner);border-radius:var(--scrollbar-corner-radius)}.univer-scrollbar-thin::-webkit-scrollbar-corner:hover{background-color:var(--scrollbar-corner-hover, var(--scrollbar-corner))}.univer-scrollbar-thin::-webkit-scrollbar-corner:active{background-color:var(--scrollbar-corner-active, var(--scrollbar-corner-hover, var(--scrollbar-corner)))}.univer-scrollbar-thin{scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)}.univer-scrollbar-thin::-webkit-scrollbar{display:block;width:8px;height:8px}.univer-scrollbar-track-transparent{--scrollbar-track: transparent !important}.univer-scrollbar-thumb-gray-300{--scrollbar-thumb: #CDD0D8 !important}.hover\:univer-bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(238 239 241 / var(--tw-bg-opacity, 1))}.hover\:univer-bg-transparent:hover{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-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{color:rgb(var(--grey-400))}.univer-defined-name{display:flex;position:relative;transition:height .15s;border-right:1px solid rgb(var(--border-color));height:100%;width:100px;box-sizing:border-box}.univer-defined-name-overlay{position:relative;width:300px;background-color:rgb(var(--color-white))}.univer-defined-name-overlay-container{position:relative;height:100%;max-height:400px;width:100%;overflow:hidden;overflow-y:auto;scrollbar-color:rgba(var(--scrollbar-color),.7) transparent;scrollbar-gutter:auto;scrollbar-width:thin}.univer-defined-name-overlay-item{display:flex;align-items:center;justify-content:space-between;padding:var(--padding-xs);border-bottom:1px solid rgb(var(--border-color));-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer}.univer-defined-name-overlay-item:hover{background-color:rgb(var(--grey-50))}.univer-defined-name-overlay-item-name{font-size:var(--font-size-md);color:rgb(var(--grey-900));margin:5px 0;overflow:hidden;text-overflow:ellipsis;flex:1}.univer-defined-name-overlay-item-name-for-sheet{font-size:var(--font-size-xxs);color:rgb(var(--grey-400));margin-left:5px;font-weight:400}.univer-defined-name-overlay-item-formula{font-size:var(--font-size-xs);color:rgb(var(--grey-800));margin:5px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1}.univer-defined-name-overlay-manager{display:flex;flex-direction:column;overflow-y:auto;width:100%;cursor:pointer;overflow:hidden;background-color:rgb(var(--color-white))}.univer-defined-name-overlay-manager:hover{background-color:rgb(var(--grey-50))}.univer-defined-name-overlay-manager-title{font-size:var(--font-size-xs);font-weight:700;margin:var(--margin-xs);margin-bottom:0;color:rgb(var(--grey-800))}.univer-defined-name-overlay-manager-content{font-size:var(--font-size-xxs);margin:var(--margin-xs);color:rgb(var(--grey-500))}.univer-defined-name-container{width:100%;position:relative}.univer-defined-name-container-scroll{width:100%;overflow:hidden;overflow-y:auto;position:absolute}.univer-defined-name-container-addButton{display:flex;align-items:center;justify-content:center;width:100%;height:40px;border-top:1px solid rgb(var(--border-color));border-bottom:1px solid rgb(var(--border-color));font-size:var(--font-size-md);color:rgb(var(--primary-color))}.univer-defined-name-container-addButton:hover{background-color:rgb(var(--grey-50));cursor:pointer}.univer-defined-name-container-addButton-text{margin-left:5px}.univer-defined-name-container-item{position:relative;display:flex;align-items:center;justify-content:space-between;padding:var(--padding-xs);border-bottom:1px solid rgb(var(--border-color));-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:default}.univer-defined-name-container-item-name{font-size:var(--font-size-sm);font-weight:500;color:rgb(var(--color-black));margin:5px 0;max-width:190px;max-height:100px;overflow:hidden}.univer-defined-name-container-item-name-for-sheet{font-size:var(--font-size-xxs);color:rgb(var(--grey-400));margin-left:5px;font-weight:400}.univer-defined-name-container-item-formula-or-refString{font-size:var(--font-size-xs);color:rgb(var(--grey-500));font-weight:400;margin:5px 0;max-height:100px;text-overflow:ellipsis;overflow:hidden}.univer-defined-name-container-item-update{position:absolute;font-size:var(--font-size-xs);color:rgb(var(--primary-color));cursor:pointer;padding:4px;transform:translateY(-50%);border-radius:var(--border-radius-base);right:60px;top:20px}.univer-defined-name-container-item-update:hover{background-color:rgb(var(--hyacinth-50))}.univer-defined-name-container-item-delete{position:absolute;font-size:var(--font-size-xs);color:rgb(var(--error-color));cursor:pointer;padding:4px;right:20px;top:20px;transform:translateY(-50%);border-radius:var(--border-radius-base)}.univer-defined-name-container-item-delete:hover{background-color:rgb(var(--hyacinth-50))}.univer-defined-name-container-item-show{display:none}.univer-defined-name-container-item:hover{background-color:rgb(var(--grey-50))}.univer-defined-name-container-item:hover .univer-defined-name-container-item-show{display:block}.univer-defined-name-input{display:flex;align-items:center;justify-content:left;border-bottom:1px solid rgb(var(--border-color));padding-bottom:5px}.univer-defined-name-input>div{margin-top:16px}.univer-defined-name-input-formula-selector-text-wrap{margin-top:16px;height:100%;position:relative;padding:0 0 0 6px;border:1px solid rgb(var(--border-color));transition:all .15s;border-radius:var(--border-radius-base)}.univer-defined-name-input-text-editor-container{position:relative;width:95%;height:30px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.univer-defined-name-input-validation{display:flex;align-items:center;justify-content:left;color:rgb(var(--error-color));font-size:var(--font-size-xs)}.univer-defined-name-input-validation>span{margin-right:2px}.univer-defined-name-input-disable{color:rgb(var(--grey-200));cursor:not-allowed}.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:1px solid rgb(var(--primary-color));box-shadow:none;box-sizing:content-box}.univer-editor-container .univer-editor-input{position:relative;display:flex;width:100%;height:100%}.univer-editor-container .univer-editor-input canvas{position:absolute}.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:100px;height:100%;position:relative}.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-disable{color:rgb(var(--grey-200));cursor:not-allowed}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper{position:relative;display:flex;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{display:flex;align-items:center;justify-content:center;padding:var(--padding-xs);font-size:var(--font-size-lg);border-radius:var(--border-radius-base)}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper .univer-icon-container-success.univer-formula-active{cursor:pointer;color:rgb(var(--success-color))}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper .univer-icon-container-success.univer-formula-active:hover{background-color:rgb(var(--grey-50))}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper .univer-icon-container-error.univer-formula-active{cursor:pointer;color:rgb(var(--error-color))}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper .univer-icon-container-error.univer-formula-active:hover{background-color:rgb(var(--grey-50))}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper .univer-icon-container-fx{cursor:pointer}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper .univer-icon-container-fx:hover{background-color:rgb(var(--grey-50))}.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-formula-box .univer-formula-bar .univer-formula-input .univer-arrow-container-disable{color:rgb(var(--grey-200));cursor:not-allowed}.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-secondary))}.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-container{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;height:36px;padding:0 var(--padding-xl);background-color:rgb(var(--bg-color-secondary))}.univer-sheet-container>span:not(:last-of-type){margin-right:4px}.univer-sheet-bar-menu{max-height:calc(100vh - 36px);display:grid;gap:var(--margin-xxs);align-items:center;overflow-y:auto;box-sizing:border-box;margin:0;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;display:flex;align-items:center}.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;-moz-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;-moz-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-div{box-sizing:border-box;padding:var(--padding-xs) var(--padding-sm);white-space:nowrap;border:2px solid transparent;border-radius:var(--border-radius-base);display:flex;align-items:center}.univer-slide-tab-item .univer-slide-tab-div-edit{cursor:text;outline:none}.univer-slide-tab-item .univer-slide-tab-div-edit::-moz-selection{color:rgb(var(--color-white));background-color:rgb(var(--primary-color))}.univer-slide-tab-item .univer-slide-tab-div-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;display:flex;justify-content:center}.univer-slide-tab-item-dropdown{-webkit-user-select:none;-moz-user-select:none;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))}.univer-cell-alert{box-sizing:border-box;box-shadow:var(--box-shadow-base);padding:var(--padding-sm) var(--padding-base);border-radius:var(--border-radius-lg);color:rgba(var(--color-black));background:rgba(var(--color-white));z-index:100;width:156px}.univer-cell-alert-title{height:20px;font-size:var(--font-size-sm);font-weight:500;display:flex;flex-direction:row;align-items:center;margin-bottom:6px;line-height:20px}.univer-cell-alert-icon{margin-right:6px}.univer-cell-alert-icon-error{color:rgba(var(--red-400))}.univer-cell-alert-icon-info{color:rgba(var(--blue-500))}.univer-cell-alert-icon-warning{color:rgba(var(--gold-400))}.univer-cell-alert-content{font-size:var(--font-size-sm)}.univer-mobile-sheet-bar-container{width:100%;overflow-x:scroll;height:32px;background-color:rgb(var(--bg-color))}.univer-mobile-sheet-bar-slider{display:flex;flex-wrap:nowrap;align-items:center;height:32px}.univer-mobile-sheet-bar-item{align-items:center;box-sizing:border-box;flex-grow:1;flex-shrink:0;flex-wrap:nowrap;font-size:12px;height:100%;line-height:28px;min-width:48px;overflow:hidden;padding:2px 4px;text-align:center;white-space:nowrap;border-right:1px solid rgb(var(--border-color));background-color:rgb(var(--bg-color));text-overflow:ellipsis;max-width:120px}.univer-mobile-sheet-bar-item.univer-mobile-sheet-bar-item-activated{color:rgb(var(--primary-color));background-color:rgb(var(--bg-color-secondary))}.univer-permission-panel-detail-wrapper{margin-top:16px;height:calc(100% - 16px);display:flex;flex-direction:column}.univer-radio-group-vertical{display:flex;flex-direction:column;font-weight:400}.univer-sheet-permission-design-person-panel{height:270px;border:1px solid rgb(var(--grey-200));border-radius:var(--border-radius-lg);padding:var(--padding-base);margin-bottom:var(--margin-xs);display:flex;flex-direction:column}.univer-sheet-permission-design-person-panel-header{display:flex;justify-content:space-between;align-items:center}.univer-sheet-permission-design-person-panel-header-add{cursor:pointer;color:rgb(var(--blue-500))}.univer-sheet-permission-design-person-panel-split{height:1px;background-color:rgb(var(--grey-200));margin:var(--margin-xs) 0}.univer-sheet-permission-design-person-panel-content-item{height:28px;line-height:28px;margin-bottom:var(--margin-sm);display:flex;align-items:center}.univer-sheet-permission-design-person-panel-content-item:last-child{margin-bottom:0}.univer-sheet-permission-design-person-panel-content-item-name{width:130px;color:rgb(var(--color-black));white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-left:6px}.univer-sheet-permission-design-person-panel-content-item-select{width:90px;cursor:pointer}.univer-sheet-permission-design-person-panel .univer-sheet-permission-design-person-panel-content-item-select.univer-select-single:not(.univer-select-customize-input) .univer-select-selector{border:none;padding:0;color:rgb(var(--grey-900))}.univer-sheet-permission-design-person-panel .univer-sheet-permission-design-person-panel-content-item-select.univer-select-show-arrow .univer-select-arrow{right:0}.univer-sheet-permission-design-person-panel-content{flex:1}.univer-sheet-permission-panel-title{font-weight:500}.univer-sheet-permission-panel-footer{display:flex;flex-direction:row-reverse;padding:20px 0;margin-top:auto}.univer-sheet-permission-panel-footer button:first-child{margin-left:8px}.univer-permission-range-selector{font-weight:400}.univer-permission-range-selector-error,.univer-sheet-permission-panel-name-input-error,.univer-permission-range-selector-error:hover,.univer-sheet-permission-panel-name-input-error:hover{border:1px solid rgb(var(--red-400))}.univer-permission-range-selector-error-text,.univer-sheet-permission-panel-name-input-error-text{height:20px;line-height:20px;color:rgb(var(--red-400));font-size:var(--font-size-xs);font-weight:400}.univer-sheet-permission-list-panel-wrapper{margin-top:var(--margin-xs);height:calc(100% - 8px);display:flex;flex-direction:column}.univer-sheet-permission-list-panel-header{display:flex;padding:var(--padding-sm) 0;height:30px}.univer-sheet-permission-list-panel-header-type{display:flex;flex-direction:column;align-items:center;margin-right:var(--margin-lg);cursor:pointer}.univer-sheet-permission-list-panel-header-type div{height:24px;line-height:24px}.univer-sheet-permission-list-panel-header-type-bottom{height:2px;width:24px;background-color:rgb(var(--blue-500));margin-top:var(--margin-xxs)}.univer-sheet-permission-list-panel-header-select{color:rgb(var(--blue-500));height:24px;line-height:24px;font-size:var(--font-size-lg);font-weight:500}.univer-sheet-permission-list-item-header-icon{border-radius:var(--border-radius-base);height:24px;padding:4px;box-sizing:border-box}.univer-sheet-permission-list-item-header-icon:hover{background-color:rgb(var(--grey-200))}.univer-sheet-permission-list-item{margin-top:var(--margin-sm);border-radius:var(--border-radius-lg);border:1px solid rgb(var(--grey-200));padding:var(--padding-base)}.univer-sheet-permission-list-item:hover{background-color:rgb(var(--grey-50))}.univer-sheet-permission-list-item-header{height:20px;line-height:20px;display:flex;justify-content:space-between}.univer-sheet-permission-list-item-header-name{font-weight:500;max-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.univer-sheet-permission-list-item-header-operator{display:flex;align-items:center}.univer-sheet-permission-list-item-header-operator div{margin-left:var(--margin-xs)}.univer-sheet-permission-list-item-split{height:1px;background-color:rgb(var(--grey-200));margin:var(--margin-xs) 0}.univer-sheet-permission-list-item-content-edit{display:flex;align-items:center}.univer-sheet-permission-list-item-content-view{display:flex;align-items:center;margin-top:var(--margin-xs)}.univer-sheet-permission-list-item-content-desc{font-size:12px;color:rgb(var(--grey-400));max-width:256px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:var(--margin-xs)}.univer-sheet-permission-list-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1}.univer-sheet-permission-list-empty-text{width:240px;word-wrap:break-word;color:rgb(var(--grey-400));font-size:13px}.univer-sheet-permission-list-item-content-title{font-size:12px;height:16px;line-height:16px;flex-grow:1;color:rgb(var(--color-black))}.univer-sheet-permission-list-item-content-sub{font-size:12px;height:16px;line-height:16px;color:rgb(var(--grey-600))}.univer-sheet-permission-panel-add-wrapper{padding:20px 0;margin-top:auto}.univer-sheet-permission-panel-add-button{width:100%;display:flex;align-items:center;justify-content:center}.univer-sheet-permission-panel-add-button div{margin-right:4px}.univer-spin-container{position:relative;width:100%;height:100%}.univer-spin-overlay{position:absolute;top:-2px;left:-2px;right:-2px;bottom:-2px;display:flex;justify-content:center;align-items:center;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background-color:#ffffff80;z-index:10}.univer-spinner{width:40px;height:40px;border:4px solid #f3f3f3;border-top:4px solid #3498db;border-radius:50%;animation:univer-spin 2s linear infinite}.univer-content-blur{filter:blur(2px);pointer-events:none}@keyframes univer-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.univer-sheet-permission-dialog-wrapper{display:flex;flex-direction:column;padding:2px}.univer-sheet-permission-dialog-split{height:1px;background-color:rgb(var(--grey-200))}.univer-sheet-permission-dialog-item{display:flex;align-items:center;justify-content:space-between;height:20px;line-height:20px;margin:6px 0}.univer-sheet-permission-user-dialog-footer{height:36px;padding:var(--padding-xs) 0;display:flex;justify-content:flex-end;align-items:center;margin-top:var(--margin-xs)}.univer-sheet-permission-user-dialog-button{height:32px;line-height:32px;padding:0px var(--padding-base)}.univer-sheet-permission-user-dialog-wrapper{height:329px;padding:var(--padding-base);box-sizing:content-box}.univer-sheet-permission-user-dialog-search-input{width:256px;height:32px}.univer-sheet-permission-user-list{height:240px;overflow-y:auto}.univer-sheet-permission-user-list-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%}.univer-sheet-permission-user-list-empty-text{width:240px;word-wrap:break-word;color:rgb(var(--grey-400));font-size:13px}.univer-sheet-permission-user-item{display:flex;align-items:center;margin:var(--margin-xs) 0;border-radius:6px;padding:var(--padding-xs) var(--padding-sm)}.univer-sheet-permission-user-item:hover{background-color:rgb(var(--grey-50))}.univer-sheet-permission-user-item div{margin-left:6px}.univer-sheet-permission-user-item-name{width:186px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.univer-sheet-permission-split{height:1px;background-color:rgb(var(--grey-200))}.univer-sheet-permission-user-dialog-footer{padding:var(--padding-xs) 0;display:flex;justify-content:flex-end;align-items:center;margin-top:var(--margin-xs);height:28px}.univer-sheet-permission-user-dialog-footer-confirm{margin-left:var(--margin-sm)}.univer-sheet-permission-user-dialog-button{height:28px;line-height:28px;padding:0px var(--padding-base)}.univer-sheet-permission-alert-dialog{padding:var(--padding-xl) 24px}.univer-sheet-permission-alert-dialog-title{font-size:var(--font-size-lg);font-weight:500;margin-bottom:var(--margin-base)}.univer-sheet-permission-alert-dialog-button{margin-top:var(--margin-lg);display:flex;justify-content:flex-end}.sheet-permission-user-dialog .univer-dialog-close,.sheet-permission-user-dialog .univer-dialog-header{display:none}.sheet-permission-user-dialog .univer-dialog-body{padding:0}
|
|
1
|
+
.univer-absolute{position:absolute}.univer-right-0{right:0}.univer-z-\[1001\]{z-index:1001}.univer-m-0{margin:0}.univer-mb-2{margin-bottom:.5rem}.univer-flex{display:flex}.univer-h-full{height:100%}.univer-max-h-\[360px\]{max-height:360px}.univer-w-\[300px\]{width:300px}.univer-w-\[50\%\]{width:50%}.univer-flex-shrink-0{flex-shrink:0}.univer-cursor-not-allowed{cursor:not-allowed}.univer-cursor-pointer{cursor:pointer}.univer-list-none{list-style-type:none}.univer-items-center{align-items:center}.univer-justify-center{justify-content:center}.univer-justify-between{justify-content:space-between}.univer-gap-2{gap:.5rem}.univer-overflow-hidden{overflow:hidden}.univer-overflow-y-auto{overflow-y:auto}.univer-text-ellipsis{text-overflow:ellipsis}.univer-whitespace-nowrap{white-space:nowrap}.univer-border-0{border-width:0px}.univer-border-b{border-bottom-width:1px}.univer-border-solid{border-style:solid}.univer-border-gray-200{--tw-border-opacity: 1;border-color:rgb(227 229 234 / var(--tw-border-opacity, 1))}.univer-bg-transparent{background-color:transparent}.univer-p-0{padding:0}.univer-p-2{padding:.5rem}.univer-px-1{padding-left:.25rem;padding-right:.25rem}.univer-px-2{padding-left:.5rem;padding-right:.5rem}.univer-py-1{padding-top:.25rem;padding-bottom:.25rem}.univer-text-sm{font-size:.875rem;line-height:1.25rem}.univer-text-xs{font-size:.75rem;line-height:1rem}.univer-font-semibold{font-weight:600}.univer-text-gray-300{--tw-text-opacity: 1;color:rgb(205 208 216 / var(--tw-text-opacity, 1))}.univer-text-gray-400{--tw-text-opacity: 1;color:rgb(151 157 172 / var(--tw-text-opacity, 1))}.univer-text-gray-600{--tw-text-opacity: 1;color:rgb(65 70 87 / var(--tw-text-opacity, 1))}.univer-transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.univer-duration-200{transition-duration:.2s}.univer-scrollbar-thin::-webkit-scrollbar-track{background-color:var(--scrollbar-track);border-radius:var(--scrollbar-track-radius)}.univer-scrollbar-thin::-webkit-scrollbar-track:hover{background-color:var(--scrollbar-track-hover, var(--scrollbar-track))}.univer-scrollbar-thin::-webkit-scrollbar-track:active{background-color:var(--scrollbar-track-active, var(--scrollbar-track-hover, var(--scrollbar-track)))}.univer-scrollbar-thin::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);border-radius:var(--scrollbar-thumb-radius)}.univer-scrollbar-thin::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover, var(--scrollbar-thumb))}.univer-scrollbar-thin::-webkit-scrollbar-thumb:active{background-color:var(--scrollbar-thumb-active, var(--scrollbar-thumb-hover, var(--scrollbar-thumb)))}.univer-scrollbar-thin::-webkit-scrollbar-corner{background-color:var(--scrollbar-corner);border-radius:var(--scrollbar-corner-radius)}.univer-scrollbar-thin::-webkit-scrollbar-corner:hover{background-color:var(--scrollbar-corner-hover, var(--scrollbar-corner))}.univer-scrollbar-thin::-webkit-scrollbar-corner:active{background-color:var(--scrollbar-corner-active, var(--scrollbar-corner-hover, var(--scrollbar-corner)))}.univer-scrollbar-thin{scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb, initial) var(--scrollbar-track, initial)}.univer-scrollbar-thin::-webkit-scrollbar{display:block;width:8px;height:8px}.univer-scrollbar-track-transparent{--scrollbar-track: transparent !important}.univer-scrollbar-thumb-gray-300{--scrollbar-thumb: #CDD0D8 !important}.hover\:univer-bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(238 239 241 / var(--tw-bg-opacity, 1))}.hover\:univer-bg-transparent:hover{background-color:transparent}.dark\:hover\:univer-bg-gray-600:hover:where(.univer-dark,.univer-dark *){--tw-bg-opacity: 1;background-color:rgb(65 70 87 / var(--tw-bg-opacity, 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-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{color:rgb(var(--grey-400))}.univer-defined-name{display:flex;position:relative;transition:height .15s;border-right:1px solid rgb(var(--border-color));height:100%;width:100px;box-sizing:border-box}.univer-defined-name-overlay{position:relative;width:300px;background-color:rgb(var(--color-white))}.univer-defined-name-overlay-container{position:relative;height:100%;max-height:400px;width:100%;overflow:hidden;overflow-y:auto;scrollbar-color:rgba(var(--scrollbar-color),.7) transparent;scrollbar-gutter:auto;scrollbar-width:thin}.univer-defined-name-overlay-item{display:flex;align-items:center;justify-content:space-between;padding:var(--padding-xs);border-bottom:1px solid rgb(var(--border-color));-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer}.univer-defined-name-overlay-item:hover{background-color:rgb(var(--grey-50))}.univer-defined-name-overlay-item-name{font-size:var(--font-size-md);color:rgb(var(--grey-900));margin:5px 0;overflow:hidden;text-overflow:ellipsis;flex:1}.univer-defined-name-overlay-item-name-for-sheet{font-size:var(--font-size-xxs);color:rgb(var(--grey-400));margin-left:5px;font-weight:400}.univer-defined-name-overlay-item-formula{font-size:var(--font-size-xs);color:rgb(var(--grey-800));margin:5px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1}.univer-defined-name-overlay-manager{display:flex;flex-direction:column;overflow-y:auto;width:100%;cursor:pointer;overflow:hidden;background-color:rgb(var(--color-white))}.univer-defined-name-overlay-manager:hover{background-color:rgb(var(--grey-50))}.univer-defined-name-overlay-manager-title{font-size:var(--font-size-xs);font-weight:700;margin:var(--margin-xs);margin-bottom:0;color:rgb(var(--grey-800))}.univer-defined-name-overlay-manager-content{font-size:var(--font-size-xxs);margin:var(--margin-xs);color:rgb(var(--grey-500))}.univer-defined-name-container{width:100%;position:relative}.univer-defined-name-container-scroll{width:100%;overflow:hidden;overflow-y:auto;position:absolute}.univer-defined-name-container-addButton{display:flex;align-items:center;justify-content:center;width:100%;height:40px;border-top:1px solid rgb(var(--border-color));border-bottom:1px solid rgb(var(--border-color));font-size:var(--font-size-md);color:rgb(var(--primary-color))}.univer-defined-name-container-addButton:hover{background-color:rgb(var(--grey-50));cursor:pointer}.univer-defined-name-container-addButton-text{margin-left:5px}.univer-defined-name-container-item{position:relative;display:flex;align-items:center;justify-content:space-between;padding:var(--padding-xs);border-bottom:1px solid rgb(var(--border-color));-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:default}.univer-defined-name-container-item-name{font-size:var(--font-size-sm);font-weight:500;color:rgb(var(--color-black));margin:5px 0;max-width:190px;max-height:100px;overflow:hidden}.univer-defined-name-container-item-name-for-sheet{font-size:var(--font-size-xxs);color:rgb(var(--grey-400));margin-left:5px;font-weight:400}.univer-defined-name-container-item-formula-or-refString{font-size:var(--font-size-xs);color:rgb(var(--grey-500));font-weight:400;margin:5px 0;max-height:100px;text-overflow:ellipsis;overflow:hidden}.univer-defined-name-container-item-update{position:absolute;font-size:var(--font-size-xs);color:rgb(var(--primary-color));cursor:pointer;padding:4px;transform:translateY(-50%);border-radius:var(--border-radius-base);right:60px;top:20px}.univer-defined-name-container-item-update:hover{background-color:rgb(var(--hyacinth-50))}.univer-defined-name-container-item-delete{position:absolute;font-size:var(--font-size-xs);color:rgb(var(--error-color));cursor:pointer;padding:4px;right:20px;top:20px;transform:translateY(-50%);border-radius:var(--border-radius-base)}.univer-defined-name-container-item-delete:hover{background-color:rgb(var(--hyacinth-50))}.univer-defined-name-container-item-show{display:none}.univer-defined-name-container-item:hover{background-color:rgb(var(--grey-50))}.univer-defined-name-container-item:hover .univer-defined-name-container-item-show{display:block}.univer-defined-name-input{display:flex;align-items:center;justify-content:left;border-bottom:1px solid rgb(var(--border-color));padding-bottom:5px}.univer-defined-name-input>div{margin-top:16px}.univer-defined-name-input-formula-selector-text-wrap{margin-top:16px;height:100%;position:relative;padding:0 0 0 6px;border:1px solid rgb(var(--border-color));transition:all .15s;border-radius:var(--border-radius-base)}.univer-defined-name-input-text-editor-container{position:relative;width:95%;height:30px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.univer-defined-name-input-validation{display:flex;align-items:center;justify-content:left;color:rgb(var(--error-color));font-size:var(--font-size-xs)}.univer-defined-name-input-validation>span{margin-right:2px}.univer-defined-name-input-disable{color:rgb(var(--grey-200));cursor:not-allowed}.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:1px solid rgb(var(--primary-color));box-shadow:none;box-sizing:content-box}.univer-editor-container .univer-editor-input{position:relative;display:flex;width:100%;height:100%}.univer-editor-container .univer-editor-input canvas{position:absolute}.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:100px;height:100%;position:relative}.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-disable{color:rgb(var(--grey-200));cursor:not-allowed}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper{position:relative;display:flex;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{display:flex;align-items:center;justify-content:center;padding:var(--padding-xs);font-size:var(--font-size-lg);border-radius:var(--border-radius-base)}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper .univer-icon-container-success.univer-formula-active{cursor:pointer;color:rgb(var(--success-color))}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper .univer-icon-container-success.univer-formula-active:hover{background-color:rgb(var(--grey-50))}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper .univer-icon-container-error.univer-formula-active{cursor:pointer;color:rgb(var(--error-color))}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper .univer-icon-container-error.univer-formula-active:hover{background-color:rgb(var(--grey-50))}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper .univer-icon-container-fx{cursor:pointer}.univer-formula-box .univer-formula-bar .univer-formula-icon-wrapper .univer-icon-container-fx:hover{background-color:rgb(var(--grey-50))}.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-formula-box .univer-formula-bar .univer-formula-input .univer-arrow-container-disable{color:rgb(var(--grey-200));cursor:not-allowed}.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-secondary))}.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-container{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;height:36px;padding:0 var(--padding-xl);background-color:rgb(var(--bg-color-secondary))}.univer-sheet-container>span:not(:last-of-type){margin-right:4px}.univer-sheet-bar-menu{max-height:calc(100vh - 36px);display:grid;gap:var(--margin-xxs);align-items:center;overflow-y:auto;box-sizing:border-box;margin:0;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;display:flex;align-items:center}.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;-moz-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;-moz-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-div{box-sizing:border-box;padding:var(--padding-xs) var(--padding-sm);white-space:nowrap;border:2px solid transparent;border-radius:var(--border-radius-base);display:flex;align-items:center}.univer-slide-tab-item .univer-slide-tab-div-edit{cursor:text;outline:none}.univer-slide-tab-item .univer-slide-tab-div-edit::-moz-selection{color:rgb(var(--color-white));background-color:rgb(var(--primary-color))}.univer-slide-tab-item .univer-slide-tab-div-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;display:flex;justify-content:center}.univer-slide-tab-item-dropdown{-webkit-user-select:none;-moz-user-select:none;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))}.univer-cell-alert{box-sizing:border-box;box-shadow:var(--box-shadow-base);padding:var(--padding-sm) var(--padding-base);border-radius:var(--border-radius-lg);color:rgba(var(--color-black));background:rgba(var(--color-white));z-index:100;width:156px}.univer-cell-alert-title{height:20px;font-size:var(--font-size-sm);font-weight:500;display:flex;flex-direction:row;align-items:center;margin-bottom:6px;line-height:20px}.univer-cell-alert-icon{margin-right:6px}.univer-cell-alert-icon-error{color:rgba(var(--red-400))}.univer-cell-alert-icon-info{color:rgba(var(--blue-500))}.univer-cell-alert-icon-warning{color:rgba(var(--gold-400))}.univer-cell-alert-content{font-size:var(--font-size-sm)}.univer-mobile-sheet-bar-container{width:100%;overflow-x:scroll;height:32px;background-color:rgb(var(--bg-color))}.univer-mobile-sheet-bar-slider{display:flex;flex-wrap:nowrap;align-items:center;height:32px}.univer-mobile-sheet-bar-item{align-items:center;box-sizing:border-box;flex-grow:1;flex-shrink:0;flex-wrap:nowrap;font-size:12px;height:100%;line-height:28px;min-width:48px;overflow:hidden;padding:2px 4px;text-align:center;white-space:nowrap;border-right:1px solid rgb(var(--border-color));background-color:rgb(var(--bg-color));text-overflow:ellipsis;max-width:120px}.univer-mobile-sheet-bar-item.univer-mobile-sheet-bar-item-activated{color:rgb(var(--primary-color));background-color:rgb(var(--bg-color-secondary))}.univer-permission-panel-detail-wrapper{margin-top:16px;height:calc(100% - 16px);display:flex;flex-direction:column}.univer-radio-group-vertical{display:flex;flex-direction:column;font-weight:400}.univer-sheet-permission-design-person-panel{height:270px;border:1px solid rgb(var(--grey-200));border-radius:var(--border-radius-lg);padding:var(--padding-base);margin-bottom:var(--margin-xs);display:flex;flex-direction:column}.univer-sheet-permission-design-person-panel-header{display:flex;justify-content:space-between;align-items:center}.univer-sheet-permission-design-person-panel-header-add{cursor:pointer;color:rgb(var(--blue-500))}.univer-sheet-permission-design-person-panel-split{height:1px;background-color:rgb(var(--grey-200));margin:var(--margin-xs) 0}.univer-sheet-permission-design-person-panel-content-item{height:28px;line-height:28px;margin-bottom:var(--margin-sm);display:flex;align-items:center}.univer-sheet-permission-design-person-panel-content-item:last-child{margin-bottom:0}.univer-sheet-permission-design-person-panel-content-item-name{width:130px;color:rgb(var(--color-black));white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-left:6px}.univer-sheet-permission-design-person-panel-content-item-select{width:90px;cursor:pointer}.univer-sheet-permission-design-person-panel .univer-sheet-permission-design-person-panel-content-item-select.univer-select-single:not(.univer-select-customize-input) .univer-select-selector{border:none;padding:0;color:rgb(var(--grey-900))}.univer-sheet-permission-design-person-panel .univer-sheet-permission-design-person-panel-content-item-select.univer-select-show-arrow .univer-select-arrow{right:0}.univer-sheet-permission-design-person-panel-content{flex:1}.univer-sheet-permission-panel-title{font-weight:500}.univer-sheet-permission-panel-footer{display:flex;flex-direction:row-reverse;padding:20px 0;margin-top:auto}.univer-sheet-permission-panel-footer button:first-child{margin-left:8px}.univer-permission-range-selector{font-weight:400}.univer-permission-range-selector-error,.univer-sheet-permission-panel-name-input-error,.univer-permission-range-selector-error:hover,.univer-sheet-permission-panel-name-input-error:hover{border:1px solid rgb(var(--red-400))}.univer-permission-range-selector-error-text,.univer-sheet-permission-panel-name-input-error-text{height:20px;line-height:20px;color:rgb(var(--red-400));font-size:var(--font-size-xs);font-weight:400}.univer-sheet-permission-list-panel-wrapper{margin-top:var(--margin-xs);height:calc(100% - 8px);display:flex;flex-direction:column}.univer-sheet-permission-list-panel-header{display:flex;padding:var(--padding-sm) 0;height:30px}.univer-sheet-permission-list-panel-header-type{display:flex;flex-direction:column;align-items:center;margin-right:var(--margin-lg);cursor:pointer}.univer-sheet-permission-list-panel-header-type div{height:24px;line-height:24px}.univer-sheet-permission-list-panel-header-type-bottom{height:2px;width:24px;background-color:rgb(var(--blue-500));margin-top:var(--margin-xxs)}.univer-sheet-permission-list-panel-header-select{color:rgb(var(--blue-500));height:24px;line-height:24px;font-size:var(--font-size-lg);font-weight:500}.univer-sheet-permission-list-item-header-icon{border-radius:var(--border-radius-base);height:24px;padding:4px;box-sizing:border-box}.univer-sheet-permission-list-item-header-icon:hover{background-color:rgb(var(--grey-200))}.univer-sheet-permission-list-item{margin-top:var(--margin-sm);border-radius:var(--border-radius-lg);border:1px solid rgb(var(--grey-200));padding:var(--padding-base)}.univer-sheet-permission-list-item:hover{background-color:rgb(var(--grey-50))}.univer-sheet-permission-list-item-header{height:20px;line-height:20px;display:flex;justify-content:space-between}.univer-sheet-permission-list-item-header-name{font-weight:500;max-width:200px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.univer-sheet-permission-list-item-header-operator{display:flex;align-items:center}.univer-sheet-permission-list-item-header-operator div{margin-left:var(--margin-xs)}.univer-sheet-permission-list-item-split{height:1px;background-color:rgb(var(--grey-200));margin:var(--margin-xs) 0}.univer-sheet-permission-list-item-content-edit{display:flex;align-items:center}.univer-sheet-permission-list-item-content-view{display:flex;align-items:center;margin-top:var(--margin-xs)}.univer-sheet-permission-list-item-content-desc{font-size:12px;color:rgb(var(--grey-400));max-width:256px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:var(--margin-xs)}.univer-sheet-permission-list-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1}.univer-sheet-permission-list-empty-text{width:240px;word-wrap:break-word;color:rgb(var(--grey-400));font-size:13px}.univer-sheet-permission-list-item-content-title{font-size:12px;height:16px;line-height:16px;flex-grow:1;color:rgb(var(--color-black))}.univer-sheet-permission-list-item-content-sub{font-size:12px;height:16px;line-height:16px;color:rgb(var(--grey-600))}.univer-sheet-permission-panel-add-wrapper{padding:20px 0;margin-top:auto}.univer-sheet-permission-panel-add-button{width:100%;display:flex;align-items:center;justify-content:center}.univer-sheet-permission-panel-add-button div{margin-right:4px}.univer-spin-container{position:relative;width:100%;height:100%}.univer-spin-overlay{position:absolute;top:-2px;left:-2px;right:-2px;bottom:-2px;display:flex;justify-content:center;align-items:center;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);background-color:#ffffff80;z-index:10}.univer-spinner{width:40px;height:40px;border:4px solid #f3f3f3;border-top:4px solid #3498db;border-radius:50%;animation:univer-spin 2s linear infinite}.univer-content-blur{filter:blur(2px);pointer-events:none}@keyframes univer-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.univer-sheet-permission-dialog-wrapper{display:flex;flex-direction:column;padding:2px}.univer-sheet-permission-dialog-split{height:1px;background-color:rgb(var(--grey-200))}.univer-sheet-permission-dialog-item{display:flex;align-items:center;justify-content:space-between;height:20px;line-height:20px;margin:6px 0}.univer-sheet-permission-user-dialog-footer{height:36px;padding:var(--padding-xs) 0;display:flex;justify-content:flex-end;align-items:center;margin-top:var(--margin-xs)}.univer-sheet-permission-user-dialog-button{height:32px;line-height:32px;padding:0px var(--padding-base)}.univer-sheet-permission-user-dialog-wrapper{height:329px;padding:var(--padding-base);box-sizing:content-box}.univer-sheet-permission-user-dialog-search-input{width:256px;height:32px}.univer-sheet-permission-user-list{height:240px;overflow-y:auto}.univer-sheet-permission-user-list-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%}.univer-sheet-permission-user-list-empty-text{width:240px;word-wrap:break-word;color:rgb(var(--grey-400));font-size:13px}.univer-sheet-permission-user-item{display:flex;align-items:center;margin:var(--margin-xs) 0;border-radius:6px;padding:var(--padding-xs) var(--padding-sm)}.univer-sheet-permission-user-item:hover{background-color:rgb(var(--grey-50))}.univer-sheet-permission-user-item div{margin-left:6px}.univer-sheet-permission-user-item-name{width:186px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.univer-sheet-permission-split{height:1px;background-color:rgb(var(--grey-200))}.univer-sheet-permission-user-dialog-footer{padding:var(--padding-xs) 0;display:flex;justify-content:flex-end;align-items:center;margin-top:var(--margin-xs);height:28px}.univer-sheet-permission-user-dialog-footer-confirm{margin-left:var(--margin-sm)}.univer-sheet-permission-user-dialog-button{height:28px;line-height:28px;padding:0px var(--padding-base)}.univer-sheet-permission-alert-dialog{padding:var(--padding-xl) 24px}.univer-sheet-permission-alert-dialog-title{font-size:var(--font-size-lg);font-weight:500;margin-bottom:var(--margin-base)}.univer-sheet-permission-alert-dialog-button{margin-top:var(--margin-lg);display:flex;justify-content:flex-end}.sheet-permission-user-dialog .univer-dialog-close,.sheet-permission-user-dialog .univer-dialog-header{display:none}.sheet-permission-user-dialog .univer-dialog-body{padding:0}
|
|
@@ -6,7 +6,17 @@ export interface ISetScrollRelativeCommandParams {
|
|
|
6
6
|
export interface IScrollCommandParams {
|
|
7
7
|
offsetX?: number;
|
|
8
8
|
offsetY?: number;
|
|
9
|
+
/**
|
|
10
|
+
* The index of row in spreadsheet.
|
|
11
|
+
* e.g. if row start 10 at current viewport after freeze, and scroll value is zero, startRow is 0.
|
|
12
|
+
* e.g. if scrolled about 2 rows, now top is 12, then sheetViewStartRow is 2.
|
|
13
|
+
*/
|
|
9
14
|
sheetViewStartRow?: number;
|
|
15
|
+
/**
|
|
16
|
+
* Not the index of col in spreadsheet, but index of first column in current viewport.
|
|
17
|
+
* e.g. if col start C at current viewport after freeze, and scroll value is zero, startColumn is 0.
|
|
18
|
+
* e.g. if scrolled about 2 columns, now left is E, then sheetViewStartColumn is 2.
|
|
19
|
+
*/
|
|
10
20
|
sheetViewStartColumn?: number;
|
|
11
21
|
}
|
|
12
22
|
/**
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Disposable, DisposableCollection, ICommandService, IContextService, IPermissionService, IUniverInstanceService, LocaleService } from '@univerjs/core';
|
|
2
|
+
import { RangeProtectionRuleModel, SheetPermissionCheckController } from '@univerjs/sheets';
|
|
3
|
+
import { IDialogService } from '@univerjs/ui';
|
|
4
|
+
import { IAutoFillService } from '../../services/auto-fill/auto-fill.service';
|
|
5
|
+
export declare class SheetPermissionCheckUIController extends Disposable {
|
|
6
|
+
private readonly _commandService;
|
|
7
|
+
private readonly _univerInstanceService;
|
|
8
|
+
private readonly _permissionService;
|
|
9
|
+
private readonly _dialogService;
|
|
10
|
+
private _rangeProtectionRuleModel;
|
|
11
|
+
private _autoFillService;
|
|
12
|
+
private readonly _localeService;
|
|
13
|
+
private readonly _contextService;
|
|
14
|
+
private readonly _sheetPermissionCheckController;
|
|
15
|
+
disposableCollection: DisposableCollection;
|
|
16
|
+
constructor(_commandService: ICommandService, _univerInstanceService: IUniverInstanceService, _permissionService: IPermissionService, _dialogService: IDialogService, _rangeProtectionRuleModel: RangeProtectionRuleModel, _autoFillService: IAutoFillService, _localeService: LocaleService, _contextService: IContextService, _sheetPermissionCheckController: SheetPermissionCheckController);
|
|
17
|
+
private _initUIEvent;
|
|
18
|
+
private _haveNotPermissionHandle;
|
|
19
|
+
private _getPermissionCheck;
|
|
20
|
+
private _initialize;
|
|
21
|
+
private _commandExecutedListener;
|
|
22
|
+
private _permissionCheckByPaste;
|
|
23
|
+
private _permissionCheckByAutoFillCommand;
|
|
24
|
+
}
|
package/lib/types/controllers/permission/sheet-permission-interceptor-canvas-render.controller.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ import { ISheetSelectionRenderService } from '../../services/selection/base-sele
|
|
|
5
5
|
import { HeaderFreezeRenderController } from '../render-controllers/freeze.render-controller';
|
|
6
6
|
import { HeaderMoveRenderController } from '../render-controllers/header-move.render-controller';
|
|
7
7
|
import { HeaderResizeRenderController } from '../render-controllers/header-resize.render-controller';
|
|
8
|
-
export declare const SHEET_PERMISSION_PASTE_PLUGIN = "SHEET_PERMISSION_PASTE_PLUGIN";
|
|
9
8
|
export declare class SheetPermissionInterceptorCanvasRenderController extends RxDisposable implements IRenderModule {
|
|
10
9
|
private readonly _context;
|
|
11
10
|
private readonly _univerInstanceService;
|
package/lib/types/controllers/permission/sheet-permission-interceptor-clipboard.controller.d.ts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { Disposable, DisposableCollection, IUniverInstanceService, LocaleService } from '@univerjs/core';
|
|
2
|
-
import { SheetsSelectionsService } from '@univerjs/sheets';
|
|
2
|
+
import { SheetPermissionCheckController, SheetsSelectionsService } from '@univerjs/sheets';
|
|
3
3
|
import { ISheetClipboardService } from '../../services/clipboard/clipboard.service';
|
|
4
|
-
import { SheetPermissionInterceptorBaseController } from './sheet-permission-interceptor-base.controller';
|
|
5
4
|
export declare const SHEET_PERMISSION_PASTE_PLUGIN = "SHEET_PERMISSION_PASTE_PLUGIN";
|
|
6
5
|
export declare class SheetPermissionInterceptorClipboardController extends Disposable {
|
|
7
6
|
private readonly _univerInstanceService;
|
|
8
7
|
private readonly _selectionManagerService;
|
|
9
8
|
private readonly _localService;
|
|
10
9
|
private _sheetClipboardService;
|
|
11
|
-
private readonly
|
|
10
|
+
private readonly _sheetPermissionCheckController;
|
|
12
11
|
disposableCollection: DisposableCollection;
|
|
13
|
-
constructor(_univerInstanceService: IUniverInstanceService, _selectionManagerService: SheetsSelectionsService, _localService: LocaleService, _sheetClipboardService: ISheetClipboardService,
|
|
12
|
+
constructor(_univerInstanceService: IUniverInstanceService, _selectionManagerService: SheetsSelectionsService, _localService: LocaleService, _sheetClipboardService: ISheetClipboardService, _sheetPermissionCheckController: SheetPermissionCheckController);
|
|
14
13
|
private _initClipboardHook;
|
|
15
14
|
}
|
package/lib/types/controllers/permission/sheet-permission-interceptor-formula-render.controller.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { Workbook, DisposableCollection, IPermissionService, IUniverInstanceServ
|
|
|
2
2
|
import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
3
3
|
import { RangeProtectionCache } from '@univerjs/sheets';
|
|
4
4
|
import { StatusBarController } from '../status-bar.controller';
|
|
5
|
-
export declare const SHEET_PERMISSION_PASTE_PLUGIN = "SHEET_PERMISSION_PASTE_PLUGIN";
|
|
6
5
|
export declare class SheetPermissionInterceptorFormulaRenderController extends RxDisposable implements IRenderModule {
|
|
7
6
|
private readonly _context;
|
|
8
7
|
private readonly _univerInstanceService;
|
|
@@ -19,10 +19,13 @@ export declare class SheetsScrollRenderController extends Disposable implements
|
|
|
19
19
|
private _initSkeletonListener;
|
|
20
20
|
scrollToRange(range: IRange, forceTop?: boolean, forceLeft?: boolean): boolean;
|
|
21
21
|
/**
|
|
22
|
-
* Scroll spreadsheet to cell position. Based on the limitations of viewport and the number of rows and columns, you can only scroll to the maximum scrollable range.
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
22
|
+
* Scroll spreadsheet(viewMain) to cell position. Based on the limitations of viewport and the number of rows and columns, you can only scroll to the maximum scrollable range.
|
|
23
|
+
*
|
|
24
|
+
* if column A ~ B is frozen. set second param to 0 would make viewMain start at column C.
|
|
25
|
+
* set second param to 2 would make viewMain start at column E.
|
|
26
|
+
* @param {number} row - Cell row
|
|
27
|
+
* @param {number} column - Cell column
|
|
28
|
+
* @returns {boolean} - true if scroll is successful
|
|
26
29
|
*/
|
|
27
30
|
scrollToCell(row: number, column: number): boolean;
|
|
28
31
|
private _initCommandListener;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { IEventBase, FEventName } from '@univerjs/core';
|
|
2
|
+
import { FRange, FWorkbook, FWorksheet } from '@univerjs/sheets/facade';
|
|
3
|
+
interface IFSheetsUIEventNameMixin {
|
|
4
|
+
/**
|
|
5
|
+
* Trigger this event before the clipboard content changes.
|
|
6
|
+
* Type of the event parameter is {@link IBeforeClipboardChangeParam}
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* univerAPI.addEvent(univerAPI.Event.BeforeClipboardChange, (param) => {
|
|
10
|
+
* const {text, html} = param;
|
|
11
|
+
* console.log('debugger', text, html); // {text: '...', html: '...'}
|
|
12
|
+
* // if want to cancel the clipboard change
|
|
13
|
+
* param.cancel = true;
|
|
14
|
+
* })
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
readonly BeforeClipboardChange: 'BeforeClipboardChange';
|
|
18
|
+
/**
|
|
19
|
+
* Trigger this event after the clipboard content changes.
|
|
20
|
+
* Type of the event parameter is {@link IClipboardChangedParam}
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* univerAPI.addEvent(univerAPI.Event.ClipboardChanged, (param) => {
|
|
24
|
+
* const {text, html} = param;
|
|
25
|
+
* console.log('debugger', text, html); // {text: '...', html: '...'}
|
|
26
|
+
* })
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
readonly ClipboardChanged: 'ClipboardChanged';
|
|
30
|
+
/**
|
|
31
|
+
* Trigger this event before pasting.
|
|
32
|
+
* Type of the event parameter is {@link IBeforeClipboardPasteParam}
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* univerAPI.addEvent(univerAPI.Event.BeforeClipboardPaste, (param) => {
|
|
36
|
+
* const {text, html} = param;
|
|
37
|
+
* console.log('debugger', text, html);
|
|
38
|
+
* // if want to cancel the clipboard paste
|
|
39
|
+
* param.cancel = true;
|
|
40
|
+
* })
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
readonly BeforeClipboardPaste: 'BeforeClipboardPaste';
|
|
44
|
+
/**
|
|
45
|
+
* Trigger this event after pasting.
|
|
46
|
+
* Type of the event parameter is {@link IClipboardPastedParam}
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* univerAPI.addEvent(univerAPI.Event.ClipboardPasted, (param) => {
|
|
50
|
+
* const {text, html} = param;
|
|
51
|
+
* console.log('debugger', text, html); // {text: '...', html: '...'}
|
|
52
|
+
* })
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
readonly ClipboardPasted: 'ClipboardPasted';
|
|
56
|
+
}
|
|
57
|
+
export declare class FSheetsUIEventName extends FEventName implements IFSheetsUIEventNameMixin {
|
|
58
|
+
get BeforeClipboardChange(): 'BeforeClipboardChange';
|
|
59
|
+
get ClipboardChanged(): 'ClipboardChanged';
|
|
60
|
+
get BeforeClipboardPaste(): 'BeforeClipboardPaste';
|
|
61
|
+
get ClipboardPasted(): 'ClipboardPasted';
|
|
62
|
+
}
|
|
63
|
+
export interface IBeforeClipboardChangeParam extends IEventBase {
|
|
64
|
+
/**
|
|
65
|
+
* The workbook instance currently being operated on. {@link FWorkbook}
|
|
66
|
+
*/
|
|
67
|
+
workbook: FWorkbook;
|
|
68
|
+
/**
|
|
69
|
+
* The worksheet instance currently being operated on. {@link FWorksheet}
|
|
70
|
+
*/
|
|
71
|
+
worksheet: FWorksheet;
|
|
72
|
+
/**
|
|
73
|
+
* Clipboard Text String
|
|
74
|
+
*/
|
|
75
|
+
text: string;
|
|
76
|
+
/**
|
|
77
|
+
* Clipboard HTML String
|
|
78
|
+
*/
|
|
79
|
+
html: string;
|
|
80
|
+
/**
|
|
81
|
+
* The sheet containing the content that was (copied/cut)
|
|
82
|
+
*/
|
|
83
|
+
fromSheet: FWorksheet;
|
|
84
|
+
/**
|
|
85
|
+
* The range containing the content that was (copied/cut)
|
|
86
|
+
*/
|
|
87
|
+
fromRange: FRange;
|
|
88
|
+
}
|
|
89
|
+
export type IClipboardChangedParam = IBeforeClipboardChangeParam;
|
|
90
|
+
export interface IBeforeClipboardPasteParam extends IEventBase {
|
|
91
|
+
/**
|
|
92
|
+
* The workbook instance currently being operated on. {@link FWorkbook}
|
|
93
|
+
*/
|
|
94
|
+
workbook: FWorkbook;
|
|
95
|
+
/**
|
|
96
|
+
* The worksheet instance currently being operated on. {@link FWorkbook}
|
|
97
|
+
*/
|
|
98
|
+
worksheet: FWorksheet;
|
|
99
|
+
/**
|
|
100
|
+
* Clipboard Text String
|
|
101
|
+
*/
|
|
102
|
+
text?: string;
|
|
103
|
+
/**
|
|
104
|
+
* Clipboard HTML String
|
|
105
|
+
*/
|
|
106
|
+
html?: string;
|
|
107
|
+
}
|
|
108
|
+
export type IClipboardPastedParam = IBeforeClipboardPasteParam;
|
|
109
|
+
interface IFSheetsUIEventParamConfig {
|
|
110
|
+
BeforeClipboardChange: IBeforeClipboardChangeParam;
|
|
111
|
+
ClipboardChanged: IClipboardChangedParam;
|
|
112
|
+
BeforeClipboardPaste: IBeforeClipboardPasteParam;
|
|
113
|
+
ClipboardPasted: IClipboardPastedParam;
|
|
114
|
+
}
|
|
115
|
+
declare module '@univerjs/core' {
|
|
116
|
+
interface FEventName extends IFSheetsUIEventNameMixin {
|
|
117
|
+
}
|
|
118
|
+
interface IEventParamConfig extends IFSheetsUIEventParamConfig {
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
export {};
|
|
@@ -2,8 +2,11 @@ import { FPermission } from '@univerjs/sheets/facade';
|
|
|
2
2
|
export interface IFPermissionSheetsUIMixin {
|
|
3
3
|
/**
|
|
4
4
|
* Set visibility of unauthorized pop-up window
|
|
5
|
-
*
|
|
6
5
|
* @param {boolean} visible
|
|
6
|
+
* @example
|
|
7
|
+
* ```ts
|
|
8
|
+
* univerAPI.getPermission().setPermissionDialogVisible(false);
|
|
9
|
+
* ```
|
|
7
10
|
*/
|
|
8
11
|
setPermissionDialogVisible(visible: boolean): void;
|
|
9
12
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ICellWithCoord, IDisposable, ISelectionCell, Nullable, DisposableCollection } from '@univerjs/core';
|
|
2
2
|
import { ISelectionStyle } from '@univerjs/sheets';
|
|
3
3
|
import { ComponentType, ComponentManager } from '@univerjs/ui';
|
|
4
|
-
import { FRange } from '@univerjs/sheets/facade';
|
|
5
4
|
import { ICanvasPopup, ICellAlert } from '@univerjs/sheets-ui';
|
|
5
|
+
import { FRange } from '@univerjs/sheets/facade';
|
|
6
6
|
export interface IFComponentKey {
|
|
7
7
|
/**
|
|
8
8
|
* The key of the component to be rendered in the popup.
|
|
@@ -20,16 +20,31 @@ export interface IFCanvasPopup extends Omit<ICanvasPopup, 'componentKey'>, IFCom
|
|
|
20
20
|
interface IFRangeSheetsUIMixin {
|
|
21
21
|
/**
|
|
22
22
|
* Return this cell information, including whether it is merged and cell coordinates
|
|
23
|
-
* @returns
|
|
23
|
+
* @returns {ICellWithCoord} cell location and coordinate.
|
|
24
|
+
* @example
|
|
25
|
+
* ``` ts
|
|
26
|
+
* let sheet = univerAPI.getActiveWorkbook().getActiveSheet();
|
|
27
|
+
* sheet.getRange(5, 7).getCell();
|
|
28
|
+
* ```
|
|
24
29
|
*/
|
|
25
|
-
getCell(): ICellWithCoord;
|
|
30
|
+
getCell(this: FRange): ICellWithCoord;
|
|
26
31
|
/**
|
|
27
32
|
* Returns the coordinates of this cell,does not include units
|
|
28
33
|
* @returns coordinates of the cell, top, right, bottom, left
|
|
34
|
+
* @example
|
|
35
|
+
* ``` ts
|
|
36
|
+
* let sheet = univerAPI.getActiveWorkbook().getActiveSheet();
|
|
37
|
+
* sheet.getRange(5, 7).getCellRect();
|
|
38
|
+
* ```
|
|
29
39
|
*/
|
|
30
|
-
getCellRect(): DOMRect;
|
|
40
|
+
getCellRect(this: FRange): DOMRect;
|
|
31
41
|
/**
|
|
32
42
|
* Generate HTML content for the range.
|
|
43
|
+
* @example
|
|
44
|
+
* ``` ts
|
|
45
|
+
* let sheet = univerAPI.getActiveWorkbook().getActiveSheet();
|
|
46
|
+
* sheet.getRange(5, 7).generateHTML();
|
|
47
|
+
* ```
|
|
33
48
|
*/
|
|
34
49
|
generateHTML(this: FRange): string;
|
|
35
50
|
/**
|
|
@@ -38,16 +53,39 @@ interface IFRangeSheetsUIMixin {
|
|
|
38
53
|
* Be careful to manager the detach disposable object, if not dispose correctly, it might memory leaks.
|
|
39
54
|
* @param popup The popup to attach
|
|
40
55
|
* @returns The disposable object to detach the popup, if the popup is not attached, return `null`.
|
|
56
|
+
* @example
|
|
57
|
+
```
|
|
58
|
+
let sheet = univerAPI.getActiveWorkbook().getActiveSheet();
|
|
59
|
+
let range = sheet.getRange(2, 2, 3, 3);
|
|
60
|
+
let disposable = range.attachPopup({
|
|
61
|
+
componentKey: 'univer.sheet.cell-alert',
|
|
62
|
+
extraProps: { alert: { type: 0, title: 'This is an Info', message: 'This is an info message' } },
|
|
63
|
+
});
|
|
64
|
+
```
|
|
41
65
|
*/
|
|
42
66
|
attachPopup(popup: IFCanvasPopup): Nullable<IDisposable>;
|
|
43
67
|
/**
|
|
44
68
|
* Attach an alert popup to the start cell of current range.
|
|
45
69
|
* @param alert The alert to attach
|
|
46
70
|
* @returns The disposable object to detach the alert.
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* let sheet = univerAPI.getActiveWorkbook().getActiveSheet();
|
|
74
|
+
* let range = sheet.getRange(2, 2, 3, 3);
|
|
75
|
+
* range.attachAlertPopup({ message: 'This is an alert', type: 'warning' });
|
|
76
|
+
* ```
|
|
47
77
|
*/
|
|
48
78
|
attachAlertPopup(alert: Omit<ICellAlert, 'location'>): IDisposable;
|
|
49
79
|
/**
|
|
50
|
-
*
|
|
80
|
+
* Highlight the range with the specified style and primary cell.
|
|
81
|
+
* @param style - style for highlight range.
|
|
82
|
+
* @param primary - primary cell for highlight range.
|
|
83
|
+
* @example
|
|
84
|
+
* ```ts
|
|
85
|
+
* let sheet = univerAPI.getActiveWorkbook().getActiveSheet();
|
|
86
|
+
* let range = sheet.getRange(2, 2, 3, 3);
|
|
87
|
+
* range.highlight({ stroke: 'red' }, { startRow: 2, startColumn: 2 });
|
|
88
|
+
* ```
|
|
51
89
|
*/
|
|
52
90
|
highlight(style?: Nullable<Partial<ISelectionStyle>>, primary?: Nullable<ISelectionCell>): IDisposable;
|
|
53
91
|
}
|
|
@@ -55,6 +93,11 @@ declare module '@univerjs/sheets/facade' {
|
|
|
55
93
|
interface FRange extends IFRangeSheetsUIMixin {
|
|
56
94
|
}
|
|
57
95
|
}
|
|
96
|
+
/**
|
|
97
|
+
* Transform component key
|
|
98
|
+
* @param {IFComponentKey} component - The component key to transform.
|
|
99
|
+
* @param {ComponentManager} componentManager - The component manager to use for registration.
|
|
100
|
+
*/
|
|
58
101
|
export declare function transformComponentKey(component: IFComponentKey, componentManager: ComponentManager): {
|
|
59
102
|
key: string;
|
|
60
103
|
disposableCollection: DisposableCollection;
|
|
@@ -4,46 +4,84 @@ import { FSheetHooks } from '@univerjs/sheets/facade';
|
|
|
4
4
|
export interface IFSheetHooksUIMixin {
|
|
5
5
|
/**
|
|
6
6
|
* The onCellPointerMove event is fired when a pointer changes coordinates.
|
|
7
|
-
* @param callback
|
|
8
|
-
* @returns A disposable object that can be used to unsubscribe from the event
|
|
7
|
+
* @param {function(Nullable<IHoverCellPosition>): void} callback - function that will be called when the event is fired
|
|
8
|
+
* @returns {IDisposable} A disposable object that can be used to unsubscribe from the event
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* univerAPI.getSheetHooks().onCellPointerMove((cellPos) => { console.log(cellPos)});
|
|
12
|
+
* ```
|
|
9
13
|
*/
|
|
10
14
|
onCellPointerMove(callback: (cellPos: Nullable<IHoverCellPosition>) => void): IDisposable;
|
|
11
15
|
/**
|
|
12
16
|
* The onCellPointerOver event is fired when a pointer is moved into a cell's hit test boundaries.
|
|
13
|
-
* @param callback
|
|
14
|
-
* @returns A disposable object that can be used to unsubscribe from the event
|
|
17
|
+
* @param {function(Nullable<IHoverCellPosition>): void} callback - function that will be called when the event is fired
|
|
18
|
+
* @returns {IDisposable} A disposable object that can be used to unsubscribe from the event
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* univerAPI.getSheetHooks().onCellPointerOver((cellPos) => { console.log(cellPos)});
|
|
22
|
+
* ```
|
|
15
23
|
*/
|
|
16
24
|
onCellPointerOver(callback: (cellPos: Nullable<IHoverCellPosition>) => void): IDisposable;
|
|
17
25
|
/**
|
|
18
26
|
* The onCellDragOver event is fired when an element or text selection is being dragged into a cell's hit test boundaries.
|
|
19
|
-
* @param callback Callback function that will be called when the event is fired
|
|
20
|
-
* @returns A disposable object that can be used to unsubscribe from the event
|
|
27
|
+
* @param {function (Nullable<IDragCellPosition>): void} callback Callback function that will be called when the event is fired
|
|
28
|
+
* @returns {IDisposable} A disposable object that can be used to unsubscribe from the event
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* univerAPI.getSheetHooks().onCellDragOver((cellPos) => { console.log(cellPos)});
|
|
32
|
+
* ```
|
|
21
33
|
*/
|
|
22
34
|
onCellDragOver(callback: (cellPos: Nullable<IDragCellPosition>) => void): IDisposable;
|
|
23
35
|
/**
|
|
24
36
|
* The onCellDrop event is fired when an element or text selection is being dropped on the cell.
|
|
25
|
-
* @param callback Callback function that will be called when the event is fired
|
|
26
|
-
* @returns A disposable object that can be used to unsubscribe from the event
|
|
37
|
+
* @param {function(Nullable<IDragCellPosition>): void} callback Callback function that will be called when the event is fired
|
|
38
|
+
* @returns {IDisposable} A disposable object that can be used to unsubscribe from the event
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* univerAPI.getSheetHooks().onCellDrop((cellPos) => { console.log(cellPos)});
|
|
42
|
+
* ```
|
|
27
43
|
*/
|
|
28
44
|
onCellDrop(callback: (cellPos: Nullable<IDragCellPosition>) => void): IDisposable;
|
|
29
45
|
/**
|
|
30
46
|
* The onCellRender event is fired when a cell is rendered.
|
|
31
|
-
* @param customRender Custom render function
|
|
32
|
-
* @param effect The effect of the interceptor
|
|
33
|
-
* @param priority The priority of the interceptor
|
|
34
|
-
* @returns A disposable object that can be used to unsubscribe from the event
|
|
47
|
+
* @param {Nullable<ICellCustomRender[]>} customRender Custom render function
|
|
48
|
+
* @param {InterceptorEffectEnum} [effect] The effect of the interceptor
|
|
49
|
+
* @param {number} priority The priority of the interceptor
|
|
50
|
+
* @returns {IDisposable} A disposable object that can be used to unsubscribe from the event
|
|
51
|
+
* @example
|
|
52
|
+
* ```ts
|
|
53
|
+
univerAPI.getSheetHooks().onCellRender([{
|
|
54
|
+
drawWith: (ctx, info) => {
|
|
55
|
+
const { row, col } = info;
|
|
56
|
+
// Update to any cell location you want
|
|
57
|
+
if (row === 1 && col === 2) {
|
|
58
|
+
const { primaryWithCoord } = info;
|
|
59
|
+
const { startX, startY } = primaryWithCoord;
|
|
60
|
+
ctx.fillText('Univer', startX, startY + 10);
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
}])
|
|
64
|
+
* ```
|
|
35
65
|
*/
|
|
36
66
|
onCellRender(customRender: Nullable<ICellCustomRender[]>, effect?: InterceptorEffectEnum, priority?: number): IDisposable;
|
|
37
67
|
/**
|
|
38
68
|
* The onBeforeCellEdit event is fired before a cell is edited.
|
|
39
69
|
* @param callback Callback function that will be called when the event is fired
|
|
40
70
|
* @returns A disposable object that can be used to unsubscribe from the event
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* univerAPI.getSheetHooks().onBeforeCellEdit((params) => {console.log(params)})
|
|
74
|
+
* ```
|
|
41
75
|
*/
|
|
42
76
|
onBeforeCellEdit(callback: (params: IEditorBridgeServiceVisibleParam) => void): IDisposable;
|
|
43
77
|
/**
|
|
44
78
|
* The onAfterCellEdit event is fired after a cell is edited.
|
|
45
79
|
* @param callback Callback function that will be called when the event is fired
|
|
46
80
|
* @returns A disposable object that can be used to unsubscribe from the event
|
|
81
|
+
* @example
|
|
82
|
+
* ```ts
|
|
83
|
+
* univerAPI.getSheetHooks().onAfterCellEdit((params) => {console.log(params)})
|
|
84
|
+
* ```
|
|
47
85
|
*/
|
|
48
86
|
onAfterCellEdit(callback: (params: IEditorBridgeServiceVisibleParam) => void): IDisposable;
|
|
49
87
|
}
|