@ansible/ansible-ui-framework 0.0.248 → 0.0.250

Sign up to get free protection for your applications and to get access to all the features.
@@ -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,6 @@
1
+ /// <reference types="react" />
2
+ import { ITableColumn } from './PageTable';
3
+ export declare function TableDetails<T extends object>(props: {
4
+ item: T | undefined;
5
+ columns: ITableColumn<T>[];
6
+ }): JSX.Element;
@@ -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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ansible/ansible-ui-framework",
3
3
  "description": "Framework for building consistent responsive web applications using PatternFly.",
4
- "version": "0.0.248",
4
+ "version": "0.0.250",
5
5
  "author": "Red Hat",
6
6
  "license": "MIT",
7
7
  "repository": {