Skip to content

Commit d3c1d0b

Browse files
author
John Morgan
committed
2 parents 652fd7b + cbf7bb0 commit d3c1d0b

File tree

21 files changed

+2177
-85
lines changed

21 files changed

+2177
-85
lines changed

angular/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"admin-lte-css-only": "^3.0.4",
2929
"core-js": "^3.2.1",
3030
"famfamfam-flags": "^1.0.0",
31-
"lodash": "^4.17.4",
31+
"lodash-es": "^4.17.15",
3232
"moment": "2.24.0",
3333
"moment-timezone": "^0.5.28",
3434
"ngx-bootstrap": "^5.6.1",
@@ -47,7 +47,7 @@
4747
"@angular/compiler-cli": "^9.1.4",
4848
"@angularclass/hmr": "^2.1.3",
4949
"@types/jasmine": "^3.4.0",
50-
"@types/lodash": "^4.14.150",
50+
"@types/lodash-es": "^4.17.3",
5151
"@types/moment-timezone": "^0.5.12",
5252
"@types/node": "^13.13.4",
5353
"codelyzer": "^5.1.2",
@@ -67,4 +67,4 @@
6767
"webpack-bundle-analyzer": "^3.7.0"
6868
},
6969
"angular-cli": {}
70-
}
70+
}

angular/src/account/layout/account-languages.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
ChangeDetectionStrategy
66
} from '@angular/core';
77
import { AppComponentBase } from '@shared/app-component-base';
8-
import * as _ from 'lodash';
8+
import { filter as _filter } from 'lodash-es';
99

