@fctc/widget-logic 1.2.3 → 1.2.5

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
@@ -951,6 +951,9 @@ type AppProviderType = {
951
951
  declare const AppProvider: ({ children }: {
952
952
  children: React.ReactNode;
953
953
  }) => JSX.Element;
954
+ declare const MainAppProvider: ({ children, }: {
955
+ children: React.ReactNode;
956
+ }) => JSX.Element;
954
957
  declare const useAppProvider: () => AppProviderType;
955
958
 
956
959
  declare const DEFAULT_EVENTS: readonly ["mousedown", "touchstart"];
@@ -1006,4 +1009,4 @@ declare const useResetPasswordHandler: () => {
1006
1009
  error: Error | null;
1007
1010
  };
1008
1011
 
1009
- export { type ActionResultType, AppProvider, type Context, type Record, type ViewResponse, useAppProvider, useAuth, type useAuthType, useCallAction, type useCallActionType, useClickOutside, useConfig, type useConfigType, useDebounce, useDetail, useForgotPasswordHandler, useListData, type useListDataType, useLoginHandler, useMenu, type useMenuType, useProfile, useResetPasswordHandler, useSwitchLocaleHandler, useUser, type useUserType, useViewV2, type useViewV2Type };
1012
+ export { type ActionResultType, AppProvider, type Context, MainAppProvider, type Record, type ViewResponse, useAppProvider, useAuth, type useAuthType, useCallAction, type useCallActionType, useClickOutside, useConfig, type useConfigType, useDebounce, useDetail, useForgotPasswordHandler, useListData, type useListDataType, useLoginHandler, useMenu, type useMenuType, useProfile, useResetPasswordHandler, useSwitchLocaleHandler, useUser, type useUserType, useViewV2, type useViewV2Type };
package/dist/hooks.d.ts CHANGED
@@ -951,6 +951,9 @@ type AppProviderType = {
951
951
  declare const AppProvider: ({ children }: {
952
952
  children: React.ReactNode;
953
953
  }) => JSX.Element;
954
+ declare const MainAppProvider: ({ children, }: {
955
+ children: React.ReactNode;
956
+ }) => JSX.Element;
954
957
  declare const useAppProvider: () => AppProviderType;
955
958
 
956
959
  declare const DEFAULT_EVENTS: readonly ["mousedown", "touchstart"];
@@ -1006,4 +1009,4 @@ declare const useResetPasswordHandler: () => {
1006
1009
  error: Error | null;
1007
1010
  };
1008
1011
 
1009
- export { type ActionResultType, AppProvider, type Context, type Record, type ViewResponse, useAppProvider, useAuth, type useAuthType, useCallAction, type useCallActionType, useClickOutside, useConfig, type useConfigType, useDebounce, useDetail, useForgotPasswordHandler, useListData, type useListDataType, useLoginHandler, useMenu, type useMenuType, useProfile, useResetPasswordHandler, useSwitchLocaleHandler, useUser, type useUserType, useViewV2, type useViewV2Type };
1012
+ export { type ActionResultType, AppProvider, type Context, MainAppProvider, type Record, type ViewResponse, useAppProvider, useAuth, type useAuthType, useCallAction, type useCallActionType, useClickOutside, useConfig, type useConfigType, useDebounce, useDetail, useForgotPasswordHandler, useListData, type useListDataType, useLoginHandler, useMenu, type useMenuType, useProfile, useResetPasswordHandler, useSwitchLocaleHandler, useUser, type useUserType, useViewV2, type useViewV2Type };
package/dist/hooks.js CHANGED
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var hooks_exports = {};
22
22
  __export(hooks_exports, {
23
23
  AppProvider: () => AppProvider,
24
+ MainAppProvider: () => MainAppProvider,
24
25
  useAppProvider: () => useAppProvider,
25
26
  useAuth: () => useAuth,
26
27
  useCallAction: () => useCallAction,
@@ -627,9 +628,7 @@ var AppProvider = ({ children }) => {
627
628
  return combineContexts([user.context, company.context]);
628
629
  }, [user.context, company.context]);
629
630
  const menu = useMenu({ context: menuContext });
630
- const action = (0, import_react10.useMemo)(() => {
631
- return menu.state.action;
632
- }, [menu.state.action]);
631
+ const action = (0, import_react10.useMemo)(() => menu.state.action, [menu.state.action]);
633
632
  const viewContext = (0, import_react10.useMemo)(() => {
634
633
  return combineContexts([
635
634
  menuContext,
@@ -658,15 +657,18 @@ var AppProvider = ({ children }) => {
658
657
  action,
659
658
  view
660
659
  },
661
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_interface_logic10.MainProvider, { children })
660
+ children
662
661
  }
663
662
  );
664
663
  };
664
+ var MainAppProvider = ({
665
+ children
666
+ }) => {
667
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_interface_logic10.MainProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AppProvider, { children }) });
668
+ };
665
669
  var useAppProvider = () => {
666
670
  const context = (0, import_react10.useContext)(ReactContext);
667
- if (!context) {
668
- return AppProviderInitialValue;
669
- }
671
+ if (!context) return AppProviderInitialValue;
670
672
  return context;
671
673
  };
