@evergis/react 2.0.70 → 2.0.73
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/dist/core/classification/types.d.ts +2 -2
- package/dist/react.cjs.development.js +9 -6
- package/dist/react.cjs.development.js.map +1 -1
- package/dist/react.cjs.production.min.js +1 -1
- package/dist/react.cjs.production.min.js.map +1 -1
- package/dist/react.esm.js +9 -6
- package/dist/react.esm.js.map +1 -1
- package/package.json +10 -10
|
@@ -13,8 +13,8 @@ export declare type UniqueClass = ClassBase & {
|
|
|
13
13
|
uniqueValue: string;
|
|
14
14
|
};
|
|
15
15
|
export declare type RangeClass = ClassBase & {
|
|
16
|
-
from: number | null;
|
|
17
|
-
to: number | null;
|
|
16
|
+
from: number | string | null;
|
|
17
|
+
to: number | string | null;
|
|
18
18
|
};
|
|
19
19
|
export declare type ClassificationClass = UniqueClass | RangeClass;
|
|
20
20
|
export declare type ClassificationValues = ClassificationClass[];
|
|
@@ -969,30 +969,33 @@ const unClassify = symbol => Object.entries(symbol).reduce((flatSymbol, _ref) =>
|
|
|
969
969
|
}, {});
|
|
970
970
|
|
|
971
971
|
const printRangeClass = (value, index) => {
|
|
972
|
-
|
|
972
|
+
var _value$attribute, _value$attribute2;
|
|
973
|
+
|
|
974
|
+
const isDouble = Boolean(((_value$attribute = value.attribute) == null ? void 0 : _value$attribute.type) === 'Double');
|
|
975
|
+
const isDate = Boolean(((_value$attribute2 = value.attribute) == null ? void 0 : _value$attribute2.type) === 'DateTime');
|
|
973
976
|
const {
|
|
974
977
|
from,
|
|
975
978
|
to
|
|
976
|
-
} = getRangeValues(value, isDouble, index);
|
|
979
|
+
} = getRangeValues(value, isDouble, isDate, index);
|
|
977
980
|
|
|
978
981
|
if (from === null) {
|
|
979
|
-
return to + "
|
|
982
|
+
return to + " " + (isDate ? 'и до' : 'и менее');
|
|
980
983
|
}
|
|
981
984
|
|
|
982
985
|
if (to === null) {
|
|
983
|
-
return "
|
|
986
|
+
return (isDate ? 'после' : 'более') + " " + from;
|
|
984
987
|
}
|
|
985
988
|
|
|
986
989
|
return from === to ? "" + from : from + " - " + to;
|
|
987
990
|
};
|
|
988
991
|
|
|
989
|
-
function getRangeValues(_ref, isDouble, index) {
|
|
992
|
+
function getRangeValues(_ref, isDouble, isDate, index) {
|
|
990
993
|
let {
|
|
991
994
|
from,
|
|
992
995
|
to
|
|
993
996
|
} = _ref;
|
|
994
997
|
return {
|
|
995
|
-
from: from !== null && index !== 0 ? isDouble ? +from : +from + 1 : from,
|
|
998
|
+
from: from !== null && index !== 0 ? isDate ? from : isDouble ? +from : +from + 1 : from,
|
|
996
999
|
to
|
|
997
1000
|
};
|
|
998
1001
|
}
|