@embedreach/components 0.1.31 → 0.1.32

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.
@@ -8548,7 +8548,7 @@ const useThemeContext = () => {
8548
8548
  applyTheme
8549
8549
  };
8550
8550
  };
8551
- const ThemeProvider = ({
8551
+ const InnerThemeProvider = ({
8552
8552
  children: children2,
8553
8553
  theme: theme2
8554
8554
  }) => {
@@ -8564,7 +8564,13 @@ const ThemeProvider = ({
8564
8564
  if (themeLoading && theme2) {
8565
8565
  return /* @__PURE__ */ jsx("div", { className: "flex flex-col justify-center items-center h-screen", children: /* @__PURE__ */ jsx(SpinLoader, { text: [t3("loading")] }) });
8566
8566
  }
8567
- return /* @__PURE__ */ jsx(Provider$2, { children: children2 });
8567
+ return /* @__PURE__ */ jsx(Fragment, { children: children2 });
8568
+ };
8569
+ const ThemeProvider = ({
8570
+ children: children2,
8571
+ theme: theme2
8572
+ }) => {
8573
+ return /* @__PURE__ */ jsx(Provider$2, { children: /* @__PURE__ */ jsx(InnerThemeProvider, { theme: theme2, children: children2 }) });
8568
8574
  };
8569
8575
  const isString = (obj) => typeof obj === "string";
8570
8576
  const defer = () => {
@@ -46718,6 +46724,11 @@ const ViewAutomationHeader = ({
46718
46724
  ] })
46719
46725
  ] });
46720
46726
  };
46727
+ const useRouterParams = () => {
46728
+ const params = useParams();
46729
+ const [searchParams] = useSearchParams();
46730
+ return { params, searchParams };
46731
+ };
46721
46732
  const ViewAutomationModal = ({
46722
46733
  iconDefinitions,
46723
46734
  autoOpenEditPopup,
@@ -46725,9 +46736,8 @@ const ViewAutomationModal = ({
46725
46736
  showBackButton = false,
46726
46737
  logoUrl
46727
46738
  }) => {
46728
- const params = useParams();
46729
- const [searchParams] = useSearchParams();
46730
- const FINAL_AUTOMATION_ID = automationId || params.automationId || searchParams.get("automationId");
46739
+ const { params, searchParams } = useRouterParams();
46740
+ const FINAL_AUTOMATION_ID = automationId || params?.automationId || searchParams.get("automationId");
46731
46741
  const AUTO_OPEN_EDIT_POPUP = autoOpenEditPopup || searchParams.get("autoOpenEditPopup");
46732
46742
  const FINAL_SHOW_BACK_BUTTON = searchParams.get("showBackButton") === "true" || showBackButton;
46733
46743
  const mergedIconDefinitions = mergeIconDefinitions(iconDefinitions);
package/dist/index.umd.js CHANGED
@@ -8565,7 +8565,7 @@
8565
8565
  applyTheme
8566
8566
  };
8567
8567
  };
8568
- const ThemeProvider = ({
8568
+ const InnerThemeProvider = ({
8569
8569
  children: children2,
8570
8570
  theme: theme2
8571
8571
  }) => {
@@ -8581,7 +8581,13 @@
8581
8581
  if (themeLoading && theme2) {
8582
8582
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col justify-center items-center h-screen", children: /* @__PURE__ */ jsxRuntime.jsx(SpinLoader, { text: [t2("loading")] }) });
8583
8583
  }
8584
- return /* @__PURE__ */ jsxRuntime.jsx(Provider$2, { children: children2 });
8584
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: children2 });
8585
+ };
8586
+ const ThemeProvider = ({
8587
+ children: children2,
8588
+ theme: theme2
8589
+ }) => {
8590
+ return /* @__PURE__ */ jsxRuntime.jsx(Provider$2, { children: /* @__PURE__ */ jsxRuntime.jsx(InnerThemeProvider, { theme: theme2, children: children2 }) });
8585
8591
  };
8586
8592
  const isString$1 = (obj) => typeof obj === "string";
8587
8593
  const defer = () => {
@@ -46735,6 +46741,11 @@ ${message2 ?? ""}`);
46735
46741
  ] })
46736
46742
  ] });
46737
46743
  };
46744
+ const useRouterParams = () => {
46745
+ const params = useParams();
46746
+ const [searchParams] = useSearchParams();
46747
+ return { params, searchParams };
46748
+ };
46738
46749
  const ViewAutomationModal = ({
46739
46750
  iconDefinitions,
46740
46751
  autoOpenEditPopup,
@@ -46742,9 +46753,8 @@ ${message2 ?? ""}`);
46742
46753
  showBackButton = false,
46743
46754
  logoUrl
46744
46755
  }) => {
46745
- const params = useParams();
46746
- const [searchParams] = useSearchParams();
46747
- const FINAL_AUTOMATION_ID = automationId || params.automationId || searchParams.get("automationId");
46756
+ const { params, searchParams } = useRouterParams();
46757
+ const FINAL_AUTOMATION_ID = automationId || params?.automationId || searchParams.get("automationId");
46748
46758
  const AUTO_OPEN_EDIT_POPUP = autoOpenEditPopup || searchParams.get("autoOpenEditPopup");
46749
46759
  const FINAL_SHOW_BACK_BUTTON = searchParams.get("showBackButton") === "true" || showBackButton;
46750
46760
  const mergedIconDefinitions = mergeIconDefinitions(iconDefinitions);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@embedreach/components",
3
- "version": "0.1.31",
3
+ "version": "0.1.32",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.umd.js",