@fctc/interface-logic 2.4.5 → 2.4.7

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.
@@ -0,0 +1,8 @@
1
+ interface BaseModelInit {
2
+ name: string;
3
+ view: Record<string, any>;
4
+ actContext?: Record<string, any>;
5
+ fields?: any;
6
+ }
7
+
8
+ export type { BaseModelInit as B };
@@ -0,0 +1,8 @@
1
+ interface BaseModelInit {
2
+ name: string;
3
+ view: Record<string, any>;
4
+ actContext?: Record<string, any>;
5
+ fields?: any;
6
+ }
7
+
8
+ export type { BaseModelInit as B };
package/dist/hooks.d.mts CHANGED
@@ -1,5 +1,7 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
2
  import { L as LoginCredentialBody, d as SocialTokenBody, F as ForgotPasswordBody, u as updatePasswordBody, V as ViewData, C as ContextApi, c as GetSelectionType, f as GetViewParams } from './view-type-xxw9OeSR.mjs';
3
+ import { B as BaseModelInit } from './base-model-type-DD8uZnDP.mjs';
4
+ import { BaseModel } from './models.mjs';
3
5
 
4
6
  declare const useForgotPassword: () => _tanstack_react_query.UseMutationResult<any, Error, string, unknown>;
5
7
 
@@ -173,24 +175,6 @@ declare const useGetListMyBankAccount: ({ domain, spectification, model, }: {
173
175
  model: string;
174
176
  }) => _tanstack_react_query.UseQueryResult<any, Error>;
175
177
 
176
- interface BaseModelInit {
177
- name: string;
178
- view: Record<string, any>;
179
- actContext?: Record<string, any>;
180
- fields?: any;
181
- }
182
-
183
- declare class BaseModel {
184
- name: string;
185
- view: Record<string, any>;
186
- fields?: any;
187
- constructor(init: BaseModelInit);
188
- private getSpecificationByFields;
189
- getTreeProps(): Record<string, any>;
190
- getTreeFields(): Record<string, any>[];
191
- getSpecification(): Record<string, any>;
192
- }
193
-
194
178
  declare const useModel: () => {
195
179
  initModel: (modelData: BaseModelInit) => BaseModel;
196
180
  };
package/dist/hooks.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
2
  import { L as LoginCredentialBody, d as SocialTokenBody, F as ForgotPasswordBody, u as updatePasswordBody, V as ViewData, C as ContextApi, c as GetSelectionType, f as GetViewParams } from './view-type-xxw9OeSR.js';
3
+ import { B as BaseModelInit } from './base-model-type-DD8uZnDP.js';
4
+ import { BaseModel } from './models.js';
3
5
 
4
6
  declare const useForgotPassword: () => _tanstack_react_query.UseMutationResult<any, Error, string, unknown>;
5
7
 
@@ -173,24 +175,6 @@ declare const useGetListMyBankAccount: ({ domain, spectification, model, }: {
173
175
  model: string;
174
176
  }) => _tanstack_react_query.UseQueryResult<any, Error>;
175
177
 
176
- interface BaseModelInit {
177
- name: string;
178
- view: Record<string, any>;
179
- actContext?: Record<string, any>;
180
- fields?: any;
181
- }
182
-
183
- declare class BaseModel {
184
- name: string;
185
- view: Record<string, any>;
186
- fields?: any;
187
- constructor(init: BaseModelInit);
188
- private getSpecificationByFields;
189
- getTreeProps(): Record<string, any>;
190
- getTreeFields(): Record<string, any>[];
191
- getSpecification(): Record<string, any>;
192
- }
193
-
194
178
  declare const useModel: () => {
195
179
  initModel: (modelData: BaseModelInit) => BaseModel;
196
180
  };
package/dist/hooks.js CHANGED
@@ -4262,7 +4262,6 @@ function useViewService() {
4262
4262
  );
