Browse Source

chore: update the bookstore angular mondb sample project

pull/2947/head
mehmet-erim 6 years ago
parent
commit
74fa9d320f
  1. 2
      docs/en/Blog-Posts/2019-08-16 v0_19_Release/Post.md
  2. 2
      samples/BookStore-Angular-MongoDb/angular/README.md
  3. 48
      samples/BookStore-Angular-MongoDb/angular/angular.json
  4. 2
      samples/BookStore-Angular-MongoDb/angular/e2e/src/app.e2e-spec.ts
  5. 2
      samples/BookStore-Angular-MongoDb/angular/karma.conf.js
  6. 41
      samples/BookStore-Angular-MongoDb/angular/package.json
  7. 66
      samples/BookStore-Angular-MongoDb/angular/src/app/app-routing.module.ts
  8. 68
      samples/BookStore-Angular-MongoDb/angular/src/app/app.component.spec.ts
  9. 25
      samples/BookStore-Angular-MongoDb/angular/src/app/app.component.ts
  10. 29
      samples/BookStore-Angular-MongoDb/angular/src/app/app.module.ts
  11. 129
      samples/BookStore-Angular-MongoDb/angular/src/app/books/book-list/book-list.component.html
  12. 84
      samples/BookStore-Angular-MongoDb/angular/src/app/books/book-list/book-list.component.ts
  13. 17
      samples/BookStore-Angular-MongoDb/angular/src/app/books/books-routing.module.ts
  14. 13
      samples/BookStore-Angular-MongoDb/angular/src/app/books/books.component.ts
  15. 16
      samples/BookStore-Angular-MongoDb/angular/src/app/books/books.module.ts
  16. 17
      samples/BookStore-Angular-MongoDb/angular/src/app/books/shared/books.service.ts
  17. 31
      samples/BookStore-Angular-MongoDb/angular/src/app/home/home.component.html
  18. 51
      samples/BookStore-Angular-MongoDb/angular/src/app/home/home.component.spec.ts
  19. 2
      samples/BookStore-Angular-MongoDb/angular/src/app/home/home.component.ts
  20. 7
      samples/BookStore-Angular-MongoDb/angular/src/app/lazy-libs/setting-management-wrapper.module.ts
  21. 13
      samples/BookStore-Angular-MongoDb/angular/src/app/store/actions/books.actions.ts
  22. 2
      samples/BookStore-Angular-MongoDb/angular/src/app/store/models/books.ts
  23. 32
      samples/BookStore-Angular-MongoDb/angular/src/app/store/states/books.state.ts
  24. 4
      samples/BookStore-Angular-MongoDb/angular/src/environments/environment.hmr.ts
  25. 4
      samples/BookStore-Angular-MongoDb/angular/src/environments/environment.prod.ts
  26. 4
      samples/BookStore-Angular-MongoDb/angular/src/environments/environment.ts
  27. BIN
      samples/BookStore-Angular-MongoDb/angular/src/favicon.ico
  28. 2
      samples/BookStore-Angular-MongoDb/angular/src/index.html
  29. 1
      samples/BookStore-Angular-MongoDb/angular/src/styles.scss
  30. 10
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application.Contracts/Acme.BookStore.Application.Contracts.csproj
  31. 2
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application.Contracts/BookDto.cs
  32. 2
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application.Contracts/CreateUpdateBookDto.cs
  33. 4
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application.Contracts/IBookAppService.cs
  34. 10
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application/Acme.BookStore.Application.csproj
  35. 8
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application/IBookAppService.cs
  36. 2
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.DbMigrator/Acme.BookStore.DbMigrator.csproj
  37. 10
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.DbMigrator/Logs/logs.txt
  38. 2
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.DbMigrator/appsettings.json
  39. 1
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.DbMigrator/tempkey.rsa
  40. 16
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/Acme.BookStore.Domain.Shared.csproj
  41. 2
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/BookStoreDomainSharedModule.cs
  42. 2
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/BookType.cs
  43. 16
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/Localization/BookStore/en.json
  44. 8
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/Localization/BookStore/zh-Hant.json
  45. 19
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain/Acme.BookStore.Domain.csproj
  46. 16
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain/Book.cs
  47. 52
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain/BookStoreDataSeederContributor.cs
  48. 50
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain/Data/BookStoreDbMigrationService.cs
  49. 10
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Client/Acme.BookStore.HttpApi.Client.csproj
  50. 13
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/Acme.BookStore.HttpApi.Host.csproj
  51. 6
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/BookStoreHttpApiHostModule.cs
  52. 1
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/Program.cs
  53. 6
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/Properties/launchSettings.json
  54. 4
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/Startup.cs
  55. 4
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/appsettings.json
  56. 2
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/package.json
  57. 112
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/wwwroot/libs/abp/core/abp.css
  58. 1270
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/wwwroot/libs/abp/core/abp.js
  59. 780
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/wwwroot/libs/abp/jquery/abp.jquery.js
  60. 40
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/wwwroot/libs/jquery-validation/jquery.validate.js
  61. 2765
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/wwwroot/libs/luxon/luxon.js
  62. 2
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/wwwroot/libs/luxon/luxon.js.map
  63. 2
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/wwwroot/libs/luxon/luxon.min.js
  64. 2
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/wwwroot/libs/luxon/luxon.min.js.map
  65. 8
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/wwwroot/libs/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.concat.min.js
  66. 2534
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/wwwroot/libs/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.css
  67. 4914
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/wwwroot/libs/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.js
  68. 72
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/wwwroot/libs/malihu-custom-scrollbar-plugin/package.json
  69. 162
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/wwwroot/libs/malihu-custom-scrollbar-plugin/readme.md
  70. 257
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/yarn.lock
  71. 10
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi/Acme.BookStore.HttpApi.csproj
  72. 16
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.MongoDB/Acme.BookStore.MongoDB.csproj
  73. 3
      samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.MongoDB/MongoDb/BookStoreMongoDbContext.cs
  74. 2
      samples/BookStore-Angular-MongoDb/aspnet-core/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Acme.BookStore.HttpApi.Client.ConsoleTestApp.csproj
  75. 2
      samples/BookStore-Angular-MongoDb/aspnet-core/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs
  76. 4
      samples/BookStore-Angular-MongoDb/aspnet-core/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/appsettings.json
  77. 6
      samples/BookStore-Angular-MongoDb/aspnet-core/test/Acme.BookStore.TestBase/Acme.BookStore.TestBase.csproj
  78. 2
      samples/BookStore-Angular-MongoDb/aspnet-core/test/Acme.BookStore.TestBase/BookStoreTestBase.cs

2
docs/en/Blog-Posts/2019-08-16 v0_19_Release/Post.md

