@fluid-topics/ft-search-context 1.2.48 → 1.2.49
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/registration.js
CHANGED
|
@@ -14,13 +14,10 @@ export class RegisterSearchComponentEvent extends Event {
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
const registerInterval = Symbol("registerInterval");
|
|
17
|
+
const registerAttempts = Symbol("registerAttempts");
|
|
18
|
+
const MAX_REGISTER_ATTEMPTS = 40;
|
|
17
19
|
export function toFtSearchComponent(ReduxClass) {
|
|
18
|
-
var _a;
|
|
19
20
|
class FtSearchComponentClass extends ReduxClass {
|
|
20
|
-
constructor() {
|
|
21
|
-
super(...arguments);
|
|
22
|
-
this[_a] = 0;
|
|
23
|
-
}
|
|
24
21
|
setSearchStateManager(stateManager) {
|
|
25
22
|
this.clearStateManager();
|
|
26
23
|
this.stateManager = stateManager;
|
|
@@ -34,13 +31,15 @@ export function toFtSearchComponent(ReduxClass) {
|
|
|
34
31
|
}
|
|
35
32
|
connectedCallback() {
|
|
36
33
|
super.connectedCallback();
|
|
34
|
+
this[registerAttempts] = 0;
|
|
37
35
|
this[registerInterval] = window.setInterval(() => this.tryToRegisterToContext(), 50);
|
|
38
36
|
}
|
|
39
37
|
tryToRegisterToContext() {
|
|
40
|
-
if (this.stateManager != null) {
|
|
38
|
+
if (this.stateManager != null || this[registerAttempts] > MAX_REGISTER_ATTEMPTS) {
|
|
41
39
|
window.clearInterval(this[registerInterval]);
|
|
42
40
|
}
|
|
43
41
|
else {
|
|
42
|
+
this[registerAttempts]++;
|
|
44
43
|
this.dispatchEvent(new RegisterSearchComponentEvent());
|
|
45
44
|
}
|
|
46
45
|
}
|
|
@@ -49,7 +48,6 @@ export function toFtSearchComponent(ReduxClass) {
|
|
|
49
48
|
this.clearStateManager();
|
|
50
49
|
}
|
|
51
50
|
}
|
|
52
|
-
_a = registerInterval;
|
|
53
51
|
__decorate([
|
|
54
52
|
state()
|
|
55
53
|
], FtSearchComponentClass.prototype, "stateManager", void 0);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-search-context",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.49",
|
|
4
4
|
"description": "Context block for integrated search components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-app-context": "1.2.
|
|
23
|
-
"@fluid-topics/ft-wc-utils": "1.2.
|
|
22
|
+
"@fluid-topics/ft-app-context": "1.2.49",
|
|
23
|
+
"@fluid-topics/ft-wc-utils": "1.2.49",
|
|
24
24
|
"lit": "3.1.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@fluid-topics/public-api": "1.0.89"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "eac6d1d34424e5f5ca7e20068e646caeba2e15a7"
|
|
30
30
|
}
|