@awell-health/ui-library 0.1.33

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.
Files changed (131) hide show
  1. package/README.md +77 -0
  2. package/dist/index.css +8917 -0
  3. package/dist/index.js +50543 -0
  4. package/dist/types/atoms/button/Button.d.ts +8 -0
  5. package/dist/types/atoms/button/index.d.ts +2 -0
  6. package/dist/types/atoms/checkboxButton/CheckboxButton.d.ts +8 -0
  7. package/dist/types/atoms/checkboxButton/index.d.ts +2 -0
  8. package/dist/types/atoms/datePicker/DatePicker.d.ts +10 -0
  9. package/dist/types/atoms/datePicker/index.d.ts +1 -0
  10. package/dist/types/atoms/description/Description.d.ts +6 -0
  11. package/dist/types/atoms/description/index.d.ts +2 -0
  12. package/dist/types/atoms/index.d.ts +21 -0
  13. package/dist/types/atoms/inputField/InputField.d.ts +10 -0
  14. package/dist/types/atoms/inputField/index.d.ts +2 -0
  15. package/dist/types/atoms/logo/Logo.d.ts +6 -0
  16. package/dist/types/atoms/logo/index.d.ts +2 -0
  17. package/dist/types/atoms/longTextField/LongTextField.d.ts +9 -0
  18. package/dist/types/atoms/longTextField/index.d.ts +2 -0
  19. package/dist/types/atoms/messageAttachment/MessageAttachment.d.ts +8 -0
  20. package/dist/types/atoms/messageAttachment/index.d.ts +2 -0
  21. package/dist/types/atoms/modal/Modal.d.ts +11 -0
  22. package/dist/types/atoms/modal/index.d.ts +1 -0
  23. package/dist/types/atoms/phoneInputField/PhoneInputField.d.ts +22 -0
  24. package/dist/types/atoms/phoneInputField/helpers.d.ts +3 -0
  25. package/dist/types/atoms/phoneInputField/index.d.ts +3 -0
  26. package/dist/types/atoms/progressIndicator/ProgressIndicator.d.ts +6 -0
  27. package/dist/types/atoms/progressIndicator/index.d.ts +1 -0
  28. package/dist/types/atoms/questionLabel/QuestionLabel.d.ts +6 -0
  29. package/dist/types/atoms/questionLabel/index.d.ts +2 -0
  30. package/dist/types/atoms/radioButton/RadioButton.d.ts +9 -0
  31. package/dist/types/atoms/radioButton/index.d.ts +2 -0
  32. package/dist/types/atoms/rangeInput/RangeInput.d.ts +18 -0
  33. package/dist/types/atoms/rangeInput/index.d.ts +2 -0
  34. package/dist/types/atoms/richTextViewer/RichTextViewer.d.ts +6 -0
  35. package/dist/types/atoms/richTextViewer/index.d.ts +1 -0
  36. package/dist/types/atoms/richTextViewer/serializeHtml.d.ts +3 -0
  37. package/dist/types/atoms/scheduling/cal.com/CalDotComScheduling.d.ts +11 -0
  38. package/dist/types/atoms/scheduling/cal.com/calDotComTypes.d.ts +8 -0
  39. package/dist/types/atoms/scheduling/cal.com/index.d.ts +2 -0
  40. package/dist/types/atoms/scheduling/index.d.ts +1 -0
  41. package/dist/types/atoms/scrollIndicator/ScrollIndicator.d.ts +2 -0
  42. package/dist/types/atoms/scrollIndicator/index.d.ts +1 -0
  43. package/dist/types/atoms/select/Select.d.ts +22 -0
  44. package/dist/types/atoms/select/index.d.ts +3 -0
  45. package/dist/types/atoms/select/types.d.ts +1 -0
  46. package/dist/types/atoms/spinner/Spinner.d.ts +7 -0
  47. package/dist/types/atoms/spinner/index.d.ts +1 -0
  48. package/dist/types/atoms/themeProvider/ThemeProvider.d.ts +6 -0
  49. package/dist/types/atoms/themeProvider/helpers.d.ts +3 -0
  50. package/dist/types/atoms/themeProvider/index.d.ts +2 -0
  51. package/dist/types/atoms/typingCaret/TypingCaret.d.ts +8 -0
  52. package/dist/types/atoms/typingCaret/index.d.ts +1 -0
  53. package/dist/types/atoms/typography/Typography.d.ts +22 -0
  54. package/dist/types/atoms/typography/index.d.ts +3 -0
  55. package/dist/types/atoms/typography/types.d.ts +3 -0
  56. package/dist/types/constants/descriptionFixture.d.ts +56 -0
  57. package/dist/types/constants/formFixture.d.ts +3 -0
  58. package/dist/types/constants/messageFixture.d.ts +56 -0
  59. package/dist/types/hooks/index.d.ts +5 -0
  60. package/dist/types/hooks/useAccentColor/index.d.ts +1 -0
  61. package/dist/types/hooks/useAccentColor/useAccentColor.d.ts +5 -0
  62. package/dist/types/hooks/useClickOutsideNotifier/index.d.ts +7 -0
  63. package/dist/types/hooks/useForm/helpers.d.ts +20 -0
  64. package/dist/types/hooks/useForm/index.d.ts +2 -0
  65. package/dist/types/hooks/useForm/types.d.ts +55 -0
  66. package/dist/types/hooks/useForm/useConversationalForm.d.ts +3 -0
  67. package/dist/types/hooks/useForm/useTraditionalForm.d.ts +3 -0
  68. package/dist/types/hooks/useHtmlScript.d.ts +5 -0
  69. package/dist/types/hooks/useScrollHint/index.d.ts +1 -0
  70. package/dist/types/hooks/useScrollHint/useScrollHint.d.ts +6 -0
  71. package/dist/types/hooks/useValidate/index.d.ts +2 -0
  72. package/dist/types/hooks/useValidate/types.d.ts +24 -0
  73. package/dist/types/hooks/useValidate/useValidate.d.ts +9 -0
  74. package/dist/types/hostedPages/activities/checklist/Checklist.d.ts +14 -0
  75. package/dist/types/hostedPages/activities/checklist/index.d.ts +2 -0
  76. package/dist/types/hostedPages/activities/cloudinary/CloudinarySingleFileUpload.d.ts +3 -0
  77. package/dist/types/hostedPages/activities/cloudinary/CloudinaryUpload.d.ts +3 -0
  78. package/dist/types/hostedPages/activities/cloudinary/components/CloudinaryUploadWidget.d.ts +10 -0
  79. package/dist/types/hostedPages/activities/cloudinary/components/index.d.ts +1 -0
  80. package/dist/types/hostedPages/activities/cloudinary/index.d.ts +2 -0
  81. package/dist/types/hostedPages/activities/cloudinary/types.d.ts +86 -0
  82. package/dist/types/hostedPages/activities/cloudinary/utils.d.ts +5 -0
  83. package/dist/types/hostedPages/activities/form/ConversationalForm.d.ts +3 -0
  84. package/dist/types/hostedPages/activities/form/TraditionalForm.d.ts +3 -0
  85. package/dist/types/hostedPages/activities/form/__testdata__/eq5d5lFixture.d.ts +51 -0
  86. package/dist/types/hostedPages/activities/form/__testdata__/testFormFixture.d.ts +5 -0
  87. package/dist/types/hostedPages/activities/form/index.d.ts +2 -0
  88. package/dist/types/hostedPages/activities/form/types.d.ts +20 -0
  89. package/dist/types/hostedPages/activities/message/Message.d.ts +3 -0
  90. package/dist/types/hostedPages/activities/message/index.d.ts +1 -0
  91. package/dist/types/hostedPages/activities/message/types.d.ts +16 -0
  92. package/dist/types/hostedPages/activities/scheduling/cal.com/CalDotcomActivity.d.ts +3 -0
  93. package/dist/types/hostedPages/activities/scheduling/cal.com/index.d.ts +1 -0
  94. package/dist/types/hostedPages/activities/scheduling/cal.com/types.d.ts +6 -0
  95. package/dist/types/hostedPages/activities/scheduling/index.d.ts +1 -0
  96. package/dist/types/hostedPages/activities/wizardForm/WizardForm.d.ts +2 -0
  97. package/dist/types/hostedPages/activities/wizardForm/__testdata__/testFormFixture.d.ts +6 -0
  98. package/dist/types/hostedPages/activities/wizardForm/index.d.ts +1 -0
  99. package/dist/types/hostedPages/index.d.ts +9 -0
  100. package/dist/types/hostedPages/layouts/HostedPageLayout/CloseButton/CloseButton.d.ts +6 -0
  101. package/dist/types/hostedPages/layouts/HostedPageLayout/CloseButton/index.d.ts +1 -0
  102. package/dist/types/hostedPages/layouts/HostedPageLayout/HostedPageFooter/HostedPageFooter.d.ts +6 -0
  103. package/dist/types/hostedPages/layouts/HostedPageLayout/HostedPageFooter/index.d.ts +1 -0
  104. package/dist/types/hostedPages/layouts/HostedPageLayout/HostedPageLayout.d.ts +8 -0
  105. package/dist/types/hostedPages/layouts/HostedPageLayout/index.d.ts +2 -0
  106. package/dist/types/index.d.ts +5 -0
  107. package/dist/types/molecules/attachmentList/AttachmentList.d.ts +3 -0
  108. package/dist/types/molecules/attachmentList/index.d.ts +2 -0
  109. package/dist/types/molecules/attachmentList/types.d.ts +8 -0
  110. package/dist/types/molecules/avaGPT/avaGPT.d.ts +3 -0
  111. package/dist/types/molecules/avaGPT/index.d.ts +1 -0
  112. package/dist/types/molecules/avaGPT/types.d.ts +12 -0
  113. package/dist/types/molecules/index.d.ts +5 -0
  114. package/dist/types/molecules/multipleChoiceQuestion/MultipleChoiceQuestion.d.ts +11 -0
  115. package/dist/types/molecules/multipleChoiceQuestion/index.d.ts +1 -0
  116. package/dist/types/molecules/navbar/Navbar.d.ts +7 -0
  117. package/dist/types/molecules/navbar/index.d.ts +2 -0
  118. package/dist/types/molecules/question/Question.d.ts +4 -0
  119. package/dist/types/molecules/question/index.d.ts +1 -0
  120. package/dist/types/molecules/question/types.d.ts +31 -0
  121. package/dist/types/molecules/singleChoiceQuestion/SingleChoiceQuestion.d.ts +12 -0
  122. package/dist/types/molecules/singleChoiceQuestion/index.d.ts +1 -0
  123. package/dist/types/setupTests.d.ts +1 -0
  124. package/dist/types/types/form.d.ts +26 -0
  125. package/dist/types/types/generated/fragment-types.d.ts +0 -0
  126. package/dist/types/types/generated/types-orchestration.d.ts +1874 -0
  127. package/dist/types/types/index.d.ts +8 -0
  128. package/dist/types/types/message.d.ts +6 -0
  129. package/dist/types/types/question.d.ts +27 -0
  130. package/dist/types/types/richText.d.ts +7 -0
  131. package/package.json +194 -0
