From ecb930dda264a26495e87d1bbfa748d0f9ba8241 Mon Sep 17 00:00:00 2001 From: Arman Ozak Date: Mon, 23 Mar 2020 17:35:18 +0300 Subject: [PATCH 01/12] build(npm): add ts-toolbelt to devDependencies --- npm/ng-packs/package.json | 1 + npm/ng-packs/yarn.lock | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/npm/ng-packs/package.json b/npm/ng-packs/package.json index c3e26038f0..37621afb49 100644 --- a/npm/ng-packs/package.json +++ b/npm/ng-packs/package.json @@ -83,6 +83,7 @@ "snq": "^1.0.3", "symlink-manager": "^1.4.2", "ts-node": "~7.0.0", + "ts-toolbelt": "^6.3.6", "tsickle": "^0.37.0", "tslint": "~5.20.0", "typescript": "~3.5.3", diff --git a/npm/ng-packs/yarn.lock b/npm/ng-packs/yarn.lock index db911bfb55..8c2e4c37d2 100644 --- a/npm/ng-packs/yarn.lock +++ b/npm/ng-packs/yarn.lock @@ -11685,6 +11685,11 @@ ts-node@~7.0.0: source-map-support "^0.5.6" yn "^2.0.0" +ts-toolbelt@^6.3.6: + version "6.3.6" + resolved "https://registry.yarnpkg.com/ts-toolbelt/-/ts-toolbelt-6.3.6.tgz#2bde29106c013ed520c32f30e1248daf8fd4f5f9" + integrity sha512-eVzym+LyQodOCfyVyQDQ6FGYbO2Xf9Nc4dGLRKlKSUpAs+8qQWHG+grDiA3ciEuNPNZ0qJnNIYkdqBW1rCWuUA== + tsickle@^0.37.0: version "0.37.1" resolved "https://registry.yarnpkg.com/tsickle/-/tsickle-0.37.1.tgz#2f8a87c1b15766e866457bd06fb6c0e0d84eed09" From 007421aae13446c63bd2b23f0f3e9f9d535bc61c Mon Sep 17 00:00:00 2001 From: Arman Ozak Date: Mon, 23 Mar 2020 18:55:29 +0300 Subject: [PATCH 02/12] feat(core): use Object.Paths in byDeep method of TrackByService --- .../core/src/lib/services/track-by.service.ts | 9 +++++---- .../core/src/lib/tests/track-by.service.spec.ts | 16 +++++----------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/npm/ng-packs/packages/core/src/lib/services/track-by.service.ts b/npm/ng-packs/packages/core/src/lib/services/track-by.service.ts index ca2b92db5f..4f7cc6f7c8 100644 --- a/npm/ng-packs/packages/core/src/lib/services/track-by.service.ts +++ b/npm/ng-packs/packages/core/src/lib/services/track-by.service.ts @@ -1,18 +1,19 @@ import { Injectable, TrackByFunction } from '@angular/core'; +import { O } from 'ts-toolbelt'; @Injectable({ providedIn: 'root', }) export class TrackByService { by(key: keyof T): TrackByFunction { - return ({}, item) => item[key]; + return (_, item) => item[key]; } - byDeep(...keys: (string | number)[]): TrackByFunction { - return ({}, item) => keys.reduce((acc, key) => acc[key], item); + byDeep(...keys: T extends object ? O.Paths : never): TrackByFunction { + return (_, item) => keys.reduce((acc, key) => acc[key], item); } bySelf(): TrackByFunction { - return ({}, item) => item; + return (_, item) => item; } } diff --git a/npm/ng-packs/packages/core/src/lib/tests/track-by.service.spec.ts b/npm/ng-packs/packages/core/src/lib/tests/track-by.service.spec.ts index 19868e8ad5..c1125d2930 100644 --- a/npm/ng-packs/packages/core/src/lib/tests/track-by.service.spec.ts +++ b/npm/ng-packs/packages/core/src/lib/tests/track-by.service.spec.ts @@ -11,17 +11,11 @@ describe('TrackByService', () => { describe('#byDeep', () => { it('should return a function which tracks a deeply-nested property', () => { - expect( - service.byDeep( - 'a', - 'b', - 'c', - 1, - 'x', - )(284, { - a: { b: { c: [{ x: 1035 }, { x: 1036 }, { x: 1037 }] } }, - }), - ).toBe(1036); + const obj = { + a: { b: { c: { x: 1036 } } }, + }; + + expect(service.byDeep('a', 'b', 'c', 'x')(284, obj)).toBe(1036); }); }); From 25204e5d34d4850514e417273e57b984d3156659 Mon Sep 17 00:00:00 2001 From: Arman Ozak Date: Mon, 23 Mar 2020 20:00:10 +0300 Subject: [PATCH 03/12] refactor: remove bySelf method --- .../packages/core/src/lib/services/track-by.service.ts | 4 ---- .../packages/core/src/lib/tests/track-by.service.spec.ts | 6 ------ 2 files changed, 10 deletions(-) diff --git a/npm/ng-packs/packages/core/src/lib/services/track-by.service.ts b/npm/ng-packs/packages/core/src/lib/services/track-by.service.ts index 4f7cc6f7c8..9576a287f2 100644 --- a/npm/ng-packs/packages/core/src/lib/services/track-by.service.ts +++ b/npm/ng-packs/packages/core/src/lib/services/track-by.service.ts @@ -12,8 +12,4 @@ export class TrackByService { byDeep(...keys: T extends object ? O.Paths : never): TrackByFunction { return (_, item) => keys.reduce((acc, key) => acc[key], item); } - - bySelf(): TrackByFunction { - return (_, item) => item; - } } diff --git a/npm/ng-packs/packages/core/src/lib/tests/track-by.service.spec.ts b/npm/ng-packs/packages/core/src/lib/tests/track-by.service.spec.ts index c1125d2930..377f129ff5 100644 --- a/npm/ng-packs/packages/core/src/lib/tests/track-by.service.spec.ts +++ b/npm/ng-packs/packages/core/src/lib/tests/track-by.service.spec.ts @@ -18,10 +18,4 @@ describe('TrackByService', () => { expect(service.byDeep('a', 'b', 'c', 'x')(284, obj)).toBe(1036); }); }); - - describe('#bySelf', () => { - it('should return a function which tracks the item', () => { - expect(service.bySelf()(284, 'X')).toBe('X'); - }); - }); }); From 15b93c3199084f92a6a337aa3909861a97e4a398 Mon Sep 17 00:00:00 2001 From: Arman Ozak Date: Mon, 23 Mar 2020 20:08:08 +0300 Subject: [PATCH 04/12] feat(core): export trackBy and trackByDeep separately --- .../core/src/lib/services/track-by.service.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/npm/ng-packs/packages/core/src/lib/services/track-by.service.ts b/npm/ng-packs/packages/core/src/lib/services/track-by.service.ts index 9576a287f2..aa72942ec0 100644 --- a/npm/ng-packs/packages/core/src/lib/services/track-by.service.ts +++ b/npm/ng-packs/packages/core/src/lib/services/track-by.service.ts @@ -1,15 +1,17 @@ import { Injectable, TrackByFunction } from '@angular/core'; import { O } from 'ts-toolbelt'; +export const trackBy = (key: keyof T): TrackByFunction => (_, item) => item[key]; + +export const trackByDeep = ( + ...keys: T extends object ? O.Paths : never +): TrackByFunction => (_, item) => keys.reduce((acc, key) => acc[key], item); + @Injectable({ providedIn: 'root', }) export class TrackByService { - by(key: keyof T): TrackByFunction { - return (_, item) => item[key]; - } + by = trackBy; - byDeep(...keys: T extends object ? O.Paths : never): TrackByFunction { - return (_, item) => keys.reduce((acc, key) => acc[key], item); - } + byDeep = trackByDeep; } From 56295b730704121c2c6734920136e7e167569494 Mon Sep 17 00:00:00 2001 From: Arman Ozak Date: Mon, 23 Mar 2020 21:08:44 +0300 Subject: [PATCH 05/12] docs(core): add how to create TrackByFunction using TrackByService --- docs/en/UI/Angular/Track-By-Service.md | 114 +++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 docs/en/UI/Angular/Track-By-Service.md diff --git a/docs/en/UI/Angular/Track-By-Service.md b/docs/en/UI/Angular/Track-By-Service.md new file mode 100644 index 0000000000..4b8d2d8a1e --- /dev/null +++ b/docs/en/UI/Angular/Track-By-Service.md @@ -0,0 +1,114 @@ +# Easy TrackByFunction Implementation + +`TrackByService` is a utility service to provide an easy implementation for one of the most frequent needs in Angular templates: `TrackByFunction`. Please see [this page in Angular docs](https://angular.io/guide/template-syntax#ngfor-with-trackby) for its purpose. + + + +## Getting Started + +You do not have to provide the `TrackByService` at module or component level, because it is already **provided in root**. You can inject and start using it immediately in your components. For better type support, you may pass in the type of the iterated item to it. + +```js +import { TrackByService } from '@abp/ng.core'; + +@Component({ + /* class metadata here */ +}) +class DemoComponent { + list: Item[]; + + constructor(public readonly track: TrackByService) {} +} +``` + + + +> Noticed `track` is `public` and `readonly`? That is because we will see some examples where methods of `TrackByService` instance are directly called in the component's template. That may be considered as an anti-pattern, but it has its own advantage, especially when component inheritance is leveraged. You can always use public component properties instead. + + + +**The members are also exported as separate functions.** If you do not want to inject `TrackByService`, you can always import and use those functions directly in your classes. + + + +## Usage + +There are two approaches available. + +1. You may inject `TrackByService` to your component and use its members. +2. You may use exported higher-order functions directly on component properties. + + + +### How to Track Items by a Key + +You can use `by` to get a `TrackByFunction` that tracks the iterated object based on one of its keys. For type support, you may pass in the type of the iterated item to it. + +```html + + +
{{ item.name }}
+``` + + + +`by` is exported as a stand-alone function and is named `trackBy`. + +```js +import { trackBy } from "@abp/ng.core"; + +@Component({ + template: ` +
+ {{ item.name }} +
+ `, +}) +class DemoComponent { + list: Item[]; + + trackById = trackBy('id'); +} +``` + + + +### How to Track by a Deeply Nested Key + +You can use `byDeep` to get a `TrackByFunction` that tracks the iterated object based on a deeply nested key. For type support, you may pass in the type of the iterated item to it. + +```html + + +
+ {{ item.tenant.name }} +
+``` + + + +`byDeep` is exported as a stand-alone function and is named `trackByDeep`. + +```js +import { trackByDeep } from "@abp/ng.core"; + +@Component({ + template: ` +
+ {{ item.name }} +
+ `, +}) +class DemoComponent { + list: Item[]; + + trackByTenantAccountId = trackByDeep('tenant', 'account', 'id'); +} +``` + From 6dda74a8dd3301ef430090161ac5373c9fde693b Mon Sep 17 00:00:00 2001 From: mehmet-erim Date: Tue, 24 Mar 2020 09:56:17 +0300 Subject: [PATCH 06/12] refactor(core): take precaution for type error in config state --- npm/ng-packs/packages/core/src/lib/states/config.state.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/npm/ng-packs/packages/core/src/lib/states/config.state.ts b/npm/ng-packs/packages/core/src/lib/states/config.state.ts index 5269946391..8ce206dd76 100644 --- a/npm/ng-packs/packages/core/src/lib/states/config.state.ts +++ b/npm/ng-packs/packages/core/src/lib/states/config.state.ts @@ -262,7 +262,8 @@ export class ConfigState { route.url = `/${route.path}`; } - route.order = route.order || route.order === 0 ? route.order : parent.children.length; + route.children = route.children || []; + route.order = route.order || route.order === 0 ? route.order : (parent.children || []).length; parent.children = [...(parent.children || []), route].sort((a, b) => a.order - b.order); flattedRoutes[index] = parent; From 9309d05e08e87d5ebee7e3a118ba1a07132f532d Mon Sep 17 00:00:00 2001 From: John Barrett <40014477+274188A@users.noreply.github.com> Date: Tue, 24 Mar 2020 15:13:13 +0800 Subject: [PATCH 07/12] grammar grammar --- docs/en/Multi-Tenancy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/Multi-Tenancy.md b/docs/en/Multi-Tenancy.md index 1e1e4e9f81..27fe70086c 100644 --- a/docs/en/Multi-Tenancy.md +++ b/docs/en/Multi-Tenancy.md @@ -4,7 +4,7 @@ ABP Multi-tenancy module provides base functionality to create multi tenant appl Wikipedia [defines](https://en.wikipedia.org/wiki/Multitenancy) multi-tenancy as like that: -> Software **Multi-tenancy** refers to a software **architecture** in which a **single instance** of a software runs on a server and serves **multiple tenants**. A tenant is a group of users who share a common access with specific privileges to the software instance. With a multitenant architecture, a software application is designed to provide every tenant a **dedicated share of the instance including its data**, configuration, user management, tenant individual functionality and non-functional properties. Multi-tenancy contrasts with multi-instance architectures, where separate software instances operate on behalf of different tenants. +> Software **Multi-tenancy** refers to a software **architecture** in which a **single instance** of software runs on a server and serves **multiple tenants**. A tenant is a group of users who share a common access with specific privileges to the software instance. With a multitenant architecture, a software application is designed to provide every tenant a **dedicated share of the instance including its data**, configuration, user management, tenant individual functionality and non-functional properties. Multi-tenancy contrasts with multi-instance architectures, where separate software instances operate on behalf of different tenants. ### Volo.Abp.MultiTenancy Package From 42367498c8dc9fb48d83489f6e65d0b9211a32eb Mon Sep 17 00:00:00 2001 From: mehmet-erim Date: Tue, 24 Mar 2020 10:25:20 +0300 Subject: [PATCH 08/12] test(core): fix config-state testing error --- npm/ng-packs/packages/core/src/lib/tests/config.state.spec.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/npm/ng-packs/packages/core/src/lib/tests/config.state.spec.ts b/npm/ng-packs/packages/core/src/lib/tests/config.state.spec.ts index 07baed4c14..1ff9ad817e 100644 --- a/npm/ng-packs/packages/core/src/lib/tests/config.state.spec.ts +++ b/npm/ng-packs/packages/core/src/lib/tests/config.state.spec.ts @@ -375,6 +375,7 @@ describe('ConfigState', () => { describe('#AddRoute', () => { const newRoute = { name: 'My new page', + children: [], iconClass: 'fa fa-dashboard', path: 'page', invisible: false, From 9da3a6b99b942e95160226065021080559814def Mon Sep 17 00:00:00 2001 From: mehmet-erim Date: Tue, 24 Mar 2020 10:25:30 +0300 Subject: [PATCH 09/12] chore: update NPM versions --- npm/ng-packs/.vscode/settings.json | 1 + npm/ng-packs/package.json | 26 +++--- npm/ng-packs/yarn.lock | 132 ++++++++++++++--------------- 3 files changed, 80 insertions(+), 79 deletions(-) diff --git a/npm/ng-packs/.vscode/settings.json b/npm/ng-packs/.vscode/settings.json index 37d9a1e403..9c2678df08 100644 --- a/npm/ng-packs/.vscode/settings.json +++ b/npm/ng-packs/.vscode/settings.json @@ -6,6 +6,7 @@ "typescript.tsdk": "../node_modules/typescript/lib", "workbench.colorCustomizations": { "activityBar.background": "#258ecd", + "activityBar.activeBackground": "#258ecd", "activityBar.activeBorder": "#f0aed7", "activityBar.foreground": "#e7e7e7", "activityBar.inactiveForeground": "#e7e7e799", diff --git a/npm/ng-packs/package.json b/npm/ng-packs/package.json index 37621afb49..a4a3045b0a 100644 --- a/npm/ng-packs/package.json +++ b/npm/ng-packs/package.json @@ -21,19 +21,19 @@ "generate:changelog": "conventional-changelog -p angular -i CHANGELOG.md -s" }, "devDependencies": { - "@abp/ng.account": "~2.2.0", - "@abp/ng.account.config": "~2.2.0", - "@abp/ng.core": "~2.2.0", - "@abp/ng.feature-management": "~2.2.0", - "@abp/ng.identity": "~2.2.0", - "@abp/ng.identity.config": "~2.2.0", - "@abp/ng.permission-management": "~2.2.0", - "@abp/ng.setting-management": "~2.2.0", - "@abp/ng.setting-management.config": "~2.2.0", - "@abp/ng.tenant-management": "~2.2.0", - "@abp/ng.tenant-management.config": "~2.2.0", - "@abp/ng.theme.basic": "~2.2.0", - "@abp/ng.theme.shared": "~2.2.0", + "@abp/ng.account": "~2.3.0", + "@abp/ng.account.config": "~2.3.0", + "@abp/ng.core": "^2.3.0", + "@abp/ng.feature-management": "^2.3.0", + "@abp/ng.identity": "~2.3.0", + "@abp/ng.identity.config": "~2.3.0", + "@abp/ng.permission-management": "^2.3.0", + "@abp/ng.setting-management": "~2.3.0", + "@abp/ng.setting-management.config": "~2.3.0", + "@abp/ng.tenant-management": "~2.3.0", + "@abp/ng.tenant-management.config": "~2.3.0", + "@abp/ng.theme.basic": "~2.3.0", + "@abp/ng.theme.shared": "^2.3.0", "@angular-builders/jest": "^8.2.0", "@angular-devkit/build-angular": "~0.803.21", "@angular-devkit/build-ng-packagr": "~0.803.21", diff --git a/npm/ng-packs/yarn.lock b/npm/ng-packs/yarn.lock index 8c2e4c37d2..a9d0291af1 100644 --- a/npm/ng-packs/yarn.lock +++ b/npm/ng-packs/yarn.lock @@ -2,26 +2,26 @@ # yarn lockfile v1 -"@abp/ng.account.config@^2.2.0", "@abp/ng.account.config@~2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@abp/ng.account.config/-/ng.account.config-2.2.0.tgz#420396fc55eadd9a5c179e87075a51437ebc964c" - integrity sha512-5BpxFnXCeCDR+m3qGMKn8rSMGwBb4mkwtejVAJXCVYoMXL8x2J9uRgDf9fkdudqpls+BIgB8BX1tRyJiY+Bg8Q== +"@abp/ng.account.config@^2.3.0", "@abp/ng.account.config@~2.3.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@abp/ng.account.config/-/ng.account.config-2.3.0.tgz#28d65e2eb889d8b44fc726edbed7509214e8034a" + integrity sha512-Vg4+8PvGfgUC+pFtPIS53ZekJM+O4JZ8wGPGaZ/ySLpk2oSfzC/5RFS2rKq3cmySeRCJunmQinCAlBCm5zir8A== dependencies: tslib "^1.9.0" -"@abp/ng.account@~2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@abp/ng.account/-/ng.account-2.2.0.tgz#3a200a46f83c36ae89a6724a6a2226a5f846641b" - integrity sha512-OwTOxXDI3BJ1MrlR6WtvDmNIkqi1OCWlq7MvUhuFPVmIIUI3OjxHNASk1NfWMSlu6amXDxuFEey4ItrMKnAJog== +"@abp/ng.account@~2.3.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@abp/ng.account/-/ng.account-2.3.0.tgz#9ca2a564c177c43b53f69f141405914baefbc7b2" + integrity sha512-kJCek8woGGEC1WTgo75Qr2ucyD5VV1nqqnkw8UMJ96/pqASpBJHczGTL8R4ug961i4vexKDnMbiv0SmfMlBDig== dependencies: - "@abp/ng.account.config" "^2.2.0" - "@abp/ng.theme.shared" "^2.2.0" + "@abp/ng.account.config" "^2.3.0" + "@abp/ng.theme.shared" "^2.3.0" tslib "^1.9.0" -"@abp/ng.core@^2.2.0", "@abp/ng.core@~2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@abp/ng.core/-/ng.core-2.2.0.tgz#a553e845f7bc43838704eb15d8684869dfcb053b" - integrity sha512-HtyHJYPY6kKqySt/afgFT5j6yaN7Bx4MMvIGWHqFqZsQChWceagLk5SBFTOjCE1FgsewX2a7OT452bKjgsWsrg== +"@abp/ng.core@^2.3.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@abp/ng.core/-/ng.core-2.3.0.tgz#96bad951da07e589f11a0345171e1a142463671e" + integrity sha512-6SsgcRJQWjXvyEZ7VO2ekOoVmKkFB17vJgTvQLiyB+j2t9guAo3LPDcMGGKNum/oInkiYczf8MY7sculrElyKQ== dependencies: "@angular/localize" "~9.0.2" "@ngxs/router-plugin" "^3.6.2" @@ -33,86 +33,86 @@ snq "^1.0.3" tslib "^1.9.0" -"@abp/ng.feature-management@^2.2.0", "@abp/ng.feature-management@~2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@abp/ng.feature-management/-/ng.feature-management-2.2.0.tgz#04f959ddb62a0abd99a84fb4e6ec935a796418d4" - integrity sha512-Cw0GRi+6LX5oKDwEvJJyUoh7M4hvaUE5TsuP1E3Hicg/1mMSyUDXVrLBOvAeWWolyfFTpFKLppAvoEEMpUt2eg== +"@abp/ng.feature-management@^2.3.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@abp/ng.feature-management/-/ng.feature-management-2.3.0.tgz#91172fa9f308b3a792a2bf1e762e24560556f412" + integrity sha512-ShytiV1SC3PwP4Hs8Ss3bk2UAZBXteHKWcrIhAvqtWsOQ2aql6e7t+FutRA3wtUuRdX6PTrMRXbMRvhCwGZUKQ== dependencies: - "@abp/ng.theme.shared" "^2.2.0" + "@abp/ng.theme.shared" "^2.3.0" tslib "^1.9.0" -"@abp/ng.identity.config@^2.2.0", "@abp/ng.identity.config@~2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@abp/ng.identity.config/-/ng.identity.config-2.2.0.tgz#ac050ed632624c490d8957a18606622637d1d6f3" - integrity sha512-sHRG0iRFrGtF2pNnKcjBaeupg39V8easzUFPU42/SVPi0XyAumrOZRbKkN2CBl0WYedqARTZxE5/nejRMXX4Fg== +"@abp/ng.identity.config@^2.3.0", "@abp/ng.identity.config@~2.3.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@abp/ng.identity.config/-/ng.identity.config-2.3.0.tgz#e9f4904d60f94cc01b3254e0221d7cdb2274aa3b" + integrity sha512-bqCaPHCwaHUfAfNfFskGTJHGvv+hPK9Tmm7PouVa884AmeQs2j0Gwl3o93YHK2VwXENV09qb01feXapSVPsmTw== dependencies: tslib "^1.9.0" -"@abp/ng.identity@~2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@abp/ng.identity/-/ng.identity-2.2.0.tgz#1cc7ffa4e2aae462d8ce2399f94cf5ad047fefae" - integrity sha512-G/hrMg/PaN0tA871D52AuKlUhsLWfWSblK0XqQiRmMp/ozsEYSvAV91n/pEScm7qx0RF01K0J5K5V8Cjb4LTyA== +"@abp/ng.identity@~2.3.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@abp/ng.identity/-/ng.identity-2.3.0.tgz#c973f12f5490b1d29c80f510540b18343f998b8d" + integrity sha512-vBLLxCax7MoHilakpW9XMRFGUXcdMM0syiz0PtkgKmYADIQIQ9AzcfwslK2D6wwy447s6NIoGnThtfbshoRtLw== dependencies: - "@abp/ng.identity.config" "^2.2.0" - "@abp/ng.permission-management" "^2.2.0" - "@abp/ng.theme.shared" "^2.2.0" + "@abp/ng.identity.config" "^2.3.0" + "@abp/ng.permission-management" "^2.3.0" + "@abp/ng.theme.shared" "^2.3.0" tslib "^1.9.0" -"@abp/ng.permission-management@^2.2.0", "@abp/ng.permission-management@~2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@abp/ng.permission-management/-/ng.permission-management-2.2.0.tgz#56bece037aa094400f8d5585db0bfd5718437ae0" - integrity sha512-OeUZzZV+2TTWOhmpwFTvar9/4IpKz5EhI/6uabu3pOtIsU2Ms2OBbjwVUSKbhLT7e0+z5MM1nPCDoXIlYv22wA== +"@abp/ng.permission-management@^2.3.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@abp/ng.permission-management/-/ng.permission-management-2.3.0.tgz#16599a2e1583c9d6769edb1dc9b78a45b75b7402" + integrity sha512-vJSfcmXCXpBHMjeRb/0QoKlAcvpCQ/qS2quHFUr23nriXIeNxgEdCVHkTBZU8FMxfyTfwwrFRzF2oxn33gubbg== dependencies: - "@abp/ng.theme.shared" "^2.2.0" + "@abp/ng.theme.shared" "^2.3.0" tslib "^1.9.0" -"@abp/ng.setting-management.config@^2.2.0", "@abp/ng.setting-management.config@~2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@abp/ng.setting-management.config/-/ng.setting-management.config-2.2.0.tgz#31cf94a785fc2d5c3f1bcfe2c79afc0f1ab419ee" - integrity sha512-vZhBvKFZ6puWwujkzEEhqyQiMKdTmAeJjSxlUPRyIuwowrZhPnUk1r0ghyOLTC5fC1TDaUXF1mZ2UsBFMDvuiw== +"@abp/ng.setting-management.config@^2.3.0", "@abp/ng.setting-management.config@~2.3.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@abp/ng.setting-management.config/-/ng.setting-management.config-2.3.0.tgz#80b9ebc659c34be4c4c45cc6f2fe2b593f491aab" + integrity sha512-nj6Hl8hlzrGJFJZo4d9DWQtf1PCSFnXup/3ajqMOCPPE+oBItY3aNY05jDyGgdr2wEdyWo/u9Invy3Jsvq8itQ== dependencies: tslib "^1.9.0" -"@abp/ng.setting-management@~2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@abp/ng.setting-management/-/ng.setting-management-2.2.0.tgz#e1c976bf69bbfaa452489b8968b8669c3fba7710" - integrity sha512-LL6CUi0qpS0+9kPz/T0n1U+Kpu9gwI49+d/+xVDG+lIziGqukgwgoUwlEv+Lk0ak+RC5noLurvvJaaKd3l3mPw== +"@abp/ng.setting-management@~2.3.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@abp/ng.setting-management/-/ng.setting-management-2.3.0.tgz#478c603f67416df763228bc958b6ea05e7d13dd7" + integrity sha512-xJk09NdpXeg3/KezvKl+h0B4T08Hy1SofOATQpVTrE4TIsFxyXKmasMcSY4i/3+wwE1umH+6TZJwPE+pXTu9Ng== dependencies: - "@abp/ng.setting-management.config" "^2.2.0" - "@abp/ng.theme.shared" "^2.2.0" + "@abp/ng.setting-management.config" "^2.3.0" + "@abp/ng.theme.shared" "^2.3.0" tslib "^1.9.0" -"@abp/ng.tenant-management.config@^2.2.0", "@abp/ng.tenant-management.config@~2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@abp/ng.tenant-management.config/-/ng.tenant-management.config-2.2.0.tgz#16d87f31ec069e1f3a8351ef3be9a05a3002ed26" - integrity sha512-lfW9lGERn9PBIRseJajQ0GSxo1+wfRxO7Ic/lSSPxhUbsmwg6afquYTcGiU0d+4QQOBY47ga3n0IVrNqWq1pmw== +"@abp/ng.tenant-management.config@^2.3.0", "@abp/ng.tenant-management.config@~2.3.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@abp/ng.tenant-management.config/-/ng.tenant-management.config-2.3.0.tgz#8501a3a53f1abac8a65a87782752afb2ba648bb1" + integrity sha512-gGqg7rZd5X37z9glYF2lSiFpJ3Lyi1NdqHnaxdCTui+3/weMo/5RKlf+ilUAPqR5YAMVSLi4mBYYsuShWEBBIQ== dependencies: tslib "^1.9.0" -"@abp/ng.tenant-management@~2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@abp/ng.tenant-management/-/ng.tenant-management-2.2.0.tgz#0ce498eaf9f65ef0255fc23949a47f8ae36cf5c8" - integrity sha512-v9Y5F9fm2EXYteCWKI8QODN4ETmSdh6K7gC5Y3+/N+QaUAod8JxFNX0EIXzFGnSLbiZ0O1xA/TRJruQTv1m3SA== +"@abp/ng.tenant-management@~2.3.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@abp/ng.tenant-management/-/ng.tenant-management-2.3.0.tgz#5ec092ad9c597d4aa9f2f849fc12e955d2d24696" + integrity sha512-LyJaXuzgZr2tfFPknuGz1spOzfxfaEhPuQ6zHBOhVfQ6KtMBeagsQQoEiLJMtcygR0MRox0kzmUiyTKm4H5DoA== dependencies: - "@abp/ng.feature-management" "^2.2.0" - "@abp/ng.tenant-management.config" "^2.2.0" - "@abp/ng.theme.shared" "^2.2.0" + "@abp/ng.feature-management" "^2.3.0" + "@abp/ng.tenant-management.config" "^2.3.0" + "@abp/ng.theme.shared" "^2.3.0" tslib "^1.9.0" -"@abp/ng.theme.basic@~2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@abp/ng.theme.basic/-/ng.theme.basic-2.2.0.tgz#7a086a27daa3bec16962dd62dfb2f39a1538e82f" - integrity sha512-fpdDjjhEQZtaZvFkVi5uhqZoYyrxCWJeQgGFvLS36TqYqvJVyoMeJBlVw0CgbY3F+u5V/GmZSVxvZAAJDpUYhg== +"@abp/ng.theme.basic@~2.3.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@abp/ng.theme.basic/-/ng.theme.basic-2.3.0.tgz#e5857864ae4c3274a57cc785b06cccd0ff3515a8" + integrity sha512-LuAlKqmqEFUUwI/ruB6aO1rhfsCD19Pt7PCE3M+vr/KvlYAKb89K1U8nphIfMV8PCz9IU07BwvTn/T2qIt39HQ== dependencies: - "@abp/ng.theme.shared" "^2.2.0" + "@abp/ng.theme.shared" "^2.3.0" tslib "^1.9.0" -"@abp/ng.theme.shared@^2.2.0", "@abp/ng.theme.shared@~2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@abp/ng.theme.shared/-/ng.theme.shared-2.2.0.tgz#438f77498df3e2f25a1ecf9adb77a9ee5a71d2c5" - integrity sha512-w7TnDbdHpOFcT12wt/9nZDH9PkyZdTP6W+tJIGeH6zOgWC8V4MDX8Ulc9e/ZvQ8u0qRLOEmk3aE5odFQUHSlJw== +"@abp/ng.theme.shared@^2.3.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@abp/ng.theme.shared/-/ng.theme.shared-2.3.0.tgz#5b13b8e170fb0c2a4afca34434bd455ee8dfb9d6" + integrity sha512-keYnD17K8QkdSLqBbsATfeh7KwKNoUj/XsHZO8hawE3OfRuy4qYY9xghGFZUUqdIE5kF6gKlLKj4ZTZmuCvOmQ== dependencies: - "@abp/ng.core" "^2.2.0" + "@abp/ng.core" "^2.3.0" "@fortawesome/fontawesome-free" "^5.12.1" "@ng-bootstrap/ng-bootstrap" "^5.3.0" "@ngx-validate/core" "^0.0.7" From a709c4ff8b30f1bc067d2065418da90b2b20fb9e Mon Sep 17 00:00:00 2001 From: mehmet-erim Date: Tue, 24 Mar 2020 10:42:06 +0300 Subject: [PATCH 10/12] docs: escape curly braces --- docs/en/UI/Angular/Track-By-Service.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/en/UI/Angular/Track-By-Service.md b/docs/en/UI/Angular/Track-By-Service.md index 4b8d2d8a1e..4506f77e47 100644 --- a/docs/en/UI/Angular/Track-By-Service.md +++ b/docs/en/UI/Angular/Track-By-Service.md @@ -47,7 +47,7 @@ You can use `by` to get a `TrackByFunction` that tracks the iterated object base ```html -
{{ item.name }}
+
{%{{{ item.name }}}%}
``` @@ -62,7 +62,7 @@ import { trackBy } from "@abp/ng.core";
- {{ item.name }} + {%{{{ item.name }}}%}
`, }) @@ -85,7 +85,7 @@ You can use `byDeep` to get a `TrackByFunction` that tracks the iterated object
- {{ item.tenant.name }} + {%{{{ item.tenant.name }}}%}
``` @@ -101,7 +101,7 @@ import { trackByDeep } from "@abp/ng.core";
- {{ item.name }} + {%{{{ item.name }}}%}
`, }) From 90c37f2019dfa3357893f49e9ffa4fd4ea50f428 Mon Sep 17 00:00:00 2001 From: mehmet-erim Date: Tue, 24 Mar 2020 10:42:20 +0300 Subject: [PATCH 11/12] docs: add what's next to custom setting page document --- docs/en/UI/Angular/Custom-Setting-Page.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/en/UI/Angular/Custom-Setting-Page.md b/docs/en/UI/Angular/Custom-Setting-Page.md index 7c51cf2cca..6aa5d8a3cc 100644 --- a/docs/en/UI/Angular/Custom-Setting-Page.md +++ b/docs/en/UI/Angular/Custom-Setting-Page.md @@ -40,3 +40,7 @@ ngOnInit() { Navigate to `/setting-management` route to see the changes: ![Custom Settings Tab](./images/custom-settings.png) + +## What's Next? + +- [TrackByService](./Track-By-Service.md) From df898213f34cbad9b9bfaa34aa24deeb6a4340f0 Mon Sep 17 00:00:00 2001 From: mehmet-erim Date: Tue, 24 Mar 2020 10:42:36 +0300 Subject: [PATCH 12/12] docs: add TrackByService to the menu --- docs/en/docs-nav.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/en/docs-nav.json b/docs/en/docs-nav.json index a96fb911d2..425b8c526a 100644 --- a/docs/en/docs-nav.json +++ b/docs/en/docs-nav.json @@ -335,6 +335,10 @@ { "text": "Custom Setting Page", "path": "UI/Angular/Custom-Setting-Page.md" + }, + { + "text": "TrackByService", + "path": "UI/Angular/Track-By-Service.md" } ] }