@fctc/interface-logic 2.1.2 → 2.1.4
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/configs.js +13 -4
- package/dist/configs.mjs +13 -4
- package/dist/environment.d.mts +1 -0
- package/dist/environment.d.ts +1 -0
- package/dist/environment.js +13 -4
- package/dist/environment.mjs +13 -4
- package/dist/hooks.d.mts +3 -2
- package/dist/hooks.d.ts +3 -2
- package/dist/hooks.js +29 -110
- package/dist/hooks.mjs +29 -110
- package/dist/provider.d.mts +7 -6
- package/dist/provider.d.ts +7 -6
- package/dist/provider.js +42 -114
- package/dist/provider.mjs +42 -114
- package/dist/services.d.mts +6 -4
- package/dist/services.d.ts +6 -4
- package/dist/services.js +20 -100
- package/dist/services.mjs +20 -100
- package/dist/types.d.mts +1 -0
- package/dist/types.d.ts +1 -0
- package/package.json +85 -85
package/dist/services.js
CHANGED
|
@@ -3702,8 +3702,8 @@ function useFormService() {
|
|
|
3702
3702
|
[env]
|
|
3703
3703
|
);
|
|
3704
3704
|
const uploadImage = (0, import_react10.useCallback)(
|
|
3705
|
-
async ({
|
|
3706
|
-
return env.requests.post("/mail/attachment/upload" /* UPLOAD_IMAGE */,
|
|
3705
|
+
async ({ formData }) => {
|
|
3706
|
+
return env.requests.post("/mail/attachment/upload" /* UPLOAD_IMAGE */, formData);
|
|
3707
3707
|
},
|
|
3708
3708
|
[env]
|
|
3709
3709
|
);
|
|
@@ -4268,101 +4268,14 @@ function useViewService() {
|
|
|
4268
4268
|
[env]
|
|
4269
4269
|
);
|
|
4270
4270
|
const getMenu = (0, import_react14.useCallback)(
|
|
4271
|
-
async (context) => {
|
|
4271
|
+
async (context, specification) => {
|
|
4272
4272
|
const jsonData = {
|
|
4273
4273
|
model: "ir.ui.menu" /* MENU */,
|
|
4274
4274
|
method: "web_search_read" /* WEB_SEARCH_READ */,
|
|
4275
4275
|
ids: [],
|
|
4276
4276
|
with_context: context,
|
|
4277
4277
|
kwargs: {
|
|
4278
|
-
specification
|
|
4279
|
-
active: {},
|
|
4280
|
-
name: {},
|
|
4281
|
-
is_display: {},
|
|
4282
|
-
sequence: {},
|
|
4283
|
-
complete_name: {},
|
|
4284
|
-
action: {
|
|
4285
|
-
fields: {
|
|
4286
|
-
display_name: {},
|
|
4287
|
-
type: {},
|
|
4288
|
-
binding_view_types: {}
|
|
4289
|
-
}
|
|
4290
|
-
},
|
|
4291
|
-
url_icon: {},
|
|
4292
|
-
web_icon: {},
|
|
4293
|
-
web_icon_data: {},
|
|
4294
|
-
groups_id: {
|
|
4295
|
-
fields: {
|
|
4296
|
-
full_name: {}
|
|
4297
|
-
},
|
|
4298
|
-
limit: 40,
|
|
4299
|
-
order: ""
|
|
4300
|
-
},
|
|
4301
|
-
display_name: {},
|
|
4302
|
-
child_id: {
|
|
4303
|
-
fields: {
|
|
4304
|
-
active: {},
|
|
4305
|
-
name: {},
|
|
4306
|
-
is_display: {},
|
|
4307
|
-
sequence: {},
|
|
4308
|
-
complete_name: {},
|
|
4309
|
-
action: {
|
|
4310
|
-
fields: {
|
|
4311
|
-
display_name: {},
|
|
4312
|
-
type: {},
|
|
4313
|
-
binding_view_types: {}
|
|
4314
|
-
}
|
|
4315
|
-
},
|
|
4316
|
-
url_icon: {},
|
|
4317
|
-
web_icon: {},
|
|
4318
|
-
web_icon_data: {},
|
|
4319
|
-
groups_id: {
|
|
4320
|
-
fields: {
|
|
4321
|
-
full_name: {}
|
|
4322
|
-
},
|
|
4323
|
-
limit: 40,
|
|
4324
|
-
order: ""
|
|
4325
|
-
},
|
|
4326
|
-
display_name: {},
|
|
4327
|
-
child_id: {
|
|
4328
|
-
fields: {
|
|
4329
|
-
active: {},
|
|
4330
|
-
name: {},
|
|
4331
|
-
is_display: {},
|
|
4332
|
-
sequence: {},
|
|
4333
|
-
complete_name: {},
|
|
4334
|
-
action: {
|
|
4335
|
-
fields: {
|
|
4336
|
-
display_name: {},
|
|
4337
|
-
type: {},
|
|
4338
|
-
binding_view_types: {}
|
|
4339
|
-
}
|
|
4340
|
-
},
|
|
4341
|
-
url_icon: {},
|
|
4342
|
-
web_icon: {},
|
|
4343
|
-
web_icon_data: {},
|
|
4344
|
-
groups_id: {
|
|
4345
|
-
fields: {
|
|
4346
|
-
full_name: {}
|
|
4347
|
-
},
|
|
4348
|
-
limit: 40,
|
|
4349
|
-
order: ""
|
|
4350
|
-
},
|
|
4351
|
-
display_name: {},
|
|
4352
|
-
child_id: {
|
|
4353
|
-
fields: {},
|
|
4354
|
-
limit: 40,
|
|
4355
|
-
order: ""
|
|
4356
|
-
}
|
|
4357
|
-
},
|
|
4358
|
-
limit: 40,
|
|
4359
|
-
order: ""
|
|
4360
|
-
}
|
|
4361
|
-
},
|
|
4362
|
-
limit: 40,
|
|
4363
|
-
order: ""
|
|
4364
|
-
}
|
|
4365
|
-
},
|
|
4278
|
+
specification,
|
|
4366
4279
|
domain: [
|
|
4367
4280
|
"&",
|
|
4368
4281
|
["is_display", "=", true],
|
|
@@ -4557,18 +4470,25 @@ function useViewService() {
|
|
|
4557
4470
|
redirect_uri,
|
|
4558
4471
|
state,
|
|
4559
4472
|
client_id,
|
|
4560
|
-
response_type
|
|
4473
|
+
response_type,
|
|
4474
|
+
path,
|
|
4475
|
+
scope
|
|
4561
4476
|
}) => {
|
|
4562
|
-
const
|
|
4563
|
-
|
|
4564
|
-
state,
|
|
4477
|
+
const params = new URLSearchParams({
|
|
4478
|
+
response_type,
|
|
4565
4479
|
client_id,
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4480
|
+
redirect_uri,
|
|
4481
|
+
state
|
|
4482
|
+
});
|
|
4483
|
+
const queryString = `${params.toString()}&scope=${encodeURIComponent(
|
|
4484
|
+
scope
|
|
4485
|
+
)}`;
|
|
4486
|
+
const url = `${path}?${queryString}`;
|
|
4487
|
+
return env?.requests.get(url, {
|
|
4569
4488
|
headers: {
|
|
4570
|
-
|
|
4571
|
-
}
|
|
4489
|
+
"Content-Type": "application/json"
|
|
4490
|
+
},
|
|
4491
|
+
withCredentials: true
|
|
4572
4492
|
});
|
|
4573
4493
|
},
|
|
4574
4494
|
[env]
|
package/dist/services.mjs
CHANGED
|
@@ -3658,8 +3658,8 @@ function useFormService() {
|
|
|
3658
3658
|
[env]
|
|
3659
3659
|
);
|
|
3660
3660
|
const uploadImage = useCallback6(
|
|
3661
|
-
async ({
|
|
3662
|
-
return env.requests.post("/mail/attachment/upload" /* UPLOAD_IMAGE */,
|
|
3661
|
+
async ({ formData }) => {
|
|
3662
|
+
return env.requests.post("/mail/attachment/upload" /* UPLOAD_IMAGE */, formData);
|
|
3663
3663
|
},
|
|
3664
3664
|
[env]
|
|
3665
3665
|
);
|
|
@@ -4224,101 +4224,14 @@ function useViewService() {
|
|
|
4224
4224
|
[env]
|
|
4225
4225
|
);
|
|
4226
4226
|
const getMenu = useCallback10(
|
|
4227
|
-
async (context) => {
|
|
4227
|
+
async (context, specification) => {
|
|
4228
4228
|
const jsonData = {
|
|
4229
4229
|
model: "ir.ui.menu" /* MENU */,
|
|
4230
4230
|
method: "web_search_read" /* WEB_SEARCH_READ */,
|
|
4231
4231
|
ids: [],
|
|
4232
4232
|
with_context: context,
|
|
4233
4233
|
kwargs: {
|
|
4234
|
-
specification
|
|
4235
|
-
active: {},
|
|
4236
|
-
name: {},
|
|
4237
|
-
is_display: {},
|
|
4238
|
-
sequence: {},
|
|
4239
|
-
complete_name: {},
|
|
4240
|
-
action: {
|
|
4241
|
-
fields: {
|
|
4242
|
-
display_name: {},
|
|
4243
|
-
type: {},
|
|
4244
|
-
binding_view_types: {}
|
|
4245
|
-
}
|
|
4246
|
-
},
|
|
4247
|
-
url_icon: {},
|
|
4248
|
-
web_icon: {},
|
|
4249
|
-
web_icon_data: {},
|
|
4250
|
-
groups_id: {
|
|
4251
|
-
fields: {
|
|
4252
|
-
full_name: {}
|
|
4253
|
-
},
|
|
4254
|
-
limit: 40,
|
|
4255
|
-
order: ""
|
|
4256
|
-
},
|
|
4257
|
-
display_name: {},
|
|
4258
|
-
child_id: {
|
|
4259
|
-
fields: {
|
|
4260
|
-
active: {},
|
|
4261
|
-
name: {},
|
|
4262
|
-
is_display: {},
|
|
4263
|
-
sequence: {},
|
|
4264
|
-
complete_name: {},
|
|
4265
|
-
action: {
|
|
4266
|
-
fields: {
|
|
4267
|
-
display_name: {},
|
|
4268
|
-
type: {},
|
|
4269
|
-
binding_view_types: {}
|
|
4270
|
-
}
|
|
4271
|
-
},
|
|
4272
|
-
url_icon: {},
|
|
4273
|
-
web_icon: {},
|
|
4274
|
-
web_icon_data: {},
|
|
4275
|
-
groups_id: {
|
|
4276
|
-
fields: {
|
|
4277
|
-
full_name: {}
|
|
4278
|
-
},
|
|
4279
|
-
limit: 40,
|
|
4280
|
-
order: ""
|
|
4281
|
-
},
|
|
4282
|
-
display_name: {},
|
|
4283
|
-
child_id: {
|
|
4284
|
-
fields: {
|
|
4285
|
-
active: {},
|
|
4286
|
-
name: {},
|
|
4287
|
-
is_display: {},
|
|
4288
|
-
sequence: {},
|
|
4289
|
-
complete_name: {},
|
|
4290
|
-
action: {
|
|
4291
|
-
fields: {
|
|
4292
|
-
display_name: {},
|
|
4293
|
-
type: {},
|
|
4294
|
-
binding_view_types: {}
|
|
4295
|
-
}
|
|
4296
|
-
},
|
|
4297
|
-
url_icon: {},
|
|
4298
|
-
web_icon: {},
|
|
4299
|
-
web_icon_data: {},
|
|
4300
|
-
groups_id: {
|
|
4301
|
-
fields: {
|
|
4302
|
-
full_name: {}
|
|
4303
|
-
},
|
|
4304
|
-
limit: 40,
|
|
4305
|
-
order: ""
|
|
4306
|
-
},
|
|
4307
|
-
display_name: {},
|
|
4308
|
-
child_id: {
|
|
4309
|
-
fields: {},
|
|
4310
|
-
limit: 40,
|
|
4311
|
-
order: ""
|
|
4312
|
-
}
|
|
4313
|
-
},
|
|
4314
|
-
limit: 40,
|
|
4315
|
-
order: ""
|
|
4316
|
-
}
|
|
4317
|
-
},
|
|
4318
|
-
limit: 40,
|
|
4319
|
-
order: ""
|
|
4320
|
-
}
|
|
4321
|
-
},
|
|
4234
|
+
specification,
|
|
4322
4235
|
domain: [
|
|
4323
4236
|
"&",
|
|
4324
4237
|
["is_display", "=", true],
|
|
@@ -4513,18 +4426,25 @@ function useViewService() {
|
|
|
4513
4426
|
redirect_uri,
|
|
4514
4427
|
state,
|
|
4515
4428
|
client_id,
|
|
4516
|
-
response_type
|
|
4429
|
+
response_type,
|
|
4430
|
+
path,
|
|
4431
|
+
scope
|
|
4517
4432
|
}) => {
|
|
4518
|
-
const
|
|
4519
|
-
|
|
4520
|
-
state,
|
|
4433
|
+
const params = new URLSearchParams({
|
|
4434
|
+
response_type,
|
|
4521
4435
|
client_id,
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4436
|
+
redirect_uri,
|
|
4437
|
+
state
|
|
4438
|
+
});
|
|
4439
|
+
const queryString = `${params.toString()}&scope=${encodeURIComponent(
|
|
4440
|
+
scope
|
|
4441
|
+
)}`;
|
|
4442
|
+
const url = `${path}?${queryString}`;
|
|
4443
|
+
return env?.requests.get(url, {
|
|
4525
4444
|
headers: {
|
|
4526
|
-
|
|
4527
|
-
}
|
|
4445
|
+
"Content-Type": "application/json"
|
|
4446
|
+
},
|
|
4447
|
+
withCredentials: true
|
|
4528
4448
|
});
|
|
4529
4449
|
},
|
|
4530
4450
|
[env]
|
package/dist/types.d.mts
CHANGED
package/dist/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@fctc/interface-logic",
|
|
3
|
-
"version": "2.1.
|
|
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.1.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
|
+
"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
|
+
}
|