@memori.ai/memori-react 8.6.4 → 8.6.6
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 +22 -0
- package/dist/helpers/tts/useTTS.js +93 -87
- package/dist/helpers/tts/useTTS.js.map +1 -1
- package/dist/index.js +12 -13
- package/dist/index.js.map +1 -1
- package/esm/helpers/tts/useTTS.js +93 -87
- package/esm/helpers/tts/useTTS.js.map +1 -1
- package/esm/index.js +12 -13
- package/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/__snapshots__/index.test.tsx.snap +18 -1
- package/src/helpers/tts/useTTS.ts +206 -186
- package/src/index.test.tsx +1 -0
- package/src/index.tsx +13 -17
package/src/index.test.tsx
CHANGED
package/src/index.tsx
CHANGED
|
@@ -269,25 +269,21 @@ const Memori: React.FC<Props> = ({
|
|
|
269
269
|
layoutIntegration?.customData ?? '{}'
|
|
270
270
|
);
|
|
271
271
|
|
|
272
|
-
const whiteListedDomains =
|
|
273
|
-
|
|
272
|
+
const whiteListedDomains = [
|
|
273
|
+
tenant?.name,
|
|
274
|
+
...(tenant?.aliases || []),
|
|
275
|
+
...(layoutIntegrationConfig.whiteListedDomains || []),
|
|
276
|
+
];
|
|
277
|
+
if (layoutIntegrationConfig?.whiteListedDomains?.length) {
|
|
274
278
|
// check if we are client side
|
|
275
279
|
if (typeof window !== 'undefined') {
|
|
276
|
-
//
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
// check if the current domain is in the whiteListedDomains with Regex
|
|
284
|
-
if (
|
|
285
|
-
!whiteListedDomains.some((domain: string) =>
|
|
286
|
-
new RegExp(domain).test(window.location.hostname)
|
|
287
|
-
)
|
|
288
|
-
) {
|
|
289
|
-
return null;
|
|
290
|
-
}
|
|
280
|
+
// check if the current domain is in the whiteListedDomains with Regex
|
|
281
|
+
if (
|
|
282
|
+
!whiteListedDomains.some((domain: string) =>
|
|
283
|
+
new RegExp(domain).test(window.location.hostname)
|
|
284
|
+
)
|
|
285
|
+
) {
|
|
286
|
+
return null;
|
|
291
287
|
}
|
|
292
288
|
}
|
|
293
289
|
}
|