This repository consists of two projects:
cps-ui-kit- shared components library itselfcomposition- application for previewing compositions of components consumed from the library
- Autocomplete
- Button
- Button toggles
- Checkbox
- Chip
- Datepicker
- Dialog
- Divider
- Expansion panel
- File upload
- Icon
- Info circle
- Input
- Loader
- Menu
- Notifications
- Paginator
- Progress circular (indeterminate)
- Progress linear (indeterminate)
- Radio
- Scheduler
- Select
- Sidebar menu
- Switch
- Table
- Tabs
- Tag
- Textarea
- Timepicker
- Tooltip directive
- Tree autocomplete
- Tree select
- Tree table
Run ng build cps-ui-kit --watch and ng serve for a dev server. Navigate to http://localhost:4200/. The application will automatically reload if you change any of the source files.
- go to
projects/cps-ui-kit/src/lib/componentsdirectory - run:
ng g c cps-componentname --standalone --prefix - modify
projects/cps-ui-kit/src/public-api.tsto export the component from the library - update available components list in
projects/cps-ui-kit/README.md(keep alphabetical order!)
Make sure ng build cps-ui-kit --watch is running, so the library will be rebuilt on each change of its contents due to --watch flag
- go to
projects/composition/src/app/pagesdirectory - run:
ng g c componentname-page --standalone - there is no need to test composition pages, so manually delete
componentname-page.component.cy.tsfile (can't be done automatically with Angular CLI flag, since cypress is used) - provide
host: { class: 'composition-page' }into page@Component - import the components for the composition page from
cps-ui-kit, provide them to imports array of@Component - include
ComponentDocsViewerComponentinto@Componentimportsarray in case of a new component page, includeServiceDocsViewerComponentinto@Componentimportsarray in case of a new service page - import
ComponentData or ServiceDatafrom '../../api-data/cps-componentname.json' once it is generated - wrap page html template contents into
<app-component-docs-viewer [componentData]="componentData">...</app-component-docs-viewer>in case of a new component page, wrap page html template contents into<app-service-docs-viewer [serviceData]="serviceData">...</app-service-docs-viewer>in case of a new service page - go to
projects/composition/src/app/components/navigation-sidebar.component.tsfile and extend_componentsarray (keep alphabetical order!) - go to
projects/composition/src/app/app-routing.module.tsand add a new route for a new page - update available components list in
/README.md(keep alphabetical order!)
Execute npm run generate-json-api to generate documentation for any changes in the components' API.