@burdenoff/microfe-bigconsole 2026.624.1 → 2026.625.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/dist/bigconsole/BigConsoleRoutes.js +94 -94
  2. package/dist/bigconsole/BigConsoleRoutes.js.map +1 -1
  3. package/dist/bigconsole/assistant/assistantApi.js +215 -0
  4. package/dist/bigconsole/assistant/assistantApi.js.map +1 -0
  5. package/dist/bigconsole/assistant/createSandboxAssistantTransport.js +119 -0
  6. package/dist/bigconsole/assistant/createSandboxAssistantTransport.js.map +1 -0
  7. package/dist/bigconsole/assistant/index.js +2 -0
  8. package/dist/bigconsole/assistant/pageContext.js +51 -0
  9. package/dist/bigconsole/assistant/pageContext.js.map +1 -0
  10. package/dist/bigconsole/components/DrilldownModal.js +4 -4
  11. package/dist/bigconsole/components/DrilldownModal.js.map +1 -1
  12. package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +48 -48
  13. package/dist/bigconsole/components/dashboard/DashboardCanvas.js +1 -1
  14. package/dist/bigconsole/components/dashboard/DashboardCanvas.js.map +1 -1
  15. package/dist/bigconsole/components/dashboard/DashboardToolbar.js +54 -54
  16. package/dist/bigconsole/components/dashboard/DashboardToolbar.js.map +1 -1
  17. package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js +1 -1
  18. package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js.map +1 -1
  19. package/dist/bigconsole/components/dashboard/ExportDashboardDialog.js +33 -33
  20. package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +205 -205
  21. package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js.map +1 -1
  22. package/dist/bigconsole/components/dashboard/WidgetPalette.js +38 -38
  23. package/dist/bigconsole/components/datasink/CacheTTLSelector.js +1 -1
  24. package/dist/bigconsole/components/datasink/CacheTTLSelector.js.map +1 -1
  25. package/dist/bigconsole/components/datasink/DataSinkCard.js +4 -4
  26. package/dist/bigconsole/components/datasink/DataSinkCard.js.map +1 -1
  27. package/dist/bigconsole/components/datasink/DataSinkDataViewer.js +2 -2
  28. package/dist/bigconsole/components/datasink/DataSinkDataViewer.js.map +1 -1
  29. package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js +2 -2
  30. package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js.map +1 -1
  31. package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js +2 -2
  32. package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js.map +1 -1
  33. package/dist/bigconsole/components/datasink/DataSinkTableViewer.js +34 -34
  34. package/dist/bigconsole/components/datasink/DataSinkTableViewer.js.map +1 -1
  35. package/dist/bigconsole/components/datasink/ExportDataSinkDialog.js +31 -31
  36. package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js +121 -121
  37. package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js.map +1 -1
  38. package/dist/bigconsole/components/datasink/LinkedParsersPanel.js +1 -1
  39. package/dist/bigconsole/components/datasink/LinkedParsersPanel.js.map +1 -1
  40. package/dist/bigconsole/components/datasink/LinkedWorkflowsPanel.js +3 -3
  41. package/dist/bigconsole/components/datasink/LinkedWorkflowsPanel.js.map +1 -1
  42. package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +2 -2
  43. package/dist/bigconsole/components/datasink/RefreshTypeSelector.js.map +1 -1
  44. package/dist/bigconsole/components/datasink/WorkflowStatusPanel.js +2 -2
  45. package/dist/bigconsole/components/datasink/WorkflowStatusPanel.js.map +1 -1
  46. package/dist/bigconsole/components/parser/DataSinkSelector.js +3 -3
  47. package/dist/bigconsole/components/parser/DataSinkSelector.js.map +1 -1
  48. package/dist/bigconsole/components/parser/ExportParserDialog.js +31 -31
  49. package/dist/bigconsole/components/parser/ImportParserDialog.js +186 -186
  50. package/dist/bigconsole/components/parser/ImportParserDialog.js.map +1 -1
  51. package/dist/bigconsole/components/parser/ParserCard.js +5 -5
  52. package/dist/bigconsole/components/parser/ParserCard.js.map +1 -1
  53. package/dist/bigconsole/components/parser/ParserSelector.js +6 -6
  54. package/dist/bigconsole/components/parser/ParserSelector.js.map +1 -1
  55. package/dist/bigconsole/components/parser/ParserStatusBadge.js +1 -1
  56. package/dist/bigconsole/components/parser/ParserStatusBadge.js.map +1 -1
  57. package/dist/bigconsole/components/parser/ParserTypeBadge.js +1 -1
  58. package/dist/bigconsole/components/parser/ParserTypeBadge.js.map +1 -1
  59. package/dist/bigconsole/components/pipeline/PipelineCard.js +2 -2
  60. package/dist/bigconsole/components/pipeline/PipelineCard.js.map +1 -1
  61. package/dist/bigconsole/components/pipeline/PipelineDeleteDialog.js +1 -1
  62. package/dist/bigconsole/components/pipeline/PipelineDeleteDialog.js.map +1 -1
  63. package/dist/bigconsole/components/pipeline/PipelineStatusBadge.js +1 -1
  64. package/dist/bigconsole/components/pipeline/PipelineStatusBadge.js.map +1 -1
  65. package/dist/bigconsole/components/widgets/ActionConfigDialog.js +79 -79
  66. package/dist/bigconsole/components/widgets/ActionConfigDialog.js.map +1 -1
  67. package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +11 -11
  68. package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js.map +1 -1
  69. package/dist/bigconsole/components/widgets/PropertiesPanel.js +322 -322
  70. package/dist/bigconsole/components/widgets/PropertiesPanel.js.map +1 -1
  71. package/dist/bigconsole/components/widgets/WidgetConfigDialog.js +234 -234
  72. package/dist/bigconsole/components/widgets/WidgetConfigDialog.js.map +1 -1
  73. package/dist/bigconsole/components/widgets/WidgetHeader.js +4 -4
  74. package/dist/bigconsole/components/widgets/WidgetHeader.js.map +1 -1
  75. package/dist/bigconsole/components/widgets/WidgetMenu.js +3 -3
  76. package/dist/bigconsole/components/widgets/WidgetMenu.js.map +1 -1
  77. package/dist/bigconsole/components/widgets/WidgetTypeSelector.js +23 -23
  78. package/dist/bigconsole/components/widgets/WidgetWrapper.js +1 -1
  79. package/dist/bigconsole/components/widgets/WidgetWrapper.js.map +1 -1
  80. package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js +1 -1
  81. package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js.map +1 -1
  82. package/dist/bigconsole/components/widgets/comments/WidgetComments.js +2 -2
  83. package/dist/bigconsole/components/widgets/comments/WidgetComments.js.map +1 -1
  84. package/dist/bigconsole/components/widgets/custom/CustomWidget.js +5 -5
  85. package/dist/bigconsole/components/widgets/custom/CustomWidget.js.map +1 -1
  86. package/dist/bigconsole/components/widgets/gauge/GaugeWidget.js +1 -1
  87. package/dist/bigconsole/components/widgets/gauge/GaugeWidget.js.map +1 -1
  88. package/dist/bigconsole/components/widgets/gauge/LinearGauge.js +1 -1
  89. package/dist/bigconsole/components/widgets/gauge/LinearGauge.js.map +1 -1
  90. package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js +2 -2
  91. package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js.map +1 -1
  92. package/dist/bigconsole/components/widgets/kpi/KPIWidget.js +2 -2
  93. package/dist/bigconsole/components/widgets/kpi/KPIWidget.js.map +1 -1
  94. package/dist/bigconsole/components/widgets/kpi-comparison/KPIComparisonWidget.js +2 -2
  95. package/dist/bigconsole/components/widgets/kpi-comparison/KPIComparisonWidget.js.map +1 -1
  96. package/dist/bigconsole/components/widgets/list/ListItem.js +3 -3
  97. package/dist/bigconsole/components/widgets/list/ListItem.js.map +1 -1
  98. package/dist/bigconsole/components/widgets/map-widget/MapWidget.js +3 -3
  99. package/dist/bigconsole/components/widgets/map-widget/MapWidget.js.map +1 -1
  100. package/dist/bigconsole/components/widgets/metric-card/ComparisonBadge.js +1 -1
  101. package/dist/bigconsole/components/widgets/metric-card/ComparisonBadge.js.map +1 -1
  102. package/dist/bigconsole/components/widgets/metric-card/MetricCardWidget.js +2 -2
  103. package/dist/bigconsole/components/widgets/metric-card/MetricCardWidget.js.map +1 -1
  104. package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +12 -12
  105. package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js.map +1 -1
  106. package/dist/bigconsole/components/widgets/progress/ProgressBar.js +2 -2
  107. package/dist/bigconsole/components/widgets/progress/ProgressBar.js.map +1 -1
  108. package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +1 -1
  109. package/dist/bigconsole/components/widgets/progress/ProgressConfig.js.map +1 -1
  110. package/dist/bigconsole/components/widgets/progress/ProgressWidget.js +1 -1
  111. package/dist/bigconsole/components/widgets/progress/ProgressWidget.js.map +1 -1
  112. package/dist/bigconsole/components/widgets/retention/RetentionWidget.js +2 -2
  113. package/dist/bigconsole/components/widgets/retention/RetentionWidget.js.map +1 -1
  114. package/dist/bigconsole/components/widgets/states/EmptyState.js +1 -1
  115. package/dist/bigconsole/components/widgets/states/EmptyState.js.map +1 -1
  116. package/dist/bigconsole/components/widgets/table/TableCell.js +1 -1
  117. package/dist/bigconsole/components/widgets/table/TableCell.js.map +1 -1
  118. package/dist/bigconsole/components/widgets/table/TableConfig.js +1 -1
  119. package/dist/bigconsole/components/widgets/table/TableConfig.js.map +1 -1
  120. package/dist/bigconsole/components/widgets/table/TableHeader.js +2 -2
  121. package/dist/bigconsole/components/widgets/table/TableHeader.js.map +1 -1
  122. package/dist/bigconsole/components/widgets/table/TablePagination.js +4 -4
  123. package/dist/bigconsole/components/widgets/table/TablePagination.js.map +1 -1
  124. package/dist/bigconsole/components/widgets/table/TableWidget.js +5 -5
  125. package/dist/bigconsole/components/widgets/table/TableWidget.js.map +1 -1
  126. package/dist/bigconsole/components/widgets/text-widget/TextWidget.js +1 -1
  127. package/dist/bigconsole/components/widgets/text-widget/TextWidget.js.map +1 -1
  128. package/dist/bigconsole/components/widgets/timeline/TimelineWidget.js +3 -3
  129. package/dist/bigconsole/components/widgets/timeline/TimelineWidget.js.map +1 -1
  130. package/dist/bigconsole/components/widgets/utils/conditionalFormat.js +2 -2
  131. package/dist/bigconsole/components/widgets/utils/conditionalFormat.js.map +1 -1
  132. package/dist/bigconsole/components/widgets/widget-actions/WidgetActions.js +3 -3
  133. package/dist/bigconsole/components/widgets/widget-actions/WidgetActions.js.map +1 -1
  134. package/dist/bigconsole/components/workflow/WorkflowCard.js +2 -2
  135. package/dist/bigconsole/components/workflow/WorkflowCard.js.map +1 -1
  136. package/dist/bigconsole/components/workflow/WorkflowDeleteDialog.js +1 -1
  137. package/dist/bigconsole/components/workflow/WorkflowDeleteDialog.js.map +1 -1
  138. package/dist/bigconsole/index.js +3 -0
  139. package/dist/bigconsole/pages/DashboardBuilderPage.js +76 -76
  140. package/dist/bigconsole/pages/DashboardBuilderPage.js.map +1 -1
  141. package/dist/bigconsole/pages/DashboardViewPage.js +169 -190
  142. package/dist/bigconsole/pages/DashboardViewPage.js.map +1 -1
  143. package/dist/bigconsole/pages/DashboardsPage.js +268 -312
  144. package/dist/bigconsole/pages/DashboardsPage.js.map +1 -1
  145. package/dist/bigconsole/pages/DataParsersPage.js +148 -194
  146. package/dist/bigconsole/pages/DataParsersPage.js.map +1 -1
  147. package/dist/bigconsole/pages/DataSinkBuilderPage.js +254 -248
  148. package/dist/bigconsole/pages/DataSinkBuilderPage.js.map +1 -1
  149. package/dist/bigconsole/pages/DataSinkViewPage.js +256 -231
  150. package/dist/bigconsole/pages/DataSinkViewPage.js.map +1 -1
  151. package/dist/bigconsole/pages/DataSinksPage.js +173 -219
  152. package/dist/bigconsole/pages/DataSinksPage.js.map +1 -1
  153. package/dist/bigconsole/pages/HomePage.js +125 -141
  154. package/dist/bigconsole/pages/HomePage.js.map +1 -1
  155. package/dist/bigconsole/pages/InsightsPage.js +159 -184
  156. package/dist/bigconsole/pages/InsightsPage.js.map +1 -1
  157. package/dist/bigconsole/pages/ParserBuilderPage.js +404 -396
  158. package/dist/bigconsole/pages/ParserBuilderPage.js.map +1 -1
  159. package/dist/bigconsole/pages/ParserViewPage.js +221 -202
  160. package/dist/bigconsole/pages/ParserViewPage.js.map +1 -1
  161. package/dist/bigconsole/pages/PipelineBuilderPage.js +216 -210
  162. package/dist/bigconsole/pages/PipelineBuilderPage.js.map +1 -1
  163. package/dist/bigconsole/pages/PipelineViewPage.js +213 -190
  164. package/dist/bigconsole/pages/PipelineViewPage.js.map +1 -1
  165. package/dist/bigconsole/pages/PipelinesPage.js +107 -150
  166. package/dist/bigconsole/pages/PipelinesPage.js.map +1 -1
  167. package/dist/bigconsole/pages/SettingsPage.js +184 -171
  168. package/dist/bigconsole/pages/SettingsPage.js.map +1 -1
  169. package/dist/bigconsole/pages/WidgetDemoPage.js +71 -83
  170. package/dist/bigconsole/pages/WidgetDemoPage.js.map +1 -1
  171. package/dist/bigconsole/pages/WorkflowViewPage.js +235 -221
  172. package/dist/bigconsole/pages/WorkflowViewPage.js.map +1 -1
  173. package/dist/bigconsole/pages/WorkflowsPage.js +106 -149
  174. package/dist/bigconsole/pages/WorkflowsPage.js.map +1 -1
  175. package/dist/bigconsole/renderers/adapters/AdaptiveCardRenderer.js +12 -12
  176. package/dist/bigconsole/renderers/adapters/AdaptiveCardRenderer.js.map +1 -1
  177. package/dist/bigconsole/renderers/adapters/BigConsoleRenderer.js +2 -2
  178. package/dist/bigconsole/renderers/adapters/BigConsoleRenderer.js.map +1 -1
  179. package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +5 -5
  180. package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js.map +1 -1
  181. package/dist/bigconsole/renderers/adapters/CustomRenderer.js +2 -2
  182. package/dist/bigconsole/renderers/adapters/CustomRenderer.js.map +1 -1
  183. package/dist/generated/wspace-operations.js +87 -36
  184. package/dist/generated/wspace-operations.js.map +1 -1
  185. package/dist/index.js +3 -1
  186. package/package.json +6 -2