4263
4263
  const getMenu = (0, import_react14.useCallback)(
4264
4264
  async (context, specification, domain) => {
4265
- console.log("domain", domain);
4266
4265
  const jsonData = {
4267
4266
  model: "ir.ui.menu" /* MENU */,
4268
4267
  method: "web_search_read" /* WEB_SEARCH_READ */,
@@ -5288,14 +5287,13 @@ var BaseModel = class {
5288
5287
  return specification;
5289
5288
  }
5290
5289
  };
5291
- var base_model_default = BaseModel;
5292
5290
 
5293
5291
  // src/hooks/model/use-model.ts
5294
5292
  var useModel = () => {
5295
5293
  const initModel = (modelData) => {
5296
5294
  switch (modelData?.name) {
5297
5295
  default:
5298
- return new base_model_default(modelData);
5296
+ return new BaseModel(modelData);
5299
5297
  }
5300
5298
  };
5301
5299
  return {
package/dist/hooks.mjs CHANGED
@@ -4158,7 +4158,6 @@ function useViewService() {
4158
4158
  );
4159
4159
  const getMenu = useCallback10(
4160
4160
  async (context, specification, domain) => {
4161
- console.log("domain", domain);
4162
4161
  const jsonData = {
4163
4162
  model: "ir.ui.menu" /* MENU */,
4164
4163
  method: "web_search_read" /* WEB_SEARCH_READ */,
@@ -5184,14 +5183,13 @@ var BaseModel = class {
5184
5183
  return specification;
5185
5184
  }
5186
5185
  };
5187
- var base_model_default = BaseModel;
5188
5186
 
5189
5187
  // src/hooks/model/use-model.ts
5190
5188
  var useModel = () => {
5191
5189
  const initModel = (modelData) => {
5192
5190
  switch (modelData?.name) {
5193
5191
  default:
5194
- return new base_model_default(modelData);
5192
+ return new BaseModel(modelData);
5195
5193
  }
5196
5194
  };
5197
5195
  return {
@@ -0,0 +1,14 @@
1
+ import { B as BaseModelInit } from './base-model-type-DD8uZnDP.mjs';
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 };
@@ -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,146 @@
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: {},
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
+ }
81
+ };
82
+ }
83
+ } else if (modelsData?.[model]?.[field?.name]?.type === "many2one" /* MANY2ONE */) {
84
+ spec[field?.name] = {
85
+ fields: {
86
+ id: {},
87
+ display_name: {},
88
+ ...WIDGETAVATAR[field?.widget] ? { image_256: {} } : {},
89
+ ...field?.name === "currency_id" && fields?.find((item) => item?.widget === "monetary") ? { symbol: {} } : {},
90
+ ...field?.widget === "many2many_binary" ? { mimetype: {} } : {}
91
+ }
92
+ };
93
+ } else {
94
+ spec[field?.name] = {};
95
+ }
96
+ }
97
+ } else if (field?.type_co === "group" /* GROUP */ || field?.type_co === "div" /* DIV */ || field?.type_co === "span" /* SPAN */) {
98
+ const specGroup = this.getSpecificationByFields({
99
+ fields: field?.fields,
100
+ specification: spec,
101
+ modelsData,
102
+ model
103
+ });
104
+ spec = { ...spec, ...specGroup };
105
+ } else if (field?.type_co === "tree" /* TREE */ || field?.type_co === "list" /* LIST */) {
106
+ const relation = modelsData?.[model]?.[field?.name]?.relation;
107
+ const specTreee = this.getSpecificationByFields({
108
+ fields: field?.fields,
109
+ specification: {},
110
+ modelsData,
111
+ model: relation,
112
+ modelRoot: model
113
+ });
114
+ spec = { ...spec, [field?.name]: { fields: specTreee } };
115
+ }
116
+ });
117
+ return spec;
118
+ } else {
119
+ console.warn("fields is not array");
120
+ }
121
+ }
122
+ getTreeProps() {
123
+ const props = this.view?.views?.list || {};
124
+ return props;
125
+ }
126
+ getTreeFields() {
127
+ const fields = this.view?.views?.list?.fields || [];
128
+ return fields;
129
+ }
130
+ getSpecification() {
131
+ const specInit = {};
132
+ const modelData = this.view?.models || {};
133
+ const specification = this.getSpecificationByFields({
134
+ fields: this.fields,
135
+ specification: specInit,
136
+ modelsData: modelData,
137
+ model: this.name,
138
+ modelRoot: ""
139
+ });
140
+ return specification;
141
+ }
142
+ };
143
+ // Annotate the CommonJS export names for ESM import in node:
144
+ 0 && (module.exports = {
145
+ BaseModel
146
+ });
@@ -0,0 +1,119 @@
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: {},
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
+ }
55
+ };
56
+ }
57
+ } else if (modelsData?.[model]?.[field?.name]?.type === "many2one" /* MANY2ONE */) {
58
+ spec[field?.name] = {
59
+ fields: {
60
+ id: {},
61
+ display_name: {},
62
+ ...WIDGETAVATAR[field?.widget] ? { image_256: {} } : {},
63
+ ...field?.name === "currency_id" && fields?.find((item) => item?.widget === "monetary") ? { symbol: {} } : {},
64
+ ...field?.widget === "many2many_binary" ? { mimetype: {} } : {}
65
+ }
66
+ };
67
+ } else {
68
+ spec[field?.name] = {};
69
+ }
70
+ }
71
+ } else if (field?.type_co === "group" /* GROUP */ || field?.type_co === "div" /* DIV */ || field?.type_co === "span" /* SPAN */) {
72
+ const specGroup = this.getSpecificationByFields({
73
+ fields: field?.fields,
74
+ specification: spec,
75
+ modelsData,
76
+ model
77
+ });
78
+ spec = { ...spec, ...specGroup };
79
+ } else if (field?.type_co === "tree" /* TREE */ || field?.type_co === "list" /* LIST */) {
80
+ const relation = modelsData?.[model]?.[field?.name]?.relation;
81
+ const specTreee = this.getSpecificationByFields({
82
+ fields: field?.fields,
83
+ specification: {},
84
+ modelsData,
85
+ model: relation,
86
+ modelRoot: model
87
+ });
88
+ spec = { ...spec, [field?.name]: { fields: specTreee } };
89
+ }
90
+ });
91
+ return spec;
92
+ } else {
93
+ console.warn("fields is not array");
94
+ }
95
+ }
96
+ getTreeProps() {
97
+ const props = this.view?.views?.list || {};
98
+ return props;
99
+ }
100
+ getTreeFields() {
101
+ const fields = this.view?.views?.list?.fields || [];
102
+ return fields;
103
+ }
104
+ getSpecification() {
105
+ const specInit = {};
106
+ const modelData = this.view?.models || {};
107
+ const specification = this.getSpecificationByFields({
108
+ fields: this.fields,
109
+ specification: specInit,
110
+ modelsData: modelData,
111
+ model: this.name,
112
+ modelRoot: ""
113
+ });
114
+ return specification;
115
+ }
116
+ };
117
+ export {
118
+ BaseModel
119
+ };
@@ -1,21 +1,22 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import { ReactNode } from 'react';
3
2
  import { L as LocalStorageUtilsType, S as SessionStorageUtilsType } from './session-storage-ARp_lhTD.mjs';
