@fctc/interface-logic 4.5.11-beta.0 → 4.6.1

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 (46) hide show
  1. package/dist/base-model-type-DD8uZnDP.d.ts +8 -0
  2. package/dist/configs.d.ts +12 -0
  3. package/dist/configs.js +2581 -0
  4. package/dist/configs.mjs +2544 -1
  5. package/dist/constants.d.mts +1 -1
  6. package/dist/constants.d.ts +235 -0
  7. package/dist/constants.js +335 -0
  8. package/dist/constants.mjs +293 -1
  9. package/dist/environment.d.mts +1 -1
  10. package/dist/environment.d.ts +56 -0
  11. package/dist/environment.js +2708 -0
  12. package/dist/environment.mjs +2669 -1
  13. package/dist/hooks.d.mts +7 -1
  14. package/dist/hooks.d.ts +828 -0
  15. package/dist/hooks.js +8949 -0
  16. package/dist/hooks.mjs +8792 -1
  17. package/dist/{local-storage-AbiOQTLK.d.mts → local-storage-BPvoMGYJ.d.mts} +1 -1
  18. package/dist/local-storage-BPvoMGYJ.d.ts +10 -0
  19. package/dist/models.d.ts +14 -0
  20. package/dist/models.js +147 -0
  21. package/dist/models.mjs +120 -1
  22. package/dist/provider.d.mts +10 -5
  23. package/dist/provider.d.ts +214 -0
  24. package/dist/provider.js +9535 -0
  25. package/dist/provider.mjs +9489 -1
  26. package/dist/services.d.ts +700 -0
  27. package/dist/services.js +6959 -0
  28. package/dist/services.mjs +6912 -1
  29. package/dist/store.d.mts +382 -0
  30. package/dist/store.d.ts +382 -0
  31. package/dist/store.js +823 -0
  32. package/dist/store.mjs +717 -0
  33. package/dist/types.d.ts +19 -0
  34. package/dist/types.js +18 -0
  35. package/dist/utils.d.mts +61 -38
  36. package/dist/utils.d.ts +112 -0
  37. package/dist/utils.js +3099 -0
  38. package/dist/utils.mjs +3030 -1
  39. package/dist/view-type-CfcWWR0w.d.ts +137 -0
  40. package/package.json +92 -78
  41. package/dist/chunk-5N6LG2T7.mjs +0 -2
  42. package/dist/chunk-CI6PEZ77.mjs +0 -1
  43. package/dist/chunk-KPELPP6F.mjs +0 -1
  44. package/dist/chunk-LCUY2BJU.mjs +0 -1
  45. package/dist/chunk-QGGHYIHF.mjs +0 -1
  46. package/dist/chunk-W5MFEPZ6.mjs +0 -5
@@ -7,4 +7,4 @@ declare const localStorageUtils: () => {
7
7
  };
8
8
  type LocalStorageUtilsType = ReturnType<typeof localStorageUtils>;
9
9
 
