@genispace/geniapp 0.1.0
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/LICENSE +21 -0
- package/README.md +153 -0
- package/dist/CrossAppRecordPicker-BXchXcK5.js +624 -0
- package/dist/CrossAppRecordPicker-BXchXcK5.js.map +1 -0
- package/dist/Page-wHZrMN17.js +24 -0
- package/dist/Page-wHZrMN17.js.map +1 -0
- package/dist/ai/adopt/AiSuggestionPanel.d.ts +30 -0
- package/dist/ai/adopt/BusinessGuidancePanel.d.ts +31 -0
- package/dist/ai/adopt/DetailPageAiLayout.d.ts +7 -0
- package/dist/ai/adopt/adoptPresets.d.ts +11 -0
- package/dist/ai/adopt/guidanceContent.d.ts +27 -0
- package/dist/ai/adopt/parseAiSummary.d.ts +7 -0
- package/dist/ai/components/AgentJobProgress.d.ts +124 -0
- package/dist/ai/components/AsyncCombobox.d.ts +44 -0
- package/dist/ai/components/BulkActionBar.d.ts +44 -0
- package/dist/ai/components/EntityRef.d.ts +39 -0
- package/dist/ai/components/JobProgress.d.ts +64 -0
- package/dist/ai/components/ServerDataTable.d.ts +89 -0
- package/dist/ai/components/Timeline.d.ts +35 -0
- package/dist/ai/components/useInfiniteRows.d.ts +25 -0
- package/dist/ai/errors/userFacingError.d.ts +14 -0
- package/dist/ai/errors/userFacingError.js +48 -0
- package/dist/ai/errors/userFacingError.js.map +1 -0
- package/dist/ai/index.d.ts +34 -0
- package/dist/ai/integrations/partner/createPartnerRecordPickerHook.d.ts +15 -0
- package/dist/ai/integrations/partner/partnerRecordPicker.d.ts +20 -0
- package/dist/ai/layout/ModalWithAiLayout.d.ts +11 -0
- package/dist/ai/layout/aiUi.d.ts +16 -0
- package/dist/ai/layout/layoutConstants.d.ts +19 -0
- package/dist/ai/layout/modalSizeForAi.d.ts +5 -0
- package/dist/ai/locales/sharedAiCopy.d.ts +6 -0
- package/dist/ai/managed-data/DatasourceReadonlyTable.d.ts +11 -0
- package/dist/ai/managed-data/createTableClient.d.ts +7 -0
- package/dist/ai/managed-data/emitManagedEvent.d.ts +18 -0
- package/dist/ai/managed-data/executeManagedDatasource.d.ts +21 -0
- package/dist/ai/managed-data/queryManagedDatasource.d.ts +28 -0
- package/dist/ai/providers/AppUiProviders.d.ts +6 -0
- package/dist/ai/types/app-ai.types.d.ts +29 -0
- package/dist/ai/types/index.d.ts +1 -0
- package/dist/ai.d.ts +1 -0
- package/dist/ai.js +1817 -0
- package/dist/ai.js.map +1 -0
- package/dist/case-workspace/domain.d.ts +41 -0
- package/dist/case-workspace/domain.js +24 -0
- package/dist/case-workspace/domain.js.map +1 -0
- package/dist/case-workspace/index.d.ts +91 -0
- package/dist/case-workspace.d.ts +1 -0
- package/dist/case-workspace.js +392 -0
- package/dist/case-workspace.js.map +1 -0
- package/dist/cn-B6yFEsav.js +9 -0
- package/dist/cn-B6yFEsav.js.map +1 -0
- package/dist/components/ui/calendar.css +7 -0
- package/dist/cookieSettings-D_v3KS02.js +97 -0
- package/dist/cookieSettings-D_v3KS02.js.map +1 -0
- package/dist/dashboard/index.d.ts +16 -0
- package/dist/dashboard/src/ChartFrame.d.ts +18 -0
- package/dist/dashboard/src/ChartTooltip.d.ts +38 -0
- package/dist/dashboard/src/FilterBar.d.ts +23 -0
- package/dist/dashboard/src/KpiStatCard.d.ts +29 -0
- package/dist/dashboard/src/StatGrid.d.ts +15 -0
- package/dist/dashboard/src/TimeRangePicker.d.ts +14 -0
- package/dist/dashboard/src/chart.d.ts +10 -0
- package/dist/dashboard/src/format.d.ts +16 -0
- package/dist/dashboard/src/links.d.ts +2 -0
- package/dist/dashboard/src/useDashboardRange.d.ts +27 -0
- package/dist/dashboard.d.ts +1 -0
- package/dist/dashboard.js +361 -0
- package/dist/dashboard.js.map +1 -0
- package/dist/fonts.css +15 -0
- package/dist/hooks/access/AppAccessGate.d.ts +20 -0
- package/dist/hooks/access/AppAccessNotice.d.ts +8 -0
- package/dist/hooks/access/useAppAccess.d.ts +26 -0
- package/dist/hooks/config/businessLocale.d.ts +12 -0
- package/dist/hooks/config/currencies.d.ts +9 -0
- package/dist/hooks/index.d.ts +17 -0
- package/dist/hooks/picker/CrossAppRecordPicker.d.ts +37 -0
- package/dist/hooks/picker/managedAppPicker.d.ts +21 -0
- package/dist/hooks/picker/partnerPayload.d.ts +6 -0
- package/dist/hooks/routing/draftEntityId.d.ts +5 -0
- package/dist/hooks/routing/useRefetchOnRouteMatch.d.ts +6 -0
- package/dist/hooks/shell/resolveApiRoot.d.ts +13 -0
- package/dist/hooks/shell/shell.d.ts +4 -0
- package/dist/hooks/shell/useGenispacePlatformClient.d.ts +7 -0
- package/dist/hooks.d.ts +1 -0
- package/dist/hooks.js +42 -0
- package/dist/hooks.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +77 -0
- package/dist/index.js.map +1 -0
- package/dist/kit.d.ts +50 -0
- package/dist/kit.js +2067 -0
- package/dist/kit.js.map +1 -0
- package/dist/page.d.ts +1 -0
- package/dist/page.js +5 -0
- package/dist/page.js.map +1 -0
- package/dist/shell-DIHnXIUb.js +6 -0
- package/dist/shell-DIHnXIUb.js.map +1 -0
- package/dist/shell.d.ts +30 -0
- package/dist/shell.js +104 -0
- package/dist/shell.js.map +1 -0
- package/dist/storage/assetPreview.d.ts +12 -0
- package/dist/storage/components/AssetThumbnail.d.ts +15 -0
- package/dist/storage/components/CopyStorageLinkButton.d.ts +13 -0
- package/dist/storage/components/StorageImage.d.ts +9 -0
- package/dist/storage/components/StoragePreviewContent.d.ts +22 -0
- package/dist/storage/components/StorageVideo.d.ts +9 -0
- package/dist/storage/copyTextToClipboard.d.ts +5 -0
- package/dist/storage/hooks/useAuthenticatedStorageBlobs.d.ts +3 -0
- package/dist/storage/hooks/useImageThumbnailBlobs.d.ts +4 -0
- package/dist/storage/hooks/useShareableStorageLink.d.ts +7 -0
- package/dist/storage/index.d.ts +12 -0
- package/dist/storage/openUrlInNewTab.d.ts +6 -0
- package/dist/storage/platformStorage.d.ts +43 -0
- package/dist/storage.d.ts +1 -0
- package/dist/storage.js +605 -0
- package/dist/storage.js.map +1 -0
- package/dist/style.css +1 -0
- package/dist/styles/base.css +616 -0
- package/dist/styles/reduced-motion.css +14 -0
- package/dist/styles/tailwind-preset.js +269 -0
- package/dist/task-workspace/domain.d.ts +35 -0
- package/dist/task-workspace/domain.js +45 -0
- package/dist/task-workspace/domain.js.map +1 -0
- package/dist/task-workspace/experience.d.ts +50 -0
- package/dist/task-workspace/index.d.ts +172 -0
- package/dist/task-workspace.d.ts +1 -0
- package/dist/task-workspace.js +626 -0
- package/dist/task-workspace.js.map +1 -0
- package/dist/ui/components/features/app/AppCheckboxInput.d.ts +9 -0
- package/dist/ui/components/features/app/AppConfirmDialog.d.ts +12 -0
- package/dist/ui/components/features/app/AppDashboardSkeleton.d.ts +9 -0
- package/dist/ui/components/features/app/AppDatePicker.d.ts +69 -0
- package/dist/ui/components/features/app/AppModal.d.ts +27 -0
- package/dist/ui/components/features/app/AppPageStates.d.ts +17 -0
- package/dist/ui/components/features/app/AppSelectInput.d.ts +10 -0
- package/dist/ui/components/features/app/AppTemporalInput.d.ts +19 -0
- package/dist/ui/components/features/app/Page.d.ts +14 -0
- package/dist/ui/components/features/app/QueryErrorAlert.d.ts +7 -0
- package/dist/ui/components/features/app/Sidebar.d.ts +47 -0
- package/dist/ui/components/features/app/index.d.ts +17 -0
- package/dist/ui/components/features/user/UserAvatar.d.ts +17 -0
- package/dist/ui/components/features/user/UserDisplay.d.ts +10 -0
- package/dist/ui/components/features/user/UserSelect.d.ts +14 -0
- package/dist/ui/components/features/user/useUserDirectory.d.ts +13 -0
- package/dist/ui/components/features/user/userDirectoryTypes.d.ts +18 -0
- package/dist/ui/components/patterns/form-section.d.ts +11 -0
- package/dist/ui/components/primitives/feedback/index.d.ts +2 -0
- package/dist/ui/components/primitives/feedback/toaster.d.ts +1 -0
- package/dist/ui/components/primitives/feedback/use-toast.d.ts +46 -0
- package/dist/ui/components/primitives/page-skeleton/ChartAreaSkeleton.d.ts +13 -0
- package/dist/ui/components/primitives/page-skeleton/ChartEmptyState.d.ts +14 -0
- package/dist/ui/components/primitives/page-skeleton/ComponentSkeletonShell.d.ts +16 -0
- package/dist/ui/components/primitives/page-skeleton/ConfigEditorSkeleton.d.ts +5 -0
- package/dist/ui/components/primitives/page-skeleton/DetailTabsSkeleton.d.ts +6 -0
- package/dist/ui/components/primitives/page-skeleton/EmptyStateBadge.d.ts +13 -0
- package/dist/ui/components/primitives/page-skeleton/FormCardSkeleton.d.ts +7 -0
- package/dist/ui/components/primitives/page-skeleton/FormFieldSkeleton.d.ts +6 -0
- package/dist/ui/components/primitives/page-skeleton/FormPageSkeleton.d.ts +6 -0
- package/dist/ui/components/primitives/page-skeleton/GridCardsSkeleton.d.ts +6 -0
- package/dist/ui/components/primitives/page-skeleton/ListSkeleton.d.ts +26 -0
- package/dist/ui/components/primitives/page-skeleton/PageHeaderSkeleton.d.ts +6 -0
- package/dist/ui/components/primitives/page-skeleton/SplitPaneSkeleton.d.ts +4 -0
- package/dist/ui/components/primitives/page-skeleton/StatsRowSkeleton.d.ts +5 -0
- package/dist/ui/components/primitives/page-skeleton/TableEmptyState.d.ts +27 -0
- package/dist/ui/components/primitives/page-skeleton/TablePageSkeleton.d.ts +8 -0
- package/dist/ui/components/primitives/page-skeleton/TabsBarSkeleton.d.ts +6 -0
- package/dist/ui/components/primitives/page-skeleton/index.d.ts +24 -0
- package/dist/ui/components/primitives/page-skeleton/skeletonMetrics.d.ts +9 -0
- package/dist/ui/components/primitives/page-skeleton/useVisibleCenter.d.ts +34 -0
- package/dist/ui/components/ui/accordion.d.ts +7 -0
- package/dist/ui/components/ui/ai-draft-banner.d.ts +21 -0
- package/dist/ui/components/ui/alert-dialog.d.ts +48 -0
- package/dist/ui/components/ui/alert.d.ts +8 -0
- package/dist/ui/components/ui/avatar.d.ts +6 -0
- package/dist/ui/components/ui/badge.d.ts +9 -0
- package/dist/ui/components/ui/breadcrumb.d.ts +19 -0
- package/dist/ui/components/ui/button.d.ts +11 -0
- package/dist/ui/components/ui/calendar.d.ts +8 -0
- package/dist/ui/components/ui/card.d.ts +8 -0
- package/dist/ui/components/ui/chart.d.ts +16 -0
- package/dist/ui/components/ui/checkbox.d.ts +4 -0
- package/dist/ui/components/ui/collapsible.d.ts +5 -0
- package/dist/ui/components/ui/column-config.d.ts +42 -0
- package/dist/ui/components/ui/date-picker.d.ts +9 -0
- package/dist/ui/components/ui/date-range-filter.d.ts +32 -0
- package/dist/ui/components/ui/date-range-picker.d.ts +11 -0
- package/dist/ui/components/ui/dialog-input.d.ts +17 -0
- package/dist/ui/components/ui/dialog-safe-select.d.ts +13 -0
- package/dist/ui/components/ui/dialog.d.ts +25 -0
- package/dist/ui/components/ui/dropdown-menu.d.ts +27 -0
- package/dist/ui/components/ui/feature-guide.d.ts +43 -0
- package/dist/ui/components/ui/form.d.ts +25 -0
- package/dist/ui/components/ui/help-tip.d.ts +29 -0
- package/dist/ui/components/ui/hint-notice.d.ts +22 -0
- package/dist/ui/components/ui/index.d.ts +6 -0
- package/dist/ui/components/ui/input.d.ts +3 -0
- package/dist/ui/components/ui/label.d.ts +5 -0
- package/dist/ui/components/ui/modal-container.d.ts +56 -0
- package/dist/ui/components/ui/modal-templates.d.ts +46 -0
- package/dist/ui/components/ui/multi-select.d.ts +20 -0
- package/dist/ui/components/ui/pagination.d.ts +28 -0
- package/dist/ui/components/ui/popover.d.ts +7 -0
- package/dist/ui/components/ui/progress.d.ts +7 -0
- package/dist/ui/components/ui/radio-button-group.d.ts +18 -0
- package/dist/ui/components/ui/radio-group.d.ts +5 -0
- package/dist/ui/components/ui/scroll-area.d.ts +5 -0
- package/dist/ui/components/ui/select.d.ts +16 -0
- package/dist/ui/components/ui/separator.d.ts +7 -0
- package/dist/ui/components/ui/sheet.d.ts +25 -0
- package/dist/ui/components/ui/sidebar-rail.d.ts +9 -0
- package/dist/ui/components/ui/skeleton.d.ts +2 -0
- package/dist/ui/components/ui/slider.d.ts +13 -0
- package/dist/ui/components/ui/switch.d.ts +4 -0
- package/dist/ui/components/ui/table.d.ts +10 -0
- package/dist/ui/components/ui/tabs.d.ts +10 -0
- package/dist/ui/components/ui/textarea.d.ts +3 -0
- package/dist/ui/components/ui/toast.d.ts +21 -0
- package/dist/ui/components/ui/toggle-group.d.ts +12 -0
- package/dist/ui/components/ui/toggle.d.ts +12 -0
- package/dist/ui/components/ui/tooltip.d.ts +7 -0
- package/dist/ui/components/ui/typography.d.ts +15 -0
- package/dist/ui/components/ui/underline-tabs.d.ts +13 -0
- package/dist/ui/components/ui/view-mode-toggle.d.ts +9 -0
- package/dist/ui/hooks/useIsMobile.d.ts +16 -0
- package/dist/ui/styles/design-tokens.d.ts +189 -0
- package/dist/ui/styles/z-index-layers.d.ts +46 -0
- package/dist/ui.d.ts +2 -0
- package/dist/ui.js +35 -0
- package/dist/ui.js.map +1 -0
- package/dist/useUserDirectory-CqkyCQoR.js +2377 -0
- package/dist/useUserDirectory-CqkyCQoR.js.map +1 -0
- package/dist/utils/cookieSettings.d.ts +12 -0
- package/dist/utils/data/countryCodes.d.ts +26 -0
- package/dist/utils/index.d.ts +18 -0
- package/dist/utils/utils/appPath.d.ts +5 -0
- package/dist/utils/utils/chunkLoadRecovery.d.ts +7 -0
- package/dist/utils/utils/cn.d.ts +3 -0
- package/dist/utils/utils/crossApp.d.ts +71 -0
- package/dist/utils/utils/debounce.d.ts +1 -0
- package/dist/utils/utils/formatUserLabel.d.ts +8 -0
- package/dist/utils/utils/formatting.d.ts +18 -0
- package/dist/utils/utils/logoutNotification.d.ts +28 -0
- package/dist/utils/utils/operatorLocale.d.ts +32 -0
- package/dist/utils/utils/routeLocalePrefetch.d.ts +5 -0
- package/dist/utils/utils/shellIframeUrl.d.ts +20 -0
- package/dist/utils/utils/spaceSettings.d.ts +20 -0
- package/dist/utils/utils/sso.d.ts +42 -0
- package/dist/utils/utils/throttle.d.ts +1 -0
- package/dist/utils/utils/timezones.d.ts +14 -0
- package/dist/utils/utils/toDateInputValue.d.ts +5 -0
- package/dist/utils/utils/watermark.d.ts +1 -0
- package/dist/utils.d.ts +1 -0
- package/dist/utils.js +1334 -0
- package/dist/utils.js.map +1 -0
- package/dist/vite.d.ts +22 -0
- package/dist/vite.js +74 -0
- package/dist/vite.js.map +1 -0
- package/package.json +191 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard.js","sources":["../src/dashboard/src/useDashboardRange.ts","../src/dashboard/src/format.ts","../src/dashboard/src/chart.ts","../src/dashboard/src/ChartTooltip.tsx","../src/dashboard/src/links.ts","../src/dashboard/src/KpiStatCard.tsx","../src/dashboard/src/StatGrid.tsx","../src/dashboard/src/TimeRangePicker.tsx","../src/dashboard/src/FilterBar.tsx","../src/dashboard/src/ChartFrame.tsx"],"sourcesContent":["import { useMemo, useState, useCallback } from 'react';\n\n/** Preset windows for the dashboard time-range selector. */\nexport type RangePreset = 'today' | '7d' | '30d' | 'mtd' | 'qtd' | 'ytd' | '12m' | 'custom';\n\nexport const RANGE_PRESETS: RangePreset[] = ['today', '7d', '30d', 'mtd', 'qtd', 'ytd', '12m'];\n\n/** Inclusive `from`, EXCLUSIVE `to` (YYYY-MM-DD). Query with `>= from AND < to`. */\nexport interface DateRange {\n from: string;\n to: string;\n preset: RangePreset;\n}\n\nfunction ymd(d: Date): string {\n return `${d.getUTCFullYear()}-${String(d.getUTCMonth() + 1).padStart(2, '0')}-${String(d.getUTCDate()).padStart(2, '0')}`;\n}\nfunction parseYmd(s: string): Date {\n const [y, m, d] = s.split('-').map((n) => parseInt(n, 10));\n return new Date(Date.UTC(y, (m || 1) - 1, d || 1));\n}\nfunction addDays(d: Date, n: number): Date {\n const x = new Date(d.getTime());\n x.setUTCDate(x.getUTCDate() + n);\n return x;\n}\nfunction addMonths(d: Date, n: number): Date {\n const x = new Date(d.getTime());\n x.setUTCMonth(x.getUTCMonth() + n);\n return x;\n}\nfunction addYears(d: Date, n: number): Date {\n const x = new Date(d.getTime());\n x.setUTCFullYear(x.getUTCFullYear() + n);\n return x;\n}\n/** Today at UTC midnight (range math is day-granular and tz-stable). */\nfunction todayUTC(): Date {\n const now = new Date();\n return new Date(Date.UTC(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate()));\n}\n\n/** Resolve a preset into a concrete [from, to) window (to = exclusive, day after today). */\nexport function resolvePreset(preset: RangePreset): DateRange {\n const today = todayUTC();\n const to = ymd(addDays(today, 1)); // exclusive end = tomorrow\n let from: Date;\n switch (preset) {\n case 'today':\n from = today;\n break;\n case '7d':\n from = addDays(today, -6);\n break;\n case '30d':\n from = addDays(today, -29);\n break;\n case 'mtd':\n from = new Date(Date.UTC(today.getUTCFullYear(), today.getUTCMonth(), 1));\n break;\n case 'qtd': {\n const q = Math.floor(today.getUTCMonth() / 3) * 3;\n from = new Date(Date.UTC(today.getUTCFullYear(), q, 1));\n break;\n }\n case 'ytd':\n from = new Date(Date.UTC(today.getUTCFullYear(), 0, 1));\n break;\n case '12m':\n from = addMonths(new Date(Date.UTC(today.getUTCFullYear(), today.getUTCMonth(), 1)), -11);\n break;\n default:\n from = addDays(today, -29);\n }\n return { from: ymd(from), to, preset };\n}\n\n/** Immediately-preceding window of equal length (环比 / period-over-period). */\nexport function previousRange(r: DateRange): DateRange {\n const from = parseYmd(r.from);\n const to = parseYmd(r.to);\n const lenDays = Math.round((to.getTime() - from.getTime()) / 86_400_000);\n return { from: ymd(addDays(from, -lenDays)), to: r.from, preset: r.preset };\n}\n\n/** Same window shifted back one year (同比 / year-over-year). */\nexport function yearOverYearRange(r: DateRange): DateRange {\n return { from: ymd(addYears(parseYmd(r.from), -1)), to: ymd(addYears(parseYmd(r.to), -1)), preset: r.preset };\n}\n\nexport interface UseDashboardRangeResult {\n range: DateRange;\n prevRange: DateRange;\n yoyRange: DateRange;\n setPreset: (p: RangePreset) => void;\n setCustom: (from: string, to: string) => void;\n}\n\n/**\n * Dashboard time-range state with derived 环比 (previous) and 同比 (year-over-year)\n * comparison windows. `to` is exclusive; pass `from`/`to` to date-range datasources.\n */\nexport function useDashboardRange(initial: RangePreset = '30d'): UseDashboardRangeResult {\n const [range, setRange] = useState<DateRange>(() => resolvePreset(initial));\n\n const setPreset = useCallback((p: RangePreset) => setRange(resolvePreset(p)), []);\n const setCustom = useCallback((from: string, to: string) => {\n // Custom `to` is inclusive in the picker UI; store exclusive (+1 day).\n setRange({ from, to: ymd(addDays(parseYmd(to), 1)), preset: 'custom' });\n }, []);\n\n const prevRange = useMemo(() => previousRange(range), [range]);\n const yoyRange = useMemo(() => yearOverYearRange(range), [range]);\n\n return { range, prevRange, yoyRange, setPreset, setCustom };\n}\n","import { formatBusinessNumber } from '@genispace/geniapp/hooks';\n/** Numeric/format helpers shared by dashboard widgets. */\n\nexport function finiteNum(v: unknown): number | null {\n if (v == null || v === '') return null;\n const n = typeof v === 'number' ? v : parseFloat(String(v));\n return Number.isFinite(n) ? n : null;\n}\n\n/** Compact count: 31,204 → \"31.2K\", 980 → \"980\". */\nexport function fmtCount(v: unknown): string {\n const x = finiteNum(v) ?? 0;\n const abs = Math.abs(x);\n if (abs >= 1_000_000) return `${(x / 1_000_000).toFixed(1)}M`;\n if (abs >= 10_000) return `${(x / 1000).toFixed(x % 1000 === 0 ? 0 : 1)}K`;\n return formatBusinessNumber(Math.round(x));\n}\n\n/** Compact money: 2_400_000 → \"¥2.4M\", 186_000 → \"¥186K\". */\nexport function fmtMoney(v: unknown, currency = '¥'): string {\n const x = finiteNum(v) ?? 0;\n const sign = x < 0 ? '-' : '';\n const abs = Math.abs(x);\n if (abs >= 1_000_000) return `${sign}${currency}${(abs / 1_000_000).toFixed(1)}M`;\n if (abs >= 1_000) return `${sign}${currency}${(abs / 1_000).toFixed(0)}K`;\n return `${sign}${currency}${abs.toFixed(0)}`;\n}\n\n/** Signed percent for a fraction (0.123 → \"+12.3%\"). null → em dash. */\nexport function fmtPct(v: number | null | undefined, digits = 1): string {\n if (v == null || !Number.isFinite(v)) return '—';\n const sign = v > 0 ? '+' : '';\n return `${sign}${(v * 100).toFixed(digits)}%`;\n}\n\nexport type DeltaDirection = 'up' | 'down' | 'flat';\n\nexport interface Delta {\n /** Fractional change vs base (0.12 = +12%); null when base is 0 and not computable. */\n pct: number | null;\n direction: DeltaDirection;\n}\n\n/** Period-over-period delta. base=0 with positive current → direction up, pct null (n/a). */\nexport function computeDelta(current: unknown, base: unknown): Delta {\n const c = finiteNum(current) ?? 0;\n const b = finiteNum(base) ?? 0;\n if (b === 0) {\n return { pct: c === 0 ? 0 : null, direction: c > 0 ? 'up' : c < 0 ? 'down' : 'flat' };\n }\n const pct = (c - b) / Math.abs(b);\n return { pct, direction: pct > 0.0001 ? 'up' : pct < -0.0001 ? 'down' : 'flat' };\n}\n","/** Shared recharts styling tokens (semantic HSL; consistent across all GeniApp dashboards).\n * The first series follows the app's theme color (--primary) so each app's dashboard\n * leads with its own brand accent; the rest are a fixed categorical palette. */\nexport const CHART_COLORS = [\n 'hsl(var(--primary))', // app theme accent\n 'hsl(280 65% 55%)', // purple\n 'hsl(160 55% 42%)', // teal\n 'hsl(32 95% 55%)', // orange\n 'hsl(340 72% 52%)', // pink\n 'hsl(199 89% 48%)', // cyan\n 'hsl(142 71% 45%)', // green\n 'hsl(48 96% 53%)', // amber\n] as const;\n\nexport const CHART_GRID_STROKE = 'hsl(var(--border))';\nexport const CHART_AXIS_TICK = { fontSize: 11, fill: 'hsl(var(--muted-foreground))' } as const;\n\nexport function chartColorAt(i: number): string {\n return CHART_COLORS[i % CHART_COLORS.length];\n}\n","import type { ReactNode } from 'react';\nimport { CHART_COLORS } from './chart';\n\ninterface TooltipEntry {\n name?: ReactNode;\n value?: number | string;\n color?: string;\n dataKey?: string | number;\n}\n\nexport interface ChartTooltipProps {\n /** Injected by recharts when used as `<Tooltip content={<ChartTooltip … />} />`. */\n active?: boolean;\n payload?: TooltipEntry[];\n label?: ReactNode;\n /** Format the header label (e.g. a date bucket). */\n labelFormatter?: (label: unknown) => ReactNode;\n /** Format each series value; receives the raw value and series name. */\n formatter?: (value: number | string, name: string) => ReactNode;\n}\n\n/**\n * Themed recharts tooltip — replaces recharts' default bare white box with a\n * rounded, elevated popover that follows the design tokens (bg-popover, border,\n * shadow, muted labels, per-series color dots). Pass as\n * `<Tooltip content={<ChartTooltip formatter={…} />} cursor={{ fill: 'hsl(var(--muted))', fillOpacity: 0.25 }} />`.\n */\nexport function ChartTooltip({ active, payload, label, labelFormatter, formatter }: ChartTooltipProps) {\n if (!active || !payload || payload.length === 0) return null;\n return (\n <div className=\"min-w-[8rem] rounded-lg border border-border bg-popover/95 px-3 py-2 text-xs shadow-lg backdrop-blur-sm\">\n {label != null && label !== '' ? (\n <div className=\"mb-1.5 font-medium text-foreground\">\n {labelFormatter ? labelFormatter(label) : (label as ReactNode)}\n </div>\n ) : null}\n <div className=\"space-y-1\">\n {payload.map((entry, i) => (\n <div key={`${String(entry.dataKey ?? i)}`} className=\"flex items-center gap-2\">\n <span\n aria-hidden\n className=\"h-2 w-2 shrink-0 rounded-full\"\n style={{ backgroundColor: entry.color ?? CHART_COLORS[i % CHART_COLORS.length] }}\n />\n <span className=\"text-muted-foreground\">{entry.name}</span>\n <span className=\"ml-auto pl-3 font-medium tabular-nums text-foreground\">\n {formatter && entry.value != null\n ? formatter(entry.value, String(entry.name ?? ''))\n : entry.value}\n </span>\n </div>\n ))}\n </div>\n </div>\n );\n}\n\n/**\n * Vertical fade `<defs>` for area/bar fills — one linear gradient per palette\n * color (top → bottom, opacity 0.35 → 0.02). Drop `<ChartGradients />` as the\n * first child of a recharts chart, then fill a series with\n * `fill={chartGradientRef(seriesIndex)}` for a modern soft-fill look instead of\n * a flat block of color.\n */\nexport function ChartGradients({ colors = CHART_COLORS }: { colors?: readonly string[] }) {\n return (\n <defs>\n {colors.map((c, i) => (\n <linearGradient key={i} id={`chartGrad${i}`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n <stop offset=\"0%\" stopColor={c} stopOpacity={0.35} />\n <stop offset=\"100%\" stopColor={c} stopOpacity={0.02} />\n </linearGradient>\n ))}\n </defs>\n );\n}\n\n/** `url(#…)` reference to the gradient for palette color `i` (see {@link ChartGradients}). */\nexport function chartGradientRef(i: number): string {\n const idx = ((i % CHART_COLORS.length) + CHART_COLORS.length) % CHART_COLORS.length;\n return `url(#chartGrad${idx})`;\n}\n","/** Build a `path?key=value` link-to-data URL, skipping null/empty params. */\nexport function buildDataLink(path: string, params: Record<string, string | number | null | undefined>): string {\n const sp = new URLSearchParams();\n for (const [k, v] of Object.entries(params)) {\n if (v == null) continue;\n const s = String(v).trim();\n if (s === '') continue;\n sp.set(k, s);\n }\n const qs = sp.toString();\n return qs ? `${path}?${qs}` : path;\n}\n","import type { ComponentType, ReactNode } from 'react';\nimport { ArrowUpRight, ArrowDownRight, Minus } from 'lucide-react';\nimport { Card, CardContent } from '@genispace/geniapp/kit';\nimport { type Delta, fmtPct } from './format';\n\nexport interface KpiComparison {\n /** Short label, e.g. \"环比\" / \"MoM\" / \"同比\" / \"YoY\". */\n label: string;\n delta: Delta;\n /**\n * Hover tooltip spelling out what the delta compares against — the exact\n * base period and its value (e.g. \"vs 2026-05-13 – 2026-06-11: ¥182K\").\n */\n title?: string;\n}\n\nexport interface KpiStatCardProps {\n label: string;\n value: ReactNode;\n icon?: ComponentType<{ className?: string }>;\n /** Comparison chips (e.g. 环比 + 同比). */\n comparisons?: KpiComparison[];\n /** When false, a DOWN movement is colored good (e.g. churn, dormant). Default true. */\n higherIsBetter?: boolean;\n /** Secondary line under the value. */\n hint?: string;\n /** Drill / link-to-data. Renders the card as an interactive button. */\n onClick?: () => void;\n}\n\nfunction deltaTone(d: Delta, higherIsBetter: boolean): string {\n if (d.direction === 'flat' || d.pct == null) return 'text-muted-foreground';\n const good = higherIsBetter ? d.direction === 'up' : d.direction === 'down';\n return good ? 'text-emerald-600' : 'text-rose-600';\n}\n\nexport function KpiStatCard({\n label,\n value,\n icon: Icon,\n comparisons,\n higherIsBetter = true,\n hint,\n onClick,\n}: KpiStatCardProps) {\n const interactive = typeof onClick === 'function';\n return (\n <Card\n className={interactive ? 'cursor-pointer transition-colors hover:border-primary/50 hover:bg-accent/40' : undefined}\n onClick={onClick}\n role={interactive ? 'button' : undefined}\n tabIndex={interactive ? 0 : undefined}\n onKeyDown={\n interactive\n ? (e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n onClick?.();\n }\n }\n : undefined\n }\n >\n <CardContent className=\"py-4 sm:py-5\">\n <div className=\"flex items-start justify-between gap-2\">\n <p className=\"text-xs font-medium text-muted-foreground sm:text-sm\">{label}</p>\n {Icon ? <Icon className=\"h-4 w-4 shrink-0 text-muted-foreground/60\" /> : null}\n </div>\n <p className=\"mt-1.5 text-xl font-semibold tracking-tight text-foreground sm:mt-2 sm:text-2xl\">{value}</p>\n {hint ? <p className=\"mt-1 text-xs text-muted-foreground\">{hint}</p> : null}\n {comparisons && comparisons.length > 0 ? (\n <div className=\"mt-3 flex flex-wrap items-center gap-x-4 gap-y-1\">\n {comparisons.map((c) => {\n const tone = deltaTone(c.delta, higherIsBetter);\n const ArrowIcon =\n c.delta.direction === 'up' ? ArrowUpRight : c.delta.direction === 'down' ? ArrowDownRight : Minus;\n return (\n <span\n key={c.label}\n className={`inline-flex items-center gap-1 text-xs ${c.title ? 'cursor-help' : ''}`}\n title={c.title}\n >\n <span\n className={`text-muted-foreground ${c.title ? 'border-b border-dotted border-muted-foreground/40' : ''}`}\n >\n {c.label}\n </span>\n <span className={`inline-flex items-center gap-0.5 font-medium ${tone}`}>\n <ArrowIcon className=\"h-3 w-3\" />\n {fmtPct(c.delta.pct)}\n </span>\n </span>\n );\n })}\n </div>\n ) : null}\n </CardContent>\n </Card>\n );\n}\n","import type { ReactNode } from 'react';\n\n/** Desktop (lg+) column target. Mobile is always 2, tablet (sm) is `md ?? 3`. */\nexport type StatGridColumns = 2 | 3 | 4 | 5;\n\nexport interface StatGridProps {\n children: ReactNode;\n /**\n * Column count at the widest (`lg`) breakpoint. The grid is mobile-first:\n * 2 columns on phones (never 1 — see H5 design plan D1), an intermediate step\n * at `sm`, then `columns` at `lg`. Defaults to 4.\n */\n columns?: StatGridColumns;\n className?: string;\n}\n\n/**\n * Responsive KPI/stat card grid. Standardizes the \"start at 2 columns on mobile,\n * scale up on wider screens\" rule so no dashboard falls back to one-card-per-row\n * on phones. Gaps tighten on mobile (`gap-3`) and relax on desktop (`gap-4`).\n *\n * Pair with {@link KpiStatCard}. Example: `<StatGrid columns={4}>…5 cards…</StatGrid>`.\n */\nconst COLUMN_CLASS: Record<StatGridColumns, string> = {\n 2: 'grid-cols-2',\n 3: 'grid-cols-2 sm:grid-cols-3',\n 4: 'grid-cols-2 sm:grid-cols-3 lg:grid-cols-4',\n 5: 'grid-cols-2 sm:grid-cols-3 lg:grid-cols-5',\n};\n\nexport function StatGrid({ children, columns = 4, className }: StatGridProps) {\n return (\n <div className={`grid gap-3 sm:gap-4 ${COLUMN_CLASS[columns]}${className ? ` ${className}` : ''}`}>\n {children}\n </div>\n );\n}\n","import { useState } from 'react';\nimport { CalendarRange } from 'lucide-react';\nimport {\n Button,\n Input,\n Popover,\n PopoverContent,\n PopoverTrigger,\n ToggleGroup,\n ToggleGroupItem,\n} from '@genispace/geniapp/kit';\nimport { RANGE_PRESETS, type RangePreset, type DateRange } from './useDashboardRange';\n\n/** Default preset labels (English). Override via `labels` for i18n. */\nconst DEFAULT_LABELS: Record<RangePreset, string> = {\n today: 'Today',\n '7d': '7D',\n '30d': '30D',\n mtd: 'MTD',\n qtd: 'QTD',\n ytd: 'YTD',\n '12m': '12M',\n custom: 'Custom',\n};\n\nexport interface TimeRangePickerProps {\n range: DateRange;\n setPreset: (p: RangePreset) => void;\n setCustom: (from: string, to: string) => void;\n /** Optional i18n label overrides (per preset, plus `apply`). */\n labels?: Partial<Record<RangePreset, string>> & { apply?: string };\n /** Visible presets (defaults to all). */\n presets?: RangePreset[];\n}\n\nexport function TimeRangePicker({ range, setPreset, setCustom, labels, presets = RANGE_PRESETS }: TimeRangePickerProps) {\n const [open, setOpen] = useState(false);\n const [from, setFrom] = useState(range.from);\n // The picker's custom `to` is inclusive; range.to is exclusive, so show the prior day by default.\n const [to, setTo] = useState(range.to);\n const label = (p: RangePreset) => labels?.[p] ?? DEFAULT_LABELS[p];\n\n return (\n <div className=\"flex flex-wrap items-center gap-2\">\n <ToggleGroup\n type=\"single\"\n value={range.preset === 'custom' ? '' : range.preset}\n onValueChange={(v) => {\n if (v) setPreset(v as RangePreset);\n }}\n className=\"flex-wrap justify-start\"\n >\n {presets.map((p) => (\n <ToggleGroupItem key={p} value={p} aria-label={label(p)} className=\"h-8 px-3 text-xs\">\n {label(p)}\n </ToggleGroupItem>\n ))}\n </ToggleGroup>\n\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <Button\n variant={range.preset === 'custom' ? 'default' : 'outline'}\n size=\"sm\"\n className=\"h-8 gap-1.5 text-xs\"\n >\n <CalendarRange className=\"h-3.5 w-3.5\" />\n {range.preset === 'custom' ? `${range.from} → ${range.to}` : (labels?.custom ?? DEFAULT_LABELS.custom)}\n </Button>\n </PopoverTrigger>\n <PopoverContent align=\"end\" className=\"w-auto space-y-3 p-3\">\n <div className=\"flex items-center gap-2\">\n <Input\n type=\"date\"\n value={from}\n max={to}\n onChange={(e) => setFrom(e.target.value)}\n className=\"h-8 w-[150px] text-xs\"\n />\n <span className=\"text-muted-foreground\">→</span>\n <Input\n type=\"date\"\n value={to}\n min={from}\n onChange={(e) => setTo(e.target.value)}\n className=\"h-8 w-[150px] text-xs\"\n />\n </div>\n <div className=\"flex justify-end\">\n <Button\n size=\"sm\"\n className=\"h-8 text-xs\"\n disabled={!from || !to || from > to}\n onClick={() => {\n setCustom(from, to);\n setOpen(false);\n }}\n >\n {labels?.apply ?? 'Apply'}\n </Button>\n </div>\n </PopoverContent>\n </Popover>\n </div>\n );\n}\n","import type { ReactNode } from 'react';\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@genispace/geniapp/kit';\n\nexport interface DimensionOption {\n value: string;\n label: string;\n}\n\nexport interface DimensionSelectProps {\n /** Small caption shown above/inline. */\n label?: string;\n value: string;\n options: DimensionOption[];\n onChange: (value: string) => void;\n /** Sentinel value for \"all\" (no filter). Defaults to \"__all__\". */\n allValue?: string;\n allLabel?: string;\n className?: string;\n}\n\n/** A single dimension filter (channel / category / tier / store ...). */\nexport function DimensionSelect({\n label,\n value,\n options,\n onChange,\n allValue = '__all__',\n allLabel = 'All',\n className,\n}: DimensionSelectProps) {\n return (\n <div className={`flex items-center gap-1.5 ${className ?? ''}`}>\n {label ? <span className=\"text-xs text-muted-foreground\">{label}</span> : null}\n <Select value={value || allValue} onValueChange={onChange}>\n <SelectTrigger className=\"h-8 w-[150px] text-xs\">\n <SelectValue placeholder={allLabel} />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value={allValue}>{allLabel}</SelectItem>\n {options.map((o) => (\n <SelectItem key={o.value} value={o.value}>\n {o.label}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n );\n}\n\n/** Horizontal toolbar that lays out time-range + dimension filters. */\nexport function FilterBar({ children }: { children: ReactNode }) {\n return <div className=\"flex flex-wrap items-center gap-2\">{children}</div>;\n}\n","import type { ReactNode } from 'react';\nimport { Card, CardContent, CardHeader, CardTitle } from '@genispace/geniapp/kit';\n\nexport interface ChartFrameProps {\n title: ReactNode;\n /** Right-aligned header slot (e.g. a legend, a small select, a \"view all\" link). */\n actions?: ReactNode;\n /** Hint under the title. */\n subtitle?: ReactNode;\n /** Fixed chart body height in px (defaults to 280). */\n height?: number;\n children: ReactNode;\n className?: string;\n}\n\n/**\n * Consistent Card frame for a dashboard chart. Wrap a recharts\n * `<ResponsiveContainer width=\"100%\" height=\"100%\">` as the child.\n */\nexport function ChartFrame({ title, actions, subtitle, height = 280, children, className }: ChartFrameProps) {\n return (\n <Card className={className}>\n <CardHeader className=\"flex flex-row items-start justify-between space-y-0 pb-2\">\n <div>\n <CardTitle className=\"text-base\">{title}</CardTitle>\n {subtitle ? <p className=\"mt-1 text-xs text-muted-foreground\">{subtitle}</p> : null}\n </div>\n {actions ? <div className=\"flex items-center gap-2\">{actions}</div> : null}\n </CardHeader>\n <CardContent>\n <div style={{ height }}>{children}</div>\n </CardContent>\n </Card>\n );\n}\n"],"names":["RANGE_PRESETS","ymd","d","parseYmd","s","y","m","n","addDays","x","addMonths","addYears","todayUTC","now","resolvePreset","preset","today","to","from","q","previousRange","r","lenDays","yearOverYearRange","useDashboardRange","initial","range","setRange","useState","setPreset","useCallback","p","setCustom","prevRange","useMemo","yoyRange","finiteNum","v","fmtCount","abs","formatBusinessNumber","fmtMoney","currency","sign","fmtPct","digits","computeDelta","current","base","c","b","pct","CHART_COLORS","CHART_GRID_STROKE","CHART_AXIS_TICK","chartColorAt","i","ChartTooltip","active","payload","label","labelFormatter","formatter","jsxs","jsx","entry","ChartGradients","colors","chartGradientRef","buildDataLink","path","params","sp","k","qs","deltaTone","higherIsBetter","KpiStatCard","value","Icon","comparisons","hint","onClick","interactive","Card","e","CardContent","tone","ArrowIcon","ArrowUpRight","ArrowDownRight","Minus","COLUMN_CLASS","StatGrid","children","columns","className","DEFAULT_LABELS","TimeRangePicker","labels","presets","open","setOpen","setFrom","setTo","ToggleGroup","ToggleGroupItem","Popover","PopoverTrigger","Button","CalendarRange","PopoverContent","Input","DimensionSelect","options","onChange","allValue","allLabel","Select","SelectTrigger","SelectValue","SelectContent","SelectItem","o","FilterBar","ChartFrame","title","actions","subtitle","height","CardHeader","CardTitle"],"mappings":";;;;;AAKO,MAAMA,IAA+B,CAAC,SAAS,MAAM,OAAO,OAAO,OAAO,OAAO,KAAK;AAS7F,SAASC,EAAIC,GAAiB;AAC5B,SAAO,GAAGA,EAAE,eAAA,CAAgB,IAAI,OAAOA,EAAE,YAAA,IAAgB,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC,IAAI,OAAOA,EAAE,YAAY,EAAE,SAAS,GAAG,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QAAA,gBAAAC,EAACmE,GAAA,EAAU,WAAU,aAAa,UAAAL,GAAM;AAAA,QACvCE,IAAW,gBAAAhE,EAAC,KAAA,EAAE,WAAU,sCAAsC,aAAS,IAAO;AAAA,MAAA,GACjF;AAAA,MACC+D,IAAU,gBAAA/D,EAAC,OAAA,EAAI,WAAU,2BAA2B,aAAQ,IAAS;AAAA,IAAA,GACxE;AAAA,IACA,gBAAAA,EAACsB,KACC,UAAA,gBAAAtB,EAAC,OAAA,EAAI,OAAO,EAAE,QAAAiE,KAAW,UAAAnC,EAAA,CAAS,EAAA,CACpC;AAAA,EAAA,GACF;AAEJ;"}
|
package/dist/fonts.css
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* 字体系统 - GeniSpace Design Guideline,自托管(中国大陆可访问) */
|
|
2
|
+
@import '@fontsource/inter/400.css';
|
|
3
|
+
@import '@fontsource/inter/500.css';
|
|
4
|
+
@import '@fontsource/inter/600.css';
|
|
5
|
+
@import '@fontsource/noto-sans-sc/400.css';
|
|
6
|
+
@import '@fontsource/noto-sans-sc/500.css';
|
|
7
|
+
@import '@fontsource/noto-sans-sc/600.css';
|
|
8
|
+
@import '@fontsource/noto-sans-sc/700.css';
|
|
9
|
+
@import '@fontsource/space-grotesk/400.css';
|
|
10
|
+
@import '@fontsource/space-grotesk/500.css';
|
|
11
|
+
@import '@fontsource/space-grotesk/600.css';
|
|
12
|
+
@import '@fontsource/space-grotesk/700.css';
|
|
13
|
+
@import '@fontsource/geist-mono/400.css';
|
|
14
|
+
@import '@fontsource/geist-mono/500.css';
|
|
15
|
+
@import '@fontsource/geist-mono/600.css';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { AppAccess } from './useAppAccess';
|
|
3
|
+
|
|
4
|
+
type Props = {
|
|
5
|
+
access: Pick<AppAccess, 'loading' | 'accessError' | 'permissionCodes' | 'reloadAccess'>;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
/** Keep the final page geometry visible while permissions are loading. */
|
|
8
|
+
showLoadingSkeleton?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export type AppContentSkeletonVariant = 'table' | 'dashboard' | 'detail';
|
|
11
|
+
/**
|
|
12
|
+
* Shared route fallback. It uses the same responsive page padding as AppPage so
|
|
13
|
+
* switching from a skeleton to real content does not cause a horizontal jump.
|
|
14
|
+
*/
|
|
15
|
+
export declare function AppContentSkeleton({ variant }: {
|
|
16
|
+
variant?: AppContentSkeletonVariant;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
18
|
+
/** Blocks page content when RBAC access fetch fails; keeps loading geometry stable. */
|
|
19
|
+
export declare function AppAccessGate({ access, children, showLoadingSkeleton }: Props): import("react").JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AppAccess } from './useAppAccess';
|
|
2
|
+
|
|
3
|
+
type Props = {
|
|
4
|
+
access: Pick<AppAccess, 'loading' | 'accessError' | 'reloadAccess'>;
|
|
5
|
+
};
|
|
6
|
+
/** Shown when RBAC access fetch fails so users see an error instead of a blank sidebar. */
|
|
7
|
+
export declare function AppAccessNotice({ access }: Props): import("react").JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type AppAccess = {
|
|
2
|
+
isUser: boolean;
|
|
3
|
+
permissionCodes: string[];
|
|
4
|
+
loading: boolean;
|
|
5
|
+
/** Set when the access API call fails (network / server error). Distinct from zero permissions. */
|
|
6
|
+
accessError: string | null;
|
|
7
|
+
reloadAccess: () => void;
|
|
8
|
+
};
|
|
9
|
+
export type UseAppAccessOptions = {
|
|
10
|
+
/** Application instance id from Shell GENISPACE_SHELL_INIT (sessionStorage). */
|
|
11
|
+
sessionStorageKey: string;
|
|
12
|
+
/** Resolve platform API root including `/api` suffix. */
|
|
13
|
+
getApiRoot: () => string;
|
|
14
|
+
};
|
|
15
|
+
export declare function setAppApplicationId(sessionStorageKey: string, applicationId: string | null): void;
|
|
16
|
+
export declare function getAppApplicationId(sessionStorageKey: string): string | null;
|
|
17
|
+
export declare function hasAppPermission(codes: string[], required: string): boolean;
|
|
18
|
+
/** Allow-all RBAC only in dev or when explicitly relaxed (standalone local dev). */
|
|
19
|
+
export declare function isAppRbacRelaxed(): boolean;
|
|
20
|
+
export declare function canAccessNavItem(loading: boolean, permissionCodes: string[], permission: string, accessError?: string | null): boolean;
|
|
21
|
+
/** Page-level action gate — fail-closed when access fetch fails. */
|
|
22
|
+
export declare function canPerformAppAction(loading: boolean, permissionCodes: string[], required: string, accessError?: string | null): boolean;
|
|
23
|
+
/** Default API root from Shell injection or window origin. */
|
|
24
|
+
export declare function resolvePlatformApiRootFromShell(): string;
|
|
25
|
+
export declare function createAppAccessHook(sessionStorageKey: string, getApiRoot: () => string): () => AppAccess;
|
|
26
|
+
export declare function useAppAccess({ sessionStorageKey, getApiRoot }: UseAppAccessOptions): AppAccess;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type BusinessLocale = 'en-US' | 'zh-CN';
|
|
2
|
+
/**
|
|
3
|
+
* Convert the language explicitly selected in GeniSpace into the locale used
|
|
4
|
+
* for business dates, numbers and currencies. Browser locale is deliberately
|
|
5
|
+
* ignored so a Chinese page cannot silently render US dates (or vice versa).
|
|
6
|
+
*/
|
|
7
|
+
export declare function resolveBusinessLocale(language?: string | null): BusinessLocale;
|
|
8
|
+
export declare function formatBusinessTime(value: unknown, language?: string | null, options?: Intl.DateTimeFormatOptions): string;
|
|
9
|
+
export declare function formatBusinessDate(value: unknown, language?: string | null, options?: Intl.DateTimeFormatOptions): string;
|
|
10
|
+
export declare function formatBusinessDateTime(value: unknown, language?: string | null, options?: Intl.DateTimeFormatOptions): string;
|
|
11
|
+
export declare function formatBusinessNumber(value: unknown, language?: string | null, options?: Intl.NumberFormatOptions): string;
|
|
12
|
+
export declare function formatBusinessCurrency(value: unknown, currency: unknown, language?: string | null): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const ROUTE_NEW_PLACEHOLDER = "new";
|
|
2
|
+
export declare const COMMON_CURRENCY_OPTIONS: readonly ["USD", "CNY", "EUR", "GBP", "JPY", "HKD", "AUD", "CAD", "SGD", "CHF"];
|
|
3
|
+
export type CurrencyCode = (typeof COMMON_CURRENCY_OPTIONS)[number];
|
|
4
|
+
export declare function currencyLabel(code: string, locale?: string): string;
|
|
5
|
+
export declare function parseEnabledCurrenciesJson(raw: unknown): string[];
|
|
6
|
+
export declare function normalizeEnabledCurrencies(codes: string[] | null | undefined, options?: {
|
|
7
|
+
minOne?: string;
|
|
8
|
+
}): string[];
|
|
9
|
+
export declare const DEFAULT_ENABLED_CURRENCIES: readonly ["USD"];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @genispace/geniapp/hooks — Shell/RBAC/routing helpers for GeniApps.
|
|
3
|
+
* Import only from this barrel in application code.
|
|
4
|
+
*/
|
|
5
|
+
export { useRefetchOnRouteMatch, isListRoutePath } from './routing/useRefetchOnRouteMatch';
|
|
6
|
+
export { ROUTE_NEW_PLACEHOLDER, isRouteEditMode, isRouteNewPlaceholder, resolveDraftEntityId, } from './routing/draftEntityId';
|
|
7
|
+
export { COMMON_CURRENCY_OPTIONS, DEFAULT_ENABLED_CURRENCIES, currencyLabel, normalizeEnabledCurrencies, parseEnabledCurrenciesJson, type CurrencyCode, } from './config/currencies';
|
|
8
|
+
export { formatBusinessCurrency, formatBusinessDate, formatBusinessDateTime, formatBusinessTime, formatBusinessNumber, resolveBusinessLocale, type BusinessLocale, } from './config/businessLocale';
|
|
9
|
+
export { GENISPACE_SHELL_INIT_APPLIED_EVENT, GENISPACE_SHELL_SESSION_API_KEY, } from './shell/shell';
|
|
10
|
+
export { useGenispacePlatformClient } from './shell/useGenispacePlatformClient';
|
|
11
|
+
export { useAppAccess, createAppAccessHook, setAppApplicationId, getAppApplicationId, hasAppPermission, isAppRbacRelaxed, canAccessNavItem, canPerformAppAction, resolvePlatformApiRootFromShell, type AppAccess, type UseAppAccessOptions, } from './access/useAppAccess';
|
|
12
|
+
export { AppAccessNotice } from './access/AppAccessNotice';
|
|
13
|
+
export { AppAccessGate, AppContentSkeleton, type AppContentSkeletonVariant } from './access/AppAccessGate';
|
|
14
|
+
export { applyPartnerPayload, type PartnerFields } from './picker/partnerPayload';
|
|
15
|
+
export { createResolveApiRoot, createScopeTableClient, type CreateResolveApiRootOptions, } from './shell/resolveApiRoot';
|
|
16
|
+
export { createUseManagedAppPicker, type ManagedPickerOption, type ManagedPickerConfig, } from './picker/managedAppPicker';
|
|
17
|
+
export { CrossAppRecordPicker, type CrossAppRecordOption, type CrossAppSnapshotValue, type CrossAppRecordPage, type CrossAppRecordPickerProps, } from './picker/CrossAppRecordPicker';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export type CrossAppRecordOption = {
|
|
2
|
+
id: string;
|
|
3
|
+
primary: string;
|
|
4
|
+
secondary?: string;
|
|
5
|
+
status?: string;
|
|
6
|
+
snapshot?: Record<string, CrossAppSnapshotValue>;
|
|
7
|
+
};
|
|
8
|
+
export type CrossAppSnapshotValue = string | number | boolean | null | undefined | CrossAppSnapshotValue[] | {
|
|
9
|
+
[key: string]: CrossAppSnapshotValue;
|
|
10
|
+
};
|
|
11
|
+
export type CrossAppRecordPage = {
|
|
12
|
+
records: CrossAppRecordOption[];
|
|
13
|
+
total: number;
|
|
14
|
+
};
|
|
15
|
+
export type CrossAppRecordPickerProps = {
|
|
16
|
+
label: string;
|
|
17
|
+
description?: string;
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
emptyText: string;
|
|
20
|
+
unavailableText: string;
|
|
21
|
+
forbiddenText: string;
|
|
22
|
+
selected?: CrossAppRecordOption | null;
|
|
23
|
+
pageSize?: number;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
providerState?: "ready" | "unavailable" | "forbidden";
|
|
26
|
+
loadPage: (input: {
|
|
27
|
+
search: string;
|
|
28
|
+
limit: number;
|
|
29
|
+
offset: number;
|
|
30
|
+
}) => Promise<CrossAppRecordPage>;
|
|
31
|
+
onSelect: (record: CrossAppRecordOption | null) => void;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Shared cross-GeniApp record picker. The provider remains responsible for
|
|
35
|
+
* row/field authorization; consumers only receive display-safe snapshots.
|
|
36
|
+
*/
|
|
37
|
+
export declare function CrossAppRecordPicker({ label, description, placeholder, emptyText, unavailableText, forbiddenText, selected, pageSize, disabled, providerState, loadPage, onSelect, }: CrossAppRecordPickerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type ManagedPickerOption = {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
};
|
|
6
|
+
export type ManagedPickerConfig = {
|
|
7
|
+
providerGeniappId: string;
|
|
8
|
+
datasourceIdentifier: string;
|
|
9
|
+
buildApiRoot: () => string;
|
|
10
|
+
readToken: () => string | null;
|
|
11
|
+
probePicker: (apiRoot: string, token: string | null) => Promise<boolean>;
|
|
12
|
+
loadOptions: (apiRoot: string, token: string | null, ensureIds?: string[]) => Promise<ManagedPickerOption[]>;
|
|
13
|
+
};
|
|
14
|
+
export declare function createUseManagedAppPicker(config: ManagedPickerConfig): (enabled: boolean, ensureIds?: string[]) => {
|
|
15
|
+
pickerAvailable: boolean;
|
|
16
|
+
options: ManagedPickerOption[];
|
|
17
|
+
loading: boolean;
|
|
18
|
+
loadError: string | null;
|
|
19
|
+
reload: () => Promise<void>;
|
|
20
|
+
providerGeniappId: string;
|
|
21
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type PartnerFields = {
|
|
2
|
+
partner_id?: string | null;
|
|
3
|
+
partner_name?: string | null;
|
|
4
|
+
};
|
|
5
|
+
/** Weak-dependency save: persist FK only when partner picker is available. */
|
|
6
|
+
export declare function applyPartnerPayload<T extends PartnerFields>(payload: T, pickerAvailable: boolean, pickerLoading?: boolean, pickerLoadError?: string | null): T;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const ROUTE_NEW_PLACEHOLDER = "new";
|
|
2
|
+
export declare function isRouteNewPlaceholder(id?: string | null): boolean;
|
|
3
|
+
export declare function isRouteEditMode(id?: string | null): boolean;
|
|
4
|
+
/** For transaction saves: generate a client-side UUID when route id is invalid. */
|
|
5
|
+
export declare function resolveDraftEntityId(id?: string | null): string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** True when pathname is exactly the list route (not `/list/new` or `/list/:id`). */
|
|
2
|
+
export declare function isListRoutePath(pathname: string, listPath: string): boolean;
|
|
3
|
+
/**
|
|
4
|
+
* Refetch list data when the user is on the list route (including returning from a FormPage).
|
|
5
|
+
*/
|
|
6
|
+
export declare function useRefetchOnRouteMatch(listPath: string, load: () => void | Promise<void>): void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type CreateResolveApiRootOptions = {
|
|
2
|
+
/** e.g. import.meta.env.VITE_HR_API_BASE */
|
|
3
|
+
dedicatedEnv?: string | undefined;
|
|
4
|
+
platformEnv?: string | undefined;
|
|
5
|
+
};
|
|
6
|
+
/** Platform API root (`…/api`) for GeniApp iframe + standalone dev. */
|
|
7
|
+
export declare function createResolveApiRoot(options?: CreateResolveApiRootOptions): () => string;
|
|
8
|
+
/** Cross–dataScope table CRUD (read/patch). Documented integration exception only. */
|
|
9
|
+
export declare function createScopeTableClient(buildApiRoot: () => string): {
|
|
10
|
+
scopeGet: <T>(scope: string, table: string, id: string) => Promise<T>;
|
|
11
|
+
scopeList: <T>(scope: string, table: string, filter?: Record<string, string | boolean | number | null>) => Promise<T[]>;
|
|
12
|
+
scopePatch: (scope: string, table: string, id: string, payload: Record<string, unknown>) => Promise<void>;
|
|
13
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Shell iframe bridge event (must match each app's AppIframeBridge). */
|
|
2
|
+
export declare const GENISPACE_SHELL_INIT_APPLIED_EVENT = "genispace-shell-init-applied";
|
|
3
|
+
/** Session key for injected platform API public base URL (Shell GENISPACE_SHELL_INIT). */
|
|
4
|
+
export declare const GENISPACE_SHELL_SESSION_API_KEY = "__genispace_shell_api_public_base__";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as GeniSpace } from 'genispace';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Platform GeniSpace client for `/teams/members`, `/users/profiles/batch`, etc.
|
|
5
|
+
* Rebuilds when Shell posts GENISPACE_SHELL_INIT (API base + token).
|
|
6
|
+
*/
|
|
7
|
+
export declare function useGenispacePlatformClient(getApiRoot: () => string): GeniSpace;
|
package/dist/hooks.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './hooks/index';
|
package/dist/hooks.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { A as a, a as o, b as t, C as r, c as p, D as c, R as i, d as n, e as A, f as E, g as l, h as u, i as m, j as R, k as P, l as C, m as N, n as _, o as d, p as f, q as I, r as L, s as S, t as B, u as D, v as O, w as T, x as b, y as h, z as v, B as y, E as G, F as k, G as H, H as M } from "./CrossAppRecordPicker-BXchXcK5.js";
|
|
2
|
+
import { G as x, a as g } from "./shell-DIHnXIUb.js";
|
|
3
|
+
export {
|
|
4
|
+
a as AppAccessGate,
|
|
5
|
+
o as AppAccessNotice,
|
|
6
|
+
t as AppContentSkeleton,
|
|
7
|
+
r as COMMON_CURRENCY_OPTIONS,
|
|
8
|
+
p as CrossAppRecordPicker,
|
|
9
|
+
c as DEFAULT_ENABLED_CURRENCIES,
|
|
10
|
+
x as GENISPACE_SHELL_INIT_APPLIED_EVENT,
|
|
11
|
+
g as GENISPACE_SHELL_SESSION_API_KEY,
|
|
12
|
+
i as ROUTE_NEW_PLACEHOLDER,
|
|
13
|
+
n as applyPartnerPayload,
|
|
14
|
+
A as canAccessNavItem,
|
|
15
|
+
E as canPerformAppAction,
|
|
16
|
+
l as createAppAccessHook,
|
|
17
|
+
u as createResolveApiRoot,
|
|
18
|
+
m as createScopeTableClient,
|
|
19
|
+
R as createUseManagedAppPicker,
|
|
20
|
+
P as currencyLabel,
|
|
21
|
+
C as formatBusinessCurrency,
|
|
22
|
+
N as formatBusinessDate,
|
|
23
|
+
_ as formatBusinessDateTime,
|
|
24
|
+
d as formatBusinessNumber,
|
|
25
|
+
f as formatBusinessTime,
|
|
26
|
+
I as getAppApplicationId,
|
|
27
|
+
L as hasAppPermission,
|
|
28
|
+
S as isAppRbacRelaxed,
|
|
29
|
+
B as isListRoutePath,
|
|
30
|
+
D as isRouteEditMode,
|
|
31
|
+
O as isRouteNewPlaceholder,
|
|
32
|
+
T as normalizeEnabledCurrencies,
|
|
33
|
+
b as parseEnabledCurrenciesJson,
|
|
34
|
+
h as resolveBusinessLocale,
|
|
35
|
+
v as resolveDraftEntityId,
|
|
36
|
+
y as resolvePlatformApiRootFromShell,
|
|
37
|
+
G as setAppApplicationId,
|
|
38
|
+
k as useAppAccess,
|
|
39
|
+
H as useGenispacePlatformClient,
|
|
40
|
+
M as useRefetchOnRouteMatch
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { GENISPACE_SHELL_MESSAGE_VERSION as s, GeniAppShellBridge as p } from "./shell.js";
|
|
2
|
+
import { A as o, a as r, b as i, C as n, c as l, D as A, R as c, d as E, e as S, f as m, g as u, h as P, i as d, j as C, k as R, l as f, m as k, n as D, o as I, p as N, q as _, r as L, s as T, t as b, u as g, v as h, w as B, x as G, y, z as O, B as U, E as x, F as H, G as M, H as v } from "./CrossAppRecordPicker-BXchXcK5.js";
|
|
3
|
+
import { A as w, a as V, b as j, c as q, d as z, e as Q, f as Y, g as J, h as K, i as W, j as X, k as Z, l as $, C as ee, D as ae, F as se, G as pe, P as te, Q as oe, S as re, m as ie, T as ne, U as le, n as Ae, o as ce, p as Ee, q as Se, t as me, u as ue } from "./useUserDirectory-CqkyCQoR.js";
|
|
4
|
+
import { A as de } from "./Page-wHZrMN17.js";
|
|
5
|
+
import { G as Re, a as fe } from "./shell-DIHnXIUb.js";
|
|
6
|
+
export {
|
|
7
|
+
o as AppAccessGate,
|
|
8
|
+
r as AppAccessNotice,
|
|
9
|
+
w as AppCheckboxInput,
|
|
10
|
+
V as AppConfirmDialog,
|
|
11
|
+
i as AppContentSkeleton,
|
|
12
|
+
j as AppDashboardSkeleton,
|
|
13
|
+
q as AppDatePicker,
|
|
14
|
+
z as AppDateRangePicker,
|
|
15
|
+
Q as AppDateTimePicker,
|
|
16
|
+
Y as AppHelpSheet,
|
|
17
|
+
J as AppModal,
|
|
18
|
+
de as AppPage,
|
|
19
|
+
K as AppPageStates,
|
|
20
|
+
W as AppSelectInput,
|
|
21
|
+
X as AppSidebar,
|
|
22
|
+
Z as AppTemporalInput,
|
|
23
|
+
$ as AppTimePicker,
|
|
24
|
+
n as COMMON_CURRENCY_OPTIONS,
|
|
25
|
+
ee as ConfigEditorSkeleton,
|
|
26
|
+
l as CrossAppRecordPicker,
|
|
27
|
+
A as DEFAULT_ENABLED_CURRENCIES,
|
|
28
|
+
ae as DetailTabsSkeleton,
|
|
29
|
+
se as FormPageSkeleton,
|
|
30
|
+
Re as GENISPACE_SHELL_INIT_APPLIED_EVENT,
|
|
31
|
+
s as GENISPACE_SHELL_MESSAGE_VERSION,
|
|
32
|
+
fe as GENISPACE_SHELL_SESSION_API_KEY,
|
|
33
|
+
p as GeniAppShellBridge,
|
|
34
|
+
pe as GridCardsSkeleton,
|
|
35
|
+
te as PageLoadingSkeleton,
|
|
36
|
+
oe as QueryErrorAlert,
|
|
37
|
+
c as ROUTE_NEW_PLACEHOLDER,
|
|
38
|
+
re as Skeleton,
|
|
39
|
+
ie as StatsRowSkeleton,
|
|
40
|
+
ne as TablePageSkeleton,
|
|
41
|
+
le as UserDisplay,
|
|
42
|
+
Ae as UserSelect,
|
|
43
|
+
E as applyPartnerPayload,
|
|
44
|
+
S as canAccessNavItem,
|
|
45
|
+
m as canPerformAppAction,
|
|
46
|
+
u as createAppAccessHook,
|
|
47
|
+
P as createResolveApiRoot,
|
|
48
|
+
d as createScopeTableClient,
|
|
49
|
+
C as createUseManagedAppPicker,
|
|
50
|
+
R as currencyLabel,
|
|
51
|
+
f as formatBusinessCurrency,
|
|
52
|
+
k as formatBusinessDate,
|
|
53
|
+
D as formatBusinessDateTime,
|
|
54
|
+
ce as formatBusinessDateValue,
|
|
55
|
+
I as formatBusinessNumber,
|
|
56
|
+
N as formatBusinessTime,
|
|
57
|
+
_ as getAppApplicationId,
|
|
58
|
+
L as hasAppPermission,
|
|
59
|
+
T as isAppRbacRelaxed,
|
|
60
|
+
b as isListRoutePath,
|
|
61
|
+
g as isRouteEditMode,
|
|
62
|
+
h as isRouteNewPlaceholder,
|
|
63
|
+
Ee as isTemporalInputType,
|
|
64
|
+
B as normalizeEnabledCurrencies,
|
|
65
|
+
Se as parseBusinessDate,
|
|
66
|
+
G as parseEnabledCurrenciesJson,
|
|
67
|
+
y as resolveBusinessLocale,
|
|
68
|
+
O as resolveDraftEntityId,
|
|
69
|
+
U as resolvePlatformApiRootFromShell,
|
|
70
|
+
x as setAppApplicationId,
|
|
71
|
+
me as temporalLabels,
|
|
72
|
+
H as useAppAccess,
|
|
73
|
+
M as useGenispacePlatformClient,
|
|
74
|
+
v as useRefetchOnRouteMatch,
|
|
75
|
+
ue as useUserDirectory
|
|
76
|
+
};
|
|
77
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
package/dist/kit.d.ts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Curated GeniApp component kit.
|
|
3
|
+
*
|
|
4
|
+
* This entry intentionally excludes platform-console components and private
|
|
5
|
+
* frontend contexts. Additions are semver-governed public API decisions.
|
|
6
|
+
*/
|
|
7
|
+
export { cn } from './utils';
|
|
8
|
+
export * from './ui';
|
|
9
|
+
export { Button, buttonVariants, type ButtonProps } from './ui/components/ui/button';
|
|
10
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } from './ui/components/ui/card';
|
|
11
|
+
export { Badge, badgeVariants, type BadgeProps } from './ui/components/ui/badge';
|
|
12
|
+
export { Input } from './ui/components/ui/input';
|
|
13
|
+
export { Label } from './ui/components/ui/label';
|
|
14
|
+
export { Textarea } from './ui/components/ui/textarea';
|
|
15
|
+
export { Checkbox } from './ui/components/ui/checkbox';
|
|
16
|
+
export { Switch } from './ui/components/ui/switch';
|
|
17
|
+
export { Slider } from './ui/components/ui/slider';
|
|
18
|
+
export { Progress } from './ui/components/ui/progress';
|
|
19
|
+
export { Skeleton } from './ui/components/ui/skeleton';
|
|
20
|
+
export { Separator, type SeparatorProps } from './ui/components/ui/separator';
|
|
21
|
+
export { Alert, AlertTitle, AlertDescription } from './ui/components/ui/alert';
|
|
22
|
+
export { HintNotice, type HintNoticeProps, type HintNoticeVariant } from './ui/components/ui/hint-notice';
|
|
23
|
+
export { HelpTip, type HelpTipProps } from './ui/components/ui/help-tip';
|
|
24
|
+
export { AiDraftBanner, type AiDraftBannerProps, type AiDraftBannerTone } from './ui/components/ui/ai-draft-banner';
|
|
25
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent } from './ui/components/ui/tabs';
|
|
26
|
+
export { UnderlineTabs, UnderlineTabsList, UnderlineTabsTrigger, UnderlineTabsContent, underlineTabsTriggerVariants, } from './ui/components/ui/underline-tabs';
|
|
27
|
+
export { Toggle, toggleVariants } from './ui/components/ui/toggle';
|
|
28
|
+
export { ToggleGroup, ToggleGroupItem } from './ui/components/ui/toggle-group';
|
|
29
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent } from './ui/components/ui/collapsible';
|
|
30
|
+
export { ScrollArea, ScrollBar } from './ui/components/ui/scroll-area';
|
|
31
|
+
export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, } from './ui/components/ui/dialog';
|
|
32
|
+
export * from './ui/components/ui/dialog-safe-select';
|
|
33
|
+
export * from './ui/components/ui/dropdown-menu';
|
|
34
|
+
export * from './ui/components/ui/select';
|
|
35
|
+
export { MultiSelect, type MultiSelectProps, type MultiSelectOption } from './ui/components/ui/multi-select';
|
|
36
|
+
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor } from './ui/components/ui/popover';
|
|
37
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider } from './ui/components/ui/tooltip';
|
|
38
|
+
export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, } from './ui/components/ui/sheet';
|
|
39
|
+
export { RadioGroup, RadioGroupItem } from './ui/components/ui/radio-group';
|
|
40
|
+
export { Calendar, type CalendarProps } from './ui/components/ui/calendar';
|
|
41
|
+
export { DatePicker, type DatePickerProps } from './ui/components/ui/date-picker';
|
|
42
|
+
export { AlertDialog, AlertProvider, useAlert, useAlertDialog, type AlertType, } from './ui/components/ui/alert-dialog';
|
|
43
|
+
export { BaseModal, FormModal, ConfirmModal, ListModal } from './ui/components/ui/modal-templates';
|
|
44
|
+
export * from './ui/components/ui/table';
|
|
45
|
+
export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, type ChartConfig, } from './ui/components/ui/chart';
|
|
46
|
+
export { FeatureGuide, FeatureGuideTrigger, type FeatureGuideProps, type FeatureGuideStep, type FeatureGuideTriggerProps, } from './ui/components/ui/feature-guide';
|
|
47
|
+
export { useColumnConfig, ColumnConfigMenu, type ColumnConfigColumn, type ColumnConfigMenuProps, type UseColumnConfigResult, } from './ui/components/ui/column-config';
|
|
48
|
+
export { Toaster, useToast, toast } from './ui/components/primitives/feedback';
|
|
49
|
+
export { FormSection, type FormSectionProps } from './ui/components/patterns/form-section';
|
|
50
|
+
export { useIsMobile, MOBILE_BREAKPOINT } from './ui/hooks/useIsMobile';
|