Library with common UI components to speed up your Angular developments. You can take a look to the components in our showcase at https://systelab.github.io/components.
Please, read the documentation at https://github.com/systelab/systelab-components/tree/master/projects/systelab-components
In order to clone the repository and test the library use the following commands:
git clone https://github.com/systelab/systelab-components.git
cd systelab-components
npm ci
npm run build-lib
ng serve
This will bootstrap a showcase application to test the different components.
Use watch in the library build to detect file changes automatically (except from css). Start application in a different terminal:
Terminal 1
ng build systelab-components --watch
Terminal 2
ng serve
ng test
For E2E testing purposes, the strategy chosen is Snapshot Testing.
Snapshot tests are a very useful tool whenever you want to make sure your UI does not change unexpectedly.
A typical snapshot test case for a mobile app renders a UI component, takes a screenshot, then compares it to a reference image stored alongside the test. The test will fail if the two images do not match: either the change is unexpected, or the screenshot needs to be updated to the new version of the UI component.
In order to run the test, run the command:
ng e2e
If you want to update the snapshots, run the command:
npm run update-snapshots
In order to publish the library, an authorized npm user is required. Once set, update the version in the package.json, and run the npm publish script:
npm run build-lib
cd dist/systelab-components
npm publish
Tree component migrated to use Angular CDK Tree
import { TreeNode } from 'primeng/api';
for
import { TreeNode } from 'systelab-components';
The following steps should be considered when upgrade to systelab-components 14.x.x
IE11 support has been deprecated due to the upgrade to Angular 12
Use of Ivy, applications that uses this library have to use Angular 12 and Ivy rendering.
Added --noImplicitOverride flag to allow override methods and get error for unintentionally overrides https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-3.html#override-and-the---noimplicitoverride-flag
The following steps should be considered when migrating from Angular 10 to 11
Support for IE9, IE10, and IE mobile has been removed. This was announced in the v10 update.
Run this command to update the browsers npx browserslist@latest --update-db
PrimeIcons should be upgraded to 4.1.0 as components like table utilize new icons in the library
locale property functionality of Datepicker is removed in favor of the new global i18n API. The datepicker components inject PrimeNGConfig
Many changes where introduce in version 10 in order to standardize the library and support Angular 9. The following steps should be considered when migrating from version 9.
- SystelabComponentsModule.forRoot\(\)
- SystelabComponentsModule
- from 'systelab-components/lib.+
- from 'systelab-components';
DialogService and MessagePopupServices are provided in root, so there is no need to provide them in any module. The option here is with WebStorm manually search for any of those services and remove them.
entryComponents for Modals or Cell renderers will no longer be needed and could be a problem for future Angular versions. In WebStorm, try to replace in path with the following regular expression (second parameter is nothing):
- ,\n?entryComponents: [^\]]*
- (blank)
Finally, update your package.json in order to add the peer dependencies:
"ag-grid-angular": "^28.2.0",
"ag-grid-community": "^28.2.0",
"angular-split": "^4.0.0",
"bootstrap": "^4.5.2",
"date-fns": "^2.15.0",
"jquery": "^3.5.1",
"mobile-drag-drop": "^2.3.0-rc.2",
"popper.js": "^1.16.1",
"primeicons": "^6.0.1",
"primeng": "^14.1.2",
"systelab-preferences": "^14.0.1",
"systelab-translate": "^14.0.6",
"pako": "^1.0.6",
"@ngx-translate/core": "^13.0.0",
"@ngx-translate/http-loader": "^6.0.0",