@seamly/web-ui 23.0.6-alpha.1 → 23.0.6-alpha.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/build/dist/lib/index.debug.js +16 -12
- 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 +16 -12
- 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 +16 -12
- 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 +16 -12
- 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 +16 -12
- 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 +3 -2
- package/src/javascripts/api/index.ts +14 -10
- package/src/javascripts/lib/external-api/index.js +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seamly/web-ui",
|
|
3
|
-
"version": "23.0.6-alpha.
|
|
3
|
+
"version": "23.0.6-alpha.2",
|
|
4
4
|
"main": "build/dist/lib/index.js",
|
|
5
5
|
"types": "build/src/javascripts/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -126,5 +126,6 @@
|
|
|
126
126
|
"test:e2e": "playwright test",
|
|
127
127
|
"test:e2e:coverage": "yarn nyc report --reporter cobertura --reporter html",
|
|
128
128
|
"prepare": "husky install"
|
|
129
|
-
}
|
|
129
|
+
},
|
|
130
|
+
"packageManager": "yarn@1.22.22"
|
|
130
131
|
}
|
|
@@ -382,6 +382,8 @@ export class API {
|
|
|
382
382
|
)
|
|
383
383
|
const body = await response.json()
|
|
384
384
|
this.#updateUrls(body)
|
|
385
|
+
// Do not use the socket link from the config endpoint, as this is incomplete and will always fail if used
|
|
386
|
+
delete this.URLS.socket
|
|
385
387
|
this.configReady = true
|
|
386
388
|
return body.config
|
|
387
389
|
} catch (error: any) {
|
|
@@ -465,17 +467,19 @@ export class API {
|
|
|
465
467
|
this.connected = false
|
|
466
468
|
const conversationInitialState = await this.#createConversation()
|
|
467
469
|
|
|
468
|
-
this.
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
470
|
+
if (this.URLS.socket) {
|
|
471
|
+
this.conversation.connect(
|
|
472
|
+
`${this.#getUrlPrefix('ws')}${this.URLS.socket}`,
|
|
473
|
+
this.#config.context.channelName,
|
|
474
|
+
this.#getChannelTopic(),
|
|
475
|
+
this.#getAccessToken(),
|
|
476
|
+
)
|
|
474
477
|
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
478
|
+
this.conversation.onConnection(({ connected, ready }) => {
|
|
479
|
+
this.connected = connected
|
|
480
|
+
this.#ready = ready
|
|
481
|
+
})
|
|
482
|
+
}
|
|
479
483
|
|
|
480
484
|
return conversationInitialState
|
|
481
485
|
}
|
|
@@ -12,7 +12,7 @@ class ExternalApi {
|
|
|
12
12
|
constructor(appConfig) {
|
|
13
13
|
this._waitingActions = []
|
|
14
14
|
this._instances = {}
|
|
15
|
-
this.
|
|
15
|
+
this.timeoutId = undefined
|
|
16
16
|
this.appConfig = appConfig
|
|
17
17
|
this.context = {}
|
|
18
18
|
}
|
|
@@ -124,8 +124,8 @@ class ExternalApi {
|
|
|
124
124
|
this._instances[config.namespace] = instance
|
|
125
125
|
// Clear the context after creating the instance, so we do not reuse it for the next
|
|
126
126
|
this.context = {}
|
|
127
|
-
window.clearTimeout(this.
|
|
128
|
-
this.
|
|
127
|
+
window.clearTimeout(this.timeoutId)
|
|
128
|
+
this.timeoutId = window.setTimeout(() => {
|
|
129
129
|
instance.render()
|
|
130
130
|
}, 60)
|
|
131
131
|
}
|