@aceshooting/lyra-ui 19.0.1 → 20.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +159 -0
- package/custom-elements.json +1 -1
- package/dist/cli/migration-contract.json +1 -1
- package/dist/components/agent-tools/activity-feed/activity-feed.class.d.ts +14 -4
- package/dist/components/agent-tools/activity-feed/activity-feed.styles.js +1 -1
- package/dist/components/agent-tools/approval-queue/approval-queue.class.d.ts +1 -0
- package/dist/components/agent-tools/approval-queue/approval-queue.class.js +4 -3
- package/dist/components/agent-tools/approval-queue/approval-queue.styles.js +1 -1
- package/dist/components/agent-tools/artifact-panel/artifact-panel.class.d.ts +3 -1
- package/dist/components/agent-tools/context-inspector/context-inspector.class.d.ts +1 -0
- package/dist/components/agent-tools/context-inspector/context-inspector.class.js +4 -3
- package/dist/components/agent-tools/context-inspector/context-inspector.styles.js +1 -1
- package/dist/components/agent-tools/eval-dataset/eval-dataset.class.js +1 -1
- package/dist/components/agent-tools/eval-result/eval-result.class.js +1 -1
- package/dist/components/agent-tools/evaluation-run/evaluation-run.class.d.ts +1 -0
- package/dist/components/agent-tools/evaluation-run/evaluation-run.class.js +4 -3
- package/dist/components/agent-tools/evaluation-run/evaluation-run.styles.js +1 -1
- package/dist/components/agent-tools/policy-summary/policy-summary.class.d.ts +1 -0
- package/dist/components/agent-tools/policy-summary/policy-summary.class.js +4 -3
- package/dist/components/agent-tools/policy-summary/policy-summary.styles.js +1 -1
- package/dist/components/agent-tools/prompt-studio/prompt-studio.class.js +1 -1
- package/dist/components/agent-tools/schema-viewer/schema-viewer.class.d.ts +10 -1
- package/dist/components/agent-tools/schema-viewer/schema-viewer.class.js +3 -3
- package/dist/components/agent-tools/subagent-panel/subagent-panel.class.js +1 -1
- package/dist/components/agent-tools/thinking-panel/thinking-panel.class.d.ts +6 -3
- package/dist/components/agent-tools/thinking-panel/thinking-panel.styles.js +1 -1
- package/dist/components/agent-tools/tool-call-chip/tool-call-chip.class.d.ts +14 -3
- package/dist/components/agent-tools/tool-call-chip/tool-call-chip.class.js +2 -2
- package/dist/components/agent-tools/tool-param-form/tool-param-form.class.d.ts +12 -2
- package/dist/components/agent-tools/tool-param-form/tool-param-form.class.js +3 -1
- package/dist/components/charts/chart/box-plot.class.d.ts +15 -3
- package/dist/components/charts/chart/box-plot.class.js +3 -3
- package/dist/components/charts/chart/box-plot.styles.js +1 -1
- package/dist/components/charts/chart/chart.class.d.ts +23 -5
- package/dist/components/charts/chart/chart.class.js +2 -2
- package/dist/components/charts/chart/chart.styles.js +1 -1
- package/dist/components/charts/chart/lite-chart.class.js +1 -1
- package/dist/components/charts/chart/lite-chart.styles.js +1 -1
- package/dist/components/conversation/audio-visualizer/audio-visualizer.class.d.ts +4 -2
- package/dist/components/conversation/audio-visualizer/audio-visualizer.class.js +1 -1
- package/dist/components/conversation/branch-picker/branch-picker.class.d.ts +4 -2
- package/dist/components/conversation/branch-picker/branch-picker.class.js +1 -1
- package/dist/components/conversation/chat-viewport/chat-viewport.class.d.ts +4 -3
- package/dist/components/conversation/chat-viewport/chat-viewport.class.js +1 -1
- package/dist/components/conversation/code-block/code-block-core.class.d.ts +6 -11
- package/dist/components/conversation/code-block/code-block-core.class.js +1 -1
- package/dist/components/conversation/code-block/code-block-shared.d.ts +29 -1
- package/dist/components/conversation/code-block/code-block-shared.js +1 -1
- package/dist/components/conversation/code-block/code-block.class.d.ts +6 -11
- package/dist/components/conversation/code-block/code-block.class.js +1 -1
- package/dist/components/conversation/markdown/markdown-shared.js +2 -2
- package/dist/components/conversation/message-actions/message-actions.class.d.ts +4 -2
- package/dist/components/conversation/message-actions/message-actions.class.js +2 -2
- package/dist/components/conversation/message-parts/message-parts.class.d.ts +17 -2
- package/dist/components/conversation/model-select/model-select.class.js +1 -0
- package/dist/components/conversation/model-select/model-select.styles.js +1 -1
- package/dist/components/conversation/prompt-input/prompt-input.class.d.ts +5 -1
- package/dist/components/conversation/prompt-input/prompt-input.class.js +2 -2
- package/dist/components/conversation/prompt-queue/prompt-queue.class.d.ts +6 -1
- package/dist/components/conversation/prompt-queue/prompt-queue.class.js +2 -2
- package/dist/components/conversation/realtime-session/realtime-session.class.d.ts +5 -1
- package/dist/components/conversation/realtime-session/realtime-session.class.js +1 -1
- package/dist/components/conversation/selection-toolbar/selection-toolbar.class.d.ts +5 -1
- package/dist/components/conversation/selection-toolbar/selection-toolbar.class.js +1 -1
- package/dist/components/conversation/voice-picker/voice-picker.class.d.ts +13 -2
- package/dist/components/conversation/voice-picker/voice-picker.class.js +5 -3
- package/dist/components/conversation/voice-picker/voice-picker.styles.js +1 -1
- package/dist/components/data/calendar/calendar.class.d.ts +9 -0
- package/dist/components/data/calendar/calendar.class.js +2 -2
- package/dist/components/data/calendar/calendar.styles.js +1 -1
- package/dist/components/data/condition-builder/condition-builder.class.d.ts +5 -1
- package/dist/components/data/context-meter/context-meter.class.d.ts +4 -0
- package/dist/components/data/context-meter/context-meter.styles.js +1 -1
- package/dist/components/data/data-grid/data-grid.class.d.ts +8 -2
- package/dist/components/data/data-grid/data-grid.class.js +1 -2
- package/dist/components/data/flow-node/flow-node.class.d.ts +7 -4
- package/dist/components/data/flow-node/flow-node.styles.js +1 -1
- package/dist/components/data/funnel/funnel.class.d.ts +5 -0
- package/dist/components/data/funnel/funnel.class.js +4 -3
- package/dist/components/data/funnel/funnel.styles.js +1 -1
- package/dist/components/data/gauge/gauge.class.d.ts +12 -1
- package/dist/components/data/gauge/gauge.styles.js +1 -1
- package/dist/components/data/graph-query-builder/graph-query-builder.class.d.ts +50 -13
- package/dist/components/data/graph-query-builder/graph-query-builder.class.js +2 -2
- package/dist/components/data/graph-query-builder/graph-query-builder.styles.js +1 -1
- package/dist/components/data/heatmap/heatmap.class.d.ts +27 -9
- package/dist/components/data/heatmap/heatmap.class.js +5 -3
- package/dist/components/data/sequence-strip/sequence-strip.class.d.ts +2 -0
- package/dist/components/data/sequence-strip/sequence-strip.styles.js +1 -1
- package/dist/components/data/table/table.class.d.ts +8 -0
- package/dist/components/data/table/table.class.js +2 -1
- package/dist/components/data/tree/tree.class.d.ts +20 -1
- package/dist/components/data/tree/tree.class.js +1 -1
- package/dist/components/data/word-cloud/word-cloud.class.d.ts +4 -1
- package/dist/components/data/word-cloud/word-cloud.class.js +2 -2
- package/dist/components/forms/button/button.class.js +1 -1
- package/dist/components/forms/checkbox/checkbox.class.d.ts +11 -8
- package/dist/components/forms/checkbox/checkbox.class.js +1 -1
- package/dist/components/forms/checkbox/checkbox.styles.js +1 -1
- package/dist/components/forms/checkbox-group/checkbox-group.class.d.ts +2 -2
- package/dist/components/forms/checkbox-group/checkbox-group.class.js +1 -1
- package/dist/components/forms/code-editor/code-editor.class.d.ts +2 -0
- package/dist/components/forms/code-editor/code-editor.class.js +1 -1
- package/dist/components/forms/code-editor/code-editor.styles.js +1 -1
- package/dist/components/forms/color-picker/color-picker.class.d.ts +11 -1
- package/dist/components/forms/color-picker/color-picker.class.js +4 -3
- package/dist/components/forms/combobox/combobox.class.d.ts +67 -18
- package/dist/components/forms/combobox/combobox.class.js +7 -6
- package/dist/components/forms/combobox/combobox.styles.js +1 -1
- package/dist/components/forms/date-picker/date-input.class.d.ts +22 -2
- package/dist/components/forms/date-picker/date-input.class.js +4 -2
- package/dist/components/forms/date-picker/date-input.styles.js +1 -1
- package/dist/components/forms/emoji-picker/emoji-data-loader.d.ts +18 -4
- package/dist/components/forms/emoji-picker/emoji-data-loader.js +1 -1
- package/dist/components/forms/emoji-picker/emoji-picker.class.d.ts +18 -4
- package/dist/components/forms/emoji-picker/emoji-picker.class.js +1 -1
- package/dist/components/forms/emoji-picker/emoji-picker.styles.js +1 -1
- package/dist/components/forms/icon-button/icon-button.class.d.ts +1 -1
- package/dist/components/forms/input/time-input.class.d.ts +11 -1
- package/dist/components/forms/input/time-input.class.js +4 -3
- package/dist/components/forms/input/time-input.styles.js +1 -1
- package/dist/components/forms/locale-picker/locale-picker.class.d.ts +17 -3
- package/dist/components/forms/locale-picker/locale-picker.class.js +3 -2
- package/dist/components/forms/locale-picker/locale-picker.styles.js +1 -1
- package/dist/components/forms/otp-input/otp-input.class.d.ts +13 -5
- package/dist/components/forms/otp-input/otp-input.class.js +2 -2
- package/dist/components/forms/otp-input/otp-input.styles.js +1 -1
- package/dist/components/forms/phone-input/phone-input.class.d.ts +10 -3
- package/dist/components/forms/phone-input/phone-input.class.js +6 -2
- package/dist/components/forms/phone-input/phone-input.styles.js +1 -1
- package/dist/components/forms/radio/radio-group.class.d.ts +1 -1
- package/dist/components/forms/radio/radio-group.class.js +2 -2
- package/dist/components/forms/rubric-form/rubric-form.class.d.ts +9 -1
- package/dist/components/forms/rubric-form/rubric-form.class.js +5 -3
- package/dist/components/forms/select/select.class.d.ts +4 -0
- package/dist/components/forms/select/select.styles.js +1 -1
- package/dist/components/forms/slider/slider.class.d.ts +5 -1
- package/dist/components/forms/slider/slider.class.js +3 -3
- package/dist/components/forms/switch/switch.class.d.ts +6 -5
- package/dist/components/forms/switch/switch.class.js +1 -1
- package/dist/components/forms/time-range/time-range.class.d.ts +2 -2
- package/dist/components/forms/token-input/token-input.class.d.ts +13 -3
- package/dist/components/forms/token-input/token-input.class.js +3 -1
- package/dist/components/layout/carousel/carousel.class.d.ts +4 -1
- package/dist/components/layout/carousel/carousel.class.js +1 -1
- package/dist/components/layout/command-palette/command-palette.class.d.ts +8 -2
- package/dist/components/layout/command-palette/command-palette.class.js +1 -1
- package/dist/components/layout/command-palette/command-palette.styles.js +1 -1
- package/dist/components/layout/details/accordion.class.js +1 -1
- package/dist/components/layout/dock-panel/dock-panel.class.d.ts +10 -7
- package/dist/components/layout/dock-panel/dock-panel.class.js +2 -2
- package/dist/components/layout/dock-panel/dock-panel.styles.js +1 -1
- package/dist/components/layout/menu/menu.class.d.ts +13 -3
- package/dist/components/layout/menu/menu.class.js +4 -3
- package/dist/components/layout/menu/menu.styles.js +1 -1
- package/dist/components/layout/page/page.class.d.ts +7 -1
- package/dist/components/layout/reorder-list/reorder-list.class.d.ts +1 -1
- package/dist/components/layout/reorder-list/reorder-list.class.js +1 -1
- package/dist/components/layout/segmented/segmented.class.d.ts +2 -0
- package/dist/components/layout/segmented/segmented.styles.js +1 -1
- package/dist/components/layout/virtual-list/virtual-list.styles.js +1 -1
- package/dist/components/layout/widget/widget.class.d.ts +15 -2
- package/dist/components/layout/widget/widget.class.js +1 -1
- package/dist/components/layout/widget/widget.styles.js +1 -1
- package/dist/components/media/avatar/avatar.class.d.ts +4 -0
- package/dist/components/media/avatar/avatar.styles.js +1 -1
- package/dist/components/media/avatar-group/avatar-group.class.d.ts +8 -1
- package/dist/components/media/avatar-group/avatar-group.styles.js +1 -1
- package/dist/components/media/drop-zone/drop-zone.class.d.ts +10 -4
- package/dist/components/media/drop-zone/drop-zone.class.js +2 -2
- package/dist/components/media/drop-zone/drop-zone.styles.js +1 -1
- package/dist/components/media/flag/flag.class.js +1 -1
- package/dist/components/media/map/map.class.d.ts +19 -5
- package/dist/components/media/map/map.class.js +3 -3
- package/dist/components/media/video-playlist/video-playlist.class.d.ts +6 -3
- package/dist/components/media/video-playlist/video-playlist.class.js +1 -1
- package/dist/components/overlays/callout/callout.class.d.ts +4 -1
- package/dist/components/overlays/dialog/dialog.class.d.ts +4 -1
- package/dist/components/overlays/overlay/overlay.styles.js +1 -1
- package/dist/components/overlays/overlay/popover.class.d.ts +9 -1
- package/dist/components/overlays/overlay/popover.class.js +3 -2
- package/dist/components/overlays/overlay/tooltip.class.d.ts +14 -4
- package/dist/components/overlays/overlay/tooltip.class.js +3 -2
- package/dist/components/overlays/popup/popup.class.d.ts +15 -1
- package/dist/components/overlays/popup/popup.class.js +3 -3
- package/dist/components/overlays/popup/popup.styles.js +1 -1
- package/dist/components/overlays/progress/progress-bar.class.d.ts +2 -0
- package/dist/components/overlays/progress/progress.styles.js +1 -1
- package/dist/components/retrieval/citation-badge/citation-badge.class.d.ts +4 -2
- package/dist/components/retrieval/citation-badge/citation-badge.class.js +1 -1
- package/dist/components/retrieval/claim-evidence/claim-evidence.class.d.ts +4 -0
- package/dist/components/retrieval/claim-evidence/claim-evidence.class.js +4 -3
- package/dist/components/retrieval/claim-evidence/claim-evidence.styles.js +1 -1
- package/dist/components/retrieval/community-card/community-card.class.d.ts +6 -1
- package/dist/components/retrieval/community-card/community-card.styles.js +1 -1
- package/dist/components/retrieval/embedding-explorer/embedding-explorer.class.d.ts +9 -1
- package/dist/components/retrieval/embedding-explorer/embedding-explorer.class.js +4 -3
- package/dist/components/retrieval/entity-card/entity-card.styles.js +1 -1
- package/dist/components/retrieval/entity-chip/entity-chip.class.d.ts +4 -2
- package/dist/components/retrieval/entity-chip/entity-chip.class.js +1 -1
- package/dist/components/retrieval/entity-dossier/entity-dossier.class.js +2 -2
- package/dist/components/retrieval/graph-legend/graph-legend.class.d.ts +18 -4
- package/dist/components/retrieval/graph-legend/graph-legend.class.js +2 -2
- package/dist/components/retrieval/grounding-summary/grounding-summary.class.d.ts +7 -0
- package/dist/components/retrieval/grounding-summary/grounding-summary.class.js +4 -3
- package/dist/components/retrieval/grounding-summary/grounding-summary.styles.js +1 -1
- package/dist/components/retrieval/memory-panel/memory-panel.class.d.ts +6 -0
- package/dist/components/retrieval/memory-panel/memory-panel.class.js +4 -3
- package/dist/components/retrieval/memory-panel/memory-panel.styles.js +1 -1
- package/dist/components/retrieval/mind-map/mind-map-layout.d.ts +17 -1
- package/dist/components/retrieval/mind-map/mind-map-layout.js +1 -1
- package/dist/components/retrieval/mind-map/mind-map.class.d.ts +8 -1
- package/dist/components/retrieval/mind-map/mind-map.class.js +3 -2
- package/dist/components/retrieval/rag-eval-dashboard/rag-eval-dashboard.class.d.ts +5 -0
- package/dist/components/retrieval/rag-eval-dashboard/rag-eval-dashboard.class.js +6 -5
- package/dist/components/retrieval/rag-eval-dashboard/rag-eval-dashboard.styles.js +1 -1
- package/dist/components/retrieval/retrieval-compare/retrieval-compare.class.js +5 -5
- package/dist/components/retrieval/retrieval-compare/retrieval-compare.styles.js +1 -1
- package/dist/components/retrieval/source-list/source-list.class.d.ts +21 -2
- package/dist/components/retrieval/source-list/source-list.class.js +2 -2
- package/dist/components/retrieval/source-list/source-list.styles.js +1 -1
- package/dist/components/retrieval/source-picker/source-picker.class.d.ts +3 -1
- package/dist/components/retrieval/source-picker/source-picker.class.js +2 -2
- package/dist/components/utility/diff-view/diff-view.class.d.ts +105 -8
- package/dist/components/utility/diff-view/diff-view.class.js +21 -5
- package/dist/components/utility/diff-view/diff-view.styles.js +1 -1
- package/dist/components/utility/export-button/export-button.class.d.ts +26 -2
- package/dist/components/utility/export-button/export-button.class.js +4 -2
- package/dist/components/utility/export-button/export-button.styles.js +1 -1
- package/dist/components/utility/mention-popover/mention-popover.class.d.ts +19 -1
- package/dist/components/utility/mention-popover/mention-popover.class.js +3 -2
- package/dist/components/utility/mention-popover/mention-popover.styles.js +1 -1
- package/dist/components/utility/tour/tour.class.d.ts +1 -3
- package/dist/components/utility/tour/tour.class.js +1 -1
- package/dist/components/viewers/archive-viewer/archive-viewer.class.d.ts +20 -3
- package/dist/components/viewers/archive-viewer/archive-viewer.class.js +1 -1
- package/dist/components/viewers/ebook-viewer/ebook-viewer.class.js +1 -1
- package/dist/components/viewers/geojson-view/geojson-view.styles.js +1 -1
- package/dist/components/viewers/geojson-view/geojson-viewer.class.d.ts +5 -0
- package/dist/components/viewers/geojson-view/geojson-viewer.class.js +6 -3
- package/dist/components/viewers/pdf-viewer/pdf-viewer.class.d.ts +7 -1
- package/dist/components/viewers/pdf-viewer/pdf-viewer.class.js +1 -1
- package/dist/components/viewers/pptx-viewer/pptx-viewer.class.d.ts +7 -1
- package/dist/components/viewers/pptx-viewer/pptx-viewer.class.js +1 -1
- package/dist/components/viewers/xml-viewer/xml-viewer.class.d.ts +5 -0
- package/dist/components/viewers/xml-viewer/xml-viewer.class.js +1 -1
- package/dist/custom-elements-jsx.d.ts +1 -1
- package/dist/events.d.ts +79 -30
- package/dist/internal/accessibility-visibility.js +1 -1
- package/dist/internal/aria-reflection.js +1 -1
- package/dist/internal/catalog-picker.d.ts +14 -3
- package/dist/internal/catalog-picker.js +1 -1
- package/dist/internal/default-strings.generated.d.ts +1 -1
- package/dist/internal/default-strings.generated.js +2 -2
- package/dist/internal/localization-types.d.ts +1 -1
- package/dist/internal/localization.js +2 -2
- package/dist/internal/lyra-element.d.ts +17 -0
- package/dist/internal/lyra-element.js +2 -2
- package/dist/internal/package-metadata.d.ts +1 -1
- package/dist/internal/package-metadata.js +1 -1
- package/dist/svelte.d.ts +1 -1
- package/dist/testing/lyra-tag-event-map.js +1 -1
- package/dist/translations/ar/agent-tools.js +1 -1
- package/dist/translations/ar/data.js +1 -1
- package/dist/translations/ar/retrieval.js +1 -1
- package/dist/translations/ar/shared.js +1 -1
- package/dist/translations/ar/viewers.js +1 -1
- package/dist/translations/de/agent-tools.js +1 -1
- package/dist/translations/de/data.js +1 -1
- package/dist/translations/de/retrieval.js +1 -1
- package/dist/translations/de/shared.js +1 -1
- package/dist/translations/de/viewers.js +1 -1
- package/dist/translations/es/agent-tools.js +1 -1
- package/dist/translations/es/data.js +1 -1
- package/dist/translations/es/retrieval.js +1 -1
- package/dist/translations/es/shared.js +1 -1
- package/dist/translations/es/viewers.js +1 -1
- package/dist/translations/fa/agent-tools.js +1 -1
- package/dist/translations/fa/data.js +1 -1
- package/dist/translations/fa/retrieval.js +1 -1
- package/dist/translations/fa/shared.js +1 -1
- package/dist/translations/fa/viewers.js +1 -1
- package/dist/translations/fr/agent-tools.js +1 -1
- package/dist/translations/fr/data.js +1 -1
- package/dist/translations/fr/retrieval.js +1 -1
- package/dist/translations/fr/shared.js +1 -1
- package/dist/translations/fr/viewers.js +1 -1
- package/dist/translations/he/agent-tools.js +1 -1
- package/dist/translations/he/data.js +1 -1
- package/dist/translations/he/retrieval.js +1 -1
- package/dist/translations/he/shared.js +1 -1
- package/dist/translations/he/viewers.js +1 -1
- package/dist/translations/it/agent-tools.js +1 -1
- package/dist/translations/it/data.js +1 -1
- package/dist/translations/it/retrieval.js +1 -1
- package/dist/translations/it/shared.js +1 -1
- package/dist/translations/it/viewers.js +1 -1
- package/dist/translations/ja/agent-tools.js +1 -1
- package/dist/translations/ja/data.js +1 -1
- package/dist/translations/ja/retrieval.js +1 -1
- package/dist/translations/ja/shared.js +1 -1
- package/dist/translations/ja/viewers.js +1 -1
- package/dist/translations/pt-BR/agent-tools.js +1 -1
- package/dist/translations/pt-BR/data.js +1 -1
- package/dist/translations/pt-BR/retrieval.js +1 -1
- package/dist/translations/pt-BR/shared.js +1 -1
- package/dist/translations/pt-BR/viewers.js +1 -1
- package/dist/translations/ro/agent-tools.js +1 -1
- package/dist/translations/ro/data.js +1 -1
- package/dist/translations/ro/retrieval.js +1 -1
- package/dist/translations/ro/shared.js +1 -1
- package/dist/translations/ro/viewers.js +1 -1
- package/dist/translations/ru/agent-tools.js +1 -1
- package/dist/translations/ru/data.js +1 -1
- package/dist/translations/ru/retrieval.js +1 -1
- package/dist/translations/ru/shared.js +1 -1
- package/dist/translations/ru/viewers.js +1 -1
- package/dist/translations/zh-CN/agent-tools.js +1 -1
- package/dist/translations/zh-CN/data.js +1 -1
- package/dist/translations/zh-CN/retrieval.js +1 -1
- package/dist/translations/zh-CN/shared.js +1 -1
- package/dist/translations/zh-CN/viewers.js +1 -1
- package/dist/vue.d.ts +1 -1
- package/llms/components/lr-activity-feed.md +20 -9
- package/llms/components/lr-approval-queue.md +3 -2
- package/llms/components/lr-archive-viewer.md +8 -1
- package/llms/components/lr-artifact-panel.md +3 -1
- package/llms/components/lr-audio-visualizer.md +3 -1
- package/llms/components/lr-avatar-group.md +13 -6
- package/llms/components/lr-avatar.md +6 -2
- package/llms/components/lr-bar-chart.md +6 -3
- package/llms/components/lr-box-plot.md +6 -2
- package/llms/components/lr-branch-picker.md +3 -1
- package/llms/components/lr-bubble-chart.md +6 -3
- package/llms/components/lr-calendar.md +10 -3
- package/llms/components/lr-carousel.md +4 -2
- package/llms/components/lr-chart.md +12 -4
- package/llms/components/lr-chat-viewport.md +3 -2
- package/llms/components/lr-checkbox.md +8 -5
- package/llms/components/lr-citation-badge.md +2 -0
- package/llms/components/lr-claim-evidence.md +6 -2
- package/llms/components/lr-code-editor.md +3 -1
- package/llms/components/lr-color-picker.md +20 -8
- package/llms/components/lr-combobox.md +26 -3
- package/llms/components/lr-command-palette.md +6 -3
- package/llms/components/lr-community-card.md +7 -4
- package/llms/components/lr-context-inspector.md +3 -2
- package/llms/components/lr-context-meter.md +13 -5
- package/llms/components/lr-data-grid.md +2 -0
- package/llms/components/lr-date-input.md +12 -3
- package/llms/components/lr-date-picker.md +11 -2
- package/llms/components/lr-diff-view.md +46 -5
- package/llms/components/lr-doughnut-chart.md +6 -3
- package/llms/components/lr-drop-zone.md +7 -3
- package/llms/components/lr-embedding-explorer.md +8 -2
- package/llms/components/lr-emoji-picker.md +5 -1
- package/llms/components/lr-entity-chip.md +2 -0
- package/llms/components/lr-eval-run.md +3 -2
- package/llms/components/lr-export-button.md +5 -2
- package/llms/components/lr-flow-node.md +7 -4
- package/llms/components/lr-funnel.md +7 -2
- package/llms/components/lr-gauge.md +7 -2
- package/llms/components/lr-geojson-view.md +10 -2
- package/llms/components/lr-geojson-viewer.md +10 -2
- package/llms/components/lr-graph-legend.md +6 -3
- package/llms/components/lr-graph-query-builder.md +21 -11
- package/llms/components/lr-grounding-summary.md +8 -2
- package/llms/components/lr-heatmap.md +5 -2
- package/llms/components/lr-histogram.md +4 -2
- package/llms/components/lr-json-schema-viewer.md +7 -5
- package/llms/components/lr-line-chart.md +6 -3
- package/llms/components/lr-locale-picker.md +4 -1
- package/llms/components/lr-map.md +5 -3
- package/llms/components/lr-memory-panel.md +6 -2
- package/llms/components/lr-mention-popover.md +7 -4
- package/llms/components/lr-message-actions.md +3 -1
- package/llms/components/lr-message-parts.md +8 -2
- package/llms/components/lr-mind-map.md +11 -2
- package/llms/components/lr-option.md +25 -2
- package/llms/components/lr-otp-input.md +3 -1
- package/llms/components/lr-phone-input.md +9 -5
- package/llms/components/lr-pie-chart.md +6 -3
- package/llms/components/lr-polar-area-chart.md +6 -3
- package/llms/components/lr-policy-summary.md +3 -2
- package/llms/components/lr-progress-bar.md +4 -1
- package/llms/components/lr-prompt-input.md +4 -1
- package/llms/components/lr-prompt-queue.md +5 -2
- package/llms/components/lr-radar-chart.md +6 -3
- package/llms/components/lr-rag-eval-dashboard.md +7 -2
- package/llms/components/lr-realtime-session.md +3 -1
- package/llms/components/lr-rubric-form.md +6 -1
- package/llms/components/lr-scatter-chart.md +6 -3
- package/llms/components/lr-segmented.md +3 -1
- package/llms/components/lr-select.md +7 -1
- package/llms/components/lr-selection-toolbar.md +4 -1
- package/llms/components/lr-sequence-strip.md +7 -3
- package/llms/components/lr-source-card.md +16 -1
- package/llms/components/lr-source-list.md +17 -2
- package/llms/components/lr-source-picker.md +3 -1
- package/llms/components/lr-subagent-panel.md +6 -3
- package/llms/components/lr-switch.md +4 -3
- package/llms/components/lr-table.md +6 -1
- package/llms/components/lr-thinking-panel.md +8 -5
- package/llms/components/lr-token-input.md +15 -1
- package/llms/components/lr-tool-call-chip.md +2 -0
- package/llms/components/lr-tool-param-form.md +15 -4
- package/llms/components/lr-tooltip.md +8 -4
- package/llms/components/lr-trace-tree.md +7 -4
- package/llms/components/lr-video-playlist.md +7 -5
- package/llms/components/lr-voice-picker.md +7 -4
- package/llms/components/lr-widget.md +15 -2
- package/llms/migration.md +4 -4
- package/llms-full.txt +552 -159
- package/package.json +11 -9
- package/registrations.json +1 -1
- package/vscode-css-data.json +1 -1
- package/vscode-html-data.json +1 -1
- package/web-types.json +1 -1
|
@@ -48,7 +48,27 @@ export interface GraphQuerySaveDetail{readonly name:string;readonly query:GraphQ
|
|
|
48
48
|
/** Frozen payload shared by the load request and accepted notification. */
|
|
49
49
|
export interface GraphQueryLoadDetail{readonly queryId:string;readonly query:GraphQuery;}
|
|
50
50
|
/** Frozen payload shared by the delete request and accepted notification. */
|
|
51
|
-
export interface GraphQueryDeleteDetail{readonly queryId:string;}export interface LyraGraphQueryBuilderEventMap{'lr-invalid':CustomEvent<null>;'lr-input':CustomEvent<LyraEventDetailSnapshot<{readonly value:GraphQuery;}>>;'lr-validity-change':CustomEvent<{readonly valid:boolean;readonly errors:Readonly<Record<string,string>>;}>;
|
|
51
|
+
export interface GraphQueryDeleteDetail{readonly queryId:string;}export interface LyraGraphQueryBuilderEventMap{'lr-invalid':CustomEvent<null>;'lr-input':CustomEvent<LyraEventDetailSnapshot<{readonly value:GraphQuery;}>>;'lr-validity-change':CustomEvent<{readonly valid:boolean;readonly errors:Readonly<Record<string,string>>;}>;
|
|
52
|
+
/** Canonical name for the run veto point. */
|
|
53
|
+
'lr-query-run-request':CustomEvent<LyraEventDetailSnapshot<GraphQueryRunDetail>>;
|
|
54
|
+
/** Deprecated alias of `lr-query-run-request`, kept firing unchanged for back-compat; slated
|
|
55
|
+
* for removal in 21.0.0. */
|
|
56
|
+
'lr-before-query-run':CustomEvent<LyraEventDetailSnapshot<GraphQueryRunDetail>>;'lr-query-run':CustomEvent<LyraEventDetailSnapshot<GraphQueryRunDetail>>;
|
|
57
|
+
/** Canonical name for the save veto point. */
|
|
58
|
+
'lr-query-save-request':CustomEvent<LyraEventDetailSnapshot<GraphQuerySaveDetail>>;
|
|
59
|
+
/** Deprecated alias of `lr-query-save-request`, kept firing unchanged for back-compat; slated
|
|
60
|
+
* for removal in 21.0.0. */
|
|
61
|
+
'lr-before-query-save':CustomEvent<LyraEventDetailSnapshot<GraphQuerySaveDetail>>;'lr-query-save':CustomEvent<LyraEventDetailSnapshot<GraphQuerySaveDetail>>;
|
|
62
|
+
/** Canonical name for the load veto point. */
|
|
63
|
+
'lr-query-load-request':CustomEvent<LyraEventDetailSnapshot<GraphQueryLoadDetail>>;
|
|
64
|
+
/** Deprecated alias of `lr-query-load-request`, kept firing unchanged for back-compat; slated
|
|
65
|
+
* for removal in 21.0.0. */
|
|
66
|
+
'lr-before-query-load':CustomEvent<LyraEventDetailSnapshot<GraphQueryLoadDetail>>;'lr-query-load':CustomEvent<LyraEventDetailSnapshot<GraphQueryLoadDetail>>;
|
|
67
|
+
/** Canonical name for the delete veto point. */
|
|
68
|
+
'lr-query-delete-request':CustomEvent<GraphQueryDeleteDetail>;
|
|
69
|
+
/** Deprecated alias of `lr-query-delete-request`, kept firing unchanged for back-compat; slated
|
|
70
|
+
* for removal in 21.0.0. */
|
|
71
|
+
'lr-before-query-delete':CustomEvent<GraphQueryDeleteDetail>;'lr-query-delete':CustomEvent<GraphQueryDeleteDetail>;}
|
|
52
72
|
/**
|
|
53
73
|
* `<lr-graph-query-builder>` — an editor for a single typed relationship/path filter
|
|
54
74
|
* (`GraphQuery`) over a knowledge graph: start/end entity anchors, relationship-type and
|
|
@@ -96,9 +116,12 @@ export interface GraphQueryDeleteDetail{readonly queryId:string;}export interfac
|
|
|
96
116
|
* updates. Ordinary focused removal still follows the adjacent control and leaves outside focus alone.
|
|
97
117
|
*
|
|
98
118
|
* Run, save, load, and delete use the same two-phase action contract: a cancelable
|
|
99
|
-
* `lr-
|
|
100
|
-
* `lr-query-*` accepted notification.
|
|
101
|
-
*
|
|
119
|
+
* `lr-query-*-request` request precedes any local effect, followed by a non-cancelable
|
|
120
|
+
* `lr-query-*` accepted notification. The deprecated `lr-before-query-*` alias of each request
|
|
121
|
+
* fires immediately after its canonical `lr-query-*-request` counterpart, from the same gesture,
|
|
122
|
+
* with the same detail; either one vetoes the action. Vetoing a request suppresses its accepted
|
|
123
|
+
* notification; for save it also preserves the draft name, and for load it preserves the current
|
|
124
|
+
* `value`.
|
|
102
125
|
*
|
|
103
126
|
* **Accessible name:** a host-level `aria-label` wins. Otherwise the region (`role="group"`) is
|
|
104
127
|
* labelled by the same visible label element that renders the `label` slot/property/localized
|
|
@@ -114,25 +137,39 @@ export interface GraphQueryDeleteDetail{readonly queryId:string;}export interfac
|
|
|
114
137
|
* choices emit it once; child native/prefixed value and listbox lifecycle aliases are contained.
|
|
115
138
|
* @event lr-validity-change - Frozen `detail: { valid, errors }` from effective native validity,
|
|
116
139
|
* including custom errors and validation barring; fired only on an actual change.
|
|
117
|
-
* @event lr-
|
|
118
|
-
* accepting Run. Frozen `detail: { query }`; vetoing it suppresses `lr-query-run`.
|
|
140
|
+
* @event lr-query-run-request - Cancelable request emitted after `reportValidity()` passes, before
|
|
141
|
+
* accepting Run. Frozen `detail: { query }`; vetoing it suppresses `lr-query-run`. Fires before
|
|
142
|
+
* `lr-before-query-run`, from the same gesture; either event may veto.
|
|
143
|
+
* @event lr-before-query-run - Deprecated cancelable alias of `lr-query-run-request`, kept firing unchanged
|
|
144
|
+
* for back-compat; slated for removal in 21.0.0. Same frozen detail.
|
|
119
145
|
* @event lr-query-run - Non-cancelable accepted Run notification. Frozen `detail: { query }`.
|
|
120
|
-
* @event lr-
|
|
121
|
-
* Vetoing it preserves the draft name and suppresses `lr-query-save`.
|
|
146
|
+
* @event lr-query-save-request - Cancelable save request with frozen `detail: { name, query }`.
|
|
147
|
+
* Vetoing it preserves the draft name and suppresses `lr-query-save`. Fires before
|
|
148
|
+
* `lr-before-query-save`, from the same gesture; either event may veto.
|
|
149
|
+
* @event lr-before-query-save - Deprecated cancelable alias of `lr-query-save-request`, kept firing unchanged
|
|
150
|
+
* for back-compat; slated for removal in 21.0.0. Same frozen detail.
|
|
122
151
|
* @event lr-query-save - Non-cancelable accepted Save notification. Frozen
|
|
123
152
|
* `detail: { name, query }`; the host assigns an id and appends to `savedQueries`.
|
|
124
|
-
* @event lr-
|
|
125
|
-
* emitted before `value` changes. Vetoing it preserves the current query.
|
|
153
|
+
* @event lr-query-load-request - Cancelable load request with frozen `detail: { queryId, query }`,
|
|
154
|
+
* emitted before `value` changes. Vetoing it preserves the current query. Fires before
|
|
155
|
+
* `lr-before-query-load`, from the same gesture; either event may veto.
|
|
156
|
+
* @event lr-before-query-load - Deprecated cancelable alias of `lr-query-load-request`, kept firing unchanged
|
|
157
|
+
* for back-compat; slated for removal in 21.0.0. Same frozen detail.
|
|
126
158
|
* @event lr-query-load - Non-cancelable accepted Load notification emitted after `value` changes.
|
|
127
159
|
* Frozen `detail: { queryId, query }` contains the accepted query.
|
|
128
|
-
* @event lr-
|
|
129
|
-
* Vetoing it suppresses `lr-query-delete`.
|
|
160
|
+
* @event lr-query-delete-request - Cancelable delete request with frozen `detail: { queryId }`.
|
|
161
|
+
* Vetoing it suppresses `lr-query-delete`. Fires before `lr-before-query-delete`, from the same
|
|
162
|
+
* gesture; either event may veto.
|
|
163
|
+
* @event lr-before-query-delete - Deprecated cancelable alias of `lr-query-delete-request`, kept firing
|
|
164
|
+
* unchanged for back-compat; slated for removal in 21.0.0. Same frozen detail.
|
|
130
165
|
* @event lr-query-delete - Non-cancelable accepted Delete notification. Frozen
|
|
131
166
|
* `detail: { queryId }`; the host removes the matching entry from `savedQueries`.
|
|
132
167
|
* @event lr-invalid - Cancelable alias when the complete builder fails native validity; vetoing it
|
|
133
168
|
* also suppresses the native invalid default.
|
|
134
169
|
* @csspart base - The outer wrapper around every section.
|
|
135
|
-
* @csspart label - Visible label for the complete form control
|
|
170
|
+
* @csspart form-control-label - Visible label for the complete form control; shares the same
|
|
171
|
+
* node as the `label` compatibility alias.
|
|
172
|
+
* @csspart label - Compatibility alias for `form-control-label`.
|
|
136
173
|
* @csspart hint - Supporting text for the complete form control.
|
|
137
174
|
* @csspart error - Error text for the complete form control.
|
|
138
175
|
* @csspart path-fields - The row wrapping the start/end entity inputs and hop-count selects.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __decorate=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r};import{html,nothing}from"lit";import{property,query,state}from"lit/decorators.js";import{LyraElement}from"../../../internal/lyra-element.js";import{installFormControlLabelSupport}from"../../../internal/form-control-labels.js";installFormControlLabelSupport();import{closeIcon}from"../../../internal/icons.js";import{collectInitialSlotAssignment}from"../../../internal/initial-slot-collection.js";import{AnchoredValidityController,VALIDITY_ANCHOR}from"../../../internal/anchored-validity.js";import{syncValidityStates}from"../../../internal/custom-states.js";import{finiteInteger}from"../../../internal/numbers.js";import{getNumberFormat}from"../../../internal/intl-cache.js";import{nextId}from"../../../internal/a11y.js";import{activeElementIn,deepActiveElementIn}from"../../../internal/active-element.js";import{styles}from"./graph-query-builder.styles.js";import{attachInternalsSafely}from"../../../internal/element-internals.js";import{getFormOwner,installCustomErrorProperty,isBarredFromValidation,setFormOwner}from"../../../internal/form-associated.js";import{installInteractionOnInvalid,installInvalidEventAlias,withStaticValidityCheck}from"../../../internal/invalid-event-alias.js";import{acquireResolvedAriaRelationship}from"../../../internal/aria-controls.js";import{LYRA_DEFAULT_fieldRequired,LYRA_DEFAULT_graphQueryBuilderLabel,LYRA_DEFAULT_graphQueryDeleteWithContext,LYRA_DEFAULT_graphQueryDirectionLabel,LYRA_DEFAULT_graphQueryEndLabel,LYRA_DEFAULT_graphQueryHopRangeInvalid,LYRA_DEFAULT_graphQueryLoadWithContext,LYRA_DEFAULT_graphQueryMaxHopsLabel,LYRA_DEFAULT_graphQueryMinHopsLabel,LYRA_DEFAULT_graphQueryNodeTypeLabel,LYRA_DEFAULT_graphQueryRelationshipTypeLabel,LYRA_DEFAULT_graphQueryRun,LYRA_DEFAULT_graphQuerySaveButton,LYRA_DEFAULT_graphQuerySaveNameLabel,LYRA_DEFAULT_graphQuerySavedQueriesLabel,LYRA_DEFAULT_graphQueryStartLabel,LYRA_DEFAULT_neighborDirectionBoth,LYRA_DEFAULT_neighborDirectionIn,LYRA_DEFAULT_neighborDirectionOut,LYRA_DEFAULT_noData,LYRA_DEFAULT_select}from"../../../internal/default-strings.generated.js";const MAX_TYPES=500,MAX_SAVED_QUERIES=200,MAX_TEXT=256,EMPTY_STRINGS=Object.freeze([]),EMPTY_VALUE=Object.freeze({startId:"",endId:"",relationshipTypes:EMPTY_STRINGS,nodeTypes:EMPTY_STRINGS,direction:"both",minHops:1,maxHops:1}),EMPTY_OPTIONS=Object.freeze([]),EMPTY_SAVED=Object.freeze([]);function ownValue(record,key){try{const descriptor=Object.getOwnPropertyDescriptor(record,key);return descriptor&&"value"in descriptor?descriptor.value:void 0}catch{return}}function boundedString(value){return typeof value=="string"?value.slice(0,MAX_TEXT):""}function stringArray(value){return Array.isArray(value)?Object.freeze([...new Set(value.slice(0,MAX_TYPES).filter(entry=>typeof entry=="string").map(entry=>boundedString(entry)).filter(Boolean))]):EMPTY_STRINGS}function normalizeGraphQuery(value){const record=value!==null&&typeof value=="object"&&!Array.isArray(value)?value:EMPTY_VALUE,direction=ownValue(record,"direction");return Object.freeze({startId:boundedString(ownValue(record,"startId")),endId:boundedString(ownValue(record,"endId")),relationshipTypes:stringArray(ownValue(record,"relationshipTypes")),nodeTypes:stringArray(ownValue(record,"nodeTypes")),direction:direction==="out"||direction==="in"||direction==="both"?direction:"both",minHops:finiteInteger(typeof ownValue(record,"minHops")=="number"?ownValue(record,"minHops"):EMPTY_VALUE.minHops,EMPTY_VALUE.minHops,1,20),maxHops:finiteInteger(typeof ownValue(record,"maxHops")=="number"?ownValue(record,"maxHops"):EMPTY_VALUE.maxHops,EMPTY_VALUE.maxHops,1,20)})}function normalizeTypeOptions(value){if(!Array.isArray(value))return EMPTY_OPTIONS;const values=new Set,result=[];for(const candidate of value.slice(0,MAX_TYPES)){if(candidate===null||typeof candidate!="object"||Array.isArray(candidate))continue;const optionValue=boundedString(ownValue(candidate,"value"));if(optionValue.trim().length===0||values.has(optionValue))continue;values.add(optionValue);const label=boundedString(ownValue(candidate,"label"));result.push(Object.freeze({value:optionValue,...label?{label}:{}}))}return Object.freeze(result)}function normalizeSavedQueries(value){if(!Array.isArray(value))return EMPTY_SAVED;const ids=new Set,result=[];for(const candidate of value.slice(0,MAX_SAVED_QUERIES)){if(candidate===null||typeof candidate!="object"||Array.isArray(candidate))continue;const id=boundedString(ownValue(candidate,"id"));id.trim().length===0||ids.has(id)||(ids.add(id),result.push(Object.freeze({id,name:boundedString(ownValue(candidate,"name")),query:normalizeGraphQuery(ownValue(candidate,"query"))})))}return Object.freeze(result)}class LyraGraphQueryBuilder extends LyraElement{static{this.defaultStrings={...super.defaultStrings,fieldRequired:LYRA_DEFAULT_fieldRequired,graphQueryBuilderLabel:LYRA_DEFAULT_graphQueryBuilderLabel,graphQueryDeleteWithContext:LYRA_DEFAULT_graphQueryDeleteWithContext,graphQueryDirectionLabel:LYRA_DEFAULT_graphQueryDirectionLabel,graphQueryEndLabel:LYRA_DEFAULT_graphQueryEndLabel,graphQueryHopRangeInvalid:LYRA_DEFAULT_graphQueryHopRangeInvalid,graphQueryLoadWithContext:LYRA_DEFAULT_graphQueryLoadWithContext,graphQueryMaxHopsLabel:LYRA_DEFAULT_graphQueryMaxHopsLabel,graphQueryMinHopsLabel:LYRA_DEFAULT_graphQueryMinHopsLabel,graphQueryNodeTypeLabel:LYRA_DEFAULT_graphQueryNodeTypeLabel,graphQueryRelationshipTypeLabel:LYRA_DEFAULT_graphQueryRelationshipTypeLabel,graphQueryRun:LYRA_DEFAULT_graphQueryRun,graphQuerySaveButton:LYRA_DEFAULT_graphQuerySaveButton,graphQuerySaveNameLabel:LYRA_DEFAULT_graphQuerySaveNameLabel,graphQuerySavedQueriesLabel:LYRA_DEFAULT_graphQuerySavedQueriesLabel,graphQueryStartLabel:LYRA_DEFAULT_graphQueryStartLabel,neighborDirectionBoth:LYRA_DEFAULT_neighborDirectionBoth,neighborDirectionIn:LYRA_DEFAULT_neighborDirectionIn,neighborDirectionOut:LYRA_DEFAULT_neighborDirectionOut,noData:LYRA_DEFAULT_noData,select:LYRA_DEFAULT_select}}static{this.formAssociated=!0}static{this.styles=[LyraElement.styles,styles]}static{this.immutableEventDetails=Object.freeze(["lr-input","lr-before-query-run","lr-query-run","lr-before-query-save","lr-query-save","lr-before-query-load","lr-query-load"])}static{this.properties={customError:{attribute:"custom-error",reflect:!0,noAccessor:!0},name:{reflect:!0,noAccessor:!0},value:{attribute:!1,noAccessor:!0},disabled:{type:Boolean,reflect:!0,noAccessor:!0}}}get relationshipTypeOptions(){return this._relationshipTypeOptions}set relationshipTypeOptions(value){const previous=this._relationshipTypeOptions;this._relationshipTypeOptions=normalizeTypeOptions(value),this.requestUpdate("relationshipTypeOptions",previous)}get nodeTypeOptions(){return this._nodeTypeOptions}set nodeTypeOptions(value){const previous=this._nodeTypeOptions;this._nodeTypeOptions=normalizeTypeOptions(value),this.requestUpdate("nodeTypeOptions",previous)}get savedQueries(){return this._savedQueries}set savedQueries(value){const previous=this._savedQueries;this._savedQueries=normalizeSavedQueries(value),this.requestUpdate("savedQueries",previous)}constructor(){super(),this._relationshipTypeOptions=EMPTY_OPTIONS,this._nodeTypeOptions=EMPTY_OPTIONS,this._savedQueries=EMPTY_SAVED,this.hopLimit=6,this.label="",this.hint="",this.errorText="",this._errors={},this.touchedFields=new Set,this.saveName="",this.hasHintSlot=!1,this.hasErrorSlot=!1,this.labelId=nextId("graph-query-builder-label"),this.hintId=nextId("graph-query-builder-hint"),this.errorId=nextId("graph-query-builder-error"),this._fieldsetDisabled=!1,this._name="",this._value=EMPTY_VALUE,this.defaultValue=normalizeGraphQuery(EMPTY_VALUE),this.defaultValueCaptured=!1,this._disabled=!1,this.hasInteracted=!1,this.removalFocusGeneration=0,this.markInteracted=()=>{this.hasInteracted||(this.hasInteracted=!0,this.syncValidityCustomStates())},this.onChromeSlotChange=event=>{this.collectChromeSlotAssignment(event.currentTarget)},this.internals=attachInternalsSafely(this),this.validityController=new AnchoredValidityController(this,this.internals,()=>this[VALIDITY_ANCHOR]()),installCustomErrorProperty(this,()=>this.validityController.customValidityMessage),installInvalidEventAlias(this,init=>this.emit("lr-invalid",null,init)),installInteractionOnInvalid(this,this.markInteracted),this.syncFormState()}connectedCallback(){super.connectedCallback(),this.hasUpdated&&this.syncExternalDescription()}disconnectedCallback(){this.removalFocusGeneration++,this.pendingRemovalFocus=void 0,this.releaseExternalDescription(),super.disconnectedCallback()}syncExternalDescription(){const target=this.isConnected?this.renderRoot.querySelector('[part="base"]')??null:null;if(!target){this.releaseExternalDescription();return}this.externalDescriptionLease?this.externalDescriptionLease.update(target):this.externalDescriptionLease=acquireResolvedAriaRelationship(this,target,"aria-describedby")}releaseExternalDescription(){this.externalDescriptionLease?.release(),this.externalDescriptionLease=void 0}get form(){return getFormOwner(this.internals)}set form(owner){setFormOwner(this,owner)}getForm(){return getFormOwner(this.internals)}get labels(){return this.internals.labels}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}get willValidate(){return this.internals.willValidate}get value(){return this._value}set value(next){const old=this._value;this._value=normalizeGraphQuery(next),this.syncFormState(),this.requestUpdate("value",old)}get name(){return this._name}set name(next){const old=this._name;this._name=next??"",this._name?this.setAttribute("name",this._name):this.removeAttribute("name"),this.requestUpdate("name",old)}get disabled(){return this._disabled}set disabled(next){const old=this._disabled;this._disabled=!!next,this.toggleAttribute("disabled",this._disabled),this.validityController&&this.syncFormState(),this.requestUpdate("disabled",old)}get effectiveDisabled(){return this.disabled||this._fieldsetDisabled}get errors(){return this.publicValidityErrors()}publicValidityErrors(){const errors={...this._errors};return this.willValidate&&this.validity.customError&&(errors.base=this.validationMessage),Object.freeze(errors)}publishValiditySnapshot(){if(!this.isConnected)return;const valid=!this.willValidate||this.validity.valid,errors=valid?Object.freeze({}):this.publicValidityErrors(),key=JSON.stringify({valid,errors});key!==this.lastValidityKey&&(this.lastValidityKey=key,this.emit("lr-validity-change",Object.freeze({valid,errors})))}[VALIDITY_ANCHOR](){const firstInvalidPart=Object.keys(this._errors)[0];if(!(!firstInvalidPart||!this.renderRoot))return this.renderRoot.querySelector(`[part="${firstInvalidPart}"]`)??void 0}computeValidation(){const errors={},flags={};return this._value.startId.trim()||(errors["start-input"]=this.localize("fieldRequired"),flags.valueMissing=!0),this._value.minHops>this._value.maxHops&&(errors["max-hops"]=this.localize("graphQueryHopRangeInvalid"),flags.rangeUnderflow=!0),{errors,flags}}syncFormState(){const{errors,flags}=this.computeValidation();this._errors=errors;let formValue=null;try{formValue=JSON.stringify(this._value)}catch{formValue=null}if(this.internals.setFormValue(formValue,formValue),this.barredFromValidation||Object.keys(flags).length===0)this.validityController.setValidity({});else{const message=Object.values(errors)[0]??"";this.validityController.setValidity(flags,message)}this.syncValidityCustomStates(),this.publishValiditySnapshot()}get barredFromValidation(){return isBarredFromValidation(this,this.internals)}syncValidityCustomStates(){syncValidityStates(this.internals,{required:!0,hasInteracted:this.hasInteracted,barred:this.barredFromValidation})}checkValidity(){return this.syncFormState(),withStaticValidityCheck(this,()=>this.internals.checkValidity())}reportValidity(){return this.hasInteracted=!0,this.syncFormState(),Object.keys(this._errors).length>0&&(this.touchedFields=new Set([...this.touchedFields,...Object.keys(this._errors)])),this.internals.reportValidity()}setCustomValidity(message){this.validityController.setCustomValidity(message??""),this.syncValidityCustomStates(),this.publishValiditySnapshot(),this.requestUpdate()}formResetCallback(){this.hasInteracted=!1,this.captureDefaultValue(),this.value=this.defaultValue,this.touchedFields=new Set,this.saveName=""}captureDefaultValue(){this.defaultValueCaptured||(this.defaultValue=normalizeGraphQuery(this._value),this.defaultValueCaptured=!0)}formStateRestoreCallback(state2,_mode){let restored=EMPTY_VALUE;if(typeof state2=="string")try{const parsed=JSON.parse(state2);parsed!==null&&typeof parsed=="object"&&!Array.isArray(parsed)&&(restored=normalizeGraphQuery(parsed))}catch{}this.value=restored}formDisabledCallback(disabled){this._fieldsetDisabled=disabled,this.syncFormState(),this.requestUpdate()}get liveDisabled(){return this.effectiveDisabled||this.matches(":disabled")}focusFirstControl(options){if(!this.renderRoot||this.liveDisabled)return;(this.renderRoot.querySelector('[part="start-input"]')||this.renderRoot.querySelector('[part="end-input"]')||this.renderRoot.querySelector('[part="min-hops"]')||this.renderRoot.querySelector('[part="max-hops"]')||this.renderRoot.querySelector('[part="direction"]')||this.renderRoot.querySelector('[part="save-name-input"]'))?.focus(options)}focus(options){this.focusFirstControl(options)}blur(){const active=deepActiveElementIn(this.shadowRoot);active&&typeof active.blur=="function"&&active.blur()}click(){this.focusFirstControl()}setValue(next){this.effectiveDisabled||(this.hasInteracted=!0,this.value=next,this.emit("lr-input",Object.freeze({value:this._value})))}addRelationshipType(type){!type||this._value.relationshipTypes.includes(type)||this.setValue({...this._value,relationshipTypes:[...this._value.relationshipTypes,type]})}removeRelationshipType(type){this.captureChipRemovalFocus("relationship",type,this._value.relationshipTypes),this.setValue({...this._value,relationshipTypes:this._value.relationshipTypes.filter(t=>t!==type)})}addNodeType(type){!type||this._value.nodeTypes.includes(type)||this.setValue({...this._value,nodeTypes:[...this._value.nodeTypes,type]})}removeNodeType(type){this.captureChipRemovalFocus("node-type",type,this._value.nodeTypes),this.setValue({...this._value,nodeTypes:this._value.nodeTypes.filter(t=>t!==type)})}captureChipRemovalFocus(group,value,selected){const active=activeElementIn(this.shadowRoot),expectedPart=group==="relationship"?"relationship-chips":"node-type-chips";if(active?.localName!=="lr-chip"||active.getAttribute("value")!==value||active.closest("lr-chip-group")?.getAttribute("part")!==expectedPart)return;const index=selected.indexOf(value),survivors=selected.filter(candidate=>candidate!==value),targetValue=survivors[Math.min(Math.max(index,0),survivors.length-1)];this.pendingRemovalFocus={kind:"chip",group,targetValue},this.removalFocusGeneration++}markTouched(part){this.hasInteracted=!0,this.syncValidityCustomStates(),!this.touchedFields.has(part)&&(this.touchedFields=new Set(this.touchedFields).add(part))}runQuery(){if(this.effectiveDisabled||!this.reportValidity())return;const detail=()=>Object.freeze({query:normalizeGraphQuery(this._value)});this.emit("lr-before-query-run",detail(),{cancelable:!0}).defaultPrevented||this.emit("lr-query-run",detail())}saveQuery(){if(this.effectiveDisabled)return;const name=this.saveName.trim();if(!name)return;const detail=()=>Object.freeze({name,query:normalizeGraphQuery(this._value)});this.emit("lr-before-query-save",detail(),{cancelable:!0}).defaultPrevented||(this.saveName="",this.emit("lr-query-save",detail()))}loadQuery(item){if(this.effectiveDisabled)return;const detail=()=>Object.freeze({queryId:item.id,query:normalizeGraphQuery(item.query)});this.emit("lr-before-query-load",detail(),{cancelable:!0}).defaultPrevented||(this.setValue({...EMPTY_VALUE,...item.query}),this.emit("lr-query-load",detail()))}deleteQuery(item){if(this.effectiveDisabled)return;const detail=()=>Object.freeze({queryId:item.id});this.emit("lr-before-query-delete",detail(),{cancelable:!0}).defaultPrevented||this.emit("lr-query-delete",detail())}willUpdate(changed){if(super.willUpdate(changed),this.hasUpdated||this.captureDefaultValue(),!changed.has("savedQueries"))return;const active=activeElementIn(this.shadowRoot);if(active?.getAttribute("part")!=="saved-delete-button")return;const focusedId=active.closest("[data-query-id]")?.dataset.queryId;if(!focusedId||this.savedQueries.some(item=>item.id===focusedId))return;const index=(changed.get("savedQueries")??[]).findIndex(item=>item.id===focusedId),target=this.savedQueries[Math.min(Math.max(index,0),this.savedQueries.length-1)];this.pendingRemovalFocus={kind:"saved",targetId:target?.id},this.removalFocusGeneration++}updated(changed){super.updated(changed),this.publishValiditySnapshot(),this.syncExternalDescription();const pending=this.pendingRemovalFocus;if(!pending)return;this.pendingRemovalFocus=void 0;const generation=this.removalFocusGeneration;this.scheduleAfterUpdate(()=>{if(!(generation!==this.removalFocusGeneration||!this.isConnected)){if(pending.kind==="chip"){if(pending.targetValue){const part=pending.group==="relationship"?"relationship-chips":"node-type-chips",chip=[...this.shadowRoot?.querySelectorAll(`[part="${part}"] lr-chip`)??[]].find(candidate=>candidate.getAttribute("value")===pending.targetValue);if(chip){chip.focus();return}}const pickerPart=pending.group==="relationship"?"relationship-picker":"node-type-picker";this.shadowRoot?.querySelector(`[part="${pickerPart}"]`)?.focus();return}if(pending.targetId){const action=[...this.shadowRoot?.querySelectorAll("[data-query-id]")??[]].find(candidate=>candidate.dataset.queryId===pending.targetId)?.querySelector('[part="saved-delete-button"]');if(action){action.focus();return}}this.shadowRoot?.querySelector('[part="save-name-input"]')?.focus()}},"graph-query-removal-focus")}hopOptions(){const limit=finiteInteger(this.hopLimit,6,1,20),options=new Set(Array.from({length:limit},(_,i)=>i+1));return options.add(this._value.minHops),options.add(this._value.maxHops),[...options].sort((a,b)=>a-b)}collectChromeSlotAssignment(slot){const hasContent=slot.assignedNodes({flatten:!0}).some(node=>node.nodeType===Node.TEXT_NODE?!!node.textContent?.trim():!0);slot.name==="hint"?this.hasHintSlot=hasContent:slot.name==="error"&&(this.hasErrorSlot=hasContent)}firstUpdated(changed){super.firstUpdated(changed);const hintSlot=this.hintSlotEl,errorSlot=this.errorSlotEl;queueMicrotask(()=>{collectInitialSlotAssignment(hintSlot,s=>this.collectChromeSlotAssignment(s)),collectInitialSlotAssignment(errorSlot,s=>this.collectChromeSlotAssignment(s))})}labelForType(options,value){return options.find(o=>o.value===value)?.label??value}containSelectEvent(event){event.stopPropagation()}renderTypeFilter(kind,options,selected,add,remove,disabled){const pickerPart=kind==="relationship"?"relationship-picker":"node-type-picker",chipsPart=kind==="relationship"?"relationship-chips":"node-type-chips",pickerLabel=kind==="relationship"?this.localize("graphQueryRelationshipTypeLabel"):this.localize("graphQueryNodeTypeLabel"),available=options.filter(o=>!selected.includes(o.value));return html`
|
|
1
|
+
var __decorate=function(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)(d=decorators[i])&&(r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r);return c>3&&r&&Object.defineProperty(target,key,r),r};import{html,nothing}from"lit";import{property,query,state}from"lit/decorators.js";import{LyraElement}from"../../../internal/lyra-element.js";import{installFormControlLabelSupport}from"../../../internal/form-control-labels.js";installFormControlLabelSupport();import{closeIcon}from"../../../internal/icons.js";import{collectInitialSlotAssignment}from"../../../internal/initial-slot-collection.js";import{AnchoredValidityController,VALIDITY_ANCHOR}from"../../../internal/anchored-validity.js";import{syncValidityStates}from"../../../internal/custom-states.js";import{finiteInteger}from"../../../internal/numbers.js";import{getNumberFormat}from"../../../internal/intl-cache.js";import{nextId}from"../../../internal/a11y.js";import{activeElementIn,deepActiveElementIn}from"../../../internal/active-element.js";import{styles}from"./graph-query-builder.styles.js";import{attachInternalsSafely}from"../../../internal/element-internals.js";import{getFormOwner,installCustomErrorProperty,isBarredFromValidation,setFormOwner}from"../../../internal/form-associated.js";import{installInteractionOnInvalid,installInvalidEventAlias,withStaticValidityCheck}from"../../../internal/invalid-event-alias.js";import{acquireResolvedAriaRelationship}from"../../../internal/aria-controls.js";import{LYRA_DEFAULT_fieldRequired,LYRA_DEFAULT_graphQueryBuilderLabel,LYRA_DEFAULT_graphQueryDeleteWithContext,LYRA_DEFAULT_graphQueryDirectionLabel,LYRA_DEFAULT_graphQueryEndLabel,LYRA_DEFAULT_graphQueryHopRangeInvalid,LYRA_DEFAULT_graphQueryLoadWithContext,LYRA_DEFAULT_graphQueryMaxHopsLabel,LYRA_DEFAULT_graphQueryMinHopsLabel,LYRA_DEFAULT_graphQueryNodeTypeLabel,LYRA_DEFAULT_graphQueryRelationshipTypeLabel,LYRA_DEFAULT_graphQueryRun,LYRA_DEFAULT_graphQuerySaveButton,LYRA_DEFAULT_graphQuerySaveNameLabel,LYRA_DEFAULT_graphQuerySavedQueriesLabel,LYRA_DEFAULT_graphQueryStartLabel,LYRA_DEFAULT_neighborDirectionBoth,LYRA_DEFAULT_neighborDirectionIn,LYRA_DEFAULT_neighborDirectionOut,LYRA_DEFAULT_noData,LYRA_DEFAULT_select}from"../../../internal/default-strings.generated.js";const MAX_TYPES=500,MAX_SAVED_QUERIES=200,MAX_TEXT=256,EMPTY_STRINGS=Object.freeze([]),EMPTY_VALUE=Object.freeze({startId:"",endId:"",relationshipTypes:EMPTY_STRINGS,nodeTypes:EMPTY_STRINGS,direction:"both",minHops:1,maxHops:1}),EMPTY_OPTIONS=Object.freeze([]),EMPTY_SAVED=Object.freeze([]);function ownValue(record,key){try{const descriptor=Object.getOwnPropertyDescriptor(record,key);return descriptor&&"value"in descriptor?descriptor.value:void 0}catch{return}}function boundedString(value){return typeof value=="string"?value.slice(0,MAX_TEXT):""}function stringArray(value){return Array.isArray(value)?Object.freeze([...new Set(value.slice(0,MAX_TYPES).filter(entry=>typeof entry=="string").map(entry=>boundedString(entry)).filter(Boolean))]):EMPTY_STRINGS}function normalizeGraphQuery(value){const record=value!==null&&typeof value=="object"&&!Array.isArray(value)?value:EMPTY_VALUE,direction=ownValue(record,"direction");return Object.freeze({startId:boundedString(ownValue(record,"startId")),endId:boundedString(ownValue(record,"endId")),relationshipTypes:stringArray(ownValue(record,"relationshipTypes")),nodeTypes:stringArray(ownValue(record,"nodeTypes")),direction:direction==="out"||direction==="in"||direction==="both"?direction:"both",minHops:finiteInteger(typeof ownValue(record,"minHops")=="number"?ownValue(record,"minHops"):EMPTY_VALUE.minHops,EMPTY_VALUE.minHops,1,20),maxHops:finiteInteger(typeof ownValue(record,"maxHops")=="number"?ownValue(record,"maxHops"):EMPTY_VALUE.maxHops,EMPTY_VALUE.maxHops,1,20)})}function normalizeTypeOptions(value){if(!Array.isArray(value))return EMPTY_OPTIONS;const values=new Set,result=[];for(const candidate of value.slice(0,MAX_TYPES)){if(candidate===null||typeof candidate!="object"||Array.isArray(candidate))continue;const optionValue=boundedString(ownValue(candidate,"value"));if(optionValue.trim().length===0||values.has(optionValue))continue;values.add(optionValue);const label=boundedString(ownValue(candidate,"label"));result.push(Object.freeze({value:optionValue,...label?{label}:{}}))}return Object.freeze(result)}function normalizeSavedQueries(value){if(!Array.isArray(value))return EMPTY_SAVED;const ids=new Set,result=[];for(const candidate of value.slice(0,MAX_SAVED_QUERIES)){if(candidate===null||typeof candidate!="object"||Array.isArray(candidate))continue;const id=boundedString(ownValue(candidate,"id"));id.trim().length===0||ids.has(id)||(ids.add(id),result.push(Object.freeze({id,name:boundedString(ownValue(candidate,"name")),query:normalizeGraphQuery(ownValue(candidate,"query"))})))}return Object.freeze(result)}class LyraGraphQueryBuilder extends LyraElement{static{this.defaultStrings={...super.defaultStrings,fieldRequired:LYRA_DEFAULT_fieldRequired,graphQueryBuilderLabel:LYRA_DEFAULT_graphQueryBuilderLabel,graphQueryDeleteWithContext:LYRA_DEFAULT_graphQueryDeleteWithContext,graphQueryDirectionLabel:LYRA_DEFAULT_graphQueryDirectionLabel,graphQueryEndLabel:LYRA_DEFAULT_graphQueryEndLabel,graphQueryHopRangeInvalid:LYRA_DEFAULT_graphQueryHopRangeInvalid,graphQueryLoadWithContext:LYRA_DEFAULT_graphQueryLoadWithContext,graphQueryMaxHopsLabel:LYRA_DEFAULT_graphQueryMaxHopsLabel,graphQueryMinHopsLabel:LYRA_DEFAULT_graphQueryMinHopsLabel,graphQueryNodeTypeLabel:LYRA_DEFAULT_graphQueryNodeTypeLabel,graphQueryRelationshipTypeLabel:LYRA_DEFAULT_graphQueryRelationshipTypeLabel,graphQueryRun:LYRA_DEFAULT_graphQueryRun,graphQuerySaveButton:LYRA_DEFAULT_graphQuerySaveButton,graphQuerySaveNameLabel:LYRA_DEFAULT_graphQuerySaveNameLabel,graphQuerySavedQueriesLabel:LYRA_DEFAULT_graphQuerySavedQueriesLabel,graphQueryStartLabel:LYRA_DEFAULT_graphQueryStartLabel,neighborDirectionBoth:LYRA_DEFAULT_neighborDirectionBoth,neighborDirectionIn:LYRA_DEFAULT_neighborDirectionIn,neighborDirectionOut:LYRA_DEFAULT_neighborDirectionOut,noData:LYRA_DEFAULT_noData,select:LYRA_DEFAULT_select}}static{this.formAssociated=!0}static{this.styles=[LyraElement.styles,styles]}static{this.immutableEventDetails=Object.freeze(["lr-input","lr-query-run-request","lr-before-query-run","lr-query-run","lr-query-save-request","lr-before-query-save","lr-query-save","lr-query-load-request","lr-before-query-load","lr-query-load"])}static{this.properties={customError:{attribute:"custom-error",reflect:!0,noAccessor:!0},name:{reflect:!0,noAccessor:!0},value:{attribute:!1,noAccessor:!0},disabled:{type:Boolean,reflect:!0,noAccessor:!0}}}get relationshipTypeOptions(){return this._relationshipTypeOptions}set relationshipTypeOptions(value){const previous=this._relationshipTypeOptions;this._relationshipTypeOptions=normalizeTypeOptions(value),this.requestUpdate("relationshipTypeOptions",previous)}get nodeTypeOptions(){return this._nodeTypeOptions}set nodeTypeOptions(value){const previous=this._nodeTypeOptions;this._nodeTypeOptions=normalizeTypeOptions(value),this.requestUpdate("nodeTypeOptions",previous)}get savedQueries(){return this._savedQueries}set savedQueries(value){const previous=this._savedQueries;this._savedQueries=normalizeSavedQueries(value),this.requestUpdate("savedQueries",previous)}constructor(){super(),this._relationshipTypeOptions=EMPTY_OPTIONS,this._nodeTypeOptions=EMPTY_OPTIONS,this._savedQueries=EMPTY_SAVED,this.hopLimit=6,this.label="",this.hint="",this.errorText="",this._errors={},this.touchedFields=new Set,this.saveName="",this.hasHintSlot=!1,this.hasErrorSlot=!1,this.labelId=nextId("graph-query-builder-label"),this.hintId=nextId("graph-query-builder-hint"),this.errorId=nextId("graph-query-builder-error"),this._fieldsetDisabled=!1,this._name="",this._value=EMPTY_VALUE,this.defaultValue=normalizeGraphQuery(EMPTY_VALUE),this.defaultValueCaptured=!1,this._disabled=!1,this.hasInteracted=!1,this.removalFocusGeneration=0,this.markInteracted=()=>{this.hasInteracted||(this.hasInteracted=!0,this.syncValidityCustomStates())},this.onChromeSlotChange=event=>{this.collectChromeSlotAssignment(event.currentTarget)},this.internals=attachInternalsSafely(this),this.validityController=new AnchoredValidityController(this,this.internals,()=>this[VALIDITY_ANCHOR]()),installCustomErrorProperty(this,()=>this.validityController.customValidityMessage),installInvalidEventAlias(this,init=>this.emit("lr-invalid",null,init)),installInteractionOnInvalid(this,this.markInteracted),this.syncFormState()}connectedCallback(){super.connectedCallback(),this.hasUpdated&&this.syncExternalDescription()}disconnectedCallback(){this.removalFocusGeneration++,this.pendingRemovalFocus=void 0,this.releaseExternalDescription(),super.disconnectedCallback()}syncExternalDescription(){const target=this.isConnected?this.renderRoot.querySelector('[part="base"]')??null:null;if(!target){this.releaseExternalDescription();return}this.externalDescriptionLease?this.externalDescriptionLease.update(target):this.externalDescriptionLease=acquireResolvedAriaRelationship(this,target,"aria-describedby")}releaseExternalDescription(){this.externalDescriptionLease?.release(),this.externalDescriptionLease=void 0}get form(){return getFormOwner(this.internals)}set form(owner){setFormOwner(this,owner)}getForm(){return getFormOwner(this.internals)}get labels(){return this.internals.labels}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}get willValidate(){return this.internals.willValidate}get value(){return this._value}set value(next){const old=this._value;this._value=normalizeGraphQuery(next),this.syncFormState(),this.requestUpdate("value",old)}get name(){return this._name}set name(next){const old=this._name;this._name=next??"",this._name?this.setAttribute("name",this._name):this.removeAttribute("name"),this.requestUpdate("name",old)}get disabled(){return this._disabled}set disabled(next){const old=this._disabled;this._disabled=!!next,this.toggleAttribute("disabled",this._disabled),this.validityController&&this.syncFormState(),this.requestUpdate("disabled",old)}get effectiveDisabled(){return this.disabled||this._fieldsetDisabled}get errors(){return this.publicValidityErrors()}publicValidityErrors(){const errors={...this._errors};return this.willValidate&&this.validity.customError&&(errors.base=this.validationMessage),Object.freeze(errors)}publishValiditySnapshot(){if(!this.isConnected)return;const valid=!this.willValidate||this.validity.valid,errors=valid?Object.freeze({}):this.publicValidityErrors(),key=JSON.stringify({valid,errors});key!==this.lastValidityKey&&(this.lastValidityKey=key,this.emit("lr-validity-change",Object.freeze({valid,errors})))}[VALIDITY_ANCHOR](){const firstInvalidPart=Object.keys(this._errors)[0];if(!(!firstInvalidPart||!this.renderRoot))return this.renderRoot.querySelector(`[part="${firstInvalidPart}"]`)??void 0}computeValidation(){const errors={},flags={};return this._value.startId.trim()||(errors["start-input"]=this.localize("fieldRequired"),flags.valueMissing=!0),this._value.minHops>this._value.maxHops&&(errors["max-hops"]=this.localize("graphQueryHopRangeInvalid"),flags.rangeUnderflow=!0),{errors,flags}}syncFormState(){const{errors,flags}=this.computeValidation();this._errors=errors;let formValue=null;try{formValue=JSON.stringify(this._value)}catch{formValue=null}if(this.internals.setFormValue(formValue,formValue),this.barredFromValidation||Object.keys(flags).length===0)this.validityController.setValidity({});else{const message=Object.values(errors)[0]??"";this.validityController.setValidity(flags,message)}this.syncValidityCustomStates(),this.publishValiditySnapshot()}get barredFromValidation(){return isBarredFromValidation(this,this.internals)}syncValidityCustomStates(){syncValidityStates(this.internals,{required:!0,hasInteracted:this.hasInteracted,barred:this.barredFromValidation})}checkValidity(){return this.syncFormState(),withStaticValidityCheck(this,()=>this.internals.checkValidity())}reportValidity(){return this.hasInteracted=!0,this.syncFormState(),Object.keys(this._errors).length>0&&(this.touchedFields=new Set([...this.touchedFields,...Object.keys(this._errors)])),this.internals.reportValidity()}setCustomValidity(message){this.validityController.setCustomValidity(message??""),this.syncValidityCustomStates(),this.publishValiditySnapshot(),this.requestUpdate()}formResetCallback(){this.hasInteracted=!1,this.captureDefaultValue(),this.value=this.defaultValue,this.touchedFields=new Set,this.saveName=""}captureDefaultValue(){this.defaultValueCaptured||(this.defaultValue=normalizeGraphQuery(this._value),this.defaultValueCaptured=!0)}formStateRestoreCallback(state2,_mode){let restored=EMPTY_VALUE;if(typeof state2=="string")try{const parsed=JSON.parse(state2);parsed!==null&&typeof parsed=="object"&&!Array.isArray(parsed)&&(restored=normalizeGraphQuery(parsed))}catch{}this.value=restored}formDisabledCallback(disabled){this._fieldsetDisabled=disabled,this.syncFormState(),this.requestUpdate()}get liveDisabled(){return this.effectiveDisabled||this.matches(":disabled")}focusFirstControl(options){if(!this.renderRoot||this.liveDisabled)return;(this.renderRoot.querySelector('[part="start-input"]')||this.renderRoot.querySelector('[part="end-input"]')||this.renderRoot.querySelector('[part="min-hops"]')||this.renderRoot.querySelector('[part="max-hops"]')||this.renderRoot.querySelector('[part="direction"]')||this.renderRoot.querySelector('[part="save-name-input"]'))?.focus(options)}focus(options){this.focusFirstControl(options)}blur(){const active=deepActiveElementIn(this.shadowRoot);active&&typeof active.blur=="function"&&active.blur()}click(){this.focusFirstControl()}setValue(next){this.effectiveDisabled||(this.hasInteracted=!0,this.value=next,this.emit("lr-input",Object.freeze({value:this._value})))}addRelationshipType(type){!type||this._value.relationshipTypes.includes(type)||this.setValue({...this._value,relationshipTypes:[...this._value.relationshipTypes,type]})}removeRelationshipType(type){this.captureChipRemovalFocus("relationship",type,this._value.relationshipTypes),this.setValue({...this._value,relationshipTypes:this._value.relationshipTypes.filter(t=>t!==type)})}addNodeType(type){!type||this._value.nodeTypes.includes(type)||this.setValue({...this._value,nodeTypes:[...this._value.nodeTypes,type]})}removeNodeType(type){this.captureChipRemovalFocus("node-type",type,this._value.nodeTypes),this.setValue({...this._value,nodeTypes:this._value.nodeTypes.filter(t=>t!==type)})}captureChipRemovalFocus(group,value,selected){const active=activeElementIn(this.shadowRoot),expectedPart=group==="relationship"?"relationship-chips":"node-type-chips";if(active?.localName!=="lr-chip"||active.getAttribute("value")!==value||active.closest("lr-chip-group")?.getAttribute("part")!==expectedPart)return;const index=selected.indexOf(value),survivors=selected.filter(candidate=>candidate!==value),targetValue=survivors[Math.min(Math.max(index,0),survivors.length-1)];this.pendingRemovalFocus={kind:"chip",group,targetValue},this.removalFocusGeneration++}markTouched(part){this.hasInteracted=!0,this.syncValidityCustomStates(),!this.touchedFields.has(part)&&(this.touchedFields=new Set(this.touchedFields).add(part))}runQuery(){if(this.effectiveDisabled||!this.reportValidity())return;const detail=()=>Object.freeze({query:normalizeGraphQuery(this._value)}),request=this.emit("lr-query-run-request",detail(),{cancelable:!0}),deprecatedAlias=this.emit("lr-before-query-run",detail(),{cancelable:!0});request.defaultPrevented||deprecatedAlias.defaultPrevented||this.emit("lr-query-run",detail())}saveQuery(){if(this.effectiveDisabled)return;const name=this.saveName.trim();if(!name)return;const detail=()=>Object.freeze({name,query:normalizeGraphQuery(this._value)}),request=this.emit("lr-query-save-request",detail(),{cancelable:!0}),deprecatedAlias=this.emit("lr-before-query-save",detail(),{cancelable:!0});request.defaultPrevented||deprecatedAlias.defaultPrevented||(this.saveName="",this.emit("lr-query-save",detail()))}loadQuery(item){if(this.effectiveDisabled)return;const detail=()=>Object.freeze({queryId:item.id,query:normalizeGraphQuery(item.query)}),request=this.emit("lr-query-load-request",detail(),{cancelable:!0}),deprecatedAlias=this.emit("lr-before-query-load",detail(),{cancelable:!0});request.defaultPrevented||deprecatedAlias.defaultPrevented||(this.setValue({...EMPTY_VALUE,...item.query}),this.emit("lr-query-load",detail()))}deleteQuery(item){if(this.effectiveDisabled)return;const detail=()=>Object.freeze({queryId:item.id}),request=this.emit("lr-query-delete-request",detail(),{cancelable:!0}),deprecatedAlias=this.emit("lr-before-query-delete",detail(),{cancelable:!0});request.defaultPrevented||deprecatedAlias.defaultPrevented||this.emit("lr-query-delete",detail())}willUpdate(changed){if(super.willUpdate(changed),this.hasUpdated||this.captureDefaultValue(),!changed.has("savedQueries"))return;const active=activeElementIn(this.shadowRoot);if(active?.getAttribute("part")!=="saved-delete-button")return;const focusedId=active.closest("[data-query-id]")?.dataset.queryId;if(!focusedId||this.savedQueries.some(item=>item.id===focusedId))return;const index=(changed.get("savedQueries")??[]).findIndex(item=>item.id===focusedId),target=this.savedQueries[Math.min(Math.max(index,0),this.savedQueries.length-1)];this.pendingRemovalFocus={kind:"saved",targetId:target?.id},this.removalFocusGeneration++}updated(changed){super.updated(changed),this.publishValiditySnapshot(),this.syncExternalDescription();const pending=this.pendingRemovalFocus;if(!pending)return;this.pendingRemovalFocus=void 0;const generation=this.removalFocusGeneration;this.scheduleAfterUpdate(()=>{if(!(generation!==this.removalFocusGeneration||!this.isConnected)){if(pending.kind==="chip"){if(pending.targetValue){const part=pending.group==="relationship"?"relationship-chips":"node-type-chips",chip=[...this.shadowRoot?.querySelectorAll(`[part="${part}"] lr-chip`)??[]].find(candidate=>candidate.getAttribute("value")===pending.targetValue);if(chip){chip.focus();return}}const pickerPart=pending.group==="relationship"?"relationship-picker":"node-type-picker";this.shadowRoot?.querySelector(`[part="${pickerPart}"]`)?.focus();return}if(pending.targetId){const action=[...this.shadowRoot?.querySelectorAll("[data-query-id]")??[]].find(candidate=>candidate.dataset.queryId===pending.targetId)?.querySelector('[part="saved-delete-button"]');if(action){action.focus();return}}this.shadowRoot?.querySelector('[part="save-name-input"]')?.focus()}},"graph-query-removal-focus")}hopOptions(){const limit=finiteInteger(this.hopLimit,6,1,20),options=new Set(Array.from({length:limit},(_,i)=>i+1));return options.add(this._value.minHops),options.add(this._value.maxHops),[...options].sort((a,b)=>a-b)}collectChromeSlotAssignment(slot){const hasContent=slot.assignedNodes({flatten:!0}).some(node=>node.nodeType===Node.TEXT_NODE?!!node.textContent?.trim():!0);slot.name==="hint"?this.hasHintSlot=hasContent:slot.name==="error"&&(this.hasErrorSlot=hasContent)}firstUpdated(changed){super.firstUpdated(changed);const hintSlot=this.hintSlotEl,errorSlot=this.errorSlotEl;queueMicrotask(()=>{collectInitialSlotAssignment(hintSlot,s=>this.collectChromeSlotAssignment(s)),collectInitialSlotAssignment(errorSlot,s=>this.collectChromeSlotAssignment(s))})}labelForType(options,value){return options.find(o=>o.value===value)?.label??value}containSelectEvent(event){event.stopPropagation()}renderTypeFilter(kind,options,selected,add,remove,disabled){const pickerPart=kind==="relationship"?"relationship-picker":"node-type-picker",chipsPart=kind==="relationship"?"relationship-chips":"node-type-chips",pickerLabel=kind==="relationship"?this.localize("graphQueryRelationshipTypeLabel"):this.localize("graphQueryNodeTypeLabel"),available=options.filter(o=>!selected.includes(o.value));return html`
|
|
2
2
|
<div part="filter-group" data-kind=${kind}>
|
|
3
3
|
<lr-select
|
|
4
4
|
@lr-activate=${this.containSelectEvent}
|
|
@@ -29,7 +29,7 @@ var __decorate=function(decorators,target,key,desc){var c=arguments.length,r=c<3
|
|
|
29
29
|
aria-describedby=${describedBy||nothing}
|
|
30
30
|
aria-invalid=${this.internals.validity.valid?"false":"true"}
|
|
31
31
|
>
|
|
32
|
-
<div part="label" id=${this.labelId}>
|
|
32
|
+
<div part="form-control-label label" id=${this.labelId}>
|
|
33
33
|
<slot name="label" @slotchange=${this.onChromeSlotChange}
|
|
34
34
|
>${this.label||this.localize("graphQueryBuilderLabel")}</slot
|
|
35
35
|
>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{css}from"lit";const styles=css`:host{display:block}[part=base]{gap:var(--lr-space-l);color:var(--lr-color-text);font-size:var(--lr-font-size-sm);flex-direction:column;display:flex}[part
|
|
1
|
+
import{css}from"lit";const styles=css`:host{display:block}[part=base]{gap:var(--lr-space-l);color:var(--lr-color-text);font-size:var(--lr-font-size-sm);flex-direction:column;display:flex}[part~=label]{font-weight:var(--lr-font-weight-semibold)}[part=hint],[part=error]{font-size:var(--lr-font-size-sm);margin-block-start:calc(var(--lr-space-m) * -1)}[part=hint]{color:var(--lr-color-text-quiet)}[part=error]{color:var(--lr-color-danger)}[part=hint][hidden],[part=error][hidden]{display:none}[part=path-fields]{align-items:flex-end;gap:var(--lr-space-m);flex-wrap:wrap;display:flex}[part=path-fields]>*{flex:1 1 var(--lr-size-10rem);min-inline-size:0}[part=min-hops],[part=max-hops]{flex-basis:var(--lr-size-7rem)}[part=filter-group]{gap:var(--lr-space-xs);flex-direction:column;display:flex}[part=relationship-picker],[part=node-type-picker],[part=direction]{max-inline-size:var(--lr-size-24rem)}[part=relationship-chips],[part=node-type-chips]{min-block-size:0}[part=footer]{justify-content:flex-end;align-items:center;gap:var(--lr-space-s);flex-wrap:wrap;display:flex}[part=run-button],[part=save-button]{font:inherit;border-radius:var(--lr-radius);padding:var(--lr-space-xs) var(--lr-space-m);cursor:pointer;border:var(--lr-border-width-thin) solid;min-inline-size:var(--lr-icon-button-size);min-block-size:var(--lr-icon-button-size)}[part=run-button]{background:var(--lr-graph-query-builder-run-bg,var(--lr-color-brand));border-color:var(--lr-graph-query-builder-run-border-color,var(--lr-color-brand));color:var(--lr-graph-query-builder-run-color,var(--lr-color-on-brand));transition:background-color var(--lr-transition-fast)}[part=save-button]{background:var(--lr-graph-query-builder-save-bg,var(--lr-color-surface));border-color:var(--lr-graph-query-builder-save-border-color,var(--lr-color-border));color:var(--lr-graph-query-builder-save-color,var(--lr-color-text));transition:background-color var(--lr-transition-fast)}[part=run-button]:hover{background:var(--lr-graph-query-builder-run-hover-bg,color-mix(in oklab, var(--lr-color-brand), var(--lr-color-mix-partner) var(--lr-color-mix-hover)))}[part=run-button]:active{background:var(--lr-graph-query-builder-run-active-bg,color-mix(in oklab, var(--lr-color-brand), var(--lr-color-mix-partner) var(--lr-color-mix-active)))}[part=save-button]:hover{background:var(--lr-graph-query-builder-save-hover-bg,var(--lr-color-brand-quiet))}[part=save-button]:active{background:var(--lr-graph-query-builder-save-active-bg,color-mix(in oklab, var(--lr-color-brand-quiet), var(--lr-color-mix-partner) var(--lr-color-mix-active)))}[part=run-button]:disabled,[part=save-button]:disabled,[part=saved-load-button]:disabled,[part=saved-delete-button]:disabled{opacity:var(--lr-opacity-disabled);cursor:not-allowed}[part=run-button]:focus-visible,[part=save-button]:focus-visible,[part=saved-load-button]:focus-visible,[part=saved-delete-button]:focus-visible{outline:var(--lr-focus-ring-width) solid var(--lr-focus-ring-color);outline-offset:var(--lr-focus-ring-offset)}[part=saved-queries]{gap:var(--lr-space-s);border-block-start:var(--lr-border-width-thin) solid var(--lr-color-border);flex-direction:column;padding-block-start:var(--lr-space-m);display:flex}[part=saved-queries-label]{font-size:var(--lr-font-size-sm);font-weight:var(--lr-font-weight-semibold);color:var(--lr-color-text);margin:0}[part=save-row]{align-items:flex-end;gap:var(--lr-space-s);flex-wrap:wrap;display:flex}[part=save-row]>[part=save-name-input]{flex:1 1 var(--lr-size-12rem);min-inline-size:0}[part=saved-list]{gap:var(--lr-space-2xs);flex-direction:column;margin:0;padding:0;list-style:none;display:flex}[part=saved-item]{justify-content:space-between;align-items:center;gap:var(--lr-space-s);padding:var(--lr-space-2xs) var(--lr-space-xs);border-radius:var(--lr-radius);border:var(--lr-border-width-thin) solid var(--lr-color-border);background:var(--lr-color-surface);display:flex}[part=saved-load-button]{text-overflow:ellipsis;white-space:nowrap;text-align:start;min-inline-size:0;font:inherit;color:var(--lr-graph-query-builder-saved-load-color,var(--lr-color-text));padding:var(--lr-space-2xs);cursor:pointer;border-radius:var(--lr-radius-xs);min-block-size:var(--lr-icon-button-size);transition:background-color var(--lr-transition-fast);background:0 0;border:none;flex:auto;overflow:hidden}[part=saved-load-button]:hover{text-decoration:underline}[part=saved-load-button]:active{background:var(--lr-graph-query-builder-saved-load-active-bg,color-mix(in oklab, var(--lr-color-surface), var(--lr-color-mix-partner) var(--lr-color-mix-active)));text-decoration:underline}[part=saved-delete-button]{font:inherit;inline-size:var(--lr-space-2xl);block-size:var(--lr-space-2xl);min-inline-size:var(--lr-icon-button-size);min-block-size:var(--lr-icon-button-size);color:var(--lr-graph-query-builder-saved-delete-color,var(--lr-color-text-quiet));border-radius:var(--lr-radius-xs);cursor:pointer;transition:background-color var(--lr-transition-fast), color var(--lr-transition-fast);background:0 0;border:none;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}[part=saved-delete-button] svg{inline-size:var(--lr-size-1em);block-size:var(--lr-size-1em)}[part=saved-delete-button]:hover{color:var(--lr-graph-query-builder-saved-delete-hover-color,var(--lr-color-danger))}[part=saved-delete-button]:active{color:var(--lr-graph-query-builder-saved-delete-active-color,color-mix(in oklab, var(--lr-color-danger), var(--lr-color-mix-partner) var(--lr-color-mix-active)));background:var(--lr-graph-query-builder-saved-delete-active-bg,var(--lr-color-danger-quiet))}[part=saved-empty]{color:var(--lr-color-text-quiet);margin:0}`;export{styles};
|
|
@@ -129,8 +129,10 @@ export declare function normalizeBucketCount(bucketCount:number):number;
|
|
|
129
129
|
export declare function resolveRgb(color:string,fallbackHex:string,ownerDocument?:Document):[number,number,number,number];export type LyraHeatmapCellClickDetail={date:string;value:number;}|{row:number;col:number;value:number;};export type LyraHeatmapMatrixGeometryChangeDetail={padLeft:number;padTop:number;cellSize:number;
|
|
130
130
|
/** Custom painted bounds; omitted for the default one-pixel separators and square corners. */
|
|
131
131
|
cellWidth?:number;cellHeight?:number;cellRadius?:number;};export interface LyraHeatmapEventMap{'lr-cell-click':CustomEvent<LyraHeatmapCellClickDetail>;'lr-matrix-geometry-change':CustomEvent<LyraHeatmapMatrixGeometryChangeDetail>;'lr-selection-change':CustomEvent<HeatmapSelectionChangeDetail>;}
|
|
132
|
-
/** The
|
|
133
|
-
|
|
132
|
+
/** The snapshot format returned by `LyraHeatmap.exportData()`: `'png'` for the raster canvas
|
|
133
|
+
* snapshot, `'csv'` for the underlying matrix/calendar values, matching every other
|
|
134
|
+
* visualization sibling's `exportData(format)` shape. */
|
|
135
|
+
export type LyraHeatmapExportFormat='csv'|'png';
|
|
134
136
|
/**
|
|
135
137
|
* `<lr-heatmap>` — a Canvas heatmap with a DPR-aware, resize-aware redraw
|
|
136
138
|
* loop. Its discriminated `data` property selects one of two projections:
|
|
@@ -427,14 +429,27 @@ private resolvedRowLabelWidth;private get matrixPadLeft();
|
|
|
427
429
|
* construction rather than by coincidence.
|
|
428
430
|
*/
|
|
429
431
|
get matrixGeometry():Readonly<LyraHeatmapMatrixGeometryChangeDetail> |undefined;
|
|
432
|
+
/** Intentionally inert -- `matrixGeometry` always mirrors the last matrix draw's own painted
|
|
433
|
+
* geometry. A getter with no setter throws (in strict-mode module code, which every consumer
|
|
434
|
+
* runs) the moment anything assigns to it, including a stray `.matrixGeometry=${x}` template
|
|
435
|
+
* binding; this no-op keeps that assignment harmless instead of throwing from inside framework
|
|
436
|
+
* internals. */
|
|
437
|
+
set matrixGeometry(_value:Readonly<LyraHeatmapMatrixGeometryChangeDetail> |undefined);
|
|
430
438
|
/**
|
|
431
|
-
* Returns a
|
|
432
|
-
*
|
|
433
|
-
*
|
|
434
|
-
*
|
|
435
|
-
*
|
|
439
|
+
* Returns a spreadsheet-safe CSV snapshot (`format: 'csv'`) of the underlying matrix/calendar
|
|
440
|
+
* values, or a PNG data URL (`format: 'png'`) for the most recently completed canvas paint. The
|
|
441
|
+
* PNG snapshot includes the painted axes, cells, and canvas overlays, plus frozen label bands
|
|
442
|
+
* when `stickyLabels` is in use; DOM-only legend, tooltip, and accessible-cell overlays are
|
|
443
|
+
* intentionally omitted. An empty PNG string means the component has not completed a paint yet,
|
|
444
|
+
* its canvas has no dimensions, it is waiting for deferred visibility, or the browser could not
|
|
445
|
+
* encode the snapshot. The CSV snapshot reads `data` directly (unbounded by the render cap) and
|
|
446
|
+
* omits no-data cells (the `-1`/non-finite sentinel `isNoData()` already honors for painting),
|
|
447
|
+
* the same way the canvas draw path skips them.
|
|
436
448
|
*/
|
|
437
449
|
exportData(format:LyraHeatmapExportFormat):string;
|
|
450
|
+
/** `exportData('csv')`'s worker: one header row plus one data row per real (non-no-data) cell,
|
|
451
|
+
* reading `data` directly rather than any bounded render cache. */
|
|
452
|
+
private exportCsv;
|
|
438
453
|
/** The geometry the last `drawMatrix()` pass painted with, frozen and shared with the
|
|
439
454
|
* `lr-matrix-geometry-change` detail. `undefined` until the first draw, which is what gates
|
|
440
455
|
* `matrixGeometry` returning a real value only once there is a draw to describe. Also backs the
|
|
@@ -791,7 +806,10 @@ private hoverCell;
|
|
|
791
806
|
* canvas-drawn focus ring, aria-hidden mirror, and light-DOM announcement. */
|
|
792
807
|
private focusedCell;
|
|
793
808
|
/** Text mirrored in `[part="live-region"]`, refreshed on every focus move. */
|
|
794
|
-
private liveText;private accessibleTargetSizePx;private pendingAccessibleFocus;private pendingAccessibleFocusOrigin;private restoringAccessibleFocus;private accessibleFocusGeneration;private announcementSink?;private authorRole;private authorAriaLabel;private generatedAriaLabel;private syncingGeneratedSemantics;
|
|
809
|
+
private liveText;private accessibleTargetSizePx;private pendingAccessibleFocus;private pendingAccessibleFocusOrigin;private restoringAccessibleFocus;private accessibleFocusGeneration;private announcementSink?;private authorRole;private authorAriaLabel;private generatedAriaLabel;private syncingGeneratedSemantics;
|
|
810
|
+
/** Whether a host `aria-describedby` was last reflected onto the active role owner -- see
|
|
811
|
+
* `checkbox.class.ts`'s identically-named field for why the sync call must stay guarded. */
|
|
812
|
+
private hasSyncedDescribedByElements;attributeChangedCallback(name:string,oldValue:string|null,value:string|null):void;connectedCallback():void;disconnectedCallback():void;private releaseAnnouncementSink;private syncAnnouncementSink;private watchDpr;private clearDprWatcher;private onDprChange;protected willUpdate(changed:PropertyValues):void;private rebuildBoundedDecorations;private get projectionTruncated();private get cellProjectionTruncated();private projectedCellCount;private projectionDescription;
|
|
795
813
|
/** Snapshots one bounded rectangular matrix projection. Invisible ragged outliers never reach
|
|
796
814
|
* scale/rank/count semantics, and later caller mutation cannot split paint from accessibility. */
|
|
797
815
|
private rebuildCanonicalMatrixData;
|
|
@@ -807,7 +825,7 @@ private selectedCellDescription;
|
|
|
807
825
|
* cycle against the same `values`/`days`, so a single scan per cycle
|
|
808
826
|
* suffices instead of one per consumer.
|
|
809
827
|
*/
|
|
810
|
-
private computeValueRange;private localizedValueLabel;private formatNumericValue;protected updated(changed:PropertyValues):void;
|
|
828
|
+
private computeValueRange;private localizedValueLabel;private formatNumericValue;private syncExternalDescription;protected updated(changed:PropertyValues):void;
|
|
811
829
|
/** Redraws canvas content after an upstream token or theme change. */
|
|
812
830
|
refreshTheme():void;private refreshAccessibleTargetSize;
|
|
813
831
|
/** Reads the customizable ramp endpoints off the host's computed style. */
|