@genexus/genexus-ide-ui 3.2.21 → 3.2.22
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/cjs/genexus-ide-ui.cjs.js +1 -1
- package/dist/cjs/gx-ide-plugin-details.cjs.entry.js +31 -13
- package/dist/cjs/gx-ide-plugin-details.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-plugin-explorer.cjs.entry.js +97 -48
- package/dist/cjs/gx-ide-plugin-explorer.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-progress-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/_helpers/progress-bar/progress-bar.css +10 -0
- package/dist/collection/components/plugin-details/gx-ide-assets/plugin-details/langs/plugin-details.lang.en.json +3 -1
- package/dist/collection/components/plugin-details/gx-ide-assets/plugin-details/langs/plugin-details.lang.ja.json +3 -1
- package/dist/collection/components/plugin-details/gx-ide-assets/plugin-details/langs/plugin-details.lang.zh.json +3 -1
- package/dist/collection/components/plugin-details/plugin-details.css +7 -1
- package/dist/collection/components/plugin-details/plugin-details.js +75 -16
- package/dist/collection/components/plugin-details/plugin-details.js.map +1 -1
- package/dist/collection/components/plugin-explorer/plugin-explorer.css +83 -26
- package/dist/collection/components/plugin-explorer/plugin-explorer.js +105 -56
- package/dist/collection/components/plugin-explorer/plugin-explorer.js.map +1 -1
- package/dist/components/gx-ide-plugin-details.js +40 -14
- package/dist/components/gx-ide-plugin-details.js.map +1 -1
- package/dist/components/gx-ide-plugin-explorer.js +107 -52
- package/dist/components/gx-ide-plugin-explorer.js.map +1 -1
- package/dist/components/progress-bar.js +1 -1
- package/dist/components/progress-bar.js.map +1 -1
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-plugin-details.entry.js +31 -13
- package/dist/esm/gx-ide-plugin-details.entry.js.map +1 -1
- package/dist/esm/gx-ide-plugin-explorer.entry.js +97 -48
- package/dist/esm/gx-ide-plugin-explorer.entry.js.map +1 -1
- package/dist/esm/gx-ide-progress-bar.entry.js +1 -1
- package/dist/esm/gx-ide-progress-bar.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js.map +1 -1
- package/dist/genexus-ide-ui/gx-ide-assets/plugin-details/langs/plugin-details.lang.en.json +3 -1
- package/dist/genexus-ide-ui/gx-ide-assets/plugin-details/langs/plugin-details.lang.ja.json +3 -1
- package/dist/genexus-ide-ui/gx-ide-assets/plugin-details/langs/plugin-details.lang.zh.json +3 -1
- package/dist/genexus-ide-ui/{p-b3c5c315.entry.js → p-63e41ecd.entry.js} +2 -2
- package/dist/genexus-ide-ui/p-63e41ecd.entry.js.map +1 -0
- package/dist/genexus-ide-ui/p-e82d9621.entry.js +317 -0
- package/dist/genexus-ide-ui/p-e82d9621.entry.js.map +1 -0
- package/dist/genexus-ide-ui/p-ef8663dd.entry.js +284 -0
- package/dist/genexus-ide-ui/p-ef8663dd.entry.js.map +1 -0
- package/dist/types/components/plugin-details/plugin-details.d.ts +21 -3
- package/dist/types/components/plugin-explorer/plugin-explorer.d.ts +31 -4
- package/dist/types/components.d.ts +34 -14
- package/package.json +1 -1
- package/dist/genexus-ide-ui/p-514445ac.entry.js +0 -291
- package/dist/genexus-ide-ui/p-514445ac.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-b3c5c315.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-fc0bc991.entry.js +0 -204
- package/dist/genexus-ide-ui/p-fc0bc991.entry.js.map +0 -1
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
import { g as t, r as e, h as i, H as o, a as s } from "./p-9b9ccd0c.js";
|
|
2
|
+
|
|
3
|
+
import { g as a } from "./p-d42e842b.js";
|
|
4
|
+
|
|
5
|
+
import "./p-6534555e.js";
|
|
6
|
+
|
|
7
|
+
import "lit";
|
|
8
|
+
|
|
9
|
+
import "lit/directives/when.js";
|
|
10
|
+
|
|
11
|
+
import "lit/directives/if-defined.js";
|
|
12
|
+
|
|
13
|
+
import { L as r } from "./p-311eedf3.js";
|
|
14
|
+
|
|
15
|
+
import { c as n } from "./p-c5196b3b.js";
|
|
16
|
+
|
|
17
|
+
const c = ":host{display:grid;block-size:100%;position:relative}.outer-container{grid-template-rows:max-content 1fr}.inner-container{position:relative}.list-box::part(item){width:100%;min-width:100%}.list-box::part(item__action){gap:var(--spacing-gap-xs)}.list-box::part(item__caption){font-weight:var(--font-style-semi-bold);color:var(--color-text-neutral-default);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.list-box::part(item__inline-caption){grid-template-columns:minmax(0, 1fr) max-content;align-items:center;gap:var(--spacing-gap-m);width:100%;min-width:100%}:host .list-box::part(group__action),:host .list-box::part(group__caption){font-size:var(--font-size-body-s);--ch-action-list-group__expandable-button-size:var(--icon-xs);--ch-action-list-group__expandable-button-image-size:var(--icon-xs)}.list-box::part(custom-image){block-size:40px;inline-size:40px;border-radius:var(--border-radius-m);object-fit:cover;margin-inline-end:12px}.list-box::part(custom-meta){display:flex;align-items:center;gap:var(--spacing-gap-m)}.list-box::part(custom-meta-item){display:inline-flex;align-items:center;gap:var(--spacing-gap-xs);font-size:var(--font-size-body-s);color:var(--color-text-neutral-default);white-space:nowrap}.list-box::part(custom-meta-icon){--ch-image-size:14px}.list-box::part(custom-container){display:flex;flex-direction:column;gap:var(--spacing-gap-xs);width:100%}.list-box::part(item__block-end start){width:100%;min-width:100%}.list-box::part(custom-description){font-size:var(--font-size-body-s);margin:0;color:var(--color-text-neutral-neutral);line-height:var(--line-height-relaxed);margin-inline-end:8px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.list-box::part(custom-footer){display:flex;align-items:center;gap:var(--spacing-gap-m);width:100%;margin-block-start:2px;min-block-size:var(--control-block-size)}.list-box::part(custom-brand){font-weight:var(--font-style-regular);font-size:var(--font-size-body-s);color:var(--color-text-neutral-disabled);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.list-box::part(custom-button){--button-color:var(--color-text-primary-default);margin-inline-start:auto;display:inline-grid;grid-auto-flow:column;grid-auto-columns:max-content;justify-content:center;padding-block:var(--control-padding-block);padding-inline:var(--control-padding-inline);box-sizing:border-box;color:var(--button-color);font-size:var(--font-size-body-s);font-weight:var(--font-style-semi-bold);text-transform:capitalize}.list-box::part(custom-button):hover{--button-color:var(--color-text-primary-hover)}.list-box::part(custom-button):active{--button-color:var(--color-text-primary-pressed)}.list-box::part(custom-progress){display:flex;align-items:center;gap:var(--spacing-gap-xs);margin-inline-start:auto;inline-size:140px}.list-box::part(custom-progress-label){font-size:var(--font-size-caption-s);line-height:1;color:var(--color-text-neutral-neutral);white-space:nowrap}.list-box::part(custom-progress-bar){flex:1}";
|
|
18
|
+
|
|
19
|
+
var l = undefined && undefined.__classPrivateFieldGet || function(t, e, i, o) {
|
|
20
|
+
if (i === "a" && !o) throw new TypeError("Private accessor was defined without a getter");
|
|
21
|
+
if (typeof e === "function" ? t !== e || !o : !e.has(t)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
22
|
+
return i === "m" ? o : i === "a" ? o.call(t) : o ? o.value : e.get(t);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
var p = undefined && undefined.__classPrivateFieldSet || function(t, e, i, o, s) {
|
|
26
|
+
if (o === "m") throw new TypeError("Private method is not writable");
|
|
27
|
+
if (o === "a" && !s) throw new TypeError("Private accessor was defined without a setter");
|
|
28
|
+
if (typeof e === "function" ? t !== e || !s : !e.has(t)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
29
|
+
return o === "a" ? s.call(t, i) : s ? s.value = i : e.set(t, i), i;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
var m, d, u, h, g, f, b, x, v, w, y;
|
|
33
|
+
|
|
34
|
+
const z = a({
|
|
35
|
+
category: "system",
|
|
36
|
+
name: "filters",
|
|
37
|
+
colorType: "on-surface"
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
// plugin icon if no iconUrl was provided
|
|
41
|
+
const _ = t(`./gx-ide-assets/plugin-explorer/images/plugin-icon.svg`);
|
|
42
|
+
|
|
43
|
+
const k = [ "resets/box-sizing", "components/list-box", "components/button", "components/edit", "utils/form", "utils/layout", "utils/typography", "utils/spacing", "chameleon/scrollbar" ];
|
|
44
|
+
|
|
45
|
+
const j = a({
|
|
46
|
+
category: "system",
|
|
47
|
+
name: "search",
|
|
48
|
+
colorType: "on-surface"
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
const M = a({
|
|
52
|
+
category: "system",
|
|
53
|
+
name: "star-fill",
|
|
54
|
+
colorType: "warning"
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
const T = a({
|
|
58
|
+
category: "system",
|
|
59
|
+
name: "download",
|
|
60
|
+
colorType: "on-surface"
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
const W = class {
|
|
64
|
+
constructor(t) {
|
|
65
|
+
e(this, t);
|
|
66
|
+
/**
|
|
67
|
+
* The component hard-coded strings translations.
|
|
68
|
+
*/
|
|
69
|
+
// eslint-disable-next-line @stencil-community/own-props-must-be-private
|
|
70
|
+
m.set(this, void 0);
|
|
71
|
+
d.set(this, false);
|
|
72
|
+
u.set(this, ((t, e) => i => {
|
|
73
|
+
i.stopPropagation();
|
|
74
|
+
this.executeActionCallback(t, e);
|
|
75
|
+
}));
|
|
76
|
+
// Formats a raw downloads count into a compact string (e.g. 4000 -> "4K").
|
|
77
|
+
h.set(this, new Intl.NumberFormat(undefined, {
|
|
78
|
+
notation: "compact",
|
|
79
|
+
maximumFractionDigits: 1
|
|
80
|
+
}));
|
|
81
|
+
g.set(this, (t => {
|
|
82
|
+
const e = typeof t === "number" ? t : Number(t);
|
|
83
|
+
return Number.isFinite(e) ? l(this, h, "f").format(e) : `${t}`;
|
|
84
|
+
}));
|
|
85
|
+
f.set(this, (t => {
|
|
86
|
+
const e = !!t.action;
|
|
87
|
+
const o = t.downloads !== undefined && t.downloads !== null;
|
|
88
|
+
const s = t.rating !== undefined && t.rating !== null;
|
|
89
|
+
const a = o || s;
|
|
90
|
+
const r = {
|
|
91
|
+
id: t.id,
|
|
92
|
+
caption: t.name,
|
|
93
|
+
imgSrc: t.iconUrl,
|
|
94
|
+
type: "actionable",
|
|
95
|
+
additionalInformation: {
|
|
96
|
+
"stretch-start": {
|
|
97
|
+
center: [ {
|
|
98
|
+
part: "custom-image",
|
|
99
|
+
jsx: () => i("img", {
|
|
100
|
+
part: "custom-image",
|
|
101
|
+
src: t.iconUrl || _,
|
|
102
|
+
alt: `${l(this, m, "f").logotype.replace("PLUGIN_NAME_PLACEHOLDER", t.name)}`,
|
|
103
|
+
loading: "lazy"
|
|
104
|
+
})
|
|
105
|
+
} ]
|
|
106
|
+
},
|
|
107
|
+
"inline-caption": a && {
|
|
108
|
+
end: [ {
|
|
109
|
+
part: "custom-meta",
|
|
110
|
+
jsx: () => i("div", {
|
|
111
|
+
part: "custom-meta"
|
|
112
|
+
}, o && i("span", {
|
|
113
|
+
part: "custom-meta-item custom-downloads",
|
|
114
|
+
title: `${t.downloads}`
|
|
115
|
+
}, i("ch-image", {
|
|
116
|
+
part: "custom-meta-icon custom-downloads-icon",
|
|
117
|
+
src: T
|
|
118
|
+
}), l(this, g, "f").call(this, t.downloads)), s && i("span", {
|
|
119
|
+
part: "custom-meta-item custom-rating",
|
|
120
|
+
title: `${t.rating}`
|
|
121
|
+
}, i("ch-image", {
|
|
122
|
+
part: "custom-meta-icon custom-rating-icon",
|
|
123
|
+
src: M
|
|
124
|
+
}), t.rating))
|
|
125
|
+
} ]
|
|
126
|
+
},
|
|
127
|
+
"block-end": {
|
|
128
|
+
start: [ {
|
|
129
|
+
part: "custom-description custom-button custom-container custom-brand custom-footer custom-meta custom-meta-item custom-meta-icon custom-progress custom-progress-label custom-progress-bar item__block-end start",
|
|
130
|
+
jsx: () => i("div", {
|
|
131
|
+
part: "custom-container"
|
|
132
|
+
}, i("p", {
|
|
133
|
+
part: "custom-description",
|
|
134
|
+
title: t.description
|
|
135
|
+
}, t.description), i("div", {
|
|
136
|
+
part: "custom-footer"
|
|
137
|
+
}, i("small", {
|
|
138
|
+
part: "custom-brand"
|
|
139
|
+
}, t.publisher), t.installProgress ? i("div", {
|
|
140
|
+
part: "custom-progress"
|
|
141
|
+
}, i("span", {
|
|
142
|
+
part: "custom-progress-label"
|
|
143
|
+
}, t.installProgress.percent, "%"), i("gx-ide-progress-bar", {
|
|
144
|
+
part: "custom-progress-bar",
|
|
145
|
+
class: "plain",
|
|
146
|
+
minimal: true,
|
|
147
|
+
active: true,
|
|
148
|
+
stateType: "in-progress",
|
|
149
|
+
progress: t.installProgress.percent
|
|
150
|
+
})) : e ? i("button", {
|
|
151
|
+
class: "button",
|
|
152
|
+
part: "custom-button",
|
|
153
|
+
onClick: l(this, u, "f").call(this, t.id, t.action)
|
|
154
|
+
}, t.action) : null))
|
|
155
|
+
// {
|
|
156
|
+
// slot: "abcd"
|
|
157
|
+
// } as ActionListItemAdditionalSlot // slot not working
|
|
158
|
+
} ]
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
return r;
|
|
163
|
+
}));
|
|
164
|
+
// Builds the ch-action-list model from groups: one native action-list group
|
|
165
|
+
// per PluginGroupData, plus a separator between groups. The group header only
|
|
166
|
+
// renders a plain-text caption (no custom pill element is supported), so the
|
|
167
|
+
// per-group total is shown as a number appended to the caption.
|
|
168
|
+
b.set(this, (t => {
|
|
169
|
+
const e = [];
|
|
170
|
+
const i = {
|
|
171
|
+
type: "separator"
|
|
172
|
+
};
|
|
173
|
+
t === null || t === void 0 ? void 0 : t.forEach((t => {
|
|
174
|
+
var o, s, a;
|
|
175
|
+
// Skip empty groups so we don't render a header with "(0)".
|
|
176
|
+
if (!((o = t.plugins) === null || o === void 0 ? void 0 : o.length)) {
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
if (e.length > 0) {
|
|
180
|
+
e.push(i);
|
|
181
|
+
}
|
|
182
|
+
e.push({
|
|
183
|
+
id: t.id,
|
|
184
|
+
type: "group",
|
|
185
|
+
caption: `${t.caption} (${t.plugins.length})`,
|
|
186
|
+
expandable: (s = t.expandable) !== null && s !== void 0 ? s : true,
|
|
187
|
+
expanded: (a = t.expanded) !== null && a !== void 0 ? a : true,
|
|
188
|
+
items: t.plugins.map((t => l(this, f, "f").call(this, t)))
|
|
189
|
+
});
|
|
190
|
+
}));
|
|
191
|
+
return e;
|
|
192
|
+
}));
|
|
193
|
+
x.set(this, (async t => {
|
|
194
|
+
this.loading = true;
|
|
195
|
+
const e = t.detail;
|
|
196
|
+
this.plugins = await this.filterCallback(e);
|
|
197
|
+
}));
|
|
198
|
+
v.set(this, (() => {
|
|
199
|
+
const t = this.pluginsActionListModel.length;
|
|
200
|
+
return t ? i("ch-action-list-render", {
|
|
201
|
+
model: this.pluginsActionListModel,
|
|
202
|
+
class: "list-box",
|
|
203
|
+
selection: "single",
|
|
204
|
+
onSelectedItemsChange: l(this, y, "f")
|
|
205
|
+
}) : i("gx-ide-empty-state", {
|
|
206
|
+
isAnimated: l(this, d, "f"),
|
|
207
|
+
class: "recent-objects__empty-state",
|
|
208
|
+
stateIconSrc: z,
|
|
209
|
+
stateTitle: l(this, m, "f").emptyStateTitle,
|
|
210
|
+
stateDescription: l(this, m, "f").emptyStateDescription
|
|
211
|
+
});
|
|
212
|
+
}));
|
|
213
|
+
w.set(this, (() => {
|
|
214
|
+
p(this, d, true, "f");
|
|
215
|
+
return i("gx-ide-loader", {
|
|
216
|
+
loaderTitle: l(this, m, "f").loaderTitle,
|
|
217
|
+
description: l(this, m, "f").loaderDescription,
|
|
218
|
+
show: true
|
|
219
|
+
});
|
|
220
|
+
}));
|
|
221
|
+
y.set(this, (t => {
|
|
222
|
+
var e;
|
|
223
|
+
const i = (e = t.detail[0]) === null || e === void 0 ? void 0 : e.item.type;
|
|
224
|
+
if (i === "actionable") {
|
|
225
|
+
const e = t.detail[0].item.id;
|
|
226
|
+
this.showDetailsCallback(e);
|
|
227
|
+
}
|
|
228
|
+
}));
|
|
229
|
+
this.loading = true;
|
|
230
|
+
this.pluginsActionListModel = [];
|
|
231
|
+
this.plugins = undefined;
|
|
232
|
+
this.filterCallback = undefined;
|
|
233
|
+
this.showDetailsCallback = undefined;
|
|
234
|
+
this.executeActionCallback = undefined;
|
|
235
|
+
}
|
|
236
|
+
pluginsChangedHandler(t) {
|
|
237
|
+
this.pluginsActionListModel = l(this, b, "f").call(this, t);
|
|
238
|
+
this.loading = false;
|
|
239
|
+
}
|
|
240
|
+
async componentWillLoad() {
|
|
241
|
+
p(this, m, await r.getComponentStrings(this.el), "f");
|
|
242
|
+
this.pluginsChangedHandler(this.plugins);
|
|
243
|
+
}
|
|
244
|
+
render() {
|
|
245
|
+
return i(o, {
|
|
246
|
+
class: "widget"
|
|
247
|
+
}, i("ch-theme", {
|
|
248
|
+
model: k
|
|
249
|
+
}), i("div", {
|
|
250
|
+
class: "outer-container field-group"
|
|
251
|
+
}, i("ch-edit", {
|
|
252
|
+
id: "search-plugins-input",
|
|
253
|
+
class: "input",
|
|
254
|
+
accessibleName: l(this, m, "f").accessibleName,
|
|
255
|
+
placeholder: l(this, m, "f").searchInputPlaceholder,
|
|
256
|
+
debounce: n.inputDebounce,
|
|
257
|
+
onInput: l(this, x, "f"),
|
|
258
|
+
type: "search",
|
|
259
|
+
startImgSrc: j
|
|
260
|
+
}), i("div", {
|
|
261
|
+
class: "inner-container"
|
|
262
|
+
}, this.loading ? l(this, w, "f").call(this) : l(this, v, "f").call(this))));
|
|
263
|
+
}
|
|
264
|
+
static get assetsDirs() {
|
|
265
|
+
return [ "gx-ide-assets/plugin-explorer" ];
|
|
266
|
+
}
|
|
267
|
+
get el() {
|
|
268
|
+
return s(this);
|
|
269
|
+
}
|
|
270
|
+
static get watchers() {
|
|
271
|
+
return {
|
|
272
|
+
plugins: [ "pluginsChangedHandler" ]
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
m = new WeakMap, d = new WeakMap, u = new WeakMap, h = new WeakMap, g = new WeakMap,
|
|
278
|
+
f = new WeakMap, b = new WeakMap, x = new WeakMap, v = new WeakMap, w = new WeakMap,
|
|
279
|
+
y = new WeakMap;
|
|
280
|
+
|
|
281
|
+
W.style = c;
|
|
282
|
+
|
|
283
|
+
export { W as gx_ide_plugin_explorer };
|
|
284
|
+
//# sourceMappingURL=p-ef8663dd.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["pluginExplorerCss","FILTER_ICON","getIconPath","category","name","colorType","EXTENSION_ICON_IMG","getAssetPath","CSS_BUNDLES","SEARCH_ICON","STAR_ICON","DOWNLOAD_ICON","GxIdePluginManager","_GxIdePluginManager_componentLocale","set","this","_GxIdePluginManager_animateEmptyState","_GxIdePluginManager_actionListButtonClickHandler","pluginId","action","event","stopPropagation","executeActionCallback","_GxIdePluginManager_downloadsFormatter","Intl","NumberFormat","undefined","notation","maximumFractionDigits","_GxIdePluginManager_formatDownloads","value","numericValue","Number","isFinite","__classPrivateFieldGet","format","_GxIdePluginManager_mapPluginToItem","pluginData","hasActionButton","hasDownloads","downloads","hasRating","rating","hasMeta","pluginItem","id","caption","imgSrc","iconUrl","type","additionalInformation","center","part","jsx","h","src","alt","logotype","replace","loading","end","title","call","start","description","publisher","installProgress","percent","class","minimal","active","stateType","progress","onClick","_GxIdePluginManager_mapPluginGroupsToActionListModel","groups","model","separatorItem","forEach","group","_a","plugins","length","push","expandable","_b","expanded","_c","items","map","plugin","_GxIdePluginManager_pluginsFilterInputHandler","async","filterValue","detail","filterCallback","_GxIdePluginManager_evaluateContentToDisplay","pluginsToDisplay","pluginsActionListModel","selection","onSelectedItemsChange","_GxIdePluginManager_pluginSelectedHandler","isAnimated","stateIconSrc","stateTitle","emptyStateTitle","stateDescription","emptyStateDescription","_GxIdePluginManager_renderLoader","__classPrivateFieldSet","loaderTitle","loaderDescription","show","eventType","item","showDetailsCallback","pluginsChangedHandler","newPlugins","componentWillLoad","Locale","getComponentStrings","el","render","Host","accessibleName","placeholder","searchInputPlaceholder","debounce","config","inputDebounce","onInput","startImgSrc"],"sources":["src/components/plugin-explorer/plugin-explorer.scss?tag=gx-ide-plugin-explorer&encapsulation=shadow","src/components/plugin-explorer/plugin-explorer.tsx"],"sourcesContent":["@import \"../../global/gx-ide-mixins.scss\";\n\n:host {\n display: grid;\n block-size: 100%;\n position: relative;\n}\n\n.outer-container {\n grid-template-rows: max-content 1fr;\n}\n.inner-container {\n position: relative;\n}\n\n.list-box::part(item) {\n width: 100%;\n min-width: 100%;\n}\n.list-box::part(item__action) {\n gap: var(--spacing-gap-xs);\n}\n.list-box::part(item__caption) {\n font-weight: var(--font-style-semi-bold);\n color: var(--color-text-neutral-default);\n @include ellipsis();\n}\n\n// Caption row: name (flexible) + metadata pinned to the end\n.list-box::part(item__inline-caption) {\n grid-template-columns: minmax(0, 1fr) max-content;\n align-items: center;\n gap: var(--spacing-gap-m);\n width: 100%;\n min-width: 100%;\n}\n\n// Group header: Mercury defaults it to body-m (14px), which reads too large\n// next to the 12px item text. Keep it compact so it looks like a section label.\n// The `:host` prefix raises specificity over Mercury's themed ::part rule\n// (same-specificity ::part rules from the adopted theme would otherwise win).\n:host .list-box::part(group__action),\n:host .list-box::part(group__caption) {\n font-size: var(--font-size-body-s);\n // The expand/collapse chevron is sized by these chameleon vars (Mercury sets\n // them to --icon-s = 14px). Match the 12px header so it doesn't look oversized.\n --ch-action-list-group__expandable-button-size: var(--icon-xs);\n --ch-action-list-group__expandable-button-image-size: var(--icon-xs);\n}\n\n// Plugin logo\n.list-box::part(custom-image) {\n block-size: 40px;\n inline-size: 40px;\n border-radius: var(--border-radius-m);\n object-fit: cover;\n margin-inline-end: 12px;\n}\n\n// Metadata (downloads + rating), aligned with the name\n.list-box::part(custom-meta) {\n display: flex;\n align-items: center;\n gap: var(--spacing-gap-m);\n}\n.list-box::part(custom-meta-item) {\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-gap-xs);\n font-size: var(--font-size-body-s);\n // Same emphasis as the title. Applied via `color` (not opacity) so the meta\n // icons keep their own color (e.g. the rating star).\n color: var(--color-text-neutral-default);\n white-space: nowrap;\n}\n.list-box::part(custom-meta-icon) {\n --ch-image-size: 14px;\n}\n\n// Content block (description + footer)\n.list-box::part(custom-container) {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-gap-xs);\n width: 100%;\n}\n.list-box::part(item__block-end start) {\n width: 100%;\n min-width: 100%;\n}\n// Description — second level: lighter than the title.\n.list-box::part(custom-description) {\n font-size: var(--font-size-body-s);\n margin: 0;\n color: var(--color-text-neutral-neutral);\n line-height: var(--line-height-relaxed);\n margin-inline-end: 8px;\n @include ellipsis();\n}\n\n// Footer row: publisher + action button.\n// Pin the row height to the standard control height so swapping the action\n// button for the install progress bar doesn't shift the layout.\n.list-box::part(custom-footer) {\n display: flex;\n align-items: center;\n gap: var(--spacing-gap-m);\n width: 100%;\n margin-block-start: 2px;\n min-block-size: var(--control-block-size);\n}\n// Publisher — the least prominent line in the hierarchy: regular weight and\n// the most muted of the three text levels (below title and description).\n.list-box::part(custom-brand) {\n font-weight: var(--font-style-regular);\n font-size: var(--font-size-body-s);\n color: var(--color-text-neutral-disabled);\n @include ellipsis();\n}\n.list-box::part(custom-button) {\n // WA: Style the button like a Mercury primary button\n // \"Slot\" not working apparently.\n --button-color: var(--color-text-primary-default);\n margin-inline-start: auto;\n display: inline-grid;\n grid-auto-flow: column;\n grid-auto-columns: max-content;\n justify-content: center;\n padding-block: var(--control-padding-block);\n padding-inline: var(--control-padding-inline);\n box-sizing: border-box;\n color: var(--button-color);\n // Match the surrounding text size so the action doesn't look oversized.\n font-size: var(--font-size-body-s);\n font-weight: var(--font-style-semi-bold);\n text-transform: capitalize;\n}\n.list-box::part(custom-button):hover {\n --button-color: var(--color-text-primary-hover);\n}\n.list-box::part(custom-button):active {\n --button-color: var(--color-text-primary-pressed);\n}\n\n// The install progress is the shared gx-ide-progress-bar, rendered inside the\n// ch-action-list shadow tree via the item's jsx callback, so it must be sized\n// through ::part (like the other custom-* elements), not with plain selectors.\n// A percent label sits inline with the bar so the progress reads as part of\n// the row instead of a detached bar.\n.list-box::part(custom-progress) {\n display: flex;\n align-items: center;\n gap: var(--spacing-gap-xs);\n margin-inline-start: auto;\n inline-size: 140px;\n}\n.list-box::part(custom-progress-label) {\n font-size: var(--font-size-caption-s);\n line-height: 1;\n color: var(--color-text-neutral-neutral);\n white-space: nowrap;\n}\n.list-box::part(custom-progress-bar) {\n flex: 1;\n}\n","import {\n Component,\n Host,\n Prop,\n State,\n Element,\n h,\n Watch,\n getAssetPath\n} from \"@stencil/core\";\n\nimport { getIconPath, MercuryBundles } from \"@genexus/mercury\";\nimport { Locale } from \"../../common/locale\";\nimport { config } from \"../../common/config\";\n\nimport { ActionListModel } from \"@genexus/chameleon-controls-library\";\nimport {\n ActionListItemActionable,\n ActionListItemGroup,\n ActionListItemModelExtended,\n ActionListItemSeparator\n} from \"@genexus/chameleon-controls-library/dist/types/components/action-list/types\";\n\nconst FILTER_ICON = getIconPath({\n category: \"system\",\n name: \"filters\",\n colorType: \"on-surface\"\n});\n\n// plugin icon if no iconUrl was provided\nconst EXTENSION_ICON_IMG = getAssetPath(\n `./gx-ide-assets/plugin-explorer/images/plugin-icon.svg`\n);\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/list-box\",\n \"components/button\",\n \"components/edit\",\n \"utils/form\",\n \"utils/layout\",\n \"utils/typography\",\n \"utils/spacing\",\n \"chameleon/scrollbar\"\n];\n\nconst SEARCH_ICON = getIconPath({\n category: \"system\",\n name: \"search\",\n colorType: \"on-surface\"\n});\n\nconst STAR_ICON = getIconPath({\n category: \"system\",\n name: \"star-fill\",\n colorType: \"warning\"\n});\n\nconst DOWNLOAD_ICON = getIconPath({\n category: \"system\",\n name: \"download\",\n colorType: \"on-surface\"\n});\n\n@Component({\n tag: \"gx-ide-plugin-explorer\",\n styleUrl: \"plugin-explorer.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/plugin-explorer\"]\n})\nexport class GxIdePluginManager {\n /**\n * The component hard-coded strings translations.\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #componentLocale: any;\n #animateEmptyState: boolean = false;\n\n @Element() el: HTMLGxIdePluginExplorerElement;\n\n /**\n * If true it will hide the content, and display a loader\n */\n @State() loading: boolean = true;\n\n /**\n * The plugins model as ActionListModel, which is the model the ch-action-list expects\n */\n @State() pluginsActionListModel: ActionListModel = [];\n\n /**\n * List of plugin groups to display. Each group is rendered as a native\n * action-list group (with a separator between groups) and its header caption\n * includes the total number of plugins in the group.\n * Usually used to initialize the component.\n */\n @Prop({ mutable: true }) plugins: PluginGroupData[];\n @Watch(\"plugins\")\n pluginsChangedHandler(newPlugins: PluginGroupData[]) {\n this.pluginsActionListModel =\n this.#mapPluginGroupsToActionListModel(newPlugins);\n this.loading = false;\n }\n\n /**\n * Callback that should be invoked when the user updates the filter.\n * A debounce should be applied before invoking this function.\n */\n @Prop() readonly filterCallback!: (\n text: string\n ) => Promise<PluginGroupData[]>;\n\n /**\n * Callback that should be invoked when the user clicks or presses Enter\n * on a selected plugin item.\n */\n @Prop() readonly showDetailsCallback!: (pluginId: string) => Promise<void>;\n\n /**\n * Callback that should be invoked when the user clicks on a plugin's action button.\n */\n @Prop() readonly executeActionCallback!: (\n pluginId: string,\n action: PluginAction\n ) => Promise<void>;\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n this.pluginsChangedHandler(this.plugins);\n }\n\n #actionListButtonClickHandler =\n (pluginId: string, action: PluginAction) => (event: MouseEvent) => {\n event.stopPropagation();\n this.executeActionCallback(pluginId, action);\n };\n\n // Formats a raw downloads count into a compact string (e.g. 4000 -> \"4K\").\n #downloadsFormatter = new Intl.NumberFormat(undefined, {\n notation: \"compact\",\n maximumFractionDigits: 1\n });\n\n #formatDownloads = (value: number): string => {\n const numericValue = typeof value === \"number\" ? value : Number(value);\n return Number.isFinite(numericValue)\n ? this.#downloadsFormatter.format(numericValue)\n : `${value}`;\n };\n\n #mapPluginToItem = (pluginData: PluginData): ActionListItemActionable => {\n const hasActionButton = !!pluginData.action;\n const hasDownloads =\n pluginData.downloads !== undefined && pluginData.downloads !== null;\n const hasRating =\n pluginData.rating !== undefined && pluginData.rating !== null;\n const hasMeta = hasDownloads || hasRating;\n\n const pluginItem = {\n id: pluginData.id,\n caption: pluginData.name,\n imgSrc: pluginData.iconUrl,\n type: \"actionable\",\n\n additionalInformation: {\n \"stretch-start\": {\n center: [\n {\n part: \"custom-image\",\n jsx: () => (\n <img\n part=\"custom-image\"\n src={pluginData.iconUrl || EXTENSION_ICON_IMG}\n alt={`${this.#componentLocale.logotype.replace(\n \"PLUGIN_NAME_PLACEHOLDER\",\n pluginData.name\n )}`}\n loading=\"lazy\"\n />\n )\n }\n ]\n },\n \"inline-caption\": hasMeta && {\n end: [\n {\n part: \"custom-meta\",\n jsx: () => (\n <div part=\"custom-meta\">\n {hasDownloads && (\n <span\n part=\"custom-meta-item custom-downloads\"\n title={`${pluginData.downloads}`}\n >\n <ch-image\n part=\"custom-meta-icon custom-downloads-icon\"\n src={DOWNLOAD_ICON}\n ></ch-image>\n {this.#formatDownloads(pluginData.downloads)}\n </span>\n )}\n {hasRating && (\n <span\n part=\"custom-meta-item custom-rating\"\n title={`${pluginData.rating}`}\n >\n <ch-image\n part=\"custom-meta-icon custom-rating-icon\"\n src={STAR_ICON}\n ></ch-image>\n {pluginData.rating}\n </span>\n )}\n </div>\n )\n }\n ]\n },\n \"block-end\": {\n start: [\n {\n part: \"custom-description custom-button custom-container custom-brand custom-footer custom-meta custom-meta-item custom-meta-icon custom-progress custom-progress-label custom-progress-bar item__block-end start\",\n jsx: () => (\n <div part=\"custom-container\">\n <p part=\"custom-description\" title={pluginData.description}>\n {pluginData.description}\n </p>\n <div part=\"custom-footer\">\n <small part=\"custom-brand\">{pluginData.publisher}</small>\n {pluginData.installProgress ? (\n <div part=\"custom-progress\">\n <span part=\"custom-progress-label\">\n {pluginData.installProgress.percent}%\n </span>\n <gx-ide-progress-bar\n part=\"custom-progress-bar\"\n class=\"plain\"\n minimal\n active\n stateType=\"in-progress\"\n progress={pluginData.installProgress.percent}\n ></gx-ide-progress-bar>\n </div>\n ) : hasActionButton ? (\n <button\n class=\"button\"\n part=\"custom-button\"\n onClick={this.#actionListButtonClickHandler(\n pluginData.id,\n pluginData.action\n )}\n >\n {pluginData.action}\n </button>\n ) : null}\n </div>\n </div>\n )\n }\n // {\n // slot: \"abcd\"\n // } as ActionListItemAdditionalSlot // slot not working\n ]\n }\n }\n } as ActionListItemActionable;\n\n return pluginItem;\n };\n\n // Builds the ch-action-list model from groups: one native action-list group\n // per PluginGroupData, plus a separator between groups. The group header only\n // renders a plain-text caption (no custom pill element is supported), so the\n // per-group total is shown as a number appended to the caption.\n #mapPluginGroupsToActionListModel = (\n groups: PluginGroupData[]\n ): ActionListModel => {\n const model: ActionListModel = [];\n const separatorItem: ActionListItemSeparator = { type: \"separator\" };\n\n groups?.forEach(group => {\n // Skip empty groups so we don't render a header with \"(0)\".\n if (!group.plugins?.length) {\n return;\n }\n if (model.length > 0) {\n model.push(separatorItem);\n }\n model.push({\n id: group.id,\n type: \"group\",\n caption: `${group.caption} (${group.plugins.length})`,\n expandable: group.expandable ?? true,\n expanded: group.expanded ?? true,\n items: group.plugins.map(plugin => this.#mapPluginToItem(plugin))\n } as ActionListItemGroup);\n });\n\n return model;\n };\n\n #pluginsFilterInputHandler = async (\n event: CustomEvent<string> | InputEvent\n ) => {\n this.loading = true;\n const filterValue = event.detail as string;\n this.plugins = await this.filterCallback(filterValue);\n };\n\n #evaluateContentToDisplay = () => {\n const pluginsToDisplay = this.pluginsActionListModel.length;\n return pluginsToDisplay ? (\n <ch-action-list-render\n model={this.pluginsActionListModel}\n class=\"list-box\"\n selection=\"single\"\n onSelectedItemsChange={this.#pluginSelectedHandler}\n >\n {/* <p slot=\"abcd\">Slot for \"abcd\" id</p> */}\n </ch-action-list-render>\n ) : (\n <gx-ide-empty-state\n isAnimated={this.#animateEmptyState}\n class=\"recent-objects__empty-state\"\n stateIconSrc={FILTER_ICON}\n stateTitle={this.#componentLocale.emptyStateTitle}\n stateDescription={this.#componentLocale.emptyStateDescription}\n ></gx-ide-empty-state>\n );\n };\n\n #renderLoader = () => {\n this.#animateEmptyState = true;\n return (\n <gx-ide-loader\n loaderTitle={this.#componentLocale.loaderTitle}\n description={this.#componentLocale.loaderDescription}\n show\n ></gx-ide-loader>\n );\n };\n\n #pluginSelectedHandler = (\n event: CustomEvent<ActionListItemModelExtended[]>\n ) => {\n const eventType = event.detail[0]?.item.type;\n if (eventType === \"actionable\") {\n const pluginId = event.detail[0].item.id;\n this.showDetailsCallback(pluginId);\n }\n };\n\n render() {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n\n <div class=\"outer-container field-group\">\n <ch-edit\n id=\"search-plugins-input\"\n class=\"input\"\n accessibleName={this.#componentLocale.accessibleName}\n placeholder={this.#componentLocale.searchInputPlaceholder}\n debounce={config.inputDebounce}\n onInput={this.#pluginsFilterInputHandler}\n type=\"search\"\n startImgSrc={SEARCH_ICON}\n ></ch-edit>\n <div class=\"inner-container\">\n {this.loading\n ? this.#renderLoader()\n : this.#evaluateContentToDisplay()}\n </div>\n </div>\n </Host>\n );\n }\n}\n\nexport type PluginGroupData = {\n id: string;\n /**\n * Group header text. The total number of plugins in the group is appended\n * automatically, e.g. \"Installed (12)\".\n */\n caption: string;\n /**\n * Whether the group can be collapsed/expanded. Defaults to `true`.\n */\n expandable?: boolean;\n /**\n * Whether the group starts expanded. Defaults to `true`.\n */\n expanded?: boolean;\n plugins: PluginData[];\n};\n\nexport type PluginData = {\n id: string;\n iconUrl: string;\n name: string;\n description: string;\n publisher: string;\n action?: PluginAction;\n downloads?: number;\n rating?: string | number;\n // When set, the card shows a determinate progress bar instead of the action button.\n installProgress?: PluginInstallProgress;\n};\n\nexport type PluginInstallProgress = {\n phase: \"download\" | \"install\";\n percent: number;\n};\n\nexport type PluginAction = \"install\" | \"update\";\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,MAAMA,IAAoB;;;;;;;;;;;;;;;;;ACuB1B,MAAMC,IAAcC,EAAY;EAC9BC,UAAU;EACVC,MAAM;EACNC,WAAW;;;yCAIb;MAAMC,IAAqBC,EACzB;;AAGF,MAAMC,IAA8B,EAClC,qBACA,uBACA,qBACA,mBACA,cACA,gBACA,oBACA,iBACA;;AAGF,MAAMC,IAAcP,EAAY;EAC9BC,UAAU;EACVC,MAAM;EACNC,WAAW;;;AAGb,MAAMK,IAAYR,EAAY;EAC5BC,UAAU;EACVC,MAAM;EACNC,WAAW;;;AAGb,MAAMM,IAAgBT,EAAY;EAChCC,UAAU;EACVC,MAAM;EACNC,WAAW;;;MASAO,IAAkB;;;;;;;QAK7BC,EAAAC,IAAAC,WAAA;IACAC,EAAAF,IAAAC,MAA8B;IAuD9BE,EAAAH,IAAAC,OACE,CAACG,GAAkBC,MAA0BC;MAC3CA,EAAMC;MACNN,KAAKO,sBAAsBJ,GAAUC;AAAO;;QAIhDI,EAAAT,IAAAC,MAAsB,IAAIS,KAAKC,aAAaC,WAAW;MACrDC,UAAU;MACVC,uBAAuB;;IAGzBC,EAAAf,IAAAC,OAAoBe;MAClB,MAAMC,WAAsBD,MAAU,WAAWA,IAAQE,OAAOF;MAChE,OAAOE,OAAOC,SAASF,KACnBG,EAAAnB,MAAIQ,GAAA,KAAqBY,OAAOJ,KAChC,GAAGD;AAAO;IAGhBM,EAAAtB,IAAAC,OAAoBsB;MAClB,MAAMC,MAAoBD,EAAWlB;MACrC,MAAMoB,IACJF,EAAWG,cAAcd,aAAaW,EAAWG,cAAc;MACjE,MAAMC,IACJJ,EAAWK,WAAWhB,aAAaW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AAAnB,MAAIiF,GAAA,KAA0BlC,KAA9B/C"}
|
|
@@ -10,9 +10,19 @@ export declare class GxIdePluginDetails {
|
|
|
10
10
|
readonly data: PluginDetailsData;
|
|
11
11
|
/**
|
|
12
12
|
* Callback that should be invoked when the user performs the install or update action.
|
|
13
|
-
* Receives
|
|
13
|
+
* Receives the ordinal versionId of the selected version (undefined installs the latest).
|
|
14
14
|
*/
|
|
15
|
-
readonly installCallback: (
|
|
15
|
+
readonly installCallback: (versionId?: number) => Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* When set, the component is installing this plugin and shows a determinate progress bar
|
|
18
|
+
* instead of the action button.
|
|
19
|
+
*/
|
|
20
|
+
readonly installProgress?: PluginInstallProgress;
|
|
21
|
+
/**
|
|
22
|
+
* Callback that should be invoked when the user cancels an in-progress
|
|
23
|
+
* install/update from the progress bar.
|
|
24
|
+
*/
|
|
25
|
+
readonly cancelCallback: () => Promise<void>;
|
|
16
26
|
/**
|
|
17
27
|
* Callback that should be invoked when the user attempts to open any link displayed in this component.
|
|
18
28
|
*/
|
|
@@ -42,13 +52,21 @@ export type DocSectionData = {
|
|
|
42
52
|
name: string;
|
|
43
53
|
content: string;
|
|
44
54
|
};
|
|
55
|
+
export type PluginVersionOption = {
|
|
56
|
+
version: string;
|
|
57
|
+
versionId: number;
|
|
58
|
+
};
|
|
59
|
+
export type PluginInstallProgress = {
|
|
60
|
+
phase: "download" | "install";
|
|
61
|
+
percent: number;
|
|
62
|
+
};
|
|
45
63
|
export type PluginDetailsData = {
|
|
46
64
|
id: string;
|
|
47
65
|
name: string | LinkData;
|
|
48
66
|
publisher: string | LinkData;
|
|
49
67
|
installed: boolean;
|
|
50
68
|
updateVersion?: string;
|
|
51
|
-
versions:
|
|
69
|
+
versions: PluginVersionOption[];
|
|
52
70
|
iconUrl: string;
|
|
53
71
|
description: string;
|
|
54
72
|
docSections: DocSectionData[];
|
|
@@ -11,15 +11,18 @@ export declare class GxIdePluginManager {
|
|
|
11
11
|
*/
|
|
12
12
|
pluginsActionListModel: ActionListModel;
|
|
13
13
|
/**
|
|
14
|
-
* List of
|
|
14
|
+
* List of plugin groups to display. Each group is rendered as a native
|
|
15
|
+
* action-list group (with a separator between groups) and its header caption
|
|
16
|
+
* includes the total number of plugins in the group.
|
|
17
|
+
* Usually used to initialize the component.
|
|
15
18
|
*/
|
|
16
|
-
plugins:
|
|
17
|
-
pluginsChangedHandler(newPlugins:
|
|
19
|
+
plugins: PluginGroupData[];
|
|
20
|
+
pluginsChangedHandler(newPlugins: PluginGroupData[]): void;
|
|
18
21
|
/**
|
|
19
22
|
* Callback that should be invoked when the user updates the filter.
|
|
20
23
|
* A debounce should be applied before invoking this function.
|
|
21
24
|
*/
|
|
22
|
-
readonly filterCallback: (text: string) => Promise<
|
|
25
|
+
readonly filterCallback: (text: string) => Promise<PluginGroupData[]>;
|
|
23
26
|
/**
|
|
24
27
|
* Callback that should be invoked when the user clicks or presses Enter
|
|
25
28
|
* on a selected plugin item.
|
|
@@ -32,6 +35,23 @@ export declare class GxIdePluginManager {
|
|
|
32
35
|
componentWillLoad(): Promise<void>;
|
|
33
36
|
render(): any;
|
|
34
37
|
}
|
|
38
|
+
export type PluginGroupData = {
|
|
39
|
+
id: string;
|
|
40
|
+
/**
|
|
41
|
+
* Group header text. The total number of plugins in the group is appended
|
|
42
|
+
* automatically, e.g. "Installed (12)".
|
|
43
|
+
*/
|
|
44
|
+
caption: string;
|
|
45
|
+
/**
|
|
46
|
+
* Whether the group can be collapsed/expanded. Defaults to `true`.
|
|
47
|
+
*/
|
|
48
|
+
expandable?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Whether the group starts expanded. Defaults to `true`.
|
|
51
|
+
*/
|
|
52
|
+
expanded?: boolean;
|
|
53
|
+
plugins: PluginData[];
|
|
54
|
+
};
|
|
35
55
|
export type PluginData = {
|
|
36
56
|
id: string;
|
|
37
57
|
iconUrl: string;
|
|
@@ -39,5 +59,12 @@ export type PluginData = {
|
|
|
39
59
|
description: string;
|
|
40
60
|
publisher: string;
|
|
41
61
|
action?: PluginAction;
|
|
62
|
+
downloads?: number;
|
|
63
|
+
rating?: string | number;
|
|
64
|
+
installProgress?: PluginInstallProgress;
|
|
65
|
+
};
|
|
66
|
+
export type PluginInstallProgress = {
|
|
67
|
+
phase: "download" | "install";
|
|
68
|
+
percent: number;
|
|
42
69
|
};
|
|
43
70
|
export type PluginAction = "install" | "update";
|
|
@@ -56,8 +56,8 @@ import { CancelCallback as CancelCallback15, CreateCallback as CreateCallback2,
|
|
|
56
56
|
import { NewVersionData } from "./components/new-version/new-version";
|
|
57
57
|
import { CancelCallback as CancelCallback16, LoadCallback as LoadCallback2, NewObjectCallback, OpenSelectionCallback, SelectModuleCallback as SelectModuleCallback4 } from "./components/object-selector/object-selector";
|
|
58
58
|
import { CancelCallback as CancelCallback17, ImportCallback as ImportCallback1, LoadCallback as LoadCallback3, SelectParentCallback } from "./components/open-api-import/open-api-import";
|
|
59
|
-
import { PluginDetailsData } from "./components/plugin-details/plugin-details";
|
|
60
|
-
import { PluginAction,
|
|
59
|
+
import { PluginDetailsData, PluginInstallProgress } from "./components/plugin-details/plugin-details";
|
|
60
|
+
import { PluginAction, PluginGroupData } from "./components/plugin-explorer/plugin-explorer";
|
|
61
61
|
import { TopStateBarType } from "./components/_helpers/progress-bar/progress-bar";
|
|
62
62
|
import { LoadReferencesCallback, ObjectData as ObjectData1, OpenObjectCallback, OpenSelectorDialogCallback, SelectorSourceCallback, SelectReferenceCallback } from "./components/references/references";
|
|
63
63
|
import { RestoreVersionData } from "./components/restore-version/restore-version";
|
|
@@ -136,8 +136,8 @@ export { CancelCallback as CancelCallback15, CreateCallback as CreateCallback2,
|
|
|
136
136
|
export { NewVersionData } from "./components/new-version/new-version";
|
|
137
137
|
export { CancelCallback as CancelCallback16, LoadCallback as LoadCallback2, NewObjectCallback, OpenSelectionCallback, SelectModuleCallback as SelectModuleCallback4 } from "./components/object-selector/object-selector";
|
|
138
138
|
export { CancelCallback as CancelCallback17, ImportCallback as ImportCallback1, LoadCallback as LoadCallback3, SelectParentCallback } from "./components/open-api-import/open-api-import";
|
|
139
|
-
export { PluginDetailsData } from "./components/plugin-details/plugin-details";
|
|
140
|
-
export { PluginAction,
|
|
139
|
+
export { PluginDetailsData, PluginInstallProgress } from "./components/plugin-details/plugin-details";
|
|
140
|
+
export { PluginAction, PluginGroupData } from "./components/plugin-explorer/plugin-explorer";
|
|
141
141
|
export { TopStateBarType } from "./components/_helpers/progress-bar/progress-bar";
|
|
142
142
|
export { LoadReferencesCallback, ObjectData as ObjectData1, OpenObjectCallback, OpenSelectorDialogCallback, SelectorSourceCallback, SelectReferenceCallback } from "./components/references/references";
|
|
143
143
|
export { RestoreVersionData } from "./components/restore-version/restore-version";
|
|
@@ -1975,14 +1975,22 @@ export namespace Components {
|
|
|
1975
1975
|
"suspendShortcuts": (suspendShortcuts: boolean) => Promise<void>;
|
|
1976
1976
|
}
|
|
1977
1977
|
interface GxIdePluginDetails {
|
|
1978
|
+
/**
|
|
1979
|
+
* Callback that should be invoked when the user cancels an in-progress install/update from the progress bar.
|
|
1980
|
+
*/
|
|
1981
|
+
"cancelCallback": () => Promise<void>;
|
|
1978
1982
|
/**
|
|
1979
1983
|
* Specifies all the information related to a plugin.
|
|
1980
1984
|
*/
|
|
1981
1985
|
"data": PluginDetailsData;
|
|
1982
1986
|
/**
|
|
1983
|
-
* Callback that should be invoked when the user performs the install or update action. Receives
|
|
1987
|
+
* Callback that should be invoked when the user performs the install or update action. Receives the ordinal versionId of the selected version (undefined installs the latest).
|
|
1988
|
+
*/
|
|
1989
|
+
"installCallback": (versionId?: number) => Promise<void>;
|
|
1990
|
+
/**
|
|
1991
|
+
* When set, the component is installing this plugin and shows a determinate progress bar instead of the action button.
|
|
1984
1992
|
*/
|
|
1985
|
-
"
|
|
1993
|
+
"installProgress"?: PluginInstallProgress;
|
|
1986
1994
|
/**
|
|
1987
1995
|
* Callback that should be invoked when the user attempts to open any link displayed in this component.
|
|
1988
1996
|
*/
|
|
@@ -2003,11 +2011,13 @@ export namespace Components {
|
|
|
2003
2011
|
/**
|
|
2004
2012
|
* Callback that should be invoked when the user updates the filter. A debounce should be applied before invoking this function.
|
|
2005
2013
|
*/
|
|
2006
|
-
"filterCallback": (
|
|
2014
|
+
"filterCallback": (
|
|
2015
|
+
text: string
|
|
2016
|
+
) => Promise<PluginGroupData[]>;
|
|
2007
2017
|
/**
|
|
2008
|
-
* List of
|
|
2018
|
+
* List of plugin groups to display. Each group is rendered as a native action-list group (with a separator between groups) and its header caption includes the total number of plugins in the group. Usually used to initialize the component.
|
|
2009
2019
|
*/
|
|
2010
|
-
"plugins":
|
|
2020
|
+
"plugins": PluginGroupData[];
|
|
2011
2021
|
/**
|
|
2012
2022
|
* Callback that should be invoked when the user clicks or presses Enter on a selected plugin item.
|
|
2013
2023
|
*/
|
|
@@ -5983,14 +5993,22 @@ declare namespace LocalJSX {
|
|
|
5983
5993
|
"selectParentCallback"?: SelectParentCallback;
|
|
5984
5994
|
}
|
|
5985
5995
|
interface GxIdePluginDetails {
|
|
5996
|
+
/**
|
|
5997
|
+
* Callback that should be invoked when the user cancels an in-progress install/update from the progress bar.
|
|
5998
|
+
*/
|
|
5999
|
+
"cancelCallback": () => Promise<void>;
|
|
5986
6000
|
/**
|
|
5987
6001
|
* Specifies all the information related to a plugin.
|
|
5988
6002
|
*/
|
|
5989
6003
|
"data": PluginDetailsData;
|
|
5990
6004
|
/**
|
|
5991
|
-
* Callback that should be invoked when the user performs the install or update action. Receives
|
|
6005
|
+
* Callback that should be invoked when the user performs the install or update action. Receives the ordinal versionId of the selected version (undefined installs the latest).
|
|
6006
|
+
*/
|
|
6007
|
+
"installCallback": (versionId?: number) => Promise<void>;
|
|
6008
|
+
/**
|
|
6009
|
+
* When set, the component is installing this plugin and shows a determinate progress bar instead of the action button.
|
|
5992
6010
|
*/
|
|
5993
|
-
"
|
|
6011
|
+
"installProgress"?: PluginInstallProgress;
|
|
5994
6012
|
/**
|
|
5995
6013
|
* Callback that should be invoked when the user attempts to open any link displayed in this component.
|
|
5996
6014
|
*/
|
|
@@ -6011,11 +6029,13 @@ declare namespace LocalJSX {
|
|
|
6011
6029
|
/**
|
|
6012
6030
|
* Callback that should be invoked when the user updates the filter. A debounce should be applied before invoking this function.
|
|
6013
6031
|
*/
|
|
6014
|
-
"filterCallback": (
|
|
6032
|
+
"filterCallback": (
|
|
6033
|
+
text: string
|
|
6034
|
+
) => Promise<PluginGroupData[]>;
|
|
6015
6035
|
/**
|
|
6016
|
-
* List of
|
|
6036
|
+
* List of plugin groups to display. Each group is rendered as a native action-list group (with a separator between groups) and its header caption includes the total number of plugins in the group. Usually used to initialize the component.
|
|
6017
6037
|
*/
|
|
6018
|
-
"plugins"?:
|
|
6038
|
+
"plugins"?: PluginGroupData[];
|
|
6019
6039
|
/**
|
|
6020
6040
|
* Callback that should be invoked when the user clicks or presses Enter on a selected plugin item.
|
|
6021
6041
|
*/
|