ninchat-embed 2.8.0 → 2.9.0-alpha
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/README.md +116 -6
- package/dist/embed3.js +1 -1
- package/dist/embed3.js.LICENSE.txt +2 -2
- package/dist/embed3.js.map +1 -1
- package/dist/src/antics/types/index.d.ts +2 -1
- package/dist/src/antics/types/index.d.ts.map +1 -1
- package/dist/src/api/NinchatClient.d.ts.map +1 -1
- package/dist/src/api/action/createComment.d.ts +1 -1
- package/dist/src/api/action/createIdentity.d.ts +1 -1
- package/dist/src/api/action/createIdentityWithAuthResetAccess.d.ts +1 -1
- package/dist/src/api/action/createTag.d.ts +1 -1
- package/dist/src/api/action/deleteIdentity.d.ts +1 -1
- package/dist/src/api/action/deleteMessage.d.ts +1 -1
- package/dist/src/api/action/deleteTag.d.ts +1 -1
- package/dist/src/api/action/describeIdentity.d.ts +1 -1
- package/dist/src/api/action/describeQueue.d.ts +1 -1
- package/dist/src/api/action/describeTag.d.ts +1 -1
- package/dist/src/api/action/describeTags.d.ts +1 -1
- package/dist/src/api/action/endAudience.d.ts +1 -1
- package/dist/src/api/action/getAudienceRangeComments.d.ts +1 -1
- package/dist/src/api/action/getQueueActivity.d.ts +1 -1
- package/dist/src/api/action/getQueueStats.d.ts +1 -1
- package/dist/src/api/action/index.d.ts.map +1 -1
- package/dist/src/api/action/joinPermissionGroup.d.ts +17 -0
- package/dist/src/api/action/joinPermissionGroup.d.ts.map +1 -0
- package/dist/src/api/action/joinPermissionGroupAck.d.ts +10 -0
- package/dist/src/api/action/joinPermissionGroupAck.d.ts.map +1 -0
- package/dist/src/api/action/registerAudience.d.ts +1 -1
- package/dist/src/api/action/requestAudience.d.ts +1 -1
- package/dist/src/api/action/requestIdentityVerifyAccess.d.ts +1 -1
- package/dist/src/api/action/updateChannel.d.ts +1 -1
- package/dist/src/api/action/updateDialogue.d.ts +1 -1
- package/dist/src/api/action/updateIdentity.d.ts +1 -1
- package/dist/src/api/action/updateIdentityAuth.d.ts +1 -1
- package/dist/src/api/action/updateMessage.d.ts +1 -1
- package/dist/src/api/action/updateQueue.d.ts +1 -1
- package/dist/src/api/action/updateRealm.d.ts +1 -1
- package/dist/src/api/action/updateTag.d.ts +1 -1
- package/dist/src/api/action/updateUser.d.ts +1 -1
- package/dist/src/api/action/updateUserMessages.d.ts +1 -1
- package/dist/src/api/action/verifyIdentity.d.ts +1 -1
- package/dist/src/api/event/index.d.ts +2 -0
- package/dist/src/api/event/index.d.ts.map +1 -1
- package/dist/src/api/event/queueUpdated.d.ts.map +1 -1
- package/dist/src/api/event/sessionUpdated.d.ts +4 -0
- package/dist/src/api/event/sessionUpdated.d.ts.map +1 -0
- package/dist/src/api/slice.d.ts +2 -0
- package/dist/src/api/slice.d.ts.map +1 -1
- package/dist/src/api/types/actions.d.ts +10 -4
- package/dist/src/api/types/actions.d.ts.map +1 -1
- package/dist/src/api/types/events.d.ts +13 -1
- package/dist/src/api/types/events.d.ts.map +1 -1
- package/dist/src/api/types/properties.d.ts +9 -1
- package/dist/src/api/types/properties.d.ts.map +1 -1
- package/dist/src/api/types/settings.d.ts +1 -0
- package/dist/src/api/types/settings.d.ts.map +1 -1
- package/dist/src/appconfig/index.d.ts +1 -1
- package/dist/src/appconfig/index.d.ts.map +1 -1
- package/dist/src/components/Embed/EmbedQuestionnaire.d.ts +1 -0
- package/dist/src/components/Embed/EmbedQuestionnaire.d.ts.map +1 -1
- package/dist/src/components/Embed/Questionnaire/QuestionnaireAttachment/QuestionnaireAttachment.d.ts.map +1 -1
- package/dist/src/components/Embed/Questionnaire/QuestionnaireCheckbox/QuestionnaireCheckbox.d.ts +1 -1
- package/dist/src/components/Embed/Questionnaire/QuestionnaireCheckbox/QuestionnaireCheckbox.d.ts.map +1 -1
- package/dist/src/components/Embed/Questionnaire/QuestionnaireNavigation/QuestionnaireNavigation.d.ts +3 -1
- package/dist/src/components/Embed/Questionnaire/QuestionnaireNavigation/QuestionnaireNavigation.d.ts.map +1 -1
- package/dist/src/components/Embed/Questionnaire/QuestionnaireNavigation/styles/index.d.ts +14 -0
- package/dist/src/components/Embed/Questionnaire/QuestionnaireNavigation/styles/index.d.ts.map +1 -1
- package/dist/src/components/Embed/Questionnaire/QuestionnaireQueueButton/QuestionnaireQueueButton.d.ts +12 -0
- package/dist/src/components/Embed/Questionnaire/QuestionnaireQueueButton/QuestionnaireQueueButton.d.ts.map +1 -1
- package/dist/src/components/Embed/Questionnaire/QuestionnaireQueueButton/styles/index.d.ts +4 -0
- package/dist/src/components/Embed/Questionnaire/QuestionnaireQueueButton/styles/index.d.ts.map +1 -1
- package/dist/src/components/Embed/Questionnaire/QuestionnaireRadio/QuestionnaireRadio.d.ts +2 -0
- package/dist/src/components/Embed/Questionnaire/QuestionnaireRadio/QuestionnaireRadio.d.ts.map +1 -1
- package/dist/src/components/Embed/Questionnaire/QuestionnaireRadio/styles/index.d.ts +67 -2
- package/dist/src/components/Embed/Questionnaire/QuestionnaireRadio/styles/index.d.ts.map +1 -1
- package/dist/src/components/Embed/Questionnaire/helpers/index.d.ts +1 -1
- package/dist/src/components/Embed/Questionnaire/helpers/index.d.ts.map +1 -1
- package/dist/src/components/Embed/Questionnaire/helpers/logic.d.ts +6 -1
- package/dist/src/components/Embed/Questionnaire/helpers/logic.d.ts.map +1 -1
- package/dist/src/components/Embed/Questionnaire/helpers/metadata.d.ts +6 -0
- package/dist/src/components/Embed/Questionnaire/helpers/metadata.d.ts.map +1 -0
- package/dist/src/components/Embed/components/EmbedHero/EmbedHero.d.ts.map +1 -1
- package/dist/src/components/Embed/components/EmbedHero/styles/index.d.ts +28 -0
- package/dist/src/components/Embed/components/EmbedHero/styles/index.d.ts.map +1 -1
- package/dist/src/components/Embed/helpers/markdown.d.ts +12 -1
- package/dist/src/components/Embed/helpers/markdown.d.ts.map +1 -1
- package/dist/src/components/Embed/styles/questionnaire.d.ts +8 -5
- package/dist/src/components/Embed/styles/questionnaire.d.ts.map +1 -1
- package/dist/src/components/EmbedContext.d.ts +176 -1
- package/dist/src/components/EmbedContext.d.ts.map +1 -1
- package/dist/src/components/Jitsi/utils/connectivity.d.ts +3 -0
- package/dist/src/components/Jitsi/utils/connectivity.d.ts.map +1 -1
- package/dist/src/components/Send/types/index.d.ts +4 -0
- package/dist/src/components/Send/types/index.d.ts.map +1 -1
- package/dist/src/components/Table/styles/CellComponents.d.ts +1 -0
- package/dist/src/components/Table/styles/CellComponents.d.ts.map +1 -1
- package/dist/src/embed/components/embedWrapper.d.ts.map +1 -1
- package/dist/src/embed/listeners/queue.d.ts +2 -0
- package/dist/src/embed/listeners/queue.d.ts.map +1 -1
- package/dist/src/embed/listeners/session.d.ts +4 -1
- package/dist/src/embed/listeners/session.d.ts.map +1 -1
- package/dist/src/embed/schemas/index.d.ts +1233 -0
- package/dist/src/embed/schemas/index.d.ts.map +1 -1
- package/dist/src/embed/styles/index.d.ts.map +1 -1
- package/dist/src/embed/types/events.d.ts +15 -2
- package/dist/src/embed/types/events.d.ts.map +1 -1
- package/dist/src/embed/types/index.d.ts +1 -0
- package/dist/src/embed/types/index.d.ts.map +1 -1
- package/dist/src/embed/types/state.d.ts +2 -0
- package/dist/src/embed/types/state.d.ts.map +1 -1
- package/dist/src/embed/utils/config/index.d.ts +166 -0
- package/dist/src/embed/utils/config/index.d.ts.map +1 -1
- package/dist/src/embed/utils/metadata.d.ts +4 -1
- package/dist/src/embed/utils/metadata.d.ts.map +1 -1
- package/dist/src/stitches/config.d.ts +17 -0
- package/dist/src/stitches/config.d.ts.map +1 -1
- package/dist/src/stitches/config.defaults.d.ts +2 -0
- package/dist/src/stitches/config.defaults.d.ts.map +1 -1
- package/dist/src/stitches/config.embed.d.ts.map +1 -1
- package/dist/src/stitches/overrideEmbedTheme.d.ts.map +1 -1
- package/dist/src/stitches/themes.d.ts +1 -0
- package/dist/src/stitches/themes.d.ts.map +1 -1
- package/dist/src/store/storage/engine.d.ts +1 -0
- package/dist/src/store/storage/engine.d.ts.map +1 -1
- package/dist/src/store/storage/storageBackup.d.ts +11 -0
- package/dist/src/store/storage/storageBackup.d.ts.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -61,11 +61,12 @@ install using `npm i ninchat-embed` or link main directly from ninchat.com:
|
|
|
61
61
|
| `environment` | `string[]` | List of environment keys. 'default' is always used, and can be omited. |
|
|
62
62
|
| `targetOrigin` | `string` | Target origin for iframe communication |
|
|
63
63
|
| `version` | `string` | Version to be send with each API request |
|
|
64
|
+
| `restoredStorage` | `Record<string, string>` | React Native WebView storage snapshot to restore before initializing the session |
|
|
64
65
|
| `config` | `object` | Config used to override subset of the keys obtained via configKey and others. See Config Properties in table below |
|
|
65
66
|
| `configUrls` | `string[]` | List of URL addresses for self-hosted configs. |
|
|
66
67
|
| `containerId` | `string` | DOM element id for where the chat container is placed.|
|
|
67
68
|
| `postConfigUrls` | `string[]` | List of URL addresses for self-hosted configs loaded via POST request. |
|
|
68
|
-
| `variant` | `'live' \| 'stage'` | Application variant override |
|
|
69
|
+
| `variant` | `'live' \| 'stage' \| 'unstable'` | Application variant override |
|
|
69
70
|
|
|
70
71
|
### Config Common properties
|
|
71
72
|
|
|
@@ -98,6 +99,7 @@ install using `npm i ninchat-embed` or link main directly from ninchat.com:
|
|
|
98
99
|
|
|
99
100
|
| Key | Type | Description |
|
|
100
101
|
|-----|------|-------------|
|
|
102
|
+
| `useSkeletonLoader`| `boolean` | Replace default spinner loader with skeleton loader |
|
|
101
103
|
| `reverseEmbedHeroContentOrdering` | `boolean`| Reverse order of elements in hero, rotating spinner will be the last |
|
|
102
104
|
| `scheduleAccessKey` | `string` | Access key for scheduled appointments |
|
|
103
105
|
| `channelId` | `string` | Channel id for variant "channel" |
|
|
@@ -630,12 +632,32 @@ install using `npm i ninchat-embed` or link main directly from ninchat.com:
|
|
|
630
632
|
| `colors.floatingEmbedHeaderButton` | `string` | Floating embed header button color |
|
|
631
633
|
| `colors.floatingEmbedHeaderButtonIcon` | `string` | Floating embed header button icon color |
|
|
632
634
|
| `colors.floatingEmbedHeaderButtonHover` | `string` | Floating embed header button hover color |
|
|
633
|
-
| `colors.
|
|
635
|
+
| `colors.floatingEmbedHeaderButtonIconHover` | `string` | Floating embed header button icon hover color |
|
|
634
636
|
| `colors.floatingEmbedHeaderButtonBackground` | `string` | Floating embed header button background color |
|
|
635
637
|
| `colors.floatingEmbedHeaderButtonBorder` | `string` | Floating embed header button border color |
|
|
636
638
|
| `colors.floatingEmbedHeaderButtonHoverBackground` | `string` | Floating embed header button background (hover) |
|
|
637
639
|
| `colors.floatingEmbedHeaderButtonFocusBackground` | `string` | Floating embed header button background (focus) |
|
|
638
640
|
| `colors.floatingEmbedHeaderButtonActiveOutline` | `string` | Floating embed header button outline (active) |
|
|
641
|
+
| `colors.floatingEmbedHeaderTitleButtonTitle` | `string` | Floating embed header title button color |
|
|
642
|
+
| `colors.floatingEmbedHeaderTitleButtonSubtitle` | `string` | Floating embed header subtitle button color |
|
|
643
|
+
| `colors.floatingEmbedHeaderTitleButtonTitleHover` | `string` | Floating embed header title button hover color |
|
|
644
|
+
| `colors.floatingEmbedHeaderTitleButtonSubtitleHover` | `string` | Floating embed header subtitle button hover color |
|
|
645
|
+
| `colors.floatingEmbedHeaderTitleButtonIcon` | `string` | Floating embed header title button icon color |
|
|
646
|
+
| `colors.floatingEmbedHeaderTitleButtonIconHover` | `string` | Floating embed header title button icon hover color |
|
|
647
|
+
| `colors.floatingEmbedHeaderTitleButtonBackground` | `string` | Floating embed header title button background color |
|
|
648
|
+
| `colors.floatingEmbedHeaderTitleButtonBorder` | `string` | Floating embed header title button border color |
|
|
649
|
+
| `colors.floatingEmbedHeaderTitleButtonHoverBackground` | `string` | Floating embed header title button background (hover) |
|
|
650
|
+
| `colors.floatingEmbedHeaderTitleButtonFocusBackground` | `string` | Floating embed header title button background (focus) |
|
|
651
|
+
| `colors.floatingEmbedHeaderTitleButtonActiveOutline` | `string` | Floating embed header title button outline (active) |
|
|
652
|
+
| `colors.floatingEmbedHeaderCloseButton` | `string` | Floating embed header close button color |
|
|
653
|
+
| `colors.floatingEmbedHeaderCloseButtonIcon` | `string` | Floating embed header close button icon color |
|
|
654
|
+
| `colors.floatingEmbedHeaderCloseButtonHover` | `string` | Floating embed header close button hover color |
|
|
655
|
+
| `colors.floatingEmbedHeaderCloseButtonIconHover` | `string` | Floating embed header close button icon hover color |
|
|
656
|
+
| `colors.floatingEmbedHeaderCloseButtonBackground` | `string` | Floating embed header close button background color |
|
|
657
|
+
| `colors.floatingEmbedHeaderCloseButtonBorder` | `string` | Floating embed header close button border color |
|
|
658
|
+
| `colors.floatingEmbedHeaderCloseButtonHoverBackground` | `string` | Floating embed header close button background (hover) |
|
|
659
|
+
| `colors.floatingEmbedHeaderCloseButtonFocusBackground` | `string` | Floating embed header close button background (focus) |
|
|
660
|
+
| `colors.floatingEmbedHeaderCloseButtonActiveOutline` | `string` | Floating embed header close button outline (active) |
|
|
639
661
|
| `colors.floatingEmbedHeaderAvatar` | `string` | Floating embed header avatar text color |
|
|
640
662
|
| `colors.floatingEmbedHeaderAvatarBackground` | `string` | Floating embed header avatar background color |
|
|
641
663
|
| `colors.floatingEmbedHeaderAvatarBorder` | `string` | Floating embed header avatar border color |
|
|
@@ -660,6 +682,27 @@ install using `npm i ninchat-embed` or link main directly from ninchat.com:
|
|
|
660
682
|
| `colors.containerEmbedHeaderButtonHoverBackground` | `string` | Container embed header button background (hover) |
|
|
661
683
|
| `colors.containerEmbedHeaderButtonFocusBackground` | `string` | Container embed header button background (focus) |
|
|
662
684
|
| `colors.containerEmbedHeaderButtonActiveOutline` | `string` | Container embed header button outline (active) |
|
|
685
|
+
| `colors.containerEmbedHeaderTitleButtonTitle` | `string` | Container embed header button title color |
|
|
686
|
+
| `colors.containerEmbedHeaderTitleButtonSubtitle` | `string` | Container embed header button subtitle color |
|
|
687
|
+
| `colors.containerEmbedHeaderTitleButtonTitleHover` | `string` | Container embed header title button hover color |
|
|
688
|
+
| `colors.containerEmbedHeaderTitleButtonSubtitleHover` | `string` | Container embed header subtitle button hover color |
|
|
689
|
+
| `colors.containerEmbedHeaderTitleButtonBackground` | `string` | Container embed header title button background color |
|
|
690
|
+
| `colors.containerEmbedHeaderTitleButtonBorder` | `string` | Container embed header title button border color |
|
|
691
|
+
| `colors.containerEmbedHeaderTitleButtonHoverBackground` | `string` | Container embed header title button background (hover) |
|
|
692
|
+
| `colors.containerEmbedHeaderTitleButtonFocusBackground` | `string` | Container embed header title button background (focus) |
|
|
693
|
+
| `colors.containerEmbedHeaderTitleButtonActiveOutline` | `string` | Container embed header title button outline (active) |
|
|
694
|
+
| `colors.containerEmbedHeaderCloseButton` | `string` | Container embed header close button color |
|
|
695
|
+
| `colors.containerEmbedHeaderCloseButtonIcon` | `string` | Container embed header close button icon color |
|
|
696
|
+
| `colors.containerEmbedHeaderCloseButtonHover` | `string` | Container embed header close button hover color |
|
|
697
|
+
| `colors.containerEmbedHeaderCloseButtonIconHover` | `string` | Container embed header close button icon hover color |
|
|
698
|
+
| `colors.containerEmbedHeaderCloseButtonBackground` | `string` | Container embed header close button background color |
|
|
699
|
+
| `colors.containerEmbedHeaderCloseButtonBorder` | `string` | Container embed header close button border color |
|
|
700
|
+
| `colors.containerEmbedHeaderCloseButtonHoverBackground` | `string` | Container embed header close button background (hover) |
|
|
701
|
+
| `colors.containerEmbedHeaderCloseButtonFocusBackground` | `string` | Container embed header close button background (focus) |
|
|
702
|
+
| `colors.containerEmbedHeaderCloseButtonActiveOutline` | `string` | Container embed header close button outline (active) |
|
|
703
|
+
| `colors.containerEmbedHeaderAvatar` | `string` | Container embed header avatar text color |
|
|
704
|
+
| `colors.containerEmbedHeaderAvatarBackground` | `string` | Container embed header avatar background color |
|
|
705
|
+
| `colors.containerEmbedHeaderAvatarBorder` | `string` | Container embed header avatar border color |
|
|
663
706
|
| `colors.embedBody` | `string` | Embed body text color |
|
|
664
707
|
| `colors.embedBodyHeading1` | `string` | Embed body heading 1 color |
|
|
665
708
|
| `colors.embedBodyHeading2` | `string` | Embed body heading 2 color |
|
|
@@ -686,6 +729,8 @@ install using `npm i ninchat-embed` or link main directly from ninchat.com:
|
|
|
686
729
|
| `colors.embedQueuePosition` | `string` | Embed queue position text color |
|
|
687
730
|
| `colors.embedQueueSpinner` | `string` | Embed queue spinner color |
|
|
688
731
|
| `colors.embedModalHeader` | `string` | Embed modal header color |
|
|
732
|
+
| `colors.embedModalIcon` | `string` | Embed modal icon color |
|
|
733
|
+
| `colors.questionnaireBackground` | `string` | Embed questionnaire background |
|
|
689
734
|
| `colors.questionnaireErrorTitle` | `string` | Embed error title color |
|
|
690
735
|
| `colors.questionnaireNavigation` | `string` | Questionnaire navigation color |
|
|
691
736
|
| `colors.questionnaireNavigationBorder` | `string` | Questionnaire navigation bordercolor |
|
|
@@ -738,9 +783,21 @@ install using `npm i ninchat-embed` or link main directly from ninchat.com:
|
|
|
738
783
|
| `colors.messageSpeechBubbleOtherLinkHover` | `string` | Other user speech bubble link color (hover) |
|
|
739
784
|
| `colors.messageSpeechBubbleOperatorModeratorTimestamp` | `string` | Operator/moderator timestamp color |
|
|
740
785
|
| `colors.messageSpeechBubbleOtherTimestamp` | `string` | Other user timestamp color |
|
|
786
|
+
| `colors.skeletonLoader` | `string` | Cusrtom skeleton loader text color |
|
|
787
|
+
| `colors.skeletonLoaderBackground` | `string` | Custom skeleton loader background color |
|
|
788
|
+
| `colors.skeletonLoaderProgress` | `string` | Custom skeleton loader progress bar color |
|
|
789
|
+
| `backgroundSizes.questionnaire` | `string` | Questionnaire background image size |
|
|
790
|
+
| `backgroundSizes.embedHero` | `string` | Embed Hero background image size |
|
|
791
|
+
| `backgroundSizes.chatBacklog` | `string` | Chat backlog background image size |
|
|
741
792
|
| `borderStyles.embedHero` | `string` | Embed hero border style |
|
|
742
793
|
| `borderStyles.floatingEmbedHeaderBorder` | `string` | Floating embed header border style |
|
|
743
794
|
| `borderStyles.containerEmbedHeaderBorder` | `string` | Container embed header border style |
|
|
795
|
+
| `borderStyles.floatingEmbedHeaderButton` | `string` | Floating embed header button border style |
|
|
796
|
+
| `borderStyles.containerEmbedHeaderButton` | `string` | Container embed header button border style |
|
|
797
|
+
| `borderStyles.floatingEmbedHeaderTitleButton` | `string` | Floating embed header title button border style |
|
|
798
|
+
| `borderStyles.containerEmbedHeaderTitleButton` | `string` | Container embed header title button border style |
|
|
799
|
+
| `borderStyles.floatingEmbedHeaderCloseButton` | `string` | Floating embed header close button border style |
|
|
800
|
+
| `borderStyles.containerEmbedHeaderCloseButton` | `string` | Container embed header close button border style |
|
|
744
801
|
| `borderStyles.buttonFilled` | `string` | Filled button border style |
|
|
745
802
|
| `borderStyles.button` | `string` | Button border style |
|
|
746
803
|
| `borderStyles.buttonText` | `string` | Text button border style |
|
|
@@ -763,6 +820,12 @@ install using `npm i ninchat-embed` or link main directly from ninchat.com:
|
|
|
763
820
|
| `borderWidths.embedHero` | `string` | Embed hero border width |
|
|
764
821
|
| `borderWidths.floatingEmbedHeaderBorder` | `string` | Floating embed header border width |
|
|
765
822
|
| `borderWidths.containerEmbedHeaderBorder` | `string` | Container embed header border width |
|
|
823
|
+
| `borderWidths.floatingEmbedHeaderButton` | `string` | Floating embed header button border width |
|
|
824
|
+
| `borderWidths.containerEmbedHeaderButton` | `string` | Container embed header button border width |
|
|
825
|
+
| `borderWidths.floatingEmbedHeaderTitleButton` | `string` | Floating embed header title button border width |
|
|
826
|
+
| `borderWidths.containerEmbedHeaderTitleButton` | `string` | Container embed header title button border width |
|
|
827
|
+
| `borderWidths.floatingEmbedHeaderCloseButton` | `string` | Floating embed header button border width |
|
|
828
|
+
| `borderWidths.containerEmbedHeaderCloseButton` | `string` | Container embed header button border width |
|
|
766
829
|
| `borderWidths.buttonFilled` | `string` | Filled button border width |
|
|
767
830
|
| `borderWidths.button` | `string` | Button border width |
|
|
768
831
|
| `borderWidths.buttonText` | `string` | Text button border width |
|
|
@@ -869,7 +932,8 @@ install using `npm i ninchat-embed` or link main directly from ninchat.com:
|
|
|
869
932
|
| `fontSizes.questionnaireLightBotBubble` | `string` | Questionnaire light bot bubble font size |
|
|
870
933
|
| `fontSizes.questionnaireLightBotAnswerBubble` | `string` | Questionnaire light bot answer bubble font size|
|
|
871
934
|
| `fontSizes.floatingEmbedHeaderInQueueLoader` | `string` | Floating Embed Header in queue loader position font size |
|
|
872
|
-
| `
|
|
935
|
+
| `fontSizes.floatingEmbedHeaderAvatar` | `string` | Floating Embed header Avatar font size |
|
|
936
|
+
| `fontSizes.skeletonLoader` | `string` | Custom skeleton loader font size |
|
|
873
937
|
| `fontStyle.embedBody` | `string` | Embed body font style |
|
|
874
938
|
| `fontStyle.embedBodyHeading1` | `string` | Embed body heading 1 font style |
|
|
875
939
|
| `fontStyle.embedBodyHeading2` | `string` | Embed body heading 2 font style |
|
|
@@ -979,6 +1043,7 @@ install using `npm i ninchat-embed` or link main directly from ninchat.com:
|
|
|
979
1043
|
| `fontWeights.messageSpeechBubbleOther` | `string` | Other user speech bubble font weight |
|
|
980
1044
|
| `fontWeights.questionnaireLightBotBubble` | `string` | Questionnaire light bot bubble font weight |
|
|
981
1045
|
| `fontWeights.questionnaireLightBotAnswerBubble` | `string` | Questionnaire light bot answer bubble font weight |
|
|
1046
|
+
| `fontWeights.skeletonLoader` | `string` | Custom skeleton loader font weight |
|
|
982
1047
|
| `maxWidths.questionnaire` | `string` | Questionnaire maximum width |
|
|
983
1048
|
| `maxWidths.questionnaireNavigation` | `string` | Questionnaire navigation maximum width |
|
|
984
1049
|
| `sizes.embedQueueSpinner` | `string` | In Queue Spinner size |
|
|
@@ -1009,6 +1074,10 @@ install using `npm i ninchat-embed` or link main directly from ninchat.com:
|
|
|
1009
1074
|
| `space.inputModal` | `string` | Embed input modal padding |
|
|
1010
1075
|
| `space.floatingEmbedHeaderButton` | `string` | Floating Embed header button padding |
|
|
1011
1076
|
| `space.containerEmbedHeaderButton` | `string` | Container Embed header button padding |
|
|
1077
|
+
| `space.floatingEmbedHeaderTitleButton` | `string` | Floating Embed header title button padding |
|
|
1078
|
+
| `space.containerEmbedHeaderTitleButton` | `string` | Container Embed header title button padding |
|
|
1079
|
+
| `space.floatingEmbedHeaderCloseButton` | `string` | Floating Embed header close button padding |
|
|
1080
|
+
| `space.containerEmbedHeaderCloseButton` | `string` | Container Embed header close button padding |
|
|
1012
1081
|
| `space.floatingEmbedHeader` | `string` | Floating Embed header padding (fixed width and height still will be in use) |
|
|
1013
1082
|
| `space.containerEmbedHeader` | `string` | Container Embed headerpadding (fixed width and height still will be in use) |
|
|
1014
1083
|
| `space.floatingEmbedBall` | `string` | Floating embed ball padding |
|
|
@@ -1022,6 +1091,10 @@ install using `npm i ninchat-embed` or link main directly from ninchat.com:
|
|
|
1022
1091
|
| `radii.floatingEmbedPromoBubble` | `string` | Floating embed promo bubble border radius |
|
|
1023
1092
|
| `radii.floatingEmbedHeaderButton` | `string` | Floating embed header button border radius |
|
|
1024
1093
|
| `radii.containerEmbedHeaderButton` | `string` | Container embed header button border radius |
|
|
1094
|
+
| `radii.floatingEmbedHeaderTitleButton` | `string` | Floating embed header title button border radius |
|
|
1095
|
+
| `radii.containerEmbedHeaderTitleButton` | `string` | Container embed header title button border radius |
|
|
1096
|
+
| `radii.floatingEmbedHeaderCloseButton` | `string` | Floating embed header close button border radius |
|
|
1097
|
+
| `radii.containerEmbedHeaderCloseButton` | `string` | Container embed header close button border radius |
|
|
1025
1098
|
| `radii.embedHero` | `string` | Embed hero border radius |
|
|
1026
1099
|
| `radii.buttonFilled` | `string` | Filled button border radius |
|
|
1027
1100
|
| `radii.button` | `string` | Button border radius |
|
|
@@ -1090,6 +1163,7 @@ install using `npm i ninchat-embed` or link main directly from ninchat.com:
|
|
|
1090
1163
|
| `navigation` | `object` | Navigation configuration for the view |
|
|
1091
1164
|
| `navigation.fixed` | `boolean` | Whether navigation use fixed position istead of static |
|
|
1092
1165
|
| `navigation.position` | `'top' \| 'bottom'` | Position of navigation bar |
|
|
1166
|
+
| `navigation.enableMobileStacking` | `boolean` | Make primary buttons on top and full width when there is no enought space |
|
|
1093
1167
|
| `navigation.elements` | `array` | Array of questionnaire elements for navigation |
|
|
1094
1168
|
| **Item: Logic - Queues Closed** | | |
|
|
1095
1169
|
| `type` | `'logic-queues-closed'` | Logic item to check if all queues from list are closed |
|
|
@@ -1101,6 +1175,7 @@ install using `npm i ninchat-embed` or link main directly from ninchat.com:
|
|
|
1101
1175
|
| `type` | `'logic'` | Logic item for conditional flow control |
|
|
1102
1176
|
| `id` | `string` | Unique identifier |
|
|
1103
1177
|
| `conditions` | `array` | Array of condition objects |
|
|
1178
|
+
| `conditions[].$value` | `string` | Field or queue context key whose value is used by following `$gt`, `$gte`, `$lt`, or `$lte` operators |
|
|
1104
1179
|
| `conditions[].$and` | `array` | AND operator - all conditions must be true |
|
|
1105
1180
|
| `conditions[].$or` | `array` | OR operator - at least one condition must be true |
|
|
1106
1181
|
| `conditions[].$nor` | `array` | NOR operator - none of conditions can be true |
|
|
@@ -1154,7 +1229,7 @@ install using `npm i ninchat-embed` or link main directly from ninchat.com:
|
|
|
1154
1229
|
| **Element: Button** | | |
|
|
1155
1230
|
| `element` | `'button'` | Button element type |
|
|
1156
1231
|
| `text` | `string` | Button text |
|
|
1157
|
-
| `variant` | `'primary'` | Button variant style |
|
|
1232
|
+
| `variant` | `'primary' | 'secondary' | 'tertiary'` | Button variant style |
|
|
1158
1233
|
| `target` | `string` | Target view ID |
|
|
1159
1234
|
| `align` | `'center' \| 'right' \| 'left'` | Button alignment |
|
|
1160
1235
|
| `clearAfter` | `boolean` | Clear float after current element |
|
|
@@ -1190,6 +1265,13 @@ install using `npm i ninchat-embed` or link main directly from ninchat.com:
|
|
|
1190
1265
|
| `padding` | `string` | Padding around button |
|
|
1191
1266
|
| `margin` | `string` | Margin around element |
|
|
1192
1267
|
| `hide` | `boolean` | Whether element is hidden by default |
|
|
1268
|
+
| `variant` | `'primary' | 'secondary' | 'tertiary'` | Queue button variant style |
|
|
1269
|
+
| `iconLeft` | `object` | Left icon configuration |
|
|
1270
|
+
| `iconLeft.src` | `string` | Icon image URL |
|
|
1271
|
+
| `iconLeft.svg` | `string` | Inline SVG for icon |
|
|
1272
|
+
| `iconRight` | `object` | Right icon configuration |
|
|
1273
|
+
| `iconRight.src` | `string` | Icon image URL |
|
|
1274
|
+
| `iconRight.svg` | `string` | Inline SVG for icon |
|
|
1193
1275
|
| `logic` | `object` | Conditional logic for element |
|
|
1194
1276
|
| `logic.conditions` | `array` | Array of condition objects (same as Logic Item conditions) |
|
|
1195
1277
|
| `logic.result.hide` | `boolean` | Whether to hide element when condition is met |
|
|
@@ -1292,6 +1374,7 @@ install using `npm i ninchat-embed` or link main directly from ninchat.com:
|
|
|
1292
1374
|
| `value` | `string` | Value when radio is selected |
|
|
1293
1375
|
| `groupName` | `string` | Group name for organizing fields |
|
|
1294
1376
|
| `readableName` | `string` | Human-readable name for metadata |
|
|
1377
|
+
| `clearAfter` | `boolean` | Clear float after current element |
|
|
1295
1378
|
| `text` | `string` | Radio button label text |
|
|
1296
1379
|
| `inline` | `boolean` | Whether radio is displayed inline |
|
|
1297
1380
|
| `target` | `string` | Target view ID when selected |
|
|
@@ -1448,8 +1531,8 @@ Ninchat.route(Route)
|
|
|
1448
1531
|
| ActivityCount | activity_count | `activity`: number, `highlights`: number | Typical use case for `ActivityCount` is to display activity as a number in host sites favicon. `activity` property contains the total activity including `highlights`. `highlights` are activity which has importance based on users settings or their role. Eg. highlight can be a name mention or a visitor requesting an audience. |
|
|
1449
1532
|
| AudienceEnded | audience_eneded | `audience_id`: string | Emitted when an audience session ends |
|
|
1450
1533
|
| AudienceClosed | audience_closed | `audience_id`: string | Emitted when the chat is closed |
|
|
1451
|
-
| SessionCreated | session_created | `user_queues?`: {[queue_id]: {`delivery_time`, `queue_time`, `unassigned_registered_time`, `realm_id`, `queue_attrs`: {`name`, `length`, `group_id`, `is_group`, `unassigned_registered`}}}, `user_channels?`: {[channel_id]: {`channel_attrs`, `channel_status?`, `realm_id?`}} | Emitted when a user session is created with queue and channel information |
|
|
1452
|
-
| QueueUpdated | queue_updated | `queue_id`: string, `queue_attrs`: {`name`, `length`, `group_id`, `is_group`, `unassigned_registered`}, `queue_time?`: number, `unassigned_registered_time?`: number, `realm_id?`: string | Emitted when queue information is updated |
|
|
1534
|
+
| SessionCreated | session_created | `user_queues?`: {[queue_id]: {`delivery_time`, `queue_time`, `unassigned_registered_time`, `realm_id`, `queue_attrs`: {`name`, `length`, `group_id`, `is_group`, `unassigned_registered`}, `queue_requests?`: QueueRequest[]}}, `user_channels?`: {[channel_id]: {`channel_attrs`, `channel_status?`, `realm_id?`}} | Emitted when a user session is created with queue and channel information |
|
|
1535
|
+
| QueueUpdated | queue_updated | `queue_id`: string, `queue_attrs`: {`name`, `length`, `group_id`, `is_group`, `unassigned_registered`}, `queue_time?`: number, `unassigned_registered_time?`: number, `realm_id?`: string, `queue_request?`: QueueRequest | Emitted when queue information is updated |
|
|
1453
1536
|
| ChannelUpdated | channel_updated | `channel_id`: string, `channel_attrs`: {`audience_id`, `queue_id`, `name`, `closed`}, `channel_status?`: string, `realm_id?`: string | Emitted when channel information is updated |
|
|
1454
1537
|
| MembersUpdated | members_updated | `channel_id`: string, `members`: [{`id`: string, `presence`: `'online'`\|`'idle'`\|`'offline'`, `name?`: string}] | Emitted when a channel member's presence (online/idle/offline) changes. Only fires for audience channels. Members list excludes the current user. |
|
|
1455
1538
|
| ContainerInitialized | container_initialized | - | Emitted when the embed container is initialized |
|
|
@@ -1526,6 +1609,26 @@ the `route.name` property is one of the following:
|
|
|
1526
1609
|
|
|
1527
1610
|
## Examples
|
|
1528
1611
|
|
|
1612
|
+
### React Native session restoration
|
|
1613
|
+
|
|
1614
|
+
The React Native wrapper can restore an Embed session after its WebView reloads. It persists storage snapshots received through the internal `embed_storage_dump` event and passes the latest snapshot back to `Ninchat.init()` as `restoredStorage`.
|
|
1615
|
+
|
|
1616
|
+
`embed_storage_dump` is emitted through the WebView-only `all_events` callback when storage changes. The snapshot should be removed when the conversation is intentionally closed so that the next launch starts a new session.
|
|
1617
|
+
|
|
1618
|
+
### Queue request metadata
|
|
1619
|
+
|
|
1620
|
+
When the backend queue setting `share_audience_info` is enabled, waiting requests are included in the initial `session_created` event and new requests are included in `queue_updated` events. When the setting is disabled, the backend omits `queue_requests` and `queue_request`. Each queue request has the following shape:
|
|
1621
|
+
|
|
1622
|
+
```typescript
|
|
1623
|
+
{
|
|
1624
|
+
audience_id: string
|
|
1625
|
+
request_time: number
|
|
1626
|
+
metadata?: Record<string, unknown>[]
|
|
1627
|
+
}
|
|
1628
|
+
```
|
|
1629
|
+
|
|
1630
|
+
`audience_id` and `request_time` are included in every queue request received from the backend. `metadata` contains only shared secure data allowed for the embed parent origin. It is omitted when shared data is absent or the parent origin is not allowed. Other audience metadata is never forwarded.
|
|
1631
|
+
|
|
1529
1632
|
### Metadata
|
|
1530
1633
|
|
|
1531
1634
|
`metadata` array contains secure metadata which is exposed to the parent on purpose. Array is used here, since in conversation can be multiple users with metadata.
|
|
@@ -1645,6 +1748,13 @@ Ninchat.route(route)
|
|
|
1645
1748
|
|
|
1646
1749
|
## Release history
|
|
1647
1750
|
|
|
1751
|
+
### v2.9.0-alpha
|
|
1752
|
+
|
|
1753
|
+
- Expanded [Embed UI theming](#theme-overrides) and [questionnaire customization](#questionnaires), including responsive layouts, header controls, backgrounds, skeleton loading, and queue button variants.
|
|
1754
|
+
- Improved [questionnaire metadata handling](#metadata) and added [secure queue request metadata](#queue-request-metadata) to session and queue events.
|
|
1755
|
+
- Added [session restoration support for React Native embeds](#react-native-session-restoration).
|
|
1756
|
+
- Added the [unstable frontend variant](#top-level-options) for versioned pre-release deployments.
|
|
1757
|
+
|
|
1648
1758
|
### v2.8.0
|
|
1649
1759
|
|
|
1650
1760
|
- expose MembersUpdated event to indicate if other channel members go offline / idle
|