@flanksource/clicky-ui 0.3.21 → 0.3.22
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/NOTICE.md +14 -0
- package/README.md +8 -1
- package/dist/ai.cjs +10 -0
- package/dist/ai.cjs.map +1 -1
- package/dist/ai.js +10 -0
- package/dist/ai.js.map +1 -1
- package/dist/comments/MentionTextarea.cjs +1 -1
- package/dist/comments/MentionTextarea.cjs.map +1 -1
- package/dist/comments/MentionTextarea.js +1 -1
- package/dist/comments/MentionTextarea.js.map +1 -1
- package/dist/components/AccordionList.cjs +320 -0
- package/dist/components/AccordionList.cjs.map +1 -0
- package/dist/components/AccordionList.d.ts +93 -0
- package/dist/components/AccordionList.d.ts.map +1 -0
- package/dist/components/AccordionList.js +320 -0
- package/dist/components/AccordionList.js.map +1 -0
- package/dist/components/Combobox.cjs +41 -3
- package/dist/components/Combobox.cjs.map +1 -1
- package/dist/components/Combobox.d.ts.map +1 -1
- package/dist/components/Combobox.js +42 -4
- package/dist/components/Combobox.js.map +1 -1
- package/dist/components/ComboboxControl.cjs +6 -0
- package/dist/components/ComboboxControl.cjs.map +1 -1
- package/dist/components/ComboboxControl.d.ts +7 -3
- package/dist/components/ComboboxControl.d.ts.map +1 -1
- package/dist/components/ComboboxControl.js +6 -0
- package/dist/components/ComboboxControl.js.map +1 -1
- package/dist/components/ComboboxMenu.cjs +2 -1
- package/dist/components/ComboboxMenu.cjs.map +1 -1
- package/dist/components/ComboboxMenu.d.ts +3 -1
- package/dist/components/ComboboxMenu.d.ts.map +1 -1
- package/dist/components/ComboboxMenu.js +2 -1
- package/dist/components/ComboboxMenu.js.map +1 -1
- package/dist/components/ComboboxTags.cjs +42 -11
- package/dist/components/ComboboxTags.cjs.map +1 -1
- package/dist/components/ComboboxTags.d.ts +5 -2
- package/dist/components/ComboboxTags.d.ts.map +1 -1
- package/dist/components/ComboboxTags.js +42 -11
- package/dist/components/ComboboxTags.js.map +1 -1
- package/dist/components/ConnectionLoggingPolicy.cjs +268 -0
- package/dist/components/ConnectionLoggingPolicy.cjs.map +1 -0
- package/dist/components/ConnectionLoggingPolicy.d.ts +3 -0
- package/dist/components/ConnectionLoggingPolicy.d.ts.map +1 -0
- package/dist/components/ConnectionLoggingPolicy.js +268 -0
- package/dist/components/ConnectionLoggingPolicy.js.map +1 -0
- package/dist/components/ConnectionLoggingPolicy.model.cjs +52 -0
- package/dist/components/ConnectionLoggingPolicy.model.cjs.map +1 -0
- package/dist/components/ConnectionLoggingPolicy.model.d.ts +35 -0
- package/dist/components/ConnectionLoggingPolicy.model.d.ts.map +1 -0
- package/dist/components/ConnectionLoggingPolicy.model.js +52 -0
- package/dist/components/ConnectionLoggingPolicy.model.js.map +1 -0
- package/dist/components/DaemonSetIcon.cjs +20 -0
- package/dist/components/DaemonSetIcon.cjs.map +1 -0
- package/dist/components/DaemonSetIcon.d.ts +8 -0
- package/dist/components/DaemonSetIcon.d.ts.map +1 -0
- package/dist/components/DaemonSetIcon.js +20 -0
- package/dist/components/DaemonSetIcon.js.map +1 -0
- package/dist/components/DateField.cjs.map +1 -1
- package/dist/components/DateField.d.ts +11 -3
- package/dist/components/DateField.d.ts.map +1 -1
- package/dist/components/DateField.js.map +1 -1
- package/dist/components/DatePicker.cjs +6 -1
- package/dist/components/DatePicker.cjs.map +1 -1
- package/dist/components/DatePicker.d.ts +11 -3
- package/dist/components/DatePicker.d.ts.map +1 -1
- package/dist/components/DatePicker.js +6 -1
- package/dist/components/DatePicker.js.map +1 -1
- package/dist/components/EndpointSelector.cjs +29 -8
- package/dist/components/EndpointSelector.cjs.map +1 -1
- package/dist/components/EndpointSelector.d.ts +1 -1
- package/dist/components/EndpointSelector.d.ts.map +1 -1
- package/dist/components/EndpointSelector.js +29 -8
- package/dist/components/EndpointSelector.js.map +1 -1
- package/dist/components/EndpointSelector.model.cjs.map +1 -1
- package/dist/components/EndpointSelector.model.d.ts +5 -0
- package/dist/components/EndpointSelector.model.d.ts.map +1 -1
- package/dist/components/EndpointSelector.model.js.map +1 -1
- package/dist/components/FilterBar.cjs +43 -19
- package/dist/components/FilterBar.cjs.map +1 -1
- package/dist/components/FilterBar.d.ts +21 -1
- package/dist/components/FilterBar.d.ts.map +1 -1
- package/dist/components/FilterBar.js +41 -17
- package/dist/components/FilterBar.js.map +1 -1
- package/dist/components/InputField.cjs +14 -2
- package/dist/components/InputField.cjs.map +1 -1
- package/dist/components/InputField.d.ts +6 -0
- package/dist/components/InputField.d.ts.map +1 -1
- package/dist/components/InputField.js +14 -2
- package/dist/components/InputField.js.map +1 -1
- package/dist/components/ItemActions.cjs +87 -0
- package/dist/components/ItemActions.cjs.map +1 -0
- package/dist/components/ItemActions.d.ts +33 -0
- package/dist/components/ItemActions.d.ts.map +1 -0
- package/dist/components/ItemActions.js +87 -0
- package/dist/components/ItemActions.js.map +1 -0
- package/dist/components/JsonSchemaForm.cjs +1 -1
- package/dist/components/JsonSchemaForm.cjs.map +1 -1
- package/dist/components/JsonSchemaForm.js +1 -1
- package/dist/components/JsonSchemaForm.js.map +1 -1
- package/dist/components/MdxEditorCallout.cjs +108 -0
- package/dist/components/MdxEditorCallout.cjs.map +1 -0
- package/dist/components/MdxEditorCallout.d.ts +27 -0
- package/dist/components/MdxEditorCallout.d.ts.map +1 -0
- package/dist/components/MdxEditorCallout.js +108 -0
- package/dist/components/MdxEditorCallout.js.map +1 -0
- package/dist/components/MdxEditorField.cjs.map +1 -1
- package/dist/components/MdxEditorField.d.ts +1 -1
- package/dist/components/MdxEditorField.d.ts.map +1 -1
- package/dist/components/MdxEditorField.js.map +1 -1
- package/dist/components/MdxEditorToolbar.cjs +10 -2
- package/dist/components/MdxEditorToolbar.cjs.map +1 -1
- package/dist/components/MdxEditorToolbar.d.ts.map +1 -1
- package/dist/components/MdxEditorToolbar.js +10 -2
- package/dist/components/MdxEditorToolbar.js.map +1 -1
- package/dist/components/MultiSelect.cjs +3 -1
- package/dist/components/MultiSelect.cjs.map +1 -1
- package/dist/components/MultiSelect.d.ts.map +1 -1
- package/dist/components/MultiSelect.js +3 -1
- package/dist/components/MultiSelect.js.map +1 -1
- package/dist/components/NamespacePicker.cjs +1 -0
- package/dist/components/NamespacePicker.cjs.map +1 -1
- package/dist/components/NamespacePicker.d.ts.map +1 -1
- package/dist/components/NamespacePicker.js +1 -0
- package/dist/components/NamespacePicker.js.map +1 -1
- package/dist/components/WorkloadPicker.cjs +117 -31
- package/dist/components/WorkloadPicker.cjs.map +1 -1
- package/dist/components/WorkloadPicker.d.ts +29 -5
- package/dist/components/WorkloadPicker.d.ts.map +1 -1
- package/dist/components/WorkloadPicker.js +119 -33
- package/dist/components/WorkloadPicker.js.map +1 -1
- package/dist/components/button-variants.d.ts +1 -1
- package/dist/components/button.d.ts +1 -1
- package/dist/components/combobox-types.d.ts +13 -0
- package/dist/components/combobox-types.d.ts.map +1 -1
- package/dist/components/combobox-utils.cjs +16 -0
- package/dist/components/combobox-utils.cjs.map +1 -1
- package/dist/components/combobox-utils.d.ts +1 -0
- package/dist/components/combobox-utils.d.ts.map +1 -1
- package/dist/components/combobox-utils.js +16 -0
- package/dist/components/combobox-utils.js.map +1 -1
- package/dist/components/filter-bar-multi.cjs +1 -1
- package/dist/components/filter-bar-multi.cjs.map +1 -1
- package/dist/components/filter-bar-multi.js +1 -1
- package/dist/components/filter-bar-multi.js.map +1 -1
- package/dist/components/filter-bar-utils.cjs +14 -2
- package/dist/components/filter-bar-utils.cjs.map +1 -1
- package/dist/components/filter-bar-utils.d.ts +2 -1
- package/dist/components/filter-bar-utils.d.ts.map +1 -1
- package/dist/components/filter-bar-utils.js +14 -2
- package/dist/components/filter-bar-utils.js.map +1 -1
- package/dist/components/jotai-bindings-core.cjs +11 -0
- package/dist/components/jotai-bindings-core.cjs.map +1 -1
- package/dist/components/jotai-bindings-core.d.ts +3 -2
- package/dist/components/jotai-bindings-core.d.ts.map +1 -1
- package/dist/components/jotai-bindings-core.js +11 -0
- package/dist/components/jotai-bindings-core.js.map +1 -1
- package/dist/components/json-schema-form-accordion-array.cjs +54 -190
- package/dist/components/json-schema-form-accordion-array.cjs.map +1 -1
- package/dist/components/json-schema-form-accordion-array.d.ts.map +1 -1
- package/dist/components/json-schema-form-accordion-array.js +59 -195
- package/dist/components/json-schema-form-accordion-array.js.map +1 -1
- package/dist/components/json-schema-form-array.cjs +46 -146
- package/dist/components/json-schema-form-array.cjs.map +1 -1
- package/dist/components/json-schema-form-array.d.ts.map +1 -1
- package/dist/components/json-schema-form-array.js +47 -147
- package/dist/components/json-schema-form-array.js.map +1 -1
- package/dist/components/json-schema-form-cards-array.cjs +9 -7
- package/dist/components/json-schema-form-cards-array.cjs.map +1 -1
- package/dist/components/json-schema-form-cards-array.d.ts.map +1 -1
- package/dist/components/json-schema-form-cards-array.js +11 -9
- package/dist/components/json-schema-form-cards-array.js.map +1 -1
- package/dist/components/json-schema-form-error-display.js +1 -1
- package/dist/components/json-schema-form-errors.cjs +17 -4
- package/dist/components/json-schema-form-errors.cjs.map +1 -1
- package/dist/components/json-schema-form-errors.d.ts +1 -0
- package/dist/components/json-schema-form-errors.d.ts.map +1 -1
- package/dist/components/json-schema-form-errors.js +16 -3
- package/dist/components/json-schema-form-errors.js.map +1 -1
- package/dist/components/json-schema-form-fields.cjs +18 -2
- package/dist/components/json-schema-form-fields.cjs.map +1 -1
- package/dist/components/json-schema-form-fields.d.ts.map +1 -1
- package/dist/components/json-schema-form-fields.js +18 -2
- package/dist/components/json-schema-form-fields.js.map +1 -1
- package/dist/components/json-schema-form-item-row.cjs +17 -46
- package/dist/components/json-schema-form-item-row.cjs.map +1 -1
- package/dist/components/json-schema-form-item-row.d.ts +3 -10
- package/dist/components/json-schema-form-item-row.d.ts.map +1 -1
- package/dist/components/json-schema-form-item-row.js +18 -47
- package/dist/components/json-schema-form-item-row.js.map +1 -1
- package/dist/components/json-schema-form-item-summary.cjs +18 -4
- package/dist/components/json-schema-form-item-summary.cjs.map +1 -1
- package/dist/components/json-schema-form-item-summary.d.ts +2 -1
- package/dist/components/json-schema-form-item-summary.d.ts.map +1 -1
- package/dist/components/json-schema-form-item-summary.js +15 -1
- package/dist/components/json-schema-form-item-summary.js.map +1 -1
- package/dist/components/json-schema-form-lookup-tree.cjs +2 -5
- package/dist/components/json-schema-form-lookup-tree.cjs.map +1 -1
- package/dist/components/json-schema-form-lookup-tree.d.ts.map +1 -1
- package/dist/components/json-schema-form-lookup-tree.js +2 -5
- package/dist/components/json-schema-form-lookup-tree.js.map +1 -1
- package/dist/components/json-schema-form-object.cjs +3 -2
- package/dist/components/json-schema-form-object.cjs.map +1 -1
- package/dist/components/json-schema-form-object.d.ts.map +1 -1
- package/dist/components/json-schema-form-object.js +2 -1
- package/dist/components/json-schema-form-object.js.map +1 -1
- package/dist/components/json-schema-form-render.cjs +4 -1
- 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 +5 -2
- package/dist/components/json-schema-form-render.js.map +1 -1
- package/dist/components/json-schema-form-resolve.cjs +21 -13
- package/dist/components/json-schema-form-resolve.cjs.map +1 -1
- package/dist/components/json-schema-form-resolve.d.ts +2 -2
- package/dist/components/json-schema-form-resolve.d.ts.map +1 -1
- package/dist/components/json-schema-form-resolve.js +16 -8
- package/dist/components/json-schema-form-resolve.js.map +1 -1
- package/dist/components/json-schema-form-table-array.cjs +4 -3
- package/dist/components/json-schema-form-table-array.cjs.map +1 -1
- package/dist/components/json-schema-form-table-array.d.ts.map +1 -1
- package/dist/components/json-schema-form-table-array.js +2 -1
- package/dist/components/json-schema-form-table-array.js.map +1 -1
- package/dist/components/json-schema-form-tags-combobox.cjs +55 -0
- package/dist/components/json-schema-form-tags-combobox.cjs.map +1 -0
- package/dist/components/json-schema-form-tags-combobox.d.ts +17 -0
- package/dist/components/json-schema-form-tags-combobox.d.ts.map +1 -0
- package/dist/components/json-schema-form-tags-combobox.js +55 -0
- package/dist/components/json-schema-form-tags-combobox.js.map +1 -0
- package/dist/components/json-schema-form-types.d.ts +8 -1
- package/dist/components/json-schema-form-types.d.ts.map +1 -1
- package/dist/components/json-schema-form-utils.cjs +5 -28
- package/dist/components/json-schema-form-utils.cjs.map +1 -1
- package/dist/components/json-schema-form-utils.d.ts +1 -5
- package/dist/components/json-schema-form-utils.d.ts.map +1 -1
- package/dist/components/json-schema-form-utils.js +5 -28
- package/dist/components/json-schema-form-utils.js.map +1 -1
- package/dist/components/jsonPathTree.cjs +10 -3
- package/dist/components/jsonPathTree.cjs.map +1 -1
- package/dist/components/jsonPathTree.d.ts +17 -0
- package/dist/components/jsonPathTree.d.ts.map +1 -1
- package/dist/components/jsonPathTree.js +10 -3
- package/dist/components/jsonPathTree.js.map +1 -1
- package/dist/components/mdx-editor-callout-model.cjs +26 -0
- package/dist/components/mdx-editor-callout-model.cjs.map +1 -0
- package/dist/components/mdx-editor-callout-model.d.ts +14 -0
- package/dist/components/mdx-editor-callout-model.d.ts.map +1 -0
- package/dist/components/mdx-editor-callout-model.js +26 -0
- package/dist/components/mdx-editor-callout-model.js.map +1 -0
- package/dist/components/mdx-editor-callout.cjs +39 -0
- package/dist/components/mdx-editor-callout.cjs.map +1 -0
- package/dist/components/mdx-editor-callout.d.ts +27 -0
- package/dist/components/mdx-editor-callout.d.ts.map +1 -0
- package/dist/components/mdx-editor-callout.js +39 -0
- package/dist/components/mdx-editor-callout.js.map +1 -0
- package/dist/components/mdx-editor-field-plugins.cjs +14 -0
- package/dist/components/mdx-editor-field-plugins.cjs.map +1 -1
- package/dist/components/mdx-editor-field-plugins.d.ts.map +1 -1
- package/dist/components/mdx-editor-field-plugins.js +14 -0
- package/dist/components/mdx-editor-field-plugins.js.map +1 -1
- package/dist/components/mdx-editor-jsx-attributes.cjs +23 -0
- package/dist/components/mdx-editor-jsx-attributes.cjs.map +1 -0
- package/dist/components/mdx-editor-jsx-attributes.d.ts +29 -0
- package/dist/components/mdx-editor-jsx-attributes.d.ts.map +1 -0
- package/dist/components/mdx-editor-jsx-attributes.js +23 -0
- package/dist/components/mdx-editor-jsx-attributes.js.map +1 -0
- package/dist/components/mdx-editor-options.d.ts +79 -0
- package/dist/components/mdx-editor-options.d.ts.map +1 -1
- package/dist/components/workload-picker-utils.cjs +17 -4
- package/dist/components/workload-picker-utils.cjs.map +1 -1
- package/dist/components/workload-picker-utils.d.ts +3 -1
- package/dist/components/workload-picker-utils.d.ts.map +1 -1
- package/dist/components/workload-picker-utils.js +18 -5
- package/dist/components/workload-picker-utils.js.map +1 -1
- package/dist/components.cjs +13 -0
- package/dist/components.cjs.map +1 -1
- package/dist/components.d.ts +8 -3
- package/dist/components.d.ts.map +1 -1
- package/dist/components.js +13 -0
- package/dist/components.js.map +1 -1
- package/dist/data/Callout.cjs +48 -0
- package/dist/data/Callout.cjs.map +1 -0
- package/dist/data/Callout.d.ts +58 -0
- package/dist/data/Callout.d.ts.map +1 -0
- package/dist/data/Callout.js +48 -0
- package/dist/data/Callout.js.map +1 -0
- package/dist/data/Clicky.cjs +307 -248
- package/dist/data/Clicky.cjs.map +1 -1
- package/dist/data/Clicky.d.ts +37 -2
- package/dist/data/Clicky.d.ts.map +1 -1
- package/dist/data/Clicky.js +310 -251
- package/dist/data/Clicky.js.map +1 -1
- package/dist/data/DataTable.cjs +245 -115
- package/dist/data/DataTable.cjs.map +1 -1
- package/dist/data/DataTable.d.ts +48 -3
- package/dist/data/DataTable.d.ts.map +1 -1
- package/dist/data/DataTable.grouping.cjs.map +1 -1
- package/dist/data/DataTable.grouping.d.ts +11 -1
- package/dist/data/DataTable.grouping.d.ts.map +1 -1
- package/dist/data/DataTable.grouping.js.map +1 -1
- package/dist/data/DataTable.js +247 -117
- package/dist/data/DataTable.js.map +1 -1
- package/dist/data/Markdown.cjs +31 -2
- package/dist/data/Markdown.cjs.map +1 -1
- package/dist/data/Markdown.d.ts +10 -1
- package/dist/data/Markdown.d.ts.map +1 -1
- package/dist/data/Markdown.js +31 -2
- package/dist/data/Markdown.js.map +1 -1
- package/dist/data/MarkdownEditor.cjs +1 -1
- package/dist/data/MarkdownEditor.cjs.map +1 -1
- package/dist/data/MarkdownEditor.js +1 -1
- package/dist/data/MarkdownEditor.js.map +1 -1
- package/dist/data/ObjectGraph.cjs +108 -23
- package/dist/data/ObjectGraph.cjs.map +1 -1
- package/dist/data/ObjectGraph.d.ts +28 -22
- package/dist/data/ObjectGraph.d.ts.map +1 -1
- package/dist/data/ObjectGraph.js +109 -24
- package/dist/data/ObjectGraph.js.map +1 -1
- package/dist/data/PromptBanner.cjs +1 -1
- package/dist/data/PromptBanner.cjs.map +1 -1
- package/dist/data/PromptBanner.js +1 -1
- package/dist/data/PromptBanner.js.map +1 -1
- package/dist/data/Tree.cjs +39 -35
- package/dist/data/Tree.cjs.map +1 -1
- package/dist/data/Tree.d.ts +7 -1
- package/dist/data/Tree.d.ts.map +1 -1
- package/dist/data/Tree.js +39 -35
- package/dist/data/Tree.js.map +1 -1
- package/dist/data/ai/ChatButton.cjs +26 -0
- package/dist/data/ai/ChatButton.cjs.map +1 -0
- package/dist/data/ai/ChatButton.d.ts +5 -0
- package/dist/data/ai/ChatButton.d.ts.map +1 -0
- package/dist/data/ai/ChatButton.js +26 -0
- package/dist/data/ai/ChatButton.js.map +1 -0
- package/dist/data/ai/ChatFab.cjs +11 -6
- package/dist/data/ai/ChatFab.cjs.map +1 -1
- package/dist/data/ai/ChatFab.d.ts +5 -3
- package/dist/data/ai/ChatFab.d.ts.map +1 -1
- package/dist/data/ai/ChatFab.js +11 -6
- package/dist/data/ai/ChatFab.js.map +1 -1
- package/dist/data/ai/PromptRunEditor/index.cjs +16 -4
- package/dist/data/ai/PromptRunEditor/index.cjs.map +1 -1
- package/dist/data/ai/PromptRunEditor/index.d.ts +7 -2
- package/dist/data/ai/PromptRunEditor/index.d.ts.map +1 -1
- package/dist/data/ai/PromptRunEditor/index.js +16 -4
- package/dist/data/ai/PromptRunEditor/index.js.map +1 -1
- package/dist/data/ai/SandboxConnectionsSection.cjs +71 -0
- package/dist/data/ai/SandboxConnectionsSection.cjs.map +1 -0
- package/dist/data/ai/SandboxConnectionsSection.d.ts +8 -0
- package/dist/data/ai/SandboxConnectionsSection.d.ts.map +1 -0
- package/dist/data/ai/SandboxConnectionsSection.js +71 -0
- package/dist/data/ai/SandboxConnectionsSection.js.map +1 -0
- package/dist/data/ai/SandboxCreateWizard.cjs +288 -0
- package/dist/data/ai/SandboxCreateWizard.cjs.map +1 -0
- package/dist/data/ai/SandboxCreateWizard.d.ts +11 -0
- package/dist/data/ai/SandboxCreateWizard.d.ts.map +1 -0
- package/dist/data/ai/SandboxCreateWizard.js +288 -0
- package/dist/data/ai/SandboxCreateWizard.js.map +1 -0
- package/dist/data/ai/SandboxCreateWizard.model.cjs +77 -0
- package/dist/data/ai/SandboxCreateWizard.model.cjs.map +1 -0
- package/dist/data/ai/SandboxCreateWizard.model.d.ts +32 -0
- package/dist/data/ai/SandboxCreateWizard.model.d.ts.map +1 -0
- package/dist/data/ai/SandboxCreateWizard.model.js +77 -0
- package/dist/data/ai/SandboxCreateWizard.model.js.map +1 -0
- package/dist/data/ai/SpecRuntimeEditor/CommitSection.cjs +6 -6
- package/dist/data/ai/SpecRuntimeEditor/CommitSection.cjs.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/CommitSection.d.ts.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/CommitSection.js +6 -6
- package/dist/data/ai/SpecRuntimeEditor/CommitSection.js.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/PermissionsSection.cjs +11 -8
- package/dist/data/ai/SpecRuntimeEditor/PermissionsSection.cjs.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/PermissionsSection.js +11 -8
- package/dist/data/ai/SpecRuntimeEditor/PermissionsSection.js.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/SandboxSection.cjs +247 -0
- package/dist/data/ai/SpecRuntimeEditor/SandboxSection.cjs.map +1 -0
- package/dist/data/ai/SpecRuntimeEditor/SandboxSection.d.ts +12 -0
- package/dist/data/ai/SpecRuntimeEditor/SandboxSection.d.ts.map +1 -0
- package/dist/data/ai/SpecRuntimeEditor/SandboxSection.js +247 -0
- package/dist/data/ai/SpecRuntimeEditor/SandboxSection.js.map +1 -0
- package/dist/data/ai/SpecRuntimeEditor/fields.cjs +31 -22
- package/dist/data/ai/SpecRuntimeEditor/fields.cjs.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/fields.d.ts +6 -4
- package/dist/data/ai/SpecRuntimeEditor/fields.d.ts.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/fields.js +32 -23
- package/dist/data/ai/SpecRuntimeEditor/fields.js.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/index.cjs +15 -1
- package/dist/data/ai/SpecRuntimeEditor/index.cjs.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/index.d.ts +8 -3
- package/dist/data/ai/SpecRuntimeEditor/index.d.ts.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/index.js +15 -1
- package/dist/data/ai/SpecRuntimeEditor/index.js.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/types.cjs +11 -0
- package/dist/data/ai/SpecRuntimeEditor/types.cjs.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/types.d.ts +53 -1
- package/dist/data/ai/SpecRuntimeEditor/types.d.ts.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/types.js +11 -0
- package/dist/data/ai/SpecRuntimeEditor/types.js.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/update.cjs +23 -0
- package/dist/data/ai/SpecRuntimeEditor/update.cjs.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/update.d.ts +23 -1
- package/dist/data/ai/SpecRuntimeEditor/update.d.ts.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/update.js +23 -0
- package/dist/data/ai/SpecRuntimeEditor/update.js.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor.model.cjs +28 -0
- package/dist/data/ai/SpecRuntimeEditor.model.cjs.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor.model.d.ts +35 -0
- package/dist/data/ai/SpecRuntimeEditor.model.d.ts.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor.model.js +28 -0
- package/dist/data/ai/SpecRuntimeEditor.model.js.map +1 -1
- package/dist/data/ai/index.d.ts +6 -2
- package/dist/data/ai/index.d.ts.map +1 -1
- package/dist/data/ai/sandbox-kind-meta.cjs +16 -0
- package/dist/data/ai/sandbox-kind-meta.cjs.map +1 -0
- package/dist/data/ai/sandbox-kind-meta.d.ts +8 -0
- package/dist/data/ai/sandbox-kind-meta.d.ts.map +1 -0
- package/dist/data/ai/sandbox-kind-meta.js +16 -0
- package/dist/data/ai/sandbox-kind-meta.js.map +1 -0
- package/dist/data/badge-variants.d.ts +1 -1
- package/dist/data/cache-browser/CacheTree.cjs +1 -1
- package/dist/data/cache-browser/CacheTree.cjs.map +1 -1
- package/dist/data/cache-browser/CacheTree.js +1 -1
- package/dist/data/cache-browser/CacheTree.js.map +1 -1
- package/dist/data/callout-tones.cjs +95 -0
- package/dist/data/callout-tones.cjs.map +1 -0
- package/dist/data/callout-tones.d.ts +32 -0
- package/dist/data/callout-tones.d.ts.map +1 -0
- package/dist/data/callout-tones.js +95 -0
- package/dist/data/callout-tones.js.map +1 -0
- package/dist/data/chat/PromptInput.cjs +1 -1
- package/dist/data/chat/PromptInput.cjs.map +1 -1
- package/dist/data/chat/PromptInput.js +1 -1
- package/dist/data/chat/PromptInput.js.map +1 -1
- package/dist/data/clicky-export/ClickyExportDialog.cjs +145 -0
- package/dist/data/clicky-export/ClickyExportDialog.cjs.map +1 -0
- package/dist/data/clicky-export/ClickyExportDialog.d.ts +43 -0
- package/dist/data/clicky-export/ClickyExportDialog.d.ts.map +1 -0
- package/dist/data/clicky-export/ClickyExportDialog.js +145 -0
- package/dist/data/clicky-export/ClickyExportDialog.js.map +1 -0
- package/dist/data/clicky-export/index.d.ts +3 -0
- package/dist/data/clicky-export/index.d.ts.map +1 -0
- package/dist/data/clicky-export/useClickyExport.cjs +44 -0
- package/dist/data/clicky-export/useClickyExport.cjs.map +1 -0
- package/dist/data/clicky-export/useClickyExport.d.ts +30 -0
- package/dist/data/clicky-export/useClickyExport.d.ts.map +1 -0
- package/dist/data/clicky-export/useClickyExport.js +44 -0
- package/dist/data/clicky-export/useClickyExport.js.map +1 -0
- package/dist/data/data-table-server-filters.cjs +15 -2
- package/dist/data/data-table-server-filters.cjs.map +1 -1
- package/dist/data/data-table-server-filters.d.ts +12 -1
- package/dist/data/data-table-server-filters.d.ts.map +1 -1
- package/dist/data/data-table-server-filters.js +15 -2
- package/dist/data/data-table-server-filters.js.map +1 -1
- package/dist/data/diagnostics/ErrorDetails.cjs +29 -7
- package/dist/data/diagnostics/ErrorDetails.cjs.map +1 -1
- package/dist/data/diagnostics/ErrorDetails.d.ts +2 -1
- package/dist/data/diagnostics/ErrorDetails.d.ts.map +1 -1
- package/dist/data/diagnostics/ErrorDetails.js +29 -7
- package/dist/data/diagnostics/ErrorDetails.js.map +1 -1
- package/dist/data/diagnostics/error-diagnostics.cjs +17 -2
- package/dist/data/diagnostics/error-diagnostics.cjs.map +1 -1
- package/dist/data/diagnostics/error-diagnostics.d.ts +5 -0
- package/dist/data/diagnostics/error-diagnostics.d.ts.map +1 -1
- package/dist/data/diagnostics/error-diagnostics.js +17 -2
- package/dist/data/diagnostics/error-diagnostics.js.map +1 -1
- package/dist/data/logs-normalize.cjs +18 -3
- package/dist/data/logs-normalize.cjs.map +1 -1
- package/dist/data/logs-normalize.d.ts +17 -0
- package/dist/data/logs-normalize.d.ts.map +1 -1
- package/dist/data/logs-normalize.js +18 -3
- package/dist/data/logs-normalize.js.map +1 -1
- package/dist/data/object-graph-nodes.cjs +24 -0
- package/dist/data/object-graph-nodes.cjs.map +1 -0
- package/dist/data/object-graph-nodes.d.ts +34 -0
- package/dist/data/object-graph-nodes.d.ts.map +1 -0
- package/dist/data/object-graph-nodes.js +24 -0
- package/dist/data/object-graph-nodes.js.map +1 -0
- package/dist/data/query-browser/QueryBrowser.cjs +52 -32
- package/dist/data/query-browser/QueryBrowser.cjs.map +1 -1
- package/dist/data/query-browser/QueryBrowser.d.ts +1 -1
- package/dist/data/query-browser/QueryBrowser.d.ts.map +1 -1
- package/dist/data/query-browser/QueryBrowser.js +53 -33
- package/dist/data/query-browser/QueryBrowser.js.map +1 -1
- package/dist/data/query-browser/QueryBrowser.types.cjs.map +1 -1
- package/dist/data/query-browser/QueryBrowser.types.d.ts +12 -0
- package/dist/data/query-browser/QueryBrowser.types.d.ts.map +1 -1
- package/dist/data/query-browser/QueryBrowser.types.js.map +1 -1
- package/dist/data/query-browser/QueryBrowserDiagnosticsPanel.cjs +58 -10
- package/dist/data/query-browser/QueryBrowserDiagnosticsPanel.cjs.map +1 -1
- package/dist/data/query-browser/QueryBrowserDiagnosticsPanel.d.ts.map +1 -1
- package/dist/data/query-browser/QueryBrowserDiagnosticsPanel.js +58 -10
- package/dist/data/query-browser/QueryBrowserDiagnosticsPanel.js.map +1 -1
- package/dist/data/query-browser/QueryBrowserResults.cjs +4 -4
- package/dist/data/query-browser/QueryBrowserResults.cjs.map +1 -1
- package/dist/data/query-browser/QueryBrowserResults.d.ts +4 -2
- package/dist/data/query-browser/QueryBrowserResults.d.ts.map +1 -1
- package/dist/data/query-browser/QueryBrowserResults.js +4 -4
- package/dist/data/query-browser/QueryBrowserResults.js.map +1 -1
- package/dist/data/query-info/QueryInfoDialog.cjs +106 -0
- package/dist/data/query-info/QueryInfoDialog.cjs.map +1 -0
- package/dist/data/query-info/QueryInfoDialog.d.ts +16 -0
- package/dist/data/query-info/QueryInfoDialog.d.ts.map +1 -0
- package/dist/data/query-info/QueryInfoDialog.js +106 -0
- package/dist/data/query-info/QueryInfoDialog.js.map +1 -0
- package/dist/data/query-info/index.d.ts +4 -0
- package/dist/data/query-info/index.d.ts.map +1 -0
- package/dist/data/query-info/queryInfo.cjs +42 -0
- package/dist/data/query-info/queryInfo.cjs.map +1 -0
- package/dist/data/query-info/queryInfo.d.ts +45 -0
- package/dist/data/query-info/queryInfo.d.ts.map +1 -0
- package/dist/data/query-info/queryInfo.js +42 -0
- package/dist/data/query-info/queryInfo.js.map +1 -0
- package/dist/data/query-info/useQueryInfo.cjs +48 -0
- package/dist/data/query-info/useQueryInfo.cjs.map +1 -0
- package/dist/data/query-info/useQueryInfo.d.ts +26 -0
- package/dist/data/query-info/useQueryInfo.d.ts.map +1 -0
- package/dist/data/query-info/useQueryInfo.js +48 -0
- package/dist/data/query-info/useQueryInfo.js.map +1 -0
- package/dist/data/use-infinite-rows.cjs +20 -0
- package/dist/data/use-infinite-rows.cjs.map +1 -0
- package/dist/data/use-infinite-rows.d.ts +20 -0
- package/dist/data/use-infinite-rows.d.ts.map +1 -0
- package/dist/data/use-infinite-rows.js +20 -0
- package/dist/data/use-infinite-rows.js.map +1 -0
- package/dist/data/version-info.cjs +3 -3
- package/dist/data/version-info.js +3 -3
- package/dist/data.cjs +44 -0
- package/dist/data.cjs.map +1 -1
- package/dist/data.d.ts +8 -3
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +44 -0
- package/dist/data.js.map +1 -1
- package/dist/hooks/use-log-tail.cjs +213 -0
- package/dist/hooks/use-log-tail.cjs.map +1 -0
- package/dist/hooks/use-log-tail.d.ts +112 -0
- package/dist/hooks/use-log-tail.d.ts.map +1 -0
- package/dist/hooks/use-log-tail.js +213 -0
- package/dist/hooks/use-log-tail.js.map +1 -0
- package/dist/hooks.cjs +10 -0
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.d.ts +2 -0
- package/dist/hooks.d.ts.map +1 -1
- package/dist/hooks.js +10 -0
- package/dist/hooks.js.map +1 -1
- package/dist/icons/components/UiArrowsCounterClockwise.cjs +15 -0
- package/dist/icons/components/UiArrowsCounterClockwise.cjs.map +1 -0
- package/dist/icons/components/UiArrowsCounterClockwise.d.ts +15 -0
- package/dist/icons/components/UiArrowsCounterClockwise.d.ts.map +1 -0
- package/dist/icons/components/UiArrowsCounterClockwise.js +15 -0
- package/dist/icons/components/UiArrowsCounterClockwise.js.map +1 -0
- package/dist/icons/components/UiClipboardText.cjs +15 -0
- package/dist/icons/components/UiClipboardText.cjs.map +1 -0
- package/dist/icons/components/UiClipboardText.d.ts +15 -0
- package/dist/icons/components/UiClipboardText.d.ts.map +1 -0
- package/dist/icons/components/UiClipboardText.js +15 -0
- package/dist/icons/components/UiClipboardText.js.map +1 -0
- package/dist/icons/components/UiIdentificationCard.cjs +15 -0
- package/dist/icons/components/UiIdentificationCard.cjs.map +1 -0
- package/dist/icons/components/UiIdentificationCard.d.ts +15 -0
- package/dist/icons/components/UiIdentificationCard.d.ts.map +1 -0
- package/dist/icons/components/UiIdentificationCard.js +15 -0
- package/dist/icons/components/UiIdentificationCard.js.map +1 -0
- package/dist/icons/components/UiLockKey.cjs +15 -0
- package/dist/icons/components/UiLockKey.cjs.map +1 -0
- package/dist/icons/components/UiLockKey.d.ts +15 -0
- package/dist/icons/components/UiLockKey.d.ts.map +1 -0
- package/dist/icons/components/UiLockKey.js +15 -0
- package/dist/icons/components/UiLockKey.js.map +1 -0
- package/dist/icons/components/UiSteps.cjs +15 -0
- package/dist/icons/components/UiSteps.cjs.map +1 -0
- package/dist/icons/components/UiSteps.d.ts +15 -0
- package/dist/icons/components/UiSteps.d.ts.map +1 -0
- package/dist/icons/components/UiSteps.js +15 -0
- package/dist/icons/components/UiSteps.js.map +1 -0
- package/dist/icons/components/UiUserGear.cjs +15 -0
- package/dist/icons/components/UiUserGear.cjs.map +1 -0
- package/dist/icons/components/UiUserGear.d.ts +15 -0
- package/dist/icons/components/UiUserGear.d.ts.map +1 -0
- package/dist/icons/components/UiUserGear.js +15 -0
- package/dist/icons/components/UiUserGear.js.map +1 -0
- package/dist/icons/components/UiUsersFour.cjs +15 -0
- package/dist/icons/components/UiUsersFour.cjs.map +1 -0
- package/dist/icons/components/UiUsersFour.d.ts +15 -0
- package/dist/icons/components/UiUsersFour.d.ts.map +1 -0
- package/dist/icons/components/UiUsersFour.js +15 -0
- package/dist/icons/components/UiUsersFour.js.map +1 -0
- package/dist/icons/index.d.ts +14 -0
- package/dist/icons/index.d.ts.map +1 -1
- package/dist/icons/registry.cjs +15 -1
- package/dist/icons/registry.cjs.map +1 -1
- package/dist/icons/registry.d.ts.map +1 -1
- package/dist/icons/registry.js +15 -1
- package/dist/icons/registry.js.map +1 -1
- package/dist/icons.cjs +21 -0
- package/dist/icons.cjs.map +1 -1
- package/dist/icons.js +21 -0
- package/dist/icons.js.map +1 -1
- package/dist/index.cjs +75 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +75 -0
- package/dist/index.js.map +1 -1
- package/dist/jotai.d.ts +1 -1
- package/dist/jotai.d.ts.map +1 -1
- package/dist/lib/collections.cjs +31 -0
- package/dist/lib/collections.cjs.map +1 -0
- package/dist/lib/collections.d.ts +6 -0
- package/dist/lib/collections.d.ts.map +1 -0
- package/dist/lib/collections.js +31 -0
- package/dist/lib/collections.js.map +1 -0
- package/dist/mdx-editor.cjs +12 -0
- package/dist/mdx-editor.cjs.map +1 -1
- package/dist/mdx-editor.css +1 -1
- package/dist/mdx-editor.d.ts +4 -1
- package/dist/mdx-editor.d.ts.map +1 -1
- package/dist/mdx-editor.js +13 -1
- package/dist/mdx-editor.js.map +1 -1
- package/dist/overlay/CommandPalette.cjs +1 -1
- package/dist/overlay/CommandPalette.cjs.map +1 -1
- package/dist/overlay/CommandPalette.js +1 -1
- package/dist/overlay/CommandPalette.js.map +1 -1
- package/dist/profiles/cel/celEditor.cjs +395 -0
- package/dist/profiles/cel/celEditor.cjs.map +1 -0
- package/dist/profiles/cel/celEditor.d.ts +51 -0
- package/dist/profiles/cel/celEditor.d.ts.map +1 -0
- package/dist/profiles/cel/celEditor.js +395 -0
- package/dist/profiles/cel/celEditor.js.map +1 -0
- package/dist/profiles/cel/celEditorExtension.cjs +15 -0
- package/dist/profiles/cel/celEditorExtension.cjs.map +1 -0
- package/dist/profiles/cel/celEditorExtension.d.ts +5 -0
- package/dist/profiles/cel/celEditorExtension.d.ts.map +1 -0
- package/dist/profiles/cel/celEditorExtension.js +15 -0
- package/dist/profiles/cel/celEditorExtension.js.map +1 -0
- package/dist/profiles/cel/celExpression.cjs +174 -0
- package/dist/profiles/cel/celExpression.cjs.map +1 -0
- package/dist/profiles/cel/celExpression.d.ts +138 -0
- package/dist/profiles/cel/celExpression.d.ts.map +1 -0
- package/dist/profiles/cel/celExpression.js +174 -0
- package/dist/profiles/cel/celExpression.js.map +1 -0
- package/dist/profiles/cel/celPath.cjs +47 -0
- package/dist/profiles/cel/celPath.cjs.map +1 -0
- package/dist/profiles/cel/celPath.d.ts +31 -0
- package/dist/profiles/cel/celPath.d.ts.map +1 -0
- package/dist/profiles/cel/celPath.js +47 -0
- package/dist/profiles/cel/celPath.js.map +1 -0
- package/dist/profiles/cel/index.d.ts +5 -0
- package/dist/profiles/cel/index.d.ts.map +1 -0
- package/dist/profiles/connections/catalogTree.cjs +133 -0
- package/dist/profiles/connections/catalogTree.cjs.map +1 -0
- package/dist/profiles/connections/catalogTree.d.ts.map +1 -0
- package/dist/profiles/connections/catalogTree.js +133 -0
- package/dist/profiles/connections/catalogTree.js.map +1 -0
- package/dist/profiles/connections/connectionBrowserModel.cjs +191 -0
- package/dist/profiles/connections/connectionBrowserModel.cjs.map +1 -0
- package/dist/profiles/connections/connectionBrowserModel.d.ts +177 -0
- package/dist/profiles/connections/connectionBrowserModel.d.ts.map +1 -0
- package/dist/profiles/connections/connectionBrowserModel.js +191 -0
- package/dist/profiles/connections/connectionBrowserModel.js.map +1 -0
- package/dist/profiles/connections/connectionQueryWorkspace.cjs +196 -0
- package/dist/profiles/connections/connectionQueryWorkspace.cjs.map +1 -0
- package/dist/profiles/connections/connectionQueryWorkspace.d.ts +63 -0
- package/dist/profiles/connections/connectionQueryWorkspace.d.ts.map +1 -0
- package/dist/profiles/connections/connectionQueryWorkspace.js +196 -0
- package/dist/profiles/connections/connectionQueryWorkspace.js.map +1 -0
- package/dist/profiles/connections/connectionQueryWorkspaceModel.cjs +28 -0
- package/dist/profiles/connections/connectionQueryWorkspaceModel.cjs.map +1 -0
- package/dist/profiles/connections/connectionQueryWorkspaceModel.d.ts +38 -0
- package/dist/profiles/connections/connectionQueryWorkspaceModel.d.ts.map +1 -0
- package/dist/profiles/connections/connectionQueryWorkspaceModel.js +28 -0
- package/dist/profiles/connections/connectionQueryWorkspaceModel.js.map +1 -0
- package/dist/profiles/connections/index.d.ts +5 -0
- package/dist/profiles/connections/index.d.ts.map +1 -0
- package/dist/profiles/editor/index.d.ts +12 -0
- package/dist/profiles/editor/index.d.ts.map +1 -0
- package/dist/profiles/editor/profileBuilder.cjs +65 -0
- package/dist/profiles/editor/profileBuilder.cjs.map +1 -0
- package/dist/profiles/editor/profileBuilder.d.ts.map +1 -0
- package/dist/profiles/editor/profileBuilder.js +65 -0
- package/dist/profiles/editor/profileBuilder.js.map +1 -0
- package/dist/profiles/editor/profileBuilderExtension.cjs.map +1 -0
- package/dist/profiles/editor/profileBuilderExtension.d.ts +5 -0
- package/dist/profiles/editor/profileBuilderExtension.d.ts.map +1 -0
- package/dist/profiles/editor/profileBuilderExtension.js.map +1 -0
- package/dist/profiles/editor/profileBuilderModel.cjs +44 -0
- package/dist/profiles/editor/profileBuilderModel.cjs.map +1 -0
- package/dist/profiles/editor/profileBuilderModel.d.ts +4 -0
- package/dist/profiles/editor/profileBuilderModel.d.ts.map +1 -0
- package/dist/profiles/editor/profileBuilderModel.js +44 -0
- package/dist/profiles/editor/profileBuilderModel.js.map +1 -0
- package/dist/profiles/editor/profileBuilderWorkspace.cjs +333 -0
- package/dist/profiles/editor/profileBuilderWorkspace.cjs.map +1 -0
- package/dist/profiles/editor/profileBuilderWorkspace.d.ts +21 -0
- package/dist/profiles/editor/profileBuilderWorkspace.d.ts.map +1 -0
- package/dist/profiles/editor/profileBuilderWorkspace.js +333 -0
- package/dist/profiles/editor/profileBuilderWorkspace.js.map +1 -0
- package/dist/profiles/editor/profileEditor.cjs +471 -0
- package/dist/profiles/editor/profileEditor.cjs.map +1 -0
- package/dist/profiles/editor/profileEditor.d.ts +20 -0
- package/dist/profiles/editor/profileEditor.d.ts.map +1 -0
- package/dist/profiles/editor/profileEditor.js +471 -0
- package/dist/profiles/editor/profileEditor.js.map +1 -0
- package/dist/profiles/editor/profileEditorModel.cjs +206 -0
- package/dist/profiles/editor/profileEditorModel.cjs.map +1 -0
- package/dist/profiles/editor/profileEditorModel.d.ts +76 -0
- package/dist/profiles/editor/profileEditorModel.d.ts.map +1 -0
- package/dist/profiles/editor/profileEditorModel.js +206 -0
- package/dist/profiles/editor/profileEditorModel.js.map +1 -0
- package/dist/profiles/editor/profileEditorPreview.cjs.map +1 -0
- package/dist/profiles/editor/profileEditorPreview.d.ts +12 -0
- package/dist/profiles/editor/profileEditorPreview.d.ts.map +1 -0
- package/dist/profiles/editor/profileEditorPreview.js.map +1 -0
- package/dist/profiles/editor/profileEditorRail.cjs.map +1 -0
- package/dist/profiles/editor/profileEditorRail.d.ts.map +1 -0
- package/dist/profiles/editor/profileEditorRail.js.map +1 -0
- package/dist/profiles/editor/profileEditorRaw.cjs +118 -0
- package/dist/profiles/editor/profileEditorRaw.cjs.map +1 -0
- package/dist/profiles/editor/profileEditorRaw.d.ts +7 -0
- package/dist/profiles/editor/profileEditorRaw.d.ts.map +1 -0
- package/dist/profiles/editor/profileEditorRaw.js +118 -0
- package/dist/profiles/editor/profileEditorRaw.js.map +1 -0
- package/dist/profiles/editor/profileEditorRoutes.cjs.map +1 -0
- package/dist/profiles/editor/profileEditorRoutes.d.ts.map +1 -0
- package/dist/profiles/editor/profileEditorRoutes.js.map +1 -0
- package/dist/profiles/editor/profileEditorSections.cjs +247 -0
- package/dist/profiles/editor/profileEditorSections.cjs.map +1 -0
- package/dist/profiles/editor/profileEditorSections.d.ts +26 -0
- package/dist/profiles/editor/profileEditorSections.d.ts.map +1 -0
- package/dist/profiles/editor/profileEditorSections.js +247 -0
- package/dist/profiles/editor/profileEditorSections.js.map +1 -0
- package/dist/profiles/editor/profileYaml.cjs +19 -0
- package/dist/profiles/editor/profileYaml.cjs.map +1 -0
- package/dist/profiles/editor/profileYaml.d.ts +4 -0
- package/dist/profiles/editor/profileYaml.d.ts.map +1 -0
- package/dist/profiles/editor/profileYaml.js +19 -0
- package/dist/profiles/editor/profileYaml.js.map +1 -0
- package/dist/profiles/editor/testSchema.d.ts +3 -0
- package/dist/profiles/editor/testSchema.d.ts.map +1 -0
- package/dist/profiles/elasticsearch/esFieldValues.cjs +57 -0
- package/dist/profiles/elasticsearch/esFieldValues.cjs.map +1 -0
- package/dist/profiles/elasticsearch/esFieldValues.d.ts +45 -0
- package/dist/profiles/elasticsearch/esFieldValues.d.ts.map +1 -0
- package/dist/profiles/elasticsearch/esFieldValues.js +57 -0
- package/dist/profiles/elasticsearch/esFieldValues.js.map +1 -0
- package/dist/profiles/elasticsearch/esParamMappingModel.cjs +301 -0
- package/dist/profiles/elasticsearch/esParamMappingModel.cjs.map +1 -0
- package/dist/profiles/elasticsearch/esParamMappingModel.d.ts +37 -0
- package/dist/profiles/elasticsearch/esParamMappingModel.d.ts.map +1 -0
- package/dist/profiles/elasticsearch/esParamMappingModel.js +301 -0
- package/dist/profiles/elasticsearch/esParamMappingModel.js.map +1 -0
- package/dist/profiles/elasticsearch/esParamMappingPill.cjs.map +1 -0
- package/dist/profiles/elasticsearch/esParamMappingPill.d.ts.map +1 -0
- package/dist/profiles/elasticsearch/esParamMappingPill.js.map +1 -0
- package/dist/profiles/elasticsearch/esParamOperandExtension.cjs +75 -0
- package/dist/profiles/elasticsearch/esParamOperandExtension.cjs.map +1 -0
- package/dist/profiles/elasticsearch/esParamOperandExtension.d.ts +11 -0
- package/dist/profiles/elasticsearch/esParamOperandExtension.d.ts.map +1 -0
- package/dist/profiles/elasticsearch/esParamOperandExtension.js +75 -0
- package/dist/profiles/elasticsearch/esParamOperandExtension.js.map +1 -0
- package/dist/profiles/elasticsearch/esQueryBuilder.cjs +249 -0
- package/dist/profiles/elasticsearch/esQueryBuilder.cjs.map +1 -0
- package/dist/profiles/elasticsearch/esQueryBuilder.d.ts +35 -0
- package/dist/profiles/elasticsearch/esQueryBuilder.d.ts.map +1 -0
- package/dist/profiles/elasticsearch/esQueryBuilder.js +249 -0
- package/dist/profiles/elasticsearch/esQueryBuilder.js.map +1 -0
- package/dist/profiles/elasticsearch/esQueryBuilderExtension.cjs.map +1 -0
- package/dist/profiles/elasticsearch/esQueryBuilderExtension.d.ts +5 -0
- package/dist/profiles/elasticsearch/esQueryBuilderExtension.d.ts.map +1 -0
- package/dist/profiles/elasticsearch/esQueryBuilderExtension.js.map +1 -0
- package/dist/profiles/elasticsearch/esQueryBuilderForm.cjs +59 -0
- package/dist/profiles/elasticsearch/esQueryBuilderForm.cjs.map +1 -0
- package/dist/profiles/elasticsearch/esQueryBuilderForm.d.ts +25 -0
- package/dist/profiles/elasticsearch/esQueryBuilderForm.d.ts.map +1 -0
- package/dist/profiles/elasticsearch/esQueryBuilderForm.js +59 -0
- package/dist/profiles/elasticsearch/esQueryBuilderForm.js.map +1 -0
- package/dist/profiles/elasticsearch/esQueryBuilderModel.cjs.map +1 -0
- package/dist/profiles/elasticsearch/esQueryBuilderModel.d.ts +110 -0
- package/dist/profiles/elasticsearch/esQueryBuilderModel.d.ts.map +1 -0
- package/dist/profiles/elasticsearch/esQueryBuilderModel.js.map +1 -0
- package/dist/profiles/elasticsearch/esQueryClauseGroup.cjs +144 -0
- package/dist/profiles/elasticsearch/esQueryClauseGroup.cjs.map +1 -0
- package/dist/profiles/elasticsearch/esQueryClauseGroup.d.ts.map +1 -0
- package/dist/profiles/elasticsearch/esQueryClauseGroup.js +144 -0
- package/dist/profiles/elasticsearch/esQueryClauseGroup.js.map +1 -0
- package/dist/profiles/elasticsearch/esQueryCompile.cjs +48 -0
- package/dist/profiles/elasticsearch/esQueryCompile.cjs.map +1 -0
- package/dist/profiles/elasticsearch/esQueryCompile.d.ts +40 -0
- package/dist/profiles/elasticsearch/esQueryCompile.d.ts.map +1 -0
- package/dist/profiles/elasticsearch/esQueryCompile.js +48 -0
- package/dist/profiles/elasticsearch/esQueryCompile.js.map +1 -0
- package/dist/profiles/elasticsearch/esQueryConditionRow.cjs +168 -0
- package/dist/profiles/elasticsearch/esQueryConditionRow.cjs.map +1 -0
- package/dist/profiles/elasticsearch/esQueryConditionRow.d.ts +37 -0
- package/dist/profiles/elasticsearch/esQueryConditionRow.d.ts.map +1 -0
- package/dist/profiles/elasticsearch/esQueryConditionRow.js +168 -0
- package/dist/profiles/elasticsearch/esQueryConditionRow.js.map +1 -0
- package/dist/profiles/elasticsearch/esQueryGroupModel.cjs.map +1 -0
- package/dist/profiles/elasticsearch/esQueryGroupModel.d.ts.map +1 -0
- package/dist/profiles/elasticsearch/esQueryGroupModel.js.map +1 -0
- package/dist/profiles/elasticsearch/esQueryOccur.cjs.map +1 -0
- package/dist/profiles/elasticsearch/esQueryOccur.d.ts.map +1 -0
- package/dist/profiles/elasticsearch/esQueryOccur.js.map +1 -0
- package/dist/profiles/elasticsearch/esQueryOperandEditors.cjs +279 -0
- package/dist/profiles/elasticsearch/esQueryOperandEditors.cjs.map +1 -0
- package/dist/profiles/elasticsearch/esQueryOperandEditors.d.ts +24 -0
- package/dist/profiles/elasticsearch/esQueryOperandEditors.d.ts.map +1 -0
- package/dist/profiles/elasticsearch/esQueryOperandEditors.js +279 -0
- package/dist/profiles/elasticsearch/esQueryOperandEditors.js.map +1 -0
- package/dist/profiles/elasticsearch/esQueryOperandModel.cjs.map +1 -0
- package/dist/profiles/elasticsearch/esQueryOperandModel.d.ts +17 -0
- package/dist/profiles/elasticsearch/esQueryOperandModel.d.ts.map +1 -0
- package/dist/profiles/elasticsearch/esQueryOperandModel.js.map +1 -0
- package/dist/profiles/elasticsearch/esQueryOperators.cjs +166 -0
- package/dist/profiles/elasticsearch/esQueryOperators.cjs.map +1 -0
- package/dist/profiles/elasticsearch/esQueryOperators.d.ts +84 -0
- package/dist/profiles/elasticsearch/esQueryOperators.d.ts.map +1 -0
- package/dist/profiles/elasticsearch/esQueryOperators.js +166 -0
- package/dist/profiles/elasticsearch/esQueryOperators.js.map +1 -0
- package/dist/profiles/elasticsearch/esQueryOutputEditor.cjs +138 -0
- package/dist/profiles/elasticsearch/esQueryOutputEditor.cjs.map +1 -0
- package/dist/profiles/elasticsearch/esQueryOutputEditor.d.ts +7 -0
- package/dist/profiles/elasticsearch/esQueryOutputEditor.d.ts.map +1 -0
- package/dist/profiles/elasticsearch/esQueryOutputEditor.js +138 -0
- package/dist/profiles/elasticsearch/esQueryOutputEditor.js.map +1 -0
- package/dist/profiles/elasticsearch/esQueryOutputModel.cjs.map +1 -0
- package/dist/profiles/elasticsearch/esQueryOutputModel.d.ts.map +1 -0
- package/dist/profiles/elasticsearch/esQueryOutputModel.js.map +1 -0
- package/dist/profiles/elasticsearch/esQueryPreview.cjs.map +1 -0
- package/dist/profiles/elasticsearch/esQueryPreview.d.ts.map +1 -0
- package/dist/profiles/elasticsearch/esQueryPreview.js.map +1 -0
- package/dist/profiles/elasticsearch/esQuerySortEditor.cjs +143 -0
- package/dist/profiles/elasticsearch/esQuerySortEditor.cjs.map +1 -0
- package/dist/profiles/elasticsearch/esQuerySortEditor.d.ts.map +1 -0
- package/dist/profiles/elasticsearch/esQuerySortEditor.js +143 -0
- package/dist/profiles/elasticsearch/esQuerySortEditor.js.map +1 -0
- package/dist/profiles/elasticsearch/esQuerySortModel.cjs.map +1 -0
- package/dist/profiles/elasticsearch/esQuerySortModel.d.ts.map +1 -0
- package/dist/profiles/elasticsearch/esQuerySortModel.js.map +1 -0
- package/dist/profiles/elasticsearch/esValueCombobox.cjs +86 -0
- package/dist/profiles/elasticsearch/esValueCombobox.cjs.map +1 -0
- package/dist/profiles/elasticsearch/esValueCombobox.d.ts.map +1 -0
- package/dist/profiles/elasticsearch/esValueCombobox.js +86 -0
- package/dist/profiles/elasticsearch/esValueCombobox.js.map +1 -0
- package/dist/profiles/elasticsearch/index.d.ts +23 -0
- package/dist/profiles/elasticsearch/index.d.ts.map +1 -0
- package/dist/profiles/fields/index.d.ts +9 -0
- package/dist/profiles/fields/index.d.ts.map +1 -0
- package/dist/profiles/fields/profileColumnModel.cjs.map +1 -0
- package/dist/profiles/fields/profileColumnModel.d.ts +8 -0
- package/dist/profiles/fields/profileColumnModel.d.ts.map +1 -0
- package/dist/profiles/fields/profileColumnModel.js.map +1 -0
- package/dist/profiles/fields/profileColumnPicker.cjs +68 -0
- package/dist/profiles/fields/profileColumnPicker.cjs.map +1 -0
- package/dist/profiles/fields/profileColumnPicker.d.ts +11 -0
- package/dist/profiles/fields/profileColumnPicker.d.ts.map +1 -0
- package/dist/profiles/fields/profileColumnPicker.js +68 -0
- package/dist/profiles/fields/profileColumnPicker.js.map +1 -0
- package/dist/profiles/fields/profileFieldControls.cjs +50 -0
- package/dist/profiles/fields/profileFieldControls.cjs.map +1 -0
- package/dist/profiles/fields/profileFieldControls.d.ts +37 -0
- package/dist/profiles/fields/profileFieldControls.d.ts.map +1 -0
- package/dist/profiles/fields/profileFieldControls.js +50 -0
- package/dist/profiles/fields/profileFieldControls.js.map +1 -0
- package/dist/profiles/fields/profileFieldEditor.cjs +198 -0
- package/dist/profiles/fields/profileFieldEditor.cjs.map +1 -0
- package/dist/profiles/fields/profileFieldEditor.d.ts +34 -0
- package/dist/profiles/fields/profileFieldEditor.d.ts.map +1 -0
- package/dist/profiles/fields/profileFieldEditor.js +198 -0
- package/dist/profiles/fields/profileFieldEditor.js.map +1 -0
- package/dist/profiles/fields/profileFieldFilterEditor.cjs +122 -0
- package/dist/profiles/fields/profileFieldFilterEditor.cjs.map +1 -0
- package/dist/profiles/fields/profileFieldFilterEditor.d.ts +16 -0
- package/dist/profiles/fields/profileFieldFilterEditor.d.ts.map +1 -0
- package/dist/profiles/fields/profileFieldFilterEditor.js +122 -0
- package/dist/profiles/fields/profileFieldFilterEditor.js.map +1 -0
- package/dist/profiles/fields/profileFieldIcons.cjs +102 -0
- package/dist/profiles/fields/profileFieldIcons.cjs.map +1 -0
- package/dist/profiles/fields/profileFieldIcons.d.ts +10 -0
- package/dist/profiles/fields/profileFieldIcons.d.ts.map +1 -0
- package/dist/profiles/fields/profileFieldIcons.js +102 -0
- package/dist/profiles/fields/profileFieldIcons.js.map +1 -0
- package/dist/profiles/fields/profileFieldList.cjs +215 -0
- package/dist/profiles/fields/profileFieldList.cjs.map +1 -0
- package/dist/profiles/fields/profileFieldList.d.ts +24 -0
- package/dist/profiles/fields/profileFieldList.d.ts.map +1 -0
- package/dist/profiles/fields/profileFieldList.js +215 -0
- package/dist/profiles/fields/profileFieldList.js.map +1 -0
- package/dist/profiles/fields/profileFieldManager.cjs +103 -0
- package/dist/profiles/fields/profileFieldManager.cjs.map +1 -0
- package/dist/profiles/fields/profileFieldManager.d.ts.map +1 -0
- package/dist/profiles/fields/profileFieldManager.js +103 -0
- package/dist/profiles/fields/profileFieldManager.js.map +1 -0
- package/dist/profiles/fields/profileFieldState.cjs +136 -0
- package/dist/profiles/fields/profileFieldState.cjs.map +1 -0
- package/dist/profiles/fields/profileFieldState.d.ts +41 -0
- package/dist/profiles/fields/profileFieldState.d.ts.map +1 -0
- package/dist/profiles/fields/profileFieldState.js +136 -0
- package/dist/profiles/fields/profileFieldState.js.map +1 -0
- package/dist/profiles/fields/profileFieldTypes.cjs.map +1 -0
- package/dist/profiles/fields/profileFieldTypes.d.ts +8 -0
- package/dist/profiles/fields/profileFieldTypes.d.ts.map +1 -0
- package/dist/profiles/fields/profileFieldTypes.js.map +1 -0
- package/dist/profiles/fields/profileParamModel.cjs.map +1 -0
- package/dist/profiles/fields/profileParamModel.d.ts +3 -0
- package/dist/profiles/fields/profileParamModel.d.ts.map +1 -0
- package/dist/profiles/fields/profileParamModel.js.map +1 -0
- package/dist/profiles/processor/index.d.ts +6 -0
- package/dist/profiles/processor/index.d.ts.map +1 -0
- package/dist/profiles/processor/processorConfig.cjs +185 -0
- package/dist/profiles/processor/processorConfig.cjs.map +1 -0
- package/dist/profiles/processor/processorConfig.d.ts +34 -0
- package/dist/profiles/processor/processorConfig.d.ts.map +1 -0
- package/dist/profiles/processor/processorConfig.js +185 -0
- package/dist/profiles/processor/processorConfig.js.map +1 -0
- package/dist/profiles/processor/processorPipeline.cjs +300 -0
- package/dist/profiles/processor/processorPipeline.cjs.map +1 -0
- package/dist/profiles/processor/processorPipeline.d.ts +11 -0
- package/dist/profiles/processor/processorPipeline.d.ts.map +1 -0
- package/dist/profiles/processor/processorPipeline.js +300 -0
- package/dist/profiles/processor/processorPipeline.js.map +1 -0
- package/dist/profiles/processor/processorPipelineEditor.cjs +330 -0
- package/dist/profiles/processor/processorPipelineEditor.cjs.map +1 -0
- package/dist/profiles/processor/processorPipelineEditor.d.ts +16 -0
- package/dist/profiles/processor/processorPipelineEditor.d.ts.map +1 -0
- package/dist/profiles/processor/processorPipelineEditor.js +330 -0
- package/dist/profiles/processor/processorPipelineEditor.js.map +1 -0
- package/dist/profiles/processor/processorPipelineExtension.cjs +28 -0
- package/dist/profiles/processor/processorPipelineExtension.cjs.map +1 -0
- package/dist/profiles/processor/processorPipelineExtension.d.ts +5 -0
- package/dist/profiles/processor/processorPipelineExtension.d.ts.map +1 -0
- package/dist/profiles/processor/processorPipelineExtension.js +28 -0
- package/dist/profiles/processor/processorPipelineExtension.js.map +1 -0
- package/dist/profiles/processor/processorPreview.cjs +55 -0
- package/dist/profiles/processor/processorPreview.cjs.map +1 -0
- package/dist/profiles/processor/processorPreview.d.ts +20 -0
- package/dist/profiles/processor/processorPreview.d.ts.map +1 -0
- package/dist/profiles/processor/processorPreview.js +55 -0
- package/dist/profiles/processor/processorPreview.js.map +1 -0
- package/dist/profiles/processor/processorPreviewTable.cjs +103 -0
- package/dist/profiles/processor/processorPreviewTable.cjs.map +1 -0
- package/dist/profiles/processor/processorPreviewTable.d.ts +6 -0
- package/dist/profiles/processor/processorPreviewTable.d.ts.map +1 -0
- package/dist/profiles/processor/processorPreviewTable.js +103 -0
- package/dist/profiles/processor/processorPreviewTable.js.map +1 -0
- package/dist/profiles/processor/processorSampleParams.cjs +38 -0
- package/dist/profiles/processor/processorSampleParams.cjs.map +1 -0
- package/dist/profiles/processor/processorSampleParams.d.ts +6 -0
- package/dist/profiles/processor/processorSampleParams.d.ts.map +1 -0
- package/dist/profiles/processor/processorSampleParams.js +38 -0
- package/dist/profiles/processor/processorSampleParams.js.map +1 -0
- package/dist/profiles/profileApi.cjs +16 -0
- package/dist/profiles/profileApi.cjs.map +1 -1
- package/dist/profiles/profileApi.d.ts +36 -3
- package/dist/profiles/profileApi.d.ts.map +1 -1
- package/dist/profiles/profileApi.js +16 -0
- package/dist/profiles/profileApi.js.map +1 -1
- package/dist/profiles/query/index.d.ts +9 -0
- package/dist/profiles/query/index.d.ts.map +1 -0
- package/dist/profiles/query/jsonPathSample.cjs +75 -0
- package/dist/profiles/query/jsonPathSample.cjs.map +1 -0
- package/dist/profiles/query/jsonPathSample.d.ts +27 -0
- package/dist/profiles/query/jsonPathSample.d.ts.map +1 -0
- package/dist/profiles/query/jsonPathSample.js +75 -0
- package/dist/profiles/query/jsonPathSample.js.map +1 -0
- package/dist/profiles/query/jsonPathSampleRow.cjs.map +1 -0
- package/dist/profiles/query/jsonPathSampleRow.d.ts.map +1 -0
- package/dist/profiles/query/jsonPathSampleRow.js.map +1 -0
- package/dist/profiles/query/kubernetesWorkloadTarget.cjs +43 -0
- package/dist/profiles/query/kubernetesWorkloadTarget.cjs.map +1 -0
- package/dist/profiles/query/kubernetesWorkloadTarget.d.ts +3 -0
- package/dist/profiles/query/kubernetesWorkloadTarget.d.ts.map +1 -0
- package/dist/profiles/query/kubernetesWorkloadTarget.js +43 -0
- package/dist/profiles/query/kubernetesWorkloadTarget.js.map +1 -0
- package/dist/profiles/query/kubernetesWorkloadTargetPicker.cjs +53 -0
- package/dist/profiles/query/kubernetesWorkloadTargetPicker.cjs.map +1 -0
- package/dist/profiles/query/kubernetesWorkloadTargetPicker.d.ts +12 -0
- package/dist/profiles/query/kubernetesWorkloadTargetPicker.d.ts.map +1 -0
- package/dist/profiles/query/kubernetesWorkloadTargetPicker.js +53 -0
- package/dist/profiles/query/kubernetesWorkloadTargetPicker.js.map +1 -0
- package/dist/profiles/query/profileSamplePayload.cjs.map +1 -0
- package/dist/profiles/query/profileSamplePayload.d.ts +13 -0
- package/dist/profiles/query/profileSamplePayload.d.ts.map +1 -0
- package/dist/profiles/query/profileSamplePayload.js.map +1 -0
- package/dist/profiles/query/prometheusResults.cjs +60 -0
- package/dist/profiles/query/prometheusResults.cjs.map +1 -0
- package/dist/profiles/query/prometheusResults.d.ts +7 -0
- package/dist/profiles/query/prometheusResults.d.ts.map +1 -0
- package/dist/profiles/query/prometheusResults.js +60 -0
- package/dist/profiles/query/prometheusResults.js.map +1 -0
- package/dist/profiles/query/queryRowLimits.cjs +82 -0
- package/dist/profiles/query/queryRowLimits.cjs.map +1 -0
- package/dist/profiles/query/queryRowLimits.d.ts +9 -0
- package/dist/profiles/query/queryRowLimits.d.ts.map +1 -0
- package/dist/profiles/query/queryRowLimits.js +82 -0
- package/dist/profiles/query/queryRowLimits.js.map +1 -0
- package/dist/profiles/query/queryRowLimitsModel.cjs.map +1 -0
- package/dist/profiles/query/queryRowLimitsModel.d.ts +9 -0
- package/dist/profiles/query/queryRowLimitsModel.d.ts.map +1 -0
- package/dist/profiles/query/queryRowLimitsModel.js.map +1 -0
- package/dist/profiles/query/queryTargetPicker.cjs +42 -0
- package/dist/profiles/query/queryTargetPicker.cjs.map +1 -0
- package/dist/profiles/query/queryTargetPicker.d.ts +8 -0
- package/dist/profiles/query/queryTargetPicker.d.ts.map +1 -0
- package/dist/profiles/query/queryTargetPicker.js +42 -0
- package/dist/profiles/query/queryTargetPicker.js.map +1 -0
- package/dist/profiles/wizard/index.d.ts +6 -0
- package/dist/profiles/wizard/index.d.ts.map +1 -0
- package/dist/profiles/wizard/profileWizard.cjs +257 -0
- package/dist/profiles/wizard/profileWizard.cjs.map +1 -0
- package/dist/profiles/wizard/profileWizard.d.ts +12 -0
- package/dist/profiles/wizard/profileWizard.d.ts.map +1 -0
- package/dist/profiles/wizard/profileWizard.js +257 -0
- package/dist/profiles/wizard/profileWizard.js.map +1 -0
- package/dist/profiles/wizard/profileWizardHelp.cjs.map +1 -0
- package/dist/profiles/wizard/profileWizardHelp.d.ts.map +1 -0
- package/dist/profiles/wizard/profileWizardHelp.js.map +1 -0
- package/dist/profiles/wizard/profileWizardModel.cjs +204 -0
- package/dist/profiles/wizard/profileWizardModel.cjs.map +1 -0
- package/dist/profiles/wizard/profileWizardModel.d.ts +266 -0
- package/dist/profiles/wizard/profileWizardModel.d.ts.map +1 -0
- package/dist/profiles/wizard/profileWizardModel.js +204 -0
- package/dist/profiles/wizard/profileWizardModel.js.map +1 -0
- package/dist/profiles/wizard/profileWizardQueryStep.cjs +215 -0
- package/dist/profiles/wizard/profileWizardQueryStep.cjs.map +1 -0
- package/dist/profiles/wizard/profileWizardQueryStep.d.ts.map +1 -0
- package/dist/profiles/wizard/profileWizardQueryStep.js +215 -0
- package/dist/profiles/wizard/profileWizardQueryStep.js.map +1 -0
- package/dist/profiles/wizard/profileWizardSteps.cjs +214 -0
- package/dist/profiles/wizard/profileWizardSteps.cjs.map +1 -0
- package/dist/profiles/wizard/profileWizardSteps.d.ts.map +1 -0
- package/dist/profiles/wizard/profileWizardSteps.js +214 -0
- package/dist/profiles/wizard/profileWizardSteps.js.map +1 -0
- package/dist/profiles.cjs +237 -178
- package/dist/profiles.cjs.map +1 -1
- package/dist/profiles.d.ts +8 -55
- package/dist/profiles.d.ts.map +1 -1
- package/dist/profiles.js +117 -58
- package/dist/profiles.js.map +1 -1
- package/dist/rpc/ChatLayer.cjs +27 -0
- package/dist/rpc/ChatLayer.cjs.map +1 -0
- package/dist/rpc/ChatLayer.d.ts +11 -0
- package/dist/rpc/ChatLayer.d.ts.map +1 -0
- package/dist/rpc/ChatLayer.js +27 -0
- package/dist/rpc/ChatLayer.js.map +1 -0
- package/dist/rpc/CommandForm.cjs +1 -1
- package/dist/rpc/CommandForm.cjs.map +1 -1
- package/dist/rpc/CommandForm.js +1 -1
- package/dist/rpc/CommandForm.js.map +1 -1
- package/dist/rpc/CommandOutput.cjs +29 -4
- package/dist/rpc/CommandOutput.cjs.map +1 -1
- package/dist/rpc/CommandOutput.d.ts +6 -2
- package/dist/rpc/CommandOutput.d.ts.map +1 -1
- package/dist/rpc/CommandOutput.js +29 -4
- package/dist/rpc/CommandOutput.js.map +1 -1
- package/dist/rpc/EndpointList.cjs +1 -1
- package/dist/rpc/EndpointList.cjs.map +1 -1
- package/dist/rpc/EndpointList.js +1 -1
- package/dist/rpc/EndpointList.js.map +1 -1
- package/dist/rpc/EntityExplorerApp.cjs +4 -1
- package/dist/rpc/EntityExplorerApp.cjs.map +1 -1
- package/dist/rpc/EntityExplorerApp.d.ts +3 -1
- package/dist/rpc/EntityExplorerApp.d.ts.map +1 -1
- package/dist/rpc/EntityExplorerApp.js +4 -1
- package/dist/rpc/EntityExplorerApp.js.map +1 -1
- package/dist/rpc/FilterForm.cjs +66 -80
- package/dist/rpc/FilterForm.cjs.map +1 -1
- package/dist/rpc/FilterForm.d.ts.map +1 -1
- package/dist/rpc/FilterForm.js +68 -82
- package/dist/rpc/FilterForm.js.map +1 -1
- package/dist/rpc/InlineError.cjs +19 -2
- package/dist/rpc/InlineError.cjs.map +1 -1
- package/dist/rpc/InlineError.d.ts +5 -1
- package/dist/rpc/InlineError.d.ts.map +1 -1
- package/dist/rpc/InlineError.js +19 -2
- package/dist/rpc/InlineError.js.map +1 -1
- package/dist/rpc/OperationCatalog.cjs +96 -100
- package/dist/rpc/OperationCatalog.cjs.map +1 -1
- package/dist/rpc/OperationCatalog.d.ts.map +1 -1
- package/dist/rpc/OperationCatalog.js +98 -102
- package/dist/rpc/OperationCatalog.js.map +1 -1
- package/dist/rpc/OperationCommandPage.cjs +19 -7
- package/dist/rpc/OperationCommandPage.cjs.map +1 -1
- package/dist/rpc/OperationCommandPage.d.ts.map +1 -1
- package/dist/rpc/OperationCommandPage.js +21 -9
- package/dist/rpc/OperationCommandPage.js.map +1 -1
- package/dist/rpc/OperationEntityContextPicker.cjs +25 -13
- package/dist/rpc/OperationEntityContextPicker.cjs.map +1 -1
- package/dist/rpc/OperationEntityContextPicker.d.ts.map +1 -1
- package/dist/rpc/OperationEntityContextPicker.js +26 -14
- package/dist/rpc/OperationEntityContextPicker.js.map +1 -1
- package/dist/rpc/OperationEntityPage.cjs +2 -8
- package/dist/rpc/OperationEntityPage.cjs.map +1 -1
- package/dist/rpc/OperationEntityPage.d.ts.map +1 -1
- package/dist/rpc/OperationEntityPage.js +2 -8
- package/dist/rpc/OperationEntityPage.js.map +1 -1
- package/dist/rpc/OperationResultView.cjs +13 -2
- package/dist/rpc/OperationResultView.cjs.map +1 -1
- package/dist/rpc/OperationResultView.d.ts +34 -2
- package/dist/rpc/OperationResultView.d.ts.map +1 -1
- package/dist/rpc/OperationResultView.js +13 -2
- package/dist/rpc/OperationResultView.js.map +1 -1
- package/dist/rpc/apiClient.cjs +11 -1
- package/dist/rpc/apiClient.cjs.map +1 -1
- package/dist/rpc/apiClient.d.ts +15 -5
- package/dist/rpc/apiClient.d.ts.map +1 -1
- package/dist/rpc/apiClient.js +12 -2
- package/dist/rpc/apiClient.js.map +1 -1
- package/dist/rpc/cursorStale.cjs +35 -0
- package/dist/rpc/cursorStale.cjs.map +1 -0
- package/dist/rpc/cursorStale.d.ts +23 -0
- package/dist/rpc/cursorStale.d.ts.map +1 -0
- package/dist/rpc/cursorStale.js +35 -0
- package/dist/rpc/cursorStale.js.map +1 -0
- package/dist/rpc/executionPages.cjs +94 -0
- package/dist/rpc/executionPages.cjs.map +1 -0
- package/dist/rpc/executionPages.d.ts +18 -0
- package/dist/rpc/executionPages.d.ts.map +1 -0
- package/dist/rpc/executionPages.js +94 -0
- package/dist/rpc/executionPages.js.map +1 -0
- package/dist/rpc/filterShapes.cjs +17 -0
- package/dist/rpc/filterShapes.cjs.map +1 -0
- package/dist/rpc/filterShapes.d.ts +22 -0
- package/dist/rpc/filterShapes.d.ts.map +1 -0
- package/dist/rpc/filterShapes.js +17 -0
- package/dist/rpc/filterShapes.js.map +1 -0
- package/dist/rpc/formMetadata.cjs +225 -50
- package/dist/rpc/formMetadata.cjs.map +1 -1
- package/dist/rpc/formMetadata.d.ts +18 -1
- package/dist/rpc/formMetadata.d.ts.map +1 -1
- package/dist/rpc/formMetadata.js +227 -52
- package/dist/rpc/formMetadata.js.map +1 -1
- package/dist/rpc/operationErrorDiagnostics.cjs +100 -0
- package/dist/rpc/operationErrorDiagnostics.cjs.map +1 -0
- package/dist/rpc/operationErrorDiagnostics.d.ts +4 -0
- package/dist/rpc/operationErrorDiagnostics.d.ts.map +1 -0
- package/dist/rpc/operationErrorDiagnostics.js +100 -0
- package/dist/rpc/operationErrorDiagnostics.js.map +1 -0
- package/dist/rpc/operationFilterSearch.cjs +1 -1
- package/dist/rpc/operationFilterSearch.cjs.map +1 -1
- package/dist/rpc/operationFilterSearch.js +2 -2
- package/dist/rpc/operationFilterSearch.js.map +1 -1
- package/dist/rpc/types.cjs.map +1 -1
- package/dist/rpc/types.d.ts +54 -3
- package/dist/rpc/types.d.ts.map +1 -1
- package/dist/rpc/types.js.map +1 -1
- package/dist/rpc/useOperationPages.cjs +111 -0
- package/dist/rpc/useOperationPages.cjs.map +1 -0
- package/dist/rpc/useOperationPages.d.ts +46 -0
- package/dist/rpc/useOperationPages.d.ts.map +1 -0
- package/dist/rpc/useOperationPages.js +111 -0
- package/dist/rpc/useOperationPages.js.map +1 -0
- package/dist/rpc/useOperations.cjs +7 -4
- package/dist/rpc/useOperations.cjs.map +1 -1
- package/dist/rpc/useOperations.d.ts.map +1 -1
- package/dist/rpc/useOperations.js +7 -4
- package/dist/rpc/useOperations.js.map +1 -1
- package/dist/rpc.cjs +2 -0
- package/dist/rpc.cjs.map +1 -1
- package/dist/rpc.d.ts +2 -1
- package/dist/rpc.d.ts.map +1 -1
- package/dist/rpc.js +2 -0
- package/dist/rpc.js.map +1 -1
- package/dist/styles.css +2 -2
- package/dist/tailwind-preset.cjs +6 -3
- package/dist/tailwind-preset.cjs.map +1 -1
- package/dist/tailwind-preset.d.ts.map +1 -1
- package/dist/tailwind-preset.js +6 -3
- package/dist/tailwind-preset.js.map +1 -1
- package/dist/utils.cjs +6 -0
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.ts +1 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +6 -0
- package/dist/utils.js.map +1 -1
- package/package.json +5 -5
- package/dist/profiles/catalogTree.cjs +0 -133
- package/dist/profiles/catalogTree.cjs.map +0 -1
- package/dist/profiles/catalogTree.d.ts.map +0 -1
- package/dist/profiles/catalogTree.js +0 -133
- package/dist/profiles/catalogTree.js.map +0 -1
- package/dist/profiles/connectionBrowserModel.cjs +0 -185
- package/dist/profiles/connectionBrowserModel.cjs.map +0 -1
- package/dist/profiles/connectionBrowserModel.d.ts +0 -169
- package/dist/profiles/connectionBrowserModel.d.ts.map +0 -1
- package/dist/profiles/connectionBrowserModel.js +0 -185
- package/dist/profiles/connectionBrowserModel.js.map +0 -1
- package/dist/profiles/connectionQueryWorkspace.cjs +0 -185
- package/dist/profiles/connectionQueryWorkspace.cjs.map +0 -1
- package/dist/profiles/connectionQueryWorkspace.d.ts +0 -63
- package/dist/profiles/connectionQueryWorkspace.d.ts.map +0 -1
- package/dist/profiles/connectionQueryWorkspace.js +0 -185
- package/dist/profiles/connectionQueryWorkspace.js.map +0 -1
- package/dist/profiles/connectionQueryWorkspaceModel.cjs +0 -28
- package/dist/profiles/connectionQueryWorkspaceModel.cjs.map +0 -1
- package/dist/profiles/connectionQueryWorkspaceModel.d.ts +0 -38
- package/dist/profiles/connectionQueryWorkspaceModel.d.ts.map +0 -1
- package/dist/profiles/connectionQueryWorkspaceModel.js +0 -28
- package/dist/profiles/connectionQueryWorkspaceModel.js.map +0 -1
- package/dist/profiles/esFieldValues.cjs +0 -64
- package/dist/profiles/esFieldValues.cjs.map +0 -1
- package/dist/profiles/esFieldValues.d.ts +0 -48
- package/dist/profiles/esFieldValues.d.ts.map +0 -1
- package/dist/profiles/esFieldValues.js +0 -64
- package/dist/profiles/esFieldValues.js.map +0 -1
- package/dist/profiles/esParamMappingModel.cjs +0 -301
- package/dist/profiles/esParamMappingModel.cjs.map +0 -1
- package/dist/profiles/esParamMappingModel.d.ts +0 -37
- package/dist/profiles/esParamMappingModel.d.ts.map +0 -1
- package/dist/profiles/esParamMappingModel.js +0 -301
- package/dist/profiles/esParamMappingModel.js.map +0 -1
- package/dist/profiles/esParamMappingPill.cjs.map +0 -1
- package/dist/profiles/esParamMappingPill.d.ts.map +0 -1
- package/dist/profiles/esParamMappingPill.js.map +0 -1
- package/dist/profiles/esParamOperandExtension.cjs +0 -75
- package/dist/profiles/esParamOperandExtension.cjs.map +0 -1
- package/dist/profiles/esParamOperandExtension.d.ts +0 -11
- package/dist/profiles/esParamOperandExtension.d.ts.map +0 -1
- package/dist/profiles/esParamOperandExtension.js +0 -75
- package/dist/profiles/esParamOperandExtension.js.map +0 -1
- package/dist/profiles/esQueryBuilder.cjs +0 -205
- package/dist/profiles/esQueryBuilder.cjs.map +0 -1
- package/dist/profiles/esQueryBuilder.d.ts +0 -35
- package/dist/profiles/esQueryBuilder.d.ts.map +0 -1
- package/dist/profiles/esQueryBuilder.js +0 -205
- package/dist/profiles/esQueryBuilder.js.map +0 -1
- package/dist/profiles/esQueryBuilderExtension.cjs.map +0 -1
- package/dist/profiles/esQueryBuilderExtension.d.ts +0 -5
- package/dist/profiles/esQueryBuilderExtension.d.ts.map +0 -1
- package/dist/profiles/esQueryBuilderExtension.js.map +0 -1
- package/dist/profiles/esQueryBuilderForm.cjs +0 -26
- package/dist/profiles/esQueryBuilderForm.cjs.map +0 -1
- package/dist/profiles/esQueryBuilderForm.d.ts +0 -18
- package/dist/profiles/esQueryBuilderForm.d.ts.map +0 -1
- package/dist/profiles/esQueryBuilderForm.js +0 -26
- package/dist/profiles/esQueryBuilderForm.js.map +0 -1
- package/dist/profiles/esQueryBuilderModel.cjs.map +0 -1
- package/dist/profiles/esQueryBuilderModel.d.ts +0 -108
- package/dist/profiles/esQueryBuilderModel.d.ts.map +0 -1
- package/dist/profiles/esQueryBuilderModel.js.map +0 -1
- package/dist/profiles/esQueryClauseGroup.cjs +0 -144
- package/dist/profiles/esQueryClauseGroup.cjs.map +0 -1
- package/dist/profiles/esQueryClauseGroup.d.ts.map +0 -1
- package/dist/profiles/esQueryClauseGroup.js +0 -144
- package/dist/profiles/esQueryClauseGroup.js.map +0 -1
- package/dist/profiles/esQueryCompile.cjs +0 -47
- package/dist/profiles/esQueryCompile.cjs.map +0 -1
- package/dist/profiles/esQueryCompile.d.ts +0 -39
- package/dist/profiles/esQueryCompile.d.ts.map +0 -1
- package/dist/profiles/esQueryCompile.js +0 -47
- package/dist/profiles/esQueryCompile.js.map +0 -1
- package/dist/profiles/esQueryConditionRow.cjs +0 -168
- package/dist/profiles/esQueryConditionRow.cjs.map +0 -1
- package/dist/profiles/esQueryConditionRow.d.ts +0 -37
- package/dist/profiles/esQueryConditionRow.d.ts.map +0 -1
- package/dist/profiles/esQueryConditionRow.js +0 -168
- package/dist/profiles/esQueryConditionRow.js.map +0 -1
- package/dist/profiles/esQueryGroupModel.cjs.map +0 -1
- package/dist/profiles/esQueryGroupModel.d.ts.map +0 -1
- package/dist/profiles/esQueryGroupModel.js.map +0 -1
- package/dist/profiles/esQueryOccur.cjs.map +0 -1
- package/dist/profiles/esQueryOccur.d.ts.map +0 -1
- package/dist/profiles/esQueryOccur.js.map +0 -1
- package/dist/profiles/esQueryOperandEditors.cjs +0 -279
- package/dist/profiles/esQueryOperandEditors.cjs.map +0 -1
- package/dist/profiles/esQueryOperandEditors.d.ts +0 -24
- package/dist/profiles/esQueryOperandEditors.d.ts.map +0 -1
- package/dist/profiles/esQueryOperandEditors.js +0 -279
- package/dist/profiles/esQueryOperandEditors.js.map +0 -1
- package/dist/profiles/esQueryOperandModel.cjs.map +0 -1
- package/dist/profiles/esQueryOperandModel.d.ts +0 -17
- package/dist/profiles/esQueryOperandModel.d.ts.map +0 -1
- package/dist/profiles/esQueryOperandModel.js.map +0 -1
- package/dist/profiles/esQueryOperators.cjs +0 -165
- package/dist/profiles/esQueryOperators.cjs.map +0 -1
- package/dist/profiles/esQueryOperators.d.ts +0 -83
- package/dist/profiles/esQueryOperators.d.ts.map +0 -1
- package/dist/profiles/esQueryOperators.js +0 -165
- package/dist/profiles/esQueryOperators.js.map +0 -1
- package/dist/profiles/esQueryOutputEditor.cjs +0 -138
- package/dist/profiles/esQueryOutputEditor.cjs.map +0 -1
- package/dist/profiles/esQueryOutputEditor.d.ts +0 -7
- package/dist/profiles/esQueryOutputEditor.d.ts.map +0 -1
- package/dist/profiles/esQueryOutputEditor.js +0 -138
- package/dist/profiles/esQueryOutputEditor.js.map +0 -1
- package/dist/profiles/esQueryOutputModel.cjs.map +0 -1
- package/dist/profiles/esQueryOutputModel.d.ts.map +0 -1
- package/dist/profiles/esQueryOutputModel.js.map +0 -1
- package/dist/profiles/esQueryPreview.cjs.map +0 -1
- package/dist/profiles/esQueryPreview.d.ts.map +0 -1
- package/dist/profiles/esQueryPreview.js.map +0 -1
- package/dist/profiles/esQuerySortEditor.cjs +0 -143
- package/dist/profiles/esQuerySortEditor.cjs.map +0 -1
- package/dist/profiles/esQuerySortEditor.d.ts.map +0 -1
- package/dist/profiles/esQuerySortEditor.js +0 -143
- package/dist/profiles/esQuerySortEditor.js.map +0 -1
- package/dist/profiles/esQuerySortModel.cjs.map +0 -1
- package/dist/profiles/esQuerySortModel.d.ts.map +0 -1
- package/dist/profiles/esQuerySortModel.js.map +0 -1
- package/dist/profiles/esValueCombobox.cjs +0 -86
- package/dist/profiles/esValueCombobox.cjs.map +0 -1
- package/dist/profiles/esValueCombobox.d.ts.map +0 -1
- package/dist/profiles/esValueCombobox.js +0 -86
- package/dist/profiles/esValueCombobox.js.map +0 -1
- package/dist/profiles/jsonPathSample.cjs +0 -75
- package/dist/profiles/jsonPathSample.cjs.map +0 -1
- package/dist/profiles/jsonPathSample.d.ts +0 -27
- package/dist/profiles/jsonPathSample.d.ts.map +0 -1
- package/dist/profiles/jsonPathSample.js +0 -75
- package/dist/profiles/jsonPathSample.js.map +0 -1
- package/dist/profiles/jsonPathSampleRow.cjs.map +0 -1
- package/dist/profiles/jsonPathSampleRow.d.ts.map +0 -1
- package/dist/profiles/jsonPathSampleRow.js.map +0 -1
- package/dist/profiles/profileBuilder.cjs +0 -65
- package/dist/profiles/profileBuilder.cjs.map +0 -1
- package/dist/profiles/profileBuilder.d.ts.map +0 -1
- package/dist/profiles/profileBuilder.js +0 -65
- package/dist/profiles/profileBuilder.js.map +0 -1
- package/dist/profiles/profileBuilderExtension.cjs.map +0 -1
- package/dist/profiles/profileBuilderExtension.d.ts +0 -5
- package/dist/profiles/profileBuilderExtension.d.ts.map +0 -1
- package/dist/profiles/profileBuilderExtension.js.map +0 -1
- package/dist/profiles/profileBuilderWorkspace.cjs +0 -368
- package/dist/profiles/profileBuilderWorkspace.cjs.map +0 -1
- package/dist/profiles/profileBuilderWorkspace.d.ts +0 -21
- package/dist/profiles/profileBuilderWorkspace.d.ts.map +0 -1
- package/dist/profiles/profileBuilderWorkspace.js +0 -368
- package/dist/profiles/profileBuilderWorkspace.js.map +0 -1
- package/dist/profiles/profileColumnModel.cjs.map +0 -1
- package/dist/profiles/profileColumnModel.d.ts +0 -8
- package/dist/profiles/profileColumnModel.d.ts.map +0 -1
- package/dist/profiles/profileColumnModel.js.map +0 -1
- package/dist/profiles/profileColumnPicker.cjs +0 -68
- package/dist/profiles/profileColumnPicker.cjs.map +0 -1
- package/dist/profiles/profileColumnPicker.d.ts +0 -11
- package/dist/profiles/profileColumnPicker.d.ts.map +0 -1
- package/dist/profiles/profileColumnPicker.js +0 -68
- package/dist/profiles/profileColumnPicker.js.map +0 -1
- package/dist/profiles/profileEditor.cjs +0 -386
- package/dist/profiles/profileEditor.cjs.map +0 -1
- package/dist/profiles/profileEditor.d.ts +0 -19
- package/dist/profiles/profileEditor.d.ts.map +0 -1
- package/dist/profiles/profileEditor.js +0 -386
- package/dist/profiles/profileEditor.js.map +0 -1
- package/dist/profiles/profileEditorModel.cjs +0 -181
- package/dist/profiles/profileEditorModel.cjs.map +0 -1
- package/dist/profiles/profileEditorModel.d.ts +0 -74
- package/dist/profiles/profileEditorModel.d.ts.map +0 -1
- package/dist/profiles/profileEditorModel.js +0 -181
- package/dist/profiles/profileEditorModel.js.map +0 -1
- package/dist/profiles/profileEditorPreview.cjs.map +0 -1
- package/dist/profiles/profileEditorPreview.d.ts +0 -12
- package/dist/profiles/profileEditorPreview.d.ts.map +0 -1
- package/dist/profiles/profileEditorPreview.js.map +0 -1
- package/dist/profiles/profileEditorRail.cjs.map +0 -1
- package/dist/profiles/profileEditorRail.d.ts.map +0 -1
- package/dist/profiles/profileEditorRail.js.map +0 -1
- package/dist/profiles/profileEditorRaw.cjs +0 -118
- package/dist/profiles/profileEditorRaw.cjs.map +0 -1
- package/dist/profiles/profileEditorRaw.d.ts +0 -7
- package/dist/profiles/profileEditorRaw.d.ts.map +0 -1
- package/dist/profiles/profileEditorRaw.js +0 -118
- package/dist/profiles/profileEditorRaw.js.map +0 -1
- package/dist/profiles/profileEditorRoutes.cjs.map +0 -1
- package/dist/profiles/profileEditorRoutes.d.ts.map +0 -1
- package/dist/profiles/profileEditorRoutes.js.map +0 -1
- package/dist/profiles/profileEditorSections.cjs +0 -213
- package/dist/profiles/profileEditorSections.cjs.map +0 -1
- package/dist/profiles/profileEditorSections.d.ts +0 -23
- package/dist/profiles/profileEditorSections.d.ts.map +0 -1
- package/dist/profiles/profileEditorSections.js +0 -213
- package/dist/profiles/profileEditorSections.js.map +0 -1
- package/dist/profiles/profileFieldEditor.cjs +0 -200
- package/dist/profiles/profileFieldEditor.cjs.map +0 -1
- package/dist/profiles/profileFieldEditor.d.ts +0 -34
- package/dist/profiles/profileFieldEditor.d.ts.map +0 -1
- package/dist/profiles/profileFieldEditor.js +0 -200
- package/dist/profiles/profileFieldEditor.js.map +0 -1
- package/dist/profiles/profileFieldGrid.cjs +0 -250
- package/dist/profiles/profileFieldGrid.cjs.map +0 -1
- package/dist/profiles/profileFieldGrid.d.ts +0 -20
- package/dist/profiles/profileFieldGrid.d.ts.map +0 -1
- package/dist/profiles/profileFieldGrid.js +0 -250
- package/dist/profiles/profileFieldGrid.js.map +0 -1
- package/dist/profiles/profileFieldManager.cjs +0 -103
- package/dist/profiles/profileFieldManager.cjs.map +0 -1
- package/dist/profiles/profileFieldManager.d.ts.map +0 -1
- package/dist/profiles/profileFieldManager.js +0 -103
- package/dist/profiles/profileFieldManager.js.map +0 -1
- package/dist/profiles/profileFieldState.cjs +0 -136
- package/dist/profiles/profileFieldState.cjs.map +0 -1
- package/dist/profiles/profileFieldState.d.ts +0 -41
- package/dist/profiles/profileFieldState.d.ts.map +0 -1
- package/dist/profiles/profileFieldState.js +0 -136
- package/dist/profiles/profileFieldState.js.map +0 -1
- package/dist/profiles/profileFieldTypes.cjs.map +0 -1
- package/dist/profiles/profileFieldTypes.d.ts +0 -8
- package/dist/profiles/profileFieldTypes.d.ts.map +0 -1
- package/dist/profiles/profileFieldTypes.js.map +0 -1
- package/dist/profiles/profileParamModel.cjs.map +0 -1
- package/dist/profiles/profileParamModel.d.ts +0 -3
- package/dist/profiles/profileParamModel.d.ts.map +0 -1
- package/dist/profiles/profileParamModel.js.map +0 -1
- package/dist/profiles/profileSamplePayload.cjs.map +0 -1
- package/dist/profiles/profileSamplePayload.d.ts +0 -13
- package/dist/profiles/profileSamplePayload.d.ts.map +0 -1
- package/dist/profiles/profileSamplePayload.js.map +0 -1
- package/dist/profiles/profileWizard.cjs +0 -257
- package/dist/profiles/profileWizard.cjs.map +0 -1
- package/dist/profiles/profileWizard.d.ts +0 -12
- package/dist/profiles/profileWizard.d.ts.map +0 -1
- package/dist/profiles/profileWizard.js +0 -257
- package/dist/profiles/profileWizard.js.map +0 -1
- package/dist/profiles/profileWizardHelp.cjs.map +0 -1
- package/dist/profiles/profileWizardHelp.d.ts.map +0 -1
- package/dist/profiles/profileWizardHelp.js.map +0 -1
- package/dist/profiles/profileWizardModel.cjs +0 -198
- package/dist/profiles/profileWizardModel.cjs.map +0 -1
- package/dist/profiles/profileWizardModel.d.ts +0 -255
- package/dist/profiles/profileWizardModel.d.ts.map +0 -1
- package/dist/profiles/profileWizardModel.js +0 -198
- package/dist/profiles/profileWizardModel.js.map +0 -1
- package/dist/profiles/profileWizardQueryStep.cjs +0 -215
- package/dist/profiles/profileWizardQueryStep.cjs.map +0 -1
- package/dist/profiles/profileWizardQueryStep.d.ts.map +0 -1
- package/dist/profiles/profileWizardQueryStep.js +0 -215
- package/dist/profiles/profileWizardQueryStep.js.map +0 -1
- package/dist/profiles/profileWizardSteps.cjs +0 -214
- package/dist/profiles/profileWizardSteps.cjs.map +0 -1
- package/dist/profiles/profileWizardSteps.d.ts.map +0 -1
- package/dist/profiles/profileWizardSteps.js +0 -214
- package/dist/profiles/profileWizardSteps.js.map +0 -1
- package/dist/profiles/profileYaml.cjs +0 -19
- package/dist/profiles/profileYaml.cjs.map +0 -1
- package/dist/profiles/profileYaml.d.ts +0 -4
- package/dist/profiles/profileYaml.d.ts.map +0 -1
- package/dist/profiles/profileYaml.js +0 -19
- package/dist/profiles/profileYaml.js.map +0 -1
- package/dist/profiles/prometheusResults.cjs +0 -60
- package/dist/profiles/prometheusResults.cjs.map +0 -1
- package/dist/profiles/prometheusResults.d.ts +0 -7
- package/dist/profiles/prometheusResults.d.ts.map +0 -1
- package/dist/profiles/prometheusResults.js +0 -60
- package/dist/profiles/prometheusResults.js.map +0 -1
- package/dist/profiles/queryRowLimits.cjs +0 -82
- package/dist/profiles/queryRowLimits.cjs.map +0 -1
- package/dist/profiles/queryRowLimits.d.ts +0 -9
- package/dist/profiles/queryRowLimits.d.ts.map +0 -1
- package/dist/profiles/queryRowLimits.js +0 -82
- package/dist/profiles/queryRowLimits.js.map +0 -1
- package/dist/profiles/queryRowLimitsModel.cjs.map +0 -1
- package/dist/profiles/queryRowLimitsModel.d.ts +0 -9
- package/dist/profiles/queryRowLimitsModel.d.ts.map +0 -1
- package/dist/profiles/queryRowLimitsModel.js.map +0 -1
- package/dist/profiles/queryTargetPicker.cjs +0 -42
- package/dist/profiles/queryTargetPicker.cjs.map +0 -1
- package/dist/profiles/queryTargetPicker.d.ts +0 -8
- package/dist/profiles/queryTargetPicker.d.ts.map +0 -1
- package/dist/profiles/queryTargetPicker.js +0 -42
- package/dist/profiles/queryTargetPicker.js.map +0 -1
- package/dist/profiles/testSchema.d.ts +0 -3
- package/dist/profiles/testSchema.d.ts.map +0 -1
- /package/dist/profiles/{catalogTree.d.ts → connections/catalogTree.d.ts} +0 -0
- /package/dist/profiles/{profileBuilder.d.ts → editor/profileBuilder.d.ts} +0 -0
- /package/dist/profiles/{profileBuilderExtension.cjs → editor/profileBuilderExtension.cjs} +0 -0
- /package/dist/profiles/{profileBuilderExtension.js → editor/profileBuilderExtension.js} +0 -0
- /package/dist/profiles/{profileEditorPreview.cjs → editor/profileEditorPreview.cjs} +0 -0
- /package/dist/profiles/{profileEditorPreview.js → editor/profileEditorPreview.js} +0 -0
- /package/dist/profiles/{profileEditorRail.cjs → editor/profileEditorRail.cjs} +0 -0
- /package/dist/profiles/{profileEditorRail.d.ts → editor/profileEditorRail.d.ts} +0 -0
- /package/dist/profiles/{profileEditorRail.js → editor/profileEditorRail.js} +0 -0
- /package/dist/profiles/{profileEditorRoutes.cjs → editor/profileEditorRoutes.cjs} +0 -0
- /package/dist/profiles/{profileEditorRoutes.d.ts → editor/profileEditorRoutes.d.ts} +0 -0
- /package/dist/profiles/{profileEditorRoutes.js → editor/profileEditorRoutes.js} +0 -0
- /package/dist/profiles/{esParamMappingPill.cjs → elasticsearch/esParamMappingPill.cjs} +0 -0
- /package/dist/profiles/{esParamMappingPill.d.ts → elasticsearch/esParamMappingPill.d.ts} +0 -0
- /package/dist/profiles/{esParamMappingPill.js → elasticsearch/esParamMappingPill.js} +0 -0
- /package/dist/profiles/{esQueryBuilderExtension.cjs → elasticsearch/esQueryBuilderExtension.cjs} +0 -0
- /package/dist/profiles/{esQueryBuilderExtension.js → elasticsearch/esQueryBuilderExtension.js} +0 -0
- /package/dist/profiles/{esQueryBuilderModel.cjs → elasticsearch/esQueryBuilderModel.cjs} +0 -0
- /package/dist/profiles/{esQueryBuilderModel.js → elasticsearch/esQueryBuilderModel.js} +0 -0
- /package/dist/profiles/{esQueryClauseGroup.d.ts → elasticsearch/esQueryClauseGroup.d.ts} +0 -0
- /package/dist/profiles/{esQueryGroupModel.cjs → elasticsearch/esQueryGroupModel.cjs} +0 -0
- /package/dist/profiles/{esQueryGroupModel.d.ts → elasticsearch/esQueryGroupModel.d.ts} +0 -0
- /package/dist/profiles/{esQueryGroupModel.js → elasticsearch/esQueryGroupModel.js} +0 -0
- /package/dist/profiles/{esQueryOccur.cjs → elasticsearch/esQueryOccur.cjs} +0 -0
- /package/dist/profiles/{esQueryOccur.d.ts → elasticsearch/esQueryOccur.d.ts} +0 -0
- /package/dist/profiles/{esQueryOccur.js → elasticsearch/esQueryOccur.js} +0 -0
- /package/dist/profiles/{esQueryOperandModel.cjs → elasticsearch/esQueryOperandModel.cjs} +0 -0
- /package/dist/profiles/{esQueryOperandModel.js → elasticsearch/esQueryOperandModel.js} +0 -0
- /package/dist/profiles/{esQueryOutputModel.cjs → elasticsearch/esQueryOutputModel.cjs} +0 -0
- /package/dist/profiles/{esQueryOutputModel.d.ts → elasticsearch/esQueryOutputModel.d.ts} +0 -0
- /package/dist/profiles/{esQueryOutputModel.js → elasticsearch/esQueryOutputModel.js} +0 -0
- /package/dist/profiles/{esQueryPreview.cjs → elasticsearch/esQueryPreview.cjs} +0 -0
- /package/dist/profiles/{esQueryPreview.d.ts → elasticsearch/esQueryPreview.d.ts} +0 -0
- /package/dist/profiles/{esQueryPreview.js → elasticsearch/esQueryPreview.js} +0 -0
- /package/dist/profiles/{esQuerySortEditor.d.ts → elasticsearch/esQuerySortEditor.d.ts} +0 -0
- /package/dist/profiles/{esQuerySortModel.cjs → elasticsearch/esQuerySortModel.cjs} +0 -0
- /package/dist/profiles/{esQuerySortModel.d.ts → elasticsearch/esQuerySortModel.d.ts} +0 -0
- /package/dist/profiles/{esQuerySortModel.js → elasticsearch/esQuerySortModel.js} +0 -0
- /package/dist/profiles/{esValueCombobox.d.ts → elasticsearch/esValueCombobox.d.ts} +0 -0
- /package/dist/profiles/{profileColumnModel.cjs → fields/profileColumnModel.cjs} +0 -0
- /package/dist/profiles/{profileColumnModel.js → fields/profileColumnModel.js} +0 -0
- /package/dist/profiles/{profileFieldManager.d.ts → fields/profileFieldManager.d.ts} +0 -0
- /package/dist/profiles/{profileFieldTypes.cjs → fields/profileFieldTypes.cjs} +0 -0
- /package/dist/profiles/{profileFieldTypes.js → fields/profileFieldTypes.js} +0 -0
- /package/dist/profiles/{profileParamModel.cjs → fields/profileParamModel.cjs} +0 -0
- /package/dist/profiles/{profileParamModel.js → fields/profileParamModel.js} +0 -0
- /package/dist/profiles/{jsonPathSampleRow.cjs → query/jsonPathSampleRow.cjs} +0 -0
- /package/dist/profiles/{jsonPathSampleRow.d.ts → query/jsonPathSampleRow.d.ts} +0 -0
- /package/dist/profiles/{jsonPathSampleRow.js → query/jsonPathSampleRow.js} +0 -0
- /package/dist/profiles/{profileSamplePayload.cjs → query/profileSamplePayload.cjs} +0 -0
- /package/dist/profiles/{profileSamplePayload.js → query/profileSamplePayload.js} +0 -0
- /package/dist/profiles/{queryRowLimitsModel.cjs → query/queryRowLimitsModel.cjs} +0 -0
- /package/dist/profiles/{queryRowLimitsModel.js → query/queryRowLimitsModel.js} +0 -0
- /package/dist/profiles/{profileWizardHelp.cjs → wizard/profileWizardHelp.cjs} +0 -0
- /package/dist/profiles/{profileWizardHelp.d.ts → wizard/profileWizardHelp.d.ts} +0 -0
- /package/dist/profiles/{profileWizardHelp.js → wizard/profileWizardHelp.js} +0 -0
- /package/dist/profiles/{profileWizardQueryStep.d.ts → wizard/profileWizardQueryStep.d.ts} +0 -0
- /package/dist/profiles/{profileWizardSteps.d.ts → wizard/profileWizardSteps.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClickyExportDialog.js","sources":["../../../src/data/clicky-export/ClickyExportDialog.tsx"],"sourcesContent":["import { useEffect, useState } from \"react\";\nimport { Button } from \"../../components/button\";\nimport { Modal } from \"../../overlay/Modal\";\nimport { Icon, type StaticIconComponent } from \"../Icon\";\nimport { cn } from \"../../lib/utils\";\n\n/** One format the endpoint advertises, already resolved for display. */\nexport type ClickyExportFormatOption = {\n /** Value handed back to `onDownload`. */\n format: string;\n label: string;\n /** What the format is for. */\n description?: string | undefined;\n icon?: StaticIconComponent | undefined;\n iconClassName?: string | undefined;\n};\n\n/** One result range the endpoint advertises. */\nexport type ClickyExportScopeOption = {\n /** Value handed back to `onDownload`; undefined for a legacy endpoint. */\n scope: string | undefined;\n label: string;\n /**\n * What this range costs or caps — \"Limited to 1,000 rows\", \"Streams rows as\n * they are read\". Per format, because a PDF's ceiling is not a CSV's.\n */\n note?: ((format: string) => string | undefined) | undefined;\n};\n\nexport type ClickyExportDialogProps = {\n open: boolean;\n onClose: () => void;\n title?: string;\n formats: ClickyExportFormatOption[];\n scopes: ClickyExportScopeOption[];\n /** Runs the export. Rejecting shows the reason without closing the dialog. */\n onDownload: (request: {\n format: string;\n scope: string | undefined;\n }) => Promise<void> | void;\n};\n\n/**\n * ClickyExportDialog picks a format and a range, then downloads.\n *\n * It exists because the same choice as a menu was 16 rows — every format times\n * every range — which pushed everything else in that menu out of reach and\n * still truncated the one thing worth reading: what each range costs.\n */\nexport function ClickyExportDialog({\n open,\n onClose,\n title = \"Export\",\n formats,\n scopes,\n onDownload,\n}: ClickyExportDialogProps) {\n const [format, setFormat] = useState(formats[0]?.format);\n const [scope, setScope] = useState(scopes[0]?.scope);\n const [pending, setPending] = useState(false);\n const [error, setError] = useState(\"\");\n\n // Reopening starts from a clean slate: the error belongs to the attempt that\n // produced it, not to the next one.\n useEffect(() => {\n if (open) setError(\"\");\n }, [open]);\n\n const activeScope = scopes.find((option) => option.scope === scope);\n\n const download = async () => {\n if (!format) return;\n setPending(true);\n setError(\"\");\n try {\n await onDownload({ format, scope });\n onClose();\n } catch (cause) {\n setError(cause instanceof Error ? cause.message : \"The export failed\");\n } finally {\n setPending(false);\n }\n };\n\n return (\n <Modal\n open={open}\n onClose={onClose}\n title={title}\n size=\"lg\"\n closeOnEsc\n footer={\n <div className=\"flex items-center justify-end gap-2\">\n <Button variant=\"outline\" onClick={onClose} disabled={pending}>\n Cancel\n </Button>\n <Button\n onClick={() => void download()}\n loading={pending}\n disabled={!format}\n >\n Download\n </Button>\n </div>\n }\n >\n <div className=\"space-y-4\">\n {error && (\n <div\n role=\"alert\"\n className=\"rounded-md border border-destructive/40 bg-destructive/5 p-3 text-sm text-destructive\"\n >\n {error}\n </div>\n )}\n\n {scopes.length > 1 ? (\n <fieldset>\n <legend className=\"mb-1.5 text-[11px] font-medium uppercase tracking-wide text-muted-foreground\">\n Rows\n </legend>\n <div className=\"flex flex-wrap gap-2\">\n {scopes.map((option) => (\n <label\n key={option.scope ?? \"default\"}\n className={cn(\n \"cursor-pointer rounded-md border px-3 py-1.5 text-sm transition-colors\",\n option.scope === scope\n ? \"border-foreground/20 bg-accent text-accent-foreground\"\n : \"border-input hover:bg-accent hover:text-accent-foreground\",\n )}\n >\n <input\n type=\"radio\"\n name=\"clicky-export-scope\"\n // Named explicitly: the input is visually hidden behind its\n // own styled label, so nothing else gives it a name.\n aria-label={option.label}\n className=\"sr-only\"\n checked={option.scope === scope}\n onChange={() => setScope(option.scope)}\n />\n {option.label}\n </label>\n ))}\n </div>\n </fieldset>\n ) : (\n scopes[0]?.label && (\n <p className=\"text-sm text-muted-foreground\">{scopes[0].label}</p>\n )\n )}\n\n <fieldset>\n <legend className=\"mb-1.5 text-[11px] font-medium uppercase tracking-wide text-muted-foreground\">\n Format\n </legend>\n <div className=\"grid gap-1 sm:grid-cols-2\">\n {formats.map((option) => {\n const note = activeScope?.note?.(option.format);\n return (\n <label\n key={option.format}\n className={cn(\n \"flex cursor-pointer items-start gap-2 rounded-md border px-3 py-2 text-left transition-colors\",\n option.format === format\n ? \"border-foreground/20 bg-accent text-accent-foreground\"\n : \"border-transparent hover:bg-accent hover:text-accent-foreground\",\n )}\n >\n <input\n type=\"radio\"\n name=\"clicky-export-format\"\n aria-label={option.label}\n className=\"sr-only\"\n checked={option.format === format}\n onChange={() => setFormat(option.format)}\n />\n {option.icon && (\n <Icon\n icon={option.icon}\n className={cn(\n \"mt-0.5 shrink-0 text-sm\",\n option.iconClassName ?? \"text-muted-foreground\",\n )}\n />\n )}\n <span className=\"min-w-0\">\n <span className=\"block text-sm font-medium\">\n {option.label}\n </span>\n {option.description && (\n <span className=\"mt-0.5 block text-xs text-muted-foreground\">\n {option.description}\n </span>\n )}\n {note && (\n <span className=\"mt-0.5 block text-xs text-amber-700 [[data-theme=dark]_&]:text-amber-400\">\n {note}\n </span>\n )}\n </span>\n </label>\n );\n })}\n </div>\n </fieldset>\n\n </div>\n </Modal>\n );\n}\n"],"names":["_a"],"mappings":";;;;;;AAiDO,SAAS,mBAAmB;AAAA,EACjC;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AACF,GAA4B;;AAC1B,QAAM,CAAC,QAAQ,SAAS,IAAI,UAAS,aAAQ,CAAC,MAAT,mBAAY,MAAM;AACvD,QAAM,CAAC,OAAO,QAAQ,IAAI,UAAS,YAAO,CAAC,MAAR,mBAAW,KAAK;AACnD,QAAM,CAAC,SAAS,UAAU,IAAI,SAAS,KAAK;AAC5C,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAS,EAAE;AAIrC,YAAU,MAAM;AACd,QAAI,eAAe,EAAE;AAAA,EACvB,GAAG,CAAC,IAAI,CAAC;AAET,QAAM,cAAc,OAAO,KAAK,CAA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AU,6BACb,UAAA,OAAO,OACV;AAAA,oBACC,OAAO,eACN,oBAAC,UAAK,WAAU,8CACb,iBAAO,aACV;AAAA,oBAED,QACC,oBAAC,QAAA,EAAK,WAAU,4EACb,UAAA,KAAA,CACH;AAAA,kBAAA,EAAA,CAEJ;AAAA,gBAAA;AAAA,cAAA;AAAA,cAvCK,OAAO;AAAA,YAAA;AAAA,UA0ClB,CAAC,EAAA,CACH;AAAA,QAAA,EAAA,CACF;AAAA,MAAA,EAAA,CAEF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { ClickyExportDialog, type ClickyExportDialogProps, type ClickyExportFormatOption, type ClickyExportScopeOption, } from './ClickyExportDialog';
|
|
2
|
+
export { useClickyExport, type UseClickyExportOptions, type UseClickyExportResult, } from './useClickyExport';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/data/clicky-export/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,GAC7B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,eAAe,EACf,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,GAC3B,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const react = require("react");
|
|
5
|
+
const ClickyExportDialog = require("./ClickyExportDialog.cjs");
|
|
6
|
+
const UiCloudDownload = require("../../icons/components/UiCloudDownload.cjs");
|
|
7
|
+
function useClickyExport({
|
|
8
|
+
formats,
|
|
9
|
+
scopes,
|
|
10
|
+
onDownload,
|
|
11
|
+
label = "Export…",
|
|
12
|
+
title
|
|
13
|
+
}) {
|
|
14
|
+
const [open, setOpen] = react.useState(false);
|
|
15
|
+
const close = react.useCallback(() => setOpen(false), []);
|
|
16
|
+
const available = formats.length > 0;
|
|
17
|
+
const action = react.useMemo(
|
|
18
|
+
() => available ? {
|
|
19
|
+
id: "export",
|
|
20
|
+
label,
|
|
21
|
+
icon: UiCloudDownload.UiCloudDownload,
|
|
22
|
+
section: "",
|
|
23
|
+
onSelect: () => setOpen(true)
|
|
24
|
+
} : void 0,
|
|
25
|
+
[available, label]
|
|
26
|
+
);
|
|
27
|
+
if (!available) return { action: void 0, dialog: null };
|
|
28
|
+
return {
|
|
29
|
+
action,
|
|
30
|
+
dialog: /* @__PURE__ */ jsxRuntime.jsx(
|
|
31
|
+
ClickyExportDialog.ClickyExportDialog,
|
|
32
|
+
{
|
|
33
|
+
open,
|
|
34
|
+
onClose: close,
|
|
35
|
+
formats,
|
|
36
|
+
scopes,
|
|
37
|
+
onDownload,
|
|
38
|
+
...title ? { title } : {}
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
exports.useClickyExport = useClickyExport;
|
|
44
|
+
//# sourceMappingURL=useClickyExport.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useClickyExport.cjs","sources":["../../../src/data/clicky-export/useClickyExport.tsx"],"sourcesContent":["import { useCallback, useMemo, useState, type ReactNode } from \"react\";\nimport { UiCloudDownload } from \"../../icons\";\nimport type { DataTableMenuAction } from \"../DataTable\";\nimport {\n ClickyExportDialog,\n type ClickyExportFormatOption,\n type ClickyExportScopeOption,\n} from \"./ClickyExportDialog\";\n\nexport type UseClickyExportOptions = {\n formats: ClickyExportFormatOption[];\n scopes: ClickyExportScopeOption[];\n onDownload: (request: {\n format: string;\n scope: string | undefined;\n }) => Promise<void> | void;\n /** Menu row label. Defaults to \"Export…\". */\n label?: string | undefined;\n /** Dialog heading. Defaults to \"Export\". */\n title?: string | undefined;\n};\n\nexport type UseClickyExportResult = {\n /** \"Export…\" for the table's overflow menu; absent with nothing to export. */\n action: DataTableMenuAction | undefined;\n /** Render alongside the table — the dialog the action opens. */\n dialog: ReactNode;\n};\n\n/**\n * useClickyExport puts a single \"Export…\" row in a table's overflow menu.\n *\n * One row rather than one per format-and-range: the choice belongs in a dialog\n * that has room to say what each range costs, and a menu whose formats outnumber\n * everything else in it is a menu whose other entries never get found.\n */\nexport function useClickyExport({\n formats,\n scopes,\n onDownload,\n label = \"Export…\",\n title,\n}: UseClickyExportOptions): UseClickyExportResult {\n const [open, setOpen] = useState(false);\n const close = useCallback(() => setOpen(false), []);\n const available = formats.length > 0;\n const action = useMemo<DataTableMenuAction | undefined>(\n () =>\n available\n ? {\n id: \"export\",\n label,\n icon: UiCloudDownload,\n section: \"\",\n onSelect: () => setOpen(true),\n }\n : undefined,\n [available, label],\n );\n\n if (!available) return { action: undefined, dialog: null };\n\n return {\n action,\n dialog: (\n <ClickyExportDialog\n open={open}\n onClose={close}\n formats={formats}\n scopes={scopes}\n onDownload={onDownload}\n {...(title ? { title } : {})}\n />\n ),\n };\n}\n"],"names":["useState","useCallback","useMemo","UiCloudDownload","jsx","ClickyExportDialog"],"mappings":";;;;;;AAoCO,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR;AACF,GAAkD;AAChD,QAAM,CAAC,MAAM,OAAO,IAAIA,MAAAA,SAAS,KAAK;AACtC,QAAM,QAAQC,MAAAA,YAAY,MAAM,QAAQ,KAAK,GAAG,CAAA,CAAE;AAClD,QAAM,YAAY,QAAQ,SAAS;AACnC,QAAM,SAASC,MAAAA;AAAAA,IACb,MACE,YACI;AAAA,MACE,IAAI;AAAA,MACJ;AAAA,MACA,MAAMC,gBAAAA;AAAAA,MACN,SAAS;AAAA,MACT,UAAU,MAAM,QAAQ,IAAI;AAAA,IAAA,IAE9B;AAAA,IACN,CAAC,WAAW,KAAK;AAAA,EAAA;AAGnB,MAAI,CAAC,UAAW,QAAO,EAAE,QAAQ,QAAW,QAAQ,KAAA;AAEpD,SAAO;AAAA,IACL;AAAA,IACA,QACEC,2BAAAA;AAAAA,MAACC,mBAAAA;AAAAA,MAAA;AAAA,QACC;AAAA,QACA,SAAS;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACC,GAAI,QAAQ,EAAE,UAAU,CAAA;AAAA,MAAC;AAAA,IAAA;AAAA,EAC5B;AAGN;;"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { DataTableMenuAction } from '../DataTable';
|
|
3
|
+
import { ClickyExportFormatOption, ClickyExportScopeOption } from './ClickyExportDialog';
|
|
4
|
+
export type UseClickyExportOptions = {
|
|
5
|
+
formats: ClickyExportFormatOption[];
|
|
6
|
+
scopes: ClickyExportScopeOption[];
|
|
7
|
+
onDownload: (request: {
|
|
8
|
+
format: string;
|
|
9
|
+
scope: string | undefined;
|
|
10
|
+
}) => Promise<void> | void;
|
|
11
|
+
/** Menu row label. Defaults to "Export…". */
|
|
12
|
+
label?: string | undefined;
|
|
13
|
+
/** Dialog heading. Defaults to "Export". */
|
|
14
|
+
title?: string | undefined;
|
|
15
|
+
};
|
|
16
|
+
export type UseClickyExportResult = {
|
|
17
|
+
/** "Export…" for the table's overflow menu; absent with nothing to export. */
|
|
18
|
+
action: DataTableMenuAction | undefined;
|
|
19
|
+
/** Render alongside the table — the dialog the action opens. */
|
|
20
|
+
dialog: ReactNode;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* useClickyExport puts a single "Export…" row in a table's overflow menu.
|
|
24
|
+
*
|
|
25
|
+
* One row rather than one per format-and-range: the choice belongs in a dialog
|
|
26
|
+
* that has room to say what each range costs, and a menu whose formats outnumber
|
|
27
|
+
* everything else in it is a menu whose other entries never get found.
|
|
28
|
+
*/
|
|
29
|
+
export declare function useClickyExport({ formats, scopes, onDownload, label, title, }: UseClickyExportOptions): UseClickyExportResult;
|
|
30
|
+
//# sourceMappingURL=useClickyExport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useClickyExport.d.ts","sourceRoot":"","sources":["../../../src/data/clicky-export/useClickyExport.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAEL,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC7B,MAAM,sBAAsB,CAAC;AAE9B,MAAM,MAAM,sBAAsB,GAAG;IACnC,OAAO,EAAE,wBAAwB,EAAE,CAAC;IACpC,MAAM,EAAE,uBAAuB,EAAE,CAAC;IAClC,UAAU,EAAE,CAAC,OAAO,EAAE;QACpB,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;KAC3B,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC3B,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,8EAA8E;IAC9E,MAAM,EAAE,mBAAmB,GAAG,SAAS,CAAC;IACxC,gEAAgE;IAChE,MAAM,EAAE,SAAS,CAAC;CACnB,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,MAAM,EACN,UAAU,EACV,KAAiB,EACjB,KAAK,GACN,EAAE,sBAAsB,GAAG,qBAAqB,CAiChD"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useCallback, useMemo } from "react";
|
|
3
|
+
import { ClickyExportDialog } from "./ClickyExportDialog.js";
|
|
4
|
+
import { UiCloudDownload } from "../../icons/components/UiCloudDownload.js";
|
|
5
|
+
function useClickyExport({
|
|
6
|
+
formats,
|
|
7
|
+
scopes,
|
|
8
|
+
onDownload,
|
|
9
|
+
label = "Export…",
|
|
10
|
+
title
|
|
11
|
+
}) {
|
|
12
|
+
const [open, setOpen] = useState(false);
|
|
13
|
+
const close = useCallback(() => setOpen(false), []);
|
|
14
|
+
const available = formats.length > 0;
|
|
15
|
+
const action = useMemo(
|
|
16
|
+
() => available ? {
|
|
17
|
+
id: "export",
|
|
18
|
+
label,
|
|
19
|
+
icon: UiCloudDownload,
|
|
20
|
+
section: "",
|
|
21
|
+
onSelect: () => setOpen(true)
|
|
22
|
+
} : void 0,
|
|
23
|
+
[available, label]
|
|
24
|
+
);
|
|
25
|
+
if (!available) return { action: void 0, dialog: null };
|
|
26
|
+
return {
|
|
27
|
+
action,
|
|
28
|
+
dialog: /* @__PURE__ */ jsx(
|
|
29
|
+
ClickyExportDialog,
|
|
30
|
+
{
|
|
31
|
+
open,
|
|
32
|
+
onClose: close,
|
|
33
|
+
formats,
|
|
34
|
+
scopes,
|
|
35
|
+
onDownload,
|
|
36
|
+
...title ? { title } : {}
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
useClickyExport
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=useClickyExport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useClickyExport.js","sources":["../../../src/data/clicky-export/useClickyExport.tsx"],"sourcesContent":["import { useCallback, useMemo, useState, type ReactNode } from \"react\";\nimport { UiCloudDownload } from \"../../icons\";\nimport type { DataTableMenuAction } from \"../DataTable\";\nimport {\n ClickyExportDialog,\n type ClickyExportFormatOption,\n type ClickyExportScopeOption,\n} from \"./ClickyExportDialog\";\n\nexport type UseClickyExportOptions = {\n formats: ClickyExportFormatOption[];\n scopes: ClickyExportScopeOption[];\n onDownload: (request: {\n format: string;\n scope: string | undefined;\n }) => Promise<void> | void;\n /** Menu row label. Defaults to \"Export…\". */\n label?: string | undefined;\n /** Dialog heading. Defaults to \"Export\". */\n title?: string | undefined;\n};\n\nexport type UseClickyExportResult = {\n /** \"Export…\" for the table's overflow menu; absent with nothing to export. */\n action: DataTableMenuAction | undefined;\n /** Render alongside the table — the dialog the action opens. */\n dialog: ReactNode;\n};\n\n/**\n * useClickyExport puts a single \"Export…\" row in a table's overflow menu.\n *\n * One row rather than one per format-and-range: the choice belongs in a dialog\n * that has room to say what each range costs, and a menu whose formats outnumber\n * everything else in it is a menu whose other entries never get found.\n */\nexport function useClickyExport({\n formats,\n scopes,\n onDownload,\n label = \"Export…\",\n title,\n}: UseClickyExportOptions): UseClickyExportResult {\n const [open, setOpen] = useState(false);\n const close = useCallback(() => setOpen(false), []);\n const available = formats.length > 0;\n const action = useMemo<DataTableMenuAction | undefined>(\n () =>\n available\n ? {\n id: \"export\",\n label,\n icon: UiCloudDownload,\n section: \"\",\n onSelect: () => setOpen(true),\n }\n : undefined,\n [available, label],\n );\n\n if (!available) return { action: undefined, dialog: null };\n\n return {\n action,\n dialog: (\n <ClickyExportDialog\n open={open}\n onClose={close}\n formats={formats}\n scopes={scopes}\n onDownload={onDownload}\n {...(title ? { title } : {})}\n />\n ),\n };\n}\n"],"names":[],"mappings":";;;;AAoCO,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR;AACF,GAAkD;AAChD,QAAM,CAAC,MAAM,OAAO,IAAI,SAAS,KAAK;AACtC,QAAM,QAAQ,YAAY,MAAM,QAAQ,KAAK,GAAG,CAAA,CAAE;AAClD,QAAM,YAAY,QAAQ,SAAS;AACnC,QAAM,SAAS;AAAA,IACb,MACE,YACI;AAAA,MACE,IAAI;AAAA,MACJ;AAAA,MACA,MAAM;AAAA,MACN,SAAS;AAAA,MACT,UAAU,MAAM,QAAQ,IAAI;AAAA,IAAA,IAE9B;AAAA,IACN,CAAC,WAAW,KAAK;AAAA,EAAA;AAGnB,MAAI,CAAC,UAAW,QAAO,EAAE,QAAQ,QAAW,QAAQ,KAAA;AAEpD,SAAO;AAAA,IACL;AAAA,IACA,QACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,SAAS;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACC,GAAI,QAAQ,EAAE,UAAU,CAAA;AAAA,MAAC;AAAA,IAAA;AAAA,EAC5B;AAGN;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const filterBarUtils = require("../components/filter-bar-utils.cjs");
|
|
4
|
+
const format = require("../lib/format.cjs");
|
|
4
5
|
const dataTableFilterValues = require("./data-table-filter-values.cjs");
|
|
5
6
|
const dataTableUtils = require("./data-table-utils.cjs");
|
|
6
7
|
const DATA_TABLE_FILTER_LOOKUP_LIMIT = 20;
|
|
@@ -58,15 +59,21 @@ function buildFilter(args) {
|
|
|
58
59
|
};
|
|
59
60
|
switch (filter.kind) {
|
|
60
61
|
case "time":
|
|
62
|
+
// A date range is the same two-edged control with the clock taken off it,
|
|
63
|
+
// so it shares every line below except timeEnabled.
|
|
64
|
+
case "date":
|
|
61
65
|
return {
|
|
62
66
|
...shared,
|
|
63
67
|
kind: "date-range",
|
|
64
68
|
...boundsToRange(dataTableFilterValues.parseBoundsValue(raw)),
|
|
65
69
|
onApply: (from, to) => write(dataTableFilterValues.serializeBoundsValue({ min: from, max: to })),
|
|
66
70
|
...filter.presets !== void 0 ? { presets: filter.presets } : {},
|
|
67
|
-
timeEnabled:
|
|
71
|
+
timeEnabled: filter.kind === "time"
|
|
68
72
|
};
|
|
69
73
|
case "range":
|
|
74
|
+
// A duration is a range that knows what its numbers mean, so it differs
|
|
75
|
+
// only in how the slider labels them.
|
|
76
|
+
case "duration":
|
|
70
77
|
return {
|
|
71
78
|
...shared,
|
|
72
79
|
kind: "number",
|
|
@@ -74,8 +81,14 @@ function buildFilter(args) {
|
|
|
74
81
|
onChange: (next) => write(dataTableFilterValues.serializeBoundsValue(next)),
|
|
75
82
|
...filter.min !== void 0 ? { domainMin: filter.min } : {},
|
|
76
83
|
...filter.max !== void 0 ? { domainMax: filter.max } : {},
|
|
77
|
-
...filter.step !== void 0 ? { step: filter.step } : {}
|
|
84
|
+
...filter.step !== void 0 ? { step: filter.step } : {},
|
|
85
|
+
...filter.kind === "duration" ? { formatValue: (value) => format.formatUnit(value, filter.unit || "ms") } : {}
|
|
78
86
|
};
|
|
87
|
+
// An exact match has nothing to enumerate, which is what buildTermsFilter
|
|
88
|
+
// already falls back to for a selection that turned out to have no values.
|
|
89
|
+
// Declaring it says so up front rather than arriving there by exhaustion.
|
|
90
|
+
case "exact":
|
|
91
|
+
return { ...shared, kind: "text", value: raw, onChange: (next) => write(next) };
|
|
79
92
|
case "boolean":
|
|
80
93
|
return {
|
|
81
94
|
...shared,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-table-server-filters.cjs","sources":["../../src/data/data-table-server-filters.ts"],"sourcesContent":["import type { Dispatch, SetStateAction } from \"react\";\nimport type {\n FilterBarFilter,\n FilterBarNumberValue,\n FilterBarRangePreset,\n FilterBarRangeProps,\n} from \"../components/FilterBar\";\nimport type { FilterExtension } from \"../components/filter-bar-utils\";\nimport { applyFilterExtensions } from \"../components/filter-bar-utils\";\nimport type { MultiSelectOption } from \"../components/MultiSelect\";\nimport type { TriState } from \"../components/TriStateToggle\";\nimport type { DataTableColumn, DataTableColumnKind } from \"./DataTable\";\nimport {\n parseBoundsValue,\n parseMultiFilterValue,\n serializeBoundsValue,\n serializeMultiFilterValue,\n updateFilterSelection,\n type DataTableFilterSelection,\n type FilterBoundsValue,\n} from \"./data-table-filter-values\";\nimport { prettifyKey } from \"./data-table-utils\";\n\n/**\n * Which control a filter renders as.\n *\n * Deliberately opaque: \"terms\" is not \"a SQL IN() or an OpenSearch terms\n * query\", it is \"a set of discrete values the user includes or excludes\". The\n * source compiles the selection; nothing about how it does so crosses into the\n * browser.\n */\nexport type DataTableFilterKind = \"terms\" | \"range\" | \"time\" | \"boolean\" | \"text\";\n\nexport type DataTableFilterOption = {\n /** Value written into the selection. */\n value: string;\n /** Display label. Falls back to `value`. */\n label?: string;\n /** How many rows carry this value, shown as a tooltip. */\n count?: number;\n};\n\nexport type DataTableColumnFilter = {\n kind: DataTableFilterKind;\n /** Head of the option set for kind:\"terms\". Empty relies on `lookup`. */\n options?: DataTableFilterOption[];\n /** True when `options` is a capped head of a larger set. */\n truncated?: boolean;\n /** Distinct count behind a truncated head; drives the \"… and N more\" hint. */\n total?: number;\n /** The source can answer a type-ahead for this filter. */\n lookup?: boolean;\n /** Slider domain for kind:\"range\". */\n min?: number;\n max?: number;\n step?: number;\n /** Range presets for kind:\"time\". */\n presets?: FilterBarRangePreset[];\n /** Helper text shown in the filter popover. */\n description?: string;\n disabled?: boolean;\n};\n\n/**\n * A result column as the source describes it: how to render it, and — when the\n * source can narrow on it — which filter parameter it binds to and what control\n * that filter is.\n *\n * `filterKey` need not equal `name`: an analyzed text field filters through an\n * exact-value sibling, and a computed column filters by the alias it was given.\n */\nexport type DataTableServerColumn = {\n /** Field name as the source knows it; also the literal row key. */\n name: string;\n /** Header label. Defaults to a prettified `name`. */\n label?: string;\n /** Backend type string, verbatim (e.g. \"TIMESTAMPTZ\", \"keyword\"). Display only. */\n databaseType?: string;\n /** Cell rendering kind. */\n kind?: DataTableColumnKind;\n /** Filter parameter this column narrows on. Absent means not filterable. */\n filterKey?: string;\n /** The control the filter renders as. Absent means not filterable. */\n filter?: DataTableColumnFilter;\n};\n\n/** Head-set size for a filter value type-ahead. */\nexport const DATA_TABLE_FILTER_LOOKUP_LIMIT = 20;\n\nexport type DataTableFilterLookupRequest = {\n /** Which filter is being searched — the column's `filterKey`. */\n filterKey: string;\n /** What the user typed. Empty asks for the head of the set. */\n search: string;\n /** How many options to return. */\n limit: number;\n};\n\nexport type DataTableFilterLookupResult = {\n options: DataTableFilterOption[];\n};\n\n/**\n * Answers a filter's value type-ahead. Sync or async — a static option source\n * returns an array, a server-backed one a promise.\n */\nexport type DataTableFilterLookup = (\n request: DataTableFilterLookupRequest,\n) => Promise<DataTableFilterLookupResult> | DataTableFilterLookupResult;\n\nexport type ServerFilterBarOptions = {\n /** Answers a terms type-ahead for filters whose `lookup` is set. */\n lookupValues?: DataTableFilterLookup;\n /** Decorators applied to each built filter (icons, relabelling). */\n extensions?: FilterExtension[];\n};\n\nexport type ServerFilterConfig = {\n filters: FilterBarFilter[];\n /** Present when exactly one column declared kind:\"time\". */\n timeRange?: FilterBarRangeProps;\n};\n\n/**\n * Turns the source's column description into DataTable columns.\n *\n * Every column gets a literal `accessor` — a raw result set has empty, dotted\n * and colliding names, none of which survive being read as a path — and\n * `filterable: false`, because a described result is filtered by the source and\n * never by cardinality guessed from one page.\n */\nexport function serverColumnsToDataTableColumns<T extends Record<string, unknown>>(\n columns: DataTableServerColumn[],\n): DataTableColumn<T>[] {\n return columns.map((column, index) => ({\n key: column.name === \"\" ? `column-${index}` : column.name,\n label: column.label ?? prettifyKey(column.name),\n accessor: (row: T) => row[column.name],\n sortable: true,\n filterable: false,\n ...(column.kind !== undefined ? { kind: column.kind } : {}),\n ...(column.filterKey !== undefined ? { filterKey: column.filterKey } : {}),\n }));\n}\n\n/**\n * Builds the FilterBar controls for a described result, already wired to\n * `values`/`setValues`.\n *\n * Pure — it holds no state and fetches nothing; a `lookup` filter closes over\n * the caller's loader. Pass the result as DataTable's `externalFilters`\n * together with `manualFilter`, since the source has already applied it.\n *\n * Throws when a column declares a filter it cannot address: no `filterKey`, a\n * `filterKey` another column already claimed, or a second time range. Each\n * would bind a control to a filter that means something else.\n */\nexport function serverFiltersToFilterBar(\n columns: DataTableServerColumn[],\n values: DataTableFilterSelection,\n setValues: Dispatch<SetStateAction<DataTableFilterSelection>>,\n options: ServerFilterBarOptions = {},\n): ServerFilterConfig {\n const config: ServerFilterConfig = { filters: [] };\n const claimed = new Map<string, string>();\n\n for (const column of columns) {\n const filter = column.filter;\n if (!filter) continue;\n const filterKey = column.filterKey;\n if (!filterKey) {\n throw new Error(`Column ${column.name} declares a filter but no filterKey to send it under`);\n }\n const owner = claimed.get(filterKey);\n if (owner !== undefined) {\n throw new Error(\n `Columns ${owner} and ${column.name} both filter through ${filterKey}; a filter key addresses one column`,\n );\n }\n claimed.set(filterKey, column.name);\n\n const label = column.label ?? prettifyKey(column.name);\n // The bar's own range control is the primary way through a result, and a\n // result has one of those — so the first time column takes it and any\n // others are ranges among the filters. A raw SELECT commonly returns\n // created_at beside updated_at, and refusing the second one cost the whole\n // bar rather than just that column's control.\n if (filter.kind === \"time\" && !config.timeRange) {\n config.timeRange = buildTimeRange(filterKey, filter, values, setValues);\n continue;\n }\n config.filters.push(\n applyFilterExtensions(\n buildFilter({ column, filterKey, label, filter, values, setValues, options }),\n options.extensions,\n ),\n );\n }\n return config;\n}\n\ntype BuildArgs = {\n column: DataTableServerColumn;\n filterKey: string;\n label: string;\n filter: DataTableColumnFilter;\n values: DataTableFilterSelection;\n setValues: Dispatch<SetStateAction<DataTableFilterSelection>>;\n options: ServerFilterBarOptions;\n};\n\nfunction buildFilter(args: BuildArgs): FilterBarFilter {\n const { filterKey, label, filter, values, setValues } = args;\n const raw = values[filterKey] ?? \"\";\n const write = (serialized: string) =>\n setValues((current) => updateFilterSelection(current, filterKey, serialized));\n const shared = {\n key: filterKey,\n label,\n ...(filter.description !== undefined ? { description: filter.description } : {}),\n ...(filter.disabled !== undefined ? { disabled: filter.disabled } : {}),\n };\n\n switch (filter.kind) {\n case \"time\":\n return {\n ...shared,\n kind: \"date-range\",\n ...boundsToRange(parseBoundsValue(raw)),\n onApply: (from: string, to: string) =>\n write(serializeBoundsValue({ min: from, max: to })),\n ...(filter.presets !== undefined ? { presets: filter.presets } : {}),\n timeEnabled: true,\n };\n case \"range\":\n return {\n ...shared,\n kind: \"number\",\n value: parseBoundsValue(raw),\n onChange: (next: FilterBarNumberValue) => write(serializeBoundsValue(next)),\n ...(filter.min !== undefined ? { domainMin: filter.min } : {}),\n ...(filter.max !== undefined ? { domainMax: filter.max } : {}),\n ...(filter.step !== undefined ? { step: filter.step } : {}),\n };\n case \"boolean\":\n return {\n ...shared,\n kind: \"tristate\",\n value: raw === \"\" ? undefined : raw === \"true\",\n onChange: (next: TriState) => write(next === undefined ? \"\" : String(next)),\n };\n case \"text\":\n return {\n ...shared,\n kind: \"text\",\n value: raw,\n onChange: (next: string) => write(next),\n };\n default:\n return buildTermsFilter(args, shared, raw, write);\n }\n}\n\nfunction buildTermsFilter(\n { filter, options }: BuildArgs,\n shared: { key: string; label: string; description?: string; disabled?: boolean },\n raw: string,\n write: (serialized: string) => void,\n): FilterBarFilter {\n const lookupValues = options.lookupValues;\n // A selection with no options and no type-ahead has nothing to select from,\n // and a dropdown that opens empty is a control the user cannot use. The\n // grammar is the wire format either way, so typing \"a,b\" or \"!a\" into the\n // input still means what selecting them would have.\n if (!filter.lookup && (filter.options?.length ?? 0) === 0) {\n return { ...shared, kind: \"text\", value: raw, onChange: (next: string) => write(next) };\n }\n return {\n ...shared,\n kind: \"multi\",\n value: parseMultiFilterValue(raw),\n onChange: (next) => write(serializeMultiFilterValue(next)),\n options: (filter.options ?? []).map(toMultiSelectOption),\n ...(filter.truncated !== undefined ? { truncated: filter.truncated } : {}),\n ...(filter.total !== undefined ? { total: filter.total } : {}),\n // The field owns the in-flight flag from the promise this returns, so no\n // `loading` is passed: a second source of truth for it could disagree.\n ...(lookupValues && filter.lookup\n ? {\n onSearch: async (search: string) => {\n const result = await lookupValues({\n filterKey: shared.key,\n search,\n limit: DATA_TABLE_FILTER_LOOKUP_LIMIT,\n });\n return result.options.map(toMultiSelectOption);\n },\n }\n : {}),\n };\n}\n\nfunction buildTimeRange(\n filterKey: string,\n filter: DataTableColumnFilter,\n values: DataTableFilterSelection,\n setValues: Dispatch<SetStateAction<DataTableFilterSelection>>,\n): FilterBarRangeProps {\n return {\n ...boundsToRange(parseBoundsValue(values[filterKey] ?? \"\")),\n onApply: (from, to) =>\n setValues((current) =>\n updateFilterSelection(current, filterKey, serializeBoundsValue({ min: from, max: to })),\n ),\n ...(filter.presets !== undefined ? { presets: filter.presets } : {}),\n timeEnabled: true,\n };\n}\n\n/** Names a bounded selection's edges the way a range control reads them. */\nfunction boundsToRange(bounds: FilterBoundsValue): { from?: string; to?: string } {\n return {\n ...(bounds.min !== undefined ? { from: bounds.min } : {}),\n ...(bounds.max !== undefined ? { to: bounds.max } : {}),\n };\n}\n\nfunction toMultiSelectOption(option: DataTableFilterOption): MultiSelectOption {\n const label = option.label ?? option.value;\n return {\n value: option.value,\n label,\n ...(option.count !== undefined ? { title: `${label} · ${option.count.toLocaleString()}` } : {}),\n };\n}\n\n/**\n * Refuses a DataTable that would filter twice or offer a control wired to\n * nothing. Both are silent in a running table — rows narrow more than the user\n * asked, or a box swallows what they type — so they are refused at the seam.\n */\nexport function assertDataTableFilterProps(props: {\n autoFilter: boolean;\n manualFilter: boolean;\n showGlobalFilter: boolean;\n globalFilterControlled: boolean;\n hasExternalSearch: boolean;\n}): void {\n if (props.autoFilter && props.manualFilter) {\n throw new Error(\n \"DataTable: autoFilter generates filters that narrow rows locally, which manualFilter then suppresses — the controls would render and do nothing. Pass externalFilters instead.\",\n );\n }\n if (\n props.manualFilter &&\n props.showGlobalFilter &&\n !props.globalFilterControlled &&\n !props.hasExternalSearch\n ) {\n throw new Error(\n \"DataTable: manualFilter suppresses the built-in search's row narrowing, so showGlobalFilter needs globalFilter/onGlobalFilterChange or externalSearch to reach the source.\",\n );\n }\n}\n"],"names":["prettifyKey","applyFilterExtensions","updateFilterSelection","parseBoundsValue","serializeBoundsValue","parseMultiFilterValue","serializeMultiFilterValue"],"mappings":";;;;;AAuFO,MAAM,iCAAiC;AA4CvC,SAAS,gCACd,SACsB;AACtB,SAAO,QAAQ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B;AACrB,SAAO;AAAA,IACL,GAAG,cAAcH,sBAAAA,iBAAiB,OAAO,SAAS,KAAK,EAAE,CAAC;AAAA,IAC1D,SAAS,CAAC,MAAM,OACd;AAAA,MAAU,CAAC,YACTD,sBAAAA,sBAAsB,SAAS,WAAWE,sBAAAA,qBAAqB,EAAE,KAAK,MAAM,KAAK,IAAI,CAAC;AAAA,IAAA;AAAA,IAE1F,GAAI,OAAO,YAAY,SAAY,EAAE,SAAS,OAAO,QAAA,IAAY,CAAA;AAAA,IACjE,aAAa;AAAA,EAAA;AAEjB;AAGA,SAAS,cAAc,QAA2D;AAChF,SAAO;AAAA,IACL,GAAI,OAAO,QAAQ,SAAY,EAAE,MAAM,OAAO,IAAA,IAAQ,CAAA;AAAA,IACtD,GAAI,OAAO,QAAQ,SAAY,EAAE,IAAI,OAAO,QAAQ,CAAA;AAAA,EAAC;AAEzD;AAEA,SAAS,oBAAoB,QAAkD;AAC7E,QAAM,QAAQ,OAAO,SAAS,OAAO;AACrC,SAAO;AAAA,IACL,OAAO,OAAO;AAAA,IACd;AAAA,IACA,GAAI,OAAO,UAAU,SAAY,EAAE,OAAO,GAAG,KAAK,MAAM,OAAO,MAAM,eAAA,CAAgB,GAAA,IAAO,CAAA;AAAA,EAAC;AAEjG;AAOO,SAAS,2BAA2B,OAMlC;AACP,MAAI,MAAM,cAAc,MAAM,cAAc;AAC1C,UAAM,IAAI;AAAA,MACR;AAAA,IAAA;AAAA,EAEJ;AACA,MACE,MAAM,gBACN,MAAM,oBACN,CAAC,MAAM,0BACP,CAAC,MAAM,mBACP;AACA,UAAM,IAAI;AAAA,MACR;AAAA,IAAA;AAAA,EAEJ;AACF;;;;;"}
|
|
1
|
+
{"version":3,"file":"data-table-server-filters.cjs","sources":["../../src/data/data-table-server-filters.ts"],"sourcesContent":["import type { Dispatch, SetStateAction } from \"react\";\nimport type {\n FilterBarFilter,\n FilterBarNumberValue,\n FilterBarRangePreset,\n FilterBarRangeProps,\n} from \"../components/FilterBar\";\nimport type { FilterExtension } from \"../components/filter-bar-utils\";\nimport { applyFilterExtensions } from \"../components/filter-bar-utils\";\nimport type { MultiSelectOption } from \"../components/MultiSelect\";\nimport type { TriState } from \"../components/TriStateToggle\";\nimport { formatUnit } from \"../lib/format\";\nimport type { DataTableColumn, DataTableColumnKind } from \"./DataTable\";\nimport {\n parseBoundsValue,\n parseMultiFilterValue,\n serializeBoundsValue,\n serializeMultiFilterValue,\n updateFilterSelection,\n type DataTableFilterSelection,\n type FilterBoundsValue,\n} from \"./data-table-filter-values\";\nimport { prettifyKey } from \"./data-table-utils\";\n\n/**\n * Which control a filter renders as.\n *\n * Deliberately opaque: \"terms\" is not \"a SQL IN() or an OpenSearch terms\n * query\", it is \"a set of discrete values the user includes or excludes\". The\n * source compiles the selection; nothing about how it does so crosses into the\n * browser.\n */\nexport type DataTableFilterKind =\n | \"terms\"\n /** Whole values like \"terms\", but typed rather than picked — an identifier\n * has no list worth offering. */\n | \"exact\"\n | \"range\"\n /** A range over elapsed time, labelled in the column's own `unit`. */\n | \"duration\"\n | \"time\"\n /** A range over whole days: \"time\" with the clock taken off it. */\n | \"date\"\n | \"boolean\"\n | \"text\";\n\nexport type DataTableFilterOption = {\n /** Value written into the selection. */\n value: string;\n /** Display label. Falls back to `value`. */\n label?: string;\n /** How many rows carry this value, shown as a tooltip. */\n count?: number;\n};\n\nexport type DataTableColumnFilter = {\n kind: DataTableFilterKind;\n /** Head of the option set for kind:\"terms\". Empty relies on `lookup`. */\n options?: DataTableFilterOption[];\n /** True when `options` is a capped head of a larger set. */\n truncated?: boolean;\n /** Distinct count behind a truncated head; drives the \"… and N more\" hint. */\n total?: number;\n /** The source can answer a type-ahead for this filter. */\n lookup?: boolean;\n /** Slider domain for kind:\"range\". */\n min?: number;\n max?: number;\n step?: number;\n /** The unit a kind:\"duration\" bound is written in (\"ms\" or \"s\"), so the\n * control labels itself in the numbers the column is stored in. Absent\n * means milliseconds. */\n unit?: string;\n /** Range presets for kind:\"time\". */\n presets?: FilterBarRangePreset[];\n /** Helper text shown in the filter popover. */\n description?: string;\n disabled?: boolean;\n};\n\n/**\n * A result column as the source describes it: how to render it, and — when the\n * source can narrow on it — which filter parameter it binds to and what control\n * that filter is.\n *\n * `filterKey` need not equal `name`: an analyzed text field filters through an\n * exact-value sibling, and a computed column filters by the alias it was given.\n */\nexport type DataTableServerColumn = {\n /** Field name as the source knows it; also the literal row key. */\n name: string;\n /** Header label. Defaults to a prettified `name`. */\n label?: string;\n /** Backend type string, verbatim (e.g. \"TIMESTAMPTZ\", \"keyword\"). Display only. */\n databaseType?: string;\n /** Cell rendering kind. */\n kind?: DataTableColumnKind;\n /** Filter parameter this column narrows on. Absent means not filterable. */\n filterKey?: string;\n /** The control the filter renders as. Absent means not filterable. */\n filter?: DataTableColumnFilter;\n};\n\n/** Head-set size for a filter value type-ahead. */\nexport const DATA_TABLE_FILTER_LOOKUP_LIMIT = 20;\n\nexport type DataTableFilterLookupRequest = {\n /** Which filter is being searched — the column's `filterKey`. */\n filterKey: string;\n /** What the user typed. Empty asks for the head of the set. */\n search: string;\n /** How many options to return. */\n limit: number;\n};\n\nexport type DataTableFilterLookupResult = {\n options: DataTableFilterOption[];\n};\n\n/**\n * Answers a filter's value type-ahead. Sync or async — a static option source\n * returns an array, a server-backed one a promise.\n */\nexport type DataTableFilterLookup = (\n request: DataTableFilterLookupRequest,\n) => Promise<DataTableFilterLookupResult> | DataTableFilterLookupResult;\n\nexport type ServerFilterBarOptions = {\n /** Answers a terms type-ahead for filters whose `lookup` is set. */\n lookupValues?: DataTableFilterLookup;\n /** Decorators applied to each built filter (icons, relabelling). */\n extensions?: FilterExtension[];\n};\n\nexport type ServerFilterConfig = {\n filters: FilterBarFilter[];\n /** Present when exactly one column declared kind:\"time\". */\n timeRange?: FilterBarRangeProps;\n};\n\n/**\n * Turns the source's column description into DataTable columns.\n *\n * Every column gets a literal `accessor` — a raw result set has empty, dotted\n * and colliding names, none of which survive being read as a path — and\n * `filterable: false`, because a described result is filtered by the source and\n * never by cardinality guessed from one page.\n */\nexport function serverColumnsToDataTableColumns<T extends Record<string, unknown>>(\n columns: DataTableServerColumn[],\n): DataTableColumn<T>[] {\n return columns.map((column, index) => ({\n key: column.name === \"\" ? `column-${index}` : column.name,\n label: column.label ?? prettifyKey(column.name),\n accessor: (row: T) => row[column.name],\n sortable: true,\n filterable: false,\n ...(column.kind !== undefined ? { kind: column.kind } : {}),\n ...(column.filterKey !== undefined ? { filterKey: column.filterKey } : {}),\n }));\n}\n\n/**\n * Builds the FilterBar controls for a described result, already wired to\n * `values`/`setValues`.\n *\n * Pure — it holds no state and fetches nothing; a `lookup` filter closes over\n * the caller's loader. Pass the result as DataTable's `externalFilters`\n * together with `manualFilter`, since the source has already applied it.\n *\n * Throws when a column declares a filter it cannot address: no `filterKey`, a\n * `filterKey` another column already claimed, or a second time range. Each\n * would bind a control to a filter that means something else.\n */\nexport function serverFiltersToFilterBar(\n columns: DataTableServerColumn[],\n values: DataTableFilterSelection,\n setValues: Dispatch<SetStateAction<DataTableFilterSelection>>,\n options: ServerFilterBarOptions = {},\n): ServerFilterConfig {\n const config: ServerFilterConfig = { filters: [] };\n const claimed = new Map<string, string>();\n\n for (const column of columns) {\n const filter = column.filter;\n if (!filter) continue;\n const filterKey = column.filterKey;\n if (!filterKey) {\n throw new Error(`Column ${column.name} declares a filter but no filterKey to send it under`);\n }\n const owner = claimed.get(filterKey);\n if (owner !== undefined) {\n throw new Error(\n `Columns ${owner} and ${column.name} both filter through ${filterKey}; a filter key addresses one column`,\n );\n }\n claimed.set(filterKey, column.name);\n\n const label = column.label ?? prettifyKey(column.name);\n // The bar's own range control is the primary way through a result, and a\n // result has one of those — so the first time column takes it and any\n // others are ranges among the filters. A raw SELECT commonly returns\n // created_at beside updated_at, and refusing the second one cost the whole\n // bar rather than just that column's control.\n if (filter.kind === \"time\" && !config.timeRange) {\n config.timeRange = buildTimeRange(filterKey, filter, values, setValues);\n continue;\n }\n config.filters.push(\n applyFilterExtensions(\n buildFilter({ column, filterKey, label, filter, values, setValues, options }),\n options.extensions,\n ),\n );\n }\n return config;\n}\n\ntype BuildArgs = {\n column: DataTableServerColumn;\n filterKey: string;\n label: string;\n filter: DataTableColumnFilter;\n values: DataTableFilterSelection;\n setValues: Dispatch<SetStateAction<DataTableFilterSelection>>;\n options: ServerFilterBarOptions;\n};\n\nfunction buildFilter(args: BuildArgs): FilterBarFilter {\n const { filterKey, label, filter, values, setValues } = args;\n const raw = values[filterKey] ?? \"\";\n const write = (serialized: string) =>\n setValues((current) => updateFilterSelection(current, filterKey, serialized));\n const shared = {\n key: filterKey,\n label,\n ...(filter.description !== undefined ? { description: filter.description } : {}),\n ...(filter.disabled !== undefined ? { disabled: filter.disabled } : {}),\n };\n\n switch (filter.kind) {\n case \"time\":\n // A date range is the same two-edged control with the clock taken off it,\n // so it shares every line below except timeEnabled.\n case \"date\":\n return {\n ...shared,\n kind: \"date-range\",\n ...boundsToRange(parseBoundsValue(raw)),\n onApply: (from: string, to: string) =>\n write(serializeBoundsValue({ min: from, max: to })),\n ...(filter.presets !== undefined ? { presets: filter.presets } : {}),\n timeEnabled: filter.kind === \"time\",\n };\n case \"range\":\n // A duration is a range that knows what its numbers mean, so it differs\n // only in how the slider labels them.\n case \"duration\":\n return {\n ...shared,\n kind: \"number\",\n value: parseBoundsValue(raw),\n onChange: (next: FilterBarNumberValue) => write(serializeBoundsValue(next)),\n ...(filter.min !== undefined ? { domainMin: filter.min } : {}),\n ...(filter.max !== undefined ? { domainMax: filter.max } : {}),\n ...(filter.step !== undefined ? { step: filter.step } : {}),\n ...(filter.kind === \"duration\"\n ? { formatValue: (value: number) => formatUnit(value, filter.unit || \"ms\") }\n : {}),\n };\n // An exact match has nothing to enumerate, which is what buildTermsFilter\n // already falls back to for a selection that turned out to have no values.\n // Declaring it says so up front rather than arriving there by exhaustion.\n case \"exact\":\n return { ...shared, kind: \"text\", value: raw, onChange: (next: string) => write(next) };\n case \"boolean\":\n return {\n ...shared,\n kind: \"tristate\",\n value: raw === \"\" ? undefined : raw === \"true\",\n onChange: (next: TriState) => write(next === undefined ? \"\" : String(next)),\n };\n case \"text\":\n return {\n ...shared,\n kind: \"text\",\n value: raw,\n onChange: (next: string) => write(next),\n };\n default:\n return buildTermsFilter(args, shared, raw, write);\n }\n}\n\nfunction buildTermsFilter(\n { filter, options }: BuildArgs,\n shared: { key: string; label: string; description?: string; disabled?: boolean },\n raw: string,\n write: (serialized: string) => void,\n): FilterBarFilter {\n const lookupValues = options.lookupValues;\n // A selection with no options and no type-ahead has nothing to select from,\n // and a dropdown that opens empty is a control the user cannot use. The\n // grammar is the wire format either way, so typing \"a,b\" or \"!a\" into the\n // input still means what selecting them would have.\n if (!filter.lookup && (filter.options?.length ?? 0) === 0) {\n return { ...shared, kind: \"text\", value: raw, onChange: (next: string) => write(next) };\n }\n return {\n ...shared,\n kind: \"multi\",\n value: parseMultiFilterValue(raw),\n onChange: (next) => write(serializeMultiFilterValue(next)),\n options: (filter.options ?? []).map(toMultiSelectOption),\n ...(filter.truncated !== undefined ? { truncated: filter.truncated } : {}),\n ...(filter.total !== undefined ? { total: filter.total } : {}),\n // The field owns the in-flight flag from the promise this returns, so no\n // `loading` is passed: a second source of truth for it could disagree.\n ...(lookupValues && filter.lookup\n ? {\n onSearch: async (search: string) => {\n const result = await lookupValues({\n filterKey: shared.key,\n search,\n limit: DATA_TABLE_FILTER_LOOKUP_LIMIT,\n });\n return result.options.map(toMultiSelectOption);\n },\n }\n : {}),\n };\n}\n\nfunction buildTimeRange(\n filterKey: string,\n filter: DataTableColumnFilter,\n values: DataTableFilterSelection,\n setValues: Dispatch<SetStateAction<DataTableFilterSelection>>,\n): FilterBarRangeProps {\n return {\n ...boundsToRange(parseBoundsValue(values[filterKey] ?? \"\")),\n onApply: (from, to) =>\n setValues((current) =>\n updateFilterSelection(current, filterKey, serializeBoundsValue({ min: from, max: to })),\n ),\n ...(filter.presets !== undefined ? { presets: filter.presets } : {}),\n timeEnabled: true,\n };\n}\n\n/** Names a bounded selection's edges the way a range control reads them. */\nfunction boundsToRange(bounds: FilterBoundsValue): { from?: string; to?: string } {\n return {\n ...(bounds.min !== undefined ? { from: bounds.min } : {}),\n ...(bounds.max !== undefined ? { to: bounds.max } : {}),\n };\n}\n\nfunction toMultiSelectOption(option: DataTableFilterOption): MultiSelectOption {\n const label = option.label ?? option.value;\n return {\n value: option.value,\n label,\n ...(option.count !== undefined ? { title: `${label} · ${option.count.toLocaleString()}` } : {}),\n };\n}\n\n/**\n * Refuses a DataTable that would filter twice or offer a control wired to\n * nothing. Both are silent in a running table — rows narrow more than the user\n * asked, or a box swallows what they type — so they are refused at the seam.\n */\nexport function assertDataTableFilterProps(props: {\n autoFilter: boolean;\n manualFilter: boolean;\n showGlobalFilter: boolean;\n globalFilterControlled: boolean;\n hasExternalSearch: boolean;\n}): void {\n if (props.autoFilter && props.manualFilter) {\n throw new Error(\n \"DataTable: autoFilter generates filters that narrow rows locally, which manualFilter then suppresses — the controls would render and do nothing. Pass externalFilters instead.\",\n );\n }\n if (\n props.manualFilter &&\n props.showGlobalFilter &&\n !props.globalFilterControlled &&\n !props.hasExternalSearch\n ) {\n throw new Error(\n \"DataTable: manualFilter suppresses the built-in search's row narrowing, so showGlobalFilter needs globalFilter/onGlobalFilterChange or externalSearch to reach the source.\",\n );\n }\n}\n"],"names":["prettifyKey","applyFilterExtensions","updateFilterSelection","parseBoundsValue","serializeBoundsValue","formatUnit","parseMultiFilterValue","serializeMultiFilterValue"],"mappings":";;;;;;AAwGO,MAAM,iCAAiC;AA4CvC,SAAS,gCACd,SACsB;AACtB,SAAO,QAAQ,IAAI,CAAC,QAAQ,WAAW;AAAA,IACrC,KAAK,OAAO,SAAS,KAAK,UAAU,KAAK,KAAK,OAAO;AAAA,IACrD,OAAO,OAAO,SAASA,eAAAA,YAAY,OAAO,IAAI;AAAA,IAC9C,UAAU,CAAC,QAAW,IAAI,OAAO,IAAI;AAAA,IACrC,UAAU;AAAA,IACV,YAAY;AA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AAmB;AAAA,MAC/C;AAAA,IAAA,IAEF,CAAA;AAAA,EAAC;AAET;AAEA,SAAS,eACP,WACA,QACA,QACA,WACqB;AACrB,SAAO;AAAA,IACL,GAAG,cAAcJ,sBAAAA,iBAAiB,OAAO,SAAS,KAAK,EAAE,CAAC;AAAA,IAC1D,SAAS,CAAC,MAAM,OACd;AAAA,MAAU,CAAC,YACTD,sBAAAA,sBAAsB,SAAS,WAAWE,sBAAAA,qBAAqB,EAAE,KAAK,MAAM,KAAK,IAAI,CAAC;AAAA,IAAA;AAAA,IAE1F,GAAI,OAAO,YAAY,SAAY,EAAE,SAAS,OAAO,QAAA,IAAY,CAAA;AAAA,IACjE,aAAa;AAAA,EAAA;AAEjB;AAGA,SAAS,cAAc,QAA2D;AAChF,SAAO;AAAA,IACL,GAAI,OAAO,QAAQ,SAAY,EAAE,MAAM,OAAO,IAAA,IAAQ,CAAA;AAAA,IACtD,GAAI,OAAO,QAAQ,SAAY,EAAE,IAAI,OAAO,QAAQ,CAAA;AAAA,EAAC;AAEzD;AAEA,SAAS,oBAAoB,QAAkD;AAC7E,QAAM,QAAQ,OAAO,SAAS,OAAO;AACrC,SAAO;AAAA,IACL,OAAO,OAAO;AAAA,IACd;AAAA,IACA,GAAI,OAAO,UAAU,SAAY,EAAE,OAAO,GAAG,KAAK,MAAM,OAAO,MAAM,eAAA,CAAgB,GAAA,IAAO,CAAA;AAAA,EAAC;AAEjG;AAOO,SAAS,2BAA2B,OAMlC;AACP,MAAI,MAAM,cAAc,MAAM,cAAc;AAC1C,UAAM,IAAI;AAAA,MACR;AAAA,IAAA;AAAA,EAEJ;AACA,MACE,MAAM,gBACN,MAAM,oBACN,CAAC,MAAM,0BACP,CAAC,MAAM,mBACP;AACA,UAAM,IAAI;AAAA,MACR;AAAA,IAAA;AAAA,EAEJ;AACF;;;;;"}
|
|
@@ -11,7 +11,14 @@ import { DataTableFilterSelection } from './data-table-filter-values';
|
|
|
11
11
|
* source compiles the selection; nothing about how it does so crosses into the
|
|
12
12
|
* browser.
|
|
13
13
|
*/
|
|
14
|
-
export type DataTableFilterKind = "terms"
|
|
14
|
+
export type DataTableFilterKind = "terms"
|
|
15
|
+
/** Whole values like "terms", but typed rather than picked — an identifier
|
|
16
|
+
* has no list worth offering. */
|
|
17
|
+
| "exact" | "range"
|
|
18
|
+
/** A range over elapsed time, labelled in the column's own `unit`. */
|
|
19
|
+
| "duration" | "time"
|
|
20
|
+
/** A range over whole days: "time" with the clock taken off it. */
|
|
21
|
+
| "date" | "boolean" | "text";
|
|
15
22
|
export type DataTableFilterOption = {
|
|
16
23
|
/** Value written into the selection. */
|
|
17
24
|
value: string;
|
|
@@ -34,6 +41,10 @@ export type DataTableColumnFilter = {
|
|
|
34
41
|
min?: number;
|
|
35
42
|
max?: number;
|
|
36
43
|
step?: number;
|
|
44
|
+
/** The unit a kind:"duration" bound is written in ("ms" or "s"), so the
|
|
45
|
+
* control labels itself in the numbers the column is stored in. Absent
|
|
46
|
+
* means milliseconds. */
|
|
47
|
+
unit?: string;
|
|
37
48
|
/** Range presets for kind:"time". */
|
|
38
49
|
presets?: FilterBarRangePreset[];
|
|
39
50
|
/** Helper text shown in the filter popover. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-table-server-filters.d.ts","sourceRoot":"","sources":["../../src/data/data-table-server-filters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EACV,eAAe,EAEf,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"data-table-server-filters.d.ts","sourceRoot":"","sources":["../../src/data/data-table-server-filters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KA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AC/B,eAAe,CAAC,CAAC,CAAC,EAAE,CAUtB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,qBAAqB,EAAE,EAChC,MAAM,EAAE,wBAAwB,EAChC,SAAS,EAAE,QAAQ,CAAC,cAAc,CAAC,wBAAwB,CAAC,CAAC,EAC7D,OAAO,GAAE,sBAA2B,GACnC,kBAAkB,CAqCpB;AAuJD;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE;IAChD,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,sBAAsB,EAAE,OAAO,CAAC;IAChC,iBAAiB,EAAE,OAAO,CAAC;CAC5B,GAAG,IAAI,CAgBP"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { applyFilterExtensions } from "../components/filter-bar-utils.js";
|
|
2
|
+
import { formatUnit } from "../lib/format.js";
|
|
2
3
|
import { updateFilterSelection, serializeBoundsValue, parseBoundsValue, serializeMultiFilterValue, parseMultiFilterValue } from "./data-table-filter-values.js";
|
|
3
4
|
import { prettifyKey } from "./data-table-utils.js";
|
|
4
5
|
const DATA_TABLE_FILTER_LOOKUP_LIMIT = 20;
|
|
@@ -56,15 +57,21 @@ function buildFilter(args) {
|
|
|
56
57
|
};
|
|
57
58
|
switch (filter.kind) {
|
|
58
59
|
case "time":
|
|
60
|
+
// A date range is the same two-edged control with the clock taken off it,
|
|
61
|
+
// so it shares every line below except timeEnabled.
|
|
62
|
+
case "date":
|
|
59
63
|
return {
|
|
60
64
|
...shared,
|
|
61
65
|
kind: "date-range",
|
|
62
66
|
...boundsToRange(parseBoundsValue(raw)),
|
|
63
67
|
onApply: (from, to) => write(serializeBoundsValue({ min: from, max: to })),
|
|
64
68
|
...filter.presets !== void 0 ? { presets: filter.presets } : {},
|
|
65
|
-
timeEnabled:
|
|
69
|
+
timeEnabled: filter.kind === "time"
|
|
66
70
|
};
|
|
67
71
|
case "range":
|
|
72
|
+
// A duration is a range that knows what its numbers mean, so it differs
|
|
73
|
+
// only in how the slider labels them.
|
|
74
|
+
case "duration":
|
|
68
75
|
return {
|
|
69
76
|
...shared,
|
|
70
77
|
kind: "number",
|
|
@@ -72,8 +79,14 @@ function buildFilter(args) {
|
|
|
72
79
|
onChange: (next) => write(serializeBoundsValue(next)),
|
|
73
80
|
...filter.min !== void 0 ? { domainMin: filter.min } : {},
|
|
74
81
|
...filter.max !== void 0 ? { domainMax: filter.max } : {},
|
|
75
|
-
...filter.step !== void 0 ? { step: filter.step } : {}
|
|
82
|
+
...filter.step !== void 0 ? { step: filter.step } : {},
|
|
83
|
+
...filter.kind === "duration" ? { formatValue: (value) => formatUnit(value, filter.unit || "ms") } : {}
|
|
76
84
|
};
|
|
85
|
+
// An exact match has nothing to enumerate, which is what buildTermsFilter
|
|
86
|
+
// already falls back to for a selection that turned out to have no values.
|
|
87
|
+
// Declaring it says so up front rather than arriving there by exhaustion.
|
|
88
|
+
case "exact":
|
|
89
|
+
return { ...shared, kind: "text", value: raw, onChange: (next) => write(next) };
|
|
77
90
|
case "boolean":
|
|
78
91
|
return {
|
|
79
92
|
...shared,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-table-server-filters.js","sources":["../../src/data/data-table-server-filters.ts"],"sourcesContent":["import type { Dispatch, SetStateAction } from \"react\";\nimport type {\n FilterBarFilter,\n FilterBarNumberValue,\n FilterBarRangePreset,\n FilterBarRangeProps,\n} from \"../components/FilterBar\";\nimport type { FilterExtension } from \"../components/filter-bar-utils\";\nimport { applyFilterExtensions } from \"../components/filter-bar-utils\";\nimport type { MultiSelectOption } from \"../components/MultiSelect\";\nimport type { TriState } from \"../components/TriStateToggle\";\nimport type { DataTableColumn, DataTableColumnKind } from \"./DataTable\";\nimport {\n parseBoundsValue,\n parseMultiFilterValue,\n serializeBoundsValue,\n serializeMultiFilterValue,\n updateFilterSelection,\n type DataTableFilterSelection,\n type FilterBoundsValue,\n} from \"./data-table-filter-values\";\nimport { prettifyKey } from \"./data-table-utils\";\n\n/**\n * Which control a filter renders as.\n *\n * Deliberately opaque: \"terms\" is not \"a SQL IN() or an OpenSearch terms\n * query\", it is \"a set of discrete values the user includes or excludes\". The\n * source compiles the selection; nothing about how it does so crosses into the\n * browser.\n */\nexport type DataTableFilterKind = \"terms\" | \"range\" | \"time\" | \"boolean\" | \"text\";\n\nexport type DataTableFilterOption = {\n /** Value written into the selection. */\n value: string;\n /** Display label. Falls back to `value`. */\n label?: string;\n /** How many rows carry this value, shown as a tooltip. */\n count?: number;\n};\n\nexport type DataTableColumnFilter = {\n kind: DataTableFilterKind;\n /** Head of the option set for kind:\"terms\". Empty relies on `lookup`. */\n options?: DataTableFilterOption[];\n /** True when `options` is a capped head of a larger set. */\n truncated?: boolean;\n /** Distinct count behind a truncated head; drives the \"… and N more\" hint. */\n total?: number;\n /** The source can answer a type-ahead for this filter. */\n lookup?: boolean;\n /** Slider domain for kind:\"range\". */\n min?: number;\n max?: number;\n step?: number;\n /** Range presets for kind:\"time\". */\n presets?: FilterBarRangePreset[];\n /** Helper text shown in the filter popover. */\n description?: string;\n disabled?: boolean;\n};\n\n/**\n * A result column as the source describes it: how to render it, and — when the\n * source can narrow on it — which filter parameter it binds to and what control\n * that filter is.\n *\n * `filterKey` need not equal `name`: an analyzed text field filters through an\n * exact-value sibling, and a computed column filters by the alias it was given.\n */\nexport type DataTableServerColumn = {\n /** Field name as the source knows it; also the literal row key. */\n name: string;\n /** Header label. Defaults to a prettified `name`. */\n label?: string;\n /** Backend type string, verbatim (e.g. \"TIMESTAMPTZ\", \"keyword\"). Display only. */\n databaseType?: string;\n /** Cell rendering kind. */\n kind?: DataTableColumnKind;\n /** Filter parameter this column narrows on. Absent means not filterable. */\n filterKey?: string;\n /** The control the filter renders as. Absent means not filterable. */\n filter?: DataTableColumnFilter;\n};\n\n/** Head-set size for a filter value type-ahead. */\nexport const DATA_TABLE_FILTER_LOOKUP_LIMIT = 20;\n\nexport type DataTableFilterLookupRequest = {\n /** Which filter is being searched — the column's `filterKey`. */\n filterKey: string;\n /** What the user typed. Empty asks for the head of the set. */\n search: string;\n /** How many options to return. */\n limit: number;\n};\n\nexport type DataTableFilterLookupResult = {\n options: DataTableFilterOption[];\n};\n\n/**\n * Answers a filter's value type-ahead. Sync or async — a static option source\n * returns an array, a server-backed one a promise.\n */\nexport type DataTableFilterLookup = (\n request: DataTableFilterLookupRequest,\n) => Promise<DataTableFilterLookupResult> | DataTableFilterLookupResult;\n\nexport type ServerFilterBarOptions = {\n /** Answers a terms type-ahead for filters whose `lookup` is set. */\n lookupValues?: DataTableFilterLookup;\n /** Decorators applied to each built filter (icons, relabelling). */\n extensions?: FilterExtension[];\n};\n\nexport type ServerFilterConfig = {\n filters: FilterBarFilter[];\n /** Present when exactly one column declared kind:\"time\". */\n timeRange?: FilterBarRangeProps;\n};\n\n/**\n * Turns the source's column description into DataTable columns.\n *\n * Every column gets a literal `accessor` — a raw result set has empty, dotted\n * and colliding names, none of which survive being read as a path — and\n * `filterable: false`, because a described result is filtered by the source and\n * never by cardinality guessed from one page.\n */\nexport function serverColumnsToDataTableColumns<T extends Record<string, unknown>>(\n columns: DataTableServerColumn[],\n): DataTableColumn<T>[] {\n return columns.map((column, index) => ({\n key: column.name === \"\" ? `column-${index}` : column.name,\n label: column.label ?? prettifyKey(column.name),\n accessor: (row: T) => row[column.name],\n sortable: true,\n filterable: false,\n ...(column.kind !== undefined ? { kind: column.kind } : {}),\n ...(column.filterKey !== undefined ? { filterKey: column.filterKey } : {}),\n }));\n}\n\n/**\n * Builds the FilterBar controls for a described result, already wired to\n * `values`/`setValues`.\n *\n * Pure — it holds no state and fetches nothing; a `lookup` filter closes over\n * the caller's loader. Pass the result as DataTable's `externalFilters`\n * together with `manualFilter`, since the source has already applied it.\n *\n * Throws when a column declares a filter it cannot address: no `filterKey`, a\n * `filterKey` another column already claimed, or a second time range. Each\n * would bind a control to a filter that means something else.\n */\nexport function serverFiltersToFilterBar(\n columns: DataTableServerColumn[],\n values: DataTableFilterSelection,\n setValues: Dispatch<SetStateAction<DataTableFilterSelection>>,\n options: ServerFilterBarOptions = {},\n): ServerFilterConfig {\n const config: ServerFilterConfig = { filters: [] };\n const claimed = new Map<string, string>();\n\n for (const column of columns) {\n const filter = column.filter;\n if (!filter) continue;\n const filterKey = column.filterKey;\n if (!filterKey) {\n throw new Error(`Column ${column.name} declares a filter but no filterKey to send it under`);\n }\n const owner = claimed.get(filterKey);\n if (owner !== undefined) {\n throw new Error(\n `Columns ${owner} and ${column.name} both filter through ${filterKey}; a filter key addresses one column`,\n );\n }\n claimed.set(filterKey, column.name);\n\n const label = column.label ?? prettifyKey(column.name);\n // The bar's own range control is the primary way through a result, and a\n // result has one of those — so the first time column takes it and any\n // others are ranges among the filters. A raw SELECT commonly returns\n // created_at beside updated_at, and refusing the second one cost the whole\n // bar rather than just that column's control.\n if (filter.kind === \"time\" && !config.timeRange) {\n config.timeRange = buildTimeRange(filterKey, filter, values, setValues);\n continue;\n }\n config.filters.push(\n applyFilterExtensions(\n buildFilter({ column, filterKey, label, filter, values, setValues, options }),\n options.extensions,\n ),\n );\n }\n return config;\n}\n\ntype BuildArgs = {\n column: DataTableServerColumn;\n filterKey: string;\n label: string;\n filter: DataTableColumnFilter;\n values: DataTableFilterSelection;\n setValues: Dispatch<SetStateAction<DataTableFilterSelection>>;\n options: ServerFilterBarOptions;\n};\n\nfunction buildFilter(args: BuildArgs): FilterBarFilter {\n const { filterKey, label, filter, values, setValues } = args;\n const raw = values[filterKey] ?? \"\";\n const write = (serialized: string) =>\n setValues((current) => updateFilterSelection(current, filterKey, serialized));\n const shared = {\n key: filterKey,\n label,\n ...(filter.description !== undefined ? { description: filter.description } : {}),\n ...(filter.disabled !== undefined ? { disabled: filter.disabled } : {}),\n };\n\n switch (filter.kind) {\n case \"time\":\n return {\n ...shared,\n kind: \"date-range\",\n ...boundsToRange(parseBoundsValue(raw)),\n onApply: (from: string, to: string) =>\n write(serializeBoundsValue({ min: from, max: to })),\n ...(filter.presets !== undefined ? { presets: filter.presets } : {}),\n timeEnabled: true,\n };\n case \"range\":\n return {\n ...shared,\n kind: \"number\",\n value: parseBoundsValue(raw),\n onChange: (next: FilterBarNumberValue) => write(serializeBoundsValue(next)),\n ...(filter.min !== undefined ? { domainMin: filter.min } : {}),\n ...(filter.max !== undefined ? { domainMax: filter.max } : {}),\n ...(filter.step !== undefined ? { step: filter.step } : {}),\n };\n case \"boolean\":\n return {\n ...shared,\n kind: \"tristate\",\n value: raw === \"\" ? undefined : raw === \"true\",\n onChange: (next: TriState) => write(next === undefined ? \"\" : String(next)),\n };\n case \"text\":\n return {\n ...shared,\n kind: \"text\",\n value: raw,\n onChange: (next: string) => write(next),\n };\n default:\n return buildTermsFilter(args, shared, raw, write);\n }\n}\n\nfunction buildTermsFilter(\n { filter, options }: BuildArgs,\n shared: { key: string; label: string; description?: string; disabled?: boolean },\n raw: string,\n write: (serialized: string) => void,\n): FilterBarFilter {\n const lookupValues = options.lookupValues;\n // A selection with no options and no type-ahead has nothing to select from,\n // and a dropdown that opens empty is a control the user cannot use. The\n // grammar is the wire format either way, so typing \"a,b\" or \"!a\" into the\n // input still means what selecting them would have.\n if (!filter.lookup && (filter.options?.length ?? 0) === 0) {\n return { ...shared, kind: \"text\", value: raw, onChange: (next: string) => write(next) };\n }\n return {\n ...shared,\n kind: \"multi\",\n value: parseMultiFilterValue(raw),\n onChange: (next) => write(serializeMultiFilterValue(next)),\n options: (filter.options ?? []).map(toMultiSelectOption),\n ...(filter.truncated !== undefined ? { truncated: filter.truncated } : {}),\n ...(filter.total !== undefined ? { total: filter.total } : {}),\n // The field owns the in-flight flag from the promise this returns, so no\n // `loading` is passed: a second source of truth for it could disagree.\n ...(lookupValues && filter.lookup\n ? {\n onSearch: async (search: string) => {\n const result = await lookupValues({\n filterKey: shared.key,\n search,\n limit: DATA_TABLE_FILTER_LOOKUP_LIMIT,\n });\n return result.options.map(toMultiSelectOption);\n },\n }\n : {}),\n };\n}\n\nfunction buildTimeRange(\n filterKey: string,\n filter: DataTableColumnFilter,\n values: DataTableFilterSelection,\n setValues: Dispatch<SetStateAction<DataTableFilterSelection>>,\n): FilterBarRangeProps {\n return {\n ...boundsToRange(parseBoundsValue(values[filterKey] ?? \"\")),\n onApply: (from, to) =>\n setValues((current) =>\n updateFilterSelection(current, filterKey, serializeBoundsValue({ min: from, max: to })),\n ),\n ...(filter.presets !== undefined ? { presets: filter.presets } : {}),\n timeEnabled: true,\n };\n}\n\n/** Names a bounded selection's edges the way a range control reads them. */\nfunction boundsToRange(bounds: FilterBoundsValue): { from?: string; to?: string } {\n return {\n ...(bounds.min !== undefined ? { from: bounds.min } : {}),\n ...(bounds.max !== undefined ? { to: bounds.max } : {}),\n };\n}\n\nfunction toMultiSelectOption(option: DataTableFilterOption): MultiSelectOption {\n const label = option.label ?? option.value;\n return {\n value: option.value,\n label,\n ...(option.count !== undefined ? { title: `${label} · ${option.count.toLocaleString()}` } : {}),\n };\n}\n\n/**\n * Refuses a DataTable that would filter twice or offer a control wired to\n * nothing. Both are silent in a running table — rows narrow more than the user\n * asked, or a box swallows what they type — so they are refused at the seam.\n */\nexport function assertDataTableFilterProps(props: {\n autoFilter: boolean;\n manualFilter: boolean;\n showGlobalFilter: boolean;\n globalFilterControlled: boolean;\n hasExternalSearch: boolean;\n}): void {\n if (props.autoFilter && props.manualFilter) {\n throw new Error(\n \"DataTable: autoFilter generates filters that narrow rows locally, which manualFilter then suppresses — the controls would render and do nothing. Pass externalFilters instead.\",\n );\n }\n if (\n props.manualFilter &&\n props.showGlobalFilter &&\n !props.globalFilterControlled &&\n !props.hasExternalSearch\n ) {\n throw new Error(\n \"DataTable: manualFilter suppresses the built-in search's row narrowing, so showGlobalFilter needs globalFilter/onGlobalFilterChange or externalSearch to reach the source.\",\n );\n }\n}\n"],"names":[],"mappings":";;;AAuFO,MAAM,iCAAiC;AA4CvC,SAAS,gCACd,SACs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EAAE,CAAC;AAAA,IAC1D,SAAS,CAAC,MAAM,OACd;AAAA,MAAU,CAAC,YACT,sBAAsB,SAAS,WAAW,qBAAqB,EAAE,KAAK,MAAM,KAAK,IAAI,CAAC;AAAA,IAAA;AAAA,IAE1F,GAAI,OAAO,YAAY,SAAY,EAAE,SAAS,OAAO,QAAA,IAAY,CAAA;AAAA,IACjE,aAAa;AAAA,EAAA;AAEjB;AAGA,SAAS,cAAc,QAA2D;AAChF,SAAO;AAAA,IACL,GAAI,OAAO,QAAQ,SAAY,EAAE,MAAM,OAAO,IAAA,IAAQ,CAAA;AAAA,IACtD,GAAI,OAAO,QAAQ,SAAY,EAAE,IAAI,OAAO,QAAQ,CAAA;AAAA,EAAC;AAEzD;AAEA,SAAS,oBAAoB,QAAkD;AAC7E,QAAM,QAAQ,OAAO,SAAS,OAAO;AACrC,SAAO;AAAA,IACL,OAAO,OAAO;AAAA,IACd;AAAA,IACA,GAAI,OAAO,UAAU,SAAY,EAAE,OAAO,GAAG,KAAK,MAAM,OAAO,MAAM,eAAA,CAAgB,GAAA,IAAO,CAAA;AAAA,EAAC;AAEjG;AAOO,SAAS,2BAA2B,OAMlC;AACP,MAAI,MAAM,cAAc,MAAM,cAAc;AAC1C,UAAM,IAAI;AAAA,MACR;AAAA,IAAA;AAAA,EAEJ;AACA,MACE,MAAM,gBACN,MAAM,oBACN,CAAC,MAAM,0BACP,CAAC,MAAM,mBACP;AACA,UAAM,IAAI;AAAA,MACR;AAAA,IAAA;AAAA,EAEJ;AACF;"}
|
|
1
|
+
{"version":3,"file":"data-table-server-filters.js","sources":["../../src/data/data-table-server-filters.ts"],"sourcesContent":["import type { Dispatch, SetStateAction } from \"react\";\nimport type {\n FilterBarFilter,\n FilterBarNumberValue,\n FilterBarRangePreset,\n FilterBarRangeProps,\n} from \"../components/FilterBar\";\nimport type { FilterExtension } from \"../components/filter-bar-utils\";\nimport { applyFilterExtensions } from \"../components/filter-bar-utils\";\nimport type { MultiSelectOption } from \"../components/MultiSelect\";\nimport type { TriState } from \"../components/TriStateToggle\";\nimport { formatUnit } from \"../lib/format\";\nimport type { DataTableColumn, DataTableColumnKind } from \"./DataTable\";\nimport {\n parseBoundsValue,\n parseMultiFilterValue,\n serializeBoundsValue,\n serializeMultiFilterValue,\n updateFilterSelection,\n type DataTableFilterSelection,\n type FilterBoundsValue,\n} from \"./data-table-filter-values\";\nimport { prettifyKey } from \"./data-table-utils\";\n\n/**\n * Which control a filter renders as.\n *\n * Deliberately opaque: \"terms\" is not \"a SQL IN() or an OpenSearch terms\n * query\", it is \"a set of discrete values the user includes or excludes\". The\n * source compiles the selection; nothing about how it does so crosses into the\n * browser.\n */\nexport type DataTableFilterKind =\n | \"terms\"\n /** Whole values like \"terms\", but typed rather than picked — an identifier\n * has no list worth offering. */\n | \"exact\"\n | \"range\"\n /** A range over elapsed time, labelled in the column's own `unit`. */\n | \"duration\"\n | \"time\"\n /** A range over whole days: \"time\" with the clock taken off it. */\n | \"date\"\n | \"boolean\"\n | \"text\";\n\nexport type DataTableFilterOption = {\n /** Value written into the selection. */\n value: string;\n /** Display label. Falls back to `value`. */\n label?: string;\n /** How many rows carry this value, shown as a tooltip. */\n count?: number;\n};\n\nexport type DataTableColumnFilter = {\n kind: DataTableFilterKind;\n /** Head of the option set for kind:\"terms\". Empty relies on `lookup`. */\n options?: DataTableFilterOption[];\n /** True when `options` is a capped head of a larger set. */\n truncated?: boolean;\n /** Distinct count behind a truncated head; drives the \"… and N more\" hint. */\n total?: number;\n /** The source can answer a type-ahead for this filter. */\n lookup?: boolean;\n /** Slider domain for kind:\"range\". */\n min?: number;\n max?: number;\n step?: number;\n /** The unit a kind:\"duration\" bound is written in (\"ms\" or \"s\"), so the\n * control labels itself in the numbers the column is stored in. Absent\n * means milliseconds. */\n unit?: string;\n /** Range presets for kind:\"time\". */\n presets?: FilterBarRangePreset[];\n /** Helper text shown in the filter popover. */\n description?: string;\n disabled?: boolean;\n};\n\n/**\n * A result column as the source describes it: how to render it, and — when the\n * source can narrow on it — which filter parameter it binds to and what control\n * that filter is.\n *\n * `filterKey` need not equal `name`: an analyzed text field filters through an\n * exact-value sibling, and a computed column filters by the alias it was given.\n */\nexport type DataTableServerColumn = {\n /** Field name as the source knows it; also the literal row key. */\n name: string;\n /** Header label. Defaults to a prettified `name`. */\n label?: string;\n /** Backend type string, verbatim (e.g. \"TIMESTAMPTZ\", \"keyword\"). Display only. */\n databaseType?: string;\n /** Cell rendering kind. */\n kind?: DataTableColumnKind;\n /** Filter parameter this column narrows on. Absent means not filterable. */\n filterKey?: string;\n /** The control the filter renders as. Absent means not filterable. */\n filter?: DataTableColumnFilter;\n};\n\n/** Head-set size for a filter value type-ahead. */\nexport const DATA_TABLE_FILTER_LOOKUP_LIMIT = 20;\n\nexport type DataTableFilterLookupRequest = {\n /** Which filter is being searched — the column's `filterKey`. */\n filterKey: string;\n /** What the user typed. Empty asks for the head of the set. */\n search: string;\n /** How many options to return. */\n limit: number;\n};\n\nexport type DataTableFilterLookupResult = {\n options: DataTableFilterOption[];\n};\n\n/**\n * Answers a filter's value type-ahead. Sync or async — a static option source\n * returns an array, a server-backed one a promise.\n */\nexport type DataTableFilterLookup = (\n request: DataTableFilterLookupRequest,\n) => Promise<DataTableFilterLookupResult> | DataTableFilterLookupResult;\n\nexport type ServerFilterBarOptions = {\n /** Answers a terms type-ahead for filters whose `lookup` is set. */\n lookupValues?: DataTableFilterLookup;\n /** Decorators applied to each built filter (icons, relabelling). */\n extensions?: FilterExtension[];\n};\n\nexport type ServerFilterConfig = {\n filters: FilterBarFilter[];\n /** Present when exactly one column declared kind:\"time\". */\n timeRange?: FilterBarRangeProps;\n};\n\n/**\n * Turns the source's column description into DataTable columns.\n *\n * Every column gets a literal `accessor` — a raw result set has empty, dotted\n * and colliding names, none of which survive being read as a path — and\n * `filterable: false`, because a described result is filtered by the source and\n * never by cardinality guessed from one page.\n */\nexport function serverColumnsToDataTableColumns<T extends Record<string, unknown>>(\n columns: DataTableServerColumn[],\n): DataTableColumn<T>[] {\n return columns.map((column, index) => ({\n key: column.name === \"\" ? `column-${index}` : column.name,\n label: column.label ?? prettifyKey(column.name),\n accessor: (row: T) => row[column.name],\n sortable: true,\n filterable: false,\n ...(column.kind !== undefined ? { kind: column.kind } : {}),\n ...(column.filterKey !== undefined ? { filterKey: column.filterKey } : {}),\n }));\n}\n\n/**\n * Builds the FilterBar controls for a described result, already wired to\n * `values`/`setValues`.\n *\n * Pure — it holds no state and fetches nothing; a `lookup` filter closes over\n * the caller's loader. Pass the result as DataTable's `externalFilters`\n * together with `manualFilter`, since the source has already applied it.\n *\n * Throws when a column declares a filter it cannot address: no `filterKey`, a\n * `filterKey` another column already claimed, or a second time range. Each\n * would bind a control to a filter that means something else.\n */\nexport function serverFiltersToFilterBar(\n columns: DataTableServerColumn[],\n values: DataTableFilterSelection,\n setValues: Dispatch<SetStateAction<DataTableFilterSelection>>,\n options: ServerFilterBarOptions = {},\n): ServerFilterConfig {\n const config: ServerFilterConfig = { filters: [] };\n const claimed = new Map<string, string>();\n\n for (const column of columns) {\n const filter = column.filter;\n if (!filter) continue;\n const filterKey = column.filterKey;\n if (!filterKey) {\n throw new Error(`Column ${column.name} declares a filter but no filterKey to send it under`);\n }\n const owner = claimed.get(filterKey);\n if (owner !== undefined) {\n throw new Error(\n `Columns ${owner} and ${column.name} both filter through ${filterKey}; a filter key addresses one column`,\n );\n }\n claimed.set(filterKey, column.name);\n\n const label = column.label ?? prettifyKey(column.name);\n // The bar's own range control is the primary way through a result, and a\n // result has one of those — so the first time column takes it and any\n // others are ranges among the filters. A raw SELECT commonly returns\n // created_at beside updated_at, and refusing the second one cost the whole\n // bar rather than just that column's control.\n if (filter.kind === \"time\" && !config.timeRange) {\n config.timeRange = buildTimeRange(filterKey, filter, values, setValues);\n continue;\n }\n config.filters.push(\n applyFilterExtensions(\n buildFilter({ column, filterKey, label, filter, values, setValues, options }),\n options.extensions,\n ),\n );\n }\n return config;\n}\n\ntype BuildArgs = {\n column: DataTableServerColumn;\n filterKey: string;\n label: string;\n filter: DataTableColumnFilter;\n values: DataTableFilterSelection;\n setValues: Dispatch<SetStateAction<DataTableFilterSelection>>;\n options: ServerFilterBarOptions;\n};\n\nfunction buildFilter(args: BuildArgs): FilterBarFilter {\n const { filterKey, label, filter, values, setValues } = args;\n const raw = values[filterKey] ?? \"\";\n const write = (serialized: string) =>\n setValues((current) => updateFilterSelection(current, filterKey, serialized));\n const shared = {\n key: filterKey,\n label,\n ...(filter.description !== undefined ? { description: filter.description } : {}),\n ...(filter.disabled !== undefined ? { disabled: filter.disabled } : {}),\n };\n\n switch (filter.kind) {\n case \"time\":\n // A date range is the same two-edged control with the clock taken off it,\n // so it shares every line below except timeEnabled.\n case \"date\":\n return {\n ...shared,\n kind: \"date-range\",\n ...boundsToRange(parseBoundsValue(raw)),\n onApply: (from: string, to: string) =>\n write(serializeBoundsValue({ min: from, max: to })),\n ...(filter.presets !== undefined ? { presets: filter.presets } : {}),\n timeEnabled: filter.kind === \"time\",\n };\n case \"range\":\n // A duration is a range that knows what its numbers mean, so it differs\n // only in how the slider labels them.\n case \"duration\":\n return {\n ...shared,\n kind: \"number\",\n value: parseBoundsValue(raw),\n onChange: (next: FilterBarNumberValue) => write(serializeBoundsValue(next)),\n ...(filter.min !== undefined ? { domainMin: filter.min } : {}),\n ...(filter.max !== undefined ? { domainMax: filter.max } : {}),\n ...(filter.step !== undefined ? { step: filter.step } : {}),\n ...(filter.kind === \"duration\"\n ? { formatValue: (value: number) => formatUnit(value, filter.unit || \"ms\") }\n : {}),\n };\n // An exact match has nothing to enumerate, which is what buildTermsFilter\n // already falls back to for a selection that turned out to have no values.\n // Declaring it says so up front rather than arriving there by exhaustion.\n case \"exact\":\n return { ...shared, kind: \"text\", value: raw, onChange: (next: string) => write(next) };\n case \"boolean\":\n return {\n ...shared,\n kind: \"tristate\",\n value: raw === \"\" ? undefined : raw === \"true\",\n onChange: (next: TriState) => write(next === undefined ? \"\" : String(next)),\n };\n case \"text\":\n return {\n ...shared,\n kind: \"text\",\n value: raw,\n onChange: (next: string) => write(next),\n };\n default:\n return buildTermsFilter(args, shared, raw, write);\n }\n}\n\nfunction buildTermsFilter(\n { filter, options }: BuildArgs,\n shared: { key: string; label: string; description?: string; disabled?: boolean },\n raw: string,\n write: (serialized: string) => void,\n): FilterBarFilter {\n const lookupValues = options.lookupValues;\n // A selection with no options and no type-ahead has nothing to select from,\n // and a dropdown that opens empty is a control the user cannot use. The\n // grammar is the wire format either way, so typing \"a,b\" or \"!a\" into the\n // input still means what selecting them would have.\n if (!filter.lookup && (filter.options?.length ?? 0) === 0) {\n return { ...shared, kind: \"text\", value: raw, onChange: (next: string) => write(next) };\n }\n return {\n ...shared,\n kind: \"multi\",\n value: parseMultiFilterValue(raw),\n onChange: (next) => write(serializeMultiFilterValue(next)),\n options: (filter.options ?? []).map(toMultiSelectOption),\n ...(filter.truncated !== undefined ? { truncated: filter.truncated } : {}),\n ...(filter.total !== undefined ? { total: filter.total } : {}),\n // The field owns the in-flight flag from the promise this returns, so no\n // `loading` is passed: a second source of truth for it could disagree.\n ...(lookupValues && filter.lookup\n ? {\n onSearch: async (search: string) => {\n const result = await lookupValues({\n filterKey: shared.key,\n search,\n limit: DATA_TABLE_FILTER_LOOKUP_LIMIT,\n });\n return result.options.map(toMultiSelectOption);\n },\n }\n : {}),\n };\n}\n\nfunction buildTimeRange(\n filterKey: string,\n filter: DataTableColumnFilter,\n values: DataTableFilterSelection,\n setValues: Dispatch<SetStateAction<DataTableFilterSelection>>,\n): FilterBarRangeProps {\n return {\n ...boundsToRange(parseBoundsValue(values[filterKey] ?? \"\")),\n onApply: (from, to) =>\n setValues((current) =>\n updateFilterSelection(current, filterKey, serializeBoundsValue({ min: from, max: to })),\n ),\n ...(filter.presets !== undefined ? { presets: filter.presets } : {}),\n timeEnabled: true,\n };\n}\n\n/** Names a bounded selection's edges the way a range control reads them. */\nfunction boundsToRange(bounds: FilterBoundsValue): { from?: string; to?: string } {\n return {\n ...(bounds.min !== undefined ? { from: bounds.min } : {}),\n ...(bounds.max !== undefined ? { to: bounds.max } : {}),\n };\n}\n\nfunction toMultiSelectOption(option: DataTableFilterOption): MultiSelectOption {\n const label = option.label ?? option.value;\n return {\n value: option.value,\n label,\n ...(option.count !== undefined ? { title: `${label} · ${option.count.toLocaleString()}` } : {}),\n };\n}\n\n/**\n * Refuses a DataTable that would filter twice or offer a control wired to\n * nothing. Both are silent in a running table — rows narrow more than the user\n * asked, or a box swallows what they type — so they are refused at the seam.\n */\nexport function assertDataTableFilterProps(props: {\n autoFilter: boolean;\n manualFilter: boolean;\n showGlobalFilter: boolean;\n globalFilterControlled: boolean;\n hasExternalSearch: boolean;\n}): void {\n if (props.autoFilter && props.manualFilter) {\n throw new Error(\n \"DataTable: autoFilter generates filters that narrow rows locally, which manualFilter then suppresses — the controls would render and do nothing. Pass externalFilters instead.\",\n );\n }\n if (\n props.manualFilter &&\n props.showGlobalFilter &&\n !props.globalFilterControlled &&\n !props.hasExternalSearch\n ) {\n throw new Error(\n \"DataTable: manualFilter suppresses the built-in search's row narrowing, so showGlobalFilter needs globalFilter/onGlobalFilterChange or externalSearch to reach the source.\",\n );\n }\n}\n"],"names":[],"mappings":";;;;AAwGO,MAAM,iCAAiC;AA4CvC,SAAS,gCACd,SACsB;AACtB,SAAO,QAAQ,IAAI,CAAC,QAAQ,WAAW;AAAA,IACrC,KAAK,OAAO,SAAS,KAAK,UAAU,KAAK,KAAK,OAAO;AAAA,IACrD,OAAO,OAAO,SAAS,YAAY,OAAO,IAAI;AAAA,IAC9C,UAAU,CAAC,QAAW,IAAI,OAAO,IAAI;AAAA,IACrC,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,GAAI,OAAO,SAAS,SAAY,EAAE,MAAM,OAAO,KAAA,IAAS,CAAA;AAAA,IACxD,GAAI,OAAO,cAAc,SAAY,EAAE,WAAW,OAAO,cAAc,CAAA;AAAA,EAAC,EACxE;AACJ;AAcO,SAAS,yBACd,SACA,QACA,WACA,UAAkC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IAAI,CAAC;AAAA,IAAA;AAAA,IAE1F,GAAI,OAAO,YAAY,SAAY,EAAE,SAAS,OAAO,QAAA,IAAY,CAAA;AAAA,IACjE,aAAa;AAAA,EAAA;AAEjB;AAGA,SAAS,cAAc,QAA2D;AAChF,SAAO;AAAA,IACL,GAAI,OAAO,QAAQ,SAAY,EAAE,MAAM,OAAO,IAAA,IAAQ,CAAA;AAAA,IACtD,GAAI,OAAO,QAAQ,SAAY,EAAE,IAAI,OAAO,QAAQ,CAAA;AAAA,EAAC;AAEzD;AAEA,SAAS,oBAAoB,QAAkD;AAC7E,QAAM,QAAQ,OAAO,SAAS,OAAO;AACrC,SAAO;AAAA,IACL,OAAO,OAAO;AAAA,IACd;AAAA,IACA,GAAI,OAAO,UAAU,SAAY,EAAE,OAAO,GAAG,KAAK,MAAM,OAAO,MAAM,eAAA,CAAgB,GAAA,IAAO,CAAA;AAAA,EAAC;AAEjG;AAOO,SAAS,2BAA2B,OAMlC;AACP,MAAI,MAAM,cAAc,MAAM,cAAc;AAC1C,UAAM,IAAI;AAAA,MACR;AAAA,IAAA;AAAA,EAEJ;AACA,MACE,MAAM,gBACN,MAAM,oBACN,CAAC,MAAM,0BACP,CAAC,MAAM,mBACP;AACA,UAAM,IAAI;AAAA,MACR;AAAA,IAAA;AAAA,EAEJ;AACF;"}
|
|
@@ -10,7 +10,8 @@ const UiCheck = require("../../icons/components/UiCheck.cjs");
|
|
|
10
10
|
const UiChevronRight = require("../../icons/components/UiChevronRight.cjs");
|
|
11
11
|
const UiMethod = require("../../icons/components/UiMethod.cjs");
|
|
12
12
|
const UiDebugStepOver = require("../../icons/components/UiDebugStepOver.cjs");
|
|
13
|
-
function ErrorDetails({ diagnostics, renderJsonContext }) {
|
|
13
|
+
function ErrorDetails({ diagnostics, title = "Error", renderJsonContext }) {
|
|
14
|
+
var _a;
|
|
14
15
|
const [copyState, setCopyState] = react.useState("idle");
|
|
15
16
|
const scalarContext = diagnostics.context.filter(
|
|
16
17
|
([, value]) => !errorDiagnostics.parseInlineJsonContextValue(value)
|
|
@@ -23,15 +24,15 @@ function ErrorDetails({ diagnostics, renderJsonContext }) {
|
|
|
23
24
|
(entry) => entry.data !== null
|
|
24
25
|
);
|
|
25
26
|
const copyDiagnostics = async (event) => {
|
|
26
|
-
var
|
|
27
|
+
var _a2;
|
|
27
28
|
event.preventDefault();
|
|
28
29
|
event.stopPropagation();
|
|
29
|
-
if (!((
|
|
30
|
+
if (!((_a2 = navigator.clipboard) == null ? void 0 : _a2.writeText)) {
|
|
30
31
|
setCopyState("failed");
|
|
31
32
|
return;
|
|
32
33
|
}
|
|
33
34
|
try {
|
|
34
|
-
await navigator.clipboard.writeText(diagnosticReport(diagnostics));
|
|
35
|
+
await navigator.clipboard.writeText(diagnosticReport(diagnostics, title));
|
|
35
36
|
setCopyState("copied");
|
|
36
37
|
} catch {
|
|
37
38
|
setCopyState("failed");
|
|
@@ -41,7 +42,7 @@ function ErrorDetails({ diagnostics, renderJsonContext }) {
|
|
|
41
42
|
/* @__PURE__ */ jsxRuntime.jsxs("summary", { className: "flex cursor-pointer list-none items-start gap-2 p-3", children: [
|
|
42
43
|
/* @__PURE__ */ jsxRuntime.jsx(Icon.Icon, { icon: UiWarningTriangle.UiWarningTriangle, className: "mt-0.5 shrink-0 text-destructive" }),
|
|
43
44
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
44
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm font-semibold text-destructive", children:
|
|
45
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm font-semibold text-destructive", children: title }),
|
|
45
46
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 whitespace-pre-wrap text-sm text-destructive", children: diagnostics.message })
|
|
46
47
|
] }),
|
|
47
48
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex shrink-0 flex-col items-end gap-2 text-xs font-medium text-muted-foreground sm:flex-row sm:items-center sm:gap-3", children: [
|
|
@@ -94,6 +95,24 @@ function ErrorDetails({ diagnostics, renderJsonContext }) {
|
|
|
94
95
|
)
|
|
95
96
|
) })
|
|
96
97
|
] }),
|
|
98
|
+
(_a = diagnostics.details) == null ? void 0 : _a.map((detail) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
99
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-1.5 flex min-w-0 items-center justify-between gap-3", children: [
|
|
100
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: detail.label }),
|
|
101
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
102
|
+
"button",
|
|
103
|
+
{
|
|
104
|
+
type: "button",
|
|
105
|
+
onClick: () => copyText(detail.value),
|
|
106
|
+
className: "inline-flex items-center gap-1 text-xs font-medium text-muted-foreground hover:text-foreground",
|
|
107
|
+
children: [
|
|
108
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon.Icon, { icon: UiCopy.UiCopy }),
|
|
109
|
+
"copy"
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
)
|
|
113
|
+
] }),
|
|
114
|
+
/* @__PURE__ */ jsxRuntime.jsx("pre", { className: "max-h-64 overflow-auto whitespace-pre-wrap break-all rounded-md bg-muted p-2 font-mono text-xs leading-5 text-foreground", children: detail.value })
|
|
115
|
+
] }, detail.label)),
|
|
97
116
|
diagnostics.stacktrace && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
98
117
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-1.5 flex min-w-0 items-center justify-between gap-3", children: [
|
|
99
118
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: "Stack trace" }),
|
|
@@ -115,8 +134,8 @@ function ErrorDetails({ diagnostics, renderJsonContext }) {
|
|
|
115
134
|
] })
|
|
116
135
|
] });
|
|
117
136
|
}
|
|
118
|
-
function diagnosticReport(diagnostics) {
|
|
119
|
-
const lines = [
|
|
137
|
+
function diagnosticReport(diagnostics, title) {
|
|
138
|
+
const lines = [`${title}: ${diagnostics.message}`];
|
|
120
139
|
if (diagnostics.trace) lines.push(`Trace: ${diagnostics.trace}`);
|
|
121
140
|
if (diagnostics.time) lines.push(`Time: ${diagnostics.time}`);
|
|
122
141
|
if (diagnostics.context.length > 0) {
|
|
@@ -126,6 +145,9 @@ function diagnosticReport(diagnostics) {
|
|
|
126
145
|
...diagnostics.context.map(([label, value]) => `${label}: ${value}`)
|
|
127
146
|
);
|
|
128
147
|
}
|
|
148
|
+
for (const detail of diagnostics.details ?? []) {
|
|
149
|
+
lines.push("", `${detail.label}:`, detail.value);
|
|
150
|
+
}
|
|
129
151
|
if (diagnostics.stacktrace) {
|
|
130
152
|
lines.push("", "Stack trace:", diagnostics.stacktrace);
|
|
131
153
|
}
|