@athoscommerce/snap-store-mobx 1.2.3-beta.4 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Autocomplete/AutocompleteStore.d.ts +1 -1
- package/dist/cjs/Autocomplete/AutocompleteStore.d.ts.map +1 -1
- package/dist/cjs/Autocomplete/AutocompleteStore.js +4 -4
- package/dist/cjs/Autocomplete/Stores/AutocompleteFacetStore.d.ts.map +1 -1
- package/dist/cjs/Autocomplete/Stores/AutocompleteFacetStore.js +2 -4
- 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 -3
- package/dist/cjs/Finder/Stores/FinderSelectionStore.d.ts +1 -1
- package/dist/cjs/Finder/Stores/FinderSelectionStore.d.ts.map +1 -1
- package/dist/cjs/Search/SearchStore.d.ts +1 -1
- package/dist/cjs/Search/SearchStore.d.ts.map +1 -1
- package/dist/cjs/Search/SearchStore.js +2 -2
- package/dist/cjs/Search/Stores/SearchFacetStore.d.ts +12 -12
- package/dist/cjs/Search/Stores/SearchFacetStore.d.ts.map +1 -1
- package/dist/cjs/Search/Stores/SearchFacetStore.js +22 -32
- package/dist/cjs/Search/Stores/SearchHistoryStore.js +2 -2
- package/dist/cjs/Search/Stores/index.d.ts +1 -1
- package/dist/cjs/Search/Stores/index.d.ts.map +1 -1
- package/dist/cjs/Search/Stores/index.js +1 -2
- package/dist/cjs/index.d.ts +1 -5
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +4 -8
- package/dist/cjs/types.d.ts +2 -13
- package/dist/cjs/types.d.ts.map +1 -1
- package/dist/esm/Autocomplete/AutocompleteStore.d.ts +1 -1
- package/dist/esm/Autocomplete/AutocompleteStore.d.ts.map +1 -1
- package/dist/esm/Autocomplete/AutocompleteStore.js +2 -2
- package/dist/esm/Autocomplete/Stores/AutocompleteFacetStore.d.ts.map +1 -1
- package/dist/esm/Autocomplete/Stores/AutocompleteFacetStore.js +5 -7
- 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 +1 -1
- package/dist/esm/Finder/Stores/FinderSelectionStore.d.ts +1 -1
- package/dist/esm/Finder/Stores/FinderSelectionStore.d.ts.map +1 -1
- package/dist/esm/Search/SearchStore.d.ts +1 -1
- package/dist/esm/Search/SearchStore.d.ts.map +1 -1
- package/dist/esm/Search/SearchStore.js +1 -1
- package/dist/esm/Search/Stores/SearchFacetStore.d.ts +12 -12
- package/dist/esm/Search/Stores/SearchFacetStore.d.ts.map +1 -1
- package/dist/esm/Search/Stores/SearchFacetStore.js +22 -31
- package/dist/esm/Search/Stores/SearchHistoryStore.js +1 -1
- package/dist/esm/Search/Stores/index.d.ts +1 -1
- package/dist/esm/Search/Stores/index.d.ts.map +1 -1
- package/dist/esm/Search/Stores/index.js +1 -1
- package/dist/esm/index.d.ts +1 -5
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -3
- package/dist/esm/types.d.ts +2 -13
- package/dist/esm/types.d.ts.map +1 -1
- package/package.json +11 -6
- package/dist/cjs/Chat/ChatStore.d.ts +0 -57
- package/dist/cjs/Chat/ChatStore.d.ts.map +0 -1
- package/dist/cjs/Chat/ChatStore.js +0 -415
- package/dist/cjs/Chat/Stores/ChatAttachmentStore.d.ts +0 -98
- package/dist/cjs/Chat/Stores/ChatAttachmentStore.d.ts.map +0 -1
- package/dist/cjs/Chat/Stores/ChatAttachmentStore.js +0 -314
- package/dist/cjs/Chat/Stores/ChatCompareStore.d.ts +0 -14
- package/dist/cjs/Chat/Stores/ChatCompareStore.d.ts.map +0 -1
- package/dist/cjs/Chat/Stores/ChatCompareStore.js +0 -63
- package/dist/cjs/Chat/Stores/ChatSessionStore.d.ts +0 -117
- package/dist/cjs/Chat/Stores/ChatSessionStore.d.ts.map +0 -1
- package/dist/cjs/Chat/Stores/ChatSessionStore.js +0 -689
- package/dist/cjs/Storage/StorageStore.d.ts +0 -27
- package/dist/cjs/Storage/StorageStore.d.ts.map +0 -1
- package/dist/cjs/Storage/StorageStore.js +0 -176
- package/dist/esm/Chat/ChatStore.d.ts +0 -57
- package/dist/esm/Chat/ChatStore.d.ts.map +0 -1
- package/dist/esm/Chat/ChatStore.js +0 -355
- package/dist/esm/Chat/Stores/ChatAttachmentStore.d.ts +0 -98
- package/dist/esm/Chat/Stores/ChatAttachmentStore.d.ts.map +0 -1
- package/dist/esm/Chat/Stores/ChatAttachmentStore.js +0 -222
- package/dist/esm/Chat/Stores/ChatCompareStore.d.ts +0 -14
- package/dist/esm/Chat/Stores/ChatCompareStore.d.ts.map +0 -1
- package/dist/esm/Chat/Stores/ChatCompareStore.js +0 -49
- package/dist/esm/Chat/Stores/ChatSessionStore.d.ts +0 -117
- package/dist/esm/Chat/Stores/ChatSessionStore.d.ts.map +0 -1
- package/dist/esm/Chat/Stores/ChatSessionStore.js +0 -661
- package/dist/esm/Storage/StorageStore.d.ts +0 -27
- package/dist/esm/Storage/StorageStore.d.ts.map +0 -1
- package/dist/esm/Storage/StorageStore.js +0 -169
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UrlManager } from '@athoscommerce/snap-url-manager';
|
|
2
|
+
import { StorageStore } from '@athoscommerce/snap-toolbox';
|
|
2
3
|
import { AbstractStore } from '../Abstract/AbstractStore';
|
|
3
4
|
import { SearchFilterStore, SearchResultStore, SearchMerchandisingStore, SearchPaginationStore, SearchSortingStore } from '../Search/Stores';
|
|
4
|
-
import { StorageStore } from '../Storage/StorageStore';
|
|
5
5
|
import { AutocompleteStateStore, AutocompleteTermStore, AutocompleteQueryStore, AutocompleteFacetStore, AutocompleteTrendingStore, AutocompleteHistoryStore } from './Stores';
|
|
6
6
|
import type { AutocompleteResponseModel, MetaResponseModel } from '@athoscommerce/snapi-types';
|
|
7
7
|
import type { TrendingResponseModel } from '@athoscommerce/snap-client';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutocompleteStore.d.ts","sourceRoot":"","sources":["../../../src/Autocomplete/AutocompleteStore.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,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,
|
|
1
|
+
{"version":3,"file":"AutocompleteStore.d.ts","sourceRoot":"","sources":["../../../src/Autocomplete/AutocompleteStore.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,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,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,4BAA4B,CAAC;AAC/F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,KAAK,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,qBAAa,iBAAkB,SAAQ,aAAa,CAAC,uBAAuB,CAAC;IACrE,QAAQ,EAAE,aAAa,CAAC;IACxB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,aAAa,EAAG,wBAAwB,CAAC;IACzC,MAAM,EAAG,sBAAsB,CAAC;IAChC,KAAK,EAAG,qBAAqB,CAAC;IAC9B,MAAM,EAAG,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;IAoCpE,IAAI,QAAQ,YAEX;IAEM,KAAK,IAAI,IAAI;IAMb,WAAW,IAAI,IAAI;IA8BnB,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,QAAQ,EAAE,qBAAqB,GAAG,IAAI;IAiB1D,MAAM,CAAC,IAAI,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,iBAAiB,CAAC;QAAC,MAAM,CAAC,EAAE,yBAAyB,CAAA;KAAE,GAAG,IAAI;CA8G5F"}
|
|
@@ -17,9 +17,9 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.AutocompleteStore = void 0;
|
|
19
19
|
var mobx_1 = require("mobx");
|
|
20
|
+
var snap_toolbox_1 = require("@athoscommerce/snap-toolbox");
|
|
20
21
|
var AbstractStore_1 = require("../Abstract/AbstractStore");
|
|
21
22
|
var Stores_1 = require("../Search/Stores");
|
|
22
|
-
var StorageStore_1 = require("../Storage/StorageStore");
|
|
23
23
|
var Stores_2 = require("./Stores");
|
|
24
24
|
var MetaStore_1 = require("../Meta/MetaStore");
|
|
25
25
|
var AutocompleteStore = /** @class */ (function (_super) {
|
|
@@ -34,7 +34,7 @@ var AutocompleteStore = /** @class */ (function (_super) {
|
|
|
34
34
|
_this.state = new Stores_2.AutocompleteStateStore({
|
|
35
35
|
services: _this.services,
|
|
36
36
|
});
|
|
37
|
-
_this.storage = new
|
|
37
|
+
_this.storage = new snap_toolbox_1.StorageStore();
|
|
38
38
|
_this.trending = [];
|
|
39
39
|
_this.history = [];
|
|
40
40
|
_this.initHistory();
|
|
@@ -69,9 +69,9 @@ var AutocompleteStore = /** @class */ (function (_super) {
|
|
|
69
69
|
};
|
|
70
70
|
AutocompleteStore.prototype.initHistory = function () {
|
|
71
71
|
var _this = this;
|
|
72
|
-
var _a, _b;
|
|
72
|
+
var _a, _b, _c, _d;
|
|
73
73
|
var limit = (_b = (_a = this.config.settings) === null || _a === void 0 ? void 0 : _a.history) === null || _b === void 0 ? void 0 : _b.limit;
|
|
74
|
-
if (limit) {
|
|
74
|
+
if (limit && ((_d = (_c = this.config.settings) === null || _c === void 0 ? void 0 : _c.history) === null || _d === void 0 ? void 0 : _d.enabled) !== false) {
|
|
75
75
|
var historyStore = new Stores_1.SearchHistoryStore({
|
|
76
76
|
services: this.services,
|
|
77
77
|
config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutocompleteFacetStore.d.ts","sourceRoot":"","sources":["../../../../src/Autocomplete/Stores/AutocompleteFacetStore.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,KAAK,4BAA4B,GAAG,sBAAsB,GAAG;IAC5D,KAAK,EAAE;QACN,YAAY,EAAE,sBAAsB,CAAC;KACrC,CAAC;CACF,CAAC;AACF,qBAAa,sBAAuB,SAAQ,KAAK;IAChD,MAAM,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,gBAAgB,CAE9C;gBAEW,MAAM,EAAE,4BAA4B;
|
|
1
|
+
{"version":3,"file":"AutocompleteFacetStore.d.ts","sourceRoot":"","sources":["../../../../src/Autocomplete/Stores/AutocompleteFacetStore.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,KAAK,4BAA4B,GAAG,sBAAsB,GAAG;IAC5D,KAAK,EAAE;QACN,YAAY,EAAE,sBAAsB,CAAC;KACrC,CAAC;CACF,CAAC;AACF,qBAAa,sBAAuB,SAAQ,KAAK;IAChD,MAAM,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,gBAAgB,CAE9C;gBAEW,MAAM,EAAE,4BAA4B;CAkChD"}
|
|
@@ -33,14 +33,12 @@ var AutocompleteFacetStore = /** @class */ (function (_super) {
|
|
|
33
33
|
function AutocompleteFacetStore(params) {
|
|
34
34
|
var _a = params || {}, services = _a.services, state = _a.state;
|
|
35
35
|
// allow for only a singular facet option selection at a time
|
|
36
|
-
var facets = new Stores_1.SearchFacetStore(__assign(__assign({}, params), { services: (
|
|
37
|
-
? __assign(__assign({}, services), { urlManager: services.urlManager.remove('filter') }) : services }));
|
|
36
|
+
var facets = new Stores_1.SearchFacetStore(__assign(__assign({}, params), { services: __assign(__assign({}, services), { urlManager: services.urlManager.remove('filter') }) }));
|
|
38
37
|
// mutate facet values to add 'preview' function
|
|
39
38
|
facets.forEach(function (facet) {
|
|
40
39
|
var _a;
|
|
41
40
|
(_a = facet.values) === null || _a === void 0 ? void 0 : _a.forEach(function (value) {
|
|
42
41
|
value.preview = function () {
|
|
43
|
-
var _a;
|
|
44
42
|
facets.map(function (facet) {
|
|
45
43
|
var _a;
|
|
46
44
|
facet.filtered = false;
|
|
@@ -51,7 +49,7 @@ var AutocompleteFacetStore = /** @class */ (function (_super) {
|
|
|
51
49
|
facet.filtered = true;
|
|
52
50
|
value.filtered = true;
|
|
53
51
|
state === null || state === void 0 ? void 0 : state.autocomplete.locks.facets.lock();
|
|
54
|
-
|
|
52
|
+
value.url.go();
|
|
55
53
|
};
|
|
56
54
|
});
|
|
57
55
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { SearchResponseModel, MetaResponseModel } from '@athoscommerce/snapi-types';
|
|
2
|
+
import { StorageStore } from '@athoscommerce/snap-toolbox';
|
|
2
3
|
import { AbstractStore } from '../Abstract/AbstractStore';
|
|
3
4
|
import { SearchPaginationStore } from '../Search/Stores';
|
|
4
|
-
import { StorageStore } from '../Storage/StorageStore';
|
|
5
5
|
import { FinderSelectionStore } from './Stores';
|
|
6
6
|
import type { FinderStoreConfig, StoreServices, SelectedSelection } from '../types';
|
|
7
7
|
import { UrlManager } from '@athoscommerce/snap-url-manager';
|
|
@@ -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,4BAA4B,CAAC;AACzF,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"FinderStore.d.ts","sourceRoot":"","sources":["../../../src/Finder/FinderStore.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACzF,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AACpF,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,qBAAa,WAAY,SAAQ,aAAa,CAAC,iBAAiB,CAAC;IACzD,QAAQ,EAAE,aAAa,CAAC;IACxB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,OAAO,EAAE,YAAY,CAAC;IACtB,gBAAgB,EAAG,YAAY,CAAC;IAChC,UAAU,EAAG,qBAAqB,CAAC;IACnC,UAAU,EAAG,oBAAoB,CAAC;IAClC,SAAS,EAAE,OAAO,CAAS;gBAEtB,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;QAAE,IAAI,CAAC,EAAE,iBAAiB,CAAC;QAAC,MAAM,CAAC,EAAE,mBAAmB,CAAA;KAAE,EAAE,kBAAkB,CAAC,EAAE,iBAAiB,EAAE,GAAG,IAAI;CAsDhI"}
|
|
@@ -28,9 +28,9 @@ var __assign = (this && this.__assign) || function () {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.FinderStore = void 0;
|
|
30
30
|
var mobx_1 = require("mobx");
|
|
31
|
+
var snap_toolbox_1 = require("@athoscommerce/snap-toolbox");
|
|
31
32
|
var AbstractStore_1 = require("../Abstract/AbstractStore");
|
|
32
33
|
var Stores_1 = require("../Search/Stores");
|
|
33
|
-
var StorageStore_1 = require("../Storage/StorageStore");
|
|
34
34
|
var Stores_2 = require("./Stores");
|
|
35
35
|
var MetaStore_1 = require("../Meta/MetaStore");
|
|
36
36
|
var FinderStore = /** @class */ (function (_super) {
|
|
@@ -59,12 +59,12 @@ var FinderStore = /** @class */ (function (_super) {
|
|
|
59
59
|
}
|
|
60
60
|
_this.services = services;
|
|
61
61
|
if ((_b = _this.config.persist) === null || _b === void 0 ? void 0 : _b.enabled) {
|
|
62
|
-
_this.persistedStorage = new
|
|
62
|
+
_this.persistedStorage = new snap_toolbox_1.StorageStore({
|
|
63
63
|
type: 'local',
|
|
64
64
|
key: "athos-".concat(_this.config.id, "-persisted"),
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
|
-
_this.storage = new
|
|
67
|
+
_this.storage = new snap_toolbox_1.StorageStore();
|
|
68
68
|
_this.update();
|
|
69
69
|
(0, mobx_1.makeObservable)(_this, {
|
|
70
70
|
selections: mobx_1.observable,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FinderStoreConfig, FinderFieldConfig, StoreServices, SelectedSelection } from '../../types';
|
|
2
|
-
import type { StorageStore } from '
|
|
2
|
+
import type { StorageStore } from '@athoscommerce/snap-toolbox';
|
|
3
3
|
import type { MetaResponseModel, MetaResponseModelFacetGrid, MetaResponseModelFacetHierarchy, MetaResponseModelFacetList, MetaResponseModelFacetPalette, MetaResponseModelFacetSlider, SearchResponseModel, SearchResponseModelFacetRange, SearchResponseModelFacetRangeBuckets, SearchResponseModelFacetValue, SearchResponseModelFacetValueAllOfValues } from '@athoscommerce/snapi-types';
|
|
4
4
|
type FacetWithMeta = MetaResponseModelFacetGrid & MetaResponseModelFacetHierarchy & MetaResponseModelFacetList & MetaResponseModelFacetPalette & MetaResponseModelFacetSlider & SearchResponseModelFacetValue & SearchResponseModelFacetRange & SearchResponseModelFacetRangeBuckets;
|
|
5
5
|
type FinderSelectionStoreConfig = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FinderSelectionStore.d.ts","sourceRoot":"","sources":["../../../../src/Finder/Stores/FinderSelectionStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,aAAa,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8 @@
|
|
|
1
1
|
import type { SearchResponseModel, MetaResponseModel } from '@athoscommerce/snapi-types';
|
|
2
|
+
import { StorageStore } from '@athoscommerce/snap-toolbox';
|
|
2
3
|
import type { SearchStoreConfig, StoreServices } from '../types';
|
|
3
4
|
import { SearchMerchandisingStore, SearchFacetStore, SearchFilterStore, SearchResultStore, SearchPaginationStore, SearchSortingStore, SearchQueryStore, SearchHistoryStore } from './Stores';
|
|
4
5
|
import { AbstractStore } from '../Abstract/AbstractStore';
|
|
5
|
-
import { StorageStore } from '../Storage/StorageStore';
|
|
6
6
|
import { MetaStore } from '../Meta/MetaStore';
|
|
7
7
|
export declare class SearchStore extends AbstractStore<SearchStoreConfig> {
|
|
8
8
|
private previousSearch?;
|
|
@@ -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,4BAA4B,CAAC;AACzF,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;AAClB,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"SearchStore.d.ts","sourceRoot":"","sources":["../../../src/Search/SearchStore.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACzF,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,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;AAClB,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,qBAAa,WAAY,SAAQ,aAAa,CAAC,iBAAiB,CAAC;IAChE,QAAgB,cAAc,CAAC,CAAsB;IAC9C,QAAQ,EAAE,aAAa,CAAC;IACxB,IAAI,CAAC,EAAE,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;IA6BvD,KAAK,IAAI,IAAI;IAIb,MAAM,CAAC,IAAI,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,iBAAiB,CAAC;QAAC,MAAM,CAAC,EAAE,mBAAmB,CAAA;KAAE,GAAG,IAAI;CA6EtF"}
|
|
@@ -17,9 +17,9 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.SearchStore = void 0;
|
|
19
19
|
var mobx_1 = require("mobx");
|
|
20
|
+
var snap_toolbox_1 = require("@athoscommerce/snap-toolbox");
|
|
20
21
|
var Stores_1 = require("./Stores");
|
|
21
22
|
var AbstractStore_1 = require("../Abstract/AbstractStore");
|
|
22
|
-
var StorageStore_1 = require("../Storage/StorageStore");
|
|
23
23
|
var MetaStore_1 = require("../Meta/MetaStore");
|
|
24
24
|
var SearchStore = /** @class */ (function (_super) {
|
|
25
25
|
__extends(SearchStore, _super);
|
|
@@ -30,7 +30,7 @@ var SearchStore = /** @class */ (function (_super) {
|
|
|
30
30
|
throw new Error("Invalid service 'urlManager' passed to SearchStore. Missing \"subscribe\" function.");
|
|
31
31
|
}
|
|
32
32
|
_this.services = services;
|
|
33
|
-
_this.storage = new
|
|
33
|
+
_this.storage = new snap_toolbox_1.StorageStore();
|
|
34
34
|
_this.history = new Stores_1.SearchHistoryStore({
|
|
35
35
|
services: _this.services,
|
|
36
36
|
config: _this.config,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { UrlManager } from '@athoscommerce/snap-url-manager';
|
|
2
|
-
import type { StorageStore } from '
|
|
2
|
+
import type { StorageStore } from '@athoscommerce/snap-toolbox';
|
|
3
3
|
import type { AutocompleteStoreConfig, SearchStoreConfig, StoreServices, FacetStoreConfig } from '../../types';
|
|
4
4
|
import type { MetaResponseModelFacet, MetaResponseModelFacetSlider, MetaResponseModelFacetValueMultipleEnum, MetaResponseModelFacetHierarchyAllOf, SearchResponseModelFacetRange, SearchResponseModelFacetValue, SearchResponseModelFacetValueAllOfValues, SearchRequestModelFilterRangeAllOfValue, SearchResponseModel, MetaResponseModel } from '@athoscommerce/snapi-types';
|
|
5
5
|
export type SearchFacetStoreConfig = {
|
|
@@ -7,7 +7,7 @@ export type SearchFacetStoreConfig = {
|
|
|
7
7
|
stores: {
|
|
8
8
|
storage: StorageStore;
|
|
9
9
|
};
|
|
10
|
-
services
|
|
10
|
+
services: StoreServices;
|
|
11
11
|
data: {
|
|
12
12
|
search?: SearchResponseModel;
|
|
13
13
|
meta: MetaResponseModel;
|
|
@@ -18,7 +18,7 @@ export declare class SearchFacetStore extends Array {
|
|
|
18
18
|
constructor(params: SearchFacetStoreConfig);
|
|
19
19
|
}
|
|
20
20
|
export declare class Facet {
|
|
21
|
-
services
|
|
21
|
+
services: StoreServices;
|
|
22
22
|
type: 'range' | 'value' | 'range-buckets';
|
|
23
23
|
field: string;
|
|
24
24
|
filtered: boolean;
|
|
@@ -27,9 +27,9 @@ export declare class Facet {
|
|
|
27
27
|
display: string;
|
|
28
28
|
label: string;
|
|
29
29
|
storage: StorageStore;
|
|
30
|
-
constructor(services: StoreServices
|
|
30
|
+
constructor(services: StoreServices, storage: StorageStore, facet: SearchResponseModelFacetValue | SearchResponseModelFacetRange, facetMeta: MetaResponseModelFacet, config: FacetStoreConfig);
|
|
31
31
|
get clear(): {
|
|
32
|
-
url: UrlManager
|
|
32
|
+
url: UrlManager;
|
|
33
33
|
};
|
|
34
34
|
toggleCollapse(): void;
|
|
35
35
|
}
|
|
@@ -39,7 +39,7 @@ export declare class RangeFacet extends Facet {
|
|
|
39
39
|
active?: SearchRequestModelFilterRangeAllOfValue;
|
|
40
40
|
formatSeparator: string;
|
|
41
41
|
formatValue: string;
|
|
42
|
-
constructor(services: StoreServices
|
|
42
|
+
constructor(services: StoreServices, storage: StorageStore, facet: SearchResponseModelFacetRange, facetMeta: MetaResponseModelFacetSlider, config: FacetStoreConfig);
|
|
43
43
|
get filteredCount(): number;
|
|
44
44
|
}
|
|
45
45
|
export declare class ValueFacet extends Facet {
|
|
@@ -57,7 +57,7 @@ export declare class ValueFacet extends Facet {
|
|
|
57
57
|
toggle: (val?: boolean) => void;
|
|
58
58
|
calculate: () => void;
|
|
59
59
|
};
|
|
60
|
-
constructor(services: StoreServices
|
|
60
|
+
constructor(services: StoreServices, storage: StorageStore, facet: SearchResponseModelFacetValue, facetMeta: MetaResponseModelFacet, config: FacetStoreConfig);
|
|
61
61
|
get filteredCount(): number;
|
|
62
62
|
get refinedValues(): (FacetHierarchyValue | FacetValue | FacetRangeValue | undefined)[];
|
|
63
63
|
}
|
|
@@ -67,14 +67,14 @@ export declare class FacetValue {
|
|
|
67
67
|
filtered: boolean;
|
|
68
68
|
value: string;
|
|
69
69
|
custom: object;
|
|
70
|
-
url
|
|
70
|
+
url: UrlManager;
|
|
71
71
|
preview?: () => void;
|
|
72
|
-
constructor(services: StoreServices
|
|
72
|
+
constructor(services: StoreServices, facet: ValueFacet, value: SearchResponseModelFacetValueAllOfValues);
|
|
73
73
|
}
|
|
74
74
|
export declare class FacetHierarchyValue extends FacetValue {
|
|
75
75
|
level: number;
|
|
76
76
|
history: boolean;
|
|
77
|
-
constructor(services: StoreServices
|
|
77
|
+
constructor(services: StoreServices, facet: ValueFacet & MetaResponseModelFacetHierarchyAllOf, value: SearchResponseModelFacetValueAllOfValues, filteredValues: SearchResponseModelFacetValueAllOfValues[]);
|
|
78
78
|
}
|
|
79
79
|
export declare class FacetRangeValue {
|
|
80
80
|
label: string;
|
|
@@ -83,7 +83,7 @@ export declare class FacetRangeValue {
|
|
|
83
83
|
low: number;
|
|
84
84
|
high: number;
|
|
85
85
|
custom: object;
|
|
86
|
-
url
|
|
87
|
-
constructor(services: StoreServices
|
|
86
|
+
url: UrlManager;
|
|
87
|
+
constructor(services: StoreServices, facet: ValueFacet, value: SearchResponseModelFacetValueAllOfValues);
|
|
88
88
|
}
|
|
89
89
|
//# sourceMappingURL=SearchFacetStore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchFacetStore.d.ts","sourceRoot":"","sources":["../../../../src/Search/Stores/SearchFacetStore.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SearchFacetStore.d.ts","sourceRoot":"","sources":["../../../../src/Search/Stores/SearchFacetStore.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,aAAa,EAAE,gBAAg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avG;AAED,qBAAa,mBAAoB,SAAQ,UAAU;IAC3C,KAAK,SAAK;IACV,OAAO,UAAS;gBAGtB,QAAQ,EAAE,aAAa,EACvB,KAAK,EAAE,UAAU,GAAG,oCAAoC,EACxD,KAAK,EAAE,wCAAwC,EAC/C,cAAc,EAAE,wCAAwC,EAAE;CAqB3D;AAED,qBAAa,eAAe;IACpB,KAAK,EAAG,MAAM,CAAC;IACf,KAAK,EAAG,MAAM,CAAC;IACf,QAAQ,EAAG,OAAO,CAAC;IACnB,GAAG,EAAG,MAAM,CAAC;IACb,IAAI,EAAG,MAAM,CAAC;IACd,MAAM,EAAG,MAAM,CAAC;IAChB,GAAG,EAAE,UAAU,CAAC;gBAEX,QAAQ,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,wCAAwC;CAevG"}
|
|
@@ -128,9 +128,8 @@ var Facet = /** @class */ (function () {
|
|
|
128
128
|
}
|
|
129
129
|
Object.defineProperty(Facet.prototype, "clear", {
|
|
130
130
|
get: function () {
|
|
131
|
-
var _a, _b;
|
|
132
131
|
return {
|
|
133
|
-
url:
|
|
132
|
+
url: this.services.urlManager.remove('page').remove("filter.".concat(this.field)),
|
|
134
133
|
};
|
|
135
134
|
},
|
|
136
135
|
enumerable: false,
|
|
@@ -306,18 +305,15 @@ exports.ValueFacet = ValueFacet;
|
|
|
306
305
|
var FacetValue = /** @class */ (function () {
|
|
307
306
|
function FacetValue(services, facet, value) {
|
|
308
307
|
Object.assign(this, value);
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
if (facet.multiple == 'single') {
|
|
317
|
-
valueUrl = valueUrl === null || valueUrl === void 0 ? void 0 : valueUrl.remove("filter.".concat(facet.field));
|
|
318
|
-
}
|
|
319
|
-
this.url = valueUrl === null || valueUrl === void 0 ? void 0 : valueUrl.merge("filter.".concat(facet.field), value.value);
|
|
308
|
+
if (this.filtered) {
|
|
309
|
+
this.url = services.urlManager.remove('page').remove("filter.".concat(facet.field), value.value);
|
|
310
|
+
}
|
|
311
|
+
else {
|
|
312
|
+
var valueUrl = services.urlManager.remove('page');
|
|
313
|
+
if (facet.multiple == 'single') {
|
|
314
|
+
valueUrl = valueUrl === null || valueUrl === void 0 ? void 0 : valueUrl.remove("filter.".concat(facet.field));
|
|
320
315
|
}
|
|
316
|
+
this.url = valueUrl === null || valueUrl === void 0 ? void 0 : valueUrl.merge("filter.".concat(facet.field), value.value);
|
|
321
317
|
}
|
|
322
318
|
}
|
|
323
319
|
return FacetValue;
|
|
@@ -339,14 +335,11 @@ var FacetHierarchyValue = /** @class */ (function (_super) {
|
|
|
339
335
|
_this.history = true;
|
|
340
336
|
}
|
|
341
337
|
}
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
else {
|
|
348
|
-
_this.url = urlManager.remove('page').remove("filter.".concat(facet.field));
|
|
349
|
-
}
|
|
338
|
+
if (value.value) {
|
|
339
|
+
_this.url = services.urlManager.remove('page').set("filter.".concat(facet.field), value.value);
|
|
340
|
+
}
|
|
341
|
+
else {
|
|
342
|
+
_this.url = services.urlManager.remove('page').remove("filter.".concat(facet.field));
|
|
350
343
|
}
|
|
351
344
|
return _this;
|
|
352
345
|
}
|
|
@@ -356,18 +349,15 @@ exports.FacetHierarchyValue = FacetHierarchyValue;
|
|
|
356
349
|
var FacetRangeValue = /** @class */ (function () {
|
|
357
350
|
function FacetRangeValue(services, facet, value) {
|
|
358
351
|
Object.assign(this, value);
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
if (facet.multiple == 'single') {
|
|
367
|
-
valueUrl = valueUrl === null || valueUrl === void 0 ? void 0 : valueUrl.remove("filter.".concat(facet.field));
|
|
368
|
-
}
|
|
369
|
-
this.url = valueUrl === null || valueUrl === void 0 ? void 0 : valueUrl.merge("filter.".concat(facet.field), [{ low: this.low, high: this.high }]);
|
|
352
|
+
if (this.filtered) {
|
|
353
|
+
this.url = services.urlManager.remove('page').remove("filter.".concat(facet.field), [{ low: this.low, high: this.high }]);
|
|
354
|
+
}
|
|
355
|
+
else {
|
|
356
|
+
var valueUrl = services.urlManager.remove('page');
|
|
357
|
+
if (facet.multiple == 'single') {
|
|
358
|
+
valueUrl = valueUrl === null || valueUrl === void 0 ? void 0 : valueUrl.remove("filter.".concat(facet.field));
|
|
370
359
|
}
|
|
360
|
+
this.url = valueUrl === null || valueUrl === void 0 ? void 0 : valueUrl.merge("filter.".concat(facet.field), [{ low: this.low, high: this.high }]);
|
|
371
361
|
}
|
|
372
362
|
}
|
|
373
363
|
return FacetRangeValue;
|
|
@@ -12,7 +12,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.SearchHistoryStore = void 0;
|
|
15
|
-
var
|
|
15
|
+
var snap_toolbox_1 = require("@athoscommerce/snap-toolbox");
|
|
16
16
|
var SearchQueryStore_1 = require("./SearchQueryStore");
|
|
17
17
|
var SearchHistoryStore = /** @class */ (function () {
|
|
18
18
|
function SearchHistoryStore(params) {
|
|
@@ -28,7 +28,7 @@ var SearchHistoryStore = /** @class */ (function () {
|
|
|
28
28
|
return __assign(__assign({}, translatorConfig), { urlRoot: (_b = (_a = _this.config.settings) === null || _a === void 0 ? void 0 : _a.history) === null || _b === void 0 ? void 0 : _b.url });
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
-
this.storage = new
|
|
31
|
+
this.storage = new snap_toolbox_1.StorageStore({
|
|
32
32
|
type: 'local',
|
|
33
33
|
key: "athos-history".concat(((_f = this.config.globals) === null || _f === void 0 ? void 0 : _f.siteId) ? "-".concat((_g = this.config.globals) === null || _g === void 0 ? void 0 : _g.siteId) : ""),
|
|
34
34
|
});
|
|
@@ -2,7 +2,7 @@ export { SearchMerchandisingStore, BannerContent, ContentType, MerchandisingCont
|
|
|
2
2
|
export { SearchFacetStore, ValueFacet, RangeFacet, FacetValue, FacetHierarchyValue, FacetRangeValue } from './SearchFacetStore';
|
|
3
3
|
export { SearchFilterStore, Filter } from './SearchFilterStore';
|
|
4
4
|
export { SearchPaginationStore, Page } from './SearchPaginationStore';
|
|
5
|
-
export { SearchResultStore, Product, Banner,
|
|
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,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,IAAI,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,EAAE,
|
|
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,IAAI,EAAE,MAAM,yBAAyB,CAAC;AACtE,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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SearchHistoryStore = exports.SearchQueryStore = exports.SearchSortingStore = exports.VariantSelection = exports.
|
|
3
|
+
exports.SearchHistoryStore = exports.SearchQueryStore = exports.SearchSortingStore = exports.VariantSelection = exports.Banner = exports.Product = exports.SearchResultStore = exports.Page = exports.SearchPaginationStore = exports.Filter = exports.SearchFilterStore = exports.FacetRangeValue = exports.FacetHierarchyValue = exports.FacetValue = exports.RangeFacet = exports.ValueFacet = exports.SearchFacetStore = exports.ContentType = exports.SearchMerchandisingStore = void 0;
|
|
4
4
|
var SearchMerchandisingStore_1 = require("./SearchMerchandisingStore");
|
|
5
5
|
Object.defineProperty(exports, "SearchMerchandisingStore", { enumerable: true, get: function () { return SearchMerchandisingStore_1.SearchMerchandisingStore; } });
|
|
6
6
|
Object.defineProperty(exports, "ContentType", { enumerable: true, get: function () { return SearchMerchandisingStore_1.ContentType; } });
|
|
@@ -21,7 +21,6 @@ var SearchResultStore_1 = require("./SearchResultStore");
|
|
|
21
21
|
Object.defineProperty(exports, "SearchResultStore", { enumerable: true, get: function () { return SearchResultStore_1.SearchResultStore; } });
|
|
22
22
|
Object.defineProperty(exports, "Product", { enumerable: true, get: function () { return SearchResultStore_1.Product; } });
|
|
23
23
|
Object.defineProperty(exports, "Banner", { enumerable: true, get: function () { return SearchResultStore_1.Banner; } });
|
|
24
|
-
Object.defineProperty(exports, "Variants", { enumerable: true, get: function () { return SearchResultStore_1.Variants; } });
|
|
25
24
|
Object.defineProperty(exports, "VariantSelection", { enumerable: true, get: function () { return SearchResultStore_1.VariantSelection; } });
|
|
26
25
|
var SearchSortingStore_1 = require("./SearchSortingStore");
|
|
27
26
|
Object.defineProperty(exports, "SearchSortingStore", { enumerable: true, get: function () { return SearchSortingStore_1.SearchSortingStore; } });
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -2,15 +2,11 @@ export { AbstractStore } from './Abstract/AbstractStore';
|
|
|
2
2
|
export { AutocompleteStore } from './Autocomplete/AutocompleteStore';
|
|
3
3
|
export { FinderStore } from './Finder/FinderStore';
|
|
4
4
|
export { SearchStore } from './Search/SearchStore';
|
|
5
|
-
export { ChatStore } from './Chat/ChatStore';
|
|
6
|
-
export type { ChatAttachmentImage, ChatAttachmentProduct, ChatAttachmentFacet } from './Chat/Stores/ChatAttachmentStore';
|
|
7
|
-
export type { ChatActions, ActionsData, FacetsData, ChatMessage, ChatSessionFeedback } from './Chat/Stores/ChatSessionStore';
|
|
8
5
|
export * from './Search/Stores/';
|
|
9
6
|
export * from './Autocomplete/Stores/';
|
|
10
7
|
export { RecommendationStore } from './Recommendation/RecommendationStore';
|
|
11
8
|
export { CartStore } from './Cart/CartStore';
|
|
12
|
-
export { StorageStore, StorageConfig, StorageType } from '
|
|
9
|
+
export { StorageStore, StorageConfig, StorageType } from '@athoscommerce/snap-toolbox';
|
|
13
10
|
export { MetaStore } from './Meta/MetaStore';
|
|
14
11
|
export * from './types';
|
|
15
|
-
export { ChatSessionStore } from './Chat/Stores/ChatSessionStore';
|
|
16
12
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/cjs/index.d.ts.map
CHANGED
|
@@ -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,
|
|
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,cAAc,wBAAwB,CAAC;AACvC,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,6BAA6B,CAAC;AACvF,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,cAAc,SAAS,CAAC"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
17
|
+
exports.MetaStore = exports.StorageType = exports.StorageStore = exports.CartStore = exports.RecommendationStore = exports.SearchStore = exports.FinderStore = exports.AutocompleteStore = exports.AbstractStore = void 0;
|
|
18
18
|
var AbstractStore_1 = require("./Abstract/AbstractStore");
|
|
19
19
|
Object.defineProperty(exports, "AbstractStore", { enumerable: true, get: function () { return AbstractStore_1.AbstractStore; } });
|
|
20
20
|
var AutocompleteStore_1 = require("./Autocomplete/AutocompleteStore");
|
|
@@ -23,19 +23,15 @@ var FinderStore_1 = require("./Finder/FinderStore");
|
|
|
23
23
|
Object.defineProperty(exports, "FinderStore", { enumerable: true, get: function () { return FinderStore_1.FinderStore; } });
|
|
24
24
|
var SearchStore_1 = require("./Search/SearchStore");
|
|
25
25
|
Object.defineProperty(exports, "SearchStore", { enumerable: true, get: function () { return SearchStore_1.SearchStore; } });
|
|
26
|
-
var ChatStore_1 = require("./Chat/ChatStore");
|
|
27
|
-
Object.defineProperty(exports, "ChatStore", { enumerable: true, get: function () { return ChatStore_1.ChatStore; } });
|
|
28
26
|
__exportStar(require("./Search/Stores/"), exports);
|
|
29
27
|
__exportStar(require("./Autocomplete/Stores/"), exports);
|
|
30
28
|
var RecommendationStore_1 = require("./Recommendation/RecommendationStore");
|
|
31
29
|
Object.defineProperty(exports, "RecommendationStore", { enumerable: true, get: function () { return RecommendationStore_1.RecommendationStore; } });
|
|
32
30
|
var CartStore_1 = require("./Cart/CartStore");
|
|
33
31
|
Object.defineProperty(exports, "CartStore", { enumerable: true, get: function () { return CartStore_1.CartStore; } });
|
|
34
|
-
var
|
|
35
|
-
Object.defineProperty(exports, "StorageStore", { enumerable: true, get: function () { return
|
|
36
|
-
Object.defineProperty(exports, "StorageType", { enumerable: true, get: function () { return
|
|
32
|
+
var snap_toolbox_1 = require("@athoscommerce/snap-toolbox");
|
|
33
|
+
Object.defineProperty(exports, "StorageStore", { enumerable: true, get: function () { return snap_toolbox_1.StorageStore; } });
|
|
34
|
+
Object.defineProperty(exports, "StorageType", { enumerable: true, get: function () { return snap_toolbox_1.StorageType; } });
|
|
37
35
|
var MetaStore_1 = require("./Meta/MetaStore");
|
|
38
36
|
Object.defineProperty(exports, "MetaStore", { enumerable: true, get: function () { return MetaStore_1.MetaStore; } });
|
|
39
37
|
__exportStar(require("./types"), exports);
|
|
40
|
-
var ChatSessionStore_1 = require("./Chat/Stores/ChatSessionStore");
|
|
41
|
-
Object.defineProperty(exports, "ChatSessionStore", { enumerable: true, get: function () { return ChatSessionStore_1.ChatSessionStore; } });
|
package/dist/cjs/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { UrlManager } from '@athoscommerce/snap-url-manager';
|
|
2
|
-
import type {
|
|
2
|
+
import type { RecommendRequestModel } from '@athoscommerce/snap-client';
|
|
3
3
|
import type { SearchResponseModelFacetValueAllOfValues, AutocompleteRequestModel, SearchRequestModel, MetaResponseModelBadgeTag, SearchResponseModelResultBadges } from '@athoscommerce/snapi-types';
|
|
4
4
|
export type BeaconSettings = {
|
|
5
5
|
enabled: boolean;
|
|
@@ -69,17 +69,6 @@ export type VariantOptionConfigMappings = {
|
|
|
69
69
|
backgroundImageUrl?: string;
|
|
70
70
|
};
|
|
71
71
|
};
|
|
72
|
-
export type ChatStoreConfig = StoreConfig & {
|
|
73
|
-
globals?: Partial<ChatRequestModel>;
|
|
74
|
-
settings?: ChatStoreConfigSettings;
|
|
75
|
-
siteId?: string;
|
|
76
|
-
};
|
|
77
|
-
export type ChatStoreConfigSettings = {
|
|
78
|
-
displayFields?: string[];
|
|
79
|
-
addToCart?: (products: any) => void;
|
|
80
|
-
feedbackAfterMessages?: number;
|
|
81
|
-
[key: string]: unknown;
|
|
82
|
-
};
|
|
83
72
|
export type SearchStoreConfig = StoreConfig & {
|
|
84
73
|
globals?: Partial<SearchRequestModel>;
|
|
85
74
|
settings?: SearchStoreConfigSettings;
|
|
@@ -164,7 +153,7 @@ export type RecommendationStoreConfig = StoreConfig & {
|
|
|
164
153
|
searchOnPageShow?: boolean;
|
|
165
154
|
};
|
|
166
155
|
};
|
|
167
|
-
export type StoreConfigs = SearchStoreConfig | AutocompleteStoreConfig | FinderStoreConfig | RecommendationStoreConfig
|
|
156
|
+
export type StoreConfigs = SearchStoreConfig | AutocompleteStoreConfig | FinderStoreConfig | RecommendationStoreConfig;
|
|
168
157
|
export type StoreServices = {
|
|
169
158
|
urlManager: UrlManager;
|
|
170
159
|
};
|
package/dist/cjs/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,KAAK,EACX,wCAAwC,EACxC,wBAAwB,EACxB,kBAAkB,EAClB,yBAAyB,EACzB,+BAA+B,EAC/B,MAAM,4BAA4B,CAAC;AAEpC,MAAM,MAAM,cAAc,GAAG;IAC5B,OAAO,EAAE,OAAO,CAAC;CACjB,CAAC;AAGF,MAAM,MAAM,WAAW,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACvC,SAAS,CAAC,EAAE;QACX,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,YAAY,CAAC,EAAE,OAAO,CAAC;KACvB,CAAC;IACF,MAAM,CAAC,EAAE,gBAAgB,GAAG;QAC3B,MAAM,CAAC,EAAE;YACR,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB,CAAC;SAClC,CAAC;KACF,CAAC;IACF,OAAO,CAAC,EAAE,iBAAiB,GAAG;QAC7B,MAAM,CAAC,EAAE;YACR,CAAC,KAAK,EAAE,MAAM,GAAG,iBAAiB,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,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE;QACV,QAAQ,CAAC,EAAE,aAAa,CAAC;QACzB,gBAAgB,CAAC,EAAE,OAAO,CAAC;KAC3B,CAAC;CACF,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,iBAAiB,GAAG,uBAAuB,GAAG,iBAAiB,GAAG,yBAAyB,CAAC;AAEvH,MAAM,MAAM,aAAa,GAAG;IAC3B,UAAU,EAAE,UAAU,CAAC;CACvB,CAAC;AAEF,oBAAY,SAAS;IACpB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,KAAK,UAAU;CACf;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,wCAAwC,EAAE,CAAC;IACjD,KAAK,EAAE,GAAG,CAAC;CACX,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,yBAAyB,GAAG,+BAA+B,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UrlManager } from '@athoscommerce/snap-url-manager';
|
|
2
|
+
import { StorageStore } from '@athoscommerce/snap-toolbox';
|
|
2
3
|
import { AbstractStore } from '../Abstract/AbstractStore';
|
|
3
4
|
import { SearchFilterStore, SearchResultStore, SearchMerchandisingStore, SearchPaginationStore, SearchSortingStore } from '../Search/Stores';
|
|
4
|
-
import { StorageStore } from '../Storage/StorageStore';
|
|
5
5
|
import { AutocompleteStateStore, AutocompleteTermStore, AutocompleteQueryStore, AutocompleteFacetStore, AutocompleteTrendingStore, AutocompleteHistoryStore } from './Stores';
|
|
6
6
|
import type { AutocompleteResponseModel, MetaResponseModel } from '@athoscommerce/snapi-types';
|
|
7
7
|
import type { TrendingResponseModel } from '@athoscommerce/snap-client';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutocompleteStore.d.ts","sourceRoot":"","sources":["../../../src/Autocomplete/AutocompleteStore.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,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,
|
|
1
|
+
{"version":3,"file":"AutocompleteStore.d.ts","sourceRoot":"","sources":["../../../src/Autocomplete/AutocompleteStore.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,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,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,4BAA4B,CAAC;AAC/F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,KAAK,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,qBAAa,iBAAkB,SAAQ,aAAa,CAAC,uBAAuB,CAAC;IACrE,QAAQ,EAAE,aAAa,CAAC;IACxB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,aAAa,EAAG,wBAAwB,CAAC;IACzC,MAAM,EAAG,sBAAsB,CAAC;IAChC,KAAK,EAAG,qBAAqB,CAAC;IAC9B,MAAM,EAAG,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;IAoCpE,IAAI,QAAQ,YAEX;IAEM,KAAK,IAAI,IAAI;IAMb,WAAW,IAAI,IAAI;IA8BnB,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,QAAQ,EAAE,qBAAqB,GAAG,IAAI;IAiB1D,MAAM,CAAC,IAAI,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,iBAAiB,CAAC;QAAC,MAAM,CAAC,EAAE,yBAAyB,CAAA;KAAE,GAAG,IAAI;CA8G5F"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { makeObservable, observable } from 'mobx';
|
|
2
|
+
import { StorageStore } from '@athoscommerce/snap-toolbox';
|
|
2
3
|
import { AbstractStore } from '../Abstract/AbstractStore';
|
|
3
4
|
import { SearchFilterStore, SearchResultStore, SearchMerchandisingStore, SearchPaginationStore, SearchSortingStore, SearchHistoryStore, } from '../Search/Stores';
|
|
4
|
-
import { StorageStore } from '../Storage/StorageStore';
|
|
5
5
|
import { AutocompleteStateStore, AutocompleteTermStore, AutocompleteQueryStore, AutocompleteFacetStore, AutocompleteTrendingStore, AutocompleteHistoryStore, } from './Stores';
|
|
6
6
|
import { MetaStore } from '../Meta/MetaStore';
|
|
7
7
|
export class AutocompleteStore extends AbstractStore {
|
|
@@ -43,7 +43,7 @@ export class AutocompleteStore extends AbstractStore {
|
|
|
43
43
|
}
|
|
44
44
|
initHistory() {
|
|
45
45
|
const limit = this.config.settings?.history?.limit;
|
|
46
|
-
if (limit) {
|
|
46
|
+
if (limit && this.config.settings?.history?.enabled !== false) {
|
|
47
47
|
const historyStore = new SearchHistoryStore({
|
|
48
48
|
services: this.services,
|
|
49
49
|
config: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutocompleteFacetStore.d.ts","sourceRoot":"","sources":["../../../../src/Autocomplete/Stores/AutocompleteFacetStore.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,KAAK,4BAA4B,GAAG,sBAAsB,GAAG;IAC5D,KAAK,EAAE;QACN,YAAY,EAAE,sBAAsB,CAAC;KACrC,CAAC;CACF,CAAC;AACF,qBAAa,sBAAuB,SAAQ,KAAK;IAChD,MAAM,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,gBAAgB,CAE9C;gBAEW,MAAM,EAAE,4BAA4B;
|
|
1
|
+
{"version":3,"file":"AutocompleteFacetStore.d.ts","sourceRoot":"","sources":["../../../../src/Autocomplete/Stores/AutocompleteFacetStore.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,KAAK,4BAA4B,GAAG,sBAAsB,GAAG;IAC5D,KAAK,EAAE;QACN,YAAY,EAAE,sBAAsB,CAAC;KACrC,CAAC;CACF,CAAC;AACF,qBAAa,sBAAuB,SAAQ,KAAK;IAChD,MAAM,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,gBAAgB,CAE9C;gBAEW,MAAM,EAAE,4BAA4B;CAkChD"}
|