@seamly/web-ui 22.3.0-beta.2 → 22.3.0
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 +3 -3
- 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 +28 -27
- 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 +29 -28
- 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 +28 -27
- 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 +28 -27
- 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 +1 -1
- package/src/javascripts/api/conversation-connector.ts +6 -9
- package/src/javascripts/ui/components/core/seamly-event-subscriber.ts +20 -15
package/build/dist/lib/utils.js
CHANGED
|
@@ -11531,12 +11531,14 @@ class ConversationConnector {
|
|
|
11531
11531
|
url: splittedUrl,
|
|
11532
11532
|
params
|
|
11533
11533
|
} = split_url_params(this.url);
|
|
11534
|
-
this.socket
|
|
11535
|
-
|
|
11536
|
-
|
|
11537
|
-
|
|
11538
|
-
|
|
11539
|
-
|
|
11534
|
+
if (!this.socket) {
|
|
11535
|
+
this.socket = new Socket(splittedUrl, {
|
|
11536
|
+
params: Object.assign(Object.assign({}, params), {
|
|
11537
|
+
v: javascripts_config/* apiVersion */.tW
|
|
11538
|
+
})
|
|
11539
|
+
});
|
|
11540
|
+
this.socket.connect();
|
|
11541
|
+
}
|
|
11540
11542
|
this.channel = this.socket.channel(this.channelTopic, {
|
|
11541
11543
|
authorization: `Bearer ${this.accessToken}`,
|
|
11542
11544
|
channelName: this.channelName
|
|
@@ -11601,8 +11603,6 @@ class ConversationConnector {
|
|
|
11601
11603
|
ready: false,
|
|
11602
11604
|
currentState: 'join_channel_erred'
|
|
11603
11605
|
});
|
|
11604
|
-
// @ts-ignore
|
|
11605
|
-
this.channel.socket.disconnect();
|
|
11606
11606
|
}).receive('timeout', () => {
|
|
11607
11607
|
log('[CHANEL][JOIN] Networking issue. Still waiting...');
|
|
11608
11608
|
});
|
|
@@ -11610,10 +11610,7 @@ class ConversationConnector {
|
|
|
11610
11610
|
disconnect() {
|
|
11611
11611
|
var _a;
|
|
11612
11612
|
(_a = this.channel) === null || _a === void 0 ? void 0 : _a.leave().receive('ok', () => {
|
|
11613
|
-
var _a, _b;
|
|
11614
11613
|
log('[CHANNEL][LEAVE] OK');
|
|
11615
|
-
(_a = this.socket) === null || _a === void 0 ? void 0 : _a.remove(this.channel);
|
|
11616
|
-
(_b = this.socket) === null || _b === void 0 ? void 0 : _b.disconnect();
|
|
11617
11614
|
__classPrivateFieldSet(this, _ConversationConnector_connectionListeners, [], "f");
|
|
11618
11615
|
});
|
|
11619
11616
|
}
|
|
@@ -12155,7 +12152,7 @@ _API_ready = new WeakMap(), _API_externalId = new WeakMap(), _API_conversationAu
|
|
|
12155
12152
|
return {
|
|
12156
12153
|
clientName: "@seamly/web-ui",
|
|
12157
12154
|
clientVariant: api_classPrivateFieldGet(this, _API_layoutMode, "f"),
|
|
12158
|
-
clientVersion: "22.3.0
|
|
12155
|
+
clientVersion: "22.3.0",
|
|
12159
12156
|
currentUrl: window.location.toString(),
|
|
12160
12157
|
screenResolution: `${window.screen.width}x${window.screen.height}`,
|
|
12161
12158
|
timezone: getTimeZone(),
|
|
@@ -15267,21 +15264,25 @@ const SeamlyEventSubscriber = () => {
|
|
|
15267
15264
|
}
|
|
15268
15265
|
}, [api, api.connectionInfo, api.conversation.socket, dispatch]);
|
|
15269
15266
|
(0,hooks_.useEffect)(() => {
|
|
15270
|
-
api.conversation.
|
|
15271
|
-
|
|
15272
|
-
|
|
15273
|
-
|
|
15274
|
-
|
|
15275
|
-
|
|
15276
|
-
|
|
15277
|
-
|
|
15278
|
-
|
|
15279
|
-
|
|
15280
|
-
|
|
15281
|
-
|
|
15282
|
-
|
|
15283
|
-
|
|
15284
|
-
|
|
15267
|
+
if (api.connectionInfo && api.conversation.socket) {
|
|
15268
|
+
api.conversation.onConnection(({
|
|
15269
|
+
currentState
|
|
15270
|
+
}) => {
|
|
15271
|
+
if (currentState === 'join_channel_erred') {
|
|
15272
|
+
const seamlyGeneralError = new seamly_general_error/* default */.Z();
|
|
15273
|
+
dispatch((0,interrupt_slice/* setInterrupt */.uc)({
|
|
15274
|
+
name: seamlyGeneralError.name,
|
|
15275
|
+
message: seamlyGeneralError.message,
|
|
15276
|
+
langKey: seamlyGeneralError.langKey,
|
|
15277
|
+
originalEvent: seamlyGeneralError.originalEvent,
|
|
15278
|
+
originalError: seamlyGeneralError.originalError,
|
|
15279
|
+
action: seamlyGeneralError.action
|
|
15280
|
+
}));
|
|
15281
|
+
return true;
|
|
15282
|
+
}
|
|
15283
|
+
return false;
|
|
15284
|
+
});
|
|
15285
|
+
}
|
|
15285
15286
|
}, [api, api.connectionInfo, api.conversation.channel, dispatch]);
|
|
15286
15287
|
(0,hooks_.useEffect)(() => {
|
|
15287
15288
|
if (api.connectionInfo) {
|