@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
|
@@ -5341,6 +5341,8 @@ class API {
|
|
|
5341
5341
|
});
|
|
5342
5342
|
const body = await response.json();
|
|
5343
5343
|
this.#updateUrls(body);
|
|
5344
|
+
// Do not use the socket link from the config endpoint, as this is incomplete and will always fail if used
|
|
5345
|
+
delete this.URLS.socket;
|
|
5344
5346
|
this.configReady = true;
|
|
5345
5347
|
return body.config;
|
|
5346
5348
|
} catch (error) {
|
|
@@ -5409,14 +5411,16 @@ class API {
|
|
|
5409
5411
|
async connect() {
|
|
5410
5412
|
this.connected = false;
|
|
5411
5413
|
const conversationInitialState = await this.#createConversation();
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5414
|
+
if (this.URLS.socket) {
|
|
5415
|
+
this.conversation.connect(`${this.#getUrlPrefix('ws')}${this.URLS.socket}`, this.#config.context.channelName, this.#getChannelTopic(), this.#getAccessToken());
|
|
5416
|
+
this.conversation.onConnection(({
|
|
5417
|
+
connected,
|
|
5418
|
+
ready
|
|
5419
|
+
}) => {
|
|
5420
|
+
this.connected = connected;
|
|
5421
|
+
this.#ready = ready;
|
|
5422
|
+
});
|
|
5423
|
+
}
|
|
5420
5424
|
return conversationInitialState;
|
|
5421
5425
|
}
|
|
5422
5426
|
uploadFile(file, progressCallback, successCallback, errorCallback) {
|
|
@@ -5577,7 +5581,7 @@ class API {
|
|
|
5577
5581
|
return {
|
|
5578
5582
|
clientName: "@seamly/web-ui",
|
|
5579
5583
|
clientVariant: this.#layoutMode,
|
|
5580
|
-
clientVersion: "23.0.
|
|
5584
|
+
clientVersion: "23.0.6-alpha.2",
|
|
5581
5585
|
currentUrl: window.location.toString(),
|
|
5582
5586
|
screenResolution: `${window.screen.width}x${window.screen.height}`,
|
|
5583
5587
|
timezone: getTimeZone(),
|
|
@@ -22906,6 +22910,7 @@ class ExternalApi {
|
|
|
22906
22910
|
constructor(appConfig) {
|
|
22907
22911
|
this._waitingActions = [];
|
|
22908
22912
|
this._instances = {};
|
|
22913
|
+
this.timeoutId = undefined;
|
|
22909
22914
|
this.appConfig = appConfig;
|
|
22910
22915
|
this.context = {};
|
|
22911
22916
|
}
|
|
@@ -23015,7 +23020,10 @@ class ExternalApi {
|
|
|
23015
23020
|
this._instances[config.namespace] = instance;
|
|
23016
23021
|
// Clear the context after creating the instance, so we do not reuse it for the next
|
|
23017
23022
|
this.context = {};
|
|
23018
|
-
|
|
23023
|
+
window.clearTimeout(this.timeoutId);
|
|
23024
|
+
this.timeoutId = window.setTimeout(() => {
|
|
23025
|
+
instance.render();
|
|
23026
|
+
}, 60);
|
|
23019
23027
|
}
|
|
23020
23028
|
}
|
|
23021
23029
|
handleDestroy(actionObj) {
|