@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.
- package/audio-wave/lib/audio-wave.component.d.ts +3 -3
- package/avatar/lib/avatar-group.component.d.ts +3 -3
- package/avatar/lib/avatar.component.d.ts +4 -4
- package/avatar/lib/avatar.module.d.ts +1 -1
- package/badge/lib/badge.component.d.ts +2 -2
- package/bottom-navigation/lib/bottom-navigation-item/bottom-navigation-item.component.d.ts +1 -1
- package/bottom-navigation/lib/bottom-navigation.component.d.ts +15 -5
- package/common/lib/components/selection-base.component.class.d.ts +3 -0
- package/data-pager/lib/data-pager.component.d.ts +3 -2
- package/esm2022/action-sheet/lib/action-sheet.service.mjs +10 -5
- package/esm2022/alert/lib/alert.component.mjs +4 -4
- package/esm2022/audio-wave/lib/audio-wave.component.mjs +1 -1
- package/esm2022/avatar/lib/avatar-group.component.mjs +5 -5
- package/esm2022/avatar/lib/avatar.component.mjs +10 -16
- package/esm2022/avatar/lib/avatar.module.mjs +4 -4
- package/esm2022/badge/lib/badge.component.mjs +7 -9
- package/esm2022/bottom-navigation/lib/bottom-navigation-item/bottom-navigation-item.component.mjs +3 -3
- package/esm2022/bottom-navigation/lib/bottom-navigation.component.mjs +18 -13
- package/esm2022/comment/lib/comment-item/comment-item.component.mjs +2 -2
- package/esm2022/common/lib/components/selection-base.component.class.mjs +20 -7
- package/esm2022/conversation/lib/conversation-message/conversation-message.component.mjs +1 -1
- package/esm2022/data-pager/lib/data-pager.component.mjs +1 -1
- package/esm2022/list/lib/list.component.mjs +3 -3
- package/esm2022/otp/lib/otp.component.mjs +13 -10
- package/esm2022/phone-box/lib/phone-box.component.mjs +1 -1
- package/esm2022/select-box/lib/select-box.component.mjs +5 -4
- package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg-toolbar/wysiwyg-toolbar.component.mjs +1 -1
- package/fesm2022/acorex-components-action-sheet.mjs +9 -4
- package/fesm2022/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2022/acorex-components-alert.mjs +3 -3
- package/fesm2022/acorex-components-alert.mjs.map +1 -1
- package/fesm2022/acorex-components-audio-wave.mjs.map +1 -1
- package/fesm2022/acorex-components-avatar.mjs +16 -22
- package/fesm2022/acorex-components-avatar.mjs.map +1 -1
- package/fesm2022/acorex-components-badge.mjs +6 -8
- package/fesm2022/acorex-components-badge.mjs.map +1 -1
- package/fesm2022/acorex-components-bottom-navigation.mjs +19 -14
- package/fesm2022/acorex-components-bottom-navigation.mjs.map +1 -1
- package/fesm2022/acorex-components-comment.mjs +1 -1
- package/fesm2022/acorex-components-comment.mjs.map +1 -1
- package/fesm2022/acorex-components-common.mjs +19 -6
- package/fesm2022/acorex-components-common.mjs.map +1 -1
- package/fesm2022/acorex-components-conversation.mjs +1 -1
- package/fesm2022/acorex-components-conversation.mjs.map +1 -1
- package/fesm2022/acorex-components-data-pager.mjs.map +1 -1
- package/fesm2022/acorex-components-list.mjs +2 -2
- package/fesm2022/acorex-components-list.mjs.map +1 -1
- package/fesm2022/acorex-components-otp.mjs +12 -9
- package/fesm2022/acorex-components-otp.mjs.map +1 -1
- package/fesm2022/acorex-components-phone-box.mjs +1 -1
- package/fesm2022/acorex-components-phone-box.mjs.map +1 -1
- package/fesm2022/acorex-components-select-box.mjs +4 -3
- package/fesm2022/acorex-components-select-box.mjs.map +1 -1
- package/fesm2022/acorex-components-wysiwyg.mjs +1 -1
- package/fesm2022/acorex-components-wysiwyg.mjs.map +1 -1
- package/list/lib/list.component.d.ts +1 -1
- package/otp/lib/otp.component.d.ts +2 -1
- package/package.json +55 -55
- 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
|
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];
|