@oronts/vendure-data-hub-plugin 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (235) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/dashboard/components/common/ConnectionConfigEditor.tsx +589 -0
  3. package/dist/dashboard/components/common/HeadersEditor.tsx +90 -0
  4. package/dist/dashboard/components/common/ValidationFeedback.tsx +17 -0
  5. package/dist/dashboard/components/common/index.ts +10 -0
  6. package/dist/dashboard/components/pipelines/PipelineEditor.tsx +504 -0
  7. package/dist/dashboard/components/pipelines/PipelineExport.tsx +63 -0
  8. package/dist/dashboard/components/pipelines/PipelineImport.tsx +87 -0
  9. package/dist/dashboard/components/pipelines/ReactFlowPipelineEditor.tsx +539 -0
  10. package/dist/dashboard/components/pipelines/shared/NodePropertiesPanel.tsx +146 -0
  11. package/dist/dashboard/components/pipelines/shared/PipelineNode.tsx +155 -0
  12. package/dist/dashboard/components/pipelines/shared/PipelineSettingsPanel.tsx +392 -0
  13. package/dist/dashboard/components/pipelines/shared/StepListItem.tsx +144 -0
  14. package/dist/dashboard/components/pipelines/shared/index.ts +33 -0
  15. package/dist/dashboard/components/pipelines/shared/visual-node-config.ts +169 -0
  16. package/dist/dashboard/components/shared/LoadMoreButton.tsx +18 -0
  17. package/dist/dashboard/components/shared/entity-selector/EntitySelector.tsx +59 -0
  18. package/dist/dashboard/components/shared/entity-selector/index.ts +1 -0
  19. package/dist/dashboard/components/shared/error-boundary/ErrorBoundary.tsx +90 -0
  20. package/dist/dashboard/components/shared/error-boundary/index.ts +1 -0
  21. package/dist/dashboard/components/shared/feedback/EmptyState.tsx +36 -0
  22. package/dist/dashboard/components/shared/feedback/ErrorState.tsx +69 -0
  23. package/dist/dashboard/components/shared/feedback/LoadingState.tsx +104 -0
  24. package/dist/dashboard/components/shared/feedback/ValidationErrorDisplay.tsx +29 -0
  25. package/dist/dashboard/components/shared/feedback/index.ts +4 -0
  26. package/dist/dashboard/components/shared/file-dropzone/FileDropzone.tsx +167 -0
  27. package/dist/dashboard/components/shared/file-dropzone/index.ts +1 -0
  28. package/dist/dashboard/components/shared/filter-conditions-editor/FilterConditionsEditor.tsx +226 -0
  29. package/dist/dashboard/components/shared/filter-conditions-editor/index.ts +1 -0
  30. package/dist/dashboard/components/shared/index.ts +45 -0
  31. package/dist/dashboard/components/shared/schema-form/SchemaFormRenderer.tsx +248 -0
  32. package/dist/dashboard/components/shared/schema-form/fields/BooleanField.tsx +26 -0
  33. package/dist/dashboard/components/shared/schema-form/fields/FieldWrapper.tsx +28 -0
  34. package/dist/dashboard/components/shared/schema-form/fields/FileUploadField.tsx +171 -0
  35. package/dist/dashboard/components/shared/schema-form/fields/JsonField.tsx +132 -0
  36. package/dist/dashboard/components/shared/schema-form/fields/NumberField.tsx +33 -0
  37. package/dist/dashboard/components/shared/schema-form/fields/SelectField.tsx +70 -0
  38. package/dist/dashboard/components/shared/schema-form/fields/StringField.tsx +36 -0
  39. package/dist/dashboard/components/shared/schema-form/fields/TextareaField.tsx +31 -0
  40. package/dist/dashboard/components/shared/schema-form/fields/index.ts +23 -0
  41. package/dist/dashboard/components/shared/schema-form/index.ts +2 -0
  42. package/dist/dashboard/components/shared/schema-form/utils.ts +3 -0
  43. package/dist/dashboard/components/shared/selectable-card/SelectableCard.tsx +65 -0
  44. package/dist/dashboard/components/shared/selectable-card/index.ts +1 -0
  45. package/dist/dashboard/components/shared/stat-card/StatCard.tsx +121 -0
  46. package/dist/dashboard/components/shared/stat-card/index.ts +1 -0
  47. package/dist/dashboard/components/shared/step-config/AdapterRequiredWarning.tsx +25 -0
  48. package/dist/dashboard/components/shared/step-config/AdapterSelector.tsx +109 -0
  49. package/dist/dashboard/components/shared/step-config/AdvancedEditors.tsx +634 -0
  50. package/dist/dashboard/components/shared/step-config/EnrichConfigComponent.tsx +295 -0
  51. package/dist/dashboard/components/shared/step-config/ExtractTestResults.tsx +143 -0
  52. package/dist/dashboard/components/shared/step-config/GateConfigComponent.tsx +127 -0
  53. package/dist/dashboard/components/shared/step-config/LoadTestResults.tsx +104 -0
  54. package/dist/dashboard/components/shared/step-config/OperatorCard.tsx +266 -0
  55. package/dist/dashboard/components/shared/step-config/OperatorCheatSheetButton.tsx +54 -0
  56. package/dist/dashboard/components/shared/step-config/OperatorFieldInput.tsx +209 -0
  57. package/dist/dashboard/components/shared/step-config/RetrySettingsComponent.tsx +111 -0
  58. package/dist/dashboard/components/shared/step-config/RouteConfigComponent.tsx +125 -0
  59. package/dist/dashboard/components/shared/step-config/StepConfigPanel.tsx +564 -0
  60. package/dist/dashboard/components/shared/step-config/StepTester.tsx +165 -0
  61. package/dist/dashboard/components/shared/step-config/TestResultContainer.tsx +57 -0
  62. package/dist/dashboard/components/shared/step-config/TransformTestResults.tsx +130 -0
  63. package/dist/dashboard/components/shared/step-config/ValidateConfigComponent.tsx +334 -0
  64. package/dist/dashboard/components/shared/step-config/index.ts +29 -0
  65. package/dist/dashboard/components/shared/step-config/step-test-handlers.ts +297 -0
  66. package/dist/dashboard/components/shared/trigger-config/TriggerForm.tsx +478 -0
  67. package/dist/dashboard/components/shared/trigger-config/index.ts +1 -0
  68. package/dist/dashboard/components/shared/triggers-panel/TriggersPanel.tsx +281 -0
  69. package/dist/dashboard/components/shared/triggers-panel/index.ts +1 -0
  70. package/dist/dashboard/components/shared/wizard/ConfigurationNameCard.tsx +59 -0
  71. package/dist/dashboard/components/shared/wizard/SummaryCard.tsx +53 -0
  72. package/dist/dashboard/components/shared/wizard/WizardFooter.tsx +47 -0
  73. package/dist/dashboard/components/shared/wizard/WizardProgressBar.tsx +78 -0
  74. package/dist/dashboard/components/shared/wizard/index.ts +4 -0
  75. package/dist/dashboard/components/shared/wizard-trigger/TriggerSchemaFields.tsx +128 -0
  76. package/dist/dashboard/components/shared/wizard-trigger/TriggerSelector.tsx +33 -0
  77. package/dist/dashboard/components/shared/wizard-trigger/index.ts +2 -0
  78. package/dist/dashboard/components/templates/TemplateGallery.tsx +210 -0
  79. package/dist/dashboard/components/templates/TemplatePreview.tsx +214 -0
  80. package/dist/dashboard/components/templates/index.ts +4 -0
  81. package/dist/dashboard/components/wizards/export-wizard/DestinationStep.tsx +207 -0
  82. package/dist/dashboard/components/wizards/export-wizard/ExportWizard.tsx +221 -0
  83. package/dist/dashboard/components/wizards/export-wizard/FieldsStep.tsx +159 -0
  84. package/dist/dashboard/components/wizards/export-wizard/FormatStep.tsx +246 -0
  85. package/dist/dashboard/components/wizards/export-wizard/ReviewStep.tsx +231 -0
  86. package/dist/dashboard/components/wizards/export-wizard/SourceStep.tsx +154 -0
  87. package/dist/dashboard/components/wizards/export-wizard/TriggerStep.tsx +234 -0
  88. package/dist/dashboard/components/wizards/export-wizard/constants.ts +73 -0
  89. package/dist/dashboard/components/wizards/export-wizard/index.ts +2 -0
  90. package/dist/dashboard/components/wizards/export-wizard/types.ts +39 -0
  91. package/dist/dashboard/components/wizards/import-wizard/ImportWizard.tsx +350 -0
  92. package/dist/dashboard/components/wizards/import-wizard/MappingStep.tsx +286 -0
  93. package/dist/dashboard/components/wizards/import-wizard/PreviewStep.tsx +79 -0
  94. package/dist/dashboard/components/wizards/import-wizard/ReviewStep.tsx +266 -0
  95. package/dist/dashboard/components/wizards/import-wizard/SourceStep.tsx +537 -0
  96. package/dist/dashboard/components/wizards/import-wizard/StrategyStep.tsx +328 -0
  97. package/dist/dashboard/components/wizards/import-wizard/TargetStep.tsx +76 -0
  98. package/dist/dashboard/components/wizards/import-wizard/TemplateStep.tsx +116 -0
  99. package/dist/dashboard/components/wizards/import-wizard/TransformStep.tsx +666 -0
  100. package/dist/dashboard/components/wizards/import-wizard/TriggerStep.tsx +51 -0
  101. package/dist/dashboard/components/wizards/import-wizard/constants.ts +104 -0
  102. package/dist/dashboard/components/wizards/import-wizard/index.ts +3 -0
  103. package/dist/dashboard/components/wizards/import-wizard/types.ts +35 -0
  104. package/dist/dashboard/components/wizards/index.ts +7 -0
  105. package/dist/dashboard/components/wizards/shared/WizardStepContainer.tsx +27 -0
  106. package/dist/dashboard/components/wizards/shared/constants.ts +16 -0
  107. package/dist/dashboard/components/wizards/shared/index.ts +10 -0
  108. package/dist/dashboard/constants/colors.ts +25 -0
  109. package/dist/dashboard/constants/connection-defaults.ts +7 -0
  110. package/dist/dashboard/constants/connection-types.ts +1 -0
  111. package/dist/dashboard/constants/defaults.ts +18 -0
  112. package/dist/dashboard/constants/editor.ts +69 -0
  113. package/dist/dashboard/constants/enum-maps.ts +18 -0
  114. package/dist/dashboard/constants/fallbacks.ts +44 -0
  115. package/dist/dashboard/constants/file-format-registry.ts +206 -0
  116. package/dist/dashboard/constants/index.ts +24 -0
  117. package/dist/dashboard/constants/navigation.ts +29 -0
  118. package/dist/dashboard/constants/permissions.ts +41 -0
  119. package/dist/dashboard/constants/placeholders.ts +77 -0
  120. package/dist/dashboard/constants/routes.ts +12 -0
  121. package/dist/dashboard/constants/run-status.ts +1 -0
  122. package/dist/dashboard/constants/sentinel-values.ts +12 -0
  123. package/dist/dashboard/constants/step-configs.ts +9 -0
  124. package/dist/dashboard/constants/step-mappings.ts +170 -0
  125. package/dist/dashboard/constants/steps.ts +37 -0
  126. package/dist/dashboard/constants/toast-messages.ts +149 -0
  127. package/dist/dashboard/constants/triggers.ts +5 -0
  128. package/dist/dashboard/constants/ui-config.ts +139 -0
  129. package/dist/dashboard/constants/ui-dimensions.ts +145 -0
  130. package/dist/dashboard/constants/ui-states.ts +28 -0
  131. package/dist/dashboard/constants/ui-types.ts +85 -0
  132. package/dist/dashboard/constants/validation-patterns.ts +26 -0
  133. package/dist/dashboard/gql/gql.ts +370 -0
  134. package/dist/dashboard/gql/graphql.ts +10378 -0
  135. package/dist/dashboard/gql/index.ts +1 -0
  136. package/dist/dashboard/hooks/api/index.ts +115 -0
  137. package/dist/dashboard/hooks/api/mutation-helpers.ts +34 -0
  138. package/dist/dashboard/hooks/api/use-adapters.ts +92 -0
  139. package/dist/dashboard/hooks/api/use-config-options.ts +513 -0
  140. package/dist/dashboard/hooks/api/use-connections.ts +84 -0
  141. package/dist/dashboard/hooks/api/use-entity-field-schemas.ts +99 -0
  142. package/dist/dashboard/hooks/api/use-entity-loaders.ts +45 -0
  143. package/dist/dashboard/hooks/api/use-hooks.ts +68 -0
  144. package/dist/dashboard/hooks/api/use-logs.ts +102 -0
  145. package/dist/dashboard/hooks/api/use-pipeline-runs.ts +221 -0
  146. package/dist/dashboard/hooks/api/use-pipelines.ts +279 -0
  147. package/dist/dashboard/hooks/api/use-queues.ts +141 -0
  148. package/dist/dashboard/hooks/api/use-secrets.ts +75 -0
  149. package/dist/dashboard/hooks/api/use-settings.ts +55 -0
  150. package/dist/dashboard/hooks/api/use-step-tester.ts +79 -0
  151. package/dist/dashboard/hooks/index.ts +13 -0
  152. package/dist/dashboard/hooks/use-adapter-catalog.ts +253 -0
  153. package/dist/dashboard/hooks/use-export-templates.ts +80 -0
  154. package/dist/dashboard/hooks/use-import-templates.ts +139 -0
  155. package/dist/dashboard/hooks/use-load-more.ts +29 -0
  156. package/dist/dashboard/hooks/use-stable-keys.ts +54 -0
  157. package/dist/dashboard/hooks/use-trigger-types.ts +100 -0
  158. package/dist/dashboard/hooks/use-wizard-navigation.ts +128 -0
  159. package/dist/dashboard/index.tsx +55 -0
  160. package/dist/dashboard/routes/adapters/AdapterCard.tsx +102 -0
  161. package/dist/dashboard/routes/adapters/AdapterConstants.tsx +20 -0
  162. package/dist/dashboard/routes/adapters/AdapterDetail.tsx +208 -0
  163. package/dist/dashboard/routes/adapters/AdapterTypeSection.tsx +105 -0
  164. package/dist/dashboard/routes/adapters/AdaptersPage.tsx +276 -0
  165. package/dist/dashboard/routes/adapters/AdaptersTable.tsx +107 -0
  166. package/dist/dashboard/routes/adapters/index.ts +1 -0
  167. package/dist/dashboard/routes/connections/ConnectionDetail.tsx +218 -0
  168. package/dist/dashboard/routes/connections/ConnectionsList.tsx +34 -0
  169. package/dist/dashboard/routes/connections/index.ts +2 -0
  170. package/dist/dashboard/routes/hooks/Hooks.tsx +425 -0
  171. package/dist/dashboard/routes/hooks/hook-stages.ts +52 -0
  172. package/dist/dashboard/routes/hooks/index.ts +1 -0
  173. package/dist/dashboard/routes/index.ts +8 -0
  174. package/dist/dashboard/routes/logs/Logs.tsx +93 -0
  175. package/dist/dashboard/routes/logs/components/LogDetailDrawer.tsx +118 -0
  176. package/dist/dashboard/routes/logs/components/LogExplorerTab.tsx +367 -0
  177. package/dist/dashboard/routes/logs/components/LogLevelBadge.tsx +34 -0
  178. package/dist/dashboard/routes/logs/components/LogTableRow.tsx +70 -0
  179. package/dist/dashboard/routes/logs/components/LogsOverviewTab.tsx +178 -0
  180. package/dist/dashboard/routes/logs/components/RealtimeLogTab.tsx +122 -0
  181. package/dist/dashboard/routes/logs/index.ts +1 -0
  182. package/dist/dashboard/routes/pipelines/ErrorAuditList.tsx +39 -0
  183. package/dist/dashboard/routes/pipelines/ExportWizardPage.tsx +96 -0
  184. package/dist/dashboard/routes/pipelines/ImportWizardPage.tsx +104 -0
  185. package/dist/dashboard/routes/pipelines/PipelineDetail.tsx +211 -0
  186. package/dist/dashboard/routes/pipelines/PipelineRunsBlock.tsx +377 -0
  187. package/dist/dashboard/routes/pipelines/PipelinesList.tsx +87 -0
  188. package/dist/dashboard/routes/pipelines/RetryPatchHelper.tsx +51 -0
  189. package/dist/dashboard/routes/pipelines/RunDetailsPanel.tsx +238 -0
  190. package/dist/dashboard/routes/pipelines/RunErrorsList.tsx +116 -0
  191. package/dist/dashboard/routes/pipelines/StepCounters.tsx +24 -0
  192. package/dist/dashboard/routes/pipelines/StepSummaryTable.tsx +36 -0
  193. package/dist/dashboard/routes/pipelines/components/DryRunDialog.tsx +341 -0
  194. package/dist/dashboard/routes/pipelines/components/PipelineActionButtons.tsx +201 -0
  195. package/dist/dashboard/routes/pipelines/components/PipelineEditorToggle.tsx +116 -0
  196. package/dist/dashboard/routes/pipelines/components/PipelineFormFields.tsx +156 -0
  197. package/dist/dashboard/routes/pipelines/components/PipelineWebhookInfo.tsx +111 -0
  198. package/dist/dashboard/routes/pipelines/components/ReviewActionsPanel.tsx +342 -0
  199. package/dist/dashboard/routes/pipelines/components/ValidationPanel.tsx +121 -0
  200. package/dist/dashboard/routes/pipelines/components/VersionHistoryDialog.tsx +131 -0
  201. package/dist/dashboard/routes/pipelines/components/index.ts +25 -0
  202. package/dist/dashboard/routes/pipelines/hooks/index.ts +1 -0
  203. package/dist/dashboard/routes/pipelines/hooks/use-pipeline-validation.ts +114 -0
  204. package/dist/dashboard/routes/pipelines/index.ts +4 -0
  205. package/dist/dashboard/routes/pipelines/utils/index.ts +1 -0
  206. package/dist/dashboard/routes/pipelines/utils/pipeline-conversion.ts +261 -0
  207. package/dist/dashboard/routes/queues/ConsumersTable.tsx +134 -0
  208. package/dist/dashboard/routes/queues/DeadLettersTable.tsx +118 -0
  209. package/dist/dashboard/routes/queues/FailedRunsTable.tsx +74 -0
  210. package/dist/dashboard/routes/queues/QueuesPage.tsx +290 -0
  211. package/dist/dashboard/routes/queues/index.ts +1 -0
  212. package/dist/dashboard/routes/queues/types.ts +22 -0
  213. package/dist/dashboard/routes/secrets/SecretDetail.tsx +278 -0
  214. package/dist/dashboard/routes/secrets/SecretsList.tsx +34 -0
  215. package/dist/dashboard/routes/secrets/index.ts +2 -0
  216. package/dist/dashboard/routes/settings/Settings.tsx +343 -0
  217. package/dist/dashboard/routes/settings/index.ts +1 -0
  218. package/dist/dashboard/types/index.ts +89 -0
  219. package/dist/dashboard/types/pipeline.ts +51 -0
  220. package/dist/dashboard/types/ui-types.ts +400 -0
  221. package/dist/dashboard/types/wizard.ts +235 -0
  222. package/dist/dashboard/utils/adapter-grouping.ts +43 -0
  223. package/dist/dashboard/utils/column-analysis.ts +11 -0
  224. package/dist/dashboard/utils/field-preparation.ts +31 -0
  225. package/dist/dashboard/utils/form-validation.ts +373 -0
  226. package/dist/dashboard/utils/formatters.ts +92 -0
  227. package/dist/dashboard/utils/icon-resolver.ts +35 -0
  228. package/dist/dashboard/utils/index.ts +60 -0
  229. package/dist/dashboard/utils/query-key-factory.ts +54 -0
  230. package/dist/dashboard/utils/step-helpers.ts +32 -0
  231. package/dist/dashboard/utils/string-helpers.ts +4 -0
  232. package/dist/dashboard/utils/template-helpers.ts +26 -0
  233. package/dist/dashboard/utils/trigger-sync.ts +138 -0
  234. package/dist/dashboard/utils/wizard-to-pipeline.ts +569 -0
  235. package/package.json +4 -4
