@memori.ai/memori-react 8.19.3 → 8.20.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 +13 -0
- package/README.md +86 -3
- package/dist/components/ContentPreviewModal/ContentPreviewModal.css +0 -1
- package/dist/components/FilePreview/FilePreview.js +4 -1
- package/dist/components/FilePreview/FilePreview.js.map +1 -1
- package/dist/components/MemoriWidget/MemoriWidget.d.ts +2 -1
- package/dist/components/MemoriWidget/MemoriWidget.js +73 -37
- package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/dist/helpers/piiDetection.d.ts +5 -0
- package/dist/helpers/piiDetection.js +42 -0
- package/dist/helpers/piiDetection.js.map +1 -0
- package/dist/types/layout.d.ts +16 -0
- package/dist/types/layout.js +3 -0
- package/dist/types/layout.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/esm/components/ContentPreviewModal/ContentPreviewModal.css +0 -1
- package/esm/components/FilePreview/FilePreview.js +4 -1
- package/esm/components/FilePreview/FilePreview.js.map +1 -1
- package/esm/components/MemoriWidget/MemoriWidget.d.ts +2 -1
- package/esm/components/MemoriWidget/MemoriWidget.js +73 -37
- package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/esm/helpers/piiDetection.d.ts +5 -0
- package/esm/helpers/piiDetection.js +38 -0
- package/esm/helpers/piiDetection.js.map +1 -0
- package/esm/types/layout.d.ts +16 -0
- package/esm/types/layout.js +2 -0
- package/esm/types/layout.js.map +1 -0
- package/esm/version.d.ts +1 -1
- package/esm/version.js +1 -1
- package/package.json +1 -1
- package/src/components/ContentPreviewModal/ContentPreviewModal.css +0 -1
- package/src/components/FilePreview/FilePreview.tsx +4 -1
- package/src/components/MemoriWidget/MemoriWidget.stories.tsx +2 -0
- package/src/components/MemoriWidget/MemoriWidget.tsx +76 -37
- package/src/helpers/piiDetection.test.ts +186 -0
- package/src/helpers/piiDetection.ts +90 -0
- package/src/index.stories.tsx +53 -0
- package/src/types/layout.ts +50 -0
- package/src/version.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
## [8.20.0](https://github.com/memori-ai/memori-react/compare/v8.19.3...v8.20.0) (2026-02-25)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* enhance PII detection with tests ([3edd59e](https://github.com/memori-ai/memori-react/commit/3edd59e93ed796a1562c2595c1e770904f32e187))
|
|
9
|
+
* implement PII detection configuration ([02be73c](https://github.com/memori-ai/memori-react/commit/02be73cc1f62247a331143c1cad60009dc7c24d4))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* update file type display logic in FilePreview ([b7f2935](https://github.com/memori-ai/memori-react/commit/b7f293503bae947fa4a0e9d1e3c00848509b1a85))
|
|
15
|
+
|
|
3
16
|
## [8.19.3](https://github.com/memori-ai/memori-react/compare/v8.19.2...v8.19.3) (2026-02-20)
|
|
4
17
|
|
|
5
18
|
|
package/README.md
CHANGED
|
@@ -94,7 +94,7 @@ const App = () => (
|
|
|
94
94
|
| `defaultSpeakerActive` | | `boolean` | `true` | Default value for the speaker activation |
|
|
95
95
|
| `disableTextEnteredEvents` | | `boolean` | `false` | Disable MemoriTextEntered events listeners for `typeMessage` functions, useful to avoid issues with multiple widgets in page. |
|
|
96
96
|
| `useMathFormatting` | | `boolean` | `false` | Apply math formatting to the messages, defaults to false if otherwise indicated by props or integration config. |
|
|
97
|
-
| `layout` | | `string` | | Layout of the Memori
|
|
97
|
+
| `layout` | | `string` | | Layout of the Memori: `"FULLPAGE"` (default), `"CHAT"`, `"WEBSITE_ASSISTANT"`, `"TOTEM"`, `"HIDDEN_CHAT"`, or `"ZOOMED_FULL_BODY"`. [PII detection](#pii-detection) is only available via integration config, not as a prop. See [Layouts](#layouts). |
|
|
98
98
|
| `customLayout` | | `React.FC<LayoutProps>` | | Custom layout component, see [below](#custom-layout) |
|
|
99
99
|
| `customMediaRenderer` | | `(mimeType: string) => JSX.Element \| null` | | Custom media renderer, see [below](#custom-media-renderer) |
|
|
100
100
|
| `additionalSettings` | | `JSX.Element` | | Custom JSX or component to render within the settings drawer |
|
|
@@ -105,8 +105,91 @@ const App = () => (
|
|
|
105
105
|
|
|
106
106
|
### Layouts
|
|
107
107
|
|
|
108
|
-
The Memori can be displayed in
|
|
109
|
-
If you don't specify a layout, the default
|
|
108
|
+
The Memori can be displayed in six layouts: `FULLPAGE`, `CHAT`, `WEBSITE_ASSISTANT`, `TOTEM`, `HIDDEN_CHAT`, and `ZOOMED_FULL_BODY`.
|
|
109
|
+
If you don't specify a layout (via the `layout` prop or via integration config), the default is `FULLPAGE`.
|
|
110
|
+
|
|
111
|
+
**As a prop** (string only, takes precedence over integration):
|
|
112
|
+
|
|
113
|
+
```tsx
|
|
114
|
+
<Memori layout="FULLPAGE" ... />
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**Via the `integration` prop:** the integration object must have a `customData` string containing JSON. That JSON can include a `layout` field: either a **string** (layout name) or an **object** `{ name: LayoutName, piiDetection?: PiiDetectionConfig }` to enable [PII detection](#pii-detection). Used when you use a public page / landing experience from the backend.
|
|
118
|
+
|
|
119
|
+
```tsx
|
|
120
|
+
// Integration with layout name only
|
|
121
|
+
const integration = {
|
|
122
|
+
integrationID: '...',
|
|
123
|
+
customData: JSON.stringify({
|
|
124
|
+
layout: 'FULLPAGE',
|
|
125
|
+
lang: 'it',
|
|
126
|
+
// ...other integration options
|
|
127
|
+
}),
|
|
128
|
+
};
|
|
129
|
+
<Memori integration={integration} ... />
|
|
130
|
+
|
|
131
|
+
// Integration with layout + PII detection (PII is only configurable here, not as a layout prop)
|
|
132
|
+
const integration = {
|
|
133
|
+
integrationID: '...',
|
|
134
|
+
customData: JSON.stringify({
|
|
135
|
+
layout: {
|
|
136
|
+
name: 'FULLPAGE',
|
|
137
|
+
piiDetection: {
|
|
138
|
+
enabled: true,
|
|
139
|
+
rules: [
|
|
140
|
+
{
|
|
141
|
+
id: 'email',
|
|
142
|
+
label: 'Email',
|
|
143
|
+
pattern: '\\b[A-Za-z0-9._%+\\-]+@[A-Za-z0-9.\\-]+\\.[A-Za-z]{2,}\\b',
|
|
144
|
+
message: { it: 'Contiene email.', en: 'Contains email.' },
|
|
145
|
+
},
|
|
146
|
+
],
|
|
147
|
+
errorMessage: { it: 'Dati sensibili.', en: 'Sensitive data.' },
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
lang: 'it',
|
|
151
|
+
}),
|
|
152
|
+
};
|
|
153
|
+
<Memori integration={integration} ... />
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
If both the `layout` prop and `integration.customData.layout` are provided, the **`layout` prop** (string) wins for the layout name. **PII detection is only read from integration config** (when `customData.layout` is an object with `piiDetection`).
|
|
157
|
+
|
|
158
|
+
#### PII detection
|
|
159
|
+
|
|
160
|
+
PII detection is **only available via integration config**: pass an integration whose `customData` JSON has `layout` as an object with `name` and `piiDetection` (see above). It is not configurable via the `layout` prop.
|
|
161
|
+
|
|
162
|
+
When enabled, the widget checks each message (including attached document text) against the configured regex **rules** before sending. If any rule matches, the message is **not** sent and a single red error bubble is shown with the main `errorMessage` plus the matched rules’ messages, in the chat’s selected language (when `multilingual` is enabled).
|
|
163
|
+
|
|
164
|
+
**Config shape** (inside `integration.customData.layout.piiDetection`):
|
|
165
|
+
|
|
166
|
+
| Field | Type | Description |
|
|
167
|
+
| ----- | ------ | ------------ |
|
|
168
|
+
| `enabled` | `boolean` | When `true`, PII check runs before sending. |
|
|
169
|
+
| `rules` | `array` | List of `{ id, label, pattern, message }`. `pattern` is a regex string; `message` is `{ [lang]: string }` (e.g. `{ it: "...", en: "..." }`). Rules with the same `id` are deduplicated in the error text. |
|
|
170
|
+
| `errorMessage` | `object` | Main line shown in the bubble: `{ [lang]: string }`. |
|
|
171
|
+
|
|
172
|
+
**Example** (inside `customData`):
|
|
173
|
+
|
|
174
|
+
```ts
|
|
175
|
+
layout: {
|
|
176
|
+
name: 'FULLPAGE',
|
|
177
|
+
piiDetection: {
|
|
178
|
+
enabled: true,
|
|
179
|
+
rules: [
|
|
180
|
+
{
|
|
181
|
+
id: 'email',
|
|
182
|
+
label: 'Email',
|
|
183
|
+
pattern: '\\b[A-Za-z0-9._%+\\-]+@[A-Za-z0-9.\\-]+\\.[A-Za-z]{2,}\\b',
|
|
184
|
+
message: { it: 'Contiene email.', en: 'Contains email.' },
|
|
185
|
+
},
|
|
186
|
+
],
|
|
187
|
+
errorMessage: { it: 'Dati sensibili.', en: 'Sensitive data.' },
|
|
188
|
+
},
|
|
189
|
+
}
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Invalid or empty regex patterns are skipped; missing translations fall back to `en` then the first available value.
|
|
110
193
|
|
|
111
194
|
#### FULLPAGE
|
|
112
195
|
|
|
@@ -9,6 +9,7 @@ const Button_1 = tslib_1.__importDefault(require("../ui/Button"));
|
|
|
9
9
|
const ContentPreviewModal_1 = tslib_1.__importDefault(require("../ContentPreviewModal"));
|
|
10
10
|
const Snippet_1 = tslib_1.__importDefault(require("../Snippet/Snippet"));
|
|
11
11
|
const utils_1 = require("../../helpers/utils");
|
|
12
|
+
const MediaItemWidget_utils_1 = require("../MediaWidget/MediaItemWidget.utils");
|
|
12
13
|
const FilePreview = ({ previewFiles, removeFile, allowRemove = true, }) => {
|
|
13
14
|
var _a;
|
|
14
15
|
const [selectedFile, setSelectedFile] = (0, react_1.useState)(null);
|
|
@@ -98,7 +99,9 @@ const FilePreview = ({ previewFiles, removeFile, allowRemove = true, }) => {
|
|
|
98
99
|
};
|
|
99
100
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [previewFiles.length > 0 && ((0, jsx_runtime_1.jsx)("div", { className: "memori--preview-container", children: (0, jsx_runtime_1.jsx)("div", { className: "memori--preview-list", children: previewFiles.map((file) => ((0, jsx_runtime_1.jsxs)("div", { className: `memori--preview-item ${isImageContent(file.content, file.type)
|
|
100
101
|
? 'memori--preview-item--image'
|
|
101
|
-
: 'memori--preview-item--document'}`, onClick: () => setSelectedFile(file), children: [isImageContent(file.content, file.type) ? ((0, jsx_runtime_1.jsx)("div", { className: "memori--preview-thumbnail", children: (0, jsx_runtime_1.jsx)("img", { src: file.content, alt: file.name }) })) : ((0, jsx_runtime_1.jsx)(File_1.default, { className: "memori--preview-icon" })), (0, jsx_runtime_1.jsxs)("div", { className: "memori--preview-file-info", children: [(0, jsx_runtime_1.jsx)("span", { className: "memori--preview-filename", children: file.name }), (0, jsx_runtime_1.jsx)("span", { className: "memori--preview-filetype", children:
|
|
102
|
+
: 'memori--preview-item--document'}`, onClick: () => setSelectedFile(file), children: [isImageContent(file.content, file.type) ? ((0, jsx_runtime_1.jsx)("div", { className: "memori--preview-thumbnail", children: (0, jsx_runtime_1.jsx)("img", { src: file.content, alt: file.name }) })) : ((0, jsx_runtime_1.jsx)(File_1.default, { className: "memori--preview-icon" })), (0, jsx_runtime_1.jsxs)("div", { className: "memori--preview-file-info", children: [(0, jsx_runtime_1.jsx)("span", { className: "memori--preview-filename", children: file.name }), (0, jsx_runtime_1.jsx)("span", { className: "memori--preview-filetype", children: file.mimeType
|
|
103
|
+
? (0, MediaItemWidget_utils_1.getFileExtensionFromMime)(file.mimeType)
|
|
104
|
+
: getFileType(file.name, file.type) })] }), allowRemove && ((0, jsx_runtime_1.jsx)(Button_1.default, { shape: "rounded", icon: (0, jsx_runtime_1.jsx)(Close_1.default, {}), danger: true, className: "memori--remove-button", onClick: e => {
|
|
102
105
|
e.stopPropagation();
|
|
103
106
|
removeFile(file.id, file === null || file === void 0 ? void 0 : file.mediumID);
|
|
104
107
|
} }))] }, file.id))) }) })), (0, jsx_runtime_1.jsx)(ContentPreviewModal_1.default, { open: !!selectedFile, onClose: () => setSelectedFile(null), title: selectedFile === null || selectedFile === void 0 ? void 0 : selectedFile.name, isImage: !!selectedFile &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilePreview.js","sourceRoot":"","sources":["../../../src/components/FilePreview/FilePreview.tsx"],"names":[],"mappings":";;;;AAAA,iCAAmD;AACnD,iEAAiC;AACjC,mEAAuC;AACvC,kEAAkC;AAClC,yFAAyD;AACzD,yEAAyC;AACzC,+CAA6E;
|
|
1
|
+
{"version":3,"file":"FilePreview.js","sourceRoot":"","sources":["../../../src/components/FilePreview/FilePreview.tsx"],"names":[],"mappings":";;;;AAAA,iCAAmD;AACnD,iEAAiC;AACjC,mEAAuC;AACvC,kEAAkC;AAClC,yFAAyD;AACzD,yEAAyC;AACzC,+CAA6E;AAC7E,gFAAgF;AAShF,MAAM,WAAW,GAAG,CAAC,EACnB,YAAY,EACZ,UAAU,EACV,WAAW,GAAG,IAAI,GAEJ,EAAE,EAAE;;IAClB,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,IAAA,gBAAQ,EAKtC,IAAI,CAAC,CAAC;IAEhB,MAAM,WAAW,GAAG,CAAC,QAAgB,EAAE,IAAa,EAAE,EAAE;;QAEtD,IAAI,IAAI,KAAK,OAAO,EAAE;YACpB,MAAM,SAAS,GAAG,MAAA,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,0CAAE,WAAW,EAAE,CAAC;YAC3D,QAAQ,SAAS,EAAE;gBACjB,KAAK,KAAK,CAAC;gBACX,KAAK,MAAM;oBACT,OAAO,MAAM,CAAC;gBAChB,KAAK,KAAK;oBACR,OAAO,KAAK,CAAC;gBACf;oBACE,OAAO,OAAO,CAAC;aAClB;SACF;QAGD,MAAM,SAAS,GAAG,MAAA,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,0CAAE,WAAW,EAAE,CAAC;QAC3D,QAAQ,SAAS,EAAE;YACjB,KAAK,KAAK;gBACR,OAAO,KAAK,CAAC;YACf,KAAK,KAAK;gBACR,OAAO,MA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
import { ArtifactData } from '../MemoriArtifactSystem/types/artifact.types';
|
|
3
|
+
import type { LayoutName } from '../../types/layout';
|
|
3
4
|
import React from 'react';
|
|
4
5
|
import Chat, { Props as ChatProps } from '../Chat/Chat';
|
|
5
6
|
import StartPanel, { Props as StartPanelProps } from '../StartPanel/StartPanel';
|
|
@@ -88,7 +89,7 @@ export interface Props {
|
|
|
88
89
|
memoriLang?: string;
|
|
89
90
|
multilingual?: boolean;
|
|
90
91
|
integration?: Integration;
|
|
91
|
-
layout?:
|
|
92
|
+
layout?: LayoutName;
|
|
92
93
|
customLayout?: React.FC<LayoutProps>;
|
|
93
94
|
showShare?: boolean;
|
|
94
95
|
showCopyButton?: boolean;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const ArtifactAPI_1 = require("../MemoriArtifactSystem/utils/ArtifactAPI");
|
|
6
|
+
const piiDetection_1 = require("../../helpers/piiDetection");
|
|
6
7
|
const react_1 = require("react");
|
|
7
8
|
const react_i18next_1 = require("react-i18next");
|
|
8
9
|
const memori_api_client_1 = tslib_1.__importDefault(require("@memori.ai/memori-api-client"));
|
|
@@ -158,7 +159,7 @@ let audioContext;
|
|
|
158
159
|
let memoriPassword;
|
|
159
160
|
let userToken;
|
|
160
161
|
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, }) => {
|
|
161
|
-
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;
|
|
162
|
+
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;
|
|
162
163
|
const { t, i18n } = (0, react_i18next_1.useTranslation)();
|
|
163
164
|
const [isClient, setIsClient] = (0, react_1.useState)(false);
|
|
164
165
|
(0, react_1.useEffect)(() => {
|
|
@@ -223,8 +224,18 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
223
224
|
const [loading, setLoading] = (0, react_1.useState)(false);
|
|
224
225
|
const [memoriTyping, setMemoriTyping] = (0, react_1.useState)(false);
|
|
225
226
|
const [typingText, setTypingText] = (0, react_1.useState)();
|
|
226
|
-
const
|
|
227
|
-
|
|
227
|
+
const layoutName = typeof layout === 'string'
|
|
228
|
+
? layout
|
|
229
|
+
: typeof (integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.layout) === 'string'
|
|
230
|
+
? integrationConfig.layout
|
|
231
|
+
: (_p = integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.layout) === null || _p === void 0 ? void 0 : _p.name;
|
|
232
|
+
const selectedLayout = layoutName || 'DEFAULT';
|
|
233
|
+
const piiDetection = typeof (integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.layout) === 'object' &&
|
|
234
|
+
(integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.layout) !== null &&
|
|
235
|
+
((_r = (_q = integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.layout) === null || _q === void 0 ? void 0 : _q.piiDetection) === null || _r === void 0 ? void 0 : _r.enabled)
|
|
236
|
+
? integrationConfig.layout.piiDetection
|
|
237
|
+
: undefined;
|
|
238
|
+
const defaultEnableAudio = (_s = enableAudio !== null && enableAudio !== void 0 ? enableAudio : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.enableAudio) !== null && _s !== void 0 ? _s : true;
|
|
228
239
|
const [hasUserActivatedListening, setHasUserActivatedListening] = (0, react_1.useState)(false);
|
|
229
240
|
const [hasUserTypedMessage, setHasUserTypedMessage] = (0, react_1.useState)(false);
|
|
230
241
|
const [showPositionDrawer, setShowPositionDrawer] = (0, react_1.useState)(false);
|
|
@@ -355,6 +366,46 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
355
366
|
((_a = window.getMemoriState()) === null || _a === void 0 ? void 0 : _a.sessionID);
|
|
356
367
|
if (!sessionID || !(text === null || text === void 0 ? void 0 : text.length))
|
|
357
368
|
return;
|
|
369
|
+
let msg = text;
|
|
370
|
+
if (!hidden &&
|
|
371
|
+
translate &&
|
|
372
|
+
isMultilanguageEnabled &&
|
|
373
|
+
userLang.toUpperCase() !== language.toUpperCase()) {
|
|
374
|
+
const translation = await (0, translations_1.getTranslation)(text, language, userLang, baseUrl);
|
|
375
|
+
msg = translation.text;
|
|
376
|
+
}
|
|
377
|
+
const mediaDocuments = media === null || media === void 0 ? void 0 : media.filter(m => { var _a; return m.type === 'document' && ((_a = m.properties) === null || _a === void 0 ? void 0 : _a.isAttachedFile); });
|
|
378
|
+
if (mediaDocuments && mediaDocuments.length > 0) {
|
|
379
|
+
const documentContents = mediaDocuments
|
|
380
|
+
.map(doc => doc.content)
|
|
381
|
+
.join(' ');
|
|
382
|
+
msg = msg + ' ' + documentContents;
|
|
383
|
+
}
|
|
384
|
+
if (piiDetection === null || piiDetection === void 0 ? void 0 : piiDetection.enabled) {
|
|
385
|
+
const piiResult = (0, piiDetection_1.checkPii)(msg, piiDetection, (userLang === null || userLang === void 0 ? void 0 : userLang.toLowerCase()) || 'en');
|
|
386
|
+
if (piiResult.matched && piiResult.errorText) {
|
|
387
|
+
if (!hidden) {
|
|
388
|
+
pushMessage({
|
|
389
|
+
text: text,
|
|
390
|
+
translatedText,
|
|
391
|
+
fromUser: true,
|
|
392
|
+
media: media !== null && media !== void 0 ? media : [],
|
|
393
|
+
initial: sessionId
|
|
394
|
+
? !!newSessionId && newSessionId !== sessionId
|
|
395
|
+
: !!newSessionId,
|
|
396
|
+
});
|
|
397
|
+
}
|
|
398
|
+
pushMessage({
|
|
399
|
+
text: piiResult.errorText,
|
|
400
|
+
emitter: 'system',
|
|
401
|
+
fromUser: false,
|
|
402
|
+
initial: false,
|
|
403
|
+
contextVars: {},
|
|
404
|
+
date: new Date().toISOString(),
|
|
405
|
+
});
|
|
406
|
+
return;
|
|
407
|
+
}
|
|
408
|
+
}
|
|
358
409
|
if (!hidden)
|
|
359
410
|
pushMessage({
|
|
360
411
|
text: text,
|
|
@@ -367,23 +418,8 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
367
418
|
});
|
|
368
419
|
setMemoriTyping(true);
|
|
369
420
|
setTypingText(typingText);
|
|
370
|
-
let msg = text;
|
|
371
421
|
let gotError = false;
|
|
372
422
|
try {
|
|
373
|
-
if (!hidden &&
|
|
374
|
-
translate &&
|
|
375
|
-
isMultilanguageEnabled &&
|
|
376
|
-
userLang.toUpperCase() !== language.toUpperCase()) {
|
|
377
|
-
const translation = await (0, translations_1.getTranslation)(text, language, userLang, baseUrl);
|
|
378
|
-
msg = translation.text;
|
|
379
|
-
}
|
|
380
|
-
const mediaDocuments = media === null || media === void 0 ? void 0 : media.filter(m => { var _a; return m.type === 'document' && ((_a = m.properties) === null || _a === void 0 ? void 0 : _a.isAttachedFile); });
|
|
381
|
-
if (mediaDocuments && mediaDocuments.length > 0) {
|
|
382
|
-
const documentContents = mediaDocuments
|
|
383
|
-
.map(doc => doc.content)
|
|
384
|
-
.join(' ');
|
|
385
|
-
msg = msg + ' ' + documentContents;
|
|
386
|
-
}
|
|
387
423
|
const { currentState, ...response } = await postTextEnteredEvent({
|
|
388
424
|
sessionId: sessionID,
|
|
389
425
|
text: msg,
|
|
@@ -1087,7 +1123,7 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1087
1123
|
apiUrl: `${baseUrl}/api/tts`,
|
|
1088
1124
|
continuousSpeech: continuousSpeech,
|
|
1089
1125
|
preview: preview,
|
|
1090
|
-
}, autoStart, defaultEnableAudio, (
|
|
1126
|
+
}, autoStart, defaultEnableAudio, (_t = defaultSpeakerActive !== null && defaultSpeakerActive !== void 0 ? defaultSpeakerActive : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.defaultSpeakerActive) !== null && _t !== void 0 ? _t : true);
|
|
1091
1127
|
const shouldPlayAudio = (text) => {
|
|
1092
1128
|
const currentSpeakerMuted = (0, configuration_1.getLocalConfig)('muteSpeaker', !defaultEnableAudio);
|
|
1093
1129
|
console.log('[MemoriWidget] shouldPlayAudio', currentSpeakerMuted);
|
|
@@ -1225,7 +1261,7 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1225
1261
|
? {
|
|
1226
1262
|
'--memori-chat-bubble-bg': '#fff',
|
|
1227
1263
|
...(integrationConfig && !instruct
|
|
1228
|
-
? { '--memori-text-color': (
|
|
1264
|
+
? { '--memori-text-color': (_u = integrationConfig.textColor) !== null && _u !== void 0 ? _u : '#000' }
|
|
1229
1265
|
: {}),
|
|
1230
1266
|
...((integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.buttonBgColor)
|
|
1231
1267
|
? {
|
|
@@ -1249,12 +1285,12 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1249
1285
|
? {
|
|
1250
1286
|
'--memori-inner-bg': `rgba(${integrationConfig.innerBgColor === 'dark'
|
|
1251
1287
|
? '0, 0, 0'
|
|
1252
|
-
: '255, 255, 255'}, ${(
|
|
1288
|
+
: '255, 255, 255'}, ${(_v = integrationConfig.innerBgAlpha) !== null && _v !== void 0 ? _v : 0.4})`,
|
|
1253
1289
|
'--memori-inner-content-pad': '1.5rem',
|
|
1254
1290
|
'--memori-nav-bg-image': 'none',
|
|
1255
1291
|
'--memori-nav-bg': `rgba(${integrationConfig.innerBgColor === 'dark'
|
|
1256
1292
|
? '0, 0, 0'
|
|
1257
|
-
: '255, 255, 255'}, ${(
|
|
1293
|
+
: '255, 255, 255'}, ${(_w = integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.innerBgAlpha) !== null && _w !== void 0 ? _w : 0.4})`,
|
|
1258
1294
|
}
|
|
1259
1295
|
: {
|
|
1260
1296
|
'--memori-inner-content-pad': '0px',
|
|
@@ -1722,12 +1758,12 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1722
1758
|
const headerProps = {
|
|
1723
1759
|
memori: {
|
|
1724
1760
|
...memori,
|
|
1725
|
-
ownerUserID: (
|
|
1761
|
+
ownerUserID: (_y = (_x = memori.ownerUserID) !== null && _x !== void 0 ? _x : ownerUserID) !== null && _y !== void 0 ? _y : undefined,
|
|
1726
1762
|
},
|
|
1727
1763
|
apiClient: client,
|
|
1728
1764
|
tenant,
|
|
1729
1765
|
history,
|
|
1730
|
-
showShare: (
|
|
1766
|
+
showShare: (_z = showShare !== null && showShare !== void 0 ? showShare : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.showShare) !== null && _z !== void 0 ? _z : true,
|
|
1731
1767
|
position,
|
|
1732
1768
|
layout: selectedLayout,
|
|
1733
1769
|
additionalSettings,
|
|
@@ -1735,19 +1771,19 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1735
1771
|
setShowSettingsDrawer,
|
|
1736
1772
|
setShowKnownFactsDrawer,
|
|
1737
1773
|
setShowExpertsDrawer,
|
|
1738
|
-
enableAudio: (
|
|
1774
|
+
enableAudio: (_0 = enableAudio !== null && enableAudio !== void 0 ? enableAudio : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.enableAudio) !== null && _0 !== void 0 ? _0 : true,
|
|
1739
1775
|
speakerMuted: speakerMuted !== null && speakerMuted !== void 0 ? speakerMuted : false,
|
|
1740
1776
|
setSpeakerMuted: (mute) => {
|
|
1741
1777
|
toggleMute(mute);
|
|
1742
1778
|
},
|
|
1743
1779
|
setShowChatHistoryDrawer,
|
|
1744
|
-
showSettings: (
|
|
1745
|
-
showChatHistory: (
|
|
1780
|
+
showSettings: (_1 = showSettings !== null && showSettings !== void 0 ? showSettings : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.showSettings) !== null && _1 !== void 0 ? _1 : true,
|
|
1781
|
+
showChatHistory: (_2 = showChatHistory !== null && showChatHistory !== void 0 ? showChatHistory : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.showChatHistory) !== null && _2 !== void 0 ? _2 : true,
|
|
1746
1782
|
hasUserActivatedSpeak,
|
|
1747
1783
|
showReload: selectedLayout === 'TOTEM',
|
|
1748
|
-
showClear: (
|
|
1784
|
+
showClear: (_3 = showClear !== null && showClear !== void 0 ? showClear : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.showClear) !== null && _3 !== void 0 ? _3 : false,
|
|
1749
1785
|
clearHistory: () => setHistory(h => h.slice(-1)),
|
|
1750
|
-
showLogin: (
|
|
1786
|
+
showLogin: (_4 = showLogin !== null && showLogin !== void 0 ? showLogin : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.showLogin) !== null && _4 !== void 0 ? _4 : memori.requireLoginToken,
|
|
1751
1787
|
setShowLoginDrawer,
|
|
1752
1788
|
loginToken,
|
|
1753
1789
|
user,
|
|
@@ -1776,7 +1812,7 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1776
1812
|
hasUserActivatedSpeak,
|
|
1777
1813
|
isPlayingAudio: isPlayingAudio &&
|
|
1778
1814
|
!speakerMuted &&
|
|
1779
|
-
((
|
|
1815
|
+
((_5 = enableAudio !== null && enableAudio !== void 0 ? enableAudio : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.enableAudio) !== null && _5 !== void 0 ? _5 : true),
|
|
1780
1816
|
loading: !!memoriTyping,
|
|
1781
1817
|
baseUrl,
|
|
1782
1818
|
apiUrl: client.constants.BACKEND_URL,
|
|
@@ -1813,7 +1849,7 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1813
1849
|
tenant,
|
|
1814
1850
|
translateTo: isMultilanguageEnabled &&
|
|
1815
1851
|
userLang.toUpperCase() !==
|
|
1816
|
-
((
|
|
1852
|
+
((_10 = ((_9 = (_8 = (_7 = (_6 = memori.culture) === null || _6 === void 0 ? void 0 : _6.split('-')) === null || _7 === void 0 ? void 0 : _7[0]) !== null && _8 !== void 0 ? _8 : i18n.language) !== null && _9 !== void 0 ? _9 : 'IT')) === null || _10 === void 0 ? void 0 : _10.toUpperCase())
|
|
1817
1853
|
? userLang
|
|
1818
1854
|
: undefined,
|
|
1819
1855
|
baseUrl,
|
|
@@ -1821,9 +1857,9 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1821
1857
|
layout,
|
|
1822
1858
|
memoriTyping,
|
|
1823
1859
|
typingText,
|
|
1824
|
-
showTypingText: (
|
|
1860
|
+
showTypingText: (_11 = showTypingText !== null && showTypingText !== void 0 ? showTypingText : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.showTypingText) !== null && _11 !== void 0 ? _11 : false,
|
|
1825
1861
|
history: showFullHistory ? history : history.slice(-2),
|
|
1826
|
-
authToken: (
|
|
1862
|
+
authToken: (_13 = (_12 = loginToken !== null && loginToken !== void 0 ? loginToken : userToken) !== null && _12 !== void 0 ? _12 : additionalInfo === null || additionalInfo === void 0 ? void 0 : additionalInfo.loginToken) !== null && _13 !== void 0 ? _13 : authToken,
|
|
1827
1863
|
dialogState: currentDialogState,
|
|
1828
1864
|
pushMessage,
|
|
1829
1865
|
simulateUserPrompt,
|
|
@@ -1833,8 +1869,8 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1833
1869
|
showUpload: enableUpload,
|
|
1834
1870
|
showReasoning: enableReasoning,
|
|
1835
1871
|
showWhyThisAnswer,
|
|
1836
|
-
showCopyButton: (
|
|
1837
|
-
showTranslationOriginal: (
|
|
1872
|
+
showCopyButton: (_14 = showCopyButton !== null && showCopyButton !== void 0 ? showCopyButton : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.showCopyButton) !== null && _14 !== void 0 ? _14 : true,
|
|
1873
|
+
showTranslationOriginal: (_15 = showTranslationOriginal !== null && showTranslationOriginal !== void 0 ? showTranslationOriginal : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.showTranslationOriginal) !== null && _15 !== void 0 ? _15 : false,
|
|
1838
1874
|
client,
|
|
1839
1875
|
instruct,
|
|
1840
1876
|
preview,
|
|
@@ -1844,7 +1880,7 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1844
1880
|
attachmentsMenuOpen,
|
|
1845
1881
|
setAttachmentsMenuOpen,
|
|
1846
1882
|
showInputs,
|
|
1847
|
-
showMicrophone: !!ttsProvider && ((
|
|
1883
|
+
showMicrophone: !!ttsProvider && ((_16 = enableAudio !== null && enableAudio !== void 0 ? enableAudio : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.enableAudio) !== null && _16 !== void 0 ? _16 : true),
|
|
1848
1884
|
showFunctionCache,
|
|
1849
1885
|
userMessage,
|
|
1850
1886
|
onChangeUserMessage,
|
|
@@ -1949,7 +1985,7 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1949
1985
|
}
|
|
1950
1986
|
throw error;
|
|
1951
1987
|
});
|
|
1952
|
-
}, minimumNumberOfRecoveryTokens: (
|
|
1988
|
+
}, minimumNumberOfRecoveryTokens: (_17 = memori === null || memori === void 0 ? void 0 : memori.minimumNumberOfRecoveryTokens) !== null && _17 !== void 0 ? _17 : 1 })), isClient && ((0, jsx_runtime_1.jsx)(AgeVerificationModal_1.default, { visible: showAgeVerification, minAge: minAge, onClose: birthDate => {
|
|
1953
1989
|
var _a, _b, _c, _d;
|
|
1954
1990
|
if (birthDate) {
|
|
1955
1991
|
setBirthDate(birthDate);
|