@pstdio/workbench 0.38.0 → 0.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/extensions.d.ts +43 -2
- package/dist/extensions.js +284 -255
- package/dist/extensions.js.map +1 -1
- package/dist/{file-renderer-view-B1tNSzpa.js → file-renderer-view-Cf3pcX_K.js} +3 -3
- package/dist/{file-renderer-view-B1tNSzpa.js.map → file-renderer-view-Cf3pcX_K.js.map} +1 -1
- package/dist/{index-Cl3NI1pb.d.ts → index-Bzx1gf5-.d.ts} +266 -204
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1255 -1182
- package/dist/index.js.map +1 -1
- package/dist/{kanban-presentation-Mb9rbE48.d.ts → kanban-presentation-yKUdZyuY.d.ts} +1 -1
- package/dist/navigation-tree-registry-DazyPivr.js +106 -0
- package/dist/navigation-tree-registry-DazyPivr.js.map +1 -0
- package/dist/{react-Dnt2zZRw.js → react-CgOb52iV.js} +2805 -2444
- package/dist/react-CgOb52iV.js.map +1 -0
- package/dist/react.d.ts +3 -2
- package/dist/react.js +1 -1
- package/dist/storage.d.ts +1 -1
- package/dist/webview-runtime.js +1 -1
- package/dist/{workbench-renderers-RPeMVtTc.js → workbench-renderers-DNXWpDWd.js} +151 -144
- package/dist/workbench-renderers-DNXWpDWd.js.map +1 -0
- package/package.json +3 -3
- package/dist/navigation-tree-registry-CKB9qsW1.js +0 -102
- package/dist/navigation-tree-registry-CKB9qsW1.js.map +0 -1
- package/dist/react-Dnt2zZRw.js.map +0 -1
- package/dist/workbench-renderers-RPeMVtTc.js.map +0 -1
package/dist/extensions.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as t } from "./navigation-tree-registry-
|
|
3
|
-
import { b as n, c as r, rt as i } from "./react-
|
|
1
|
+
import { S as e } from "./workbench-renderers-DNXWpDWd.js";
|
|
2
|
+
import { n as t } from "./navigation-tree-registry-DazyPivr.js";
|
|
3
|
+
import { b as n, c as r, rt as i } from "./react-CgOb52iV.js";
|
|
4
4
|
import { ALWAYS_AVAILABLE_WEBVIEW_CAPABILITIES as a, WEBVIEW_DECLARABLE_CAPABILITIES as o, WEBVIEW_HOST_CAPABILITIES as s, WEBVIEW_HOST_CAPABILITY_VERSION as c, WEBVIEW_SCOPED_DECLARABLE_CAPABILITIES as l, isLocalizedString as u, isNavigationTarget as d, matchesResourceWhen as f, qualifyNavigationTarget as p, resourceKey as m } from "@pstdio/sdk/extensions";
|
|
5
5
|
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
6
6
|
import { createElement as _, useEffect as v, useRef as y, useState as ee } from "react";
|
|
@@ -570,19 +570,60 @@ var De = (e) => {
|
|
|
570
570
|
return { dispose() {
|
|
571
571
|
for (let e = r.length - 1; e >= 0; --e) r[e]?.dispose();
|
|
572
572
|
} };
|
|
573
|
-
}, z = (e
|
|
573
|
+
}, z = (e) => e.extensionId === "pstdio" ? e.id : `${e.extensionId}.${e.kind}.${e.id}`, B = (e) => e.extensionId === "pstdio" ? e.id : `${e.extensionId}.command.${e.id}`, Fe = (e) => {
|
|
574
|
+
if (!e) return;
|
|
575
|
+
let t = (e) => {
|
|
576
|
+
if (e) return Array.isArray(e) ? e.map(z) : z(e);
|
|
577
|
+
};
|
|
578
|
+
return {
|
|
579
|
+
mode: t(e.mode),
|
|
580
|
+
source: e.source,
|
|
581
|
+
viewId: t(e.view),
|
|
582
|
+
resourceType: e.resourceType?.map((e) => e.id),
|
|
583
|
+
metadata: e.metadata
|
|
584
|
+
};
|
|
585
|
+
}, Ie = Fe, V = (e, t, n) => {
|
|
586
|
+
if (e) return Object.fromEntries(Object.entries(e).map(([e, r]) => [e, {
|
|
587
|
+
...r,
|
|
588
|
+
...r.options && !Array.isArray(r.options) ? { options: Le(r.options, n) } : {},
|
|
589
|
+
label: r.label === void 0 ? void 0 : t(r.label, e),
|
|
590
|
+
description: r.description === void 0 ? void 0 : t(r.description)
|
|
591
|
+
}]));
|
|
592
|
+
}, Le = (e, t) => {
|
|
593
|
+
let n = e;
|
|
594
|
+
return {
|
|
595
|
+
valueField: n.valueField,
|
|
596
|
+
labelField: n.labelField,
|
|
597
|
+
params: n.params,
|
|
598
|
+
commandId: B({
|
|
599
|
+
id: n.command.id,
|
|
600
|
+
extensionId: n.command.extensionId ?? t ?? "pstdio"
|
|
601
|
+
})
|
|
602
|
+
};
|
|
603
|
+
}, Re = (e) => e.toolbarActions?.map((t) => ({
|
|
604
|
+
id: t.id,
|
|
605
|
+
label: N(t.label, t.id),
|
|
606
|
+
icon: t.icon,
|
|
607
|
+
presentation: t.presentation,
|
|
608
|
+
commandId: t.commandId,
|
|
609
|
+
args: t.params,
|
|
610
|
+
params: V(t.input, N, e.extensionId),
|
|
611
|
+
submitLabel: t.submitLabel,
|
|
612
|
+
disabled: t.disabled,
|
|
613
|
+
when: t.when
|
|
614
|
+
})), H = (e, t = "") => N(e, t), ze = (e) => ({
|
|
574
615
|
...e,
|
|
575
|
-
label:
|
|
576
|
-
description: e.description ?
|
|
616
|
+
label: H(e.label, e.id),
|
|
617
|
+
description: e.description ? H(e.description) : void 0,
|
|
577
618
|
icon: e.icon ? _(i, {
|
|
578
619
|
name: e.icon,
|
|
579
620
|
size: 14
|
|
580
621
|
}) : void 0
|
|
581
|
-
}),
|
|
622
|
+
}), Be = (e) => !!(e && typeof e == "object" && Array.isArray(e.rows)), Ve = (e) => ({
|
|
582
623
|
id: e.id,
|
|
583
624
|
values: e.values,
|
|
584
625
|
resource: e.resource ? e.resource : void 0
|
|
585
|
-
}),
|
|
626
|
+
}), He = (e, t) => {
|
|
586
627
|
let n = /* @__PURE__ */ new WeakMap(), r = F({
|
|
587
628
|
id: t.id,
|
|
588
629
|
kind: "dataTableRenderer",
|
|
@@ -606,18 +647,19 @@ var De = (e) => {
|
|
|
606
647
|
});
|
|
607
648
|
return e.workbench.views.registerView({
|
|
608
649
|
id: t.id,
|
|
609
|
-
title:
|
|
650
|
+
title: H(t.title, t.id),
|
|
610
651
|
icon: t.icon,
|
|
611
652
|
body: {
|
|
612
653
|
kind: "dataTable",
|
|
613
654
|
resourceKind: t.resourceKind,
|
|
614
|
-
|
|
655
|
+
toolbarActions: Re(t),
|
|
656
|
+
columns: t.columns?.map(ze),
|
|
615
657
|
initialPageSize: t.initialPageSize,
|
|
616
658
|
pageSizeOptions: t.pageSizeOptions,
|
|
617
659
|
selectionMode: t.selectionMode,
|
|
618
660
|
selectionActions: t.selectionActions?.map((e) => ({
|
|
619
661
|
id: e.id,
|
|
620
|
-
label:
|
|
662
|
+
label: H(e.label, e.id),
|
|
621
663
|
icon: e.icon ? _(i, {
|
|
622
664
|
name: e.icon,
|
|
623
665
|
size: 16
|
|
@@ -625,21 +667,21 @@ var De = (e) => {
|
|
|
625
667
|
destructive: e.destructive,
|
|
626
668
|
run: (t) => a(e.commandId, { rowIds: t.map((e) => e.id) }).then(() => void 0)
|
|
627
669
|
})),
|
|
628
|
-
emptyTitle: t.emptyTitle ?
|
|
629
|
-
emptyDescription: t.emptyDescription ?
|
|
670
|
+
emptyTitle: t.emptyTitle ? H(t.emptyTitle) : void 0,
|
|
671
|
+
emptyDescription: t.emptyDescription ? H(t.emptyDescription) : void 0,
|
|
630
672
|
executeQuery: async ({ resource: e, modeId: r }, i) => {
|
|
631
673
|
let o = await a(t.queryHandlerId, {}, e, r, i);
|
|
632
|
-
return
|
|
674
|
+
return Be(o) ? {
|
|
633
675
|
rows: o.rows.map((e) => {
|
|
634
|
-
let t =
|
|
676
|
+
let t = Ve(e);
|
|
635
677
|
return n.set(t, e), t;
|
|
636
678
|
}),
|
|
637
|
-
columns: o.columns?.map(
|
|
679
|
+
columns: o.columns?.map(ze)
|
|
638
680
|
} : { rows: [] };
|
|
639
681
|
},
|
|
640
682
|
rowActions: t.rowActions?.map((n) => ({
|
|
641
683
|
id: n.id,
|
|
642
|
-
label:
|
|
684
|
+
label: H(n.label, n.id),
|
|
643
685
|
icon: n.icon ? _(i, {
|
|
644
686
|
name: n.icon,
|
|
645
687
|
size: 16
|
|
@@ -654,16 +696,16 @@ var De = (e) => {
|
|
|
654
696
|
} : void 0
|
|
655
697
|
}
|
|
656
698
|
});
|
|
657
|
-
},
|
|
658
|
-
let n = t.map((t) =>
|
|
699
|
+
}, Ue = (e, t) => {
|
|
700
|
+
let n = t.map((t) => He(e, t));
|
|
659
701
|
return { dispose() {
|
|
660
702
|
for (let e = n.length - 1; e >= 0; --e) n[e]?.dispose();
|
|
661
703
|
} };
|
|
662
|
-
},
|
|
704
|
+
}, We = {
|
|
663
705
|
first: 0,
|
|
664
706
|
default: 1,
|
|
665
707
|
last: 2
|
|
666
|
-
},
|
|
708
|
+
}, Ge = {
|
|
667
709
|
commands: [],
|
|
668
710
|
commandPaletteContributions: [],
|
|
669
711
|
diagnostics: [],
|
|
@@ -681,7 +723,7 @@ var De = (e) => {
|
|
|
681
723
|
statuses: [],
|
|
682
724
|
settingsPanels: [],
|
|
683
725
|
settingsDefinitions: []
|
|
684
|
-
},
|
|
726
|
+
}, Ke = (e) => `workbench.extension.menu.${e.id}`, qe = (e) => `workbench.extension.palette.${e.id}`, Je = (e, t) => We[e.placement ?? "default"] * 1e3 + t, Ye = (e) => e === void 0 ? "" : u(e) ? e.default ?? e.$l10n : e, Xe = (e) => {
|
|
685
727
|
let { commandId: t, contribution: n, index: r, resolveString: i, slot: a, when: o } = e;
|
|
686
728
|
return {
|
|
687
729
|
commandId: t,
|
|
@@ -691,10 +733,10 @@ var De = (e) => {
|
|
|
691
733
|
group: a.group ?? n.group,
|
|
692
734
|
args: n.params,
|
|
693
735
|
overflowLabel: a.overflowLabel,
|
|
694
|
-
order:
|
|
736
|
+
order: Je(n, r),
|
|
695
737
|
when: o
|
|
696
738
|
};
|
|
697
|
-
},
|
|
739
|
+
}, Ze = (e) => {
|
|
698
740
|
let { commandId: t, contribution: n, index: r, resolveString: i } = e;
|
|
699
741
|
return {
|
|
700
742
|
commandId: t,
|
|
@@ -702,10 +744,10 @@ var De = (e) => {
|
|
|
702
744
|
icon: n.icon,
|
|
703
745
|
group: n.group,
|
|
704
746
|
args: n.params,
|
|
705
|
-
order:
|
|
747
|
+
order: Je(n, r)
|
|
706
748
|
};
|
|
707
|
-
},
|
|
708
|
-
let { createCommandId: t =
|
|
749
|
+
}, Qe = (e) => {
|
|
750
|
+
let { createCommandId: t = Ke, createWhenExpression: n, menuSlotsById: r, menuTargetsById: i, metadata: a, resolveString: o = Ye } = e, s = [], c = [];
|
|
709
751
|
return a.menuContributions.forEach((e, l) => {
|
|
710
752
|
let u = e.target ? i?.get(e.target) : r.get(e.slotId);
|
|
711
753
|
if (!u) {
|
|
@@ -726,7 +768,7 @@ var De = (e) => {
|
|
|
726
768
|
params: f?.params
|
|
727
769
|
},
|
|
728
770
|
contribution: e,
|
|
729
|
-
menuItem:
|
|
771
|
+
menuItem: Xe({
|
|
730
772
|
commandId: d,
|
|
731
773
|
contribution: e,
|
|
732
774
|
index: l,
|
|
@@ -741,8 +783,8 @@ var De = (e) => {
|
|
|
741
783
|
registrations: s,
|
|
742
784
|
unresolved: c
|
|
743
785
|
};
|
|
744
|
-
},
|
|
745
|
-
let { createCommandId: t =
|
|
786
|
+
}, $e = (e) => {
|
|
787
|
+
let { createCommandId: t = qe, metadata: n, resolveString: r = Ye } = e, i = [];
|
|
746
788
|
return (n.commandPaletteContributions ?? []).forEach((e, a) => {
|
|
747
789
|
let o = t(e), s = n.commands.find((t) => t.id === e.commandId);
|
|
748
790
|
i.push({
|
|
@@ -755,7 +797,7 @@ var De = (e) => {
|
|
|
755
797
|
params: s?.params
|
|
756
798
|
},
|
|
757
799
|
contribution: e,
|
|
758
|
-
menuItem:
|
|
800
|
+
menuItem: Ze({
|
|
759
801
|
commandId: o,
|
|
760
802
|
contribution: e,
|
|
761
803
|
index: a,
|
|
@@ -764,7 +806,7 @@ var De = (e) => {
|
|
|
764
806
|
targetCommandId: e.commandId
|
|
765
807
|
});
|
|
766
808
|
}), i;
|
|
767
|
-
},
|
|
809
|
+
}, et = (e) => ({
|
|
768
810
|
id: e.rendererId,
|
|
769
811
|
kind: "renderer",
|
|
770
812
|
context: {
|
|
@@ -774,7 +816,7 @@ var De = (e) => {
|
|
|
774
816
|
resourceId: e.resource.id
|
|
775
817
|
} : {}
|
|
776
818
|
}
|
|
777
|
-
}),
|
|
819
|
+
}), tt = async (e, t, n, r, i = {}, a, o) => {
|
|
778
820
|
let s = r;
|
|
779
821
|
return L(e, n, {
|
|
780
822
|
params: {
|
|
@@ -788,23 +830,23 @@ var De = (e) => {
|
|
|
788
830
|
},
|
|
789
831
|
resource: s,
|
|
790
832
|
signal: o,
|
|
791
|
-
slot:
|
|
833
|
+
slot: et({
|
|
792
834
|
projectId: e.projectId,
|
|
793
835
|
rendererId: t,
|
|
794
836
|
resource: s
|
|
795
837
|
}),
|
|
796
838
|
...a ? { metadata: a } : {}
|
|
797
839
|
});
|
|
798
|
-
},
|
|
840
|
+
}, nt = (e) => {
|
|
799
841
|
if (!e || typeof e != "object") return;
|
|
800
842
|
let t = e.revision;
|
|
801
843
|
return typeof t == "string" ? t : void 0;
|
|
802
|
-
},
|
|
844
|
+
}, rt = (e, t) => {
|
|
803
845
|
let n = e.metadata, r = n?.fileRendererOrigin;
|
|
804
846
|
if (!r || typeof r != "object") return;
|
|
805
847
|
let i = r;
|
|
806
848
|
if (typeof i.rendererId != "string" || typeof i.instanceId != "string" || typeof i.operationId != "string") return;
|
|
807
|
-
let a = n?.fileRendererResourceKey, o =
|
|
849
|
+
let a = n?.fileRendererResourceKey, o = nt(t.outcome.value);
|
|
808
850
|
return {
|
|
809
851
|
origin: {
|
|
810
852
|
rendererId: i.rendererId,
|
|
@@ -814,32 +856,32 @@ var De = (e) => {
|
|
|
814
856
|
...typeof a == "string" ? { resourceKey: a } : {},
|
|
815
857
|
...o ? { revision: o } : {}
|
|
816
858
|
};
|
|
817
|
-
},
|
|
859
|
+
}, it = (e, t) => e.workbench.views.registerView({
|
|
818
860
|
id: t.id,
|
|
819
861
|
title: N(t.title, t.id),
|
|
820
862
|
icon: t.icon,
|
|
821
863
|
body: {
|
|
822
864
|
kind: "file",
|
|
823
865
|
resourceKind: t.resourceKind,
|
|
824
|
-
load: async (n, r) => await
|
|
866
|
+
load: async (n, r) => await tt(e, t.id, t.loadHandlerId, n, {}, void 0, r) ?? {},
|
|
825
867
|
save: t.saveHandlerId ? async (n, r, i) => {
|
|
826
|
-
let a =
|
|
868
|
+
let a = nt(await tt(e, t.id, t.saveHandlerId, n, { content: r }, {
|
|
827
869
|
...i ? { fileRendererOrigin: i } : {},
|
|
828
870
|
...m(n) ? { fileRendererResourceKey: m(n) } : {}
|
|
829
871
|
}));
|
|
830
872
|
return a ? { revision: a } : void 0;
|
|
831
873
|
} : void 0
|
|
832
874
|
}
|
|
833
|
-
}),
|
|
875
|
+
}), at = (e) => {
|
|
834
876
|
let t = [];
|
|
835
|
-
for (let n of e.metadata.fileRenderers ?? []) t.push(
|
|
877
|
+
for (let n of e.metadata.fileRenderers ?? []) t.push(it(e, n));
|
|
836
878
|
return { dispose() {
|
|
837
879
|
for (let e = t.length - 1; e >= 0; --e) t[e]?.dispose();
|
|
838
880
|
} };
|
|
839
|
-
},
|
|
881
|
+
}, ot = (e) => (t) => _(i, {
|
|
840
882
|
name: e ?? "MoreHorizontal",
|
|
841
883
|
...t
|
|
842
|
-
}),
|
|
884
|
+
}), st = (e, t) => ({
|
|
843
885
|
color: e?.color,
|
|
844
886
|
canDragIn: e?.canDragIn,
|
|
845
887
|
canDragOut: e?.canDragOut,
|
|
@@ -847,12 +889,12 @@ var De = (e) => {
|
|
|
847
889
|
actions: e?.actions?.map((e) => ({
|
|
848
890
|
id: e.id,
|
|
849
891
|
label: t(e.label, e.id),
|
|
850
|
-
icon:
|
|
892
|
+
icon: ot(e.icon)
|
|
851
893
|
}))
|
|
852
|
-
}),
|
|
894
|
+
}), ct = (e, t) => `${t.extensionId ?? e.extensionId}.status.${t.id}`, lt = (e, t) => {
|
|
853
895
|
let n = /* @__PURE__ */ new Map();
|
|
854
896
|
return (r) => {
|
|
855
|
-
let i =
|
|
897
|
+
let i = ct(t, r), a = n.get(i);
|
|
856
898
|
if (a) return a;
|
|
857
899
|
let o = {
|
|
858
900
|
getSnapshot: () => (e.workbench.statuses.getStatuses(i) ?? []).map((e) => ({
|
|
@@ -865,16 +907,16 @@ var De = (e) => {
|
|
|
865
907
|
};
|
|
866
908
|
return n.set(i, o), e.workbench.statuses.load(i).catch(() => void 0), o;
|
|
867
909
|
};
|
|
868
|
-
},
|
|
910
|
+
}, ut = (e, t, n, r, i) => {
|
|
869
911
|
let a = n?.find((e) => e.id === r);
|
|
870
912
|
if (a?.type.kind !== "status") return;
|
|
871
|
-
let o =
|
|
913
|
+
let o = ct(t, a.type.statuses), s = e.workbench.statuses.getStatuses(o)?.find((e) => e.id === i);
|
|
872
914
|
return s ? { color: s.color } : void 0;
|
|
873
|
-
},
|
|
915
|
+
}, dt = (e) => {
|
|
874
916
|
if (e.defaultSettings?.columnGrouping) return e.defaultSettings.columnGrouping;
|
|
875
917
|
let t = e.attributes?.filter((e) => e.type.kind === "status") ?? [];
|
|
876
918
|
return t.length === 1 ? t[0]?.id : void 0;
|
|
877
|
-
},
|
|
919
|
+
}, ft = (e) => typeof e == "object" && !!e && !Array.isArray(e), pt = (e, t, n, r, i, a) => (t ?? []).map((t) => {
|
|
878
920
|
let o = t.display, s = o?.kind === "badge-list" && typeof o.itemsAttributeId == "string" ? {
|
|
879
921
|
kind: "badge-list",
|
|
880
922
|
itemsAttributeId: o.itemsAttributeId
|
|
@@ -894,36 +936,36 @@ var De = (e) => {
|
|
|
894
936
|
} : t.type,
|
|
895
937
|
display: s
|
|
896
938
|
});
|
|
897
|
-
}),
|
|
898
|
-
let o =
|
|
939
|
+
}), mt = (e, t, n, r, i = () => [], a) => {
|
|
940
|
+
let o = pt(e, t, n, r, i, a), s = /* @__PURE__ */ new Set();
|
|
899
941
|
return {
|
|
900
942
|
source: {
|
|
901
943
|
getSnapshot: () => o,
|
|
902
944
|
subscribe: (e) => (s.add(e), () => s.delete(e))
|
|
903
945
|
},
|
|
904
946
|
set(t) {
|
|
905
|
-
o =
|
|
947
|
+
o = pt(e, t, n, r, i, a);
|
|
906
948
|
for (let e of s) e();
|
|
907
949
|
}
|
|
908
950
|
};
|
|
909
|
-
},
|
|
951
|
+
}, ht = (e) => !!(e && typeof e == "object" && typeof e.type == "string" && typeof e.id == "string"), gt = (e, t) => {
|
|
910
952
|
let { resource: n } = t;
|
|
911
|
-
if (
|
|
912
|
-
},
|
|
913
|
-
let n =
|
|
953
|
+
if (ht(n)) return n;
|
|
954
|
+
}, _t = (e, t) => {
|
|
955
|
+
let n = gt(e, t);
|
|
914
956
|
if (n) return n;
|
|
915
957
|
if (e.resourceKind) return {
|
|
916
958
|
type: e.resourceKind,
|
|
917
959
|
id: t.id,
|
|
918
960
|
label: t.title
|
|
919
961
|
};
|
|
920
|
-
},
|
|
962
|
+
}, vt = (e, t) => {
|
|
921
963
|
let n = e, r = t(n);
|
|
922
964
|
return r === void 0 ? n : {
|
|
923
965
|
...n,
|
|
924
966
|
resource: r
|
|
925
967
|
};
|
|
926
|
-
},
|
|
968
|
+
}, yt = (...e) => Object.assign({}, ...e.filter((e) => !!e)), bt = (e) => e && typeof e == "object" && !Array.isArray(e) ? e : void 0, xt = (e) => Object.keys(e ?? {}).length > 0, St = /* @__PURE__ */ new Set([
|
|
927
969
|
"text",
|
|
928
970
|
"longtext",
|
|
929
971
|
"markdown",
|
|
@@ -932,8 +974,8 @@ var De = (e) => {
|
|
|
932
974
|
"select",
|
|
933
975
|
"multi-select",
|
|
934
976
|
"files"
|
|
935
|
-
]),
|
|
936
|
-
if (!
|
|
977
|
+
]), Ct = (e, t, n) => {
|
|
978
|
+
if (!St.has(t.type)) return;
|
|
937
979
|
let r = "options" in t && Array.isArray(t.options) ? t.options : [], i = t;
|
|
938
980
|
return {
|
|
939
981
|
id: e,
|
|
@@ -951,15 +993,15 @@ var De = (e) => {
|
|
|
951
993
|
multiple: t.type === "files" ? i.multiple !== !1 : void 0,
|
|
952
994
|
accept: t.type === "files" && typeof i.accept == "string" ? i.accept : void 0
|
|
953
995
|
};
|
|
954
|
-
},
|
|
955
|
-
let r =
|
|
996
|
+
}, wt = (e, t) => Object.entries(e.createRow?.params ?? {}).flatMap(([e, n]) => {
|
|
997
|
+
let r = Ct(e, n, t);
|
|
956
998
|
return r ? [r] : [];
|
|
957
|
-
}),
|
|
999
|
+
}), Tt = (e, t) => F({
|
|
958
1000
|
id: t.id,
|
|
959
1001
|
kind: "kanbanRenderer",
|
|
960
1002
|
projectId: e.projectId,
|
|
961
1003
|
context: { kanbanRendererId: t.id }
|
|
962
|
-
}),
|
|
1004
|
+
}), U = (e, t, n, r, i, a) => {
|
|
963
1005
|
let o = i ?? e.workbench.getPrimaryResource();
|
|
964
1006
|
return L(e, n, {
|
|
965
1007
|
params: {
|
|
@@ -973,33 +1015,33 @@ var De = (e) => {
|
|
|
973
1015
|
},
|
|
974
1016
|
resource: o,
|
|
975
1017
|
signal: a,
|
|
976
|
-
slot:
|
|
1018
|
+
slot: Tt(e, t),
|
|
977
1019
|
metadata: { kanbanRendererId: t.id }
|
|
978
1020
|
});
|
|
979
|
-
},
|
|
1021
|
+
}, Et = (e, t) => `workbench.extension.kanbanRenderer.${e.id}.rowAction.${t.id}`, Dt = (e, t, n) => (t.rowActions ?? []).map((r) => {
|
|
980
1022
|
let i = e.workbench.commands.getCommand(r.commandId)?.command;
|
|
981
1023
|
return e.workbench.commands.registerCommand({
|
|
982
|
-
id:
|
|
1024
|
+
id: Et(t, r),
|
|
983
1025
|
label: n(r.label, r.id),
|
|
984
1026
|
icon: r.icon,
|
|
985
1027
|
params: i?.params
|
|
986
|
-
}, { execute: (n, i) =>
|
|
987
|
-
}),
|
|
988
|
-
let o =
|
|
989
|
-
return s &&
|
|
1028
|
+
}, { execute: (n, i) => U(e, t, r.commandId, yt(bt(n)), i?.resource) });
|
|
1029
|
+
}), Ot = (e, t, n, r, i, a) => {
|
|
1030
|
+
let o = Et(t, n), s = e.workbench.commands.getCommand(o), c = { rowId: r.id }, l = i ? { resource: i } : void 0, u = a(n.label, n.id);
|
|
1031
|
+
return s && xt(s.command.params) ? (e.workbench.commandPalette.requestParams({
|
|
990
1032
|
record: s,
|
|
991
1033
|
label: u,
|
|
992
1034
|
args: c,
|
|
993
1035
|
context: l
|
|
994
|
-
}), Promise.resolve()) : s ? e.workbench.commands.executeCommand(s.command.id, c, l).then(() => void 0) :
|
|
995
|
-
},
|
|
1036
|
+
}), Promise.resolve()) : s ? e.workbench.commands.executeCommand(s.command.id, c, l).then(() => void 0) : U(e, t, n.commandId, c, i).then(() => void 0);
|
|
1037
|
+
}, kt = (e) => e ? _(i, {
|
|
996
1038
|
name: e,
|
|
997
1039
|
size: 16
|
|
998
|
-
}) : void 0,
|
|
1040
|
+
}) : void 0, At = (e, t) => {
|
|
999
1041
|
if (e.createRow) return {
|
|
1000
1042
|
title: t(e.createRow.title, "Create row"),
|
|
1001
1043
|
submitLabel: t(e.createRow.submitLabel, "Create"),
|
|
1002
|
-
fields:
|
|
1044
|
+
fields: wt(e, t),
|
|
1003
1045
|
labels: {
|
|
1004
1046
|
cancel: t(e.createRow.labels?.cancel, "Cancel"),
|
|
1005
1047
|
properties: t(e.createRow.labels?.properties, "Properties"),
|
|
@@ -1007,20 +1049,20 @@ var De = (e) => {
|
|
|
1007
1049
|
removeFile: t(e.createRow.labels?.removeFile, "Remove file")
|
|
1008
1050
|
}
|
|
1009
1051
|
};
|
|
1010
|
-
},
|
|
1052
|
+
}, jt = (e, t, n, r, i) => {
|
|
1011
1053
|
if (t.rowActivationHandlerId) return async (n) => {
|
|
1012
1054
|
let a = r(t, n);
|
|
1013
|
-
await
|
|
1055
|
+
await U(e, t, t.rowActivationHandlerId, { row: i(n) }, a);
|
|
1014
1056
|
};
|
|
1015
1057
|
if (n.onRowClick) return (e) => n.onRowClick?.({
|
|
1016
1058
|
record: t,
|
|
1017
1059
|
row: e,
|
|
1018
1060
|
resource: r(t, e)
|
|
1019
1061
|
});
|
|
1020
|
-
},
|
|
1062
|
+
}, Mt = (e, t, n, r) => {
|
|
1021
1063
|
let i = e.createRow;
|
|
1022
1064
|
if (i) return async (a) => {
|
|
1023
|
-
let o =
|
|
1065
|
+
let o = yt(a.values, i.columnParam ? { [i.columnParam]: a.columnId } : void 0, i.attributesParam ? { [i.attributesParam]: a.attributeValues } : void 0), s = await n(e, i.commandId, o);
|
|
1024
1066
|
if (await t.onAfterCreate?.({
|
|
1025
1067
|
record: e,
|
|
1026
1068
|
created: s,
|
|
@@ -1034,15 +1076,15 @@ var De = (e) => {
|
|
|
1034
1076
|
attributes: c.attributes ?? {}
|
|
1035
1077
|
});
|
|
1036
1078
|
};
|
|
1037
|
-
},
|
|
1079
|
+
}, Nt = (e, t, n, r, i) => {
|
|
1038
1080
|
let a = t.rowActions;
|
|
1039
1081
|
if (a?.length) return (o) => a.map((a) => {
|
|
1040
|
-
let s = i(t, o), c = () =>
|
|
1082
|
+
let s = i(t, o), c = () => Ot(e, t, a, o, s, r);
|
|
1041
1083
|
return {
|
|
1042
1084
|
key: a.id,
|
|
1043
1085
|
label: r(a.label, a.id),
|
|
1044
1086
|
commandId: a.commandId,
|
|
1045
|
-
icon:
|
|
1087
|
+
icon: kt(a.icon),
|
|
1046
1088
|
onClick: () => n.executeRowAction ? n.executeRowAction({
|
|
1047
1089
|
record: t,
|
|
1048
1090
|
action: a,
|
|
@@ -1052,32 +1094,34 @@ var De = (e) => {
|
|
|
1052
1094
|
}) : c()
|
|
1053
1095
|
};
|
|
1054
1096
|
});
|
|
1055
|
-
},
|
|
1097
|
+
}, Pt = (e, t, n = {}) => {
|
|
1056
1098
|
let r = [], i = n.resolveLabel ?? ((e, t) => N(e, t)), a = (e, t) => {
|
|
1057
1099
|
let r = t.display?.kind === "badge-list" ? {
|
|
1058
1100
|
...t,
|
|
1059
1101
|
render: (e, n) => b(t, e, n)
|
|
1060
1102
|
} : t;
|
|
1061
1103
|
return n.decorateAttribute?.(e, r) ?? r;
|
|
1062
|
-
}, o = n.resolveRowResource ??
|
|
1104
|
+
}, o = n.resolveRowResource ?? gt, s = n.resolveRowActionResource ?? _t, c = n.onAfterMutation ?? (() => {}), l = (t, n, r) => U(e, t, n, r).then((e) => (c(t), e));
|
|
1063
1105
|
for (let c of t) {
|
|
1064
|
-
let t =
|
|
1106
|
+
let t = lt(e, c), u = mt(c, c.attributes, i, a, t, (t, n) => e.workbench.notifications.show({
|
|
1065
1107
|
id: `workbench.extension.${c.extensionId}.kanban.${c.id}.display.${t}`,
|
|
1066
1108
|
level: "error",
|
|
1067
1109
|
title: "Extension display is not available",
|
|
1068
1110
|
message: `Attribute "${t}" in renderer "${c.id}" uses unknown display kind "${n}".`
|
|
1069
|
-
})), d = c.attributes, f =
|
|
1070
|
-
r.push(...
|
|
1111
|
+
})), d = c.attributes, f = dt(c), p = /* @__PURE__ */ new WeakMap(), m, h = 0, g = (e) => o(c, e), _ = jt(e, c, n, o, (e) => p.get(e) ?? e);
|
|
1112
|
+
r.push(...Dt(e, c, i)), r.push(e.workbench.views.registerView({
|
|
1071
1113
|
id: c.id,
|
|
1072
1114
|
title: i(c.title, c.id),
|
|
1073
1115
|
icon: c.icon,
|
|
1074
1116
|
body: {
|
|
1075
1117
|
kind: "kanban",
|
|
1076
1118
|
resourceKind: c.resourceKind,
|
|
1119
|
+
toolbarActions: Re(c),
|
|
1077
1120
|
storageScope: e.projectId,
|
|
1078
1121
|
attributes: u.source,
|
|
1079
1122
|
defaultSettings: c.defaultSettings,
|
|
1080
1123
|
defaultFilters: c.defaultFilters,
|
|
1124
|
+
viewsProvider: n.createViewsProvider?.(c),
|
|
1081
1125
|
defaultViews: c.defaultViews?.map((e) => ({
|
|
1082
1126
|
...e,
|
|
1083
1127
|
title: i(e.title, e.id)
|
|
@@ -1086,21 +1130,21 @@ var De = (e) => {
|
|
|
1086
1130
|
emptyTitle: i(c.emptyTitle, ""),
|
|
1087
1131
|
emptyDescription: i(c.emptyDescription, ""),
|
|
1088
1132
|
hideToolbar: c.hideToolbar,
|
|
1089
|
-
createRow:
|
|
1090
|
-
getBoardColumnConfig: (t) =>
|
|
1133
|
+
createRow: At(c, i),
|
|
1134
|
+
getBoardColumnConfig: (t) => st(m?.[t] ?? ut(e, c, d, f, t), i),
|
|
1091
1135
|
onRowActivate: _,
|
|
1092
1136
|
executeQuery: async (t, n) => {
|
|
1093
1137
|
h += 1;
|
|
1094
|
-
let r = h, i = await
|
|
1138
|
+
let r = h, i = await U(e, c, c.queryHandlerId, {
|
|
1095
1139
|
settings: t.settings,
|
|
1096
1140
|
filters: t.filters
|
|
1097
1141
|
}, void 0, n), a = (e) => e.map((e) => {
|
|
1098
|
-
let t =
|
|
1142
|
+
let t = vt(e, g);
|
|
1099
1143
|
return p.set(t, e), t;
|
|
1100
1144
|
});
|
|
1101
|
-
if (r !== h) return Array.isArray(i) ? a(i) :
|
|
1145
|
+
if (r !== h) return Array.isArray(i) ? a(i) : ft(i) ? a(i.rows ?? []) : [];
|
|
1102
1146
|
if (f = t.settings.columnGrouping, Array.isArray(i)) return a(i);
|
|
1103
|
-
if (!
|
|
1147
|
+
if (!ft(i)) return [];
|
|
1104
1148
|
let o = i.attributes ?? d;
|
|
1105
1149
|
return d = o, u.set(o), m = i.boardColumnConfigs, a(i.rows ?? []);
|
|
1106
1150
|
},
|
|
@@ -1113,39 +1157,21 @@ var De = (e) => {
|
|
|
1113
1157
|
rowId: e,
|
|
1114
1158
|
beforeRowId: t
|
|
1115
1159
|
}).then(() => void 0) : void 0,
|
|
1116
|
-
onCreateRow:
|
|
1160
|
+
onCreateRow: Mt(c, n, l, c.rowActivationHandlerId ? _ : void 0),
|
|
1117
1161
|
onColumnAction: c.columnActionHandlerId ? async (e, t) => {
|
|
1118
1162
|
await l(c, c.columnActionHandlerId, {
|
|
1119
1163
|
columnId: e,
|
|
1120
1164
|
actionId: t
|
|
1121
1165
|
});
|
|
1122
1166
|
} : void 0,
|
|
1123
|
-
getRowContextMenuActions:
|
|
1167
|
+
getRowContextMenuActions: Nt(e, c, n, i, s)
|
|
1124
1168
|
}
|
|
1125
1169
|
}));
|
|
1126
1170
|
}
|
|
1127
1171
|
return { dispose() {
|
|
1128
1172
|
for (let e = r.length - 1; e >= 0; --e) r[e]?.dispose();
|
|
1129
1173
|
} };
|
|
1130
|
-
},
|
|
1131
|
-
if (!e) return;
|
|
1132
|
-
let t = (e) => {
|
|
1133
|
-
if (e) return Array.isArray(e) ? e.map(H) : H(e);
|
|
1134
|
-
};
|
|
1135
|
-
return {
|
|
1136
|
-
mode: t(e.mode),
|
|
1137
|
-
source: e.source,
|
|
1138
|
-
viewId: t(e.view),
|
|
1139
|
-
resourceType: e.resourceType?.map((e) => e.id),
|
|
1140
|
-
metadata: e.metadata
|
|
1141
|
-
};
|
|
1142
|
-
}, jt = At, Mt = (e, t) => {
|
|
1143
|
-
if (e) return Object.fromEntries(Object.entries(e).map(([e, n]) => [e, {
|
|
1144
|
-
...n,
|
|
1145
|
-
label: n.label === void 0 ? void 0 : t(n.label, e),
|
|
1146
|
-
description: n.description === void 0 ? void 0 : t(n.description)
|
|
1147
|
-
}]));
|
|
1148
|
-
}, Nt = (e) => ({
|
|
1174
|
+
}, Ft = (e) => ({
|
|
1149
1175
|
id: e.treeId,
|
|
1150
1176
|
kind: "renderer",
|
|
1151
1177
|
context: {
|
|
@@ -1177,14 +1203,14 @@ var De = (e) => {
|
|
|
1177
1203
|
params: r,
|
|
1178
1204
|
signal: i,
|
|
1179
1205
|
resource: o,
|
|
1180
|
-
slot:
|
|
1206
|
+
slot: Ft({
|
|
1181
1207
|
modeId: a?.modeId,
|
|
1182
1208
|
projectId: e.projectId,
|
|
1183
1209
|
resource: o,
|
|
1184
1210
|
treeId: t.id
|
|
1185
1211
|
})
|
|
1186
1212
|
});
|
|
1187
|
-
},
|
|
1213
|
+
}, It = async (e, t, n, r, i) => {
|
|
1188
1214
|
let a = e.workbench.modes.getActiveModeId();
|
|
1189
1215
|
return L(e, n, {
|
|
1190
1216
|
params: {
|
|
@@ -1198,7 +1224,7 @@ var De = (e) => {
|
|
|
1198
1224
|
}
|
|
1199
1225
|
},
|
|
1200
1226
|
resource: i,
|
|
1201
|
-
slot:
|
|
1227
|
+
slot: Ft({
|
|
1202
1228
|
modeId: a,
|
|
1203
1229
|
projectId: e.projectId,
|
|
1204
1230
|
resource: i,
|
|
@@ -1206,21 +1232,21 @@ var De = (e) => {
|
|
|
1206
1232
|
}),
|
|
1207
1233
|
metadata: { treeId: t.id }
|
|
1208
1234
|
});
|
|
1209
|
-
},
|
|
1210
|
-
let { ctx: t, getHostTreeHeaderNodes: n, record: r, treeViews: i } = e, a =
|
|
1235
|
+
}, Lt = (e, t) => e.panels.flatMap((e) => [e, ...e.panelMenus ?? []]).filter((e) => e.renderer?.kind === "tree" && e.renderer.id === t.id), Rt = (e, t) => t.viewId ? e.find((e) => e.id === t.viewId) : e.length === 1 ? e[0] : void 0, zt = async (e) => {
|
|
1236
|
+
let { ctx: t, getHostTreeHeaderNodes: n, record: r, treeViews: i } = e, a = Rt(i, t);
|
|
1211
1237
|
return !a || !("hostTreeHeader" in a) || a.hostTreeHeader !== "default" ? [] : await n?.({
|
|
1212
1238
|
ctx: t,
|
|
1213
1239
|
record: r,
|
|
1214
1240
|
panel: a
|
|
1215
1241
|
}) ?? [];
|
|
1216
|
-
},
|
|
1217
|
-
let { ctx: t, getHostTreeFooterNodes: n, record: r, treeViews: i } = e, a =
|
|
1242
|
+
}, Bt = async (e) => {
|
|
1243
|
+
let { ctx: t, getHostTreeFooterNodes: n, record: r, treeViews: i } = e, a = Rt(i, t);
|
|
1218
1244
|
return !a || !("hostTreeFooter" in a) || a.hostTreeFooter !== "default" ? [] : await n?.({
|
|
1219
1245
|
ctx: t,
|
|
1220
1246
|
record: r,
|
|
1221
1247
|
panel: a
|
|
1222
1248
|
}) ?? [];
|
|
1223
|
-
},
|
|
1249
|
+
}, Vt = (e, t) => e && typeof e == "object" && !Array.isArray(e) ? e : t, Ht = (e) => e && !Array.isArray(e) ? e : void 0, Ut = (e, t) => {
|
|
1224
1250
|
let n = /* @__PURE__ */ new WeakMap(), r = `workbench.extensionTreeRenderer.${t.id}.command`, i = (t) => e.resolveNodeResource?.(t) ?? t, a = (e) => {
|
|
1225
1251
|
if (e.emptyState) return {
|
|
1226
1252
|
title: N(e.emptyState.title),
|
|
@@ -1242,7 +1268,7 @@ var De = (e) => {
|
|
|
1242
1268
|
extensionId: t.extensionId,
|
|
1243
1269
|
projectId: e.projectId
|
|
1244
1270
|
}) : void 0, s = (n, r, i) => {
|
|
1245
|
-
let a = n.command ?
|
|
1271
|
+
let a = n.command ? B({
|
|
1246
1272
|
...n.command,
|
|
1247
1273
|
extensionId: n.command.extensionId ?? t.extensionId
|
|
1248
1274
|
}) : void 0;
|
|
@@ -1250,18 +1276,18 @@ var De = (e) => {
|
|
|
1250
1276
|
id: n.id,
|
|
1251
1277
|
label: N(n.label),
|
|
1252
1278
|
icon: n.icon,
|
|
1253
|
-
args:
|
|
1254
|
-
params:
|
|
1279
|
+
args: Ht(n.params),
|
|
1280
|
+
params: V(n.input, N, t.extensionId),
|
|
1255
1281
|
submitLabel: n.submitLabel,
|
|
1256
1282
|
when: n.when,
|
|
1257
1283
|
disabled: n.disabled,
|
|
1258
1284
|
run: a ? async (o) => {
|
|
1259
|
-
let s =
|
|
1285
|
+
let s = Vt(o, Ht(n.params));
|
|
1260
1286
|
if (n.command?.extensionId === "pstdio") {
|
|
1261
1287
|
await e.workbench.commands.executeCommand(a, s, { resource: r?.resource ?? i.resource });
|
|
1262
1288
|
return;
|
|
1263
1289
|
}
|
|
1264
|
-
await
|
|
1290
|
+
await It(e, t, a, s, r?.resource ?? i.resource), i.refresh();
|
|
1265
1291
|
} : void 0
|
|
1266
1292
|
};
|
|
1267
1293
|
}, c = (e, t) => {
|
|
@@ -1302,16 +1328,16 @@ var De = (e) => {
|
|
|
1302
1328
|
originalNodes: n,
|
|
1303
1329
|
runnerCommandId: r
|
|
1304
1330
|
};
|
|
1305
|
-
}, K = (e) => Array.isArray(e) && e.every((e) => e && typeof e == "object" && "nodes" in e),
|
|
1331
|
+
}, K = (e) => Array.isArray(e) && e.every((e) => e && typeof e == "object" && "nodes" in e), Wt = (e) => Array.isArray(e) && e.every((e) => e && typeof e == "object" && "id" in e), q = (e, t) => t.length > 0 ? [{
|
|
1306
1332
|
id: e,
|
|
1307
1333
|
nodes: t,
|
|
1308
1334
|
canReorder: !1
|
|
1309
|
-
}] : [],
|
|
1310
|
-
let n =
|
|
1335
|
+
}] : [], Gt = (e, t) => {
|
|
1336
|
+
let n = Ut(e, t), r = Lt(e.metadata, t), i = e.workbench.commands.registerCommand({
|
|
1311
1337
|
id: n.runnerCommandId,
|
|
1312
1338
|
label: `${N(t.title, t.id)} tree command`
|
|
1313
1339
|
}, { execute: async (n) => {
|
|
1314
|
-
let r = n, i = await
|
|
1340
|
+
let r = n, i = await It(e, t, r.commandId, r.params, r.resource);
|
|
1315
1341
|
for (let t of e.workbench.views.listViews()) t.body.kind === "file" && e.workbench.views.refreshView(t.id);
|
|
1316
1342
|
return i;
|
|
1317
1343
|
} }), a = e.workbench.views.registerView({
|
|
@@ -1325,7 +1351,7 @@ var De = (e) => {
|
|
|
1325
1351
|
defaultExpandedNodeIds: t.defaultExpandedNodeIds,
|
|
1326
1352
|
defaultExpandedSectionIds: t.defaultExpandedSectionIds,
|
|
1327
1353
|
getHeader: async (i) => {
|
|
1328
|
-
let a = await
|
|
1354
|
+
let a = await zt({
|
|
1329
1355
|
ctx: i,
|
|
1330
1356
|
getHostTreeHeaderNodes: e.getHostTreeHeaderNodes,
|
|
1331
1357
|
record: t,
|
|
@@ -1340,7 +1366,7 @@ var De = (e) => {
|
|
|
1340
1366
|
return K(i) ? n.mapSections(i, r) : [];
|
|
1341
1367
|
},
|
|
1342
1368
|
getFooter: async (i) => {
|
|
1343
|
-
let a = await
|
|
1369
|
+
let a = await Bt({
|
|
1344
1370
|
ctx: i,
|
|
1345
1371
|
getHostTreeFooterNodes: e.getHostTreeFooterNodes,
|
|
1346
1372
|
record: t,
|
|
@@ -1355,38 +1381,38 @@ var De = (e) => {
|
|
|
1355
1381
|
let a = n.originalNodes.get(r);
|
|
1356
1382
|
if (!a) return r.children ?? [];
|
|
1357
1383
|
let o = await G(e, t, t.childrenHandlerId, W(e, t, i, a), i.signal);
|
|
1358
|
-
return
|
|
1384
|
+
return Wt(o) ? n.mapNodes(o, i) : [];
|
|
1359
1385
|
}
|
|
1360
1386
|
}
|
|
1361
1387
|
});
|
|
1362
1388
|
return { dispose() {
|
|
1363
1389
|
a.dispose(), i.dispose();
|
|
1364
1390
|
} };
|
|
1365
|
-
},
|
|
1391
|
+
}, Kt = (e) => {
|
|
1366
1392
|
let t = [];
|
|
1367
|
-
for (let n of e.metadata.treeRenderers ?? []) t.push(
|
|
1393
|
+
for (let n of e.metadata.treeRenderers ?? []) t.push(Gt(e, n));
|
|
1368
1394
|
return { dispose() {
|
|
1369
1395
|
for (let e = t.length - 1; e >= 0; --e) t[e]?.dispose();
|
|
1370
1396
|
} };
|
|
1371
1397
|
}, J = (e) => ({
|
|
1372
1398
|
kind: e.kind,
|
|
1373
|
-
id:
|
|
1399
|
+
id: z(e),
|
|
1374
1400
|
extensionId: e.extensionId
|
|
1375
|
-
}),
|
|
1401
|
+
}), qt = (e, t, n) => {
|
|
1376
1402
|
let r = n?.(t.when);
|
|
1377
1403
|
return !r || e.context.matches(r);
|
|
1378
|
-
},
|
|
1404
|
+
}, Jt = (e) => ({
|
|
1379
1405
|
id: e.id,
|
|
1380
1406
|
label: N(e.label, e.id),
|
|
1381
1407
|
icon: e.icon,
|
|
1382
1408
|
canHide: !0,
|
|
1383
1409
|
canReorder: !0,
|
|
1384
1410
|
target: P(e.action, { extensionId: e.extensionId })
|
|
1385
|
-
}),
|
|
1411
|
+
}), Yt = (e, n, r) => {
|
|
1386
1412
|
let i = /* @__PURE__ */ new Map();
|
|
1387
1413
|
for (let a of n) {
|
|
1388
|
-
if (!
|
|
1389
|
-
let n = a.group || void 0, o = n ? `${a.extensionId}:${n}` : t, s = i.get(o) ?? {
|
|
1414
|
+
if (!qt(e, a, r)) continue;
|
|
1415
|
+
let n = a.group || void 0, o = n ? `${a.extensionId}:${n}` : t(a.slot), s = i.get(o) ?? {
|
|
1390
1416
|
id: o,
|
|
1391
1417
|
label: n,
|
|
1392
1418
|
collapsible: !!n,
|
|
@@ -1394,30 +1420,30 @@ var De = (e) => {
|
|
|
1394
1420
|
canReorder: !0,
|
|
1395
1421
|
nodes: []
|
|
1396
1422
|
};
|
|
1397
|
-
s.nodes.push(
|
|
1423
|
+
s.nodes.push(Jt(a)), i.set(o, s);
|
|
1398
1424
|
}
|
|
1399
1425
|
return [...i.values()];
|
|
1400
|
-
},
|
|
1426
|
+
}, Xt = (e) => {
|
|
1401
1427
|
let t = /* @__PURE__ */ new Map();
|
|
1402
1428
|
for (let n of e) {
|
|
1403
1429
|
let e = J(n.owner), r = `${n.extensionId}:${e.kind}:${e.id}:${n.slot}`;
|
|
1404
1430
|
t.set(r, [...t.get(r) ?? [], n]);
|
|
1405
1431
|
}
|
|
1406
1432
|
return [...t.values()];
|
|
1407
|
-
},
|
|
1433
|
+
}, Zt = (e) => [...new Set(e.flatMap((e) => e.group ? [`${e.extensionId}:${e.group}`] : []))], Qt = (e) => Xt(e.metadata.navigationItems).map((t) => {
|
|
1408
1434
|
let n = t[0], r = t.some((e) => e.when?.resourceType?.length || e.when?.metadata);
|
|
1409
1435
|
return e.workbench.navigationTrees.registerContribution({
|
|
1410
|
-
id: `${n.extensionId}.navigation-items.${n.owner.kind}.${
|
|
1436
|
+
id: `${n.extensionId}.navigation-items.${n.owner.kind}.${z(n.owner)}.${n.slot}`,
|
|
1411
1437
|
owner: J(n.owner),
|
|
1412
1438
|
sourceExtensionId: n.extensionId,
|
|
1413
1439
|
declarationIndex: e.metadata.navigationItems.indexOf(n),
|
|
1414
1440
|
slot: n.slot,
|
|
1415
|
-
defaultExpandedSectionIds:
|
|
1441
|
+
defaultExpandedSectionIds: Zt(t),
|
|
1416
1442
|
...r ? {} : { resolveResource: () => void 0 },
|
|
1417
|
-
getSections: () =>
|
|
1443
|
+
getSections: () => Yt(e.workbench, t, e.createWhenExpression)
|
|
1418
1444
|
});
|
|
1419
|
-
}),
|
|
1420
|
-
let r =
|
|
1445
|
+
}), $t = (e) => e.metadata.navigationTrees.map((t, n) => {
|
|
1446
|
+
let r = z(t.view);
|
|
1421
1447
|
return e.workbench.navigationTrees.registerContribution({
|
|
1422
1448
|
id: t.id,
|
|
1423
1449
|
idScope: t.id,
|
|
@@ -1428,34 +1454,34 @@ var De = (e) => {
|
|
|
1428
1454
|
viewId: r,
|
|
1429
1455
|
...t.resourceScope === "project" ? { resolveResource: () => void 0 } : {}
|
|
1430
1456
|
});
|
|
1431
|
-
}),
|
|
1457
|
+
}), en = (e) => [...Qt(e), ...$t(e)], tn = () => {
|
|
1432
1458
|
if (typeof navigator > "u") return;
|
|
1433
1459
|
let e = `${navigator.platform} ${navigator.userAgent}`.toLowerCase();
|
|
1434
1460
|
if (e.includes("mac")) return "mac";
|
|
1435
1461
|
if (e.includes("win")) return "win";
|
|
1436
1462
|
if (e.includes("linux")) return "linux";
|
|
1437
|
-
},
|
|
1438
|
-
action: P(t.action, { commandIdOf: (e) => e.extensionId ?
|
|
1463
|
+
}, nn = (e, t = tn()) => (t ? e.platformOverrides?.[t] : void 0) ?? e.key, rn = (e) => e.bindings.map((t) => e.workbench.keybindings.registerKeybinding({
|
|
1464
|
+
action: P(t.action, { commandIdOf: (e) => e.extensionId ? B({
|
|
1439
1465
|
extensionId: e.extensionId,
|
|
1440
1466
|
id: e.id
|
|
1441
1467
|
}) : void 0 }),
|
|
1442
|
-
keybinding:
|
|
1468
|
+
keybinding: nn(t),
|
|
1443
1469
|
when: e.createWhenExpression?.(t.when)
|
|
1444
|
-
})),
|
|
1470
|
+
})), an = (e, t) => ({
|
|
1445
1471
|
...e,
|
|
1446
1472
|
tab: e.tab && t.createTab ? t.createTab({
|
|
1447
1473
|
...e.tab,
|
|
1448
1474
|
extensionId: t.extensionId,
|
|
1449
1475
|
placementId: t.placementId
|
|
1450
1476
|
}) : void 0
|
|
1451
|
-
}),
|
|
1477
|
+
}), on = (e, t) => e.kind === "panels" ? e : {
|
|
1452
1478
|
...e,
|
|
1453
1479
|
tab: e.tab && t.createTab ? t.createTab({
|
|
1454
1480
|
...e.tab,
|
|
1455
1481
|
extensionId: t.extensionId,
|
|
1456
1482
|
placementId: t.placementId
|
|
1457
1483
|
}) : void 0
|
|
1458
|
-
},
|
|
1484
|
+
}, sn = (e, t) => e.pages.map((e) => ({
|
|
1459
1485
|
id: e.id,
|
|
1460
1486
|
ref: {
|
|
1461
1487
|
extensionId: e.extensionId,
|
|
@@ -1464,32 +1490,32 @@ var De = (e) => {
|
|
|
1464
1490
|
},
|
|
1465
1491
|
title: e.title,
|
|
1466
1492
|
path: e.path,
|
|
1467
|
-
modeId:
|
|
1493
|
+
modeId: z(e.mode),
|
|
1468
1494
|
resource: e.resource,
|
|
1469
|
-
main:
|
|
1495
|
+
main: on(e.main, {
|
|
1470
1496
|
extensionId: e.extensionId,
|
|
1471
1497
|
placementId: `${e.id}.$main`,
|
|
1472
1498
|
createTab: t
|
|
1473
1499
|
}),
|
|
1474
|
-
slots: e.slots.map((n) =>
|
|
1500
|
+
slots: e.slots.map((n) => an(n, {
|
|
1475
1501
|
extensionId: e.extensionId,
|
|
1476
1502
|
placementId: `${e.id}.${n.id}`,
|
|
1477
1503
|
createTab: t
|
|
1478
1504
|
})),
|
|
1479
1505
|
...e.icon ? { icon: e.icon } : {},
|
|
1480
|
-
...e.parent ? { parentId:
|
|
1506
|
+
...e.parent ? { parentId: z(e.parent) } : {}
|
|
1481
1507
|
})), Y = (e, t) => {
|
|
1482
1508
|
let n = e.pages.flatMap((e) => [...e.main.kind === "view" && e.resource ? [{
|
|
1483
1509
|
...e.resource,
|
|
1484
1510
|
view: e.main.view
|
|
1485
1511
|
}] : [], ...e.slots.flatMap((e) => e.item.kind === "binding" ? [e.item.binding] : [])]);
|
|
1486
|
-
return n.push(...e.placements.flatMap((e) => e.item.kind === "binding" ? [e.item.binding] : [])), n.find((e) =>
|
|
1487
|
-
},
|
|
1512
|
+
return n.push(...e.placements.flatMap((e) => e.item.kind === "binding" ? [e.item.binding] : [])), n.find((e) => z(e.view) === t)?.kinds[0]?.id;
|
|
1513
|
+
}, cn = (e) => e.body.kind === "webview" ? { webview: e.body.webview } : { renderer: {
|
|
1488
1514
|
kind: e.body.kind,
|
|
1489
1515
|
id: e.id
|
|
1490
|
-
} },
|
|
1491
|
-
if (
|
|
1492
|
-
let r = e.views.find((e) => e.id ===
|
|
1516
|
+
} }, ln = (e, t) => e.viewMenus.flatMap((n) => {
|
|
1517
|
+
if (z(n.owner) !== t.id) return [];
|
|
1518
|
+
let r = e.views.find((e) => e.id === z(n.view));
|
|
1493
1519
|
return r ? [{
|
|
1494
1520
|
id: n.id,
|
|
1495
1521
|
extensionId: n.extensionId,
|
|
@@ -1501,22 +1527,22 @@ var De = (e) => {
|
|
|
1501
1527
|
placement: n.placement,
|
|
1502
1528
|
hostTreeHeader: n.hostTreeHeader,
|
|
1503
1529
|
hostTreeFooter: n.hostTreeFooter,
|
|
1504
|
-
...
|
|
1530
|
+
...cn(r)
|
|
1505
1531
|
}] : [];
|
|
1506
|
-
}),
|
|
1507
|
-
let n =
|
|
1532
|
+
}), un = (e) => e.views.map((t) => {
|
|
1533
|
+
let n = ln(e, t);
|
|
1508
1534
|
return {
|
|
1509
1535
|
id: t.id,
|
|
1510
1536
|
extensionId: t.extensionId,
|
|
1511
1537
|
title: t.title,
|
|
1512
1538
|
icon: t.icon,
|
|
1513
1539
|
panelMenus: n.length > 0 ? n : void 0,
|
|
1514
|
-
...
|
|
1540
|
+
...cn(t)
|
|
1515
1541
|
};
|
|
1516
1542
|
}), X = (e) => e?.map(({ command: e, ...t }) => ({
|
|
1517
1543
|
...t,
|
|
1518
|
-
commandId:
|
|
1519
|
-
})),
|
|
1544
|
+
commandId: B(e)
|
|
1545
|
+
})), dn = (e) => e.views.flatMap((t) => {
|
|
1520
1546
|
let n = t.body;
|
|
1521
1547
|
return n.kind === "kanban" ? [{
|
|
1522
1548
|
...n,
|
|
@@ -1532,16 +1558,17 @@ var De = (e) => {
|
|
|
1532
1558
|
params: n.createRow.params,
|
|
1533
1559
|
attributesParam: n.createRow.attributesParam,
|
|
1534
1560
|
labels: n.createRow.labels,
|
|
1535
|
-
commandId:
|
|
1561
|
+
commandId: B(n.createRow.command),
|
|
1536
1562
|
attachments: n.createRow.attachments ? {
|
|
1537
1563
|
resourceParam: n.createRow.attachments.resourceParam,
|
|
1538
1564
|
fileParam: n.createRow.attachments.fileParam,
|
|
1539
|
-
commandId:
|
|
1565
|
+
commandId: B(n.createRow.attachments.command)
|
|
1540
1566
|
} : void 0
|
|
1541
1567
|
} : void 0,
|
|
1542
|
-
rowActions: X(n.rowActions)
|
|
1568
|
+
rowActions: X(n.rowActions),
|
|
1569
|
+
toolbarActions: X(n.toolbarActions)
|
|
1543
1570
|
}] : [];
|
|
1544
|
-
}),
|
|
1571
|
+
}), fn = (e) => e.views.flatMap((t) => {
|
|
1545
1572
|
let n = t.body;
|
|
1546
1573
|
return n.kind === "dataTable" ? [{
|
|
1547
1574
|
...n,
|
|
@@ -1551,30 +1578,31 @@ var De = (e) => {
|
|
|
1551
1578
|
icon: t.icon,
|
|
1552
1579
|
resourceKind: Y(e, t.id),
|
|
1553
1580
|
selectionActions: X(n.selectionActions),
|
|
1554
|
-
rowActions: X(n.rowActions)
|
|
1581
|
+
rowActions: X(n.rowActions),
|
|
1582
|
+
toolbarActions: X(n.toolbarActions)
|
|
1555
1583
|
}] : [];
|
|
1556
|
-
}),
|
|
1584
|
+
}), pn = (e) => e.views.flatMap((t) => t.body.kind === "tree" ? [{
|
|
1557
1585
|
...t.body,
|
|
1558
1586
|
id: t.id,
|
|
1559
1587
|
extensionId: t.extensionId,
|
|
1560
1588
|
title: t.title,
|
|
1561
1589
|
icon: t.icon,
|
|
1562
1590
|
resourceKind: Y(e, t.id)
|
|
1563
|
-
}] : []),
|
|
1591
|
+
}] : []), mn = (e) => e.views.flatMap((t) => t.body.kind === "file" ? [{
|
|
1564
1592
|
...t.body,
|
|
1565
1593
|
id: t.id,
|
|
1566
1594
|
extensionId: t.extensionId,
|
|
1567
1595
|
title: t.title,
|
|
1568
1596
|
icon: t.icon,
|
|
1569
1597
|
resourceKind: Y(e, t.id)
|
|
1570
|
-
}] : []),
|
|
1598
|
+
}] : []), hn = (e) => e.views.flatMap((t) => t.body.kind === "controls" ? [{
|
|
1571
1599
|
...t.body,
|
|
1572
1600
|
id: t.id,
|
|
1573
1601
|
extensionId: t.extensionId,
|
|
1574
1602
|
title: t.title,
|
|
1575
1603
|
icon: t.icon,
|
|
1576
1604
|
resourceKind: Y(e, t.id)
|
|
1577
|
-
}] : []),
|
|
1605
|
+
}] : []), gn = (e) => e.modes.map((e) => ({
|
|
1578
1606
|
id: e.id,
|
|
1579
1607
|
extensionId: e.extensionId,
|
|
1580
1608
|
modeId: e.id,
|
|
@@ -1583,17 +1611,17 @@ var De = (e) => {
|
|
|
1583
1611
|
panelRegions: e.regions,
|
|
1584
1612
|
regionSettings: e.regionSettings,
|
|
1585
1613
|
floatingPanels: e.floatingPanels,
|
|
1586
|
-
...e.defaultTheme ? { defaultTheme:
|
|
1587
|
-
...e.chrome ? { chrome: Object.fromEntries(Object.entries(e.chrome).map(([e, t]) => [e, t !== !1 &&
|
|
1588
|
-
})),
|
|
1589
|
-
let n =
|
|
1614
|
+
...e.defaultTheme ? { defaultTheme: z(e.defaultTheme) } : {},
|
|
1615
|
+
...e.chrome ? { chrome: Object.fromEntries(Object.entries(e.chrome).map(([e, t]) => [e, t !== !1 && z(t)])) } : {}
|
|
1616
|
+
})), _n = (e, t = {}) => {
|
|
1617
|
+
let n = un(e);
|
|
1590
1618
|
return {
|
|
1591
1619
|
extensions: e.extensions,
|
|
1592
1620
|
commands: e.commands,
|
|
1593
1621
|
menuContributions: e.menuContributions,
|
|
1594
1622
|
commandPaletteContributions: e.commandPaletteContributions,
|
|
1595
|
-
modes:
|
|
1596
|
-
pages:
|
|
1623
|
+
modes: gn(e),
|
|
1624
|
+
pages: sn(e, t.createTab),
|
|
1597
1625
|
placements: e.placements.map((e) => ({
|
|
1598
1626
|
id: e.id,
|
|
1599
1627
|
ref: {
|
|
@@ -1601,7 +1629,7 @@ var De = (e) => {
|
|
|
1601
1629
|
kind: "placement",
|
|
1602
1630
|
id: e.localId
|
|
1603
1631
|
},
|
|
1604
|
-
modeId:
|
|
1632
|
+
modeId: z(e.mode),
|
|
1605
1633
|
item: e.item,
|
|
1606
1634
|
region: e.region,
|
|
1607
1635
|
order: e.order,
|
|
@@ -1635,7 +1663,7 @@ var De = (e) => {
|
|
|
1635
1663
|
})),
|
|
1636
1664
|
settingsSections: e.settingsSections ?? [],
|
|
1637
1665
|
settingsPanels: e.settingsPanels.flatMap((t) => {
|
|
1638
|
-
let n = e.views.find((e) => e.id ===
|
|
1666
|
+
let n = e.views.find((e) => e.id === z(t.view));
|
|
1639
1667
|
return n ? [{
|
|
1640
1668
|
id: t.id,
|
|
1641
1669
|
viewId: n.id,
|
|
@@ -1644,31 +1672,31 @@ var De = (e) => {
|
|
|
1644
1672
|
scope: t.slot.id.includes("global") ? "global" : "project",
|
|
1645
1673
|
title: n.title,
|
|
1646
1674
|
icon: n.icon,
|
|
1647
|
-
section: t.section ?
|
|
1675
|
+
section: t.section ? z(t.section) : void 0
|
|
1648
1676
|
}] : [];
|
|
1649
1677
|
}),
|
|
1650
|
-
kanbanRenderers:
|
|
1651
|
-
dataTableRenderers:
|
|
1678
|
+
kanbanRenderers: dn(e),
|
|
1679
|
+
dataTableRenderers: fn(e),
|
|
1652
1680
|
commandPaletteResources: e.commandPaletteResources ?? [],
|
|
1653
|
-
treeRenderers:
|
|
1654
|
-
fileRenderers:
|
|
1655
|
-
controlsRenderers:
|
|
1681
|
+
treeRenderers: pn(e),
|
|
1682
|
+
fileRenderers: mn(e),
|
|
1683
|
+
controlsRenderers: hn(e),
|
|
1656
1684
|
keybindings: e.keybindings ?? [],
|
|
1657
1685
|
settingsDefinitions: e.settingsDefinitions ?? [],
|
|
1658
1686
|
statuses: e.statuses,
|
|
1659
1687
|
statusBarItems: e.statusBarItems.map((e) => ({
|
|
1660
1688
|
id: e.id,
|
|
1661
1689
|
extensionId: e.extensionId,
|
|
1662
|
-
viewId:
|
|
1690
|
+
viewId: z(e.view),
|
|
1663
1691
|
slot: e.slot.id.endsWith("leading") ? "leading" : "trailing",
|
|
1664
1692
|
order: e.order,
|
|
1665
|
-
when:
|
|
1693
|
+
when: Fe(e.when)
|
|
1666
1694
|
})),
|
|
1667
1695
|
diagnostics: e.diagnostics
|
|
1668
1696
|
};
|
|
1669
|
-
},
|
|
1697
|
+
}, vn = (e, t, n = {}) => {
|
|
1670
1698
|
e.views.refreshView(t.id, t.kind === "file" ? n : void 0);
|
|
1671
|
-
},
|
|
1699
|
+
}, yn = (e) => {
|
|
1672
1700
|
let t = /* @__PURE__ */ new Map(), n = (e, n) => {
|
|
1673
1701
|
for (let r of new Set(n.refreshEventIds ?? [])) {
|
|
1674
1702
|
let i = t.get(r) ?? [];
|
|
@@ -1683,15 +1711,15 @@ var De = (e) => {
|
|
|
1683
1711
|
refreshEventIds: t.body.refreshEventIds
|
|
1684
1712
|
});
|
|
1685
1713
|
return t;
|
|
1686
|
-
},
|
|
1687
|
-
let t =
|
|
1714
|
+
}, bn = (e) => {
|
|
1715
|
+
let t = yn(e.metadata);
|
|
1688
1716
|
return e.subscribe((n) => {
|
|
1689
1717
|
let { id: r, ...i } = n;
|
|
1690
|
-
for (let n of t.get(r) ?? [])
|
|
1718
|
+
for (let n of t.get(r) ?? []) vn(e.workbench, n, i);
|
|
1691
1719
|
});
|
|
1692
|
-
},
|
|
1720
|
+
}, xn = (e, t) => {
|
|
1693
1721
|
for (let n of t.views) n.body.kind === "webview" && e.views.getView(n.id) && e.views.refreshView(n.id);
|
|
1694
|
-
},
|
|
1722
|
+
}, Sn = (e) => (t) => ({
|
|
1695
1723
|
...xe({
|
|
1696
1724
|
workbench: t.workbench,
|
|
1697
1725
|
placement: t.placement,
|
|
@@ -1729,25 +1757,25 @@ var De = (e) => {
|
|
|
1729
1757
|
"files.delete": e.files.delete
|
|
1730
1758
|
} : {},
|
|
1731
1759
|
...e.artifacts ? { "artifacts.read": (n) => e.artifacts.read(n, { webviewId: t.webviewId }) } : {}
|
|
1732
|
-
}),
|
|
1760
|
+
}), Cn = (e) => ({
|
|
1733
1761
|
title: N(e.title) || void 0,
|
|
1734
1762
|
runtimeUrl: e.runtimeUrl,
|
|
1735
1763
|
moduleUrl: e.moduleUrl,
|
|
1736
1764
|
styles: e.styles,
|
|
1737
1765
|
capabilities: e.capabilities
|
|
1738
|
-
}),
|
|
1766
|
+
}), wn = "extensions", Tn = 1e3, En = 25, Dn = (e) => e === void 0 ? void 0 : e, On = (e) => e === "global" ? "user" : "project", kn = (e, t) => t ? (n) => ({
|
|
1739
1767
|
...e(n),
|
|
1740
1768
|
...t(n)
|
|
1741
|
-
}) : e,
|
|
1769
|
+
}) : e, An = (e, t) => kn(e.createWebviewHostCapabilities ?? Sn({
|
|
1742
1770
|
artifacts: e.webviewArtifacts,
|
|
1743
1771
|
executeCommand: e.executeCommand,
|
|
1744
1772
|
extensionIdForWebview: (t) => e.metadata.panels.find((e) => e.id === t)?.extensionId,
|
|
1745
1773
|
files: e.webviewFiles,
|
|
1746
1774
|
projectId: e.projectId,
|
|
1747
1775
|
slotKind: t
|
|
1748
|
-
}), e.createWebviewHostCapabilityOverrides),
|
|
1776
|
+
}), e.createWebviewHostCapabilityOverrides), jn = (e) => e.metadata.panels.flatMap((t) => {
|
|
1749
1777
|
if (!t.webview) return [];
|
|
1750
|
-
let n =
|
|
1778
|
+
let n = Cn(t.webview);
|
|
1751
1779
|
return [e.workbench.views.registerView({
|
|
1752
1780
|
id: t.id,
|
|
1753
1781
|
title: N(t.title, t.id),
|
|
@@ -1763,7 +1791,7 @@ var De = (e) => {
|
|
|
1763
1791
|
placement: r.instance,
|
|
1764
1792
|
hostEvents: we(r.workbench, r.instance)
|
|
1765
1793
|
},
|
|
1766
|
-
createHostCapabilities:
|
|
1794
|
+
createHostCapabilities: An(e, i),
|
|
1767
1795
|
createProps: e.createWebviewProps ?? (({ placement: e }) => ({
|
|
1768
1796
|
placement: e,
|
|
1769
1797
|
resource: e.resource
|
|
@@ -1776,20 +1804,20 @@ var De = (e) => {
|
|
|
1776
1804
|
}
|
|
1777
1805
|
}
|
|
1778
1806
|
})];
|
|
1779
|
-
}),
|
|
1807
|
+
}), Mn = {
|
|
1780
1808
|
first: 1e6,
|
|
1781
1809
|
default: 0,
|
|
1782
1810
|
last: -1e6
|
|
1783
|
-
},
|
|
1811
|
+
}, Nn = (e) => e.metadata.panels.flatMap((e) => e.panelMenus ?? []).map((t, n) => e.workbench.viewMenus.registerViewMenu({
|
|
1784
1812
|
id: t.id,
|
|
1785
1813
|
ownerViewId: t.ownerPanelId,
|
|
1786
1814
|
viewId: t.viewId,
|
|
1787
1815
|
side: t.side,
|
|
1788
|
-
priority:
|
|
1789
|
-
})),
|
|
1816
|
+
priority: Mn[t.placement ?? "default"] - n
|
|
1817
|
+
})), Pn = (e) => {
|
|
1790
1818
|
if (!e || typeof e != "object" || !("statuses" in e) || !Array.isArray(e.statuses)) throw Error("Status provider returned an invalid response");
|
|
1791
1819
|
return e.statuses;
|
|
1792
|
-
},
|
|
1820
|
+
}, Fn = (e, t) => {
|
|
1793
1821
|
let r = e.metadata.statuses ?? [];
|
|
1794
1822
|
if (r.length === 0) return [];
|
|
1795
1823
|
let i = "workbench.extension-statuses.settings", a = r.map((n, r) => e.workbench.statuses.registerStatusSet({
|
|
@@ -1800,8 +1828,8 @@ var De = (e) => {
|
|
|
1800
1828
|
label: N(e.label, e.id),
|
|
1801
1829
|
icon: e.icon
|
|
1802
1830
|
})),
|
|
1803
|
-
query: async () =>
|
|
1804
|
-
save: n.saveHandlerId ? async (e) =>
|
|
1831
|
+
query: async () => Pn(await L(t, n.queryHandlerId, { params: {} })),
|
|
1832
|
+
save: n.saveHandlerId ? async (e) => Pn(await L(t, n.saveHandlerId, { params: { statuses: e } })) : void 0
|
|
1805
1833
|
}, {
|
|
1806
1834
|
ownerId: n.extensionId,
|
|
1807
1835
|
priority: -r
|
|
@@ -1818,13 +1846,13 @@ var De = (e) => {
|
|
|
1818
1846
|
title: "Statuses",
|
|
1819
1847
|
icon: "list-checks",
|
|
1820
1848
|
kind: "view",
|
|
1821
|
-
order:
|
|
1822
|
-
section: e.settingsSectionId ??
|
|
1849
|
+
order: En,
|
|
1850
|
+
section: e.settingsSectionId ?? wn,
|
|
1823
1851
|
scope: "project",
|
|
1824
1852
|
viewId: i
|
|
1825
1853
|
})), a;
|
|
1826
|
-
},
|
|
1827
|
-
let t = [], n = e.settingsSectionId ??
|
|
1854
|
+
}, In = (e) => {
|
|
1855
|
+
let t = [], n = e.settingsSectionId ?? wn;
|
|
1828
1856
|
e.workbench.settings.getSection(n) || t.push(e.workbench.settings.registerSection({
|
|
1829
1857
|
id: n,
|
|
1830
1858
|
title: e.settingsSectionTitle ?? "Extensions"
|
|
@@ -1838,8 +1866,8 @@ var De = (e) => {
|
|
|
1838
1866
|
}));
|
|
1839
1867
|
let i = Object.fromEntries((e.metadata.settingsDefinitions ?? []).map((e) => [e.key, {
|
|
1840
1868
|
type: e.type,
|
|
1841
|
-
scope:
|
|
1842
|
-
default:
|
|
1869
|
+
scope: On(e.scope),
|
|
1870
|
+
default: Dn(e.default),
|
|
1843
1871
|
enum: e.enum,
|
|
1844
1872
|
description: N(e.description)
|
|
1845
1873
|
}]));
|
|
@@ -1850,16 +1878,16 @@ var De = (e) => {
|
|
|
1850
1878
|
title: N(i.title, i.id),
|
|
1851
1879
|
icon: i.icon,
|
|
1852
1880
|
kind: "view",
|
|
1853
|
-
order:
|
|
1881
|
+
order: Tn + r,
|
|
1854
1882
|
section: i.section ?? n,
|
|
1855
1883
|
scope: i.scope,
|
|
1856
1884
|
viewId: i.viewId
|
|
1857
1885
|
}));
|
|
1858
1886
|
return t;
|
|
1859
|
-
}, Z = (e) => !(!e || typeof e != "object" || Array.isArray(e)),
|
|
1887
|
+
}, Z = (e) => !(!e || typeof e != "object" || Array.isArray(e)), Ln = (e, t, n) => d(e) ? P(e, {
|
|
1860
1888
|
extensionId: t,
|
|
1861
1889
|
projectId: n
|
|
1862
|
-
}) : void 0,
|
|
1890
|
+
}) : void 0, Rn = (e, t, n) => {
|
|
1863
1891
|
if (!Z(e)) return {};
|
|
1864
1892
|
let r = Z(e.indicator) ? {
|
|
1865
1893
|
icon: String(e.indicator.icon ?? ""),
|
|
@@ -1869,7 +1897,7 @@ var De = (e) => {
|
|
|
1869
1897
|
id: e.id,
|
|
1870
1898
|
rows: e.rows.flatMap((e) => {
|
|
1871
1899
|
if (!Z(e) || typeof e.id != "string") return [];
|
|
1872
|
-
let r =
|
|
1900
|
+
let r = Ln(e.action, t, n);
|
|
1873
1901
|
return [{
|
|
1874
1902
|
id: e.id,
|
|
1875
1903
|
label: N(e.label, e.id),
|
|
@@ -1890,7 +1918,7 @@ var De = (e) => {
|
|
|
1890
1918
|
indicator: r?.icon ? r : void 0,
|
|
1891
1919
|
menu: i
|
|
1892
1920
|
};
|
|
1893
|
-
},
|
|
1921
|
+
}, zn = (e, t) => {
|
|
1894
1922
|
let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), a = new Set(t.refreshEventIds ?? []), o = (a) => {
|
|
1895
1923
|
if (r.has(a.instanceId)) return;
|
|
1896
1924
|
r.add(a.instanceId);
|
|
@@ -1909,7 +1937,7 @@ var De = (e) => {
|
|
|
1909
1937
|
invocation: { placement: "visible" }
|
|
1910
1938
|
} }
|
|
1911
1939
|
})).then((r) => {
|
|
1912
|
-
n.set(a.instanceId,
|
|
1940
|
+
n.set(a.instanceId, Rn(r, t.extensionId, e.projectId));
|
|
1913
1941
|
for (let e of i) e();
|
|
1914
1942
|
}).finally(() => r.delete(a.instanceId));
|
|
1915
1943
|
};
|
|
@@ -1928,22 +1956,23 @@ var De = (e) => {
|
|
|
1928
1956
|
} };
|
|
1929
1957
|
}
|
|
1930
1958
|
};
|
|
1931
|
-
},
|
|
1959
|
+
}, Bn = (e) => {
|
|
1932
1960
|
for (let t = e.length - 1; t >= 0; --t) e[t]?.dispose();
|
|
1933
|
-
}, Q = (e) => e && typeof e == "object" && !Array.isArray(e) ? e : void 0, $ = (e, t, n, r, i) => e.prepareCommandArgs?.(t, n, r, i) ?? n,
|
|
1961
|
+
}, Q = (e) => e && typeof e == "object" && !Array.isArray(e) ? e : void 0, $ = (e, t, n, r, i) => e.prepareCommandArgs?.(t, n, r, i) ?? n, Vn = (e, t) => t.commands.map((t) => e.workbench.commands.registerCommand({
|
|
1934
1962
|
id: t.id,
|
|
1935
1963
|
label: N(t.title, t.id),
|
|
1936
1964
|
description: N(t.description),
|
|
1937
|
-
params: t.params
|
|
1965
|
+
params: V(t.params, N, t.extensionId)
|
|
1938
1966
|
}, {
|
|
1939
1967
|
prepareArgs: (n, r, i) => $(e, t.id, n, r, i),
|
|
1940
1968
|
execute: (n, r) => L(e, t.id, {
|
|
1941
1969
|
params: Q(n),
|
|
1942
|
-
resource: r?.resource
|
|
1970
|
+
resource: r?.resource,
|
|
1971
|
+
signal: r?.signal
|
|
1943
1972
|
})
|
|
1944
|
-
})),
|
|
1973
|
+
})), Hn = (e, t) => t?.resource ?? e.workbench.getPrimaryResource(), Un = (e, t) => {
|
|
1945
1974
|
if (!e.menuSlotsById) return [];
|
|
1946
|
-
let { registrations: n } =
|
|
1975
|
+
let { registrations: n } = Qe({
|
|
1947
1976
|
metadata: e.metadata,
|
|
1948
1977
|
menuSlotsById: e.menuSlotsById,
|
|
1949
1978
|
menuTargetsById: e.menuTargetsById,
|
|
@@ -1962,7 +1991,7 @@ var De = (e) => {
|
|
|
1962
1991
|
...n.contribution.params ?? {},
|
|
1963
1992
|
...Q(r) ?? {}
|
|
1964
1993
|
},
|
|
1965
|
-
resource:
|
|
1994
|
+
resource: Hn(e, i),
|
|
1966
1995
|
slot: F({
|
|
1967
1996
|
id: n.contribution.slotId,
|
|
1968
1997
|
kind: "menu",
|
|
@@ -1971,14 +2000,14 @@ var De = (e) => {
|
|
|
1971
2000
|
})
|
|
1972
2001
|
})
|
|
1973
2002
|
}), ...n.menuItems.map(({ menuPath: t, menuItem: n }) => e.workbench.layout.registerMenuItem(t, n))]);
|
|
1974
|
-
},
|
|
2003
|
+
}, Wn = (t, n) => $e({ metadata: t.metadata }).flatMap((r) => [t.workbench.commands.registerCommand(r.command, {
|
|
1975
2004
|
prepareArgs: (e, t, i) => $(n, r.targetCommandId, e, t, i),
|
|
1976
2005
|
execute: (e, i) => L(n, r.targetCommandId, {
|
|
1977
2006
|
params: {
|
|
1978
2007
|
...r.contribution.params ?? {},
|
|
1979
2008
|
...Q(e) ?? {}
|
|
1980
2009
|
},
|
|
1981
|
-
resource:
|
|
2010
|
+
resource: Hn(t, i),
|
|
1982
2011
|
slot: F({
|
|
1983
2012
|
id: "workbench.commandPalette",
|
|
1984
2013
|
kind: "menu",
|
|
@@ -1987,22 +2016,22 @@ var De = (e) => {
|
|
|
1987
2016
|
})
|
|
1988
2017
|
}),
|
|
1989
2018
|
isVisible: () => f(r.contribution.when, t.workbench.getPrimaryResource()?.type)
|
|
1990
|
-
}), t.workbench.layout.registerMenuItem(e, r.menuItem)]),
|
|
2019
|
+
}), t.workbench.layout.registerMenuItem(e, r.menuItem)]), Gn = (e, t) => {
|
|
1991
2020
|
let n = t?.mode;
|
|
1992
2021
|
if (!n) return !0;
|
|
1993
2022
|
let r = e.workbench.modes.getActiveModeId() ?? "";
|
|
1994
2023
|
return Array.isArray(n) ? n.includes(r) : n === r;
|
|
1995
|
-
},
|
|
2024
|
+
}, Kn = (e) => (e.metadata.statusBarItems ?? []).map((t) => e.workbench.statusBar.registerItem({
|
|
1996
2025
|
id: t.id,
|
|
1997
2026
|
viewId: t.viewId,
|
|
1998
2027
|
slot: t.slot,
|
|
1999
2028
|
order: t.order,
|
|
2000
|
-
isVisible: () =>
|
|
2001
|
-
})),
|
|
2029
|
+
isVisible: () => Gn(e, t.when)
|
|
2030
|
+
})), qn = (e) => e.metadata.pages.map((t) => e.workbench.pages.registerPage(t)), Jn = (e) => e.metadata.resourceKinds.map((t) => e.workbench.resources.registerKind({
|
|
2002
2031
|
kind: t.id,
|
|
2003
2032
|
label: N(t.label, t.id),
|
|
2004
2033
|
icon: t.icon ?? "FileText"
|
|
2005
|
-
})),
|
|
2034
|
+
})), Yn = (e) => e.metadata.modes.map((t) => e.workbench.modes.registerMode({
|
|
2006
2035
|
id: t.modeId,
|
|
2007
2036
|
label: N(t.label, t.modeId),
|
|
2008
2037
|
panels: t.panelRegions,
|
|
@@ -2011,35 +2040,35 @@ var De = (e) => {
|
|
|
2011
2040
|
defaultTheme: t.defaultTheme,
|
|
2012
2041
|
chrome: t.chrome,
|
|
2013
2042
|
activate: () => void 0
|
|
2014
|
-
})),
|
|
2043
|
+
})), Xn = (e) => e.metadata.placements.map((t) => e.workbench.modePlacements.registerPlacement(t)), Zn = (e) => {
|
|
2015
2044
|
let t = {
|
|
2016
2045
|
...e,
|
|
2017
|
-
metadata:
|
|
2046
|
+
metadata: _n(e.metadata, { createTab: (t) => zn(e, t) })
|
|
2018
2047
|
}, n = [], r = t;
|
|
2019
2048
|
try {
|
|
2020
|
-
return n.push(...
|
|
2049
|
+
return n.push(...Vn(r, t.metadata)), n.push(...rn({
|
|
2021
2050
|
bindings: t.metadata.keybindings,
|
|
2022
2051
|
createWhenExpression: t.createKeybindingWhenExpression,
|
|
2023
2052
|
workbench: t.workbench
|
|
2024
|
-
})), n.push(...
|
|
2053
|
+
})), n.push(...Un(t, r)), n.push(...Wn(t, r)), n.push(Kt({
|
|
2025
2054
|
...t,
|
|
2026
2055
|
resolveNodeResource: t.resolveTreeNodeResource
|
|
2027
|
-
})), n.push(
|
|
2056
|
+
})), n.push(at(t)), n.push(Pe(r, t.metadata.controlsRenderers ?? [])), n.push(...jn(t)), n.push(...In(t)), n.push(...Fn(t, r)), n.push(Pt(r, t.metadata.kanbanRenderers ?? [], t.kanbanAdapter)), n.push(Ue(r, t.metadata.dataTableRenderers ?? [])), n.push(...Nn(t)), n.push(Me(r, t.metadata.commandPaletteResources ?? [])), n.push(...en({
|
|
2028
2057
|
createWhenExpression: e.createNavigationWhenExpression,
|
|
2029
2058
|
metadata: e.metadata,
|
|
2030
2059
|
workbench: e.workbench
|
|
2031
|
-
})), e.subscribeRefreshEvents && n.push(
|
|
2060
|
+
})), e.subscribeRefreshEvents && n.push(bn({
|
|
2032
2061
|
metadata: e.metadata,
|
|
2033
2062
|
subscribe: e.subscribeRefreshEvents,
|
|
2034
2063
|
workbench: e.workbench
|
|
2035
|
-
})), n.push(...
|
|
2036
|
-
|
|
2064
|
+
})), n.push(...Kn(t)), n.push(...Jn(t)), n.push(...qn(t)), n.push(...Yn(t)), n.push(...Xn(t)), { dispose() {
|
|
2065
|
+
Bn(n);
|
|
2037
2066
|
} };
|
|
2038
2067
|
} catch (e) {
|
|
2039
|
-
throw
|
|
2068
|
+
throw Bn(n), e;
|
|
2040
2069
|
}
|
|
2041
2070
|
};
|
|
2042
2071
|
//#endregion
|
|
2043
|
-
export {
|
|
2072
|
+
export { $e as buildWorkbenchExtensionCommandPaletteRegistrations, Qe as buildWorkbenchExtensionMenuRegistrations, ye as createTerminalSessionCapability, xe as createWorkbenchWebviewHostCapabilities, Ge as emptyWorkbenchExtensionMetadata, I as executeWorkbenchExtensionCommandResponse, rt as fileRendererRefreshEnvelopeFromCommand, we as getBridgeWebviewHostEventPublisher, xn as refreshOpenWorkbenchExtensionWebviews, vn as refreshWorkbenchExtensionRenderer, Me as registerWorkbenchExtensionCommandPaletteResources, Zn as registerWorkbenchExtensionContributions, Pe as registerWorkbenchExtensionControlsRenderers, Ue as registerWorkbenchExtensionDataTableRenderers, at as registerWorkbenchExtensionFileRenderers, Pt as registerWorkbenchExtensionKanbanRenderers, bn as registerWorkbenchExtensionRendererRefreshEvents, Kt as registerWorkbenchExtensionTreeRenderers, Te as renderBridgeWebviewFrame, P as toWorkbenchNavigationTarget, Ie as toWorkbenchWhenExpression };
|
|
2044
2073
|
|
|
2045
2074
|
//# sourceMappingURL=extensions.js.map
|