10
- export { type LocalStorageUtilsType as L, localStorageUtils as l };
10
+ export type { LocalStorageUtilsType as L };
@@ -0,0 +1,10 @@
1
+ declare const localStorageUtils: () => {
2
+ setToken: (access_token: string) => Promise<void>;
3
+ setRefreshToken: (refresh_token: string) => Promise<void>;
4
+ getAccessToken: () => Promise<string | null>;
5
+ getRefreshToken: () => Promise<string | null>;
6
+ clearToken: () => Promise<void>;
7
+ };
8
+ type LocalStorageUtilsType = ReturnType<typeof localStorageUtils>;
9
+
10
+ export type { LocalStorageUtilsType as L };
@@ -0,0 +1,14 @@
1
+ import { B as BaseModelInit } from './base-model-type-DD8uZnDP.js';
2
+
3
+ declare class BaseModel {
4
+ name: string;
5
+ view: Record<string, any>;
6
+ fields?: any;
7
+ constructor(init: BaseModelInit);
8
+ private getSpecificationByFields;
9
+ getTreeProps(): Record<string, any>;
10
+ getTreeFields(): Record<string, any>[];
11
+ getSpecification(): Record<string, any>;
12
+ }
13
+
14
+ export { BaseModel };
package/dist/models.js ADDED
@@ -0,0 +1,147 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/models.ts
21
+ var models_exports = {};
22
+ __export(models_exports, {
23
+ BaseModel: () => BaseModel
24
+ });
25
+ module.exports = __toCommonJS(models_exports);
26
+
27
+ // src/constants/widget/widget-avatar-constant.ts
28
+ var WIDGETAVATAR = /* @__PURE__ */ ((WIDGETAVATAR2) => {
29
+ WIDGETAVATAR2["many2one_avatar_user"] = "many2one_avatar_user";
30
+ WIDGETAVATAR2["many2many_avatar_user"] = "many2many_avatar_user";
31
+ return WIDGETAVATAR2;
32
+ })(WIDGETAVATAR || {});
33
+
34
+ // src/models/base-model/index.ts
35
+ var BaseModel = class {
36
+ name;
37
+ view;
38
+ fields;
39
+ constructor(init) {
40
+ this.name = init.name;
41
+ this.view = init.view;
42
+ this.fields = init.fields;
43
+ }
44
+ getSpecificationByFields({
45
+ fields = [],
46
+ specification = {},
47
+ modelsData,
48
+ model,
49
+ modelRoot
50
+ }) {
51
+ if (Array.isArray(fields)) {
52
+ let spec = { ...specification };
53
+ fields.forEach((field) => {
54
+ if (!field?.type_co || field?.name && field?.type_co === "field" /* FIELD */) {
55
+ if (modelsData?.[model]?.[field?.name]) {
56
+ if (modelsData?.[model]?.[field?.name]?.type === "one2many" /* ONE2MANY */ || modelsData?.[model]?.[field?.name]?.type === "many2many" /* MANY2MANY */) {
57
+ const relation = modelsData?.[model]?.[field?.name]?.relation;
58
+ const modelRelation = modelsData?.[relation];
59
+ if (modelRelation) {
60
+ spec[field?.name] = {
61
+ fields: {}
62
+ };
63
+ if (modelRoot && modelRoot === relation) {
64
+ spec[field?.name].fields = { id: {} };
65
+ } else {
66
+ spec[field?.name].fields = this.getSpecificationByFields({
67
+ fields: Object.values(modelRelation),
68
+ specification: { id: {}, display_name: {} },
69
+ modelsData,
70
+ model: relation,
71
+ modelRoot: model
72
+ });
73
+ }
74
+ } else {
75
+ spec[field?.name] = {
76
+ fields: {
77
+ id: {},
78
+ display_name: {},
79
+ ...field?.widget === "many2many_binary" ? { mimetype: {} } : {},
80
+ ...field?.widget === "many2many_binary" && relation === "ir.attachment" ? { datas: {} } : {}
81
+ }
82
+ };
83
+ }
84
+ } else if (modelsData?.[model]?.[field?.name]?.type === "many2one" /* MANY2ONE */) {
85
+ spec[field?.name] = {
86
+ fields: {
87
+ id: {},
88
+ display_name: {},
89
+ ...WIDGETAVATAR[field?.widget] ? { image_256: {} } : {},
90
+ ...field?.name === "currency_id" && fields?.find((item) => item?.widget === "monetary") ? { symbol: {} } : {},
91
+ ...field?.widget === "many2many_binary" ? { mimetype: {} } : {}
92
+ }
93
+ };
94
+ } else {
95
+ spec[field?.name] = {};
96
+ }
97
+ }
98
+ } else if (field?.type_co === "group" /* GROUP */ || field?.type_co === "div" /* DIV */ || field?.type_co === "span" /* SPAN */) {
99
+ const specGroup = this.getSpecificationByFields({
100
+ fields: field?.fields,
101
+ specification: spec,
102
+ modelsData,
103
+ model
104
+ });
105
+ spec = { ...spec, ...specGroup };
106
+ } else if (field?.type_co === "tree" /* TREE */ || field?.type_co === "list" /* LIST */) {
107
+ const relation = modelsData?.[model]?.[field?.name]?.relation;
108
+ const specTreee = this.getSpecificationByFields({
109
+ fields: field?.fields,
110
+ specification: {},
111
+ modelsData,
112
+ model: relation,
113
+ modelRoot: model
114
+ });
115
+ spec = { ...spec, [field?.name]: { fields: specTreee } };
116
+ }
117
+ });
118
+ return spec;
119
+ } else {
120
+ console.warn("fields is not array");
121
+ }
122
+ }
123
+ getTreeProps() {
124
+ const props = this.view?.views?.list || {};
125
+ return props;
126
+ }
127
+ getTreeFields() {
128
+ const fields = this.view?.views?.list?.fields || [];
129
+ return fields;
130
+ }
131
+ getSpecification() {
132
+ const specInit = {};
133
+ const modelData = this.view?.models || {};
134
+ const specification = this.getSpecificationByFields({
135
+ fields: this.fields,
136
+ specification: specInit,
137
+ modelsData: modelData,
138
+ model: this.name,
139
+ modelRoot: ""
140
+ });
141
+ return specification;
142
+ }
143
+ };
144
+ // Annotate the CommonJS export names for ESM import in node:
145
+ 0 && (module.exports = {
146
+ BaseModel
147
+ });
package/dist/models.mjs CHANGED
@@ -1 +1,120 @@
1
- export{a as BaseModel}from'./chunk-LCUY2BJU.mjs';import'./chunk-KPELPP6F.mjs';import'./chunk-CI6PEZ77.mjs';
1
+ // src/constants/widget/widget-avatar-constant.ts
2
+ var WIDGETAVATAR = /* @__PURE__ */ ((WIDGETAVATAR2) => {
3
+ WIDGETAVATAR2["many2one_avatar_user"] = "many2one_avatar_user";
4
+ WIDGETAVATAR2["many2many_avatar_user"] = "many2many_avatar_user";
5
+ return WIDGETAVATAR2;
6
+ })(WIDGETAVATAR || {});
7
+
8
+ // src/models/base-model/index.ts
9
+ var BaseModel = class {
10
+ name;
11
+ view;
12
+ fields;
13
+ constructor(init) {
14
+ this.name = init.name;
15
+ this.view = init.view;
16
+ this.fields = init.fields;
17
+ }
18
+ getSpecificationByFields({
19
+ fields = [],
20
+ specification = {},
21
+ modelsData,
22
+ model,
23
+ modelRoot
24
+ }) {
25
+ if (Array.isArray(fields)) {
26
+ let spec = { ...specification };
27
+ fields.forEach((field) => {
28
+ if (!field?.type_co || field?.name && field?.type_co === "field" /* FIELD */) {
29
+ if (modelsData?.[model]?.[field?.name]) {
30
+ if (modelsData?.[model]?.[field?.name]?.type === "one2many" /* ONE2MANY */ || modelsData?.[model]?.[field?.name]?.type === "many2many" /* MANY2MANY */) {
31
+ const relation = modelsData?.[model]?.[field?.name]?.relation;
32
+ const modelRelation = modelsData?.[relation];
33
+ if (modelRelation) {
34
+ spec[field?.name] = {
35
+ fields: {}
36
+ };
37
+ if (modelRoot && modelRoot === relation) {
38
+ spec[field?.name].fields = { id: {} };
39
+ } else {
40
+ spec[field?.name].fields = this.getSpecificationByFields({
41
+ fields: Object.values(modelRelation),
42
+ specification: { id: {}, display_name: {} },
43
+ modelsData,
44
+ model: relation,
45
+ modelRoot: model
46
+ });
47
+ }
48
+ } else {
49
+ spec[field?.name] = {
50
+ fields: {
51
+ id: {},
52
+ display_name: {},
53
+ ...field?.widget === "many2many_binary" ? { mimetype: {} } : {},
54
+ ...field?.widget === "many2many_binary" && relation === "ir.attachment" ? { datas: {} } : {}
55
+ }
56
+ };
57
+ }
58
+ } else if (modelsData?.[model]?.[field?.name]?.type === "many2one" /* MANY2ONE */) {
59
+ spec[field?.name] = {
60
+ fields: {
61
+ id: {},
62
+ display_name: {},
63
+ ...WIDGETAVATAR[field?.widget] ? { image_256: {} } : {},
64
+ ...field?.name === "currency_id" && fields?.find((item) => item?.widget === "monetary") ? { symbol: {} } : {},
65
+ ...field?.widget === "many2many_binary" ? { mimetype: {} } : {}
66
+ }
67
+ };
68
+ } else {
69
+ spec[field?.name] = {};
70
+ }
71
+ }
72
+ } else if (field?.type_co === "group" /* GROUP */ || field?.type_co === "div" /* DIV */ || field?.type_co === "span" /* SPAN */) {
73
+ const specGroup = this.getSpecificationByFields({
74
+ fields: field?.fields,
75
+ specification: spec,
76
+ modelsData,
77
+ model
78
+ });
79
+ spec = { ...spec, ...specGroup };
80
+ } else if (field?.type_co === "tree" /* TREE */ || field?.type_co === "list" /* LIST */) {
81
+ const relation = modelsData?.[model]?.[field?.name]?.relation;
82
+ const specTreee = this.getSpecificationByFields({
83
+ fields: field?.fields,
84
+ specification: {},
85
+ modelsData,
86
+ model: relation,
87
+ modelRoot: model
88
+ });
89
+ spec = { ...spec, [field?.name]: { fields: specTreee } };
90
+ }
91
+ });
92
+ return spec;
93
+ } else {
94
+ console.warn("fields is not array");
95
+ }
96
+ }
97
+ getTreeProps() {
98
+ const props = this.view?.views?.list || {};
99
+ return props;
100
+ }
101
+ getTreeFields() {
102
+ const fields = this.view?.views?.list?.fields || [];
103
+ return fields;
104
+ }
105
+ getSpecification() {
106
+ const specInit = {};
107
+ const modelData = this.view?.models || {};
108
+ const specification = this.getSpecificationByFields({
109
+ fields: this.fields,
110
+ specification: specInit,
111
+ modelsData: modelData,
112
+ model: this.name,
113
+ modelRoot: ""
114
+ });
115
+ return specification;
116
+ }
117
+ };
118
+ export {
119
+ BaseModel
120
+ };
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React$1, { ReactNode } from 'react';
3
- import { L as LocalStorageUtilsType } from './local-storage-AbiOQTLK.mjs';
4
- import { useForgotPassword, useForgotPasswordSSO, useGetProvider, useIsValidToken, useLoginCredential, useLoginSocial, useResetPassword, useResetPasswordSSO, useUpdatePassword, useLogout, useGetAccessByCode, useValidateActionToken, useGetCompanyInfo, useGetCurrentCompany, useGetListCompany, useExecuteImport, useExportExcel, useGetFieldExport, useGetFileExcel, useParsePreview, useUploadFileExcel, useUploadIdFile, useChangeStatus, useDeleteComment, useGetComment, useGetFormView, useSendComment, useUploadImage, useDelete, useGetAll, useGetConversionRate, useGetCurrency, useGetDetail, useGetFieldOnChange, useGetListMyBankAccount, useModel, useOdooDataTransform, useOnChangeForm, useSave, useGetProfile, useGetUser, useSwitchLocale, useButton, useDuplicateRecord, useGet2FAMethods, useGetActionDetail, useGetCalendar, useGetGroups, useGetListData, useGetMenu, useGetPrintReport, useGetProGressBar, useGetResequence, useGetSelection, useGetView, useLoadAction, useLoadMessage, usePrint, useRemoveRow, useRunAction, useSignInSSO, useVerify2FA, useGrantAccess, useRemoveTotpSetup, useRequestSetupTotp, useSettingsWebRead2fa, useVerifyTotp, useUploadFile, useCreateEntity, useGetASession, useCreateSession, useDeleteEntity, useGetList, useGetPos, useHandleClosingSession, useManageSession, useUpdateClosedSession, useUpdateEntity, useLoadDataPosSession, useManageOnChange, useGenSerialNumber, useGetOrderLine, useGetProductImage, useAddEntity, useCheckPayment, useHandleCloseSession, useHandleClosingDetailSession, useCreatePosConfig, useSearchJournal, useGetTenantMapping, useGetToken, useGetPreparationDisplayData, useUpdateOrderStatus, useGetThreadData, useGetThreadMessages, useGetExternalTabs, useProcessOrder, useGeneratePaymentQrInfo, useSavePinCode, useGetPinCode, useReadGroup, useGetNotifications, useGetDataChart, useGetVersion, useCreateEInvoice, useGetCurrentUser, useGetWard, useGetCity, useGetCountry, useGetPartnerTitle, useChangeOrderPreparationState, useCompleteCurrentStage, useLoginSupa, useAddFloor, useAddTable, useDeleteFloor, useDeleteTable, useUpdateFloor, useUpdateTable, useCreateOrder } from './hooks.mjs';
3
+ import { L as LocalStorageUtilsType } from './local-storage-BPvoMGYJ.mjs';
4
+ import { useForgotPassword, useForgotPasswordSSO, useGetProvider, useIsValidToken, useLoginCredential, useLoginSocial, useResetPassword, useResetPasswordSSO, useUpdatePassword, useLogout, useGetAccessByCode, useValidateActionToken, useGetCompanyInfo, useGetCurrentCompany, useGetListCompany, useExecuteImport, useExportExcel, useGetFieldExport, useGetFileExcel, useParsePreview, useUploadFileExcel, useUploadIdFile, useChangeStatus, useDeleteComment, useGetComment, useGetFormView, useGetImage, useSendComment, useUploadImage, useDelete, useGetAll, useGetConversionRate, useGetCurrency, useGetDetail, useGetFieldOnChange, useGetListMyBankAccount, useModel, useOdooDataTransform, useOnChangeForm, useSave, useGetProfile, useGetUser, useSwitchLocale, useButton, useDuplicateRecord, useGet2FAMethods, useGetActionDetail, useGetCalendar, useGetGroups, useGetListData, useGetMenu, useGetPrintReport, useGetProGressBar, useGetResequence, useGetSelection, useGetView, useLoadAction, useLoadMessage, usePrint, useRemoveRow, useRunAction, useSignInSSO, useVerify2FA, useGrantAccess, useRemoveTotpSetup, useRequestSetupTotp, useSettingsWebRead2fa, useVerifyTotp, useUploadFile, useCreateEntity, useGetASession, useCreateSession, useDeleteEntity, useGetList, useGetPos, useHandleClosingSession, useManageSession, useUpdateClosedSession, useUpdateEntity, useLoadDataPosSession, useManageOnChange, useGenSerialNumber, useGetOrderLine, useGetProductImage, useAddEntity, useCheckPayment, useHandleCloseSession, useHandleClosingDetailSession, useCreatePosConfig, useSearchJournal, useGetTenantMapping, useGetToken, useGetPreparationDisplayData, useUpdateOrderStatus, useGetThreadData, useGetThreadMessages, useGetExternalTabs, useProcessOrder, useGeneratePaymentQrInfo, useSavePinCode, useGetPinCode, useReadGroup, useGetNotifications, useGetDataChart, useGetVersion, useCreateEInvoice, useGetCurrentUser, useGetWard, useGetCity, useGetCountry, useGetPartnerTitle, useChangeOrderPreparationState, useCompleteCurrentStage, useLoginSupa, useAddFloor, useAddTable, useDeleteFloor, useDeleteTable, useUpdateFloor, useUpdateTable, useCreateOrder } from './hooks.mjs';
5
5
  import { SupabaseClient } from '@supabase/supabase-js';
