@memori.ai/memori-react 8.20.0 → 8.22.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/CHANGELOG.md +24 -0
- package/dist/components/MemoriWidget/MemoriWidget.d.ts +3 -1
- package/dist/components/MemoriWidget/MemoriWidget.js +39 -31
- package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/dist/components/layouts/fullpage.css +115 -0
- package/dist/helpers/piiDetection.js +4 -1
- package/dist/helpers/piiDetection.js.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/testUtils.d.ts +5 -0
- package/dist/testUtils.js +18 -0
- package/dist/testUtils.js.map +1 -0
- package/dist/types/layout.d.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/esm/components/MemoriWidget/MemoriWidget.d.ts +3 -1
- package/esm/components/MemoriWidget/MemoriWidget.js +39 -31
- package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/esm/components/layouts/fullpage.css +115 -0
- package/esm/helpers/piiDetection.js +4 -1
- package/esm/helpers/piiDetection.js.map +1 -1
- package/esm/index.js +5 -1
- package/esm/index.js.map +1 -1
- package/esm/testUtils.d.ts +5 -0
- package/esm/testUtils.js +15 -0
- package/esm/testUtils.js.map +1 -0
- package/esm/types/layout.d.ts +1 -1
- package/esm/version.d.ts +1 -1
- package/esm/version.js +1 -1
- package/package.json +1 -1
- package/src/components/MemoriWidget/MemoriWidget.tsx +25 -9
- package/src/components/layouts/layouts.stories.tsx +1 -0
- package/src/helpers/piiDetection.test.ts +7 -7
- package/src/helpers/piiDetection.ts +4 -3
- package/src/index.stories.tsx +2 -2
- package/src/index.tsx +5 -1
- package/src/types/layout.ts +2 -2
- package/src/version.ts +1 -1
package/dist/types/layout.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type LayoutName = 'DEFAULT' | 'FULLPAGE' | 'TOTEM' | 'CHAT' | 'WEBSITE_ASSISTANT' | 'HIDDEN_CHAT' | 'ZOOMED_FULL_BODY';
|
|
2
2
|
export interface PiiDetectionRule {
|
|
3
3
|
id: string;
|
|
4
|
-
label: string
|
|
4
|
+
label: Record<string, string>;
|
|
5
5
|
pattern: string;
|
|
6
6
|
message: Record<string, string>;
|
|
7
7
|
}
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "8.
|
|
1
|
+
export declare const version = "8.22.0";
|
package/dist/version.js
CHANGED
|
@@ -87,6 +87,8 @@ export interface Props {
|
|
|
87
87
|
tenantID: string;
|
|
88
88
|
memoriConfigs?: MemoriConfig[];
|
|
89
89
|
memoriLang?: string;
|
|
90
|
+
uiLang?: string;
|
|
91
|
+
spokenLang?: string;
|
|
90
92
|
multilingual?: boolean;
|
|
91
93
|
integration?: Integration;
|
|
92
94
|
layout?: LayoutName;
|
|
@@ -144,5 +146,5 @@ export interface Props {
|
|
|
144
146
|
maxTotalMessagePayload?: number;
|
|
145
147
|
maxTextareaCharacters?: number;
|
|
146
148
|
}
|
|
147
|
-
declare const MemoriWidget: ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenantID, memoriLang, multilingual, integration, layout, customLayout, showShare, preview, embed, showCopyButton, showTranslationOriginal, showInputs, showDates, showContextPerLine, showSettings, showTypingText, showClear, showLogin, showUpload, showOnlyLastMessages, showChatHistory, showReasoning, height, secret, baseUrl, apiURL, engineURL, initialContextVars, initialQuestion, ttsProvider, ogImage, sessionID: initialSessionID, tenant, personification, authToken, enableAudio, defaultSpeakerActive, disableTextEnteredEvents, onStateChange, additionalInfo, additionalSettings, customMediaRenderer, userAvatar, __WEBCOMPONENT__, useMathFormatting, autoStart, applyVarsToRoot, showFunctionCache, maxTotalMessagePayload, maxTextareaCharacters, }: Props) => JSX.Element;
|
|
149
|
+
declare const MemoriWidget: ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenantID, memoriLang, uiLang, spokenLang, multilingual, integration, layout, customLayout, showShare, preview, embed, showCopyButton, showTranslationOriginal, showInputs, showDates, showContextPerLine, showSettings, showTypingText, showClear, showLogin, showUpload, showOnlyLastMessages, showChatHistory, showReasoning, height, secret, baseUrl, apiURL, engineURL, initialContextVars, initialQuestion, ttsProvider, ogImage, sessionID: initialSessionID, tenant, personification, authToken, enableAudio, defaultSpeakerActive, disableTextEnteredEvents, onStateChange, additionalInfo, additionalSettings, customMediaRenderer, userAvatar, __WEBCOMPONENT__, useMathFormatting, autoStart, applyVarsToRoot, showFunctionCache, maxTotalMessagePayload, maxTextareaCharacters, }: Props) => JSX.Element;
|
|
148
150
|
export default MemoriWidget;
|
|
@@ -155,8 +155,8 @@ window.typeBatchMessages = typeBatchMessages;
|
|
|
155
155
|
let audioContext;
|
|
156
156
|
let memoriPassword;
|
|
157
157
|
let userToken;
|
|
158
|
-
const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenantID, memoriLang, multilingual, integration, layout, customLayout, showShare, preview = false, embed = false, showCopyButton = true, showTranslationOriginal = false, showInputs = true, showDates = false, showContextPerLine = false, showSettings, showTypingText = false, showClear = false, showLogin = false, showUpload, showOnlyLastMessages, showChatHistory, showReasoning, height = '100vh', secret, baseUrl = 'https://aisuru-staging.aclambda.online', apiURL = 'https://backend-staging.memori.ai', engineURL = 'https://engine-staging.memori.ai', initialContextVars, initialQuestion, ttsProvider, ogImage, sessionID: initialSessionID, tenant, personification, authToken, enableAudio, defaultSpeakerActive = true, disableTextEnteredEvents = false, onStateChange, additionalInfo, additionalSettings, customMediaRenderer, userAvatar, __WEBCOMPONENT__ = false, useMathFormatting = false, autoStart = false, applyVarsToRoot = false, showFunctionCache = false, maxTotalMessagePayload, maxTextareaCharacters, }) => {
|
|
159
|
-
var _a, _b, _c, _d, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17;
|
|
158
|
+
const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenantID, memoriLang, uiLang, spokenLang, multilingual, integration, layout, customLayout, showShare, preview = false, embed = false, showCopyButton = true, showTranslationOriginal = false, showInputs = true, showDates = false, showContextPerLine = false, showSettings, showTypingText = false, showClear = false, showLogin = false, showUpload, showOnlyLastMessages, showChatHistory, showReasoning, height = '100vh', secret, baseUrl = 'https://aisuru-staging.aclambda.online', apiURL = 'https://backend-staging.memori.ai', engineURL = 'https://engine-staging.memori.ai', initialContextVars, initialQuestion, ttsProvider, ogImage, sessionID: initialSessionID, tenant, personification, authToken, enableAudio, defaultSpeakerActive = true, disableTextEnteredEvents = false, onStateChange, additionalInfo, additionalSettings, customMediaRenderer, userAvatar, __WEBCOMPONENT__ = false, useMathFormatting = false, autoStart = false, applyVarsToRoot = false, showFunctionCache = false, maxTotalMessagePayload, maxTextareaCharacters, }) => {
|
|
159
|
+
var _a, _b, _c, _d, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18;
|
|
160
160
|
const { t, i18n } = useTranslation();
|
|
161
161
|
const [isClient, setIsClient] = useState(false);
|
|
162
162
|
useEffect(() => {
|
|
@@ -203,7 +203,12 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
203
203
|
? multilingual
|
|
204
204
|
: !!(integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.multilanguage);
|
|
205
205
|
const forcedTimeout = integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.forcedTimeout;
|
|
206
|
-
const [userLang, setUserLang] = useState((_o = (_m = (_l = (_k =
|
|
206
|
+
const [userLang, setUserLang] = useState((_p = (_o = (_m = (_l = (_k = spokenLang !== null && spokenLang !== void 0 ? spokenLang : memoriLang) !== null && _k !== void 0 ? _k : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.lang) !== null && _l !== void 0 ? _l : language) !== null && _m !== void 0 ? _m : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.uiLang) !== null && _o !== void 0 ? _o : i18n.language) !== null && _p !== void 0 ? _p : 'IT');
|
|
207
|
+
useEffect(() => {
|
|
208
|
+
if (spokenLang != null) {
|
|
209
|
+
setUserLang(spokenLang);
|
|
210
|
+
}
|
|
211
|
+
}, [spokenLang]);
|
|
207
212
|
const applyMathFormatting = useMathFormatting !== undefined
|
|
208
213
|
? useMathFormatting
|
|
209
214
|
: !!(integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.useMathFormatting);
|
|
@@ -212,12 +217,15 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
212
217
|
installMathJax();
|
|
213
218
|
}, [applyMathFormatting]);
|
|
214
219
|
useEffect(() => {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
uiLanguages.includes(userLang.toLowerCase())
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
220
|
+
const langToApply = uiLang && uiLanguages.includes(uiLang.toLowerCase())
|
|
221
|
+
? uiLang.toLowerCase()
|
|
222
|
+
: userLang && uiLanguages.includes(userLang.toLowerCase())
|
|
223
|
+
? userLang.toLowerCase()
|
|
224
|
+
: null;
|
|
225
|
+
if (langToApply && typeof (i18n === null || i18n === void 0 ? void 0 : i18n.changeLanguage) === 'function') {
|
|
226
|
+
i18n.changeLanguage(langToApply);
|
|
227
|
+
}
|
|
228
|
+
}, [uiLang, userLang]);
|
|
221
229
|
const [loading, setLoading] = useState(false);
|
|
222
230
|
const [memoriTyping, setMemoriTyping] = useState(false);
|
|
223
231
|
const [typingText, setTypingText] = useState();
|
|
@@ -225,14 +233,14 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
225
233
|
? layout
|
|
226
234
|
: typeof (integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.layout) === 'string'
|
|
227
235
|
? integrationConfig.layout
|
|
228
|
-
: (
|
|
236
|
+
: (_q = integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.layout) === null || _q === void 0 ? void 0 : _q.name;
|
|
229
237
|
const selectedLayout = layoutName || 'DEFAULT';
|
|
230
238
|
const piiDetection = typeof (integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.layout) === 'object' &&
|
|
231
239
|
(integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.layout) !== null &&
|
|
232
|
-
((
|
|
240
|
+
((_s = (_r = integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.layout) === null || _r === void 0 ? void 0 : _r.piiDetection) === null || _s === void 0 ? void 0 : _s.enabled)
|
|
233
241
|
? integrationConfig.layout.piiDetection
|
|
234
242
|
: undefined;
|
|
235
|
-
const defaultEnableAudio = (
|
|
243
|
+
const defaultEnableAudio = (_t = enableAudio !== null && enableAudio !== void 0 ? enableAudio : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.enableAudio) !== null && _t !== void 0 ? _t : true;
|
|
236
244
|
const [hasUserActivatedListening, setHasUserActivatedListening] = useState(false);
|
|
237
245
|
const [hasUserTypedMessage, setHasUserTypedMessage] = useState(false);
|
|
238
246
|
const [showPositionDrawer, setShowPositionDrawer] = useState(false);
|
|
@@ -1120,7 +1128,7 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1120
1128
|
apiUrl: `${baseUrl}/api/tts`,
|
|
1121
1129
|
continuousSpeech: continuousSpeech,
|
|
1122
1130
|
preview: preview,
|
|
1123
|
-
}, autoStart, defaultEnableAudio, (
|
|
1131
|
+
}, autoStart, defaultEnableAudio, (_u = defaultSpeakerActive !== null && defaultSpeakerActive !== void 0 ? defaultSpeakerActive : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.defaultSpeakerActive) !== null && _u !== void 0 ? _u : true);
|
|
1124
1132
|
const shouldPlayAudio = (text) => {
|
|
1125
1133
|
const currentSpeakerMuted = getLocalConfig('muteSpeaker', !defaultEnableAudio);
|
|
1126
1134
|
console.log('[MemoriWidget] shouldPlayAudio', currentSpeakerMuted);
|
|
@@ -1258,7 +1266,7 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1258
1266
|
? {
|
|
1259
1267
|
'--memori-chat-bubble-bg': '#fff',
|
|
1260
1268
|
...(integrationConfig && !instruct
|
|
1261
|
-
? { '--memori-text-color': (
|
|
1269
|
+
? { '--memori-text-color': (_v = integrationConfig.textColor) !== null && _v !== void 0 ? _v : '#000' }
|
|
1262
1270
|
: {}),
|
|
1263
1271
|
...((integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.buttonBgColor)
|
|
1264
1272
|
? {
|
|
@@ -1282,12 +1290,12 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1282
1290
|
? {
|
|
1283
1291
|
'--memori-inner-bg': `rgba(${integrationConfig.innerBgColor === 'dark'
|
|
1284
1292
|
? '0, 0, 0'
|
|
1285
|
-
: '255, 255, 255'}, ${(
|
|
1293
|
+
: '255, 255, 255'}, ${(_w = integrationConfig.innerBgAlpha) !== null && _w !== void 0 ? _w : 0.4})`,
|
|
1286
1294
|
'--memori-inner-content-pad': '1.5rem',
|
|
1287
1295
|
'--memori-nav-bg-image': 'none',
|
|
1288
1296
|
'--memori-nav-bg': `rgba(${integrationConfig.innerBgColor === 'dark'
|
|
1289
1297
|
? '0, 0, 0'
|
|
1290
|
-
: '255, 255, 255'}, ${(
|
|
1298
|
+
: '255, 255, 255'}, ${(_x = integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.innerBgAlpha) !== null && _x !== void 0 ? _x : 0.4})`,
|
|
1291
1299
|
}
|
|
1292
1300
|
: {
|
|
1293
1301
|
'--memori-inner-content-pad': '0px',
|
|
@@ -1755,12 +1763,12 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1755
1763
|
const headerProps = {
|
|
1756
1764
|
memori: {
|
|
1757
1765
|
...memori,
|
|
1758
|
-
ownerUserID: (
|
|
1766
|
+
ownerUserID: (_z = (_y = memori.ownerUserID) !== null && _y !== void 0 ? _y : ownerUserID) !== null && _z !== void 0 ? _z : undefined,
|
|
1759
1767
|
},
|
|
1760
1768
|
apiClient: client,
|
|
1761
1769
|
tenant,
|
|
1762
1770
|
history,
|
|
1763
|
-
showShare: (
|
|
1771
|
+
showShare: (_0 = showShare !== null && showShare !== void 0 ? showShare : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.showShare) !== null && _0 !== void 0 ? _0 : true,
|
|
1764
1772
|
position,
|
|
1765
1773
|
layout: selectedLayout,
|
|
1766
1774
|
additionalSettings,
|
|
@@ -1768,19 +1776,19 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1768
1776
|
setShowSettingsDrawer,
|
|
1769
1777
|
setShowKnownFactsDrawer,
|
|
1770
1778
|
setShowExpertsDrawer,
|
|
1771
|
-
enableAudio: (
|
|
1779
|
+
enableAudio: (_1 = enableAudio !== null && enableAudio !== void 0 ? enableAudio : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.enableAudio) !== null && _1 !== void 0 ? _1 : true,
|
|
1772
1780
|
speakerMuted: speakerMuted !== null && speakerMuted !== void 0 ? speakerMuted : false,
|
|
1773
1781
|
setSpeakerMuted: (mute) => {
|
|
1774
1782
|
toggleMute(mute);
|
|
1775
1783
|
},
|
|
1776
1784
|
setShowChatHistoryDrawer,
|
|
1777
|
-
showSettings: (
|
|
1778
|
-
showChatHistory: (
|
|
1785
|
+
showSettings: (_2 = showSettings !== null && showSettings !== void 0 ? showSettings : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.showSettings) !== null && _2 !== void 0 ? _2 : true,
|
|
1786
|
+
showChatHistory: (_3 = showChatHistory !== null && showChatHistory !== void 0 ? showChatHistory : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.showChatHistory) !== null && _3 !== void 0 ? _3 : true,
|
|
1779
1787
|
hasUserActivatedSpeak,
|
|
1780
1788
|
showReload: selectedLayout === 'TOTEM',
|
|
1781
|
-
showClear: (
|
|
1789
|
+
showClear: (_4 = showClear !== null && showClear !== void 0 ? showClear : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.showClear) !== null && _4 !== void 0 ? _4 : false,
|
|
1782
1790
|
clearHistory: () => setHistory(h => h.slice(-1)),
|
|
1783
|
-
showLogin: (
|
|
1791
|
+
showLogin: (_5 = showLogin !== null && showLogin !== void 0 ? showLogin : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.showLogin) !== null && _5 !== void 0 ? _5 : memori.requireLoginToken,
|
|
1784
1792
|
setShowLoginDrawer,
|
|
1785
1793
|
loginToken,
|
|
1786
1794
|
user,
|
|
@@ -1809,7 +1817,7 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1809
1817
|
hasUserActivatedSpeak,
|
|
1810
1818
|
isPlayingAudio: isPlayingAudio &&
|
|
1811
1819
|
!speakerMuted &&
|
|
1812
|
-
((
|
|
1820
|
+
((_6 = enableAudio !== null && enableAudio !== void 0 ? enableAudio : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.enableAudio) !== null && _6 !== void 0 ? _6 : true),
|
|
1813
1821
|
loading: !!memoriTyping,
|
|
1814
1822
|
baseUrl,
|
|
1815
1823
|
apiUrl: client.constants.BACKEND_URL,
|
|
@@ -1846,7 +1854,7 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1846
1854
|
tenant,
|
|
1847
1855
|
translateTo: isMultilanguageEnabled &&
|
|
1848
1856
|
userLang.toUpperCase() !==
|
|
1849
|
-
((
|
|
1857
|
+
((_11 = ((_10 = (_9 = (_8 = (_7 = memori.culture) === null || _7 === void 0 ? void 0 : _7.split('-')) === null || _8 === void 0 ? void 0 : _8[0]) !== null && _9 !== void 0 ? _9 : i18n.language) !== null && _10 !== void 0 ? _10 : 'IT')) === null || _11 === void 0 ? void 0 : _11.toUpperCase())
|
|
1850
1858
|
? userLang
|
|
1851
1859
|
: undefined,
|
|
1852
1860
|
baseUrl,
|
|
@@ -1854,9 +1862,9 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1854
1862
|
layout,
|
|
1855
1863
|
memoriTyping,
|
|
1856
1864
|
typingText,
|
|
1857
|
-
showTypingText: (
|
|
1865
|
+
showTypingText: (_12 = showTypingText !== null && showTypingText !== void 0 ? showTypingText : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.showTypingText) !== null && _12 !== void 0 ? _12 : false,
|
|
1858
1866
|
history: showFullHistory ? history : history.slice(-2),
|
|
1859
|
-
authToken: (
|
|
1867
|
+
authToken: (_14 = (_13 = loginToken !== null && loginToken !== void 0 ? loginToken : userToken) !== null && _13 !== void 0 ? _13 : additionalInfo === null || additionalInfo === void 0 ? void 0 : additionalInfo.loginToken) !== null && _14 !== void 0 ? _14 : authToken,
|
|
1860
1868
|
dialogState: currentDialogState,
|
|
1861
1869
|
pushMessage,
|
|
1862
1870
|
simulateUserPrompt,
|
|
@@ -1866,8 +1874,8 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1866
1874
|
showUpload: enableUpload,
|
|
1867
1875
|
showReasoning: enableReasoning,
|
|
1868
1876
|
showWhyThisAnswer,
|
|
1869
|
-
showCopyButton: (
|
|
1870
|
-
showTranslationOriginal: (
|
|
1877
|
+
showCopyButton: (_15 = showCopyButton !== null && showCopyButton !== void 0 ? showCopyButton : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.showCopyButton) !== null && _15 !== void 0 ? _15 : true,
|
|
1878
|
+
showTranslationOriginal: (_16 = showTranslationOriginal !== null && showTranslationOriginal !== void 0 ? showTranslationOriginal : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.showTranslationOriginal) !== null && _16 !== void 0 ? _16 : false,
|
|
1871
1879
|
client,
|
|
1872
1880
|
instruct,
|
|
1873
1881
|
preview,
|
|
@@ -1877,7 +1885,7 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1877
1885
|
attachmentsMenuOpen,
|
|
1878
1886
|
setAttachmentsMenuOpen,
|
|
1879
1887
|
showInputs,
|
|
1880
|
-
showMicrophone: !!ttsProvider && ((
|
|
1888
|
+
showMicrophone: !!ttsProvider && ((_17 = enableAudio !== null && enableAudio !== void 0 ? enableAudio : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.enableAudio) !== null && _17 !== void 0 ? _17 : true),
|
|
1881
1889
|
showFunctionCache,
|
|
1882
1890
|
userMessage,
|
|
1883
1891
|
onChangeUserMessage,
|
|
@@ -1982,7 +1990,7 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1982
1990
|
}
|
|
1983
1991
|
throw error;
|
|
1984
1992
|
});
|
|
1985
|
-
}, minimumNumberOfRecoveryTokens: (
|
|
1993
|
+
}, minimumNumberOfRecoveryTokens: (_18 = memori === null || memori === void 0 ? void 0 : memori.minimumNumberOfRecoveryTokens) !== null && _18 !== void 0 ? _18 : 1 })), isClient && (_jsx(AgeVerificationModal, { visible: showAgeVerification, minAge: minAge, onClose: birthDate => {
|
|
1986
1994
|
var _a, _b, _c, _d;
|
|
1987
1995
|
if (birthDate) {
|
|
1988
1996
|
setBirthDate(birthDate);
|