@genexus/genexus-ide-ui 1.0.15 → 1.0.17
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/array-b1e04a85.js +10 -0
- package/dist/cjs/array-b1e04a85.js.map +1 -0
- package/dist/cjs/genexus-ide-ui.cjs.js +1 -1
- package/dist/cjs/gx-ide-ai-message.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-dashboard-home.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-kb-manager-import.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-new-environment.cjs.entry.js +97 -88
- package/dist/cjs/gx-ide-new-environment.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-new-kb.cjs.entry.js +83 -76
- package/dist/cjs/gx-ide-new-kb.cjs.entry.js.map +1 -1
- package/dist/cjs/gx-ide-object-selector.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-recent-news.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-start-page.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-team-dev-commit.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-team-dev-update.cjs.entry.js +1 -1
- package/dist/cjs/gx-ide-ww-images.cjs.entry.js +1 -1
- package/dist/cjs/{helpers-74cf5c16.js → helpers-b5b4a659.js} +7 -3
- package/dist/cjs/helpers-b5b4a659.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/common/array.js +6 -0
- package/dist/collection/common/array.js.map +1 -0
- package/dist/collection/common/helpers.js +6 -2
- package/dist/collection/common/helpers.js.map +1 -1
- package/dist/collection/components/new-environment/gx-ide-assets/new-environment/shortcuts.json +4 -7
- package/dist/collection/components/new-environment/new-environment.css +8 -1
- package/dist/collection/components/new-environment/new-environment.js +100 -131
- package/dist/collection/components/new-environment/new-environment.js.map +1 -1
- package/dist/collection/components/new-kb/new-kb.js +83 -114
- package/dist/collection/components/new-kb/new-kb.js.map +1 -1
- package/dist/components/array.js +8 -0
- package/dist/components/array.js.map +1 -0
- package/dist/components/gx-ide-new-environment.js +97 -91
- package/dist/components/gx-ide-new-environment.js.map +1 -1
- package/dist/components/gx-ide-new-kb.js +83 -77
- package/dist/components/gx-ide-new-kb.js.map +1 -1
- package/dist/components/helpers.js +6 -2
- package/dist/components/helpers.js.map +1 -1
- package/dist/esm/array-c52006e6.js +8 -0
- package/dist/esm/array-c52006e6.js.map +1 -0
- package/dist/esm/genexus-ide-ui.js +1 -1
- package/dist/esm/gx-ide-ai-message.entry.js +1 -1
- package/dist/esm/gx-ide-dashboard-home.entry.js +1 -1
- package/dist/esm/gx-ide-kb-manager-import.entry.js +1 -1
- package/dist/esm/gx-ide-new-environment.entry.js +97 -88
- package/dist/esm/gx-ide-new-environment.entry.js.map +1 -1
- package/dist/esm/gx-ide-new-kb.entry.js +83 -76
- package/dist/esm/gx-ide-new-kb.entry.js.map +1 -1
- package/dist/esm/gx-ide-object-selector.entry.js +1 -1
- package/dist/esm/gx-ide-recent-news.entry.js +1 -1
- package/dist/esm/gx-ide-start-page.entry.js +1 -1
- package/dist/esm/gx-ide-team-dev-commit.entry.js +1 -1
- package/dist/esm/gx-ide-team-dev-update.entry.js +1 -1
- package/dist/esm/gx-ide-ww-images.entry.js +1 -1
- package/dist/esm/{helpers-97d0509d.js → helpers-64e1dd0b.js} +7 -3
- package/dist/esm/helpers-64e1dd0b.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js +1 -1
- package/dist/genexus-ide-ui/genexus-ide-ui.esm.js.map +1 -1
- package/dist/genexus-ide-ui/gx-ide-assets/new-environment/shortcuts.json +4 -7
- package/dist/genexus-ide-ui/p-1252519a.js +7 -0
- package/dist/genexus-ide-ui/p-1252519a.js.map +1 -0
- package/dist/genexus-ide-ui/p-23c9b4e6.entry.js +434 -0
- package/dist/genexus-ide-ui/p-23c9b4e6.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-f9a00f85.entry.js → p-35c9edc0.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-92681e48.entry.js → p-36cfb4c0.entry.js} +193 -177
- package/dist/genexus-ide-ui/p-36cfb4c0.entry.js.map +1 -0
- package/dist/genexus-ide-ui/{p-90deeaa8.entry.js → p-424ed874.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-4a8910cd.entry.js → p-4546fa05.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-58409610.entry.js → p-5bff0103.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-3663c45f.entry.js → p-85f7f92d.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-7f7d93b8.entry.js → p-99d52e11.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-7f4d8db5.entry.js → p-a5d5fb4d.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-3c7371a8.entry.js → p-be640a8a.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-8ad301c4.entry.js → p-c2fdb419.entry.js} +2 -2
- package/dist/genexus-ide-ui/{p-4b6e1cf2.js → p-c339f703.js} +57 -55
- package/dist/{cjs/helpers-74cf5c16.js.map → genexus-ide-ui/p-c339f703.js.map} +1 -1
- package/dist/types/common/array.d.ts +5 -0
- package/dist/types/common/helpers.d.ts +2 -2
- package/dist/types/components/new-environment/new-environment.d.ts +6 -12
- package/dist/types/components/new-kb/new-kb.d.ts +6 -9
- package/dist/types/components.d.ts +3 -35
- package/package.json +1 -1
- package/dist/collection/components/new-kb/helpers.js +0 -4
- package/dist/collection/components/new-kb/helpers.js.map +0 -1
- package/dist/esm/helpers-97d0509d.js.map +0 -1
- package/dist/genexus-ide-ui/p-4b6e1cf2.js.map +0 -1
- package/dist/genexus-ide-ui/p-51d5cc3d.entry.js +0 -436
- package/dist/genexus-ide-ui/p-51d5cc3d.entry.js.map +0 -1
- package/dist/genexus-ide-ui/p-92681e48.entry.js.map +0 -1
- package/dist/types/components/new-kb/helpers.d.ts +0 -3
- /package/dist/genexus-ide-ui/{p-f9a00f85.entry.js.map → p-35c9edc0.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-90deeaa8.entry.js.map → p-424ed874.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-4a8910cd.entry.js.map → p-4546fa05.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-58409610.entry.js.map → p-5bff0103.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-3663c45f.entry.js.map → p-85f7f92d.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-7f7d93b8.entry.js.map → p-99d52e11.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-7f4d8db5.entry.js.map → p-a5d5fb4d.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-3c7371a8.entry.js.map → p-be640a8a.entry.js.map} +0 -0
- /package/dist/genexus-ide-ui/{p-8ad301c4.entry.js.map → p-c2fdb419.entry.js.map} +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { h as e } from "./p-aaed592c.js";
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const t = [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ];
|
|
4
4
|
|
|
5
5
|
const daysFromToday = e => {
|
|
6
|
-
const
|
|
6
|
+
const t = new Date;
|
|
7
7
|
// To calculate the time difference of two dates
|
|
8
|
-
const
|
|
8
|
+
const n = t.getTime() - e.getTime();
|
|
9
9
|
// To calculate the no. of days between two dates
|
|
10
|
-
const s =
|
|
10
|
+
const s = n / (1e3 * 3600 * 24);
|
|
11
11
|
return Math.floor(s);
|
|
12
12
|
};
|
|
13
13
|
|
|
@@ -15,33 +15,33 @@ const daysFromToday = e => {
|
|
|
15
15
|
// Date Functions
|
|
16
16
|
// - - - - - - - - - - - -
|
|
17
17
|
const isToday = e => {
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
18
|
+
const t = new Date;
|
|
19
|
+
if (t.toDateString() === e.toDateString()) {
|
|
20
20
|
return true;
|
|
21
21
|
}
|
|
22
22
|
return false;
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
const isYesterday = e => {
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
if (
|
|
26
|
+
const t = new Date;
|
|
27
|
+
t.setDate(t.getDate() - 1);
|
|
28
|
+
if (t.toDateString() === e.toDateString()) {
|
|
29
29
|
return true;
|
|
30
30
|
}
|
|
31
31
|
return false;
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
const formatDate = (e,
|
|
34
|
+
const formatDate = (e, n = "date-time") => {
|
|
35
35
|
var s;
|
|
36
|
-
let
|
|
36
|
+
let o;
|
|
37
37
|
// validate date
|
|
38
38
|
// undefined or null
|
|
39
39
|
if (e === undefined || e === null) {
|
|
40
40
|
return "";
|
|
41
41
|
}
|
|
42
42
|
// If the date object is invalid it will return 'NaN' on getTime() and NaN is never equal to itself
|
|
43
|
-
const
|
|
44
|
-
if (!
|
|
43
|
+
const r = e.getTime() === e.getTime();
|
|
44
|
+
if (!r) {
|
|
45
45
|
return "Invalid date";
|
|
46
46
|
}
|
|
47
47
|
let a = "en-US";
|
|
@@ -49,65 +49,65 @@ const formatDate = (e, t = "date-time") => {
|
|
|
49
49
|
if (c === "es") {
|
|
50
50
|
a = "es-ES";
|
|
51
51
|
}
|
|
52
|
-
|
|
52
|
+
o = e.toLocaleDateString(a);
|
|
53
53
|
const i = e.getFullYear();
|
|
54
54
|
const u = String(e.getMonth() + 1).padStart(2, "0");
|
|
55
55
|
const l = String(e.getDate()).padStart(2, "0");
|
|
56
56
|
const d = String(e.getHours()).padStart(2, "0");
|
|
57
57
|
const $ = String(e.getMinutes()).padStart(2, "0");
|
|
58
58
|
const f = `${d}:${$}`;
|
|
59
|
-
if (
|
|
60
|
-
|
|
61
|
-
} else if (
|
|
59
|
+
if (n === "date-time") {
|
|
60
|
+
o += ` / ${e.toLocaleTimeString()}`;
|
|
61
|
+
} else if (n === "date-time-short") {
|
|
62
62
|
// No seconds
|
|
63
63
|
if (a === "es-ES") {
|
|
64
|
-
|
|
64
|
+
o = `${i}-${u}-${l} ${f}`;
|
|
65
65
|
} else {
|
|
66
|
-
|
|
66
|
+
o = `${u}/${l}/${i} ${f}`;
|
|
67
67
|
}
|
|
68
68
|
} else {
|
|
69
|
-
const
|
|
69
|
+
const n = daysFromToday(e);
|
|
70
70
|
const s = new Date;
|
|
71
|
-
const
|
|
71
|
+
const r = s.getFullYear();
|
|
72
72
|
if (isToday(e)) {
|
|
73
73
|
return `Today ${f}`;
|
|
74
74
|
} else if (isYesterday(e)) {
|
|
75
75
|
return `Yesterday ${f}`;
|
|
76
|
-
} else if (
|
|
76
|
+
} else if (n <= 7) {
|
|
77
77
|
// If one week or less, just show the day of the week, and the time
|
|
78
|
-
const
|
|
79
|
-
return `${
|
|
80
|
-
} else if (
|
|
78
|
+
const n = t[e.getDay()];
|
|
79
|
+
return `${n} ${f}`;
|
|
80
|
+
} else if (r === i) {
|
|
81
81
|
// If current year, show day number and month name. Example: November 17th
|
|
82
82
|
if (a === "es-ES") {
|
|
83
|
-
|
|
83
|
+
o = `${l} de ${e.toLocaleString("es-ES", {
|
|
84
84
|
month: "long"
|
|
85
85
|
})} ${f}`;
|
|
86
86
|
} else {
|
|
87
|
-
|
|
87
|
+
o = `${e.toLocaleString("en-US", {
|
|
88
88
|
month: "long"
|
|
89
89
|
})} ${l} ${f}`;
|
|
90
90
|
}
|
|
91
91
|
} else {
|
|
92
92
|
// Display date as usual
|
|
93
|
-
|
|
93
|
+
o = formatDate(e, "date-time-short");
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
return
|
|
96
|
+
return o;
|
|
97
97
|
};
|
|
98
98
|
|
|
99
99
|
// - - - - - - - - - - - -
|
|
100
100
|
// /End of Date Functions
|
|
101
101
|
// - - - - - - - - - - - -
|
|
102
|
-
/* Count the total tree nodes (by default it does not count the first level nodes)*/ const countTreeItems = (e,
|
|
103
|
-
let
|
|
102
|
+
/* Count the total tree nodes (by default it does not count the first level nodes)*/ const countTreeItems = (e, t = false) => {
|
|
103
|
+
let n = 0;
|
|
104
104
|
e.forEach((e => {
|
|
105
|
-
|
|
105
|
+
t && n++;
|
|
106
106
|
if (e.items) {
|
|
107
|
-
|
|
107
|
+
n += countTreeItems(e.items, true);
|
|
108
108
|
}
|
|
109
109
|
}));
|
|
110
|
-
return
|
|
110
|
+
return n;
|
|
111
111
|
};
|
|
112
112
|
|
|
113
113
|
const escapeRegExp = e => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
@@ -118,21 +118,20 @@ const escapeRegExp = e => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
|
118
118
|
* @param text the string to find the filter value on
|
|
119
119
|
* @param filterValue the filter value
|
|
120
120
|
* @returns a span element
|
|
121
|
-
*/ const hiChar = function(
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
const
|
|
125
|
-
const r = new RegExp(s, "gi");
|
|
121
|
+
*/ const hiChar = function(t, n) {
|
|
122
|
+
if (t && n) {
|
|
123
|
+
const s = escapeRegExp(n);
|
|
124
|
+
const o = new RegExp(s, "gi");
|
|
126
125
|
return e("span", {
|
|
127
|
-
innerHTML:
|
|
126
|
+
innerHTML: t.replace(o, '<span class="hiChar">$&</span>')
|
|
128
127
|
});
|
|
129
128
|
} else {
|
|
130
|
-
return
|
|
129
|
+
return t;
|
|
131
130
|
}
|
|
132
131
|
};
|
|
133
132
|
|
|
134
|
-
const closeOnOutsideClickHandler = (e,
|
|
135
|
-
if (!e.composedPath().includes(
|
|
133
|
+
const closeOnOutsideClickHandler = (e, t) => {
|
|
134
|
+
if (!e.composedPath().includes(t)) {
|
|
136
135
|
return true;
|
|
137
136
|
}
|
|
138
137
|
};
|
|
@@ -142,17 +141,20 @@ const mapOptionsToComboBoxItemModel = e => e.map((e => ({
|
|
|
142
141
|
caption: e.label
|
|
143
142
|
})));
|
|
144
143
|
|
|
145
|
-
const renderChCheckboxItems = (
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
144
|
+
const renderChCheckboxItems = (t, n, s) => t === null || t === void 0 ? void 0 : t.map((t => {
|
|
145
|
+
const o = s === null || s === void 0 ? void 0 : s.find((e => t.value === e || t.id === e));
|
|
146
|
+
return e("ch-checkbox", {
|
|
147
|
+
name: t.name,
|
|
148
|
+
class: "checkbox",
|
|
149
|
+
checkedValue: t.value || t.id,
|
|
150
|
+
caption: t.label,
|
|
151
|
+
disabled: t.disabled,
|
|
152
|
+
value: o,
|
|
153
|
+
onInput: n,
|
|
154
|
+
startImgSrc: t.iconName,
|
|
155
|
+
key: t.value || t.id
|
|
156
|
+
});
|
|
157
|
+
}));
|
|
156
158
|
|
|
157
159
|
export { closeOnOutsideClickHandler as a, countTreeItems as c, formatDate as f, hiChar as h, mapOptionsToComboBoxItemModel as m, renderChCheckboxItems as r };
|
|
158
|
-
//# sourceMappingURL=p-
|
|
160
|
+
//# sourceMappingURL=p-c339f703.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"helpers-74cf5c16.js","mappings":";;;;AAUA,MAAM,UAAU,GAAG;IACjB,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;IACV,QAAQ;IACR,UAAU;CACX,CAAC;AA8EF,MAAM,aAAa,GAAG,CAAC,IAAU;IAC/B,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC;;IAEzB,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;;IAExD,MAAM,cAAc,GAAG,cAAc,IAAI,IAAI,GAAG,IAAI,GAAG,EAAE,CAAC,CAAC;IAC3D,OAAO,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;AACpC,CAAC,CAAC;AAEF;AACA;AACA;AAEA,MAAM,OAAO,GAAG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AC;QACrD,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAC;QAChD,QACEA,kBACE,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,gCAAgC,CAAC,GACvD,EACR;KACH;SAAM;QACL,OAAO,IAAI,CAAC;KACb;AACH,EAAE;MAEW,0BAA0B,GAAG,CACxC,SAAuB,EACvB,GAAgB;IAEhB,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QAC3C,OAAO,IAAI,CAAC;KACb;AACH,EAAE;MAEW,6BAA6B,GAAG,CAC3C,OAAmB,KAEnB,OAAO,CAAC,GAAG,CAAC,MAAM,KAAK;IACrB,KAAK,EAAE,MAAM,CAAC,EAAE;IAChB,OAAO,EAAE,MAAM,CAAC,KAAK;;CAEtB,CAAC,EAAE;MAEO,qBAAqB,GAAG,CACnC,OAA+B,EAC/B,KAAK,GAAG,iBAAiB,EACzB,QAAc,KAEd,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,GAAG,CAAC,MAAM,KACjBA,yBACE,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,KAAK,EAAC,UAAU,EAChB,IAAI,EAAE,GAAG,KAAK,IAAI,MAAM,CAAC,EAAE,EAAE,EAC7B,YAAY,EAAE,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,EAAE,EACvC,OAAO,EAAE,MAAM,CAAC,KAAK,EACrB,QAAQ,EAAE,MAAM,CAAC,QAAQ,EACzB,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,OAAO,EAAE,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,IAAI,EACzB,WAAW,EAAE,MAAM,CAAC,QAAQ,GACf,CAChB;;;;;;;;;","names":["h"],"sources":["src/common/helpers.tsx"],"sourcesContent":["import { h } from \"@stencil/core\";\n\nimport {\n ComboBoxModel,\n TreeViewItemModel\n} from \"@genexus/chameleon-controls-library\";\nexport type ChCheckboxArray = HTMLChCheckboxElement[] | null;\n\nimport { GxOption } from \"./types\";\n\nconst daysOfWeek = [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\"\n];\n\n/**\n * @param element an HTMLElement\n * @returns an alphabetically ordered array of all the parts and exportparts the element contains.\n */\nexport const getElementSelectorParts = (element: HTMLElement) => {\n const queries: string[] = [];\n const elementParts = element.shadowRoot?.querySelectorAll(`[part]`);\n const elementExportParts =\n element.shadowRoot?.querySelectorAll(`[exportparts]`);\n\n elementParts?.forEach(el => {\n queries.push(\n `${element.tagName.toLowerCase()}::part(${el.getAttribute(\"part\")})`\n );\n });\n elementExportParts?.forEach(el => {\n queries.push(\n ...[\n ...el.getAttribute(\"exportparts\").matchAll(/(?:[\\w-]+:)?([\\w-]+)/g)\n ].map(item => `${element.tagName.toLowerCase()}::part(${item[1]})`)\n );\n });\n\n return queries.sort();\n};\n\n/**\n * @param selector a part selector\n * @returns A reference to the element the part belongs to.\n */\nexport const querySelectorPart = (selector: string) => {\n const querySelectorDeep = (\n element: HTMLElement,\n parts: string\n ): HTMLElement => {\n const shadow = element.shadowRoot;\n const partList = parts.split(\" \");\n\n const partElement: HTMLElement = shadow.querySelector(\n partList.map(partName => `[part~=\"${partName}\"]`).join(\"\")\n );\n if (partElement) {\n return partElement;\n }\n\n const exportPartElement: HTMLElement = shadow.querySelector(\n partList.map(partName => `[exportparts*=\"${partName}\"]`).join(\"\")\n );\n if (exportPartElement) {\n const exportPartList: string[] = [];\n const exportparts = exportPartElement.getAttribute(\"exportparts\");\n\n partList.forEach(partItem => {\n const exportPartName = exportparts.match(\n `(?:([\\\\w-]+):)?(${partItem})`\n )[1];\n if (exportPartName) {\n exportPartList.push(exportPartName);\n }\n });\n\n if (partList.length === exportPartList.length) {\n return querySelectorDeep(exportPartElement, exportPartList.join(\" \"));\n }\n }\n\n return null;\n };\n\n const selectorItems = selector.match(\"(.*)::part\\\\(([^)]+)\\\\)\");\n const entity = selectorItems[1];\n const partName = selectorItems[2];\n\n return querySelectorDeep(document.querySelector(entity), partName);\n};\n\nconst daysFromToday = (date: Date): number => {\n const today = new Date();\n // To calculate the time difference of two dates\n const timeDifference = today.getTime() - date.getTime();\n // To calculate the no. of days between two dates\n const daysDifference = timeDifference / (1000 * 3600 * 24);\n return Math.floor(daysDifference);\n};\n\n// - - - - - - - - - - - -\n// Date Functions\n// - - - - - - - - - - - -\n\nconst isToday = (date: Date): boolean => {\n const today = new Date();\n if (today.toDateString() === date.toDateString()) {\n return true;\n }\n return false;\n};\n\nconst isYesterday = (date: Date): boolean => {\n const yesterday = new Date();\n yesterday.setDate(yesterday.getDate() - 1);\n if (yesterday.toDateString() === date.toDateString()) {\n return true;\n }\n return false;\n};\n\nexport const formatDate = (\n date: Date,\n type: FormatDateType = \"date-time\"\n): string => {\n let formattedDate;\n // validate date\n // undefined or null\n if (date === undefined || date === null) {\n return \"\";\n }\n // If the date object is invalid it will return 'NaN' on getTime() and NaN is never equal to itself\n const dateIsValid = date.getTime() === date.getTime();\n if (!dateIsValid) {\n return \"Invalid date\";\n }\n let locale = \"en-US\";\n const lang = document\n .getElementsByTagName(\"html\")[0]\n .getAttribute(\"lang\")\n ?.valueOf();\n if (lang === \"es\") {\n locale = \"es-ES\";\n }\n formattedDate = date.toLocaleDateString(locale);\n const year = date.getFullYear();\n const month = String(date.getMonth() + 1).padStart(2, \"0\");\n const day = String(date.getDate()).padStart(2, \"0\");\n const hours = String(date.getHours()).padStart(2, \"0\");\n const minutes = String(date.getMinutes()).padStart(2, \"0\");\n const time = `${hours}:${minutes}`;\n if (type === \"date-time\") {\n formattedDate += ` / ${date.toLocaleTimeString()}`;\n } else if (type === \"date-time-short\") {\n // No seconds\n if (locale === \"es-ES\") {\n formattedDate = `${year}-${month}-${day} ${time}`;\n } else {\n formattedDate = `${month}/${day}/${year} ${time}`;\n }\n } else if (\"pretty\") {\n const daysPassedFromToday = daysFromToday(date);\n const today = new Date();\n const currentYear = today.getFullYear();\n if (isToday(date)) {\n return `Today ${time}`;\n } else if (isYesterday(date)) {\n return `Yesterday ${time}`;\n } else if (daysPassedFromToday <= 7) {\n // If one week or less, just show the day of the week, and the time\n const day = daysOfWeek[date.getDay()];\n return `${day} ${time}`;\n } else if (currentYear === year) {\n // If current year, show day number and month name. Example: November 17th\n if (locale === \"es-ES\") {\n formattedDate = `${day} de ${date.toLocaleString(\"es-ES\", {\n month: \"long\"\n })} ${time}`;\n } else {\n formattedDate = `${date.toLocaleString(\"en-US\", {\n month: \"long\"\n })} ${day} ${time}`;\n }\n } else {\n // Display date as usual\n formattedDate = formatDate(date, \"date-time-short\");\n }\n }\n return formattedDate;\n};\n\nexport type FormatDateType =\n | \"date\"\n | \"date-time\"\n | \"date-time-short\"\n | \"pretty\";\n\n// - - - - - - - - - - - -\n// /End of Date Functions\n// - - - - - - - - - - - -\n\n/* Count the total tree nodes (by default it does not count the first level nodes)*/\nexport const countTreeItems = (\n treeModel: TreeViewItemModel[],\n children = false\n): number => {\n let totalNodes = 0;\n treeModel.forEach(node => {\n children && totalNodes++;\n if (node.items) {\n totalNodes += countTreeItems(node.items, true);\n }\n });\n return totalNodes;\n};\n\n/**\n * @description it evaluates the initial selected combo item\n * @param options an array of GxOption\n * @returns the initial combo value, which in this case is the id\n */\nexport const setInitialComboValue = (options: GxOption[]): string => {\n const selected = options.find(option => option.selected);\n if (selected) {\n return selected.value || selected.id;\n } else {\n return options[0].value || options[0].id;\n }\n};\n\nexport const escapeRegExp = (str: string) => {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n};\n\n/**\n * @description this function highlights the character(s) that match(es) the filter value.\n * hiChar comes from (hi)light (Char)acters\n * @param text the string to find the filter value on\n * @param filterValue the filter value\n * @returns a span element\n */\nexport const hiChar = function (text: string, filterValue: string) {\n // console.log(text, filterValue);\n if (text && filterValue) {\n const escapedFilterValue = escapeRegExp(filterValue);\n const re = new RegExp(escapedFilterValue, \"gi\");\n return (\n <span\n innerHTML={text.replace(re, '<span class=\"hiChar\">$&</span>')}\n ></span>\n );\n } else {\n return text;\n }\n};\n\nexport const closeOnOutsideClickHandler = (\n eventInfo: PointerEvent,\n ref: HTMLElement\n): true | void => {\n if (!eventInfo.composedPath().includes(ref)) {\n return true;\n }\n};\n\nexport const mapOptionsToComboBoxItemModel = (\n options: GxOption[]\n): ComboBoxModel =>\n options.map(option => ({\n value: option.id,\n caption: option.label\n // startImgSrc: option.iconName\n }));\n\nexport const renderChCheckboxItems = (\n options: GxOption[] | undefined,\n group = \"undefined-group\",\n callback?: any\n): any =>\n options?.map(option => (\n <ch-checkbox\n name={option.name}\n class=\"checkbox\"\n part={`${group}-${option.id}`}\n checkedValue={option.value || option.id}\n caption={option.label}\n disabled={option.disabled}\n value={option.value}\n onInput={callback ?? null}\n startImgSrc={option.iconName}\n ></ch-checkbox>\n ));\n"],"version":3}
|
|
1
|
+
{"version":3,"names":["daysOfWeek","daysFromToday","date","today","Date","timeDifference","getTime","daysDifference","Math","floor","isToday","toDateString","isYesterday","yesterday","setDate","getDate","formatDate","type","formattedDate","undefined","dateIsValid","locale","lang","_a","document","getElementsByTagName","getAttribute","valueOf","toLocaleDateString","year","getFullYear","month","String","getMonth","padStart","day","hours","getHours","minutes","getMinutes","time","toLocaleTimeString","daysPassedFromToday","currentYear","getDay","toLocaleString","countTreeItems","treeModel","children","totalNodes","forEach","node","items","escapeRegExp","str","replace","hiChar","text","filterValue","escapedFilterValue","re","RegExp","h","innerHTML","closeOnOutsideClickHandler","eventInfo","ref","composedPath","includes","mapOptionsToComboBoxItemModel","options","map","option","value","id","caption","label","renderChCheckboxItems","frontEndCheckboxInputHandler","checkedIds","find","name","class","checkedValue","disabled","onInput","startImgSrc","iconName","key"],"sources":["src/common/helpers.tsx"],"sourcesContent":["import { h } from \"@stencil/core\";\n\nimport {\n ChCheckboxCustomEvent,\n ComboBoxModel,\n TreeViewItemModel\n} from \"@genexus/chameleon-controls-library\";\nexport type ChCheckboxArray = HTMLChCheckboxElement[] | null;\n\nimport { GxOption } from \"./types\";\n\nconst daysOfWeek = [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\"\n];\n\n/**\n * @param element an HTMLElement\n * @returns an alphabetically ordered array of all the parts and exportparts the element contains.\n */\nexport const getElementSelectorParts = (element: HTMLElement) => {\n const queries: string[] = [];\n const elementParts = element.shadowRoot?.querySelectorAll(`[part]`);\n const elementExportParts =\n element.shadowRoot?.querySelectorAll(`[exportparts]`);\n\n elementParts?.forEach(el => {\n queries.push(\n `${element.tagName.toLowerCase()}::part(${el.getAttribute(\"part\")})`\n );\n });\n elementExportParts?.forEach(el => {\n queries.push(\n ...[\n ...el.getAttribute(\"exportparts\").matchAll(/(?:[\\w-]+:)?([\\w-]+)/g)\n ].map(item => `${element.tagName.toLowerCase()}::part(${item[1]})`)\n );\n });\n\n return queries.sort();\n};\n\n/**\n * @param selector a part selector\n * @returns A reference to the element the part belongs to.\n */\nexport const querySelectorPart = (selector: string) => {\n const querySelectorDeep = (\n element: HTMLElement,\n parts: string\n ): HTMLElement => {\n const shadow = element.shadowRoot;\n const partList = parts.split(\" \");\n\n const partElement: HTMLElement = shadow.querySelector(\n partList.map(partName => `[part~=\"${partName}\"]`).join(\"\")\n );\n if (partElement) {\n return partElement;\n }\n\n const exportPartElement: HTMLElement = shadow.querySelector(\n partList.map(partName => `[exportparts*=\"${partName}\"]`).join(\"\")\n );\n if (exportPartElement) {\n const exportPartList: string[] = [];\n const exportparts = exportPartElement.getAttribute(\"exportparts\");\n\n partList.forEach(partItem => {\n const exportPartName = exportparts.match(\n `(?:([\\\\w-]+):)?(${partItem})`\n )[1];\n if (exportPartName) {\n exportPartList.push(exportPartName);\n }\n });\n\n if (partList.length === exportPartList.length) {\n return querySelectorDeep(exportPartElement, exportPartList.join(\" \"));\n }\n }\n\n return null;\n };\n\n const selectorItems = selector.match(\"(.*)::part\\\\(([^)]+)\\\\)\");\n const entity = selectorItems[1];\n const partName = selectorItems[2];\n\n return querySelectorDeep(document.querySelector(entity), partName);\n};\n\nconst daysFromToday = (date: Date): number => {\n const today = new Date();\n // To calculate the time difference of two dates\n const timeDifference = today.getTime() - date.getTime();\n // To calculate the no. of days between two dates\n const daysDifference = timeDifference / (1000 * 3600 * 24);\n return Math.floor(daysDifference);\n};\n\n// - - - - - - - - - - - -\n// Date Functions\n// - - - - - - - - - - - -\n\nconst isToday = (date: Date): boolean => {\n const today = new Date();\n if (today.toDateString() === date.toDateString()) {\n return true;\n }\n return false;\n};\n\nconst isYesterday = (date: Date): boolean => {\n const yesterday = new Date();\n yesterday.setDate(yesterday.getDate() - 1);\n if (yesterday.toDateString() === date.toDateString()) {\n return true;\n }\n return false;\n};\n\nexport const formatDate = (\n date: Date,\n type: FormatDateType = \"date-time\"\n): string => {\n let formattedDate;\n // validate date\n // undefined or null\n if (date === undefined || date === null) {\n return \"\";\n }\n // If the date object is invalid it will return 'NaN' on getTime() and NaN is never equal to itself\n const dateIsValid = date.getTime() === date.getTime();\n if (!dateIsValid) {\n return \"Invalid date\";\n }\n let locale = \"en-US\";\n const lang = document\n .getElementsByTagName(\"html\")[0]\n .getAttribute(\"lang\")\n ?.valueOf();\n if (lang === \"es\") {\n locale = \"es-ES\";\n }\n formattedDate = date.toLocaleDateString(locale);\n const year = date.getFullYear();\n const month = String(date.getMonth() + 1).padStart(2, \"0\");\n const day = String(date.getDate()).padStart(2, \"0\");\n const hours = String(date.getHours()).padStart(2, \"0\");\n const minutes = String(date.getMinutes()).padStart(2, \"0\");\n const time = `${hours}:${minutes}`;\n if (type === \"date-time\") {\n formattedDate += ` / ${date.toLocaleTimeString()}`;\n } else if (type === \"date-time-short\") {\n // No seconds\n if (locale === \"es-ES\") {\n formattedDate = `${year}-${month}-${day} ${time}`;\n } else {\n formattedDate = `${month}/${day}/${year} ${time}`;\n }\n } else if (\"pretty\") {\n const daysPassedFromToday = daysFromToday(date);\n const today = new Date();\n const currentYear = today.getFullYear();\n if (isToday(date)) {\n return `Today ${time}`;\n } else if (isYesterday(date)) {\n return `Yesterday ${time}`;\n } else if (daysPassedFromToday <= 7) {\n // If one week or less, just show the day of the week, and the time\n const day = daysOfWeek[date.getDay()];\n return `${day} ${time}`;\n } else if (currentYear === year) {\n // If current year, show day number and month name. Example: November 17th\n if (locale === \"es-ES\") {\n formattedDate = `${day} de ${date.toLocaleString(\"es-ES\", {\n month: \"long\"\n })} ${time}`;\n } else {\n formattedDate = `${date.toLocaleString(\"en-US\", {\n month: \"long\"\n })} ${day} ${time}`;\n }\n } else {\n // Display date as usual\n formattedDate = formatDate(date, \"date-time-short\");\n }\n }\n return formattedDate;\n};\n\nexport type FormatDateType =\n | \"date\"\n | \"date-time\"\n | \"date-time-short\"\n | \"pretty\";\n\n// - - - - - - - - - - - -\n// /End of Date Functions\n// - - - - - - - - - - - -\n\n/* Count the total tree nodes (by default it does not count the first level nodes)*/\nexport const countTreeItems = (\n treeModel: TreeViewItemModel[],\n children = false\n): number => {\n let totalNodes = 0;\n treeModel.forEach(node => {\n children && totalNodes++;\n if (node.items) {\n totalNodes += countTreeItems(node.items, true);\n }\n });\n return totalNodes;\n};\n\n/**\n * @description it evaluates the initial selected combo item\n * @param options an array of GxOption\n * @returns the initial combo value, which in this case is the id\n */\nexport const setInitialComboValue = (options: GxOption[]): string => {\n const selected = options.find(option => option.selected);\n if (selected) {\n return selected.value || selected.id;\n } else {\n return options[0].value || options[0].id;\n }\n};\n\nexport const escapeRegExp = (str: string) => {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n};\n\n/**\n * @description this function highlights the character(s) that match(es) the filter value.\n * hiChar comes from (hi)light (Char)acters\n * @param text the string to find the filter value on\n * @param filterValue the filter value\n * @returns a span element\n */\nexport const hiChar = function (text: string, filterValue: string) {\n if (text && filterValue) {\n const escapedFilterValue = escapeRegExp(filterValue);\n const re = new RegExp(escapedFilterValue, \"gi\");\n return (\n <span\n innerHTML={text.replace(re, '<span class=\"hiChar\">$&</span>')}\n ></span>\n );\n } else {\n return text;\n }\n};\n\nexport const closeOnOutsideClickHandler = (\n eventInfo: PointerEvent,\n ref: HTMLElement\n): true | void => {\n if (!eventInfo.composedPath().includes(ref)) {\n return true;\n }\n};\n\nexport const mapOptionsToComboBoxItemModel = (\n options: GxOption[]\n): ComboBoxModel =>\n options.map(option => ({\n value: option.id,\n caption: option.label\n // startImgSrc: option.iconName\n }));\n\nexport const renderChCheckboxItems = (\n options: GxOption[] | undefined,\n frontEndCheckboxInputHandler: (\n event: ChCheckboxCustomEvent<string> | InputEvent\n ) => void,\n checkedIds: string[]\n): HTMLChCheckboxElement[] => {\n return options?.map(option => {\n const value = checkedIds?.find(\n id => option.value === id || option.id === id\n );\n return (\n <ch-checkbox\n name={option.name}\n class=\"checkbox\"\n checkedValue={option.value || option.id}\n caption={option.label}\n disabled={option.disabled}\n value={value}\n onInput={frontEndCheckboxInputHandler}\n startImgSrc={option.iconName}\n key={option.value || option.id}\n ></ch-checkbox>\n );\n });\n};\n"],"mappings":";;AAWA,MAAMA,IAAa,EACjB,UACA,UACA,WACA,aACA,YACA,UACA;;AA+EF,MAAMC,gBAAiBC;EACrB,MAAMC,IAAQ,IAAIC;;IAElB,MAAMC,IAAiBF,EAAMG,YAAYJ,EAAKI;;IAE9C,MAAMC,IAAiBF,KAAkB,MAAO,OAAO;EACvD,OAAOG,KAAKC,MAAMF;AAAe;;;;0BAOnC;MAAMG,UAAWR;EACf,MAAMC,IAAQ,IAAIC;EAClB,IAAID,EAAMQ,mBAAmBT,EAAKS,gBAAgB;IAChD,OAAO;;EAET,OAAO;AAAK;;AAGd,MAAMC,cAAeV;EACnB,MAAMW,IAAY,IAAIT;EACtBS,EAAUC,QAAQD,EAAUE,YAAY;EACxC,IAAIF,EAAUF,mBAAmBT,EAAKS,gBAAgB;IACpD,OAAO;;EAET,OAAO;AAAK;;MAGDK,aAAa,CACxBd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|
|
|
1
|
-
import { ComboBoxModel, TreeViewItemModel } from "@genexus/chameleon-controls-library";
|
|
1
|
+
import { ChCheckboxCustomEvent, ComboBoxModel, TreeViewItemModel } from "@genexus/chameleon-controls-library";
|
|
2
2
|
export type ChCheckboxArray = HTMLChCheckboxElement[] | null;
|
|
3
3
|
import { GxOption } from "./types";
|
|
4
4
|
/**
|
|
@@ -31,4 +31,4 @@ export declare const escapeRegExp: (str: string) => string;
|
|
|
31
31
|
export declare const hiChar: (text: string, filterValue: string) => any;
|
|
32
32
|
export declare const closeOnOutsideClickHandler: (eventInfo: PointerEvent, ref: HTMLElement) => true | void;
|
|
33
33
|
export declare const mapOptionsToComboBoxItemModel: (options: GxOption[]) => ComboBoxModel;
|
|
34
|
-
export declare const renderChCheckboxItems: (options: GxOption[] | undefined,
|
|
34
|
+
export declare const renderChCheckboxItems: (options: GxOption[] | undefined, frontEndCheckboxInputHandler: (event: ChCheckboxCustomEvent<string> | InputEvent) => void, checkedIds: string[]) => HTMLChCheckboxElement[];
|
|
@@ -5,11 +5,14 @@ export declare class GxIdeNewEnvironment {
|
|
|
5
5
|
#private;
|
|
6
6
|
el: HTMLGxIdeNewEnvironmentElement;
|
|
7
7
|
advancedTabIsVisible: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Allows selecting multiple generators for the front end
|
|
10
|
+
* TODO: Check if this property can be deleted, since we can call getFrontEndsCallback.
|
|
11
|
+
*/
|
|
12
|
+
frontEnds: GxOption[];
|
|
8
13
|
validatableControls: Map<string, ControlValidation>;
|
|
9
14
|
dataStoresComboBoxModel: ComboBoxModel;
|
|
10
|
-
dataStoresInitialValue: string;
|
|
11
15
|
languageComboBoxModel: ComboBoxModel;
|
|
12
|
-
languageInitialValue: string;
|
|
13
16
|
runtimesRadioGroupModel: RadioGroupModel;
|
|
14
17
|
/**
|
|
15
18
|
* Callback invoked when user wants to cancel
|
|
@@ -24,18 +27,10 @@ export declare class GxIdeNewEnvironment {
|
|
|
24
27
|
*/
|
|
25
28
|
dataStores: GxOption[];
|
|
26
29
|
dataStoresChanged(newValue: GxOption[]): void;
|
|
27
|
-
/**
|
|
28
|
-
* Allows selecting multiple generators for the front end
|
|
29
|
-
*/
|
|
30
|
-
readonly disableAdvanced: boolean;
|
|
31
30
|
/**
|
|
32
31
|
* Name of the new environment
|
|
33
32
|
*/
|
|
34
33
|
environmentName: string;
|
|
35
|
-
/**
|
|
36
|
-
* Allows selecting multiple generators for the front end
|
|
37
|
-
*/
|
|
38
|
-
frontEnds: GxOption[];
|
|
39
34
|
/**
|
|
40
35
|
* Callback invoked when user changes the language or the runtime
|
|
41
36
|
*/
|
|
@@ -78,10 +73,9 @@ export declare class GxIdeNewEnvironment {
|
|
|
78
73
|
render(): any;
|
|
79
74
|
}
|
|
80
75
|
export type CancelCallback = () => Promise<void>;
|
|
81
|
-
export type ChangedCallback = (data: NewEnvironmentData) => Promise<void>;
|
|
82
76
|
export type CreateCallback = (data: NewEnvironmentData) => Promise<FormSubmitResult>;
|
|
83
77
|
export type GetDataSourcesCallback = (selectedLanguageId: string, selectedRuntimeId: string) => Promise<GxOption[]>;
|
|
84
|
-
export type GetEnvironmentNameCallback = (selectedLanguageId: string, selectedDataSourceId: string) => Promise<string | undefined>;
|
|
78
|
+
export type GetEnvironmentNameCallback = (selectedLanguageId: string, selectedDataSourceId: string, selectedRuntimeId: string) => Promise<string | undefined>;
|
|
85
79
|
export type GetFrontEndsCallback = (selectedLanguageId: string) => Promise<GxOption[]>;
|
|
86
80
|
export interface NewEnvironmentData {
|
|
87
81
|
setAsCurrent: boolean;
|
|
@@ -3,9 +3,13 @@ import { ControlValidation } from "../../common/form-validation";
|
|
|
3
3
|
import { ComboBoxModel } from "@genexus/chameleon-controls-library";
|
|
4
4
|
export declare class GxIdeNewKb {
|
|
5
5
|
#private;
|
|
6
|
-
[key: string]: any;
|
|
7
6
|
el: HTMLGxIdeNewKbElement;
|
|
8
7
|
advancedTabIsVisible: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Allows selecting multiple generators for the front end
|
|
10
|
+
* TODO: Check if this property can be deleted, since we can call getFrontEndsCallback.
|
|
11
|
+
*/
|
|
12
|
+
frontEnds: GxOption[];
|
|
9
13
|
validatableControls: Map<string, ControlValidation>;
|
|
10
14
|
createDataInKbDisabled: boolean;
|
|
11
15
|
userNameVisible: boolean;
|
|
@@ -56,14 +60,6 @@ export declare class GxIdeNewKb {
|
|
|
56
60
|
*/
|
|
57
61
|
defaultDataSources: GxOption[];
|
|
58
62
|
watchDefaultDataSources(newValue: GxOption[]): void;
|
|
59
|
-
/**
|
|
60
|
-
* If true it displays the component title on the header
|
|
61
|
-
*/
|
|
62
|
-
readonly displayTitle = false;
|
|
63
|
-
/**
|
|
64
|
-
* It allows selecting multiple generators for the front end
|
|
65
|
-
*/
|
|
66
|
-
frontEnds: GxOption[];
|
|
67
63
|
/**
|
|
68
64
|
* Callback invoked when the user wants to cancel KB creation (‘Cancel’ button)
|
|
69
65
|
*/
|
|
@@ -121,6 +117,7 @@ export declare class GxIdeNewKb {
|
|
|
121
117
|
*/
|
|
122
118
|
readonly userName: string;
|
|
123
119
|
componentWillLoad(): Promise<void>;
|
|
120
|
+
connectedCallback(): void;
|
|
124
121
|
componentDidLoad(): void;
|
|
125
122
|
componentDidRender(): void;
|
|
126
123
|
/**
|
|
@@ -1126,18 +1126,10 @@ export namespace Components {
|
|
|
1126
1126
|
* Allows defining the DBMS to be used in the solution
|
|
1127
1127
|
*/
|
|
1128
1128
|
"dataStores": GxOption[];
|
|
1129
|
-
/**
|
|
1130
|
-
* Allows selecting multiple generators for the front end
|
|
1131
|
-
*/
|
|
1132
|
-
"disableAdvanced": boolean;
|
|
1133
1129
|
/**
|
|
1134
1130
|
* Name of the new environment
|
|
1135
1131
|
*/
|
|
1136
1132
|
"environmentName": string;
|
|
1137
|
-
/**
|
|
1138
|
-
* Allows selecting multiple generators for the front end
|
|
1139
|
-
*/
|
|
1140
|
-
"frontEnds": GxOption[];
|
|
1141
1133
|
/**
|
|
1142
1134
|
* Callback invoked when user changes the language or the runtime
|
|
1143
1135
|
*/
|
|
@@ -1201,14 +1193,6 @@ export namespace Components {
|
|
|
1201
1193
|
* It allows defining the DBMS that will be used in the solution
|
|
1202
1194
|
*/
|
|
1203
1195
|
"defaultDataSources": GxOption[];
|
|
1204
|
-
/**
|
|
1205
|
-
* If true it displays the component title on the header
|
|
1206
|
-
*/
|
|
1207
|
-
"displayTitle": false;
|
|
1208
|
-
/**
|
|
1209
|
-
* It allows selecting multiple generators for the front end
|
|
1210
|
-
*/
|
|
1211
|
-
"frontEnds": GxOption[];
|
|
1212
1196
|
/**
|
|
1213
1197
|
* Callback invoked when the user wants to cancel KB creation (‘Cancel’ button)
|
|
1214
1198
|
*/
|
|
@@ -3827,30 +3811,22 @@ declare namespace LocalJSX {
|
|
|
3827
3811
|
* Allows defining the DBMS to be used in the solution
|
|
3828
3812
|
*/
|
|
3829
3813
|
"dataStores": GxOption[];
|
|
3830
|
-
/**
|
|
3831
|
-
* Allows selecting multiple generators for the front end
|
|
3832
|
-
*/
|
|
3833
|
-
"disableAdvanced"?: boolean;
|
|
3834
3814
|
/**
|
|
3835
3815
|
* Name of the new environment
|
|
3836
3816
|
*/
|
|
3837
3817
|
"environmentName"?: string;
|
|
3838
|
-
/**
|
|
3839
|
-
* Allows selecting multiple generators for the front end
|
|
3840
|
-
*/
|
|
3841
|
-
"frontEnds": GxOption[];
|
|
3842
3818
|
/**
|
|
3843
3819
|
* Callback invoked when user changes the language or the runtime
|
|
3844
3820
|
*/
|
|
3845
|
-
"getDataSourcesCallback"
|
|
3821
|
+
"getDataSourcesCallback": GetDataSourcesCallback;
|
|
3846
3822
|
/**
|
|
3847
3823
|
* Callback invoked when user changes the language or data source
|
|
3848
3824
|
*/
|
|
3849
|
-
"getEnvironmentNameCallback"
|
|
3825
|
+
"getEnvironmentNameCallback": GetEnvironmentNameCallback;
|
|
3850
3826
|
/**
|
|
3851
3827
|
* Callback invoked when user changes the language
|
|
3852
3828
|
*/
|
|
3853
|
-
"getFrontEndsCallback"
|
|
3829
|
+
"getFrontEndsCallback": GetFrontEndsCallback;
|
|
3854
3830
|
/**
|
|
3855
3831
|
* Define if the Advanced tab should be displayed
|
|
3856
3832
|
*/
|
|
@@ -3898,14 +3874,6 @@ declare namespace LocalJSX {
|
|
|
3898
3874
|
* It allows defining the DBMS that will be used in the solution
|
|
3899
3875
|
*/
|
|
3900
3876
|
"defaultDataSources": GxOption[];
|
|
3901
|
-
/**
|
|
3902
|
-
* If true it displays the component title on the header
|
|
3903
|
-
*/
|
|
3904
|
-
"displayTitle"?: false;
|
|
3905
|
-
/**
|
|
3906
|
-
* It allows selecting multiple generators for the front end
|
|
3907
|
-
*/
|
|
3908
|
-
"frontEnds": GxOption[];
|
|
3909
3877
|
/**
|
|
3910
3878
|
* Callback invoked when the user wants to cancel KB creation (‘Cancel’ button)
|
|
3911
3879
|
*/
|
package/package.json
CHANGED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { h } from "@stencil/core";
|
|
2
|
-
export const renderChCheckboxItems = (options, group = "undefined-group", callback) => (options === null || options === void 0 ? void 0 : options.length) > 0 &&
|
|
3
|
-
options.map(option => (h("ch-checkbox", { name: option.name, class: "checkbox", part: `${group}-${option.id}`, checkedValue: option.value || option.id, caption: option.label, disabled: option.disabled, value: option.value, onInput: callback !== null && callback !== void 0 ? callback : null, startImgSrc: option.iconName })));
|
|
4
|
-
//# sourceMappingURL=helpers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/components/new-kb/helpers.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAGlC,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,OAAwB,EACxB,KAAK,GAAG,iBAAiB,EACzB,QAAc,EACT,EAAE,CACP,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,IAAG,CAAC;IACnB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CACpB,mBACE,IAAI,EAAE,MAAM,CAAC,IAAI,EACjB,KAAK,EAAC,UAAU,EAChB,IAAI,EAAE,GAAG,KAAK,IAAI,MAAM,CAAC,EAAE,EAAE,EAC7B,YAAY,EAAE,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,EAAE,EACvC,OAAO,EAAE,MAAM,CAAC,KAAK,EACrB,QAAQ,EAAE,MAAM,CAAC,QAAQ,EACzB,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,OAAO,EAAE,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,IAAI,EACzB,WAAW,EAAE,MAAM,CAAC,QAAQ,GACf,CAChB,CAAC,CAAC","sourcesContent":["import { GxOption } from \"../..\";\nimport { h } from \"@stencil/core\";\nexport type ChCheckboxArray = HTMLChCheckboxElement[] | null;\n\nexport const renderChCheckboxItems = (\n options: Array<GxOption>,\n group = \"undefined-group\",\n callback?: any\n): any =>\n options?.length > 0 &&\n options.map(option => (\n <ch-checkbox\n name={option.name}\n class=\"checkbox\"\n part={`${group}-${option.id}`}\n checkedValue={option.value || option.id}\n caption={option.label}\n disabled={option.disabled}\n value={option.value}\n onInput={callback ?? null}\n startImgSrc={option.iconName}\n ></ch-checkbox>\n ));\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"helpers-97d0509d.js","mappings":";;AAUA,MAAM,UAAU,GAAG;IACjB,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,WAAW;IACX,UAAU;IACV,QAAQ;IACR,UAAU;CACX,CAAC;AA8EF,MAAM,aAAa,GAAG,CAAC,IAAU;IAC/B,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC;;IAEzB,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;;IAExD,MAAM,cAAc,GAAG,cAAc,IAAI,IAAI,GAAG,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GACf,CAChB;;;;","names":[],"sources":["src/common/helpers.tsx"],"sourcesContent":["import { h } from \"@stencil/core\";\n\nimport {\n ComboBoxModel,\n TreeViewItemModel\n} from \"@genexus/chameleon-controls-library\";\nexport type ChCheckboxArray = HTMLChCheckboxElement[] | null;\n\nimport { GxOption } from \"./types\";\n\nconst daysOfWeek = [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\"\n];\n\n/**\n * @param element an HTMLElement\n * @returns an alphabetically ordered array of all the parts and exportparts the element contains.\n */\nexport const getElementSelectorParts = (element: HTMLElement) => {\n const queries: string[] = [];\n const elementParts = element.shadowRoot?.querySelectorAll(`[part]`);\n const elementExportParts =\n element.shadowRoot?.querySelectorAll(`[exportparts]`);\n\n elementParts?.forEach(el => {\n queries.push(\n `${element.tagName.toLowerCase()}::part(${el.getAttribute(\"part\")})`\n );\n });\n elementExportParts?.forEach(el => {\n queries.push(\n ...[\n ...el.getAttribute(\"exportparts\").matchAll(/(?:[\\w-]+:)?([\\w-]+)/g)\n ].map(item => `${element.tagName.toLowerCase()}::part(${item[1]})`)\n );\n });\n\n return queries.sort();\n};\n\n/**\n * @param selector a part selector\n * @returns A reference to the element the part belongs to.\n */\nexport const querySelectorPart = (selector: string) => {\n const querySelectorDeep = (\n element: HTMLElement,\n parts: string\n ): HTMLElement => {\n const shadow = element.shadowRoot;\n const partList = parts.split(\" \");\n\n const partElement: HTMLElement = shadow.querySelector(\n partList.map(partName => `[part~=\"${partName}\"]`).join(\"\")\n );\n if (partElement) {\n return partElement;\n }\n\n const exportPartElement: HTMLElement = shadow.querySelector(\n partList.map(partName => `[exportparts*=\"${partName}\"]`).join(\"\")\n );\n if (exportPartElement) {\n const exportPartList: string[] = [];\n const exportparts = exportPartElement.getAttribute(\"exportparts\");\n\n partList.forEach(partItem => {\n const exportPartName = exportparts.match(\n `(?:([\\\\w-]+):)?(${partItem})`\n )[1];\n if (exportPartName) {\n exportPartList.push(exportPartName);\n }\n });\n\n if (partList.length === exportPartList.length) {\n return querySelectorDeep(exportPartElement, exportPartList.join(\" \"));\n }\n }\n\n return null;\n };\n\n const selectorItems = selector.match(\"(.*)::part\\\\(([^)]+)\\\\)\");\n const entity = selectorItems[1];\n const partName = selectorItems[2];\n\n return querySelectorDeep(document.querySelector(entity), partName);\n};\n\nconst daysFromToday = (date: Date): number => {\n const today = new Date();\n // To calculate the time difference of two dates\n const timeDifference = today.getTime() - date.getTime();\n // To calculate the no. of days between two dates\n const daysDifference = timeDifference / (1000 * 3600 * 24);\n return Math.floor(daysDifference);\n};\n\n// - - - - - - - - - - - -\n// Date Functions\n// - - - - - - - - - - - -\n\nconst isToday = (date: Date): boolean => {\n const today = new Date();\n if (today.toDateString() === date.toDateString()) {\n return true;\n }\n return false;\n};\n\nconst isYesterday = (date: Date): boolean => {\n const yesterday = new Date();\n yesterday.setDate(yesterday.getDate() - 1);\n if (yesterday.toDateString() === date.toDateString()) {\n return true;\n }\n return false;\n};\n\nexport const formatDate = (\n date: Date,\n type: FormatDateType = \"date-time\"\n): string => {\n let formattedDate;\n // validate date\n // undefined or null\n if (date === undefined || date === null) {\n return \"\";\n }\n // If the date object is invalid it will return 'NaN' on getTime() and NaN is never equal to itself\n const dateIsValid = date.getTime() === date.getTime();\n if (!dateIsValid) {\n return \"Invalid date\";\n }\n let locale = \"en-US\";\n const lang = document\n .getElementsByTagName(\"html\")[0]\n .getAttribute(\"lang\")\n ?.valueOf();\n if (lang === \"es\") {\n locale = \"es-ES\";\n }\n formattedDate = date.toLocaleDateString(locale);\n const year = date.getFullYear();\n const month = String(date.getMonth() + 1).padStart(2, \"0\");\n const day = String(date.getDate()).padStart(2, \"0\");\n const hours = String(date.getHours()).padStart(2, \"0\");\n const minutes = String(date.getMinutes()).padStart(2, \"0\");\n const time = `${hours}:${minutes}`;\n if (type === \"date-time\") {\n formattedDate += ` / ${date.toLocaleTimeString()}`;\n } else if (type === \"date-time-short\") {\n // No seconds\n if (locale === \"es-ES\") {\n formattedDate = `${year}-${month}-${day} ${time}`;\n } else {\n formattedDate = `${month}/${day}/${year} ${time}`;\n }\n } else if (\"pretty\") {\n const daysPassedFromToday = daysFromToday(date);\n const today = new Date();\n const currentYear = today.getFullYear();\n if (isToday(date)) {\n return `Today ${time}`;\n } else if (isYesterday(date)) {\n return `Yesterday ${time}`;\n } else if (daysPassedFromToday <= 7) {\n // If one week or less, just show the day of the week, and the time\n const day = daysOfWeek[date.getDay()];\n return `${day} ${time}`;\n } else if (currentYear === year) {\n // If current year, show day number and month name. Example: November 17th\n if (locale === \"es-ES\") {\n formattedDate = `${day} de ${date.toLocaleString(\"es-ES\", {\n month: \"long\"\n })} ${time}`;\n } else {\n formattedDate = `${date.toLocaleString(\"en-US\", {\n month: \"long\"\n })} ${day} ${time}`;\n }\n } else {\n // Display date as usual\n formattedDate = formatDate(date, \"date-time-short\");\n }\n }\n return formattedDate;\n};\n\nexport type FormatDateType =\n | \"date\"\n | \"date-time\"\n | \"date-time-short\"\n | \"pretty\";\n\n// - - - - - - - - - - - -\n// /End of Date Functions\n// - - - - - - - - - - - -\n\n/* Count the total tree nodes (by default it does not count the first level nodes)*/\nexport const countTreeItems = (\n treeModel: TreeViewItemModel[],\n children = false\n): number => {\n let totalNodes = 0;\n treeModel.forEach(node => {\n children && totalNodes++;\n if (node.items) {\n totalNodes += countTreeItems(node.items, true);\n }\n });\n return totalNodes;\n};\n\n/**\n * @description it evaluates the initial selected combo item\n * @param options an array of GxOption\n * @returns the initial combo value, which in this case is the id\n */\nexport const setInitialComboValue = (options: GxOption[]): string => {\n const selected = options.find(option => option.selected);\n if (selected) {\n return selected.value || selected.id;\n } else {\n return options[0].value || options[0].id;\n }\n};\n\nexport const escapeRegExp = (str: string) => {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n};\n\n/**\n * @description this function highlights the character(s) that match(es) the filter value.\n * hiChar comes from (hi)light (Char)acters\n * @param text the string to find the filter value on\n * @param filterValue the filter value\n * @returns a span element\n */\nexport const hiChar = function (text: string, filterValue: string) {\n // console.log(text, filterValue);\n if (text && filterValue) {\n const escapedFilterValue = escapeRegExp(filterValue);\n const re = new RegExp(escapedFilterValue, \"gi\");\n return (\n <span\n innerHTML={text.replace(re, '<span class=\"hiChar\">$&</span>')}\n ></span>\n );\n } else {\n return text;\n }\n};\n\nexport const closeOnOutsideClickHandler = (\n eventInfo: PointerEvent,\n ref: HTMLElement\n): true | void => {\n if (!eventInfo.composedPath().includes(ref)) {\n return true;\n }\n};\n\nexport const mapOptionsToComboBoxItemModel = (\n options: GxOption[]\n): ComboBoxModel =>\n options.map(option => ({\n value: option.id,\n caption: option.label\n // startImgSrc: option.iconName\n }));\n\nexport const renderChCheckboxItems = (\n options: GxOption[] | undefined,\n group = \"undefined-group\",\n callback?: any\n): any =>\n options?.map(option => (\n <ch-checkbox\n name={option.name}\n class=\"checkbox\"\n part={`${group}-${option.id}`}\n checkedValue={option.value || option.id}\n caption={option.label}\n disabled={option.disabled}\n value={option.value}\n onInput={callback ?? null}\n startImgSrc={option.iconName}\n ></ch-checkbox>\n ));\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["daysOfWeek","daysFromToday","date","today","Date","timeDifference","getTime","daysDifference","Math","floor","isToday","toDateString","isYesterday","yesterday","setDate","getDate","formatDate","type","formattedDate","undefined","dateIsValid","locale","lang","_a","document","getElementsByTagName","getAttribute","valueOf","toLocaleDateString","year","getFullYear","month","String","getMonth","padStart","day","hours","getHours","minutes","getMinutes","time","toLocaleTimeString","daysPassedFromToday","currentYear","getDay","toLocaleString","countTreeItems","treeModel","children","totalNodes","forEach","node","items","escapeRegExp","str","replace","hiChar","text","filterValue","escapedFilterValue","re","RegExp","h","innerHTML","closeOnOutsideClickHandler","eventInfo","ref","composedPath","includes","mapOptionsToComboBoxItemModel","options","map","option","value","id","caption","label","renderChCheckboxItems","group","callback","name","class","part","checkedValue","disabled","onInput","startImgSrc","iconName"],"sources":["src/common/helpers.tsx"],"sourcesContent":["import { h } from \"@stencil/core\";\n\nimport {\n ComboBoxModel,\n TreeViewItemModel\n} from \"@genexus/chameleon-controls-library\";\nexport type ChCheckboxArray = HTMLChCheckboxElement[] | null;\n\nimport { GxOption } from \"./types\";\n\nconst daysOfWeek = [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\"\n];\n\n/**\n * @param element an HTMLElement\n * @returns an alphabetically ordered array of all the parts and exportparts the element contains.\n */\nexport const getElementSelectorParts = (element: HTMLElement) => {\n const queries: string[] = [];\n const elementParts = element.shadowRoot?.querySelectorAll(`[part]`);\n const elementExportParts =\n element.shadowRoot?.querySelectorAll(`[exportparts]`);\n\n elementParts?.forEach(el => {\n queries.push(\n `${element.tagName.toLowerCase()}::part(${el.getAttribute(\"part\")})`\n );\n });\n elementExportParts?.forEach(el => {\n queries.push(\n ...[\n ...el.getAttribute(\"exportparts\").matchAll(/(?:[\\w-]+:)?([\\w-]+)/g)\n ].map(item => `${element.tagName.toLowerCase()}::part(${item[1]})`)\n );\n });\n\n return queries.sort();\n};\n\n/**\n * @param selector a part selector\n * @returns A reference to the element the part belongs to.\n */\nexport const querySelectorPart = (selector: string) => {\n const querySelectorDeep = (\n element: HTMLElement,\n parts: string\n ): HTMLElement => {\n const shadow = element.shadowRoot;\n const partList = parts.split(\" \");\n\n const partElement: HTMLElement = shadow.querySelector(\n partList.map(partName => `[part~=\"${partName}\"]`).join(\"\")\n );\n if (partElement) {\n return partElement;\n }\n\n const exportPartElement: HTMLElement = shadow.querySelector(\n partList.map(partName => `[exportparts*=\"${partName}\"]`).join(\"\")\n );\n if (exportPartElement) {\n const exportPartList: string[] = [];\n const exportparts = exportPartElement.getAttribute(\"exportparts\");\n\n partList.forEach(partItem => {\n const exportPartName = exportparts.match(\n `(?:([\\\\w-]+):)?(${partItem})`\n )[1];\n if (exportPartName) {\n exportPartList.push(exportPartName);\n }\n });\n\n if (partList.length === exportPartList.length) {\n return querySelectorDeep(exportPartElement, exportPartList.join(\" \"));\n }\n }\n\n return null;\n };\n\n const selectorItems = selector.match(\"(.*)::part\\\\(([^)]+)\\\\)\");\n const entity = selectorItems[1];\n const partName = selectorItems[2];\n\n return querySelectorDeep(document.querySelector(entity), partName);\n};\n\nconst daysFromToday = (date: Date): number => {\n const today = new Date();\n // To calculate the time difference of two dates\n const timeDifference = today.getTime() - date.getTime();\n // To calculate the no. of days between two dates\n const daysDifference = timeDifference / (1000 * 3600 * 24);\n return Math.floor(daysDifference);\n};\n\n// - - - - - - - - - - - -\n// Date Functions\n// - - - - - - - - - - - -\n\nconst isToday = (date: Date): boolean => {\n const today = new Date();\n if (today.toDateString() === date.toDateString()) {\n return true;\n }\n return false;\n};\n\nconst isYesterday = (date: Date): boolean => {\n const yesterday = new Date();\n yesterday.setDate(yesterday.getDate() - 1);\n if (yesterday.toDateString() === date.toDateString()) {\n return true;\n }\n return false;\n};\n\nexport const formatDate = (\n date: Date,\n type: FormatDateType = \"date-time\"\n): string => {\n let formattedDate;\n // validate date\n // undefined or null\n if (date === undefined || date === null) {\n return \"\";\n }\n // If the date object is invalid it will return 'NaN' on getTime() and NaN is never equal to itself\n const dateIsValid = date.getTime() === date.getTime();\n if (!dateIsValid) {\n return \"Invalid date\";\n }\n let locale = \"en-US\";\n const lang = document\n .getElementsByTagName(\"html\")[0]\n .getAttribute(\"lang\")\n ?.valueOf();\n if (lang === \"es\") {\n locale = \"es-ES\";\n }\n formattedDate = date.toLocaleDateString(locale);\n const year = date.getFullYear();\n const month = String(date.getMonth() + 1).padStart(2, \"0\");\n const day = String(date.getDate()).padStart(2, \"0\");\n const hours = String(date.getHours()).padStart(2, \"0\");\n const minutes = String(date.getMinutes()).padStart(2, \"0\");\n const time = `${hours}:${minutes}`;\n if (type === \"date-time\") {\n formattedDate += ` / ${date.toLocaleTimeString()}`;\n } else if (type === \"date-time-short\") {\n // No seconds\n if (locale === \"es-ES\") {\n formattedDate = `${year}-${month}-${day} ${time}`;\n } else {\n formattedDate = `${month}/${day}/${year} ${time}`;\n }\n } else if (\"pretty\") {\n const daysPassedFromToday = daysFromToday(date);\n const today = new Date();\n const currentYear = today.getFullYear();\n if (isToday(date)) {\n return `Today ${time}`;\n } else if (isYesterday(date)) {\n return `Yesterday ${time}`;\n } else if (daysPassedFromToday <= 7) {\n // If one week or less, just show the day of the week, and the time\n const day = daysOfWeek[date.getDay()];\n return `${day} ${time}`;\n } else if (currentYear === year) {\n // If current year, show day number and month name. Example: November 17th\n if (locale === \"es-ES\") {\n formattedDate = `${day} de ${date.toLocaleString(\"es-ES\", {\n month: \"long\"\n })} ${time}`;\n } else {\n formattedDate = `${date.toLocaleString(\"en-US\", {\n month: \"long\"\n })} ${day} ${time}`;\n }\n } else {\n // Display date as usual\n formattedDate = formatDate(date, \"date-time-short\");\n }\n }\n return formattedDate;\n};\n\nexport type FormatDateType =\n | \"date\"\n | \"date-time\"\n | \"date-time-short\"\n | \"pretty\";\n\n// - - - - - - - - - - - -\n// /End of Date Functions\n// - - - - - - - - - - - -\n\n/* Count the total tree nodes (by default it does not count the first level nodes)*/\nexport const countTreeItems = (\n treeModel: TreeViewItemModel[],\n children = false\n): number => {\n let totalNodes = 0;\n treeModel.forEach(node => {\n children && totalNodes++;\n if (node.items) {\n totalNodes += countTreeItems(node.items, true);\n }\n });\n return totalNodes;\n};\n\n/**\n * @description it evaluates the initial selected combo item\n * @param options an array of GxOption\n * @returns the initial combo value, which in this case is the id\n */\nexport const setInitialComboValue = (options: GxOption[]): string => {\n const selected = options.find(option => option.selected);\n if (selected) {\n return selected.value || selected.id;\n } else {\n return options[0].value || options[0].id;\n }\n};\n\nexport const escapeRegExp = (str: string) => {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n};\n\n/**\n * @description this function highlights the character(s) that match(es) the filter value.\n * hiChar comes from (hi)light (Char)acters\n * @param text the string to find the filter value on\n * @param filterValue the filter value\n * @returns a span element\n */\nexport const hiChar = function (text: string, filterValue: string) {\n // console.log(text, filterValue);\n if (text && filterValue) {\n const escapedFilterValue = escapeRegExp(filterValue);\n const re = new RegExp(escapedFilterValue, \"gi\");\n return (\n <span\n innerHTML={text.replace(re, '<span class=\"hiChar\">$&</span>')}\n ></span>\n );\n } else {\n return text;\n }\n};\n\nexport const closeOnOutsideClickHandler = (\n eventInfo: PointerEvent,\n ref: HTMLElement\n): true | void => {\n if (!eventInfo.composedPath().includes(ref)) {\n return true;\n }\n};\n\nexport const mapOptionsToComboBoxItemModel = (\n options: GxOption[]\n): ComboBoxModel =>\n options.map(option => ({\n value: option.id,\n caption: option.label\n // startImgSrc: option.iconName\n }));\n\nexport const renderChCheckboxItems = (\n options: GxOption[] | undefined,\n group = \"undefined-group\",\n callback?: any\n): any =>\n options?.map(option => (\n <ch-checkbox\n name={option.name}\n class=\"checkbox\"\n part={`${group}-${option.id}`}\n checkedValue={option.value || option.id}\n caption={option.label}\n disabled={option.disabled}\n value={option.value}\n onInput={callback ?? null}\n startImgSrc={option.iconName}\n ></ch-checkbox>\n ));\n"],"mappings":";;AAUA,MAAMA,IAAa,EACjB,UACA,UACA,WACA,aACA,YACA,UACA;;AA+EF,MAAMC,gBAAiBC;EACrB,MAAMC,IAAQ,IAAIC;;IAElB,MAAMC,IAAiBF,EAAMG,YAAYJ,EAAKI;;IAE9C,MAAMC,IAAiBF,KAAkB,MAAO,OAAO;EACvD,OAAOG,KAAKC,MAAMF;AAAe;;;;0BAOnC;MAAMG,UAAWR;EACf,MAAMC,IAAQ,IAAIC;EAClB,IAAID,EAAMQ,mBAAmBT,EAAKS,gBAAgB;IAChD,OAAO;;EAET,OAAO;AAAK;;AAGd,MAAMC,cAAeV;EACnB,MAAMW,IAAY,IAAIT;EACtBS,EAAUC,QAAQD,EAAUE,YAAY;EACxC,IAAIF,EAAUF,mBAAmBT,EAAKS,gBAAgB;IACpD,OAAO;;EAET,OAAO;AAAK;;MAGDK,a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