@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,269 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GeniSpace Tailwind CSS Preset
|
|
3
|
+
*
|
|
4
|
+
* Shared configuration consumed by all sub-applications via the `presets` key.
|
|
5
|
+
* Keeps each app's tailwind.config.js minimal – only app-specific overrides.
|
|
6
|
+
*
|
|
7
|
+
* @type {import('tailwindcss').Config}
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import tailwindcssAnimate from 'tailwindcss-animate';
|
|
11
|
+
import tailwindcssTypography from '@tailwindcss/typography';
|
|
12
|
+
|
|
13
|
+
const preset = {
|
|
14
|
+
darkMode: ['class'],
|
|
15
|
+
|
|
16
|
+
theme: {
|
|
17
|
+
container: {
|
|
18
|
+
center: true,
|
|
19
|
+
padding: '2rem',
|
|
20
|
+
screens: {
|
|
21
|
+
'2xl': '1400px',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
extend: {
|
|
26
|
+
// ---- Screens ----
|
|
27
|
+
screens: {
|
|
28
|
+
xxl: '1600px',
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
// ---- Typography ----
|
|
32
|
+
fontFamily: {
|
|
33
|
+
sans: [
|
|
34
|
+
'Inter',
|
|
35
|
+
'Noto Sans SC',
|
|
36
|
+
'system-ui',
|
|
37
|
+
'-apple-system',
|
|
38
|
+
'BlinkMacSystemFont',
|
|
39
|
+
'Segoe UI',
|
|
40
|
+
'PingFang SC',
|
|
41
|
+
'Microsoft YaHei',
|
|
42
|
+
'Helvetica Neue',
|
|
43
|
+
'Arial',
|
|
44
|
+
'sans-serif',
|
|
45
|
+
],
|
|
46
|
+
mono: [
|
|
47
|
+
'Geist Mono',
|
|
48
|
+
'Noto Sans SC',
|
|
49
|
+
'Consolas',
|
|
50
|
+
'Monaco',
|
|
51
|
+
'Courier New',
|
|
52
|
+
'monospace',
|
|
53
|
+
],
|
|
54
|
+
display: [
|
|
55
|
+
'Space Grotesk',
|
|
56
|
+
'Noto Sans SC',
|
|
57
|
+
'system-ui',
|
|
58
|
+
'-apple-system',
|
|
59
|
+
'BlinkMacSystemFont',
|
|
60
|
+
'sans-serif',
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
// ---- Colors ----
|
|
65
|
+
colors: {
|
|
66
|
+
// Brand ink palette
|
|
67
|
+
ink: {
|
|
68
|
+
black: '#171717',
|
|
69
|
+
dark: '#262626',
|
|
70
|
+
medium: '#404040',
|
|
71
|
+
light: '#737373',
|
|
72
|
+
},
|
|
73
|
+
brand: {
|
|
74
|
+
primary: '#262626',
|
|
75
|
+
'primary-light': '#525252',
|
|
76
|
+
'primary-dark': '#171717',
|
|
77
|
+
},
|
|
78
|
+
paper: {
|
|
79
|
+
light: '#FFFCF7',
|
|
80
|
+
medium: '#FDF7EF',
|
|
81
|
+
dark: '#FBF1E4',
|
|
82
|
+
},
|
|
83
|
+
surface: {
|
|
84
|
+
DEFAULT: '#ffffff',
|
|
85
|
+
dark: '#0a0a0a',
|
|
86
|
+
darker: '#171717',
|
|
87
|
+
light: '#f3f4f6',
|
|
88
|
+
},
|
|
89
|
+
content: {
|
|
90
|
+
DEFAULT: '#111827',
|
|
91
|
+
dark: '#fafafa',
|
|
92
|
+
muted: '#4b5563',
|
|
93
|
+
'dark-muted': '#d1d5db',
|
|
94
|
+
},
|
|
95
|
+
accent: {
|
|
96
|
+
DEFAULT: '#3b82f6',
|
|
97
|
+
light: '#60a5fa',
|
|
98
|
+
dark: '#2563eb',
|
|
99
|
+
foreground: '#ffffff',
|
|
100
|
+
},
|
|
101
|
+
|
|
102
|
+
// CSS-variable-driven semantic colors (shadcn/ui)
|
|
103
|
+
border: 'hsl(var(--border))',
|
|
104
|
+
input: 'hsl(var(--input))',
|
|
105
|
+
ring: 'hsl(var(--ring))',
|
|
106
|
+
background: 'hsl(var(--background))',
|
|
107
|
+
foreground: 'hsl(var(--foreground))',
|
|
108
|
+
primary: {
|
|
109
|
+
DEFAULT: 'hsl(var(--primary))',
|
|
110
|
+
foreground: 'hsl(var(--primary-foreground))',
|
|
111
|
+
},
|
|
112
|
+
secondary: {
|
|
113
|
+
DEFAULT: 'hsl(var(--secondary))',
|
|
114
|
+
foreground: 'hsl(var(--secondary-foreground))',
|
|
115
|
+
},
|
|
116
|
+
destructive: {
|
|
117
|
+
DEFAULT: 'hsl(var(--destructive))',
|
|
118
|
+
foreground: 'hsl(var(--destructive-foreground))',
|
|
119
|
+
},
|
|
120
|
+
muted: {
|
|
121
|
+
DEFAULT: 'hsl(var(--muted))',
|
|
122
|
+
foreground: 'hsl(var(--muted-foreground))',
|
|
123
|
+
},
|
|
124
|
+
popover: {
|
|
125
|
+
DEFAULT: 'hsl(var(--popover))',
|
|
126
|
+
foreground: 'hsl(var(--popover-foreground))',
|
|
127
|
+
},
|
|
128
|
+
card: {
|
|
129
|
+
DEFAULT: 'hsl(var(--card))',
|
|
130
|
+
foreground: 'hsl(var(--card-foreground))',
|
|
131
|
+
},
|
|
132
|
+
sidebar: {
|
|
133
|
+
DEFAULT: 'hsl(var(--sidebar-background))',
|
|
134
|
+
foreground: 'hsl(var(--sidebar-foreground))',
|
|
135
|
+
primary: 'hsl(var(--sidebar-primary))',
|
|
136
|
+
'primary-foreground': 'hsl(var(--sidebar-primary-foreground))',
|
|
137
|
+
accent: 'hsl(var(--sidebar-accent))',
|
|
138
|
+
'accent-foreground': 'hsl(var(--sidebar-accent-foreground))',
|
|
139
|
+
border: 'hsl(var(--sidebar-border))',
|
|
140
|
+
ring: 'hsl(var(--sidebar-ring))',
|
|
141
|
+
},
|
|
142
|
+
chart: {
|
|
143
|
+
1: 'hsl(var(--chart-1))',
|
|
144
|
+
2: 'hsl(var(--chart-2))',
|
|
145
|
+
3: 'hsl(var(--chart-3))',
|
|
146
|
+
4: 'hsl(var(--chart-4))',
|
|
147
|
+
5: 'hsl(var(--chart-5))',
|
|
148
|
+
},
|
|
149
|
+
// Platform status tokens (defined in base.css, light + dark values).
|
|
150
|
+
// Usage: text-status-warning, border-status-info/40, bg-status-success/10 (tint),
|
|
151
|
+
// bg-status-warning + text-status-warning-foreground (solid fill).
|
|
152
|
+
status: {
|
|
153
|
+
warning: {
|
|
154
|
+
DEFAULT: 'hsl(var(--status-warning))',
|
|
155
|
+
foreground: 'hsl(var(--status-warning-foreground))',
|
|
156
|
+
},
|
|
157
|
+
success: {
|
|
158
|
+
DEFAULT: 'hsl(var(--status-success))',
|
|
159
|
+
foreground: 'hsl(var(--status-success-foreground))',
|
|
160
|
+
},
|
|
161
|
+
info: {
|
|
162
|
+
DEFAULT: 'hsl(var(--status-info))',
|
|
163
|
+
foreground: 'hsl(var(--status-info-foreground))',
|
|
164
|
+
},
|
|
165
|
+
error: {
|
|
166
|
+
DEFAULT: 'hsl(var(--status-error))',
|
|
167
|
+
foreground: 'hsl(var(--status-error-foreground))',
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
|
|
172
|
+
// ---- Border Radius ----
|
|
173
|
+
borderRadius: {
|
|
174
|
+
lg: 'var(--radius)',
|
|
175
|
+
md: 'calc(var(--radius) - 2px)',
|
|
176
|
+
sm: 'calc(var(--radius) - 4px)',
|
|
177
|
+
},
|
|
178
|
+
|
|
179
|
+
// ---- Keyframes ----
|
|
180
|
+
keyframes: {
|
|
181
|
+
'accordion-down': {
|
|
182
|
+
from: { height: '0' },
|
|
183
|
+
to: { height: 'var(--radix-accordion-content-height)' },
|
|
184
|
+
},
|
|
185
|
+
'accordion-up': {
|
|
186
|
+
from: { height: 'var(--radix-accordion-content-height)' },
|
|
187
|
+
to: { height: '0' },
|
|
188
|
+
},
|
|
189
|
+
'gradient-x': {
|
|
190
|
+
'0%, 100%': { 'background-size': '200% 200%', 'background-position': 'left center' },
|
|
191
|
+
'50%': { 'background-size': '200% 200%', 'background-position': 'right center' },
|
|
192
|
+
},
|
|
193
|
+
float: {
|
|
194
|
+
'0%, 100%': { transform: 'translateY(0)' },
|
|
195
|
+
'50%': { transform: 'translateY(-20px)' },
|
|
196
|
+
},
|
|
197
|
+
'slide-up': {
|
|
198
|
+
'0%': { transform: 'translateY(20px)', opacity: '0' },
|
|
199
|
+
'100%': { transform: 'translateY(0)', opacity: '1' },
|
|
200
|
+
},
|
|
201
|
+
'slide-down': {
|
|
202
|
+
'0%': { transform: 'translateY(-20px)', opacity: '0' },
|
|
203
|
+
'100%': { transform: 'translateY(0)', opacity: '1' },
|
|
204
|
+
},
|
|
205
|
+
'fade-in': {
|
|
206
|
+
'0%': { opacity: '0' },
|
|
207
|
+
'100%': { opacity: '1' },
|
|
208
|
+
},
|
|
209
|
+
'fade-in-up': {
|
|
210
|
+
'0%': { opacity: '0', transform: 'translateY(30px)' },
|
|
211
|
+
'100%': { opacity: '1', transform: 'translateY(0)' },
|
|
212
|
+
},
|
|
213
|
+
'blob-enhanced': {
|
|
214
|
+
'0%': { transform: 'translate(0px, 0px) scale(1)' },
|
|
215
|
+
'33%': { transform: 'translate(30px, -50px) scale(1.1)' },
|
|
216
|
+
'66%': { transform: 'translate(-20px, 20px) scale(0.9)' },
|
|
217
|
+
'100%': { transform: 'translate(0px, 0px) scale(1)' },
|
|
218
|
+
},
|
|
219
|
+
shimmer: {
|
|
220
|
+
'0%': { transform: 'translateX(-100%)' },
|
|
221
|
+
'100%': { transform: 'translateX(100%)' },
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
|
|
225
|
+
// ---- Animations ----
|
|
226
|
+
animation: {
|
|
227
|
+
'accordion-down': 'accordion-down 0.2s ease-out',
|
|
228
|
+
'accordion-up': 'accordion-up 0.2s ease-out',
|
|
229
|
+
'gradient-x': 'gradient-x 15s ease infinite',
|
|
230
|
+
float: 'float 6s ease-in-out infinite',
|
|
231
|
+
'slide-up': 'slide-up 0.5s ease-out',
|
|
232
|
+
'slide-down': 'slide-down 0.5s ease-out',
|
|
233
|
+
'fade-in': 'fade-in 0.8s ease-out forwards',
|
|
234
|
+
'fade-in-up': 'fade-in-up 0.8s ease-out forwards',
|
|
235
|
+
'blob-enhanced': 'blob-enhanced 7s ease-in-out infinite',
|
|
236
|
+
shimmer: 'shimmer 1.6s ease-in-out infinite',
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
},
|
|
240
|
+
|
|
241
|
+
// ---- Safelist ----
|
|
242
|
+
safelist: [
|
|
243
|
+
'col-span-1', 'col-span-2', 'col-span-3', 'col-span-4', 'col-span-5', 'col-span-6',
|
|
244
|
+
'row-span-1', 'row-span-2', 'row-span-3', 'row-span-4',
|
|
245
|
+
'grid-cols-1', 'grid-cols-2', 'grid-cols-3', 'grid-cols-4', 'grid-cols-5', 'grid-cols-6',
|
|
246
|
+
'md:grid-cols-1', 'md:grid-cols-2', 'md:grid-cols-3', 'md:grid-cols-4', 'md:grid-cols-5', 'md:grid-cols-6',
|
|
247
|
+
'lg:grid-cols-1', 'lg:grid-cols-2', 'lg:grid-cols-3', 'lg:grid-cols-4', 'lg:grid-cols-5', 'lg:grid-cols-6',
|
|
248
|
+
'gap-0', 'gap-1', 'gap-2', 'gap-3', 'gap-4', 'gap-5', 'gap-6', 'gap-7', 'gap-8',
|
|
249
|
+
'animate-fade-in', 'animate-fade-in-up', 'animate-blob-enhanced', 'animate-shimmer',
|
|
250
|
+
'animation-delay-2000', 'animation-delay-4000',
|
|
251
|
+
'bg-slate-50', 'bg-slate-100', 'bg-slate-200',
|
|
252
|
+
'text-slate-600', 'text-slate-700', 'text-slate-800',
|
|
253
|
+
'border-slate-200', 'border-slate-300',
|
|
254
|
+
'from-slate-800', 'via-blue-700', 'to-purple-700',
|
|
255
|
+
'dark:text-white',
|
|
256
|
+
'mix-blend-screen', 'dark:mix-blend-screen',
|
|
257
|
+
'z-[100]', 'z-[150]', 'z-[200]', 'z-[250]', 'z-[300]', 'z-[400]', 'z-[500]',
|
|
258
|
+
'z-[1000]', 'z-[10000]', 'z-[10001]', 'z-[10002]', 'z-[10003]', 'z-[50000]', 'z-[100000]',
|
|
259
|
+
// Shared GeniApp AI layout tokens.
|
|
260
|
+
'grid-cols-[minmax(0,1fr)_minmax(280px,320px)]',
|
|
261
|
+
'lg:grid-cols-[1fr_minmax(280px,320px)]',
|
|
262
|
+
],
|
|
263
|
+
|
|
264
|
+
// ---- Plugins ----
|
|
265
|
+
plugins: [tailwindcssAnimate, tailwindcssTypography],
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
export const sharedScreens = preset.theme.extend.screens;
|
|
269
|
+
export default preset;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export type BusinessFieldValue = string | number | boolean | null;
|
|
2
|
+
export type BusinessRecordDraft = {
|
|
3
|
+
recordType: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
priority: string;
|
|
7
|
+
dueAt: string;
|
|
8
|
+
values: Record<string, BusinessFieldValue>;
|
|
9
|
+
};
|
|
10
|
+
export type TransitionMap = Record<string, string[]>;
|
|
11
|
+
export declare function validateTransition(currentState: string, targetState: string, transitions: TransitionMap): {
|
|
12
|
+
readonly allowed: boolean;
|
|
13
|
+
readonly allowedTargets: string[];
|
|
14
|
+
readonly reason: "TRANSITION_NOT_ALLOWED" | null;
|
|
15
|
+
};
|
|
16
|
+
export declare function validateRecordDraft(draft: BusinessRecordDraft, requiredFields: string[]): {
|
|
17
|
+
valid: boolean;
|
|
18
|
+
missing: string[];
|
|
19
|
+
};
|
|
20
|
+
export declare function calculateReconciliation(expectedValue: number, actualValue: number, tolerance: number, resolution: string): {
|
|
21
|
+
readonly variance: number;
|
|
22
|
+
readonly withinTolerance: boolean;
|
|
23
|
+
readonly state: "open" | "closed" | "explained";
|
|
24
|
+
};
|
|
25
|
+
export declare function createIdempotencyKey(operation: string, businessKey: string, revision: string): string;
|
|
26
|
+
export declare function filterBusinessRecords<T extends {
|
|
27
|
+
name: string;
|
|
28
|
+
number: string;
|
|
29
|
+
record_type: string;
|
|
30
|
+
state: string;
|
|
31
|
+
}>(rows: T[], filter: {
|
|
32
|
+
search: string;
|
|
33
|
+
recordType: string;
|
|
34
|
+
state: string;
|
|
35
|
+
}): T[];
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
function s(t, n, e) {
|
|
2
|
+
const r = e[t] || [];
|
|
3
|
+
return {
|
|
4
|
+
allowed: r.includes(n),
|
|
5
|
+
allowedTargets: r,
|
|
6
|
+
reason: r.includes(n) ? null : "TRANSITION_NOT_ALLOWED"
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
function c(t, n) {
|
|
10
|
+
const e = [];
|
|
11
|
+
t.recordType.trim() || e.push("recordType"), t.name.trim().length < 3 && e.push("name"), t.description.trim().length < 10 && e.push("description");
|
|
12
|
+
for (const r of n) {
|
|
13
|
+
const i = t.values[r];
|
|
14
|
+
(i == null || String(i).trim() === "") && e.push(r);
|
|
15
|
+
}
|
|
16
|
+
return { valid: e.length === 0, missing: e };
|
|
17
|
+
}
|
|
18
|
+
function a(t, n, e, r) {
|
|
19
|
+
if (![t, n, e].every(Number.isFinite))
|
|
20
|
+
throw new Error("RECONCILIATION_VALUE_INVALID");
|
|
21
|
+
if (e < 0) throw new Error("RECONCILIATION_TOLERANCE_INVALID");
|
|
22
|
+
const i = Number((n - t).toFixed(4)), o = Math.abs(i) <= e;
|
|
23
|
+
return {
|
|
24
|
+
variance: i,
|
|
25
|
+
withinTolerance: o,
|
|
26
|
+
state: o ? "closed" : r.trim().length >= 10 ? "explained" : "open"
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function l(t, n, e) {
|
|
30
|
+
const r = [t, n, e].map((i) => i.trim().toLowerCase().replace(/[^a-z0-9._-]+/g, "-")).filter(Boolean);
|
|
31
|
+
if (r.length !== 3) throw new Error("IDEMPOTENCY_INPUT_INVALID");
|
|
32
|
+
return r.join(":");
|
|
33
|
+
}
|
|
34
|
+
function u(t, n) {
|
|
35
|
+
const e = n.search.trim().toLocaleLowerCase();
|
|
36
|
+
return t.filter((r) => n.recordType && r.record_type !== n.recordType || n.state && r.state !== n.state ? !1 : e ? `${r.number} ${r.name}`.toLocaleLowerCase().includes(e) : !0);
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
a as calculateReconciliation,
|
|
40
|
+
l as createIdempotencyKey,
|
|
41
|
+
u as filterBusinessRecords,
|
|
42
|
+
c as validateRecordDraft,
|
|
43
|
+
s as validateTransition
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=domain.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domain.js","sources":["../../src/task-workspace/domain.ts"],"sourcesContent":["export type BusinessFieldValue = string | number | boolean | null;\n\nexport type BusinessRecordDraft = {\n recordType: string;\n name: string;\n description: string;\n priority: string;\n dueAt: string;\n values: Record<string, BusinessFieldValue>;\n};\n\nexport type TransitionMap = Record<string, string[]>;\n\nexport function validateTransition(\n currentState: string,\n targetState: string,\n transitions: TransitionMap,\n) {\n const allowed = transitions[currentState] || [];\n return {\n allowed: allowed.includes(targetState),\n allowedTargets: allowed,\n reason: allowed.includes(targetState) ? null : \"TRANSITION_NOT_ALLOWED\",\n } as const;\n}\n\nexport function validateRecordDraft(\n draft: BusinessRecordDraft,\n requiredFields: string[],\n) {\n const missing: string[] = [];\n if (!draft.recordType.trim()) missing.push(\"recordType\");\n if (draft.name.trim().length < 3) missing.push(\"name\");\n if (draft.description.trim().length < 10) missing.push(\"description\");\n for (const key of requiredFields) {\n const value = draft.values[key];\n if (value === null || value === undefined || String(value).trim() === \"\") {\n missing.push(key);\n }\n }\n return { valid: missing.length === 0, missing };\n}\n\nexport function calculateReconciliation(\n expectedValue: number,\n actualValue: number,\n tolerance: number,\n resolution: string,\n) {\n if (![expectedValue, actualValue, tolerance].every(Number.isFinite)) {\n throw new Error(\"RECONCILIATION_VALUE_INVALID\");\n }\n if (tolerance < 0) throw new Error(\"RECONCILIATION_TOLERANCE_INVALID\");\n const variance = Number((actualValue - expectedValue).toFixed(4));\n const withinTolerance = Math.abs(variance) <= tolerance;\n return {\n variance,\n withinTolerance,\n state: withinTolerance ? \"closed\" : resolution.trim().length >= 10 ? \"explained\" : \"open\",\n } as const;\n}\n\nexport function createIdempotencyKey(\n operation: string,\n businessKey: string,\n revision: string,\n) {\n const normalized = [operation, businessKey, revision]\n .map((value) => value.trim().toLowerCase().replace(/[^a-z0-9._-]+/g, \"-\"))\n .filter(Boolean);\n if (normalized.length !== 3) throw new Error(\"IDEMPOTENCY_INPUT_INVALID\");\n return normalized.join(\":\");\n}\n\nexport function filterBusinessRecords<T extends {\n name: string;\n number: string;\n record_type: string;\n state: string;\n}>(\n rows: T[],\n filter: { search: string; recordType: string; state: string },\n) {\n const search = filter.search.trim().toLocaleLowerCase();\n return rows.filter((row) => {\n if (filter.recordType && row.record_type !== filter.recordType) return false;\n if (filter.state && row.state !== filter.state) return false;\n if (!search) return true;\n return `${row.number} ${row.name}`.toLocaleLowerCase().includes(search);\n });\n}\n"],"names":["validateTransition","currentState","targetState","transitions","allowed","validateRecordDraft","draft","requiredFields","missing","key","value","calculateReconciliation","expectedValue","actualValue","tolerance","resolution","variance","withinTolerance","createIdempotencyKey","operation","businessKey","revision","normalized","filterBusinessRecords","rows","filter","search","row"],"mappings":"AAaO,SAASA,EACdC,GACAC,GACAC,GACA;AACA,QAAMC,IAAUD,EAAYF,CAAY,KAAK,CAAA;AAC7C,SAAO;AAAA,IACL,SAASG,EAAQ,SAASF,CAAW;AAAA,IACrC,gBAAgBE;AAAA,IAChB,QAAQA,EAAQ,SAASF,CAAW,IAAI,OAAO;AAAA,EAAA;AAEnD;AAEO,SAASG,EACdC,GACAC,GACA;AACA,QAAMC,IAAoB,CAAA;AAC1B,EAAKF,EAAM,WAAW,UAAQE,EAAQ,KAAK,YAAY,GACnDF,EAAM,KAAK,KAAA,EAAO,SAAS,KAAGE,EAAQ,KAAK,MAAM,GACjDF,EAAM,YAAY,KAAA,EAAO,SAAS,MAAIE,EAAQ,KAAK,aAAa;AACpE,aAAWC,KAAOF,GAAgB;AAChC,UAAMG,IAAQJ,EAAM,OAAOG,CAAG;AAC9B,KAAIC,KAAU,QAA+B,OAAOA,CAAK,EAAE,KAAA,MAAW,OACpEF,EAAQ,KAAKC,CAAG;AAAA,EAEpB;AACA,SAAO,EAAE,OAAOD,EAAQ,WAAW,GAAG,SAAAA,EAAA;AACxC;AAEO,SAASG,EACdC,GACAC,GACAC,GACAC,GACA;AACA,MAAI,CAAC,CAACH,GAAeC,GAAaC,CAAS,EAAE,MAAM,OAAO,QAAQ;AAChE,UAAM,IAAI,MAAM,8BAA8B;AAEhD,MAAIA,IAAY,EAAG,OAAM,IAAI,MAAM,kCAAkC;AACrE,QAAME,IAAW,QAAQH,IAAcD,GAAe,QAAQ,CAAC,CAAC,GAC1DK,IAAkB,KAAK,IAAID,CAAQ,KAAKF;AAC9C,SAAO;AAAA,IACL,UAAAE;AAAA,IACA,iBAAAC;AAAA,IACA,OAAOA,IAAkB,WAAWF,EAAW,OAAO,UAAU,KAAK,cAAc;AAAA,EAAA;AAEvF;AAEO,SAASG,EACdC,GACAC,GACAC,GACA;AACA,QAAMC,IAAa,CAACH,GAAWC,GAAaC,CAAQ,EACjD,IAAI,CAACX,MAAUA,EAAM,OAAO,YAAA,EAAc,QAAQ,kBAAkB,GAAG,CAAC,EACxE,OAAO,OAAO;AACjB,MAAIY,EAAW,WAAW,EAAG,OAAM,IAAI,MAAM,2BAA2B;AACxE,SAAOA,EAAW,KAAK,GAAG;AAC5B;AAEO,SAASC,EAMdC,GACAC,GACA;AACA,QAAMC,IAASD,EAAO,OAAO,KAAA,EAAO,kBAAA;AACpC,SAAOD,EAAK,OAAO,CAACG,MACdF,EAAO,cAAcE,EAAI,gBAAgBF,EAAO,cAChDA,EAAO,SAASE,EAAI,UAAUF,EAAO,QAAc,KAClDC,IACE,GAAGC,EAAI,MAAM,IAAIA,EAAI,IAAI,GAAG,oBAAoB,SAASD,CAAM,IADlD,EAErB;AACH;"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { WorkspaceField, WorkspaceOption } from './index';
|
|
2
|
+
|
|
3
|
+
export type WorkspaceExperienceLevel = "basic" | "standard" | "advanced";
|
|
4
|
+
export type WorkspaceRecordProfile = {
|
|
5
|
+
level: WorkspaceExperienceLevel;
|
|
6
|
+
fieldKeys: string[];
|
|
7
|
+
advancedFieldKeys: string[];
|
|
8
|
+
requiredFieldKeys: string[];
|
|
9
|
+
supportsReconciliation: boolean;
|
|
10
|
+
capabilityKey?: string;
|
|
11
|
+
};
|
|
12
|
+
export type WorkspaceCapability = {
|
|
13
|
+
key: string;
|
|
14
|
+
label: string;
|
|
15
|
+
description: string;
|
|
16
|
+
recordTypes: string[];
|
|
17
|
+
defaultEnabled: boolean;
|
|
18
|
+
};
|
|
19
|
+
export type WorkspaceExperience = {
|
|
20
|
+
applicationId: string;
|
|
21
|
+
recordProfiles: Record<string, WorkspaceRecordProfile>;
|
|
22
|
+
capabilities: WorkspaceCapability[];
|
|
23
|
+
copy: {
|
|
24
|
+
advancedOptions: string;
|
|
25
|
+
advancedOptionsHint: string;
|
|
26
|
+
experienceLevel: string;
|
|
27
|
+
experienceLevelHint: string;
|
|
28
|
+
optionalCapabilities: string;
|
|
29
|
+
optionalCapabilitiesHint: string;
|
|
30
|
+
basic: string;
|
|
31
|
+
standard: string;
|
|
32
|
+
advanced: string;
|
|
33
|
+
featureDisabled: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export declare function createWorkspaceExperience(applicationId: string, locale: "zh" | "en", recordTypes: readonly WorkspaceOption[], fields: readonly WorkspaceField[]): WorkspaceExperience;
|
|
37
|
+
export declare function readExperienceConfiguration(policies: Array<{
|
|
38
|
+
state: string;
|
|
39
|
+
effective_from?: string;
|
|
40
|
+
configuration?: unknown;
|
|
41
|
+
}>, experience: WorkspaceExperience): {
|
|
42
|
+
experienceLevel: WorkspaceExperienceLevel;
|
|
43
|
+
enabledFeatures: Set<string>;
|
|
44
|
+
};
|
|
45
|
+
export declare function availableRecordTypes(recordTypes: readonly WorkspaceOption[], experience: WorkspaceExperience, level: WorkspaceExperienceLevel, enabledFeatures: ReadonlySet<string>): WorkspaceOption[];
|
|
46
|
+
export declare function experiencePolicyConfiguration(experienceLevel: WorkspaceExperienceLevel, enabledFeatures: ReadonlySet<string>, experience: WorkspaceExperience): {
|
|
47
|
+
experience_level: WorkspaceExperienceLevel;
|
|
48
|
+
enabled_features: string[];
|
|
49
|
+
enabled_record_types: string[];
|
|
50
|
+
};
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { LucideIcon } from 'lucide-react';
|
|
3
|
+
import { CrossAppRecordPage } from '../hooks';
|
|
4
|
+
import { TransitionMap } from './domain';
|
|
5
|
+
import { WorkspaceExperience } from './experience';
|
|
6
|
+
|
|
7
|
+
export { availableRecordTypes, createWorkspaceExperience, experiencePolicyConfiguration, readExperienceConfiguration, } from './experience';
|
|
8
|
+
export type { WorkspaceExperience, WorkspaceExperienceLevel, WorkspaceRecordProfile } from './experience';
|
|
9
|
+
export { calculateReconciliation, createIdempotencyKey, filterBusinessRecords, validateRecordDraft, validateTransition, } from './domain';
|
|
10
|
+
export type WorkspaceRecord = {
|
|
11
|
+
id: string;
|
|
12
|
+
number: string;
|
|
13
|
+
record_type: string;
|
|
14
|
+
name: string;
|
|
15
|
+
description: string;
|
|
16
|
+
state: string;
|
|
17
|
+
priority: string;
|
|
18
|
+
source_label?: string;
|
|
19
|
+
amount?: number | string;
|
|
20
|
+
currency?: string;
|
|
21
|
+
quantity?: number | string;
|
|
22
|
+
unit?: string;
|
|
23
|
+
due_at?: string;
|
|
24
|
+
effective_from?: string;
|
|
25
|
+
effective_to?: string;
|
|
26
|
+
payload?: Record<string, unknown> | string;
|
|
27
|
+
reconciliation_state?: string;
|
|
28
|
+
open_reconciliations?: number | string;
|
|
29
|
+
updated_at?: string;
|
|
30
|
+
};
|
|
31
|
+
export type WorkspacePolicy = {
|
|
32
|
+
id: string;
|
|
33
|
+
policy_type: string;
|
|
34
|
+
code: string;
|
|
35
|
+
name: string;
|
|
36
|
+
region_code: string;
|
|
37
|
+
version: number | string;
|
|
38
|
+
state: string;
|
|
39
|
+
threshold?: number | string;
|
|
40
|
+
tolerance?: number | string;
|
|
41
|
+
effective_from?: string;
|
|
42
|
+
effective_to?: string;
|
|
43
|
+
configuration?: Record<string, unknown> | string;
|
|
44
|
+
};
|
|
45
|
+
export type WorkspaceOption = {
|
|
46
|
+
value: string;
|
|
47
|
+
label: string;
|
|
48
|
+
description?: string;
|
|
49
|
+
};
|
|
50
|
+
export type WorkspaceField = {
|
|
51
|
+
key: string;
|
|
52
|
+
label: string;
|
|
53
|
+
type: "text" | "number" | "date" | "datetime-local" | "textarea" | "select";
|
|
54
|
+
required?: boolean;
|
|
55
|
+
placeholder?: string;
|
|
56
|
+
options?: WorkspaceOption[];
|
|
57
|
+
help?: string;
|
|
58
|
+
};
|
|
59
|
+
export type WorkspaceContext = {
|
|
60
|
+
providerApp: string;
|
|
61
|
+
label: string;
|
|
62
|
+
description: string;
|
|
63
|
+
placeholder: string;
|
|
64
|
+
emptyText: string;
|
|
65
|
+
unavailableText: string;
|
|
66
|
+
forbiddenText: string;
|
|
67
|
+
loadPage: (input: {
|
|
68
|
+
search: string;
|
|
69
|
+
limit: number;
|
|
70
|
+
offset: number;
|
|
71
|
+
}) => Promise<CrossAppRecordPage>;
|
|
72
|
+
};
|
|
73
|
+
export type TaskFlow = {
|
|
74
|
+
id: string;
|
|
75
|
+
title: string;
|
|
76
|
+
description: string;
|
|
77
|
+
recordTypes: string[];
|
|
78
|
+
createLabel: string;
|
|
79
|
+
emptyText: string;
|
|
80
|
+
};
|
|
81
|
+
export type TaskWorkspaceSpec = {
|
|
82
|
+
locale: "en" | "zh";
|
|
83
|
+
title: string;
|
|
84
|
+
description: string;
|
|
85
|
+
icon: LucideIcon;
|
|
86
|
+
taskFlows: TaskFlow[];
|
|
87
|
+
recordTypes: WorkspaceOption[];
|
|
88
|
+
states: WorkspaceOption[];
|
|
89
|
+
transitions: TransitionMap;
|
|
90
|
+
fields: WorkspaceField[];
|
|
91
|
+
policyTypes: WorkspaceOption[];
|
|
92
|
+
context?: WorkspaceContext;
|
|
93
|
+
finalStates: string[];
|
|
94
|
+
help: Array<{
|
|
95
|
+
title: string;
|
|
96
|
+
body: string;
|
|
97
|
+
steps: string[];
|
|
98
|
+
}>;
|
|
99
|
+
experience: WorkspaceExperience;
|
|
100
|
+
copy: {
|
|
101
|
+
refresh: string;
|
|
102
|
+
help: string;
|
|
103
|
+
close: string;
|
|
104
|
+
createRecord: string;
|
|
105
|
+
createPolicy: string;
|
|
106
|
+
queue: string;
|
|
107
|
+
policies: string;
|
|
108
|
+
allTypes: string;
|
|
109
|
+
allStates: string;
|
|
110
|
+
search: string;
|
|
111
|
+
empty: string;
|
|
112
|
+
loading: string;
|
|
113
|
+
loadError: string;
|
|
114
|
+
saveError: string;
|
|
115
|
+
saved: string;
|
|
116
|
+
fields: {
|
|
117
|
+
type: string;
|
|
118
|
+
name: string;
|
|
119
|
+
description: string;
|
|
120
|
+
priority: string;
|
|
121
|
+
dueAt: string;
|
|
122
|
+
source: string;
|
|
123
|
+
state: string;
|
|
124
|
+
updated: string;
|
|
125
|
+
action: string;
|
|
126
|
+
evidence: string;
|
|
127
|
+
expected: string;
|
|
128
|
+
actual: string;
|
|
129
|
+
tolerance: string;
|
|
130
|
+
resolution: string;
|
|
131
|
+
policyType: string;
|
|
132
|
+
code: string;
|
|
133
|
+
region: string;
|
|
134
|
+
version: string;
|
|
135
|
+
effectiveFrom: string;
|
|
136
|
+
threshold: string;
|
|
137
|
+
};
|
|
138
|
+
metrics: {
|
|
139
|
+
active: string;
|
|
140
|
+
review: string;
|
|
141
|
+
exception: string;
|
|
142
|
+
closed: string;
|
|
143
|
+
};
|
|
144
|
+
metricsLabel: string;
|
|
145
|
+
priorities: readonly WorkspaceOption[];
|
|
146
|
+
actions: {
|
|
147
|
+
save: string;
|
|
148
|
+
cancel: string;
|
|
149
|
+
advance: string;
|
|
150
|
+
reconcile: string;
|
|
151
|
+
select: string;
|
|
152
|
+
};
|
|
153
|
+
validation: string;
|
|
154
|
+
evidenceHint: string;
|
|
155
|
+
reconciliationHint: string;
|
|
156
|
+
noNextAction: string;
|
|
157
|
+
policyIntro: string;
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
export type TaskWorkspaceApi = {
|
|
161
|
+
queryRecords: () => Promise<WorkspaceRecord[]>;
|
|
162
|
+
queryPolicies: () => Promise<WorkspacePolicy[]>;
|
|
163
|
+
createRecord: (payload: Record<string, unknown>) => Promise<unknown>;
|
|
164
|
+
transitionRecord: (payload: Record<string, unknown>) => Promise<unknown>;
|
|
165
|
+
reconcileRecord: (payload: Record<string, unknown>) => Promise<unknown>;
|
|
166
|
+
savePolicy: (payload: Record<string, unknown>) => Promise<unknown>;
|
|
167
|
+
};
|
|
168
|
+
export declare function TaskWorkspace({ spec, api, footer, }: {
|
|
169
|
+
spec: TaskWorkspaceSpec;
|
|
170
|
+
api: TaskWorkspaceApi;
|
|
171
|
+
footer?: ReactNode;
|
|
172
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './task-workspace/index';
|