@ansible/ansible-ui-framework 0.0.428 → 0.0.449

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. package/README.md +1 -1
  2. package/cjs/PageActions/PageAction.d.ts +1 -1
  3. package/cjs/PageActions/PageSingleAction.js +1 -1
  4. package/cjs/PageCells/TextCell.d.ts +1 -1
  5. package/cjs/PageDetails/PageDetail.d.ts +6 -0
  6. package/cjs/PageDetails/PageDetail.js +27 -0
  7. package/cjs/PageDetails/PageDetails.d.ts +5 -0
  8. package/cjs/PageDetails/PageDetails.js +45 -0
  9. package/cjs/PageDetails/PageDetailsFromColumns.d.ts +6 -0
  10. package/cjs/{PageTable/PageTableDetails.js → PageDetails/PageDetailsFromColumns.js} +7 -6
  11. package/cjs/PageForm/Inputs/PageFormCheckbox.d.ts +9 -8
  12. package/cjs/PageForm/Inputs/PageFormCheckbox.js +8 -4
  13. package/cjs/PageForm/Inputs/PageFormFileUpload.js +1 -1
  14. package/cjs/PageForm/Inputs/PageFormSelect.js +1 -1
  15. package/cjs/PageForm/Inputs/PageFormSelectOption.d.ts +2 -0
  16. package/cjs/PageForm/Inputs/PageFormSelectOption.js +11 -1
  17. package/cjs/PageForm/Inputs/PageFormTextArea.js +1 -1
  18. package/cjs/PageForm/Inputs/PageFormTextInput.js +1 -1
  19. package/cjs/PageForm/PageForm.d.ts +2 -0
  20. package/cjs/PageForm/PageForm.js +10 -9
  21. package/cjs/PageForm/Utils/PageFormHidden.d.ts +6 -0
  22. package/cjs/PageForm/Utils/PageFormHidden.js +13 -0
  23. package/cjs/PageForm/Utils/PageFormSection.d.ts +5 -0
  24. package/cjs/PageForm/Utils/PageFormSection.js +20 -0
  25. package/cjs/PageForm/{Inputs → Utils}/PageFormWatch.d.ts +0 -0
  26. package/cjs/PageForm/{Inputs → Utils}/PageFormWatch.js +1 -2
  27. package/cjs/PageHeader.d.ts +9 -11
  28. package/cjs/PageHeader.js +9 -11
  29. package/cjs/PageTable/PageTable.d.ts +2 -7
  30. package/cjs/PageTable/PageTable.js +1 -7
  31. package/cjs/PageTable/PageTableCard.js +3 -3
  32. package/cjs/PageTabs.d.ts +2 -1
  33. package/cjs/PageTabs.js +6 -2
  34. package/cjs/index.d.ts +3 -3
  35. package/cjs/index.js +3 -3
  36. package/package.json +1 -1
  37. package/cjs/PageDataList.d.ts +0 -46
  38. package/cjs/PageDataList.js +0 -61
  39. package/cjs/PageForm/FormPage.d.ts +0 -17
  40. package/cjs/PageForm/FormPage.js +0 -73
  41. package/cjs/PageTable/PageTableDetails.d.ts +0 -6
  42. package/cjs/components/Details.d.ts +0 -36
  43. package/cjs/components/Details.js +0 -63
  44. package/docs/Components.md +0 -9
  45. package/docs/Framework.md +0 -19
  46. package/docs/Guides.md +0 -6
  47. package/docs/_config.yml +0 -2
  48. package/docs/assets/css/style.scss +0 -139
  49. package/docs/components/BulkActionDialog.md +0 -30
  50. package/docs/components/PageFramework.md +0 -11
  51. package/docs/components/PageHeader.md +0 -31
  52. package/docs/components/PageLayout.md +0 -18
  53. package/docs/components/PageTable.md +0 -17
  54. package/docs/guides/GettingStarted.md +0 -90
  55. package/docs/guides/PageTableGuide.md +0 -178
package/cjs/index.js CHANGED
@@ -18,7 +18,6 @@ __exportStar(require("./BulkActionDialog"), exports);
18
18
  __exportStar(require("./BulkConfirmationDialog"), exports);
