@hortiview/modulebase 0.0.1 → 0.0.17-beta
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/README.md +8 -8
- package/dist/ModuleCore-YCIFN_02.js +14973 -0
- package/dist/QueryClientProvider-Beog9TR7.js +437 -0
- package/dist/{_baseGet-Bh5zJ_C8.js → _baseGet-C6jMXSsQ.js} +448 -448
- package/dist/api-s6E2GJtu.js +458 -0
- package/dist/assets/ModuleCore.css +1 -0
- package/dist/chunk-QMGIS6GS-C4bgXQXY.js +9203 -0
- package/dist/components/ModuleBase.js +20 -681
- package/dist/components/ModuleCore.js +10 -0
- package/dist/hooks/useBreadcrumbTranslation.js +16 -13
- package/dist/hooks/useCustom.js +15 -15
- package/dist/hooks/useCustomMutation.js +23 -0
- package/dist/hooks/useEntity.js +53 -54
- package/dist/hooks/useOffline.js +45 -0
- package/dist/hooks/useOption.js +19 -17
- package/dist/hooks/useServiceBus.js +25 -0
- package/dist/hooks/useStores.js +11 -841
- package/dist/isRestoring-CLuxJVSA.js +281 -0
- package/dist/lib/components/ModuleBase.d.ts +36 -0
- package/dist/lib/components/ModuleCore.d.ts +32 -0
- package/dist/{constants.d.ts → lib/constants.d.ts} +1 -1
- package/dist/{hooks → lib/hooks}/useBreadcrumbTranslation.d.ts +1 -1
- package/dist/lib/hooks/useCustom.d.ts +8 -0
- package/dist/lib/hooks/useCustomMutation.d.ts +9 -0
- package/dist/{hooks → lib/hooks}/useEntity.d.ts +6 -30
- package/dist/lib/hooks/useOffline.d.ts +15 -0
- package/dist/{hooks → lib/hooks}/useOption.d.ts +1 -1
- package/dist/lib/hooks/useServiceBus.d.ts +19 -0
- package/dist/lib/hooks/useStores.d.ts +38 -0
- package/dist/lib/main.d.ts +27 -0
- package/dist/lib/module-router.d.ts +7 -0
- package/dist/{stores → lib/stores}/EnvironmentStore.d.ts +1 -1
- package/dist/lib/types/ActionStorage.d.ts +16 -0
- package/dist/{types → lib/types}/BaseProps.d.ts +14 -2
- package/dist/{types → lib/types}/Deprecated.d.ts +7 -1
- package/dist/lib/types/Entities.d.ts +22 -0
- package/dist/{types → lib/types}/Environment.d.ts +3 -2
- package/dist/lib/types/EnvironmentVariable.d.ts +6 -0
- package/dist/lib/types/ModuleApi.d.ts +163 -0
- package/dist/{types → lib/types}/Requests.d.ts +6 -11
- package/dist/lib/types/ServiceBus.d.ts +17 -0
- package/dist/{utils/fetches.d.ts → lib/utils/api.d.ts} +2 -8
- package/dist/lib/utils/baseFetches.d.ts +19 -0
- package/dist/lib/utils/fetches.d.ts +43 -0
- package/dist/lib/utils/helper.d.ts +29 -0
- package/dist/main.js +224 -17
- package/dist/module-router.js +137 -0
- package/dist/mutation-DSKlaYzY.js +192 -0
- package/dist/omit-C9Qe80rl.js +835 -0
- package/dist/stores/EnvironmentStore.js +9 -3
- package/dist/types/ActionStorage.js +4 -0
- package/dist/types/Entities.js +25 -0
- package/dist/types/EnvironmentVariable.js +1 -0
- package/dist/types/Requests.js +1 -4
- package/dist/types/ServiceBus.js +1 -0
- package/dist/useMutation-zu8uxBak.js +97 -0
- package/dist/{useQuery-znAyMQW1.js → useQuery-Bj9k9zik.js} +106 -108
- package/dist/utils/api.js +9 -0
- package/dist/utils/baseFetches.js +19 -0
- package/dist/utils/fetches.js +20 -14
- package/dist/utils/helper.js +55 -0
- package/dist/utils-DxRR_XLb.js +9 -0
- package/package.json +8 -3
- package/dist/QueryClientProvider-DQv4Y3Qu.js +0 -707
- package/dist/chunk-IR6S3I6Y-BvQXS3A3.js +0 -3908
- package/dist/components/ModuleBase.d.ts +0 -11
- package/dist/fetches-DUCQo_6B.js +0 -477
- package/dist/hooks/useCustom.d.ts +0 -6
- package/dist/hooks/useNavigate.d.ts +0 -5
- package/dist/hooks/useNavigate.js +0 -27
- package/dist/hooks/useStores.d.ts +0 -29
- package/dist/main.d.ts +0 -9
- package/dist/types/ModuleApi.d.ts +0 -80
- /package/dist/{hooks → lib/hooks}/useSignalRMessages.d.ts +0 -0
- /package/dist/{provider → lib/provider}/SignalR/SignalRProvider.d.ts +0 -0
- /package/dist/{provider → lib/provider}/SignalR/signalR.d.ts +0 -0
- /package/dist/{stores → lib/stores}/BasePropsStore.d.ts +0 -0
- /package/dist/{types → lib/types}/AppInsights.d.ts +0 -0
- /package/dist/{types → lib/types}/CommonOptions.d.ts +0 -0
- /package/dist/{types → lib/types}/SystemMessage.d.ts +0 -0
|
@@ -0,0 +1,458 @@
|
|
|
1
|
+
import { g as z } from "./_commonjsHelpers-BkfeUUK-.js";
|
|
2
|
+
import { r as F, a as J, b as Q, c as V, d as W, e as Y, f as Z, g as K, h as tt } from "./_baseGet-C6jMXSsQ.js";
|
|
3
|
+
import { RETRY_HTTP_STATUS_CODES as rt, RETRIES as nt } from "./constants.js";
|
|
4
|
+
import { useBasePropsStore as R } from "./stores/BasePropsStore.js";
|
|
5
|
+
var C, N;
|
|
6
|
+
function et() {
|
|
7
|
+
if (N) return C;
|
|
8
|
+
N = 1;
|
|
9
|
+
var t = F(), n = J(), r = Q(), e = Z(), o = V(), c = W(), u = K(), p = Y(), h = "[object Map]", l = "[object Set]", f = Object.prototype, d = f.hasOwnProperty;
|
|
10
|
+
function a(s) {
|
|
11
|
+
if (s == null)
|
|
12
|
+
return !0;
|
|
13
|
+
if (o(s) && (e(s) || typeof s == "string" || typeof s.splice == "function" || c(s) || p(s) || r(s)))
|
|
14
|
+
return !s.length;
|
|
15
|
+
var m = n(s);
|
|
16
|
+
if (m == h || m == l)
|
|
17
|
+
return !s.size;
|
|
18
|
+
if (u(s))
|
|
19
|
+
return !t(s).length;
|
|
20
|
+
for (var y in s)
|
|
21
|
+
if (d.call(s, y))
|
|
22
|
+
return !1;
|
|
23
|
+
return !0;
|
|
24
|
+
}
|
|
25
|
+
return C = a, C;
|
|
26
|
+
}
|
|
27
|
+
var ot = et();
|
|
28
|
+
const M = /* @__PURE__ */ z(ot);
|
|
29
|
+
var I, P;
|
|
30
|
+
function ct() {
|
|
31
|
+
if (P) return I;
|
|
32
|
+
P = 1;
|
|
33
|
+
var t = tt();
|
|
34
|
+
function n(r, e, o) {
|
|
35
|
+
var c = r == null ? void 0 : t(r, e);
|
|
36
|
+
return c === void 0 ? o : c;
|
|
37
|
+
}
|
|
38
|
+
return I = n, I;
|
|
39
|
+
}
|
|
40
|
+
var at = ct();
|
|
41
|
+
const U = /* @__PURE__ */ z(at);
|
|
42
|
+
var S = function() {
|
|
43
|
+
return S = Object.assign || function(n) {
|
|
44
|
+
for (var r, e = 1, o = arguments.length; e < o; e++) {
|
|
45
|
+
r = arguments[e];
|
|
46
|
+
for (var c in r) Object.prototype.hasOwnProperty.call(r, c) && (n[c] = r[c]);
|
|
47
|
+
}
|
|
48
|
+
return n;
|
|
49
|
+
}, S.apply(this, arguments);
|
|
50
|
+
};
|
|
51
|
+
function it(t, n) {
|
|
52
|
+
var r = {};
|
|
53
|
+
for (var e in t) Object.prototype.hasOwnProperty.call(t, e) && n.indexOf(e) < 0 && (r[e] = t[e]);
|
|
54
|
+
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
55
|
+
for (var o = 0, e = Object.getOwnPropertySymbols(t); o < e.length; o++)
|
|
56
|
+
n.indexOf(e[o]) < 0 && Object.prototype.propertyIsEnumerable.call(t, e[o]) && (r[e[o]] = t[e[o]]);
|
|
57
|
+
return r;
|
|
58
|
+
}
|
|
59
|
+
var st = ["eq", "ne", "gt", "ge", "lt", "le"], $ = ["and", "or", "not"], ut = ["any", "all"], ft = ["startswith", "endswith", "contains", "matchespattern"], pt = [
|
|
60
|
+
"expand",
|
|
61
|
+
"levels",
|
|
62
|
+
"select",
|
|
63
|
+
"skip",
|
|
64
|
+
"top",
|
|
65
|
+
"count",
|
|
66
|
+
"orderby",
|
|
67
|
+
"filter"
|
|
68
|
+
], L = /\((.*)\)/, G = /(?!indexof)\((\w+)\)/, D;
|
|
69
|
+
(function(t) {
|
|
70
|
+
t.sum = "sum", t.min = "min", t.max = "max", t.average = "average", t.countdistinct = "countdistinct";
|
|
71
|
+
})(D || (D = {}));
|
|
72
|
+
var j = "";
|
|
73
|
+
function dt(t) {
|
|
74
|
+
var n = t === void 0 ? {} : t, r = n.select, e = n.search, o = n.skiptoken, c = n.format, u = n.top, p = n.skip, h = n.filter, l = n.transform, f = n.orderBy, d = n.key, a = n.count, s = n.expand, m = n.action, y = n.func, b = "", w = [], i = {};
|
|
75
|
+
if (d != null && (b += "(".concat(v(d, w), ")")), (h || typeof a == "object") && (i.$filter = T(typeof a == "object" ? a : h, w)), l && (i.$apply = X(l)), s && (i.$expand = k(s)), f && (i.$orderby = x(f)), a && (typeof a == "boolean" ? i.$count = !0 : b += "/$count"), typeof u == "number" && (i.$top = u), typeof p == "number" && (i.$skip = p), m && (b += "/".concat(m)), y) {
|
|
76
|
+
if (typeof y == "string")
|
|
77
|
+
b += "/".concat(y);
|
|
78
|
+
else if (typeof y == "object") {
|
|
79
|
+
var O = Object.keys(y)[0], E = v(y[O], w);
|
|
80
|
+
b += "/".concat(O), E !== "" && (b += "(".concat(E, ")"));
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return w.length > 0 && Object.assign(i, w.reduce(function(_, A) {
|
|
84
|
+
var g;
|
|
85
|
+
return Object.assign(_, (g = {}, g["@".concat(A.name)] = v(A.value), g));
|
|
86
|
+
}, {})), mt(b, S({ $select: r, $search: e, $skiptoken: o, $format: c }, i));
|
|
87
|
+
}
|
|
88
|
+
function B(t, n, r) {
|
|
89
|
+
return r === void 0 && (r = []), "".concat(t, " eq ").concat(v(n, r));
|
|
90
|
+
}
|
|
91
|
+
function T(t, n, r) {
|
|
92
|
+
return t === void 0 && (t = {}), n === void 0 && (n = []), r === void 0 && (r = ""), (Array.isArray(t) ? t : [t]).reduce(function(c, u) {
|
|
93
|
+
if (u) {
|
|
94
|
+
var p = e(u, n, r);
|
|
95
|
+
p && c.push(p);
|
|
96
|
+
}
|
|
97
|
+
return c;
|
|
98
|
+
}, []).join(" and ");
|
|
99
|
+
function e(c, u, p) {
|
|
100
|
+
c === void 0 && (c = {}), u === void 0 && (u = []), p === void 0 && (p = "");
|
|
101
|
+
var h = "";
|
|
102
|
+
if (typeof c == "string")
|
|
103
|
+
h = c;
|
|
104
|
+
else if (c && typeof c == "object") {
|
|
105
|
+
var l = Object.keys(c).reduce(function(f, d) {
|
|
106
|
+
var a = c[d];
|
|
107
|
+
if (a === void 0)
|
|
108
|
+
return f;
|
|
109
|
+
var s = "";
|
|
110
|
+
if (p ? d === j ? s = p : G.test(d) ? s = d.replace(G, function(i, O) {
|
|
111
|
+
return O.trim() === j ? "(".concat(p, ")") : "(".concat(p, "/").concat(O.trim(), ")");
|
|
112
|
+
}) : L.test(d) ? s = d.replace(L, function(i, O) {
|
|
113
|
+
return O.trim() === j ? "(".concat(p, ")") : "(".concat(p, "/").concat(O.trim(), ")");
|
|
114
|
+
}) : s = "".concat(p, "/").concat(d) : s = d, d === j && Array.isArray(a))
|
|
115
|
+
return f.concat(a.map(function(i) {
|
|
116
|
+
return B(s, i);
|
|
117
|
+
}));
|
|
118
|
+
if (["number", "string", "boolean"].indexOf(typeof a) !== -1 || a instanceof Date || a === null)
|
|
119
|
+
f.push(B(s, a, u));
|
|
120
|
+
else if (Array.isArray(a)) {
|
|
121
|
+
var m = d, y = a.map(function(i) {
|
|
122
|
+
return T(i, u, p);
|
|
123
|
+
}).filter(function(i) {
|
|
124
|
+
return i;
|
|
125
|
+
}).map(function(i) {
|
|
126
|
+
return $.indexOf(m) !== -1 ? "(".concat(i, ")") : i;
|
|
127
|
+
});
|
|
128
|
+
y.length && ($.indexOf(m) !== -1 ? y.length && (m === "not" ? f.push(H(y)) : f.push("(".concat(y.join(" ".concat(m, " ")), ")"))) : f.push(y.join(" ".concat(m, " "))));
|
|
129
|
+
} else if ($.indexOf(s) !== -1) {
|
|
130
|
+
var b = s, y = Object.keys(a).map(function(O) {
|
|
131
|
+
var E;
|
|
132
|
+
return e((E = {}, E[O] = a[O], E));
|
|
133
|
+
});
|
|
134
|
+
y.length && (b === "not" ? f.push(H(y)) : f.push("(".concat(y.join(" ".concat(b, " ")), ")")));
|
|
135
|
+
} else if (typeof a == "object")
|
|
136
|
+
if ("type" in a)
|
|
137
|
+
f.push(B(s, a, u));
|
|
138
|
+
else {
|
|
139
|
+
var w = Object.keys(a);
|
|
140
|
+
w.forEach(function(i) {
|
|
141
|
+
var O;
|
|
142
|
+
if (a[i] !== void 0)
|
|
143
|
+
if (st.indexOf(i) !== -1)
|
|
144
|
+
f.push("".concat(s, " ").concat(i, " ").concat(v(a[i], u)));
|
|
145
|
+
else if ($.indexOf(i) !== -1)
|
|
146
|
+
Array.isArray(a[i]) ? f.push(a[i].map(function(g) {
|
|
147
|
+
return "(" + e(g, u, s) + ")";
|
|
148
|
+
}).join(" ".concat(i, " "))) : f.push("(" + e(a[i], u, s) + ")");
|
|
149
|
+
else if (ut.indexOf(i) !== -1) {
|
|
150
|
+
var E = o(d.toLowerCase(), a[i], i, s);
|
|
151
|
+
E && f.push(E);
|
|
152
|
+
} else if (i === "has")
|
|
153
|
+
f.push("".concat(s, " ").concat(i, " ").concat(v(a[i], u)));
|
|
154
|
+
else if (i === "in") {
|
|
155
|
+
var _ = Array.isArray(a[i]) ? a[i] : a[i].value.map(function(g) {
|
|
156
|
+
return {
|
|
157
|
+
type: a[i].type,
|
|
158
|
+
value: g
|
|
159
|
+
};
|
|
160
|
+
});
|
|
161
|
+
f.push(s + " in (" + _.map(function(g) {
|
|
162
|
+
return v(g, u);
|
|
163
|
+
}).join(",") + ")");
|
|
164
|
+
} else if (ft.indexOf(i) !== -1)
|
|
165
|
+
f.push("".concat(i, "(").concat(s, ",").concat(v(a[i], u), ")"));
|
|
166
|
+
else {
|
|
167
|
+
var A = e((O = {}, O[i] = a[i], O), u, s);
|
|
168
|
+
A && f.push(A);
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
else
|
|
173
|
+
throw new Error("Unexpected value type: ".concat(a));
|
|
174
|
+
return f;
|
|
175
|
+
}, []);
|
|
176
|
+
h = l.join(" and ");
|
|
177
|
+
}
|
|
178
|
+
return h;
|
|
179
|
+
}
|
|
180
|
+
function o(c, u, p, h) {
|
|
181
|
+
var l = "";
|
|
182
|
+
if (typeof u == "string" || u instanceof String)
|
|
183
|
+
l = yt(c, u, p, h);
|
|
184
|
+
else if (u) {
|
|
185
|
+
var f = Array.isArray(u) ? u.reduce(function(a, s) {
|
|
186
|
+
return s.hasOwnProperty(j) ? (a.hasOwnProperty(j) || (a[j] = []), a[j].push(s[j]), a) : S(S({}, a), s);
|
|
187
|
+
}, {}) : u, d = e(f, n, c);
|
|
188
|
+
l = "".concat(h, "/").concat(p, "(").concat(d ? "".concat(c, ":").concat(d) : "", ")");
|
|
189
|
+
}
|
|
190
|
+
return l;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
function yt(t, n, r, e) {
|
|
194
|
+
var o = "", c = r == "all" ? "ne" : "eq";
|
|
195
|
+
return o = "".concat(e, "/").concat(r, "(").concat(t, ": ").concat(t, " ").concat(c, " '").concat(n, "')"), o;
|
|
196
|
+
}
|
|
197
|
+
function ht(t) {
|
|
198
|
+
return t = t.replace(/%/g, "%25"), t = t.replace(/\+/g, "%2B"), t = t.replace(/\//g, "%2F"), t = t.replace(/\?/g, "%3F"), t = t.replace(/#/g, "%23"), t = t.replace(/&/g, "%26"), t = t.replace(/'/g, "''"), t;
|
|
199
|
+
}
|
|
200
|
+
function v(t, n) {
|
|
201
|
+
if (typeof t == "string")
|
|
202
|
+
return "'".concat(ht(t), "'");
|
|
203
|
+
if (t instanceof Date)
|
|
204
|
+
return t.toISOString();
|
|
205
|
+
if (typeof t == "number")
|
|
206
|
+
return t;
|
|
207
|
+
if (Array.isArray(t))
|
|
208
|
+
return "[".concat(t.map(function(r) {
|
|
209
|
+
return v(r);
|
|
210
|
+
}).join(","), "]");
|
|
211
|
+
if (t === null)
|
|
212
|
+
return t;
|
|
213
|
+
if (typeof t == "object")
|
|
214
|
+
switch (t.type) {
|
|
215
|
+
case "raw":
|
|
216
|
+
case "guid":
|
|
217
|
+
return t.value;
|
|
218
|
+
case "duration":
|
|
219
|
+
return "duration'".concat(t.value, "'");
|
|
220
|
+
case "binary":
|
|
221
|
+
return "binary'".concat(t.value, "'");
|
|
222
|
+
case "alias":
|
|
223
|
+
return Array.isArray(n) && n.push(t), "@".concat(t.name);
|
|
224
|
+
case "json":
|
|
225
|
+
return escape(JSON.stringify(t.value));
|
|
226
|
+
case "decimal":
|
|
227
|
+
return "".concat(t.value, "M");
|
|
228
|
+
default:
|
|
229
|
+
return Object.entries(t).filter(function(r) {
|
|
230
|
+
var e = r[1];
|
|
231
|
+
return e !== void 0;
|
|
232
|
+
}).map(function(r) {
|
|
233
|
+
var e = r[0], o = r[1];
|
|
234
|
+
return "".concat(e, "=").concat(v(o, n));
|
|
235
|
+
}).join(",");
|
|
236
|
+
}
|
|
237
|
+
return t;
|
|
238
|
+
}
|
|
239
|
+
function k(t) {
|
|
240
|
+
if (typeof t == "number")
|
|
241
|
+
return t;
|
|
242
|
+
if (typeof t == "string")
|
|
243
|
+
return t.indexOf("/") === -1 ? t : t.split("/").reverse().reduce(function(r, e, o, c) {
|
|
244
|
+
return o === 0 ? "$expand=".concat(e) : o === c.length - 1 ? "".concat(e, "(").concat(r, ")") : "$expand=".concat(e, "(").concat(r, ")");
|
|
245
|
+
}, "");
|
|
246
|
+
if (Array.isArray(t))
|
|
247
|
+
return "".concat(t.map(function(r) {
|
|
248
|
+
return k(r);
|
|
249
|
+
}).join(","));
|
|
250
|
+
if (typeof t == "object") {
|
|
251
|
+
var n = Object.keys(t);
|
|
252
|
+
return n.some(function(r) {
|
|
253
|
+
return pt.indexOf(r.toLowerCase()) !== -1;
|
|
254
|
+
}) ? n.map(function(r) {
|
|
255
|
+
var e;
|
|
256
|
+
switch (r) {
|
|
257
|
+
case "filter":
|
|
258
|
+
e = T(t[r]);
|
|
259
|
+
break;
|
|
260
|
+
case "orderBy":
|
|
261
|
+
e = x(t[r]);
|
|
262
|
+
break;
|
|
263
|
+
case "levels":
|
|
264
|
+
case "count":
|
|
265
|
+
case "skip":
|
|
266
|
+
case "top":
|
|
267
|
+
e = "".concat(t[r]);
|
|
268
|
+
break;
|
|
269
|
+
default:
|
|
270
|
+
e = k(t[r]);
|
|
271
|
+
}
|
|
272
|
+
return "$".concat(r.toLowerCase(), "=").concat(e);
|
|
273
|
+
}).join(";") : n.map(function(r) {
|
|
274
|
+
var e = k(t[r]);
|
|
275
|
+
return e ? "".concat(r, "(").concat(e, ")") : r;
|
|
276
|
+
}).join(",");
|
|
277
|
+
}
|
|
278
|
+
return "";
|
|
279
|
+
}
|
|
280
|
+
function X(t) {
|
|
281
|
+
var n = Array.isArray(t) ? t : [t], r = n.reduce(function(e, o) {
|
|
282
|
+
var c = o.aggregate, u = o.filter, p = o.groupBy, h = it(o, ["aggregate", "filter", "groupBy"]), l = Object.keys(h);
|
|
283
|
+
if (l.length)
|
|
284
|
+
throw new Error("Unsupported transform(s): ".concat(l));
|
|
285
|
+
if (c && e.push("aggregate(".concat(lt(c), ")")), u) {
|
|
286
|
+
var f = T(u);
|
|
287
|
+
f && e.push("filter(".concat(T(f), ")"));
|
|
288
|
+
}
|
|
289
|
+
return p && e.push("groupby(".concat(Ot(p), ")")), e;
|
|
290
|
+
}, []);
|
|
291
|
+
return r.join("/") || void 0;
|
|
292
|
+
}
|
|
293
|
+
function lt(t) {
|
|
294
|
+
var n = Array.isArray(t) ? t : [t];
|
|
295
|
+
return n.map(function(r) {
|
|
296
|
+
return typeof r == "string" ? r : Object.keys(r).map(function(e) {
|
|
297
|
+
var o = r[e];
|
|
298
|
+
if (!o.with && o.as)
|
|
299
|
+
return "".concat(e, " as ").concat(o.as);
|
|
300
|
+
if (!o.with)
|
|
301
|
+
throw new Error("'with' property required for '".concat(e, "'"));
|
|
302
|
+
if (!o.as)
|
|
303
|
+
throw new Error("'as' property required for '".concat(e, "'"));
|
|
304
|
+
return "".concat(e, " with ").concat(o.with, " as ").concat(o.as);
|
|
305
|
+
});
|
|
306
|
+
}).join(",");
|
|
307
|
+
}
|
|
308
|
+
function Ot(t) {
|
|
309
|
+
if (!t.properties)
|
|
310
|
+
throw new Error("'properties' property required for groupBy");
|
|
311
|
+
var n = "(".concat(t.properties.join(","), ")");
|
|
312
|
+
return t.transform && (n += ",".concat(X(t.transform))), n;
|
|
313
|
+
}
|
|
314
|
+
function x(t, n) {
|
|
315
|
+
return n === void 0 && (n = ""), Array.isArray(t) ? t.map(function(r) {
|
|
316
|
+
return Array.isArray(r) && r.length === 2 && ["asc", "desc"].indexOf(r[1]) !== -1 ? r.join(" ") : r;
|
|
317
|
+
}).map(function(r) {
|
|
318
|
+
return "".concat(n).concat(String(r));
|
|
319
|
+
}).join(",") : typeof t == "object" ? Object.entries(t).map(function(r) {
|
|
320
|
+
var e = r[0], o = r[1];
|
|
321
|
+
return x(o, "".concat(e, "/"));
|
|
322
|
+
}).map(function(r) {
|
|
323
|
+
return "".concat(n).concat(r);
|
|
324
|
+
}).join(",") : "".concat(n).concat(String(t));
|
|
325
|
+
}
|
|
326
|
+
function mt(t, n) {
|
|
327
|
+
var r = Object.getOwnPropertyNames(n).filter(function(e) {
|
|
328
|
+
return n[e] !== void 0 && n[e] !== "";
|
|
329
|
+
}).map(function(e) {
|
|
330
|
+
return "".concat(e, "=").concat(n[e]);
|
|
331
|
+
});
|
|
332
|
+
return r.length ? "".concat(t, "?").concat(r.join("&")) : t;
|
|
333
|
+
}
|
|
334
|
+
function H(t) {
|
|
335
|
+
return "not (".concat(t.join(" and "), ")");
|
|
336
|
+
}
|
|
337
|
+
const St = (t, n, r, e = "GET", o) => {
|
|
338
|
+
const c = new Headers();
|
|
339
|
+
return c.append("Content-Type", "application/json"), n && c.append("orgId", n), r && c.append("languageId", r), t ? (console.log("appending token"), c.append("Authorization", `Bearer ${t}`)) : console.log("not appending token"), o && o.forEach((u, p) => {
|
|
340
|
+
c.set(p, u);
|
|
341
|
+
}), {
|
|
342
|
+
redirect: "follow",
|
|
343
|
+
credentials: "omit",
|
|
344
|
+
method: e,
|
|
345
|
+
headers: c
|
|
346
|
+
};
|
|
347
|
+
}, bt = async (t, n, r = nt, e = !0) => {
|
|
348
|
+
const o = R.getState().throwError;
|
|
349
|
+
let c = Promise.resolve();
|
|
350
|
+
try {
|
|
351
|
+
c = await fetch(t, n);
|
|
352
|
+
} catch {
|
|
353
|
+
o?.("Network error", 500);
|
|
354
|
+
}
|
|
355
|
+
if (vt(c, t, n, r), c?.status === 401)
|
|
356
|
+
return o?.("Unauthorized", 401), q(c);
|
|
357
|
+
if (!e)
|
|
358
|
+
return q(c);
|
|
359
|
+
const u = Object.values(rt);
|
|
360
|
+
return r > 0 && u.includes(c?.status) ? bt(t, n, r - 1) : Et(c);
|
|
361
|
+
}, q = async (t) => {
|
|
362
|
+
const n = await t.text();
|
|
363
|
+
let r;
|
|
364
|
+
try {
|
|
365
|
+
r = JSON.parse(n);
|
|
366
|
+
} catch {
|
|
367
|
+
r = {
|
|
368
|
+
value: n
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
return r;
|
|
372
|
+
}, vt = async (t, n, r, e) => {
|
|
373
|
+
const o = t.clone(), c = R.getState().logEvent, u = R.getState().logError;
|
|
374
|
+
try {
|
|
375
|
+
t.ok && c ? c({
|
|
376
|
+
name: `request: ${o?.status.toString()} - ${n}`,
|
|
377
|
+
properties: {
|
|
378
|
+
try: e,
|
|
379
|
+
requestUrl: n,
|
|
380
|
+
requestHeaders: { ...r.headers, Authorization: void 0 },
|
|
381
|
+
requestMethod: r.method,
|
|
382
|
+
requestBody: U(r, "body"),
|
|
383
|
+
responseStatus: o?.status.toString(),
|
|
384
|
+
responseStatusText: o?.statusText,
|
|
385
|
+
responseBody: await q(o)
|
|
386
|
+
}
|
|
387
|
+
}) : u?.({
|
|
388
|
+
exception: {
|
|
389
|
+
name: `request: ${o?.status.toString()} - ${n}`,
|
|
390
|
+
message: o?.statusText
|
|
391
|
+
},
|
|
392
|
+
properties: {
|
|
393
|
+
requestUrl: n,
|
|
394
|
+
requestHeaders: { ...r.headers, Authorization: void 0 },
|
|
395
|
+
requestMethod: r.method,
|
|
396
|
+
requestBody: U(r, "body"),
|
|
397
|
+
responseStatus: o?.status.toString(),
|
|
398
|
+
responseStatusText: o?.statusText,
|
|
399
|
+
responseBody: await q(o)
|
|
400
|
+
}
|
|
401
|
+
});
|
|
402
|
+
} catch {
|
|
403
|
+
console.error("Error while tracking event or exception in AppInsights");
|
|
404
|
+
}
|
|
405
|
+
}, Et = async (t) => {
|
|
406
|
+
const n = R.getState().throwError;
|
|
407
|
+
if (t.ok)
|
|
408
|
+
return q(t);
|
|
409
|
+
const r = {
|
|
410
|
+
detail: t.statusText,
|
|
411
|
+
status: t.status,
|
|
412
|
+
stack: void 0,
|
|
413
|
+
title: "BaseError"
|
|
414
|
+
};
|
|
415
|
+
try {
|
|
416
|
+
const e = await t.json();
|
|
417
|
+
M(e) || (r.title = e.title ?? "UnexpectedError", r.stack = e.message ?? e.title ?? t.statusText, r.detail = e.detail);
|
|
418
|
+
} catch {
|
|
419
|
+
r.detail = t.statusText;
|
|
420
|
+
}
|
|
421
|
+
throw n?.(r.detail, r.status);
|
|
422
|
+
}, Tt = (t, n = !0) => {
|
|
423
|
+
const r = n ? "api-version=1.0" : "", e = n ? "?" : "", o = n ? "&" : "";
|
|
424
|
+
if (!t) return `${e}${r}`;
|
|
425
|
+
const {
|
|
426
|
+
filter: c = [],
|
|
427
|
+
orderBy: u = [],
|
|
428
|
+
select: p,
|
|
429
|
+
top: h,
|
|
430
|
+
skip: l,
|
|
431
|
+
expand: f = [],
|
|
432
|
+
count: d = !0,
|
|
433
|
+
overwrite: a = ""
|
|
434
|
+
// last resort for uncommon query string
|
|
435
|
+
} = t;
|
|
436
|
+
if (a)
|
|
437
|
+
return a;
|
|
438
|
+
{
|
|
439
|
+
const s = dt({
|
|
440
|
+
expand: f,
|
|
441
|
+
filter: c,
|
|
442
|
+
orderBy: u,
|
|
443
|
+
select: p,
|
|
444
|
+
top: h,
|
|
445
|
+
skip: l,
|
|
446
|
+
count: d
|
|
447
|
+
});
|
|
448
|
+
return M(s) ? `${e}${r}` : `${s}${o}${r}`;
|
|
449
|
+
}
|
|
450
|
+
};
|
|
451
|
+
export {
|
|
452
|
+
St as a,
|
|
453
|
+
Tt as b,
|
|
454
|
+
bt as f,
|
|
455
|
+
U as g,
|
|
456
|
+
Et as h,
|
|
457
|
+
M as i
|
|
458
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._image_178sv_1>svg{width:inherit;height:inherit;color:inherit}._loadingBigOverlay_7dxo1_1{z-index:500;position:fixed;top:0;left:0;width:100%;height:100%;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background-color:#0000001a}._bigLoadSpinnerCard_7dxo1_12{background-color:var(--lmnt-theme-background);text-align:center;inline-size:auto;padding:2rem 2rem 1.5rem;border-radius:1rem;box-shadow:0 .5rem .625rem -.3125rem #0003,0 .375rem 1.875rem .3125rem #0000001f,0 1rem 1.5rem .125rem #00000024;z-index:500;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}._bigLoadSpinnerCardText_7dxo1_27{padding:0;margin:1rem 0 0;text-align:center}._logo_7dxo1_33{width:4.75rem!important;height:4.75rem!important}@keyframes _rotate360deg_7dxo1_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}._logo_7dxo1_33 path[id=Subtract_2]{transform-origin:center;animation:_rotate360deg_7dxo1_1 1s linear infinite}._loadingSpinnerContainer_1f3ss_1{z-index:500;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:var(--lmnt-theme-on-surface-high)}._database_11ki8_1{color:var(--lmnt-theme-secondary);animation:_spin_11ki8_1 4s linear infinite}@keyframes _spin_11ki8_1{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}._iot_11ki8_16,._platform_11ki8_17,._other_11ki8_18{color:var(--lmnt-theme-danger)}._crossedOut_11ki8_22{position:relative;display:inline-block}._crossedOut_11ki8_22:after{content:"";position:absolute;width:3rem;height:.25rem;left:50%;top:50%;background:var(--lmnt-theme-danger-on-surface);box-shadow:0 0 0 .125rem var(--lmnt-theme-background);transform:translate(-50%,calc(-50% - .25rem)) rotate(45deg);transform-origin:center;z-index:2}._disclaimer_1k38t_1{color:var(--lmnt-theme-danger);font-style:normal;line-height:20px}._iconArea_1k38t_7{display:flex;justify-content:center}
|