imean-service-engine-htmx-plugin 1.0.0 → 1.0.1

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/index.js CHANGED
@@ -2621,6 +2621,9 @@ var RouteHandler = class {
2621
2621
  }
2622
2622
  }
2623
2623
  renderFullPage(ctx, adminContext) {
2624
+ if (adminContext.redirectUrl) {
2625
+ return ctx.redirect(adminContext.redirectUrl);
2626
+ }
2624
2627
  const useAdminLayout = this.moduleOptions.useAdminLayout !== false;
2625
2628
  return ctx.html(
2626
2629
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -2635,7 +2638,9 @@ var RouteHandler = class {
2635
2638
  }
2636
2639
  renderFragment(ctx, adminContext) {
2637
2640
  if (adminContext.redirectUrl) {
2638
- return ctx.redirect(adminContext.redirectUrl);
2641
+ return ctx.html(/* @__PURE__ */ jsxRuntime.jsx("div", {}), 200, {
2642
+ "HX-Redirect": adminContext.redirectUrl
2643
+ });
2639
2644
  }
2640
2645
  const target = adminContext.isDialog ? "#dialog-container" : "#main-content";
2641
2646
  const swap = adminContext.isDialog ? "innerHTML" : "outerHTML";
package/dist/index.mjs CHANGED
@@ -2619,6 +2619,9 @@ var RouteHandler = class {
2619
2619
  }
2620
2620
  }
2621
2621
  renderFullPage(ctx, adminContext) {
2622
+ if (adminContext.redirectUrl) {
2623
+ return ctx.redirect(adminContext.redirectUrl);
2624
+ }
2622
2625
  const useAdminLayout = this.moduleOptions.useAdminLayout !== false;
2623
2626
  return ctx.html(
2624
2627
  /* @__PURE__ */ jsx(
@@ -2633,7 +2636,9 @@ var RouteHandler = class {
2633
2636
  }
2634
2637
  renderFragment(ctx, adminContext) {
2635
2638
  if (adminContext.redirectUrl) {
2636
- return ctx.redirect(adminContext.redirectUrl);
2639
+ return ctx.html(/* @__PURE__ */ jsx("div", {}), 200, {
2640
+ "HX-Redirect": adminContext.redirectUrl
2641
+ });
2637
2642
  }
2638
2643
  const target = adminContext.isDialog ? "#dialog-container" : "#main-content";
2639
2644
  const swap = adminContext.isDialog ? "innerHTML" : "outerHTML";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imean-service-engine-htmx-plugin",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "HtmxAdminPlugin for IMean Service Engine",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",