@pablo2410/shared-ui 0.24.0 → 0.25.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/README.md +51 -0
- package/dist/{chunk-4QJMLQSH.js → chunk-7LI4Y6WT.js} +21 -2
- package/dist/chunk-7LI4Y6WT.js.map +1 -0
- package/dist/chunk-LUQAR6NB.js +1206 -0
- package/dist/chunk-LUQAR6NB.js.map +1 -0
- package/dist/{chunk-4ERWOH67.js → chunk-MGTOQY6O.js} +2 -2
- package/dist/{chunk-S4UQSTZN.js → chunk-UQUMDBCZ.js} +8 -2
- package/dist/chunk-UQUMDBCZ.js.map +1 -0
- package/dist/components/index.js +3 -3
- package/dist/hierarchy/index.js +1 -1
- package/dist/layout/index.js +4 -3
- package/dist/reporting/index.js +3 -3
- package/dist/services/index.d.ts +18 -2
- package/dist/services/index.js +2 -2
- package/dist/shell/index.js +5 -4
- package/dist/shell/index.js.map +1 -1
- package/dist/shell/oplytics-shell.css +1 -1
- package/dist/tour/index.d.ts +197 -1
- package/dist/tour/index.js +55 -601
- package/dist/tour/index.js.map +1 -1
- package/package.json +15 -9
- package/dist/chunk-4QJMLQSH.js.map +0 -1
- package/dist/chunk-S4UQSTZN.js.map +0 -1
- /package/dist/{chunk-4ERWOH67.js.map → chunk-MGTOQY6O.js.map} +0 -0
package/dist/services/index.d.ts
CHANGED
|
@@ -14,13 +14,29 @@ import '../orgHierarchy-Buky69YP.js';
|
|
|
14
14
|
* code change here.
|
|
15
15
|
*
|
|
16
16
|
* Outside a browser (SSR, tests) or on hosts with no parent domain
|
|
17
|
-
* (
|
|
17
|
+
* (raw IPs) the canonical production domain is used.
|
|
18
|
+
*
|
|
19
|
+
* The local MacBook sandbox (docker-compose.sandbox.yml) is a special case:
|
|
20
|
+
* every app is served from bare `localhost` on a fixed port per service,
|
|
21
|
+
* not from sibling subdomains — so there is no domain to derive from the
|
|
22
|
+
* hostname the way there is for sandbox-*.oplyticsdigital.net (the tunnel
|
|
23
|
+
* variant) or real subdomains. Without this map, any cross-service link
|
|
24
|
+
* built from `localhost` silently fell back to production (see incident:
|
|
25
|
+
* Business Hub's sidebar link sent an authenticated sandbox user to
|
|
26
|
+
* businesshub.oplyticsdigital.net instead of localhost:3004). This list
|
|
27
|
+
* must be kept in sync with the port assignments in each sandbox compose
|
|
28
|
+
* file — there is currently no single generated source for both.
|
|
18
29
|
*/
|
|
19
30
|
declare const DEFAULT_PLATFORM_DOMAIN = "oplyticsdigital.net";
|
|
20
31
|
declare function getPlatformDomain(): string;
|
|
21
32
|
/**
|
|
22
|
-
* Absolute
|
|
33
|
+
* Absolute URL for a service subdomain label on the current platform
|
|
23
34
|
* domain, e.g. `platformUrl("sqdcp")` → `https://sqdcp.oplyticsdigital.net`.
|
|
35
|
+
*
|
|
36
|
+
* On the local sandbox (hostname === "localhost"), resolves instead to
|
|
37
|
+
* `http://localhost:<port>` using SANDBOX_LOCALHOST_PORTS, so cross-service
|
|
38
|
+
* links (e.g. Portal's sidebar → Business Hub) stay local instead of
|
|
39
|
+
* silently jumping to production.
|
|
24
40
|
*/
|
|
25
41
|
declare function platformUrl(subdomainLabel: string, path?: string): string;
|
|
26
42
|
/** Portal URL builder — the portal always lives at the `portal` label. */
|
package/dist/services/index.js
CHANGED
|
@@ -12,13 +12,13 @@ import {
|
|
|
12
12
|
liveServices,
|
|
13
13
|
normalizeServiceSlug,
|
|
14
14
|
onboardingTourServices
|
|
15
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-MGTOQY6O.js";
|
|
16
16
|
import {
|
|
17
17
|
DEFAULT_PLATFORM_DOMAIN,
|
|
18
18
|
getPlatformDomain,
|
|
19
19
|
platformUrl,
|
|
20
20
|
portalUrl
|
|
21
|
-
} from "../chunk-
|
|
21
|
+
} from "../chunk-7LI4Y6WT.js";
|
|
22
22
|
import "../chunk-DMUQ5WNO.js";
|
|
23
23
|
import "../chunk-HLMIR5UV.js";
|
|
24
24
|
export {
|
package/dist/shell/index.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildCrossServiceLinks
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-MGTOQY6O.js";
|
|
4
4
|
import {
|
|
5
5
|
CrossServiceNav,
|
|
6
6
|
DashboardLayout,
|
|
7
7
|
HealthFooter
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
8
|
+
} from "../chunk-UQUMDBCZ.js";
|
|
9
|
+
import "../chunk-LUQAR6NB.js";
|
|
10
|
+
import "../chunk-7LI4Y6WT.js";
|
|
10
11
|
import "../chunk-RSFGV7CG.js";
|
|
11
12
|
import "../chunk-DMUQ5WNO.js";
|
|
12
13
|
import "../chunk-A6UTXAPS.js";
|
|
13
14
|
import "../chunk-HLMIR5UV.js";
|
|
14
15
|
import "../chunk-JEHQIJS2.js";
|
|
15
|
-
import "../chunk-JT3XLKKD.js";
|
|
16
16
|
import "../chunk-BKGUIIN2.js";
|
|
17
|
+
import "../chunk-JT3XLKKD.js";
|
|
17
18
|
|
|
18
19
|
// src/shell/index.ts
|
|
19
20
|
var OplyticsServiceShell = DashboardLayout;
|
package/dist/shell/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/shell/index.ts"],"sourcesContent":["/**\n * @pablo2410/shared-ui/shell — Oplytics Service Shell\n *\n * The single composed chrome (sidebar + header + breadcrumb + reporting +\n * footer + user menu) used by every Oplytics subdomain. Subdomains become\n * a ~50-line adapter that supplies *data and identity*, nothing visual.\n * One PR to shared-ui + a coordinated version bump propagates a chrome\n * change to every service.\n *\n * Composition: re-exports the existing `DashboardLayout` from\n * `@pablo2410/shared-ui/layout` under the clearer canonical name\n * `OplyticsServiceShell`. The two are the same component; consumers\n * should prefer `/shell` going forward — `/layout` will be marked\n * `@deprecated` once every subdomain has migrated and removed in\n * shared-ui v1.0 (see oplytics-subdomains tracking epic).\n *\n * CSS: ship `dist/shell/oplytics-shell.css` containing every Tailwind v4\n * utility this shell uses (built by `pnpm build:shell-css`). Consumers\n * `@import` it once in their own `index.css` and never need an\n * `@source` directive.\n *\n * ```css\n * @import \"tailwindcss\";\n * @import \"@pablo2410/shared-ui/theme/oplytics-theme.css\";\n * @import \"@pablo2410/shared-ui/shell/oplytics-shell.css\";\n * ```\n *\n * Usage:\n *\n * ```tsx\n * import { OplyticsServiceShell } from \"@pablo2410/shared-ui/shell\";\n *\n * <OplyticsServiceShell\n * serviceName=\"Connect\"\n * serviceIcon={<Zap />}\n * menuSections={menuSections}\n * adminSections={adminSections}\n * isAdmin={user?.role === \"platform_admin\"}\n * activePath={location}\n * onNavigate={setLocation}\n * user={user}\n * onLogout={logout}\n * enterprise={selection.enterprise}\n * hierarchyNavigator={<HierarchyNavigator hierarchy={hierarchy} />}\n * reportingToolbar={<ReportingToolbar … />}\n * >\n * <Routes />\n * </OplyticsServiceShell>\n * ```\n */\n\nimport {\n DashboardLayout,\n type DashboardLayoutProps,\n type DashboardLayoutUser,\n type DashboardLayoutEnterprise,\n type MenuItem,\n type MenuSection,\n HealthFooter,\n type HealthFooterProps,\n type HealthFooterUser,\n type HealthFooterEnterprise,\n CrossServiceNav,\n type CrossServiceNavProps,\n} from \"../layout\";\nimport {\n buildCrossServiceLinks,\n type CrossServiceLink,\n} from \"../services/crossNav\";\n\n/**\n * The canonical composed Oplytics chrome.\n *\n * This is the same React component as `DashboardLayout` in\n * `@pablo2410/shared-ui/layout`, re-exported under a clearer name.\n * Consumers should prefer `OplyticsServiceShell` going forward.\n */\nconst OplyticsServiceShell = DashboardLayout;\n\n/**\n * Props accepted by `OplyticsServiceShell`.\n * (Alias of `DashboardLayoutProps`.)\n */\ntype ServiceShellProps = DashboardLayoutProps;\n\n/**\n * Authenticated user passed to the shell. Small enough to fit both\n * stateless-JWT subdomains (Connect, Policy Deployment) and DB-backed\n * ones (OEE Manager).\n */\ntype ServiceShellUser = DashboardLayoutUser;\n\n/**\n * Currently-scoped enterprise — passed to the user menu's diagnostic label.\n */\ntype ServiceShellEnterprise = DashboardLayoutEnterprise;\n\nexport {\n OplyticsServiceShell,\n type ServiceShellProps,\n type ServiceShellUser,\n type ServiceShellEnterprise,\n type MenuItem,\n type MenuSection,\n HealthFooter,\n type HealthFooterProps,\n type HealthFooterUser,\n type HealthFooterEnterprise,\n CrossServiceNav,\n type CrossServiceNavProps,\n buildCrossServiceLinks,\n type CrossServiceLink,\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/shell/index.ts"],"sourcesContent":["/**\n * @pablo2410/shared-ui/shell — Oplytics Service Shell\n *\n * The single composed chrome (sidebar + header + breadcrumb + reporting +\n * footer + user menu) used by every Oplytics subdomain. Subdomains become\n * a ~50-line adapter that supplies *data and identity*, nothing visual.\n * One PR to shared-ui + a coordinated version bump propagates a chrome\n * change to every service.\n *\n * Composition: re-exports the existing `DashboardLayout` from\n * `@pablo2410/shared-ui/layout` under the clearer canonical name\n * `OplyticsServiceShell`. The two are the same component; consumers\n * should prefer `/shell` going forward — `/layout` will be marked\n * `@deprecated` once every subdomain has migrated and removed in\n * shared-ui v1.0 (see oplytics-subdomains tracking epic).\n *\n * CSS: ship `dist/shell/oplytics-shell.css` containing every Tailwind v4\n * utility this shell uses (built by `pnpm build:shell-css`). Consumers\n * `@import` it once in their own `index.css` and never need an\n * `@source` directive.\n *\n * ```css\n * @import \"tailwindcss\";\n * @import \"@pablo2410/shared-ui/theme/oplytics-theme.css\";\n * @import \"@pablo2410/shared-ui/shell/oplytics-shell.css\";\n * ```\n *\n * Usage:\n *\n * ```tsx\n * import { OplyticsServiceShell } from \"@pablo2410/shared-ui/shell\";\n *\n * <OplyticsServiceShell\n * serviceName=\"Connect\"\n * serviceIcon={<Zap />}\n * menuSections={menuSections}\n * adminSections={adminSections}\n * isAdmin={user?.role === \"platform_admin\"}\n * activePath={location}\n * onNavigate={setLocation}\n * user={user}\n * onLogout={logout}\n * enterprise={selection.enterprise}\n * hierarchyNavigator={<HierarchyNavigator hierarchy={hierarchy} />}\n * reportingToolbar={<ReportingToolbar … />}\n * >\n * <Routes />\n * </OplyticsServiceShell>\n * ```\n */\n\nimport {\n DashboardLayout,\n type DashboardLayoutProps,\n type DashboardLayoutUser,\n type DashboardLayoutEnterprise,\n type MenuItem,\n type MenuSection,\n HealthFooter,\n type HealthFooterProps,\n type HealthFooterUser,\n type HealthFooterEnterprise,\n CrossServiceNav,\n type CrossServiceNavProps,\n} from \"../layout\";\nimport {\n buildCrossServiceLinks,\n type CrossServiceLink,\n} from \"../services/crossNav\";\n\n/**\n * The canonical composed Oplytics chrome.\n *\n * This is the same React component as `DashboardLayout` in\n * `@pablo2410/shared-ui/layout`, re-exported under a clearer name.\n * Consumers should prefer `OplyticsServiceShell` going forward.\n */\nconst OplyticsServiceShell = DashboardLayout;\n\n/**\n * Props accepted by `OplyticsServiceShell`.\n * (Alias of `DashboardLayoutProps`.)\n */\ntype ServiceShellProps = DashboardLayoutProps;\n\n/**\n * Authenticated user passed to the shell. Small enough to fit both\n * stateless-JWT subdomains (Connect, Policy Deployment) and DB-backed\n * ones (OEE Manager).\n */\ntype ServiceShellUser = DashboardLayoutUser;\n\n/**\n * Currently-scoped enterprise — passed to the user menu's diagnostic label.\n */\ntype ServiceShellEnterprise = DashboardLayoutEnterprise;\n\nexport {\n OplyticsServiceShell,\n type ServiceShellProps,\n type ServiceShellUser,\n type ServiceShellEnterprise,\n type MenuItem,\n type MenuSection,\n HealthFooter,\n type HealthFooterProps,\n type HealthFooterUser,\n type HealthFooterEnterprise,\n CrossServiceNav,\n type CrossServiceNavProps,\n buildCrossServiceLinks,\n type CrossServiceLink,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA6EA,IAAM,uBAAuB;","names":[]}
|