672
674
 
@@ -841,6 +843,7 @@ var useResetPasswordHandler = () => {
841
843
  // Annotate the CommonJS export names for ESM import in node:
842
844
  0 && (module.exports = {
843
845
  AppProvider,
846
+ MainAppProvider,
844
847
  useAppProvider,
845
848
  useAuth,
846
849
  useCallAction,
package/dist/hooks.mjs CHANGED
@@ -612,9 +612,7 @@ var AppProvider = ({ children }) => {
612
612
  return combineContexts([user.context, company.context]);
613
613
  }, [user.context, company.context]);
614
614
  const menu = useMenu({ context: menuContext });
615
- const action = useMemo7(() => {
616
- return menu.state.action;
617
- }, [menu.state.action]);
615
+ const action = useMemo7(() => menu.state.action, [menu.state.action]);
618
616
  const viewContext = useMemo7(() => {
619
617
  return combineContexts([
620
618
  menuContext,
@@ -643,15 +641,18 @@ var AppProvider = ({ children }) => {
643
641
  action,
644
642
  view
645
643
  },
646
- children: /* @__PURE__ */ jsx(MainProvider, { children })
644
+ children
647
645
  }
648
646
  );
649
647
  };
648
+ var MainAppProvider = ({
649
+ children
650
+ }) => {
651
+ return /* @__PURE__ */ jsx(MainProvider, { children: /* @__PURE__ */ jsx(AppProvider, { children }) });
652
+ };
650
653
  var useAppProvider = () => {
651
654
  const context = useContext(ReactContext);
652
- if (!context) {
653
- return AppProviderInitialValue;
654
- }
655
+ if (!context) return AppProviderInitialValue;
655
656
  return context;
656
657
  };
657
658
 
@@ -830,6 +831,7 @@ var useResetPasswordHandler = () => {
830
831
  };
831
832
  export {
832
833
  AppProvider,
834
+ MainAppProvider,
833
835
  useAppProvider,
834
836
  useAuth,
835
837
  useCallAction,
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- export { ActionResultType, AppProvider, Context, Record, ViewResponse, useAppProvider, useAuth, useAuthType, useCallAction, useCallActionType, useClickOutside, useConfig, useConfigType, useDebounce, useDetail, useForgotPasswordHandler, useListData, useListDataType, useLoginHandler, useMenu, useMenuType, useProfile, useResetPasswordHandler, useSwitchLocaleHandler, useUser, useUserType, useViewV2, useViewV2Type } from './hooks.mjs';
1
+ export { ActionResultType, AppProvider, Context, MainAppProvider, Record, ViewResponse, useAppProvider, useAuth, useAuthType, useCallAction, useCallActionType, useClickOutside, useConfig, useConfigType, useDebounce, useDetail, useForgotPasswordHandler, useListData, useListDataType, useLoginHandler, useMenu, useMenuType, useProfile, useResetPasswordHandler, useSwitchLocaleHandler, useUser, useUserType, useViewV2, useViewV2Type } from './hooks.mjs';
2
2
  export { CloseIcon, EyeIcon, LoadingIcon } from './icons.mjs';
3
3
  import { IInputFieldProps, ValuePropsType } from './types.mjs';
4
4
  import * as react from 'react';
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { ActionResultType, AppProvider, Context, Record, ViewResponse, useAppProvider, useAuth, useAuthType, useCallAction, useCallActionType, useClickOutside, useConfig, useConfigType, useDebounce, useDetail, useForgotPasswordHandler, useListData, useListDataType, useLoginHandler, useMenu, useMenuType, useProfile, useResetPasswordHandler, useSwitchLocaleHandler, useUser, useUserType, useViewV2, useViewV2Type } from './hooks.js';
1
+ export { ActionResultType, AppProvider, Context, MainAppProvider, Record, ViewResponse, useAppProvider, useAuth, useAuthType, useCallAction, useCallActionType, useClickOutside, useConfig, useConfigType, useDebounce, useDetail, useForgotPasswordHandler, useListData, useListDataType, useLoginHandler, useMenu, useMenuType, useProfile, useResetPasswordHandler, useSwitchLocaleHandler, useUser, useUserType, useViewV2, useViewV2Type } from './hooks.js';
2
2
  export { CloseIcon, EyeIcon, LoadingIcon } from './icons.js';
3
3
  import { IInputFieldProps, ValuePropsType } from './types.js';
4
4
  import * as react from 'react';
package/dist/index.js CHANGED
@@ -4040,6 +4040,7 @@ __export(index_exports, {
4040
4040
  CloseIcon: () => CloseIcon,
4041
4041
  EyeIcon: () => EyeIcon,
4042
4042
  LoadingIcon: () => LoadingIcon,
4043
+ MainAppProvider: () => MainAppProvider,
4043
4044
  STORAGES: () => STORAGES,
4044
4045
  binaryFieldController: () => binaryFieldController,
4045
4046
  colorFieldController: () => colorFieldController,
@@ -4754,9 +4755,7 @@ var AppProvider = ({ children }) => {
4754
4755
  return combineContexts([user.context, company.context]);
4755
4756
  }, [user.context, company.context]);
4756
4757
  const menu = useMenu({ context: menuContext });
4757
- const action = (0, import_react10.useMemo)(() => {
4758
- return menu.state.action;
4759
- }, [menu.state.action]);
4758
+ const action = (0, import_react10.useMemo)(() => menu.state.action, [menu.state.action]);
4760
4759
  const viewContext = (0, import_react10.useMemo)(() => {
4761
4760
  return combineContexts([
4762
4761
  menuContext,
@@ -4785,15 +4784,18 @@ var AppProvider = ({ children }) => {
4785
4784
  action,
4786
4785
  view
4787
4786
  },
4788
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_interface_logic10.MainProvider, { children })
4787
+ children
4789
4788
  }
4790
4789
  );
4791
4790
  };
4791
+ var MainAppProvider = ({
4792
+ children
4793
+ }) => {
4794
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_interface_logic10.MainProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AppProvider, { children }) });
4795
+ };
4792
4796
  var useAppProvider = () => {
4793
4797
  const context = (0, import_react10.useContext)(ReactContext);
4794
- if (!context) {
4795
- return AppProviderInitialValue;
4796
- }
4798
+ if (!context) return AppProviderInitialValue;
4797
4799
  return context;
4798
4800
  };
4799
4801
 
@@ -7322,6 +7324,7 @@ var binaryFieldController = (props) => {
7322
7324
  CloseIcon,
7323
7325
  EyeIcon,
7324
7326
  LoadingIcon,
7327
+ MainAppProvider,
7325
7328
  STORAGES,
7326
7329
  binaryFieldController,
7327
7330
  colorFieldController,
package/dist/index.mjs CHANGED
@@ -4724,9 +4724,7 @@ var AppProvider = ({ children }) => {
4724
4724
  return combineContexts([user.context, company.context]);
4725
4725
  }, [user.context, company.context]);
4726
4726
  const menu = useMenu({ context: menuContext });
4727
- const action = useMemo7(() => {
4728
- return menu.state.action;
4729
- }, [menu.state.action]);
4727
+ const action = useMemo7(() => menu.state.action, [menu.state.action]);
4730
4728
  const viewContext = useMemo7(() => {
4731
4729
  return combineContexts([
4732
4730
  menuContext,
@@ -4755,15 +4753,18 @@ var AppProvider = ({ children }) => {
4755
4753
  action,
4756
4754
  view
4757
4755
  },
4758
- children: /* @__PURE__ */ jsx(MainProvider, { children })
4756
+ children
4759
4757
  }
4760
4758
  );
4761
4759
  };
4760
+ var MainAppProvider = ({
4761
+ children
4762
+ }) => {
4763
+ return /* @__PURE__ */ jsx(MainProvider, { children: /* @__PURE__ */ jsx(AppProvider, { children }) });
4764
+ };
4762
4765
  var useAppProvider = () => {
4763
4766
  const context = useContext(ReactContext);
4764
- if (!context) {
4765
- return AppProviderInitialValue;
4766
- }
4767
+ if (!context) return AppProviderInitialValue;
4767
4768
  return context;
4768
4769
  };
4769
4770
 
@@ -7356,6 +7357,7 @@ export {
7356
7357
  CloseIcon,
7357
7358
  EyeIcon,
7358
7359
  LoadingIcon,
7360
+ MainAppProvider,
7359
7361
  STORAGES,
7360
7362
  binaryFieldController,
7361
7363
  colorFieldController,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fctc/widget-logic",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
4
4
  "types": "dist/index.d.ts",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
@@ -52,7 +52,6 @@
52
52
  "i18next-browser-languagedetector": "^8.2.0",
53
53
  "react-dom": "^19.1.1",
54
54
  "react-i18next": "^15.6.1",
55
- "react-redux": "^9.2.0",
56
55
  "react-tooltip": "^5.29.1"
57
56
  },
58
57
  "devDependencies": {