@seamly/web-ui 25.4.1-beta → 25.5.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/build/dist/lib/index.debug.js +29 -6
- package/build/dist/lib/index.debug.js.map +1 -1
- package/build/dist/lib/index.debug.min.js +1 -1
- package/build/dist/lib/index.debug.min.js.map +1 -1
- package/build/dist/lib/index.js +29 -6
- package/build/dist/lib/index.js.map +1 -1
- package/build/dist/lib/index.min.js +1 -1
- package/build/dist/lib/index.min.js.map +1 -1
- package/package.json +12 -12
- package/src/javascripts/core/domains/visibility/actions.ts +47 -6
|
@@ -863,7 +863,7 @@ class API {
|
|
|
863
863
|
return {
|
|
864
864
|
clientName: "@seamly/web-ui",
|
|
865
865
|
clientVariant: this.#layoutMode,
|
|
866
|
-
clientVersion: "25.
|
|
866
|
+
clientVersion: "25.5.0",
|
|
867
867
|
currentUrl: window.location.toString(),
|
|
868
868
|
screenResolution: `${window.screen.width}x${window.screen.height}`,
|
|
869
869
|
timezone: (0,_utils__WEBPACK_IMPORTED_MODULE_10__.getTimeZone)(),
|
|
@@ -4442,7 +4442,18 @@ const setVisibility = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_1__.createAsy
|
|
|
4442
4442
|
showContinueChat
|
|
4443
4443
|
};
|
|
4444
4444
|
}
|
|
4445
|
+
const visibility = api.store.get(_constants__WEBPACK_IMPORTED_MODULE_6__.StoreKey) || {};
|
|
4445
4446
|
if (previousVisibility === calculatedVisibility) {
|
|
4447
|
+
api.store.set(_constants__WEBPACK_IMPORTED_MODULE_6__.StoreKey, {
|
|
4448
|
+
...visibility,
|
|
4449
|
+
[layoutMode]: requestedVisibility,
|
|
4450
|
+
...(typeof showPreChat !== 'undefined' ? {
|
|
4451
|
+
showPreChat
|
|
4452
|
+
} : {}),
|
|
4453
|
+
...(typeof showContinueChat !== 'undefined' ? {
|
|
4454
|
+
showContinueChat
|
|
4455
|
+
} : {})
|
|
4456
|
+
});
|
|
4446
4457
|
return {
|
|
4447
4458
|
visibility: null,
|
|
4448
4459
|
setInputFocus: args.setInputFocus,
|
|
@@ -4450,12 +4461,17 @@ const setVisibility = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_1__.createAsy
|
|
|
4450
4461
|
showContinueChat
|
|
4451
4462
|
};
|
|
4452
4463
|
}
|
|
4453
|
-
const visibility = api.store.get(_constants__WEBPACK_IMPORTED_MODULE_6__.StoreKey);
|
|
4454
4464
|
|
|
4455
4465
|
// Store the user-requested visibility in order to reinitialize after refresh
|
|
4456
4466
|
api.store.set(_constants__WEBPACK_IMPORTED_MODULE_6__.StoreKey, {
|
|
4457
|
-
...
|
|
4458
|
-
[layoutMode]: requestedVisibility
|
|
4467
|
+
...visibility,
|
|
4468
|
+
[layoutMode]: requestedVisibility,
|
|
4469
|
+
...(typeof showPreChat !== 'undefined' ? {
|
|
4470
|
+
showPreChat
|
|
4471
|
+
} : {}),
|
|
4472
|
+
...(typeof showContinueChat !== 'undefined' ? {
|
|
4473
|
+
showContinueChat
|
|
4474
|
+
} : {})
|
|
4459
4475
|
});
|
|
4460
4476
|
if (requestedVisibility) {
|
|
4461
4477
|
eventBus.emit('ui.visible', requestedVisibility, {
|
|
@@ -4483,12 +4499,19 @@ const initializeVisibility = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_1__.cr
|
|
|
4483
4499
|
const {
|
|
4484
4500
|
layoutMode
|
|
4485
4501
|
} = domains_config_selectors__WEBPACK_IMPORTED_MODULE_3__.selectConfig(getState());
|
|
4486
|
-
const
|
|
4502
|
+
const storedVisibilitySettings = api.store.get(_constants__WEBPACK_IMPORTED_MODULE_6__.StoreKey) || {};
|
|
4503
|
+
const storedVisibilityValue = storedVisibilitySettings[layoutMode];
|
|
4504
|
+
const storedVisibility = isPersistedVisibilityState(storedVisibilityValue) ? storedVisibilityValue : _constants__WEBPACK_IMPORTED_MODULE_6__.visibilityStates.initialize;
|
|
4505
|
+
const storedShowPreChat = storedVisibilitySettings.showPreChat;
|
|
4506
|
+
const storedShowContinueChat = storedVisibilitySettings.showContinueChat;
|
|
4487
4507
|
dispatch(setVisibility({
|
|
4488
|
-
visibility: storedVisibility
|
|
4508
|
+
visibility: storedVisibility,
|
|
4509
|
+
showPreChat: typeof storedShowPreChat === 'boolean' ? storedShowPreChat : undefined,
|
|
4510
|
+
showContinueChat: typeof storedShowContinueChat === 'boolean' ? storedShowContinueChat : undefined
|
|
4489
4511
|
}));
|
|
4490
4512
|
return storedVisibility;
|
|
4491
4513
|
});
|
|
4514
|
+
const isPersistedVisibilityState = value => value === _constants__WEBPACK_IMPORTED_MODULE_6__.visibilityStates.open || value === _constants__WEBPACK_IMPORTED_MODULE_6__.visibilityStates.minimized || value === _constants__WEBPACK_IMPORTED_MODULE_6__.visibilityStates.hidden;
|
|
4492
4515
|
|
|
4493
4516
|
/***/ },
|
|
4494
4517
|
|