@ -16,7 +16,7 @@ Finally, ABP has a **SPA UI** option with the latest [Angular](https://angular.i
We've created the template, document and infrastructure based on the latest Angular tools and trends: We've created the template, document and infrastructure based on the latest Angular tools and trends:
* Uses [NgBootstrap](https://ng-bootstrap.github.io/) and [PrimeNG](https://www.primefaces.org/primeng/) as the UI component libraries. You can use your favorite library, no problem, but pre-built modules work with these libraries. * Uses [NgBootstrap](https://ng-bootstrap.github.io/) as the UI component library. You can use your favorite library, no problem, but pre-built modules work with these libraries.
* Uses [NGXS](https://ngxs.gitbook.io/ngxs/) as the state management library. * Uses [NGXS](https://ngxs.gitbook.io/ngxs/) as the state management library.
Angular was the first SPA UI option, but it is not the last. After v1.0 release, we will start to work on a second UI option. Not decided yet, but candidates are Blazor, React and Vue.js. Waiting your feedback. You can thumb up using the following issues: Angular was the first SPA UI option, but it is not the last. After v1.0 release, we will start to work on a second UI option. Not decided yet, but candidates are Blazor, React and Vue.js. Waiting your feedback. You can thumb up using the following issues:

2
samples/BookStore-Angular-MongoDb/angular/README.md

@ -1,6 +1,6 @@
# BookStore # BookStore
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.0.3. This is a startup project based on the ABP framework. For more information, visit <a href="https://abp.io/" target="_blank">abp.io</a>
## Development server ## Development server

48
samples/BookStore-Angular-MongoDb/angular/angular.json

@ -3,7 +3,7 @@
"version": 1, "version": 1,
"newProjectRoot": "projects", "newProjectRoot": "projects",
"projects": { "projects": {
"myProjectName": { "bookStore": {
"projectType": "application", "projectType": "application",
"schematics": { "schematics": {
"@schematics/angular:component": { "@schematics/angular:component": {
@ -17,20 +17,42 @@
"build": { "build": {
"builder": "@angular-devkit/build-angular:browser", "builder": "@angular-devkit/build-angular:browser",
"options": { "options": {
"outputPath": "dist/myProjectName", "outputPath": "dist/bookStore",
"index": "src/index.html", "index": "src/index.html",
"main": "src/main.ts", "main": "src/main.ts",
"polyfills": "src/polyfills.ts", "polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json", "tsConfig": "tsconfig.app.json",
"aot": false, "aot": false,
"extractCss": true,
"assets": ["src/favicon.ico", "src/assets"], "assets": ["src/favicon.ico", "src/assets"],
"styles": [ "styles": [
"src/styles.scss", "src/styles.scss",
"node_modules/bootstrap/dist/css/bootstrap.min.css", "node_modules/bootstrap/dist/css/bootstrap.min.css",
"node_modules/font-awesome/css/font-awesome.min.css", {
"node_modules/primeng/resources/themes/nova-light/theme.css", "input": "node_modules/@fortawesome/fontawesome-free/css/all.min.css",
"node_modules/primeicons/primeicons.css", "lazy": true,
"node_modules/primeng/resources/primeng.min.css" "bundleName": "fontawesome-all.min"
},
{
"input": "node_modules/@fortawesome/fontawesome-free/css/v4-shims.min.css",
"lazy": true,
"bundleName": "fontawesome-v4-shims.min"
},
{
"input": "node_modules/primeng/resources/themes/nova-light/theme.css",
"lazy": true,
"bundleName": "primeng-nova-light-theme"
},
{
"input": "node_modules/primeicons/primeicons.css",
"lazy": true,
"bundleName": "primeicons"
},
{
"input": "node_modules/primeng/resources/primeng.min.css",
"lazy": true,
"bundleName": "primeng.min"
}
], ],
"scripts": [] "scripts": []
}, },
@ -72,22 +94,22 @@
"serve": { "serve": {
"builder": "@angular-devkit/build-angular:dev-server", "builder": "@angular-devkit/build-angular:dev-server",
"options": { "options": {
"browserTarget": "myProjectName:build" "browserTarget": "bookStore:build"
}, },
"configurations": { "configurations": {
"production": { "production": {
"browserTarget": "myProjectName:build:production" "browserTarget": "bookStore:build:production"
}, },
"hmr": { "hmr": {
"hmr": true, "hmr": true,
"browserTarget": "myProjectName:build:hmr" "browserTarget": "bookStore:build:hmr"
} }
} }
}, },
"extract-i18n": { "extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n", "builder": "@angular-devkit/build-angular:extract-i18n",
"options": { "options": {
"browserTarget": "myProjectName:build" "browserTarget": "bookStore:build"
} }
}, },
"test": { "test": {
@ -120,16 +142,16 @@
"builder": "@angular-devkit/build-angular:protractor", "builder": "@angular-devkit/build-angular:protractor",
"options": { "options": {
"protractorConfig": "e2e/protractor.conf.js", "protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "myProjectName:serve" "devServerTarget": "bookStore:serve"
}, },
"configurations": { "configurations": {
"production": { "production": {
"devServerTarget": "myProjectName:serve:production" "devServerTarget": "bookStore:serve:production"
} }
} }
} }
} }
} }
}, },
"defaultProject": "myProjectName" "defaultProject": "bookStore"
} }

2
samples/BookStore-Angular-MongoDb/angular/e2e/src/app.e2e-spec.ts

@ -10,7 +10,7 @@ describe('workspace-project App', () => {
it('should display welcome message', () => { it('should display welcome message', () => {
page.navigateTo(); page.navigateTo();
expect(page.getTitleText()).toEqual('Welcome to myProjectName!'); expect(page.getTitleText()).toEqual('Welcome to bookStore!');
}); });
afterEach(async () => { afterEach(async () => {

2
samples/BookStore-Angular-MongoDb/angular/karma.conf.js

@ -16,7 +16,7 @@ module.exports = function (config) {
clearContext: false // leave Jasmine Spec Runner output visible in browser clearContext: false // leave Jasmine Spec Runner output visible in browser
}, },
coverageIstanbulReporter: { coverageIstanbulReporter: {
dir: require('path').join(__dirname, './coverage/myProjectName'), dir: require('path').join(__dirname, './coverage/bookStore'),
reports: ['html', 'lcovonly', 'text-summary'], reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true fixWebpackSourcePaths: true
}, },

41
samples/BookStore-Angular-MongoDb/angular/package.json

@ -6,37 +6,38 @@
"start": "ng serve", "start": "ng serve",
"start:hmr": "ng serve --configuration hmr", "start:hmr": "ng serve --configuration hmr",
"build": "ng build", "build": "ng build",
"build:prod": "ng build --configuration production", "build:prod": "ng build --prod",
"test": "ng test", "test": "ng test",
"lint": "ng lint", "lint": "ng lint",
"e2e": "ng e2e" "e2e": "ng e2e"
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@abp/ng.account": "^1.0.2", "@abp/ng.account": "^2.1.0",
"@abp/ng.identity": "^1.0.2", "@abp/ng.identity": "^2.1.0",
"@abp/ng.tenant-management": "^1.0.2", "@abp/ng.setting-management": "^2.1.0",
"@abp/ng.theme.basic": "^1.0.2", "@abp/ng.tenant-management": "^2.1.0",
"@angular/animations": "~8.2.2", "@abp/ng.theme.basic": "^2.1.0",
"@angular/common": "~8.2.2", "@angular/animations": "~8.2.14",
"@angular/compiler": "~8.2.2", "@angular/common": "~8.2.14",
"@angular/core": "~8.2.2", "@angular/compiler": "~8.2.14",
"@angular/forms": "~8.2.2", "@angular/core": "~8.2.14",
"@angular/platform-browser": "~8.2.2", "@angular/forms": "~8.2.14",
"@angular/platform-browser-dynamic": "~8.2.2", "@angular/platform-browser": "~8.2.14",
"@angular/router": "~8.2.2", "@angular/platform-browser-dynamic": "~8.2.14",
"@angularclass/hmr": "^2.1.3", "@angular/router": "~8.2.14",
"@ngxs/devtools-plugin": "^3.5.0",
"@ngxs/hmr-plugin": "^3.5.0",
"rxjs": "~6.4.0", "rxjs": "~6.4.0",
"tslib": "^1.10.0", "tslib": "^1.10.0",
"zone.js": "~0.9.1" "zone.js": "~0.9.1"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "~0.802.2", "@angular-devkit/build-angular": "~0.803.20",
"@angular/cli": "~8.2.2", "@angular/cli": "~8.3.20",
"@angular/compiler-cli": "~8.2.2", "@angular/compiler-cli": "~8.2.14",
"@angular/language-service": "~8.2.2", "@angular/language-service": "~8.2.14",
"@angularclass/hmr": "^2.1.3",
"@ngxs/hmr-plugin": "^3.5.1",
"@ngxs/logger-plugin": "^3.5.1",
"@types/jasmine": "~3.3.8", "@types/jasmine": "~3.3.8",
"@types/jasminewd2": "~2.0.3", "@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4", "@types/node": "~8.9.4",

66
samples/BookStore-Angular-MongoDb/angular/src/app/app-routing.module.ts

@ -1,51 +1,61 @@
import { IDENTITY_ROUTES } from '@abp/ng.identity'; import { ABP } from "@abp/ng.core";
import { ACCOUNT_ROUTES } from '@abp/ng.account'; import { NgModule } from "@angular/core";
import { NgModule } from '@angular/core'; import { RouterModule, Routes } from "@angular/router";
import { Routes, RouterModule } from '@angular/router'; import { ApplicationLayoutComponent } from "@abp/ng.theme.basic";
import { ABP } from '@abp/ng.core';
import { TENANT_MANAGEMENT_ROUTES } from '@abp/ng.tenant-management';
import { ApplicationLayoutComponent } from '@abp/ng.theme.basic';
const routes: Routes = [ const routes: Routes = [
{ {
path: '', path: "",
loadChildren: () => import('./home/home.module').then(m => m.HomeModule), loadChildren: () => import("./home/home.module").then(m => m.HomeModule),
data: { data: {
routes: { routes: {
name: '::Menu:Home', name: "::Menu:Home"
} as ABP.Route, } as ABP.Route
}, }
}, },
{ {
path: 'account', path: "account",
loadChildren: () => import('./lazy-libs/account-wrapper.module').then(m => m.AccountWrapperModule), loadChildren: () =>
data: { routes: ACCOUNT_ROUTES }, import("./lazy-libs/account-wrapper.module").then(
m => m.AccountWrapperModule
)
},
{
path: "identity",
loadChildren: () =>
import("./lazy-libs/identity-wrapper.module").then(
m => m.IdentityWrapperModule
)
}, },
{ {
path: 'identity', path: "tenant-management",
loadChildren: () => import('./lazy-libs/identity-wrapper.module').then(m => m.IdentityWrapperModule), loadChildren: () =>
data: { routes: IDENTITY_ROUTES }, import("./lazy-libs/tenant-management-wrapper.module").then(
m => m.TenantManagementWrapperModule
)
}, },
{ {
path: 'tenant-management', path: "setting-management",
loadChildren: () => loadChildren: () =>
import('./lazy-libs/tenant-management-wrapper.module').then(m => m.TenantManagementWrapperModule), import("./lazy-libs/setting-management-wrapper.module").then(
data: { routes: TENANT_MANAGEMENT_ROUTES }, m => m.SettingManagementWrapperModule
)
}, },
{ {
path: 'books', path: "books",
component: ApplicationLayoutComponent, component: ApplicationLayoutComponent,
loadChildren: () => import('./books/books.module').then(m => m.BooksModule), loadChildren: () => import("./books/books.module").then(m => m.BooksModule),
data: { data: {
routes: { routes: {
name: 'Books', name: "::Menu:Books",
} as ABP.Route, iconClass: "fas fa-book"
}, } as ABP.Route
}, }
}
]; ];
@NgModule({ @NgModule({
imports: [RouterModule.forRoot(routes)], imports: [RouterModule.forRoot(routes)],
exports: [RouterModule], exports: [RouterModule]
}) })
export class AppRoutingModule {} export class AppRoutingModule {}

68
samples/BookStore-Angular-MongoDb/angular/src/app/app.component.spec.ts

@ -0,0 +1,68 @@
import { LazyLoadService } from '@abp/ng.core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { NgxsModule } from '@ngxs/store';
import { OAuthService } from 'angular-oauth2-oidc';
import { AppComponent } from './app.component';
import { LoaderBarComponent } from '@abp/ng.theme.shared';
import { Subject, Observable } from 'rxjs';
import { Component } from '@angular/core';
import { By } from '@angular/platform-browser';
@Component({
template: '',
selector: 'abp-loader-bar',
})
class DummyLoaderBarComponent {}
describe('AppComponent', () => {
let component: AppComponent;
let fixture: ComponentFixture<AppComponent>;
let mockLazyLoadService: { load: () => Observable<void> };
let loadResponse$: Subject<void>;
let spy: jasmine.Spy<() => Observable<void>>;
beforeEach(() => {
TestBed.configureTestingModule({
imports: [RouterTestingModule],
declarations: [AppComponent, DummyLoaderBarComponent],
providers: [{ provide: LazyLoadService, useValue: { load: () => loadResponse$ } }],
});
loadResponse$ = new Subject();
fixture = TestBed.createComponent(AppComponent);
component = fixture.componentInstance;
mockLazyLoadService = TestBed.get(LazyLoadService);
spy = spyOn(mockLazyLoadService, 'load');
spy.and.returnValue(loadResponse$);
fixture.detectChanges();
});
describe('LazyLoadService load method', () => {
it('should call', () => {
expect(spy).toHaveBeenCalledWith(
[
'primeng.min.css',
'primeicons.css',
'primeng-nova-light-theme.css',
'fontawesome-all.min.css',
'fontawesome-v4-shims.min.css',
],
'style',
null,
'head',
);
});
});
describe('template', () => {
it('should have the abp-loader-bar', () => {
const abpLoader = fixture.debugElement.query(By.css('abp-loader-bar'));
expect(abpLoader).toBeTruthy();
});
it('should have router-outlet', () => {
const abpLoader = fixture.debugElement.query(By.css('router-outlet'));
expect(abpLoader).toBeTruthy();
});
});
});

25
samples/BookStore-Angular-MongoDb/angular/src/app/app.component.ts

@ -1,4 +1,5 @@
import { Component } from '@angular/core'; import { LazyLoadService } from '@abp/ng.core';
import { Component, OnInit } from '@angular/core';
@Component({ @Component({
selector: 'app-root', selector: 'app-root',
@ -7,4 +8,24 @@ import { Component } from '@angular/core';
<router-outlet></router-outlet> <router-outlet></router-outlet>
`, `,
}) })
export class AppComponent {} export class AppComponent implements OnInit {
constructor(private lazyLoadService: LazyLoadService) {}
ngOnInit() {
this.lazyLoadService
.load(
[
'primeng.min.css',
'primeicons.css',
'primeng-nova-light-theme.css',
'fontawesome-all.min.css',
'fontawesome-v4-shims.min.css',
],
'style',
null,
'head',
'afterbegin',
)
.subscribe();
}
}

29
samples/BookStore-Angular-MongoDb/angular/src/app/app.module.ts

@ -1,41 +1,44 @@
import { AccountConfigModule } from '@abp/ng.account.config';
import { CoreModule } from '@abp/ng.core'; import { CoreModule } from '@abp/ng.core';
import { IdentityConfigModule } from '@abp/ng.identity.config';
import { SettingManagementConfigModule } from '@abp/ng.setting-management.config';
import { TenantManagementConfigModule } from '@abp/ng.tenant-management.config';
import { LAYOUTS } from '@abp/ng.theme.basic'; import { LAYOUTS } from '@abp/ng.theme.basic';
import { ThemeSharedModule } from '@abp/ng.theme.shared';
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser'; import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NgxsReduxDevtoolsPluginModule } from '@ngxs/devtools-plugin'; import { NgxsLoggerPluginModule } from '@ngxs/logger-plugin';
import { NgxsModule } from '@ngxs/store'; import { NgxsModule } from '@ngxs/store';
import { OAuthModule } from 'angular-oauth2-oidc';
import { environment } from '../environments/environment'; import { environment } from '../environments/environment';
import { AppRoutingModule } from './app-routing.module'; import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component'; import { AppComponent } from './app.component';
import { SharedModule } from './shared/shared.module'; import { SharedModule } from './shared/shared.module';
import { ThemeSharedModule } from '@abp/ng.theme.shared';
import { AccountProviders } from '@abp/ng.account';
import { IdentityProviders } from '@abp/ng.identity';
import { TenantManagementProviders } from '@abp/ng.tenant-management';
import { BooksState } from './store/states/books.state'; import { BooksState } from './store/states/books.state';
const LOGGERS = [NgxsLoggerPluginModule.forRoot({ disabled: false })];
@NgModule({ @NgModule({
declarations: [AppComponent],
imports: [ imports: [
ThemeSharedModule.forRoot(),
CoreModule.forRoot({ CoreModule.forRoot({
environment, environment,
requirements: { requirements: {
layouts: LAYOUTS, layouts: LAYOUTS,
}, },
}), }),
OAuthModule.forRoot(), ThemeSharedModule.forRoot(),
NgxsModule.forRoot([]), AccountConfigModule.forRoot({ redirectUrl: '/' }),
IdentityConfigModule,
TenantManagementConfigModule,
SettingManagementConfigModule,
NgxsModule.forRoot([BooksState]),
BrowserModule, BrowserModule,
BrowserAnimationsModule, BrowserAnimationsModule,
AppRoutingModule, AppRoutingModule,
SharedModule, SharedModule,
NgxsModule.forRoot([BooksState, ]), ...(environment.production ? [] : LOGGERS),
NgxsReduxDevtoolsPluginModule.forRoot({ disabled: environment.production }),
], ],
providers: [...AccountProviders({ redirectUrl: '/' }), ...IdentityProviders(), ...TenantManagementProviders()], declarations: [AppComponent],
bootstrap: [AppComponent], bootstrap: [AppComponent],
}) })
export class AppModule {} export class AppModule {}

129
samples/BookStore-Angular-MongoDb/angular/src/app/books/book-list/book-list.component.html

@ -1,81 +1,115 @@
<div id="wrapper" class="card"> <div class="card">
<div class="card-header"> <div class="card-header">
<div class="row"> <div class="row">
<div class="col col-md-6"> <div class="col col-md-6">
<h5 class="card-title"> <h5 class="card-title">
Books {{ "::Menu:Books" | abpLocalization }}
</h5> </h5>
</div> </div>
<div class="text-right col col-md-6"> <div class="text-right col col-md-6">
<button id="create-role" class="btn btn-primary" type="button" (click)="createBook()"> <div class="text-lg-right pt-2">
<i class="fa fa-plus mr-1"></i> <span>New book</span> <button
</button> id="create"
class="btn btn-primary"
type="button"
(click)="createBook()"
>
<i class="fa fa-plus mr-1"></i>
<span>{{ "::NewBook" | abpLocalization }}</span>
</button>
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="card-body"> <div class="card-body">
<p-table [value]="books$ | async" [loading]="loading" [paginator]="true" [rows]="10"> <abp-table
<ng-template pTemplate="header"> [value]="books$ | async"
<tr> [abpLoading]="loading"
<th>Actions</th> [headerTemplate]="tableHeader"
<th>Book name</th> [bodyTemplate]="tableBody"
<th>Book type</th> [rows]="10"
<th>Publish date</th> [scrollable]="true"
<th>Price</th> >
</tr> </abp-table>
</ng-template> <ng-template #tableHeader>
<ng-template pTemplate="body" let-data> <tr>
<tr> <th>{{ "::Actions" | abpLocalization }}</th>
<td> <th>{{ "::Name" | abpLocalization }}</th>
<div ngbDropdown class="d-inline-block"> <th>{{ "::Type" | abpLocalization }}</th>
<button <th>{{ "::PublishDate" | abpLocalization }}</th>
class="btn btn-primary btn-sm dropdown-toggle" <th>{{ "::Price" | abpLocalization }}</th>
data-toggle="dropdown" </tr>
aria-haspopup="true" </ng-template>
ngbDropdownToggle <ng-template #tableBody let-data>
> <tr>
<i class="fa fa-cog mr-1"></i>Actions <td>
<div ngbDropdown container="body" class="d-inline-block">
<button
class="btn btn-primary btn-sm dropdown-toggle"
data-toggle="dropdown"
aria-haspopup="true"
ngbDropdownToggle
>
<i class="fa fa-cog mr-1"></i>{{ "::Actions" | abpLocalization }}
</button>
<div ngbDropdownMenu>
<button ngbDropdownItem (click)="editBook(data.id)">
{{ "::Edit" | abpLocalization }}
</button>
<button ngbDropdownItem (click)="delete(data.id, data.name)">
{{ "AbpAccount::Delete" | abpLocalization }}
</button> </button>
<div ngbDropdownMenu>
<button ngbDropdownItem (click)="editBook(data.id)">Edit</button>
<button ngbDropdownItem (click)="delete(data.id, data.name)">
Delete
</button>
</div>
</div> </div>
</td> </div>
<td>{{ data.name }}</td> </td>
<td>{{ booksType[data.type] }}</td> <td>{{ data.name }}</td>
<td>{{ data.publishDate | date }}</td> <td>{{ booksType[data.type] }}</td>
<td>{{ data.price }}</td> <td>{{ data.publishDate | date }}</td>
</tr> <td>{{ data.price }}</td>
</ng-template> </tr>
</p-table> </ng-template>
</div> </div>
</div> </div>
<abp-modal [(visible)]="isModalOpen"> <abp-modal [(visible)]="isModalOpen">
<ng-template #abpHeader> <ng-template #abpHeader>
<h3>{{ selectedBook.id ? 'Edit' : 'New Book' }}</h3> <h3>
{{
(selectedBook.id ? "AbpIdentity::Edit" : "::NewBook") | abpLocalization
}}
</h3>
</ng-template> </ng-template>
<ng-template #abpBody> <ng-template #abpBody>
<form [formGroup]="form"> <form [formGroup]="form">
<div class="form-group"> <div class="form-group">
<label for="book-name">Name</label><span> * </span> <label for="book-name">Name</label><span> * </span>
<input type="text" id="book-name" class="form-control" formControlName="name" autofocus /> <input
type="text"
id="book-name"
class="form-control"
formControlName="name"
autofocus
/>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="book-price">Price</label><span> * </span> <label for="book-price">Price</label><span> * </span>
<input type="number" id="book-price" class="form-control" formControlName="price" /> <input
type="number"
id="book-price"
class="form-control"
formControlName="price"
/>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="book-type">Type</label><span> * </span> <label for="book-type">Type</label><span> * </span>
<select class="form-control" id="book-type" formControlName="type"> <select class="form-control" id="book-type" formControlName="type">
<option [ngValue]="null">Select a book type</option> <option [ngValue]="null">Select a book type</option>
<option [ngValue]="booksType[type]" *ngFor="let type of bookTypeArr"> {{ type }}</option> <option [ngValue]="booksType[type]" *ngFor="let type of bookTypeArr">
{{ type }}</option
>
</select> </select>
</div> </div>
@ -95,11 +129,12 @@
<ng-template #abpFooter> <ng-template #abpFooter>
<button type="button" class="btn btn-secondary" #abpClose> <button type="button" class="btn btn-secondary" #abpClose>
Cancel {{ "AbpAccount::Close" | abpLocalization }}
</button> </button>
<button class="btn btn-primary" (click)="save()">
<button class="btn btn-primary" (click)="save()" [disabled]="form.invalid">
<i class="fa fa-check mr-1"></i> <i class="fa fa-check mr-1"></i>
Save {{ "AbpAccount::Save" | abpLocalization }}
</button> </button>
</ng-template> </ng-template>
</abp-modal> </abp-modal>

84
samples/BookStore-Angular-MongoDb/angular/src/app/books/book-list/book-list.component.ts

@ -1,19 +1,22 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from "@angular/core";
import { Store, Select } from '@ngxs/store'; import { Store, Select } from "@ngxs/store";
import { BooksState } from '../../store/states'; import { BooksState } from "../../store/states";
import { Observable } from 'rxjs'; import { Observable } from "rxjs";
import { Books } from '../../store/models'; import { Books } from "../../store/models";
import { GetBooks, CreateUpdateBook, DeleteBook } from '../../store/actions'; import { GetBooks, CreateUpdateBook, DeleteBook } from "../../store/actions";
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { FormGroup, FormBuilder, Validators } from "@angular/forms";
import { NgbDateNativeAdapter, NgbDateAdapter } from '@ng-bootstrap/ng-bootstrap'; import {
import { BooksService } from '../shared/books.service'; NgbDateNativeAdapter,
import { ConfirmationService, Toaster } from '@abp/ng.theme.shared'; NgbDateAdapter
} from "@ng-bootstrap/ng-bootstrap";
import { BooksService } from "../shared/books.service";
import { ConfirmationService, Confirmation } from "@abp/ng.theme.shared";
@Component({ @Component({
selector: 'app-book-list', selector: "app-book-list",
templateUrl: './book-list.component.html', templateUrl: "./book-list.component.html",
styleUrls: ['./book-list.component.scss'], styleUrls: ["./book-list.component.scss"],
providers: [{ provide: NgbDateAdapter, useClass: NgbDateNativeAdapter }], providers: [{ provide: NgbDateAdapter, useClass: NgbDateNativeAdapter }]
}) })
export class BookListComponent implements OnInit { export class BookListComponent implements OnInit {
@Select(BooksState.getBooks) @Select(BooksState.getBooks)
@ -21,39 +24,36 @@ export class BookListComponent implements OnInit {
booksType = Books.BookType; booksType = Books.BookType;
bookTypeArr = Object.keys(Books.BookType).filter(
bookType => typeof this.booksType[bookType] === "number"
);
loading = false; loading = false;
isModalOpen = false; isModalOpen = false;
form: FormGroup; form: FormGroup;
bookTypeArr = Object.keys(Books.BookType).filter(bookType => typeof this.booksType[bookType] === 'number');
selectedBook = {} as Books.Book; selectedBook = {} as Books.Book;
constructor( constructor(
private store: Store, private store: Store,
private fb: FormBuilder, private fb: FormBuilder,
private booksService: BooksService, private booksService: BooksService,
private confirmationService: ConfirmationService, private confirmationService: ConfirmationService
) {} ) {}
ngOnInit() { ngOnInit() {
this.get();
}
get() {
this.loading = true; this.loading = true;
this.store.dispatch(new GetBooks()).subscribe(() => { this.store.dispatch(new GetBooks()).subscribe(() => {
this.loading = false; this.loading = false;
}); });
} }
buildForm() {
this.form = this.fb.group({
name: [this.selectedBook.name || '', Validators.required],
type: this.selectedBook.type || null,
publishDate: this.selectedBook.publishDate ? new Date(this.selectedBook.publishDate) : null,
price: this.selectedBook.price || null,
});
}
createBook() { createBook() {
this.selectedBook = {} as Books.Book; this.selectedBook = {} as Books.Book;
this.buildForm(); this.buildForm();
@ -68,23 +68,41 @@ export class BookListComponent implements OnInit {
}); });
} }
buildForm() {
console.warn(this.selectedBook);
this.form = this.fb.group({
name: [this.selectedBook.name || "", Validators.required],
type: [this.selectedBook.type || null, Validators.required],
publishDate: [
this.selectedBook.publishDate
? new Date(this.selectedBook.publishDate)
: null,
Validators.required
],
price: [this.selectedBook.price || null, Validators.required]
});
}
save() { save() {
if (this.form.invalid) { if (this.form.invalid) {
return; return;
} }
this.store.dispatch(new CreateUpdateBook(this.form.value, this.selectedBook.id)).subscribe(() => { this.store
this.isModalOpen = false; .dispatch(new CreateUpdateBook(this.form.value, this.selectedBook.id))
this.form.reset(); .subscribe(() => {
}); this.isModalOpen = false;
this.form.reset();
this.get();
});
} }
delete(id: string, name: string) { delete(id: string, name: string) {
this.confirmationService this.confirmationService
.error(`${name} will be deleted. Do you confirm that?`, 'Are you sure?') .warn("::AreYouSureToDelete", "AbpAccount::AreYouSure")
.subscribe(status => { .subscribe(status => {
if (status === Toaster.Status.confirm) { if (status === Confirmation.Status.confirm) {
this.store.dispatch(new DeleteBook(id)); this.store.dispatch(new DeleteBook(id)).subscribe(() => this.get());
} }
}); });
} }

17
samples/BookStore-Angular-MongoDb/angular/src/app/books/books-routing.module.ts

@ -1,18 +1,19 @@
import { NgModule } from '@angular/core'; import { NgModule } from "@angular/core";
import { RouterModule, Routes } from '@angular/router'; import { Routes, RouterModule } from "@angular/router";
import { BooksComponent } from './books.component';
import { BookListComponent } from './book-list/book-list.component'; import { BooksComponent } from "./books.component";
import { BookListComponent } from "./book-list/book-list.component";
const routes: Routes = [ const routes: Routes = [
{ {
path: '', path: "",
component: BooksComponent, component: BooksComponent,
children: [{ path: '', component: BookListComponent }], children: [{ path: "", component: BookListComponent }]
}, }
]; ];
@NgModule({ @NgModule({
imports: [RouterModule.forChild(routes)], imports: [RouterModule.forChild(routes)],
exports: [RouterModule], exports: [RouterModule]
}) })
export class BooksRoutingModule {} export class BooksRoutingModule {}

13
samples/BookStore-Angular-MongoDb/angular/src/app/books/books.component.ts

@ -1,8 +1,15 @@
import { Component } from '@angular/core'; import { Component, OnInit } from '@angular/core';
@Component({ @Component({
selector: 'app-books', selector: 'app-books',
templateUrl: './books.component.html', templateUrl: './books.component.html',
styleUrls: ['./books.component.scss'], styleUrls: ['./books.component.scss']
}) })
export class BooksComponent {} export class BooksComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}

16
samples/BookStore-Angular-MongoDb/angular/src/app/books/books.module.ts

@ -1,14 +1,14 @@
import { NgModule } from '@angular/core'; import { NgModule } from "@angular/core";
import { CommonModule } from '@angular/common'; import { CommonModule } from "@angular/common";
import { BooksRoutingModule } from './books-routing.module'; import { BooksRoutingModule } from "./books-routing.module";
import { BooksComponent } from './books.component'; import { BooksComponent } from "./books.component";
import { SharedModule } from '../shared/shared.module'; import { BookListComponent } from "./book-list/book-list.component";
import { NgbDatepickerModule } from '@ng-bootstrap/ng-bootstrap'; import { SharedModule } from "../shared/shared.module";
import { BookListComponent } from './book-list/book-list.component'; import { NgbDatepickerModule } from "@ng-bootstrap/ng-bootstrap";
@NgModule({ @NgModule({
declarations: [BooksComponent, BookListComponent], declarations: [BooksComponent, BookListComponent],
imports: [CommonModule, BooksRoutingModule, SharedModule, NgbDatepickerModule], imports: [CommonModule, BooksRoutingModule, SharedModule, NgbDatepickerModule]
}) })
export class BooksModule {} export class BooksModule {}

17
samples/BookStore-Angular-MongoDb/angular/src/app/books/shared/books.service.ts

@ -4,7 +4,7 @@ import { Books } from '../../store/models';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
@Injectable({ @Injectable({
providedIn: 'root', providedIn: 'root'
}) })
export class BooksService { export class BooksService {
constructor(private restService: RestService) {} constructor(private restService: RestService) {}
@ -12,7 +12,7 @@ export class BooksService {
get(): Observable<Books.Response> { get(): Observable<Books.Response> {
return this.restService.request<void, Books.Response>({ return this.restService.request<void, Books.Response>({
method: 'GET', method: 'GET',
url: '/api/app/book?MaxResultCount=100', url: '/api/app/book'
}); });
} }
@ -20,29 +20,32 @@ export class BooksService {
return this.restService.request<Books.CreateUpdateBookInput, Books.Book>({ return this.restService.request<Books.CreateUpdateBookInput, Books.Book>({
method: 'POST', method: 'POST',
url: '/api/app/book', url: '/api/app/book',
body: createBookInput, body: createBookInput
}); });
} }
getById(id: string): Observable<Books.Book> { getById(id: string): Observable<Books.Book> {
return this.restService.request<void, Books.Book>({ return this.restService.request<void, Books.Book>({
method: 'GET', method: 'GET',
url: `/api/app/book/${id}`, url: `/api/app/book/${id}`
}); });
} }
update(updateBookInput: Books.CreateUpdateBookInput, id: string): Observable<Books.Book> { update(
updateBookInput: Books.CreateUpdateBookInput,
id: string
): Observable<Books.Book> {
return this.restService.request<Books.CreateUpdateBookInput, Books.Book>({ return this.restService.request<Books.CreateUpdateBookInput, Books.Book>({
method: 'PUT', method: 'PUT',
url: `/api/app/book/${id}`, url: `/api/app/book/${id}`,
body: updateBookInput, body: updateBookInput
}); });
} }
delete(id: string): Observable<void> { delete(id: string): Observable<void> {
return this.restService.request<void, void>({ return this.restService.request<void, void>({
method: 'DELETE', method: 'DELETE',
url: `/api/app/book/${id}`, url: `/api/app/book/${id}`
}); });
} }
} }

31
samples/BookStore-Angular-MongoDb/angular/src/app/home/home.component.html

@ -1,15 +1,20 @@
<div class="card"> <div id="AbpContentToolbar"></div>
<div class="card-header">{{ '::Welcome' | abpLocalization }}</div> <div class="jumbotron text-center">
<div class="card-body"> <h1>{{ '::Welcome' | abpLocalization }}</h1>
<p> <div class="row">
{{ '::LongWelcomeMessage' | abpLocalization }} <div class="col-md-6 mx-auto">
</p> <p>{{ '::LongWelcomeMessage' | abpLocalization }}</p>
<p *ngIf="!hasLoggedIn"> <hr class="my-4" />
<a routerLink="/account/login" [state]="{ redirectUrl: '/' }" class="btn btn-primary" role="button" </div>
><i class="fa fa-sign-in"></i>{{ 'AbpIdentity::Login' | abpLocalization }}</a
>
</p>
<hr />
<p class="text-right"><a href="https://abp.io?ref=tmpl" target="_blank">abp.io</a></p>
</div> </div>
<a href="https://abp.io?ref=tmpl" target="_blank" class="btn btn-primary px-4">abp.io</a>
<a
*ngIf="!hasLoggedIn"
routerLink="/account/login"
[state]="{ redirectUrl: '/' }"
class="px-4 btn btn-primary ml-1"
role="button"
id="login-button"
><i class="fa fa-sign-in"></i> {{ 'AbpAccount::Login' | abpLocalization }}</a
>
</div> </div>

51
samples/BookStore-Angular-MongoDb/angular/src/app/home/home.component.spec.ts

@ -0,0 +1,51 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { OAuthService } from 'angular-oauth2-oidc';
import { HomeComponent } from './home.component';
import { HomeModule } from './home.module';
import { RouterTestingModule } from '@angular/router/testing';
import { NgxsModule } from '@ngxs/store';
import { By } from '@angular/platform-browser';
describe('HomeComponent', () => {
let component: HomeComponent;
let fixture: ComponentFixture<HomeComponent>;
let mockOAuthService: { hasValidAccessToken: () => boolean };
beforeEach(() => {
TestBed.configureTestingModule({
imports: [ NgxsModule.forRoot(), HomeModule, RouterTestingModule],
providers: [{ provide: OAuthService, useValue: { hasValidAccessToken: () => false } }],
});
fixture = TestBed.createComponent(HomeComponent);
component = fixture.componentInstance;
mockOAuthService = TestBed.get(OAuthService);
fixture.detectChanges();
});
describe('#hasLoggedIn', () => {
it('should return the hasValidAccessToken method of oAuthService', () => {
const spy = spyOn(mockOAuthService, 'hasValidAccessToken');
spy.and.returnValue(false);
expect(component.hasLoggedIn).toBe(false);
expect(spy).toHaveBeenCalled();
});
});
describe('login button', () => {
it('should display', () => {
const button = fixture.debugElement.query(By.css('[routerLink="/account/login"]'));
expect(button).toBeTruthy();
expect(button.nativeElement.textContent).toContain('AbpAccount::Login');
});
it('should not display when user logged in', () => {
const spy = spyOn(mockOAuthService, 'hasValidAccessToken');
spy.and.returnValue(true);
fixture.detectChanges();
const button = fixture.debugElement.query(By.css('#login-button'));
expect(button).toBeFalsy();
});
});
});

2
samples/BookStore-Angular-MongoDb/angular/src/app/home/home.component.ts

@ -2,7 +2,7 @@ import { Component } from '@angular/core';
import { OAuthService } from 'angular-oauth2-oidc'; import { OAuthService } from 'angular-oauth2-oidc';
@Component({ @Component({
selector: 'abp-home', selector: 'app-home',
templateUrl: './home.component.html', templateUrl: './home.component.html',
}) })
export class HomeComponent { export class HomeComponent {

7
samples/BookStore-Angular-MongoDb/angular/src/app/lazy-libs/setting-management-wrapper.module.ts

@ -0,0 +1,7 @@
import { NgModule } from '@angular/core';
import { SettingManagementModule } from '@abp/ng.setting-management';
@NgModule({
imports: [SettingManagementModule],
})
export class SettingManagementWrapperModule {}

13
samples/BookStore-Angular-MongoDb/angular/src/app/store/actions/books.actions.ts

@ -1,15 +1,18 @@
import { Books } from '../models'; import { Books } from "../models";
export class GetBooks { export class GetBooks {
static readonly type = '[Books] Get'; static readonly type = "[Books] Get";
} }
export class CreateUpdateBook { export class CreateUpdateBook {
static readonly type = '[Books] Create Update Book'; static readonly type = "[Books] Create Update Book";
constructor(public payload: Books.CreateUpdateBookInput, public id?: string) {} constructor(
public payload: Books.CreateUpdateBookInput,
public id?: string
) {}
} }
export class DeleteBook { export class DeleteBook {
static readonly type = '[Books] Delete'; static readonly type = "[Books] Delete";
constructor(public id: string) {} constructor(public id: string) {}
} }

2
samples/BookStore-Angular-MongoDb/angular/src/app/store/models/books.ts

@ -29,7 +29,7 @@ export namespace Books {
Horror, Horror,
Science, Science,
ScienceFiction, ScienceFiction,
Poetry, Poetry
} }
export interface CreateUpdateBookInput { export interface CreateUpdateBookInput {

32
samples/BookStore-Angular-MongoDb/angular/src/app/store/states/books.state.ts

@ -1,12 +1,16 @@
import { State, Action, StateContext, Selector } from '@ngxs/store'; import { State, Action, StateContext, Selector } from "@ngxs/store";
import { Books } from '../models/books'; import {
import { BooksService } from '../../books/shared/books.service'; GetBooks,
import { tap, switchMap } from 'rxjs/operators'; CreateUpdateBook,
import { GetBooks, CreateUpdateBook, DeleteBook } from '../actions/books.actions'; DeleteBook
} from "../actions/books.actions";
import { Books } from "../models/books";
import { BooksService } from "../../books/shared/books.service";
import { tap } from "rxjs/operators";
@State<Books.State>({ @State<Books.State>({
name: 'BooksState', name: "BooksState",
defaults: { books: {} } as Books.State, defaults: { books: {} } as Books.State
}) })
export class BooksState { export class BooksState {
@Selector() @Selector()
@ -21,27 +25,23 @@ export class BooksState {
return this.booksService.get().pipe( return this.booksService.get().pipe(
tap(booksResponse => { tap(booksResponse => {
ctx.patchState({ ctx.patchState({
books: booksResponse, books: booksResponse
}); });
}), })
); );
} }
@Action(CreateUpdateBook) @Action(CreateUpdateBook)
save(ctx: StateContext<Books.State>, action: CreateUpdateBook) { save(ctx: StateContext<Books.State>, action: CreateUpdateBook) {
let request;
if (action.id) { if (action.id) {
request = this.booksService.update(action.payload, action.id); return this.booksService.update(action.payload, action.id);
} else { } else {
request = this.booksService.create(action.payload); return this.booksService.create(action.payload);
} }
return request.pipe(switchMap(() => ctx.dispatch(new GetBooks())));
} }
@Action(DeleteBook) @Action(DeleteBook)
delete(ctx: StateContext<Books.State>, action: DeleteBook) { delete(ctx: StateContext<Books.State>, action: DeleteBook) {
return this.booksService.delete(action.id).pipe(switchMap(() => ctx.dispatch(new GetBooks()))); return this.booksService.delete(action.id);
} }
} }

4
samples/BookStore-Angular-MongoDb/angular/src/environments/environment.hmr.ts

@ -6,7 +6,7 @@ export const environment = {
logoUrl: '', logoUrl: '',
}, },
oAuthConfig: { oAuthConfig: {
issuer: 'https://localhost:44341', issuer: 'https://localhost:44317',
clientId: 'BookStore_App', clientId: 'BookStore_App',
dummyClientSecret: '1q2w3e*', dummyClientSecret: '1q2w3e*',
scope: 'BookStore', scope: 'BookStore',
@ -16,7 +16,7 @@ export const environment = {
}, },
apis: { apis: {
default: { default: {
url: 'https://localhost:44341', url: 'https://localhost:44317',
}, },
}, },
localization: { localization: {

4
samples/BookStore-Angular-MongoDb/angular/src/environments/environment.prod.ts

@ -6,7 +6,7 @@ export const environment = {
logoUrl: '', logoUrl: '',
}, },
oAuthConfig: { oAuthConfig: {
issuer: 'https://localhost:44341', issuer: 'https://localhost:44317',
clientId: 'BookStore_App', clientId: 'BookStore_App',
dummyClientSecret: '1q2w3e*', dummyClientSecret: '1q2w3e*',
scope: 'BookStore', scope: 'BookStore',
@ -16,7 +16,7 @@ export const environment = {
}, },
apis: { apis: {
default: { default: {
url: 'https://localhost:44341', url: 'https://localhost:44317',
}, },
}, },
localization: { localization: {

4
samples/BookStore-Angular-MongoDb/angular/src/environments/environment.ts

@ -6,7 +6,7 @@ export const environment = {
logoUrl: '', logoUrl: '',
}, },
oAuthConfig: { oAuthConfig: {
issuer: 'https://localhost:44341', issuer: 'https://localhost:44317',
clientId: 'BookStore_App', clientId: 'BookStore_App',
dummyClientSecret: '1q2w3e*', dummyClientSecret: '1q2w3e*',
scope: 'BookStore', scope: 'BookStore',
@ -16,7 +16,7 @@ export const environment = {
}, },
apis: { apis: {
default: { default: {
url: 'https://localhost:44341', url: 'https://localhost:44317',
}, },
}, },
localization: { localization: {

BIN
samples/BookStore-Angular-MongoDb/angular/src/favicon.ico

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 101 KiB

2
samples/BookStore-Angular-MongoDb/angular/src/index.html

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" /> <link rel="icon" type="image/x-icon" href="favicon.ico" />
</head> </head>
<body> <body class="bg-light">
<app-root> <app-root>
<div class="donut centered"></div> <div class="donut centered"></div>
</app-root> </app-root>

1
samples/BookStore-Angular-MongoDb/angular/src/styles.scss

@ -21,7 +21,6 @@
position: fixed; position: fixed;
top: 50%; top: 50%;
left: 50%; left: 50%;
/* bring your own prefixes */
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} }
} }

10
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application.Contracts/Acme.BookStore.Application.Contracts.csproj

@ -12,11 +12,11 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\..\..\modules\account\src\Volo.Abp.Account.Application.Contracts\Volo.Abp.Account.Application.Contracts.csproj" /> <PackageReference Include="Volo.Abp.Account.Application.Contracts" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\identity\src\Volo.Abp.Identity.Application.Contracts\Volo.Abp.Identity.Application.Contracts.csproj" /> <PackageReference Include="Volo.Abp.Identity.Application.Contracts" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.Application.Contracts\Volo.Abp.PermissionManagement.Application.Contracts.csproj" /> <PackageReference Include="Volo.Abp.PermissionManagement.Application.Contracts" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.Application.Contracts\Volo.Abp.TenantManagement.Application.Contracts.csproj" /> <PackageReference Include="Volo.Abp.TenantManagement.Application.Contracts" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.Application.Contracts\Volo.Abp.FeatureManagement.Application.Contracts.csproj" /> <PackageReference Include="Volo.Abp.FeatureManagement.Application.Contracts" Version="2.1.1" />
</ItemGroup> </ItemGroup>
</Project> </Project>

2
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application.Contracts/BookDto.cs

@ -1,4 +1,4 @@
using System; using System;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
namespace Acme.BookStore namespace Acme.BookStore

2
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application.Contracts/CreateUpdateBookDto.cs

@ -1,4 +1,4 @@
using System; using System;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace Acme.BookStore namespace Acme.BookStore

4
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application.Contracts/IBookAppService.cs

@ -1,10 +1,10 @@
using System; using System;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services; using Volo.Abp.Application.Services;
namespace Acme.BookStore namespace Acme.BookStore
{ {
public interface IBookAppService : public interface IBookAppService :
ICrudAppService< //Defines CRUD methods ICrudAppService< //Defines CRUD methods
BookDto, //Used to show books BookDto, //Used to show books
Guid, //Primary key of the book entity Guid, //Primary key of the book entity

10
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application/Acme.BookStore.Application.csproj

@ -13,11 +13,11 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\..\..\modules\account\src\Volo.Abp.Account.Application\Volo.Abp.Account.Application.csproj" /> <PackageReference Include="Volo.Abp.Account.Application" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\identity\src\Volo.Abp.Identity.Application\Volo.Abp.Identity.Application.csproj" /> <PackageReference Include="Volo.Abp.Identity.Application" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.Application\Volo.Abp.PermissionManagement.Application.csproj" /> <PackageReference Include="Volo.Abp.PermissionManagement.Application" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.Application\Volo.Abp.TenantManagement.Application.csproj" /> <PackageReference Include="Volo.Abp.TenantManagement.Application" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.Application\Volo.Abp.FeatureManagement.Application.csproj" /> <PackageReference Include="Volo.Abp.FeatureManagement.Application" Version="2.1.1" />
</ItemGroup> </ItemGroup>
</Project> </Project>

8
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application/BookAppService.cs → samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Application/IBookAppService.cs

@ -1,16 +1,16 @@
using System; using System;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services; using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Repositories; using Volo.Abp.Domain.Repositories;
namespace Acme.BookStore namespace Acme.BookStore
{ {
public class BookAppService : public class BookAppService :
CrudAppService<Book, BookDto, Guid, PagedAndSortedResultRequestDto, CrudAppService<Book, BookDto, Guid, PagedAndSortedResultRequestDto,
CreateUpdateBookDto, CreateUpdateBookDto>, CreateUpdateBookDto, CreateUpdateBookDto>,
IBookAppService IBookAppService
{ {
public BookAppService(IRepository<Book, Guid> repository) public BookAppService(IRepository<Book, Guid> repository)
: base(repository) : base(repository)
{ {

2
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.DbMigrator/Acme.BookStore.DbMigrator.csproj

@ -26,7 +26,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" /> <PackageReference Include="Volo.Abp.Autofac" Version="2.1.1" />
<ProjectReference Include="..\Acme.BookStore.Application.Contracts\Acme.BookStore.Application.Contracts.csproj" /> <ProjectReference Include="..\Acme.BookStore.Application.Contracts\Acme.BookStore.Application.Contracts.csproj" />
<ProjectReference Include="..\Acme.BookStore.MongoDB\Acme.BookStore.MongoDB.csproj" /> <ProjectReference Include="..\Acme.BookStore.MongoDB\Acme.BookStore.MongoDB.csproj" />
</ItemGroup> </ItemGroup>

10
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.DbMigrator/Logs/logs.txt

@ -0,0 +1,10 @@
2020-02-28 10:50:32.009 +03:00 [INF] Started database migrations...
2020-02-28 10:50:32.039 +03:00 [INF] Migrating host database schema...
2020-02-28 10:50:32.040 +03:00 [INF] Executing host database seed...
2020-02-28 10:50:34.397 +03:00 [INF] Successfully completed host database migrations.
2020-02-28 10:50:34.567 +03:00 [INF] Successfully completed database migrations.
2020-02-28 14:38:28.119 +03:00 [INF] Started database migrations...
2020-02-28 14:38:28.145 +03:00 [INF] Migrating host database schema...
2020-02-28 14:38:28.146 +03:00 [INF] Executing host database seed...
2020-02-28 14:38:29.427 +03:00 [INF] Successfully completed host database migrations.
2020-02-28 14:38:29.584 +03:00 [INF] Successfully completed database migrations.

2
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.DbMigrator/appsettings.json

@ -7,7 +7,7 @@
"BookStore_Web": { "BookStore_Web": {
"ClientId": "BookStore_Web", "ClientId": "BookStore_Web",
"ClientSecret": "1q2w3e*", "ClientSecret": "1q2w3e*",
"RootUrl": "https://localhost:44357" "RootUrl": "https://localhost:44383"
}, },
"BookStore_App": { "BookStore_App": {
"ClientId": "BookStore_App", "ClientId": "BookStore_App",

1
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.DbMigrator/tempkey.rsa

@ -0,0 +1 @@
{"KeyId":"uJGOjuG6IaY44NtDmqRybg","Parameters":{"D":"MneJN4+n7rLDTJ015kE8QUHUJvHOEt+HtpMZU/m/cQ5p1wLLKqZyml6q/RFXwtfczSXDh+ThyZ6czEHyPFdOvByVEJxdky8r27TPdKv+dGsKXmwoHOqdf9eAR3aTMmS4D8ljPIwc/3/PdE/SrMc2uRTzYBcNHmMpUC0cOQ+OXrfrGwfgyNKTFCrNKEnkn5uFF2Q2tCMAfi2kGdLJZldFW8Bb522rl+lUoEgrnWE6OX2FqYhVD2JxfbMjrSfHf4snwdde0Vc9ee/avtXk4wHTYl1E/xJ6HDRA4UDI+dcIEQ0b1xHGSruy+0LBark+tjumQExDSiK4YbTtGUCwfvksgQ==","DP":"SJps1XBF8F3/BeJihJA0pw43Xus2keWqZSwcCjr3c0GA/dxpdIXwZlSvoa8F0uVCtSXa7n8efBTbsICKNctV+pueeSbv3rgaYiFO39Fnq3mO3uvo9VOuOJhOMc/kNNpKJT5qHaqdl1pL6NIP4Hx4GdG12d6+qka8u6D9iBydxIE=","DQ":"Lf2dO5CGcX0xs2rRVUruBozLCnhwWRIWEeTAV1FxpAH8clFcmARblMtzYh0Q9UbH/2jUPJo3W1LBOW7SSgrLVHvytc8oSqbYc1l8QXsY8eQqQKz4Ey+huJU4iZgfme7a8lwf6hsJsuigLWgQ67DyKSTHiIINzXfO+phfUEnszF0=","Exponent":"AQAB","InverseQ":"z5fhltiEYkrWSCaBAFcmXBMtreVEaNl7kpFQvHS8FR+QFwqwMOhLGdTTArp+XmdOSYq5xsTpN87iDORIdURjwkGFBNSeoABaS/WbS75mBAHc4fy0RmzoSpnVVJt9LILtIJmNqxAH+HqsiIxE1MhL89mQhZEcqRMN1mOyr0RCSqY=","Modulus":"vEFGJZO6rP+bRnzpPyc34y32mSvFm9yK3UJ8kdB15F781GXaznAg4mU7FQB2umrcAm1SilgfGiHAtzpkxy44f5MkSO9KJVeSs0N+6+X+DbCC7aIrd3quKSJgAjK3lMFdihUdJ+acSMA0+3yrmSfJVV4QMGlWcTjACab57SRJ0kHxzfXrYYexpbxejGMoT3sU6rpLq7DBqWOO+6mv5v00V6IfnYio56smpBVLviNxDs5gOa4x6idiUm4crMwg9BlfGUhWJagd+XAcnNpZL1DNP2pfD17YoT5AAkI8YICiH2iNoiZZFSx81jNLQ91VzyXzFixGb7z4y83wv6UlcVdCDw==","P":"59As5b9v7n0PvPfZLI8YAwdwSXef+sPDkjpViYD00++XByBkyQp2iYE1lZJ9ZHAeQxs3AX9NJEkIeRS2XptZJijFnaN4eaBg6QXTEKQf/Ti6Foi9ygd6QPxRcYvJSD5yfK1NgH7bFSBLEgJaeodz/joD/F2Ysd42qCTU730q18E=","Q":"z+WkIXBxm/scuNlX1LVL2Q/QYdBfzTBm6H6b9AY7fxfGcQpmFddzdz4NTl9VrkanJnkN53bDrGktqneknpWeloAuFQKdd5jvMYLD6Rq0sKqTNWsNvYgV5jOCZe5vI1LCU2Xsr8fYaSOd7iKCPPytgVdGnitoayzAlLx5x04+Dc8="}}

16
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/Acme.BookStore.Domain.Shared.csproj

@ -8,14 +8,14 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\..\..\modules\identity\src\Volo.Abp.Identity.Domain.Shared\Volo.Abp.Identity.Domain.Shared.csproj" /> <PackageReference Include="Volo.Abp.Identity.Domain.Shared" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\identityserver\src\Volo.Abp.IdentityServer.Domain.Shared\Volo.Abp.IdentityServer.Domain.Shared.csproj" /> <PackageReference Include="Volo.Abp.IdentityServer.Domain.Shared" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\background-jobs\src\Volo.Abp.BackgroundJobs.Domain.Shared\Volo.Abp.BackgroundJobs.Domain.Shared.csproj" /> <PackageReference Include="Volo.Abp.BackgroundJobs.Domain.Shared" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\audit-logging\src\Volo.Abp.AuditLogging.Domain.Shared\Volo.Abp.AuditLogging.Domain.Shared.csproj" /> <PackageReference Include="Volo.Abp.AuditLogging.Domain.Shared" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.Domain.Shared\Volo.Abp.TenantManagement.Domain.Shared.csproj" /> <PackageReference Include="Volo.Abp.TenantManagement.Domain.Shared" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.Domain.Shared\Volo.Abp.FeatureManagement.Domain.Shared.csproj" /> <PackageReference Include="Volo.Abp.FeatureManagement.Domain.Shared" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.Domain.Shared\Volo.Abp.PermissionManagement.Domain.Shared.csproj" /> <PackageReference Include="Volo.Abp.PermissionManagement.Domain.Shared" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\setting-management\src\Volo.Abp.SettingManagement.Domain.Shared\Volo.Abp.SettingManagement.Domain.Shared.csproj" /> <PackageReference Include="Volo.Abp.SettingManagement.Domain.Shared" Version="2.1.1" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

2
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/BookStoreDomainSharedModule.cs

@ -5,11 +5,11 @@ using Volo.Abp.FeatureManagement;
using Volo.Abp.Identity; using Volo.Abp.Identity;
using Volo.Abp.IdentityServer; using Volo.Abp.IdentityServer;
using Volo.Abp.Localization; using Volo.Abp.Localization;
using Volo.Abp.Validation.Localization;
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement; using Volo.Abp.PermissionManagement;
using Volo.Abp.SettingManagement; using Volo.Abp.SettingManagement;
using Volo.Abp.TenantManagement; using Volo.Abp.TenantManagement;
using Volo.Abp.Validation.Localization;
using Volo.Abp.VirtualFileSystem; using Volo.Abp.VirtualFileSystem;
namespace Acme.BookStore namespace Acme.BookStore

2
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/BookType.cs

@ -1,4 +1,4 @@
namespace Acme.BookStore namespace Acme.BookStore
{ {
public enum BookType public enum BookType
{ {

16
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/Localization/BookStore/en.json

@ -3,6 +3,18 @@
"texts": { "texts": {
"Menu:Home": "Home", "Menu:Home": "Home",
"Welcome": "Welcome", "Welcome": "Welcome",
"LongWelcomeMessage": "Welcome to the application. This is a startup project based on the ABP framework. For more information, visit abp.io." "LongWelcomeMessage": "Welcome to the application. This is a startup project based on the ABP framework. For more information, visit abp.io.",
"Menu:BookStore": "Book Store",
"Menu:Books": "Books",
"PublishDate": "Publish date",
"Actions": "Actions",
"Edit": "Edit",
"NewBook": "New book",
"Name": "Name",
"Type": "Type",
"Price": "Price",
"CreationTime": "Creation time",
"AreYouSureToDelete": "Are you sure you want to delete this item?"
} }
} }

8
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain.Shared/Localization/BookStore/zh-Hant.json

@ -0,0 +1,8 @@
{
"culture": "zh-Hant",
"texts": {
"Menu:Home": "首頁",
"Welcome": "歡迎",
"LongWelcomeMessage": "歡迎來到此應用程式. 這是一個基於ABP框架的起始專案. 有關更多訊息, 請瀏覽 abp.io."
}
}

19
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain/Acme.BookStore.Domain.csproj

@ -12,15 +12,16 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\..\..\modules\identity\src\Volo.Abp.Identity.Domain\Volo.Abp.Identity.Domain.csproj" /> <PackageReference Include="Microsoft.AspNetCore.Mvc.DataAnnotations" Version="2.2.0" />
<ProjectReference Include="..\..\..\..\..\modules\identity\src\Volo.Abp.PermissionManagement.Domain.Identity\Volo.Abp.PermissionManagement.Domain.Identity.csproj" /> <PackageReference Include="Volo.Abp.Identity.Domain" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\identityserver\src\Volo.Abp.IdentityServer.Domain\Volo.Abp.IdentityServer.Domain.csproj" /> <PackageReference Include="Volo.Abp.PermissionManagement.Domain.Identity" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\identityserver\src\Volo.Abp.PermissionManagement.Domain.IdentityServer\Volo.Abp.PermissionManagement.Domain.IdentityServer.csproj" /> <PackageReference Include="Volo.Abp.IdentityServer.Domain" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\background-jobs\src\Volo.Abp.BackgroundJobs.Domain\Volo.Abp.BackgroundJobs.Domain.csproj" /> <PackageReference Include="Volo.Abp.PermissionManagement.Domain.IdentityServer" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\audit-logging\src\Volo.Abp.AuditLogging.Domain\Volo.Abp.AuditLogging.Domain.csproj" /> <PackageReference Include="Volo.Abp.BackgroundJobs.Domain" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.Domain\Volo.Abp.TenantManagement.Domain.csproj" /> <PackageReference Include="Volo.Abp.AuditLogging.Domain" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.Domain\Volo.Abp.FeatureManagement.Domain.csproj" /> <PackageReference Include="Volo.Abp.TenantManagement.Domain" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\setting-management\src\Volo.Abp.SettingManagement.Domain\Volo.Abp.SettingManagement.Domain.csproj" /> <PackageReference Include="Volo.Abp.FeatureManagement.Domain" Version="2.1.1" />
<PackageReference Include="Volo.Abp.SettingManagement.Domain" Version="2.1.1" />
</ItemGroup> </ItemGroup>
</Project> </Project>

16
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain/Book.cs

@ -1,4 +1,4 @@
using System; using System;
using Volo.Abp.Domain.Entities.Auditing; using Volo.Abp.Domain.Entities.Auditing;
namespace Acme.BookStore namespace Acme.BookStore
@ -12,5 +12,19 @@ namespace Acme.BookStore
public DateTime PublishDate { get; set; } public DateTime PublishDate { get; set; }
public float Price { get; set; } public float Price { get; set; }
protected Book()
{
}
public Book(Guid id, string name, BookType type, DateTime publishDate, float price) :
base(id)
{
Name = name;
Type = type;
PublishDate = publishDate;
Price = price;
}
} }
} }

52
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain/BookStoreDataSeederContributor.cs

@ -0,0 +1,52 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Guids;
namespace Acme.BookStore
{
public class BookStoreDataSeederContributor
: IDataSeedContributor, ITransientDependency
{
private readonly IRepository<Book, Guid> _bookRepository;
private readonly IGuidGenerator _guidGenerator;
public BookStoreDataSeederContributor(
IRepository<Book, Guid> bookRepository,
IGuidGenerator guidGenerator)
{
_bookRepository = bookRepository;
_guidGenerator = guidGenerator;
}
public async Task SeedAsync(DataSeedContext context)
{
if (await _bookRepository.GetCountAsync() > 0)
{
return;
}
await _bookRepository.InsertAsync(
new Book(
id: _guidGenerator.Create(),
name: "1984",
type: BookType.Dystopia,
publishDate: new DateTime(1949, 6, 8),
price: 19.84f
)
);
await _bookRepository.InsertAsync(
new Book(
id: _guidGenerator.Create(),
name: "The Hitchhiker's Guide to the Galaxy",
type: BookType.ScienceFiction,
publishDate: new DateTime(1995, 9, 27),
price: 42.0f
)
);
}
}
}

50
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.Domain/Data/BookStoreDbMigrationService.cs

@ -1,8 +1,12 @@
using System.Threading.Tasks; using System;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Logging.Abstractions;
using Volo.Abp.Data; using Volo.Abp.Data;
using Volo.Abp.DependencyInjection; using Volo.Abp.DependencyInjection;
using Volo.Abp.MultiTenancy;
using Volo.Abp.TenantManagement;
namespace Acme.BookStore.Data namespace Acme.BookStore.Data
{ {
@ -12,13 +16,19 @@ namespace Acme.BookStore.Data
private readonly IDataSeeder _dataSeeder; private readonly IDataSeeder _dataSeeder;
private readonly IBookStoreDbSchemaMigrator _dbSchemaMigrator; private readonly IBookStoreDbSchemaMigrator _dbSchemaMigrator;
private readonly ITenantRepository _tenantRepository;
private readonly ICurrentTenant _currentTenant;
public BookStoreDbMigrationService( public BookStoreDbMigrationService(
IDataSeeder dataSeeder, IDataSeeder dataSeeder,
IBookStoreDbSchemaMigrator dbSchemaMigrator) IBookStoreDbSchemaMigrator dbSchemaMigrator,
ITenantRepository tenantRepository,
ICurrentTenant currentTenant)
{ {
_dataSeeder = dataSeeder; _dataSeeder = dataSeeder;
_dbSchemaMigrator = dbSchemaMigrator; _dbSchemaMigrator = dbSchemaMigrator;
_tenantRepository = tenantRepository;
_currentTenant = currentTenant;
Logger = NullLogger<BookStoreDbMigrationService>.Instance; Logger = NullLogger<BookStoreDbMigrationService>.Instance;
} }
@ -27,13 +37,43 @@ namespace Acme.BookStore.Data
{ {
Logger.LogInformation("Started database migrations..."); Logger.LogInformation("Started database migrations...");
Logger.LogInformation("Migrating database schema..."); await MigrateHostDatabaseAsync();
var i = 0;
var tenants = await _tenantRepository.GetListAsync();
foreach (var tenant in tenants)
{
i++;
using (_currentTenant.Change(tenant.Id))
{
Logger.LogInformation($"Migrating {tenant.Name} database schema... ({i} of {tenants.Count})");
await MigrateTenantDatabasesAsync(tenant);
Logger.LogInformation($"Successfully completed {tenant.Name} database migrations.");
}
}
Logger.LogInformation("Successfully completed database migrations.");
}
private async Task MigrateHostDatabaseAsync()
{
Logger.LogInformation("Migrating host database schema...");
await _dbSchemaMigrator.MigrateAsync(); await _dbSchemaMigrator.MigrateAsync();
Logger.LogInformation("Executing database seed..."); Logger.LogInformation("Executing host database seed...");
await _dataSeeder.SeedAsync(); await _dataSeeder.SeedAsync();
Logger.LogInformation("Successfully completed database migrations."); Logger.LogInformation("Successfully completed host database migrations.");
}
private async Task MigrateTenantDatabasesAsync(Tenant tenant)
{
Logger.LogInformation($"Migrating schema for {tenant.Name} database...");
await _dbSchemaMigrator.MigrateAsync();
Logger.LogInformation($"Executing {tenant.Name} tenant database seed...");
await _dataSeeder.SeedAsync(tenant.Id);
} }
} }
} }

10
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Client/Acme.BookStore.HttpApi.Client.csproj

@ -12,11 +12,11 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\..\..\modules\account\src\Volo.Abp.Account.HttpApi.Client\Volo.Abp.Account.HttpApi.Client.csproj" /> <PackageReference Include="Volo.Abp.Account.HttpApi.Client" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\identity\src\Volo.Abp.Identity.HttpApi.Client\Volo.Abp.Identity.HttpApi.Client.csproj" /> <PackageReference Include="Volo.Abp.Identity.HttpApi.Client" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.HttpApi.Client\Volo.Abp.PermissionManagement.HttpApi.Client.csproj" /> <PackageReference Include="Volo.Abp.PermissionManagement.HttpApi.Client" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.HttpApi.Client\Volo.Abp.TenantManagement.HttpApi.Client.csproj" /> <PackageReference Include="Volo.Abp.TenantManagement.HttpApi.Client" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.HttpApi.Client\Volo.Abp.FeatureManagement.HttpApi.Client.csproj" /> <PackageReference Include="Volo.Abp.FeatureManagement.HttpApi.Client" Version="2.1.1" />
</ItemGroup> </ItemGroup>
</Project> </Project>

13
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/Acme.BookStore.HttpApi.Host.csproj

@ -4,9 +4,9 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>netcoreapp3.1</TargetFramework>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
<RootNamespace>Acme.BookStore</RootNamespace> <RootNamespace>Acme.BookStore</RootNamespace>
<PreserveCompilationReferences>true</PreserveCompilationReferences> <PreserveCompilationReferences>true</PreserveCompilationReferences>
<UserSecretsId>Acme.BookStore-4681b4fd-151f-4221-84a4-929d86723e4c</UserSecretsId>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -16,11 +16,12 @@
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.0.0" /> <PackageReference Include="Swashbuckle.AspNetCore" Version="5.0.0" />
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.1" /> <PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.0" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.0" />
<ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.AspNetCore.MultiTenancy\Volo.Abp.AspNetCore.MultiTenancy.csproj" /> <PackageReference Include="Volo.Abp.AspNetCore.MultiTenancy" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" /> <PackageReference Include="Volo.Abp.Autofac" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj" /> <PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.AspNetCore.Authentication.JwtBearer\Volo.Abp.AspNetCore.Authentication.JwtBearer.csproj" /> <PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\account\src\Volo.Abp.Account.Web.IdentityServer\Volo.Abp.Account.Web.IdentityServer.csproj" /> <PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="2.1.1" />
<PackageReference Include="Volo.Abp.Account.Web.IdentityServer" Version="2.1.1" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

6
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/BookStoreHttpApiHostModule.cs

@ -18,6 +18,7 @@ using Volo.Abp.Account.Web;
using Volo.Abp.AspNetCore.Authentication.JwtBearer; using Volo.Abp.AspNetCore.Authentication.JwtBearer;
using Volo.Abp.AspNetCore.MultiTenancy; using Volo.Abp.AspNetCore.MultiTenancy;
using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Serilog;
using Volo.Abp.Autofac; using Volo.Abp.Autofac;
using Volo.Abp.Localization; using Volo.Abp.Localization;
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
@ -34,7 +35,8 @@ namespace Acme.BookStore
typeof(BookStoreMongoDbModule), typeof(BookStoreMongoDbModule),
typeof(AbpAspNetCoreMvcUiBasicThemeModule), typeof(AbpAspNetCoreMvcUiBasicThemeModule),
typeof(AbpAspNetCoreAuthenticationJwtBearerModule), typeof(AbpAspNetCoreAuthenticationJwtBearerModule),
typeof(AbpAccountWebIdentityServerModule) typeof(AbpAccountWebIdentityServerModule),
typeof(AbpAspNetCoreSerilogModule)
)] )]
public class BookStoreHttpApiHostModule : AbpModule public class BookStoreHttpApiHostModule : AbpModule
{ {
@ -120,6 +122,7 @@ namespace Acme.BookStore
options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português")); options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português"));
options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe"));
options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文")); options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文"));
options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文"));
}); });
} }
@ -172,6 +175,7 @@ namespace Acme.BookStore
}); });
app.UseAuditing(); app.UseAuditing();
app.UseAbpSerilogEnrichers();
app.UseMvcWithDefaultRouteAndArea(); app.UseMvcWithDefaultRouteAndArea();
} }
} }

