@fctc/interface-logic 4.5.3 → 4.5.5

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/chunk-BWSA2O6Z.mjs +1 -0
  2. package/dist/chunk-CI6PEZ77.mjs +1 -0
  3. package/dist/chunk-KPELPP6F.mjs +1 -0
  4. package/dist/chunk-LCUY2BJU.mjs +1 -0
  5. package/dist/chunk-TKG5NQ2J.mjs +2 -0
  6. package/dist/chunk-Y65DQP66.mjs +5 -0
  7. package/dist/configs.mjs +1 -2544
  8. package/dist/constants.d.mts +1 -1
  9. package/dist/constants.mjs +1 -293
  10. package/dist/environment.d.mts +1 -1
  11. package/dist/environment.mjs +1 -2669
  12. package/dist/hooks.d.mts +1 -7
  13. package/dist/hooks.mjs +1 -8786
  14. package/dist/{local-storage-BPvoMGYJ.d.mts → local-storage-AbiOQTLK.d.mts} +1 -1
  15. package/dist/models.mjs +1 -120
  16. package/dist/provider.d.mts +3 -8
  17. package/dist/provider.mjs +1 -9481
  18. package/dist/services.mjs +1 -6906
  19. package/dist/utils.d.mts +33 -61
  20. package/dist/utils.mjs +1 -3030
  21. package/package.json +78 -92
  22. package/dist/base-model-type-DD8uZnDP.d.ts +0 -8
  23. package/dist/configs.d.ts +0 -12
  24. package/dist/configs.js +0 -2581
  25. package/dist/constants.d.ts +0 -235
  26. package/dist/constants.js +0 -335
  27. package/dist/environment.d.ts +0 -56
  28. package/dist/environment.js +0 -2708
  29. package/dist/hooks.d.ts +0 -828
  30. package/dist/hooks.js +0 -8943
  31. package/dist/local-storage-BPvoMGYJ.d.ts +0 -10
  32. package/dist/models.d.ts +0 -14
  33. package/dist/models.js +0 -147
  34. package/dist/provider.d.ts +0 -214
  35. package/dist/provider.js +0 -9527
  36. package/dist/services.d.ts +0 -700
  37. package/dist/services.js +0 -6953
  38. package/dist/store.d.mts +0 -382
  39. package/dist/store.d.ts +0 -382
  40. package/dist/store.js +0 -823
  41. package/dist/store.mjs +0 -717
  42. package/dist/types.d.ts +0 -19
  43. package/dist/types.js +0 -18
  44. package/dist/utils.d.ts +0 -112
  45. package/dist/utils.js +0 -3099
  46. package/dist/view-type-CfcWWR0w.d.ts +0 -137
@@ -7,4 +7,4 @@ declare const localStorageUtils: () => {
7
7
  };
8
8
  type LocalStorageUtilsType = ReturnType<typeof localStorageUtils>;
9
9
 
10
- export type { LocalStorageUtilsType as L };
10
+ export { type LocalStorageUtilsType as L, localStorageUtils as l };
package/dist/models.mjs CHANGED
@@ -1,120 +1 @@
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
+ export{a as BaseModel}from'./chunk-LCUY2BJU.mjs';import'./chunk-KPELPP6F.mjs';import'./chunk-CI6PEZ77.mjs';
@@ -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-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';
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';
5
5
  import { SupabaseClient } from '@supabase/supabase-js';
6
6
  import '@tanstack/react-query';
7
7
  import './view-type-CfcWWR0w.mjs';
@@ -17,10 +17,6 @@ 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
-
24
20
  interface EnvConfig {
25
21
  env?: any;
26
22
  baseUrl?: string;
@@ -96,7 +92,6 @@ interface ServiceContextType {
96
92
  useDeleteComment: typeof useDeleteComment;
97
93
  useGetComment: typeof useGetComment;
98
94
  useGetFormView: typeof useGetFormView;
99
- useGetImage: typeof useGetImage;
100
95
  useSendComment: typeof useSendComment;
101
96
  useUploadImage: typeof useUploadImage;
102
97
  useDelete: typeof useDelete;
@@ -211,4 +206,4 @@ type SupabaseProviderProps = {
211
206
  declare const SupabaseProvider: ({ supabaseUrl, supabaseKey, schema, children, }: SupabaseProviderProps) => react_jsx_runtime.JSX.Element;
212
207
  declare const useSupabase: () => SupabaseClient<any, any, any, any, any>;
213
208
 
214
- export { EnvProvider, MainProvider, MetaProvider, ReactQueryProvider, ServiceProvider, SupabaseProvider, VersionGate, useEnv, useService, useSupabase };
209
+ export { EnvProvider, MainProvider, MetaProvider, ReactQueryProvider, ServiceProvider, SupabaseProvider, useEnv, useService, useSupabase };