@fctc/widget-logic 3.4.4 → 3.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/hooks.d.mts +1 -2
- package/dist/hooks.d.ts +1 -2
- package/dist/hooks.js +5 -11
- package/dist/hooks.mjs +5 -11
- package/dist/index.js +5 -11
- package/dist/index.mjs +5 -11
- package/package.json +2 -2
package/dist/hooks.d.mts
CHANGED
|
@@ -40,10 +40,9 @@ interface ActionResult {
|
|
|
40
40
|
url?: string;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
declare const useMenu: ({ context, specification, domain,
|
|
43
|
+
declare const useMenu: ({ context, specification, domain, }: {
|
|
44
44
|
context?: any;
|
|
45
45
|
specification?: any;
|
|
46
|
-
defaultService?: any;
|
|
47
46
|
domain?: any;
|
|
48
47
|
}) => UseMenuReturn;
|
|
49
48
|
type useMenuType = ReturnType<typeof useMenu>;
|
package/dist/hooks.d.ts
CHANGED
|
@@ -40,10 +40,9 @@ interface ActionResult {
|
|
|
40
40
|
url?: string;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
declare const useMenu: ({ context, specification, domain,
|
|
43
|
+
declare const useMenu: ({ context, specification, domain, }: {
|
|
44
44
|
context?: any;
|
|
45
45
|
specification?: any;
|
|
46
|
-
defaultService?: any;
|
|
47
46
|
domain?: any;
|
|
48
47
|
}) => UseMenuReturn;
|
|
49
48
|
type useMenuType = ReturnType<typeof useMenu>;
|
package/dist/hooks.js
CHANGED
|
@@ -358,21 +358,18 @@ __reExport(utils_exports, require("@fctc/interface-logic/utils"));
|
|
|
358
358
|
var useMenu = ({
|
|
359
359
|
context,
|
|
360
360
|
specification,
|
|
361
|
-
domain
|
|
362
|
-
defaultService
|
|
361
|
+
domain
|
|
363
362
|
}) => {
|
|
364
363
|
const { env } = (0, provider_exports.useEnv)();
|
|
365
364
|
const { useGetMenu: useGetMenu2 } = (0, provider_exports.useService)();
|
|
366
365
|
const [action, callAction] = useCallAction();
|
|
367
366
|
const [service, setService] = (0, import_react3.useState)("");
|
|
368
367
|
const [xNode, setXNode] = (0, import_react3.useState)("");
|
|
369
|
-
console.log("service", service);
|
|
370
368
|
const menuData = useGetMenu2(
|
|
371
369
|
context,
|
|
372
370
|
specification,
|
|
373
371
|
!!context && !(0, utils_exports.isObjectEmpty)(context),
|
|
374
|
-
domain
|
|
375
|
-
defaultService
|
|
372
|
+
domain
|
|
376
373
|
);
|
|
377
374
|
const [menuId, setMenuId] = (0, import_react3.useState)(void 0);
|
|
378
375
|
const configedIconData = (0, import_react3.useMemo)(() => {
|
|
@@ -461,7 +458,7 @@ var import_react_i18next = require("react-i18next");
|
|
|
461
458
|
var useProfile = ({ service }) => {
|
|
462
459
|
const { setUid, setLang, setUserInfo, env } = (0, provider_exports.useEnv)();
|
|
463
460
|
const { useGetProfile: useGetProfile2 } = (0, provider_exports.useService)();
|
|
464
|
-
const getProfile = useGetProfile2("", service);
|
|
461
|
+
const getProfile = useGetProfile2("service", service);
|
|
465
462
|
const { i18n } = (0, import_react_i18next.useTranslation)();
|
|
466
463
|
const userInfoQuery = (0, import_react_query2.useQuery)({
|
|
467
464
|
queryKey: ["userInfo"],
|
|
@@ -571,9 +568,7 @@ var useCompany = ({ service }) => {
|
|
|
571
568
|
setCompanies(companyIDs);
|
|
572
569
|
}
|
|
573
570
|
}, [current_company_id]);
|
|
574
|
-
const getCompanyInfo = useGetCompanyInfo2(
|
|
575
|
-
service
|
|
576
|
-
});
|
|
571
|
+
const getCompanyInfo = useGetCompanyInfo2();
|
|
577
572
|
const companyInfo = (0, import_react_query3.useQuery)({
|
|
578
573
|
queryKey: ["companyInfoQuery", current_company_id],
|
|
579
574
|
queryFn: () => getCompanyInfo.mutateAsync(Number(current_company_id)),
|
|
@@ -628,8 +623,7 @@ var AppProvider = ({
|
|
|
628
623
|
...menuContext
|
|
629
624
|
},
|
|
630
625
|
specification: menuParams?.specification,
|
|
631
|
-
domain: menuParams?.domain
|
|
632
|
-
defaultService: env.default_service
|
|
626
|
+
domain: menuParams?.domain
|
|
633
627
|
});
|
|
634
628
|
const action = (0, import_react8.useMemo)(() => {
|
|
635
629
|
return menu?.state?.action;
|
package/dist/hooks.mjs
CHANGED
|
@@ -339,21 +339,18 @@ import * as utils_star from "@fctc/interface-logic/utils";
|
|
|
339
339
|
var useMenu = ({
|
|
340
340
|
context,
|
|
341
341
|
specification,
|
|
342
|
-
domain
|
|
343
|
-
defaultService
|
|
342
|
+
domain
|
|
344
343
|
}) => {
|
|
345
344
|
const { env } = (0, provider_exports.useEnv)();
|
|
346
345
|
const { useGetMenu: useGetMenu2 } = (0, provider_exports.useService)();
|
|
347
346
|
const [action, callAction] = useCallAction();
|
|
348
347
|
const [service, setService] = useState2("");
|
|
349
348
|
const [xNode, setXNode] = useState2("");
|
|
350
|
-
console.log("service", service);
|
|
351
349
|
const menuData = useGetMenu2(
|
|
352
350
|
context,
|
|
353
351
|
specification,
|
|
354
352
|
!!context && !(0, utils_exports.isObjectEmpty)(context),
|
|
355
|
-
domain
|
|
356
|
-
defaultService
|
|
353
|
+
domain
|
|
357
354
|
);
|
|
358
355
|
const [menuId, setMenuId] = useState2(void 0);
|
|
359
356
|
const configedIconData = useMemo(() => {
|
|
@@ -442,7 +439,7 @@ import { useTranslation } from "react-i18next";
|
|
|
442
439
|
var useProfile = ({ service }) => {
|
|
443
440
|
const { setUid, setLang, setUserInfo, env } = (0, provider_exports.useEnv)();
|
|
444
441
|
const { useGetProfile: useGetProfile2 } = (0, provider_exports.useService)();
|
|
445
|
-
const getProfile = useGetProfile2("", service);
|
|
442
|
+
const getProfile = useGetProfile2("service", service);
|
|
446
443
|
const { i18n } = useTranslation();
|
|
447
444
|
const userInfoQuery = useQuery2({
|
|
448
445
|
queryKey: ["userInfo"],
|
|
@@ -552,9 +549,7 @@ var useCompany = ({ service }) => {
|
|
|
552
549
|
setCompanies(companyIDs);
|
|
553
550
|
}
|
|
554
551
|
}, [current_company_id]);
|
|
555
|
-
const getCompanyInfo = useGetCompanyInfo2(
|
|
556
|
-
service
|
|
557
|
-
});
|
|
552
|
+
const getCompanyInfo = useGetCompanyInfo2();
|
|
558
553
|
const companyInfo = useQuery3({
|
|
559
554
|
queryKey: ["companyInfoQuery", current_company_id],
|
|
560
555
|
queryFn: () => getCompanyInfo.mutateAsync(Number(current_company_id)),
|
|
@@ -609,8 +604,7 @@ var AppProvider = ({
|
|
|
609
604
|
...menuContext
|
|
610
605
|
},
|
|
611
606
|
specification: menuParams?.specification,
|
|
612
|
-
domain: menuParams?.domain
|
|
613
|
-
defaultService: env.default_service
|
|
607
|
+
domain: menuParams?.domain
|
|
614
608
|
});
|
|
615
609
|
const action = useMemo5(() => {
|
|
616
610
|
return menu?.state?.action;
|
package/dist/index.js
CHANGED
|
@@ -4408,21 +4408,18 @@ __reExport(utils_exports, require("@fctc/interface-logic/utils"));
|
|
|
4408
4408
|
var useMenu = ({
|
|
4409
4409
|
context,
|
|
4410
4410
|
specification,
|
|
4411
|
-
domain
|
|
4412
|
-
defaultService
|
|
4411
|
+
domain
|
|
4413
4412
|
}) => {
|
|
4414
4413
|
const { env } = (0, provider_exports.useEnv)();
|
|
4415
4414
|
const { useGetMenu: useGetMenu2 } = (0, provider_exports.useService)();
|
|
4416
4415
|
const [action, callAction] = useCallAction();
|
|
4417
4416
|
const [service, setService] = (0, import_react3.useState)("");
|
|
4418
4417
|
const [xNode, setXNode] = (0, import_react3.useState)("");
|
|
4419
|
-
console.log("service", service);
|
|
4420
4418
|
const menuData = useGetMenu2(
|
|
4421
4419
|
context,
|
|
4422
4420
|
specification,
|
|
4423
4421
|
!!context && !(0, utils_exports.isObjectEmpty)(context),
|
|
4424
|
-
domain
|
|
4425
|
-
defaultService
|
|
4422
|
+
domain
|
|
4426
4423
|
);
|
|
4427
4424
|
const [menuId, setMenuId] = (0, import_react3.useState)(void 0);
|
|
4428
4425
|
const configedIconData = (0, import_react3.useMemo)(() => {
|
|
@@ -4511,7 +4508,7 @@ var import_react_i18next = require("react-i18next");
|
|
|
4511
4508
|
var useProfile = ({ service }) => {
|
|
4512
4509
|
const { setUid, setLang, setUserInfo, env } = (0, provider_exports.useEnv)();
|
|
4513
4510
|
const { useGetProfile: useGetProfile2 } = (0, provider_exports.useService)();
|
|
4514
|
-
const getProfile = useGetProfile2("", service);
|
|
4511
|
+
const getProfile = useGetProfile2("service", service);
|
|
4515
4512
|
const { i18n: i18n2 } = (0, import_react_i18next.useTranslation)();
|
|
4516
4513
|
const userInfoQuery = (0, import_react_query2.useQuery)({
|
|
4517
4514
|
queryKey: ["userInfo"],
|
|
@@ -4621,9 +4618,7 @@ var useCompany = ({ service }) => {
|
|
|
4621
4618
|
setCompanies(companyIDs);
|
|
4622
4619
|
}
|
|
4623
4620
|
}, [current_company_id]);
|
|
4624
|
-
const getCompanyInfo = useGetCompanyInfo2(
|
|
4625
|
-
service
|
|
4626
|
-
});
|
|
4621
|
+
const getCompanyInfo = useGetCompanyInfo2();
|
|
4627
4622
|
const companyInfo = (0, import_react_query3.useQuery)({
|
|
4628
4623
|
queryKey: ["companyInfoQuery", current_company_id],
|
|
4629
4624
|
queryFn: () => getCompanyInfo.mutateAsync(Number(current_company_id)),
|
|
@@ -4678,8 +4673,7 @@ var AppProvider = ({
|
|
|
4678
4673
|
...menuContext
|
|
4679
4674
|
},
|
|
4680
4675
|
specification: menuParams?.specification,
|
|
4681
|
-
domain: menuParams?.domain
|
|
4682
|
-
defaultService: env.default_service
|
|
4676
|
+
domain: menuParams?.domain
|
|
4683
4677
|
});
|
|
4684
4678
|
const action = (0, import_react8.useMemo)(() => {
|
|
4685
4679
|
return menu?.state?.action;
|
package/dist/index.mjs
CHANGED
|
@@ -4483,21 +4483,18 @@ import * as utils_star from "@fctc/interface-logic/utils";
|
|
|
4483
4483
|
var useMenu = ({
|
|
4484
4484
|
context,
|
|
4485
4485
|
specification,
|
|
4486
|
-
domain
|
|
4487
|
-
defaultService
|
|
4486
|
+
domain
|
|
4488
4487
|
}) => {
|
|
4489
4488
|
const { env } = (0, provider_exports.useEnv)();
|
|
4490
4489
|
const { useGetMenu: useGetMenu2 } = (0, provider_exports.useService)();
|
|
4491
4490
|
const [action, callAction] = useCallAction();
|
|
4492
4491
|
const [service, setService] = useState2("");
|
|
4493
4492
|
const [xNode, setXNode] = useState2("");
|
|
4494
|
-
console.log("service", service);
|
|
4495
4493
|
const menuData = useGetMenu2(
|
|
4496
4494
|
context,
|
|
4497
4495
|
specification,
|
|
4498
4496
|
!!context && !(0, utils_exports.isObjectEmpty)(context),
|
|
4499
|
-
domain
|
|
4500
|
-
defaultService
|
|
4497
|
+
domain
|
|
4501
4498
|
);
|
|
4502
4499
|
const [menuId, setMenuId] = useState2(void 0);
|
|
4503
4500
|
const configedIconData = useMemo(() => {
|
|
@@ -4586,7 +4583,7 @@ import { useTranslation } from "react-i18next";
|
|
|
4586
4583
|
var useProfile = ({ service }) => {
|
|
4587
4584
|
const { setUid, setLang, setUserInfo, env } = (0, provider_exports.useEnv)();
|
|
4588
4585
|
const { useGetProfile: useGetProfile2 } = (0, provider_exports.useService)();
|
|
4589
|
-
const getProfile = useGetProfile2("", service);
|
|
4586
|
+
const getProfile = useGetProfile2("service", service);
|
|
4590
4587
|
const { i18n: i18n2 } = useTranslation();
|
|
4591
4588
|
const userInfoQuery = useQuery2({
|
|
4592
4589
|
queryKey: ["userInfo"],
|
|
@@ -4696,9 +4693,7 @@ var useCompany = ({ service }) => {
|
|
|
4696
4693
|
setCompanies(companyIDs);
|
|
4697
4694
|
}
|
|
4698
4695
|
}, [current_company_id]);
|
|
4699
|
-
const getCompanyInfo = useGetCompanyInfo2(
|
|
4700
|
-
service
|
|
4701
|
-
});
|
|
4696
|
+
const getCompanyInfo = useGetCompanyInfo2();
|
|
4702
4697
|
const companyInfo = useQuery3({
|
|
4703
4698
|
queryKey: ["companyInfoQuery", current_company_id],
|
|
4704
4699
|
queryFn: () => getCompanyInfo.mutateAsync(Number(current_company_id)),
|
|
@@ -4753,8 +4748,7 @@ var AppProvider = ({
|
|
|
4753
4748
|
...menuContext
|
|
4754
4749
|
},
|
|
4755
4750
|
specification: menuParams?.specification,
|
|
4756
|
-
domain: menuParams?.domain
|
|
4757
|
-
defaultService: env.default_service
|
|
4751
|
+
domain: menuParams?.domain
|
|
4758
4752
|
});
|
|
4759
4753
|
const action = useMemo5(() => {
|
|
4760
4754
|
return menu?.state?.action;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fctc/widget-logic",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.6",
|
|
4
4
|
"types": "dist/index.d.ts",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"test": "jest"
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
|
-
"@fctc/interface-logic": "^3.0.
|
|
77
|
+
"@fctc/interface-logic": "^3.0.7",
|
|
78
78
|
"@headlessui/react": "^2.2.6",
|
|
79
79
|
"@tanstack/react-query": "^5.84.0",
|
|
80
80
|
"i18next": "^25.3.2",
|