@getlupa/client 0.7.0-alpha-17 → 0.7.0-alpha-18

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.
@@ -22428,6 +22428,7 @@ const tracking = (options) => {
22428
22428
  initTracking(options);
22429
22429
  };
22430
22430
  const searchBox = (options) => {
22431
+ clearSearchBox();
22431
22432
  Vue$1.use(Vuex);
22432
22433
  app.box = new Vue$1({
22433
22434
  el: options.inputSelector,
@@ -22437,6 +22438,7 @@ const searchBox = (options) => {
22437
22438
  });
22438
22439
  };
22439
22440
  const searchResults = (options) => {
22441
+ clearSearchResults();
22440
22442
  Vue$1.use(Vuex);
22441
22443
  app.results = new Vue$1({
22442
22444
  el: options.containerSelector,
@@ -22446,6 +22448,7 @@ const searchResults = (options) => {
22446
22448
  });
22447
22449
  };
22448
22450
  const productList = (options) => {
22451
+ clearProductList();
22449
22452
  Vue$1.use(Vuex);
22450
22453
  app.productList = new Vue$1({
22451
22454
  el: options.containerSelector,
@@ -22456,15 +22459,30 @@ const productList = (options) => {
22456
22459
  };
22457
22460
  const clearSearchBox = () => {
22458
22461
  var _a;
22459
- (_a = app.box) === null || _a === void 0 ? void 0 : _a.$destroy();
22462
+ try {
22463
+ (_a = app.box) === null || _a === void 0 ? void 0 : _a.$destroy();
22464
+ }
22465
+ catch (_b) {
22466
+ // do nothing, already destroyed;
22467
+ }
22460
22468
  };
22461
22469
  const clearSearchResults = () => {
22462
22470
  var _a;
22463
- (_a = app.results) === null || _a === void 0 ? void 0 : _a.$destroy();
22471
+ try {
22472
+ (_a = app.results) === null || _a === void 0 ? void 0 : _a.$destroy();
22473
+ }
22474
+ catch (_b) {
22475
+ // do nothing, already destroyed;
22476
+ }
22464
22477
  };
22465
22478
  const clearProductList = () => {
22466
22479
  var _a;
22467
- (_a = app.productList) === null || _a === void 0 ? void 0 : _a.$destroy();
22480
+ try {
22481
+ (_a = app.productList) === null || _a === void 0 ? void 0 : _a.$destroy();
22482
+ }
22483
+ catch (_b) {
22484
+ // do nothing, already destroyed;
22485
+ }
22468
22486
  };
22469
22487
  const lupaSearch = {
22470
22488
  searchBox,
@@ -22424,6 +22424,7 @@ const tracking = (options) => {
22424
22424
  initTracking(options);
22425
22425
  };
22426
22426
  const searchBox = (options) => {
22427
+ clearSearchBox();
22427
22428
  Vue$1.use(Vuex);
22428
22429
  app.box = new Vue$1({
22429
22430
  el: options.inputSelector,
@@ -22433,6 +22434,7 @@ const searchBox = (options) => {
22433
22434
  });
22434
22435
  };
22435
22436
  const searchResults = (options) => {
22437
+ clearSearchResults();
22436
22438
  Vue$1.use(Vuex);
22437
22439
  app.results = new Vue$1({
22438
22440
  el: options.containerSelector,
@@ -22442,6 +22444,7 @@ const searchResults = (options) => {
22442
22444
  });
22443
22445
  };
22444
22446
  const productList = (options) => {
22447
+ clearProductList();
22445
22448
  Vue$1.use(Vuex);
22446
22449
  app.productList = new Vue$1({
22447
22450
  el: options.containerSelector,
@@ -22452,15 +22455,30 @@ const productList = (options) => {
22452
22455
  };
22453
22456
  const clearSearchBox = () => {
22454
22457
  var _a;
22455
- (_a = app.box) === null || _a === void 0 ? void 0 : _a.$destroy();
22458
+ try {
22459
+ (_a = app.box) === null || _a === void 0 ? void 0 : _a.$destroy();
22460
+ }
22461
+ catch (_b) {
22462
+ // do nothing, already destroyed;
22463
+ }
22456
22464
  };
22457
22465
  const clearSearchResults = () => {
22458
22466
  var _a;
22459
- (_a = app.results) === null || _a === void 0 ? void 0 : _a.$destroy();
22467
+ try {
22468
+ (_a = app.results) === null || _a === void 0 ? void 0 : _a.$destroy();
22469
+ }
22470
+ catch (_b) {
22471
+ // do nothing, already destroyed;
22472
+ }
22460
22473
  };
22461
22474
  const clearProductList = () => {
22462
22475
  var _a;
22463
- (_a = app.productList) === null || _a === void 0 ? void 0 : _a.$destroy();
22476
+ try {
22477
+ (_a = app.productList) === null || _a === void 0 ? void 0 : _a.$destroy();
22478
+ }
22479
+ catch (_b) {
22480
+ // do nothing, already destroyed;
22481
+ }
22464
22482
  };
22465
22483
  const lupaSearch = {
22466
22484
  searchBox,