19
19
  __exportStar(require("./components/BulkSelector"), exports);
20
20
  __exportStar(require("./components/Collapse"), exports);
21
- __exportStar(require("./components/Details"), exports);
22
21
  __exportStar(require("./components/Help"), exports);
23
22
  __exportStar(require("./components/icons/RunningIcon"), exports);
24
23
  __exportStar(require("./components/pfcolors"), exports);
@@ -36,7 +35,9 @@ __exportStar(require("./PageCells/DateTimeCell"), exports);
36
35
  __exportStar(require("./PageCells/ElapsedTimeCell"), exports);
37
36
  __exportStar(require("./PageCells/LabelsCell"), exports);
38
37
  __exportStar(require("./PageCells/TextCell"), exports);
39
- __exportStar(require("./PageDataList"), exports);
38
+ __exportStar(require("./PageDetails/PageDetail"), exports);
39
+ __exportStar(require("./PageDetails/PageDetails"), exports);
40
+ __exportStar(require("./PageDetails/PageDetailsFromColumns"), exports);
40
41
  __exportStar(require("./PageDialog"), exports);
41
42
  __exportStar(require("./PageForm/Inputs/FormGroupSelect"), exports);
42
43
  __exportStar(require("./PageForm/Inputs/FormGroupSelectOption"), exports);
@@ -47,7 +48,6 @@ __exportStar(require("./PageHeader"), exports);
47
48
  __exportStar(require("./PageLayout"), exports);
48
49
  __exportStar(require("./PageTable/PageTable"), exports);
49
50
  __exportStar(require("./PageTable/PageTableCards"), exports);
50
- __exportStar(require("./PageTable/PageTableDetails"), exports);
51
51
  __exportStar(require("./PageTable/PageToolbar"), exports);
52
52
  __exportStar(require("./PageTable/useTableItems"), exports);
53
53
  __exportStar(require("./PageTabs"), exports);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ansible/ansible-ui-framework",
3
3
  "description": "A framework for building applications using PatternFly.",
4
- "version": "0.0.428",
4
+ "version": "0.0.449",
5
5
  "author": "Red Hat",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -1,46 +0,0 @@