@@ -0,0 +1,55 @@
1
+ import { UseFormReturn } from 'react-hook-form';
2
+ import { AnswerInput, Question, FormError, QuestionWithVisibility } from '../../types';
3
+ export type { FormError, QuestionWithVisibility } from '../../types';
4
+ export { QuestionType, UserQuestionType } from '../../types';
5
+ export declare enum DataPointValueType {
6
+ Boolean = "BOOLEAN",
7
+ Date = "DATE",
8
+ Number = "NUMBER",
9
+ NumbersArray = "NUMBERS_ARRAY",
10
+ String = "STRING"
11
+ }
12
+ export declare type QuestionRuleResult = {
13
+ question_id: string;
14
+ rule_id: string;
15
+ satisfied: boolean;
16
+ };
17
+ export declare type ErrorLabels = {
18
+ required: string;
19
+ sliderNotTouched: string;
20
+ invalidPhoneNumber: string;
21
+ formHasErrors: string;
22
+ };
23
+ export declare type AnswerValue = string | number | number[];
24
+ export interface FormSettingsContextProps {
25
+ evaluateDisplayConditions: (response: Array<AnswerInput>) => Promise<Array<QuestionRuleResult>>;
26
+ onSubmit: (response: Array<AnswerInput>) => Promise<void> | void;
27
+ questions: Array<Question>;
28
+ errorLabels: ErrorLabels;
29
+ storedAnswers?: string;
30
+ autosaveAnswers?: boolean;
31
+ onAnswersChange?: (answers: string) => void;
32
+ }
33
+ export interface ConversationalFormContext {
34
+ updateQuestionVisibility: () => void;
35
+ submitForm: () => void;
36
+ isSubmittingForm: boolean;
37
+ handleGoToNextQuestion: () => void;
38
+ handleGoToPrevQuestion: () => void;
39
+ formMethods: UseFormReturn;
40
+ currentQuestion: Question;
41
+ percentageCompleted: number;
42
+ errors: Array<FormError>;
43
+ isFirstQuestion: boolean;
44
+ isLastQuestion: boolean;
45
+ isEvaluatingQuestionVisibility: boolean;
46
+ }
47
+ export interface TraditionalFormContext {
48
+ updateQuestionVisibility: () => void;
49
+ submitForm: () => void;
50
+ isSubmittingForm: boolean;
51
+ formMethods: UseFormReturn;
52
+ errors: Array<FormError>;
53
+ questionWithVisiblity: Array<QuestionWithVisibility>;
54
+ formHasErrors: boolean;
55
+ }
@@ -0,0 +1,3 @@
1
+ import { FormSettingsContextProps, ConversationalFormContext } from './types';
2
+ declare const useConversationalForm: ({ questions, evaluateDisplayConditions, onSubmit, errorLabels, storedAnswers, autosaveAnswers, onAnswersChange, }: FormSettingsContextProps) => ConversationalFormContext;
3
+ export { useConversationalForm };
@@ -0,0 +1,3 @@
1
+ import { FormSettingsContextProps, TraditionalFormContext } from './types';
2
+ declare const useTraditionalForm: ({ questions, evaluateDisplayConditions, onSubmit, errorLabels, storedAnswers, autosaveAnswers, onAnswersChange, }: FormSettingsContextProps) => TraditionalFormContext;
3
+ export { useTraditionalForm };
@@ -0,0 +1,5 @@
1
+ declare type UseScript = (url: string) => {
2
+ isLoaded: boolean;
3
+ };
4
+ export declare const useHtmlScript: UseScript;
5
+ export {};
@@ -0,0 +1 @@
1
+ export { useScrollHint } from './useScrollHint';
@@ -0,0 +1,6 @@
1
+ interface UseScrollHintHook {
2
+ showScrollHint: boolean;
3
+ determineShowScrollHint: () => void;
4
+ }
5
+ export declare const useScrollHint: () => UseScrollHintHook;
6
+ export {};
@@ -0,0 +1,2 @@
1
+ export { useValidate, type UseValidateHook } from './useValidate';
2
+ export * from './types';
@@ -0,0 +1,24 @@
1
+ declare type Region = 'america' | 'europe' | 'asia' | 'oceania' | 'africa';
2
+ declare type SubRegion = 'north-america' | 'south-america' | 'central-america' | 'carribean' | 'eu-union' | 'ex-ussr' | 'ex-yugos' | 'baltic' | 'middle-east' | 'north-africa';
3
+ export declare type CountryIso2 = 'af' | 'al' | 'dz' | 'ad' | 'ao' | 'ag' | 'ar' | 'am' | 'aw' | 'au' | 'at' | 'az' | 'bs' | 'bh' | 'bd' | 'bb' | 'by' | 'be' | 'bz' | 'bj' | 'bt' | 'bo' | 'ba' | 'bw' | 'br' | 'io' | 'bn' | 'bg' | 'bf' | 'bi' | 'kh' | 'cm' | 'ca' | 'cv' | 'bq' | 'cf' | 'td' | 'cl' | 'cn' | 'co' | 'km' | 'cd' | 'cg' | 'cr' | 'ci' | 'hr' | 'cu' | 'cw' | 'cy' | 'cz' | 'dk' | 'dj' | 'dm' | 'do' | 'ec' | 'eg' | 'sv' | 'gq' | 'er' | 'ee' | 'et' | 'fj' | 'fi' | 'fr' | 'gf' | 'pf' | 'ga' | 'gm' | 'ge' | 'de' | 'gh' | 'gr' | 'gd' | 'gp' | 'gu' | 'gt' | 'gn' | 'gw' | 'gy' | 'ht' | 'hn' | 'hk' | 'hu' | 'is' | 'in' | 'id' | 'ir' | 'iq' | 'ie' | 'il' | 'it' | 'jm' | 'jp' | 'jo' | 'kz' | 'ke' | 'ki' | 'xk' | 'kw' | 'kg' | 'la' | 'lv' | 'lb' | 'ls' | 'lr' | 'ly' | 'li' | 'lt' | 'lu' | 'mo' | 'mk' | 'mg' | 'mw' | 'my' | 'mv' | 'ml' | 'mt' | 'mh' | 'mq' | 'mr' | 'mu' | 'mx' | 'fm' | 'md' | 'mc' | 'mn' | 'me' | 'ma' | 'mz' | 'mm' | 'na' | 'nr' | 'np' | 'nl' | 'nc' | 'nz' | 'ni' | 'ne' | 'ng' | 'kp' | 'no' | 'om' | 'pk' | 'pw' | 'ps' | 'pa' | 'pg' | 'py' | 'pe' | 'ph' | 'pl' | 'pt' | 'pr' | 'qa' | 're' | 'ro' | 'ru' | 'rw' | 'kn' | 'lc' | 'vc' | 'ws' | 'sm' | 'st' | 'sa' | 'sn' | 'rs' | 'sc' | 'sl' | 'sg' | 'sk' | 'si' | 'sb' | 'so' | 'za' | 'kr' | 'ss' | 'es' | 'lk' | 'sd' | 'sr' | 'sz' | 'se' | 'ch' | 'sy' | 'tw' | 'tj' | 'tz' | 'th' | 'tl' | 'tg' | 'to' | 'tt' | 'tn' | 'tr' | 'tm' | 'tv' | 'ug' | 'ua' | 'ae' | 'gb' | 'us' | 'uy' | 'uz' | 'vu' | 'va' | 've' | 'vn' | 'ye' | 'zm' | 'zw';
4
+ declare type BaseCountryData = [string, Array<Region | SubRegion>, CountryIso2, string];
5
+ declare type CountryDataWithFormat = [...BaseCountryData, string];
6
+ declare type CountryDataWithOrder = [...CountryDataWithFormat, number];
7
+ declare type CountryDataAreaCodes = [...CountryDataWithOrder, string[]];
8
+ export declare type CountryData = BaseCountryData | CountryDataWithFormat | CountryDataWithOrder | CountryDataAreaCodes;
9
+ export interface ParsedCountry {
10
+ name: CountryData[0];
11
+ regions: CountryData[1];
12
+ iso2: CountryData[2];
13
+ dialCode: CountryData[3];
14
+ format: CountryData[4];
15
+ priority: CountryData[5];
16
+ areaCodes: CountryData[6];
17
+ }
18
+ export interface ValidatePhoneReturn {
19
+ country: ParsedCountry | undefined;
20
+ isValid: boolean;
21
+ lengthMatch: boolean;
22
+ areaCodeMatch: boolean | undefined;
23
+ }
24
+ export {};
@@ -0,0 +1,9 @@
1
+ import { ValidatePhoneReturn, CountryIso2 } from './types';
2
+ export interface UseValidateHook {
3
+ validatePhoneNumber: (number: string, availableCountries?: CountryIso2 | Array<CountryIso2>) => ValidatePhoneReturn;
4
+ isValidE164Number: (number: string, availableCountries?: CountryIso2 | Array<CountryIso2>) => boolean;
5
+ isPossibleE164Number: (number: string) => boolean;
6
+ numberMatchesAvailableCountries: (number: string, availableCountries: CountryIso2 | Array<CountryIso2>) => boolean;
7
+ }
8
+ export declare const handleUSException: (number: string, originalValidation: ValidatePhoneReturn) => ValidatePhoneReturn;
9
+ export declare const useValidate: () => UseValidateHook;
@@ -0,0 +1,14 @@
1
+ import { FC, MouseEventHandler } from 'react';
2
+ export interface ChecklistItem {
3
+ id: string;
4
+ label: string;
5
+ }
6
+ export interface ChecklistProps {
7
+ title: string;
8
+ items: Array<ChecklistItem>;
9
+ onSubmit: MouseEventHandler<HTMLButtonElement>;
10
+ readOnly?: boolean;
11
+ disabled?: boolean;
12
+ submitLabel: string;
13
+ }
14
+ export declare const Checklist: FC<ChecklistProps>;
@@ -0,0 +1,2 @@
1
+ export { Checklist } from './Checklist';
2
+ export type { ChecklistProps } from './Checklist';
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { CloudinarySingleFileUploadProps } from './types';
3
+ export declare const CloudinarySingleFileUpload: FC<CloudinarySingleFileUploadProps>;
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { CloudinaryExtensionProps } from './types';
3
+ export declare const CloudinaryUpload: FC<CloudinaryExtensionProps>;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { UploadData, UploadWidgetOptions } from '../types';
3
+ interface CloudinaryUploadWidgetProps extends UploadWidgetOptions {
4
+ onFileUpload: (params: UploadData) => void;
5
+ text: {
6
+ uploadButton: string;
7
+ };
8
+ }
9
+ export declare const CloudinaryUploadWidget: ({ onFileUpload: onFileUpload, text, ...widgetOptions }: CloudinaryUploadWidgetProps) => JSX.Element;
10
+ export {};
@@ -0,0 +1 @@
1
+ export { CloudinaryUploadWidget } from './CloudinaryUploadWidget';
@@ -0,0 +1,2 @@
1
+ export { CloudinaryUpload } from './CloudinaryUpload';
2
+ export { CloudinarySingleFileUpload } from './CloudinarySingleFileUpload';
@@ -0,0 +1,86 @@
1
+ /// <reference types="react" />
2
+ import { AttachmentLabels } from '../../../types';
3
+ import { type MessageAttachment, MessageAttachmentType } from '../../../types/generated/types-orchestration';
4
+ export { MessageAttachment, MessageAttachmentType };
5
+ export declare type UploadData = {
6
+ publicId: string;
7
+ url: string;
8
+ original_filename: string;
9
+ };
10
+ export declare type OnFileUpload = (data: UploadData) => void;
11
+ export interface CloudinaryExtensionProps {
12
+ cloudName: string;
13
+ uploadPreset: string;
14
+ folder?: string;
15
+ tags?: string[];
16
+ context?: Record<string, string>;
17
+ onFinish: (data: UploadData[]) => void;
18
+ text: {
19
+ subject: string;
20
+ fileCountHeader: (count: number) => string;
21
+ attachmentIcon: React.ReactNode;
22
+ attachmentLabels: AttachmentLabels;
23
+ buttonLabels: {
24
+ upload: string;
25
+ done: string;
26
+ };
27
+ };
28
+ }
29
+ export interface CloudinarySingleFileUploadProps extends Omit<CloudinaryExtensionProps, 'onFinish' | 'text'> {
30
+ onFinish: (data: UploadData | undefined) => void;
31
+ text: {
32
+ subject: string;
33
+ fileCountHeader: (fileUploaded: boolean) => string;
34
+ attachmentIcon: React.ReactNode;
35
+ attachmentLabels: AttachmentLabels;
36
+ buttonLabels: {
37
+ upload: string;
38
+ done: string;
39
+ };
40
+ };
41
+ }
42
+ export declare type CloudinaryExtensionSettings = {
43
+ cloudName: string;
44
+ uploadPreset: string;
45
+ folder?: string;
46
+ };
47
+ export declare enum ActionKey {
48
+ UPLOAD_FILES = "uploadFiles"
49
+ }
50
+ export declare type UploadFilesFields = {
51
+ uploadPreset?: string;
52
+ folder?: string;
53
+ tags?: string;
54
+ };
55
+ declare type ResourceType = 'auto' | 'image' | 'video' | 'raw';
56
+ declare type SourceType = 'local' | 'url' | 'camera' | 'dropbox' | 'image_search' | 'facebook' | 'instagram' | 'shutterstock' | 'gettyimages' | 'istock' | 'unsplash' | 'google_drive';
57
+ export interface UploadWidgetOptions {
58
+ cloudName: string;
59
+ uploadPreset: string;
60
+ multiple?: boolean;
61
+ maxFiles?: number;
62
+ folder?: string;
63
+ tags?: string[];
64
+ sources?: SourceType[];
65
+ resourceType?: ResourceType;
66
+ clientAllowedFormats?: string[];
67
+ maxFileSize?: number;
68
+ maxImageFileSize?: number;
69
+ maxVideoFileSize?: number;
70
+ context?: Record<string, string>;
71
+ }
72
+ export interface ProductGalleryOptions {
73
+ cloudName: string;
74
+ container: string;
75
+ multiple?: boolean;
76
+ maxFiles?: number;
77
+ folder?: string;
78
+ tags?: string[];
79
+ sources?: SourceType[];
80
+ resourceType?: ResourceType;
81
+ clientAllowedFormats?: string[];
82
+ maxFileSize?: number;
83
+ maxImageFileSize?: number;
84
+ maxVideoFileSize?: number;
85
+ context?: Record<string, string>;
86
+ }
@@ -0,0 +1,5 @@
1
+ import 'cloudinary-core';
2
+ import { type UploadWidgetOptions } from './types';
3
+ export declare const createUploadWidget: (options: UploadWidgetOptions, callback: (error: unknown, result: Record<string, unknown>) => void) => {
4
+ open: () => void;
5
+ };
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { FormProps } from '../../../types/form';
3
+ export declare const ConversationalForm: ({ form, onSubmit, buttonLabels, evaluateDisplayConditions, errorLabels, questionLabels, storedAnswers, onAnswersChange, autoProgress, autosaveAnswers, }: FormProps) => JSX.Element;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { FormProps } from '../../../types/form';
3
+ export declare const TraditionalForm: ({ form, onSubmit, buttonLabels, evaluateDisplayConditions, errorLabels, storedAnswers, onAnswersChange, autosaveAnswers, }: FormProps) => JSX.Element;
@@ -0,0 +1,51 @@
1
+ export declare const form: {
2
+ id: string;
3
+ title: string;
4
+ trademark: string;
5
+ questions: ({
6
+ id: string;
7
+ title: string;
8
+ dataPointValueType: string;
9
+ options: {
10
+ id: string;
11
+ value: number;
12
+ label: string;
13
+ __typename: string;
14
+ }[];
15
+ questionType: string;
16
+ userQuestionType: string;
17
+ questionConfig: {
18
+ recode_enabled: boolean;
19
+ mandatory: boolean;
20
+ use_select: null;
21
+ slider: null;
22
+ __typename: string;
23
+ };
24
+ __typename: string;
25
+ } | {
26
+ id: string;
27
+ title: string;
28
+ dataPointValueType: string;
29
+ options: never[];
30
+ questionType: string;
31
+ userQuestionType: string;
32
+ questionConfig: {
33
+ recode_enabled: boolean;
34
+ mandatory: boolean;
35
+ use_select: null;
36
+ slider: {
37
+ min: number;
38
+ max: number;
39
+ step_value: number;
40
+ display_marks: boolean;
41
+ min_label: string;
42
+ max_label: string;
43
+ is_value_tooltip_on: boolean;
44
+ show_min_max_values: boolean;
45
+ __typename: string;
46
+ };
47
+ __typename: string;
48
+ };
49
+ __typename: string;
50
+ })[];
51
+ };
@@ -0,0 +1,5 @@
1
+ import { Form } from '../../../../types';
2
+ export declare const form: Form;
3
+ export declare const formWithTwoRequiredSingleSelectQuestions: Form;
4
+ export declare const sliderQuestionForm: Form;
5
+ export declare const dateQuestionForm: Form;
@@ -0,0 +1,2 @@
1
+ export { ConversationalForm } from './ConversationalForm';
2
+ export { TraditionalForm } from './TraditionalForm';
@@ -0,0 +1,20 @@
1
+ import { ErrorLabels, QuestionRuleResult } from '../../../hooks/useForm/types';
2
+ import { QuestionLabels } from '../../../molecules/question/types';
3
+ import { AnswerInput, Form } from '../../../types';
4
+ declare type ButtonLabels = {
5
+ prev: string;
6
+ next: string;
7
+ submit: string;
8
+ start_form?: string;
9
+ };
10
+ export interface WizardFormProps {
11
+ form: Form;
12
+ questionLabels?: QuestionLabels;
13
+ storedAnswers: string;
14
+ onAnswersChange: (answers: string) => void;
15
+ buttonLabels: ButtonLabels;
16
+ errorLabels: ErrorLabels;
17
+ onSubmit: (response: Array<AnswerInput>) => void;
18
+ evaluateDisplayConditions: (response: Array<AnswerInput>) => Promise<Array<QuestionRuleResult>>;
19
+ }
20
+ export {};
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { MessageProps } from './types';
3
+ export declare const Message: ({ onMessageRead, content, subject, children, attachmentIcon, attachmentLabels, attachments, buttonLabels, }: MessageProps) => JSX.Element;
@@ -0,0 +1 @@
1
+ export { Message } from './Message';
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { MessageAttachment } from '../../../types/generated/types-orchestration';
3
+ import { AttachmentLabels } from '../../../types';
4
+ export { MessageAttachmentType } from '../../../types/generated/types-orchestration';
5
+ export interface MessageProps {
6
+ onMessageRead: () => void;
7
+ content: string;
8
+ subject: string;
9
+ children?: React.ReactNode;
10
+ attachments: Array<MessageAttachment>;
11
+ attachmentIcon: React.ReactNode;
12
+ attachmentLabels: AttachmentLabels;
13
+ buttonLabels: {
14
+ readMessage: string;
15
+ };
16
+ }
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { CalDotComActivityProps } from './types';
3
+ export declare const CalDotcomActivity: ({ calLink, onBookingSuccessful, hideEventTypeDetails, }: CalDotComActivityProps) => JSX.Element;
@@ -0,0 +1 @@
1
+ export { CalDotcomActivity } from './CalDotcomActivity';
@@ -0,0 +1,6 @@
1
+ import { CalDotComBookingSuccessfulFunction } from '../../../../atoms/scheduling/cal.com';
2
+ export interface CalDotComActivityProps {
3
+ calLink: string;
4
+ onBookingSuccessful: CalDotComBookingSuccessfulFunction;
5
+ hideEventTypeDetails: boolean;
6
+ }
@@ -0,0 +1 @@
1
+ export { CalDotcomActivity } from './cal.com';
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const WizardForm: ({ form, onSubmit, buttonLabels, evaluateDisplayConditions, errorLabels, questionLabels, storedAnswers, onAnswersChange, autoProgress, autosaveAnswers, }: import("../../..").FormProps) => JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { Form } from '../../../../types';
2
+ export declare const form: Form;
3
+ export declare const formWithTwoRequiredSingleSelectQuestions: Form;
4
+ export declare const sliderQuestionForm: Form;
5
+ export declare const dateQuestionForm: Form;
6
+ export declare const formHavingOneQuestionHiddenWithDisplayCondition: Form;
@@ -0,0 +1 @@
1
+ export { WizardForm } from './WizardForm';
@@ -0,0 +1,9 @@
1
+ export { Checklist } from './activities/checklist';
2
+ export { Message } from './activities/message';
3
+ export { ConversationalForm, TraditionalForm } from './activities/form';
4
+ export { WizardForm } from './activities/wizardForm';
5
+ export { CalDotcomActivity } from './activities/scheduling';
6
+ export { CloudinaryUpload } from './activities/cloudinary';
7
+ export { CloudinarySingleFileUpload } from './activities/cloudinary';
8
+ export { HostedPageLayout } from './layouts/HostedPageLayout';
9
+ export { CloseButton } from './layouts/HostedPageLayout';
@@ -0,0 +1,6 @@
1
+ import { FC } from 'react';
2
+ interface CloseButtonProps {
3
+ onClose: () => void;
4
+ }
5
+ export declare const CloseButton: FC<CloseButtonProps>;
6
+ export {};
@@ -0,0 +1 @@
1
+ export { CloseButton } from './CloseButton';
@@ -0,0 +1,6 @@
1
+ import React, { FC } from 'react';
2
+ export interface HostedPageFooterProps {
3
+ children: React.ReactNode | string;
4
+ showScrollHint?: boolean;
5
+ }
6
+ export declare const HostedPageFooter: FC<HostedPageFooterProps>;
@@ -0,0 +1 @@
1
+ export { HostedPageFooter } from './HostedPageFooter';
@@ -0,0 +1,8 @@
1
+ import React, { FC } from 'react';
2
+ export interface HostedPageLayoutProps {
3
+ children: React.ReactNode | string;
4
+ onCloseHostedPage: () => void;
5
+ logo?: JSX.Element | string;
6
+ hideCloseButton?: boolean;
7
+ }
8
+ export declare const HostedPageLayout: FC<HostedPageLayoutProps>;
@@ -0,0 +1,2 @@
1
+ export { HostedPageLayout } from './HostedPageLayout';
2
+ export { CloseButton } from './CloseButton';
@@ -0,0 +1,5 @@
1
+ export { Button, CheckboxButton, DatePicker, Description, InputField, QuestionLabel, Logo, LongTextField, RadioButton, RangeInput, RichTextViewer, HeadingMain, HeadingSecondary, HeadingTertiary, SubHeading, Heading5, Heading6, Text, InlineText, ExternalLink, InnerText, CircularSpinner, HorizontalSpinner, ThemeProvider, ScrollIndicator, Modal, CalDotComScheduling, type CalDotComBookingSuccessfulFunction, ProgressIndicator, TypingCaret, WithTypingCaret, } from './atoms';
2
+ export { MultipleChoiceQuestion, Navbar, Question, SingleChoiceQuestion, AttachmentList, } from './molecules';
3
+ export { Checklist, ConversationalForm, TraditionalForm, WizardForm, Message, HostedPageLayout, CloseButton, CloudinaryUpload, CloudinarySingleFileUpload, } from './hostedPages';
4
+ export { useClickOutsideNotifier, useScrollHint, useConversationalForm, useTraditionalForm, } from './hooks';
5
+ export * from './types';
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { AttachmentListProps } from './types';
3
+ export declare const AttachmentList: ({ attachments, labels, icon, }: AttachmentListProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { AttachmentList } from './AttachmentList';
2
+ export type { AttachmentListProps } from './types';
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { MessageAttachment } from '../../types/generated/types-orchestration';
3
+ import { AttachmentLabels } from '../../types';
4
+ export interface AttachmentListProps {
5
+ attachments: Array<MessageAttachment>;
6
+ icon: React.ReactNode;
7
+ labels: AttachmentLabels;
8
+ }
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { AvaGPTProps } from './types';
3
+ export declare const AvaGPT: ({ open, state, onSubmit, prompt, answer, promptPlaceholder, onPromptChange, buttonLabel, }: AvaGPTProps) => JSX.Element;
@@ -0,0 +1 @@
1
+ export { AvaGPT } from './avaGPT';
@@ -0,0 +1,12 @@
1
+ declare type State = 'indeterminate' | 'preload' | 'streaming-answer' | 'done';
2
+ export declare type AvaGPTProps = {
3
+ open: boolean;
4
+ state: State;
5
+ promptPlaceholder?: string;
6
+ prompt?: string;
7
+ answer?: string;
8
+ onSubmit: (prompt: string) => void;
9
+ onPromptChange: (prompt: string) => void;
10
+ buttonLabel: string;
11
+ };
12
+ export {};
@@ -0,0 +1,5 @@
1
+ export { MultipleChoiceQuestion } from './multipleChoiceQuestion';
2
+ export { Navbar } from './navbar';
3
+ export { Question } from './question';
4
+ export { SingleChoiceQuestion } from './singleChoiceQuestion';
5
+ export { AttachmentList } from './attachmentList';
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { Option } from '../../types';
3
+ export interface MultipleChoiceQuestionProps {
4
+ questionId: string;
5
+ label: string;
6
+ options: Array<Option>;
7
+ onChange: (newValue: Array<Option>) => void;
8
+ values: Array<Option>;
9
+ mandatory?: boolean;
10
+ }
11
+ export declare const MultipleChoiceQuestion: ({ questionId, label, options, onChange, values, mandatory, }: MultipleChoiceQuestionProps) => JSX.Element;
@@ -0,0 +1 @@
1
+ export { MultipleChoiceQuestion } from './MultipleChoiceQuestion';
@@ -0,0 +1,7 @@
1
+ import { ReactElement } from 'react';
2
+ export interface NavbarProps {
3
+ companyName?: string;
4
+ logo?: JSX.Element | string;
5
+ children?: ReactElement;
6
+ }
7
+ export declare const Navbar: ({ companyName, logo }: NavbarProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ export type { NavbarProps } from './Navbar';
2
+ export { Navbar } from './Navbar';
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { QuestionDataProps, QuestionProps } from './types';
3
+ export declare const QuestionData: ({ question, control, getValues, labels, inputAutoFocus, submitAndMoveToNextQuestion, onAnswerChange, shouldAutoProgress, }: QuestionDataProps) => JSX.Element;
4
+ export declare const Question: ({ question, control, getValues, errors, labels, inputAutoFocus, submitAndMoveToNextQuestion, onAnswerChange, shouldAutoProgress, }: QuestionProps) => JSX.Element;
@@ -0,0 +1 @@
1
+ export { Question } from './Question';
@@ -0,0 +1,31 @@
1
+ import { FormError, Question } from '../../types';
2
+ import { Control, UseFormGetValues } from 'react-hook-form';
3
+ export interface QuestionLabels {
4
+ yes_label: string;
5
+ no_label: string;
6
+ select?: {
7
+ search_placeholder: string;
8
+ no_options: string;
9
+ };
10
+ }
11
+ export interface QuestionDataProps {
12
+ question: Question;
13
+ control: Control;
14
+ getValues: UseFormGetValues<any>;
15
+ labels: QuestionLabels;
16
+ inputAutoFocus?: boolean;
17
+ submitAndMoveToNextQuestion?: () => void;
18
+ onAnswerChange?: () => void;
19
+ shouldAutoProgress?: (question: Question) => boolean;
20
+ }
21
+ export interface QuestionProps {
22
+ question: Question;
23
+ control: Control;
24
+ getValues: UseFormGetValues<any>;
25
+ errors: Array<FormError>;
26
+ labels?: QuestionLabels;
27
+ inputAutoFocus?: boolean;
28
+ submitAndMoveToNextQuestion?: () => void;
29
+ onAnswerChange?: () => void;
30
+ shouldAutoProgress?: (question: Question) => boolean;
31
+ }
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import { Option } from '../../types';
3
+ export interface SingleChoiceQuestionProps {
4
+ questionId: string;
5
+ label: string;
6
+ options: Array<Option>;
7
+ value: Option | null;
8
+ onChange: (newValue: Option | null) => void;
9
+ mandatory?: boolean;
10
+ showFlickerOnSelected?: boolean;
11
+ }
12
+ export declare const SingleChoiceQuestion: ({ questionId, label, options, onChange, value, mandatory, showFlickerOnSelected, }: SingleChoiceQuestionProps) => JSX.Element;
@@ -0,0 +1 @@
1
+ export { SingleChoiceQuestion } from './SingleChoiceQuestion';
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';