1010
@Component({
1111
selector: 'account-languages',
@@ -22,7 +22,7 @@ export class AccountLanguagesComponent extends AppComponentBase
2222
}
2323

2424
ngOnInit() {
25-
this.languages = _.filter(
25+
this.languages = _filter(
2626
this.localization.languages,
2727
(l) => !l.isDisabled
2828
);

angular/src/app-initializer.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Injectable, Injector } from '@angular/core';
22
import { PlatformLocation, registerLocaleData } from '@angular/common';
33
import { HttpClient } from '@angular/common/http';
44
import * as moment from 'moment';
5-
import * as _ from 'lodash';
5+
import { filter as _filter, merge as _merge } from 'lodash-es';
66
import { AppConsts } from '@shared/AppConsts';
77
import { AppSessionService } from '@shared/session/app-session.service';
88
import { environment } from './environments/environment';
@@ -89,7 +89,7 @@ export class AppInitializer {
8989
return locale;
9090
}
9191

92-
const localeMapings = _.filter(AppConsts.localeMappings, { from: locale });
92+
const localeMapings = _filter(AppConsts.localeMappings, { from: locale });
9393
if (localeMapings && localeMapings.length) {
9494
return localeMapings[0]['to'];
9595
}
@@ -136,7 +136,7 @@ export class AppInitializer {
136136
.subscribe((response) => {
137137
const result = response.result;
138138

139-
_.merge(abp, result);
139+
_merge(abp, result);
140140

141141
abp.clock.provider = this.getCurrentClockProvider(
142142
result.clock.provider

angular/src/app/layout/header-language-menu.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
UserServiceProxy,
1010
ChangeUserLanguageDto
1111
} from '@shared/service-proxies/service-proxies';
12-
import * as _ from 'lodash';
12+
import { filter as _filter } from 'lodash-es';
1313

1414
@Component({
1515
selector: 'header-language-menu',
@@ -26,7 +26,7 @@ export class HeaderLanguageMenuComponent extends AppComponentBase
2626
}
2727

2828
ngOnInit() {
29-
this.languages = _.filter(
29+
this.languages = _filter(
3030
this.localization.languages,
3131
(l) => !l.isDisabled
3232
);

angular/src/app/roles/create-role/create-role-dialog.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {
77
} from '@angular/core';
88
import { finalize } from 'rxjs/operators';
99
import { BsModalRef } from 'ngx-bootstrap/modal';
10-
import * as _ from 'lodash';
1110
import { AppComponentBase } from '@shared/app-component-base';
1211
import {
1312
RoleServiceProxy,
@@ -16,6 +15,7 @@ import {
1615
CreateRoleDto,
1716
PermissionDtoListResultDto
1817
} from '@shared/service-proxies/service-proxies';
18+
import { forEach as _forEach, map as _map } from 'lodash-es';
1919

2020
@Component({
2121
templateUrl: 'create-role-dialog.component.html'
@@ -48,7 +48,7 @@ export class CreateRoleDialogComponent extends AppComponentBase
4848
}
4949

5050
setInitialPermissionsStatus(): void {
51-
_.map(this.permissions, (item) => {
51+
_map(this.permissions, (item) => {
5252
this.checkedPermissionsMap[item.name] = this.isPermissionChecked(
5353
item.name
5454
);
@@ -67,7 +67,7 @@ export class CreateRoleDialogComponent extends AppComponentBase
6767

6868
getCheckedPermissions(): string[] {
6969
const permissions: string[] = [];
70-
_.forEach(this.checkedPermissionsMap, function (value, key) {
70+
_forEach(this.checkedPermissionsMap, function (value, key) {
7171
if (value) {
7272
permissions.push(key);
7373
}

angular/src/app/roles/edit-role/edit-role-dialog.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
} from '@angular/core';
88
import { finalize } from 'rxjs/operators';
99
import { BsModalRef } from 'ngx-bootstrap/modal';
10-
import * as _ from 'lodash';
10+
import { forEach as _forEach, includes as _includes, map as _map } from 'lodash-es';
1111
import { AppComponentBase } from '@shared/app-component-base';
1212
import {
1313
RoleServiceProxy,
@@ -52,15 +52,15 @@ export class EditRoleDialogComponent extends AppComponentBase
5252
}
5353

5454
setInitialPermissionsStatus(): void {
55-
_.map(this.permissions, (item) => {
55+
_map(this.permissions, (item) => {
5656
this.checkedPermissionsMap[item.name] = this.isPermissionChecked(
5757
item.name
5858
);
5959
});
6060
}
6161

6262
isPermissionChecked(permissionName: string): boolean {
63-
return _.includes(this.grantedPermissionNames, permissionName);
63+
return _includes(this.grantedPermissionNames, permissionName);
6464
}
6565

6666
onPermissionChange(permission: PermissionDto, $event) {
@@ -69,7 +69,7 @@ export class EditRoleDialogComponent extends AppComponentBase
6969

7070
getCheckedPermissions(): string[] {
7171
const permissions: string[] = [];
72-
_.forEach(this.checkedPermissionsMap, function (value, key) {
72+
_forEach(this.checkedPermissionsMap, function (value, key) {
7373
if (value) {
7474
permissions.push(key);
7575
}

angular/src/app/users/create-user/create-user-dialog.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
} from '@angular/core';
88
import { finalize } from 'rxjs/operators';
99
import { BsModalRef } from 'ngx-bootstrap/modal';
10-
import * as _ from 'lodash';
10+
import { forEach as _forEach, map as _map } from 'lodash-es';
1111
import { AppComponentBase } from '@shared/app-component-base';
1212
import {
1313
UserServiceProxy,
@@ -60,7 +60,7 @@ export class CreateUserDialogComponent extends AppComponentBase
6060
}
6161

6262
setInitialRolesStatus(): void {
63-
_.map(this.roles, (item) => {
63+
_map(this.roles, (item) => {
6464
this.checkedRolesMap[item.normalizedName] = this.isRoleChecked(
6565
item.normalizedName
6666
);
@@ -79,7 +79,7 @@ export class CreateUserDialogComponent extends AppComponentBase
7979

8080
getCheckedRoles(): string[] {
8181
const roles: string[] = [];
82-
_.forEach(this.checkedRolesMap, function (value, key) {
82+
_forEach(this.checkedRolesMap, function (value, key) {
8383
if (value) {
8484
roles.push(key);
8585
}

angular/src/app/users/edit-user/edit-user-dialog.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
} from '@angular/core';
88
import { finalize } from 'rxjs/operators';
99
import { BsModalRef } from 'ngx-bootstrap/modal';
10-
import * as _ from 'lodash';
10+
import { forEach as _forEach, includes as _includes, map as _map } from 'lodash-es';
1111
import { AppComponentBase } from '@shared/app-component-base';
1212
import {
1313
UserServiceProxy,
@@ -48,15 +48,15 @@ export class EditUserDialogComponent extends AppComponentBase
4848
}
4949

5050
setInitialRolesStatus(): void {
51-
_.map(this.roles, (item) => {
51+
_map(this.roles, (item) => {
5252
this.checkedRolesMap[item.normalizedName] = this.isRoleChecked(
5353
item.normalizedName
5454
);
5555
});
5656
}
5757

5858
isRoleChecked(normalizedName: string): boolean {
59-
return _.includes(this.user.roleNames, normalizedName);
59+
return _includes(this.user.roleNames, normalizedName);
6060
}
6161

6262
onRoleChange(role: RoleDto, $event) {
@@ -65,7 +65,7 @@ export class EditUserDialogComponent extends AppComponentBase
6565

6666
getCheckedRoles(): string[] {
6767
const roles: string[] = [];
68-
_.forEach(this.checkedRolesMap, function (value, key) {
68+
_forEach(this.checkedRolesMap, function (value, key) {
6969
if (value) {
7070
roles.push(key);
7171
}

angular/src/root.module.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { ModalModule } from 'ngx-bootstrap/modal';
77
import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
88
import { CollapseModule } from 'ngx-bootstrap/collapse';
99
import { TabsModule } from 'ngx-bootstrap/tabs';
10-
import * as _ from 'lodash';
1110

1211
import { AbpHttpInterceptor } from 'abp-ng2-module';
1312

angular/yarn.lock

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,10 +1062,17 @@
10621062
resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-3.5.10.tgz#a1a41012012b5da9d4b205ba9eba58f6cce2ab7b"
10631063
integrity sha512-3F8qpwBAiVc5+HPJeXJpbrl+XjawGmciN5LgiO7Gv1pl1RHtjoMNqZpqEksaPJW05ViKe8snYInRs6xB25Xdew==
10641064

1065-
"@types/lodash@^4.14.150":
1066-
version "4.14.150"
1067-
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.150.tgz#649fe44684c3f1fcb6164d943c5a61977e8cf0bd"
1068-
integrity sha512-kMNLM5JBcasgYscD9x/Gvr6lTAv2NVgsKtet/hm93qMyf/D1pt+7jeEZklKJKxMVmXjxbRVQQGfqDSfipYCO6w==
1065+
"@types/lodash-es@^4.17.3":
1066+
version "4.17.3"
1067+
resolved "https://registry.npm.taobao.org/@types/lodash-es/download/@types/lodash-es-4.17.3.tgz#87eb0b3673b076b8ee655f1890260a136af09a2d"
1068+
integrity sha1-h+sLNnOwdrjuZV8YkCYKE2rwmi0=
1069+
dependencies:
1070+
"@types/lodash" "*"
1071+
1072+
"@types/lodash@*":
1073+
version "4.14.161"
1074+
resolved "https://registry.npm.taobao.org/@types/lodash/download/@types/lodash-4.14.161.tgz#a21ca0777dabc6e4f44f3d07f37b765f54188b18"
1075+
integrity sha1-ohygd32rxuT0Tz0H83t2X1QYixg=
10691076

10701077
"@types/minimatch@*":
10711078
version "3.0.3"
@@ -5065,6 +5072,11 @@ locate-path@^5.0.0:
50655072
dependencies:
50665073
p-locate "^4.1.0"
50675074

5075+
lodash-es@^4.17.15:
5076+
version "4.17.15"
5077+
resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.15.tgz#21bd96839354412f23d7a10340e5eac6ee455d78"
5078+
integrity sha512-rlrc3yU3+JNOpZ9zj5pQtxnx2THmvRykwL4Xlxoa8I9lHBlVbbyPhgyPMioxVZ4NqyxaVVtaJnzsyOidQIhyyQ==
5079+
50685080
lodash.clonedeep@^4.5.0:
50695081
version "4.5.0"
50705082
resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef"
@@ -5080,7 +5092,7 @@ lodash.uniq@^4.5.0:
50805092
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
50815093
integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=
50825094

5083-
lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.4:
5095+
lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15:
50845096
version "4.17.15"
50855097
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
50865098
integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==

0 commit comments

Comments
 (0)