@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
|
@@ -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.6-alpha.
|
|
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,7 +4822,7 @@ class ExternalApi {
|
|
|
4818
4822
|
constructor(appConfig) {
|
|
4819
4823
|
this._waitingActions = [];
|
|
4820
4824
|
this._instances = {};
|
|
4821
|
-
this.
|
|
4825
|
+
this.timeoutId = undefined;
|
|
4822
4826
|
this.appConfig = appConfig;
|
|
4823
4827
|
this.context = {};
|
|
4824
4828
|
}
|
|
@@ -4928,8 +4932,8 @@ class ExternalApi {
|
|
|
4928
4932
|
this._instances[config.namespace] = instance;
|
|
4929
4933
|
// Clear the context after creating the instance, so we do not reuse it for the next
|
|
4930
4934
|
this.context = {};
|
|
4931
|
-
window.clearTimeout(this.
|
|
4932
|
-
this.
|
|
4935
|
+
window.clearTimeout(this.timeoutId);
|
|
4936
|
+
this.timeoutId = window.setTimeout(() => {
|
|
4933
4937
|
instance.render();
|
|
4934
4938
|
}, 60);
|
|
4935
4939
|
}
|