@fctc/widget-logic 2.4.1 → 2.4.3

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 CHANGED
@@ -927,6 +927,7 @@ declare const useCompany: (accessToken: string | null) => {
927
927
  allowed_company_ids: (number | undefined)[];
928
928
  };
929
929
  };
930
+
930
931
  interface CompanyTuple extends Array<number | string> {
931
932
  0: number;
932
933
  1: string;
@@ -982,4 +983,4 @@ declare const useClickOutside: ({ handler, events, nodes, refs, }: UseClickOutsi
982
983
 
983
984
  declare function useDebounce<T>(value: T, delay: number): [T];
984
985
 
985
- export { type ActionResultType, AppProvider, type ContextProfile, type Record, type ViewResponse, useAppProvider, useAuth, type useAuthType, useCallAction, type useCallActionType, useClickOutside, useCompany, type useCompanyType, useConfig, type useConfigType, useDebounce, useDetail, useGetRowIds, useListData, type useListDataType, useMenu, useMenuItem, type useMenuType, useProfile, useUser, type useUserType, useViewV2, type useViewV2Type };
986
+ export { type ActionResultType, AppProvider, type ContextProfile, type Record, type ViewResponse, useAppProvider, useAuth, type useAuthType, useCallAction, type useCallActionType, useClickOutside, useConfig, type useConfigType, useDebounce, useDetail, useGetRowIds, useListData, type useListDataType, useMenu, useMenuItem, type useMenuType, useProfile, useUser, type useUserType, useViewV2, type useViewV2Type };
package/dist/hooks.d.ts CHANGED
@@ -927,6 +927,7 @@ declare const useCompany: (accessToken: string | null) => {
927
927
  allowed_company_ids: (number | undefined)[];
928
928
  };
929
929
  };
930
+
930
931
  interface CompanyTuple extends Array<number | string> {
931
932
  0: number;
932
933
  1: string;
@@ -982,4 +983,4 @@ declare const useClickOutside: ({ handler, events, nodes, refs, }: UseClickOutsi
982
983
 
983
984
  declare function useDebounce<T>(value: T, delay: number): [T];
984
985
 
985
- export { type ActionResultType, AppProvider, type ContextProfile, type Record, type ViewResponse, useAppProvider, useAuth, type useAuthType, useCallAction, type useCallActionType, useClickOutside, useCompany, type useCompanyType, useConfig, type useConfigType, useDebounce, useDetail, useGetRowIds, useListData, type useListDataType, useMenu, useMenuItem, type useMenuType, useProfile, useUser, type useUserType, useViewV2, type useViewV2Type };
986
+ export { type ActionResultType, AppProvider, type ContextProfile, type Record, type ViewResponse, useAppProvider, useAuth, type useAuthType, useCallAction, type useCallActionType, useClickOutside, useConfig, type useConfigType, useDebounce, useDetail, useGetRowIds, useListData, type useListDataType, useMenu, useMenuItem, type useMenuType, useProfile, useUser, type useUserType, useViewV2, type useViewV2Type };
package/dist/hooks.js CHANGED
@@ -26,7 +26,6 @@ __export(hooks_exports, {
26
26
  useAuth: () => useAuth,
27
27
  useCallAction: () => useCallAction,
28
28
  useClickOutside: () => useClickOutside,
29
- useCompany: () => useCompany,
30
29
  useConfig: () => useConfig,
31
30
  useDebounce: () => useDebounce,
32
31
  useDetail: () => useDetail,
@@ -587,7 +586,6 @@ var useAuth = () => {
587
586
 
588
587
  // src/hooks/core/use-app-provider.tsx
589
588
  var import_react10 = require("react");
590
- var import_utils2 = require("@fctc/interface-logic/utils");
591
589
 
592
590
  // src/hooks/core/use-company.ts
593
591
  var import_react_query3 = require("@tanstack/react-query");
@@ -636,8 +634,10 @@ var useCompany = (accessToken) => {
636
634
  context: { allowed_company_ids: [current_company_id] }
637
635
  };
638
636
  };
637
+ var use_company_default = useCompany;
639
638
 
640
639
  // src/hooks/core/use-app-provider.tsx
640
+ var import_utils2 = require("@fctc/interface-logic/utils");
641
641
  var import_jsx_runtime = require("react/jsx-runtime");
642
642
  var AppProviderInitialValue = {
643
643
  config: {},
@@ -654,7 +654,7 @@ var AppProvider = ({ children }) => {
654
654
  const config = useConfig({});
655
655
  const auth = useAuth();
656
656
  const user = useUser(auth.accessToken);
657
- const company = useCompany(auth.accessToken);
657
+ const company = use_company_default(auth.accessToken);
658
658
  const menuContext = (0, import_react10.useMemo)(() => {
659
659
  return combineContexts([user.context, company.context]);
660
660
  }, [user.context, company.context]);
@@ -882,7 +882,6 @@ __reExport(hooks_exports, require("@fctc/interface-logic/hooks"), module.exports
882
882
  useAuth,
883
883
  useCallAction,
884
884
  useClickOutside,
885
- useCompany,
886
885
  useConfig,
887
886
  useDebounce,
888
887
  useDetail,
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 = useCompany(auth.accessToken);
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]);
@@ -873,7 +874,6 @@ export {
873
874
  useAuth,
874
875
  useCallAction,
875
876
  useClickOutside,
876
- useCompany,
877
877
  useConfig,
878
878
  useDebounce,
879
879
  useDetail,
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- export { ActionResultType, AppProvider, ContextProfile, Record, ViewResponse, useAppProvider, useAuth, useAuthType, useCallAction, useCallActionType, useClickOutside, useCompany, useCompanyType, useConfig, useConfigType, useDebounce, useDetail, useGetRowIds, useListData, useListDataType, useMenu, useMenuItem, useMenuType, useProfile, useUser, useUserType, useViewV2, useViewV2Type } from './hooks.mjs';
1
+ export { ActionResultType, AppProvider, ContextProfile, Record, ViewResponse, useAppProvider, useAuth, useAuthType, useCallAction, useCallActionType, useClickOutside, useConfig, useConfigType, useDebounce, useDetail, useGetRowIds, useListData, useListDataType, useMenu, useMenuItem, useMenuType, useProfile, useUser, useUserType, useViewV2, useViewV2Type } from './hooks.mjs';
2
2
  export * from '@fctc/interface-logic/hooks';
3
3
  export * from '@fctc/interface-logic/configs';
4
4
  export { CheckIcon, ChevronBottomIcon, CloseIcon, EyeIcon, FilterIcon, GroupByIcon, LoadingIcon, SearchIcon } from './icons.mjs';
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { ActionResultType, AppProvider, ContextProfile, Record, ViewResponse, useAppProvider, useAuth, useAuthType, useCallAction, useCallActionType, useClickOutside, useCompany, useCompanyType, useConfig, useConfigType, useDebounce, useDetail, useGetRowIds, useListData, useListDataType, useMenu, useMenuItem, useMenuType, useProfile, useUser, useUserType, useViewV2, useViewV2Type } from './hooks.js';
1
+ export { ActionResultType, AppProvider, ContextProfile, Record, ViewResponse, useAppProvider, useAuth, useAuthType, useCallAction, useCallActionType, useClickOutside, useConfig, useConfigType, useDebounce, useDetail, useGetRowIds, useListData, useListDataType, useMenu, useMenuItem, useMenuType, useProfile, useUser, useUserType, useViewV2, useViewV2Type } from './hooks.js';
2
2
  export * from '@fctc/interface-logic/hooks';
3
3
  export * from '@fctc/interface-logic/configs';
4
4
  export { CheckIcon, ChevronBottomIcon, CloseIcon, EyeIcon, FilterIcon, GroupByIcon, LoadingIcon, SearchIcon } from './icons.js';
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, (function() {
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
 
@@ -4075,7 +4075,6 @@ __export(index_exports, {
4075
4075
  useAuth: () => useAuth,
4076
4076
  useCallAction: () => useCallAction,
4077
4077
  useClickOutside: () => useClickOutside,
4078
- useCompany: () => useCompany,
4079
4078
  useConfig: () => useConfig,
4080
4079
  useDebounce: () => useDebounce,
4081
4080
  useDetail: () => useDetail,
@@ -4098,7 +4097,6 @@ __export(hooks_exports, {
4098
4097
  useAuth: () => useAuth,
4099
4098
  useCallAction: () => useCallAction,
4100
4099
  useClickOutside: () => useClickOutside,
4101
- useCompany: () => useCompany,
4102
4100
  useConfig: () => useConfig,
4103
4101
  useDebounce: () => useDebounce,
4104
4102
  useDetail: () => useDetail,
@@ -4658,7 +4656,6 @@ var useAuth = () => {
4658
4656
 
4659
4657
  // src/hooks/core/use-app-provider.tsx
4660
4658
  var import_react10 = require("react");
4661
- var import_utils2 = require("@fctc/interface-logic/utils");
4662
4659
 
4663
4660
  // src/hooks/core/use-company.ts
4664
4661
  var import_react_query3 = require("@tanstack/react-query");
@@ -4707,8 +4704,10 @@ var useCompany = (accessToken) => {
4707
4704
  context: { allowed_company_ids: [current_company_id] }
4708
4705
  };
4709
4706
  };
4707
+ var use_company_default = useCompany;
4710
4708
 
4711
4709
  // src/hooks/core/use-app-provider.tsx
4710
+ var import_utils2 = require("@fctc/interface-logic/utils");
4712
4711
  var import_jsx_runtime = require("react/jsx-runtime");
4713
4712
  var AppProviderInitialValue = {
4714
4713
  config: {},
@@ -4725,7 +4724,7 @@ var AppProvider = ({ children }) => {
4725
4724
  const config = useConfig({});
4726
4725
  const auth = useAuth();
4727
4726
  const user = useUser(auth.accessToken);
4728
- const company = useCompany(auth.accessToken);
4727
+ const company = use_company_default(auth.accessToken);
4729
4728
  const menuContext = (0, import_react10.useMemo)(() => {
4730
4729
  return combineContexts([user.context, company.context]);
4731
4730
  }, [user.context, company.context]);
@@ -7468,7 +7467,6 @@ __reExport(index_exports, types_exports, module.exports);
7468
7467
  useAuth,
7469
7468
  useCallAction,
7470
7469
  useClickOutside,
7471
- useCompany,
7472
7470
  useConfig,
7473
7471
  useDebounce,
7474
7472
  useDetail,
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, (function() {
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
 
@@ -4079,7 +4079,6 @@ __export(index_exports, {
4079
4079
  useAuth: () => useAuth,
4080
4080
  useCallAction: () => useCallAction,
4081
4081
  useClickOutside: () => useClickOutside,
4082
- useCompany: () => useCompany,
4083
4082
  useConfig: () => useConfig,
4084
4083
  useDebounce: () => useDebounce,
4085
4084
  useDetail: () => useDetail,
@@ -4101,7 +4100,6 @@ __export(hooks_exports, {
4101
4100
  useAuth: () => useAuth,
4102
4101
  useCallAction: () => useCallAction,
4103
4102
  useClickOutside: () => useClickOutside,
4104
- useCompany: () => useCompany,
4105
4103
  useConfig: () => useConfig,
4106
4104
  useDebounce: () => useDebounce,
4107
4105
  useDetail: () => useDetail,
@@ -4673,7 +4671,6 @@ var useAuth = () => {
4673
4671
 
4674
4672
  // src/hooks/core/use-app-provider.tsx
4675
4673
  import { createContext, useContext, useMemo as useMemo7 } from "react";
4676
- import { evalJSONContext } from "@fctc/interface-logic/utils";
4677
4674
 
4678
4675
  // src/hooks/core/use-company.ts
4679
4676
  import { useQuery as useQuery3 } from "@tanstack/react-query";
@@ -4725,8 +4722,10 @@ var useCompany = (accessToken) => {
4725
4722
  context: { allowed_company_ids: [current_company_id] }
4726
4723
  };
4727
4724
  };
4725
+ var use_company_default = useCompany;
4728
4726
 
4729
4727
  // src/hooks/core/use-app-provider.tsx
4728
+ import { evalJSONContext } from "@fctc/interface-logic/utils";
4730
4729
  import { jsx } from "react/jsx-runtime";
4731
4730
  var AppProviderInitialValue = {
4732
4731
  config: {},
@@ -4743,7 +4742,7 @@ var AppProvider = ({ children }) => {
4743
4742
  const config = useConfig({});
4744
4743
  const auth = useAuth();
4745
4744
  const user = useUser(auth.accessToken);
4746
- const company = useCompany(auth.accessToken);
4745
+ const company = use_company_default(auth.accessToken);
4747
4746
  const menuContext = useMemo7(() => {
4748
4747
  return combineContexts([user.context, company.context]);
4749
4748
  }, [user.context, company.context]);
@@ -7506,7 +7505,6 @@ export {
7506
7505
  useAuth,
7507
7506
  useCallAction,
7508
7507
  useClickOutside,
7509
- useCompany,
7510
7508
  useConfig,
7511
7509
  useDebounce,
7512
7510
  useDetail,
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, (function() {
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
 
@@ -4120,7 +4120,6 @@ __export(hooks_exports, {
4120
4120
  useAuth: () => useAuth,
4121
4121
  useCallAction: () => useCallAction,
4122
4122
  useClickOutside: () => useClickOutside,
4123
- useCompany: () => useCompany,
4124
4123
  useConfig: () => useConfig,
4125
4124
  useDebounce: () => useDebounce,
4126
4125
  useDetail: () => useDetail,
@@ -4680,7 +4679,6 @@ var useAuth = () => {
4680
4679
 
4681
4680
  // src/hooks/core/use-app-provider.tsx
4682
4681
  var import_react11 = require("react");
4683
- var import_utils2 = require("@fctc/interface-logic/utils");
4684
4682
 
4685
4683
  // src/hooks/core/use-company.ts
4686
4684
  var import_react_query3 = require("@tanstack/react-query");
@@ -4729,8 +4727,10 @@ var useCompany = (accessToken) => {
4729
4727
  context: { allowed_company_ids: [current_company_id] }
4730
4728
  };
4731
4729
  };
4730
+ var use_company_default = useCompany;
4732
4731
 
4733
4732
  // src/hooks/core/use-app-provider.tsx
4733
+ var import_utils2 = require("@fctc/interface-logic/utils");
4734
4734
  var import_jsx_runtime = require("react/jsx-runtime");
4735
4735
  var AppProviderInitialValue = {
4736
4736
  config: {},
@@ -4747,7 +4747,7 @@ var AppProvider = ({ children }) => {
4747
4747
  const config = useConfig({});
4748
4748
  const auth = useAuth();
4749
4749
  const user = useUser(auth.accessToken);
4750
- const company = useCompany(auth.accessToken);
4750
+ const company = use_company_default(auth.accessToken);
4751
4751
  const menuContext = (0, import_react11.useMemo)(() => {
4752
4752
  return combineContexts([user.context, company.context]);
4753
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, (function() {
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
 
@@ -4101,7 +4101,6 @@ __export(hooks_exports, {
4101
4101
  useAuth: () => useAuth,
4102
4102
  useCallAction: () => useCallAction,
4103
4103
  useClickOutside: () => useClickOutside,
4104
- useCompany: () => useCompany,
4105
4104
  useConfig: () => useConfig,
4106
4105
  useDebounce: () => useDebounce,
4107
4106
  useDetail: () => useDetail,
@@ -4673,7 +4672,6 @@ var useAuth = () => {
4673
4672
 
4674
4673
  // src/hooks/core/use-app-provider.tsx
4675
4674
  import { createContext, useContext, useMemo as useMemo7 } from "react";
4676
- import { evalJSONContext } from "@fctc/interface-logic/utils";
4677
4675
 
4678
4676
  // src/hooks/core/use-company.ts
4679
4677
  import { useQuery as useQuery3 } from "@tanstack/react-query";
@@ -4725,8 +4723,10 @@ var useCompany = (accessToken) => {
4725
4723
  context: { allowed_company_ids: [current_company_id] }
4726
4724
  };
4727
4725
  };
4726
+ var use_company_default = useCompany;
4728
4727
 
4729
4728
  // src/hooks/core/use-app-provider.tsx
4729
+ import { evalJSONContext } from "@fctc/interface-logic/utils";
4730
4730
  import { jsx } from "react/jsx-runtime";
4731
4731
  var AppProviderInitialValue = {
4732
4732
  config: {},
@@ -4743,7 +4743,7 @@ var AppProvider = ({ children }) => {
4743
4743
  const config = useConfig({});
4744
4744
  const auth = useAuth();
4745
4745
  const user = useUser(auth.accessToken);
4746
- const company = useCompany(auth.accessToken);
4746
+ const company = use_company_default(auth.accessToken);
4747
4747
  const menuContext = useMemo7(() => {
4748
4748
  return combineContexts([user.context, company.context]);
4749
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.1",
3
+ "version": "2.4.3",
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.0",
77
+ "@fctc/interface-logic": "^2.4.3",
78
78
  "@headlessui/react": "^2.2.6",
79
79
  "@tanstack/react-query": "^5.84.0",
80
80
  "i18next": "^25.3.2",