@seamly/web-ui 23.0.5 → 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 +18 -10
- 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 +18 -10
- 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 +18 -10
- 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 +18 -10
- 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 +18 -10
- 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 +5 -1
package/build/dist/lib/index.js
CHANGED
|
@@ -5625,6 +5625,8 @@ class API {
|
|
|
5625
5625
|
});
|
|
5626
5626
|
const body = await response.json();
|
|
5627
5627
|
this.#updateUrls(body);
|
|
5628
|
+
// Do not use the socket link from the config endpoint, as this is incomplete and will always fail if used
|
|
5629
|
+
delete this.URLS.socket;
|
|
5628
5630
|
this.configReady = true;
|
|
5629
5631
|
return body.config;
|
|
5630
5632
|
} catch (error) {
|
|
@@ -5693,14 +5695,16 @@ class API {
|
|
|
5693
5695
|
async connect() {
|
|
5694
5696
|
this.connected = false;
|
|
5695
5697
|
const conversationInitialState = await this.#createConversation();
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
|
-
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
|
|
5703
|
-
|
|
5698
|
+
if (this.URLS.socket) {
|
|
5699
|
+
this.conversation.connect(`${this.#getUrlPrefix('ws')}${this.URLS.socket}`, this.#config.context.channelName, this.#getChannelTopic(), this.#getAccessToken());
|
|
5700
|
+
this.conversation.onConnection(({
|
|
5701
|
+
connected,
|
|
5702
|
+
ready
|
|
5703
|
+
}) => {
|
|
5704
|
+
this.connected = connected;
|
|
5705
|
+
this.#ready = ready;
|
|
5706
|
+
});
|
|
5707
|
+
}
|
|
5704
5708
|
return conversationInitialState;
|
|
5705
5709
|
}
|
|
5706
5710
|
uploadFile(file, progressCallback, successCallback, errorCallback) {
|
|
@@ -5861,7 +5865,7 @@ class API {
|
|
|
5861
5865
|
return {
|
|
5862
5866
|
clientName: "@seamly/web-ui",
|
|
5863
5867
|
clientVariant: this.#layoutMode,
|
|
5864
|
-
clientVersion: "23.0.
|
|
5868
|
+
clientVersion: "23.0.6-alpha.2",
|
|
5865
5869
|
currentUrl: window.location.toString(),
|
|
5866
5870
|
screenResolution: `${window.screen.width}x${window.screen.height}`,
|
|
5867
5871
|
timezone: getTimeZone(),
|
|
@@ -23190,6 +23194,7 @@ class ExternalApi {
|
|
|
23190
23194
|
constructor(appConfig) {
|
|
23191
23195
|
this._waitingActions = [];
|
|
23192
23196
|
this._instances = {};
|
|
23197
|
+
this.timeoutId = undefined;
|
|
23193
23198
|
this.appConfig = appConfig;
|
|
23194
23199
|
this.context = {};
|
|
23195
23200
|
}
|
|
@@ -23299,7 +23304,10 @@ class ExternalApi {
|
|
|
23299
23304
|
this._instances[config.namespace] = instance;
|
|
23300
23305
|
// Clear the context after creating the instance, so we do not reuse it for the next
|
|
23301
23306
|
this.context = {};
|
|
23302
|
-
|
|
23307
|
+
window.clearTimeout(this.timeoutId);
|
|
23308
|
+
this.timeoutId = window.setTimeout(() => {
|
|
23309
|
+
instance.render();
|
|
23310
|
+
}, 60);
|
|
23303
23311
|
}
|
|
23304
23312
|
}
|
|
23305
23313
|
handleDestroy(actionObj) {
|