@hortiview/modulebase 0.0.13075 → 0.0.13100-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.
Files changed (68) hide show
  1. package/dist/ModuleCore-YCIFN_02.js +14973 -0
  2. package/dist/{QueryClientProvider-Q_mWQTzQ.js → QueryClientProvider-Beog9TR7.js} +39 -37
  3. package/dist/{_baseGet-B7FwMMGI.js → _baseGet-C6jMXSsQ.js} +447 -447
  4. package/dist/{api-D9Lmqe6S.js → api-s6E2GJtu.js} +48 -48
  5. package/dist/assets/ModuleCore.css +1 -0
  6. package/dist/components/ModuleBase.js +17 -498
  7. package/dist/components/ModuleCore.js +10 -0
  8. package/dist/hooks/useCustom.js +15 -18
  9. package/dist/hooks/useCustomMutation.js +14 -12
  10. package/dist/hooks/useEntity.js +48 -58
  11. package/dist/hooks/useOffline.js +45 -0
  12. package/dist/hooks/useOption.js +16 -16
  13. package/dist/hooks/useServiceBus.js +19 -11
  14. package/dist/hooks/useStores.js +1 -1
  15. package/dist/{query-CRIVoEP7.js → isRestoring-CLuxJVSA.js} +21 -17
  16. package/dist/lib/components/ModuleBase.d.ts +36 -0
  17. package/dist/lib/components/ModuleCore.d.ts +32 -0
  18. package/dist/{constants.d.ts → lib/constants.d.ts} +1 -1
  19. package/dist/{hooks → lib/hooks}/useCustom.d.ts +2 -1
  20. package/dist/{hooks → lib/hooks}/useCustomMutation.d.ts +2 -1
  21. package/dist/{hooks → lib/hooks}/useEntity.d.ts +6 -24
  22. package/dist/lib/hooks/useOffline.d.ts +15 -0
  23. package/dist/{hooks → lib/hooks}/useServiceBus.d.ts +6 -2
  24. package/dist/lib/hooks/useStores.d.ts +37 -0
  25. package/dist/lib/main.d.ts +27 -0
  26. package/dist/lib/types/ActionStorage.d.ts +13 -0
  27. package/dist/{types → lib/types}/BaseProps.d.ts +10 -2
  28. package/dist/{types → lib/types}/Deprecated.d.ts +6 -0
  29. package/dist/lib/types/Entities.d.ts +22 -0
  30. package/dist/{types → lib/types}/Environment.d.ts +1 -1
  31. package/dist/lib/types/EnvironmentVariable.d.ts +6 -0
  32. package/dist/{types → lib/types}/Requests.d.ts +4 -10
  33. package/dist/{utils → lib/utils}/api.d.ts +1 -1
  34. package/dist/{utils → lib/utils}/baseFetches.d.ts +2 -2
  35. package/dist/{utils → lib/utils}/fetches.d.ts +14 -6
  36. package/dist/lib/utils/helper.d.ts +29 -0
  37. package/dist/main.js +215 -133
  38. package/dist/{mutation-X73nm7Df.js → mutation-DSKlaYzY.js} +1 -1
  39. package/dist/{omit-B7MWDtHq.js → omit-C9Qe80rl.js} +1 -1
  40. package/dist/stores/EnvironmentStore.js +3 -2
  41. package/dist/types/ActionStorage.js +4 -0
  42. package/dist/types/Entities.js +25 -0
  43. package/dist/types/Environment.js +1 -4
  44. package/dist/types/EnvironmentVariable.js +1 -0
  45. package/dist/types/Requests.js +1 -4
  46. package/dist/{useMutation-3rykrmeD.js → useMutation-zu8uxBak.js} +16 -16
  47. package/dist/{useQuery-CwwWze9O.js → useQuery-Bj9k9zik.js} +47 -47
  48. package/dist/utils/api.js +1 -1
  49. package/dist/utils/baseFetches.js +15 -15
  50. package/dist/utils/fetches.js +14 -13
  51. package/dist/utils/helper.js +55 -0
  52. package/package.json +7 -2
  53. package/dist/components/ModuleBase.d.ts +0 -11
  54. package/dist/hooks/useStores.d.ts +0 -30
  55. package/dist/main.d.ts +0 -13
  56. /package/dist/{hooks → lib/hooks}/useBreadcrumbTranslation.d.ts +0 -0
  57. /package/dist/{hooks → lib/hooks}/useOption.d.ts +0 -0
  58. /package/dist/{hooks → lib/hooks}/useSignalRMessages.d.ts +0 -0
  59. /package/dist/{module-router.d.ts → lib/module-router.d.ts} +0 -0
  60. /package/dist/{provider → lib/provider}/SignalR/SignalRProvider.d.ts +0 -0
  61. /package/dist/{provider → lib/provider}/SignalR/signalR.d.ts +0 -0
  62. /package/dist/{stores → lib/stores}/BasePropsStore.d.ts +0 -0
  63. /package/dist/{stores → lib/stores}/EnvironmentStore.d.ts +0 -0
  64. /package/dist/{types → lib/types}/AppInsights.d.ts +0 -0
  65. /package/dist/{types → lib/types}/CommonOptions.d.ts +0 -0
  66. /package/dist/{types → lib/types}/ModuleApi.d.ts +0 -0
  67. /package/dist/{types → lib/types}/ServiceBus.d.ts +0 -0
  68. /package/dist/{types → lib/types}/SystemMessage.d.ts +0 -0
