@ansible/ansible-ui-framework 0.0.248 → 0.0.249
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/PageTableDetails.js +26 -0
- package/mjs/PageTableDetails.d.ts +6 -0
- package/mjs/PageTableDetails.js +11 -0
- package/package.json +1 -1
@@ -0,0 +1,26 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
3
|
+
__assign = Object.assign || function(t) {
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
5
|
+
s = arguments[i];
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
7
|
+
t[p] = s[p];
|
8
|
+
}
|
9
|
+
return t;
|
10
|
+
};
|
11
|
+
return __assign.apply(this, arguments);
|
12
|
+
};
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
14
|
+
exports.TableDetails = void 0;
|
15
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
16
|
+
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
17
|
+
/* eslint-disable @typescript-eslint/no-empty-function */
|
18
|
+
var react_core_1 = require("@patternfly/react-core");
|
19
|
+
var Details_1 = require("./components/Details");
|
20
|
+
function TableDetails(props) {
|
21
|
+
var item = props.item, columns = props.columns;
|
22
|
+
if (!item)
|
23
|
+
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
|
24
|
+
return ((0, jsx_runtime_1.jsx)(react_core_1.DescriptionList, __assign({ isCompact: true }, { children: columns.map(function (column) { return ((0, jsx_runtime_1.jsx)(Details_1.Detail, __assign({ label: column.hideLabel ? undefined : column.header }, { children: column.cell(item) }), column.id)); }) })));
|
25
|
+
}
|
26
|
+
exports.TableDetails = TableDetails;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
3
|
+
/* eslint-disable @typescript-eslint/no-empty-function */
|
4
|
+
import { DescriptionList } from '@patternfly/react-core';
|
5
|
+
import { Detail } from './components/Details';
|
6
|
+
export function TableDetails(props) {
|
7
|
+
const { item, columns } = props;
|
8
|
+
if (!item)
|
9
|
+
return _jsx(_Fragment, {});
|
10
|
+
return (_jsx(DescriptionList, { isCompact: true, children: columns.map((column) => (_jsx(Detail, { label: column.hideLabel ? undefined : column.header, children: column.cell(item) }, column.id))) }));
|
11
|
+
}
|
package/package.json
CHANGED