@memori.ai/memori-react 8.35.0 → 8.35.1
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 +7 -0
- package/dist/components/MemoriWidget/MemoriWidget.js +10 -8
- package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/dist/components/MicrophoneButton/MicrophoneButton.css +1 -0
- package/dist/components/PositionPopover/PositionPopover.css +107 -112
- package/dist/components/PositionPopover/PositionPopover.js +17 -17
- package/dist/components/PositionPopover/PositionPopover.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/esm/components/MemoriWidget/MemoriWidget.js +10 -8
- package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/esm/components/MicrophoneButton/MicrophoneButton.css +1 -0
- package/esm/components/PositionPopover/PositionPopover.css +107 -112
- package/esm/components/PositionPopover/PositionPopover.js +19 -19
- package/esm/components/PositionPopover/PositionPopover.js.map +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 +5 -3
- package/src/components/MicrophoneButton/MicrophoneButton.css +1 -0
- package/src/version.ts +1 -1
|
@@ -1,194 +1,189 @@
|
|
|
1
1
|
.memori-position-popover__positioner {
|
|
2
|
-
|
|
2
|
+
z-index: 1300;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
.memori-position-popover__popup {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
0 0 0 1px var(--memori-border-color, rgba(0, 0, 0, 0.08));
|
|
16
|
-
font-size: var(--memori-text-size-base);
|
|
6
|
+
display: flex;
|
|
7
|
+
width: min(22rem, calc(100vw - 2rem));
|
|
8
|
+
max-width: 22rem;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
padding: var(--memori-spacing-md);
|
|
11
|
+
border-radius: var(--memori-radius-box);
|
|
12
|
+
background: var(--memori-secondary-background);
|
|
13
|
+
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 0 0 1px var(--memori-border-color, rgba(0, 0, 0, 0.08));
|
|
14
|
+
font-size: var(--memori-text-size-base);
|
|
17
15
|
}
|
|
18
16
|
|
|
19
17
|
.memori-position-popover__row {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: space-between;
|
|
21
|
+
gap: var(--memori-spacing-md);
|
|
24
22
|
}
|
|
25
23
|
|
|
26
|
-
.memori-position-popover__switch-row {
|
|
24
|
+
/* .memori-position-popover__switch-row {
|
|
27
25
|
margin-bottom: var(--memori-spacing-md);
|
|
28
|
-
}
|
|
26
|
+
} */
|
|
29
27
|
|
|
30
28
|
.memori-position-popover__switch-label {
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
font-weight: 500;
|
|
30
|
+
line-height: var(--memori-text-line-normal);
|
|
33
31
|
}
|
|
34
32
|
|
|
35
33
|
.memori-position-popover__switch {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
34
|
+
position: relative;
|
|
35
|
+
width: 2.5rem;
|
|
36
|
+
height: 1.5rem;
|
|
37
|
+
flex-shrink: 0;
|
|
38
|
+
padding: 0;
|
|
39
|
+
border: none;
|
|
40
|
+
border-radius: 999px;
|
|
41
|
+
background: var(--memori-border-color, #cbd5e0);
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
transition: background 0.15s ease;
|
|
46
44
|
}
|
|
47
45
|
|
|
48
46
|
.memori-position-popover__switch:focus-visible {
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
outline: 2px solid var(--memori-primary, #3182ce);
|
|
48
|
+
outline-offset: 2px;
|
|
51
49
|
}
|
|
52
50
|
|
|
53
51
|
.memori-position-popover__switch--on {
|
|
54
|
-
|
|
52
|
+
background: var(--memori-primary, #3182ce);
|
|
55
53
|
}
|
|
56
54
|
|
|
57
55
|
.memori-position-popover__switch-thumb {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
56
|
+
position: absolute;
|
|
57
|
+
top: 2px;
|
|
58
|
+
left: 2px;
|
|
59
|
+
width: calc(1.5rem - 4px);
|
|
60
|
+
height: calc(1.5rem - 4px);
|
|
61
|
+
border-radius: 50%;
|
|
62
|
+
background: #fff;
|
|
63
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
|
|
64
|
+
transition: transform 0.15s ease;
|
|
67
65
|
}
|
|
68
66
|
|
|
69
67
|
.memori-position-popover__switch--on .memori-position-popover__switch-thumb {
|
|
70
|
-
|
|
68
|
+
transform: translateX(1rem);
|
|
71
69
|
}
|
|
72
70
|
|
|
73
71
|
.memori-position-popover__tag-block {
|
|
74
|
-
|
|
72
|
+
margin-top: var(--memori-spacing-md);
|
|
73
|
+
margin-bottom: var(--memori-spacing-sm);
|
|
75
74
|
}
|
|
76
75
|
|
|
77
76
|
.memori-position-popover__tag {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
77
|
+
display: flex;
|
|
78
|
+
max-width: 100%;
|
|
79
|
+
align-items: center;
|
|
80
|
+
padding: var(--memori-spacing-xs) var(--memori-spacing-sm);
|
|
81
|
+
border-radius: 999px;
|
|
82
|
+
background: var(--memori-main-background);
|
|
83
|
+
gap: var(--memori-spacing-xs);
|
|
85
84
|
}
|
|
86
85
|
|
|
87
|
-
.memori-autocomplete__portal,
|
|
88
|
-
|
|
86
|
+
.memori-autocomplete__portal,
|
|
87
|
+
.memori-autocomplete__positioner {
|
|
88
|
+
z-index: 1301;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
.memori-position-popover__tag--loading {
|
|
92
|
-
|
|
92
|
+
min-height: 2rem;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
.memori-position-popover__tag-text {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
96
|
+
overflow: hidden;
|
|
97
|
+
min-width: 0;
|
|
98
|
+
flex: 1 1 auto;
|
|
99
|
+
font-size: 0.875rem;
|
|
100
|
+
text-overflow: ellipsis;
|
|
101
|
+
white-space: nowrap;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
.memori-position-popover__tag-edit {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
105
|
+
display: inline-flex;
|
|
106
|
+
flex-shrink: 0;
|
|
107
|
+
align-items: center;
|
|
108
|
+
justify-content: center;
|
|
109
|
+
padding: 4px;
|
|
110
|
+
border: none;
|
|
111
|
+
border-radius: var(--memori-radius-box);
|
|
112
|
+
background: transparent;
|
|
113
|
+
color: var(--memori-text-color);
|
|
114
|
+
cursor: pointer;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
.memori-position-popover__tag-edit:hover {
|
|
118
|
-
|
|
118
|
+
background: rgba(0, 0, 0, 0.06);
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
.memori-position-popover__tag-edit:focus-visible {
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
outline: 2px solid var(--memori-primary, #3182ce);
|
|
123
|
+
outline-offset: 2px;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
.memori-position-popover__tag-skeleton {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
rgba(0, 0, 0, 0.12) 37%,
|
|
135
|
-
rgba(0, 0, 0, 0.06) 63%
|
|
136
|
-
);
|
|
137
|
-
background-size: 400% 100%;
|
|
138
|
-
margin-inline: var(--memori-spacing-xs);
|
|
127
|
+
height: 0.65rem;
|
|
128
|
+
flex: 1 1 auto;
|
|
129
|
+
border-radius: 4px;
|
|
130
|
+
animation: memori-position-popover-shimmer 1.2s ease-in-out infinite;
|
|
131
|
+
background: linear-gradient(90deg, rgba(0, 0, 0, 0.06) 25%, rgba(0, 0, 0, 0.12) 37%, rgba(0, 0, 0, 0.06) 63%);
|
|
132
|
+
background-size: 400% 100%;
|
|
133
|
+
margin-inline: var(--memori-spacing-xs);
|
|
139
134
|
}
|
|
140
135
|
|
|
141
136
|
.memori-position-popover__spinner {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
137
|
+
display: inline-block;
|
|
138
|
+
width: 1.125rem;
|
|
139
|
+
height: 1.125rem;
|
|
140
|
+
flex-shrink: 0;
|
|
141
|
+
border: 2px solid var(--memori-border-color, #cbd5e0);
|
|
142
|
+
border-radius: 50%;
|
|
143
|
+
border-top-color: var(--memori-primary, #3182ce);
|
|
144
|
+
animation: memori-position-popover-spin 0.7s linear infinite;
|
|
150
145
|
}
|
|
151
146
|
|
|
152
147
|
.memori-position-popover__autocomplete-wrap {
|
|
153
|
-
|
|
154
|
-
|
|
148
|
+
width: 100%;
|
|
149
|
+
min-width: 0;
|
|
155
150
|
}
|
|
156
151
|
|
|
157
152
|
.memori-position-popover__error {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
153
|
+
margin: 0 0 var(--memori-spacing-sm);
|
|
154
|
+
color: var(--memori-danger, #c53030);
|
|
155
|
+
font-size: 0.875rem;
|
|
156
|
+
line-height: var(--memori-text-line-normal);
|
|
162
157
|
}
|
|
163
158
|
|
|
164
159
|
.memori-position-popover__map {
|
|
165
|
-
|
|
160
|
+
margin-top: var(--memori-spacing-sm);
|
|
166
161
|
}
|
|
167
162
|
|
|
168
163
|
.memori-position-popover__map .memori--venue-widget__map-container {
|
|
169
|
-
|
|
164
|
+
min-height: 140px;
|
|
170
165
|
}
|
|
171
166
|
|
|
172
167
|
.memori-position-popover__map .memori--venue-widget__map {
|
|
173
|
-
|
|
168
|
+
height: 160px;
|
|
174
169
|
}
|
|
175
170
|
|
|
176
171
|
@keyframes memori-position-popover-spin {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
172
|
+
to {
|
|
173
|
+
transform: rotate(360deg);
|
|
174
|
+
}
|
|
180
175
|
}
|
|
181
176
|
|
|
182
177
|
@keyframes memori-position-popover-shimmer {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
178
|
+
0% {
|
|
179
|
+
background-position: 100% 0;
|
|
180
|
+
}
|
|
186
181
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
182
|
+
100% {
|
|
183
|
+
background-position: 0 0;
|
|
184
|
+
}
|
|
190
185
|
}
|
|
191
186
|
|
|
192
187
|
.memori-position-popover__positioner--website-assistant {
|
|
193
|
-
|
|
188
|
+
z-index: 2147483600;
|
|
194
189
|
}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const popover_1 = require("@base-ui/react/popover");
|
|
6
5
|
const ui_1 = require("@memori.ai/ui");
|
|
7
6
|
const lucide_react_1 = require("lucide-react");
|
|
8
7
|
const react_1 = require("react");
|
|
@@ -149,12 +148,7 @@ const PositionPopover = ({ venue, setVenue, open, onOpenChange, triggerClassName
|
|
|
149
148
|
return;
|
|
150
149
|
}
|
|
151
150
|
startGeolocation();
|
|
152
|
-
}, [
|
|
153
|
-
geolocationLoading,
|
|
154
|
-
setVenue,
|
|
155
|
-
sharingActive,
|
|
156
|
-
startGeolocation,
|
|
157
|
-
]);
|
|
151
|
+
}, [geolocationLoading, setVenue, sharingActive, startGeolocation]);
|
|
158
152
|
(0, react_1.useEffect)(() => {
|
|
159
153
|
if (!editingLocation)
|
|
160
154
|
return;
|
|
@@ -177,16 +171,22 @@ const PositionPopover = ({ venue, setVenue, open, onOpenChange, triggerClassName
|
|
|
177
171
|
onOpenChange(nextOpen);
|
|
178
172
|
}, [onOpenChange]);
|
|
179
173
|
const inlineError = permissionDeniedMessage || geocodingError;
|
|
180
|
-
return ((0, jsx_runtime_1.
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
174
|
+
return ((0, jsx_runtime_1.jsx)(ui_1.Popover, { open: open, onOpenChange: handleRootOpenChange, modal: false, placement: "bottom-end", sideOffset: 8, contentClassName: "memori-position-popover__popup", slotProps: {
|
|
175
|
+
trigger: {
|
|
176
|
+
className: triggerClassName,
|
|
177
|
+
render: (props) => ((0, jsx_runtime_1.jsx)(ui_1.Button, { ...props, type: "button", variant: triggerButtonVariant, className: (0, classnames_1.default)('memori-header--button', 'memori-header--button--position', sharingActive && 'memori-header--button--position--active'), "aria-label": triggerAriaLabel, "aria-expanded": open, icon: (0, jsx_runtime_1.jsx)(lucide_react_1.MapPin, { "aria-hidden": true }) })),
|
|
178
|
+
},
|
|
179
|
+
positioner: {
|
|
180
|
+
className: (0, classnames_1.default)('memori-position-popover__positioner', positionerClassName),
|
|
181
|
+
},
|
|
182
|
+
}, content: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "memori-position-popover__row memori-position-popover__switch-row", children: [(0, jsx_runtime_1.jsx)("span", { className: "memori-position-popover__switch-label", children: t('widget.shareLocation') }), (0, jsx_runtime_1.jsx)("button", { type: "button", role: "switch", "aria-checked": sharingActive, "aria-label": String(t('widget.shareLocationAria')), className: (0, classnames_1.default)('memori-position-popover__switch', {
|
|
183
|
+
'memori-position-popover__switch--on': sharingActive,
|
|
184
|
+
}), onClick: toggleSharing, children: (0, jsx_runtime_1.jsx)("span", { className: "memori-position-popover__switch-thumb" }) })] }), (sharingActive || geolocationLoading || editingLocation) && ((0, jsx_runtime_1.jsx)("div", { className: "memori-position-popover__tag-block", children: geolocationLoading ? ((0, jsx_runtime_1.jsxs)("div", { className: "memori-position-popover__tag memori-position-popover__tag--loading", "aria-busy": "true", "aria-live": "polite", children: [(0, jsx_runtime_1.jsx)("span", { className: "memori-position-popover__spinner", "aria-hidden": true }), (0, jsx_runtime_1.jsx)("span", { className: "memori-position-popover__tag-skeleton" })] })) : editingLocation ? ((0, jsx_runtime_1.jsx)("div", { className: "memori-position-popover__autocomplete-wrap", children: (0, jsx_runtime_1.jsx)(VenueWidget_1.VenueCombobox, { venue: venue, query: query, fetching: fetching, suggestions: suggestions, onQueryChange: onQueryChange, onChange: handleAutocompletePick, getPlaceName: VenueWidget_1.getPlaceName, t: t, autocompleteRootId: "memori-position-popover-venue-search", inputRef: autocompleteInputRef }) })) : ((0, jsx_runtime_1.jsxs)("div", { className: "memori-position-popover__tag", children: [(0, jsx_runtime_1.jsx)("span", { className: "memori-position-popover__tag-text", children: ((_a = venue === null || venue === void 0 ? void 0 : venue.placeName) === null || _a === void 0 ? void 0 : _a.trim())
|
|
185
|
+
? venue.placeName
|
|
186
|
+
: t('widget.positionResolving') }), (0, jsx_runtime_1.jsx)(ui_1.Button, { type: "button", variant: "ghost", icon: (0, jsx_runtime_1.jsx)(lucide_react_1.Pencil, { size: 16, strokeWidth: 2, "aria-hidden": true }), size: "sm", className: "memori-position-popover__tag-edit", "aria-label": String(t('widget.editPositionAria')), onClick: () => {
|
|
187
|
+
setEditingLocation(true);
|
|
188
|
+
setPermissionDeniedMessage(null);
|
|
189
|
+
} })] })) })), inlineError && ((0, jsx_runtime_1.jsx)("p", { className: "memori-position-popover__error", role: "alert", children: inlineError })), hasShareableCoords(venue) && !geolocationLoading && ((0, jsx_runtime_1.jsx)("div", { className: "memori-position-popover__map", children: (0, jsx_runtime_1.jsx)(VenueWidget_1.VenueMapPreview, { venue: venue }) }))] }), children: null }));
|
|
190
190
|
};
|
|
191
191
|
exports.default = PositionPopover;
|
|
192
192
|
//# sourceMappingURL=PositionPopover.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PositionPopover.js","sourceRoot":"","sources":["../../../src/components/PositionPopover/PositionPopover.tsx"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"PositionPopover.js","sourceRoot":"","sources":["../../../src/components/PositionPopover/PositionPopover.tsx"],"names":[],"mappings":";;;;AACA,sCAKuB;AACvB,+CAA8C;AAC9C,iCAAwE;AACxE,iDAA+C;AAC/C,+CAA+D;AAC/D,+CAAoD;AACpD,4DAKoC;AACpC,oEAA4B;AAE5B,SAAS,kBAAkB,CAAC,CAAS;IACnC,OAAO,CAAC,CAAC,CAAC,CAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,QAAQ,MAAI,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,SAAS,CAAA,CAAC,CAAC;AACzC,CAAC;AAaD,MAAM,eAAe,GAAmC,CAAC,EACvD,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,YAAY,EACZ,gBAAgB,EAChB,oBAAoB,GAAG,SAAS,EAChC,gBAAgB,EAChB,mBAAmB,GACpB,EAAE,EAAE;;IACH,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,8BAAc,GAAE,CAAC;IAC/B,MAAM,EAAE,GAAG,EAAE,GAAG,IAAA,oBAAe,GAAE,CAAC;IAClC,MAAM,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IACpE,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,IAAA,gBAAQ,EA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AW,IAAI,CACd,8BAAG,SAAS,EAAC,gCAAgC,EAAC,IAAI,EAAC,OAAO,YACvD,WAAW,GACV,CACL,EAEA,kBAAkB,CAAC,KAAK,CAAC,IAAI,CAAC,kBAAkB,IAAI,CACnD,gCAAK,SAAS,EAAC,8BAA8B,YAC3C,uBAAC,6BAAe,IAAC,KAAK,EAAE,KAAK,GAAI,GAC7B,CACP,IACA,YAGJ,IAAI,GACG,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,eAAe,CAAC"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "8.35.
|
|
1
|
+
export declare const version = "8.35.1";
|
package/dist/version.js
CHANGED
|
@@ -1714,15 +1714,17 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1714
1714
|
const showFullHistory = showOnlyLastMessages === undefined
|
|
1715
1715
|
? selectedLayout !== 'TOTEM' && selectedLayout !== 'WEBSITE_ASSISTANT'
|
|
1716
1716
|
: !showOnlyLastMessages;
|
|
1717
|
+
const canShowLoginButton = !(tenant === null || tenant === void 0 ? void 0 : tenant.ssoLogin) &&
|
|
1718
|
+
((_y = showLogin !== null && showLogin !== void 0 ? showLogin : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.showLogin) !== null && _y !== void 0 ? _y : memori.requireLoginToken);
|
|
1717
1719
|
const headerProps = {
|
|
1718
1720
|
memori: {
|
|
1719
1721
|
...memori,
|
|
1720
|
-
ownerUserID: (
|
|
1722
|
+
ownerUserID: (_0 = (_z = memori.ownerUserID) !== null && _z !== void 0 ? _z : ownerUserID) !== null && _0 !== void 0 ? _0 : undefined,
|
|
1721
1723
|
},
|
|
1722
1724
|
apiClient: client,
|
|
1723
1725
|
tenant,
|
|
1724
1726
|
history,
|
|
1725
|
-
showShare: (
|
|
1727
|
+
showShare: (_1 = showShare !== null && showShare !== void 0 ? showShare : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.showShare) !== null && _1 !== void 0 ? _1 : true,
|
|
1726
1728
|
position,
|
|
1727
1729
|
layout: selectedLayout,
|
|
1728
1730
|
additionalSettings,
|
|
@@ -1730,20 +1732,20 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1730
1732
|
setShowSettingsDrawer,
|
|
1731
1733
|
setShowKnownFactsDrawer,
|
|
1732
1734
|
setShowExpertsDrawer,
|
|
1733
|
-
enableAudio: (
|
|
1735
|
+
enableAudio: (_2 = enableAudio !== null && enableAudio !== void 0 ? enableAudio : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.enableAudio) !== null && _2 !== void 0 ? _2 : true,
|
|
1734
1736
|
speakerMuted: speakerMuted !== null && speakerMuted !== void 0 ? speakerMuted : false,
|
|
1735
1737
|
setSpeakerMuted: (mute) => {
|
|
1736
1738
|
toggleMute(mute);
|
|
1737
1739
|
},
|
|
1738
1740
|
setShowChatHistoryDrawer,
|
|
1739
|
-
showSettings: (
|
|
1740
|
-
showChatHistory: (
|
|
1741
|
+
showSettings: (_3 = showSettings !== null && showSettings !== void 0 ? showSettings : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.showSettings) !== null && _3 !== void 0 ? _3 : true,
|
|
1742
|
+
showChatHistory: (_4 = showChatHistory !== null && showChatHistory !== void 0 ? showChatHistory : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.showChatHistory) !== null && _4 !== void 0 ? _4 : true,
|
|
1741
1743
|
showMessageConsumption: enableMessageConsumption,
|
|
1742
1744
|
hasUserActivatedSpeak,
|
|
1743
1745
|
showReload: selectedLayout === 'TOTEM',
|
|
1744
|
-
showClear: (
|
|
1746
|
+
showClear: (_5 = showClear !== null && showClear !== void 0 ? showClear : integrationConfig === null || integrationConfig === void 0 ? void 0 : integrationConfig.showClear) !== null && _5 !== void 0 ? _5 : false,
|
|
1745
1747
|
clearHistory: () => setHistory(h => h.slice(-1)),
|
|
1746
|
-
showLogin:
|
|
1748
|
+
showLogin: canShowLoginButton,
|
|
1747
1749
|
setShowLoginDrawer,
|
|
1748
1750
|
loginToken,
|
|
1749
1751
|
user,
|
|
@@ -1799,7 +1801,7 @@ const MemoriWidget = ({ memori, memoriConfigs, ownerUserID, ownerUserName, tenan
|
|
|
1799
1801
|
isUserLoggedIn: !!loginToken && !!(user === null || user === void 0 ? void 0 : user.userID),
|
|
1800
1802
|
hasInitialSession: !!initialSessionID,
|
|
1801
1803
|
notEnoughCredits: needsCredits && !hasEnoughCredits,
|
|
1802
|
-
showLogin:
|
|
1804
|
+
showLogin: canShowLoginButton,
|
|
1803
1805
|
setShowLoginDrawer,
|
|
1804
1806
|
user,
|
|
1805
1807
|
};
|