1
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/Program.cs

@ -1,5 +1,4 @@
using System; using System;
using System.IO;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
using Serilog; using Serilog;

6
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/Properties/launchSettings.json

@ -3,8 +3,8 @@
"windowsAuthentication": false, "windowsAuthentication": false,
"anonymousAuthentication": true, "anonymousAuthentication": true,
"iisExpress": { "iisExpress": {
"applicationUrl": "https://localhost:44341", "applicationUrl": "https://localhost:44317",
"sslPort": 44341 "sslPort": 44317
} }
}, },
"profiles": { "profiles": {
@ -18,7 +18,7 @@
"Acme.BookStore.HttpApi.Host": { "Acme.BookStore.HttpApi.Host": {
"commandName": "Project", "commandName": "Project",
"launchBrowser": true, "launchBrowser": true,
"applicationUrl": "https://localhost:44341", "applicationUrl": "https://localhost:44317",
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
} }

4
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/Startup.cs

@ -1,9 +1,7 @@
using System; using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Volo.Abp;
namespace Acme.BookStore namespace Acme.BookStore
{ {

4
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/appsettings.json

@ -1,12 +1,12 @@
{ {
"App": { "App": {
"SelfUrl": "https://localhost:44341", "SelfUrl": "https://localhost:44317",
"CorsOrigins": "https://*.BookStore.com,http://localhost:4200" "CorsOrigins": "https://*.BookStore.com,http://localhost:4200"
}, },
"ConnectionStrings": { "ConnectionStrings": {
"Default": "mongodb://localhost:27017/BookStore" "Default": "mongodb://localhost:27017/BookStore"
}, },
"AuthServer": { "AuthServer": {
"Authority": "https://localhost:44341" "Authority": "https://localhost:44317"
} }
} }

2
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/package.json

@ -3,6 +3,6 @@
"name": "my-app", "name": "my-app",
"private": true, "private": true,
"dependencies": { "dependencies": {
"@abp/aspnetcore.mvc.ui.theme.basic": "^1.0.2" "@abp/aspnetcore.mvc.ui.theme.basic": "^2.1.0"
} }
} }

112
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/wwwroot/libs/abp/core/abp.css

@ -1,56 +1,56 @@
@keyframes spin { @keyframes spin {
0% { 0% {
transform: translateZ(0) rotate(0deg); transform: translateZ(0) rotate(0deg);
} }
100% { 100% {
transform: translateZ(0) rotate(360deg); transform: translateZ(0) rotate(360deg);
} }
} }
.abp-block-area { .abp-block-area {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
z-index: 102; z-index: 102;
background-color: #fff; background-color: #fff;
opacity: .8; opacity: .8;
transition: opacity .25s; transition: opacity .25s;
} }
.abp-block-area.abp-block-area-disappearing { .abp-block-area.abp-block-area-disappearing {
opacity: 0; opacity: 0;
} }
.abp-block-area.abp-block-area-busy:after { .abp-block-area.abp-block-area-busy:after {
content: attr(data-text); content: attr(data-text);
display: block; display: block;
max-width: 125px; max-width: 125px;
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
font-size: 20px; font-size: 20px;
font-family: sans-serif; font-family: sans-serif;
color: #343a40; color: #343a40;
text-align: center; text-align: center;
text-transform: uppercase; text-transform: uppercase;
} }
.abp-block-area.abp-block-area-busy:before { .abp-block-area.abp-block-area-busy:before {
content: ""; content: "";
display: block; display: block;
width: 150px; width: 150px;
height: 150px; height: 150px;
border-radius: 50%; border-radius: 50%;
border-width: 2px; border-width: 2px;
border-style: solid; border-style: solid;
border-color: transparent #228ae6 #228ae6 #228ae6; border-color: transparent #228ae6 #228ae6 #228ae6;
position: absolute; position: absolute;
top: calc(50% - 75px); top: calc(50% - 75px);
left: calc(50% - 75px); left: calc(50% - 75px);
will-change: transform; will-change: transform;
animation: spin .75s infinite ease-in-out; animation: spin .75s infinite ease-in-out;
} }

1270
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/wwwroot/libs/abp/core/abp.js

File diff suppressed because it is too large

780
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/wwwroot/libs/abp/jquery/abp.jquery.js

@ -1,389 +1,393 @@
var abp = abp || {}; var abp = abp || {};
(function($) { (function($) {
if (!$) { if (!$) {
throw "abp/jquery library requires the jquery library included to the page!"; throw "abp/jquery library requires the jquery library included to the page!";
} }
// ABP CORE OVERRIDES ///////////////////////////////////////////////////// // ABP CORE OVERRIDES /////////////////////////////////////////////////////
abp.message._showMessage = function (message, title) { abp.message._showMessage = function (message, title) {
alert((title || '') + ' ' + message); alert((title || '') + ' ' + message);
return $.Deferred(function ($dfd) { return $.Deferred(function ($dfd) {
$dfd.resolve(); $dfd.resolve();
}); });
}; };
abp.message.confirm = function (message, titleOrCallback, callback) { abp.message.confirm = function (message, titleOrCallback, callback) {
if (titleOrCallback && !(typeof titleOrCallback == 'string')) { if (titleOrCallback && !(typeof titleOrCallback == 'string')) {
callback = titleOrCallback; callback = titleOrCallback;
} }
var result = confirm(message); var result = confirm(message);
callback && callback(result); callback && callback(result);
return $.Deferred(function ($dfd) { return $.Deferred(function ($dfd) {
$dfd.resolve(result); $dfd.resolve(result);
}); });
}; };
abp.utils.isFunction = function (obj) { abp.utils.isFunction = function (obj) {
return $.isFunction(obj); return $.isFunction(obj);
}; };
// JQUERY EXTENSIONS ////////////////////////////////////////////////////// // JQUERY EXTENSIONS //////////////////////////////////////////////////////
$.fn.findWithSelf = function (selector) { $.fn.findWithSelf = function (selector) {
return this.filter(selector).add(this.find(selector)); return this.filter(selector).add(this.find(selector));
}; };
// DOM //////////////////////////////////////////////////////////////////// // DOM ////////////////////////////////////////////////////////////////////
abp.dom = abp.dom || {}; abp.dom = abp.dom || {};
abp.dom.onNodeAdded = function (callback) { abp.dom.onNodeAdded = function (callback) {
abp.event.on('abp.dom.nodeAdded', callback); abp.event.on('abp.dom.nodeAdded', callback);
}; };
abp.dom.onNodeRemoved = function (callback) { abp.dom.onNodeRemoved = function (callback) {
abp.event.on('abp.dom.nodeRemoved', callback); abp.event.on('abp.dom.nodeRemoved', callback);
}; };
var mutationObserverCallback = function (mutationsList) { var mutationObserverCallback = function (mutationsList) {
for (var i = 0; i < mutationsList.length; i++) { for (var i = 0; i < mutationsList.length; i++) {
var mutation = mutationsList[i]; var mutation = mutationsList[i];
if (mutation.type === 'childList') { if (mutation.type === 'childList') {
if (mutation.addedNodes && mutation.removedNodes.length) { if (mutation.addedNodes && mutation.removedNodes.length) {
for (var k = 0; k < mutation.removedNodes.length; k++) { for (var k = 0; k < mutation.removedNodes.length; k++) {
abp.event.trigger( abp.event.trigger(
'abp.dom.nodeRemoved', 'abp.dom.nodeRemoved',
{ {
$el: $(mutation.removedNodes[k]) $el: $(mutation.removedNodes[k])
} }
); );
} }
} }
if (mutation.addedNodes && mutation.addedNodes.length) { if (mutation.addedNodes && mutation.addedNodes.length) {
for (var j = 0; j < mutation.addedNodes.length; j++) { for (var j = 0; j < mutation.addedNodes.length; j++) {
abp.event.trigger( abp.event.trigger(
'abp.dom.nodeAdded', 'abp.dom.nodeAdded',
{ {
$el: $(mutation.addedNodes[j]) $el: $(mutation.addedNodes[j])
} }
); );
} }
} }
} }
} }
}; };
new MutationObserver(mutationObserverCallback).observe( new MutationObserver(mutationObserverCallback).observe(
$('body')[0], $('body')[0],
{ {
subtree: true, subtree: true,
childList: true childList: true
} }
); );
// AJAX /////////////////////////////////////////////////////////////////// // AJAX ///////////////////////////////////////////////////////////////////
abp.ajax = function (userOptions) { abp.ajax = function (userOptions) {
userOptions = userOptions || {}; userOptions = userOptions || {};
var options = $.extend(true, {}, abp.ajax.defaultOpts, userOptions); var options = $.extend(true, {}, abp.ajax.defaultOpts, userOptions);
options.success = undefined; options.success = undefined;
options.error = undefined; options.error = undefined;
return $.Deferred(function ($dfd) { return $.Deferred(function ($dfd) {
$.ajax(options) $.ajax(options)
.done(function (data, textStatus, jqXHR) { .done(function (data, textStatus, jqXHR) {
$dfd.resolve(data); $dfd.resolve(data);
userOptions.success && userOptions.success(data); userOptions.success && userOptions.success(data);
}).fail(function (jqXHR) { }).fail(function (jqXHR) {
if (jqXHR.getResponseHeader('_AbpErrorFormat') === 'true') { if (jqXHR.getResponseHeader('_AbpErrorFormat') === 'true') {
abp.ajax.handleAbpErrorResponse(jqXHR, userOptions, $dfd); abp.ajax.handleAbpErrorResponse(jqXHR, userOptions, $dfd);
} else { } else {
abp.ajax.handleNonAbpErrorResponse(jqXHR, userOptions, $dfd); abp.ajax.handleNonAbpErrorResponse(jqXHR, userOptions, $dfd);
} }
}); });
}); });
}; };
$.extend(abp.ajax, { $.extend(abp.ajax, {
defaultOpts: { defaultOpts: {
dataType: 'json', dataType: 'json',
type: 'POST', type: 'POST',
contentType: 'application/json', contentType: 'application/json',
headers: { headers: {
'X-Requested-With': 'XMLHttpRequest' 'X-Requested-With': 'XMLHttpRequest'
} }
}, },
defaultError: { defaultError: {
message: 'An error has occurred!', message: 'An error has occurred!',
details: 'Error detail not sent by server.' details: 'Error detail not sent by server.'
}, },
defaultError401: { defaultError401: {
message: 'You are not authenticated!', message: 'You are not authenticated!',
details: 'You should be authenticated (sign in) in order to perform this operation.' details: 'You should be authenticated (sign in) in order to perform this operation.'
}, },
defaultError403: { defaultError403: {
message: 'You are not authorized!', message: 'You are not authorized!',
details: 'You are not allowed to perform this operation.' details: 'You are not allowed to perform this operation.'
}, },
defaultError404: { defaultError404: {
message: 'Resource not found!', message: 'Resource not found!',
details: 'The resource requested could not found on the server.' details: 'The resource requested could not found on the server.'
}, },
logError: function (error) { logError: function (error) {
abp.log.error(error); abp.log.error(error);
}, },
showError: function (error) { showError: function (error) {
if (error.details) { if (error.details) {
return abp.message.error(error.details, error.message); return abp.message.error(error.details, error.message);
} else { } else {
return abp.message.error(error.message || abp.ajax.defaultError.message); return abp.message.error(error.message || abp.ajax.defaultError.message);
} }
}, },
handleTargetUrl: function (targetUrl) { handleTargetUrl: function (targetUrl) {
if (!targetUrl) { if (!targetUrl) {
location.href = abp.appPath; location.href = abp.appPath;
} else { } else {
location.href = targetUrl; location.href = targetUrl;
} }
}, },
handleErrorStatusCode: function (status) { handleErrorStatusCode: function (status) {
switch (status) { switch (status) {
case 401: case 401:
abp.ajax.handleUnAuthorizedRequest( abp.ajax.handleUnAuthorizedRequest(
abp.ajax.showError(abp.ajax.defaultError401), abp.ajax.showError(abp.ajax.defaultError401),
abp.appPath abp.appPath
); );
break; break;
case 403: case 403:
abp.ajax.showError(abp.ajax.defaultError403); abp.ajax.showError(abp.ajax.defaultError403);
break; break;
case 404: case 404:
abp.ajax.showError(abp.ajax.defaultError404); abp.ajax.showError(abp.ajax.defaultError404);
break; break;
default: default:
abp.ajax.showError(abp.ajax.defaultError); abp.ajax.showError(abp.ajax.defaultError);
break; break;
} }
}, },
handleNonAbpErrorResponse: function (jqXHR, userOptions, $dfd) { handleNonAbpErrorResponse: function (jqXHR, userOptions, $dfd) {
if (userOptions.abpHandleError !== false) { if (userOptions.abpHandleError !== false) {
abp.ajax.handleErrorStatusCode(jqXHR.status); abp.ajax.handleErrorStatusCode(jqXHR.status);
} }
$dfd.reject.apply(this, arguments); $dfd.reject.apply(this, arguments);
userOptions.error && userOptions.error.apply(this, arguments); userOptions.error && userOptions.error.apply(this, arguments);
}, },
handleAbpErrorResponse: function (jqXHR, userOptions, $dfd) { handleAbpErrorResponse: function (jqXHR, userOptions, $dfd) {
var messagePromise = null; var messagePromise = null;
if (userOptions.abpHandleError !== false) { if (userOptions.abpHandleError !== false) {
messagePromise = abp.ajax.showError(jqXHR.responseJSON.error); messagePromise = abp.ajax.showError(jqXHR.responseJSON.error);
} }
abp.ajax.logError(jqXHR.responseJSON.error); abp.ajax.logError(jqXHR.responseJSON.error);
$dfd && $dfd.reject(jqXHR.responseJSON.error, jqXHR); $dfd && $dfd.reject(jqXHR.responseJSON.error, jqXHR);
userOptions.error && userOptions.error(jqXHR.responseJSON.error, jqXHR); userOptions.error && userOptions.error(jqXHR.responseJSON.error, jqXHR);
if (jqXHR.status === 401 && userOptions.abpHandleError !== false) { if (jqXHR.status === 401 && userOptions.abpHandleError !== false) {
abp.ajax.handleUnAuthorizedRequest(messagePromise); abp.ajax.handleUnAuthorizedRequest(messagePromise);
} }
}, },
handleUnAuthorizedRequest: function (messagePromise, targetUrl) { handleUnAuthorizedRequest: function (messagePromise, targetUrl) {
if (messagePromise) { if (messagePromise) {
messagePromise.done(function () { messagePromise.done(function () {
abp.ajax.handleTargetUrl(targetUrl); abp.ajax.handleTargetUrl(targetUrl);
}); });
} else { } else {
abp.ajax.handleTargetUrl(targetUrl); abp.ajax.handleTargetUrl(targetUrl);
} }
}, },
blockUI: function (options) { blockUI: function (options) {
if (options.blockUI) { if (options.blockUI) {
if (options.blockUI === true) { //block whole page if (options.blockUI === true) { //block whole page
abp.ui.setBusy(); abp.ui.setBusy();
} else { //block an element } else { //block an element
abp.ui.setBusy(options.blockUI); abp.ui.setBusy(options.blockUI);
} }
} }
}, },
unblockUI: function (options) { unblockUI: function (options) {
if (options.blockUI) { if (options.blockUI) {
if (options.blockUI === true) { //unblock whole page if (options.blockUI === true) { //unblock whole page
abp.ui.clearBusy(); abp.ui.clearBusy();
} else { //unblock an element } else { //unblock an element
abp.ui.clearBusy(options.blockUI); abp.ui.clearBusy(options.blockUI);
} }
} }
}, },
ajaxSendHandler: function (event, request, settings) { ajaxSendHandler: function (event, request, settings) {
var token = abp.security.antiForgery.getToken(); var token = abp.security.antiForgery.getToken();
if (!token) { if (!token) {
return; return;
} }
if (!settings.headers || settings.headers[abp.security.antiForgery.tokenHeaderName] === undefined) { if (!settings.headers || settings.headers[abp.security.antiForgery.tokenHeaderName] === undefined) {
request.setRequestHeader(abp.security.antiForgery.tokenHeaderName, token); request.setRequestHeader(abp.security.antiForgery.tokenHeaderName, token);
} }
} }
}); });
$(document).ajaxSend(function (event, request, settings) { $(document).ajaxSend(function (event, request, settings) {
return abp.ajax.ajaxSendHandler(event, request, settings); return abp.ajax.ajaxSendHandler(event, request, settings);
}); });
abp.event.on('abp.configurationInitialized', function () { abp.event.on('abp.configurationInitialized', function () {
var l = abp.localization.getResource('AbpUi'); var l = abp.localization.getResource('AbpUi');
abp.ajax.defaultError.message = l('DefaultErrorMessage'); abp.ajax.defaultError.message = l('DefaultErrorMessage');
abp.ajax.defaultError.details = l('DefaultErrorMessageDetail'); abp.ajax.defaultError.details = l('DefaultErrorMessageDetail');
abp.ajax.defaultError401.message = l('DefaultErrorMessage401'); abp.ajax.defaultError401.message = l('DefaultErrorMessage401');
abp.ajax.defaultError401.details = l('DefaultErrorMessage401Detail'); abp.ajax.defaultError401.details = l('DefaultErrorMessage401Detail');
abp.ajax.defaultError403.message = l('DefaultErrorMessage403'); abp.ajax.defaultError403.message = l('DefaultErrorMessage403');
abp.ajax.defaultError403.details = l('DefaultErrorMessage403Detail'); abp.ajax.defaultError403.details = l('DefaultErrorMessage403Detail');
abp.ajax.defaultError404.message = l('DefaultErrorMessage404'); abp.ajax.defaultError404.message = l('DefaultErrorMessage404');
abp.ajax.defaultError404.details = l('DefaultErrorMessage404Detail'); abp.ajax.defaultError404.details = l('DefaultErrorMessage404Detail');
}); });
// RESOURCE LOADER //////////////////////////////////////////////////////// // RESOURCE LOADER ////////////////////////////////////////////////////////
/* UrlStates enum */ /* UrlStates enum */
var UrlStates = { var UrlStates = {
LOADING: 'LOADING', LOADING: 'LOADING',
LOADED: 'LOADED', LOADED: 'LOADED',
FAILED: 'FAILED' FAILED: 'FAILED'
}; };
/* UrlInfo class */ /* UrlInfo class */
function UrlInfo(url) { function UrlInfo(url) {
this.url = url; this.url = url;
this.state = UrlStates.LOADING; this.state = UrlStates.LOADING;
this.loadCallbacks = []; this.loadCallbacks = [];
this.failCallbacks = []; this.failCallbacks = [];
} }
UrlInfo.prototype.succeed = function () { UrlInfo.prototype.succeed = function () {
this.state = UrlStates.LOADED; this.state = UrlStates.LOADED;
for (var i = 0; i < this.loadCallbacks.length; i++) { for (var i = 0; i < this.loadCallbacks.length; i++) {
this.loadCallbacks[i](); this.loadCallbacks[i]();
} }
}; };
UrlInfo.prototype.failed = function () { UrlInfo.prototype.failed = function () {
this.state = UrlStates.FAILED; this.state = UrlStates.FAILED;
for (var i = 0; i < this.failCallbacks.length; i++) { for (var i = 0; i < this.failCallbacks.length; i++) {
this.failCallbacks[i](); this.failCallbacks[i]();
} }
}; };
UrlInfo.prototype.handleCallbacks = function (loadCallback, failCallback) { UrlInfo.prototype.handleCallbacks = function (loadCallback, failCallback) {
switch (this.state) { switch (this.state) {
case UrlStates.LOADED: case UrlStates.LOADED:
loadCallback && loadCallback(); loadCallback && loadCallback();
break; break;
case UrlStates.FAILED: case UrlStates.FAILED:
failCallback && failCallback(); failCallback && failCallback();
break; break;
case UrlStates.LOADING: case UrlStates.LOADING:
this.addCallbacks(loadCallback, failCallback); this.addCallbacks(loadCallback, failCallback);
break; break;
} }
}; };
UrlInfo.prototype.addCallbacks = function (loadCallback, failCallback) { UrlInfo.prototype.addCallbacks = function (loadCallback, failCallback) {
loadCallback && this.loadCallbacks.push(loadCallback); loadCallback && this.loadCallbacks.push(loadCallback);
failCallback && this.failCallbacks.push(failCallback); failCallback && this.failCallbacks.push(failCallback);
}; };
/* ResourceLoader API */ /* ResourceLoader API */
abp.ResourceLoader = (function () { abp.ResourceLoader = (function () {
var _urlInfos = {}; var _urlInfos = {};
function getCacheKey(url) { function getCacheKey(url) {
return url; return url;
} }
function appendTimeToUrl(url) { function appendTimeToUrl(url) {
if (url.indexOf('?') < 0) { if (url.indexOf('?') < 0) {
url += '?'; url += '?';
} else { } else {
url += '&'; url += '&';
} }
url += '_=' + new Date().getTime(); url += '_=' + new Date().getTime();
return url; return url;
} }
var _loadFromUrl = function (url, loadCallback, failCallback, serverLoader) { var _loadFromUrl = function (url, loadCallback, failCallback, serverLoader) {
var cacheKey = getCacheKey(url); var cacheKey = getCacheKey(url);
var urlInfo = _urlInfos[cacheKey]; var urlInfo = _urlInfos[cacheKey];
if (urlInfo) { if (urlInfo) {
urlInfo.handleCallbacks(loadCallback, failCallback); urlInfo.handleCallbacks(loadCallback, failCallback);
return; return;
} }
_urlInfos[cacheKey] = urlInfo = new UrlInfo(url); _urlInfos[cacheKey] = urlInfo = new UrlInfo(url);
urlInfo.addCallbacks(loadCallback, failCallback); urlInfo.addCallbacks(loadCallback, failCallback);
serverLoader(urlInfo); serverLoader(urlInfo);
}; };
var _loadScript = function (url, loadCallback, failCallback) { var _loadScript = function (url, loadCallback, failCallback) {
_loadFromUrl(url, loadCallback, failCallback, function (urlInfo) { _loadFromUrl(url, loadCallback, failCallback, function (urlInfo) {
$.getScript(url) $.get({
.done(function () { url: url,
urlInfo.succeed(); dataType: 'text'
}) })
.fail(function () { .done(function (script) {
urlInfo.failed(); $.globalEval(script);
}); urlInfo.succeed();
}); })
}; .fail(function () {
urlInfo.failed();
var _loadStyle = function (url) { });
_loadFromUrl(url, undefined, undefined, function (urlInfo) { });
};
$('<link/>', {
rel: 'stylesheet', var _loadStyle = function (url) {
type: 'text/css', _loadFromUrl(url, undefined, undefined, function (urlInfo) {
href: appendTimeToUrl(url)
}).appendTo('head'); $('<link/>', {
}); rel: 'stylesheet',
}; type: 'text/css',
href: appendTimeToUrl(url)
return { }).appendTo('head');
loadScript: _loadScript, });
loadStyle: _loadStyle };
}
})(); return {
loadScript: _loadScript,
loadStyle: _loadStyle
}
})();
})(jQuery); })(jQuery);

