@genexus/genexus-ide-ui 1.0.21 → 1.0.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-ai-message.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-dashboard-home.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-kb-manager-import.cjs.entry.js +336 -419
- package/dist/cjs/gx-ide-kb-manager-import.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-new-environment.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-new-kb.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-object-selector.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-team-dev-commit.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-team-dev-update.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-ww-images.cjs.entry.js +1 -1
- package/dist/cjs/{helpers-b5b4a659.js → helpers-75a5c5cc.js} +1 -16
- package/dist/cjs/helpers-75a5c5cc.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/kb-manager-import/gx-ide-assets/kb-manager-import/langs/kb-manager-import.lang.en.json +2 -1
- package/dist/collection/components/kb-manager-import/gx-ide-assets/kb-manager-import/langs/kb-manager-import.lang.ja.json +2 -1
- package/dist/collection/components/kb-manager-import/helpers.js +62 -88
- package/dist/collection/components/kb-manager-import/helpers.js.map +1 -1
- package/dist/collection/components/kb-manager-import/kb-manager-import.css +38 -1804
- package/dist/collection/components/kb-manager-import/kb-manager-import.js +347 -441
- package/dist/collection/components/kb-manager-import/kb-manager-import.js.map +1 -1
- package/dist/components/gx-ide-kb-manager-import.js +362 -450
- package/dist/components/gx-ide-kb-manager-import.js.map +1 -1
- package/dist/components/gx-ide-ww-images.js +1 -1
- package/dist/components/helpers.js +1 -15
- package/dist/components/helpers.js.map +1 -1
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-ai-message.entry.js +1 -1
- package/dist/esm/gx-ide-dashboard-home.entry.js +1 -1
- package/dist/esm/gx-ide-kb-manager-import.entry.js +336 -419
- package/dist/esm/gx-ide-kb-manager-import.entry.js.map +1 -1
- package/dist/esm/gx-ide-new-environment.entry.js +1 -1
- package/dist/esm/gx-ide-new-kb.entry.js +1 -1
- package/dist/esm/gx-ide-object-selector.entry.js +1 -1
- package/dist/esm/gx-ide-team-dev-commit.entry.js +1 -1
- package/dist/esm/gx-ide-team-dev-update.entry.js +1 -1
- package/dist/esm/gx-ide-ww-images.entry.js +1 -1
- package/dist/esm/{helpers-64e1dd0b.js → helpers-a933d577.js} +2 -16
- package/dist/esm/helpers-a933d577.js.map +1 -0
- 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/kb-manager-import/langs/kb-manager-import.lang.en.json +2 -1
- package/dist/genexus-ide-ui/gx-ide-assets/kb-manager-import/langs/kb-manager-import.lang.ja.json +2 -1
- package/dist/genexus-ide-ui/{p-c339f703.js → p-014916d7.js} +34 -48
- package/dist/genexus-ide-ui/p-014916d7.js.map +1 -0
- package/dist/genexus-ide-ui/{p-39792ac8.entry.js → p-2dcce235.entry.js} +2 -2
- package/dist/genexus-ide-ui/p-336c340f.entry.js +607 -0
- package/dist/genexus-ide-ui/p-336c340f.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-4a0dab98.entry.js → p-3adbc04c.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-f1558097.entry.js → p-3d5fea0a.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-ac670f62.entry.js → p-5dfb7c66.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-62f4ad99.entry.js → p-734bc4e1.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-e8975ac0.entry.js → p-79f63922.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-4ce47bcd.entry.js → p-96b4f74b.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-6abe5291.entry.js → p-d06d21d2.entry.js} +2 -2
- package/dist/types/components/kb-manager-import/helpers.d.ts +5 -9
- package/dist/types/components/kb-manager-import/kb-manager-import.d.ts +49 -84
- package/dist/types/components.d.ts +22 -40
- package/package.json +5 -5
- package/dist/cjs/helpers-b5b4a659.js.map +0 -1
- package/dist/esm/helpers-64e1dd0b.js.map +0 -1
- package/dist/genexus-ide-ui/p-c339f703.js.map +0 -1
- package/dist/genexus-ide-ui/p-ca8b0024.entry.js +0 -683
- package/dist/genexus-ide-ui/p-ca8b0024.entry.js.map +0 -1
- /package/dist/genexus-ide-ui/{p-39792ac8.entry.js.map → p-2dcce235.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-4a0dab98.entry.js.map → p-3adbc04c.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-f1558097.entry.js.map → p-3d5fea0a.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-ac670f62.entry.js.map → p-5dfb7c66.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-62f4ad99.entry.js.map → p-734bc4e1.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-e8975ac0.entry.js.map → p-79f63922.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-4ce47bcd.entry.js.map → p-96b4f74b.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-6abe5291.entry.js.map → p-d06d21d2.entry.js.map} +0 -0
|
@@ -0,0 +1,607 @@
|
|
|
1
|
+
import { r as t, c as e, h as i, H as s, g as n } from "./p-aaed592c.js";
|
|
2
|
+
|
|
3
|
+
import { g as a } from "./p-0b0ce806.js";
|
|
4
|
+
|
|
5
|
+
import { L as o } from "./p-74d59062.js";
|
|
6
|
+
|
|
7
|
+
/* objects in file metadata*/ const r = "object";
|
|
8
|
+
|
|
9
|
+
const c = "category";
|
|
10
|
+
|
|
11
|
+
const h = "status";
|
|
12
|
+
|
|
13
|
+
// - - - - - - - - - - - - - - - - -
|
|
14
|
+
// Objects In File Tree Model
|
|
15
|
+
// - - - - - - - - - - - - - - - - -
|
|
16
|
+
const convertImportCategoryItemToTreeItem = (t, e) => {
|
|
17
|
+
const i = [];
|
|
18
|
+
e.forEach((e => {
|
|
19
|
+
i.push({
|
|
20
|
+
id: e.id,
|
|
21
|
+
caption: e.name,
|
|
22
|
+
expanded: true,
|
|
23
|
+
leaf: true,
|
|
24
|
+
startImgSrc: t,
|
|
25
|
+
metadata: r
|
|
26
|
+
});
|
|
27
|
+
}));
|
|
28
|
+
return i;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const convertImportCategoryDataToTreeView = t => {
|
|
32
|
+
const e = [];
|
|
33
|
+
if (!t) {
|
|
34
|
+
return e;
|
|
35
|
+
}
|
|
36
|
+
t.forEach((t => {
|
|
37
|
+
const i = {
|
|
38
|
+
id: t.id,
|
|
39
|
+
caption: `${t.name} (${t.items.length})`,
|
|
40
|
+
expanded: true,
|
|
41
|
+
leaf: false,
|
|
42
|
+
startImgSrc: t.icon,
|
|
43
|
+
metadata: c,
|
|
44
|
+
items: convertImportCategoryItemToTreeItem(t.icon, t.items)
|
|
45
|
+
};
|
|
46
|
+
e.push(i);
|
|
47
|
+
}));
|
|
48
|
+
return e;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
// - - - - - - - - - - - - - - - - -
|
|
52
|
+
// Import Status Tree Model
|
|
53
|
+
// - - - - - - - - - - - - - - - - -
|
|
54
|
+
const createImportResultDataMessages = (t, e, i) => {
|
|
55
|
+
const s = [];
|
|
56
|
+
e.forEach(((e, n) => {
|
|
57
|
+
s.push({
|
|
58
|
+
id: `${t}-message-${n}`,
|
|
59
|
+
caption: e,
|
|
60
|
+
startImgSrc: "gemini-tools/list-view/on-surface",
|
|
61
|
+
leaf: true,
|
|
62
|
+
metadata: JSON.stringify({
|
|
63
|
+
[h]: i
|
|
64
|
+
})
|
|
65
|
+
});
|
|
66
|
+
}));
|
|
67
|
+
return s;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const createImportResultItem = (t, e) => {
|
|
71
|
+
const i = `${e.id}-${e.name}`;
|
|
72
|
+
const s = {
|
|
73
|
+
id: i,
|
|
74
|
+
startImgSrc: t.icon,
|
|
75
|
+
caption: e.name,
|
|
76
|
+
parts: `tree-view-item tree-view-item--status tree-view-item--${e.status}`,
|
|
77
|
+
expanded: true,
|
|
78
|
+
leaf: e.messages.length === 0,
|
|
79
|
+
metadata: JSON.stringify({
|
|
80
|
+
[h]: e.status
|
|
81
|
+
}),
|
|
82
|
+
items: createImportResultDataMessages(i, e.messages, e.status)
|
|
83
|
+
};
|
|
84
|
+
return s;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
// This functions updates the "Import Status" model, by adding a new result item.
|
|
88
|
+
const addImportItemResultDataItem = (t, e, i, s) => {
|
|
89
|
+
const n = [ ...s ];
|
|
90
|
+
// Use the resultItem.id to find the corresponding category in the categoryMap
|
|
91
|
+
const a = i.get(t.id);
|
|
92
|
+
const o = e.get(a);
|
|
93
|
+
const r = n.findIndex((t => t.id === a));
|
|
94
|
+
if (r === -1) {
|
|
95
|
+
// category does not exists yet.
|
|
96
|
+
const e = {
|
|
97
|
+
id: a,
|
|
98
|
+
caption: `${o.name} (1)`,
|
|
99
|
+
startImgSrc: `${o.icon}`,
|
|
100
|
+
expanded: true,
|
|
101
|
+
items: [ createImportResultItem(o, t) ]
|
|
102
|
+
};
|
|
103
|
+
n.push(e);
|
|
104
|
+
return n;
|
|
105
|
+
}
|
|
106
|
+
// else category already exists. Just insert the result item in the category.
|
|
107
|
+
const c = createImportResultItem(o, t);
|
|
108
|
+
n[r].items = [ ...n[r].items, c ];
|
|
109
|
+
// update category caption length
|
|
110
|
+
const h = n[r].items.length;
|
|
111
|
+
n[r].caption = `${o.name} (${h})`;
|
|
112
|
+
return n;
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
const l = ':host{display:grid;block-size:100%;grid-template:"header header" max-content "objects-in-file import-status" 1fr "footer footer" max-content;grid-template-columns:1fr 1fr}.section{display:contents}.header{grid-template-columns:1fr max-content;grid-area:header}.objects-in-file__section{grid-area:objects-in-file}.objects-in-file__main{border-inline-end:var(--section-common-border);grid-template-rows:1fr max-content}.objects-in-file__footer{display:grid}.import-status__section{grid-area:import-status}.import-status__main{grid-template-rows:1fr max-content}.import-status__footer{display:flex}.import-clear-status-btn{margin-inline-start:auto}.objects-in-file__section,.import-status__section{display:grid;grid-template-rows:max-content 1fr}.control-header__objects-in-file,.control-header__import-status{padding-block-start:var(--mer-spacing--md)}.objects-in-file__main,.import-status__main{grid-auto-rows:max-content;padding-block:var(--content-block-spacing);overflow:auto}.footer{display:flex;grid-area:footer;border-block-start:var(--section-common-border)}.text-align-center{text-align:center}.tree-view::part(item__action tree-view-item--status){grid-template:"first-img left-img text right-img"/max-content max-content 1fr max-content}.tree-view::part(item__action tree-view-item--status)::before{grid-area:first-img;content:"";width:var(--mer-spacing--xs);height:var(--mer-spacing--xs);border-radius:50%;background-color:var(--gray-03);margin-inline-end:var(--mer-spacing--xxs)}.tree-view::part(item__action tree-view-item--success):before{background-image:none;background-color:var(--color-success-dark)}.tree-view::part(item__action tree-view-item--warning):before{background-image:none;background-color:var(--color-warning-dark)}.tree-view::part(item__action tree-view-item--error):before{background-image:none;background-color:var(--color-error-dark)}';
|
|
116
|
+
|
|
117
|
+
var d = undefined && undefined.__classPrivateFieldGet || function(t, e, i, s) {
|
|
118
|
+
if (i === "a" && !s) throw new TypeError("Private accessor was defined without a getter");
|
|
119
|
+
if (typeof e === "function" ? t !== e || !s : !e.has(t)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
120
|
+
return i === "m" ? s : i === "a" ? s.call(t) : s ? s.value : e.get(t);
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
var f = undefined && undefined.__classPrivateFieldSet || function(t, e, i, s, n) {
|
|
124
|
+
if (s === "m") throw new TypeError("Private method is not writable");
|
|
125
|
+
if (s === "a" && !n) throw new TypeError("Private accessor was defined without a setter");
|
|
126
|
+
if (typeof e === "function" ? t !== e || !n : !e.has(t)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
127
|
+
return s === "a" ? n.call(t, i) : n ? n.value = i : e.set(t, i), i;
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
var m, p, u, b, g, w, k, y, v, _, x, M, W, j, C, T, S, I, $, E, D, F, L, H, O, R;
|
|
131
|
+
|
|
132
|
+
const z = [ "resets/box-sizing", "components/button", "components/checkbox", "components/edit", "components/icon", "components/tree-view", "utils/form", "utils/layout", "utils/typography", "utils/spacing" ];
|
|
133
|
+
|
|
134
|
+
const A = a({
|
|
135
|
+
category: "gemini-tools",
|
|
136
|
+
name: "notice",
|
|
137
|
+
colorType: "on-elevation"
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
const N = a({
|
|
141
|
+
category: "gemini-tools",
|
|
142
|
+
name: "file",
|
|
143
|
+
colorType: "primary"
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
const P = a({
|
|
147
|
+
category: "gemini-tools",
|
|
148
|
+
name: "settings",
|
|
149
|
+
colorType: "primary"
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
const J = a({
|
|
153
|
+
category: "menus",
|
|
154
|
+
name: "delete",
|
|
155
|
+
colorType: "primary"
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
const V = "allChecked";
|
|
159
|
+
|
|
160
|
+
const U = "allUnchecked";
|
|
161
|
+
|
|
162
|
+
const X = class {
|
|
163
|
+
constructor(i) {
|
|
164
|
+
t(this, i);
|
|
165
|
+
this.componentDidLoadEvent = e(this, "componentDidLoadEvent", 7);
|
|
166
|
+
this.componentDidRenderFirstTime = e(this, "componentDidRenderFirstTime", 7);
|
|
167
|
+
/**
|
|
168
|
+
* The component hard-coded strings translations.
|
|
169
|
+
*/
|
|
170
|
+
// eslint-disable-next-line @stencil-community/own-props-must-be-private
|
|
171
|
+
m.set(this, void 0);
|
|
172
|
+
p.set(this, []);
|
|
173
|
+
u.set(this, void 0);
|
|
174
|
+
b.set(this, void 0);
|
|
175
|
+
g.set(this, void 0);
|
|
176
|
+
w.set(this, new Set);
|
|
177
|
+
k.set(this, new Set);
|
|
178
|
+
y.set(this, new Set);
|
|
179
|
+
// #categoryItemMap maps a category id, with the name and icon.
|
|
180
|
+
// required for the "import status" tree.
|
|
181
|
+
v.set(this, new Map);
|
|
182
|
+
_.set(this, new Map);
|
|
183
|
+
x.set(this, (() => {
|
|
184
|
+
this.cancelCallback();
|
|
185
|
+
}));
|
|
186
|
+
M.set(this, (() => {
|
|
187
|
+
this.importTreeState = [];
|
|
188
|
+
this.statusInfo.error.number = 0;
|
|
189
|
+
this.statusInfo.warning.number = 0;
|
|
190
|
+
this.statusInfo.success.number = 0;
|
|
191
|
+
}));
|
|
192
|
+
W.set(this, (() => {
|
|
193
|
+
var t;
|
|
194
|
+
this.noImport = !!(((t = this.importTreeState) === null || t === void 0 ? void 0 : t.length) === 0 || !this.importTreeState);
|
|
195
|
+
}));
|
|
196
|
+
j.set(this, (() => {
|
|
197
|
+
this.someStatusVisible = this.statusInfo.error.display || this.statusInfo.warning.display || this.statusInfo.success.display;
|
|
198
|
+
}));
|
|
199
|
+
C.set(this, (async () => {
|
|
200
|
+
/* first clear imported objects (this clears errors/warnings/success counts as well)*/
|
|
201
|
+
d(this, M, "f").call(this);
|
|
202
|
+
/* then do the import*/ this.importingIsInProcess = true;
|
|
203
|
+
this.importCallback(this.checkedObjectsIds).then((() => {
|
|
204
|
+
this.importingIsInProcess = false;
|
|
205
|
+
}));
|
|
206
|
+
}));
|
|
207
|
+
T.set(this, (async t => {
|
|
208
|
+
const e = await this.loadCallback(t);
|
|
209
|
+
d(this, v, "f").clear();
|
|
210
|
+
d(this, _, "f").clear();
|
|
211
|
+
e.forEach((t => {
|
|
212
|
+
d(this, v, "f").set(t.id, {
|
|
213
|
+
name: t.name,
|
|
214
|
+
icon: t.icon
|
|
215
|
+
});
|
|
216
|
+
t.items.forEach((e => {
|
|
217
|
+
d(this, _, "f").set(e.id, t.id);
|
|
218
|
+
}));
|
|
219
|
+
}));
|
|
220
|
+
const i = convertImportCategoryDataToTreeView(e);
|
|
221
|
+
this.objectsTreeModel = i;
|
|
222
|
+
}));
|
|
223
|
+
S.set(this, (t => {
|
|
224
|
+
const e = t.detail;
|
|
225
|
+
const i = [];
|
|
226
|
+
const s = [];
|
|
227
|
+
e.forEach((t => {
|
|
228
|
+
if (t.item.checked) {
|
|
229
|
+
i.push(t.item.id);
|
|
230
|
+
}
|
|
231
|
+
if (t.item.checked && t.item.metadata === r) {
|
|
232
|
+
s.push(t.item.id);
|
|
233
|
+
}
|
|
234
|
+
}));
|
|
235
|
+
this.checkedObjectsIds = s;
|
|
236
|
+
// Evaluate "Select All / Unselect All" checkbox state
|
|
237
|
+
if (e.size === i.length) {
|
|
238
|
+
this.selectAllCheckboxValue = V;
|
|
239
|
+
this.selectAllCheckboxIndeterminate = false;
|
|
240
|
+
} else if (i.length === 0) {
|
|
241
|
+
this.selectAllCheckboxValue = U;
|
|
242
|
+
this.selectAllCheckboxIndeterminate = false;
|
|
243
|
+
} else {
|
|
244
|
+
this.selectAllCheckboxIndeterminate = true;
|
|
245
|
+
}
|
|
246
|
+
}));
|
|
247
|
+
I.set(this, (t => {
|
|
248
|
+
if (t.detail.metadata === r) {
|
|
249
|
+
this.objectContextMenuCallback("imported", {
|
|
250
|
+
selection: d(this, p, "f"),
|
|
251
|
+
clientX: t.detail.contextmenuEvent.screenX,
|
|
252
|
+
clientY: t.detail.contextmenuEvent.screenY
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
}));
|
|
256
|
+
$.set(this, (t => {
|
|
257
|
+
f(this, p, t.detail.map((t => t.item.id)), "f");
|
|
258
|
+
}));
|
|
259
|
+
E.set(this, (() => {
|
|
260
|
+
if (this.optionsCallback) {
|
|
261
|
+
this.optionsCallback();
|
|
262
|
+
// returns boolean
|
|
263
|
+
}
|
|
264
|
+
}));
|
|
265
|
+
D.set(this, (() => {
|
|
266
|
+
this.selectedFile = null;
|
|
267
|
+
d(this, b, "f").value = null;
|
|
268
|
+
}));
|
|
269
|
+
F.set(this, (() => {
|
|
270
|
+
d(this, b, "f").click();
|
|
271
|
+
}));
|
|
272
|
+
L.set(this, (t => {
|
|
273
|
+
var e;
|
|
274
|
+
const i = t.target;
|
|
275
|
+
if (((e = i.files) === null || e === void 0 ? void 0 : e.length) > 0) {
|
|
276
|
+
this.selectedFile = i.files[0];
|
|
277
|
+
}
|
|
278
|
+
}));
|
|
279
|
+
H.set(this, (t => {
|
|
280
|
+
const e = t.detail;
|
|
281
|
+
const i = [];
|
|
282
|
+
const s = e.findIndex((t => t.itemId === "errors"));
|
|
283
|
+
const n = e.findIndex((t => t.itemId === "warnings"));
|
|
284
|
+
const a = e.findIndex((t => t.itemId === "successes"));
|
|
285
|
+
if (s !== -1) {
|
|
286
|
+
i.push("error");
|
|
287
|
+
}
|
|
288
|
+
if (n !== -1) {
|
|
289
|
+
i.push("warning");
|
|
290
|
+
}
|
|
291
|
+
if (a !== -1) {
|
|
292
|
+
i.push("success");
|
|
293
|
+
}
|
|
294
|
+
let o = `"${h}":""`;
|
|
295
|
+
if (i.length) {
|
|
296
|
+
const t = i.join("|");
|
|
297
|
+
o = `"${h}":"(${t})"`;
|
|
298
|
+
}
|
|
299
|
+
this.importedTreeFilterRegExp = new RegExp(o, "i");
|
|
300
|
+
// Update statusInfo for the status-buttons
|
|
301
|
+
this.statusInfo = {
|
|
302
|
+
error: {
|
|
303
|
+
display: s !== -1,
|
|
304
|
+
number: this.statusInfo.error.number
|
|
305
|
+
},
|
|
306
|
+
warning: {
|
|
307
|
+
display: n !== -1,
|
|
308
|
+
number: this.statusInfo.warning.number
|
|
309
|
+
},
|
|
310
|
+
success: {
|
|
311
|
+
display: a !== -1,
|
|
312
|
+
number: this.statusInfo.success.number
|
|
313
|
+
}
|
|
314
|
+
};
|
|
315
|
+
d(this, j, "f").call(this);
|
|
316
|
+
}));
|
|
317
|
+
O.set(this, (t => {
|
|
318
|
+
if (d(this, g, "f")) {
|
|
319
|
+
const e = t.detail === V;
|
|
320
|
+
d(this, g, "f").updateAllItemsProperties({
|
|
321
|
+
checked: e
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
}));
|
|
325
|
+
R.set(this, (() => {
|
|
326
|
+
d(this, y, "f").clear();
|
|
327
|
+
d(this, k, "f").clear();
|
|
328
|
+
d(this, w, "f").clear();
|
|
329
|
+
this.importTreeState.forEach((t => {
|
|
330
|
+
const e = t.items;
|
|
331
|
+
e.forEach((t => {
|
|
332
|
+
if (t.metadata === "error") {
|
|
333
|
+
d(this, y, "f").add(t.id);
|
|
334
|
+
}
|
|
335
|
+
if (t.metadata === "warning") {
|
|
336
|
+
d(this, k, "f").add(t.id);
|
|
337
|
+
}
|
|
338
|
+
if (t.metadata === "success") {
|
|
339
|
+
d(this, w, "f").add(t.id);
|
|
340
|
+
}
|
|
341
|
+
}));
|
|
342
|
+
}));
|
|
343
|
+
}));
|
|
344
|
+
this.checkedObjectsIds = [];
|
|
345
|
+
this.selectAllCheckboxValue = undefined;
|
|
346
|
+
this.selectAllCheckboxIndeterminate = false;
|
|
347
|
+
this.importStatusMessage = undefined;
|
|
348
|
+
this.importTreeState = [];
|
|
349
|
+
this.importedTreeFilterRegExp = undefined;
|
|
350
|
+
this.importingIsInProcess = false;
|
|
351
|
+
this.importTreeFilterList = [];
|
|
352
|
+
this.noImport = undefined;
|
|
353
|
+
this.noObjects = true;
|
|
354
|
+
this.objectsTreeModel = [];
|
|
355
|
+
this.showHiddenImportsMessage = false;
|
|
356
|
+
this.someStatusVisible = undefined;
|
|
357
|
+
this.statusInfo = {
|
|
358
|
+
error: {
|
|
359
|
+
display: true,
|
|
360
|
+
number: 0
|
|
361
|
+
},
|
|
362
|
+
warning: {
|
|
363
|
+
display: true,
|
|
364
|
+
number: 0
|
|
365
|
+
},
|
|
366
|
+
success: {
|
|
367
|
+
display: true,
|
|
368
|
+
number: 0
|
|
369
|
+
}
|
|
370
|
+
};
|
|
371
|
+
this.cancelCallback = undefined;
|
|
372
|
+
this.importCallback = undefined;
|
|
373
|
+
this.loadCallback = undefined;
|
|
374
|
+
this.objectContextMenuCallback = undefined;
|
|
375
|
+
this.optionsCallback = undefined;
|
|
376
|
+
this.selectedFile = undefined;
|
|
377
|
+
this.statusMinimal = false;
|
|
378
|
+
}
|
|
379
|
+
importTreeStateChanged() {
|
|
380
|
+
// this.#filterImportedHandler();
|
|
381
|
+
}
|
|
382
|
+
watchImportTreeStateHandler() {
|
|
383
|
+
d(this, W, "f").call(this);
|
|
384
|
+
if (this.noImport) {
|
|
385
|
+
this.importStatusMessage = d(this, m, "f").main.importStatus.noImportedFiles;
|
|
386
|
+
} else {
|
|
387
|
+
this.importStatusMessage = d(this, m, "f").main.importStatus.importedButHidden;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
watchObjectsTreeModelHandler(t) {
|
|
391
|
+
this.noObjects = !t || t.length === 0;
|
|
392
|
+
}
|
|
393
|
+
selectedFileChanged(t) {
|
|
394
|
+
if (t) {
|
|
395
|
+
d(this, T, "f").call(this, t);
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
componentDidLoad() {
|
|
399
|
+
d(this, u, "f").focus();
|
|
400
|
+
}
|
|
401
|
+
componentDidRender() {}
|
|
402
|
+
async componentWillLoad() {
|
|
403
|
+
f(this, m, await o.getComponentStrings(this.el), "f");
|
|
404
|
+
this.componentDidLoadEvent.emit(true);
|
|
405
|
+
// this.#evaluateObjects();
|
|
406
|
+
d(this, W, "f").call(this);
|
|
407
|
+
this.importStatusMessage = d(this, m, "f").main.importStatus.noImportedFiles;
|
|
408
|
+
d(this, j, "f").call(this);
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* Add the result of importing an item
|
|
412
|
+
*/ async addResultItem(t) {
|
|
413
|
+
this.importTreeState = addImportItemResultDataItem(t, d(this, v, "f"), d(this, _, "f"), this.importTreeState);
|
|
414
|
+
this.statusInfo[t.status].number++;
|
|
415
|
+
d(this, R, "f").call(this);
|
|
416
|
+
}
|
|
417
|
+
render() {
|
|
418
|
+
var t, e;
|
|
419
|
+
return i(s, {
|
|
420
|
+
class: "widget"
|
|
421
|
+
}, i("ch-theme", {
|
|
422
|
+
model: z
|
|
423
|
+
}), i("section", {
|
|
424
|
+
class: "section"
|
|
425
|
+
}, i("header", {
|
|
426
|
+
// header
|
|
427
|
+
class: "field-group control-header-with-border header header-two-cols spacing-body-block-start spacing-body-inline",
|
|
428
|
+
slot: "header"
|
|
429
|
+
}, i("div", {
|
|
430
|
+
// select a file
|
|
431
|
+
class: "field field-inline"
|
|
432
|
+
}, i("label", {
|
|
433
|
+
class: "label",
|
|
434
|
+
htmlFor: "file-name"
|
|
435
|
+
}, d(this, m, "f").header.fileNameLabel), i("ch-edit", {
|
|
436
|
+
autoFocus: true,
|
|
437
|
+
id: "file-name",
|
|
438
|
+
class: "input",
|
|
439
|
+
part: "file-name",
|
|
440
|
+
type: "text",
|
|
441
|
+
readonly: true,
|
|
442
|
+
value: (t = this.selectedFile) === null || t === void 0 ? void 0 : t.name,
|
|
443
|
+
placeholder: d(this, m, "f").header.fileNamePlaceholder,
|
|
444
|
+
startImgSrc: N,
|
|
445
|
+
ref: t => f(this, u, t, "f")
|
|
446
|
+
}), i("input", {
|
|
447
|
+
hidden: true,
|
|
448
|
+
type: "file",
|
|
449
|
+
accept: ".xpz, .xml",
|
|
450
|
+
onChange: d(this, L, "f"),
|
|
451
|
+
ref: t => f(this, b, t, "f")
|
|
452
|
+
})), i("div", {
|
|
453
|
+
class: "buttons-spacer"
|
|
454
|
+
}, i("button", {
|
|
455
|
+
"aria-label": d(this, m, "f").header.removeFileSelection,
|
|
456
|
+
title: d(this, m, "f").header.removeFileSelection,
|
|
457
|
+
id: "reset-all-button",
|
|
458
|
+
class: "button-tertiary button-icon-only",
|
|
459
|
+
part: "reset-all-button",
|
|
460
|
+
onClick: d(this, D, "f")
|
|
461
|
+
}, i("ch-image", {
|
|
462
|
+
class: "icon-md",
|
|
463
|
+
src: J
|
|
464
|
+
})), i("button", {
|
|
465
|
+
// select file
|
|
466
|
+
id: "select-file-load-button",
|
|
467
|
+
class: "button-primary",
|
|
468
|
+
part: "select-file-load-button",
|
|
469
|
+
onClick: d(this, F, "f"),
|
|
470
|
+
disabled: this.importingIsInProcess
|
|
471
|
+
}, d(this, m, "f").header.selectFileButton))), i("section", {
|
|
472
|
+
// objects in file
|
|
473
|
+
class: "objects-in-file__section"
|
|
474
|
+
}, i("h2", {
|
|
475
|
+
class: "control-header control-header-with-border control-header__objects-in-file heading-5 text-align-center spacing-body-inline"
|
|
476
|
+
}, d(this, m, "f").main.objectsInFile.title), i("div", {
|
|
477
|
+
class: "field-group objects-in-file__main"
|
|
478
|
+
}, !this.noObjects ? i("ch-tree-view-render", {
|
|
479
|
+
// objects in file tree
|
|
480
|
+
showLines: "last",
|
|
481
|
+
class: "tree-view",
|
|
482
|
+
model: this.objectsTreeModel,
|
|
483
|
+
dragDisabled: true,
|
|
484
|
+
dropDisabled: true,
|
|
485
|
+
toggleCheckboxes: true,
|
|
486
|
+
checkbox: true,
|
|
487
|
+
checked: true,
|
|
488
|
+
onCheckedItemsChange: d(this, S, "f"),
|
|
489
|
+
onSelectedItemsChange: d(this, $, "f"),
|
|
490
|
+
onItemContextmenu: d(this, I, "f"),
|
|
491
|
+
ref: t => f(this, g, t, "f")
|
|
492
|
+
}) : i("gx-ide-empty-state", {
|
|
493
|
+
isAnimated: false,
|
|
494
|
+
stateTitle: d(this, m, "f").main.objectsInFile.noObjects,
|
|
495
|
+
key: "no-objects-empty-state"
|
|
496
|
+
}, i("button", {
|
|
497
|
+
// begin by selecting a file
|
|
498
|
+
class: "button-secondary",
|
|
499
|
+
onClick: d(this, F, "f")
|
|
500
|
+
}, d(this, m, "f").main.objectsInFile.selectFile)), i("footer", {
|
|
501
|
+
class: "field-group objects-in-file__footer spacing-body-inline"
|
|
502
|
+
}, i("ch-checkbox", {
|
|
503
|
+
// select all / unselect all checkbox
|
|
504
|
+
id: "select-all-checkbox",
|
|
505
|
+
class: "checkbox create-data-in-kb",
|
|
506
|
+
checkedValue: V,
|
|
507
|
+
unCheckedValue: U,
|
|
508
|
+
caption: d(this, m, "f").main.objectsInFile.selectUnselect,
|
|
509
|
+
value: this.selectAllCheckboxValue,
|
|
510
|
+
onInput: d(this, O, "f"),
|
|
511
|
+
disabled: this.importingIsInProcess || this.objectsTreeModel.length === 0,
|
|
512
|
+
part: "select-all-checkbox"
|
|
513
|
+
}), i("div", {
|
|
514
|
+
class: "buttons-spacer"
|
|
515
|
+
}, i("button", {
|
|
516
|
+
// import objects button
|
|
517
|
+
id: "import-btn",
|
|
518
|
+
class: "button-primary ",
|
|
519
|
+
onClick: d(this, C, "f"),
|
|
520
|
+
disabled: ((e = this.objectsTreeModel) === null || e === void 0 ? void 0 : e.length) === 0 || this.importingIsInProcess
|
|
521
|
+
}, d(this, m, "f").main.objectsInFile.importButton), i("button", {
|
|
522
|
+
// cancel-import button
|
|
523
|
+
id: "cancel-import-btn",
|
|
524
|
+
class: "button-secondary ",
|
|
525
|
+
onClick: d(this, x, "f"),
|
|
526
|
+
disabled: !this.importingIsInProcess,
|
|
527
|
+
part: "cancel-import-button"
|
|
528
|
+
}, d(this, m, "f").main.objectsInFile.cancelButton), i("button", {
|
|
529
|
+
// settings/options button
|
|
530
|
+
id: "select-kb-btn",
|
|
531
|
+
class: "button-tertiary button-icon-only",
|
|
532
|
+
part: "select-kb-btn",
|
|
533
|
+
onClick: d(this, E, "f")
|
|
534
|
+
}, i("ch-image", {
|
|
535
|
+
class: "icon-md",
|
|
536
|
+
src: P
|
|
537
|
+
})))))), i("section", {
|
|
538
|
+
// import status
|
|
539
|
+
class: "import-status__section"
|
|
540
|
+
}, i("h2", {
|
|
541
|
+
class: "control-header control-header-with-border control-header__import-status heading-5 text-align-center spacing-body-inline"
|
|
542
|
+
}, d(this, m, "f").main.importStatus.title), i("div", {
|
|
543
|
+
class: "field-group import-status__main"
|
|
544
|
+
}, !this.noImport && this.someStatusVisible ? i("ch-tree-view-render", {
|
|
545
|
+
// import status tree
|
|
546
|
+
model: this.importTreeState,
|
|
547
|
+
toggleCheckboxes: true,
|
|
548
|
+
showLines: "last",
|
|
549
|
+
class: "tree-view",
|
|
550
|
+
filter: this.importedTreeFilterRegExp,
|
|
551
|
+
filterType: "metadata",
|
|
552
|
+
filterOptions: {
|
|
553
|
+
autoExpand: true,
|
|
554
|
+
hideMatchesAndShowNonMatches: false
|
|
555
|
+
}
|
|
556
|
+
}) : i("gx-ide-empty-state", {
|
|
557
|
+
isAnimated: false,
|
|
558
|
+
stateIconSrc: A,
|
|
559
|
+
stateTitle: this.importStatusMessage,
|
|
560
|
+
key: "no-objects-empty-state"
|
|
561
|
+
}), i("footer", {
|
|
562
|
+
class: "import-status__footer spacing-body-inline"
|
|
563
|
+
}, i("button", {
|
|
564
|
+
// clear status button
|
|
565
|
+
class: "button-secondary import-clear-status-btn",
|
|
566
|
+
onClick: d(this, M, "f"),
|
|
567
|
+
disabled: this.noImport || this.importingIsInProcess,
|
|
568
|
+
part: "clear-status-btn"
|
|
569
|
+
}, d(this, m, "f").main.importStatus.clearButton)))), i("footer", {
|
|
570
|
+
// footer
|
|
571
|
+
class: "footer"
|
|
572
|
+
}, i("gx-ide-status-buttons", {
|
|
573
|
+
errors: this.statusInfo.error.number,
|
|
574
|
+
warnings: this.statusInfo.warning.number,
|
|
575
|
+
successes: this.statusInfo.success.number,
|
|
576
|
+
hideMessage: true,
|
|
577
|
+
compact: true,
|
|
578
|
+
minimal: this.statusMinimal,
|
|
579
|
+
onSelectionChanged: d(this, H, "f")
|
|
580
|
+
}))));
|
|
581
|
+
}
|
|
582
|
+
static get assetsDirs() {
|
|
583
|
+
return [ "gx-ide-assets/kb-manager-import" ];
|
|
584
|
+
}
|
|
585
|
+
get el() {
|
|
586
|
+
return n(this);
|
|
587
|
+
}
|
|
588
|
+
static get watchers() {
|
|
589
|
+
return {
|
|
590
|
+
importTreeState: [ "importTreeStateChanged", "watchImportTreeStateHandler" ],
|
|
591
|
+
objectsTreeModel: [ "watchObjectsTreeModelHandler" ],
|
|
592
|
+
selectedFile: [ "selectedFileChanged" ]
|
|
593
|
+
};
|
|
594
|
+
}
|
|
595
|
+
};
|
|
596
|
+
|
|
597
|
+
m = new WeakMap, p = new WeakMap, u = new WeakMap, b = new WeakMap, g = new WeakMap,
|
|
598
|
+
w = new WeakMap, k = new WeakMap, y = new WeakMap, v = new WeakMap, _ = new WeakMap,
|
|
599
|
+
x = new WeakMap, M = new WeakMap, W = new WeakMap, j = new WeakMap, C = new WeakMap,
|
|
600
|
+
T = new WeakMap, S = new WeakMap, I = new WeakMap, $ = new WeakMap, E = new WeakMap,
|
|
601
|
+
D = new WeakMap, F = new WeakMap, L = new WeakMap, H = new WeakMap, O = new WeakMap,
|
|
602
|
+
R = new WeakMap;
|
|
603
|
+
|
|
604
|
+
X.style = l;
|
|
605
|
+
|
|
606
|
+
export { X as gx_ide_kb_manager_import };
|
|
607
|
+
//# sourceMappingURL=p-336c340f.entry.js.map
|