pangea-lib 4.0.111 → 4.0.113

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
@@ -1211,10 +1211,11 @@ async function oE(e, t, a) {
1211
1211
  async function lE() {
1212
1212
  const e = be.getConfig(), t = e.stores.useAuthStore(), a = Ct().routeType;
1213
1213
  try {
1214
+ console.log("validateAccessToken: ", a);
1214
1215
  const r = `${a}s/validateAccessToken`, n = await e.api.getOne(r, void 0, void 0, { preventDisplayError: !0 });
1215
1216
  t.setAuthUser(a, n.data);
1216
1217
  } catch {
1217
- t.setAuthUser(a, null);
1218
+ console.log("Hubo un error"), t.setAuthUser(a, null);
1218
1219
  }
1219
1220
  }
1220
1221
  function BG1(e) {
@@ -1494,29 +1495,6 @@ function fu(e) {
1494
1495
  function VE(e) {
1495
1496
  return vt(e, { justTime: !0 });
1496
1497
  }
1497
- class WG1 {
1498
- static __GetEnv(t) {
1499
- return { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 }[t];
1500
- }
1501
- static GetStr(t) {
1502
- return this.__GetEnv(t);
1503
- }
1504
- static GetInt(t) {
1505
- const a = this.__GetEnv(t);
1506
- if (a)
1507
- return parseInt(a);
1508
- }
1509
- static GetFloat(t) {
1510
- const a = this.__GetEnv(t);
1511
- if (a)
1512
- return parseFloat(a);
1513
- }
1514
- static GetBool(t) {
1515
- const a = this.__GetEnv(t);
1516
- if (a)
1517
- return a.toLowerCase() === "true";
1518
- }
1519
- }
1520
1498
  function Lv(e, t) {
1521
1499
  return function() {
1522
1500
  return e.apply(t, arguments);
@@ -3214,7 +3192,7 @@ Ze.getAdapter = Gv.getAdapter;
3214
3192
  Ze.HttpStatusCode = sD;
3215
3193
  Ze.default = Ze;
3216
3194
  const ha = Ze;
3217
- class qG1 {
3195
+ class WG1 {
3218
3196
  static UploadFile(t, a) {
3219
3197
  return ha.put(t, a, { headers: { "Content-Type": a.type, "x-amz-acl": "public-read" } });
3220
3198
  }
@@ -3741,7 +3719,7 @@ function tg() {
3741
3719
  }, t;
3742
3720
  }
3743
3721
  var ag = tg();
3744
- function jG1(e) {
3722
+ function qG1(e) {
3745
3723
  return ag.sanitize(e);
3746
3724
  }
3747
3725
  function LD(e) {
@@ -6388,13 +6366,13 @@ function a3(e) {
6388
6366
  function kR() {
6389
6367
  window.scrollTo({ top: 0, behavior: "smooth" });
6390
6368
  }
6391
- function YG1(e) {
6369
+ function jG1(e) {
6392
6370
  return typeof e != "string" ? !1 : /^[a-fA-F0-9]{24}$/.test(e);
6393
6371
  }
6394
6372
  function ti() {
6395
6373
  return window.innerWidth <= 768;
6396
6374
  }
6397
- function GG1() {
6375
+ function YG1() {
6398
6376
  return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
6399
6377
  }
6400
6378
  let E6 = {
@@ -9740,7 +9718,7 @@ const El = /* @__PURE__ */ Z1(II, [["__scopeId", "data-v-b25b0aa2"]]), $I = { cl
9740
9718
  ]));
9741
9719
  }
9742
9720
  });
9743
- const WI = /* @__PURE__ */ Z1(UI, [["__scopeId", "data-v-2976a89b"]]), XG1 = /* @__PURE__ */ D1({
9721
+ const WI = /* @__PURE__ */ Z1(UI, [["__scopeId", "data-v-2976a89b"]]), GG1 = /* @__PURE__ */ D1({
9744
9722
  __name: "App",
9745
9723
  setup(e) {
9746
9724
  return (t, a) => (q(), J(j1, null, [
@@ -34887,10 +34865,10 @@ var Ye1 = Z0(/(^[0-9]*$)|(^-[0-9]+$)/), Ge1 = {
34887
34865
  }
34888
34866
  };
34889
34867
  Z0(/^[-]?\d*(\.\d+)?$/);
34890
- const p8 = I2("validations"), qm = I6.withMessage(() => p8("requiredRuleError"), qe1), KG1 = I6.withMessage(
34868
+ const p8 = I2("validations"), qm = I6.withMessage(() => p8("requiredRuleError"), qe1), XG1 = I6.withMessage(
34891
34869
  () => p8("requiredRuleError"),
34892
34870
  I6.withParams({}, (e) => typeof e != "number" ? !1 : e > 0)
34893
- ), 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);
34871
+ ), 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);
34894
34872
  function Ib(e, t) {
34895
34873
  const a = {
34896
34874
  minLength: Ue1,
@@ -78034,7 +78012,7 @@ function d7(e, t) {
78034
78012
  function ua(e, t) {
78035
78013
  return e ? Array.isArray(t) ? t.map((a) => new e(a)) : new e(t) : t;
78036
78014
  }
78037
- function aX1(e, t, a) {
78015
+ function tX1(e, t, a) {
78038
78016
  return {
78039
78017
  getOne(r, n, i, c) {
78040
78018
  const s = d7(r, n), o = e[r].getOne, l = ua(o.params, i);
@@ -78111,7 +78089,7 @@ class Ya {
78111
78089
  pl(t, a, r);
78112
78090
  }
78113
78091
  }
78114
- class rX1 extends Ya {
78092
+ class aX1 extends Ya {
78115
78093
  constructor(a) {
78116
78094
  super(a);
78117
78095
  b1(this, "urls", []);
@@ -78141,7 +78119,7 @@ class Ii extends nu {
78141
78119
  Ii.CopyFields(this, a);
78142
78120
  }
78143
78121
  }
78144
- class nX1 extends Ya {
78122
+ class rX1 extends Ya {
78145
78123
  constructor(a) {
78146
78124
  super(a);
78147
78125
  b1(this, "user", new Ii());
@@ -78158,7 +78136,7 @@ class u3 {
78158
78136
  pl(t, a, r);
78159
78137
  }
78160
78138
  }
78161
- class iX1 extends u3 {
78139
+ class nX1 extends u3 {
78162
78140
  constructor(a) {
78163
78141
  super(a);
78164
78142
  b1(this, "page");
@@ -78167,54 +78145,54 @@ class iX1 extends u3 {
78167
78145
  u3.CopyFields(this, a);
78168
78146
  }
78169
78147
  }
78170
- class cX1 extends u3 {
78148
+ class iX1 extends u3 {
78171
78149
  constructor(a) {
78172
78150
  super(a);
78173
78151
  b1(this, "fileTypes");
78174
78152
  u3.CopyFields(this, a);
78175
78153
  }
78176
78154
  }
78177
- class sX1 extends u3 {
78155
+ class cX1 extends u3 {
78178
78156
  constructor(a) {
78179
78157
  super(a);
78180
78158
  b1(this, "fileName");
78181
78159
  u3.CopyFields(this, a);
78182
78160
  }
78183
78161
  }
78184
- class oX1 extends u3 {
78162
+ class sX1 extends u3 {
78185
78163
  constructor(a) {
78186
78164
  super(a);
78187
78165
  b1(this, "fileNames");
78188
78166
  u3.CopyFields(this, a);
78189
78167
  }
78190
78168
  }
78191
- class lX1 extends u3 {
78169
+ class oX1 extends u3 {
78192
78170
  constructor(a) {
78193
78171
  super(a);
78194
78172
  b1(this, "file");
78195
78173
  u3.CopyFields(this, a);
78196
78174
  }
78197
78175
  }
78198
- class fX1 extends u3 {
78176
+ class lX1 extends u3 {
78199
78177
  constructor(a) {
78200
78178
  super(a);
78201
78179
  b1(this, "file");
78202
78180
  u3.CopyFields(this, a);
78203
78181
  }
78204
78182
  }
78205
- class uX1 extends u3 {
78183
+ class fX1 extends u3 {
78206
78184
  constructor(t) {
78207
78185
  super(t), u3.CopyFields(this, t);
78208
78186
  }
78209
78187
  }
78210
- class hX1 extends u3 {
78188
+ class uX1 extends u3 {
78211
78189
  constructor(a) {
78212
78190
  super(a);
78213
78191
  b1(this, "index", 0);
78214
78192
  u3.CopyFields(this, a);
78215
78193
  }
78216
78194
  }
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}`, "");
78195
+ 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}`, "");
78218
78196
  function SG1(e, t, a) {
78219
78197
  return a || { top: 0 };
78220
78198
  }
@@ -78239,16 +78217,16 @@ function NG1(e) {
78239
78217
  }
78240
78218
  async function DG1() {
78241
78219
  const e = be.getConfig(), t = e.routerHelpers;
78242
- if (await lE(), !t.validateRouteAccess(Ct().routeAccess)) {
78220
+ if (console.log("before validateAccessToken"), await lE(), console.log("after validateAccessToken"), !t.validateRouteAccess(Ct().routeAccess)) {
78243
78221
  e.router.push({ name: t.getDefaultRouteName() });
78244
78222
  return;
78245
78223
  }
78246
78224
  }
78247
- function mX1(e) {
78225
+ function pX1(e) {
78248
78226
  const t = aE({ history: rE(), routes: e, scrollBehavior: SG1 });
78249
78227
  return t.beforeEach(TG1), t.afterEach(EG1), t;
78250
78228
  }
78251
- function pX1(e, t, a) {
78229
+ function vX1(e, t, a) {
78252
78230
  const r = nE();
78253
78231
  r.use(KI({ storage: localStorage })), e.use(r), e.use(t.router), e.use(Sy), e.use(Q$, {
78254
78232
  themes: { tooltip: { triggers: ["hover", "focus", "touch"], hideTriggers: (i) => [...i] } }
@@ -78257,32 +78235,31 @@ function pX1(e, t, a) {
78257
78235
  Object.entries(n).forEach(([i, c]) => e.component(i, c));
78258
78236
  }
78259
78237
  export {
78260
- XG1 as App,
78261
- nX1 as AuthUser,
78238
+ GG1 as App,
78239
+ rX1 as AuthUser,
78262
78240
  nu as BaseModel,
78263
78241
  u3 as BaseParams,
78264
78242
  Ya as BaseResponse,
78265
- sX1 as ConfirmUploadedFileParams,
78266
- oX1 as ConfirmUploadedFilesParams,
78267
- WG1 as Env,
78268
- qG1 as FileStorage,
78269
- cX1 as GenerateUploadUrlsParams,
78270
- rX1 as GenerateUploadUrlsResponse,
78271
- iX1 as GetManyBaseParams,
78272
- uX1 as RemoveFileParams,
78273
- hX1 as RemoveFilesParams,
78274
- lX1 as UploadFileParams,
78275
- fX1 as UploadFilesParams,
78243
+ cX1 as ConfirmUploadedFileParams,
78244
+ sX1 as ConfirmUploadedFilesParams,
78245
+ WG1 as FileStorage,
78246
+ iX1 as GenerateUploadUrlsParams,
78247
+ aX1 as GenerateUploadUrlsResponse,
78248
+ nX1 as GetManyBaseParams,
78249
+ fX1 as RemoveFileParams,
78250
+ uX1 as RemoveFilesParams,
78251
+ oX1 as UploadFileParams,
78252
+ lX1 as UploadFilesParams,
78276
78253
  Ii as User,
78277
78254
  ct as addNotification,
78278
78255
  IG1 as animateElement,
78279
78256
  TR as clearNotifications,
78280
78257
  wv as colorSelectorColors,
78281
78258
  pl as copyModelFields,
78282
- aX1 as createApiConnections,
78259
+ tX1 as createApiConnections,
78283
78260
  LE as createI18n,
78284
- mX1 as createRouter,
78285
- pX1 as default,
78261
+ pX1 as createRouter,
78262
+ vX1 as default,
78286
78263
  Nq as displayAlert,
78287
78264
  vv as domain,
78288
78265
  sE as getAccessToken,
@@ -78301,33 +78278,36 @@ export {
78301
78278
  vl as getRoutesByNavigationSection,
78302
78279
  Gg as getRoutesToDisplay,
78303
78280
  VE as getTimeStr,
78304
- QG1 as greaterEqualRule,
78305
- JG1 as greaterThanRule,
78306
- KG1 as idRequiredRule,
78281
+ ZG1 as greaterEqualRule,
78282
+ QG1 as greaterThanRule,
78283
+ un as host,
78284
+ XG1 as idRequiredRule,
78307
78285
  AR as initAppOptions,
78308
- ZG1 as integerRule,
78309
- YG1 as isAValidId,
78286
+ KG1 as integerRule,
78287
+ jG1 as isAValidId,
78310
78288
  $i as isColorTemplateVariable,
78311
- GG1 as isMobileDevice,
78312
- eX1 as lessEqualRule,
78313
- tX1 as lessThanRule,
78289
+ YG1 as isMobileDevice,
78290
+ JG1 as lessEqualRule,
78291
+ eX1 as lessThanRule,
78314
78292
  oE as login,
78315
78293
  BG1 as logout,
78316
78294
  Ym as maxLengthRule,
78317
78295
  jm as minLengthRule,
78296
+ hX1 as origin,
78318
78297
  _v as pangeaOptionsColors,
78298
+ dX1 as protocol,
78319
78299
  LD as removeHtmlTags,
78320
78300
  Zg as removeNotification,
78321
78301
  qm as requiredRule,
78322
78302
  fE as rgba,
78323
- jG1 as sanitizeHtml,
78303
+ qG1 as sanitizeHtml,
78324
78304
  kR as scrollToTop,
78325
78305
  j5 as setBodyOverflow,
78326
78306
  Kg as setColorProperties,
78327
78307
  lu as setColorRootProperties,
78328
78308
  SR as setLayoutProperties,
78329
78309
  m7 as setRootProperty,
78330
- dX1 as subdomain,
78310
+ mX1 as subdomain,
78331
78311
  pt as useAppOptionsStore,
78332
78312
  _71 as useElementPosition,
78333
78313
  Ct as useRouteStore,
@@ -2,7 +2,6 @@ export * from './auth.helpers';
2
2
  export * from './color.helpers';
3
3
  export * from './css.helpers';
4
4
  export * from './datetime.helpers';
5
- export * from './env.helpers';
6
5
  export * from './file-storage.helpers';
7
6
  export * from './html-sanitize.helpers';
8
7
  export * from './number.helpers';
@@ -1,2 +1,5 @@
1
+ export declare const origin: string;
2
+ export declare const protocol: string;
3
+ export declare const host: string;
1
4
  export declare const domain: string;
2
5
  export declare const subdomain: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pangea-lib",
3
3
  "description": "",
4
- "version": "4.0.111",
4
+ "version": "4.0.113",
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
- }