@fctc/widget-logic 2.4.0 → 2.4.2
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 -0
- package/dist/hooks.d.ts +1 -0
- package/dist/hooks.js +3 -2
- package/dist/hooks.mjs +3 -2
- package/dist/index.js +5 -4
- package/dist/index.mjs +5 -4
- package/dist/widget.js +5 -4
- package/dist/widget.mjs +5 -4
- package/package.json +2 -2
package/dist/hooks.d.mts
CHANGED
package/dist/hooks.d.ts
CHANGED
package/dist/hooks.js
CHANGED
|
@@ -586,7 +586,6 @@ var useAuth = () => {
|
|
|
586
586
|
|
|
587
587
|
// src/hooks/core/use-app-provider.tsx
|
|
588
588
|
var import_react10 = require("react");
|
|
589
|
-
var import_utils2 = require("@fctc/interface-logic/utils");
|
|
590
589
|
|
|
591
590
|
// src/hooks/core/use-company.ts
|
|
592
591
|
var import_react_query3 = require("@tanstack/react-query");
|
|
@@ -635,8 +634,10 @@ var useCompany = (accessToken) => {
|
|
|
635
634
|
context: { allowed_company_ids: [current_company_id] }
|
|
636
635
|
};
|
|
637
636
|
};
|
|
637
|
+
var use_company_default = useCompany;
|
|
638
638
|
|
|
639
639
|
// src/hooks/core/use-app-provider.tsx
|
|
640
|
+
var import_utils2 = require("@fctc/interface-logic/utils");
|
|
640
641
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
641
642
|
var AppProviderInitialValue = {
|
|
642
643
|
config: {},
|
|
@@ -653,7 +654,7 @@ var AppProvider = ({ children }) => {
|
|
|
653
654
|
const config = useConfig({});
|
|
654
655
|
const auth = useAuth();
|
|
655
656
|
const user = useUser(auth.accessToken);
|
|
656
|
-
const company =
|
|
657
|
+
const company = use_company_default(auth.accessToken);
|
|
657
658
|
const menuContext = (0, import_react10.useMemo)(() => {
|
|
658
659
|
return combineContexts([user.context, company.context]);
|
|
659
660
|
}, [user.context, company.context]);
|
package/dist/hooks.mjs
CHANGED
|
@@ -575,7 +575,6 @@ var useAuth = () => {
|
|
|
575
575
|
|
|
576
576
|
// src/hooks/core/use-app-provider.tsx
|
|
577
577
|
import { createContext, useContext, useMemo as useMemo7 } from "react";
|
|
578
|
-
import { evalJSONContext } from "@fctc/interface-logic/utils";
|
|
579
578
|
|
|
580
579
|
// src/hooks/core/use-company.ts
|
|
581
580
|
import { useQuery as useQuery3 } from "@tanstack/react-query";
|
|
@@ -627,8 +626,10 @@ var useCompany = (accessToken) => {
|
|
|
627
626
|
context: { allowed_company_ids: [current_company_id] }
|
|
628
627
|
};
|
|
629
628
|
};
|
|
629
|
+
var use_company_default = useCompany;
|
|
630
630
|
|
|
631
631
|
// src/hooks/core/use-app-provider.tsx
|
|
632
|
+
import { evalJSONContext } from "@fctc/interface-logic/utils";
|
|
632
633
|
import { jsx } from "react/jsx-runtime";
|
|
633
634
|
var AppProviderInitialValue = {
|
|
634
635
|
config: {},
|
|
@@ -645,7 +646,7 @@ var AppProvider = ({ children }) => {
|
|
|
645
646
|
const config = useConfig({});
|
|
646
647
|
const auth = useAuth();
|
|
647
648
|
const user = useUser(auth.accessToken);
|
|
648
|
-
const company =
|
|
649
|
+
const company = use_company_default(auth.accessToken);
|
|
649
650
|
const menuContext = useMemo7(() => {
|
|
650
651
|
return combineContexts([user.context, company.context]);
|
|
651
652
|
}, [user.context, company.context]);
|
package/dist/index.js
CHANGED
|
@@ -37,7 +37,7 @@ var require_moment = __commonJS({
|
|
|
37
37
|
"use strict";
|
|
38
38
|
(function(global, factory) {
|
|
39
39
|
typeof exports2 === "object" && typeof module2 !== "undefined" ? module2.exports = factory() : typeof define === "function" && define.amd ? define(factory) : global.moment = factory();
|
|
40
|
-
})(exports2,
|
|
40
|
+
})(exports2, function() {
|
|
41
41
|
"use strict";
|
|
42
42
|
var hookCallback;
|
|
43
43
|
function hooks() {
|
|
@@ -4028,7 +4028,7 @@ var require_moment = __commonJS({
|
|
|
4028
4028
|
// <input type="month" />
|
|
4029
4029
|
};
|
|
4030
4030
|
return hooks;
|
|
4031
|
-
})
|
|
4031
|
+
});
|
|
4032
4032
|
}
|
|
4033
4033
|
});
|
|
4034
4034
|
|
|
@@ -4656,7 +4656,6 @@ var useAuth = () => {
|
|
|
4656
4656
|
|
|
4657
4657
|
// src/hooks/core/use-app-provider.tsx
|
|
4658
4658
|
var import_react10 = require("react");
|
|
4659
|
-
var import_utils2 = require("@fctc/interface-logic/utils");
|
|
4660
4659
|
|
|
4661
4660
|
// src/hooks/core/use-company.ts
|
|
4662
4661
|
var import_react_query3 = require("@tanstack/react-query");
|
|
@@ -4705,8 +4704,10 @@ var useCompany = (accessToken) => {
|
|
|
4705
4704
|
context: { allowed_company_ids: [current_company_id] }
|
|
4706
4705
|
};
|
|
4707
4706
|
};
|
|
4707
|
+
var use_company_default = useCompany;
|
|
4708
4708
|
|
|
4709
4709
|
// src/hooks/core/use-app-provider.tsx
|
|
4710
|
+
var import_utils2 = require("@fctc/interface-logic/utils");
|
|
4710
4711
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
4711
4712
|
var AppProviderInitialValue = {
|
|
4712
4713
|
config: {},
|
|
@@ -4723,7 +4724,7 @@ var AppProvider = ({ children }) => {
|
|
|
4723
4724
|
const config = useConfig({});
|
|
4724
4725
|
const auth = useAuth();
|
|
4725
4726
|
const user = useUser(auth.accessToken);
|
|
4726
|
-
const company =
|
|
4727
|
+
const company = use_company_default(auth.accessToken);
|
|
4727
4728
|
const menuContext = (0, import_react10.useMemo)(() => {
|
|
4728
4729
|
return combineContexts([user.context, company.context]);
|
|
4729
4730
|
}, [user.context, company.context]);
|
package/dist/index.mjs
CHANGED
|
@@ -41,7 +41,7 @@ var require_moment = __commonJS({
|
|
|
41
41
|
"use strict";
|
|
42
42
|
(function(global, factory) {
|
|
43
43
|
typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory() : typeof define === "function" && define.amd ? define(factory) : global.moment = factory();
|
|
44
|
-
})(exports,
|
|
44
|
+
})(exports, function() {
|
|
45
45
|
"use strict";
|
|
46
46
|
var hookCallback;
|
|
47
47
|
function hooks() {
|
|
@@ -4032,7 +4032,7 @@ var require_moment = __commonJS({
|
|
|
4032
4032
|
// <input type="month" />
|
|
4033
4033
|
};
|
|
4034
4034
|
return hooks;
|
|
4035
|
-
})
|
|
4035
|
+
});
|
|
4036
4036
|
}
|
|
4037
4037
|
});
|
|
4038
4038
|
|
|
@@ -4671,7 +4671,6 @@ var useAuth = () => {
|
|
|
4671
4671
|
|
|
4672
4672
|
// src/hooks/core/use-app-provider.tsx
|
|
4673
4673
|
import { createContext, useContext, useMemo as useMemo7 } from "react";
|
|
4674
|
-
import { evalJSONContext } from "@fctc/interface-logic/utils";
|
|
4675
4674
|
|
|
4676
4675
|
// src/hooks/core/use-company.ts
|
|
4677
4676
|
import { useQuery as useQuery3 } from "@tanstack/react-query";
|
|
@@ -4723,8 +4722,10 @@ var useCompany = (accessToken) => {
|
|
|
4723
4722
|
context: { allowed_company_ids: [current_company_id] }
|
|
4724
4723
|
};
|
|
4725
4724
|
};
|
|
4725
|
+
var use_company_default = useCompany;
|
|
4726
4726
|
|
|
4727
4727
|
// src/hooks/core/use-app-provider.tsx
|
|
4728
|
+
import { evalJSONContext } from "@fctc/interface-logic/utils";
|
|
4728
4729
|
import { jsx } from "react/jsx-runtime";
|
|
4729
4730
|
var AppProviderInitialValue = {
|
|
4730
4731
|
config: {},
|
|
@@ -4741,7 +4742,7 @@ var AppProvider = ({ children }) => {
|
|
|
4741
4742
|
const config = useConfig({});
|
|
4742
4743
|
const auth = useAuth();
|
|
4743
4744
|
const user = useUser(auth.accessToken);
|
|
4744
|
-
const company =
|
|
4745
|
+
const company = use_company_default(auth.accessToken);
|
|
4745
4746
|
const menuContext = useMemo7(() => {
|
|
4746
4747
|
return combineContexts([user.context, company.context]);
|
|
4747
4748
|
}, [user.context, company.context]);
|
package/dist/widget.js
CHANGED
|
@@ -37,7 +37,7 @@ var require_moment = __commonJS({
|
|
|
37
37
|
"use strict";
|
|
38
38
|
(function(global, factory) {
|
|
39
39
|
typeof exports2 === "object" && typeof module2 !== "undefined" ? module2.exports = factory() : typeof define === "function" && define.amd ? define(factory) : global.moment = factory();
|
|
40
|
-
})(exports2,
|
|
40
|
+
})(exports2, function() {
|
|
41
41
|
"use strict";
|
|
42
42
|
var hookCallback;
|
|
43
43
|
function hooks() {
|
|
@@ -4028,7 +4028,7 @@ var require_moment = __commonJS({
|
|
|
4028
4028
|
// <input type="month" />
|
|
4029
4029
|
};
|
|
4030
4030
|
return hooks;
|
|
4031
|
-
})
|
|
4031
|
+
});
|
|
4032
4032
|
}
|
|
4033
4033
|
});
|
|
4034
4034
|
|
|
@@ -4679,7 +4679,6 @@ var useAuth = () => {
|
|
|
4679
4679
|
|
|
4680
4680
|
// src/hooks/core/use-app-provider.tsx
|
|
4681
4681
|
var import_react11 = require("react");
|
|
4682
|
-
var import_utils2 = require("@fctc/interface-logic/utils");
|
|
4683
4682
|
|
|
4684
4683
|
// src/hooks/core/use-company.ts
|
|
4685
4684
|
var import_react_query3 = require("@tanstack/react-query");
|
|
@@ -4728,8 +4727,10 @@ var useCompany = (accessToken) => {
|
|
|
4728
4727
|
context: { allowed_company_ids: [current_company_id] }
|
|
4729
4728
|
};
|
|
4730
4729
|
};
|
|
4730
|
+
var use_company_default = useCompany;
|
|
4731
4731
|
|
|
4732
4732
|
// src/hooks/core/use-app-provider.tsx
|
|
4733
|
+
var import_utils2 = require("@fctc/interface-logic/utils");
|
|
4733
4734
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
4734
4735
|
var AppProviderInitialValue = {
|
|
4735
4736
|
config: {},
|
|
@@ -4746,7 +4747,7 @@ var AppProvider = ({ children }) => {
|
|
|
4746
4747
|
const config = useConfig({});
|
|
4747
4748
|
const auth = useAuth();
|
|
4748
4749
|
const user = useUser(auth.accessToken);
|
|
4749
|
-
const company =
|
|
4750
|
+
const company = use_company_default(auth.accessToken);
|
|
4750
4751
|
const menuContext = (0, import_react11.useMemo)(() => {
|
|
4751
4752
|
return combineContexts([user.context, company.context]);
|
|
4752
4753
|
}, [user.context, company.context]);
|
package/dist/widget.mjs
CHANGED
|
@@ -41,7 +41,7 @@ var require_moment = __commonJS({
|
|
|
41
41
|
"use strict";
|
|
42
42
|
(function(global, factory) {
|
|
43
43
|
typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory() : typeof define === "function" && define.amd ? define(factory) : global.moment = factory();
|
|
44
|
-
})(exports,
|
|
44
|
+
})(exports, function() {
|
|
45
45
|
"use strict";
|
|
46
46
|
var hookCallback;
|
|
47
47
|
function hooks() {
|
|
@@ -4032,7 +4032,7 @@ var require_moment = __commonJS({
|
|
|
4032
4032
|
// <input type="month" />
|
|
4033
4033
|
};
|
|
4034
4034
|
return hooks;
|
|
4035
|
-
})
|
|
4035
|
+
});
|
|
4036
4036
|
}
|
|
4037
4037
|
});
|
|
4038
4038
|
|
|
@@ -4672,7 +4672,6 @@ var useAuth = () => {
|
|
|
4672
4672
|
|
|
4673
4673
|
// src/hooks/core/use-app-provider.tsx
|
|
4674
4674
|
import { createContext, useContext, useMemo as useMemo7 } from "react";
|
|
4675
|
-
import { evalJSONContext } from "@fctc/interface-logic/utils";
|
|
4676
4675
|
|
|
4677
4676
|
// src/hooks/core/use-company.ts
|
|
4678
4677
|
import { useQuery as useQuery3 } from "@tanstack/react-query";
|
|
@@ -4724,8 +4723,10 @@ var useCompany = (accessToken) => {
|
|
|
4724
4723
|
context: { allowed_company_ids: [current_company_id] }
|
|
4725
4724
|
};
|
|
4726
4725
|
};
|
|
4726
|
+
var use_company_default = useCompany;
|
|
4727
4727
|
|
|
4728
4728
|
// src/hooks/core/use-app-provider.tsx
|
|
4729
|
+
import { evalJSONContext } from "@fctc/interface-logic/utils";
|
|
4729
4730
|
import { jsx } from "react/jsx-runtime";
|
|
4730
4731
|
var AppProviderInitialValue = {
|
|
4731
4732
|
config: {},
|
|
@@ -4742,7 +4743,7 @@ var AppProvider = ({ children }) => {
|
|
|
4742
4743
|
const config = useConfig({});
|
|
4743
4744
|
const auth = useAuth();
|
|
4744
4745
|
const user = useUser(auth.accessToken);
|
|
4745
|
-
const company =
|
|
4746
|
+
const company = use_company_default(auth.accessToken);
|
|
4746
4747
|
const menuContext = useMemo7(() => {
|
|
4747
4748
|
return combineContexts([user.context, company.context]);
|
|
4748
4749
|
}, [user.context, company.context]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fctc/widget-logic",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.2",
|
|
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": "^2.4.
|
|
77
|
+
"@fctc/interface-logic": "^2.4.2",
|
|
78
78
|
"@headlessui/react": "^2.2.6",
|
|
79
79
|
"@tanstack/react-query": "^5.84.0",
|
|
80
80
|
"i18next": "^25.3.2",
|