@searchspring/snap-store-mobx 0.27.6 → 0.28.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.
Files changed (127) hide show
  1. package/dist/cjs/Abstract/AbstractStore.d.ts +3 -4
  2. package/dist/cjs/Abstract/AbstractStore.d.ts.map +1 -1
  3. package/dist/cjs/Abstract/AbstractStore.js +0 -1
  4. package/dist/cjs/Autocomplete/AutocompleteStore.d.ts +8 -7
  5. package/dist/cjs/Autocomplete/AutocompleteStore.d.ts.map +1 -1
  6. package/dist/cjs/Autocomplete/AutocompleteStore.js +17 -16
  7. package/dist/cjs/Autocomplete/Stores/QueryStore.d.ts +3 -3
  8. package/dist/cjs/Autocomplete/Stores/QueryStore.d.ts.map +1 -1
  9. package/dist/cjs/Autocomplete/Stores/QueryStore.js +1 -1
  10. package/dist/cjs/Autocomplete/Stores/StateStore.d.ts +2 -2
  11. package/dist/cjs/Autocomplete/Stores/StateStore.d.ts.map +1 -1
  12. package/dist/cjs/Autocomplete/Stores/StateStore.js +2 -2
  13. package/dist/cjs/Autocomplete/Stores/TermStore.d.ts +1 -1
  14. package/dist/cjs/Autocomplete/Stores/TermStore.d.ts.map +1 -1
  15. package/dist/cjs/Autocomplete/Stores/TrendingStore.d.ts +4 -2
  16. package/dist/cjs/Autocomplete/Stores/TrendingStore.d.ts.map +1 -1
  17. package/dist/cjs/Autocomplete/Stores/TrendingStore.js +2 -2
  18. package/dist/cjs/Finder/FinderStore.d.ts +2 -1
  19. package/dist/cjs/Finder/FinderStore.d.ts.map +1 -1
  20. package/dist/cjs/Finder/FinderStore.js +7 -7
  21. package/dist/cjs/Finder/Stores/SelectionStore.d.ts +43 -4
  22. package/dist/cjs/Finder/Stores/SelectionStore.d.ts.map +1 -1
  23. package/dist/cjs/Finder/Stores/SelectionStore.js +10 -9
  24. package/dist/cjs/Recommendation/RecommendationStore.d.ts +2 -1
  25. package/dist/cjs/Recommendation/RecommendationStore.d.ts.map +1 -1
  26. package/dist/cjs/Recommendation/RecommendationStore.js +4 -4
  27. package/dist/cjs/Recommendation/Stores/ProfileStore.d.ts +2 -1
  28. package/dist/cjs/Recommendation/Stores/ProfileStore.d.ts.map +1 -1
  29. package/dist/cjs/Recommendation/Stores/ProfileStore.js +6 -5
  30. package/dist/cjs/Search/SearchStore.d.ts +3 -3
  31. package/dist/cjs/Search/SearchStore.d.ts.map +1 -1
  32. package/dist/cjs/Search/SearchStore.js +24 -8
  33. package/dist/cjs/Search/Stores/FacetStore.d.ts +70 -1
  34. package/dist/cjs/Search/Stores/FacetStore.d.ts.map +1 -1
  35. package/dist/cjs/Search/Stores/FacetStore.js +36 -30
  36. package/dist/cjs/Search/Stores/FilterStore.d.ts +30 -2
  37. package/dist/cjs/Search/Stores/FilterStore.d.ts.map +1 -1
  38. package/dist/cjs/Search/Stores/FilterStore.js +30 -33
  39. package/dist/cjs/Search/Stores/MerchandisingStore.d.ts +4 -4
  40. package/dist/cjs/Search/Stores/MerchandisingStore.d.ts.map +1 -1
  41. package/dist/cjs/Search/Stores/MerchandisingStore.js +1 -1
  42. package/dist/cjs/Search/Stores/PaginationStore.d.ts +3 -4
  43. package/dist/cjs/Search/Stores/PaginationStore.d.ts.map +1 -1
  44. package/dist/cjs/Search/Stores/PaginationStore.js +2 -1
  45. package/dist/cjs/Search/Stores/QueryStore.d.ts +4 -4
  46. package/dist/cjs/Search/Stores/QueryStore.d.ts.map +1 -1
  47. package/dist/cjs/Search/Stores/ResultStore.d.ts +30 -3
  48. package/dist/cjs/Search/Stores/ResultStore.d.ts.map +1 -1
  49. package/dist/cjs/Search/Stores/ResultStore.js +4 -2
  50. package/dist/cjs/Search/Stores/SortingStore.d.ts +7 -3
  51. package/dist/cjs/Search/Stores/SortingStore.d.ts.map +1 -1
  52. package/dist/cjs/Search/Stores/SortingStore.js +4 -5
  53. package/dist/cjs/Search/Stores/index.d.ts +1 -1
  54. package/dist/cjs/Search/Stores/index.d.ts.map +1 -1
  55. package/dist/cjs/Search/Stores/index.js +2 -1
  56. package/dist/cjs/Storage/StorageStore.d.ts +6 -6
  57. package/dist/cjs/Storage/StorageStore.d.ts.map +1 -1
  58. package/dist/cjs/Storage/StorageStore.js +7 -5
  59. package/dist/cjs/index.d.ts +1 -0
  60. package/dist/cjs/index.d.ts.map +1 -1
  61. package/dist/cjs/index.js +5 -1
  62. package/dist/cjs/types.d.ts +3 -3
  63. package/dist/cjs/types.d.ts.map +1 -1
  64. package/dist/esm/Abstract/AbstractStore.d.ts +3 -4
  65. package/dist/esm/Abstract/AbstractStore.d.ts.map +1 -1
  66. package/dist/esm/Abstract/AbstractStore.js +0 -1
  67. package/dist/esm/Autocomplete/AutocompleteStore.d.ts +8 -7
  68. package/dist/esm/Autocomplete/AutocompleteStore.d.ts.map +1 -1
  69. package/dist/esm/Autocomplete/AutocompleteStore.js +16 -17
  70. package/dist/esm/Autocomplete/Stores/QueryStore.d.ts +3 -3
  71. package/dist/esm/Autocomplete/Stores/QueryStore.d.ts.map +1 -1
  72. package/dist/esm/Autocomplete/Stores/QueryStore.js +1 -1
  73. package/dist/esm/Autocomplete/Stores/StateStore.d.ts +2 -2
  74. package/dist/esm/Autocomplete/Stores/StateStore.d.ts.map +1 -1
  75. package/dist/esm/Autocomplete/Stores/StateStore.js +2 -2
  76. package/dist/esm/Autocomplete/Stores/TermStore.d.ts +1 -1
  77. package/dist/esm/Autocomplete/Stores/TermStore.d.ts.map +1 -1
  78. package/dist/esm/Autocomplete/Stores/TrendingStore.d.ts +4 -2
  79. package/dist/esm/Autocomplete/Stores/TrendingStore.d.ts.map +1 -1
  80. package/dist/esm/Autocomplete/Stores/TrendingStore.js +1 -1
  81. package/dist/esm/Finder/FinderStore.d.ts +2 -1
  82. package/dist/esm/Finder/FinderStore.d.ts.map +1 -1
  83. package/dist/esm/Finder/FinderStore.js +5 -5
  84. package/dist/esm/Finder/Stores/SelectionStore.d.ts +47 -4
  85. package/dist/esm/Finder/Stores/SelectionStore.d.ts.map +1 -1
  86. package/dist/esm/Finder/Stores/SelectionStore.js +8 -8
  87. package/dist/esm/Recommendation/RecommendationStore.d.ts +2 -1
  88. package/dist/esm/Recommendation/RecommendationStore.d.ts.map +1 -1
  89. package/dist/esm/Recommendation/RecommendationStore.js +4 -4
  90. package/dist/esm/Recommendation/Stores/ProfileStore.d.ts +2 -1
  91. package/dist/esm/Recommendation/Stores/ProfileStore.d.ts.map +1 -1
  92. package/dist/esm/Recommendation/Stores/ProfileStore.js +5 -5
  93. package/dist/esm/Search/SearchStore.d.ts +3 -3
  94. package/dist/esm/Search/SearchStore.d.ts.map +1 -1
  95. package/dist/esm/Search/SearchStore.js +24 -9
  96. package/dist/esm/Search/Stores/FacetStore.d.ts +71 -2
  97. package/dist/esm/Search/Stores/FacetStore.d.ts.map +1 -1
  98. package/dist/esm/Search/Stores/FacetStore.js +29 -28
  99. package/dist/esm/Search/Stores/FilterStore.d.ts +31 -3
  100. package/dist/esm/Search/Stores/FilterStore.d.ts.map +1 -1
  101. package/dist/esm/Search/Stores/FilterStore.js +28 -35
  102. package/dist/esm/Search/Stores/MerchandisingStore.d.ts +4 -4
  103. package/dist/esm/Search/Stores/MerchandisingStore.d.ts.map +1 -1
  104. package/dist/esm/Search/Stores/MerchandisingStore.js +1 -1
  105. package/dist/esm/Search/Stores/PaginationStore.d.ts +3 -4
  106. package/dist/esm/Search/Stores/PaginationStore.d.ts.map +1 -1
  107. package/dist/esm/Search/Stores/PaginationStore.js +2 -2
  108. package/dist/esm/Search/Stores/QueryStore.d.ts +4 -4
  109. package/dist/esm/Search/Stores/QueryStore.d.ts.map +1 -1
  110. package/dist/esm/Search/Stores/ResultStore.d.ts +30 -3
  111. package/dist/esm/Search/Stores/ResultStore.d.ts.map +1 -1
  112. package/dist/esm/Search/Stores/ResultStore.js +3 -5
  113. package/dist/esm/Search/Stores/SortingStore.d.ts +7 -3
  114. package/dist/esm/Search/Stores/SortingStore.d.ts.map +1 -1
  115. package/dist/esm/Search/Stores/SortingStore.js +4 -5
  116. package/dist/esm/Search/Stores/index.d.ts +1 -1
  117. package/dist/esm/Search/Stores/index.d.ts.map +1 -1
  118. package/dist/esm/Search/Stores/index.js +1 -1
  119. package/dist/esm/Storage/StorageStore.d.ts +6 -6
  120. package/dist/esm/Storage/StorageStore.d.ts.map +1 -1
  121. package/dist/esm/Storage/StorageStore.js +7 -5
  122. package/dist/esm/index.d.ts +1 -0
  123. package/dist/esm/index.d.ts.map +1 -1
  124. package/dist/esm/index.js +1 -0
  125. package/dist/esm/types.d.ts +3 -3
  126. package/dist/esm/types.d.ts.map +1 -1
  127. package/package.json +6 -5
