@univerjs/ui 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +14 -14
- package/lib/es/index.js +5168 -4987
- package/lib/index.css +1 -1
- package/lib/types/common/lifecycle.d.ts +1 -1
- package/lib/types/components/progress-bar/ProgressBar.d.ts +3 -0
- package/lib/types/components/range-selector/RangeSelector.d.ts +2 -2
- package/lib/types/controllers/ui/ui-desktop.controller.d.ts +4 -4
- package/lib/types/index.d.ts +4 -2
- package/lib/types/services/__tests__/progress.service.spec.d.ts +16 -0
- package/lib/types/services/editor/editor.service.d.ts +4 -3
- package/lib/types/services/global-zone/desktop-global-zone.service.d.ts +2 -0
- package/lib/types/services/global-zone/global-zone.service.d.ts +1 -0
- package/lib/types/services/layout/layout.service.d.ts +4 -1
- package/lib/types/services/menu/menu.d.ts +5 -4
- package/lib/types/services/message/__testing__/mock-message.service.d.ts +11 -0
- package/lib/types/services/popup/canvas-popup.service.d.ts +1 -0
- package/lib/types/services/progress/progress.service.d.ts +49 -0
- package/lib/types/ui-plugin.d.ts +2 -3
- package/lib/types/utils/cell.d.ts +3 -1
- package/lib/umd/index.js +14 -14
- package/package.json +20 -20
package/lib/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.univer-ui-plugin-sheets-font-family{overflow:hidden;width:120px;font-size:var(--font-size-xs);text-overflow:ellipsis;white-space:nowrap}.univer-ui-plugin-sheets-font-family-item{font-size:var(--font-size-xs)}.univer-ui-plugin-sheets-font-size{width:28px;height:24px;font-size:var(--font-size-xs)}.univer-ui-plugin-sheets-font-size-input{height:24px;line-height:24px;background-color:transparent;border:none}.univer-ui-plugin-sheets-font-size-input input{font-size:var(--font-size-xs);background-color:transparent}.univer-menu-item-no-hover{background:none}.univer-menu-item-content{display:inline-flex;gap:var(--margin-xs);align-items:center}.univer-menu-item-selectable{position:relative;padding-left:var(--padding-xl)}.univer-menu-item-selectable-icon{position:absolute;left:0;display:inline-flex;align-items:center;font-size:var(--font-size-lg)}.univer-menu-item-more-icon{font-size:var(--font-size-sm);color:rgb(var(--text-color))}.univer-app-layout{display:flex;flex-direction:column;height:100%;background-color:rgb(var(--bg-color));min-height:0}.univer-app-container{position:relative;display:flex;flex:1;flex-direction:column;min-height:0}.univer-app-container-header{position:relative;z-index:10;width:100%}.univer-app-container-wrapper{display:grid;grid-template-columns:auto 1fr auto;grid-template-rows:100%;height:100%;overflow:hidden}.univer-app-container-content{position:relative;overflow:hidden;display:grid;grid-template-rows:auto 1fr;flex:1;background-color:rgb(var(--bg-color-secondary));border-bottom:1px solid rgb(var(--border-color))}.univer-app-container-canvas{position:relative}.univer-app-container-left-sidebar,.univer-app-container-sidebar{height:100%}.univer-toolbar-btn{cursor:pointer;display:flex;align-items:center;justify-content:center;min-width:24px;height:24px;padding:0;font-size:var(--font-size-lg);color:rgb(var(--text-color));background-color:transparent;border:none;border-radius:var(--border-radius-base);outline:none}.univer-toolbar-btn:not([disabled]):hover{background-color:rgb(var(--grey-100))}.univer-toolbar-btn[disabled]{cursor:not-allowed;color:rgb(var(--grey-200))}.univer-toolbar-btn-active{background-color:rgb(var(--grey-100))}.univer-headerbar{user-select:none;position:relative}.univer-headerbar>.univer-header-menu{position:absolute;top:0;right:0;display:flex;box-sizing:border-box;height:100%}.univer-headerbar>.univer-header-menu>div{user-select:none;display:inline-flex;align-items:center;height:28px;margin-left:4px;padding:2px 4px;text-align:center;border-radius:4px}.univer-headerbar>.univer-header-menu>div:hover{background-color:rgb(var(--grey-300))}.univer-menubar{display:flex;gap:var(--margin-xs);align-items:center;justify-content:center;height:32px}.univer-menubar-item{cursor:pointer;display:block;padding:var(--padding-xs) var(--padding-sm);font-size:var(--font-size-xs);font-weight:400;border-radius:var(--border-radius-base);transition:all .1s ease-in-out}.univer-menubar-item:hover:not(.univer-menubar-item-active){background:rgb(var(--grey-300))}.univer-menubar-item-active{color:rgb(var(--color-white));background:rgb(var(--primary-color))}.univer-toolbar{user-select:none;position:relative;display:flex;align-items:center;box-sizing:border-box;height:32px;font-size:var(--font-size-base);color:rgb(var(--text-color));background-color:rgb(var(--bg-color-secondary));border-bottom:1px solid rgb(var(--border-color))}.univer-toolbar-container{padding:0 var(--padding-lg);display:flex;gap:var(--margin-xs);align-items:center;justify-content:center;box-sizing:border-box;height:100%;margin:0 auto;max-width:100%;overflow:hidden}.univer-toolbar-more{max-width:80%}.univer-toolbar-more-container{display:grid;box-sizing:border-box;padding:var(--padding-sm);background-color:rgb(var(--bg-color-secondary));border-radius:var(--border-radius-base);box-shadow:var(--box-shadow-base)}.univer-toolbar-more-container .univer-toolbar-group{flex-wrap:wrap}.univer-toolbar-more-container .univer-toolbar-group:not(:last-child):after{content:initial}.univer-toolbar-more-container .univer-toolbar-group:not(:last-child)>*{margin-bottom:var(--margin-xs)}.univer-toolbar-group{display:flex;gap:var(--margin-xs);align-items:center;flex-shrink:0}.univer-toolbar-group>*{flex-shrink:0}.univer-toolbar-group:not(:last-child,:empty):after{content:"";display:block;width:1px;height:20px;background-color:rgb(var(--border-color));flex-shrink:0}.univer-toolbar-item-select-button{cursor:pointer;position:relative;overflow:hidden;display:flex;gap:var(--margin-xs);align-items:center;height:24px;padding-right:18px;font-size:var(--font-size-lg);border-radius:var(--border-radius-base)}.univer-toolbar-item-select-button-disabled{cursor:not-allowed;color:rgb(var(--grey-200))}.univer-toolbar-item-select-button:hover,.univer-toolbar-item-select-button:hover .univer-toolbar-item-select-button-label{background-color:rgb(var(--grey-100))}.univer-toolbar-item-select-button-label{position:relative;z-index:1;display:flex;align-items:center;height:100%;padding:0 var(--padding-xs)}.univer-toolbar-item-select-button-label:hover{background-color:rgb(var(--grey-300))!important}.univer-toolbar-item-select-button-arrow{position:absolute;top:0;left:0;display:flex;align-items:center;justify-content:flex-end;box-sizing:border-box;width:100%;height:100%;padding-right:var(--padding-xs);font-size:10px;color:rgb(var(--grey-400))}.univer-toolbar-item-select-button-arrow:hover{background-color:rgb(var(--grey-300))}.univer-toolbar-item-select{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)}.univer-toolbar-item-select-disabled{cursor:not-allowed;color:rgb(var(--grey-200))}.univer-toolbar-item-select:hover{background-color:rgb(var(--grey-100));border-radius:var(--border-radius-base)}.univer-toolbar-item-select-arrow{display:flex;align-items:center;height:100%;font-size:10px;color:rgb(var(--grey-400))}.univer-toolbar-item-select-arrow-disabled{cursor:not-allowed;color:rgb(var(--grey-200))}.univer-sidebar{position:relative;transform:translate(100%);box-sizing:border-box;width:0;height:100%;color:rgb(var(--text-color));transition:all .15s}.univer-sidebar.univer-sidebar-open{transform:translate(0);width:380px}.univer-sidebar-container{overflow-y:auto;display:grid;grid-template-rows:auto 1fr auto;box-sizing:border-box;width:100%;height:0;min-height:100%;margin:auto;background-color:rgb(var(--bg-color-secondary));border-bottom:1px solid rgb(var(--border-color));border-left:1px solid rgb(var(--border-color));scrollbar-color:rgba(var(--scrollbar-color),.7) transparent;scrollbar-gutter:auto;scrollbar-width:thin}.univer-sidebar-header{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;height:44px;padding:var(--padding-xl) var(--padding-xl) 0;font-size:var(--font-size-lg);font-weight:500;background:rgb(var(--bg-color-secondary));box-sizing:border-box;z-index:10}.univer-sidebar-header-close{cursor:pointer;color:rgb(var(--text-color-secondary))}.univer-sidebar-body{padding:0 var(--padding-xl);box-sizing:border-box}.univer-sidebar-footer{position:sticky;bottom:0;padding:var(--padding-xl);background:rgb(var(--bg-color-secondary));box-sizing:border-box}.univer-zen-zone{position:absolute;display:none}.univer-zen-zone-open{z-index:100;top:0;left:0;display:block;width:100%;height:100%;background:rgb(var(--bg-color))}.univer-zen-zone-close{display:none}.univer-notification{position:fixed;z-index:1000;display:flex;flex-direction:column;align-items:flex-end;justify-content:center;box-sizing:border-box;margin:var(--margin-xs) 0}.univer-notification-notice{display:flex;gap:var(--margin-xs);justify-content:space-between;width:280px;padding:var(--padding-lg);font-size:var(--font-size-lg);background-color:rgb(var(--color-white));border-radius:var(--border-radius-base);box-shadow:var(--box-shadow-lg)}.univer-notification-notice-wrapper{margin:var(--margin-xs) var(--margin-base)}.univer-notification-notice-content{display:inline-flex;gap:var(--margin-xs);align-items:center;align-items:flex-start}.univer-notification-notice-close{cursor:pointer;display:flex;align-items:center;justify-content:center;width:fit-content;height:fit-content;padding:var(--padding-xs);color:rgb(var(--text-color-secondary));border-radius:var(--border-radius-base);outline:none;transition:background-color .2s}.univer-notification-notice-close:hover{background-color:rgb(var(--bg-color-hover))}.univer-notification-icon{padding:var(--padding-xs)}.univer-notification-icon-success{color:rgb(var(--success-color))}.univer-notification-icon-info{color:rgb(var(--info-color))}.univer-notification-icon-warning{color:rgb(var(--warning-color))}.univer-notification-icon-error{color:rgb(var(--error-color))}.univer-notification-content-container{display:inline-flex;flex-direction:column;gap:var(--margin-xs);align-items:flex-start;padding-top:var(--padding-xs)}.univer-notification-title{color:rgb(var(--text-color))}.univer-notification-content{color:rgb(var(--text-color-secondary))}.univer-notification-content-ellipsis{overflow:hidden;display:-webkit-box;text-overflow:ellipsis;-webkit-box-orient:vertical}.univer-notification-top,.univer-notification-topLeft,.univer-notification-topRight{top:0}.univer-notification-bottom,.univer-notification-bottomRight,.univer-notification-bottomLeft{bottom:0}.univer-notification-bottomRight,.univer-notification-topRight{right:0}.univer-notification-fade{overflow:hidden;transition:all .3s}.univer-notification-fade-appear-prepare{opacity:0}.univer-notification-fade-appear-start{transform:translate(100%);opacity:0}.univer-notification-fade-appear-active{transform:translate(0);opacity:1}.univer-notification-fade-appear,.univer-notification-fade-enter{opacity:0;animation-play-state:paused;animation-duration:.3s;animation-timing-function:cubic-bezier(.55,0,.55,.2);animation-fill-mode:both}.univer-notification-fade-leave{animation-duration:.3s;animation-timing-function:cubic-bezier(.55,0,.55,.2);animation-fill-mode:both;animation-play-state:paused}.univer-notification-fade-appear.univer-notification-fade-appear-active,.univer-notification-fade-enter.univer-notification-fade-enter-active{animation-name:univer-notification-fade-in;animation-play-state:running}.univer-notification-fade-leave.univer-notification-fade-leave-active{animation-name:univer-notification-fade-out;animation-play-state:running}@keyframes univer-notification-fade-in{0%{opacity:0}to{opacity:1}}@keyframes univer-notification-fade-out{0%{opacity:1}to{opacity:0}}.univer-global-zone{position:absolute;display:none}.univer-global-zone-open{z-index:100;top:0;left:0;display:block;width:100%;height:100%;background:rgb(var(--bg-color))}.univer-global-zone-close{display:none}.univer-shortcut-panel-group-title{height:40px;font-size:13px;font-weight:700;line-height:40px}.univer-shortcut-panel-item{display:flex;justify-content:space-between;height:40px;font-size:13px;line-height:40px}.univer-shortcut-panel-item-title{overflow:hidden;flex-grow:1;flex-shrink:1;max-width:200px;text-overflow:ellipsis;text-wrap:nowrap}.univer-shortcut-panel-item-shortcut{flex-grow:0;flex-shrink:0}.univer-shortcut-panel-item:not(:last-of-type){border-bottom:1px solid rgb(var(--grey-200))}.univer-text-editor-container{position:relative;width:100%;height:30px;user-select:none;border:1px solid rgb(var(--border-color));transition:all .15s;border-radius:var(--border-radius-base)}.univer-text-editor-container:hover,.univer-text-editor-container:active,.univer-text-editor-container-active,.univer-text-editor-container-active:hover{border:1px solid rgb(var(--hyacinth-500))}.univer-text-editor-container-error,.univer-text-editor-container-error:hover{border:1px solid rgb(var(--red-400))}.univer-text-editor-container-disabled,.univer-text-editor-container-disabled:hover{border-color:rgb(var(--grey-100))}.univer-text-editor-container-placeholder{position:absolute;top:49%;left:5px;transform:translateY(-50%);color:rgb(var(--grey-400));font-size:var(--font-size-xs);pointer-events:none}.univer-text-editor-validation-error{font-size:10px;color:rgb(var(--red-400))}.univer-range-selector{overflow:hidden;display:flex;align-items:center;justify-content:space-between;color:rgb(var(--grey-600));border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-base);width:220px;height:28px}.univer-range-selector-editor{position:relative;user-select:none;width:100%;height:100%;border:0;outline:0}.univer-range-selector-icon{cursor:pointer;display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;margin-right:4px;font-size:var(--font-size-lg);color:rgb(var(--text-color));background-color:transparent;border:none;border-radius:var(--border-radius-base);outline:none}.univer-range-selector-icon:not([disabled]):hover{background-color:rgb(var(--grey-100))}.univer-range-selector-icon[disabled]{cursor:not-allowed;color:rgb(var(--grey-200))}.univer-range-selector:hover,.univer-range-selector-active{border-color:rgb(var(--hyacinth-500))}.univer-range-selector-active .univer-range-selector-icon{color:rgb(var(--hyacinth-500))}.univer-range-selector-error{border-color:rgb(var(--red-400))}.univer-range-selector-error .univer-range-selector-icon{color:rgb(var(--red-400))}.univer-range-selector-error:hover{border-color:rgb(var(--red-400))}.univer-range-selector-disabled{border-color:rgb(var(--grey-100))}.univer-range-selector-disabled .univer-range-selector-icon{color:rgb(var(--grey-100))}.univer-range-selector-disabled:hover{border-color:rgb(var(--grey-100))}.univer-range-selector-modal{position:relative;max-height:500px;overflow:hidden;overflow-y:auto}.univer-range-selector-modal-container{display:flex;flex-direction:row;align-items:center;margin-bottom:10px}.univer-range-selector-modal-container-input{display:inline-block;width:280px}.univer-range-selector-modal-container-input-active{border-color:rgb(var(--hyacinth-500))}.univer-range-selector-modal-container-button{display:inline-block;text-align:center;width:28px}.univer-range-selector-modal-container-button:hover{cursor:pointer;color:rgb(var(--hyacinth-500))}.univer-range-selector-modal-add{position:relative;width:300px;margin-top:5px;text-align:left;color:rgb(var(--hyacinth-500));font-size:var(--font-size-xs)}.univer-range-selector-modal-add-button{display:flex;align-items:center;justify-content:center}.univer-range-selector-modal-add-button:hover{cursor:pointer;background-color:rgb(var(--hyacinth-500),.05)}
|
|
1
|
+
.univer-ui-plugin-sheets-font-family{overflow:hidden;width:120px;font-size:var(--font-size-xs);text-overflow:ellipsis;white-space:nowrap}.univer-ui-plugin-sheets-font-family-item{font-size:var(--font-size-xs)}.univer-ui-plugin-sheets-font-size{width:28px;height:24px;font-size:var(--font-size-xs)}.univer-ui-plugin-sheets-font-size-input{height:24px;line-height:24px;background-color:transparent;border:none}.univer-ui-plugin-sheets-font-size-input input{font-size:var(--font-size-xs);background-color:transparent}.univer-menu-item-no-hover{background:none}.univer-menu-item-activated{background-color:rgb(var(--bg-color-hover))}.univer-menu-item-content{display:inline-flex;gap:var(--margin-xs);align-items:center}.univer-menu-item-selectable{position:relative;padding-left:var(--padding-xl)}.univer-menu-item-selectable-icon{position:absolute;left:0;display:inline-flex;align-items:center;font-size:var(--font-size-lg)}.univer-menu-item-more-icon{font-size:var(--font-size-sm);color:rgb(var(--text-color))}.univer-app-layout{display:flex;flex-direction:column;height:100%;background-color:rgb(var(--bg-color));min-height:0;position:relative}.univer-app-container{position:relative;display:flex;flex:1;flex-direction:column;min-height:0}.univer-app-container-header{position:relative;z-index:10;width:100%}.univer-app-container-wrapper{display:grid;grid-template-columns:auto 1fr auto;grid-template-rows:100%;height:100%;overflow:hidden}.univer-app-container-content{position:relative;overflow:hidden;display:grid;grid-template-rows:auto 1fr;flex:1;background-color:rgb(var(--bg-color-secondary));border-bottom:1px solid rgb(var(--border-color))}.univer-app-container-canvas{position:relative}.univer-app-container-left-sidebar,.univer-app-container-sidebar{height:100%}.univer-toolbar-btn{cursor:pointer;display:flex;align-items:center;justify-content:center;min-width:24px;height:24px;padding:0;font-size:var(--font-size-lg);color:rgb(var(--text-color));background-color:transparent;border:none;border-radius:var(--border-radius-base);outline:none}.univer-toolbar-btn:not([disabled]):hover{background-color:rgb(var(--grey-100))}.univer-toolbar-btn[disabled]{cursor:not-allowed;color:rgb(var(--grey-200))}.univer-toolbar-btn-active{background-color:rgb(var(--grey-100))}.univer-toolbar-btn-active[disabled]{color:rgba(var(--text-color),.25)}.univer-headerbar{user-select:none;position:relative}.univer-headerbar>.univer-header-menu{position:absolute;top:0;right:0;display:flex;box-sizing:border-box;height:100%}.univer-headerbar>.univer-header-menu>div{user-select:none;display:inline-flex;align-items:center;height:28px;margin-left:4px;padding:2px 4px;text-align:center;border-radius:4px}.univer-headerbar>.univer-header-menu>div:hover{background-color:rgb(var(--grey-300))}.univer-menubar{display:flex;gap:var(--margin-xs);align-items:center;justify-content:center;height:32px}.univer-menubar-item{cursor:pointer;display:block;padding:var(--padding-xs) var(--padding-sm);font-size:var(--font-size-xs);font-weight:400;border-radius:var(--border-radius-base);transition:all .1s ease-in-out}.univer-menubar-item:hover:not(.univer-menubar-item-active){background:rgb(var(--grey-300))}.univer-menubar-item-active{color:rgb(var(--color-white));background:rgb(var(--primary-color))}.univer-toolbar{user-select:none;position:relative;display:flex;align-items:center;box-sizing:border-box;height:32px;font-size:var(--font-size-base);color:rgb(var(--text-color));background-color:rgb(var(--bg-color-secondary));border-bottom:1px solid rgb(var(--border-color))}.univer-toolbar-container{padding:0 var(--padding-lg);display:flex;gap:var(--margin-xs);align-items:center;justify-content:center;box-sizing:border-box;height:100%;margin:0 auto;max-width:100%;overflow:hidden}.univer-toolbar-more{max-width:80%}.univer-toolbar-more-container{display:grid;box-sizing:border-box;padding:var(--padding-sm);background-color:rgb(var(--bg-color-secondary));border-radius:var(--border-radius-base);box-shadow:var(--box-shadow-base)}.univer-toolbar-more-container .univer-toolbar-group{flex-wrap:wrap}.univer-toolbar-more-container .univer-toolbar-group:not(:last-child):after{content:initial}.univer-toolbar-more-container .univer-toolbar-group:not(:last-child)>*{margin-bottom:var(--margin-xs)}.univer-toolbar-group{display:flex;gap:var(--margin-xs);align-items:center;flex-shrink:0}.univer-toolbar-group>*{flex-shrink:0}.univer-toolbar-group:not(:last-child,:empty):after{content:"";display:block;width:1px;height:20px;background-color:rgb(var(--border-color));flex-shrink:0}.univer-toolbar-item-select-button{cursor:pointer;position:relative;overflow:hidden;display:flex;gap:var(--margin-xs);align-items:center;height:24px;padding-right:18px;font-size:var(--font-size-lg);border-radius:var(--border-radius-base)}.univer-toolbar-item-select-button-disabled{cursor:not-allowed;color:rgb(var(--grey-200))}.univer-toolbar-item-select-button-disabled.univer-toolbar-item-select-button-activated{color:rgba(var(--text-color),.25)}.univer-toolbar-item-select-button-disabled.univer-toolbar-item-select-button-activated .univer-toolbar-item-select-button-label:hover,.univer-toolbar-item-select-button-disabled.univer-toolbar-item-select-button-activated .univer-toolbar-item-select-button-arrow:hover{background-color:rgb(var(--grey-100))!important}.univer-toolbar-item-select-button-activated,.univer-toolbar-item-select-button:hover,.univer-toolbar-item-select-button:hover .univer-toolbar-item-select-button-label{background-color:rgb(var(--grey-100))}.univer-toolbar-item-select-button-label{position:relative;z-index:1;display:flex;align-items:center;height:100%;padding:0 var(--padding-xs)}.univer-toolbar-item-select-button-label:hover{background-color:rgb(var(--grey-300))!important}.univer-toolbar-item-select-button-arrow{position:absolute;top:0;left:0;display:flex;align-items:center;justify-content:flex-end;box-sizing:border-box;width:100%;height:100%;padding-right:var(--padding-xs);font-size:10px;color:rgb(var(--grey-400))}.univer-toolbar-item-select-button-arrow:hover{background-color:rgb(var(--grey-300))}.univer-toolbar-item-select{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)}.univer-toolbar-item-select-disabled{cursor:not-allowed;color:rgb(var(--grey-200))}.univer-toolbar-item-select-disabled.univer-toolbar-item-select-activated{color:rgba(var(--text-color),.25)}.univer-toolbar-item-select-disabled.univer-toolbar-item-select-activated:hover,.univer-toolbar-item-select-activated{background-color:rgb(var(--grey-100))}.univer-toolbar-item-select:hover{background-color:rgb(var(--grey-100));border-radius:var(--border-radius-base)}.univer-toolbar-item-select-arrow{display:flex;align-items:center;height:100%;font-size:10px;color:rgb(var(--grey-400))}.univer-toolbar-item-select-arrow-disabled{cursor:not-allowed;color:rgb(var(--grey-200))}.univer-toolbar-item-select-arrow-disabled.univer-toolbar-item-select-arrow-activated{color:rgba(var(--text-color),.25)}.univer-toolbar-item-select-arrow-disabled.univer-toolbar-item-select-arrow-activated:hover,.univer-toolbar-item-select-arrow-activated{background-color:rgb(var(--grey-100))}.univer-sidebar{position:relative;transform:translate(100%);box-sizing:border-box;width:0;height:100%;color:rgb(var(--text-color));transition:all .15s}.univer-sidebar.univer-sidebar-open{transform:translate(0);width:380px}.univer-sidebar-container{overflow-y:auto;display:grid;grid-template-rows:auto 1fr auto;box-sizing:border-box;width:100%;height:0;min-height:100%;margin:auto;background-color:rgb(var(--bg-color-secondary));border-bottom:1px solid rgb(var(--border-color));border-left:1px solid rgb(var(--border-color));scrollbar-color:rgba(var(--scrollbar-color),.7) transparent;scrollbar-gutter:auto;scrollbar-width:thin}.univer-sidebar-header{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;height:44px;padding:var(--padding-xl) var(--padding-xl) 0;font-size:var(--font-size-lg);font-weight:500;background:rgb(var(--bg-color-secondary));box-sizing:border-box;z-index:10}.univer-sidebar-header-close{cursor:pointer;color:rgb(var(--text-color-secondary))}.univer-sidebar-body{padding:0 var(--padding-xl);box-sizing:border-box}.univer-sidebar-footer{position:sticky;bottom:0;padding:var(--padding-xl);background:rgb(var(--bg-color-secondary));box-sizing:border-box}.univer-zen-zone{position:absolute;display:none}.univer-zen-zone-open{z-index:100;top:0;left:0;display:block;width:100%;height:100%;background:rgb(var(--bg-color))}.univer-zen-zone-close{display:none}.univer-notification{position:fixed;z-index:1000;display:flex;flex-direction:column;align-items:flex-end;justify-content:center;box-sizing:border-box;margin:var(--margin-xs) 0}.univer-notification-notice{display:flex;gap:var(--margin-xs);justify-content:space-between;width:280px;padding:var(--padding-lg);font-size:var(--font-size-lg);background-color:rgb(var(--color-white));border-radius:var(--border-radius-base);box-shadow:var(--box-shadow-lg)}.univer-notification-notice-wrapper{margin:var(--margin-xs) var(--margin-base)}.univer-notification-notice-content{display:inline-flex;gap:var(--margin-xs);align-items:center;align-items:flex-start}.univer-notification-notice-close{cursor:pointer;display:flex;align-items:center;justify-content:center;width:fit-content;height:fit-content;padding:var(--padding-xs);color:rgb(var(--text-color-secondary));border-radius:var(--border-radius-base);outline:none;transition:background-color .2s}.univer-notification-notice-close:hover{background-color:rgb(var(--bg-color-hover))}.univer-notification-icon{padding:var(--padding-xs)}.univer-notification-icon-success{color:rgb(var(--success-color))}.univer-notification-icon-info{color:rgb(var(--info-color))}.univer-notification-icon-warning{color:rgb(var(--warning-color))}.univer-notification-icon-error{color:rgb(var(--error-color))}.univer-notification-content-container{display:inline-flex;flex-direction:column;gap:var(--margin-xs);align-items:flex-start;padding-top:var(--padding-xs)}.univer-notification-title{color:rgb(var(--text-color))}.univer-notification-content{color:rgb(var(--text-color-secondary))}.univer-notification-content-ellipsis{overflow:hidden;display:-webkit-box;text-overflow:ellipsis;-webkit-box-orient:vertical}.univer-notification-top,.univer-notification-topLeft,.univer-notification-topRight{top:0}.univer-notification-bottom,.univer-notification-bottomRight,.univer-notification-bottomLeft{bottom:0}.univer-notification-bottomRight,.univer-notification-topRight{right:0}.univer-notification-fade{overflow:hidden;transition:all .3s}.univer-notification-fade-appear-prepare{opacity:0}.univer-notification-fade-appear-start{transform:translate(100%);opacity:0}.univer-notification-fade-appear-active{transform:translate(0);opacity:1}.univer-notification-fade-appear,.univer-notification-fade-enter{opacity:0;animation-play-state:paused;animation-duration:.3s;animation-timing-function:cubic-bezier(.55,0,.55,.2);animation-fill-mode:both}.univer-notification-fade-leave{animation-duration:.3s;animation-timing-function:cubic-bezier(.55,0,.55,.2);animation-fill-mode:both;animation-play-state:paused}.univer-notification-fade-appear.univer-notification-fade-appear-active,.univer-notification-fade-enter.univer-notification-fade-enter-active{animation-name:univer-notification-fade-in;animation-play-state:running}.univer-notification-fade-leave.univer-notification-fade-leave-active{animation-name:univer-notification-fade-out;animation-play-state:running}@keyframes univer-notification-fade-in{0%{opacity:0}to{opacity:1}}@keyframes univer-notification-fade-out{0%{opacity:1}to{opacity:0}}.univer-global-zone{position:absolute;display:none}.univer-global-zone-open{z-index:100;top:0;left:0;display:block;width:100%;height:100%;background:rgb(var(--bg-color))}.univer-global-zone-close{display:none}.univer-shortcut-panel-group-title{height:40px;font-size:13px;font-weight:700;line-height:40px}.univer-shortcut-panel-item{display:flex;justify-content:space-between;height:40px;font-size:13px;line-height:40px}.univer-shortcut-panel-item-title{overflow:hidden;flex-grow:1;flex-shrink:1;max-width:200px;text-overflow:ellipsis;text-wrap:nowrap}.univer-shortcut-panel-item-shortcut{flex-grow:0;flex-shrink:0}.univer-shortcut-panel-item:not(:last-of-type){border-bottom:1px solid rgb(var(--grey-200))}.univer-text-editor-container{position:relative;width:100%;height:30px;user-select:none;border:1px solid rgb(var(--border-color));transition:all .15s;border-radius:var(--border-radius-base)}.univer-text-editor-container:hover,.univer-text-editor-container:active,.univer-text-editor-container-active,.univer-text-editor-container-active:hover{border:1px solid rgb(var(--hyacinth-500))}.univer-text-editor-container-error,.univer-text-editor-container-error:hover{border:1px solid rgb(var(--red-400))}.univer-text-editor-container-disabled,.univer-text-editor-container-disabled:hover{border-color:rgb(var(--grey-100))}.univer-text-editor-container-placeholder{position:absolute;top:49%;left:5px;transform:translateY(-50%);color:rgb(var(--grey-400));font-size:var(--font-size-xs);pointer-events:none}.univer-text-editor-validation-error{font-size:10px;color:rgb(var(--red-400))}.univer-range-selector{overflow:hidden;display:flex;align-items:center;justify-content:space-between;color:rgb(var(--grey-600));border:1px solid rgb(var(--border-color));border-radius:var(--border-radius-base);width:220px;height:28px}.univer-range-selector-editor{position:relative;user-select:none;width:100%;height:100%;border:0;outline:0}.univer-range-selector-icon{cursor:pointer;display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;margin-right:4px;font-size:var(--font-size-lg);color:rgb(var(--text-color));background-color:transparent;border:none;border-radius:var(--border-radius-base);outline:none}.univer-range-selector-icon:not([disabled]):hover{background-color:rgb(var(--grey-100))}.univer-range-selector-icon[disabled]{cursor:not-allowed;color:rgb(var(--grey-200))}.univer-range-selector:hover,.univer-range-selector-active{border-color:rgb(var(--hyacinth-500))}.univer-range-selector-active .univer-range-selector-icon{color:rgb(var(--hyacinth-500))}.univer-range-selector-error{border-color:rgb(var(--red-400))}.univer-range-selector-error .univer-range-selector-icon{color:rgb(var(--red-400))}.univer-range-selector-error:hover{border-color:rgb(var(--red-400))}.univer-range-selector-disabled{border-color:rgb(var(--grey-100))}.univer-range-selector-disabled .univer-range-selector-icon{color:rgb(var(--grey-100))}.univer-range-selector-disabled:hover{border-color:rgb(var(--grey-100))}.univer-range-selector-modal{position:relative;max-height:500px;overflow:hidden;overflow-y:auto}.univer-range-selector-modal-container{display:flex;flex-direction:row;align-items:center;margin-bottom:10px}.univer-range-selector-modal-container-input{display:inline-block;width:280px}.univer-range-selector-modal-container-input-active{border-color:rgb(var(--hyacinth-500))}.univer-range-selector-modal-container-button{display:inline-block;text-align:center;width:28px}.univer-range-selector-modal-container-button:hover{cursor:pointer;color:rgb(var(--hyacinth-500))}.univer-range-selector-modal-add{position:relative;width:300px;margin-top:5px;text-align:left;color:rgb(var(--hyacinth-500));font-size:var(--font-size-xs)}.univer-range-selector-modal-add-button{display:flex;align-items:center;justify-content:center}.univer-range-selector-modal-add-button:hover{cursor:pointer;background-color:rgb(var(--hyacinth-500),.05)}.univer-progress-bar{margin:12px 8px 0;width:160px;height:4px;background-color:rgb(var(--border-color));border-radius:var(--border-radius-lg)}.univer-progress-bar-inner{height:4px;border-radius:var(--border-radius-lg);transition:width .5s}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { IDisposable } from '@wendellhu/redi';
|
|
2
2
|
|
|
3
|
-
export declare function
|
|
3
|
+
export declare function fromGlobalEvent<K extends keyof WindowEventMap>(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, options?: boolean | AddEventListenerOptions): IDisposable;
|
|
4
4
|
export declare function fromEvent<K extends keyof HTMLElementEventMap>(target: HTMLElement, type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): IDisposable;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { IUnitRangeWithName, Nullable } from '@univerjs/core';
|
|
3
3
|
|
|
4
4
|
export interface IRangeSelectorProps {
|
|
5
5
|
id: string;
|
|
6
6
|
value?: string;
|
|
7
|
-
onChange?: (ranges:
|
|
7
|
+
onChange?: (ranges: IUnitRangeWithName[]) => void;
|
|
8
8
|
onActive?: (state: boolean) => void;
|
|
9
9
|
onValid?: (state: boolean) => void;
|
|
10
10
|
isSingleChoice?: boolean;
|
|
@@ -4,7 +4,7 @@ import { Observable } from 'rxjs';
|
|
|
4
4
|
import { ComponentType, default as React } from 'react';
|
|
5
5
|
import { IDisposable, Injector } from '@wendellhu/redi';
|
|
6
6
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
7
|
-
import { Disposable, LifecycleService } from '@univerjs/core';
|
|
7
|
+
import { Disposable, IUniverInstanceService, LifecycleService } from '@univerjs/core';
|
|
8
8
|
|
|
9
9
|
export declare enum DesktopUIPart {
|
|
10
10
|
HEADER = "header",
|
|
@@ -19,16 +19,16 @@ export interface IDesktopUIController extends IUIController {
|
|
|
19
19
|
getComponents(part: DesktopUIPart): Set<() => ComponentType>;
|
|
20
20
|
}
|
|
21
21
|
export declare class DesktopUIController extends Disposable implements IDesktopUIController {
|
|
22
|
+
private readonly _instanceService;
|
|
23
|
+
private readonly _renderManagerService;
|
|
22
24
|
private readonly _injector;
|
|
23
25
|
private readonly _lifecycleService;
|
|
24
|
-
private readonly _renderManagerService;
|
|
25
26
|
private readonly _layoutService?;
|
|
26
27
|
private _componentsByPart;
|
|
27
28
|
private readonly _componentRegistered$;
|
|
28
29
|
readonly componentRegistered$: Observable<void>;
|
|
29
|
-
constructor(_injector: Injector, _lifecycleService: LifecycleService,
|
|
30
|
+
constructor(_instanceService: IUniverInstanceService, _renderManagerService: IRenderManagerService, _injector: Injector, _lifecycleService: LifecycleService, _layoutService?: ILayoutService | undefined);
|
|
30
31
|
bootstrapWorkbench(options: IWorkbenchOptions): void;
|
|
31
32
|
registerComponent(part: DesktopUIPart, component: () => React.ComponentType): IDisposable;
|
|
32
33
|
getComponents(part: DesktopUIPart): Set<() => ComponentType>;
|
|
33
|
-
private _initializeEngine;
|
|
34
34
|
}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -20,8 +20,8 @@ export { t } from './components/hooks/locale';
|
|
|
20
20
|
export { useObservable } from './components/hooks/observable';
|
|
21
21
|
export { useEvent } from './components/hooks/event';
|
|
22
22
|
export { CopyShortcutItem, CutShortcutItem, RedoShortcutItem, SharedController, UndoShortcutItem, } from './controllers/shared-shortcut.controller';
|
|
23
|
-
export { IUIController } from './controllers/ui/ui.controller';
|
|
24
|
-
export { DesktopUIPart, type IDesktopUIController } from './controllers/ui/ui-desktop.controller';
|
|
23
|
+
export { IUIController, type IWorkbenchOptions } from './controllers/ui/ui.controller';
|
|
24
|
+
export { DesktopUIController, DesktopUIPart, type IDesktopUIController } from './controllers/ui/ui-desktop.controller';
|
|
25
25
|
export { enUS, zhCN } from './locale';
|
|
26
26
|
export { DesktopBeforeCloseService, IBeforeCloseService } from './services/before-close/before-close.service';
|
|
27
27
|
export { CopyCommand, CutCommand, PasteCommand } from './services/clipboard/clipboard.command';
|
|
@@ -57,3 +57,5 @@ export { IRangeSelectorService } from './services/range-selector/range-selector.
|
|
|
57
57
|
export { DesktopLocalStorageService } from './services/local-storage/local-storage.service';
|
|
58
58
|
export { useActiveWorkbook, useActiveWorksheet } from './views/hooks/active';
|
|
59
59
|
export { CanvasPopupService, ICanvasPopupService } from './services/popup/canvas-popup.service';
|
|
60
|
+
export { ProgressBar } from './components/progress-bar/ProgressBar';
|
|
61
|
+
export { IProgressService } from './services/progress/progress.service';
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LexerTreeBuilder } from '@univerjs/engine-formula';
|
|
2
2
|
import { IRender, ISuccinctTextRangeParam, IRenderManagerService } from '@univerjs/engine-render';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
|
-
import { IDisposable } from '@wendellhu/redi';
|
|
4
|
+
import { IDisposable, Injector } from '@wendellhu/redi';
|
|
5
5
|
import { DocumentDataModel, IDocumentBody, IDocumentData, IPosition, Nullable, Disposable, IContextService, IUniverInstanceService } from '@univerjs/core';
|
|
6
6
|
|
|
7
7
|
export interface IEditorStateParam extends Partial<IPosition> {
|
|
@@ -123,7 +123,8 @@ export interface IEditorService {
|
|
|
123
123
|
getFocusEditor(): Readonly<Nullable<Editor>>;
|
|
124
124
|
}
|
|
125
125
|
export declare class EditorService extends Disposable implements IEditorService, IDisposable {
|
|
126
|
-
private readonly
|
|
126
|
+
private readonly _injector;
|
|
127
|
+
private readonly _univerInstanceService;
|
|
127
128
|
private readonly _renderManagerService;
|
|
128
129
|
private readonly _lexerTreeBuilder;
|
|
129
130
|
private readonly _contextService;
|
|
@@ -152,7 +153,7 @@ export declare class EditorService extends Disposable implements IEditorService,
|
|
|
152
153
|
private readonly _singleSelection$;
|
|
153
154
|
readonly singleSelection$: Observable<boolean>;
|
|
154
155
|
private _spreadsheetFocusState;
|
|
155
|
-
constructor(
|
|
156
|
+
constructor(_injector: Injector, _univerInstanceService: IUniverInstanceService, _renderManagerService: IRenderManagerService, _lexerTreeBuilder: LexerTreeBuilder, _contextService: IContextService);
|
|
156
157
|
setFocusId(id: Nullable<string>): void;
|
|
157
158
|
getFocusId(): Nullable<string>;
|
|
158
159
|
getFocusEditor(): Readonly<Nullable<Editor>>;
|
|
@@ -8,7 +8,9 @@ export declare class DesktopGlobalZoneService implements IGlobalZoneService {
|
|
|
8
8
|
private readonly _componentManager;
|
|
9
9
|
readonly visible$: Subject<boolean>;
|
|
10
10
|
readonly componentKey$: Subject<string>;
|
|
11
|
+
private _componentKey;
|
|
11
12
|
constructor(_componentManager: ComponentManager);
|
|
13
|
+
get componentKey(): string;
|
|
12
14
|
set(key: string, component: ForwardRefExoticComponent<any>): IDisposable;
|
|
13
15
|
open(): void;
|
|
14
16
|
close(): void;
|
|
@@ -5,6 +5,7 @@ export declare const IGlobalZoneService: import('@wendellhu/redi').IdentifierDec
|
|
|
5
5
|
export interface IGlobalZoneService {
|
|
6
6
|
readonly visible$: Subject<boolean>;
|
|
7
7
|
readonly componentKey$: Subject<string>;
|
|
8
|
+
get componentKey(): string;
|
|
8
9
|
set(key: string, component: any): IDisposable;
|
|
9
10
|
open(): void;
|
|
10
11
|
close(): void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IEditorService } from '../editor/editor.service';
|
|
1
2
|
import { IDisposable } from '@wendellhu/redi';
|
|
2
3
|
import { ContextService, Disposable, ILogService, IUniverInstanceService, UniverInstanceType } from '@univerjs/core';
|
|
3
4
|
|
|
@@ -27,13 +28,14 @@ export declare class DesktopLayoutService extends Disposable implements ILayoutS
|
|
|
27
28
|
private readonly _contextService;
|
|
28
29
|
private readonly _univerInstanceService;
|
|
29
30
|
private readonly _logService;
|
|
31
|
+
private readonly _editorService;
|
|
30
32
|
private _rootContainerElement;
|
|
31
33
|
private _isFocused;
|
|
32
34
|
get isFocused(): boolean;
|
|
33
35
|
private readonly _focusHandlers;
|
|
34
36
|
private _canvasContainers;
|
|
35
37
|
private _allContainers;
|
|
36
|
-
constructor(_contextService: ContextService, _univerInstanceService: IUniverInstanceService, _logService: ILogService);
|
|
38
|
+
constructor(_contextService: ContextService, _univerInstanceService: IUniverInstanceService, _logService: ILogService, _editorService: IEditorService);
|
|
37
39
|
focus(): void;
|
|
38
40
|
registerFocusHandler(type: UniverInstanceType, handler: FocusHandlerFn): IDisposable;
|
|
39
41
|
registerCanvasElement(container: HTMLCanvasElement): IDisposable;
|
|
@@ -43,5 +45,6 @@ export declare class DesktopLayoutService extends Disposable implements ILayoutS
|
|
|
43
45
|
checkCanvasIsFocused(): boolean;
|
|
44
46
|
private _initUniverFocusListener;
|
|
45
47
|
private _initEditorStatus;
|
|
48
|
+
private _blurSheetEditor;
|
|
46
49
|
}
|
|
47
50
|
export {};
|
|
@@ -2,7 +2,7 @@ import { Observable } from 'rxjs';
|
|
|
2
2
|
import { IAccessor } from '@wendellhu/redi';
|
|
3
3
|
|
|
4
4
|
export type OneOrMany<T> = T | T[];
|
|
5
|
-
export declare
|
|
5
|
+
export declare enum MenuPosition {
|
|
6
6
|
VOID = "void",
|
|
7
7
|
TOOLBAR_START = "uiToolbar.start",
|
|
8
8
|
TOOLBAR_INSERT = "uiToolbar.insert",
|
|
@@ -12,7 +12,7 @@ export declare const enum MenuPosition {
|
|
|
12
12
|
TOOLBAR_OTHERS = "uiToolbar.others",
|
|
13
13
|
CONTEXT_MENU = "contextMenu"
|
|
14
14
|
}
|
|
15
|
-
export declare
|
|
15
|
+
export declare enum MenuGroup {
|
|
16
16
|
TOOLBAR_HISTORY = 0,
|
|
17
17
|
TOOLBAR_FORMAT = 1,
|
|
18
18
|
TOOLBAR_LAYOUT = 2,
|
|
@@ -25,7 +25,7 @@ export declare const enum MenuGroup {
|
|
|
25
25
|
CONTEXT_MENU_DATA = 9,
|
|
26
26
|
CONTEXT_MENU_OTHERS = 10
|
|
27
27
|
}
|
|
28
|
-
export declare
|
|
28
|
+
export declare enum MenuItemType {
|
|
29
29
|
/** Button style menu item. */
|
|
30
30
|
BUTTON = 0,
|
|
31
31
|
/** Menu item with submenus. Submenus could be other IMenuItem or an ID of a registered component. */
|
|
@@ -47,7 +47,6 @@ interface IMenuItemBase<V> {
|
|
|
47
47
|
group?: MenuGroup;
|
|
48
48
|
/** In what menu should the item display. */
|
|
49
49
|
positions: OneOrMany<MenuPosition | string>;
|
|
50
|
-
/** @deprecated this type seems unnecessary */
|
|
51
50
|
type: MenuItemType;
|
|
52
51
|
/**
|
|
53
52
|
* Custom label component id.
|
|
@@ -90,6 +89,8 @@ export interface IMenuSelectorItem<V = MenuItemDefaultValueType, T = undefined>
|
|
|
90
89
|
type: MenuItemType.SELECTOR | MenuItemType.BUTTON_SELECTOR | MenuItemType.SUBITEMS;
|
|
91
90
|
/** Options or IDs of registered components. */
|
|
92
91
|
selections?: Array<IValueOption<T>> | Observable<Array<IValueOption<T>>>;
|
|
92
|
+
/** If `type` is `MenuItemType.BUTTON_SELECTOR`, this determines if the button is activated. */
|
|
93
|
+
activated$?: Observable<boolean>;
|
|
93
94
|
}
|
|
94
95
|
export declare function isMenuSelectorItem<T extends MenuItemDefaultValueType>(v: IMenuItem): v is IMenuSelectorItem<T>;
|
|
95
96
|
export type MenuItemDefaultValueType = string | number | undefined;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IMessageService } from '../message.service';
|
|
2
|
+
import { IDisposable } from '@wendellhu/redi';
|
|
3
|
+
import { IMessageMethodOptions, IMessageProps } from '@univerjs/design';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* This is a mocked message service for testing purposes.
|
|
7
|
+
*/
|
|
8
|
+
export declare class MockMessageService implements IMessageService {
|
|
9
|
+
show(_options: IMessageMethodOptions & Omit<IMessageProps, 'key'>): IDisposable;
|
|
10
|
+
setContainer(): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { IDisposable } from '@wendellhu/redi';
|
|
3
|
+
import { Disposable } from '@univerjs/core';
|
|
4
|
+
|
|
5
|
+
export interface IProgressCount {
|
|
6
|
+
count: number;
|
|
7
|
+
}
|
|
8
|
+
export interface IProgressStep {
|
|
9
|
+
step: number;
|
|
10
|
+
}
|
|
11
|
+
export interface IProgressService {
|
|
12
|
+
progressChange$: Observable<IProgressStep>;
|
|
13
|
+
progressVisible$: Observable<boolean>;
|
|
14
|
+
/**
|
|
15
|
+
* Append subtask quantity during loading, when the number of added subtasks reaches the total number of tasks, the loading is completed.
|
|
16
|
+
* @param task
|
|
17
|
+
*/
|
|
18
|
+
pushTask(task: IProgressCount): void;
|
|
19
|
+
/**
|
|
20
|
+
* Insert a new number of tasks, do not set the start loading mechanism, when insertTaskCount finds that the original number of tasks is 0, it starts loading
|
|
21
|
+
* @param count
|
|
22
|
+
*/
|
|
23
|
+
insertTaskCount(count: number): void;
|
|
24
|
+
/**
|
|
25
|
+
* Complete loading, hide the progress bar after automatically progressing to 100%
|
|
26
|
+
*/
|
|
27
|
+
complete(): void;
|
|
28
|
+
/**
|
|
29
|
+
* Interrupt and hide the progress bar directly
|
|
30
|
+
*/
|
|
31
|
+
stop(): void;
|
|
32
|
+
}
|
|
33
|
+
export declare class ProgressService extends Disposable implements IProgressService, IDisposable {
|
|
34
|
+
/**
|
|
35
|
+
* The total number of tasks remaining
|
|
36
|
+
*/
|
|
37
|
+
private _taskCount;
|
|
38
|
+
private readonly _progressChange$;
|
|
39
|
+
private readonly _progressVisible$;
|
|
40
|
+
readonly progressChange$: Observable<IProgressStep>;
|
|
41
|
+
readonly progressVisible$: Observable<boolean>;
|
|
42
|
+
dispose(): void;
|
|
43
|
+
pushTask(task: IProgressCount): void;
|
|
44
|
+
insertTaskCount(count: number): void;
|
|
45
|
+
complete(): void;
|
|
46
|
+
stop(): void;
|
|
47
|
+
private _clear;
|
|
48
|
+
}
|
|
49
|
+
export declare const IProgressService: import('@wendellhu/redi').IdentifierDecorator<IProgressService>;
|
package/lib/types/ui-plugin.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IWorkbenchOptions } from './controllers/ui/ui.controller';
|
|
2
2
|
import { Injector } from '@wendellhu/redi';
|
|
3
|
-
import { IContextService, LocaleService, Plugin
|
|
3
|
+
import { IContextService, LocaleService, Plugin } from '@univerjs/core';
|
|
4
4
|
|
|
5
5
|
export interface IUniverUIConfig extends IWorkbenchOptions {
|
|
6
6
|
/** Disable auto focus when Univer bootstraps. */
|
|
@@ -15,10 +15,9 @@ export declare class UniverUIPlugin extends Plugin {
|
|
|
15
15
|
private readonly _contextService;
|
|
16
16
|
protected readonly _injector: Injector;
|
|
17
17
|
private readonly _localeService;
|
|
18
|
-
static
|
|
18
|
+
static pluginName: string;
|
|
19
19
|
constructor(_config: Partial<IUniverUIConfig>, _contextService: IContextService, _injector: Injector, _localeService: LocaleService);
|
|
20
20
|
onStarting(_injector: Injector): void;
|
|
21
|
-
onReady(): void;
|
|
22
21
|
private _initDependencies;
|
|
23
22
|
private _initUI;
|
|
24
23
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { IDocumentData, IRange, IStyleData } from '@univerjs/core';
|
|
2
2
|
|
|
3
|
+
export declare const DEFAULT_BACKGROUND_COLOR_RGBA = "rgba(0,0,0,0)";
|
|
4
|
+
export declare const DEFAULT_BACKGROUND_COLOR_RGB = "rgb(0,0,0)";
|
|
3
5
|
/**
|
|
4
6
|
* The entire list of DOM spans is parsed into a rich-text JSON style sheet
|
|
5
7
|
* @param $dom
|
|
@@ -11,7 +13,7 @@ export declare function handleDomToJson($dom: HTMLElement): IDocumentData | stri
|
|
|
11
13
|
* @param $dom
|
|
12
14
|
* @returns
|
|
13
15
|
*/
|
|
14
|
-
export declare function handleStringToStyle($dom?: HTMLElement, cssStyle?: string): IStyleData
|
|
16
|
+
export declare function handleStringToStyle($dom?: HTMLElement, cssStyle?: string): IStyleData & Record<string, unknown>;
|
|
15
17
|
/**
|
|
16
18
|
* split span text
|
|
17
19
|
* @param text
|