@@ -1 +1 @@
1
- {"version":3,"file":"BlockKitRenderer.js","names":[],"sources":["../../../../src/bigconsole/renderers/adapters/BlockKitRenderer.tsx"],"sourcesContent":["/**\n * Slack Block Kit Renderer (v2.0)\n *\n * Renders widgets using Slack Block Kit format.\n * Supports common block types: section, divider, header, context, image, actions.\n */\n\nimport React, { memo, useCallback, useMemo, type ReactNode } from 'react';\nimport type { RendererProps, BlockKitTemplate, BlockKitElement, BlockKitText } from '../types/renderer';\n\n// ============================================================================\n// Helpers\n// ============================================================================\n\n/**\n * Render Block Kit text (plain_text or mrkdwn)\n * Uses React elements instead of dangerouslySetInnerHTML for better security\n */\nfunction renderText(text: BlockKitText | string | undefined): React.ReactNode {\n if (!text) return null;\n\n if (typeof text === 'string') {\n return text;\n }\n\n if (text.type === 'mrkdwn') {\n // Parse mrkdwn and convert to React elements\n const content = text.text || '';\n\n // Parse the markdown into React elements\n const elements: React.ReactNode[] = [];\n let remaining = content;\n let key = 0;\n\n // Process text segment by segment\n while (remaining.length > 0) {\n // Try to match bold: *text*\n const boldMatch = remaining.match(/^\\*([^*]+)\\*/);\n if (boldMatch) {\n elements.push(<strong key={key++}>{boldMatch[1]}</strong>);\n remaining = remaining.slice(boldMatch[0].length);\n continue;\n }\n\n // Try to match italic: _text_\n const italicMatch = remaining.match(/^_([^_]+)_/);\n if (italicMatch) {\n elements.push(<em key={key++}>{italicMatch[1]}</em>);\n remaining = remaining.slice(italicMatch[0].length);\n continue;\n }\n\n // Try to match strike: ~text~\n const strikeMatch = remaining.match(/^~([^~]+)~/);\n if (strikeMatch) {\n elements.push(<del key={key++}>{strikeMatch[1]}</del>);\n remaining = remaining.slice(strikeMatch[0].length);\n continue;\n }\n\n // Try to match code: `text`\n const codeMatch = remaining.match(/^`([^`]+)`/);\n if (codeMatch) {\n elements.push(\n <code key={key++} className=\"bg-muted px-1 rounded text-sm\">\n {codeMatch[1]}\n </code>\n );\n remaining = remaining.slice(codeMatch[0].length);\n continue;\n }\n\n // Try to match link with text: <url|text>\n const linkTextMatch = remaining.match(/^<([^|>]+)\\|([^>]+)>/);\n if (linkTextMatch) {\n elements.push(\n <a\n key={key++}\n href={linkTextMatch[1]}\n className=\"text-blue-600 dark:text-blue-400 underline\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n {linkTextMatch[2]}\n </a>\n );\n remaining = remaining.slice(linkTextMatch[0].length);\n continue;\n }\n\n // Try to match plain link: <url>\n const linkMatch = remaining.match(/^<([^|>]+)>/);\n if (linkMatch) {\n elements.push(\n <a\n key={key++}\n href={linkMatch[1]}\n className=\"text-blue-600 dark:text-blue-400 underline\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n {linkMatch[1]}\n </a>\n );\n remaining = remaining.slice(linkMatch[0].length);\n continue;\n }\n\n // No special formatting found at start - extract plain text until next special char\n const plainMatch = remaining.match(/^[^*_~`<]+/);\n if (plainMatch) {\n elements.push(<React.Fragment key={key++}>{plainMatch[0]}</React.Fragment>);\n remaining = remaining.slice(plainMatch[0].length);\n continue;\n }\n\n // Single special char that didn't match a pattern - output as-is\n elements.push(<React.Fragment key={key++}>{remaining[0]}</React.Fragment>);\n remaining = remaining.slice(1);\n }\n\n return <span>{elements}</span>;\n }\n\n // Plain text with optional emoji\n return text.text;\n}\n\n/**\n * Get button style class\n */\nfunction getButtonStyleClass(style?: string): string {\n switch (style) {\n case 'primary':\n return 'bg-state-success hover:bg-state-success/90 text-white transition-colors';\n case 'danger':\n return 'bg-state-error hover:bg-state-error/90 text-white transition-colors';\n default:\n return 'bg-muted hover:bg-muted/80 text-primary transition-colors';\n }\n}\n\n// ============================================================================\n// Template Binding\n// ============================================================================\n\nfunction bindDataToTemplate<T>(template: T, data: Record<string, unknown>): T {\n if (template === null || template === undefined) {\n return template;\n }\n\n if (typeof template === 'string') {\n // Replace ${path} with actual values\n return template.replace(/\\$\\{([^}]+)\\}/g, (_, path) => {\n const value = getNestedValue(data, path.trim());\n return value !== undefined ? String(value) : '';\n }) as T;\n }\n\n if (Array.isArray(template)) {\n return template.map((item) => bindDataToTemplate(item, data)) as T;\n }\n\n if (typeof template === 'object') {\n const result: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(template)) {\n result[key] = bindDataToTemplate(value, data);\n }\n return result as T;\n }\n\n return template;\n}\n\nfunction getNestedValue(obj: Record<string, unknown>, path: string): unknown {\n const parts = path.split('.');\n let current: unknown = obj;\n\n for (const part of parts) {\n if (current && typeof current === 'object' && part in (current as Record<string, unknown>)) {\n current = (current as Record<string, unknown>)[part];\n } else {\n return undefined;\n }\n }\n\n return current;\n}\n\n// ============================================================================\n// Block Renderers\n// ============================================================================\n\ninterface BlockRendererProps {\n block: BlockKitElement;\n index: number;\n onAction?: (actionId: string, value?: string, data?: Record<string, unknown>) => void;\n}\n\nconst BlockRenderer: React.FC<BlockRendererProps> = memo(function BlockRenderer({ block, index: _index, onAction }) {\n switch (block.type) {\n // Header block\n case 'header':\n return (\n <div className=\"py-2\">\n <h2 className=\"text-lg font-bold text-primary\">{renderText(block.text)}</h2>\n </div>\n );\n\n // Section block\n case 'section':\n return (\n <div className=\"py-2 flex items-start gap-4\">\n <div className=\"flex-1\">\n {block.text && <p className=\"text-primary\">{renderText(block.text)}</p>}\n {block.fields && block.fields.length > 0 && (\n <div className=\"grid grid-cols-2 gap-2 mt-2\">\n {block.fields.map((field, i) => (\n <div key={i} className=\"text-sm\">\n {renderText(field)}\n </div>\n ))}\n </div>\n )}\n </div>\n {block.accessory && (\n <div className=\"flex-shrink-0\">\n <AccessoryRenderer accessory={block.accessory as BlockKitElement} onAction={onAction} />\n </div>\n )}\n </div>\n );\n\n // Divider block\n case 'divider':\n return <hr className=\"my-2 border-default\" />;\n\n // Image block\n case 'image':\n return (\n <div className=\"py-2\">\n {block.title && <p className=\"text-sm text-secondary mb-1\">{renderText(block.title)}</p>}\n <img src={block.image_url} alt={block.alt_text || ''} className=\"max-w-full h-auto rounded\" />\n </div>\n );\n\n // Context block\n case 'context':\n return (\n <div className=\"py-1 flex items-center gap-2 flex-wrap text-sm text-secondary\">\n {block.elements?.map((element, i) => (\n <span key={i}>\n {element.type === 'image' ? (\n <img src={element.image_url} alt={element.alt_text || ''} className=\"w-5 h-5 rounded inline-block\" />\n ) : (\n renderText(element.text as BlockKitText)\n )}\n </span>\n ))}\n </div>\n );\n\n // Actions block\n case 'actions':\n return (\n <div className=\"py-2 flex gap-2 flex-wrap\">\n {block.elements?.map((element, i) => (\n <ActionRenderer key={i} element={element} onAction={onAction} />\n ))}\n </div>\n );\n\n // Input block (simplified)\n case 'input':\n return (\n <div className=\"py-2\">\n {block.label ? (\n <label className=\"block text-sm font-medium text-secondary mb-1\">\n {renderText(block.label as BlockKitText) as ReactNode}\n </label>\n ) : null}\n <input\n type=\"text\"\n className=\"w-full px-3 py-2 border border-default rounded-md bg-surface text-primary transition-colors focus:ring-2 focus:ring-primary/20\"\n placeholder={(() => {\n const element = block.element as Record<string, unknown> | undefined;\n return element?.placeholder ? (renderText(element.placeholder as BlockKitText) as string) : '';\n })()}\n />\n </div>\n );\n\n // Rich text block (simplified)\n case 'rich_text':\n return (\n <div className=\"py-2 text-primary\">\n {block.elements?.map((element, i) => (\n <span key={i}>{renderText(element.text as BlockKitText)}</span>\n ))}\n </div>\n );\n\n default:\n return null;\n }\n});\n\n// ============================================================================\n// Accessory Renderer\n// ============================================================================\n\ninterface AccessoryRendererProps {\n accessory: BlockKitElement;\n onAction?: (actionId: string, value?: string, data?: Record<string, unknown>) => void;\n}\n\nconst AccessoryRenderer: React.FC<AccessoryRendererProps> = memo(function AccessoryRenderer({ accessory, onAction }) {\n switch (accessory.type) {\n case 'image':\n return (\n <img src={accessory.image_url} alt={accessory.alt_text || ''} className=\"w-12 h-12 rounded object-cover\" />\n );\n\n case 'button':\n return (\n <button\n type=\"button\"\n onClick={() => onAction?.(accessory.action_id || '', accessory.value)}\n className={`px-3 py-1.5 text-sm font-medium rounded ${getButtonStyleClass(accessory.style)}`}\n >\n {renderText(accessory.text)}\n </button>\n );\n\n case 'overflow':\n return (\n <button type=\"button\" className=\"p-1 text-secondary hover:text-primary transition-colors\">\n <svg className=\"w-5 h-5\" fill=\"currentColor\" viewBox=\"0 0 20 20\">\n <path d=\"M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z\" />\n </svg>\n </button>\n );\n\n default:\n return null;\n }\n});\n\n// ============================================================================\n// Action Renderer\n// ============================================================================\n\ninterface ActionRendererProps {\n element: BlockKitElement;\n onAction?: (actionId: string, value?: string, data?: Record<string, unknown>) => void;\n}\n\nconst ActionRenderer: React.FC<ActionRendererProps> = memo(function ActionRenderer({ element, onAction }) {\n const handleClick = useCallback(() => {\n if (element.action_id) {\n onAction?.(element.action_id, element.value);\n }\n if (element.url) {\n window.open(element.url, '_blank');\n }\n }, [element, onAction]);\n\n switch (element.type) {\n case 'button':\n return (\n <button\n type=\"button\"\n onClick={handleClick}\n className={`px-4 py-2 text-sm font-medium rounded ${getButtonStyleClass(element.style)}`}\n >\n {renderText(element.text)}\n </button>\n );\n\n case 'static_select':\n return (\n <select\n className=\"px-3 py-2 text-sm border border-default rounded bg-surface text-primary transition-colors focus:ring-2 focus:ring-primary/20\"\n onChange={(e) => onAction?.(element.action_id || '', e.target.value)}\n >\n {element.placeholder ? (\n <option value=\"\">{renderText(element.placeholder as BlockKitText) as ReactNode}</option>\n ) : null}\n {(element.options as Array<{ text: BlockKitText; value: string }>)?.map((option, i) => (\n <option key={i} value={option.value}>\n {renderText(option.text)}\n </option>\n ))}\n </select>\n );\n\n case 'datepicker':\n return (\n <input\n type=\"date\"\n className=\"px-3 py-2 text-sm border border-default rounded bg-surface text-primary transition-colors focus:ring-2 focus:ring-primary/20\"\n onChange={(e) => onAction?.(element.action_id || '', e.target.value)}\n />\n );\n\n case 'checkboxes':\n return (\n <div className=\"space-y-1\">\n {(element.options as Array<{ text: BlockKitText; value: string }>)?.map((option, i) => (\n <label key={i} className=\"flex items-center gap-2 text-sm\">\n <input\n type=\"checkbox\"\n className=\"rounded border-default transition-colors\"\n onChange={(e) => onAction?.(element.action_id || '', option.value, { checked: e.target.checked })}\n />\n {renderText(option.text)}\n </label>\n ))}\n </div>\n );\n\n case 'radio_buttons':\n return (\n <div className=\"space-y-1\">\n {(element.options as Array<{ text: BlockKitText; value: string }>)?.map((option, i) => (\n <label key={i} className=\"flex items-center gap-2 text-sm\">\n <input\n type=\"radio\"\n name={element.action_id}\n className=\"border-default transition-colors\"\n onChange={() => onAction?.(element.action_id || '', option.value)}\n />\n {renderText(option.text)}\n </label>\n ))}\n </div>\n );\n\n default:\n return null;\n }\n});\n\n// ============================================================================\n// Auto-generate BlockKit blocks from arbitrary data\n// ============================================================================\n\nfunction generateBlocksFromData(data: Record<string, unknown>): BlockKitElement[] {\n const blocks: BlockKitElement[] = [];\n\n for (const [key, value] of Object.entries(data)) {\n if (value === null || value === undefined) continue;\n\n // Handle arrays\n if (Array.isArray(value)) {\n // Add header for the array\n blocks.push({\n type: 'header',\n text: {\n type: 'plain_text',\n text: formatKey(key),\n emoji: true,\n },\n });\n\n // Add each item\n value.forEach((item, index) => {\n if (typeof item === 'object' && item !== null) {\n // Object items - render as section with fields\n const fields: BlockKitText[] = [];\n for (const [itemKey, itemValue] of Object.entries(item)) {\n if (itemValue !== null && itemValue !== undefined) {\n fields.push({\n type: 'mrkdwn',\n text: `*${formatKey(itemKey)}:*\\n${formatValue(itemValue)}`,\n });\n }\n }\n if (fields.length > 0) {\n blocks.push({\n type: 'section',\n fields: fields.slice(0, 10), // BlockKit max 10 fields\n });\n }\n } else {\n // Primitive items - render as simple section\n blocks.push({\n type: 'section',\n text: {\n type: 'mrkdwn',\n text: `${index + 1}. ${formatValue(item)}`,\n },\n });\n }\n\n // Add divider between items (except last)\n if (index < value.length - 1) {\n blocks.push({ type: 'divider' });\n }\n });\n }\n // Handle objects\n else if (typeof value === 'object') {\n blocks.push({\n type: 'header',\n text: {\n type: 'plain_text',\n text: formatKey(key),\n emoji: true,\n },\n });\n\n const fields: BlockKitText[] = [];\n for (const [objKey, objValue] of Object.entries(value as Record<string, unknown>)) {\n if (objValue !== null && objValue !== undefined) {\n fields.push({\n type: 'mrkdwn',\n text: `*${formatKey(objKey)}:*\\n${formatValue(objValue)}`,\n });\n }\n }\n if (fields.length > 0) {\n blocks.push({\n type: 'section',\n fields: fields.slice(0, 10),\n });\n }\n }\n // Handle primitives\n else {\n blocks.push({\n type: 'section',\n text: {\n type: 'mrkdwn',\n text: `*${formatKey(key)}:* ${formatValue(value)}`,\n },\n });\n }\n }\n\n return blocks;\n}\n\nfunction formatKey(key: string): string {\n // Convert camelCase or snake_case to Title Case\n return key\n .replace(/_/g, ' ')\n .replace(/([A-Z])/g, ' $1')\n .replace(/^./, (str) => str.toUpperCase())\n .trim();\n}\n\nfunction formatValue(value: unknown): string {\n if (value === null || value === undefined) return '-';\n if (typeof value === 'boolean') return value ? 'Yes' : 'No';\n if (typeof value === 'object') return JSON.stringify(value);\n return String(value);\n}\n\n// ============================================================================\n// Main Renderer Component\n// ============================================================================\n\nexport const BlockKitRenderer: React.FC<RendererProps> = memo(function BlockKitRenderer({\n widget,\n data,\n template,\n isLoading,\n error,\n onDrilldown: _onDrilldown,\n onAction,\n}) {\n // Debug logging\n\n // Parse and bind template\n const boundTemplate = useMemo(() => {\n // 1. If template has blocks, bind data and use it\n if (template && 'blocks' in (template as Record<string, unknown>)) {\n return bindDataToTemplate(template as unknown as BlockKitTemplate, data);\n }\n\n // 2. If data has blocks, use it directly as BlockKit format\n if (data && 'blocks' in data) {\n return data as unknown as BlockKitTemplate;\n }\n\n // 3. If we have any data, auto-generate blocks from it\n if (data && Object.keys(data).length > 0) {\n const generatedBlocks = generateBlocksFromData(data);\n if (generatedBlocks.length > 0) {\n return { blocks: generatedBlocks } as BlockKitTemplate;\n }\n }\n\n // 4. If template exists but no blocks, try to bind and check again\n if (template) {\n const bound = bindDataToTemplate(template as unknown as BlockKitTemplate, data);\n if (bound?.blocks?.length) {\n return bound;\n }\n }\n\n return null;\n }, [template, data]);\n\n // Handle action clicks\n const handleAction = useCallback(\n (actionId: string, value?: string, actionData?: Record<string, unknown>) => {\n if (onAction) {\n onAction(actionId, { value, ...actionData });\n }\n },\n [onAction]\n );\n\n // Loading state\n if (isLoading) {\n return (\n <div className=\"flex items-center justify-center h-full p-4 animate-in fade-in duration-200\">\n <div className=\"animate-pulse space-y-2 w-full\">\n <div className=\"h-4 bg-muted rounded w-3/4\" />\n <div className=\"h-4 bg-muted rounded w-1/2\" />\n <div className=\"h-4 bg-muted rounded w-5/6\" />\n </div>\n </div>\n );\n }\n\n // Error state\n if (error) {\n return (\n <div className=\"flex items-center justify-center h-full p-4 text-red-600 dark:text-red-400\">\n <div className=\"text-center\">\n <p className=\"font-medium\">Error rendering blocks</p>\n <p className=\"text-sm mt-1\">{error}</p>\n </div>\n </div>\n );\n }\n\n // Empty state\n if (!boundTemplate?.blocks?.length) {\n return (\n <div className=\"flex items-center justify-center h-full p-4 text-secondary animate-in fade-in duration-200\">\n <div className=\"text-center\">\n <p>No content to display</p>\n <p className=\"text-sm mt-1\">Configure blocks or provide data</p>\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"flex flex-col h-full p-4 bg-surface\">\n {/* Render blocks */}\n {boundTemplate.blocks.map((block, i) => (\n <BlockRenderer key={i} block={block} index={i} onAction={handleAction} />\n ))}\n\n {/* Render attachments */}\n {boundTemplate.attachments?.map((attachment, i) => (\n <div\n key={`attachment-${i}`}\n className=\"mt-4 border-l-4 pl-3\"\n style={{ borderLeftColor: attachment.color || 'var(--color-border)' }}\n >\n {attachment.blocks?.map((block, j) => (\n <BlockRenderer key={j} block={block} index={j} onAction={handleAction} />\n ))}\n {attachment.fallback && !attachment.blocks && <p className=\"text-sm text-secondary\">{attachment.fallback}</p>}\n </div>\n ))}\n </div>\n );\n});\n\nexport default BlockKitRenderer;\n"],"mappings":";;;AAkBA,SAAS,EAAW,GAA0D;AAC5E,KAAI,CAAC,EAAM,QAAO;AAElB,KAAI,OAAO,KAAS,SAClB,QAAO;AAGT,KAAI,EAAK,SAAS,UAAU;EAE1B,IAAM,IAAU,EAAK,QAAQ,IAGvB,IAA8B,EAAE,EAClC,IAAY,GACZ,IAAM;AAGV,SAAO,EAAU,SAAS,IAAG;GAE3B,IAAM,IAAY,EAAU,MAAM,eAAe;AACjD,O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AAK,WAAU;aAAf;IACE,kBAAC,OAAD,EAAK,WAAU,8BAA+B,CAAA;IAC9C,kBAAC,OAAD,EAAK,WAAU,8BAA+B,CAAA;IAC9C,kBAAC,OAAD,EAAK,WAAU,8BAA+B,CAAA;IAC1C;;EACF,CAAA,GAKN,IAEA,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,KAAD;IAAG,WAAU;cAAc;IAA0B,CAAA,EACrD,kBAAC,KAAD;IAAG,WAAU;cAAgB;IAAU,CAAA,CACnC;;EACF,CAAA,GAKL,GAAe,QAAQ,SAY1B,kBAAC,OAAD;EAAK,WAAU;YAAf,CAEG,EAAc,OAAO,KAAK,GAAO,MAChC,kBAAC,GAAD;GAA8B;GAAO,OAAO;GAAG,UAAU;GAAgB,EAArD,EAAqD,CACzE,EAGD,EAAc,aAAa,KAAK,GAAY,MAC3C,kBAAC,OAAD;GAEE,WAAU;GACV,OAAO,EAAE,iBAAiB,EAAW,SAAS,uBAAuB;aAHvE,CAKG,EAAW,QAAQ,KAAK,GAAO,MAC9B,kBAAC,GAAD;IAA8B;IAAO,OAAO;IAAG,UAAU;IAAgB,EAArD,EAAqD,CACzE,EACD,EAAW,YAAY,CAAC,EAAW,UAAU,kBAAC,KAAD;IAAG,WAAU;cAA0B,EAAW;IAAa,CAAA,CACzG;KARC,cAAc,IAQf,CACN,CACE;MA7BJ,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,KAAD,EAAA,UAAG,yBAAyB,CAAA,EAC5B,kBAAC,KAAD;IAAG,WAAU;cAAe;IAAoC,CAAA,CAC5D;;EACF,CAAA;EA0BV"}
1
+ {"version":3,"file":"BlockKitRenderer.js","names":[],"sources":["../../../../src/bigconsole/renderers/adapters/BlockKitRenderer.tsx"],"sourcesContent":["/**\n * Slack Block Kit Renderer (v2.0)\n *\n * Renders widgets using Slack Block Kit format.\n * Supports common block types: section, divider, header, context, image, actions.\n */\n\nimport React, { memo, useCallback, useMemo, type ReactNode } from 'react';\nimport type { RendererProps, BlockKitTemplate, BlockKitElement, BlockKitText } from '../types/renderer';\n\n// ============================================================================\n// Helpers\n// ============================================================================\n\n/**\n * Render Block Kit text (plain_text or mrkdwn)\n * Uses React elements instead of dangerouslySetInnerHTML for better security\n */\nfunction renderText(text: BlockKitText | string | undefined): React.ReactNode {\n if (!text) return null;\n\n if (typeof text === 'string') {\n return text;\n }\n\n if (text.type === 'mrkdwn') {\n // Parse mrkdwn and convert to React elements\n const content = text.text || '';\n\n // Parse the markdown into React elements\n const elements: React.ReactNode[] = [];\n let remaining = content;\n let key = 0;\n\n // Process text segment by segment\n while (remaining.length > 0) {\n // Try to match bold: *text*\n const boldMatch = remaining.match(/^\\*([^*]+)\\*/);\n if (boldMatch) {\n elements.push(<strong key={key++}>{boldMatch[1]}</strong>);\n remaining = remaining.slice(boldMatch[0].length);\n continue;\n }\n\n // Try to match italic: _text_\n const italicMatch = remaining.match(/^_([^_]+)_/);\n if (italicMatch) {\n elements.push(<em key={key++}>{italicMatch[1]}</em>);\n remaining = remaining.slice(italicMatch[0].length);\n continue;\n }\n\n // Try to match strike: ~text~\n const strikeMatch = remaining.match(/^~([^~]+)~/);\n if (strikeMatch) {\n elements.push(<del key={key++}>{strikeMatch[1]}</del>);\n remaining = remaining.slice(strikeMatch[0].length);\n continue;\n }\n\n // Try to match code: `text`\n const codeMatch = remaining.match(/^`([^`]+)`/);\n if (codeMatch) {\n elements.push(\n <code key={key++} className=\"bg-bg-sunken px-1 rounded text-sm\">\n {codeMatch[1]}\n </code>\n );\n remaining = remaining.slice(codeMatch[0].length);\n continue;\n }\n\n // Try to match link with text: <url|text>\n const linkTextMatch = remaining.match(/^<([^|>]+)\\|([^>]+)>/);\n if (linkTextMatch) {\n elements.push(\n <a\n key={key++}\n href={linkTextMatch[1]}\n className=\"text-blue-600 dark:text-blue-400 underline\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n {linkTextMatch[2]}\n </a>\n );\n remaining = remaining.slice(linkTextMatch[0].length);\n continue;\n }\n\n // Try to match plain link: <url>\n const linkMatch = remaining.match(/^<([^|>]+)>/);\n if (linkMatch) {\n elements.push(\n <a\n key={key++}\n href={linkMatch[1]}\n className=\"text-blue-600 dark:text-blue-400 underline\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n {linkMatch[1]}\n </a>\n );\n remaining = remaining.slice(linkMatch[0].length);\n continue;\n }\n\n // No special formatting found at start - extract plain text until next special char\n const plainMatch = remaining.match(/^[^*_~`<]+/);\n if (plainMatch) {\n elements.push(<React.Fragment key={key++}>{plainMatch[0]}</React.Fragment>);\n remaining = remaining.slice(plainMatch[0].length);\n continue;\n }\n\n // Single special char that didn't match a pattern - output as-is\n elements.push(<React.Fragment key={key++}>{remaining[0]}</React.Fragment>);\n remaining = remaining.slice(1);\n }\n\n return <span>{elements}</span>;\n }\n\n // Plain text with optional emoji\n return text.text;\n}\n\n/**\n * Get button style class\n */\nfunction getButtonStyleClass(style?: string): string {\n switch (style) {\n case 'primary':\n return 'bg-state-success hover:bg-state-success/90 text-white transition-colors';\n case 'danger':\n return 'bg-state-error hover:bg-state-error/90 text-white transition-colors';\n default:\n return 'bg-bg-sunken hover:bg-bg-sunken/80 text-primary transition-colors';\n }\n}\n\n// ============================================================================\n// Template Binding\n// ============================================================================\n\nfunction bindDataToTemplate<T>(template: T, data: Record<string, unknown>): T {\n if (template === null || template === undefined) {\n return template;\n }\n\n if (typeof template === 'string') {\n // Replace ${path} with actual values\n return template.replace(/\\$\\{([^}]+)\\}/g, (_, path) => {\n const value = getNestedValue(data, path.trim());\n return value !== undefined ? String(value) : '';\n }) as T;\n }\n\n if (Array.isArray(template)) {\n return template.map((item) => bindDataToTemplate(item, data)) as T;\n }\n\n if (typeof template === 'object') {\n const result: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(template)) {\n result[key] = bindDataToTemplate(value, data);\n }\n return result as T;\n }\n\n return template;\n}\n\nfunction getNestedValue(obj: Record<string, unknown>, path: string): unknown {\n const parts = path.split('.');\n let current: unknown = obj;\n\n for (const part of parts) {\n if (current && typeof current === 'object' && part in (current as Record<string, unknown>)) {\n current = (current as Record<string, unknown>)[part];\n } else {\n return undefined;\n }\n }\n\n return current;\n}\n\n// ============================================================================\n// Block Renderers\n// ============================================================================\n\ninterface BlockRendererProps {\n block: BlockKitElement;\n index: number;\n onAction?: (actionId: string, value?: string, data?: Record<string, unknown>) => void;\n}\n\nconst BlockRenderer: React.FC<BlockRendererProps> = memo(function BlockRenderer({ block, index: _index, onAction }) {\n switch (block.type) {\n // Header block\n case 'header':\n return (\n <div className=\"py-2\">\n <h2 className=\"text-lg font-bold text-primary\">{renderText(block.text)}</h2>\n </div>\n );\n\n // Section block\n case 'section':\n return (\n <div className=\"py-2 flex items-start gap-4\">\n <div className=\"flex-1\">\n {block.text && <p className=\"text-primary\">{renderText(block.text)}</p>}\n {block.fields && block.fields.length > 0 && (\n <div className=\"grid grid-cols-2 gap-2 mt-2\">\n {block.fields.map((field, i) => (\n <div key={i} className=\"text-sm\">\n {renderText(field)}\n </div>\n ))}\n </div>\n )}\n </div>\n {block.accessory && (\n <div className=\"flex-shrink-0\">\n <AccessoryRenderer accessory={block.accessory as BlockKitElement} onAction={onAction} />\n </div>\n )}\n </div>\n );\n\n // Divider block\n case 'divider':\n return <hr className=\"my-2 border-default\" />;\n\n // Image block\n case 'image':\n return (\n <div className=\"py-2\">\n {block.title && <p className=\"text-sm text-secondary mb-1\">{renderText(block.title)}</p>}\n <img src={block.image_url} alt={block.alt_text || ''} className=\"max-w-full h-auto rounded\" />\n </div>\n );\n\n // Context block\n case 'context':\n return (\n <div className=\"py-1 flex items-center gap-2 flex-wrap text-sm text-secondary\">\n {block.elements?.map((element, i) => (\n <span key={i}>\n {element.type === 'image' ? (\n <img src={element.image_url} alt={element.alt_text || ''} className=\"w-5 h-5 rounded inline-block\" />\n ) : (\n renderText(element.text as BlockKitText)\n )}\n </span>\n ))}\n </div>\n );\n\n // Actions block\n case 'actions':\n return (\n <div className=\"py-2 flex gap-2 flex-wrap\">\n {block.elements?.map((element, i) => (\n <ActionRenderer key={i} element={element} onAction={onAction} />\n ))}\n </div>\n );\n\n // Input block (simplified)\n case 'input':\n return (\n <div className=\"py-2\">\n {block.label ? (\n <label className=\"block text-sm font-medium text-secondary mb-1\">\n {renderText(block.label as BlockKitText) as ReactNode}\n </label>\n ) : null}\n <input\n type=\"text\"\n className=\"w-full px-3 py-2 border border-default rounded-md bg-surface text-primary transition-colors focus:ring-2 focus:ring-primary/20\"\n placeholder={(() => {\n const element = block.element as Record<string, unknown> | undefined;\n return element?.placeholder ? (renderText(element.placeholder as BlockKitText) as string) : '';\n })()}\n />\n </div>\n );\n\n // Rich text block (simplified)\n case 'rich_text':\n return (\n <div className=\"py-2 text-primary\">\n {block.elements?.map((element, i) => (\n <span key={i}>{renderText(element.text as BlockKitText)}</span>\n ))}\n </div>\n );\n\n default:\n return null;\n }\n});\n\n// ============================================================================\n// Accessory Renderer\n// ============================================================================\n\ninterface AccessoryRendererProps {\n accessory: BlockKitElement;\n onAction?: (actionId: string, value?: string, data?: Record<string, unknown>) => void;\n}\n\nconst AccessoryRenderer: React.FC<AccessoryRendererProps> = memo(function AccessoryRenderer({ accessory, onAction }) {\n switch (accessory.type) {\n case 'image':\n return (\n <img src={accessory.image_url} alt={accessory.alt_text || ''} className=\"w-12 h-12 rounded object-cover\" />\n );\n\n case 'button':\n return (\n <button\n type=\"button\"\n onClick={() => onAction?.(accessory.action_id || '', accessory.value)}\n className={`px-3 py-1.5 text-sm font-medium rounded ${getButtonStyleClass(accessory.style)}`}\n >\n {renderText(accessory.text)}\n </button>\n );\n\n case 'overflow':\n return (\n <button type=\"button\" className=\"p-1 text-secondary hover:text-primary transition-colors\">\n <svg className=\"w-5 h-5\" fill=\"currentColor\" viewBox=\"0 0 20 20\">\n <path d=\"M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z\" />\n </svg>\n </button>\n );\n\n default:\n return null;\n }\n});\n\n// ============================================================================\n// Action Renderer\n// ============================================================================\n\ninterface ActionRendererProps {\n element: BlockKitElement;\n onAction?: (actionId: string, value?: string, data?: Record<string, unknown>) => void;\n}\n\nconst ActionRenderer: React.FC<ActionRendererProps> = memo(function ActionRenderer({ element, onAction }) {\n const handleClick = useCallback(() => {\n if (element.action_id) {\n onAction?.(element.action_id, element.value);\n }\n if (element.url) {\n window.open(element.url, '_blank');\n }\n }, [element, onAction]);\n\n switch (element.type) {\n case 'button':\n return (\n <button\n type=\"button\"\n onClick={handleClick}\n className={`px-4 py-2 text-sm font-medium rounded ${getButtonStyleClass(element.style)}`}\n >\n {renderText(element.text)}\n </button>\n );\n\n case 'static_select':\n return (\n <select\n className=\"px-3 py-2 text-sm border border-default rounded bg-surface text-primary transition-colors focus:ring-2 focus:ring-primary/20\"\n onChange={(e) => onAction?.(element.action_id || '', e.target.value)}\n >\n {element.placeholder ? (\n <option value=\"\">{renderText(element.placeholder as BlockKitText) as ReactNode}</option>\n ) : null}\n {(element.options as Array<{ text: BlockKitText; value: string }>)?.map((option, i) => (\n <option key={i} value={option.value}>\n {renderText(option.text)}\n </option>\n ))}\n </select>\n );\n\n case 'datepicker':\n return (\n <input\n type=\"date\"\n className=\"px-3 py-2 text-sm border border-default rounded bg-surface text-primary transition-colors focus:ring-2 focus:ring-primary/20\"\n onChange={(e) => onAction?.(element.action_id || '', e.target.value)}\n />\n );\n\n case 'checkboxes':\n return (\n <div className=\"space-y-1\">\n {(element.options as Array<{ text: BlockKitText; value: string }>)?.map((option, i) => (\n <label key={i} className=\"flex items-center gap-2 text-sm\">\n <input\n type=\"checkbox\"\n className=\"rounded border-default transition-colors\"\n onChange={(e) => onAction?.(element.action_id || '', option.value, { checked: e.target.checked })}\n />\n {renderText(option.text)}\n </label>\n ))}\n </div>\n );\n\n case 'radio_buttons':\n return (\n <div className=\"space-y-1\">\n {(element.options as Array<{ text: BlockKitText; value: string }>)?.map((option, i) => (\n <label key={i} className=\"flex items-center gap-2 text-sm\">\n <input\n type=\"radio\"\n name={element.action_id}\n className=\"border-default transition-colors\"\n onChange={() => onAction?.(element.action_id || '', option.value)}\n />\n {renderText(option.text)}\n </label>\n ))}\n </div>\n );\n\n default:\n return null;\n }\n});\n\n// ============================================================================\n// Auto-generate BlockKit blocks from arbitrary data\n// ============================================================================\n\nfunction generateBlocksFromData(data: Record<string, unknown>): BlockKitElement[] {\n const blocks: BlockKitElement[] = [];\n\n for (const [key, value] of Object.entries(data)) {\n if (value === null || value === undefined) continue;\n\n // Handle arrays\n if (Array.isArray(value)) {\n // Add header for the array\n blocks.push({\n type: 'header',\n text: {\n type: 'plain_text',\n text: formatKey(key),\n emoji: true,\n },\n });\n\n // Add each item\n value.forEach((item, index) => {\n if (typeof item === 'object' && item !== null) {\n // Object items - render as section with fields\n const fields: BlockKitText[] = [];\n for (const [itemKey, itemValue] of Object.entries(item)) {\n if (itemValue !== null && itemValue !== undefined) {\n fields.push({\n type: 'mrkdwn',\n text: `*${formatKey(itemKey)}:*\\n${formatValue(itemValue)}`,\n });\n }\n }\n if (fields.length > 0) {\n blocks.push({\n type: 'section',\n fields: fields.slice(0, 10), // BlockKit max 10 fields\n });\n }\n } else {\n // Primitive items - render as simple section\n blocks.push({\n type: 'section',\n text: {\n type: 'mrkdwn',\n text: `${index + 1}. ${formatValue(item)}`,\n },\n });\n }\n\n // Add divider between items (except last)\n if (index < value.length - 1) {\n blocks.push({ type: 'divider' });\n }\n });\n }\n // Handle objects\n else if (typeof value === 'object') {\n blocks.push({\n type: 'header',\n text: {\n type: 'plain_text',\n text: formatKey(key),\n emoji: true,\n },\n });\n\n const fields: BlockKitText[] = [];\n for (const [objKey, objValue] of Object.entries(value as Record<string, unknown>)) {\n if (objValue !== null && objValue !== undefined) {\n fields.push({\n type: 'mrkdwn',\n text: `*${formatKey(objKey)}:*\\n${formatValue(objValue)}`,\n });\n }\n }\n if (fields.length > 0) {\n blocks.push({\n type: 'section',\n fields: fields.slice(0, 10),\n });\n }\n }\n // Handle primitives\n else {\n blocks.push({\n type: 'section',\n text: {\n type: 'mrkdwn',\n text: `*${formatKey(key)}:* ${formatValue(value)}`,\n },\n });\n }\n }\n\n return blocks;\n}\n\nfunction formatKey(key: string): string {\n // Convert camelCase or snake_case to Title Case\n return key\n .replace(/_/g, ' ')\n .replace(/([A-Z])/g, ' $1')\n .replace(/^./, (str) => str.toUpperCase())\n .trim();\n}\n\nfunction formatValue(value: unknown): string {\n if (value === null || value === undefined) return '-';\n if (typeof value === 'boolean') return value ? 'Yes' : 'No';\n if (typeof value === 'object') return JSON.stringify(value);\n return String(value);\n}\n\n// ============================================================================\n// Main Renderer Component\n// ============================================================================\n\nexport const BlockKitRenderer: React.FC<RendererProps> = memo(function BlockKitRenderer({\n widget,\n data,\n template,\n isLoading,\n error,\n onDrilldown: _onDrilldown,\n onAction,\n}) {\n // Debug logging\n\n // Parse and bind template\n const boundTemplate = useMemo(() => {\n // 1. If template has blocks, bind data and use it\n if (template && 'blocks' in (template as Record<string, unknown>)) {\n return bindDataToTemplate(template as unknown as BlockKitTemplate, data);\n }\n\n // 2. If data has blocks, use it directly as BlockKit format\n if (data && 'blocks' in data) {\n return data as unknown as BlockKitTemplate;\n }\n\n // 3. If we have any data, auto-generate blocks from it\n if (data && Object.keys(data).length > 0) {\n const generatedBlocks = generateBlocksFromData(data);\n if (generatedBlocks.length > 0) {\n return { blocks: generatedBlocks } as BlockKitTemplate;\n }\n }\n\n // 4. If template exists but no blocks, try to bind and check again\n if (template) {\n const bound = bindDataToTemplate(template as unknown as BlockKitTemplate, data);\n if (bound?.blocks?.length) {\n return bound;\n }\n }\n\n return null;\n }, [template, data]);\n\n // Handle action clicks\n const handleAction = useCallback(\n (actionId: string, value?: string, actionData?: Record<string, unknown>) => {\n if (onAction) {\n onAction(actionId, { value, ...actionData });\n }\n },\n [onAction]\n );\n\n // Loading state\n if (isLoading) {\n return (\n <div className=\"flex items-center justify-center h-full p-4 animate-in fade-in duration-200\">\n <div className=\"animate-pulse space-y-2 w-full\">\n <div className=\"h-4 bg-bg-sunken rounded w-3/4\" />\n <div className=\"h-4 bg-bg-sunken rounded w-1/2\" />\n <div className=\"h-4 bg-bg-sunken rounded w-5/6\" />\n </div>\n </div>\n );\n }\n\n // Error state\n if (error) {\n return (\n <div className=\"flex items-center justify-center h-full p-4 text-red-600 dark:text-red-400\">\n <div className=\"text-center\">\n <p className=\"font-medium\">Error rendering blocks</p>\n <p className=\"text-sm mt-1\">{error}</p>\n </div>\n </div>\n );\n }\n\n // Empty state\n if (!boundTemplate?.blocks?.length) {\n return (\n <div className=\"flex items-center justify-center h-full p-4 text-secondary animate-in fade-in duration-200\">\n <div className=\"text-center\">\n <p>No content to display</p>\n <p className=\"text-sm mt-1\">Configure blocks or provide data</p>\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"flex flex-col h-full p-4 bg-surface\">\n {/* Render blocks */}\n {boundTemplate.blocks.map((block, i) => (\n <BlockRenderer key={i} block={block} index={i} onAction={handleAction} />\n ))}\n\n {/* Render attachments */}\n {boundTemplate.attachments?.map((attachment, i) => (\n <div\n key={`attachment-${i}`}\n className=\"mt-4 border-l-4 pl-3\"\n style={{ borderLeftColor: attachment.color || 'var(--color-border)' }}\n >\n {attachment.blocks?.map((block, j) => (\n <BlockRenderer key={j} block={block} index={j} onAction={handleAction} />\n ))}\n {attachment.fallback && !attachment.blocks && <p className=\"text-sm text-secondary\">{attachment.fallback}</p>}\n </div>\n ))}\n </div>\n );\n});\n\nexport default BlockKitRenderer;\n"],"mappings":";;;AAkBA,SAAS,EAAW,GAA0D;AAC5E,KAAI,CAAC,EAAM,QAAO;AAElB,KAAI,OAAO,KAAS,SAClB,QAAO;AAGT,KAAI,EAAK,SAAS,UAAU;EAE1B,IAAM,IAAU,EAAK,QAAQ,IAGvB,IAA8B,EAAE,EAClC,IAAY,GACZ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ow-hidden animate-in fade-in duration-200",
64
64
  children: [
65
65
  s && /* @__PURE__ */ n("div", {
66
- className: "aspect-video bg-muted",
66
+ className: "aspect-video bg-bg-sunken",
67
67
  children: /* @__PURE__ */ n("img", {
68
68
  src: s,
69
69
  alt: "",
@@ -131,7 +131,7 @@ var c = ({ componentName: e }) => /* @__PURE__ */ n("div", {
131
131
  className: "flex items-center justify-center h-full p-4 animate-in fade-in duration-200",
132
132
  children: /* @__PURE__ */ r("div", {
133
133
  className: "animate-pulse space-y-2 w-full",
134
- children: [/* @__PURE__ */ n("div", { className: "h-4 bg-muted rounded w-3/4" }), /* @__PURE__ */ n("div", { className: "h-4 bg-muted rounded w-1/2" })]
134
+ children: [/* @__PURE__ */ n("div", { className: "h-4 bg-bg-sunken rounded w-3/4" }), /* @__PURE__ */ n("div", { className: "h-4 bg-bg-sunken rounded w-1/2" })]
135
135
  })
136
136
  }) : l ? /* @__PURE__ */ n("div", {
137
137
  className: "flex items-center justify-center h-full p-4 text-red-600 dark:text-red-400",
@@ -1 +1 @@
1
- {"version":3,"file":"CustomRenderer.js","names":[],"sources":["../../../../src/bigconsole/renderers/adapters/CustomRenderer.tsx"],"sourcesContent":["/**\n * Custom Renderer (v2.0)\n *\n * Renders widgets using custom React components registered by the application.\n * Supports dynamic component resolution and prop mapping.\n */\n\nimport React, { memo, useMemo, type ComponentType } from 'react';\nimport type { RendererProps } from '../types/renderer';\n\n// ============================================================================\n// Custom Component Registry\n// ============================================================================\n\n// Registry of custom components\nconst customComponentRegistry = new Map<string, ComponentType<CustomComponentProps>>();\n\nexport interface CustomComponentProps {\n widget: RendererProps['widget'];\n data: Record<string, unknown>;\n template?: Record<string, unknown> | null;\n props?: Record<string, unknown>;\n onAction?: (actionName: string, payload: Record<string, unknown>) => void;\n onDrilldown?: (params: Record<string, unknown>) => void;\n}\n\n/**\n * Register a custom component\n */\nexport function registerCustomComponent(name: string, component: ComponentType<CustomComponentProps>): void {\n customComponentRegistry.set(name, component);\n}\n\n/**\n * Unregister a custom component\n */\nexport function unregisterCustomComponent(name: string): boolean {\n return customComponentRegistry.delete(name);\n}\n\n/**\n * Check if a custom component is registered\n */\nexport function hasCustomComponent(name: string): boolean {\n return customComponentRegistry.has(name);\n}\n\n/**\n * Get a registered custom component\n */\nexport function getCustomComponent(name: string): ComponentType<CustomComponentProps> | undefined {\n return customComponentRegistry.get(name);\n}\n\n/**\n * Get all registered component names\n */\nexport function getRegisteredComponentNames(): string[] {\n return Array.from(customComponentRegistry.keys());\n}\n\n// ============================================================================\n// Default Custom Components\n// ============================================================================\n\n/**\n * Simple Text Display Component\n */\nexport const SimpleTextComponent: React.FC<CustomComponentProps> = ({ data, props }) => {\n const text = (data.text || props?.text) as string | undefined;\n const align = (props?.align || 'left') as string;\n\n if (!text) {\n return (\n <div className=\"flex items-center justify-center h-full p-4 text-secondary\">\n <p className=\"text-sm\">No data available</p>\n </div>\n );\n }\n\n return (\n <div className={`p-4 text-${align}`}>\n <p className=\"text-primary\">{text}</p>\n </div>\n );\n};\n\n/**\n * Simple Counter Component\n */\nexport const CounterComponent: React.FC<CustomComponentProps> = ({ data, props }) => {\n const rawValue = data.value ?? props?.value;\n const label = (data.label || props?.label) as string | undefined;\n const format = (props?.format || 'number') as string;\n\n if (rawValue === undefined || rawValue === null) {\n return (\n <div className=\"flex flex-col items-center justify-center h-full p-4 text-secondary\">\n <p className=\"text-sm\">No data available</p>\n </div>\n );\n }\n\n const value = rawValue as number;\n\n const formattedValue =\n format === 'currency'\n ? new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }).format(value)\n : format === 'percent'\n ? `${(value * 100).toFixed(1)}%`\n : new Intl.NumberFormat().format(value);\n\n return (\n <div className=\"flex flex-col items-center justify-center h-full p-4 animate-in fade-in duration-200\">\n <span className=\"text-3xl font-bold text-primary\">{formattedValue}</span>\n {label && <span className=\"text-sm text-secondary mt-1\">{label}</span>}\n </div>\n );\n};\n\n/**\n * Simple Card Component\n */\nexport const CardComponent: React.FC<CustomComponentProps> = ({ data, props, onAction }) => {\n const title = (data.title || props?.title) as string | undefined;\n const description = (data.description || props?.description || '') as string;\n\n if (!title && !description) {\n return (\n <div className=\"flex items-center justify-center h-full p-4 text-secondary\">\n <p className=\"text-sm\">No data available</p>\n </div>\n );\n }\n const image = (data.image || props?.image) as string | undefined;\n const actionLabel = (props?.actionLabel || 'View Details') as string;\n const showAction = props?.showAction !== false;\n\n return (\n <div className=\"flex flex-col h-full bg-surface rounded-lg overflow-hidden animate-in fade-in duration-200\">\n {image && (\n <div className=\"aspect-video bg-muted\">\n <img src={image} alt=\"\" className=\"w-full h-full object-cover\" />\n </div>\n )}\n <div className=\"flex-1 p-4\">\n {title && <h3 className=\"text-lg font-semibold text-primary\">{title}</h3>}\n {description && <p className=\"text-sm text-secondary mt-1\">{description}</p>}\n </div>\n {showAction && (\n <div className=\"p-4 pt-0\">\n <button\n type=\"button\"\n onClick={() => onAction?.('click', { title })}\n className=\"w-full px-4 py-2 text-sm font-medium text-white bg-action-primary hover:bg-action-primary/90 rounded-md transition-colors\"\n >\n {actionLabel}\n </button>\n </div>\n )}\n </div>\n );\n};\n\n// Register default components\nregisterCustomComponent('SimpleText', SimpleTextComponent);\nregisterCustomComponent('Counter', CounterComponent);\nregisterCustomComponent('Card', CardComponent);\n\n// ============================================================================\n// Fallback Component\n// ============================================================================\n\nconst FallbackComponent: React.FC<{ componentName: string }> = ({ componentName }) => (\n <div className=\"flex flex-col items-center justify-center h-full p-4 text-secondary animate-in fade-in duration-200\">\n <div className=\"text-center\">\n <p className=\"font-medium\">Component Not Found</p>\n <p className=\"text-sm mt-1\">Component &quot;{componentName}&quot; is not registered</p>\n <div className=\"mt-4 text-xs\">\n <p>Available components:</p>\n <ul className=\"mt-1\">\n {getRegisteredComponentNames().map((name) => (\n <li key={name} className=\"text-link\">\n {name}\n </li>\n ))}\n </ul>\n </div>\n </div>\n </div>\n);\n\n// ============================================================================\n// Main Renderer Component\n// ============================================================================\n\nexport const CustomRenderer: React.FC<RendererProps> = memo(function CustomRenderer({\n widget,\n data,\n template,\n isLoading,\n error,\n onDrilldown,\n onAction,\n}) {\n // Get component name from template\n const componentName = useMemo(() => {\n if (template && typeof template === 'object' && 'componentName' in template) {\n return template.componentName as string;\n }\n // Fallback to widget config\n const config = widget.config as Record<string, unknown>;\n return (config?.componentName || config?.componentId || '') as string;\n }, [template, widget.config]);\n\n // Get additional props from template\n const componentProps = useMemo(() => {\n if (template && typeof template === 'object' && 'props' in template) {\n return template.props as Record<string, unknown>;\n }\n return {};\n }, [template]);\n\n // Get the component\n const Component = useMemo(() => {\n if (!componentName) return null;\n return getCustomComponent(componentName);\n }, [componentName]);\n\n // Loading state\n if (isLoading) {\n return (\n <div className=\"flex items-center justify-center h-full p-4 animate-in fade-in duration-200\">\n <div className=\"animate-pulse space-y-2 w-full\">\n <div className=\"h-4 bg-muted rounded w-3/4\" />\n <div className=\"h-4 bg-muted rounded w-1/2\" />\n </div>\n </div>\n );\n }\n\n // Error state\n if (error) {\n return (\n <div className=\"flex items-center justify-center h-full p-4 text-red-600 dark:text-red-400\">\n <div className=\"text-center\">\n <p className=\"font-medium\">Error rendering component</p>\n <p className=\"text-sm mt-1\">{error}</p>\n </div>\n </div>\n );\n }\n\n // No component name\n if (!componentName) {\n return (\n <div className=\"flex items-center justify-center h-full p-4 text-secondary animate-in fade-in duration-200\">\n <div className=\"text-center\">\n <p className=\"font-medium\">No Component Specified</p>\n <p className=\"text-sm mt-1\">Set componentName in template or widget config</p>\n </div>\n </div>\n );\n }\n\n // Component not found\n if (!Component) {\n return <FallbackComponent componentName={componentName} />;\n }\n\n // Render the custom component\n return (\n <Component\n widget={widget}\n data={data}\n template={template}\n props={componentProps}\n onAction={onAction}\n onDrilldown={onDrilldown}\n />\n );\n});\n\nexport default CustomRenderer;\n"],"mappings":";;;AAeA,IAAM,oBAA0B,IAAI,KAAkD;AActF,SAAgB,EAAwB,GAAc,GAAsD;AAC1G,GAAwB,IAAI,GAAM,EAAU;;AAoB9C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AAS;EAGlB,IAAM,IAAS,EAAO;AACtB,SAAQ,GAAQ,iBAAiB,GAAQ,eAAe;IACvD,CAAC,GAAU,EAAO,OAAO,CAAC,EAGvB,IAAiB,QACjB,KAAY,OAAO,KAAa,YAAY,WAAW,IAClD,EAAS,QAEX,EAAE,EACR,CAAC,EAAS,CAAC,EAGR,IAAY,QACX,IACE,EAAmB,EAAc,GADb,MAE1B,CAAC,EAAc,CAAC;AA4CnB,QAzCI,IAEA,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,OAAD,EAAK,WAAU,8BAA+B,CAAA,EAC9C,kBAAC,OAAD,EAAK,WAAU,8BAA+B,CAAA,CAC1C;;EACF,CAAA,GAKN,IAEA,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,KAAD;IAAG,WAAU;cAAc;IAA6B,CAAA,EACxD,kBAAC,KAAD;IAAG,WAAU;cAAgB;IAAU,CAAA,CACnC;;EACF,CAAA,GAKL,IAYA,IAMH,kBAAC,GAAD;EACU;EACF;EACI;EACV,OAAO;EACG;EACG;EACb,CAAA,GAZK,kBAAC,GAAD,EAAkC,kBAAiB,CAAA,GAXxD,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,KAAD;IAAG,WAAU;cAAc;IAA0B,CAAA,EACrD,kBAAC,KAAD;IAAG,WAAU;cAAe;IAAkD,CAAA,CAC1E;;EACF,CAAA;EAoBV"}
1
+ {"version":3,"file":"CustomRenderer.js","names":[],"sources":["../../../../src/bigconsole/renderers/adapters/CustomRenderer.tsx"],"sourcesContent":["/**\n * Custom Renderer (v2.0)\n *\n * Renders widgets using custom React components registered by the application.\n * Supports dynamic component resolution and prop mapping.\n */\n\nimport React, { memo, useMemo, type ComponentType } from 'react';\nimport type { RendererProps } from '../types/renderer';\n\n// ============================================================================\n// Custom Component Registry\n// ============================================================================\n\n// Registry of custom components\nconst customComponentRegistry = new Map<string, ComponentType<CustomComponentProps>>();\n\nexport interface CustomComponentProps {\n widget: RendererProps['widget'];\n data: Record<string, unknown>;\n template?: Record<string, unknown> | null;\n props?: Record<string, unknown>;\n onAction?: (actionName: string, payload: Record<string, unknown>) => void;\n onDrilldown?: (params: Record<string, unknown>) => void;\n}\n\n/**\n * Register a custom component\n */\nexport function registerCustomComponent(name: string, component: ComponentType<CustomComponentProps>): void {\n customComponentRegistry.set(name, component);\n}\n\n/**\n * Unregister a custom component\n */\nexport function unregisterCustomComponent(name: string): boolean {\n return customComponentRegistry.delete(name);\n}\n\n/**\n * Check if a custom component is registered\n */\nexport function hasCustomComponent(name: string): boolean {\n return customComponentRegistry.has(name);\n}\n\n/**\n * Get a registered custom component\n */\nexport function getCustomComponent(name: string): ComponentType<CustomComponentProps> | undefined {\n return customComponentRegistry.get(name);\n}\n\n/**\n * Get all registered component names\n */\nexport function getRegisteredComponentNames(): string[] {\n return Array.from(customComponentRegistry.keys());\n}\n\n// ============================================================================\n// Default Custom Components\n// ============================================================================\n\n/**\n * Simple Text Display Component\n */\nexport const SimpleTextComponent: React.FC<CustomComponentProps> = ({ data, props }) => {\n const text = (data.text || props?.text) as string | undefined;\n const align = (props?.align || 'left') as string;\n\n if (!text) {\n return (\n <div className=\"flex items-center justify-center h-full p-4 text-secondary\">\n <p className=\"text-sm\">No data available</p>\n </div>\n );\n }\n\n return (\n <div className={`p-4 text-${align}`}>\n <p className=\"text-primary\">{text}</p>\n </div>\n );\n};\n\n/**\n * Simple Counter Component\n */\nexport const CounterComponent: React.FC<CustomComponentProps> = ({ data, props }) => {\n const rawValue = data.value ?? props?.value;\n const label = (data.label || props?.label) as string | undefined;\n const format = (props?.format || 'number') as string;\n\n if (rawValue === undefined || rawValue === null) {\n return (\n <div className=\"flex flex-col items-center justify-center h-full p-4 text-secondary\">\n <p className=\"text-sm\">No data available</p>\n </div>\n );\n }\n\n const value = rawValue as number;\n\n const formattedValue =\n format === 'currency'\n ? new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }).format(value)\n : format === 'percent'\n ? `${(value * 100).toFixed(1)}%`\n : new Intl.NumberFormat().format(value);\n\n return (\n <div className=\"flex flex-col items-center justify-center h-full p-4 animate-in fade-in duration-200\">\n <span className=\"text-3xl font-bold text-primary\">{formattedValue}</span>\n {label && <span className=\"text-sm text-secondary mt-1\">{label}</span>}\n </div>\n );\n};\n\n/**\n * Simple Card Component\n */\nexport const CardComponent: React.FC<CustomComponentProps> = ({ data, props, onAction }) => {\n const title = (data.title || props?.title) as string | undefined;\n const description = (data.description || props?.description || '') as string;\n\n if (!title && !description) {\n return (\n <div className=\"flex items-center justify-center h-full p-4 text-secondary\">\n <p className=\"text-sm\">No data available</p>\n </div>\n );\n }\n const image = (data.image || props?.image) as string | undefined;\n const actionLabel = (props?.actionLabel || 'View Details') as string;\n const showAction = props?.showAction !== false;\n\n return (\n <div className=\"flex flex-col h-full bg-surface rounded-lg overflow-hidden animate-in fade-in duration-200\">\n {image && (\n <div className=\"aspect-video bg-bg-sunken\">\n <img src={image} alt=\"\" className=\"w-full h-full object-cover\" />\n </div>\n )}\n <div className=\"flex-1 p-4\">\n {title && <h3 className=\"text-lg font-semibold text-primary\">{title}</h3>}\n {description && <p className=\"text-sm text-secondary mt-1\">{description}</p>}\n </div>\n {showAction && (\n <div className=\"p-4 pt-0\">\n <button\n type=\"button\"\n onClick={() => onAction?.('click', { title })}\n className=\"w-full px-4 py-2 text-sm font-medium text-white bg-action-primary hover:bg-action-primary/90 rounded-md transition-colors\"\n >\n {actionLabel}\n </button>\n </div>\n )}\n </div>\n );\n};\n\n// Register default components\nregisterCustomComponent('SimpleText', SimpleTextComponent);\nregisterCustomComponent('Counter', CounterComponent);\nregisterCustomComponent('Card', CardComponent);\n\n// ============================================================================\n// Fallback Component\n// ============================================================================\n\nconst FallbackComponent: React.FC<{ componentName: string }> = ({ componentName }) => (\n <div className=\"flex flex-col items-center justify-center h-full p-4 text-secondary animate-in fade-in duration-200\">\n <div className=\"text-center\">\n <p className=\"font-medium\">Component Not Found</p>\n <p className=\"text-sm mt-1\">Component &quot;{componentName}&quot; is not registered</p>\n <div className=\"mt-4 text-xs\">\n <p>Available components:</p>\n <ul className=\"mt-1\">\n {getRegisteredComponentNames().map((name) => (\n <li key={name} className=\"text-link\">\n {name}\n </li>\n ))}\n </ul>\n </div>\n </div>\n </div>\n);\n\n// ============================================================================\n// Main Renderer Component\n// ============================================================================\n\nexport const CustomRenderer: React.FC<RendererProps> = memo(function CustomRenderer({\n widget,\n data,\n template,\n isLoading,\n error,\n onDrilldown,\n onAction,\n}) {\n // Get component name from template\n const componentName = useMemo(() => {\n if (template && typeof template === 'object' && 'componentName' in template) {\n return template.componentName as string;\n }\n // Fallback to widget config\n const config = widget.config as Record<string, unknown>;\n return (config?.componentName || config?.componentId || '') as string;\n }, [template, widget.config]);\n\n // Get additional props from template\n const componentProps = useMemo(() => {\n if (template && typeof template === 'object' && 'props' in template) {\n return template.props as Record<string, unknown>;\n }\n return {};\n }, [template]);\n\n // Get the component\n const Component = useMemo(() => {\n if (!componentName) return null;\n return getCustomComponent(componentName);\n }, [componentName]);\n\n // Loading state\n if (isLoading) {\n return (\n <div className=\"flex items-center justify-center h-full p-4 animate-in fade-in duration-200\">\n <div className=\"animate-pulse space-y-2 w-full\">\n <div className=\"h-4 bg-bg-sunken rounded w-3/4\" />\n <div className=\"h-4 bg-bg-sunken rounded w-1/2\" />\n </div>\n </div>\n );\n }\n\n // Error state\n if (error) {\n return (\n <div className=\"flex items-center justify-center h-full p-4 text-red-600 dark:text-red-400\">\n <div className=\"text-center\">\n <p className=\"font-medium\">Error rendering component</p>\n <p className=\"text-sm mt-1\">{error}</p>\n </div>\n </div>\n );\n }\n\n // No component name\n if (!componentName) {\n return (\n <div className=\"flex items-center justify-center h-full p-4 text-secondary animate-in fade-in duration-200\">\n <div className=\"text-center\">\n <p className=\"font-medium\">No Component Specified</p>\n <p className=\"text-sm mt-1\">Set componentName in template or widget config</p>\n </div>\n </div>\n );\n }\n\n // Component not found\n if (!Component) {\n return <FallbackComponent componentName={componentName} />;\n }\n\n // Render the custom component\n return (\n <Component\n widget={widget}\n data={data}\n template={template}\n props={componentProps}\n onAction={onAction}\n onDrilldown={onDrilldown}\n />\n );\n});\n\nexport default CustomRenderer;\n"],"mappings":";;;AAeA,IAAM,oBAA0B,IAAI,KAAkD;AActF,SAAgB,EAAwB,GAAc,GAAsD;AAC1G,GAAwB,IAAI,GAAM,EAAU;;AAoB9C,SAAgB,EAAmB,GAA+D;AAChG,QAAO,EAAwB,IAAI,EAAK;;AAM1C,SAAgB,IAAwC;AACtD,QAAO,MAAM,KAAK,EAAwB,MAAM,CAAC;;AA2GnD,EAAwB,eAjG4C,EAAE,SAAM,eAAY;CACtF,IAAM,IAAQ,EAAK,QAAQ,GAAO,MAC5B,IAAS,GAAO,SAAS;AAU/B,QARK,IASH,kBAAC,OAAD;EAAK,WAAW,YAAY;YAC1B,kBAAC,KAAD;GAAG,WAAU;aAAgB;GAAS,CAAA;EAClC,CAAA,GATJ,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,KAAD;GAAG,WAAU;aAAU;GAAqB,CAAA;EACxC,CAAA;EAyF8C,EAC1D,EAAwB,YA5EyC,EAAE,SAAM,eAAY;CACnF,IAAM,IAAW,EAAK,SAAS,GAAO,OAChC,IAAS,EAAK,SAAS,GAAO,OAC9B,IAAU,GAAO,UAAU;AAEjC,KAAI,KAAuC,KACzC,QACE,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,KAAD;GAAG,WAAU;aAAU;GAAqB,CAAA;EACxC,CAAA;CAIV,IAAM,IAAQ;AASd,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,QAAD;GAAM,WAAU;aARlB,MAAW,aACP,IAAI,KAAK,aAAa,SAAS;IAAE,OAAO;IAAY,UAAU;IAAO,CAAC,CAAC,OAAO,EAAM,GACpF,MAAW,YACT,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rD,kBAAC,KAAD;IAAG,WAAU;cAAe;IAAkD,CAAA,CAC1E;;EACF,CAAA;EAoBV"}
@@ -1714,6 +1714,57 @@ e`
1714
1714
  }
1715
1715
  ${C}`;
1716
1716
  var ht = e`
1717
+ mutation CreateSandbox($input: CreateSandboxInput!) {
1718
+ createSandbox(input: $input) {
1719
+ id
1720
+ name
1721
+ status
1722
+ network {
1723
+ internalUrl
1724
+ }
1725
+ }
1726
+ }
1727
+ `, gt = e`
1728
+ mutation ProxySandboxRequest($input: ProxySandboxRequestInput!) {
1729
+ proxySandboxRequest(input: $input) {
1730
+ status
1731
+ body
1732
+ }
1733
+ }
1734
+ `, _t = e`
1735
+ mutation ExtendSandboxTtl($id: ID!, $additionalSeconds: Int!, $context: ContextInput!) {
1736
+ extendSandboxTTL(
1737
+ id: $id
1738
+ additionalSeconds: $additionalSeconds
1739
+ context: $context
1740
+ ) {
1741
+ id
1742
+ expiresAt
1743
+ }
1744
+ }
1745
+ `, vt = e`
1746
+ query GetSandbox($id: ID!, $context: ContextInput!) {
1747
+ getSandbox(id: $id, context: $context) {
1748
+ id
1749
+ status
1750
+ errorMessage
1751
+ network {
1752
+ internalUrl
1753
+ }
1754
+ }
1755
+ }
1756
+ `, yt = e`
1757
+ query GetActiveSandboxes($context: ContextInput!) {
1758
+ getActiveSandboxes(context: $context) {
1759
+ id
1760
+ name
1761
+ status
1762
+ metadata
1763
+ template
1764
+ createdBy
1765
+ }
1766
+ }
1767
+ `, bt = e`
1717
1768
  mutation BatchUpdateWidgetPositions($updates: [WidgetPositionUpdateInput!]!) {
1718
1769
  batchUpdateWidgetPositions(updates: $updates) {
1719
1770
  id
@@ -1721,25 +1772,25 @@ var ht = e`
1721
1772
  updatedAt
1722
1773
  }
1723
1774
  }
1724
- `, gt = e`
1775
+ `, xt = e`
1725
1776
  mutation CreateEventWebhookMapping($input: CreateEventWebhookMappingInput!) {
1726
1777
  createEventWebhookMapping(input: $input) {
1727
1778
  ...EventWebhookMappingFields
1728
1779
  }
1729
1780
  }
1730
- ${E}`, _t = e`
1781
+ ${E}`, St = e`
1731
1782
  mutation CreateWidget($input: BigConsoleCreateWidgetInput!) {
1732
1783
  createBigConsoleWidget(input: $input) {
1733
1784
  ...WidgetFullFields
1734
1785
  }
1735
1786
  }
1736
- ${N}`, vt = e`
1787
+ ${N}`, Ct = e`
1737
1788
  mutation CreateWidgetAction($input: CreateWidgetActionInput!) {
1738
1789
  createWidgetAction(input: $input) {
1739
1790
  ...WidgetActionFields
1740
1791
  }
1741
1792
  }
1742
- ${M}`, yt = e`
1793
+ ${M}`, wt = e`
1743
1794
  mutation CreateWidgetDrilldown($sourceWidgetId: ID!, $targetDashboardId: ID!, $parameterMapping: JSON!, $navigationMode: NavigationMode = SAME_WINDOW) {
1744
1795
  createWidgetDrilldown(
1745
1796
  sourceWidgetId: $sourceWidgetId
@@ -1750,29 +1801,29 @@ var ht = e`
1750
1801
  ...WidgetDrilldownFields
1751
1802
  }
1752
1803
  }
1753
- ${k}`, bt = e`
1804
+ ${k}`, Tt = e`
1754
1805
  mutation DeleteEventWebhookMapping($id: ID!) {
1755
1806
  deleteEventWebhookMapping(id: $id)
1756
1807
  }
1757
- `, xt = e`
1808
+ `, Et = e`
1758
1809
  mutation DeleteWidget($id: ID!) {
1759
1810
  deleteBigConsoleWidget(id: $id)
1760
1811
  }
1761
- `, St = e`
1812
+ `, Dt = e`
1762
1813
  mutation DeleteWidgetAction($id: ID!) {
1763
1814
  deleteWidgetAction(id: $id)
1764
1815
  }
1765
- `, Ct = e`
1816
+ `, Ot = e`
1766
1817
  mutation DeleteWidgetDrilldown($id: ID!) {
1767
1818
  deleteWidgetDrilldown(id: $id)
1768
1819
  }
1769
- `, wt = e`
1820
+ `, kt = e`
1770
1821
  mutation DuplicateWidget($id: ID!, $newPosition: WidgetPositionInput, $newTitle: String) {
1771
1822
  duplicateWidget(id: $id, newPosition: $newPosition, newTitle: $newTitle) {
1772
1823
  ...WidgetFullFields
1773
1824
  }
1774
1825
  }
1775
- ${N}`, Tt = e`
1826
+ ${N}`, At = e`
1776
1827
  mutation EmitWidgetEvent($input: EmitWidgetEventInput!) {
1777
1828
  emitWidgetEvent(input: $input) {
1778
1829
  ...EventLogFields
@@ -1790,26 +1841,26 @@ e`
1790
1841
  }
1791
1842
  }
1792
1843
  ${N}`;
1793
- var Et = e`
1844
+ var jt = e`
1794
1845
  mutation RefreshWidgetData($widgetId: ID!) {
1795
1846
  refreshWidgetData(widgetId: $widgetId) {
1796
1847
  ...WidgetDataFields
1797
1848
  }
1798
1849
  }
1799
- ${j}`, Dt = e`
1850
+ ${j}`, Mt = e`
1800
1851
  mutation ReorderWidgetActions($widgetId: ID!, $actionIds: [ID!]!) {
1801
1852
  reorderWidgetActions(widgetId: $widgetId, actionIds: $actionIds) {
1802
1853
  id
1803
1854
  order
1804
1855
  }
1805
1856
  }
1806
- `, Ot = e`
1857
+ `, Nt = e`
1807
1858
  mutation RetryEventDelivery($eventId: ID!) {
1808
1859
  retryEventDelivery(eventId: $eventId) {
1809
1860
  ...EventLogFields
1810
1861
  }
1811
1862
  }
1812
- ${T}`, kt = e`
1863
+ ${T}`, Pt = e`
1813
1864
  mutation TestWebhookMapping($id: ID!) {
1814
1865
  testWebhookMapping(id: $id) {
1815
1866
  success
@@ -1819,31 +1870,31 @@ var Et = e`
1819
1870
  latencyMs
1820
1871
  }
1821
1872
  }
1822
- `, At = e`
1873
+ `, Ft = e`
1823
1874
  mutation ToggleEventWebhookMapping($id: ID!, $isActive: Boolean!) {
1824
1875
  toggleEventWebhookMapping(id: $id, isActive: $isActive) {
1825
1876
  ...EventWebhookMappingFields
1826
1877
  }
1827
1878
  }
1828
- ${E}`, jt = e`
1879
+ ${E}`, It = e`
1829
1880
  mutation UpdateEventWebhookMapping($id: ID!, $input: UpdateEventWebhookMappingInput!) {
1830
1881
  updateEventWebhookMapping(id: $id, input: $input) {
1831
1882
  ...EventWebhookMappingFields
1832
1883
  }
1833
1884
  }
1834
- ${E}`, Mt = e`
1885
+ ${E}`, Lt = e`
1835
1886
  mutation UpdateWidget($input: BigConsoleUpdateWidgetInput!) {
1836
1887
  updateBigConsoleWidget(input: $input) {
1837
1888
  ...WidgetFullFields
1838
1889
  }
1839
1890
  }
1840
- ${N}`, Nt = e`
1891
+ ${N}`, Rt = e`
1841
1892
  mutation UpdateWidgetAction($input: UpdateWidgetActionInput!) {
1842
1893
  updateWidgetAction(input: $input) {
1843
1894
  ...WidgetActionFields
1844
1895
  }
1845
1896
  }
1846
- ${M}`, $ = e`
1897
+ ${M}`, zt = e`
1847
1898
  mutation UpdateWidgetDrilldown($id: ID!, $targetDashboardId: ID, $parameterMapping: JSON, $navigationMode: NavigationMode, $enabled: Boolean) {
1848
1899
  updateWidgetDrilldown(
1849
1900
  id: $id
@@ -1882,19 +1933,19 @@ e`
1882
1933
  }
1883
1934
  }
1884
1935
  ${E}`;
1885
- var Pt = e`
1936
+ var Bt = e`
1886
1937
  query GetWidget($id: ID!) {
1887
1938
  getWidget(id: $id) {
1888
1939
  ...WidgetFullFields
1889
1940
  }
1890
1941
  }
1891
- ${N}`, Ft = e`
1942
+ ${N}`, $ = e`
1892
1943
  query GetWidgetActions($widgetId: ID!) {
1893
1944
  getWidgetActions(widgetId: $widgetId) {
1894
1945
  ...WidgetActionFields
1895
1946
  }
1896
1947
  }
1897
- ${M}`, It = e`
1948
+ ${M}`, Vt = e`
1898
1949
  query GetWidgetTypes {
1899
1950
  getWidgetTypes {
1900
1951
  ...WidgetTypeInfoFields
@@ -1920,7 +1971,7 @@ e`
1920
1971
  ${k}
1921
1972
  ${A}
1922
1973
  ${j}`;
1923
- var Lt = e`
1974
+ var Ht = e`
1924
1975
  query ListEventLogs($dashboardId: ID, $widgetId: ID, $eventName: String, $status: EventStatus, $first: Int, $after: String) {
1925
1976
  listEventLogs(
1926
1977
  dashboardId: $dashboardId
@@ -1943,7 +1994,7 @@ var Lt = e`
1943
1994
  }
1944
1995
  }
1945
1996
  ${T}
1946
- ${D}`, Rt = e`
1997
+ ${D}`, Ut = e`
1947
1998
  query ListEventWebhookMappings($dashboardId: ID, $widgetId: ID, $isActive: Boolean) {
1948
1999
  listEventWebhookMappings(
1949
2000
  dashboardId: $dashboardId
@@ -1971,13 +2022,13 @@ e`
1971
2022
  }
1972
2023
  ${F}
1973
2024
  ${D}`;
1974
- var zt = e`
2025
+ var Wt = e`
1975
2026
  query ListWidgetsByDashboard($dashboardId: ID!, $type: WidgetType) {
1976
2027
  listWidgetsByDashboard(dashboardId: $dashboardId, type: $type) {
1977
2028
  ...WidgetListFields
1978
2029
  }
1979
2030
  }
1980
- ${P}`, Bt = e`
2031
+ ${P}`, Gt = e`
1981
2032
  query ListWidgetsForPage($pageId: ID!, $type: WidgetType) {
1982
2033
  listWidgets(pageId: $pageId, type: $type, first: 100) {
1983
2034
  edges {
@@ -1988,29 +2039,29 @@ var zt = e`
1988
2039
  totalCount
1989
2040
  }
1990
2041
  }
1991
- ${P}`, Vt = e`
2042
+ ${P}`, Kt = e`
1992
2043
  mutation CreateWorkflow($input: CreateWorkflowInput!) {
1993
2044
  createWorkflow(input: $input) {
1994
2045
  ...WorkflowFullFields
1995
2046
  }
1996
2047
  }
1997
- ${z}`, Ht = e`
2048
+ ${z}`, qt = e`
1998
2049
  mutation DeleteWorkflow($id: ID!) {
1999
2050
  deleteWorkflow(id: $id)
2000
2051
  }
2001
- `, Ut = e`
2052
+ `, Jt = e`
2002
2053
  mutation ExecuteWorkflow($id: ID!, $triggerData: JSON) {
2003
2054
  executeWorkflow(id: $id, triggerData: $triggerData) {
2004
2055
  ...WorkflowFullFields
2005
2056
  }
2006
2057
  }
2007
- ${z}`, Wt = e`
2058
+ ${z}`, Yt = e`
2008
2059
  mutation LinkDataSinkToWorkflow($workflowId: ID!, $input: LinkDataSinkInput!) {
2009
2060
  linkDataSinkToWorkflow(workflowId: $workflowId, input: $input) {
2010
2061
  ...DataSinkWorkflowLinkFields
2011
2062
  }
2012
2063
  }
2013
- ${R}`, Gt = e`
2064
+ ${R}`, Xt = e`
2014
2065
  mutation UnlinkDataSinkFromWorkflow($workflowId: ID!, $dataSinkId: ID!) {
2015
2066
  unlinkDataSinkFromWorkflow(workflowId: $workflowId, dataSinkId: $dataSinkId)
2016
2067
  }
@@ -2022,25 +2073,25 @@ e`
2022
2073
  }
2023
2074
  }
2024
2075
  ${R}`;
2025
- var Kt = e`
2076
+ var Zt = e`
2026
2077
  mutation UpdateWorkflow($id: ID!, $input: UpdateWorkflowInput!, $version: Int!) {
2027
2078
  updateWorkflow(id: $id, input: $input, version: $version) {
2028
2079
  ...WorkflowFullFields
2029
2080
  }
2030
2081
  }
2031
- ${z}`, qt = e`
2082
+ ${z}`, Qt = e`
2032
2083
  query GetWorkflow($id: ID!) {
2033
2084
  workflow(id: $id) {
2034
2085
  ...WorkflowFullFields
2035
2086
  }
2036
2087
  }
2037
- ${z}`, Jt = e`
2088
+ ${z}`, $t = e`
2038
2089
  query GetWorkflowByKey($key: String!) {
2039
2090
  workflowByKey(key: $key) {
2040
2091
  ...WorkflowFullFields
2041
2092
  }
2042
2093
  }
2043
- ${z}`, Yt = e`
2094
+ ${z}`, en = e`
2044
2095
  query ListWorkflows($filter: FluidGridsWorkflowFilterInput) {
2045
2096
  workflows(filter: $filter) {
2046
2097
  ...WorkflowListItem
@@ -2048,6 +2099,6 @@ var Kt = e`
2048
2099
  }
2049
2100
  ${B}`;
2050
2101
  //#endregion
2051
- export { X as ArchiveTemplateDocument, Ve as BatchCreateDataSinksDocument, He as BatchDeleteDataSinksDocument, ht as BatchUpdateWidgetPositionsDocument, Z as CloneDashboardDocument, Q as CreateDashboardDocument, ne as CreateDashboardPageDocument, re as CreateDashboardViewDocument, Ue as CreateDataSinkDocument, gt as CreateEventWebhookMappingDocument, ie as CreateGlobalFilterDocument, $e as CreateParserDocument, ot as CreatePipelineDocument, ae as CreateTemplateDocument, vt as CreateWidgetActionDocument, _t as CreateWidgetDocument, yt as CreateWidgetDrilldownDocument, Vt as CreateWorkflowDocument, Ze as DataSinkDataUpdatedDocument, Qe as DataSinkUpdatedDocument, oe as DeleteDashboardDocument, se as DeleteDashboardPageDocument, ce as DeleteDashboardViewDocument, We as DeleteDataSinkDocument, bt as DeleteEventWebhookMappingDocument, le as DeleteGlobalFilterDocument, et as DeleteParserDocument, st as DeletePipelineDocument, ue as DeleteTemplateDocument, St as DeleteWidgetActionDocument, xt as DeleteWidgetDocument, Ct as DeleteWidgetDrilldownDocument, Ht as DeleteWorkflowDocument, de as DeprecateTemplateDocument, wt as DuplicateWidgetDocument, Tt as EmitWidgetEventDocument, tt as ExecuteParserDocument, ct as ExecutePipelineDocument, Ut as ExecuteWorkflowDocument, Oe as ExportDashboardDocument, ke as GetDashboardDocument, Ae as GetDashboardViewDocument, Ye as GetDataSinkDataDocument, Je as GetDataSinkDocument, je as GetDefaultDashboardViewDocument, rt as GetParserDocument, dt as GetPipelineDocument, ft as GetPipelineExecutionDocument, Me as GetTemplateDocument, Ft as GetWidgetActionsDocument, Pt as GetWidgetDocument, It as GetWidgetTypesDocument, Jt as GetWorkflowByKeyDocument, qt as GetWorkflowDocument, fe as ImportDashboardDocument, pe as InstantiateTemplateDocument, Ge as InvalidateDataSinkCacheDocument, Wt as LinkDataSinkToWorkflowDocument, Ne as ListDashboardSharesDocument, Pe as ListDashboardViewsDocument, Fe as ListDashboardsDocument, Xe as ListDataSinksDocument, Lt as ListEventLogsDocument, Rt as ListEventWebhookMappingsDocument, Ie as ListFeaturedTemplatesDocument, it as ListParsersDocument, pt as ListPipelineExecutionsDocument, mt as ListPipelinesDocument, Le as ListSharedWithMeDocument, Re as ListTemplatesDocument, zt as ListWidgetsByDashboardDocument, Bt as ListWidgetsForPageDocument, Yt as ListWorkflowsDocument, me as PublishTemplateDocument, he as RateTemplateDocument, Ke as RefreshDataSinkDocument, Et as RefreshWidgetDataDocument, ge as ReorderDashboardPagesDocument, _e as ReorderGlobalFiltersDocument, Dt as ReorderWidgetActionsDocument, Ot as RetryEventDeliveryDocument, ve as RevokeAllSharesDocument, ye as RevokeDashboardShareDocument, ze as SearchTemplatesDocument, be as SetDefaultViewDocument, xe as ShareDashboardDocument, at as TestParserExpressionDocument, lt as TestPipelineDocument, kt as TestWebhookMappingDocument, At as ToggleEventWebhookMappingDocument, Gt as UnlinkDataSinkFromWorkflowDocument, Se as UpdateDashboardDocument, Ce as UpdateDashboardPageDocument, we as UpdateDashboardShareDocument, Te as UpdateDashboardViewDocument, qe as UpdateDataSinkDocument, jt as UpdateEventWebhookMappingDocument, Ee as UpdateGlobalFilterDocument, nt as UpdateParserDocument, ut as UpdatePipelineDocument, De as UpdateTemplateDocument, Nt as UpdateWidgetActionDocument, Mt as UpdateWidgetDocument, $ as UpdateWidgetDrilldownDocument, Kt as UpdateWorkflowDocument, Be as ValidateDashboardImportDocument, V as WorkspaceInstalledAppsDocument, U as useCreateEntityCommentMutation, G as useDeleteEntityCommentMutation, Y as useGetEntityCommentsQuery, q as useResolveEntityCommentMutation };
2102
+ export { X as ArchiveTemplateDocument, Ve as BatchCreateDataSinksDocument, He as BatchDeleteDataSinksDocument, bt as BatchUpdateWidgetPositionsDocument, Z as CloneDashboardDocument, Q as CreateDashboardDocument, ne as CreateDashboardPageDocument, re as CreateDashboardViewDocument, Ue as CreateDataSinkDocument, xt as CreateEventWebhookMappingDocument, ie as CreateGlobalFilterDocument, $e as CreateParserDocument, ot as CreatePipelineDocument, ht as CreateSandboxDocument, ae as CreateTemplateDocument, Ct as CreateWidgetActionDocument, St as CreateWidgetDocument, wt as CreateWidgetDrilldownDocument, Kt as CreateWorkflowDocument, Ze as DataSinkDataUpdatedDocument, Qe as DataSinkUpdatedDocument, oe as DeleteDashboardDocument, se as DeleteDashboardPageDocument, ce as DeleteDashboardViewDocument, We as DeleteDataSinkDocument, Tt as DeleteEventWebhookMappingDocument, le as DeleteGlobalFilterDocument, et as DeleteParserDocument, st as DeletePipelineDocument, ue as DeleteTemplateDocument, Dt as DeleteWidgetActionDocument, Et as DeleteWidgetDocument, Ot as DeleteWidgetDrilldownDocument, qt as DeleteWorkflowDocument, de as DeprecateTemplateDocument, kt as DuplicateWidgetDocument, At as EmitWidgetEventDocument, tt as ExecuteParserDocument, ct as ExecutePipelineDocument, Jt as ExecuteWorkflowDocument, Oe as ExportDashboardDocument, _t as ExtendSandboxTtlDocument, yt as GetActiveSandboxesDocument, ke as GetDashboardDocument, Ae as GetDashboardViewDocument, Ye as GetDataSinkDataDocument, Je as GetDataSinkDocument, je as GetDefaultDashboardViewDocument, rt as GetParserDocument, dt as GetPipelineDocument, ft as GetPipelineExecutionDocument, vt as GetSandboxDocument, Me as GetTemplateDocument, $ as GetWidgetActionsDocument, Bt as GetWidgetDocument, Vt as GetWidgetTypesDocument, $t as GetWorkflowByKeyDocument, Qt as GetWorkflowDocument, fe as ImportDashboardDocument, pe as InstantiateTemplateDocument, Ge as InvalidateDataSinkCacheDocument, Yt as LinkDataSinkToWorkflowDocument, Ne as ListDashboardSharesDocument, Pe as ListDashboardViewsDocument, Fe as ListDashboardsDocument, Xe as ListDataSinksDocument, Ht as ListEventLogsDocument, Ut as ListEventWebhookMappingsDocument, Ie as ListFeaturedTemplatesDocument, it as ListParsersDocument, pt as ListPipelineExecutionsDocument, mt as ListPipelinesDocument, Le as ListSharedWithMeDocument, Re as ListTemplatesDocument, Wt as ListWidgetsByDashboardDocument, Gt as ListWidgetsForPageDocument, en as ListWorkflowsDocument, gt as ProxySandboxRequestDocument, me as PublishTemplateDocument, he as RateTemplateDocument, Ke as RefreshDataSinkDocument, jt as RefreshWidgetDataDocument, ge as ReorderDashboardPagesDocument, _e as ReorderGlobalFiltersDocument, Mt as ReorderWidgetActionsDocument, Nt as RetryEventDeliveryDocument, ve as RevokeAllSharesDocument, ye as RevokeDashboardShareDocument, ze as SearchTemplatesDocument, be as SetDefaultViewDocument, xe as ShareDashboardDocument, at as TestParserExpressionDocument, lt as TestPipelineDocument, Pt as TestWebhookMappingDocument, Ft as ToggleEventWebhookMappingDocument, Xt as UnlinkDataSinkFromWorkflowDocument, Se as UpdateDashboardDocument, Ce as UpdateDashboardPageDocument, we as UpdateDashboardShareDocument, Te as UpdateDashboardViewDocument, qe as UpdateDataSinkDocument, It as UpdateEventWebhookMappingDocument, Ee as UpdateGlobalFilterDocument, nt as UpdateParserDocument, ut as UpdatePipelineDocument, De as UpdateTemplateDocument, Rt as UpdateWidgetActionDocument, Lt as UpdateWidgetDocument, zt as UpdateWidgetDrilldownDocument, Zt as UpdateWorkflowDocument, Be as ValidateDashboardImportDocument, V as WorkspaceInstalledAppsDocument, U as useCreateEntityCommentMutation, G as useDeleteEntityCommentMutation, Y as useGetEntityCommentsQuery, q as useResolveEntityCommentMutation };
2052
2103
 
2053
2104
  //# sourceMappingURL=wspace-operations.js.map