@social-mail/social-mail-client 1.2.476 → 1.3.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.
@@ -20115,7 +20115,10 @@ System.register(["../../common/apiPath", "../../common/toBase36"], function (_ex
20115
20115
  toBase36 = _commonToBase.toBase36;
20116
20116
  }],
20117
20117
  execute: function () {
20118
- _export("storeItemLink", storeItemLink = item => apiPath(`/store/${toBase36(item.storeID)}/${toBase36(item.storeItemID)}/${encodeURIComponent(item.name)}`));
20118
+ _export("storeItemLink", storeItemLink = item => {
20119
+ var _a;
20120
+ return apiPath(`/store/${toBase36(item.storeID)}/${toBase36((_a = item.variantForID) !== null && _a !== void 0 ? _a : item.storeItemID)}/${encodeURIComponent(item.name)}`);
20121
+ });
20119
20122
  }
20120
20123
  };
20121
20124
  });
@@ -20298,18 +20301,18 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
20298
20301
  cancelToken
20299
20302
  })), {
20300
20303
  itemRenderer: item => {
20301
- var _a;
20304
+ var _a, _b, _c, _d, _e, _f, _g, _h;
20302
20305
  return XNode.create("div", {
20303
20306
  class: "store-item"
20304
20307
  }, XNode.create("a", {
20305
20308
  class: "name",
20306
- title: item.name,
20307
- text: item.name,
20309
+ title: item.name || ((_a = item.variantFor) === null || _a === void 0 ? void 0 : _a.name) || item.name,
20310
+ text: item.name || ((_b = item.variantFor) === null || _b === void 0 ? void 0 : _b.name) || item.name,
20308
20311
  href: storeItemLink(item)
20309
20312
  }), XNode.create("label", {
20310
20313
  class: "description",
20311
- title: item.description,
20312
- text: item.description
20314
+ title: item.description || ((_c = item.variantFor) === null || _c === void 0 ? void 0 : _c.description) || item.description,
20315
+ text: item.description || ((_d = item.variantFor) === null || _d === void 0 ? void 0 : _d.description) || item.description
20313
20316
  }), XNode.create("img", {
20314
20317
  src: Bind.oneTimeAsync(() => this.downloadImage(item))
20315
20318
  }), XNode.create("button", {
@@ -20318,7 +20321,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
20318
20321
  }), XNode.create("div", {
20319
20322
  class: "price"
20320
20323
  }, XNode.create("label", {
20321
- text: formatPrice((_a = item.storeItemPrices) === null || _a === void 0 ? void 0 : _a[0])
20324
+ text: formatPrice((_f = (_e = item.storeItemPrices) === null || _e === void 0 ? void 0 : _e[0]) !== null && _f !== void 0 ? _f : (_h = (_g = item.variantFor) === null || _g === void 0 ? void 0 : _g.storeItemPrices) === null || _h === void 0 ? void 0 : _h[0])
20322
20325
  })));
20323
20326
  }
20324
20327
  })), XNode.create("footer", null)));
@@ -20372,7 +20375,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
20372
20375
  }) {
20373
20376
  var _a;
20374
20377
  return __awaiter(this, void 0, void 0, function* () {
20375
- let q = this.entityService.query(StoreItem, "storeQuery").where(x => x.itemType in ["product", "service", "resource"] && x.sizeForID === null && x.variantForID === null);
20378
+ let q = this.entityService.query(StoreItem, "storeQuery").where(x => x.itemType in ["product", "service", "resource"] && x.sizeForID === null);
20376
20379
  if (search) {
20377
20380
  search = search + "%";
20378
20381
  const lowerSearch = search.trim().toLocaleLowerCase();
@@ -20387,7 +20390,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
20387
20390
  ids
20388
20391
  }, p => x => x.storeItemTags.some(st => Sql.in(st.tagID, p.ids)));
20389
20392
  }
20390
- const items = yield q.orderByDescending(x => x.storeItemID).include(x => [x.storeItemPrices, x.storeItemTags.forEach(t => t.tag)]).toPagedList({
20393
+ const items = yield q.orderByDescending(x => x.storeItemID).include(x => [x.storeItemPrices, x.storeItemTags.forEach(t => t.tag), x.variantFor]).toPagedList({
20391
20394
  start,
20392
20395
  size,
20393
20396
  cancelToken