@opensumi/ide-core-browser 2.21.8-rc-1670567192.0 → 2.21.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/actions/index.d.ts.map +1 -1
- package/lib/components/actions/index.js +22 -2
- package/lib/components/actions/index.js.map +1 -1
- package/lib/components/tree/tree.module.less +0 -1
- package/lib/contextkey/testing.d.ts +0 -1
- package/lib/contextkey/testing.d.ts.map +1 -1
- package/lib/contextkey/testing.js +1 -2
- package/lib/contextkey/testing.js.map +1 -1
- package/lib/menu/next/menu.contrib.interface.d.ts +2 -3
- package/lib/menu/next/menu.contrib.interface.d.ts.map +1 -1
- package/lib/menu/next/menu.contrib.interface.js.map +1 -1
- package/lib/preferences/preference-configurations.js +1 -1
- package/lib/preferences/preference-configurations.js.map +1 -1
- package/lib/react-providers/config-provider.d.ts +0 -4
- package/lib/react-providers/config-provider.d.ts.map +1 -1
- package/lib/react-providers/config-provider.js.map +1 -1
- package/lib/services/storage-service.d.ts.map +1 -1
- package/lib/services/storage-service.js +1 -7
- package/lib/services/storage-service.js.map +1 -1
- package/lib/utils/label.d.ts.map +1 -1
- package/lib/utils/label.js +9 -16
- package/lib/utils/label.js.map +1 -1
- package/package.json +6 -7
- package/src/application/application-state-service.ts +0 -54
- package/src/application/application.service.ts +0 -51
- package/src/application/index.ts +0 -2
- package/src/authentication/authentication.contribution.ts +0 -35
- package/src/authentication/authentication.service.ts +0 -517
- package/src/bootstrap/app.ts +0 -745
- package/src/bootstrap/app.view.tsx +0 -88
- package/src/bootstrap/connection.ts +0 -116
- package/src/bootstrap/index.ts +0 -3
- package/src/bootstrap/inner-providers.ts +0 -297
- package/src/bootstrap/lifecycle.service.ts +0 -19
- package/src/browser-module.ts +0 -24
- package/src/common/common.command.ts +0 -977
- package/src/common/common.contribution.ts +0 -343
- package/src/common/common.define.ts +0 -55
- package/src/common/common.module.ts +0 -33
- package/src/common/common.storage.ts +0 -22
- package/src/common/container-id.ts +0 -12
- package/src/common/index.ts +0 -4
- package/src/components/actions/index.tsx +0 -486
- package/src/components/actions/placements.ts +0 -47
- package/src/components/actions/styles.module.less +0 -144
- package/src/components/badge/index.tsx +0 -1
- package/src/components/index.ts +0 -26
- package/src/components/layout/box-panel.tsx +0 -88
- package/src/components/layout/default-layout.tsx +0 -61
- package/src/components/layout/index.ts +0 -4
- package/src/components/layout/layout.ts +0 -80
- package/src/components/layout/split-panel.service.ts +0 -56
- package/src/components/layout/split-panel.tsx +0 -296
- package/src/components/layout/styles.module.less +0 -21
- package/src/components/loading/index.ts +0 -1
- package/src/components/loading/loading.less +0 -14
- package/src/components/loading/loading.view.tsx +0 -7
- package/src/components/loading/media/loading-dark.svg +0 -52
- package/src/components/loading/media/loading-hc.svg +0 -52
- package/src/components/loading/media/loading.svg +0 -52
- package/src/components/popover/styles.module.less +0 -81
- package/src/components/portal/index.tsx +0 -13
- package/src/components/progressbar/index.tsx +0 -16
- package/src/components/progressbar/styles.module.less +0 -31
- package/src/components/recycle-tree/index.ts +0 -1
- package/src/components/recycle-tree/recycle-tree.view.tsx +0 -368
- package/src/components/resize/resize.module.less +0 -78
- package/src/components/resize/resize.tsx +0 -663
- package/src/components/scroll/index.tsx +0 -386
- package/src/components/scroll/scroll.module.less +0 -108
- package/src/components/scrollbar/index.ts +0 -1
- package/src/components/scrollbar/scrollbar.less +0 -36
- package/src/components/scrollbar/scrollbar.view.ts +0 -8
- package/src/components/select/index.tsx +0 -12
- package/src/components/select/styles.less +0 -6
- package/src/components/tree/index.ts +0 -3
- package/src/components/tree/tree-node.view.tsx +0 -546
- package/src/components/tree/tree.module.less +0 -297
- package/src/components/tree/tree.view.tsx +0 -486
- package/src/context-key.ts +0 -48
- package/src/contextkey/dialog.ts +0 -3
- package/src/contextkey/explorer.ts +0 -26
- package/src/contextkey/index.ts +0 -6
- package/src/contextkey/outline.ts +0 -4
- package/src/contextkey/resource.ts +0 -61
- package/src/contextkey/terminal.ts +0 -7
- package/src/contextkey/testing.ts +0 -9
- package/src/contextkey/workspace.ts +0 -7
- package/src/core-preferences.ts +0 -318
- package/src/dom/index.ts +0 -176
- package/src/encoding-registry.ts +0 -83
- package/src/extensions/extensions-point.service.ts +0 -78
- package/src/extensions/index.ts +0 -3
- package/src/extensions/schema/browserViews.ts +0 -96
- package/src/extensions/schema/menu.ts +0 -245
- package/src/extensions/schema/opensumiExtensionPackageSchema.ts +0 -12
- package/src/extensions/schema/toolbar.ts +0 -338
- package/src/extensions/schema/vscodeExtensionPackageSchema.ts +0 -330
- package/src/fs/index.ts +0 -12
- package/src/hash-calculate/hash-calculate.contribution.ts +0 -19
- package/src/index.ts +0 -42
- package/src/keybinding/index.ts +0 -1
- package/src/keybinding/keybinding.ts +0 -908
- package/src/keyboard/index.ts +0 -3
- package/src/keyboard/keyboard-layout-provider.ts +0 -412
- package/src/keyboard/keyboard-layout-service.ts +0 -449
- package/src/keyboard/keys.ts +0 -748
- package/src/keyboard/layouts/_.contribution.ts +0 -24
- package/src/keyboard/layouts/cz.win.ts +0 -168
- package/src/keyboard/layouts/de-swiss.win.ts +0 -168
- package/src/keyboard/layouts/de.darwin.ts +0 -131
- package/src/keyboard/layouts/de.linux.ts +0 -186
- package/src/keyboard/layouts/de.win.ts +0 -168
- package/src/keyboard/layouts/dk.win.ts +0 -168
- package/src/keyboard/layouts/dvorak.darwin.ts +0 -131
- package/src/keyboard/layouts/en-belgian.win.ts +0 -168
- package/src/keyboard/layouts/en-ext.darwin.ts +0 -131
- package/src/keyboard/layouts/en-in.win.ts +0 -168
- package/src/keyboard/layouts/en-intl.darwin.ts +0 -131
- package/src/keyboard/layouts/en-intl.win.ts +0 -168
- package/src/keyboard/layouts/en-uk.darwin.ts +0 -131
- package/src/keyboard/layouts/en-uk.win.ts +0 -168
- package/src/keyboard/layouts/en.darwin.ts +0 -139
- package/src/keyboard/layouts/en.linux.ts +0 -186
- package/src/keyboard/layouts/en.win.ts +0 -173
- package/src/keyboard/layouts/es-latin.win.ts +0 -168
- package/src/keyboard/layouts/es.darwin.ts +0 -131
- package/src/keyboard/layouts/es.linux.ts +0 -186
- package/src/keyboard/layouts/es.win.ts +0 -168
- package/src/keyboard/layouts/fr.darwin.ts +0 -131
- package/src/keyboard/layouts/fr.linux.ts +0 -186
- package/src/keyboard/layouts/fr.win.ts +0 -168
- package/src/keyboard/layouts/hu.win.ts +0 -168
- package/src/keyboard/layouts/it.darwin.ts +0 -131
- package/src/keyboard/layouts/it.win.ts +0 -168
- package/src/keyboard/layouts/jp-roman.darwin.ts +0 -131
- package/src/keyboard/layouts/jp.darwin.ts +0 -131
- package/src/keyboard/layouts/ko.darwin.ts +0 -131
- package/src/keyboard/layouts/layout.contribution.darwin.ts +0 -23
- package/src/keyboard/layouts/layout.contribution.linux.ts +0 -12
- package/src/keyboard/layouts/layout.contribution.ts +0 -9
- package/src/keyboard/layouts/layout.contribution.win.ts +0 -29
- package/src/keyboard/layouts/no.win.ts +0 -168
- package/src/keyboard/layouts/pl.darwin.ts +0 -131
- package/src/keyboard/layouts/pl.win.ts +0 -168
- package/src/keyboard/layouts/pt-br.win.ts +0 -169
- package/src/keyboard/layouts/pt.darwin.ts +0 -131
- package/src/keyboard/layouts/pt.win.ts +0 -168
- package/src/keyboard/layouts/ru.darwin.ts +0 -131
- package/src/keyboard/layouts/ru.linux.ts +0 -186
- package/src/keyboard/layouts/ru.win.ts +0 -168
- package/src/keyboard/layouts/sv.darwin.ts +0 -131
- package/src/keyboard/layouts/sv.win.ts +0 -168
- package/src/keyboard/layouts/thai.win.ts +0 -168
- package/src/keyboard/layouts/tr.win.ts +0 -168
- package/src/keyboard/layouts/zh-hans.darwin.ts +0 -131
- package/src/layout/accordion/tab-bar-toolbar.tsx +0 -59
- package/src/layout/accordion/view-context-key.registry.ts +0 -34
- package/src/layout/constants.ts +0 -7
- package/src/layout/index.ts +0 -5
- package/src/layout/layout-hooks.ts +0 -68
- package/src/layout/layout-state.ts +0 -107
- package/src/layout/layout.interface.ts +0 -101
- package/src/layout/layout.ts +0 -80
- package/src/layout/view-id.ts +0 -18
- package/src/logger/browser-logger.ts +0 -51
- package/src/logger/index.ts +0 -1
- package/src/markdown/index.tsx +0 -62
- package/src/menu/next/base.ts +0 -513
- package/src/menu/next/ctxmenu-service.ts +0 -188
- package/src/menu/next/index.ts +0 -10
- package/src/menu/next/menu-id.ts +0 -86
- package/src/menu/next/menu-service.ts +0 -252
- package/src/menu/next/menu-util.ts +0 -77
- package/src/menu/next/menu.contrib.interface.ts +0 -79
- package/src/menu/next/menu.interface.ts +0 -253
- package/src/menu/next/menubar-service.ts +0 -211
- package/src/menu/next/renderer/ctxmenu/base.ts +0 -18
- package/src/menu/next/renderer/ctxmenu/browser.ts +0 -45
- package/src/menu/next/renderer/ctxmenu/electron.ts +0 -207
- package/src/menu/next/toolbar-action.service.ts +0 -132
- package/src/monaco/index.ts +0 -128
- package/src/opener/command-opener.ts +0 -42
- package/src/opener/default-opener.ts +0 -31
- package/src/opener/http-opener.ts +0 -25
- package/src/opener/index.ts +0 -19
- package/src/opener/opener.contribution.ts +0 -57
- package/src/opener/opener.service.ts +0 -66
- package/src/preferences/early-preferences.ts +0 -117
- package/src/preferences/index.ts +0 -9
- package/src/preferences/preference-configurations.ts +0 -77
- package/src/preferences/preference-contribution.ts +0 -401
- package/src/preferences/preference-provider.ts +0 -414
- package/src/preferences/preference-proxy.ts +0 -292
- package/src/preferences/preference-scope.ts +0 -3
- package/src/preferences/preference-service.ts +0 -571
- package/src/preferences/settings.ts +0 -53
- package/src/preferences/types.ts +0 -111
- package/src/progress/index.ts +0 -58
- package/src/progress/progress-bar.tsx +0 -22
- package/src/progress/progress-indicator.ts +0 -90
- package/src/progress/progress.module.less +0 -46
- package/src/progress/progress.service.tsx +0 -429
- package/src/quick-open/index.ts +0 -655
- package/src/quick-open/recent-files.ts +0 -68
- package/src/raw-context-key.ts +0 -116
- package/src/react-hooks/event.tsx +0 -80
- package/src/react-hooks/hot-key.tsx +0 -58
- package/src/react-hooks/index.ts +0 -3
- package/src/react-hooks/injectable-hooks.tsx +0 -35
- package/src/react-hooks/portal-hooks.tsx +0 -38
- package/src/react-providers/config-provider.tsx +0 -263
- package/src/react-providers/index.tsx +0 -2
- package/src/react-providers/slot.module.less +0 -19
- package/src/react-providers/slot.tsx +0 -242
- package/src/services/clipboard.service.ts +0 -97
- package/src/services/credentials-service.ts +0 -91
- package/src/services/crypto-service.ts +0 -23
- package/src/services/external-uri.service.ts +0 -68
- package/src/services/index.ts +0 -7
- package/src/services/label-service.ts +0 -386
- package/src/services/status-bar-service.ts +0 -108
- package/src/services/storage-service.ts +0 -197
- package/src/style/codicons/README.md +0 -22
- package/src/style/codicons/codicon-animations.css +0 -15
- package/src/style/codicons/generator.js +0 -15
- package/src/style/entry.less +0 -25
- package/src/style/icon/fileicons/file-default.svg +0 -1
- package/src/style/icon/fileicons/folder-default.svg +0 -1
- package/src/style/icon/fileicons.less +0 -20
- package/src/style/icon/icon.ts +0 -543
- package/src/style/icon/ide-iconfont.ts +0 -13
- package/src/style/icon/index.less +0 -54
- package/src/style/icon/seti.woff +0 -0
- package/src/style/icon/symbol-icons/boolean-dark.svg +0 -3
- package/src/style/icon/symbol-icons/boolean-light.svg +0 -3
- package/src/style/icon/symbol-icons/class-dark.svg +0 -3
- package/src/style/icon/symbol-icons/class-light.svg +0 -3
- package/src/style/icon/symbol-icons/constant-dark.svg +0 -4
- package/src/style/icon/symbol-icons/constant-light.svg +0 -4
- package/src/style/icon/symbol-icons/enumerator-dark.svg +0 -3
- package/src/style/icon/symbol-icons/enumerator-item-dark.svg +0 -3
- package/src/style/icon/symbol-icons/enumerator-item-light.svg +0 -3
- package/src/style/icon/symbol-icons/enumerator-light.svg +0 -3
- package/src/style/icon/symbol-icons/event-dark.svg +0 -3
- package/src/style/icon/symbol-icons/event-light.svg +0 -3
- package/src/style/icon/symbol-icons/field-dark.svg +0 -3
- package/src/style/icon/symbol-icons/field-light.svg +0 -3
- package/src/style/icon/symbol-icons/file-dark.svg +0 -3
- package/src/style/icon/symbol-icons/file-light.svg +0 -3
- package/src/style/icon/symbol-icons/indexer-dark.svg +0 -3
- package/src/style/icon/symbol-icons/indexer-light.svg +0 -3
- package/src/style/icon/symbol-icons/interface-dark.svg +0 -3
- package/src/style/icon/symbol-icons/interface-light.svg +0 -3
- package/src/style/icon/symbol-icons/keyword-dark.svg +0 -3
- package/src/style/icon/symbol-icons/keyword-light.svg +0 -3
- package/src/style/icon/symbol-icons/method-dark.svg +0 -3
- package/src/style/icon/symbol-icons/method-light.svg +0 -3
- package/src/style/icon/symbol-icons/namespace-dark.svg +0 -3
- package/src/style/icon/symbol-icons/namespace-light.svg +0 -3
- package/src/style/icon/symbol-icons/numeric-dark.svg +0 -3
- package/src/style/icon/symbol-icons/numeric-light.svg +0 -3
- package/src/style/icon/symbol-icons/operator-dark.svg +0 -3
- package/src/style/icon/symbol-icons/operator-light.svg +0 -3
- package/src/style/icon/symbol-icons/property-dark.svg +0 -3
- package/src/style/icon/symbol-icons/property-light.svg +0 -3
- package/src/style/icon/symbol-icons/snippet-dark.svg +0 -3
- package/src/style/icon/symbol-icons/snippet-light.svg +0 -3
- package/src/style/icon/symbol-icons/string-dark.svg +0 -3
- package/src/style/icon/symbol-icons/string-light.svg +0 -3
- package/src/style/icon/symbol-icons/structure-dark.svg +0 -3
- package/src/style/icon/symbol-icons/structure-light.svg +0 -3
- package/src/style/icon/symbol-icons/symbol-icons.css +0 -284
- package/src/style/icon/symbol-icons/template-dark.svg +0 -3
- package/src/style/icon/symbol-icons/template-light.svg +0 -3
- package/src/style/icon/symbol-icons/variable-dark.svg +0 -3
- package/src/style/icon/symbol-icons/variable-light.svg +0 -3
- package/src/style/icon.less +0 -8
- package/src/style/index.less +0 -14
- package/src/style/monaco-override.less +0 -116
- package/src/style/normalize.less +0 -92
- package/src/style/octicons/octicons-cdn.css +0 -720
- package/src/style/octicons/octicons.css +0 -714
- package/src/style/octicons/octicons.html +0 -1882
- package/src/style/octicons/octicons.svg +0 -582
- package/src/style/octicons/octicons.ttf +0 -0
- package/src/style/override.less +0 -97
- package/src/style/toolbar.less +0 -199
- package/src/style/utilities.less +0 -8
- package/src/style/variable.less +0 -8
- package/src/terminal/index.ts +0 -7
- package/src/toolbar/components/auto-complete.tsx +0 -0
- package/src/toolbar/components/button.tsx +0 -440
- package/src/toolbar/components/index.ts +0 -2
- package/src/toolbar/components/select.tsx +0 -189
- package/src/toolbar/index.ts +0 -3
- package/src/toolbar/toolbar.popover.registry.ts +0 -32
- package/src/toolbar/toolbar.registry.ts +0 -352
- package/src/toolbar/toolbar.tsx +0 -710
- package/src/toolbar/types.ts +0 -383
- package/src/tree/index.ts +0 -3
- package/src/tree/tree-expansion.ts +0 -25
- package/src/tree/tree-selection.ts +0 -89
- package/src/tree/tree.ts +0 -294
- package/src/utils/create-overlay.tsx +0 -53
- package/src/utils/electron.ts +0 -92
- package/src/utils/env.ts +0 -26
- package/src/utils/icon.ts +0 -13
- package/src/utils/index.ts +0 -7
- package/src/utils/json.ts +0 -251
- package/src/utils/label.tsx +0 -36
- package/src/utils/parse.ts +0 -72
- package/src/utils/react-hooks.ts +0 -118
- package/src/variable/index.ts +0 -1
- package/src/variable/variable.ts +0 -84
- package/src/window/index.ts +0 -34
- package/src/window/window.service.ts +0 -100
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="margin: auto; background: none; display: block; shape-rendering: auto;" width="20px" height="20px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
|
|
3
|
-
<g transform="rotate(0 50 50)">
|
|
4
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="grey">
|
|
5
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.9166666666666666s" repeatCount="indefinite"></animate>
|
|
6
|
-
</rect>
|
|
7
|
-
</g><g transform="rotate(30 50 50)">
|
|
8
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="grey">
|
|
9
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.8333333333333334s" repeatCount="indefinite"></animate>
|
|
10
|
-
</rect>
|
|
11
|
-
</g><g transform="rotate(60 50 50)">
|
|
12
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="grey">
|
|
13
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.75s" repeatCount="indefinite"></animate>
|
|
14
|
-
</rect>
|
|
15
|
-
</g><g transform="rotate(90 50 50)">
|
|
16
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="grey">
|
|
17
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.6666666666666666s" repeatCount="indefinite"></animate>
|
|
18
|
-
</rect>
|
|
19
|
-
</g><g transform="rotate(120 50 50)">
|
|
20
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="grey">
|
|
21
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.5833333333333334s" repeatCount="indefinite"></animate>
|
|
22
|
-
</rect>
|
|
23
|
-
</g><g transform="rotate(150 50 50)">
|
|
24
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="grey">
|
|
25
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.5s" repeatCount="indefinite"></animate>
|
|
26
|
-
</rect>
|
|
27
|
-
</g><g transform="rotate(180 50 50)">
|
|
28
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="grey">
|
|
29
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.4166666666666667s" repeatCount="indefinite"></animate>
|
|
30
|
-
</rect>
|
|
31
|
-
</g><g transform="rotate(210 50 50)">
|
|
32
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="grey">
|
|
33
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.3333333333333333s" repeatCount="indefinite"></animate>
|
|
34
|
-
</rect>
|
|
35
|
-
</g><g transform="rotate(240 50 50)">
|
|
36
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="grey">
|
|
37
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.25s" repeatCount="indefinite"></animate>
|
|
38
|
-
</rect>
|
|
39
|
-
</g><g transform="rotate(270 50 50)">
|
|
40
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="grey">
|
|
41
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.16666666666666666s" repeatCount="indefinite"></animate>
|
|
42
|
-
</rect>
|
|
43
|
-
</g><g transform="rotate(300 50 50)">
|
|
44
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="grey">
|
|
45
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.08333333333333333s" repeatCount="indefinite"></animate>
|
|
46
|
-
</rect>
|
|
47
|
-
</g><g transform="rotate(330 50 50)">
|
|
48
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="grey">
|
|
49
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="0s" repeatCount="indefinite"></animate>
|
|
50
|
-
</rect>
|
|
51
|
-
</g>
|
|
52
|
-
</svg>
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="margin: auto; background: none; display: block; shape-rendering: auto;" width="20px" height="20px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
|
|
3
|
-
<g transform="rotate(0 50 50)">
|
|
4
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="white">
|
|
5
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.9166666666666666s" repeatCount="indefinite"></animate>
|
|
6
|
-
</rect>
|
|
7
|
-
</g><g transform="rotate(30 50 50)">
|
|
8
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="white">
|
|
9
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.8333333333333334s" repeatCount="indefinite"></animate>
|
|
10
|
-
</rect>
|
|
11
|
-
</g><g transform="rotate(60 50 50)">
|
|
12
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="white">
|
|
13
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.75s" repeatCount="indefinite"></animate>
|
|
14
|
-
</rect>
|
|
15
|
-
</g><g transform="rotate(90 50 50)">
|
|
16
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="white">
|
|
17
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.6666666666666666s" repeatCount="indefinite"></animate>
|
|
18
|
-
</rect>
|
|
19
|
-
</g><g transform="rotate(120 50 50)">
|
|
20
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="white">
|
|
21
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.5833333333333334s" repeatCount="indefinite"></animate>
|
|
22
|
-
</rect>
|
|
23
|
-
</g><g transform="rotate(150 50 50)">
|
|
24
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="white">
|
|
25
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.5s" repeatCount="indefinite"></animate>
|
|
26
|
-
</rect>
|
|
27
|
-
</g><g transform="rotate(180 50 50)">
|
|
28
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="white">
|
|
29
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.4166666666666667s" repeatCount="indefinite"></animate>
|
|
30
|
-
</rect>
|
|
31
|
-
</g><g transform="rotate(210 50 50)">
|
|
32
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="white">
|
|
33
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.3333333333333333s" repeatCount="indefinite"></animate>
|
|
34
|
-
</rect>
|
|
35
|
-
</g><g transform="rotate(240 50 50)">
|
|
36
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="white">
|
|
37
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.25s" repeatCount="indefinite"></animate>
|
|
38
|
-
</rect>
|
|
39
|
-
</g><g transform="rotate(270 50 50)">
|
|
40
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="white">
|
|
41
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.16666666666666666s" repeatCount="indefinite"></animate>
|
|
42
|
-
</rect>
|
|
43
|
-
</g><g transform="rotate(300 50 50)">
|
|
44
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="white">
|
|
45
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.08333333333333333s" repeatCount="indefinite"></animate>
|
|
46
|
-
</rect>
|
|
47
|
-
</g><g transform="rotate(330 50 50)">
|
|
48
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="white">
|
|
49
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="0s" repeatCount="indefinite"></animate>
|
|
50
|
-
</rect>
|
|
51
|
-
</g>
|
|
52
|
-
</svg>
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="margin: auto; background: none; display: block; shape-rendering: auto;" width="20px" height="20px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
|
|
3
|
-
<g transform="rotate(0 50 50)">
|
|
4
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="grey">
|
|
5
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.9166666666666666s" repeatCount="indefinite"></animate>
|
|
6
|
-
</rect>
|
|
7
|
-
</g><g transform="rotate(30 50 50)">
|
|
8
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="grey">
|
|
9
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.8333333333333334s" repeatCount="indefinite"></animate>
|
|
10
|
-
</rect>
|
|
11
|
-
</g><g transform="rotate(60 50 50)">
|
|
12
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="grey">
|
|
13
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.75s" repeatCount="indefinite"></animate>
|
|
14
|
-
</rect>
|
|
15
|
-
</g><g transform="rotate(90 50 50)">
|
|
16
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="grey">
|
|
17
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.6666666666666666s" repeatCount="indefinite"></animate>
|
|
18
|
-
</rect>
|
|
19
|
-
</g><g transform="rotate(120 50 50)">
|
|
20
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="grey">
|
|
21
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.5833333333333334s" repeatCount="indefinite"></animate>
|
|
22
|
-
</rect>
|
|
23
|
-
</g><g transform="rotate(150 50 50)">
|
|
24
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="grey">
|
|
25
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.5s" repeatCount="indefinite"></animate>
|
|
26
|
-
</rect>
|
|
27
|
-
</g><g transform="rotate(180 50 50)">
|
|
28
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="grey">
|
|
29
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.4166666666666667s" repeatCount="indefinite"></animate>
|
|
30
|
-
</rect>
|
|
31
|
-
</g><g transform="rotate(210 50 50)">
|
|
32
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="grey">
|
|
33
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.3333333333333333s" repeatCount="indefinite"></animate>
|
|
34
|
-
</rect>
|
|
35
|
-
</g><g transform="rotate(240 50 50)">
|
|
36
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="grey">
|
|
37
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.25s" repeatCount="indefinite"></animate>
|
|
38
|
-
</rect>
|
|
39
|
-
</g><g transform="rotate(270 50 50)">
|
|
40
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="grey">
|
|
41
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.16666666666666666s" repeatCount="indefinite"></animate>
|
|
42
|
-
</rect>
|
|
43
|
-
</g><g transform="rotate(300 50 50)">
|
|
44
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="grey">
|
|
45
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.08333333333333333s" repeatCount="indefinite"></animate>
|
|
46
|
-
</rect>
|
|
47
|
-
</g><g transform="rotate(330 50 50)">
|
|
48
|
-
<rect x="47" y="24" rx="3" ry="6" width="6" height="12" fill="grey">
|
|
49
|
-
<animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="0s" repeatCount="indefinite"></animate>
|
|
50
|
-
</rect>
|
|
51
|
-
</g>
|
|
52
|
-
</svg>
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
@import '../../style/variable.less';
|
|
2
|
-
|
|
3
|
-
.popover {
|
|
4
|
-
position: relative;
|
|
5
|
-
position: relative;
|
|
6
|
-
display: flex;
|
|
7
|
-
justify-content: center;
|
|
8
|
-
align-items: center;
|
|
9
|
-
|
|
10
|
-
.content {
|
|
11
|
-
display: none;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
:global {
|
|
16
|
-
:local(.content) {
|
|
17
|
-
position: absolute;
|
|
18
|
-
color: var(--kt-tooltip-foreground);
|
|
19
|
-
background: var(--kt-tooltip-background);
|
|
20
|
-
border-color: var(--notifications-border);
|
|
21
|
-
border-radius: var(--kt-tooltip-borderRadius);
|
|
22
|
-
.overlay-shadow();
|
|
23
|
-
box-shadow: 0 5px 15px 0 var(--widget-shadow);
|
|
24
|
-
padding: 5px 10px;
|
|
25
|
-
z-index: 10001;
|
|
26
|
-
margin-top: -5px;
|
|
27
|
-
|
|
28
|
-
&.top {
|
|
29
|
-
&::after {
|
|
30
|
-
position: absolute;
|
|
31
|
-
left: 50%;
|
|
32
|
-
margin-left: -7px;
|
|
33
|
-
top: 100%;
|
|
34
|
-
content: '';
|
|
35
|
-
width: 0;
|
|
36
|
-
height: 0;
|
|
37
|
-
border-style: solid;
|
|
38
|
-
border-width: 7px 7px 0 7px;
|
|
39
|
-
border-color: var(--kt-tooltip-background) transparent transparent transparent;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
&::before {
|
|
43
|
-
content: '';
|
|
44
|
-
position: absolute;
|
|
45
|
-
left: 0;
|
|
46
|
-
top: 100%;
|
|
47
|
-
width: 100%;
|
|
48
|
-
height: 15px;
|
|
49
|
-
border-style: solid;
|
|
50
|
-
background: transparent;
|
|
51
|
-
border: 0;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
&.bottom {
|
|
55
|
-
&::after {
|
|
56
|
-
position: absolute;
|
|
57
|
-
left: 50%;
|
|
58
|
-
margin-left: -7px;
|
|
59
|
-
bottom: 100%;
|
|
60
|
-
content: '';
|
|
61
|
-
width: 0;
|
|
62
|
-
height: 0;
|
|
63
|
-
border-style: solid;
|
|
64
|
-
border-width: 0 7px 7px 7px;
|
|
65
|
-
border-color: transparent transparent var(--kt-tooltip-background) transparent;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
&::before {
|
|
69
|
-
content: '';
|
|
70
|
-
position: absolute;
|
|
71
|
-
left: 0;
|
|
72
|
-
bottom: 100%;
|
|
73
|
-
width: 100%;
|
|
74
|
-
height: 15px;
|
|
75
|
-
border-style: solid;
|
|
76
|
-
background: transparent;
|
|
77
|
-
border: 0;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import ReactDOM from 'react-dom';
|
|
3
|
-
|
|
4
|
-
import { usePortal } from '../../react-hooks';
|
|
5
|
-
|
|
6
|
-
const Portal: React.FC<{
|
|
7
|
-
id: string;
|
|
8
|
-
}> = ({ id, children }) => {
|
|
9
|
-
const target = usePortal(id);
|
|
10
|
-
return ReactDOM.createPortal(children, target);
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export default Portal;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import styles from './styles.module.less';
|
|
4
|
-
|
|
5
|
-
export const ProgressBar: React.FC<{
|
|
6
|
-
loading: boolean;
|
|
7
|
-
}> = React.memo(({ loading }) => {
|
|
8
|
-
if (!loading) {
|
|
9
|
-
return null;
|
|
10
|
-
}
|
|
11
|
-
return (
|
|
12
|
-
<div className={styles.progressbar}>
|
|
13
|
-
<div className={styles.barblock} />
|
|
14
|
-
</div>
|
|
15
|
-
);
|
|
16
|
-
});
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
@import '../../style/variable.less';
|
|
2
|
-
|
|
3
|
-
.progressbar {
|
|
4
|
-
position: absolute;
|
|
5
|
-
top: 0;
|
|
6
|
-
left: 0;
|
|
7
|
-
width: 100%;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.barblock {
|
|
11
|
-
position: absolute;
|
|
12
|
-
left: 0;
|
|
13
|
-
top: 0;
|
|
14
|
-
background: var(--progressBar-background);
|
|
15
|
-
width: 10px;
|
|
16
|
-
height: 2px;
|
|
17
|
-
animation: loading 5s infinite;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
@keyframes loading {
|
|
21
|
-
0% {
|
|
22
|
-
left: 0;
|
|
23
|
-
}
|
|
24
|
-
50% {
|
|
25
|
-
left: calc(100% - 20px);
|
|
26
|
-
width: 20px;
|
|
27
|
-
}
|
|
28
|
-
100% {
|
|
29
|
-
left: 0;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './recycle-tree.view';
|
|
@@ -1,368 +0,0 @@
|
|
|
1
|
-
import fuzzy from 'fuzzy';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
|
|
4
|
-
import { Deprecated } from '@opensumi/ide-components/lib/utils';
|
|
5
|
-
|
|
6
|
-
import { PerfectScrollbar } from '../scrollbar';
|
|
7
|
-
import { TreeProps, TreeContainer, TreeNode, ExpandableTreeNode, TEMP_FILE_NAME } from '../tree';
|
|
8
|
-
|
|
9
|
-
export interface RecycleTreeProps extends TreeProps {
|
|
10
|
-
/**
|
|
11
|
-
* 滚动内容样式,包括不可见区域
|
|
12
|
-
*
|
|
13
|
-
* @type {({
|
|
14
|
-
* [key: string]: string | number | boolean | undefined,
|
|
15
|
-
* })}
|
|
16
|
-
* @memberof RecycleTreeProps
|
|
17
|
-
*/
|
|
18
|
-
scrollContentStyle?: {
|
|
19
|
-
[key: string]: string | number | boolean | undefined;
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* 可视区域样式 (必须包含宽高用于初始化视图)
|
|
23
|
-
*
|
|
24
|
-
* @type {({
|
|
25
|
-
* width: number | string;
|
|
26
|
-
* height: number | string;
|
|
27
|
-
* [key: string]: string | number | boolean | undefined,
|
|
28
|
-
* })}
|
|
29
|
-
* @memberof RecycleTreeProps
|
|
30
|
-
*/
|
|
31
|
-
scrollContainerStyle: {
|
|
32
|
-
width: number | string;
|
|
33
|
-
height: number | string;
|
|
34
|
-
[key: string]: string | number | boolean | undefined;
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* 缩进大小
|
|
38
|
-
*
|
|
39
|
-
* @type {number}
|
|
40
|
-
* @memberof RecycleTreeProps
|
|
41
|
-
*/
|
|
42
|
-
leftPadding?: number;
|
|
43
|
-
/**
|
|
44
|
-
* 默认顶部高度
|
|
45
|
-
*
|
|
46
|
-
* @type {number}
|
|
47
|
-
* @memberof RecycleTreeProps
|
|
48
|
-
*/
|
|
49
|
-
scrollTop?: number;
|
|
50
|
-
/**
|
|
51
|
-
* 预加载数量, 默认值为 10
|
|
52
|
-
*
|
|
53
|
-
* @type {number}
|
|
54
|
-
* @memberof RecycleTreeProps
|
|
55
|
-
*/
|
|
56
|
-
prerenderNumber?: number;
|
|
57
|
-
/**
|
|
58
|
-
* 搜索字符串
|
|
59
|
-
*
|
|
60
|
-
* @type {string}
|
|
61
|
-
* @memberof RecycleTreeProps
|
|
62
|
-
*/
|
|
63
|
-
search?: string;
|
|
64
|
-
/**
|
|
65
|
-
* 替换的字符串,需配合search字段使用
|
|
66
|
-
*
|
|
67
|
-
* @type {string}
|
|
68
|
-
* @memberof RecycleTreeProps
|
|
69
|
-
*/
|
|
70
|
-
replace?: string;
|
|
71
|
-
/**
|
|
72
|
-
* 容器高度
|
|
73
|
-
* RecycleTree配合 itemLineHeight 计算出可视区域渲染数量
|
|
74
|
-
*
|
|
75
|
-
* @type {number}
|
|
76
|
-
* @memberof RecycleTreeProps
|
|
77
|
-
*/
|
|
78
|
-
containerHeight: number;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* @deprecated will be removed in v2.19.0 version
|
|
83
|
-
*/
|
|
84
|
-
export const DeprecatedRecycleTree = ({
|
|
85
|
-
nodes,
|
|
86
|
-
leftPadding,
|
|
87
|
-
defaultLeftPadding,
|
|
88
|
-
multiSelectable,
|
|
89
|
-
scrollContainerStyle,
|
|
90
|
-
scrollContentStyle,
|
|
91
|
-
onContextMenu,
|
|
92
|
-
onDrag,
|
|
93
|
-
onDragStart,
|
|
94
|
-
onDragEnter,
|
|
95
|
-
onDragOver,
|
|
96
|
-
onDragLeave,
|
|
97
|
-
onDragEnd,
|
|
98
|
-
onDrop,
|
|
99
|
-
onChange,
|
|
100
|
-
draggable,
|
|
101
|
-
foldable,
|
|
102
|
-
editable,
|
|
103
|
-
searchable,
|
|
104
|
-
search,
|
|
105
|
-
replace,
|
|
106
|
-
onSelect,
|
|
107
|
-
onBlur,
|
|
108
|
-
onFocus,
|
|
109
|
-
onReveal,
|
|
110
|
-
filter,
|
|
111
|
-
onTwistieClick,
|
|
112
|
-
scrollTop,
|
|
113
|
-
prerenderNumber = 10,
|
|
114
|
-
containerHeight,
|
|
115
|
-
itemLineHeight = 22,
|
|
116
|
-
actions,
|
|
117
|
-
commandActuator,
|
|
118
|
-
fileDecorationProvider,
|
|
119
|
-
themeProvider,
|
|
120
|
-
notifyFileDecorationsChange,
|
|
121
|
-
notifyThemeChange,
|
|
122
|
-
validate,
|
|
123
|
-
alwaysShowActions,
|
|
124
|
-
}: RecycleTreeProps) => {
|
|
125
|
-
const noop = () => {};
|
|
126
|
-
const contentNumber = Math.ceil(containerHeight / itemLineHeight);
|
|
127
|
-
const [scrollRef, setScrollRef] = React.useState<HTMLDivElement>();
|
|
128
|
-
const [renderedStart, setRenderedStart] = React.useState(0);
|
|
129
|
-
const [renderNodes, setRenderNodes] = React.useState<TreeNode[]>([]);
|
|
130
|
-
const renderedEnd: number = renderedStart + contentNumber + prerenderNumber;
|
|
131
|
-
// 预加载因子
|
|
132
|
-
const preFactor = 3 / 4;
|
|
133
|
-
const upPrerenderNumber = Math.floor(prerenderNumber * preFactor);
|
|
134
|
-
const fuzzyOptions = {
|
|
135
|
-
pre: '<match>',
|
|
136
|
-
post: '</match>',
|
|
137
|
-
extract: (node: TreeNode) => {
|
|
138
|
-
if (typeof node.name === 'string') {
|
|
139
|
-
return node.name;
|
|
140
|
-
}
|
|
141
|
-
return '';
|
|
142
|
-
},
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
const isEqualOrParent = (node1: TreeNode, node2: TreeNode) => {
|
|
146
|
-
if (node1.id === node2.id) {
|
|
147
|
-
return true;
|
|
148
|
-
}
|
|
149
|
-
let parent = node2.parent;
|
|
150
|
-
while (parent) {
|
|
151
|
-
if (parent.id === node1.id) {
|
|
152
|
-
return true;
|
|
153
|
-
}
|
|
154
|
-
parent = parent.parent;
|
|
155
|
-
}
|
|
156
|
-
return false;
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
const isEqual = (node1: TreeNode, node2: TreeNode) => {
|
|
160
|
-
if (node1.id === node2.id) {
|
|
161
|
-
return true;
|
|
162
|
-
}
|
|
163
|
-
return false;
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
React.useEffect(() => {
|
|
167
|
-
if (typeof scrollTop === 'number' && scrollRef) {
|
|
168
|
-
scrollRef.scrollTop = scrollTop;
|
|
169
|
-
}
|
|
170
|
-
setRenderedStart(scrollTop ? Math.floor(scrollTop / itemLineHeight) : 0);
|
|
171
|
-
}, [scrollTop]);
|
|
172
|
-
|
|
173
|
-
React.useEffect(() => {
|
|
174
|
-
let renderedFileItems;
|
|
175
|
-
if (filter) {
|
|
176
|
-
const fuzzyLists = fuzzy.filter(filter, nodes, fuzzyOptions);
|
|
177
|
-
const tempNode = nodes.find((node: TreeNode) => node.name === TEMP_FILE_NAME);
|
|
178
|
-
renderedFileItems = nodes
|
|
179
|
-
.map((node: TreeNode) => {
|
|
180
|
-
for (const item of fuzzyLists) {
|
|
181
|
-
if (isEqual(node, (item as any).original)) {
|
|
182
|
-
// 匹配,存在高亮
|
|
183
|
-
return {
|
|
184
|
-
...node,
|
|
185
|
-
name: () => (
|
|
186
|
-
<div
|
|
187
|
-
style={{
|
|
188
|
-
flex: 1,
|
|
189
|
-
overflow: 'hidden',
|
|
190
|
-
textOverflow: 'ellipsis',
|
|
191
|
-
whiteSpace: 'nowrap',
|
|
192
|
-
}}
|
|
193
|
-
dangerouslySetInnerHTML={{ __html: item.string || '' }}
|
|
194
|
-
></div>
|
|
195
|
-
),
|
|
196
|
-
};
|
|
197
|
-
} else if (isEqualOrParent(node, (item as any).original) || (tempNode && isEqualOrParent(node, tempNode))) {
|
|
198
|
-
// 子节点存在匹配,不高亮但需展示
|
|
199
|
-
return node;
|
|
200
|
-
} else if (node.name === TEMP_FILE_NAME) {
|
|
201
|
-
// 如果为新建节点的节点,直接返回展示
|
|
202
|
-
return node;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
})
|
|
206
|
-
.filter((node: TreeNode) => !!node);
|
|
207
|
-
} else {
|
|
208
|
-
renderedFileItems = nodes;
|
|
209
|
-
}
|
|
210
|
-
renderedFileItems = renderedFileItems!.filter(
|
|
211
|
-
(item: TreeNode, index: number) => renderedStart <= index && index <= renderedEnd,
|
|
212
|
-
);
|
|
213
|
-
renderedFileItems = renderedFileItems.map((item: TreeNode, index: number) => {
|
|
214
|
-
let highLightRanges = item.highLightRanges;
|
|
215
|
-
if (!highLightRanges && searchable && search) {
|
|
216
|
-
highLightRanges = {
|
|
217
|
-
name: [],
|
|
218
|
-
description: [],
|
|
219
|
-
};
|
|
220
|
-
let start;
|
|
221
|
-
let end;
|
|
222
|
-
if (typeof item.name === 'string') {
|
|
223
|
-
let step = 0;
|
|
224
|
-
start = item.name.indexOf(search);
|
|
225
|
-
while (start >= 0) {
|
|
226
|
-
end = start + search.length;
|
|
227
|
-
highLightRanges.name!.push({
|
|
228
|
-
start: start + step,
|
|
229
|
-
end: end + step,
|
|
230
|
-
});
|
|
231
|
-
step += end;
|
|
232
|
-
start = item.name.indexOf(search.slice(end));
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
if (typeof item.description === 'string') {
|
|
236
|
-
let step = 0;
|
|
237
|
-
start = item.description.indexOf(search);
|
|
238
|
-
while (start >= 0) {
|
|
239
|
-
end = start + search.length;
|
|
240
|
-
highLightRanges.description!.push({
|
|
241
|
-
start: start + step,
|
|
242
|
-
end: end + step,
|
|
243
|
-
});
|
|
244
|
-
step += end;
|
|
245
|
-
start = item.description.indexOf(search.slice(end));
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
return {
|
|
250
|
-
...item,
|
|
251
|
-
order: renderedStart + index,
|
|
252
|
-
highLightRanges,
|
|
253
|
-
replace,
|
|
254
|
-
};
|
|
255
|
-
});
|
|
256
|
-
setRenderNodes(renderedFileItems);
|
|
257
|
-
}, [nodes, renderedStart, scrollContainerStyle]);
|
|
258
|
-
|
|
259
|
-
React.useEffect(() => {
|
|
260
|
-
if (scrollRef) {
|
|
261
|
-
scrollRef.scrollTop = 0;
|
|
262
|
-
}
|
|
263
|
-
setRenderedStart(0);
|
|
264
|
-
}, [filter]);
|
|
265
|
-
|
|
266
|
-
const scrollUpHandler = (element: Element) => {
|
|
267
|
-
const positionIndex = Math.floor(element.scrollTop / itemLineHeight);
|
|
268
|
-
if (positionIndex > upPrerenderNumber) {
|
|
269
|
-
const start = positionIndex - upPrerenderNumber;
|
|
270
|
-
// 当开始位置超过节点长度时,重置其实位置
|
|
271
|
-
setRenderedStart(start > nodes.length ? 0 : start);
|
|
272
|
-
} else {
|
|
273
|
-
setRenderedStart(0);
|
|
274
|
-
}
|
|
275
|
-
};
|
|
276
|
-
|
|
277
|
-
const scrollUpThrottledHandler = (element: Element) => {
|
|
278
|
-
requestAnimationFrame(() => {
|
|
279
|
-
scrollUpHandler(element);
|
|
280
|
-
});
|
|
281
|
-
};
|
|
282
|
-
|
|
283
|
-
const scrollDownHandler = (element: Element) => {
|
|
284
|
-
const positionIndex = Math.floor(element.scrollTop / itemLineHeight);
|
|
285
|
-
if (positionIndex > prerenderNumber - upPrerenderNumber) {
|
|
286
|
-
const start = positionIndex - (prerenderNumber - upPrerenderNumber);
|
|
287
|
-
// 当开始位置超过节点长度时,重置其实位置
|
|
288
|
-
setRenderedStart(start > nodes.length ? 0 : start);
|
|
289
|
-
} else {
|
|
290
|
-
setRenderedStart(0);
|
|
291
|
-
}
|
|
292
|
-
};
|
|
293
|
-
|
|
294
|
-
const scrollDownThrottledHandler = (element: Element) => {
|
|
295
|
-
requestAnimationFrame(() => {
|
|
296
|
-
scrollDownHandler(element);
|
|
297
|
-
});
|
|
298
|
-
};
|
|
299
|
-
|
|
300
|
-
const contentStyle = scrollContentStyle || {
|
|
301
|
-
width: '100%',
|
|
302
|
-
height: nodes.length * itemLineHeight <= containerHeight ? containerHeight : nodes.length * itemLineHeight,
|
|
303
|
-
userSelect: 'none',
|
|
304
|
-
};
|
|
305
|
-
|
|
306
|
-
const scrollerBarOptions = {
|
|
307
|
-
minScrollbarLength: 20,
|
|
308
|
-
};
|
|
309
|
-
|
|
310
|
-
const isComplex = !!nodes!.find(<T extends TreeNode>(node: T, index: number) => ExpandableTreeNode.is(node));
|
|
311
|
-
|
|
312
|
-
return (
|
|
313
|
-
<React.Fragment>
|
|
314
|
-
<PerfectScrollbar
|
|
315
|
-
style={scrollContainerStyle}
|
|
316
|
-
onScrollUp={scrollUpThrottledHandler}
|
|
317
|
-
onScrollDown={scrollDownThrottledHandler}
|
|
318
|
-
containerRef={(ref) => {
|
|
319
|
-
setScrollRef(ref);
|
|
320
|
-
}}
|
|
321
|
-
options={scrollerBarOptions}
|
|
322
|
-
>
|
|
323
|
-
<TreeContainer
|
|
324
|
-
style={contentStyle}
|
|
325
|
-
multiSelectable={multiSelectable}
|
|
326
|
-
itemLineHeight={itemLineHeight}
|
|
327
|
-
nodes={renderNodes}
|
|
328
|
-
actions={actions}
|
|
329
|
-
commandActuator={commandActuator}
|
|
330
|
-
leftPadding={leftPadding}
|
|
331
|
-
defaultLeftPadding={defaultLeftPadding}
|
|
332
|
-
onContextMenu={onContextMenu || noop}
|
|
333
|
-
onDrag={onDrag || noop}
|
|
334
|
-
onBlur={onBlur || noop}
|
|
335
|
-
onFocus={onFocus || noop}
|
|
336
|
-
onDragStart={onDragStart || noop}
|
|
337
|
-
onDragEnter={onDragEnter || noop}
|
|
338
|
-
onDragEnd={onDragEnd || noop}
|
|
339
|
-
onDragOver={onDragOver || noop}
|
|
340
|
-
onDragLeave={onDragLeave || noop}
|
|
341
|
-
onChange={onChange || noop}
|
|
342
|
-
onDrop={onDrop || noop}
|
|
343
|
-
onSelect={onSelect || noop}
|
|
344
|
-
onReveal={onReveal || noop}
|
|
345
|
-
onTwistieClick={onTwistieClick}
|
|
346
|
-
draggable={draggable}
|
|
347
|
-
foldable={foldable}
|
|
348
|
-
replace={replace}
|
|
349
|
-
editable={editable}
|
|
350
|
-
fileDecorationProvider={fileDecorationProvider}
|
|
351
|
-
themeProvider={themeProvider}
|
|
352
|
-
notifyFileDecorationsChange={notifyFileDecorationsChange}
|
|
353
|
-
notifyThemeChange={notifyThemeChange}
|
|
354
|
-
validate={validate}
|
|
355
|
-
isComplex={isComplex}
|
|
356
|
-
alwaysShowActions={alwaysShowActions}
|
|
357
|
-
/>
|
|
358
|
-
</PerfectScrollbar>
|
|
359
|
-
</React.Fragment>
|
|
360
|
-
);
|
|
361
|
-
};
|
|
362
|
-
|
|
363
|
-
DeprecatedRecycleTree.displayName = 'DeprecatedRecycleTree';
|
|
364
|
-
|
|
365
|
-
export const RecycleTree = Deprecated(
|
|
366
|
-
DeprecatedRecycleTree,
|
|
367
|
-
'[Deprecated warning]: The `RecycleTree` component in `@opensumi/ide-core-browser` will be removed in v2.19.0 version. Please use the new `RecycleTree` in `@opensumi/ide-component` instead',
|
|
368
|
-
);
|