@eclipse-docks/core 0.7.107 → 0.7.109
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/dist/api/index.js +4 -4
- package/dist/api/services.d.ts +1 -1
- package/dist/api/services.d.ts.map +1 -1
- package/dist/api/types.d.ts +1 -1
- package/dist/api/types.d.ts.map +1 -1
- package/dist/{api-gIOIP8P6.js → api-CuHseuRW.js} +4 -4
- package/dist/{api-gIOIP8P6.js.map → api-CuHseuRW.js.map} +1 -1
- package/dist/components/command.d.ts.map +1 -1
- package/dist/core/commandregistry.d.ts +2 -2
- package/dist/core/commandregistry.d.ts.map +1 -1
- package/dist/core/contributionregistry.d.ts +10 -2
- package/dist/core/contributionregistry.d.ts.map +1 -1
- package/dist/core/dialogservice.d.ts.map +1 -1
- package/dist/dialogs/form-dialog.d.ts +46 -0
- package/dist/dialogs/form-dialog.d.ts.map +1 -0
- package/dist/dialogs/index.d.ts +1 -0
- package/dist/dialogs/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/parts/contextmenu.d.ts.map +1 -1
- package/dist/parts/index.js +1 -1
- package/dist/parts/toolbar.d.ts.map +1 -1
- package/dist/{parts-Cl4eHsto.js → parts-D__47G7C.js} +171 -8
- package/dist/parts-D__47G7C.js.map +1 -0
- package/dist/{widget-BgBerzhp.js → widget-DbolQH0C.js} +19 -6
- package/dist/widget-DbolQH0C.js.map +1 -0
- package/dist/widgets/index.js +1 -1
- package/dist/{widgets-Cgi8WuOZ.js → widgets-SScpQQr9.js} +2 -2
- package/dist/{widgets-Cgi8WuOZ.js.map → widgets-SScpQQr9.js.map} +1 -1
- package/package.json +1 -1
- package/src/api/services.ts +7 -1
- package/src/api/types.ts +4 -1
- package/src/components/command.ts +14 -3
- package/src/core/commandregistry.ts +1 -1
- package/src/core/contributionregistry.ts +33 -8
- package/src/core/dialogservice.ts +6 -1
- package/src/dialogs/form-dialog.ts +239 -0
- package/src/dialogs/index.ts +8 -0
- package/src/parts/contextmenu.ts +6 -2
- package/src/parts/toolbar.ts +5 -3
- package/dist/parts-Cl4eHsto.js.map +0 -1
- package/dist/widget-BgBerzhp.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/components/command.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/components/command.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAgB/C,qBACa,YAAa,SAAQ,WAAW;IAEzC,GAAG,EAAE,MAAM,CAAK;IAGhB,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,KAAK,IAAI,CAAA;IAGhC,KAAK,EAAE,MAAM,CAAK;IAGlB,KAAK,CAAC,EAAE,OAAO,CAAQ;IAGvB,IAAI,CAAC,EAAE,MAAM,CAAA;IAGb,QAAQ,EAAE,OAAO,CAAQ;IAGzB,UAAU,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,iBAAiB,GAAG,QAAQ,GAAG,UAAU,CAAU;IAG5G,OAAO,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAY;IAG3E,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAU;IAG5C,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAK;IAGhC,QAAQ,CAAC,EAAE,MAAM,CAAA;IAGjB,SAAS,EAAE,OAAO,CAAO;IAGzB,SAAS,EAAE,KAAK,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,cAAc,GAAG,YAAY,GAAG,MAAM,GAAG,YAAY,GAAG,UAAU,GAAG,OAAO,GAAG,aAAa,GAAG,WAAW,CAAiB;IAGnL,OAAO,CAAC,qBAAqB,CAAqB;IAElD,OAAO,CAAC,WAAW;IAqBnB,OAAO,CAAC,YAAY;IASpB,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,aAAa;IAMrB,SAAS,CAAC,UAAU;IAapB,OAAO,CAAC,yBAAyB;IAMjC,OAAO,CAAC,kBAAkB;IA8B1B,MAAM;IAsEN,MAAM,CAAC,MAAM,0BAoBZ;CACJ;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,eAAe,EAAE,YAAY,CAAA;KAChC;CACJ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Contribution } from './contributionregistry';
|
|
2
2
|
export declare const TOPIC_COMMAND_REGISTERED = "events/commandregistry/commandRegistered";
|
|
3
3
|
export interface Parameter {
|
|
4
4
|
name: string;
|
|
@@ -73,7 +73,7 @@ export declare const commandRegistry: CommandRegistry;
|
|
|
73
73
|
export interface RegisterOptions {
|
|
74
74
|
command: Command;
|
|
75
75
|
handler?: Handler;
|
|
76
|
-
contribution?: Contribution
|
|
76
|
+
contribution?: Contribution;
|
|
77
77
|
}
|
|
78
78
|
export declare const registerAll: (options: RegisterOptions) => void;
|
|
79
79
|
//# sourceMappingURL=commandregistry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commandregistry.d.ts","sourceRoot":"","sources":["../../src/core/commandregistry.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"commandregistry.d.ts","sourceRoot":"","sources":["../../src/core/commandregistry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAuB,YAAY,EAAwB,MAAM,wBAAwB,CAAC;AAIjG,eAAO,MAAM,wBAAwB,6CAA6C,CAAC;AAEnF,MAAM,WAAW,SAAS;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAA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|
target?: string;
|
|
12
12
|
label: string;
|
|
13
|
+
/** When true, UI may show `label` alongside the icon (e.g. toolbar). Honored where supported in UI. */
|
|
14
|
+
showLabel?: boolean;
|
|
13
15
|
icon?: string;
|
|
14
16
|
slot?: string;
|
|
17
|
+
disabled?: (() => boolean) | Signal.Computed<boolean>;
|
|
18
|
+
/** When false, the contribution is not rendered (default: shown). Honored where supported in UI. */
|
|
19
|
+
visible?: (() => boolean) | Signal.Computed<boolean>;
|
|
15
20
|
}
|
|
16
21
|
export interface CommandContribution extends Contribution {
|
|
17
22
|
command: string;
|
|
18
23
|
params?: Record<string, any>;
|
|
19
|
-
showLabel?: boolean;
|
|
20
|
-
disabled?: (() => boolean) | Signal.Computed<boolean>;
|
|
21
24
|
}
|
|
25
|
+
export declare function isCommandContribution(contribution: Contribution): contribution is CommandContribution;
|
|
26
|
+
/** Default true when `visible` is omitted. */
|
|
27
|
+
export declare function getContributionVisible(contribution: Contribution): boolean;
|
|
28
|
+
/** Default false when `disabled` is omitted. */
|
|
29
|
+
export declare function getContributionDisabled(contribution: Contribution): boolean;
|
|
22
30
|
export interface HTMLContribution extends Contribution {
|
|
23
31
|
component: string | (() => TemplateResult);
|
|
24
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contributionregistry.d.ts","sourceRoot":"","sources":["../../src/core/contributionregistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAKrC,eAAO,MAAM,4BAA4B,qDAAqD,CAAA;AAE9F,MAAM,WAAW,uBAAuB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,YAAY,EAAE,CAAC;CACjC;AAED,MAAM,WAAW,YAAY;IACzB,wFAAwF;IACxF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAA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AE,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,CAAC,EAAE,GAAG,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACzG;AAaD,cAAM,aAAa;IACf,OAAO,CAAC,aAAa,CAA8C;IACnE,OAAO,CAAC,4BAA4B,CAAS;;IAgB7C,OAAO,CAAC,iBAAiB;IA0BnB,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IA2IxD,YAAY,IAAI,MAAM,EAAE;IAIxB,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;CAGvC;AAED,eAAO,MAAM,aAAa,eAAsB,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { PropertyValues } from 'lit';
|
|
2
|
+
import { DocksDialogContent } from '../parts/dialog-content';
|
|
3
|
+
/** HTML input types supported by {@link formDialog}. */
|
|
4
|
+
export type FormDialogFieldType = "text" | "password" | "url" | "email" | "number";
|
|
5
|
+
export interface FormDialogField {
|
|
6
|
+
/** Key in the returned values record. */
|
|
7
|
+
name: string;
|
|
8
|
+
label: string;
|
|
9
|
+
type?: FormDialogFieldType;
|
|
10
|
+
value?: string;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
/** When false, empty values are allowed. Defaults to true. */
|
|
13
|
+
required?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface FormDialogOptions {
|
|
16
|
+
/** Dialog window title (shown on `wa-dialog`). */
|
|
17
|
+
label: string;
|
|
18
|
+
fields: FormDialogField[];
|
|
19
|
+
/** Optional message above the fields (plain text or markdown). */
|
|
20
|
+
message?: string;
|
|
21
|
+
markdown?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare class DocksFormDialogContent extends DocksDialogContent {
|
|
24
|
+
fields: FormDialogField[];
|
|
25
|
+
message: string;
|
|
26
|
+
markdown: boolean;
|
|
27
|
+
private values;
|
|
28
|
+
private validationError;
|
|
29
|
+
static styles: import('lit').CSSResult[];
|
|
30
|
+
firstUpdated(changedProperties: PropertyValues): Promise<void>;
|
|
31
|
+
getResult(): Record<string, string>;
|
|
32
|
+
setValidationError(message: string): void;
|
|
33
|
+
private updateField;
|
|
34
|
+
private handleKeyDown;
|
|
35
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
36
|
+
}
|
|
37
|
+
declare global {
|
|
38
|
+
interface HTMLElementTagNameMap {
|
|
39
|
+
"docks-form-dialog-content": DocksFormDialogContent;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/** Validates required fields; returns an error message or null if valid. */
|
|
43
|
+
export declare function validateFormDialogFields(fields: FormDialogField[], values: Record<string, string>): string | null;
|
|
44
|
+
export declare function formDialog(options: FormDialogOptions): Promise<Record<string, string> | null>;
|
|
45
|
+
export declare function formDialogRequired(options: FormDialogOptions): Promise<Record<string, string>>;
|
|
46
|
+
//# sourceMappingURL=form-dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-dialog.d.ts","sourceRoot":"","sources":["../../src/dialogs/form-dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,cAAc,EAAE,MAAM,KAAK,CAAC;AAEhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAS7D,wDAAwD;AACxD,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,UAAU,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEnF,MAAM,WAAW,eAAe;IAC5B,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,OAAO,CA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+
export { formDialog, formDialogRequired, validateFormDialogFields, type FormDialogField, type FormDialogFieldType, type FormDialogOptions, } from './form-dialog';
|
|
2
3
|
export { infoDialog } from './info-dialog';
|
|
3
4
|
export { confirmDialog } from './confirm-dialog';
|
|
4
5
|
export { navigableInfoDialog, type NavigableDialogAction } from './navigable-info-dialog';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dialogs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,KAAK,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC1F,OAAO,EACL,iBAAiB,EACjB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,GAC5B,MAAM,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dialogs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EACL,UAAU,EACV,kBAAkB,EAClB,wBAAwB,EACxB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,GACvB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,KAAK,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC1F,OAAO,EACL,iBAAiB,EACjB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,GAC5B,MAAM,sBAAsB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as SIDEBAR_MAIN, B as TOOLBAR_MAIN_RIGHT, C as appSettings, D as MouseButton, E as HIDE_DOT_RESOURCE, F as TOOLBAR_BOTTOM, I as TOOLBAR_BOTTOM_CENTER, L as TOOLBAR_BOTTOM_END, M as SIDEBAR_MAIN_TOOLBAR, N as SYSTEM_LAYOUTS, O as PANEL_BOTTOM, P as SYSTEM_VIEWS, R as TOOLBAR_MAIN, S as TOPIC_SETTINGS_CHANGED, T as EDITOR_AREA_MAIN, _ as DocksElement, a as filebrowserDialog, b as esmShService, c as infoDialog, d as validateFormDialogFields, f as promptDialog, g as DocksDialogContent, h as dialogService, i as parseIconSpec, j as SIDEBAR_MAIN_BOTTOM, k as SIDEBAR_AUXILIARY, l as formDialog, n as DocksContainer, o as navigableInfoDialog, p as appLoaderService, r as icon, s as confirmDialog, t as DocksPart, u as formDialogRequired, w as COMMAND_SAVE, x as taskService, y as extensionRegistry, z as TOOLBAR_MAIN_CENTER } from "./parts-D__47G7C.js";
|
|
2
2
|
import { i as setLogLevel, n as defaultLogger, o as rootContext, s as uiContext, t as createLogger } from "./logger-DT0_NW3S.js";
|
|
3
|
-
import { C as
|
|
3
|
+
import { C as toastError, S as overrideContributionTargets, T as toastWarning, a as TOPIC_COMMAND_REGISTERED, b as contributionTargetMappingRegistry, c as EMPTY_SIGNALPORT, d as activeSelectionSignal, f as activeTasksSignal, g as contributionRegistry, h as TOPIC_CONTRIBUTEIONS_CHANGED, i as CommandStack, l as activeEditorSignal, m as perspectiveSwitchedSignal, n as watchSignal, o as commandRegistry, p as partDirtySignal, r as CommandRegistry, s as registerAll, t as DocksWidget, u as activePartSignal, w as toastInfo, x as listContributionNameRemaps, y as applyConfigNameRemaps } from "./widget-DbolQH0C.js";
|
|
4
4
|
import { n as subscribe, r as unsubscribe, t as publish } from "./events-B_ZxkU_G.js";
|
|
5
5
|
import { a as File, c as TOPIC_WORKSPACE_CHANGED, d as WorkspaceService, f as workspaceService, i as Directory, l as TOPIC_WORKSPACE_CONNECTED, o as FileContentType, p as persistenceService, r as CompositeDirectory, s as StringFile, t as FileSysDirHandleResource } from "./fs-access-D-fDaJ8V.js";
|
|
6
|
-
import { C as editorRegistry, S as treeNodeComparator, T as i18n, _ as TOOLBAR_LAYOUT_SWITCHER, a as DocksStandardLayout, b as VIEW_FILEBROWSER, c as SIDEBAR_TOOLBAR_EXTENSIONS, d as TOOLBAR_FAST_VIEWS, f as TOOLBAR_FILEBROWSER_DELETE, g as TOOLBAR_LANGUAGE_SELECTOR, h as TOOLBAR_INFO, i as createJsRuntime, l as SYSTEM_DEFAULT_FILE_ICONS, m as TOOLBAR_FULLSCREEN, n as getFrameworkConfig, o as CTXMENU_FILEBROWSER_DELETE, p as TOOLBAR_FILEBROWSER_RENAME, r as runJavaScriptCode, s as CTXMENU_FILEBROWSER_RENAME, t as configureFramework, u as TOOLBAR_ACTIVE_PART_NAME, v as TOOLBAR_TASKS, w as createLazyLabel, x as VIEW_LOG_TERMINAL, y as TOOLBAR_THEME_SWITCHER } from "./api-
|
|
7
|
-
export { COMMAND_SAVE, CTXMENU_FILEBROWSER_DELETE, CTXMENU_FILEBROWSER_RENAME, CommandRegistry, CommandStack, CompositeDirectory, Directory, DocksContainer, DocksDialogContent, DocksElement, DocksPart, DocksStandardLayout, DocksWidget, EDITOR_AREA_MAIN, EMPTY_SIGNALPORT, File, FileContentType, FileSysDirHandleResource, HIDE_DOT_RESOURCE, MouseButton, PANEL_BOTTOM, SIDEBAR_AUXILIARY, SIDEBAR_MAIN, SIDEBAR_MAIN_BOTTOM, SIDEBAR_MAIN_TOOLBAR, SIDEBAR_TOOLBAR_EXTENSIONS, SYSTEM_DEFAULT_FILE_ICONS, SYSTEM_LAYOUTS, SYSTEM_VIEWS, StringFile, TOOLBAR_ACTIVE_PART_NAME, TOOLBAR_BOTTOM, TOOLBAR_BOTTOM_CENTER, TOOLBAR_BOTTOM_END, TOOLBAR_FAST_VIEWS, TOOLBAR_FILEBROWSER_DELETE, TOOLBAR_FILEBROWSER_RENAME, TOOLBAR_FULLSCREEN, TOOLBAR_INFO, TOOLBAR_LANGUAGE_SELECTOR, TOOLBAR_LAYOUT_SWITCHER, TOOLBAR_MAIN, TOOLBAR_MAIN_CENTER, TOOLBAR_MAIN_RIGHT, TOOLBAR_TASKS, TOOLBAR_THEME_SWITCHER, TOPIC_COMMAND_REGISTERED, TOPIC_CONTRIBUTEIONS_CHANGED, TOPIC_SETTINGS_CHANGED, TOPIC_WORKSPACE_CHANGED, TOPIC_WORKSPACE_CONNECTED, VIEW_FILEBROWSER, VIEW_LOG_TERMINAL, WorkspaceService, activeEditorSignal, activePartSignal, activeSelectionSignal, activeTasksSignal, appLoaderService, appSettings, applyConfigNameRemaps, commandRegistry, configureFramework, confirmDialog, contributionRegistry, contributionTargetMappingRegistry, createJsRuntime, createLazyLabel, createLogger, dialogService, editorRegistry, esmShService, extensionRegistry, filebrowserDialog, getFrameworkConfig, i18n, icon, infoDialog, listContributionNameRemaps, defaultLogger as logger, navigableInfoDialog, overrideContributionTargets, parseIconSpec, partDirtySignal, persistenceService, perspectiveSwitchedSignal, promptDialog, publish, registerAll, rootContext, runJavaScriptCode, setLogLevel, subscribe, taskService, toastError, toastInfo, toastWarning, treeNodeComparator, uiContext, unsubscribe, watchSignal, workspaceService };
|
|
6
|
+
import { C as editorRegistry, S as treeNodeComparator, T as i18n, _ as TOOLBAR_LAYOUT_SWITCHER, a as DocksStandardLayout, b as VIEW_FILEBROWSER, c as SIDEBAR_TOOLBAR_EXTENSIONS, d as TOOLBAR_FAST_VIEWS, f as TOOLBAR_FILEBROWSER_DELETE, g as TOOLBAR_LANGUAGE_SELECTOR, h as TOOLBAR_INFO, i as createJsRuntime, l as SYSTEM_DEFAULT_FILE_ICONS, m as TOOLBAR_FULLSCREEN, n as getFrameworkConfig, o as CTXMENU_FILEBROWSER_DELETE, p as TOOLBAR_FILEBROWSER_RENAME, r as runJavaScriptCode, s as CTXMENU_FILEBROWSER_RENAME, t as configureFramework, u as TOOLBAR_ACTIVE_PART_NAME, v as TOOLBAR_TASKS, w as createLazyLabel, x as VIEW_LOG_TERMINAL, y as TOOLBAR_THEME_SWITCHER } from "./api-CuHseuRW.js";
|
|
7
|
+
export { COMMAND_SAVE, CTXMENU_FILEBROWSER_DELETE, CTXMENU_FILEBROWSER_RENAME, CommandRegistry, CommandStack, CompositeDirectory, Directory, DocksContainer, DocksDialogContent, DocksElement, DocksPart, DocksStandardLayout, DocksWidget, EDITOR_AREA_MAIN, EMPTY_SIGNALPORT, File, FileContentType, FileSysDirHandleResource, HIDE_DOT_RESOURCE, MouseButton, PANEL_BOTTOM, SIDEBAR_AUXILIARY, SIDEBAR_MAIN, SIDEBAR_MAIN_BOTTOM, SIDEBAR_MAIN_TOOLBAR, SIDEBAR_TOOLBAR_EXTENSIONS, SYSTEM_DEFAULT_FILE_ICONS, SYSTEM_LAYOUTS, SYSTEM_VIEWS, StringFile, TOOLBAR_ACTIVE_PART_NAME, TOOLBAR_BOTTOM, TOOLBAR_BOTTOM_CENTER, TOOLBAR_BOTTOM_END, TOOLBAR_FAST_VIEWS, TOOLBAR_FILEBROWSER_DELETE, TOOLBAR_FILEBROWSER_RENAME, TOOLBAR_FULLSCREEN, TOOLBAR_INFO, TOOLBAR_LANGUAGE_SELECTOR, TOOLBAR_LAYOUT_SWITCHER, TOOLBAR_MAIN, TOOLBAR_MAIN_CENTER, TOOLBAR_MAIN_RIGHT, TOOLBAR_TASKS, TOOLBAR_THEME_SWITCHER, TOPIC_COMMAND_REGISTERED, TOPIC_CONTRIBUTEIONS_CHANGED, TOPIC_SETTINGS_CHANGED, TOPIC_WORKSPACE_CHANGED, TOPIC_WORKSPACE_CONNECTED, VIEW_FILEBROWSER, VIEW_LOG_TERMINAL, WorkspaceService, activeEditorSignal, activePartSignal, activeSelectionSignal, activeTasksSignal, appLoaderService, appSettings, applyConfigNameRemaps, commandRegistry, configureFramework, confirmDialog, contributionRegistry, contributionTargetMappingRegistry, createJsRuntime, createLazyLabel, createLogger, dialogService, editorRegistry, esmShService, extensionRegistry, filebrowserDialog, formDialog, formDialogRequired, getFrameworkConfig, i18n, icon, infoDialog, listContributionNameRemaps, defaultLogger as logger, navigableInfoDialog, overrideContributionTargets, parseIconSpec, partDirtySignal, persistenceService, perspectiveSwitchedSignal, promptDialog, publish, registerAll, rootContext, runJavaScriptCode, setLogLevel, subscribe, taskService, toastError, toastInfo, toastWarning, treeNodeComparator, uiContext, unsubscribe, validateFormDialogFields, watchSignal, workspaceService };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contextmenu.d.ts","sourceRoot":"","sources":["../../src/parts/contextmenu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,OAAO,EAAC,MAAM,KAAK,CAAA;AAEtC,OAAO,EAAC,YAAY,EAAC,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"contextmenu.d.ts","sourceRoot":"","sources":["../../src/parts/contextmenu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,OAAO,EAAC,MAAM,KAAK,CAAA;AAEtC,OAAO,EAAC,YAAY,EAAC,MAAM,WAAW,CAAC;AAcvC,OAAO,uBAAuB,CAAC;AAE/B,qBACa,gBAAiB,SAAQ,YAAY;IAE9C,WAAW,EAAE,MAAM,EAAE,CAAM;IAGpB,uBAAuB,CAAC,EAAE,MAAM,GAAG,CAAa;IAGvD,OAAO,CAAC,aAAa,CAAsB;IAG3C,OAAO,CAAC,MAAM,CAAkB;IAGhC,OAAO,CAAC,QAAQ,CAA4C;IAE5D,OAAO,CAAC,SAAS,CAA4B;IAC7C,OAAO,CAAC,WAAW,CAA4B;IAE/C,OAAO,CAAC,8BAA8B,CAA6C;IAEnF;;;;;;;;;;OAUG;IACH,OAAO,CAAC,yBAAyB;IAWjC,SAAS,CAAC,UAAU;IAepB,SAAS,CAAC,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAOzD,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAO/E,OAAO,CAAC,oBAAoB;IAU5B,OAAO,CAAC,aAAa;IAmBrB,OAAO,CAAC,iBAAiB;IAuBzB,oFAAoF;IACpF,OAAO,CAAC,WAAW;IAOnB;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IAoB3B;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAoB/B,uGAAuG;IAChG,IAAI,CAAC,QAAQ,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,UAAU,CAAC,EAAE,UAAU,GAAG,OAAO;IAajF,OAAO,CAAC,OAAO;IAKf,OAAO,CAAC,kBAAkB;IA0B1B,MAAM;IA4BN,MAAM,CAAC,MAAM,0BAmBX;CACL;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,mBAAmB,EAAE,gBAAgB,CAAA;KACxC;CACJ"}
|
package/dist/parts/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import "../parts-
|
|
1
|
+
import "../parts-D__47G7C.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolbar.d.ts","sourceRoot":"","sources":["../../src/parts/toolbar.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,YAAY,EAAC,MAAM,WAAW,CAAC;AAEvC,OAAO,EAEH,YAAY,
|
|
1
|
+
{"version":3,"file":"toolbar.d.ts","sourceRoot":"","sources":["../../src/parts/toolbar.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,YAAY,EAAC,MAAM,WAAW,CAAC;AAEvC,OAAO,EAEH,YAAY,EAOf,MAAM,8BAA8B,CAAC;AAiCtC,qBACa,YAAa,SAAQ,YAAY;IAE1C,OAAO,CAAC,QAAQ,CAAuC;IAGvD,WAAW,EAAE,YAAY,GAAG,UAAU,CAAgB;IAGtD,KAAK,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAW;IAG5C,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAW;IAG7C,WAAW,EAAE,MAAM,EAAE,CAAM;IAGpB,kBAAkB,CAAC,EAAE,GAAG,CAAa;IAGrC,mBAAmB,CAAC,EAAE,MAAM,GAAG,CAAa;IAGnD,OAAO,CAAC,aAAa,CAAsB;IAG3C,OAAO,CAAC,OAAO,CAAS;IAExB,OAAO,CAAC,cAAc,CAA+B;IACrD,OAAO,CAAC,mBAAmB,CAA8C;IACzE,OAAO,CAAC,sBAAsB,CAAS;IAEvC,OAAO,CAAC,sBAAsB;IAU9B,OAAO,CAAC,qBAAqB;IAS7B,OAAO,CAAC,QAAQ,CAMd;IAEF,iBAAiB;IAMjB,oBAAoB;IAUpB,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAQ/C,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAO/E,SAAS,CAAC,UAAU;IAepB,OAAO,CAAC,oBAAoB;IAU5B,OAAO,CAAC,aAAa;IAmBrB,OAAO,CAAC,iBAAiB;IAuBzB,OAAO,CAAC,aAAa;IAIrB,mBAAmB,CAAC,YAAY,EAAE,YAAY;IAwB9C,MAAM;IAqBN,MAAM,CAAC,MAAM,0BAgBZ;CACJ;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,eAAe,EAAE,YAAY,CAAA;KAChC;CACJ"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as defaultLogger, o as rootContext, s as uiContext, t as createLogger } from "./logger-DT0_NW3S.js";
|
|
2
|
-
import {
|
|
2
|
+
import { C as toastError, _ as getContributionDisabled, a as TOPIC_COMMAND_REGISTERED, b as contributionTargetMappingRegistry, f as activeTasksSignal, g as contributionRegistry, h as TOPIC_CONTRIBUTEIONS_CHANGED, l as activeEditorSignal, n as watchSignal, o as commandRegistry, p as partDirtySignal, t as DocksWidget, u as activePartSignal, v as getContributionVisible, w as toastInfo } from "./widget-DbolQH0C.js";
|
|
3
3
|
import { n as subscribe, t as publish } from "./events-B_ZxkU_G.js";
|
|
4
4
|
import { a as File, c as TOPIC_WORKSPACE_CHANGED, f as workspaceService, i as Directory, o as FileContentType, p as persistenceService } from "./fs-access-D-fDaJ8V.js";
|
|
5
5
|
import "./webawesome-CJyhVNu_.js";
|
|
@@ -1149,7 +1149,7 @@ var DialogService = class {
|
|
|
1149
1149
|
close: cleanup
|
|
1150
1150
|
};
|
|
1151
1151
|
render(html`
|
|
1152
|
-
<wa-dialog label="${contribution.label || dialogId}" open @wa-request-close=${cleanup}>
|
|
1152
|
+
<wa-dialog label="${state && typeof state === "object" && typeof state.label === "string" ? state.label : contribution.label || dialogId}" open @wa-request-close=${cleanup}>
|
|
1153
1153
|
<style>
|
|
1154
1154
|
.dialog-service-content {
|
|
1155
1155
|
display: flex;
|
|
@@ -2299,6 +2299,167 @@ async function promptDialog(message, defaultValue = "", markdown = false) {
|
|
|
2299
2299
|
});
|
|
2300
2300
|
}
|
|
2301
2301
|
//#endregion
|
|
2302
|
+
//#region src/dialogs/form-dialog.ts
|
|
2303
|
+
var DocksFormDialogContent = class DocksFormDialogContent extends DocksDialogContent {
|
|
2304
|
+
constructor(..._args) {
|
|
2305
|
+
super(..._args);
|
|
2306
|
+
this.fields = [];
|
|
2307
|
+
this.message = "";
|
|
2308
|
+
this.markdown = false;
|
|
2309
|
+
this.values = {};
|
|
2310
|
+
this.validationError = "";
|
|
2311
|
+
}
|
|
2312
|
+
static {
|
|
2313
|
+
this.styles = [...DocksDialogContent.styles, css`
|
|
2314
|
+
.form-fields {
|
|
2315
|
+
display: flex;
|
|
2316
|
+
flex-direction: column;
|
|
2317
|
+
gap: 0.75rem;
|
|
2318
|
+
min-width: 22rem;
|
|
2319
|
+
}
|
|
2320
|
+
|
|
2321
|
+
.field label {
|
|
2322
|
+
display: flex;
|
|
2323
|
+
flex-direction: column;
|
|
2324
|
+
gap: 0.25rem;
|
|
2325
|
+
font-size: var(--wa-font-size-s);
|
|
2326
|
+
}
|
|
2327
|
+
|
|
2328
|
+
.field-label {
|
|
2329
|
+
font-weight: 500;
|
|
2330
|
+
color: var(--wa-color-text-normal);
|
|
2331
|
+
}
|
|
2332
|
+
|
|
2333
|
+
wa-input {
|
|
2334
|
+
width: 100%;
|
|
2335
|
+
}
|
|
2336
|
+
|
|
2337
|
+
.validation-error {
|
|
2338
|
+
color: var(--wa-color-danger-600, #dc2626);
|
|
2339
|
+
font-size: var(--wa-font-size-s);
|
|
2340
|
+
}
|
|
2341
|
+
`];
|
|
2342
|
+
}
|
|
2343
|
+
async firstUpdated(changedProperties) {
|
|
2344
|
+
super.firstUpdated(changedProperties);
|
|
2345
|
+
const initial = {};
|
|
2346
|
+
for (const field of this.fields) initial[field.name] = field.value ?? "";
|
|
2347
|
+
this.values = initial;
|
|
2348
|
+
await this.updateComplete;
|
|
2349
|
+
((this.shadowRoot?.querySelector("wa-input"))?.shadowRoot?.querySelector("input"))?.focus();
|
|
2350
|
+
}
|
|
2351
|
+
getResult() {
|
|
2352
|
+
return { ...this.values };
|
|
2353
|
+
}
|
|
2354
|
+
setValidationError(message) {
|
|
2355
|
+
this.validationError = message;
|
|
2356
|
+
}
|
|
2357
|
+
updateField(name, value) {
|
|
2358
|
+
this.values = {
|
|
2359
|
+
...this.values,
|
|
2360
|
+
[name]: value
|
|
2361
|
+
};
|
|
2362
|
+
if (this.validationError) this.validationError = "";
|
|
2363
|
+
}
|
|
2364
|
+
handleKeyDown(event) {
|
|
2365
|
+
if (event.key === "Enter") {
|
|
2366
|
+
event.preventDefault();
|
|
2367
|
+
this.dispatchEvent(new CustomEvent("dialog-ok", {
|
|
2368
|
+
bubbles: true,
|
|
2369
|
+
composed: true
|
|
2370
|
+
}));
|
|
2371
|
+
} else if (event.key === "Escape") {
|
|
2372
|
+
event.preventDefault();
|
|
2373
|
+
this.dispatchEvent(new CustomEvent("dialog-cancel", {
|
|
2374
|
+
bubbles: true,
|
|
2375
|
+
composed: true
|
|
2376
|
+
}));
|
|
2377
|
+
}
|
|
2378
|
+
}
|
|
2379
|
+
render() {
|
|
2380
|
+
return html`
|
|
2381
|
+
${this.message ? this.renderMessage(this.message, this.markdown) : null}
|
|
2382
|
+
<div class="form-fields" @keydown=${this.handleKeyDown}>
|
|
2383
|
+
${this.fields.map((field) => html`
|
|
2384
|
+
<div class="field">
|
|
2385
|
+
<label>
|
|
2386
|
+
<span class="field-label">${field.label}</span>
|
|
2387
|
+
<wa-input
|
|
2388
|
+
type=${field.type ?? "text"}
|
|
2389
|
+
.value=${this.values[field.name] ?? ""}
|
|
2390
|
+
placeholder=${field.placeholder ?? ""}
|
|
2391
|
+
@input=${(event) => this.updateField(field.name, event.target.value)}
|
|
2392
|
+
></wa-input>
|
|
2393
|
+
</label>
|
|
2394
|
+
</div>
|
|
2395
|
+
`)}
|
|
2396
|
+
${this.validationError ? html`<div class="validation-error">${this.validationError}</div>` : null}
|
|
2397
|
+
</div>
|
|
2398
|
+
`;
|
|
2399
|
+
}
|
|
2400
|
+
};
|
|
2401
|
+
_decorate([property({ attribute: false })], DocksFormDialogContent.prototype, "fields", void 0);
|
|
2402
|
+
_decorate([property({ type: String })], DocksFormDialogContent.prototype, "message", void 0);
|
|
2403
|
+
_decorate([property({ type: Boolean })], DocksFormDialogContent.prototype, "markdown", void 0);
|
|
2404
|
+
_decorate([state()], DocksFormDialogContent.prototype, "values", void 0);
|
|
2405
|
+
_decorate([state()], DocksFormDialogContent.prototype, "validationError", void 0);
|
|
2406
|
+
DocksFormDialogContent = _decorate([customElement("docks-form-dialog-content")], DocksFormDialogContent);
|
|
2407
|
+
function trimValues(values) {
|
|
2408
|
+
return Object.fromEntries(Object.entries(values).map(([key, value]) => [key, value.trim()]));
|
|
2409
|
+
}
|
|
2410
|
+
function findFormDialogContent() {
|
|
2411
|
+
return document.querySelector("docks-form-dialog-content");
|
|
2412
|
+
}
|
|
2413
|
+
/** Validates required fields; returns an error message or null if valid. */
|
|
2414
|
+
function validateFormDialogFields(fields, values) {
|
|
2415
|
+
for (const field of fields) {
|
|
2416
|
+
if (field.required === false) continue;
|
|
2417
|
+
if (!values[field.name]?.trim()) return `${field.label} is required.`;
|
|
2418
|
+
}
|
|
2419
|
+
return null;
|
|
2420
|
+
}
|
|
2421
|
+
contributionRegistry.registerContribution(DIALOG_CONTRIBUTION_TARGET, {
|
|
2422
|
+
id: "form",
|
|
2423
|
+
label: "Form",
|
|
2424
|
+
buttons: [OK_BUTTON, CANCEL_BUTTON],
|
|
2425
|
+
component: (state) => {
|
|
2426
|
+
if (!state) return html`<div>Error: No form dialog state</div>`;
|
|
2427
|
+
return html`
|
|
2428
|
+
<docks-form-dialog-content
|
|
2429
|
+
.message=${state.message ?? ""}
|
|
2430
|
+
.markdown=${state.markdown ?? false}
|
|
2431
|
+
.fields=${state.fields}
|
|
2432
|
+
></docks-form-dialog-content>
|
|
2433
|
+
`;
|
|
2434
|
+
},
|
|
2435
|
+
onButton: async (id, result, state) => {
|
|
2436
|
+
if (!state) return true;
|
|
2437
|
+
if (id === "ok") {
|
|
2438
|
+
const values = trimValues(result ?? {});
|
|
2439
|
+
const error = validateFormDialogFields(state.fields, values);
|
|
2440
|
+
if (error) {
|
|
2441
|
+
findFormDialogContent()?.setValidationError(error);
|
|
2442
|
+
return false;
|
|
2443
|
+
}
|
|
2444
|
+
state.resolve(values);
|
|
2445
|
+
} else state.resolve(null);
|
|
2446
|
+
return true;
|
|
2447
|
+
}
|
|
2448
|
+
});
|
|
2449
|
+
function formDialog(options) {
|
|
2450
|
+
return new Promise((resolve) => {
|
|
2451
|
+
dialogService.open("form", {
|
|
2452
|
+
...options,
|
|
2453
|
+
resolve
|
|
2454
|
+
});
|
|
2455
|
+
});
|
|
2456
|
+
}
|
|
2457
|
+
async function formDialogRequired(options) {
|
|
2458
|
+
const values = await formDialog(options);
|
|
2459
|
+
if (!values) throw new Error("Cancelled");
|
|
2460
|
+
return values;
|
|
2461
|
+
}
|
|
2462
|
+
//#endregion
|
|
2302
2463
|
//#region src/dialogs/info-dialog.ts
|
|
2303
2464
|
var DocksInfoDialogContent = class DocksInfoDialogContent extends DocksDialogContent {
|
|
2304
2465
|
constructor(..._args) {
|
|
@@ -2823,7 +2984,7 @@ function icon(spec, options) {
|
|
|
2823
2984
|
var RESIZE_DEBOUNCE_MS = 150;
|
|
2824
2985
|
function renderButtonGroup(slotName, orientation, contributions, isToolbarItem, contributionCreator) {
|
|
2825
2986
|
const label = `Toolbar ${slotName ?? "default"}`;
|
|
2826
|
-
const items = contributions.filter((c) => c.slot === slotName && isToolbarItem(c));
|
|
2987
|
+
const items = contributions.filter((c) => c.slot === slotName && isToolbarItem(c) && getContributionVisible(c));
|
|
2827
2988
|
return html`
|
|
2828
2989
|
<wa-button-group orientation=${orientation} label=${label}>
|
|
2829
2990
|
${slotName === "start" ? html`<slot name="start"></slot>` : slotName === "end" ? html`<slot name="end"></slot>` : html`<slot></slot>`}
|
|
@@ -2956,7 +3117,7 @@ var DocksToolbar = class DocksToolbar extends DocksElement {
|
|
|
2956
3117
|
return html`
|
|
2957
3118
|
<wa-button @click=${() => void this.executeCommand(commandContribution.command, commandContribution.params || {})}
|
|
2958
3119
|
title=${commandContribution.label}
|
|
2959
|
-
?disabled="${commandContribution
|
|
3120
|
+
?disabled="${getContributionDisabled(commandContribution)}"
|
|
2960
3121
|
appearance="plain" size=${this.size}>
|
|
2961
3122
|
${icon(commandContribution.icon, { label: commandContribution.label })}
|
|
2962
3123
|
${showLabel ? commandContribution.label : ""}
|
|
@@ -3084,7 +3245,8 @@ var DocksCommand = class DocksCommand extends DocksWidget {
|
|
|
3084
3245
|
renderContribution(contribution) {
|
|
3085
3246
|
if ("command" in contribution) {
|
|
3086
3247
|
const commandContribution = contribution;
|
|
3087
|
-
|
|
3248
|
+
if (!getContributionVisible(commandContribution)) return nothing;
|
|
3249
|
+
const disabled = getContributionDisabled(commandContribution);
|
|
3088
3250
|
return html`
|
|
3089
3251
|
<docks-command
|
|
3090
3252
|
cmd="${commandContribution.command}"
|
|
@@ -3382,7 +3544,8 @@ var DocksContextMenu = class DocksContextMenu extends DocksElement {
|
|
|
3382
3544
|
renderContribution(contribution) {
|
|
3383
3545
|
if ("command" in contribution) {
|
|
3384
3546
|
const commandContribution = contribution;
|
|
3385
|
-
|
|
3547
|
+
if (!getContributionVisible(commandContribution)) return nothing;
|
|
3548
|
+
const disabled = getContributionDisabled(commandContribution);
|
|
3386
3549
|
return html`
|
|
3387
3550
|
<docks-command
|
|
3388
3551
|
cmd="${commandContribution.command}"
|
|
@@ -4460,6 +4623,6 @@ _decorate([state()], DocksResizableGrid.prototype, "gridSizes", void 0);
|
|
|
4460
4623
|
_decorate([state()], DocksResizableGrid.prototype, "gridChildren", void 0);
|
|
4461
4624
|
DocksResizableGrid = _DocksResizableGrid = _decorate([customElement("docks-resizable-grid")], DocksResizableGrid);
|
|
4462
4625
|
//#endregion
|
|
4463
|
-
export {
|
|
4626
|
+
export { SIDEBAR_MAIN as A, TOOLBAR_MAIN_RIGHT as B, appSettings as C, MouseButton as D, HIDE_DOT_RESOURCE as E, TOOLBAR_BOTTOM as F, TOOLBAR_BOTTOM_CENTER as I, TOOLBAR_BOTTOM_END as L, SIDEBAR_MAIN_TOOLBAR as M, SYSTEM_LAYOUTS as N, PANEL_BOTTOM as O, SYSTEM_VIEWS as P, TOOLBAR_MAIN as R, TOPIC_SETTINGS_CHANGED as S, EDITOR_AREA_MAIN as T, constants_exports as V, DocksElement as _, filebrowserDialog as a, esmShService as b, infoDialog as c, validateFormDialogFields as d, promptDialog as f, DocksDialogContent as g, dialogService as h, parseIconSpec as i, SIDEBAR_MAIN_BOTTOM as j, SIDEBAR_AUXILIARY as k, formDialog as l, deleteIndexedDbWorkspaceData as m, DocksContainer as n, navigableInfoDialog as o, appLoaderService as p, icon as r, confirmDialog as s, DocksPart as t, formDialogRequired as u, TOPIC_EXTENSIONS_CHANGED as v, COMMAND_SAVE as w, taskService as x, extensionRegistry as y, TOOLBAR_MAIN_CENTER as z };
|
|
4464
4627
|
|
|
4465
|
-
//# sourceMappingURL=parts-
|
|
4628
|
+
//# sourceMappingURL=parts-D__47G7C.js.map
|