diff --git a/docs/en/Tutorials/Part-1.md b/docs/en/Tutorials/Part-1.md index 96b39066e9..b98395d6ac 100644 --- a/docs/en/Tutorials/Part-1.md +++ b/docs/en/Tutorials/Part-1.md @@ -82,7 +82,7 @@ abp install-libs `abp bundle` command offers bundling and minification support for client-side resources (JavaScript and CSS files) for Blazor projects. This command automatically run when you create a new solution with the [ABP CLI](../CLI.md). -However, sometimes you might need to run this command manually. To update script & style references without worrying about dependencies, ordering, etc. in a project, you can run this command in the directory of your blazor application: +However, sometimes you might need to run this command manually. To update script & style references without worrying about dependencies, ordering, etc. in a project, you can run this command in the directory of your `Blazor.Client` project: ```bash abp bundle diff --git a/docs/en/Tutorials/Part-10.md b/docs/en/Tutorials/Part-10.md index 2c5accb6c0..91476b8cd8 100644 --- a/docs/en/Tutorials/Part-10.md +++ b/docs/en/Tutorials/Part-10.md @@ -1105,7 +1105,7 @@ That's all. Just run the application and try to create or edit an author. ### The Book List -It is very easy to show the *Author Name* in the book list. Open the `/Pages/Books.razor` file in the `Acme.BookStore.Blazor` project and add the following `DataGridColumn` definition just after the `Name` (book name) column: +It is very easy to show the *Author Name* in the book list. Open the `/Pages/Books.razor` file in the `Acme.BookStore.Blazor.Client` project and add the following `DataGridColumn` definition just after the `Name` (book name) column: ````xml (); @@ -1218,7 +1218,7 @@ You will need to declare a `using Acme.BookStore.Authors;` statement to the begi ### Add to the Main Menu -Open the `BookStoreMenuContributor.cs` in the `Acme.BookStore.Blazor` project and add the following code to the end of the `ConfigureMainMenuAsync` method: +Open the `BookStoreMenuContributor.cs` in the `Acme.BookStore.Blazor.Client` project and add the following code to the end of the `ConfigureMainMenuAsync` method: ````csharp if (await context.IsGrantedAsync(BookStorePermissions.Authors.Default)) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/ChangeThemeStep.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/ChangeThemeStep.cs index ff8174dec7..92da7dce50 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/ChangeThemeStep.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/ChangeThemeStep.cs @@ -291,6 +291,13 @@ public class ChangeThemeStep : ProjectBuildPipelineStep moduleFile.Name, "Volo.Abp.LeptonX.Shared;" ); + + AddNamespaces( + context, + moduleFile.Name, + "using Volo.Abp.AspNetCore.Mvc.UI.Theme.Lepton;", + "using Volo.Abp.AspNetCore.Mvc.UI.Theme.Lepton.Bundling;" + ); } } diff --git a/modules/docs/app/VoloDocs.Web/VoloDocsWebModule.cs b/modules/docs/app/VoloDocs.Web/VoloDocsWebModule.cs index ff50ee3247..8651c0d3fd 100644 --- a/modules/docs/app/VoloDocs.Web/VoloDocsWebModule.cs +++ b/modules/docs/app/VoloDocs.Web/VoloDocsWebModule.cs @@ -85,7 +85,7 @@ namespace VoloDocs.Web Configure(options => { - options.Enable = true; + options.Enable = false; }); Configure(options => @@ -164,9 +164,11 @@ namespace VoloDocs.Web options.Conventions.AddPageRoute("/Error", "error/{statusCode}"); }); - Configure(options => + Configure(options => { - options.UseGoogleTranslation = true; + options.EnableGoogleTranslate = true; + options.EnableGoogleProgrammableSearchEngine = true; + options.GoogleSearchEngineId = "77c7266532da1427f"; }); } diff --git a/modules/docs/src/Volo.Docs.Web/DocsWebGoogleTranslationOptions.cs b/modules/docs/src/Volo.Docs.Web/DocsWebGoogleOptions.cs similarity index 74% rename from modules/docs/src/Volo.Docs.Web/DocsWebGoogleTranslationOptions.cs rename to modules/docs/src/Volo.Docs.Web/DocsWebGoogleOptions.cs index a970cdbf98..8342061a9b 100644 --- a/modules/docs/src/Volo.Docs.Web/DocsWebGoogleTranslationOptions.cs +++ b/modules/docs/src/Volo.Docs.Web/DocsWebGoogleOptions.cs @@ -4,9 +4,9 @@ using System.Globalization; namespace Volo.Docs; -public class DocsWebGoogleTranslationOptions +public class DocsWebGoogleOptions { - public bool UseGoogleTranslation { get; set; } + public bool EnableGoogleTranslate { get; set; } /// /// https://cloud.google.com/translate/docs/languages @@ -15,9 +15,13 @@ public class DocsWebGoogleTranslationOptions public Func GetCultureLanguageCode { get; set; } - public DocsWebGoogleTranslationOptions() + public bool EnableGoogleProgrammableSearchEngine { get; set; } + + public string GoogleSearchEngineId { get; set; } + + public DocsWebGoogleOptions() { - UseGoogleTranslation = false; + EnableGoogleTranslate = false; IncludedLanguages = [ "en", @@ -47,5 +51,7 @@ public class DocsWebGoogleTranslationOptions _ => culture.TwoLetterISOLanguageName }; }; + + EnableGoogleProgrammableSearchEngine = false; } } diff --git a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml index b7a8c2d321..b60ad9507f 100644 --- a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml +++ b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml @@ -22,7 +22,7 @@ @inject IThemeManager ThemeManager @inject IPageLayout PageLayout @inject IHtmlLocalizer L -@inject IOptions DocsWebOptions +@inject IOptions DocsWebGoogleOptions @model IndexModel @{ @@ -58,15 +58,15 @@ - if (DocsWebOptions.Value.UseGoogleTranslation) + if (DocsWebGoogleOptions.Value.EnableGoogleTranslate) { } + if (DocsWebGoogleOptions.Value.EnableGoogleProgrammableSearchEngine) + { + + } } else { @@ -214,7 +218,7 @@ } - @if (DocsWebOptions.Value.UseGoogleTranslation) + @if (DocsWebGoogleOptions.Value.EnableGoogleTranslate) {
@L["GoogleTranslate"] @@ -318,6 +322,11 @@
} + + @if (DocsWebGoogleOptions.Value.EnableGoogleProgrammableSearchEngine) + { + + } @{ var showContributors = Model.Document.Contributors != null && Model.Document.Contributors.Count > 0; diff --git a/npm/ng-packs/packages/core/locale/src/utils/register-locale.ts b/npm/ng-packs/packages/core/locale/src/utils/register-locale.ts index 97a49066ec..5d6ae52645 100644 --- a/npm/ng-packs/packages/core/locale/src/utils/register-locale.ts +++ b/npm/ng-packs/packages/core/locale/src/utils/register-locale.ts @@ -15,6 +15,72 @@ export interface RegisterLocaleData { errorHandlerFn?: (data: LocaleErrorHandlerData) => any; } + +function loadLocale(locale: string) { + // hard coded list works with esbuild. Source https://github.com/angular/angular-cli/issues/26904#issuecomment-1903596563 + + const list = { + 'ar': () => import('@angular/common/locales/ar'), + 'cs': () => import('@angular/common/locales/cs'), + 'en': () => import('@angular/common/locales/en'), + 'en-GB': () => import('@angular/common/locales/en-GB'), + 'es': () => import('@angular/common/locales/es'), + 'de': () => import('@angular/common/locales/de'), + 'fi': () => import('@angular/common/locales/fi'), + 'fr': () => import('@angular/common/locales/fr'), + 'hi': () => import('@angular/common/locales/hi'), + 'hu': () => import('@angular/common/locales/hu'), + 'is': () => import('@angular/common/locales/is'), + 'it': () => import('@angular/common/locales/it'), + 'pt': () => import('@angular/common/locales/pt'), + 'tr': () => import('@angular/common/locales/tr'), + 'ru': () => import('@angular/common/locales/ru'), + 'ro': () => import('@angular/common/locales/ro'), + 'sk': () => import('@angular/common/locales/sk'), + 'sl': () => import('@angular/common/locales/sl'), + 'zh-Hans': () => import('@angular/common/locales/zh-Hans'), + 'zh-Hant': () => import('@angular/common/locales/zh-Hant') + } + return list[locale](); +} + +export function registerLocaleForEsBuild( + { + cultureNameLocaleFileMap = {}, + errorHandlerFn = defaultLocalErrorHandlerFn, + } = {} as RegisterLocaleData, +) { + return (locale: string): Promise => { + localeMap = { ...differentLocales, ...cultureNameLocaleFileMap }; + const l = localeMap[locale] || locale; + const localeSupportList = "ar|cs|en|en-GB|es|de|fi|fr|hi|hu|is|it|pt|tr|ru|ro|sk|sl|zh-Hans|zh-Hant".split("|"); + + if (localeSupportList.indexOf(locale) == -1) { + return; + } + return new Promise((resolve, reject) => { + return loadLocale(l) + .then(val => { + let module = val; + while (module.default) { + module = module.default; + } + resolve({ default: module }); + }) + .catch(error => { + errorHandlerFn({ + resolve, + reject, + error, + locale, + }); + }); + }); + }; +} + + + export function registerLocale( { cultureNameLocaleFileMap = {}, diff --git a/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.html b/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.html index f1bc85ac3d..a74255a73c 100644 --- a/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.html +++ b/npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.html @@ -69,35 +69,35 @@ } @case (valueTypes.SelectionStringValueType) { @if (feature.valueType.itemSource?.items?.length) { -
- - - -
+
+ + + +
} } @default { @@ -136,7 +136,6 @@ @if (groups.length) { { - return importValue.isEnum && importValue.type === ref; - }); - - if (!isEnumImportAvailable) { - toBeImported.push({ type: ref, isEnum: false }); - } + } else if (parseNamespace(solution, ref) !== model.namespace) { + toBeImported.push({ type: ref, isEnum: false }); } }); });