6
6
  import '@tanstack/react-query';
7
7
  import './view-type-CfcWWR0w.mjs';
@@ -17,6 +17,10 @@ declare const ReactQueryProvider: ({ children }: {
17
17
  children: ReactNode;
18
18
  }) => react_jsx_runtime.JSX.Element;
19
19
 
20
+ declare const VersionGate: ({ children }: {
21
+ children: ReactNode;
22
+ }) => react_jsx_runtime.JSX.Element | null;
23
+
20
24
  interface EnvConfig {
21
25
  env?: any;
22
26
  baseUrl?: string;
@@ -92,6 +96,7 @@ interface ServiceContextType {
92
96
  useDeleteComment: typeof useDeleteComment;
93
97
  useGetComment: typeof useGetComment;
94
98
  useGetFormView: typeof useGetFormView;
99
+ useGetImage: typeof useGetImage;
95
100
  useSendComment: typeof useSendComment;
96
101
  useUploadImage: typeof useUploadImage;
97
102
  useDelete: typeof useDelete;
@@ -200,10 +205,10 @@ declare const MetaProvider: ({ children }: MetaProviderProps) => react_jsx_runti
200
205
  type SupabaseProviderProps = {
201
206
  supabaseUrl: string;
202
207
  supabaseKey: string;
203
- schema?: string;
208
+ tenantId: string;
204
209
  children: React$1.ReactNode;
205
210
  };
206
- declare const SupabaseProvider: ({ supabaseUrl, supabaseKey, schema, children, }: SupabaseProviderProps) => react_jsx_runtime.JSX.Element;
211
+ declare const SupabaseProvider: ({ supabaseUrl, supabaseKey, tenantId, children, }: SupabaseProviderProps) => react_jsx_runtime.JSX.Element;
207
212
  declare const useSupabase: () => SupabaseClient<any, any, any, any, any>;
208
213
 
209
- export { EnvProvider, MainProvider, MetaProvider, ReactQueryProvider, ServiceProvider, SupabaseProvider, useEnv, useService, useSupabase };
214
+ export { EnvProvider, MainProvider, MetaProvider, ReactQueryProvider, ServiceProvider, SupabaseProvider, VersionGate, useEnv, useService, useSupabase };
@@ -0,0 +1,214 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import React$1, { ReactNode } from 'react';
3
+ import { L as LocalStorageUtilsType } from './local-storage-BPvoMGYJ.js';
4
+ import { useForgotPassword, useForgotPasswordSSO, useGetProvider, useIsValidToken, useLoginCredential, useLoginSocial, useResetPassword, useResetPasswordSSO, useUpdatePassword, useLogout, useGetAccessByCode, useValidateActionToken, useGetCompanyInfo, useGetCurrentCompany, useGetListCompany, useExecuteImport, useExportExcel, useGetFieldExport, useGetFileExcel, useParsePreview, useUploadFileExcel, useUploadIdFile, useChangeStatus, useDeleteComment, useGetComment, useGetFormView, useGetImage, useSendComment, useUploadImage, useDelete, useGetAll, useGetConversionRate, useGetCurrency, useGetDetail, useGetFieldOnChange, useGetListMyBankAccount, useModel, useOdooDataTransform, useOnChangeForm, useSave, useGetProfile, useGetUser, useSwitchLocale, useButton, useDuplicateRecord, useGet2FAMethods, useGetActionDetail, useGetCalendar, useGetGroups, useGetListData, useGetMenu, useGetPrintReport, useGetProGressBar, useGetResequence, useGetSelection, useGetView, useLoadAction, useLoadMessage, usePrint, useRemoveRow, useRunAction, useSignInSSO, useVerify2FA, useGrantAccess, useRemoveTotpSetup, useRequestSetupTotp, useSettingsWebRead2fa, useVerifyTotp, useUploadFile, useCreateEntity, useGetASession, useCreateSession, useDeleteEntity, useGetList, useGetPos, useHandleClosingSession, useManageSession, useUpdateClosedSession, useUpdateEntity, useLoadDataPosSession, useManageOnChange, useGenSerialNumber, useGetOrderLine, useGetProductImage, useAddEntity, useCheckPayment, useHandleCloseSession, useHandleClosingDetailSession, useCreatePosConfig, useSearchJournal, useGetTenantMapping, useGetToken, useGetPreparationDisplayData, useUpdateOrderStatus, useGetThreadData, useGetThreadMessages, useGetExternalTabs, useProcessOrder, useGeneratePaymentQrInfo, useSavePinCode, useGetPinCode, useReadGroup, useGetNotifications, useGetDataChart, useGetVersion, useCreateEInvoice, useGetCurrentUser, useGetWard, useGetCity, useGetCountry, useGetPartnerTitle, useChangeOrderPreparationState, useCompleteCurrentStage, useLoginSupa, useAddFloor, useAddTable, useDeleteFloor, useDeleteTable, useUpdateFloor, useUpdateTable, useCreateOrder } from './hooks.js';
5
+ import { SupabaseClient } from '@supabase/supabase-js';
6
+ import '@tanstack/react-query';
7
+ import './view-type-CfcWWR0w.js';
8
+ import '@supabase/auth-js';
9
+ import './base-model-type-DD8uZnDP.js';
10
+ import './models.js';
11
+
12
+ declare const MainProvider: ({ children }: {
13
+ children: ReactNode;
14
+ }) => react_jsx_runtime.JSX.Element;
15
+
16
+ declare const ReactQueryProvider: ({ children }: {
17
+ children: ReactNode;
18
+ }) => react_jsx_runtime.JSX.Element;
19
+
20
+ declare const VersionGate: ({ children }: {
21
+ children: ReactNode;
22
+ }) => react_jsx_runtime.JSX.Element | null;
23
+
24
+ interface EnvConfig {
25
+ env?: any;
26
+ baseUrl?: string;
27
+ requests?: any;
28
+ default_service?: string;
29
+ context?: {
30
+ uid?: number | null;
31
+ allowed_company_ids?: number[];
32
+ lang?: string;
33
+ tz?: string;
34
+ };
35
+ defaultCompany?: {
36
+ id?: number | null;
37
+ logo?: string;
38
+ secondary_color?: string;
39
+ primary_color?: string;
40
+ secondary_logo?: string;
41
+ };
42
+ config?: any;
43
+ companies?: any[];
44
+ user?: any;
45
+ db?: string;
46
+ refreshTokenEndpoint?: string;
47
+ isSupaMode?: boolean;
48
+ localStorageUtils?: LocalStorageUtilsType;
49
+ sessionStorageUtils?: any;
50
+ envFile?: any;
51
+ xNode?: string;
52
+ excludeLanguages?: string[];
53
+ }
54
+ declare function EnvProvider({ children, localStorageUtils: localStorageUtil, sessionStorageUtils: sessionStorageUtil, }: {
55
+ children: React.ReactNode;
56
+ localStorageUtils?: LocalStorageUtilsType;
57
+ sessionStorageUtils?: any;
58
+ }): react_jsx_runtime.JSX.Element;
59
+ declare function useEnv(): {
60
+ env: EnvConfig;
61
+ setupEnv: (envConfig: Partial<EnvConfig>) => EnvConfig;
62
+ setUid: (uid: number) => void;
63
+ setLang: (lang: string) => void;
64
+ setAllowCompanies: (allowed_company_ids: number[]) => void;
65
+ setCompanies: (companies: any[]) => void;
66
+ setDefaultCompany: (defaultCompany: EnvConfig["defaultCompany"]) => void;
67
+ setUserInfo: (user: any) => void;
68
+ setConfig: (config: any) => void;
69
+ setEnvFile: (envFile: any) => void;
70
+ };
71
+
72
+ interface ServiceContextType {
73
+ useForgotPassword: typeof useForgotPassword;
74
+ useForgotPasswordSSO: typeof useForgotPasswordSSO;
75
+ useGetProvider: typeof useGetProvider;
76
+ useIsValidToken: typeof useIsValidToken;
77
+ useLoginCredential: typeof useLoginCredential;
78
+ useLoginSocial: typeof useLoginSocial;
79
+ useResetPassword: typeof useResetPassword;
80
+ useResetPasswordSSO: typeof useResetPasswordSSO;
81
+ useUpdatePassword: typeof useUpdatePassword;
82
+ useLogout: typeof useLogout;
83
+ useGetAccessByCode: typeof useGetAccessByCode;
84
+ useValidateActionToken: typeof useValidateActionToken;
85
+ useGetCompanyInfo: typeof useGetCompanyInfo;
86
+ useGetCurrentCompany: typeof useGetCurrentCompany;
87
+ useGetListCompany: typeof useGetListCompany;
88
+ useExecuteImport: typeof useExecuteImport;
89
+ useExportExcel: typeof useExportExcel;
90
+ useGetFieldExport: typeof useGetFieldExport;
91
+ useGetFileExcel: typeof useGetFileExcel;
92
+ useParsePreview: typeof useParsePreview;
93
+ useUploadFileExcel: typeof useUploadFileExcel;
94
+ useUploadIdFile: typeof useUploadIdFile;
95
+ useChangeStatus: typeof useChangeStatus;
96
+ useDeleteComment: typeof useDeleteComment;
97
+ useGetComment: typeof useGetComment;
98
+ useGetFormView: typeof useGetFormView;
99
+ useGetImage: typeof useGetImage;
100
+ useSendComment: typeof useSendComment;
101
+ useUploadImage: typeof useUploadImage;
102
+ useDelete: typeof useDelete;
103
+ useGetAll: typeof useGetAll;
104
+ useGetConversionRate: typeof useGetConversionRate;
105
+ useGetCurrency: typeof useGetCurrency;
106
+ useGetDetail: typeof useGetDetail;
107
+ useGetFieldOnChange: typeof useGetFieldOnChange;
108
+ useGetListMyBankAccount: typeof useGetListMyBankAccount;
109
+ useModel: typeof useModel;
110
+ useOdooDataTransform: typeof useOdooDataTransform;
111
+ useOnChangeForm: typeof useOnChangeForm;
112
+ useSave: typeof useSave;
113
+ useGetProfile: typeof useGetProfile;
114
+ useGetUser: typeof useGetUser;
115
+ useSwitchLocale: typeof useSwitchLocale;
116
+ useButton: typeof useButton;
117
+ useDuplicateRecord: typeof useDuplicateRecord;
118
+ useGet2FAMethods: typeof useGet2FAMethods;
119
+ useGetActionDetail: typeof useGetActionDetail;
120
+ useGetCalendar: typeof useGetCalendar;
121
+ useGetGroups: typeof useGetGroups;
122
+ useGetListData: typeof useGetListData;
123
+ useGetMenu: typeof useGetMenu;
124
+ useGetPrintReport: typeof useGetPrintReport;
125
+ useGetProGressBar: typeof useGetProGressBar;
126
+ useGetResequence: typeof useGetResequence;
127
+ useGetSelection: typeof useGetSelection;
128
+ useGetView: typeof useGetView;
129
+ useLoadAction: typeof useLoadAction;
130
+ useLoadMessage: typeof useLoadMessage;
131
+ usePrint: typeof usePrint;
132
+ useRemoveRow: typeof useRemoveRow;
133
+ useRunAction: typeof useRunAction;
134
+ useSignInSSO: typeof useSignInSSO;
135
+ useVerify2FA: typeof useVerify2FA;
136
+ useGrantAccess: typeof useGrantAccess;
137
+ useRemoveTotpSetup: typeof useRemoveTotpSetup;
138
+ useRequestSetupTotp: typeof useRequestSetupTotp;
139
+ useSettingsWebRead2fa: typeof useSettingsWebRead2fa;
140
+ useVerifyTotp: typeof useVerifyTotp;
141
+ useUploadFile: typeof useUploadFile;
142
+ useCreateEntity: typeof useCreateEntity;
143
+ useGetASession: typeof useGetASession;
144
+ useCreateSession: typeof useCreateSession;
145
+ useDeleteEntity: typeof useDeleteEntity;
146
+ useGetList: typeof useGetList;
147
+ useGetPos: typeof useGetPos;
148
+ useHandleClosingSession: typeof useHandleClosingSession;
149
+ useManageSession: typeof useManageSession;
150
+ useUpdateClosedSession: typeof useUpdateClosedSession;
151
+ useUpdateEntity: typeof useUpdateEntity;
152
+ useLoadDataPosSession: typeof useLoadDataPosSession;
153
+ useManageOnChange: typeof useManageOnChange;
154
+ useGenSerialNumber: typeof useGenSerialNumber;
155
+ useGetOrderLine: typeof useGetOrderLine;
156
+ useGetProductImage: typeof useGetProductImage;
157
+ useAddEntity: typeof useAddEntity;
158
+ useCheckPayment: typeof useCheckPayment;
159
+ useHandleCloseSession: typeof useHandleCloseSession;
160
+ useHandleClosingDetailSession: typeof useHandleClosingDetailSession;
161
+ useCreatePosConfig: typeof useCreatePosConfig;
162
+ useSearchJournal: typeof useSearchJournal;
163
+ useGetTenantMapping: typeof useGetTenantMapping;
164
+ useGetToken: typeof useGetToken;
165
+ useGetPreparationDisplayData: typeof useGetPreparationDisplayData;
166
+ useUpdateOrderStatus: typeof useUpdateOrderStatus;
167
+ useGetThreadData: typeof useGetThreadData;
168
+ useGetThreadMessages: typeof useGetThreadMessages;
169
+ useGetExternalTabs: typeof useGetExternalTabs;
170
+ useProcessOrder: typeof useProcessOrder;
171
+ useGeneratePaymentQrInfo: typeof useGeneratePaymentQrInfo;
172
+ useSavePinCode: typeof useSavePinCode;
173
+ useGetPinCode: typeof useGetPinCode;
174
+ useReadGroup: typeof useReadGroup;
175
+ useGetNotifications: typeof useGetNotifications;
176
+ useGetDataChart: typeof useGetDataChart;
177
+ useGetVersion: typeof useGetVersion;
178
+ useCreateEInvoice: typeof useCreateEInvoice;
179
+ useGetCurrentUser: typeof useGetCurrentUser;
180
+ useGetWard: typeof useGetWard;
181
+ useGetCity: typeof useGetCity;
182
+ useGetCountry: typeof useGetCountry;
183
+ useGetPartnerTitle: typeof useGetPartnerTitle;
184
+ useChangeOrderPreparationState: typeof useChangeOrderPreparationState;
185
+ useCompleteCurrentStage: typeof useCompleteCurrentStage;
186
+ useLoginSupa: typeof useLoginSupa;
187
+ useAddFloor: typeof useAddFloor;
188
+ useAddTable: typeof useAddTable;
189
+ useDeleteFloor: typeof useDeleteFloor;
190
+ useDeleteTable: typeof useDeleteTable;
191
+ useUpdateFloor: typeof useUpdateFloor;
192
+ useUpdateTable: typeof useUpdateTable;
193
+ useCreateOrder: typeof useCreateOrder;
194
+ }
195
+ declare const ServiceProvider: ({ children, }: {
196
+ children: React.ReactNode;
197
+ }) => react_jsx_runtime.JSX.Element;
198
+ declare const useService: () => ServiceContextType;
199
+
200
+ type MetaProviderProps = {
201
+ children: ReactNode;
202
+ };
203
+ declare const MetaProvider: ({ children }: MetaProviderProps) => react_jsx_runtime.JSX.Element;
204
+
205
+ type SupabaseProviderProps = {
206
+ supabaseUrl: string;
207
+ supabaseKey: string;
208
+ tenantId: string;
209
+ children: React$1.ReactNode;
210
+ };
211
+ declare const SupabaseProvider: ({ supabaseUrl, supabaseKey, tenantId, children, }: SupabaseProviderProps) => react_jsx_runtime.JSX.Element;
212
+ declare const useSupabase: () => SupabaseClient<any, any, any, any, any>;
213
+
214
+ export { EnvProvider, MainProvider, MetaProvider, ReactQueryProvider, ServiceProvider, SupabaseProvider, VersionGate, useEnv, useService, useSupabase };