@searchspring/snap-controller 0.53.3 → 0.54.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"AutocompleteController.d.ts","sourceRoot":"","sources":["../../../src/Autocomplete/AutocompleteController.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,YAAY,EAA0B,MAAM,+BAA+B,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,KAAK,EAAE,4BAA4B,EAAkD,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEnJ,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAG1E,eAAO,MAAM,WAAW,MAAM,CAAC;AA2B/B,KAAK,wBAAwB,GAAG;IAC/B,OAAO,EAAE;QACR,KAAK,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;KAC5C,CAAC;CACF,CAAC;AAEF,qBAAa,sBAAuB,SAAQ,kBAAkB;IACtD,IAAI,kBAAgC;IACnC,KAAK,EAAE,iBAAiB,CAAC;IACzB,MAAM,EAAE,4BAA4B,CAAC;IACtC,OAAO,EAAE,YAAY,CAAC;gBAG5B,MAAM,EAAE,4BAA4B,EACpC,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,kBAAkB,EAC1F,OAAO,CAAC,EAAE,gBAAgB;IAsE3B,KAAK,EAAE,wBAAwB,CAO7B;IAEF,IAAI,MAAM,IAAI,wBAAwB,CA0CrC;IAEK,UAAU,CAAC,YAAY,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC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B,MAAM,EAAE,4BAA4B,CAAC;IACtC,OAAO,EAAE,YAAY,CAAC;gBAG5B,MAAM,EAAE,4BAA4B,EACpC,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,kBAAkB,EAC1F,OAAO,CAAC,EAAE,gBAAgB;IAsE3B,KAAK,EAAE,wBAAwB,CAO7B;IAEF,IAAI,MAAM,IAAI,wBAAwB,CA0CrC;IAEK,UAAU,CAAC,YAAY,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IA2BhE,KAAK,IAAI,IAAI;IASb,QAAQ;;0BAEc,aAAa,KAAG,QAAQ,OAAO,GAAG,SAAS,CAAC;wBAkDpD,aAAa,KAAG,IAAI;uBAMrB,UAAU,KAAG,IAAI;4BAQN,MAAM,SAAS,CAAC,gBAAgB,CAAC,KAAG,QAAQ,IAAI,CAAC;mCAgDhD,MAAM,WAAW,CAAC,gBAAgB,CAAC,KAAG,IAAI;uBAqBtD,KAAK;;;;uBAsDL,UAAU,KAAG,IAAI;;MAS5B;IAEF,MAAM,IAAI,IAAI;IAgBR,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IA6E3B,cAAc,QAAa,QAAQ,IAAI,CAAC,CAwBtC;IAEF,MAAM,QAAa,QAAQ,IAAI,CAAC,CAmI9B;CACF"}
@@ -300,26 +300,29 @@ var AutocompleteController = /** @class */ (function (_super) {
300
300
  clearTimeout(_this.handlers.input.timeoutDelay);
301
301
  var trendingResultsEnabled = ((_c = _this.store.trending) === null || _c === void 0 ? void 0 : _c.length) && ((_e = (_d = _this.config.settings) === null || _d === void 0 ? void 0 : _d.trending) === null || _e === void 0 ? void 0 : _e.showResults);
302
302
  var historyResultsEnabled = ((_f = _this.store.history) === null || _f === void 0 ? void 0 : _f.length) && ((_h = (_g = _this.config.settings) === null || _g === void 0 ? void 0 : _g.history) === null || _h === void 0 ? void 0 : _h.showResults);
303
- _this.urlManager.reset().go();
304
- if (!value) {
305
- // there is no input value - reset state of store
306
- _this.store.reset();
307
- // show results for trending or history (if configured) - trending has priority
308
- if (trendingResultsEnabled) {
309
- _this.store.trending[0].preview();
310
- }
311
- else if (historyResultsEnabled) {
312
- _this.store.history[0].preview();
303
+ _this.handlers.input.timeoutDelay = setTimeout(function () {
304
+ if (!value) {
305
+ // there is no input value - reset state of store
306
+ _this.store.reset();
307
+ // show results for trending or history (if configured) - trending has priority
308
+ if (trendingResultsEnabled) {
309
+ _this.store.trending[0].preview();
310
+ }
311
+ else if (historyResultsEnabled) {
312
+ _this.store.history[0].preview();
313
+ }
314
+ else {
315
+ // no input - need to reset URL
316
+ _this.urlManager.reset().go();
317
+ }
313
318
  }
314
- }
315
- else {
316
- // new query in the input - trigger a new search via UrlManager
317
- _this.handlers.input.timeoutDelay = setTimeout(function () {
319
+ else {
320
+ // new query in the input - trigger a new search via UrlManager
318
321
  _this.store.state.locks.terms.unlock();
319
322
  _this.store.state.locks.facets.unlock();
320
323
  _this.urlManager.set({ query: _this.store.state.input }).go();
321
- }, exports.INPUT_DELAY);
322
- }
324
+ }
325
+ }, exports.INPUT_DELAY);
323
326
  },
324
327
  timeoutDelay: undefined,
325
328
  },
@@ -1 +1 @@
1
- {"version":3,"file":"AutocompleteController.d.ts","sourceRoot":"","sources":["../../../src/Autocomplete/AutocompleteController.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,YAAY,EAA0B,MAAM,+BAA+B,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,KAAK,EAAE,4BAA4B,EAAkD,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEnJ,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;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,QAAQ,IAAI,CAAC;mCAgDhD,MAAM,WAAW,CAAC,gBAAgB,CAAC,KAAG,IAAI;uBAqBtD,KAAK;;;;uBAsDL,UAAU,KAAG,IAAI;;MAS5B;IAEF,MAAM,IAAI,IAAI;IAgBR,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IA6E3B,cAAc,QAAa,QAAQ,IAAI,CAAC,CAwBtC;IAEF,MAAM,QAAa,QAAQ,IAAI,CAAC,CAmI9B;CACF"}
@@ -186,26 +186,29 @@ export class AutocompleteController extends AbstractController {
186
186
  clearTimeout(this.handlers.input.timeoutDelay);
187
187
  const trendingResultsEnabled = this.store.trending?.length && this.config.settings?.trending?.showResults;
188
188
  const historyResultsEnabled = this.store.history?.length && this.config.settings?.history?.showResults;
189
- this.urlManager.reset().go();
190
- if (!value) {
191
- // there is no input value - reset state of store
192
- this.store.reset();
193
- // show results for trending or history (if configured) - trending has priority
194
- if (trendingResultsEnabled) {
195
- this.store.trending[0].preview();
196
- }
197
- else if (historyResultsEnabled) {
198
- this.store.history[0].preview();
189
+ this.handlers.input.timeoutDelay = setTimeout(() => {
190
+ if (!value) {
191
+ // there is no input value - reset state of store
192
+ this.store.reset();
193
+ // show results for trending or history (if configured) - trending has priority
194
+ if (trendingResultsEnabled) {
195
+ this.store.trending[0].preview();
196
+ }
197
+ else if (historyResultsEnabled) {
198
+ this.store.history[0].preview();
199
+ }
200
+ else {
201
+ // no input - need to reset URL
202
+ this.urlManager.reset().go();
203
+ }
199
204
  }
200
- }
201
- else {
202
- // new query in the input - trigger a new search via UrlManager
203
- this.handlers.input.timeoutDelay = setTimeout(() => {
205
+ else {
206
+ // new query in the input - trigger a new search via UrlManager
204
207
  this.store.state.locks.terms.unlock();
205
208
  this.store.state.locks.facets.unlock();
206
209
  this.urlManager.set({ query: this.store.state.input }).go();
207
- }, INPUT_DELAY);
208
- }
210
+ }
211
+ }, INPUT_DELAY);
209
212
  },
210
213
  timeoutDelay: undefined,
211
214
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@searchspring/snap-controller",
3
- "version": "0.53.3",
3
+ "version": "0.54.0",
4
4
  "description": "Snap Controllers",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -20,22 +20,22 @@
20
20
  "test:watch": "jest --watch"
21
21
  },
22
22
  "dependencies": {
23
- "@searchspring/snap-toolbox": "^0.53.3",
23
+ "@searchspring/snap-toolbox": "^0.54.0",
24
24
  "css.escape": "1.5.1",
25
25
  "deepmerge": "4.3.1"
26
26
  },
27
27
  "devDependencies": {
28
- "@searchspring/snap-client": "^0.53.3",
29
- "@searchspring/snap-event-manager": "^0.53.3",
30
- "@searchspring/snap-logger": "^0.53.3",
31
- "@searchspring/snap-profiler": "^0.53.3",
32
- "@searchspring/snap-store-mobx": "^0.53.3",
33
- "@searchspring/snap-tracker": "^0.53.3",
34
- "@searchspring/snap-url-manager": "^0.53.3"
28
+ "@searchspring/snap-client": "^0.54.0",
29
+ "@searchspring/snap-event-manager": "^0.54.0",
30
+ "@searchspring/snap-logger": "^0.54.0",
31
+ "@searchspring/snap-profiler": "^0.54.0",
32
+ "@searchspring/snap-store-mobx": "^0.54.0",
33
+ "@searchspring/snap-tracker": "^0.54.0",
34
+ "@searchspring/snap-url-manager": "^0.54.0"
35
35
  },
36
36
  "sideEffects": false,
37
37
  "files": [
38
38
  "dist/**/*"
39
39
  ],
40
- "gitHead": "3712e444511fd9723267c14dd030b8b25b43473a"
40
+ "gitHead": "a54d2c6579bf83500ed2faca8ff72b3e3495f063"
41
41
  }