@seamly/web-ui 21.0.2-beta.1 → 21.0.2-beta.4
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.js +17 -5
- package/build/dist/lib/index.min.js +1 -1
- package/build/dist/lib/standalone.js +21 -8
- package/build/dist/lib/standalone.min.js +1 -1
- package/build/dist/lib/style-guide.js +23 -17
- package/build/dist/lib/style-guide.min.js +1 -1
- package/build/dist/lib/utils.js +15 -5
- package/build/dist/lib/utils.min.js +1 -1
- package/package.json +1 -1
- package/src/javascripts/api/index.ts +1 -1
- package/src/javascripts/index.ts +1 -0
- package/src/javascripts/lib/external-api/index.js +17 -4
- package/src/javascripts/style-guide/components/static-core.js +8 -11
package/build/dist/lib/index.js
CHANGED
|
@@ -5195,6 +5195,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
5195
5195
|
"SeamlyGeneralError": () => (/* reexport */ SeamlyGeneralError),
|
|
5196
5196
|
"SeamlyLiveRegionContext": () => (/* reexport */ SeamlyLiveRegionContext),
|
|
5197
5197
|
"SeamlyOfflineError": () => (/* reexport */ SeamlyOfflineError),
|
|
5198
|
+
"SeamlyStoreProvider": () => (/* reexport */ components_Provider),
|
|
5198
5199
|
"Text": () => (/* reexport */ event_text),
|
|
5199
5200
|
"View": () => (/* reexport */ view),
|
|
5200
5201
|
"calculateVisibility": () => (/* reexport */ calculateVisibility),
|
|
@@ -7156,7 +7157,7 @@ class API {
|
|
|
7156
7157
|
(_a = this.conversation) === null || _a === void 0 ? void 0 : _a.onConnection(connectionState => {
|
|
7157
7158
|
const connected = connectionState === 'join_channel_succeeded';
|
|
7158
7159
|
const ready = connectionState === 'attach_channel_succeeded';
|
|
7159
|
-
if (
|
|
7160
|
+
if (connected || ready) {
|
|
7160
7161
|
this.send(command, payload, waitForReady);
|
|
7161
7162
|
}
|
|
7162
7163
|
});
|
|
@@ -7254,7 +7255,7 @@ _API_ready = new WeakMap(), _API_externalId = new WeakMap(), _API_layoutMode = n
|
|
|
7254
7255
|
return {
|
|
7255
7256
|
clientName: "@seamly/web-ui",
|
|
7256
7257
|
clientVariant: api_classPrivateFieldGet(this, _API_layoutMode, "f"),
|
|
7257
|
-
clientVersion: "21.0.2-beta.
|
|
7258
|
+
clientVersion: "21.0.2-beta.4",
|
|
7258
7259
|
currentUrl: window.location.toString(),
|
|
7259
7260
|
screenResolution: `${window.screen.width}x${window.screen.height}`,
|
|
7260
7261
|
timezone: getTimeZone(),
|
|
@@ -22008,7 +22009,19 @@ class ExternalApi {
|
|
|
22008
22009
|
}
|
|
22009
22010
|
});
|
|
22010
22011
|
}
|
|
22012
|
+
instanceInitializing(namespace) {
|
|
22013
|
+
const instances = Object.keys(this._instances);
|
|
22014
|
+
return !namespace && instances.length > 0 || instances.includes(namespace);
|
|
22015
|
+
}
|
|
22011
22016
|
setContext(action, args) {
|
|
22017
|
+
const {
|
|
22018
|
+
instance: namespace
|
|
22019
|
+
} = args;
|
|
22020
|
+
// Do not set this action in context if we are already initializing.
|
|
22021
|
+
// If we do, it will not be sent to the server anymore (because it gets marked as 'handled').
|
|
22022
|
+
if (this.instanceInitializing(namespace)) {
|
|
22023
|
+
return false;
|
|
22024
|
+
}
|
|
22012
22025
|
switch (action) {
|
|
22013
22026
|
case 'setTopic':
|
|
22014
22027
|
const {
|
|
@@ -22077,9 +22090,7 @@ class ExternalApi {
|
|
|
22077
22090
|
|
|
22078
22091
|
// results will be an array containing the results of wether an instance has
|
|
22079
22092
|
// handled the action or not
|
|
22080
|
-
const results = instances.map(instance =>
|
|
22081
|
-
return !namespace || instance.namespace === namespace ? instance.execFunction(action, ...args) : false;
|
|
22082
|
-
});
|
|
22093
|
+
const results = instances.map(instance => !namespace || instance.namespace === namespace ? instance.execFunction(action, ...args) : false);
|
|
22083
22094
|
|
|
22084
22095
|
// test if any of the instances has handled the action
|
|
22085
22096
|
return results.some(Boolean);
|
|
@@ -22719,6 +22730,7 @@ const useSeamlyActions = () => {
|
|
|
22719
22730
|
|
|
22720
22731
|
// Used by: StyleGuide
|
|
22721
22732
|
|
|
22733
|
+
|
|
22722
22734
|
// Used by: Client
|
|
22723
22735
|
|
|
22724
22736
|
// Used by: Client
|