@seamly/web-ui 24.0.0-beta.3 → 24.0.0-beta.5
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/components.js +2 -1
- package/build/dist/lib/components.js.map +1 -1
- package/build/dist/lib/hooks.js +2 -1
- package/build/dist/lib/hooks.js.map +1 -1
- package/build/dist/lib/hooks.min.js +1 -1
- package/build/dist/lib/hooks.min.js.map +1 -1
- package/build/dist/lib/index.debug.js +3 -2
- 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 +3 -2
- 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/build/dist/lib/standalone.js +3 -2
- package/build/dist/lib/standalone.js.map +1 -1
- package/build/dist/lib/standalone.min.js +1 -1
- package/build/dist/lib/standalone.min.js.map +1 -1
- package/build/dist/lib/style-guide.js +4 -3
- package/build/dist/lib/style-guide.js.map +1 -1
- package/build/dist/lib/style-guide.min.js +1 -1
- package/build/dist/lib/style-guide.min.js.map +1 -1
- package/build/dist/lib/utils.js +3 -2
- package/build/dist/lib/utils.js.map +1 -1
- package/build/dist/lib/utils.min.js +1 -1
- package/build/dist/lib/utils.min.js.map +1 -1
- package/package.json +1 -1
- package/src/javascripts/style-guide/components/static-core.tsx +7 -3
- package/src/javascripts/ui/hooks/use-seamly-chat.ts +2 -1
package/package.json
CHANGED
|
@@ -23,7 +23,11 @@ import i18nReducer, {
|
|
|
23
23
|
} from 'domains/i18n/slice'
|
|
24
24
|
import interruptReducer from 'domains/interrupt/slice'
|
|
25
25
|
import stateReducer, { setParticipant } from 'domains/store/slice'
|
|
26
|
-
import {
|
|
26
|
+
import {
|
|
27
|
+
MessageParticipant,
|
|
28
|
+
StoreState,
|
|
29
|
+
ReduxStore,
|
|
30
|
+
} from 'domains/store/store.types'
|
|
27
31
|
import translationReducer from 'domains/translations/slice'
|
|
28
32
|
import visibilityReducer from 'domains/visibility/slice'
|
|
29
33
|
import type API from 'api'
|
|
@@ -43,7 +47,7 @@ const bareApi = {
|
|
|
43
47
|
} satisfies Partial<API>
|
|
44
48
|
|
|
45
49
|
type StaticCoreProps = {
|
|
46
|
-
state:
|
|
50
|
+
state: StoreState & Omit<ReduxStore, 'state' | 'i18n' | 'forms'>
|
|
47
51
|
translations: I18nState['translations']
|
|
48
52
|
participants: MessageParticipant['participant'][]
|
|
49
53
|
}
|
|
@@ -73,7 +77,7 @@ const SeamlyStaticCore: FC<StaticCoreProps> = ({
|
|
|
73
77
|
const {
|
|
74
78
|
translations: initialTranslations,
|
|
75
79
|
interrupt: initialInterrupt,
|
|
76
|
-
config: initialConfig
|
|
80
|
+
config: initialConfig,
|
|
77
81
|
visibility: initialVisibility,
|
|
78
82
|
...initialState
|
|
79
83
|
} = state || {}
|
|
@@ -45,7 +45,8 @@ const useSeamlyChat = () => {
|
|
|
45
45
|
useEffect(() => {
|
|
46
46
|
// This is needed to reset the ref to allow connect and start to happen again.
|
|
47
47
|
// Mostly due to Interrupt situations and a reset being called.
|
|
48
|
-
|
|
48
|
+
// Only do this in case both are `false` (reset does this), because the websocket itself will automatically try to reconnect.
|
|
49
|
+
if (!apiConfigReady && !apiConnected) {
|
|
49
50
|
connectCalled.current = false
|
|
50
51
|
}
|
|
51
52
|
}, [apiConfigReady, apiConnected])
|