@pablo2410/shared-ui 0.6.1 → 0.6.2
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/{DashboardLayout-Bors1KO3.d.ts → HealthFooter-BusozVzz.d.ts} +46 -3
- package/dist/{chunk-MAKRKBBI.js → chunk-PHZHX3MF.js} +206 -158
- package/dist/chunk-PHZHX3MF.js.map +1 -0
- package/dist/layout/index.d.ts +2 -2
- package/dist/layout/index.js +3 -1
- package/dist/shell/index.d.ts +2 -2
- package/dist/shell/index.js +4 -2
- package/dist/shell/index.js.map +1 -1
- package/dist/shell/oplytics-shell.css +1 -1
- package/package.json +1 -1
- package/dist/chunk-MAKRKBBI.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import React__default, { ReactNode } from 'react';
|
|
2
|
+
import React__default, { ReactNode, CSSProperties } from 'react';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* SharedSidebar — Config-driven sidebar component for all Oplytics subdomains.
|
|
@@ -110,8 +110,19 @@ interface DashboardLayoutUser {
|
|
|
110
110
|
email?: string;
|
|
111
111
|
role?: string;
|
|
112
112
|
avatarUrl?: string;
|
|
113
|
+
/** The user's stable identifier (typically the JWT `openId` claim).
|
|
114
|
+
* Optional — only used by the HealthFooter diagnostic strip. */
|
|
115
|
+
openId?: string;
|
|
116
|
+
/** The enterprise id from the JWT (`enterpriseId` claim). May be null
|
|
117
|
+
* for platform_admin users who haven't selected an active enterprise.
|
|
118
|
+
* Optional — only used by the HealthFooter diagnostic strip. */
|
|
119
|
+
enterpriseId?: number | null;
|
|
113
120
|
}
|
|
114
121
|
interface DashboardLayoutEnterprise {
|
|
122
|
+
/** The enterprise id the org-hierarchy is currently scoped to. Optional
|
|
123
|
+
* — only used by the HealthFooter diagnostic strip; the visible header
|
|
124
|
+
* badge only needs `name` (and optionally `code`). */
|
|
125
|
+
id?: number;
|
|
115
126
|
name: string;
|
|
116
127
|
code?: string;
|
|
117
128
|
}
|
|
@@ -150,11 +161,43 @@ interface DashboardLayoutProps {
|
|
|
150
161
|
reportingToolbar?: ReactNode;
|
|
151
162
|
/** Whether the sidebar starts expanded. Defaults to `!isMobile`. */
|
|
152
163
|
defaultOpen?: boolean;
|
|
153
|
-
/** Extra footer rendered fixed at the bottom (e.g. a debug/health bar).
|
|
164
|
+
/** Extra footer rendered fixed at the bottom (e.g. a debug/health bar).
|
|
165
|
+
* Coexists with `showHealthFooter` — pass both if you want both. */
|
|
154
166
|
footer?: ReactNode;
|
|
167
|
+
/** When true AND the current user has `role === "platform_admin"`, the
|
|
168
|
+
* shell renders the standardised platform-admin diagnostic strip
|
|
169
|
+
* (`HealthFooter`) fixed at the bottom of the viewport. Subdomains
|
|
170
|
+
* opt in with one prop and inherit any future improvements to the
|
|
171
|
+
* strip without code changes. */
|
|
172
|
+
showHealthFooter?: boolean;
|
|
155
173
|
/** Main content. */
|
|
156
174
|
children: ReactNode;
|
|
157
175
|
}
|
|
158
176
|
declare function DashboardLayout(props: DashboardLayoutProps): react_jsx_runtime.JSX.Element;
|
|
159
177
|
|
|
160
|
-
|
|
178
|
+
interface HealthFooterUser {
|
|
179
|
+
/** JWT role string (e.g. "platform_admin"). */
|
|
180
|
+
role?: string;
|
|
181
|
+
/** The user's stable identifier (typically the JWT `openId` claim). */
|
|
182
|
+
openId?: string;
|
|
183
|
+
/** The enterprise id from the JWT (`enterpriseId` claim). May be null
|
|
184
|
+
* for platform_admin users who haven't selected an active enterprise. */
|
|
185
|
+
enterpriseId?: number | null;
|
|
186
|
+
}
|
|
187
|
+
interface HealthFooterEnterprise {
|
|
188
|
+
/** The enterprise id the org-hierarchy is currently scoped to. */
|
|
189
|
+
id?: number;
|
|
190
|
+
/** Human-readable name of the scoped enterprise. */
|
|
191
|
+
name?: string;
|
|
192
|
+
}
|
|
193
|
+
interface HealthFooterProps {
|
|
194
|
+
user?: HealthFooterUser | null;
|
|
195
|
+
enterprise?: HealthFooterEnterprise | null;
|
|
196
|
+
/** Optional extra CSS class for the container. */
|
|
197
|
+
className?: string;
|
|
198
|
+
/** Optional inline style override (z-index, etc.). */
|
|
199
|
+
style?: CSSProperties;
|
|
200
|
+
}
|
|
201
|
+
declare function HealthFooter({ user, enterprise, className, style, }: HealthFooterProps): react_jsx_runtime.JSX.Element;
|
|
202
|
+
|
|
203
|
+
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 };
|