@acorex/components 18.5.8 → 18.5.10

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 (59) hide show
  1. package/audio-wave/lib/audio-wave.component.d.ts +3 -3
  2. package/avatar/lib/avatar-group.component.d.ts +3 -3
  3. package/avatar/lib/avatar.component.d.ts +4 -4
  4. package/avatar/lib/avatar.module.d.ts +1 -1
  5. package/badge/lib/badge.component.d.ts +2 -2
  6. package/bottom-navigation/lib/bottom-navigation-item/bottom-navigation-item.component.d.ts +1 -1
  7. package/bottom-navigation/lib/bottom-navigation.component.d.ts +15 -5
  8. package/common/lib/components/selection-base.component.class.d.ts +3 -0
  9. package/data-pager/lib/data-pager.component.d.ts +3 -2
  10. package/esm2022/action-sheet/lib/action-sheet.service.mjs +10 -5
  11. package/esm2022/alert/lib/alert.component.mjs +4 -4
  12. package/esm2022/audio-wave/lib/audio-wave.component.mjs +1 -1
  13. package/esm2022/avatar/lib/avatar-group.component.mjs +5 -5
  14. package/esm2022/avatar/lib/avatar.component.mjs +10 -16
  15. package/esm2022/avatar/lib/avatar.module.mjs +4 -4
  16. package/esm2022/badge/lib/badge.component.mjs +7 -9
  17. package/esm2022/bottom-navigation/lib/bottom-navigation-item/bottom-navigation-item.component.mjs +3 -3
  18. package/esm2022/bottom-navigation/lib/bottom-navigation.component.mjs +18 -13
  19. package/esm2022/comment/lib/comment-item/comment-item.component.mjs +2 -2
  20. package/esm2022/common/lib/components/selection-base.component.class.mjs +20 -7
  21. package/esm2022/conversation/lib/conversation-message/conversation-message.component.mjs +1 -1
  22. package/esm2022/data-pager/lib/data-pager.component.mjs +1 -1
  23. package/esm2022/list/lib/list.component.mjs +3 -3
  24. package/esm2022/otp/lib/otp.component.mjs +13 -10
  25. package/esm2022/phone-box/lib/phone-box.component.mjs +1 -1
  26. package/esm2022/select-box/lib/select-box.component.mjs +5 -4
  27. package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg-toolbar/wysiwyg-toolbar.component.mjs +1 -1
  28. package/fesm2022/acorex-components-action-sheet.mjs +9 -4
  29. package/fesm2022/acorex-components-action-sheet.mjs.map +1 -1
  30. package/fesm2022/acorex-components-alert.mjs +3 -3
  31. package/fesm2022/acorex-components-alert.mjs.map +1 -1
  32. package/fesm2022/acorex-components-audio-wave.mjs.map +1 -1
  33. package/fesm2022/acorex-components-avatar.mjs +16 -22
  34. package/fesm2022/acorex-components-avatar.mjs.map +1 -1
  35. package/fesm2022/acorex-components-badge.mjs +6 -8
  36. package/fesm2022/acorex-components-badge.mjs.map +1 -1
  37. package/fesm2022/acorex-components-bottom-navigation.mjs +19 -14
  38. package/fesm2022/acorex-components-bottom-navigation.mjs.map +1 -1
  39. package/fesm2022/acorex-components-comment.mjs +1 -1
  40. package/fesm2022/acorex-components-comment.mjs.map +1 -1
  41. package/fesm2022/acorex-components-common.mjs +19 -6
  42. package/fesm2022/acorex-components-common.mjs.map +1 -1
  43. package/fesm2022/acorex-components-conversation.mjs +1 -1
  44. package/fesm2022/acorex-components-conversation.mjs.map +1 -1
  45. package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
  46. package/fesm2022/acorex-components-list.mjs +2 -2
  47. package/fesm2022/acorex-components-list.mjs.map +1 -1
  48. package/fesm2022/acorex-components-otp.mjs +12 -9
  49. package/fesm2022/acorex-components-otp.mjs.map +1 -1
  50. package/fesm2022/acorex-components-phone-box.mjs +1 -1
  51. package/fesm2022/acorex-components-phone-box.mjs.map +1 -1
  52. package/fesm2022/acorex-components-select-box.mjs +4 -3
  53. package/fesm2022/acorex-components-select-box.mjs.map +1 -1
  54. package/fesm2022/acorex-components-wysiwyg.mjs +1 -1
  55. package/fesm2022/acorex-components-wysiwyg.mjs.map +1 -1
  56. package/list/lib/list.component.d.ts +1 -1
  57. package/otp/lib/otp.component.d.ts +2 -1
  58. package/package.json +55 -55
  59. package/select-box/lib/select-box.component.d.ts +1 -1
@@ -1394,6 +1394,7 @@ class MXSelectionValueComponent extends MXValueComponent {
1394
1394
  this.formatService = inject(AXFormatService);
1395
1395
  this.dataService = inject(AX_SELECTION_DATA_TOKEN);
1396
1396
  this._valueField = 'id';
1397
+ this._textTemplate = '';
1397
1398
  this._textField = 'text';
1398
1399
  this._disabledField = 'disabled';
1399
1400
  this._multiple = false;
@@ -1407,6 +1408,15 @@ class MXSelectionValueComponent extends MXValueComponent {
1407
1408
  value: v,
1408
1409
  });
1409
1410
  }
1411
+ get textTemplate() {
1412
+ return this._textTemplate;
1413
+ }
1414
+ set textTemplate(v) {
1415
+ this.setOption({
1416
+ name: 'textTemplate',
1417
+ value: v,
1418
+ });
1419
+ }
1410
1420
  get textField() {
1411
1421
  return this._textField;
1412
1422
  }
@@ -1555,15 +1565,18 @@ class MXSelectionValueComponent extends MXValueComponent {
1555
1565
  coerceBooleanProperty(item[this.disabledField]) === true ||
1556
1566
  (this.disabledCallback ? this.disabledCallback({ item, index: -1 }) : false));
1557
1567
  }
1558
- getDisplayText(item) {
1559
- const normalizeItem = this.normalizeItem(item);
1560
- const formattedText = this.formatService.format(this.textField, 'string', normalizeItem);
1561
- return formattedText || normalizeItem[this.valueField];
1562
- }
1563
1568
  // protected getDisplayText(item: T) {
1564
1569
  // const normalizeItem = this.normalizeItem(item) as any;
1565
- // return normalizeItem[this.textField] || normalizeItem[this.valueField];
1570
+ // return formattedText || normalizeItem[this.valueField];
1566
1571
  // }
1572
+ getDisplayText(item) {
1573
+ const normalizeItem = this.normalizeItem(item);
1574
+ const formattedTemplate = this.formatService.format(this.textTemplate, 'string', normalizeItem);
1575
+ if (this.textTemplate && formattedTemplate != this.textTemplate)
1576
+ return formattedTemplate;
1577
+ else
1578
+ return normalizeItem[this.textField] || normalizeItem[this.valueField];
1579
+ }
1567
1580
  getValue(item) {
1568
1581
  const normalizeItem = this.normalizeItem(item);
1569
1582
  return normalizeItem[this.valueField];