@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
package/build/dist/lib/index.js
CHANGED
|
@@ -5715,7 +5715,7 @@ class API {
|
|
|
5715
5715
|
return {
|
|
5716
5716
|
clientName: "@seamly/web-ui",
|
|
5717
5717
|
clientVariant: this.#layoutMode,
|
|
5718
|
-
clientVersion: "25.
|
|
5718
|
+
clientVersion: "25.5.0",
|
|
5719
5719
|
currentUrl: window.location.toString(),
|
|
5720
5720
|
screenResolution: `${window.screen.width}x${window.screen.height}`,
|
|
5721
5721
|
timezone: getTimeZone(),
|
|
@@ -12037,7 +12037,18 @@ const setVisibility = createAsyncThunk('setVisibility', (args, {
|
|
|
12037
12037
|
showContinueChat
|
|
12038
12038
|
};
|
|
12039
12039
|
}
|
|
12040
|
+
const visibility = api.store.get(StoreKey) || {};
|
|
12040
12041
|
if (previousVisibility === calculatedVisibility) {
|
|
12042
|
+
api.store.set(StoreKey, {
|
|
12043
|
+
...visibility,
|
|
12044
|
+
[layoutMode]: requestedVisibility,
|
|
12045
|
+
...(typeof showPreChat !== 'undefined' ? {
|
|
12046
|
+
showPreChat
|
|
12047
|
+
} : {}),
|
|
12048
|
+
...(typeof showContinueChat !== 'undefined' ? {
|
|
12049
|
+
showContinueChat
|
|
12050
|
+
} : {})
|
|
12051
|
+
});
|
|
12041
12052
|
return {
|
|
12042
12053
|
visibility: null,
|
|
12043
12054
|
setInputFocus: args.setInputFocus,
|
|
@@ -12045,12 +12056,17 @@ const setVisibility = createAsyncThunk('setVisibility', (args, {
|
|
|
12045
12056
|
showContinueChat
|
|
12046
12057
|
};
|
|
12047
12058
|
}
|
|
12048
|
-
const visibility = api.store.get(StoreKey);
|
|
12049
12059
|
|
|
12050
12060
|
// Store the user-requested visibility in order to reinitialize after refresh
|
|
12051
12061
|
api.store.set(StoreKey, {
|
|
12052
|
-
...
|
|
12053
|
-
[layoutMode]: requestedVisibility
|
|
12062
|
+
...visibility,
|
|
12063
|
+
[layoutMode]: requestedVisibility,
|
|
12064
|
+
...(typeof showPreChat !== 'undefined' ? {
|
|
12065
|
+
showPreChat
|
|
12066
|
+
} : {}),
|
|
12067
|
+
...(typeof showContinueChat !== 'undefined' ? {
|
|
12068
|
+
showContinueChat
|
|
12069
|
+
} : {})
|
|
12054
12070
|
});
|
|
12055
12071
|
if (requestedVisibility) {
|
|
12056
12072
|
eventBus.emit('ui.visible', requestedVisibility, {
|
|
@@ -12078,12 +12094,19 @@ const initializeVisibility = createAsyncThunk('initialize', async (_, {
|
|
|
12078
12094
|
const {
|
|
12079
12095
|
layoutMode
|
|
12080
12096
|
} = selectConfig(getState());
|
|
12081
|
-
const
|
|
12097
|
+
const storedVisibilitySettings = api.store.get(StoreKey) || {};
|
|
12098
|
+
const storedVisibilityValue = storedVisibilitySettings[layoutMode];
|
|
12099
|
+
const storedVisibility = isPersistedVisibilityState(storedVisibilityValue) ? storedVisibilityValue : visibilityStates.initialize;
|
|
12100
|
+
const storedShowPreChat = storedVisibilitySettings.showPreChat;
|
|
12101
|
+
const storedShowContinueChat = storedVisibilitySettings.showContinueChat;
|
|
12082
12102
|
dispatch(setVisibility({
|
|
12083
|
-
visibility: storedVisibility
|
|
12103
|
+
visibility: storedVisibility,
|
|
12104
|
+
showPreChat: typeof storedShowPreChat === 'boolean' ? storedShowPreChat : undefined,
|
|
12105
|
+
showContinueChat: typeof storedShowContinueChat === 'boolean' ? storedShowContinueChat : undefined
|
|
12084
12106
|
}));
|
|
12085
12107
|
return storedVisibility;
|
|
12086
12108
|
});
|
|
12109
|
+
const isPersistedVisibilityState = value => value === visibilityStates.open || value === visibilityStates.minimized || value === visibilityStates.hidden;
|
|
12087
12110
|
;// ./src/javascripts/core/domains/app/actions.ts
|
|
12088
12111
|
|
|
12089
12112
|
|