@seamly/web-ui 23.0.6-alpha.2 → 23.0.6
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 +14 -6
- 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 +14 -6
- 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 +14 -6
- 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 +14 -6
- 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 +14 -6
- 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 +2 -3
- package/src/javascripts/lib/external-api/index.js +13 -5
package/build/dist/lib/index.js
CHANGED
|
@@ -5865,7 +5865,7 @@ class API {
|
|
|
5865
5865
|
return {
|
|
5866
5866
|
clientName: "@seamly/web-ui",
|
|
5867
5867
|
clientVariant: this.#layoutMode,
|
|
5868
|
-
clientVersion: "23.0.6
|
|
5868
|
+
clientVersion: "23.0.6",
|
|
5869
5869
|
currentUrl: window.location.toString(),
|
|
5870
5870
|
screenResolution: `${window.screen.width}x${window.screen.height}`,
|
|
5871
5871
|
timezone: getTimeZone(),
|
|
@@ -23194,7 +23194,7 @@ class ExternalApi {
|
|
|
23194
23194
|
constructor(appConfig) {
|
|
23195
23195
|
this._waitingActions = [];
|
|
23196
23196
|
this._instances = {};
|
|
23197
|
-
this.
|
|
23197
|
+
this.timeouts = {};
|
|
23198
23198
|
this.appConfig = appConfig;
|
|
23199
23199
|
this.context = {};
|
|
23200
23200
|
}
|
|
@@ -23304,10 +23304,7 @@ class ExternalApi {
|
|
|
23304
23304
|
this._instances[config.namespace] = instance;
|
|
23305
23305
|
// Clear the context after creating the instance, so we do not reuse it for the next
|
|
23306
23306
|
this.context = {};
|
|
23307
|
-
|
|
23308
|
-
this.timeoutId = window.setTimeout(() => {
|
|
23309
|
-
instance.render();
|
|
23310
|
-
}, 60);
|
|
23307
|
+
this.debouncedRender(instance, config.namespace);
|
|
23311
23308
|
}
|
|
23312
23309
|
}
|
|
23313
23310
|
handleDestroy(actionObj) {
|
|
@@ -23334,6 +23331,17 @@ class ExternalApi {
|
|
|
23334
23331
|
createInstance(config) {
|
|
23335
23332
|
return new Engine(config, this);
|
|
23336
23333
|
}
|
|
23334
|
+
|
|
23335
|
+
/**
|
|
23336
|
+
* @param {Engine} instance
|
|
23337
|
+
* @param {string} namespace
|
|
23338
|
+
*/
|
|
23339
|
+
debouncedRender(instance, namespace) {
|
|
23340
|
+
window.clearTimeout(this.timeouts[namespace]);
|
|
23341
|
+
this.timeouts[namespace] = window.setTimeout(() => {
|
|
23342
|
+
instance.render();
|
|
23343
|
+
}, 100);
|
|
23344
|
+
}
|
|
23337
23345
|
destroy(instance) {
|
|
23338
23346
|
if (!instance) {
|
|
23339
23347
|
Object.entries(this._instances).forEach(([namespace, _instance]) => {
|