4
3
  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 } from './hooks.mjs';
5
4
  import '@tanstack/react-query';
6
5
  import './view-type-xxw9OeSR.mjs';
6
+ import './base-model-type-DD8uZnDP.mjs';
7
+ import './models.mjs';
7
8
 
8
9
  declare const MainProvider: ({ children }: {
9
10
  children: ReactNode;
10
- }) => react_jsx_runtime.JSX.Element;
11
+ }) => JSX.Element;
11
12
 
12
13
  declare const ReactQueryProvider: ({ children }: {
13
14
  children: ReactNode;
14
- }) => react_jsx_runtime.JSX.Element;
15
+ }) => JSX.Element;
15
16
 
16
17
  declare const VersionGate: ({ children }: {
17
18
  children: ReactNode;
18
- }) => react_jsx_runtime.JSX.Element | null;
19
+ }) => JSX.Element | null;
19
20
 
20
21
  interface EnvConfig {
21
22
  env?: any;
@@ -47,7 +48,7 @@ declare function EnvProvider({ children, localStorageUtils: localStorageUtil, se
47
48
  children: React.ReactNode;
48
49
  localStorageUtils?: LocalStorageUtilsType;
49
50
  sessionStorageUtils?: SessionStorageUtilsType;
50
- }): react_jsx_runtime.JSX.Element;
51
+ }): JSX.Element;
51
52
  declare function useEnv(): {
52
53
  env: EnvConfig;
53
54
  setupEnv: (envConfig: Partial<EnvConfig>) => EnvConfig;
@@ -134,12 +135,12 @@ interface ServiceContextType {
134
135
  }
135
136
  declare const ServiceProvider: ({ children, }: {
136
137
  children: React.ReactNode;
137
- }) => react_jsx_runtime.JSX.Element;
138
+ }) => JSX.Element;
138
139
  declare const useService: () => ServiceContextType;
139
140
 
140
141
  type MetaProviderProps = {
141
142
  children: ReactNode;
142
143
  };
143
- declare const MetaProvider: ({ children }: MetaProviderProps) => react_jsx_runtime.JSX.Element;
144
+ declare const MetaProvider: ({ children }: MetaProviderProps) => JSX.Element;
144
145
 
