@m4l/core 2.0.26 → 2.0.27-beta.0
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/contexts/AuthContext/AuthContext.d.ts +3 -3
- package/contexts/AuthContext/AuthContext.d.ts.map +1 -0
- package/contexts/AuthContext/AuthContext.js +52 -48
- package/contexts/AuthContext/constants.d.ts +1 -0
- package/contexts/AuthContext/constants.d.ts.map +1 -0
- package/contexts/AuthContext/constants.js +2 -2
- package/contexts/AuthContext/helpers.d.ts +1 -0
- package/contexts/AuthContext/helpers.d.ts.map +1 -0
- package/contexts/AuthContext/helpers.js +1 -1
- package/contexts/AuthContext/index.d.ts +1 -0
- package/contexts/AuthContext/index.d.ts.map +1 -0
- package/contexts/AuthContext/types.d.ts +1 -0
- package/contexts/AuthContext/types.d.ts.map +1 -0
- package/contexts/BaseContext/BaseContext.d.ts +2 -1
- package/contexts/BaseContext/BaseContext.d.ts.map +1 -0
- package/contexts/BaseContext/BaseContext.js +11 -11
- package/contexts/BaseContext/index.d.ts +1 -0
- package/contexts/BaseContext/index.d.ts.map +1 -0
- package/contexts/BaseContext/store.d.ts +1 -0
- package/contexts/BaseContext/store.d.ts.map +1 -0
- package/contexts/BaseContext/store.js +1 -1
- package/contexts/BaseContext/types.d.ts +1 -0
- package/contexts/BaseContext/types.d.ts.map +1 -0
- package/contexts/DomainContext/index.d.ts +2 -1
- package/contexts/DomainContext/index.d.ts.map +1 -0
- package/contexts/DomainContext/index.js +23 -23
- package/contexts/DomainContext/types.d.ts +1 -0
- package/contexts/DomainContext/types.d.ts.map +1 -0
- package/contexts/DomainCountryContext/index.d.ts +2 -1
- package/contexts/DomainCountryContext/index.d.ts.map +1 -0
- package/contexts/DomainCountryContext/index.js +18 -18
- package/contexts/DomainCountryContext/types.d.ts +1 -0
- package/contexts/DomainCountryContext/types.d.ts.map +1 -0
- package/contexts/EnvironmentContext/index.d.ts +2 -1
- package/contexts/EnvironmentContext/index.d.ts.map +1 -0
- package/contexts/EnvironmentContext/index.js +9 -9
- package/contexts/EnvironmentContext/types.d.ts +1 -0
- package/contexts/EnvironmentContext/types.d.ts.map +1 -0
- package/contexts/FlagsContext/index.d.ts +3 -2
- package/contexts/FlagsContext/index.d.ts.map +1 -0
- package/contexts/FlagsContext/index.js +9 -9
- package/contexts/FlagsContext/store.d.ts +2 -1
- package/contexts/FlagsContext/store.d.ts.map +1 -0
- package/contexts/FlagsContext/store.js +4 -4
- package/contexts/FlagsContext/types.d.ts +1 -0
- package/contexts/FlagsContext/types.d.ts.map +1 -0
- package/contexts/HostToolsContext/index.d.ts +2 -1
- package/contexts/HostToolsContext/index.d.ts.map +1 -0
- package/contexts/HostToolsContext/index.js +7 -7
- package/contexts/HostToolsContext/types.d.ts +1 -0
- package/contexts/HostToolsContext/types.d.ts.map +1 -0
- package/contexts/ModuleDictionaryContext/index.d.ts +2 -1
- package/contexts/ModuleDictionaryContext/index.d.ts.map +1 -0
- package/contexts/ModuleDictionaryContext/index.js +21 -21
- package/contexts/ModuleDictionaryContext/types.d.ts +1 -0
- package/contexts/ModuleDictionaryContext/types.d.ts.map +1 -0
- package/contexts/ModulePrivilegesContext/index.d.ts +2 -1
- package/contexts/ModulePrivilegesContext/index.d.ts.map +1 -0
- package/contexts/ModulePrivilegesContext/index.js +10 -10
- package/contexts/ModulePrivilegesContext/types.d.ts +1 -0
- package/contexts/ModulePrivilegesContext/types.d.ts.map +1 -0
- package/contexts/ModuleSkeletonContext/index.d.ts +2 -1
- package/contexts/ModuleSkeletonContext/index.d.ts.map +1 -0
- package/contexts/ModuleSkeletonContext/index.js +9 -9
- package/contexts/ModuleSkeletonContext/types.d.ts +1 -0
- package/contexts/ModuleSkeletonContext/types.d.ts.map +1 -0
- package/contexts/NetworkContext/index.d.ts +2 -1
- package/contexts/NetworkContext/index.d.ts.map +1 -0
- package/contexts/NetworkContext/index.js +10 -10
- package/contexts/NetworkContext/types.d.ts +1 -0
- package/contexts/NetworkContext/types.d.ts.map +1 -0
- package/contexts/index.d.ts +1 -0
- package/contexts/index.d.ts.map +1 -0
- package/hooks/index.d.ts +1 -0
- package/hooks/index.d.ts.map +1 -0
- package/hooks/useAuth/index.d.ts +1 -0
- package/hooks/useAuth/index.d.ts.map +1 -0
- package/hooks/useAuth/useAuth.d.ts +1 -0
- package/hooks/useAuth/useAuth.d.ts.map +1 -0
- package/hooks/useAuth/useAuth.js +5 -4
- package/hooks/useBase/index.d.ts +1 -0
- package/hooks/useBase/index.d.ts.map +1 -0
- package/hooks/useBase/useBase.d.ts +1 -0
- package/hooks/useBase/useBase.d.ts.map +1 -0
- package/hooks/useBase/useBase.js +10 -9
- package/hooks/useDomain/index.d.ts +1 -0
- package/hooks/useDomain/index.d.ts.map +1 -0
- package/hooks/useDomain/index.js +8 -7
- package/hooks/useDomainCountry/index.d.ts +1 -0
- package/hooks/useDomainCountry/index.d.ts.map +1 -0
- package/hooks/useDomainCountry/index.js +2 -2
- package/hooks/useEnvironment/index.d.ts +1 -0
- package/hooks/useEnvironment/index.d.ts.map +1 -0
- package/hooks/useEnvironment/index.js +8 -7
- package/hooks/useFlagsStore/index.d.ts +1 -0
- package/hooks/useFlagsStore/index.d.ts.map +1 -0
- package/hooks/useFlagsStore/index.js +9 -9
- package/hooks/useHostTools/index.d.ts +1 -0
- package/hooks/useHostTools/index.d.ts.map +1 -0
- package/hooks/useHostTools/index.js +3 -2
- package/hooks/useLocalStorage/index.d.ts +1 -0
- package/hooks/useLocalStorage/index.d.ts.map +1 -0
- package/hooks/useLocalStorage/index.js +4 -4
- package/hooks/useLocalStorageWithListener/index.d.ts +1 -0
- package/hooks/useLocalStorageWithListener/index.d.ts.map +1 -0
- package/hooks/useLocalStorageWithListener/index.js +2 -1
- package/hooks/useModuleDictionary/index.d.ts +1 -0
- package/hooks/useModuleDictionary/index.d.ts.map +1 -0
- package/hooks/useModuleDictionary/index.js +2 -2
- package/hooks/useModulePrivileges/index.d.ts +1 -0
- package/hooks/useModulePrivileges/index.d.ts.map +1 -0
- package/hooks/useModulePrivileges/index.js +3 -3
- package/hooks/useModuleSkeleton/index.d.ts +1 -0
- package/hooks/useModuleSkeleton/index.d.ts.map +1 -0
- package/hooks/useModuleSkeleton/index.js +3 -3
- package/hooks/useNetwork/index.d.ts +1 -0
- package/hooks/useNetwork/index.d.ts.map +1 -0
- package/hooks/useNetwork/index.js +3 -2
- package/hooks/usePaginate/index.d.ts +1 -0
- package/hooks/usePaginate/index.d.ts.map +1 -0
- package/hooks/usePaginate/index.js +19 -19
- package/hooks/usePaginate/types.d.ts +1 -0
- package/hooks/usePaginate/types.d.ts.map +1 -0
- package/hooks/usePaginate/types.js +2 -2
- package/hooks/usePropageteMF/index.d.ts +1 -0
- package/hooks/usePropageteMF/index.d.ts.map +1 -0
- package/hooks/usePropageteMF/index.js +6 -6
- package/hooks/usePropageteMF/types.d.ts +1 -0
- package/hooks/usePropageteMF/types.d.ts.map +1 -0
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -0
- package/index.js +68 -68
- package/package.json +29 -52
- package/test/constants.d.ts +2 -0
- package/test/constants.d.ts.map +1 -0
- package/test/index.d.ts +1 -0
- package/test/index.d.ts.map +1 -0
- package/test/mocks.d.ts +9 -7
- package/test/mocks.d.ts.map +1 -0
- package/test/setup.d.ts +1 -0
- package/test/setup.d.ts.map +1 -0
- package/test/types.d.ts +1 -0
- package/test/types.d.ts.map +1 -0
- package/test/utils.d.ts +2 -2
- package/test/utils.d.ts.map +1 -0
- package/types/dictionary.d.ts +1 -0
- package/types/dictionary.d.ts.map +1 -0
- package/types/index.d.ts +2 -1
- package/types/index.d.ts.map +1 -0
- package/types/index.js +2 -2
- package/utils/axiosOperation/index.d.ts +1 -0
- package/utils/axiosOperation/index.d.ts.map +1 -0
- package/utils/axiosOperation/index.js +15 -15
- package/utils/axiosOperation/types.d.ts +1 -0
- package/utils/axiosOperation/types.d.ts.map +1 -0
- package/utils/evaluateWithContext/index.d.ts +1 -0
- package/utils/evaluateWithContext/index.d.ts.map +1 -0
- package/utils/evaluateWithContext/index.js +1 -1
- package/utils/getLocalStorage/index.d.ts +1 -0
- package/utils/getLocalStorage/index.d.ts.map +1 -0
- package/utils/getLocalStorage/index.js +1 -1
- package/utils/getPropertyByString/index.d.ts +1 -0
- package/utils/getPropertyByString/index.d.ts.map +1 -0
- package/utils/getPropertyByString/index.js +4 -4
- package/utils/index.d.ts +1 -0
- package/utils/index.d.ts.map +1 -0
- package/utils/setLocalStorage/index.d.ts +1 -0
- package/utils/setLocalStorage/index.d.ts.map +1 -0
- package/utils/setLocalStorage/index.js +3 -3
- package/utils/voidFunction.d.ts +1 -0
- package/utils/voidFunction.d.ts.map +1 -0
- package/utils/voidFunction.js +1 -1
- package/contexts/AuthContext/AuthContext.test.d.ts +0 -1
- package/contexts/AuthContext/index.js +0 -1
- package/contexts/BaseContext/index.js +0 -1
- package/contexts/BaseContext/index.test.d.ts +0 -1
- package/contexts/DomainContext/index.test.d.ts +0 -1
- package/contexts/DomainCountryContext/index.test.d.ts +0 -1
- package/contexts/EnvironmentContext/index.test.d.ts +0 -1
- package/contexts/FlagsContext/index.test.d.ts +0 -1
- package/contexts/HostToolsContext/index.test.d.ts +0 -1
- package/contexts/ModuleDictionaryContext/index.test.d.ts +0 -1
- package/contexts/ModulePrivilegesContext/index.test.d.ts +0 -1
- package/contexts/ModuleSkeletonContext/index.test.d.ts +0 -1
- package/contexts/NetworkContext/index.test.d.ts +0 -1
- package/contexts/index.js +0 -1
- package/hooks/index.js +0 -1
- package/hooks/useAuth/index.js +0 -1
- package/hooks/useAuth/useAuth.test.d.ts +0 -1
- package/hooks/useBase/index.js +0 -1
- package/hooks/useBase/index.test.d.ts +0 -1
- package/hooks/useDomain/index.test.d.ts +0 -1
- package/hooks/useDomainCountry/index.test.d.ts +0 -1
- package/hooks/useEnvironment/index.test.d.ts +0 -1
- package/hooks/useFlagsStore/index.test.d.ts +0 -1
- package/hooks/useHostTools/index.test.d.ts +0 -1
- package/hooks/useLocalStorage/index.test.d.ts +0 -1
- package/hooks/useLocalStorageWithListener/index.test.d.ts +0 -1
- package/hooks/useModuleDictionary/index.test.d.ts +0 -1
- package/hooks/useModulePrivileges/index.test.d.ts +0 -1
- package/hooks/useModuleSkeleton/index.test.d.ts +0 -1
- package/hooks/useNetwork/index.test.d.ts +0 -1
- package/hooks/usePaginate/index.test.d.ts +0 -1
- package/utils/axiosOperation/index.test.d.ts +0 -1
- package/utils/getLocalStorage/index.test.d.ts +0 -1
- package/utils/getPropertyByString/index.test.d.ts +0 -1
- package/utils/index.js +0 -1
- package/utils/setLocalStorage/index.test.d.ts +0 -1
- package/vite-env.d.ts +0 -4
package/test/mocks.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=setup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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
CHANGED
|
@@ -0,0 +1 @@
|
|
|
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
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { cleanup, screen } from '@testing-library/react';
|
|
2
|
-
import { renderHook } from '@testing-library/react-hooks';
|
|
1
|
+
import { cleanup, screen, renderHook } from '@testing-library/react';
|
|
3
2
|
import { default as React, act } from 'react';
|
|
4
3
|
/**
|
|
5
4
|
* customRender
|
|
@@ -7,3 +6,4 @@ import { default as React, act } from 'react';
|
|
|
7
6
|
declare const customRender: (ui: React.ReactElement, options?: {}) => import('@testing-library/react').RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement, HTMLElement>;
|
|
8
7
|
export { default as userEvent } from '@testing-library/user-event';
|
|
9
8
|
export { customRender as render, renderHook, screen, cleanup, act };
|
|
9
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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,MAAM,wBAAwB,CAAC;AAC7E,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,CAAC"}
|
package/types/dictionary.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dictionary.d.ts","sourceRoot":"","sources":["../../../../../packages/core/src/types/dictionary.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,KAAK,MAAM,CAAC;AACjF,MAAM,WAAW,mBAAmB;IAClC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AACD,MAAM,WAAW,UAAU;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,mBAAmB,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;CACnE;AACD,MAAM,WAAW,cAAe,SAAQ,mBAAmB;IACzD,WAAW,EAAE,MAAM,CAAC;CACrB;AACD,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IAClD,IAAI,EAAE,cAAc,CAAC;CACtB"}
|
package/types/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { Id, ToastOptions } from 'react-toastify';
|
|
3
3
|
import { BrowserHistory } from 'history';
|
|
4
4
|
import { AxiosProgressEvent, ResponseType } from 'axios';
|
|
5
|
-
import { DomainCountry } from '../contexts';
|
|
5
|
+
import { DomainCountry } from '../contexts/DomainCountryContext/types';
|
|
6
6
|
import { AxiosOptions } from '../utils/axiosOperation/types';
|
|
7
7
|
export type Maybe<T> = T | undefined | null;
|
|
8
8
|
type MFProps = {
|
|
@@ -115,3 +115,4 @@ export declare enum CommonFlags {
|
|
|
115
115
|
}
|
|
116
116
|
export declare type AxiosOperation = (props: NetworkProps, enviroment: EnvironmentType, hostTools: HostToolsType) => Promise<any>;
|
|
117
117
|
export {};
|
|
118
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +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,YAAY,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,MAAM,MAAM,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC;AAC5C,KAAK,OAAO,GAAG;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAIF,MAAM,MAAM,eAAe,GAAG;IAC5B;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,WAAW,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,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,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"}
|
package/types/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var E = /* @__PURE__ */ ((_) => (_.EMMIT_EVENT_NET_SERVICE_UNAUTHORIZED = "netsevice_unauthorized", _.EMMIT_EVENT_HOST_LOCALE_CHANGE = "host_locale_change", _.EMMIT_EVENT_HOST_THEME_CHANGE = "host_theme_change", _.EMMIT_EVENT_HOST_DOMAIN_COUNTRY_CHANGE = "domain_country_change", _.EMMIT_EVENT_HOST_FORMATTER_CHANGE = "formatter_change", _.EMMIT_EVENT_HOST_EMERGE_WINDOW = "host_emerge_window", _))(E || {}), T = /* @__PURE__ */ ((_) => (_.FLAG_PRIVILEGES_LOADED = "privileges_loaded", _.FLAG_DICTIONARY_LOADED = "dictionary_loaded", _.FLAG_DOMAIN_LOADED = "domain_loaded", _.FLAG_FORM_LOADED = "form_loaded", _.FLAG_AREAS_LOADED = "areas_loaded", _))(T || {});
|
|
2
2
|
export {
|
|
3
|
-
T as
|
|
4
|
-
E
|
|
3
|
+
T as CommonFlags,
|
|
4
|
+
E as EmmitEvents
|
|
5
5
|
};
|
|
@@ -3,3 +3,4 @@ import { EnvironmentType, HostToolsType, NetworkProps } from '../../types';
|
|
|
3
3
|
* Esta función se encarga de realizar las operaciones de red.
|
|
4
4
|
*/
|
|
5
5
|
export declare const axiosOperation: <T = any>(props: NetworkProps, enviroment: EnvironmentType, hostTools: HostToolsType) => Promise<T>;
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/utils/axiosOperation/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAiHhF;;GAEG;AACH,eAAO,MAAM,cAAc,GAAU,CAAC,GAAG,GAAG,EAC1C,OAAO,YAAY,EACnB,YAAY,eAAe,EAC3B,WAAW,aAAa,KACvB,OAAO,CAAC,CAAC,CAmEX,CAAC"}
|
|
@@ -2,34 +2,34 @@ import R from "axios";
|
|
|
2
2
|
import b from "qs";
|
|
3
3
|
import j from "camelcase-keys";
|
|
4
4
|
import v from "snakecase-keys";
|
|
5
|
-
import {
|
|
6
|
-
function x(e,
|
|
5
|
+
import { EmmitEvents as h } from "../../types/index.js";
|
|
6
|
+
function x(e, s, a, i, o, t) {
|
|
7
7
|
const { toast: r } = a;
|
|
8
|
-
return i === "json" ?
|
|
8
|
+
return i === "json" ? s && s.data && typeof s.data == "object" ? s.data.error && s.data.error?.code && s.data.error?.msg !== void 0 ? Promise.reject({ ...s.data.error, status: s.status }) : (s.data.message && o && r({ title: s.data.message }, { type: "success", autoClose: 1e4 }), t ? j(s.data, { deep: !0 }) : s.data) : Promise.reject({
|
|
9
9
|
code: 1,
|
|
10
10
|
msg: `Incorrect endpoint: ${e}`,
|
|
11
|
-
status:
|
|
12
|
-
}) :
|
|
11
|
+
status: s.status
|
|
12
|
+
}) : s.data;
|
|
13
13
|
}
|
|
14
|
-
function T(e,
|
|
15
|
-
const { toast: o } =
|
|
16
|
-
let
|
|
14
|
+
function T(e, s, a = !0, i = !0) {
|
|
15
|
+
const { toast: o } = s;
|
|
16
|
+
let t = {
|
|
17
17
|
message: "",
|
|
18
18
|
status: 1,
|
|
19
19
|
code: 0
|
|
20
20
|
};
|
|
21
|
-
return e?.code !== void 0 &&
|
|
22
|
-
{ title: `${
|
|
21
|
+
return e?.code !== void 0 && t.status !== void 0 && e.message !== void 0 && (t = { ...t, ...e }), e?.response ? e.response.data && typeof e.response.data == "object" && e.response.data.error && e.response.data.error?.code && e.response.data.error?.message !== void 0 ? t = { ...e.response.data.error, status: e.response.status } : (t.message = e.message, t.status = e.response.status, t.code = 0) : e?.request ? (t.message = `${e?.code} ${e.message}`, t.code = -1) : (t.message = `${e?.code} ${e.message}`, t.status = 0, t.code = -2), a && e?.response?.status === 401 && s.events_emit(h.EMMIT_EVENT_NET_SERVICE_UNAUTHORIZED, {}), e?.response?.data?.error?.message && (t.message = e?.response?.data?.error.message), a && (t.message.indexOf("ERR_CANCELED") > -1 ? console.log(t.message) : i && o(
|
|
22
|
+
{ title: `${t.message} - status: ${t.status} - code: ${t.code}` },
|
|
23
23
|
{
|
|
24
24
|
type: "error"
|
|
25
25
|
}
|
|
26
|
-
)),
|
|
26
|
+
)), t;
|
|
27
27
|
}
|
|
28
|
-
const L = async (e,
|
|
28
|
+
const L = async (e, s, a) => {
|
|
29
29
|
const {
|
|
30
30
|
method: i,
|
|
31
31
|
endPoint: o,
|
|
32
|
-
database:
|
|
32
|
+
database: t = s.database,
|
|
33
33
|
timeout: r = 6e4,
|
|
34
34
|
parms: g = {},
|
|
35
35
|
data: m = {},
|
|
@@ -46,7 +46,7 @@ const L = async (e, t, a) => {
|
|
|
46
46
|
responseToCamelCase: C = !1
|
|
47
47
|
} = e;
|
|
48
48
|
let d;
|
|
49
|
-
return u ? d =
|
|
49
|
+
return u ? d = s.host_api_remote : d = s.host_api_local, d = d + "/" + t, e?.options?.startProgress && e?.options?.startProgress(), R({
|
|
50
50
|
baseURL: c ? void 0 : d,
|
|
51
51
|
withCredentials: u,
|
|
52
52
|
method: i,
|
|
@@ -74,5 +74,5 @@ const L = async (e, t, a) => {
|
|
|
74
74
|
});
|
|
75
75
|
};
|
|
76
76
|
export {
|
|
77
|
-
L as
|
|
77
|
+
L as axiosOperation
|
|
78
78
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/utils/axiosOperation/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IACzB,aAAa,CAAC,EAAE,YAAY,CAAC;IAC7B,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,CAAC;AACF,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/utils/evaluateWithContext/index.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAetE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/utils/getLocalStorage/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,GAAG,SAAS,CAS1F"}
|
|
@@ -5,3 +5,4 @@ export declare function getPropertyByString<T extends PropertyType>(object: any,
|
|
|
5
5
|
export declare function getPropertyByString<T extends PropertyType>(object: any, key: string, defaultValue: null): T | null;
|
|
6
6
|
export declare function getPropertyByString<T extends PropertyType>(object: any, key: string, defaultValue: undefined): T | undefined;
|
|
7
7
|
export {};
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/utils/getPropertyByString/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAIpC,KAAK,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAI,GAAG,EAAE,GAAG,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAE1E,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,YAAY,EACxD,MAAM,EAAE,GAAG,EACX,GAAG,EAAE,MAAM,GACV,KAAK,CAAC,CAAC,CAAC,CAAC;AAGZ,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,YAAY,EACxD,MAAM,EAAE,GAAG,EACX,GAAG,EAAE,MAAM,EACX,YAAY,EAAG,CAAC,GACf,CAAC,CAAC;AAEL,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,YAAY,EACxD,MAAM,EAAE,GAAG,EACX,GAAG,EAAE,MAAM,EACX,YAAY,EAAG,IAAI,GAClB,CAAC,GAAG,IAAI,CAAC;AAEZ,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,YAAY,EACxD,MAAM,EAAE,GAAG,EACX,GAAG,EAAE,MAAM,EACX,YAAY,EAAG,SAAS,GACvB,CAAC,GAAG,SAAS,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
function
|
|
2
|
-
const
|
|
1
|
+
function g(y, a, n) {
|
|
2
|
+
const f = a.split(".");
|
|
3
3
|
let r = y;
|
|
4
|
-
for (const s of
|
|
4
|
+
for (const s of f) {
|
|
5
5
|
const c = s.match(/^(\w+)\[(\w+)\]$/);
|
|
6
6
|
if (c) {
|
|
7
7
|
const i = c[1], o = c[2];
|
|
@@ -21,5 +21,5 @@ function f(y, a, n) {
|
|
|
21
21
|
return r;
|
|
22
22
|
}
|
|
23
23
|
export {
|
|
24
|
-
|
|
24
|
+
g as getPropertyByString
|
|
25
25
|
};
|
package/utils/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/core/src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -2,3 +2,4 @@
|
|
|
2
2
|
* Graba en el localStorage un objeto con la key especificada. Si ya existe, lo mezcla con el objeto actual.
|
|
3
3
|
*/
|
|
4
4
|
export declare function setLocalStorage<ValueType>(key: string, newValue: ValueType, mixCurrentLocalStorage?: boolean): void;
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/core/src/utils/setLocalStorage/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,eAAe,CAAC,SAAS,EACvC,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,SAAS,EACnB,sBAAsB,UAAQ,QAe/B"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a(e, o, r = !1) {
|
|
2
2
|
try {
|
|
3
3
|
let t = null;
|
|
4
4
|
if (typeof o == "string") {
|
|
5
5
|
window.localStorage.setItem(e, o);
|
|
6
6
|
return;
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
r && (t = window.localStorage.getItem(e));
|
|
9
9
|
let l = t !== null ? JSON.parse(t) : {};
|
|
10
10
|
l = { ...l, ...o }, window.localStorage.setItem(e, JSON.stringify(l));
|
|
11
11
|
} catch {
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
export {
|
|
15
|
-
|
|
15
|
+
a as setLocalStorage
|
|
16
16
|
};
|
package/utils/voidFunction.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voidFunction.d.ts","sourceRoot":"","sources":["../../../../../packages/core/src/utils/voidFunction.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,YAAY,SAAK"}
|
package/utils/voidFunction.js
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const mock_useEffect: import('vitest').Mock<(...args: any[]) => any>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const mockUseFlagsPresent: jest.Mock;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/contexts/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
package/hooks/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
package/hooks/useAuth/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/hooks/useBase/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const mockUseFlagsPresent: jest.Mock;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/utils/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/vite-env.d.ts
DELETED