@uxf/data-grid 11.113.0 → 11.114.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.
- package/_store/reducer.js +0 -1
- package/filters/filters.js +0 -1
- package/package.json +11 -11
- package/table-v2/no-rows-fallback.d.ts +1 -1
- package/table-v2/no-rows-fallback.js +2 -1
- package/table-v2/styles.css +4 -0
- package/table-v2/table-v2.js +17 -16
package/_store/reducer.js
CHANGED
|
@@ -118,7 +118,6 @@ const reducer = (state, action) => {
|
|
|
118
118
|
},
|
|
119
119
|
};
|
|
120
120
|
case "CHANGE_TAB": {
|
|
121
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
122
121
|
const tabHistory = (_d = state.tabRequests[action.tab.name]) !== null && _d !== void 0 ? _d : empty_object_1.EMPTY_OBJECT;
|
|
123
122
|
return {
|
|
124
123
|
...state,
|
package/filters/filters.js
CHANGED
|
@@ -10,7 +10,6 @@ function DataGridFilters(props) {
|
|
|
10
10
|
return (react_1.default.createElement("div", { className: "uxf-data-grid__filters" }, props.schema.filters.map((filter) => {
|
|
11
11
|
const filterHandler = props.filterHandlers[filter.type];
|
|
12
12
|
const FilterInput = filterHandler === null || filterHandler === void 0 ? void 0 : filterHandler.Input;
|
|
13
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
14
13
|
if (!FilterInput) {
|
|
15
14
|
// eslint-disable-next-line no-console
|
|
16
15
|
console.warn(`Unknown filter "${filter.type}".`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uxf/data-grid",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.114.0",
|
|
4
4
|
"description": "UXF DataGrid",
|
|
5
5
|
"homepage": "https://gitlab.com/uxf-npm/data-grid#readme",
|
|
6
6
|
"main": "index.js",
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"@dnd-kit/core": "^6.3.1",
|
|
42
42
|
"@dnd-kit/sortable": "^10.0.0",
|
|
43
43
|
"@dnd-kit/utilities": "^3.2.2",
|
|
44
|
-
"@uxf/core": "11.
|
|
45
|
-
"@uxf/core-react": "11.
|
|
46
|
-
"@uxf/localize": "11.
|
|
47
|
-
"@uxf/styles": "11.
|
|
48
|
-
"@uxf/ui": "11.
|
|
44
|
+
"@uxf/core": "11.114.0",
|
|
45
|
+
"@uxf/core-react": "11.114.0",
|
|
46
|
+
"@uxf/localize": "11.114.0",
|
|
47
|
+
"@uxf/styles": "11.114.0",
|
|
48
|
+
"@uxf/ui": "11.114.0",
|
|
49
49
|
"dayjs": "^1.11.19",
|
|
50
50
|
"react": ">=18.2.0",
|
|
51
51
|
"react-dom": ">=18.2.0"
|
|
@@ -56,11 +56,11 @@
|
|
|
56
56
|
"@dnd-kit/utilities": "^3.2.2",
|
|
57
57
|
"@types/react": "18.3.27",
|
|
58
58
|
"@types/react-dom": "18.3.7",
|
|
59
|
-
"@uxf/core": "11.
|
|
60
|
-
"@uxf/core-react": "11.
|
|
61
|
-
"@uxf/localize": "11.
|
|
62
|
-
"@uxf/styles": "11.
|
|
63
|
-
"@uxf/ui": "11.
|
|
59
|
+
"@uxf/core": "11.114.0",
|
|
60
|
+
"@uxf/core-react": "11.114.0",
|
|
61
|
+
"@uxf/localize": "11.114.0",
|
|
62
|
+
"@uxf/styles": "11.114.0",
|
|
63
|
+
"@uxf/ui": "11.114.0",
|
|
64
64
|
"dayjs": "^1.11.19",
|
|
65
65
|
"react": "18.3.1",
|
|
66
66
|
"react-dom": "18.3.1"
|
|
@@ -6,11 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.NoRowsFallback = NoRowsFallback;
|
|
7
7
|
const translations_1 = require("@uxf/core-react/translations");
|
|
8
8
|
const cx_1 = require("@uxf/core/utils/cx");
|
|
9
|
+
const is_not_nil_1 = require("@uxf/core/utils/is-not-nil");
|
|
9
10
|
const icon_1 = require("@uxf/ui/icon");
|
|
10
11
|
const react_1 = __importDefault(require("react"));
|
|
11
12
|
function NoRowsFallback(props) {
|
|
12
13
|
const t = (0, translations_1.useUxfTranslation)();
|
|
13
|
-
return (react_1.default.createElement("div", { className: (0, cx_1.cx)("uxf-dg-table__no-rows-fallback", props.isLoading && "is-loading", props.error && "is-error") }, props.isLoading ? (react_1.default.createElement(react_1.default.Fragment, null, t("uxf-data-grid-no-rows-fallback:loading"))) : props.error ? (react_1.default.createElement(react_1.default.Fragment, null,
|
|
14
|
+
return (react_1.default.createElement("div", { className: (0, cx_1.cx)("uxf-dg-table__no-rows-fallback", props.isLoading && "is-loading", (0, is_not_nil_1.isNotNil)(props.error) && "is-error") }, props.isLoading ? (react_1.default.createElement(react_1.default.Fragment, null, t("uxf-data-grid-no-rows-fallback:loading"))) : (0, is_not_nil_1.isNotNil)(props.error) ? (react_1.default.createElement(react_1.default.Fragment, null,
|
|
14
15
|
react_1.default.createElement(icon_1.Icon, { name: "warning", size: 24 }),
|
|
15
16
|
react_1.default.createElement("p", null, t("uxf-data-grid-no-rows-fallback:error")))) : (react_1.default.createElement(react_1.default.Fragment, null, t("uxf-data-grid-no-rows-fallback:no-records")))));
|
|
16
17
|
}
|
package/table-v2/styles.css
CHANGED
package/table-v2/table-v2.js
CHANGED
|
@@ -9,6 +9,7 @@ const compose_refs_1 = require("@uxf/core-react/utils/compose-refs");
|
|
|
9
9
|
const empty_array_1 = require("@uxf/core/constants/empty-array");
|
|
10
10
|
const is_empty_1 = require("@uxf/core/utils/is-empty");
|
|
11
11
|
const is_nil_1 = require("@uxf/core/utils/is-nil");
|
|
12
|
+
const is_not_empty_1 = require("@uxf/core/utils/is-not-empty");
|
|
12
13
|
const is_not_nil_1 = require("@uxf/core/utils/is-not-nil");
|
|
13
14
|
const format_css_value_1 = require("@uxf/styles/units/format-css-value");
|
|
14
15
|
const rem_1 = require("@uxf/styles/units/rem");
|
|
@@ -79,20 +80,20 @@ function DataGridTableV2(props) {
|
|
|
79
80
|
}),
|
|
80
81
|
react_1.default.createElement(show_1.Show, { when: (0, is_not_nil_1.isNotNil)(props.actionCell) },
|
|
81
82
|
react_1.default.createElement(components_1.Table.HeaderActionCell, null)))),
|
|
82
|
-
react_1.default.createElement(components_1.Table.Body, { gridTemplateColumns: gridTemplateColumns, gridTemplateRows: gridTemplateRows, ref: (0, compose_refs_1.composeRefs)(syncedScrollRef, bodyRef) }, (0,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
react_1.default.createElement(
|
|
86
|
-
react_1.default.createElement(
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
83
|
+
react_1.default.createElement(components_1.Table.Body, { gridTemplateColumns: gridTemplateColumns, gridTemplateRows: gridTemplateRows, ref: (0, compose_refs_1.composeRefs)(syncedScrollRef, bodyRef) }, (0, is_not_empty_1.isNotEmpty)(props.data) &&
|
|
84
|
+
props.data.map((row) => {
|
|
85
|
+
var _a, _b;
|
|
86
|
+
return (react_1.default.createElement(components_1.Table.Row, { className: `${(0, is_not_nil_1.isNotNil)(props.rowAccent) ? "uxf-dg-table__row--" + props.rowAccent(row) : ""} ${(_b = (_a = props.rowClassName) === null || _a === void 0 ? void 0 : _a.call(props, row)) !== null && _b !== void 0 ? _b : ""}`, key: keyExtractor(row) },
|
|
87
|
+
react_1.default.createElement(show_1.Show, { when: Boolean(props.isRowsSelectable) },
|
|
88
|
+
react_1.default.createElement(select_row_checkbox_1.SelectRowCheckbox, { isRowSelectDisabled: props.isRowSelectDisabled ? props.isRowSelectDisabled(row) : false, isRowSelected: selectedRows.find((r) => keyExtractor(r) === keyExtractor(row)), onSelectRowChange: selectRowHandler(keyExtractor(row)) })),
|
|
89
|
+
visibleColumns.map((column) => {
|
|
90
|
+
var _a, _b, _c, _d;
|
|
91
|
+
const BodyCell = (_d = (_b = (_a = props.bodyCells) === null || _a === void 0 ? void 0 : _a[column.type]) !== null && _b !== void 0 ? _b : (_c = props.bodyCells) === null || _c === void 0 ? void 0 : _c.default) !== null && _d !== void 0 ? _d : DefaultBodyCell;
|
|
92
|
+
return (react_1.default.createElement(components_1.Table.Cell, { column: column, key: column.name },
|
|
93
|
+
react_1.default.createElement(BodyCell, { column: column, reload: props.reload, row: row, value: row[column.name] })));
|
|
94
|
+
}),
|
|
95
|
+
(0, is_not_nil_1.isNotNil)(props.actionCell) && (react_1.default.createElement(components_1.Table.ActionCellWrapper, null,
|
|
96
|
+
react_1.default.createElement(props.actionCell.Component, { reload: props.reload, row: row })))));
|
|
97
|
+
})),
|
|
98
|
+
(0, is_empty_1.isEmpty)(props.data) && react_1.default.createElement(NoRowsFallback, { error: props.error, isLoading: Boolean(props.isLoading) })));
|
|
98
99
|
}
|