40
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/wwwroot/libs/jquery-validation/jquery.validate.js

@ -1,21 +1,21 @@
/*! /*!
* jQuery Validation Plugin v1.17.0 * jQuery Validation Plugin v1.17.0
* *
* https://jqueryvalidation.org/ * https://jqueryvalidation.org/
* *
* Copyright (c) 2017 Jörn Zaefferer * Copyright (c) 2017 Jörn Zaefferer
* Released under the MIT license * Released under the MIT license
*/ */
(function( factory ) { (function( factory ) {
if ( typeof define === "function" && define.amd ) { if ( typeof define === "function" && define.amd ) {
define( ["jquery"], factory ); define( ["jquery"], factory );
} else if (typeof module === "object" && module.exports) { } else if (typeof module === "object" && module.exports) {
module.exports = factory( require( "jquery" ) ); module.exports = factory( require( "jquery" ) );
} else { } else {
factory( jQuery ); factory( jQuery );
} }
}(function( $ ) { }(function( $ ) {
$.extend( $.fn, { $.extend( $.fn, {
// https://jqueryvalidation.org/validate/ // https://jqueryvalidation.org/validate/
@ -1561,7 +1561,7 @@ $.extend( $.validator, {
} }
} ); } );
// Ajax mode: abort // Ajax mode: abort
// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]}); // usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
// if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort() // if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()
@ -1597,5 +1597,5 @@ if ( $.ajaxPrefilter ) {
return ajax.apply( this, arguments ); return ajax.apply( this, arguments );
}; };
} }
return $; return $;
})); }));

