@appcorp/app-corp-vista 0.2.97 → 0.2.99
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.
|
@@ -98,11 +98,13 @@ var VistaTableBodyV1 = function (_a) {
|
|
|
98
98
|
!loading && tableBodyRows.length > 0 && (tableBodyRows === null || tableBodyRows === void 0 ? void 0 : tableBodyRows.map(function (row) {
|
|
99
99
|
var ref = (0, uuid_1.v4)();
|
|
100
100
|
return (react_1.default.createElement("tr", { key: ref, className: exports.rowClasses }, tableBodyCols.map(function (_a) {
|
|
101
|
-
var _b, _c;
|
|
101
|
+
var _b, _c, _d, _e, _f, _g, _h;
|
|
102
102
|
var key = _a.key, componentType = _a.componentType, expression = _a.expression;
|
|
103
103
|
var computedValue = '';
|
|
104
104
|
if (Array.isArray(key) && componentType === vista_table_type_1.VISTA_TABLE_CELL_TYPE.OBJECT) {
|
|
105
|
-
|
|
105
|
+
var _j = (_b = key[0]) === null || _b === void 0 ? void 0 : _b.split(util_functions_1.VALUE_DELIMITER.COLON), option1aKey = _j[0], option1bKey = _j[1];
|
|
106
|
+
var _k = (_c = key[1]) === null || _c === void 0 ? void 0 : _c.split(util_functions_1.VALUE_DELIMITER.COLON), option2aKey = _k[0], option2bKey = _k[1];
|
|
107
|
+
computedValue = (((_e = (_d = row[key === null || key === void 0 ? void 0 : key[0]]) === null || _d === void 0 ? void 0 : _d.key) === null || _e === void 0 ? void 0 : _e[1]) || ((_f = row[option1aKey]) === null || _f === void 0 ? void 0 : _f[option2aKey])) || ((_g = row[option1bKey]) === null || _g === void 0 ? void 0 : _g[option2bKey]);
|
|
106
108
|
}
|
|
107
109
|
else if (Array.isArray(key) && componentType === vista_table_type_1.VISTA_TABLE_CELL_TYPE.MULTIPLE_TEXT_LINES) {
|
|
108
110
|
if (expression) {
|
|
@@ -125,7 +127,7 @@ var VistaTableBodyV1 = function (_a) {
|
|
|
125
127
|
computedValue = row.id;
|
|
126
128
|
}
|
|
127
129
|
var reff = (0, uuid_1.v4)();
|
|
128
|
-
return (react_1.default.createElement(react_1.Fragment, { key: reff }, (
|
|
130
|
+
return (react_1.default.createElement(react_1.Fragment, { key: reff }, (_h = componentMap[componentType]) === null || _h === void 0 ? void 0 : _h.call(componentMap, computedValue, rowActions)));
|
|
129
131
|
})));
|
|
130
132
|
}))));
|
|
131
133
|
};
|
|
@@ -18,7 +18,8 @@ var VistaTableV1 = function (_a) {
|
|
|
18
18
|
react_1.default.createElement("table", { className: "min-w-full divide-y divide-gray-700" },
|
|
19
19
|
react_1.default.createElement("thead", null,
|
|
20
20
|
react_1.default.createElement(vista_table_head_v1_1.VistaTableHeadV1, { items: tableHeadItems })),
|
|
21
|
-
react_1.default.createElement("tbody", { className: "divide-y divide-gray-700 overflow-y-auto" },
|
|
21
|
+
react_1.default.createElement("tbody", { className: "divide-y divide-gray-700 overflow-y-auto" },
|
|
22
|
+
react_1.default.createElement(vista_table_body_v1_1.VistaTableBodyV1, { colLength: tableHeadItems.length, loading: loading, pageLimit: pageLimit, rowActions: rowActions, tableBodyCols: tableBodyCols, tableBodyRows: tableBodyRows }))),
|
|
22
23
|
!loading && (tableBodyRows === null || tableBodyRows === void 0 ? void 0 : tableBodyRows.length) === 0 && (react_1.default.createElement("div", { className: 'flex flex-row justify-center p-16' },
|
|
23
24
|
react_1.default.createElement(empty_table_1.EmptyTable, null))),
|
|
24
25
|
react_1.default.createElement(vista_table_footer_v1_1.VistaTableFooterV1, { currentPage: currentPage, dir: dir, handleNextOnClick: handleNextOnClick, handleOnSelect: handleOnSelect, handlePreviousOnClick: handlePreviousOnClick, isNextDisabled: isNextDisabled, isPreviousDisabled: isPreviousDisabled, listOptions: listOptions, nextLabel: nextLabel, nodeSelectKey: nodeSelectKey, ofLabel: ofLabel, pageLabel: pageLabel, previousLabel: previousLabel, selectKey1: selectKey1, selectKey2: selectKey2, selectedItem: selectedItem, totalPages: totalPages }))));
|