@flanksource/clicky-ui 0.3.21 → 0.3.23
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/CountryFlag.cjs +55 -0
- package/dist/components/CountryFlag.cjs.map +1 -0
- package/dist/components/CountryFlag.d.ts +8 -0
- package/dist/components/CountryFlag.d.ts.map +1 -0
- package/dist/components/CountryFlag.js +38 -0
- package/dist/components/CountryFlag.js.map +1 -0
- package/dist/components/CountryPicker.cjs +35 -0
- package/dist/components/CountryPicker.cjs.map +1 -0
- package/dist/components/CountryPicker.d.ts +4 -0
- package/dist/components/CountryPicker.d.ts.map +1 -0
- package/dist/components/CountryPicker.js +35 -0
- package/dist/components/CountryPicker.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/SplitButton.cjs +3 -2
- package/dist/components/SplitButton.cjs.map +1 -1
- package/dist/components/SplitButton.d.ts +6 -1
- package/dist/components/SplitButton.d.ts.map +1 -1
- package/dist/components/SplitButton.js +3 -2
- package/dist/components/SplitButton.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/country-options.cjs +34 -0
- package/dist/components/country-options.cjs.map +1 -0
- package/dist/components/country-options.d.ts +8 -0
- package/dist/components/country-options.d.ts.map +1 -0
- package/dist/components/country-options.js +34 -0
- package/dist/components/country-options.js.map +1 -0
- 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 +24 -0
- package/dist/components.cjs.map +1 -1
- package/dist/components.d.ts +12 -3
- package/dist/components.d.ts.map +1 -1
- package/dist/components.js +24 -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 +311 -249
- 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 +314 -252
- package/dist/data/Clicky.js.map +1 -1
- package/dist/data/CodeDiff.cjs +3 -18
- package/dist/data/CodeDiff.cjs.map +1 -1
- package/dist/data/CodeDiff.d.ts.map +1 -1
- package/dist/data/CodeDiff.js +3 -18
- package/dist/data/CodeDiff.js.map +1 -1
- package/dist/data/DataTable.cjs +420 -172
- package/dist/data/DataTable.cjs.map +1 -1
- package/dist/data/DataTable.d.ts +57 -4
- package/dist/data/DataTable.d.ts.map +1 -1
- package/dist/data/DataTable.grouping.cjs +26 -0
- package/dist/data/DataTable.grouping.cjs.map +1 -1
- package/dist/data/DataTable.grouping.d.ts +49 -1
- package/dist/data/DataTable.grouping.d.ts.map +1 -1
- package/dist/data/DataTable.grouping.js +26 -0
- package/dist/data/DataTable.grouping.js.map +1 -1
- package/dist/data/DataTable.js +423 -175
- package/dist/data/DataTable.js.map +1 -1
- package/dist/data/DataTableGroupingControls.cjs +84 -0
- package/dist/data/DataTableGroupingControls.cjs.map +1 -0
- package/dist/data/DataTableGroupingControls.d.ts +17 -0
- package/dist/data/DataTableGroupingControls.d.ts.map +1 -0
- package/dist/data/DataTableGroupingControls.js +84 -0
- package/dist/data/DataTableGroupingControls.js.map +1 -0
- package/dist/data/HighlightedTokens.cjs +21 -0
- package/dist/data/HighlightedTokens.cjs.map +1 -0
- package/dist/data/HighlightedTokens.d.ts +6 -0
- package/dist/data/HighlightedTokens.d.ts.map +1 -0
- package/dist/data/HighlightedTokens.js +21 -0
- package/dist/data/HighlightedTokens.js.map +1 -0
- 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/code-highlight.cjs +0 -6
- package/dist/data/code-highlight.cjs.map +1 -1
- package/dist/data/code-highlight.d.ts +4 -3
- package/dist/data/code-highlight.d.ts.map +1 -1
- package/dist/data/code-highlight.js +1 -7
- package/dist/data/code-highlight.js.map +1 -1
- 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/DiagnosticsDetailPanel.cjs +6 -2
- package/dist/data/diagnostics/DiagnosticsDetailPanel.cjs.map +1 -1
- package/dist/data/diagnostics/DiagnosticsDetailPanel.d.ts +8 -1
- package/dist/data/diagnostics/DiagnosticsDetailPanel.d.ts.map +1 -1
- package/dist/data/diagnostics/DiagnosticsDetailPanel.js +6 -2
- package/dist/data/diagnostics/DiagnosticsDetailPanel.js.map +1 -1
- package/dist/data/diagnostics/ErrorDetails.cjs +58 -12
- package/dist/data/diagnostics/ErrorDetails.cjs.map +1 -1
- package/dist/data/diagnostics/ErrorDetails.d.ts +5 -2
- package/dist/data/diagnostics/ErrorDetails.d.ts.map +1 -1
- package/dist/data/diagnostics/ErrorDetails.js +58 -12
- package/dist/data/diagnostics/ErrorDetails.js.map +1 -1
- package/dist/data/diagnostics/FrameSourceWindow.cjs +54 -24
- package/dist/data/diagnostics/FrameSourceWindow.cjs.map +1 -1
- package/dist/data/diagnostics/FrameSourceWindow.d.ts +2 -1
- package/dist/data/diagnostics/FrameSourceWindow.d.ts.map +1 -1
- package/dist/data/diagnostics/FrameSourceWindow.js +54 -24
- package/dist/data/diagnostics/FrameSourceWindow.js.map +1 -1
- package/dist/data/diagnostics/FrameSourceWindow.utils.cjs.map +1 -1
- package/dist/data/diagnostics/FrameSourceWindow.utils.d.ts +3 -0
- package/dist/data/diagnostics/FrameSourceWindow.utils.d.ts.map +1 -1
- package/dist/data/diagnostics/FrameSourceWindow.utils.js.map +1 -1
- package/dist/data/diagnostics/JvmStackTrace.cjs +14 -30
- package/dist/data/diagnostics/JvmStackTrace.cjs.map +1 -1
- package/dist/data/diagnostics/JvmStackTrace.d.ts +6 -9
- package/dist/data/diagnostics/JvmStackTrace.d.ts.map +1 -1
- package/dist/data/diagnostics/JvmStackTrace.js +15 -31
- package/dist/data/diagnostics/JvmStackTrace.js.map +1 -1
- package/dist/data/diagnostics/RenderedStackTrace.cjs +14 -144
- package/dist/data/diagnostics/RenderedStackTrace.cjs.map +1 -1
- package/dist/data/diagnostics/RenderedStackTrace.d.ts +6 -6
- package/dist/data/diagnostics/RenderedStackTrace.d.ts.map +1 -1
- package/dist/data/diagnostics/RenderedStackTrace.js +15 -145
- package/dist/data/diagnostics/RenderedStackTrace.js.map +1 -1
- package/dist/data/diagnostics/StackFrameRow.cjs +65 -0
- package/dist/data/diagnostics/StackFrameRow.cjs.map +1 -0
- package/dist/data/diagnostics/StackFrameRow.d.ts +13 -0
- package/dist/data/diagnostics/StackFrameRow.d.ts.map +1 -0
- package/dist/data/diagnostics/StackFrameRow.js +65 -0
- package/dist/data/diagnostics/StackFrameRow.js.map +1 -0
- package/dist/data/diagnostics/ThreadCard.cjs +9 -2
- package/dist/data/diagnostics/ThreadCard.cjs.map +1 -1
- package/dist/data/diagnostics/ThreadCard.d.ts +3 -1
- package/dist/data/diagnostics/ThreadCard.d.ts.map +1 -1
- package/dist/data/diagnostics/ThreadCard.js +9 -2
- package/dist/data/diagnostics/ThreadCard.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/diagnostics/frame-heuristics.cjs +26 -0
- package/dist/data/diagnostics/frame-heuristics.cjs.map +1 -0
- package/dist/data/diagnostics/frame-heuristics.d.ts +5 -0
- package/dist/data/diagnostics/frame-heuristics.d.ts.map +1 -0
- package/dist/data/diagnostics/frame-heuristics.js +26 -0
- package/dist/data/diagnostics/frame-heuristics.js.map +1 -0
- package/dist/data/diagnostics/jvm-stacktrace.cjs +5 -7
- package/dist/data/diagnostics/jvm-stacktrace.cjs.map +1 -1
- package/dist/data/diagnostics/jvm-stacktrace.d.ts.map +1 -1
- package/dist/data/diagnostics/jvm-stacktrace.js +5 -7
- package/dist/data/diagnostics/jvm-stacktrace.js.map +1 -1
- package/dist/data/diagnostics/stacktrace-parse.cjs +4 -9
- package/dist/data/diagnostics/stacktrace-parse.cjs.map +1 -1
- package/dist/data/diagnostics/stacktrace-parse.d.ts.map +1 -1
- package/dist/data/diagnostics/stacktrace-parse.js +4 -9
- package/dist/data/diagnostics/stacktrace-parse.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 +51 -1
- package/dist/data.cjs.map +1 -1
- package/dist/data.d.ts +11 -4
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +52 -2
- 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 +93 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +94 -2
- 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 +9 -19
- package/dist/rpc/CommandForm.cjs.map +1 -1
- package/dist/rpc/CommandForm.d.ts +8 -2
- package/dist/rpc/CommandForm.d.ts.map +1 -1
- package/dist/rpc/CommandForm.js +10 -20
- 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/OperationActionDialog.cjs +3 -3
- package/dist/rpc/OperationActionDialog.cjs.map +1 -1
- package/dist/rpc/OperationActionDialog.js +3 -3
- package/dist/rpc/OperationActionDialog.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 +26 -14
- package/dist/rpc/OperationCommandPage.cjs.map +1 -1
- package/dist/rpc/OperationCommandPage.d.ts.map +1 -1
- package/dist/rpc/OperationCommandPage.js +28 -16
- 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 +28 -4
- package/dist/rpc/apiClient.cjs.map +1 -1
- package/dist/rpc/apiClient.d.ts +19 -9
- package/dist/rpc/apiClient.d.ts.map +1 -1
- package/dist/rpc/apiClient.js +29 -5
- 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 +228 -57
- package/dist/rpc/formMetadata.cjs.map +1 -1
- package/dist/rpc/formMetadata.d.ts +19 -2
- package/dist/rpc/formMetadata.d.ts.map +1 -1
- package/dist/rpc/formMetadata.js +230 -59
- 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/rpc-story.fixtures.d.ts.map +1 -1
- package/dist/rpc/types.cjs.map +1 -1
- package/dist/rpc/types.d.ts +55 -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 +4 -4
- 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 +3 -2
- 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 +6 -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,174 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const connectionBrowserModel = require("../connections/connectionBrowserModel.cjs");
|
|
4
|
+
const profileApi = require("../profileApi.cjs");
|
|
5
|
+
const CEL_EDITOR_WIDGET = "cel-editor";
|
|
6
|
+
function evaluateCel(request) {
|
|
7
|
+
const configured = profileApi.celEvaluator();
|
|
8
|
+
if (configured) return configured(request);
|
|
9
|
+
return connectionBrowserModel.fetchJSON(profileApi.profileApiPath("profile/sample/expression"), {
|
|
10
|
+
method: "POST",
|
|
11
|
+
headers: { "Content-Type": "application/json" },
|
|
12
|
+
body: JSON.stringify(request)
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function coverage(results) {
|
|
16
|
+
const types = /* @__PURE__ */ new Set();
|
|
17
|
+
const barren = [];
|
|
18
|
+
let ok = 0;
|
|
19
|
+
let empty = 0;
|
|
20
|
+
let failed = 0;
|
|
21
|
+
for (const result of results) {
|
|
22
|
+
if (result.error) {
|
|
23
|
+
failed += 1;
|
|
24
|
+
barren.push(result.index);
|
|
25
|
+
continue;
|
|
26
|
+
}
|
|
27
|
+
if (result.value === null || result.value === void 0) {
|
|
28
|
+
empty += 1;
|
|
29
|
+
barren.push(result.index);
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
ok += 1;
|
|
33
|
+
if (result.type) types.add(result.type);
|
|
34
|
+
}
|
|
35
|
+
return { ok, empty, failed, barren, types: [...types].sort() };
|
|
36
|
+
}
|
|
37
|
+
function nextBarren(coverageResult, from) {
|
|
38
|
+
return coverageResult.barren.find((index) => index > from) ?? coverageResult.barren[0];
|
|
39
|
+
}
|
|
40
|
+
function isClean(coverageResult) {
|
|
41
|
+
return coverageResult.failed === 0 && coverageResult.empty === 0;
|
|
42
|
+
}
|
|
43
|
+
function isIdentifier(key) {
|
|
44
|
+
return /^[A-Za-z_][A-Za-z0-9_]*$/.test(key);
|
|
45
|
+
}
|
|
46
|
+
function bindingsFor(scope, row) {
|
|
47
|
+
if (scope === "batch") {
|
|
48
|
+
return [
|
|
49
|
+
{ name: "batch", detail: "list · the grouped rows, oldest first" },
|
|
50
|
+
{ name: "first", detail: "map · batch[0]" },
|
|
51
|
+
{ name: "last", detail: "map · the final row of the batch" },
|
|
52
|
+
{ name: "count", detail: "int · how many rows collapsed" },
|
|
53
|
+
{ name: "row", detail: "map · the kept row" }
|
|
54
|
+
];
|
|
55
|
+
}
|
|
56
|
+
if (scope === "boundary") {
|
|
57
|
+
return [
|
|
58
|
+
{ name: "row", detail: "map · the row being judged" },
|
|
59
|
+
{ name: "prev", detail: "map · the row above it" },
|
|
60
|
+
{ name: "index", detail: "int · position in the result" }
|
|
61
|
+
];
|
|
62
|
+
}
|
|
63
|
+
const fixed = [
|
|
64
|
+
{ name: "row", detail: "map · the whole row" },
|
|
65
|
+
{ name: "span", detail: "map · the same row, for trace profiles" }
|
|
66
|
+
];
|
|
67
|
+
if (!row) return fixed;
|
|
68
|
+
const flattened = Object.keys(row).filter(isIdentifier).filter((key) => key !== "row" && key !== "span").sort().map((key) => ({ name: key, detail: `bound bare and as row.${key}`, value: row[key] }));
|
|
69
|
+
return [...fixed, ...flattened];
|
|
70
|
+
}
|
|
71
|
+
function unreachableKeys(row) {
|
|
72
|
+
return Object.keys(row ?? {}).filter((key) => !isIdentifier(key));
|
|
73
|
+
}
|
|
74
|
+
const RAW_ERROR_LIMIT = 240;
|
|
75
|
+
function elide(text, limit = RAW_ERROR_LIMIT) {
|
|
76
|
+
if (text.length <= limit) return text;
|
|
77
|
+
const head = Math.ceil((limit - 1) / 2);
|
|
78
|
+
return `${text.slice(0, head)}…${text.slice(text.length - (limit - 1 - head))}`;
|
|
79
|
+
}
|
|
80
|
+
const ARRAY_INTO_OBJECT = /cannot unmarshal\s+!!seq\s+into\s+map\[string\]interface\s*\{\s*\}/;
|
|
81
|
+
const OBJECT_INTO_ARRAY = /cannot unmarshal\s+!!map\s+into\s+\[\]interface\s*\{\s*\}/;
|
|
82
|
+
function explainCelError(error, draft) {
|
|
83
|
+
const raw = elide(error);
|
|
84
|
+
if (ARRAY_INTO_OBJECT.test(error)) {
|
|
85
|
+
const failure = {
|
|
86
|
+
message: "That value is a JSON array. JSON() decodes an object — use JSONArray(), then index or filter it.",
|
|
87
|
+
raw
|
|
88
|
+
};
|
|
89
|
+
if (draft.includes(".JSON()")) failure.fix = draft.replaceAll(".JSON()", ".JSONArray()");
|
|
90
|
+
return failure;
|
|
91
|
+
}
|
|
92
|
+
if (OBJECT_INTO_ARRAY.test(error)) {
|
|
93
|
+
const failure = {
|
|
94
|
+
message: "That value is a JSON object. JSONArray() decodes a list — use JSON().",
|
|
95
|
+
raw
|
|
96
|
+
};
|
|
97
|
+
if (draft.includes(".JSONArray()")) failure.fix = draft.replaceAll(".JSONArray()", ".JSON()");
|
|
98
|
+
return failure;
|
|
99
|
+
}
|
|
100
|
+
return { message: raw, raw };
|
|
101
|
+
}
|
|
102
|
+
function isKeyValueList(value) {
|
|
103
|
+
return Array.isArray(value) && value.length > 0 && value.every(
|
|
104
|
+
(entry) => entry !== null && typeof entry === "object" && "key" in entry && "value" in entry
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
function decoded(value) {
|
|
108
|
+
if (typeof value !== "string") return value;
|
|
109
|
+
const text = value.trim();
|
|
110
|
+
if (!text.startsWith("{") && !text.startsWith("[")) return value;
|
|
111
|
+
try {
|
|
112
|
+
return JSON.parse(text);
|
|
113
|
+
} catch {
|
|
114
|
+
return value;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
function celExamplesFor(accessor, value) {
|
|
118
|
+
var _a;
|
|
119
|
+
const inner = decoded(value);
|
|
120
|
+
const range = `dyn(${accessor})`;
|
|
121
|
+
if (isKeyValueList(inner)) {
|
|
122
|
+
const sample = String(((_a = inner[0]) == null ? void 0 : _a["key"]) ?? "key");
|
|
123
|
+
const asMap = `${range}.fold(e, acc, merge(acc, {e.key: e.value}))`;
|
|
124
|
+
return [
|
|
125
|
+
{ label: `Read ${sample}`, expression: `${asMap}[${JSON.stringify(sample)}]` },
|
|
126
|
+
// The map itself has to be encoded to leave the engine: a CEL map is a
|
|
127
|
+
// map[ref.Val]ref.Val, which the response cannot serialize. Indexing one
|
|
128
|
+
// yields a scalar and needs no such call, which is why only this example
|
|
129
|
+
// carries it.
|
|
130
|
+
{ label: "Fold every entry into a map", expression: `${asMap}.toJSON()` },
|
|
131
|
+
{ label: "List the keys", expression: `${range}.map(e, e.key)` },
|
|
132
|
+
{ label: "Keep the whole list", expression: accessor }
|
|
133
|
+
];
|
|
134
|
+
}
|
|
135
|
+
if (Array.isArray(inner)) {
|
|
136
|
+
const field = Object.keys(inner[0] ?? {})[0];
|
|
137
|
+
return [
|
|
138
|
+
{ label: "Take the first entry", expression: `${accessor}[0]` },
|
|
139
|
+
{ label: "Count the entries", expression: `size(${accessor})` },
|
|
140
|
+
...field ? [{ label: `Pull ${field} from each`, expression: `${range}.map(e, e.${field})` }] : [],
|
|
141
|
+
{ label: "Keep the whole list", expression: accessor }
|
|
142
|
+
];
|
|
143
|
+
}
|
|
144
|
+
if (inner !== null && typeof inner === "object") {
|
|
145
|
+
const field = Object.keys(inner)[0];
|
|
146
|
+
return [
|
|
147
|
+
...field ? [
|
|
148
|
+
{ label: `Read ${field}`, expression: `${accessor}.${field}` },
|
|
149
|
+
{
|
|
150
|
+
label: `Default ${field} when missing`,
|
|
151
|
+
expression: `has(${accessor}.${field}) ? ${accessor}.${field} : ""`
|
|
152
|
+
}
|
|
153
|
+
] : [],
|
|
154
|
+
{ label: "List the keys", expression: `${accessor}.keys()` },
|
|
155
|
+
{ label: "Keep the whole object", expression: accessor }
|
|
156
|
+
];
|
|
157
|
+
}
|
|
158
|
+
return [
|
|
159
|
+
{ label: "Read it", expression: accessor },
|
|
160
|
+
{ label: "Convert to text", expression: `string(${accessor})` },
|
|
161
|
+
...typeof inner === "number" ? [{ label: "Scale by 1,000", expression: `${accessor} / 1000.0` }] : []
|
|
162
|
+
];
|
|
163
|
+
}
|
|
164
|
+
exports.CEL_EDITOR_WIDGET = CEL_EDITOR_WIDGET;
|
|
165
|
+
exports.bindingsFor = bindingsFor;
|
|
166
|
+
exports.celExamplesFor = celExamplesFor;
|
|
167
|
+
exports.coverage = coverage;
|
|
168
|
+
exports.evaluateCel = evaluateCel;
|
|
169
|
+
exports.explainCelError = explainCelError;
|
|
170
|
+
exports.isClean = isClean;
|
|
171
|
+
exports.isIdentifier = isIdentifier;
|
|
172
|
+
exports.nextBarren = nextBarren;
|
|
173
|
+
exports.unreachableKeys = unreachableKeys;
|
|
174
|
+
//# sourceMappingURL=celExpression.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"celExpression.cjs","sources":["../../../src/profiles/cel/celExpression.ts"],"sourcesContent":["import { fetchJSON } from \"../connections/connectionBrowserModel\";\nimport { celEvaluator, profileApiPath } from \"../profileApi\";\n\n/**\n * The three binding environments a profile's CEL can compile against.\n *\n * The schema tags each CEL field with the one it belongs to\n * (`x-clicky-cel-scope`), because the document itself does not record it: a\n * column's expression and a processor's `set` are two strings in the same YAML\n * that see different variables.\n */\nexport type CelScope = \"row\" | \"batch\" | \"boundary\";\n\n/**\n * The `x-clicky-component` hint the profile schema tags every CEL field with, so\n * the form offers an editor that knows the bindings and can evaluate rather than\n * a bare input. Mirrors query/schema.celEditorComponent.\n */\nexport const CEL_EDITOR_WIDGET = \"cel-editor\";\n\nexport type CelResult = {\n index: number;\n value?: unknown;\n type?: string;\n error?: string;\n};\n\nexport type CelResponse = {\n results: CelResult[];\n error?: string;\n};\n\nexport type CelRequest = {\n cel: string;\n scope: CelScope;\n rows: unknown[];\n keep?: string;\n};\n\n/** What runs an expression for the editor. See {@link evaluateCel}. */\nexport type CelEvaluator = (request: CelRequest) => Promise<CelResponse>;\n\n/**\n * Evaluates an expression against the sampled rows, once per row.\n *\n * It has to be run by the engine that will run it for real, or the preview would\n * confidently disagree with the column it previews — CEL here is null-safe in\n * ways a browser reimplementation would not reproduce. The rows travel up with\n * the request because the caller already sampled them.\n *\n * Which engine that is belongs to the host: the default posts to commons-db's\n * profile service at the configured mount, and a host whose expressions are\n * evaluated somewhere else — a different route, an RPC, a WASM build running in\n * the tab — supplies its own through `configureProfiles({ celEvaluator })`\n * rather than forking the editor.\n */\nexport function evaluateCel(request: CelRequest): Promise<CelResponse> {\n const configured = celEvaluator();\n if (configured) return configured(request);\n return fetchJSON<CelResponse>(profileApiPath(\"profile/sample/expression\"), {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify(request),\n });\n}\n\nexport type CelCoverage = {\n /** Rows that produced a usable value. */\n ok: number;\n /** Rows the expression read nothing from. */\n empty: number;\n /** Rows where evaluation itself failed. */\n failed: number;\n /** Indices of rows that produced nothing usable, in row order. */\n barren: number[];\n /** The distinct result types seen, so a column that is sometimes a string shows. */\n types: string[];\n};\n\n/**\n * What an expression did across the whole sample.\n *\n * `empty` is deliberately not folded into `ok`. An out-of-range index or a\n * missing field does not throw in this engine — it reads as null — so the\n * expression that is wrong about most of the data still returns cleanly, and\n * counting those rows as successes is exactly the mistake this view exists to\n * prevent.\n */\nexport function coverage(results: CelResult[]): CelCoverage {\n const types = new Set<string>();\n const barren: number[] = [];\n let ok = 0;\n let empty = 0;\n let failed = 0;\n\n for (const result of results) {\n if (result.error) {\n failed += 1;\n barren.push(result.index);\n continue;\n }\n if (result.value === null || result.value === undefined) {\n empty += 1;\n barren.push(result.index);\n continue;\n }\n ok += 1;\n if (result.type) types.add(result.type);\n }\n\n return { ok, empty, failed, barren, types: [...types].sort() };\n}\n\n/**\n * The next row worth looking at after `from`, wrapping.\n *\n * An author works from the rows on screen and the rows an expression reads\n * nothing from are, by definition, ones they have not looked at — so the editor\n * has to be able to go and find them.\n */\nexport function nextBarren(coverageResult: CelCoverage, from: number): number | undefined {\n return coverageResult.barren.find((index) => index > from) ?? coverageResult.barren[0];\n}\n\n/** True when the expression is safe to apply: every sampled row evaluated. */\nexport function isClean(coverageResult: CelCoverage): boolean {\n return coverageResult.failed === 0 && coverageResult.empty === 0;\n}\n\n/** `^[A-Za-z_][A-Za-z0-9_]*$` — the rule the engine flattens a row key by. */\nexport function isIdentifier(key: string): boolean {\n return /^[A-Za-z_][A-Za-z0-9_]*$/.test(key);\n}\n\nexport type Binding = { name: string; detail: string; value?: unknown };\n\n/**\n * What an expression may name in `scope`.\n *\n * Only `row` and `span` are fixed in the row scope — every other name comes from\n * the data, because the engine binds each row key that is a valid identifier as\n * a bare variable. A key that is not one, like `@timestamp`, is reachable only\n * through `row`, and the palette says so by omission rather than offering a name\n * that will not compile.\n */\nexport function bindingsFor(scope: CelScope, row: Record<string, unknown> | undefined): Binding[] {\n if (scope === \"batch\") {\n return [\n { name: \"batch\", detail: \"list · the grouped rows, oldest first\" },\n { name: \"first\", detail: \"map · batch[0]\" },\n { name: \"last\", detail: \"map · the final row of the batch\" },\n { name: \"count\", detail: \"int · how many rows collapsed\" },\n { name: \"row\", detail: \"map · the kept row\" },\n ];\n }\n if (scope === \"boundary\") {\n return [\n { name: \"row\", detail: \"map · the row being judged\" },\n { name: \"prev\", detail: \"map · the row above it\" },\n { name: \"index\", detail: \"int · position in the result\" },\n ];\n }\n\n const fixed: Binding[] = [\n { name: \"row\", detail: \"map · the whole row\" },\n { name: \"span\", detail: \"map · the same row, for trace profiles\" },\n ];\n if (!row) return fixed;\n\n const flattened = Object.keys(row)\n .filter(isIdentifier)\n .filter((key) => key !== \"row\" && key !== \"span\")\n .sort()\n .map((key) => ({ name: key, detail: `bound bare and as row.${key}`, value: row[key] }));\n\n return [...fixed, ...flattened];\n}\n\n/** Row keys that exist but cannot be named directly. */\nexport function unreachableKeys(row: Record<string, unknown> | undefined): string[] {\n return Object.keys(row ?? {}).filter((key) => !isIdentifier(key));\n}\n\n/**\n * A failure the author can act on, read out of the engine's own words.\n *\n * The engine reports in the vocabulary of the Go library underneath it, so\n * decoding an array with `.JSON()` — a mistake the type system cannot catch,\n * because both decoders take a string — comes back as a YAML type name and the\n * entire offending value inline. Neither says what to do.\n */\nexport type CelFailure = {\n /** What went wrong, in the author's terms. */\n message: string;\n /** The draft rewritten to fix it, when the fix is unambiguous. */\n fix?: string;\n /** The engine's own words, kept for a failure this cannot explain. */\n raw: string;\n};\n\n/** How much of an error is worth showing before it buries the dialog. */\nconst RAW_ERROR_LIMIT = 240;\n\n/**\n * Shortens an error from the middle.\n *\n * Both ends carry the meaning — the prefix names the operation that failed and\n * the suffix names the failure — and it is the value interpolated between them\n * that runs to kilobytes. Trimming the tail would throw away the diagnosis and\n * keep the payload, which is the wrong half.\n */\nfunction elide(text: string, limit = RAW_ERROR_LIMIT): string {\n if (text.length <= limit) return text;\n const head = Math.ceil((limit - 1) / 2);\n return `${text.slice(0, head)}…${text.slice(text.length - (limit - 1 - head))}`;\n}\n\n/**\n * `.JSON()` decodes an object; the value was an array. The signature is the Go\n * map type the decode targeted — matched on that rather than on the message\n * around it, which carries the whole value and so is never stable.\n */\nconst ARRAY_INTO_OBJECT = /cannot unmarshal\\s+!!seq\\s+into\\s+map\\[string\\]interface\\s*\\{\\s*\\}/;\n\n/** Conversely: `.JSONArray()` on an object. */\nconst OBJECT_INTO_ARRAY = /cannot unmarshal\\s+!!map\\s+into\\s+\\[\\]interface\\s*\\{\\s*\\}/;\n\nexport function explainCelError(error: string, draft: string): CelFailure {\n const raw = elide(error);\n\n if (ARRAY_INTO_OBJECT.test(error)) {\n const failure: CelFailure = {\n message:\n \"That value is a JSON array. JSON() decodes an object — use JSONArray(), then index or filter it.\",\n raw,\n };\n if (draft.includes(\".JSON()\")) failure.fix = draft.replaceAll(\".JSON()\", \".JSONArray()\");\n return failure;\n }\n\n if (OBJECT_INTO_ARRAY.test(error)) {\n const failure: CelFailure = {\n message: \"That value is a JSON object. JSONArray() decodes a list — use JSON().\",\n raw,\n };\n if (draft.includes(\".JSONArray()\")) failure.fix = draft.replaceAll(\".JSONArray()\", \".JSON()\");\n return failure;\n }\n\n return { message: raw, raw };\n}\n\n/** An example expression the author can drop into the draft. */\nexport type CelExample = { label: string; expression: string };\n\n/** Whether a list looks like OpenTelemetry's `[{key, type, value}]` tag shape. */\nfunction isKeyValueList(value: unknown): value is Array<Record<string, unknown>> {\n return (\n Array.isArray(value) &&\n value.length > 0 &&\n value.every(\n (entry) =>\n entry !== null && typeof entry === \"object\" && \"key\" in entry && \"value\" in entry,\n )\n );\n}\n\n/** The value behind an accessor, decoded when the column holds JSON as text. */\nfunction decoded(value: unknown): unknown {\n if (typeof value !== \"string\") return value;\n const text = value.trim();\n if (!text.startsWith(\"{\") && !text.startsWith(\"[\")) return value;\n try {\n return JSON.parse(text) as unknown;\n } catch {\n return value;\n }\n}\n\n/**\n * Examples that fit the value in front of the author.\n *\n * A fixed list is wrong wherever it matters most: on a JSON column every\n * suggestion built from the field name alone reads the encoded string rather\n * than what is in it. These are derived from the sampled value, so the decoder\n * they carry is the one that value actually needs — which is the same mistake\n * this whole panel exists to stop the author making.\n *\n * The syntax is gomplate's own, verified against its CEL reference: the\n * comprehension macros (map/filter), and `fold` with the `merge` helper for\n * folding a key/value list into a map. Ranges are wrapped in `dyn(...)` because\n * the engine declares every binding as `any` and a comprehension needs a\n * concrete list to walk.\n */\nexport function celExamplesFor(accessor: string, value: unknown): CelExample[] {\n const inner = decoded(value);\n const range = `dyn(${accessor})`;\n\n if (isKeyValueList(inner)) {\n const sample = String(inner[0]?.[\"key\"] ?? \"key\");\n // A fold into a map rather than filter-then-index: a missing key reads as\n // absent, where indexing an empty filter result is a hard error.\n const asMap = `${range}.fold(e, acc, merge(acc, {e.key: e.value}))`;\n return [\n { label: `Read ${sample}`, expression: `${asMap}[${JSON.stringify(sample)}]` },\n // The map itself has to be encoded to leave the engine: a CEL map is a\n // map[ref.Val]ref.Val, which the response cannot serialize. Indexing one\n // yields a scalar and needs no such call, which is why only this example\n // carries it.\n { label: \"Fold every entry into a map\", expression: `${asMap}.toJSON()` },\n { label: \"List the keys\", expression: `${range}.map(e, e.key)` },\n { label: \"Keep the whole list\", expression: accessor },\n ];\n }\n\n if (Array.isArray(inner)) {\n const field = Object.keys((inner[0] ?? {}) as Record<string, unknown>)[0];\n return [\n { label: \"Take the first entry\", expression: `${accessor}[0]` },\n { label: \"Count the entries\", expression: `size(${accessor})` },\n ...(field\n ? [{ label: `Pull ${field} from each`, expression: `${range}.map(e, e.${field})` }]\n : []),\n { label: \"Keep the whole list\", expression: accessor },\n ];\n }\n\n if (inner !== null && typeof inner === \"object\") {\n const field = Object.keys(inner as Record<string, unknown>)[0];\n return [\n ...(field\n ? [\n { label: `Read ${field}`, expression: `${accessor}.${field}` },\n {\n label: `Default ${field} when missing`,\n expression: `has(${accessor}.${field}) ? ${accessor}.${field} : \"\"`,\n },\n ]\n : []),\n { label: \"List the keys\", expression: `${accessor}.keys()` },\n { label: \"Keep the whole object\", expression: accessor },\n ];\n }\n\n return [\n { label: \"Read it\", expression: accessor },\n { label: \"Convert to text\", expression: `string(${accessor})` },\n ...(typeof inner === \"number\"\n ? [{ label: \"Scale by 1,000\", expression: `${accessor} / 1000.0` }]\n : []),\n ];\n}\n"],"names":["celEvaluator","fetchJSON","profileApiPath"],"mappings":";;;;AAkBO,MAAM,oBAAoB;AAsC1B,SAAS,YAAY,S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AAQ,YAAA,CAAa,IAChE,CAAA;AAAA,EAAC;AAET;;;;;;;;;;;"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The three binding environments a profile's CEL can compile against.
|
|
3
|
+
*
|
|
4
|
+
* The schema tags each CEL field with the one it belongs to
|
|
5
|
+
* (`x-clicky-cel-scope`), because the document itself does not record it: a
|
|
6
|
+
* column's expression and a processor's `set` are two strings in the same YAML
|
|
7
|
+
* that see different variables.
|
|
8
|
+
*/
|
|
9
|
+
export type CelScope = "row" | "batch" | "boundary";
|
|
10
|
+
/**
|
|
11
|
+
* The `x-clicky-component` hint the profile schema tags every CEL field with, so
|
|
12
|
+
* the form offers an editor that knows the bindings and can evaluate rather than
|
|
13
|
+
* a bare input. Mirrors query/schema.celEditorComponent.
|
|
14
|
+
*/
|
|
15
|
+
export declare const CEL_EDITOR_WIDGET = "cel-editor";
|
|
16
|
+
export type CelResult = {
|
|
17
|
+
index: number;
|
|
18
|
+
value?: unknown;
|
|
19
|
+
type?: string;
|
|
20
|
+
error?: string;
|
|
21
|
+
};
|
|
22
|
+
export type CelResponse = {
|
|
23
|
+
results: CelResult[];
|
|
24
|
+
error?: string;
|
|
25
|
+
};
|
|
26
|
+
export type CelRequest = {
|
|
27
|
+
cel: string;
|
|
28
|
+
scope: CelScope;
|
|
29
|
+
rows: unknown[];
|
|
30
|
+
keep?: string;
|
|
31
|
+
};
|
|
32
|
+
/** What runs an expression for the editor. See {@link evaluateCel}. */
|
|
33
|
+
export type CelEvaluator = (request: CelRequest) => Promise<CelResponse>;
|
|
34
|
+
/**
|
|
35
|
+
* Evaluates an expression against the sampled rows, once per row.
|
|
36
|
+
*
|
|
37
|
+
* It has to be run by the engine that will run it for real, or the preview would
|
|
38
|
+
* confidently disagree with the column it previews — CEL here is null-safe in
|
|
39
|
+
* ways a browser reimplementation would not reproduce. The rows travel up with
|
|
40
|
+
* the request because the caller already sampled them.
|
|
41
|
+
*
|
|
42
|
+
* Which engine that is belongs to the host: the default posts to commons-db's
|
|
43
|
+
* profile service at the configured mount, and a host whose expressions are
|
|
44
|
+
* evaluated somewhere else — a different route, an RPC, a WASM build running in
|
|
45
|
+
* the tab — supplies its own through `configureProfiles({ celEvaluator })`
|
|
46
|
+
* rather than forking the editor.
|
|
47
|
+
*/
|
|
48
|
+
export declare function evaluateCel(request: CelRequest): Promise<CelResponse>;
|
|
49
|
+
export type CelCoverage = {
|
|
50
|
+
/** Rows that produced a usable value. */
|
|
51
|
+
ok: number;
|
|
52
|
+
/** Rows the expression read nothing from. */
|
|
53
|
+
empty: number;
|
|
54
|
+
/** Rows where evaluation itself failed. */
|
|
55
|
+
failed: number;
|
|
56
|
+
/** Indices of rows that produced nothing usable, in row order. */
|
|
57
|
+
barren: number[];
|
|
58
|
+
/** The distinct result types seen, so a column that is sometimes a string shows. */
|
|
59
|
+
types: string[];
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* What an expression did across the whole sample.
|
|
63
|
+
*
|
|
64
|
+
* `empty` is deliberately not folded into `ok`. An out-of-range index or a
|
|
65
|
+
* missing field does not throw in this engine — it reads as null — so the
|
|
66
|
+
* expression that is wrong about most of the data still returns cleanly, and
|
|
67
|
+
* counting those rows as successes is exactly the mistake this view exists to
|
|
68
|
+
* prevent.
|
|
69
|
+
*/
|
|
70
|
+
export declare function coverage(results: CelResult[]): CelCoverage;
|
|
71
|
+
/**
|
|
72
|
+
* The next row worth looking at after `from`, wrapping.
|
|
73
|
+
*
|
|
74
|
+
* An author works from the rows on screen and the rows an expression reads
|
|
75
|
+
* nothing from are, by definition, ones they have not looked at — so the editor
|
|
76
|
+
* has to be able to go and find them.
|
|
77
|
+
*/
|
|
78
|
+
export declare function nextBarren(coverageResult: CelCoverage, from: number): number | undefined;
|
|
79
|
+
/** True when the expression is safe to apply: every sampled row evaluated. */
|
|
80
|
+
export declare function isClean(coverageResult: CelCoverage): boolean;
|
|
81
|
+
/** `^[A-Za-z_][A-Za-z0-9_]*$` — the rule the engine flattens a row key by. */
|
|
82
|
+
export declare function isIdentifier(key: string): boolean;
|
|
83
|
+
export type Binding = {
|
|
84
|
+
name: string;
|
|
85
|
+
detail: string;
|
|
86
|
+
value?: unknown;
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* What an expression may name in `scope`.
|
|
90
|
+
*
|
|
91
|
+
* Only `row` and `span` are fixed in the row scope — every other name comes from
|
|
92
|
+
* the data, because the engine binds each row key that is a valid identifier as
|
|
93
|
+
* a bare variable. A key that is not one, like `@timestamp`, is reachable only
|
|
94
|
+
* through `row`, and the palette says so by omission rather than offering a name
|
|
95
|
+
* that will not compile.
|
|
96
|
+
*/
|
|
97
|
+
export declare function bindingsFor(scope: CelScope, row: Record<string, unknown> | undefined): Binding[];
|
|
98
|
+
/** Row keys that exist but cannot be named directly. */
|
|
99
|
+
export declare function unreachableKeys(row: Record<string, unknown> | undefined): string[];
|
|
100
|
+
/**
|
|
101
|
+
* A failure the author can act on, read out of the engine's own words.
|
|
102
|
+
*
|
|
103
|
+
* The engine reports in the vocabulary of the Go library underneath it, so
|
|
104
|
+
* decoding an array with `.JSON()` — a mistake the type system cannot catch,
|
|
105
|
+
* because both decoders take a string — comes back as a YAML type name and the
|
|
106
|
+
* entire offending value inline. Neither says what to do.
|
|
107
|
+
*/
|
|
108
|
+
export type CelFailure = {
|
|
109
|
+
/** What went wrong, in the author's terms. */
|
|
110
|
+
message: string;
|
|
111
|
+
/** The draft rewritten to fix it, when the fix is unambiguous. */
|
|
112
|
+
fix?: string;
|
|
113
|
+
/** The engine's own words, kept for a failure this cannot explain. */
|
|
114
|
+
raw: string;
|
|
115
|
+
};
|
|
116
|
+
export declare function explainCelError(error: string, draft: string): CelFailure;
|
|
117
|
+
/** An example expression the author can drop into the draft. */
|
|
118
|
+
export type CelExample = {
|
|
119
|
+
label: string;
|
|
120
|
+
expression: string;
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* Examples that fit the value in front of the author.
|
|
124
|
+
*
|
|
125
|
+
* A fixed list is wrong wherever it matters most: on a JSON column every
|
|
126
|
+
* suggestion built from the field name alone reads the encoded string rather
|
|
127
|
+
* than what is in it. These are derived from the sampled value, so the decoder
|
|
128
|
+
* they carry is the one that value actually needs — which is the same mistake
|
|
129
|
+
* this whole panel exists to stop the author making.
|
|
130
|
+
*
|
|
131
|
+
* The syntax is gomplate's own, verified against its CEL reference: the
|
|
132
|
+
* comprehension macros (map/filter), and `fold` with the `merge` helper for
|
|
133
|
+
* folding a key/value list into a map. Ranges are wrapped in `dyn(...)` because
|
|
134
|
+
* the engine declares every binding as `any` and a comprehension needs a
|
|
135
|
+
* concrete list to walk.
|
|
136
|
+
*/
|
|
137
|
+
export declare function celExamplesFor(accessor: string, value: unknown): CelExample[];
|
|
138
|
+
//# sourceMappingURL=celExpression.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"celExpression.d.ts","sourceRoot":"","sources":["../../../src/profiles/cel/celExpression.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,OAAO,GAAG,UAAU,CAAC;AAEpD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,eAAe,CAAC;AAE9C,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,QAAQ,CAAC;IAChB,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;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AAO,CAAC,GAAG,SAAS,GAAG,MAAM,EAAE,CAElF;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,8CAA8C;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB,kEAAkE;IAClE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AA6BF,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU,CAuBxE;AAED,gEAAgE;AAChE,MAAM,MAAM,UAAU,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC;AA0B/D;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,UAAU,EAAE,CAyD7E"}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { fetchJSON } from "../connections/connectionBrowserModel.js";
|
|
2
|
+
import { profileApiPath, celEvaluator } from "../profileApi.js";
|
|
3
|
+
const CEL_EDITOR_WIDGET = "cel-editor";
|
|
4
|
+
function evaluateCel(request) {
|
|
5
|
+
const configured = celEvaluator();
|
|
6
|
+
if (configured) return configured(request);
|
|
7
|
+
return fetchJSON(profileApiPath("profile/sample/expression"), {
|
|
8
|
+
method: "POST",
|
|
9
|
+
headers: { "Content-Type": "application/json" },
|
|
10
|
+
body: JSON.stringify(request)
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function coverage(results) {
|
|
14
|
+
const types = /* @__PURE__ */ new Set();
|
|
15
|
+
const barren = [];
|
|
16
|
+
let ok = 0;
|
|
17
|
+
let empty = 0;
|
|
18
|
+
let failed = 0;
|
|
19
|
+
for (const result of results) {
|
|
20
|
+
if (result.error) {
|
|
21
|
+
failed += 1;
|
|
22
|
+
barren.push(result.index);
|
|
23
|
+
continue;
|
|
24
|
+
}
|
|
25
|
+
if (result.value === null || result.value === void 0) {
|
|
26
|
+
empty += 1;
|
|
27
|
+
barren.push(result.index);
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
ok += 1;
|
|
31
|
+
if (result.type) types.add(result.type);
|
|
32
|
+
}
|
|
33
|
+
return { ok, empty, failed, barren, types: [...types].sort() };
|
|
34
|
+
}
|
|
35
|
+
function nextBarren(coverageResult, from) {
|
|
36
|
+
return coverageResult.barren.find((index) => index > from) ?? coverageResult.barren[0];
|
|
37
|
+
}
|
|
38
|
+
function isClean(coverageResult) {
|
|
39
|
+
return coverageResult.failed === 0 && coverageResult.empty === 0;
|
|
40
|
+
}
|
|
41
|
+
function isIdentifier(key) {
|
|
42
|
+
return /^[A-Za-z_][A-Za-z0-9_]*$/.test(key);
|
|
43
|
+
}
|
|
44
|
+
function bindingsFor(scope, row) {
|
|
45
|
+
if (scope === "batch") {
|
|
46
|
+
return [
|
|
47
|
+
{ name: "batch", detail: "list · the grouped rows, oldest first" },
|
|
48
|
+
{ name: "first", detail: "map · batch[0]" },
|
|
49
|
+
{ name: "last", detail: "map · the final row of the batch" },
|
|
50
|
+
{ name: "count", detail: "int · how many rows collapsed" },
|
|
51
|
+
{ name: "row", detail: "map · the kept row" }
|
|
52
|
+
];
|
|
53
|
+
}
|
|
54
|
+
if (scope === "boundary") {
|
|
55
|
+
return [
|
|
56
|
+
{ name: "row", detail: "map · the row being judged" },
|
|
57
|
+
{ name: "prev", detail: "map · the row above it" },
|
|
58
|
+
{ name: "index", detail: "int · position in the result" }
|
|
59
|
+
];
|
|
60
|
+
}
|
|
61
|
+
const fixed = [
|
|
62
|
+
{ name: "row", detail: "map · the whole row" },
|
|
63
|
+
{ name: "span", detail: "map · the same row, for trace profiles" }
|
|
64
|
+
];
|
|
65
|
+
if (!row) return fixed;
|
|
66
|
+
const flattened = Object.keys(row).filter(isIdentifier).filter((key) => key !== "row" && key !== "span").sort().map((key) => ({ name: key, detail: `bound bare and as row.${key}`, value: row[key] }));
|
|
67
|
+
return [...fixed, ...flattened];
|
|
68
|
+
}
|
|
69
|
+
function unreachableKeys(row) {
|
|
70
|
+
return Object.keys(row ?? {}).filter((key) => !isIdentifier(key));
|
|
71
|
+
}
|
|
72
|
+
const RAW_ERROR_LIMIT = 240;
|
|
73
|
+
function elide(text, limit = RAW_ERROR_LIMIT) {
|
|
74
|
+
if (text.length <= limit) return text;
|
|
75
|
+
const head = Math.ceil((limit - 1) / 2);
|
|
76
|
+
return `${text.slice(0, head)}…${text.slice(text.length - (limit - 1 - head))}`;
|
|
77
|
+
}
|
|
78
|
+
const ARRAY_INTO_OBJECT = /cannot unmarshal\s+!!seq\s+into\s+map\[string\]interface\s*\{\s*\}/;
|
|
79
|
+
const OBJECT_INTO_ARRAY = /cannot unmarshal\s+!!map\s+into\s+\[\]interface\s*\{\s*\}/;
|
|
80
|
+
function explainCelError(error, draft) {
|
|
81
|
+
const raw = elide(error);
|
|
82
|
+
if (ARRAY_INTO_OBJECT.test(error)) {
|
|
83
|
+
const failure = {
|
|
84
|
+
message: "That value is a JSON array. JSON() decodes an object — use JSONArray(), then index or filter it.",
|
|
85
|
+
raw
|
|
86
|
+
};
|
|
87
|
+
if (draft.includes(".JSON()")) failure.fix = draft.replaceAll(".JSON()", ".JSONArray()");
|
|
88
|
+
return failure;
|
|
89
|
+
}
|
|
90
|
+
if (OBJECT_INTO_ARRAY.test(error)) {
|
|
91
|
+
const failure = {
|
|
92
|
+
message: "That value is a JSON object. JSONArray() decodes a list — use JSON().",
|
|
93
|
+
raw
|
|
94
|
+
};
|
|
95
|
+
if (draft.includes(".JSONArray()")) failure.fix = draft.replaceAll(".JSONArray()", ".JSON()");
|
|
96
|
+
return failure;
|
|
97
|
+
}
|
|
98
|
+
return { message: raw, raw };
|
|
99
|
+
}
|
|
100
|
+
function isKeyValueList(value) {
|
|
101
|
+
return Array.isArray(value) && value.length > 0 && value.every(
|
|
102
|
+
(entry) => entry !== null && typeof entry === "object" && "key" in entry && "value" in entry
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
function decoded(value) {
|
|
106
|
+
if (typeof value !== "string") return value;
|
|
107
|
+
const text = value.trim();
|
|
108
|
+
if (!text.startsWith("{") && !text.startsWith("[")) return value;
|
|
109
|
+
try {
|
|
110
|
+
return JSON.parse(text);
|
|
111
|
+
} catch {
|
|
112
|
+
return value;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
function celExamplesFor(accessor, value) {
|
|
116
|
+
var _a;
|
|
117
|
+
const inner = decoded(value);
|
|
118
|
+
const range = `dyn(${accessor})`;
|
|
119
|
+
if (isKeyValueList(inner)) {
|
|
120
|
+
const sample = String(((_a = inner[0]) == null ? void 0 : _a["key"]) ?? "key");
|
|
121
|
+
const asMap = `${range}.fold(e, acc, merge(acc, {e.key: e.value}))`;
|
|
122
|
+
return [
|
|
123
|
+
{ label: `Read ${sample}`, expression: `${asMap}[${JSON.stringify(sample)}]` },
|
|
124
|
+
// The map itself has to be encoded to leave the engine: a CEL map is a
|
|
125
|
+
// map[ref.Val]ref.Val, which the response cannot serialize. Indexing one
|
|
126
|
+
// yields a scalar and needs no such call, which is why only this example
|
|
127
|
+
// carries it.
|
|
128
|
+
{ label: "Fold every entry into a map", expression: `${asMap}.toJSON()` },
|
|
129
|
+
{ label: "List the keys", expression: `${range}.map(e, e.key)` },
|
|
130
|
+
{ label: "Keep the whole list", expression: accessor }
|
|
131
|
+
];
|
|
132
|
+
}
|
|
133
|
+
if (Array.isArray(inner)) {
|
|
134
|
+
const field = Object.keys(inner[0] ?? {})[0];
|
|
135
|
+
return [
|
|
136
|
+
{ label: "Take the first entry", expression: `${accessor}[0]` },
|
|
137
|
+
{ label: "Count the entries", expression: `size(${accessor})` },
|
|
138
|
+
...field ? [{ label: `Pull ${field} from each`, expression: `${range}.map(e, e.${field})` }] : [],
|
|
139
|
+
{ label: "Keep the whole list", expression: accessor }
|
|
140
|
+
];
|
|
141
|
+
}
|
|
142
|
+
if (inner !== null && typeof inner === "object") {
|
|
143
|
+
const field = Object.keys(inner)[0];
|
|
144
|
+
return [
|
|
145
|
+
...field ? [
|
|
146
|
+
{ label: `Read ${field}`, expression: `${accessor}.${field}` },
|
|
147
|
+
{
|
|
148
|
+
label: `Default ${field} when missing`,
|
|
149
|
+
expression: `has(${accessor}.${field}) ? ${accessor}.${field} : ""`
|
|
150
|
+
}
|
|
151
|
+
] : [],
|
|
152
|
+
{ label: "List the keys", expression: `${accessor}.keys()` },
|
|
153
|
+
{ label: "Keep the whole object", expression: accessor }
|
|
154
|
+
];
|
|
155
|
+
}
|
|
156
|
+
return [
|
|
157
|
+
{ label: "Read it", expression: accessor },
|
|
158
|
+
{ label: "Convert to text", expression: `string(${accessor})` },
|
|
159
|
+
...typeof inner === "number" ? [{ label: "Scale by 1,000", expression: `${accessor} / 1000.0` }] : []
|
|
160
|
+
];
|
|
161
|
+
}
|
|
162
|
+
export {
|
|
163
|
+
CEL_EDITOR_WIDGET,
|
|
164
|
+
bindingsFor,
|
|
165
|
+
celExamplesFor,
|
|
166
|
+
coverage,
|
|
167
|
+
evaluateCel,
|
|
168
|
+
explainCelError,
|
|
169
|
+
isClean,
|
|
170
|
+
isIdentifier,
|
|
171
|
+
nextBarren,
|
|
172
|
+
unreachableKeys
|
|
173
|
+
};
|
|
174
|
+
//# sourceMappingURL=celExpression.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"celExpression.js","sources":["../../../src/profiles/cel/celExpression.ts"],"sourcesContent":["import { fetchJSON } from \"../connections/connectionBrowserModel\";\nimport { celEvaluator, profileApiPath } from \"../profileApi\";\n\n/**\n * The three binding environments a profile's CEL can compile against.\n *\n * The schema tags each CEL field with the one it belongs to\n * (`x-clicky-cel-scope`), because the document itself does not record it: a\n * column's expression and a processor's `set` are two strings in the same YAML\n * that see different variables.\n */\nexport type CelScope = \"row\" | \"batch\" | \"boundary\";\n\n/**\n * The `x-clicky-component` hint the profile schema tags every CEL field with, so\n * the form offers an editor that knows the bindings and can evaluate rather than\n * a bare input. Mirrors query/schema.celEditorComponent.\n */\nexport const CEL_EDITOR_WIDGET = \"cel-editor\";\n\nexport type CelResult = {\n index: number;\n value?: unknown;\n type?: string;\n error?: string;\n};\n\nexport type CelResponse = {\n results: CelResult[];\n error?: string;\n};\n\nexport type CelRequest = {\n cel: string;\n scope: CelScope;\n rows: unknown[];\n keep?: string;\n};\n\n/** What runs an expression for the editor. See {@link evaluateCel}. */\nexport type CelEvaluator = (request: CelRequest) => Promise<CelResponse>;\n\n/**\n * Evaluates an expression against the sampled rows, once per row.\n *\n * It has to be run by the engine that will run it for real, or the preview would\n * confidently disagree with the column it previews — CEL here is null-safe in\n * ways a browser reimplementation would not reproduce. The rows travel up with\n * the request because the caller already sampled them.\n *\n * Which engine that is belongs to the host: the default posts to commons-db's\n * profile service at the configured mount, and a host whose expressions are\n * evaluated somewhere else — a different route, an RPC, a WASM build running in\n * the tab — supplies its own through `configureProfiles({ celEvaluator })`\n * rather than forking the editor.\n */\nexport function evaluateCel(request: CelRequest): Promise<CelResponse> {\n const configured = celEvaluator();\n if (configured) return configured(request);\n return fetchJSON<CelResponse>(profileApiPath(\"profile/sample/expression\"), {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify(request),\n });\n}\n\nexport type CelCoverage = {\n /** Rows that produced a usable value. */\n ok: number;\n /** Rows the expression read nothing from. */\n empty: number;\n /** Rows where evaluation itself failed. */\n failed: number;\n /** Indices of rows that produced nothing usable, in row order. */\n barren: number[];\n /** The distinct result types seen, so a column that is sometimes a string shows. */\n types: string[];\n};\n\n/**\n * What an expression did across the whole sample.\n *\n * `empty` is deliberately not folded into `ok`. An out-of-range index or a\n * missing field does not throw in this engine — it reads as null — so the\n * expression that is wrong about most of the data still returns cleanly, and\n * counting those rows as successes is exactly the mistake this view exists to\n * prevent.\n */\nexport function coverage(results: CelResult[]): CelCoverage {\n const types = new Set<string>();\n const barren: number[] = [];\n let ok = 0;\n let empty = 0;\n let failed = 0;\n\n for (const result of results) {\n if (result.error) {\n failed += 1;\n barren.push(result.index);\n continue;\n }\n if (result.value === null || result.value === undefined) {\n empty += 1;\n barren.push(result.index);\n continue;\n }\n ok += 1;\n if (result.type) types.add(result.type);\n }\n\n return { ok, empty, failed, barren, types: [...types].sort() };\n}\n\n/**\n * The next row worth looking at after `from`, wrapping.\n *\n * An author works from the rows on screen and the rows an expression reads\n * nothing from are, by definition, ones they have not looked at — so the editor\n * has to be able to go and find them.\n */\nexport function nextBarren(coverageResult: CelCoverage, from: number): number | undefined {\n return coverageResult.barren.find((index) => index > from) ?? coverageResult.barren[0];\n}\n\n/** True when the expression is safe to apply: every sampled row evaluated. */\nexport function isClean(coverageResult: CelCoverage): boolean {\n return coverageResult.failed === 0 && coverageResult.empty === 0;\n}\n\n/** `^[A-Za-z_][A-Za-z0-9_]*$` — the rule the engine flattens a row key by. */\nexport function isIdentifier(key: string): boolean {\n return /^[A-Za-z_][A-Za-z0-9_]*$/.test(key);\n}\n\nexport type Binding = { name: string; detail: string; value?: unknown };\n\n/**\n * What an expression may name in `scope`.\n *\n * Only `row` and `span` are fixed in the row scope — every other name comes from\n * the data, because the engine binds each row key that is a valid identifier as\n * a bare variable. A key that is not one, like `@timestamp`, is reachable only\n * through `row`, and the palette says so by omission rather than offering a name\n * that will not compile.\n */\nexport function bindingsFor(scope: CelScope, row: Record<string, unknown> | undefined): Binding[] {\n if (scope === \"batch\") {\n return [\n { name: \"batch\", detail: \"list · the grouped rows, oldest first\" },\n { name: \"first\", detail: \"map · batch[0]\" },\n { name: \"last\", detail: \"map · the final row of the batch\" },\n { name: \"count\", detail: \"int · how many rows collapsed\" },\n { name: \"row\", detail: \"map · the kept row\" },\n ];\n }\n if (scope === \"boundary\") {\n return [\n { name: \"row\", detail: \"map · the row being judged\" },\n { name: \"prev\", detail: \"map · the row above it\" },\n { name: \"index\", detail: \"int · position in the result\" },\n ];\n }\n\n const fixed: Binding[] = [\n { name: \"row\", detail: \"map · the whole row\" },\n { name: \"span\", detail: \"map · the same row, for trace profiles\" },\n ];\n if (!row) return fixed;\n\n const flattened = Object.keys(row)\n .filter(isIdentifier)\n .filter((key) => key !== \"row\" && key !== \"span\")\n .sort()\n .map((key) => ({ name: key, detail: `bound bare and as row.${key}`, value: row[key] }));\n\n return [...fixed, ...flattened];\n}\n\n/** Row keys that exist but cannot be named directly. */\nexport function unreachableKeys(row: Record<string, unknown> | undefined): string[] {\n return Object.keys(row ?? {}).filter((key) => !isIdentifier(key));\n}\n\n/**\n * A failure the author can act on, read out of the engine's own words.\n *\n * The engine reports in the vocabulary of the Go library underneath it, so\n * decoding an array with `.JSON()` — a mistake the type system cannot catch,\n * because both decoders take a string — comes back as a YAML type name and the\n * entire offending value inline. Neither says what to do.\n */\nexport type CelFailure = {\n /** What went wrong, in the author's terms. */\n message: string;\n /** The draft rewritten to fix it, when the fix is unambiguous. */\n fix?: string;\n /** The engine's own words, kept for a failure this cannot explain. */\n raw: string;\n};\n\n/** How much of an error is worth showing before it buries the dialog. */\nconst RAW_ERROR_LIMIT = 240;\n\n/**\n * Shortens an error from the middle.\n *\n * Both ends carry the meaning — the prefix names the operation that failed and\n * the suffix names the failure — and it is the value interpolated between them\n * that runs to kilobytes. Trimming the tail would throw away the diagnosis and\n * keep the payload, which is the wrong half.\n */\nfunction elide(text: string, limit = RAW_ERROR_LIMIT): string {\n if (text.length <= limit) return text;\n const head = Math.ceil((limit - 1) / 2);\n return `${text.slice(0, head)}…${text.slice(text.length - (limit - 1 - head))}`;\n}\n\n/**\n * `.JSON()` decodes an object; the value was an array. The signature is the Go\n * map type the decode targeted — matched on that rather than on the message\n * around it, which carries the whole value and so is never stable.\n */\nconst ARRAY_INTO_OBJECT = /cannot unmarshal\\s+!!seq\\s+into\\s+map\\[string\\]interface\\s*\\{\\s*\\}/;\n\n/** Conversely: `.JSONArray()` on an object. */\nconst OBJECT_INTO_ARRAY = /cannot unmarshal\\s+!!map\\s+into\\s+\\[\\]interface\\s*\\{\\s*\\}/;\n\nexport function explainCelError(error: string, draft: string): CelFailure {\n const raw = elide(error);\n\n if (ARRAY_INTO_OBJECT.test(error)) {\n const failure: CelFailure = {\n message:\n \"That value is a JSON array. JSON() decodes an object — use JSONArray(), then index or filter it.\",\n raw,\n };\n if (draft.includes(\".JSON()\")) failure.fix = draft.replaceAll(\".JSON()\", \".JSONArray()\");\n return failure;\n }\n\n if (OBJECT_INTO_ARRAY.test(error)) {\n const failure: CelFailure = {\n message: \"That value is a JSON object. JSONArray() decodes a list — use JSON().\",\n raw,\n };\n if (draft.includes(\".JSONArray()\")) failure.fix = draft.replaceAll(\".JSONArray()\", \".JSON()\");\n return failure;\n }\n\n return { message: raw, raw };\n}\n\n/** An example expression the author can drop into the draft. */\nexport type CelExample = { label: string; expression: string };\n\n/** Whether a list looks like OpenTelemetry's `[{key, type, value}]` tag shape. */\nfunction isKeyValueList(value: unknown): value is Array<Record<string, unknown>> {\n return (\n Array.isArray(value) &&\n value.length > 0 &&\n value.every(\n (entry) =>\n entry !== null && typeof entry === \"object\" && \"key\" in entry && \"value\" in entry,\n )\n );\n}\n\n/** The value behind an accessor, decoded when the column holds JSON as text. */\nfunction decoded(value: unknown): unknown {\n if (typeof value !== \"string\") return value;\n const text = value.trim();\n if (!text.startsWith(\"{\") && !text.startsWith(\"[\")) return value;\n try {\n return JSON.parse(text) as unknown;\n } catch {\n return value;\n }\n}\n\n/**\n * Examples that fit the value in front of the author.\n *\n * A fixed list is wrong wherever it matters most: on a JSON column every\n * suggestion built from the field name alone reads the encoded string rather\n * than what is in it. These are derived from the sampled value, so the decoder\n * they carry is the one that value actually needs — which is the same mistake\n * this whole panel exists to stop the author making.\n *\n * The syntax is gomplate's own, verified against its CEL reference: the\n * comprehension macros (map/filter), and `fold` with the `merge` helper for\n * folding a key/value list into a map. Ranges are wrapped in `dyn(...)` because\n * the engine declares every binding as `any` and a comprehension needs a\n * concrete list to walk.\n */\nexport function celExamplesFor(accessor: string, value: unknown): CelExample[] {\n const inner = decoded(value);\n const range = `dyn(${accessor})`;\n\n if (isKeyValueList(inner)) {\n const sample = String(inner[0]?.[\"key\"] ?? \"key\");\n // A fold into a map rather than filter-then-index: a missing key reads as\n // absent, where indexing an empty filter result is a hard error.\n const asMap = `${range}.fold(e, acc, merge(acc, {e.key: e.value}))`;\n return [\n { label: `Read ${sample}`, expression: `${asMap}[${JSON.stringify(sample)}]` },\n // The map itself has to be encoded to leave the engine: a CEL map is a\n // map[ref.Val]ref.Val, which the response cannot serialize. Indexing one\n // yields a scalar and needs no such call, which is why only this example\n // carries it.\n { label: \"Fold every entry into a map\", expression: `${asMap}.toJSON()` },\n { label: \"List the keys\", expression: `${range}.map(e, e.key)` },\n { label: \"Keep the whole list\", expression: accessor },\n ];\n }\n\n if (Array.isArray(inner)) {\n const field = Object.keys((inner[0] ?? {}) as Record<string, unknown>)[0];\n return [\n { label: \"Take the first entry\", expression: `${accessor}[0]` },\n { label: \"Count the entries\", expression: `size(${accessor})` },\n ...(field\n ? [{ label: `Pull ${field} from each`, expression: `${range}.map(e, e.${field})` }]\n : []),\n { label: \"Keep the whole list\", expression: accessor },\n ];\n }\n\n if (inner !== null && typeof inner === \"object\") {\n const field = Object.keys(inner as Record<string, unknown>)[0];\n return [\n ...(field\n ? [\n { label: `Read ${field}`, expression: `${accessor}.${field}` },\n {\n label: `Default ${field} when missing`,\n expression: `has(${accessor}.${field}) ? ${accessor}.${field} : \"\"`,\n },\n ]\n : []),\n { label: \"List the keys\", expression: `${accessor}.keys()` },\n { label: \"Keep the whole object\", expression: accessor },\n ];\n }\n\n return [\n { label: \"Read it\", expression: accessor },\n { label: \"Convert to text\", expression: `string(${accessor})` },\n ...(typeof inner === \"number\"\n ? [{ label: \"Scale by 1,000\", expression: `${accessor} / 1000.0` }]\n : []),\n ];\n}\n"],"names":[],"mappings":";;AAkBO,MAAM,oBAAoB;AAsC1B,SAAS,YAAY,SAA2C;AACrE,QAAM,aAAa,aAAA;AACnB,MAAI,WAAY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,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsonPathTree = require("../../components/jsonPathTree.cjs");
|
|
4
|
+
const IDENTIFIER = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
5
|
+
function appendSegment(accessor, segment) {
|
|
6
|
+
if (typeof segment === "number") return `${accessor}[${segment}]`;
|
|
7
|
+
return IDENTIFIER.test(segment) ? `${accessor}.${segment}` : `${accessor}[${JSON.stringify(segment)}]`;
|
|
8
|
+
}
|
|
9
|
+
function walk(base, path) {
|
|
10
|
+
return (jsonPathTree.literalSegments(path) ?? []).reduce(appendSegment, base);
|
|
11
|
+
}
|
|
12
|
+
function celFieldAccess(name) {
|
|
13
|
+
if (IDENTIFIER.test(name)) {
|
|
14
|
+
return { reference: `row.${name}`, presence: `has(row.${name})` };
|
|
15
|
+
}
|
|
16
|
+
const key = JSON.stringify(name);
|
|
17
|
+
return { reference: `row[${key}]`, presence: `${key} in row` };
|
|
18
|
+
}
|
|
19
|
+
function celDecoder(kind) {
|
|
20
|
+
return kind === "array" ? ".JSONArray()" : ".JSON()";
|
|
21
|
+
}
|
|
22
|
+
function decodedKind(value) {
|
|
23
|
+
if (typeof value !== "string") return void 0;
|
|
24
|
+
const text = value.trim();
|
|
25
|
+
if (!text.startsWith("{") && !text.startsWith("[")) return void 0;
|
|
26
|
+
try {
|
|
27
|
+
const parsed = JSON.parse(text);
|
|
28
|
+
if (Array.isArray(parsed)) return "array";
|
|
29
|
+
return parsed !== null && typeof parsed === "object" ? "object" : void 0;
|
|
30
|
+
} catch {
|
|
31
|
+
return void 0;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function originPrefix(origin, base) {
|
|
35
|
+
if (!origin) return base;
|
|
36
|
+
return walk(originPrefix(origin.outer, base), origin.path) + celDecoder(origin.kind);
|
|
37
|
+
}
|
|
38
|
+
function celPathFor(node, base = "row") {
|
|
39
|
+
const reached = walk(originPrefix(node.origin, base), node.path);
|
|
40
|
+
const kind = decodedKind(node.value);
|
|
41
|
+
return kind === void 0 ? reached : reached + celDecoder(kind);
|
|
42
|
+
}
|
|
43
|
+
exports.celDecoder = celDecoder;
|
|
44
|
+
exports.celFieldAccess = celFieldAccess;
|
|
45
|
+
exports.celPathFor = celPathFor;
|
|
46
|
+
exports.decodedKind = decodedKind;
|
|
47
|
+
//# sourceMappingURL=celPath.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"celPath.cjs","sources":["../../../src/profiles/cel/celPath.ts"],"sourcesContent":["/**\n * Turning a browsed JSON node into the CEL that reaches it.\n *\n * The tree behind the editor's scope panel descends into a column that holds\n * JSON as text (see `createLazyJSONPathTree`), so a path can cross a boundary\n * that CEL cannot cross implicitly: reaching inside an encoded column means\n * decoding it first, and the decoder depends on what is in there — `.JSON()`\n * reads an object, `.JSONArray()` reads an array, and calling the wrong one\n * fails with a Go type name rather than an explanation.\n *\n * That is the whole reason this module exists. The tree already knows which\n * side of the boundary a node is on and what shape was decoded, so the accessor\n * it hands back can carry the right decoder instead of leaving the author to\n * guess it.\n */\n\nimport {\n literalSegments,\n type JSONPathNode,\n type JSONPathOrigin,\n} from \"../../components/jsonPathTree\";\n\n/** `^[A-Za-z_][A-Za-z0-9_]*$` — the keys CEL can read with a dot. */\nconst IDENTIFIER = /^[A-Za-z_][A-Za-z0-9_]*$/;\n\n/**\n * One path segment appended to an accessor.\n *\n * A key that is not an identifier is indexed rather than dotted, and quoted by\n * JSON.stringify — hand-rolled quoting is what turns a key containing a newline\n * or a quote into an expression that does not compile.\n */\nfunction appendSegment(accessor: string, segment: string | number): string {\n if (typeof segment === \"number\") return `${accessor}[${segment}]`;\n return IDENTIFIER.test(segment)\n ? `${accessor}.${segment}`\n : `${accessor}[${JSON.stringify(segment)}]`;\n}\n\n/** Builds an accessor from `base` by walking a literal JSONPath. */\nfunction walk(base: string, path: string): string {\n return (literalSegments(path) ?? []).reduce(appendSegment, base);\n}\n\n/**\n * How a row key is read, and how its presence is tested.\n *\n * Kept here beside the path builder so the editor speaks one dialect: an\n * example and a clicked path that quote the same key differently read as two\n * languages.\n */\nexport function celFieldAccess(name: string): { reference: string; presence: string } {\n if (IDENTIFIER.test(name)) {\n return { reference: `row.${name}`, presence: `has(row.${name})` };\n }\n const key = JSON.stringify(name);\n return { reference: `row[${key}]`, presence: `${key} in row` };\n}\n\n/** The call that crosses a boundary: a list needs JSONArray, a map needs JSON. */\nexport function celDecoder(kind: \"array\" | \"object\"): string {\n return kind === \"array\" ? \".JSONArray()\" : \".JSON()\";\n}\n\n/** What a JSON-encoded string decodes to, or undefined when it is not one. */\nexport function decodedKind(value: unknown): \"array\" | \"object\" | undefined {\n if (typeof value !== \"string\") return undefined;\n const text = value.trim();\n if (!text.startsWith(\"{\") && !text.startsWith(\"[\")) return undefined;\n try {\n const parsed: unknown = JSON.parse(text);\n if (Array.isArray(parsed)) return \"array\";\n return parsed !== null && typeof parsed === \"object\" ? \"object\" : undefined;\n } catch {\n return undefined;\n }\n}\n\n/** The chain that reaches a boundary, plus the decoder that crosses it. */\nfunction originPrefix(origin: JSONPathOrigin | undefined, base: string): string {\n if (!origin) return base;\n return walk(originPrefix(origin.outer, base), origin.path) + celDecoder(origin.kind);\n}\n\n/**\n * The CEL expression that reads `node` out of the row it was browsed from.\n *\n * Inside a decoded subtree the node's own path restarts at `$`, and its\n * `origin` records every boundary crossed to get there — where each one was and\n * what came out of it. So the accessor is rebuilt boundary by boundary, each\n * contributing the way to the encoded value and the decoder its contents need,\n * which also holds for JSON encoded inside JSON.\n *\n * Selecting a boundary node itself yields the decoded form rather than the raw\n * string: picking a column that holds a document is a request for the document,\n * and naming the decoder here is the whole point of the panel.\n */\nexport function celPathFor(node: JSONPathNode, base = \"row\"): string {\n const reached = walk(originPrefix(node.origin, base), node.path);\n const kind = decodedKind(node.value);\n return kind === undefined ? reached : reached + celDecoder(kind);\n}\n"],"names":["literalSegments"],"mappings":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