@pablo2410/shared-ui 0.9.3 → 0.9.4

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.
@@ -1,5 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React__default, { ReactNode, CSSProperties } from 'react';
3
+ import { C as CrossServiceLink } from './crossNav-Bd8-0qoi.js';
3
4
 
4
5
  /**
5
6
  * SharedSidebar — Config-driven sidebar component for all Oplytics subdomains.
@@ -145,6 +146,10 @@ interface DashboardLayoutProps {
145
146
  isActive?: (itemPath: string, activePath: string) => boolean;
146
147
  /** URL for the "← Service Hub" link at the top of the nav (full-page nav). */
147
148
  serviceHubUrl?: string;
149
+ /** Direct links to sibling services, rendered under the Service Hub link.
150
+ * Build with `buildCrossServiceLinks` (services/crossNav) so provisioning
151
+ * gating and the ?oh= hierarchy carry-over are handled consistently. */
152
+ crossServiceLinks?: CrossServiceLink[];
148
153
  /** Footer "Settings" route. Omit to hide the footer. */
149
154
  settingsPath?: string;
150
155
  /** Authenticated user (drives the header user menu). */
@@ -185,6 +190,14 @@ interface DashboardLayoutProps {
185
190
  }
186
191
  declare function DashboardLayout(props: DashboardLayoutProps): react_jsx_runtime.JSX.Element;
187
192
 
