ozone-free-text-search 6.2.4 → 6.4.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.
|
@@ -66,6 +66,8 @@ export declare class TaktikFreeTextSearch extends Polymer.Element {
|
|
|
66
66
|
_displayAutoComplete(suggestions?: string, isFocus?: boolean): void;
|
|
67
67
|
_appendSelectedItemToSearch(): void;
|
|
68
68
|
_clear(): void;
|
|
69
|
+
private searchTimer?;
|
|
69
70
|
searchValueChange(): void;
|
|
70
71
|
_disabledChange(disabled?: boolean): void;
|
|
72
|
+
disconnectedCallback(): void;
|
|
71
73
|
}
|
|
@@ -180,6 +180,14 @@ let TaktikFreeTextSearch = class TaktikFreeTextSearch extends Polymer.Element {
|
|
|
180
180
|
else {
|
|
181
181
|
this.$.clear.classList.add('hidden');
|
|
182
182
|
}
|
|
183
|
+
if (!this.searchValue) {
|
|
184
|
+
if (this.searchTimer) {
|
|
185
|
+
window.clearTimeout(this.searchTimer);
|
|
186
|
+
}
|
|
187
|
+
this.searchTimer = window.setTimeout(() => {
|
|
188
|
+
this._pressEnter();
|
|
189
|
+
}, 150);
|
|
190
|
+
}
|
|
183
191
|
}
|
|
184
192
|
_disabledChange(disabled) {
|
|
185
193
|
if (disabled) {
|
|
@@ -189,6 +197,13 @@ let TaktikFreeTextSearch = class TaktikFreeTextSearch extends Polymer.Element {
|
|
|
189
197
|
this.$.searchInput.classList.remove('disabled');
|
|
190
198
|
}
|
|
191
199
|
}
|
|
200
|
+
disconnectedCallback() {
|
|
201
|
+
// @ts-ignore: Polymer types are missing disconnectedCallback, but it exists at runtime
|
|
202
|
+
super.disconnectedCallback();
|
|
203
|
+
if (this.searchTimer) {
|
|
204
|
+
window.clearTimeout(this.searchTimer);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
192
207
|
};
|
|
193
208
|
__decorate([
|
|
194
209
|
property({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ozone-free-text-search",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.4.4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"author": "",
|
|
29
29
|
"license": "ISC",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"ozone-config": "^6.
|
|
31
|
+
"ozone-config": "^6.3.0",
|
|
32
32
|
"taktik-polymer-typescript": "^6.2.4"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "98cfc63d3e530ee4d2630f904b34d88df0b1243a"
|
|
35
35
|
}
|
|
@@ -215,14 +215,25 @@ export class TaktikFreeTextSearch extends Polymer.Element {
|
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
_clear(){
|
|
218
|
-
this.set("searchValue", "")
|
|
218
|
+
this.set("searchValue", "")
|
|
219
219
|
}
|
|
220
|
+
|
|
221
|
+
private searchTimer?: any;
|
|
220
222
|
searchValueChange(){
|
|
221
223
|
if(typeof this.searchValue !== "undefined" && this.searchValue.length > 0){
|
|
222
224
|
this.$.clear.classList.remove('hidden')
|
|
223
225
|
} else {
|
|
224
226
|
this.$.clear.classList.add('hidden')
|
|
225
227
|
}
|
|
228
|
+
|
|
229
|
+
if (!this.searchValue) {
|
|
230
|
+
if (this.searchTimer) {
|
|
231
|
+
window.clearTimeout(this.searchTimer)
|
|
232
|
+
}
|
|
233
|
+
this.searchTimer = window.setTimeout(() => {
|
|
234
|
+
this._pressEnter()
|
|
235
|
+
}, 150)
|
|
236
|
+
}
|
|
226
237
|
}
|
|
227
238
|
|
|
228
239
|
_disabledChange(disabled?: boolean){
|
|
@@ -232,4 +243,12 @@ export class TaktikFreeTextSearch extends Polymer.Element {
|
|
|
232
243
|
this.$.searchInput.classList.remove('disabled')
|
|
233
244
|
}
|
|
234
245
|
}
|
|
246
|
+
|
|
247
|
+
disconnectedCallback() {
|
|
248
|
+
// @ts-ignore: Polymer types are missing disconnectedCallback, but it exists at runtime
|
|
249
|
+
super.disconnectedCallback();
|
|
250
|
+
if (this.searchTimer) {
|
|
251
|
+
window.clearTimeout(this.searchTimer)
|
|
252
|
+
}
|
|
253
|
+
}
|
|
235
254
|
}
|
package/test/conf.ozone.json
CHANGED
|
@@ -9,12 +9,8 @@
|
|
|
9
9
|
"item": "/rest/v3/items/item",
|
|
10
10
|
"video": "/rest/v3/items/video",
|
|
11
11
|
"session": "/rest/v3/authentication/current/session",
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"uploadId": "/rest/v2/media/upload/newid",
|
|
15
|
-
"upload": "/upload",
|
|
16
|
-
"uploadComplete": "/rest/v2/media/upload/complete",
|
|
17
|
-
"wait": "/rest/v2/task/wait",
|
|
12
|
+
"wait": "/rest/v3/task/wait",
|
|
13
|
+
"task": "/rest/v3/task",
|
|
18
14
|
"file": "/rest/v3/items/file",
|
|
19
15
|
"blob": "/rest/v3/blob",
|
|
20
16
|
"fileType": "/rest/v3/filetype",
|