2765
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/wwwroot/libs/luxon/luxon.js

File diff suppressed because it is too large

2
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/wwwroot/libs/luxon/luxon.js.map

File diff suppressed because one or more lines are too long

2
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/wwwroot/libs/luxon/luxon.min.js

File diff suppressed because one or more lines are too long

2
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/wwwroot/libs/luxon/luxon.min.js.map

File diff suppressed because one or more lines are too long

8
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/wwwroot/libs/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.concat.min.js

File diff suppressed because one or more lines are too long

2534
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/wwwroot/libs/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.css

File diff suppressed because it is too large

4914
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/wwwroot/libs/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.js

File diff suppressed because it is too large

72
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/wwwroot/libs/malihu-custom-scrollbar-plugin/package.json

@ -1,37 +1,37 @@
{ {
"name": "malihu-custom-scrollbar-plugin", "name": "malihu-custom-scrollbar-plugin",
"version": "3.1.5", "version": "3.1.5",
"author": "malihu (http://manos.malihu.gr)", "author": "malihu (http://manos.malihu.gr)",
"description": "Highly customizable custom scrollbar jQuery plugin, featuring vertical/horizontal scrollbars, scrolling momentum, mouse-wheel, keyboard and touch support user defined callbacks etc.", "description": "Highly customizable custom scrollbar jQuery plugin, featuring vertical/horizontal scrollbars, scrolling momentum, mouse-wheel, keyboard and touch support user defined callbacks etc.",
"license": "MIT", "license": "MIT",
"homepage": "http://manos.malihu.gr/jquery-custom-content-scroller", "homepage": "http://manos.malihu.gr/jquery-custom-content-scroller",
"main": "./jquery.mCustomScrollbar.js", "main": "./jquery.mCustomScrollbar.js",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/malihu/malihu-custom-scrollbar-plugin.git" "url": "https://github.com/malihu/malihu-custom-scrollbar-plugin.git"
}, },
"bugs": { "bugs": {
"url": "https://github.com/malihu/malihu-custom-scrollbar-plugin/issues" "url": "https://github.com/malihu/malihu-custom-scrollbar-plugin/issues"
}, },
"keywords": [ "keywords": [
"jquery-plugin", "jquery-plugin",
"custom-scrollbar", "custom-scrollbar",
"scrollbar" "scrollbar"
], ],
"files": [ "files": [
"jquery.mCustomScrollbar.js", "jquery.mCustomScrollbar.js",
"jquery.mCustomScrollbar.concat.min.js", "jquery.mCustomScrollbar.concat.min.js",
"jquery.mCustomScrollbar.css", "jquery.mCustomScrollbar.css",
"mCSB_buttons.png", "mCSB_buttons.png",
"readme.md" "readme.md"
], ],
"jam": { "jam": {
"dependencies": { "dependencies": {
"jquery": ">=1.6", "jquery": ">=1.6",
"jquery-mousewheel": ">=3.0.6" "jquery-mousewheel": ">=3.0.6"
} }
}, },
"dependencies": { "dependencies": {
"jquery-mousewheel": ">=3.0.6" "jquery-mousewheel": ">=3.0.6"
} }
} }

