@m4l/core 2.0.32 → 2.0.33

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.
@@ -5,13 +5,13 @@ import { useHostTools as I } from "../../hooks/useHostTools/index.js";
5
5
  import { useLocalStorageWithListener as L } from "../../hooks/useLocalStorageWithListener/index.js";
6
6
  import { useNetwork as P } from "../../hooks/useNetwork/index.js";
7
7
  import { initialState as p, EnumTypes as s } from "./constants.js";
8
- import { EmmitEvents as x } from "../../types/index.js";
9
- import { JWTReducer as N } from "./helpers.js";
8
+ import { EmmitEvents as k } from "../../types/index.js";
9
+ import { JWTReducer as x } from "./helpers.js";
10
10
  import { setLocalStorage as m } from "../../utils/setLocalStorage/index.js";
11
- import { getLocalStorage as k } from "../../utils/getLocalStorage/index.js";
11
+ import { getLocalStorage as N } from "../../utils/getLocalStorage/index.js";
12
12
  const z = _(null);
13
13
  function b(h) {
14
- const { children: g, isMicroFrontEnd: a = !1, loggedUser: c } = h, [T, r] = w(N, a ? { ...p, user: c, isAuthenticated: !0, isInitialized: !0 } : p), { events_add_listener: E } = I(), { networkOperation: t } = P(), { domain_token: d } = A(), [y, i] = L(
14
+ const { children: g, isMicroFrontEnd: a = !1, loggedUser: c } = h, [T, r] = w(x, a ? { ...p, user: c, isAuthenticated: !0, isInitialized: !0 } : p), { events_add_listener: E } = I(), { networkOperation: t } = P(), { domainToken: d } = A(), [y, i] = L(
15
15
  // Variable para saber si ha cambiado la session en otro navegador
16
16
  "vSession",
17
17
  (/* @__PURE__ */ new Date()).getTime() + ""
@@ -31,7 +31,7 @@ function b(h) {
31
31
  isAuthenticated: !0,
32
32
  user: o.user
33
33
  }
34
- }), k("userData", {
34
+ }), N("userData", {
35
35
  email: o.user.email,
36
36
  remember: !0
37
37
  })?.email !== o.user.email && m("userData", { email: o.user.email }, !0);
@@ -75,7 +75,7 @@ function b(h) {
75
75
  u(!1);
76
76
  }, [u]);
