@appcorp/app-corp-vista 0.1.66 → 0.1.67
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.
|
@@ -42,6 +42,7 @@ var vista_table_cell_v1_1 = require("../../atoms/table-cell-v1/vista-table-cell-
|
|
|
42
42
|
var vista_dropdown_menu_v1_1 = require("../../molecules/vista-dropdown-menu-v1/vista-dropdown-menu-v1");
|
|
43
43
|
var vista_shimmer_v1_1 = require("../../atoms/vista-shimmer-v1/vista-shimmer-v1");
|
|
44
44
|
var vista_table_type_1 = require("../../type/vista-table-type");
|
|
45
|
+
var uuid_1 = require("uuid");
|
|
45
46
|
exports.TOOLTIP_OFFSET = -8;
|
|
46
47
|
exports.rowClasses = 'odd:bg-gray-100 even:bg-gray-200 hover:bg-gray-300 dark:odd:bg-gray-800 dark:even:bg-gray-700 dark:hover:bg-gray-600';
|
|
47
48
|
exports.dataClasses = 'p-2 cursor-pointer';
|
|
@@ -70,14 +71,17 @@ var VistaTableBodyV1 = function (_a) {
|
|
|
70
71
|
var colLength = _a.colLength, loading = _a.loading, pageLimit = _a.pageLimit, tableBodyCols = _a.tableBodyCols, tableBodyRows = _a.tableBodyRows, rowActions = _a.rowActions;
|
|
71
72
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
72
73
|
loading &&
|
|
73
|
-
new Array(Number(pageLimit)).fill(1).map(function (
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
new Array(Number(pageLimit)).fill(1).map(function () {
|
|
75
|
+
var refId = (0, uuid_1.v4)();
|
|
76
|
+
return (react_1.default.createElement("tr", { key: refId, className: exports.rowClasses }, new Array(colLength).fill(1).map(function () {
|
|
77
|
+
var reffId = (0, uuid_1.v4)();
|
|
78
|
+
return (react_1.default.createElement("td", { key: reffId, className: exports.dataClasses },
|
|
76
79
|
react_1.default.createElement(vista_shimmer_v1_1.VistaShimmer, null)));
|
|
77
80
|
})));
|
|
78
81
|
}),
|
|
79
82
|
!loading && (tableBodyRows === null || tableBodyRows === void 0 ? void 0 : tableBodyRows.map(function (row) {
|
|
80
|
-
|
|
83
|
+
var ref = (0, uuid_1.v4)();
|
|
84
|
+
return (react_1.default.createElement("tr", { key: ref, className: exports.rowClasses }, tableBodyCols.map(function (_a, ind) {
|
|
81
85
|
var _b;
|
|
82
86
|
var key = _a.key, componentType = _a.componentType, expression = _a.expression;
|
|
83
87
|
var computedValue = '';
|
|
@@ -99,7 +103,8 @@ var VistaTableBodyV1 = function (_a) {
|
|
|
99
103
|
if (expression) {
|
|
100
104
|
computedValue = expression(row[key]);
|
|
101
105
|
}
|
|
102
|
-
|
|
106
|
+
var reff = (0, uuid_1.v4)();
|
|
107
|
+
return (react_1.default.createElement(react_1.Fragment, { key: reff }, (_b = componentMap[componentType]) === null || _b === void 0 ? void 0 : _b.call(componentMap, computedValue, rowActions)));
|
|
103
108
|
})));
|
|
104
109
|
}))));
|
|
105
110
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appcorp/app-corp-vista",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.67",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "yarn clean && yarn build:ts && cp package.json lib && cp README.md lib",
|
|
6
6
|
"build:next": "next build",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@react-jvectormap/core": "^1.0.4",
|
|
42
42
|
"@react-jvectormap/world": "^1.1.2",
|
|
43
43
|
"@react-pakistan/react-icon-collection": "^3.5.0",
|
|
44
|
-
"@react-pakistan/util-functions": "^1.24.
|
|
44
|
+
"@react-pakistan/util-functions": "^1.24.8",
|
|
45
45
|
"@remixicon/react": "^4.6.0",
|
|
46
46
|
"@storybook/addon-essentials": "^8",
|
|
47
47
|
"@storybook/addon-interactions": "^8",
|