162
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/wwwroot/libs/malihu-custom-scrollbar-plugin/readme.md

@ -1,82 +1,82 @@
malihu custom scrollbar plugin malihu custom scrollbar plugin
================================ ================================
Highly customizable custom scrollbar jQuery plugin ([Demo](http://manos.malihu.gr/repository/custom-scrollbar/demo/examples/complete_examples.html)). Features include: Highly customizable custom scrollbar jQuery plugin ([Demo](http://manos.malihu.gr/repository/custom-scrollbar/demo/examples/complete_examples.html)). Features include:
* Vertical and/or horizontal scrollbar(s) * Vertical and/or horizontal scrollbar(s)
* Adjustable scrolling momentum * Adjustable scrolling momentum
* Mouse-wheel, keyboard and touch support * Mouse-wheel, keyboard and touch support
* Ready-to-use themes and customization via CSS * Ready-to-use themes and customization via CSS
* RTL direction support * RTL direction support
* Option parameters for full control of scrollbar functionality * Option parameters for full control of scrollbar functionality
* Methods for triggering actions like scroll-to, update, destroy etc. * Methods for triggering actions like scroll-to, update, destroy etc.
* User-defined callbacks * User-defined callbacks
* Selectable/searchable content * Selectable/searchable content
**[Plugin homepage and documentation](http://manos.malihu.gr/jquery-custom-content-scroller/)** ([Changelog](http://manos.malihu.gr/jquery-custom-content-scroller/2/)) **[Plugin homepage and documentation](http://manos.malihu.gr/jquery-custom-content-scroller/)** ([Changelog](http://manos.malihu.gr/jquery-custom-content-scroller/2/))
#### Installation #### Installation
npm: `npm install malihu-custom-scrollbar-plugin` npm: `npm install malihu-custom-scrollbar-plugin`
Bower: `bower install malihu-custom-scrollbar-plugin` Bower: `bower install malihu-custom-scrollbar-plugin`
[Manual](http://manos.malihu.gr/jquery-custom-content-scroller/#get-started-section) [Manual](http://manos.malihu.gr/jquery-custom-content-scroller/#get-started-section)
#### Usage #### Usage
Manual: `$(selector).mCustomScrollbar();` Manual: `$(selector).mCustomScrollbar();`
[Browserify](http://browserify.org/): [Browserify](http://browserify.org/):
var $ = require('jquery'); var $ = require('jquery');
require('malihu-custom-scrollbar-plugin')($); require('malihu-custom-scrollbar-plugin')($);
[webpack](https://webpack.github.io/): [webpack](https://webpack.github.io/):
npm install imports-loader npm install imports-loader
npm install jquery-mousewheel npm install jquery-mousewheel
npm install malihu-custom-scrollbar-plugin npm install malihu-custom-scrollbar-plugin
module.exports = { module.exports = {
module: { module: {
loaders: [ loaders: [
{ test: /jquery-mousewheel/, loader: "imports?define=>false&this=>window" }, { test: /jquery-mousewheel/, loader: "imports?define=>false&this=>window" },
{ test: /malihu-custom-scrollbar-plugin/, loader: "imports?define=>false&this=>window" } { test: /malihu-custom-scrollbar-plugin/, loader: "imports?define=>false&this=>window" }
] ]
} }
}; };
var $ = require('jquery'); var $ = require('jquery');
require("jquery-mousewheel")($); require("jquery-mousewheel")($);
require('malihu-custom-scrollbar-plugin')($); require('malihu-custom-scrollbar-plugin')($);
Requirements Requirements
------------------------- -------------------------
jQuery version **1.6.0** or higher jQuery version **1.6.0** or higher
Browser compatibility Browser compatibility
------------------------- -------------------------
* Internet Explorer 8+ * Internet Explorer 8+
* Firefox * Firefox
* Chrome * Chrome
* Opera * Opera
* Safari * Safari
* iOS * iOS
* Android * Android
* Windows Phone * Windows Phone
License License
------------------------- -------------------------
MIT License (MIT) MIT License (MIT)
http://opensource.org/licenses/MIT http://opensource.org/licenses/MIT
Donate Donate
------------------------- -------------------------
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=UYJ5G65M6ZA28 https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=UYJ5G65M6ZA28

257
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi.Host/yarn.lock

@ -2,174 +2,174 @@
# yarn lockfile v1 # yarn lockfile v1
"@abp/aspnetcore.mvc.ui.theme.basic@^1.0.2": "@abp/aspnetcore.mvc.ui.theme.basic@^2.1.0":
version "1.0.2" version "2.1.0"
resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-1.0.2.tgz#4adf25fe08eb3e46e9195e5edf55890dd3b306c6" resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-2.1.0.tgz#f815001bd856fb5cbdd0b736181f2401a1a7ec62"
integrity sha512-0CQiSuuauiEGRnX4GwyzY8Dk//0CUGsiw/m/YMx+4ekRGsg0RfheqY5yzx53KxGGGXIwEPwqtePp4OgGLE21uQ== integrity sha512-ej6dhUo3H9w6bpBTpMhk3M6zbC3fVAVMm5yLSYlYJ0sQxjb9PqC02OgiJme0mkxCUMwPuHVSQLrMQbioXdZu3A==
dependencies: dependencies:
"@abp/aspnetcore.mvc.ui.theme.shared" "^1.0.2" "@abp/aspnetcore.mvc.ui.theme.shared" "^2.1.0"
"@abp/aspnetcore.mvc.ui.theme.shared@^1.0.2": "@abp/aspnetcore.mvc.ui.theme.shared@^2.1.0":
version "1.0.2" version "2.1.0"
resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-1.0.2.tgz#1d64a4b2455335449cdd320c7b7f2d17dcdb6af8" resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-2.1.0.tgz#c2790241b5a44b9d6e4f65911a1b9d9e9104ed82"
integrity sha512-0hvTUuXazF4+w8XhctVEwm5itQdgaVbEYIyHibBhW4ItP/NlgSiTxJ4LoSt6NXJZphVuc2K3sY3ZETQgNVH+cQ== integrity sha512-dxC0P/b1T+QJmRrB8HoLM7/GkWblz/X5lLqgn583W7/OTYhvxIxszuRDy/XIEuS+fP6a9rcGvGu5jcKJEqe/xA==
dependencies: dependencies:
"@abp/aspnetcore.mvc.ui" "^1.0.2" "@abp/aspnetcore.mvc.ui" "^2.1.0"
"@abp/bootstrap" "^1.0.2" "@abp/bootstrap" "^2.1.0"
"@abp/bootstrap-datepicker" "^1.0.2" "@abp/bootstrap-datepicker" "^2.1.0"
"@abp/datatables.net-bs4" "^1.0.2" "@abp/datatables.net-bs4" "^2.1.0"
"@abp/font-awesome" "^1.0.2" "@abp/font-awesome" "^2.1.0"
"@abp/jquery-form" "^1.0.2" "@abp/jquery-form" "^2.1.0"
"@abp/jquery-validation-unobtrusive" "^1.0.2" "@abp/jquery-validation-unobtrusive" "^2.1.0"
"@abp/lodash" "^1.0.2" "@abp/lodash" "^2.1.0"
"@abp/luxon" "^1.0.2" "@abp/luxon" "^2.1.0"
"@abp/malihu-custom-scrollbar-plugin" "^1.0.2" "@abp/malihu-custom-scrollbar-plugin" "^2.1.0"
"@abp/select2" "^1.0.2" "@abp/select2" "^2.1.0"
"@abp/sweetalert" "^1.0.2" "@abp/sweetalert" "^2.1.0"
"@abp/timeago" "^1.0.2" "@abp/timeago" "^2.1.0"
"@abp/toastr" "^1.0.2" "@abp/toastr" "^2.1.0"
"@abp/aspnetcore.mvc.ui@^1.0.2": "@abp/aspnetcore.mvc.ui@^2.1.0":
version "1.0.2" version "2.1.0"
resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-1.0.2.tgz#0c227eb46851adf416f189933984670b8d585b38" resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-2.1.0.tgz#3c86f42e52af3151d2aee0ffdd1281014ea61054"
integrity sha512-B4g7pqwIAZ0y9NcLpfTmnU/YjGHB80E1tSPLRmOeIQNaOPrIab8BN0HnNekuGIGSgesc9J6VWVuA/+D1vzlyMg== integrity sha512-pKiKMBOPuLm7p44DW8DdbsVn5PY3NqGYkz6gf75uzxyWiVYyl2CM/bvX9w4Ie7Q969owENMLrBREN6ezWZ5ynA==
dependencies: dependencies:
ansi-colors "^3.2.4" ansi-colors "^4.1.1"
extend-object "^1.0.0" extend-object "^1.0.0"
gulp "^4.0.2" gulp "^4.0.2"
merge-stream "^2.0.0" merge-stream "^2.0.0"
path "^0.12.7" path "^0.12.7"
rimraf "^2.6.3" rimraf "^3.0.0"
"@abp/bootstrap-datepicker@^1.0.2": "@abp/bootstrap-datepicker@^2.1.0":
version "1.0.2" version "2.1.0"
resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-1.0.2.tgz#36e8ee3d006740d161387c0a0f6a58bae44001ed" resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-2.1.0.tgz#a0d71da15cb3d3cc02f9a390437a44db5e9f9ea1"
integrity sha512-focQu8S3AIF2roG5zCB4Jvu6bTyReAB2cBAygIf+hVhQzKLQ1gbW8YVvdsyx1oPRN9ZtMoQ/bP91nu+4kXq5SA== integrity sha512-lkNI0iyefiXS2O5x9Ae9eJQLPXSQlOWDX7QhKnBHLR9JxjJEnhBUIIOylMltAIqtVDtjk2ikDyd3BAiyBdtB/w==
dependencies: dependencies:
bootstrap-datepicker "^1.9.0" bootstrap-datepicker "^1.9.0"
"@abp/bootstrap@^1.0.2": "@abp/bootstrap@^2.1.0":
version "1.0.2" version "2.1.0"
resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-1.0.2.tgz#be04792c11ca285de03bf8cc60d6c6791dddc886" resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-2.1.0.tgz#7ce15d4effac0e0991a3520c4666c6cb17a3fef2"
integrity sha512-4VP2ZOQSIT9nHRSW4r9odruR8hbq5gsyb6p8W4BEHMU07uwZYhIM9rlyqhz1ZtztIar+IP7NGm+xoNP+eT55Fw== integrity sha512-1xQjqu6shCgzd1FI94y5AIXGIhBlZEoRrOhaT84j/2KzYiDvhP+LAqQjMgqlQmBLs6vMckpxtf5thxKTMXvtOw==
dependencies: dependencies:
"@abp/core" "^1.0.2" "@abp/core" "^2.1.0"
bootstrap "^4.3.1" bootstrap "^4.3.1"
"@abp/core@^1.0.2": "@abp/core@^2.1.0":
version "1.0.2" version "2.1.0"
resolved "https://registry.yarnpkg.com/@abp/core/-/core-1.0.2.tgz#87799b82ab11bbe625a710d2f9a7022e7aa6f58e" resolved "https://registry.yarnpkg.com/@abp/core/-/core-2.1.0.tgz#0cd2850f029df1d18517b8e74c70341972c37ed7"
integrity sha512-jix0I2ocFpi+io74jeOfhfcn6QYgSLLWg8CZzTb7jbs5VbB2ptFERgprKdO2/LtgQRpW6oaSYj1a3l4/e2dPEQ== integrity sha512-1wnRo00hWncZWSakaEXm388XhhbKXDVkWDIdaT3kyQpvp3kX1lFx7I5iiZiwIeULwZRF9mi6HV6iHEze58x0kQ==
"@abp/datatables.net-bs4@^1.0.2": "@abp/datatables.net-bs4@^2.1.0":
version "1.0.2" version "2.1.0"
resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-1.0.2.tgz#12a71c08c5f371349fcafe9e2cce8abb90f2671f" resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs4/-/datatables.net-bs4-2.1.0.tgz#a0f36cf4e3ef96ae03aa4b9956fcb8b971c854cb"
integrity sha512-B12dpg8jqoSTNUqr/iXQHov5eeFCeEifKtHesT4KUATWTQYcXawPsJ7cuihBA/+8hEkfixKLu15pMwMXMKVe7Q== integrity sha512-93qc2rrGs+JKRPM/7UCasa5VmfswgYU8cv3Ybg5OKoaASODYUn06GChRFnd/mvqcDxw4+8gaqpC3U2ETZZI4pA==
dependencies: dependencies:
"@abp/datatables.net" "^1.0.2" "@abp/datatables.net" "^2.1.0"
datatables.net-bs4 "^1.10.20" datatables.net-bs4 "^1.10.20"
"@abp/datatables.net@^1.0.2": "@abp/datatables.net@^2.1.0":
version "1.0.2" version "2.1.0"
resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-1.0.2.tgz#09d4cd06fab61f1cf540d23266d691110632f836" resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-2.1.0.tgz#674eaaa5b0948d7ee85b6605bfbad1a70f839aa7"
integrity sha512-opueN1uVt+4crfl0OfhrsNP5hudp3yOO2IDzymyPnjKcvQOnzK6uxgTp0Rr7UiQ2RSHndIzsEy7hw/S15BKpWQ== integrity sha512-3ZM2p+JpHumxbIKlDP/LKLsfceMdttdTOL0ckIZCmAAgoIeKmAtuMoKcHTr8lj5mjgv4arBGvG9WVCemep2PEw==
dependencies: dependencies:
"@abp/core" "^1.0.2" "@abp/core" "^2.1.0"
datatables.net "^1.10.20" datatables.net "^1.10.20"
"@abp/font-awesome@^1.0.2": "@abp/font-awesome@^2.1.0":
version "1.0.2" version "2.1.0"
resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-1.0.2.tgz#75e4b10a1a9e20daf180a27e481ad783b464c986" resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-2.1.0.tgz#c2e628a1b9d0525e7d6950bf007feebcd1c490c8"
integrity sha512-rB5vlAB9wN5O+oEqZGjZTXaTTwxD/c5x1HjLF+87/Y8cqpEdrjhj0u4qTdVZuAy48DO68Wod10hV1DbriaTQeQ== integrity sha512-vlm1IQuQVfuCI2O1vphDd11zUEJ4/4PU0/0XI1YCpilse8fBg080CM3+G0kw6Erm/riznqhOJwBcfT+K+zqk8A==
dependencies: dependencies:
"@abp/core" "^1.0.2" "@abp/core" "^2.1.0"
"@fortawesome/fontawesome-free" "^5.11.2" "@fortawesome/fontawesome-free" "^5.11.2"
"@abp/jquery-form@^1.0.2": "@abp/jquery-form@^2.1.0":
version "1.0.2" version "2.1.0"
resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-1.0.2.tgz#0b289789c84ebae51e4ddf1886fa53637991e4c4" resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-2.1.0.tgz#285dbfdcf722cb0249f149e728cef7f788410c0c"
integrity sha512-GB1+kAkDZT2vNgcyi9fTMtm7RxQolGaOPLRf2DZv8690MGYxxQuH0ugw3m3rDvwcufOhNVEukvDCZu0F0cvbEg== integrity sha512-A17rjHTiBJBKYgrtDX5wIqnI89wNmo3bdK9NagL1wMFj4GvDyOZoRIDLqkopYQsc8zuPjqw4+1aa2TPiA+jtKg==
dependencies: dependencies:
"@abp/jquery" "^1.0.2" "@abp/jquery" "^2.1.0"
jquery-form "^4.2.2" jquery-form "^4.2.2"
"@abp/jquery-validation-unobtrusive@^1.0.2": "@abp/jquery-validation-unobtrusive@^2.1.0":
version "1.0.2" version "2.1.0"
resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-1.0.2.tgz#f6c309ea9f693025ddd8510e68b89198ee8b2a7d" resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-2.1.0.tgz#fc938775ced2efc686e7dd092d6ceff1ea947f36"
integrity sha512-aUssKSMLgaUpNtFCtrZh/9Vlfsy6LMXmin/DJ9rwvbgwpn7C4r4fe3OFoV8qZrGHjy3y2nX/LXH9Jq1WVlGvKg== integrity sha512-a8iBIj6amJ9rQNV+wxQUuEVh93M/c32kJcrwSEPWQcOoTj5gf0j8eKK9YvZaGokpylraz9mdGOwYQQuNj1sxEw==
dependencies: dependencies:
"@abp/jquery-validation" "^1.0.2" "@abp/jquery-validation" "^2.1.0"
jquery-validation-unobtrusive "^3.2.11" jquery-validation-unobtrusive "^3.2.11"
"@abp/jquery-validation@^1.0.2": "@abp/jquery-validation@^2.1.0":
version "1.0.2" version "2.1.0"
resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-1.0.2.tgz#68926d3068a540cab012bc47afef724176cd55cb" resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-2.1.0.tgz#2bf1a31321cce3b2abe6d56c6112c52a8ecb28b6"
integrity sha512-ckjm1GcAeFQKZbf41Pfbr/WnjiWIGDbRos31qVrV718XuBhVlKygrS1yFhlsHj9oTjrBH/gAbpyMAdcQBoZsTQ== integrity sha512-kU6/E+Xc3wHAUs+sGMAL8uozkXv65HnpksTwV4/+RK+D6iFU2EyNgCEFu7QGSwYZsV1/7YsCe2GD4ucBXIknbA==
dependencies: dependencies:
"@abp/jquery" "^1.0.2" "@abp/jquery" "^2.1.0"
jquery-validation "^1.19.1" jquery-validation "^1.19.1"
"@abp/jquery@^1.0.2": "@abp/jquery@^2.1.0":
version "1.0.2" version "2.1.0"
resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-1.0.2.tgz#5d546ed760798e972eb876aac62b354501a30080" resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-2.1.0.tgz#fb5b4c9e8622cf46fee92f9f731d007d5fb200bb"
integrity sha512-/0jztB6evW0HIhXwqZ0ny+UIcL25gG1RHw5a6W3FLMeqH9/3KSGMJtUqE9iNf0DWzvicm3E/pQm9m7dw7D0L0g== integrity sha512-ZpfzRut5G611bBmuDdiT6BD0M7Rl1P6r8uNxUjdmFXYwFd8wD02ZhIcsX7qFHFkYERuXfcLrZh4rpw9G1DVCJg==
dependencies: dependencies:
"@abp/core" "^1.0.2" "@abp/core" "^2.1.0"
jquery "^3.4.1" jquery "^3.4.1"
"@abp/lodash@^1.0.2": "@abp/lodash@^2.1.0":
version "1.0.2" version "2.1.0"
resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-1.0.2.tgz#bc4392c87e7b0ce61ee14e13f69e469f10fc3ef1" resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-2.1.0.tgz#9fc9e6521e6284d607cedbff1a458fa324137c5c"
integrity sha512-mFho9XqJ3vnIqWDiYzV6Nz4Iyr0/WiXdXK/YiuSl0AH6eZgF7+u+TrLcOLgxEjSUQYIwHvjkDkr7knuOzgJ/Xg== integrity sha512-s1gTHhpbmEDDCsZeXb9MpClkDS4wH5R2IWPRZUlSPxo3gF0pvkx5ubdhYUEUgqy5QqWxE/+zUAjDc4x+cEriFQ==
dependencies: dependencies:
"@abp/core" "^1.0.2" "@abp/core" "^2.1.0"
lodash "^4.17.15" lodash "^4.17.15"
"@abp/luxon@^1.0.2": "@abp/luxon@^2.1.0":
version "1.0.2" version "2.1.0"
resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-1.0.2.tgz#3b06e8a85b1420b7b59631f01b4bdaf7f40c9b7a" resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-2.1.0.tgz#624796722119f075119006b436054aecbb38f15f"
integrity sha512-5TQaTs+feVfdiO5y94z7/alZoXLNjuJutQPVh8AYpyZC43H7fgJ7WH52BxtMMJGm8d3hbzAPNIxTX940TP3qTg== integrity sha512-2b0sRo6rdYT1wDu9nSXm/9o8rhQ9ED7FxrDMYabYuOQz48esgn4fBUNcPqpxwejpFmlhZY6CONvkddNtaMeVHw==
dependencies: dependencies:
luxon "^1.17.3" luxon "^1.21.3"
"@abp/malihu-custom-scrollbar-plugin@^1.0.2": "@abp/malihu-custom-scrollbar-plugin@^2.1.0":
version "1.0.2" version "2.1.0"
resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-1.0.2.tgz#83269122edc21335044fc8cbca99e9e608f224b5" resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-2.1.0.tgz#f4dc1a32cefc3de8af08cb6d585ec5f7636a0c5e"
integrity sha512-pI12g+ZVlw8PA5u80mut5XOpQEXuUcRnbACwCnKO2TAhpTSecPpXh89lpnLeMPjyxAVGEOVUUBQ9fzHz0dHDTg== integrity sha512-WcxzCZ5YOMxGxZerEh966cVrFSCw1UTDqwU2rxA/LsHEbPKd69AY+SHvUiacNxPXs1ZCF6FFJ29C5dWicEIRaQ==
dependencies: dependencies:
"@abp/core" "^1.0.2" "@abp/core" "^2.1.0"
malihu-custom-scrollbar-plugin "^3.1.5" malihu-custom-scrollbar-plugin "^3.1.5"
"@abp/select2@^1.0.2": "@abp/select2@^2.1.0":
version "1.0.2" version "2.1.0"
resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-1.0.2.tgz#4c467e9dcab3527bf930de22d7ee035acc73bab4" resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-2.1.0.tgz#79e50d2c25e74a5f96520e8aa1433d79aea674d1"
integrity sha512-D9HnPATPZU0HsFur2NL9J0KQB0N0/6/PatdjQ53IphCW3TCAeaeYA1allsVPrCbWFU9e/c5+N26h5XMAHQHSrw== integrity sha512-ut/3c+lFdoepuDH36M7thWagmAmTFrChcPnhYjTx4MmIf31WW1BwqOSx3I2g8M+NEEx+V2jTNuBpTq7PONgSJg==
dependencies: dependencies:
"@abp/core" "^1.0.2" "@abp/core" "^2.1.0"
select2 "^4.0.11" select2 "^4.0.12"
"@abp/sweetalert@^1.0.2": "@abp/sweetalert@^2.1.0":
version "1.0.2" version "2.1.0"
resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-1.0.2.tgz#56815807817e9dba238c319dcac70276a034ecf7" resolved "https://registry.yarnpkg.com/@abp/sweetalert/-/sweetalert-2.1.0.tgz#88f405c4ba9f9ed2fd54b945ed6bc48d5ae2fa23"
integrity sha512-2b6kAwT7vf8ztcni684rpcQbFmeTcKecd+PXnUUwXgbKwrhTO8bQCfHe47/XLLdiBVX9n1V6Ks0Jy60pOs9+5Q== integrity sha512-EWvReqxZ1DrNH9XD+cf/yGVj+8IPTpuoPuWKDryN4fF7TCMJA+KrXp5lFxpjfkKTtNzLeFGsJqDFWaUifxtqTA==
dependencies: dependencies:
"@abp/core" "^1.0.2" "@abp/core" "^2.1.0"
sweetalert "^2.1.2" sweetalert "^2.1.2"
"@abp/timeago@^1.0.2": "@abp/timeago@^2.1.0":
version "1.0.2" version "2.1.0"
resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-1.0.2.tgz#00ab715ab9042fcf8e5835f67041f388b45cc925" resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-2.1.0.tgz#28c0aef88aff8b54d1dfb42a664d05097e7fda35"
integrity sha512-h4FmxlI/kv/wr8vrPgB9+d1RAE4WTQUFEfB5ytUwdSQQg6JmhKdDH4hOKg1KStprUrBm2BczvJ20VjxjLOuSrQ== integrity sha512-NklUYcWeji7po+Y6Oi7b7IkYmjd5YRu123bm3MqjQ71AzuOCTFbvPMHzYOjrUTkzr6gW3IJ24LQ4YmpshPy4ZQ==
dependencies: dependencies:
"@abp/jquery" "^1.0.2" "@abp/jquery" "^2.1.0"
timeago "^1.6.7" timeago "^1.6.7"
"@abp/toastr@^1.0.2": "@abp/toastr@^2.1.0":
version "1.0.2" version "2.1.0"
resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-1.0.2.tgz#85c2f9bc9948e489ef2a171a0460ae0a9cc8adf9" resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-2.1.0.tgz#22a53a2b1f354770fdc7b37f06bec10eefccfe7a"
integrity sha512-CCdDOPVtU5qJo7TAaadMtFg1dVq1wXZvgRRCap1ayjZvFAKOJvNjN+IEgpP27lnb/GF5UYMqsiAX8dAA0tmyvw== integrity sha512-hD3hTDx+CixTVTx73rnZDiiFkfSxpZox8RLm+CiFA62ORdO8Ryij8TOXXkJd84b2tJfkAkYehohVXKwHlHU7Zg==
dependencies: dependencies:
"@abp/jquery" "^1.0.2" "@abp/jquery" "^2.1.0"
toastr "^2.1.4" toastr "^2.1.4"
"@fortawesome/fontawesome-free@^5.11.2": "@fortawesome/fontawesome-free@^5.11.2":
@ -189,10 +189,10 @@ ansi-colors@^1.0.1:
dependencies: dependencies:
ansi-wrap "^0.1.0" ansi-wrap "^0.1.0"
ansi-colors@^3.2.4: ansi-colors@^4.1.1:
version "3.2.4" version "4.1.1"
resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348"
integrity sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA== integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==
ansi-gray@^0.1.1: ansi-gray@^0.1.1:
version "0.1.1" version "0.1.1"
@ -1445,10 +1445,10 @@ lodash@^4.17.15:
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
luxon@^1.17.3: luxon@^1.21.3:
version "1.19.2" version "1.21.3"
resolved "https://registry.yarnpkg.com/luxon/-/luxon-1.19.2.tgz#f041a9031e7dff6fdbff46e46c73b3fdf4ab2764" resolved "https://registry.yarnpkg.com/luxon/-/luxon-1.21.3.tgz#f1d5c2a7e855d039836cf4954f883ecac8fc4727"
integrity sha512-4Dn6oriheX04QQd7mMhuScnyQPdD7h11aCJgSTq9FqkOWdxX7xRUXoX/OXu4rkw98NmcVz3QSLpLbDnT6lVsMw== integrity sha512-lLRwNcNnkZLuv13A1FUuZRZmTWF7ro2ricYvb0L9cvBYHPvZhQdKwrYnZzi103D2XKmlVmxWpdn2wfIiOt2YEw==
make-iterator@^1.0.0: make-iterator@^1.0.0:
version "1.0.1" version "1.0.1"
@ -2065,13 +2065,20 @@ ret@~0.1.10:
version "0.1.15" version "0.1.15"
resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"
rimraf@^2.6.1, rimraf@^2.6.3: rimraf@^2.6.1:
version "2.6.3" version "2.6.3"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab"
integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==
dependencies: dependencies:
glob "^7.1.3" glob "^7.1.3"
rimraf@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.0.tgz#614176d4b3010b75e5c390eb0ee96f6dc0cebb9b"
integrity sha512-NDGVxTsjqfunkds7CqsOiEnxln4Bo7Nddl3XhS4pXg5OzwkLqJ971ZVAAnB+DDLnF76N+VnDEiBHaVV8I06SUg==
dependencies:
glob "^7.1.3"
safe-buffer@^5.1.0, safe-buffer@^5.1.2: safe-buffer@^5.1.0, safe-buffer@^5.1.2:
version "5.1.2" version "5.1.2"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
@ -2097,7 +2104,7 @@ sax@^1.2.4:
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==
select2@^4.0.11: select2@^4.0.12:
version "4.0.12" version "4.0.12"
resolved "https://registry.yarnpkg.com/select2/-/select2-4.0.12.tgz#9c0492d4d06948f2bd079f6e14718a41c7eaa60e" resolved "https://registry.yarnpkg.com/select2/-/select2-4.0.12.tgz#9c0492d4d06948f2bd079f6e14718a41c7eaa60e"
integrity sha512-mbXC05AvjCboZcRlgJqN4mlI2qmqshpRC76sKNAdxS1lPLOh2m/NTyfL6xsvGoY6eIhjaya4dbumN99MudVQ2w== integrity sha512-mbXC05AvjCboZcRlgJqN4mlI2qmqshpRC76sKNAdxS1lPLOh2m/NTyfL6xsvGoY6eIhjaya4dbumN99MudVQ2w==

10
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.HttpApi/Acme.BookStore.HttpApi.csproj

@ -12,11 +12,11 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\..\..\modules\account\src\Volo.Abp.Account.HttpApi\Volo.Abp.Account.HttpApi.csproj" /> <PackageReference Include="Volo.Abp.Account.HttpApi" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\identity\src\Volo.Abp.Identity.HttpApi\Volo.Abp.Identity.HttpApi.csproj" /> <PackageReference Include="Volo.Abp.Identity.HttpApi" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.HttpApi\Volo.Abp.PermissionManagement.HttpApi.csproj" /> <PackageReference Include="Volo.Abp.PermissionManagement.HttpApi" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.HttpApi\Volo.Abp.TenantManagement.HttpApi.csproj" /> <PackageReference Include="Volo.Abp.TenantManagement.HttpApi" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.HttpApi\Volo.Abp.FeatureManagement.HttpApi.csproj" /> <PackageReference Include="Volo.Abp.FeatureManagement.HttpApi" Version="2.1.1" />
</ItemGroup> </ItemGroup>
</Project> </Project>

16
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.MongoDB/Acme.BookStore.MongoDB.csproj

@ -9,14 +9,14 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Acme.BookStore.Domain\Acme.BookStore.Domain.csproj" /> <ProjectReference Include="..\Acme.BookStore.Domain\Acme.BookStore.Domain.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.MongoDB\Volo.Abp.PermissionManagement.MongoDB.csproj" /> <PackageReference Include="Volo.Abp.PermissionManagement.MongoDB" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\setting-management\src\Volo.Abp.SettingManagement.MongoDB\Volo.Abp.SettingManagement.MongoDB.csproj" /> <PackageReference Include="Volo.Abp.SettingManagement.MongoDB" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\identity\src\Volo.Abp.Identity.MongoDB\Volo.Abp.Identity.MongoDB.csproj" /> <PackageReference Include="Volo.Abp.Identity.MongoDB" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\identityserver\src\Volo.Abp.IdentityServer.MongoDB\Volo.Abp.IdentityServer.MongoDB.csproj" /> <PackageReference Include="Volo.Abp.IdentityServer.MongoDB" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\background-jobs\src\Volo.Abp.BackgroundJobs.MongoDB\Volo.Abp.BackgroundJobs.MongoDB.csproj" /> <PackageReference Include="Volo.Abp.BackgroundJobs.MongoDB" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\audit-logging\src\Volo.Abp.AuditLogging.MongoDB\Volo.Abp.AuditLogging.MongoDB.csproj" /> <PackageReference Include="Volo.Abp.AuditLogging.MongoDB" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\tenant-management\src\Volo.Abp.TenantManagement.MongoDB\Volo.Abp.TenantManagement.MongoDB.csproj" /> <PackageReference Include="Volo.Abp.TenantManagement.MongoDB" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\modules\feature-management\src\Volo.Abp.FeatureManagement.MongoDB\Volo.Abp.FeatureManagement.MongoDB.csproj" /> <PackageReference Include="Volo.Abp.FeatureManagement.MongoDB" Version="2.1.1" />
</ItemGroup> </ItemGroup>
</Project> </Project>

3
samples/BookStore-Angular-MongoDb/aspnet-core/src/Acme.BookStore.MongoDB/MongoDb/BookStoreMongoDbContext.cs

@ -8,9 +8,8 @@ namespace Acme.BookStore.MongoDB
[ConnectionStringName("Default")] [ConnectionStringName("Default")]
public class BookStoreMongoDbContext : AbpMongoDbContext public class BookStoreMongoDbContext : AbpMongoDbContext
{ {
public IMongoCollection<Book> Books => Collection<Book>();
public IMongoCollection<AppUser> Users => Collection<AppUser>(); public IMongoCollection<AppUser> Users => Collection<AppUser>();
public IMongoCollection<Book> Books => Collection<Book>();
protected override void CreateModel(IMongoModelBuilder modelBuilder) protected override void CreateModel(IMongoModelBuilder modelBuilder)
{ {

2
samples/BookStore-Angular-MongoDb/aspnet-core/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/Acme.BookStore.HttpApi.Client.ConsoleTestApp.csproj

@ -17,7 +17,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.Http.Client.IdentityModel\Volo.Abp.Http.Client.IdentityModel.csproj" /> <PackageReference Include="Volo.Abp.Http.Client.IdentityModel" Version="2.1.1" />
<ProjectReference Include="..\..\src\Acme.BookStore.HttpApi.Client\Acme.BookStore.HttpApi.Client.csproj" /> <ProjectReference Include="..\..\src\Acme.BookStore.HttpApi.Client\Acme.BookStore.HttpApi.Client.csproj" />
</ItemGroup> </ItemGroup>

2
samples/BookStore-Angular-MongoDb/aspnet-core/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs

@ -1,4 +1,4 @@
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;

4
samples/BookStore-Angular-MongoDb/aspnet-core/test/Acme.BookStore.HttpApi.Client.ConsoleTestApp/appsettings.json

@ -1,7 +1,7 @@
{ {
"RemoteServices": { "RemoteServices": {
"Default": { "Default": {
"BaseUrl": "https://localhost:44341" "BaseUrl": "https://localhost:44317"
} }
}, },
"IdentityClients": { "IdentityClients": {
@ -11,7 +11,7 @@
"ClientSecret": "1q2w3e*", "ClientSecret": "1q2w3e*",
"UserName": "admin", "UserName": "admin",
"UserPassword": "1q2w3E*", "UserPassword": "1q2w3E*",
"Authority": "https://localhost:44341", "Authority": "https://localhost:44317",
"Scope": "BookStore" "Scope": "BookStore"
} }
} }

6
samples/BookStore-Angular-MongoDb/aspnet-core/test/Acme.BookStore.TestBase/Acme.BookStore.TestBase.csproj

@ -8,9 +8,9 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.TestBase\Volo.Abp.TestBase.csproj" /> <PackageReference Include="Volo.Abp.TestBase" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" /> <PackageReference Include="Volo.Abp.Autofac" Version="2.1.1" />
<ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.Authorization\Volo.Abp.Authorization.csproj" /> <PackageReference Include="Volo.Abp.Authorization" Version="2.1.1" />
<ProjectReference Include="..\..\src\Acme.BookStore.Domain\Acme.BookStore.Domain.csproj" /> <ProjectReference Include="..\..\src\Acme.BookStore.Domain\Acme.BookStore.Domain.csproj" />
</ItemGroup> </ItemGroup>

2
samples/BookStore-Angular-MongoDb/aspnet-core/test/Acme.BookStore.TestBase/BookStoreTestBase.cs

@ -37,7 +37,7 @@ namespace Acme.BookStore
} }
} }
} }
protected virtual Task<TResult> WithUnitOfWorkAsync<TResult>(Func<Task<TResult>> func) protected virtual Task<TResult> WithUnitOfWorkAsync<TResult>(Func<Task<TResult>> func)
{ {
return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func); return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func);

Loading…
Cancel
Save