Changelog - 5.x.x Releases
5.7.0 (17/08/2021)
This release focuses on housekeeping as it is the last version to be using Angular 9. A lot of internal files have been removed, and components that aren’t commonly used have been moved to separate libraries.
Breaking changes
Dependency changes
Dependency |
Status |
Version |
|---|---|---|
@microsoft/signalr |
🔄 Updated |
5.0.7 |
For projects that don’t use the map component:
Dependency |
Status |
|---|---|
@agm/core |
❌ Removed |
@asymmetrik/ngx-leaflet |
❌ Removed |
leaflet |
❌ Removed |
For projects that don’t use the text-editor component:
Dependency |
Status |
|---|---|
ngx-quill |
❌ Removed |
quill |
❌ Removed |
Features
FRM-1686 - common: Custom services available for:
DataLivelyService
NotificationService
FRM-1686 -
common: Websocket connections now have anAutomaticReconnectflag.FRM-1686 -
common: Notifying users about a new notification can now be done usingNotificationService.notifyUser.FRM-1686 -
common: AddedshouldNotifyUserparameter toNotificationService.addNotification, letting you notify users about a new notification (defaulttrue).
Bug Fixes
FRM-1686 -
common: Internal subscriptions were not being unsubscribed after being used.FRM-1686 -
common: Only the first websocket notification was being showed.FRM-1686 -
navigation: Notification snackbar had low contrast on the action button.FRM-1686 -
common:DataLivelyNotificationUpdateIdInterceptorwas replacingNotificationUpdateIdheader.FRM-1737 -
grid: Error message would show up instead of the “no result” message in very specific cases.FRM-1719: User could sometimes stay logged in even after their token had expired.
FRM-1694 -
grid: “More actions” button would show up even without any actions inside.
Housekeeping
5.6.0 (11/06/2021)
This release introduces changes to accomodate for a new authentication flow. This will break local and production environments, so be careful before updating your apps.
Bug Fixes
FRM-1442 -
http: HTTP headers interceptor was being called twice.
Breaking changes
FRM-1442: Authentication flow was updated to a better and more secure version.
Fixes a problem where login was trying to use a mock access token (if it was already in
localStorage)Authentication now handles mock access tokens and deletes them automatically when needed.
Silent refresh is no longer used, a refresh token request replaces its functionality
URL hash is now being handled and automatically deleted after login process;
runInitialLoginSequencenow acceptsdisableAutoLogoutOnErrorflagThis flag will avoid logout when an login error occur
hydraGetUtcTimeUrlis no longer usedVsAuthServiceconstructor properties changed
This is a breaking change because the new authentication process conflicts with the previous one. Please use the following migration tutorial to make sure your app’s authentication will work locally and in production.
Migration Guide
Dependency |
Status |
Version |
|---|---|---|
angular-oauth2-oidc |
✅ Added |
10.0.3 |
@viasoft/angular-oauth2-oidc |
❌ Removed |
Update SDK packages to
5.6.0Replace ‘@viasoft/angular-oauth2-oidc’ with ‘angular-oauth2-oidc’
hydraGetUtcTimeUrlis no longer used, you can remove itDelete
silent-refresh.htmland remove its references fromangular.json
Updating Identity Server (locally)
This will reset your database and Docker. Save anything important before proceeding.
If you use Identity Server, please do the following steps:
Run
git pullin @viasoft/infrastructure;Run
reset-docker.ps1from @viasoft/infrastructure;Run
setup.ps1from @viasoft/infrastructure;
Updating Hydra (locally)
Run the following command in terminal:
# Please notice that this is configuring a client for the `localhost:4200` URL, which can be changed if needed
hydra clients create --endpoint "http://localhost:4445" --id portal -g "authorization_code,refresh_token" -r "code,id_token,token,id_token token" -a "openid,profile,offline_access,offline" -c "http://localhost:4200,http://localhost:4200/" --post-logout-callbacks http://localhost:4200 --token-endpoint-auth-method "none"
Edit the
ttlsection inhydra.ymland/orhydra.prod.yml:
ttl:
login_consent_request: 1h
access_token: 8760h
id_token: 8760h
refresh_token: -1
auth_code: 8760h
Edit
globalconfig.jsonin theKorp.Legacy.Authenticationservice like so:
Before
// ...
"ViasoftLegacyAuthenticationHydra": {
"HydraAllowedScopes": "[\"openid\", \"profile\", \"offline\"]"
},
// ...
After
// ...
"ViasoftLegacyAuthenticationHydra": {
"HydraAllowedScopes": "[\"openid\", \"profile\", \"offline\", \"offline_access\"]"
},
// ...
Restart Hydra
Restart
Korp.Legacy.Authentication
5.5.1 (07/06/2021)
Bug Fixes
FRM-1697 -
grid: New Chromium version caused grid rows to expand to fill the available vertical space.
5.5.0 (01/06/2021)
Breaking changes
FRM-1574 -
grid,tree-table: ThepersistentCacheoption now defaults tofalse.
Features
FRM-1454 -
button: Added icon options to buttons withmodel="icon".You can now use the
iconStyle,iconColorandiconBoxColorproperties invs-buttonelements.
FRM-1504 -
grid: Added icon options to grid actions.You can now use the
iconStyle,iconColorandiconBoxColorproperties inVsGridActionobjects.
FRM-1537 -
i18n: TheTranslateService.instantmethod now works with pipe parameters.FRM-1588 -
grid: Added an error message and reload button that are shown automatically when a get request fails.FRM-1599 -
filter: MongoDB queries are now case-insensitive. This applies toautocomplete,gridandtree-table, as well as anyone using thegetMongoFromJQueryfunction.
Bug Fixes
FRM-1562 -
navigation: User profile picture was being “squeezed”.FRM-1607 -
select-modal-legacy: Styles fromselect-modalcould override styles fromselect-modal-legacy, causing the grid to have 0 height.FRM-1603 -
http: Environments with accent marks could cause requests to fail.EnvironmentNameandAppNamerequest headers were removed since they’re unused and could cause these issues.For identifying environments, the
EnvironmentIdheader should be used instead.
Housekeeping
FRM-1563: Removed all internal usages of SerialSubscriptions and SerialUnsubscriber.
FRM-1272: Organized and cleaned up all internal imports.
FRM-1661: Grid now uses VsSubscriptionManager, fixing a huge performance issue which caused that subscriptions wasn’t removed until the ngOnDestroy of vs-grid component.
5.4.2 (07/06/2021)
Bug Fixes
FRM-1697 -
grid: New Chromium version caused grid rows to expand to fill the available vertical space.
5.4.1 (16/02/2021)
Breaking Changes
FRM-1560 -
data-lively: Theidentifierproperty inDataLivelyUpdatehas been reverted back touniqueTypeName.
Bug Fixes
FRM-1557 -
search-input: Icons were being stacked vertically instead of horizontally.
5.4.0 (08/02/2021)
Summary
This release brings more QOL improvements and long overdue features and bug fixes. The Dashboard package is no longer included in the core SDK repository and will no longer have its updates listed on this changelog moving forward.
Breaking changes
FRM-1514 -
dashboard: Removed the Dashboard package from the core SDK repository.It will continue to be distributed under the
@viasoft/dashboardpackage on ProGet, but will no longer follow the same update schedule as other core SDK packages. The first version published will be5.5.0.
FRM-1445 -
app-core,message-dialog:VsAppCoreModulenow importsVsMessageDialogModuleautomatically.VsMessageDialogModulenow prevents itself from being initialized more than once, but you should still remove any others imports you might have in your app.You should also be using
VsAppCoreModule.forRoot()instead ofVsCommonModule.forRoot(), as it is now stable and can be safely used.
FRM-1444 -
data-lively: Refactored VsDataLivelyService to useSubject.Instead of using
subscribeToUpdateand callbacks, you should now use thegetmethod, which returns aSubject.If the
Subjectdoesn’t exist, it will be created automatically.The
uniqueTypeNameproperty inDataLivelyUpdatehas been renamed toidentifier.
Features
FRM-1520 -
http,common,error-monitoring: Added support for Organization Units and Environments.Environment data can be retrieved from
VsJwtProviderServiceand will automatically be sent in request headers and Sentry tags.
FRM-1534 -
navigation: Added option to disable page reloading when the selected company changes.You can toggle this by providing the
DISABLE_RELOAD_ON_COMPANY_CHANGEinjection token.
FRM-1410 -
button: Now emits an Event object in theclickEventoutput.FRM-1443 -
common: AddedVsSubscriptionManagerhelper class.Deprecated
SerialSubscriptionsclass andSerialUnsubscriberfunction.Use
VsSubscriptionManager.add()to add a new subscription. If a subscription with the same name already exists and is open, it will be replaced by a new one.Inside
ngOnDestroy, always callVsSubscriptionManager.clear().
FRM-1450 -
client: Added support for selective generation.You’re now able to pick which parts of your API you’d like to generate.
FRM-1455 -
button: Button will now switch tomodel="icon"automatically if theiconattribute is set.FRM-1507 -
form: Adjusted styles forvs-checkbox,vs-search,vs-buttonandvs-selectcomponents.You can also use the
form-align-left,form-align-center,form-align-rightandform-full-widthattributes on avs-buttonto change its alignment or sizing.
Changes
FRM-1512 -
filter: Filter overlay will now close on scroll.
Bug Fixes
FRM-1424 -
grid: Disabling actions column would break card mode.FRM-1419 -
grid: Pagination would be incorrect after applying a filter in some cases.FRM-1446 -
grid: Progress bar column had incorrect filter settings by default.FRM-1380 -
filter: Date filter wouldn’t be restored correctly after being cached.FRM-1475 -
search-input: “Search” and “clear” buttons were sized incorrectly.FRM-1511 -
client: An incorrect summary would sometimes display before the API was actually generated.FRM-1540 -
grid: Paginator dropdown wouldn’t show up on mobile.
5.3.0 (23/12/2020)
Summary
This release adds the Quick Filter functionality, more navigation customization options, swapping core SDK services functionality, as well as small QOL changes and bug fixes.
Breaking changes
Features
FRM-102 -
grid: Added Quick Filters to grid.FRM-1433, FRM-1437 -
http: Error dialog will now be shown when certain HTTP errors happen andVS_UI_ERROR_SETTINGScan be used to configure this behavior.FRM-1435 -
grid: Addedelastic-searchandelastic-search-scoredfilter types.FRM-1463 -
dashboard: AddedonTabSelectedevent, which fires when a tab is selected.FRM-1457 -
navigation: AddednavConfigproperty toVsCommonModuleandVsAppCoreModuleforRoot, allowing for customization of the navigation top bar.FRM-1468, FRM-1459 -
common: AddedcustomServicesproperty which allows swapping out core SDK services for custom ones.FRM-1462, FRM-1477 -
http: AddedVsHttpModule.forRootwhich allows for custom services, in order to support Hydra logins.
Changes
Bug Fixes
5.2.0 (28/08/2020)
This release focuses mainly on bug fixes and small QOL changes.
Dependency updates
dependencies
Dependency |
Status |
Version |
|---|---|---|
@fortawesome/fontawesome-pro |
🔄 Updated |
|
FRM-931: FontAwesome updated to
5.14.
Changes
FRM-1377: Removed deprecated date formats and added Angular Date Pipe compatible formats.
Bug Fixes
FRM-737 -
notification: Notification snackbar wasn’t properly translated.FRM-794 -
button:colorproperty wasn’t working properly.FRM-816 -
tab-group: Tab label wouldn’t show a title if a plain string was used.FRM-850 -
grid: Paginator dropdown would open to the bottom when grid was less than650pxtall, causing an overflow.FRM-1003 -
autocomplete: Removing a chip wouldn’t mark as dirty.FRM-1038 -
grid: Translations in card mode weren’t working.FRM-1154 -
navigation: Expanding a group would navigate to the home page.FRM-1214 -
client: Paths with a space would stop the client from being generated properly.FRM-1342 -
tree-table: Horizontal scroll bar would appear if a tag column was placed on the last position.FRM-1344 -
navigation: Current page indicator would go away when hovering.FRM-1378 -
grid: Grid wouldn’t load after applying a filter and reloading when cache was turned on.
5.1.0 (21/08/2020)
This release brings Sentry error monitoring to all apps. More information can be found here.
Breaking changes
FRM-1099: Environment property
testrenamed tomock. We suggest you also update your project so thatenvironment.test.tsbecomesenvironment.mock.tsand--configuration=testbecomes--configuration=mock.
Dependency updates
dependencies
Dependency |
Status |
Version |
|---|---|---|
@sentry/browser |
✅ Added |
|
Features
FRM-1360 -
error-monitoring: Implemented error monitoring using Sentry.FRM-1368 -
view-template: Actions area will now correctly apply styles to avs-buttoninside another component.If you have more than one level of nesting, you might need to use the
.vs-header-actionclass.You can also disable this behaviour using the
.disable-action-styleclass.
FRM-1372, FRM-1365 -
grid: You can now align a grid column’s title and contents to the left, right or center.FRM-375 -
grid: Added option to not fetch any data until the user requests it.FRM-379 -
grid: Added option to show total count.FRM-479 -
grid: Added options to disable column resizing and/or column reordering.FRM-1300, FRM-1301 -
grid,tree-table: Added option to discard cached state when columns have changed.
Changes
FRM-1372 -
grid,tree-table: Checkbox/boolean columns are now center-aligned.
Bug Fixes
FRM-1366 -
filter: Date filter couldn’t be cleared.FRM-796 -
spinner: Overflow would create scrollbars when spinning.FRM-861 -
grid: “See more/less” button would select the item when in card (mobile) mode.FRM-501 -
grid: Actions column would disappear after toggling*ngIf.FRM-988 -
grid: Checkbox would set its value tonullafter toggling.
5.0.1 (13/08/2020)
Breaking changes
dependencies
Dependency |
Status |
Version |
|---|---|---|
@asymmetrik/ngx-leaflet |
🔄 Updated |
|
leaflet |
🔄 Updated |
|
If you’re still experiencing issues when running ngcc, delete your package-lock.json file and try again.
Bug Fixes
components > map
FRM-1369: Fixed error when running
ngcc.
5.0.0 (10/08/2020)
This update brings SDK Frontend to Angular version 9. It is crucial that you follow these steps in this exact order when updating your apps and libraries.
Update guide
Sync your dependencies
Update, remove or add the following dependencies to your package.json file:
dependencies
Dependency |
Status |
Version |
|---|---|---|
hammerjs |
❌ Removed |
|
ngx-currency |
❌ Removed |
|
ngx-mask |
❌ Removed |
|
angular2-query-builder |
🔄 Updated |
|
@viasoft/app-core |
🔄 Updated |
|
@viasoft/client |
🔄 Updated |
|
@viasoft/client-core |
🔄 Updated |
|
@viasoft/common |
🔄 Updated |
|
@viasoft/components |
🔄 Updated |
|
@viasoft/dashboard |
🔄 Updated |
|
@viasoft/http |
🔄 Updated |
|
@viasoft/navigation |
🔄 Updated |
|
@viasoft/theme |
🔄 Updated |
|
@viasoft/view-template |
🔄 Updated |
|
primeng |
🔄 Updated |
|
primeicons |
🔄 Updated |
|
single-spa-angular |
🔄 Updated |
|
single-spa |
✅ Added |
|
devDependencies
Dependency |
Status |
Version |
|---|---|---|
tsickle |
🔄 Updated |
|
Note: ``tsickle`` might be present in your ``dependencies`` instead of ``devDependencies``. If that’s the case, please move it.
Install dependencies
Delete your dist and node_modules folder(s), then, run npm i. Commit your changes, along with package.json.
Run Angular migrations
Run the following command:
ng update @angular/core@9 @angular/cli@9 @angular/material@9 -C
Note: the ``-C`` flag will automatically commit each step of the migration for you. We highly recommend using it.
If you encounter any issues during this step and/or want more information about the migration, visit the Angular Update Guide website.
Fix your code
There are a couple things that need to be fixed manually.
main.ts
The following line can be removed from this file:
import 'hammerjs';
main.single-spa.ts
Besides removing hammerjs, you must also replace the following import:
// Old
import singleSpaAngular, { getSingleSpaExtraProviders } from 'single-spa-angular';
// New
import { singleSpaAngular, getSingleSpaExtraProviders } from 'single-spa-angular';
And perform the following change:
const lifecycles = singleSpaAngular({
bootstrapFunction: singleSpaProps => {
singleSpaPropsSubject.next(singleSpaProps);
return initAppSettings(environment, true)
.then(() => {
return platformBrowserDynamic(getSingleSpaExtraProviders()) // Make sure getSingleSpaExtraProviders() is here
.bootstrapModule(AppModule)
.catch(err => console.error(err)); // Remove this line
.catch(err => { throw err }); // And add this one
});
},
// ...
});
tsconfig.app.json
Add "main.single-spa.ts" to the include section:
{
// ...
"include": [
// ...
"main.single-spa.ts"
]
}
Add the postinstall script
In your package.json file, add the following to your scripts:
{
// ...
"scripts": {
// ...
"postinstall": "ngcc"
}
}
This will run the Angular Compatibility Compiler right after installing any packages, which is required in Angular 9 for Ivy apps (default). You may be tempted to remove this script, but it will run before serving your application if you do. We highly recommend keeping it to avoid any issues and speed up serve time.
Add the --prod flag to your library builds
If you have any Angular Libraries in your repository, you’ll need to add the --prod flag to their build. This will disable Ivy which is required for libraries. Libraries build without this flag will not cause any errors during normal usage but npm will not allow you to publish them.
In case you had any issues during the migration and the --prod flag does not work, you can add a tsconfig.lib.prod.json file to the root of your library with the following content:
{
"extends": "./tsconfig.lib.json",
"angularCompilerOptions": {
"enableIvy": false
}
}
About AOT and Ivy
We highly recommend keeping Ivy and AOT turned on for your apps and libraries. AOT in Angular 9 does not have any impact on performance (it might be even faster) and it helps figure out any errors you might have and avoid surprises during your builds. Further information about AOT and Ivy can be found in the Angular Documentation.
Known issues
You might notice errors about angular2-query-builder when running ngcc. If you’re running version ^0.6.2, you can safely ignore these arrors as they won’t affect anything.