@@ -1,19 +1,19 @@
1
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-B7FwMMGI.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
3
  import { RETRY_HTTP_STATUS_CODES as rt, RETRIES as nt } from "./constants.js";
4
4
  import { useBasePropsStore as R } from "./stores/BasePropsStore.js";
5
5
  var C, N;
6
6
  function et() {
7
7
  if (N) return C;
8
8
  N = 1;
9
- var t = F(), n = J(), r = Q(), e = Z(), o = V(), c = W(), u = K(), p = Y(), h = "[object Map]", O = "[object Set]", f = Object.prototype, d = f.hasOwnProperty;
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
10
  function a(s) {
11
11
  if (s == null)
12
12
  return !0;
13
13
  if (o(s) && (e(s) || typeof s == "string" || typeof s.splice == "function" || c(s) || p(s) || r(s)))
14
14
  return !s.length;
15
- var l = n(s);
16
- if (l == h || l == O)
15
+ var m = n(s);
16
+ if (m == h || m == l)
17
17
  return !s.size;
18
18
  if (u(s))
19
19
  return !t(s).length;
@@ -69,21 +69,21 @@ var st = ["eq", "ne", "gt", "ge", "lt", "le"], $ = ["and", "or", "not"], ut = ["
69
69
  (function(t) {
70
70
  t.sum = "sum", t.min = "min", t.max = "max", t.average = "average", t.countdistinct = "countdistinct";
71
71
  })(D || (D = {}));
72
- var g = "";
72
+ var j = "";
73
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, O = n.transform, f = n.orderBy, d = n.key, a = n.count, s = n.expand, l = 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)), O && (i.$apply = X(O)), 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), l && (b += "/".concat(l)), y) {
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
76
  if (typeof y == "string")
77
77
  b += "/".concat(y);
78
78
  else if (typeof y == "object") {
79
- var m = Object.keys(y)[0], E = v(y[m], w);
80
- b += "/".concat(m), E !== "" && (b += "(".concat(E, ")"));
79
+ var O = Object.keys(y)[0], E = v(y[O], w);
80
+ b += "/".concat(O), E !== "" && (b += "(".concat(E, ")"));
81
81
  }
82
82
  }
83
83
  return w.length > 0 && Object.assign(i, w.reduce(function(_, A) {
84
- var j;
85
- return Object.assign(_, (j = {}, j["@".concat(A.name)] = v(A.value), j));
86
- }, {})), lt(b, S({ $select: r, $search: e, $skiptoken: o, $format: c }, i));
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
87
  }
