@searchspring/snap-store-mobx 0.27.8 → 0.30.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.
- package/dist/cjs/Autocomplete/AutocompleteStore.d.ts +12 -12
- package/dist/cjs/Autocomplete/AutocompleteStore.d.ts.map +1 -1
- package/dist/cjs/Autocomplete/AutocompleteStore.js +10 -10
- package/dist/cjs/Autocomplete/Stores/{FacetStore.d.ts → AutocompleteFacetStore.d.ts} +4 -4
- package/dist/cjs/Autocomplete/Stores/AutocompleteFacetStore.d.ts.map +1 -0
- package/dist/cjs/Autocomplete/Stores/{FacetStore.js → AutocompleteFacetStore.js} +8 -8
- package/dist/{esm/Autocomplete/Stores/QueryStore.d.ts → cjs/Autocomplete/Stores/AutocompleteQueryStore.d.ts} +2 -2
- package/dist/cjs/Autocomplete/Stores/AutocompleteQueryStore.d.ts.map +1 -0
- package/dist/cjs/Autocomplete/Stores/{QueryStore.js → AutocompleteQueryStore.js} +5 -5
- package/dist/{esm/Autocomplete/Stores/StateStore.d.ts → cjs/Autocomplete/Stores/AutocompleteStateStore.d.ts} +2 -2
- package/dist/cjs/Autocomplete/Stores/AutocompleteStateStore.d.ts.map +1 -0
- package/dist/cjs/Autocomplete/Stores/{StateStore.js → AutocompleteStateStore.js} +6 -6
- package/dist/{esm/Autocomplete/Stores/TermStore.d.ts → cjs/Autocomplete/Stores/AutocompleteTermStore.d.ts} +5 -5
- package/dist/cjs/Autocomplete/Stores/AutocompleteTermStore.d.ts.map +1 -0
- package/dist/cjs/Autocomplete/Stores/{TermStore.js → AutocompleteTermStore.js} +7 -7
- package/dist/cjs/Autocomplete/Stores/AutocompleteTrendingStore.d.ts +9 -0
- package/dist/cjs/Autocomplete/Stores/AutocompleteTrendingStore.d.ts.map +1 -0
- package/dist/cjs/Autocomplete/Stores/{TrendingStore.js → AutocompleteTrendingStore.js} +9 -9
- package/dist/cjs/Autocomplete/Stores/index.d.ts +5 -5
- package/dist/cjs/Autocomplete/Stores/index.d.ts.map +1 -1
- package/dist/cjs/Autocomplete/Stores/index.js +11 -11
- package/dist/cjs/Finder/FinderStore.d.ts +4 -4
- package/dist/cjs/Finder/FinderStore.d.ts.map +1 -1
- package/dist/cjs/Finder/FinderStore.js +2 -2
- package/dist/{esm/Finder/Stores/SelectionStore.d.ts → cjs/Finder/Stores/FinderSelectionStore.d.ts} +4 -4
- package/dist/cjs/Finder/Stores/FinderSelectionStore.d.ts.map +1 -0
- package/dist/cjs/Finder/Stores/{SelectionStore.js → FinderSelectionStore.js} +7 -7
- package/dist/cjs/Finder/Stores/index.d.ts +1 -1
- package/dist/cjs/Finder/Stores/index.d.ts.map +1 -1
- package/dist/cjs/Finder/Stores/index.js +3 -3
- package/dist/cjs/Recommendation/RecommendationStore.d.ts +4 -4
- package/dist/cjs/Recommendation/RecommendationStore.d.ts.map +1 -1
- package/dist/cjs/Recommendation/RecommendationStore.js +2 -2
- package/dist/cjs/Recommendation/Stores/{ProfileStore.d.ts → RecommendationProfileStore.d.ts} +2 -2
- package/dist/cjs/Recommendation/Stores/RecommendationProfileStore.d.ts.map +1 -0
- package/dist/cjs/Recommendation/Stores/{ProfileStore.js → RecommendationProfileStore.js} +5 -5
- package/dist/cjs/Recommendation/Stores/index.d.ts +1 -1
- package/dist/cjs/Recommendation/Stores/index.d.ts.map +1 -1
- package/dist/cjs/Recommendation/Stores/index.js +3 -3
- package/dist/cjs/Search/SearchStore.d.ts +8 -8
- package/dist/cjs/Search/SearchStore.d.ts.map +1 -1
- package/dist/cjs/Search/SearchStore.js +7 -7
- package/dist/{esm/Search/Stores/FacetStore.d.ts → cjs/Search/Stores/SearchFacetStore.d.ts} +8 -9
- package/dist/cjs/Search/Stores/SearchFacetStore.d.ts.map +1 -0
- package/dist/cjs/Search/Stores/{FacetStore.js → SearchFacetStore.js} +25 -24
- package/dist/{esm/Search/Stores/FilterStore.d.ts → cjs/Search/Stores/SearchFilterStore.d.ts} +2 -2
- package/dist/cjs/Search/Stores/SearchFilterStore.d.ts.map +1 -0
- package/dist/cjs/Search/Stores/{FilterStore.js → SearchFilterStore.js} +7 -7
- package/dist/{esm/Search/Stores/MerchandisingStore.d.ts → cjs/Search/Stores/SearchMerchandisingStore.d.ts} +5 -4
- package/dist/cjs/Search/Stores/SearchMerchandisingStore.d.ts.map +1 -0
- package/dist/cjs/Search/Stores/{MerchandisingStore.js → SearchMerchandisingStore.js} +6 -6
- package/dist/{esm/Search/Stores/PaginationStore.d.ts → cjs/Search/Stores/SearchPaginationStore.d.ts} +2 -2
- package/dist/cjs/Search/Stores/SearchPaginationStore.d.ts.map +1 -0
- package/dist/cjs/Search/Stores/{PaginationStore.js → SearchPaginationStore.js} +15 -15
- package/dist/cjs/Search/Stores/{QueryStore.d.ts → SearchQueryStore.d.ts} +2 -2
- package/dist/cjs/Search/Stores/SearchQueryStore.d.ts.map +1 -0
- package/dist/cjs/Search/Stores/{QueryStore.js → SearchQueryStore.js} +5 -5
- package/dist/cjs/Search/Stores/{ResultStore.d.ts → SearchResultStore.d.ts} +2 -2
- package/dist/cjs/Search/Stores/SearchResultStore.d.ts.map +1 -0
- package/dist/cjs/Search/Stores/{ResultStore.js → SearchResultStore.js} +7 -7
- package/dist/cjs/Search/Stores/{SortingStore.d.ts → SearchSortingStore.d.ts} +2 -2
- package/dist/cjs/Search/Stores/SearchSortingStore.d.ts.map +1 -0
- package/dist/cjs/Search/Stores/{SortingStore.js → SearchSortingStore.js} +6 -6
- package/dist/cjs/Search/Stores/index.d.ts +7 -7
- package/dist/cjs/Search/Stores/index.d.ts.map +1 -1
- package/dist/cjs/Search/Stores/index.js +24 -16
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +2 -5
- package/dist/esm/Autocomplete/AutocompleteStore.d.ts +12 -12
- package/dist/esm/Autocomplete/AutocompleteStore.d.ts.map +1 -1
- package/dist/esm/Autocomplete/AutocompleteStore.js +12 -12
- package/dist/esm/Autocomplete/Stores/{FacetStore.d.ts → AutocompleteFacetStore.d.ts} +4 -4
- package/dist/esm/Autocomplete/Stores/AutocompleteFacetStore.d.ts.map +1 -0
- package/dist/esm/Autocomplete/Stores/{FacetStore.js → AutocompleteFacetStore.js} +2 -2
- package/dist/{cjs/Autocomplete/Stores/QueryStore.d.ts → esm/Autocomplete/Stores/AutocompleteQueryStore.d.ts} +2 -2
- package/dist/esm/Autocomplete/Stores/AutocompleteQueryStore.d.ts.map +1 -0
- package/dist/esm/Autocomplete/Stores/{QueryStore.js → AutocompleteQueryStore.js} +1 -1
- package/dist/{cjs/Autocomplete/Stores/StateStore.d.ts → esm/Autocomplete/Stores/AutocompleteStateStore.d.ts} +2 -2
- package/dist/esm/Autocomplete/Stores/AutocompleteStateStore.d.ts.map +1 -0
- package/dist/esm/Autocomplete/Stores/{StateStore.js → AutocompleteStateStore.js} +1 -1
- package/dist/{cjs/Autocomplete/Stores/TermStore.d.ts → esm/Autocomplete/Stores/AutocompleteTermStore.d.ts} +5 -5
- package/dist/esm/Autocomplete/Stores/AutocompleteTermStore.d.ts.map +1 -0
- package/dist/esm/Autocomplete/Stores/{TermStore.js → AutocompleteTermStore.js} +1 -1
- package/dist/esm/Autocomplete/Stores/AutocompleteTrendingStore.d.ts +9 -0
- package/dist/esm/Autocomplete/Stores/AutocompleteTrendingStore.d.ts.map +1 -0
- package/dist/esm/Autocomplete/Stores/{TrendingStore.js → AutocompleteTrendingStore.js} +2 -2
- package/dist/esm/Autocomplete/Stores/index.d.ts +5 -5
- package/dist/esm/Autocomplete/Stores/index.d.ts.map +1 -1
- package/dist/esm/Autocomplete/Stores/index.js +5 -5
- package/dist/esm/Finder/FinderStore.d.ts +4 -4
- package/dist/esm/Finder/FinderStore.d.ts.map +1 -1
- package/dist/esm/Finder/FinderStore.js +4 -4
- package/dist/{cjs/Finder/Stores/SelectionStore.d.ts → esm/Finder/Stores/FinderSelectionStore.d.ts} +10 -6
- package/dist/esm/Finder/Stores/FinderSelectionStore.d.ts.map +1 -0
- package/dist/esm/Finder/Stores/{SelectionStore.js → FinderSelectionStore.js} +1 -1
- package/dist/esm/Finder/Stores/index.d.ts +1 -1
- package/dist/esm/Finder/Stores/index.d.ts.map +1 -1
- package/dist/esm/Finder/Stores/index.js +1 -1
- package/dist/esm/Recommendation/RecommendationStore.d.ts +4 -4
- package/dist/esm/Recommendation/RecommendationStore.d.ts.map +1 -1
- package/dist/esm/Recommendation/RecommendationStore.js +4 -4
- package/dist/esm/Recommendation/Stores/{ProfileStore.d.ts → RecommendationProfileStore.d.ts} +2 -2
- package/dist/esm/Recommendation/Stores/RecommendationProfileStore.d.ts.map +1 -0
- package/dist/esm/Recommendation/Stores/{ProfileStore.js → RecommendationProfileStore.js} +1 -1
- package/dist/esm/Recommendation/Stores/index.d.ts +1 -1
- package/dist/esm/Recommendation/Stores/index.d.ts.map +1 -1
- package/dist/esm/Recommendation/Stores/index.js +1 -1
- package/dist/esm/Search/SearchStore.d.ts +8 -8
- package/dist/esm/Search/SearchStore.d.ts.map +1 -1
- package/dist/esm/Search/SearchStore.js +8 -8
- package/dist/{cjs/Search/Stores/FacetStore.d.ts → esm/Search/Stores/SearchFacetStore.d.ts} +9 -10
- package/dist/esm/Search/Stores/SearchFacetStore.d.ts.map +1 -0
- package/dist/esm/Search/Stores/{FacetStore.js → SearchFacetStore.js} +8 -8
- package/dist/{cjs/Search/Stores/FilterStore.d.ts → esm/Search/Stores/SearchFilterStore.d.ts} +3 -3
- package/dist/esm/Search/Stores/SearchFilterStore.d.ts.map +1 -0
- package/dist/esm/Search/Stores/{FilterStore.js → SearchFilterStore.js} +1 -1
- package/dist/{cjs/Search/Stores/MerchandisingStore.d.ts → esm/Search/Stores/SearchMerchandisingStore.d.ts} +5 -4
- package/dist/esm/Search/Stores/SearchMerchandisingStore.d.ts.map +1 -0
- package/dist/esm/Search/Stores/{MerchandisingStore.js → SearchMerchandisingStore.js} +2 -2
- package/dist/{cjs/Search/Stores/PaginationStore.d.ts → esm/Search/Stores/SearchPaginationStore.d.ts} +2 -2
- package/dist/esm/Search/Stores/SearchPaginationStore.d.ts.map +1 -0
- package/dist/esm/Search/Stores/{PaginationStore.js → SearchPaginationStore.js} +1 -1
- package/dist/esm/Search/Stores/{QueryStore.d.ts → SearchQueryStore.d.ts} +2 -2
- package/dist/esm/Search/Stores/SearchQueryStore.d.ts.map +1 -0
- package/dist/esm/Search/Stores/{QueryStore.js → SearchQueryStore.js} +1 -1
- package/dist/esm/Search/Stores/{ResultStore.d.ts → SearchResultStore.d.ts} +2 -2
- package/dist/esm/Search/Stores/SearchResultStore.d.ts.map +1 -0
- package/dist/esm/Search/Stores/{ResultStore.js → SearchResultStore.js} +1 -1
- package/dist/esm/Search/Stores/{SortingStore.d.ts → SearchSortingStore.d.ts} +2 -2
- package/dist/esm/Search/Stores/SearchSortingStore.d.ts.map +1 -0
- package/dist/esm/Search/Stores/{SortingStore.js → SearchSortingStore.js} +1 -1
- package/dist/esm/Search/Stores/index.d.ts +7 -7
- package/dist/esm/Search/Stores/index.d.ts.map +1 -1
- package/dist/esm/Search/Stores/index.js +7 -7
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -1
- package/package.json +5 -5
- package/dist/cjs/Autocomplete/Stores/FacetStore.d.ts.map +0 -1
- package/dist/cjs/Autocomplete/Stores/QueryStore.d.ts.map +0 -1
- package/dist/cjs/Autocomplete/Stores/StateStore.d.ts.map +0 -1
- package/dist/cjs/Autocomplete/Stores/TermStore.d.ts.map +0 -1
- package/dist/cjs/Autocomplete/Stores/TrendingStore.d.ts +0 -9
- package/dist/cjs/Autocomplete/Stores/TrendingStore.d.ts.map +0 -1
- package/dist/cjs/Finder/Stores/SelectionStore.d.ts.map +0 -1
- package/dist/cjs/Recommendation/Stores/ProfileStore.d.ts.map +0 -1
- package/dist/cjs/Search/Stores/FacetStore.d.ts.map +0 -1
- package/dist/cjs/Search/Stores/FilterStore.d.ts.map +0 -1
- package/dist/cjs/Search/Stores/MerchandisingStore.d.ts.map +0 -1
- package/dist/cjs/Search/Stores/PaginationStore.d.ts.map +0 -1
- package/dist/cjs/Search/Stores/QueryStore.d.ts.map +0 -1
- package/dist/cjs/Search/Stores/ResultStore.d.ts.map +0 -1
- package/dist/cjs/Search/Stores/SortingStore.d.ts.map +0 -1
- package/dist/esm/Autocomplete/Stores/FacetStore.d.ts.map +0 -1
- package/dist/esm/Autocomplete/Stores/QueryStore.d.ts.map +0 -1
- package/dist/esm/Autocomplete/Stores/StateStore.d.ts.map +0 -1
- package/dist/esm/Autocomplete/Stores/TermStore.d.ts.map +0 -1
- package/dist/esm/Autocomplete/Stores/TrendingStore.d.ts +0 -9
- package/dist/esm/Autocomplete/Stores/TrendingStore.d.ts.map +0 -1
- package/dist/esm/Finder/Stores/SelectionStore.d.ts.map +0 -1
- package/dist/esm/Recommendation/Stores/ProfileStore.d.ts.map +0 -1
- package/dist/esm/Search/Stores/FacetStore.d.ts.map +0 -1
- package/dist/esm/Search/Stores/FilterStore.d.ts.map +0 -1
- package/dist/esm/Search/Stores/MerchandisingStore.d.ts.map +0 -1
- package/dist/esm/Search/Stores/PaginationStore.d.ts.map +0 -1
- package/dist/esm/Search/Stores/QueryStore.d.ts.map +0 -1
- package/dist/esm/Search/Stores/ResultStore.d.ts.map +0 -1
- package/dist/esm/Search/Stores/SortingStore.d.ts.map +0 -1
package/dist/cjs/Recommendation/Stores/{ProfileStore.d.ts → RecommendationProfileStore.d.ts}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { StoreServices } from '../../types';
|
|
2
2
|
import type { RecommendCombinedResponseModel } from '@searchspring/snap-client';
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class RecommendationProfileStore {
|
|
4
4
|
tag: string;
|
|
5
5
|
placement: string;
|
|
6
6
|
display: Record<string, any>;
|
|
7
7
|
constructor(services: StoreServices, data?: RecommendCombinedResponseModel);
|
|
8
8
|
}
|
|
9
|
-
//# sourceMappingURL=
|
|
9
|
+
//# sourceMappingURL=RecommendationProfileStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecommendationProfileStore.d.ts","sourceRoot":"","sources":["../../../../src/Recommendation/Stores/RecommendationProfileStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAEhF,qBAAa,0BAA0B;IAC/B,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"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.RecommendationProfileStore = void 0;
|
|
4
4
|
var mobx_1 = require("mobx");
|
|
5
|
-
var
|
|
6
|
-
function
|
|
5
|
+
var RecommendationProfileStore = /** @class */ (function () {
|
|
6
|
+
function RecommendationProfileStore(services, data) {
|
|
7
7
|
var _a;
|
|
8
8
|
this.display = {};
|
|
9
9
|
if (!((_a = data === null || data === void 0 ? void 0 : data.profile) === null || _a === void 0 ? void 0 : _a.tag)) {
|
|
@@ -18,6 +18,6 @@ var ProfileStore = /** @class */ (function () {
|
|
|
18
18
|
display: mobx_1.observable,
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
|
-
return
|
|
21
|
+
return RecommendationProfileStore;
|
|
22
22
|
}());
|
|
23
|
-
exports.
|
|
23
|
+
exports.RecommendationProfileStore = RecommendationProfileStore;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { RecommendationProfileStore } from './RecommendationProfileStore';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Recommendation/Stores/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Recommendation/Stores/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
var
|
|
5
|
-
Object.defineProperty(exports, "
|
|
3
|
+
exports.RecommendationProfileStore = void 0;
|
|
4
|
+
var RecommendationProfileStore_1 = require("./RecommendationProfileStore");
|
|
5
|
+
Object.defineProperty(exports, "RecommendationProfileStore", { enumerable: true, get: function () { return RecommendationProfileStore_1.RecommendationProfileStore; } });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SearchResponseModel, MetaResponseModel } from '@searchspring/snapi-types';
|
|
2
2
|
import type { SearchStoreConfig, StoreServices } from '../types';
|
|
3
|
-
import {
|
|
3
|
+
import { SearchMerchandisingStore, SearchFacetStore, SearchFilterStore, SearchResultStore, SearchPaginationStore, SearchSortingStore, SearchQueryStore } from './Stores';
|
|
4
4
|
import { AbstractStore } from '../Abstract/AbstractStore';
|
|
5
5
|
import { StorageStore } from '../Storage/StorageStore';
|
|
6
6
|
export declare class SearchStore extends AbstractStore {
|
|
@@ -9,13 +9,13 @@ export declare class SearchStore extends AbstractStore {
|
|
|
9
9
|
meta: MetaResponseModel;
|
|
10
10
|
};
|
|
11
11
|
meta: MetaResponseModel;
|
|
12
|
-
merchandising:
|
|
13
|
-
search:
|
|
14
|
-
facets:
|
|
15
|
-
filters:
|
|
16
|
-
results:
|
|
17
|
-
pagination:
|
|
18
|
-
sorting:
|
|
12
|
+
merchandising: SearchMerchandisingStore;
|
|
13
|
+
search: SearchQueryStore;
|
|
14
|
+
facets: SearchFacetStore;
|
|
15
|
+
filters: SearchFilterStore;
|
|
16
|
+
results: SearchResultStore;
|
|
17
|
+
pagination: SearchPaginationStore;
|
|
18
|
+
sorting: SearchSortingStore;
|
|
19
19
|
storage: StorageStore;
|
|
20
20
|
constructor(config: SearchStoreConfig, services: StoreServices);
|
|
21
21
|
reset(): void;
|
|
@@ -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,
|
|
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,EACN,wBAAwB,EACxB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,gBAAgB,EAChB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,qBAAa,WAAY,SAAQ,aAAa;IACtC,QAAQ,EAAE,aAAa,CAAC;IACxB,IAAI,EAAG,mBAAmB,GAAG;QAAE,IAAI,EAAE,iBAAiB,CAAA;KAAE,CAAC;IACzD,IAAI,EAAG,iBAAiB,CAAC;IACzB,aAAa,EAAG,wBAAwB,CAAC;IACzC,MAAM,EAAG,gBAAgB,CAAC;IAC1B,MAAM,EAAG,gBAAgB,CAAC;IAC1B,OAAO,EAAG,iBAAiB,CAAC;IAC5B,OAAO,EAAG,iBAAiB,CAAC;IAC5B,UAAU,EAAG,qBAAqB,CAAC;IACnC,OAAO,EAAG,kBAAkB,CAAC;IAC7B,OAAO,EAAE,YAAY,CAAC;gBAEjB,MAAM,EAAE,iBAAiB,EAAE,QAAQ,EAAE,aAAa;IAqCvD,KAAK,IAAI,IAAI;IAIb,MAAM,CAAC,IAAI,GAAE,mBAAmB,GAAG;QAAE,IAAI,CAAC,EAAE,iBAAiB,CAAA;KAAO,GAAG,IAAI;CAalF"}
|
|
@@ -65,13 +65,13 @@ var SearchStore = /** @class */ (function (_super) {
|
|
|
65
65
|
this.data = JSON.parse(JSON.stringify(data));
|
|
66
66
|
this.loaded = !!data.pagination;
|
|
67
67
|
this.meta = data.meta || {};
|
|
68
|
-
this.merchandising = new Stores_1.
|
|
69
|
-
this.search = new Stores_1.
|
|
70
|
-
this.facets = new Stores_1.
|
|
71
|
-
this.filters = new Stores_1.
|
|
72
|
-
this.results = new Stores_1.
|
|
73
|
-
this.pagination = new Stores_1.
|
|
74
|
-
this.sorting = new Stores_1.
|
|
68
|
+
this.merchandising = new Stores_1.SearchMerchandisingStore(this.services, (data === null || data === void 0 ? void 0 : data.merchandising) || {});
|
|
69
|
+
this.search = new Stores_1.SearchQueryStore(this.services, (data === null || data === void 0 ? void 0 : data.search) || {});
|
|
70
|
+
this.facets = new Stores_1.SearchFacetStore(this.config, this.services, this.storage, data.facets, (data === null || data === void 0 ? void 0 : data.pagination) || {}, this.meta);
|
|
71
|
+
this.filters = new Stores_1.SearchFilterStore(this.services, data.filters, this.meta);
|
|
72
|
+
this.results = new Stores_1.SearchResultStore(this.config, this.services, (data === null || data === void 0 ? void 0 : data.results) || [], data.pagination, data.merchandising);
|
|
73
|
+
this.pagination = new Stores_1.SearchPaginationStore(this.config, this.services, data.pagination);
|
|
74
|
+
this.sorting = new Stores_1.SearchSortingStore(this.services, (data === null || data === void 0 ? void 0 : data.sorting) || [], (data === null || data === void 0 ? void 0 : data.search) || {}, this.meta);
|
|
75
75
|
};
|
|
76
76
|
return SearchStore;
|
|
77
77
|
}(AbstractStore_1.AbstractStore));
|
|
@@ -2,11 +2,11 @@ import type { UrlManager } from '@searchspring/snap-url-manager';
|
|
|
2
2
|
import type { StorageStore } from '../../Storage/StorageStore';
|
|
3
3
|
import type { AutocompleteStoreConfig, SearchStoreConfig, StoreServices } from '../../types';
|
|
4
4
|
import type { MetaResponseModel, MetaResponseModelFacet, MetaResponseModelFacetSlider, MetaResponseModelFacetValueMultipleEnum, MetaResponseModelFacetHierarchyAllOf, SearchResponseModelPagination, SearchResponseModelFacet, SearchResponseModelFacetRange, SearchResponseModelFacetValue, SearchResponseModelFacetValueAllOfValues, SearchRequestModelFilterRangeAllOfValue } from '@searchspring/snapi-types';
|
|
5
|
-
export declare class
|
|
5
|
+
export declare class SearchFacetStore extends Array {
|
|
6
6
|
static get [Symbol.species](): ArrayConstructor;
|
|
7
7
|
constructor(config: SearchStoreConfig | AutocompleteStoreConfig, services: StoreServices, storage: StorageStore, facetsData: SearchResponseModelFacet[] | undefined, pagination: SearchResponseModelPagination | undefined, meta: MetaResponseModel);
|
|
8
8
|
}
|
|
9
|
-
declare class Facet {
|
|
9
|
+
export declare class Facet {
|
|
10
10
|
services: StoreServices;
|
|
11
11
|
type: string;
|
|
12
12
|
field: string;
|
|
@@ -31,7 +31,7 @@ export declare class RangeFacet extends Facet {
|
|
|
31
31
|
constructor(config: SearchStoreConfig | AutocompleteStoreConfig, services: StoreServices, storage: StorageStore, facet: SearchResponseModelFacetRange, facetMeta: MetaResponseModelFacetSlider);
|
|
32
32
|
}
|
|
33
33
|
export declare class ValueFacet extends Facet {
|
|
34
|
-
values: Array<
|
|
34
|
+
values: Array<FacetHierarchyValue | FacetValue | FacetRangeValue | undefined>;
|
|
35
35
|
search: {
|
|
36
36
|
input: string;
|
|
37
37
|
};
|
|
@@ -46,9 +46,9 @@ export declare class ValueFacet extends Facet {
|
|
|
46
46
|
calculate: () => void;
|
|
47
47
|
};
|
|
48
48
|
constructor(config: SearchStoreConfig | AutocompleteStoreConfig, services: StoreServices, storage: StorageStore, facet: SearchResponseModelFacetValue, facetMeta: MetaResponseModelFacet);
|
|
49
|
-
get refinedValues(): (
|
|
49
|
+
get refinedValues(): (FacetHierarchyValue | FacetValue | FacetRangeValue | undefined)[];
|
|
50
50
|
}
|
|
51
|
-
export declare class
|
|
51
|
+
export declare class FacetValue {
|
|
52
52
|
label: string;
|
|
53
53
|
count: number;
|
|
54
54
|
filtered: boolean;
|
|
@@ -58,12 +58,12 @@ export declare class Value {
|
|
|
58
58
|
preview?: () => void;
|
|
59
59
|
constructor(services: StoreServices, facet: ValueFacet, value: SearchResponseModelFacetValueAllOfValues);
|
|
60
60
|
}
|
|
61
|
-
export declare class
|
|
61
|
+
export declare class FacetHierarchyValue extends FacetValue {
|
|
62
62
|
level: number;
|
|
63
63
|
history: boolean;
|
|
64
64
|
constructor(services: StoreServices, facet: ValueFacet & MetaResponseModelFacetHierarchyAllOf, value: SearchResponseModelFacetValueAllOfValues, filteredValues: SearchResponseModelFacetValueAllOfValues[]);
|
|
65
65
|
}
|
|
66
|
-
export declare class
|
|
66
|
+
export declare class FacetRangeValue {
|
|
67
67
|
label: string;
|
|
68
68
|
count: number;
|
|
69
69
|
filtered: boolean;
|
|
@@ -73,5 +73,4 @@ export declare class RangeValue {
|
|
|
73
73
|
url: UrlManager;
|
|
74
74
|
constructor(services: StoreServices, facet: ValueFacet, value: SearchResponseModelFacetValueAllOfValues);
|
|
75
75
|
}
|
|
76
|
-
|
|
77
|
-
//# sourceMappingURL=FacetStore.d.ts.map
|
|
76
|
+
//# sourceMappingURL=SearchFacetStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchFacetStore.d.ts","sourceRoot":"","sources":["../../../../src/Search/Stores/SearchFacetStore.ts"],"names":[],"mappings":"AAEA,O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C3C,KAAK,SAAK;IACV,OAAO,UAAS;gBAGtB,QAAQ,EAAE,aAAa,EACvB,KAAK,EAAE,UAAU,GAAG,oCAAoC,EACxD,KAAK,EAAE,wCAAwC,EAC/C,cAAc,EAAE,wCAAwC,EAAE;CAqB3D;AAED,qBAAa,eAAe;IACpB,KAAK,EAAG,MAAM,CAAC;IACf,KAAK,EAAG,MAAM,CAAC;IACf,QAAQ,EAAG,OAAO,CAAC;IACnB,GAAG,EAAG,MAAM,CAAC;IACb,IAAI,EAAG,MAAM,CAAC;IACd,MAAM,EAAG,EAAE,CAAC;IACZ,GAAG,EAAE,UAAU,CAAC;gBAEX,QAAQ,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,wCAAwC;CAevG"}
|
|
@@ -15,11 +15,11 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
15
15
|
};
|
|
16
16
|
})();
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.
|
|
18
|
+
exports.FacetRangeValue = exports.FacetHierarchyValue = exports.FacetValue = exports.ValueFacet = exports.RangeFacet = exports.Facet = exports.SearchFacetStore = void 0;
|
|
19
19
|
var mobx_1 = require("mobx");
|
|
20
|
-
var
|
|
21
|
-
__extends(
|
|
22
|
-
function
|
|
20
|
+
var SearchFacetStore = /** @class */ (function (_super) {
|
|
21
|
+
__extends(SearchFacetStore, _super);
|
|
22
|
+
function SearchFacetStore(config, services, storage, facetsData, pagination, meta) {
|
|
23
23
|
if (facetsData === void 0) { facetsData = []; }
|
|
24
24
|
if (pagination === void 0) { pagination = {}; }
|
|
25
25
|
var facets = facetsData
|
|
@@ -63,16 +63,16 @@ var FacetStore = /** @class */ (function (_super) {
|
|
|
63
63
|
});
|
|
64
64
|
return _super.apply(this, facets) || this;
|
|
65
65
|
}
|
|
66
|
-
Object.defineProperty(
|
|
66
|
+
Object.defineProperty(SearchFacetStore, Symbol.species, {
|
|
67
67
|
get: function () {
|
|
68
68
|
return Array;
|
|
69
69
|
},
|
|
70
70
|
enumerable: false,
|
|
71
71
|
configurable: true
|
|
72
72
|
});
|
|
73
|
-
return
|
|
73
|
+
return SearchFacetStore;
|
|
74
74
|
}(Array));
|
|
75
|
-
exports.
|
|
75
|
+
exports.SearchFacetStore = SearchFacetStore;
|
|
76
76
|
var Facet = /** @class */ (function () {
|
|
77
77
|
function Facet(services, storage, facet, facetMeta) {
|
|
78
78
|
this.filtered = false;
|
|
@@ -115,6 +115,7 @@ var Facet = /** @class */ (function () {
|
|
|
115
115
|
};
|
|
116
116
|
return Facet;
|
|
117
117
|
}());
|
|
118
|
+
exports.Facet = Facet;
|
|
118
119
|
var RangeFacet = /** @class */ (function (_super) {
|
|
119
120
|
__extends(RangeFacet, _super);
|
|
120
121
|
function RangeFacet(config, services, storage, facet, facetMeta) {
|
|
@@ -217,15 +218,15 @@ var ValueFacet = /** @class */ (function (_super) {
|
|
|
217
218
|
case 'value':
|
|
218
219
|
if (facetMeta.display === 'hierarchy') {
|
|
219
220
|
var filteredValues = ((_a = facet === null || facet === void 0 ? void 0 : facet.values) === null || _a === void 0 ? void 0 : _a.filter(function (value) { return value.filtered; })) || [];
|
|
220
|
-
return new
|
|
221
|
+
return new FacetHierarchyValue(services, _this, value, filteredValues);
|
|
221
222
|
}
|
|
222
223
|
else {
|
|
223
224
|
// converting values to strings to ensure UrlManager state matches state created from URL
|
|
224
225
|
value.value = (_b = value === null || value === void 0 ? void 0 : value.value) === null || _b === void 0 ? void 0 : _b.toString();
|
|
225
|
-
return new
|
|
226
|
+
return new FacetValue(services, _this, value);
|
|
226
227
|
}
|
|
227
228
|
case 'range-buckets':
|
|
228
|
-
return new
|
|
229
|
+
return new FacetRangeValue(services, _this, value);
|
|
229
230
|
}
|
|
230
231
|
})) ||
|
|
231
232
|
[];
|
|
@@ -268,8 +269,8 @@ var ValueFacet = /** @class */ (function (_super) {
|
|
|
268
269
|
return ValueFacet;
|
|
269
270
|
}(Facet));
|
|
270
271
|
exports.ValueFacet = ValueFacet;
|
|
271
|
-
var
|
|
272
|
-
function
|
|
272
|
+
var FacetValue = /** @class */ (function () {
|
|
273
|
+
function FacetValue(services, facet, value) {
|
|
273
274
|
Object.assign(this, value);
|
|
274
275
|
if (this.filtered) {
|
|
275
276
|
this.url = services.urlManager.remove('page').remove("filter.".concat(facet.field), value.value);
|
|
@@ -282,12 +283,12 @@ var Value = /** @class */ (function () {
|
|
|
282
283
|
this.url = valueUrl === null || valueUrl === void 0 ? void 0 : valueUrl.merge("filter.".concat(facet.field), value.value);
|
|
283
284
|
}
|
|
284
285
|
}
|
|
285
|
-
return
|
|
286
|
+
return FacetValue;
|
|
286
287
|
}());
|
|
287
|
-
exports.
|
|
288
|
-
var
|
|
289
|
-
__extends(
|
|
290
|
-
function
|
|
288
|
+
exports.FacetValue = FacetValue;
|
|
289
|
+
var FacetHierarchyValue = /** @class */ (function (_super) {
|
|
290
|
+
__extends(FacetHierarchyValue, _super);
|
|
291
|
+
function FacetHierarchyValue(services, facet, value, filteredValues) {
|
|
291
292
|
var _this = this;
|
|
292
293
|
var _a;
|
|
293
294
|
_this = _super.call(this, services, facet, value) || this;
|
|
@@ -310,11 +311,11 @@ var HierarchyValue = /** @class */ (function (_super) {
|
|
|
310
311
|
}
|
|
311
312
|
return _this;
|
|
312
313
|
}
|
|
313
|
-
return
|
|
314
|
-
}(
|
|
315
|
-
exports.
|
|
316
|
-
var
|
|
317
|
-
function
|
|
314
|
+
return FacetHierarchyValue;
|
|
315
|
+
}(FacetValue));
|
|
316
|
+
exports.FacetHierarchyValue = FacetHierarchyValue;
|
|
317
|
+
var FacetRangeValue = /** @class */ (function () {
|
|
318
|
+
function FacetRangeValue(services, facet, value) {
|
|
318
319
|
Object.assign(this, value);
|
|
319
320
|
if (this.filtered) {
|
|
320
321
|
this.url = services.urlManager.remove('page').remove("filter.".concat(facet.field), [{ low: this.low, high: this.high }]);
|
|
@@ -327,9 +328,9 @@ var RangeValue = /** @class */ (function () {
|
|
|
327
328
|
this.url = valueUrl === null || valueUrl === void 0 ? void 0 : valueUrl.merge("filter.".concat(facet.field), [{ low: this.low, high: this.high }]);
|
|
328
329
|
}
|
|
329
330
|
}
|
|
330
|
-
return
|
|
331
|
+
return FacetRangeValue;
|
|
331
332
|
}());
|
|
332
|
-
exports.
|
|
333
|
+
exports.FacetRangeValue = FacetRangeValue;
|
|
333
334
|
function escapeRegExp(string) {
|
|
334
335
|
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
|
|
335
336
|
}
|
package/dist/{esm/Search/Stores/FilterStore.d.ts → cjs/Search/Stores/SearchFilterStore.d.ts}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { UrlManager } from '@searchspring/snap-url-manager';
|
|
2
2
|
import type { StoreServices } from '../../types';
|
|
3
3
|
import type { SearchResponseModelFilter, MetaResponseModel, SearchResponseModelFilterRange, SearchResponseModelFilterValue, MetaResponseModelFacetDefaults, MetaResponseModelFacet } from '@searchspring/snapi-types';
|
|
4
|
-
export declare class
|
|
4
|
+
export declare class SearchFilterStore extends Array<RangeFilter | Filter> {
|
|
5
5
|
static get [Symbol.species](): ArrayConstructor;
|
|
6
6
|
constructor(services: StoreServices, filtersData: SearchResponseModelFilter[] | undefined, meta: MetaResponseModel);
|
|
7
7
|
}
|
|
@@ -32,4 +32,4 @@ export declare class RangeFilter {
|
|
|
32
32
|
url: UrlManager;
|
|
33
33
|
constructor(services: StoreServices, filter: SearchResponseModelFilterRange, meta: MetaResponseModelFacet & MetaResponseModelFacetDefaults);
|
|
34
34
|
}
|
|
35
|
-
//# sourceMappingURL=
|
|
35
|
+
//# sourceMappingURL=SearchFilterStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchFilterStore.d.ts","sourceRoot":"","sources":["../../../../src/Search/Stores/SearchFilterStore.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CA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(function () {
|
|
|
15
15
|
};
|
|
16
16
|
})();
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.RangeFilter = exports.Filter = exports.
|
|
18
|
+
exports.RangeFilter = exports.Filter = exports.SearchFilterStore = void 0;
|
|
19
19
|
var mobx_1 = require("mobx");
|
|
20
|
-
var
|
|
21
|
-
__extends(
|
|
22
|
-
function
|
|
20
|
+
var SearchFilterStore = /** @class */ (function (_super) {
|
|
21
|
+
__extends(SearchFilterStore, _super);
|
|
22
|
+
function SearchFilterStore(services, filtersData, meta) {
|
|
23
23
|
if (filtersData === void 0) { filtersData = []; }
|
|
24
24
|
var filters = filtersData.map(function (filter) {
|
|
25
25
|
var field = filter.field;
|
|
@@ -36,16 +36,16 @@ var FilterStore = /** @class */ (function (_super) {
|
|
|
36
36
|
});
|
|
37
37
|
return _super.apply(this, filters) || this;
|
|
38
38
|
}
|
|
39
|
-
Object.defineProperty(
|
|
39
|
+
Object.defineProperty(SearchFilterStore, Symbol.species, {
|
|
40
40
|
get: function () {
|
|
41
41
|
return Array;
|
|
42
42
|
},
|
|
43
43
|
enumerable: false,
|
|
44
44
|
configurable: true
|
|
45
45
|
});
|
|
46
|
-
return
|
|
46
|
+
return SearchFilterStore;
|
|
47
47
|
}(Array));
|
|
48
|
-
exports.
|
|
48
|
+
exports.SearchFilterStore = SearchFilterStore;
|
|
49
49
|
var Filter = /** @class */ (function () {
|
|
50
50
|
function Filter(services, filter, meta) {
|
|
51
51
|
var _a;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import type { StoreServices } from '../../types';
|
|
2
2
|
import type { SearchResponseModelMerchandising, SearchResponseModelMerchandisingContentInline } from '@searchspring/snapi-types';
|
|
3
|
-
declare enum ContentType {
|
|
3
|
+
export declare enum ContentType {
|
|
4
4
|
HEADER = "header",
|
|
5
5
|
BANNER = "banner",
|
|
6
6
|
FOOTER = "footer",
|
|
7
7
|
LEFT = "left",
|
|
8
8
|
INLINE = "inline"
|
|
9
9
|
}
|
|
10
|
-
export declare
|
|
10
|
+
export declare type BannerContent = Partial<Record<ContentType, Content>>;
|
|
11
|
+
export declare class SearchMerchandisingStore {
|
|
11
12
|
redirect: string;
|
|
12
|
-
content:
|
|
13
|
+
content: BannerContent;
|
|
13
14
|
constructor(services: StoreServices, merchData: SearchResponseModelMerchandising);
|
|
14
15
|
}
|
|
15
16
|
declare class Content extends Array<string | SearchResponseModelMerchandisingContentInline> {
|
|
@@ -17,4 +18,4 @@ declare class Content extends Array<string | SearchResponseModelMerchandisingCon
|
|
|
17
18
|
constructor(content: string[] | SearchResponseModelMerchandisingContentInline[]);
|
|
18
19
|
}
|
|
19
20
|
export {};
|
|
20
|
-
//# sourceMappingURL=
|
|
21
|
+
//# sourceMappingURL=SearchMerchandisingStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchMerchandisingStore.d.ts","sourceRoot":"","sources":["../../../../src/Search/Stores/SearchMerchandisingStore.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,gCAAgC,EAAE,6CAA6C,EAAE,MAAM,2BAA2B,CAAC;AAEjI,oBAAY,WAAW;IACtB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,MAAM,WAAW;CACjB;AAED,oBAAY,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC;AAElE,qBAAa,wBAAwB;IAC7B,QAAQ,SAAM;IACd,OAAO,EAAE,aAAa,CAAM;gBAEvB,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,gCAAgC;CAahF;AAED,cAAM,OAAQ,SAAQ,KAAK,CAAC,MAAM,GAAG,6CAA6C,CAAC;IAClF,MAAM,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,gBAAgB,CAE9C;gBAEW,OAAO,EAAE,MAAM,EAAE,GAAG,6CAA6C,EAAE;CAG/E"}
|
|
@@ -15,7 +15,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
15
15
|
};
|
|
16
16
|
})();
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.
|
|
18
|
+
exports.SearchMerchandisingStore = exports.ContentType = void 0;
|
|
19
19
|
var ContentType;
|
|
20
20
|
(function (ContentType) {
|
|
21
21
|
ContentType["HEADER"] = "header";
|
|
@@ -23,9 +23,9 @@ var ContentType;
|
|
|
23
23
|
ContentType["FOOTER"] = "footer";
|
|
24
24
|
ContentType["LEFT"] = "left";
|
|
25
25
|
ContentType["INLINE"] = "inline";
|
|
26
|
-
})(ContentType || (ContentType = {}));
|
|
27
|
-
var
|
|
28
|
-
function
|
|
26
|
+
})(ContentType = exports.ContentType || (exports.ContentType = {}));
|
|
27
|
+
var SearchMerchandisingStore = /** @class */ (function () {
|
|
28
|
+
function SearchMerchandisingStore(services, merchData) {
|
|
29
29
|
var _this = this;
|
|
30
30
|
this.redirect = '';
|
|
31
31
|
this.content = {};
|
|
@@ -40,9 +40,9 @@ var MerchandisingStore = /** @class */ (function () {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
return
|
|
43
|
+
return SearchMerchandisingStore;
|
|
44
44
|
}());
|
|
45
|
-
exports.
|
|
45
|
+
exports.SearchMerchandisingStore = SearchMerchandisingStore;
|
|
46
46
|
var Content = /** @class */ (function (_super) {
|
|
47
47
|
__extends(Content, _super);
|
|
48
48
|
function Content(content) {
|
package/dist/{esm/Search/Stores/PaginationStore.d.ts → cjs/Search/Stores/SearchPaginationStore.d.ts}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { SearchStoreConfig, StoreServices } from '../../types';
|
|
2
2
|
import type { SearchResponseModelPagination } from '@searchspring/snapi-types';
|
|
3
3
|
import type { UrlManager } from '@searchspring/snap-url-manager';
|
|
4
|
-
export declare class
|
|
4
|
+
export declare class SearchPaginationStore {
|
|
5
5
|
services: StoreServices;
|
|
6
6
|
page: number;
|
|
7
7
|
pageSize: number;
|
|
@@ -36,4 +36,4 @@ export declare class Page {
|
|
|
36
36
|
active?: boolean;
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
|
-
//# sourceMappingURL=
|
|
39
|
+
//# sourceMappingURL=SearchPaginationStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchPaginationStore.d.ts","sourceRoot":"","sources":["../../../../src/Search/Stores/SearchPaginationStore.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAEjE,qBAAa,qBAAqB;IAC1B,QAAQ,EAAE,aAAa,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE;QACvB,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;KACd,EAAE,CAAC;IACG,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,iBAAiB,CAAC;gBAG1C,MAAM,EAAE,iBAAiB,EACzB,QAAQ,EAAE,aAAa,EACvB,cAAc,GAAE,6BAMf;IA4CF,IAAW,KAAK,IAAI,MAAM,CAKzB;IAED,IAAW,GAAG,IAAI,MAAM,CAMvB;IAED,IAAW,aAAa,IAAI,OAAO,CAElC;IAED,IAAW,OAAO,IAAI,IAAI,CAKzB;IAED,IAAW,KAAK,IAAI,IAAI,CAKvB;IAED,IAAW,IAAI,IAAI,IAAI,CAKtB;IAED,IAAW,IAAI,IAAI,IAAI,GAAG,SAAS,CAMlC;IAED,IAAW,QAAQ,IAAI,IAAI,GAAG,SAAS,CAMtC;IAEM,QAAQ,CAAC,GAAG,GAAE,MAAU,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE;IAmD/C,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;CAKrC;AAED,qBAAa,IAAI;IACT,QAAQ,EAAE,aAAa,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,GAAG,EAAE,UAAU,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;gBAGlB,QAAQ,EAAE,aAAa,EACvB,IAAI,EAAE;QACL,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,OAAO,CAAC;KACjB;CAQF"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Page = exports.
|
|
3
|
+
exports.Page = exports.SearchPaginationStore = void 0;
|
|
4
4
|
var mobx_1 = require("mobx");
|
|
5
|
-
var
|
|
6
|
-
function
|
|
5
|
+
var SearchPaginationStore = /** @class */ (function () {
|
|
6
|
+
function SearchPaginationStore(config, services, paginationData) {
|
|
7
7
|
if (paginationData === void 0) { paginationData = {
|
|
8
8
|
page: undefined,
|
|
9
9
|
pageSize: undefined,
|
|
@@ -49,7 +49,7 @@ var PaginationStore = /** @class */ (function () {
|
|
|
49
49
|
setPageSize: mobx_1.action,
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
-
Object.defineProperty(
|
|
52
|
+
Object.defineProperty(SearchPaginationStore.prototype, "begin", {
|
|
53
53
|
get: function () {
|
|
54
54
|
var _a;
|
|
55
55
|
if ((_a = this.controllerConfig.settings) === null || _a === void 0 ? void 0 : _a.infinite) {
|
|
@@ -60,7 +60,7 @@ var PaginationStore = /** @class */ (function () {
|
|
|
60
60
|
enumerable: false,
|
|
61
61
|
configurable: true
|
|
62
62
|
});
|
|
63
|
-
Object.defineProperty(
|
|
63
|
+
Object.defineProperty(SearchPaginationStore.prototype, "end", {
|
|
64
64
|
get: function () {
|
|
65
65
|
if (this.pageSize * this.page > this.totalResults) {
|
|
66
66
|
return this.totalResults;
|
|
@@ -70,14 +70,14 @@ var PaginationStore = /** @class */ (function () {
|
|
|
70
70
|
enumerable: false,
|
|
71
71
|
configurable: true
|
|
72
72
|
});
|
|
73
|
-
Object.defineProperty(
|
|
73
|
+
Object.defineProperty(SearchPaginationStore.prototype, "multiplePages", {
|
|
74
74
|
get: function () {
|
|
75
75
|
return this.pageSize < this.totalResults;
|
|
76
76
|
},
|
|
77
77
|
enumerable: false,
|
|
78
78
|
configurable: true
|
|
79
79
|
});
|
|
80
|
-
Object.defineProperty(
|
|
80
|
+
Object.defineProperty(SearchPaginationStore.prototype, "current", {
|
|
81
81
|
get: function () {
|
|
82
82
|
return new Page(this.services, {
|
|
83
83
|
number: this.page,
|
|
@@ -87,7 +87,7 @@ var PaginationStore = /** @class */ (function () {
|
|
|
87
87
|
enumerable: false,
|
|
88
88
|
configurable: true
|
|
89
89
|
});
|
|
90
|
-
Object.defineProperty(
|
|
90
|
+
Object.defineProperty(SearchPaginationStore.prototype, "first", {
|
|
91
91
|
get: function () {
|
|
92
92
|
return new Page(this.services, {
|
|
93
93
|
number: 1,
|
|
@@ -97,7 +97,7 @@ var PaginationStore = /** @class */ (function () {
|
|
|
97
97
|
enumerable: false,
|
|
98
98
|
configurable: true
|
|
99
99
|
});
|
|
100
|
-
Object.defineProperty(
|
|
100
|
+
Object.defineProperty(SearchPaginationStore.prototype, "last", {
|
|
101
101
|
get: function () {
|
|
102
102
|
return new Page(this.services, {
|
|
103
103
|
number: this.totalPages,
|
|
@@ -107,7 +107,7 @@ var PaginationStore = /** @class */ (function () {
|
|
|
107
107
|
enumerable: false,
|
|
108
108
|
configurable: true
|
|
109
109
|
});
|
|
110
|
-
Object.defineProperty(
|
|
110
|
+
Object.defineProperty(SearchPaginationStore.prototype, "next", {
|
|
111
111
|
get: function () {
|
|
112
112
|
if (this.page < this.totalPages) {
|
|
113
113
|
return new Page(this.services, {
|
|
@@ -118,7 +118,7 @@ var PaginationStore = /** @class */ (function () {
|
|
|
118
118
|
enumerable: false,
|
|
119
119
|
configurable: true
|
|
120
120
|
});
|
|
121
|
-
Object.defineProperty(
|
|
121
|
+
Object.defineProperty(SearchPaginationStore.prototype, "previous", {
|
|
122
122
|
get: function () {
|
|
123
123
|
if (this.page > 1) {
|
|
124
124
|
return new Page(this.services, {
|
|
@@ -129,7 +129,7 @@ var PaginationStore = /** @class */ (function () {
|
|
|
129
129
|
enumerable: false,
|
|
130
130
|
configurable: true
|
|
131
131
|
});
|
|
132
|
-
|
|
132
|
+
SearchPaginationStore.prototype.getPages = function (min, max) {
|
|
133
133
|
if (min === void 0) { min = 5; }
|
|
134
134
|
if (!Number.isInteger(min)) {
|
|
135
135
|
return [];
|
|
@@ -169,14 +169,14 @@ var PaginationStore = /** @class */ (function () {
|
|
|
169
169
|
}
|
|
170
170
|
return pages;
|
|
171
171
|
};
|
|
172
|
-
|
|
172
|
+
SearchPaginationStore.prototype.setPageSize = function (num) {
|
|
173
173
|
if (num) {
|
|
174
174
|
this.services.urlManager.remove('page').set('pageSize', num).go();
|
|
175
175
|
}
|
|
176
176
|
};
|
|
177
|
-
return
|
|
177
|
+
return SearchPaginationStore;
|
|
178
178
|
}());
|
|
179
|
-
exports.
|
|
179
|
+
exports.SearchPaginationStore = SearchPaginationStore;
|
|
180
180
|
var Page = /** @class */ (function () {
|
|
181
181
|
function Page(services, page) {
|
|
182
182
|
var _a, _b;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { UrlManager } from '@searchspring/snap-url-manager';
|
|
2
2
|
import type { StoreServices } from '../../types';
|
|
3
3
|
import type { SearchResponseModelSearch, SearchResponseModelSearchMatchTypeEnum } from '@searchspring/snapi-types';
|
|
4
|
-
export declare class
|
|
4
|
+
export declare class SearchQueryStore {
|
|
5
5
|
query?: Query;
|
|
6
6
|
didYouMean?: Query;
|
|
7
7
|
originalQuery?: Query;
|
|
@@ -14,4 +14,4 @@ declare class Query {
|
|
|
14
14
|
constructor(services: StoreServices, query: string);
|
|
15
15
|
}
|
|
16
16
|
export {};
|
|
17
|
-
//# sourceMappingURL=
|
|
17
|
+
//# sourceMappingURL=SearchQueryStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchQueryStore.d.ts","sourceRoot":"","sources":["../../../../src/Search/Stores/SearchQueryStore.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,yBAAyB,EAAE,sCAAsC,EAAE,MAAM,2BAA2B,CAAC;AAEnH,qBAAa,gBAAgB;IACrB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,UAAU,CAAC,EAAE,KAAK,CAAC;IACnB,aAAa,CAAC,EAAE,KAAK,CAAC;IACtB,SAAS,CAAC,EAAE,sCAAsC,CAAC;gBAE9C,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,yBAAyB;CAyBtE;AASD,cAAM,KAAK;IACH,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,UAAU,CAAC;gBAEX,QAAQ,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM;CASlD"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.SearchQueryStore = void 0;
|
|
4
4
|
var mobx_1 = require("mobx");
|
|
5
|
-
var
|
|
6
|
-
function
|
|
5
|
+
var SearchQueryStore = /** @class */ (function () {
|
|
6
|
+
function SearchQueryStore(services, search) {
|
|
7
7
|
var observables = {};
|
|
8
8
|
if (search === null || search === void 0 ? void 0 : search.query) {
|
|
9
9
|
this.query = new Query(services, search.query);
|
|
@@ -23,9 +23,9 @@ var QueryStore = /** @class */ (function () {
|
|
|
23
23
|
}
|
|
24
24
|
(0, mobx_1.makeObservable)(this, observables);
|
|
25
25
|
}
|
|
26
|
-
return
|
|
26
|
+
return SearchQueryStore;
|
|
27
27
|
}());
|
|
28
|
-
exports.
|
|
28
|
+
exports.SearchQueryStore = SearchQueryStore;
|
|
29
29
|
var Query = /** @class */ (function () {
|
|
30
30
|
function Query(services, query) {
|
|
31
31
|
this.string = query;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SearchStoreConfig, AutocompleteStoreConfig, StoreServices } from '../../types';
|
|
2
2
|
import type { SearchResponseModelResult, SearchResponseModelPagination, SearchResponseModelMerchandising, SearchResponseModelResultMappings, SearchResponseModelMerchandisingContentInline, SearchResponseModelMerchandisingContentConfig } from '@searchspring/snapi-types';
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class SearchResultStore extends Array<Product | Banner> {
|
|
4
4
|
static get [Symbol.species](): ArrayConstructor;
|
|
5
5
|
constructor(config: SearchStoreConfig | AutocompleteStoreConfig, services: StoreServices, resultData?: SearchResponseModelResult[], paginationData?: SearchResponseModelPagination, merchData?: SearchResponseModelMerchandising);
|
|
6
6
|
}
|
|
@@ -31,4 +31,4 @@ declare class Child {
|
|
|
31
31
|
constructor(services: StoreServices, result: SearchResponseModelResult);
|
|
32
32
|
}
|
|
33
33
|
export {};
|
|
34
|
-
//# sourceMappingURL=
|
|
34
|
+
//# sourceMappingURL=SearchResultStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchResultStore.d.ts","sourceRoot":"","sources":["../../../../src/Search/Stores/SearchResultStore.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC7F,OAAO,KAAK,EACX,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