freemium-survey-components 0.16.6 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/README.md +6 -2
  2. package/lib/index.cjs.js +1 -1
  3. package/lib/index.esm.js +1 -1
  4. package/lib/types/components/binary/index.d.ts +1 -1
  5. package/lib/types/components/prompt/index.d.ts +3 -1
  6. package/lib/types/components/text-input/index.d.ts +6 -6
  7. package/lib/types/index.d.ts +1 -0
  8. package/lib/types/survey/card/index.d.ts +2 -2
  9. package/lib/types/{components/nps/index.d.ts → survey/channels.stories.d.ts} +0 -0
  10. package/lib/types/survey/channelsPreview/channels.stories.d.ts +1 -0
  11. package/lib/types/survey/channelsPreview/index.d.ts +5 -0
  12. package/lib/types/survey/channelsPreview/instagram.d.ts +3 -0
  13. package/lib/types/survey/channelsPreview/question.d.ts +12 -0
  14. package/lib/types/survey/channelsPreview/utils.d.ts +1 -0
  15. package/lib/types/survey/channelsPreview/whatsapp.d.ts +3 -0
  16. package/lib/types/survey/meta-channel-preview/channels.stories.d.ts +1 -0
  17. package/lib/types/survey/meta-channel-preview/index.d.ts +5 -0
  18. package/lib/types/survey/meta-channel-preview/question.d.ts +12 -0
  19. package/lib/types/survey/meta-channel-preview/utils.d.ts +1 -0
  20. package/lib/types/survey/meta-channel-preview/whatsapp.d.ts +3 -0
  21. package/lib/types/survey/standard/index.d.ts +2 -2
  22. package/lib/types/survey/utils/logics.d.ts +42 -42
  23. package/lib/types/survey/utils/use-card-survey.d.ts +8 -8
  24. package/lib/types/survey/utils/use-standard-survey.d.ts +8 -8
  25. package/lib/types/survey/utils/use-survey.d.ts +5 -2
  26. package/lib/types/survey/whatsapp/index.d.ts +3 -0
  27. package/lib/types/survey/whatsapp/question.d.ts +8 -0
  28. package/lib/types/survey/whatsapp/utils.d.ts +1 -0
  29. package/lib/types/survey/widget/index.d.ts +4 -2
  30. package/lib/types/types.d.ts +22 -15
  31. package/package.json +1 -1
  32. package/lib/types/components/nps/nps.stories.d.ts +0 -0
  33. package/lib/types/newTypes.d.ts +0 -0
  34. package/lib/types/survey/utils/utils.d.ts +0 -0
package/README.md CHANGED
@@ -20,10 +20,11 @@ Make sure you have the below installed in your app.
20
20
  - Survey : SurveyProps
21
21
  - WebInAppSurvey : WebInAppSurveyProps
22
22
  - Range : RangeProps
23
+ - ChannelPreview : ChannelPreviewProps
23
24
 
24
25
  ### Types
25
26
  ```
26
- type SurveyProps {
27
+ type SurveyProps = {
27
28
  survey: SurveyType
28
29
  answers: SurveyResponseType | null
29
30
  surveyStyle?: 'standard' | 'card'
@@ -50,6 +51,9 @@ type SurveyProps {
50
51
  }
51
52
  ```
52
53
  ```
54
+ type ChannelPreviewProps = SurveyProps & { channel: 'whatsapp' | 'instagram' }
55
+ ```
56
+ ```
53
57
  type WidgetProps = {
54
58
  survey: SurveyType
55
59
  answers: SurveyResponseType | null
@@ -202,4 +206,4 @@ import {Range} from 'freemium-survey-components'
202
206
 
203
207
  ### Rules
204
208
 
205
- - survey object passed to Survey and WebInAppSurvey is cached on mount. In order to pass new survey object, it needs to be remounted with the new survey object.
209
+ - Props (survey,answers) passed to Survey component and WebInAppSurvey component are cached on mount. In order to pass new value, component needs to be remounted.