@genexus/genexus-ide-ui 3.0.1 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
- package/dist/cjs/gx-ide-file-item.cjs.entry.js +21 -2
- package/dist/cjs/gx-ide-file-item.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-file-uploader.cjs.entry.js +11 -8
- package/dist/cjs/gx-ide-file-uploader.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-launchpad.cjs.entry.js +4 -16
- package/dist/cjs/gx-ide-launchpad.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-multi-select.cjs.entry.js +113 -0
- package/dist/cjs/gx-ide-multi-select.cjs.entry.js.map +1 -0
- package/dist/cjs/gx-ide-search.cjs.entry.js +171 -0
- package/dist/cjs/gx-ide-search.cjs.entry.js.map +1 -0
- package/dist/cjs/gx-ide-ww-files.cjs.entry.js +4 -9
- package/dist/cjs/gx-ide-ww-files.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/_helpers/multi-select/gx-ide-multi-select.css +193 -0
- package/dist/collection/components/_helpers/multi-select/gx-ide-multi-select.js +209 -0
- package/dist/collection/components/_helpers/multi-select/gx-ide-multi-select.js.map +1 -0
- package/dist/collection/components/file-uploader/file-item/file-item.css +23 -28
- package/dist/collection/components/file-uploader/file-item/file-item.js +37 -1
- package/dist/collection/components/file-uploader/file-item/file-item.js.map +1 -1
- package/dist/collection/components/file-uploader/file-uploader.css +11 -22
- package/dist/collection/components/file-uploader/file-uploader.js +10 -7
- package/dist/collection/components/file-uploader/file-uploader.js.map +1 -1
- package/dist/collection/components/file-uploader/gx-ide-assets/file-uploader/langs/file-uploader.lang.en.json +7 -3
- package/dist/collection/components/file-uploader/gx-ide-assets/file-uploader/langs/file-uploader.lang.ja.json +7 -3
- package/dist/collection/components/file-uploader/gx-ide-assets/file-uploader/langs/file-uploader.lang.zh.json +8 -3
- package/dist/collection/components/launchpad/root/gx-ide-assets/launchpad/shortcuts.json +1 -26
- package/dist/collection/components/launchpad/root/launchpad.js +5 -42
- package/dist/collection/components/launchpad/root/launchpad.js.map +1 -1
- package/dist/collection/components/search/gx-ide-assets/search/langs/search.lang.en.json +37 -0
- package/dist/collection/components/search/gx-ide-assets/search/langs/search.lang.ja.json +37 -0
- package/dist/collection/components/search/gx-ide-assets/search/langs/search.lang.zh.json +37 -0
- package/dist/collection/components/search/search.css +44 -0
- package/dist/collection/components/search/search.js +275 -0
- package/dist/collection/components/search/search.js.map +1 -0
- package/dist/collection/components/ww-files/ww-files.js +4 -9
- package/dist/collection/components/ww-files/ww-files.js.map +1 -1
- package/dist/collection/testing/locale.e2e.js +4 -1
- package/dist/collection/testing/locale.e2e.js.map +1 -1
- package/dist/components/file-item.js +22 -2
- package/dist/components/file-item.js.map +1 -1
- package/dist/components/gx-ide-file-uploader.js +11 -8
- package/dist/components/gx-ide-file-uploader.js.map +1 -1
- package/dist/components/gx-ide-launchpad.js +6 -19
- package/dist/components/gx-ide-launchpad.js.map +1 -1
- package/dist/components/gx-ide-multi-select.d.ts +11 -0
- package/dist/components/gx-ide-multi-select.js +132 -0
- package/dist/components/gx-ide-multi-select.js.map +1 -0
- package/dist/components/gx-ide-search.d.ts +11 -0
- package/dist/components/gx-ide-search.js +206 -0
- package/dist/components/gx-ide-search.js.map +1 -0
- package/dist/components/gx-ide-ww-files.js +4 -9
- package/dist/components/gx-ide-ww-files.js.map +1 -1
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-file-item.entry.js +21 -2
- package/dist/esm/gx-ide-file-item.entry.js.map +1 -1
- package/dist/esm/gx-ide-file-uploader.entry.js +11 -8
- package/dist/esm/gx-ide-file-uploader.entry.js.map +1 -1
- package/dist/esm/gx-ide-launchpad.entry.js +5 -17
- package/dist/esm/gx-ide-launchpad.entry.js.map +1 -1
- package/dist/esm/gx-ide-multi-select.entry.js +109 -0
- package/dist/esm/gx-ide-multi-select.entry.js.map +1 -0
- package/dist/esm/gx-ide-search.entry.js +167 -0
- package/dist/esm/gx-ide-search.entry.js.map +1 -0
- package/dist/esm/gx-ide-ww-files.entry.js +4 -9
- package/dist/esm/gx-ide-ww-files.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/file-uploader/langs/file-uploader.lang.en.json +7 -3
- package/dist/genexus-ide-ui/gx-ide-assets/file-uploader/langs/file-uploader.lang.ja.json +7 -3
- package/dist/genexus-ide-ui/gx-ide-assets/file-uploader/langs/file-uploader.lang.zh.json +8 -3
- package/dist/genexus-ide-ui/gx-ide-assets/launchpad/shortcuts.json +1 -26
- package/dist/genexus-ide-ui/gx-ide-assets/search/langs/search.lang.en.json +37 -0
- package/dist/genexus-ide-ui/gx-ide-assets/search/langs/search.lang.ja.json +37 -0
- package/dist/genexus-ide-ui/gx-ide-assets/search/langs/search.lang.zh.json +37 -0
- package/dist/genexus-ide-ui/p-0745a565.entry.js +152 -0
- package/dist/genexus-ide-ui/p-0745a565.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-6246204f.entry.js → p-25e749c7.entry.js} +44 -57
- package/dist/genexus-ide-ui/p-25e749c7.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-60db2f02.entry.js → p-7bdeae77.entry.js} +106 -108
- package/dist/genexus-ide-ui/p-7bdeae77.entry.js.map +1 -0
- package/dist/genexus-ide-ui/p-8b5c826b.entry.js +212 -0
- package/dist/genexus-ide-ui/p-8b5c826b.entry.js.map +1 -0
- package/dist/genexus-ide-ui/p-c460c9e7.entry.js +187 -0
- package/dist/genexus-ide-ui/p-c460c9e7.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-aad714a5.entry.js → p-e2b88bea.entry.js} +70 -67
- package/dist/genexus-ide-ui/p-e2b88bea.entry.js.map +1 -0
- package/dist/types/components/_helpers/multi-select/gx-ide-multi-select.d.ts +29 -0
- package/dist/types/components/file-uploader/file-item/file-item.d.ts +2 -0
- package/dist/types/components/launchpad/root/launchpad.d.ts +0 -4
- package/dist/types/components/search/search.d.ts +59 -0
- package/dist/types/components.d.ts +121 -4
- package/package.json +1 -1
- package/dist/genexus-ide-ui/p-60db2f02.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-6246204f.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-aad714a5.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-f3c3e830.entry.js +0 -163
- package/dist/genexus-ide-ui/p-f3c3e830.entry.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as i, h as t, H as e, a as
|
|
1
|
+
import { r as i, h as t, H as e, a as s } from "./p-9b9ccd0c.js";
|
|
2
2
|
|
|
3
|
-
import { g as
|
|
3
|
+
import { g as n } from "./p-d42e842b.js";
|
|
4
4
|
|
|
5
5
|
import "./p-6534555e.js";
|
|
6
6
|
|
|
@@ -10,27 +10,27 @@ import "lit/directives/when.js";
|
|
|
10
10
|
|
|
11
11
|
import "lit/directives/if-defined.js";
|
|
12
12
|
|
|
13
|
-
import { L as
|
|
13
|
+
import { L as a } from "./p-311eedf3.js";
|
|
14
14
|
|
|
15
|
-
const o = ":host{display:grid;block-size:100%}.opacity-0{opacity:0}.gxi-hidden{display:none !important}.align-center{display:flex;align-items:center}.align-end{display:flex;align-items:end}.overflow-auto{overflow:auto}:host(.gx-ide-component){height:100% !important;display:flex !important;flex-direction:column !important}.gx-ide-main-wrapper{color:var(--gx-ide-component-text-color);font-weight:var(--font-style-regular);font-size:var(--font-size-body-m);font-family:var(--font-family-body);height:100%;display:flex;flex-direction:column;flex-grow:1;box-sizing:border-box}.buttons-container{display:flex;gap:var(--spacing-gap-m)}.giu-static-pill-icon-and-text,.giu-static-pill{background-color:var(--elevation-background-color, var(--color-accent-surface-elevation-1));padding-inline:var(--spacing-padding-m);color:var(--color-text-neutral-default);font-size:var(--font-size-body-s);line-height:var(--line-height-relaxed);font-weight:var(--font-style-regular);border-radius:4px;min-block-size:25px;display:inline-grid;align-items:center;pointer-events:none;inline-size:max-content}.giu-static-pill-icon-and-text{display:inline-grid;grid-auto-flow:column;grid-auto-columns:max-content;gap:var(--spacing-gap-m)}.tab-full-width-buttons::part(tab-list block-start),.tab-full-width-buttons::part(tab-list block-end){grid-auto-columns:1fr}.tab-full-width-buttons::part(tab block-start){justify-content:center}.tree-view::part(item__header){--icon__system_warning_warning--disabled:var(\n --icon__system_warning_warning--enabled\n )}.tabular-grid{--focus-outline-width:1px}button.button-secondary{border-color:var(--color-border-neutral-default)}:host{display:
|
|
15
|
+
const o = ":host{display:grid;block-size:100%}.opacity-0{opacity:0}.gxi-hidden{display:none !important}.align-center{display:flex;align-items:center}.align-end{display:flex;align-items:end}.overflow-auto{overflow:auto}:host(.gx-ide-component){height:100% !important;display:flex !important;flex-direction:column !important}.gx-ide-main-wrapper{color:var(--gx-ide-component-text-color);font-weight:var(--font-style-regular);font-size:var(--font-size-body-m);font-family:var(--font-family-body);height:100%;display:flex;flex-direction:column;flex-grow:1;box-sizing:border-box}.buttons-container{display:flex;gap:var(--spacing-gap-m)}.giu-static-pill-icon-and-text,.giu-static-pill{background-color:var(--elevation-background-color, var(--color-accent-surface-elevation-1));padding-inline:var(--spacing-padding-m);color:var(--color-text-neutral-default);font-size:var(--font-size-body-s);line-height:var(--line-height-relaxed);font-weight:var(--font-style-regular);border-radius:4px;min-block-size:25px;display:inline-grid;align-items:center;pointer-events:none;inline-size:max-content}.giu-static-pill-icon-and-text{display:inline-grid;grid-auto-flow:column;grid-auto-columns:max-content;gap:var(--spacing-gap-m)}.tab-full-width-buttons::part(tab-list block-start),.tab-full-width-buttons::part(tab-list block-end){grid-auto-columns:1fr}.tab-full-width-buttons::part(tab block-start){justify-content:center}.tree-view::part(item__header){--icon__system_warning_warning--disabled:var(\n --icon__system_warning_warning--enabled\n )}.tabular-grid{--focus-outline-width:1px}button.button-secondary{border-color:var(--color-border-neutral-default)}:host{display:grid;inline-size:100%;block-size:100%}.file-uploader-dialog{display:grid;grid-template-rows:1fr max-content;block-size:100%;min-block-size:0;position:relative}.file-uploader-dialog .dialog-content{min-block-size:0;overflow:auto}.file-uploader{display:flex;flex-direction:column;inline-size:100%;block-size:100%}.file-uploader__list{display:flex;flex-direction:column;inline-size:100%;block-size:100%}.file-uploader__list-header{position:sticky;top:0;z-index:1;display:flex;justify-content:space-between;align-items:center}.file-uploader__list-content{flex:1;overflow-y:auto;display:flex;flex-direction:column;gap:var(--spacing-gap-l);list-style:none;margin:0;padding:0;padding-block-end:var(--spacing-padding-l)}.file-uploader__list-title-container{display:flex;align-items:center;gap:var(--spacing-gap-xs);white-space:nowrap}.file-uploader__drop-zone{display:flex;flex-direction:column;align-items:center;justify-content:center;inline-size:100%;block-size:100%;border:2px dashed var(--color-border-neutral-default);border-radius:8px;transition:border-color 0.3s ease, background-color 0.3s ease, opacity 0.3s ease}.file-uploader__drop-zone--dragging{border-color:var(--color-accent-primary-default);background:var(--color-accent-primary-hover);opacity:0.7}.file-uploader__drop-zone .text-container{display:flex;flex-direction:column;align-items:center;gap:var(--spacing-gap-xs);margin-block-start:8px}.label-primary-row{display:flex;align-items:center;gap:var(--spacing-gap-m)}";
|
|
16
16
|
|
|
17
|
-
var l = undefined && undefined.__classPrivateFieldGet || function(i, t, e,
|
|
18
|
-
if (e === "a" && !
|
|
19
|
-
if (typeof t === "function" ? i !== t || !
|
|
20
|
-
return e === "m" ?
|
|
17
|
+
var l = undefined && undefined.__classPrivateFieldGet || function(i, t, e, s) {
|
|
18
|
+
if (e === "a" && !s) throw new TypeError("Private accessor was defined without a getter");
|
|
19
|
+
if (typeof t === "function" ? i !== t || !s : !t.has(i)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
20
|
+
return e === "m" ? s : e === "a" ? s.call(i) : s ? s.value : t.get(i);
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
var r = undefined && undefined.__classPrivateFieldSet || function(i, t, e,
|
|
24
|
-
if (
|
|
25
|
-
if (
|
|
26
|
-
if (typeof t === "function" ? i !== t || !
|
|
27
|
-
return
|
|
23
|
+
var r = undefined && undefined.__classPrivateFieldSet || function(i, t, e, s, n) {
|
|
24
|
+
if (s === "m") throw new TypeError("Private method is not writable");
|
|
25
|
+
if (s === "a" && !n) throw new TypeError("Private accessor was defined without a setter");
|
|
26
|
+
if (typeof t === "function" ? i !== t || !n : !t.has(i)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
27
|
+
return s === "a" ? n.call(i, e) : n ? n.value = e : t.set(i, e), e;
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
var d, c, h, f, p, u, v, g, b, m, w, y, x, k, _, M, z, j;
|
|
31
31
|
|
|
32
|
-
const W =
|
|
33
|
-
category: "
|
|
32
|
+
const W = n({
|
|
33
|
+
category: "system",
|
|
34
34
|
name: "add",
|
|
35
35
|
colorType: "primary"
|
|
36
36
|
});
|
|
@@ -90,9 +90,9 @@ const C = class {
|
|
|
90
90
|
const t = l(this, d, "m", v).call(this, i);
|
|
91
91
|
t.forEach((async i => {
|
|
92
92
|
var t, e;
|
|
93
|
-
const
|
|
94
|
-
const
|
|
95
|
-
id:
|
|
93
|
+
const s = l(this, p, "f").call(this);
|
|
94
|
+
const n = {
|
|
95
|
+
id: s,
|
|
96
96
|
name: i.name,
|
|
97
97
|
file: i,
|
|
98
98
|
pending: true,
|
|
@@ -101,26 +101,26 @@ const C = class {
|
|
|
101
101
|
if (!this.multiple) {
|
|
102
102
|
this.fileStates.clear();
|
|
103
103
|
}
|
|
104
|
-
this.fileStates = new Map(this.fileStates.set(
|
|
104
|
+
this.fileStates = new Map(this.fileStates.set(s, n));
|
|
105
105
|
if (this.uploadFunction) {
|
|
106
106
|
try {
|
|
107
|
-
const
|
|
108
|
-
const t = this.fileStates.get(
|
|
107
|
+
const n = this.uploadFunction(i, (i => {
|
|
108
|
+
const t = this.fileStates.get(s);
|
|
109
109
|
if (t) {
|
|
110
110
|
const e = Object.assign(Object.assign({}, t), {
|
|
111
111
|
progress: i,
|
|
112
112
|
pending: i < 100
|
|
113
113
|
});
|
|
114
|
-
this.fileStates = new Map(this.fileStates.set(
|
|
114
|
+
this.fileStates = new Map(this.fileStates.set(s, e));
|
|
115
115
|
}
|
|
116
116
|
}));
|
|
117
117
|
// Store the upload promise/object for potential cancellation
|
|
118
|
-
const
|
|
119
|
-
uploadPromise:
|
|
118
|
+
const a = Object.assign(Object.assign({}, this.fileStates.get(s)), {
|
|
119
|
+
uploadPromise: n
|
|
120
120
|
});
|
|
121
|
-
this.fileStates = new Map(this.fileStates.set(
|
|
122
|
-
const o = await
|
|
123
|
-
const l = this.fileStates.get(
|
|
121
|
+
this.fileStates = new Map(this.fileStates.set(s, a));
|
|
122
|
+
const o = await n;
|
|
123
|
+
const l = this.fileStates.get(s);
|
|
124
124
|
if (l) {
|
|
125
125
|
if (o.success && o.remoteId) {
|
|
126
126
|
const i = Object.assign(Object.assign({}, l), {
|
|
@@ -128,7 +128,7 @@ const C = class {
|
|
|
128
128
|
pending: false,
|
|
129
129
|
progress: 100
|
|
130
130
|
});
|
|
131
|
-
this.fileStates = new Map(this.fileStates.set(
|
|
131
|
+
this.fileStates = new Map(this.fileStates.set(s, i));
|
|
132
132
|
await ((t = this.fileUploadedCallback) === null || t === void 0 ? void 0 : t.call(this, {
|
|
133
133
|
name: l.name,
|
|
134
134
|
originalName: l.file.name,
|
|
@@ -139,17 +139,17 @@ const C = class {
|
|
|
139
139
|
error: ((e = o.errors) === null || e === void 0 ? void 0 : e.upload) || "Upload failed",
|
|
140
140
|
pending: false
|
|
141
141
|
});
|
|
142
|
-
this.fileStates = new Map(this.fileStates.set(
|
|
142
|
+
this.fileStates = new Map(this.fileStates.set(s, i));
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
} catch (i) {
|
|
146
|
-
const t = this.fileStates.get(
|
|
146
|
+
const t = this.fileStates.get(s);
|
|
147
147
|
if (t) {
|
|
148
148
|
const e = Object.assign(Object.assign({}, t), {
|
|
149
149
|
error: i instanceof Error ? i.message : "Unknown error occurred",
|
|
150
150
|
pending: false
|
|
151
151
|
});
|
|
152
|
-
this.fileStates = new Map(this.fileStates.set(
|
|
152
|
+
this.fileStates = new Map(this.fileStates.set(s, e));
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
}
|
|
@@ -160,24 +160,24 @@ const C = class {
|
|
|
160
160
|
}));
|
|
161
161
|
/** Handles file name change */ _.set(this, (async i => {
|
|
162
162
|
var t;
|
|
163
|
-
const {id: e, name:
|
|
164
|
-
const
|
|
165
|
-
if (
|
|
166
|
-
const i = Object.assign(Object.assign({},
|
|
167
|
-
name:
|
|
163
|
+
const {id: e, name: s} = i.detail;
|
|
164
|
+
const n = this.fileStates.get(e);
|
|
165
|
+
if (n) {
|
|
166
|
+
const i = Object.assign(Object.assign({}, n), {
|
|
167
|
+
name: s.trim(),
|
|
168
168
|
isEditing: false
|
|
169
169
|
});
|
|
170
170
|
this.fileStates = new Map(this.fileStates.set(e, i));
|
|
171
171
|
await ((t = this.fileRenamedCallback) === null || t === void 0 ? void 0 : t.call(this, {
|
|
172
172
|
fileId: e,
|
|
173
|
-
newName:
|
|
173
|
+
newName: s.trim()
|
|
174
174
|
}));
|
|
175
175
|
}
|
|
176
176
|
}));
|
|
177
177
|
/** Handles individual file cancellation or deletion */ M.set(this, (async i => {
|
|
178
|
-
var t, e,
|
|
179
|
-
const
|
|
180
|
-
const o = this.fileStates.get(
|
|
178
|
+
var t, e, s, n;
|
|
179
|
+
const a = i.detail;
|
|
180
|
+
const o = this.fileStates.get(a);
|
|
181
181
|
if (o) {
|
|
182
182
|
try {
|
|
183
183
|
if (o.pending) {
|
|
@@ -185,10 +185,10 @@ const C = class {
|
|
|
185
185
|
if (o.uploadPromise && typeof o.uploadPromise.cancel === "function") {
|
|
186
186
|
o.uploadPromise.cancel();
|
|
187
187
|
} else if (this.cancelUploadFunction) {
|
|
188
|
-
await this.cancelUploadFunction(
|
|
188
|
+
await this.cancelUploadFunction(a);
|
|
189
189
|
}
|
|
190
|
-
await ((t = this.uploadCancelledCallback) === null || t === void 0 ? void 0 : t.call(this,
|
|
191
|
-
this.fileStates.delete(
|
|
190
|
+
await ((t = this.uploadCancelledCallback) === null || t === void 0 ? void 0 : t.call(this, a));
|
|
191
|
+
this.fileStates.delete(a);
|
|
192
192
|
this.fileStates = new Map(this.fileStates);
|
|
193
193
|
} else {
|
|
194
194
|
const i = {
|
|
@@ -198,13 +198,13 @@ const C = class {
|
|
|
198
198
|
};
|
|
199
199
|
const t = await ((e = this.onBeforeDelete) === null || e === void 0 ? void 0 : e.call(this, i));
|
|
200
200
|
if (t) {
|
|
201
|
-
await ((
|
|
202
|
-
this.fileStates.delete(
|
|
201
|
+
await ((s = this.fileDeletedCallback) === null || s === void 0 ? void 0 : s.call(this, i));
|
|
202
|
+
this.fileStates.delete(a);
|
|
203
203
|
this.fileStates = new Map(this.fileStates);
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
} catch (i) {
|
|
207
|
-
await ((
|
|
207
|
+
await ((n = this.fileDeletionErrorCallback) === null || n === void 0 ? void 0 : n.call(this, {
|
|
208
208
|
fileName: o.name,
|
|
209
209
|
error: i instanceof Error ? i.message : "Unknown error occurred"
|
|
210
210
|
}));
|
|
@@ -285,7 +285,7 @@ const C = class {
|
|
|
285
285
|
this.isDragging = false;
|
|
286
286
|
}
|
|
287
287
|
/** Initializes component with locale strings */ async componentWillLoad() {
|
|
288
|
-
r(this, c, await
|
|
288
|
+
r(this, c, await a.getComponentStrings(this.el), "f");
|
|
289
289
|
}
|
|
290
290
|
/** Clears the current file selection */ async clear() {
|
|
291
291
|
var i;
|
|
@@ -302,30 +302,27 @@ const C = class {
|
|
|
302
302
|
this.fileStates.clear();
|
|
303
303
|
}
|
|
304
304
|
render() {
|
|
305
|
-
var i, n, a,
|
|
305
|
+
var i, s, n, a, o, d, f, p, u, v, k, C, E, F;
|
|
306
306
|
return t(e, {
|
|
307
307
|
class: "widget"
|
|
308
308
|
}, t("ch-theme", {
|
|
309
309
|
model: O
|
|
310
310
|
}), t("input", {
|
|
311
311
|
type: "file",
|
|
312
|
-
|
|
312
|
+
hidden: true,
|
|
313
313
|
multiple: this.multiple,
|
|
314
314
|
accept: (i = this.types) === null || i === void 0 ? void 0 : i.map((i => i.startsWith(".") ? i : `.${i}`)).join(","),
|
|
315
315
|
onChange: l(this, x, "f"),
|
|
316
316
|
ref: i => r(this, h, i, "f"),
|
|
317
317
|
"aria-hidden": "true",
|
|
318
|
-
tabIndex: -1
|
|
319
|
-
style: {
|
|
320
|
-
display: "none"
|
|
321
|
-
}
|
|
318
|
+
tabIndex: -1
|
|
322
319
|
}), t("div", {
|
|
323
320
|
class: "file-uploader-dialog"
|
|
324
321
|
}, t("div", {
|
|
325
322
|
class: "dialog-content"
|
|
326
323
|
}, this.isDragging || this.fileStates.size === 0 ? t("div", {
|
|
327
324
|
class: {
|
|
328
|
-
"file-uploader__drop-zone": true,
|
|
325
|
+
"file-uploader__drop-zone elevation-1": true,
|
|
329
326
|
"file-uploader__drop-zone--dragging": this.isDragging
|
|
330
327
|
},
|
|
331
328
|
onDragEnter: l(this, g, "f"),
|
|
@@ -341,20 +338,20 @@ const C = class {
|
|
|
341
338
|
src: W
|
|
342
339
|
}), t("label", {
|
|
343
340
|
class: "label"
|
|
344
|
-
}, this.multiple ? (
|
|
341
|
+
}, this.multiple ? (s = l(this, c, "f")) === null || s === void 0 ? void 0 : s.header.uploadButtonMultiple : (n = l(this, c, "f")) === null || n === void 0 ? void 0 : n.header.uploadButtonSingle)), t("div", {
|
|
345
342
|
class: "text-container"
|
|
346
343
|
}, t("div", {
|
|
347
344
|
class: "label-primary-row"
|
|
348
345
|
}, t("label", {
|
|
349
346
|
class: "label"
|
|
350
|
-
}, this.label || ((
|
|
347
|
+
}, this.label || ((a = l(this, c, "f")) === null || a === void 0 ? void 0 : a.header.orText)), t("label", {
|
|
351
348
|
class: "label"
|
|
352
349
|
}, (o = l(this, c, "f")) === null || o === void 0 ? void 0 : o.header.dragAndDrop)), t("span", {
|
|
353
350
|
class: "caption"
|
|
354
351
|
}, this.types && this.types.length > 0 ? (d = l(this, c, "f")) === null || d === void 0 ? void 0 : d.header.acceptedFiles.replace("{0}", this.types.join(", ")) : (f = l(this, c, "f")) === null || f === void 0 ? void 0 : f.header.allFilesAccepted))) : t("div", {
|
|
355
352
|
class: "file-uploader__list"
|
|
356
353
|
}, t("div", {
|
|
357
|
-
class: "file-uploader__list-header spacing-body-block-end"
|
|
354
|
+
class: "file-uploader__list-header elevation-1 spacing-body-block-end spacing-inline-end"
|
|
358
355
|
}, t("div", {
|
|
359
356
|
class: "file-uploader__list-title-container"
|
|
360
357
|
}, t("label", {
|
|
@@ -370,35 +367,41 @@ const C = class {
|
|
|
370
367
|
src: W
|
|
371
368
|
}), t("label", {
|
|
372
369
|
class: "label"
|
|
373
|
-
}, this.multiple ? (v = l(this, c, "f")) === null || v === void 0 ? void 0 : v.header.uploadButtonMultiple : (k = l(this, c, "f")) === null || k === void 0 ? void 0 : k.header.uploadButtonSingle))), t("
|
|
374
|
-
class: "file-uploader__list-content scrollable"
|
|
370
|
+
}, this.multiple ? (v = l(this, c, "f")) === null || v === void 0 ? void 0 : v.header.uploadButtonMultiple : (k = l(this, c, "f")) === null || k === void 0 ? void 0 : k.header.uploadButtonSingle))), t("ul", {
|
|
371
|
+
class: "file-uploader__list-content scrollable spacing-inline-end spacing-block-end",
|
|
372
|
+
"aria-live": "polite",
|
|
373
|
+
"aria-label": (C = l(this, c, "f")) === null || C === void 0 ? void 0 : C.fileList.selectedFilesAriaLabel
|
|
375
374
|
}, Array.from(this.fileStates.values()).map((i => t("gx-ide-file-item", {
|
|
376
375
|
key: i.id,
|
|
377
376
|
file: i,
|
|
378
377
|
editable: this.canEditName,
|
|
378
|
+
componentLocale: l(this, c, "f"),
|
|
379
379
|
onFileNameChange: l(this, _, "f"),
|
|
380
380
|
onFileDelete: l(this, M, "f"),
|
|
381
381
|
onFileCancel: l(this, M, "f")
|
|
382
382
|
})))))), t("div", {
|
|
383
|
-
class:
|
|
383
|
+
class: {
|
|
384
|
+
"dialog-footer": true,
|
|
385
|
+
"dialog-footer-with-border": this.fileStates.size > 0
|
|
386
|
+
}
|
|
384
387
|
}, t("div", {
|
|
385
388
|
class: "buttons-spacer"
|
|
386
389
|
}, t("button", {
|
|
387
390
|
class: "button-secondary",
|
|
388
391
|
type: "button",
|
|
389
392
|
onClick: l(this, j, "f")
|
|
390
|
-
}, (
|
|
393
|
+
}, (E = l(this, c, "f")) === null || E === void 0 ? void 0 : E.buttons.cancel), t("button", {
|
|
391
394
|
class: "button-primary",
|
|
392
395
|
type: "button",
|
|
393
396
|
onClick: l(this, z, "f"),
|
|
394
397
|
disabled: this.fileStates.size === 0 || Array.from(this.fileStates.values()).some((i => i.pending))
|
|
395
|
-
}, (
|
|
398
|
+
}, (F = l(this, c, "f")) === null || F === void 0 ? void 0 : F.buttons.confirm)))));
|
|
396
399
|
}
|
|
397
400
|
static get assetsDirs() {
|
|
398
401
|
return [ "gx-ide-assets/file-uploader" ];
|
|
399
402
|
}
|
|
400
403
|
get el() {
|
|
401
|
-
return
|
|
404
|
+
return s(this);
|
|
402
405
|
}
|
|
403
406
|
};
|
|
404
407
|
|
|
@@ -446,13 +449,13 @@ d = new WeakSet, u = function _FileUploader_isValidFile(i) {
|
|
|
446
449
|
const t = [];
|
|
447
450
|
Array.from(i).forEach((i => {
|
|
448
451
|
var e;
|
|
449
|
-
const
|
|
450
|
-
if (
|
|
452
|
+
const s = l(this, d, "m", u).call(this, i);
|
|
453
|
+
if (s.isValid) {
|
|
451
454
|
t.push(i);
|
|
452
455
|
} else {
|
|
453
456
|
(e = this.fileValidationErrorCallback) === null || e === void 0 ? void 0 : e.call(this, {
|
|
454
457
|
fileName: i.name,
|
|
455
|
-
error:
|
|
458
|
+
error: s.error
|
|
456
459
|
});
|
|
457
460
|
}
|
|
458
461
|
}));
|
|
@@ -462,4 +465,4 @@ d = new WeakSet, u = function _FileUploader_isValidFile(i) {
|
|
|
462
465
|
C.style = o;
|
|
463
466
|
|
|
464
467
|
export { C as gx_ide_file_uploader };
|
|
465
|
-
//# sourceMappingURL=p-
|
|
468
|
+
//# sourceMappingURL=p-e2b88bea.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["fileUploaderCss","PLUS_ICON","getIconPath","category","name","colorType","CSS_BUNDLES","FileUploader","_FileUploader__componentLocale","set","this","_FileUploader_fileInputEl","_FileUploader_dragCounter","_FileUploader_generateId","Math","random","toString","substr","_FileUploader_handleDragEnter","e","preventDefault","stopPropagation","__classPrivateFieldSet","_a","__classPrivateFieldGet","isDragging","_FileUploader_handleDragLeave","_FileUploader_handleDragOver","_FileUploader_handleDrop","files","dataTransfer","_FileUploader_handleFiles","call","_FileUploader_handleFileSelect","click","_FileUploader_handleFileInput","target","validFiles","_FileUploader_instances","_FileUploader_getValidFiles","forEach","async","file","id","fileState","pending","progress","multiple","fileStates","clear","Map","uploadFunction","uploadPromise","state","get","updatedState","Object","assign","stateWithPromise","result","success","remoteId","fileUploadedCallback","originalName","error","_b","errors","upload","Error","message","value","_FileUploader_handleNameChange","event","detail","updatedFile","trim","isEditing","fileRenamedCallback","fileId","newName","_FileUploader_handleFileCancel","cancel","cancelUploadFunction","uploadCancelledCallback","delete","fileToDelete","shouldDelete","onBeforeDelete","_c","fileDeletedCallback","_d","fileDeletionErrorCallback","fileName","_FileUploader_handleConfirm","hasPendingUploads","Array","from","values","some","uploadedFiles","filter","isValid","map","length","dialogConfirmedCallback","_FileUploader_handleCancel","entries","dialogCanceledCallback","componentWillLoad","Locale","getComponentStrings","el","render","h","Host","class","model","type","hidden","accept","types","startsWith","join","onChange","ref","tabIndex","size","onDragEnter","onDragLeave","onDragOver","onDrop","onClick","src","header","uploadButtonMultiple","uploadButtonSingle","label","orText","_e","dragAndDrop","_f","acceptedFiles","replace","_g","allFilesAccepted","_h","fileList","attachedFiles","_j","filesCount","_k","_l","_m","selectedFilesAriaLabel","key","editable","canEditName","componentLocale","onFileNameChange","onFileDelete","onFileCancel","_o","buttons","disabled","_p","confirm","includes","baseType","split","toLowerCase","endsWith","invalidFileType","validation","_FileUploader_isValidFile","push","fileValidationErrorCallback"],"sources":["src/components/file-uploader/file-uploader.scss?tag=gx-ide-file-uploader&encapsulation=shadow","src/components/file-uploader/file-uploader.tsx"],"sourcesContent":["@import \"../../global/gx-ide-common.scss\";\n@import \"../../global/gx-ide-mixins.scss\";\n@import \"../../global/temporary-mercury-overrides/_button.scss\";\n@import \"../../../node_modules/@genexus/mercury/dist/assets/scss/helpers.scss\";\n\n:host {\n display: grid;\n inline-size: 100%;\n block-size: 100%;\n}\n\n.file-uploader-dialog {\n display: grid;\n grid-template-rows: 1fr max-content;\n block-size: 100%;\n min-block-size: 0;\n position: relative;\n\n .dialog-content {\n min-block-size: 0;\n overflow: auto;\n }\n}\n\n.file-uploader {\n display: flex;\n flex-direction: column;\n inline-size: 100%;\n block-size: 100%;\n\n &__list {\n display: flex;\n flex-direction: column;\n inline-size: 100%;\n block-size: 100%;\n\n &-header {\n position: sticky;\n top: 0;\n z-index: 1;\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n\n &-content {\n flex: 1;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n gap: var(--spacing-gap-l);\n @include list-reset;\n padding-block-end: var(--spacing-padding-l);\n }\n }\n\n &__list-title-container {\n display: flex;\n align-items: center;\n gap: var(--spacing-gap-xs);\n white-space: nowrap;\n }\n\n &__drop-zone {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n inline-size: 100%;\n block-size: 100%;\n border: 2px dashed var(--color-border-neutral-default);\n border-radius: 8px;\n transition:\n border-color 0.3s ease,\n background-color 0.3s ease,\n opacity 0.3s ease;\n\n &--dragging {\n border-color: var(--color-accent-primary-default);\n background: var(--color-accent-primary-hover);\n opacity: 0.7;\n }\n\n .text-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--spacing-gap-xs);\n margin-block-start: 8px;\n }\n }\n}\n\n.label-primary-row {\n display: flex;\n align-items: center;\n gap: var(--spacing-gap-m);\n}\n","/* eslint-disable @stencil-community/own-methods-must-be-private */\n/* eslint-disable @stencil-community/own-props-must-be-private */\n/* STENCIL IMPORTS */\nimport {\n Component,\n Host,\n h,\n Prop,\n Element,\n State,\n Method\n} from \"@stencil/core\";\n\nimport { MercuryBundles, getIconPath } from \"@genexus/mercury\";\nimport { Locale } from \"../../common/locale\";\nimport { UploadedFile, FileUploadState, UploadResult } from \"./types\";\n\nconst PLUS_ICON = getIconPath({\n category: \"system\",\n name: \"add\",\n colorType: \"primary\"\n});\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"components/button\",\n \"components/icon\",\n \"components/list-box\",\n \"components/edit\",\n \"utils/typography\",\n \"utils/spacing\",\n \"utils/form\",\n \"utils/layout\",\n \"utils/elevation\",\n \"chameleon/scrollbar\"\n];\n\ntype FileValidationResult = {\n isValid: boolean;\n error?: string;\n};\n\n@Component({\n tag: \"gx-ide-file-uploader\",\n styleUrl: \"file-uploader.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/file-uploader\"]\n})\nexport class FileUploader {\n #_componentLocale: any;\n #fileInputEl!: HTMLInputElement;\n\n @Element() el!: HTMLGxIdeFileUploaderElement;\n\n /** Allowed file types/extensions (e.g. ['.jpg', '.png', 'image/*', 'application/pdf']) */\n @Prop() readonly types?: string[] = [];\n\n /** Whether multiple files can be selected */\n @Prop() readonly multiple: boolean = false;\n\n /** Whether file names can be edited */\n @Prop() readonly canEditName: boolean = false;\n\n /** Label to display in the uploader dialog */\n @Prop() readonly label?: string;\n\n /** Function to handle file upload */\n @Prop() readonly uploadFunction!: (\n file: File,\n progressCallback: (progress: number) => void\n ) => Promise<UploadResult>;\n\n /** Function to cancel file upload */\n @Prop() readonly cancelUploadFunction?: (fileId: string) => Promise<void>;\n\n /** Callback when a file is uploaded successfully */\n @Prop() readonly fileUploadedCallback?: (file: UploadedFile) => Promise<void>;\n\n /** Callback when the dialog is canceled */\n @Prop() readonly dialogCanceledCallback?: () => Promise<void>;\n\n /** Callback when the dialog is confirmed with files */\n @Prop() readonly dialogConfirmedCallback?: (\n files: UploadedFile[]\n ) => Promise<void>;\n\n /** Callback when upload is cancelled */\n @Prop() readonly uploadCancelledCallback?: (fileId: string) => Promise<void>;\n\n /** Callback when file is renamed */\n @Prop() readonly fileRenamedCallback?: (data: {\n fileId: string;\n newName: string;\n }) => Promise<void>;\n\n /** Callback when a file validation error occurs */\n @Prop() readonly fileValidationErrorCallback?: (data: {\n fileName: string;\n error: string;\n }) => Promise<void>;\n\n /** Callback when a file deletion error occurs */\n @Prop() readonly fileDeletionErrorCallback?: (data: {\n fileName: string;\n error: string;\n }) => Promise<void>;\n\n /** Callback when a file is deleted */\n @Prop() readonly fileDeletedCallback?: (file: UploadedFile) => Promise<void>;\n\n /** Callback before deleting a file to get confirmation */\n @Prop() readonly onBeforeDelete?: (file: UploadedFile) => Promise<boolean>;\n\n @State() private fileStates: Map<string, FileUploadState> = new Map();\n @State() private isDragging: boolean = false;\n #dragCounter = 0;\n\n /** Initializes component with locale strings */\n async componentWillLoad() {\n this.#_componentLocale = await Locale.getComponentStrings(this.el);\n }\n\n /** Generates a unique ID for file identification */\n #generateId = (): string => {\n return Math.random().toString(36).substr(2, 9);\n };\n\n /** Validates if a file matches the allowed types */\n #isValidFile(file: File): FileValidationResult {\n // If no types specified, accept any file\n if (!this.types || this.types.length === 0) {\n return { isValid: true };\n }\n\n for (const type of this.types) {\n // Handle wildcards like 'image/*'\n if (type.includes(\"/*\")) {\n const baseType = type.split(\"/\")[0];\n if (file.type.startsWith(baseType)) {\n return { isValid: true };\n }\n }\n // Handle extensions like '.jpg'\n else if (type.startsWith(\".\")) {\n if (file.name.toLowerCase().endsWith(type.toLowerCase())) {\n return { isValid: true };\n }\n }\n // Handle specific MIME types\n else if (file.type === type || file.type === `application/${type}`) {\n return { isValid: true };\n }\n }\n\n return {\n isValid: false,\n error:\n this.#_componentLocale?.errors?.invalidFileType || \"Invalid file type\"\n };\n }\n\n /** Filters valid files from a FileList */\n #getValidFiles(files: FileList): File[] {\n const validFiles: File[] = [];\n\n Array.from(files).forEach(file => {\n const validation = this.#isValidFile(file);\n if (validation.isValid) {\n validFiles.push(file);\n } else {\n this.fileValidationErrorCallback?.({\n fileName: file.name,\n error: validation.error\n });\n }\n });\n\n return validFiles;\n }\n\n /** Handles drag enter event */\n #handleDragEnter = (e: DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n this.#dragCounter++;\n this.isDragging = true;\n };\n\n /** Handles drag leave event */\n #handleDragLeave = (e: DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n this.#dragCounter--;\n if (this.#dragCounter === 0) {\n this.isDragging = false;\n }\n };\n\n /** Handles drag over event */\n #handleDragOver = (e: DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n };\n\n /** Handles drop event */\n #handleDrop = (e: DragEvent) => {\n e.preventDefault();\n e.stopPropagation();\n this.isDragging = false;\n this.#dragCounter = 0;\n\n const files = e.dataTransfer?.files;\n if (files) {\n this.#handleFiles(files);\n }\n };\n\n /** Triggers file input click */\n #handleFileSelect = () => {\n this.#fileInputEl?.click();\n };\n\n /** Handles file input change event */\n #handleFileInput = (e: Event) => {\n const files = (e.target as HTMLInputElement).files;\n if (files) {\n this.#handleFiles(files);\n }\n };\n\n /** Processes files and starts upload */\n #handleFiles = (files: FileList) => {\n const validFiles: File[] = this.#getValidFiles(files);\n\n validFiles.forEach(async file => {\n const id = this.#generateId();\n const fileState: FileUploadState = {\n id,\n name: file.name,\n file,\n pending: true,\n progress: 0\n };\n\n if (!this.multiple) {\n this.fileStates.clear();\n }\n\n this.fileStates = new Map(this.fileStates.set(id, fileState));\n\n if (this.uploadFunction) {\n try {\n const uploadPromise = this.uploadFunction(file, progress => {\n const state = this.fileStates.get(id);\n if (state) {\n const updatedState = {\n ...state,\n progress: progress,\n pending: progress < 100\n };\n this.fileStates = new Map(this.fileStates.set(id, updatedState));\n }\n });\n\n // Store the upload promise/object for potential cancellation\n const stateWithPromise = {\n ...this.fileStates.get(id),\n uploadPromise\n };\n this.fileStates = new Map(this.fileStates.set(id, stateWithPromise));\n\n const result = await uploadPromise;\n\n const state = this.fileStates.get(id);\n if (state) {\n if (result.success && result.remoteId) {\n const updatedState = {\n ...state,\n remoteId: result.remoteId,\n pending: false,\n progress: 100\n };\n this.fileStates = new Map(this.fileStates.set(id, updatedState));\n\n await this.fileUploadedCallback?.({\n name: state.name,\n originalName: state.file.name,\n remoteId: result.remoteId\n });\n } else {\n const updatedState = {\n ...state,\n error: result.errors?.upload || \"Upload failed\",\n pending: false\n };\n this.fileStates = new Map(this.fileStates.set(id, updatedState));\n }\n }\n } catch (error) {\n const state = this.fileStates.get(id);\n if (state) {\n const updatedState = {\n ...state,\n error:\n error instanceof Error\n ? error.message\n : \"Unknown error occurred\",\n pending: false\n };\n this.fileStates = new Map(this.fileStates.set(id, updatedState));\n }\n }\n }\n });\n\n if (this.#fileInputEl) {\n this.#fileInputEl.value = \"\";\n }\n };\n\n /** Handles file name change */\n #handleNameChange = async (\n event: CustomEvent<{ id: string; name: string }>\n ) => {\n const { id, name } = event.detail;\n const file = this.fileStates.get(id);\n\n if (file) {\n const updatedFile = {\n ...file,\n name: name.trim(),\n isEditing: false\n };\n\n this.fileStates = new Map(this.fileStates.set(id, updatedFile));\n await this.fileRenamedCallback?.({ fileId: id, newName: name.trim() });\n }\n };\n\n /** Handles individual file cancellation or deletion */\n #handleFileCancel = async (event: CustomEvent<string>) => {\n const id = event.detail;\n const state = this.fileStates.get(id);\n if (state) {\n try {\n if (state.pending) {\n // Cancel upload in progress\n if (\n state.uploadPromise &&\n typeof state.uploadPromise.cancel === \"function\"\n ) {\n state.uploadPromise.cancel();\n } else if (this.cancelUploadFunction) {\n await this.cancelUploadFunction(id);\n }\n\n await this.uploadCancelledCallback?.(id);\n\n this.fileStates.delete(id);\n this.fileStates = new Map(this.fileStates);\n } else {\n const fileToDelete: UploadedFile = {\n name: state.name,\n originalName: state.file.name,\n remoteId: state.remoteId\n };\n\n const shouldDelete = await this.onBeforeDelete?.(fileToDelete);\n\n if (shouldDelete) {\n await this.fileDeletedCallback?.(fileToDelete);\n this.fileStates.delete(id);\n this.fileStates = new Map(this.fileStates);\n }\n }\n } catch (error) {\n await this.fileDeletionErrorCallback?.({\n fileName: state.name,\n error:\n error instanceof Error ? error.message : \"Unknown error occurred\"\n });\n }\n }\n };\n\n /** Handles dialog confirmation */\n #handleConfirm = async () => {\n // Verificar si hay subidas en progreso\n const hasPendingUploads = Array.from(this.fileStates.values()).some(\n file => file.pending\n );\n\n if (hasPendingUploads) {\n return; // No permitir confirmar si hay subidas en progreso\n }\n\n // Obtener todos los archivos que están completamente subidos\n const uploadedFiles: UploadedFile[] = Array.from(this.fileStates.values())\n .filter(file => {\n const isValid = !file.pending && file.remoteId && !file.error;\n return isValid;\n })\n .map(file => ({\n name: file.name,\n originalName: file.file.name,\n remoteId: file.remoteId as string\n }));\n\n if (uploadedFiles.length > 0) {\n await this.dialogConfirmedCallback?.(uploadedFiles);\n }\n\n // Clear file states\n this.fileStates.clear();\n this.fileStates = new Map();\n\n // Reset file input\n if (this.#fileInputEl) {\n this.#fileInputEl.value = \"\";\n }\n };\n\n /** Handles dialog cancellation */\n #handleCancel = async () => {\n try {\n // Cancelamos todas las subidas en progreso\n for (const [id, state] of this.fileStates.entries()) {\n if (state.pending && this.cancelUploadFunction) {\n try {\n await this.cancelUploadFunction(id);\n await this.uploadCancelledCallback?.(id);\n } catch (error) {\n // Error handling for upload cancellation\n }\n }\n }\n\n // Limpiamos todos los estados\n this.fileStates.clear();\n this.fileStates = new Map();\n\n if (this.#fileInputEl) {\n this.#fileInputEl.value = \"\";\n }\n\n await this.dialogCanceledCallback?.();\n } catch (error) {\n this.fileStates.clear();\n this.fileStates = new Map();\n await this.dialogCanceledCallback?.();\n }\n };\n\n /** Clears the current file selection */\n @Method()\n async clear() {\n for (const [id, state] of this.fileStates.entries()) {\n if (state.pending && this.cancelUploadFunction) {\n try {\n await this.cancelUploadFunction(id);\n await this.uploadCancelledCallback?.(id);\n } catch (error) {\n // Error handling for upload cancellation\n }\n }\n }\n this.fileStates.clear();\n }\n\n render() {\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n {/* Native file input required: ch-edit is for text only; no Chameleon file picker. */}\n <input\n type=\"file\"\n hidden\n multiple={this.multiple}\n accept={this.types\n ?.map(type => (type.startsWith(\".\") ? type : `.${type}`))\n .join(\",\")}\n onChange={this.#handleFileInput}\n ref={el => (this.#fileInputEl = el as HTMLInputElement)}\n aria-hidden=\"true\"\n tabIndex={-1}\n />\n <div class=\"file-uploader-dialog\">\n <div class=\"dialog-content\">\n {this.isDragging || this.fileStates.size === 0 ? (\n <div\n class={{\n \"file-uploader__drop-zone elevation-1\": true,\n \"file-uploader__drop-zone--dragging\": this.isDragging\n }}\n onDragEnter={this.#handleDragEnter}\n onDragLeave={this.#handleDragLeave}\n onDragOver={this.#handleDragOver}\n onDrop={this.#handleDrop}\n >\n <button\n class=\"button-tertiary button-icon-and-text\"\n type=\"button\"\n onClick={this.#handleFileSelect}\n >\n <ch-image class=\"icon-m\" src={PLUS_ICON}></ch-image>\n <label class=\"label\">\n {this.multiple\n ? this.#_componentLocale?.header.uploadButtonMultiple\n : this.#_componentLocale?.header.uploadButtonSingle}\n </label>\n </button>\n <div class=\"text-container\">\n <div class=\"label-primary-row\">\n <label class=\"label\">\n {this.label || this.#_componentLocale?.header.orText}\n </label>\n <label class=\"label\">\n {this.#_componentLocale?.header.dragAndDrop}\n </label>\n </div>\n <span class=\"caption\">\n {this.types && this.types.length > 0\n ? this.#_componentLocale?.header.acceptedFiles.replace(\n \"{0}\",\n this.types.join(\", \")\n )\n : this.#_componentLocale?.header.allFilesAccepted}\n </span>\n </div>\n </div>\n ) : (\n <div class=\"file-uploader__list\">\n <div class=\"file-uploader__list-header elevation-1 spacing-body-block-end spacing-inline-end\">\n <div class=\"file-uploader__list-title-container\">\n <label class=\"label\">\n {this.label ||\n this.#_componentLocale?.fileList.attachedFiles}\n </label>\n <span class=\"caption\">\n {this.#_componentLocale?.fileList.filesCount.replace(\n \"{0}\",\n this.fileStates.size.toString()\n )}\n </span>\n </div>\n {this.multiple && (\n <button\n class=\"button-tertiary button-icon-and-text\"\n type=\"button\"\n onClick={this.#handleFileSelect}\n >\n <ch-image class=\"icon-m\" src={PLUS_ICON}></ch-image>\n <label class=\"label\">\n {this.multiple\n ? this.#_componentLocale?.header.uploadButtonMultiple\n : this.#_componentLocale?.header.uploadButtonSingle}\n </label>\n </button>\n )}\n </div>\n <ul\n class=\"file-uploader__list-content scrollable spacing-inline-end spacing-block-end\"\n aria-live=\"polite\"\n aria-label={this.#_componentLocale?.fileList.selectedFilesAriaLabel}\n >\n {Array.from(this.fileStates.values()).map(file => (\n <gx-ide-file-item\n key={file.id}\n file={file}\n editable={this.canEditName}\n componentLocale={this.#_componentLocale}\n onFileNameChange={this.#handleNameChange}\n onFileDelete={this.#handleFileCancel}\n onFileCancel={this.#handleFileCancel}\n />\n ))}\n </ul>\n </div>\n )}\n </div>\n <div class={{\n \"dialog-footer\": true,\n \"dialog-footer-with-border\": this.fileStates.size > 0\n }}>\n <div class=\"buttons-spacer\">\n <button\n class=\"button-secondary\"\n type=\"button\"\n onClick={this.#handleCancel}\n >\n {this.#_componentLocale?.buttons.cancel}\n </button>\n <button\n class=\"button-primary\"\n type=\"button\"\n onClick={this.#handleConfirm}\n disabled={\n this.fileStates.size === 0 ||\n Array.from(this.fileStates.values()).some(\n file => file.pending\n )\n }\n >\n {this.#_componentLocale?.buttons.confirm}\n </button>\n </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H;;;IAEX,KAAKhC,KAAK8G,SAAS9G,KAAK8G,MAAMjB,WAAW,GAAG;IAC1C,OAAO;MAAEF,SAAS;;;EAGpB,KAAK,MAAMgB,KAAQ3G,KAAK8G,OAAO;;IAE7B,IAAIH,EAAKiD,SAAS,OAAO;MACvB,MAAMC,IAAWlD,EAAKmD,MAAM,KAAK;MACjC,IAAI9H,EAAK2E,KAAKI,WAAW8C,IAAW;QAClC,OAAO;UAAElE,SAAS;;;;;UAIjB,IAAIgB,EAAKI,WAAW,MAAM;MAC7B,IAAI/E,EAAKtC,KAAKqK,cAAcC,SAASrD,EAAKoD,gBAAgB;QACxD,OAAO;UAAEpE,SAAS;;;;;UAIjB,IAAI3D,EAAK2E,SAASA,KAAQ3E,EAAK2E,SAAS,eAAeA,KAAQ;MAClE,OAAO;QAAEhB,SAAS;;;;EAItB,OAAO;IACLA,SAAS;IACTrC,SACEC,KAAA1C,IAAAC,EAAAd,MAAIF,GAAA,UAAkB,QAAAe,WAAA,aAAAA,EAAE2C,YAAM,QAAAD,WAAA,aAAAA,EAAE0G,oBAAmB;;AAEzD,GAACpI,IAAA,SAAAA,4BAGcV;EACb,MAAMQ,IAAqB;EAE3B0D,MAAMC,KAAKnE,GAAOW,SAAQE;;IACxB,MAAMkI,IAAapJ,EAAAd,MAAI4B,GAAA,KAAAuI,GAAa7I,KAAjBtB,MAAkBgC;IACrC,IAAIkI,EAAWvE,SAAS;MACtBhE,EAAWyI,KAAKpI;WACX;OACLnB,IAAAb,KAAKqK,iCAA2B,QAAAxJ,WAAA,aAAAA,EAAAS,KAAAtB,MAAG;QACjCkF,UAAUlD,EAAKtC;QACf4D,OAAO4G,EAAW5G;;;;EAKxB,OAAO3B;AACT"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { EventEmitter } from "../../../stencil-public-runtime";
|
|
2
|
+
import { ComboBoxModel } from "@genexus/chameleon-controls-library";
|
|
3
|
+
export declare class GxIdeMultiSelect {
|
|
4
|
+
#private;
|
|
5
|
+
el: HTMLGxIdeMultiSelectElement;
|
|
6
|
+
showPopover: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Model with available options to select from
|
|
9
|
+
*/
|
|
10
|
+
readonly model: ComboBoxModel;
|
|
11
|
+
/**
|
|
12
|
+
* Currently selected item values
|
|
13
|
+
*/
|
|
14
|
+
readonly value: string[];
|
|
15
|
+
/**
|
|
16
|
+
* Placeholder text when no items are selected
|
|
17
|
+
*/
|
|
18
|
+
readonly placeholder: string;
|
|
19
|
+
/**
|
|
20
|
+
* Disabled state
|
|
21
|
+
*/
|
|
22
|
+
readonly disabled: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Emitted when the selection changes
|
|
25
|
+
*/
|
|
26
|
+
gxSelectionChange: EventEmitter<string[]>;
|
|
27
|
+
componentDidLoad(): void;
|
|
28
|
+
render(): any;
|
|
29
|
+
}
|
|
@@ -6,6 +6,8 @@ export declare class FileItem {
|
|
|
6
6
|
readonly file: FileUploadState;
|
|
7
7
|
/** Whether the file name can be edited */
|
|
8
8
|
readonly editable: boolean;
|
|
9
|
+
/** Component locale strings */
|
|
10
|
+
readonly componentLocale?: any;
|
|
9
11
|
/** Callback when a file is deleted */
|
|
10
12
|
readonly fileDeletedCallback?: (fileId: string) => Promise<void>;
|
|
11
13
|
/** Callback when a file deletion error occurs */
|
|
@@ -43,10 +43,6 @@ export declare class GxIdeLaunchpad {
|
|
|
43
43
|
watchDataHandler(newValue: string | undefined): void;
|
|
44
44
|
componentWillLoad(): Promise<void>;
|
|
45
45
|
componentDidLoad(): void;
|
|
46
|
-
/**
|
|
47
|
-
* Suspends or reactivates the shortcuts
|
|
48
|
-
*/
|
|
49
|
-
suspendShortcuts(suspendShortcuts: boolean): Promise<void>;
|
|
50
46
|
/**
|
|
51
47
|
* Organizes received data and builds tab model
|
|
52
48
|
*/
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { TreeViewModel } from "@genexus/chameleon-controls-library";
|
|
2
|
+
export declare class GxIdeSearch {
|
|
3
|
+
#private;
|
|
4
|
+
el: HTMLGxIdeSearchElement;
|
|
5
|
+
/**
|
|
6
|
+
* Holds the search results as a TreeViewModel
|
|
7
|
+
*/
|
|
8
|
+
searchResultModel: TreeViewModel;
|
|
9
|
+
/**
|
|
10
|
+
* Tracks if a search has been performed
|
|
11
|
+
*/
|
|
12
|
+
hasSearched: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Tracks if a search is currently in progress
|
|
15
|
+
*/
|
|
16
|
+
isSearching: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Indicates whether a Knowledge Base is currently open
|
|
19
|
+
*/
|
|
20
|
+
readonly isKbOpen: boolean;
|
|
21
|
+
valueChangeHandler(newValue: boolean): void;
|
|
22
|
+
/**
|
|
23
|
+
* Callback to fetch search results
|
|
24
|
+
*/
|
|
25
|
+
readonly searchCallback: (searchParams: SearchParamsData) => Promise<SearchResultData[]>;
|
|
26
|
+
/**
|
|
27
|
+
* Callback invoked when a search result item is double-clicked
|
|
28
|
+
*/
|
|
29
|
+
readonly itemDoubleClickCallback?: ItemDoubleClickCallback;
|
|
30
|
+
/**
|
|
31
|
+
* Method to show or hide the settings panel, can be called from the outside to control the visibility of the settings
|
|
32
|
+
*/
|
|
33
|
+
showSettings(_show: boolean): Promise<void>;
|
|
34
|
+
componentWillLoad(): Promise<void>;
|
|
35
|
+
render(): any;
|
|
36
|
+
}
|
|
37
|
+
export type SearchResultData = {
|
|
38
|
+
objectId: string;
|
|
39
|
+
objectName: string;
|
|
40
|
+
objectTypeName: string;
|
|
41
|
+
objectModuleName: string;
|
|
42
|
+
objectUri: string;
|
|
43
|
+
objectIcon: string;
|
|
44
|
+
content: string;
|
|
45
|
+
preview: string;
|
|
46
|
+
};
|
|
47
|
+
export type SearchParamsData = {
|
|
48
|
+
moduleGuid?: string;
|
|
49
|
+
objectTypeName?: string;
|
|
50
|
+
text: string;
|
|
51
|
+
tags?: string;
|
|
52
|
+
count?: number;
|
|
53
|
+
onlyTitles: boolean;
|
|
54
|
+
includeSubModules: boolean;
|
|
55
|
+
allBranches: boolean;
|
|
56
|
+
forLLM: boolean;
|
|
57
|
+
};
|
|
58
|
+
export type ItemDoubleClickCallback = (itemId: string) => Promise<void>;
|
|
59
|
+
export type SearchCallback = (searchParams: SearchParamsData) => Promise<SearchResultData[]>;
|