@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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seamly/web-ui",
|
|
3
|
-
"version": "23.0.6
|
|
3
|
+
"version": "23.0.6",
|
|
4
4
|
"main": "build/dist/lib/index.js",
|
|
5
5
|
"types": "build/src/javascripts/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -126,6 +126,5 @@
|
|
|
126
126
|
"test:e2e": "playwright test",
|
|
127
127
|
"test:e2e:coverage": "yarn nyc report --reporter cobertura --reporter html",
|
|
128
128
|
"prepare": "husky install"
|
|
129
|
-
}
|
|
130
|
-
"packageManager": "yarn@1.22.22"
|
|
129
|
+
}
|
|
131
130
|
}
|
|
@@ -12,7 +12,7 @@ class ExternalApi {
|
|
|
12
12
|
constructor(appConfig) {
|
|
13
13
|
this._waitingActions = []
|
|
14
14
|
this._instances = {}
|
|
15
|
-
this.
|
|
15
|
+
this.timeouts = {}
|
|
16
16
|
this.appConfig = appConfig
|
|
17
17
|
this.context = {}
|
|
18
18
|
}
|
|
@@ -124,10 +124,7 @@ class ExternalApi {
|
|
|
124
124
|
this._instances[config.namespace] = instance
|
|
125
125
|
// Clear the context after creating the instance, so we do not reuse it for the next
|
|
126
126
|
this.context = {}
|
|
127
|
-
|
|
128
|
-
this.timeoutId = window.setTimeout(() => {
|
|
129
|
-
instance.render()
|
|
130
|
-
}, 60)
|
|
127
|
+
this.debouncedRender(instance, config.namespace)
|
|
131
128
|
}
|
|
132
129
|
}
|
|
133
130
|
|
|
@@ -161,6 +158,17 @@ class ExternalApi {
|
|
|
161
158
|
return new Engine(config, this)
|
|
162
159
|
}
|
|
163
160
|
|
|
161
|
+
/**
|
|
162
|
+
* @param {Engine} instance
|
|
163
|
+
* @param {string} namespace
|
|
164
|
+
*/
|
|
165
|
+
debouncedRender(instance, namespace) {
|
|
166
|
+
window.clearTimeout(this.timeouts[namespace])
|
|
167
|
+
this.timeouts[namespace] = window.setTimeout(() => {
|
|
168
|
+
instance.render()
|
|
169
|
+
}, 100)
|
|
170
|
+
}
|
|
171
|
+
|
|
164
172
|
destroy(instance) {
|
|
165
173
|
if (!instance) {
|
|
166
174
|
Object.entries(this._instances).forEach(([namespace, _instance]) => {
|