pangea-lib 4.0.110 → 4.0.112

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/main.es.js CHANGED
@@ -1217,7 +1217,7 @@ async function lE() {
1217
1217
  t.setAuthUser(a, null);
1218
1218
  }
1219
1219
  }
1220
- function IG1(e) {
1220
+ function BG1(e) {
1221
1221
  const t = be.getConfig();
1222
1222
  t.stores.useAuthStore().setAuthUser(e, null);
1223
1223
  const r = { name: `login${z3.getFirstChartInUppercase(e)}` };
@@ -1231,7 +1231,7 @@ function j5(e) {
1231
1231
  const t = e ? "visible" : "hidden";
1232
1232
  document.body.style.overflow = t;
1233
1233
  }
1234
- function $G1(e, t, a = "animate__") {
1234
+ function IG1(e, t, a = "animate__") {
1235
1235
  return new Promise((r) => {
1236
1236
  const n = `${a}${t}`, i = document.querySelector(e);
1237
1237
  if (!i)
@@ -1269,7 +1269,7 @@ function lu(e, t) {
1269
1269
  m7(`${r}-0${c}`, fE(t, i), n);
1270
1270
  }
1271
1271
  }
1272
- function UG1() {
1272
+ function $G1() {
1273
1273
  const e = wv, t = Math.floor(Math.random() * Object.keys(e).length);
1274
1274
  return e[Object.keys(e)[t]];
1275
1275
  }
@@ -1470,7 +1470,7 @@ function vt(e, t) {
1470
1470
  }, i = e.toLocaleString(pt().language, n);
1471
1471
  return i.charAt(0).toUpperCase() + i.slice(1);
1472
1472
  }
1473
- function WG1(e) {
1473
+ function UG1(e) {
1474
1474
  return vt(e, { format: "short", withoutDay: !0, withTime: !1 });
1475
1475
  }
1476
1476
  function S8(e) {
@@ -3191,7 +3191,7 @@ Ze.getAdapter = Gv.getAdapter;
3191
3191
  Ze.HttpStatusCode = sD;
3192
3192
  Ze.default = Ze;
3193
3193
  const ha = Ze;
3194
- class qG1 {
3194
+ class WG1 {
3195
3195
  static UploadFile(t, a) {
3196
3196
  return ha.put(t, a, { headers: { "Content-Type": a.type, "x-amz-acl": "public-read" } });
3197
3197
  }
@@ -3718,7 +3718,7 @@ function tg() {
3718
3718
  }, t;
3719
3719
  }
3720
3720
  var ag = tg();
3721
- function jG1(e) {
3721
+ function qG1(e) {
3722
3722
  return ag.sanitize(e);
3723
3723
  }
3724
3724
  function LD(e) {
@@ -6365,13 +6365,13 @@ function a3(e) {
6365
6365
  function kR() {
6366
6366
  window.scrollTo({ top: 0, behavior: "smooth" });
6367
6367
  }
6368
- function YG1(e) {
6368
+ function jG1(e) {
6369
6369
  return typeof e != "string" ? !1 : /^[a-fA-F0-9]{24}$/.test(e);
6370
6370
  }
6371
6371
  function ti() {
6372
6372
  return window.innerWidth <= 768;
6373
6373
  }
6374
- function GG1() {
6374
+ function YG1() {
6375
6375
  return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
6376
6376
  }
6377
6377
  let E6 = {
@@ -9717,7 +9717,7 @@ const El = /* @__PURE__ */ Z1(II, [["__scopeId", "data-v-b25b0aa2"]]), $I = { cl
9717
9717
  ]));
9718
9718
  }
9719
9719
  });
9720
- const WI = /* @__PURE__ */ Z1(UI, [["__scopeId", "data-v-2976a89b"]]), XG1 = /* @__PURE__ */ D1({
9720
+ const WI = /* @__PURE__ */ Z1(UI, [["__scopeId", "data-v-2976a89b"]]), GG1 = /* @__PURE__ */ D1({
9721
9721
  __name: "App",
9722
9722
  setup(e) {
9723
9723
  return (t, a) => (q(), J(j1, null, [
@@ -34864,10 +34864,10 @@ var Ye1 = Z0(/(^[0-9]*$)|(^-[0-9]+$)/), Ge1 = {
34864
34864
  }
34865
34865
  };
34866
34866
  Z0(/^[-]?\d*(\.\d+)?$/);
34867
- const p8 = I2("validations"), qm = I6.withMessage(() => p8("requiredRuleError"), qe1), KG1 = I6.withMessage(
34867
+ const p8 = I2("validations"), qm = I6.withMessage(() => p8("requiredRuleError"), qe1), XG1 = I6.withMessage(
34868
34868
  () => p8("requiredRuleError"),
34869
34869
  I6.withParams({}, (e) => typeof e != "number" ? !1 : e > 0)
34870
- ), jm = (e) => Ib("minLength", e), Ym = (e) => Ib("maxLength", e), ZG1 = I6.withMessage(() => p8("integerRuleError"), Ge1), QG1 = (e) => Ac("greaterEqual", e), JG1 = (e) => Ac("greaterThan", e), eX1 = (e) => Ac("lessEqual", e), tX1 = (e) => Ac("lessThan", e);
34870
+ ), jm = (e) => Ib("minLength", e), Ym = (e) => Ib("maxLength", e), KG1 = I6.withMessage(() => p8("integerRuleError"), Ge1), ZG1 = (e) => Ac("greaterEqual", e), QG1 = (e) => Ac("greaterThan", e), JG1 = (e) => Ac("lessEqual", e), eX1 = (e) => Ac("lessThan", e);
34871
34871
  function Ib(e, t) {
34872
34872
  const a = {
34873
34873
  minLength: Ue1,
@@ -78011,7 +78011,7 @@ function d7(e, t) {
78011
78011
  function ua(e, t) {
78012
78012
  return e ? Array.isArray(t) ? t.map((a) => new e(a)) : new e(t) : t;
78013
78013
  }
78014
- function aX1(e, t, a) {
78014
+ function tX1(e, t, a) {
78015
78015
  return {
78016
78016
  getOne(r, n, i, c) {
78017
78017
  const s = d7(r, n), o = e[r].getOne, l = ua(o.params, i);
@@ -78088,7 +78088,7 @@ class Ya {
78088
78088
  pl(t, a, r);
78089
78089
  }
78090
78090
  }
78091
- class rX1 extends Ya {
78091
+ class aX1 extends Ya {
78092
78092
  constructor(a) {
78093
78093
  super(a);
78094
78094
  b1(this, "urls", []);
@@ -78118,7 +78118,7 @@ class Ii extends nu {
78118
78118
  Ii.CopyFields(this, a);
78119
78119
  }
78120
78120
  }
78121
- class nX1 extends Ya {
78121
+ class rX1 extends Ya {
78122
78122
  constructor(a) {
78123
78123
  super(a);
78124
78124
  b1(this, "user", new Ii());
@@ -78135,7 +78135,7 @@ class u3 {
78135
78135
  pl(t, a, r);
78136
78136
  }
78137
78137
  }
78138
- class iX1 extends u3 {
78138
+ class nX1 extends u3 {
78139
78139
  constructor(a) {
78140
78140
  super(a);
78141
78141
  b1(this, "page");
@@ -78144,81 +78144,58 @@ class iX1 extends u3 {
78144
78144
  u3.CopyFields(this, a);
78145
78145
  }
78146
78146
  }
78147
- class cX1 extends u3 {
78147
+ class iX1 extends u3 {
78148
78148
  constructor(a) {
78149
78149
  super(a);
78150
78150
  b1(this, "fileTypes");
78151
78151
  u3.CopyFields(this, a);
78152
78152
  }
78153
78153
  }
78154
- class sX1 extends u3 {
78154
+ class cX1 extends u3 {
78155
78155
  constructor(a) {
78156
78156
  super(a);
78157
78157
  b1(this, "fileName");
78158
78158
  u3.CopyFields(this, a);
78159
78159
  }
78160
78160
  }
78161
- class oX1 extends u3 {
78161
+ class sX1 extends u3 {
78162
78162
  constructor(a) {
78163
78163
  super(a);
78164
78164
  b1(this, "fileNames");
78165
78165
  u3.CopyFields(this, a);
78166
78166
  }
78167
78167
  }
78168
- class lX1 extends u3 {
78168
+ class oX1 extends u3 {
78169
78169
  constructor(a) {
78170
78170
  super(a);
78171
78171
  b1(this, "file");
78172
78172
  u3.CopyFields(this, a);
78173
78173
  }
78174
78174
  }
78175
- class fX1 extends u3 {
78175
+ class lX1 extends u3 {
78176
78176
  constructor(a) {
78177
78177
  super(a);
78178
78178
  b1(this, "file");
78179
78179
  u3.CopyFields(this, a);
78180
78180
  }
78181
78181
  }
78182
- class uX1 extends u3 {
78182
+ class fX1 extends u3 {
78183
78183
  constructor(t) {
78184
78184
  super(t), u3.CopyFields(this, t);
78185
78185
  }
78186
78186
  }
78187
- class hX1 extends u3 {
78187
+ class uX1 extends u3 {
78188
78188
  constructor(a) {
78189
78189
  super(a);
78190
78190
  b1(this, "index", 0);
78191
78191
  u3.CopyFields(this, a);
78192
78192
  }
78193
78193
  }
78194
- class SG1 {
78195
- static __GetEnv(t) {
78196
- return { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 }[t];
78197
- }
78198
- static GetStr(t) {
78199
- return this.__GetEnv(t);
78200
- }
78201
- static GetInt(t) {
78202
- const a = this.__GetEnv(t);
78203
- if (a)
78204
- return parseInt(a);
78205
- }
78206
- static GetFloat(t) {
78207
- const a = this.__GetEnv(t);
78208
- if (a)
78209
- return parseFloat(a);
78210
- }
78211
- static GetBool(t) {
78212
- const a = this.__GetEnv(t);
78213
- if (a)
78214
- return a.toLowerCase() === "true";
78215
- }
78216
- }
78217
- const un = window.location.host, vv = un.includes("localhost") ? un.split(".").slice(-1)[0] : un.split(".").slice(-2).join("."), dX1 = un === vv ? void 0 : un.replace(`.${vv}`, ""), mX1 = SG1.GetStr("VITE_ENVIRONMENT");
78218
- function TG1(e, t, a) {
78194
+ const hX1 = window.location.origin, dX1 = window.location.protocol, un = window.location.host, vv = un.includes("localhost") ? un.split(".").slice(-1)[0] : un.split(".").slice(-2).join("."), mX1 = un === vv ? void 0 : un.replace(`.${vv}`, "");
78195
+ function SG1(e, t, a) {
78219
78196
  return a || { top: 0 };
78220
78197
  }
78221
- async function EG1(e, t, a) {
78198
+ async function TG1(e, t, a) {
78222
78199
  if (t.name && t.name === e.name) {
78223
78200
  a();
78224
78201
  return;
@@ -78230,14 +78207,14 @@ async function EG1(e, t, a) {
78230
78207
  }
78231
78208
  a();
78232
78209
  }
78233
- async function NG1(e) {
78234
- Ct().currentRoute = e, DG1(e.name), OG1();
78210
+ async function EG1(e) {
78211
+ Ct().currentRoute = e, NG1(e.name), DG1();
78235
78212
  }
78236
- function DG1(e) {
78213
+ function NG1(e) {
78237
78214
  const t = Ct().routeType;
78238
78215
  document.title = `${sc(t, e)} | ${be.getConfig().appName}`;
78239
78216
  }
78240
- async function OG1() {
78217
+ async function DG1() {
78241
78218
  const e = be.getConfig(), t = e.routerHelpers;
78242
78219
  if (await lE(), !t.validateRouteAccess(Ct().routeAccess)) {
78243
78220
  e.router.push({ name: t.getDefaultRouteName() });
@@ -78245,8 +78222,8 @@ async function OG1() {
78245
78222
  }
78246
78223
  }
78247
78224
  function pX1(e) {
78248
- const t = aE({ history: rE(), routes: e, scrollBehavior: TG1 });
78249
- return t.beforeEach(EG1), t.afterEach(NG1), t;
78225
+ const t = aE({ history: rE(), routes: e, scrollBehavior: SG1 });
78226
+ return t.beforeEach(TG1), t.afterEach(EG1), t;
78250
78227
  }
78251
78228
  function vX1(e, t, a) {
78252
78229
  const r = nE();
@@ -78257,77 +78234,79 @@ function vX1(e, t, a) {
78257
78234
  Object.entries(n).forEach(([i, c]) => e.component(i, c));
78258
78235
  }
78259
78236
  export {
78260
- XG1 as App,
78261
- nX1 as AuthUser,
78237
+ GG1 as App,
78238
+ rX1 as AuthUser,
78262
78239
  nu as BaseModel,
78263
78240
  u3 as BaseParams,
78264
78241
  Ya as BaseResponse,
78265
- sX1 as ConfirmUploadedFileParams,
78266
- oX1 as ConfirmUploadedFilesParams,
78267
- qG1 as FileStorage,
78268
- cX1 as GenerateUploadUrlsParams,
78269
- rX1 as GenerateUploadUrlsResponse,
78270
- iX1 as GetManyBaseParams,
78271
- uX1 as RemoveFileParams,
78272
- hX1 as RemoveFilesParams,
78273
- lX1 as UploadFileParams,
78274
- fX1 as UploadFilesParams,
78242
+ cX1 as ConfirmUploadedFileParams,
78243
+ sX1 as ConfirmUploadedFilesParams,
78244
+ WG1 as FileStorage,
78245
+ iX1 as GenerateUploadUrlsParams,
78246
+ aX1 as GenerateUploadUrlsResponse,
78247
+ nX1 as GetManyBaseParams,
78248
+ fX1 as RemoveFileParams,
78249
+ uX1 as RemoveFilesParams,
78250
+ oX1 as UploadFileParams,
78251
+ lX1 as UploadFilesParams,
78275
78252
  Ii as User,
78276
78253
  ct as addNotification,
78277
- $G1 as animateElement,
78254
+ IG1 as animateElement,
78278
78255
  TR as clearNotifications,
78279
78256
  wv as colorSelectorColors,
78280
78257
  pl as copyModelFields,
78281
- aX1 as createApiConnections,
78258
+ tX1 as createApiConnections,
78282
78259
  LE as createI18n,
78283
78260
  pX1 as createRouter,
78284
78261
  vX1 as default,
78285
78262
  Nq as displayAlert,
78286
78263
  vv as domain,
78287
- mX1 as environment,
78288
78264
  sE as getAccessToken,
78289
78265
  U3 as getAppOptions,
78290
78266
  fu as getDateStr,
78291
78267
  vt as getDatetimeStr,
78292
78268
  a3 as getFinalValue,
78293
78269
  ti as getIsSmallDevice,
78294
- WG1 as getMonthStr,
78270
+ UG1 as getMonthStr,
78295
78271
  Xg as getNavigationSectionsToDisplay,
78296
78272
  Nu as getNumberStr,
78297
78273
  S8 as getNumericDateStr,
78298
- UG1 as getRandomColorSelectorColor,
78274
+ $G1 as getRandomColorSelectorColor,
78299
78275
  sc as getRouteTitle,
78300
78276
  VR as getRouteType,
78301
78277
  vl as getRoutesByNavigationSection,
78302
78278
  Gg as getRoutesToDisplay,
78303
78279
  VE as getTimeStr,
78304
- QG1 as greaterEqualRule,
78305
- JG1 as greaterThanRule,
78306
- KG1 as idRequiredRule,
78280
+ ZG1 as greaterEqualRule,
78281
+ QG1 as greaterThanRule,
78282
+ un as host,
78283
+ XG1 as idRequiredRule,
78307
78284
  AR as initAppOptions,
78308
- ZG1 as integerRule,
78309
- YG1 as isAValidId,
78285
+ KG1 as integerRule,
78286
+ jG1 as isAValidId,
78310
78287
  $i as isColorTemplateVariable,
78311
- GG1 as isMobileDevice,
78312
- eX1 as lessEqualRule,
78313
- tX1 as lessThanRule,
78288
+ YG1 as isMobileDevice,
78289
+ JG1 as lessEqualRule,
78290
+ eX1 as lessThanRule,
78314
78291
  oE as login,
78315
- IG1 as logout,
78292
+ BG1 as logout,
78316
78293
  Ym as maxLengthRule,
78317
78294
  jm as minLengthRule,
78295
+ hX1 as origin,
78318
78296
  _v as pangeaOptionsColors,
78297
+ dX1 as protocol,
78319
78298
  LD as removeHtmlTags,
78320
78299
  Zg as removeNotification,
78321
78300
  qm as requiredRule,
78322
78301
  fE as rgba,
78323
- jG1 as sanitizeHtml,
78302
+ qG1 as sanitizeHtml,
78324
78303
  kR as scrollToTop,
78325
78304
  j5 as setBodyOverflow,
78326
78305
  Kg as setColorProperties,
78327
78306
  lu as setColorRootProperties,
78328
78307
  SR as setLayoutProperties,
78329
78308
  m7 as setRootProperty,
78330
- dX1 as subdomain,
78309
+ mX1 as subdomain,
78331
78310
  pt as useAppOptionsStore,
78332
78311
  _71 as useElementPosition,
78333
78312
  Ct as useRouteStore,
@@ -0,0 +1,5 @@
1
+ export declare const origin: string;
2
+ export declare const protocol: string;
3
+ export declare const host: string;
4
+ export declare const domain: string;
5
+ export declare const subdomain: string;
@@ -1,3 +1,3 @@
1
1
  export * from './app-options';
2
2
  export * from './colors';
3
- export * from './environment.resources';
3
+ export * from './host.resources';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pangea-lib",
3
3
  "description": "",
4
- "version": "4.0.110",
4
+ "version": "4.0.112",
5
5
  "author": "Gianfranco Raselli",
6
6
  "license": "ISC",
7
7
  "homepage": "https://github.com/GianfrancoRaselli/pangea-lib#readme",
@@ -1,7 +0,0 @@
1
- export declare abstract class Env {
2
- private static __GetEnv;
3
- static GetStr(key: string): string;
4
- static GetInt(key: string): number;
5
- static GetFloat(key: string): number;
6
- static GetBool(key: string): boolean;
7
- }
@@ -1,3 +0,0 @@
1
- export declare const domain: string;
2
- export declare const subdomain: string;
3
- export declare const environment: string;