@appcorp/app-corp-vista 0.1.66 → 0.1.68
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';
|
|
@@ -64,20 +65,26 @@ var componentMap = (_a = {},
|
|
|
64
65
|
react_1.default.createElement("div", { className: "flex flex-row justify-center" },
|
|
65
66
|
react_1.default.createElement(vista_dropdown_menu_v1_1.VistaDropdownMenuV1, { assetId: id, rowActions: rowActions })))); },
|
|
66
67
|
_a[vista_table_type_1.VISTA_TABLE_CELL_TYPE.IMAGE] = function () { return (react_1.default.createElement(react_1.default.Fragment, null)); },
|
|
67
|
-
_a[vista_table_type_1.VISTA_TABLE_CELL_TYPE.MULTIPLE_TEXT_LINES] = function (val) { return (react_1.default.createElement("td", { className: exports.dataClasses }, val.map(function (v) {
|
|
68
|
+
_a[vista_table_type_1.VISTA_TABLE_CELL_TYPE.MULTIPLE_TEXT_LINES] = function (val) { return (react_1.default.createElement("td", { className: exports.dataClasses }, val.map(function (v) {
|
|
69
|
+
var id = (0, uuid_1.v4)();
|
|
70
|
+
return (react_1.default.createElement(vista_table_cell_v1_1.VistaTableCellV1, { key: id, label: v }));
|
|
71
|
+
}))); },
|
|
68
72
|
_a);
|
|
69
73
|
var VistaTableBodyV1 = function (_a) {
|
|
70
74
|
var colLength = _a.colLength, loading = _a.loading, pageLimit = _a.pageLimit, tableBodyCols = _a.tableBodyCols, tableBodyRows = _a.tableBodyRows, rowActions = _a.rowActions;
|
|
71
75
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
72
76
|
loading &&
|
|
73
|
-
new Array(Number(pageLimit)).fill(1).map(function (
|
|
74
|
-
|
|
75
|
-
|
|
77
|
+
new Array(Number(pageLimit)).fill(1).map(function () {
|
|
78
|
+
var refId = (0, uuid_1.v4)();
|
|
79
|
+
return (react_1.default.createElement("tr", { key: refId, className: exports.rowClasses }, new Array(colLength).fill(1).map(function () {
|
|
80
|
+
var reffId = (0, uuid_1.v4)();
|
|
81
|
+
return (react_1.default.createElement("td", { key: reffId, className: exports.dataClasses },
|
|
76
82
|
react_1.default.createElement(vista_shimmer_v1_1.VistaShimmer, null)));
|
|
77
83
|
})));
|
|
78
84
|
}),
|
|
79
85
|
!loading && (tableBodyRows === null || tableBodyRows === void 0 ? void 0 : tableBodyRows.map(function (row) {
|
|
80
|
-
|
|
86
|
+
var ref = (0, uuid_1.v4)();
|
|
87
|
+
return (react_1.default.createElement("tr", { key: ref, className: exports.rowClasses }, tableBodyCols.map(function (_a, ind) {
|
|
81
88
|
var _b;
|
|
82
89
|
var key = _a.key, componentType = _a.componentType, expression = _a.expression;
|
|
83
90
|
var computedValue = '';
|
|
@@ -99,7 +106,8 @@ var VistaTableBodyV1 = function (_a) {
|
|
|
99
106
|
if (expression) {
|
|
100
107
|
computedValue = expression(row[key]);
|
|
101
108
|
}
|
|
102
|
-
|
|
109
|
+
var reff = (0, uuid_1.v4)();
|
|
110
|
+
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
111
|
})));
|
|
104
112
|
}))));
|
|
105
113
|
};
|
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.68",
|
|
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",
|