@bikdotai/bik-component-library 0.0.821-2 → 0.0.821-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/cjs/assets/icons/ManifestGlass.svg.js +2 -0
- package/dist/cjs/assets/icons/ManifestGlass.svg.js.map +1 -0
- package/dist/cjs/assets/icons/playOutline.svg.js +2 -0
- package/dist/cjs/assets/icons/playOutline.svg.js.map +1 -0
- package/dist/cjs/components/BikGiftedChat/Bubble/Bubble.js +1 -1
- package/dist/cjs/components/BikGiftedChat/Bubble/Bubble.js.map +1 -1
- package/dist/cjs/components/BikGiftedChat/GiftedChat/Day.js +1 -1
- package/dist/cjs/components/BikGiftedChat/GiftedChat/Day.js.map +1 -1
- package/dist/cjs/components/BikGiftedChat/GiftedChat/GiftedChat.js +1 -1
- package/dist/cjs/components/BikGiftedChat/GiftedChat/GiftedChat.js.map +1 -1
- package/dist/cjs/components/BikGiftedChat/GiftedChat/types.js.map +1 -1
- package/dist/cjs/components/TypographyStyle.js +20 -41
- package/dist/cjs/components/TypographyStyle.js.map +1 -1
- package/dist/cjs/components/agent-builder/AgentBuilder.js +2 -0
- package/dist/cjs/components/agent-builder/AgentBuilder.js.map +1 -0
- package/dist/cjs/components/agent-builder/AgentBuilder.styled.js +285 -0
- package/dist/cjs/components/agent-builder/AgentBuilder.styled.js.map +1 -0
- package/dist/cjs/components/agent-builder/components/AgentBuilderFooter.js +2 -0
- package/dist/cjs/components/agent-builder/components/AgentBuilderFooter.js.map +1 -0
- package/dist/cjs/components/agent-builder/components/AgentBuilderTopBar.js +2 -0
- package/dist/cjs/components/agent-builder/components/AgentBuilderTopBar.js.map +1 -0
- package/dist/cjs/components/agent-builder/components/AiTextArea.js +2 -0
- package/dist/cjs/components/agent-builder/components/AiTextArea.js.map +1 -0
- package/dist/cjs/components/agent-builder/components/DiscardModal.js +2 -0
- package/dist/cjs/components/agent-builder/components/DiscardModal.js.map +1 -0
- package/dist/cjs/components/agent-builder/components/GoLiveModal.js +2 -0
- package/dist/cjs/components/agent-builder/components/GoLiveModal.js.map +1 -0
- package/dist/cjs/components/agent-builder/components/InstructionsField.js +2 -0
- package/dist/cjs/components/agent-builder/components/InstructionsField.js.map +1 -0
- package/dist/cjs/components/agent-builder/components/MentionPicker.js +47 -0
- package/dist/cjs/components/agent-builder/components/MentionPicker.js.map +1 -0
- package/dist/cjs/components/agent-builder/components/RichTextField.js +2 -0
- package/dist/cjs/components/agent-builder/components/RichTextField.js.map +1 -0
- package/dist/cjs/components/agent-builder/components/SelectableListSection.js +2 -0
- package/dist/cjs/components/agent-builder/components/SelectableListSection.js.map +1 -0
- package/dist/cjs/components/agent-builder/components/StepRail.js +2 -0
- package/dist/cjs/components/agent-builder/components/StepRail.js.map +1 -0
- package/dist/cjs/components/agent-builder/components/StepSectionHeader.js +2 -0
- package/dist/cjs/components/agent-builder/components/StepSectionHeader.js.map +1 -0
- package/dist/cjs/components/agent-builder/constants/charLimits.js +2 -0
- package/dist/cjs/components/agent-builder/constants/charLimits.js.map +1 -0
- package/dist/cjs/components/agent-builder/constants/editorStyle.js +2 -0
- package/dist/cjs/components/agent-builder/constants/editorStyle.js.map +1 -0
- package/dist/cjs/components/agent-builder/constants/steps.js +2 -0
- package/dist/cjs/components/agent-builder/constants/steps.js.map +1 -0
- package/dist/cjs/components/agent-builder/context/AgentBuilderContext.js +2 -0
- package/dist/cjs/components/agent-builder/context/AgentBuilderContext.js.map +1 -0
- package/dist/cjs/components/agent-builder/hooks/useAgentDraft.js +2 -0
- package/dist/cjs/components/agent-builder/hooks/useAgentDraft.js.map +1 -0
- package/dist/cjs/components/agent-builder/steps/Step1About.js +2 -0
- package/dist/cjs/components/agent-builder/steps/Step1About.js.map +1 -0
- package/dist/cjs/components/agent-builder/steps/Step2WhenItStepsIn.js +2 -0
- package/dist/cjs/components/agent-builder/steps/Step2WhenItStepsIn.js.map +1 -0
- package/dist/cjs/components/agent-builder/steps/Step3HowItResponds.js +2 -0
- package/dist/cjs/components/agent-builder/steps/Step3HowItResponds.js.map +1 -0
- package/dist/cjs/components/agent-builder/steps/Step4HandoverRules.js +2 -0
- package/dist/cjs/components/agent-builder/steps/Step4HandoverRules.js.map +1 -0
- package/dist/cjs/components/agent-builder/utils/mentionSerialization.js +4 -0
- package/dist/cjs/components/agent-builder/utils/mentionSerialization.js.map +1 -0
- package/dist/cjs/components/agent-listing/AgentListing.js +2 -0
- package/dist/cjs/components/agent-listing/AgentListing.js.map +1 -0
- package/dist/cjs/components/agent-listing/AgentListing.styled.js +115 -0
- package/dist/cjs/components/agent-listing/AgentListing.styled.js.map +1 -0
- package/dist/cjs/components/agent-listing/AgentListingFilters.js +2 -0
- package/dist/cjs/components/agent-listing/AgentListingFilters.js.map +1 -0
- package/dist/cjs/components/agent-listing/AgentListingHeader.js +2 -0
- package/dist/cjs/components/agent-listing/AgentListingHeader.js.map +1 -0
- package/dist/cjs/components/agent-listing/AgentTable.js +2 -0
- package/dist/cjs/components/agent-listing/AgentTable.js.map +1 -0
- package/dist/cjs/components/agent-listing/AgentTableRow.js +2 -0
- package/dist/cjs/components/agent-listing/AgentTableRow.js.map +1 -0
- package/dist/cjs/components/avatar/Avatar.js +1 -1
- package/dist/cjs/components/avatar/Avatar.js.map +1 -1
- package/dist/cjs/components/avatar/Avatar.styled.js +4 -4
- package/dist/cjs/components/avatar/Avatar.styled.js.map +1 -1
- package/dist/cjs/components/avatar/AvatarHelper.js +1 -1
- package/dist/cjs/components/avatar/AvatarHelper.js.map +1 -1
- package/dist/cjs/components/bik-layout/BikSidebar.js.map +1 -1
- package/dist/cjs/components/bik-layout/CommonStyles.js +1 -1
- package/dist/cjs/components/bik-layout/CommonStyles.js.map +1 -1
- package/dist/cjs/components/button/Button.js +1 -1
- package/dist/cjs/components/button/Button.js.map +1 -1
- package/dist/cjs/components/button/Button.styled.js +13 -13
- package/dist/cjs/components/button/Button.styled.js.map +1 -1
- package/dist/cjs/components/button/themes.js +6 -6
- package/dist/cjs/components/button/themes.js.map +1 -1
- package/dist/cjs/components/checkBox/CheckBox.js +1 -1
- package/dist/cjs/components/checkBox/CheckBox.js.map +1 -1
- package/dist/cjs/components/country-code-picker/CountryCodePicker.js.map +1 -1
- package/dist/cjs/components/country-code-picker/CountryPicker.js.map +1 -1
- package/dist/cjs/components/dropdown/Dropdown.js +1 -1
- package/dist/cjs/components/dropdown/Dropdown.js.map +1 -1
- package/dist/cjs/components/dropdown/DropdownPopover/index.js +1 -1
- package/dist/cjs/components/dropdown/DropdownPopover/index.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.js +8 -9
- package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/description/Description.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/description/Description.styled.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuItem.js +9 -9
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuItem.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.styled.js +2 -6
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.styled.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.js.map +1 -1
- package/dist/cjs/components/dropdown-button/DropdownButton.js +1 -1
- package/dist/cjs/components/dropdown-button/DropdownButton.js.map +1 -1
- package/dist/cjs/components/dropdown-button/DropdownButton.style.js +6 -20
- package/dist/cjs/components/dropdown-button/DropdownButton.style.js.map +1 -1
- package/dist/cjs/components/fab-menu/FABMenu.js.map +1 -1
- package/dist/cjs/components/icon-button/IconButton.js +1 -1
- package/dist/cjs/components/icon-button/IconButton.js.map +1 -1
- package/dist/cjs/components/icon-button/IconButton.styled.js +12 -18
- package/dist/cjs/components/icon-button/IconButton.styled.js.map +1 -1
- package/dist/cjs/components/icon-button/theme.js +1 -1
- package/dist/cjs/components/icon-button/theme.js.map +1 -1
- package/dist/cjs/components/input/Input.js +1 -1
- package/dist/cjs/components/input/Input.js.map +1 -1
- package/dist/cjs/components/input/Input.styled.js +16 -27
- package/dist/cjs/components/input/Input.styled.js.map +1 -1
- package/dist/cjs/components/input-with-vars/InputWithVariables.js +3 -3
- package/dist/cjs/components/input-with-vars/InputWithVariables.js.map +1 -1
- package/dist/cjs/components/list-item/ListItem.js +1 -1
- package/dist/cjs/components/list-item/ListItem.js.map +1 -1
- package/dist/cjs/components/list-item/ListItem.styled.js +6 -6
- package/dist/cjs/components/list-item/ListItem.styled.js.map +1 -1
- package/dist/cjs/components/list-item/themes.js +20 -32
- package/dist/cjs/components/list-item/themes.js.map +1 -1
- package/dist/cjs/components/multi-level-dropdown/GroupedMenuList.js +1 -1
- package/dist/cjs/components/multi-level-dropdown/GroupedMenuList.js.map +1 -1
- package/dist/cjs/components/multi-level-dropdown/MenuItem.js +1 -1
- package/dist/cjs/components/multi-level-dropdown/MenuItem.js.map +1 -1
- package/dist/cjs/components/multi-level-dropdown/MenuList.js +1 -1
- package/dist/cjs/components/multi-level-dropdown/MenuList.js.map +1 -1
- package/dist/cjs/components/multi-level-dropdown/MultiLevelDropdown.js +1 -1
- package/dist/cjs/components/multi-level-dropdown/MultiLevelDropdown.js.map +1 -1
- package/dist/cjs/components/multi-level-dropdown/MultiLevelDropdown.styled.js +29 -32
- package/dist/cjs/components/multi-level-dropdown/MultiLevelDropdown.styled.js.map +1 -1
- package/dist/cjs/components/tag/Tag.js +1 -1
- package/dist/cjs/components/tag/Tag.js.map +1 -1
- package/dist/cjs/components/tag/Tag.styled.js +4 -4
- package/dist/cjs/components/tag/Tag.styled.js.map +1 -1
- package/dist/cjs/components/tag/model.js.map +1 -1
- package/dist/cjs/components/variable-picker-v3/Content.js +1 -1
- package/dist/cjs/components/variable-picker-v3/Content.js.map +1 -1
- package/dist/cjs/components/variable-picker-v3/model.js.map +1 -1
- package/dist/cjs/components/whats-new/WhatsNew.js +1 -1
- package/dist/cjs/components/whats-new/WhatsNew.js.map +1 -1
- package/dist/cjs/components/whats-new/WhatsNewButton.js +2 -2
- package/dist/cjs/components/whats-new/WhatsNewButton.js.map +1 -1
- package/dist/cjs/components/whats-new/WhatsNewPanel.js.map +1 -1
- package/dist/cjs/constants/Theme.js +1 -1
- package/dist/cjs/constants/Theme.js.map +1 -1
- package/dist/cjs/editor/BikEditor.js +1 -1
- package/dist/cjs/editor/BikEditor.js.map +1 -1
- package/dist/cjs/editor/BikEditor.styles.js +14 -1
- package/dist/cjs/editor/BikEditor.styles.js.map +1 -1
- package/dist/cjs/editor/BikEditor.types.js.map +1 -1
- package/dist/cjs/editor/BikEditor.utils.js +2 -2
- package/dist/cjs/editor/BikEditor.utils.js.map +1 -1
- package/dist/cjs/editor/extensions/buildExtensions.js +1 -1
- package/dist/cjs/editor/extensions/buildExtensions.js.map +1 -1
- package/dist/cjs/editor/extensions/editorDropdown.styles.js +15 -10
- package/dist/cjs/editor/extensions/editorDropdown.styles.js.map +1 -1
- package/dist/cjs/editor/extensions/mention/MentionDropdown.js +1 -1
- package/dist/cjs/editor/extensions/mention/MentionDropdown.js.map +1 -1
- package/dist/cjs/editor/extensions/mention/MentionExtension.js +1 -1
- package/dist/cjs/editor/extensions/mention/MentionExtension.js.map +1 -1
- package/dist/cjs/icons/Arrows/Chevron/ChevronUp.js +1 -1
- package/dist/cjs/icons/Arrows/Chevron/ChevronUp.js.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/esm/assets/icons/ManifestGlass.svg.js +6 -0
- package/dist/esm/assets/icons/ManifestGlass.svg.js.map +1 -0
- package/dist/esm/assets/icons/playOutline.svg.js +6 -0
- package/dist/esm/assets/icons/playOutline.svg.js.map +1 -0
- package/dist/esm/components/BikGiftedChat/Bubble/Bubble.js +59 -61
- package/dist/esm/components/BikGiftedChat/Bubble/Bubble.js.map +1 -1
- package/dist/esm/components/BikGiftedChat/GiftedChat/Day.d.ts +0 -6
- package/dist/esm/components/BikGiftedChat/GiftedChat/Day.js +88 -124
- package/dist/esm/components/BikGiftedChat/GiftedChat/Day.js.map +1 -1
- package/dist/esm/components/BikGiftedChat/GiftedChat/GiftedChat.js +128 -225
- package/dist/esm/components/BikGiftedChat/GiftedChat/GiftedChat.js.map +1 -1
- package/dist/esm/components/BikGiftedChat/GiftedChat/types.d.ts +2 -6
- package/dist/esm/components/BikGiftedChat/GiftedChat/types.js.map +1 -1
- package/dist/esm/components/TypographyStyle.d.ts +0 -8
- package/dist/esm/components/TypographyStyle.js +40 -63
- package/dist/esm/components/TypographyStyle.js.map +1 -1
- package/dist/esm/components/agent-builder/AgentBuilder.d.ts +18 -0
- package/dist/esm/components/agent-builder/AgentBuilder.js +190 -0
- package/dist/esm/components/agent-builder/AgentBuilder.js.map +1 -0
- package/dist/esm/components/agent-builder/AgentBuilder.model.d.ts +73 -0
- package/dist/esm/components/agent-builder/AgentBuilder.styled.d.ts +121 -0
- package/dist/esm/components/agent-builder/AgentBuilder.styled.js +353 -0
- package/dist/esm/components/agent-builder/AgentBuilder.styled.js.map +1 -0
- package/dist/esm/components/agent-builder/components/AgentBuilderFooter.d.ts +10 -0
- package/dist/esm/components/agent-builder/components/AgentBuilderFooter.js +70 -0
- package/dist/esm/components/agent-builder/components/AgentBuilderFooter.js.map +1 -0
- package/dist/esm/components/agent-builder/components/AgentBuilderTopBar.d.ts +12 -0
- package/dist/esm/components/agent-builder/components/AgentBuilderTopBar.js +73 -0
- package/dist/esm/components/agent-builder/components/AgentBuilderTopBar.js.map +1 -0
- package/dist/esm/components/agent-builder/components/AiTextArea.d.ts +14 -0
- package/dist/esm/components/agent-builder/components/AiTextArea.js +44 -0
- package/dist/esm/components/agent-builder/components/AiTextArea.js.map +1 -0
- package/dist/esm/components/agent-builder/components/DiscardModal.d.ts +18 -0
- package/dist/esm/components/agent-builder/components/DiscardModal.js +54 -0
- package/dist/esm/components/agent-builder/components/DiscardModal.js.map +1 -0
- package/dist/esm/components/agent-builder/components/GoLiveModal.d.ts +18 -0
- package/dist/esm/components/agent-builder/components/GoLiveModal.js +73 -0
- package/dist/esm/components/agent-builder/components/GoLiveModal.js.map +1 -0
- package/dist/esm/components/agent-builder/components/InstructionsField.d.ts +2 -0
- package/dist/esm/components/agent-builder/components/InstructionsField.js +81 -0
- package/dist/esm/components/agent-builder/components/InstructionsField.js.map +1 -0
- package/dist/esm/components/agent-builder/components/MentionPicker.d.ts +12 -0
- package/dist/esm/components/agent-builder/components/MentionPicker.js +154 -0
- package/dist/esm/components/agent-builder/components/MentionPicker.js.map +1 -0
- package/dist/esm/components/agent-builder/components/RichTextField.d.ts +21 -0
- package/dist/esm/components/agent-builder/components/RichTextField.js +66 -0
- package/dist/esm/components/agent-builder/components/RichTextField.js.map +1 -0
- package/dist/esm/components/agent-builder/components/SelectableListSection.d.ts +19 -0
- package/dist/esm/components/agent-builder/components/SelectableListSection.js +79 -0
- package/dist/esm/components/agent-builder/components/SelectableListSection.js.map +1 -0
- package/dist/esm/components/agent-builder/components/StepRail.d.ts +2 -0
- package/dist/esm/components/agent-builder/components/StepRail.js +35 -0
- package/dist/esm/components/agent-builder/components/StepRail.js.map +1 -0
- package/dist/esm/components/agent-builder/components/StepSectionHeader.d.ts +7 -0
- package/dist/esm/components/agent-builder/components/StepSectionHeader.js +15 -0
- package/dist/esm/components/agent-builder/components/StepSectionHeader.js.map +1 -0
- package/dist/esm/components/agent-builder/constants/charLimits.d.ts +21 -0
- package/dist/esm/components/agent-builder/constants/charLimits.js +18 -0
- package/dist/esm/components/agent-builder/constants/charLimits.js.map +1 -0
- package/dist/esm/components/agent-builder/constants/editorStyle.d.ts +8 -0
- package/dist/esm/components/agent-builder/constants/editorStyle.js +10 -0
- package/dist/esm/components/agent-builder/constants/editorStyle.js.map +1 -0
- package/dist/esm/components/agent-builder/constants/steps.d.ts +13 -0
- package/dist/esm/components/agent-builder/constants/steps.js +32 -0
- package/dist/esm/components/agent-builder/constants/steps.js.map +1 -0
- package/dist/esm/components/agent-builder/context/AgentBuilderContext.d.ts +53 -0
- package/dist/esm/components/agent-builder/context/AgentBuilderContext.js +118 -0
- package/dist/esm/components/agent-builder/context/AgentBuilderContext.js.map +1 -0
- package/dist/esm/components/agent-builder/hooks/useAgentDraft.d.ts +24 -0
- package/dist/esm/components/agent-builder/hooks/useAgentDraft.js +27 -0
- package/dist/esm/components/agent-builder/hooks/useAgentDraft.js.map +1 -0
- package/dist/esm/components/agent-builder/index.d.ts +7 -0
- package/dist/esm/components/agent-builder/steps/Step1About.d.ts +2 -0
- package/dist/esm/components/agent-builder/steps/Step1About.js +43 -0
- package/dist/esm/components/agent-builder/steps/Step1About.js.map +1 -0
- package/dist/esm/components/agent-builder/steps/Step2WhenItStepsIn.d.ts +2 -0
- package/dist/esm/components/agent-builder/steps/Step2WhenItStepsIn.js +148 -0
- package/dist/esm/components/agent-builder/steps/Step2WhenItStepsIn.js.map +1 -0
- package/dist/esm/components/agent-builder/steps/Step3HowItResponds.d.ts +2 -0
- package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js +112 -0
- package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js.map +1 -0
- package/dist/esm/components/agent-builder/steps/Step4HandoverRules.d.ts +2 -0
- package/dist/esm/components/agent-builder/steps/Step4HandoverRules.js +83 -0
- package/dist/esm/components/agent-builder/steps/Step4HandoverRules.js.map +1 -0
- package/dist/esm/components/agent-builder/utils/mentionSerialization.d.ts +55 -0
- package/dist/esm/components/agent-builder/utils/mentionSerialization.js +95 -0
- package/dist/esm/components/agent-builder/utils/mentionSerialization.js.map +1 -0
- package/dist/esm/components/agent-listing/AgentListing.d.ts +18 -0
- package/dist/esm/components/agent-listing/AgentListing.js +141 -0
- package/dist/esm/components/agent-listing/AgentListing.js.map +1 -0
- package/dist/esm/components/agent-listing/AgentListing.model.d.ts +69 -0
- package/dist/esm/components/agent-listing/AgentListing.styled.d.ts +56 -0
- package/dist/esm/components/agent-listing/AgentListing.styled.js +145 -0
- package/dist/esm/components/agent-listing/AgentListing.styled.js.map +1 -0
- package/dist/esm/components/agent-listing/AgentListingFilters.d.ts +16 -0
- package/dist/esm/components/agent-listing/AgentListingFilters.js +81 -0
- package/dist/esm/components/agent-listing/AgentListingFilters.js.map +1 -0
- package/dist/esm/components/agent-listing/AgentListingHeader.d.ts +8 -0
- package/dist/esm/components/agent-listing/AgentListingHeader.js +40 -0
- package/dist/esm/components/agent-listing/AgentListingHeader.js.map +1 -0
- package/dist/esm/components/agent-listing/AgentTable.d.ts +10 -0
- package/dist/esm/components/agent-listing/AgentTable.js +33 -0
- package/dist/esm/components/agent-listing/AgentTable.js.map +1 -0
- package/dist/esm/components/agent-listing/AgentTableRow.d.ts +10 -0
- package/dist/esm/components/agent-listing/AgentTableRow.js +88 -0
- package/dist/esm/components/agent-listing/AgentTableRow.js.map +1 -0
- package/dist/esm/components/agent-listing/index.d.ts +2 -0
- package/dist/esm/components/avatar/Avatar.d.ts +1 -2
- package/dist/esm/components/avatar/Avatar.js +73 -51
- package/dist/esm/components/avatar/Avatar.js.map +1 -1
- package/dist/esm/components/avatar/Avatar.styled.js +8 -8
- package/dist/esm/components/avatar/Avatar.styled.js.map +1 -1
- package/dist/esm/components/avatar/AvatarHelper.d.ts +4 -5
- package/dist/esm/components/avatar/AvatarHelper.js +4 -4
- package/dist/esm/components/avatar/AvatarHelper.js.map +1 -1
- package/dist/esm/components/bik-layout/BikSidebar.js.map +1 -1
- package/dist/esm/components/bik-layout/CommonStyles.js +1 -1
- package/dist/esm/components/bik-layout/CommonStyles.js.map +1 -1
- package/dist/esm/components/bik-layout/index.d.ts +0 -2
- package/dist/esm/components/button/Button.js +31 -31
- package/dist/esm/components/button/Button.js.map +1 -1
- package/dist/esm/components/button/Button.styled.d.ts +1 -1
- package/dist/esm/components/button/Button.styled.js +20 -20
- package/dist/esm/components/button/Button.styled.js.map +1 -1
- package/dist/esm/components/button/model.d.ts +3 -3
- package/dist/esm/components/button/themes.d.ts +2 -2
- package/dist/esm/components/button/themes.js +17 -31
- package/dist/esm/components/button/themes.js.map +1 -1
- package/dist/esm/components/checkBox/CheckBox.d.ts +0 -1
- package/dist/esm/components/checkBox/CheckBox.js +63 -82
- package/dist/esm/components/checkBox/CheckBox.js.map +1 -1
- package/dist/esm/components/country-code-picker/CountryCodePicker.d.ts +1 -1
- package/dist/esm/components/country-code-picker/CountryCodePicker.js.map +1 -1
- package/dist/esm/components/country-code-picker/CountryPicker.d.ts +1 -1
- package/dist/esm/components/country-code-picker/CountryPicker.js.map +1 -1
- package/dist/esm/components/dropdown/Dropdown.js +67 -67
- package/dist/esm/components/dropdown/Dropdown.js.map +1 -1
- package/dist/esm/components/dropdown/DropdownPopover/index.js +61 -74
- package/dist/esm/components/dropdown/DropdownPopover/index.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +174 -183
- package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.d.ts +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.js +4 -5
- package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/description/Description.d.ts +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/description/Description.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/description/Description.styled.d.ts +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/description/Description.styled.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.d.ts +1 -3
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.js +20 -29
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.d.ts +1 -3
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.js +87 -93
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.d.ts +1 -3
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.js +61 -68
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.styled.d.ts +1 -2
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.styled.js +2 -7
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.styled.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.d.ts +1 -3
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.js +10 -18
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.d.ts +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.js +18 -18
- package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.d.ts +0 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.js +17 -43
- package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/utils/iterationOnOptions.d.ts +0 -2
- package/dist/esm/components/dropdown/hooks/useDropdown.d.ts +0 -2
- package/dist/esm/components/dropdown/type.d.ts +1 -6
- package/dist/esm/components/dropdown-button/DropdownButton.d.ts +1 -3
- package/dist/esm/components/dropdown-button/DropdownButton.js +17 -71
- package/dist/esm/components/dropdown-button/DropdownButton.js.map +1 -1
- package/dist/esm/components/dropdown-button/DropdownButton.style.d.ts +2 -9
- package/dist/esm/components/dropdown-button/DropdownButton.style.js +9 -35
- package/dist/esm/components/dropdown-button/DropdownButton.style.js.map +1 -1
- package/dist/esm/components/fab-menu/FABMenu.d.ts +1 -1
- package/dist/esm/components/fab-menu/FABMenu.js.map +1 -1
- package/dist/esm/components/icon-button/IconButton.js +32 -36
- package/dist/esm/components/icon-button/IconButton.js.map +1 -1
- package/dist/esm/components/icon-button/IconButton.styled.d.ts +1 -3
- package/dist/esm/components/icon-button/IconButton.styled.js +14 -20
- package/dist/esm/components/icon-button/IconButton.styled.js.map +1 -1
- package/dist/esm/components/icon-button/model.d.ts +1 -12
- package/dist/esm/components/icon-button/theme.js +10 -12
- package/dist/esm/components/icon-button/theme.js.map +1 -1
- package/dist/esm/components/input/Input.js +115 -119
- package/dist/esm/components/input/Input.js.map +1 -1
- package/dist/esm/components/input/Input.model.d.ts +3 -2
- package/dist/esm/components/input/Input.styled.d.ts +1 -8
- package/dist/esm/components/input/Input.styled.js +22 -34
- package/dist/esm/components/input/Input.styled.js.map +1 -1
- package/dist/esm/components/input-with-vars/InputWithVariables.d.ts +2 -0
- package/dist/esm/components/input-with-vars/InputWithVariables.js +81 -75
- package/dist/esm/components/input-with-vars/InputWithVariables.js.map +1 -1
- package/dist/esm/components/list-item/List.model.d.ts +1 -2
- package/dist/esm/components/list-item/ListItem.js +38 -40
- package/dist/esm/components/list-item/ListItem.js.map +1 -1
- package/dist/esm/components/list-item/ListItem.styled.d.ts +1 -2
- package/dist/esm/components/list-item/ListItem.styled.js +8 -8
- package/dist/esm/components/list-item/ListItem.styled.js.map +1 -1
- package/dist/esm/components/list-item/themes.d.ts +2 -2
- package/dist/esm/components/list-item/themes.js +6 -20
- package/dist/esm/components/list-item/themes.js.map +1 -1
- package/dist/esm/components/multi-level-dropdown/GroupedMenuList.d.ts +0 -1
- package/dist/esm/components/multi-level-dropdown/GroupedMenuList.js +28 -30
- package/dist/esm/components/multi-level-dropdown/GroupedMenuList.js.map +1 -1
- package/dist/esm/components/multi-level-dropdown/MenuItem.d.ts +0 -1
- package/dist/esm/components/multi-level-dropdown/MenuItem.js +54 -57
- package/dist/esm/components/multi-level-dropdown/MenuItem.js.map +1 -1
- package/dist/esm/components/multi-level-dropdown/MenuList.d.ts +0 -1
- package/dist/esm/components/multi-level-dropdown/MenuList.js +42 -46
- package/dist/esm/components/multi-level-dropdown/MenuList.js.map +1 -1
- package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.js +59 -95
- package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.js.map +1 -1
- package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.styled.d.ts +3 -13
- package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.styled.js +41 -50
- package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.styled.js.map +1 -1
- package/dist/esm/components/multi-level-dropdown/type.d.ts +0 -1
- package/dist/esm/components/tag/Tag.d.ts +1 -1
- package/dist/esm/components/tag/Tag.js +18 -22
- package/dist/esm/components/tag/Tag.js.map +1 -1
- package/dist/esm/components/tag/Tag.styled.d.ts +1 -3
- package/dist/esm/components/tag/Tag.styled.js +7 -7
- package/dist/esm/components/tag/Tag.styled.js.map +1 -1
- package/dist/esm/components/tag/model.d.ts +1 -5
- package/dist/esm/components/tag/model.js.map +1 -1
- package/dist/esm/components/variable-picker-v3/Content.js +69 -69
- package/dist/esm/components/variable-picker-v3/Content.js.map +1 -1
- package/dist/esm/components/variable-picker-v3/model.d.ts +2 -0
- package/dist/esm/components/variable-picker-v3/model.js.map +1 -1
- package/dist/esm/components/whats-new/WhatsNew.d.ts +0 -2
- package/dist/esm/components/whats-new/WhatsNew.js +19 -23
- package/dist/esm/components/whats-new/WhatsNew.js.map +1 -1
- package/dist/esm/components/whats-new/WhatsNew.types.d.ts +0 -2
- package/dist/esm/components/whats-new/WhatsNewButton.js +38 -34
- package/dist/esm/components/whats-new/WhatsNewButton.js.map +1 -1
- package/dist/esm/components/whats-new/WhatsNewPanel.js.map +1 -1
- package/dist/esm/constants/Theme.d.ts +0 -36
- package/dist/esm/constants/Theme.js +1 -21
- package/dist/esm/constants/Theme.js.map +1 -1
- package/dist/esm/editor/BikEditor.js +19 -18
- package/dist/esm/editor/BikEditor.js.map +1 -1
- package/dist/esm/editor/BikEditor.styles.js +13 -0
- package/dist/esm/editor/BikEditor.styles.js.map +1 -1
- package/dist/esm/editor/BikEditor.types.d.ts +14 -0
- package/dist/esm/editor/BikEditor.types.js.map +1 -1
- package/dist/esm/editor/BikEditor.utils.js +76 -75
- package/dist/esm/editor/BikEditor.utils.js.map +1 -1
- package/dist/esm/editor/extensions/buildExtensions.d.ts +1 -0
- package/dist/esm/editor/extensions/buildExtensions.js +31 -29
- package/dist/esm/editor/extensions/buildExtensions.js.map +1 -1
- package/dist/esm/editor/extensions/editorDropdown.styles.d.ts +2 -8
- package/dist/esm/editor/extensions/editorDropdown.styles.js +22 -18
- package/dist/esm/editor/extensions/editorDropdown.styles.js.map +1 -1
- package/dist/esm/editor/extensions/mention/MentionDropdown.js +34 -28
- package/dist/esm/editor/extensions/mention/MentionDropdown.js.map +1 -1
- package/dist/esm/editor/extensions/mention/MentionExtension.d.ts +2 -2
- package/dist/esm/editor/extensions/mention/MentionExtension.js +81 -60
- package/dist/esm/editor/extensions/mention/MentionExtension.js.map +1 -1
- package/dist/esm/icons/Arrows/Chevron/ChevronUp.d.ts +2 -1
- package/dist/esm/icons/Arrows/Chevron/ChevronUp.js +28 -24
- package/dist/esm/icons/Arrows/Chevron/ChevronUp.js.map +1 -1
- package/dist/esm/icons/index.d.ts +24 -24
- package/dist/esm/index.d.ts +2 -1
- package/dist/esm/index.js +806 -798
- package/dist/esm/index.js.map +1 -1
- package/package.json +3 -2
- package/dist/cjs/components/bik-layout/BikSidebarV2/BikSidebarV2.js +0 -2
- package/dist/cjs/components/bik-layout/BikSidebarV2/BikSidebarV2.js.map +0 -1
- package/dist/cjs/components/bik-layout/BikSidebarV2/SidebarV2Popup.js +0 -2
- package/dist/cjs/components/bik-layout/BikSidebarV2/SidebarV2Popup.js.map +0 -1
- package/dist/cjs/components/bik-layout/BikSidebarV2/SidebarV2Styles.js +0 -294
- package/dist/cjs/components/bik-layout/BikSidebarV2/SidebarV2Styles.js.map +0 -1
- package/dist/cjs/components/bik-layout/BikSidebarV2/SimpleSidebarV2.js +0 -2
- package/dist/cjs/components/bik-layout/BikSidebarV2/SimpleSidebarV2.js.map +0 -1
- package/dist/cjs/components/dual-icon-button/DualIconButton.js +0 -2
- package/dist/cjs/components/dual-icon-button/DualIconButton.js.map +0 -1
- package/dist/cjs/components/dual-icon-button/DualIconButton.styled.js +0 -33
- package/dist/cjs/components/dual-icon-button/DualIconButton.styled.js.map +0 -1
- package/dist/esm/components/bik-layout/BikSidebarV2/BikSidebarV2.d.ts +0 -33
- package/dist/esm/components/bik-layout/BikSidebarV2/BikSidebarV2.js +0 -272
- package/dist/esm/components/bik-layout/BikSidebarV2/BikSidebarV2.js.map +0 -1
- package/dist/esm/components/bik-layout/BikSidebarV2/SidebarV2.model.d.ts +0 -27
- package/dist/esm/components/bik-layout/BikSidebarV2/SidebarV2Popup.d.ts +0 -12
- package/dist/esm/components/bik-layout/BikSidebarV2/SidebarV2Popup.js +0 -53
- package/dist/esm/components/bik-layout/BikSidebarV2/SidebarV2Popup.js.map +0 -1
- package/dist/esm/components/bik-layout/BikSidebarV2/SidebarV2Styles.d.ts +0 -44
- package/dist/esm/components/bik-layout/BikSidebarV2/SidebarV2Styles.js +0 -310
- package/dist/esm/components/bik-layout/BikSidebarV2/SidebarV2Styles.js.map +0 -1
- package/dist/esm/components/bik-layout/BikSidebarV2/SimpleSidebarV2.d.ts +0 -2
- package/dist/esm/components/bik-layout/BikSidebarV2/SimpleSidebarV2.js +0 -107
- package/dist/esm/components/bik-layout/BikSidebarV2/SimpleSidebarV2.js.map +0 -1
- package/dist/esm/components/dual-icon-button/DualIconButton.d.ts +0 -3
- package/dist/esm/components/dual-icon-button/DualIconButton.js +0 -53
- package/dist/esm/components/dual-icon-button/DualIconButton.js.map +0 -1
- package/dist/esm/components/dual-icon-button/DualIconButton.styled.d.ts +0 -7
- package/dist/esm/components/dual-icon-button/DualIconButton.styled.js +0 -40
- package/dist/esm/components/dual-icon-button/DualIconButton.styled.js.map +0 -1
- package/dist/esm/components/dual-icon-button/index.d.ts +0 -2
- package/dist/esm/components/dual-icon-button/model.d.ts +0 -12
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { useRef as o, useReducer as l, useCallback as u } from "react";
|
|
2
|
+
const h = (e, t) => {
|
|
3
|
+
switch (t.type) {
|
|
4
|
+
case "patch":
|
|
5
|
+
return { ...e, ...t.patch };
|
|
6
|
+
case "set":
|
|
7
|
+
return t.value;
|
|
8
|
+
default:
|
|
9
|
+
return e;
|
|
10
|
+
}
|
|
11
|
+
}, d = (e) => {
|
|
12
|
+
const t = o(e), [c, s] = l(h, e), a = u(
|
|
13
|
+
(r) => s({ type: "patch", patch: r }),
|
|
14
|
+
[]
|
|
15
|
+
), n = u(
|
|
16
|
+
(r) => s({ type: "set", value: r }),
|
|
17
|
+
[]
|
|
18
|
+
), p = u(
|
|
19
|
+
() => s({ type: "set", value: t.current }),
|
|
20
|
+
[]
|
|
21
|
+
);
|
|
22
|
+
return { value: c, onChange: a, setValue: n, reset: p };
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
d as useAgentDraft
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=useAgentDraft.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAgentDraft.js","sources":["../../../../../src/components/agent-builder/hooks/useAgentDraft.ts"],"sourcesContent":["import { useCallback, useReducer, useRef } from 'react';\nimport { AgentValue } from '../AgentBuilder.model';\n\ntype DraftAction =\n\t| { type: 'patch'; patch: Partial<AgentValue> }\n\t| { type: 'set'; value: AgentValue };\n\nconst reducer = (state: AgentValue, action: DraftAction): AgentValue => {\n\tswitch (action.type) {\n\t\tcase 'patch':\n\t\t\treturn { ...state, ...action.patch };\n\t\tcase 'set':\n\t\t\treturn action.value;\n\t\tdefault:\n\t\t\treturn state;\n\t}\n};\n\nexport interface AgentDraft {\n\t/** Current draft value — pass straight to `<AgentBuilder value={...} />`. */\n\tvalue: AgentValue;\n\t/** Merge a partial — pass straight to `<AgentBuilder onChange={...} />`. */\n\tonChange: (patch: Partial<AgentValue>) => void;\n\t/** Replace the whole value (e.g. after an async edit-mode load). */\n\tsetValue: (value: AgentValue) => void;\n\t/** Reset back to the initial value this hook was created with. */\n\treset: () => void;\n}\n\n/**\n * `useReducer`-based state helper for driving a controlled `<AgentBuilder />` from\n * the consumer (e.g. merchantAdminReact) without hand-writing the patch/merge logic.\n *\n * The consumer remains the single source of truth — this just packages the reducer.\n * For edit mode where the agent loads asynchronously, either key the host component\n * on the agent id, or call `setValue` once the data arrives.\n *\n * @example\n * const { value, onChange } = useAgentDraft(mapDocToAgentValue(doc));\n * <AgentBuilder value={value} onChange={onChange} onSaveDraft={() => save(value)} ... />\n */\nexport const useAgentDraft = (initial: AgentValue): AgentDraft => {\n\tconst initialRef = useRef(initial);\n\tconst [value, dispatch] = useReducer(reducer, initial);\n\n\tconst onChange = useCallback(\n\t\t(patch: Partial<AgentValue>) => dispatch({ type: 'patch', patch }),\n\t\t[],\n\t);\n\tconst setValue = useCallback(\n\t\t(next: AgentValue) => dispatch({ type: 'set', value: next }),\n\t\t[],\n\t);\n\tconst reset = useCallback(\n\t\t() => dispatch({ type: 'set', value: initialRef.current }),\n\t\t[],\n\t);\n\n\treturn { value, onChange, setValue, reset };\n};\n"],"names":["reducer","state","action","useAgentDraft","initial","initialRef","useRef","value","dispatch","useReducer","onChange","useCallback","patch","setValue","next","reset"],"mappings":";AAOA,MAAMA,IAAU,CAACC,GAAmBC,MAAoC;AACvE,UAAQA,EAAO,MAAA;AAAA,IACd,KAAK;AACJ,aAAO,EAAE,GAAGD,GAAO,GAAGC,EAAO,MAAA;AAAA,IAC9B,KAAK;AACJ,aAAOA,EAAO;AAAA,IACf;AACC,aAAOD;AAAA,EAAA;AAEV,GAyBaE,IAAgB,CAACC,MAAoC;AACjE,QAAMC,IAAaC,EAAOF,CAAO,GAC3B,CAACG,GAAOC,CAAQ,IAAIC,EAAWT,GAASI,CAAO,GAE/CM,IAAWC;AAAA,IAChB,CAACC,MAA+BJ,EAAS,EAAE,MAAM,SAAS,OAAAI,GAAO;AAAA,IACjE,CAAA;AAAA,EAAC,GAEIC,IAAWF;AAAA,IAChB,CAACG,MAAqBN,EAAS,EAAE,MAAM,OAAO,OAAOM,GAAM;AAAA,IAC3D,CAAA;AAAA,EAAC,GAEIC,IAAQJ;AAAA,IACb,MAAMH,EAAS,EAAE,MAAM,OAAO,OAAOH,EAAW,SAAS;AAAA,IACzD,CAAA;AAAA,EAAC;AAGF,SAAO,EAAE,OAAAE,GAAO,UAAAG,GAAU,UAAAG,GAAU,OAAAE,EAAA;AACrC;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { AgentBuilder } from './AgentBuilder';
|
|
2
|
+
export { useAgentDraft } from './hooks/useAgentDraft';
|
|
3
|
+
export type { AgentDraft } from './hooks/useAgentDraft';
|
|
4
|
+
export { AGENT_CHAR_LIMITS } from './constants/charLimits';
|
|
5
|
+
export { STEP_DEFINITIONS } from './constants/steps';
|
|
6
|
+
export { buildAgentMentionItems, editorDocToInstructions, instructionsToEditorHtml, } from './utils/mentionSerialization';
|
|
7
|
+
export type { AgentBuilderProps, AgentBuilderConfig, AgentValue, AgentStatus as AgentBuilderStatus, StepKey, StepValidation, TriggerMode, AgentTriggerValue, AgentHandoverConfig, HandoverMethod, AgentTool, SubAgentRef, IntentOption, ModelOption, } from './AgentBuilder.model';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { AiTextArea as m } from "../components/AiTextArea.js";
|
|
3
|
+
import { StepSectionHeader as l } from "../components/StepSectionHeader.js";
|
|
4
|
+
import { AGENT_CHAR_LIMITS as n } from "../constants/charLimits.js";
|
|
5
|
+
import { STEP_DEFINITIONS as p } from "../constants/steps.js";
|
|
6
|
+
import { useAgentBuilderContext as s } from "../context/AgentBuilderContext.js";
|
|
7
|
+
import { Input as d } from "../../input/Input.js";
|
|
8
|
+
const o = p[0], f = () => {
|
|
9
|
+
const { value: i, updateField: a } = s();
|
|
10
|
+
return /* @__PURE__ */ r("div", { className: "bik-agent-step bik-agent-step--about", children: [
|
|
11
|
+
/* @__PURE__ */ e(l, { title: o.title, helper: o.helper }),
|
|
12
|
+
/* @__PURE__ */ e("div", { style: { marginBottom: 20 }, children: /* @__PURE__ */ e(
|
|
13
|
+
d,
|
|
14
|
+
{
|
|
15
|
+
"data-test": "agent-name",
|
|
16
|
+
labelText: "Agent name",
|
|
17
|
+
labelTextBold: !0,
|
|
18
|
+
placeholder: "Enter agent name",
|
|
19
|
+
value: i.name,
|
|
20
|
+
maxCharLimit: n.name,
|
|
21
|
+
maxCharLimitPosition: "TOP",
|
|
22
|
+
maxCharStyle: { fontSize: 12, lineHeight: "16px" },
|
|
23
|
+
onChangeText: (t) => a("name", t)
|
|
24
|
+
}
|
|
25
|
+
) }),
|
|
26
|
+
/* @__PURE__ */ e(
|
|
27
|
+
m,
|
|
28
|
+
{
|
|
29
|
+
"data-test": "agent-description",
|
|
30
|
+
label: "What it does",
|
|
31
|
+
value: i.description,
|
|
32
|
+
onChange: (t) => a("description", t),
|
|
33
|
+
maxLength: n.description,
|
|
34
|
+
placeholder: "Enter description",
|
|
35
|
+
minHeight: "200px"
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
] });
|
|
39
|
+
};
|
|
40
|
+
export {
|
|
41
|
+
f as Step1About
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=Step1About.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Step1About.js","sources":["../../../../../src/components/agent-builder/steps/Step1About.tsx"],"sourcesContent":["import React from 'react';\nimport { Input } from '@src/components/input';\nimport { AiTextArea } from '../components/AiTextArea';\nimport { StepSectionHeader } from '../components/StepSectionHeader';\nimport { AGENT_CHAR_LIMITS } from '../constants/charLimits';\nimport { STEP_DEFINITIONS } from '../constants/steps';\nimport { useAgentBuilderContext } from '../context/AgentBuilderContext';\n\nconst STEP = STEP_DEFINITIONS[0];\n\nexport const Step1About: React.FC = () => {\n\tconst { value, updateField } = useAgentBuilderContext();\n\n\treturn (\n\t\t<div className=\"bik-agent-step bik-agent-step--about\">\n\t\t\t<StepSectionHeader title={STEP.title} helper={STEP.helper} />\n\n\t\t\t<div style={{ marginBottom: 20 }}>\n\t\t\t\t<Input\n\t\t\t\t\tdata-test=\"agent-name\"\n\t\t\t\t\tlabelText=\"Agent name\"\n\t\t\t\t\tlabelTextBold\n\t\t\t\t\tplaceholder=\"Enter agent name\"\n\t\t\t\t\tvalue={value.name}\n\t\t\t\t\tmaxCharLimit={AGENT_CHAR_LIMITS.name}\n\t\t\t\t\tmaxCharLimitPosition=\"TOP\"\n\t\t\t\t\tmaxCharStyle={{ fontSize: 12, lineHeight: '16px' }}\n\t\t\t\t\tonChangeText={(text) => updateField('name', text)}\n\t\t\t\t/>\n\t\t\t</div>\n\n\t\t\t<AiTextArea\n\t\t\t\tdata-test=\"agent-description\"\n\t\t\t\tlabel=\"What it does\"\n\t\t\t\tvalue={value.description}\n\t\t\t\tonChange={(text) => updateField('description', text)}\n\t\t\t\tmaxLength={AGENT_CHAR_LIMITS.description}\n\t\t\t\tplaceholder=\"Enter description\"\n\t\t\t\tminHeight=\"200px\"\n\t\t\t/>\n\t\t</div>\n\t);\n};\n"],"names":["STEP","STEP_DEFINITIONS","Step1About","value","updateField","useAgentBuilderContext","jsxs","jsx","StepSectionHeader","Input","AGENT_CHAR_LIMITS","text","AiTextArea"],"mappings":";;;;;;;AAQA,MAAMA,IAAOC,EAAiB,CAAC,GAElBC,IAAuB,MAAM;AACzC,QAAM,EAAE,OAAAC,GAAO,aAAAC,EAAA,IAAgBC,EAAA;AAE/B,SACC,gBAAAC,EAAC,OAAA,EAAI,WAAU,wCACd,UAAA;AAAA,IAAA,gBAAAC,EAACC,KAAkB,OAAOR,EAAK,OAAO,QAAQA,EAAK,QAAQ;AAAA,sBAE1D,OAAA,EAAI,OAAO,EAAE,cAAc,MAC3B,UAAA,gBAAAO;AAAA,MAACE;AAAA,MAAA;AAAA,QACA,aAAU;AAAA,QACV,WAAU;AAAA,QACV,eAAa;AAAA,QACb,aAAY;AAAA,QACZ,OAAON,EAAM;AAAA,QACb,cAAcO,EAAkB;AAAA,QAChC,sBAAqB;AAAA,QACrB,cAAc,EAAE,UAAU,IAAI,YAAY,OAAA;AAAA,QAC1C,cAAc,CAACC,MAASP,EAAY,QAAQO,CAAI;AAAA,MAAA;AAAA,IAAA,GAElD;AAAA,IAEA,gBAAAJ;AAAA,MAACK;AAAA,MAAA;AAAA,QACA,aAAU;AAAA,QACV,OAAM;AAAA,QACN,OAAOT,EAAM;AAAA,QACb,UAAU,CAACQ,MAASP,EAAY,eAAeO,CAAI;AAAA,QACnD,WAAWD,EAAkB;AAAA,QAC7B,aAAY;AAAA,QACZ,WAAU;AAAA,MAAA;AAAA,IAAA;AAAA,EACX,GACD;AAEF;"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import A from "../../../assets/icons/cross.svg.js";
|
|
3
|
+
import w from "../../../assets/icons/plus.svg.js";
|
|
4
|
+
import T from "react";
|
|
5
|
+
import { RadioButton as g } from "../../radioButton/RadioButton.js";
|
|
6
|
+
import { TitleSmall as l, BodyCaption as d, BodySecondary as f } from "../../TypographyStyle.js";
|
|
7
|
+
import { COLORS as o } from "../../../constants/Theme.js";
|
|
8
|
+
import { CardRow as k, RadioCard as C, RadioCardText as v, FieldBlock as x, ChipWrap as R, IntentChip as B, ChipCloseButton as O, AddChipButton as D } from "../AgentBuilder.styled.js";
|
|
9
|
+
import { AiTextArea as E } from "../components/AiTextArea.js";
|
|
10
|
+
import { StepSectionHeader as H } from "../components/StepSectionHeader.js";
|
|
11
|
+
import { AGENT_CHAR_LIMITS as M } from "../constants/charLimits.js";
|
|
12
|
+
import { STEP_DEFINITIONS as F } from "../constants/steps.js";
|
|
13
|
+
import { useAgentBuilderContext as L } from "../context/AgentBuilderContext.js";
|
|
14
|
+
import { Dropdown as N } from "../../dropdown/Dropdown.js";
|
|
15
|
+
const y = F[1], Z = () => {
|
|
16
|
+
const { value: S, patch: r, availableIntents: m } = L(), { trigger: n } = S, [I, h] = T.useState(!1), a = (e) => r({ trigger: { ...n, mode: e } }), b = (e) => {
|
|
17
|
+
n.intents.includes(e) || r({
|
|
18
|
+
trigger: { ...n, intents: [...n.intents, e] }
|
|
19
|
+
}), h(!1);
|
|
20
|
+
}, _ = (e) => r({
|
|
21
|
+
trigger: {
|
|
22
|
+
...n,
|
|
23
|
+
intents: n.intents.filter((c) => c !== e)
|
|
24
|
+
}
|
|
25
|
+
}), u = (e) => m.find((c) => c.value === e)?.label ?? e, s = m.filter((e) => !n.intents.includes(e.value)).map((e) => ({ label: e.label, value: e.value }));
|
|
26
|
+
return /* @__PURE__ */ i("div", { children: [
|
|
27
|
+
/* @__PURE__ */ t(H, { title: y.title, helper: y.helper }),
|
|
28
|
+
/* @__PURE__ */ i(k, { children: [
|
|
29
|
+
/* @__PURE__ */ i(
|
|
30
|
+
C,
|
|
31
|
+
{
|
|
32
|
+
"data-test": "trigger-mode-manifest",
|
|
33
|
+
selected: n.mode === "manifest_intent",
|
|
34
|
+
onClick: () => a("manifest_intent"),
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ t(
|
|
37
|
+
g,
|
|
38
|
+
{
|
|
39
|
+
isActive: n.mode === "manifest_intent",
|
|
40
|
+
onValueChange: () => a("manifest_intent"),
|
|
41
|
+
skipSelectingOff: !0,
|
|
42
|
+
activeColor: o.content.brand
|
|
43
|
+
}
|
|
44
|
+
),
|
|
45
|
+
/* @__PURE__ */ i(v, { children: [
|
|
46
|
+
/* @__PURE__ */ t(l, { color: o.content.primary, children: "Manifest intent" }),
|
|
47
|
+
/* @__PURE__ */ t(d, { color: o.content.secondary, children: "Manifest's AI classifier routes conversations automatically — no keywords needed." })
|
|
48
|
+
] })
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
),
|
|
52
|
+
/* @__PURE__ */ i(
|
|
53
|
+
C,
|
|
54
|
+
{
|
|
55
|
+
"data-test": "trigger-mode-custom",
|
|
56
|
+
selected: n.mode === "custom_intent",
|
|
57
|
+
onClick: () => a("custom_intent"),
|
|
58
|
+
children: [
|
|
59
|
+
/* @__PURE__ */ t(
|
|
60
|
+
g,
|
|
61
|
+
{
|
|
62
|
+
isActive: n.mode === "custom_intent",
|
|
63
|
+
onValueChange: () => a("custom_intent"),
|
|
64
|
+
skipSelectingOff: !0,
|
|
65
|
+
activeColor: o.content.brand
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
/* @__PURE__ */ i(v, { children: [
|
|
69
|
+
/* @__PURE__ */ t(l, { color: o.content.primary, children: "Custom intent" }),
|
|
70
|
+
/* @__PURE__ */ t(d, { color: o.content.secondary, children: "Define your own trigger — use exact phrases or describe the customer's intent." })
|
|
71
|
+
] })
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
] }),
|
|
76
|
+
n.mode === "manifest_intent" ? /* @__PURE__ */ i(x, { children: [
|
|
77
|
+
/* @__PURE__ */ t(l, { color: o.content.primary, children: "If customer talks about" }),
|
|
78
|
+
/* @__PURE__ */ i(R, { children: [
|
|
79
|
+
n.intents.map((e) => /* @__PURE__ */ i(B, { "data-test": `intent-chip-${e}`, children: [
|
|
80
|
+
/* @__PURE__ */ t(f, { color: o.content.primary, children: u(e) }),
|
|
81
|
+
/* @__PURE__ */ t(
|
|
82
|
+
O,
|
|
83
|
+
{
|
|
84
|
+
onClick: () => _(e),
|
|
85
|
+
"aria-label": `Remove ${u(e)}`,
|
|
86
|
+
children: /* @__PURE__ */ t(
|
|
87
|
+
A,
|
|
88
|
+
{
|
|
89
|
+
width: 14,
|
|
90
|
+
height: 14,
|
|
91
|
+
color: o.content.secondary
|
|
92
|
+
}
|
|
93
|
+
)
|
|
94
|
+
}
|
|
95
|
+
)
|
|
96
|
+
] }, e)),
|
|
97
|
+
I && s.length > 0 ? /* @__PURE__ */ t(
|
|
98
|
+
N,
|
|
99
|
+
{
|
|
100
|
+
"data-test": "intent-add-dropdown",
|
|
101
|
+
size: "small",
|
|
102
|
+
width: "200px",
|
|
103
|
+
placeHolder: "Select intent",
|
|
104
|
+
isSearchable: !0,
|
|
105
|
+
options: s,
|
|
106
|
+
onSelect: (e) => {
|
|
107
|
+
const p = (Array.isArray(e) ? e[0] : e)?.value;
|
|
108
|
+
p && b(p);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
) : s.length > 0 && /* @__PURE__ */ i(
|
|
112
|
+
D,
|
|
113
|
+
{
|
|
114
|
+
"data-test": "intent-add-button",
|
|
115
|
+
onClick: () => h(!0),
|
|
116
|
+
children: [
|
|
117
|
+
/* @__PURE__ */ t(
|
|
118
|
+
w,
|
|
119
|
+
{
|
|
120
|
+
width: 16,
|
|
121
|
+
height: 16,
|
|
122
|
+
color: o.content.secondary
|
|
123
|
+
}
|
|
124
|
+
),
|
|
125
|
+
/* @__PURE__ */ t(f, { color: o.content.secondary, children: "Intent" })
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
)
|
|
129
|
+
] }),
|
|
130
|
+
/* @__PURE__ */ t(d, { color: o.content.secondary, children: "This agent takes over from your main assistant when this intent is detected. The changeover is automatic when you go live." })
|
|
131
|
+
] }) : /* @__PURE__ */ t(
|
|
132
|
+
E,
|
|
133
|
+
{
|
|
134
|
+
"data-test": "custom-intent",
|
|
135
|
+
label: "Describe the trigger",
|
|
136
|
+
value: n.customIntent ?? "",
|
|
137
|
+
onChange: (e) => r({ trigger: { ...n, customIntent: e } }),
|
|
138
|
+
maxLength: M.customIntent,
|
|
139
|
+
placeholder: "e.g. The customer wants to cancel an order they placed.",
|
|
140
|
+
minHeight: "120px"
|
|
141
|
+
}
|
|
142
|
+
)
|
|
143
|
+
] });
|
|
144
|
+
};
|
|
145
|
+
export {
|
|
146
|
+
Z as Step2WhenItStepsIn
|
|
147
|
+
};
|
|
148
|
+
//# sourceMappingURL=Step2WhenItStepsIn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Step2WhenItStepsIn.js","sources":["../../../../../src/components/agent-builder/steps/Step2WhenItStepsIn.tsx"],"sourcesContent":["import CrossIcon from '@src/assets/icons/cross.svg';\nimport PlusIcon from '@src/assets/icons/plus.svg';\nimport React from 'react';\nimport { Dropdown } from '@src/components/dropdown';\nimport { SingleOption } from '@src/components/dropdown/type';\nimport { RadioButton } from '@src/components/radioButton/RadioButton';\nimport {\n\tBodyCaption,\n\tBodySecondary,\n\tTitleSmall,\n} from '@src/components/TypographyStyle';\nimport { COLORS } from '@src/constants/Theme';\nimport { TriggerMode } from '../AgentBuilder.model';\nimport {\n\tAddChipButton,\n\tCardRow,\n\tChipCloseButton,\n\tChipWrap,\n\tFieldBlock,\n\tIntentChip,\n\tRadioCard,\n\tRadioCardText,\n} from '../AgentBuilder.styled';\nimport { AiTextArea } from '../components/AiTextArea';\nimport { StepSectionHeader } from '../components/StepSectionHeader';\nimport { AGENT_CHAR_LIMITS } from '../constants/charLimits';\nimport { STEP_DEFINITIONS } from '../constants/steps';\nimport { useAgentBuilderContext } from '../context/AgentBuilderContext';\n\nconst STEP = STEP_DEFINITIONS[1];\n\nexport const Step2WhenItStepsIn: React.FC = () => {\n\tconst { value, patch, availableIntents } = useAgentBuilderContext();\n\tconst { trigger } = value;\n\tconst [adding, setAdding] = React.useState(false);\n\n\tconst setMode = (mode: TriggerMode) =>\n\t\tpatch({ trigger: { ...trigger, mode } });\n\n\tconst addIntent = (intentValue: string) => {\n\t\tif (!trigger.intents.includes(intentValue)) {\n\t\t\tpatch({\n\t\t\t\ttrigger: { ...trigger, intents: [...trigger.intents, intentValue] },\n\t\t\t});\n\t\t}\n\t\tsetAdding(false);\n\t};\n\n\tconst removeIntent = (intentValue: string) =>\n\t\tpatch({\n\t\t\ttrigger: {\n\t\t\t\t...trigger,\n\t\t\t\tintents: trigger.intents.filter((i) => i !== intentValue),\n\t\t\t},\n\t\t});\n\n\tconst labelFor = (v: string) =>\n\t\tavailableIntents.find((o) => o.value === v)?.label ?? v;\n\n\tconst remainingOptions: SingleOption[] = availableIntents\n\t\t.filter((o) => !trigger.intents.includes(o.value))\n\t\t.map((o) => ({ label: o.label, value: o.value }));\n\n\treturn (\n\t\t<div>\n\t\t\t<StepSectionHeader title={STEP.title} helper={STEP.helper} />\n\n\t\t\t<CardRow>\n\t\t\t\t<RadioCard\n\t\t\t\t\tdata-test=\"trigger-mode-manifest\"\n\t\t\t\t\tselected={trigger.mode === 'manifest_intent'}\n\t\t\t\t\tonClick={() => setMode('manifest_intent')}\n\t\t\t\t>\n\t\t\t\t\t<RadioButton\n\t\t\t\t\t\tisActive={trigger.mode === 'manifest_intent'}\n\t\t\t\t\t\tonValueChange={() => setMode('manifest_intent')}\n\t\t\t\t\t\tskipSelectingOff\n\t\t\t\t\t\tactiveColor={COLORS.content.brand}\n\t\t\t\t\t/>\n\t\t\t\t\t<RadioCardText>\n\t\t\t\t\t\t<TitleSmall color={COLORS.content.primary}>\n\t\t\t\t\t\t\tManifest intent\n\t\t\t\t\t\t</TitleSmall>\n\t\t\t\t\t\t<BodyCaption color={COLORS.content.secondary}>\n\t\t\t\t\t\t\tManifest's AI classifier routes conversations automatically —\n\t\t\t\t\t\t\tno keywords needed.\n\t\t\t\t\t\t</BodyCaption>\n\t\t\t\t\t</RadioCardText>\n\t\t\t\t</RadioCard>\n\n\t\t\t\t<RadioCard\n\t\t\t\t\tdata-test=\"trigger-mode-custom\"\n\t\t\t\t\tselected={trigger.mode === 'custom_intent'}\n\t\t\t\t\tonClick={() => setMode('custom_intent')}\n\t\t\t\t>\n\t\t\t\t\t<RadioButton\n\t\t\t\t\t\tisActive={trigger.mode === 'custom_intent'}\n\t\t\t\t\t\tonValueChange={() => setMode('custom_intent')}\n\t\t\t\t\t\tskipSelectingOff\n\t\t\t\t\t\tactiveColor={COLORS.content.brand}\n\t\t\t\t\t/>\n\t\t\t\t\t<RadioCardText>\n\t\t\t\t\t\t<TitleSmall color={COLORS.content.primary}>\n\t\t\t\t\t\t\tCustom intent\n\t\t\t\t\t\t</TitleSmall>\n\t\t\t\t\t\t<BodyCaption color={COLORS.content.secondary}>\n\t\t\t\t\t\t\tDefine your own trigger — use exact phrases or describe the\n\t\t\t\t\t\t\tcustomer's intent.\n\t\t\t\t\t\t</BodyCaption>\n\t\t\t\t\t</RadioCardText>\n\t\t\t\t</RadioCard>\n\t\t\t</CardRow>\n\n\t\t\t{trigger.mode === 'manifest_intent' ? (\n\t\t\t\t<FieldBlock>\n\t\t\t\t\t<TitleSmall color={COLORS.content.primary}>\n\t\t\t\t\t\tIf customer talks about\n\t\t\t\t\t</TitleSmall>\n\t\t\t\t\t<ChipWrap>\n\t\t\t\t\t\t{trigger.intents.map((intent) => (\n\t\t\t\t\t\t\t<IntentChip key={intent} data-test={`intent-chip-${intent}`}>\n\t\t\t\t\t\t\t\t<BodySecondary color={COLORS.content.primary}>\n\t\t\t\t\t\t\t\t\t{labelFor(intent)}\n\t\t\t\t\t\t\t\t</BodySecondary>\n\t\t\t\t\t\t\t\t<ChipCloseButton\n\t\t\t\t\t\t\t\t\tonClick={() => removeIntent(intent)}\n\t\t\t\t\t\t\t\t\taria-label={`Remove ${labelFor(intent)}`}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<CrossIcon\n\t\t\t\t\t\t\t\t\t\twidth={14}\n\t\t\t\t\t\t\t\t\t\theight={14}\n\t\t\t\t\t\t\t\t\t\tcolor={COLORS.content.secondary}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</ChipCloseButton>\n\t\t\t\t\t\t\t</IntentChip>\n\t\t\t\t\t\t))}\n\n\t\t\t\t\t\t{adding && remainingOptions.length > 0 ? (\n\t\t\t\t\t\t\t<Dropdown\n\t\t\t\t\t\t\t\tdata-test=\"intent-add-dropdown\"\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\twidth=\"200px\"\n\t\t\t\t\t\t\t\tplaceHolder=\"Select intent\"\n\t\t\t\t\t\t\t\tisSearchable\n\t\t\t\t\t\t\t\toptions={remainingOptions}\n\t\t\t\t\t\t\t\tonSelect={(opt) => {\n\t\t\t\t\t\t\t\t\tconst single = Array.isArray(opt) ? opt[0] : opt;\n\t\t\t\t\t\t\t\t\tconst v = (single as SingleOption)?.value;\n\t\t\t\t\t\t\t\t\tif (v) {\n\t\t\t\t\t\t\t\t\t\taddIntent(v);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\tremainingOptions.length > 0 && (\n\t\t\t\t\t\t\t\t<AddChipButton\n\t\t\t\t\t\t\t\t\tdata-test=\"intent-add-button\"\n\t\t\t\t\t\t\t\t\tonClick={() => setAdding(true)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<PlusIcon\n\t\t\t\t\t\t\t\t\t\twidth={16}\n\t\t\t\t\t\t\t\t\t\theight={16}\n\t\t\t\t\t\t\t\t\t\tcolor={COLORS.content.secondary}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<BodySecondary color={COLORS.content.secondary}>\n\t\t\t\t\t\t\t\t\t\tIntent\n\t\t\t\t\t\t\t\t\t</BodySecondary>\n\t\t\t\t\t\t\t\t</AddChipButton>\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)}\n\t\t\t\t\t</ChipWrap>\n\t\t\t\t\t<BodyCaption color={COLORS.content.secondary}>\n\t\t\t\t\t\tThis agent takes over from your main assistant when this intent is\n\t\t\t\t\t\tdetected. The changeover is automatic when you go live.\n\t\t\t\t\t</BodyCaption>\n\t\t\t\t</FieldBlock>\n\t\t\t) : (\n\t\t\t\t<AiTextArea\n\t\t\t\t\tdata-test=\"custom-intent\"\n\t\t\t\t\tlabel=\"Describe the trigger\"\n\t\t\t\t\tvalue={trigger.customIntent ?? ''}\n\t\t\t\t\tonChange={(text) =>\n\t\t\t\t\t\tpatch({ trigger: { ...trigger, customIntent: text } })\n\t\t\t\t\t}\n\t\t\t\t\tmaxLength={AGENT_CHAR_LIMITS.customIntent}\n\t\t\t\t\tplaceholder=\"e.g. The customer wants to cancel an order they placed.\"\n\t\t\t\t\tminHeight=\"120px\"\n\t\t\t\t/>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n"],"names":["STEP","STEP_DEFINITIONS","Step2WhenItStepsIn","value","patch","availableIntents","useAgentBuilderContext","trigger","adding","setAdding","React","setMode","mode","addIntent","intentValue","removeIntent","i","labelFor","v","o","remainingOptions","jsx","StepSectionHeader","CardRow","jsxs","RadioCard","RadioButton","COLORS","RadioCardText","TitleSmall","BodyCaption","FieldBlock","ChipWrap","intent","IntentChip","BodySecondary","ChipCloseButton","CrossIcon","Dropdown","opt","AddChipButton","PlusIcon","AiTextArea","text","AGENT_CHAR_LIMITS"],"mappings":";;;;;;;;;;;;;;AA6BA,MAAMA,IAAOC,EAAiB,CAAC,GAElBC,IAA+B,MAAM;AACjD,QAAM,EAAE,OAAAC,GAAO,OAAAC,GAAO,kBAAAC,EAAA,IAAqBC,EAAA,GACrC,EAAE,SAAAC,MAAYJ,GACd,CAACK,GAAQC,CAAS,IAAIC,EAAM,SAAS,EAAK,GAE1CC,IAAU,CAACC,MAChBR,EAAM,EAAE,SAAS,EAAE,GAAGG,GAAS,MAAAK,EAAA,GAAQ,GAElCC,IAAY,CAACC,MAAwB;AAC1C,IAAKP,EAAQ,QAAQ,SAASO,CAAW,KACxCV,EAAM;AAAA,MACL,SAAS,EAAE,GAAGG,GAAS,SAAS,CAAC,GAAGA,EAAQ,SAASO,CAAW,EAAA;AAAA,IAAE,CAClE,GAEFL,EAAU,EAAK;AAAA,EAChB,GAEMM,IAAe,CAACD,MACrBV,EAAM;AAAA,IACL,SAAS;AAAA,MACR,GAAGG;AAAA,MACH,SAASA,EAAQ,QAAQ,OAAO,CAACS,MAAMA,MAAMF,CAAW;AAAA,IAAA;AAAA,EACzD,CACA,GAEIG,IAAW,CAACC,MACjBb,EAAiB,KAAK,CAACc,MAAMA,EAAE,UAAUD,CAAC,GAAG,SAASA,GAEjDE,IAAmCf,EACvC,OAAO,CAACc,MAAM,CAACZ,EAAQ,QAAQ,SAASY,EAAE,KAAK,CAAC,EAChD,IAAI,CAACA,OAAO,EAAE,OAAOA,EAAE,OAAO,OAAOA,EAAE,MAAA,EAAQ;AAEjD,2BACE,OAAA,EACA,UAAA;AAAA,IAAA,gBAAAE,EAACC,KAAkB,OAAOtB,EAAK,OAAO,QAAQA,EAAK,QAAQ;AAAA,sBAE1DuB,GA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;AAAA,kBACA,OAAO;AAAA,kBACP,QAAQ;AAAA,kBACR,OAAOd,EAAO,QAAQ;AAAA,gBAAA;AAAA,cAAA;AAAA,gCAEtBQ,GAAA,EAAc,OAAOR,EAAO,QAAQ,WAAW,UAAA,SAAA,CAEhD;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACD,GAGH;AAAA,wBACCG,GAAA,EAAY,OAAOH,EAAO,QAAQ,WAAW,UAAA,6HAAA,CAG9C;AAAA,IAAA,EAAA,CACD,IAEA,gBAAAN;AAAA,MAACqB;AAAA,MAAA;AAAA,QACA,aAAU;AAAA,QACV,OAAM;AAAA,QACN,OAAOnC,EAAQ,gBAAgB;AAAA,QAC/B,UAAU,CAACoC,MACVvC,EAAM,EAAE,SAAS,EAAE,GAAGG,GAAS,cAAcoC,EAAA,GAAQ;AAAA,QAEtD,WAAWC,EAAkB;AAAA,QAC7B,aAAY;AAAA,QACZ,WAAU;AAAA,MAAA;AAAA,IAAA;AAAA,EACX,GAEF;AAEF;"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { jsxs as n, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { TitleSmall as u } from "../../TypographyStyle.js";
|
|
3
|
+
import { COLORS as g } from "../../../constants/Theme.js";
|
|
4
|
+
import { Step3Grid as A, Step3Main as y, Step3Side as I, SideSection as O } from "../AgentBuilder.styled.js";
|
|
5
|
+
import { InstructionsField as N } from "../components/InstructionsField.js";
|
|
6
|
+
import { RichTextField as R } from "../components/RichTextField.js";
|
|
7
|
+
import { SelectableListSection as b } from "../components/SelectableListSection.js";
|
|
8
|
+
import { StepSectionHeader as _ } from "../components/StepSectionHeader.js";
|
|
9
|
+
import { AGENT_CHAR_LIMITS as H } from "../constants/charLimits.js";
|
|
10
|
+
import { STEP_DEFINITIONS as C } from "../constants/steps.js";
|
|
11
|
+
import { useAgentBuilderContext as E } from "../context/AgentBuilderContext.js";
|
|
12
|
+
import { Dropdown as F } from "../../dropdown/Dropdown.js";
|
|
13
|
+
const f = C[2], J = () => {
|
|
14
|
+
const {
|
|
15
|
+
value: t,
|
|
16
|
+
patch: r,
|
|
17
|
+
updateField: d,
|
|
18
|
+
removeReference: m,
|
|
19
|
+
availableTools: p,
|
|
20
|
+
availableSubAgents: c,
|
|
21
|
+
availableModels: i
|
|
22
|
+
} = E(), v = t.tools.map((e) => {
|
|
23
|
+
const o = p.find((a) => a.tool_id === e);
|
|
24
|
+
return o ? { id: e, label: o.displayName } : null;
|
|
25
|
+
}).filter((e) => e !== null), S = p.filter((e) => !t.tools.includes(e.tool_id)).map((e) => ({
|
|
26
|
+
label: e.displayName,
|
|
27
|
+
value: e.tool_id,
|
|
28
|
+
subText: e.description
|
|
29
|
+
})), h = t.subagents.map((e) => {
|
|
30
|
+
const o = c.find((a) => a.id === e);
|
|
31
|
+
return o ? { id: e, label: o.name } : null;
|
|
32
|
+
}).filter((e) => e !== null), T = c.filter((e) => !t.subagents.includes(e.id)).map((e) => ({ label: e.name, value: e.id })), x = i.map((e) => ({
|
|
33
|
+
label: e.label,
|
|
34
|
+
value: e.value,
|
|
35
|
+
selected: e.value === t.model
|
|
36
|
+
})), s = i.find((e) => e.value === t.model);
|
|
37
|
+
return /* @__PURE__ */ n("div", { className: "bik-agent-step bik-agent-step--response", children: [
|
|
38
|
+
/* @__PURE__ */ l(_, { title: f.title, helper: f.helper }),
|
|
39
|
+
/* @__PURE__ */ n(A, { children: [
|
|
40
|
+
/* @__PURE__ */ n(y, { children: [
|
|
41
|
+
/* @__PURE__ */ l(N, {}),
|
|
42
|
+
/* @__PURE__ */ l(
|
|
43
|
+
R,
|
|
44
|
+
{
|
|
45
|
+
"data-test": "agent-guardrail",
|
|
46
|
+
label: "Guardrails",
|
|
47
|
+
value: t.guardrail ?? "",
|
|
48
|
+
onChange: (e) => d("guardrail", e),
|
|
49
|
+
maxLength: H.guardrail,
|
|
50
|
+
placeholder: "Things this agent must never do.",
|
|
51
|
+
minHeight: "140px",
|
|
52
|
+
resetKey: t.id
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
] }),
|
|
56
|
+
/* @__PURE__ */ n(I, { children: [
|
|
57
|
+
/* @__PURE__ */ l(
|
|
58
|
+
b,
|
|
59
|
+
{
|
|
60
|
+
title: "Tools",
|
|
61
|
+
dataTestPrefix: "agent-tools",
|
|
62
|
+
items: v,
|
|
63
|
+
addableOptions: S,
|
|
64
|
+
emptyText: "No tools added yet.",
|
|
65
|
+
onAdd: (e) => r({ tools: [...t.tools, e] }),
|
|
66
|
+
onRemove: (e) => m("tool", e)
|
|
67
|
+
}
|
|
68
|
+
),
|
|
69
|
+
/* @__PURE__ */ l(
|
|
70
|
+
b,
|
|
71
|
+
{
|
|
72
|
+
title: "Sub-agents",
|
|
73
|
+
dataTestPrefix: "agent-subagents",
|
|
74
|
+
items: h,
|
|
75
|
+
addableOptions: T,
|
|
76
|
+
emptyText: "No sub-agents added yet.",
|
|
77
|
+
onAdd: (e) => r({ subagents: [...t.subagents, e] }),
|
|
78
|
+
onRemove: (e) => m("subagent", e)
|
|
79
|
+
}
|
|
80
|
+
),
|
|
81
|
+
i.length > 0 && /* @__PURE__ */ n(O, { children: [
|
|
82
|
+
/* @__PURE__ */ l(u, { color: g.content.primary, children: "Advanced settings" }),
|
|
83
|
+
/* @__PURE__ */ l(u, { color: g.content.secondary, children: "Select AI model" }),
|
|
84
|
+
/* @__PURE__ */ l(
|
|
85
|
+
F,
|
|
86
|
+
{
|
|
87
|
+
"data-test": "agent-model",
|
|
88
|
+
size: "small",
|
|
89
|
+
width: "100%",
|
|
90
|
+
placeHolder: "Select model",
|
|
91
|
+
options: x,
|
|
92
|
+
defaultOptions: s ? [
|
|
93
|
+
{
|
|
94
|
+
label: s.label,
|
|
95
|
+
value: s.value
|
|
96
|
+
}
|
|
97
|
+
] : void 0,
|
|
98
|
+
onSelect: (e) => {
|
|
99
|
+
const a = (Array.isArray(e) ? e[0] : e)?.value;
|
|
100
|
+
a && d("model", a);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
)
|
|
104
|
+
] })
|
|
105
|
+
] })
|
|
106
|
+
] })
|
|
107
|
+
] });
|
|
108
|
+
};
|
|
109
|
+
export {
|
|
110
|
+
J as Step3HowItResponds
|
|
111
|
+
};
|
|
112
|
+
//# sourceMappingURL=Step3HowItResponds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Step3HowItResponds.js","sources":["../../../../../src/components/agent-builder/steps/Step3HowItResponds.tsx"],"sourcesContent":["import React from 'react';\nimport { Dropdown } from '@src/components/dropdown';\nimport { SingleOption } from '@src/components/dropdown/type';\nimport { TitleSmall } from '@src/components/TypographyStyle';\nimport { COLORS } from '@src/constants/Theme';\nimport {\n\tSideSection,\n\tStep3Grid,\n\tStep3Main,\n\tStep3Side,\n} from '../AgentBuilder.styled';\nimport { InstructionsField } from '../components/InstructionsField';\nimport { RichTextField } from '../components/RichTextField';\nimport {\n\tSelectableItem,\n\tSelectableListSection,\n} from '../components/SelectableListSection';\nimport { StepSectionHeader } from '../components/StepSectionHeader';\nimport { AGENT_CHAR_LIMITS } from '../constants/charLimits';\nimport { STEP_DEFINITIONS } from '../constants/steps';\nimport { useAgentBuilderContext } from '../context/AgentBuilderContext';\n\nconst STEP = STEP_DEFINITIONS[2];\n\nexport const Step3HowItResponds: React.FC = () => {\n\tconst {\n\t\tvalue,\n\t\tpatch,\n\t\tupdateField,\n\t\tremoveReference,\n\t\tavailableTools,\n\t\tavailableSubAgents,\n\t\tavailableModels,\n\t} = useAgentBuilderContext();\n\n\tconst toolItems: SelectableItem[] = value.tools\n\t\t.map((id): SelectableItem | null => {\n\t\t\tconst tool = availableTools.find((t) => t.tool_id === id);\n\t\t\treturn tool ? { id, label: tool.displayName } : null;\n\t\t})\n\t\t.filter((x): x is SelectableItem => x !== null);\n\n\tconst toolOptions: SingleOption[] = availableTools\n\t\t.filter((t) => !value.tools.includes(t.tool_id))\n\t\t.map((t) => ({\n\t\t\tlabel: t.displayName,\n\t\t\tvalue: t.tool_id,\n\t\t\tsubText: t.description,\n\t\t}));\n\n\tconst subAgentItems: SelectableItem[] = value.subagents\n\t\t.map((id): SelectableItem | null => {\n\t\t\tconst sub = availableSubAgents.find((s) => s.id === id);\n\t\t\treturn sub ? { id, label: sub.name } : null;\n\t\t})\n\t\t.filter((x): x is SelectableItem => x !== null);\n\n\tconst subAgentOptions: SingleOption[] = availableSubAgents\n\t\t.filter((s) => !value.subagents.includes(s.id))\n\t\t.map((s) => ({ label: s.name, value: s.id }));\n\n\tconst modelOptions: SingleOption[] = availableModels.map((m) => ({\n\t\tlabel: m.label,\n\t\tvalue: m.value,\n\t\tselected: m.value === value.model,\n\t}));\n\tconst selectedModel = availableModels.find((m) => m.value === value.model);\n\n\treturn (\n\t\t<div className=\"bik-agent-step bik-agent-step--response\">\n\t\t\t<StepSectionHeader title={STEP.title} helper={STEP.helper} />\n\n\t\t\t<Step3Grid>\n\t\t\t\t<Step3Main>\n\t\t\t\t\t<InstructionsField />\n\n\t\t\t\t\t<RichTextField\n\t\t\t\t\t\tdata-test=\"agent-guardrail\"\n\t\t\t\t\t\tlabel=\"Guardrails\"\n\t\t\t\t\t\tvalue={value.guardrail ?? ''}\n\t\t\t\t\t\tonChange={(text) => updateField('guardrail', text)}\n\t\t\t\t\t\tmaxLength={AGENT_CHAR_LIMITS.guardrail}\n\t\t\t\t\t\tplaceholder=\"Things this agent must never do.\"\n\t\t\t\t\t\tminHeight=\"140px\"\n\t\t\t\t\t\tresetKey={value.id}\n\t\t\t\t\t/>\n\t\t\t\t</Step3Main>\n\n\t\t\t\t<Step3Side>\n\t\t\t\t\t<SelectableListSection\n\t\t\t\t\t\ttitle=\"Tools\"\n\t\t\t\t\t\t// helper=\"Actions this agent can take while responding.\"\n\t\t\t\t\t\tdataTestPrefix=\"agent-tools\"\n\t\t\t\t\t\titems={toolItems}\n\t\t\t\t\t\taddableOptions={toolOptions}\n\t\t\t\t\t\temptyText=\"No tools added yet.\"\n\t\t\t\t\t\tonAdd={(id) => patch({ tools: [...value.tools, id] })}\n\t\t\t\t\t\tonRemove={(id) => removeReference('tool', id)}\n\t\t\t\t\t/>\n\n\t\t\t\t\t<SelectableListSection\n\t\t\t\t\t\ttitle=\"Sub-agents\"\n\t\t\t\t\t\t// helper=\"Other agents this agent can hand off the conversation to.\"\n\t\t\t\t\t\tdataTestPrefix=\"agent-subagents\"\n\t\t\t\t\t\titems={subAgentItems}\n\t\t\t\t\t\taddableOptions={subAgentOptions}\n\t\t\t\t\t\temptyText=\"No sub-agents added yet.\"\n\t\t\t\t\t\tonAdd={(id) => patch({ subagents: [...value.subagents, id] })}\n\t\t\t\t\t\tonRemove={(id) => removeReference('subagent', id)}\n\t\t\t\t\t/>\n\n\t\t\t\t\t{availableModels.length > 0 && (\n\t\t\t\t\t\t<SideSection>\n\t\t\t\t\t\t\t<TitleSmall color={COLORS.content.primary}>\n\t\t\t\t\t\t\t\tAdvanced settings\n\t\t\t\t\t\t\t</TitleSmall>\n\t\t\t\t\t\t\t<TitleSmall color={COLORS.content.secondary}>\n\t\t\t\t\t\t\t\tSelect AI model\n\t\t\t\t\t\t\t</TitleSmall>\n\t\t\t\t\t\t\t<Dropdown\n\t\t\t\t\t\t\t\tdata-test=\"agent-model\"\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\twidth=\"100%\"\n\t\t\t\t\t\t\t\tplaceHolder=\"Select model\"\n\t\t\t\t\t\t\t\toptions={modelOptions}\n\t\t\t\t\t\t\t\tdefaultOptions={\n\t\t\t\t\t\t\t\t\tselectedModel\n\t\t\t\t\t\t\t\t\t\t? [\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tlabel: selectedModel.label,\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue: selectedModel.value,\n\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t ]\n\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonSelect={(opt) => {\n\t\t\t\t\t\t\t\t\tconst single = Array.isArray(opt) ? opt[0] : opt;\n\t\t\t\t\t\t\t\t\tconst v = (single as SingleOption)?.value;\n\t\t\t\t\t\t\t\t\tif (v) {\n\t\t\t\t\t\t\t\t\t\tupdateField('model', v);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</SideSection>\n\t\t\t\t\t)}\n\t\t\t\t</Step3Side>\n\t\t\t</Step3Grid>\n\t\t</div>\n\t);\n};\n"],"names":["STEP","STEP_DEFINITIONS","Step3HowItResponds","value","patch","updateField","removeReference","availableTools","availableSubAgents","availableModels","useAgentBuilderContext","toolItems","id","tool","t","x","toolOptions","subAgentItems","sub","s","subAgentOptions","modelOptions","m","selectedModel","jsxs","jsx","StepSectionHeader","Step3Grid","Step3Main","InstructionsField","RichTextField","text","AGENT_CHAR_LIMITS","Step3Side","SelectableListSection","SideSection","TitleSmall","COLORS","Dropdown","opt","v"],"mappings":";;;;;;;;;;;;AAsBA,MAAMA,IAAOC,EAAiB,CAAC,GAElBC,IAA+B,MAAM;AACjD,QAAM;AAAA,IACL,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,iBAAAC;AAAA,EAAA,IACGC,EAAA,GAEEC,IAA8BR,EAAM,MACxC,IAAI,CAACS,MAA8B;AACnC,UAAMC,IAAON,EAAe,KAAK,CAACO,MAAMA,EAAE,YAAYF,CAAE;AACxD,WAAOC,IAAO,EAAE,IAAAD,GAAI,OAAOC,EAAK,gBAAgB;AAAA,EACjD,CAAC,EACA,OAAO,CAACE,MAA2BA,MAAM,IAAI,GAEzCC,IAA8BT,EAClC,OAAO,CAACO,MAAM,CAACX,EAAM,MAAM,SAASW,EAAE,OAAO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IAAIA,IACT;AACpC,gBAAIC,KACHnC,EAAY,SAASmC,CAAC;AAAA,cAExB;AAAA,YAAA;AAAA,UAAA;AAAA,QACD,EAAA,CACD;AAAA,MAAA,EAAA,CAEF;AAAA,IAAA,EAAA,CACD;AAAA,EAAA,GACD;AAEF;"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { RadioButton as d } from "../../radioButton/RadioButton.js";
|
|
3
|
+
import { TitleSmall as a, BodyCaption as l } from "../../TypographyStyle.js";
|
|
4
|
+
import { COLORS as n } from "../../../constants/Theme.js";
|
|
5
|
+
import { FieldBlock as f, CardRow as u, RadioCard as s, RadioCardText as h } from "../AgentBuilder.styled.js";
|
|
6
|
+
import { AiTextArea as v } from "../components/AiTextArea.js";
|
|
7
|
+
import { StepSectionHeader as g } from "../components/StepSectionHeader.js";
|
|
8
|
+
import { AGENT_CHAR_LIMITS as C } from "../constants/charLimits.js";
|
|
9
|
+
import { STEP_DEFINITIONS as S } from "../constants/steps.js";
|
|
10
|
+
import { useAgentBuilderContext as A } from "../context/AgentBuilderContext.js";
|
|
11
|
+
const m = S[3], O = () => {
|
|
12
|
+
const { value: p, patch: c } = A(), { handover: t } = p, r = (i) => c({ handover: { ...t, method: i } });
|
|
13
|
+
return /* @__PURE__ */ o("div", { className: "bik-agent-step bik-agent-step--handover", children: [
|
|
14
|
+
/* @__PURE__ */ e(g, { title: m.title, helper: m.helper }),
|
|
15
|
+
/* @__PURE__ */ e(
|
|
16
|
+
v,
|
|
17
|
+
{
|
|
18
|
+
"data-test": "handover-when",
|
|
19
|
+
label: "Handover when",
|
|
20
|
+
value: t.when,
|
|
21
|
+
onChange: (i) => c({ handover: { ...t, when: i } }),
|
|
22
|
+
maxLength: C.handoverWhen,
|
|
23
|
+
placeholder: "e.g. Hand over if the customer is angry or requests a human agent.",
|
|
24
|
+
minHeight: "120px"
|
|
25
|
+
}
|
|
26
|
+
),
|
|
27
|
+
/* @__PURE__ */ o(f, { children: [
|
|
28
|
+
/* @__PURE__ */ e(a, { color: n.content.primary, children: "Handover method" }),
|
|
29
|
+
/* @__PURE__ */ o(u, { children: [
|
|
30
|
+
/* @__PURE__ */ o(
|
|
31
|
+
s,
|
|
32
|
+
{
|
|
33
|
+
"data-test": "handover-method-default",
|
|
34
|
+
selected: t.method === "default",
|
|
35
|
+
onClick: () => r("default"),
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ e(
|
|
38
|
+
d,
|
|
39
|
+
{
|
|
40
|
+
isActive: t.method === "default",
|
|
41
|
+
onValueChange: () => r("default"),
|
|
42
|
+
skipSelectingOff: !0,
|
|
43
|
+
activeColor: n.content.brand
|
|
44
|
+
}
|
|
45
|
+
),
|
|
46
|
+
/* @__PURE__ */ o(h, { children: [
|
|
47
|
+
/* @__PURE__ */ e(a, { color: n.content.primary, children: "Use default settings" }),
|
|
48
|
+
/* @__PURE__ */ e(l, { color: n.content.secondary, children: "Defined in Customize > Agent handover" })
|
|
49
|
+
] })
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
/* @__PURE__ */ o(
|
|
54
|
+
s,
|
|
55
|
+
{
|
|
56
|
+
"data-test": "handover-method-specific",
|
|
57
|
+
selected: t.method === "specific_channels",
|
|
58
|
+
onClick: () => r("specific_channels"),
|
|
59
|
+
children: [
|
|
60
|
+
/* @__PURE__ */ e(
|
|
61
|
+
d,
|
|
62
|
+
{
|
|
63
|
+
isActive: t.method === "specific_channels",
|
|
64
|
+
onValueChange: () => r("specific_channels"),
|
|
65
|
+
skipSelectingOff: !0,
|
|
66
|
+
activeColor: n.content.brand
|
|
67
|
+
}
|
|
68
|
+
),
|
|
69
|
+
/* @__PURE__ */ o(h, { children: [
|
|
70
|
+
/* @__PURE__ */ e(a, { color: n.content.primary, children: "Choose specific channels" }),
|
|
71
|
+
/* @__PURE__ */ e(l, { color: n.content.secondary, children: "Always hands over regardless of business hours." })
|
|
72
|
+
] })
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
)
|
|
76
|
+
] })
|
|
77
|
+
] })
|
|
78
|
+
] });
|
|
79
|
+
};
|
|
80
|
+
export {
|
|
81
|
+
O as Step4HandoverRules
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=Step4HandoverRules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Step4HandoverRules.js","sources":["../../../../../src/components/agent-builder/steps/Step4HandoverRules.tsx"],"sourcesContent":["import React from 'react';\nimport { RadioButton } from '@src/components/radioButton/RadioButton';\nimport { BodyCaption, TitleSmall } from '@src/components/TypographyStyle';\nimport { COLORS } from '@src/constants/Theme';\nimport { HandoverMethod } from '../AgentBuilder.model';\nimport {\n\tCardRow,\n\tFieldBlock,\n\tRadioCard,\n\tRadioCardText,\n} from '../AgentBuilder.styled';\nimport { AiTextArea } from '../components/AiTextArea';\nimport { StepSectionHeader } from '../components/StepSectionHeader';\nimport { AGENT_CHAR_LIMITS } from '../constants/charLimits';\nimport { STEP_DEFINITIONS } from '../constants/steps';\nimport { useAgentBuilderContext } from '../context/AgentBuilderContext';\n\nconst STEP = STEP_DEFINITIONS[3];\n\nexport const Step4HandoverRules: React.FC = () => {\n\tconst { value, patch } = useAgentBuilderContext();\n\tconst { handover } = value;\n\n\tconst setMethod = (method: HandoverMethod) =>\n\t\tpatch({ handover: { ...handover, method } });\n\n\treturn (\n\t\t<div className=\"bik-agent-step bik-agent-step--handover\">\n\t\t\t<StepSectionHeader title={STEP.title} helper={STEP.helper} />\n\n\t\t\t<AiTextArea\n\t\t\t\tdata-test=\"handover-when\"\n\t\t\t\tlabel=\"Handover when\"\n\t\t\t\tvalue={handover.when}\n\t\t\t\tonChange={(text) => patch({ handover: { ...handover, when: text } })}\n\t\t\t\tmaxLength={AGENT_CHAR_LIMITS.handoverWhen}\n\t\t\t\tplaceholder=\"e.g. Hand over if the customer is angry or requests a human agent.\"\n\t\t\t\tminHeight=\"120px\"\n\t\t\t/>\n\n\t\t\t<FieldBlock>\n\t\t\t\t<TitleSmall color={COLORS.content.primary}>Handover method</TitleSmall>\n\t\t\t\t<CardRow>\n\t\t\t\t\t<RadioCard\n\t\t\t\t\t\tdata-test=\"handover-method-default\"\n\t\t\t\t\t\tselected={handover.method === 'default'}\n\t\t\t\t\t\tonClick={() => setMethod('default')}\n\t\t\t\t\t>\n\t\t\t\t\t\t<RadioButton\n\t\t\t\t\t\t\tisActive={handover.method === 'default'}\n\t\t\t\t\t\t\tonValueChange={() => setMethod('default')}\n\t\t\t\t\t\t\tskipSelectingOff\n\t\t\t\t\t\t\tactiveColor={COLORS.content.brand}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<RadioCardText>\n\t\t\t\t\t\t\t<TitleSmall color={COLORS.content.primary}>\n\t\t\t\t\t\t\t\tUse default settings\n\t\t\t\t\t\t\t</TitleSmall>\n\t\t\t\t\t\t\t<BodyCaption color={COLORS.content.secondary}>\n\t\t\t\t\t\t\t\tDefined in Customize > Agent handover\n\t\t\t\t\t\t\t</BodyCaption>\n\t\t\t\t\t\t</RadioCardText>\n\t\t\t\t\t</RadioCard>\n\n\t\t\t\t\t<RadioCard\n\t\t\t\t\t\tdata-test=\"handover-method-specific\"\n\t\t\t\t\t\tselected={handover.method === 'specific_channels'}\n\t\t\t\t\t\tonClick={() => setMethod('specific_channels')}\n\t\t\t\t\t>\n\t\t\t\t\t\t<RadioButton\n\t\t\t\t\t\t\tisActive={handover.method === 'specific_channels'}\n\t\t\t\t\t\t\tonValueChange={() => setMethod('specific_channels')}\n\t\t\t\t\t\t\tskipSelectingOff\n\t\t\t\t\t\t\tactiveColor={COLORS.content.brand}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<RadioCardText>\n\t\t\t\t\t\t\t<TitleSmall color={COLORS.content.primary}>\n\t\t\t\t\t\t\t\tChoose specific channels\n\t\t\t\t\t\t\t</TitleSmall>\n\t\t\t\t\t\t\t<BodyCaption color={COLORS.content.secondary}>\n\t\t\t\t\t\t\t\tAlways hands over regardless of business hours.\n\t\t\t\t\t\t\t</BodyCaption>\n\t\t\t\t\t\t</RadioCardText>\n\t\t\t\t\t</RadioCard>\n\t\t\t\t</CardRow>\n\t\t\t</FieldBlock>\n\t\t</div>\n\t);\n};\n"],"names":["STEP","STEP_DEFINITIONS","Step4HandoverRules","value","patch","useAgentBuilderContext","handover","setMethod","method","jsxs","jsx","StepSectionHeader","AiTextArea","text","AGENT_CHAR_LIMITS","FieldBlock","TitleSmall","COLORS","CardRow","RadioCard","RadioButton","RadioCardText","BodyCaption"],"mappings":";;;;;;;;;;AAiBA,MAAMA,IAAOC,EAAiB,CAAC,GAElBC,IAA+B,MAAM;AACjD,QAAM,EAAE,OAAAC,GAAO,OAAAC,EAAA,IAAUC,EAAA,GACnB,EAAE,UAAAC,MAAaH,GAEfI,IAAY,CAACC,MAClBJ,EAAM,EAAE,UAAU,EAAE,GAAGE,GAAU,QAAAE,EAAA,GAAU;AAE5C,SACC,gBAAAC,EAAC,OAAA,EAAI,WAAU,2CACd,UAAA;AAAA,IAAA,gBAAAC,EAACC,KAAkB,OAAOX,EAAK,OAAO,QAAQA,EAAK,QAAQ;AAAA,IAE3D,gBAAAU;AAAA,MAACE;AAAA,MAAA;AAAA,QACA,aAAU;AAAA,QACV,OAAM;AAAA,QACN,OAAON,EAAS;AAAA,QAChB,UAAU,CAACO,MAAST,EAAM,EAAE,UAAU,EAAE,GAAGE,GAAU,MAAMO,EAAA,GAAQ;AAAA,QACnE,WAAWC,EAAkB;AAAA,QAC7B,aAAY;AAAA,QACZ,WAAU;AAAA,MAAA;AAAA,IAAA;AAAA,sBAGVC,GAAA,EACA,UAAA;AAAA,MAAA,gBAAAL,EAACM,GAAA,EAAW,OAAOC,EAAO,QAAQ,SAAS,UAAA,mBAAe;AAAA,wBACzDC,GAAA,EACA,UAAA;AAAA,QAAA,gBAAAT;AAAA,UAACU;AAAA,UAAA;AAAA,YACA,aAAU;AAAA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{ ApplicationType } from '@bikdotai/bik-models/growth';
|
|
2
|
+
import { MentionItem } from '../../../editor';
|
|
3
|
+
import { AgentTool, SubAgentRef } from '../AgentBuilder.model';
|
|
4
|
+
/**
|
|
5
|
+
* Serialization helpers between the BikEditor document and the firebase
|
|
6
|
+
* `instructions` string.
|
|
7
|
+
*
|
|
8
|
+
* Firebase stores `instructions` as PLAIN TEXT with inline reference tokens:
|
|
9
|
+
* - `{{subagent:<agentId>}}` — hand-off to another agent
|
|
10
|
+
* - `{{tool:<function_key>}}` — an action the agent can call
|
|
11
|
+
* - `{{<variableName>}}` — a template variable
|
|
12
|
+
*
|
|
13
|
+
* In the editor those references are inserted via the `@` mention menu (which we
|
|
14
|
+
* populate with BOTH tools and sub-agents). Mention nodes keep their `id` in the
|
|
15
|
+
* ProseMirror doc JSON (the rendered HTML drops it), so we serialize from the doc
|
|
16
|
+
* JSON — not from HTML.
|
|
17
|
+
*/
|
|
18
|
+
export interface MentionKindMeta {
|
|
19
|
+
/** Distinguishes a tool reference from a sub-agent reference. */
|
|
20
|
+
kind: 'tool' | 'subagent';
|
|
21
|
+
/** For tools: the function_key used in the `{{tool:KEY}}` token. */
|
|
22
|
+
functionKey?: string;
|
|
23
|
+
/** Plain item name (no prefix) shown in the picker dropdown rows. */
|
|
24
|
+
plainLabel?: string;
|
|
25
|
+
/** For tools: the source bucket (manifest / shopify / …) the picker groups by. */
|
|
26
|
+
source?: string;
|
|
27
|
+
}
|
|
28
|
+
/** Display labels for the known tool sources (drives picker headers + chip prefix). */
|
|
29
|
+
export declare const TOOL_SOURCE_LABELS: Record<string, string>;
|
|
30
|
+
/** Human label for a tool source; falls back to the host-app label, then the raw key. */
|
|
31
|
+
export declare const toolSourceLabel: (source: string | undefined, fallback?: string) => string;
|
|
32
|
+
/** Human label for the host application, used as the tool-chip prefix. */
|
|
33
|
+
export declare const appTypeLabel: (applicationType?: ApplicationType) => string;
|
|
34
|
+
/**
|
|
35
|
+
* Build the combined `@` mention list from the available tools + sub-agents.
|
|
36
|
+
*
|
|
37
|
+
* The `label` is the CHIP text shown once inserted — tools read
|
|
38
|
+
* `"<App> : <tool name>"` (e.g. "Manifest : Look up order"), sub-agents read
|
|
39
|
+
* `"sub-agent: <name>"`. `meta.plainLabel` is the un-prefixed name for the
|
|
40
|
+
* picker rows, and `meta.kind` drives the `{{tool}}` / `{{subagent}}` colour.
|
|
41
|
+
*/
|
|
42
|
+
export declare const buildAgentMentionItems: (tools: AgentTool[], subAgents: SubAgentRef[], appLabel?: string) => MentionItem[];
|
|
43
|
+
/**
|
|
44
|
+
* Convert the stored instructions string into HTML for `BikEditor.initialContent`.
|
|
45
|
+
* `{{tool:KEY}}` / `{{subagent:ID}}` tokens are rehydrated into mention chips
|
|
46
|
+
* (resolved via `mentionItems`); any other `{{…}}` token is left as literal text
|
|
47
|
+
* for the editor's variable decoration. Newlines become paragraph / line breaks.
|
|
48
|
+
*/
|
|
49
|
+
export declare const instructionsToEditorHtml: (text: string, mentionItems?: MentionItem[]) => string;
|
|
50
|
+
/**
|
|
51
|
+
* Convert a BikEditor document (from `ref.getJSON()`) into the firebase
|
|
52
|
+
* instructions string, replacing mention nodes with `{{subagent:ID}}` /
|
|
53
|
+
* `{{tool:KEY}}` tokens.
|
|
54
|
+
*/
|
|
55
|
+
export declare const editorDocToInstructions: (doc: Record<string, unknown> | null, tools: AgentTool[]) => string;
|