@eclipse-docks/core 0.7.127 → 0.7.132
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 +7 -7
- package/dist/api/services.d.ts +3 -1
- package/dist/api/services.d.ts.map +1 -1
- package/dist/{api-Da9zQcfd.js → api-DImisUWV.js} +296 -305
- package/dist/api-DImisUWV.js.map +1 -0
- package/dist/assets/{js-runtime-worker-DAva_aXx.js.map → js-runtime-worker-X93bOre4.js.map} +1 -1
- package/dist/components/attribution.d.ts +1 -0
- package/dist/components/attribution.d.ts.map +1 -1
- package/dist/components/command.d.ts +0 -1
- package/dist/components/command.d.ts.map +1 -1
- package/dist/components/extensions.d.ts +3 -0
- package/dist/components/extensions.d.ts.map +1 -1
- package/dist/components/language-selector.d.ts.map +1 -1
- package/dist/components/layout-switcher.d.ts +1 -1
- package/dist/components/layout-switcher.d.ts.map +1 -1
- package/dist/components/npm-packages.d.ts +1 -0
- package/dist/components/npm-packages.d.ts.map +1 -1
- package/dist/components/release-history.d.ts +9 -2
- package/dist/components/release-history.d.ts.map +1 -1
- package/dist/components/tasks.d.ts.map +1 -1
- package/dist/core/apploader.d.ts +2 -9
- package/dist/core/apploader.d.ts.map +1 -1
- package/dist/core/contribution-targets.d.ts +1 -0
- package/dist/core/contribution-targets.d.ts.map +1 -1
- package/dist/core/dialogservice.d.ts +3 -1
- package/dist/core/dialogservice.d.ts.map +1 -1
- package/dist/core/dropdown-item.d.ts +8 -0
- package/dist/core/dropdown-item.d.ts.map +1 -1
- package/dist/core/events.js +1 -1
- package/dist/core/layout-panels.d.ts +25 -0
- package/dist/core/layout-panels.d.ts.map +1 -0
- package/dist/dialogs/navigable-info-dialog.d.ts.map +1 -1
- package/dist/dialogs/version-info-dialog.d.ts +18 -2
- package/dist/dialogs/version-info-dialog.d.ts.map +1 -1
- package/dist/{events-B_ZxkU_G.js → events-BAE5R6TH.js} +1 -1
- package/dist/{events-B_ZxkU_G.js.map → events-BAE5R6TH.js.map} +1 -1
- package/dist/{extensions.de-Ct1DIybE.js → extensions.de-O6Sx3_t4.js} +1 -1
- package/dist/{extensions.de-Ct1DIybE.js.map → extensions.de-O6Sx3_t4.js.map} +1 -1
- package/dist/{extensions.en-DRPFtVHT.js → extensions.en-fwqJr8P-.js} +1 -1
- package/dist/{extensions.en-DRPFtVHT.js.map → extensions.en-fwqJr8P-.js.map} +1 -1
- package/dist/externals/lit.js +1 -1
- package/dist/externals/third-party.js.map +1 -1
- package/dist/externals/webawesome.js +1 -1
- package/dist/{fastviews.de-BFxFslBz.js → fastviews.de-C-B48vwv.js} +1 -1
- package/dist/fastviews.de-C-B48vwv.js.map +1 -0
- package/dist/{fastviews.en-Cb4J_JXL.js → fastviews.en-BlAxYlHD.js} +1 -1
- package/dist/fastviews.en-BlAxYlHD.js.map +1 -0
- package/dist/{filebrowser.de-GEf6Eilh.js → filebrowser.de-LWsrI9xj.js} +1 -1
- package/dist/{filebrowser.de-GEf6Eilh.js.map → filebrowser.de-LWsrI9xj.js.map} +1 -1
- package/dist/{filebrowser.en-o0Ad5f7Z.js → filebrowser.en-C02vpzAs.js} +1 -1
- package/dist/{filebrowser.en-o0Ad5f7Z.js.map → filebrowser.en-C02vpzAs.js.map} +1 -1
- package/dist/{fs-access-DTXPsV1W.js → fs-access-Cjcg0_Me.js} +27 -25
- package/dist/{fs-access-DTXPsV1W.js.map → fs-access-Cjcg0_Me.js.map} +1 -1
- package/dist/fs-access-Dp9Fwsxk.js +2 -0
- package/dist/index.js +7 -7
- package/dist/layouts/standard-layout.d.ts +9 -1
- package/dist/layouts/standard-layout.d.ts.map +1 -1
- package/dist/{logger-DT0_NW3S.js → logger-CiT0Cc4g.js} +1 -1
- package/dist/{logger-DT0_NW3S.js.map → logger-CiT0Cc4g.js.map} +1 -1
- package/dist/{logterminal.de-DKp940Ox.js → logterminal.de-BP1FuxHH.js} +1 -1
- package/dist/{logterminal.de-DKp940Ox.js.map → logterminal.de-BP1FuxHH.js.map} +1 -1
- package/dist/{logterminal.en-Ci2nm0b2.js → logterminal.en-BeDRvTvb.js} +1 -1
- package/dist/{logterminal.en-Ci2nm0b2.js.map → logterminal.en-BeDRvTvb.js.map} +1 -1
- package/dist/{partname.de-v76uEl0F.js → partname.de-C0I4Wf2X.js} +1 -1
- package/dist/{partname.de-v76uEl0F.js.map → partname.de-C0I4Wf2X.js.map} +1 -1
- package/dist/{partname.en-By5aAawT.js → partname.en-CIT8z3cY.js} +1 -1
- package/dist/{partname.en-By5aAawT.js.map → partname.en-CIT8z3cY.js.map} +1 -1
- package/dist/parts/contextmenu.d.ts.map +1 -1
- package/dist/parts/index.js +1 -1
- package/dist/parts/part.d.ts +2 -0
- package/dist/parts/part.d.ts.map +1 -1
- package/dist/parts/resizable-grid.d.ts +10 -3
- package/dist/parts/resizable-grid.d.ts.map +1 -1
- package/dist/parts/tabs.d.ts +6 -0
- package/dist/parts/tabs.d.ts.map +1 -1
- package/dist/{parts-CRVxaDd-.js → parts-DQRktiiR.js} +1086 -611
- package/dist/parts-DQRktiiR.js.map +1 -0
- package/dist/{tasks.de-y2xPmQ1k.js → tasks.de-DRvUVugd.js} +1 -1
- package/dist/{tasks.de-y2xPmQ1k.js.map → tasks.de-DRvUVugd.js.map} +1 -1
- package/dist/{tasks.en-BTbFrxJj.js → tasks.en-dRDildBd.js} +1 -1
- package/dist/{tasks.en-BTbFrxJj.js.map → tasks.en-dRDildBd.js.map} +1 -1
- package/dist/vite-plugin-app-splash.js.map +1 -1
- package/dist/vite-plugin-local-aliases.js +1 -1
- package/dist/vite-plugin-local-aliases.js.map +1 -1
- package/dist/vite-plugin-resolve-deps.d.ts +6 -3
- package/dist/vite-plugin-resolve-deps.d.ts.map +1 -1
- package/dist/vite-plugin-resolve-deps.js +17 -15
- package/dist/vite-plugin-resolve-deps.js.map +1 -1
- package/dist/{webawesome-Y1_HnKa_.js → webawesome-C0Da7hPu.js} +19 -11
- package/dist/webawesome-C0Da7hPu.js.map +1 -0
- package/dist/{widget-BqQtioK1.js → widget-DUR6wxME.js} +6 -5
- package/dist/{widget-BqQtioK1.js.map → widget-DUR6wxME.js.map} +1 -1
- package/dist/widgets/index.js +1 -1
- package/dist/{widgets-C9V42Mqq.js → widgets-A9XMOA_j.js} +2 -2
- package/dist/{widgets-C9V42Mqq.js.map → widgets-A9XMOA_j.js.map} +1 -1
- package/package.json +1 -1
- package/src/api/services.ts +12 -0
- package/src/components/attribution.ts +2 -0
- package/src/components/command.ts +2 -8
- package/src/components/extensions.ts +20 -3
- package/src/components/language-selector.ts +0 -1
- package/src/components/layout-switcher.ts +39 -26
- package/src/components/npm-packages.ts +2 -0
- package/src/components/release-history.ts +29 -40
- package/src/components/tasks.ts +0 -1
- package/src/contributions/default-layout-contributions.ts +7 -43
- package/src/contributions/default-ui-contributions.ts +4 -4
- package/src/core/apploader.ts +7 -54
- package/src/core/contribution-targets.ts +1 -0
- package/src/core/dialogservice.ts +76 -19
- package/src/core/dropdown-item.ts +52 -17
- package/src/core/extensionregistry.ts +1 -1
- package/src/core/layout-panels.ts +121 -0
- package/src/dialogs/navigable-info-dialog.ts +5 -2
- package/src/dialogs/version-info-dialog.ts +163 -21
- package/src/icons/icons.txt +4 -2
- package/src/icons/layout-standard-bottom-panel.svg +4 -4
- package/src/icons/layout-standard-full.svg +4 -4
- package/src/icons/layout-standard-left-aux.svg +8 -0
- package/src/icons/layout-standard-left-sidebar.svg +5 -0
- package/src/icons/layout-standard-right-aux.svg +8 -0
- package/src/icons/layout-standard-right-sidebar.svg +5 -0
- package/src/layouts/standard-layout.ts +81 -5
- package/src/parts/contextmenu.ts +2 -1
- package/src/parts/part.ts +24 -0
- package/src/parts/resizable-grid.ts +125 -57
- package/src/parts/tabs.ts +103 -0
- package/src/vite-plugin-resolve-deps.ts +29 -25
- package/dist/api-Da9zQcfd.js.map +0 -1
- package/dist/fastviews.de-BFxFslBz.js.map +0 -1
- package/dist/fastviews.en-Cb4J_JXL.js.map +0 -1
- package/dist/fs-access-CzOh5ot8.js +0 -2
- package/dist/parts-CRVxaDd-.js.map +0 -1
- package/dist/webawesome-Y1_HnKa_.js.map +0 -1
- package/src/icons/layout-standard-bottom-sidebar.svg +0 -6
- package/src/icons/layout-standard.svg +0 -6
|
@@ -1,22 +1,42 @@
|
|
|
1
|
-
import { html, css } from "lit";
|
|
2
|
-
import { customElement } from "lit/decorators.js";
|
|
1
|
+
import { html, css, nothing } from "lit";
|
|
2
|
+
import { customElement, property, state } from "lit/decorators.js";
|
|
3
3
|
import type { PropertyValues } from "lit";
|
|
4
4
|
import { DocksDialogContent } from "../parts/dialog-content";
|
|
5
5
|
import { contributionRegistry } from "../core/contributionregistry";
|
|
6
6
|
import {
|
|
7
7
|
DIALOG_CONTRIBUTION_TARGET,
|
|
8
|
-
CLOSE_BUTTON,
|
|
9
8
|
type DialogContribution,
|
|
10
|
-
type DialogButton,
|
|
11
9
|
dialogService,
|
|
12
10
|
} from "../core/dialogservice";
|
|
13
11
|
import { ABOUT_TABS } from "../core/contribution-targets";
|
|
12
|
+
import { ABOUT_TAB_RELEASE } from "../core/contribution-names";
|
|
14
13
|
import { appLoaderService } from "../core/apploader";
|
|
14
|
+
import { DocksReleaseHistory, type ReleaseHistoryNavState } from "../components/release-history";
|
|
15
|
+
import type { DocksTabs } from "../parts/tabs";
|
|
15
16
|
|
|
16
|
-
const
|
|
17
|
+
const EMPTY_NAV: ReleaseHistoryNavState = {
|
|
18
|
+
hasMultiple: false,
|
|
19
|
+
atOldest: true,
|
|
20
|
+
atNewest: true,
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
@customElement("docks-version-info-dialog")
|
|
24
|
+
export class DocksVersionInfoDialog extends DocksDialogContent {
|
|
25
|
+
@property({ type: String })
|
|
26
|
+
label = "";
|
|
27
|
+
|
|
28
|
+
@property({ attribute: false })
|
|
29
|
+
close?: () => void;
|
|
30
|
+
|
|
31
|
+
@property({ attribute: false })
|
|
32
|
+
onAfterHide?: () => void;
|
|
33
|
+
|
|
34
|
+
@state()
|
|
35
|
+
private activeTab: string | null = null;
|
|
36
|
+
|
|
37
|
+
@state()
|
|
38
|
+
private releaseNav: ReleaseHistoryNavState = EMPTY_NAV;
|
|
17
39
|
|
|
18
|
-
@customElement("docks-version-info-dialog-content")
|
|
19
|
-
export class DocksVersionInfoDialogContent extends DocksDialogContent {
|
|
20
40
|
static styles = [
|
|
21
41
|
...DocksDialogContent.styles,
|
|
22
42
|
css`
|
|
@@ -24,54 +44,176 @@ export class DocksVersionInfoDialogContent extends DocksDialogContent {
|
|
|
24
44
|
display: block;
|
|
25
45
|
}
|
|
26
46
|
|
|
47
|
+
wa-dialog {
|
|
48
|
+
--width: 600px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
wa-dialog::part(body) {
|
|
52
|
+
display: flex;
|
|
53
|
+
flex-direction: column;
|
|
54
|
+
min-height: 0;
|
|
55
|
+
overflow: hidden;
|
|
56
|
+
}
|
|
57
|
+
|
|
27
58
|
.dialog-body {
|
|
28
59
|
display: flex;
|
|
29
60
|
flex-direction: column;
|
|
30
61
|
gap: 0.75rem;
|
|
31
62
|
min-width: 32rem;
|
|
32
|
-
height:
|
|
63
|
+
height: min(70vh, 36rem);
|
|
64
|
+
min-height: min(70vh, 36rem);
|
|
65
|
+
overflow: hidden;
|
|
33
66
|
}
|
|
34
67
|
|
|
35
68
|
.dialog-body docks-tabs {
|
|
36
|
-
flex: 1;
|
|
69
|
+
flex: 1 1 auto;
|
|
37
70
|
min-height: 0;
|
|
71
|
+
overflow: hidden;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.dialog-footer {
|
|
75
|
+
display: flex;
|
|
76
|
+
gap: 0.5rem;
|
|
77
|
+
justify-content: flex-end;
|
|
78
|
+
width: 100%;
|
|
38
79
|
}
|
|
39
80
|
`,
|
|
40
81
|
];
|
|
41
82
|
|
|
42
83
|
protected firstUpdated(changed: PropertyValues) {
|
|
43
84
|
super.firstUpdated(changed);
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
85
|
+
this.addEventListener("release-history-changed", this.onReleaseHistoryChanged);
|
|
86
|
+
this.updateComplete.then(() => {
|
|
87
|
+
this.attachTabListener();
|
|
88
|
+
this.syncActiveTab();
|
|
89
|
+
this.syncReleaseNav();
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
disconnectedCallback() {
|
|
94
|
+
this.removeEventListener("release-history-changed", this.onReleaseHistoryChanged);
|
|
95
|
+
super.disconnectedCallback();
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
private onReleaseHistoryChanged = () => {
|
|
99
|
+
this.syncReleaseNav();
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
private attachTabListener() {
|
|
103
|
+
const tabGroup = this.getAboutTabs()?.shadowRoot?.querySelector("wa-tab-group");
|
|
104
|
+
if (!tabGroup || tabGroup.hasAttribute("data-version-info-listener")) {
|
|
105
|
+
return;
|
|
48
106
|
}
|
|
107
|
+
tabGroup.setAttribute("data-version-info-listener", "");
|
|
108
|
+
tabGroup.addEventListener("wa-tab-show", (event: Event) => {
|
|
109
|
+
const name = (event as CustomEvent<{ name: string }>).detail?.name;
|
|
110
|
+
if (name) {
|
|
111
|
+
this.activeTab = name;
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
private getAboutTabs(): DocksTabs | null {
|
|
117
|
+
return this.renderRoot.querySelector("docks-tabs") as DocksTabs | null;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
private getReleaseHistory(): DocksReleaseHistory | null {
|
|
121
|
+
const part = this.getAboutTabs()?.getTabPart(ABOUT_TAB_RELEASE);
|
|
122
|
+
return part instanceof DocksReleaseHistory ? part : null;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
private syncActiveTab() {
|
|
126
|
+
const tabGroup = this.getAboutTabs()?.shadowRoot?.querySelector("wa-tab-group") as
|
|
127
|
+
| (HTMLElement & { active?: string })
|
|
128
|
+
| null;
|
|
129
|
+
this.activeTab = tabGroup?.getAttribute("active") || tabGroup?.active || null;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
private syncReleaseNav() {
|
|
133
|
+
this.releaseNav = this.getReleaseHistory()?.getNavState() ?? EMPTY_NAV;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
private handleClose() {
|
|
137
|
+
const dialog = this.renderRoot.querySelector("wa-dialog") as (HTMLElement & { open?: boolean }) | null;
|
|
138
|
+
if (dialog && dialog.open !== false) {
|
|
139
|
+
dialog.open = false;
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
this.close?.();
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
private handleAfterHide() {
|
|
146
|
+
this.onAfterHide?.();
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
private showOlderRelease() {
|
|
150
|
+
this.getReleaseHistory()?.showOlder();
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
private showNewerRelease() {
|
|
154
|
+
this.getReleaseHistory()?.showNewer();
|
|
49
155
|
}
|
|
50
156
|
|
|
51
157
|
render() {
|
|
52
158
|
const app = appLoaderService.getCurrentApp();
|
|
159
|
+
const onReleaseTab = this.activeTab === ABOUT_TAB_RELEASE;
|
|
160
|
+
const showReleaseNav = onReleaseTab && this.releaseNav.hasMultiple;
|
|
53
161
|
|
|
54
162
|
return html`
|
|
55
|
-
<
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
163
|
+
<wa-dialog
|
|
164
|
+
label=${this.label}
|
|
165
|
+
open
|
|
166
|
+
light-dismiss
|
|
167
|
+
with-footer
|
|
168
|
+
@wa-after-hide=${this.handleAfterHide}
|
|
169
|
+
>
|
|
170
|
+
<div class="dialog-body">
|
|
171
|
+
${app?.description ? html`<small>${app.description}</small>` : ""}
|
|
172
|
+
<docks-tabs id=${ABOUT_TABS} fill-height></docks-tabs>
|
|
173
|
+
</div>
|
|
174
|
+
<div slot="footer" class="dialog-footer">
|
|
175
|
+
${showReleaseNav
|
|
176
|
+
? html`
|
|
177
|
+
<wa-button
|
|
178
|
+
variant="default"
|
|
179
|
+
?disabled=${this.releaseNav.atOldest}
|
|
180
|
+
@click=${this.showOlderRelease}
|
|
181
|
+
>
|
|
182
|
+
← Previous
|
|
183
|
+
</wa-button>
|
|
184
|
+
<wa-button
|
|
185
|
+
variant="default"
|
|
186
|
+
?disabled=${this.releaseNav.atNewest}
|
|
187
|
+
@click=${this.showNewerRelease}
|
|
188
|
+
>
|
|
189
|
+
Next →
|
|
190
|
+
</wa-button>
|
|
191
|
+
`
|
|
192
|
+
: nothing}
|
|
193
|
+
<wa-button variant="primary" @click=${this.handleClose}>Close</wa-button>
|
|
194
|
+
</div>
|
|
195
|
+
</wa-dialog>
|
|
59
196
|
`;
|
|
60
197
|
}
|
|
61
198
|
}
|
|
62
199
|
|
|
63
200
|
declare global {
|
|
64
201
|
interface HTMLElementTagNameMap {
|
|
65
|
-
"docks-version-info-dialog
|
|
202
|
+
"docks-version-info-dialog": DocksVersionInfoDialog;
|
|
66
203
|
}
|
|
67
204
|
}
|
|
68
205
|
|
|
69
206
|
contributionRegistry.registerContribution<DialogContribution>(DIALOG_CONTRIBUTION_TARGET, {
|
|
70
207
|
id: "version-info",
|
|
71
208
|
label: "About",
|
|
72
|
-
|
|
73
|
-
component: () => html
|
|
74
|
-
|
|
209
|
+
selfContained: true,
|
|
210
|
+
component: (state) => html`
|
|
211
|
+
<docks-version-info-dialog
|
|
212
|
+
.label=${state?.label ?? ""}
|
|
213
|
+
.close=${state?.close}
|
|
214
|
+
.onAfterHide=${state?.onAfterHide}
|
|
215
|
+
></docks-version-info-dialog>
|
|
216
|
+
`,
|
|
75
217
|
});
|
|
76
218
|
|
|
77
219
|
export function versionInfoDialog(): Promise<void> {
|
package/src/icons/icons.txt
CHANGED
|
@@ -4,9 +4,11 @@
|
|
|
4
4
|
- python.svg: Licence=MIT, Author=Garuda Technology, Source=https://www.svgrepo.com/svg/452091/python
|
|
5
5
|
- js.svg: Licence=MIT, Author=Garuda Technology, Source=https://www.svgrepo.com/svg/452045/js
|
|
6
6
|
- jupyter.svg: Licence=Logo License, Author=gilbarbara, Source=https://www.svgrepo.com/svg/353949/jupyter
|
|
7
|
-
- layout-standard.svg: Licence=Project-internal, Author=Eclipse Docks Team
|
|
7
|
+
- layout-standard-left-sidebar.svg: Licence=Project-internal, Author=Eclipse Docks Team
|
|
8
|
+
- layout-standard-right-sidebar.svg: Licence=Project-internal, Author=Eclipse Docks Team
|
|
8
9
|
- layout-standard-bottom-panel.svg: Licence=Project-internal, Author=Eclipse Docks Team
|
|
9
|
-
- layout-standard-
|
|
10
|
+
- layout-standard-left-aux.svg: Licence=Project-internal, Author=Eclipse Docks Team
|
|
11
|
+
- layout-standard-right-aux.svg: Licence=Project-internal, Author=Eclipse Docks Team
|
|
10
12
|
- layout-standard-full.svg: Licence=Project-internal, Author=Eclipse Docks Team
|
|
11
13
|
- mark-github.svg: Licence=MIT, Author=GitHub, Source=https://github.com/primer/octicons (icons/mark-github-16.svg)
|
|
12
14
|
- file-plus.svg: Licence=Project-internal, Author=Eclipse Docks Team
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true">
|
|
2
|
-
<rect x="4" y="3" width="
|
|
3
|
-
fill="none" stroke="
|
|
4
|
-
<
|
|
5
|
-
|
|
2
|
+
<rect x="4" y="3" width="16" height="11" rx="1.25" ry="1.25"
|
|
3
|
+
fill="none" stroke="#9ca3af" stroke-width="1.25" stroke-linejoin="round"/>
|
|
4
|
+
<rect x="4" y="16" width="16" height="5" rx="1.25" ry="1.25"
|
|
5
|
+
fill="#2563eb" fill-opacity="0.2" stroke="#2563eb" stroke-width="1.25" stroke-linejoin="round"/>
|
|
6
6
|
</svg>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true">
|
|
2
2
|
<rect x="8" y="4" width="8" height="8" rx="1.25" ry="1.25"
|
|
3
|
-
fill="none" stroke="
|
|
4
|
-
<line x1="2.5" y1="2" x2="2.5" y2="22" stroke="#
|
|
5
|
-
<line x1="21.5" y1="2" x2="21.5" y2="22" stroke="#
|
|
6
|
-
<line x1="6" y1="20" x2="18" y2="20" stroke="#
|
|
3
|
+
fill="none" stroke="#9ca3af" stroke-width="1.25" stroke-linejoin="round"/>
|
|
4
|
+
<line x1="2.5" y1="2" x2="2.5" y2="22" stroke="#2563eb" stroke-width="2" stroke-linecap="round"/>
|
|
5
|
+
<line x1="21.5" y1="2" x2="21.5" y2="22" stroke="#2563eb" stroke-width="2" stroke-linecap="round"/>
|
|
6
|
+
<line x1="6" y1="20" x2="18" y2="20" stroke="#2563eb" stroke-width="2" stroke-linecap="round"/>
|
|
7
7
|
</svg>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true">
|
|
2
|
+
<rect x="8" y="4" width="12" height="16" rx="1.25" ry="1.25"
|
|
3
|
+
fill="none" stroke="#9ca3af" stroke-width="1.25" stroke-linejoin="round"/>
|
|
4
|
+
<rect x="2" y="4" width="5" height="7" rx="1" ry="1"
|
|
5
|
+
fill="none" stroke="#9ca3af" stroke-width="1.25" stroke-linejoin="round"/>
|
|
6
|
+
<rect x="2" y="13" width="5" height="7" rx="1" ry="1"
|
|
7
|
+
fill="#2563eb" fill-opacity="0.2" stroke="#2563eb" stroke-width="1.25" stroke-linejoin="round"/>
|
|
8
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true">
|
|
2
|
+
<rect x="7" y="4" width="13" height="16" rx="1.25" ry="1.25"
|
|
3
|
+
fill="none" stroke="#9ca3af" stroke-width="1.25" stroke-linejoin="round"/>
|
|
4
|
+
<line x1="2.5" y1="2" x2="2.5" y2="22" stroke="#2563eb" stroke-width="2" stroke-linecap="round"/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true">
|
|
2
|
+
<rect x="4" y="4" width="12" height="16" rx="1.25" ry="1.25"
|
|
3
|
+
fill="none" stroke="#9ca3af" stroke-width="1.25" stroke-linejoin="round"/>
|
|
4
|
+
<rect x="17" y="4" width="5" height="7" rx="1" ry="1"
|
|
5
|
+
fill="none" stroke="#9ca3af" stroke-width="1.25" stroke-linejoin="round"/>
|
|
6
|
+
<rect x="17" y="13" width="5" height="7" rx="1" ry="1"
|
|
7
|
+
fill="#2563eb" fill-opacity="0.2" stroke="#2563eb" stroke-width="1.25" stroke-linejoin="round"/>
|
|
8
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true">
|
|
2
|
+
<rect x="4" y="4" width="13" height="16" rx="1.25" ry="1.25"
|
|
3
|
+
fill="none" stroke="#9ca3af" stroke-width="1.25" stroke-linejoin="round"/>
|
|
4
|
+
<line x1="21.5" y1="2" x2="21.5" y2="22" stroke="#2563eb" stroke-width="2" stroke-linecap="round"/>
|
|
5
|
+
</svg>
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
SIDEBAR_MAIN,
|
|
7
7
|
SIDEBAR_MAIN_BOTTOM,
|
|
8
8
|
SIDEBAR_AUXILIARY,
|
|
9
|
+
SIDEBAR_AUXILIARY_BOTTOM,
|
|
9
10
|
PANEL_BOTTOM,
|
|
10
11
|
TOOLBAR_MAIN,
|
|
11
12
|
TOOLBAR_MAIN_CENTER,
|
|
@@ -14,15 +15,22 @@ import {
|
|
|
14
15
|
TOOLBAR_BOTTOM_CENTER,
|
|
15
16
|
TOOLBAR_BOTTOM_END
|
|
16
17
|
} from "../core/contribution-targets";
|
|
18
|
+
import { appLoaderService } from "../core/apploader";
|
|
19
|
+
import { appSettings } from "../core/settingsservice";
|
|
20
|
+
import {
|
|
21
|
+
LAYOUT_PANEL_SETTINGS_KEY,
|
|
22
|
+
resolveStoredPanelVisibility,
|
|
23
|
+
type LayoutPanelVisibility,
|
|
24
|
+
} from "../core/layout-panels";
|
|
17
25
|
import {DocksContainer} from "../parts/container";
|
|
18
26
|
|
|
19
27
|
@customElement('docks-standard-layout')
|
|
20
28
|
export class DocksStandardLayout extends DocksContainer {
|
|
21
|
-
@property({type: Boolean, attribute: 'show-
|
|
22
|
-
|
|
29
|
+
@property({type: Boolean, attribute: 'show-left-aux'})
|
|
30
|
+
showLeftAux: boolean = false;
|
|
23
31
|
|
|
24
32
|
@property({type: Boolean, attribute: 'show-bottom-panel'})
|
|
25
|
-
showBottomPanel: boolean =
|
|
33
|
+
showBottomPanel: boolean = true;
|
|
26
34
|
|
|
27
35
|
@property({type: Boolean, attribute: 'show-left-sidebar'})
|
|
28
36
|
showLeftSidebar: boolean = true;
|
|
@@ -30,10 +38,65 @@ export class DocksStandardLayout extends DocksContainer {
|
|
|
30
38
|
@property({type: Boolean, attribute: 'show-aux-sidebar'})
|
|
31
39
|
showAuxSidebar: boolean = true;
|
|
32
40
|
|
|
41
|
+
@property({type: Boolean, attribute: 'show-right-aux'})
|
|
42
|
+
showRightAux: boolean = false;
|
|
43
|
+
|
|
44
|
+
private panelsInitialized = false;
|
|
45
|
+
|
|
33
46
|
createRenderRoot() {
|
|
34
47
|
return this;
|
|
35
48
|
}
|
|
36
49
|
|
|
50
|
+
getPanelVisibility(): LayoutPanelVisibility {
|
|
51
|
+
return {
|
|
52
|
+
showLeftSidebar: this.showLeftSidebar,
|
|
53
|
+
showAuxSidebar: this.showAuxSidebar,
|
|
54
|
+
showBottomPanel: this.showBottomPanel,
|
|
55
|
+
showLeftAux: this.showLeftAux,
|
|
56
|
+
showRightAux: this.showRightAux,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
private applyPanelVisibility(panels: LayoutPanelVisibility): void {
|
|
61
|
+
this.showLeftSidebar = panels.showLeftSidebar;
|
|
62
|
+
this.showAuxSidebar = panels.showAuxSidebar;
|
|
63
|
+
this.showBottomPanel = panels.showBottomPanel;
|
|
64
|
+
this.showLeftAux = panels.showLeftAux;
|
|
65
|
+
this.showRightAux = panels.showRightAux;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
async setPanelVisibility(panels: Partial<LayoutPanelVisibility>): Promise<void> {
|
|
69
|
+
const next = { ...this.getPanelVisibility(), ...panels };
|
|
70
|
+
this.applyPanelVisibility(next);
|
|
71
|
+
try {
|
|
72
|
+
await appSettings.set(LAYOUT_PANEL_SETTINGS_KEY, next);
|
|
73
|
+
} catch (error) {
|
|
74
|
+
console.error('Failed to persist layout panel visibility:', error);
|
|
75
|
+
throw error;
|
|
76
|
+
}
|
|
77
|
+
window.dispatchEvent(new CustomEvent('layout-panels-changed', {
|
|
78
|
+
detail: { panels: this.getPanelVisibility() },
|
|
79
|
+
}));
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
protected doInitUI() {
|
|
83
|
+
void this.initializePanelVisibility();
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
private async initializePanelVisibility(): Promise<void> {
|
|
87
|
+
if (this.panelsInitialized) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
this.panelsInitialized = true;
|
|
91
|
+
|
|
92
|
+
const appLayout = appLoaderService.getCurrentApp()?.layout;
|
|
93
|
+
const panels = await resolveStoredPanelVisibility(appLayout);
|
|
94
|
+
this.applyPanelVisibility(panels);
|
|
95
|
+
window.dispatchEvent(new CustomEvent('layout-panels-changed', {
|
|
96
|
+
detail: { panels: this.getPanelVisibility() },
|
|
97
|
+
}));
|
|
98
|
+
}
|
|
99
|
+
|
|
37
100
|
private getGridSizes(): string {
|
|
38
101
|
if (this.showLeftSidebar && this.showAuxSidebar) {
|
|
39
102
|
return "20%, 60%, 20%";
|
|
@@ -133,7 +196,7 @@ export class DocksStandardLayout extends DocksContainer {
|
|
|
133
196
|
|
|
134
197
|
${this.showLeftSidebar
|
|
135
198
|
? html`
|
|
136
|
-
${this.
|
|
199
|
+
${this.showLeftAux
|
|
137
200
|
? html`
|
|
138
201
|
<docks-resizable-grid
|
|
139
202
|
id="left-sidebar-split"
|
|
@@ -163,7 +226,20 @@ export class DocksStandardLayout extends DocksContainer {
|
|
|
163
226
|
}
|
|
164
227
|
|
|
165
228
|
${this.showAuxSidebar
|
|
166
|
-
? html
|
|
229
|
+
? html`
|
|
230
|
+
${this.showRightAux
|
|
231
|
+
? html`
|
|
232
|
+
<docks-resizable-grid
|
|
233
|
+
id="right-sidebar-split"
|
|
234
|
+
orientation="vertical"
|
|
235
|
+
sizes="50%, 50%">
|
|
236
|
+
<docks-tabs id="${SIDEBAR_AUXILIARY}"></docks-tabs>
|
|
237
|
+
<docks-tabs id="${SIDEBAR_AUXILIARY_BOTTOM}" placement="start" icon-only></docks-tabs>
|
|
238
|
+
</docks-resizable-grid>
|
|
239
|
+
`
|
|
240
|
+
: html`<docks-tabs id="${SIDEBAR_AUXILIARY}"></docks-tabs>`
|
|
241
|
+
}
|
|
242
|
+
`
|
|
167
243
|
: nothing
|
|
168
244
|
}
|
|
169
245
|
</docks-resizable-grid>
|
package/src/parts/contextmenu.ts
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import {subscribe} from "../core/events";
|
|
11
11
|
import {closeSiblingSubmenus} from "../core/dropdown-menu-utils";
|
|
12
12
|
import {createRef, ref} from "lit/directives/ref.js";
|
|
13
|
-
import {renderDropdownContribution} from "../core/dropdown-item";
|
|
13
|
+
import {renderDropdownContribution, handleDropdownWaSelect} from "../core/dropdown-item";
|
|
14
14
|
|
|
15
15
|
interface VirtualPopupAnchor {
|
|
16
16
|
getBoundingClientRect(): DOMRect;
|
|
@@ -276,6 +276,7 @@ export class DocksContextMenu extends DocksElement {
|
|
|
276
276
|
${ref(this.dropdownRef)}
|
|
277
277
|
?open=${this.isOpen}
|
|
278
278
|
@submenu-opening=${this.handleSubmenuOpening}
|
|
279
|
+
@wa-select=${handleDropdownWaSelect}
|
|
279
280
|
@wa-after-hide=${this.onClose}>
|
|
280
281
|
<span slot="trigger" hidden aria-hidden="true"></span>
|
|
281
282
|
|
package/src/parts/part.ts
CHANGED
|
@@ -21,6 +21,10 @@ export abstract class DocksPart extends DocksContainer {
|
|
|
21
21
|
@property({ type: Boolean, attribute: false })
|
|
22
22
|
public isEditor: boolean = false;
|
|
23
23
|
|
|
24
|
+
/** Compact layout for dialog/tab embedding (no fill-height shell or nested scroll). */
|
|
25
|
+
@property({ type: Boolean, reflect: true })
|
|
26
|
+
embedded = false;
|
|
27
|
+
|
|
24
28
|
protected commandStack?: CommandStack;
|
|
25
29
|
|
|
26
30
|
public getCommandStack(): CommandStack | undefined {
|
|
@@ -294,6 +298,26 @@ export abstract class DocksPart extends DocksContainer {
|
|
|
294
298
|
min-height: 100%;
|
|
295
299
|
}
|
|
296
300
|
|
|
301
|
+
:host([embedded]) {
|
|
302
|
+
height: auto;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
:host([embedded]) .part-shell {
|
|
306
|
+
height: auto;
|
|
307
|
+
overflow: visible;
|
|
308
|
+
grid-template-rows: auto;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
:host([embedded]) .part-content {
|
|
312
|
+
overflow: visible;
|
|
313
|
+
min-height: 0;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
:host([embedded]) .part-content-inner {
|
|
317
|
+
height: auto;
|
|
318
|
+
min-height: 0;
|
|
319
|
+
}
|
|
320
|
+
|
|
297
321
|
.part-toolbar {
|
|
298
322
|
min-height: 0;
|
|
299
323
|
}
|