@difizen/libro-common 0.3.3 → 1.0.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/es/app/app.d.ts +7 -0
- package/es/app/app.d.ts.map +1 -0
- package/es/app/app.js +51 -0
- package/es/app/file-tree/file-selection.d.ts +15 -0
- package/es/app/file-tree/file-selection.d.ts.map +1 -0
- package/es/app/file-tree/file-selection.js +38 -0
- package/es/app/file-tree/file-service.d.ts +19 -0
- package/es/app/file-tree/file-service.d.ts.map +1 -0
- package/es/app/file-tree/file-service.js +105 -0
- package/es/app/file-tree/file-tree-component.d.ts +6 -0
- package/es/app/file-tree/file-tree-component.d.ts.map +1 -0
- package/es/app/file-tree/file-tree-component.js +14 -0
- package/es/app/file-tree/file-tree-icon.d.ts +3 -0
- package/es/app/file-tree/file-tree-icon.d.ts.map +1 -0
- package/es/app/file-tree/file-tree-icon.js +14 -0
- package/es/app/file-tree/file-tree-label-provider.d.ts +18 -0
- package/es/app/file-tree/file-tree-label-provider.d.ts.map +1 -0
- package/es/app/file-tree/file-tree-label-provider.js +54 -0
- package/es/app/file-tree/file-tree-model.d.ts +40 -0
- package/es/app/file-tree/file-tree-model.d.ts.map +1 -0
- package/es/app/file-tree/file-tree-model.js +358 -0
- package/es/app/file-tree/file-tree-protocol.d.ts +12 -0
- package/es/app/file-tree/file-tree-protocol.d.ts.map +1 -0
- package/es/app/file-tree/file-tree-protocol.js +33 -0
- package/es/app/file-tree/file-tree-view.d.ts +51 -0
- package/es/app/file-tree/file-tree-view.d.ts.map +1 -0
- package/es/app/file-tree/file-tree-view.js +420 -0
- package/es/app/file-tree/file-tree.d.ts +48 -0
- package/es/app/file-tree/file-tree.d.ts.map +1 -0
- package/es/app/file-tree/file-tree.js +279 -0
- package/es/app/file-tree/files.d.ts +575 -0
- package/es/app/file-tree/files.d.ts.map +1 -0
- package/es/app/file-tree/files.js +478 -0
- package/es/app/file-tree/filesystem-utils.d.ts +14 -0
- package/es/app/file-tree/filesystem-utils.d.ts.map +1 -0
- package/es/app/file-tree/filesystem-utils.js +20 -0
- package/es/app/file-tree/index.d.ts +7 -0
- package/es/app/file-tree/index.d.ts.map +1 -0
- package/es/app/file-tree/index.js +6 -0
- package/es/app/file-tree/module.d.ts +3 -0
- package/es/app/file-tree/module.d.ts.map +1 -0
- package/es/app/file-tree/module.js +18 -0
- package/es/app/file-tree/selection-command-handler.d.ts +25 -0
- package/es/app/file-tree/selection-command-handler.d.ts.map +1 -0
- package/es/app/file-tree/selection-command-handler.js +124 -0
- package/es/app/file-tree/style/file-icon.less +51 -0
- package/es/app/index.d.ts +15 -0
- package/es/app/index.d.ts.map +1 -0
- package/es/app/index.js +22 -0
- package/es/app/label/index.d.ts +4 -0
- package/es/app/label/index.d.ts.map +1 -0
- package/es/app/label/index.js +4 -0
- package/es/app/label/label-provider.d.ts +169 -0
- package/es/app/label/label-provider.d.ts.map +1 -0
- package/es/app/label/label-provider.js +488 -0
- package/es/app/menu/index.d.ts +8 -0
- package/es/app/menu/index.d.ts.map +1 -0
- package/es/app/menu/index.js +21 -0
- package/es/app/menu/menu-bar-render.d.ts +11 -0
- package/es/app/menu/menu-bar-render.d.ts.map +1 -0
- package/es/app/menu/menu-bar-render.js +46 -0
- package/es/app/menu/menu-color-registry.d.ts +6 -0
- package/es/app/menu/menu-color-registry.d.ts.map +1 -0
- package/es/app/menu/menu-color-registry.js +59 -0
- package/es/app/menu/menu-context.d.ts +13 -0
- package/es/app/menu/menu-context.d.ts.map +1 -0
- package/es/app/menu/menu-context.js +7 -0
- package/es/app/menu/menu-item-keeper.d.ts +12 -0
- package/es/app/menu/menu-item-keeper.d.ts.map +1 -0
- package/es/app/menu/menu-item-keeper.js +68 -0
- package/es/app/menu/menu-item-render.d.ts +4 -0
- package/es/app/menu/menu-item-render.d.ts.map +1 -0
- package/es/app/menu/menu-item-render.js +13 -0
- package/es/app/menu/menu-protocol.d.ts +18 -0
- package/es/app/menu/menu-protocol.d.ts.map +1 -0
- package/es/app/menu/menu-protocol.js +5 -0
- package/es/app/menu/menu-render.d.ts +30 -0
- package/es/app/menu/menu-render.d.ts.map +1 -0
- package/es/app/menu/menu-render.js +85 -0
- package/es/app/menu/menu.d.ts +47 -0
- package/es/app/menu/menu.d.ts.map +1 -0
- package/es/app/menu/menu.js +234 -0
- package/es/app/modal/index.d.ts +9 -0
- package/es/app/modal/index.d.ts.map +1 -0
- package/es/app/modal/index.js +19 -0
- package/es/app/modal/modal-contribution.d.ts +7 -0
- package/es/app/modal/modal-contribution.d.ts.map +1 -0
- package/es/app/modal/modal-contribution.js +34 -0
- package/es/app/modal/modal-protocol.d.ts +22 -0
- package/es/app/modal/modal-protocol.d.ts.map +1 -0
- package/es/app/modal/modal-protocol.js +13 -0
- package/es/app/modal/modal-render.d.ts +6 -0
- package/es/app/modal/modal-render.d.ts.map +1 -0
- package/es/app/modal/modal-render.js +44 -0
- package/es/app/modal/modal-service.d.ts +41 -0
- package/es/app/modal/modal-service.d.ts.map +1 -0
- package/es/app/modal/modal-service.js +200 -0
- package/es/app/notification/index.d.ts +5 -0
- package/es/app/notification/index.d.ts.map +1 -0
- package/es/app/notification/index.js +5 -0
- package/es/app/notification/index.less +20 -0
- package/es/app/notification/protocol.d.ts +15 -0
- package/es/app/notification/protocol.d.ts.map +1 -0
- package/es/app/notification/protocol.js +1 -0
- package/es/app/notification/service.d.ts +11 -0
- package/es/app/notification/service.d.ts.map +1 -0
- package/es/app/notification/service.js +87 -0
- package/es/app/style/index.less +181 -0
- package/es/app/style/style-protocol.d.ts +10 -0
- package/es/app/style/style-protocol.d.ts.map +1 -0
- package/es/app/style/style-protocol.js +11 -0
- package/es/app/toolbar/index.d.ts +7 -0
- package/es/app/toolbar/index.d.ts.map +1 -0
- package/es/app/toolbar/index.js +15 -0
- package/es/app/toolbar/index.less +40 -0
- package/es/app/toolbar/toolbar-item-keeper.d.ts +12 -0
- package/es/app/toolbar/toolbar-item-keeper.d.ts.map +1 -0
- package/es/app/toolbar/toolbar-item-keeper.js +49 -0
- package/es/app/toolbar/toolbar-item-render.d.ts +13 -0
- package/es/app/toolbar/toolbar-item-render.d.ts.map +1 -0
- package/es/app/toolbar/toolbar-item-render.js +14 -0
- package/es/app/toolbar/toolbar-protocol.d.ts +9 -0
- package/es/app/toolbar/toolbar-protocol.d.ts.map +1 -0
- package/es/app/toolbar/toolbar-protocol.js +1 -0
- package/es/app/toolbar/toolbar-render.d.ts +29 -0
- package/es/app/toolbar/toolbar-render.d.ts.map +1 -0
- package/es/app/toolbar/toolbar-render.js +93 -0
- package/es/app/toolbar/toolbar-visible-render.d.ts +8 -0
- package/es/app/toolbar/toolbar-visible-render.d.ts.map +1 -0
- package/es/app/toolbar/toolbar-visible-render.js +12 -0
- package/es/app/toolbar/toolbar.d.ts +51 -0
- package/es/app/toolbar/toolbar.d.ts.map +1 -0
- package/es/app/toolbar/toolbar.js +275 -0
- package/es/app/tree/components/index.d.ts +3 -0
- package/es/app/tree/components/index.d.ts.map +1 -0
- package/es/app/tree/components/index.js +20 -0
- package/es/app/tree/components/tree-ident.d.ts +4 -0
- package/es/app/tree/components/tree-ident.d.ts.map +1 -0
- package/es/app/tree/components/tree-ident.js +40 -0
- package/es/app/tree/components/tree-node-caption-affix.d.ts +4 -0
- package/es/app/tree/components/tree-node-caption-affix.d.ts.map +1 -0
- package/es/app/tree/components/tree-node-caption-affix.js +39 -0
- package/es/app/tree/components/tree-node-caption.d.ts +3 -0
- package/es/app/tree/components/tree-node-caption.d.ts.map +1 -0
- package/es/app/tree/components/tree-node-caption.js +103 -0
- package/es/app/tree/components/tree-node-expansion.d.ts +3 -0
- package/es/app/tree/components/tree-node-expansion.d.ts.map +1 -0
- package/es/app/tree/components/tree-node-expansion.js +36 -0
- package/es/app/tree/components/tree-node-icon-decorator.d.ts +4 -0
- package/es/app/tree/components/tree-node-icon-decorator.d.ts.map +1 -0
- package/es/app/tree/components/tree-node-icon-decorator.js +46 -0
- package/es/app/tree/components/tree-node-icon.d.ts +2 -0
- package/es/app/tree/components/tree-node-icon.d.ts.map +1 -0
- package/es/app/tree/components/tree-node-icon.js +3 -0
- package/es/app/tree/components/tree-node-tail-decoration.d.ts +3 -0
- package/es/app/tree/components/tree-node-tail-decoration.d.ts.map +1 -0
- package/es/app/tree/components/tree-node-tail-decoration.js +39 -0
- package/es/app/tree/components/tree-node.d.ts +4 -0
- package/es/app/tree/components/tree-node.d.ts.map +1 -0
- package/es/app/tree/components/tree-node.js +40 -0
- package/es/app/tree/components/tree-switch-icon.d.ts +4 -0
- package/es/app/tree/components/tree-switch-icon.d.ts.map +1 -0
- package/es/app/tree/components/tree-switch-icon.js +14 -0
- package/es/app/tree/index.d.ts +16 -0
- package/es/app/tree/index.d.ts.map +1 -0
- package/es/app/tree/index.js +15 -0
- package/es/app/tree/module.d.ts +5 -0
- package/es/app/tree/module.d.ts.map +1 -0
- package/es/app/tree/module.js +19 -0
- package/es/app/tree/style/index.less +206 -0
- package/es/app/tree/style/tree-decorator.less +65 -0
- package/es/app/tree/tree-decorator.d.ts +141 -0
- package/es/app/tree/tree-decorator.d.ts.map +1 -0
- package/es/app/tree/tree-decorator.js +248 -0
- package/es/app/tree/tree-expansion.d.ts +69 -0
- package/es/app/tree/tree-expansion.d.ts.map +1 -0
- package/es/app/tree/tree-expansion.js +250 -0
- package/es/app/tree/tree-impl.d.ts +40 -0
- package/es/app/tree/tree-impl.d.ts.map +1 -0
- package/es/app/tree/tree-impl.js +292 -0
- package/es/app/tree/tree-iterator.d.ts +94 -0
- package/es/app/tree/tree-iterator.d.ts.map +1 -0
- package/es/app/tree/tree-iterator.js +368 -0
- package/es/app/tree/tree-label-provider.d.ts +9 -0
- package/es/app/tree/tree-label-provider.d.ts.map +1 -0
- package/es/app/tree/tree-label-provider.js +39 -0
- package/es/app/tree/tree-model.d.ts +163 -0
- package/es/app/tree/tree-model.d.ts.map +1 -0
- package/es/app/tree/tree-model.js +616 -0
- package/es/app/tree/tree-navigation.d.ts +11 -0
- package/es/app/tree/tree-navigation.d.ts.map +1 -0
- package/es/app/tree/tree-navigation.js +54 -0
- package/es/app/tree/tree-protocol.d.ts +67 -0
- package/es/app/tree/tree-protocol.d.ts.map +1 -0
- package/es/app/tree/tree-protocol.js +24 -0
- package/es/app/tree/tree-selection-impl.d.ts +45 -0
- package/es/app/tree/tree-selection-impl.d.ts.map +1 -0
- package/es/app/tree/tree-selection-impl.js +192 -0
- package/es/app/tree/tree-selection-state.d.ts +48 -0
- package/es/app/tree/tree-selection-state.d.ts.map +1 -0
- package/es/app/tree/tree-selection-state.js +276 -0
- package/es/app/tree/tree-selection.d.ts +79 -0
- package/es/app/tree/tree-selection.d.ts.map +1 -0
- package/es/app/tree/tree-selection.js +72 -0
- package/es/app/tree/tree-view-decoration.d.ts +286 -0
- package/es/app/tree/tree-view-decoration.d.ts.map +1 -0
- package/es/app/tree/tree-view-decoration.js +127 -0
- package/es/app/tree/tree.d.ts +166 -0
- package/es/app/tree/tree.d.ts.map +1 -0
- package/es/app/tree/tree.js +155 -0
- package/es/app/tree/view/index.d.ts +4 -0
- package/es/app/tree/view/index.d.ts.map +1 -0
- package/es/app/tree/view/index.js +3 -0
- package/es/app/tree/view/index.less +3 -0
- package/es/app/tree/view/tree-view-decorator.d.ts +38 -0
- package/es/app/tree/view/tree-view-decorator.d.ts.map +1 -0
- package/es/app/tree/view/tree-view-decorator.js +128 -0
- package/es/app/tree/view/tree-view-module.d.ts +3 -0
- package/es/app/tree/view/tree-view-module.d.ts.map +1 -0
- package/es/app/tree/view/tree-view-module.js +8 -0
- package/es/app/tree/view/tree-view-selection.d.ts +12 -0
- package/es/app/tree/view/tree-view-selection.d.ts.map +1 -0
- package/es/app/tree/view/tree-view-selection.js +23 -0
- package/es/app/tree/view/tree-view.d.ts +262 -0
- package/es/app/tree/view/tree-view.d.ts.map +1 -0
- package/es/app/tree/view/tree-view.js +943 -0
- package/es/app/typings/index.d.ts +7 -0
- package/es/app/view/box/index.d.ts +19 -0
- package/es/app/view/box/index.d.ts.map +1 -0
- package/es/app/view/box/index.js +76 -0
- package/es/app/view/components/index.d.ts +2 -0
- package/es/app/view/components/index.d.ts.map +1 -0
- package/es/app/view/components/index.js +1 -0
- package/es/app/view/components/loading/index.d.ts +3 -0
- package/es/app/view/components/loading/index.d.ts.map +1 -0
- package/es/app/view/components/loading/index.js +7 -0
- package/es/app/view/components/loading/index.less +10 -0
- package/es/app/view/flex/index.d.ts +16 -0
- package/es/app/view/flex/index.d.ts.map +1 -0
- package/es/app/view/flex/index.js +67 -0
- package/es/app/view/flex/index.less +3 -0
- package/es/app/view/header/header-view.d.ts +12 -0
- package/es/app/view/header/header-view.d.ts.map +1 -0
- package/es/app/view/header/header-view.js +68 -0
- package/es/app/view/header/index.d.ts +4 -0
- package/es/app/view/header/index.d.ts.map +1 -0
- package/es/app/view/header/index.js +23 -0
- package/es/app/view/header/index.less +43 -0
- package/es/app/view/index.d.ts +8 -0
- package/es/app/view/index.d.ts.map +1 -0
- package/es/app/view/index.js +11 -0
- package/es/app/view/tab/card-tab-view.d.ts +13 -0
- package/es/app/view/tab/card-tab-view.d.ts.map +1 -0
- package/es/app/view/tab/card-tab-view.js +49 -0
- package/es/app/view/tab/index.d.ts +4 -0
- package/es/app/view/tab/index.d.ts.map +1 -0
- package/es/app/view/tab/index.js +3 -0
- package/es/app/view/tab/index.less +70 -0
- package/es/app/view/tab/side-tab-view.d.ts +23 -0
- package/es/app/view/tab/side-tab-view.d.ts.map +1 -0
- package/es/app/view/tab/side-tab-view.js +121 -0
- package/es/app/view/tab/tab-menu.d.ts +9 -0
- package/es/app/view/tab/tab-menu.d.ts.map +1 -0
- package/es/app/view/tab/tab-menu.js +34 -0
- package/es/app/view/tab/tab-protocol.d.ts +3 -0
- package/es/app/view/tab/tab-protocol.d.ts.map +1 -0
- package/es/app/view/tab/tab-protocol.js +1 -0
- package/es/app/view/tab/tab-view.d.ts +27 -0
- package/es/app/view/tab/tab-view.d.ts.map +1 -0
- package/es/app/view/tab/tab-view.js +169 -0
- package/es/common/assert.d.ts +5 -0
- package/es/common/assert.d.ts.map +1 -0
- package/es/common/assert.js +13 -0
- package/es/common/cancellation.d.ts +20 -0
- package/es/common/cancellation.d.ts.map +1 -0
- package/es/common/cancellation.js +143 -0
- package/es/common/charCode.d.ts +416 -0
- package/es/common/charCode.d.ts.map +1 -0
- package/es/common/charCode.js +604 -0
- package/es/common/collections.d.ts +44 -0
- package/es/common/collections.d.ts.map +1 -0
- package/es/common/collections.js +220 -0
- package/es/common/deferred.d.ts +10 -0
- package/es/common/deferred.d.ts.map +1 -0
- package/es/common/deferred.js +21 -0
- package/es/common/disposable-collection.d.ts +24 -0
- package/es/common/disposable-collection.d.ts.map +1 -0
- package/es/common/disposable-collection.js +117 -0
- package/es/common/disposable.d.ts +19 -0
- package/es/common/disposable.d.ts.map +1 -0
- package/es/common/disposable.js +23 -0
- package/es/common/event.d.ts +75 -0
- package/es/common/event.d.ts.map +1 -0
- package/es/common/event.js +313 -0
- package/es/common/index.d.ts +27 -0
- package/es/common/index.d.ts.map +1 -0
- package/es/common/index.js +26 -0
- package/es/common/iterator.d.ts +39 -0
- package/es/common/iterator.d.ts.map +1 -0
- package/es/common/iterator.js +389 -0
- package/es/common/linkedList.d.ts +16 -0
- package/es/common/linkedList.d.ts.map +1 -0
- package/es/common/linkedList.js +159 -0
- package/es/common/objects.d.ts +36 -0
- package/es/common/objects.d.ts.map +1 -0
- package/es/common/objects.js +232 -0
- package/es/common/observable-disposable.d.ts +12 -0
- package/es/common/observable-disposable.d.ts.map +1 -0
- package/es/common/observable-disposable.js +1 -0
- package/es/common/path.d.ts +59 -0
- package/es/common/path.d.ts.map +1 -0
- package/es/common/path.js +258 -0
- package/es/common/platform.d.ts +72 -0
- package/es/common/platform.d.ts.map +1 -0
- package/es/common/platform.js +213 -0
- package/es/common/priority.d.ts +23 -0
- package/es/common/priority.d.ts.map +1 -0
- package/es/common/priority.js +97 -0
- package/es/common/promise-util.d.ts +8 -0
- package/es/common/promise-util.d.ts.map +1 -0
- package/es/common/promise-util.js +63 -0
- package/es/common/stopwatch.d.ts +11 -0
- package/es/common/stopwatch.d.ts.map +1 -0
- package/es/common/stopwatch.js +47 -0
- package/es/common/strings.d.ts +102 -0
- package/es/common/strings.d.ts.map +1 -0
- package/es/common/strings.js +433 -0
- package/es/common/types.d.ts +16 -0
- package/es/common/types.d.ts.map +1 -0
- package/es/common/types.js +13 -0
- package/es/common/uint.d.ts +32 -0
- package/es/common/uint.d.ts.map +1 -0
- package/es/common/uint.js +56 -0
- package/es/common/uri.d.ts +56 -0
- package/es/common/uri.d.ts.map +1 -0
- package/es/common/uri.js +244 -0
- package/es/common/utils.d.ts +4 -0
- package/es/common/utils.d.ts.map +1 -0
- package/es/common/utils.js +26 -0
- package/es/common/valueTypes.d.ts +102 -0
- package/es/common/valueTypes.d.ts.map +1 -0
- package/es/common/valueTypes.js +270 -0
- package/es/common/vscode-uri/char-code.d.ts +416 -0
- package/es/common/vscode-uri/char-code.d.ts.map +1 -0
- package/es/common/vscode-uri/char-code.js +608 -0
- package/es/common/vscode-uri/index.d.ts +6 -0
- package/es/common/vscode-uri/index.d.ts.map +1 -0
- package/es/common/vscode-uri/index.js +8 -0
- package/es/common/vscode-uri/platform.d.ts +2 -0
- package/es/common/vscode-uri/platform.d.ts.map +1 -0
- package/es/common/vscode-uri/platform.js +17 -0
- package/es/common/vscode-uri/uri.d.ts +155 -0
- package/es/common/vscode-uri/uri.d.ts.map +1 -0
- package/es/common/vscode-uri/uri.js +637 -0
- package/es/common/vscode-uri/utils.d.ts +59 -0
- package/es/common/vscode-uri/utils.d.ts.map +1 -0
- package/es/common/vscode-uri/utils.js +61 -0
- package/es/common/wait-until-event.d.ts +17 -0
- package/es/common/wait-until-event.d.ts.map +1 -0
- package/es/common/wait-until-event.js +65 -0
- package/es/core/application/application-protocol.d.ts +19 -0
- package/es/core/application/application-protocol.d.ts.map +1 -0
- package/es/core/application/application-protocol.js +4 -0
- package/es/core/application/application-state.d.ts +24 -0
- package/es/core/application/application-state.d.ts.map +1 -0
- package/es/core/application/application-state.js +87 -0
- package/es/core/application/application.d.ts +86 -0
- package/es/core/application/application.d.ts.map +1 -0
- package/es/core/application/application.js +554 -0
- package/es/core/application/default-window-service.d.ts +27 -0
- package/es/core/application/default-window-service.d.ts.map +1 -0
- package/es/core/application/default-window-service.js +83 -0
- package/es/core/application/index.d.ts +5 -0
- package/es/core/application/index.d.ts.map +1 -0
- package/es/core/application/index.js +7 -0
- package/es/core/application/mock-window-service.d.ts +8 -0
- package/es/core/application/mock-window-service.d.ts.map +1 -0
- package/es/core/application/mock-window-service.js +31 -0
- package/es/core/browser.d.ts +21 -0
- package/es/core/browser.d.ts.map +1 -0
- package/es/core/browser.js +118 -0
- package/es/core/command/command-protocol.d.ts +124 -0
- package/es/core/command/command-protocol.d.ts.map +1 -0
- package/es/core/command/command-protocol.js +44 -0
- package/es/core/command/command-registry.d.ts +144 -0
- package/es/core/command/command-registry.d.ts.map +1 -0
- package/es/core/command/command-registry.js +595 -0
- package/es/core/command/index.d.ts +5 -0
- package/es/core/command/index.d.ts.map +1 -0
- package/es/core/command/index.js +5 -0
- package/es/core/common/debug.d.ts +5 -0
- package/es/core/common/debug.d.ts.map +1 -0
- package/es/core/common/debug.js +3 -0
- package/es/core/common/index.d.ts +6 -0
- package/es/core/common/index.d.ts.map +1 -0
- package/es/core/common/index.js +17 -0
- package/es/core/common/storage-protocol.d.ts +21 -0
- package/es/core/common/storage-protocol.d.ts.map +1 -0
- package/es/core/common/storage-protocol.js +5 -0
- package/es/core/common/storage-service.d.ts +23 -0
- package/es/core/common/storage-service.d.ts.map +1 -0
- package/es/core/common/storage-service.js +91 -0
- package/es/core/components/application.d.ts +16 -0
- package/es/core/components/application.d.ts.map +1 -0
- package/es/core/components/application.js +159 -0
- package/es/core/components/context.d.ts +19 -0
- package/es/core/components/context.d.ts.map +1 -0
- package/es/core/components/context.js +101 -0
- package/es/core/components/hooks.d.ts +4 -0
- package/es/core/components/hooks.d.ts.map +1 -0
- package/es/core/components/hooks.js +14 -0
- package/es/core/components/index.d.ts +7 -0
- package/es/core/components/index.d.ts.map +1 -0
- package/es/core/components/index.js +8 -0
- package/es/core/components/index.less +28 -0
- package/es/core/components/root-view-render.d.ts +5 -0
- package/es/core/components/root-view-render.d.ts.map +1 -0
- package/es/core/components/root-view-render.js +14 -0
- package/es/core/configuration/configuration-cache.d.ts +15 -0
- package/es/core/configuration/configuration-cache.d.ts.map +1 -0
- package/es/core/configuration/configuration-cache.js +67 -0
- package/es/core/configuration/configuration-protocol.d.ts +46 -0
- package/es/core/configuration/configuration-protocol.d.ts.map +1 -0
- package/es/core/configuration/configuration-protocol.js +1 -0
- package/es/core/configuration/configuration-provider.d.ts +46 -0
- package/es/core/configuration/configuration-provider.d.ts.map +1 -0
- package/es/core/configuration/configuration-provider.js +95 -0
- package/es/core/configuration/configuration-registry.d.ts +53 -0
- package/es/core/configuration/configuration-registry.d.ts.map +1 -0
- package/es/core/configuration/configuration-registry.js +360 -0
- package/es/core/configuration/configuration-render-registry.d.ts +35 -0
- package/es/core/configuration/configuration-render-registry.d.ts.map +1 -0
- package/es/core/configuration/configuration-render-registry.js +118 -0
- package/es/core/configuration/configuration-service.d.ts +46 -0
- package/es/core/configuration/configuration-service.d.ts.map +1 -0
- package/es/core/configuration/configuration-service.js +411 -0
- package/es/core/configuration/configuration-storage.d.ts +19 -0
- package/es/core/configuration/configuration-storage.d.ts.map +1 -0
- package/es/core/configuration/configuration-storage.js +15 -0
- package/es/core/configuration/hooks.d.ts +3 -0
- package/es/core/configuration/hooks.d.ts.map +1 -0
- package/es/core/configuration/hooks.js +60 -0
- package/es/core/configuration/index.d.ts +11 -0
- package/es/core/configuration/index.d.ts.map +1 -0
- package/es/core/configuration/index.js +10 -0
- package/es/core/configuration/module.d.ts +3 -0
- package/es/core/configuration/module.d.ts.map +1 -0
- package/es/core/configuration/module.js +8 -0
- package/es/core/configuration/typings.d.ts +1 -0
- package/es/core/configuration/validation.d.ts +12 -0
- package/es/core/configuration/validation.d.ts.map +1 -0
- package/es/core/configuration/validation.js +45 -0
- package/es/core/context/data-context-manager.d.ts +16 -0
- package/es/core/context/data-context-manager.d.ts.map +1 -0
- package/es/core/context/data-context-manager.js +80 -0
- package/es/core/context/data-context-protocol.d.ts +16 -0
- package/es/core/context/data-context-protocol.d.ts.map +1 -0
- package/es/core/context/data-context-protocol.js +10 -0
- package/es/core/context/data-context.d.ts +7 -0
- package/es/core/context/data-context.d.ts.map +1 -0
- package/es/core/context/data-context.js +32 -0
- package/es/core/context/index.d.ts +6 -0
- package/es/core/context/index.d.ts.map +1 -0
- package/es/core/context/index.js +12 -0
- package/es/core/index.d.ts +32 -0
- package/es/core/index.d.ts.map +1 -0
- package/es/core/index.js +42 -0
- package/es/core/keybinding/context-key-service.d.ts +22 -0
- package/es/core/keybinding/context-key-service.d.ts.map +1 -0
- package/es/core/keybinding/context-key-service.js +79 -0
- package/es/core/keybinding/index.d.ts +6 -0
- package/es/core/keybinding/index.d.ts.map +1 -0
- package/es/core/keybinding/index.js +5 -0
- package/es/core/keybinding/keybinding-proocol.d.ts +14 -0
- package/es/core/keybinding/keybinding-proocol.d.ts.map +1 -0
- package/es/core/keybinding/keybinding-proocol.js +5 -0
- package/es/core/keybinding/keybinding.d.ts +333 -0
- package/es/core/keybinding/keybinding.d.ts.map +1 -0
- package/es/core/keybinding/keybinding.js +912 -0
- package/es/core/keybinding/module.d.ts +3 -0
- package/es/core/keybinding/module.d.ts.map +1 -0
- package/es/core/keybinding/module.js +12 -0
- package/es/core/keybinding/vs/configuration/configuration.d.ts +129 -0
- package/es/core/keybinding/vs/configuration/configuration.d.ts.map +1 -0
- package/es/core/keybinding/vs/configuration/configuration.js +328 -0
- package/es/core/keybinding/vs/configuration/configurationModels.d.ts +138 -0
- package/es/core/keybinding/vs/configuration/configurationModels.d.ts.map +1 -0
- package/es/core/keybinding/vs/configuration/configurationModels.js +974 -0
- package/es/core/keybinding/vs/configuration/configurationRegistry.d.ts +145 -0
- package/es/core/keybinding/vs/configuration/configurationRegistry.d.ts.map +1 -0
- package/es/core/keybinding/vs/configuration/configurationRegistry.js +500 -0
- package/es/core/keybinding/vs/configuration/configurationService.d.ts +36 -0
- package/es/core/keybinding/vs/configuration/configurationService.d.ts.map +1 -0
- package/es/core/keybinding/vs/configuration/configurationService.js +161 -0
- package/es/core/keybinding/vs/configuration/json.d.ts +216 -0
- package/es/core/keybinding/vs/configuration/json.d.ts.map +1 -0
- package/es/core/keybinding/vs/configuration/json.js +1303 -0
- package/es/core/keybinding/vs/contextKeyService.d.ts +73 -0
- package/es/core/keybinding/vs/contextKeyService.d.ts.map +1 -0
- package/es/core/keybinding/vs/contextKeyService.js +755 -0
- package/es/core/keybinding/vs/contextkey.d.ts +338 -0
- package/es/core/keybinding/vs/contextkey.d.ts.map +1 -0
- package/es/core/keybinding/vs/contextkey.js +1551 -0
- package/es/core/keybinding/vs/contextkeys.d.ts +10 -0
- package/es/core/keybinding/vs/contextkeys.d.ts.map +1 -0
- package/es/core/keybinding/vs/contextkeys.js +16 -0
- package/es/core/keybinding/vs/jsonContributionRegistry.d.ts +25 -0
- package/es/core/keybinding/vs/jsonContributionRegistry.d.ts.map +1 -0
- package/es/core/keybinding/vs/jsonContributionRegistry.js +52 -0
- package/es/core/keybinding/vs/jsonSchema.d.ts +65 -0
- package/es/core/keybinding/vs/jsonSchema.d.ts.map +1 -0
- package/es/core/keybinding/vs/jsonSchema.js +0 -0
- package/es/core/keybinding/vs/platform.d.ts +21 -0
- package/es/core/keybinding/vs/platform.d.ts.map +1 -0
- package/es/core/keybinding/vs/platform.js +39 -0
- package/es/core/keyboard/browser-keyboard-layout-provider.d.ts +101 -0
- package/es/core/keyboard/browser-keyboard-layout-provider.d.ts.map +1 -0
- package/es/core/keyboard/browser-keyboard-layout-provider.js +642 -0
- package/es/core/keyboard/index.d.ts +5 -0
- package/es/core/keyboard/index.d.ts.map +1 -0
- package/es/core/keyboard/index.js +4 -0
- package/es/core/keyboard/keyboard-layout-service.d.ts +51 -0
- package/es/core/keyboard/keyboard-layout-service.d.ts.map +1 -0
- package/es/core/keyboard/keyboard-layout-service.js +697 -0
- package/es/core/keyboard/keyboard-protocol.d.ts +26 -0
- package/es/core/keyboard/keyboard-protocol.d.ts.map +1 -0
- package/es/core/keyboard/keyboard-protocol.js +5 -0
- package/es/core/keyboard/keys.d.ts +254 -0
- package/es/core/keyboard/keys.d.ts.map +1 -0
- package/es/core/keyboard/keys.js +1070 -0
- package/es/core/keyboard/layouts/cs-Czech-mac.d.ts +269 -0
- package/es/core/keyboard/layouts/cs-Czech-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/cs-Czech-mac.js +267 -0
- package/es/core/keyboard/layouts/cs-Czech-mac.json +1 -0
- package/es/core/keyboard/layouts/cs-Czech-pc.d.ts +291 -0
- package/es/core/keyboard/layouts/cs-Czech-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/cs-Czech-pc.js +289 -0
- package/es/core/keyboard/layouts/cs-Czech-pc.json +1 -0
- package/es/core/keyboard/layouts/da-Danish-mac.d.ts +298 -0
- package/es/core/keyboard/layouts/da-Danish-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/da-Danish-mac.js +296 -0
- package/es/core/keyboard/layouts/da-Danish-mac.json +1 -0
- package/es/core/keyboard/layouts/da-Danish-pc.d.ts +270 -0
- package/es/core/keyboard/layouts/da-Danish-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/da-Danish-pc.js +268 -0
- package/es/core/keyboard/layouts/da-Danish-pc.json +1 -0
- package/es/core/keyboard/layouts/de-German-mac.d.ts +298 -0
- package/es/core/keyboard/layouts/de-German-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/de-German-mac.js +296 -0
- package/es/core/keyboard/layouts/de-German-mac.json +1 -0
- package/es/core/keyboard/layouts/de-German-pc.d.ts +270 -0
- package/es/core/keyboard/layouts/de-German-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/de-German-pc.js +268 -0
- package/es/core/keyboard/layouts/de-German-pc.json +1 -0
- package/es/core/keyboard/layouts/de-Swiss_German-mac.d.ts +296 -0
- package/es/core/keyboard/layouts/de-Swiss_German-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/de-Swiss_German-mac.js +294 -0
- package/es/core/keyboard/layouts/de-Swiss_German-mac.json +1 -0
- package/es/core/keyboard/layouts/de-Swiss_German-pc.d.ts +273 -0
- package/es/core/keyboard/layouts/de-Swiss_German-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/de-Swiss_German-pc.js +271 -0
- package/es/core/keyboard/layouts/de-Swiss_German-pc.json +1 -0
- package/es/core/keyboard/layouts/en-British-mac.d.ts +296 -0
- package/es/core/keyboard/layouts/en-British-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/en-British-mac.js +294 -0
- package/es/core/keyboard/layouts/en-British-mac.json +1 -0
- package/es/core/keyboard/layouts/en-British-pc.d.ts +271 -0
- package/es/core/keyboard/layouts/en-British-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/en-British-pc.js +269 -0
- package/es/core/keyboard/layouts/en-British-pc.json +1 -0
- package/es/core/keyboard/layouts/en-Colemak-mac.d.ts +298 -0
- package/es/core/keyboard/layouts/en-Colemak-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/en-Colemak-mac.js +296 -0
- package/es/core/keyboard/layouts/en-Colemak-mac.json +1 -0
- package/es/core/keyboard/layouts/en-Dvorak-mac.d.ts +298 -0
- package/es/core/keyboard/layouts/en-Dvorak-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/en-Dvorak-mac.js +296 -0
- package/es/core/keyboard/layouts/en-Dvorak-mac.json +1 -0
- package/es/core/keyboard/layouts/en-Dvorak-pc.d.ts +257 -0
- package/es/core/keyboard/layouts/en-Dvorak-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/en-Dvorak-pc.js +255 -0
- package/es/core/keyboard/layouts/en-Dvorak-pc.json +1 -0
- package/es/core/keyboard/layouts/en-Dvorak_Lefthanded-mac.d.ts +298 -0
- package/es/core/keyboard/layouts/en-Dvorak_Lefthanded-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/en-Dvorak_Lefthanded-mac.js +296 -0
- package/es/core/keyboard/layouts/en-Dvorak_Lefthanded-mac.json +1 -0
- package/es/core/keyboard/layouts/en-Dvorak_Lefthanded-pc.d.ts +257 -0
- package/es/core/keyboard/layouts/en-Dvorak_Lefthanded-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/en-Dvorak_Lefthanded-pc.js +255 -0
- package/es/core/keyboard/layouts/en-Dvorak_Lefthanded-pc.json +1 -0
- package/es/core/keyboard/layouts/en-Dvorak_Righthanded-mac.d.ts +298 -0
- package/es/core/keyboard/layouts/en-Dvorak_Righthanded-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/en-Dvorak_Righthanded-mac.js +296 -0
- package/es/core/keyboard/layouts/en-Dvorak_Righthanded-mac.json +1 -0
- package/es/core/keyboard/layouts/en-Dvorak_Righthanded-pc.d.ts +257 -0
- package/es/core/keyboard/layouts/en-Dvorak_Righthanded-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/en-Dvorak_Righthanded-pc.js +255 -0
- package/es/core/keyboard/layouts/en-Dvorak_Righthanded-pc.json +1 -0
- package/es/core/keyboard/layouts/en-US-mac.d.ts +298 -0
- package/es/core/keyboard/layouts/en-US-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/en-US-mac.js +296 -0
- package/es/core/keyboard/layouts/en-US-mac.json +1 -0
- package/es/core/keyboard/layouts/en-US-pc.d.ts +257 -0
- package/es/core/keyboard/layouts/en-US-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/en-US-pc.js +255 -0
- package/es/core/keyboard/layouts/en-US-pc.json +1 -0
- package/es/core/keyboard/layouts/es-Spanish-mac.d.ts +298 -0
- package/es/core/keyboard/layouts/es-Spanish-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/es-Spanish-mac.js +296 -0
- package/es/core/keyboard/layouts/es-Spanish-mac.json +1 -0
- package/es/core/keyboard/layouts/es-Spanish-pc.d.ts +269 -0
- package/es/core/keyboard/layouts/es-Spanish-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/es-Spanish-pc.js +267 -0
- package/es/core/keyboard/layouts/es-Spanish-pc.json +1 -0
- package/es/core/keyboard/layouts/fr-Bepo-pc.d.ts +344 -0
- package/es/core/keyboard/layouts/fr-Bepo-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/fr-Bepo-pc.js +342 -0
- package/es/core/keyboard/layouts/fr-Bepo-pc.json +1 -0
- package/es/core/keyboard/layouts/fr-Canadian_French-mac.d.ts +298 -0
- package/es/core/keyboard/layouts/fr-Canadian_French-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/fr-Canadian_French-mac.js +296 -0
- package/es/core/keyboard/layouts/fr-Canadian_French-mac.json +1 -0
- package/es/core/keyboard/layouts/fr-Canadian_French-pc.d.ts +281 -0
- package/es/core/keyboard/layouts/fr-Canadian_French-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/fr-Canadian_French-pc.js +279 -0
- package/es/core/keyboard/layouts/fr-Canadian_French-pc.json +1 -0
- package/es/core/keyboard/layouts/fr-French-mac.d.ts +298 -0
- package/es/core/keyboard/layouts/fr-French-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/fr-French-mac.js +296 -0
- package/es/core/keyboard/layouts/fr-French-mac.json +1 -0
- package/es/core/keyboard/layouts/fr-French-pc.d.ts +269 -0
- package/es/core/keyboard/layouts/fr-French-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/fr-French-pc.js +267 -0
- package/es/core/keyboard/layouts/fr-French-pc.json +1 -0
- package/es/core/keyboard/layouts/fr-Swiss_French-mac.d.ts +296 -0
- package/es/core/keyboard/layouts/fr-Swiss_French-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/fr-Swiss_French-mac.js +294 -0
- package/es/core/keyboard/layouts/fr-Swiss_French-mac.json +1 -0
- package/es/core/keyboard/layouts/fr-Swiss_French-pc.d.ts +273 -0
- package/es/core/keyboard/layouts/fr-Swiss_French-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/fr-Swiss_French-pc.js +271 -0
- package/es/core/keyboard/layouts/fr-Swiss_French-pc.json +1 -0
- package/es/core/keyboard/layouts/hu-Hungarian-mac.d.ts +298 -0
- package/es/core/keyboard/layouts/hu-Hungarian-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/hu-Hungarian-mac.js +296 -0
- package/es/core/keyboard/layouts/hu-Hungarian-mac.json +1 -0
- package/es/core/keyboard/layouts/hu-Hungarian-pc.d.ts +298 -0
- package/es/core/keyboard/layouts/hu-Hungarian-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/hu-Hungarian-pc.js +296 -0
- package/es/core/keyboard/layouts/hu-Hungarian-pc.json +1 -0
- package/es/core/keyboard/layouts/index.d.ts +4 -0
- package/es/core/keyboard/layouts/index.d.ts.map +1 -0
- package/es/core/keyboard/layouts/index.js +57 -0
- package/es/core/keyboard/layouts/it-Italian-mac.d.ts +298 -0
- package/es/core/keyboard/layouts/it-Italian-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/it-Italian-mac.js +296 -0
- package/es/core/keyboard/layouts/it-Italian-mac.json +1 -0
- package/es/core/keyboard/layouts/it-Italian-pc.d.ts +265 -0
- package/es/core/keyboard/layouts/it-Italian-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/it-Italian-pc.js +263 -0
- package/es/core/keyboard/layouts/it-Italian-pc.json +1 -0
- package/es/core/keyboard/layouts/nb-Norwegian-mac.d.ts +293 -0
- package/es/core/keyboard/layouts/nb-Norwegian-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/nb-Norwegian-mac.js +291 -0
- package/es/core/keyboard/layouts/nb-Norwegian-mac.json +1 -0
- package/es/core/keyboard/layouts/nb-Norwegian-pc.d.ts +269 -0
- package/es/core/keyboard/layouts/nb-Norwegian-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/nb-Norwegian-pc.js +267 -0
- package/es/core/keyboard/layouts/nb-Norwegian-pc.json +1 -0
- package/es/core/keyboard/layouts/nl-Dutch-mac.d.ts +296 -0
- package/es/core/keyboard/layouts/nl-Dutch-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/nl-Dutch-mac.js +294 -0
- package/es/core/keyboard/layouts/nl-Dutch-mac.json +1 -0
- package/es/core/keyboard/layouts/nl-Dutch-pc.d.ts +278 -0
- package/es/core/keyboard/layouts/nl-Dutch-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/nl-Dutch-pc.js +276 -0
- package/es/core/keyboard/layouts/nl-Dutch-pc.json +1 -0
- package/es/core/keyboard/layouts/pl-Polish-mac.d.ts +298 -0
- package/es/core/keyboard/layouts/pl-Polish-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/pl-Polish-mac.js +296 -0
- package/es/core/keyboard/layouts/pl-Polish-mac.json +1 -0
- package/es/core/keyboard/layouts/pl-Polish-pc.d.ts +284 -0
- package/es/core/keyboard/layouts/pl-Polish-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/pl-Polish-pc.js +282 -0
- package/es/core/keyboard/layouts/pl-Polish-pc.json +1 -0
- package/es/core/keyboard/layouts/pt-Brazilian-mac.d.ts +298 -0
- package/es/core/keyboard/layouts/pt-Brazilian-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/pt-Brazilian-mac.js +296 -0
- package/es/core/keyboard/layouts/pt-Brazilian-mac.json +1 -0
- package/es/core/keyboard/layouts/pt-Portuguese-mac.d.ts +298 -0
- package/es/core/keyboard/layouts/pt-Portuguese-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/pt-Portuguese-mac.js +296 -0
- package/es/core/keyboard/layouts/pt-Portuguese-mac.json +1 -0
- package/es/core/keyboard/layouts/pt-Portuguese-pc.d.ts +268 -0
- package/es/core/keyboard/layouts/pt-Portuguese-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/pt-Portuguese-pc.js +266 -0
- package/es/core/keyboard/layouts/pt-Portuguese-pc.json +65 -0
- package/es/core/keyboard/layouts/ro-Romanian-mac.d.ts +298 -0
- package/es/core/keyboard/layouts/ro-Romanian-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/ro-Romanian-mac.js +296 -0
- package/es/core/keyboard/layouts/ro-Romanian-mac.json +1 -0
- package/es/core/keyboard/layouts/ro-Romanian-pc.d.ts +295 -0
- package/es/core/keyboard/layouts/ro-Romanian-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/ro-Romanian-pc.js +293 -0
- package/es/core/keyboard/layouts/ro-Romanian-pc.json +1 -0
- package/es/core/keyboard/layouts/sv-Swedish-mac.d.ts +298 -0
- package/es/core/keyboard/layouts/sv-Swedish-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/sv-Swedish-mac.js +296 -0
- package/es/core/keyboard/layouts/sv-Swedish-mac.json +1 -0
- package/es/core/keyboard/layouts/sv-Swedish-pc.d.ts +270 -0
- package/es/core/keyboard/layouts/sv-Swedish-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/sv-Swedish-pc.js +268 -0
- package/es/core/keyboard/layouts/sv-Swedish-pc.json +1 -0
- package/es/core/keyboard/layouts/tr-Turkish_Q-mac.d.ts +297 -0
- package/es/core/keyboard/layouts/tr-Turkish_Q-mac.d.ts.map +1 -0
- package/es/core/keyboard/layouts/tr-Turkish_Q-mac.js +295 -0
- package/es/core/keyboard/layouts/tr-Turkish_Q-mac.json +1 -0
- package/es/core/keyboard/layouts/tr-Turkish_Q-pc.d.ts +282 -0
- package/es/core/keyboard/layouts/tr-Turkish_Q-pc.d.ts.map +1 -0
- package/es/core/keyboard/layouts/tr-Turkish_Q-pc.js +280 -0
- package/es/core/keyboard/layouts/tr-Turkish_Q-pc.json +1 -0
- package/es/core/menu/default-menu-node.d.ts +82 -0
- package/es/core/menu/default-menu-node.d.ts.map +1 -0
- package/es/core/menu/default-menu-node.js +205 -0
- package/es/core/menu/index.d.ts +5 -0
- package/es/core/menu/index.d.ts.map +1 -0
- package/es/core/menu/index.js +39 -0
- package/es/core/menu/menu-protocol.d.ts +101 -0
- package/es/core/menu/menu-protocol.d.ts.map +1 -0
- package/es/core/menu/menu-protocol.js +72 -0
- package/es/core/menu/menu-registry.d.ts +92 -0
- package/es/core/menu/menu-registry.d.ts.map +1 -0
- package/es/core/menu/menu-registry.js +296 -0
- package/es/core/menu/module.d.ts +3 -0
- package/es/core/menu/module.d.ts.map +1 -0
- package/es/core/menu/module.js +31 -0
- package/es/core/module/index.d.ts +4 -0
- package/es/core/module/index.d.ts.map +1 -0
- package/es/core/module/index.js +3 -0
- package/es/core/module/mana-module-context.d.ts +7 -0
- package/es/core/module/mana-module-context.d.ts.map +1 -0
- package/es/core/module/mana-module-context.js +111 -0
- package/es/core/module/mana-module.d.ts +21 -0
- package/es/core/module/mana-module.d.ts.map +1 -0
- package/es/core/module/mana-module.js +71 -0
- package/es/core/module/module-protocol.d.ts +10 -0
- package/es/core/module/module-protocol.d.ts.map +1 -0
- package/es/core/module/module-protocol.js +1 -0
- package/es/core/nls.d.ts +19 -0
- package/es/core/nls.d.ts.map +1 -0
- package/es/core/nls.js +25 -0
- package/es/core/selection/index.d.ts +4 -0
- package/es/core/selection/index.d.ts.map +1 -0
- package/es/core/selection/index.js +4 -0
- package/es/core/selection/selection-service.d.ts +13 -0
- package/es/core/selection/selection-service.d.ts.map +1 -0
- package/es/core/selection/selection-service.js +27 -0
- package/es/core/theme/base-variable-registry.d.ts +31 -0
- package/es/core/theme/base-variable-registry.d.ts.map +1 -0
- package/es/core/theme/base-variable-registry.js +180 -0
- package/es/core/theme/basic/antd-variable-contribution.d.ts +6 -0
- package/es/core/theme/basic/antd-variable-contribution.d.ts.map +1 -0
- package/es/core/theme/basic/antd-variable-contribution.js +667 -0
- package/es/core/theme/basic/default-variable-contribution.d.ts +6 -0
- package/es/core/theme/basic/default-variable-contribution.d.ts.map +1 -0
- package/es/core/theme/basic/default-variable-contribution.js +212 -0
- package/es/core/theme/basic/index.d.ts +3 -0
- package/es/core/theme/basic/index.d.ts.map +1 -0
- package/es/core/theme/basic/index.js +2 -0
- package/es/core/theme/basic/variable-protocol.d.ts +7 -0
- package/es/core/theme/basic/variable-protocol.d.ts.map +1 -0
- package/es/core/theme/basic/variable-protocol.js +2 -0
- package/es/core/theme/basic/variable-registry.d.ts +13 -0
- package/es/core/theme/basic/variable-registry.d.ts.map +1 -0
- package/es/core/theme/basic/variable-registry.js +62 -0
- package/es/core/theme/color/antd-color-contribution.d.ts +6 -0
- package/es/core/theme/color/antd-color-contribution.d.ts.map +1 -0
- package/es/core/theme/color/antd-color-contribution.js +787 -0
- package/es/core/theme/color/color-protocol.d.ts +10 -0
- package/es/core/theme/color/color-protocol.d.ts.map +1 -0
- package/es/core/theme/color/color-protocol.js +2 -0
- package/es/core/theme/color/color-registry.d.ts +72 -0
- package/es/core/theme/color/color-registry.d.ts.map +1 -0
- package/es/core/theme/color/color-registry.js +176 -0
- package/es/core/theme/color/color.d.ts +165 -0
- package/es/core/theme/color/color.d.ts.map +1 -0
- package/es/core/theme/color/color.js +658 -0
- package/es/core/theme/color/default-color-contribution.d.ts +6 -0
- package/es/core/theme/color/default-color-contribution.d.ts.map +1 -0
- package/es/core/theme/color/default-color-contribution.js +550 -0
- package/es/core/theme/color/index.d.ts +3 -0
- package/es/core/theme/color/index.d.ts.map +1 -0
- package/es/core/theme/color/index.js +2 -0
- package/es/core/theme/index.d.ts +8 -0
- package/es/core/theme/index.d.ts.map +1 -0
- package/es/core/theme/index.js +22 -0
- package/es/core/theme/protocol.d.ts +16 -0
- package/es/core/theme/protocol.d.ts.map +1 -0
- package/es/core/theme/protocol.js +1 -0
- package/es/core/theme/style/mana-logo.png +0 -0
- package/es/core/theme/style/theme-base.less +3 -0
- package/es/core/theme/theme-app.d.ts +24 -0
- package/es/core/theme/theme-app.d.ts.map +1 -0
- package/es/core/theme/theme-app.js +151 -0
- package/es/core/theme/theme-service.d.ts +50 -0
- package/es/core/theme/theme-service.d.ts.map +1 -0
- package/es/core/theme/theme-service.js +181 -0
- package/es/core/toolbar/default-toolbar-item.d.ts +38 -0
- package/es/core/toolbar/default-toolbar-item.d.ts.map +1 -0
- package/es/core/toolbar/default-toolbar-item.js +82 -0
- package/es/core/toolbar/index.d.ts +6 -0
- package/es/core/toolbar/index.d.ts.map +1 -0
- package/es/core/toolbar/index.js +20 -0
- package/es/core/toolbar/toolbar-protocol.d.ts +77 -0
- package/es/core/toolbar/toolbar-protocol.d.ts.map +1 -0
- package/es/core/toolbar/toolbar-protocol.js +32 -0
- package/es/core/toolbar/toolbar-registry.d.ts +37 -0
- package/es/core/toolbar/toolbar-registry.d.ts.map +1 -0
- package/es/core/toolbar/toolbar-registry.js +96 -0
- package/es/core/typings/native-keymap.d.ts +72 -0
- package/es/core/utils/hooks.d.ts +12 -0
- package/es/core/utils/hooks.d.ts.map +1 -0
- package/es/core/utils/hooks.js +103 -0
- package/es/core/utils/index.d.ts +4 -0
- package/es/core/utils/index.d.ts.map +1 -0
- package/es/core/utils/index.js +3 -0
- package/es/core/utils/lifecycle.d.ts +75 -0
- package/es/core/utils/lifecycle.d.ts.map +1 -0
- package/es/core/utils/lifecycle.js +350 -0
- package/es/core/utils/map.d.ts +148 -0
- package/es/core/utils/map.d.ts.map +1 -0
- package/es/core/utils/map.js +1196 -0
- package/es/core/view/decorator.d.ts +19 -0
- package/es/core/view/decorator.d.ts.map +1 -0
- package/es/core/view/decorator.js +106 -0
- package/es/core/view/default-slot-view.d.ts +48 -0
- package/es/core/view/default-slot-view.d.ts.map +1 -0
- package/es/core/view/default-slot-view.js +289 -0
- package/es/core/view/default-view.d.ts +35 -0
- package/es/core/view/default-view.d.ts.map +1 -0
- package/es/core/view/default-view.js +90 -0
- package/es/core/view/focus-tracker.d.ts +165 -0
- package/es/core/view/focus-tracker.d.ts.map +1 -0
- package/es/core/view/focus-tracker.js +411 -0
- package/es/core/view/hooks.d.ts +8 -0
- package/es/core/view/hooks.d.ts.map +1 -0
- package/es/core/view/hooks.js +35 -0
- package/es/core/view/index.d.ts +23 -0
- package/es/core/view/index.d.ts.map +1 -0
- package/es/core/view/index.js +22 -0
- package/es/core/view/index.less +4 -0
- package/es/core/view/module.d.ts +3 -0
- package/es/core/view/module.d.ts.map +1 -0
- package/es/core/view/module.js +22 -0
- package/es/core/view/navigatable-types.d.ts +33 -0
- package/es/core/view/navigatable-types.d.ts.map +1 -0
- package/es/core/view/navigatable-types.js +34 -0
- package/es/core/view/navigatable.d.ts +9 -0
- package/es/core/view/navigatable.d.ts.map +1 -0
- package/es/core/view/navigatable.js +47 -0
- package/es/core/view/open-handler.d.ts +71 -0
- package/es/core/view/open-handler.d.ts.map +1 -0
- package/es/core/view/open-handler.js +167 -0
- package/es/core/view/portal-slot-view.d.ts +21 -0
- package/es/core/view/portal-slot-view.d.ts.map +1 -0
- package/es/core/view/portal-slot-view.js +157 -0
- package/es/core/view/root-view.d.ts +26 -0
- package/es/core/view/root-view.d.ts.map +1 -0
- package/es/core/view/root-view.js +139 -0
- package/es/core/view/saveable.d.ts +40 -0
- package/es/core/view/saveable.d.ts.map +1 -0
- package/es/core/view/saveable.js +152 -0
- package/es/core/view/slot-view-manager.d.ts +57 -0
- package/es/core/view/slot-view-manager.d.ts.map +1 -0
- package/es/core/view/slot-view-manager.js +321 -0
- package/es/core/view/slot.d.ts +11 -0
- package/es/core/view/slot.d.ts.map +1 -0
- package/es/core/view/slot.js +57 -0
- package/es/core/view/stateful-view.d.ts +12 -0
- package/es/core/view/stateful-view.d.ts.map +1 -0
- package/es/core/view/stateful-view.js +38 -0
- package/es/core/view/title.d.ts +13 -0
- package/es/core/view/title.d.ts.map +1 -0
- package/es/core/view/title.js +48 -0
- package/es/core/view/utils.d.ts +15 -0
- package/es/core/view/utils.d.ts.map +1 -0
- package/es/core/view/utils.js +35 -0
- package/es/core/view/view-application.d.ts +18 -0
- package/es/core/view/view-application.d.ts.map +1 -0
- package/es/core/view/view-application.js +171 -0
- package/es/core/view/view-container.d.ts +20 -0
- package/es/core/view/view-container.d.ts.map +1 -0
- package/es/core/view/view-container.js +82 -0
- package/es/core/view/view-context.d.ts +8 -0
- package/es/core/view/view-context.d.ts.map +1 -0
- package/es/core/view/view-context.js +29 -0
- package/es/core/view/view-decoration.d.ts +149 -0
- package/es/core/view/view-decoration.d.ts.map +1 -0
- package/es/core/view/view-decoration.js +4 -0
- package/es/core/view/view-manager.d.ts +66 -0
- package/es/core/view/view-manager.d.ts.map +1 -0
- package/es/core/view/view-manager.js +434 -0
- package/es/core/view/view-meta.d.ts +12 -0
- package/es/core/view/view-meta.d.ts.map +1 -0
- package/es/core/view/view-meta.js +35 -0
- package/es/core/view/view-open-handler.d.ts +76 -0
- package/es/core/view/view-open-handler.d.ts.map +1 -0
- package/es/core/view/view-open-handler.js +227 -0
- package/es/core/view/view-protocol.d.ts +171 -0
- package/es/core/view/view-protocol.d.ts.map +1 -0
- package/es/core/view/view-protocol.js +58 -0
- package/es/core/view/view-render.d.ts +9 -0
- package/es/core/view/view-render.d.ts.map +1 -0
- package/es/core/view/view-render.js +37 -0
- package/es/core/view/view-storage.d.ts +40 -0
- package/es/core/view/view-storage.d.ts.map +1 -0
- package/es/core/view/view-storage.js +310 -0
- package/es/index.js +2 -1
- package/es/ioc/container-api.d.ts +9 -0
- package/es/ioc/container-api.d.ts.map +1 -0
- package/es/ioc/container-api.js +32 -0
- package/es/ioc/container.d.ts +37 -0
- package/es/ioc/container.d.ts.map +1 -0
- package/es/ioc/container.js +191 -0
- package/es/ioc/contribution/contribution-protocol.d.ts +24 -0
- package/es/ioc/contribution/contribution-protocol.d.ts.map +1 -0
- package/es/ioc/contribution/contribution-protocol.js +16 -0
- package/es/ioc/contribution/contribution-provider.d.ts +21 -0
- package/es/ioc/contribution/contribution-provider.d.ts.map +1 -0
- package/es/ioc/contribution/contribution-provider.js +81 -0
- package/es/ioc/contribution/contribution-register.d.ts +5 -0
- package/es/ioc/contribution/contribution-register.d.ts.map +1 -0
- package/es/ioc/contribution/contribution-register.js +27 -0
- package/es/ioc/contribution/decorator.d.ts +3 -0
- package/es/ioc/contribution/decorator.d.ts.map +1 -0
- package/es/ioc/contribution/decorator.js +8 -0
- package/es/ioc/contribution/index.d.ts +12 -0
- package/es/ioc/contribution/index.d.ts.map +1 -0
- package/es/ioc/contribution/index.js +10 -0
- package/es/ioc/core.d.ts +105 -0
- package/es/ioc/core.d.ts.map +1 -0
- package/es/ioc/core.js +104 -0
- package/es/ioc/decorator.d.ts +9 -0
- package/es/ioc/decorator.d.ts.map +1 -0
- package/es/ioc/decorator.js +56 -0
- package/es/ioc/features/auto-factory.d.ts +8 -0
- package/es/ioc/features/auto-factory.d.ts.map +1 -0
- package/es/ioc/features/auto-factory.js +34 -0
- package/es/ioc/features/prioritized-contribution.d.ts +12 -0
- package/es/ioc/features/prioritized-contribution.d.ts.map +1 -0
- package/es/ioc/features/prioritized-contribution.js +40 -0
- package/es/ioc/index.d.ts +9 -0
- package/es/ioc/index.d.ts.map +1 -0
- package/es/ioc/index.js +8 -0
- package/es/ioc/inversify-api/index.d.ts +15 -0
- package/es/ioc/inversify-api/index.d.ts.map +1 -0
- package/es/ioc/inversify-api/index.js +48 -0
- package/es/ioc/inversify-api/inversify-protocol.d.ts +13 -0
- package/es/ioc/inversify-api/inversify-protocol.d.ts.map +1 -0
- package/es/ioc/inversify-api/inversify-protocol.js +7 -0
- package/es/ioc/module/index.d.ts +4 -0
- package/es/ioc/module/index.d.ts.map +1 -0
- package/es/ioc/module/index.js +5 -0
- package/es/ioc/module/syringe-module.d.ts +29 -0
- package/es/ioc/module/syringe-module.d.ts.map +1 -0
- package/es/ioc/module/syringe-module.js +110 -0
- package/es/ioc/register.d.ts +33 -0
- package/es/ioc/register.d.ts.map +1 -0
- package/es/ioc/register.js +194 -0
- package/es/ioc/side-option.d.ts +4 -0
- package/es/ioc/side-option.d.ts.map +1 -0
- package/es/ioc/side-option.js +4 -0
- package/es/l10n/index.d.ts +3 -0
- package/es/l10n/index.d.ts.map +1 -0
- package/es/l10n/index.js +2 -0
- package/es/l10n/l10n/index.d.ts +144 -0
- package/es/l10n/l10n/index.d.ts.map +1 -0
- package/es/l10n/l10n/index.js +269 -0
- package/es/l10n/l10n/platform.d.ts +3 -0
- package/es/l10n/l10n/platform.d.ts.map +1 -0
- package/es/l10n/l10n/platform.js +20 -0
- package/es/l10n/lang/bundle.l10n.en-US.json +5 -0
- package/es/l10n/lang/bundle.l10n.zh-CN.json +5 -0
- package/es/l10n/lang/index.d.ts +3 -0
- package/es/l10n/lang/index.d.ts.map +1 -0
- package/es/l10n/lang/index.js +6 -0
- package/es/observable/async-event.d.ts +28 -0
- package/es/observable/async-event.d.ts.map +1 -0
- package/es/observable/async-event.js +158 -0
- package/es/observable/config.d.ts +10 -0
- package/es/observable/config.d.ts.map +1 -0
- package/es/observable/config.js +58 -0
- package/es/observable/context.d.ts +15 -0
- package/es/observable/context.d.ts.map +1 -0
- package/es/observable/context.js +44 -0
- package/es/observable/core.d.ts +24 -0
- package/es/observable/core.d.ts.map +1 -0
- package/es/observable/core.js +11 -0
- package/es/observable/decorator.d.ts +9 -0
- package/es/observable/decorator.d.ts.map +1 -0
- package/es/observable/decorator.js +19 -0
- package/es/observable/hooks.d.ts +6 -0
- package/es/observable/hooks.d.ts.map +1 -0
- package/es/observable/hooks.js +44 -0
- package/es/observable/index.d.ts +12 -0
- package/es/observable/index.d.ts.map +1 -0
- package/es/observable/index.js +11 -0
- package/es/observable/notifiable.d.ts +19 -0
- package/es/observable/notifiable.d.ts.map +1 -0
- package/es/observable/notifiable.js +198 -0
- package/es/observable/notifier.d.ts +33 -0
- package/es/observable/notifier.d.ts.map +1 -0
- package/es/observable/notifier.js +154 -0
- package/es/observable/observable.d.ts +3 -0
- package/es/observable/observable.d.ts.map +1 -0
- package/es/observable/observable.js +87 -0
- package/es/observable/tracker.d.ts +27 -0
- package/es/observable/tracker.d.ts.map +1 -0
- package/es/observable/tracker.js +225 -0
- package/es/observable/utils.d.ts +31 -0
- package/es/observable/utils.d.ts.map +1 -0
- package/es/observable/utils.js +139 -0
- package/es/observable/watch.d.ts +5 -0
- package/es/observable/watch.d.ts.map +1 -0
- package/es/observable/watch.js +56 -0
- package/es/polling/poll.d.ts +3 -3
- package/es/polling/poll.d.ts.map +1 -1
- package/es/polling/poll.js +1 -1
- package/es/polling/protocol.d.ts +1 -1
- package/es/polling/protocol.d.ts.map +1 -1
- package/es/protocol/cell-protocol.d.ts +1 -1
- package/es/protocol/cell-protocol.d.ts.map +1 -1
- package/es/protocol/cell-protocol.js +1 -1
- package/es/react/constant.d.ts +2 -0
- package/es/react/constant.d.ts.map +1 -0
- package/es/react/constant.js +1 -0
- package/es/react/dropdown/index.d.ts +23 -0
- package/es/react/dropdown/index.d.ts.map +1 -0
- package/es/react/dropdown/index.js +53 -0
- package/es/react/dropdown/styles/index.less +121 -0
- package/es/react/index.d.ts +8 -0
- package/es/react/index.d.ts.map +1 -0
- package/es/react/index.js +7 -0
- package/es/react/layout/boxpanel/Pane.d.ts +13 -0
- package/es/react/layout/boxpanel/Pane.d.ts.map +1 -0
- package/es/react/layout/boxpanel/Pane.js +37 -0
- package/es/react/layout/boxpanel/context.d.ts +8 -0
- package/es/react/layout/boxpanel/context.d.ts.map +1 -0
- package/es/react/layout/boxpanel/context.js +4 -0
- package/es/react/layout/boxpanel/index.d.ts +19 -0
- package/es/react/layout/boxpanel/index.d.ts.map +1 -0
- package/es/react/layout/boxpanel/index.js +46 -0
- package/es/react/layout/boxpanel/styles/index.less +14 -0
- package/es/react/layout/layout.d.ts +12 -0
- package/es/react/layout/layout.d.ts.map +1 -0
- package/es/react/layout/layout.js +68 -0
- package/es/react/layout/splitpanel/context.d.ts +15 -0
- package/es/react/layout/splitpanel/context.d.ts.map +1 -0
- package/es/react/layout/splitpanel/context.js +24 -0
- package/es/react/layout/splitpanel/index.d.ts +23 -0
- package/es/react/layout/splitpanel/index.d.ts.map +1 -0
- package/es/react/layout/splitpanel/index.js +287 -0
- package/es/react/layout/splitpanel/pane.d.ts +18 -0
- package/es/react/layout/splitpanel/pane.d.ts.map +1 -0
- package/es/react/layout/splitpanel/pane.js +8 -0
- package/es/react/layout/splitpanel/styles/index.less +10 -0
- package/es/react/menu/context.d.ts +8 -0
- package/es/react/menu/context.d.ts.map +1 -0
- package/es/react/menu/context.js +4 -0
- package/es/react/menu/divider.d.ts +3 -0
- package/es/react/menu/divider.d.ts.map +1 -0
- package/es/react/menu/divider.js +10 -0
- package/es/react/menu/index.d.ts +4 -0
- package/es/react/menu/index.d.ts.map +1 -0
- package/es/react/menu/index.js +3 -0
- package/es/react/menu/item.d.ts +19 -0
- package/es/react/menu/item.d.ts.map +1 -0
- package/es/react/menu/item.js +69 -0
- package/es/react/menu/menu.d.ts +17 -0
- package/es/react/menu/menu.d.ts.map +1 -0
- package/es/react/menu/menu.js +35 -0
- package/es/react/menu/styles/index.less +163 -0
- package/es/react/menu/submenu.d.ts +5 -0
- package/es/react/menu/submenu.d.ts.map +1 -0
- package/es/react/menu/submenu.js +33 -0
- package/es/react/menubar/context.d.ts +14 -0
- package/es/react/menubar/context.d.ts.map +1 -0
- package/es/react/menubar/context.js +2 -0
- package/es/react/menubar/index.d.ts +2 -0
- package/es/react/menubar/index.d.ts.map +1 -0
- package/es/react/menubar/index.js +1 -0
- package/es/react/menubar/item.d.ts +8 -0
- package/es/react/menubar/item.d.ts.map +1 -0
- package/es/react/menubar/item.js +94 -0
- package/es/react/menubar/menubar.d.ts +15 -0
- package/es/react/menubar/menubar.d.ts.map +1 -0
- package/es/react/menubar/menubar.js +119 -0
- package/es/react/menubar/styles/index.less +113 -0
- package/es/react/notification/index.d.ts +20 -0
- package/es/react/notification/index.d.ts.map +1 -0
- package/es/react/notification/index.js +154 -0
- package/es/react/notification/protocol.d.ts +111 -0
- package/es/react/notification/protocol.d.ts.map +1 -0
- package/es/react/notification/protocol.js +61 -0
- package/es/react/notification/pure-panel.d.ts +28 -0
- package/es/react/notification/pure-panel.d.ts.map +1 -0
- package/es/react/notification/pure-panel.js +115 -0
- package/es/react/notification/render.d.ts +10 -0
- package/es/react/notification/render.d.ts.map +1 -0
- package/es/react/notification/render.js +101 -0
- package/es/react/notification/style/index.d.ts +2 -0
- package/es/react/notification/style/index.d.ts.map +1 -0
- package/es/react/notification/style/index.js +1 -0
- package/es/react/notification/style/index.less +192 -0
- package/es/react/notification/style/placement.less +68 -0
- package/es/react/notification/use-notification.d.ts +9 -0
- package/es/react/notification/use-notification.d.ts.map +1 -0
- package/es/react/notification/use-notification.js +173 -0
- package/es/react/resize/index.d.ts +41 -0
- package/es/react/resize/index.d.ts.map +1 -0
- package/es/react/resize/index.js +640 -0
- package/es/react/resize/styles/index.less +83 -0
- package/es/react/styles/variables.less +2 -0
- package/es/react/tabs/index.d.ts +19 -0
- package/es/react/tabs/index.d.ts.map +1 -0
- package/es/react/tabs/index.js +51 -0
- package/es/react/tabs/styles/card.less +111 -0
- package/es/react/tabs/styles/dropdown.less +70 -0
- package/es/react/tabs/styles/index.less +231 -0
- package/es/react/tabs/styles/position.less +217 -0
- package/es/react/typings/index.d.ts +5 -0
- package/es/react/util.d.ts +2 -0
- package/es/react/util.d.ts.map +1 -0
- package/es/react/util.js +4 -0
- package/es/url.js +1 -1
- package/package.json +55 -11
- package/src/app/app.tsx +23 -0
- package/src/app/file-tree/file-selection.ts +33 -0
- package/src/app/file-tree/file-service.ts +67 -0
- package/src/app/file-tree/file-tree-component.tsx +11 -0
- package/src/app/file-tree/file-tree-icon.tsx +15 -0
- package/src/app/file-tree/file-tree-label-provider.ts +54 -0
- package/src/app/file-tree/file-tree-model.ts +240 -0
- package/src/app/file-tree/file-tree-protocol.ts +35 -0
- package/src/app/file-tree/file-tree-view.tsx +340 -0
- package/src/app/file-tree/file-tree.ts +193 -0
- package/src/app/file-tree/files.ts +990 -0
- package/src/app/file-tree/filesystem-utils.ts +32 -0
- package/src/app/file-tree/index.ts +6 -0
- package/src/app/file-tree/module.ts +21 -0
- package/src/app/file-tree/selection-command-handler.ts +101 -0
- package/src/app/file-tree/style/file-icon.less +51 -0
- package/src/app/index.spec.ts +20 -0
- package/src/app/index.ts +37 -0
- package/src/app/label/index.ts +12 -0
- package/src/app/label/label-provider.tsx +454 -0
- package/src/app/menu/index.ts +24 -0
- package/src/app/menu/menu-bar-render.tsx +52 -0
- package/src/app/menu/menu-color-registry.ts +52 -0
- package/src/app/menu/menu-context.tsx +16 -0
- package/src/app/menu/menu-item-keeper.tsx +55 -0
- package/src/app/menu/menu-item-render.tsx +15 -0
- package/src/app/menu/menu-protocol.ts +22 -0
- package/src/app/menu/menu-render.tsx +92 -0
- package/src/app/menu/menu.tsx +212 -0
- package/src/app/modal/index.ts +29 -0
- package/src/app/modal/modal-contribution.ts +13 -0
- package/src/app/modal/modal-protocol.tsx +30 -0
- package/src/app/modal/modal-render.tsx +22 -0
- package/src/app/modal/modal-service.ts +166 -0
- package/src/app/notification/index.less +20 -0
- package/src/app/notification/index.ts +8 -0
- package/src/app/notification/protocol.ts +16 -0
- package/src/app/notification/service.tsx +60 -0
- package/src/app/style/index.less +181 -0
- package/src/app/style/style-protocol.ts +13 -0
- package/src/app/toolbar/index.less +40 -0
- package/src/app/toolbar/index.ts +20 -0
- package/src/app/toolbar/toolbar-item-keeper.tsx +45 -0
- package/src/app/toolbar/toolbar-item-render.tsx +23 -0
- package/src/app/toolbar/toolbar-protocol.ts +10 -0
- package/src/app/toolbar/toolbar-render.tsx +102 -0
- package/src/app/toolbar/toolbar-visible-render.tsx +21 -0
- package/src/app/toolbar/toolbar.tsx +241 -0
- package/src/app/tree/components/index.tsx +22 -0
- package/src/app/tree/components/tree-ident.tsx +44 -0
- package/src/app/tree/components/tree-node-caption-affix.tsx +47 -0
- package/src/app/tree/components/tree-node-caption.tsx +128 -0
- package/src/app/tree/components/tree-node-expansion.tsx +36 -0
- package/src/app/tree/components/tree-node-icon-decorator.tsx +75 -0
- package/src/app/tree/components/tree-node-icon.tsx +3 -0
- package/src/app/tree/components/tree-node-tail-decoration.tsx +59 -0
- package/src/app/tree/components/tree-node.tsx +38 -0
- package/src/app/tree/components/tree-switch-icon.tsx +13 -0
- package/src/app/tree/index.ts +15 -0
- package/src/app/tree/module.ts +30 -0
- package/src/app/tree/style/index.less +206 -0
- package/src/app/tree/style/tree-decorator.less +65 -0
- package/src/app/tree/tree-decorator.ts +216 -0
- package/src/app/tree/tree-expansion.ts +162 -0
- package/src/app/tree/tree-impl.ts +182 -0
- package/src/app/tree/tree-iterator.ts +243 -0
- package/src/app/tree/tree-label-provider.ts +23 -0
- package/src/app/tree/tree-model.ts +468 -0
- package/src/app/tree/tree-navigation.ts +41 -0
- package/src/app/tree/tree-protocol.ts +77 -0
- package/src/app/tree/tree-selection-impl.ts +169 -0
- package/src/app/tree/tree-selection-state.ts +271 -0
- package/src/app/tree/tree-selection.ts +138 -0
- package/src/app/tree/tree-view-decoration.ts +349 -0
- package/src/app/tree/tree.ts +288 -0
- package/src/app/tree/view/index.less +3 -0
- package/src/app/tree/view/index.ts +3 -0
- package/src/app/tree/view/tree-view-decorator.ts +91 -0
- package/src/app/tree/view/tree-view-module.ts +16 -0
- package/src/app/tree/view/tree-view-selection.ts +33 -0
- package/src/app/tree/view/tree-view.tsx +925 -0
- package/src/app/typings/index.d.ts +7 -0
- package/src/app/view/box/index.tsx +66 -0
- package/src/app/view/components/index.ts +1 -0
- package/src/app/view/components/loading/index.less +10 -0
- package/src/app/view/components/loading/index.tsx +4 -0
- package/src/app/view/flex/index.less +3 -0
- package/src/app/view/flex/index.tsx +57 -0
- package/src/app/view/header/header-view.tsx +35 -0
- package/src/app/view/header/index.less +43 -0
- package/src/app/view/header/index.ts +24 -0
- package/src/app/view/index.ts +15 -0
- package/src/app/view/tab/card-tab-view.tsx +34 -0
- package/src/app/view/tab/index.less +70 -0
- package/src/app/view/tab/index.ts +3 -0
- package/src/app/view/tab/side-tab-view.tsx +95 -0
- package/src/app/view/tab/tab-menu.ts +24 -0
- package/src/app/view/tab/tab-protocol.ts +3 -0
- package/src/app/view/tab/tab-view.tsx +153 -0
- package/src/common/assert.ts +13 -0
- package/src/common/cancellation.spec.ts +160 -0
- package/src/common/cancellation.ts +143 -0
- package/src/common/charCode.ts +434 -0
- package/src/common/collections.ts +158 -0
- package/src/common/deferred.ts +17 -0
- package/src/common/disposable-collection.ts +87 -0
- package/src/common/disposable.spec.ts +93 -0
- package/src/common/disposable.ts +41 -0
- package/src/common/event.spec.ts +182 -0
- package/src/common/event.ts +249 -0
- package/src/common/index.ts +27 -0
- package/src/common/iterator.ts +228 -0
- package/src/common/linkedList.ts +125 -0
- package/src/common/objects.ts +249 -0
- package/src/common/observable-disposable.ts +12 -0
- package/src/common/path.spec.ts +33 -0
- package/src/common/path.ts +226 -0
- package/src/common/platform.ts +281 -0
- package/src/common/priority.ts +79 -0
- package/src/common/promise-util.spec.ts +68 -0
- package/src/common/promise-util.ts +34 -0
- package/src/common/stopwatch.ts +40 -0
- package/src/common/strings.ts +513 -0
- package/src/common/types.spec.ts +16 -0
- package/src/common/types.ts +30 -0
- package/src/common/uint.ts +59 -0
- package/src/common/uri.spec.ts +73 -0
- package/src/common/uri.ts +208 -0
- package/src/common/utils.spec.ts +22 -0
- package/src/common/utils.ts +35 -0
- package/src/common/valueTypes.ts +311 -0
- package/src/common/vscode-uri/char-code.ts +438 -0
- package/src/common/vscode-uri/index.ts +11 -0
- package/src/common/vscode-uri/platform.ts +20 -0
- package/src/common/vscode-uri/uri.ts +757 -0
- package/src/common/vscode-uri/utils.ts +101 -0
- package/src/common/wait-until-event.spec.ts +70 -0
- package/src/common/wait-until-event.ts +49 -0
- package/src/core/application/application-protocol.ts +20 -0
- package/src/core/application/application-state.ts +68 -0
- package/src/core/application/application.ts +294 -0
- package/src/core/application/default-window-service.ts +66 -0
- package/src/core/application/index.ts +12 -0
- package/src/core/application/mock-window-service.ts +17 -0
- package/src/core/browser.ts +144 -0
- package/src/core/command/command-protocol.ts +152 -0
- package/src/core/command/command-registry.ts +432 -0
- package/src/core/command/index.ts +10 -0
- package/src/core/common/debug.ts +6 -0
- package/src/core/common/index.ts +23 -0
- package/src/core/common/storage-protocol.ts +25 -0
- package/src/core/common/storage-service.ts +81 -0
- package/src/core/components/application.tsx +144 -0
- package/src/core/components/context.tsx +67 -0
- package/src/core/components/hooks.tsx +23 -0
- package/src/core/components/index.less +28 -0
- package/src/core/components/index.tsx +10 -0
- package/src/core/components/root-view-render.tsx +13 -0
- package/src/core/configuration/configuration-cache.ts +50 -0
- package/src/core/configuration/configuration-protocol.ts +55 -0
- package/src/core/configuration/configuration-provider.ts +105 -0
- package/src/core/configuration/configuration-registry.ts +237 -0
- package/src/core/configuration/configuration-render-registry.ts +93 -0
- package/src/core/configuration/configuration-service.ts +190 -0
- package/src/core/configuration/configuration-storage.ts +26 -0
- package/src/core/configuration/configuration.test.ts +7 -0
- package/src/core/configuration/hooks.ts +39 -0
- package/src/core/configuration/index.ts +10 -0
- package/src/core/configuration/module.ts +34 -0
- package/src/core/configuration/typings.d.ts +1 -0
- package/src/core/configuration/validation.ts +33 -0
- package/src/core/context/data-context-manager.ts +65 -0
- package/src/core/context/data-context-protocol.ts +21 -0
- package/src/core/context/data-context.tsx +40 -0
- package/src/core/context/index.ts +15 -0
- package/src/core/index.spec.ts +14 -0
- package/src/core/index.ts +57 -0
- package/src/core/keybinding/context-key-service.ts +77 -0
- package/src/core/keybinding/index.ts +5 -0
- package/src/core/keybinding/keybinding-proocol.ts +15 -0
- package/src/core/keybinding/keybinding.ts +857 -0
- package/src/core/keybinding/module.ts +23 -0
- package/src/core/keybinding/vs/configuration/configuration.ts +460 -0
- package/src/core/keybinding/vs/configuration/configurationModels.ts +962 -0
- package/src/core/keybinding/vs/configuration/configurationRegistry.ts +617 -0
- package/src/core/keybinding/vs/configuration/configurationService.ts +172 -0
- package/src/core/keybinding/vs/configuration/json.ts +1509 -0
- package/src/core/keybinding/vs/contextKeyService.ts +694 -0
- package/src/core/keybinding/vs/contextkey.ts +1494 -0
- package/src/core/keybinding/vs/contextkeys.ts +52 -0
- package/src/core/keybinding/vs/jsonContributionRegistry.ts +74 -0
- package/src/core/keybinding/vs/jsonSchema.ts +85 -0
- package/src/core/keybinding/vs/platform.test.ts +50 -0
- package/src/core/keybinding/vs/platform.ts +50 -0
- package/src/core/keyboard/browser-keyboard-layout-provider.ts +455 -0
- package/src/core/keyboard/index.ts +4 -0
- package/src/core/keyboard/keyboard-layout-service.ts +490 -0
- package/src/core/keyboard/keyboard-protocol.ts +34 -0
- package/src/core/keyboard/keys.ts +787 -0
- package/src/core/keyboard/layouts/cs-Czech-mac.json +1 -0
- package/src/core/keyboard/layouts/cs-Czech-mac.ts +53 -0
- package/src/core/keyboard/layouts/cs-Czech-pc.json +1 -0
- package/src/core/keyboard/layouts/cs-Czech-pc.ts +55 -0
- package/src/core/keyboard/layouts/da-Danish-mac.json +1 -0
- package/src/core/keyboard/layouts/da-Danish-mac.ts +53 -0
- package/src/core/keyboard/layouts/da-Danish-pc.json +1 -0
- package/src/core/keyboard/layouts/da-Danish-pc.ts +55 -0
- package/src/core/keyboard/layouts/de-German-mac.json +1 -0
- package/src/core/keyboard/layouts/de-German-mac.ts +53 -0
- package/src/core/keyboard/layouts/de-German-pc.json +1 -0
- package/src/core/keyboard/layouts/de-German-pc.ts +61 -0
- package/src/core/keyboard/layouts/de-Swiss_German-mac.json +1 -0
- package/src/core/keyboard/layouts/de-Swiss_German-mac.ts +53 -0
- package/src/core/keyboard/layouts/de-Swiss_German-pc.json +1 -0
- package/src/core/keyboard/layouts/de-Swiss_German-pc.ts +55 -0
- package/src/core/keyboard/layouts/en-British-mac.json +1 -0
- package/src/core/keyboard/layouts/en-British-mac.ts +53 -0
- package/src/core/keyboard/layouts/en-British-pc.json +1 -0
- package/src/core/keyboard/layouts/en-British-pc.ts +91 -0
- package/src/core/keyboard/layouts/en-Colemak-mac.json +1 -0
- package/src/core/keyboard/layouts/en-Colemak-mac.ts +53 -0
- package/src/core/keyboard/layouts/en-Dvorak-mac.json +1 -0
- package/src/core/keyboard/layouts/en-Dvorak-mac.ts +53 -0
- package/src/core/keyboard/layouts/en-Dvorak-pc.json +1 -0
- package/src/core/keyboard/layouts/en-Dvorak-pc.ts +55 -0
- package/src/core/keyboard/layouts/en-Dvorak_Lefthanded-mac.json +1 -0
- package/src/core/keyboard/layouts/en-Dvorak_Lefthanded-mac.ts +53 -0
- package/src/core/keyboard/layouts/en-Dvorak_Lefthanded-pc.json +1 -0
- package/src/core/keyboard/layouts/en-Dvorak_Lefthanded-pc.ts +55 -0
- package/src/core/keyboard/layouts/en-Dvorak_Righthanded-mac.json +1 -0
- package/src/core/keyboard/layouts/en-Dvorak_Righthanded-mac.ts +53 -0
- package/src/core/keyboard/layouts/en-Dvorak_Righthanded-pc.json +1 -0
- package/src/core/keyboard/layouts/en-Dvorak_Righthanded-pc.ts +55 -0
- package/src/core/keyboard/layouts/en-US-mac.json +1 -0
- package/src/core/keyboard/layouts/en-US-mac.ts +53 -0
- package/src/core/keyboard/layouts/en-US-pc.json +1 -0
- package/src/core/keyboard/layouts/en-US-pc.ts +55 -0
- package/src/core/keyboard/layouts/es-Spanish-mac.json +1 -0
- package/src/core/keyboard/layouts/es-Spanish-mac.ts +53 -0
- package/src/core/keyboard/layouts/es-Spanish-pc.json +1 -0
- package/src/core/keyboard/layouts/es-Spanish-pc.ts +55 -0
- package/src/core/keyboard/layouts/fr-Bepo-pc.json +1 -0
- package/src/core/keyboard/layouts/fr-Bepo-pc.ts +289 -0
- package/src/core/keyboard/layouts/fr-Canadian_French-mac.json +1 -0
- package/src/core/keyboard/layouts/fr-Canadian_French-mac.ts +53 -0
- package/src/core/keyboard/layouts/fr-Canadian_French-pc.json +1 -0
- package/src/core/keyboard/layouts/fr-Canadian_French-pc.ts +55 -0
- package/src/core/keyboard/layouts/fr-French-mac.json +1 -0
- package/src/core/keyboard/layouts/fr-French-mac.ts +53 -0
- package/src/core/keyboard/layouts/fr-French-pc.json +1 -0
- package/src/core/keyboard/layouts/fr-French-pc.ts +55 -0
- package/src/core/keyboard/layouts/fr-Swiss_French-mac.json +1 -0
- package/src/core/keyboard/layouts/fr-Swiss_French-mac.ts +53 -0
- package/src/core/keyboard/layouts/fr-Swiss_French-pc.json +1 -0
- package/src/core/keyboard/layouts/fr-Swiss_French-pc.ts +55 -0
- package/src/core/keyboard/layouts/hu-Hungarian-mac.json +1 -0
- package/src/core/keyboard/layouts/hu-Hungarian-mac.ts +53 -0
- package/src/core/keyboard/layouts/hu-Hungarian-pc.json +1 -0
- package/src/core/keyboard/layouts/hu-Hungarian-pc.ts +55 -0
- package/src/core/keyboard/layouts/index.ts +59 -0
- package/src/core/keyboard/layouts/it-Italian-mac.json +1 -0
- package/src/core/keyboard/layouts/it-Italian-mac.ts +53 -0
- package/src/core/keyboard/layouts/it-Italian-pc.json +1 -0
- package/src/core/keyboard/layouts/it-Italian-pc.ts +67 -0
- package/src/core/keyboard/layouts/nb-Norwegian-mac.json +1 -0
- package/src/core/keyboard/layouts/nb-Norwegian-mac.ts +53 -0
- package/src/core/keyboard/layouts/nb-Norwegian-pc.json +1 -0
- package/src/core/keyboard/layouts/nb-Norwegian-pc.ts +55 -0
- package/src/core/keyboard/layouts/nl-Dutch-mac.json +1 -0
- package/src/core/keyboard/layouts/nl-Dutch-mac.ts +53 -0
- package/src/core/keyboard/layouts/nl-Dutch-pc.json +1 -0
- package/src/core/keyboard/layouts/nl-Dutch-pc.ts +55 -0
- package/src/core/keyboard/layouts/pl-Polish-mac.json +1 -0
- package/src/core/keyboard/layouts/pl-Polish-mac.ts +53 -0
- package/src/core/keyboard/layouts/pl-Polish-pc.json +1 -0
- package/src/core/keyboard/layouts/pl-Polish-pc.ts +55 -0
- package/src/core/keyboard/layouts/pt-Brazilian-mac.json +1 -0
- package/src/core/keyboard/layouts/pt-Brazilian-mac.ts +53 -0
- package/src/core/keyboard/layouts/pt-Portuguese-mac.json +1 -0
- package/src/core/keyboard/layouts/pt-Portuguese-mac.ts +53 -0
- package/src/core/keyboard/layouts/pt-Portuguese-pc.json +65 -0
- package/src/core/keyboard/layouts/pt-Portuguese-pc.ts +55 -0
- package/src/core/keyboard/layouts/ro-Romanian-mac.json +1 -0
- package/src/core/keyboard/layouts/ro-Romanian-mac.ts +53 -0
- package/src/core/keyboard/layouts/ro-Romanian-pc.json +1 -0
- package/src/core/keyboard/layouts/ro-Romanian-pc.ts +127 -0
- package/src/core/keyboard/layouts/sv-Swedish-mac.json +1 -0
- package/src/core/keyboard/layouts/sv-Swedish-mac.ts +53 -0
- package/src/core/keyboard/layouts/sv-Swedish-pc.json +1 -0
- package/src/core/keyboard/layouts/sv-Swedish-pc.ts +55 -0
- package/src/core/keyboard/layouts/tr-Turkish_Q-mac.json +1 -0
- package/src/core/keyboard/layouts/tr-Turkish_Q-mac.ts +53 -0
- package/src/core/keyboard/layouts/tr-Turkish_Q-pc.json +1 -0
- package/src/core/keyboard/layouts/tr-Turkish_Q-pc.ts +67 -0
- package/src/core/menu/default-menu-node.ts +210 -0
- package/src/core/menu/index.ts +39 -0
- package/src/core/menu/menu-protocol.ts +142 -0
- package/src/core/menu/menu-registry.ts +271 -0
- package/src/core/menu/module.ts +32 -0
- package/src/core/module/index.ts +3 -0
- package/src/core/module/mana-module-context.ts +40 -0
- package/src/core/module/mana-module.test.ts +161 -0
- package/src/core/module/mana-module.ts +44 -0
- package/src/core/module/module-protocol.ts +12 -0
- package/src/core/nls.ts +46 -0
- package/src/core/selection/index.ts +7 -0
- package/src/core/selection/selection-service.ts +26 -0
- package/src/core/theme/base-variable-registry.ts +132 -0
- package/src/core/theme/basic/antd-variable-contribution.ts +849 -0
- package/src/core/theme/basic/default-variable-contribution.ts +163 -0
- package/src/core/theme/basic/index.spec.ts +16 -0
- package/src/core/theme/basic/index.ts +2 -0
- package/src/core/theme/basic/variable-protocol.ts +8 -0
- package/src/core/theme/basic/variable-registry.ts +23 -0
- package/src/core/theme/color/antd-color-contribution.ts +994 -0
- package/src/core/theme/color/color-protocol.ts +12 -0
- package/src/core/theme/color/color-registry.ts +140 -0
- package/src/core/theme/color/color.ts +695 -0
- package/src/core/theme/color/default-color-contribution.ts +502 -0
- package/src/core/theme/color/index.spec.ts +33 -0
- package/src/core/theme/color/index.ts +2 -0
- package/src/core/theme/index.spec.ts +17 -0
- package/src/core/theme/index.ts +37 -0
- package/src/core/theme/protocol.ts +19 -0
- package/src/core/theme/style/mana-logo.png +0 -0
- package/src/core/theme/style/theme-base.less +3 -0
- package/src/core/theme/theme-app.ts +80 -0
- package/src/core/theme/theme-service.ts +170 -0
- package/src/core/toolbar/default-toolbar-item.ts +80 -0
- package/src/core/toolbar/index.ts +23 -0
- package/src/core/toolbar/toolbar-protocol.ts +112 -0
- package/src/core/toolbar/toolbar-registry.ts +77 -0
- package/src/core/typings/native-keymap.d.ts +72 -0
- package/src/core/utils/hooks.ts +108 -0
- package/src/core/utils/index.ts +3 -0
- package/src/core/utils/lifecycle.ts +335 -0
- package/src/core/utils/map.ts +1020 -0
- package/src/core/view/decorator.ts +87 -0
- package/src/core/view/default-slot-view.tsx +231 -0
- package/src/core/view/default-view.tsx +70 -0
- package/src/core/view/focus-tracker.ts +363 -0
- package/src/core/view/hooks.tsx +40 -0
- package/src/core/view/index.less +4 -0
- package/src/core/view/index.ts +22 -0
- package/src/core/view/module.ts +41 -0
- package/src/core/view/navigatable-types.ts +49 -0
- package/src/core/view/navigatable.ts +29 -0
- package/src/core/view/open-handler.ts +122 -0
- package/src/core/view/portal-slot-view.tsx +107 -0
- package/src/core/view/root-view.tsx +102 -0
- package/src/core/view/saveable.ts +146 -0
- package/src/core/view/slot-view-manager.ts +199 -0
- package/src/core/view/slot.tsx +68 -0
- package/src/core/view/stateful-view.ts +22 -0
- package/src/core/view/title.tsx +24 -0
- package/src/core/view/utils.tsx +48 -0
- package/src/core/view/view-application.ts +70 -0
- package/src/core/view/view-container.tsx +91 -0
- package/src/core/view/view-context.tsx +37 -0
- package/src/core/view/view-decoration.ts +160 -0
- package/src/core/view/view-manager.ts +271 -0
- package/src/core/view/view-meta.ts +24 -0
- package/src/core/view/view-open-handler.ts +139 -0
- package/src/core/view/view-protocol.ts +218 -0
- package/src/core/view/view-render.tsx +39 -0
- package/src/core/view/view-storage.ts +218 -0
- package/src/index.ts +1 -0
- package/src/ioc/container-api.ts +22 -0
- package/src/ioc/container.spec.ts +291 -0
- package/src/ioc/container.ts +171 -0
- package/src/ioc/contribution/contribution-protocol.ts +27 -0
- package/src/ioc/contribution/contribution-provider.ts +73 -0
- package/src/ioc/contribution/contribution-register.ts +32 -0
- package/src/ioc/contribution/decorator.ts +16 -0
- package/src/ioc/contribution/index.spec.ts +174 -0
- package/src/ioc/contribution/index.ts +13 -0
- package/src/ioc/core.ts +198 -0
- package/src/ioc/decorator.spec.ts +43 -0
- package/src/ioc/decorator.ts +54 -0
- package/src/ioc/features/auto-factory.spec.ts +90 -0
- package/src/ioc/features/auto-factory.ts +44 -0
- package/src/ioc/features/prioritized-contribution.ts +43 -0
- package/src/ioc/index.ts +8 -0
- package/src/ioc/inversify-api/index.spec.ts +224 -0
- package/src/ioc/inversify-api/index.ts +76 -0
- package/src/ioc/inversify-api/inversify-protocol.ts +31 -0
- package/src/ioc/module/index.spec.ts +68 -0
- package/src/ioc/module/index.ts +7 -0
- package/src/ioc/module/syringe-module.ts +95 -0
- package/src/ioc/register.spec.ts +75 -0
- package/src/ioc/register.ts +210 -0
- package/src/ioc/side-option.spec.ts +39 -0
- package/src/ioc/side-option.ts +14 -0
- package/src/l10n/index.ts +2 -0
- package/src/l10n/l10n/index.test.ts +145 -0
- package/src/l10n/l10n/index.ts +319 -0
- package/src/l10n/l10n/platform.ts +51 -0
- package/src/l10n/lang/bundle.l10n.en-US.json +5 -0
- package/src/l10n/lang/bundle.l10n.zh-CN.json +5 -0
- package/src/l10n/lang/index.ts +9 -0
- package/src/observable/async-event.spec.tsx +64 -0
- package/src/observable/async-event.ts +110 -0
- package/src/observable/async.spec.tsx +142 -0
- package/src/observable/config.spec.ts +12 -0
- package/src/observable/config.ts +26 -0
- package/src/observable/context.spec.tsx +360 -0
- package/src/observable/context.tsx +39 -0
- package/src/observable/core.ts +28 -0
- package/src/observable/decorator.spec.ts +41 -0
- package/src/observable/decorator.ts +19 -0
- package/src/observable/hooks.spec.tsx +244 -0
- package/src/observable/hooks.ts +39 -0
- package/src/observable/index.ts +11 -0
- package/src/observable/notifiable.spec.ts +205 -0
- package/src/observable/notifiable.ts +185 -0
- package/src/observable/notifier.spec.ts +141 -0
- package/src/observable/notifier.ts +126 -0
- package/src/observable/observable.spec.ts +265 -0
- package/src/observable/observable.ts +87 -0
- package/src/observable/tracker.spec.ts +697 -0
- package/src/observable/tracker.ts +240 -0
- package/src/observable/utils.spec.tsx +93 -0
- package/src/observable/utils.ts +160 -0
- package/src/observable/watch.spec.ts +112 -0
- package/src/observable/watch.ts +77 -0
- package/src/polling/poll.ts +2 -2
- package/src/polling/protocol.ts +1 -1
- package/src/protocol/cell-protocol.ts +1 -1
- package/src/react/constant.ts +1 -0
- package/src/react/dropdown/index.tsx +86 -0
- package/src/react/dropdown/styles/index.less +121 -0
- package/src/react/index.spec.ts +13 -0
- package/src/react/index.ts +8 -0
- package/src/react/layout/boxpanel/Pane.tsx +51 -0
- package/src/react/layout/boxpanel/context.ts +11 -0
- package/src/react/layout/boxpanel/index.tsx +65 -0
- package/src/react/layout/boxpanel/styles/index.less +14 -0
- package/src/react/layout/layout.ts +85 -0
- package/src/react/layout/splitpanel/context.ts +35 -0
- package/src/react/layout/splitpanel/index.tsx +325 -0
- package/src/react/layout/splitpanel/pane.tsx +19 -0
- package/src/react/layout/splitpanel/styles/index.less +10 -0
- package/src/react/menu/context.tsx +10 -0
- package/src/react/menu/divider.tsx +9 -0
- package/src/react/menu/index.ts +3 -0
- package/src/react/menu/item.tsx +83 -0
- package/src/react/menu/menu.tsx +46 -0
- package/src/react/menu/styles/index.less +163 -0
- package/src/react/menu/submenu.tsx +28 -0
- package/src/react/menubar/context.tsx +17 -0
- package/src/react/menubar/index.ts +1 -0
- package/src/react/menubar/item.tsx +103 -0
- package/src/react/menubar/menubar.tsx +123 -0
- package/src/react/menubar/styles/index.less +113 -0
- package/src/react/notification/index.tsx +208 -0
- package/src/react/notification/protocol.ts +138 -0
- package/src/react/notification/pure-panel.tsx +119 -0
- package/src/react/notification/render.ts +92 -0
- package/src/react/notification/style/index.less +192 -0
- package/src/react/notification/style/index.tsx +1 -0
- package/src/react/notification/style/placement.less +68 -0
- package/src/react/notification/use-notification.tsx +186 -0
- package/src/react/resize/index.tsx +769 -0
- package/src/react/resize/styles/index.less +83 -0
- package/src/react/styles/variables.less +2 -0
- package/src/react/tabs/index.tsx +75 -0
- package/src/react/tabs/styles/card.less +111 -0
- package/src/react/tabs/styles/dropdown.less +70 -0
- package/src/react/tabs/styles/index.less +231 -0
- package/src/react/tabs/styles/position.less +217 -0
- package/src/react/typings/index.d.ts +5 -0
- package/src/react/util.ts +5 -0
- package/src/url.ts +1 -1
|
@@ -0,0 +1,1494 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
|
|
6
|
+
import type { Event } from '../../../common/index.js';
|
|
7
|
+
import { isFalsyOrWhitespace } from '../../../common/index.js';
|
|
8
|
+
// import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
|
9
|
+
import {
|
|
10
|
+
userAgent,
|
|
11
|
+
isMacintosh,
|
|
12
|
+
isLinux,
|
|
13
|
+
isWindows,
|
|
14
|
+
isWeb,
|
|
15
|
+
} from '../../../common/index.js';
|
|
16
|
+
import { Syringe } from '../../../ioc/index.js';
|
|
17
|
+
|
|
18
|
+
const _userAgent = userAgent || '';
|
|
19
|
+
const STATIC_VALUES = new Map<string, boolean>();
|
|
20
|
+
STATIC_VALUES.set('false', false);
|
|
21
|
+
STATIC_VALUES.set('true', true);
|
|
22
|
+
STATIC_VALUES.set('isMac', isMacintosh);
|
|
23
|
+
STATIC_VALUES.set('isLinux', isLinux);
|
|
24
|
+
STATIC_VALUES.set('isWindows', isWindows);
|
|
25
|
+
STATIC_VALUES.set('isWeb', isWeb);
|
|
26
|
+
STATIC_VALUES.set('isMacNative', isMacintosh && !isWeb);
|
|
27
|
+
STATIC_VALUES.set('isEdge', _userAgent.indexOf('Edg/') >= 0);
|
|
28
|
+
STATIC_VALUES.set('isFirefox', _userAgent.indexOf('Firefox') >= 0);
|
|
29
|
+
STATIC_VALUES.set('isChrome', _userAgent.indexOf('Chrome') >= 0);
|
|
30
|
+
STATIC_VALUES.set('isSafari', _userAgent.indexOf('Safari') >= 0);
|
|
31
|
+
STATIC_VALUES.set('isIPad', _userAgent.indexOf('iPad') >= 0);
|
|
32
|
+
|
|
33
|
+
const { hasOwnProperty } = Object.prototype;
|
|
34
|
+
|
|
35
|
+
export enum ContextKeyExprType {
|
|
36
|
+
False = 0,
|
|
37
|
+
True = 1,
|
|
38
|
+
Defined = 2,
|
|
39
|
+
Not = 3,
|
|
40
|
+
Equals = 4,
|
|
41
|
+
NotEquals = 5,
|
|
42
|
+
And = 6,
|
|
43
|
+
Regex = 7,
|
|
44
|
+
NotRegex = 8,
|
|
45
|
+
Or = 9,
|
|
46
|
+
In = 10,
|
|
47
|
+
NotIn = 11,
|
|
48
|
+
Greater = 12,
|
|
49
|
+
GreaterEquals = 13,
|
|
50
|
+
Smaller = 14,
|
|
51
|
+
SmallerEquals = 15,
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface IContextKeyExprMapper {
|
|
55
|
+
mapDefined: (key: string) => ContextKeyExpression;
|
|
56
|
+
mapNot: (key: string) => ContextKeyExpression;
|
|
57
|
+
mapEquals: (key: string, value: any) => ContextKeyExpression;
|
|
58
|
+
mapNotEquals: (key: string, value: any) => ContextKeyExpression;
|
|
59
|
+
mapGreater: (key: string, value: any) => ContextKeyExpression;
|
|
60
|
+
mapGreaterEquals: (key: string, value: any) => ContextKeyExpression;
|
|
61
|
+
mapSmaller: (key: string, value: any) => ContextKeyExpression;
|
|
62
|
+
mapSmallerEquals: (key: string, value: any) => ContextKeyExpression;
|
|
63
|
+
mapRegex: (key: string, regexp: RegExp | null) => ContextKeyRegexExpr;
|
|
64
|
+
mapIn: (key: string, valueKey: string) => ContextKeyInExpr;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface IContextKeyExpression {
|
|
68
|
+
cmp: (other: ContextKeyExpression) => number;
|
|
69
|
+
equals: (other: ContextKeyExpression) => boolean;
|
|
70
|
+
evaluate: (context: IContext) => boolean;
|
|
71
|
+
serialize: () => string;
|
|
72
|
+
keys: () => string[];
|
|
73
|
+
map: (mapFnc: IContextKeyExprMapper) => ContextKeyExpression;
|
|
74
|
+
negate: () => ContextKeyExpression;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export type ContextKeyExpression =
|
|
78
|
+
| ContextKeyFalseExpr
|
|
79
|
+
| ContextKeyTrueExpr
|
|
80
|
+
| ContextKeyDefinedExpr
|
|
81
|
+
| ContextKeyNotExpr
|
|
82
|
+
| ContextKeyEqualsExpr
|
|
83
|
+
| ContextKeyNotEqualsExpr
|
|
84
|
+
| ContextKeyRegexExpr
|
|
85
|
+
| ContextKeyNotRegexExpr
|
|
86
|
+
| ContextKeyAndExpr
|
|
87
|
+
| ContextKeyOrExpr
|
|
88
|
+
| ContextKeyInExpr
|
|
89
|
+
| ContextKeyNotInExpr
|
|
90
|
+
| ContextKeyGreaterExpr
|
|
91
|
+
| ContextKeyGreaterEqualsExpr
|
|
92
|
+
| ContextKeySmallerExpr
|
|
93
|
+
| ContextKeySmallerEqualsExpr;
|
|
94
|
+
|
|
95
|
+
export abstract class ContextKeyExpr {
|
|
96
|
+
public static false(): ContextKeyExpression {
|
|
97
|
+
return ContextKeyFalseExpr.INSTANCE;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
public static true(): ContextKeyExpression {
|
|
101
|
+
return ContextKeyTrueExpr.INSTANCE;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
public static has(key: string): ContextKeyExpression {
|
|
105
|
+
return ContextKeyDefinedExpr.create(key);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
public static equals(key: string, value: any): ContextKeyExpression {
|
|
109
|
+
return ContextKeyEqualsExpr.create(key, value);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
public static notEquals(key: string, value: any): ContextKeyExpression {
|
|
113
|
+
return ContextKeyNotEqualsExpr.create(key, value);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
public static regex(key: string, value: RegExp): ContextKeyExpression {
|
|
117
|
+
return ContextKeyRegexExpr.create(key, value);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
public static in(key: string, value: string): ContextKeyExpression {
|
|
121
|
+
return ContextKeyInExpr.create(key, value);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
public static not(key: string): ContextKeyExpression {
|
|
125
|
+
return ContextKeyNotExpr.create(key);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
public static and(
|
|
129
|
+
...expr: (ContextKeyExpression | undefined | null)[]
|
|
130
|
+
): ContextKeyExpression | undefined {
|
|
131
|
+
return ContextKeyAndExpr.create(expr);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
public static or(
|
|
135
|
+
...expr: (ContextKeyExpression | undefined | null)[]
|
|
136
|
+
): ContextKeyExpression | undefined {
|
|
137
|
+
return ContextKeyOrExpr.create(expr);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
public static greater(key: string, value: any): ContextKeyExpression {
|
|
141
|
+
return ContextKeyGreaterExpr.create(key, value);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
public static less(key: string, value: any): ContextKeyExpression {
|
|
145
|
+
return ContextKeySmallerExpr.create(key, value);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
public static deserialize(
|
|
149
|
+
serialized: string | null | undefined,
|
|
150
|
+
strict = false,
|
|
151
|
+
): ContextKeyExpression | undefined {
|
|
152
|
+
if (!serialized) {
|
|
153
|
+
return undefined;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
return this._deserializeOrExpression(serialized, strict);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
private static _deserializeOrExpression(
|
|
160
|
+
serialized: string,
|
|
161
|
+
strict: boolean,
|
|
162
|
+
): ContextKeyExpression | undefined {
|
|
163
|
+
const pieces = serialized.split('||');
|
|
164
|
+
return ContextKeyOrExpr.create(
|
|
165
|
+
pieces.map((p) => this._deserializeAndExpression(p, strict)),
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
private static _deserializeAndExpression(
|
|
170
|
+
serialized: string,
|
|
171
|
+
strict: boolean,
|
|
172
|
+
): ContextKeyExpression | undefined {
|
|
173
|
+
const pieces = serialized.split('&&');
|
|
174
|
+
return ContextKeyAndExpr.create(pieces.map((p) => this._deserializeOne(p, strict)));
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
private static _deserializeOne(
|
|
178
|
+
serializedOne: string,
|
|
179
|
+
strict: boolean,
|
|
180
|
+
): ContextKeyExpression {
|
|
181
|
+
serializedOne = serializedOne.trim();
|
|
182
|
+
|
|
183
|
+
if (serializedOne.indexOf('!=') >= 0) {
|
|
184
|
+
const pieces = serializedOne.split('!=');
|
|
185
|
+
return ContextKeyNotEqualsExpr.create(
|
|
186
|
+
pieces[0].trim(),
|
|
187
|
+
this._deserializeValue(pieces[1], strict),
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
if (serializedOne.indexOf('==') >= 0) {
|
|
192
|
+
const pieces = serializedOne.split('==');
|
|
193
|
+
return ContextKeyEqualsExpr.create(
|
|
194
|
+
pieces[0].trim(),
|
|
195
|
+
this._deserializeValue(pieces[1], strict),
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
if (serializedOne.indexOf('=~') >= 0) {
|
|
200
|
+
const pieces = serializedOne.split('=~');
|
|
201
|
+
return ContextKeyRegexExpr.create(
|
|
202
|
+
pieces[0].trim(),
|
|
203
|
+
this._deserializeRegexValue(pieces[1], strict),
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
if (serializedOne.indexOf(' in ') >= 0) {
|
|
208
|
+
const pieces = serializedOne.split(' in ');
|
|
209
|
+
return ContextKeyInExpr.create(pieces[0].trim(), pieces[1].trim());
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
if (/^[^<=>]+>=[^<=>]+$/.test(serializedOne)) {
|
|
213
|
+
const pieces = serializedOne.split('>=');
|
|
214
|
+
return ContextKeyGreaterEqualsExpr.create(pieces[0].trim(), pieces[1].trim());
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
if (/^[^<=>]+>[^<=>]+$/.test(serializedOne)) {
|
|
218
|
+
const pieces = serializedOne.split('>');
|
|
219
|
+
return ContextKeyGreaterExpr.create(pieces[0].trim(), pieces[1].trim());
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
if (/^[^<=>]+<=[^<=>]+$/.test(serializedOne)) {
|
|
223
|
+
const pieces = serializedOne.split('<=');
|
|
224
|
+
return ContextKeySmallerEqualsExpr.create(pieces[0].trim(), pieces[1].trim());
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
if (/^[^<=>]+<[^<=>]+$/.test(serializedOne)) {
|
|
228
|
+
const pieces = serializedOne.split('<');
|
|
229
|
+
return ContextKeySmallerExpr.create(pieces[0].trim(), pieces[1].trim());
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// eslint-disable-next-line no-useless-escape
|
|
233
|
+
if (/^\!\s*/.test(serializedOne)) {
|
|
234
|
+
return ContextKeyNotExpr.create(serializedOne.substr(1).trim());
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
return ContextKeyDefinedExpr.create(serializedOne);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
private static _deserializeValue(serializedValue: string, _strict: boolean): any {
|
|
241
|
+
serializedValue = serializedValue.trim();
|
|
242
|
+
|
|
243
|
+
if (serializedValue === 'true') {
|
|
244
|
+
return true;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
if (serializedValue === 'false') {
|
|
248
|
+
return false;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
const m = /^'([^']*)'$/.exec(serializedValue);
|
|
252
|
+
if (m) {
|
|
253
|
+
return m[1].trim();
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
return serializedValue;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
private static _deserializeRegexValue(
|
|
260
|
+
serializedValue: string,
|
|
261
|
+
strict: boolean,
|
|
262
|
+
): RegExp | null {
|
|
263
|
+
if (isFalsyOrWhitespace(serializedValue)) {
|
|
264
|
+
if (strict) {
|
|
265
|
+
throw new Error('missing regexp-value for =~-expression');
|
|
266
|
+
} else {
|
|
267
|
+
console.warn('missing regexp-value for =~-expression');
|
|
268
|
+
}
|
|
269
|
+
return null;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
const start = serializedValue.indexOf('/');
|
|
273
|
+
const end = serializedValue.lastIndexOf('/');
|
|
274
|
+
if (start === end || start < 0 /* || to < 0 */) {
|
|
275
|
+
if (strict) {
|
|
276
|
+
throw new Error(`bad regexp-value '${serializedValue}', missing /-enclosure`);
|
|
277
|
+
} else {
|
|
278
|
+
console.warn(`bad regexp-value '${serializedValue}', missing /-enclosure`);
|
|
279
|
+
}
|
|
280
|
+
return null;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
const value = serializedValue.slice(start + 1, end);
|
|
284
|
+
const caseIgnoreFlag = serializedValue[end + 1] === 'i' ? 'i' : '';
|
|
285
|
+
try {
|
|
286
|
+
return new RegExp(value, caseIgnoreFlag);
|
|
287
|
+
} catch (e) {
|
|
288
|
+
if (strict) {
|
|
289
|
+
throw new Error(`bad regexp-value '${serializedValue}', parse error: ${e}`);
|
|
290
|
+
} else {
|
|
291
|
+
console.warn(`bad regexp-value '${serializedValue}', parse error: ${e}`);
|
|
292
|
+
}
|
|
293
|
+
return null;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
function cmp(a: ContextKeyExpression, b: ContextKeyExpression): number {
|
|
299
|
+
return a.cmp(b);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
export class ContextKeyFalseExpr implements IContextKeyExpression {
|
|
303
|
+
public static INSTANCE = new ContextKeyFalseExpr();
|
|
304
|
+
|
|
305
|
+
public readonly type = ContextKeyExprType.False;
|
|
306
|
+
|
|
307
|
+
protected constructor() {
|
|
308
|
+
//
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
public cmp(other: ContextKeyExpression): number {
|
|
312
|
+
return this.type - other.type;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
public equals(other: ContextKeyExpression): boolean {
|
|
316
|
+
return other.type === this.type;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
public evaluate(_context: IContext): boolean {
|
|
320
|
+
return false;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
public serialize(): string {
|
|
324
|
+
return 'false';
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
public keys(): string[] {
|
|
328
|
+
return [];
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
public map(_mapFnc: IContextKeyExprMapper): ContextKeyExpression {
|
|
332
|
+
return this;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
public negate(): ContextKeyExpression {
|
|
336
|
+
return ContextKeyTrueExpr.INSTANCE;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
export class ContextKeyTrueExpr implements IContextKeyExpression {
|
|
341
|
+
public static INSTANCE = new ContextKeyTrueExpr();
|
|
342
|
+
|
|
343
|
+
public readonly type = ContextKeyExprType.True;
|
|
344
|
+
|
|
345
|
+
protected constructor() {
|
|
346
|
+
//
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
public cmp(other: ContextKeyExpression): number {
|
|
350
|
+
return this.type - other.type;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
public equals(other: ContextKeyExpression): boolean {
|
|
354
|
+
return other.type === this.type;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
public evaluate(_context: IContext): boolean {
|
|
358
|
+
return true;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
public serialize(): string {
|
|
362
|
+
return 'true';
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
public keys(): string[] {
|
|
366
|
+
return [];
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
public map(_mapFnc: IContextKeyExprMapper): ContextKeyExpression {
|
|
370
|
+
return this;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
public negate(): ContextKeyExpression {
|
|
374
|
+
return ContextKeyFalseExpr.INSTANCE;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
export class ContextKeyDefinedExpr implements IContextKeyExpression {
|
|
379
|
+
public static create(key: string): ContextKeyExpression {
|
|
380
|
+
const staticValue = STATIC_VALUES.get(key);
|
|
381
|
+
if (typeof staticValue === 'boolean') {
|
|
382
|
+
return staticValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE;
|
|
383
|
+
}
|
|
384
|
+
return new ContextKeyDefinedExpr(key);
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
public readonly type = ContextKeyExprType.Defined;
|
|
388
|
+
protected readonly key: string;
|
|
389
|
+
|
|
390
|
+
protected constructor(key: string) {
|
|
391
|
+
this.key = key;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
public cmp(other: ContextKeyExpression): number {
|
|
395
|
+
if (other.type !== this.type) {
|
|
396
|
+
return this.type - other.type;
|
|
397
|
+
}
|
|
398
|
+
return cmp1(this.key, other.key);
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
public equals(other: ContextKeyExpression): boolean {
|
|
402
|
+
if (other.type === this.type) {
|
|
403
|
+
return this.key === other.key;
|
|
404
|
+
}
|
|
405
|
+
return false;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
public evaluate(context: IContext): boolean {
|
|
409
|
+
return !!context.getValue(this.key);
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
public serialize(): string {
|
|
413
|
+
return this.key;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
public keys(): string[] {
|
|
417
|
+
return [this.key];
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
public map(mapFnc: IContextKeyExprMapper): ContextKeyExpression {
|
|
421
|
+
return mapFnc.mapDefined(this.key);
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
public negate(): ContextKeyExpression {
|
|
425
|
+
return ContextKeyNotExpr.create(this.key);
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
export class ContextKeyEqualsExpr implements IContextKeyExpression {
|
|
430
|
+
public static create(key: string, value: any): ContextKeyExpression {
|
|
431
|
+
if (typeof value === 'boolean') {
|
|
432
|
+
return value ? ContextKeyDefinedExpr.create(key) : ContextKeyNotExpr.create(key);
|
|
433
|
+
}
|
|
434
|
+
const staticValue = STATIC_VALUES.get(key);
|
|
435
|
+
if (typeof staticValue === 'boolean') {
|
|
436
|
+
const trueValue = staticValue ? 'true' : 'false';
|
|
437
|
+
return value === trueValue
|
|
438
|
+
? ContextKeyTrueExpr.INSTANCE
|
|
439
|
+
: ContextKeyFalseExpr.INSTANCE;
|
|
440
|
+
}
|
|
441
|
+
return new ContextKeyEqualsExpr(key, value);
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
public readonly type = ContextKeyExprType.Equals;
|
|
445
|
+
|
|
446
|
+
private readonly key: string;
|
|
447
|
+
private readonly value: any;
|
|
448
|
+
|
|
449
|
+
private constructor(key: string, value: any) {
|
|
450
|
+
this.key = key;
|
|
451
|
+
this.value = value;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
public cmp(other: ContextKeyExpression): number {
|
|
455
|
+
if (other.type !== this.type) {
|
|
456
|
+
return this.type - other.type;
|
|
457
|
+
}
|
|
458
|
+
return cmp2(this.key, this.value, other.key, other.value);
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
public equals(other: ContextKeyExpression): boolean {
|
|
462
|
+
if (other.type === this.type) {
|
|
463
|
+
return this.key === other.key && this.value === other.value;
|
|
464
|
+
}
|
|
465
|
+
return false;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
public evaluate(context: IContext): boolean {
|
|
469
|
+
// Intentional ==
|
|
470
|
+
// eslint-disable-next-line eqeqeq
|
|
471
|
+
return context.getValue(this.key) == this.value;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
public serialize(): string {
|
|
475
|
+
return `${this.key} == '${this.value}'`;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
public keys(): string[] {
|
|
479
|
+
return [this.key];
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
public map(mapFnc: IContextKeyExprMapper): ContextKeyExpression {
|
|
483
|
+
return mapFnc.mapEquals(this.key, this.value);
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
public negate(): ContextKeyExpression {
|
|
487
|
+
return ContextKeyNotEqualsExpr.create(this.key, this.value);
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
export class ContextKeyInExpr implements IContextKeyExpression {
|
|
492
|
+
public static create(key: string, valueKey: string): ContextKeyInExpr {
|
|
493
|
+
return new ContextKeyInExpr(key, valueKey);
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
public readonly type = ContextKeyExprType.In;
|
|
497
|
+
|
|
498
|
+
private readonly key: string;
|
|
499
|
+
private readonly valueKey: string;
|
|
500
|
+
|
|
501
|
+
private constructor(key: string, valueKey: string) {
|
|
502
|
+
this.key = key;
|
|
503
|
+
this.valueKey = valueKey;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
public cmp(other: ContextKeyExpression): number {
|
|
507
|
+
if (other.type !== this.type) {
|
|
508
|
+
return this.type - other.type;
|
|
509
|
+
}
|
|
510
|
+
return cmp2(this.key, this.valueKey, other.key, other.valueKey);
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
public equals(other: ContextKeyExpression): boolean {
|
|
514
|
+
if (other.type === this.type) {
|
|
515
|
+
return this.key === other.key && this.valueKey === other.valueKey;
|
|
516
|
+
}
|
|
517
|
+
return false;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
public evaluate(context: IContext): boolean {
|
|
521
|
+
const source = context.getValue(this.valueKey);
|
|
522
|
+
|
|
523
|
+
const item = context.getValue(this.key);
|
|
524
|
+
|
|
525
|
+
if (Array.isArray(source)) {
|
|
526
|
+
return source.indexOf(item) >= 0;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
if (typeof item === 'string' && typeof source === 'object' && source !== null) {
|
|
530
|
+
return hasOwnProperty.call(source, item);
|
|
531
|
+
}
|
|
532
|
+
return false;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
public serialize(): string {
|
|
536
|
+
return `${this.key} in '${this.valueKey}'`;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
public keys(): string[] {
|
|
540
|
+
return [this.key, this.valueKey];
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
public map(mapFnc: IContextKeyExprMapper): ContextKeyInExpr {
|
|
544
|
+
return mapFnc.mapIn(this.key, this.valueKey);
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
public negate(): ContextKeyExpression {
|
|
548
|
+
return ContextKeyNotInExpr.create(this);
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
export class ContextKeyNotInExpr implements IContextKeyExpression {
|
|
553
|
+
public static create(actual: ContextKeyInExpr): ContextKeyNotInExpr {
|
|
554
|
+
return new ContextKeyNotInExpr(actual);
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
public readonly type = ContextKeyExprType.NotIn;
|
|
558
|
+
|
|
559
|
+
private readonly _actual: ContextKeyInExpr;
|
|
560
|
+
|
|
561
|
+
private constructor(_actual: ContextKeyInExpr) {
|
|
562
|
+
//
|
|
563
|
+
this._actual = _actual;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
public cmp(other: ContextKeyExpression): number {
|
|
567
|
+
if (other.type !== this.type) {
|
|
568
|
+
return this.type - other.type;
|
|
569
|
+
}
|
|
570
|
+
return this._actual.cmp(other._actual);
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
public equals(other: ContextKeyExpression): boolean {
|
|
574
|
+
if (other.type === this.type) {
|
|
575
|
+
return this._actual.equals(other._actual);
|
|
576
|
+
}
|
|
577
|
+
return false;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
public evaluate(context: IContext): boolean {
|
|
581
|
+
return !this._actual.evaluate(context);
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
public serialize(): string {
|
|
585
|
+
throw new Error('Method not implemented.');
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
public keys(): string[] {
|
|
589
|
+
return this._actual.keys();
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
public map(mapFnc: IContextKeyExprMapper): ContextKeyExpression {
|
|
593
|
+
return new ContextKeyNotInExpr(this._actual.map(mapFnc));
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
public negate(): ContextKeyExpression {
|
|
597
|
+
return this._actual;
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
export class ContextKeyNotEqualsExpr implements IContextKeyExpression {
|
|
602
|
+
public static create(key: string, value: any): ContextKeyExpression {
|
|
603
|
+
if (typeof value === 'boolean') {
|
|
604
|
+
if (value) {
|
|
605
|
+
return ContextKeyNotExpr.create(key);
|
|
606
|
+
}
|
|
607
|
+
return ContextKeyDefinedExpr.create(key);
|
|
608
|
+
}
|
|
609
|
+
const staticValue = STATIC_VALUES.get(key);
|
|
610
|
+
if (typeof staticValue === 'boolean') {
|
|
611
|
+
const falseValue = staticValue ? 'true' : 'false';
|
|
612
|
+
return value === falseValue
|
|
613
|
+
? ContextKeyFalseExpr.INSTANCE
|
|
614
|
+
: ContextKeyTrueExpr.INSTANCE;
|
|
615
|
+
}
|
|
616
|
+
return new ContextKeyNotEqualsExpr(key, value);
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
public readonly type = ContextKeyExprType.NotEquals;
|
|
620
|
+
|
|
621
|
+
private readonly key: string;
|
|
622
|
+
private readonly value: any;
|
|
623
|
+
|
|
624
|
+
private constructor(key: string, value: any) {
|
|
625
|
+
this.key = key;
|
|
626
|
+
this.value = value;
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
public cmp(other: ContextKeyExpression): number {
|
|
630
|
+
if (other.type !== this.type) {
|
|
631
|
+
return this.type - other.type;
|
|
632
|
+
}
|
|
633
|
+
return cmp2(this.key, this.value, other.key, other.value);
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
public equals(other: ContextKeyExpression): boolean {
|
|
637
|
+
if (other.type === this.type) {
|
|
638
|
+
return this.key === other.key && this.value === other.value;
|
|
639
|
+
}
|
|
640
|
+
return false;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
public evaluate(context: IContext): boolean {
|
|
644
|
+
// Intentional !=
|
|
645
|
+
// eslint-disable-next-line eqeqeq
|
|
646
|
+
return context.getValue(this.key) != this.value;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
public serialize(): string {
|
|
650
|
+
return `${this.key} != '${this.value}'`;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
public keys(): string[] {
|
|
654
|
+
return [this.key];
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
public map(mapFnc: IContextKeyExprMapper): ContextKeyExpression {
|
|
658
|
+
return mapFnc.mapNotEquals(this.key, this.value);
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
public negate(): ContextKeyExpression {
|
|
662
|
+
return ContextKeyEqualsExpr.create(this.key, this.value);
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
export class ContextKeyNotExpr implements IContextKeyExpression {
|
|
667
|
+
public static create(key: string): ContextKeyExpression {
|
|
668
|
+
const staticValue = STATIC_VALUES.get(key);
|
|
669
|
+
if (typeof staticValue === 'boolean') {
|
|
670
|
+
return staticValue ? ContextKeyFalseExpr.INSTANCE : ContextKeyTrueExpr.INSTANCE;
|
|
671
|
+
}
|
|
672
|
+
return new ContextKeyNotExpr(key);
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
public readonly type = ContextKeyExprType.Not;
|
|
676
|
+
private readonly key: string;
|
|
677
|
+
|
|
678
|
+
private constructor(key: string) {
|
|
679
|
+
this.key = key;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
public cmp(other: ContextKeyExpression): number {
|
|
683
|
+
if (other.type !== this.type) {
|
|
684
|
+
return this.type - other.type;
|
|
685
|
+
}
|
|
686
|
+
return cmp1(this.key, other.key);
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
public equals(other: ContextKeyExpression): boolean {
|
|
690
|
+
if (other.type === this.type) {
|
|
691
|
+
return this.key === other.key;
|
|
692
|
+
}
|
|
693
|
+
return false;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
public evaluate(context: IContext): boolean {
|
|
697
|
+
return !context.getValue(this.key);
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
public serialize(): string {
|
|
701
|
+
return `!${this.key}`;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
public keys(): string[] {
|
|
705
|
+
return [this.key];
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
public map(mapFnc: IContextKeyExprMapper): ContextKeyExpression {
|
|
709
|
+
return mapFnc.mapNot(this.key);
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
public negate(): ContextKeyExpression {
|
|
713
|
+
return ContextKeyDefinedExpr.create(this.key);
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
export class ContextKeyGreaterExpr implements IContextKeyExpression {
|
|
718
|
+
public static create(key: string, value: any): ContextKeyExpression {
|
|
719
|
+
return new ContextKeyGreaterExpr(key, value);
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
public readonly type = ContextKeyExprType.Greater;
|
|
723
|
+
private readonly key: string;
|
|
724
|
+
private readonly value: any;
|
|
725
|
+
|
|
726
|
+
private constructor(key: string, value: any) {
|
|
727
|
+
this.key = key;
|
|
728
|
+
this.value = value;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
public cmp(other: ContextKeyExpression): number {
|
|
732
|
+
if (other.type !== this.type) {
|
|
733
|
+
return this.type - other.type;
|
|
734
|
+
}
|
|
735
|
+
return cmp2(this.key, this.value, other.key, other.value);
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
public equals(other: ContextKeyExpression): boolean {
|
|
739
|
+
if (other.type === this.type) {
|
|
740
|
+
return this.key === other.key && this.value === other.value;
|
|
741
|
+
}
|
|
742
|
+
return false;
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
public evaluate(context: IContext): boolean {
|
|
746
|
+
return parseFloat(<any>context.getValue(this.key)) > parseFloat(this.value);
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
public serialize(): string {
|
|
750
|
+
return `${this.key} > ${this.value}`;
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
public keys(): string[] {
|
|
754
|
+
return [this.key];
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
public map(mapFnc: IContextKeyExprMapper): ContextKeyExpression {
|
|
758
|
+
return mapFnc.mapGreater(this.key, this.value);
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
public negate(): ContextKeyExpression {
|
|
762
|
+
return ContextKeySmallerEqualsExpr.create(this.key, this.value);
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
export class ContextKeyGreaterEqualsExpr implements IContextKeyExpression {
|
|
767
|
+
public static create(key: string, value: any): ContextKeyExpression {
|
|
768
|
+
return new ContextKeyGreaterEqualsExpr(key, value);
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
public readonly type = ContextKeyExprType.GreaterEquals;
|
|
772
|
+
|
|
773
|
+
private readonly key: string;
|
|
774
|
+
private readonly value: any;
|
|
775
|
+
|
|
776
|
+
private constructor(key: string, value: any) {
|
|
777
|
+
this.key = key;
|
|
778
|
+
this.value = value;
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
public cmp(other: ContextKeyExpression): number {
|
|
782
|
+
if (other.type !== this.type) {
|
|
783
|
+
return this.type - other.type;
|
|
784
|
+
}
|
|
785
|
+
return cmp2(this.key, this.value, other.key, other.value);
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
public equals(other: ContextKeyExpression): boolean {
|
|
789
|
+
if (other.type === this.type) {
|
|
790
|
+
return this.key === other.key && this.value === other.value;
|
|
791
|
+
}
|
|
792
|
+
return false;
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
public evaluate(context: IContext): boolean {
|
|
796
|
+
return parseFloat(<any>context.getValue(this.key)) >= parseFloat(this.value);
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
public serialize(): string {
|
|
800
|
+
return `${this.key} >= ${this.value}`;
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
public keys(): string[] {
|
|
804
|
+
return [this.key];
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
public map(mapFnc: IContextKeyExprMapper): ContextKeyExpression {
|
|
808
|
+
return mapFnc.mapGreaterEquals(this.key, this.value);
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
public negate(): ContextKeyExpression {
|
|
812
|
+
return ContextKeySmallerExpr.create(this.key, this.value);
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
export class ContextKeySmallerExpr implements IContextKeyExpression {
|
|
817
|
+
public static create(key: string, value: any): ContextKeyExpression {
|
|
818
|
+
return new ContextKeySmallerExpr(key, value);
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
public readonly type = ContextKeyExprType.Smaller;
|
|
822
|
+
private readonly key: string;
|
|
823
|
+
private readonly value: any;
|
|
824
|
+
|
|
825
|
+
private constructor(key: string, value: any) {
|
|
826
|
+
this.key = key;
|
|
827
|
+
this.value = value;
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
public cmp(other: ContextKeyExpression): number {
|
|
831
|
+
if (other.type !== this.type) {
|
|
832
|
+
return this.type - other.type;
|
|
833
|
+
}
|
|
834
|
+
return cmp2(this.key, this.value, other.key, other.value);
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
public equals(other: ContextKeyExpression): boolean {
|
|
838
|
+
if (other.type === this.type) {
|
|
839
|
+
return this.key === other.key && this.value === other.value;
|
|
840
|
+
}
|
|
841
|
+
return false;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
public evaluate(context: IContext): boolean {
|
|
845
|
+
return parseFloat(<any>context.getValue(this.key)) < parseFloat(this.value);
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
public serialize(): string {
|
|
849
|
+
return `${this.key} < ${this.value}`;
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
public keys(): string[] {
|
|
853
|
+
return [this.key];
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
public map(mapFnc: IContextKeyExprMapper): ContextKeyExpression {
|
|
857
|
+
return mapFnc.mapSmaller(this.key, this.value);
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
public negate(): ContextKeyExpression {
|
|
861
|
+
return ContextKeyGreaterEqualsExpr.create(this.key, this.value);
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
export class ContextKeySmallerEqualsExpr implements IContextKeyExpression {
|
|
866
|
+
public static create(key: string, value: any): ContextKeyExpression {
|
|
867
|
+
return new ContextKeySmallerEqualsExpr(key, value);
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
public readonly type = ContextKeyExprType.SmallerEquals;
|
|
871
|
+
|
|
872
|
+
private readonly key: string;
|
|
873
|
+
private readonly value: any;
|
|
874
|
+
|
|
875
|
+
private constructor(key: string, value: any) {
|
|
876
|
+
this.key = key;
|
|
877
|
+
this.value = value;
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
public cmp(other: ContextKeyExpression): number {
|
|
881
|
+
if (other.type !== this.type) {
|
|
882
|
+
return this.type - other.type;
|
|
883
|
+
}
|
|
884
|
+
return cmp2(this.key, this.value, other.key, other.value);
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
public equals(other: ContextKeyExpression): boolean {
|
|
888
|
+
if (other.type === this.type) {
|
|
889
|
+
return this.key === other.key && this.value === other.value;
|
|
890
|
+
}
|
|
891
|
+
return false;
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
public evaluate(context: IContext): boolean {
|
|
895
|
+
return parseFloat(<any>context.getValue(this.key)) <= parseFloat(this.value);
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
public serialize(): string {
|
|
899
|
+
return `${this.key} <= ${this.value}`;
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
public keys(): string[] {
|
|
903
|
+
return [this.key];
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
public map(mapFnc: IContextKeyExprMapper): ContextKeyExpression {
|
|
907
|
+
return mapFnc.mapSmallerEquals(this.key, this.value);
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
public negate(): ContextKeyExpression {
|
|
911
|
+
return ContextKeyGreaterExpr.create(this.key, this.value);
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
export class ContextKeyRegexExpr implements IContextKeyExpression {
|
|
916
|
+
public static create(key: string, regexp: RegExp | null): ContextKeyRegexExpr {
|
|
917
|
+
return new ContextKeyRegexExpr(key, regexp);
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
public readonly type = ContextKeyExprType.Regex;
|
|
921
|
+
|
|
922
|
+
private readonly key: string;
|
|
923
|
+
private readonly regexp: RegExp | null;
|
|
924
|
+
|
|
925
|
+
private constructor(key: string, regexp: RegExp | null) {
|
|
926
|
+
//
|
|
927
|
+
this.key = key;
|
|
928
|
+
this.regexp = regexp;
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
public cmp(other: ContextKeyExpression): number {
|
|
932
|
+
if (other.type !== this.type) {
|
|
933
|
+
return this.type - other.type;
|
|
934
|
+
}
|
|
935
|
+
if (this.key < other.key) {
|
|
936
|
+
return -1;
|
|
937
|
+
}
|
|
938
|
+
if (this.key > other.key) {
|
|
939
|
+
return 1;
|
|
940
|
+
}
|
|
941
|
+
const thisSource = this.regexp ? this.regexp.source : '';
|
|
942
|
+
const otherSource = other.regexp ? other.regexp.source : '';
|
|
943
|
+
if (thisSource < otherSource) {
|
|
944
|
+
return -1;
|
|
945
|
+
}
|
|
946
|
+
if (thisSource > otherSource) {
|
|
947
|
+
return 1;
|
|
948
|
+
}
|
|
949
|
+
return 0;
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
public equals(other: ContextKeyExpression): boolean {
|
|
953
|
+
if (other.type === this.type) {
|
|
954
|
+
const thisSource = this.regexp ? this.regexp.source : '';
|
|
955
|
+
const otherSource = other.regexp ? other.regexp.source : '';
|
|
956
|
+
return this.key === other.key && thisSource === otherSource;
|
|
957
|
+
}
|
|
958
|
+
return false;
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
public evaluate(context: IContext): boolean {
|
|
962
|
+
const value = context.getValue<any>(this.key);
|
|
963
|
+
return this.regexp ? this.regexp.test(value) : false;
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
public serialize(): string {
|
|
967
|
+
const value = this.regexp
|
|
968
|
+
? `/${this.regexp.source}/${this.regexp.ignoreCase ? 'i' : ''}`
|
|
969
|
+
: '/invalid/';
|
|
970
|
+
return `${this.key} =~ ${value}`;
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
public keys(): string[] {
|
|
974
|
+
return [this.key];
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
public map(mapFnc: IContextKeyExprMapper): ContextKeyRegexExpr {
|
|
978
|
+
return mapFnc.mapRegex(this.key, this.regexp);
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
public negate(): ContextKeyExpression {
|
|
982
|
+
return ContextKeyNotRegexExpr.create(this);
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
export class ContextKeyNotRegexExpr implements IContextKeyExpression {
|
|
987
|
+
public static create(actual: ContextKeyRegexExpr): ContextKeyExpression {
|
|
988
|
+
return new ContextKeyNotRegexExpr(actual);
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
public readonly type = ContextKeyExprType.NotRegex;
|
|
992
|
+
private readonly _actual: ContextKeyRegexExpr;
|
|
993
|
+
|
|
994
|
+
private constructor(_actual: ContextKeyRegexExpr) {
|
|
995
|
+
this._actual = _actual;
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
public cmp(other: ContextKeyExpression): number {
|
|
999
|
+
if (other.type !== this.type) {
|
|
1000
|
+
return this.type - other.type;
|
|
1001
|
+
}
|
|
1002
|
+
return this._actual.cmp(other._actual);
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
public equals(other: ContextKeyExpression): boolean {
|
|
1006
|
+
if (other.type === this.type) {
|
|
1007
|
+
return this._actual.equals(other._actual);
|
|
1008
|
+
}
|
|
1009
|
+
return false;
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
public evaluate(context: IContext): boolean {
|
|
1013
|
+
return !this._actual.evaluate(context);
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
public serialize(): string {
|
|
1017
|
+
throw new Error('Method not implemented.');
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
public keys(): string[] {
|
|
1021
|
+
return this._actual.keys();
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
public map(mapFnc: IContextKeyExprMapper): ContextKeyExpression {
|
|
1025
|
+
return new ContextKeyNotRegexExpr(this._actual.map(mapFnc));
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
public negate(): ContextKeyExpression {
|
|
1029
|
+
return this._actual;
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
export class ContextKeyAndExpr implements IContextKeyExpression {
|
|
1034
|
+
public static create(
|
|
1035
|
+
_expr: readonly (ContextKeyExpression | null | undefined)[],
|
|
1036
|
+
): ContextKeyExpression | undefined {
|
|
1037
|
+
return ContextKeyAndExpr._normalizeArr(_expr);
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
public readonly type = ContextKeyExprType.And;
|
|
1041
|
+
public readonly expr: ContextKeyExpression[];
|
|
1042
|
+
|
|
1043
|
+
private constructor(expr: ContextKeyExpression[]) {
|
|
1044
|
+
this.expr = expr;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
public cmp(other: ContextKeyExpression): number {
|
|
1048
|
+
if (other.type !== this.type) {
|
|
1049
|
+
return this.type - other.type;
|
|
1050
|
+
}
|
|
1051
|
+
if (this.expr.length < other.expr.length) {
|
|
1052
|
+
return -1;
|
|
1053
|
+
}
|
|
1054
|
+
if (this.expr.length > other.expr.length) {
|
|
1055
|
+
return 1;
|
|
1056
|
+
}
|
|
1057
|
+
for (let i = 0, len = this.expr.length; i < len; i++) {
|
|
1058
|
+
const r = cmp(this.expr[i], other.expr[i]);
|
|
1059
|
+
if (r !== 0) {
|
|
1060
|
+
return r;
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
return 0;
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
public equals(other: ContextKeyExpression): boolean {
|
|
1067
|
+
if (other.type === this.type) {
|
|
1068
|
+
if (this.expr.length !== other.expr.length) {
|
|
1069
|
+
return false;
|
|
1070
|
+
}
|
|
1071
|
+
for (let i = 0, len = this.expr.length; i < len; i++) {
|
|
1072
|
+
if (!this.expr[i].equals(other.expr[i])) {
|
|
1073
|
+
return false;
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
return true;
|
|
1077
|
+
}
|
|
1078
|
+
return false;
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
public evaluate(context: IContext): boolean {
|
|
1082
|
+
for (let i = 0, len = this.expr.length; i < len; i++) {
|
|
1083
|
+
if (!this.expr[i].evaluate(context)) {
|
|
1084
|
+
return false;
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
return true;
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
private static _normalizeArr(
|
|
1091
|
+
arr: readonly (ContextKeyExpression | null | undefined)[],
|
|
1092
|
+
): ContextKeyExpression | undefined {
|
|
1093
|
+
const expr: ContextKeyExpression[] = [];
|
|
1094
|
+
let hasTrue = false;
|
|
1095
|
+
|
|
1096
|
+
for (const e of arr) {
|
|
1097
|
+
if (!e) {
|
|
1098
|
+
continue;
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
if (e.type === ContextKeyExprType.True) {
|
|
1102
|
+
// anything && true ==> anything
|
|
1103
|
+
hasTrue = true;
|
|
1104
|
+
continue;
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
if (e.type === ContextKeyExprType.False) {
|
|
1108
|
+
// anything && false ==> false
|
|
1109
|
+
return ContextKeyFalseExpr.INSTANCE;
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
if (e.type === ContextKeyExprType.And) {
|
|
1113
|
+
expr.push(...e.expr);
|
|
1114
|
+
continue;
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
expr.push(e);
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
if (expr.length === 0 && hasTrue) {
|
|
1121
|
+
return ContextKeyTrueExpr.INSTANCE;
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
if (expr.length === 0) {
|
|
1125
|
+
return undefined;
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
if (expr.length === 1) {
|
|
1129
|
+
return expr[0];
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
expr.sort(cmp);
|
|
1133
|
+
|
|
1134
|
+
// We must distribute any OR expression because we don't support parens
|
|
1135
|
+
// OR extensions will be at the end (due to sorting rules)
|
|
1136
|
+
while (expr.length > 1) {
|
|
1137
|
+
const lastElement = expr[expr.length - 1];
|
|
1138
|
+
if (lastElement.type !== ContextKeyExprType.Or) {
|
|
1139
|
+
break;
|
|
1140
|
+
}
|
|
1141
|
+
// pop the last element
|
|
1142
|
+
expr.pop();
|
|
1143
|
+
|
|
1144
|
+
// pop the second to last element
|
|
1145
|
+
const secondToLastElement = expr.pop()!;
|
|
1146
|
+
|
|
1147
|
+
// distribute `lastElement` over `secondToLastElement`
|
|
1148
|
+
const resultElement = ContextKeyOrExpr.create(
|
|
1149
|
+
lastElement.expr.map((el) =>
|
|
1150
|
+
ContextKeyAndExpr.create([el, secondToLastElement]),
|
|
1151
|
+
),
|
|
1152
|
+
);
|
|
1153
|
+
|
|
1154
|
+
if (resultElement) {
|
|
1155
|
+
expr.push(resultElement);
|
|
1156
|
+
expr.sort(cmp);
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
if (expr.length === 1) {
|
|
1161
|
+
return expr[0];
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
return new ContextKeyAndExpr(expr);
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
public serialize(): string {
|
|
1168
|
+
return this.expr.map((e) => e.serialize()).join(' && ');
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
public keys(): string[] {
|
|
1172
|
+
const result: string[] = [];
|
|
1173
|
+
for (const expr of this.expr) {
|
|
1174
|
+
result.push(...expr.keys());
|
|
1175
|
+
}
|
|
1176
|
+
return result;
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
public map(mapFnc: IContextKeyExprMapper): ContextKeyExpression {
|
|
1180
|
+
return new ContextKeyAndExpr(this.expr.map((expr) => expr.map(mapFnc)));
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
public negate(): ContextKeyExpression {
|
|
1184
|
+
const result: ContextKeyExpression[] = [];
|
|
1185
|
+
for (const expr of this.expr) {
|
|
1186
|
+
result.push(expr.negate());
|
|
1187
|
+
}
|
|
1188
|
+
return ContextKeyOrExpr.create(result)!;
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
export class ContextKeyOrExpr implements IContextKeyExpression {
|
|
1193
|
+
public static create(
|
|
1194
|
+
_expr: readonly (ContextKeyExpression | null | undefined)[],
|
|
1195
|
+
): ContextKeyExpression | undefined {
|
|
1196
|
+
const expr = ContextKeyOrExpr._normalizeArr(_expr);
|
|
1197
|
+
if (expr.length === 0) {
|
|
1198
|
+
return undefined;
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
if (expr.length === 1) {
|
|
1202
|
+
return expr[0];
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
return new ContextKeyOrExpr(expr);
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
public readonly type = ContextKeyExprType.Or;
|
|
1209
|
+
public readonly expr: ContextKeyExpression[];
|
|
1210
|
+
|
|
1211
|
+
private constructor(expr: ContextKeyExpression[]) {
|
|
1212
|
+
this.expr = expr;
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
public cmp(other: ContextKeyExpression): number {
|
|
1216
|
+
if (other.type !== this.type) {
|
|
1217
|
+
return this.type - other.type;
|
|
1218
|
+
}
|
|
1219
|
+
if (this.expr.length < other.expr.length) {
|
|
1220
|
+
return -1;
|
|
1221
|
+
}
|
|
1222
|
+
if (this.expr.length > other.expr.length) {
|
|
1223
|
+
return 1;
|
|
1224
|
+
}
|
|
1225
|
+
for (let i = 0, len = this.expr.length; i < len; i++) {
|
|
1226
|
+
const r = cmp(this.expr[i], other.expr[i]);
|
|
1227
|
+
if (r !== 0) {
|
|
1228
|
+
return r;
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
return 0;
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
public equals(other: ContextKeyExpression): boolean {
|
|
1235
|
+
if (other.type === this.type) {
|
|
1236
|
+
if (this.expr.length !== other.expr.length) {
|
|
1237
|
+
return false;
|
|
1238
|
+
}
|
|
1239
|
+
for (let i = 0, len = this.expr.length; i < len; i++) {
|
|
1240
|
+
if (!this.expr[i].equals(other.expr[i])) {
|
|
1241
|
+
return false;
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1244
|
+
return true;
|
|
1245
|
+
}
|
|
1246
|
+
return false;
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
public evaluate(context: IContext): boolean {
|
|
1250
|
+
for (let i = 0, len = this.expr.length; i < len; i++) {
|
|
1251
|
+
if (this.expr[i].evaluate(context)) {
|
|
1252
|
+
return true;
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1255
|
+
return false;
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
private static _normalizeArr(
|
|
1259
|
+
arr: readonly (ContextKeyExpression | null | undefined)[],
|
|
1260
|
+
): ContextKeyExpression[] {
|
|
1261
|
+
let expr: ContextKeyExpression[] = [];
|
|
1262
|
+
let hasFalse = false;
|
|
1263
|
+
|
|
1264
|
+
if (arr) {
|
|
1265
|
+
for (let i = 0, len = arr.length; i < len; i++) {
|
|
1266
|
+
const e = arr[i];
|
|
1267
|
+
if (!e) {
|
|
1268
|
+
continue;
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
if (e.type === ContextKeyExprType.False) {
|
|
1272
|
+
// anything || false ==> anything
|
|
1273
|
+
hasFalse = true;
|
|
1274
|
+
continue;
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
if (e.type === ContextKeyExprType.True) {
|
|
1278
|
+
// anything || true ==> true
|
|
1279
|
+
return [ContextKeyTrueExpr.INSTANCE];
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
if (e.type === ContextKeyExprType.Or) {
|
|
1283
|
+
expr = expr.concat(e.expr);
|
|
1284
|
+
continue;
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
expr.push(e);
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1290
|
+
if (expr.length === 0 && hasFalse) {
|
|
1291
|
+
return [ContextKeyFalseExpr.INSTANCE];
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
expr.sort(cmp);
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
return expr;
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
public serialize(): string {
|
|
1301
|
+
return this.expr.map((e) => e.serialize()).join(' || ');
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
public keys(): string[] {
|
|
1305
|
+
const result: string[] = [];
|
|
1306
|
+
for (const expr of this.expr) {
|
|
1307
|
+
result.push(...expr.keys());
|
|
1308
|
+
}
|
|
1309
|
+
return result;
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
public map(mapFnc: IContextKeyExprMapper): ContextKeyExpression {
|
|
1313
|
+
return new ContextKeyOrExpr(this.expr.map((expr) => expr.map(mapFnc)));
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
public negate(): ContextKeyExpression {
|
|
1317
|
+
const result: ContextKeyExpression[] = [];
|
|
1318
|
+
for (const expr of this.expr) {
|
|
1319
|
+
result.push(expr.negate());
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
const terminals = (node: ContextKeyExpression) => {
|
|
1323
|
+
if (node.type === ContextKeyExprType.Or) {
|
|
1324
|
+
return node.expr;
|
|
1325
|
+
}
|
|
1326
|
+
return [node];
|
|
1327
|
+
};
|
|
1328
|
+
|
|
1329
|
+
// We don't support parens, so here we distribute the AND over the OR terminals
|
|
1330
|
+
// We always take the first 2 AND pairs and distribute them
|
|
1331
|
+
while (result.length > 1) {
|
|
1332
|
+
const LEFT = result.shift()!;
|
|
1333
|
+
const RIGHT = result.shift()!;
|
|
1334
|
+
|
|
1335
|
+
const all: ContextKeyExpression[] = [];
|
|
1336
|
+
for (const left of terminals(LEFT)) {
|
|
1337
|
+
for (const right of terminals(RIGHT)) {
|
|
1338
|
+
all.push(ContextKeyExpr.and(left, right)!);
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
result.unshift(ContextKeyExpr.or(...all)!);
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
return result[0];
|
|
1345
|
+
}
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
export interface ContextKeyInfo {
|
|
1349
|
+
readonly key: string;
|
|
1350
|
+
readonly type?: string | undefined;
|
|
1351
|
+
readonly description?: string | undefined;
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
export class RawContextKey<T> extends ContextKeyDefinedExpr {
|
|
1355
|
+
private static _info: ContextKeyInfo[] = [];
|
|
1356
|
+
|
|
1357
|
+
static all(): IterableIterator<ContextKeyInfo> {
|
|
1358
|
+
return RawContextKey._info.values();
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1361
|
+
private readonly _defaultValue: T | undefined;
|
|
1362
|
+
override readonly key: string;
|
|
1363
|
+
constructor(
|
|
1364
|
+
key: string,
|
|
1365
|
+
defaultValue: T | undefined,
|
|
1366
|
+
metaOrHide?: string | true | { type: string; description: string },
|
|
1367
|
+
) {
|
|
1368
|
+
super(key);
|
|
1369
|
+
this.key = key;
|
|
1370
|
+
this._defaultValue = defaultValue;
|
|
1371
|
+
|
|
1372
|
+
// collect all context keys into a central place
|
|
1373
|
+
if (typeof metaOrHide === 'object') {
|
|
1374
|
+
RawContextKey._info.push({ ...metaOrHide, key });
|
|
1375
|
+
} else if (metaOrHide !== true) {
|
|
1376
|
+
RawContextKey._info.push({
|
|
1377
|
+
key,
|
|
1378
|
+
description: metaOrHide,
|
|
1379
|
+
type:
|
|
1380
|
+
defaultValue !== null && defaultValue !== undefined
|
|
1381
|
+
? typeof defaultValue
|
|
1382
|
+
: undefined,
|
|
1383
|
+
});
|
|
1384
|
+
}
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
public bindTo(target: IContextKeyService): IContextKey<T> {
|
|
1388
|
+
return target.createKey(this.key, this._defaultValue);
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
public getValue(target: IContextKeyService): T | undefined {
|
|
1392
|
+
return target.getContextKeyValue<T>(this.key);
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
public toNegated(): ContextKeyExpression {
|
|
1396
|
+
return ContextKeyExpr.not(this.key);
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
public isEqualTo(value: any): ContextKeyExpression {
|
|
1400
|
+
return ContextKeyExpr.equals(this.key, value);
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
public notEqualsTo(value: any): ContextKeyExpression {
|
|
1404
|
+
return ContextKeyExpr.notEquals(this.key, value);
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
export interface IContext {
|
|
1409
|
+
getValue: <T>(key: string) => T | undefined;
|
|
1410
|
+
}
|
|
1411
|
+
|
|
1412
|
+
export interface IContextKey<T> {
|
|
1413
|
+
set: (value: T) => void;
|
|
1414
|
+
reset: () => void;
|
|
1415
|
+
get: () => T | undefined;
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
export namespace IContextKey {
|
|
1419
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1420
|
+
export const None: IContextKey<any> = Object.freeze({
|
|
1421
|
+
set: () => {
|
|
1422
|
+
//
|
|
1423
|
+
},
|
|
1424
|
+
reset: () => {
|
|
1425
|
+
//
|
|
1426
|
+
},
|
|
1427
|
+
get: () => undefined,
|
|
1428
|
+
});
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
export interface IContextKeyServiceTarget {
|
|
1432
|
+
parentElement: IContextKeyServiceTarget | null;
|
|
1433
|
+
setAttribute: (attr: string, value: string) => void;
|
|
1434
|
+
removeAttribute: (attr: string) => void;
|
|
1435
|
+
hasAttribute: (attr: string) => boolean;
|
|
1436
|
+
getAttribute: (attr: string) => string | null;
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
// export const IContextKeyService = createDecorator<IContextKeyService>('contextKeyService');
|
|
1440
|
+
export const IContextKeyService = Syringe.defineToken('IContextKeyService');
|
|
1441
|
+
|
|
1442
|
+
export interface IReadableSet<T> {
|
|
1443
|
+
has: (value: T) => boolean;
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
export interface IContextKeyChangeEvent {
|
|
1447
|
+
affectsSome: (keys: IReadableSet<string>) => boolean;
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
export interface IContextKeyService {
|
|
1451
|
+
readonly _serviceBrand: undefined;
|
|
1452
|
+
dispose: () => void;
|
|
1453
|
+
|
|
1454
|
+
onDidChangeContext: Event<IContextKeyChangeEvent>;
|
|
1455
|
+
bufferChangeEvents: (callback: () => void) => void;
|
|
1456
|
+
|
|
1457
|
+
createKey: <T>(key: string, defaultValue: T | undefined) => IContextKey<T>;
|
|
1458
|
+
contextMatchesRules: (rules: ContextKeyExpression | undefined) => boolean;
|
|
1459
|
+
getContextKeyValue: <T>(key: string) => T | undefined;
|
|
1460
|
+
|
|
1461
|
+
createScoped: (target: IContextKeyServiceTarget) => IContextKeyService;
|
|
1462
|
+
createOverlay: (overlay: Iterable<[string, any]>) => IContextKeyService;
|
|
1463
|
+
getContext: (target: IContextKeyServiceTarget | null) => IContext;
|
|
1464
|
+
|
|
1465
|
+
updateParent: (parentContextKeyService: IContextKeyService) => void;
|
|
1466
|
+
}
|
|
1467
|
+
|
|
1468
|
+
export const SET_CONTEXT_COMMAND_ID = 'setContext';
|
|
1469
|
+
|
|
1470
|
+
function cmp1(key1: string, key2: string): number {
|
|
1471
|
+
if (key1 < key2) {
|
|
1472
|
+
return -1;
|
|
1473
|
+
}
|
|
1474
|
+
if (key1 > key2) {
|
|
1475
|
+
return 1;
|
|
1476
|
+
}
|
|
1477
|
+
return 0;
|
|
1478
|
+
}
|
|
1479
|
+
|
|
1480
|
+
function cmp2(key1: string, value1: any, key2: string, value2: any): number {
|
|
1481
|
+
if (key1 < key2) {
|
|
1482
|
+
return -1;
|
|
1483
|
+
}
|
|
1484
|
+
if (key1 > key2) {
|
|
1485
|
+
return 1;
|
|
1486
|
+
}
|
|
1487
|
+
if (value1 < value2) {
|
|
1488
|
+
return -1;
|
|
1489
|
+
}
|
|
1490
|
+
if (value1 > value2) {
|
|
1491
|
+
return 1;
|
|
1492
|
+
}
|
|
1493
|
+
return 0;
|
|
1494
|
+
}
|