@getgreenline/blaze-ui 1.0.53 → 1.0.54

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.
@@ -26,6 +26,7 @@ declare const AppsConfig: readonly [{
26
26
  readonly name: "Settings";
27
27
  readonly logo: import("react/jsx-runtime").JSX.Element;
28
28
  readonly subdomain: "app";
29
+ readonly path: "/settings/shop";
29
30
  }, {
30
31
  readonly name: "Lighthouse";
31
32
  readonly logo: import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"header-app-switcher.d.ts","sourceRoot":"","sources":["../../src/components/header-app-switcher.tsx"],"names":[],"mappings":"AAyBA,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BN,CAAA;AAEV,KAAK,OAAO,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAA;AAClD,KAAK,YAAY,GAAG,WAAW,CAAC,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC,CAAA;AAiGzE,KAAK,sBAAsB,GAAG;IAC5B;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,2DAA2D;IAC3D,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,kEAAkE;IAClE,WAAW,CAAC,EAAE,YAAY,EAAE,CAAA;IAC5B,6CAA6C;IAC7C,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IACvB,2FAA2F;IAC3F,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAA;AAsBD,iBAAS,iBAAiB,CAAC,EACzB,UAAU,EACV,UAAqB,EACrB,WAAW,EACX,OAAO,EACP,WAAW,GACZ,EAAE,sBAAsB,2CA+FxB;AAED,OAAO,EACL,iBAAiB,EACjB,KAAK,sBAAsB,EAC3B,KAAK,OAAO,EACZ,KAAK,YAAY,GAClB,CAAA"}
1
+ {"version":3,"file":"header-app-switcher.d.ts","sourceRoot":"","sources":["../../src/components/header-app-switcher.tsx"],"names":[],"mappings":"AAyBA,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BN,CAAA;AAEV,KAAK,OAAO,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAA;AAClD,KAAK,YAAY,GAAG,WAAW,CAAC,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC,CAAA;AAoGzE,KAAK,sBAAsB,GAAG;IAC5B;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,2DAA2D;IAC3D,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,kEAAkE;IAClE,WAAW,CAAC,EAAE,YAAY,EAAE,CAAA;IAC5B,6CAA6C;IAC7C,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IACvB,2FAA2F;IAC3F,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAA;AAsBD,iBAAS,iBAAiB,CAAC,EACzB,UAAU,EACV,UAAqB,EACrB,WAAW,EACX,OAAO,EACP,WAAW,GACZ,EAAE,sBAAsB,2CAoGxB;AAED,OAAO,EACL,iBAAiB,EACjB,KAAK,sBAAsB,EAC3B,KAAK,OAAO,EACZ,KAAK,YAAY,GAClB,CAAA"}
@@ -25,6 +25,7 @@ const AppsConfig = [
25
25
  name: "Settings",
26
26
  logo: jsx(SettingsLogo, {}),
27
27
  subdomain: "app",
28
+ path: "/settings/shop",
28
29
  },
29
30
  {
30
31
  name: "Lighthouse",
@@ -97,10 +98,12 @@ const resolveHostInfo = (commonHost) => {
97
98
  host: "blaze.me",
98
99
  };
99
100
  };
100
- const buildAppUrl = (subdomain, base, ssoRedirect) => {
101
+ const buildAppUrl = (subdomain, base, ssoRedirect, path) => {
101
102
  if (!subdomain)
102
103
  return "#";
103
104
  const url = new URL(`${base.protocol}//${subdomain}.${base.host}`);
105
+ if (path)
106
+ url.pathname = path;
104
107
  if (ssoRedirect)
105
108
  url.searchParams.set("sso", "true");
106
109
  return url.toString();
@@ -130,7 +133,7 @@ function HeaderAppSwitcher({ commonHost, currentApp = "Retail", visibleApps, col
130
133
  return filtered.map((app) => ({
131
134
  ...app,
132
135
  isCurrent: currentApp === app.name,
133
- href: buildAppUrl(app.subdomain, base, ssoRedirect),
136
+ href: buildAppUrl(app.subdomain, base, ssoRedirect, "path" in app ? app.path : undefined),
134
137
  }));
135
138
  }, [commonHost, currentApp, visibleApps, ssoRedirect]);
136
139
  const resolvedColumns = columns ?? 3;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getgreenline/blaze-ui",
3
- "version": "1.0.53",
3
+ "version": "1.0.54",
4
4
  "type": "module",
5
5
  "dependencies": {
6
6
  "@base-ui/react": "^1.4.1",