@ansible/ansible-ui-framework 0.0.302 → 0.0.304

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -1,84 +1,5 @@
1
- [`Ansible UI Framework`](https://github.com/ansible/ansible-ui/blob/main/framework/README.md) ▸ [PageTable](https://github.com/ansible/ansible-ui/blob/main/framework/docs/PageTable.md#PageTable)
2
-
3
1
  # Ansible UI Framework
4
2
 
5
- [NPM Package: @ansible/ansible-ui-framework](https://www.npmjs.com/package/@ansible/ansible-ui-framework)
6
-
7
- A framework for building responsive web applications using [PatternFly](https://www.patternfly.org).
8
-
9
- Developed by the Ansible UI developers.
10
-
11
- While PatternFly provides the building blocks and guidance on building applications, PatternFly does not manage state for the developer. This framework adds state management and abstractions for common patterns of application development.
12
-
13
- The 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.
20
-
21
- ## Getting Started
22
-
23
- ### Install the [NPM package](https://www.npmjs.com/package/@ansible/ansible-ui-framework)
24
-
25
- ```
26
- npm install @ansible/ansible-ui-framework
27
- ```
28
-
29
- ### Add the [PageFramework](https://github.com/ansible/ansible-ui/blob/main/framework/docs/PageFramework.md#PageFramework) to your application
30
-
31
- Near the top of your application add the [PageFramework](https://github.com/ansible/ansible-ui/blob/main/framework/docs/PageFramework.md#PageFramework) component. This component adds the state management needed by the framework components.
32
-
33
- ## Use the framework in your application pages
34
-
35
- ### Use PageLayout to control the layout in your pages
36
-
37
- The [PageLayout](https://github.com/ansible/ansible-ui/blob/main/framework/docs/PageLayout.md#pagelayout) is used as the container for the contents of the page. It enables page components to leverage full page layout and scrolling of sub content. An example is a full page table that the page header, toolbar, column headers, and pagination stay fixed, but the rows of the table can scroll.
38
-
39
- ```tsx
40
- <Page>
41
- <PageLayout>...</PageLayout>
42
- </Page>
43
- ```
44
-
45
- ### Use PageHeader for the heading of your pages
46
-
47
- The [PageHeader](https://github.com/ansible/ansible-ui/blob/main/framework/docs/PageHeader.md#pageheader) is used at the top of each page. It provides a consistent layout of header elements.
48
-
49
- ```tsx
50
- <Page>
51
- <PageLayout>
52
- <PageHeader ... />
53
- ...
54
- </PageLayout>
55
- </Page>
56
- ```
57
-
58
- ### Add content to the page
59
-
60
- #### Table Pages
61
-
62
- For pages containing a table, use the [PageTable](https://github.com/ansible/ansible-ui/blob/main/framework/docs/PageTable.md#pagetable) component.
63
-
64
- ```tsx
65
- <Page>
66
- <PageLayout>
67
- <PageHeader ... />
68
- <PageTable ... />
69
- </PageLayout>
70
- </Page>
71
- ```
72
-
73
- #### Form Pages
74
-
75
- For pages containing an input form, use the [PageForm](https://github.com/ansible/ansible-ui/blob/main/framework/docs/PageForm.md#pageform) component.
3
+ A framework for building applications using [PatternFly](https://www.patternfly.org), developed by the Ansible UI developers.
76
4
 
77
- ```tsx
78
- <Page>
79
- <PageLayout>
80
- <PageHeader ... />
81
- <PageForm ... />
82
- </PageLayout>
83
- </Page>
84
- ```
5
+ [Documentation](https://github.com/ansible/ansible-ui/blob/main/framework/docs/Framework.md#ansible-ui-framework)
@@ -51,6 +51,9 @@ export type PageTableProps<T extends object> = {
51
51
  disableBodyPadding?: boolean;
52
52
  defaultCardSubtitle?: ReactNode;
53
53
  };
54
+ /**
55
+ * PageTable
56
+ */
54
57
  export declare function PageTable<T extends object>(props: PageTableProps<T>): JSX.Element;
55
58
  type CellFn<T extends object> = (item: T) => ReactNode;
56
59
  export interface ITableColumn<T extends object> {
package/cjs/PageTable.js CHANGED
@@ -54,6 +54,9 @@ function TablePage(props) {
54
54
  return ((0, jsx_runtime_1.jsxs)(PageLayout_1.PageLayout, { children: [(0, jsx_runtime_1.jsx)(PageHeader_1.PageHeader, __assign({}, props)), (0, jsx_runtime_1.jsx)(PageTable, __assign({}, props))] }));
55
55
  }
56
56
  exports.TablePage = TablePage;
57
+ /**
58
+ * PageTable
59
+ */
57
60
  function PageTable(props) {
58
61
  var _a;
59
62
  var disableBodyPadding = props.disableBodyPadding;
@@ -1,4 +1,4 @@
1
- [Ansible UI Framework](https://github.com/ansible/ansible-ui/blob/main/framework/README.md#ansible-ui-framework) ▸ [Components](https://github.com/ansible/ansible-ui/blob/main/framework/docs/components.md#Ansible-UI-Components) ▸ BulkActionDialog
1
+ [Ansible UI Framework](Framework.md#ansible-ui-framework) ▸ [Components](Components.md#ansible-ui-components) ▸ BulkActionDialog
2
2
 
3
3
  # BulkActionDialog
4
4
 
@@ -1,8 +1,9 @@
1
- [Ansible UI Framework](https://github.com/ansible/ansible-ui/blob/main/framework/README.md#ansible-ui-framework) ▸ Components
1
+ [Ansible UI Framework](Framework.md#ansible-ui-framework) ▸ Components
2
2
 
3
3
  # Ansible UI Components
4
4
 
5
- - [BulkActionDialog](https://github.com/ansible/ansible-ui/blob/main/framework/docs/BulkActionDialog.md#BulkActionDialog)
6
- - [PageFramework](https://github.com/ansible/ansible-ui/blob/main/framework/docs/PageFramework.md#PageFramework)
7
- - [PageHeader](https://github.com/ansible/ansible-ui/blob/main/framework/docs/PageHeader.md#PageHeader)
8
- - [PageLayout](https://github.com/ansible/ansible-ui/blob/main/framework/docs/PageLayout.md#PageLayout)
5
+ - [BulkActionDialog](BulkActionDialog.md#BulkActionDialog)
6
+ - [PageFramework](PageFramework.md#PageFramework)
7
+ - [PageHeader](PageHeader.md#PageHeader)
8
+ - [PageLayout](PageLayout.md#PageLayout)
9
+ - [PageTable](PageTable.md#PageTable)
package/docs/Framework.md CHANGED
@@ -1,99 +1,19 @@
1
- [`Ansible UI Framework`](https://github.com/ansible/ansible-ui/blob/main/framework/README.md) ▸ [PageTable](https://github.com/ansible/ansible-ui/blob/main/framework/docs/PageTable.md#PageTable)
1
+ Ansible UI Framework
2
2
 
3
3
  # Ansible UI Framework
4
4
 
5
- A framework for creating performant, consistent, and responsive web applications using [PatternFly](https://www.patternfly.org).
5
+ A framework for building applications using [PatternFly](https://www.patternfly.org).
6
+
7
+ - [Getting Started](GettingStarted.md#getting-started)
8
+ - [Guides](Guides.md#ansible-ui-guides)
9
+ - [Components](Components.md#ansible-ui-components)
6
10
 
7
11
  The framework is made up of high level components using PatternFly components underneath.
8
12
  This allows the framework to adjust the web application for responsive layout.
9
- Basic structure of the framework can be seen in the tree below.
10
-
11
- - [PageLayout](#pagelayout)
12
- - [PageHeader](#pageheader)
13
- - [PageBody](#pagebody)
14
- - [PageTable](#pagetable)
15
- - [PageTabs](#pagetabs)
16
- - [PageForm](#pageform)
17
-
18
- ## PageLayout
19
-
20
- The PageLayout is used at the start of each page. It provides a consistent layout of header elements. It supports responsive layout based on the size of the window.
21
-
22
- ```tsx
23
- (
24
- <Page>
25
- <PageLayout>
26
- <PageHeader {...}/>
27
- <PageBody> ... </PageBody>
28
- </PageLayout>
29
- </Page>
30
- )
31
- ```
32
-
33
- ### PageHeader
34
-
35
- The PageHeader is used at the start of each page. It provides a consistent layout of header elements. It supports responsive layout based on the size of the window.
36
-
37
- ```tsx
38
- <Page>
39
- <PageHeader
40
- breadcrumbs={breadcrumbs}
41
- title="Page title"
42
- titleHelp="Page title popover description."
43
- description="Page description"
44
- headerActions={actions}
45
- />
46
- </Page>
47
- ```
48
-
49
- | Property | Description |
50
- | -------------: | -------------------------------------------------------------------------- |
51
- | breadcrumbs | The breadcrumbs for the page. |
52
- | title | The title of the page. |
53
- | titleHelp | The help for the title popover. |
54
- | titleHelpTitle | The title of help popover. |
55
- | description | The description of the page. |
56
- | actions | The actions for the page. Actions are used on details pages. |
57
- | controls | Support for extra page controls that show up at the top right of the page. |
58
-
59
- ### PageBody
60
-
61
- The page table handles the responsive layout of the body section of the page.
62
-
63
- #### PageTable
64
-
65
- The page table handles the logic for tables on a page.
66
-
67
- ```tsx
68
- <PageTable<User>
69
- toolbarFilters={toolbarFilters}
70
- toolbarActions={toolbarActions}
71
- tableColumns={tableColumns}
72
- rowActions={rowActions}
73
- {...view}
74
- />
75
- ```
76
-
77
- #### PageTabs
78
-
79
- The page tabs are used for details pages in the application.
80
-
81
- ```tsx
82
- (
83
- <Page>
84
- <PageHeader ... />
85
- <PageTabs >
86
- <PageTab title="Tab title" >
87
- ...
88
- </PageTab>
89
- <PageTab title="Tab title" >
90
- ...
91
- </PageTab>
92
- </PageTabs>
93
- </Page>
94
- )
95
- ```
96
13
 
97
- #### PageForm
14
+ The framework:
98
15
 
99
- The page form handles form input on a page. It uses [react-hook-form](https://react-hook-form.com/) for performance.
16
+ - does not use any state libraries other than the built in react context state management.
17
+ - does not assume any specific translation libraries, but does provide a hook for internal translations.
18
+ - does not assume any specific navigation libraries, but does provide a hook for internal navigation.
19
+ There is an [Ansible UI Framework Demo](https://github.com/jamestalton/ansible-ui-framework-demo) repo showing an example of using the framework.
@@ -0,0 +1,79 @@
1
+ [Ansible UI Framework](Framework.md#ansible-ui-framework) ▸ [Guides](Guides.md#ansible-ui-guides) ▸ Getting Started
2
+
3
+ # Getting Started
4
+
5
+ While PatternFly provides the building blocks and guidance on building applications, PatternFly does not manage state for the developer. This framework adds state management and abstractions for common patterns of application development.
6
+
7
+ There is an [Ansible UI Framework Demo](https://github.com/jamestalton/ansible-ui-framework-demo) repo showing an example of using the framework.
8
+
9
+ ## Install the NPM package
10
+
11
+ [NPM Package: @ansible/ansible-ui-framework](https://www.npmjs.com/package/@ansible/ansible-ui-framework)
12
+
13
+ ```
14
+ npm install @ansible/ansible-ui-framework
15
+ ```
16
+
17
+ ## Add the [PageFramework](PageFramework.md#pageframework) to your application
18
+
19
+ Near the top of your application add the [PageFramework](https://github.com/ansible/ansible-ui/blob/main/framework/docs/PageFramework.md#PageFramework) component.
20
+
21
+ This component adds the state management needed by the framework.
22
+
23
+ ## Use the framework in your application pages
24
+
25
+ ### Use PageLayout to control the layout in your pages
26
+
27
+ The [PageLayout](https://github.com/ansible/ansible-ui/blob/main/framework/docs/PageLayout.md#pagelayout) is used as the container for the contents of the page. It enables page components to leverage full page layout and scrolling of sub content. An example is a full page table that the page header, toolbar, column headers, and pagination stay fixed, but the rows of the table can scroll.
28
+
29
+ ```tsx
30
+ <Page>
31
+ <PageLayout>
32
+ <PageHeader ... />
33
+ ...
34
+ </PageLayout>
35
+ </Page>
36
+ ```
37
+
38
+ ### Use PageHeader for the heading of your pages
39
+
40
+ The [PageHeader](https://github.com/ansible/ansible-ui/blob/main/framework/docs/PageHeader.md#pageheader) is used at the top of each page. It provides a consistent layout of header elements.
41
+
42
+ ```tsx
43
+ <Page>
44
+ <PageLayout>
45
+ <PageHeader ... />
46
+ ...
47
+ </PageLayout>
48
+ </Page>
49
+ ```
50
+
51
+ ### Add content to the page
52
+
53
+ #### Table Pages
54
+
55
+ For pages containing a table, use the [PageTable](https://github.com/ansible/ansible-ui/blob/main/framework/docs/PageTable.md#pagetable) component.
56
+
57
+ ```tsx
58
+ <Page>
59
+ <PageLayout>
60
+ <PageHeader ... />
61
+ <PageTable ... />
62
+ </PageLayout>
63
+ </Page>
64
+ ```
65
+
66
+ #### Form Pages
67
+
68
+ For pages containing an input form, use the [PageForm](https://github.com/ansible/ansible-ui/blob/main/framework/docs/PageForm.md#pageform) component.
69
+
70
+ ```tsx
71
+ <Page>
72
+ <PageLayout>
73
+ <PageHeader ... />
74
+ <PageForm ... />
75
+ </PageLayout>
76
+ </Page>
77
+ ```
78
+
79
+ ## Next Steps
package/docs/Guides.md ADDED
@@ -0,0 +1,7 @@
1
+ [Ansible UI Framework](Framework.md#ansible-ui-framework) ▸ Guides
2
+
3
+ # Ansible UI Guides
4
+
5
+ - [Getting Started](GettingStarted.md#getting-started)
6
+ - [PageLayout](PageLayout.md#pagelayout)
7
+ - [PageTable Guide](PageTableGuide.md#pagetable-guide)
@@ -1,4 +1,4 @@
1
- [Ansible UI Framework](https://github.com/ansible/ansible-ui/blob/main/framework/README.md#ansible-ui-framework) ▸ [Components](https://github.com/ansible/ansible-ui/blob/main/framework/docs/components.md#Ansible-UI-Components) ▸ PageFramework
1
+ [Ansible UI Framework](Framework.md#ansible-ui-framework) ▸ [Components](Components.md#ansible-ui-components) ▸ PageFramework
2
2
 
3
3
  # PageFramework
4
4
 
@@ -1,4 +1,4 @@
1
- [Ansible UI Framework](https://github.com/ansible/ansible-ui/blob/main/framework/README.md#ansible-ui-framework) ▸ [Components](https://github.com/ansible/ansible-ui/blob/main/framework/docs/components.md#Ansible-UI-Components) ▸ PageHeader
1
+ [Ansible UI Framework](Framework.md#ansible-ui-framework) ▸ [Components](Components.md#ansible-ui-components) ▸ PageHeader
2
2
 
3
3
  # PageHeader
4
4
 
@@ -1,4 +1,4 @@
1
- [Ansible UI Framework](https://github.com/ansible/ansible-ui/blob/main/framework/README.md#ansible-ui-framework) ▸ [Components](https://github.com/ansible/ansible-ui/blob/main/framework/docs/components.md#Ansible-UI-Components) ▸ PageLayout
1
+ [Ansible UI Framework](Framework.md#ansible-ui-framework) ▸ [Components](Components.md#ansible-ui-components) ▸ PageLayout
2
2
 
3
3
  # PageLayout
4
4
 
@@ -0,0 +1,5 @@
1
+ [Ansible UI Framework](Framework.md#ansible-ui-framework) ▸ [Components](Components.md#ansible-ui-components) ▸ PageTable
2
+
3
+ # PageTable
4
+
5
+ PageTable
@@ -1,36 +1,6 @@
1
- # Table Guide
2
-
3
- - [Typescript Interface](#typescript-interface)
4
- - [Page layout](#page-layout)
5
- - [View](#view)
6
- - [Table Columns](#table-columns)
7
- - [Page Table](#page-table)
8
- - [Toolbar Filters](#toolbar-filters)
9
- - [Toolbar Actions](#toolbar-actions)
10
- - [Row Actions](#row-actions)
11
-
12
- ## Typescript Interface
13
-
14
- ```ts
15
- export interface IPerson {
16
- name: string
17
- }
18
- ```
19
-
20
- ## Page layout
21
-
22
- The page layout enables the layout to be responsive - responding to different page sizes and adjusting padding and borders.
1
+ [Ansible UI Framework](Framework.md#ansible-ui-framework) [Guides](Guides.md#ansible-ui-guides) ▸ PageTable
23
2
 
24
- ```tsx
25
- export function Persons() {
26
- return (
27
- <PageLayout>
28
- <PageHeader title="Persons" />
29
- <PageBody>Table will go here</PageBody>
30
- </PageLayout>
31
- )
32
- }
33
- ```
3
+ # PageTable Guide
34
4
 
35
5
  ## View
36
6
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ansible/ansible-ui-framework",
3
- "description": "Framework for building consistent responsive web applications using PatternFly.",
4
- "version": "0.0.302",
3
+ "description": "A framework for building applications using PatternFly.",
4
+ "version": "0.0.304",
5
5
  "author": "Red Hat",
6
6
  "license": "MIT",
7
7
  "repository": {