88
88
  function B(t, n, r) {
89
89
  return r === void 0 && (r = []), "".concat(t, " eq ").concat(v(n, r));
@@ -102,34 +102,34 @@ function T(t, n, r) {
102
102
  if (typeof c == "string")
103
103
  h = c;
104
104
  else if (c && typeof c == "object") {
105
- var O = Object.keys(c).reduce(function(f, d) {
105
+ var l = Object.keys(c).reduce(function(f, d) {
106
106
  var a = c[d];
107
107
  if (a === void 0)
108
108
  return f;
109
109
  var s = "";
110
- if (p ? d === g ? s = p : G.test(d) ? s = d.replace(G, function(i, m) {
111
- return m.trim() === g ? "(".concat(p, ")") : "(".concat(p, "/").concat(m.trim(), ")");
112
- }) : L.test(d) ? s = d.replace(L, function(i, m) {
113
- return m.trim() === g ? "(".concat(p, ")") : "(".concat(p, "/").concat(m.trim(), ")");
114
- }) : s = "".concat(p, "/").concat(d) : s = d, d === g && Array.isArray(a))
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
115
  return f.concat(a.map(function(i) {
116
116
  return B(s, i);
117
117
  }));
118
118
  if (["number", "string", "boolean"].indexOf(typeof a) !== -1 || a instanceof Date || a === null)
119
119
  f.push(B(s, a, u));
120
120
  else if (Array.isArray(a)) {
121
- var l = d, y = a.map(function(i) {
121
+ var m = d, y = a.map(function(i) {
122
122
  return T(i, u, p);
123
123
  }).filter(function(i) {
124
124
  return i;
125
125
  }).map(function(i) {
126
- return $.indexOf(l) !== -1 ? "(".concat(i, ")") : i;
126
+ return $.indexOf(m) !== -1 ? "(".concat(i, ")") : i;
127
127
  });
128
- y.length && ($.indexOf(l) !== -1 ? y.length && (l === "not" ? f.push(H(y)) : f.push("(".concat(y.join(" ".concat(l, " ")), ")"))) : f.push(y.join(" ".concat(l, " "))));
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
129
  } else if ($.indexOf(s) !== -1) {
130
- var b = s, y = Object.keys(a).map(function(m) {
130
+ var b = s, y = Object.keys(a).map(function(O) {
131
131
  var E;
132
- return e((E = {}, E[m] = a[m], E));
132
+ return e((E = {}, E[O] = a[O], E));
133
133
  });
134
134
  y.length && (b === "not" ? f.push(H(y)) : f.push("(".concat(y.join(" ".concat(b, " ")), ")")));
135
135
  } else if (typeof a == "object")
@@ -138,13 +138,13 @@ function T(t, n, r) {
138
138
  else {
139
139
  var w = Object.keys(a);
140
140
  w.forEach(function(i) {
141
- var m;
141
+ var O;
142
142
  if (a[i] !== void 0)
143
143
  if (st.indexOf(i) !== -1)
144
144
  f.push("".concat(s, " ").concat(i, " ").concat(v(a[i], u)));
145
145
  else if ($.indexOf(i) !== -1)
146
- Array.isArray(a[i]) ? f.push(a[i].map(function(j) {
147
- return "(" + e(j, u, s) + ")";
146
+ Array.isArray(a[i]) ? f.push(a[i].map(function(g) {
147
+ return "(" + e(g, u, s) + ")";
148
148
  }).join(" ".concat(i, " "))) : f.push("(" + e(a[i], u, s) + ")");
149
149
  else if (ut.indexOf(i) !== -1) {
150
150
  var E = o(d.toLowerCase(), a[i], i, s);
@@ -152,19 +152,19 @@ function T(t, n, r) {
152
152
  } else if (i === "has")
153
153
  f.push("".concat(s, " ").concat(i, " ").concat(v(a[i], u)));
154
154
  else if (i === "in") {
155
- var _ = Array.isArray(a[i]) ? a[i] : a[i].value.map(function(j) {
155
+ var _ = Array.isArray(a[i]) ? a[i] : a[i].value.map(function(g) {
156
156
  return {
157
157
  type: a[i].type,
158
- value: j
158
+ value: g
159
159
  };
160
160
  });
161
- f.push(s + " in (" + _.map(function(j) {
162
- return v(j, u);
161
+ f.push(s + " in (" + _.map(function(g) {
162
+ return v(g, u);
163
163
  }).join(",") + ")");
164
164
  } else if (ft.indexOf(i) !== -1)
165
165
  f.push("".concat(i, "(").concat(s, ",").concat(v(a[i], u), ")"));
166
166
  else {
167
- var A = e((m = {}, m[i] = a[i], m), u, s);
167
+ var A = e((O = {}, O[i] = a[i], O), u, s);
168
168
  A && f.push(A);
169
169
  }
170
170
  });
@@ -173,21 +173,21 @@ function T(t, n, r) {
173
173
  throw new Error("Unexpected value type: ".concat(a));
174
174
  return f;
175
175
  }, []);
176
- h = O.join(" and ");
176
+ h = l.join(" and ");
177
177
  }
178
178
  return h;
179
179
  }
180
180
  function o(c, u, p, h) {
181
- var O = "";
181
+ var l = "";
182
182
  if (typeof u == "string" || u instanceof String)
183
- O = yt(c, u, p, h);
183
+ l = yt(c, u, p, h);
184
184
  else if (u) {
185
185
  var f = Array.isArray(u) ? u.reduce(function(a, s) {
186
- return s.hasOwnProperty(g) ? (a.hasOwnProperty(g) || (a[g] = []), a[g].push(s[g]), a) : S(S({}, a), s);
186
+ return s.hasOwnProperty(j) ? (a.hasOwnProperty(j) || (a[j] = []), a[j].push(s[j]), a) : S(S({}, a), s);
187
187
  }, {}) : u, d = e(f, n, c);
188
- O = "".concat(h, "/").concat(p, "(").concat(d ? "".concat(c, ":").concat(d) : "", ")");
188
+ l = "".concat(h, "/").concat(p, "(").concat(d ? "".concat(c, ":").concat(d) : "", ")");
189
189
  }
190
- return O;
190
+ return l;
191
191
  }
192
192
  }
193
193
  function yt(t, n, r, e) {
@@ -279,18 +279,18 @@ function k(t) {
279
279
  }
280
280
  function X(t) {
281
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"]), O = Object.keys(h);
283
- if (O.length)
284
- throw new Error("Unsupported transform(s): ".concat(O));
285
- if (c && e.push("aggregate(".concat(Ot(c), ")")), u) {
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
286
  var f = T(u);
287
287
  f && e.push("filter(".concat(T(f), ")"));
288
288
  }
289
- return p && e.push("groupby(".concat(mt(p), ")")), e;
289
+ return p && e.push("groupby(".concat(Ot(p), ")")), e;
290
290
  }, []);
291
291
  return r.join("/") || void 0;
292
292
  }
293
- function Ot(t) {
293
+ function lt(t) {
294
294
  var n = Array.isArray(t) ? t : [t];
295
295
  return n.map(function(r) {
296
296
  return typeof r == "string" ? r : Object.keys(r).map(function(e) {
@@ -305,7 +305,7 @@ function Ot(t) {
305
305
  });
306
306
  }).join(",");
307
307
  }
308
- function mt(t) {
308
+ function Ot(t) {
309
309
  if (!t.properties)
310
310
  throw new Error("'properties' property required for groupBy");
311
311
  var n = "(".concat(t.properties.join(","), ")");
@@ -323,7 +323,7 @@ function x(t, n) {
323
323
  return "".concat(n).concat(r);
324
324
  }).join(",") : "".concat(n).concat(String(t));
325
325
  }
326
- function lt(t, n) {
326
+ function mt(t, n) {
327
327
  var r = Object.getOwnPropertyNames(n).filter(function(e) {
328
328
  return n[e] !== void 0 && n[e] !== "";
329
329
  }).map(function(e) {
@@ -336,7 +336,7 @@ function H(t) {
336
336
  }
337
337
  const St = (t, n, r, e = "GET", o) => {
338
338
  const c = new Headers();
339
- return c.append("Content-Type", "application/json"), n && c.append("orgId", n), r && c.append("languageId", r), c.append("Authorization", `Bearer ${t}`), o && o.forEach((u, p) => {
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
340
  c.set(p, u);
341
341
  }), {
342
342
  redirect: "follow",
@@ -427,7 +427,7 @@ const St = (t, n, r, e = "GET", o) => {
427
427
  orderBy: u = [],
428
428
  select: p,
429
429
  top: h,
430
- skip: O,
430
+ skip: l,
431
431
  expand: f = [],
432
432
  count: d = !0,
433
433
  overwrite: a = ""
@@ -442,7 +442,7 @@ const St = (t, n, r, e = "GET", o) => {
442
442
  orderBy: u,
443
443
  select: p,
444
444
  top: h,
445
- skip: O,
445
+ skip: l,
446
446
  count: d
447
447
  });
448
448
  return M(s) ? `${e}${r}` : `${s}${o}${r}`;
@@ -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}