@searchspring/snap-store-mobx 0.54.0 → 0.56.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/dist/cjs/Autocomplete/AutocompleteStore.d.ts +2 -1
  2. package/dist/cjs/Autocomplete/AutocompleteStore.d.ts.map +1 -1
  3. package/dist/cjs/Autocomplete/AutocompleteStore.js +8 -7
  4. package/dist/cjs/Cart/CartStore.js +2 -2
  5. package/dist/cjs/Finder/FinderStore.d.ts +3 -2
  6. package/dist/cjs/Finder/FinderStore.d.ts.map +1 -1
  7. package/dist/cjs/Finder/FinderStore.js +5 -5
  8. package/dist/cjs/Meta/MetaStore.d.ts +15 -0
  9. package/dist/cjs/Meta/MetaStore.d.ts.map +1 -0
  10. package/dist/cjs/Meta/MetaStore.js +54 -0
  11. package/dist/cjs/Recommendation/RecommendationStore.d.ts +6 -1
  12. package/dist/cjs/Recommendation/RecommendationStore.d.ts.map +1 -1
  13. package/dist/cjs/Recommendation/RecommendationStore.js +4 -2
  14. package/dist/cjs/Search/SearchStore.d.ts +2 -1
  15. package/dist/cjs/Search/SearchStore.d.ts.map +1 -1
  16. package/dist/cjs/Search/SearchStore.js +8 -7
  17. package/dist/cjs/Search/Stores/SearchHistoryStore.js +1 -1
  18. package/dist/cjs/Search/Stores/SearchResultStore.d.ts +19 -9
  19. package/dist/cjs/Search/Stores/SearchResultStore.d.ts.map +1 -1
  20. package/dist/cjs/Search/Stores/SearchResultStore.js +180 -40
  21. package/dist/cjs/Search/Stores/index.d.ts +1 -1
  22. package/dist/cjs/Search/Stores/index.d.ts.map +1 -1
  23. package/dist/cjs/Search/Stores/index.js +2 -1
  24. package/dist/cjs/Storage/StorageStore.d.ts +5 -5
  25. package/dist/cjs/Storage/StorageStore.d.ts.map +1 -1
  26. package/dist/cjs/Storage/StorageStore.js +17 -17
  27. package/dist/cjs/index.d.ts +1 -0
  28. package/dist/cjs/index.d.ts.map +1 -1
  29. package/dist/cjs/index.js +3 -1
  30. package/dist/cjs/types.d.ts +23 -8
  31. package/dist/cjs/types.d.ts.map +1 -1
  32. package/dist/esm/Autocomplete/AutocompleteStore.d.ts +2 -1
  33. package/dist/esm/Autocomplete/AutocompleteStore.d.ts.map +1 -1
  34. package/dist/esm/Autocomplete/AutocompleteStore.js +8 -7
  35. package/dist/esm/Cart/CartStore.js +2 -2
  36. package/dist/esm/Finder/FinderStore.d.ts +3 -2
  37. package/dist/esm/Finder/FinderStore.d.ts.map +1 -1
  38. package/dist/esm/Finder/FinderStore.js +6 -6
  39. package/dist/esm/Meta/MetaStore.d.ts +15 -0
  40. package/dist/esm/Meta/MetaStore.d.ts.map +1 -0
  41. package/dist/esm/Meta/MetaStore.js +44 -0
  42. package/dist/esm/Recommendation/RecommendationStore.d.ts +6 -1
  43. package/dist/esm/Recommendation/RecommendationStore.d.ts.map +1 -1
  44. package/dist/esm/Recommendation/RecommendationStore.js +4 -2
  45. package/dist/esm/Search/SearchStore.d.ts +2 -1
  46. package/dist/esm/Search/SearchStore.d.ts.map +1 -1
  47. package/dist/esm/Search/SearchStore.js +8 -7
  48. package/dist/esm/Search/Stores/SearchHistoryStore.js +2 -2
  49. package/dist/esm/Search/Stores/SearchResultStore.d.ts +19 -9
  50. package/dist/esm/Search/Stores/SearchResultStore.d.ts.map +1 -1
  51. package/dist/esm/Search/Stores/SearchResultStore.js +159 -36
  52. package/dist/esm/Search/Stores/index.d.ts +1 -1
  53. package/dist/esm/Search/Stores/index.d.ts.map +1 -1
  54. package/dist/esm/Search/Stores/index.js +1 -1
  55. package/dist/esm/Storage/StorageStore.d.ts +5 -5
  56. package/dist/esm/Storage/StorageStore.d.ts.map +1 -1
  57. package/dist/esm/Storage/StorageStore.js +17 -17
  58. package/dist/esm/index.d.ts +1 -0
  59. package/dist/esm/index.d.ts.map +1 -1
  60. package/dist/esm/index.js +1 -0
  61. package/dist/esm/types.d.ts +23 -8
  62. package/dist/esm/types.d.ts.map +1 -1
  63. package/package.json +5 -5
