@genexus/genexus-ide-ui 1.0.42 → 1.0.43
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/gx-ide-design-import.cjs.entry.js +41 -12
- package/dist/cjs/gx-ide-design-import.cjs.entry.js.map +1 -1
- package/dist/collection/components/design-import/design-import.js +41 -12
- package/dist/collection/components/design-import/design-import.js.map +1 -1
- package/dist/components/gx-ide-design-import.js +41 -12
- package/dist/components/gx-ide-design-import.js.map +1 -1
- package/dist/esm/gx-ide-design-import.entry.js +41 -12
- package/dist/esm/gx-ide-design-import.entry.js.map +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
- package/dist/genexus-ide-ui/{p-877cd71e.entry.js → p-512147a8.entry.js} +220 -200
- package/dist/genexus-ide-ui/p-512147a8.entry.js.map +1 -0
- package/dist/types/components/design-import/design-import.d.ts +1 -0
- package/package.json +1 -1
- package/dist/genexus-ide-ui/p-877cd71e.entry.js.map +0 -1
|
@@ -11,7 +11,7 @@ const mapStylesToComboBoxItemModel = t => t === null || t === void 0 ? void 0 :
|
|
|
11
11
|
caption: t.label || t.name
|
|
12
12
|
})));
|
|
13
13
|
|
|
14
|
-
const
|
|
14
|
+
const r = {
|
|
15
15
|
layout: {
|
|
16
16
|
id: "layout",
|
|
17
17
|
caption: "Layout",
|
|
@@ -39,45 +39,45 @@ const l = {
|
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
-
const
|
|
42
|
+
const l = {
|
|
43
43
|
panels: [ {
|
|
44
|
-
id:
|
|
45
|
-
name:
|
|
44
|
+
id: r.composition.id,
|
|
45
|
+
name: r.composition.caption
|
|
46
46
|
}, {
|
|
47
|
-
id:
|
|
48
|
-
name:
|
|
47
|
+
id: r.layout.id,
|
|
48
|
+
name: r.layout.caption
|
|
49
49
|
}, {
|
|
50
|
-
id:
|
|
51
|
-
name:
|
|
50
|
+
id: r.code.id,
|
|
51
|
+
name: r.code.caption
|
|
52
52
|
} ],
|
|
53
53
|
stencils: [ {
|
|
54
|
-
id:
|
|
55
|
-
name:
|
|
54
|
+
id: r.composition.id,
|
|
55
|
+
name: r.composition.caption
|
|
56
56
|
}, {
|
|
57
|
-
id:
|
|
58
|
-
name:
|
|
57
|
+
id: r.layout.id,
|
|
58
|
+
name: r.layout.caption
|
|
59
59
|
}, {
|
|
60
|
-
id:
|
|
61
|
-
name:
|
|
60
|
+
id: r.code.id,
|
|
61
|
+
name: r.code.caption
|
|
62
62
|
} ],
|
|
63
63
|
images: [ {
|
|
64
|
-
id:
|
|
65
|
-
name:
|
|
64
|
+
id: r.composition.id,
|
|
65
|
+
name: r.composition.caption
|
|
66
66
|
} ],
|
|
67
67
|
fonts: [ {
|
|
68
|
-
id:
|
|
69
|
-
name:
|
|
68
|
+
id: r.composition.id,
|
|
69
|
+
name: r.composition.caption
|
|
70
70
|
} ],
|
|
71
71
|
designSystem: [ {
|
|
72
|
-
id:
|
|
73
|
-
name:
|
|
72
|
+
id: r.tokens.id,
|
|
73
|
+
name: r.tokens.caption
|
|
74
74
|
}, {
|
|
75
|
-
id:
|
|
76
|
-
name:
|
|
75
|
+
id: r.styles.id,
|
|
76
|
+
name: r.styles.caption
|
|
77
77
|
} ]
|
|
78
78
|
};
|
|
79
79
|
|
|
80
|
-
const h = new Map([ [ "panels",
|
|
80
|
+
const h = new Map([ [ "panels", l.panels ], [ "stencils", l.stencils ], [ "images", l.images ], [ "design_system", l.designSystem ], [ "fonts", l.fonts ] ]);
|
|
81
81
|
|
|
82
82
|
const c = '@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}:host{display:grid;block-size:100%;overflow:auto;grid-template-rows:max-content 1fr max-content}.section{display:contents}.header{display:grid;grid-auto-rows:max-content;grid-template-columns:minmax(88px, max-content) 1fr !important}.header--show-access-token{grid-template-areas:"path-url-label path-url-wrapper" "access-token-label access-token" "style-label style" "module-label module" "checkboxes-options checkboxes-options"}.header--hide-access-token{grid-template-areas:"path-url-label path-url-wrapper" "style-label style" "module-label module" "checkboxes-options checkboxes-options"}.path-url-wrapper{grid-template-columns:1fr max-content}.path-url-label{grid-area:path-url-label}.path-url-control{flex-grow:1}.select-load-button{min-inline-size:80px}.access-token-label{grid-area:access-token-label}.access-token{grid-area:access-token}.style-label{grid-area:style-label}.style{grid-area:style}.module-label{grid-area:module-label}.module{grid-area:module}.checkboxes-options{grid-area:checkboxes-options;grid-template-columns:max-content max-content;justify-content:space-between}.main{display:grid;grid-template-columns:250px 1fr;block-size:100%;overflow:auto}.main--loading{grid-template-columns:1fr}.panel-tab{block-size:100%;display:grid;grid-template-columns:1fr 300px}.panel-tab .panel-item{overflow:auto}.panel-tab:has(>:only-child){grid-template-columns:1fr}.tree-view{padding-block:var(--mer-spacing--2xs)}.tree-view-panel-item{border-inline-start:var(--section-common-border)}.checker-board{--white-square-color:#fff1;--black-square-color:#0000;background:linear-gradient(45deg, var(--white-square-color) 25%, var(--black-square-color) 25%), linear-gradient(-45deg, var(--white-square-color) 25%, var(--black-square-color) 25%), linear-gradient(45deg, var(--black-square-color) 75%, var(--white-square-color) 75%), linear-gradient(-45deg, var(--black-square-color) 75%, var(--white-square-color) 75%);background-size:20px 20px;background-position:0 0, 0 10px, 10px -10px, -10px 0px}.tab{border-width:0 !important}.tab.fit-images .composition-tab-slot{font-size:0}.tab.fit-images img{object-fit:scale-down;object-position:left top;max-height:100%}.tab--hidden{display:none}.button-cancel,.button-ok{min-inline-size:var(--mer-spacing--4xl)}.messages-slot-container{block-size:100%}.composition-tab-slot{block-size:100%;overflow:auto}.empty-state{overflow:auto}.empty-state-button{transform:translateY(-12px)}.message{animation:fadeIn var(--mer-timing--fast) ease-in-out forwards}.message--info{color:var(--mer-text__on-surface)}.message--warning{color:var(--mer-text__warning)}.message--error{color:var(--mer-text__error)}@keyframes fadeIn{from{opacity:0}to{opacity:1}}.combo-box.ch-disabled{--control__bg-color:var(--control__background-color--disabled);--control__border-color:var(--control__border-color--disabled);--control__color:var(--control__color--disabled);--ch-placeholder-color:var(--control-placeholder__color--disabled)}.tree-view::part(item__header){min-inline-size:var(--tree-view__min-inline-size)}';
|
|
83
83
|
|
|
@@ -94,54 +94,54 @@ var p = undefined && undefined.__classPrivateFieldSet || function(t, e, s, i, a)
|
|
|
94
94
|
return i === "a" ? a.call(t, s) : a ? a.value = s : e.set(t, s), s;
|
|
95
95
|
};
|
|
96
96
|
|
|
97
|
-
var f, u, m, b, g, k, w, v, y, x, M, W, _, I, C, $, j, D, S, T, z, P, q, A, E, F, V, G, L, O, B, H, N, Y, J, K, Q, R, U, X, Z, tt, et, st, it, at, ot, nt,
|
|
97
|
+
var f, u, m, b, g, k, w, v, y, x, M, W, _, I, C, $, j, D, S, T, z, P, q, A, E, F, V, G, L, O, B, H, N, Y, J, K, Q, R, U, X, Z, tt, et, st, it, at, ot, nt, rt, lt, ht, ct, dt;
|
|
98
98
|
|
|
99
|
-
const
|
|
99
|
+
const pt = "panels";
|
|
100
100
|
|
|
101
|
-
const
|
|
101
|
+
const ft = "stencils";
|
|
102
102
|
|
|
103
|
-
const
|
|
103
|
+
const ut = "images";
|
|
104
104
|
|
|
105
|
-
const
|
|
105
|
+
const mt = "design_system";
|
|
106
106
|
|
|
107
|
-
const
|
|
107
|
+
const bt = "fonts";
|
|
108
108
|
|
|
109
|
-
const
|
|
109
|
+
const gt = "@@@";
|
|
110
110
|
|
|
111
111
|
// ch-checkbox
|
|
112
|
-
const
|
|
112
|
+
const kt = "on";
|
|
113
113
|
|
|
114
114
|
// Icons
|
|
115
|
-
const
|
|
115
|
+
const wt = a({
|
|
116
116
|
category: "menus",
|
|
117
117
|
name: "delete",
|
|
118
118
|
colorType: "primary"
|
|
119
119
|
});
|
|
120
120
|
|
|
121
|
-
const
|
|
121
|
+
const vt = a({
|
|
122
122
|
category: "objects",
|
|
123
123
|
name: "design"
|
|
124
124
|
});
|
|
125
125
|
|
|
126
|
-
const
|
|
126
|
+
const yt = a({
|
|
127
127
|
category: "controls",
|
|
128
128
|
name: "file-upload"
|
|
129
129
|
});
|
|
130
130
|
|
|
131
131
|
// For empty states
|
|
132
|
-
const
|
|
132
|
+
const xt = a({
|
|
133
133
|
category: "objects",
|
|
134
134
|
name: "webpanel"
|
|
135
135
|
});
|
|
136
136
|
|
|
137
|
-
const
|
|
137
|
+
const Mt = a({
|
|
138
138
|
category: "objects",
|
|
139
139
|
name: "panel-for-sd"
|
|
140
140
|
});
|
|
141
141
|
|
|
142
|
-
const
|
|
142
|
+
const Wt = [ "resets/box-sizing", "utils/form", "utils/layout", "utils/typography", "utils/spacing", "components/button", "components/checkbox", "components/edit", "components/tree-view", "components/combo-box", "components/tab", "components/tooltip", "chameleon/scrollbar" ];
|
|
143
143
|
|
|
144
|
-
const
|
|
144
|
+
const _t = class {
|
|
145
145
|
constructor(s) {
|
|
146
146
|
t(this, s);
|
|
147
147
|
f.add(this);
|
|
@@ -171,43 +171,55 @@ const Wt = class {
|
|
|
171
171
|
_.set(this, []);
|
|
172
172
|
I.set(this, void 0);
|
|
173
173
|
C.set(this, void 0);
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
174
|
+
$.set(this, (t => [ {
|
|
175
|
+
leaf: true,
|
|
176
|
+
caption: `Warning: ${t}`,
|
|
177
|
+
startImgSrc: a({
|
|
178
|
+
category: "system",
|
|
179
|
+
name: "warning",
|
|
180
|
+
colorType: "warning"
|
|
181
|
+
}),
|
|
182
|
+
order: -1,
|
|
183
|
+
checkbox: false,
|
|
184
|
+
disabled: true
|
|
185
|
+
} ]));
|
|
186
|
+
D.set(this, (() => {
|
|
187
|
+
this.activeTabs.set("panels", l.panels[0].id);
|
|
188
|
+
this.activeTabs.set("stencils", l.stencils[0].id);
|
|
189
|
+
this.activeTabs.set("images", l.images[0].id);
|
|
190
|
+
this.activeTabs.set("fonts", l.fonts[0].id);
|
|
191
|
+
this.activeTabs.set("design_system", l.designSystem[0].id);
|
|
180
192
|
}));
|
|
181
|
-
|
|
193
|
+
S.set(this, (async () => {
|
|
182
194
|
this.requiresAccessToken = await this.requiresAccessTokenCallback(this.path);
|
|
183
195
|
// evaluate access token error
|
|
184
196
|
if (this.accessToken.length) {
|
|
185
197
|
this.accessTokenHasError = false;
|
|
186
198
|
}
|
|
187
199
|
}));
|
|
188
|
-
|
|
200
|
+
T.set(this, (async () => {
|
|
189
201
|
const t = this.isLoaded && this.reactiveSettings.path && this.pathIsValid && this.path !== this.lastLoadCallbackSettingValues.path;
|
|
190
202
|
const e = !this.requiresAccessToken || this.requiresAccessToken && this.accessToken.length > 0;
|
|
191
203
|
if (t && e) {
|
|
192
|
-
d(this,
|
|
204
|
+
d(this, L, "f").call(this);
|
|
193
205
|
}
|
|
194
206
|
}));
|
|
195
|
-
|
|
207
|
+
P.set(this, (async t => {
|
|
196
208
|
var e;
|
|
197
209
|
if (t.detail.length) {
|
|
198
210
|
const s = (e = t.detail[0]) === null || e === void 0 ? void 0 : e.item;
|
|
199
211
|
const i = s.id;
|
|
200
|
-
const a = i.split(
|
|
212
|
+
const a = i.split(gt);
|
|
201
213
|
const o = a[0];
|
|
202
214
|
const n = a[1];
|
|
203
|
-
const
|
|
204
|
-
const
|
|
205
|
-
if (
|
|
215
|
+
const r = o && o !== "parent";
|
|
216
|
+
const l = n === "design_system";
|
|
217
|
+
if (r || l) {
|
|
206
218
|
this.tabsModel = h.get(n);
|
|
207
219
|
this.selectedDesignType = n;
|
|
208
|
-
const t = d(this,
|
|
220
|
+
const t = d(this, q, "f").call(this, i);
|
|
209
221
|
if (!t) {
|
|
210
|
-
const t = await d(this,
|
|
222
|
+
const t = await d(this, B, "f").call(this, o, this.selectedDesignType);
|
|
211
223
|
d(this, m, "f").set(i, {
|
|
212
224
|
designType: this.selectedDesignType,
|
|
213
225
|
designDataDetail: t
|
|
@@ -216,19 +228,19 @@ const Wt = class {
|
|
|
216
228
|
// Item has been queried already. The item content exists already.
|
|
217
229
|
this.selectedDesignType = t.designType;
|
|
218
230
|
this.selectedDesignItem = t.designDataDetail;
|
|
219
|
-
d(this, f, "m",
|
|
220
|
-
d(this, f, "m",
|
|
231
|
+
d(this, f, "m", H).call(this, t.designType);
|
|
232
|
+
d(this, f, "m", it).call(this, t.designType);
|
|
221
233
|
}
|
|
222
234
|
this.renderedTabs.clear();
|
|
223
235
|
this.renderedTabs.add(this.activeTabs.get(this.selectedDesignType));
|
|
224
236
|
}
|
|
225
237
|
}
|
|
226
238
|
}));
|
|
227
|
-
|
|
239
|
+
q.set(this, (t => {
|
|
228
240
|
var e;
|
|
229
241
|
return (e = d(this, m, "f")) === null || e === void 0 ? void 0 : e.get(t);
|
|
230
242
|
}));
|
|
231
|
-
|
|
243
|
+
A.set(this, (t => {
|
|
232
244
|
const e = /^(\/|\.\/|(\w:))[^:*?"<>|]*\.(sketch|gxsketch)$/i;
|
|
233
245
|
// Match valid file paths
|
|
234
246
|
const s = /^https?:\/\/(www\.)?figma\.com/;
|
|
@@ -238,52 +250,52 @@ const Wt = class {
|
|
|
238
250
|
const a = e.test(t) || s.test(t) || i.test(t);
|
|
239
251
|
return a;
|
|
240
252
|
}));
|
|
241
|
-
|
|
253
|
+
E.set(this, (t => {
|
|
242
254
|
const e = Array.from(t.detail.values());
|
|
243
255
|
let s = null;
|
|
244
256
|
const i = {};
|
|
245
257
|
for (const t of e) {
|
|
246
|
-
if (t.item.id.startsWith(`parent${
|
|
247
|
-
s = t.item.id.split(
|
|
258
|
+
if (t.item.id.startsWith(`parent${gt}`)) {
|
|
259
|
+
s = t.item.id.split(gt)[1];
|
|
248
260
|
i[s] = [];
|
|
249
261
|
} else if (t.item.checked && s) {
|
|
250
|
-
const e = t.item.id.split(
|
|
262
|
+
const e = t.item.id.split(gt)[1];
|
|
251
263
|
if (e === s) {
|
|
252
|
-
const e = t.item.id.split(
|
|
264
|
+
const e = t.item.id.split(gt)[0];
|
|
253
265
|
i[s].push(e);
|
|
254
266
|
}
|
|
255
267
|
}
|
|
256
268
|
}
|
|
257
269
|
// const { designSystem, fonts, images, panels, stencils } = result;
|
|
258
|
-
const {fonts: a, panels: o, stencils: n, images:
|
|
270
|
+
const {fonts: a, panels: o, stencils: n, images: r} = i;
|
|
259
271
|
// this.designSystemSelected = designSystem;
|
|
260
272
|
p(this, x, o, "f");
|
|
261
273
|
p(this, M, n, "f");
|
|
262
|
-
p(this, W,
|
|
274
|
+
p(this, W, r, "f");
|
|
263
275
|
p(this, _, a, "f");
|
|
264
276
|
}));
|
|
265
|
-
|
|
277
|
+
F.set(this, (() => {
|
|
266
278
|
d(this, I, "f").click();
|
|
267
279
|
}));
|
|
268
|
-
|
|
280
|
+
V.set(this, (t => {
|
|
269
281
|
this.styleValue = t.target.value;
|
|
270
282
|
if (this.reactiveSettings.style && this.styleValue !== this.lastLoadCallbackSettingValues.style) {
|
|
271
|
-
d(this,
|
|
283
|
+
d(this, L, "f").call(this);
|
|
272
284
|
}
|
|
273
285
|
}));
|
|
274
|
-
|
|
286
|
+
G.set(this, (t => {
|
|
275
287
|
if (this.reactiveSettings.module && this.defaultModule.id !== t.detail.id && this.pathIsValid) {
|
|
276
|
-
d(this,
|
|
288
|
+
d(this, L, "f").call(this);
|
|
277
289
|
}
|
|
278
290
|
}));
|
|
279
|
-
|
|
291
|
+
L.set(this, (async () => {
|
|
280
292
|
var t, e;
|
|
281
293
|
this.isLoading = true;
|
|
282
294
|
const s = this.selectedFile ? this.selectedFile : this.path;
|
|
283
295
|
const i = d(this, k, "f") ? d(this, k, "f").value : undefined;
|
|
284
296
|
const a = this.styleValue;
|
|
285
|
-
const o = d(this, w, "f").value ===
|
|
286
|
-
const n = await this.loadCallback(s, a, o, i, d(this,
|
|
297
|
+
const o = d(this, w, "f").value === kt;
|
|
298
|
+
const n = await this.loadCallback(s, a, o, i, d(this, O, "f"));
|
|
287
299
|
// clear
|
|
288
300
|
p(this, x, [], "f");
|
|
289
301
|
p(this, M, [], "f");
|
|
@@ -294,9 +306,9 @@ const Wt = class {
|
|
|
294
306
|
this.designData = n;
|
|
295
307
|
this.isLoaded = (t = n === null || n === void 0 ? void 0 : n.success) !== null && t !== void 0 ? t : false;
|
|
296
308
|
this.isLoading = false;
|
|
297
|
-
const
|
|
298
|
-
if (
|
|
299
|
-
this.styleValue =
|
|
309
|
+
const r = (e = n.designSystem[0]) === null || e === void 0 ? void 0 : e.name;
|
|
310
|
+
if (r && !this.styleValue) {
|
|
311
|
+
this.styleValue = r;
|
|
300
312
|
}
|
|
301
313
|
// update the settings that were used for the last load
|
|
302
314
|
if (this.reactiveSettings.path && this.pathIsValid) {
|
|
@@ -312,26 +324,26 @@ const Wt = class {
|
|
|
312
324
|
this.lastLoadCallbackSettingValues.importAsWebPanels = o;
|
|
313
325
|
}
|
|
314
326
|
}));
|
|
315
|
-
|
|
327
|
+
O.set(this, (t => {
|
|
316
328
|
this.messages = [ ...this.messages, t ];
|
|
317
329
|
}));
|
|
318
|
-
|
|
330
|
+
B.set(this, (async (t, e) => {
|
|
319
331
|
let s;
|
|
320
332
|
switch (e) {
|
|
321
|
-
case
|
|
333
|
+
case ut:
|
|
322
334
|
s = this.loadImageCallback;
|
|
323
335
|
break;
|
|
324
336
|
|
|
325
|
-
case
|
|
337
|
+
case mt:
|
|
326
338
|
s = this.loadDesignSystemCallback;
|
|
327
339
|
break;
|
|
328
340
|
|
|
329
|
-
case
|
|
341
|
+
case bt:
|
|
330
342
|
s = this.loadFontCallback;
|
|
331
343
|
break;
|
|
332
344
|
|
|
333
|
-
case dt:
|
|
334
345
|
case pt:
|
|
346
|
+
case ft:
|
|
335
347
|
s = this.loadPanelDataCallback;
|
|
336
348
|
break;
|
|
337
349
|
}
|
|
@@ -339,13 +351,13 @@ const Wt = class {
|
|
|
339
351
|
await s(t).then((t => {
|
|
340
352
|
this.selectedDesignType = e;
|
|
341
353
|
this.selectedDesignItem = t;
|
|
342
|
-
d(this, f, "m",
|
|
343
|
-
d(this, f, "m",
|
|
354
|
+
d(this, f, "m", H).call(this, e);
|
|
355
|
+
d(this, f, "m", it).call(this, e);
|
|
344
356
|
i = t;
|
|
345
357
|
}));
|
|
346
358
|
return i;
|
|
347
359
|
}));
|
|
348
|
-
|
|
360
|
+
N.set(this, (() => {
|
|
349
361
|
var t, e;
|
|
350
362
|
this.confirmCallback({
|
|
351
363
|
panels: d(this, x, "f"),
|
|
@@ -354,31 +366,31 @@ const Wt = class {
|
|
|
354
366
|
images: d(this, W, "f"),
|
|
355
367
|
moduleId: (e = (t = d(this, v, "f")) === null || t === void 0 ? void 0 : t.value) === null || e === void 0 ? void 0 : e.id,
|
|
356
368
|
styleName: this.styleValue,
|
|
357
|
-
importAsWebPanels: d(this, w, "f").value ===
|
|
369
|
+
importAsWebPanels: d(this, w, "f").value === kt
|
|
358
370
|
});
|
|
359
371
|
}));
|
|
360
|
-
|
|
372
|
+
Y.set(this, (() => {
|
|
361
373
|
this.cancelCallback();
|
|
362
374
|
this.isLoading = false;
|
|
363
375
|
}));
|
|
364
|
-
|
|
365
|
-
this.fitImages = t.detail ===
|
|
376
|
+
J.set(this, (t => {
|
|
377
|
+
this.fitImages = t.detail === kt;
|
|
366
378
|
}));
|
|
367
|
-
|
|
368
|
-
|
|
379
|
+
K.set(this, (t => t.reduce(((t, e, s, i) => i[t].name <= e.name ? t : s), 0)));
|
|
380
|
+
Q.set(this, (() => {
|
|
369
381
|
const t = this.reactiveSettings.importAsWebPanels && this.pathIsValid;
|
|
370
382
|
if (t) {
|
|
371
|
-
d(this,
|
|
383
|
+
d(this, L, "f").call(this);
|
|
372
384
|
}
|
|
373
385
|
}));
|
|
374
|
-
|
|
386
|
+
R.set(this, (() => {
|
|
375
387
|
this.selectedFile = null;
|
|
376
388
|
this.path = "";
|
|
377
389
|
this.accessToken = "";
|
|
378
390
|
this.selectedFile = null;
|
|
379
391
|
d(this, I, "f").value = null;
|
|
380
392
|
}));
|
|
381
|
-
|
|
393
|
+
U.set(this, (t => {
|
|
382
394
|
var e;
|
|
383
395
|
const s = t.target;
|
|
384
396
|
if (((e = s.files) === null || e === void 0 ? void 0 : e.length) > 0) {
|
|
@@ -387,33 +399,33 @@ const Wt = class {
|
|
|
387
399
|
// we know the path is valid because the extensions are restricted by "extensions" Prop.
|
|
388
400
|
}
|
|
389
401
|
}));
|
|
390
|
-
|
|
402
|
+
X.set(this, (t => {
|
|
391
403
|
const e = t.target;
|
|
392
404
|
e.type = "text";
|
|
393
405
|
// display token on focus
|
|
394
406
|
}));
|
|
395
|
-
|
|
407
|
+
Z.set(this, (t => {
|
|
396
408
|
const e = t.target;
|
|
397
409
|
e.type = "password";
|
|
398
410
|
// hide token on blur
|
|
399
411
|
this.accessTokenChanged(e.value);
|
|
400
412
|
}));
|
|
401
|
-
|
|
413
|
+
tt.set(this, (async t => {
|
|
402
414
|
this.path = t.detail;
|
|
403
|
-
d(this,
|
|
415
|
+
d(this, S, "f").call(this);
|
|
404
416
|
this.selectedFile = null;
|
|
405
417
|
if (!this.path.length) {
|
|
406
418
|
this.designData = null;
|
|
407
419
|
}
|
|
408
420
|
}));
|
|
409
|
-
|
|
421
|
+
et.set(this, (() => {
|
|
410
422
|
const t = this.isLoading || this.pathIsValid && this.requiresAccessToken && this.accessToken.length === 0;
|
|
411
423
|
const s = this.isLoading || this.path.length === 0;
|
|
412
424
|
const i = this.isLoading;
|
|
413
425
|
const a = this.isLoading;
|
|
414
426
|
const n = !this.pathIsValid && this.path.length > 0;
|
|
415
|
-
const
|
|
416
|
-
const
|
|
427
|
+
const r = !this.pathIsValid && this.path.length > 0;
|
|
428
|
+
const l = this.isLoading || !this.designDataTreeDataModel.length || this.selectedDesignType === "stencils" || this.selectedDesignType === "design_system";
|
|
417
429
|
let h;
|
|
418
430
|
if (this.pathIsValid && this.path === this.lastLoadCallbackSettingValues.path) {
|
|
419
431
|
h = d(this, u, "f").header.btnReload;
|
|
@@ -449,13 +461,13 @@ const Wt = class {
|
|
|
449
461
|
part: "option-path",
|
|
450
462
|
type: "text",
|
|
451
463
|
value: this.path,
|
|
452
|
-
onInput: d(this,
|
|
453
|
-
onBlur: this.reactiveSettings.path && d(this,
|
|
464
|
+
onInput: d(this, tt, "f"),
|
|
465
|
+
onBlur: this.reactiveSettings.path && d(this, T, "f"),
|
|
454
466
|
disabled: this.isLoading,
|
|
455
467
|
placeholder: `${d(this, u, "f").header.pathPlaceholder}`,
|
|
456
|
-
startImgSrc:
|
|
468
|
+
startImgSrc: yt,
|
|
457
469
|
ref: t => p(this, C, t, "f")
|
|
458
|
-
}),
|
|
470
|
+
}), r && e("ch-tooltip", {
|
|
459
471
|
class: "tooltip",
|
|
460
472
|
actionElement: d(this, C, "f"),
|
|
461
473
|
blockAlign: o.tooltipSettings.blockAlign,
|
|
@@ -465,7 +477,7 @@ const Wt = class {
|
|
|
465
477
|
hidden: true,
|
|
466
478
|
type: "file",
|
|
467
479
|
accept: d(this, g, "f"),
|
|
468
|
-
onChange: d(this,
|
|
480
|
+
onChange: d(this, U, "f"),
|
|
469
481
|
ref: t => p(this, I, t, "f")
|
|
470
482
|
}), e("div", {
|
|
471
483
|
class: "buttons-spacer"
|
|
@@ -476,16 +488,16 @@ const Wt = class {
|
|
|
476
488
|
class: "button-tertiary button-icon-only",
|
|
477
489
|
part: "reset-all-button",
|
|
478
490
|
disabled: s,
|
|
479
|
-
onClick: !s && d(this,
|
|
491
|
+
onClick: !s && d(this, R, "f")
|
|
480
492
|
}, e("ch-image", {
|
|
481
493
|
class: "icon-md",
|
|
482
|
-
src:
|
|
494
|
+
src: wt,
|
|
483
495
|
disabled: s
|
|
484
496
|
})), e("button", {
|
|
485
497
|
// load file button
|
|
486
498
|
id: "button-load",
|
|
487
499
|
type: "primary-text-only",
|
|
488
|
-
onClick: this.pathIsValid ? d(this,
|
|
500
|
+
onClick: this.pathIsValid ? d(this, L, "f") : d(this, F, "f"),
|
|
489
501
|
part: "button button--load",
|
|
490
502
|
disabled: t,
|
|
491
503
|
class: {
|
|
@@ -505,8 +517,8 @@ const Wt = class {
|
|
|
505
517
|
ref: t => p(this, k, t, "f"),
|
|
506
518
|
value: this.accessToken,
|
|
507
519
|
placeholder: d(this, u, "f").header.accessTokenPlaceholder,
|
|
508
|
-
onFocus: d(this,
|
|
509
|
-
onBlur: d(this,
|
|
520
|
+
onFocus: d(this, X, "f"),
|
|
521
|
+
onBlur: d(this, Z, "f"),
|
|
510
522
|
part: "access-token",
|
|
511
523
|
disabled: this.isLoading,
|
|
512
524
|
type: "password"
|
|
@@ -528,7 +540,7 @@ const Wt = class {
|
|
|
528
540
|
disabled: i,
|
|
529
541
|
model: this.stylesAsComboBoxModel,
|
|
530
542
|
value: this.styleValue,
|
|
531
|
-
onInput: d(this,
|
|
543
|
+
onInput: d(this, V, "f"),
|
|
532
544
|
part: "option-style",
|
|
533
545
|
class: "combo-box style"
|
|
534
546
|
}), e("label", {
|
|
@@ -541,7 +553,7 @@ const Wt = class {
|
|
|
541
553
|
defaultValue: this.defaultModule,
|
|
542
554
|
selectEntityCallback: this.selectModuleCallback,
|
|
543
555
|
ref: t => p(this, v, t, "f"),
|
|
544
|
-
onValueChanged: this.reactiveSettings.module && d(this,
|
|
556
|
+
onValueChanged: this.reactiveSettings.module && d(this, G, "f"),
|
|
545
557
|
disabled: a,
|
|
546
558
|
class: "module"
|
|
547
559
|
}), e("div", {
|
|
@@ -549,13 +561,13 @@ const Wt = class {
|
|
|
549
561
|
class: "checkboxes-options field-group"
|
|
550
562
|
}, e("ch-checkbox", {
|
|
551
563
|
caption: d(this, u, "f").header.importAs,
|
|
552
|
-
checkedValue:
|
|
564
|
+
checkedValue: kt,
|
|
553
565
|
class: "checkbox import-as-web-panels",
|
|
554
566
|
ref: t => p(this, w, t, "f"),
|
|
555
|
-
value: this.importAsWebPanels ?
|
|
567
|
+
value: this.importAsWebPanels ? kt : undefined,
|
|
556
568
|
part: "option-import-as-web-panels",
|
|
557
569
|
disabled: this.isLoading,
|
|
558
|
-
onInput: d(this,
|
|
570
|
+
onInput: d(this, Q, "f")
|
|
559
571
|
}), e("div", {
|
|
560
572
|
class: {
|
|
561
573
|
"field-group-inline": true,
|
|
@@ -564,27 +576,27 @@ const Wt = class {
|
|
|
564
576
|
}, e("ch-checkbox", {
|
|
565
577
|
// fit images
|
|
566
578
|
caption: d(this, u, "f").header.fitImages,
|
|
567
|
-
checkedValue:
|
|
579
|
+
checkedValue: kt,
|
|
568
580
|
class: "checkbox",
|
|
569
581
|
part: "fit-images-checkbox",
|
|
570
|
-
disabled:
|
|
571
|
-
onInput: d(this,
|
|
582
|
+
disabled: l,
|
|
583
|
+
onInput: d(this, J, "f")
|
|
572
584
|
}))));
|
|
573
585
|
}));
|
|
574
|
-
|
|
586
|
+
st.set(this, (() => this.messages.length > 0 && this.messages.map((t => e("p", {
|
|
575
587
|
class: {
|
|
576
588
|
"text-body-regular-m": true,
|
|
577
589
|
message: true,
|
|
578
590
|
[`message--${t.type}`]: true
|
|
579
591
|
}
|
|
580
592
|
}, t.type, ": ", t.text)))));
|
|
581
|
-
|
|
593
|
+
at.set(this, (() => {
|
|
582
594
|
var t, s;
|
|
583
595
|
if (this.isLoading || ((t = this.designData) === null || t === void 0 ? void 0 : t.success) === false) {
|
|
584
596
|
return e("div", {
|
|
585
597
|
class: "main main--loading scrollable",
|
|
586
598
|
ref: t => p(this, y, t, "f")
|
|
587
|
-
}, d(this,
|
|
599
|
+
}, d(this, st, "f").call(this), e("div", {
|
|
588
600
|
class: "text-body-regular-m spacing-body"
|
|
589
601
|
}, e("slot", {
|
|
590
602
|
name: "messages"
|
|
@@ -593,22 +605,22 @@ const Wt = class {
|
|
|
593
605
|
/* #main*/
|
|
594
606
|
return e("div", {
|
|
595
607
|
class: "main"
|
|
596
|
-
}, [ d(this,
|
|
608
|
+
}, [ d(this, ot, "f").call(this), d(this, dt, "f").call(this) ]);
|
|
597
609
|
} else {
|
|
598
610
|
return e("gx-ide-empty-state", {
|
|
599
611
|
class: "empty-state scrollable",
|
|
600
|
-
stateIconSrc:
|
|
612
|
+
stateIconSrc: vt,
|
|
601
613
|
isAnimated: d(this, b, "f"),
|
|
602
614
|
stateTitle: d(this, u, "f").messages.noDesignSelected,
|
|
603
615
|
key: "no-objects-empty-state"
|
|
604
616
|
}, e("button", {
|
|
605
617
|
// begin by selecting a file
|
|
606
618
|
class: "button-tertiary empty-state-button",
|
|
607
|
-
onClick: d(this,
|
|
619
|
+
onClick: d(this, F, "f")
|
|
608
620
|
}, d(this, u, "f").messages.selectDesign));
|
|
609
621
|
}
|
|
610
622
|
}));
|
|
611
|
-
|
|
623
|
+
ot.set(this, (() => e("ch-tree-view-render", {
|
|
612
624
|
part: "data-tree",
|
|
613
625
|
class: "tree-view",
|
|
614
626
|
id: "data-tree",
|
|
@@ -621,10 +633,10 @@ const Wt = class {
|
|
|
621
633
|
toggleCheckboxes: true,
|
|
622
634
|
checkbox: true,
|
|
623
635
|
checked: true,
|
|
624
|
-
onCheckedItemsChange: d(this,
|
|
625
|
-
onSelectedItemsChange: d(this,
|
|
636
|
+
onCheckedItemsChange: d(this, E, "f"),
|
|
637
|
+
onSelectedItemsChange: d(this, P, "f")
|
|
626
638
|
})));
|
|
627
|
-
|
|
639
|
+
nt.set(this, (() => {
|
|
628
640
|
var t;
|
|
629
641
|
const s = ((t = this.designData) === null || t === void 0 ? void 0 : t.success) !== true || this.isLoading;
|
|
630
642
|
return e("footer", {
|
|
@@ -636,7 +648,7 @@ const Wt = class {
|
|
|
636
648
|
id: "button-cancel",
|
|
637
649
|
class: "button-secondary button-cancel",
|
|
638
650
|
type: "outlined",
|
|
639
|
-
onClick: d(this,
|
|
651
|
+
onClick: d(this, Y, "f"),
|
|
640
652
|
part: "button button--cancel",
|
|
641
653
|
slot: "footer-end"
|
|
642
654
|
}, d(this, u, "f").footer.btnCancel), e("button", {
|
|
@@ -644,13 +656,13 @@ const Wt = class {
|
|
|
644
656
|
id: "button-ok",
|
|
645
657
|
class: "button-primary button-ok",
|
|
646
658
|
type: "primary-text-only",
|
|
647
|
-
onClick: !s && d(this,
|
|
659
|
+
onClick: !s && d(this, N, "f"),
|
|
648
660
|
part: "button button--ok",
|
|
649
661
|
disabled: s,
|
|
650
662
|
slot: "footer-end"
|
|
651
663
|
}, d(this, u, "f").footer.btnOk)));
|
|
652
664
|
}));
|
|
653
|
-
|
|
665
|
+
rt.set(this, (() => {
|
|
654
666
|
var t, s;
|
|
655
667
|
if (this.selectedDesignType === "panels") {
|
|
656
668
|
return ((s = (t = this.selectedDesignItem) === null || t === void 0 ? void 0 : t.composition) === null || s === void 0 ? void 0 : s.preview) ? e("div", {
|
|
@@ -662,20 +674,20 @@ const Wt = class {
|
|
|
662
674
|
})) : e("gx-ide-empty-state", {
|
|
663
675
|
class: "panel-tab__empty-state",
|
|
664
676
|
stateTitle: d(this, u, "f").messages.noPanelPreviewAvailable,
|
|
665
|
-
stateIconSrc: d(this, w, "f").value ===
|
|
677
|
+
stateIconSrc: d(this, w, "f").value === kt ? xt : Mt
|
|
666
678
|
});
|
|
667
679
|
}
|
|
668
680
|
return null;
|
|
669
681
|
}));
|
|
670
682
|
lt.set(this, (() => {
|
|
671
|
-
const t = (this.selectedDesignType ===
|
|
683
|
+
const t = (this.selectedDesignType === pt || this.selectedDesignType === ft) && this.detailTreeModel.length > 0;
|
|
672
684
|
return e("div", {
|
|
673
685
|
class: {
|
|
674
686
|
"panel-tab": true,
|
|
675
687
|
"panel-tab--controls-tree": t
|
|
676
688
|
},
|
|
677
689
|
part: "data-panel-composition-container"
|
|
678
|
-
}, d(this,
|
|
690
|
+
}, d(this, rt, "f").call(this), t ? e("ch-tree-view-render", {
|
|
679
691
|
part: "data-panel-composition-tree",
|
|
680
692
|
class: "tree-view tree-view-panel-item scrollable",
|
|
681
693
|
showLines: "last",
|
|
@@ -684,7 +696,7 @@ const Wt = class {
|
|
|
684
696
|
dropDisabled: true
|
|
685
697
|
}) : null);
|
|
686
698
|
}));
|
|
687
|
-
|
|
699
|
+
ht.set(this, (() => e("div", {
|
|
688
700
|
part: "data-panel-composition-preview",
|
|
689
701
|
class: "data-preview",
|
|
690
702
|
style: {
|
|
@@ -693,15 +705,15 @@ const Wt = class {
|
|
|
693
705
|
}, e("img", {
|
|
694
706
|
src: this.selectedDesignItem ? this.selectedDesignItem : undefined,
|
|
695
707
|
alt: "Preview",
|
|
696
|
-
class: this.selectedDesignType ===
|
|
708
|
+
class: this.selectedDesignType === ut ? "checker-board" : undefined
|
|
697
709
|
}))));
|
|
698
|
-
|
|
710
|
+
ct.set(this, (t => {
|
|
699
711
|
this.renderedTabs.clear();
|
|
700
712
|
this.renderedTabs.add(t.detail.newSelectedId);
|
|
701
713
|
this.reRenderCounter++;
|
|
702
714
|
this.activeTabs.set(this.selectedDesignType, t.detail.newSelectedId);
|
|
703
715
|
}));
|
|
704
|
-
|
|
716
|
+
dt.set(this, (() => e("ch-tab-render", {
|
|
705
717
|
// main section
|
|
706
718
|
class: {
|
|
707
719
|
tab: true,
|
|
@@ -713,45 +725,45 @@ const Wt = class {
|
|
|
713
725
|
selectedId: this.activeTabs.get(this.selectedDesignType),
|
|
714
726
|
overflow: "auto",
|
|
715
727
|
contain: "size",
|
|
716
|
-
onSelectedItemChange: d(this,
|
|
728
|
+
onSelectedItemChange: d(this, ct, "f")
|
|
717
729
|
}, e("div", {
|
|
718
|
-
slot:
|
|
730
|
+
slot: r.tokens.slot,
|
|
719
731
|
class: "spacing-body",
|
|
720
732
|
style: {
|
|
721
|
-
display: this.renderedTabs.has(
|
|
733
|
+
display: this.renderedTabs.has(r.tokens.id) ? "" : "none"
|
|
722
734
|
}
|
|
723
735
|
}, e("slot", {
|
|
724
|
-
name:
|
|
736
|
+
name: r.tokens.slot
|
|
725
737
|
})), e("div", {
|
|
726
|
-
slot:
|
|
738
|
+
slot: r.styles.slot,
|
|
727
739
|
class: "spacing-body",
|
|
728
740
|
style: {
|
|
729
|
-
display: this.renderedTabs.has(
|
|
741
|
+
display: this.renderedTabs.has(r.styles.id) ? "" : "none"
|
|
730
742
|
}
|
|
731
743
|
}, e("slot", {
|
|
732
|
-
name:
|
|
744
|
+
name: r.styles.slot
|
|
733
745
|
})), e("div", {
|
|
734
746
|
class: "composition-tab-slot scrollable",
|
|
735
|
-
slot:
|
|
747
|
+
slot: r.composition.slot,
|
|
736
748
|
style: {
|
|
737
|
-
display: this.renderedTabs.has(
|
|
749
|
+
display: this.renderedTabs.has(r.composition.id) ? "" : "none"
|
|
738
750
|
}
|
|
739
|
-
}, this.selectedDesignType ===
|
|
740
|
-
slot:
|
|
751
|
+
}, this.selectedDesignType === ut || this.selectedDesignType === bt ? d(this, ht, "f").call(this) : d(this, lt, "f").call(this)), e("div", {
|
|
752
|
+
slot: r.layout.slot,
|
|
741
753
|
class: "spacing-body",
|
|
742
754
|
style: {
|
|
743
|
-
display: this.renderedTabs.has(
|
|
755
|
+
display: this.renderedTabs.has(r.layout.id) ? "" : "none"
|
|
744
756
|
}
|
|
745
757
|
}, e("slot", {
|
|
746
|
-
name:
|
|
758
|
+
name: r.layout.slot
|
|
747
759
|
})), e("div", {
|
|
748
|
-
slot:
|
|
760
|
+
slot: r.code.slot,
|
|
749
761
|
class: "spacing-body",
|
|
750
762
|
style: {
|
|
751
|
-
display: this.renderedTabs.has(
|
|
763
|
+
display: this.renderedTabs.has(r.code.id) ? "" : "none"
|
|
752
764
|
}
|
|
753
765
|
}, e("slot", {
|
|
754
|
-
name:
|
|
766
|
+
name: r.code.slot
|
|
755
767
|
})))));
|
|
756
768
|
this.reRenderCounter = 0;
|
|
757
769
|
this.stylesAsComboBoxModel = undefined;
|
|
@@ -804,7 +816,7 @@ const Wt = class {
|
|
|
804
816
|
}
|
|
805
817
|
pathIsValidChanged(t) {
|
|
806
818
|
if (t) {
|
|
807
|
-
d(this,
|
|
819
|
+
d(this, S, "f").call(this);
|
|
808
820
|
} else {
|
|
809
821
|
// hide access token input if path is not valid
|
|
810
822
|
this.requiresAccessToken = false;
|
|
@@ -813,24 +825,24 @@ const Wt = class {
|
|
|
813
825
|
designDataChanged(t) {
|
|
814
826
|
if (t) {
|
|
815
827
|
// panels
|
|
816
|
-
const t = d(this,
|
|
817
|
-
const e = d(this, w, "f").value ===
|
|
828
|
+
const t = d(this, K, "f").call(this, this.designData.panels);
|
|
829
|
+
const e = d(this, w, "f").value === kt;
|
|
818
830
|
const s = e ? "objects/webpanel" : "objects/panel-for-sd";
|
|
819
831
|
// images
|
|
820
832
|
const i = "objects/image";
|
|
821
833
|
this.designDataTreeDataModel = [ {
|
|
822
834
|
order: 0,
|
|
823
|
-
id: `parent${
|
|
835
|
+
id: `parent${gt}${pt}`,
|
|
824
836
|
leaf: false,
|
|
825
837
|
caption: e ? d(this, u, "f").tree.webPanels : d(this, u, "f").tree.panels,
|
|
826
838
|
startImgSrc: s,
|
|
827
839
|
checkbox: true,
|
|
828
840
|
checked: true,
|
|
829
841
|
expanded: true,
|
|
830
|
-
items: d(this, f, "m",
|
|
842
|
+
items: d(this, f, "m", j).call(this, this.designData.panels, pt, s, t)
|
|
831
843
|
}, {
|
|
832
844
|
order: 1,
|
|
833
|
-
id: `parent${
|
|
845
|
+
id: `parent${gt}${ft}`,
|
|
834
846
|
leaf: false,
|
|
835
847
|
caption: d(this, u, "f").tree.stencils,
|
|
836
848
|
startImgSrc: "objects/stencil",
|
|
@@ -838,27 +850,29 @@ const Wt = class {
|
|
|
838
850
|
checked: true,
|
|
839
851
|
expanded: true,
|
|
840
852
|
items: this.designData.stencils.map((t => ({
|
|
841
|
-
id: `${t.id}${
|
|
853
|
+
id: `${t.id}${gt}${ft}`,
|
|
842
854
|
class: "object tree-view-item",
|
|
843
|
-
leaf:
|
|
855
|
+
leaf: !t.warning,
|
|
844
856
|
caption: t.name,
|
|
845
857
|
startImgSrc: "objects/stencil",
|
|
846
858
|
checkbox: true,
|
|
847
|
-
checked: true
|
|
859
|
+
checked: true,
|
|
860
|
+
expanded: true,
|
|
861
|
+
items: t.warning && d(this, $, "f").call(this, t.warning)
|
|
848
862
|
})))
|
|
849
863
|
}, {
|
|
850
864
|
order: 2,
|
|
851
|
-
id: `parent${
|
|
865
|
+
id: `parent${gt}${ut}`,
|
|
852
866
|
leaf: false,
|
|
853
867
|
caption: d(this, u, "f").tree.images,
|
|
854
868
|
startImgSrc: i,
|
|
855
869
|
checkbox: true,
|
|
856
870
|
checked: true,
|
|
857
871
|
expanded: true,
|
|
858
|
-
items: d(this, f, "m",
|
|
872
|
+
items: d(this, f, "m", j).call(this, this.designData.images, ut, i)
|
|
859
873
|
}, {
|
|
860
874
|
order: 3,
|
|
861
|
-
id: `parent${
|
|
875
|
+
id: `parent${gt}${bt}`,
|
|
862
876
|
leaf: false,
|
|
863
877
|
caption: d(this, u, "f").tree.fonts,
|
|
864
878
|
startImgSrc: "controls/font",
|
|
@@ -866,16 +880,18 @@ const Wt = class {
|
|
|
866
880
|
checked: true,
|
|
867
881
|
expanded: true,
|
|
868
882
|
items: this.designData.fonts.map((t => ({
|
|
869
|
-
id: `${t.id}${
|
|
870
|
-
leaf:
|
|
883
|
+
id: `${t.id}${gt}${bt}`,
|
|
884
|
+
leaf: !t.warning,
|
|
871
885
|
caption: t.name,
|
|
872
886
|
startImgSrc: "controls/font",
|
|
873
887
|
checkbox: true,
|
|
874
|
-
checked: true
|
|
888
|
+
checked: true,
|
|
889
|
+
expanded: true,
|
|
890
|
+
items: t.warning && d(this, $, "f").call(this, t.warning)
|
|
875
891
|
})))
|
|
876
892
|
}, {
|
|
877
893
|
order: 4,
|
|
878
|
-
id: `${this.designData.designSystem.length > 0 ? this.designData.designSystem[0].id : "parent"}${
|
|
894
|
+
id: `${this.designData.designSystem.length > 0 ? this.designData.designSystem[0].id : "parent"}${gt}${mt}`,
|
|
879
895
|
leaf: true,
|
|
880
896
|
caption: d(this, u, "f").tree.designSystem,
|
|
881
897
|
startImgSrc: "objects/dso",
|
|
@@ -887,7 +903,7 @@ const Wt = class {
|
|
|
887
903
|
pathChanged(t) {
|
|
888
904
|
var e;
|
|
889
905
|
const s = ((e = this.selectedFile) === null || e === void 0 ? void 0 : e.size) > 0;
|
|
890
|
-
const i = d(this,
|
|
906
|
+
const i = d(this, A, "f").call(this, t) || s;
|
|
891
907
|
this.pathIsValid = i;
|
|
892
908
|
}
|
|
893
909
|
accessTokenChanged(t) {
|
|
@@ -906,7 +922,7 @@ const Wt = class {
|
|
|
906
922
|
p(this, u, await n.getComponentStrings(this.el), "f");
|
|
907
923
|
p(this, g, this.extensions.map((t => `.${t}`)).join(", "), "f");
|
|
908
924
|
this.stylesChanged(this.styles);
|
|
909
|
-
d(this,
|
|
925
|
+
d(this, D, "f").call(this);
|
|
910
926
|
this.pathChanged(this.path);
|
|
911
927
|
this.styleValue = ((t = this.stylesAsComboBoxModel) === null || t === void 0 ? void 0 : t.length) > 0 ? (e = this.stylesAsComboBoxModel[0]) === null || e === void 0 ? void 0 : e.value : "";
|
|
912
928
|
}
|
|
@@ -921,10 +937,10 @@ const Wt = class {
|
|
|
921
937
|
return e(s, {
|
|
922
938
|
class: "widget"
|
|
923
939
|
}, e("ch-theme", {
|
|
924
|
-
model:
|
|
940
|
+
model: Wt
|
|
925
941
|
}), e("section", {
|
|
926
942
|
class: "section"
|
|
927
|
-
}, d(this,
|
|
943
|
+
}, d(this, et, "f").call(this), d(this, at, "f").call(this), d(this, nt, "f").call(this)));
|
|
928
944
|
}
|
|
929
945
|
static get assetsDirs() {
|
|
930
946
|
return [ "gx-ide-assets/design-import" ];
|
|
@@ -946,30 +962,34 @@ const Wt = class {
|
|
|
946
962
|
|
|
947
963
|
u = new WeakMap, m = new WeakMap, b = new WeakMap, g = new WeakMap, k = new WeakMap,
|
|
948
964
|
w = new WeakMap, v = new WeakMap, y = new WeakMap, x = new WeakMap, M = new WeakMap,
|
|
949
|
-
W = new WeakMap, _ = new WeakMap, I = new WeakMap, C = new WeakMap,
|
|
950
|
-
D = new WeakMap, S = new WeakMap,
|
|
965
|
+
W = new WeakMap, _ = new WeakMap, I = new WeakMap, C = new WeakMap, $ = new WeakMap,
|
|
966
|
+
D = new WeakMap, S = new WeakMap, T = new WeakMap, P = new WeakMap, q = new WeakMap,
|
|
951
967
|
A = new WeakMap, E = new WeakMap, F = new WeakMap, V = new WeakMap, G = new WeakMap,
|
|
952
|
-
L = new WeakMap, O = new WeakMap,
|
|
968
|
+
L = new WeakMap, O = new WeakMap, B = new WeakMap, N = new WeakMap, Y = new WeakMap,
|
|
953
969
|
J = new WeakMap, K = new WeakMap, Q = new WeakMap, R = new WeakMap, U = new WeakMap,
|
|
954
|
-
X = new WeakMap, Z = new WeakMap, tt = new WeakMap, et = new WeakMap,
|
|
955
|
-
at = new WeakMap, ot = new WeakMap, nt = new WeakMap,
|
|
956
|
-
ht = new WeakMap, ct = new WeakMap, f = new WeakSet,
|
|
970
|
+
X = new WeakMap, Z = new WeakMap, tt = new WeakMap, et = new WeakMap, st = new WeakMap,
|
|
971
|
+
at = new WeakMap, ot = new WeakMap, nt = new WeakMap, rt = new WeakMap, lt = new WeakMap,
|
|
972
|
+
ht = new WeakMap, ct = new WeakMap, dt = new WeakMap, f = new WeakSet, j = function _GxIdeImportFromDesign_recursiveDesignTreeItems(t, e, s, i = undefined) {
|
|
957
973
|
return t.map(((t, a) => {
|
|
958
974
|
var o;
|
|
959
|
-
const n =
|
|
975
|
+
const n = `${t.id}${gt}${e}`;
|
|
976
|
+
const r = ((o = t.variants) === null || o === void 0 ? void 0 : o.length) > 0;
|
|
977
|
+
const l = t.warning ? d(this, $, "f").call(this, t.warning) : [];
|
|
978
|
+
const h = !r && !t.warning;
|
|
960
979
|
return {
|
|
961
|
-
id:
|
|
962
|
-
leaf:
|
|
980
|
+
id: n,
|
|
981
|
+
leaf: h,
|
|
963
982
|
caption: t.name,
|
|
964
983
|
startImgSrc: s,
|
|
965
984
|
checkbox: true,
|
|
966
985
|
checked: true,
|
|
967
|
-
expanded:
|
|
986
|
+
expanded: !h,
|
|
968
987
|
selected: i === a,
|
|
969
|
-
|
|
988
|
+
order: a,
|
|
989
|
+
items: [ ...l, ...r ? d(this, f, "m", _GxIdeImportFromDesign_recursiveDesignTreeItems).call(this, t.variants, e, s) : [] ]
|
|
970
990
|
};
|
|
971
991
|
}));
|
|
972
|
-
},
|
|
992
|
+
}, z = function _GxIdeImportFromDesign_loadTreeItemCompositionModel(t) {
|
|
973
993
|
const e = [];
|
|
974
994
|
for (const s of t) {
|
|
975
995
|
let t = {
|
|
@@ -988,29 +1008,29 @@ ht = new WeakMap, ct = new WeakMap, f = new WeakSet, $ = function _GxIdeImportFr
|
|
|
988
1008
|
e.push(t);
|
|
989
1009
|
}
|
|
990
1010
|
return e;
|
|
991
|
-
},
|
|
1011
|
+
}, H = function _GxIdeImportFromDesign_getCodeFactory(t) {
|
|
992
1012
|
switch (t) {
|
|
993
|
-
case dt:
|
|
994
1013
|
case pt:
|
|
995
|
-
|
|
996
|
-
this.textEditorFactoryCallback("
|
|
1014
|
+
case ft:
|
|
1015
|
+
this.textEditorFactoryCallback("code", r.code.slot, this.selectedDesignItem.code);
|
|
1016
|
+
this.textEditorFactoryCallback("html", r.layout.slot, this.selectedDesignItem.layout);
|
|
997
1017
|
break;
|
|
998
1018
|
|
|
999
|
-
case
|
|
1000
|
-
this.textEditorFactoryCallback("tokens",
|
|
1001
|
-
this.textEditorFactoryCallback("styles",
|
|
1019
|
+
case mt:
|
|
1020
|
+
this.textEditorFactoryCallback("tokens", r.tokens.slot, this.selectedDesignItem.tokens);
|
|
1021
|
+
this.textEditorFactoryCallback("styles", r.styles.slot, this.selectedDesignItem.styles);
|
|
1002
1022
|
break;
|
|
1003
1023
|
}
|
|
1004
|
-
},
|
|
1024
|
+
}, it = function _GxIdeImportFromDesign_renderDetailDataTree(t) {
|
|
1005
1025
|
switch (t) {
|
|
1006
|
-
case dt:
|
|
1007
1026
|
case pt:
|
|
1008
|
-
|
|
1027
|
+
case ft:
|
|
1028
|
+
this.detailTreeModel = d(this, f, "m", z).call(this, this.selectedDesignItem.composition.controls);
|
|
1009
1029
|
break;
|
|
1010
1030
|
}
|
|
1011
1031
|
};
|
|
1012
1032
|
|
|
1013
|
-
|
|
1033
|
+
_t.style = c;
|
|
1014
1034
|
|
|
1015
|
-
export {
|
|
1016
|
-
//# sourceMappingURL=p-
|
|
1035
|
+
export { _t as gx_ide_design_import };
|
|
1036
|
+
//# sourceMappingURL=p-512147a8.entry.js.map
|