@searchspring/snap-store-mobx 0.72.2 → 0.73.6
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 +2 -1
- package/dist/cjs/Autocomplete/AutocompleteStore.d.ts.map +1 -1
- package/dist/cjs/Autocomplete/AutocompleteStore.js +3 -4
- package/dist/cjs/Autocomplete/Stores/AutocompleteHistoryStore.d.ts.map +1 -1
- package/dist/cjs/Autocomplete/Stores/AutocompleteHistoryStore.js +1 -1
- package/dist/cjs/Autocomplete/Stores/AutocompleteStateStore.d.ts +2 -0
- package/dist/cjs/Autocomplete/Stores/AutocompleteStateStore.d.ts.map +1 -1
- package/dist/cjs/Autocomplete/Stores/AutocompleteStateStore.js +1 -0
- package/dist/cjs/Autocomplete/Stores/AutocompleteTermStore.d.ts +3 -2
- package/dist/cjs/Autocomplete/Stores/AutocompleteTermStore.d.ts.map +1 -1
- package/dist/cjs/Autocomplete/Stores/AutocompleteTermStore.js +4 -2
- package/dist/cjs/Autocomplete/Stores/AutocompleteTrendingStore.d.ts.map +1 -1
- package/dist/cjs/Autocomplete/Stores/AutocompleteTrendingStore.js +1 -1
- package/dist/cjs/Finder/FinderStore.d.ts +1 -1
- package/dist/cjs/Finder/FinderStore.d.ts.map +1 -1
- package/dist/cjs/Finder/FinderStore.js +3 -1
- package/dist/cjs/Recommendation/RecommendationStore.d.ts.map +1 -1
- package/dist/cjs/Recommendation/RecommendationStore.js +1 -1
- package/dist/cjs/Search/SearchStore.d.ts.map +1 -1
- package/dist/cjs/Search/SearchStore.js +4 -3
- package/dist/cjs/Search/Stores/SearchMerchandisingStore.d.ts +10 -4
- package/dist/cjs/Search/Stores/SearchMerchandisingStore.d.ts.map +1 -1
- package/dist/cjs/Search/Stores/SearchMerchandisingStore.js +15 -2
- package/dist/cjs/Search/Stores/SearchResultStore.d.ts +7 -5
- package/dist/cjs/Search/Stores/SearchResultStore.d.ts.map +1 -1
- package/dist/cjs/Search/Stores/SearchResultStore.js +32 -9
- package/dist/cjs/Search/Stores/index.d.ts +1 -1
- package/dist/cjs/Search/Stores/index.d.ts.map +1 -1
- package/dist/esm/Autocomplete/AutocompleteStore.d.ts +2 -1
- package/dist/esm/Autocomplete/AutocompleteStore.d.ts.map +1 -1
- package/dist/esm/Autocomplete/AutocompleteStore.js +4 -4
- package/dist/esm/Autocomplete/Stores/AutocompleteHistoryStore.d.ts.map +1 -1
- package/dist/esm/Autocomplete/Stores/AutocompleteHistoryStore.js +1 -1
- package/dist/esm/Autocomplete/Stores/AutocompleteStateStore.d.ts +2 -0
- package/dist/esm/Autocomplete/Stores/AutocompleteStateStore.d.ts.map +1 -1
- package/dist/esm/Autocomplete/Stores/AutocompleteStateStore.js +1 -0
- package/dist/esm/Autocomplete/Stores/AutocompleteTermStore.d.ts +3 -2
- package/dist/esm/Autocomplete/Stores/AutocompleteTermStore.d.ts.map +1 -1
- package/dist/esm/Autocomplete/Stores/AutocompleteTermStore.js +4 -2
- package/dist/esm/Autocomplete/Stores/AutocompleteTrendingStore.d.ts.map +1 -1
- package/dist/esm/Autocomplete/Stores/AutocompleteTrendingStore.js +1 -1
- package/dist/esm/Finder/FinderStore.d.ts +1 -1
- package/dist/esm/Finder/FinderStore.d.ts.map +1 -1
- package/dist/esm/Finder/FinderStore.js +3 -1
- package/dist/esm/Recommendation/RecommendationStore.d.ts.map +1 -1
- package/dist/esm/Recommendation/RecommendationStore.js +1 -1
- package/dist/esm/Search/SearchStore.d.ts.map +1 -1
- package/dist/esm/Search/SearchStore.js +5 -3
- package/dist/esm/Search/Stores/SearchMerchandisingStore.d.ts +10 -4
- package/dist/esm/Search/Stores/SearchMerchandisingStore.d.ts.map +1 -1
- package/dist/esm/Search/Stores/SearchMerchandisingStore.js +14 -2
- package/dist/esm/Search/Stores/SearchResultStore.d.ts +7 -5
- package/dist/esm/Search/Stores/SearchResultStore.d.ts.map +1 -1
- package/dist/esm/Search/Stores/SearchResultStore.js +31 -8
- package/dist/esm/Search/Stores/index.d.ts +1 -1
- package/dist/esm/Search/Stores/index.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -3,7 +3,7 @@ import { AbstractStore } from '../Abstract/AbstractStore';
|
|
|
3
3
|
import { SearchFilterStore, SearchResultStore, SearchMerchandisingStore, SearchPaginationStore, SearchSortingStore } from '../Search/Stores';
|
|
4
4
|
import { StorageStore } from '../Storage/StorageStore';
|
|
5
5
|
import { AutocompleteStateStore, AutocompleteTermStore, AutocompleteQueryStore, AutocompleteFacetStore, AutocompleteTrendingStore, AutocompleteHistoryStore } from './Stores';
|
|
6
|
-
import type { AutocompleteResponseModel, MetaResponseModel } from '@searchspring/snapi-types';
|
|
6
|
+
import type { AutocompleteResponseModel, MetaResponseModel, SearchResponseModelTracking } from '@searchspring/snapi-types';
|
|
7
7
|
import type { TrendingResponseModel } from '@searchspring/snap-client';
|
|
8
8
|
import type { AutocompleteStoreConfig, StoreServices } from '../types';
|
|
9
9
|
import { MetaStore } from '../Meta/MetaStore';
|
|
@@ -33,6 +33,7 @@ export declare class AutocompleteStore extends AbstractStore {
|
|
|
33
33
|
updateTrendingTerms(data: TrendingResponseModel): void;
|
|
34
34
|
update(data?: AutocompleteResponseModel & {
|
|
35
35
|
meta?: MetaResponseModel;
|
|
36
|
+
tracking?: SearchResponseModelTracking;
|
|
36
37
|
}): void;
|
|
37
38
|
}
|
|
38
39
|
//# sourceMappingURL=AutocompleteStore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutocompleteStore.d.ts","sourceRoot":"","sources":["../../../src/Autocomplete/AutocompleteStore.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EACN,iBAAiB,EACjB,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,EACrB,kBAAkB,EAElB,M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AG,sBAAsB,CAAC;IAChC,OAAO,EAAG,iBAAiB,CAAC;IAC5B,OAAO,EAAG,iBAAiB,CAAC;IAC5B,UAAU,EAAG,qBAAqB,CAAC;IACnC,OAAO,EAAG,kBAAkB,CAAC;IAC7B,KAAK,EAAE,sBAAsB,CAAC;IAC9B,OAAO,EAAE,YAAY,CAAC;IACtB,QAAQ,EAAE,yBAAyB,CAAC;IACpC,OAAO,EAAE,wBAAwB,CAAC;gBAE7B,MAAM,EAAE,uBAAuB,EAAE,QAAQ,EAAE,aAAa;IAiC7D,KAAK,IAAI,IAAI;IAMb,WAAW,IAAI,IAAI;IAgBnB,UAAU,IAAI,IAAI;IAMlB,gBAAgB,IAAI,IAAI;IAIxB,aAAa,IAAI,IAAI;IAIrB,YAAY,IAAI,IAAI;IAIpB,UAAU,CAAC,IAAI,EAAE,MAAM,aAAa,EAAE,OAAO,EAAE,UAAU,GAAG,IAAI;IAUhE,mBAAmB,CAAC,IAAI,EAAE,qBAAqB,GAAG,IAAI;IAWtD,MAAM,CAAC,IAAI,CAAC,EAAE,yBAAyB,GAAG;QAAE,IAAI,CAAC,EAAE,iBAAiB,CAAC;QAAC,QAAQ,CAAC,EAAE,2BAA2B,CAAA;KAAE,GAAG,IAAI;CAqE5H"}
|
|
@@ -102,9 +102,8 @@ var AutocompleteStore = /** @class */ (function (_super) {
|
|
|
102
102
|
AutocompleteStore.prototype.update = function (data) {
|
|
103
103
|
var _this = this;
|
|
104
104
|
var _a;
|
|
105
|
-
if (data === void 0) { data = {}; }
|
|
106
105
|
if (!data)
|
|
107
|
-
|
|
106
|
+
data = { tracking: { responseId: '' } }; // tracking is required
|
|
108
107
|
this.error = undefined;
|
|
109
108
|
this.meta = new MetaStore_1.MetaStore(data.meta);
|
|
110
109
|
// set the query to match the actual queried term and not the input query
|
|
@@ -119,14 +118,14 @@ var AutocompleteStore = /** @class */ (function (_super) {
|
|
|
119
118
|
// only lock if there was data
|
|
120
119
|
data.autocomplete && this.state.locks.terms.lock();
|
|
121
120
|
}
|
|
122
|
-
this.merchandising = new Stores_1.SearchMerchandisingStore(this.services, data.merchandising || {});
|
|
121
|
+
this.merchandising = new Stores_1.SearchMerchandisingStore(this.services, data.merchandising || {}, data.tracking || {});
|
|
123
122
|
this.search = new Stores_2.AutocompleteQueryStore(this.services, data.autocomplete || {}, data.search || {}, this.config);
|
|
124
123
|
// only run if we want to update the facets (not locked)
|
|
125
124
|
if (!this.state.locks.facets.locked) {
|
|
126
125
|
this.facets = new Stores_2.AutocompleteFacetStore(this.config, this.services, this.storage, data.facets || [], data.pagination || {}, this.meta.data, this.state, data.merchandising || {});
|
|
127
126
|
}
|
|
128
127
|
this.filters = new Stores_1.SearchFilterStore(this.services, data.filters, this.meta.data);
|
|
129
|
-
this.results = new Stores_1.SearchResultStore(this.config, this.services, this.meta.data, data.results || [], data.pagination, data.merchandising, this.loaded);
|
|
128
|
+
this.results = new Stores_1.SearchResultStore(this.config, this.services, this.meta.data, data.tracking, data.results || [], data.pagination, data.merchandising, this.loaded);
|
|
130
129
|
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)) {
|
|
131
130
|
// if a trending term was selected and then a subsequent search yields no results, reset trending terms to remove active state
|
|
132
131
|
// OR if any terms are active, also reset to ensure only a single term or trending term is active
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutocompleteHistoryStore.d.ts","sourceRoot":"","sources":["../../../../src/Autocomplete/Stores/AutocompleteHistoryStore.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AutocompleteHistoryStore.d.ts","sourceRoot":"","sources":["../../../../src/Autocomplete/Stores/AutocompleteHistoryStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAE/C,qBAAa,wBAAyB,SAAQ,KAAK,CAAC,IAAI,CAAC;IACxD,MAAM,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,gBAAgB,CAE9C;gBAEW,QAAQ,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,MAAM,IAAI,EAAE,SAAS,EAAE,sBAAsB;CAqBjH"}
|
|
@@ -25,7 +25,7 @@ var AutocompleteHistoryStore = /** @class */ (function (_super) {
|
|
|
25
25
|
terms.push(new AutocompleteTermStore_1.Term(services, {
|
|
26
26
|
active: false,
|
|
27
27
|
value: query,
|
|
28
|
-
}, terms, resetTerms, rootState));
|
|
28
|
+
}, terms, resetTerms, rootState, 'historical'));
|
|
29
29
|
});
|
|
30
30
|
return _super.apply(this, terms) || this;
|
|
31
31
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { UrlManager } from '@searchspring/snap-url-manager';
|
|
2
2
|
import type { StoreServices } from '../../types';
|
|
3
|
+
import type { AutocompleteRequestModelSearchSourceEnum } from '@searchspring/snapi-types';
|
|
3
4
|
export declare class AutocompleteStateStore {
|
|
4
5
|
locks: {
|
|
5
6
|
terms: Lock;
|
|
@@ -7,6 +8,7 @@ export declare class AutocompleteStateStore {
|
|
|
7
8
|
};
|
|
8
9
|
focusedInput: HTMLInputElement | undefined;
|
|
9
10
|
input: string | undefined;
|
|
11
|
+
source: AutocompleteRequestModelSearchSourceEnum;
|
|
10
12
|
url: UrlManager;
|
|
11
13
|
constructor(services: StoreServices);
|
|
12
14
|
reset(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutocompleteStateStore.d.ts","sourceRoot":"","sources":["../../../../src/Autocomplete/Stores/AutocompleteStateStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"AutocompleteStateStore.d.ts","sourceRoot":"","sources":["../../../../src/Autocomplete/Stores/AutocompleteStateStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,wCAAwC,EAAE,MAAM,2BAA2B,CAAC;AAE1F,qBAAa,sBAAsB;IAC3B,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,MAAM,EAAE,wCAAwC,CAAuD;IACvG,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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { UrlManager } from '@searchspring/snap-url-manager';
|
|
2
2
|
import type { AutocompleteStateStore } from './AutocompleteStateStore';
|
|
3
3
|
import type { AutocompleteStoreConfig, StoreServices } from '../../types';
|
|
4
|
-
import type { AutocompleteResponseModelAllOfAutocomplete, SearchResponseModelPagination, SearchResponseModelSearch } from '@searchspring/snapi-types';
|
|
4
|
+
import type { AutocompleteRequestModelSearchSourceEnum, AutocompleteResponseModelAllOfAutocomplete, SearchResponseModelPagination, SearchResponseModelSearch } from '@searchspring/snapi-types';
|
|
5
5
|
export declare class AutocompleteTermStore extends Array<Term> {
|
|
6
6
|
static get [Symbol.species](): ArrayConstructor;
|
|
7
7
|
constructor(services: StoreServices, autocomplete: AutocompleteResponseModelAllOfAutocomplete, paginationData: SearchResponseModelPagination, search: SearchResponseModelSearch, resetTerms: () => void, rootState: AutocompleteStateStore, config: AutocompleteStoreConfig);
|
|
@@ -11,9 +11,10 @@ export declare class Term {
|
|
|
11
11
|
value: string;
|
|
12
12
|
preview: () => void;
|
|
13
13
|
url: UrlManager;
|
|
14
|
+
type: AutocompleteRequestModelSearchSourceEnum;
|
|
14
15
|
constructor(services: StoreServices, term: {
|
|
15
16
|
active: boolean;
|
|
16
17
|
value: string;
|
|
17
|
-
}, terms: Term[], resetTerms: () => void, rootState: AutocompleteStateStore);
|
|
18
|
+
}, terms: Term[], resetTerms: () => void, rootState: AutocompleteStateStore, type: AutocompleteRequestModelSearchSourceEnum);
|
|
18
19
|
}
|
|
19
20
|
//# sourceMappingURL=AutocompleteTermStore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutocompleteTermStore.d.ts","sourceRoot":"","sources":["../../../../src/Autocomplete/Stores/AutocompleteTermStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,KAAK,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"AutocompleteTermStore.d.ts","sourceRoot":"","sources":["../../../../src/Autocomplete/Stores/AutocompleteTermStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,KAAK,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,KAAK,EACX,wCAAwC,EACxC,0CAA0C,EAC1C,6BAA6B,EAC7B,yBAAyB,EACzB,MAAM,2BAA2B,CAAC;AAEnC,qBAAa,qBAAsB,SAAQ,KAAK,CAAC,IAAI,CAAC;IACrD,MAAM,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,gBAAgB,CAE9C;gBAGA,QAAQ,EAAE,aAAa,EACvB,YAAY,EAAE,0CAA0C,EACxD,cAAc,EAAE,6BAA6B,EAC7C,MAAM,EAAE,yBAAyB,EACjC,UAAU,EAAE,MAAM,IAAI,EACtB,SAAS,EAAE,sBAAsB,EACjC,MAAM,EAAE,uBAAuB;CA4ChC;AAED,qBAAa,IAAI;IACT,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,GAAG,EAAE,UAAU,CAAC;IAChB,IAAI,EAAE,wCAAwC,CAAC;gBAGrD,QAAQ,EAAE,aAAa,EACvB,IAAI,EAAE;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EACxC,KAAK,EAAE,IAAI,EAAE,EACb,UAAU,EAAE,MAAM,IAAI,EACtB,SAAS,EAAE,sBAAsB,EACjC,IAAI,EAAE,wCAAwC;CA0B/C"}
|
|
@@ -57,7 +57,7 @@ var AutocompleteTermStore = /** @class */ (function (_super) {
|
|
|
57
57
|
return terms.push(new Term(services, {
|
|
58
58
|
active: index === 0,
|
|
59
59
|
value: term,
|
|
60
|
-
}, terms, resetTerms, rootState));
|
|
60
|
+
}, terms, resetTerms, rootState, 'suggested'));
|
|
61
61
|
});
|
|
62
62
|
return _super.apply(this, terms) || this;
|
|
63
63
|
}
|
|
@@ -72,11 +72,12 @@ var AutocompleteTermStore = /** @class */ (function (_super) {
|
|
|
72
72
|
}(Array));
|
|
73
73
|
exports.AutocompleteTermStore = AutocompleteTermStore;
|
|
74
74
|
var Term = /** @class */ (function () {
|
|
75
|
-
function Term(services, term, terms, resetTerms, rootState) {
|
|
75
|
+
function Term(services, term, terms, resetTerms, rootState, type) {
|
|
76
76
|
var _this = this;
|
|
77
77
|
var _a;
|
|
78
78
|
this.active = term.active;
|
|
79
79
|
this.value = term.value;
|
|
80
|
+
this.type = type;
|
|
80
81
|
this.url = (_a = services === null || services === void 0 ? void 0 : services.urlManager) === null || _a === void 0 ? void 0 : _a.set({ query: this.value });
|
|
81
82
|
this.preview = function () {
|
|
82
83
|
var _a;
|
|
@@ -84,6 +85,7 @@ var Term = /** @class */ (function () {
|
|
|
84
85
|
terms.map(function (term) {
|
|
85
86
|
term.active = false;
|
|
86
87
|
});
|
|
88
|
+
rootState.source = type;
|
|
87
89
|
_this.active = true;
|
|
88
90
|
rootState.locks.terms.lock();
|
|
89
91
|
rootState.locks.facets.unlock();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutocompleteTrendingStore.d.ts","sourceRoot":"","sources":["../../../../src/Autocomplete/Stores/AutocompleteTrendingStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"AutocompleteTrendingStore.d.ts","sourceRoot":"","sources":["../../../../src/Autocomplete/Stores/AutocompleteTrendingStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAG/C,qBAAa,yBAA0B,SAAQ,KAAK,CAAC,IAAI,CAAC;IACzD,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,sBAAsB;CAqBnI"}
|
|
@@ -26,7 +26,7 @@ var AutocompleteTrendingStore = /** @class */ (function (_super) {
|
|
|
26
26
|
terms.push(new AutocompleteTermStore_1.Term(services, {
|
|
27
27
|
active: false,
|
|
28
28
|
value: term.searchQuery,
|
|
29
|
-
}, terms, resetTerms, rootState));
|
|
29
|
+
}, terms, resetTerms, rootState, 'popular'));
|
|
30
30
|
});
|
|
31
31
|
return _super.apply(this, terms) || this;
|
|
32
32
|
}
|
|
@@ -20,7 +20,7 @@ export declare class FinderStore extends AbstractStore {
|
|
|
20
20
|
save: () => void;
|
|
21
21
|
reset: () => void;
|
|
22
22
|
loadPersisted(): void;
|
|
23
|
-
update(data
|
|
23
|
+
update(data?: SearchResponseModel & {
|
|
24
24
|
meta?: MetaResponseModel;
|
|
25
25
|
}, selectedSelections?: SelectedSelection[]): void;
|
|
26
26
|
}
|
|
@@ -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,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,iBAAiB,E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AE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACtG,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,qBAAa,WAAY,SAAQ,aAAa;IACtC,QAAQ,EAAE,aAAa,CAAC;IACxB,MAAM,EAAG,iBAAiB,CAAC;IAC3B,IAAI,EAAG,SAAS,CAAC;IACjB,OAAO,EAAE,YAAY,CAAC;IACtB,gBAAgB,EAAG,YAAY,CAAC;IAChC,UAAU,EAAG,qBAAqB,CAAC;IACnC,UAAU,EAAG,oBAAoB,CAAC;IAClC,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;IAQhE,IAAI,EAAE,MAAM,IAAI,CAAY;IAE5B,KAAK,QAAO,IAAI,CAWrB;IAEK,aAAa,IAAI,IAAI;IAyBrB,MAAM,CAAC,IAAI,CAAC,EAAE,mBAAmB,GAAG;QAAE,IAAI,CAAC,EAAE,iBAAiB,CAAA;KAAE,EAAE,kBAAkB,CAAC,EAAE,iBAAiB,EAAE,GAAG,IAAI;CAkCxH"}
|
|
@@ -67,7 +67,7 @@ var FinderStore = /** @class */ (function (_super) {
|
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
69
|
_this.storage = new StorageStore_1.StorageStore();
|
|
70
|
-
_this.update(
|
|
70
|
+
_this.update();
|
|
71
71
|
(0, mobx_1.makeObservable)(_this, {
|
|
72
72
|
selections: mobx_1.observable,
|
|
73
73
|
pagination: mobx_1.observable,
|
|
@@ -105,6 +105,8 @@ var FinderStore = /** @class */ (function (_super) {
|
|
|
105
105
|
};
|
|
106
106
|
FinderStore.prototype.update = function (data, selectedSelections) {
|
|
107
107
|
var _this = this;
|
|
108
|
+
if (!data)
|
|
109
|
+
data = { tracking: { responseId: '' } }; // tracking is required
|
|
108
110
|
this.error = undefined;
|
|
109
111
|
this.loaded = !!data.pagination;
|
|
110
112
|
this.meta = new MetaStore_1.MetaStore(data.meta);
|
|
@@ -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,OAAO,EAAqB,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,yBAAyB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzE,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,qBAAa,mBAAoB,SAAQ,aAAa;IAC9C,QAAQ,EAAE,aAAa,CAAC;IACxB,IAAI,EAAG,SAAS,CAAC;IACjB,MAAM,UAAS;IACf,OAAO,EAAG,0BAA0B,CAAC;IACrC,OAAO,EAAG,OAAO,EAAE,CAAC;IACpB,IAAI,EAAG,SAAS,CAAC;gBAEZ,MAAM,EAAE,yBAAyB,EAAE,QAAQ,EAAE,aAAa;IAiB/D,KAAK,IAAI,IAAI;IAIb,MAAM,CAAC,IAAI,CAAC,EAAE,8BAA8B,GAAG;QAAE,IAAI,CAAC,EAAE,iBAAiB,CAAA;KAAE,GAAG,IAAI;
|
|
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,OAAO,EAAqB,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,yBAAyB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzE,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,qBAAa,mBAAoB,SAAQ,aAAa;IAC9C,QAAQ,EAAE,aAAa,CAAC;IACxB,IAAI,EAAG,SAAS,CAAC;IACjB,MAAM,UAAS;IACf,OAAO,EAAG,0BAA0B,CAAC;IACrC,OAAO,EAAG,OAAO,EAAE,CAAC;IACpB,IAAI,EAAG,SAAS,CAAC;gBAEZ,MAAM,EAAE,yBAAyB,EAAE,QAAQ,EAAE,aAAa;IAiB/D,KAAK,IAAI,IAAI;IAIb,MAAM,CAAC,IAAI,CAAC,EAAE,8BAA8B,GAAG;QAAE,IAAI,CAAC,EAAE,iBAAiB,CAAA;KAAE,GAAG,IAAI;CAsBzF"}
|
|
@@ -46,7 +46,7 @@ var RecommendationStore = /** @class */ (function (_super) {
|
|
|
46
46
|
this.error = undefined;
|
|
47
47
|
this.meta = new MetaStore_1.MetaStore(data === null || data === void 0 ? void 0 : data.meta);
|
|
48
48
|
this.profile = new Stores_2.RecommendationProfileStore(this.services, data);
|
|
49
|
-
this.results = new Stores_1.SearchResultStore(this.config, this.services, this.meta.data, data === null || data === void 0 ? void 0 : data.results, undefined, undefined, this.loaded);
|
|
49
|
+
this.results = new Stores_1.SearchResultStore(this.config, this.services, this.meta.data, { responseId: (data === null || data === void 0 ? void 0 : data.responseId) || '' }, data === null || data === void 0 ? void 0 : data.results, undefined, undefined, this.loaded);
|
|
50
50
|
// only create a cart store when type is bundle
|
|
51
51
|
if (this.profile.type == 'bundle') {
|
|
52
52
|
this.cart = new CartStore_1.CartStore();
|
|
@@ -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,EACN,wBAAwB,EACxB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,qBAAa,WAAY,SAAQ,aAAa;IAC7C,QAAgB,YAAY,CAAqD;IAC1E,QAAQ,EAAE,aAAa,CAAC;IACxB,IAAI,EAAG,SAAS,CAAC;IACjB,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;IACtB,OAAO,EAAE,kBAAkB,CAAC;gBAEvB,MAAM,EAAE,iBAAiB,EAAE,QAAQ,EAAE,aAAa;IAiDvD,KAAK,IAAI,IAAI;IAIb,MAAM,CAAC,IAAI,
|
|
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,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,qBAAa,WAAY,SAAQ,aAAa;IAC7C,QAAgB,YAAY,CAAqD;IAC1E,QAAQ,EAAE,aAAa,CAAC;IACxB,IAAI,EAAG,SAAS,CAAC;IACjB,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;IACtB,OAAO,EAAE,kBAAkB,CAAC;gBAEvB,MAAM,EAAE,iBAAiB,EAAE,QAAQ,EAAE,aAAa;IAiDvD,KAAK,IAAI,IAAI;IAIb,MAAM,CAAC,IAAI,CAAC,EAAE,mBAAmB,GAAG;QAAE,IAAI,CAAC,EAAE,iBAAiB,CAAA;KAAE,GAAG,IAAI;CAoC9E"}
|
|
@@ -69,14 +69,15 @@ var SearchStore = /** @class */ (function (_super) {
|
|
|
69
69
|
};
|
|
70
70
|
SearchStore.prototype.update = function (data) {
|
|
71
71
|
var _a;
|
|
72
|
-
if (data
|
|
72
|
+
if (!data)
|
|
73
|
+
data = { tracking: { responseId: '' } }; // tracking is required
|
|
73
74
|
this.error = undefined;
|
|
74
75
|
this.meta = new MetaStore_1.MetaStore(data.meta);
|
|
75
|
-
this.merchandising = new Stores_1.SearchMerchandisingStore(this.services, (data === null || data === void 0 ? void 0 : data.merchandising) || {});
|
|
76
|
+
this.merchandising = new Stores_1.SearchMerchandisingStore(this.services, (data === null || data === void 0 ? void 0 : data.merchandising) || {}, data.tracking || {});
|
|
76
77
|
this.search = new Stores_1.SearchQueryStore(this.services, (data === null || data === void 0 ? void 0 : data.search) || {});
|
|
77
78
|
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.data, (data === null || data === void 0 ? void 0 : data.merchandising) || {});
|
|
78
79
|
this.filters = new Stores_1.SearchFilterStore(this.services, data.filters, this.meta.data);
|
|
79
|
-
this.results = new Stores_1.SearchResultStore(this.config, this.services, this.meta.data, (data === null || data === void 0 ? void 0 : data.results) || [], data.pagination, data.merchandising, this.loaded, (_a = this.previousData) === null || _a === void 0 ? void 0 : _a.pagination
|
|
80
|
+
this.results = new Stores_1.SearchResultStore(this.config, this.services, this.meta.data, data.tracking || {}, (data === null || data === void 0 ? void 0 : data.results) || [], data.pagination, data.merchandising, this.loaded, (_a = this.previousData) === null || _a === void 0 ? void 0 : _a.pagination
|
|
80
81
|
// this.results // used with infinite scroll to append previous results
|
|
81
82
|
);
|
|
82
83
|
this.pagination = new Stores_1.SearchPaginationStore(this.config, this.services, data.pagination, this.meta.data);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { StoreServices } from '../../types';
|
|
2
|
-
import type { SearchResponseModelMerchandising,
|
|
2
|
+
import type { SearchResponseModelMerchandising, SearchResponseModelMerchandisingCampaigns, SearchResponseModelMerchandisingExperiments, SearchResponseModelTracking } from '@searchspring/snapi-types';
|
|
3
3
|
export declare enum ContentType {
|
|
4
4
|
HEADER = "header",
|
|
5
5
|
BANNER = "banner",
|
|
@@ -10,16 +10,22 @@ export declare enum ContentType {
|
|
|
10
10
|
export type BannerContent = Partial<Record<ContentType, Content>>;
|
|
11
11
|
export declare class SearchMerchandisingStore {
|
|
12
12
|
redirect: string;
|
|
13
|
+
responseId: string;
|
|
13
14
|
content: BannerContent;
|
|
14
15
|
campaigns: SearchResponseModelMerchandisingCampaigns[];
|
|
15
16
|
landingPage?: SearchResponseModelMerchandisingCampaigns;
|
|
16
17
|
personalized?: boolean;
|
|
17
18
|
experiments: SearchResponseModelMerchandisingExperiments[];
|
|
18
|
-
constructor(services: StoreServices, merchData: SearchResponseModelMerchandising);
|
|
19
|
+
constructor(services: StoreServices, merchData: SearchResponseModelMerchandising, tracking: SearchResponseModelTracking);
|
|
19
20
|
}
|
|
20
|
-
|
|
21
|
+
export type MerchandisingContentBanner = {
|
|
22
|
+
value: string[];
|
|
23
|
+
uid: string;
|
|
24
|
+
responseId: string;
|
|
25
|
+
};
|
|
26
|
+
declare class Content extends Array<MerchandisingContentBanner> {
|
|
21
27
|
static get [Symbol.species](): ArrayConstructor;
|
|
22
|
-
constructor(content:
|
|
28
|
+
constructor(content: MerchandisingContentBanner[]);
|
|
23
29
|
}
|
|
24
30
|
export {};
|
|
25
31
|
//# sourceMappingURL=SearchMerchandisingStore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchMerchandisingStore.d.ts","sourceRoot":"","sources":["../../../../src/Search/Stores/SearchMerchandisingStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EACX,gCAAgC,EAChC,
|
|
1
|
+
{"version":3,"file":"SearchMerchandisingStore.d.ts","sourceRoot":"","sources":["../../../../src/Search/Stores/SearchMerchandisingStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EACX,gCAAgC,EAChC,yCAAyC,EACzC,2CAA2C,EAC3C,2BAA2B,EAC3B,MAAM,2BAA2B,CAAC;AAEnC,oBAAY,WAAW;IACtB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,MAAM,WAAW;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC;AAElE,qBAAa,wBAAwB;IAC7B,QAAQ,SAAM;IACd,UAAU,SAAM;IAChB,OAAO,EAAE,aAAa,CAAM;IAC5B,SAAS,EAAE,yCAAyC,EAAE,CAAM;IAC5D,WAAW,CAAC,EAAE,yCAAyC,CAAC;IACxD,YAAY,CAAC,EAAE,OAAO,CAAS;IAC/B,WAAW,EAAE,2CAA2C,EAAE,CAAM;gBAE3D,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,gCAAgC,EAAE,QAAQ,EAAE,2BAA2B;CAwCvH;AAED,MAAM,MAAM,0BAA0B,GAAG;IACxC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;CACnB,CAAC;AACF,cAAM,OAAQ,SAAQ,KAAK,CAAC,0BAA0B,CAAC;IACtD,MAAM,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,gBAAgB,CAE9C;gBAEW,OAAO,EAAE,0BAA0B,EAAE;CAGjD"}
|
|
@@ -25,19 +25,32 @@ var ContentType;
|
|
|
25
25
|
ContentType["INLINE"] = "inline";
|
|
26
26
|
})(ContentType || (exports.ContentType = ContentType = {}));
|
|
27
27
|
var SearchMerchandisingStore = /** @class */ (function () {
|
|
28
|
-
function SearchMerchandisingStore(services, merchData) {
|
|
28
|
+
function SearchMerchandisingStore(services, merchData, tracking) {
|
|
29
29
|
var _this = this;
|
|
30
30
|
this.redirect = '';
|
|
31
|
+
this.responseId = '';
|
|
31
32
|
this.content = {};
|
|
32
33
|
this.campaigns = [];
|
|
33
34
|
this.personalized = false;
|
|
34
35
|
this.experiments = [];
|
|
35
36
|
if (merchData) {
|
|
36
37
|
this.redirect = merchData.redirect || '';
|
|
38
|
+
this.responseId = (tracking === null || tracking === void 0 ? void 0 : tracking.responseId) || ''; // Autocomplete 'beforeSubmit' doesn't have a response reference
|
|
37
39
|
if (merchData.content) {
|
|
38
40
|
Object.values(ContentType).forEach(function (type) {
|
|
41
|
+
var _a;
|
|
39
42
|
if (merchData.content && merchData.content[type]) {
|
|
40
|
-
|
|
43
|
+
// Extract data-banner-id from the HTML string
|
|
44
|
+
var htmlString = ((_a = merchData.content[type]) === null || _a === void 0 ? void 0 : _a[0]) || '';
|
|
45
|
+
var match = typeof htmlString === 'string' && htmlString.match(/data-banner-id="(\d+)"/);
|
|
46
|
+
var uid = match ? match[1] : '';
|
|
47
|
+
_this.content[type] = new Content([
|
|
48
|
+
{
|
|
49
|
+
value: merchData.content[type],
|
|
50
|
+
uid: uid,
|
|
51
|
+
responseId: _this.responseId,
|
|
52
|
+
},
|
|
53
|
+
]);
|
|
41
54
|
}
|
|
42
55
|
});
|
|
43
56
|
}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import type { StoreServices, StoreConfigs, ResultBadge, VariantOptionConfig, VariantConfig } from '../../types';
|
|
2
|
-
import type { SearchResponseModelResult, SearchResponseModelPagination, SearchResponseModelMerchandising, SearchResponseModelResultMappings, SearchResponseModelMerchandisingContentInline, SearchResponseModelMerchandisingContentConfig, MetaResponseModel } from '@searchspring/snapi-types';
|
|
2
|
+
import type { SearchResponseModelResult, SearchResponseModelPagination, SearchResponseModelMerchandising, SearchResponseModelResultMappings, SearchResponseModelMerchandisingContentInline, SearchResponseModelMerchandisingContentConfig, MetaResponseModel, SearchResponseModelTracking } from '@searchspring/snapi-types';
|
|
3
3
|
export declare class SearchResultStore extends Array<Product | Banner> {
|
|
4
4
|
static get [Symbol.species](): ArrayConstructor;
|
|
5
|
-
constructor(config: StoreConfigs, services: StoreServices, metaData: MetaResponseModel, resultData?: SearchResponseModelResult[], paginationData?: SearchResponseModelPagination, merchData?: SearchResponseModelMerchandising, loaded?: boolean, previousPaginationData?: SearchResponseModelPagination, // used for infinite scroll functionality
|
|
5
|
+
constructor(config: StoreConfigs, services: StoreServices, metaData: MetaResponseModel, tracking?: SearchResponseModelTracking, resultData?: SearchResponseModelResult[], paginationData?: SearchResponseModelPagination, merchData?: SearchResponseModelMerchandising, loaded?: boolean, previousPaginationData?: SearchResponseModelPagination, // used for infinite scroll functionality
|
|
6
6
|
previousResults?: (Product | Banner)[]);
|
|
7
7
|
}
|
|
8
8
|
export declare class Banner {
|
|
9
9
|
type: string;
|
|
10
10
|
id: string;
|
|
11
|
+
responseId: string;
|
|
11
12
|
attributes: Record<string, unknown>;
|
|
12
13
|
mappings: SearchResponseModelResultMappings;
|
|
13
14
|
custom: {};
|
|
14
15
|
config: SearchResponseModelMerchandisingContentConfig;
|
|
15
16
|
value: string;
|
|
16
|
-
constructor(services: StoreServices, banner: SearchResponseModelMerchandisingContentInline);
|
|
17
|
+
constructor(services: StoreServices, banner: SearchResponseModelMerchandisingContentInline, responseId: string);
|
|
17
18
|
}
|
|
18
19
|
export type VariantData = {
|
|
19
20
|
mappings: SearchResponseModelResultMappings;
|
|
@@ -40,7 +41,7 @@ type SearchResponseModelResultVariants = {
|
|
|
40
41
|
export declare class Product {
|
|
41
42
|
type: string;
|
|
42
43
|
id: string;
|
|
43
|
-
|
|
44
|
+
responseId: string;
|
|
44
45
|
attributes: Record<string, unknown>;
|
|
45
46
|
mappings: SearchResponseModelResultMappings;
|
|
46
47
|
custom: {};
|
|
@@ -51,8 +52,9 @@ export declare class Product {
|
|
|
51
52
|
mask: ProductMask;
|
|
52
53
|
variants?: Variants;
|
|
53
54
|
constructor(services: StoreServices, result: SearchResponseModelResult & {
|
|
55
|
+
responseId?: string;
|
|
54
56
|
variants?: SearchResponseModelResultVariants;
|
|
55
|
-
}, metaData: MetaResponseModel,
|
|
57
|
+
}, metaData: MetaResponseModel, responseId: string, config?: StoreConfigs);
|
|
56
58
|
get display(): ProductMinimal;
|
|
57
59
|
}
|
|
58
60
|
export declare class Badges {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchResultStore.d.ts","sourceRoot":"","sources":["../../../../src/Search/Stores/SearchResultStore.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAEX,aAAa,EACb,YAAY,EACZ,WAAW,EACX,mBAAmB,EACnB,aAAa,EAGb,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACX,yBAAyB,EACzB,6BAA6B,EAC7B,gCAAgC,EAChC,iCAAiC,EACjC,6CAA6C,EAC7C,6CAA6C,EAC7C,iBAAiB,EACjB,MAAM,2BAA2B,CAAC;AAKnC,qBAAa,iBAAkB,SAAQ,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;IAC7D,MAAM,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,gBAAgB,CAE9C;gBAGA,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,aAAa,EACvB,QAAQ,EAAE,iBAAiB,EAC3B,UAAU,CAAC,EAAE,yBAAyB,EAAE,EACxC,cAAc,CAAC,EAAE,6BAA6B,EAC9C,SAAS,CAAC,EAAE,gCAAgC,EAC5C,MAAM,CAAC,EAAE,OAAO,EAChB,sBAAsB,CAAC,EAAE,6BAA6B,EAAE,yCAAyC;IACjG,eAAe,CAAC,EAAE,CAAC,OAAO,GAAG,MAAM,CAAC,EAAE;CAuFvC;AAED,qBAAa,MAAM;IACX,IAAI,SAAY;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAM;IACzC,QAAQ,EAAE,iCAAiC,CAEhD;IACK,MAAM,KAAM;IACZ,MAAM,EAAE,6CAA6C,CAAC;IACtD,KAAK,EAAE,MAAM,CAAC;gBAET,QAAQ,EAAE,aAAa,EA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,SAAW;IACf,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAM;IACzC,MAAM,KAAM;gBAEP,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,yBAAyB;CAUtE"}
|
|
@@ -46,12 +46,12 @@ var VARIANT_ATTRIBUTE = 'ss-variant-option';
|
|
|
46
46
|
var VARIANT_ATTRIBUTE_SELECTED = 'ss-variant-option-selected';
|
|
47
47
|
var SearchResultStore = /** @class */ (function (_super) {
|
|
48
48
|
__extends(SearchResultStore, _super);
|
|
49
|
-
function SearchResultStore(config, services, metaData, resultData, paginationData, merchData, loaded, previousPaginationData, // used for infinite scroll functionality
|
|
49
|
+
function SearchResultStore(config, services, metaData, tracking, resultData, paginationData, merchData, loaded, previousPaginationData, // used for infinite scroll functionality
|
|
50
50
|
previousResults // used for infinite scroll functionality
|
|
51
51
|
) {
|
|
52
52
|
var _a, _b, _c, _d;
|
|
53
|
-
var results = (resultData || []).map(function (result
|
|
54
|
-
return new Product(services, result, metaData,
|
|
53
|
+
var results = (resultData || []).map(function (result) {
|
|
54
|
+
return new Product(services, result, metaData, (tracking === null || tracking === void 0 ? void 0 : tracking.responseId) || '', config);
|
|
55
55
|
});
|
|
56
56
|
var variantConfig = (_a = config === null || config === void 0 ? void 0 : config.settings) === null || _a === void 0 ? void 0 : _a.variants;
|
|
57
57
|
// preselected variant options
|
|
@@ -120,7 +120,7 @@ var SearchResultStore = /** @class */ (function (_super) {
|
|
|
120
120
|
return a.config.position.index - b.config.position.index;
|
|
121
121
|
})
|
|
122
122
|
.map(function (banner) {
|
|
123
|
-
return new Banner(services, banner);
|
|
123
|
+
return new Banner(services, banner, (tracking === null || tracking === void 0 ? void 0 : tracking.responseId) || '');
|
|
124
124
|
});
|
|
125
125
|
if (banners && paginationData.totalResults) {
|
|
126
126
|
results = addBannersToResults(config, results, banners, paginationData);
|
|
@@ -139,14 +139,18 @@ var SearchResultStore = /** @class */ (function (_super) {
|
|
|
139
139
|
}(Array));
|
|
140
140
|
exports.SearchResultStore = SearchResultStore;
|
|
141
141
|
var Banner = /** @class */ (function () {
|
|
142
|
-
function Banner(services, banner) {
|
|
142
|
+
function Banner(services, banner, responseId) {
|
|
143
143
|
this.type = 'banner';
|
|
144
144
|
this.attributes = {};
|
|
145
145
|
this.mappings = {
|
|
146
146
|
core: {},
|
|
147
147
|
};
|
|
148
148
|
this.custom = {};
|
|
149
|
-
|
|
149
|
+
var htmlString = banner.value;
|
|
150
|
+
var match = typeof htmlString === 'string' && htmlString.match(/data-banner-id="(\d+)"/);
|
|
151
|
+
var uid = match ? match[1] : 'ss-ib-' + banner.config.position.index;
|
|
152
|
+
this.id = uid;
|
|
153
|
+
this.responseId = responseId;
|
|
150
154
|
this.config = banner.config;
|
|
151
155
|
this.value = banner.value;
|
|
152
156
|
(0, mobx_1.makeObservable)(this, {
|
|
@@ -159,7 +163,7 @@ var Banner = /** @class */ (function () {
|
|
|
159
163
|
}());
|
|
160
164
|
exports.Banner = Banner;
|
|
161
165
|
var Product = /** @class */ (function () {
|
|
162
|
-
function Product(services, result, metaData,
|
|
166
|
+
function Product(services, result, metaData, responseId, config) {
|
|
163
167
|
var _a, _b, _c, _d, _e;
|
|
164
168
|
this.type = 'product';
|
|
165
169
|
this.attributes = {};
|
|
@@ -173,7 +177,7 @@ var Product = /** @class */ (function () {
|
|
|
173
177
|
this.id = result.id;
|
|
174
178
|
this.attributes = result.attributes;
|
|
175
179
|
this.mappings = result.mappings;
|
|
176
|
-
this.
|
|
180
|
+
this.responseId = result.responseId || responseId;
|
|
177
181
|
this.badges = new Badges(result, metaData);
|
|
178
182
|
// @ts-ignore - need to add bundleSeed to snapi-types
|
|
179
183
|
if (result.bundleSeed) {
|
|
@@ -617,7 +621,7 @@ var Child = /** @class */ (function () {
|
|
|
617
621
|
return Child;
|
|
618
622
|
}());
|
|
619
623
|
function addBannersToResults(config, results, allBanners, paginationData) {
|
|
620
|
-
var _a;
|
|
624
|
+
var _a, _b;
|
|
621
625
|
var bannersAndResults = __spreadArray([], results, true);
|
|
622
626
|
var paginationBegin = paginationData.pageSize * (paginationData.page - 1) + 1;
|
|
623
627
|
var paginationEnd = paginationData.pageSize * paginationData.page;
|
|
@@ -652,6 +656,25 @@ function addBannersToResults(config, results, allBanners, paginationData) {
|
|
|
652
656
|
bannersAndResults.splice(resultIndex, 0, banner);
|
|
653
657
|
}
|
|
654
658
|
});
|
|
659
|
+
// when using infinite, need to adjust the inline banner responseIds
|
|
660
|
+
if ((_b = config === null || config === void 0 ? void 0 : config.settings) === null || _b === void 0 ? void 0 : _b.infinite) {
|
|
661
|
+
bannersAndResults.forEach(function (item, index) {
|
|
662
|
+
if (item.type === 'banner') {
|
|
663
|
+
// need to determine what the correctResponseId is based on the index position, pageSize (current page) and adjacent product responseIds
|
|
664
|
+
var pageSize = paginationData.pageSize;
|
|
665
|
+
var currentPage = Math.floor(index / pageSize) + 1;
|
|
666
|
+
var firstItemIndexOnPage = (currentPage - 1) * pageSize;
|
|
667
|
+
var lastItemIndexOnPage = firstItemIndexOnPage + pageSize - 1;
|
|
668
|
+
// find the first product on the current page to grab its responseId
|
|
669
|
+
for (var i = firstItemIndexOnPage; i < lastItemIndexOnPage; i++) {
|
|
670
|
+
if (bannersAndResults[i].type === 'product') {
|
|
671
|
+
item.responseId = bannersAndResults[i].responseId;
|
|
672
|
+
break;
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
});
|
|
677
|
+
}
|
|
655
678
|
return bannersAndResults;
|
|
656
679
|
}
|
|
657
680
|
function variantOptionClick(elem, variantConfig, results) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { SearchMerchandisingStore, BannerContent, ContentType } from './SearchMerchandisingStore';
|
|
1
|
+
export { SearchMerchandisingStore, BannerContent, ContentType, MerchandisingContentBanner } from './SearchMerchandisingStore';
|
|
2
2
|
export { SearchFacetStore, ValueFacet, RangeFacet, FacetValue, FacetHierarchyValue, FacetRangeValue } from './SearchFacetStore';
|
|
3
3
|
export { SearchFilterStore, Filter } from './SearchFilterStore';
|
|
4
4
|
export { SearchPaginationStore } from './SearchPaginationStore';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Search/Stores/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Search/Stores/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,WAAW,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAC9H,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAChI,OAAO,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAClH,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { AbstractStore } from '../Abstract/AbstractStore';
|
|
|
3
3
|
import { SearchFilterStore, SearchResultStore, SearchMerchandisingStore, SearchPaginationStore, SearchSortingStore } from '../Search/Stores';
|
|
4
4
|
import { StorageStore } from '../Storage/StorageStore';
|
|
5
5
|
import { AutocompleteStateStore, AutocompleteTermStore, AutocompleteQueryStore, AutocompleteFacetStore, AutocompleteTrendingStore, AutocompleteHistoryStore } from './Stores';
|
|
6
|
-
import type { AutocompleteResponseModel, MetaResponseModel } from '@searchspring/snapi-types';
|
|
6
|
+
import type { AutocompleteResponseModel, MetaResponseModel, SearchResponseModelTracking } from '@searchspring/snapi-types';
|
|
7
7
|
import type { TrendingResponseModel } from '@searchspring/snap-client';
|
|
8
8
|
import type { AutocompleteStoreConfig, StoreServices } from '../types';
|
|
9
9
|
import { MetaStore } from '../Meta/MetaStore';
|
|
@@ -33,6 +33,7 @@ export declare class AutocompleteStore extends AbstractStore {
|
|
|
33
33
|
updateTrendingTerms(data: TrendingResponseModel): void;
|
|
34
34
|
update(data?: AutocompleteResponseModel & {
|
|
35
35
|
meta?: MetaResponseModel;
|
|
36
|
+
tracking?: SearchResponseModelTracking;
|
|
36
37
|
}): void;
|
|
37
38
|
}
|
|
38
39
|
//# sourceMappingURL=AutocompleteStore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutocompleteStore.d.ts","sourceRoot":"","sources":["../../../src/Autocomplete/AutocompleteStore.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EACN,iBAAiB,EACjB,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,EACrB,kBAAkB,EAElB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EACN,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,yBAAyB,EACzB,wBAAwB,EACxB,MAAM,UAAU,CAAC;AAElB,OAAO,KAAK,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"AutocompleteStore.d.ts","sourceRoot":"","sources":["../../../src/Autocomplete/Autocomple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KAAK,IAAI,IAAI;IAMb,WAAW,IAAI,IAAI;IAgBnB,UAAU,IAAI,IAAI;IAMlB,gBAAgB,IAAI,IAAI;IAIxB,aAAa,IAAI,IAAI;IAIrB,YAAY,IAAI,IAAI;IAIpB,UAAU,CAAC,IAAI,EAAE,MAAM,aAAa,EAAE,OAAO,EAAE,UAAU,GAAG,IAAI;IAUhE,mBAAmB,CAAC,IAAI,EAAE,qBAAqB,GAAG,IAAI;IAWtD,MAAM,CAAC,IAAI,CAAC,EAAE,yBAAyB,GAAG;QAAE,IAAI,CAAC,EAAE,iBAAiB,CAAC;QAAC,QAAQ,CAAC,EAAE,2BAA2B,CAAA;KAAE,GAAG,IAAI;CAqE5H"}
|
|
@@ -72,9 +72,9 @@ export class AutocompleteStore extends AbstractStore {
|
|
|
72
72
|
this.resetTerms();
|
|
73
73
|
}, this.state);
|
|
74
74
|
}
|
|
75
|
-
update(data
|
|
75
|
+
update(data) {
|
|
76
76
|
if (!data)
|
|
77
|
-
|
|
77
|
+
data = { tracking: { responseId: '' } }; // tracking is required
|
|
78
78
|
this.error = undefined;
|
|
79
79
|
this.meta = new MetaStore(data.meta);
|
|
80
80
|
// set the query to match the actual queried term and not the input query
|
|
@@ -89,14 +89,14 @@ export class AutocompleteStore extends AbstractStore {
|
|
|
89
89
|
// only lock if there was data
|
|
90
90
|
data.autocomplete && this.state.locks.terms.lock();
|
|
91
91
|
}
|
|
92
|
-
this.merchandising = new SearchMerchandisingStore(this.services, data.merchandising || {});
|
|
92
|
+
this.merchandising = new SearchMerchandisingStore(this.services, data.merchandising || {}, data.tracking || {});
|
|
93
93
|
this.search = new AutocompleteQueryStore(this.services, data.autocomplete || {}, data.search || {}, this.config);
|
|
94
94
|
// only run if we want to update the facets (not locked)
|
|
95
95
|
if (!this.state.locks.facets.locked) {
|
|
96
96
|
this.facets = new AutocompleteFacetStore(this.config, this.services, this.storage, data.facets || [], data.pagination || {}, this.meta.data, this.state, data.merchandising || {});
|
|
97
97
|
}
|
|
98
98
|
this.filters = new SearchFilterStore(this.services, data.filters, this.meta.data);
|
|
99
|
-
this.results = new SearchResultStore(this.config, this.services, this.meta.data, data.results || [], data.pagination, data.merchandising, this.loaded);
|
|
99
|
+
this.results = new SearchResultStore(this.config, this.services, this.meta.data, data.tracking, data.results || [], data.pagination, data.merchandising, this.loaded);
|
|
100
100
|
if ((this.results.length === 0 && !this.trending.filter((term) => term.active).length) || this.terms?.filter((term) => term.active).length) {
|
|
101
101
|
// if a trending term was selected and then a subsequent search yields no results, reset trending terms to remove active state
|
|
102
102
|
// OR if any terms are active, also reset to ensure only a single term or trending term is active
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutocompleteHistoryStore.d.ts","sourceRoot":"","sources":["../../../../src/Autocomplete/Stores/AutocompleteHistoryStore.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AutocompleteHistoryStore.d.ts","sourceRoot":"","sources":["../../../../src/Autocomplete/Stores/AutocompleteHistoryStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAE/C,qBAAa,wBAAyB,SAAQ,KAAK,CAAC,IAAI,CAAC;IACxD,MAAM,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,gBAAgB,CAE9C;gBAEW,QAAQ,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,MAAM,IAAI,EAAE,SAAS,EAAE,sBAAsB;CAqBjH"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { UrlManager } from '@searchspring/snap-url-manager';
|
|
2
2
|
import type { StoreServices } from '../../types';
|
|
3
|
+
import type { AutocompleteRequestModelSearchSourceEnum } from '@searchspring/snapi-types';
|
|
3
4
|
export declare class AutocompleteStateStore {
|
|
4
5
|
locks: {
|
|
5
6
|
terms: Lock;
|
|
@@ -7,6 +8,7 @@ export declare class AutocompleteStateStore {
|
|
|
7
8
|
};
|
|
8
9
|
focusedInput: HTMLInputElement | undefined;
|
|
9
10
|
input: string | undefined;
|
|
11
|
+
source: AutocompleteRequestModelSearchSourceEnum;
|
|
10
12
|
url: UrlManager;
|
|
11
13
|
constructor(services: StoreServices);
|
|
12
14
|
reset(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutocompleteStateStore.d.ts","sourceRoot":"","sources":["../../../../src/Autocomplete/Stores/AutocompleteStateStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"AutocompleteStateStore.d.ts","sourceRoot":"","sources":["../../../../src/Autocomplete/Stores/AutocompleteStateStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,wCAAwC,EAAE,MAAM,2BAA2B,CAAC;AAE1F,qBAAa,sBAAsB;IAC3B,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,MAAM,EAAE,wCAAwC,CAAuD;IACvG,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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { UrlManager } from '@searchspring/snap-url-manager';
|
|
2
2
|
import type { AutocompleteStateStore } from './AutocompleteStateStore';
|
|
3
3
|
import type { AutocompleteStoreConfig, StoreServices } from '../../types';
|
|
4
|
-
import type { AutocompleteResponseModelAllOfAutocomplete, SearchResponseModelPagination, SearchResponseModelSearch } from '@searchspring/snapi-types';
|
|
4
|
+
import type { AutocompleteRequestModelSearchSourceEnum, AutocompleteResponseModelAllOfAutocomplete, SearchResponseModelPagination, SearchResponseModelSearch } from '@searchspring/snapi-types';
|
|
5
5
|
export declare class AutocompleteTermStore extends Array<Term> {
|
|
6
6
|
static get [Symbol.species](): ArrayConstructor;
|
|
7
7
|
constructor(services: StoreServices, autocomplete: AutocompleteResponseModelAllOfAutocomplete, paginationData: SearchResponseModelPagination, search: SearchResponseModelSearch, resetTerms: () => void, rootState: AutocompleteStateStore, config: AutocompleteStoreConfig);
|
|
@@ -11,9 +11,10 @@ export declare class Term {
|
|
|
11
11
|
value: string;
|
|
12
12
|
preview: () => void;
|
|
13
13
|
url: UrlManager;
|
|
14
|
+
type: AutocompleteRequestModelSearchSourceEnum;
|
|
14
15
|
constructor(services: StoreServices, term: {
|
|
15
16
|
active: boolean;
|
|
16
17
|
value: string;
|
|
17
|
-
}, terms: Term[], resetTerms: () => void, rootState: AutocompleteStateStore);
|
|
18
|
+
}, terms: Term[], resetTerms: () => void, rootState: AutocompleteStateStore, type: AutocompleteRequestModelSearchSourceEnum);
|
|
18
19
|
}
|
|
19
20
|
//# sourceMappingURL=AutocompleteTermStore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutocompleteTermStore.d.ts","sourceRoot":"","sources":["../../../../src/Autocomplete/Stores/AutocompleteTermStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,KAAK,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"AutocompleteTermStore.d.ts","sourceRoot":"","sources":["../../../../src/Autocomplete/Stores/AutocompleteTermStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,KAAK,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,KAAK,EACX,wCAAwC,EACxC,0CAA0C,EAC1C,6BAA6B,EAC7B,yBAAyB,EACzB,MAAM,2BAA2B,CAAC;AAEnC,qBAAa,qBAAsB,SAAQ,KAAK,CAAC,IAAI,CAAC;IACrD,MAAM,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,gBAAgB,CAE9C;gBAGA,QAAQ,EAAE,aAAa,EACvB,YAAY,EAAE,0CAA0C,EACxD,cAAc,EAAE,6BAA6B,EAC7C,MAAM,EAAE,yBAAyB,EACjC,UAAU,EAAE,MAAM,IAAI,EACtB,SAAS,EAAE,sBAAsB,EACjC,MAAM,EAAE,uBAAuB;CA4ChC;AAED,qBAAa,IAAI;IACT,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,GAAG,EAAE,UAAU,CAAC;IAChB,IAAI,EAAE,wCAAwC,CAAC;gBAGrD,QAAQ,EAAE,aAAa,EACvB,IAAI,EAAE;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EACxC,KAAK,EAAE,IAAI,EAAE,EACb,UAAU,EAAE,MAAM,IAAI,EACtB,SAAS,EAAE,sBAAsB,EACjC,IAAI,EAAE,wCAAwC;CA0B/C"}
|
|
@@ -30,20 +30,22 @@ export class AutocompleteTermStore extends Array {
|
|
|
30
30
|
suggestions.map((term, index) => terms.push(new Term(services, {
|
|
31
31
|
active: index === 0,
|
|
32
32
|
value: term,
|
|
33
|
-
}, terms, resetTerms, rootState)));
|
|
33
|
+
}, terms, resetTerms, rootState, 'suggested')));
|
|
34
34
|
super(...terms);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
export class Term {
|
|
38
|
-
constructor(services, term, terms, resetTerms, rootState) {
|
|
38
|
+
constructor(services, term, terms, resetTerms, rootState, type) {
|
|
39
39
|
this.active = term.active;
|
|
40
40
|
this.value = term.value;
|
|
41
|
+
this.type = type;
|
|
41
42
|
this.url = services?.urlManager?.set({ query: this.value });
|
|
42
43
|
this.preview = () => {
|
|
43
44
|
resetTerms();
|
|
44
45
|
terms.map((term) => {
|
|
45
46
|
term.active = false;
|
|
46
47
|
});
|
|
48
|
+
rootState.source = type;
|
|
47
49
|
this.active = true;
|
|
48
50
|
rootState.locks.terms.lock();
|
|
49
51
|
rootState.locks.facets.unlock();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutocompleteTrendingStore.d.ts","sourceRoot":"","sources":["../../../../src/Autocomplete/Stores/AutocompleteTrendingStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"AutocompleteTrendingStore.d.ts","sourceRoot":"","sources":["../../../../src/Autocomplete/Stores/AutocompleteTrendingStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAG/C,qBAAa,yBAA0B,SAAQ,KAAK,CAAC,IAAI,CAAC;IACzD,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,sBAAsB;CAqBnI"}
|
|
@@ -20,7 +20,7 @@ export declare class FinderStore extends AbstractStore {
|
|
|
20
20
|
save: () => void;
|
|
21
21
|
reset: () => void;
|
|
22
22
|
loadPersisted(): void;
|
|
23
|
-
update(data
|
|
23
|
+
update(data?: SearchResponseModel & {
|
|
24
24
|
meta?: MetaResponseModel;
|
|
25
25
|
}, selectedSelections?: SelectedSelection[]): void;
|
|
26
26
|
}
|
|
@@ -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,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACtG,OAAO,E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AE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,qBAAa,WAAY,SAAQ,aAAa;IACtC,QAAQ,EAAE,aAAa,CAAC;IACxB,MAAM,EAAG,iBAAiB,CAAC;IAC3B,IAAI,EAAG,SAAS,CAAC;IACjB,OAAO,EAAE,YAAY,CAAC;IACtB,gBAAgB,EAAG,YAAY,CAAC;IAChC,UAAU,EAAG,qBAAqB,CAAC;IACnC,UAAU,EAAG,oBAAoB,CAAC;IAClC,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;IAQhE,IAAI,EAAE,MAAM,IAAI,CAAY;IAE5B,KAAK,QAAO,IAAI,CAWrB;IAEK,aAAa,IAAI,IAAI;IAyBrB,MAAM,CAAC,IAAI,CAAC,EAAE,mBAAmB,GAAG;QAAE,IAAI,CAAC,EAAE,iBAAiB,CAAA;KAAE,EAAE,kBAAkB,CAAC,EAAE,iBAAiB,EAAE,GAAG,IAAI;CAkCxH"}
|
|
@@ -35,7 +35,7 @@ export class FinderStore extends AbstractStore {
|
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
this.storage = new StorageStore();
|
|
38
|
-
this.update(
|
|
38
|
+
this.update();
|
|
39
39
|
makeObservable(this, {
|
|
40
40
|
selections: observable,
|
|
41
41
|
pagination: observable,
|
|
@@ -70,6 +70,8 @@ export class FinderStore extends AbstractStore {
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
update(data, selectedSelections) {
|
|
73
|
+
if (!data)
|
|
74
|
+
data = { tracking: { responseId: '' } }; // tracking is required
|
|
73
75
|
this.error = undefined;
|
|
74
76
|
this.loaded = !!data.pagination;
|
|
75
77
|
this.meta = new MetaStore(data.meta);
|
|
@@ -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,OAAO,EAAqB,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,yBAAyB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzE,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,qBAAa,mBAAoB,SAAQ,aAAa;IAC9C,QAAQ,EAAE,aAAa,CAAC;IACxB,IAAI,EAAG,SAAS,CAAC;IACjB,MAAM,UAAS;IACf,OAAO,EAAG,0BAA0B,CAAC;IACrC,OAAO,EAAG,OAAO,EAAE,CAAC;IACpB,IAAI,EAAG,SAAS,CAAC;gBAEZ,MAAM,EAAE,yBAAyB,EAAE,QAAQ,EAAE,aAAa;IAiB/D,KAAK,IAAI,IAAI;IAIb,MAAM,CAAC,IAAI,CAAC,EAAE,8BAA8B,GAAG;QAAE,IAAI,CAAC,EAAE,iBAAiB,CAAA;KAAE,GAAG,IAAI;
|
|
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,OAAO,EAAqB,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,yBAAyB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzE,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,qBAAa,mBAAoB,SAAQ,aAAa;IAC9C,QAAQ,EAAE,aAAa,CAAC;IACxB,IAAI,EAAG,SAAS,CAAC;IACjB,MAAM,UAAS;IACf,OAAO,EAAG,0BAA0B,CAAC;IACrC,OAAO,EAAG,OAAO,EAAE,CAAC;IACpB,IAAI,EAAG,SAAS,CAAC;gBAEZ,MAAM,EAAE,yBAAyB,EAAE,QAAQ,EAAE,aAAa;IAiB/D,KAAK,IAAI,IAAI;IAIb,MAAM,CAAC,IAAI,CAAC,EAAE,8BAA8B,GAAG;QAAE,IAAI,CAAC,EAAE,iBAAiB,CAAA;KAAE,GAAG,IAAI;CAsBzF"}
|
|
@@ -25,7 +25,7 @@ export class RecommendationStore extends AbstractStore {
|
|
|
25
25
|
this.error = undefined;
|
|
26
26
|
this.meta = new MetaStore(data?.meta);
|
|
27
27
|
this.profile = new RecommendationProfileStore(this.services, data);
|
|
28
|
-
this.results = new SearchResultStore(this.config, this.services, this.meta.data, data?.results, undefined, undefined, this.loaded);
|
|
28
|
+
this.results = new SearchResultStore(this.config, this.services, this.meta.data, { responseId: data?.responseId || '' }, data?.results, undefined, undefined, this.loaded);
|
|
29
29
|
// only create a cart store when type is bundle
|
|
30
30
|
if (this.profile.type == 'bundle') {
|
|
31
31
|
this.cart = new CartStore();
|
|
@@ -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,2BAA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B,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,qBAAa,WAAY,SAAQ,aAAa;IAC7C,QAAgB,YAAY,CAAqD;IAC1E,QAAQ,EAAE,aAAa,CAAC;IACxB,IAAI,EAAG,SAAS,CAAC;IACjB,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;IACtB,OAAO,EAAE,kBAAkB,CAAC;gBAEvB,MAAM,EAAE,iBAAiB,EAAE,QAAQ,EAAE,aAAa;IAiDvD,KAAK,IAAI,IAAI;IAIb,MAAM,CAAC,IAAI,CAAC,EAAE,mBAAmB,GAAG;QAAE,IAAI,CAAC,EAAE,iBAAiB,CAAA;KAAE,GAAG,IAAI;CAoC9E"}
|
|
@@ -46,14 +46,16 @@ export class SearchStore extends AbstractStore {
|
|
|
46
46
|
reset() {
|
|
47
47
|
this.update();
|
|
48
48
|
}
|
|
49
|
-
update(data
|
|
49
|
+
update(data) {
|
|
50
|
+
if (!data)
|
|
51
|
+
data = { tracking: { responseId: '' } }; // tracking is required
|
|
50
52
|
this.error = undefined;
|
|
51
53
|
this.meta = new MetaStore(data.meta);
|
|
52
|
-
this.merchandising = new SearchMerchandisingStore(this.services, data?.merchandising || {});
|
|
54
|
+
this.merchandising = new SearchMerchandisingStore(this.services, data?.merchandising || {}, data.tracking || {});
|
|
53
55
|
this.search = new SearchQueryStore(this.services, data?.search || {});
|
|
54
56
|
this.facets = new SearchFacetStore(this.config, this.services, this.storage, data.facets, data?.pagination || {}, this.meta.data, data?.merchandising || {});
|
|
55
57
|
this.filters = new SearchFilterStore(this.services, data.filters, this.meta.data);
|
|
56
|
-
this.results = new SearchResultStore(this.config, this.services, this.meta.data, data?.results || [], data.pagination, data.merchandising, this.loaded, this.previousData?.pagination
|
|
58
|
+
this.results = new SearchResultStore(this.config, this.services, this.meta.data, data.tracking || {}, data?.results || [], data.pagination, data.merchandising, this.loaded, this.previousData?.pagination
|
|
57
59
|
// this.results // used with infinite scroll to append previous results
|
|
58
60
|
);
|
|
59
61
|
this.pagination = new SearchPaginationStore(this.config, this.services, data.pagination, this.meta.data);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { StoreServices } from '../../types';
|
|
2
|
-
import type { SearchResponseModelMerchandising,
|
|
2
|
+
import type { SearchResponseModelMerchandising, SearchResponseModelMerchandisingCampaigns, SearchResponseModelMerchandisingExperiments, SearchResponseModelTracking } from '@searchspring/snapi-types';
|
|
3
3
|
export declare enum ContentType {
|
|
4
4
|
HEADER = "header",
|
|
5
5
|
BANNER = "banner",
|
|
@@ -10,16 +10,22 @@ export declare enum ContentType {
|
|
|
10
10
|
export type BannerContent = Partial<Record<ContentType, Content>>;
|
|
11
11
|
export declare class SearchMerchandisingStore {
|
|
12
12
|
redirect: string;
|
|
13
|
+
responseId: string;
|
|
13
14
|
content: BannerContent;
|
|
14
15
|
campaigns: SearchResponseModelMerchandisingCampaigns[];
|
|
15
16
|
landingPage?: SearchResponseModelMerchandisingCampaigns;
|
|
16
17
|
personalized?: boolean;
|
|
17
18
|
experiments: SearchResponseModelMerchandisingExperiments[];
|
|
18
|
-
constructor(services: StoreServices, merchData: SearchResponseModelMerchandising);
|
|
19
|
+
constructor(services: StoreServices, merchData: SearchResponseModelMerchandising, tracking: SearchResponseModelTracking);
|
|
19
20
|
}
|
|
20
|
-
|
|
21
|
+
export type MerchandisingContentBanner = {
|
|
22
|
+
value: string[];
|
|
23
|
+
uid: string;
|
|
24
|
+
responseId: string;
|
|
25
|
+
};
|
|
26
|
+
declare class Content extends Array<MerchandisingContentBanner> {
|
|
21
27
|
static get [Symbol.species](): ArrayConstructor;
|
|
22
|
-
constructor(content:
|
|
28
|
+
constructor(content: MerchandisingContentBanner[]);
|
|
23
29
|
}
|
|
24
30
|
export {};
|
|
25
31
|
//# sourceMappingURL=SearchMerchandisingStore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchMerchandisingStore.d.ts","sourceRoot":"","sources":["../../../../src/Search/Stores/SearchMerchandisingStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EACX,gCAAgC,EAChC,
|
|
1
|
+
{"version":3,"file":"SearchMerchandisingStore.d.ts","sourceRoot":"","sources":["../../../../src/Search/Stores/SearchMerchandisingStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EACX,gCAAgC,EAChC,yCAAyC,EACzC,2CAA2C,EAC3C,2BAA2B,EAC3B,MAAM,2BAA2B,CAAC;AAEnC,oBAAY,WAAW;IACtB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,MAAM,WAAW;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC;AAElE,qBAAa,wBAAwB;IAC7B,QAAQ,SAAM;IACd,UAAU,SAAM;IAChB,OAAO,EAAE,aAAa,CAAM;IAC5B,SAAS,EAAE,yCAAyC,EAAE,CAAM;IAC5D,WAAW,CAAC,EAAE,yCAAyC,CAAC;IACxD,YAAY,CAAC,EAAE,OAAO,CAAS;IAC/B,WAAW,EAAE,2CAA2C,EAAE,CAAM;gBAE3D,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,gCAAgC,EAAE,QAAQ,EAAE,2BAA2B;CAwCvH;AAED,MAAM,MAAM,0BAA0B,GAAG;IACxC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;CACnB,CAAC;AACF,cAAM,OAAQ,SAAQ,KAAK,CAAC,0BAA0B,CAAC;IACtD,MAAM,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,gBAAgB,CAE9C;gBAEW,OAAO,EAAE,0BAA0B,EAAE;CAGjD"}
|
|
@@ -7,18 +7,30 @@ export var ContentType;
|
|
|
7
7
|
ContentType["INLINE"] = "inline";
|
|
8
8
|
})(ContentType || (ContentType = {}));
|
|
9
9
|
export class SearchMerchandisingStore {
|
|
10
|
-
constructor(services, merchData) {
|
|
10
|
+
constructor(services, merchData, tracking) {
|
|
11
11
|
this.redirect = '';
|
|
12
|
+
this.responseId = '';
|
|
12
13
|
this.content = {};
|
|
13
14
|
this.campaigns = [];
|
|
14
15
|
this.personalized = false;
|
|
15
16
|
this.experiments = [];
|
|
16
17
|
if (merchData) {
|
|
17
18
|
this.redirect = merchData.redirect || '';
|
|
19
|
+
this.responseId = tracking?.responseId || ''; // Autocomplete 'beforeSubmit' doesn't have a response reference
|
|
18
20
|
if (merchData.content) {
|
|
19
21
|
Object.values(ContentType).forEach((type) => {
|
|
20
22
|
if (merchData.content && merchData.content[type]) {
|
|
21
|
-
|
|
23
|
+
// Extract data-banner-id from the HTML string
|
|
24
|
+
const htmlString = merchData.content[type]?.[0] || '';
|
|
25
|
+
const match = typeof htmlString === 'string' && htmlString.match(/data-banner-id="(\d+)"/);
|
|
26
|
+
const uid = match ? match[1] : '';
|
|
27
|
+
this.content[type] = new Content([
|
|
28
|
+
{
|
|
29
|
+
value: merchData.content[type],
|
|
30
|
+
uid,
|
|
31
|
+
responseId: this.responseId,
|
|
32
|
+
},
|
|
33
|
+
]);
|
|
22
34
|
}
|
|
23
35
|
});
|
|
24
36
|
}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import type { StoreServices, StoreConfigs, ResultBadge, VariantOptionConfig, VariantConfig } from '../../types';
|
|
2
|
-
import type { SearchResponseModelResult, SearchResponseModelPagination, SearchResponseModelMerchandising, SearchResponseModelResultMappings, SearchResponseModelMerchandisingContentInline, SearchResponseModelMerchandisingContentConfig, MetaResponseModel } from '@searchspring/snapi-types';
|
|
2
|
+
import type { SearchResponseModelResult, SearchResponseModelPagination, SearchResponseModelMerchandising, SearchResponseModelResultMappings, SearchResponseModelMerchandisingContentInline, SearchResponseModelMerchandisingContentConfig, MetaResponseModel, SearchResponseModelTracking } from '@searchspring/snapi-types';
|
|
3
3
|
export declare class SearchResultStore extends Array<Product | Banner> {
|
|
4
4
|
static get [Symbol.species](): ArrayConstructor;
|
|
5
|
-
constructor(config: StoreConfigs, services: StoreServices, metaData: MetaResponseModel, resultData?: SearchResponseModelResult[], paginationData?: SearchResponseModelPagination, merchData?: SearchResponseModelMerchandising, loaded?: boolean, previousPaginationData?: SearchResponseModelPagination, // used for infinite scroll functionality
|
|
5
|
+
constructor(config: StoreConfigs, services: StoreServices, metaData: MetaResponseModel, tracking?: SearchResponseModelTracking, resultData?: SearchResponseModelResult[], paginationData?: SearchResponseModelPagination, merchData?: SearchResponseModelMerchandising, loaded?: boolean, previousPaginationData?: SearchResponseModelPagination, // used for infinite scroll functionality
|
|
6
6
|
previousResults?: (Product | Banner)[]);
|
|
7
7
|
}
|
|
8
8
|
export declare class Banner {
|
|
9
9
|
type: string;
|
|
10
10
|
id: string;
|
|
11
|
+
responseId: string;
|
|
11
12
|
attributes: Record<string, unknown>;
|
|
12
13
|
mappings: SearchResponseModelResultMappings;
|
|
13
14
|
custom: {};
|
|
14
15
|
config: SearchResponseModelMerchandisingContentConfig;
|
|
15
16
|
value: string;
|
|
16
|
-
constructor(services: StoreServices, banner: SearchResponseModelMerchandisingContentInline);
|
|
17
|
+
constructor(services: StoreServices, banner: SearchResponseModelMerchandisingContentInline, responseId: string);
|
|
17
18
|
}
|
|
18
19
|
export type VariantData = {
|
|
19
20
|
mappings: SearchResponseModelResultMappings;
|
|
@@ -40,7 +41,7 @@ type SearchResponseModelResultVariants = {
|
|
|
40
41
|
export declare class Product {
|
|
41
42
|
type: string;
|
|
42
43
|
id: string;
|
|
43
|
-
|
|
44
|
+
responseId: string;
|
|
44
45
|
attributes: Record<string, unknown>;
|
|
45
46
|
mappings: SearchResponseModelResultMappings;
|
|
46
47
|
custom: {};
|
|
@@ -51,8 +52,9 @@ export declare class Product {
|
|
|
51
52
|
mask: ProductMask;
|
|
52
53
|
variants?: Variants;
|
|
53
54
|
constructor(services: StoreServices, result: SearchResponseModelResult & {
|
|
55
|
+
responseId?: string;
|
|
54
56
|
variants?: SearchResponseModelResultVariants;
|
|
55
|
-
}, metaData: MetaResponseModel,
|
|
57
|
+
}, metaData: MetaResponseModel, responseId: string, config?: StoreConfigs);
|
|
56
58
|
get display(): ProductMinimal;
|
|
57
59
|
}
|
|
58
60
|
export declare class Badges {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchResultStore.d.ts","sourceRoot":"","sources":["../../../../src/Search/Stores/SearchResultStore.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAEX,aAAa,EACb,YAAY,EACZ,WAAW,EACX,mBAAmB,EACnB,aAAa,EAGb,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACX,yBAAyB,EACzB,6BAA6B,EAC7B,gCAAgC,EAChC,iCAAiC,EACjC,6CAA6C,EAC7C,6CAA6C,EAC7C,iBAAiB,EACjB,MAAM,2BAA2B,CAAC;AAKnC,qBAAa,iBAAkB,SAAQ,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;IAC7D,MAAM,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,gBAAgB,CAE9C;gBAGA,MAAM,EAAE,YAAY,EACpB,QAAQ,E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,qBAAqB,EAAE,CAAM;IAC5C,OAAO,CAAC,MAAM,CAAsB;IACpC,OAAO,CAAC,cAAc,CAAa;gBAEvB,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,mBAAmB;IAiBnF,YAAY,CAAC,QAAQ,EAAE,QAAQ;IAgG/B,KAAK;IAKL,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,iBAAiB,UAAQ;CAYtD;AAED,qBAAa,OAAO;IACZ,IAAI,SAAa;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAM;IACzC,OAAO,EAAE,kBAAkB,CAAC;IAE5B,QAAQ,EAAE,iCAAiC,CAEhD;IACK,MAAM,KAAM;gBAEP,WAAW,EAAE,WAAW;CAapC;AAED,cAAM,KAAK;IACH,IAAI,SAAW;IACf,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAM;IACzC,MAAM,KAAM;gBAEP,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,yBAAyB;CAUtE"}
|
|
@@ -7,11 +7,11 @@ export class SearchResultStore extends Array {
|
|
|
7
7
|
static get [Symbol.species]() {
|
|
8
8
|
return Array;
|
|
9
9
|
}
|
|
10
|
-
constructor(config, services, metaData, resultData, paginationData, merchData, loaded, previousPaginationData, // used for infinite scroll functionality
|
|
10
|
+
constructor(config, services, metaData, tracking, resultData, paginationData, merchData, loaded, previousPaginationData, // used for infinite scroll functionality
|
|
11
11
|
previousResults // used for infinite scroll functionality
|
|
12
12
|
) {
|
|
13
|
-
let results = (resultData || []).map((result
|
|
14
|
-
return new Product(services, result, metaData,
|
|
13
|
+
let results = (resultData || []).map((result) => {
|
|
14
|
+
return new Product(services, result, metaData, tracking?.responseId || '', config);
|
|
15
15
|
});
|
|
16
16
|
const variantConfig = config?.settings?.variants;
|
|
17
17
|
// preselected variant options
|
|
@@ -79,7 +79,7 @@ export class SearchResultStore extends Array {
|
|
|
79
79
|
return a.config.position.index - b.config.position.index;
|
|
80
80
|
})
|
|
81
81
|
.map((banner) => {
|
|
82
|
-
return new Banner(services, banner);
|
|
82
|
+
return new Banner(services, banner, tracking?.responseId || '');
|
|
83
83
|
});
|
|
84
84
|
if (banners && paginationData.totalResults) {
|
|
85
85
|
results = addBannersToResults(config, results, banners, paginationData);
|
|
@@ -89,14 +89,18 @@ export class SearchResultStore extends Array {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
export class Banner {
|
|
92
|
-
constructor(services, banner) {
|
|
92
|
+
constructor(services, banner, responseId) {
|
|
93
93
|
this.type = 'banner';
|
|
94
94
|
this.attributes = {};
|
|
95
95
|
this.mappings = {
|
|
96
96
|
core: {},
|
|
97
97
|
};
|
|
98
98
|
this.custom = {};
|
|
99
|
-
|
|
99
|
+
const htmlString = banner.value;
|
|
100
|
+
const match = typeof htmlString === 'string' && htmlString.match(/data-banner-id="(\d+)"/);
|
|
101
|
+
const uid = match ? match[1] : 'ss-ib-' + banner.config.position.index;
|
|
102
|
+
this.id = uid;
|
|
103
|
+
this.responseId = responseId;
|
|
100
104
|
this.config = banner.config;
|
|
101
105
|
this.value = banner.value;
|
|
102
106
|
makeObservable(this, {
|
|
@@ -107,7 +111,7 @@ export class Banner {
|
|
|
107
111
|
}
|
|
108
112
|
}
|
|
109
113
|
export class Product {
|
|
110
|
-
constructor(services, result, metaData,
|
|
114
|
+
constructor(services, result, metaData, responseId, config) {
|
|
111
115
|
this.type = 'product';
|
|
112
116
|
this.attributes = {};
|
|
113
117
|
this.mappings = {
|
|
@@ -120,7 +124,7 @@ export class Product {
|
|
|
120
124
|
this.id = result.id;
|
|
121
125
|
this.attributes = result.attributes;
|
|
122
126
|
this.mappings = result.mappings;
|
|
123
|
-
this.
|
|
127
|
+
this.responseId = result.responseId || responseId;
|
|
124
128
|
this.badges = new Badges(result, metaData);
|
|
125
129
|
// @ts-ignore - need to add bundleSeed to snapi-types
|
|
126
130
|
if (result.bundleSeed) {
|
|
@@ -561,6 +565,25 @@ function addBannersToResults(config, results, allBanners, paginationData) {
|
|
|
561
565
|
bannersAndResults.splice(resultIndex, 0, banner);
|
|
562
566
|
}
|
|
563
567
|
});
|
|
568
|
+
// when using infinite, need to adjust the inline banner responseIds
|
|
569
|
+
if (config?.settings?.infinite) {
|
|
570
|
+
bannersAndResults.forEach((item, index) => {
|
|
571
|
+
if (item.type === 'banner') {
|
|
572
|
+
// need to determine what the correctResponseId is based on the index position, pageSize (current page) and adjacent product responseIds
|
|
573
|
+
const pageSize = paginationData.pageSize;
|
|
574
|
+
const currentPage = Math.floor(index / pageSize) + 1;
|
|
575
|
+
const firstItemIndexOnPage = (currentPage - 1) * pageSize;
|
|
576
|
+
const lastItemIndexOnPage = firstItemIndexOnPage + pageSize - 1;
|
|
577
|
+
// find the first product on the current page to grab its responseId
|
|
578
|
+
for (let i = firstItemIndexOnPage; i < lastItemIndexOnPage; i++) {
|
|
579
|
+
if (bannersAndResults[i].type === 'product') {
|
|
580
|
+
item.responseId = bannersAndResults[i].responseId;
|
|
581
|
+
break;
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
});
|
|
586
|
+
}
|
|
564
587
|
return bannersAndResults;
|
|
565
588
|
}
|
|
566
589
|
function variantOptionClick(elem, variantConfig, results) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { SearchMerchandisingStore, BannerContent, ContentType } from './SearchMerchandisingStore';
|
|
1
|
+
export { SearchMerchandisingStore, BannerContent, ContentType, MerchandisingContentBanner } from './SearchMerchandisingStore';
|
|
2
2
|
export { SearchFacetStore, ValueFacet, RangeFacet, FacetValue, FacetHierarchyValue, FacetRangeValue } from './SearchFacetStore';
|
|
3
3
|
export { SearchFilterStore, Filter } from './SearchFilterStore';
|
|
4
4
|
export { SearchPaginationStore } from './SearchPaginationStore';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Search/Stores/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Search/Stores/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,WAAW,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAC9H,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAChI,OAAO,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAClH,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@searchspring/snap-store-mobx",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.73.6",
|
|
4
4
|
"description": "Snap MobX Store",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -20,16 +20,16 @@
|
|
|
20
20
|
"test:watch": "jest --watch"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@searchspring/snap-toolbox": "0.
|
|
23
|
+
"@searchspring/snap-toolbox": "0.73.6",
|
|
24
24
|
"mobx": "6.9.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@searchspring/snap-client": "0.
|
|
28
|
-
"@searchspring/snap-url-manager": "0.
|
|
27
|
+
"@searchspring/snap-client": "0.73.6",
|
|
28
|
+
"@searchspring/snap-url-manager": "0.73.6"
|
|
29
29
|
},
|
|
30
30
|
"sideEffects": false,
|
|
31
31
|
"files": [
|
|
32
32
|
"dist/**/*"
|
|
33
33
|
],
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "afcdd6d76bafbd19d5a1e7fa656a811700d99c19"
|
|
35
35
|
}
|