@xapp/chat-widget 1.46.5 → 1.47.2
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.css +1 -1
- package/dist/index.es.js +14 -3
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +13 -2
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -31191,7 +31191,13 @@ function memberLeave(state, detail) {
|
|
|
31191
31191
|
|
|
31192
31192
|
function resetReducer(state) {
|
|
31193
31193
|
if (state === void 0) { state = DEFAULT_STATE; }
|
|
31194
|
-
|
|
31194
|
+
// pass through some of the items to persis
|
|
31195
|
+
return __assign(__assign({}, createDefaultState({
|
|
31196
|
+
accessToken: state.accessToken,
|
|
31197
|
+
userId: state.userId,
|
|
31198
|
+
attributes: state.attributes,
|
|
31199
|
+
sessionExpiration: state.sessionExpiration
|
|
31200
|
+
})), { connection: __assign(__assign({}, state.connection), { greetingRequested: false, nonce: uuid_1() }), visitor: state.visitor, visitorId: state.visitorId });
|
|
31195
31201
|
}
|
|
31196
31202
|
|
|
31197
31203
|
// todo: create reducer (requires redux-thunk dependncy)
|
|
@@ -31325,7 +31331,12 @@ function createChatStore(config, dataStorage) {
|
|
|
31325
31331
|
if (dataStorage === void 0) { dataStorage = localStorage; }
|
|
31326
31332
|
var connection = config.connection;
|
|
31327
31333
|
var storage = new BrowserStateStorage(dataStorage, "xappchat.".concat(connection.serverUrl, ".").concat(connection.accountKey));
|
|
31328
|
-
var defaultState = createDefaultState({
|
|
31334
|
+
var defaultState = createDefaultState({
|
|
31335
|
+
accessToken: config.accessToken,
|
|
31336
|
+
userId: config.userId,
|
|
31337
|
+
attributes: config.attributes,
|
|
31338
|
+
sessionExpiration: config.sessionExpiration
|
|
31339
|
+
});
|
|
31329
31340
|
var chatReducer = persistStateReducer(storage, defaultState, storeHandler);
|
|
31330
31341
|
var middlewares = [
|
|
31331
31342
|
thunk__default["default"]
|