145
146
  export { EnvProvider, MainProvider, MetaProvider, ReactQueryProvider, ServiceProvider, VersionGate, useEnv, useService };
@@ -1,21 +1,22 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import { ReactNode } from 'react';
3
2
  import { L as LocalStorageUtilsType, S as SessionStorageUtilsType } from './session-storage-ARp_lhTD.js';
4
3
  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 } from './hooks.js';
5
4
  import '@tanstack/react-query';
6
5
  import './view-type-xxw9OeSR.js';
6
+ import './base-model-type-DD8uZnDP.js';
7
+ import './models.js';
7
8
 
8
9
  declare const MainProvider: ({ children }: {
9
10
  children: ReactNode;
10
- }) => react_jsx_runtime.JSX.Element;
11
+ }) => JSX.Element;
11
12
 
12
13
  declare const ReactQueryProvider: ({ children }: {
13
14
  children: ReactNode;
14
- }) => react_jsx_runtime.JSX.Element;
15
+ }) => JSX.Element;
15
16
 
16
17
  declare const VersionGate: ({ children }: {
17
18
  children: ReactNode;
18
- }) => react_jsx_runtime.JSX.Element | null;
19
+ }) => JSX.Element | null;
19
20
 
20
21
  interface EnvConfig {
21
22
  env?: any;
@@ -47,7 +48,7 @@ declare function EnvProvider({ children, localStorageUtils: localStorageUtil, se
47
48
  children: React.ReactNode;
48
49
  localStorageUtils?: LocalStorageUtilsType;
49
50
  sessionStorageUtils?: SessionStorageUtilsType;
50
- }): react_jsx_runtime.JSX.Element;
51
+ }): JSX.Element;
51
52
  declare function useEnv(): {
52
53
  env: EnvConfig;
53
54
  setupEnv: (envConfig: Partial<EnvConfig>) => EnvConfig;
@@ -134,12 +135,12 @@ interface ServiceContextType {
134
135
  }
135
136
  declare const ServiceProvider: ({ children, }: {
136
137
  children: React.ReactNode;
137
- }) => react_jsx_runtime.JSX.Element;
138
+ }) => JSX.Element;
138
139
  declare const useService: () => ServiceContextType;
139
140
 
140
141
  type MetaProviderProps = {
141
142
  children: ReactNode;
142
143
  };
143
- declare const MetaProvider: ({ children }: MetaProviderProps) => react_jsx_runtime.JSX.Element;
144
+ declare const MetaProvider: ({ children }: MetaProviderProps) => JSX.Element;
144
145
 
145
146
  export { EnvProvider, MainProvider, MetaProvider, ReactQueryProvider, ServiceProvider, VersionGate, useEnv, useService };
package/dist/provider.js CHANGED
@@ -4210,7 +4210,6 @@ function useViewService() {
4210
4210
  );
