@uxf/data-grid 11.120.0 → 11.122.0
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.
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const translations_1 = require("@uxf/core-react/translations");
|
|
6
7
|
const filter_nullish_1 = require("@uxf/core/utils/filter-nullish");
|
|
7
8
|
const is_empty_1 = require("@uxf/core/utils/is-empty");
|
|
8
9
|
const is_nil_1 = require("@uxf/core/utils/is-nil");
|
|
@@ -12,6 +13,7 @@ const react_1 = __importDefault(require("react"));
|
|
|
12
13
|
const filterHandler = {
|
|
13
14
|
Input(props) {
|
|
14
15
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
16
|
+
const t = (0, translations_1.useUxfTranslation)();
|
|
15
17
|
const onChangeFrom = (value) => {
|
|
16
18
|
var _a;
|
|
17
19
|
return (0, is_nil_1.isNil)(value) && (0, is_nil_1.isNil)((_a = props.value) === null || _a === void 0 ? void 0 : _a.to)
|
|
@@ -25,18 +27,19 @@ const filterHandler = {
|
|
|
25
27
|
: props.onChange({ ...props.value, to: value });
|
|
26
28
|
};
|
|
27
29
|
return (react_1.default.createElement("div", { className: "uxf-data-grid__filter uxf-data-grid__filter--interval" },
|
|
28
|
-
react_1.default.createElement(text_input_1.TextInput, { label: `${props.filter.label} (
|
|
29
|
-
react_1.default.createElement(text_input_1.TextInput, { label: `${props.filter.label} (
|
|
30
|
+
react_1.default.createElement(text_input_1.TextInput, { label: `${props.filter.label} (${t("uxf-data-grid-interval-filter:from")})`, max: (_a = props.value) === null || _a === void 0 ? void 0 : _a.to, name: `${props.filter.name}.from`, onChange: onChangeFrom, placeholder: (_b = props.filter.config) === null || _b === void 0 ? void 0 : _b.placeholder, type: "number", value: (_d = (_c = props.value) === null || _c === void 0 ? void 0 : _c.from) !== null && _d !== void 0 ? _d : "" }),
|
|
31
|
+
react_1.default.createElement(text_input_1.TextInput, { label: `${props.filter.label} (${t("uxf-data-grid-interval-filter:to")})`, min: (_e = props.value) === null || _e === void 0 ? void 0 : _e.from, name: `${props.filter.name}.to`, onChange: onChangeTo, placeholder: (_f = props.filter.config) === null || _f === void 0 ? void 0 : _f.placeholder, type: "number", value: (_h = (_g = props.value) === null || _g === void 0 ? void 0 : _g.to) !== null && _h !== void 0 ? _h : "" })));
|
|
30
32
|
},
|
|
31
33
|
ListItem: function (props) {
|
|
32
34
|
var _a, _b;
|
|
35
|
+
const t = (0, translations_1.useUxfTranslation)();
|
|
33
36
|
if (((0, is_nil_1.isNil)((_a = props.value) === null || _a === void 0 ? void 0 : _a.from) || (0, is_empty_1.isEmpty)(props.value.from)) &&
|
|
34
37
|
((0, is_nil_1.isNil)((_b = props.value) === null || _b === void 0 ? void 0 : _b.to) || (0, is_empty_1.isEmpty)(props.value.to))) {
|
|
35
38
|
return null;
|
|
36
39
|
}
|
|
37
40
|
const interval = [
|
|
38
|
-
props.value.from ? "
|
|
39
|
-
props.value.to ? "
|
|
41
|
+
props.value.from ? `${t("uxf-data-grid-interval-filter:from")} ${props.value.from}` : null,
|
|
42
|
+
props.value.to ? `${t("uxf-data-grid-interval-filter:to")} ${props.value.to}` : null,
|
|
40
43
|
];
|
|
41
44
|
return (react_1.default.createElement(chip_1.Chip, { onClose: props.onClear },
|
|
42
45
|
props.filter.label,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uxf/data-grid",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.122.0",
|
|
4
4
|
"description": "UXF DataGrid",
|
|
5
5
|
"homepage": "https://gitlab.com/uxf-npm/data-grid#readme",
|
|
6
6
|
"main": "index.js",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@uxf/core-react": "11.120.0",
|
|
46
46
|
"@uxf/localize": "11.120.0",
|
|
47
47
|
"@uxf/styles": "11.114.0",
|
|
48
|
-
"@uxf/ui": "11.
|
|
48
|
+
"@uxf/ui": "11.122.0",
|
|
49
49
|
"dayjs": "^1.11.19",
|
|
50
50
|
"react": ">=18.2.0",
|
|
51
51
|
"react-dom": ">=18.2.0"
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@uxf/core-react": "11.120.0",
|
|
61
61
|
"@uxf/localize": "11.120.0",
|
|
62
62
|
"@uxf/styles": "11.114.0",
|
|
63
|
-
"@uxf/ui": "11.
|
|
63
|
+
"@uxf/ui": "11.122.0",
|
|
64
64
|
"dayjs": "^1.11.19",
|
|
65
65
|
"react": "18.3.1",
|
|
66
66
|
"react-dom": "18.3.1"
|
package/translations/cs.json
CHANGED
package/translations/de.json
CHANGED
package/translations/en.json
CHANGED
package/translations/sk.json
CHANGED
|
@@ -181,5 +181,19 @@ declare const _default: {
|
|
|
181
181
|
de: string;
|
|
182
182
|
};
|
|
183
183
|
};
|
|
184
|
+
"uxf-data-grid-interval-filter": {
|
|
185
|
+
from: {
|
|
186
|
+
cs: string;
|
|
187
|
+
en: string;
|
|
188
|
+
sk: string;
|
|
189
|
+
de: string;
|
|
190
|
+
};
|
|
191
|
+
to: {
|
|
192
|
+
cs: string;
|
|
193
|
+
en: string;
|
|
194
|
+
sk: string;
|
|
195
|
+
de: string;
|
|
196
|
+
};
|
|
197
|
+
};
|
|
184
198
|
};
|
|
185
199
|
export default _default;
|
|
@@ -183,4 +183,18 @@ exports.default = {
|
|
|
183
183
|
de: "Nein",
|
|
184
184
|
},
|
|
185
185
|
},
|
|
186
|
+
"uxf-data-grid-interval-filter": {
|
|
187
|
+
from: {
|
|
188
|
+
cs: "od",
|
|
189
|
+
en: "from",
|
|
190
|
+
sk: "od",
|
|
191
|
+
de: "von",
|
|
192
|
+
},
|
|
193
|
+
to: {
|
|
194
|
+
cs: "do",
|
|
195
|
+
en: "to",
|
|
196
|
+
sk: "do",
|
|
197
|
+
de: "bis",
|
|
198
|
+
},
|
|
199
|
+
},
|
|
186
200
|
};
|