@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
|
@@ -674,6 +674,8 @@ class API {
|
|
|
674
674
|
});
|
|
675
675
|
const body = await response.json();
|
|
676
676
|
this.#updateUrls(body);
|
|
677
|
+
// Do not use the socket link from the config endpoint, as this is incomplete and will always fail if used
|
|
678
|
+
delete this.URLS.socket;
|
|
677
679
|
this.configReady = true;
|
|
678
680
|
return body.config;
|
|
679
681
|
} catch (error) {
|
|
@@ -742,14 +744,16 @@ class API {
|
|
|
742
744
|
async connect() {
|
|
743
745
|
this.connected = false;
|
|
744
746
|
const conversationInitialState = await this.#createConversation();
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
747
|
+
if (this.URLS.socket) {
|
|
748
|
+
this.conversation.connect(`${this.#getUrlPrefix('ws')}${this.URLS.socket}`, this.#config.context.channelName, this.#getChannelTopic(), this.#getAccessToken());
|
|
749
|
+
this.conversation.onConnection(({
|
|
750
|
+
connected,
|
|
751
|
+
ready
|
|
752
|
+
}) => {
|
|
753
|
+
this.connected = connected;
|
|
754
|
+
this.#ready = ready;
|
|
755
|
+
});
|
|
756
|
+
}
|
|
753
757
|
return conversationInitialState;
|
|
754
758
|
}
|
|
755
759
|
uploadFile(file, progressCallback, successCallback, errorCallback) {
|
|
@@ -910,7 +914,7 @@ class API {
|
|
|
910
914
|
return {
|
|
911
915
|
clientName: "@seamly/web-ui",
|
|
912
916
|
clientVariant: this.#layoutMode,
|
|
913
|
-
clientVersion: "23.0.
|
|
917
|
+
clientVersion: "23.0.6-alpha.2",
|
|
914
918
|
currentUrl: window.location.toString(),
|
|
915
919
|
screenResolution: `${window.screen.width}x${window.screen.height}`,
|
|
916
920
|
timezone: getTimeZone(),
|
|
@@ -4818,6 +4822,7 @@ class ExternalApi {
|
|
|
4818
4822
|
constructor(appConfig) {
|
|
4819
4823
|
this._waitingActions = [];
|
|
4820
4824
|
this._instances = {};
|
|
4825
|
+
this.timeoutId = undefined;
|
|
4821
4826
|
this.appConfig = appConfig;
|
|
4822
4827
|
this.context = {};
|
|
4823
4828
|
}
|
|
@@ -4927,7 +4932,10 @@ class ExternalApi {
|
|
|
4927
4932
|
this._instances[config.namespace] = instance;
|
|
4928
4933
|
// Clear the context after creating the instance, so we do not reuse it for the next
|
|
4929
4934
|
this.context = {};
|
|
4930
|
-
|
|
4935
|
+
window.clearTimeout(this.timeoutId);
|
|
4936
|
+
this.timeoutId = window.setTimeout(() => {
|
|
4937
|
+
instance.render();
|
|
4938
|
+
}, 60);
|
|
4931
4939
|
}
|
|
4932
4940
|
}
|
|
4933
4941
|
handleDestroy(actionObj) {
|