@@ -0,0 +1,139 @@
1
+ /**
2
+ * Polling intervals in milliseconds for real-time data updates.
3
+ * These values balance responsiveness with server load.
4
+ */
5
+ export const POLLING_INTERVALS = {
6
+ /** Queue status polling: 5 seconds */
7
+ QUEUES: 5000,
8
+ /** Pipeline runs list polling: 5 seconds */
9
+ PIPELINE_RUNS: 5000,
10
+ /** Individual run details polling: 3 seconds (more frequent for active monitoring) */
11
+ PIPELINE_RUN_DETAILS: 3000,
12
+ /** Run errors list polling: 5 seconds */
13
+ RUN_ERRORS: 5000,
14
+ /** Analytics data polling: 10 seconds */
15
+ ANALYTICS: 10000,
16
+ /** Log entries polling: 30 seconds */
17
+ LOGS: 30000,
18
+ /** Live log streaming polling: 3 seconds */
19
+ LIVE_LOGS: 3000,
20
+ /** Error audit data polling: 10 seconds */
21
+ ERROR_AUDITS: 10000,
22
+ /** Default polling interval: 5 seconds */
23
+ DEFAULT: 5000,
24
+ /** Active run monitoring polling: 2 seconds (most frequent for real-time feedback) */
25
+ ACTIVE_RUN: 2000,
26
+ /** Events list polling: 5 seconds */
27
+ EVENTS: 5000,
28
+ /** Queue consumers polling: 5 seconds */
29
+ CONSUMERS: 5000,
30
+ } as const;
31
+
32
+ export const UI_LIMITS = {
33
+ MAX_PREVIEW_ROWS: 100,
34
+ MAX_LOG_ENTRIES: 1000,
35
+ TRUNCATE_LENGTH: 50,
36
+ PREVIEW_ROW_LIMIT: 10,
37
+ SAMPLE_VALUES_LIMIT: 3,
38
+ CELL_TRUNCATE_LIMIT: 50,
39
+ REALTIME_LOG_LIMIT: 50,
40
+ TIMELINE_LIMIT: 20,
41
+ /** Max records shown in test result tables */
42
+ TABLE_PREVIEW_ROWS: 20,
43
+ /** Max columns shown in test result tables */
44
+ TABLE_PREVIEW_COLUMNS: 8,
45
+ /** Max records shown in before/after diff views */
46
+ DIFF_PREVIEW_RECORDS: 5,
47
+ /** Max sample values shown in column analysis */
48
+ COLUMN_SAMPLE_VALUES: 5,
49
+ } as const;
50
+
51
+ export const BATCH_SIZES = {
52
+ IMPORT_DEFAULT: 100,
53
+ EXPORT_DEFAULT: 1000,
54
+ } as const;
55
+
56
+ export const QUERY_LIMITS = {
57
+ /** Maximum items when fetching "all" records (safety limit to prevent memory issues) */
58
+ ALL_ITEMS: 999,
59
+ /** Maximum secrets to fetch in a single list query */
60
+ SECRETS_LIST: 200,
61
+ /** Default limit for export queries */
62
+ EXPORT_DEFAULT: 10000,
63
+ /** Default page size for paginated lists */
64
+ PAGINATION_DEFAULT: 10,
65
+ } as const;
66
+
67
+ export const CACHE_TIMES = {
68
+ /** Adapter catalog cache duration: 5 minutes */
69
+ ADAPTER_CATALOG: 5 * 60 * 1000,
70
+ /** Vendure schema cache duration: 10 minutes */
71
+ VENDURE_SCHEMAS: 10 * 60 * 1000,
72
+ } as const;
73
+
74
+ export const EDITOR_HEIGHTS = {
75
+ VISUAL: '600px',
76
+ SIMPLE: '500px',
77
+ } as const;
78
+
79
+ export const PIPELINE_STATUS = {
80
+ PUBLISHED: 'PUBLISHED',
81
+ REVIEW: 'REVIEW',
82
+ DRAFT: 'DRAFT',
83
+ ARCHIVED: 'ARCHIVED',
84
+ } as const;
85
+
86
+ /** UI-only: maps pipeline status to Shadcn badge variant for CSS styling. Not a config fallback. */
87
+ const PIPELINE_STATUS_VARIANTS = {
88
+ PUBLISHED: 'default',
89
+ REVIEW: 'outline',
90
+ DRAFT: 'secondary',
91
+ ARCHIVED: 'destructive',
92
+ } as const;
93
+
94
+ export type PipelineStatus = keyof typeof PIPELINE_STATUS_VARIANTS;
95
+ export type BadgeVariant = typeof PIPELINE_STATUS_VARIANTS[PipelineStatus];
96
+
97
+ export function getStatusBadgeVariant(status: string): BadgeVariant {
98
+ return PIPELINE_STATUS_VARIANTS[status as PipelineStatus] ?? 'secondary';
99
+ }
100
+
101
+ /** UI-only: maps run status to Shadcn badge variant for CSS styling. Not a config fallback. */
102
+ const RUN_STATUS_VARIANTS: Record<string, string> = {
103
+ COMPLETED: 'default',
104
+ RUNNING: 'outline',
105
+ PENDING: 'secondary',
106
+ PAUSED: 'outline',
107
+ FAILED: 'destructive',
108
+ CANCELLED: 'secondary',
109
+ CANCEL_REQUESTED: 'secondary',
110
+ TIMEOUT: 'destructive',
111
+ };
112
+
113
+ export function getRunStatusBadgeVariant(status: string): string {
114
+ return RUN_STATUS_VARIANTS[status] ?? 'secondary';
115
+ }
116
+
117
+ /** UI-only: maps operator names to placeholder text for input fields. Not a config fallback. */
118
+ const OPERATOR_PLACEHOLDERS: Record<string, string> = {
119
+ in: 'JSON array, e.g. ["A","B"]',
120
+ regex: 'regex pattern',
121
+ default: 'value',
122
+ } as const;
123
+
124
+ export function getOperatorPlaceholder(operator: string): string {
125
+ return OPERATOR_PLACEHOLDERS[operator.toLowerCase()] ?? OPERATOR_PLACEHOLDERS.default;
126
+ }
127
+
128
+
129
+ /**
130
+ * Filter dropdown sentinel values.
131
+ * Used for filter select components where "All" represents no filter applied.
132
+ * Note: For form field empty states, use SENTINEL_VALUES from sentinel-values.ts.
133
+ */
134
+ export const FILTER_VALUES = {
135
+ /** Represents "All" or no filter - maps to empty string when querying */
136
+ ALL: '__all__',
137
+ } as const;
138
+
139
+ export const CONNECTION_DEFAULT_TYPE = 'HTTP';
@@ -0,0 +1,145 @@
1
+ /**
2
+ * Debounce delays in milliseconds for various input validations.
3
+ * Standard delay of 300ms balances responsiveness with avoiding excessive re-validation.
4
+ */
5
+ export const DEBOUNCE_DELAYS = {
6
+ /** JSON validation debounce: 300ms */
7
+ JSON_VALIDATION: 300,
8
+ /** Form field validation debounce: 300ms */
9
+ FORM_VALIDATION: 300,
10
+ /** Default debounce delay: 300ms */
11
+ DEFAULT: 300,
12
+ } as const;
13
+
14
+ export const COMPONENT_HEIGHTS = {
15
+ DIALOG_MAX_LG: 'max-h-[85vh]',
16
+ DIALOG_MAX_MD: 'max-h-[80vh]',
17
+ DIALOG_MAX_SM: 'max-h-[60vh]',
18
+ SCROLL_AREA_LG: 'max-h-[600px]',
19
+ SCROLL_AREA_MD: 'max-h-[400px]',
20
+ SCROLL_AREA_SM: 'max-h-[300px]',
21
+ SCROLL_AREA_XS: 'max-h-[200px]',
22
+ SCROLL_AREA_XXS: 'max-h-[120px]',
23
+ CHART_MD: 'h-[500px]',
24
+ EDITOR_PANE_MD: 'h-[400px]',
25
+ LIST_PANE_SM: 'h-[200px]',
26
+ LIST_PANE_MD: 'h-[300px]',
27
+ WIZARD_PANE_MD: 'h-[500px]',
28
+ CODE_EDITOR_MIN: 'min-h-[260px]',
29
+ CODE_DISPLAY_MIN: 'min-h-[200px]',
30
+ CODE_BLOCK_MIN: 'min-h-[160px]',
31
+ CODE_BLOCK_XS: 'min-h-[100px]',
32
+ CODE_BLOCK_SM: 'min-h-[120px]',
33
+ CODE_BLOCK_MD: 'min-h-[140px]',
34
+ FORMULA_HELP_SCROLL: 'h-[200px]',
35
+ } as const;
36
+
37
+ export const COMPONENT_WIDTHS = {
38
+ DRAWER_LG: 'w-[540px]',
39
+ DRAWER_MD: 'w-[400px]',
40
+ SELECT_SM: 'w-[250px]',
41
+ SELECT_XS: 'w-[160px]',
42
+ TABLE_CELL_MAX_LG: 'max-w-[640px]',
43
+ TABLE_CELL_MAX_SM: 'max-w-[300px]',
44
+ TABLE_HEADER_MIN: 'min-w-[120px]',
45
+ NODE_MIN: 'min-w-[150px]',
46
+ TYPECAST_SELECT: 'w-32',
47
+ LOGIC_SELECT: 'w-20',
48
+ OPERATOR_SELECT: 'w-32',
49
+ AGGREGATION_SELECT: 'w-28',
50
+ ALIAS_INPUT: 'w-32',
51
+ } as const;
52
+
53
+ export const ICON_SIZES = {
54
+ XS: 'w-3 h-3',
55
+ SM: 'w-4 h-4',
56
+ MD: 'w-5 h-5',
57
+ LG: 'w-6 h-6',
58
+ XL: 'w-8 h-8',
59
+ XXL: 'w-10 h-10',
60
+ HERO: 'w-12 h-12',
61
+ } as const;
62
+
63
+ export const NODE_DIMENSIONS = {
64
+ MIN_WIDTH: 'min-w-[180px]',
65
+ HANDLE_SIZE: '!w-3 !h-3',
66
+ ICON_SM: 'w-4 h-4',
67
+ } as const;
68
+
69
+ /**
70
+ * File dropzone dimensions
71
+ */
72
+ export const DROPZONE_DIMENSIONS = {
73
+ ICON_DEFAULT: 'w-12 h-12',
74
+ ICON_COMPACT: 'w-8 h-8',
75
+ PADDING_DEFAULT: 'p-12',
76
+ PADDING_COMPACT: 'p-6',
77
+ FILE_ICON_DEFAULT: 'w-10 h-10',
78
+ FILE_ICON_COMPACT: 'w-8 h-8',
79
+ } as const;
80
+
81
+ /**
82
+ * Wizard progress bar styles
83
+ */
84
+ export const PROGRESS_BAR_STYLES = {
85
+ ACTIVE: 'bg-primary text-primary-foreground',
86
+ COMPLETED: 'bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400',
87
+ PENDING: 'text-muted-foreground hover:bg-muted',
88
+ } as const;
89
+
90
+ export const SKELETON_WIDTHS = [80, 120, 100, 140] as const;
91
+
92
+ /**
93
+ * Panel widths for drawers and side panels
94
+ */
95
+ export const PANEL_WIDTHS = {
96
+ PROPERTIES_DEFAULT: '420px',
97
+ NODE_PALETTE: 'w-[260px]',
98
+ MAX_VW: '90vw',
99
+ } as const;
100
+
101
+ /**
102
+ * Dialog content dimensions
103
+ */
104
+ export const DIALOG_DIMENSIONS = {
105
+ MAX_WIDTH_2XL: 'max-w-2xl',
106
+ MAX_WIDTH_4XL: 'max-w-4xl',
107
+ MAX_HEIGHT_80VH: 'max-h-[80vh]',
108
+ MAX_HEIGHT_85VH: 'max-h-[85vh]',
109
+ } as const;
110
+
111
+ /**
112
+ * Select component widths
113
+ */
114
+ export const SELECT_WIDTHS = {
115
+ TRIGGER_TYPE: 'w-[180px]',
116
+ PROVIDER: 'w-[220px]',
117
+ CONNECTION_TYPE: 'w-[250px]',
118
+ RUN_STATUS: 'w-[160px]',
119
+ ADAPTER_SELECTOR: 'w-[400px]',
120
+ } as const;
121
+
122
+ /**
123
+ * Scroll area heights
124
+ */
125
+ export const SCROLL_HEIGHTS = {
126
+ PROPERTIES_PANEL: 'h-[calc(100vh-80px)]',
127
+ NODE_PALETTE: 'h-full',
128
+ REALTIME_LOGS: 'max-h-[600px]',
129
+ DRY_RUN_RESULTS: 'max-h-[300px]',
130
+ VALIDATION_PANEL: 'max-h-[60vh]',
131
+ } as const;
132
+
133
+ /**
134
+ * Text area heights
135
+ */
136
+ export const TEXTAREA_HEIGHTS = {
137
+ CODE_EXPORT_MIN: 'min-h-[200px]',
138
+ CODE_EXPORT_MAX: 'max-h-[400px]',
139
+ ADAPTER_SCHEMA: 'min-h-[160px]',
140
+ } as const;
141
+
142
+ /**
143
+ * Default number of items to display per page in paginated lists.
144
+ */
145
+ export const ITEMS_PER_PAGE = 20;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Dashboard UI state constants
3
+ */
4
+
5
+ /** Pipeline editor panel types */
6
+ export const PIPELINE_EDITOR_PANEL = {
7
+ STEPS: 'steps',
8
+ TRIGGERS: 'triggers',
9
+ SETTINGS: 'settings',
10
+ } as const;
11
+ export type PipelineEditorPanel = typeof PIPELINE_EDITOR_PANEL[keyof typeof PIPELINE_EDITOR_PANEL];
12
+
13
+ /** Component panel variants */
14
+ export const PANEL_VARIANT = {
15
+ PANEL: 'panel',
16
+ EDITOR: 'editor',
17
+ MODAL: 'modal',
18
+ } as const;
19
+ /** Test/connection status states */
20
+ export const TEST_STATUS = {
21
+ IDLE: 'idle',
22
+ TESTING: 'testing',
23
+ SUCCESS: 'success',
24
+ ERROR: 'error',
25
+ WARNING: 'warning',
26
+ } as const;
27
+
28
+ export { CHECKPOINT_STRATEGY } from '../../shared/constants';
@@ -0,0 +1,85 @@
1
+ /** Diff change types */
2
+ export const DIFF_TYPE = {
3
+ ADDED: 'ADDED',
4
+ REMOVED: 'REMOVED',
5
+ CHANGED: 'CHANGED',
6
+ UNCHANGED: 'UNCHANGED',
7
+ } as const;
8
+
9
+ /** Trend directions for stat cards */
10
+ export const TREND_DIRECTION = {
11
+ UP: 'UP',
12
+ DOWN: 'DOWN',
13
+ } as const;
14
+
15
+ /** Move direction for reordering items */
16
+ export const MOVE_DIRECTION = {
17
+ UP: 'UP',
18
+ DOWN: 'DOWN',
19
+ } as const;
20
+
21
+ export type MoveDirection = typeof MOVE_DIRECTION[keyof typeof MOVE_DIRECTION];
22
+
23
+ /** Loading state types */
24
+ export const LOADING_STATE_TYPE = {
25
+ SPINNER: 'SPINNER',
26
+ TABLE: 'TABLE',
27
+ FORM: 'FORM',
28
+ CARD: 'CARD',
29
+ LIST: 'LIST',
30
+ } as const;
31
+
32
+ /** Secret provider types */
33
+ export const SECRET_PROVIDER = {
34
+ ENV: 'ENV',
35
+ INLINE: 'INLINE',
36
+ EXTERNAL: 'EXTERNAL',
37
+ } as const;
38
+
39
+ /** Revision types */
40
+ export const REVISION_TYPE = {
41
+ PUBLISHED: 'PUBLISHED',
42
+ DRAFT: 'DRAFT',
43
+ } as const;
44
+
45
+ /** Field types for operator schema fields */
46
+ export const FIELD_TYPE = {
47
+ JSON: 'json',
48
+ OBJECT: 'object',
49
+ ARRAY: 'array',
50
+ SELECT: 'select',
51
+ NUMBER: 'number',
52
+ BOOLEAN: 'boolean',
53
+ STRING: 'string',
54
+ PASSWORD: 'password',
55
+ TEXT: 'text',
56
+ SECRET: 'secret',
57
+ CONNECTION: 'connection',
58
+ TEXTAREA: 'textarea',
59
+ CODE: 'code',
60
+ EXPRESSION: 'expression',
61
+ CRON: 'cron',
62
+ DATE: 'date',
63
+ DATETIME: 'datetime',
64
+ FILE: 'file',
65
+ ENTITY: 'entity',
66
+ FIELD: 'field',
67
+ MAPPING: 'mapping',
68
+ MULTISELECT: 'multiselect',
69
+ EMAIL: 'email',
70
+ URL: 'url',
71
+ INT: 'int',
72
+ FLOAT: 'float',
73
+ } as const;
74
+
75
+ /** UI adapter categories for pipeline organization */
76
+ export const UI_ADAPTER_CATEGORY = {
77
+ SOURCES: 'SOURCES',
78
+ TRANSFORMS: 'TRANSFORMS',
79
+ VALIDATION: 'VALIDATION',
80
+ ROUTING: 'ROUTING',
81
+ DESTINATIONS: 'DESTINATIONS',
82
+ FEEDS: 'FEEDS',
83
+ EXPORTS: 'EXPORTS',
84
+ SINKS: 'SINKS',
85
+ } as const;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Dashboard Validation Patterns
3
+ *
4
+ * Re-exports shared validation utilities and adds dashboard-specific
5
+ * error messages for form validation.
6
+ */
7
+
8
+ import {
9
+ ERROR_MESSAGES as SHARED_ERROR_MESSAGES,
10
+ } from '../../shared';
11
+
12
+ export const ERROR_MESSAGES = {
13
+ ...SHARED_ERROR_MESSAGES,
14
+ INVALID_MAPPING_JSON: 'Invalid mapping JSON',
15
+ NAME_REQUIRED: 'Name is required',
16
+ CODE_REQUIRED: 'Code is required',
17
+ CODE_PATTERN: 'Must start with a letter and contain only letters, numbers, hyphens, and underscores',
18
+ CONNECTION_TYPE_REQUIRED: 'Connection type is required',
19
+ PROVIDER_REQUIRED: 'Provider is required',
20
+ ENV_VAR_NAME_REQUIRED: 'Environment variable name is required',
21
+ SECRET_VALUE_REQUIRED: 'Secret value is required when creating a new secret',
22
+ ENV_VAR_FORMAT: 'Environment variable names should be uppercase with underscores (e.g., MY_API_KEY)',
23
+ MIN_LENGTH_2: 'Must be at least 2 characters',
24
+ BRANCH_NAME_EMPTY: 'Branch name cannot be empty',
25
+ DUPLICATE_BRANCH_NAMES: 'Branch names must be unique',
26
+ } as const;