@acorex/platform 21.0.0-next.89 → 21.0.0-next.90
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/fesm2022/acorex-platform-contracts.mjs +1 -0
- package/fesm2022/acorex-platform-contracts.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +22 -4
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity-contracts.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +93 -8
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +73 -14
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +2 -0
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-CZc2zFlg.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-BvFykMTH.mjs} +2 -2
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-CZc2zFlg.mjs.map → acorex-platform-layout-widgets-tabular-data-edit-popup.component-BvFykMTH.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-view-popup.component-XWRUVoL4.mjs → acorex-platform-layout-widgets-tabular-data-view-popup.component-CntopmDS.mjs} +2 -2
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-view-popup.component-XWRUVoL4.mjs.map → acorex-platform-layout-widgets-tabular-data-view-popup.component-CntopmDS.mjs.map} +1 -1
- package/fesm2022/acorex-platform-layout-widgets.mjs +3 -3
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-default.mjs +15 -5
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/package.json +1 -1
- package/types/acorex-platform-contracts.d.ts +1 -0
- package/types/acorex-platform-core.d.ts +1 -1
- package/types/acorex-platform-layout-entity-contracts.d.ts +4 -0
- package/types/acorex-platform-layout-entity.d.ts +30 -4
- package/types/acorex-platform-layout-views.d.ts +6 -1
- package/types/acorex-platform-layout-widget-core.d.ts +6 -0
- package/types/acorex-platform-themes-default.d.ts +4 -1
|
@@ -5704,6 +5704,24 @@ function toFilterSearchText(value) {
|
|
|
5704
5704
|
}
|
|
5705
5705
|
return undefined;
|
|
5706
5706
|
}
|
|
5707
|
+
function toSortComparableValue(value, locale) {
|
|
5708
|
+
if (value == null) {
|
|
5709
|
+
return '';
|
|
5710
|
+
}
|
|
5711
|
+
if (typeof value === 'number' || typeof value === 'boolean') {
|
|
5712
|
+
return value;
|
|
5713
|
+
}
|
|
5714
|
+
if (typeof value === 'string') {
|
|
5715
|
+
return value.toLocaleLowerCase(locale);
|
|
5716
|
+
}
|
|
5717
|
+
if (value instanceof Date) {
|
|
5718
|
+
return value.getTime();
|
|
5719
|
+
}
|
|
5720
|
+
if (isLocaleStringMap(value)) {
|
|
5721
|
+
return resolveMultiLanguageString(value, locale).toLocaleLowerCase(locale);
|
|
5722
|
+
}
|
|
5723
|
+
return String(value).toLocaleLowerCase(locale);
|
|
5724
|
+
}
|
|
5707
5725
|
function filterValuesAreEqual(itemRaw, condRaw) {
|
|
5708
5726
|
if (typeof condRaw === 'string' && isLocaleStringMap(itemRaw)) {
|
|
5709
5727
|
return Object.values(itemRaw).some((v) => v.toLowerCase() === condRaw.toLowerCase());
|
|
@@ -5922,11 +5940,11 @@ function applyFilterArray(dataArray, filters, logic = 'and') {
|
|
|
5922
5940
|
return dataArray;
|
|
5923
5941
|
}
|
|
5924
5942
|
}
|
|
5925
|
-
function applySortArray(dataArray, sorts) {
|
|
5943
|
+
function applySortArray(dataArray, sorts, locale = 'en-US') {
|
|
5926
5944
|
if (sorts && sorts.length > 0) {
|
|
5927
|
-
const
|
|
5928
|
-
const sortOrders = sorts.map((s) => s.dir);
|
|
5929
|
-
return orderBy(dataArray,
|
|
5945
|
+
const iteratees = sorts.map((s) => (item) => toSortComparableValue(get(item, s.field), locale));
|
|
5946
|
+
const sortOrders = sorts.map((s) => (s.dir === 'desc' ? 'desc' : 'asc'));
|
|
5947
|
+
return orderBy(dataArray, iteratees, sortOrders);
|
|
5930
5948
|
}
|
|
5931
5949
|
else
|
|
5932
5950
|
return dataArray;
|