@xapp/form-widget 1.62.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/LICENSE.md +176 -0
- package/README.md +3 -0
- package/dist/App.d.ts +23 -0
- package/dist/api/index.d.ts +1 -0
- package/dist/api/stentor-api.d.ts +18 -0
- package/dist/components/Button/Button.d.ts +8 -0
- package/dist/components/Button/Button.stories.d.ts +6 -0
- package/dist/components/Button/index.d.ts +1 -0
- package/dist/components/Card/Card.d.ts +8 -0
- package/dist/components/Card/Card.stories.d.ts +9 -0
- package/dist/components/Card/Card.test.d.ts +1 -0
- package/dist/components/Card/index.d.ts +1 -0
- package/dist/components/Card/utils.d.ts +1 -0
- package/dist/components/Cards/Cards.d.ts +7 -0
- package/dist/components/Cards/Cards.stories.d.ts +7 -0
- package/dist/components/Cards/index.d.ts +1 -0
- package/dist/components/Carousel/Carousel.d.ts +7 -0
- package/dist/components/Carousel/Carousel.stories.d.ts +8 -0
- package/dist/components/Carousel/CarouselItem.d.ts +6 -0
- package/dist/components/Carousel/index.d.ts +1 -0
- package/dist/components/ChatButton/ChatButton.d.ts +13 -0
- package/dist/components/ChatButton/ChatButton.stories.d.ts +6 -0
- package/dist/components/ChatButton/index.d.ts +1 -0
- package/dist/components/FormFieldCard/FormFieldCard.d.ts +7 -0
- package/dist/components/FormFieldCard/index.d.ts +1 -0
- package/dist/components/FormFieldChips/FormFieldChips.d.ts +8 -0
- package/dist/components/FormFieldChips/FormFieldSelect.d.ts +7 -0
- package/dist/components/FormFieldChips/index.d.ts +1 -0
- package/dist/components/FormFieldDate/FormFieldDate.d.ts +7 -0
- package/dist/components/FormFieldDate/index.d.ts +1 -0
- package/dist/components/FormFieldDateRange/FormFieldDateRange.d.ts +7 -0
- package/dist/components/FormFieldDateRange/index.d.ts +1 -0
- package/dist/components/FormFieldDropdown/FormFieldDropdown.d.ts +7 -0
- package/dist/components/FormFieldDropdown/index.d.ts +1 -0
- package/dist/components/FormFieldTextInput/FormFieldTextInput.d.ts +9 -0
- package/dist/components/FormFieldTextInput/index.d.ts +1 -0
- package/dist/components/FormStepDisplay/FormStepDisplay.d.ts +14 -0
- package/dist/components/FormStepDisplay/index.d.ts +2 -0
- package/dist/components/FormStepDisplay/validators.d.ts +8 -0
- package/dist/components/IconLabel/IconLabel.d.ts +9 -0
- package/dist/components/IconLabel/IconLabel.stories.d.ts +5 -0
- package/dist/components/IconLabel/index.d.ts +1 -0
- package/dist/components/LinkButton/LinkButton.d.ts +8 -0
- package/dist/components/LinkButton/LinkButton.stories.d.ts +6 -0
- package/dist/components/LinkButton/index.d.ts +1 -0
- package/dist/components/ModalDialog/ModalDialog.d.ts +6 -0
- package/dist/components/ModalDialog/ModalDialog.stories.d.ts +5 -0
- package/dist/components/ModalDialog/index.d.ts +1 -0
- package/dist/components/Search/Search.d.ts +14 -0
- package/dist/components/Search/Search.stories.d.ts +12 -0
- package/dist/components/Search/index.d.ts +1 -0
- package/dist/components/SearchInput/SearchInput.d.ts +16 -0
- package/dist/components/SearchInput/SearchInput.stories.d.ts +6 -0
- package/dist/components/SearchInput/SearchInputContainer.d.ts +4 -0
- package/dist/components/SearchInput/index.d.ts +2 -0
- package/dist/components/SearchResponse/SearchResponse.d.ts +11 -0
- package/dist/components/SearchResponse/SearchResponse.stories.d.ts +13 -0
- package/dist/components/SearchResponse/index.d.ts +1 -0
- package/dist/components/SearchResponseAudio/SearchResponseAudio.d.ts +6 -0
- package/dist/components/SearchResponseAudio/SearchResponseAudio.stories.d.ts +5 -0
- package/dist/components/SearchResponseAudio/index.d.ts +1 -0
- package/dist/components/SearchResponseBubble/SearchResponseBubble.d.ts +5 -0
- package/dist/components/SearchResponseBubble/SearchResponseBubble.stories.d.ts +5 -0
- package/dist/components/SearchResponseBubble/index.d.ts +1 -0
- package/dist/components/SearchResponseCarouselDisplay/SearchResponseCarouselDisplay.d.ts +6 -0
- package/dist/components/SearchResponseCarouselDisplay/SearchResponseCarouselDisplay.stories.d.ts +5 -0
- package/dist/components/SearchResponseCarouselDisplay/index.d.ts +1 -0
- package/dist/components/SearchResponseDisplay/SearchResponseDisplay.d.ts +7 -0
- package/dist/components/SearchResponseDisplay/index.d.ts +1 -0
- package/dist/components/SearchResponseFormDisplay/SearchResponseFormDisplay.d.ts +8 -0
- package/dist/components/SearchResponseFormDisplay/index.d.ts +2 -0
- package/dist/components/SearchResponseFormDisplay/model.d.ts +132 -0
- package/dist/components/SearchResponseHtml/SearchResponseHtml.d.ts +5 -0
- package/dist/components/SearchResponseHtml/SearchResponseHtml.stories.d.ts +5 -0
- package/dist/components/SearchResponseHtml/index.d.ts +1 -0
- package/dist/components/SearchResponseListDisplay/SearchResponseListDisplay.d.ts +6 -0
- package/dist/components/SearchResponseListDisplay/SearchResponseListDisplay.stories.d.ts +6 -0
- package/dist/components/SearchResponseListDisplay/index.d.ts +1 -0
- package/dist/components/SearchResponseOutputSpeech/SearchResponseOutputSpeech.d.ts +8 -0
- package/dist/components/SearchResponseOutputSpeech/SearchResponseOutputSpeech.stories.d.ts +8 -0
- package/dist/components/SearchResponseOutputSpeech/index.d.ts +1 -0
- package/dist/components/SearchResponsePart/SearchResponsePart.d.ts +6 -0
- package/dist/components/SearchResponsePart/index.d.ts +1 -0
- package/dist/components/SearchResponseText/SearchResponseText.d.ts +5 -0
- package/dist/components/SearchResponseText/SearchResponseText.stories.d.ts +5 -0
- package/dist/components/SearchResponseText/index.d.ts +1 -0
- package/dist/components/SearchResult/SearchResult.d.ts +13 -0
- package/dist/components/SearchResult/SearchResult.stories.d.ts +5 -0
- package/dist/components/SearchResult/SearchResult.test.d.ts +1 -0
- package/dist/components/SearchResult/index.d.ts +1 -0
- package/dist/components/SearchWidget/SearchWidget.d.ts +8 -0
- package/dist/components/SearchWidget/SearchWidget.stories.d.ts +9 -0
- package/dist/components/SearchWidget/index.d.ts +1 -0
- package/dist/components/SimpleNavigationHeader/SimpleNavigationHeader.d.ts +8 -0
- package/dist/components/SimpleNavigationHeader/index.d.ts +1 -0
- package/dist/components/SuggestedAction/SuggestedAction.d.ts +9 -0
- package/dist/components/SuggestedAction/SuggestedAction.stories.d.ts +7 -0
- package/dist/components/SuggestedAction/index.d.ts +1 -0
- package/dist/components/SuggestedActions/SuggestedActions.d.ts +9 -0
- package/dist/components/SuggestedActions/SuggestedActions.stories.d.ts +5 -0
- package/dist/components/SuggestedActions/index.d.ts +1 -0
- package/dist/components/UknownMessage/UnknownMessage.d.ts +2 -0
- package/dist/components/UknownMessage/index.d.ts +1 -0
- package/dist/components/WidgetStylesheet/WidgetStylesheet.d.ts +7 -0
- package/dist/components/WidgetStylesheet/index.d.ts +1 -0
- package/dist/components/icons/BigMicIcon/BigMicIcon.d.ts +6 -0
- package/dist/components/icons/BigMicIcon/index.d.ts +1 -0
- package/dist/components/icons/Icon.stories.d.ts +5 -0
- package/dist/components/icons/LeftAngleIcon/LeftAngleIcon.d.ts +2 -0
- package/dist/components/icons/LeftAngleIcon/index.d.ts +1 -0
- package/dist/components/icons/MicIcons/MicIconEmpty.d.ts +2 -0
- package/dist/components/icons/MicIcons/MicIconFill.d.ts +2 -0
- package/dist/components/icons/MicIcons/index.d.ts +2 -0
- package/dist/components/icons/RightAngleIcon/RightAngleIcon.d.ts +2 -0
- package/dist/components/icons/RightAngleIcon/index.d.ts +1 -0
- package/dist/components/icons/SearchIcon/SearchIcon.d.ts +2 -0
- package/dist/components/icons/SearchIcon/index.d.ts +1 -0
- package/dist/components/icons/SpinnerIcon/SpinnerIcon.d.ts +2 -0
- package/dist/components/icons/SpinnerIcon/index.d.ts +1 -0
- package/dist/components/icons/index.d.ts +4 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/config/config.d.ts +8 -0
- package/dist/config/index.d.ts +2 -0
- package/dist/config/search-config.d.ts +10 -0
- package/dist/config/theme.d.ts +76 -0
- package/dist/constants/variables.d.ts +3 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.es.js +107046 -0
- package/dist/index.es.js.map +1 -0
- package/dist/index.js +107080 -0
- package/dist/index.js.map +1 -0
- package/dist/middlewares/index.d.ts +2 -0
- package/dist/middlewares/join.d.ts +2 -0
- package/dist/middlewares/message-middleware.d.ts +14 -0
- package/dist/middlewares/use-middleware.d.ts +10 -0
- package/dist/setupTests.d.ts +1 -0
- package/dist/store/SearchDispatch.d.ts +2 -0
- package/dist/store/SearchState.d.ts +19 -0
- package/dist/store/SearchStore.d.ts +3 -0
- package/dist/store/SearchStoreContext.d.ts +5 -0
- package/dist/store/SearchStoreProvider.d.ts +6 -0
- package/dist/store/actions/BaseSearchAction.d.ts +4 -0
- package/dist/store/actions/NewSearchAction.d.ts +3 -0
- package/dist/store/actions/SearchAction.d.ts +6 -0
- package/dist/store/actions/SearchActionType.d.ts +1 -0
- package/dist/store/actions/SetModalStateAction.d.ts +6 -0
- package/dist/store/actions/SetQueryAction.d.ts +5 -0
- package/dist/store/actions/SetResponseAction.d.ts +12 -0
- package/dist/store/actions/ToggleModalStateAction.d.ts +3 -0
- package/dist/store/actions/index.d.ts +1 -0
- package/dist/store/index.d.ts +7 -0
- package/dist/store/reducers/RootReducer.d.ts +3 -0
- package/dist/store/reducers/index.d.ts +1 -0
- package/dist/store/useSearchDispatch.d.ts +2 -0
- package/dist/store/useSearchState.d.ts +2 -0
- package/dist/store/useSearchStore.d.ts +2 -0
- package/dist/stories/DummyContent.d.ts +2 -0
- package/dist/stories/RichTextValues.d.ts +2 -0
- package/dist/stories/ThemeBuilder/ThemeBuilderSection/ThemeBuilderSection.d.ts +8 -0
- package/dist/stories/ThemeBuilder/ThemeBuilderSection/index.d.ts +1 -0
- package/dist/stories/ThemeBuilder/ThemeBuilderSectionLine/ThemeBuilderSectionLine.d.ts +7 -0
- package/dist/stories/ThemeBuilder/ThemeBuilderSectionLine/index.d.ts +1 -0
- package/dist/stories/ThemeBuilder/WidgetBackgroundThemeBuilder/WidgetBackgroundThemeBuilder.d.ts +11 -0
- package/dist/stories/ThemeBuilder/WidgetBackgroundThemeBuilder/index.d.ts +1 -0
- package/dist/stories/ThemeBuilder/WidgetBorderRadiusPicker/WidgetBorderRadiusPicker.d.ts +9 -0
- package/dist/stories/ThemeBuilder/WidgetBorderRadiusPicker/index.d.ts +1 -0
- package/dist/stories/ThemeBuilder/WidgetBorderThemeBuilder/WidgetBorderThemeBuilder.d.ts +11 -0
- package/dist/stories/ThemeBuilder/WidgetBorderThemeBuilder/index.d.ts +1 -0
- package/dist/stories/ThemeBuilder/WidgetBorderWidthPicker/WidgetBorderWidthPicker.d.ts +9 -0
- package/dist/stories/ThemeBuilder/WidgetBorderWidthPicker/index.d.ts +1 -0
- package/dist/stories/ThemeBuilder/WidgetCardThemeBuilder/WidgetCardThemeBuilder.d.ts +10 -0
- package/dist/stories/ThemeBuilder/WidgetCardThemeBuilder/index.d.ts +1 -0
- package/dist/stories/ThemeBuilder/WidgetCarouselThemeBuilder/WidgetCarouselThemeBuilder.d.ts +10 -0
- package/dist/stories/ThemeBuilder/WidgetCarouselThemeBuilder/index.d.ts +1 -0
- package/dist/stories/ThemeBuilder/WidgetColorPicker/WidgetColorPicker.d.ts +12 -0
- package/dist/stories/ThemeBuilder/WidgetColorPicker/index.d.ts +1 -0
- package/dist/stories/ThemeBuilder/WidgetFontFamilyPicker/WidgetFontFamilyPicker.d.ts +12 -0
- package/dist/stories/ThemeBuilder/WidgetFontFamilyPicker/index.d.ts +1 -0
- package/dist/stories/ThemeBuilder/WidgetFontSizePicker/WidgetFontSizePicker.d.ts +9 -0
- package/dist/stories/ThemeBuilder/WidgetFontSizePicker/index.d.ts +1 -0
- package/dist/stories/ThemeBuilder/WidgetFontStylePicker/WidgetFontStylePicker.d.ts +12 -0
- package/dist/stories/ThemeBuilder/WidgetFontStylePicker/index.d.ts +1 -0
- package/dist/stories/ThemeBuilder/WidgetFontWeightPicker/WidgetFontWeightPicker.d.ts +12 -0
- package/dist/stories/ThemeBuilder/WidgetFontWeightPicker/index.d.ts +1 -0
- package/dist/stories/ThemeBuilder/WidgetLengthPicker/WidgetLengthPicker.d.ts +11 -0
- package/dist/stories/ThemeBuilder/WidgetLengthPicker/index.d.ts +1 -0
- package/dist/stories/ThemeBuilder/WidgetLengthPickerLine/WidgetLengthPickerLine.d.ts +10 -0
- package/dist/stories/ThemeBuilder/WidgetLengthPickerLine/index.d.ts +1 -0
- package/dist/stories/ThemeBuilder/WidgetLinkBlockThemeBuilder/WidgetLinkBlockThemeBuilder.d.ts +10 -0
- package/dist/stories/ThemeBuilder/WidgetLinkBlockThemeBuilder/index.d.ts +1 -0
- package/dist/stories/ThemeBuilder/WidgetLinkThemeBuilder/WidgetLinkThemeBuilder.d.ts +10 -0
- package/dist/stories/ThemeBuilder/WidgetLinkThemeBuilder/index.d.ts +1 -0
- package/dist/stories/ThemeBuilder/WidgetListThemeBuilder/WidgetListThemeBuilder.d.ts +10 -0
- package/dist/stories/ThemeBuilder/WidgetListThemeBuilder/index.d.ts +1 -0
- package/dist/stories/ThemeBuilder/WidgetMarginPicker/WidgetMarginPicker.d.ts +10 -0
- package/dist/stories/ThemeBuilder/WidgetMarginPicker/index.d.ts +1 -0
- package/dist/stories/ThemeBuilder/WidgetPaddingPicker/WidgetPaddingPicker.d.ts +10 -0
- package/dist/stories/ThemeBuilder/WidgetPaddingPicker/index.d.ts +1 -0
- package/dist/stories/ThemeBuilder/WidgetTextBlockThemeBuilder/WidgetTextBlockThemeBuilder.d.ts +10 -0
- package/dist/stories/ThemeBuilder/WidgetTextBlockThemeBuilder/index.d.ts +1 -0
- package/dist/stories/ThemeBuilder/WidgetTextThemeBuilder/WidgetTextThemeBuilder.d.ts +10 -0
- package/dist/stories/ThemeBuilder/WidgetTextThemeBuilder/index.d.ts +1 -0
- package/dist/stories/ThemeBuilder/WidgetThemeBuilder/WidgetThemeBuilder.d.ts +8 -0
- package/dist/stories/ThemeBuilder/WidgetThemeBuilder/index.d.ts +1 -0
- package/dist/stories/ThemeBuilder/WidgetValuePicker/WidgetValuePicker.d.ts +16 -0
- package/dist/stories/ThemeBuilder/WidgetValuePicker/index.d.ts +1 -0
- package/dist/stories/base-list-display.d.ts +2 -0
- package/dist/stories/carousel-display.d.ts +2 -0
- package/dist/stories/carousel-response.d.ts +2 -0
- package/dist/stories/config.d.ts +5 -0
- package/dist/stories/list-display.d.ts +2 -0
- package/dist/stories/list-response.d.ts +2 -0
- package/dist/stories/random-theme.d.ts +3 -0
- package/dist/stories/response-filter.d.ts +5 -0
- package/dist/stories/suggestions-groups.d.ts +4 -0
- package/dist/stories/text-response.d.ts +2 -0
- package/dist/stories/useOnChangeChildDispatch.d.ts +4 -0
- package/dist/utils/SearchWidgetConfigContext.d.ts +3 -0
- package/dist/utils/comparator.d.ts +11 -0
- package/dist/utils/getActionLabel.d.ts +2 -0
- package/dist/utils/guards/index.d.ts +5 -0
- package/dist/utils/guards/isCarousel.d.ts +2 -0
- package/dist/utils/guards/isField.d.ts +3 -0
- package/dist/utils/guards/isForm.d.ts +3 -0
- package/dist/utils/guards/isList.d.ts +2 -0
- package/dist/utils/guards/throwBadKind.d.ts +1 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/parseAudio.d.ts +1 -0
- package/dist/utils/parseEnv.d.ts +1 -0
- package/dist/utils/subscribable-array.d.ts +12 -0
- package/dist/utils/templating.d.ts +3 -0
- package/dist/utils/useExternalScript.d.ts +1 -0
- package/dist/utils/useFetchStylesheet.d.ts +1 -0
- package/dist/utils/useIsMounted.d.ts +1 -0
- package/dist/utils/useLoading.d.ts +7 -0
- package/dist/utils/useSuggestionsFetch.d.ts +2 -0
- package/dist/utils/useSuggestionsUrl.d.ts +1 -0
- package/package.json +114 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SearchResponseAudio, SearchResponseAudioProps } from "./SearchResponseAudio";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SearchResponseBubble, SearchResponseBubbleProps } from "./SearchResponseBubble";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SearchResponseCarouselDisplay } from "./SearchResponseCarouselDisplay";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { Display } from "stentor-models";
|
|
3
|
+
export interface SearchResponseDisplayProps {
|
|
4
|
+
readonly display: Display;
|
|
5
|
+
onActionResponse(data: unknown, action: string): void;
|
|
6
|
+
}
|
|
7
|
+
export declare const SearchResponseDisplay: FC<SearchResponseDisplayProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SearchResponseDisplay } from "./SearchResponseDisplay";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { MultistepForm } from ".";
|
|
3
|
+
import "./SearchResponseFormDisplay.scss";
|
|
4
|
+
export interface SearchResponseFormDisplayProps {
|
|
5
|
+
readonly form: MultistepForm;
|
|
6
|
+
onActionResponse(data: unknown, action: string): void;
|
|
7
|
+
}
|
|
8
|
+
export declare const SearchResponseFormDisplay: FC<SearchResponseFormDisplayProps>;
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { BaseDisplay } from "stentor-models";
|
|
2
|
+
/**
|
|
3
|
+
* Action response data object
|
|
4
|
+
*/
|
|
5
|
+
export interface FormActionResponseData {
|
|
6
|
+
result: object;
|
|
7
|
+
step: string;
|
|
8
|
+
form: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* FORM Display type (TODO: add the final to Stentor)
|
|
12
|
+
*/
|
|
13
|
+
export interface MultistepForm extends BaseDisplay {
|
|
14
|
+
type: "FORM";
|
|
15
|
+
name: string;
|
|
16
|
+
header: FormHeaderItem[];
|
|
17
|
+
steps: FormStep[];
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* This is for the top header. The "step" is the name of the step the click should take to.
|
|
21
|
+
*/
|
|
22
|
+
export interface FormHeaderItem {
|
|
23
|
+
label: string;
|
|
24
|
+
step: string;
|
|
25
|
+
}
|
|
26
|
+
export interface FormFieldProps {
|
|
27
|
+
hidden?: true;
|
|
28
|
+
onFieldChange: (fieldName: string, fieldValue: string | string[] | object | undefined) => void;
|
|
29
|
+
errorMessage?: string;
|
|
30
|
+
required?: boolean;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A step is partial form. Fields plus next/prev/submit buttons as needed.
|
|
34
|
+
* We are going through these "mini screens".
|
|
35
|
+
*/
|
|
36
|
+
export interface FormStep {
|
|
37
|
+
name: string;
|
|
38
|
+
title?: string;
|
|
39
|
+
fields: FormField[];
|
|
40
|
+
nextAction?: "next" | "submit" | "omit";
|
|
41
|
+
previousAction?: "previous" | "submit" | "omit";
|
|
42
|
+
nextLabel?: string;
|
|
43
|
+
previousLabel?: string;
|
|
44
|
+
}
|
|
45
|
+
export declare type FormField = FormTextInput | FormDropdownInput | FormChipsInput | FormDateInput | FormDateRangeInput;
|
|
46
|
+
/**
|
|
47
|
+
* Form field base class
|
|
48
|
+
*/
|
|
49
|
+
export interface FormInput {
|
|
50
|
+
name: string;
|
|
51
|
+
title?: string;
|
|
52
|
+
type: "TEXT" | "DROPDOWN" | "CHECK" | "CHIPS" | "DATE" | "DATERANGE" | "CARD";
|
|
53
|
+
shape?: "ROUND" | "SQUARE";
|
|
54
|
+
condition?: string;
|
|
55
|
+
mandatory?: boolean;
|
|
56
|
+
style?: object;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Text input. Validate according to the format.
|
|
60
|
+
*/
|
|
61
|
+
export interface FormTextInput extends FormInput {
|
|
62
|
+
multiline?: boolean;
|
|
63
|
+
format?: "PHONE" | "EMAIL";
|
|
64
|
+
placeholder?: string;
|
|
65
|
+
label?: string;
|
|
66
|
+
rows?: number;
|
|
67
|
+
rowsMax?: number;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Dropdown
|
|
71
|
+
*/
|
|
72
|
+
export interface FormDropdownInput extends FormInput {
|
|
73
|
+
items: SelectableItem[];
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Close/Open style chisp selection. Header plus open symbol reveals the chips.
|
|
77
|
+
*/
|
|
78
|
+
export interface FormChipsInput extends FormInput {
|
|
79
|
+
radio?: boolean;
|
|
80
|
+
defaultOpen?: boolean;
|
|
81
|
+
minRequired?: number;
|
|
82
|
+
maxAllowed?: number;
|
|
83
|
+
items: SelectableItem[];
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Like chips but with checkboxes
|
|
87
|
+
*/
|
|
88
|
+
export interface FormSelectInput extends FormInput {
|
|
89
|
+
radio?: boolean;
|
|
90
|
+
defaultOpen?: boolean;
|
|
91
|
+
items: SelectableItem[];
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Card (text/image)
|
|
95
|
+
*/
|
|
96
|
+
export interface FormCardInput extends FormInput {
|
|
97
|
+
header?: {
|
|
98
|
+
title: string;
|
|
99
|
+
subheader?: string;
|
|
100
|
+
};
|
|
101
|
+
media?: {
|
|
102
|
+
heightPx: number;
|
|
103
|
+
imageUrl: string;
|
|
104
|
+
alt?: string;
|
|
105
|
+
};
|
|
106
|
+
text?: string;
|
|
107
|
+
variant?: string;
|
|
108
|
+
color?: string;
|
|
109
|
+
align?: string;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Single date
|
|
113
|
+
*/
|
|
114
|
+
export interface FormDateInput extends FormInput {
|
|
115
|
+
preselecteDate?: Date;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Date range
|
|
119
|
+
*/
|
|
120
|
+
export interface FormDateRangeInput extends FormInput {
|
|
121
|
+
preselecteDates?: {
|
|
122
|
+
from?: Date;
|
|
123
|
+
to?: Date;
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Basically a name value pair for dropdowns or chips
|
|
128
|
+
*/
|
|
129
|
+
export interface SelectableItem {
|
|
130
|
+
label: string;
|
|
131
|
+
id: string;
|
|
132
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SearchResponseHtml, SearchResponseHtmlProps } from "./SearchResponseHtml";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SearchResponseListDisplay } from "./SearchResponseListDisplay";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { ResponseOutput } from "stentor-models";
|
|
3
|
+
import "./SearchResponseOutputSpeech.scss";
|
|
4
|
+
export interface SearchResponseOutputSpeechProps {
|
|
5
|
+
readonly outputSpeech: ResponseOutput | string;
|
|
6
|
+
onAudioChange(isOn: boolean): void;
|
|
7
|
+
}
|
|
8
|
+
export declare const SearchResponseOutputSpeech: FC<SearchResponseOutputSpeechProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta } from "@storybook/react/types-6-0";
|
|
2
|
+
import { VFC } from "react";
|
|
3
|
+
declare const _default: Meta<import("@storybook/react/types-6-0").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const TextResponse: VFC;
|
|
6
|
+
export declare const HtmlResponse: VFC;
|
|
7
|
+
export declare const TextAndHtmlResponse: VFC;
|
|
8
|
+
export declare const Styled: VFC;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SearchResponseOutputSpeech, SearchResponseOutputSpeechProps } from "./SearchResponseOutputSpeech";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SearchResponsePart, SearchResponsePartProps } from "./SearchResponsePart";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SearchResponseText, SearchResponseTextProps } from "./SearchResponseText";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SuggestionsGroupData, SuggestionsItemData } from "@xapp/chat-widget-core";
|
|
2
|
+
import "@xapp/chat-widget-core/dist/index.css";
|
|
3
|
+
import { FC, VFC } from "react";
|
|
4
|
+
import "./SearchResult.scss";
|
|
5
|
+
export interface SearchResultProps {
|
|
6
|
+
readonly result: readonly SuggestionsGroupData[];
|
|
7
|
+
readonly index: number;
|
|
8
|
+
readonly className?: string;
|
|
9
|
+
onItemClick(data: SuggestionsItemData): void;
|
|
10
|
+
onItemUse(data: SuggestionsItemData): void;
|
|
11
|
+
}
|
|
12
|
+
export declare const SearchResult: FC<SearchResultProps>;
|
|
13
|
+
export declare const SuggestionsItemActions: VFC;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SearchResult, SearchResultProps } from "./SearchResult";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { SearchWidgetConfig } from "../../config";
|
|
3
|
+
import "./SearchWidget.scss";
|
|
4
|
+
export declare const AUDIO_WAIT_NOTHING = 0, AUDIO_WAIT_CLOSE = 1, AUDIO_WAIT_MINIMIZE = 2;
|
|
5
|
+
export interface SearchWidgetProps {
|
|
6
|
+
readonly config: SearchWidgetConfig;
|
|
7
|
+
}
|
|
8
|
+
export declare const SearchWidget: FC<SearchWidgetProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta } from "@storybook/react/types-6-0";
|
|
2
|
+
import { VFC } from "react";
|
|
3
|
+
declare const _default: Meta<import("@storybook/react/types-6-0").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Default: VFC;
|
|
6
|
+
export declare const InModal: VFC;
|
|
7
|
+
export declare const WithTextResponse: VFC;
|
|
8
|
+
export declare const WithListResponse: VFC;
|
|
9
|
+
export declare const WithCarouselResponse: VFC;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SearchWidget, SearchWidgetProps } from "./SearchWidget";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FormHeaderItem } from '../SearchResponseFormDisplay';
|
|
3
|
+
interface SimpleNavigationHeaderProps {
|
|
4
|
+
items: FormHeaderItem[];
|
|
5
|
+
onHeaderClick(step: string): void;
|
|
6
|
+
}
|
|
7
|
+
export declare const SimpleNavigationHeader: React.FC<SimpleNavigationHeaderProps>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SimpleNavigationHeader } from "./SimpleNavigationHeader";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { SuggestionTypes } from "stentor-models";
|
|
3
|
+
import "./SuggestedAction.scss";
|
|
4
|
+
export interface SuggestedActionProps {
|
|
5
|
+
readonly action: SuggestionTypes;
|
|
6
|
+
onClick(action: SuggestionTypes): void;
|
|
7
|
+
readonly className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const SuggestedAction: FC<SuggestedActionProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta } from "@storybook/react/types-6-0";
|
|
2
|
+
import { VFC } from "react";
|
|
3
|
+
declare const _default: Meta<import("@storybook/react/types-6-0").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const TextAction: VFC;
|
|
6
|
+
export declare const LinkAction: VFC;
|
|
7
|
+
export declare const ObjAction: VFC;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SuggestedAction, SuggestedActionProps } from "./SuggestedAction";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { SuggestionTypes } from "stentor-models";
|
|
3
|
+
import "./SuggestedActions.scss";
|
|
4
|
+
import "@xapp/chat-widget-core/dist/index.css";
|
|
5
|
+
export interface SuggestedActionsProps {
|
|
6
|
+
readonly actions: readonly SuggestionTypes[];
|
|
7
|
+
onActionClick(action: SuggestionTypes): void;
|
|
8
|
+
}
|
|
9
|
+
export declare const SuggestedActions: FC<SuggestedActionsProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SuggestedActions, SuggestedActionsProps } from "./SuggestedActions";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { UnknownMessage } from "./UnknownMessage";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { SearchWidgetTheme } from "../../config/theme";
|
|
3
|
+
export interface WidgetStylesheetProps {
|
|
4
|
+
readonly theme?: SearchWidgetTheme;
|
|
5
|
+
}
|
|
6
|
+
export declare function buildStyleContent(theme?: SearchWidgetTheme): string;
|
|
7
|
+
export declare const WidgetStylesheet: FC<WidgetStylesheetProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { WidgetStylesheet, WidgetStylesheetProps } from "./WidgetStylesheet";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BigMicIcon } from "./BigMicIcon";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LeftAngleIcon } from "./LeftAngleIcon";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RightAngleIcon } from "./RightAngleIcon";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SearchIcon } from "./SearchIcon";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SpinnerIcon } from "./SpinnerIcon";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface SearchWidgetConfig {
|
|
2
|
+
readonly api: StentorApiConfig;
|
|
3
|
+
readonly suggestionsUrl?: string;
|
|
4
|
+
readonly isVoiceEnabled?: boolean;
|
|
5
|
+
readonly autoGreeting?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface StentorApiConfig {
|
|
8
|
+
readonly url: string;
|
|
9
|
+
readonly key: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
export interface SearchWidgetTheme {
|
|
2
|
+
readonly accentColor?: string;
|
|
3
|
+
readonly border?: WidgetBorderTheme;
|
|
4
|
+
readonly messages?: WidgetMessagesTheme;
|
|
5
|
+
readonly card?: WidgetCardTheme;
|
|
6
|
+
readonly carousel?: WidgetCarouselTheme;
|
|
7
|
+
readonly list?: WidgetCarouselTheme;
|
|
8
|
+
}
|
|
9
|
+
export interface WidgetLinkTheme {
|
|
10
|
+
readonly default?: WidgetTextTheme;
|
|
11
|
+
}
|
|
12
|
+
export declare type WidgetBorderStyle = "solid" | "dashed" | "none";
|
|
13
|
+
export interface WidgetBorderTheme {
|
|
14
|
+
readonly color?: string;
|
|
15
|
+
readonly width?: string;
|
|
16
|
+
readonly radius?: string;
|
|
17
|
+
readonly style?: WidgetBorderStyle;
|
|
18
|
+
}
|
|
19
|
+
export interface WidgetPaddingTheme {
|
|
20
|
+
readonly top?: string;
|
|
21
|
+
readonly right?: string;
|
|
22
|
+
readonly bottom?: string;
|
|
23
|
+
readonly left?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface WidgetMarginTheme {
|
|
26
|
+
readonly top?: string;
|
|
27
|
+
readonly right?: string;
|
|
28
|
+
readonly bottom?: string;
|
|
29
|
+
readonly left?: string;
|
|
30
|
+
}
|
|
31
|
+
export declare type WidgetBackgroundTheme = string;
|
|
32
|
+
export interface WidgetMessagesTheme {
|
|
33
|
+
readonly others?: WidgetMessageTheme;
|
|
34
|
+
}
|
|
35
|
+
export interface WidgetBubbleTheme {
|
|
36
|
+
readonly background?: WidgetBackgroundTheme;
|
|
37
|
+
}
|
|
38
|
+
export interface WidgetMessageTheme {
|
|
39
|
+
/** Message bubble color */
|
|
40
|
+
readonly bubble?: WidgetBubbleTheme;
|
|
41
|
+
/** Message text color */
|
|
42
|
+
readonly text?: WidgetTextTheme;
|
|
43
|
+
}
|
|
44
|
+
export interface WidgetTextTheme {
|
|
45
|
+
readonly color?: string;
|
|
46
|
+
readonly fontSize?: string;
|
|
47
|
+
readonly fontFamily?: string;
|
|
48
|
+
readonly fontWeight?: string;
|
|
49
|
+
readonly fontStyle?: string;
|
|
50
|
+
readonly lineHeight?: string | number;
|
|
51
|
+
}
|
|
52
|
+
export interface WidgetTextBlockTheme {
|
|
53
|
+
readonly text?: WidgetTextTheme;
|
|
54
|
+
readonly margin?: WidgetMarginTheme;
|
|
55
|
+
readonly padding?: WidgetMarginTheme;
|
|
56
|
+
}
|
|
57
|
+
export interface WidgetLinkBlockTheme {
|
|
58
|
+
readonly text?: WidgetLinkTheme;
|
|
59
|
+
readonly margin?: WidgetMarginTheme;
|
|
60
|
+
readonly padding?: WidgetMarginTheme;
|
|
61
|
+
}
|
|
62
|
+
export interface WidgetCardTheme {
|
|
63
|
+
readonly border?: WidgetBorderTheme;
|
|
64
|
+
readonly background?: WidgetBackgroundTheme;
|
|
65
|
+
readonly title?: WidgetTextBlockTheme;
|
|
66
|
+
readonly description?: WidgetTextBlockTheme;
|
|
67
|
+
readonly link?: WidgetLinkBlockTheme;
|
|
68
|
+
readonly padding?: WidgetPaddingTheme;
|
|
69
|
+
readonly margin?: WidgetMarginTheme;
|
|
70
|
+
}
|
|
71
|
+
export interface WidgetListTheme {
|
|
72
|
+
readonly card?: WidgetCardTheme;
|
|
73
|
+
}
|
|
74
|
+
export interface WidgetCarouselTheme {
|
|
75
|
+
readonly card?: WidgetCardTheme;
|
|
76
|
+
}
|