@yoobic/yobi 7.7.81 → 7.7.82

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.
@@ -1018,7 +1018,7 @@ const YooEntityComponent = class {
1018
1018
  return null;
1019
1019
  }
1020
1020
  renderCardList(extraClasses) {
1021
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11;
1021
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12;
1022
1022
  let entry = {};
1023
1023
  if (this.entityType === 'missions' || (this.entityType === 'missiondatas' && ((_b = (_a = this.item) === null || _a === void 0 ? void 0 : _a.mission) === null || _b === void 0 ? void 0 : _b.type) === 'kanban')) {
1024
1024
  let mission = this.item;
@@ -1296,7 +1296,8 @@ const YooEntityComponent = class {
1296
1296
  avatarFrame: file.imgSrc ? 'rounded-square' : 'square',
1297
1297
  avatarSize: this.isAutocompleteSelected() && this.item.avatarSize ? this.item.avatarSize : 'large',
1298
1298
  allowCustomHtml: true,
1299
- subheadings: this.isAutocompleteSelected() ? null : compact([directory + pipes.fileSize.transform(file.size), (file.highlight || []).join(', ')]) // , //, file.mimeType
1299
+ forceTextHeading: ((_s = file === null || file === void 0 ? void 0 : file.highlight) === null || _s === void 0 ? void 0 : _s.length) > 0,
1300
+ subheadings: this.isAutocompleteSelected() ? null : compact([directory + pipes.fileSize.transform(file.size), ...(file.highlight || [])]) // , //, file.mimeType
1300
1301
  // badges: [{ iconLeft: getIcon(file), cssClass: 'tag small round dark' }]
1301
1302
  };
1302
1303
  }
@@ -1410,15 +1411,15 @@ const YooEntityComponent = class {
1410
1411
  }
1411
1412
  else if (this.entityType === 'language') {
1412
1413
  entry = {
1413
- heading: ((_s = this.item) === null || _s === void 0 ? void 0 : _s._id) ? translate(this.item._id.toUpperCase()) : translate(this.item.toUpperCase()),
1414
- flag: this.host.classList.contains('hide-icon') ? null : ((_t = this.item) === null || _t === void 0 ? void 0 : _t._id) ? getLanguageFlag(this.item._id) : getLanguageFlag(this.item)
1414
+ heading: ((_t = this.item) === null || _t === void 0 ? void 0 : _t._id) ? translate(this.item._id.toUpperCase()) : translate(this.item.toUpperCase()),
1415
+ flag: this.host.classList.contains('hide-icon') ? null : ((_u = this.item) === null || _u === void 0 ? void 0 : _u._id) ? getLanguageFlag(this.item._id) : getLanguageFlag(this.item)
1415
1416
  };
1416
1417
  }
1417
1418
  else if (this.entityType === 'waitlistvisit') {
1418
1419
  const visit = this.item;
1419
1420
  const tagElements = getWaitlistVisitTags(visit);
1420
1421
  entry = {
1421
- heading: ((_u = visit.name) === null || _u === void 0 ? void 0 : _u.startsWith('NOINFO')) ? translate('NOINFO') : visit.name,
1422
+ heading: ((_v = visit.name) === null || _v === void 0 ? void 0 : _v.startsWith('NOINFO')) ? translate('NOINFO') : visit.name,
1422
1423
  tagElements
1423
1424
  };
1424
1425
  if (!isWeb(this.host)) {
@@ -1433,7 +1434,7 @@ const YooEntityComponent = class {
1433
1434
  else if (this.entityType === 'waitlistcustomer') {
1434
1435
  const customer = this.item;
1435
1436
  entry = {
1436
- heading: ((_v = customer.name) === null || _v === void 0 ? void 0 : _v.startsWith('NOINFO')) ? translate('NOINFO') : customer.name,
1437
+ heading: ((_w = customer.name) === null || _w === void 0 ? void 0 : _w.startsWith('NOINFO')) ? translate('NOINFO') : customer.name,
1437
1438
  subheadings: compact([customer.phone, customer.email])
1438
1439
  };
1439
1440
  }
@@ -1536,7 +1537,7 @@ const YooEntityComponent = class {
1536
1537
  subheadings: this.isAutocompleteSelected() ? null : group.description ? [group.description] : null,
1537
1538
  iconText: group.title || group.name || group._id,
1538
1539
  heading: group.title || group.name || group._id,
1539
- imgSrc: (_w = group.icon) === null || _w === void 0 ? void 0 : _w._downloadURL
1540
+ imgSrc: (_x = group.icon) === null || _x === void 0 ? void 0 : _x._downloadURL
1540
1541
  };
1541
1542
  entry.subheadings = group.subheadings || entry.subheadings;
1542
1543
  }
@@ -1546,7 +1547,7 @@ const YooEntityComponent = class {
1546
1547
  avatarSize: this.isAutocompleteSelected() && this.item.avatarSize ? this.item.avatarSize : 'medium',
1547
1548
  iconText: tenant.title || tenant.name,
1548
1549
  heading: (tenant.title || tenant.name || '').toUpperCase(),
1549
- imgSrc: (_x = tenant.icon) === null || _x === void 0 ? void 0 : _x._downloadURL,
1550
+ imgSrc: (_y = tenant.icon) === null || _y === void 0 ? void 0 : _y._downloadURL,
1550
1551
  subheadings: this.isAutocompleteSelected() ? null : compact([tenant.description])
1551
1552
  };
1552
1553
  }
@@ -1557,7 +1558,7 @@ const YooEntityComponent = class {
1557
1558
  avatarFrame: 'square',
1558
1559
  iconText: model.title || model.name,
1559
1560
  heading: model.title || model.name,
1560
- imgSrc: ((_y = model.background) === null || _y === void 0 ? void 0 : _y._downloadURL) || model.background,
1561
+ imgSrc: ((_z = model.background) === null || _z === void 0 ? void 0 : _z._downloadURL) || model.background,
1561
1562
  subheadings: this.isAutocompleteSelected() ? null : compact([model.shortDescription])
1562
1563
  };
1563
1564
  }
@@ -1624,7 +1625,7 @@ const YooEntityComponent = class {
1624
1625
  else if (this.entityType === 'violetproducts') {
1625
1626
  const product = this.item;
1626
1627
  let subheadings = [product.description];
1627
- if (((_z = this.item.offers) === null || _z === void 0 ? void 0 : _z.length) && ((_0 = this.item.offers[0].skus) === null || _0 === void 0 ? void 0 : _0.length) && ((_1 = this.item.offers[0].skus[0]) === null || _1 === void 0 ? void 0 : _1.sale_price)) {
1628
+ if (((_0 = this.item.offers) === null || _0 === void 0 ? void 0 : _0.length) && ((_1 = this.item.offers[0].skus) === null || _1 === void 0 ? void 0 : _1.length) && ((_2 = this.item.offers[0].skus[0]) === null || _2 === void 0 ? void 0 : _2.sale_price)) {
1628
1629
  subheadings = [pipes.currency.transform(this.item.offers[0].skus[0].sale_price / 100, false, this.item.offers[0].skus[0].currency, true)];
1629
1630
  }
1630
1631
  if (!product.available) {
@@ -1653,7 +1654,7 @@ const YooEntityComponent = class {
1653
1654
  };
1654
1655
  }
1655
1656
  else if (this.entityType === 'violetbasketitems') {
1656
- const sku = (_2 = this.item) === null || _2 === void 0 ? void 0 : _2.sku;
1657
+ const sku = (_3 = this.item) === null || _3 === void 0 ? void 0 : _3.sku;
1657
1658
  const price = (sku.sale_price * (this.item.quantity || 1)) / 100;
1658
1659
  const subheadings = [pipes.currency.transform(price, false, sku.currency, true)];
1659
1660
  entry = {
@@ -1723,9 +1724,9 @@ const YooEntityComponent = class {
1723
1724
  subheadings: [
1724
1725
  productBatch.product ? productBatch.product.reference : '',
1725
1726
  ...(getSession().user && getSession().user.locationRef === productBatch.locationRef
1726
- ? compact([((_3 = this.extraClass) === null || _3 === void 0 ? void 0 : _3.indexOf('show-aisle')) >= 0 && productBatch.aisle ? productBatch.aisle.title : null])
1727
+ ? compact([((_4 = this.extraClass) === null || _4 === void 0 ? void 0 : _4.indexOf('show-aisle')) >= 0 && productBatch.aisle ? productBatch.aisle.title : null])
1727
1728
  : productBatch.location && productBatch.location.title
1728
- ? [productBatch.location.title + ' - ' + (((_4 = productBatch.aisle) === null || _4 === void 0 ? void 0 : _4.title) || '')]
1729
+ ? [productBatch.location.title + ' - ' + (((_5 = productBatch.aisle) === null || _5 === void 0 ? void 0 : _5.title) || '')]
1729
1730
  : [])
1730
1731
  ],
1731
1732
  tags: productBatch.tags,
@@ -1769,7 +1770,7 @@ const YooEntityComponent = class {
1769
1770
  heading: product.title,
1770
1771
  subheadings,
1771
1772
  date: isPresent(this.item.description) ? this.item.description : null,
1772
- imgSrc: ((_5 = product === null || product === void 0 ? void 0 : product.image) === null || _5 === void 0 ? void 0 : _5._downloadURL) ? product.image._downloadURL : null,
1773
+ imgSrc: ((_6 = product === null || product === void 0 ? void 0 : product.image) === null || _6 === void 0 ? void 0 : _6._downloadURL) ? product.image._downloadURL : null,
1773
1774
  avatarFrame: 'square',
1774
1775
  // keep it explicit here to prevent to be overwritten by the autocomplete, with which the card-list is used in combination with, and that changes the size of the avatar to 'small' when only one product is selected
1775
1776
  // this case is described into the form-entity-value-pairs.spec tests
@@ -2053,7 +2054,7 @@ const YooEntityComponent = class {
2053
2054
  avatarFrame: 'square'
2054
2055
  };
2055
2056
  }
2056
- else if (this.entityType !== 'tag' && ((_7 = (_6 = this.customModel) === null || _6 === void 0 ? void 0 : _6.appearance) === null || _7 === void 0 ? void 0 : _7.size)) {
2057
+ else if (this.entityType !== 'tag' && ((_8 = (_7 = this.customModel) === null || _7 === void 0 ? void 0 : _7.appearance) === null || _8 === void 0 ? void 0 : _8.size)) {
2057
2058
  entry = {};
2058
2059
  this.customModel.appearance.forEach((value, key) => {
2059
2060
  if (key === 'displayTypes') {
@@ -2094,7 +2095,7 @@ const YooEntityComponent = class {
2094
2095
  else if (this.entityType === 'tiles') {
2095
2096
  const tile = this.item;
2096
2097
  entry = {
2097
- heading: tile.title || ((_8 = tile.page) === null || _8 === void 0 ? void 0 : _8.name),
2098
+ heading: tile.title || ((_9 = tile.page) === null || _9 === void 0 ? void 0 : _9.name),
2098
2099
  imgSrc: tile.photo,
2099
2100
  icon: tile.icon,
2100
2101
  subheadings: compact([]),
@@ -2205,7 +2206,7 @@ const YooEntityComponent = class {
2205
2206
  !this.isAutocompleteSelected() &&
2206
2207
  !this.hideUIFields &&
2207
2208
  this.customModel &&
2208
- ((_10 = (_9 = this.customModel.formFields) === null || _9 === void 0 ? void 0 : _9.filter((f) => f.showInCard)) === null || _10 === void 0 ? void 0 : _10.length) > 0) {
2209
+ ((_11 = (_10 = this.customModel.formFields) === null || _10 === void 0 ? void 0 : _10.filter((f) => f.showInCard)) === null || _11 === void 0 ? void 0 : _11.length) > 0) {
2209
2210
  entry.uiFields = {
2210
2211
  fields: this.customModel.formFields.filter((f) => f.showInCard),
2211
2212
  data: this.item
@@ -2266,7 +2267,7 @@ const YooEntityComponent = class {
2266
2267
  [extraClasses]: true,
2267
2268
  [this.entityType]: this.entityType !== undefined,
2268
2269
  'form-permission': this.host.classList.contains('form-permission')
2269
- } }, ((_11 = this.inlineActions) === null || _11 === void 0 ? void 0 : _11.length) > 0 && (h("span", { class: "slot-container", slot: "content-slot" }, this.inlineActions.map((action) => {
2270
+ } }, ((_12 = this.inlineActions) === null || _12 === void 0 ? void 0 : _12.length) > 0 && (h("span", { class: "slot-container", slot: "content-slot" }, this.inlineActions.map((action) => {
2270
2271
  return (h("span", { class: action.cssClass, onClick: () => (action.handler ? action.handler(this.item) : null) }, action.text));
2271
2272
  })))));
2272
2273
  }
@@ -102149,7 +102149,7 @@ const YooCardListComponent = class {
102149
102149
  if (this.entry.isCommentMedia && this.isRenderBadgeOutside) {
102150
102150
  return;
102151
102151
  }
102152
- if (isCloudinaryLink(item) || item.endsWith('.gif')) {
102152
+ if (isCloudinaryLink(item) || item.endsWith('.gif') && !this.entry.forceTextHeading) {
102153
102153
  return this.renderMedia(item);
102154
102154
  }
102155
102155
  else {
@@ -76,5 +76,6 @@ export interface ICardListEntry {
76
76
  uiFieldsSuffix?: string;
77
77
  contained?: boolean;
78
78
  showRightArrow?: boolean;
79
+ forceTextHeading?: boolean;
79
80
  }
80
81
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yoobic/yobi",
3
- "version": "7.7.81",
3
+ "version": "7.7.82",
4
4
  "description": "Yobi - Yoobic Design System",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.cjs.js",