@univerjs/ui 0.1.16 → 0.2.0
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 +4560 -4277
- package/lib/index.css +1 -1
- package/lib/types/common/component-manager.d.ts +1 -1
- package/lib/types/common/menu-hidden-observable.d.ts +1 -0
- package/lib/types/components/index.d.ts +1 -1
- package/lib/types/components/menu/common/hook.d.ts +3 -0
- package/lib/types/components/menu/{Menu.d.ts → desktop/Menu.d.ts} +1 -1
- package/lib/types/components/menu/mobile/MobileMenu.d.ts +7 -0
- package/lib/types/components/menu/mobile/MobileMenu.stories.d.ts +8 -0
- package/lib/types/controllers/shared-shortcut.controller.d.ts +1 -1
- package/lib/types/controllers/ui/ui-desktop.controller.d.ts +6 -5
- package/lib/types/controllers/ui/ui-mobile.controller.d.ts +19 -0
- package/lib/types/controllers/ui/ui.controller.d.ts +2 -1
- package/lib/types/index.d.ts +13 -8
- package/lib/types/mobile-ui-plugin.d.ts +15 -0
- package/lib/types/services/contextmenu/contextmenu.service.d.ts +1 -1
- package/lib/types/services/editor/editor.service.d.ts +2 -3
- package/lib/types/services/layout/layout.service.d.ts +4 -3
- package/lib/types/services/menu/menu.service.d.ts +1 -1
- package/lib/types/services/platform/platform.service.d.ts +1 -1
- package/lib/types/services/popup/canvas-popup.service.d.ts +2 -0
- package/lib/types/services/shortcut/shortcut.service.d.ts +1 -1
- package/lib/types/ui-plugin.d.ts +3 -7
- package/lib/types/views/DesktopApp.d.ts +8 -0
- package/lib/types/views/{App.d.ts → MobileApp.d.ts} +1 -1
- package/lib/types/views/components/ComponentContainer.d.ts +1 -1
- package/lib/types/views/components/context-menu/ContextMenu.d.ts +1 -1
- package/lib/types/views/components/context-menu/MobileContextMenu.d.ts +3 -0
- package/lib/umd/index.js +14 -14
- package/package.json +16 -16
- package/lib/types/components/menu/index.d.ts +0 -16
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,.univer-menu-item-no-hover.univer-menu-item-active{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;overflow:hidden}.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);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%;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-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-float-dom-wrapper{z-index:10}.univer-float-dom{overflow:hidden}.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-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-container-delete-button{margin:auto}.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 .univer-range-selector-modal-add-button{display:flex;align-items:center;justify-content:center}.univer-range-selector-modal-add .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
|
+
.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-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);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%;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-menu-item-no-hover,.univer-menu-item-no-hover.univer-menu-item-active{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-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-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-float-dom-wrapper{z-index:10}.univer-float-dom{overflow:hidden}.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-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-app-layout{display:flex;flex-direction:column;height:100%;background-color:rgb(var(--bg-color));min-height:0;position:relative}.univer-app-header{width:100vw}.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;overflow:hidden}.univer-app-container-left-sidebar,.univer-app-container-sidebar{height:100%}.univer-mobile-menu-container{min-width:32px;max-width:200px;display:grid;grid-gap:4px;background-color:#000;border-radius:4px;padding:4px 8px}.univer-mobile-menu-item{display:flex;flex-direction:column;justify-content:center;align-items:center;border:none;background:none;color:#fff;width:48px}.univer-mobile-menu-item>svg{font-size:18px;height:18px;width:18px}.univer-mobile-menu-item>span{width:100%;margin-top:2px;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.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-container-delete-button{margin:auto}.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 .univer-range-selector-modal-add-button{display:flex;align-items:center;justify-content:center}.univer-range-selector-modal-add .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}
|
|
@@ -21,7 +21,7 @@ export declare class ComponentManager {
|
|
|
21
21
|
constructor();
|
|
22
22
|
register(name: string, component: ComponentType, options?: IComponentOptions): IDisposable;
|
|
23
23
|
get(name: string): React.ForwardRefExoticComponent<any> | ((props: any) => React.FunctionComponentElement<{
|
|
24
|
-
component:
|
|
24
|
+
component: ReturnType<typeof defineComponent>;
|
|
25
25
|
props: Record<string, any>;
|
|
26
26
|
}>) | undefined;
|
|
27
27
|
delete(name: string): void;
|
|
@@ -3,3 +3,4 @@ import { IAccessor } from '@wendellhu/redi';
|
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
|
|
5
5
|
export declare function getMenuHiddenObservable(accessor: IAccessor, targetUniverType: UniverInstanceType): Observable<boolean>;
|
|
6
|
+
export declare function getHeaderFooterMenuHiddenObservable(accessor: IAccessor): Observable<boolean>;
|
|
@@ -21,7 +21,7 @@ export declare class SharedController extends Disposable {
|
|
|
21
21
|
private readonly _menuService;
|
|
22
22
|
private readonly _shortcutService;
|
|
23
23
|
private readonly _commandService;
|
|
24
|
-
constructor(_config:
|
|
24
|
+
constructor(_config: Pick<IUniverUIConfig, 'menu'> | undefined, _injector: Injector, _menuService: IMenuService, _shortcutService: IShortcutService, _commandService: ICommandService);
|
|
25
25
|
initialize(): void;
|
|
26
26
|
private _registerMenus;
|
|
27
27
|
private _registerCommands;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { Disposable,
|
|
1
|
+
import { Disposable, IConfigService, LifecycleService } from '@univerjs/core';
|
|
2
2
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
3
3
|
import { Injector } from '@wendellhu/redi';
|
|
4
4
|
import { ILayoutService } from '../../services/layout/layout.service';
|
|
5
5
|
import { IUIPartsService } from '../../services/parts/parts.service';
|
|
6
|
-
import {
|
|
6
|
+
import { IUniverUIConfig } from './ui.controller';
|
|
7
7
|
|
|
8
8
|
export declare class DesktopUIController extends Disposable {
|
|
9
|
-
private readonly
|
|
9
|
+
private readonly _config;
|
|
10
10
|
private readonly _renderManagerService;
|
|
11
11
|
private readonly _injector;
|
|
12
12
|
private readonly _lifecycleService;
|
|
13
13
|
private readonly _uiPartsService;
|
|
14
|
+
private readonly _configService;
|
|
14
15
|
private readonly _layoutService?;
|
|
15
|
-
constructor(
|
|
16
|
-
|
|
16
|
+
constructor(_config: IUniverUIConfig, _renderManagerService: IRenderManagerService, _injector: Injector, _lifecycleService: LifecycleService, _uiPartsService: IUIPartsService, _configService: IConfigService, _layoutService?: ILayoutService | undefined);
|
|
17
|
+
private _bootstrapWorkbench;
|
|
17
18
|
private _initBuiltinComponents;
|
|
18
19
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Disposable, IUniverInstanceService, LifecycleService } from '@univerjs/core';
|
|
2
|
+
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
3
|
+
import { Injector } from '@wendellhu/redi';
|
|
4
|
+
import { ILayoutService } from '../../services/layout/layout.service';
|
|
5
|
+
import { IUIPartsService } from '../../services/parts/parts.service';
|
|
6
|
+
import { IUIController, IUniverUIConfig } from './ui.controller';
|
|
7
|
+
|
|
8
|
+
export declare class MobileUIController extends Disposable implements IUIController {
|
|
9
|
+
private readonly _config;
|
|
10
|
+
private readonly _instanceService;
|
|
11
|
+
private readonly _renderManagerService;
|
|
12
|
+
private readonly _injector;
|
|
13
|
+
private readonly _lifecycleService;
|
|
14
|
+
private readonly _uiPartsService;
|
|
15
|
+
private readonly _layoutService?;
|
|
16
|
+
constructor(_config: IUniverUIConfig, _instanceService: IUniverInstanceService, _renderManagerService: IRenderManagerService, _injector: Injector, _lifecycleService: LifecycleService, _uiPartsService: IUIPartsService, _layoutService?: ILayoutService | undefined);
|
|
17
|
+
private _bootstrapWorkbench;
|
|
18
|
+
private _initBuiltinComponents;
|
|
19
|
+
}
|
|
@@ -4,11 +4,11 @@ import { MenuConfig } from '../../services/menu/menu';
|
|
|
4
4
|
export interface IWorkbenchOptions {
|
|
5
5
|
container?: string | HTMLElement;
|
|
6
6
|
header?: boolean;
|
|
7
|
+
toolbar?: boolean;
|
|
7
8
|
footer?: boolean;
|
|
8
9
|
contextMenu?: boolean;
|
|
9
10
|
}
|
|
10
11
|
export interface IUIController {
|
|
11
|
-
bootstrapWorkbench(options: IWorkbenchOptions): void;
|
|
12
12
|
}
|
|
13
13
|
export declare const IUIController: import('@wendellhu/redi').IdentifierDecorator<IUIController>;
|
|
14
14
|
export interface IUniverUIConfig extends IWorkbenchOptions {
|
|
@@ -17,3 +17,4 @@ export interface IUniverUIConfig extends IWorkbenchOptions {
|
|
|
17
17
|
override?: DependencyOverride;
|
|
18
18
|
menu?: MenuConfig;
|
|
19
19
|
}
|
|
20
|
+
export declare const UI_CONFIG_KEY = "UNIVER_UI_CONFIG_KEY";
|
package/lib/types/index.d.ts
CHANGED
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
export * from './common';
|
|
17
|
-
export { getMenuHiddenObservable } from './common/menu-hidden-observable';
|
|
17
|
+
export { getMenuHiddenObservable, getHeaderFooterMenuHiddenObservable } from './common/menu-hidden-observable';
|
|
18
18
|
export * from './components';
|
|
19
19
|
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, type IWorkbenchOptions } from './controllers/ui/ui.controller';
|
|
23
|
+
export { UI_CONFIG_KEY, IUIController, type IWorkbenchOptions } from './controllers/ui/ui.controller';
|
|
24
24
|
export { DesktopUIController } from './controllers/ui/ui-desktop.controller';
|
|
25
25
|
export { IUIPartsService, BuiltInUIPart, UIPartsService } from './services/parts/parts.service';
|
|
26
26
|
export { DesktopBeforeCloseService, IBeforeCloseService } from './services/before-close/before-close.service';
|
|
@@ -28,33 +28,34 @@ export { CopyCommand, CutCommand, PasteCommand } from './services/clipboard/clip
|
|
|
28
28
|
export { BrowserClipboardService, HTML_CLIPBOARD_MIME_TYPE, IClipboardInterfaceService, PLAIN_TEXT_CLIPBOARD_MIME_TYPE, } from './services/clipboard/clipboard-interface.service';
|
|
29
29
|
export { IConfirmService } from './services/confirm/confirm.service';
|
|
30
30
|
export { DesktopConfirmService } from './services/confirm/desktop-confirm.service';
|
|
31
|
-
export {
|
|
31
|
+
export { ContextMenuService, type IContextMenuHandler, IContextMenuService, } from './services/contextmenu/contextmenu.service';
|
|
32
32
|
export { DesktopDialogService } from './services/dialog/desktop-dialog.service';
|
|
33
33
|
export { type IDialogPartMethodOptions } from './views/components/dialog-part/interface';
|
|
34
34
|
export { IDialogService } from './services/dialog/dialog.service';
|
|
35
35
|
export { ILayoutService, DesktopLayoutService } from './services/layout/layout.service';
|
|
36
36
|
export { type ICustomComponentProps, type IDisplayMenuItem, type IMenuButtonItem, type IMenuItem, type IMenuItemFactory, type IMenuSelectorItem, type IValueOption, type MenuConfig, MenuGroup, MenuItemType, MenuPosition, type MenuItemDefaultValueType, } from './services/menu/menu';
|
|
37
|
-
export {
|
|
37
|
+
export { MenuService, IMenuService } from './services/menu/menu.service';
|
|
38
38
|
export { DesktopMessageService } from './services/message/desktop-message.service';
|
|
39
39
|
export { IMessageService } from './services/message/message.service';
|
|
40
40
|
export { DesktopNotificationService } from './services/notification/desktop-notification.service';
|
|
41
41
|
export { type NotificationType, type INotificationOptions } from './components/notification/Notification';
|
|
42
42
|
export { INotificationService } from './services/notification/notification.service';
|
|
43
|
-
export {
|
|
43
|
+
export { PlatformService, IPlatformService } from './services/platform/platform.service';
|
|
44
44
|
export { DesktopGlobalZoneService } from './services/global-zone/desktop-global-zone.service';
|
|
45
45
|
export { IGlobalZoneService } from './services/global-zone/global-zone.service';
|
|
46
46
|
export { KeyCode, MetaKeys } from './services/shortcut/keycode';
|
|
47
|
-
export {
|
|
47
|
+
export { ShortcutService, type IShortcutItem, IShortcutService } from './services/shortcut/shortcut.service';
|
|
48
48
|
export { DesktopSidebarService } from './services/sidebar/desktop-sidebar.service';
|
|
49
49
|
export { ISidebarService } from './services/sidebar/sidebar.service';
|
|
50
50
|
export { IZenZoneService } from './services/zen-zone/zen-zone.service';
|
|
51
51
|
export { UniverUIPlugin, DISABLE_AUTO_FOCUS_KEY } from './ui-plugin';
|
|
52
|
+
export { UniverMobileUIPlugin } from './mobile-ui-plugin';
|
|
52
53
|
export * from './utils';
|
|
54
|
+
export { Menu } from './components/menu/desktop/Menu';
|
|
53
55
|
export { type IConfirmPartMethodOptions } from './views/components/confirm-part/interface';
|
|
54
56
|
export { ComponentContainer, useComponentsOfPart, type IComponentContainerProps } from './views/components/ComponentContainer';
|
|
55
57
|
export { IEditorService, EditorService } from './services/editor/editor.service';
|
|
56
58
|
export { TextEditor } from './components/editor/TextEditor';
|
|
57
|
-
export { SetEditorResizeOperation } from './commands/operations/editor/set-editor-resize.operation';
|
|
58
59
|
export { RangeSelector } from './components/range-selector/RangeSelector';
|
|
59
60
|
export { IRangeSelectorService } from './services/range-selector/range-selector.service';
|
|
60
61
|
export { DesktopLocalStorageService } from './services/local-storage/local-storage.service';
|
|
@@ -66,8 +67,12 @@ export { IProgressService, ProgressService } from './services/progress/progress.
|
|
|
66
67
|
export type { IProgressStep } from './services/progress/progress.service';
|
|
67
68
|
export { GlobalZone } from './views/components/global-zone/GlobalZone';
|
|
68
69
|
export { builtInGlobalComponents } from './views/parts';
|
|
69
|
-
export { ContextMenu } from './views/components/context-menu/ContextMenu';
|
|
70
|
+
export { DesktopContextMenu as ContextMenu } from './views/components/context-menu/ContextMenu';
|
|
70
71
|
export { Sidebar } from './views/components/sidebar/Sidebar';
|
|
71
72
|
export { ZenZone } from './views/components/zen-zone/ZenZone';
|
|
72
73
|
export { CanvasPopup } from './views/components/popup/CanvasPopup';
|
|
73
74
|
export { CanvasFloatDomService, type IFloatDomLayout } from './services/dom/canvas-dom-layer.service';
|
|
75
|
+
export { FloatDom } from './views/components/dom/FloatDom';
|
|
76
|
+
export { MobileContextMenu } from './views/components/context-menu/MobileContextMenu';
|
|
77
|
+
export { ToggleShortcutPanelOperation } from './commands/operations/toggle-shortcut-panel.operation';
|
|
78
|
+
export { SetEditorResizeOperation } from './commands/operations/editor/set-editor-resize.operation';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Plugin } from '@univerjs/core';
|
|
2
|
+
import { Injector } from '@wendellhu/redi';
|
|
3
|
+
import { IUniverUIConfig } from './controllers/ui/ui.controller';
|
|
4
|
+
|
|
5
|
+
export declare const UNIVER_MOBILE_UI_PLUGIN_NAME = "UNIVER_MOBILE_UI_PLUGIN";
|
|
6
|
+
/**
|
|
7
|
+
* @ignore
|
|
8
|
+
*/
|
|
9
|
+
export declare class UniverMobileUIPlugin extends Plugin {
|
|
10
|
+
private _config;
|
|
11
|
+
protected readonly _injector: Injector;
|
|
12
|
+
static pluginName: string;
|
|
13
|
+
constructor(_config: IUniverUIConfig, _injector: Injector);
|
|
14
|
+
onStarting(injector: Injector): void;
|
|
15
|
+
}
|
|
@@ -14,7 +14,7 @@ export interface IContextMenuService {
|
|
|
14
14
|
registerContextMenuHandler(handler: IContextMenuHandler): IDisposable;
|
|
15
15
|
}
|
|
16
16
|
export declare const IContextMenuService: import('@wendellhu/redi').IdentifierDecorator<IContextMenuService>;
|
|
17
|
-
export declare class
|
|
17
|
+
export declare class ContextMenuService extends Disposable implements IContextMenuService {
|
|
18
18
|
private _currentHandler;
|
|
19
19
|
disabled: boolean;
|
|
20
20
|
disable(): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DocumentDataModel, IDocumentBody, IDocumentData, IPosition, Nullable, Disposable, IContextService, IUniverInstanceService } from '@univerjs/core';
|
|
2
|
-
import { IDisposable
|
|
2
|
+
import { IDisposable } from '@wendellhu/redi';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { IRender, ISuccinctTextRangeParam, IRenderManagerService } from '@univerjs/engine-render';
|
|
5
5
|
import { LexerTreeBuilder } from '@univerjs/engine-formula';
|
|
@@ -123,7 +123,6 @@ 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 _injector;
|
|
127
126
|
private readonly _univerInstanceService;
|
|
128
127
|
private readonly _renderManagerService;
|
|
129
128
|
private readonly _lexerTreeBuilder;
|
|
@@ -153,7 +152,7 @@ export declare class EditorService extends Disposable implements IEditorService,
|
|
|
153
152
|
private readonly _singleSelection$;
|
|
154
153
|
readonly singleSelection$: Observable<boolean>;
|
|
155
154
|
private _spreadsheetFocusState;
|
|
156
|
-
constructor(
|
|
155
|
+
constructor(_univerInstanceService: IUniverInstanceService, _renderManagerService: IRenderManagerService, _lexerTreeBuilder: LexerTreeBuilder, _contextService: IContextService);
|
|
157
156
|
setFocusId(id: Nullable<string>): void;
|
|
158
157
|
getFocusId(): Nullable<string>;
|
|
159
158
|
getFocusEditor(): Readonly<Nullable<Editor>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ContextService, Nullable, Disposable,
|
|
1
|
+
import { ContextService, Nullable, Disposable, IUniverInstanceService, UniverInstanceType } from '@univerjs/core';
|
|
2
2
|
import { IDisposable } from '@wendellhu/redi';
|
|
3
3
|
import { IEditorService } from '../editor/editor.service';
|
|
4
4
|
|
|
@@ -17,6 +17,7 @@ export interface ILayoutService {
|
|
|
17
17
|
registerCanvasElement(container: HTMLCanvasElement): IDisposable;
|
|
18
18
|
/** Register an element as a container, especially floating components like Dialogs and Notifications. */
|
|
19
19
|
registerContainerElement(container: HTMLElement): IDisposable;
|
|
20
|
+
getCanvasElement(): HTMLCanvasElement;
|
|
20
21
|
checkElementInCurrentContainers(element: HTMLElement): boolean;
|
|
21
22
|
checkCanvasIsFocused(): boolean;
|
|
22
23
|
}
|
|
@@ -28,7 +29,6 @@ export declare const ILayoutService: import('@wendellhu/redi').IdentifierDecorat
|
|
|
28
29
|
export declare class DesktopLayoutService extends Disposable implements ILayoutService {
|
|
29
30
|
private readonly _contextService;
|
|
30
31
|
private readonly _univerInstanceService;
|
|
31
|
-
private readonly _logService;
|
|
32
32
|
private readonly _editorService;
|
|
33
33
|
private _rootContainerElement;
|
|
34
34
|
private _isFocused;
|
|
@@ -36,11 +36,12 @@ export declare class DesktopLayoutService extends Disposable implements ILayoutS
|
|
|
36
36
|
private readonly _focusHandlers;
|
|
37
37
|
private _canvasContainers;
|
|
38
38
|
private _allContainers;
|
|
39
|
-
constructor(_contextService: ContextService, _univerInstanceService: IUniverInstanceService,
|
|
39
|
+
constructor(_contextService: ContextService, _univerInstanceService: IUniverInstanceService, _editorService: IEditorService);
|
|
40
40
|
get rootContainerElement(): Nullable<HTMLElement>;
|
|
41
41
|
focus(): void;
|
|
42
42
|
registerFocusHandler(type: UniverInstanceType, handler: FocusHandlerFn): IDisposable;
|
|
43
43
|
registerCanvasElement(container: HTMLCanvasElement): IDisposable;
|
|
44
|
+
getCanvasElement(): HTMLCanvasElement;
|
|
44
45
|
registerRootContainerElement(container: HTMLElement): IDisposable;
|
|
45
46
|
registerContainerElement(container: HTMLElement): IDisposable;
|
|
46
47
|
checkElementInCurrentContainers(element: HTMLElement): boolean;
|
|
@@ -13,7 +13,7 @@ export interface IMenuService {
|
|
|
13
13
|
getMenuItems(position: MenuPosition | string): Array<IDisplayMenuItem<IMenuItem>>;
|
|
14
14
|
getMenuItem(id: string): IMenuItem | null;
|
|
15
15
|
}
|
|
16
|
-
export declare class
|
|
16
|
+
export declare class MenuService extends Disposable implements IMenuService {
|
|
17
17
|
private readonly _shortcutService;
|
|
18
18
|
private readonly _menuItemMap;
|
|
19
19
|
private readonly _menuByPositions;
|
|
@@ -22,7 +22,7 @@ export interface IPlatformService {
|
|
|
22
22
|
readonly isLinux: boolean;
|
|
23
23
|
}
|
|
24
24
|
export declare const IPlatformService: import('@wendellhu/redi').IdentifierDecorator<IPlatformService>;
|
|
25
|
-
export declare class
|
|
25
|
+
export declare class PlatformService implements IPlatformService {
|
|
26
26
|
get isMac(): boolean;
|
|
27
27
|
get isWindows(): boolean;
|
|
28
28
|
get isLinux(): boolean;
|
|
@@ -6,6 +6,8 @@ import { Observable } from 'rxjs';
|
|
|
6
6
|
export interface IPopup extends Pick<IRectPopupProps, 'closeOnSelfTarget' | 'direction' | 'excludeOutside' | 'onClickOutside'> {
|
|
7
7
|
anchorRect: IBoundRectNoAngle;
|
|
8
8
|
anchorRect$: Observable<IBoundRectNoAngle>;
|
|
9
|
+
excludeRects?: IBoundRectNoAngle[];
|
|
10
|
+
excludeRects$?: Observable<IBoundRectNoAngle[]>;
|
|
9
11
|
componentKey: string;
|
|
10
12
|
unitId: string;
|
|
11
13
|
subUnitId: string;
|
|
@@ -36,7 +36,7 @@ export interface IShortcutService {
|
|
|
36
36
|
setDisable(disable: boolean): void;
|
|
37
37
|
}
|
|
38
38
|
export declare const IShortcutService: import('@wendellhu/redi').IdentifierDecorator<IShortcutService>;
|
|
39
|
-
export declare class
|
|
39
|
+
export declare class ShortcutService extends Disposable implements IShortcutService {
|
|
40
40
|
private readonly _commandService;
|
|
41
41
|
private readonly _platformService;
|
|
42
42
|
private readonly _contextService;
|
package/lib/types/ui-plugin.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IContextService,
|
|
1
|
+
import { IContextService, Plugin } from '@univerjs/core';
|
|
2
2
|
import { Injector } from '@wendellhu/redi';
|
|
3
3
|
import { IUniverUIConfig } from './controllers/ui/ui.controller';
|
|
4
4
|
|
|
@@ -11,11 +11,7 @@ export declare class UniverUIPlugin extends Plugin {
|
|
|
11
11
|
private _config;
|
|
12
12
|
private readonly _contextService;
|
|
13
13
|
protected readonly _injector: Injector;
|
|
14
|
-
private readonly _localeService;
|
|
15
14
|
static pluginName: string;
|
|
16
|
-
constructor(_config: Partial<IUniverUIConfig>, _contextService: IContextService, _injector: Injector
|
|
17
|
-
onStarting(
|
|
18
|
-
onReady(): void;
|
|
19
|
-
private _initDependencies;
|
|
20
|
-
private _initUI;
|
|
15
|
+
constructor(_config: Partial<IUniverUIConfig>, _contextService: IContextService, _injector: Injector);
|
|
16
|
+
onStarting(injector: Injector): void;
|
|
21
17
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IWorkbenchOptions } from '../controllers/ui/ui.controller';
|
|
3
|
+
|
|
4
|
+
export interface IUniverAppProps extends IWorkbenchOptions {
|
|
5
|
+
mountContainer: HTMLElement;
|
|
6
|
+
onRendered?: (container: HTMLElement) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function DesktopApp(props: IUniverAppProps): React.JSX.Element;
|
|
@@ -5,4 +5,4 @@ export interface IUniverAppProps extends IWorkbenchOptions {
|
|
|
5
5
|
mountContainer: HTMLElement;
|
|
6
6
|
onRendered?: (container: HTMLElement) => void;
|
|
7
7
|
}
|
|
8
|
-
export declare function
|
|
8
|
+
export declare function MobileApp(props: IUniverAppProps): React.JSX.Element;
|
|
@@ -14,4 +14,4 @@ export declare function ComponentContainer(props: IComponentContainerProps): str
|
|
|
14
14
|
* @param injector The injector to get the service. It is optional. However, you should not change this prop in a given
|
|
15
15
|
* component.
|
|
16
16
|
*/
|
|
17
|
-
export declare function useComponentsOfPart(part: string, injector?: Injector): Set<() =>
|
|
17
|
+
export declare function useComponentsOfPart(part: string, injector?: Injector): Set<() => import('../..').ComponentType>;
|