1
- import { Dispatch, ReactNode, SetStateAction } from 'react';
2
- import { IPageAction } from './PageActions/PageAction';
3
- import { PageHeaderProps } from './PageHeader';
4
- import { IToolbarFilter } from './PageTable/PageToolbar';
5
- export type DataListPageProps<T extends object> = PageHeaderProps & PageDataListProps<T> & {
6
- error?: Error;
7
- };
8
- export declare function DataListPage<T extends object>(props: DataListPageProps<T>): JSX.Element;
9
- export type PageDataListProps<T extends object> = {
10
- keyFn: (item: T) => string | number;
11
- itemCount?: number;
12
- pageItems: T[] | undefined;
13
- toolbarActions?: IPageAction<T>[];
14
- dataCells: ((item: T) => ReactNode)[];
15
- actions: IPageAction<T>[];
16
- toolbarFilters?: IToolbarFilter[];
17
- filters?: Record<string, string[]>;
18
- setFilters?: Dispatch<SetStateAction<Record<string, string[]>>>;
19
- clearAllFilters?: () => void;
20
- sort?: string;
21
- setSort?: (sort: string) => void;
22
- sortDirection?: 'asc' | 'desc';
23
- setSortDirection?: (sortDirection: 'asc' | 'desc') => void;
24
- compact?: boolean;
25
- page: number;
26
- perPage: number;
27
- setPage: (page: number) => void;
28
- setPerPage: (perPage: number) => void;
29
- autoHidePagination?: boolean;
30
- isSelected?: (item: T) => boolean;
31
- selectedItems?: T[];
32
- selectItem?: (item: T) => void;
33
- unselectItem?: (item: T) => void;
34
- selectItems?: (items: T[]) => void;
35
- unselectAll?: () => void;
36
- onSelect?: (item: T) => void;
37
- selectNoneText?: string;
38
- errorStateTitle: string;
39
- error?: Error;
40
- emptyStateTitle: string;
41
- emptyStateDescription?: string;
42
- emptyStateButtonText?: string;
43
- emptyStateButtonClick?: () => void;
44
- t?: (t: string) => string;
45
- };
46
- export declare function PageDataList<T extends object>(props: PageDataListProps<T>): JSX.Element;
@@ -1,61 +0,0 @@
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.PageDataList = exports.DataListPage = void 0;
15
- var jsx_runtime_1 = require("react/jsx-runtime");
16
- var react_core_1 = require("@patternfly/react-core");
17
- var react_icons_1 = require("@patternfly/react-icons");
18
- var react_1 = require("react");
19
- var Scrollable_1 = require("./components/Scrollable");
20
- var PageActions_1 = require("./PageActions/PageActions");
21
- var PageActionType_1 = require("./PageActions/PageActionType");
22
- var PageBody_1 = require("./PageBody");
23
- var PageHeader_1 = require("./PageHeader");
24
- var PageLayout_1 = require("./PageLayout");
25
- var PagePagination_1 = require("./PageTable/PagePagination");
26
- var Settings_1 = require("./Settings");
27
- function DataListPage(props) {
28
- return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)(PageLayout_1.PageLayout, { children: [(0, jsx_runtime_1.jsx)(PageHeader_1.PageHeader, __assign({}, props)), (0, jsx_runtime_1.jsx)(PageBody_1.PageBody, { children: (0, jsx_runtime_1.jsx)(PageDataList, __assign({}, props)) })] }) }));
29
- }
30
- exports.DataListPage = DataListPage;
31
- function PageDataList(props) {
32
- var pageItems = props.pageItems, selectItem = props.selectItem, unselectItem = props.unselectItem, isSelected = props.isSelected, keyFn = props.keyFn, toolbarActions = props.toolbarActions, itemCount = props.itemCount, perPage = props.perPage,
33
- // clearAllFilters,
34
- filters = props.filters, error = props.error, dataCells = props.dataCells;
35
- var showSelect = (toolbarActions === null || toolbarActions === void 0 ? void 0 : toolbarActions.find(function (toolbarAction) { return PageActionType_1.PageActionType.bulk === toolbarAction.type; })) !==
36
- undefined;
37
- var settings = (0, Settings_1.useSettings)();
38
- if (error) {
39
- return ((0, jsx_runtime_1.jsx)("div", __assign({ style: {
40
- backgroundColor: settings.theme === 'dark' ? 'var(--pf-global--BackgroundColor--300)' : undefined,
41
- height: '100%',
42
- } }, { children: (0, jsx_runtime_1.jsxs)(react_core_1.EmptyState, __assign({ variant: react_core_1.EmptyStateVariant.small, style: {
43
- paddingTop: 64,
44
- } }, { children: [(0, jsx_runtime_1.jsx)(react_core_1.EmptyStateIcon, { icon: react_icons_1.ExclamationCircleIcon, color: "var(--pf-global--danger-color--100)" }), (0, jsx_runtime_1.jsx)(react_core_1.Title, __assign({ headingLevel: "h2", size: "lg" }, { children: props.errorStateTitle })), (0, jsx_runtime_1.jsx)(react_core_1.EmptyStateBody, { children: error.message })] })) })));
45
- }
46
- if (itemCount === 0 && Object.keys(filters !== null && filters !== void 0 ? filters : {}).length === 0) {
47
- return ((0, jsx_runtime_1.jsxs)(react_core_1.EmptyState, __assign({ variant: react_core_1.EmptyStateVariant.large, style: { paddingTop: 64 } }, { children: [(0, jsx_runtime_1.jsx)(react_core_1.EmptyStateIcon, { icon: react_icons_1.PlusCircleIcon }), (0, jsx_runtime_1.jsx)(react_core_1.Title, __assign({ headingLevel: "h4", size: "lg" }, { children: props.emptyStateTitle })), props.emptyStateDescription && ((0, jsx_runtime_1.jsx)(react_core_1.EmptyStateBody, { children: props.emptyStateDescription })), props.emptyStateButtonClick && ((0, jsx_runtime_1.jsx)(react_core_1.Button, __assign({ variant: "primary", onClick: props.emptyStateButtonClick }, { children: props.emptyStateButtonText })))] })));
48
- }
49
- return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Scrollable_1.Scrollable, { children: (0, jsx_runtime_1.jsx)(react_core_1.DataList, __assign({ "aria-label": "Simple data list example" }, { children: pageItems === null || pageItems === void 0 ? void 0 : pageItems.map(function (item) { return ((0, jsx_runtime_1.jsx)(react_core_1.DataListItem, __assign({ "aria-labelledby": "simple-item1" }, { children: (0, jsx_runtime_1.jsxs)(react_core_1.DataListItemRow, { children: [showSelect && ((0, jsx_runtime_1.jsx)(react_core_1.DataListCheck, { "aria-labelledby": "check-action-item1", name: "check-action-check1", isChecked: isSelected === null || isSelected === void 0 ? void 0 : isSelected(item), onClick: function () {
50
- if (isSelected === null || isSelected === void 0 ? void 0 : isSelected(item)) {
51
- selectItem === null || selectItem === void 0 ? void 0 : selectItem(item);
52
- }
53
- else {
54
- unselectItem === null || unselectItem === void 0 ? void 0 : unselectItem(item);
55
- }
56
- } })), (0, jsx_runtime_1.jsx)(react_core_1.DataListItemCells, { dataListCells: dataCells.map(function (dataCell, index) { return ((0, jsx_runtime_1.jsx)(react_core_1.DataListCell, __assign({ width: index === 0 ? 5 : 1 }, { children: (0, jsx_runtime_1.jsx)("span", __assign({ id: "simple-item1" }, { children: dataCell(item) })) }), "primary content")); }) }), props.actions && (0, jsx_runtime_1.jsx)(DataListActions, { actions: props.actions })] }) }), keyFn(item))); }) })) }), (!props.autoHidePagination || (itemCount !== null && itemCount !== void 0 ? itemCount : 0) > perPage) && (0, jsx_runtime_1.jsx)(PagePagination_1.PagePagination, __assign({}, props))] }));
57
- }
58
- exports.PageDataList = PageDataList;
59
- function DataListActions(props) {
60
- return ((0, jsx_runtime_1.jsx)(react_core_1.DataListAction, __assign({ "aria-labelledby": "check-action-item1 check-action-action1", id: "check-action-action1", "aria-label": "Actions", isPlainButtonAction: true, style: { whiteSpace: 'nowrap' } }, { children: (0, jsx_runtime_1.jsx)(PageActions_1.PageActions, { actions: props.actions, position: react_core_1.DropdownPosition.right }) })));
61
- }
@@ -1,17 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { SubmitHandler, UseFormReturn } from 'react-hook-form';
3
- import { PartialDeep } from 'type-fest';
4
- import { PageHeaderProps } from '../PageHeader';
5
- export type FormPageProps<T extends object> = PageHeaderProps & {
6
- children?: ReactNode;
7
- defaultValues?: PartialDeep<T>;
8
- onSubmit: SubmitHandler<PartialDeep<T>>;
9
- schema?: unknown;
10
- isVertical?: boolean;
11
- onCancel?: () => void;
12
- submitText?: string;
13
- hideHeader?: boolean;
14
- noPadding?: boolean;
15
- form: UseFormReturn;
16
- };
17
- export declare function FormPage<T extends object>(props: FormPageProps<T>): JSX.Element;
@@ -1,73 +0,0 @@
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
- var __read = (this && this.__read) || function (o, n) {
14
- var m = typeof Symbol === "function" && o[Symbol.iterator];
15
- if (!m) return o;
16
- var i = m.call(o), r, ar = [], e;
17
- try {
18
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
19
- }
20
- catch (error) { e = { error: error }; }
21
- finally {
22
- try {
23
- if (r && !r.done && (m = i["return"])) m.call(i);
24
- }
25
- finally { if (e) throw e.error; }
26
- }
27
- return ar;
28
- };
29
- Object.defineProperty(exports, "__esModule", { value: true });
30
- exports.FormPage = void 0;
31
- var jsx_runtime_1 = require("react/jsx-runtime");
32
- var react_core_1 = require("@patternfly/react-core");
33
- var react_1 = require("react");
34
- var Scrollable_1 = require("../components/Scrollable");
35
- var PageHeader_1 = require("../PageHeader");
36
- var Settings_1 = require("../Settings");
37
- var PageFormAlerts_1 = require("./PageFormAlerts");
38
- var PageFormButtons_1 = require("./PageFormButtons");
39
- function FormPage(props) {
40
- // const methods = useForm<PartialDeep<T>>({
41
- // defaultValues: props.defaultValues,
42
- // resolver: ajvResolver(props.schema, { strict: false }),
43
- // })
44
- var children = react_1.Children.toArray(props.children);
45
- var inputs = children.filter(function (child) {
46
- if (!(0, react_1.isValidElement)(child))
47
- return false;
48
- if (child.type === PageFormAlerts_1.PageFormAlerts)
49
- return false;
50
- if (child.type === PageFormButtons_1.PageFormButtons)
51
- return false;
52
- return true;
53
- });
54
- var buttons = children.find(function (child) {
55
- if (!(0, react_1.isValidElement)(child))
56
- return false;
57
- if (child.type === PageFormButtons_1.PageFormButtons)
58
- return true;
59
- return false;
60
- });
61
- var _a = __read((0, react_1.useContext)(Settings_1.SettingsContext), 1), settings = _a[0];
62
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [!props.hideHeader && (0, jsx_runtime_1.jsx)(PageHeader_1.PageHeader, __assign({}, props)), (0, jsx_runtime_1.jsxs)(react_core_1.Form
63
- // eslint-disable-next-line @typescript-eslint/no-misused-promises
64
- , __assign({
65
- // eslint-disable-next-line @typescript-eslint/no-misused-promises
66
- onSubmit: props.form.handleSubmit(props.onSubmit), isHorizontal: props.isVertical ? false : settings.formLayout === 'horizontal', style: {
67
- display: 'flex',
68
- flexDirection: 'column',
69
- flexGrow: 1,
70
- overflow: 'hidden',
71
- } }, { children: [(0, jsx_runtime_1.jsx)(Scrollable_1.Scrollable, __assign({ style: { height: '100%', flexGrow: 1 } }, { children: (0, jsx_runtime_1.jsx)(react_core_1.PageSection, __assign({ padding: { default: props.noPadding ? 'noPadding' : 'padding' }, isWidthLimited: true }, { children: (0, jsx_runtime_1.jsx)(react_core_1.FormSection, { children: inputs }) })) })), buttons] }))] }));
72
- }
73
- exports.FormPage = FormPage;
@@ -1,6 +0,0 @@
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;
@@ -1,36 +0,0 @@
1
- import { ComponentClass, ReactNode } from 'react';
2
- export interface IDetailText {
3
- label: string;
4
- icon?: ComponentClass;
5
- text?: string;
6
- helpTitle?: string;
7
- help?: ReactNode;
8
- to?: string;
9
- link?: string;
10
- color?: string;
11
- copy?: boolean;
12
- since?: boolean;
13
- }
14
- export declare function isDetailText(detail: IDetail): detail is IDetailText;
15
- export interface IDetailList {
16
- label: string;
17
- icon?: ComponentClass;
18
- items: IDetailListItem[];
19
- }
20
- export declare function isDetailList(detail: IDetail): detail is IDetailList;
21
- export interface IDetailListItem {
22
- icon?: ComponentClass;
23
- text: string;
24
- helpTitle?: string;
25
- help?: ReactNode;
26
- }
27
- export type IDetail = IDetailText | IDetailList;
28
- export declare function DetailsList(props: {
29
- children?: ReactNode;
30
- }): JSX.Element;
31
- export declare function Detail(props: {
32
- label?: string;
33
- children?: ReactNode;
34
- isEmpty?: boolean;
35
- }): JSX.Element;
36
- export declare function DetailsSkeleton(): JSX.Element;
@@ -1,63 +0,0 @@
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.DetailsSkeleton = exports.Detail = exports.DetailsList = exports.isDetailList = exports.isDetailText = void 0;
15
- var jsx_runtime_1 = require("react/jsx-runtime");
16
- var react_core_1 = require("@patternfly/react-core");
17
- var Settings_1 = require("../Settings");
18
- function isDetailText(detail) {
19
- return 'label' in detail && !('items' in detail);
20
- }
21
- exports.isDetailText = isDetailText;
22
- function isDetailList(detail) {
23
- return 'items' in detail && 'label' in detail;
24
- }
25
- exports.isDetailList = isDetailList;
26
- function DetailsList(props) {
27
- var settings = (0, Settings_1.useSettings)();
28
- var orientation = settings.formLayout;
29
- var columns = settings.formColumns;
30
- var isCompact = false;
31
- return ((0, jsx_runtime_1.jsx)(react_core_1.DescriptionList, __assign({ orientation: {
32
- sm: orientation,
33
- md: orientation,
34
- lg: orientation,
35
- xl: orientation,
36
- '2xl': orientation,
37
- }, columnModifier: columns === 'multiple'
38
- ? {
39
- default: '1Col',
40
- sm: '1Col',
41
- md: '2Col',
42
- lg: '2Col',
43
- xl: '3Col',
44
- '2xl': '3Col',
45
- }
46
- : undefined, style: { maxWidth: 1200, padding: isCompact ? undefined : 8 }, isCompact: isCompact }, { children: props.children })));
47
- }
48
- exports.DetailsList = DetailsList;
49
- function Detail(props) {
50
- var _a;
51
- if (props.children === null || typeof props.children === 'undefined' || props.children === '') {
52
- return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
53
- }
54
- if (props.isEmpty) {
55
- return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
56
- }
57
- return ((0, jsx_runtime_1.jsxs)(react_core_1.DescriptionListGroup, { children: [props.label && (0, jsx_runtime_1.jsx)(react_core_1.DescriptionListTerm, { children: props.label }), (0, jsx_runtime_1.jsx)(react_core_1.DescriptionListDescription, __assign({ id: (_a = props.label) === null || _a === void 0 ? void 0 : _a.toLowerCase().split(' ').join('-') }, { children: props.children }))] }));
58
- }
59
- exports.Detail = Detail;
60
- function DetailsSkeleton() {
61
- return ((0, jsx_runtime_1.jsxs)(react_core_1.Stack, __assign({ hasGutter: true }, { children: [(0, jsx_runtime_1.jsx)(react_core_1.Skeleton, {}), (0, jsx_runtime_1.jsx)(react_core_1.Skeleton, {}), (0, jsx_runtime_1.jsx)(react_core_1.Skeleton, {}), (0, jsx_runtime_1.jsx)(react_core_1.Skeleton, {})] })));
62
- }
63
- exports.DetailsSkeleton = DetailsSkeleton;
@@ -1,9 +0,0 @@
1
- [Ansible UI Framework](Framework.md) ▸ Components
2
-
3
- # Ansible UI Components
4
-
5
- - [BulkActionDialog](components/BulkActionDialog.md)
6
- - [PageFramework](components/PageFramework.md)
7
- - [PageHeader](components/PageHeader.md)
8
- - [PageLayout](components/PageLayout.md)
9
- - [PageTable](components/PageTable.md)
package/docs/Framework.md DELETED
@@ -1,19 +0,0 @@
1
- Ansible UI Framework
2
-
3
- # Ansible UI Framework
4
-
5
- A framework for building applications using [PatternFly](https://www.patternfly.org).
6
-
7
- - [Getting Started](guides/GettingStarted.md)
8
- - [Guides](Guides.md)
9
- - [Components](Components.md)
10
-
11
- While PatternFly provides the building blocks and guidance on building applications, PatternFly does not tie together those building blocks and manage the needed state for the developer. This framework adds state management and abstractions for common patterns of application development.
12
-
13
- This framework:
14
-
15
- - does not use any state libraries other than the built in react context state management.
16
- - does not assume any specific translation libraries, but does provide a hook for internal translations.
17
- - does not assume any specific navigation libraries, but does provide a hook for internal navigation.
18
-
19
- There is an [Ansible UI Framework Demo](https://github.com/jamestalton/ansible-ui-framework-demo) repo showing an example of using the framework.
package/docs/Guides.md DELETED
@@ -1,6 +0,0 @@
1
- [Ansible UI Framework](Framework.md) ▸ Guides
2
-
3
- # Ansible UI Guides
4
-
5
- - [Getting Started](guides/GettingStarted.md)
6
- - [PageTable Guide](guides/PageTableGuide.md)
package/docs/_config.yml DELETED
@@ -1,2 +0,0 @@
1
- name: ''
2
- title: null
@@ -1,139 +0,0 @@
1
- ---
2
- ---
3
-
4
- @import '{{ site.theme }}';
5
-
6
- body {
7
- color: #ffffffcf;
8
- background-color: #101216;
9
- }
10
-
11
- .markdown-body h1 {
12
- border-bottom: 1px solid #fff3;
13
- }
14
-
15
- .markdown-body h2 {
16
- border-bottom: 1px solid #fff2;
17
- }
18
-
19
- .markdown-body .highlight {
20
- background-color: unset;
21
- }
22
-
23
- .markdown-body .highlight pre,
24
- .markdown-body pre {
25
- background-color: #08090b;
26
- border-radius: 8px;
27
- }
28
-
29
- a {
30
- color: #1fa7f8;
31
- }
32
-
33
- a:hover {
34
- color: #73bcf7;
35
- }
36
-
37
- h1 {
38
- color: #ffffff;
39
- }
40
-
41
- h2 {
42
- color: #fffffff7;
43
- }
44
-
45
- h3 {
46
- color: #ffffffef;
47
- }
48
-
49
- h4 {
50
- color: #ffffffe7;
51
- }
52
-
53
- .highlight .p {
54
- color: #888;
55
- }
56
-
57
- .highlight .nv {
58
- color: #579cd6;
59
- }
60
-
61
- .highlight .nc {
62
- color: #579cd6;
63
- font-weight: normal;
64
- }
65
-
66
- .highlight .na {
67
- color: #9ddcfe;
68
- }
69
-
70
- .highlight .nx {
71
- color: #fffd;
72
- }
73
-
74
- .highlight .k {
75
- color: #579cd6;
76
- }
77
-
78
- .highlight .kd {
79
- color: #579cd6;
80
- }
81
-
82
- .highlight .o {
83
- color: #fffb;
84
- }
85
-
86
- .highlight .s1 {
87
- color: #bb846e;
88
- }
89
-
90
- .highlight .s2 {
91
- color: #bb846e;
92
- }
93
-
94
- .highlight .s {
95
- color: #fffc;
96
- }
97
-
98
- .highlight .si {
99
- color: #888;
100
- }
101
-
102
- .highlight .err {
103
- background: unset;
104
- color: #888;
105
- }
106
-
107
- table thead {
108
- background-color: #08090b;
109
- }
110
-
111
- table tbody {
112
- background-color: #08090b;
113
- }
114
-
115
- .markdown-body table tr {
116
- background-color: unset;
117
- border: unset;
118
- }
119
-
120
- .markdown-body table tr:nth-child(2n) {
121
- background-color: unset;
122
- }
123
-
124
- .markdown-body table td {
125
- border: unset;
126
- border-top: 1px solid #fff2;
127
- }
128
-
129
- .markdown-body table th {
130
- color: #fff9;
131
- border: unset;
132
- border-bottom: 1px solid #fff4;
133
- }
134
-
135
- .markdown-body code,
136
- .markdown-body tt {
137
- color: #4ad;
138
- background-color: #fff2;
139
- }
@@ -1,30 +0,0 @@
1
- [Ansible UI Framework](../Framework.md) ▸ [Components](../Components.md) ▸ BulkActionDialog
2
-
3
- # BulkActionDialog
4
-
5
- BulkActionDialog is a generic dialog for process bulk actions.
6
- It processes the actions in parallel up to 5 concurrently.
7
- The easiest way to use the BulkActionDialog is then useBulkActionDialog hook.
8
-
9
- | Param | Type | Description |
10
- | ---------------- | ------------------- | ------------------------------------------------------------------------- |
11
- | title | `string` | The title of the model. |
12
- | items | `T[]` | The items to confirm for the bulk action. |
13
- | keyFn | `function` | A function that gets a unique key for each item. |
14
- | actionColumns | `ITableColumn<T>[]` | The columns to display when processing the actions. |
15
- | actionFn | `function` | The action function to perform on each item |
16
- | [onComplete] | `function` | Callback when all the actions are complete. Returns the successful items. |
17
- | [onClose] | `function` | Callback called when the dialog closes. |
18
- | [processingText] | `string` | The text to show for each item when the action is happening. |
19
- | [isDanger] | `boolean` | Indicates if this is a destructive operation. |
20
-
21
- ## useBulkActionDialog()
22
-
23
- useBulkActionDialog - react hook to open a BulkActionDialog
24
-
25
- **Example**
26
-
27
- ```tsx
28
- const openBulkActionDialog = useBulkActionDialog()
29
- openBulkActionDialog(...) // Pass BulkActionDialogProps
30
- ```
@@ -1,11 +0,0 @@
1
- [Ansible UI Framework](../Framework.md) ▸ [Components](../Components.md) ▸ PageFramework
2
-
3
- # PageFramework
4
-
5
- The `PageFramework` component bundles up all the context providers in the Ansible UI framework in a convienent component for framework consumers. Examples of internal context providers are translations, navigation, settings, alerts, and dialogs.
6
-
7
- **Example**
8
-
9
- ```tsx
10
- <PageFramework navigate={navigate}>...</PageFramework>
11
- ```
@@ -1,31 +0,0 @@
1
- [Ansible UI Framework](../Framework.md) ▸ [Components](../Components.md) ▸ PageHeader
2
-
3
- # PageHeader
4
-
5
- PageHeader enables the responsive layout of the header.
6
-
7
- | Param | Type | Description |
8
- | -------------- | -------------- | --------------------------------- |
9
- | breadcrumbs | `Breadcrumb[]` | The breadcrumbs for the page. |
10
- | title | `string` | The title of the page. |
11
- | titleHelpTitle | `string` | The title of help popover. |
12
- | titleHelp | `ReactNode` | The content for the help popover. |
13
- | description | `string` | The description of the page. |
14
- | controls | `ReactNode` | Support for extra page controls. |
15
- | headerActions | `ReactNode` | The actions for the page. |
16
-
17
- **Example**
18
-
19
- ```tsx
20
- <Page>
21
- <PageLayout>
22
- <PageHeader
23
- breadcrumbs={[{ label: 'Home', to: '/home' }, { label: 'Page title' }]}
24
- title='Page title'
25
- description='Page description'
26
- headerActions={<TypedActions actions={actions} />}
27
- />
28
- <PageBody />...</PageBody>
29
- </PageLayout>
30
- <Page>
31
- ```
@@ -1,18 +0,0 @@
1
- [Ansible UI Framework](../Framework.md) ▸ [Components](../Components.md) ▸ PageLayout
2
-
3
- # PageLayout
4
-
5
- The PageLayout is used as the container for the contents of the page.
6
- It enables page components to leverage full page layout and scrolling of sub content.
7
- An example is a full page table where the page header, toolbar, column headers, and pagination stay fixed, but the rows of the table can scroll.
8
-
9
- **Example**
10
-
11
- ```tsx
12
- <Page>
13
- <PageLayout>
14
- <PageHeader />
15
- ...
16
- </PageLayout>
17
- <Page>
18
- ```
@@ -1,17 +0,0 @@
1
- [Ansible UI Framework](../Framework.md) ▸ [Components](../Components.md) ▸ PageTable
2
-
3
- # PageTable
4
-
5
- The PageTable component is used for adding a table to a page.
6
- See the <a href="docs/guides/PageTableGuide.md">Table Guide</a>.
7
-
8
- **Example**
9
-
10
- ```tsx
11
- <Page>
12
- <PageLayout>
13
- <PageHeader ... />
14
- <PageTable ... />
15
- </PageLayout>
16
- </Page>
17
- ```