@davi-ai/retorik-framework 2.0.4 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +307 -309
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21854 -16598
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +20860 -15660
- package/dist/index.modern.js.map +1 -1
- package/package.json +14 -8
package/dist/index.d.ts
CHANGED
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
import { presets as _presets1, presets } from "@davi-ai/react-bodyengine-three";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated AvailableViews is deprecated without replacement since version 2.2.0 and the new menu system
|
|
4
|
+
*/
|
|
5
5
|
export enum AvailableViews {
|
|
6
6
|
home = 1,
|
|
7
7
|
news = 2,
|
|
8
8
|
weather = 3,
|
|
9
9
|
emergency = 4
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated AvailableSubViews is deprecated without replacement since version 2.2.0 and the new menu system
|
|
13
|
+
*/
|
|
11
14
|
export enum AvailableSubViews {
|
|
12
15
|
history = 1000,
|
|
13
16
|
tutorial = 1001
|
|
14
17
|
}
|
|
15
|
-
enum ContainerParent {
|
|
16
|
-
agent = 1,
|
|
17
|
-
widget = 2,
|
|
18
|
-
news = 3
|
|
19
|
-
}
|
|
20
18
|
export enum CurrentSubView {
|
|
21
19
|
none = 1,
|
|
22
20
|
history = 2,
|
|
@@ -62,25 +60,12 @@ enum Mode {
|
|
|
62
60
|
text = 2,
|
|
63
61
|
dashboard = 3
|
|
64
62
|
}
|
|
65
|
-
enum PermissionStatus {
|
|
66
|
-
waiting = 1,
|
|
67
|
-
allowed = 2,
|
|
68
|
-
refused = 3,
|
|
69
|
-
error = 4
|
|
70
|
-
}
|
|
71
63
|
export enum RetorikEvent {
|
|
72
64
|
DetailViewOpen = 1,
|
|
73
65
|
DetailViewClose = 2,
|
|
74
66
|
SpeechStarted = 3,
|
|
75
67
|
SpeechEnded = 4
|
|
76
68
|
}
|
|
77
|
-
enum RecognitionState {
|
|
78
|
-
Initializing = 1,
|
|
79
|
-
Listening = 2,
|
|
80
|
-
Closing = 3,
|
|
81
|
-
ForceClosing = 4,
|
|
82
|
-
Closed = 5
|
|
83
|
-
}
|
|
84
69
|
enum Source3DEngine {
|
|
85
70
|
avatarsdk = "avatarsdk",
|
|
86
71
|
avatarsdkbis = "avatar-sdk",
|
|
@@ -90,15 +75,6 @@ enum Source3DEngine {
|
|
|
90
75
|
rpm = "rpm",
|
|
91
76
|
readyplayerme = "readyplayerme"
|
|
92
77
|
}
|
|
93
|
-
enum UIPart {
|
|
94
|
-
none = 1,
|
|
95
|
-
agent = 2,
|
|
96
|
-
background = 3,
|
|
97
|
-
remote = 4,
|
|
98
|
-
languages = 5,
|
|
99
|
-
card = 6,
|
|
100
|
-
qroverlay = 7
|
|
101
|
-
}
|
|
102
78
|
interface DirectLineAttachment {
|
|
103
79
|
content?: any;
|
|
104
80
|
contentType: string;
|
|
@@ -261,11 +237,27 @@ export interface Configuration extends RetorikMenusConfiguration {
|
|
|
261
237
|
disableSpeechMode?: boolean;
|
|
262
238
|
disableSound?: boolean;
|
|
263
239
|
timerForFilterSelectionListMode?: number;
|
|
264
|
-
|
|
240
|
+
useOldRemote?: boolean;
|
|
241
|
+
showTemporaryBanner?: boolean;
|
|
242
|
+
preventVirtualKeyboard?: boolean;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Configuration of the menus displayed in the dashboard
|
|
246
|
+
* @param {Array<BaseMenu | CustomMenu> | undefined} baseMenu deprecated since v2.0.4. Use "menu" parameter instead.
|
|
247
|
+
* @param {Array<CustomMenu> | Array<Array<CustomMenu>> | undefined} customMenu deprecated since v2.0.4. Use "menu" parameter instead.
|
|
248
|
+
* @param {Array<BaseSubMenu | CustomMenu> | undefined} subMenu deprecated since v2.0.4. Use "menu" parameter instead.
|
|
249
|
+
* @param {Array<{ title?: string, items: Array<MenuItem> }> | undefined} menu menus displayed in the bashboard.
|
|
250
|
+
*/
|
|
265
251
|
export interface RetorikMenusConfiguration {
|
|
266
252
|
baseMenu?: Array<BaseMenu | CustomMenu>;
|
|
267
253
|
customMenu?: Array<CustomMenu> | Array<Array<CustomMenu>>;
|
|
268
254
|
subMenu?: Array<BaseSubMenu | CustomMenu>;
|
|
255
|
+
menu?: {
|
|
256
|
+
categories?: Array<{
|
|
257
|
+
title?: string;
|
|
258
|
+
tiles: Array<MenuItem>;
|
|
259
|
+
}>;
|
|
260
|
+
};
|
|
269
261
|
}
|
|
270
262
|
interface SpeechRecognitionOptions {
|
|
271
263
|
timerBeforeSpeechEnd?: number;
|
|
@@ -461,6 +453,20 @@ export interface CustomMenu {
|
|
|
461
453
|
closeParametersOnClickInMobileMode?: boolean;
|
|
462
454
|
name?: string;
|
|
463
455
|
}
|
|
456
|
+
interface MenuItem {
|
|
457
|
+
index: number;
|
|
458
|
+
text: string;
|
|
459
|
+
textColor?: string;
|
|
460
|
+
backgroundColor?: string;
|
|
461
|
+
image?: {
|
|
462
|
+
url: string;
|
|
463
|
+
color?: string;
|
|
464
|
+
};
|
|
465
|
+
action: {
|
|
466
|
+
type: string;
|
|
467
|
+
value?: Record<string, any>;
|
|
468
|
+
};
|
|
469
|
+
}
|
|
464
470
|
export interface GDPR {
|
|
465
471
|
userConsent?: boolean;
|
|
466
472
|
title?: Record<string, string>;
|
|
@@ -472,259 +478,6 @@ export interface GDPR {
|
|
|
472
478
|
messageAccepted?: Record<string, string>;
|
|
473
479
|
messageRefused?: Record<string, string>;
|
|
474
480
|
}
|
|
475
|
-
interface ThemeButton {
|
|
476
|
-
background: {
|
|
477
|
-
default: string;
|
|
478
|
-
hover: string;
|
|
479
|
-
};
|
|
480
|
-
border: {
|
|
481
|
-
default: string;
|
|
482
|
-
hover: string;
|
|
483
|
-
};
|
|
484
|
-
text: {
|
|
485
|
-
default: string;
|
|
486
|
-
hover: string;
|
|
487
|
-
};
|
|
488
|
-
}
|
|
489
|
-
interface ThemeButtonConditional {
|
|
490
|
-
background?: {
|
|
491
|
-
default?: string;
|
|
492
|
-
hover?: string;
|
|
493
|
-
};
|
|
494
|
-
border?: {
|
|
495
|
-
default?: string;
|
|
496
|
-
hover?: string;
|
|
497
|
-
};
|
|
498
|
-
text?: {
|
|
499
|
-
default?: string;
|
|
500
|
-
hover?: string;
|
|
501
|
-
};
|
|
502
|
-
}
|
|
503
|
-
export interface RetorikThemeColors {
|
|
504
|
-
theme?: string;
|
|
505
|
-
primary?: string;
|
|
506
|
-
secondary?: string;
|
|
507
|
-
black?: string;
|
|
508
|
-
whereToEatColor?: string;
|
|
509
|
-
whereToSleepColor?: string;
|
|
510
|
-
tobeSeenColor?: string;
|
|
511
|
-
tobeDoneColor?: string;
|
|
512
|
-
localProductsColor?: string;
|
|
513
|
-
servicesColor?: string;
|
|
514
|
-
agendaColor?: string;
|
|
515
|
-
occupantColor?: string;
|
|
516
|
-
companyName?: string;
|
|
517
|
-
loader?: {
|
|
518
|
-
animation?: string;
|
|
519
|
-
background?: string;
|
|
520
|
-
text?: string;
|
|
521
|
-
toggle?: {
|
|
522
|
-
text: string;
|
|
523
|
-
background: string;
|
|
524
|
-
};
|
|
525
|
-
button?: ThemeButtonConditional;
|
|
526
|
-
};
|
|
527
|
-
card?: {
|
|
528
|
-
frame?: {
|
|
529
|
-
background?: string;
|
|
530
|
-
border?: string;
|
|
531
|
-
text?: string;
|
|
532
|
-
};
|
|
533
|
-
button?: ThemeButtonConditional;
|
|
534
|
-
discoverButton?: ThemeButton;
|
|
535
|
-
};
|
|
536
|
-
textMode?: {
|
|
537
|
-
panel?: {
|
|
538
|
-
background?: string;
|
|
539
|
-
border?: string;
|
|
540
|
-
conversationUser?: string;
|
|
541
|
-
conversationBot?: string;
|
|
542
|
-
backgroundUser?: string;
|
|
543
|
-
backgroundBot?: string;
|
|
544
|
-
};
|
|
545
|
-
};
|
|
546
|
-
vocalMode?: {
|
|
547
|
-
subtitles?: {
|
|
548
|
-
text?: string;
|
|
549
|
-
background?: string;
|
|
550
|
-
};
|
|
551
|
-
};
|
|
552
|
-
formInput?: {
|
|
553
|
-
text?: {
|
|
554
|
-
default?: string;
|
|
555
|
-
hover?: string;
|
|
556
|
-
};
|
|
557
|
-
inputRadioCheckbox?: {
|
|
558
|
-
unchecked?: {
|
|
559
|
-
background?: string;
|
|
560
|
-
border?: string;
|
|
561
|
-
};
|
|
562
|
-
checked?: {
|
|
563
|
-
background?: string;
|
|
564
|
-
border?: string;
|
|
565
|
-
item?: string;
|
|
566
|
-
};
|
|
567
|
-
};
|
|
568
|
-
inputButton?: ThemeButtonConditional;
|
|
569
|
-
likert?: {
|
|
570
|
-
default?: string;
|
|
571
|
-
hover?: string;
|
|
572
|
-
};
|
|
573
|
-
};
|
|
574
|
-
}
|
|
575
|
-
export interface RetorikMainComponentConfiguration extends RetorikSharedProps {
|
|
576
|
-
config?: Configuration;
|
|
577
|
-
viewsConfig?: ViewsConfiguration;
|
|
578
|
-
chatbotData?: ChatbotData;
|
|
579
|
-
agentData?: BaseAgentData;
|
|
580
|
-
chatbotDataWidget?: ChatbotData;
|
|
581
|
-
ponyfillFactoryCredentials?: PonyfillFactoryCredentials;
|
|
582
|
-
customVoice?: CustomVoice;
|
|
583
|
-
colors?: RetorikThemeColors;
|
|
584
|
-
skipLoader?: boolean;
|
|
585
|
-
defaultMode?: number;
|
|
586
|
-
GDPR?: GDPR;
|
|
587
|
-
}
|
|
588
|
-
export interface RetorikMainComponentProps extends RetorikMainComponentConfiguration {
|
|
589
|
-
menuConfig?: RetorikMenusConfiguration;
|
|
590
|
-
}
|
|
591
|
-
interface RetorikWidgetProps {
|
|
592
|
-
widgetConfig: WidgetConfiguration;
|
|
593
|
-
}
|
|
594
|
-
export interface RetorikSharedProps {
|
|
595
|
-
addressData: AddressData;
|
|
596
|
-
externalEventHandler?: (action: any, dispatch?: any) => boolean;
|
|
597
|
-
externalComponents?: Array<{
|
|
598
|
-
name: string;
|
|
599
|
-
component: JSX.Element;
|
|
600
|
-
}>;
|
|
601
|
-
userData?: UserData;
|
|
602
|
-
width?: number | string | 'full';
|
|
603
|
-
height?: number | string | 'full';
|
|
604
|
-
}
|
|
605
|
-
export const setVisibility: (value: 'visible' | 'hidden') => void;
|
|
606
|
-
export const toggleVisibility: () => void;
|
|
607
|
-
interface UtilsStore {
|
|
608
|
-
fullScreenImage: string | undefined;
|
|
609
|
-
lastListActivity: string | undefined;
|
|
610
|
-
listClosed: boolean;
|
|
611
|
-
listOpened: boolean;
|
|
612
|
-
currentSubView: number;
|
|
613
|
-
currentCustomView: CustomMenu | undefined;
|
|
614
|
-
retorikEvent: RetorikEvent | undefined;
|
|
615
|
-
displayAgent: boolean;
|
|
616
|
-
activityToSend: RetorikActivity | undefined;
|
|
617
|
-
currentNewsActivity: RetorikActivity | undefined;
|
|
618
|
-
retorikNewsEnded: boolean;
|
|
619
|
-
userIsTyping: boolean;
|
|
620
|
-
userIsSwiping: boolean;
|
|
621
|
-
askedForKioskParametersOpening: boolean;
|
|
622
|
-
detailedAttachmentTriggers: Array<DetailedAttachmentAction>;
|
|
623
|
-
modalFullscreenContent: JSX.Element | null;
|
|
624
|
-
modalFullscreenContentNoDisplayId: string | undefined;
|
|
625
|
-
printingCallback: ((url: string) => void) | null;
|
|
626
|
-
GDPRDisplay: boolean;
|
|
627
|
-
GDPRWindowData: GDPR | undefined;
|
|
628
|
-
GDPRUserConsent: boolean;
|
|
629
|
-
unlockClickedButton: boolean;
|
|
630
|
-
dashboardOpened: boolean;
|
|
631
|
-
clickedOnUI: UIPart;
|
|
632
|
-
}
|
|
633
|
-
export const useUtilsStore: UseBoundStore<StoreApi<UtilsStore>>;
|
|
634
|
-
export const setCurrentSubView: (subview: number) => void;
|
|
635
|
-
export const setCurrentCustomView: (customView: CustomMenu) => void;
|
|
636
|
-
export const showAgent: () => void;
|
|
637
|
-
export const hideAgent: () => void;
|
|
638
|
-
export const sendActivity: (activity: RetorikActivity | undefined) => void;
|
|
639
|
-
export const addDetailedAttachmentTrigger: (value: DetailedAttachmentAction) => void;
|
|
640
|
-
export const setModalFullscreenContent: (value: JSX.Element | null, fromActivity?: string) => void;
|
|
641
|
-
export const setPrintingCallback: (value: ((url: string) => void) | null) => void;
|
|
642
|
-
declare const unlockClickedButton: () => void;
|
|
643
|
-
export const setDashboardOpened: (value: boolean) => void;
|
|
644
|
-
interface Boundary {
|
|
645
|
-
word: string;
|
|
646
|
-
startTime: number;
|
|
647
|
-
endTime: number;
|
|
648
|
-
boundaryType: string;
|
|
649
|
-
}
|
|
650
|
-
interface SpeechStore {
|
|
651
|
-
ponyfillCredentials: PonyfillFactoryCredentials | undefined;
|
|
652
|
-
useContinuousRecognition: boolean;
|
|
653
|
-
customVoice: CustomVoice | undefined;
|
|
654
|
-
voice: SpeechSynthesisVoice | null;
|
|
655
|
-
speaking: boolean;
|
|
656
|
-
muted: boolean;
|
|
657
|
-
cancel: boolean;
|
|
658
|
-
boundaryData: Array<Boundary>;
|
|
659
|
-
visemeData: Array<SpeechSynthesisEventProps>;
|
|
660
|
-
singleVisemeAdded: SpeechSynthesisEventProps | null;
|
|
661
|
-
multiVisemesAdded: Array<SpeechSynthesisEventProps>;
|
|
662
|
-
currentReplyToId: string | undefined;
|
|
663
|
-
currentPlaying: RetorikActivity | undefined;
|
|
664
|
-
endedActivities: Array<string>;
|
|
665
|
-
currentOrLastPlayedActivity: RetorikActivity | undefined;
|
|
666
|
-
isMicrophoneAllowed: boolean;
|
|
667
|
-
showMicrophoneModal: boolean;
|
|
668
|
-
permissionStatus: PermissionStatus;
|
|
669
|
-
activeRecognitionState: RecognitionState;
|
|
670
|
-
lastRecognitionInterim: string;
|
|
671
|
-
streamingReplyToId: string | null;
|
|
672
|
-
streamingQueue: Array<RetorikActivity>;
|
|
673
|
-
streamingQueueForText: Array<RetorikActivity>;
|
|
674
|
-
currentStreaming: string | null;
|
|
675
|
-
streamingQueueFullLength: number;
|
|
676
|
-
streamingReplyToIdToIgnore: string | null;
|
|
677
|
-
speechRecognitionDynamicGrammars: Array<string>;
|
|
678
|
-
externalTextToSpeech: string | undefined;
|
|
679
|
-
}
|
|
680
|
-
export const useSpeechStore: UseBoundStore<StoreApi<SpeechStore>>;
|
|
681
|
-
export const setMuted: (value: boolean) => void;
|
|
682
|
-
export const toggleMicrophone: () => void;
|
|
683
|
-
export const playExternalSynthesis: (value: string) => void;
|
|
684
|
-
export const characters: {
|
|
685
|
-
alice: string;
|
|
686
|
-
greg: string;
|
|
687
|
-
jeanmarc: string;
|
|
688
|
-
jessica: string;
|
|
689
|
-
jessica_short: string;
|
|
690
|
-
ikaa: string;
|
|
691
|
-
karine: string;
|
|
692
|
-
lea: string;
|
|
693
|
-
prosper: string;
|
|
694
|
-
raphael: string;
|
|
695
|
-
rowan: string;
|
|
696
|
-
rowan_short: string;
|
|
697
|
-
zahra: string;
|
|
698
|
-
};
|
|
699
|
-
interface RetorikStore {
|
|
700
|
-
configuration: Configuration;
|
|
701
|
-
addressData: AddressData;
|
|
702
|
-
containerRef: HTMLDivElement | null;
|
|
703
|
-
sendBoxRef: HTMLTextAreaElement | null;
|
|
704
|
-
sendBoxPlaceHolder: string | undefined;
|
|
705
|
-
canFocusSendBox: boolean;
|
|
706
|
-
mode: Mode;
|
|
707
|
-
baseAddress: string;
|
|
708
|
-
subtitlesInConfiguration: boolean;
|
|
709
|
-
displaySubtitles: boolean;
|
|
710
|
-
agentData: AgentData | undefined;
|
|
711
|
-
gpuData: TierResult | undefined;
|
|
712
|
-
loaderClosed: boolean;
|
|
713
|
-
appAvailable: boolean;
|
|
714
|
-
currentLayout: ContainerParent;
|
|
715
|
-
userAlreadySet: boolean;
|
|
716
|
-
disableSound: boolean;
|
|
717
|
-
isWaitingForResponse: boolean;
|
|
718
|
-
skipLoader: boolean;
|
|
719
|
-
displayAgentInNews: boolean;
|
|
720
|
-
submitDelayBeforeSendingMessage: number | undefined;
|
|
721
|
-
disableHistory: boolean;
|
|
722
|
-
}
|
|
723
|
-
export const useRetorikStore: UseBoundStore<StoreApi<RetorikStore>>;
|
|
724
|
-
export const setMode: (value: Mode) => void;
|
|
725
|
-
export const setLoaderClosed: (value: boolean) => void;
|
|
726
|
-
export const setDisplaySubtitles: (value: boolean) => void;
|
|
727
|
-
export const toggleSubtitles: () => void;
|
|
728
481
|
interface TranslationViews {
|
|
729
482
|
'1': string;
|
|
730
483
|
'2': string;
|
|
@@ -874,6 +627,9 @@ interface TranslationMicrophone {
|
|
|
874
627
|
allow: string;
|
|
875
628
|
rejected: string;
|
|
876
629
|
instructions: string;
|
|
630
|
+
listening: string;
|
|
631
|
+
trigger: string;
|
|
632
|
+
triggerwithoutname: string;
|
|
877
633
|
}
|
|
878
634
|
interface TranslationFile extends TranslationViews {
|
|
879
635
|
common: TranslationCommon;
|
|
@@ -894,22 +650,197 @@ interface TranslationFile extends TranslationViews {
|
|
|
894
650
|
anghello: TranslationAnghello;
|
|
895
651
|
microphone: TranslationMicrophone;
|
|
896
652
|
}
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
653
|
+
interface CommonColors {
|
|
654
|
+
primary: string;
|
|
655
|
+
secondary: string;
|
|
656
|
+
black: string;
|
|
657
|
+
whereToEatColor: string;
|
|
658
|
+
whereToSleepColor: string;
|
|
659
|
+
tobeSeenColor: string;
|
|
660
|
+
tobeDoneColor: string;
|
|
661
|
+
localProductsColor: string;
|
|
662
|
+
servicesColor: string;
|
|
663
|
+
agendaColor: string;
|
|
664
|
+
occupantColor: string;
|
|
665
|
+
}
|
|
666
|
+
interface LoaderColors {
|
|
667
|
+
animation: string;
|
|
668
|
+
background: string;
|
|
669
|
+
text: string;
|
|
670
|
+
toggle: {
|
|
671
|
+
text: string;
|
|
672
|
+
background: string;
|
|
673
|
+
};
|
|
674
|
+
button: ThemeButton;
|
|
675
|
+
}
|
|
676
|
+
interface ThemeButton {
|
|
677
|
+
background: {
|
|
678
|
+
default: string;
|
|
679
|
+
hover: string;
|
|
680
|
+
};
|
|
681
|
+
border: {
|
|
682
|
+
default: string;
|
|
683
|
+
hover: string;
|
|
684
|
+
};
|
|
685
|
+
text: {
|
|
686
|
+
default: string;
|
|
687
|
+
hover: string;
|
|
688
|
+
};
|
|
689
|
+
}
|
|
690
|
+
interface ThemeButtonConditional {
|
|
691
|
+
background?: {
|
|
692
|
+
default?: string;
|
|
693
|
+
hover?: string;
|
|
694
|
+
};
|
|
695
|
+
border?: {
|
|
696
|
+
default?: string;
|
|
697
|
+
hover?: string;
|
|
698
|
+
};
|
|
699
|
+
text?: {
|
|
700
|
+
default?: string;
|
|
701
|
+
hover?: string;
|
|
702
|
+
};
|
|
703
|
+
}
|
|
704
|
+
interface Theme {
|
|
705
|
+
companyName: string;
|
|
706
|
+
loader: LoaderColors;
|
|
707
|
+
card: {
|
|
708
|
+
frame: {
|
|
709
|
+
background: string;
|
|
710
|
+
border: string;
|
|
711
|
+
text: string;
|
|
712
|
+
};
|
|
713
|
+
button: ThemeButton;
|
|
714
|
+
discoverButton: ThemeButton;
|
|
715
|
+
};
|
|
716
|
+
textMode: {
|
|
717
|
+
panel: {
|
|
718
|
+
background: string;
|
|
719
|
+
border: string;
|
|
720
|
+
conversationUser: string;
|
|
721
|
+
conversationBot: string;
|
|
722
|
+
backgroundUser: string;
|
|
723
|
+
backgroundBot: string;
|
|
724
|
+
};
|
|
725
|
+
};
|
|
726
|
+
vocalMode: {
|
|
727
|
+
subtitles: {
|
|
728
|
+
text: string;
|
|
729
|
+
background: string;
|
|
730
|
+
};
|
|
731
|
+
};
|
|
732
|
+
formInput: {
|
|
733
|
+
text: {
|
|
734
|
+
default: string;
|
|
735
|
+
hover: string;
|
|
736
|
+
};
|
|
737
|
+
inputRadioCheckbox: {
|
|
738
|
+
unchecked: {
|
|
739
|
+
background: string;
|
|
740
|
+
border: string;
|
|
741
|
+
};
|
|
742
|
+
checked: {
|
|
743
|
+
background: string;
|
|
744
|
+
border: string;
|
|
745
|
+
item: string;
|
|
746
|
+
};
|
|
747
|
+
};
|
|
748
|
+
inputButton: ThemeButton;
|
|
749
|
+
likert: {
|
|
750
|
+
default: string;
|
|
751
|
+
hover: string;
|
|
752
|
+
};
|
|
753
|
+
};
|
|
754
|
+
}
|
|
755
|
+
interface ThemeColors extends CommonColors, Theme {
|
|
756
|
+
}
|
|
757
|
+
export interface RetorikThemeColors {
|
|
758
|
+
theme?: string;
|
|
759
|
+
primary?: string;
|
|
760
|
+
secondary?: string;
|
|
761
|
+
black?: string;
|
|
762
|
+
whereToEatColor?: string;
|
|
763
|
+
whereToSleepColor?: string;
|
|
764
|
+
tobeSeenColor?: string;
|
|
765
|
+
tobeDoneColor?: string;
|
|
766
|
+
localProductsColor?: string;
|
|
767
|
+
servicesColor?: string;
|
|
768
|
+
agendaColor?: string;
|
|
769
|
+
occupantColor?: string;
|
|
770
|
+
companyName?: string;
|
|
771
|
+
loader?: {
|
|
772
|
+
animation?: string;
|
|
773
|
+
background?: string;
|
|
774
|
+
text?: string;
|
|
775
|
+
toggle?: {
|
|
776
|
+
text: string;
|
|
777
|
+
background: string;
|
|
778
|
+
};
|
|
779
|
+
button?: ThemeButtonConditional;
|
|
780
|
+
};
|
|
781
|
+
card?: {
|
|
782
|
+
frame?: {
|
|
783
|
+
background?: string;
|
|
784
|
+
border?: string;
|
|
785
|
+
text?: string;
|
|
786
|
+
};
|
|
787
|
+
button?: ThemeButtonConditional;
|
|
788
|
+
discoverButton?: ThemeButton;
|
|
789
|
+
};
|
|
790
|
+
textMode?: {
|
|
791
|
+
panel?: {
|
|
792
|
+
background?: string;
|
|
793
|
+
border?: string;
|
|
794
|
+
conversationUser?: string;
|
|
795
|
+
conversationBot?: string;
|
|
796
|
+
backgroundUser?: string;
|
|
797
|
+
backgroundBot?: string;
|
|
798
|
+
};
|
|
799
|
+
};
|
|
800
|
+
vocalMode?: {
|
|
801
|
+
subtitles?: {
|
|
802
|
+
text?: string;
|
|
803
|
+
background?: string;
|
|
804
|
+
};
|
|
805
|
+
};
|
|
806
|
+
formInput?: {
|
|
807
|
+
text?: {
|
|
808
|
+
default?: string;
|
|
809
|
+
hover?: string;
|
|
810
|
+
};
|
|
811
|
+
inputRadioCheckbox?: {
|
|
812
|
+
unchecked?: {
|
|
813
|
+
background?: string;
|
|
814
|
+
border?: string;
|
|
815
|
+
};
|
|
816
|
+
checked?: {
|
|
817
|
+
background?: string;
|
|
818
|
+
border?: string;
|
|
819
|
+
item?: string;
|
|
820
|
+
};
|
|
821
|
+
};
|
|
822
|
+
inputButton?: ThemeButtonConditional;
|
|
823
|
+
likert?: {
|
|
824
|
+
default?: string;
|
|
825
|
+
hover?: string;
|
|
826
|
+
};
|
|
827
|
+
};
|
|
828
|
+
}
|
|
829
|
+
export const characters: {
|
|
830
|
+
alice: string;
|
|
831
|
+
greg: string;
|
|
832
|
+
jeanmarc: string;
|
|
833
|
+
jessica: string;
|
|
834
|
+
jessica_short: string;
|
|
835
|
+
ikaa: string;
|
|
836
|
+
karine: string;
|
|
837
|
+
lea: string;
|
|
838
|
+
prosper: string;
|
|
839
|
+
raphael: string;
|
|
840
|
+
rowan: string;
|
|
841
|
+
rowan_short: string;
|
|
842
|
+
zahra: string;
|
|
843
|
+
};
|
|
913
844
|
export const CONTENT_TYPE_ADAPTIVE_CARD = "application/vnd.microsoft.card.adaptive";
|
|
914
845
|
export const CONTENT_TYPE_NEWS = "application/vnd.davi.retorik.card.news";
|
|
915
846
|
export const CONTENT_TYPE_POI = "application/vnd.davi.retorik.card.poi";
|
|
@@ -969,15 +900,82 @@ interface Coordinates {
|
|
|
969
900
|
latitude: number;
|
|
970
901
|
longitude: number;
|
|
971
902
|
}
|
|
972
|
-
export const
|
|
973
|
-
export const
|
|
974
|
-
export const
|
|
975
|
-
export const
|
|
976
|
-
export const
|
|
977
|
-
export const
|
|
978
|
-
export const
|
|
979
|
-
export const
|
|
980
|
-
export const
|
|
903
|
+
export const openWidget: (instanceId?: string) => void;
|
|
904
|
+
export const closeWidget: (instanceId?: string) => void;
|
|
905
|
+
export const toggleWidget: (instanceId?: string) => void;
|
|
906
|
+
export const toggleDisplay: (instanceId?: string) => void;
|
|
907
|
+
export const showAgent: (instanceId?: string) => void;
|
|
908
|
+
export const hideAgent: (instanceId?: string) => void;
|
|
909
|
+
export const setCurrentCustomView: (value: CustomMenu, instanceId?: string) => void;
|
|
910
|
+
export const setCurrentSubView: (value: number, instanceId?: string) => void;
|
|
911
|
+
export const sendActivity: (value: RetorikActivity | undefined, instanceId?: string) => void;
|
|
912
|
+
export const addDetailedAttachmentTrigger: (value: DetailedAttachmentAction, instanceId?: string) => void;
|
|
913
|
+
export const setModalFullscreenContent: (value: JSX.Element | null, instanceId?: string) => void;
|
|
914
|
+
export const setPrintingCallback: (value: ((url: string) => void) | null, instanceId?: string) => void;
|
|
915
|
+
export const setDashboardOpened: (value: boolean, instanceId?: string) => void;
|
|
916
|
+
export const setLocale: (value: string, instanceId?: string) => void;
|
|
917
|
+
export const setVisibility: (value: string, instanceId?: string) => void;
|
|
918
|
+
export const toggleVisibility: (instanceId?: string) => void;
|
|
919
|
+
export const toggleMicrophone: (instanceId?: string) => void;
|
|
920
|
+
export const setMuted: (value: boolean, instanceId?: string) => void;
|
|
921
|
+
export const playExternalSynthesis: (value: string, instanceId?: string) => void;
|
|
922
|
+
export const setDisplaySubtitles: (value: boolean, instanceId?: string) => void;
|
|
923
|
+
export const toggleSubtitles: (instanceId?: string) => void;
|
|
924
|
+
export const setMode: (value: Mode, instanceId?: string) => void;
|
|
925
|
+
export const setLoaderClosed: (value: boolean, instanceId?: string) => void;
|
|
926
|
+
export const sendMessage: (text?: string, value?: Record<string, any>, instanceId?: string) => void;
|
|
927
|
+
export const sendEvent: (name: string, value?: Record<string, any> | null, instanceId?: string) => void;
|
|
928
|
+
export const pauseConversation: (instanceId?: string) => void;
|
|
929
|
+
export const resumeConversation: (instanceId?: string) => void;
|
|
930
|
+
export const sendMessageToChatbot: (value: string, instanceId?: string) => void;
|
|
931
|
+
export function fetchAvailableLanguages(baseAddress: string, needVisemes?: boolean): Promise<AvailableLanguages>;
|
|
932
|
+
export default getThemeColors;
|
|
933
|
+
export interface RetorikMainComponentConfiguration extends RetorikSharedProps {
|
|
934
|
+
config?: Configuration;
|
|
935
|
+
viewsConfig?: ViewsConfiguration;
|
|
936
|
+
chatbotData?: ChatbotData;
|
|
937
|
+
agentData?: BaseAgentData;
|
|
938
|
+
chatbotDataWidget?: ChatbotData;
|
|
939
|
+
ponyfillFactoryCredentials?: PonyfillFactoryCredentials;
|
|
940
|
+
customVoice?: CustomVoice;
|
|
941
|
+
colors?: RetorikThemeColors;
|
|
942
|
+
skipLoader?: boolean;
|
|
943
|
+
defaultMode?: number;
|
|
944
|
+
GDPR?: GDPR;
|
|
945
|
+
}
|
|
946
|
+
export interface RetorikMainComponentProps extends RetorikMainComponentConfiguration {
|
|
947
|
+
menuConfig?: RetorikMenusConfiguration;
|
|
948
|
+
}
|
|
949
|
+
interface RetorikWidgetProps {
|
|
950
|
+
widgetConfig: WidgetConfiguration;
|
|
951
|
+
}
|
|
952
|
+
export interface RetorikSharedProps {
|
|
953
|
+
instanceId?: string;
|
|
954
|
+
addressData: AddressData;
|
|
955
|
+
externalEventHandler?: (action: any, dispatch?: any) => boolean;
|
|
956
|
+
externalComponents?: Array<{
|
|
957
|
+
name: string;
|
|
958
|
+
component: JSX.Element;
|
|
959
|
+
}>;
|
|
960
|
+
userData?: UserData;
|
|
961
|
+
width?: number | string | 'full';
|
|
962
|
+
height?: number | string | 'full';
|
|
963
|
+
}
|
|
964
|
+
export default getRetorikConfigs;
|
|
965
|
+
export const useCurrentSubView: (instanceId?: string) => number;
|
|
966
|
+
export const useKioskParameterOpening: (instanceId?: string) => number;
|
|
967
|
+
export const useRetorikEvent: (instanceId?: string) => RetorikEvent | undefined;
|
|
968
|
+
export const useLocale: (instanceId?: string) => string;
|
|
969
|
+
export const useIsRTL: (instanceId?: string) => boolean;
|
|
970
|
+
export const useTranslation: (instanceId?: string) => TranslationFile;
|
|
971
|
+
export const useIsMobile: (instanceId?: string) => boolean;
|
|
972
|
+
export const useIsWidget: (instanceId?: string) => boolean;
|
|
973
|
+
export const useThemeColors: (instanceId?: string) => ThemeColors;
|
|
974
|
+
export const useMode: (instanceId?: string) => Mode;
|
|
975
|
+
export const useMuted: (instanceId?: string) => boolean;
|
|
976
|
+
export const useLoaderClosed: (instanceId?: string) => boolean;
|
|
977
|
+
export const useConfiguration: (instanceId?: string) => Configuration;
|
|
978
|
+
export const useIsUsedOnBorne: (instanceId?: string) => boolean;
|
|
981
979
|
export const RetorikAgent: (props: RetorikMainComponentProps) => JSX.Element;
|
|
982
980
|
export const RetorikWidget: (props: RetorikMainComponentProps & RetorikWidgetProps) => JSX.Element;
|
|
983
981
|
export const RetorikNews: (props: RetorikMainComponentProps) => JSX.Element;
|