@fctc/interface-logic 2.4.5 → 2.4.6
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/dist/base-model-type-DD8uZnDP.d.mts +8 -0
- package/dist/base-model-type-DD8uZnDP.d.ts +8 -0
- package/dist/hooks.d.mts +3 -19
- package/dist/hooks.d.ts +3 -19
- package/dist/hooks.js +6 -7
- package/dist/hooks.mjs +6 -7
- package/dist/models.d.mts +14 -0
- package/dist/models.d.ts +14 -0
- package/dist/models.js +146 -0
- package/dist/models.mjs +119 -0
- package/dist/provider.d.mts +8 -7
- package/dist/provider.d.ts +8 -7
- package/dist/provider.js +6 -7
- package/dist/provider.mjs +6 -7
- package/dist/services.d.mts +1 -1
- package/dist/services.d.ts +1 -1
- package/dist/services.js +3 -3
- package/dist/services.mjs +3 -3
- package/dist/types.d.mts +1 -0
- package/dist/types.d.ts +1 -0
- package/package.json +90 -85
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
|
|
|
@@ -30,7 +32,7 @@ declare const useResetPasswordSSO: () => _tanstack_react_query.UseMutationResult
|
|
|
30
32
|
|
|
31
33
|
declare const useUpdatePassword: () => _tanstack_react_query.UseMutationResult<any, Error, updatePasswordBody, unknown>;
|
|
32
34
|
|
|
33
|
-
declare const useLogout: () => _tanstack_react_query.UseMutationResult<any, Error, string
|
|
35
|
+
declare const useLogout: () => _tanstack_react_query.UseMutationResult<any, Error, string, unknown>;
|
|
34
36
|
|
|
35
37
|
declare const useGetAccessByCode: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
36
38
|
code: string;
|
|
@@ -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
|
|
|
@@ -30,7 +32,7 @@ declare const useResetPasswordSSO: () => _tanstack_react_query.UseMutationResult
|
|
|
30
32
|
|
|
31
33
|
declare const useUpdatePassword: () => _tanstack_react_query.UseMutationResult<any, Error, updatePasswordBody, unknown>;
|
|
32
34
|
|
|
33
|
-
declare const useLogout: () => _tanstack_react_query.UseMutationResult<any, Error, string
|
|
35
|
+
declare const useLogout: () => _tanstack_react_query.UseMutationResult<any, Error, string, unknown>;
|
|
34
36
|
|
|
35
37
|
declare const useGetAccessByCode: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
36
38
|
code: string;
|
|
@@ -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
|
@@ -3303,7 +3303,8 @@ function useAuthService() {
|
|
|
3303
3303
|
[env]
|
|
3304
3304
|
);
|
|
3305
3305
|
const logout = (0, import_react7.useCallback)(
|
|
3306
|
-
async (
|
|
3306
|
+
async (data) => {
|
|
3307
|
+
console.log(data);
|
|
3307
3308
|
return env?.requests?.post(
|
|
3308
3309
|
"/logout" /* LOGOUT */,
|
|
3309
3310
|
{},
|
|
@@ -3313,8 +3314,7 @@ function useAuthService() {
|
|
|
3313
3314
|
},
|
|
3314
3315
|
withCredentials: true,
|
|
3315
3316
|
useRefreshToken: true
|
|
3316
|
-
}
|
|
3317
|
-
service
|
|
3317
|
+
}
|
|
3318
3318
|
);
|
|
3319
3319
|
},
|
|
3320
3320
|
[env]
|
|
@@ -4707,8 +4707,8 @@ var import_react_query12 = require("@tanstack/react-query");
|
|
|
4707
4707
|
var useLogout = () => {
|
|
4708
4708
|
const { logout } = useAuthService();
|
|
4709
4709
|
return (0, import_react_query12.useMutation)({
|
|
4710
|
-
mutationFn: (
|
|
4711
|
-
return logout(
|
|
4710
|
+
mutationFn: (data) => {
|
|
4711
|
+
return logout(data);
|
|
4712
4712
|
}
|
|
4713
4713
|
});
|
|
4714
4714
|
};
|
|
@@ -5288,14 +5288,13 @@ var BaseModel = class {
|
|
|
5288
5288
|
return specification;
|
|
5289
5289
|
}
|
|
5290
5290
|
};
|
|
5291
|
-
var base_model_default = BaseModel;
|
|
5292
5291
|
|
|
5293
5292
|
// src/hooks/model/use-model.ts
|
|
5294
5293
|
var useModel = () => {
|
|
5295
5294
|
const initModel = (modelData) => {
|
|
5296
5295
|
switch (modelData?.name) {
|
|
5297
5296
|
default:
|
|
5298
|
-
return new
|
|
5297
|
+
return new BaseModel(modelData);
|
|
5299
5298
|
}
|
|
5300
5299
|
};
|
|
5301
5300
|
return {
|
package/dist/hooks.mjs
CHANGED
|
@@ -3199,7 +3199,8 @@ function useAuthService() {
|
|
|
3199
3199
|
[env]
|
|
3200
3200
|
);
|
|
3201
3201
|
const logout = useCallback3(
|
|
3202
|
-
async (
|
|
3202
|
+
async (data) => {
|
|
3203
|
+
console.log(data);
|
|
3203
3204
|
return env?.requests?.post(
|
|
3204
3205
|
"/logout" /* LOGOUT */,
|
|
3205
3206
|
{},
|
|
@@ -3209,8 +3210,7 @@ function useAuthService() {
|
|
|
3209
3210
|
},
|
|
3210
3211
|
withCredentials: true,
|
|
3211
3212
|
useRefreshToken: true
|
|
3212
|
-
}
|
|
3213
|
-
service
|
|
3213
|
+
}
|
|
3214
3214
|
);
|
|
3215
3215
|
},
|
|
3216
3216
|
[env]
|
|
@@ -4603,8 +4603,8 @@ import { useMutation as useMutation10 } from "@tanstack/react-query";
|
|
|
4603
4603
|
var useLogout = () => {
|
|
4604
4604
|
const { logout } = useAuthService();
|
|
4605
4605
|
return useMutation10({
|
|
4606
|
-
mutationFn: (
|
|
4607
|
-
return logout(
|
|
4606
|
+
mutationFn: (data) => {
|
|
4607
|
+
return logout(data);
|
|
4608
4608
|
}
|
|
4609
4609
|
});
|
|
4610
4610
|
};
|
|
@@ -5184,14 +5184,13 @@ var BaseModel = class {
|
|
|
5184
5184
|
return specification;
|
|
5185
5185
|
}
|
|
5186
5186
|
};
|
|
5187
|
-
var base_model_default = BaseModel;
|
|
5188
5187
|
|
|
5189
5188
|
// src/hooks/model/use-model.ts
|
|
5190
5189
|
var useModel = () => {
|
|
5191
5190
|
const initModel = (modelData) => {
|
|
5192
5191
|
switch (modelData?.name) {
|
|
5193
5192
|
default:
|
|
5194
|
-
return new
|
|
5193
|
+
return new BaseModel(modelData);
|
|
5195
5194
|
}
|
|
5196
5195
|
};
|
|
5197
5196
|
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 };
|
package/dist/models.d.ts
ADDED
|
@@ -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
|
+
});
|
package/dist/models.mjs
ADDED
|
@@ -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
|
+
};
|
package/dist/provider.d.mts
CHANGED
|
@@ -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
|
-
}) =>
|
|
11
|
+
}) => JSX.Element;
|
|
11
12
|
|
|
12
13
|
declare const ReactQueryProvider: ({ children }: {
|
|
13
14
|
children: ReactNode;
|
|
14
|
-
}) =>
|
|
15
|
+
}) => JSX.Element;
|
|
15
16
|
|
|
16
17
|
declare const VersionGate: ({ children }: {
|
|
17
18
|
children: ReactNode;
|
|
18
|
-
}) =>
|
|
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
|
-
}):
|
|
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
|
-
}) =>
|
|
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) =>
|
|
144
|
+
declare const MetaProvider: ({ children }: MetaProviderProps) => JSX.Element;
|
|
144
145
|
|
|
145
146
|
export { EnvProvider, MainProvider, MetaProvider, ReactQueryProvider, ServiceProvider, VersionGate, useEnv, useService };
|
package/dist/provider.d.ts
CHANGED
|
@@ -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
|
-
}) =>
|
|
11
|
+
}) => JSX.Element;
|
|
11
12
|
|
|
12
13
|
declare const ReactQueryProvider: ({ children }: {
|
|
13
14
|
children: ReactNode;
|
|
14
|
-
}) =>
|
|
15
|
+
}) => JSX.Element;
|
|
15
16
|
|
|
16
17
|
declare const VersionGate: ({ children }: {
|
|
17
18
|
children: ReactNode;
|
|
18
|
-
}) =>
|
|
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
|
-
}):
|
|
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
|
-
}) =>
|
|
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) =>
|
|
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
|
@@ -3251,7 +3251,8 @@ function useAuthService() {
|
|
|
3251
3251
|
[env]
|
|
3252
3252
|
);
|
|
3253
3253
|
const logout = (0, import_react3.useCallback)(
|
|
3254
|
-
async (
|
|
3254
|
+
async (data) => {
|
|
3255
|
+
console.log(data);
|
|
3255
3256
|
return env?.requests?.post(
|
|
3256
3257
|
"/logout" /* LOGOUT */,
|
|
3257
3258
|
{},
|
|
@@ -3261,8 +3262,7 @@ function useAuthService() {
|
|
|
3261
3262
|
},
|
|
3262
3263
|
withCredentials: true,
|
|
3263
3264
|
useRefreshToken: true
|
|
3264
|
-
}
|
|
3265
|
-
service
|
|
3265
|
+
}
|
|
3266
3266
|
);
|
|
3267
3267
|
},
|
|
3268
3268
|
[env]
|
|
@@ -5073,8 +5073,8 @@ var import_react_query12 = require("@tanstack/react-query");
|
|
|
5073
5073
|
var useLogout = () => {
|
|
5074
5074
|
const { logout } = useAuthService();
|
|
5075
5075
|
return (0, import_react_query12.useMutation)({
|
|
5076
|
-
mutationFn: (
|
|
5077
|
-
return logout(
|
|
5076
|
+
mutationFn: (data) => {
|
|
5077
|
+
return logout(data);
|
|
5078
5078
|
}
|
|
5079
5079
|
});
|
|
5080
5080
|
};
|
|
@@ -5654,14 +5654,13 @@ var BaseModel = class {
|
|
|
5654
5654
|
return specification;
|
|
5655
5655
|
}
|
|
5656
5656
|
};
|
|
5657
|
-
var base_model_default = BaseModel;
|
|
5658
5657
|
|
|
5659
5658
|
// src/hooks/model/use-model.ts
|
|
5660
5659
|
var useModel = () => {
|
|
5661
5660
|
const initModel = (modelData) => {
|
|
5662
5661
|
switch (modelData?.name) {
|
|
5663
5662
|
default:
|
|
5664
|
-
return new
|
|
5663
|
+
return new BaseModel(modelData);
|
|
5665
5664
|
}
|
|
5666
5665
|
};
|
|
5667
5666
|
return {
|
package/dist/provider.mjs
CHANGED
|
@@ -3208,7 +3208,8 @@ function useAuthService() {
|
|
|
3208
3208
|
[env]
|
|
3209
3209
|
);
|
|
3210
3210
|
const logout = useCallback2(
|
|
3211
|
-
async (
|
|
3211
|
+
async (data) => {
|
|
3212
|
+
console.log(data);
|
|
3212
3213
|
return env?.requests?.post(
|
|
3213
3214
|
"/logout" /* LOGOUT */,
|
|
3214
3215
|
{},
|
|
@@ -3218,8 +3219,7 @@ function useAuthService() {
|
|
|
3218
3219
|
},
|
|
3219
3220
|
withCredentials: true,
|
|
3220
3221
|
useRefreshToken: true
|
|
3221
|
-
}
|
|
3222
|
-
service
|
|
3222
|
+
}
|
|
3223
3223
|
);
|
|
3224
3224
|
},
|
|
3225
3225
|
[env]
|
|
@@ -5030,8 +5030,8 @@ import { useMutation as useMutation10 } from "@tanstack/react-query";
|
|
|
5030
5030
|
var useLogout = () => {
|
|
5031
5031
|
const { logout } = useAuthService();
|
|
5032
5032
|
return useMutation10({
|
|
5033
|
-
mutationFn: (
|
|
5034
|
-
return logout(
|
|
5033
|
+
mutationFn: (data) => {
|
|
5034
|
+
return logout(data);
|
|
5035
5035
|
}
|
|
5036
5036
|
});
|
|
5037
5037
|
};
|
|
@@ -5611,14 +5611,13 @@ var BaseModel = class {
|
|
|
5611
5611
|
return specification;
|
|
5612
5612
|
}
|
|
5613
5613
|
};
|
|
5614
|
-
var base_model_default = BaseModel;
|
|
5615
5614
|
|
|
5616
5615
|
// src/hooks/model/use-model.ts
|
|
5617
5616
|
var useModel = () => {
|
|
5618
5617
|
const initModel = (modelData) => {
|
|
5619
5618
|
switch (modelData?.name) {
|
|
5620
5619
|
default:
|
|
5621
|
-
return new
|
|
5620
|
+
return new BaseModel(modelData);
|
|
5622
5621
|
}
|
|
5623
5622
|
};
|
|
5624
5623
|
return {
|
package/dist/services.d.mts
CHANGED
|
@@ -69,7 +69,7 @@ declare function useAuthService(): {
|
|
|
69
69
|
}) => Promise<any>;
|
|
70
70
|
getProviders: (db?: string) => Promise<any>;
|
|
71
71
|
getAccessByCode: (code: string) => Promise<any>;
|
|
72
|
-
logout: (
|
|
72
|
+
logout: (data: string) => Promise<any>;
|
|
73
73
|
};
|
|
74
74
|
|
|
75
75
|
declare function useCompanyService(): {
|
package/dist/services.d.ts
CHANGED
|
@@ -69,7 +69,7 @@ declare function useAuthService(): {
|
|
|
69
69
|
}) => Promise<any>;
|
|
70
70
|
getProviders: (db?: string) => Promise<any>;
|
|
71
71
|
getAccessByCode: (code: string) => Promise<any>;
|
|
72
|
-
logout: (
|
|
72
|
+
logout: (data: string) => Promise<any>;
|
|
73
73
|
};
|
|
74
74
|
|
|
75
75
|
declare function useCompanyService(): {
|
package/dist/services.js
CHANGED
|
@@ -3421,7 +3421,8 @@ function useAuthService() {
|
|
|
3421
3421
|
[env]
|
|
3422
3422
|
);
|
|
3423
3423
|
const logout = (0, import_react7.useCallback)(
|
|
3424
|
-
async (
|
|
3424
|
+
async (data) => {
|
|
3425
|
+
console.log(data);
|
|
3425
3426
|
return env?.requests?.post(
|
|
3426
3427
|
"/logout" /* LOGOUT */,
|
|
3427
3428
|
{},
|
|
@@ -3431,8 +3432,7 @@ function useAuthService() {
|
|
|
3431
3432
|
},
|
|
3432
3433
|
withCredentials: true,
|
|
3433
3434
|
useRefreshToken: true
|
|
3434
|
-
}
|
|
3435
|
-
service
|
|
3435
|
+
}
|
|
3436
3436
|
);
|
|
3437
3437
|
},
|
|
3438
3438
|
[env]
|
package/dist/services.mjs
CHANGED
|
@@ -3377,7 +3377,8 @@ function useAuthService() {
|
|
|
3377
3377
|
[env]
|
|
3378
3378
|
);
|
|
3379
3379
|
const logout = useCallback3(
|
|
3380
|
-
async (
|
|
3380
|
+
async (data) => {
|
|
3381
|
+
console.log(data);
|
|
3381
3382
|
return env?.requests?.post(
|
|
3382
3383
|
"/logout" /* LOGOUT */,
|
|
3383
3384
|
{},
|
|
@@ -3387,8 +3388,7 @@ function useAuthService() {
|
|
|
3387
3388
|
},
|
|
3388
3389
|
withCredentials: true,
|
|
3389
3390
|
useRefreshToken: true
|
|
3390
|
-
}
|
|
3391
|
-
service
|
|
3391
|
+
}
|
|
3392
3392
|
);
|
|
3393
3393
|
},
|
|
3394
3394
|
[env]
|
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.
|
|
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
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@fctc/interface-logic",
|
|
3
|
+
"version": "2.4.6",
|
|
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
|
+
}
|