@flanksource/clicky-ui 0.2.21 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/comments/CommentAuthor.cjs +58 -0
- package/dist/comments/CommentAuthor.cjs.map +1 -0
- package/dist/comments/CommentAuthor.d.ts +17 -0
- package/dist/comments/CommentAuthor.d.ts.map +1 -0
- package/dist/comments/CommentAuthor.js +58 -0
- package/dist/comments/CommentAuthor.js.map +1 -0
- package/dist/comments/CommentCard.cjs +343 -0
- package/dist/comments/CommentCard.cjs.map +1 -0
- package/dist/comments/CommentCard.d.ts +27 -0
- package/dist/comments/CommentCard.d.ts.map +1 -0
- package/dist/comments/CommentCard.js +343 -0
- package/dist/comments/CommentCard.js.map +1 -0
- package/dist/comments/CommentComposer.cjs +207 -0
- package/dist/comments/CommentComposer.cjs.map +1 -0
- package/dist/comments/CommentComposer.d.ts +23 -0
- package/dist/comments/CommentComposer.d.ts.map +1 -0
- package/dist/comments/CommentComposer.js +207 -0
- package/dist/comments/CommentComposer.js.map +1 -0
- package/dist/comments/CommentFilterBar.cjs +145 -0
- package/dist/comments/CommentFilterBar.cjs.map +1 -0
- package/dist/comments/CommentFilterBar.d.ts +15 -0
- package/dist/comments/CommentFilterBar.d.ts.map +1 -0
- package/dist/comments/CommentFilterBar.js +145 -0
- package/dist/comments/CommentFilterBar.js.map +1 -0
- package/dist/comments/CommentMarkdown.cjs +156 -0
- package/dist/comments/CommentMarkdown.cjs.map +1 -0
- package/dist/comments/CommentMarkdown.d.ts +13 -0
- package/dist/comments/CommentMarkdown.d.ts.map +1 -0
- package/dist/comments/CommentMarkdown.js +156 -0
- package/dist/comments/CommentMarkdown.js.map +1 -0
- package/dist/comments/CommentProgress.cjs +86 -0
- package/dist/comments/CommentProgress.cjs.map +1 -0
- package/dist/comments/CommentProgress.d.ts +16 -0
- package/dist/comments/CommentProgress.d.ts.map +1 -0
- package/dist/comments/CommentProgress.js +86 -0
- package/dist/comments/CommentProgress.js.map +1 -0
- package/dist/comments/CommentProvider.cjs +99 -0
- package/dist/comments/CommentProvider.cjs.map +1 -0
- package/dist/comments/CommentProvider.d.ts +19 -0
- package/dist/comments/CommentProvider.d.ts.map +1 -0
- package/dist/comments/CommentProvider.js +99 -0
- package/dist/comments/CommentProvider.js.map +1 -0
- package/dist/comments/CommentSidePanel.cjs +219 -0
- package/dist/comments/CommentSidePanel.cjs.map +1 -0
- package/dist/comments/CommentSidePanel.d.ts +16 -0
- package/dist/comments/CommentSidePanel.d.ts.map +1 -0
- package/dist/comments/CommentSidePanel.js +219 -0
- package/dist/comments/CommentSidePanel.js.map +1 -0
- package/dist/comments/CommentThread.cjs +57 -0
- package/dist/comments/CommentThread.cjs.map +1 -0
- package/dist/comments/CommentThread.d.ts +24 -0
- package/dist/comments/CommentThread.d.ts.map +1 -0
- package/dist/comments/CommentThread.js +57 -0
- package/dist/comments/CommentThread.js.map +1 -0
- package/dist/comments/CommentThreadList.cjs +124 -0
- package/dist/comments/CommentThreadList.cjs.map +1 -0
- package/dist/comments/CommentThreadList.d.ts +25 -0
- package/dist/comments/CommentThreadList.d.ts.map +1 -0
- package/dist/comments/CommentThreadList.js +124 -0
- package/dist/comments/CommentThreadList.js.map +1 -0
- package/dist/comments/GroupedComments.cjs +74 -0
- package/dist/comments/GroupedComments.cjs.map +1 -0
- package/dist/comments/GroupedComments.d.ts +18 -0
- package/dist/comments/GroupedComments.d.ts.map +1 -0
- package/dist/comments/GroupedComments.js +74 -0
- package/dist/comments/GroupedComments.js.map +1 -0
- package/dist/comments/MentionTextarea.cjs +253 -0
- package/dist/comments/MentionTextarea.cjs.map +1 -0
- package/dist/comments/MentionTextarea.d.ts +28 -0
- package/dist/comments/MentionTextarea.d.ts.map +1 -0
- package/dist/comments/MentionTextarea.js +253 -0
- package/dist/comments/MentionTextarea.js.map +1 -0
- package/dist/comments/comment-context.cjs +33 -0
- package/dist/comments/comment-context.cjs.map +1 -0
- package/dist/comments/comment-context.d.ts +32 -0
- package/dist/comments/comment-context.d.ts.map +1 -0
- package/dist/comments/comment-context.js +33 -0
- package/dist/comments/comment-context.js.map +1 -0
- package/dist/comments/comment-fixtures.d.ts +11 -0
- package/dist/comments/comment-fixtures.d.ts.map +1 -0
- package/dist/comments/comment-types.cjs +19 -0
- package/dist/comments/comment-types.cjs.map +1 -0
- package/dist/comments/comment-types.d.ts +170 -0
- package/dist/comments/comment-types.d.ts.map +1 -0
- package/dist/comments/comment-types.js +19 -0
- package/dist/comments/comment-types.js.map +1 -0
- package/dist/comments/comment-utils.cjs +216 -0
- package/dist/comments/comment-utils.cjs.map +1 -0
- package/dist/comments/comment-utils.d.ts +59 -0
- package/dist/comments/comment-utils.d.ts.map +1 -0
- package/dist/comments/comment-utils.js +216 -0
- package/dist/comments/comment-utils.js.map +1 -0
- package/dist/comments.cjs +57 -0
- package/dist/comments.cjs.map +1 -0
- package/dist/comments.d.ts +16 -0
- package/dist/comments.d.ts.map +1 -0
- package/dist/comments.js +57 -0
- package/dist/comments.js.map +1 -0
- package/dist/components/Combobox.cjs +5 -2
- package/dist/components/Combobox.cjs.map +1 -1
- package/dist/components/Combobox.d.ts.map +1 -1
- package/dist/components/Combobox.js +5 -2
- package/dist/components/Combobox.js.map +1 -1
- package/dist/components/FilterBar.cjs +293 -256
- package/dist/components/FilterBar.cjs.map +1 -1
- package/dist/components/FilterBar.d.ts.map +1 -1
- package/dist/components/FilterBar.js +293 -256
- package/dist/components/FilterBar.js.map +1 -1
- package/dist/components/JsonSchemaForm.cjs +22 -6
- package/dist/components/JsonSchemaForm.cjs.map +1 -1
- package/dist/components/JsonSchemaForm.d.ts +1 -1
- package/dist/components/JsonSchemaForm.d.ts.map +1 -1
- package/dist/components/JsonSchemaForm.js +25 -9
- package/dist/components/JsonSchemaForm.js.map +1 -1
- package/dist/components/MultiSelect.cjs +29 -32
- package/dist/components/MultiSelect.cjs.map +1 -1
- package/dist/components/MultiSelect.d.ts.map +1 -1
- package/dist/components/MultiSelect.js +30 -33
- package/dist/components/MultiSelect.js.map +1 -1
- package/dist/components/NamespacePicker.cjs +52 -0
- package/dist/components/NamespacePicker.cjs.map +1 -0
- package/dist/components/NamespacePicker.d.ts +17 -0
- package/dist/components/NamespacePicker.d.ts.map +1 -0
- package/dist/components/NamespacePicker.js +52 -0
- package/dist/components/NamespacePicker.js.map +1 -0
- package/dist/components/TimeRange.cjs +29 -37
- package/dist/components/TimeRange.cjs.map +1 -1
- package/dist/components/TimeRange.d.ts.map +1 -1
- package/dist/components/TimeRange.js +30 -38
- package/dist/components/TimeRange.js.map +1 -1
- package/dist/components/TreePickerField.cjs +6 -3
- package/dist/components/TreePickerField.cjs.map +1 -1
- package/dist/components/TreePickerField.d.ts.map +1 -1
- package/dist/components/TreePickerField.js +6 -3
- package/dist/components/TreePickerField.js.map +1 -1
- package/dist/components/form-lookup-context.cjs +36 -0
- package/dist/components/form-lookup-context.cjs.map +1 -0
- package/dist/components/form-lookup-context.d.ts +9 -0
- package/dist/components/form-lookup-context.d.ts.map +1 -0
- package/dist/components/form-lookup-context.js +36 -0
- package/dist/components/form-lookup-context.js.map +1 -0
- package/dist/components/icon-menu-picker.cjs +9 -3
- package/dist/components/icon-menu-picker.cjs.map +1 -1
- package/dist/components/icon-menu-picker.d.ts.map +1 -1
- package/dist/components/icon-menu-picker.js +9 -3
- package/dist/components/icon-menu-picker.js.map +1 -1
- package/dist/components/json-schema-form-discriminator.cjs +67 -0
- package/dist/components/json-schema-form-discriminator.cjs.map +1 -0
- package/dist/components/json-schema-form-discriminator.d.ts +10 -0
- package/dist/components/json-schema-form-discriminator.d.ts.map +1 -0
- package/dist/components/json-schema-form-discriminator.js +67 -0
- package/dist/components/json-schema-form-discriminator.js.map +1 -0
- package/dist/components/json-schema-form-fields.cjs +146 -3
- package/dist/components/json-schema-form-fields.cjs.map +1 -1
- package/dist/components/json-schema-form-fields.d.ts +22 -0
- package/dist/components/json-schema-form-fields.d.ts.map +1 -1
- package/dist/components/json-schema-form-fields.js +147 -4
- package/dist/components/json-schema-form-fields.js.map +1 -1
- package/dist/components/json-schema-form-grid.cjs +92 -0
- package/dist/components/json-schema-form-grid.cjs.map +1 -0
- package/dist/components/json-schema-form-grid.d.ts +9 -0
- package/dist/components/json-schema-form-grid.d.ts.map +1 -0
- package/dist/components/json-schema-form-grid.js +92 -0
- package/dist/components/json-schema-form-grid.js.map +1 -0
- package/dist/components/json-schema-form-refs.cjs +60 -0
- package/dist/components/json-schema-form-refs.cjs.map +1 -0
- package/dist/components/json-schema-form-refs.d.ts +3 -0
- package/dist/components/json-schema-form-refs.d.ts.map +1 -0
- package/dist/components/json-schema-form-refs.js +60 -0
- package/dist/components/json-schema-form-refs.js.map +1 -0
- package/dist/components/json-schema-form-render.cjs +34 -5
- package/dist/components/json-schema-form-render.cjs.map +1 -1
- package/dist/components/json-schema-form-render.d.ts.map +1 -1
- package/dist/components/json-schema-form-render.js +36 -7
- package/dist/components/json-schema-form-render.js.map +1 -1
- package/dist/components/json-schema-form-resolve.cjs +29 -2
- package/dist/components/json-schema-form-resolve.cjs.map +1 -1
- package/dist/components/json-schema-form-resolve.d.ts.map +1 -1
- package/dist/components/json-schema-form-resolve.js +29 -2
- package/dist/components/json-schema-form-resolve.js.map +1 -1
- package/dist/components/json-schema-form-template-menu.cjs +83 -0
- package/dist/components/json-schema-form-template-menu.cjs.map +1 -0
- package/dist/components/json-schema-form-template-menu.d.ts +15 -0
- package/dist/components/json-schema-form-template-menu.d.ts.map +1 -0
- package/dist/components/json-schema-form-template-menu.js +83 -0
- package/dist/components/json-schema-form-template-menu.js.map +1 -0
- package/dist/components/json-schema-form-template.cjs +18 -0
- package/dist/components/json-schema-form-template.cjs.map +1 -0
- package/dist/components/json-schema-form-template.d.ts +13 -0
- package/dist/components/json-schema-form-template.d.ts.map +1 -0
- package/dist/components/json-schema-form-template.js +18 -0
- package/dist/components/json-schema-form-template.js.map +1 -0
- package/dist/components/json-schema-form-types.d.ts +41 -2
- package/dist/components/json-schema-form-types.d.ts.map +1 -1
- package/dist/components/json-schema-form-utils.cjs +8 -0
- package/dist/components/json-schema-form-utils.cjs.map +1 -1
- package/dist/components/json-schema-form-utils.d.ts +1 -0
- package/dist/components/json-schema-form-utils.d.ts.map +1 -1
- package/dist/components/json-schema-form-utils.js +8 -0
- package/dist/components/json-schema-form-utils.js.map +1 -1
- package/dist/components/workload-picker-utils.cjs.map +1 -1
- package/dist/components/workload-picker-utils.d.ts +11 -1
- package/dist/components/workload-picker-utils.d.ts.map +1 -1
- package/dist/components/workload-picker-utils.js.map +1 -1
- package/dist/components.cjs +10 -0
- package/dist/components.cjs.map +1 -1
- package/dist/components.d.ts +7 -2
- package/dist/components.d.ts.map +1 -1
- package/dist/components.js +10 -0
- package/dist/components.js.map +1 -1
- package/dist/data/Clicky.cjs +231 -69
- package/dist/data/Clicky.cjs.map +1 -1
- package/dist/data/Clicky.d.ts +7 -1
- package/dist/data/Clicky.d.ts.map +1 -1
- package/dist/data/Clicky.fixtures.d.ts +3 -1
- package/dist/data/Clicky.fixtures.d.ts.map +1 -1
- package/dist/data/Clicky.js +232 -70
- package/dist/data/Clicky.js.map +1 -1
- package/dist/data/DataTable.cjs +23 -17
- package/dist/data/DataTable.cjs.map +1 -1
- package/dist/data/DataTable.d.ts +7 -1
- package/dist/data/DataTable.d.ts.map +1 -1
- package/dist/data/DataTable.js +24 -18
- package/dist/data/DataTable.js.map +1 -1
- package/dist/data/ExecutionTree.cjs +68 -0
- package/dist/data/ExecutionTree.cjs.map +1 -0
- package/dist/data/ExecutionTree.d.ts +40 -0
- package/dist/data/ExecutionTree.d.ts.map +1 -0
- package/dist/data/ExecutionTree.js +68 -0
- package/dist/data/ExecutionTree.js.map +1 -0
- package/dist/data/Gauge.cjs +37 -4
- package/dist/data/Gauge.cjs.map +1 -1
- package/dist/data/Gauge.d.ts +6 -1
- package/dist/data/Gauge.d.ts.map +1 -1
- package/dist/data/Gauge.js +37 -4
- package/dist/data/Gauge.js.map +1 -1
- package/dist/data/GaugeHoverCard.cjs +35 -0
- package/dist/data/GaugeHoverCard.cjs.map +1 -0
- package/dist/data/GaugeHoverCard.d.ts +25 -0
- package/dist/data/GaugeHoverCard.d.ts.map +1 -0
- package/dist/data/GaugeHoverCard.js +35 -0
- package/dist/data/GaugeHoverCard.js.map +1 -0
- package/dist/data/MarkdownEditor.cjs +616 -0
- package/dist/data/MarkdownEditor.cjs.map +1 -0
- package/dist/data/MarkdownEditor.d.ts +61 -0
- package/dist/data/MarkdownEditor.d.ts.map +1 -0
- package/dist/data/MarkdownEditor.js +616 -0
- package/dist/data/MarkdownEditor.js.map +1 -0
- package/dist/data/MarkdownEditor.model.cjs +27 -0
- package/dist/data/MarkdownEditor.model.cjs.map +1 -0
- package/dist/data/MarkdownEditor.model.d.ts +38 -0
- package/dist/data/MarkdownEditor.model.d.ts.map +1 -0
- package/dist/data/MarkdownEditor.model.js +27 -0
- package/dist/data/MarkdownEditor.model.js.map +1 -0
- package/dist/data/ObjectGraph.cjs +44 -0
- package/dist/data/ObjectGraph.cjs.map +1 -0
- package/dist/data/ObjectGraph.d.ts +39 -0
- package/dist/data/ObjectGraph.d.ts.map +1 -0
- package/dist/data/ObjectGraph.js +44 -0
- package/dist/data/ObjectGraph.js.map +1 -0
- package/dist/data/SchemaViewer.cjs +152 -0
- package/dist/data/SchemaViewer.cjs.map +1 -0
- package/dist/data/SchemaViewer.d.ts +27 -0
- package/dist/data/SchemaViewer.d.ts.map +1 -0
- package/dist/data/SchemaViewer.js +152 -0
- package/dist/data/SchemaViewer.js.map +1 -0
- package/dist/data/TimeseriesCoreBars.cjs +169 -32
- package/dist/data/TimeseriesCoreBars.cjs.map +1 -1
- package/dist/data/TimeseriesCoreBars.d.ts +42 -5
- package/dist/data/TimeseriesCoreBars.d.ts.map +1 -1
- package/dist/data/TimeseriesCoreBars.js +170 -33
- package/dist/data/TimeseriesCoreBars.js.map +1 -1
- package/dist/data/TimeseriesCoreBars.model.cjs +5 -5
- package/dist/data/TimeseriesCoreBars.model.cjs.map +1 -1
- package/dist/data/TimeseriesCoreBars.model.d.ts +4 -4
- package/dist/data/TimeseriesCoreBars.model.d.ts.map +1 -1
- package/dist/data/TimeseriesCoreBars.model.js +5 -5
- package/dist/data/TimeseriesCoreBars.model.js.map +1 -1
- package/dist/data/TimeseriesGauge.cjs +132 -36
- package/dist/data/TimeseriesGauge.cjs.map +1 -1
- package/dist/data/TimeseriesGauge.d.ts +15 -1
- package/dist/data/TimeseriesGauge.d.ts.map +1 -1
- package/dist/data/TimeseriesGauge.js +133 -37
- package/dist/data/TimeseriesGauge.js.map +1 -1
- package/dist/data/WorkloadCard.cjs +371 -0
- package/dist/data/WorkloadCard.cjs.map +1 -0
- package/dist/data/WorkloadCard.d.ts +25 -0
- package/dist/data/WorkloadCard.d.ts.map +1 -0
- package/dist/data/WorkloadCard.js +371 -0
- package/dist/data/WorkloadCard.js.map +1 -0
- package/dist/data/WorkloadCard.model.cjs +51 -0
- package/dist/data/WorkloadCard.model.cjs.map +1 -0
- package/dist/data/WorkloadCard.model.d.ts +53 -0
- package/dist/data/WorkloadCard.model.d.ts.map +1 -0
- package/dist/data/WorkloadCard.model.js +51 -0
- package/dist/data/WorkloadCard.model.js.map +1 -0
- package/dist/data/ai/ChatFab.cjs +3 -1
- package/dist/data/ai/ChatFab.cjs.map +1 -1
- package/dist/data/ai/ChatFab.d.ts.map +1 -1
- package/dist/data/ai/ChatFab.js +3 -1
- package/dist/data/ai/ChatFab.js.map +1 -1
- package/dist/data/ai/ChatWindow.cjs +19 -9
- package/dist/data/ai/ChatWindow.cjs.map +1 -1
- package/dist/data/ai/ChatWindow.d.ts +4 -2
- package/dist/data/ai/ChatWindow.d.ts.map +1 -1
- package/dist/data/ai/ChatWindow.js +19 -9
- package/dist/data/ai/ChatWindow.js.map +1 -1
- package/dist/data/ai/ChatWindowRequestBody.cjs +20 -0
- package/dist/data/ai/ChatWindowRequestBody.cjs.map +1 -0
- package/dist/data/ai/ChatWindowRequestBody.d.ts +9 -0
- package/dist/data/ai/ChatWindowRequestBody.d.ts.map +1 -0
- package/dist/data/ai/ChatWindowRequestBody.js +20 -0
- package/dist/data/ai/ChatWindowRequestBody.js.map +1 -0
- package/dist/data/ai/chat-window-context.cjs +2 -1
- package/dist/data/ai/chat-window-context.cjs.map +1 -1
- package/dist/data/ai/chat-window-context.d.ts +1 -1
- package/dist/data/ai/chat-window-context.d.ts.map +1 -1
- package/dist/data/ai/chat-window-context.js +2 -1
- package/dist/data/ai/chat-window-context.js.map +1 -1
- package/dist/data/ai/context.cjs.map +1 -1
- package/dist/data/ai/context.d.ts +3 -0
- package/dist/data/ai/context.d.ts.map +1 -1
- package/dist/data/ai/context.js.map +1 -1
- package/dist/data/chat/Chat.cjs +21 -1
- package/dist/data/chat/Chat.cjs.map +1 -1
- package/dist/data/chat/Chat.d.ts +11 -2
- package/dist/data/chat/Chat.d.ts.map +1 -1
- package/dist/data/chat/Chat.js +22 -2
- package/dist/data/chat/Chat.js.map +1 -1
- package/dist/data/chat/Message.cjs +13 -4
- package/dist/data/chat/Message.cjs.map +1 -1
- package/dist/data/chat/Message.d.ts +4 -2
- package/dist/data/chat/Message.d.ts.map +1 -1
- package/dist/data/chat/Message.js +13 -4
- package/dist/data/chat/Message.js.map +1 -1
- package/dist/data/chat/ToolCall.cjs +9 -4
- package/dist/data/chat/ToolCall.cjs.map +1 -1
- package/dist/data/chat/ToolCall.d.ts +3 -2
- package/dist/data/chat/ToolCall.d.ts.map +1 -1
- package/dist/data/chat/ToolCall.js +9 -4
- package/dist/data/chat/ToolCall.js.map +1 -1
- package/dist/data/chat/index.d.ts +1 -1
- package/dist/data/chat/index.d.ts.map +1 -1
- package/dist/data/chat/types.cjs.map +1 -1
- package/dist/data/chat/types.d.ts +7 -0
- package/dist/data/chat/types.d.ts.map +1 -1
- package/dist/data/chat/types.js.map +1 -1
- package/dist/data/gauge-stats.cjs +19 -0
- package/dist/data/gauge-stats.cjs.map +1 -0
- package/dist/data/gauge-stats.d.ts +15 -0
- package/dist/data/gauge-stats.d.ts.map +1 -0
- package/dist/data/gauge-stats.js +19 -0
- package/dist/data/gauge-stats.js.map +1 -0
- package/dist/data/schema-viewer-model.cjs +436 -0
- package/dist/data/schema-viewer-model.cjs.map +1 -0
- package/dist/data/schema-viewer-model.d.ts +64 -0
- package/dist/data/schema-viewer-model.d.ts.map +1 -0
- package/dist/data/schema-viewer-model.js +436 -0
- package/dist/data/schema-viewer-model.js.map +1 -0
- package/dist/data/version-info.cjs +2 -2
- package/dist/data/version-info.js +2 -2
- package/dist/data.cjs +30 -0
- package/dist/data.cjs.map +1 -1
- package/dist/data.d.ts +14 -4
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +31 -1
- package/dist/data.js.map +1 -1
- package/dist/hooks/use-sort.cjs +19 -10
- package/dist/hooks/use-sort.cjs.map +1 -1
- package/dist/hooks/use-sort.d.ts +3 -0
- package/dist/hooks/use-sort.d.ts.map +1 -1
- package/dist/hooks/use-sort.js +19 -10
- package/dist/hooks/use-sort.js.map +1 -1
- package/dist/index.cjs +98 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +98 -2
- package/dist/index.js.map +1 -1
- package/dist/layout/AppShell.cjs +6 -10
- package/dist/layout/AppShell.cjs.map +1 -1
- package/dist/layout/AppShell.d.ts +2 -0
- package/dist/layout/AppShell.d.ts.map +1 -1
- package/dist/layout/AppShell.js +6 -10
- package/dist/layout/AppShell.js.map +1 -1
- package/dist/overlay/DropdownMenu.cjs +50 -38
- package/dist/overlay/DropdownMenu.cjs.map +1 -1
- package/dist/overlay/DropdownMenu.d.ts +5 -1
- package/dist/overlay/DropdownMenu.d.ts.map +1 -1
- package/dist/overlay/DropdownMenu.js +50 -38
- package/dist/overlay/DropdownMenu.js.map +1 -1
- package/dist/overlay/HoverCard.cjs +7 -2
- package/dist/overlay/HoverCard.cjs.map +1 -1
- package/dist/overlay/HoverCard.d.ts.map +1 -1
- package/dist/overlay/HoverCard.js +7 -2
- package/dist/overlay/HoverCard.js.map +1 -1
- package/dist/overlay/Modal.cjs +20 -17
- package/dist/overlay/Modal.cjs.map +1 -1
- package/dist/overlay/Modal.d.ts.map +1 -1
- package/dist/overlay/Modal.js +21 -18
- package/dist/overlay/Modal.js.map +1 -1
- package/dist/overlay/Toast.cjs +9 -1
- package/dist/overlay/Toast.cjs.map +1 -1
- package/dist/overlay/Toast.d.ts.map +1 -1
- package/dist/overlay/Toast.js +9 -1
- package/dist/overlay/Toast.js.map +1 -1
- package/dist/overlay/modalStack.cjs +53 -1
- package/dist/overlay/modalStack.cjs.map +1 -1
- package/dist/overlay/modalStack.d.ts +12 -0
- package/dist/overlay/modalStack.d.ts.map +1 -1
- package/dist/overlay/modalStack.js +54 -2
- package/dist/overlay/modalStack.js.map +1 -1
- package/dist/overlay/zIndex.cjs +20 -0
- package/dist/overlay/zIndex.cjs.map +1 -0
- package/dist/overlay/zIndex.d.ts +39 -0
- package/dist/overlay/zIndex.d.ts.map +1 -0
- package/dist/overlay/zIndex.js +20 -0
- package/dist/overlay/zIndex.js.map +1 -0
- package/dist/rpc/EntityExplorerApp.cjs +102 -143
- package/dist/rpc/EntityExplorerApp.cjs.map +1 -1
- package/dist/rpc/EntityExplorerApp.d.ts +34 -1
- package/dist/rpc/EntityExplorerApp.d.ts.map +1 -1
- package/dist/rpc/EntityExplorerApp.js +105 -146
- package/dist/rpc/EntityExplorerApp.js.map +1 -1
- package/dist/rpc/OperationActionBar.cjs +135 -0
- package/dist/rpc/OperationActionBar.cjs.map +1 -0
- package/dist/rpc/OperationActionBar.d.ts +20 -0
- package/dist/rpc/OperationActionBar.d.ts.map +1 -0
- package/dist/rpc/OperationActionBar.js +135 -0
- package/dist/rpc/OperationActionBar.js.map +1 -0
- package/dist/rpc/OperationCatalog.cjs +79 -116
- package/dist/rpc/OperationCatalog.cjs.map +1 -1
- package/dist/rpc/OperationCatalog.d.ts +8 -1
- package/dist/rpc/OperationCatalog.d.ts.map +1 -1
- package/dist/rpc/OperationCatalog.js +80 -117
- package/dist/rpc/OperationCatalog.js.map +1 -1
- package/dist/rpc/OperationCommandPage.cjs +134 -223
- package/dist/rpc/OperationCommandPage.cjs.map +1 -1
- package/dist/rpc/OperationCommandPage.d.ts +1 -1
- package/dist/rpc/OperationCommandPage.d.ts.map +1 -1
- package/dist/rpc/OperationCommandPage.js +135 -224
- package/dist/rpc/OperationCommandPage.js.map +1 -1
- package/dist/rpc/OperationEntityPage.cjs +49 -100
- package/dist/rpc/OperationEntityPage.cjs.map +1 -1
- package/dist/rpc/OperationEntityPage.d.ts +6 -1
- package/dist/rpc/OperationEntityPage.d.ts.map +1 -1
- package/dist/rpc/OperationEntityPage.js +50 -101
- package/dist/rpc/OperationEntityPage.js.map +1 -1
- package/dist/rpc/OperationResultView.cjs +43 -0
- package/dist/rpc/OperationResultView.cjs.map +1 -0
- package/dist/rpc/OperationResultView.d.ts +30 -0
- package/dist/rpc/OperationResultView.d.ts.map +1 -0
- package/dist/rpc/OperationResultView.js +43 -0
- package/dist/rpc/OperationResultView.js.map +1 -0
- package/dist/rpc/SchemaActionForm.cjs +102 -0
- package/dist/rpc/SchemaActionForm.cjs.map +1 -0
- package/dist/rpc/SchemaActionForm.d.ts +23 -0
- package/dist/rpc/SchemaActionForm.d.ts.map +1 -0
- package/dist/rpc/SchemaActionForm.js +102 -0
- package/dist/rpc/SchemaActionForm.js.map +1 -0
- package/dist/rpc/accept-options.cjs.map +1 -1
- package/dist/rpc/accept-options.d.ts +0 -1
- package/dist/rpc/accept-options.d.ts.map +1 -1
- package/dist/rpc/accept-options.js.map +1 -1
- package/dist/rpc/apiClient.cjs +34 -2
- package/dist/rpc/apiClient.cjs.map +1 -1
- package/dist/rpc/apiClient.d.ts +4 -1
- package/dist/rpc/apiClient.d.ts.map +1 -1
- package/dist/rpc/apiClient.js +34 -2
- package/dist/rpc/apiClient.js.map +1 -1
- package/dist/rpc/clickyMetadata.cjs +4 -4
- package/dist/rpc/clickyMetadata.cjs.map +1 -1
- package/dist/rpc/clickyMetadata.d.ts +0 -1
- package/dist/rpc/clickyMetadata.d.ts.map +1 -1
- package/dist/rpc/clickyMetadata.js +4 -4
- package/dist/rpc/clickyMetadata.js.map +1 -1
- package/dist/rpc/formMetadata.cjs +1 -0
- package/dist/rpc/formMetadata.cjs.map +1 -1
- package/dist/rpc/formMetadata.d.ts +6 -1
- package/dist/rpc/formMetadata.d.ts.map +1 -1
- package/dist/rpc/formMetadata.js +1 -0
- package/dist/rpc/formMetadata.js.map +1 -1
- package/dist/rpc/rowNavigation.cjs +86 -0
- package/dist/rpc/rowNavigation.cjs.map +1 -0
- package/dist/rpc/rowNavigation.d.ts +14 -0
- package/dist/rpc/rowNavigation.d.ts.map +1 -0
- package/dist/rpc/rowNavigation.js +86 -0
- package/dist/rpc/rowNavigation.js.map +1 -0
- package/dist/rpc/schemaActionPath.cjs +22 -0
- package/dist/rpc/schemaActionPath.cjs.map +1 -0
- package/dist/rpc/schemaActionPath.d.ts +4 -0
- package/dist/rpc/schemaActionPath.d.ts.map +1 -0
- package/dist/rpc/schemaActionPath.js +22 -0
- package/dist/rpc/schemaActionPath.js.map +1 -0
- package/dist/rpc/surfaceIconMap.cjs +35 -0
- package/dist/rpc/surfaceIconMap.cjs.map +1 -0
- package/dist/rpc/surfaceIconMap.d.ts +3 -0
- package/dist/rpc/surfaceIconMap.d.ts.map +1 -0
- package/dist/rpc/surfaceIconMap.js +35 -0
- package/dist/rpc/surfaceIconMap.js.map +1 -0
- package/dist/rpc/types.cjs.map +1 -1
- package/dist/rpc/types.d.ts +2 -0
- package/dist/rpc/types.d.ts.map +1 -1
- package/dist/rpc/types.js.map +1 -1
- package/dist/rpc/useOperations.cjs.map +1 -1
- package/dist/rpc/useOperations.d.ts +4 -1
- package/dist/rpc/useOperations.d.ts.map +1 -1
- package/dist/rpc/useOperations.js.map +1 -1
- package/dist/rpc.cjs +4 -2
- package/dist/rpc.cjs.map +1 -1
- package/dist/rpc.d.ts +7 -6
- package/dist/rpc.d.ts.map +1 -1
- package/dist/rpc.js +4 -2
- package/dist/rpc.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +6 -1
- package/dist/rpc/AcceptPicker.cjs +0 -135
- package/dist/rpc/AcceptPicker.cjs.map +0 -1
- package/dist/rpc/AcceptPicker.d.ts +0 -12
- package/dist/rpc/AcceptPicker.d.ts.map +0 -1
- package/dist/rpc/AcceptPicker.js +0 -135
- package/dist/rpc/AcceptPicker.js.map +0 -1
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { useCallback } from "react";
|
|
2
|
+
import { getOperationClickyMeta } from "./clickyMetadata.js";
|
|
3
|
+
import { pathParamNames } from "./command-form-utils.js";
|
|
4
|
+
import { useRouter } from "./router.js";
|
|
5
|
+
function clickyNodeText(node) {
|
|
6
|
+
if (!node) return "";
|
|
7
|
+
if (node.plain) return node.plain;
|
|
8
|
+
if (node.text) return node.text;
|
|
9
|
+
if (node.source) return node.source;
|
|
10
|
+
if (node.children) return node.children.map(clickyNodeText).join("");
|
|
11
|
+
if (node.items) return node.items.map(clickyNodeText).join(" ");
|
|
12
|
+
if (node.fields)
|
|
13
|
+
return node.fields.map((field) => clickyNodeText(field.value)).join(" ");
|
|
14
|
+
return "";
|
|
15
|
+
}
|
|
16
|
+
function getClickyRowId(row) {
|
|
17
|
+
const candidates = ["_id", "id", "ID", "guid", "GUID"];
|
|
18
|
+
for (const key of candidates) {
|
|
19
|
+
const value = clickyNodeText(row.cells[key]);
|
|
20
|
+
if (value) return value;
|
|
21
|
+
}
|
|
22
|
+
return void 0;
|
|
23
|
+
}
|
|
24
|
+
function apiPathToRoutePath(path) {
|
|
25
|
+
const segments = path.trim().replace(/^\/api\/v1/, "").split("/").filter(Boolean);
|
|
26
|
+
if (segments.length === 0) return "/";
|
|
27
|
+
return `/${segments.join("/").replace(/\{([^{}]+)\}/g, ":$1")}`;
|
|
28
|
+
}
|
|
29
|
+
function hrefForOperation(operation, args = [], flags = {}) {
|
|
30
|
+
let route = apiPathToRoutePath(operation.path);
|
|
31
|
+
const consumedFlags = /* @__PURE__ */ new Set();
|
|
32
|
+
pathParamNames(operation.path).forEach((name, index) => {
|
|
33
|
+
const value = flags[name] ?? args[index];
|
|
34
|
+
if (!value) return;
|
|
35
|
+
consumedFlags.add(name);
|
|
36
|
+
route = route.replace(`:${name}`, encodeURIComponent(value));
|
|
37
|
+
});
|
|
38
|
+
if (route.includes(":")) return void 0;
|
|
39
|
+
const search = new URLSearchParams();
|
|
40
|
+
for (const [key, value] of Object.entries(flags)) {
|
|
41
|
+
if (value && !consumedFlags.has(key)) search.set(key, value);
|
|
42
|
+
}
|
|
43
|
+
const query = search.toString();
|
|
44
|
+
return query ? `${route}?${query}` : route;
|
|
45
|
+
}
|
|
46
|
+
function hrefForDetail(detailOperation, id) {
|
|
47
|
+
var _a;
|
|
48
|
+
const surface = (_a = getOperationClickyMeta(detailOperation)) == null ? void 0 : _a.surface;
|
|
49
|
+
if (surface) {
|
|
50
|
+
return `/${encodeURIComponent(surface)}/${encodeURIComponent(id)}`;
|
|
51
|
+
}
|
|
52
|
+
return hrefForOperation(detailOperation, [], { id });
|
|
53
|
+
}
|
|
54
|
+
function useRowDetailNavigation(detailOperation) {
|
|
55
|
+
const { navigate } = useRouter();
|
|
56
|
+
const getRowHref = useCallback(
|
|
57
|
+
(row) => {
|
|
58
|
+
if (!detailOperation) return void 0;
|
|
59
|
+
const id = getClickyRowId(row);
|
|
60
|
+
if (!id) return void 0;
|
|
61
|
+
return hrefForDetail(detailOperation, id);
|
|
62
|
+
},
|
|
63
|
+
[detailOperation]
|
|
64
|
+
);
|
|
65
|
+
const onRowClick = useCallback(
|
|
66
|
+
(row) => {
|
|
67
|
+
const href = getRowHref(row);
|
|
68
|
+
if (href) navigate(href);
|
|
69
|
+
},
|
|
70
|
+
[getRowHref, navigate]
|
|
71
|
+
);
|
|
72
|
+
const isRowClickable = useCallback(
|
|
73
|
+
(row) => Boolean(getRowHref(row)),
|
|
74
|
+
[getRowHref]
|
|
75
|
+
);
|
|
76
|
+
return { getRowHref, onRowClick, isRowClickable };
|
|
77
|
+
}
|
|
78
|
+
export {
|
|
79
|
+
apiPathToRoutePath,
|
|
80
|
+
clickyNodeText,
|
|
81
|
+
getClickyRowId,
|
|
82
|
+
hrefForDetail,
|
|
83
|
+
hrefForOperation,
|
|
84
|
+
useRowDetailNavigation
|
|
85
|
+
};
|
|
86
|
+
//# sourceMappingURL=rowNavigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rowNavigation.js","sources":["../../src/rpc/rowNavigation.ts"],"sourcesContent":["import { useCallback } from \"react\";\nimport type {\n ClickyNode,\n ClickyRow,\n ClickyTableRowClick,\n ClickyTableRowHref,\n ClickyTableRowPredicate,\n} from \"../data/Clicky\";\nimport { getOperationClickyMeta } from \"./clickyMetadata\";\nimport { pathParamNames } from \"./command-form-utils\";\nimport { useRouter } from \"./router\";\nimport type { ResolvedOperation } from \"./types\";\n\n// clickyNodeText flattens a clicky node to its plain text — used to read an id\n// out of a table row cell.\nexport function clickyNodeText(node: ClickyNode | undefined): string {\n if (!node) return \"\";\n if (node.plain) return node.plain;\n if (node.text) return node.text;\n if (node.source) return node.source;\n if (node.children) return node.children.map(clickyNodeText).join(\"\");\n if (node.items) return node.items.map(clickyNodeText).join(\" \");\n if (node.fields)\n return node.fields.map((field) => clickyNodeText(field.value)).join(\" \");\n return \"\";\n}\n\n// getClickyRowId reads a row's identifier from the conventional id columns,\n// preferring the synthetic `_id` a clicky surface emits over a displayed `id`.\nexport function getClickyRowId(row: ClickyRow): string | undefined {\n const candidates = [\"_id\", \"id\", \"ID\", \"guid\", \"GUID\"];\n for (const key of candidates) {\n const value = clickyNodeText(row.cells[key]);\n if (value) return value;\n }\n return undefined;\n}\n\n// apiPathToRoutePath strips the /api/v1 prefix and turns `{param}` segments into\n// `:param`, mapping an OpenAPI path to the explorer's client-side route.\nexport function apiPathToRoutePath(path: string): string {\n // Split on \"/\" and drop empty segments to strip the leading /api/v1 prefix and\n // any leading/trailing slashes without backtracking-prone regexes (the `[^{}]`\n // class and segment split avoid the polynomial-ReDoS that `[^}]+` / `\\/+$` had).\n const segments = path\n .trim()\n .replace(/^\\/api\\/v1/, \"\")\n .split(\"/\")\n .filter(Boolean);\n if (segments.length === 0) return \"/\";\n return `/${segments.join(\"/\").replace(/\\{([^{}]+)\\}/g, \":$1\")}`;\n}\n\n// hrefForOperation builds the client-side route for an operation, filling path\n// params from `flags`/`args` and trailing query params from leftover flags.\n// Returns undefined when a required path param is unfilled.\nexport function hrefForOperation(\n operation: ResolvedOperation,\n args: string[] = [],\n flags: Record<string, string> = {},\n): string | undefined {\n let route = apiPathToRoutePath(operation.path);\n const consumedFlags = new Set<string>();\n\n pathParamNames(operation.path).forEach((name, index) => {\n const value = flags[name] ?? args[index];\n if (!value) return;\n consumedFlags.add(name);\n route = route.replace(`:${name}`, encodeURIComponent(value));\n });\n\n if (route.includes(\":\")) return undefined;\n\n const search = new URLSearchParams();\n for (const [key, value] of Object.entries(flags)) {\n if (value && !consumedFlags.has(key)) search.set(key, value);\n }\n const query = search.toString();\n return query ? `${route}?${query}` : route;\n}\n\n// hrefForDetail builds the entity detail route for a row. It prefers the\n// surface key the backend tags on the get operation (x-clicky.surface), since\n// that is the route key the sidebar and EntityExplorerApp's route resolver use\n// (/<surface>/<id>). The surface key is often the singular/plural sibling of the\n// API path segment (e.g. surface \"connections\" vs path /connection/{id}), so\n// deriving the route from the path alone yields an unknown-surface route. Falls\n// back to the path-derived route when the operation carries no surface meta.\nexport function hrefForDetail(detailOperation: ResolvedOperation, id: string): string | undefined {\n const surface = getOperationClickyMeta(detailOperation)?.surface;\n if (surface) {\n return `/${encodeURIComponent(surface)}/${encodeURIComponent(id)}`;\n }\n return hrefForOperation(detailOperation, [], { id });\n}\n\nexport type RowDetailNavigation = {\n getRowHref: ClickyTableRowHref;\n onRowClick: ClickyTableRowClick;\n isRowClickable: ClickyTableRowPredicate;\n};\n\n// useRowDetailNavigation wires a clicky table's rows to the entity detail page:\n// each row resolves to /<surface>/<id> via the detail operation, navigates on\n// click, and is clickable only when a detail href can be built. Shared by the\n// list catalog and the operation runner so row navigation behaves identically.\nexport function useRowDetailNavigation(\n detailOperation: ResolvedOperation | undefined,\n): RowDetailNavigation {\n const { navigate } = useRouter();\n\n const getRowHref = useCallback<ClickyTableRowHref>(\n (row) => {\n if (!detailOperation) return undefined;\n const id = getClickyRowId(row);\n if (!id) return undefined;\n return hrefForDetail(detailOperation, id);\n },\n [detailOperation],\n );\n\n const onRowClick = useCallback<ClickyTableRowClick>(\n (row) => {\n const href = getRowHref(row);\n if (href) navigate(href);\n },\n [getRowHref, navigate],\n );\n\n const isRowClickable = useCallback<ClickyTableRowPredicate>(\n (row) => Boolean(getRowHref(row)),\n [getRowHref],\n );\n\n return { getRowHref, onRowClick, isRowClickable };\n}\n"],"names":[],"mappings":";;;;AAeO,SAAS,eAAe,MAAsC;AACnE,MAAI,CAAC,KAAM,QAAO;AAClB,MAAI,KAAK,MAAO,QAAO,KAAK;AAC5B,MAAI,KAAK,KAAM,QAAO,KAAK;AAC3B,MAAI,KAAK,OAAQ,QAAO,KAAK;AAC7B,MAAI,KAAK,SAAU,QAAO,KAAK,SAAS,IAAI,cAAc,EAAE,KAAK,EAAE;AACnE,MAAI,KAAK,MAAO,QAAO,KAAK,MAAM,IAAI,cAAc,EAAE,KAAK,GAAG;AAC9D,MAAI,KAAK;AACP,WAAO,KAAK,OAAO,IAAI,CAAC,UAAU,eAAe,MAAM,KAAK,CAAC,EAAE,KAAK,GAAG;AACzE,SAAO;AACT;AAIO,SAAS,eAAe,KAAoC;AACjE,QAAM,aAAa,CAAC,OAAO,MAAM,MAAM,QAAQ,MAAM;AACrD,aAAW,OAAO,YAAY;AAC5B,UAAM,QAAQ,eAAe,IAAI,MAAM,GAAG,CAAC;AAC3C,QAAI,MAAO,QAAO;AAAA,EACpB;AACA,SAAO;AACT;AAIO,SA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,UAAI,CAAC,gBAAiB,QAAO;AAC7B,YAAM,KAAK,eAAe,GAAG;AAC7B,UAAI,CAAC,GAAI,QAAO;AAChB,aAAO,cAAc,iBAAiB,EAAE;AAAA,IAC1C;AAAA,IACA,CAAC,eAAe;AAAA,EAAA;AAGlB,QAAM,aAAa;AAAA,IACjB,CAAC,QAAQ;AACP,YAAM,OAAO,WAAW,GAAG;AAC3B,UAAI,eAAe,IAAI;AAAA,IACzB;AAAA,IACA,CAAC,YAAY,QAAQ;AAAA,EAAA;AAGvB,QAAM,iBAAiB;AAAA,IACrB,CAAC,QAAQ,QAAQ,WAAW,GAAG,CAAC;AAAA,IAChC,CAAC,UAAU;AAAA,EAAA;AAGb,SAAO,EAAE,YAAY,YAAY,eAAA;AACnC;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
function collectionPath(path) {
|
|
4
|
+
return path.replace(/\/\{[^{}]+\}$/, "");
|
|
5
|
+
}
|
|
6
|
+
function resolveActionPath(path, values) {
|
|
7
|
+
return path.replace(/\{([^{}]+)\}/g, (_match, name) => {
|
|
8
|
+
const v = values[name];
|
|
9
|
+
return v != null && v !== "" ? encodeURIComponent(v) : `{${name}}`;
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
function scalarValues(value) {
|
|
13
|
+
const out = {};
|
|
14
|
+
for (const [key, v] of Object.entries(value)) {
|
|
15
|
+
if (typeof v === "string" || typeof v === "number") out[key] = String(v);
|
|
16
|
+
}
|
|
17
|
+
return out;
|
|
18
|
+
}
|
|
19
|
+
exports.collectionPath = collectionPath;
|
|
20
|
+
exports.resolveActionPath = resolveActionPath;
|
|
21
|
+
exports.scalarValues = scalarValues;
|
|
22
|
+
//# sourceMappingURL=schemaActionPath.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemaActionPath.cjs","sources":["../../src/rpc/schemaActionPath.ts"],"sourcesContent":["// Path helpers for SchemaActionForm, kept out of the component module so the\n// component file only exports components (react-refresh constraint).\n\n// collectionPath strips a trailing /{id} segment so a resource's JSON Schema is\n// fetched from its collection endpoint (the connection/profile schema is keyed\n// there, not per id).\nexport function collectionPath(path: string): string {\n return path.replace(/\\/\\{[^{}]+\\}$/, \"\");\n}\n\n// resolveActionPath fills {name} path parameters from the provided values,\n// leaving unmatched placeholders intact.\nexport function resolveActionPath(path: string, values: Record<string, string>): string {\n return path.replace(/\\{([^{}]+)\\}/g, (_match, name: string) => {\n const v = values[name];\n return v != null && v !== \"\" ? encodeURIComponent(v) : `{${name}}`;\n });\n}\n\n// scalarValues lifts the top-level string/number entries of a form value, used\n// only to resolve path parameters (e.g. an id carried in the body).\nexport function scalarValues(value: Record<string, unknown>): Record<string, string> {\n const out: Record<string, string> = {};\n for (const [key, v] of Object.entries(value)) {\n if (typeof v === \"string\" || typeof v === \"number\") out[key] = String(v);\n }\n return out;\n}\n"],"names":[],"mappings":";;AAMO,SAAS,eAAe,MAAsB;AACnD,SAAO,KAAK,QAAQ,iBAAiB,EAAE;AACzC;AAIO,SAAS,kBAAkB,MAAc,QAAwC;AACtF,SAAO,KAAK,QAAQ,iBAAiB,CAAC,QAAQ,SAAiB;AAC7D,UAAM,IAAI,OAAO,IAAI;AACrB,WAAO,KAAK,QAAQ,MAAM,KAAK,mBAAmB,CAAC,IAAI,IAAI,IAAI;AAAA,EACjE,CAAC;AACH;AAIO,SAAS,aAAa,OAAwD;AACnF,QAAM,MAA8B,CAAA;AACpC,aAAW,CAAC,KAAK,CAAC,KAAK,OAAO,QAAQ,KAAK,GAAG;AAC5C,QAAI,OAAO,MAAM,YAAY,OAAO,MAAM,SAAU,KAAI,GAAG,IAAI,OAAO,CAAC;AAAA,EACzE;AACA,SAAO;AACT;;;;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function collectionPath(path: string): string;
|
|
2
|
+
export declare function resolveActionPath(path: string, values: Record<string, string>): string;
|
|
3
|
+
export declare function scalarValues(value: Record<string, unknown>): Record<string, string>;
|
|
4
|
+
//# sourceMappingURL=schemaActionPath.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemaActionPath.d.ts","sourceRoot":"","sources":["../../src/rpc/schemaActionPath.ts"],"names":[],"mappings":"AAMA,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEnD;AAID,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAKtF;AAID,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAMnF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
function collectionPath(path) {
|
|
2
|
+
return path.replace(/\/\{[^{}]+\}$/, "");
|
|
3
|
+
}
|
|
4
|
+
function resolveActionPath(path, values) {
|
|
5
|
+
return path.replace(/\{([^{}]+)\}/g, (_match, name) => {
|
|
6
|
+
const v = values[name];
|
|
7
|
+
return v != null && v !== "" ? encodeURIComponent(v) : `{${name}}`;
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
function scalarValues(value) {
|
|
11
|
+
const out = {};
|
|
12
|
+
for (const [key, v] of Object.entries(value)) {
|
|
13
|
+
if (typeof v === "string" || typeof v === "number") out[key] = String(v);
|
|
14
|
+
}
|
|
15
|
+
return out;
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
collectionPath,
|
|
19
|
+
resolveActionPath,
|
|
20
|
+
scalarValues
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=schemaActionPath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemaActionPath.js","sources":["../../src/rpc/schemaActionPath.ts"],"sourcesContent":["// Path helpers for SchemaActionForm, kept out of the component module so the\n// component file only exports components (react-refresh constraint).\n\n// collectionPath strips a trailing /{id} segment so a resource's JSON Schema is\n// fetched from its collection endpoint (the connection/profile schema is keyed\n// there, not per id).\nexport function collectionPath(path: string): string {\n return path.replace(/\\/\\{[^{}]+\\}$/, \"\");\n}\n\n// resolveActionPath fills {name} path parameters from the provided values,\n// leaving unmatched placeholders intact.\nexport function resolveActionPath(path: string, values: Record<string, string>): string {\n return path.replace(/\\{([^{}]+)\\}/g, (_match, name: string) => {\n const v = values[name];\n return v != null && v !== \"\" ? encodeURIComponent(v) : `{${name}}`;\n });\n}\n\n// scalarValues lifts the top-level string/number entries of a form value, used\n// only to resolve path parameters (e.g. an id carried in the body).\nexport function scalarValues(value: Record<string, unknown>): Record<string, string> {\n const out: Record<string, string> = {};\n for (const [key, v] of Object.entries(value)) {\n if (typeof v === \"string\" || typeof v === \"number\") out[key] = String(v);\n }\n return out;\n}\n"],"names":[],"mappings":"AAMO,SAAS,eAAe,MAAsB;AACnD,SAAO,KAAK,QAAQ,iBAAiB,EAAE;AACzC;AAIO,SAAS,kBAAkB,MAAc,QAAwC;AACtF,SAAO,KAAK,QAAQ,iBAAiB,CAAC,QAAQ,SAAiB;AAC7D,UAAM,IAAI,OAAO,IAAI;AACrB,WAAO,KAAK,QAAQ,MAAM,KAAK,mBAAmB,CAAC,IAAI,IAAI,IAAI;AAAA,EACjE,CAAC;AACH;AAIO,SAAS,aAAa,OAAwD;AACnF,QAAM,MAA8B,CAAA;AACpC,aAAW,CAAC,KAAK,CAAC,KAAK,OAAO,QAAQ,KAAK,GAAG;AAC5C,QAAI,OAAO,MAAM,YAAY,OAAO,MAAM,SAAU,KAAI,GAAG,IAAI,OAAO,CAAC;AAAA,EACzE;AACA,SAAO;AACT;"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const UiTable = require("../icons/components/UiTable.cjs");
|
|
4
|
+
const UiWorkflow = require("../icons/components/UiWorkflow.cjs");
|
|
5
|
+
const UiBoxes = require("../icons/components/UiBoxes.cjs");
|
|
6
|
+
const UiActivity = require("../icons/components/UiActivity.cjs");
|
|
7
|
+
const UiGraph = require("../icons/components/UiGraph.cjs");
|
|
8
|
+
const UiGlobe = require("../icons/components/UiGlobe.cjs");
|
|
9
|
+
const UiHardDrive = require("../icons/components/UiHardDrive.cjs");
|
|
10
|
+
const UiServer = require("../icons/components/UiServer.cjs");
|
|
11
|
+
const UiSqlDatabase = require("../icons/components/UiSqlDatabase.cjs");
|
|
12
|
+
const UiDatabase = require("../icons/components/UiDatabase.cjs");
|
|
13
|
+
const SURFACE_ICONS = {
|
|
14
|
+
database: UiDatabase.UiDatabase,
|
|
15
|
+
sql: UiSqlDatabase.UiSqlDatabase,
|
|
16
|
+
"sql-database": UiSqlDatabase.UiSqlDatabase,
|
|
17
|
+
server: UiServer.UiServer,
|
|
18
|
+
"hard-drive": UiHardDrive.UiHardDrive,
|
|
19
|
+
globe: UiGlobe.UiGlobe,
|
|
20
|
+
http: UiGlobe.UiGlobe,
|
|
21
|
+
api: UiGlobe.UiGlobe,
|
|
22
|
+
graph: UiGraph.UiGraph,
|
|
23
|
+
metrics: UiGraph.UiGraph,
|
|
24
|
+
activity: UiActivity.UiActivity,
|
|
25
|
+
logs: UiActivity.UiActivity,
|
|
26
|
+
boxes: UiBoxes.UiBoxes,
|
|
27
|
+
workflow: UiWorkflow.UiWorkflow,
|
|
28
|
+
table: UiTable.UiTable
|
|
29
|
+
};
|
|
30
|
+
function resolveSurfaceIcon(name) {
|
|
31
|
+
if (!name) return void 0;
|
|
32
|
+
return SURFACE_ICONS[name.toLowerCase()];
|
|
33
|
+
}
|
|
34
|
+
exports.resolveSurfaceIcon = resolveSurfaceIcon;
|
|
35
|
+
//# sourceMappingURL=surfaceIconMap.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surfaceIconMap.cjs","sources":["../../src/rpc/surfaceIconMap.ts"],"sourcesContent":["import type { StaticIconComponent } from \"../data/Icon\";\nimport {\n UiActivity,\n UiBoxes,\n UiDatabase,\n UiGlobe,\n UiGraph,\n UiHardDrive,\n UiServer,\n UiSqlDatabase,\n UiTable,\n UiWorkflow,\n} from \"../icons\";\n\n// SURFACE_ICONS maps the opaque icon-name strings the backend emits on each\n// surface (x-clicky.surfaces[].icon) to clicky-ui glyph components. The canonical\n// vocabulary (database/globe/graph/activity/table) is the contract with the\n// backend's icon emitter; aliases are accepted for convenience. Passing the\n// resolved component (not the string) to AppShell renders via <Icon icon=.../>\n// and never hits the string-name fallback-provider placeholder.\nconst SURFACE_ICONS: Record<string, StaticIconComponent> = {\n database: UiDatabase,\n sql: UiSqlDatabase,\n \"sql-database\": UiSqlDatabase,\n server: UiServer,\n \"hard-drive\": UiHardDrive,\n globe: UiGlobe,\n http: UiGlobe,\n api: UiGlobe,\n graph: UiGraph,\n metrics: UiGraph,\n activity: UiActivity,\n logs: UiActivity,\n boxes: UiBoxes,\n workflow: UiWorkflow,\n table: UiTable,\n};\n\n// resolveSurfaceIcon returns the glyph component for a backend icon name, or\n// undefined when the name is unknown (the nav item then renders with no icon).\nexport function resolveSurfaceIcon(\n name: string | undefined,\n): StaticIconComponent | undefined {\n if (!name) return undefined;\n return SURFACE_ICONS[name.toLowerCase()];\n}\n"],"names":["UiDatabase","UiSqlDatabase","UiServer","UiHardDrive","UiGlobe","UiGraph","UiActivity","UiBoxes","UiWorkflow","UiTable"],"mappings":";;;;;;;;;;;;AAoBA,MAAM,gBAAqD;AAAA,EACzD,UAAUA,WAAAA;AAAAA,EACV,KAAKC,cAAAA;AAAAA,EACL,gBAAgBA,cAAAA;AAAAA,EAChB,QAAQC,SAAAA;AAAAA,EACR,cAAcC,YAAAA;AAAAA,EACd,OAAOC,QAAAA;AAAAA,EACP,MAAMA,QAAAA;AAAAA,EACN,KAAKA,QAAAA;AAAAA,EACL,OAAOC,QAAAA;AAAAA,EACP,SAASA,QAAAA;AAAAA,EACT,UAAUC,WAAAA;AAAAA,EACV,MAAMA,WAAAA;AAAAA,EACN,OAAOC,QAAAA;AAAAA,EACP,UAAUC,WAAAA;AAAAA,EACV,OAAOC,QAAAA;AACT;AAIO,SAAS,mBACd,MACiC;AACjC,MAAI,CAAC,KAAM,QAAO;AAClB,SAAO,cAAc,KAAK,aAAa;AACzC;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surfaceIconMap.d.ts","sourceRoot":"","sources":["../../src/rpc/surfaceIconMap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAwCxD,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,GAAG,SAAS,GACvB,mBAAmB,GAAG,SAAS,CAGjC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { UiTable } from "../icons/components/UiTable.js";
|
|
2
|
+
import { UiWorkflow } from "../icons/components/UiWorkflow.js";
|
|
3
|
+
import { UiBoxes } from "../icons/components/UiBoxes.js";
|
|
4
|
+
import { UiActivity } from "../icons/components/UiActivity.js";
|
|
5
|
+
import { UiGraph } from "../icons/components/UiGraph.js";
|
|
6
|
+
import { UiGlobe } from "../icons/components/UiGlobe.js";
|
|
7
|
+
import { UiHardDrive } from "../icons/components/UiHardDrive.js";
|
|
8
|
+
import { UiServer } from "../icons/components/UiServer.js";
|
|
9
|
+
import { UiSqlDatabase } from "../icons/components/UiSqlDatabase.js";
|
|
10
|
+
import { UiDatabase } from "../icons/components/UiDatabase.js";
|
|
11
|
+
const SURFACE_ICONS = {
|
|
12
|
+
database: UiDatabase,
|
|
13
|
+
sql: UiSqlDatabase,
|
|
14
|
+
"sql-database": UiSqlDatabase,
|
|
15
|
+
server: UiServer,
|
|
16
|
+
"hard-drive": UiHardDrive,
|
|
17
|
+
globe: UiGlobe,
|
|
18
|
+
http: UiGlobe,
|
|
19
|
+
api: UiGlobe,
|
|
20
|
+
graph: UiGraph,
|
|
21
|
+
metrics: UiGraph,
|
|
22
|
+
activity: UiActivity,
|
|
23
|
+
logs: UiActivity,
|
|
24
|
+
boxes: UiBoxes,
|
|
25
|
+
workflow: UiWorkflow,
|
|
26
|
+
table: UiTable
|
|
27
|
+
};
|
|
28
|
+
function resolveSurfaceIcon(name) {
|
|
29
|
+
if (!name) return void 0;
|
|
30
|
+
return SURFACE_ICONS[name.toLowerCase()];
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
resolveSurfaceIcon
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=surfaceIconMap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surfaceIconMap.js","sources":["../../src/rpc/surfaceIconMap.ts"],"sourcesContent":["import type { StaticIconComponent } from \"../data/Icon\";\nimport {\n UiActivity,\n UiBoxes,\n UiDatabase,\n UiGlobe,\n UiGraph,\n UiHardDrive,\n UiServer,\n UiSqlDatabase,\n UiTable,\n UiWorkflow,\n} from \"../icons\";\n\n// SURFACE_ICONS maps the opaque icon-name strings the backend emits on each\n// surface (x-clicky.surfaces[].icon) to clicky-ui glyph components. The canonical\n// vocabulary (database/globe/graph/activity/table) is the contract with the\n// backend's icon emitter; aliases are accepted for convenience. Passing the\n// resolved component (not the string) to AppShell renders via <Icon icon=.../>\n// and never hits the string-name fallback-provider placeholder.\nconst SURFACE_ICONS: Record<string, StaticIconComponent> = {\n database: UiDatabase,\n sql: UiSqlDatabase,\n \"sql-database\": UiSqlDatabase,\n server: UiServer,\n \"hard-drive\": UiHardDrive,\n globe: UiGlobe,\n http: UiGlobe,\n api: UiGlobe,\n graph: UiGraph,\n metrics: UiGraph,\n activity: UiActivity,\n logs: UiActivity,\n boxes: UiBoxes,\n workflow: UiWorkflow,\n table: UiTable,\n};\n\n// resolveSurfaceIcon returns the glyph component for a backend icon name, or\n// undefined when the name is unknown (the nav item then renders with no icon).\nexport function resolveSurfaceIcon(\n name: string | undefined,\n): StaticIconComponent | undefined {\n if (!name) return undefined;\n return SURFACE_ICONS[name.toLowerCase()];\n}\n"],"names":[],"mappings":";;;;;;;;;;AAoBA,MAAM,gBAAqD;AAAA,EACzD,UAAU;AAAA,EACV,KAAK;AAAA,EACL,gBAAgB;AAAA,EAChB,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,OAAO;AAAA,EACP,MAAM;AAAA,EACN,KAAK;AAAA,EACL,OAAO;AAAA,EACP,SAAS;AAAA,EACT,UAAU;AAAA,EACV,MAAM;AAAA,EACN,OAAO;AAAA,EACP,UAAU;AAAA,EACV,OAAO;AACT;AAIO,SAAS,mBACd,MACiC;AACjC,MAAI,CAAC,KAAM,QAAO;AAClB,SAAO,cAAc,KAAK,aAAa;AACzC;"}
|
package/dist/rpc/types.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.cjs","sources":["../../src/rpc/types.ts"],"sourcesContent":["import type { ClickyNode } from \"../data/Clicky\";\nimport type { TimeRangePresetGroup } from \"../components/TimeRange\";\n\nexport interface ExecutionRequest {\n args?: string[];\n flags?: Record<string, string>;\n}\n\nexport interface ExecutionPagination {\n total?: number;\n limit?: number;\n offset?: number;\n}\n\nexport interface ExecutionResponse {\n success: boolean;\n message?: string;\n output?: string;\n stdout?: string;\n stderr?: string;\n exit_code: number;\n error?: string;\n cli?: string;\n input?: ExecutionRequest;\n contentType?: string;\n requestUrl?: string;\n responseHeaders?: Record<string, string>;\n pagination?: ExecutionPagination;\n blob?: Blob;\n parsed?: unknown;\n}\n\nexport interface OpenAPISchema {\n type?: string;\n format?: string;\n default?: unknown;\n enum?: unknown[];\n description?: string;\n properties?: Record<string, OpenAPISchema>;\n}\n\n// ClickyParameterRole tells the UI which widget owns a parameter:\n// \"search\" — render as the FilterBar's dedicated search input\n// \"filter\" — render as a FilterBar chip on the DataTable\n// \"limit\" — feed into DataTable pagination's pageSize\n// \"offset\" — feed into DataTable pagination's page (or skip)\n// \"time-from\" — left edge of a time-range picker\n// \"time-to\" — right edge of a time-range picker\n// Set server-side by clicky's converter (see paramRole in clicky/rpc/openapi.go).\nexport type ClickyParameterRole =\n | \"search\"\n | \"filter\"\n | \"limit\"\n | \"offset\"\n | \"time-from\"\n | \"time-to\";\n\nexport interface ClickyParameterMeta {\n role?: ClickyParameterRole;\n}\n\nexport interface OpenAPIParameter {\n name: string;\n in: \"query\" | \"path\" | \"header\";\n description?: string;\n required?: boolean;\n schema?: OpenAPISchema;\n /** Hint text shown inside the empty input. Distinct from `description`,\n * which is help text and must NOT be used as a placeholder. */\n placeholder?: string;\n \"x-clicky\"?: ClickyParameterMeta;\n /** Vendor-extension placeholder, set server-side by clicky's converter.\n * Takes precedence over `placeholder` when both are present. */\n \"x-clicky-placeholder\"?: string;\n}\n\n/** Resolves the input placeholder for a parameter, drawing ONLY from explicit\n * placeholder fields — never from `description` (help text). Returns undefined\n * when no placeholder is declared so callers can apply their own fallback. */\nexport function parameterPlaceholder(param: OpenAPIParameter): string | undefined {\n return param[\"x-clicky-placeholder\"] ?? param.placeholder;\n}\n\nexport interface OpenAPIOperation {\n tags?: string[];\n summary?: string;\n description?: string;\n operationId?: string;\n parameters?: OpenAPIParameter[];\n requestBody?: {\n content?: Record<string, { schema?: OpenAPISchema }>;\n };\n responses: Record<string, unknown>;\n \"x-clicky\"?: ClickyOperationMeta;\n}\n\nexport interface OpenAPISpec {\n openapi: string;\n info: { title: string; description?: string; version: string };\n paths: Record<string, Record<string, OpenAPIOperation>>;\n tags?: Array<{ name: string; description?: string }>;\n \"x-clicky\"?: ClickySpecMeta;\n}\n\nexport interface ResolvedOperation {\n path: string;\n method: string;\n operation: OpenAPIOperation;\n}\n\nexport interface DomainDefinition {\n key: string;\n title: string;\n description: string;\n emptyTitle?: string;\n emptyDescription?: string;\n}\n\nexport interface ClickySpecMeta {\n surfaces?: ClickySurface[];\n}\n\nexport interface ClickySurface {\n key: string;\n entity: string;\n title: string;\n parent?: string;\n admin?: boolean;\n description?: string;\n}\n\nexport interface ClickyOperationMeta {\n command?: string;\n surface?: string;\n verb: \"list\" | \"get\" | \"create\" | \"update\" | \"delete\" | \"action\";\n scope: \"collection\" | \"entity\";\n actionName?: string;\n idParam?: string;\n supportsLookup?: boolean;\n supportsFilterMode?: boolean;\n}\n\nexport type OperationLookupFilterType = \"bool\" | \"number\" | \"date\" | \"from\" | \"to\" | \"multi-filter\";\n\nexport interface OperationLookupFilter {\n label?: string;\n options?: Record<string, ClickyNode>;\n selected?: Record<string, ClickyNode>;\n multi?: boolean;\n type?: OperationLookupFilterType;\n /** True when `options` is only the head of a larger set (server-side capped). */\n truncated?: boolean;\n /** True distinct count behind a truncated option set; drives \"… and N more\". */\n total?: number;\n presets?: Array<{ label: string; from: string; to: string } | TimeRangePresetGroup>;\n timeEnabled?: boolean;\n timeZone?: string;\n timeZones?: string[];\n}\n\nexport interface OperationLookupResponse {\n filters: Record<string, OperationLookupFilter>;\n}\n\nexport function isPositionalParam(p: OpenAPIParameter): boolean {\n return p.name === \"args\" || p.description?.toLowerCase().includes(\"positional argument\") === true;\n}\n"],"names":[],"mappings":";;AA+EO,SAAS,qBAAqB,OAA6C;AAChF,SAAO,MAAM,sBAAsB,KAAK,MAAM;AAChD;
|
|
1
|
+
{"version":3,"file":"types.cjs","sources":["../../src/rpc/types.ts"],"sourcesContent":["import type { ClickyNode } from \"../data/Clicky\";\nimport type { TimeRangePresetGroup } from \"../components/TimeRange\";\n\nexport interface ExecutionRequest {\n args?: string[];\n flags?: Record<string, string>;\n}\n\nexport interface ExecutionPagination {\n total?: number;\n limit?: number;\n offset?: number;\n}\n\nexport interface ExecutionResponse {\n success: boolean;\n message?: string;\n output?: string;\n stdout?: string;\n stderr?: string;\n exit_code: number;\n error?: string;\n cli?: string;\n input?: ExecutionRequest;\n contentType?: string;\n requestUrl?: string;\n responseHeaders?: Record<string, string>;\n pagination?: ExecutionPagination;\n blob?: Blob;\n parsed?: unknown;\n}\n\nexport interface OpenAPISchema {\n type?: string;\n format?: string;\n default?: unknown;\n enum?: unknown[];\n description?: string;\n properties?: Record<string, OpenAPISchema>;\n}\n\n// ClickyParameterRole tells the UI which widget owns a parameter:\n// \"search\" — render as the FilterBar's dedicated search input\n// \"filter\" — render as a FilterBar chip on the DataTable\n// \"limit\" — feed into DataTable pagination's pageSize\n// \"offset\" — feed into DataTable pagination's page (or skip)\n// \"time-from\" — left edge of a time-range picker\n// \"time-to\" — right edge of a time-range picker\n// Set server-side by clicky's converter (see paramRole in clicky/rpc/openapi.go).\nexport type ClickyParameterRole =\n | \"search\"\n | \"filter\"\n | \"limit\"\n | \"offset\"\n | \"time-from\"\n | \"time-to\";\n\nexport interface ClickyParameterMeta {\n role?: ClickyParameterRole;\n}\n\nexport interface OpenAPIParameter {\n name: string;\n in: \"query\" | \"path\" | \"header\";\n description?: string;\n required?: boolean;\n schema?: OpenAPISchema;\n /** Hint text shown inside the empty input. Distinct from `description`,\n * which is help text and must NOT be used as a placeholder. */\n placeholder?: string;\n \"x-clicky\"?: ClickyParameterMeta;\n /** Vendor-extension placeholder, set server-side by clicky's converter.\n * Takes precedence over `placeholder` when both are present. */\n \"x-clicky-placeholder\"?: string;\n}\n\n/** Resolves the input placeholder for a parameter, drawing ONLY from explicit\n * placeholder fields — never from `description` (help text). Returns undefined\n * when no placeholder is declared so callers can apply their own fallback. */\nexport function parameterPlaceholder(param: OpenAPIParameter): string | undefined {\n return param[\"x-clicky-placeholder\"] ?? param.placeholder;\n}\n\nexport interface OpenAPIOperation {\n tags?: string[];\n summary?: string;\n description?: string;\n operationId?: string;\n parameters?: OpenAPIParameter[];\n requestBody?: {\n content?: Record<string, { schema?: OpenAPISchema }>;\n };\n responses: Record<string, unknown>;\n \"x-clicky\"?: ClickyOperationMeta;\n}\n\nexport interface OpenAPISpec {\n openapi: string;\n info: { title: string; description?: string; version: string };\n paths: Record<string, Record<string, OpenAPIOperation>>;\n tags?: Array<{ name: string; description?: string }>;\n \"x-clicky\"?: ClickySpecMeta;\n}\n\nexport interface ResolvedOperation {\n path: string;\n method: string;\n operation: OpenAPIOperation;\n}\n\nexport interface DomainDefinition {\n key: string;\n title: string;\n description: string;\n emptyTitle?: string;\n emptyDescription?: string;\n}\n\nexport interface ClickySpecMeta {\n surfaces?: ClickySurface[];\n}\n\nexport interface ClickySurface {\n key: string;\n entity: string;\n title: string;\n parent?: string;\n admin?: boolean;\n description?: string;\n /** Opaque icon name emitted by the backend (x-clicky-icon), resolved to a glyph in the UI. */\n icon?: string;\n}\n\nexport interface ClickyOperationMeta {\n command?: string;\n surface?: string;\n verb: \"list\" | \"get\" | \"create\" | \"update\" | \"delete\" | \"action\";\n scope: \"collection\" | \"entity\";\n actionName?: string;\n idParam?: string;\n supportsLookup?: boolean;\n supportsFilterMode?: boolean;\n}\n\nexport type OperationLookupFilterType = \"bool\" | \"number\" | \"date\" | \"from\" | \"to\" | \"multi-filter\";\n\nexport interface OperationLookupFilter {\n label?: string;\n options?: Record<string, ClickyNode>;\n selected?: Record<string, ClickyNode>;\n multi?: boolean;\n type?: OperationLookupFilterType;\n /** True when `options` is only the head of a larger set (server-side capped). */\n truncated?: boolean;\n /** True distinct count behind a truncated option set; drives \"… and N more\". */\n total?: number;\n presets?: Array<{ label: string; from: string; to: string } | TimeRangePresetGroup>;\n timeEnabled?: boolean;\n timeZone?: string;\n timeZones?: string[];\n}\n\nexport interface OperationLookupResponse {\n filters: Record<string, OperationLookupFilter>;\n}\n\nexport function isPositionalParam(p: OpenAPIParameter): boolean {\n return p.name === \"args\" || p.description?.toLowerCase().includes(\"positional argument\") === true;\n}\n"],"names":[],"mappings":";;AA+EO,SAAS,qBAAqB,OAA6C;AAChF,SAAO,MAAM,sBAAsB,KAAK,MAAM;AAChD;AAqFO,SAAS,kBAAkB,GAA8B;;AAC9D,SAAO,EAAE,SAAS,YAAU,OAAE,gBAAF,mBAAe,cAAc,SAAS,4BAA2B;AAC/F;;;"}
|
package/dist/rpc/types.d.ts
CHANGED
|
@@ -106,6 +106,8 @@ export interface ClickySurface {
|
|
|
106
106
|
parent?: string;
|
|
107
107
|
admin?: boolean;
|
|
108
108
|
description?: string;
|
|
109
|
+
/** Opaque icon name emitted by the backend (x-clicky-icon), resolved to a glyph in the UI. */
|
|
110
|
+
icon?: string;
|
|
109
111
|
}
|
|
110
112
|
export interface ClickyOperationMeta {
|
|
111
113
|
command?: string;
|
package/dist/rpc/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/rpc/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAEpE,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAA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AAE,gBAAgB,GAAG,OAAO,CAE9D"}
|
package/dist/rpc/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":["../../src/rpc/types.ts"],"sourcesContent":["import type { ClickyNode } from \"../data/Clicky\";\nimport type { TimeRangePresetGroup } from \"../components/TimeRange\";\n\nexport interface ExecutionRequest {\n args?: string[];\n flags?: Record<string, string>;\n}\n\nexport interface ExecutionPagination {\n total?: number;\n limit?: number;\n offset?: number;\n}\n\nexport interface ExecutionResponse {\n success: boolean;\n message?: string;\n output?: string;\n stdout?: string;\n stderr?: string;\n exit_code: number;\n error?: string;\n cli?: string;\n input?: ExecutionRequest;\n contentType?: string;\n requestUrl?: string;\n responseHeaders?: Record<string, string>;\n pagination?: ExecutionPagination;\n blob?: Blob;\n parsed?: unknown;\n}\n\nexport interface OpenAPISchema {\n type?: string;\n format?: string;\n default?: unknown;\n enum?: unknown[];\n description?: string;\n properties?: Record<string, OpenAPISchema>;\n}\n\n// ClickyParameterRole tells the UI which widget owns a parameter:\n// \"search\" — render as the FilterBar's dedicated search input\n// \"filter\" — render as a FilterBar chip on the DataTable\n// \"limit\" — feed into DataTable pagination's pageSize\n// \"offset\" — feed into DataTable pagination's page (or skip)\n// \"time-from\" — left edge of a time-range picker\n// \"time-to\" — right edge of a time-range picker\n// Set server-side by clicky's converter (see paramRole in clicky/rpc/openapi.go).\nexport type ClickyParameterRole =\n | \"search\"\n | \"filter\"\n | \"limit\"\n | \"offset\"\n | \"time-from\"\n | \"time-to\";\n\nexport interface ClickyParameterMeta {\n role?: ClickyParameterRole;\n}\n\nexport interface OpenAPIParameter {\n name: string;\n in: \"query\" | \"path\" | \"header\";\n description?: string;\n required?: boolean;\n schema?: OpenAPISchema;\n /** Hint text shown inside the empty input. Distinct from `description`,\n * which is help text and must NOT be used as a placeholder. */\n placeholder?: string;\n \"x-clicky\"?: ClickyParameterMeta;\n /** Vendor-extension placeholder, set server-side by clicky's converter.\n * Takes precedence over `placeholder` when both are present. */\n \"x-clicky-placeholder\"?: string;\n}\n\n/** Resolves the input placeholder for a parameter, drawing ONLY from explicit\n * placeholder fields — never from `description` (help text). Returns undefined\n * when no placeholder is declared so callers can apply their own fallback. */\nexport function parameterPlaceholder(param: OpenAPIParameter): string | undefined {\n return param[\"x-clicky-placeholder\"] ?? param.placeholder;\n}\n\nexport interface OpenAPIOperation {\n tags?: string[];\n summary?: string;\n description?: string;\n operationId?: string;\n parameters?: OpenAPIParameter[];\n requestBody?: {\n content?: Record<string, { schema?: OpenAPISchema }>;\n };\n responses: Record<string, unknown>;\n \"x-clicky\"?: ClickyOperationMeta;\n}\n\nexport interface OpenAPISpec {\n openapi: string;\n info: { title: string; description?: string; version: string };\n paths: Record<string, Record<string, OpenAPIOperation>>;\n tags?: Array<{ name: string; description?: string }>;\n \"x-clicky\"?: ClickySpecMeta;\n}\n\nexport interface ResolvedOperation {\n path: string;\n method: string;\n operation: OpenAPIOperation;\n}\n\nexport interface DomainDefinition {\n key: string;\n title: string;\n description: string;\n emptyTitle?: string;\n emptyDescription?: string;\n}\n\nexport interface ClickySpecMeta {\n surfaces?: ClickySurface[];\n}\n\nexport interface ClickySurface {\n key: string;\n entity: string;\n title: string;\n parent?: string;\n admin?: boolean;\n description?: string;\n}\n\nexport interface ClickyOperationMeta {\n command?: string;\n surface?: string;\n verb: \"list\" | \"get\" | \"create\" | \"update\" | \"delete\" | \"action\";\n scope: \"collection\" | \"entity\";\n actionName?: string;\n idParam?: string;\n supportsLookup?: boolean;\n supportsFilterMode?: boolean;\n}\n\nexport type OperationLookupFilterType = \"bool\" | \"number\" | \"date\" | \"from\" | \"to\" | \"multi-filter\";\n\nexport interface OperationLookupFilter {\n label?: string;\n options?: Record<string, ClickyNode>;\n selected?: Record<string, ClickyNode>;\n multi?: boolean;\n type?: OperationLookupFilterType;\n /** True when `options` is only the head of a larger set (server-side capped). */\n truncated?: boolean;\n /** True distinct count behind a truncated option set; drives \"… and N more\". */\n total?: number;\n presets?: Array<{ label: string; from: string; to: string } | TimeRangePresetGroup>;\n timeEnabled?: boolean;\n timeZone?: string;\n timeZones?: string[];\n}\n\nexport interface OperationLookupResponse {\n filters: Record<string, OperationLookupFilter>;\n}\n\nexport function isPositionalParam(p: OpenAPIParameter): boolean {\n return p.name === \"args\" || p.description?.toLowerCase().includes(\"positional argument\") === true;\n}\n"],"names":[],"mappings":"AA+EO,SAAS,qBAAqB,OAA6C;AAChF,SAAO,MAAM,sBAAsB,KAAK,MAAM;AAChD;
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../../src/rpc/types.ts"],"sourcesContent":["import type { ClickyNode } from \"../data/Clicky\";\nimport type { TimeRangePresetGroup } from \"../components/TimeRange\";\n\nexport interface ExecutionRequest {\n args?: string[];\n flags?: Record<string, string>;\n}\n\nexport interface ExecutionPagination {\n total?: number;\n limit?: number;\n offset?: number;\n}\n\nexport interface ExecutionResponse {\n success: boolean;\n message?: string;\n output?: string;\n stdout?: string;\n stderr?: string;\n exit_code: number;\n error?: string;\n cli?: string;\n input?: ExecutionRequest;\n contentType?: string;\n requestUrl?: string;\n responseHeaders?: Record<string, string>;\n pagination?: ExecutionPagination;\n blob?: Blob;\n parsed?: unknown;\n}\n\nexport interface OpenAPISchema {\n type?: string;\n format?: string;\n default?: unknown;\n enum?: unknown[];\n description?: string;\n properties?: Record<string, OpenAPISchema>;\n}\n\n// ClickyParameterRole tells the UI which widget owns a parameter:\n// \"search\" — render as the FilterBar's dedicated search input\n// \"filter\" — render as a FilterBar chip on the DataTable\n// \"limit\" — feed into DataTable pagination's pageSize\n// \"offset\" — feed into DataTable pagination's page (or skip)\n// \"time-from\" — left edge of a time-range picker\n// \"time-to\" — right edge of a time-range picker\n// Set server-side by clicky's converter (see paramRole in clicky/rpc/openapi.go).\nexport type ClickyParameterRole =\n | \"search\"\n | \"filter\"\n | \"limit\"\n | \"offset\"\n | \"time-from\"\n | \"time-to\";\n\nexport interface ClickyParameterMeta {\n role?: ClickyParameterRole;\n}\n\nexport interface OpenAPIParameter {\n name: string;\n in: \"query\" | \"path\" | \"header\";\n description?: string;\n required?: boolean;\n schema?: OpenAPISchema;\n /** Hint text shown inside the empty input. Distinct from `description`,\n * which is help text and must NOT be used as a placeholder. */\n placeholder?: string;\n \"x-clicky\"?: ClickyParameterMeta;\n /** Vendor-extension placeholder, set server-side by clicky's converter.\n * Takes precedence over `placeholder` when both are present. */\n \"x-clicky-placeholder\"?: string;\n}\n\n/** Resolves the input placeholder for a parameter, drawing ONLY from explicit\n * placeholder fields — never from `description` (help text). Returns undefined\n * when no placeholder is declared so callers can apply their own fallback. */\nexport function parameterPlaceholder(param: OpenAPIParameter): string | undefined {\n return param[\"x-clicky-placeholder\"] ?? param.placeholder;\n}\n\nexport interface OpenAPIOperation {\n tags?: string[];\n summary?: string;\n description?: string;\n operationId?: string;\n parameters?: OpenAPIParameter[];\n requestBody?: {\n content?: Record<string, { schema?: OpenAPISchema }>;\n };\n responses: Record<string, unknown>;\n \"x-clicky\"?: ClickyOperationMeta;\n}\n\nexport interface OpenAPISpec {\n openapi: string;\n info: { title: string; description?: string; version: string };\n paths: Record<string, Record<string, OpenAPIOperation>>;\n tags?: Array<{ name: string; description?: string }>;\n \"x-clicky\"?: ClickySpecMeta;\n}\n\nexport interface ResolvedOperation {\n path: string;\n method: string;\n operation: OpenAPIOperation;\n}\n\nexport interface DomainDefinition {\n key: string;\n title: string;\n description: string;\n emptyTitle?: string;\n emptyDescription?: string;\n}\n\nexport interface ClickySpecMeta {\n surfaces?: ClickySurface[];\n}\n\nexport interface ClickySurface {\n key: string;\n entity: string;\n title: string;\n parent?: string;\n admin?: boolean;\n description?: string;\n /** Opaque icon name emitted by the backend (x-clicky-icon), resolved to a glyph in the UI. */\n icon?: string;\n}\n\nexport interface ClickyOperationMeta {\n command?: string;\n surface?: string;\n verb: \"list\" | \"get\" | \"create\" | \"update\" | \"delete\" | \"action\";\n scope: \"collection\" | \"entity\";\n actionName?: string;\n idParam?: string;\n supportsLookup?: boolean;\n supportsFilterMode?: boolean;\n}\n\nexport type OperationLookupFilterType = \"bool\" | \"number\" | \"date\" | \"from\" | \"to\" | \"multi-filter\";\n\nexport interface OperationLookupFilter {\n label?: string;\n options?: Record<string, ClickyNode>;\n selected?: Record<string, ClickyNode>;\n multi?: boolean;\n type?: OperationLookupFilterType;\n /** True when `options` is only the head of a larger set (server-side capped). */\n truncated?: boolean;\n /** True distinct count behind a truncated option set; drives \"… and N more\". */\n total?: number;\n presets?: Array<{ label: string; from: string; to: string } | TimeRangePresetGroup>;\n timeEnabled?: boolean;\n timeZone?: string;\n timeZones?: string[];\n}\n\nexport interface OperationLookupResponse {\n filters: Record<string, OperationLookupFilter>;\n}\n\nexport function isPositionalParam(p: OpenAPIParameter): boolean {\n return p.name === \"args\" || p.description?.toLowerCase().includes(\"positional argument\") === true;\n}\n"],"names":[],"mappings":"AA+EO,SAAS,qBAAqB,OAA6C;AAChF,SAAO,MAAM,sBAAsB,KAAK,MAAM;AAChD;AAqFO,SAAS,kBAAkB,GAA8B;AAvFzD;AAwFL,SAAO,EAAE,SAAS,YAAU,OAAE,gBAAF,mBAAe,cAAc,SAAS,4BAA2B;AAC/F;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOperations.cjs","sources":["../../src/rpc/useOperations.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport type {\n ExecutionResponse,\n OpenAPISpec,\n OperationLookupFilter,\n OperationLookupResponse,\n ResolvedOperation,\n} from \"./types\";\n\nexport interface OperationsApiClient {\n getOpenAPISpec(): Promise<OpenAPISpec>;\n executeCommand(\n path: string,\n method: string,\n params: Record<string, string>,\n headers?: Record<string, string>,\n ): Promise<ExecutionResponse>;\n lookupFilters?(\n path: string,\n method: string,\n params: Record<string, string>,\n headers?: Record<string, string>,\n ): Promise<OperationLookupResponse>;\n lookupFilterOptions?(\n path: string,\n method: string,\n filterKey: string,\n query: string,\n ): Promise<OperationLookupFilter>;\n}\n\nexport function useOpenAPI(client: OperationsApiClient) {\n return useQuery<OpenAPISpec>({\n queryKey: [\"openapi-spec\"],\n queryFn: () => client.getOpenAPISpec(),\n staleTime: 5 * 60 * 1000,\n });\n}\n\nexport function useOperations(client: OperationsApiClient) {\n const { data: spec, ...rest } = useOpenAPI(client);\n\n const operations: ResolvedOperation[] = [];\n if (spec) {\n for (const [path, methods] of Object.entries(spec.paths)) {\n for (const [method, operation] of Object.entries(methods)) {\n operations.push({ path, method, operation });\n }\n }\n }\n\n return { operations, spec, ...rest };\n}\n\nexport function useOperationById(client: OperationsApiClient, operationId: string | undefined) {\n const { operations, ...rest } = useOperations(client);\n const operation = operationId\n ? operations.find((op) => op.operation.operationId === operationId)\n : undefined;\n return { operation, ...rest };\n}\n"],"names":["useQuery"],"mappings":";;;AA+
|
|
1
|
+
{"version":3,"file":"useOperations.cjs","sources":["../../src/rpc/useOperations.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport type { JsonSchemaObject } from \"../components/json-schema-form-types\";\nimport type {\n ExecutionResponse,\n OpenAPISpec,\n OperationLookupFilter,\n OperationLookupResponse,\n ResolvedOperation,\n} from \"./types\";\n\nexport interface OperationsApiClient {\n getOpenAPISpec(): Promise<OpenAPISpec>;\n executeCommand(\n path: string,\n method: string,\n params: Record<string, string>,\n headers?: Record<string, string>,\n ): Promise<ExecutionResponse>;\n lookupFilters?(\n path: string,\n method: string,\n params: Record<string, string>,\n headers?: Record<string, string>,\n ): Promise<OperationLookupResponse>;\n lookupFilterOptions?(\n path: string,\n method: string,\n filterKey: string,\n query: string,\n // Extra query params merged into the lookup request (e.g. a scope filter\n // derived from a sibling form field). Lets a form-field lookup narrow the\n // option set beyond the search term.\n extraParams?: Record<string, string>,\n ): Promise<OperationLookupFilter>;\n // getSchema fetches a resource's JSON Schema via content negotiation; undefined\n // when the resource exposes none. submitForm sends a nested JSON body (create\n // POST / update PUT) preserving nested objects and arrays. Both are optional so\n // alternative client implementations can omit schema-driven forms.\n getSchema?(path: string): Promise<JsonSchemaObject | undefined>;\n submitForm?(\n path: string,\n method: string,\n body: Record<string, unknown>,\n headers?: Record<string, string>,\n ): Promise<ExecutionResponse>;\n}\n\nexport function useOpenAPI(client: OperationsApiClient) {\n return useQuery<OpenAPISpec>({\n queryKey: [\"openapi-spec\"],\n queryFn: () => client.getOpenAPISpec(),\n staleTime: 5 * 60 * 1000,\n });\n}\n\nexport function useOperations(client: OperationsApiClient) {\n const { data: spec, ...rest } = useOpenAPI(client);\n\n const operations: ResolvedOperation[] = [];\n if (spec) {\n for (const [path, methods] of Object.entries(spec.paths)) {\n for (const [method, operation] of Object.entries(methods)) {\n operations.push({ path, method, operation });\n }\n }\n }\n\n return { operations, spec, ...rest };\n}\n\nexport function useOperationById(client: OperationsApiClient, operationId: string | undefined) {\n const { operations, ...rest } = useOperations(client);\n const operation = operationId\n ? operations.find((op) => op.operation.operationId === operationId)\n : undefined;\n return { operation, ...rest };\n}\n"],"names":["useQuery"],"mappings":";;;AA+CO,SAAS,WAAW,QAA6B;AACtD,SAAOA,oBAAsB;AAAA,IAC3B,UAAU,CAAC,cAAc;AAAA,IACzB,SAAS,MAAM,OAAO,eAAA;AAAA,IACtB,WAAW,IAAI,KAAK;AAAA,EAAA,CACrB;AACH;AAEO,SAAS,cAAc,QAA6B;AACzD,QAAM,EAAE,MAAM,MAAM,GAAG,KAAA,IAAS,WAAW,MAAM;AAEjD,QAAM,aAAkC,CAAA;AACxC,MAAI,MAAM;AACR,eAAW,CAAC,MAAM,OAAO,KAAK,OAAO,QAAQ,KAAK,KAAK,GAAG;AACxD,iBAAW,CAAC,QAAQ,SAAS,KAAK,OAAO,QAAQ,OAAO,GAAG;AACzD,mBAAW,KAAK,EAAE,MAAM,QAAQ,WAAW;AAAA,MAC7C;AAAA,IACF;AAAA,EACF;AAEA,SAAO,EAAE,YAAY,MAAM,GAAG,KAAA;AAChC;AAEO,SAAS,iBAAiB,QAA6B,aAAiC;AAC7F,QAAM,EAAE,YAAY,GAAG,KAAA,IAAS,cAAc,MAAM;AACpD,QAAM,YAAY,cACd,WAAW,KAAK,CAAC,OAAO,GAAG,UAAU,gBAAgB,WAAW,IAChE;AACJ,SAAO,EAAE,WAAW,GAAG,KAAA;AACzB;;;;"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { JsonSchemaObject } from '../components/json-schema-form-types';
|
|
1
2
|
import { ExecutionResponse, OpenAPISpec, OperationLookupFilter, OperationLookupResponse, ResolvedOperation } from './types';
|
|
2
3
|
export interface OperationsApiClient {
|
|
3
4
|
getOpenAPISpec(): Promise<OpenAPISpec>;
|
|
4
5
|
executeCommand(path: string, method: string, params: Record<string, string>, headers?: Record<string, string>): Promise<ExecutionResponse>;
|
|
5
6
|
lookupFilters?(path: string, method: string, params: Record<string, string>, headers?: Record<string, string>): Promise<OperationLookupResponse>;
|
|
6
|
-
lookupFilterOptions?(path: string, method: string, filterKey: string, query: string): Promise<OperationLookupFilter>;
|
|
7
|
+
lookupFilterOptions?(path: string, method: string, filterKey: string, query: string, extraParams?: Record<string, string>): Promise<OperationLookupFilter>;
|
|
8
|
+
getSchema?(path: string): Promise<JsonSchemaObject | undefined>;
|
|
9
|
+
submitForm?(path: string, method: string, body: Record<string, unknown>, headers?: Record<string, string>): Promise<ExecutionResponse>;
|
|
7
10
|
}
|
|
8
11
|
export declare function useOpenAPI(client: OperationsApiClient): import('@tanstack/react-query').UseQueryResult<OpenAPISpec, Error>;
|
|
9
12
|
export declare function useOperations(client: OperationsApiClient): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOperations.d.ts","sourceRoot":"","sources":["../../src/rpc/useOperations.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,iBAAiB,EACjB,WAAW,EACX,qBAAqB,EACrB,uBAAuB,EACvB,iBAAiB,EAClB,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,mBAAmB;IAClC,cAAc,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC;IACvC,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@@
|
|
|
1
|
-
{"version":3,"file":"useOperations.js","sources":["../../src/rpc/useOperations.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport type {\n ExecutionResponse,\n OpenAPISpec,\n OperationLookupFilter,\n OperationLookupResponse,\n ResolvedOperation,\n} from \"./types\";\n\nexport interface OperationsApiClient {\n getOpenAPISpec(): Promise<OpenAPISpec>;\n executeCommand(\n path: string,\n method: string,\n params: Record<string, string>,\n headers?: Record<string, string>,\n ): Promise<ExecutionResponse>;\n lookupFilters?(\n path: string,\n method: string,\n params: Record<string, string>,\n headers?: Record<string, string>,\n ): Promise<OperationLookupResponse>;\n lookupFilterOptions?(\n path: string,\n method: string,\n filterKey: string,\n query: string,\n ): Promise<OperationLookupFilter>;\n}\n\nexport function useOpenAPI(client: OperationsApiClient) {\n return useQuery<OpenAPISpec>({\n queryKey: [\"openapi-spec\"],\n queryFn: () => client.getOpenAPISpec(),\n staleTime: 5 * 60 * 1000,\n });\n}\n\nexport function useOperations(client: OperationsApiClient) {\n const { data: spec, ...rest } = useOpenAPI(client);\n\n const operations: ResolvedOperation[] = [];\n if (spec) {\n for (const [path, methods] of Object.entries(spec.paths)) {\n for (const [method, operation] of Object.entries(methods)) {\n operations.push({ path, method, operation });\n }\n }\n }\n\n return { operations, spec, ...rest };\n}\n\nexport function useOperationById(client: OperationsApiClient, operationId: string | undefined) {\n const { operations, ...rest } = useOperations(client);\n const operation = operationId\n ? operations.find((op) => op.operation.operationId === operationId)\n : undefined;\n return { operation, ...rest };\n}\n"],"names":[],"mappings":";AA+
|
|
1
|
+
{"version":3,"file":"useOperations.js","sources":["../../src/rpc/useOperations.ts"],"sourcesContent":["import { useQuery } from \"@tanstack/react-query\";\nimport type { JsonSchemaObject } from \"../components/json-schema-form-types\";\nimport type {\n ExecutionResponse,\n OpenAPISpec,\n OperationLookupFilter,\n OperationLookupResponse,\n ResolvedOperation,\n} from \"./types\";\n\nexport interface OperationsApiClient {\n getOpenAPISpec(): Promise<OpenAPISpec>;\n executeCommand(\n path: string,\n method: string,\n params: Record<string, string>,\n headers?: Record<string, string>,\n ): Promise<ExecutionResponse>;\n lookupFilters?(\n path: string,\n method: string,\n params: Record<string, string>,\n headers?: Record<string, string>,\n ): Promise<OperationLookupResponse>;\n lookupFilterOptions?(\n path: string,\n method: string,\n filterKey: string,\n query: string,\n // Extra query params merged into the lookup request (e.g. a scope filter\n // derived from a sibling form field). Lets a form-field lookup narrow the\n // option set beyond the search term.\n extraParams?: Record<string, string>,\n ): Promise<OperationLookupFilter>;\n // getSchema fetches a resource's JSON Schema via content negotiation; undefined\n // when the resource exposes none. submitForm sends a nested JSON body (create\n // POST / update PUT) preserving nested objects and arrays. Both are optional so\n // alternative client implementations can omit schema-driven forms.\n getSchema?(path: string): Promise<JsonSchemaObject | undefined>;\n submitForm?(\n path: string,\n method: string,\n body: Record<string, unknown>,\n headers?: Record<string, string>,\n ): Promise<ExecutionResponse>;\n}\n\nexport function useOpenAPI(client: OperationsApiClient) {\n return useQuery<OpenAPISpec>({\n queryKey: [\"openapi-spec\"],\n queryFn: () => client.getOpenAPISpec(),\n staleTime: 5 * 60 * 1000,\n });\n}\n\nexport function useOperations(client: OperationsApiClient) {\n const { data: spec, ...rest } = useOpenAPI(client);\n\n const operations: ResolvedOperation[] = [];\n if (spec) {\n for (const [path, methods] of Object.entries(spec.paths)) {\n for (const [method, operation] of Object.entries(methods)) {\n operations.push({ path, method, operation });\n }\n }\n }\n\n return { operations, spec, ...rest };\n}\n\nexport function useOperationById(client: OperationsApiClient, operationId: string | undefined) {\n const { operations, ...rest } = useOperations(client);\n const operation = operationId\n ? operations.find((op) => op.operation.operationId === operationId)\n : undefined;\n return { operation, ...rest };\n}\n"],"names":[],"mappings":";AA+CO,SAAS,WAAW,QAA6B;AACtD,SAAO,SAAsB;AAAA,IAC3B,UAAU,CAAC,cAAc;AAAA,IACzB,SAAS,MAAM,OAAO,eAAA;AAAA,IACtB,WAAW,IAAI,KAAK;AAAA,EAAA,CACrB;AACH;AAEO,SAAS,cAAc,QAA6B;AACzD,QAAM,EAAE,MAAM,MAAM,GAAG,KAAA,IAAS,WAAW,MAAM;AAEjD,QAAM,aAAkC,CAAA;AACxC,MAAI,MAAM;AACR,eAAW,CAAC,MAAM,OAAO,KAAK,OAAO,QAAQ,KAAK,KAAK,GAAG;AACxD,iBAAW,CAAC,QAAQ,SAAS,KAAK,OAAO,QAAQ,OAAO,GAAG;AACzD,mBAAW,KAAK,EAAE,MAAM,QAAQ,WAAW;AAAA,MAC7C;AAAA,IACF;AAAA,EACF;AAEA,SAAO,EAAE,YAAY,MAAM,GAAG,KAAA;AAChC;AAEO,SAAS,iBAAiB,QAA6B,aAAiC;AAC7F,QAAM,EAAE,YAAY,GAAG,KAAA,IAAS,cAAc,MAAM;AACpD,QAAM,YAAY,cACd,WAAW,KAAK,CAAC,OAAO,GAAG,UAAU,gBAAgB,WAAW,IAChE;AACJ,SAAO,EAAE,WAAW,GAAG,KAAA;AACzB;"}
|
package/dist/rpc.cjs
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const OperationCatalog = require("./rpc/OperationCatalog.cjs");
|
|
4
4
|
const EntityExplorerApp = require("./rpc/EntityExplorerApp.cjs");
|
|
5
|
-
const AcceptPicker = require("./rpc/AcceptPicker.cjs");
|
|
6
5
|
const acceptOptions = require("./rpc/accept-options.cjs");
|
|
6
|
+
const SchemaActionForm = require("./rpc/SchemaActionForm.cjs");
|
|
7
7
|
const CommandForm = require("./rpc/CommandForm.cjs");
|
|
8
8
|
const commandFormUtils = require("./rpc/command-form-utils.cjs");
|
|
9
9
|
const CommandOutput = require("./rpc/CommandOutput.cjs");
|
|
@@ -12,6 +12,7 @@ const InlineError = require("./rpc/InlineError.cjs");
|
|
|
12
12
|
const OperationActionDialog = require("./rpc/OperationActionDialog.cjs");
|
|
13
13
|
const OperationEntityPage = require("./rpc/OperationEntityPage.cjs");
|
|
14
14
|
const OperationCommandPage = require("./rpc/OperationCommandPage.cjs");
|
|
15
|
+
const OperationResultView = require("./rpc/OperationResultView.cjs");
|
|
15
16
|
const EndpointList = require("./rpc/EndpointList.cjs");
|
|
16
17
|
const useOperations = require("./rpc/useOperations.cjs");
|
|
17
18
|
const apiClient = require("./rpc/apiClient.cjs");
|
|
@@ -23,9 +24,9 @@ const RouterProvider = require("./rpc/RouterProvider.cjs");
|
|
|
23
24
|
const types = require("./rpc/types.cjs");
|
|
24
25
|
exports.OperationCatalog = OperationCatalog.OperationCatalog;
|
|
25
26
|
exports.EntityExplorerApp = EntityExplorerApp.EntityExplorerApp;
|
|
26
|
-
exports.AcceptPicker = AcceptPicker.AcceptPicker;
|
|
27
27
|
exports.ACCEPT_OPTIONS = acceptOptions.ACCEPT_OPTIONS;
|
|
28
28
|
exports.VIEW_OPTIONS = acceptOptions.VIEW_OPTIONS;
|
|
29
|
+
exports.SchemaActionForm = SchemaActionForm.SchemaActionForm;
|
|
29
30
|
exports.CommandForm = CommandForm.CommandForm;
|
|
30
31
|
exports.normalizeParameters = commandFormUtils.normalizeParameters;
|
|
31
32
|
exports.pathParamNames = commandFormUtils.pathParamNames;
|
|
@@ -36,6 +37,7 @@ exports.InlineError = InlineError.InlineError;
|
|
|
36
37
|
exports.OperationActionDialog = OperationActionDialog.OperationActionDialog;
|
|
37
38
|
exports.OperationEntityPage = OperationEntityPage.OperationEntityPage;
|
|
38
39
|
exports.OperationCommandPage = OperationCommandPage.OperationCommandPage;
|
|
40
|
+
exports.OperationResultView = OperationResultView.OperationResultView;
|
|
39
41
|
exports.EndpointList = EndpointList.EndpointList;
|
|
40
42
|
exports.useOpenAPI = useOperations.useOpenAPI;
|
|
41
43
|
exports.useOperationById = useOperations.useOperationById;
|
package/dist/rpc.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rpc.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/rpc.d.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
export { OperationCatalog, type OperationCatalogProps } from './rpc/OperationCatalog';
|
|
2
|
-
export { EntityExplorerApp, type EntityExplorerAppProps } from './rpc/EntityExplorerApp';
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
1
|
+
export { OperationCatalog, type OperationCatalogProps, } from './rpc/OperationCatalog';
|
|
2
|
+
export { EntityExplorerApp, type EntityExplorerAppProps, } from './rpc/EntityExplorerApp';
|
|
3
|
+
export { ACCEPT_OPTIONS, VIEW_OPTIONS, type AcceptOption, type AcceptValue, } from './rpc/accept-options';
|
|
4
|
+
export { SchemaActionForm, type SchemaActionFormProps, type FormActionContext, type FormActionsRenderer, } from './rpc/SchemaActionForm';
|
|
5
5
|
export { CommandForm, type CommandFormProps } from './rpc/CommandForm';
|
|
6
6
|
export { normalizeParameters, pathParamNames, submitValue, } from './rpc/command-form-utils';
|
|
7
7
|
export { CommandOutput, type CommandOutputProps } from './rpc/CommandOutput';
|
|
8
8
|
export { FilterForm, type FilterFormProps } from './rpc/FilterForm';
|
|
9
9
|
export { InlineError, type InlineErrorProps } from './rpc/InlineError';
|
|
10
10
|
export { OperationActionDialog, type OperationActionDialogProps, } from './rpc/OperationActionDialog';
|
|
11
|
-
export { OperationEntityPage, type OperationEntityPageProps } from './rpc/OperationEntityPage';
|
|
12
|
-
export { OperationCommandPage, type OperationCommandPageProps } from './rpc/OperationCommandPage';
|
|
11
|
+
export { OperationEntityPage, type OperationEntityPageProps, } from './rpc/OperationEntityPage';
|
|
12
|
+
export { OperationCommandPage, type OperationCommandPageProps, } from './rpc/OperationCommandPage';
|
|
13
|
+
export { OperationResultView, type OperationResultViewProps, type OperationResultFilterConfig, type ResultRenderer, type ResultRenderContext, } from './rpc/OperationResultView';
|
|
13
14
|
export { EndpointList, type EndpointListProps, type RenderLink, type RenderLinkArgs, } from './rpc/EndpointList';
|
|
14
15
|
export { useOpenAPI, useOperations, useOperationById, type OperationsApiClient, } from './rpc/useOperations';
|
|
15
16
|
export { createOperationsApiClient, OperationsApiClientError, type CreateOperationsApiClientOptions, type OperationApiClientContext, type OperationDefaultParams, type OperationHeadersProvider, type SharedOperationsApiClient, } from './rpc/apiClient';
|
package/dist/rpc.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc.d.ts","sourceRoot":"","sources":["../src/rpc.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"rpc.d.ts","sourceRoot":"","sources":["../src/rpc.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,GAC3B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,iBAAiB,EACjB,KAAK,sBAAsB,GAC5B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,cAAc,EACd,YAAY,EACZ,KAAK,YAAY,EACjB,KAAK,WAAW,GACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,GACzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,WAAW,GACZ,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EACL,q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iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,iBAAiB,GACvB,MAAM,aAAa,CAAC"}
|
package/dist/rpc.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OperationCatalog } from "./rpc/OperationCatalog.js";
|
|
2
2
|
import { EntityExplorerApp } from "./rpc/EntityExplorerApp.js";
|
|
3
|
-
import { AcceptPicker } from "./rpc/AcceptPicker.js";
|
|
4
3
|
import { ACCEPT_OPTIONS, VIEW_OPTIONS } from "./rpc/accept-options.js";
|
|
4
|
+
import { SchemaActionForm } from "./rpc/SchemaActionForm.js";
|
|
5
5
|
import { CommandForm } from "./rpc/CommandForm.js";
|
|
6
6
|
import { normalizeParameters, pathParamNames, submitValue } from "./rpc/command-form-utils.js";
|
|
7
7
|
import { CommandOutput } from "./rpc/CommandOutput.js";
|
|
@@ -10,6 +10,7 @@ import { InlineError } from "./rpc/InlineError.js";
|
|
|
10
10
|
import { OperationActionDialog } from "./rpc/OperationActionDialog.js";
|
|
11
11
|
import { OperationEntityPage } from "./rpc/OperationEntityPage.js";
|
|
12
12
|
import { OperationCommandPage } from "./rpc/OperationCommandPage.js";
|
|
13
|
+
import { OperationResultView } from "./rpc/OperationResultView.js";
|
|
13
14
|
import { EndpointList } from "./rpc/EndpointList.js";
|
|
14
15
|
import { useOpenAPI, useOperationById, useOperations } from "./rpc/useOperations.js";
|
|
15
16
|
import { OperationsApiClientError, createOperationsApiClient } from "./rpc/apiClient.js";
|
|
@@ -21,7 +22,6 @@ import { RouterProvider } from "./rpc/RouterProvider.js";
|
|
|
21
22
|
import { isPositionalParam } from "./rpc/types.js";
|
|
22
23
|
export {
|
|
23
24
|
ACCEPT_OPTIONS,
|
|
24
|
-
AcceptPicker,
|
|
25
25
|
CommandForm,
|
|
26
26
|
CommandOutput,
|
|
27
27
|
EndpointList,
|
|
@@ -32,8 +32,10 @@ export {
|
|
|
32
32
|
OperationCatalog,
|
|
33
33
|
OperationCommandPage,
|
|
34
34
|
OperationEntityPage,
|
|
35
|
+
OperationResultView,
|
|
35
36
|
OperationsApiClientError,
|
|
36
37
|
RouterProvider,
|
|
38
|
+
SchemaActionForm,
|
|
37
39
|
VIEW_OPTIONS,
|
|
38
40
|
buildCommandHref,
|
|
39
41
|
createOperationsApiClient,
|
package/dist/rpc.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rpc.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;"}
|