@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
|
@@ -3,17 +3,16 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const react = require("react");
|
|
5
5
|
const reactQuery = require("@tanstack/react-query");
|
|
6
|
-
const FilterBar = require("../components/FilterBar.cjs");
|
|
7
6
|
const MethodBadge = require("../data/MethodBadge.cjs");
|
|
8
|
-
const AcceptPicker = require("./AcceptPicker.cjs");
|
|
9
7
|
const CommandForm = require("./CommandForm.cjs");
|
|
10
8
|
const commandFormUtils = require("./command-form-utils.cjs");
|
|
11
|
-
const CommandOutput = require("./CommandOutput.cjs");
|
|
12
9
|
const formMetadata = require("./formMetadata.cjs");
|
|
13
10
|
const InlineError = require("./InlineError.cjs");
|
|
14
11
|
const OperationActionDialog = require("./OperationActionDialog.cjs");
|
|
15
|
-
const
|
|
12
|
+
const OperationResultView = require("./OperationResultView.cjs");
|
|
13
|
+
const rowNavigation = require("./rowNavigation.cjs");
|
|
16
14
|
const useOperations = require("./useOperations.cjs");
|
|
15
|
+
const RESULT_ACCEPT = "application/clicky+json";
|
|
17
16
|
const EMPTY_PARAMETER_VALUES = {};
|
|
18
17
|
function OperationCommandPage({
|
|
19
18
|
client,
|
|
@@ -26,18 +25,19 @@ function OperationCommandPage({
|
|
|
26
25
|
backLabel = "Back",
|
|
27
26
|
renderLink,
|
|
28
27
|
onNavigate,
|
|
28
|
+
commandRuntime,
|
|
29
29
|
hideLockedPathFilters = Boolean(providedOperation),
|
|
30
30
|
className
|
|
31
31
|
}) {
|
|
32
|
-
const lookup = useOperations.useOperationById(
|
|
32
|
+
const lookup = useOperations.useOperationById(
|
|
33
|
+
client,
|
|
34
|
+
providedOperation ? void 0 : operationId
|
|
35
|
+
);
|
|
33
36
|
const operation = providedOperation ?? lookup.operation;
|
|
34
37
|
const isLoading = providedOperation ? false : lookup.isLoading;
|
|
35
|
-
const [accept, setAccept] = react.useState("application/clicky+json");
|
|
36
|
-
const [previewMode, setPreviewMode] = react.useState("hidden");
|
|
37
38
|
const [isExecuting, setIsExecuting] = react.useState(false);
|
|
38
39
|
const [result, setResult] = react.useState(null);
|
|
39
40
|
const [error, setError] = react.useState(null);
|
|
40
|
-
const [submitError, setSubmitError] = react.useState("");
|
|
41
41
|
const [hasAutoRun, setHasAutoRun] = react.useState(false);
|
|
42
42
|
const parameters = (operation == null ? void 0 : operation.operation.parameters) ?? [];
|
|
43
43
|
const isGet = ((operation == null ? void 0 : operation.method) ?? "").toUpperCase() === "GET";
|
|
@@ -59,7 +59,10 @@ function OperationCommandPage({
|
|
|
59
59
|
parameters,
|
|
60
60
|
operation.method,
|
|
61
61
|
{},
|
|
62
|
-
|
|
62
|
+
{
|
|
63
|
+
...readQueryParameterValuesFromUrl(parameters),
|
|
64
|
+
...stripRunnerParams(initialValues)
|
|
65
|
+
}
|
|
63
66
|
) : stripRunnerParams(initialValues),
|
|
64
67
|
[initialValues, operation == null ? void 0 : operation.method, parameterSignature]
|
|
65
68
|
);
|
|
@@ -85,11 +88,19 @@ function OperationCommandPage({
|
|
|
85
88
|
const [values, setValues] = react.useState(effectiveInitialValues);
|
|
86
89
|
react.useEffect(() => {
|
|
87
90
|
setValues(effectiveInitialValues);
|
|
88
|
-
setSubmitError("");
|
|
89
91
|
}, [effectiveInitialValues]);
|
|
90
92
|
const debouncedValues = formMetadata.useDebouncedRecord(values, 250);
|
|
93
|
+
react.useEffect(() => {
|
|
94
|
+
if (!isGet || !operation) return;
|
|
95
|
+
writeQueryParameterValuesToUrl(debouncedValues, parameters);
|
|
96
|
+
}, [isGet, operationKey, debouncedValues, parameterSignature]);
|
|
91
97
|
const lookupQuery = reactQuery.useQuery({
|
|
92
|
-
queryKey: [
|
|
98
|
+
queryKey: [
|
|
99
|
+
"operation-query-lookup",
|
|
100
|
+
operation == null ? void 0 : operation.method,
|
|
101
|
+
operation == null ? void 0 : operation.path,
|
|
102
|
+
debouncedValues
|
|
103
|
+
],
|
|
93
104
|
queryFn: async () => {
|
|
94
105
|
var _a;
|
|
95
106
|
if (!operation) return { filters: {} };
|
|
@@ -112,30 +123,19 @@ function OperationCommandPage({
|
|
|
112
123
|
lockedValues: lockedPathValues,
|
|
113
124
|
hideLocked: hideLockedPathFilters
|
|
114
125
|
});
|
|
115
|
-
}, [
|
|
126
|
+
}, [
|
|
127
|
+
isGet,
|
|
128
|
+
parameters,
|
|
129
|
+
values,
|
|
130
|
+
lookupQuery.data,
|
|
131
|
+
lockedPathValues,
|
|
132
|
+
hideLockedPathFilters
|
|
133
|
+
]);
|
|
116
134
|
const dataTablePagination = react.useMemo(
|
|
117
135
|
() => formMetadata.dataTablePaginationFromForm(formConfig.pagination, result),
|
|
118
136
|
[formConfig.pagination, result]
|
|
119
137
|
);
|
|
120
138
|
const lastSubmittedSignature = react.useRef("");
|
|
121
|
-
function handleManualSubmit() {
|
|
122
|
-
if (!operation) return;
|
|
123
|
-
const merged = { ...values, ...lockedPathValues };
|
|
124
|
-
const missingRequired = parameters.filter((param) => {
|
|
125
|
-
if (!param.required) return false;
|
|
126
|
-
return (merged[param.name] ?? "").trim() === "";
|
|
127
|
-
});
|
|
128
|
-
if (missingRequired.length > 0) {
|
|
129
|
-
setSubmitError(
|
|
130
|
-
`Missing required fields: ${missingRequired.map((param) => formMetadata.titleCase(param.name)).join(", ")}`
|
|
131
|
-
);
|
|
132
|
-
return;
|
|
133
|
-
}
|
|
134
|
-
setSubmitError("");
|
|
135
|
-
setHasAutoRun(true);
|
|
136
|
-
lastSubmittedSignature.current = JSON.stringify(formMetadata.pruneParameterValues(merged));
|
|
137
|
-
void executeOperation(merged);
|
|
138
|
-
}
|
|
139
139
|
async function executeOperation(values2) {
|
|
140
140
|
if (!operation) return;
|
|
141
141
|
setIsExecuting(true);
|
|
@@ -145,7 +145,7 @@ function OperationCommandPage({
|
|
|
145
145
|
operation.path,
|
|
146
146
|
operation.method,
|
|
147
147
|
formMetadata.packParameterValues(values2, operation.operation.parameters ?? []),
|
|
148
|
-
{ Accept:
|
|
148
|
+
{ Accept: RESULT_ACCEPT }
|
|
149
149
|
);
|
|
150
150
|
setResult(response);
|
|
151
151
|
} catch (err) {
|
|
@@ -169,10 +169,11 @@ function OperationCommandPage({
|
|
|
169
169
|
});
|
|
170
170
|
if (missingRequired.length > 0) return;
|
|
171
171
|
setHasAutoRun(true);
|
|
172
|
-
lastSubmittedSignature.current = JSON.stringify(
|
|
172
|
+
lastSubmittedSignature.current = JSON.stringify(
|
|
173
|
+
formMetadata.pruneParameterValues(effectiveInitialValues)
|
|
174
|
+
);
|
|
173
175
|
void executeOperation(effectiveInitialValues);
|
|
174
176
|
}, [
|
|
175
|
-
accept,
|
|
176
177
|
effectiveAutoRun,
|
|
177
178
|
effectiveInitialValues,
|
|
178
179
|
hasAutoRun,
|
|
@@ -191,28 +192,25 @@ function OperationCommandPage({
|
|
|
191
192
|
if (lastSubmittedSignature.current === signature) return;
|
|
192
193
|
lastSubmittedSignature.current = signature;
|
|
193
194
|
void executeOperation(merged);
|
|
194
|
-
}, [
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
},
|
|
202
|
-
[detailOperation]
|
|
203
|
-
);
|
|
204
|
-
const handleTableRowClick = react.useCallback(
|
|
205
|
-
(row) => {
|
|
206
|
-
const href = getRowDetailHref(row);
|
|
207
|
-
if (href) onNavigate == null ? void 0 : onNavigate(href);
|
|
208
|
-
},
|
|
209
|
-
[getRowDetailHref, onNavigate]
|
|
210
|
-
);
|
|
195
|
+
}, [
|
|
196
|
+
isGet,
|
|
197
|
+
hasAutoRun,
|
|
198
|
+
debouncedValues,
|
|
199
|
+
lockedPathValues,
|
|
200
|
+
parameterSignature
|
|
201
|
+
]);
|
|
211
202
|
const backLink = backHref == null ? null : renderLink ? renderLink({
|
|
212
203
|
to: backHref,
|
|
213
204
|
className: "text-sm text-primary underline-offset-4 hover:underline",
|
|
214
205
|
children: backLabel
|
|
215
|
-
}) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
206
|
+
}) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
207
|
+
"a",
|
|
208
|
+
{
|
|
209
|
+
href: backHref,
|
|
210
|
+
className: "text-sm text-primary underline-offset-4 hover:underline",
|
|
211
|
+
children: backLabel
|
|
212
|
+
}
|
|
213
|
+
);
|
|
216
214
|
if (isLoading) {
|
|
217
215
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-muted-foreground", children: "Loading operation..." });
|
|
218
216
|
}
|
|
@@ -226,7 +224,6 @@ function OperationCommandPage({
|
|
|
226
224
|
] });
|
|
227
225
|
}
|
|
228
226
|
const { path, method, operation: op } = operation;
|
|
229
|
-
const preview = buildOperationPreview(operation, effectiveInitialValues, accept, previewMode);
|
|
230
227
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: className ?? "min-w-0 flex-1 space-y-6 p-6", children: [
|
|
231
228
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-4", children: [
|
|
232
229
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
@@ -239,102 +236,64 @@ function OperationCommandPage({
|
|
|
239
236
|
op.operationId && op.summary && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 font-mono text-xs text-muted-foreground", children: op.operationId }),
|
|
240
237
|
op.description && op.description !== op.summary && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: op.description })
|
|
241
238
|
] }),
|
|
242
|
-
/* @__PURE__ */ jsxRuntime.
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
}
|
|
253
|
-
)
|
|
254
|
-
] }),
|
|
255
|
-
relatedOperations.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap justify-end gap-2", children: relatedOperations.map(
|
|
256
|
-
(related) => related.href ? renderLink ? renderLink({
|
|
257
|
-
key: `${related.operation.method}:${related.operation.path}`,
|
|
258
|
-
to: related.href,
|
|
239
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex shrink-0 flex-col items-end gap-3", children: relatedOperations.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap justify-end gap-2", children: relatedOperations.map(
|
|
240
|
+
(related) => related.href ? renderLink ? renderLink({
|
|
241
|
+
key: `${related.operation.method}:${related.operation.path}`,
|
|
242
|
+
to: related.href,
|
|
243
|
+
className: "inline-flex h-8 items-center justify-center gap-2 rounded-md border border-input bg-background px-3 text-xs font-medium hover:bg-accent hover:text-accent-foreground",
|
|
244
|
+
children: related.label
|
|
245
|
+
}) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
246
|
+
"a",
|
|
247
|
+
{
|
|
248
|
+
href: related.href,
|
|
259
249
|
className: "inline-flex h-8 items-center justify-center gap-2 rounded-md border border-input bg-background px-3 text-xs font-medium hover:bg-accent hover:text-accent-foreground",
|
|
260
250
|
children: related.label
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
{
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
defaultAccept: accept,
|
|
277
|
-
...onNavigate ? { onNavigateAction: onNavigate } : {}
|
|
278
|
-
},
|
|
279
|
-
`${related.operation.method}:${related.operation.path}`
|
|
280
|
-
)
|
|
281
|
-
) })
|
|
282
|
-
] })
|
|
251
|
+
},
|
|
252
|
+
`${related.operation.method}:${related.operation.path}`
|
|
253
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
254
|
+
OperationActionDialog.OperationActionDialog,
|
|
255
|
+
{
|
|
256
|
+
operation: related.operation,
|
|
257
|
+
client,
|
|
258
|
+
initialValues: lockedPathValues,
|
|
259
|
+
label: related.label,
|
|
260
|
+
defaultAccept: RESULT_ACCEPT,
|
|
261
|
+
...onNavigate ? { onNavigateAction: onNavigate } : {}
|
|
262
|
+
},
|
|
263
|
+
`${related.operation.method}:${related.operation.path}`
|
|
264
|
+
)
|
|
265
|
+
) }) })
|
|
283
266
|
] }),
|
|
284
|
-
/* @__PURE__ */ jsxRuntime.
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
filters: formConfig.filters,
|
|
299
|
-
...!effectiveAutoRun ? { onApply: () => handleManualSubmit() } : {},
|
|
300
|
-
applyLabel: "Execute request",
|
|
301
|
-
isPending: isExecuting,
|
|
302
|
-
...formConfig.timeRange ? { timeRange: formConfig.timeRange } : {}
|
|
303
|
-
}
|
|
304
|
-
),
|
|
305
|
-
submitError && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-md border border-destructive/40 bg-destructive/5 p-3 text-sm text-destructive", children: submitError })
|
|
306
|
-
] }) : null
|
|
307
|
-
) : null : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg border p-4", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
308
|
-
CommandForm.CommandForm,
|
|
309
|
-
{
|
|
310
|
-
parameters,
|
|
311
|
-
onExecute: (params) => executeOperation(params),
|
|
312
|
-
isPending: isExecuting,
|
|
313
|
-
method,
|
|
314
|
-
path,
|
|
315
|
-
accept,
|
|
316
|
-
initialValues: effectiveInitialValues
|
|
317
|
-
}
|
|
318
|
-
) }),
|
|
319
|
-
preview && /* @__PURE__ */ jsxRuntime.jsx("pre", { className: "overflow-x-auto rounded-md bg-muted p-3 font-mono text-xs", children: preview })
|
|
320
|
-
] }),
|
|
321
|
-
error ? /* @__PURE__ */ jsxRuntime.jsx(InlineError.InlineError, { title: `Failed to load ${path} as ${accept}`, error }) : isExecuting || result ? /* @__PURE__ */ jsxRuntime.jsx("div", { role: "region", "aria-label": "Response body", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
322
|
-
CommandOutput.CommandOutput,
|
|
267
|
+
method.toUpperCase() !== "GET" && /* @__PURE__ */ jsxRuntime.jsx("section", { className: "space-y-3", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg border p-4", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
268
|
+
CommandForm.CommandForm,
|
|
269
|
+
{
|
|
270
|
+
parameters,
|
|
271
|
+
onExecute: (params) => executeOperation(params),
|
|
272
|
+
isPending: isExecuting,
|
|
273
|
+
method,
|
|
274
|
+
path,
|
|
275
|
+
accept: RESULT_ACCEPT,
|
|
276
|
+
initialValues: effectiveInitialValues
|
|
277
|
+
}
|
|
278
|
+
) }) }),
|
|
279
|
+
error ? /* @__PURE__ */ jsxRuntime.jsx(InlineError.InlineError, { title: `Failed to load ${path}`, error }) : isExecuting || result ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
280
|
+
OperationResultView.OperationResultView,
|
|
323
281
|
{
|
|
324
282
|
response: result,
|
|
325
283
|
loading: isExecuting,
|
|
326
284
|
loadingMessage: "Loading execution results…",
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
285
|
+
ariaLabel: "Response body",
|
|
286
|
+
detailOperation,
|
|
287
|
+
...commandRuntime ? { commandRuntime } : {},
|
|
288
|
+
...isGet && effectiveAutoRun ? {
|
|
289
|
+
filterConfig: {
|
|
290
|
+
filters: formConfig.filters,
|
|
291
|
+
...formConfig.timeRange ? { timeRange: formConfig.timeRange } : {}
|
|
292
|
+
}
|
|
332
293
|
} : {},
|
|
333
|
-
...isGet && effectiveAutoRun && formConfig.filters.length > 0 ? { externalFilters: formConfig.filters } : {},
|
|
334
|
-
...isGet && effectiveAutoRun && formConfig.timeRange ? { timeRange: formConfig.timeRange } : {},
|
|
335
294
|
...isGet && effectiveAutoRun && dataTablePagination ? { pagination: dataTablePagination } : {}
|
|
336
295
|
}
|
|
337
|
-
)
|
|
296
|
+
) : null
|
|
338
297
|
] });
|
|
339
298
|
}
|
|
340
299
|
function findRelatedOperations(current, operations, pathValues) {
|
|
@@ -349,13 +308,15 @@ function findRelatedOperations(current, operations, pathValues) {
|
|
|
349
308
|
return method === "GET" || method === "POST" || method === "PUT" || method === "DELETE";
|
|
350
309
|
}).map((related) => {
|
|
351
310
|
const method = related.method.toUpperCase();
|
|
352
|
-
const href = method === "GET" ? hrefForOperation(related, [], pathValues) : void 0;
|
|
311
|
+
const href = method === "GET" ? rowNavigation.hrefForOperation(related, [], pathValues) : void 0;
|
|
353
312
|
return {
|
|
354
313
|
operation: related,
|
|
355
314
|
label: operationLabel(related),
|
|
356
315
|
...href ? { href } : {}
|
|
357
316
|
};
|
|
358
|
-
}).filter(
|
|
317
|
+
}).filter(
|
|
318
|
+
(related) => related.operation.method.toUpperCase() !== "GET" || related.href
|
|
319
|
+
);
|
|
359
320
|
}
|
|
360
321
|
function findDetailOperation(current, operations) {
|
|
361
322
|
const method = current.method.toUpperCase();
|
|
@@ -369,28 +330,6 @@ function findDetailOperation(current, operations) {
|
|
|
369
330
|
}
|
|
370
331
|
);
|
|
371
332
|
}
|
|
372
|
-
function hrefForOperation(operation, args = [], flags = {}) {
|
|
373
|
-
let route = apiPathToRoutePath(operation.path);
|
|
374
|
-
const consumedFlags = /* @__PURE__ */ new Set();
|
|
375
|
-
commandFormUtils.pathParamNames(operation.path).forEach((name, index) => {
|
|
376
|
-
const value = flags[name] ?? args[index];
|
|
377
|
-
if (!value) return;
|
|
378
|
-
consumedFlags.add(name);
|
|
379
|
-
route = route.replace(`:${name}`, encodeURIComponent(value));
|
|
380
|
-
});
|
|
381
|
-
if (route.includes(":")) return void 0;
|
|
382
|
-
const search = new URLSearchParams();
|
|
383
|
-
for (const [key, value] of Object.entries(flags)) {
|
|
384
|
-
if (value && !consumedFlags.has(key)) search.set(key, value);
|
|
385
|
-
}
|
|
386
|
-
const query = search.toString();
|
|
387
|
-
return query ? `${route}?${query}` : route;
|
|
388
|
-
}
|
|
389
|
-
function apiPathToRoutePath(path) {
|
|
390
|
-
const cliPath = path.trim().replace(/^\/api\/v1\/?/, "").replace(/^\/+/, "").replace(/\/+$/, "");
|
|
391
|
-
if (!cliPath) return "/";
|
|
392
|
-
return `/${cliPath.replace(/\{([^}]+)\}/g, ":$1")}`;
|
|
393
|
-
}
|
|
394
333
|
function pathTemplateSatisfied(path, values) {
|
|
395
334
|
return commandFormUtils.pathParamNames(path).every((name) => Boolean(values[name]));
|
|
396
335
|
}
|
|
@@ -399,52 +338,6 @@ function operationLabel(operation) {
|
|
|
399
338
|
const actionName = ((_a = operation.operation["x-clicky"]) == null ? void 0 : _a.actionName) || operation.path.split("/").filter(Boolean).at(-1) || operation.operation.operationId || operation.method;
|
|
400
339
|
return formMetadata.titleCase(actionName.replace(/[_-]+/g, " "));
|
|
401
340
|
}
|
|
402
|
-
function buildOperationPreview(operation, values, accept, mode) {
|
|
403
|
-
if (mode === "hidden") return "";
|
|
404
|
-
if (mode === "cli") return buildCliPreview(operation, values);
|
|
405
|
-
return buildCurlPreview(operation, values, accept);
|
|
406
|
-
}
|
|
407
|
-
function buildCurlPreview(operation, values, accept) {
|
|
408
|
-
const params = operation.operation.parameters ?? [];
|
|
409
|
-
const parts = [`curl -X ${operation.method.toUpperCase()}`];
|
|
410
|
-
if (accept !== "application/json") parts.push(`-H "Accept: ${accept}"`);
|
|
411
|
-
let url = operation.path;
|
|
412
|
-
const queryParts = [];
|
|
413
|
-
for (const param of params) {
|
|
414
|
-
const value = commandFormUtils.submitValue(param, values[param.name]);
|
|
415
|
-
if (!value) continue;
|
|
416
|
-
if (param.in === "path") {
|
|
417
|
-
url = url.replace(`{${param.name}}`, encodeURIComponent(value));
|
|
418
|
-
} else if (param.in === "query") {
|
|
419
|
-
queryParts.push(`${encodeURIComponent(param.name)}=${encodeURIComponent(value)}`);
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
if (queryParts.length > 0) url += `?${queryParts.join("&")}`;
|
|
423
|
-
parts.push(`"${url}"`);
|
|
424
|
-
return parts.join(" ");
|
|
425
|
-
}
|
|
426
|
-
function buildCliPreview(operation, values) {
|
|
427
|
-
var _a;
|
|
428
|
-
const command = (_a = operation.operation["x-clicky"]) == null ? void 0 : _a.command;
|
|
429
|
-
if (!command) return buildCurlPreview(operation, values, "application/json");
|
|
430
|
-
const params = operation.operation.parameters ?? [];
|
|
431
|
-
const positionalNames = new Set(params.filter(types.isPositionalParam).map((param) => param.name));
|
|
432
|
-
const parts = [command.replaceAll("/", " ")];
|
|
433
|
-
for (const param of params) {
|
|
434
|
-
const value = commandFormUtils.submitValue(param, values[param.name]);
|
|
435
|
-
if (!value) continue;
|
|
436
|
-
if (param.in === "path" || positionalNames.has(param.name)) {
|
|
437
|
-
parts.push(shellQuote(value));
|
|
438
|
-
continue;
|
|
439
|
-
}
|
|
440
|
-
parts.push(`--${param.name}`, shellQuote(value));
|
|
441
|
-
}
|
|
442
|
-
return parts.join(" ");
|
|
443
|
-
}
|
|
444
|
-
function shellQuote(value) {
|
|
445
|
-
if (/^[a-zA-Z0-9_./:@-]+$/.test(value)) return value;
|
|
446
|
-
return `'${value.replaceAll("'", "'\\''")}'`;
|
|
447
|
-
}
|
|
448
341
|
function stripRunnerParams(values) {
|
|
449
342
|
const next = {};
|
|
450
343
|
for (const [key, value] of Object.entries(values)) {
|
|
@@ -453,23 +346,41 @@ function stripRunnerParams(values) {
|
|
|
453
346
|
}
|
|
454
347
|
return next;
|
|
455
348
|
}
|
|
456
|
-
function
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
349
|
+
function readQueryParameterValuesFromUrl(parameters) {
|
|
350
|
+
if (typeof window === "undefined") return {};
|
|
351
|
+
const queryParamNames = new Set(
|
|
352
|
+
parameters.filter((param) => param.in === "query").map((p) => p.name)
|
|
353
|
+
);
|
|
354
|
+
if (queryParamNames.size === 0) return {};
|
|
355
|
+
const values = {};
|
|
356
|
+
const search = new URLSearchParams(window.location.search);
|
|
357
|
+
for (const name of queryParamNames) {
|
|
358
|
+
const value = search.get(name);
|
|
359
|
+
if (value != null && value !== "") {
|
|
360
|
+
values[name] = value;
|
|
361
|
+
}
|
|
461
362
|
}
|
|
462
|
-
return
|
|
363
|
+
return values;
|
|
463
364
|
}
|
|
464
|
-
function
|
|
465
|
-
if (
|
|
466
|
-
|
|
467
|
-
if (
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
365
|
+
function writeQueryParameterValuesToUrl(values, parameters) {
|
|
366
|
+
if (typeof window === "undefined") return;
|
|
367
|
+
const queryParameters = parameters.filter((param) => param.in === "query");
|
|
368
|
+
if (queryParameters.length === 0) return;
|
|
369
|
+
const search = new URLSearchParams(window.location.search);
|
|
370
|
+
for (const param of queryParameters) {
|
|
371
|
+
const value = commandFormUtils.submitValue(param, values[param.name]);
|
|
372
|
+
if (value == null) {
|
|
373
|
+
search.delete(param.name);
|
|
374
|
+
} else {
|
|
375
|
+
search.set(param.name, value);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
const query = search.toString();
|
|
379
|
+
const next = `${window.location.pathname}${query ? `?${query}` : ""}${window.location.hash}`;
|
|
380
|
+
const current = `${window.location.pathname}${window.location.search}${window.location.hash}`;
|
|
381
|
+
if (next !== current) {
|
|
382
|
+
window.history.replaceState(window.history.state, "", next);
|
|
383
|
+
}
|
|
473
384
|
}
|
|
474
385
|
exports.OperationCommandPage = OperationCommandPage;
|
|
475
386
|
//# sourceMappingURL=OperationCommandPage.cjs.map
|