diff --git a/modules/docs/src/Volo.Docs.Application/Volo/Docs/Documents/DocumentAppService.cs b/modules/docs/src/Volo.Docs.Application/Volo/Docs/Documents/DocumentAppService.cs index b3b2a05b53..839c63860b 100644 --- a/modules/docs/src/Volo.Docs.Application/Volo/Docs/Documents/DocumentAppService.cs +++ b/modules/docs/src/Volo.Docs.Application/Volo/Docs/Documents/DocumentAppService.cs @@ -23,7 +23,7 @@ namespace Volo.Docs.Documents IDocumentStoreFactory documentStoreFactory, IDistributedCache documentCache, IDistributedCache languageCache, - IDistributedCache resourceCache, + IDistributedCache resourceCache, IHostEnvironment hostEnvironment) { _projectRepository = projectRepository; @@ -107,6 +107,11 @@ namespace Volo.Docs.Documents try { + if (string.IsNullOrWhiteSpace(project.ParametersDocumentName)) + { + return await Task.FromResult(null); + } + var document = await GetDocumentWithDetailsDtoAsync( project, project.ParametersDocumentName, diff --git a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs index d2173f8790..75672afdf1 100644 --- a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs +++ b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs @@ -91,7 +91,7 @@ namespace Volo.Docs.Pages.Documents.Project try { - await SetProjectAsync(); + await SetProjectAsync(); } catch (EntityNotFoundException e) { @@ -391,7 +391,8 @@ namespace Volo.Docs.Pages.Documents.Project private async Task ConvertDocumentContentToHtmlAsync() { - await SetDocumentPreferences(); + await SetDocumentPreferencesAsync(); + SetUserPreferences(); UserPreferences.Add("Document_Language_Code", LanguageCode); Document.Content = await _documentSectionRenderer.RenderAsync(Document.Content, UserPreferences); @@ -431,12 +432,13 @@ namespace Volo.Docs.Pages.Documents.Project { continue; } + var key = keyValue.Split("=")[0]; var value = keyValue.Split("=")[1]; UserPreferences.Add(key, value); - UserPreferences.Add(key + "_Value", DocumentPreferences.Parameters?.FirstOrDefault(p=>p.Name == key) - ?.Values.FirstOrDefault(v=>v.Key == value).Value); + UserPreferences.Add(key + "_Value", DocumentPreferences.Parameters?.FirstOrDefault(p => p.Name == key) + ?.Values.FirstOrDefault(v => v.Key == value).Value); } } @@ -449,9 +451,11 @@ namespace Volo.Docs.Pages.Documents.Project UserPreferences.Remove(keyValue.Key); UserPreferences.Remove(keyValue.Key + "_Value"); } + UserPreferences.Add(keyValue.Key, keyValue.Value); - UserPreferences.Add(keyValue.Key + "_Value", DocumentPreferences.Parameters?.FirstOrDefault(p => p.Name == keyValue.Key) - ?.Values.FirstOrDefault(v => v.Key == keyValue.Value).Value); + UserPreferences.Add(keyValue.Key + "_Value", + DocumentPreferences.Parameters?.FirstOrDefault(p => p.Name == keyValue.Key)?.Values + .FirstOrDefault(v => v.Key == keyValue.Value).Value); } if (DocumentPreferences?.Parameters == null) @@ -469,7 +473,7 @@ namespace Volo.Docs.Pages.Documents.Project } } - public async Task SetDocumentPreferences() + public async Task SetDocumentPreferencesAsync() { var projectParameters = await _documentAppService.GetParametersAsync( new GetParametersDocumentInput diff --git a/npm/ng-packs/packages/account/src/lib/models/account.ts b/npm/ng-packs/packages/account/src/lib/models/account.ts index fc455758cb..04a37709c6 100644 --- a/npm/ng-packs/packages/account/src/lib/models/account.ts +++ b/npm/ng-packs/packages/account/src/lib/models/account.ts @@ -6,24 +6,13 @@ export namespace Account { readonly cancelContentRef?: TemplateRef; } - // tslint:disable-next-line: no-empty-interface + //tslint:disable export interface AuthWrapperComponentOutputs {} - - // tslint:disable-next-line: no-empty-interface export interface TenantBoxComponentInputs {} - - // tslint:disable-next-line: no-empty-interface export interface TenantBoxComponentOutputs {} - - // tslint:disable-next-line: no-empty-interface export interface PersonalSettingsComponentInputs {} - - // tslint:disable-next-line: no-empty-interface export interface PersonalSettingsComponentOutputs {} - - // tslint:disable-next-line: no-empty-interface export interface ChangePasswordComponentInputs {} - - // tslint:disable-next-line: no-empty-interface export interface ChangePasswordComponentOutputs {} + // tslint:enable } diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/button/button.component.ts b/npm/ng-packs/packages/theme-shared/src/lib/components/button/button.component.ts index 9ff4d1e24e..83bef06f26 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/button/button.component.ts +++ b/npm/ng-packs/packages/theme-shared/src/lib/components/button/button.component.ts @@ -19,9 +19,9 @@ import { ABP } from '@abp/ng.core'; [attr.type]="buttonType" [ngClass]="buttonClass" [disabled]="loading || disabled" - (click.stop)="abpClick.next($event)" - (focus)="abpFocus.next($event)" - (blur)="abpBlur.next($event)" + (click.stop)="click.next($event); abpClick.next($event)" + (focus)="focus.next($event); abpFocus.next($event)" + (blur)="blur.next($event); abpBlur.next($event)" > @@ -49,6 +49,14 @@ export class ButtonComponent implements OnInit { @Input() attributes: ABP.Dictionary; + // tslint:disable + @Output() readonly click = new EventEmitter(); + + @Output() readonly focus = new EventEmitter(); + + @Output() readonly blur = new EventEmitter(); + // tslint:enable + @Output() readonly abpClick = new EventEmitter(); @Output() readonly abpFocus = new EventEmitter(); diff --git a/npm/ng-packs/scripts/package.json b/npm/ng-packs/scripts/package.json index ebca65352a..14550a8277 100644 --- a/npm/ng-packs/scripts/package.json +++ b/npm/ng-packs/scripts/package.json @@ -20,6 +20,7 @@ "typescript": "^3.7.4" }, "devDependencies": { + "@types/node": "^13.1.2", "esm": "^3.2.25", "ts-node": "^8.5.4", "tsconfig-paths": "^3.9.0" diff --git a/npm/ng-packs/scripts/tsconfig.json b/npm/ng-packs/scripts/tsconfig.json index f007616af1..b8a62178eb 100644 --- a/npm/ng-packs/scripts/tsconfig.json +++ b/npm/ng-packs/scripts/tsconfig.json @@ -10,7 +10,8 @@ "outDir": "./dist", "baseUrl": "./", "incremental": true, - "esModuleInterop": true + "esModuleInterop": true, + "types": ["node"] }, "exclude": ["node_modules", "dist"] } diff --git a/npm/ng-packs/scripts/yarn.lock b/npm/ng-packs/scripts/yarn.lock index 9531840238..2e14671cb5 100644 --- a/npm/ng-packs/scripts/yarn.lock +++ b/npm/ng-packs/scripts/yarn.lock @@ -7,6 +7,11 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= +"@types/node@^13.1.2": + version "13.1.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-13.1.2.tgz#fe94285bf5e0782e1a9e5a8c482b1c34465fa385" + integrity sha512-B8emQA1qeKerqd1dmIsQYnXi+mmAzTB7flExjmy5X1aVAKFNNNDubkavwR13kR6JnpeLp3aLoJhwn9trWPAyFQ== + ansi-bgblack@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/ansi-bgblack/-/ansi-bgblack-0.1.1.tgz#a68ba5007887701b6aafbe3fa0dadfdfa8ee3ca2" @@ -1157,6 +1162,11 @@ tsconfig-paths@^3.9.0: minimist "^1.2.0" strip-bom "^3.0.0" +typescript@^3.7.4: + version "3.7.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.4.tgz#1743a5ec5fef6a1fa9f3e4708e33c81c73876c19" + integrity sha512-A25xv5XCtarLwXpcDNZzCGvW2D1S3/bACratYBx2sax8PefsFhlYmkQicKHvpYflFS8if4zne5zT5kpJ7pzuvw== + universalify@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"