@@ -1,14 +1,13 @@
1
1
  import type { StoreConfigs, ErrorType } from '../types';
2
2
  export declare abstract class AbstractStore {
3
- protected controller: any;
4
3
  custom: {};
5
4
  loading: boolean;
6
5
  loaded: boolean;
7
6
  error: {
8
7
  code?: number;
9
- type: ErrorType;
10
- message: string;
11
- };
8
+ type?: ErrorType;
9
+ message?: string;
10
+ } | undefined;
12
11
  config: StoreConfigs;
13
12
  constructor(config: StoreConfigs);
14
13
  setConfig(newConfig: StoreConfigs): void;
@@ -1 +1 @@
1
- {"version":3,"file":"AbstractStore.d.ts","sourceRoot":"","sources":["../../../src/Abstract/AbstractStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAOxD,8BAAsB,aAAa;IAClC,SAAS,CAAC,UAAU,MAAC;IACd,MAAM,KAAM;IACZ,OAAO,UAAS;IAChB,MAAM,UAAS;IACf,KAAK,EAAE;QACb,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,SAAS,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;KAChB,CAAC;IACK,MAAM,EAAE,YAAY,CAAC;gBAEhB,MAAM,EAAE,YAAY;IAUhC,SAAS,CAAC,SAAS,EAAE,YAAY,GAAG,IAAI;IAIxC,QAAQ,CAAC,MAAM,CAAC,IAAI,KAAA,GAAG,IAAI;IAE3B,MAAM,CAAC,KAAK,OAAO;CAInB"}
1
+ {"version":3,"file":"AbstractStore.d.ts","sourceRoot":"","sources":["../../../src/Abstract/AbstractStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAMxD,8BAAsB,aAAa;IAC3B,MAAM,KAAM;IACZ,OAAO,UAAS;IAChB,MAAM,UAAS;IACf,KAAK,EACT;QACA,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,SAAS,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;KAChB,GACD,SAAS,CAAC;IACN,MAAM,EAAE,YAAY,CAAC;gBAEhB,MAAM,EAAE,YAAY;IAUhC,SAAS,CAAC,SAAS,EAAE,YAAY,GAAG,IAAI;IAIxC,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,GAAG,IAAI;IAEhC,MAAM,CAAC,KAAK,OAAO;CAInB"}
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AbstractStore = void 0;
4
4
  var mobx_1 = require("mobx");
5
5
  (0, mobx_1.configure)({
6
- // useProxies: "never", // for IE 11 (es5) support
7
6
  enforceActions: 'never',
8
7
  });
9
8
  var AbstractStore = /** @class */ (function () {
@@ -1,11 +1,12 @@
1
- import type { AutocompleteResponseModel, MetaResponseModel } from '@searchspring/snapi-types';
1
+ import { UrlManager } from '@searchspring/snap-url-manager';
2
2
  import { AbstractStore } from '../Abstract/AbstractStore';
3
3
  import { FilterStore, ResultStore, MerchandisingStore, PaginationStore, SortingStore } from '../Search/Stores';
4
4
  import { StorageStore } from '../Storage/StorageStore';
5
- import type { AutocompleteStoreConfig, StoreServices } from '../types';
6
5
  import { StateStore, TermStore, QueryStore, FacetStore, TrendingStore } from './Stores';
6
+ import type { AutocompleteResponseModel, MetaResponseModel } from '@searchspring/snapi-types';
7
+ import type { TrendingResponseModel } from '@searchspring/snap-client';
8
+ import type { AutocompleteStoreConfig, StoreServices } from '../types';
7
9
  export declare class AutocompleteStore extends AbstractStore {
8
- config: AutocompleteStoreConfig;
9
10
  services: StoreServices;
10
11
  meta: MetaResponseModel;
11
12
  merchandising: MerchandisingStore;
@@ -23,10 +24,10 @@ export declare class AutocompleteStore extends AbstractStore {
23
24
  reset(): void;
24
25
  resetTrending(): void;
25
26
  resetTerms(): void;
26
- setService(name: any, service: any): void;
27
- updateTrendingTerms(data: any): void;
28
- update(data: AutocompleteResponseModel & {
29
- meta: MetaResponseModel;
27
+ setService(name: keyof StoreServices, service: UrlManager): void;
28
+ updateTrendingTerms(data: TrendingResponseModel): void;
29
+ update(data?: AutocompleteResponseModel & {
30
+ meta?: MetaResponseModel;
30
31
  }): void;
31
32
  }
32
33
  //# sourceMappingURL=AutocompleteStore.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AutocompleteStore.d.ts","sourceRoot":"","sources":["../../../src/Autocomplete/AutocompleteStore.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9F,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC/G,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,KAAK,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEvE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACxF,qBAAa,iBAAkB,SAAQ,aAAa;IACnD,MAAM,EAAE,uBAAuB,CAAC;IAChC,QAAQ,EAAE,aAAa,CAAC;IACxB,IAAI,EAAE,iBAAiB,CAAM;IAE7B,aAAa,EAA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A2B,CAAC;AACvE,OAAO,KAAK,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEvE,qBAAa,iBAAkB,SAAQ,aAAa;IAC5C,QAAQ,EAAE,aAAa,CAAC;IACxB,IAAI,EAAG,iBAAiB,CAAC;IACzB,aAAa,EAAG,kBAAkB,CAAC;IACnC,MAAM,EAAG,UAAU,CAAC;IACpB,KAAK,EAAG,SAAS,CAAC;IAClB,MAAM,EAAG,UAAU,CAAC;IACpB,OAAO,EAAG,WAAW,CAAC;IACtB,OAAO,EAAG,WAAW,CAAC;IACtB,UAAU,EAAG,eAAe,CAAC;IAC7B,OAAO,EAAG,YAAY,CAAC;IACvB,KAAK,EAAE,UAAU,CAAC;IAClB,OAAO,EAAE,YAAY,CAAC;IACtB,QAAQ,EAAE,aAAa,CAAC;gBAEnB,MAAM,EAAE,uBAAuB,EAAE,QAAQ,EAAE,aAAa;IA4B7D,KAAK,IAAI,IAAI;IAMb,aAAa,IAAI,IAAI;IAQrB,UAAU,IAAI,IAAI;IAMlB,UAAU,CAAC,IAAI,EAAE,MAAM,aAAa,EAAE,OAAO,EAAE,UAAU,GAAG,IAAI;IAShE,mBAAmB,CAAC,IAAI,EAAE,qBAAqB,GAAG,IAAI;IAWtD,MAAM,CAAC,IAAI,GAAE,yBAAyB,GAAG;QAAE,IAAI,CAAC,EAAE,iBAAiB,CAAA;KAAO,GAAG,IAAI;CA+CxF"}
@@ -27,7 +27,6 @@ var AutocompleteStore = /** @class */ (function (_super) {
27
27
  var _this = this;
28
28
  var _a;
29
29
  _this = _super.call(this, config) || this;
30
- _this.meta = {};
31
30
  if (typeof services != 'object' || typeof ((_a = services.urlManager) === null || _a === void 0 ? void 0 : _a.subscribe) != 'function') {
32
31
  throw new Error("Invalid service 'urlManager' passed to AutocompleteStore. Missing \"subscribe\" function.");
33
32
  }
@@ -51,7 +50,7 @@ var AutocompleteStore = /** @class */ (function (_super) {
51
50
  }
52
51
  AutocompleteStore.prototype.reset = function () {
53
52
  this.state.reset();
54
- this.update({ meta: this.meta });
53
+ this.update();
55
54
  this.resetTrending();
56
55
  };
57
56
  AutocompleteStore.prototype.resetTrending = function () {
@@ -64,11 +63,9 @@ var AutocompleteStore = /** @class */ (function (_super) {
64
63
  };
65
64
  AutocompleteStore.prototype.resetTerms = function () {
66
65
  var _a;
67
- if (((_a = this.terms) === null || _a === void 0 ? void 0 : _a.length) > 0) {
68
- this.terms.forEach(function (term) {
69
- term.active = false;
70
- });
71
- }
66
+ (_a = this.terms) === null || _a === void 0 ? void 0 : _a.forEach(function (term) {
67
+ term.active = false;
68
+ });
72
69
  };
73
70
  AutocompleteStore.prototype.setService = function (name, service) {
74
71
  if (this.services[name] && service) {
@@ -80,42 +77,46 @@ var AutocompleteStore = /** @class */ (function (_super) {
80
77
  };
81
78
  AutocompleteStore.prototype.updateTrendingTerms = function (data) {
82
79
  var _this = this;
83
- this.trending = new Stores_2.TrendingStore(this.services, data.trending, function () {
80
+ this.trending = new Stores_2.TrendingStore(this.services, data, function () {
84
81
  _this.resetTerms();
85
82
  }, this.state);
86
83
  };
87
84
  AutocompleteStore.prototype.update = function (data) {
88
85
  var _this = this;
86
+ var _a;
87
+ if (data === void 0) { data = {}; }
88
+ if (!data)
89
+ return;
89
90
  this.error = undefined;
90
91
  this.loaded = !!data.pagination;
91
- this.meta = data.meta;
92
+ this.meta = data.meta || {};
92
93
  // set the query to match the actual queried term and not the input query
93
94
  if (data.search) {
94
95
  this.state.url = this.services.urlManager = this.services.urlManager.set('query', data.search.query);
95
96
  }
96
97
  // only run if we want to update the terms (not locked)
97
98
  if (!this.state.locks.terms.locked) {
98
- this.terms = new Stores_2.TermStore(this.services, data.autocomplete, data.pagination, function () {
99
+ this.terms = new Stores_2.TermStore(this.services, data.autocomplete || {}, data.pagination || {}, function () {
99
100
  _this.resetTrending();
100
101
  }, this.state);
101
102
  // only lock if there was data
102
103
  data.autocomplete && this.state.locks.terms.lock();
103
104
  }
104
- this.merchandising = new Stores_1.MerchandisingStore(this.services, data.merchandising);
105
- this.search = new Stores_2.QueryStore(this.services, data.autocomplete, data.search);
105
+ this.merchandising = new Stores_1.MerchandisingStore(this.services, data.merchandising || {});
106
+ this.search = new Stores_2.QueryStore(this.services, data.autocomplete || {}, data.search || {});
106
107
  // only run if we want to update the facets (not locked)
107
108
  if (!this.state.locks.facets.locked) {
108
- this.facets = new Stores_2.FacetStore(this.config, this.services, this.storage, data.facets, data.pagination, this.meta, this.state);
109
+ this.facets = new Stores_2.FacetStore(this.config, this.services, this.storage, data.facets || [], data.pagination || {}, this.meta, this.state);
109
110
  }
110
111
  this.filters = new Stores_1.FilterStore(this.services, data.filters, this.meta);
111
- this.results = new Stores_1.ResultStore(this.config, this.services, data.results, data.pagination, data.merchandising);
112
- if ((this.results.length === 0 && !this.trending.filter(function (term) { return term.active; }).length) || this.terms.filter(function (term) { return term.active; }).length) {
112
+ this.results = new Stores_1.ResultStore(this.config, this.services, data.results || [], data.pagination, data.merchandising);
113
+ if ((this.results.length === 0 && !this.trending.filter(function (term) { return term.active; }).length) || ((_a = this.terms) === null || _a === void 0 ? void 0 : _a.filter(function (term) { return term.active; }).length)) {
113
114
  // if a trending term was selected and then a subsequent search yields no results, reset trending terms to remove active state
114
115
  // OR if any terms are active, also reset to ensure only a single term or trending term is active
115
116
  this.resetTrending();
116
117
  }
117
118
  this.pagination = new Stores_1.PaginationStore(this.config, this.services, data.pagination);
118
- this.sorting = new Stores_1.SortingStore(this.services, data.sorting, data.search, this.meta);
119
+ this.sorting = new Stores_1.SortingStore(this.services, data.sorting || [], data.search || {}, this.meta);
119
120
  };
120
121
  return AutocompleteStore;
121
122
  }(AbstractStore_1.AbstractStore));
@@ -2,14 +2,14 @@ import type { UrlManager } from '@searchspring/snap-url-manager';
2
2
  import type { SearchResponseModelSearch, AutocompleteResponseModelAllOfAutocomplete } from '@searchspring/snapi-types';
3
3
  import type { StoreServices } from '../../types';
4
4
  export declare class QueryStore {
5
- query: Query;
6
- originalQuery: Query;
5
+ query?: Query;
6
+ originalQuery?: Query;
7
7
  constructor(services: StoreServices, autocomplete: AutocompleteResponseModelAllOfAutocomplete, search: SearchResponseModelSearch);
8
8
  }
9
9
  declare class Query {
10
10
  string: string;
11
11
  url: UrlManager;
12
- constructor(urlManager: any, query: any);
12
+ constructor(urlManager: UrlManager, query: string);
13
13
  }
14
14
  export {};
15
15
  //# sourceMappingURL=QueryStore.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"QueryStore.d.ts","sourceRoot":"","sources":["../../../../src/Autocomplete/Stores/QueryStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,EAAE,yBAAyB,EAAE,0CAA0C,EAAE,MAAM,2BAA2B,CAAC;AACvH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,qBAAa,UAAU;IACtB,KAAK,EAAE,KAAK,CAAC;IACb,aAAa,EAAE,KAAK,CAAC;gBAET,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,0CAA0C,EAAE,MAAM,EAAE,yBAAyB;CAehI;AAMD,cAAM,KAAK;IACV,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,UAAU,CAAC;gBAEJ,UAAU,KAAA,EAAE,KAAK,KAAA;CAS7B"}
1
+ {"version":3,"file":"QueryStore.d.ts","sourceRoot":"","sources":["../../../../src/Autocomplete/Stores/QueryStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,EAAE,yBAAyB,EAAE,0CAA0C,EAAE,MAAM,2BAA2B,CAAC;AACvH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,qBAAa,UAAU;IACf,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,aAAa,CAAC,EAAE,KAAK,CAAC;gBAEjB,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,0CAA0C,EAAE,MAAM,EAAE,yBAAyB;CAehI;AAOD,cAAM,KAAK;IACH,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,UAAU,CAAC;gBAEX,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM;CASjD"}
@@ -9,7 +9,7 @@ var QueryStore = /** @class */ (function () {
9
9
  this.query = new Query(services.urlManager, search.query);
10
10
  observables.query = mobx_1.observable;
11
11
  }
12
- if (autocomplete === null || autocomplete === void 0 ? void 0 : autocomplete.correctedQuery) {
12
+ if ((autocomplete === null || autocomplete === void 0 ? void 0 : autocomplete.correctedQuery) && autocomplete.query) {
13
13
  this.originalQuery = new Query(services.urlManager, autocomplete.query);
14
14
  observables.originalQuery = mobx_1.observable;
15
15
  }
@@ -5,8 +5,8 @@ export declare class StateStore {
5
5
  terms: Lock;
6
6
  facets: Lock;
7
7
  };
8
- focusedInput: HTMLInputElement;
9
- input: string;
8
+ focusedInput: HTMLInputElement | undefined;
9
+ input: string | undefined;
10
10
  url: UrlManager;
11
11
  constructor(services: StoreServices);
12
12
  reset(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"StateStore.d.ts","sourceRoot":"","sources":["../../../../src/Autocomplete/Stores/StateStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,qBAAa,UAAU;IACtB,KAAK,EAAE;QACN,KAAK,EAAE,IAAI,CAAC;QACZ,MAAM,EAAE,IAAI,CAAC;KACb,CAAC;IACF,YAAY,EAAE,gBAAgB,CAAa;IAC3C,KAAK,SAAM;IACX,GAAG,EAAE,UAAU,CAAC;gBAEJ,QAAQ,EAAE,aAAa;IAgBnC,KAAK,IAAI,IAAI;CAKb;AAED,qBAAa,IAAI;IAChB,OAAO,CAAC,KAAK,CAAU;IACvB,OAAO,CAAC,UAAU,CAAU;gBAEhB,KAAK,UAAQ;IAIzB,KAAK,IAAI,IAAI;IAIb,IAAI,MAAM,IAAI,OAAO,CAEpB;IAED,IAAI,IAAI,IAAI;IAIZ,MAAM,IAAI,IAAI;CAGd"}
1
+ {"version":3,"file":"StateStore.d.ts","sourceRoot":"","sources":["../../../../src/Autocomplete/Stores/StateStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,qBAAa,UAAU;IACf,KAAK,EAAE;QACb,KAAK,EAAE,IAAI,CAAC;QACZ,MAAM,EAAE,IAAI,CAAC;KACb,CAAC;IAEK,YAAY,EAAE,gBAAgB,GAAG,SAAS,CAAa;IACvD,KAAK,EAAE,MAAM,GAAG,SAAS,CAAa;IACtC,GAAG,EAAE,UAAU,CAAC;gBAEX,QAAQ,EAAE,aAAa;IAgB5B,KAAK,IAAI,IAAI;CAKpB;AAED,qBAAa,IAAI;IAChB,OAAO,CAAC,KAAK,CAAU;IACvB,OAAO,CAAC,UAAU,CAAU;gBAEhB,KAAK,UAAQ;IAIlB,KAAK,IAAI,IAAI;IAIpB,IAAW,MAAM,IAAI,OAAO,CAE3B;IAEM,IAAI,IAAI,IAAI;IAIZ,MAAM,IAAI,IAAI;CAGrB"}
@@ -5,7 +5,7 @@ var mobx_1 = require("mobx");
5
5
  var StateStore = /** @class */ (function () {
6
6
  function StateStore(services) {
7
7
  this.focusedInput = undefined;
8
- this.input = '';
8
+ this.input = undefined;
9
9
  this.locks = {
10
10
  terms: new Lock(false),
11
11
  facets: new Lock(false),
@@ -19,7 +19,7 @@ var StateStore = /** @class */ (function () {
19
19
  });
20
20
  }
21
21
  StateStore.prototype.reset = function () {
22
- this.input = '';
22
+ this.input = undefined;
23
23
  this.locks.terms.reset();
24
24
  this.locks.facets.reset();
25
25
  };
@@ -2,7 +2,7 @@ import type { UrlManager } from '@searchspring/snap-url-manager';
2
2
  import type { StateStore } from './StateStore';
3
3
  import type { StoreServices } from '../../types';
4
4
  import type { AutocompleteResponseModelAllOfAutocomplete, SearchResponseModelPagination } from '@searchspring/snapi-types';
5
- export declare class TermStore extends Array {
5
+ export declare class TermStore extends Array<Term> {
6
6
  static get [Symbol.species](): ArrayConstructor;
7
7
  constructor(services: StoreServices, autocomplete: AutocompleteResponseModelAllOfAutocomplete, paginationData: SearchResponseModelPagination, resetTerms: () => void, rootState: StateStore);
8
8
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TermStore.d.ts","sourceRoot":"","sources":["../../../../src/Autocomplete/Stores/TermStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,0CAA0C,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAE3H,qBAAa,SAAU,SAAQ,KAAK;IACnC,MAAM,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,gBAAgB,CAE9C;gBAGA,QAAQ,EAAE,aAAa,EACvB,YAAY,EAAE,0CAA0C,EACxD,cAAc,EAAE,6BAA6B,EAC7C,UAAU,EAAE,MAAM,IAAI,EACtB,SAAS,EAAE,UAAU;CA6BtB;AAED,qBAAa,IAAI;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,GAAG,EAAE,UAAU,CAAC;gBAEJ,QAAQ,EAAE,aAAa,EAAE,IAAI,EAAE;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,MAAM,IAAI,EAAE,SAAS,EAAE,UAAU;CAwB3I"}
1
+ {"version":3,"file":"TermStore.d.ts","sourceRoot":"","sources":["../../../../src/Autocomplete/Stores/TermStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,0CAA0C,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAE3H,qBAAa,SAAU,SAAQ,KAAK,CAAC,IAAI,CAAC;IACzC,MAAM,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,gBAAgB,CAE9C;gBAGA,QAAQ,EAAE,aAAa,EACvB,YAAY,EAAE,0CAA0C,EACxD,cAAc,EAAE,6BAA6B,EAC7C,UAAU,EAAE,MAAM,IAAI,EACtB,SAAS,EAAE,UAAU;CA6BtB;AAED,qBAAa,IAAI;IACT,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,GAAG,EAAE,UAAU,CAAC;gBAEX,QAAQ,EAAE,aAAa,EAAE,IAAI,EAAE;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,MAAM,IAAI,EAAE,SAAS,EAAE,UAAU;CAwB3I"}
@@ -1,7 +1,9 @@
1
+ import type { TrendingResponseModel } from '@searchspring/snap-client';
1
2
  import type { StoreServices } from '../../types';
2
3
  import type { StateStore } from './StateStore';
3
- export declare class TrendingStore extends Array {
4
+ import { Term } from './TermStore';
5
+ export declare class TrendingStore extends Array<Term> {
4
6
  static get [Symbol.species](): ArrayConstructor;
5
- constructor(services: StoreServices, trendingData: any, resetTerms: () => void, rootState: StateStore);
7
+ constructor(services: StoreServices, trendingData: TrendingResponseModel, resetTerms: () => void, rootState: StateStore);
6
8
  }
7
9
  //# sourceMappingURL=TrendingStore.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TrendingStore.d.ts","sourceRoot":"","sources":["../../../../src/Autocomplete/Stores/TrendingStore.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C,qBAAa,aAAc,SAAQ,KAAK;IACvC,MAAM,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,gBAAgB,CAE9C;gBAEW,QAAQ,EAAE,aAAa,EAAE,YAAY,KAAA,EAAE,UAAU,EAAE,MAAM,IAAI,EAAE,SAAS,EAAE,UAAU;CAoBhG"}
1
+ {"version":3,"file":"TrendingStore.d.ts","sourceRoot":"","sources":["../../../../src/Autocomplete/Stores/TrendingStore.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,qBAAa,aAAc,SAAQ,KAAK,CAAC,IAAI,CAAC;IAC7C,MAAM,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,gBAAgB,CAE9C;gBAEW,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,IAAI,EAAE,SAAS,EAAE,UAAU;CAoBvH"}
@@ -20,9 +20,9 @@ var TermStore_1 = require("./TermStore");
20
20
  var TrendingStore = /** @class */ (function (_super) {
21
21
  __extends(TrendingStore, _super);
22
22
  function TrendingStore(services, trendingData, resetTerms, rootState) {
23
- var _a;
23
+ var _a, _b;
24
24
  var terms = [];
25
- (_a = trendingData === null || trendingData === void 0 ? void 0 : trendingData.queries) === null || _a === void 0 ? void 0 : _a.map(function (term) {
25
+ (_b = (_a = trendingData === null || trendingData === void 0 ? void 0 : trendingData.trending) === null || _a === void 0 ? void 0 : _a.queries) === null || _b === void 0 ? void 0 : _b.map(function (term) {
26
26
  terms.push(new TermStore_1.Term(services, {
27
27
  active: false,
28
28
  value: term.searchQuery,
@@ -4,6 +4,7 @@ import { PaginationStore } from '../Search/Stores';
4
4
  import { StorageStore } from '../Storage/StorageStore';
5
5
  import { SelectionStore } from './Stores';
6
6
  import type { FinderStoreConfig, StoreServices, SelectedSelection, FinderStoreState } from '../types';
7
+ import { UrlManager } from '@searchspring/snap-url-manager';
7
8
  export declare class FinderStore extends AbstractStore {
8
9
  services: StoreServices;
9
10
  config: FinderStoreConfig;
@@ -17,7 +18,7 @@ export declare class FinderStore extends AbstractStore {
17
18
  selections: SelectionStore;
18
19
  state: FinderStoreState;
19
20
  constructor(config: FinderStoreConfig, services: StoreServices);
20
- setService(name: any, service: any): void;
21
+ setService(name: keyof StoreServices, service: UrlManager): void;
21
22
  save(): void;
22
23
  reset: () => void;
23
24
  loadPersisted(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"FinderStore.d.ts","sourceRoot":"","sources":["../../../src/Finder/FinderStore.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACxF,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAe,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEtG,qBAAa,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,aAAa;IACtC,QAAQ,EAAE,aAAa,CAAC;IACxB,MAAM,EAAG,iBAAiB,CAAC;IAC3B,IAAI,EAAG,mBAAmB,GAAG;QAAE,IAAI,EAAE,iBAAiB,CAAA;KAAE,CAAC;IACzD,IAAI,EAAE,iBAAiB,CAAM;IAC7B,OAAO,EAAE,YAAY,CAAC;IACtB,gBAAgB,EAAG,YAAY,CAAC;IAChC,UAAU,EAAG,eAAe,CAAC;IAC7B,UAAU,EAAG,cAAc,CAAC;IAC5B,KAAK,EAAE,gBAAgB,CAE5B;gBAEU,MAAM,EAAE,iBAAiB,EAAE,QAAQ,EAAE,aAAa;IA0BvD,UAAU,CAAC,IAAI,EAAE,MAAM,aAAa,EAAE,OAAO,EAAE,UAAU,GAAG,IAAI;IAMhE,IAAI,IAAI,IAAI;IAkBZ,KAAK,QAAO,IAAI,CAWrB;IAEK,aAAa,IAAI,IAAI;IAoBrB,MAAM,CAAC,IAAI,EAAE,mBAAmB,GAAG;QAAE,IAAI,EAAE,iBAAiB,CAAA;KAAE,EAAE,kBAAkB,CAAC,EAAE,iBAAiB,EAAE,GAAG,IAAI;CAetH"}
@@ -32,9 +32,9 @@ var FinderStore = /** @class */ (function (_super) {
32
32
  persisted: false,
33
33
  };
34
34
  _this.reset = function () {
35
- var _a;
35
+ var _a, _b;
36
36
  if ((_a = _this.config.persist) === null || _a === void 0 ? void 0 : _a.enabled) {
37
- _this.persistedStorage.clear();
37
+ (_b = _this.persistedStorage) === null || _b === void 0 ? void 0 : _b.clear();
38
38
  _this.state.persisted = false;
39
39
  }
40
40
  if (_this.services.urlManager.state.filter) {
@@ -67,8 +67,8 @@ var FinderStore = /** @class */ (function (_super) {
67
67
  }
68
68
  };
69
69
  FinderStore.prototype.save = function () {
70
- var _a;
71
- if (((_a = this.config.persist) === null || _a === void 0 ? void 0 : _a.enabled) && this.selections.filter(function (selection) { return selection.selected; }).length) {
70
+ var _a, _b;
71
+ if (((_a = this.config.persist) === null || _a === void 0 ? void 0 : _a.enabled) && this.persistedStorage && ((_b = this === null || this === void 0 ? void 0 : this.selections) === null || _b === void 0 ? void 0 : _b.filter(function (selection) { return selection.selected; }).length)) {
72
72
  this.persistedStorage.set('config', this.config);
73
73
  this.persistedStorage.set('data', this.data);
74
74
  this.persistedStorage.set('date', Date.now());
@@ -83,7 +83,7 @@ var FinderStore = /** @class */ (function (_super) {
83
83
  };
84
84
  FinderStore.prototype.loadPersisted = function () {
85
85
  var _a;
86
- if (((_a = this.config.persist) === null || _a === void 0 ? void 0 : _a.enabled) && !this.loaded) {
86
+ if (((_a = this.config.persist) === null || _a === void 0 ? void 0 : _a.enabled) && this.persistedStorage && !this.loaded) {
87
87
  var date = this.persistedStorage.get('date');
88
88
  var data = this.persistedStorage.get('data');
89
89
  var config = this.persistedStorage.get('config');
@@ -109,11 +109,11 @@ var FinderStore = /** @class */ (function (_super) {
109
109
  this.pagination = new Stores_1.PaginationStore(this.config, this.services, data.pagination);
110
110
  this.selections = new Stores_2.SelectionStore(this.config, this.services, {
111
111
  state: this.state,
112
- facets: data.facets,
112
+ facets: data.facets || [],
113
113
  meta: this.meta,
114
114
  loading: this.loading,
115
115
  storage: this.storage,
116
- selections: selectedSelections,
116
+ selections: selectedSelections || [],
117
117
  });
118
118
  };
119
119
  return FinderStore;
@@ -1,7 +1,7 @@
1
- import type { FinderStoreConfig, StoreServices, SelectedSelection, FinderStoreState } from '../../types';
1
+ import type { FinderStoreConfig, FinderFieldConfig, StoreServices, SelectedSelection, FinderStoreState } from '../../types';
2
2
  import type { StorageStore } from '../../Storage/StorageStore';
3
- import type { MetaResponseModel, SearchResponseModelFacet } from '@searchspring/snapi-types';
4
- declare type SelectionStoreData = {
3
+ import type { MetaResponseModel, MetaResponseModelFacetGrid, MetaResponseModelFacetHierarchy, MetaResponseModelFacetList, MetaResponseModelFacetPalette, MetaResponseModelFacetSlider, SearchResponseModelFacet, SearchResponseModelFacetRange, SearchResponseModelFacetRangeBuckets, SearchResponseModelFacetValue, SearchResponseModelFacetValueAllOfValues } from '@searchspring/snapi-types';
4
+ export declare type SelectionStoreData = {
5
5
  state: FinderStoreState;
6
6
  facets: SearchResponseModelFacet[];
7
7
  meta: MetaResponseModel;
@@ -9,9 +9,48 @@ declare type SelectionStoreData = {
9
9
  storage: StorageStore;
10
10
  selections: SelectedSelection[];
11
11
  };
12
- export declare class SelectionStore extends Array {
12
+ declare type FacetWithMeta = MetaResponseModelFacetGrid & MetaResponseModelFacetHierarchy & MetaResponseModelFacetList & MetaResponseModelFacetPalette & MetaResponseModelFacetSlider & SearchResponseModelFacetValue & SearchResponseModelFacetRange & SearchResponseModelFacetRangeBuckets;
13
+ export declare class SelectionStore extends Array<Selection | SelectionHierarchy> {
13
14
  static get [Symbol.species](): ArrayConstructor;
14
15
  constructor(config: FinderStoreConfig, services: StoreServices, { state, facets, meta, loading, storage, selections }: SelectionStoreData);
15
16
  }
17
+ declare class SelectionBase {
18
+ state: FinderStoreState;
19
+ type: string;
20
+ field: string;
21
+ filtered: boolean;
22
+ collapsed: boolean;
23
+ display: string;
24
+ label: string;
25
+ multiple: string;
26
+ id: string;
27
+ disabled: boolean;
28
+ selected: string;
29
+ custom: {};
30
+ facet: any;
31
+ services: StoreServices;
32
+ loading: boolean;
33
+ config: FinderFieldConfig | LevelConfig;
34
+ data?: SearchResponseModelFacetValueAllOfValues[];
35
+ storage: any;
36
+ constructor(services: StoreServices, id: string, state: FinderStoreState, facet: FacetWithMeta, selectionConfig: FinderFieldConfig | LevelConfig, loading: boolean, storageStore: StorageStore);
37
+ get values(): SearchResponseModelFacetValueAllOfValues[];
38
+ }
39
+ declare class Selection extends SelectionBase {
40
+ config: FinderFieldConfig;
41
+ constructor(services: StoreServices, id: string, state: FinderStoreState, facet: FacetWithMeta, config: FinderFieldConfig, loading: boolean, storageStore: StorageStore);
42
+ select(value?: string): void;
43
+ }
44
+ declare class SelectionHierarchy extends SelectionBase {
45
+ hierarchyDelimiter: string;
46
+ config: LevelConfig;
47
+ constructor(services: StoreServices, id: string, state: FinderStoreState, facet: FacetWithMeta, config: LevelConfig, loading: boolean, storageStore: StorageStore);
48
+ select(value?: string): void;
49
+ }
50
+ declare type LevelConfig = {
51
+ index: number;
52
+ label?: string;
53
+ key: string;
54
+ };
16
55
  export {};
17
56
  //# sourceMappingURL=SelectionStore.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SelectionStore.d.ts","sourceRoot":"","sources":["../../../../src/Finder/Stores/SelectionStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAqB,aAAa,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC5H,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,wBAAwB,EAA4C,MAAM,2BAA2B,CAAC;AAEvI,aAAK,kBAAkB,GAAG;IACzB,KAAK,EAAE,gBAAgB,CAAC;IACxB,MAAM,EAAE,wBAAwB,EAAE,CAAC;IACnC,IAAI,EAAE,iBAAiB,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,YAAY,CAAC;IACtB,UAAU,EAAE,iBAAiB,EAAE,CAAC;CAChC,CAAC;AACF,qBAAa,cAAe,SAAQ,KAAK;IACxC,MAAM,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,gBAAgB,CAE9C;gBAEW,MAAM,EAAE,iBAAiB,EAAE,QAAQ,EAAE,aAAa,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,kBAAkB;CA+FzI"}
1
+ {"version":3,"file":"SelectionStore.d.ts","sourceRoot":"","sources":["../../../../src/Finder/Stores/SelectionStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,aAAa,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,aA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fields.indexOf(b.field);
93
93
  });
94
94
  (_b = config === null || config === void 0 ? void 0 : config.fields) === null || _b === void 0 ? void 0 : _b.forEach(function (fieldObj) {
95
- var _a;
96
- var facet = facets === null || facets === void 0 ? void 0 : facets.filter(function (facet) { return facet.field == fieldObj.field; }).pop();
97
- facet = __assign(__assign({}, meta === null || meta === void 0 ? void 0 : meta.facets[fieldObj.field]), facet);
98
- var isHierarchy = facet.display === 'hierarchy';
95
+ var _a, _b, _c, _d, _e;
96
+ var facet = facets.filter(function (facet) { return facet.field == fieldObj.field; }).pop();
97
+ facet = __assign(__assign({}, (((meta === null || meta === void 0 ? void 0 : meta.facets) && meta.facets[fieldObj.field]) || {})), facet);
98
+ var isHierarchy = (facet === null || facet === void 0 ? void 0 : facet.display) === 'hierarchy';
99
99
  if (isHierarchy) {
100
100
  // filter out history/current hierarchy values
101
- var filtered = facet.filtered && facet.values.filter(function (value) { return value.filtered; }).pop();
101
+ var filtered = (_a = facet.values) === null || _a === void 0 ? void 0 : _a.filter(function (value) { return value.filtered; }).pop();
102
102
  if (filtered) {
103
- var filteredLevel_1 = filtered.value.split(facet.hierarchyDelimiter).length;
104
- facet.values = facet.values.filter(function (value, index) {
105
- return (value.value && value.value.split(facet.hierarchyDelimiter).length > filteredLevel_1) || index == facet.values.length - 1;
103
+ var filteredLevel_1 = (_b = filtered.value) === null || _b === void 0 ? void 0 : _b.split(facet === null || facet === void 0 ? void 0 : facet.hierarchyDelimiter).length;
104
+ facet.values = (_c = facet.values) === null || _c === void 0 ? void 0 : _c.filter(function (value, index) {
105
+ var _a;
106
+ return (value.value && value.value.split(facet === null || facet === void 0 ? void 0 : facet.hierarchyDelimiter).length > filteredLevel_1) || index == ((_a = facet.values) === null || _a === void 0 ? void 0 : _a.length) - 1;
106
107
  });
107
108
  }
108
- var levels = (fieldObj === null || fieldObj === void 0 ? void 0 : fieldObj.levels) || ((_a = facet === null || facet === void 0 ? void 0 : facet.values[(facet === null || facet === void 0 ? void 0 : facet.values.length) - 1]) === null || _a === void 0 ? void 0 : _a.value.split(facet.hierarchyDelimiter));
109
+ var levels = (fieldObj === null || fieldObj === void 0 ? void 0 : fieldObj.levels) || ((facet === null || facet === void 0 ? void 0 : facet.values) && ((_e = facet === null || facet === void 0 ? void 0 : facet.values[((_d = facet === null || facet === void 0 ? void 0 : facet.values) === null || _d === void 0 ? void 0 : _d.length) - 1].value) === null || _e === void 0 ? void 0 : _e.split(facet.hierarchyDelimiter)));
109
110
  levels === null || levels === void 0 ? void 0 : levels.map(function (level, index) {
110
111
  var levelConfig = { index: index, label: fieldObj.levels ? level : '', key: "ss-".concat(index) };
111
112
  selectedSelections.push(new SelectionHierarchy(services, config.id, state, facet, levelConfig, loading, storage));
@@ -2,6 +2,7 @@ import { AbstractStore } from '../Abstract/AbstractStore';
2
2
  import { ResultStore } from '../Search/Stores';
3
3
  import { ProfileStore } from './Stores';
4
4
  import type { RecommendationStoreConfig, StoreServices } from '../types';
5
+ import type { RecommendCombinedResponseModel } from '@searchspring/snap-client';
5
6
  export declare class RecommendationStore extends AbstractStore {
6
7
  services: StoreServices;
7
8
  loaded: boolean;
@@ -9,6 +10,6 @@ export declare class RecommendationStore extends AbstractStore {
9
10
  results: ResultStore;
10
11
  constructor(config: RecommendationStoreConfig, services: StoreServices);
11
12
  reset(): void;
12
- update(data: any): void;
13
+ update(data?: RecommendCombinedResponseModel): void;
13
14
  }
14
15
  //# sourceMappingURL=RecommendationStore.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RecommendationStore.d.ts","sourceRoot":"","sources":["../../../src/Recommendation/RecommendationStore.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,KAAK,EAAE,yBAAyB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzE,qBAAa,mBAAoB,SAAQ,aAAa;IACrD,QAAQ,EAAE,aAAa,CAAC;IACxB,MAAM,UAAS;IACf,OAAO,EAAE,YAAY,CAAC;IACtB,OAAO,EAAE,WAAW,CAAC;gBAET,MAAM,EAAE,yBAAyB,EAAE,QAAQ,EAAE,aAAa;IAiBtE,KAAK,IAAI,IAAI;IAIb,MAAM,CAAC,IAAI,KAAA,GAAG,IAAI;CAMlB"}
1
+ {"version":3,"file":"RecommendationStore.d.ts","sourceRoot":"","sources":["../../../src/Recommendation/RecommendationStore.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,KAAK,EAAE,yBAAyB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzE,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAEhF,qBAAa,mBAAoB,SAAQ,aAAa;IAC9C,QAAQ,EAAE,aAAa,CAAC;IACxB,MAAM,UAAS;IACf,OAAO,EAAG,YAAY,CAAC;IACvB,OAAO,EAAG,WAAW,CAAC;gBAEjB,MAAM,EAAE,yBAAyB,EAAE,QAAQ,EAAE,aAAa;IAiB/D,KAAK,IAAI,IAAI;IAIb,MAAM,CAAC,IAAI,CAAC,EAAE,8BAA8B,GAAG,IAAI;CAM1D"}
@@ -39,13 +39,13 @@ var RecommendationStore = /** @class */ (function (_super) {
39
39
  return _this;
40
40
  }
41
41
  RecommendationStore.prototype.reset = function () {
42
- this.update({});
42
+ this.update();
43
43
  };
44
44
  RecommendationStore.prototype.update = function (data) {
45
45
  this.error = undefined;
46
- this.loaded = !!data.profile;
47
- this.profile = new Stores_2.ProfileStore(this.services, data.profile);
48
- this.results = new Stores_1.ResultStore(this.config, this.services, data.results);
46
+ this.loaded = !!(data === null || data === void 0 ? void 0 : data.profile);
47
+ this.profile = new Stores_2.ProfileStore(this.services, data);
48
+ this.results = new Stores_1.ResultStore(this.config, this.services, data === null || data === void 0 ? void 0 : data.results);
49
49
  };
50
50
  return RecommendationStore;
51
51
  }(AbstractStore_1.AbstractStore));
@@ -1,8 +1,9 @@
1
1
  import type { StoreServices } from '../../types';
2
+ import type { RecommendCombinedResponseModel } from '@searchspring/snap-client';
2
3
  export declare class ProfileStore {
3
4
  tag: string;
4
5
  placement: string;
5
6
  display: Record<string, any>;
6
- constructor(services: StoreServices, profile: any);
7
+ constructor(services: StoreServices, data?: RecommendCombinedResponseModel);
7
8
  }
8
9
  //# sourceMappingURL=ProfileStore.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProfileStore.d.ts","sourceRoot":"","sources":["../../../../src/Recommendation/Stores/ProfileStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,qBAAa,YAAY;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;gBAEtB,QAAQ,EAAE,aAAa,EAAE,OAAO,KAAA;CAe5C"}
1
+ {"version":3,"file":"ProfileStore.d.ts","sourceRoot":"","sources":["../../../../src/Recommendation/Stores/ProfileStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAEhF,qBAAa,YAAY;IACjB,GAAG,EAAG,MAAM,CAAC;IACb,SAAS,EAAG,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;gBAE7B,QAAQ,EAAE,aAAa,EAAE,IAAI,CAAC,EAAE,8BAA8B;CAe1E"}
@@ -3,14 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ProfileStore = void 0;
4
4
  var mobx_1 = require("mobx");
5
5
  var ProfileStore = /** @class */ (function () {
6
- function ProfileStore(services, profile) {
6
+ function ProfileStore(services, data) {
7
+ var _a;
7
8
  this.display = {};
8
- if (!(profile === null || profile === void 0 ? void 0 : profile.tag)) {
9
+ if (!((_a = data === null || data === void 0 ? void 0 : data.profile) === null || _a === void 0 ? void 0 : _a.tag)) {
9
10
  return;
10
11
  }
11
- this.tag = profile.tag;
12
- this.placement = profile.placement;
13
- this.display = profile.display;
12
+ this.tag = data.profile.tag;
13
+ this.placement = data.profile.placement;
14
+ this.display = data.profile.display;
14
15
  (0, mobx_1.makeObservable)(this, {
15
16
  tag: mobx_1.observable,
16
17
  placement: mobx_1.observable,
@@ -4,7 +4,6 @@ import { MerchandisingStore, FacetStore, FilterStore, ResultStore, PaginationSto
4
4
  import { AbstractStore } from '../Abstract/AbstractStore';
5
5
  import { StorageStore } from '../Storage/StorageStore';
6
6
  export declare class SearchStore extends AbstractStore {
7
- config: SearchStoreConfig;
8
7
  services: StoreServices;
9
8
  data: SearchResponseModel & {
10
9
  meta: MetaResponseModel;
@@ -19,8 +18,9 @@ export declare class SearchStore extends AbstractStore {
19
18
  sorting: SortingStore;
20
19
  storage: StorageStore;
21
20
  constructor(config: SearchStoreConfig, services: StoreServices);
22
- update(data: SearchResponseModel & {
23
- meta: MetaResponseModel;
21
+ reset(): void;
22
+ update(data?: SearchResponseModel & {
23
+ meta?: MetaResponseModel;
24
24
  }): void;
25
25
  }
26
26
  //# sourceMappingURL=SearchStore.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SearchStore.d.ts","sourceRoot":"","sources":["../../../src/Search/SearchStore.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACxF,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACjE,OAAO,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