4211
4211
  const getMenu = (0, import_react10.useCallback)(
4212
4212
  async (context, specification, domain) => {
4213
- console.log("domain", domain);
4214
4213
  const jsonData = {
4215
4214
  model: "ir.ui.menu" /* MENU */,
4216
4215
  method: "web_search_read" /* WEB_SEARCH_READ */,
@@ -5654,14 +5653,13 @@ var BaseModel = class {
5654
5653
  return specification;
5655
5654
  }
5656
5655
  };
5657
- var base_model_default = BaseModel;
5658
5656
 
5659
5657
  // src/hooks/model/use-model.ts
5660
5658
  var useModel = () => {
5661
5659
  const initModel = (modelData) => {
5662
5660
  switch (modelData?.name) {
5663
5661
  default:
5664
- return new base_model_default(modelData);
5662
+ return new BaseModel(modelData);
5665
5663
  }
5666
5664
  };
5667
5665
  return {
package/dist/provider.mjs CHANGED
@@ -4167,7 +4167,6 @@ function useViewService() {
4167
4167
  );
4168
4168
  const getMenu = useCallback9(
4169
4169
  async (context, specification, domain) => {
4170
- console.log("domain", domain);
4171
4170
  const jsonData = {
4172
4171
  model: "ir.ui.menu" /* MENU */,
4173
4172
  method: "web_search_read" /* WEB_SEARCH_READ */,
@@ -5611,14 +5610,13 @@ var BaseModel = class {
5611
5610
  return specification;
5612
5611
  }
5613
5612
  };
5614
- var base_model_default = BaseModel;
5615
5613
 
5616
5614
  // src/hooks/model/use-model.ts
5617
5615
  var useModel = () => {
5618
5616
  const initModel = (modelData) => {
5619
5617
  switch (modelData?.name) {
5620
5618
  default:
5621
- return new base_model_default(modelData);
5619
+ return new BaseModel(modelData);
5622
5620
  }
5623
5621
  };
5624
5622
  return {
package/dist/services.js CHANGED
@@ -4380,7 +4380,6 @@ function useViewService() {
4380
4380
  );
4381
4381
  const getMenu = (0, import_react14.useCallback)(
4382
4382
  async (context, specification, domain) => {
4383
- console.log("domain", domain);
4384
4383
  const jsonData = {
4385
4384
  model: "ir.ui.menu" /* MENU */,
4386
4385
  method: "web_search_read" /* WEB_SEARCH_READ */,
package/dist/services.mjs CHANGED
@@ -4336,7 +4336,6 @@ function useViewService() {
4336
4336
  );
4337
4337
  const getMenu = useCallback10(
4338
4338
  async (context, specification, domain) => {
4339
- console.log("domain", domain);
4340
4339
  const jsonData = {
4341
4340
  model: "ir.ui.menu" /* MENU */,
4342
4341
  method: "web_search_read" /* WEB_SEARCH_READ */,
package/dist/types.d.mts CHANGED
@@ -1,4 +1,5 @@
1
1
  export { C as ContextApi, D as DeleteParams, F as ForgotPasswordBody, G as GetAllParams, a as GetDetailParams, b as GetListParams, c as GetSelectionType, f as GetViewParams, L as LoginCredentialBody, O as OnChangeParams, R as ResetPasswordRequest, S as SaveParams, d as SocialTokenBody, e as Specification, U as UpdatePasswordRequest, g as View, V as ViewData, u as updatePasswordBody } from './view-type-xxw9OeSR.mjs';
2
+ export { B as BaseModelInit } from './base-model-type-DD8uZnDP.mjs';
2
3
 
3
4
  interface Config {
4
5
  baseUrl: string;
package/dist/types.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export { C as ContextApi, D as DeleteParams, F as ForgotPasswordBody, G as GetAllParams, a as GetDetailParams, b as GetListParams, c as GetSelectionType, f as GetViewParams, L as LoginCredentialBody, O as OnChangeParams, R as ResetPasswordRequest, S as SaveParams, d as SocialTokenBody, e as Specification, U as UpdatePasswordRequest, g as View, V as ViewData, u as updatePasswordBody } from './view-type-xxw9OeSR.js';
2
+ export { B as BaseModelInit } from './base-model-type-DD8uZnDP.js';
2
3
 
3
4
  interface Config {
4
5
  baseUrl: string;
package/package.json CHANGED
@@ -1,85 +1,90 @@
1
- {
2
- "name": "@fctc/interface-logic",
3
- "version": "2.4.5",
4
- "types": "dist/index.d.ts",
5
- "main": "dist/index.cjs",
6
- "module": "dist/index.mjs",
7
- "exports": {
8
- ".": {
9
- "types": "./dist/index.d.ts",
10
- "import": "./dist/index.mjs",
11
- "require": "./dist/index.cjs"
12
- },
13
- "./configs": {
14
- "types": "./dist/configs.d.ts",
15
- "import": "./dist/configs.mjs",
16
- "require": "./dist/configs.cjs"
17
- },
18
- "./constants": {
19
- "types": "./dist/constants.d.ts",
20
- "import": "./dist/constants.mjs",
21
- "require": "./dist/constants.cjs"
22
- },
23
- "./environment": {
24
- "types": "./dist/environment.d.ts",
25
- "import": "./dist/environment.mjs",
26
- "require": "./dist/environment.cjs"
27
- },
28
- "./hooks": {
29
- "types": "./dist/hooks.d.ts",
30
- "import": "./dist/hooks.mjs",
31
- "require": "./dist/hooks.cjs"
32
- },
33
- "./provider": {
34
- "types": "./dist/provider.d.ts",
35
- "import": "./dist/provider.mjs",
36
- "require": "./dist/provider.cjs"
37
- },
38
- "./services": {
39
- "types": "./dist/services.d.ts",
40
- "import": "./dist/services.mjs",
41
- "require": "./dist/services.cjs"
42
- },
43
- "./store": {
44
- "types": "./dist/store.d.ts",
45
- "import": "./dist/store.mjs",
46
- "require": "./dist/store.cjs"
47
- },
48
- "./utils": {
49
- "types": "./dist/utils.d.ts",
50
- "import": "./dist/utils.mjs",
51
- "require": "./dist/utils.cjs"
52
- },
53
- "./types": {
54
- "types": "./dist/types.d.ts",
55
- "import": "./dist/types.mjs",
56
- "require": "./dist/types.cjs"
57
- }
58
- },
59
- "files": [
60
- "dist"
61
- ],
62
- "scripts": {
63
- "build": "tsup",
64
- "test": "jest"
65
- },
66
- "peerDependencies": {
67
- "react": "18.0.0",
68
- "@tanstack/react-query": "^5.83.0"
69
- },
70
- "dependencies": {
71
- "@reduxjs/toolkit": "^2.8.2",
72
- "@tanstack/react-query": "^5.83.0",
73
- "axios": "^1.11.0",
74
- "moment": "^2.30.1",
75
- "react-redux": "^9.2.0"
76
- },
77
- "devDependencies": {
78
- "@types/react": "^18.3.1",
79
- "react": "18.0.0",
80
- "jest": "^29.7.0",
81
- "tsup": "^8.0.0",
82
- "typescript": "^5.8.2"
83
- },
84
- "packageManager": "yarn@1.22.0"
85
- }
1
+ {
2
+ "name": "@fctc/interface-logic",
3
+ "version": "2.4.7",
4
+ "types": "dist/index.d.ts",
5
+ "main": "dist/index.cjs",
6
+ "module": "dist/index.mjs",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.mjs",
11
+ "require": "./dist/index.cjs"
12
+ },
13
+ "./configs": {
14
+ "types": "./dist/configs.d.ts",
15
+ "import": "./dist/configs.mjs",
16
+ "require": "./dist/configs.cjs"
17
+ },
18
+ "./constants": {
19
+ "types": "./dist/constants.d.ts",
20
+ "import": "./dist/constants.mjs",
21
+ "require": "./dist/constants.cjs"
22
+ },
23
+ "./environment": {
24
+ "types": "./dist/environment.d.ts",
25
+ "import": "./dist/environment.mjs",
26
+ "require": "./dist/environment.cjs"
27
+ },
28
+ "./hooks": {
29
+ "types": "./dist/hooks.d.ts",
30
+ "import": "./dist/hooks.mjs",
31
+ "require": "./dist/hooks.cjs"
32
+ },
33
+ "./provider": {
34
+ "types": "./dist/provider.d.ts",
35
+ "import": "./dist/provider.mjs",
36
+ "require": "./dist/provider.cjs"
37
+ },
38
+ "./services": {
39
+ "types": "./dist/services.d.ts",
40
+ "import": "./dist/services.mjs",
41
+ "require": "./dist/services.cjs"
42
+ },
43
+ "./store": {
44
+ "types": "./dist/store.d.ts",
45
+ "import": "./dist/store.mjs",
46
+ "require": "./dist/store.cjs"
47
+ },
48
+ "./utils": {
49
+ "types": "./dist/utils.d.ts",
50
+ "import": "./dist/utils.mjs",
51
+ "require": "./dist/utils.cjs"
52
+ },
53
+ "./types": {
54
+ "types": "./dist/types.d.ts",
55
+ "import": "./dist/types.mjs",
56
+ "require": "./dist/types.cjs"
57
+ },
58
+ "./models": {
59
+ "types": "./dist/models.d.ts",
60
+ "import": "./dist/models.mjs",
61
+ "require": "./dist/models.cjs"
62
+ }
63
+ },
64
+ "files": [
65
+ "dist"
66
+ ],
67
+ "scripts": {
68
+ "build": "tsup",
69
+ "test": "jest"
70
+ },
71
+ "peerDependencies": {
72
+ "react": "18.0.0",
73
+ "@tanstack/react-query": "^5.83.0"
74
+ },
75
+ "dependencies": {
76
+ "@reduxjs/toolkit": "^2.8.2",
77
+ "@tanstack/react-query": "^5.83.0",
78
+ "axios": "^1.11.0",
79
+ "moment": "^2.30.1",
80
+ "react-redux": "^9.2.0"
81
+ },
82
+ "devDependencies": {
83
+ "@types/react": "^18.3.1",
84
+ "react": "18.0.0",
85
+ "jest": "^29.7.0",
86
+ "tsup": "^8.0.0",
87
+ "typescript": "^5.8.2"
88
+ },
89
+ "packageManager": "yarn@1.22.0"
90
+ }