udp-react-enterprise-component-library 26.7.0 → 26.8.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -1
- package/dist/UI/fluent-web-components/UdpAccordion.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpAccordion.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpAccordion.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpAccordion.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpAutocomplete.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpAutocomplete.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpAutocomplete.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpAutocomplete.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpAvatar.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpAvatar.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpAvatar.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpAvatar.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpBadge.d.ts +4 -1
- package/dist/UI/fluent-web-components/UdpBadge.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpBadge.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpBadge.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpButton.d.ts +4 -1
- package/dist/UI/fluent-web-components/UdpButton.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpButton.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpButton.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpCard.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpCard.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpCard.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpCard.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpCheckbox.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpCheckbox.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpCheckbox.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpCheckbox.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpChip.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpChip.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpChip.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpChip.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpCompoundButton.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpCompoundButton.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpCompoundButton.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpCompoundButton.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpContainerQuery.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpContainerQuery.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpContainerQuery.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpContainerQuery.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpContainerQueryGrid.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpContainerQueryGrid.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpContainerQueryGrid.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpContainerQueryGrid.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpCounterBadge.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpCounterBadge.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpCounterBadge.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpCounterBadge.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpDateInput.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpDateInput.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpDateInput.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpDateInput.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpDatePicker.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpDatePicker.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpDatePicker.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpDatePicker.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpDateTimeInput.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpDateTimeInput.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpDateTimeInput.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpDateTimeInput.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpDialog.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpDialog.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpDialog.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpDialog.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpDivider.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpDivider.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpDivider.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpDivider.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpDrawer.d.ts +9 -1
- package/dist/UI/fluent-web-components/UdpDrawer.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpDrawer.js +14 -2
- package/dist/UI/fluent-web-components/UdpDrawer.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpDrawer.mjs +33 -22
- package/dist/UI/fluent-web-components/UdpDrawer.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpDropdown.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpDropdown.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpDropdown.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpDropdown.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpDurationInput.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpDurationInput.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpDurationInput.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpDurationInput.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpEmptyState.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpEmptyState.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpEmptyState.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpEmptyState.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpFileInput.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpFileInput.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpFileInput.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpFileInput.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpFlexbox.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpFlexbox.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpFlexbox.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpFlexbox.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpIcon.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpIcon.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpIcon.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpIcon.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpIconButton.d.ts +4 -1
- package/dist/UI/fluent-web-components/UdpIconButton.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpIconButton.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpIconButton.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpIconGrid.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpIconGrid.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpIconGrid.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpIconGrid.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpImage.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpImage.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpImage.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpImage.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpInlineEdit.d.ts +17 -0
- package/dist/UI/fluent-web-components/UdpInlineEdit.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpInlineEdit.js +17 -0
- package/dist/UI/fluent-web-components/UdpInlineEdit.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpInlineEdit.mjs +30 -0
- package/dist/UI/fluent-web-components/UdpInlineEdit.mjs.map +1 -0
- package/dist/UI/fluent-web-components/UdpLink.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpLink.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpLink.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpLink.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpList.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpList.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpList.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpList.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpListItem.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpListItem.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpListItem.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpListItem.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpLocationInput.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpLocationInput.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpLocationInput.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpLocationInput.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpMenu.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpMenu.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpMenu.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpMenu.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpMessageBar.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpMessageBar.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpMessageBar.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpMessageBar.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpNumberInput.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpNumberInput.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpNumberInput.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpNumberInput.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpPopover.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpPopover.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpPopover.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpPopover.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpPrimaryActionHeader.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpPrimaryActionHeader.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpPrimaryActionHeader.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpPrimaryActionHeader.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpProgressBar.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpProgressBar.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpProgressBar.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpProgressBar.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpRadioGroup.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpRadioGroup.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpRadioGroup.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpRadioGroup.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpSearchInput.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpSearchInput.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpSearchInput.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpSearchInput.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpSidebarLayout.d.ts +9 -0
- package/dist/UI/fluent-web-components/UdpSidebarLayout.d.ts.map +1 -0
- package/dist/UI/fluent-web-components/UdpSidebarLayout.js +6 -0
- package/dist/UI/fluent-web-components/UdpSidebarLayout.js.map +1 -0
- package/dist/UI/fluent-web-components/UdpSidebarLayout.mjs +18 -0
- package/dist/UI/fluent-web-components/UdpSidebarLayout.mjs.map +1 -0
- package/dist/UI/fluent-web-components/UdpSignatureInput.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpSignatureInput.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpSignatureInput.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpSignatureInput.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpSkeletonLoading.d.ts +8 -0
- package/dist/UI/fluent-web-components/UdpSkeletonLoading.d.ts.map +1 -0
- package/dist/UI/fluent-web-components/UdpSkeletonLoading.js +6 -0
- package/dist/UI/fluent-web-components/UdpSkeletonLoading.js.map +1 -0
- package/dist/UI/fluent-web-components/UdpSkeletonLoading.mjs +18 -0
- package/dist/UI/fluent-web-components/UdpSkeletonLoading.mjs.map +1 -0
- package/dist/UI/fluent-web-components/UdpSlider.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpSlider.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpSlider.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpSlider.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpSpinner.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpSpinner.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpSpinner.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpSpinner.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpSwatchPicker.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpSwatchPicker.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpSwatchPicker.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpSwatchPicker.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpSwitch.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpSwitch.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpSwitch.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpSwitch.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpTablist.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpTablist.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpTablist.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpTablist.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpText.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpText.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpText.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpText.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpTextInput.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpTextInput.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpTextInput.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpTextInput.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpTextarea.d.ts +4 -1
- package/dist/UI/fluent-web-components/UdpTextarea.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpTextarea.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpTextarea.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpTimeInput.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpTimeInput.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpTimeInput.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpTimeInput.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpToggleButton.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpToggleButton.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpToggleButton.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpToggleButton.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpTooltip.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpTooltip.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpTooltip.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpTooltip.mjs.map +1 -1
- package/dist/UI/fluent-web-components/UdpVerticalSpacer.d.ts +2 -1
- package/dist/UI/fluent-web-components/UdpVerticalSpacer.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/UdpVerticalSpacer.js.map +1 -1
- package/dist/UI/fluent-web-components/UdpVerticalSpacer.mjs.map +1 -1
- package/dist/UI/fluent-web-components/index.d.ts +4 -0
- package/dist/UI/fluent-web-components/index.d.ts.map +1 -1
- package/dist/UI/fluent-web-components/index.js +4 -0
- package/dist/UI/fluent-web-components/index.js.map +1 -1
- package/dist/UI/fluent-web-components/types.d.ts +26 -0
- package/dist/UI/fluent-web-components/types.d.ts.map +1 -0
- package/dist/UI/fluent-web-components/types.js +2 -0
- package/dist/UI/fluent-web-components/types.js.map +1 -0
- package/dist/UI/utilityDisplay/utilities/aggregateUtils.d.ts +8 -0
- package/dist/UI/utilityDisplay/utilities/aggregateUtils.d.ts.map +1 -1
- package/dist/UI/utilityDisplay/utilities/aggregateUtils.js +22 -0
- package/dist/UI/utilityDisplay/utilities/aggregateUtils.js.map +1 -1
- package/dist/UI/utilityDisplay/utilities/aggregateUtils.mjs.map +1 -1
- package/dist/actions/ActionSplitScreen.d.ts.map +1 -1
- package/dist/actions/ActionSplitScreen.js +2 -2
- package/dist/actions/ActionSplitScreen.js.map +1 -1
- package/dist/actions/ActionSplitScreen.mjs +155 -149
- package/dist/actions/ActionSplitScreen.mjs.map +1 -1
- package/dist/aiAssistant/AiMessageText.d.ts +5 -0
- package/dist/aiAssistant/AiMessageText.d.ts.map +1 -0
- package/dist/aiAssistant/AiMessageText.js +33 -0
- package/dist/aiAssistant/AiMessageText.js.map +1 -0
- package/dist/aiAssistant/AiMessageText.mjs +59 -0
- package/dist/aiAssistant/AiMessageText.mjs.map +1 -0
- package/dist/aiAssistant/AiMessageText.module.css +35 -0
- package/dist/aiAssistant/AiProposalCard.d.ts +18 -0
- package/dist/aiAssistant/AiProposalCard.d.ts.map +1 -0
- package/dist/aiAssistant/AiProposalCard.js +14 -0
- package/dist/aiAssistant/AiProposalCard.js.map +1 -0
- package/dist/aiAssistant/AiProposalCard.mjs +116 -0
- package/dist/aiAssistant/AiProposalCard.mjs.map +1 -0
- package/dist/aiAssistant/AiProposalCard.module.css +49 -0
- package/dist/aiAssistant/AssistantChat.d.ts +72 -0
- package/dist/aiAssistant/AssistantChat.d.ts.map +1 -0
- package/dist/aiAssistant/AssistantChat.js +195 -0
- package/dist/aiAssistant/AssistantChat.js.map +1 -0
- package/dist/aiAssistant/AssistantChat.mjs +514 -0
- package/dist/aiAssistant/AssistantChat.mjs.map +1 -0
- package/dist/aiAssistant/AssistantChat.module.css +120 -0
- package/dist/aiAssistant/UdpAiAssistant.d.ts +21 -0
- package/dist/aiAssistant/UdpAiAssistant.d.ts.map +1 -0
- package/dist/aiAssistant/UdpAiAssistant.js +49 -0
- package/dist/aiAssistant/UdpAiAssistant.js.map +1 -0
- package/dist/aiAssistant/UdpAiAssistant.mjs +108 -0
- package/dist/aiAssistant/UdpAiAssistant.mjs.map +1 -0
- package/dist/aiAssistant/UdpAiAssistant.module.css +8 -0
- package/dist/aiAssistant/askClarification.d.ts +5 -0
- package/dist/aiAssistant/askClarification.d.ts.map +1 -0
- package/dist/aiAssistant/askClarification.js +21 -0
- package/dist/aiAssistant/askClarification.js.map +1 -0
- package/dist/aiAssistant/askClarification.mjs +23 -0
- package/dist/aiAssistant/askClarification.mjs.map +1 -0
- package/dist/aiAssistant/conversation.d.ts +74 -0
- package/dist/aiAssistant/conversation.d.ts.map +1 -0
- package/dist/aiAssistant/conversation.js +75 -0
- package/dist/aiAssistant/conversation.js.map +1 -0
- package/dist/aiAssistant/conversation.mjs +72 -0
- package/dist/aiAssistant/conversation.mjs.map +1 -0
- package/dist/aiAssistant/conversationState.d.ts +74 -0
- package/dist/aiAssistant/conversationState.d.ts.map +1 -0
- package/dist/aiAssistant/conversationState.js +136 -0
- package/dist/aiAssistant/conversationState.js.map +1 -0
- package/dist/aiAssistant/conversationState.mjs +147 -0
- package/dist/aiAssistant/conversationState.mjs.map +1 -0
- package/dist/aiAssistant/engine.d.ts +62 -0
- package/dist/aiAssistant/engine.d.ts.map +1 -0
- package/dist/aiAssistant/engine.js +269 -0
- package/dist/aiAssistant/engine.js.map +1 -0
- package/dist/aiAssistant/engine.mjs +290 -0
- package/dist/aiAssistant/engine.mjs.map +1 -0
- package/dist/aiAssistant/index.d.ts +13 -0
- package/dist/aiAssistant/index.d.ts.map +1 -0
- package/dist/aiAssistant/index.js +13 -0
- package/dist/aiAssistant/index.js.map +1 -0
- package/dist/aiAssistant/openai.d.ts +90 -0
- package/dist/aiAssistant/openai.d.ts.map +1 -0
- package/dist/aiAssistant/openai.js +181 -0
- package/dist/aiAssistant/openai.js.map +1 -0
- package/dist/aiAssistant/openai.mjs +167 -0
- package/dist/aiAssistant/openai.mjs.map +1 -0
- package/dist/aiAssistant/provider/UdpAiProvider.d.ts +43 -0
- package/dist/aiAssistant/provider/UdpAiProvider.d.ts.map +1 -0
- package/dist/aiAssistant/provider/UdpAiProvider.js +65 -0
- package/dist/aiAssistant/provider/UdpAiProvider.js.map +1 -0
- package/dist/aiAssistant/provider/UdpAiProvider.mjs +66 -0
- package/dist/aiAssistant/provider/UdpAiProvider.mjs.map +1 -0
- package/dist/aiAssistant/provider/index.d.ts +3 -0
- package/dist/aiAssistant/provider/index.d.ts.map +1 -0
- package/dist/aiAssistant/provider/index.js +3 -0
- package/dist/aiAssistant/provider/index.js.map +1 -0
- package/dist/aiAssistant/types.d.ts +157 -0
- package/dist/aiAssistant/types.d.ts.map +1 -0
- package/dist/aiAssistant/types.js +2 -0
- package/dist/aiAssistant/types.js.map +1 -0
- package/dist/aiAssistant/useAiAssistant.d.ts +20 -0
- package/dist/aiAssistant/useAiAssistant.d.ts.map +1 -0
- package/dist/aiAssistant/useAiAssistant.js +26 -0
- package/dist/aiAssistant/useAiAssistant.js.map +1 -0
- package/dist/aiAssistant/useAiAssistant.mjs +98 -0
- package/dist/aiAssistant/useAiAssistant.mjs.map +1 -0
- package/dist/aiAssistant/useConversation.d.ts +17 -0
- package/dist/aiAssistant/useConversation.d.ts.map +1 -0
- package/dist/aiAssistant/useConversation.js +29 -0
- package/dist/aiAssistant/useConversation.js.map +1 -0
- package/dist/aiAssistant/useConversation.mjs +52 -0
- package/dist/aiAssistant/useConversation.mjs.map +1 -0
- package/dist/chatBot/ChatContainer.d.ts +4 -0
- package/dist/chatBot/ChatContainer.d.ts.map +1 -1
- package/dist/chatBot/ChatContainer.js +8 -0
- package/dist/chatBot/ChatContainer.js.map +1 -1
- package/dist/chatBot/ChatContainer.mjs +7 -0
- package/dist/chatBot/ChatContainer.mjs.map +1 -1
- package/dist/chatBot/ChatMessage.d.ts +4 -0
- package/dist/chatBot/ChatMessage.d.ts.map +1 -1
- package/dist/chatBot/ChatMessage.js +8 -0
- package/dist/chatBot/ChatMessage.js.map +1 -1
- package/dist/chatBot/ChatMessage.mjs +60 -47
- package/dist/chatBot/ChatMessage.mjs.map +1 -1
- package/dist/componentSystems/pageRenderer/hooks/useReadMetaData.d.ts +1 -1
- package/dist/domain/entityForm/entityFormModel.d.ts +41 -0
- package/dist/domain/entityForm/entityFormModel.d.ts.map +1 -0
- package/dist/domain/entityForm/entityFormModel.js +31 -0
- package/dist/domain/entityForm/entityFormModel.js.map +1 -0
- package/dist/domain/entityForm/entityFormModel.mjs +34 -0
- package/dist/domain/entityForm/entityFormModel.mjs.map +1 -0
- package/dist/hooks/crudActions.d.ts.map +1 -1
- package/dist/hooks/crudActions.js +2 -6
- package/dist/hooks/crudActions.js.map +1 -1
- package/dist/hooks/crudActions.mjs +2 -8
- package/dist/hooks/crudActions.mjs.map +1 -1
- package/dist/hooks/crudForeignKeyData.d.ts.map +1 -1
- package/dist/hooks/crudForeignKeyData.js +2 -7
- package/dist/hooks/crudForeignKeyData.js.map +1 -1
- package/dist/hooks/crudForeignKeyData.mjs +4 -9
- package/dist/hooks/crudForeignKeyData.mjs.map +1 -1
- package/dist/hooks/usePromotedLookupMethods.d.ts.map +1 -1
- package/dist/hooks/usePromotedLookupMethods.js +4 -1
- package/dist/hooks/usePromotedLookupMethods.js.map +1 -1
- package/dist/hooks/usePromotedLookupMethods.mjs +3 -1
- package/dist/hooks/usePromotedLookupMethods.mjs.map +1 -1
- package/dist/hooks/usePromotedMethodEntities.d.ts.map +1 -1
- package/dist/hooks/usePromotedMethodEntities.js +5 -1
- package/dist/hooks/usePromotedMethodEntities.js.map +1 -1
- package/dist/hooks/usePromotedMethodEntities.mjs +3 -1
- package/dist/hooks/usePromotedMethodEntities.mjs.map +1 -1
- package/dist/hooks/usePromotedMethodEntity.js +1 -1
- package/dist/hooks/usePromotedMethodEntity.js.map +1 -1
- package/dist/hooks/usePromotedMethodEntity.mjs +1 -1
- package/dist/hooks/usePromotedMethodEntity.mjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -3
- package/dist/maintenanceEngine/crudBrowser/CrudTableSidePanel.d.ts.map +1 -1
- package/dist/maintenanceEngine/crudBrowser/CrudTableSidePanel.js +2 -9
- package/dist/maintenanceEngine/crudBrowser/CrudTableSidePanel.js.map +1 -1
- package/dist/maintenanceEngine/crudBrowser/CrudTableSidePanel.mjs +69 -90
- package/dist/maintenanceEngine/crudBrowser/CrudTableSidePanel.mjs.map +1 -1
- package/dist/maintenanceEngine/entityFormInputs.d.ts +39 -0
- package/dist/maintenanceEngine/entityFormInputs.d.ts.map +1 -0
- package/dist/maintenanceEngine/entityFormInputs.js +174 -0
- package/dist/maintenanceEngine/entityFormInputs.js.map +1 -0
- package/dist/maintenanceEngine/entityFormInputs.mjs +133 -0
- package/dist/maintenanceEngine/entityFormInputs.mjs.map +1 -0
- package/dist/maintenanceEngine/tableBrowser/TableColumnDefs.d.ts +1 -1
- package/dist/maintenanceEngine/tableBrowser/TableColumnDefs.d.ts.map +1 -1
- package/dist/maintenanceEngine/virtualBrowser/VirtualBrowser.js +2 -2
- package/dist/maintenanceEngine/virtualBrowser/VirtualBrowser.js.map +1 -1
- package/dist/maintenanceEngine/virtualBrowser/VirtualBrowser.mjs +2 -2
- package/dist/maintenanceEngine/virtualBrowser/VirtualBrowser.mjs.map +1 -1
- package/dist/notes/NotesScreen.d.ts.map +1 -1
- package/dist/notes/NotesScreen.js +8 -2
- package/dist/notes/NotesScreen.js.map +1 -1
- package/dist/notes/NotesScreen.mjs +5 -1
- package/dist/notes/NotesScreen.mjs.map +1 -1
- package/dist/providers/UdpAiAppSurface.d.ts +19 -0
- package/dist/providers/UdpAiAppSurface.d.ts.map +1 -0
- package/dist/providers/UdpAiAppSurface.js +39 -0
- package/dist/providers/UdpAiAppSurface.js.map +1 -0
- package/dist/providers/UdpAiAppSurface.mjs +56 -0
- package/dist/providers/UdpAiAppSurface.mjs.map +1 -0
- package/dist/providers/UdpAppProvider.d.ts +20 -0
- package/dist/providers/UdpAppProvider.d.ts.map +1 -1
- package/dist/providers/UdpAppProvider.js +6 -2
- package/dist/providers/UdpAppProvider.js.map +1 -1
- package/dist/providers/UdpAppProvider.mjs +30 -21
- package/dist/providers/UdpAppProvider.mjs.map +1 -1
- package/dist/reminders/RemindersScreen.d.ts.map +1 -1
- package/dist/reminders/RemindersScreen.js +8 -2
- package/dist/reminders/RemindersScreen.js.map +1 -1
- package/dist/reminders/RemindersScreen.mjs +5 -1
- package/dist/reminders/RemindersScreen.mjs.map +1 -1
- package/dist/routes/UdpRoutes.d.ts.map +1 -1
- package/dist/routes/UdpRoutes.js.map +1 -1
- package/dist/routes/UdpRoutes.mjs.map +1 -1
- package/dist/searchIntent/compile.d.ts +9 -0
- package/dist/searchIntent/compile.d.ts.map +1 -0
- package/dist/searchIntent/compile.js +127 -0
- package/dist/searchIntent/compile.js.map +1 -0
- package/dist/searchIntent/compile.mjs +120 -0
- package/dist/searchIntent/compile.mjs.map +1 -0
- package/dist/searchIntent/diff.d.ts +10 -0
- package/dist/searchIntent/diff.d.ts.map +1 -0
- package/dist/searchIntent/diff.js +90 -0
- package/dist/searchIntent/diff.js.map +1 -0
- package/dist/searchIntent/diff.mjs +88 -0
- package/dist/searchIntent/diff.mjs.map +1 -0
- package/dist/searchIntent/index.d.ts +13 -0
- package/dist/searchIntent/index.d.ts.map +1 -0
- package/dist/searchIntent/index.js +13 -0
- package/dist/searchIntent/index.js.map +1 -0
- package/dist/searchIntent/operators.d.ts +28 -0
- package/dist/searchIntent/operators.d.ts.map +1 -0
- package/dist/searchIntent/operators.js +184 -0
- package/dist/searchIntent/operators.js.map +1 -0
- package/dist/searchIntent/operators.mjs +164 -0
- package/dist/searchIntent/operators.mjs.map +1 -0
- package/dist/searchIntent/prompt.d.ts +36 -0
- package/dist/searchIntent/prompt.d.ts.map +1 -0
- package/dist/searchIntent/prompt.js +152 -0
- package/dist/searchIntent/prompt.js.map +1 -0
- package/dist/searchIntent/prompt.mjs +116 -0
- package/dist/searchIntent/prompt.mjs.map +1 -0
- package/dist/searchIntent/tools.d.ts +19 -0
- package/dist/searchIntent/tools.d.ts.map +1 -0
- package/dist/searchIntent/tools.js +189 -0
- package/dist/searchIntent/tools.js.map +1 -0
- package/dist/searchIntent/tools.mjs +209 -0
- package/dist/searchIntent/tools.mjs.map +1 -0
- package/dist/searchIntent/types.d.ts +95 -0
- package/dist/searchIntent/types.d.ts.map +1 -0
- package/dist/searchIntent/types.js +2 -0
- package/dist/searchIntent/types.js.map +1 -0
- package/dist/searchIntent/validate.d.ts +19 -0
- package/dist/searchIntent/validate.d.ts.map +1 -0
- package/dist/searchIntent/validate.js +136 -0
- package/dist/searchIntent/validate.js.map +1 -0
- package/dist/searchIntent/validate.mjs +103 -0
- package/dist/searchIntent/validate.mjs.map +1 -0
- package/dist/stores/inquiryStore.d.ts +2 -2
- package/dist/stores/inquiryStore.d.ts.map +1 -1
- package/dist/stores/inquiryStore.mjs.map +1 -1
- package/dist/udp/export/MyExportsPage.js +1 -1
- package/dist/udp/export/MyExportsPage.js.map +1 -1
- package/dist/udp/export/MyExportsPage.mjs +1 -1
- package/dist/udp/export/MyExportsPage.mjs.map +1 -1
- package/dist/udp/pages/UdpDataBrowserPage/UdpDataBrowserPage.js +4 -4
- package/dist/udp/pages/UdpDataBrowserPage/UdpDataBrowserPage.js.map +1 -1
- package/dist/udp/pages/UdpDataBrowserPage/UdpDataBrowserPage.mjs +4 -4
- package/dist/udp/pages/UdpDataBrowserPage/UdpDataBrowserPage.mjs.map +1 -1
- package/dist/udp/pages/UdpMaintenanceConfigPage/UdpMaintenanceConfigPage.js +1 -1
- package/dist/udp/pages/UdpMaintenanceConfigPage/UdpMaintenanceConfigPage.js.map +1 -1
- package/dist/udp/pages/UdpMaintenanceConfigPage/UdpMaintenanceConfigPage.mjs +1 -1
- package/dist/udp/pages/UdpMaintenanceConfigPage/UdpMaintenanceConfigPage.mjs.map +1 -1
- package/dist/udp/pages/UdpMaintenanceEnginePage/UdpMaintenanceEnginePage.d.ts.map +1 -1
- package/dist/udp/pages/UdpMaintenanceEnginePage/UdpMaintenanceEnginePage.js +38 -206
- package/dist/udp/pages/UdpMaintenanceEnginePage/UdpMaintenanceEnginePage.js.map +1 -1
- package/dist/udp/pages/UdpMaintenanceEnginePage/UdpMaintenanceEnginePage.mjs +63 -172
- package/dist/udp/pages/UdpMaintenanceEnginePage/UdpMaintenanceEnginePage.mjs.map +1 -1
- package/dist/udp/tags/useTags.d.ts +13 -1
- package/dist/udp/tags/useTags.d.ts.map +1 -1
- package/dist/udp/tags/useTags.js +16 -6
- package/dist/udp/tags/useTags.js.map +1 -1
- package/dist/udp/tags/useTags.mjs +41 -35
- package/dist/udp/tags/useTags.mjs.map +1 -1
- package/dist/udp/utilities/useDateStringColumnDef.d.ts +1 -1
- package/dist/utilities/configRequestDedupe.d.ts +31 -0
- package/dist/utilities/configRequestDedupe.d.ts.map +1 -0
- package/dist/utilities/configRequestDedupe.js +106 -0
- package/dist/utilities/configRequestDedupe.js.map +1 -0
- package/dist/utilities/configRequestDedupe.mjs +90 -0
- package/dist/utilities/configRequestDedupe.mjs.map +1 -0
- package/dist/utilities/crud/useDefaultFormValues.d.ts.map +1 -1
- package/dist/utilities/crud/useDefaultFormValues.js +14 -9
- package/dist/utilities/crud/useDefaultFormValues.js.map +1 -1
- package/dist/utilities/crud/useDefaultFormValues.mjs +23 -5
- package/dist/utilities/crud/useDefaultFormValues.mjs.map +1 -1
- package/dist/utilities/entities/entityUtilities.d.ts +9 -0
- package/dist/utilities/entities/entityUtilities.d.ts.map +1 -1
- package/dist/utilities/entities/entityUtilities.js +12 -1
- package/dist/utilities/entities/entityUtilities.js.map +1 -1
- package/dist/utilities/entities/entityUtilities.mjs +15 -2
- package/dist/utilities/entities/entityUtilities.mjs.map +1 -1
- package/dist/utilities/i18n/locales/es-US.json +104 -1
- package/dist/utilities/i18n/locales/es-US.mjs +98 -1
- package/dist/utilities/i18n/locales/fr-CA.json +104 -1
- package/dist/utilities/i18n/locales/fr-CA.mjs +98 -1
- package/dist/utilities/iconLibrary/SelectedLibraryItem.d.ts.map +1 -1
- package/dist/utilities/iconLibrary/SelectedLibraryItem.js +0 -1
- package/dist/utilities/iconLibrary/SelectedLibraryItem.js.map +1 -1
- package/dist/utilities/iconLibrary/SelectedLibraryItem.mjs.map +1 -1
- package/dist/utilities/provider/ActionProvider.d.ts.map +1 -1
- package/dist/utilities/provider/ActionProvider.js +23 -9
- package/dist/utilities/provider/ActionProvider.js.map +1 -1
- package/dist/utilities/provider/ActionProvider.mjs +382 -201
- package/dist/utilities/provider/ActionProvider.mjs.map +1 -1
- package/dist/utilities/useAxiosGet.d.ts.map +1 -1
- package/dist/utilities/useAxiosGet.js +3 -1
- package/dist/utilities/useAxiosGet.js.map +1 -1
- package/dist/utilities/useAxiosGet.mjs +4 -1
- package/dist/utilities/useAxiosGet.mjs.map +1 -1
- package/package.json +105 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../src/searchIntent/compile.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,eAAe,EAGf,MAAM,EACP,MAAM,yCAAyC,CAAC;AAEjD,OAAO,KAAK,EAGV,qBAAqB,EACrB,WAAW,EACZ,MAAM,SAAS,CAAC;AA4DjB;;;;GAIG;AACH,eAAO,MAAM,aAAa,8GAkGzB,CAAC"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { LogicalSearchOperator, SearchGroupingType } from 'udp-stencil-component-library';
|
|
2
|
+
import { OPERATOR_TO_BACKEND } from './operators';
|
|
3
|
+
const toLogicalOperator = (op) => op === 'or' ? LogicalSearchOperator.Or : LogicalSearchOperator.And;
|
|
4
|
+
const toFilterElement = (cond, groupId) => {
|
|
5
|
+
var _a;
|
|
6
|
+
return ({
|
|
7
|
+
searchField: cond.field,
|
|
8
|
+
searchOperator: OPERATOR_TO_BACKEND[cond.operator],
|
|
9
|
+
// Multi-value operators are comma-joined ("v1,v2"), matching both the manual
|
|
10
|
+
// builder's storage format and the grid's search composition.
|
|
11
|
+
searchValue: cond.values ? cond.values.join(',') : ((_a = cond.value) !== null && _a !== void 0 ? _a : ''),
|
|
12
|
+
groupId
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Compiles the filter spec into filterElements + filterGroups with
|
|
17
|
+
* deterministically assigned group ids: root group is 1, subgroups 2..n.
|
|
18
|
+
* This is the shape getNormalizedData in the advanced search builder expects.
|
|
19
|
+
*/
|
|
20
|
+
const compileFilters = (spec) => {
|
|
21
|
+
var _a, _b;
|
|
22
|
+
const ROOT_GROUP_ID = 1;
|
|
23
|
+
const filterGroups = [
|
|
24
|
+
{
|
|
25
|
+
groupId: ROOT_GROUP_ID,
|
|
26
|
+
parentGroupId: null,
|
|
27
|
+
logicalSearchOperator: toLogicalOperator(spec.op)
|
|
28
|
+
}
|
|
29
|
+
];
|
|
30
|
+
const filterElements = ((_a = spec.conditions) !== null && _a !== void 0 ? _a : []).map((c) => toFilterElement(c, ROOT_GROUP_ID));
|
|
31
|
+
let nextGroupId = ROOT_GROUP_ID + 1;
|
|
32
|
+
for (const group of (_b = spec.groups) !== null && _b !== void 0 ? _b : []) {
|
|
33
|
+
const groupId = nextGroupId++;
|
|
34
|
+
filterGroups.push({
|
|
35
|
+
groupId,
|
|
36
|
+
parentGroupId: ROOT_GROUP_ID,
|
|
37
|
+
logicalSearchOperator: toLogicalOperator(group.op)
|
|
38
|
+
});
|
|
39
|
+
filterElements.push(...group.conditions.map((c) => toFilterElement(c, groupId)));
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
filterElements,
|
|
43
|
+
filterGroups,
|
|
44
|
+
logicalSearchOperator: toLogicalOperator(spec.op)
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Applies a validated intent to the current state, producing the next
|
|
49
|
+
* searchBody + columns. Pure: never mutates inputs. Sections that are
|
|
50
|
+
* null/omitted in the intent pass through unchanged.
|
|
51
|
+
*/
|
|
52
|
+
export const compileIntent = (intent, currentSearchBody, currentColumns) => {
|
|
53
|
+
var _a, _b, _c, _d, _e;
|
|
54
|
+
let searchBody = Object.assign({}, currentSearchBody);
|
|
55
|
+
if (intent.filters !== undefined && intent.filters !== null) {
|
|
56
|
+
searchBody = Object.assign(Object.assign({}, searchBody), compileFilters(intent.filters));
|
|
57
|
+
}
|
|
58
|
+
if (intent.sorts !== undefined && intent.sorts !== null) {
|
|
59
|
+
searchBody = Object.assign(Object.assign({}, searchBody), { orderElements: intent.sorts.map((s) => ({
|
|
60
|
+
sortColumn: s.field,
|
|
61
|
+
sortDirection: s.direction
|
|
62
|
+
})) });
|
|
63
|
+
}
|
|
64
|
+
if (intent.grouping !== undefined && intent.grouping !== null) {
|
|
65
|
+
const groupProperty = [...((_a = intent.grouping.groupBy) !== null && _a !== void 0 ? _a : [])];
|
|
66
|
+
const groupOperationList = ((_b = intent.grouping.aggregates) !== null && _b !== void 0 ? _b : []).map((a) => ({
|
|
67
|
+
operation: a.operation,
|
|
68
|
+
property: a.field
|
|
69
|
+
}));
|
|
70
|
+
// Aggregate when both groupBy and aggregates present, Distinct when only
|
|
71
|
+
// groupBy — the same derivation Data Builder's manual grouping UI applies.
|
|
72
|
+
const groupingType = groupProperty.length > 0
|
|
73
|
+
? groupOperationList.length > 0
|
|
74
|
+
? SearchGroupingType.Aggregate
|
|
75
|
+
: SearchGroupingType.Distinct
|
|
76
|
+
: SearchGroupingType.None;
|
|
77
|
+
searchBody = Object.assign(Object.assign({}, searchBody), { groupProperty,
|
|
78
|
+
groupOperationList,
|
|
79
|
+
groupingType });
|
|
80
|
+
}
|
|
81
|
+
if (intent.pageSize !== undefined && intent.pageSize !== null) {
|
|
82
|
+
searchBody = Object.assign(Object.assign({}, searchBody), { pageSize: intent.pageSize });
|
|
83
|
+
}
|
|
84
|
+
// Grouping-active invariants, mirroring the backend's own conventions
|
|
85
|
+
// (verified against the starter-project SearchUtil/DAO):
|
|
86
|
+
// - a grouped SELECT can only be ordered by grouped columns; the DB rejects
|
|
87
|
+
// anything else ("ORDER BY items must appear in the select list"), and an
|
|
88
|
+
// order on a grouped column is required for stable pagination
|
|
89
|
+
// - the AGGREGATE pk-list subquery only selects the pk expression when
|
|
90
|
+
// EagerLoad is true (the backend service sets EagerLoad=true itself when
|
|
91
|
+
// it builds aggregate searches)
|
|
92
|
+
const groupProperty = (_c = searchBody.groupProperty) !== null && _c !== void 0 ? _c : [];
|
|
93
|
+
if (groupProperty.length > 0) {
|
|
94
|
+
const grouped = new Set(groupProperty);
|
|
95
|
+
let orderElements = ((_d = searchBody.orderElements) !== null && _d !== void 0 ? _d : []).filter((o) => grouped.has(o.sortColumn));
|
|
96
|
+
if (orderElements.length === 0) {
|
|
97
|
+
orderElements = [{ sortColumn: groupProperty[0], sortDirection: 'ASC' }];
|
|
98
|
+
}
|
|
99
|
+
searchBody = Object.assign(Object.assign({}, searchBody), { orderElements });
|
|
100
|
+
if (((_e = searchBody.groupOperationList) !== null && _e !== void 0 ? _e : []).length > 0) {
|
|
101
|
+
searchBody = Object.assign(Object.assign({}, searchBody), { eagerLoad: true });
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
let columns = currentColumns;
|
|
105
|
+
if (intent.columns) {
|
|
106
|
+
const { showOnly, show, hide } = intent.columns;
|
|
107
|
+
const showSet = new Set(show !== null && show !== void 0 ? show : []);
|
|
108
|
+
const hideSet = new Set(hide !== null && hide !== void 0 ? hide : []);
|
|
109
|
+
const showOnlySet = showOnly ? new Set(showOnly) : null;
|
|
110
|
+
columns = currentColumns.map((col) => {
|
|
111
|
+
var _a;
|
|
112
|
+
const currentVisible = ((_a = col.extendedProperties) === null || _a === void 0 ? void 0 : _a.defaultVisible) !== false;
|
|
113
|
+
const nextVisible = showOnlySet
|
|
114
|
+
? showOnlySet.has(col.name)
|
|
115
|
+
: showSet.has(col.name)
|
|
116
|
+
? true
|
|
117
|
+
: hideSet.has(col.name)
|
|
118
|
+
? false
|
|
119
|
+
: currentVisible;
|
|
120
|
+
if (nextVisible === currentVisible)
|
|
121
|
+
return col;
|
|
122
|
+
return Object.assign(Object.assign({}, col), { extendedProperties: Object.assign(Object.assign({}, col.extendedProperties), { defaultVisible: nextVisible }) });
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
return { searchBody, columns };
|
|
126
|
+
};
|
|
127
|
+
//# sourceMappingURL=compile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compile.js","sourceRoot":"","sources":["../../src/searchIntent/compile.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,yCAAyC,CAAC;AAOjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAQlD,MAAM,iBAAiB,GAAG,CAAC,EAAgB,EAAU,EAAE,CACrD,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC,qBAAqB,CAAC,EAAE,CAAC,CAAC,CAAC,qBAAqB,CAAC,GAAG,CAAC;AAErE,MAAM,eAA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KACN,kBAAkB,kCACb,GAAG,CAAC,kBAAkB,KACzB,cAAc,EAAE,WAAW,OAE7B;QAAA,CACH,CAAC,CAAC;IACL,CAAC;IAED,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC;AAAA,CAChC,CAAC"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { OPERATOR_TO_BACKEND } from "./operators.mjs";
|
|
2
|
+
import { LogicalSearchOperator, SearchGroupingType } from "udp-stencil-component-library";
|
|
3
|
+
//#region src/searchIntent/compile.ts
|
|
4
|
+
const toLogicalOperator = (op) => op === "or" ? LogicalSearchOperator.Or : LogicalSearchOperator.And;
|
|
5
|
+
const toFilterElement = (cond, groupId) => ({
|
|
6
|
+
searchField: cond.field,
|
|
7
|
+
searchOperator: OPERATOR_TO_BACKEND[cond.operator],
|
|
8
|
+
searchValue: cond.values ? cond.values.join(",") : cond.value ?? "",
|
|
9
|
+
groupId
|
|
10
|
+
});
|
|
11
|
+
/**
|
|
12
|
+
* Compiles the filter spec into filterElements + filterGroups with
|
|
13
|
+
* deterministically assigned group ids: root group is 1, subgroups 2..n.
|
|
14
|
+
* This is the shape getNormalizedData in the advanced search builder expects.
|
|
15
|
+
*/
|
|
16
|
+
const compileFilters = (spec) => {
|
|
17
|
+
const ROOT_GROUP_ID = 1;
|
|
18
|
+
const filterGroups = [{
|
|
19
|
+
groupId: ROOT_GROUP_ID,
|
|
20
|
+
parentGroupId: null,
|
|
21
|
+
logicalSearchOperator: toLogicalOperator(spec.op)
|
|
22
|
+
}];
|
|
23
|
+
const filterElements = (spec.conditions ?? []).map((c) => toFilterElement(c, ROOT_GROUP_ID));
|
|
24
|
+
let nextGroupId = ROOT_GROUP_ID + 1;
|
|
25
|
+
for (const group of spec.groups ?? []) {
|
|
26
|
+
const groupId = nextGroupId++;
|
|
27
|
+
filterGroups.push({
|
|
28
|
+
groupId,
|
|
29
|
+
parentGroupId: ROOT_GROUP_ID,
|
|
30
|
+
logicalSearchOperator: toLogicalOperator(group.op)
|
|
31
|
+
});
|
|
32
|
+
filterElements.push(...group.conditions.map((c) => toFilterElement(c, groupId)));
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
filterElements,
|
|
36
|
+
filterGroups,
|
|
37
|
+
logicalSearchOperator: toLogicalOperator(spec.op)
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Applies a validated intent to the current state, producing the next
|
|
42
|
+
* searchBody + columns. Pure: never mutates inputs. Sections that are
|
|
43
|
+
* null/omitted in the intent pass through unchanged.
|
|
44
|
+
*/
|
|
45
|
+
const compileIntent = (intent, currentSearchBody, currentColumns) => {
|
|
46
|
+
let searchBody = { ...currentSearchBody };
|
|
47
|
+
if (intent.filters !== void 0 && intent.filters !== null) searchBody = {
|
|
48
|
+
...searchBody,
|
|
49
|
+
...compileFilters(intent.filters)
|
|
50
|
+
};
|
|
51
|
+
if (intent.sorts !== void 0 && intent.sorts !== null) searchBody = {
|
|
52
|
+
...searchBody,
|
|
53
|
+
orderElements: intent.sorts.map((s) => ({
|
|
54
|
+
sortColumn: s.field,
|
|
55
|
+
sortDirection: s.direction
|
|
56
|
+
}))
|
|
57
|
+
};
|
|
58
|
+
if (intent.grouping !== void 0 && intent.grouping !== null) {
|
|
59
|
+
const groupProperty = [...intent.grouping.groupBy ?? []];
|
|
60
|
+
const groupOperationList = (intent.grouping.aggregates ?? []).map((a) => ({
|
|
61
|
+
operation: a.operation,
|
|
62
|
+
property: a.field
|
|
63
|
+
}));
|
|
64
|
+
const groupingType = groupProperty.length > 0 ? groupOperationList.length > 0 ? SearchGroupingType.Aggregate : SearchGroupingType.Distinct : SearchGroupingType.None;
|
|
65
|
+
searchBody = {
|
|
66
|
+
...searchBody,
|
|
67
|
+
groupProperty,
|
|
68
|
+
groupOperationList,
|
|
69
|
+
groupingType
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
if (intent.pageSize !== void 0 && intent.pageSize !== null) searchBody = {
|
|
73
|
+
...searchBody,
|
|
74
|
+
pageSize: intent.pageSize
|
|
75
|
+
};
|
|
76
|
+
const groupProperty = searchBody.groupProperty ?? [];
|
|
77
|
+
if (groupProperty.length > 0) {
|
|
78
|
+
const grouped = new Set(groupProperty);
|
|
79
|
+
let orderElements = (searchBody.orderElements ?? []).filter((o) => grouped.has(o.sortColumn));
|
|
80
|
+
if (orderElements.length === 0) orderElements = [{
|
|
81
|
+
sortColumn: groupProperty[0],
|
|
82
|
+
sortDirection: "ASC"
|
|
83
|
+
}];
|
|
84
|
+
searchBody = {
|
|
85
|
+
...searchBody,
|
|
86
|
+
orderElements
|
|
87
|
+
};
|
|
88
|
+
if ((searchBody.groupOperationList ?? []).length > 0) searchBody = {
|
|
89
|
+
...searchBody,
|
|
90
|
+
eagerLoad: true
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
let columns = currentColumns;
|
|
94
|
+
if (intent.columns) {
|
|
95
|
+
const { showOnly, show, hide } = intent.columns;
|
|
96
|
+
const showSet = new Set(show ?? []);
|
|
97
|
+
const hideSet = new Set(hide ?? []);
|
|
98
|
+
const showOnlySet = showOnly ? new Set(showOnly) : null;
|
|
99
|
+
columns = currentColumns.map((col) => {
|
|
100
|
+
const currentVisible = col.extendedProperties?.defaultVisible !== false;
|
|
101
|
+
const nextVisible = showOnlySet ? showOnlySet.has(col.name) : showSet.has(col.name) ? true : hideSet.has(col.name) ? false : currentVisible;
|
|
102
|
+
if (nextVisible === currentVisible) return col;
|
|
103
|
+
return {
|
|
104
|
+
...col,
|
|
105
|
+
extendedProperties: {
|
|
106
|
+
...col.extendedProperties,
|
|
107
|
+
defaultVisible: nextVisible
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
return {
|
|
113
|
+
searchBody,
|
|
114
|
+
columns
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
//#endregion
|
|
118
|
+
export { compileIntent };
|
|
119
|
+
|
|
120
|
+
//# sourceMappingURL=compile.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compile.mjs","names":["LogicalSearchOperator","SearchGroupingType","CatalogProperty","FilterElement","FilterGroup","Search","OPERATOR_TO_BACKEND","AiCondition","AiFilterSpec","CompiledSearchChanges","QueryIntent","toLogicalOperator","op","Or","And","toFilterElement","cond","groupId","searchField","field","searchOperator","operator","searchValue","values","join","value","compileFilters","spec","Pick","ROOT_GROUP_ID","filterGroups","parentGroupId","logicalSearchOperator","filterElements","conditions","map","c","nextGroupId","group","groups","push","compileIntent","intent","currentSearchBody","currentColumns","searchBody","filters","undefined","sorts","orderElements","s","sortColumn","sortDirection","direction","grouping","groupProperty","groupBy","groupOperationList","aggregates","a","operation","property","groupingType","length","Aggregate","Distinct","None","pageSize","grouped","Set","filter","o","has","eagerLoad","columns","showOnly","show","hide","showSet","hideSet","showOnlySet","col","currentVisible","extendedProperties","defaultVisible","nextVisible","name"],"sources":["../../src/searchIntent/compile.ts"],"sourcesContent":["import {\n LogicalSearchOperator,\n SearchGroupingType\n} from '@univerus/udp-stencil-component-library';\nimport type {\n CatalogProperty,\n FilterElement,\n FilterGroup,\n Search\n} from '@univerus/udp-stencil-component-library';\nimport { OPERATOR_TO_BACKEND } from './operators';\nimport type {\n AiCondition,\n AiFilterSpec,\n CompiledSearchChanges,\n QueryIntent\n} from './types';\n\nconst toLogicalOperator = (op: 'and' | 'or'): number =>\n op === 'or' ? LogicalSearchOperator.Or : LogicalSearchOperator.And;\n\nconst toFilterElement = (\n cond: AiCondition,\n groupId: number\n): FilterElement => ({\n searchField: cond.field,\n searchOperator: OPERATOR_TO_BACKEND[cond.operator],\n // Multi-value operators are comma-joined (\"v1,v2\"), matching both the manual\n // builder's storage format and the grid's search composition.\n searchValue: cond.values ? cond.values.join(',') : (cond.value ?? ''),\n groupId\n});\n\n/**\n * Compiles the filter spec into filterElements + filterGroups with\n * deterministically assigned group ids: root group is 1, subgroups 2..n.\n * This is the shape getNormalizedData in the advanced search builder expects.\n */\nconst compileFilters = (\n spec: AiFilterSpec\n): Pick<\n Search,\n 'filterElements' | 'filterGroups' | 'logicalSearchOperator'\n> => {\n const ROOT_GROUP_ID = 1;\n const filterGroups: FilterGroup[] = [\n {\n groupId: ROOT_GROUP_ID,\n parentGroupId: null,\n logicalSearchOperator: toLogicalOperator(spec.op)\n }\n ];\n const filterElements: FilterElement[] = (spec.conditions ?? []).map((c) =>\n toFilterElement(c, ROOT_GROUP_ID)\n );\n\n let nextGroupId = ROOT_GROUP_ID + 1;\n for (const group of spec.groups ?? []) {\n const groupId = nextGroupId++;\n filterGroups.push({\n groupId,\n parentGroupId: ROOT_GROUP_ID,\n logicalSearchOperator: toLogicalOperator(group.op)\n });\n filterElements.push(\n ...group.conditions.map((c) => toFilterElement(c, groupId))\n );\n }\n\n return {\n filterElements,\n filterGroups,\n logicalSearchOperator: toLogicalOperator(spec.op)\n };\n};\n\n/**\n * Applies a validated intent to the current state, producing the next\n * searchBody + columns. Pure: never mutates inputs. Sections that are\n * null/omitted in the intent pass through unchanged.\n */\nexport const compileIntent = (\n intent: QueryIntent,\n currentSearchBody: Search,\n currentColumns: CatalogProperty[]\n): CompiledSearchChanges => {\n let searchBody: Search = { ...currentSearchBody };\n\n if (intent.filters !== undefined && intent.filters !== null) {\n searchBody = { ...searchBody, ...compileFilters(intent.filters) };\n }\n\n if (intent.sorts !== undefined && intent.sorts !== null) {\n searchBody = {\n ...searchBody,\n orderElements: intent.sorts.map((s) => ({\n sortColumn: s.field,\n sortDirection: s.direction\n }))\n };\n }\n\n if (intent.grouping !== undefined && intent.grouping !== null) {\n const groupProperty = [...(intent.grouping.groupBy ?? [])];\n const groupOperationList = (intent.grouping.aggregates ?? []).map((a) => ({\n operation: a.operation,\n property: a.field\n }));\n // Aggregate when both groupBy and aggregates present, Distinct when only\n // groupBy — the same derivation Data Builder's manual grouping UI applies.\n const groupingType =\n groupProperty.length > 0\n ? groupOperationList.length > 0\n ? SearchGroupingType.Aggregate\n : SearchGroupingType.Distinct\n : SearchGroupingType.None;\n searchBody = {\n ...searchBody,\n groupProperty,\n groupOperationList,\n groupingType\n };\n }\n\n if (intent.pageSize !== undefined && intent.pageSize !== null) {\n searchBody = { ...searchBody, pageSize: intent.pageSize };\n }\n\n // Grouping-active invariants, mirroring the backend's own conventions\n // (verified against the starter-project SearchUtil/DAO):\n // - a grouped SELECT can only be ordered by grouped columns; the DB rejects\n // anything else (\"ORDER BY items must appear in the select list\"), and an\n // order on a grouped column is required for stable pagination\n // - the AGGREGATE pk-list subquery only selects the pk expression when\n // EagerLoad is true (the backend service sets EagerLoad=true itself when\n // it builds aggregate searches)\n const groupProperty = searchBody.groupProperty ?? [];\n if (groupProperty.length > 0) {\n const grouped = new Set(groupProperty);\n let orderElements = (searchBody.orderElements ?? []).filter((o) =>\n grouped.has(o.sortColumn)\n );\n if (orderElements.length === 0) {\n orderElements = [{ sortColumn: groupProperty[0], sortDirection: 'ASC' }];\n }\n searchBody = { ...searchBody, orderElements };\n if ((searchBody.groupOperationList ?? []).length > 0) {\n searchBody = { ...searchBody, eagerLoad: true };\n }\n }\n\n let columns = currentColumns;\n if (intent.columns) {\n const { showOnly, show, hide } = intent.columns;\n const showSet = new Set(show ?? []);\n const hideSet = new Set(hide ?? []);\n const showOnlySet = showOnly ? new Set(showOnly) : null;\n\n columns = currentColumns.map((col) => {\n const currentVisible = col.extendedProperties?.defaultVisible !== false;\n const nextVisible = showOnlySet\n ? showOnlySet.has(col.name)\n : showSet.has(col.name)\n ? true\n : hideSet.has(col.name)\n ? false\n : currentVisible;\n if (nextVisible === currentVisible) return col;\n return {\n ...col,\n extendedProperties: {\n ...col.extendedProperties,\n defaultVisible: nextVisible\n }\n };\n });\n }\n\n return { searchBody, columns };\n};\n"],"mappings":";;;AAkBA,MAAMW,qBAAqBC,OACzBA,OAAO,OAAOZ,sBAAsBa,KAAKb,sBAAsBc;AAEjE,MAAMC,mBACJC,MACAC,aACmB;CACnBC,aAAaF,KAA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AAIE,oBAAoBC,mBAAmB;GAClE,MAAMC,cAAcL,cAChBA,YAAYR,IAAIS,IAAIK,KAAK,GACzBR,QAAQN,IAAIS,IAAIK,KAAK,GACnB,OACAP,QAAQP,IAAIS,IAAIK,KAAK,GACnB,QACAJ;AACR,OAAIG,gBAAgBH,eAAgB,QAAOD;AAC3C,UAAO;IACL,GAAGA;IACHE,oBAAoB;KAClB,GAAGF,IAAIE;KACPC,gBAAgBC;KAClB;IACD;IACD;;AAGJ,QAAO;EAAExC;EAAY6B;EAAS"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AiDiffLine, QueryIntent } from './types';
|
|
2
|
+
/** Fluent icon names per diff-line kind, for AiProposalDetail rendering. */
|
|
3
|
+
export declare const AI_DIFF_ICONS: Record<AiDiffLine['kind'], string>;
|
|
4
|
+
/**
|
|
5
|
+
* Human-readable summary of what applying the intent will change. Because
|
|
6
|
+
* sections are declarative replacements, each line describes the resulting
|
|
7
|
+
* state of a changed section rather than an add/remove delta.
|
|
8
|
+
*/
|
|
9
|
+
export declare const describeIntent: (intent: QueryIntent) => AiDiffLine[];
|
|
10
|
+
//# sourceMappingURL=diff.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../../src/searchIntent/diff.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAe,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEpE,4EAA4E;AAC5E,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,MAAM,CAM5D,CAAC;AAiBF;;;;GAIG;AACH,eAAO,MAAM,cAAc,uCAiE1B,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { OPERATOR_LABELS } from './operators';
|
|
2
|
+
/** Fluent icon names per diff-line kind, for AiProposalDetail rendering. */
|
|
3
|
+
export const AI_DIFF_ICONS = {
|
|
4
|
+
filters: 'filter',
|
|
5
|
+
sorts: 'sort',
|
|
6
|
+
grouping: 'group',
|
|
7
|
+
columns: 'table',
|
|
8
|
+
pageSize: 'page'
|
|
9
|
+
};
|
|
10
|
+
const describeCondition = (cond) => {
|
|
11
|
+
var _a, _b;
|
|
12
|
+
const op = (_a = OPERATOR_LABELS[cond.operator]) !== null && _a !== void 0 ? _a : cond.operator;
|
|
13
|
+
if (cond.operator === 'is_empty' || cond.operator === 'is_not_empty') {
|
|
14
|
+
return `${cond.field} ${op}`;
|
|
15
|
+
}
|
|
16
|
+
if (cond.operator === 'between') {
|
|
17
|
+
const [lo, hi] = (_b = cond.values) !== null && _b !== void 0 ? _b : [];
|
|
18
|
+
return `${cond.field} ${op} ${lo} and ${hi}`;
|
|
19
|
+
}
|
|
20
|
+
if (cond.values) {
|
|
21
|
+
return `${cond.field} ${op} [${cond.values.join(', ')}]`;
|
|
22
|
+
}
|
|
23
|
+
return `${cond.field} ${op} ${cond.value}`;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Human-readable summary of what applying the intent will change. Because
|
|
27
|
+
* sections are declarative replacements, each line describes the resulting
|
|
28
|
+
* state of a changed section rather than an add/remove delta.
|
|
29
|
+
*/
|
|
30
|
+
export const describeIntent = (intent) => {
|
|
31
|
+
const lines = [];
|
|
32
|
+
if (intent.filters !== undefined && intent.filters !== null) {
|
|
33
|
+
const { op, conditions = [], groups = [] } = intent.filters;
|
|
34
|
+
if (conditions.length === 0 && groups.length === 0) {
|
|
35
|
+
lines.push({ kind: 'filters', text: 'Filters: cleared' });
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
const joiner = ` ${op.toUpperCase()} `;
|
|
39
|
+
const parts = conditions.map(describeCondition);
|
|
40
|
+
for (const group of groups) {
|
|
41
|
+
parts.push(`(${group.conditions.map(describeCondition).join(` ${group.op.toUpperCase()} `)})`);
|
|
42
|
+
}
|
|
43
|
+
lines.push({ kind: 'filters', text: `Filters: ${parts.join(joiner)}` });
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
if (intent.sorts !== undefined && intent.sorts !== null) {
|
|
47
|
+
lines.push({
|
|
48
|
+
kind: 'sorts',
|
|
49
|
+
text: intent.sorts.length === 0
|
|
50
|
+
? 'Sort: cleared'
|
|
51
|
+
: `Sort: ${intent.sorts.map((s) => `${s.field} ${s.direction}`).join(', ')}`
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
if (intent.grouping !== undefined && intent.grouping !== null) {
|
|
55
|
+
const { groupBy = [], aggregates = [] } = intent.grouping;
|
|
56
|
+
if (groupBy.length === 0 && aggregates.length === 0) {
|
|
57
|
+
lines.push({ kind: 'grouping', text: 'Grouping: cleared' });
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
const parts = [`Group by: ${groupBy.join(', ') || '—'}`];
|
|
61
|
+
if (aggregates.length > 0) {
|
|
62
|
+
parts.push(`Aggregates: ${aggregates.map((a) => `${a.operation}(${a.field})`).join(', ')}`);
|
|
63
|
+
}
|
|
64
|
+
lines.push({ kind: 'grouping', text: parts.join(' · ') });
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
if (intent.columns) {
|
|
68
|
+
const { showOnly, show = [], hide = [] } = intent.columns;
|
|
69
|
+
if (showOnly) {
|
|
70
|
+
lines.push({
|
|
71
|
+
kind: 'columns',
|
|
72
|
+
text: `Columns: show only ${showOnly.join(', ')}`
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
const parts = [];
|
|
77
|
+
if (show.length)
|
|
78
|
+
parts.push(`show ${show.join(', ')}`);
|
|
79
|
+
if (hide.length)
|
|
80
|
+
parts.push(`hide ${hide.join(', ')}`);
|
|
81
|
+
if (parts.length)
|
|
82
|
+
lines.push({ kind: 'columns', text: `Columns: ${parts.join(' · ')}` });
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
if (intent.pageSize !== undefined && intent.pageSize !== null) {
|
|
86
|
+
lines.push({ kind: 'pageSize', text: `Page size: ${intent.pageSize}` });
|
|
87
|
+
}
|
|
88
|
+
return lines;
|
|
89
|
+
};
|
|
90
|
+
//# sourceMappingURL=diff.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diff.js","sourceRoot":"","sources":["../../src/searchIntent/diff.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG9C,4EAA4E;AAC5E,MAAM,CAAC,MAAM,aAAa,GAAuC;IAC/D,OAAO,EAAE,QAAQ;IACjB,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,OAAO;IACjB,OAAO,EAAE,OAAO;IAChB,QAAQ,EAAE,MAAM;CACjB,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,IAAiB,EAAU,EAAE,CAAC;;IACvD,MAAM,EAAE,SAAG,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,mCAAI,IAAI,CAAC,QAAQ,CAAC;IAC3D,IAAI,IAAI,CAAC,QAAQ,KAAK,UAAU,IAAI,IAAI,CAAC,QAAQ,KAAK,cAAc,EAAE,CAAC;QACrE,OAAO,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,EAAE,CAAC;IAC/B,CAAC;IACD,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;QAChC,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,SAAG,IAAI,CAAC,MAAM,mCAAI,EAAE,CAAC;QACnC,OAAO,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,CAAC;IAC/C,CAAC;IACD,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;QAChB,OAAO,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,KAAK,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;IAC3D,CAAC;IACD,OAAO,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,I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ent icon names per diff-line kind, for AiProposalDetail rendering. */
|
|
4
|
+
const AI_DIFF_ICONS = {
|
|
5
|
+
filters: "filter",
|
|
6
|
+
sorts: "sort",
|
|
7
|
+
grouping: "group",
|
|
8
|
+
columns: "table",
|
|
9
|
+
pageSize: "page"
|
|
10
|
+
};
|
|
11
|
+
const describeCondition = (cond) => {
|
|
12
|
+
const op = OPERATOR_LABELS[cond.operator] ?? cond.operator;
|
|
13
|
+
if (cond.operator === "is_empty" || cond.operator === "is_not_empty") return `${cond.field} ${op}`;
|
|
14
|
+
if (cond.operator === "between") {
|
|
15
|
+
const [lo, hi] = cond.values ?? [];
|
|
16
|
+
return `${cond.field} ${op} ${lo} and ${hi}`;
|
|
17
|
+
}
|
|
18
|
+
if (cond.values) return `${cond.field} ${op} [${cond.values.join(", ")}]`;
|
|
19
|
+
return `${cond.field} ${op} ${cond.value}`;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Human-readable summary of what applying the intent will change. Because
|
|
23
|
+
* sections are declarative replacements, each line describes the resulting
|
|
24
|
+
* state of a changed section rather than an add/remove delta.
|
|
25
|
+
*/
|
|
26
|
+
const describeIntent = (intent) => {
|
|
27
|
+
const lines = [];
|
|
28
|
+
if (intent.filters !== void 0 && intent.filters !== null) {
|
|
29
|
+
const { op, conditions = [], groups = [] } = intent.filters;
|
|
30
|
+
if (conditions.length === 0 && groups.length === 0) lines.push({
|
|
31
|
+
kind: "filters",
|
|
32
|
+
text: "Filters: cleared"
|
|
33
|
+
});
|
|
34
|
+
else {
|
|
35
|
+
const joiner = ` ${op.toUpperCase()} `;
|
|
36
|
+
const parts = conditions.map(describeCondition);
|
|
37
|
+
for (const group of groups) parts.push(`(${group.conditions.map(describeCondition).join(` ${group.op.toUpperCase()} `)})`);
|
|
38
|
+
lines.push({
|
|
39
|
+
kind: "filters",
|
|
40
|
+
text: `Filters: ${parts.join(joiner)}`
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (intent.sorts !== void 0 && intent.sorts !== null) lines.push({
|
|
45
|
+
kind: "sorts",
|
|
46
|
+
text: intent.sorts.length === 0 ? "Sort: cleared" : `Sort: ${intent.sorts.map((s) => `${s.field} ${s.direction}`).join(", ")}`
|
|
47
|
+
});
|
|
48
|
+
if (intent.grouping !== void 0 && intent.grouping !== null) {
|
|
49
|
+
const { groupBy = [], aggregates = [] } = intent.grouping;
|
|
50
|
+
if (groupBy.length === 0 && aggregates.length === 0) lines.push({
|
|
51
|
+
kind: "grouping",
|
|
52
|
+
text: "Grouping: cleared"
|
|
53
|
+
});
|
|
54
|
+
else {
|
|
55
|
+
const parts = [`Group by: ${groupBy.join(", ") || "—"}`];
|
|
56
|
+
if (aggregates.length > 0) parts.push(`Aggregates: ${aggregates.map((a) => `${a.operation}(${a.field})`).join(", ")}`);
|
|
57
|
+
lines.push({
|
|
58
|
+
kind: "grouping",
|
|
59
|
+
text: parts.join(" · ")
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
if (intent.columns) {
|
|
64
|
+
const { showOnly, show = [], hide = [] } = intent.columns;
|
|
65
|
+
if (showOnly) lines.push({
|
|
66
|
+
kind: "columns",
|
|
67
|
+
text: `Columns: show only ${showOnly.join(", ")}`
|
|
68
|
+
});
|
|
69
|
+
else {
|
|
70
|
+
const parts = [];
|
|
71
|
+
if (show.length) parts.push(`show ${show.join(", ")}`);
|
|
72
|
+
if (hide.length) parts.push(`hide ${hide.join(", ")}`);
|
|
73
|
+
if (parts.length) lines.push({
|
|
74
|
+
kind: "columns",
|
|
75
|
+
text: `Columns: ${parts.join(" · ")}`
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
if (intent.pageSize !== void 0 && intent.pageSize !== null) lines.push({
|
|
80
|
+
kind: "pageSize",
|
|
81
|
+
text: `Page size: ${intent.pageSize}`
|
|
82
|
+
});
|
|
83
|
+
return lines;
|
|
84
|
+
};
|
|
85
|
+
//#endregion
|
|
86
|
+
export { AI_DIFF_ICONS, describeIntent };
|
|
87
|
+
|
|
88
|
+
//# sourceMappingURL=diff.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diff.mjs","names":["OPERATOR_LABELS","AiCondition","AiDiffLine","QueryIntent","AI_DIFF_ICONS","Record","filters","sorts","grouping","columns","pageSize","describeCondition","cond","op","operator","field","lo","hi","values","join","value","describeIntent","intent","lines","undefined","conditions","groups","length","push","kind","text","joiner","toUpperCase","parts","map","group","s","direction","groupBy","aggregates","a","operation","showOnly","show","hide"],"sources":["../../src/searchIntent/diff.ts"],"sourcesContent":["import { OPERATOR_LABELS } from './operators';\nimport type { AiCondition, AiDiffLine, QueryIntent } from './types';\n\n/** Fluent icon names per diff-line kind, for AiProposalDetail rendering. */\nexport const AI_DIFF_ICONS: Record<AiDiffLine['kind'], string> = {\n filters: 'filter',\n sorts: 'sort',\n grouping: 'group',\n columns: 'table',\n pageSize: 'page'\n};\n\nconst describeCondition = (cond: AiCondition): string => {\n const op = OPERATOR_LABELS[cond.operator] ?? cond.operator;\n if (cond.operator === 'is_empty' || cond.operator === 'is_not_empty') {\n return `${cond.field} ${op}`;\n }\n if (cond.operator === 'between') {\n const [lo, hi] = cond.values ?? [];\n return `${cond.field} ${op} ${lo} and ${hi}`;\n }\n if (cond.values) {\n return `${cond.field} ${op} [${cond.values.join(', ')}]`;\n }\n return `${cond.field} ${op} ${cond.value}`;\n};\n\n/**\n * Human-readable summary of what applying the intent will change. Because\n * sections are declarative replacements, each line describes the resulting\n * state of a changed section rather than an add/remove delta.\n */\nexport const describeIntent = (intent: QueryIntent): AiDiffLine[] => {\n const lines: AiDiffLine[] = [];\n\n if (intent.filters !== undefined && intent.filters !== null) {\n const { op, conditions = [], groups = [] } = intent.filters;\n if (conditions.length === 0 && groups.length === 0) {\n lines.push({ kind: 'filters', text: 'Filters: cleared' });\n } else {\n const joiner = ` ${op.toUpperCase()} `;\n const parts = conditions.map(describeCondition);\n for (const group of groups) {\n parts.push(\n `(${group.conditions.map(describeCondition).join(` ${group.op.toUpperCase()} `)})`\n );\n }\n lines.push({ kind: 'filters', text: `Filters: ${parts.join(joiner)}` });\n }\n }\n\n if (intent.sorts !== undefined && intent.sorts !== null) {\n lines.push({\n kind: 'sorts',\n text:\n intent.sorts.length === 0\n ? 'Sort: cleared'\n : `Sort: ${intent.sorts.map((s) => `${s.field} ${s.direction}`).join(', ')}`\n });\n }\n\n if (intent.grouping !== undefined && intent.grouping !== null) {\n const { groupBy = [], aggregates = [] } = intent.grouping;\n if (groupBy.length === 0 && aggregates.length === 0) {\n lines.push({ kind: 'grouping', text: 'Grouping: cleared' });\n } else {\n const parts = [`Group by: ${groupBy.join(', ') || '—'}`];\n if (aggregates.length > 0) {\n parts.push(\n `Aggregates: ${aggregates.map((a) => `${a.operation}(${a.field})`).join(', ')}`\n );\n }\n lines.push({ kind: 'grouping', text: parts.join(' · ') });\n }\n }\n\n if (intent.columns) {\n const { showOnly, show = [], hide = [] } = intent.columns;\n if (showOnly) {\n lines.push({\n kind: 'columns',\n text: `Columns: show only ${showOnly.join(', ')}`\n });\n } else {\n const parts: string[] = [];\n if (show.length) parts.push(`show ${show.join(', ')}`);\n if (hide.length) parts.push(`hide ${hide.join(', ')}`);\n if (parts.length)\n lines.push({ kind: 'columns', text: `Columns: ${parts.join(' · ')}` });\n }\n }\n\n if (intent.pageSize !== undefined && intent.pageSize !== null) {\n lines.push({ kind: 'pageSize', text: `Page size: ${intent.pageSize}` });\n }\n\n return lines;\n};\n"],"mappings":";;;AAIA,MAAaI,gBAAoD;CAC/DE,SAAS;CACTC,OAAO;CACPC,UAAU;CACVC,SAAS;CACTC,UAAU;CACX;AAED,MAAMC,qBAAqBC,SAA8B;CACvD,MAAMC,KAAKb,gBAAgBY,KAAKE,aAAaF,KAAKE;AAClD,KAAIF,KAAKE,aAAa,cAAcF,KAAKE,aAAa,eACpD,QAAO,GAAGF,KAAKG,MAAK,GAAIF;AAE1B,K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R, the
|
|
2
|
+
// propose-tool schema, the validator core, the deterministic Search compiler,
|
|
3
|
+
// diff rendering, and prompt building blocks. Proven in Data Builder's query
|
|
4
|
+
// assistant; hosts adapt their schema source to AiSearchSchemaContext and
|
|
5
|
+
// keep prompt copy + apply/undo wiring surface-specific.
|
|
6
|
+
export * from './types';
|
|
7
|
+
export * from './operators';
|
|
8
|
+
export * from './tools';
|
|
9
|
+
export * from './validate';
|
|
10
|
+
export * from './compile';
|
|
11
|
+
export * from './diff';
|
|
12
|
+
export * from './prompt';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/searchIntent/index.ts"],"names":[],"mappings":"AAAA,4EAA0E;AAC1E,8EAA8E;AAC9E,6EAA6E;AAC7E,0EAA0E;AAC1E,yDAAyD;AACzD,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Shared NL → Search-object copilot layer: the declarative intent IR, the
|
|
2
|
+
// propose-tool schema, the validator core, the deterministic Search compiler,
|
|
3
|
+
// diff rendering, and prompt building blocks. Proven in Data Builder's query
|
|
4
|
+
// assistant; hosts adapt their schema source to AiSearchSchemaContext and
|
|
5
|
+
// keep prompt copy + apply/undo wiring surface-specific.
|
|
6
|
+
export * from './types';
|
|
7
|
+
export * from './operators';
|
|
8
|
+
export * from './tools';
|
|
9
|
+
export * from './validate';
|
|
10
|
+
export * from './compile';
|
|
11
|
+
export * from './diff';
|
|
12
|
+
export * from './prompt';
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/searchIntent/index.ts"],"names":[],"mappings":"AAAA,4EAA0E;AAC1E,8EAA8E;AAC9E,6EAA6E;AAC7E,0EAA0E;AAC1E,yDAAyD;AACzD,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// Operator availability per normalized type. Mirrors
|
|
2
|
+
// advanced-search-builder/helperFunctions/udpOperatorHelper.ts — keep in sync.
|
|
3
|
+
export declare const OPERATORS_BY_TYPE: Record<string, string[]>;
|
|
4
|
+
export declare const SINGLE_VALUE_OPERATORS: Set<string>;
|
|
5
|
+
export declare const MULTI_VALUE_OPERATORS: Set<string>;
|
|
6
|
+
export declare const NO_VALUE_OPERATORS: Set<string>;
|
|
7
|
+
// Semantic operator → backend SearchHelper constant. Values are sent raw:
|
|
8
|
+
// the backend applies substring semantics to LIKE itself (matching the grid's
|
|
9
|
+
// buildSearchObject behavior), so no % wrapping here.
|
|
10
|
+
export declare const OPERATOR_TO_BACKEND: Record<string, string>;
|
|
11
|
+
/**
|
|
12
|
+
* Backend SearchHelper constant → semantic operator: the inverse of
|
|
13
|
+
* OPERATOR_TO_BACKEND, for reading an existing Search back into the vocabulary
|
|
14
|
+
* the model speaks (see describeCurrentSearchState). Backend operators with no
|
|
15
|
+
* intent equivalent (NOTLIKE, ENDSWITH) are absent — callers fall back to the
|
|
16
|
+
* raw constant rather than inventing one.
|
|
17
|
+
*/
|
|
18
|
+
export declare const OPERATOR_FROM_BACKEND: Record<string, string>;
|
|
19
|
+
/** Human-readable operator labels for proposal diff cards. */
|
|
20
|
+
export declare const OPERATOR_LABELS: Record<string, string>;
|
|
21
|
+
/** Returns an error fragment when a value doesn't fit the field type, else null. */
|
|
22
|
+
export declare const checkValueFormat: (type: string, value: string) => string;
|
|
23
|
+
/**
|
|
24
|
+
* Normalizes a catalog/.NET type name to the vocabulary OPERATORS_BY_TYPE and
|
|
25
|
+
* checkValueFormat use (same normalization catalogTree.ts applies).
|
|
26
|
+
*/
|
|
27
|
+
export declare const normalizeSearchFieldType: (netType: string) => string;
|
|
28
|
+
//# sourceMappingURL=operators.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operators.d.ts","sourceRoot":"","sources":["../../src/searchIntent/operators.ts"],"names":[],"mappings":"AAEA,qDAAqD;AACrD,iFAA+E;AAC/E,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAoEtD,CAAC;AAEF,eAAO,MAAM,sBAAsB,aASjC,CAAC;AACH,eAAO,MAAM,qBAAqB,aAAuC,CAAC;AAC1E,eAAO,MAAM,kBAAkB,aAAwC,CAAC;AAExE,4EAA0E;AAC1E,8EAA8E;AAC9E,sDAAsD;AACtD,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CActD,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAKxD,CAAC;AAEF,8DAA8D;AAC9D,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAclD,CAAC;AAMF,oFAAoF;AACpF,eAAO,MAAM,gBAAgB,yCAuB5B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,6BAsBpC,CAAC"}
|