193
+ interface CrossServiceNavProps {
194
+ /** Display-ready links from buildCrossServiceLinks. Renders nothing when empty. */
195
+ links: CrossServiceLink[];
196
+ /** Section label above the links (hidden when the sidebar is collapsed). */
197
+ label?: string;
198
+ }
199
+ declare function CrossServiceNav({ links, label, }: CrossServiceNavProps): react_jsx_runtime.JSX.Element | null;
200
+
188
201
  interface HealthFooterUser {
189
202
  /** JWT role string (e.g. "platform_admin"). */
190
203
  role?: string;
@@ -216,4 +229,4 @@ interface HealthFooterProps {
216
229
  }
217
230
  declare function HealthFooter({ user, enterprise, className, style, buildVersion, buildDate, commitHash, }: HealthFooterProps): react_jsx_runtime.JSX.Element;
218
231
 
219
- export { DashboardLayout as D, HealthFooter as H, type MenuItem as M, type SharedSidebarConfig as S, type DashboardLayoutEnterprise as a, type DashboardLayoutProps as b, type DashboardLayoutUser as c, type HealthFooterEnterprise as d, type HealthFooterProps as e, type HealthFooterUser as f, type MenuSection as g, type SharedSidebarProps as h, getInitials as i, isAdminRole as j, isMenuItemActive as k, useSidebarResize as u };
232
+ export { CrossServiceNav as C, DashboardLayout as D, HealthFooter as H, type MenuItem as M, type SharedSidebarConfig as S, type DashboardLayoutEnterprise as a, type DashboardLayoutProps as b, type DashboardLayoutUser as c, type CrossServiceNavProps as d, type HealthFooterEnterprise as e, type HealthFooterProps as f, type HealthFooterUser as g, type MenuSection as h, type SharedSidebarProps as i, getInitials as j, isAdminRole as k, isMenuItemActive as l, useSidebarResize as u };
@@ -0,0 +1,112 @@
1
+ import {
2
+ ORG_HIERARCHY_EMPTY
3
+ } from "./chunk-PS4K7FKB.js";
4
+
5
+ // src/hierarchy/selectionParams.ts
6
+ var ORG_HIERARCHY_PARAM = "oh";
7
+ function serializeSelectionParam(selection) {
8
+ if (!selection.enterprise) return null;
9
+ const ids = [selection.enterprise.id];
10
+ for (const node of [
11
+ selection.businessUnit,
12
+ selection.site,
13
+ selection.area,
14
+ selection.asset
15
+ ]) {
16
+ if (!node) break;
17
+ ids.push(node.id);
18
+ }
19
+ return ids.join(".");
20
+ }
21
+ function parseSelectionParam(value) {
22
+ const segments = value.split(".");
23
+ if (segments.length === 0 || segments.length > 5) return null;
24
+ const ids = [];
25
+ for (const seg of segments) {
26
+ if (!/^\d+$/.test(seg)) return null;
27
+ const n = Number(seg);
28
+ if (!Number.isSafeInteger(n) || n <= 0) return null;
29
+ ids.push(n);
30
+ }
31
+ return {
32
+ enterpriseId: ids[0] ?? null,
33
+ businessUnitId: ids[1] ?? null,
34
+ siteId: ids[2] ?? null,
35
+ areaId: ids[3] ?? null,
36
+ assetId: ids[4] ?? null
37
+ };
38
+ }
39
+ function appendSelectionParam(url, selection) {
40
+ const value = selection ? serializeSelectionParam(selection) : null;
41
+ if (!value) return url;
42
+ try {
43
+ const parsed = new URL(url);
44
+ parsed.searchParams.set(ORG_HIERARCHY_PARAM, value);
45
+ return parsed.toString();
46
+ } catch {
47
+ return url;
48
+ }
49
+ }
50
+ function readSelectionParamFromLocation() {
51
+ if (typeof window === "undefined") return null;
52
+ const value = new URLSearchParams(window.location.search).get(
53
+ ORG_HIERARCHY_PARAM
54
+ );
55
+ return value ? parseSelectionParam(value) : null;
56
+ }
57
+ function stripSelectionParamFromLocation() {
58
+ if (typeof window === "undefined") return;
59
+ const params = new URLSearchParams(window.location.search);
60
+ if (!params.has(ORG_HIERARCHY_PARAM)) return;
61
+ params.delete(ORG_HIERARCHY_PARAM);
62
+ const query = params.toString();
63
+ const next = window.location.pathname + (query ? `?${query}` : "") + window.location.hash;
64
+ window.history.replaceState(window.history.state, "", next);
65
+ }
66
+ function resolveSelectionFromIds(ids, hierarchy) {
67
+ const selection = { ...ORG_HIERARCHY_EMPTY };
68
+ const enterprise = ids.enterpriseId ? hierarchy.enterprises.find((e) => e.id === ids.enterpriseId) : void 0;
69
+ if (!enterprise) return selection;
70
+ selection.enterprise = {
71
+ id: enterprise.id,
72
+ name: enterprise.name,
73
+ code: enterprise.code
74
+ };
75
+ const businessUnit = ids.businessUnitId ? hierarchy.businessUnits.find(
76
+ (bu) => bu.id === ids.businessUnitId && bu.enterpriseId === enterprise.id
77
+ ) : void 0;
78
+ if (ids.businessUnitId && !businessUnit) return selection;
79
+ if (businessUnit) {
80
+ selection.businessUnit = {
81
+ id: businessUnit.id,
82
+ name: businessUnit.name,
83
+ code: businessUnit.code
84
+ };
85
+ }
86
+ const site = ids.siteId ? hierarchy.sites.find(
87
+ (s) => s.id === ids.siteId && s.enterpriseId === enterprise.id && (!businessUnit || s.businessUnitId === businessUnit.id)
88
+ ) : void 0;
89
+ if (!site) return selection;
90
+ selection.site = { id: site.id, name: site.name, code: site.code };
91
+ const area = ids.areaId ? hierarchy.areas.find((a) => a.id === ids.areaId && a.siteId === site.id) : void 0;
92
+ if (!area) return selection;
93
+ selection.area = { id: area.id, name: area.name, code: area.code };
94
+ const asset = ids.assetId ? hierarchy.assets.find(
95
+ (a) => a.id === ids.assetId && a.areaId === area.id
96
+ ) : void 0;
97
+ if (asset) {
98
+ selection.asset = { id: asset.id, name: asset.name, code: asset.code };
99
+ }
100
+ return selection;
101
+ }
102
+
103
+ export {
104
+ ORG_HIERARCHY_PARAM,
105
+ serializeSelectionParam,
106
+ parseSelectionParam,
107
+ appendSelectionParam,
108
+ readSelectionParamFromLocation,
109
+ stripSelectionParamFromLocation,
110
+ resolveSelectionFromIds
111
+ };
112
+ //# sourceMappingURL=chunk-3E3GLIQV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/hierarchy/selectionParams.ts"],"sourcesContent":["/**\n * selectionParams — serialize/deserialize the org-hierarchy selection through\n * a URL query param so it can travel across subdomains (cross-service links).\n *\n * Format: ?oh=<entId>.<buId>.<siteId>.<areaId>.<assetId>, dot-joined ids\n * top-down, truncated at the first unselected level (the cascade setters\n * guarantee the selection is always a contiguous chain, so no gaps occur).\n * e.g. ?oh=3.7.12 = enterprise 3 > business unit 7 > site 12.\n *\n * Node ids come from the Portal DB and are identical across every service,\n * which is what makes this transport valid.\n */\nimport type {\n OrgHierarchyData,\n OrgHierarchySelection,\n} from \"./orgHierarchy\";\nimport { ORG_HIERARCHY_EMPTY } from \"./orgHierarchy\";\n\n/** Query-param key carrying the org-hierarchy selection between services. */\nexport const ORG_HIERARCHY_PARAM = \"oh\";\n\n/** Selection expressed as raw ids (what the URL param decodes to). */\nexport interface OrgSelectionIds {\n enterpriseId: number | null;\n businessUnitId: number | null;\n siteId: number | null;\n areaId: number | null;\n assetId: number | null;\n}\n\n/**\n * Serialize a selection to the compact param value.\n * Returns null when there is nothing meaningful to carry (no enterprise).\n */\nexport function serializeSelectionParam(\n selection: OrgHierarchySelection,\n): string | null {\n if (!selection.enterprise) return null;\n const ids: number[] = [selection.enterprise.id];\n for (const node of [\n selection.businessUnit,\n selection.site,\n selection.area,\n selection.asset,\n ]) {\n if (!node) break; // contiguous chain — stop at the first unselected level\n ids.push(node.id);\n }\n return ids.join(\".\");\n}\n\n/**\n * Parse a param value back to ids. Returns null for anything malformed\n * (empty, non-numeric, negative, or too many segments).\n */\nexport function parseSelectionParam(value: string): OrgSelectionIds | null {\n const segments = value.split(\".\");\n if (segments.length === 0 || segments.length > 5) return null;\n const ids: number[] = [];\n for (const seg of segments) {\n if (!/^\\d+$/.test(seg)) return null;\n const n = Number(seg);\n if (!Number.isSafeInteger(n) || n <= 0) return null;\n ids.push(n);\n }\n return {\n enterpriseId: ids[0] ?? null,\n businessUnitId: ids[1] ?? null,\n siteId: ids[2] ?? null,\n areaId: ids[3] ?? null,\n assetId: ids[4] ?? null,\n };\n}\n\n/**\n * Append the selection param to an absolute URL (used when building\n * cross-service links). Returns the URL unchanged when there is no selection\n * or the URL is unparseable.\n */\nexport function appendSelectionParam(\n url: string,\n selection: OrgHierarchySelection | null | undefined,\n): string {\n const value = selection ? serializeSelectionParam(selection) : null;\n if (!value) return url;\n try {\n const parsed = new URL(url);\n parsed.searchParams.set(ORG_HIERARCHY_PARAM, value);\n return parsed.toString();\n } catch {\n return url;\n }\n}\n\n/** Read (without modifying) the selection param from the current location. */\nexport function readSelectionParamFromLocation(): OrgSelectionIds | null {\n if (typeof window === \"undefined\") return null;\n const value = new URLSearchParams(window.location.search).get(\n ORG_HIERARCHY_PARAM,\n );\n return value ? parseSelectionParam(value) : null;\n}\n\n/**\n * Remove ONLY the selection param from the address bar (history.replaceState),\n * preserving every other query param and the hash.\n */\nexport function stripSelectionParamFromLocation(): void {\n if (typeof window === \"undefined\") return;\n const params = new URLSearchParams(window.location.search);\n if (!params.has(ORG_HIERARCHY_PARAM)) return;\n params.delete(ORG_HIERARCHY_PARAM);\n const query = params.toString();\n const next =\n window.location.pathname +\n (query ? `?${query}` : \"\") +\n window.location.hash;\n window.history.replaceState(window.history.state, \"\", next);\n}\n\n/**\n * Resolve raw ids against the (already enterprise-scoped) hierarchy data,\n * validating existence AND parent-child integrity level by level. Returns the\n * deepest valid prefix as full nodes; an invalid enterprise yields the empty\n * selection so callers fall back to their normal default behaviour.\n */\nexport function resolveSelectionFromIds(\n ids: OrgSelectionIds,\n hierarchy: OrgHierarchyData,\n): OrgHierarchySelection {\n const selection: OrgHierarchySelection = { ...ORG_HIERARCHY_EMPTY };\n\n const enterprise = ids.enterpriseId\n ? hierarchy.enterprises.find((e) => e.id === ids.enterpriseId)\n : undefined;\n if (!enterprise) return selection;\n selection.enterprise = {\n id: enterprise.id,\n name: enterprise.name,\n code: enterprise.code,\n };\n\n const businessUnit = ids.businessUnitId\n ? hierarchy.businessUnits.find(\n (bu) => bu.id === ids.businessUnitId && bu.enterpriseId === enterprise.id,\n )\n : undefined;\n // A provided-but-invalid id breaks the chain: everything below it is\n // discarded so the result is always a contiguous, internally consistent\n // prefix of the requested selection.\n if (ids.businessUnitId && !businessUnit) return selection;\n if (businessUnit) {\n selection.businessUnit = {\n id: businessUnit.id,\n name: businessUnit.name,\n code: businessUnit.code,\n };\n }\n\n const site = ids.siteId\n ? hierarchy.sites.find(\n (s) =>\n s.id === ids.siteId &&\n s.enterpriseId === enterprise.id &&\n (!businessUnit || s.businessUnitId === businessUnit.id),\n )\n : undefined;\n if (!site) return selection;\n selection.site = { id: site.id, name: site.name, code: site.code };\n\n const area = ids.areaId\n ? hierarchy.areas.find((a) => a.id === ids.areaId && a.siteId === site.id)\n : undefined;\n if (!area) return selection;\n selection.area = { id: area.id, name: area.name, code: area.code };\n\n const asset = ids.assetId\n ? hierarchy.assets.find(\n (a) => a.id === ids.assetId && a.areaId === area.id,\n )\n : undefined;\n if (asset) {\n selection.asset = { id: asset.id, name: asset.name, code: asset.code };\n }\n\n return selection;\n}\n"],"mappings":";;;;;AAmBO,IAAM,sBAAsB;AAe5B,SAAS,wBACd,WACe;AACf,MAAI,CAAC,UAAU,WAAY,QAAO;AAClC,QAAM,MAAgB,CAAC,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O,IAAI,SACb,UAAU,MAAM,KAAK,CAAC,MAAM,EAAE,OAAO,IAAI,UAAU,EAAE,WAAW,KAAK,EAAE,IACvE;AACJ,MAAI,CAAC,KAAM,QAAO;AAClB,YAAU,OAAO,EAAE,IAAI,KAAK,IAAI,MAAM,KAAK,MAAM,MAAM,KAAK,KAAK;AAEjE,QAAM,QAAQ,IAAI,UACd,UAAU,OAAO;AAAA,IACf,CAAC,MAAM,EAAE,OAAO,IAAI,WAAW,EAAE,WAAW,KAAK;AAAA,EACnD,IACA;AACJ,MAAI,OAAO;AACT,cAAU,QAAQ,EAAE,IAAI,MAAM,IAAI,MAAM,MAAM,MAAM,MAAM,MAAM,KAAK;AAAA,EACvE;AAEA,SAAO;AACT;","names":[]}
@@ -1,33 +1,3 @@
1
- // src/hierarchy/orgHierarchy.ts
2
- var ORG_HIERARCHY_EMPTY = {
3
- enterprise: null,
4
- businessUnit: null,
5
- site: null,
6
- area: null,
7
- asset: null
8
- };
9
- var ORG_HIERARCHY_DATA_EMPTY = {
10
- enterprises: [],
11
- businessUnits: [],
12
- sites: [],
13
- areas: [],
14
- assets: []
15
- };
16
- var ORG_HIERARCHY_LEVELS = [
17
- "enterprise",
18
- "businessUnit",
19
- "site",
20
- "area",
21
- "asset"
22
- ];
23
- var ORG_HIERARCHY_LABELS = {
24
- enterprise: "Enterprise",
25
- businessUnit: "Business Unit",
26
- site: "Site",
27
- area: "Area",
28
- asset: "Asset"
29
- };
30
-
31
1
  // src/hierarchy/enterpriseOverride.ts
32
2
  var ACTIVE_ENTERPRISE_COOKIE = "oplytics-active-enterprise";
33
3
  function parseCookieValue(cookieHeader, name) {
@@ -64,12 +34,8 @@ function scopeHierarchyToEnterprise(data, enterpriseId) {
64
34
  }
65
35
 
66
36
  export {
67
- ORG_HIERARCHY_EMPTY,
68
- ORG_HIERARCHY_DATA_EMPTY,
69
- ORG_HIERARCHY_LEVELS,
70
- ORG_HIERARCHY_LABELS,
71
37
  ACTIVE_ENTERPRISE_COOKIE,
72
38
  applyEnterpriseOverride,
73
39
  scopeHierarchyToEnterprise
74
40
  };
75
- //# sourceMappingURL=chunk-NXSFRNI7.js.map
41
+ //# sourceMappingURL=chunk-3G43UG63.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/hierarchy/enterpriseOverride.ts","../src/hierarchy/scopeHierarchy.ts"],"sourcesContent":["/**\n * Enterprise Override — shared helper for platform_admin enterprise switching.\n *\n * When a platform_admin switches enterprise in the Portal UI, a cookie\n * `oplytics-active-enterprise` is set with the selected enterprise ID.\n * This cookie is shared across all *.oplytics.digital subdomains.\n *\n * Each subdomain's createContext should call applyEnterpriseOverride()\n * to override the user's DB-stored enterpriseId with the cookie value.\n *\n * Used by: Portal, SQDCP, OEE Manager, Action Manager, Business Hub, Connect\n */\n\n/**\n * Cookie name for the platform_admin active enterprise override.\n * Shared across all *.oplytics.digital subdomains via the .oplytics.digital domain.\n */\nexport const ACTIVE_ENTERPRISE_COOKIE = \"oplytics-active-enterprise\";\n\n/**\n * Parse a single cookie value from a cookie header string.\n */\nfunction parseCookieValue(cookieHeader: string, name: string): string | null {\n const match = cookieHeader\n .split(\";\")\n .map((c) => c.trim())\n .find((c) => c.startsWith(`${name}=`));\n if (!match) return null;\n return decodeURIComponent(match.slice(name.length + 1));\n}\n\n/**\n * Apply the enterprise override for platform_admin users.\n *\n * If the user is a platform_admin and has the active enterprise cookie set,\n * returns a shallow copy of the user with the overridden enterpriseId.\n * Otherwise returns the user unchanged.\n *\n * @param user - The authenticated user (or null)\n * @param cookieHeader - The raw Cookie header string from the request\n * @returns The user with potentially overridden enterpriseId\n */\nexport function applyEnterpriseOverride<\n T extends { role: string; enterpriseId?: number | null },\n>(user: T | null, cookieHeader: string): T | null {\n if (!user || user.role !== \"platform_admin\") return user;\n\n const activeEnterprise = parseCookieValue(\n cookieHeader,\n ACTIVE_ENTERPRISE_COOKIE,\n );\n if (!activeEnterprise) return user;\n\n const parsedId = parseInt(activeEnterprise, 10);\n if (isNaN(parsedId) || parsedId <= 0) return user;\n\n // Return a shallow copy with the overridden enterpriseId\n return { ...user, enterpriseId: parsedId };\n}\n","/**\n * scopeHierarchyToEnterprise — the single source of truth for enterprise isolation.\n *\n * The Portal Service API (`GET /api/service/hierarchy`) is called with a\n * platform-level service key, so it returns every enterprise's hierarchy. This\n * function filters that payload down to ONE enterprise before it reaches a\n * subdomain client. It is pure and isomorphic (no I/O), so the same rule runs in\n * the fetch service, in tests, and anywhere else scoping is needed.\n *\n * Policy (deliberate — do not \"helpfully\" relax it):\n * - `null` data → empty hierarchy.\n * - `null` enterpriseId → empty hierarchy. Enterprise selection is owned solely\n * by the Portal switcher; a caller with no resolved enterprise (e.g. a\n * platform admin who hasn't picked one in Portal yet) sees nothing until they\n * select. Every non-admin always has exactly one enterprise, so they are\n * unaffected. Admin/Portal tooling that genuinely needs the full tree must use\n * the unscoped fetch, never this function.\n */\nimport type { OrgHierarchyData } from \"./orgHierarchy\";\n\nexport function scopeHierarchyToEnterprise(\n data: OrgHierarchyData | null,\n enterpriseId: number | null,\n): OrgHierarchyData {\n if (!data || enterpriseId === null) {\n return { enterprises: [], businessUnits: [], sites: [], areas: [], assets: [] };\n }\n\n const sites = data.sites.filter((s) => s.enterpriseId === enterpriseId);\n const siteIds = new Set(sites.map((s) => s.id));\n\n return {\n enterprises: data.enterprises.filter((e) => e.id === enterpriseId),\n businessUnits: data.businessUnits.filter((bu) => bu.enterpriseId === enterpriseId),\n sites,\n areas: data.areas.filter((a) => siteIds.has(a.siteId)),\n assets: data.assets.filter((a) => siteIds.has(a.siteId)),\n };\n}\n"],"mappings":";AAiBO,IAAM,2BAA2B;AAKxC,SAAS,iBAAiB,cAAsB,MAA6B;AAC3E,QAAM,QAAQ,aACX,MAAM,GAAG,EACT,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,EACnB,KAAK,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,GAAG,CAAC;AACvC,MAAI,CAAC,MAAO,QAAO;AACnB,SAAO,mBAAmB,MAAM,MAAM,KAAK,SAAS,CAAC,CAAC;AACxD;AAaO,SAAS,wBAEd,MAAgB,cAAgC;AAChD,MAAI,CAAC,QAAQ,KAAK,SAAS,iBAAkB,QAAO;AAEpD,QAAM,mBAAmB;AAAA,IACvB;AAAA,IACA;AAAA,EACF;AACA,MAAI,CAAC,iBAAkB,QAAO;AAE9B,QAAM,WAAW,SAAS,kBAAkB,EAAE;AAC9C,MAAI,MAAM,QAAQ,KAAK,YAAY,EAAG,QAAO;AAG7C,SAAO,EAAE,GAAG,MAAM,cAAc,SAAS;AAC3C;;;ACtCO,SAAS,2BACd,MACA,cACkB;AAClB,MAAI,CAAC,QAAQ,iBAAiB,MAAM;AAClC,WAAO,EAAE,aAAa,CAAC,GAAG,eAAe,CAAC,GAAG,OAAO,CAAC,GAAG,OAAO,CAAC,GAAG,QAAQ,CAAC,EAAE;AAAA,EAChF;AAEA,QAAM,QAAQ,KAAK,MAAM,OAAO,CAAC,MAAM,EAAE,iBAAiB,YAAY;AACtE,QAAM,UAAU,IAAI,IAAI,MAAM,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;AAE9C,SAAO;AAAA,IACL,aAAa,KAAK,YAAY,OAAO,CAAC,MAAM,EAAE,OAAO,YAAY;AAAA,IACjE,eAAe,KAAK,cAAc,OAAO,CAAC,OAAO,GAAG,iBAAiB,YAAY;AAAA,IACjF;AAAA,IACA,OAAO,KAAK,MAAM,OAAO,CAAC,MAAM,QAAQ,IAAI,EAAE,MAAM,CAAC;AAAA,IACrD,QAAQ,KAAK,OAAO,OAAO,CAAC,MAAM,QAAQ,IAAI,EAAE,MAAM,CAAC;AAAA,EACzD;AACF;","names":[]}
@@ -0,0 +1,159 @@
1
+ import {
2
+ appendSelectionParam
3
+ } from "./chunk-3E3GLIQV.js";
4
+
5
+ // src/services/catalog.ts
6
+ var SERVICE_CATALOG = [
7
+ // ─── CORE SERVICES ───
8
+ {
9
+ slug: "policy-deployment",
10
+ name: "Policy Deployment",
11
+ tagline: "Align strategy to execution",
12
+ description: "Hoshin Kanri and X-matrix planning. Cascade strategic objectives through every level of your organisation with live tracking and bowling charts.",
13
+ icon: "Target",
14
+ accentColor: "#F59E0B",
15
+ status: "live",
16
+ category: "core",
17
+ subdomain: "policydeployment.oplytics.digital"
18
+ },
19
+ {
20
+ slug: "sqdcp",
21
+ name: "SQDCP Dashboard",
22
+ tagline: "Daily management boards, digitised",
23
+ description: "Digital SQDCP boards that drive daily accountability. Safety, Quality, Delivery, Cost, and People metrics at a glance for every team.",
24
+ icon: "LayoutGrid",
25
+ accentColor: "#1DB8CE",
26
+ status: "live",
27
+ category: "core",
28
+ subdomain: "sqdcp.oplytics.digital"
29
+ },
30
+ {
31
+ slug: "oee-manager",
32
+ name: "OEE Manager",
33
+ tagline: "Real-time equipment effectiveness tracking",
34
+ description: "Monitor Overall Equipment Effectiveness in real-time. Track availability, performance, and quality metrics across your entire production line.",
35
+ icon: "Gauge",
36
+ accentColor: "#8C34E9",
37
+ status: "live",
38
+ category: "core",
39
+ subdomain: "oeemanager.oplytics.digital"
40
+ },
41
+ {
42
+ slug: "action-manager",
43
+ name: "Action Manager",
44
+ tagline: "Track every action to closure",
45
+ description: "Capture, assign, and track corrective and preventive actions from any source. Ensure nothing falls through the cracks.",
46
+ icon: "ClipboardCheck",
47
+ accentColor: "#22C55E",
48
+ status: "live",
49
+ category: "core",
50
+ subdomain: "actionmanager.oplytics.digital"
51
+ },
52
+ {
53
+ slug: "connect",
54
+ name: "OplyticsConnect",
55
+ tagline: "Integrate machines, sensors, and systems",
56
+ description: "Industrial IoT connectivity layer. Connect PLCs, sensors, and legacy systems to the Oplytics platform with zero-code configuration.",
57
+ icon: "Plug",
58
+ accentColor: "#1DB8CE",
59
+ status: "in-development",
60
+ category: "core",
61
+ subdomain: "connect.oplytics.digital"
62
+ },
63
+ // ─── HUB SERVICES ───
64
+ {
65
+ slug: "safety-manager",
66
+ name: "Safety Manager",
67
+ tagline: "Proactive safety culture, powered by data",
68
+ description: "Incident reporting, hazard tracking, safety observations, and compliance management in one unified platform.",
69
+ icon: "Shield",
70
+ accentColor: "#EF4444",
71
+ status: "coming-soon",
72
+ category: "hub",
73
+ subdomain: "safetymanager.oplytics.digital"
74
+ },
75
+ {
76
+ slug: "quality-manager",
77
+ name: "Quality Manager",
78
+ tagline: "End-to-end quality assurance",
79
+ description: "Non-conformance tracking, CAPA management, audit scheduling, and quality metrics dashboards.",
80
+ icon: "CheckCircle",
81
+ accentColor: "#22C55E",
82
+ status: "coming-soon",
83
+ category: "hub",
84
+ subdomain: null
85
+ },
86
+ {
87
+ slug: "certification-manager",
88
+ name: "Certification Manager",
89
+ tagline: "Stay audit-ready, always",
90
+ description: "Manage ISO, IATF, and other certification requirements. Document control, audit trails, and compliance tracking.",
91
+ icon: "Award",
92
+ accentColor: "#F97316",
93
+ status: "coming-soon",
94
+ category: "hub",
95
+ subdomain: null
96
+ }
97
+ ];
98
+ var coreServices = SERVICE_CATALOG.filter(
99
+ (s) => s.category === "core"
100
+ );
101
+ var hubServices = SERVICE_CATALOG.filter((s) => s.category === "hub");
102
+ var liveServices = SERVICE_CATALOG.filter(
103
+ (s) => s.status === "live"
104
+ );
105
+ var inDevServices = SERVICE_CATALOG.filter(
106
+ (s) => s.status === "in-development"
107
+ );
108
+ var comingSoonServices = SERVICE_CATALOG.filter(
109
+ (s) => s.status === "coming-soon"
110
+ );
111
+ function getServiceBySlug(slug) {
112
+ return SERVICE_CATALOG.find((s) => s.slug === slug);
113
+ }
114
+ function getServiceUrl(service) {
115
+ if (service.subdomain) {
116
+ return `https://${service.subdomain}`;
117
+ }
118
+ return null;
119
+ }
120
+
121
+ // src/services/crossNav.ts
122
+ var ADMIN_SEE_ALL_ROLES = ["platform_admin", "enterprise_admin"];
123
+ var SLUG_ALIASES = {
124
+ "sqdcp-logic": "sqdcp"
125
+ };
126
+ function normalizeServiceSlug(slug) {
127
+ return SLUG_ALIASES[slug] ?? slug;
128
+ }
129
+ function buildCrossServiceLinks(options) {
130
+ const { currentSlug, grantedSlugs, role, selection } = options;
131
+ const isAdmin = !!role && ADMIN_SEE_ALL_ROLES.includes(role);
132
+ const granted = new Set(grantedSlugs.map(normalizeServiceSlug));
133
+ const current = normalizeServiceSlug(currentSlug);
134
+ return SERVICE_CATALOG.filter(
135
+ (svc) => svc.status === "live" && svc.subdomain !== null && svc.slug !== current && (isAdmin || granted.has(svc.slug))
136
+ ).map((svc) => ({
137
+ slug: svc.slug,
138
+ name: svc.name,
139
+ icon: svc.icon,
140
+ accentColor: svc.accentColor,
141
+ url: appendSelectionParam(getServiceUrl(svc), selection)
142
+ }));
143
+ }
144
+
145
+ export {
146
+ SERVICE_CATALOG,
147
+ coreServices,
148
+ hubServices,
149
+ liveServices,
150
+ inDevServices,
151
+ comingSoonServices,
152
+ getServiceBySlug,
153
+ getServiceUrl,
154
+ ADMIN_SEE_ALL_ROLES,
155
+ SLUG_ALIASES,
156
+ normalizeServiceSlug,
157
+ buildCrossServiceLinks
158
+ };
159
+ //# sourceMappingURL=chunk-HNOROBPK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/services/catalog.ts","../src/services/crossNav.ts"],"sourcesContent":["/**\n * Shared Service Catalog — Single source of truth for all Oplytics.digital services.\n *\n * Consumed by:\n * - oplytics-subdomains (ServiceHub.tsx) — service cards, access gating\n * - oplytics-marketing-site (services.ts) — marketing pages, hero sections\n *\n * Each consumer extends with context-specific fields locally:\n * - Platform adds: route, external URL, React icon component\n * - Marketing adds: heroImage, demoImage, problem, howItWorks, results, aiFeatures\n */\n\n// ---------------------------------------------------------------------------\n// Types\n// ---------------------------------------------------------------------------\n\nexport type ServiceStatus = \"live\" | \"in-development\" | \"coming-soon\";\nexport type ServiceCategory = \"core\" | \"hub\";\n\nexport interface ServiceDefinition {\n /** Unique identifier used for DB lookups, URL slugs, and cross-referencing */\n slug: string;\n /** Display name shown in cards, headers, and navigation */\n name: string;\n /** Short one-line value proposition */\n tagline: string;\n /** Longer description (1-2 sentences) for cards and summaries */\n description: string;\n /** Lucide icon name (string) — consumers resolve to component locally */\n icon: string;\n /** Hex accent color for cards, badges, and theming */\n accentColor: string;\n /** Current availability status */\n status: ServiceStatus;\n /** Core = standalone product, Hub = extension/add-on module */\n category: ServiceCategory;\n /** Subdomain hostname (without protocol) — null if hosted on portal */\n subdomain: string | null;\n}\n\n// ---------------------------------------------------------------------------\n// Catalog\n// ---------------------------------------------------------------------------\n\nexport const SERVICE_CATALOG: ServiceDefinition[] = [\n // ─── CORE SERVICES ───\n {\n slug: \"policy-deployment\",\n name: \"Policy Deployment\",\n tagline: \"Align strategy to execution\",\n description:\n \"Hoshin Kanri and X-matrix planning. Cascade strategic objectives through every level of your organisation with live tracking and bowling charts.\",\n icon: \"Target\",\n accentColor: \"#F59E0B\",\n status: \"live\",\n category: \"core\",\n subdomain: \"policydeployment.oplytics.digital\",\n },\n {\n slug: \"sqdcp\",\n name: \"SQDCP Dashboard\",\n tagline: \"Daily management boards, digitised\",\n description:\n \"Digital SQDCP boards that drive daily accountability. Safety, Quality, Delivery, Cost, and People metrics at a glance for every team.\",\n icon: \"LayoutGrid\",\n accentColor: \"#1DB8CE\",\n status: \"live\",\n category: \"core\",\n subdomain: \"sqdcp.oplytics.digital\",\n },\n {\n slug: \"oee-manager\",\n name: \"OEE Manager\",\n tagline: \"Real-time equipment effectiveness tracking\",\n description:\n \"Monitor Overall Equipment Effectiveness in real-time. Track availability, performance, and quality metrics across your entire production line.\",\n icon: \"Gauge\",\n accentColor: \"#8C34E9\",\n status: \"live\",\n category: \"core\",\n subdomain: \"oeemanager.oplytics.digital\",\n },\n {\n slug: \"action-manager\",\n name: \"Action Manager\",\n tagline: \"Track every action to closure\",\n description:\n \"Capture, assign, and track corrective and preventive actions from any source. Ensure nothing falls through the cracks.\",\n icon: \"ClipboardCheck\",\n accentColor: \"#22C55E\",\n status: \"live\",\n category: \"core\",\n subdomain: \"actionmanager.oplytics.digital\",\n },\n {\n slug: \"connect\",\n name: \"OplyticsConnect\",\n tagline: \"Integrate machines, sensors, and systems\",\n description:\n \"Industrial IoT connectivity layer. Connect PLCs, sensors, and legacy systems to the Oplytics platform with zero-code configuration.\",\n icon: \"Plug\",\n accentColor: \"#1DB8CE\",\n status: \"in-development\",\n category: \"core\",\n subdomain: \"connect.oplytics.digital\",\n },\n\n // ─── HUB SERVICES ───\n {\n slug: \"safety-manager\",\n name: \"Safety Manager\",\n tagline: \"Proactive safety culture, powered by data\",\n description:\n \"Incident reporting, hazard tracking, safety observations, and compliance management in one unified platform.\",\n icon: \"Shield\",\n accentColor: \"#EF4444\",\n status: \"coming-soon\",\n category: \"hub\",\n subdomain: \"safetymanager.oplytics.digital\",\n },\n {\n slug: \"quality-manager\",\n name: \"Quality Manager\",\n tagline: \"End-to-end quality assurance\",\n description:\n \"Non-conformance tracking, CAPA management, audit scheduling, and quality metrics dashboards.\",\n icon: \"CheckCircle\",\n accentColor: \"#22C55E\",\n status: \"coming-soon\",\n category: \"hub\",\n subdomain: null,\n },\n {\n slug: \"certification-manager\",\n name: \"Certification Manager\",\n tagline: \"Stay audit-ready, always\",\n description:\n \"Manage ISO, IATF, and other certification requirements. Document control, audit trails, and compliance tracking.\",\n icon: \"Award\",\n accentColor: \"#F97316\",\n status: \"coming-soon\",\n category: \"hub\",\n subdomain: null,\n },\n];\n\n// ---------------------------------------------------------------------------\n// Derived helpers\n// ---------------------------------------------------------------------------\n\nexport const coreServices = SERVICE_CATALOG.filter(\n (s) => s.category === \"core\",\n);\nexport const hubServices = SERVICE_CATALOG.filter((s) => s.category === \"hub\");\nexport const liveServices = SERVICE_CATALOG.filter(\n (s) => s.status === \"live\",\n);\nexport const inDevServices = SERVICE_CATALOG.filter(\n (s) => s.status === \"in-development\",\n);\nexport const comingSoonServices = SERVICE_CATALOG.filter(\n (s) => s.status === \"coming-soon\",\n);\n\nexport function getServiceBySlug(\n slug: string,\n): ServiceDefinition | undefined {\n return SERVICE_CATALOG.find((s) => s.slug === slug);\n}\n\nexport function getServiceUrl(service: ServiceDefinition): string | null {\n if (service.subdomain) {\n return `https://${service.subdomain}`;\n }\n return null;\n}\n","/**\n * crossNav — build the sidebar cross-service links (service → service jump\n * without going through the Portal Service Hub).\n *\n * Visibility mirrors the Portal ServiceHub rule: platform_admin and\n * enterprise_admin see every live service; everyone else only sees the\n * services granted in the portal `user_services` table. The current service\n * never links to itself. Each link URL carries the caller's current\n * org-hierarchy selection (?oh=…) so the breadcrumb arrives pre-aligned.\n */\nimport type { OrgHierarchySelection } from \"../hierarchy/orgHierarchy\";\nimport { appendSelectionParam } from \"../hierarchy/selectionParams\";\nimport { SERVICE_CATALOG, getServiceUrl } from \"./catalog\";\n\n/** Roles that see every live service regardless of individual grants. */\nexport const ADMIN_SEE_ALL_ROLES = [\"platform_admin\", \"enterprise_admin\"] as const;\n\n/**\n * Legacy grant slugs → canonical catalog slugs. Auto-provisioned accounts\n * were granted \"sqdcp-logic\" while the catalog slug is \"sqdcp\".\n */\nexport const SLUG_ALIASES: Record<string, string> = {\n \"sqdcp-logic\": \"sqdcp\",\n};\n\nexport function normalizeServiceSlug(slug: string): string {\n return SLUG_ALIASES[slug] ?? slug;\n}\n\n/** Display-ready cross-service link entry. */\nexport interface CrossServiceLink {\n slug: string;\n name: string;\n /** Lucide icon name from the service catalog (consumers resolve locally). */\n icon: string;\n accentColor: string;\n /** Absolute URL including the ?oh= hierarchy selection param. */\n url: string;\n}\n\nexport interface BuildCrossServiceLinksOptions {\n /** Catalog slug of the service doing the rendering (excluded from links). */\n currentSlug: string;\n /** Grant slugs from the portal (raw — aliases are normalized here). */\n grantedSlugs: string[];\n /** Portal role of the current user (drives the admin see-all rule). */\n role?: string | null;\n /** Current org-hierarchy selection to carry across (may be empty/null). */\n selection?: OrgHierarchySelection | null;\n}\n\nexport function buildCrossServiceLinks(\n options: BuildCrossServiceLinksOptions,\n): CrossServiceLink[] {\n const { currentSlug, grantedSlugs, role, selection } = options;\n\n const isAdmin =\n !!role && (ADMIN_SEE_ALL_ROLES as readonly string[]).includes(role);\n const granted = new Set(grantedSlugs.map(normalizeServiceSlug));\n const current = normalizeServiceSlug(currentSlug);\n\n return SERVICE_CATALOG.filter(\n (svc) =>\n svc.status === \"live\" &&\n svc.subdomain !== null &&\n svc.slug !== current &&\n (isAdmin || granted.has(svc.slug)),\n ).map((svc) => ({\n slug: svc.slug,\n name: svc.name,\n icon: svc.icon,\n accentColor: svc.accentColor,\n url: appendSelectionParam(getServiceUrl(svc)!, selection),\n }));\n}\n"],"mappings":";;;;;AA4CO,IAAM,kBAAuC;AAAA;AAAA,EAElD;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,aACE;AAAA,IACF,MAAM;AAAA,IACN,aAAa;AAAA,IACb,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,WAAW;AAAA,EACb;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,aACE;AAAA,IACF,MAAM;AAAA,IACN,aAAa;AAAA,IACb,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,WAAW;AAAA,EACb;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,aACE;AAAA,IACF,MAAM;AAAA,IACN,aAAa;AAAA,IACb,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,WAAW;AAAA,EACb;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,aACE;AAAA,IACF,MAAM;AAAA,IACN,aAAa;AAAA,IACb,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,WAAW;AAAA,EACb;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,aACE;AAAA,IACF,MAAM;AAAA,IACN,aAAa;AAAA,IACb,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,WAAW;AAAA,EACb;AAAA;AAAA,EAGA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