77
77
  return f(function() {
78
- a || E(x.EMMIT_EVENT_NET_SERVICE_UNAUTHORIZED, S);
78
+ a || E(k.EMMIT_EVENT_NET_SERVICE_UNAUTHORIZED, S);
79
79
  }, [a]), /* @__PURE__ */ U(
80
80
  z.Provider,
81
81
  {
@@ -2,7 +2,7 @@ import { ReactNode } from 'react';
2
2
  import { DomainCountry } from '../DomainCountryContext/types';
3
3
  import { Maybe } from '../../types';
4
4
  import { EnumTypes } from './constants';
5
- export type User_Db_Type = 'dt_main' | 'dt_admin' | 'dt_operative';
5
+ export type UserDbType = 'dt_main' | 'dt_admin' | 'dt_operative';
6
6
  export interface UserAuth {
7
7
  email: string;
8
8
  id: number;
@@ -22,7 +22,7 @@ export interface UserAuth {
22
22
  /**
23
23
  * dbType: tipo de base de datos del usuario
24
24
  */
25
- dbType?: User_Db_Type;
25
+ dbType?: UserDbType;
26
26
  }
27
27
  export type AuthUserType = Maybe<UserAuth>;
28
28
  export type AuthProviderProps = {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/contexts/AuthContext/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,UAAU,GAAG,cAAc,CAAC;AACnE,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,aAAa,CAAC;IAC7B,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1B,UAAU,C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CAAC,eAAe,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACrD"}
@@ -7,7 +7,7 @@ import { CommonFlags as l } from "../../types/index.js";
7
7
  import { shallow as D } from "zustand/shallow";
8
8
  const $ = d(null);
9
9
  function L(r) {
10
- const { children: e } = r, { domain_token: i, host_static_assets: o, environment_assets: n } = v(), a = p((t) => t.flagsActions.addFlag, D), [_, m] = u({
10
+ const { children: e } = r, { domainToken: i, host_static_assets: o, environment_assets: n } = v(), a = p((t) => t.flagsActions.addFlag, D), [_, m] = u({
11
11
  company_logo_small_url: "",
12
12
  company_logo_normal_url: "",
13
13
  name: "",
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/contexts/EnvironmentContext/index.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAmB3E,QAAA,MAAM,kBAAkB,wDAAqD,CAAC;AAC9E;;GAEG;AACH,iBAAS,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,oDAmC3D;AACD,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/contexts/EnvironmentContext/index.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAmB3E,QAAA,MAAM,kBAAkB,wDAAqD,CAAC;AAgB9E;;GAEG;AACH,iBAAS,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,oDAuD3D;AACD,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,CAAC"}
@@ -1,23 +1,46 @@
1
- import { jsx as i } from "@emotion/react/jsx-runtime";
2
- import { createContext as l, useCallback as u, useState as m } from "react";
3
- const d = l(null);
4
- function a(e) {
5
- const { children: o, ...n } = e, s = u((t) => {
6
- if (e.isIsolatation)
7
- return `${e.host}/module/assets/icons/${t}`;
8
- if (e?.isMicroFrontend) {
9
- if (!e.mfProps)
1
+ import { jsx as _ } from "@emotion/react/jsx-runtime";
2
+ import { createContext as $, useCallback as v, useState as k } from "react";
3
+ const w = $(null);
4
+ function r(o, n, s) {
5
+ const t = o ?? n;
6
+ if (!t)
7
+ throw new Error(`${s} is required`);
8
+ return t;
9
+ }
10
+ function L(o) {
11
+ const {
12
+ children: n,
13
+ domainToken: s = "lab1",
14
+ domain_token: t,
15
+ hostApiRemote: u,
16
+ host_api_remote: a,
17
+ hostApiLocal: h,
18
+ host_api_local: l,
19
+ hostApiIcons: d,
20
+ ...f
21
+ } = o, m = r(s, t, "domainToken"), i = r(u, a, "hostApiRemote"), c = r(h, l, "hostApiLocal"), p = d ?? `${i}/main/icons`, A = v((e) => {
22
+ if (o.isIsolatation)
23
+ return `${o.host}/module/assets/icons/${e}`;
24
+ if (o?.isMicroFrontend) {
25
+ if (!o.mfProps)
10
26
  throw new Error("mfProps is required");
11
- return e?.isLocalhost ? `https://${window.location.hostname}:${e.mfProps.debugPort}/module/assets/icons/${t}` : `mf/${e.mfProps.moduleId}/module/assets/icons/${t}`;
27
+ return o?.isLocalhost ? `https://${window.location.hostname}:${o.mfProps.debugPort}/module/assets/icons/${e}` : `mf/${o.mfProps.moduleId}/module/assets/icons/${e}`;
12
28
  } else
13
- return `mf/module/assets/icons/${t}`;
14
- }, []), [r] = m({
15
- ...n,
16
- getModuleUrlIconAsset: s
29
+ return `mf/module/assets/icons/${e}`;
30
+ }, []), [P] = k({
31
+ ...f,
32
+ domain_token: t ?? m,
33
+ domainToken: m,
34
+ host_api_remote: a ?? i,
35
+ hostApiRemote: i,
36
+ host_api_local: l ?? c,
37
+ hostApiLocal: c,
38
+ hostApiIcons: p,
39
+ getModuleUrlIconAsset: A
17
40
  });
18
- return /* @__PURE__ */ i(d.Provider, { value: r, children: o });
41
+ return /* @__PURE__ */ _(w.Provider, { value: P, children: n });
19
42
  }
20
43
  export {
21
- d as EnvironmentContext,
22
- a as EnvironmentProvider
44
+ w as EnvironmentContext,
45
+ L as EnvironmentProvider
23
46
  };
@@ -1,12 +1,21 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { EnvironmentType } from '../../types';
3
- export interface EnvironmentProviderProps extends Omit<EnvironmentType, 'getMfUrlIconAsset'> {
3
+ export type EnvironmentProviderProps = Omit<EnvironmentType, 'domain_token' | 'domainToken' | 'host_api_remote' | 'hostApiRemote' | 'host_api_local' | 'hostApiLocal' | 'hostApiIcons'> & {
4
4
  children: ReactNode;
5
- }
5
+ /** @deprecated use `domainToken` */
6
+ domain_token?: string;
7
+ domainToken?: string;
8
+ /** @deprecated use `hostApiRemote` */
9
+ host_api_remote?: string;
10
+ hostApiRemote?: string;
11
+ /** @deprecated use `hostApiLocal` */
12
+ host_api_local?: string;
13
+ hostApiLocal?: string;
14
+ hostApiIcons?: string;
15
+ };
6
16
  export type EnvironmentContextType = EnvironmentType & {
7
17
  /**
8
- * "getModuleUrlIconAsset" función encargada de obtener la url de un recurso de un microfrontend
9
- * basado
18
+ * `getModuleUrlIconAsset` returns the URL for a microfrontend icon asset.
10
19
  * @param iconName
11
20
  * @returns
12
21
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/contexts/EnvironmentContext/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,MAAM,WAAW,wBAAyB,SAAQ,IAAI,CAAC,eAAe,EAAE,mBAAmB,CAAC;IAC1F,QAAQ,EAAE,SAAS,CAAC;CACrB;AACD,MAAM,MAAM,sBAAsB,GAAG,eAAe,GAAG;IACrD;;;;;OAKG;IACH,qBAAqB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;CACrD,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/contexts/EnvironmentContext/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,MAAM,MAAM,wBAAwB,GAAG,IAAI,CACzC,eAAe,EACb,cAAc,GACd,aAAa,GACb,iBAAiB,GACjB,eAAe,GACf,gBAAgB,GAChB,cAAc,GACd,cAAc,CACjB,GAAG;IACF,QAAQ,EAAE,SAAS,CAAC;IACpB,oCAAoC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sCAAsC;IACtC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qCAAqC;IACrC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AACF,MAAM,MAAM,sBAAsB,GAAG,eAAe,GAAG;IACrD;;;;OAIG;IACH,qBAAqB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;CACrD,CAAC"}
@@ -1,23 +1,23 @@
1
1
  import { jsx as $ } from "@emotion/react/jsx-runtime";
2
2
  import { createContext as E, useState as l, useMemo as O, useEffect as y, useCallback as v } from "react";
3
- import { useEnvironment as b } from "../../hooks/useEnvironment/index.js";
4
- import { useFlagsStore as I } from "../../hooks/useFlagsStore/index.js";
5
- import { useHostTools as T } from "../../hooks/useHostTools/index.js";
6
- import { useNetwork as k } from "../../hooks/useNetwork/index.js";
3
+ import { useEnvironment as T } from "../../hooks/useEnvironment/index.js";
4
+ import { useFlagsStore as b } from "../../hooks/useFlagsStore/index.js";
5
+ import { useHostTools as k } from "../../hooks/useHostTools/index.js";
6
+ import { useNetwork as I } from "../../hooks/useNetwork/index.js";
7
7
  import { CommonFlags as w } from "../../types/index.js";
8
8
  const G = E(null);
9
9
  function B(F) {
10
10
  const {
11
11
  children: L,
12
- componentsDictionary: s,
12
+ componentsDictionary: a,
13
13
  moduleId: d,
14
14
  moduleNameField: u = "module_name",
15
15
  currentLang: A = "en",
16
16
  isAuth: c = !0,
17
17
  moduleDictionaryLoaded: C
18
- } = F, m = I((t) => t.flagsActions.addFlag), [n, f] = l(void 0), { domain_token: M } = b(), { startProgress: S, stopProgress: _ } = T(), { networkOperation: x } = k(), [p, N] = l(C), [g, D] = l(!1), h = O(() => s ? s.filter(
18
+ } = F, m = b((t) => t.flagsActions.addFlag), [n, f] = l(void 0), { domainToken: M } = T(), { startProgress: S, stopProgress: _ } = k(), { networkOperation: x } = I(), [p, N] = l(C), [g, D] = l(!1), h = O(() => a ? a.filter(
19
19
  (t, o, e) => e.indexOf(t) === o
20
- ) : [], [s]);
20
+ ) : [], [a]);
21
21
  y(() => {
22
22
  let t = !0;
23
23
  return p ? (f({
@@ -43,7 +43,7 @@ function B(F) {
43
43
  }, [A, h]), y(() => {
44
44
  g && m(w.FLAG_DICTIONARY_LOADED);
45
45
  }, [m, g]);
46
- const a = v(
46
+ const s = v(
47
47
  (t, ...o) => {
48
48
  if (n === void 0)
49
49
  return "";
@@ -61,13 +61,13 @@ function B(F) {
61
61
  return e || `N_D:[${t}]`;
62
62
  },
63
63
  [n]
64
- ), P = v(() => a(u), [u, a]);
64
+ ), P = v(() => s(u), [u, s]);
65
65
  return /* @__PURE__ */ $(
66
66
  G.Provider,
67
67
  {
68
68
  value: {
69
69
  moduleDictionary: n,
70
- getLabel: a,
70
+ getLabel: s,
71
71
  getModuleLabel: P
72
72
  },
73
73
  children: L
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/core",
3
- "version": "2.0.32",
3
+ "version": "2.0.33",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/types/index.d.ts CHANGED
@@ -29,7 +29,13 @@ export type EnvironmentType = {
29
29
  * the application is connected to. It is resolved from the host or can be
30
30
  * configured through an environment variable. For example: domain-1, domain-2.
31
31
  */
32
- domain_token: string;
32
+ domain_token?: string;
33
+ /**
34
+ * "domainToken" identifies the domain the application is connected to.
35
+ * It is resolved from the host or can be configured through an environment
36
+ * variable. For example: domain-1, domain-2.
37
+ */
38
+ domainToken?: string;
33
39
  /**
34
40
  * "env" indicates the environment where the application runs.
35
41
  * It is resolved from the host or can be configured through an environment
@@ -47,10 +53,25 @@ export type EnvironmentType = {
47
53
  */
48
54
  database: string;
49
55
  host_api_remote: string;
56
+ /**
57
+ * host_api_remote indicates the remote API host URL. It can be configured through an environment variable.
58
+ * For example: https://dev1.gclick.co/api/v1
59
+ */
60
+ hostApiRemote: string;
50
61
  host_api_local: string;
62
+ /**
63
+ * host_api_local indicates the local API host URL for development and testing purposes. It can be configured through an environment variable.
64
+ * For example: http://localhost:3000/api/v1 when using a local mock server, or http://host.docker.internal:3000/api/v1 when using Docker.
65
+ */
66
+ hostApiLocal: string;
67
+ /**
68
+ * hostRemote indicates the host URL that the application can use to be accessed remotely. It can be configured through an environment variable.
69
+ * For example: dev1.gclick.co does not include the protocol, allowing the application to be accessed through both http and https. This is useful for development and testing purposes, as well as for production environments where the application needs to be accessed securely through https.
70
+ */
71
+ hostRemote: string;
51
72
  host_static_assets: string;
52
73
  environment_assets: string;
53
- hostApiIcons?: string;
74
+ hostApiIcons: string;
54
75
  googleMapsApiKey?: string;
55
76
  };
56
77
  export declare type NetworkProps = {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/core/src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,EAAE,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,Y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G,EAAE,KAAK,IAAI,CAAC;AACjE,MAAM,MAAM,sBAAsB,GAAG;KAClC,CAAC,IAAI,WAAW,GAAG,iBAAiB;CACtC,CAAC;AACF,MAAM,WAAW,kBAAmB,SAAQ,sBAAsB;IAChE,qBAAqB,EAAE,CAAC,gBAAgB,EAAE,aAAa,KAAK,IAAI,CAAC;CAClE;AACD,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,SAAS,MAAM,kBAAkB,EAClE,KAAK,EAAE,CAAC,EACR,OAAO,EAAE,kBAAkB,CAAC,CAAC,CAAC,KAC3B,IAAI,CAAC;AAEV,MAAM,CAAC,OAAO,WAAW,aAAa;IACpC,OAAO,EAAE,cAAc,CAAC;IACxB,KAAK,EAAE,OAAO,CAAC;IACf,aAAa,EAAE,YAAY,CAAC;IAC5B,YAAY,EAAE,YAAY,CAAC;IAC3B,mBAAmB,EAAE,kBAAkB,CAAC;IACxC,sBAAsB,EAAE,kBAAkB,CAAC;IAC3C,WAAW,EAAE,aAAa,CAAC;CAC5B;AACD,oBAAY,WAAW;IACrB,sBAAsB,sBAAsB;IAC5C,sBAAsB,sBAAsB;IAC5C,kBAAkB,kBAAkB;IACpC,gBAAgB,gBAAgB;IAChC,iBAAiB,iBAAiB;CACnC;AACD,MAAM,CAAC,OAAO,MAAM,cAAc,GAAG,CACnC,KAAK,EAAE,YAAY,EACnB,UAAU,EAAE,eAAe,EAC3B,SAAS,EAAE,aAAa,KACrB,OAAO,CAAC,GAAG,CAAC,CAAC"}
@@ -1,11 +1,11 @@
1
- import v from "axios";
1
+ import j from "axios";
2
2
  import C from "qs";
3
- import R from "camelcase-keys";
4
- import b from "snakecase-keys";
5
- import { EmmitEvents as h } from "../../types/index.js";
3
+ import b from "camelcase-keys";
4
+ import h from "snakecase-keys";
5
+ import { EmmitEvents as v } from "../../types/index.js";
6
6
  function x(s, t, r, n, i, e) {
7
7
  const { toast: a } = r, o = t.data && typeof t.data == "object" ? t.data : void 0;
8
- return n === "json" ? o ? o.error && o.error?.code && o.error?.msg !== void 0 ? Promise.reject({ ...o.error, status: t.status }) : (o.message && i && a({ title: o.message }, { type: "success", autoClose: 1e4 }), e ? R(o, { deep: !0 }) : o) : Promise.reject({
8
+ return n === "json" ? o ? o.error && o.error?.code && o.error?.msg !== void 0 ? Promise.reject({ ...o.error, status: t.status }) : (o.message && i && a({ title: o.message }, { type: "success", autoClose: 1e4 }), e ? b(o, { deep: !0 }) : o) : Promise.reject({
9
9
  code: 1,
10
10
  msg: `Incorrect endpoint: ${s}`,
11
11
  status: t.status
@@ -25,7 +25,7 @@ function D(s, t, r = !0, n = !0) {
25
25
  ...a.error,
26
26
  message: a.error.message ?? e.message,
27
27
  status: s.response.status ?? e.status
28
- } : (e.message = s.message ?? e.message, e.status = s.response.status ?? e.status, e.code = 0) : s?.request ? (e.message = `${s?.code} ${s.message}`, e.code = -1) : (e.message = `${s?.code} ${s.message}`, e.status = 0, e.code = -2), r && s?.response?.status === 401 && t.events_emit(h.EMMIT_EVENT_NET_SERVICE_UNAUTHORIZED, {}), a?.error?.message && (e.message = a.error.message), r) {
28
+ } : (e.message = s.message ?? e.message, e.status = s.response.status ?? e.status, e.code = 0) : s?.request ? (e.message = `${s?.code} ${s.message}`, e.code = -1) : (e.message = `${s?.code} ${s.message}`, e.status = 0, e.code = -2), r && s?.response?.status === 401 && t.events_emit(v.EMMIT_EVENT_NET_SERVICE_UNAUTHORIZED, {}), a?.error?.message && (e.message = a.error.message), r) {
29
29
  if (e.message.indexOf("ERR_CANCELED") > -1)
30
30
  return e;
31
31
  n && i(
@@ -37,7 +37,7 @@ function D(s, t, r = !0, n = !0) {
37
37
  }
38
38
  return e;
39
39
  }
40
- const L = async (s, t, r) => {
40
+ const N = async (s, t, r) => {
41
41
  const {
42
42
  method: n,
43
43
  endPoint: i,
@@ -54,16 +54,16 @@ const L = async (s, t, r) => {
54
54
  signal: y,
55
55
  toastSuccess: _ = !0,
56
56
  toastError: P = !0,
57
- bodyToSnakeCase: $ = !1,
58
- responseToCamelCase: j = !1
57
+ bodyToSnakeCase: R = !1,
58
+ responseToCamelCase: $ = !1
59
59
  } = s;
60
60
  let m;
61
- return c ? m = t.host_api_remote : m = t.host_api_local, m = m + "/" + e, s?.options?.startProgress && s?.options?.startProgress(), v({
61
+ return c ? m = t.hostApiRemote || t.host_api_remote : m = t.hostApiLocal || t.host_api_local, m = m + "/" + e, s?.options?.startProgress && s?.options?.startProgress(), j({
62
62
  baseURL: g ? void 0 : m,
63
63
  withCredentials: c,
64
64
  method: n,
65
65
  url: g ? i : `/${i}`,
66
- data: $ ? b(d, { deep: !0 }) : d,
66
+ data: R ? h(d, { deep: !0 }) : d,
67
67
  params: {},
68
68
  /**
69
69
  * `paramsSerializer` is an optional function that serializes URL params.
@@ -80,11 +80,11 @@ const L = async (s, t, r) => {
80
80
  r,
81
81
  f,
82
82
  _,
83
- j
83
+ $
84
84
  )).catch((u) => Promise.reject(D(u, r, p, P))).finally(() => {
85
85
  s?.options?.stopProgress && s?.options?.stopProgress();
86
86
  });
87
87
  };
88
88
  export {
89
- L as axiosOperation
89
+ N as axiosOperation
90
90
  };
@@ -1,71 +0,0 @@
1
- import { HostToolsType, Toaster } from '../types';
2
- import { BaseDataForTesting } from './types';
3
- export declare const moduleIdForTesting = "testing";
4
- export declare const moduleNameForTesting = "label_for_module_name";
5
- export declare const dictionaryDataForTesting: {
6
- data: {
7
- module_name: string;
8
- label1: string;
9
- };
10
- comp1: {
11
- key1: string;
12
- };
13
- };
14
- export declare const queryPrivilegesForTesting: string[];
15
- export declare const resultpPrivilegesForTesting: {
16
- data: {
17
- priv1: boolean;
18
- };
19
- };
20
- export declare const domainDataForTesting: {
21
- data: {
22
- name: string;
23
- company_logo_small_url: string;
24
- company_logo_normal_url: string;
25
- };
26
- };
27
- export declare const domainCountry1DataForTesting: {
28
- id: number;
29
- currency: string;
30
- currency_decimal_digits: number;
31
- decimal_symbol: string;
32
- thousands_symbol: string;
33
- };
34
- export declare const domainCountry2DataForTesting: {
35
- id: number;
36
- currency: string;
37
- currency_decimal_digits: number;
38
- decimal_symbol: string;
39
- thousands_symbol: string;
40
- };
41
- export declare const resultAxiosOperationForTesting: {
42
- data: {
43
- a: number;
44
- b: string;
45
- };
46
- };
47
- export declare const networkPropsForTesting: {
48
- method: string;
49
- endPoint: string;
50
- parms: {};
51
- };
52
- export declare const environmentDataForTesting: {
53
- isLocalhost: boolean;
54
- host: string;
55
- domain_token: string;
56
- host_api_local: string;
57
- host_api_remote: string;
58
- host_static_assets: string;
59
- environment_assets: string;
60
- isMicroFrontend: boolean;
61
- isIsolatation: boolean;
62
- database: string;
63
- getModuleUrlIconAsset: () => string;
64
- };
65
- export declare const baseDataForTesting: BaseDataForTesting;
66
- /**
67
- * Mock toaster
68
- */
69
- export declare const mock_toaster: Toaster;
70
- export declare const hostToolsDataForTesting: HostToolsType;
71
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../packages/core/src/test/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAQlD,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC7C,eAAO,MAAM,kBAAkB,YAAY,CAAC;AAC5C,eAAO,MAAM,oBAAoB,0BAA0B,CAAC;AAC5D,eAAO,MAAM,wBAAwB;;;;;;;;CAGpC,CAAC;AACF,eAAO,MAAM,yBAAyB,UAAY,CAAC;AACnD,eAAO,MAAM,2BAA2B;;;;CAA4B,CAAC;AACrE,eAAO,MAAM,oBAAoB;;;;;;CAMhC,CAAC;AACF,eAAO,MAAM,4BAA4B;;;;;;CAMxC,CAAC;AACF,eAAO,MAAM,4BAA4B;;;;;;CAMxC,CAAC;AACF,eAAO,MAAM,8BAA8B;;;;;CAE1C,CAAC;AACF,eAAO,MAAM,sBAAsB;;;;CAIlC,CAAC;AACF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;CAYrC,CAAC;AACF,eAAO,MAAM,kBAAkB,EAAE,kBAGhC,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,OAAiB,CAAC;AAiB7C,eAAO,MAAM,uBAAuB,EAAE,aAQrC,CAAC"}
package/test/index.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export * from './constants';
2
- export * from './utils';
3
- export * from './mocks';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/core/src/test/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
package/test/mocks.d.ts DELETED
@@ -1,9 +0,0 @@
1
- import { Mock } from 'vitest';
2
- export declare const mock_addFlag: Mock;
3
- export declare const mock_networkOperation: Mock;
4
- export declare const mock_events_add_listener: Mock;
5
- export declare const mock_events_remove_listener: Mock;
6
- export declare const mock_events_emit: Mock;
7
- export declare const mock_startProgress: Mock;
8
- export declare const mock_stopProgress: Mock;
9
- //# sourceMappingURL=mocks.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mocks.d.ts","sourceRoot":"","sources":["../../../../../packages/core/src/test/mocks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC,eAAO,MAAM,YAAY,EAAE,IAAc,CAAC;AAC1C,eAAO,MAAM,qBAAqB,EAAE,IAAc,CAAC;AACnD,eAAO,MAAM,wBAAwB,EAAE,IAAc,CAAC;AACtD,eAAO,MAAM,2BAA2B,EAAE,IAAc,CAAC;AACzD,eAAO,MAAM,gBAAgB,EAAE,IAAc,CAAC;AAC9C,eAAO,MAAM,kBAAkB,EAAE,IAAc,CAAC;AAChD,eAAO,MAAM,iBAAiB,EAAE,IAAc,CAAC"}
package/test/setup.d.ts DELETED
@@ -1 +0,0 @@
1
- //# sourceMappingURL=setup.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../../../packages/core/src/test/setup.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
package/test/types.d.ts DELETED
@@ -1,5 +0,0 @@
1
- export interface BaseDataForTesting {
2
- a: string;
3
- b: number;
4
- }
5
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../packages/core/src/test/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX"}
package/test/utils.d.ts DELETED
@@ -1,9 +0,0 @@
1
- import { cleanup, screen, renderHook, waitFor } from '@testing-library/react';
2
- import { default as React, act } from 'react';
3
- /**
4
- * customRender
5
- */
6
- declare const customRender: (ui: React.ReactElement, options?: {}) => import('@testing-library/react').RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement, HTMLElement>;
7
- export { default as userEvent } from '@testing-library/user-event';
8
- export { customRender as render, renderHook, screen, cleanup, act, waitFor };
9
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../packages/core/src/test/utils.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACtF,OAAO,KAAK,EAAE,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AASnC;;GAEG;AACH,QAAA,MAAM,YAAY,GAAI,IAAI,KAAK,CAAC,YAAY,EAAE,YAAY,iIASzD,CAAC;AACF,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,YAAY,IAAI,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC"}