@acorex/components 4.2.46 → 4.2.50
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/esm2020/lib/property-editor/property-editor.class.mjs +1 -1
- package/esm2020/lib/search-bar/search-bar.component.mjs +24 -12
- package/fesm2015/acorex-components.mjs +22 -10
- package/fesm2015/acorex-components.mjs.map +1 -1
- package/fesm2020/acorex-components.mjs +22 -10
- package/fesm2020/acorex-components.mjs.map +1 -1
- package/lib/property-editor/property-editor.class.d.ts +2 -0
- package/lib/search-bar/search-bar.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -10265,6 +10265,7 @@ class AXSearchBarComponent {
|
|
|
10265
10265
|
this._filterItems.push({
|
|
10266
10266
|
name: el.property.name,
|
|
10267
10267
|
title: el.property.title,
|
|
10268
|
+
field: el.property.field,
|
|
10268
10269
|
textValue: this._handleTextValue(el),
|
|
10269
10270
|
value: el.value ? this._handleDefultVlaue(el) : null,
|
|
10270
10271
|
component: el
|
|
@@ -10355,16 +10356,26 @@ class AXSearchBarComponent {
|
|
|
10355
10356
|
}
|
|
10356
10357
|
ngOnInit() { }
|
|
10357
10358
|
_handleTextValue(dataItem) {
|
|
10358
|
-
|
|
10359
|
-
|
|
10360
|
-
dataItem.value.
|
|
10361
|
-
|
|
10362
|
-
|
|
10363
|
-
|
|
10364
|
-
|
|
10365
|
-
|
|
10359
|
+
let text = '';
|
|
10360
|
+
if (Array.isArray(dataItem.value)) {
|
|
10361
|
+
if (dataItem.value.length) {
|
|
10362
|
+
dataItem.value.forEach((element, index) => {
|
|
10363
|
+
text +=
|
|
10364
|
+
index === dataItem.value.length - 1
|
|
10365
|
+
? element[dataItem.property.editorOptions.textField]
|
|
10366
|
+
: element[dataItem.property.editorOptions.textField] + ',';
|
|
10367
|
+
});
|
|
10368
|
+
}
|
|
10366
10369
|
return text;
|
|
10367
10370
|
}
|
|
10371
|
+
else if (dataItem.property.editorClass === 'ax/editors/date') {
|
|
10372
|
+
if (dataItem.value) {
|
|
10373
|
+
return new AXDateTime(dataItem.value, 'jalali').format('yyyy/MM/DD');
|
|
10374
|
+
}
|
|
10375
|
+
else {
|
|
10376
|
+
return;
|
|
10377
|
+
}
|
|
10378
|
+
}
|
|
10368
10379
|
else {
|
|
10369
10380
|
return;
|
|
10370
10381
|
}
|
|
@@ -10404,14 +10415,15 @@ class AXSearchBarComponent {
|
|
|
10404
10415
|
const findEl = this._filterItemsClone.find((el) => el.name == e.property.name);
|
|
10405
10416
|
if (findEl) {
|
|
10406
10417
|
findEl.value = value;
|
|
10407
|
-
findEl.textValue =
|
|
10418
|
+
findEl.textValue = e.property.editorClass === 'ax/editors/date' ? new AXDateTime(text, 'jalali').format('yyyy/MM/DD') : text.toString();
|
|
10408
10419
|
}
|
|
10409
10420
|
else if (e.value != null) {
|
|
10410
10421
|
this._filterItemsClone.push({
|
|
10411
10422
|
name: e.property.name,
|
|
10423
|
+
field: e.property.field,
|
|
10412
10424
|
title: e.property.title,
|
|
10413
10425
|
value,
|
|
10414
|
-
textValue: text.toString(),
|
|
10426
|
+
textValue: e.property.editorClass === 'ax/editors/date' ? new AXDateTime(text, 'jalali').format('yyyy/MM/DD') : text.toString(),
|
|
10415
10427
|
component: e,
|
|
10416
10428
|
filterOptions: {
|
|
10417
10429
|
filters: e.property?.filterOptions?.filters ? e.property.filterOptions.filters : [],
|