@@ -1,14 +1,45 @@
1
1
  import { computed, makeObservable, observable } from 'mobx';
2
2
  import deepmerge from 'deepmerge';
3
3
  import { isPlainObject } from 'is-plain-object';
4
+ const VARIANT_ATTRIBUTE = 'ss-variant-option';
5
+ const VARIANT_ATTRIBUTE_SELECTED = 'ss-variant-option-selected';
4
6
  export class SearchResultStore extends Array {
5
7
  static get [Symbol.species]() {
6
8
  return Array;
7
9
  }
8
- constructor(config, services, resultData, paginationData, merchData) {
10
+ constructor(config, services, metaData, resultData, paginationData, merchData, loaded) {
9
11
  let results = (resultData || []).map((result) => {
10
- return new Product(services, result, config);
12
+ return new Product(services, result, metaData, config);
11
13
  });
14
+ const variantConfig = config?.settings?.variants;
15
+ // preselected variant options
16
+ if (variantConfig?.realtime?.enabled) {
17
+ // attach click events - ONLY happens once (known limitation)
18
+ if (!loaded && results.length) {
19
+ document.querySelectorAll(`[${VARIANT_ATTRIBUTE}]`).forEach((elem) => {
20
+ if (variantConfig?.field && !variantConfig?.realtime?.enabled === false) {
21
+ elem.addEventListener('click', () => variantOptionClick(elem, variantConfig, results));
22
+ }
23
+ });
24
+ }
25
+ // check for attributes for preselection
26
+ if (results.length) {
27
+ if (variantConfig?.field && !variantConfig?.realtime?.enabled === false) {
28
+ const options = {};
29
+ // grab values from elements on the page to form preselected elements
30
+ document.querySelectorAll(`[${VARIANT_ATTRIBUTE_SELECTED}]`).forEach((elem) => {
31
+ const attr = elem.getAttribute(VARIANT_ATTRIBUTE);
32
+ if (attr) {
33
+ const [option, value] = attr.split(':');
34
+ if (option && value) {
35
+ options[option.toLowerCase()] = [value.toLowerCase()];
36
+ }
37
+ }
38
+ });
39
+ makeVariantSelections(variantConfig, options, results);
40
+ }
41
+ }
42
+ }
12
43
  if (merchData?.content?.inline) {
13
44
  const banners = merchData.content.inline
14
45
  .sort(function (a, b) {
@@ -43,7 +74,7 @@ export class Banner {
43
74
  }
44
75
  }
45
76
  export class Product {
46
- constructor(services, result, config) {
77
+ constructor(services, result, metaData, config) {
47
78
  this.type = 'product';
48
79
  this.attributes = {};
49
80
  this.mappings = {
@@ -56,12 +87,13 @@ export class Product {
56
87
  this.id = result.id;
57
88
  this.attributes = result.attributes;
58
89
  this.mappings = result.mappings;
90
+ this.badges = new Badges(result, metaData);
59
91
  const variantsField = config?.settings?.variants?.field;
60
92
  if (config && variantsField && this.attributes && this.attributes[variantsField]) {
61
93
  try {
62
94
  // parse the field (JSON)
63
95
  const parsedVariants = JSON.parse(this.attributes[variantsField]);
64
- this.variants = new Variants(parsedVariants, this.mask, config.settings?.variants);
96
+ this.variants = new Variants(parsedVariants, this.mask, config?.settings?.variants);
65
97
  }
66
98
  catch (err) {
67
99
  // failed to parse the variant JSON
@@ -96,6 +128,55 @@ export class Product {
96
128
  return deepmerge({ id: this.id, mappings: this.mappings, attributes: this.attributes }, this.mask.data, { isMergeableObject: isPlainObject });
97
129
  }
98
130
  }
131
+ export class Badges {
132
+ constructor(result, metaData) {
133
+ this.all = [];
134
+ this.all = (result.badges || [])
135
+ .filter((badge) => {
136
+ // remove badges that are not in the meta or are disabled
137
+ return !!(badge?.tag && metaData?.badges?.tags && metaData?.badges?.tags[badge.tag] && metaData?.badges?.tags[badge.tag].enabled);
138
+ })
139
+ .map((badge) => {
140
+ // merge badge with badge meta data
141
+ const metaBadgeData = metaData?.badges?.tags?.[badge.tag];
142
+ return {
143
+ ...badge,
144
+ ...metaBadgeData,
145
+ };
146
+ })
147
+ .sort((a, b) => {
148
+ return a.priority - b.priority;
149
+ });
150
+ makeObservable(this, {
151
+ all: observable,
152
+ tags: computed,
153
+ locations: computed,
154
+ });
155
+ }
156
+ // get all the result badges that are in a specific location
157
+ atLocation(location) {
158
+ const locations = Array.isArray(location) ? location : [location];
159
+ return this.all.filter((badge) => {
160
+ // filter location
161
+ return locations.some((location) => badge.location.startsWith(`${location}/`) || badge.location == location);
162
+ });
163
+ }
164
+ get tags() {
165
+ return this.all.reduce((badgeMap, badge) => {
166
+ badgeMap[badge.tag] = badge;
167
+ return badgeMap;
168
+ }, {});
169
+ }
170
+ get locations() {
171
+ return this.all.reduce((locationMap, badge) => {
172
+ // put badge in location by path
173
+ const [section, tag] = badge.location.split('/');
174
+ locationMap[section] = locationMap[section] || {};
175
+ locationMap[section][tag] = (locationMap[section][tag] || []).concat(badge);
176
+ return locationMap;
177
+ }, {});
178
+ }
179
+ }
99
180
  // Mask is used to power the product display for quick attribute swapping
100
181
  export class ProductMask {
101
182
  constructor() {
@@ -131,7 +212,9 @@ export class Variants {
131
212
  this.active = variant;
132
213
  mask.set({ mappings: this.active.mappings, attributes: this.active.attributes });
133
214
  };
134
- this.config = config;
215
+ if (config) {
216
+ this.config = config;
217
+ }
135
218
  this.update(variantData, config);
136
219
  }
137
220
  update(variantData, config = this.config) {
@@ -149,12 +232,8 @@ export class Variants {
149
232
  //need to reset this.selections first
150
233
  this.selections = [];
151
234
  options.map((option) => {
152
- // TODO - merge with variant config before constructing selection (for label overrides and swatch mappings)
153
- const optionConfig = {
154
- field: option,
155
- label: option,
156
- };
157
- this.selections.push(new VariantSelection(this, optionConfig));
235
+ const variantOptionConfig = this.config?.options && this.config.options[option];
236
+ this.selections.push(new VariantSelection(this, option, variantOptionConfig));
158
237
  });
159
238
  const preselectedOptions = {};
160
239
  if (config?.options) {
@@ -174,7 +253,7 @@ export class Variants {
174
253
  }
175
254
  makeSelections(options) {
176
255
  // options = {color: 'Blue', size: 'L'};
177
- if (!options) {
256
+ if (!options || !Object.keys(options).length) {
178
257
  // select first available for each selection
179
258
  this.selections.forEach((selection) => {
180
259
  const firstAvailableOption = selection.values.find((value) => value.available);
@@ -189,12 +268,12 @@ export class Variants {
189
268
  //make all options available for first selection.
190
269
  const availableOptions = selection.values.filter((value) => (idx == 0 ? true : value.available));
191
270
  const preferedOptions = options[selection.field];
192
- let preferencedOption = availableOptions[0];
271
+ let preferencedOption = selection.selected || availableOptions[0];
193
272
  // if theres a preference for that field
194
273
  if (preferedOptions) {
195
274
  const checkIfAvailable = (preference) => {
196
275
  //see if that option is in the available options
197
- const availablePreferedOptions = availableOptions.find((value) => value.value.toLowerCase() == preference.toLowerCase());
276
+ const availablePreferedOptions = availableOptions.find((value) => value.value.toString().toLowerCase() == preference?.toString().toLowerCase());
198
277
  //use it
199
278
  if (availablePreferedOptions) {
200
279
  preferencedOption = availablePreferedOptions;
@@ -211,7 +290,7 @@ export class Variants {
211
290
  }
212
291
  }
213
292
  if (preferencedOption) {
214
- selection.select(preferencedOption.value);
293
+ selection.select(preferencedOption.value, true);
215
294
  }
216
295
  });
217
296
  }
@@ -228,12 +307,12 @@ export class Variants {
228
307
  // refine selections ensuring that the selection that triggered the update refines LAST
229
308
  orderedSelections.forEach((selection) => selection.refineValues(this));
230
309
  // check to see if we have enough selections made to update the display
231
- const selectedSelections = this.selections.filter((selection) => selection.selected);
310
+ const selectedSelections = this.selections.filter((selection) => selection.selected?.value?.length);
232
311
  if (selectedSelections.length) {
233
312
  let availableVariants = this.data;
234
313
  // loop through selectedSelections and only include available products that match current selections
235
314
  for (const selectedSelection of selectedSelections) {
236
- availableVariants = availableVariants.filter((variant) => selectedSelection.selected == variant.options[selectedSelection.field].value && variant.available);
315
+ availableVariants = availableVariants.filter((variant) => selectedSelection.selected?.value == variant.options[selectedSelection.field].value && variant.available);
237
316
  }
238
317
  // set active variant
239
318
  if (availableVariants.length == 1) {
@@ -243,12 +322,13 @@ export class Variants {
243
322
  }
244
323
  }
245
324
  export class VariantSelection {
246
- constructor(variants, selectorConfig) {
247
- this.selected = ''; //ex: blue
248
- this.previouslySelected = '';
325
+ constructor(variants, selectorField, variantConfig) {
326
+ this.selected = undefined;
327
+ this.previouslySelected = undefined;
249
328
  this.values = [];
250
- this.field = selectorConfig.field;
251
- this.label = selectorConfig.label;
329
+ this.field = selectorField;
330
+ this.label = variantConfig?.label || selectorField;
331
+ this.config = variantConfig || {};
252
332
  // needed to prevent attaching variants as class property
253
333
  this.variantsUpdate = () => variants.refineSelections(this);
254
334
  // create possible values from the data and refine them
@@ -264,20 +344,36 @@ export class VariantSelection {
264
344
  let availableVariants = variants.data;
265
345
  // loop through selectedSelections and remove products that do not match
266
346
  for (const selectedSelection of selectedSelections) {
267
- availableVariants = availableVariants.filter((variant) => selectedSelection.selected == variant.options[selectedSelection.field].value && variant.available);
347
+ availableVariants = availableVariants.filter((variant) => selectedSelection.selected?.value == variant.options[selectedSelection.field].value && variant.available);
268
348
  }
269
349
  const newValues = variants.data
270
350
  .filter((variant) => variant.options[this.field])
271
351
  .reduce((values, variant) => {
272
352
  if (!values.some((val) => variant.options[this.field].value == val.value)) {
273
- values.push({
274
- label: variant.options[this.field].value,
275
- // TODO: use configurable mappings from config
276
- // TODO: set background for swatches (via configurable mappings) from config
277
- thumbnailImageUrl: variant.mappings.core?.thumbnailImageUrl,
353
+ const value = variant.options[this.field].value;
354
+ const thumbnailImageUrl = variant.mappings.core?.thumbnailImageUrl;
355
+ const mappedValue = {
356
+ value: value,
357
+ label: value,
358
+ thumbnailImageUrl: thumbnailImageUrl,
278
359
  available: Boolean(availableVariants.some((availableVariant) => availableVariant.options[this.field].value == variant.options[this.field].value)),
279
- ...variant.options[this.field],
280
- });
360
+ };
361
+ if (this.config.thumbnailBackgroundImages) {
362
+ mappedValue.backgroundImageUrl = thumbnailImageUrl;
363
+ }
364
+ if (this.config.mappings && this.config.mappings && this.config.mappings[value.toString().toLowerCase()]) {
365
+ const mapping = this.config.mappings[value.toString().toLowerCase()];
366
+ if (mapping.label) {
367
+ mappedValue.label = mapping.label;
368
+ }
369
+ if (mapping.background) {
370
+ mappedValue.background = mapping.background;
371
+ }
372
+ if (mapping.backgroundImageUrl) {
373
+ mappedValue.backgroundImageUrl = mapping.backgroundImageUrl;
374
+ }
375
+ }
376
+ values.push(mappedValue);
281
377
  }
282
378
  // TODO: use sorting function from config
283
379
  return values;
@@ -285,19 +381,19 @@ export class VariantSelection {
285
381
  // if selection has been made
286
382
  if (this.selected) {
287
383
  // check if the selection is stil available
288
- if (!newValues.some((val) => val.value == this.selected && val.available)) {
384
+ if (!newValues.some((val) => val.value == this.selected?.value && val.available)) {
289
385
  // the selection is no longer available, attempt to select previous selection
290
386
  if (this.selected !== this.previouslySelected &&
291
387
  this.previouslySelected &&
292
- newValues.some((val) => val.value == this.previouslySelected && val.available)) {
293
- this.select(this.previouslySelected, true);
388
+ newValues.some((val) => val.value == this.previouslySelected?.value && val.available)) {
389
+ this.select(this.previouslySelected.value, true);
294
390
  }
295
391
  else {
296
392
  // choose the first available option if previous seletions are unavailable
297
393
  const availableValues = newValues.filter((val) => val.available);
298
394
  if (newValues.length && availableValues.length) {
299
395
  const nextAvailableValue = availableValues[0].value;
300
- if (this.selected !== nextAvailableValue) {
396
+ if (this.selected.value !== nextAvailableValue) {
301
397
  this.select(nextAvailableValue, true);
302
398
  }
303
399
  }
@@ -307,7 +403,7 @@ export class VariantSelection {
307
403
  this.values = newValues;
308
404
  }
309
405
  reset() {
310
- this.selected = '';
406
+ this.selected = undefined;
311
407
  this.values.forEach((val) => (val.available = false));
312
408
  }
313
409
  select(value, internalSelection = false) {
@@ -316,7 +412,7 @@ export class VariantSelection {
316
412
  if (!internalSelection) {
317
413
  this.previouslySelected = this.selected;
318
414
  }
319
- this.selected = value;
415
+ this.selected = valueExist;
320
416
  this.variantsUpdate();
321
417
  }
322
418
  }
@@ -376,3 +472,30 @@ function addBannersToResults(config, results, banners, paginationData) {
376
472
  });
377
473
  return results;
378
474
  }
475
+ function variantOptionClick(elem, variantConfig, results) {
476
+ const options = {};
477
+ const attr = elem.getAttribute(VARIANT_ATTRIBUTE);
478
+ if (attr) {
479
+ const [option, value] = attr.split(':');
480
+ options[option.toLowerCase()] = [value.toLowerCase()];
481
+ makeVariantSelections(variantConfig, options, results);
482
+ }
483
+ }
484
+ function makeVariantSelections(variantConfig, options, results) {
485
+ let filteredResults = results;
486
+ // filter based on config
487
+ variantConfig.realtime?.filters?.forEach((filter) => {
488
+ if (filter == 'first') {
489
+ filteredResults = [filteredResults[0]];
490
+ }
491
+ if (filter == 'unaltered') {
492
+ filteredResults = filteredResults.filter((result) => !result.variants?.selections.some((selection) => selection.previouslySelected));
493
+ }
494
+ });
495
+ filteredResults.forEach((result) => {
496
+ // no banner types
497
+ if (result.type == 'product') {
498
+ result.variants?.makeSelections(options);
499
+ }
500
+ });
501
+ }
@@ -2,7 +2,7 @@ export { SearchMerchandisingStore, BannerContent, ContentType } from './SearchMe
2
2
  export { SearchFacetStore, ValueFacet, RangeFacet, FacetValue, FacetHierarchyValue, FacetRangeValue } from './SearchFacetStore';
3
3
  export { SearchFilterStore, Filter } from './SearchFilterStore';
4
4
  export { SearchPaginationStore } from './SearchPaginationStore';
5
- export { SearchResultStore, Product, Banner } from './SearchResultStore';
5
+ export { SearchResultStore, Product, Banner, VariantSelection, VariantSelectionValue } from './SearchResultStore';
6
6
  export { SearchSortingStore } from './SearchSortingStore';
7
7
  export { SearchQueryStore } from './SearchQueryStore';
8
8
  export { SearchHistoryStore } from './SearchHistoryStore';
@@ -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;AAClG,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,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,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,MAAM,4BAA4B,CAAC;AAClG,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"}
@@ -2,7 +2,7 @@ export { SearchMerchandisingStore, ContentType } from './SearchMerchandisingStor
2
2
  export { SearchFacetStore, ValueFacet, RangeFacet, FacetValue, FacetHierarchyValue, FacetRangeValue } from './SearchFacetStore';
3
3
  export { SearchFilterStore, Filter } from './SearchFilterStore';
4
4
  export { SearchPaginationStore } from './SearchPaginationStore';
5
- export { SearchResultStore, Product, Banner } from './SearchResultStore';
5
+ export { SearchResultStore, Product, Banner, VariantSelection } from './SearchResultStore';
6
6
  export { SearchSortingStore } from './SearchSortingStore';
7
7
  export { SearchQueryStore } from './SearchQueryStore';
8
8
  export { SearchHistoryStore } from './SearchHistoryStore';
@@ -10,7 +10,7 @@ export declare class StorageStore {
10
10
  clear(): void;
11
11
  }
12
12
  export type StorageConfig = {
13
- type: StorageType;
13
+ type: StorageType | keyof typeof StorageType;
14
14
  cookie?: {
15
15
  expiration?: number;
16
16
  sameSite?: string;
@@ -18,9 +18,9 @@ export type StorageConfig = {
18
18
  key: string;
19
19
  };
20
20
  export declare enum StorageType {
21
- SESSION = "session",
22
- LOCAL = "local",
23
- COOKIE = "cookie",
24
- MEMORY = "memory"
21
+ session = "session",
22
+ local = "local",
23
+ cookie = "cookie",
24
+ memory = "memory"
25
25
  }
26
26
  //# sourceMappingURL=StorageStore.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"StorageStore.d.ts","sourceRoot":"","sources":["../../../src/Storage/StorageStore.ts"],"names":[],"mappings":"AAMA,qBAAa,YAAY;IACxB,OAAO,CAAC,IAAI,CAA4B;IACxC,OAAO,CAAC,UAAU,CAAe;IACjC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,GAAG,CAAgB;IACpB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;gBAE3B,MAAM,CAAC,EAAE,aAAa;IA8C3B,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI;IAyBnC,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,GAAG,SAAS;IAiClC,KAAK,IAAI,IAAI;CAcpB;AAED,MAAM,MAAM,aAAa,GAAG;IAC3B,IAAI,EAAE,WAAW,CAAC;IAClB,MAAM,CAAC,EAAE;QACR,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,GAAG,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,oBAAY,WAAW;IACtB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,MAAM,WAAW;CACjB"}
1
+ {"version":3,"file":"StorageStore.d.ts","sourceRoot":"","sources":["../../../src/Storage/StorageStore.ts"],"names":[],"mappings":"AAMA,qBAAa,YAAY;IACxB,OAAO,CAAC,IAAI,CAA4B;IACxC,OAAO,CAAC,UAAU,CAAe;IACjC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,GAAG,CAAgB;IACpB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;gBAE3B,MAAM,CAAC,EAAE,aAAa;IA8C3B,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI;IAyBnC,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,GAAG,SAAS;IAiClC,KAAK,IAAI,IAAI;CAcpB;AAED,MAAM,MAAM,aAAa,GAAG;IAC3B,IAAI,EAAE,WAAW,GAAG,MAAM,OAAO,WAAW,CAAC;IAC7C,MAAM,CAAC,EAAE;QACR,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,GAAG,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,oBAAY,WAAW;IACtB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,MAAM,WAAW;CACjB"}
@@ -20,7 +20,7 @@ export class StorageStore {
20
20
  this.sameSite = config.cookie.sameSite;
21
21
  }
22
22
  switch (config.type) {
23
- case StorageType.SESSION: {
23
+ case StorageType.session: {
24
24
  this.type = featureFlags.storage ? config.type : null;
25
25
  if (this.type) {
26
26
  this.state = JSON.parse(window.sessionStorage.getItem(this.key) || '{}');
@@ -28,7 +28,7 @@ export class StorageStore {
28
28
  }
29
29
  break;
30
30
  }
31
- case StorageType.LOCAL: {
31
+ case StorageType.local: {
32
32
  this.type = featureFlags.storage ? config.type : null;
33
33
  if (this.type) {
34
34
  this.state = JSON.parse(window.localStorage.getItem(this.key) || '{}');
@@ -36,7 +36,7 @@ export class StorageStore {
36
36
  }
37
37
  break;
38
38
  }
39
- case StorageType.COOKIE: {
39
+ case StorageType.cookie: {
40
40
  if (featureFlags.cookies) {
41
41
  this.type = config.type;
42
42
  const data = utils.cookies.get(this.key);
@@ -47,7 +47,7 @@ export class StorageStore {
47
47
  break;
48
48
  }
49
49
  default: {
50
- this.type = StorageType.MEMORY;
50
+ this.type = StorageType.memory;
51
51
  }
52
52
  }
53
53
  }
@@ -65,28 +65,28 @@ export class StorageStore {
65
65
  }
66
66
  });
67
67
  switch (this.type) {
68
- case StorageType.SESSION:
68
+ case StorageType.session:
69
69
  window.sessionStorage.setItem(this.key, JSON.stringify(this.state));
70
70
  break;
71
- case StorageType.LOCAL:
71
+ case StorageType.local:
72
72
  window.localStorage.setItem(this.key, JSON.stringify(this.state));
73
73
  break;
74
- case StorageType.COOKIE:
74
+ case StorageType.cookie:
75
75
  utils.cookies.set(this.key, JSON.stringify(this.state), this.sameSite, this.expiration);
76
76
  break;
77
77
  }
78
78
  }
79
79
  get(path) {
80
80
  switch (this.type) {
81
- case StorageType.SESSION:
81
+ case StorageType.session:
82
82
  const sessionData = window.sessionStorage.getItem(this.key);
83
83
  this.state = sessionData ? JSON.parse(sessionData) : {};
84
84
  break;
85
- case StorageType.LOCAL:
85
+ case StorageType.local:
86
86
  const localData = window.localStorage.getItem(this.key);
87
87
  this.state = localData ? JSON.parse(localData) : {};
88
88
  break;
89
- case StorageType.COOKIE:
89
+ case StorageType.cookie:
90
90
  const data = utils.cookies.get(this.key);
91
91
  if (data) {
92
92
  this.state = JSON.parse(data) || {};
@@ -110,13 +110,13 @@ export class StorageStore {
110
110
  }
111
111
  clear() {
112
112
  switch (this.type) {
113
- case StorageType.SESSION:
113
+ case StorageType.session:
114
114
  window.sessionStorage.removeItem(this.key);
115
115
  break;
116
- case StorageType.LOCAL:
116
+ case StorageType.local:
117
117
  window.localStorage.removeItem(this.key);
118
118
  break;
119
- case StorageType.COOKIE:
119
+ case StorageType.cookie:
120
120
  utils.cookies.unset(this.key);
121
121
  break;
122
122
  }
@@ -125,8 +125,8 @@ export class StorageStore {
125
125
  }
126
126
  export var StorageType;
127
127
  (function (StorageType) {
128
- StorageType["SESSION"] = "session";
129
- StorageType["LOCAL"] = "local";
130
- StorageType["COOKIE"] = "cookie";
131
- StorageType["MEMORY"] = "memory";
128
+ StorageType["session"] = "session";
129
+ StorageType["local"] = "local";
130
+ StorageType["cookie"] = "cookie";
131
+ StorageType["memory"] = "memory";
132
132
  })(StorageType || (StorageType = {}));
@@ -6,5 +6,6 @@ export * from './Search/Stores/';
6
6
  export { RecommendationStore } from './Recommendation/RecommendationStore';
7
7
  export { CartStore } from './Cart/CartStore';
8
8
  export { StorageStore, StorageConfig, StorageType } from './Storage/StorageStore';
9
+ export { MetaStore } from './Meta/MetaStore';
9
10
  export * from './types';
10
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAElF,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAClF,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,cAAc,SAAS,CAAC"}
package/dist/esm/index.js CHANGED
@@ -6,4 +6,5 @@ export * from './Search/Stores/';
6
6
  export { RecommendationStore } from './Recommendation/RecommendationStore';
7
7
  export { CartStore } from './Cart/CartStore';
8
8
  export { StorageStore, StorageType } from './Storage/StorageStore';
9
+ export { MetaStore } from './Meta/MetaStore';
9
10
  export * from './types';
@@ -1,20 +1,32 @@
1
1
  import type { UrlManager } from '@searchspring/snap-url-manager';
2
- import type { SearchResponseModelFacetValueAllOfValues, AutocompleteRequestModel, SearchRequestModel } from '@searchspring/snapi-types';
2
+ import type { SearchResponseModelFacetValueAllOfValues, AutocompleteRequestModel, SearchRequestModel, MetaResponseModelBadgeTag, SearchResponseModelResultBadges } from '@searchspring/snapi-types';
3
3
  export type StoreConfig = {
4
4
  id: string;
5
5
  [any: string]: unknown;
6
6
  };
7
+ export type VariantConfigFilterTypes = 'first' | 'unaltered';
7
8
  export type VariantConfig = {
8
9
  field: string;
10
+ realtime?: {
11
+ enabled: boolean;
12
+ filters?: VariantConfigFilterTypes[];
13
+ };
9
14
  options?: {
10
- [field: string]: {
11
- preSelected?: string[];
12
- };
15
+ [optionField: string]: VariantOptionConfig;
13
16
  };
14
17
  };
15
- export type VariantSelectionOptions = {
16
- field: string;
17
- label: string;
18
+ export type VariantOptionConfig = {
19
+ label?: string;
20
+ preSelected?: string[];
21
+ thumbnailBackgroundImages?: boolean;
22
+ mappings?: VariantOptionConfigMappings;
23
+ };
24
+ export type VariantOptionConfigMappings = {
25
+ [optionValue: string]: {
26
+ label?: string;
27
+ background?: string;
28
+ backgroundImageUrl?: string;
29
+ };
18
30
  };
19
31
  export type SearchStoreConfig = StoreConfig & {
20
32
  globals?: Partial<SearchRequestModel>;
@@ -106,7 +118,9 @@ export type RecommendationStoreConfig = StoreConfig & {
106
118
  realtime?: boolean;
107
119
  batched?: boolean;
108
120
  order?: number;
109
- variants?: VariantConfig;
121
+ settings?: {
122
+ variants?: VariantConfig;
123
+ };
110
124
  };
111
125
  export type StoreConfigs = SearchStoreConfig | AutocompleteStoreConfig | FinderStoreConfig | RecommendationStoreConfig;
112
126
  export type StoreServices = {
@@ -125,4 +139,5 @@ export type SelectedSelection = {
125
139
  export type FinderStoreState = {
126
140
  persisted: boolean;
127
141
  };
142
+ export type ResultBadge = MetaResponseModelBadgeTag & SearchResponseModelResultBadges;
128
143
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,EAAE,wCAAwC,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAExI,MAAM,MAAM,WAAW,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE;QACT,CAAC,KAAK,EAAE,MAAM,GAAG;YAChB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;SACvB,CAAC;KACF,CAAC;CACF,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CAGd,CAAC;AAGF,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG;IAC7C,OAAO,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACtC,QAAQ,CAAC,EAAE;QACV,SAAS,CAAC,EA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",
3
- "version": "0.54.0",
3
+ "version": "0.56.0",
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.54.0",
23
+ "@searchspring/snap-toolbox": "^0.56.0",
24
24
  "mobx": "6.9.0"
25
25
  },
26
26
  "devDependencies": {
27
- "@searchspring/snap-client": "^0.54.0",
28
- "@searchspring/snap-url-manager": "^0.54.0"
27
+ "@searchspring/snap-client": "^0.56.0",
28
+ "@searchspring/snap-url-manager": "^0.56.0"
29
29
  },
30
30
  "sideEffects": false,
31
31
  "files": [
32
32
  "dist/**/*"
33
33
  ],
34
- "gitHead": "a54d2c6579bf83500ed2faca8ff72b3e3495f063"
34
+ "gitHead": "3326303c739fd3bbb23e6477b275b89f7df3bb74"
35
35
  }