Browse Source

Merge branch 'dev' into EngincanV-berkan/design-localization

pull/11356/head
berkansasmaz 5 years ago
parent
commit
4a7a23fe8c
No known key found for this signature in database GPG Key ID: 884D815C3F32BE00
  1. 76
      docs/en/Connection-Strings.md
  2. 67
      docs/en/UI/Angular/Theming.md
  3. 25
      docs/zh-Hans/Autofac-Integration.md
  4. 1250
      docs/zh-Hans/Tutorials/Part-9.md
  5. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/CurrentUserDto.cs
  6. 2
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationAppService.cs
  7. 4
      framework/src/Volo.Abp.Auditing/Volo/Abp/Auditing/AuditLogInfo.cs
  8. 4
      framework/src/Volo.Abp.Auditing/Volo/Abp/Auditing/AuditingHelper.cs
  9. 4
      framework/src/Volo.Abp.AutoMapper/Volo/Abp/AutoMapper/AbpAutoMapperConventionalRegistrar.cs
  10. 10
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/NpmGlobalPackagesChecker.cs
  11. 52
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/NpmPackagesUpdater.cs
  12. 22
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/ProjectNpmPackageAdder.cs
  13. 153
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs
  14. 2
      framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo.Abp.EntityFrameworkCore.Oracle.csproj
  15. 33
      framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/AbpAbpLdapOptionsManager.cs
  16. 5
      framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/AbpLdapModule.cs
  17. 20
      framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/AbpLdapOptions.cs
  18. 18
      framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/ILdapSettingProvider.cs
  19. 11
      framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/LdapManager.cs
  20. 55
      framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/LdapSettingDefinitionProvider.cs
  21. 2
      framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/LdapSettingNames.cs
  22. 73
      framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/LdapSettingProvider.cs
  23. 4
      framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/ar.json
  24. 4
      framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/cs.json
  25. 4
      framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/de-DE.json
  26. 4
      framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/en-GB.json
  27. 6
      framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/en.json
  28. 4
      framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/es.json
  29. 4
      framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/fi.json
  30. 4
      framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/fr.json
  31. 4
      framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/hi.json
  32. 7
      framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/hu.json
  33. 4
      framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/is.json
  34. 4
      framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/it.json
  35. 4
      framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/nl.json
  36. 4
      framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/pl-PL.json
  37. 4
      framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/pt-BR.json
  38. 8
      framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/ro-RO.json
  39. 4
      framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/ru.json
  40. 4
      framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/sk.json
  41. 4
      framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/sl.json
  42. 6
      framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/tr.json
  43. 4
      framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/vi.json
  44. 6
      framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/zh-Hans.json
  45. 6
      framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/zh-Hant.json
  46. 10
      framework/src/Volo.Abp.Security/Volo/Abp/Security/Claims/AbpClaimTypes.cs
  47. 14
      framework/src/Volo.Abp.Security/Volo/Abp/Users/CurrentUserExtensions.cs
  48. 9
      framework/test/Volo.Abp.Ldap.Tests/Volo/Abp/Ldap/AbpLdapTestModule.cs
  49. 9
      framework/test/Volo.Abp.Ldap.Tests/Volo/Abp/Ldap/LdapManager_Tests.cs
  50. 20
      framework/test/Volo.Abp.Ldap.Tests/Volo/Abp/Ldap/LdapOptions_Tests.cs
  51. 46
      framework/test/Volo.Abp.Ldap.Tests/Volo/Abp/Ldap/TestLdapSettingValueProvider.cs
  52. 9
      modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo/Abp/AuditLogging/AuditLog.cs
  53. 2
      modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo/Abp/AuditLogging/AuditLogInfoToAuditLogConverter.cs
  54. 3
      modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/AbpAuditLoggingDbContextModelBuilderExtensions.cs
  55. 36
      modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo/Abp/AuditLogging/AuditLogRepository_Tests.cs
  56. 6
      modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo/Abp/AuditLogging/AuditStore_Basic_Tests.cs
  57. 3
      npm/ng-packs/packages/core/src/lib/core.module.ts
  58. 1
      npm/ng-packs/packages/core/src/lib/pipes/index.ts
  59. 28
      npm/ng-packs/packages/core/src/lib/pipes/to-injector.pipe.ts
  60. 2
      npm/ng-packs/packages/theme-basic/src/lib/components/index.ts
  61. 36
      npm/ng-packs/packages/theme-basic/src/lib/components/nav-items/current-user.component.html
  62. 8
      npm/ng-packs/packages/theme-basic/src/lib/components/nav-items/current-user.component.ts
  63. 1
      npm/ng-packs/packages/theme-basic/src/lib/components/nav-items/nav-items.component.html
  64. 1
      npm/ng-packs/packages/theme-basic/src/lib/enums/index.ts
  65. 4
      npm/ng-packs/packages/theme-basic/src/lib/enums/user-menu-items.ts
  66. 1
      npm/ng-packs/packages/theme-basic/src/lib/providers/index.ts
  67. 44
      npm/ng-packs/packages/theme-basic/src/lib/providers/user-menu.provider.ts
  68. 2
      npm/ng-packs/packages/theme-basic/src/lib/theme-basic.module.ts
  69. 3
      npm/ng-packs/packages/theme-shared/src/lib/models/index.ts
  70. 10
      npm/ng-packs/packages/theme-shared/src/lib/models/user-menu.ts
  71. 60
      npm/ng-packs/packages/theme-shared/src/lib/services/abstract-menu.service.ts
  72. 1
      npm/ng-packs/packages/theme-shared/src/lib/services/index.ts
  73. 48
      npm/ng-packs/packages/theme-shared/src/lib/services/nav-items.service.ts
  74. 8
      npm/ng-packs/packages/theme-shared/src/lib/services/user-menu.service.ts
  75. 182
      npm/ng-packs/yarn.lock
  76. 9
      npm/preview-publish.ps1
  77. 2
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/abp/utils/abp-utils.umd.js.map
  78. 2
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/abp/utils/abp-utils.umd.min.js.map
  79. 77
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/bootstrap/css/bootstrap.css
  80. 2
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/bootstrap/css/bootstrap.css.map
  81. 4
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/bootstrap/css/bootstrap.min.css
  82. 2
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/bootstrap/css/bootstrap.min.css.map
  83. 77
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/bootstrap/css/bootstrap.rtl.css
  84. 2
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/bootstrap/css/bootstrap.rtl.css.map
  85. 4
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/bootstrap/css/bootstrap.rtl.min.css
  86. 2
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/bootstrap/css/bootstrap.rtl.min.css.map
  87. 316
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/bootstrap/js/bootstrap.bundle.js
  88. 2
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/bootstrap/js/bootstrap.bundle.js.map
  89. 4
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/bootstrap/js/bootstrap.bundle.min.js
  90. 2
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/bootstrap/js/bootstrap.bundle.min.js.map
  91. 212
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/datatables.net-bs4/css/dataTables.bootstrap4.css
  92. 184
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/datatables.net-bs4/js/dataTables.bootstrap4.js
  93. 106
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/datatables.net-bs5/css/dataTables.bootstrap5.css
  94. 1178
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/datatables.net/js/jquery.dataTables.js
  95. 6
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/select2/js/select2-bootstrap-modal-patch.js
  96. 1
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/sweetalert/sweetalert.min.js
  97. 2672
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/sweetalert2/sweetalert2.all.js
  98. 4
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/sweetalert2/sweetalert2.all.min.js
  99. 119
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/sweetalert2/sweetalert2.css
  100. 2670
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/sweetalert2/sweetalert2.js

76
docs/en/Connection-Strings.md

@ -1,15 +1,17 @@
# Connection Strings
ABP Framework is designed to be [modular](Module-Development-Basics.md), [microservice compatible](Microservice-Architecture.md) and [multi-tenancy](Multi-Tenancy.md) aware. Connection string management is also designed to support these scenarios;
> Connection string system is especially needed when you want to create or use a modular system. If you have a monolithic application with a single database, you can go with the [ABP startup solution template](Startup-Templates/Application.md), which is properly configured for you.
* Allows to set separate connection strings for every module, so every module can have its own physical database. Modules even might be configured to use different DBMSs.
ABP Framework is designed to be [modular](Module-Development-Basics.md) and [multi-tenancy](Multi-Tenancy.md) aware. Connection string management is also designed to support these scenarios;
* Allows to set separate connection strings for every module, so every module can have its own physical database. Modules even might be configured to use different database providers.
* Allows to set separate connection string and use a separate database per tenant (in a SaaS application).
It also supports hybrid scenarios;
* Allows to group modules into databases (all modules into a single shared database, 2 modules to database A, 3 modules to database B, 1 module to database C and rest of the modules to database D... etc.)
* Allows to group modules into databases (e.g., all modules into a single shared database or two modules to database A, three modules to database B, one module to database C and rest of the modules to database D)
* Allows to group tenants into databases, just like the modules.
* Allows to separate databases per tenant per module (which might be harder to maintain for you because of too many databases, but the ABP framework supports it).
* Allows to separate databases per tenant per module (which might be hard to maintain for you because of too many databases, but the ABP framework supports it).
All the [pre-built application modules](Modules/Index.md) are designed to be compatible these scenarios.
@ -29,15 +31,19 @@ See the following configuration:
This configuration defines three different connection strings:
* `MyMainDb` (the `Default` connection string) is the main connection string of the application. If you don't specify a connection string for a module, it fallbacks to the `Default` connection string. The [application startup template](Startup-Templates/Application.md) is configured to use a single connection string, so all the modules uses a single shared database.
* `MyIdsDb` is used by the [IdentityServer](Modules/IdentityServer.md) module.
* `MyPermissionDb` is used by the [Permission Management](Modules/Permission-Management.md) module.
* `MyMainDb` (the `Default` connection string) is the main connection string of the application. If you don't specify a connection string for a module, it fallbacks to the `Default` connection string. The [application startup template](Startup-Templates/Application.md) is configured to use a single connection string, so all the modules uses a single, shared database.
* `MyIdsDb` (the `AbpIdentityServer` connection string) is used by the [IdentityServer](Modules/IdentityServer.md) module.
* `MyPermissionDb` (the `AbpPermissionManagement` connection string) is used by the [Permission Management](Modules/Permission-Management.md) module.
[Pre-built application modules](Modules/Index.md) define constants for the connection string names. For example, the IdentityServer module defines a ` ConnectionStringName ` constant in the ` AbpIdentityServerDbProperties ` class (located in the ` Volo.Abp.IdentityServer ` namespace). Other modules similarly define constants, so you can investigate the connection string name.
[Pre-built application modules](Modules/Index.md) define constants for the connection string names. For example, the [IdentityServer module](Modules/IdentityServer.md) defines a ` ConnectionStringName ` constant in the ` AbpIdentityServerDbProperties ` class (located in the ` Volo.Abp.IdentityServer ` namespace). Other modules similarly define constants, so you can investigate the connection string name.
### AbpDbConnectionOptions
ABP actually uses the `AbpDbConnectionOptions` to get the connection strings. If you set the connection strings as explained above, `AbpDbConnectionOptions` is automatically filled. However, you can set or override the connection strings using [the options pattern](Options.md). You can configure the `AbpDbConnectionOptions` in the `ConfigureServices` method of your [module](Module-Development-Basics.md) as shown below:
`AbpDbConnectionOptions` is the options class that is used to set the connection strings and configure database structures.
#### Setting the connection strings
ABP uses the `AbpDbConnectionOptions` to get the connection strings. If you configure the connection strings as explained above, `AbpDbConnectionOptions` is automatically filled. However, you can set or override the connection strings using [the options pattern](Options.md). You can configure the `AbpDbConnectionOptions` in the `ConfigureServices` method of your [module](Module-Development-Basics.md) as shown below:
````csharp
public override void ConfigureServices(ServiceConfigurationContext context)
@ -50,6 +56,52 @@ public override void ConfigureServices(ServiceConfigurationContext context)
}
````
#### Configuring the database structures
`Databases` property of the `AbpDbConnectionOptions` class is used to group multiple connection strings (of multiple modules) to a single connection string.
See the following connection strings:
````json
"ConnectionStrings": {
"Default": "Server=localhost;Database=MyMainDb;Trusted_Connection=True;",
"AbpIdentity": "Server=localhost;Database=MySecondaryDb;Trusted_Connection=True;",
"AbpIdentityServer": "Server=localhost;Database=MySecondaryDb;Trusted_Connection=True;",
"AbpPermissionManagement": "Server=localhost;Database=MySecondaryDb;Trusted_Connection=True;"
}
````
In this example, we've defined four connection strings, but the last three of them are the same; `AbpIdentity`, `AbpIdentityServer` and `AbpPermissionManagement` uses the same database, named `MySecondaryDb`. The main application and the other modules use the `Default` connection string, hence the `MyMainDb` database.
What we want to do here is to group three modules (`AbpIdentity`, `AbpIdentityServer` and `AbpPermissionManagement`) in a single database, but we needed to specify each one manually. Because the fallback connection string is the `Default` one, if we don't specify it for a module.
To eliminate the repetitive connection string definition, we can configure the `AbpDbConnectionOptions.Databases` property to group these connection strings, as shown in the following code (we place that in the `ConfigureServices` method of our [module class](Module-Development-Basics.md)):
````csharp
Configure<AbpDbConnectionOptions>(options =>
{
options.Databases.Configure("MySecondaryDb", db =>
{
db.MappedConnections.Add("AbpIdentity");
db.MappedConnections.Add("AbpIdentityServer");
db.MappedConnections.Add("AbpPermissionManagement");
});
});
````
Then we can change the `appsettings.json` file as shown in the following code block:
````json
"ConnectionStrings": {
"Default": "Server=localhost;Database=MyMainDb;Trusted_Connection=True;",
"MySecondaryDb": "Server=localhost;Database=MySecondaryDb;Trusted_Connection=True;"
}
````
`MySecondaryDb` becomes the new connection string for the mapped connections.
> ABP first looks for the module-specific connection string, then looks if a database mapping is available, finally fallbacks to the `Default` connection string.
## Set the Connection String Name
A module typically has a unique connection string name associated to its `DbContext` class using the `ConnectionStringName` attribute. Example:
@ -62,15 +114,13 @@ public class IdentityServerDbContext
}
````
For [Entity Framework Core](Entity-Framework-Core.md) and [MongoDB](MongoDB.md), write this to your `DbContext` class (and the interface if it has).
> If you are developing a reusable, database provider independent module see also [the best practices guide](Best-Practices/Index.md).
For [Entity Framework Core](Entity-Framework-Core.md) and [MongoDB](MongoDB.md), write this to your `DbContext` class (and the interface if it has). In this way, ABP uses the specified connection string for the related `DbContext` instances.
## Database Migrations for the Entity Framework Core
Relational databases require to create the database and the database schema (tables, views... etc.) before using it.
The startup template (with EF Core ORM) comes with a single database and a `.EntityFrameworkCore` project that contains related classes and the migration files for that database. This project mainly defines a *YourProjectName*DbContext that calls the `Configure...()` methods of the used modules, like `builder.ConfigurePermissionManagement()`.
The startup template (with EF Core ORM) comes with a single database and a `.EntityFrameworkCore` project that contains related classes and the migration files for that database. This project mainly defines a `YourProjectNameDbContext` class that calls the `Configure...()` methods of the used modules, like `builder.ConfigurePermissionManagement()`.
Once you want to separate a module's database, you typically will need to create a second migration path. See the [EF Core Migrations](Entity-Framework-Core-Migrations.md) document to learn how to create and use a different database for a desired module.

67
docs/en/UI/Angular/Theming.md

@ -204,25 +204,78 @@ constructor(private sessionState: SessionStateService) {
}
````
##### User Menu
User menu is a component that can be replaceable. See an example to learn how can you replace it:
`UserMenuService` is used to get the user menu's items and render on the dropdown. You can add/update/remove an item by using the service.
You can either pass a `component`, a piece of `html` or a `textTemplate` to render an item.
All of the options are shown below. You can choose either of them.
**Example: Adding/updating/removing an user menu item**
````ts
import { eThemeBasicComponents } from '@abp/ng.theme.basic';
import { NavItemsService } from '@abp/ng.theme.shared';
import { eUserMenuItems } from '@abp/ng.theme.basic';
import { UserMenuService } from '@abp/ng.theme.shared';
import { Component } from '@angular/core';
import { Router } from '@angular/router';
// make sure that you import this component in a NgModule
@Component({
selector: 'abp-current-user-test',
template: `
<a class="dropdown-item pointer" (click)="data.action()">
<i *ngIf="data.textTemplate.icon" [class]="data.textTemplate.icon"></i>
{{ data.textTemplate.text | abpLocalization }}
</a>
`,
})
export class UserMenuItemComponent {
// you can inject the data through `INJECTOR_PIPE_DATA_TOKEN` token
constructor(@Inject(INJECTOR_PIPE_DATA_TOKEN) public data: UserMenu) {}
}
@Component({/* component metadata */})
export class AppComponent {
constructor(private navItems: NavItemsService) {
this.navItems.patchItem(eThemeBasicComponents.CurrentUser, { component: MyUserMenuComponent });
constructor(private userMenu: UserMenuService, private router: Router) {
this.userMenu.addItems([
{
id: 'UserMenu.MyAccount',
order: 1,
// HTML example
html: `<a class="dropdown-item pointer">My account</a>`,
// text template example
textTemplate: {
text: 'AbpAccount::MyAccount',
icon: 'fa fa-cog',
},
// component example
component: UserMenuItemComponent,
action: () => {
this.router.navigateByUrl('/account/manage');
},
},
]);
this.userMenu.patchItem(eUserMenuItems.MyAccount, {
html: `<a class="dropdown-item pointer">My profile</a>`,
});
this.userMenu.removeItem(eUserMenuItems.Logout);
}
}
````
[`ConfigStateService`](Config-State-Service.md) service can be used to obtain the `application-configuration` API response (e.g. getting current user or tenant).
In the example above, added a new user menu item labeled "Reports", updated the "My account" item HTML content, and removed the "Logout" item.
See the result:
![image](https://user-images.githubusercontent.com/34455572/148387770-5b5e25fb-f855-447c-8ead-c04c69b6d6f7.png)
#### Page Alerts
`PageAlertService` service is used to get the current page alerts to render on the layout. See the [Page Alerts](Page-Alerts.md) document to learn more.
`PageAlertService` service is used to get the current page alerts to render on the layout. See the [Page Alerts](Page-Alerts.md) document to learn more.

25
docs/zh-Hans/Autofac-Integration.md

@ -32,26 +32,23 @@ namespace MyCompany.MyProject
### ASP.NET Core 应用程序
如下所示, 在 **Startup.cs** 文件中调用 `UseAutofac()`:
如下所示, 在 **Program.cs** 文件中调用 `UseAutofac()`:
````csharp
public class Startup
public class Program
{
public IServiceProvider ConfigureServices(IServiceCollection services)
public static int Main(string[] args)
{
services.AddApplication<MyWebModule>(options =>
{
//Integrate Autofac!
options.UseAutofac();
});
return services.BuildServiceProviderFromFactory();
CreateHostBuilder(args).Build().Run();
}
public void Configure(IApplicationBuilder app)
{
app.InitializeApplication();
}
internal static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
})
.UseAutofac(); //Integrate Autofac!
}
````

1250
docs/zh-Hans/Tutorials/Part-9.md

File diff suppressed because it is too large

4
framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/CurrentUserDto.cs

@ -15,6 +15,10 @@ public class CurrentUserDto
public Guid? ImpersonatorTenantId { get; set; }
public string ImpersonatorUserName { get; set; }
public string ImpersonatorTenantName { get; set; }
public string UserName { get; set; }
public string Name { get; set; }

2
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/AbpApplicationConfigurationAppService.cs

@ -129,6 +129,8 @@ public class AbpApplicationConfigurationAppService : ApplicationService, IAbpApp
TenantId = _currentUser.TenantId,
ImpersonatorUserId = _currentUser.FindImpersonatorUserId(),
ImpersonatorTenantId = _currentUser.FindImpersonatorTenantId(),
ImpersonatorUserName = _currentUser.FindImpersonatorUserName(),
ImpersonatorTenantName = _currentUser.FindImpersonatorTenantName(),
UserName = _currentUser.UserName,
SurName = _currentUser.SurName,
Name = _currentUser.Name,

4
framework/src/Volo.Abp.Auditing/Volo/Abp/Auditing/AuditLogInfo.cs

@ -23,6 +23,10 @@ public class AuditLogInfo : IHasExtraProperties
public Guid? ImpersonatorTenantId { get; set; }
public string ImpersonatorUserName { get; set; }
public string ImpersonatorTenantName { get; set; }
public DateTime ExecutionTime { get; set; }
public int ExecutionDuration { get; set; }

4
framework/src/Volo.Abp.Auditing/Volo/Abp/Auditing/AuditingHelper.cs

@ -136,9 +136,11 @@ public class AuditingHelper : IAuditingHelper, ITransientDependency
UserName = CurrentUser.UserName,
ClientId = CurrentClient.Id,
CorrelationId = CorrelationIdProvider.Get(),
ExecutionTime = Clock.Now,
ImpersonatorUserId = CurrentUser.FindImpersonatorUserId(),
ImpersonatorUserName = CurrentUser.FindImpersonatorUserName(),
ImpersonatorTenantId = CurrentUser.FindImpersonatorTenantId(),
ExecutionTime = Clock.Now
ImpersonatorTenantName = CurrentUser.FindImpersonatorTenantName(),
};
ExecutePreContributors(auditInfo);

4
framework/src/Volo.Abp.AutoMapper/Volo/Abp/AutoMapper/AbpAutoMapperConventionalRegistrar.cs

@ -1,7 +1,6 @@
using System;
using System.Linq;
using AutoMapper;
using AutoMapper.Internal;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.DependencyInjection;
@ -19,7 +18,8 @@ public class AbpAutoMapperConventionalRegistrar : DefaultConventionalRegistrar
protected override bool IsConventionalRegistrationDisabled(Type type)
{
return !OpenTypes.Any(type.ImplementsGenericInterface) || base.IsConventionalRegistrationDisabled(type);
return !type.GetInterfaces().Any(x => x.IsGenericType && OpenTypes.Contains(x.GetGenericTypeDefinition())) ||
base.IsConventionalRegistrationDisabled(type);
}
protected override ServiceLifetime? GetDefaultLifeTimeOrNull(Type type)

10
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/NpmGlobalPackagesChecker.cs

@ -24,10 +24,6 @@ public class NpmGlobalPackagesChecker : ITransientDependency
{
InstallYarn();
}
if (!installedNpmPackages.Contains(" gulp@"))
{
InstallGulp();
}
}
protected virtual string GetInstalledNpmPackages()
@ -41,10 +37,4 @@ public class NpmGlobalPackagesChecker : ITransientDependency
Logger.LogInformation("Installing yarn...");
CmdHelper.RunCmd("npm install yarn -g");
}
protected virtual void InstallGulp()
{
Logger.LogInformation("Installing gulp...");
CmdHelper.RunCmd("npm install gulp -g");
}
}

52
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/NpmPackagesUpdater.cs

@ -11,6 +11,8 @@ using Microsoft.Extensions.Logging.Abstractions;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using NuGet.Versioning;
using Volo.Abp.Cli.Args;
using Volo.Abp.Cli.Commands;
using Volo.Abp.Cli.Http;
using Volo.Abp.Cli.Utils;
using Volo.Abp.DependencyInjection;
@ -23,6 +25,7 @@ public class NpmPackagesUpdater : ITransientDependency
{
public ILogger<NpmPackagesUpdater> Logger { get; set; }
protected ICancellationTokenProvider CancellationTokenProvider { get; }
public InstallLibsCommand InstallLibsCommand { get; }
public ICmdHelper CmdHelper { get; }
private readonly PackageJsonFileFinder _packageJsonFileFinder;
@ -35,17 +38,21 @@ public class NpmPackagesUpdater : ITransientDependency
NpmGlobalPackagesChecker npmGlobalPackagesChecker,
ICancellationTokenProvider cancellationTokenProvider,
CliHttpClientFactory cliHttpClientFactory,
InstallLibsCommand ınstallLibsCommand,
ICmdHelper cmdHelper)
{
_packageJsonFileFinder = packageJsonFileFinder;
_npmGlobalPackagesChecker = npmGlobalPackagesChecker;
CancellationTokenProvider = cancellationTokenProvider;
InstallLibsCommand = ınstallLibsCommand;
CmdHelper = cmdHelper;
_cliHttpClientFactory = cliHttpClientFactory;
Logger = NullLogger<NpmPackagesUpdater>.Instance;
}
public async Task Update(string rootDirectory, bool includePreviews = false, bool includeReleaseCandidates = false, bool switchToStable = false, string version = null)
public async Task Update(string rootDirectory, bool includePreviews = false,
bool includeReleaseCandidates = false,
bool switchToStable = false, string version = null)
{
var fileList = _packageJsonFileFinder.Find(rootDirectory);
@ -60,7 +67,9 @@ public class NpmPackagesUpdater : ITransientDependency
async Task UpdateAsync(string file)
{
var updated = await UpdatePackagesInFile(file, includePreviews, includeReleaseCandidates, switchToStable, version);
var updated = await UpdatePackagesInFile(file, includePreviews, includeReleaseCandidates,
switchToStable,
version);
packagesUpdated.TryAdd(file, updated);
}
@ -88,10 +97,10 @@ public class NpmPackagesUpdater : ITransientDependency
RunYarn(fileDirectory);
}
if (!IsAngularProject(fileDirectory) && GulpFileExistAsync(fileDirectory))
if (!IsAngularProject(fileDirectory))
{
Thread.Sleep(1000);
RunGulp(fileDirectory);
RunInstallLibsAsync(fileDirectory);
}
}
}
@ -108,11 +117,6 @@ public class NpmPackagesUpdater : ITransientDependency
return await Task.FromResult(File.Exists(Path.Combine(directoryName, ".npmrc")));
}
private static bool GulpFileExistAsync(string directoryName)
{
return File.Exists(Path.Combine(directoryName, "gulpfile.js"));
}
private async Task CreateNpmrcFileAsync(string directoryName)
{
var fileName = Path.Combine(directoryName, ".npmrc");
@ -121,7 +125,6 @@ public class NpmPackagesUpdater : ITransientDependency
if (await NpmrcFileExistAsync(directoryName))
{
var fileContent = File.ReadAllText(fileName);
if (!fileContent.Contains(abpRegistry))
@ -164,10 +167,10 @@ public class NpmPackagesUpdater : ITransientDependency
{
var client = _cliHttpClientFactory.CreateClient();
using (var response = await client.GetHttpResponseMessageWithRetryAsync(
url: $"{CliUrls.WwwAbpIo}api/myget/apikey/",
cancellationToken: CancellationTokenProvider.Token,
logger: Logger
))
url: $"{CliUrls.WwwAbpIo}api/myget/apikey/",
cancellationToken: CancellationTokenProvider.Token,
logger: Logger
))
{
return Encoding.Default.GetString(await response.Content.ReadAsByteArrayAsync());
}
@ -202,7 +205,8 @@ public class NpmPackagesUpdater : ITransientDependency
foreach (var abpPackage in abpPackages)
{
var updated = await TryUpdatingPackage(filePath, abpPackage, includePreviews, includeReleaseCandidates, switchToStable, specifiedVersion);
var updated = await TryUpdatingPackage(filePath, abpPackage, includePreviews, includeReleaseCandidates,
switchToStable, specifiedVersion);
if (updated)
{
@ -236,15 +240,19 @@ public class NpmPackagesUpdater : ITransientDependency
return false;
}
if (SemanticVersion.Parse(specifiedVersion) <= SemanticVersion.Parse(currentVersion.RemovePreFix("~", "^")))
if (SemanticVersion.Parse(specifiedVersion) <=
SemanticVersion.Parse(currentVersion.RemovePreFix("~", "^")))
{
return false;
}
version = specifiedVersion.EnsureStartsWith('^');
}
else
{
if ((includePreviews || (!switchToStable && (currentVersion != null && currentVersion.Contains("-preview")))) && !includeReleaseCandidates)
if ((includePreviews ||
(!switchToStable && (currentVersion != null && currentVersion.Contains("-preview")))) &&
!includeReleaseCandidates)
{
version = "preview";
}
@ -328,16 +336,18 @@ public class NpmPackagesUpdater : ITransientDependency
abpPackages
.AddRange(properties.Where(p => p.Name.StartsWith("@abp/") || p.Name.StartsWith("@volo/"))
.ToList());
.ToList());
}
return abpPackages;
}
protected virtual void RunGulp(string fileDirectory)
protected virtual async Task RunInstallLibsAsync(string fileDirectory)
{
Logger.LogInformation($"Running Gulp on {fileDirectory}");
CmdHelper.RunCmd($"cd {fileDirectory} && gulp");
var args = new CommandLineArgs("install-libs");
args.Options.Add(InstallLibsCommand.Options.WorkingDirectory.Short, fileDirectory);
await InstallLibsCommand.ExecuteAsync(args);
}
protected virtual void RunYarn(string fileDirectory)

22
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/ProjectNpmPackageAdder.cs

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
@ -26,6 +26,7 @@ public class ProjectNpmPackageAdder : ITransientDependency
public SourceCodeDownloadService SourceCodeDownloadService { get; }
public AngularSourceCodeAdder AngularSourceCodeAdder { get; }
public IRemoteServiceExceptionHandler RemoteServiceExceptionHandler { get; }
public InstallLibsCommand InstallLibsCommand { get; }
public ICmdHelper CmdHelper { get; }
private readonly CliHttpClientFactory _cliHttpClientFactory;
public ILogger<ProjectNpmPackageAdder> Logger { get; set; }
@ -35,12 +36,14 @@ public class ProjectNpmPackageAdder : ITransientDependency
SourceCodeDownloadService sourceCodeDownloadService,
AngularSourceCodeAdder angularSourceCodeAdder,
IRemoteServiceExceptionHandler remoteServiceExceptionHandler,
InstallLibsCommand ınstallLibsCommand,
ICmdHelper cmdHelper)
{
JsonSerializer = jsonSerializer;
SourceCodeDownloadService = sourceCodeDownloadService;
AngularSourceCodeAdder = angularSourceCodeAdder;
RemoteServiceExceptionHandler = remoteServiceExceptionHandler;
InstallLibsCommand = ınstallLibsCommand;
CmdHelper = cmdHelper;
_cliHttpClientFactory = cliHttpClientFactory;
Logger = NullLogger<ProjectNpmPackageAdder>.Instance;
@ -109,14 +112,14 @@ public class ProjectNpmPackageAdder : ITransientDependency
);
}
public Task AddMvcPackageAsync(string directory, NpmPackageInfo npmPackage, string version = null,
bool skipGulpCommand = false)
public async Task AddMvcPackageAsync(string directory, NpmPackageInfo npmPackage, string version = null,
bool skipInstallingLibs = false)
{
var packageJsonFilePath = Path.Combine(directory, "package.json");
if (!File.Exists(packageJsonFilePath) ||
File.ReadAllText(packageJsonFilePath).Contains($"\"{npmPackage.Name}\""))
{
return Task.CompletedTask;
return;
}
Logger.LogInformation($"Installing '{npmPackage.Name}' package to the project '{packageJsonFilePath}'...");
@ -134,16 +137,15 @@ public class ProjectNpmPackageAdder : ITransientDependency
Logger.LogInformation("yarn add " + npmPackage.Name + versionPostfix);
CmdHelper.RunCmd("yarn add " + npmPackage.Name + versionPostfix);
if (skipGulpCommand)
if (skipInstallingLibs)
{
return Task.CompletedTask;
return;
}
Logger.LogInformation("gulp");
CmdHelper.RunCmd("gulp");
await InstallLibsCommand.ExecuteAsync(
new CommandLineArgs("install-libs")
);
}
return Task.CompletedTask;
}
private string DetectAbpVersionOrNull(string packageJsonFile)

153
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs

@ -1,4 +1,4 @@
using System;
using System;
using JetBrains.Annotations;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
@ -519,14 +519,23 @@ public class SolutionModuleAdder : ITransientDependency
foreach (var nugetPackage in module.NugetPackages)
{
var isProjectTiered = await IsProjectTiered(projectFiles);
var nugetTarget =
await IsProjectTiered(projectFiles) && nugetPackage.TieredTarget != NuGetPackageTarget.Undefined
isProjectTiered && nugetPackage.TieredTarget != NuGetPackageTarget.Undefined
? nugetPackage.TieredTarget
: nugetPackage.Target;
if (webPackagesWillBeAddedToBlazorServerProject && nugetTarget == NuGetPackageTarget.Web)
if (webPackagesWillBeAddedToBlazorServerProject)
{
nugetTarget = NuGetPackageTarget.BlazorServer;
if ( nugetTarget == NuGetPackageTarget.Web)
{
nugetTarget = NuGetPackageTarget.BlazorServer;
}
else if (!isProjectTiered && nugetTarget == NuGetPackageTarget.SignalR)
{
nugetTarget = NuGetPackageTarget.BlazorServer;
}
}
var targetProjectFile = ProjectFinder.FindNuGetTargetProjectFile(projectFiles, nugetTarget);
@ -590,7 +599,7 @@ public class SolutionModuleAdder : ITransientDependency
}
var dbMigrationsProject = projectFiles.FirstOrDefault(p => p.EndsWith(".DbMigrations.csproj"))
?? projectFiles.FirstOrDefault(p => p.EndsWith(".EntityFrameworkCore.csproj"));
?? projectFiles.FirstOrDefault(p => p.EndsWith(".EntityFrameworkCore.csproj")) ;
if (dbMigrationsProject == null)
{
@ -679,74 +688,74 @@ public class SolutionModuleAdder : ITransientDependency
module.EfCoreConfigureMethodName = $"{module.Name}.EntityFrameworkCore:Configure{moduleProjectName}";
module.NugetPackages = new List<NugetPackageInfo>
{
new NugetPackageInfo
{
new NugetPackageInfo
{
Name = $"{module.Name}.Application",
ModuleClass = $"{module.Name}.{moduleProjectName}ApplicationModule",
Target = NuGetPackageTarget.Application
},
new NugetPackageInfo
{
Name = $"{module.Name}.Application.Contracts",
ModuleClass = $"{module.Name}.{moduleProjectName}ApplicationContractsModule",
Target = NuGetPackageTarget.ApplicationContracts
},
new NugetPackageInfo
{
Name = $"{module.Name}.Blazor.WebAssembly",
ModuleClass = $"{module.Name}.Blazor.{moduleProjectName}BlazorWebAssemblyModule",
Target = NuGetPackageTarget.BlazorWebAssembly
},
new NugetPackageInfo
{
Name = $"{module.Name}.Blazor.Server",
ModuleClass = $"{module.Name}.Blazor.{moduleProjectName}BlazorServerModule",
Target = NuGetPackageTarget.BlazorServer
},
new NugetPackageInfo
{
Name = $"{module.Name}.Domain",
ModuleClass = $"{module.Name}.{moduleProjectName}DomainModule",
Target = NuGetPackageTarget.Domain
},
new NugetPackageInfo
{
Name = $"{module.Name}.Domain.Shared",
ModuleClass = $"{module.Name}.{moduleProjectName}DomainSharedModule",
Target = NuGetPackageTarget.DomainShared
},
new NugetPackageInfo
{
Name = $"{module.Name}.EntityFrameworkCore",
ModuleClass = $"{module.Name}.EntityFrameworkCore.{moduleProjectName}EntityFrameworkCoreModule",
Target = NuGetPackageTarget.EntityFrameworkCore
},
new NugetPackageInfo
{
Name = $"{module.Name}.HttpApi",
ModuleClass = $"{module.Name}.{moduleProjectName}HttpApiModule",
Target = NuGetPackageTarget.HttpApi
},
new NugetPackageInfo
{
Name = $"{module.Name}.HttpApi.Client",
ModuleClass = $"{module.Name}.{moduleProjectName}HttpApiClientModule",
Target = NuGetPackageTarget.HttpApiClient
},
new NugetPackageInfo
{
Name = $"{module.Name}.MongoDB",
ModuleClass = $"{module.Name}.MongoDB.{moduleProjectName}MongoDbModule",
Target = NuGetPackageTarget.MongoDB
},
new NugetPackageInfo
{
Name = $"{module.Name}.Web",
ModuleClass = $"{module.Name}.Web.{moduleProjectName}WebModule",
Target = NuGetPackageTarget.Web
},
};
Name = $"{module.Name}.Application",
ModuleClass = $"{module.Name}.{moduleProjectName}ApplicationModule",
Target = NuGetPackageTarget.Application
},
new NugetPackageInfo
{
Name = $"{module.Name}.Application.Contracts",
ModuleClass = $"{module.Name}.{moduleProjectName}ApplicationContractsModule",
Target = NuGetPackageTarget.ApplicationContracts
},
new NugetPackageInfo
{
Name = $"{module.Name}.Blazor.WebAssembly",
ModuleClass = $"{module.Name}.Blazor.{moduleProjectName}BlazorWebAssemblyModule",
Target = NuGetPackageTarget.BlazorWebAssembly
},
new NugetPackageInfo
{
Name = $"{module.Name}.Blazor.Server",
ModuleClass = $"{module.Name}.Blazor.{moduleProjectName}BlazorServerModule",
Target = NuGetPackageTarget.BlazorServer
},
new NugetPackageInfo
{
Name = $"{module.Name}.Domain",
ModuleClass = $"{module.Name}.{moduleProjectName}DomainModule",
Target = NuGetPackageTarget.Domain
},
new NugetPackageInfo
{
Name = $"{module.Name}.Domain.Shared",
ModuleClass = $"{module.Name}.{moduleProjectName}DomainSharedModule",
Target = NuGetPackageTarget.DomainShared
},
new NugetPackageInfo
{
Name = $"{module.Name}.EntityFrameworkCore",
ModuleClass = $"{module.Name}.EntityFrameworkCore.{moduleProjectName}EntityFrameworkCoreModule",
Target = NuGetPackageTarget.EntityFrameworkCore
},
new NugetPackageInfo
{
Name = $"{module.Name}.HttpApi",
ModuleClass = $"{module.Name}.{moduleProjectName}HttpApiModule",
Target = NuGetPackageTarget.HttpApi
},
new NugetPackageInfo
{
Name = $"{module.Name}.HttpApi.Client",
ModuleClass = $"{module.Name}.{moduleProjectName}HttpApiClientModule",
Target = NuGetPackageTarget.HttpApiClient
},
new NugetPackageInfo
{
Name = $"{module.Name}.MongoDB",
ModuleClass = $"{module.Name}.MongoDB.{moduleProjectName}MongoDbModule",
Target = NuGetPackageTarget.MongoDB
},
new NugetPackageInfo
{
Name = $"{module.Name}.Web",
ModuleClass = $"{module.Name}.Web.{moduleProjectName}WebModule",
Target = NuGetPackageTarget.Web
},
};
module.NpmPackages = new List<NpmPackageInfo>();

2
framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo.Abp.EntityFrameworkCore.Oracle.csproj

@ -19,7 +19,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Oracle.EntityFrameworkCore" Version="6.21.4" />
<PackageReference Include="Oracle.EntityFrameworkCore" Version="6.21.5" />
</ItemGroup>
</Project>

33
framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/AbpAbpLdapOptionsManager.cs

@ -1,33 +0,0 @@
using System;
using System.Threading.Tasks;
using Microsoft.Extensions.Options;
using Volo.Abp.Options;
using Volo.Abp.Settings;
namespace Volo.Abp.Ldap;
public class AbpAbpLdapOptionsManager : AbpDynamicOptionsManager<AbpLdapOptions>
{
protected ISettingProvider SettingProvider { get; }
public AbpAbpLdapOptionsManager(IOptionsFactory<AbpLdapOptions> factory, ISettingProvider settingProvider)
: base(factory)
{
SettingProvider = settingProvider;
}
protected override async Task OverrideOptionsAsync(string name, AbpLdapOptions options)
{
options.ServerHost = await GetSettingOrDefaultValue(LdapSettingNames.ServerHost, options.ServerHost);
options.ServerPort = await SettingProvider.GetAsync(LdapSettingNames.ServerPort, options.ServerPort);
options.BaseDc = await GetSettingOrDefaultValue(LdapSettingNames.BaseDc, options.BaseDc);
options.UserName = await GetSettingOrDefaultValue(LdapSettingNames.UserName, options.UserName);
options.Password = await GetSettingOrDefaultValue(LdapSettingNames.Password, options.Password);
}
protected virtual async Task<string> GetSettingOrDefaultValue(string name, string defaultValue)
{
var value = await SettingProvider.GetOrNullAsync(name);
return value.IsNullOrWhiteSpace() ? defaultValue : value;
}
}

5
framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/AbpLdapModule.cs

@ -18,11 +18,6 @@ public class AbpLdapModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAbpDynamicOptions<AbpLdapOptions, AbpAbpLdapOptionsManager>();
var configuration = context.Services.GetConfiguration();
Configure<AbpLdapOptions>(configuration.GetSection("Ldap"));
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<AbpLdapModule>();

20
framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/AbpLdapOptions.cs

@ -1,20 +0,0 @@
namespace Volo.Abp.Ldap;
public class AbpLdapOptions
{
public string ServerHost { get; set; }
public int ServerPort { get; set; }
public string BaseDc { get; set; }
/// <summary>
/// BindDN
/// </summary>
public string UserName { get; set; }
/// <summary>
///BindPassword
/// </summary>
public string Password { get; set; }
}

18
framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/ILdapSettingProvider.cs

@ -0,0 +1,18 @@
using System.Threading.Tasks;
namespace Volo.Abp.Ldap;
public interface ILdapSettingProvider
{
public Task<string> GetServerHostAsync();
public Task<int> GetServerPortAsync();
public Task<string> GetBaseDcAsync();
public Task<string> GetDomainAsync();
public Task<string> GetUserNameAsync();
public Task<string> GetPasswordAsync();
}

11
framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/LdapManager.cs

@ -2,7 +2,6 @@
using System.Threading.Tasks;
using LdapForNet;
using LdapForNet.Native;
using Microsoft.Extensions.Options;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Volo.Abp.DependencyInjection;
@ -12,11 +11,11 @@ namespace Volo.Abp.Ldap;
public class LdapManager : ILdapManager, ITransientDependency
{
public ILogger<LdapManager> Logger { get; set; }
protected IOptions<AbpLdapOptions> LdapOptions { get; }
protected ILdapSettingProvider LdapSettingProvider { get; }
public LdapManager(IOptions<AbpLdapOptions> ldapOptions)
public LdapManager(ILdapSettingProvider ldapSettingProvider)
{
LdapOptions = ldapOptions;
LdapSettingProvider = ldapSettingProvider;
Logger = NullLogger<LdapManager>.Instance;
}
@ -52,9 +51,7 @@ public class LdapManager : ILdapManager, ITransientDependency
protected virtual async Task ConnectAsync(ILdapConnection ldapConnection)
{
await LdapOptions.SetAsync();
ldapConnection.Connect(LdapOptions.Value.ServerHost, LdapOptions.Value.ServerPort);
ldapConnection.Connect(await LdapSettingProvider.GetServerHostAsync(), await LdapSettingProvider.GetServerPortAsync());
}
protected virtual async Task AuthenticateLdapConnectionAsync(ILdapConnection connection, string username, string password)

55
framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/LdapSettingDefinitionProvider.cs

@ -0,0 +1,55 @@
using Volo.Abp.Ldap.Localization;
using Volo.Abp.Localization;
using Volo.Abp.Settings;
namespace Volo.Abp.Ldap;
public class LdapSettingDefinitionProvider : SettingDefinitionProvider
{
public override void Define(ISettingDefinitionContext context)
{
context.Add(
new SettingDefinition(
LdapSettingNames.ServerHost,
"",
L("DisplayName:Abp.Ldap.ServerHost"),
L("Description:Abp.Ldap.ServerHost")),
new SettingDefinition(
LdapSettingNames.ServerPort,
"389",
L("DisplayName:Abp.Ldap.ServerPort"),
L("Description:Abp.Ldap.ServerPort")),
new SettingDefinition(
LdapSettingNames.BaseDc,
"",
L("DisplayName:Abp.Ldap.BaseDc"),
L("Description:Abp.Ldap.BaseDc")),
new SettingDefinition(
LdapSettingNames.Domain,
"",
L("DisplayName:Abp.Ldap.Domain"),
L("Description:Abp.Ldap.Domain")),
new SettingDefinition(
LdapSettingNames.UserName,
"",
L("DisplayName:Abp.Ldap.UserName"),
L("Description:Abp.Ldap.UserName")),
new SettingDefinition(
LdapSettingNames.Password,
"",
L("DisplayName:Abp.Ldap.Password"),
L("Description:Abp.Ldap.Password"),
isEncrypted: true)
);
}
private static LocalizableString L(string name)
{
return LocalizableString.Create<LdapResource>(name);
}
}

2
framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/LdapSettingNames.cs

@ -8,6 +8,8 @@ public static class LdapSettingNames
public const string BaseDc = "Abp.Ldap.BaseDc";
public const string Domain = "Abp.Ldap.Domain";
public const string UserName = "Abp.Ldap.UserName";
public const string Password = "Abp.Ldap.Password";

73
framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/LdapSettingProvider.cs

@ -1,49 +1,46 @@
using Volo.Abp.Ldap.Localization;
using Volo.Abp.Localization;
using System;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Settings;
namespace Volo.Abp.Ldap;
public class LdapSettingProvider : SettingDefinitionProvider
public class LdapSettingProvider : ILdapSettingProvider, ITransientDependency
{
public override void Define(ISettingDefinitionContext context)
protected ISettingProvider SettingProvider { get; }
public LdapSettingProvider(ISettingProvider settingProvider)
{
SettingProvider = settingProvider;
}
public async Task<string> GetServerHostAsync()
{
return await SettingProvider.GetOrNullAsync(LdapSettingNames.ServerHost);
}
public async Task<int> GetServerPortAsync()
{
return (await SettingProvider.GetOrNullAsync(LdapSettingNames.ServerPort))?.To<int>() ?? default;
}
public async Task<string> GetBaseDcAsync()
{
return await SettingProvider.GetOrNullAsync(LdapSettingNames.BaseDc);
}
public async Task<string> GetDomainAsync()
{
return await SettingProvider.GetOrNullAsync(LdapSettingNames.Domain);
}
public async Task<string> GetUserNameAsync()
{
context.Add(
new SettingDefinition(
LdapSettingNames.ServerHost,
"",
L("DisplayName:Abp.Ldap.ServerHost"),
L("Description:Abp.Ldap.ServerHost")),
new SettingDefinition(
LdapSettingNames.ServerPort,
"389",
L("DisplayName:Abp.Ldap.ServerPort"),
L("Description:Abp.Ldap.ServerPort")),
new SettingDefinition(
LdapSettingNames.BaseDc,
"",
L("DisplayName:Abp.Ldap.BaseDc"),
L("Description:Abp.Ldap.BaseDc")),
new SettingDefinition(
LdapSettingNames.UserName,
"",
L("DisplayName:Abp.Ldap.UserName"),
L("Description:Abp.Ldap.UserName")),
new SettingDefinition(
LdapSettingNames.Password,
"",
L("DisplayName:Abp.Ldap.Password"),
L("Description:Abp.Ldap.Password"),
isEncrypted: true)
);
return await SettingProvider.GetOrNullAsync(LdapSettingNames.UserName);
}
private static LocalizableString L(string name)
public async Task<string> GetPasswordAsync()
{
return LocalizableString.Create<LdapResource>(name);
return await SettingProvider.GetOrNullAsync(LdapSettingNames.Password);
}
}

4
framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/ar.json

@ -7,9 +7,11 @@
"Description:Abp.Ldap.ServerPort": "منفذ الخادم",
"DisplayName:Abp.Ldap.BaseDc": "مكون المجال الأساسي",
"Description:Abp.Ldap.BaseDc": "مكون المجال الأساسي",
"DisplayName:Abp.Ldap.Domain": "اختصاص",
"Description:Abp.Ldap.Domain": "اختصاص",
"DisplayName:Abp.Ldap.UserName": "اسم المستخدم",
"Description:Abp.Ldap.UserName": "اسم المستخدم",
"DisplayName:Abp.Ldap.Password": "كلمة السر",
"Description:Abp.Ldap.Password": "كلمة السر"
}
}
}

4
framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/cs.json

@ -7,9 +7,11 @@
"Description:Abp.Ldap.ServerPort": "Port serveru",
"DisplayName:Abp.Ldap.BaseDc": "Komponenta základní domény",
"Description:Abp.Ldap.BaseDc": "Komponenta základní domény",
"DisplayName:Abp.Ldap.Domain": "Doména",
"Description:Abp.Ldap.Domain": "Doména",
"DisplayName:Abp.Ldap.UserName": "uživatelské jméno",
"Description:Abp.Ldap.UserName": "uživatelské jméno",
"DisplayName:Abp.Ldap.Password": "Heslo",
"Description:Abp.Ldap.Password": "Heslo"
}
}
}

4
framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/de-DE.json

@ -7,9 +7,11 @@
"Description:Abp.Ldap.ServerPort": "Server-Port",
"DisplayName:Abp.Ldap.BaseDc": "Basisdomänenkomponente",
"Description:Abp.Ldap.BaseDc": "Basisdomänenkomponente",
"DisplayName:Abp.Ldap.Domain": "Domain",
"Description:Abp.Ldap.Domain": "Domain",
"DisplayName:Abp.Ldap.UserName": "Benutzername",
"Description:Abp.Ldap.UserName": "Benutzername",
"DisplayName:Abp.Ldap.Password": "Passwort",
"Description:Abp.Ldap.Password": "Passwort"
}
}
}

4
framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/en-GB.json

@ -7,9 +7,11 @@
"Description:Abp.Ldap.ServerPort": "Server port",
"DisplayName:Abp.Ldap.BaseDc": "Base domain component",
"Description:Abp.Ldap.BaseDc": "Base domain component",
"DisplayName:Abp.Ldap.Domain": "Domain",
"Description:Abp.Ldap.Domain": "Domain",
"DisplayName:Abp.Ldap.UserName": "Username",
"Description:Abp.Ldap.UserName": "Username",
"DisplayName:Abp.Ldap.Password": "Password",
"Description:Abp.Ldap.Password": "Password"
}
}
}

6
framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/en.json

@ -3,16 +3,14 @@
"texts": {
"DisplayName:Abp.Ldap.ServerHost": "Server host",
"Description:Abp.Ldap.ServerHost": "Server host",
"DisplayName:Abp.Ldap.ServerPort": "Server port",
"Description:Abp.Ldap.ServerPort": "Server port",
"DisplayName:Abp.Ldap.BaseDc": "Base domain component",
"Description:Abp.Ldap.BaseDc": "Base domain component",
"DisplayName:Abp.Ldap.Domain": "Domain",
"Description:Abp.Ldap.Domain": "Domain",
"DisplayName:Abp.Ldap.UserName": "Username",
"Description:Abp.Ldap.UserName": "Username",
"DisplayName:Abp.Ldap.Password": "Password",
"Description:Abp.Ldap.Password": "Password"
}

4
framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/es.json

@ -7,9 +7,11 @@
"Description:Abp.Ldap.ServerPort": "Puerto del servidor",
"DisplayName:Abp.Ldap.BaseDc": "Dominio base",
"Description:Abp.Ldap.BaseDc": "Dominio base",
"DisplayName:Abp.Ldap.Domain": "Dominio",
"Description:Abp.Ldap.Domain": "Dominio",
"DisplayName:Abp.Ldap.UserName": "Nombre de usuario",
"Description:Abp.Ldap.UserName": "Nombre de usuario",
"DisplayName:Abp.Ldap.Password": "Contraseña",
"Description:Abp.Ldap.Password": "Contraseña"
}
}
}

4
framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/fi.json

@ -7,9 +7,11 @@
"Description:Abp.Ldap.ServerPort": "Palvelimen portti",
"DisplayName:Abp.Ldap.BaseDc": "Perustoimialueen komponentti",
"Description:Abp.Ldap.BaseDc": "Perustoimialueen komponentti",
"DisplayName:Abp.Ldap.Domain": "Verkkotunnus",
"Description:Abp.Ldap.Domain": "Verkkotunnus",
"DisplayName:Abp.Ldap.UserName": "Käyttäjätunnus",
"Description:Abp.Ldap.UserName": "Käyttäjätunnus",
"DisplayName:Abp.Ldap.Password": "Salasana",
"Description:Abp.Ldap.Password": "Salasana"
}
}
}

4
framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/fr.json

@ -7,9 +7,11 @@
"Description:Abp.Ldap.ServerPort": "Port de serveur",
"DisplayName:Abp.Ldap.BaseDc": "Composant de domaine de base",
"Description:Abp.Ldap.BaseDc": "Composant de domaine de base",
"DisplayName:Abp.Ldap.Domain": "Domaine",
"Description:Abp.Ldap.Domain": "Domaine",
"DisplayName:Abp.Ldap.UserName": "Nom d'utilisateur",
"Description:Abp.Ldap.UserName": "Nom d'utilisateur",
"DisplayName:Abp.Ldap.Password": "Mot de passe",
"Description:Abp.Ldap.Password": "Mot de passe"
}
}
}

4
framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/hi.json

@ -7,9 +7,11 @@
"Description:Abp.Ldap.ServerPort": "सर्वर पोर्ट",
"DisplayName:Abp.Ldap.BaseDc": "बेस डोमेन घटक",
"Description:Abp.Ldap.BaseDc": "बेस डोमेन घटक",
"DisplayName:Abp.Ldap.Domain": "कार्यक्षेत्र",
"Description:Abp.Ldap.Domain": "कार्यक्षेत्र",
"DisplayName:Abp.Ldap.UserName": "उपयोगकर्ता नाम",
"Description:Abp.Ldap.UserName": "उपयोगकर्ता नाम",
"DisplayName:Abp.Ldap.Password": "कुंजिका",
"Description:Abp.Ldap.Password": "कुंजिका"
}
}
}

7
framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/hu.json

@ -3,18 +3,15 @@
"texts": {
"DisplayName:Abp.Ldap.ServerHost": "Szerver host",
"Description:Abp.Ldap.ServerHost": "Az LDAP ksizolgáló szerver hostneve vagy IP címe",
"DisplayName:Abp.Ldap.ServerPort": "Szerver port",
"Description:Abp.Ldap.ServerPort": "LDAP kommunikáció portja",
"DisplayName:Abp.Ldap.BaseDc": "Bázis tartomány-komponens",
"Description:Abp.Ldap.BaseDc": "Bázis tartomány-komponens",
"DisplayName:Abp.Ldap.Domain": "Tartomány",
"Description:Abp.Ldap.Domain": "Tartomány",
"DisplayName:Abp.Ldap.UserName": "Felhasználónév",
"Description:Abp.Ldap.UserName": "Felhasználónév",
"DisplayName:Abp.Ldap.Password": "Jelszó",
"Description:Abp.Ldap.Password": "Jelszó"
}
}

4
framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/is.json

@ -7,9 +7,11 @@
"Description:Abp.Ldap.ServerPort": "Server port",
"DisplayName:Abp.Ldap.BaseDc": "Grunn léna hlutur",
"Description:Abp.Ldap.BaseDc": "Grunn léna hluturt",
"DisplayName:Abp.Ldap.Domain": "Lén",
"Description:Abp.Ldap.Domain": "Lén",
"DisplayName:Abp.Ldap.UserName": "Notanda nafn",
"Description:Abp.Ldap.UserName": "Notanda nafn",
"DisplayName:Abp.Ldap.Password": "Lykilorð",
"Description:Abp.Ldap.Password": "Lykilorð"
}
}
}

4
framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/it.json

@ -7,9 +7,11 @@
"Description:Abp.Ldap.ServerPort": "Porta del server",
"DisplayName:Abp.Ldap.BaseDc": "Componente del dominio di base",
"Description:Abp.Ldap.BaseDc": "Componente del dominio di base",
"DisplayName:Abp.Ldap.Domain": "Dominio",
"Description:Abp.Ldap.Domain": "Dominio",
"DisplayName:Abp.Ldap.UserName": "Nome utente",
"Description:Abp.Ldap.UserName": "Nome utente",
"DisplayName:Abp.Ldap.Password": "Password",
"Description:Abp.Ldap.Password": "Password"
}
}
}

4
framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/nl.json

@ -7,9 +7,11 @@
"Description:Abp.Ldap.ServerPort": "Server poort",
"DisplayName:Abp.Ldap.BaseDc": "Basisdomein component",
"Description:Abp.Ldap.BaseDc": "Basisdomein component",
"DisplayName:Abp.Ldap.Domain": "Domain",
"Description:Abp.Ldap.Domain": "Domain",
"DisplayName:Abp.Ldap.UserName": "Gebruikersnaam",
"Description:Abp.Ldap.UserName": "Gebruikersnaam",
"DisplayName:Abp.Ldap.Password": "Wachtwoord",
"Description:Abp.Ldap.Password": "Wachtwoord"
}
}
}

4
framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/pl-PL.json

@ -7,9 +7,11 @@
"Description:Abp.Ldap.ServerPort": "Port serwera",
"DisplayName:Abp.Ldap.BaseDc": "Podstawowy składnik domeny",
"Description:Abp.Ldap.BaseDc": "Podstawowy składnik domeny",
"DisplayName:Abp.Ldap.Domain": "Domena",
"Description:Abp.Ldap.Domain": "Domena",
"DisplayName:Abp.Ldap.UserName": "Nazwa użytkownika",
"Description:Abp.Ldap.UserName": "Nazwa użytkownika",
"DisplayName:Abp.Ldap.Password": "Hasło",
"Description:Abp.Ldap.Password": "Hasło"
}
}
}

4
framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/pt-BR.json

@ -7,9 +7,11 @@
"Description:Abp.Ldap.ServerPort": "Porta do servidor",
"DisplayName:Abp.Ldap.BaseDc": "Componente de domínio base",
"Description:Abp.Ldap.BaseDc": "Componente de domínio base",
"DisplayName:Abp.Ldap.Domain": "Domínio",
"Description:Abp.Ldap.Domain": "Domínio",
"DisplayName:Abp.Ldap.UserName": "Nome do usuário",
"Description:Abp.Ldap.UserName": "Nome do usuário",
"DisplayName:Abp.Ldap.Password": "Senha",
"Description:Abp.Ldap.Password": "Senha"
}
}
}

8
framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/ro-RO.json

@ -3,17 +3,15 @@
"texts": {
"DisplayName:Abp.Ldap.ServerHost": "Server host",
"Description:Abp.Ldap.ServerHost": "Server host",
"DisplayName:Abp.Ldap.ServerPort": "Server port",
"Description:Abp.Ldap.ServerPort": "Server port",
"DisplayName:Abp.Ldap.BaseDc": "Componenta domeniului de bază",
"Description:Abp.Ldap.BaseDc": "Componenta domeniului de bază",
"DisplayName:Abp.Ldap.Domain": "Domeniu",
"Description:Abp.Ldap.Domain": "Domeniu",
"DisplayName:Abp.Ldap.UserName": "Nume de utilizator",
"Description:Abp.Ldap.UserName": "Nume de utilizator",
"DisplayName:Abp.Ldap.Password": "Parola",
"Description:Abp.Ldap.Password": "Parola"
}
}
}

4
framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/ru.json

@ -7,9 +7,11 @@
"Description:Abp.Ldap.ServerPort": "Порт сервера",
"DisplayName:Abp.Ldap.BaseDc": "Компонент базового домена",
"Description:Abp.Ldap.BaseDc": "Компонент базового домена",
"DisplayName:Abp.Ldap.Domain": "Домен",
"Description:Abp.Ldap.Domain": "Домен",
"DisplayName:Abp.Ldap.UserName": "Имя пользователя",
"Description:Abp.Ldap.UserName": "Имя пользователя",
"DisplayName:Abp.Ldap.Password": "Пароль",
"Description:Abp.Ldap.Password": "Пароль"
}
}
}

4
framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/sk.json

@ -7,9 +7,11 @@
"Description:Abp.Ldap.ServerPort": "Server post",
"DisplayName:Abp.Ldap.BaseDc": "Základný komponent domény",
"Description:Abp.Ldap.BaseDc": "Základný komponent domény",
"DisplayName:Abp.Ldap.Domain": "doména",
"Description:Abp.Ldap.Domain": "doména",
"DisplayName:Abp.Ldap.UserName": "Používateľské meno",
"Description:Abp.Ldap.UserName": "Používateľské meno",
"DisplayName:Abp.Ldap.Password": "Heslo",
"Description:Abp.Ldap.Password": "Heslo"
}
}
}

4
framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/sl.json

@ -7,9 +7,11 @@
"Description:Abp.Ldap.ServerPort": "Vrata strežnika",
"DisplayName:Abp.Ldap.BaseDc": "Komponenta osnovne domene",
"Description:Abp.Ldap.BaseDc": "Komponenta osnovne domene",
"DisplayName:Abp.Ldap.Domain": "domena",
"Description:Abp.Ldap.Domain": "domena",
"DisplayName:Abp.Ldap.UserName": "Uporabniško ime",
"Description:Abp.Ldap.UserName": "Uporabniško ime",
"DisplayName:Abp.Ldap.Password": "Geslo",
"Description:Abp.Ldap.Password": "Geslo"
}
}
}

6
framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/tr.json

@ -3,16 +3,14 @@
"texts": {
"DisplayName:Abp.Ldap.ServerHost": "Sunucu Ana Bilgisayarı",
"Description:Abp.Ldap.ServerHost": "Sunucu Ana Bilgisayarı",
"DisplayName:Abp.Ldap.ServerPort": "Sunucu portu",
"Description:Abp.Ldap.ServerPort": "Sunucu portu",
"DisplayName:Abp.Ldap.BaseDc": "Temel alan bileşeni",
"Description:Abp.Ldap.BaseDc": "Temel alan bileşeni",
"DisplayName:Abp.Ldap.Domain": "Alan adı",
"Description:Abp.Ldap.Domain": "Alan adı",
"DisplayName:Abp.Ldap.UserName": "Kullanıcı adı",
"Description:Abp.Ldap.UserName": "Kullanıcı adı",
"DisplayName:Abp.Ldap.Password": "Parola",
"Description:Abp.Ldap.Password": "Parola"
}

4
framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/vi.json

@ -7,9 +7,11 @@
"Description:Abp.Ldap.ServerPort": "Cổng máy chủ",
"DisplayName:Abp.Ldap.BaseDc": "Thành phần miền cơ sở",
"Description:Abp.Ldap.BaseDc": "Thành phần miền cơ sở",
"DisplayName:Abp.Ldap.Domain": "Lãnh địa",
"Description:Abp.Ldap.Domain": "Lãnh địa",
"DisplayName:Abp.Ldap.UserName": "tên tài khoản",
"Description:Abp.Ldap.UserName": "tên tài khoản",
"DisplayName:Abp.Ldap.Password": "Mật khẩu",
"Description:Abp.Ldap.Password": "Mật khẩu"
}
}
}

6
framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/zh-Hans.json

@ -3,16 +3,14 @@
"texts": {
"DisplayName:Abp.Ldap.ServerHost": "服务器主机",
"Description:Abp.Ldap.ServerHost": "服务器主机",
"DisplayName:Abp.Ldap.ServerPort": "服务器端口",
"Description:Abp.Ldap.ServerPort": "服务器端口",
"DisplayName:Abp.Ldap.BaseDc": "基域组件",
"Description:Abp.Ldap.BaseDc": "基域组件",
"DisplayName:Abp.Ldap.Domain": "域",
"Description:Abp.Ldap.Domain": "域",
"DisplayName:Abp.Ldap.UserName": "用户名",
"Description:Abp.Ldap.UserName": "用户名",
"DisplayName:Abp.Ldap.Password": "密码",
"Description:Abp.Ldap.Password": "密码"
}

6
framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/zh-Hant.json

@ -3,16 +3,14 @@
"texts": {
"DisplayName:Abp.Ldap.ServerHost": "服務器主機",
"Description:Abp.Ldap.ServerHost": "服務器主機",
"DisplayName:Abp.Ldap.ServerPort": "服務器端口",
"Description:Abp.Ldap.ServerPort": "服務器端口",
"DisplayName:Abp.Ldap.BaseDc": "基域組件",
"Description:Abp.Ldap.BaseDc": "基域組件",
"DisplayName:Abp.Ldap.Domain": "域",
"Description:Abp.Ldap.Domain": "域",
"DisplayName:Abp.Ldap.UserName": "用戶名",
"Description:Abp.Ldap.UserName": "用戶名",
"DisplayName:Abp.Ldap.Password": "密碼",
"Description:Abp.Ldap.Password": "密碼"
}

10
framework/src/Volo.Abp.Security/Volo/Abp/Security/Claims/AbpClaimTypes.cs

@ -77,4 +77,14 @@ public static class AbpClaimTypes
/// Default: "impersonator_userid".
/// </summary>
public static string ImpersonatorUserId { get; set; } = "impersonator_userid";
/// <summary>
/// Default: "impersonator_tenantname".
/// </summary>
public static string ImpersonatorTenantName { get; set; } = "impersonator_tenantname";
/// <summary>
/// Default: "impersonator_username".
/// </summary>
public static string ImpersonatorUserName { get; set; } = "impersonator_username";
}

14
framework/src/Volo.Abp.Security/Volo/Abp/Users/CurrentUserExtensions.cs

@ -35,7 +35,7 @@ public static class CurrentUserExtensions
public static Guid? FindImpersonatorTenantId([NotNull] this ICurrentUser currentUser)
{
var impersonatorTenantId = currentUser.FindClaimValue(AbpClaimTypes.ImpersonatorTenantId);
if (impersonatorTenantId == null || impersonatorTenantId.IsNullOrWhiteSpace())
if (impersonatorTenantId.IsNullOrWhiteSpace())
{
return null;
}
@ -50,7 +50,7 @@ public static class CurrentUserExtensions
public static Guid? FindImpersonatorUserId([NotNull] this ICurrentUser currentUser)
{
var impersonatorUserId = currentUser.FindClaimValue(AbpClaimTypes.ImpersonatorUserId);
if (impersonatorUserId == null || impersonatorUserId.IsNullOrWhiteSpace())
if (impersonatorUserId.IsNullOrWhiteSpace())
{
return null;
}
@ -61,4 +61,14 @@ public static class CurrentUserExtensions
return null;
}
public static string FindImpersonatorTenantName([NotNull] this ICurrentUser currentUser)
{
return currentUser.FindClaimValue(AbpClaimTypes.ImpersonatorTenantName);
}
public static string FindImpersonatorUserName([NotNull] this ICurrentUser currentUser)
{
return currentUser.FindClaimValue(AbpClaimTypes.ImpersonatorUserName);
}
}

9
framework/test/Volo.Abp.Ldap.Tests/Volo/Abp/Ldap/AbpLdapTestModule.cs

@ -1,5 +1,6 @@
using Volo.Abp.Autofac;
using Volo.Abp.Modularity;
using Volo.Abp.Settings;
namespace Volo.Abp.Ldap;
@ -12,13 +13,9 @@ public class AbpLdapTestModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpLdapOptions>(options =>
Configure<AbpSettingOptions>(options =>
{
options.ServerHost = "192.168.0.3";
options.ServerPort = 389;
options.BaseDc = "dc=abp,dc=io";
options.UserName = "admin";
options.Password = "123qwe";
options.ValueProviders.Add<TestLdapSettingValueProvider>();
});
}
}

9
framework/test/Volo.Abp.Ldap.Tests/Volo/Abp/Ldap/LdapManager_Tests.cs

@ -1,10 +1,13 @@
using System.Threading.Tasks;
using System;
using System.Threading.Tasks;
using Shouldly;
using Volo.Abp.Testing;
using Xunit;
namespace Volo.Abp.Ldap;
/// <summary>
/// docker run --name ldap -d --env LDAP_ORGANISATION="abp" --env LDAP_DOMAIN="abp.io" --env LDAP_ADMIN_PASSWORD="123qwe" -p 389:389 -p 636:639 osixia/openldap
/// </summary>
public class LdapManager_Tests : AbpIntegratedTest<AbpLdapTestModule>
{
private readonly ILdapManager _ldapManager;
@ -22,7 +25,7 @@ public class LdapManager_Tests : AbpIntegratedTest<AbpLdapTestModule>
[Fact(Skip = "Required Ldap environment")]
public async Task AuthenticateAsync()
{
(await _ldapManager.AuthenticateAsync("cn=abp,dc=abp,dc=io", "123qwe")).ShouldBe(true);
(await _ldapManager.AuthenticateAsync("cn=admin,dc=abp,dc=io", "123qwe")).ShouldBe(true);
(await _ldapManager.AuthenticateAsync("cn=abp,dc=abp,dc=io", "123123")).ShouldBe(false);
(await _ldapManager.AuthenticateAsync("NoExists", "123qwe")).ShouldBe(false);
}

20
framework/test/Volo.Abp.Ldap.Tests/Volo/Abp/Ldap/LdapOptions_Tests.cs

@ -1,20 +0,0 @@
using Microsoft.Extensions.Options;
using Shouldly;
using Volo.Abp.Testing;
using Xunit;
namespace Volo.Abp.Ldap;
public class LdapOptions_Tests : AbpIntegratedTest<AbpLdapTestModule>
{
protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options)
{
options.UseAutofac();
}
[Fact]
public void Should_Resolve_AbpAbpLdapOptionsFactory()
{
GetRequiredService<IOptions<AbpLdapOptions>>().ShouldBeOfType(typeof(AbpAbpLdapOptionsManager));
}
}

46
framework/test/Volo.Abp.Ldap.Tests/Volo/Abp/Ldap/TestLdapSettingValueProvider.cs

@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Settings;
namespace Volo.Abp.Ldap;
public class TestLdapSettingValueProvider : ISettingValueProvider, ITransientDependency
{
public const string ProviderName = "Test";
public string Name => ProviderName;
public Task<string> GetOrNullAsync(SettingDefinition setting)
{
switch (setting.Name)
{
case LdapSettingNames.ServerHost:
return Task.FromResult("localhost");
case LdapSettingNames.ServerPort:
return Task.FromResult("389");
case LdapSettingNames.BaseDc:
return Task.FromResult("dc=abp,dc=io");
case LdapSettingNames.Domain:
return Task.FromResult<string>(null);
case LdapSettingNames.UserName:
return Task.FromResult("admin");
case LdapSettingNames.Password:
return Task.FromResult("123qwe");
default:
return Task.FromResult<string>(null);
}
}
public Task<List<SettingValue>> GetAllAsync(SettingDefinition[] settings)
{
throw new NotImplementedException();
}
}

9
modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo/Abp/AuditLogging/AuditLog.cs

@ -24,8 +24,12 @@ public class AuditLog : AggregateRoot<Guid>, IMultiTenant
public virtual Guid? ImpersonatorUserId { get; protected set; }
public virtual string ImpersonatorUserName { get; protected set; }
public virtual Guid? ImpersonatorTenantId { get; protected set; }
public virtual string ImpersonatorTenantName { get; protected set; }
public virtual DateTime ExecutionTime { get; protected set; }
public virtual int ExecutionDuration { get; protected set; }
@ -77,7 +81,9 @@ public class AuditLog : AggregateRoot<Guid>, IMultiTenant
string url,
int? httpStatusCode,
Guid? impersonatorUserId,
string impersonatorUserName,
Guid? impersonatorTenantId,
string impersonatorTenantName,
ExtraPropertyDictionary extraPropertyDictionary,
List<EntityChange> entityChanges,
List<AuditLogAction> actions,
@ -101,8 +107,9 @@ public class AuditLog : AggregateRoot<Guid>, IMultiTenant
Url = url.Truncate(AuditLogConsts.MaxUrlLength);
HttpStatusCode = httpStatusCode;
ImpersonatorUserId = impersonatorUserId;
ImpersonatorUserName = impersonatorUserName.Truncate(AuditLogConsts.MaxUserNameLength);
ImpersonatorTenantId = impersonatorTenantId;
ImpersonatorTenantName = impersonatorTenantName.Truncate(AuditLogConsts.MaxTenantNameLength);
ExtraProperties = extraPropertyDictionary;
EntityChanges = entityChanges;
Actions = actions;

2
modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo/Abp/AuditLogging/AuditLogInfoToAuditLogConverter.cs

@ -79,7 +79,9 @@ public class AuditLogInfoToAuditLogConverter : IAuditLogInfoToAuditLogConverter,
auditLogInfo.Url,
auditLogInfo.HttpStatusCode,
auditLogInfo.ImpersonatorUserId,
auditLogInfo.ImpersonatorUserName,
auditLogInfo.ImpersonatorTenantId,
auditLogInfo.ImpersonatorTenantName,
extraProperties,
entityChanges,
actions,

3
modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/AbpAuditLoggingDbContextModelBuilderExtensions.cs

@ -31,9 +31,12 @@ public static class AbpAuditLoggingDbContextModelBuilderExtensions
b.Property(x => x.ExecutionDuration).HasColumnName(nameof(AuditLog.ExecutionDuration));
b.Property(x => x.ImpersonatorTenantId).HasColumnName(nameof(AuditLog.ImpersonatorTenantId));
b.Property(x => x.ImpersonatorUserId).HasColumnName(nameof(AuditLog.ImpersonatorUserId));
b.Property(x => x.ImpersonatorTenantName).HasMaxLength(AuditLogConsts.MaxTenantNameLength).HasColumnName(nameof(AuditLog.ImpersonatorTenantName));
b.Property(x => x.ImpersonatorUserName).HasMaxLength(AuditLogConsts.MaxUserNameLength).HasColumnName(nameof(AuditLog.ImpersonatorUserName));
b.Property(x => x.UserId).HasColumnName(nameof(AuditLog.UserId));
b.Property(x => x.UserName).HasMaxLength(AuditLogConsts.MaxUserNameLength).HasColumnName(nameof(AuditLog.UserName));
b.Property(x => x.TenantId).HasColumnName(nameof(AuditLog.TenantId));
b.Property(x => x.TenantName).HasMaxLength(AuditLogConsts.MaxTenantNameLength).HasColumnName(nameof(AuditLog.TenantName));
b.HasMany(a => a.Actions).WithOne().HasForeignKey(x => x.AuditLogId).IsRequired();
b.HasMany(a => a.EntityChanges).WithOne().HasForeignKey(x => x.AuditLogId).IsRequired();

36
modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo/Abp/AuditLogging/AuditLogRepository_Tests.cs

@ -36,6 +36,8 @@ public abstract class AuditLogRepository_Tests<TStartupModule> : AuditLoggingTes
UserId = userId,
ImpersonatorUserId = Guid.NewGuid(),
ImpersonatorTenantId = Guid.NewGuid(),
ImpersonatorTenantName = "default",
ImpersonatorUserName = "admin",
ExecutionTime = DateTime.Today,
ExecutionDuration = 42,
ClientIpAddress = ipAddress,
@ -87,6 +89,8 @@ public abstract class AuditLogRepository_Tests<TStartupModule> : AuditLoggingTes
UserId = userId2,
ImpersonatorUserId = Guid.NewGuid(),
ImpersonatorTenantId = Guid.NewGuid(),
ImpersonatorTenantName = "default",
ImpersonatorUserName = "admin",
ExecutionTime = DateTime.Today,
ExecutionDuration = 42,
ClientIpAddress = ipAddress,
@ -140,6 +144,8 @@ public abstract class AuditLogRepository_Tests<TStartupModule> : AuditLoggingTes
UserId = userId,
ImpersonatorUserId = Guid.NewGuid(),
ImpersonatorTenantId = Guid.NewGuid(),
ImpersonatorTenantName = "default",
ImpersonatorUserName = "admin",
ExecutionTime = DateTime.Today,
ExecutionDuration = 42,
ClientIpAddress = ipAddress,
@ -191,6 +197,8 @@ public abstract class AuditLogRepository_Tests<TStartupModule> : AuditLoggingTes
UserId = userId2,
ImpersonatorUserId = Guid.NewGuid(),
ImpersonatorTenantId = Guid.NewGuid(),
ImpersonatorTenantName = "default",
ImpersonatorUserName = "admin",
ExecutionTime = DateTime.Today,
ExecutionDuration = 42,
ClientIpAddress = ipAddress,
@ -242,6 +250,8 @@ public abstract class AuditLogRepository_Tests<TStartupModule> : AuditLoggingTes
UserId = userId,
ImpersonatorUserId = Guid.NewGuid(),
ImpersonatorTenantId = Guid.NewGuid(),
ImpersonatorTenantName = "default",
ImpersonatorUserName = "admin",
ExecutionTime = DateTime.SpecifyKind(DateTime.Parse("2020-01-01 01:00:00"), DateTimeKind.Utc),
ExecutionDuration = 45,
ClientIpAddress = ipAddress,
@ -293,6 +303,8 @@ public abstract class AuditLogRepository_Tests<TStartupModule> : AuditLoggingTes
UserId = userId2,
ImpersonatorUserId = Guid.NewGuid(),
ImpersonatorTenantId = Guid.NewGuid(),
ImpersonatorTenantName = "default",
ImpersonatorUserName = "admin",
ExecutionTime = DateTime.SpecifyKind(DateTime.Parse("2020-01-01 03:00:00"), DateTimeKind.Utc),
ExecutionDuration = 55,
ClientIpAddress = ipAddress,
@ -346,6 +358,8 @@ public abstract class AuditLogRepository_Tests<TStartupModule> : AuditLoggingTes
UserId = userId,
ImpersonatorUserId = Guid.NewGuid(),
ImpersonatorTenantId = Guid.NewGuid(),
ImpersonatorTenantName = "default",
ImpersonatorUserName = "admin",
ExecutionTime = DateTime.Today,
ExecutionDuration = 42,
ClientIpAddress = ipAddress,
@ -397,6 +411,8 @@ public abstract class AuditLogRepository_Tests<TStartupModule> : AuditLoggingTes
UserId = userId2,
ImpersonatorUserId = Guid.NewGuid(),
ImpersonatorTenantId = Guid.NewGuid(),
ImpersonatorTenantName = "default",
ImpersonatorUserName = "admin",
ExecutionTime = DateTime.Today,
ExecutionDuration = 42,
ClientIpAddress = ipAddress,
@ -452,6 +468,8 @@ public abstract class AuditLogRepository_Tests<TStartupModule> : AuditLoggingTes
UserId = userId,
ImpersonatorUserId = Guid.NewGuid(),
ImpersonatorTenantId = Guid.NewGuid(),
ImpersonatorTenantName = "default",
ImpersonatorUserName = "admin",
ExecutionTime = DateTime.Today,
ExecutionDuration = 42,
ClientIpAddress = ipAddress,
@ -503,6 +521,8 @@ public abstract class AuditLogRepository_Tests<TStartupModule> : AuditLoggingTes
UserId = userId2,
ImpersonatorUserId = Guid.NewGuid(),
ImpersonatorTenantId = Guid.NewGuid(),
ImpersonatorTenantName = "default",
ImpersonatorUserName = "admin",
ExecutionTime = DateTime.Today,
ExecutionDuration = 42,
ClientIpAddress = ipAddress,
@ -559,6 +579,8 @@ public abstract class AuditLogRepository_Tests<TStartupModule> : AuditLoggingTes
UserId = userId,
ImpersonatorUserId = Guid.NewGuid(),
ImpersonatorTenantId = Guid.NewGuid(),
ImpersonatorTenantName = "default",
ImpersonatorUserName = "admin",
ExecutionTime = DateTime.Today,
ExecutionDuration = 42,
ClientIpAddress = ipAddress,
@ -610,6 +632,8 @@ public abstract class AuditLogRepository_Tests<TStartupModule> : AuditLoggingTes
UserId = userId2,
ImpersonatorUserId = Guid.NewGuid(),
ImpersonatorTenantId = Guid.NewGuid(),
ImpersonatorTenantName = "default",
ImpersonatorUserName = "admin",
ExecutionTime = DateTime.Today,
ExecutionDuration = 42,
ClientIpAddress = ipAddress,
@ -673,6 +697,8 @@ public abstract class AuditLogRepository_Tests<TStartupModule> : AuditLoggingTes
UserId = userId,
ImpersonatorUserId = Guid.NewGuid(),
ImpersonatorTenantId = Guid.NewGuid(),
ImpersonatorTenantName = "default",
ImpersonatorUserName = "admin",
ExecutionTime = DateTime.Today,
ExecutionDuration = 42,
ClientIpAddress = ipAddress,
@ -723,6 +749,8 @@ public abstract class AuditLogRepository_Tests<TStartupModule> : AuditLoggingTes
UserId = userId2,
ImpersonatorUserId = Guid.NewGuid(),
ImpersonatorTenantId = Guid.NewGuid(),
ImpersonatorTenantName = "default",
ImpersonatorUserName = "admin",
ExecutionTime = DateTime.Today,
ExecutionDuration = 42,
ClientIpAddress = ipAddress,
@ -780,6 +808,8 @@ public abstract class AuditLogRepository_Tests<TStartupModule> : AuditLoggingTes
UserId = userId,
ImpersonatorUserId = Guid.NewGuid(),
ImpersonatorTenantId = Guid.NewGuid(),
ImpersonatorTenantName = "default",
ImpersonatorUserName = "admin",
ExecutionTime = DateTime.Today,
ExecutionDuration = 42,
ClientIpAddress = ipAddress,
@ -831,6 +861,8 @@ public abstract class AuditLogRepository_Tests<TStartupModule> : AuditLoggingTes
UserId = userId2,
ImpersonatorUserId = Guid.NewGuid(),
ImpersonatorTenantId = Guid.NewGuid(),
ImpersonatorTenantName = "default",
ImpersonatorUserName = "admin",
ExecutionTime = DateTime.Today,
ExecutionDuration = 42,
ClientIpAddress = ipAddress,
@ -893,6 +925,8 @@ public abstract class AuditLogRepository_Tests<TStartupModule> : AuditLoggingTes
UserId = userId,
ImpersonatorUserId = Guid.NewGuid(),
ImpersonatorTenantId = Guid.NewGuid(),
ImpersonatorTenantName = "default",
ImpersonatorUserName = "admin",
ExecutionTime = DateTime.Today,
ExecutionDuration = 42,
ClientIpAddress = ipAddress,
@ -944,6 +978,8 @@ public abstract class AuditLogRepository_Tests<TStartupModule> : AuditLoggingTes
UserId = userId2,
ImpersonatorUserId = Guid.NewGuid(),
ImpersonatorTenantId = Guid.NewGuid(),
ImpersonatorTenantName = "default",
ImpersonatorUserName = "admin",
ExecutionTime = DateTime.Today,
ExecutionDuration = 42,
ClientIpAddress = ipAddress,

6
modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo/Abp/AuditLogging/AuditStore_Basic_Tests.cs

@ -35,6 +35,8 @@ public abstract class AuditStore_Basic_Tests<TStartupModule> : AuditLoggingTestB
UserId = userId,
ImpersonatorUserId = Guid.NewGuid(),
ImpersonatorTenantId = Guid.NewGuid(),
ImpersonatorTenantName = "default",
ImpersonatorUserName = "admin",
ExecutionTime = DateTime.Today,
ExecutionDuration = 42,
ClientIpAddress = ipAddress,
@ -90,6 +92,8 @@ public abstract class AuditStore_Basic_Tests<TStartupModule> : AuditLoggingTestB
UserId = userId,
ImpersonatorUserId = Guid.NewGuid(),
ImpersonatorTenantId = Guid.NewGuid(),
ImpersonatorTenantName = "default",
ImpersonatorUserName = "admin",
ExecutionTime = DateTime.Today,
ExecutionDuration = 42,
ClientIpAddress = ipAddress,
@ -141,6 +145,8 @@ public abstract class AuditStore_Basic_Tests<TStartupModule> : AuditLoggingTestB
UserId = userId,
ImpersonatorUserId = Guid.NewGuid(),
ImpersonatorTenantId = Guid.NewGuid(),
ImpersonatorTenantName = "default",
ImpersonatorUserName = "admin",
ExecutionTime = DateTime.Today,
ExecutionDuration = 42,
ClientIpAddress = ipAddress,

3
npm/ng-packs/packages/core/src/lib/core.module.ts

@ -23,6 +23,7 @@ import { LocalizationModule } from './localization.module';
import { ABP } from './models/common';
import { LocalizationPipe } from './pipes/localization.pipe';
import { SortPipe } from './pipes/sort.pipe';
import { ToInjectorPipe } from './pipes/to-injector.pipe';
import { CookieLanguageProvider } from './providers/cookie-language.provider';
import { LocaleProvider } from './providers/locale.provider';
import { LocalizationService } from './services/localization.service';
@ -65,6 +66,7 @@ export function storageFactory(): OAuthStorage {
RouterOutletComponent,
SortPipe,
StopPropagationDirective,
ToInjectorPipe,
],
imports: [
OAuthModule,
@ -89,6 +91,7 @@ export function storageFactory(): OAuthStorage {
RouterOutletComponent,
SortPipe,
StopPropagationDirective,
ToInjectorPipe,
],
providers: [LocalizationPipe],
entryComponents: [

1
npm/ng-packs/packages/core/src/lib/pipes/index.ts

@ -1,2 +1,3 @@
export * from './localization.pipe';
export * from './sort.pipe';
export * from './to-injector.pipe';

28
npm/ng-packs/packages/core/src/lib/pipes/to-injector.pipe.ts

@ -0,0 +1,28 @@
import { InjectionToken, Injector, Pipe, PipeTransform } from '@angular/core';
export const INJECTOR_PIPE_DATA_TOKEN = new InjectionToken<PipeTransform>(
'INJECTOR_PIPE_DATA_TOKEN',
);
@Pipe({
name: 'toInjector',
})
export class ToInjectorPipe implements PipeTransform {
constructor(private injector: Injector) {}
transform(
value: any,
token: InjectionToken<any> = INJECTOR_PIPE_DATA_TOKEN,
name = 'ToInjectorPipe',
): Injector {
return Injector.create({
providers: [
{
provide: token,
useValue: value,
},
],
parent: this.injector,
name,
});
}
}

2
npm/ng-packs/packages/theme-basic/src/lib/components/index.ts

@ -7,6 +7,6 @@ export * from './logo/logo.component';
export * from './nav-items/current-user.component';
export * from './nav-items/languages.component';
export * from './nav-items/nav-items.component';
export * from './page-alert-container/page-alert-container.component';
export * from './routes/routes.component';
export * from './validation-error/validation-error.component';
export * from './page-alert-container/page-alert-container.component';

36
npm/ng-packs/packages/theme-basic/src/lib/components/nav-items/current-user.component.html

@ -31,11 +31,35 @@
aria-labelledby="dropdownMenuLink"
[class.d-block]="smallScreen && currentUserDropdown.isOpen()"
>
<a class="dropdown-item pointer" (click)="navigateToManageProfile()"
><i class="fa fa-cog me-1"></i>{{ 'AbpAccount::MyAccount' | abpLocalization }}</a
>
<a class="dropdown-item" href="javascript:void(0)" (click)="logout()"
><i class="fa fa-power-off me-1"></i>{{ 'AbpUi::Logout' | abpLocalization }}</a
>
<ng-container *ngFor="let item of userMenu.items$ | async; trackBy: trackByFn">
<ng-container *ngIf="item.visible && item.visible()">
<li class="nav-item d-flex align-items-center" *abpPermission="item.requiredPolicy">
<ng-container
*ngIf="item.component; else htmlTemplate"
[ngComponentOutlet]="item.component"
[ngComponentOutletInjector]="item | toInjector"
></ng-container>
<ng-template #htmlTemplate>
<div
*ngIf="item.html; else textTemplate"
[innerHTML]="item.html"
(click)="item.action ? item.action() : null"
></div>
</ng-template>
<ng-template #textTemplate>
<a
*ngIf="item.textTemplate"
(click)="item.action ? item.action() : null"
class="dropdown-item pointer"
>
<i *ngIf="item.textTemplate.icon" class="me-1 {{ item.textTemplate.icon }}"></i>
{{ item.textTemplate.text | abpLocalization }}</a
>
</ng-template>
</li>
</ng-container>
</ng-container>
</div>
</div>

8
npm/ng-packs/packages/theme-basic/src/lib/components/nav-items/current-user.component.ts

@ -5,7 +5,8 @@ import {
NAVIGATE_TO_MANAGE_PROFILE,
SessionStateService,
} from '@abp/ng.core';
import { Component, Inject } from '@angular/core';
import { UserMenu, UserMenuService } from '@abp/ng.theme.shared';
import { Component, Inject, TrackByFunction } from '@angular/core';
import { Observable } from 'rxjs';
@Component({
@ -16,12 +17,15 @@ export class CurrentUserComponent {
currentUser$: Observable<CurrentUserDto> = this.configState.getOne$('currentUser');
selectedTenant$ = this.sessionState.getTenant$();
trackByFn: TrackByFunction<UserMenu> = (_, element) => element.id;
get smallScreen(): boolean {
return window.innerWidth < 992;
}
constructor(
@Inject(NAVIGATE_TO_MANAGE_PROFILE) public navigateToManageProfile: () => void,
@Inject(NAVIGATE_TO_MANAGE_PROFILE) public readonly navigateToManageProfile: () => void,
public readonly userMenu: UserMenuService,
private authService: AuthService,
private configState: ConfigStateService,
private sessionState: SessionStateService,

1
npm/ng-packs/packages/theme-basic/src/lib/components/nav-items/nav-items.component.html

@ -5,6 +5,7 @@
<ng-container
*ngIf="item.component; else htmlTemplate"
[ngComponentOutlet]="item.component"
[ngComponentOutletInjector]="item | toInjector"
></ng-container>
<ng-template #htmlTemplate>

1
npm/ng-packs/packages/theme-basic/src/lib/enums/index.ts

@ -1 +1,2 @@
export * from './components';
export * from './user-menu-items';

4
npm/ng-packs/packages/theme-basic/src/lib/enums/user-menu-items.ts

@ -0,0 +1,4 @@
export const enum eUserMenuItems {
MyAccount = 'UserMenu.MyAccount',
Logout = 'UserMenu.Logout',
}

1
npm/ng-packs/packages/theme-basic/src/lib/providers/index.ts

@ -1,2 +1,3 @@
export * from './nav-item.provider';
export * from './styles.provider';
export * from './user-menu.provider';

44
npm/ng-packs/packages/theme-basic/src/lib/providers/user-menu.provider.ts

@ -0,0 +1,44 @@
import { AuthService, NAVIGATE_TO_MANAGE_PROFILE } from '@abp/ng.core';
import { UserMenuService } from '@abp/ng.theme.shared';
import { APP_INITIALIZER, Injector } from '@angular/core';
import { eUserMenuItems } from '../enums/user-menu-items';
export const BASIC_THEME_USER_MENU_PROVIDERS = [
{
provide: APP_INITIALIZER,
useFactory: configureUserMenu,
deps: [Injector],
multi: true,
},
];
export function configureUserMenu(injector: Injector) {
const userMenu = injector.get(UserMenuService);
const authService = injector.get(AuthService);
const navigateToManageProfile = injector.get(NAVIGATE_TO_MANAGE_PROFILE);
return () => {
userMenu.addItems([
{
id: eUserMenuItems.MyAccount,
order: 100,
textTemplate: {
text: 'AbpAccount::MyAccount',
icon: 'fa fa-cog',
},
action: () => navigateToManageProfile(),
},
{
id: eUserMenuItems.Logout,
order: 101,
textTemplate: {
text: 'AbpUi::Logout',
icon: 'fa fa-power-off',
},
action: () => {
authService.logout().subscribe();
},
},
]);
};
}

2
npm/ng-packs/packages/theme-basic/src/lib/theme-basic.module.ts

@ -23,6 +23,7 @@ import { ValidationErrorComponent } from './components/validation-error/validati
import { LazyStyleHandler } from './handlers/lazy-style.handler';
import { BASIC_THEME_NAV_ITEM_PROVIDERS } from './providers/nav-item.provider';
import { BASIC_THEME_STYLES_PROVIDERS } from './providers/styles.provider';
import { BASIC_THEME_USER_MENU_PROVIDERS } from './providers/user-menu.provider';
export const LAYOUTS = [ApplicationLayoutComponent, AccountLayoutComponent, EmptyLayoutComponent];
@ -70,6 +71,7 @@ export class ThemeBasicModule {
ngModule: ThemeBasicModule,
providers: [
BASIC_THEME_NAV_ITEM_PROVIDERS,
BASIC_THEME_USER_MENU_PROVIDERS,
BASIC_THEME_STYLES_PROVIDERS,
{
provide: VALIDATION_ERROR_TEMPLATE,

3
npm/ng-packs/packages/theme-shared/src/lib/models/index.ts

@ -1,5 +1,6 @@
export * from './common';
export * from './confirmation';
export * from './nav-item';
export * from './statistics';
export * from './toaster';
export * from './nav-item';
export * from './user-menu';

10
npm/ng-packs/packages/theme-shared/src/lib/models/user-menu.ts

@ -0,0 +1,10 @@
import { NavItem } from './nav-item';
export class UserMenu extends NavItem {
textTemplate?: UserMenuTextTemplate;
}
export interface UserMenuTextTemplate {
text: string;
icon?: string;
}

60
npm/ng-packs/packages/theme-shared/src/lib/services/abstract-menu.service.ts

@ -0,0 +1,60 @@
import { BehaviorSubject, Observable } from 'rxjs';
import { NavItem } from '../models/nav-item';
export abstract class AbstractMenuService<T extends NavItem> {
protected abstract baseClass;
protected _items$ = new BehaviorSubject<T[]>([]);
get items(): T[] {
return this._items$.value;
}
get items$(): Observable<T[]> {
return this._items$.asObservable();
}
addItems(newItems: T[]) {
const items = [...this.items];
newItems.forEach(item => {
const index = items.findIndex(i => i.id === item.id);
const data = new this.baseClass(item);
if (index > -1) {
items[index] = data;
return;
}
items.push(data);
});
items.sort(this.sortItems);
this._items$.next(items);
}
removeItem(id: string | number) {
const index = this.items.findIndex(item => item.id === id);
if (index < 0) return;
const items = [...this.items.slice(0, index), ...this.items.slice(index + 1)];
this._items$.next(items);
}
patchItem(id: string | number, item: Partial<Omit<T, 'id'>>) {
const index = this.items.findIndex(i => i.id === id);
if (index < 0) return;
const items = [...this.items];
items[index] = new this.baseClass({ ...items[index], ...item });
items.sort(this.sortItems);
this._items$.next(items);
}
private sortItems(a: T, b: T) {
if (!a.order) return 1;
if (!b.order) return -1;
return a.order - b.order;
}
}

1
npm/ng-packs/packages/theme-shared/src/lib/services/index.ts

@ -2,3 +2,4 @@ export * from './confirmation.service';
export * from './nav-items.service';
export * from './page-alert.service';
export * from './toaster.service';
export * from './user-menu.service';

48
npm/ng-packs/packages/theme-shared/src/lib/services/nav-items.service.ts

@ -1,50 +1,8 @@
import { Injectable } from '@angular/core';
import { BehaviorSubject, Observable } from 'rxjs';
import { NavItem } from '../models/nav-item';
import { AbstractMenuService } from './abstract-menu.service';
@Injectable({ providedIn: 'root' })
export class NavItemsService {
private _items$ = new BehaviorSubject<NavItem[]>([]);
get items(): NavItem[] {
return this._items$.value;
}
get items$(): Observable<NavItem[]> {
return this._items$.asObservable();
}
addItems(newItems: NavItem[]) {
const items = [...this.items];
newItems.forEach(item => items.push(new NavItem(item)));
items.sort(sortItems);
this._items$.next(items);
}
removeItem(id: string | number) {
const index = this.items.findIndex(item => item.id === id);
if (index < 0) return;
const items = [...this.items.slice(0, index), ...this.items.slice(index + 1)];
this._items$.next(items);
}
patchItem(id: string | number, item: Partial<Omit<NavItem, 'id'>>) {
const index = this.items.findIndex(i => i.id === id);
if (index < 0) return;
const items = [...this.items];
items[index] = new NavItem({ ...items[index], ...item });
items.sort(sortItems);
this._items$.next(items);
}
}
function sortItems(a: NavItem, b: NavItem) {
if (!a.order) return 1;
if (!b.order) return -1;
return a.order - b.order;
export class NavItemsService extends AbstractMenuService<NavItem> {
protected baseClass = NavItem;
}

8
npm/ng-packs/packages/theme-shared/src/lib/services/user-menu.service.ts

@ -0,0 +1,8 @@
import { Injectable } from '@angular/core';
import { UserMenu } from '../models/user-menu';
import { AbstractMenuService } from './abstract-menu.service';
@Injectable({ providedIn: 'root' })
export class UserMenuService extends AbstractMenuService<UserMenu> {
protected baseClass = UserMenu;
}

182
npm/ng-packs/yarn.lock

@ -2,6 +2,120 @@
# yarn lockfile v1
"@abp/ng.account.core@~5.0.1":
version "5.0.1"
resolved "https://registry.yarnpkg.com/@abp/ng.account.core/-/ng.account.core-5.0.1.tgz#ec29ad71cf88c9ac5975e7911e4263efc002d27d"
integrity sha512-h6E8FWE3qJzDObYYtrWEjAqGaoKRhmOERATdndqBElCKWc88BAoO+tCJ67fdi9EGcSyLeYnX2y3fR5QBrThe+g==
dependencies:
tslib "^2.0.0"
"@abp/ng.account@~5.0.1":
version "5.0.1"
resolved "https://registry.yarnpkg.com/@abp/ng.account/-/ng.account-5.0.1.tgz#aa428813454dd065edc97be0080ef04c403f2720"
integrity sha512-VeT2zJjB07gFh/wionYiwRbAY+H1ZHf4ueC0xJLP6oADxRf7IZHxFcujsmpv0eB66Zyy3DZ9j6gkx3Kva5B+Rg==
dependencies:
"@abp/ng.account.core" "~5.0.1"
"@abp/ng.theme.shared" "~5.0.1"
tslib "^2.0.0"
"@abp/ng.components@~5.0.1":
version "5.0.1"
resolved "https://registry.yarnpkg.com/@abp/ng.components/-/ng.components-5.0.1.tgz#9cd10f91d4da45eb435109fe3c75619f866aad63"
integrity sha512-SZR5+dlWydVJw27un+WFGb1Hnis3Dg+1hZXfHmIuAyX/Mr7l0X0JKKVxfWR+4u/A83xjBxYD4Zo6OaXpEn6cCg==
dependencies:
chart.js "^3.5.1"
ng-zorro-antd "^12.0.1"
tslib "^2.0.0"
"@abp/ng.core@~5.0.1":
version "5.0.1"
resolved "https://registry.yarnpkg.com/@abp/ng.core/-/ng.core-5.0.1.tgz#f507075dde476bb32d6b37792bce36443dd2fb83"
integrity sha512-Ta7SqOrrGXeXPM4N2bJuhK9awTHaYSsfE3GTCtOvBn11P/GxfsaUKJ7XFvAd1D/5+3BjF9+LF4EiWYZn1UaWUw==
dependencies:
"@abp/utils" "~5.0.1"
angular-oauth2-oidc "^12.1.0"
just-clone "^3.2.1"
just-compare "^1.4.0"
ts-toolbelt "6.15.4"
tslib "^2.0.0"
"@abp/ng.feature-management@~5.0.1":
version "5.0.1"
resolved "https://registry.yarnpkg.com/@abp/ng.feature-management/-/ng.feature-management-5.0.1.tgz#2cbc54f7ca209cc9397394eebabf69a9e5380613"
integrity sha512-evoX1hmFHdKWCW/H409KmXtcg2B9HKXgZTez9/yXV5+eluVm9HY/U/gtTmgMG3vMAfqAJMXQdOEeG/vo5JozsQ==
dependencies:
"@abp/ng.theme.shared" "~5.0.1"
tslib "^2.0.0"
"@abp/ng.identity@~5.0.1":
version "5.0.1"
resolved "https://registry.yarnpkg.com/@abp/ng.identity/-/ng.identity-5.0.1.tgz#71e25af3c5fa1f00967b98ec983d013291d76adc"
integrity sha512-AzrGyl88fX+qlZ3DiXqfxG5i4N4Yy6HTiOs6TFNwtEFfNICKXWWOAv6q6w8U50P35WpAytwyTnz9oYeAozn8cg==
dependencies:
"@abp/ng.permission-management" "~5.0.1"
"@abp/ng.theme.shared" "~5.0.1"
tslib "^2.0.0"
"@abp/ng.permission-management@~5.0.1":
version "5.0.1"
resolved "https://registry.yarnpkg.com/@abp/ng.permission-management/-/ng.permission-management-5.0.1.tgz#aa712868055ec71b9367b758d899d783df7f7115"
integrity sha512-8ge0TIrdtshEe/hUmmcSBU8T8onKSIBRR3dAkitPJRfU/FSDVB/qM4pOTjWzgL/Rghem+9y9LTV4UXvM3fw8eQ==
dependencies:
"@abp/ng.theme.shared" "~5.0.1"
tslib "^2.0.0"
"@abp/ng.schematics@~5.0.1":
version "5.0.1"
resolved "https://registry.yarnpkg.com/@abp/ng.schematics/-/ng.schematics-5.0.1.tgz#f80077c7503789738c9238f4e6f57301a648fc9d"
integrity sha512-dRx1T/I+wAhb1oM+7M0qcnCPn6OPeDcm8NtTmolN8iLkCaMPUh5HkylPNnTvxLcUWXiOFqJtn2HBQn7SBD8Vnw==
dependencies:
"@angular-devkit/core" "~11.0.2"
"@angular-devkit/schematics" "~11.0.2"
got "^11.5.2"
jsonc-parser "^2.3.0"
should-quote "^1.0.0"
typescript "~3.9.2"
"@abp/ng.setting-management@~5.0.1":
version "5.0.1"
resolved "https://registry.yarnpkg.com/@abp/ng.setting-management/-/ng.setting-management-5.0.1.tgz#6d32ea9930ac23f56e91306872ce87ab5cc42e54"
integrity sha512-5DhYj14JqT1z2IFnCL4lSOfyK3+ZdJ2y8LOJBROJ9xLnvYUfwFaVcn+V3Iz0kM8v5huWQ+EKgjIZ47qdc/tPCQ==
dependencies:
"@abp/ng.components" "~5.0.1"
"@abp/ng.theme.shared" "~5.0.1"
tslib "^2.0.0"
"@abp/ng.tenant-management@~5.0.1":
version "5.0.1"
resolved "https://registry.yarnpkg.com/@abp/ng.tenant-management/-/ng.tenant-management-5.0.1.tgz#592da08b9376c00714bd4dd63f37e752c15de912"
integrity sha512-8m9HuStDWZsLCv6g6vK7l9k6wvK0oamgFuZrac9DjIHsruGdpLFdEeUvqhDhsyulMyk83OUEIi1hRgEX2PdQfg==
dependencies:
"@abp/ng.feature-management" "~5.0.1"
"@abp/ng.theme.shared" "~5.0.1"
tslib "^2.0.0"
"@abp/ng.theme.basic@~5.0.1":
version "5.0.1"
resolved "https://registry.yarnpkg.com/@abp/ng.theme.basic/-/ng.theme.basic-5.0.1.tgz#87d4eec12296c6747b5d9d37781c180334e36fbb"
integrity sha512-kzgc2plB9xPTFye8CVlALzCNL/UAAd+jVhl5wz1meau2l7vvnW5sCI6P64y9gpKipQYMSpRhbYYQSBi4JJGNeA==
dependencies:
"@abp/ng.account.core" "~5.0.1"
"@abp/ng.theme.shared" "~5.0.1"
tslib "^2.0.0"
"@abp/ng.theme.shared@~5.0.1":
version "5.0.1"
resolved "https://registry.yarnpkg.com/@abp/ng.theme.shared/-/ng.theme.shared-5.0.1.tgz#866e7733619c9c6bcb1d36c827369fff0e97c80b"
integrity sha512-XT1BGJiG9sqZJJGZcCN6+WvlbRdZPRBRnc6NvzZTPXGgnnX107N2lanIShulJiVUX68chkBd4yNuM8tM/hLiOg==
dependencies:
"@abp/ng.core" "~5.0.1"
"@fortawesome/fontawesome-free" "^5.15.4"
"@ng-bootstrap/ng-bootstrap" "11.0.0-beta.2"
"@ngx-validate/core" "^0.1.1"
"@swimlane/ngx-datatable" "^19.0.0"
bootstrap "^5.1.1"
tslib "^2.0.0"
"@abp/utils@~5.0.1":
version "5.0.1"
resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-5.0.1.tgz#57934383004a21172bf7e08130813c08946894fb"
@ -146,6 +260,17 @@
rxjs "6.6.2"
source-map "0.7.3"
"@angular-devkit/core@11.0.7", "@angular-devkit/core@~11.0.2":
version "11.0.7"
resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-11.0.7.tgz#05b82be7e11ddc2a7836c777297ee45eee20ff55"
integrity sha512-1GKnIT++YSUHpzzRx9QC0+8yOw4wy+ZpiJVDlroPSeK4FGrTCJqJKenkfRjVFRFOSrzTiJds+IU6kI4+bFbw9g==
dependencies:
ajv "6.12.6"
fast-json-stable-stringify "2.1.0"
magic-string "0.25.7"
rxjs "6.6.3"
source-map "0.7.3"
"@angular-devkit/core@12.2.13":
version "12.2.13"
resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-12.2.13.tgz#db3929d1bfce71010b37fb7c4e6c33ef80a4f35f"
@ -179,6 +304,15 @@
ora "5.4.1"
rxjs "6.6.7"
"@angular-devkit/schematics@~11.0.2":
version "11.0.7"
resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-11.0.7.tgz#7cd2398c98d82f8e5bdc3bb5c70e92d6b1d12a12"
integrity sha512-mKkXWmSTlZYjQO4i7xUX+bG1E9h9Ke3GgGQQouA+kth06IPO+VcywLQNsui4qcyLDUjyo8CaX+44aoSXoX3Tgg==
dependencies:
"@angular-devkit/core" "11.0.7"
ora "5.1.0"
rxjs "6.6.3"
"@angular-eslint/eslint-plugin-template@~12.3.0":
version "12.3.1"
resolved "https://registry.yarnpkg.com/@angular-eslint/eslint-plugin-template/-/eslint-plugin-template-12.3.1.tgz#33260cd5356df5db7e27719443eabcf6c214e32e"
@ -3581,6 +3715,16 @@ ajv@6.12.4:
json-schema-traverse "^0.4.1"
uri-js "^4.2.2"
ajv@6.12.6, ajv@^6.1.0, ajv@^6.10.0, ajv@^6.12.2, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5:
version "6.12.6"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4"
integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==
dependencies:
fast-deep-equal "^3.1.1"
fast-json-stable-stringify "^2.0.0"
json-schema-traverse "^0.4.1"
uri-js "^4.2.2"
ajv@8.6.2:
version "8.6.2"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.6.2.tgz#2fb45e0e5fcbc0813326c1c3da535d1881bb0571"
@ -3591,16 +3735,6 @@ ajv@8.6.2:
require-from-string "^2.0.2"
uri-js "^4.2.2"
ajv@^6.1.0, ajv@^6.10.0, ajv@^6.12.2, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5:
version "6.12.6"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4"
integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==
dependencies:
fast-deep-equal "^3.1.1"
fast-json-stable-stringify "^2.0.0"
json-schema-traverse "^0.4.1"
uri-js "^4.2.2"
ajv@^8.0.0, ajv@^8.0.1:
version "8.8.2"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.8.2.tgz#01b4fef2007a28bf75f0b7fc009f62679de4abbb"
@ -4551,7 +4685,7 @@ cli-cursor@^3.1.0:
dependencies:
restore-cursor "^3.1.0"
cli-spinners@^2.5.0:
cli-spinners@^2.4.0, cli-spinners@^2.5.0:
version "2.6.1"
resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.6.1.tgz#adc954ebe281c37a6319bfa401e6dd2488ffb70d"
integrity sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g==
@ -10096,6 +10230,20 @@ optionator@^0.9.1:
type-check "^0.4.0"
word-wrap "^1.2.3"
ora@5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/ora/-/ora-5.1.0.tgz#b188cf8cd2d4d9b13fd25383bc3e5cba352c94f8"
integrity sha512-9tXIMPvjZ7hPTbk8DFq1f7Kow/HU/pQYB60JbNq+QnGwcyhWVZaQ4hM9zQDEsPxw/muLpgiHSaumUZxCAmod/w==
dependencies:
chalk "^4.1.0"
cli-cursor "^3.1.0"
cli-spinners "^2.4.0"
is-interactive "^1.0.0"
log-symbols "^4.0.0"
mute-stream "0.0.8"
strip-ansi "^6.0.0"
wcwidth "^1.0.1"
ora@5.4.1, ora@^5.1.0, ora@^5.3.0:
version "5.4.1"
resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18"
@ -11838,6 +11986,13 @@ rxjs@6.6.2:
dependencies:
tslib "^1.9.0"
rxjs@6.6.3:
version "6.6.3"
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.3.tgz#8ca84635c4daa900c0d3967a6ee7ac60271ee552"
integrity sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ==
dependencies:
tslib "^1.9.0"
rxjs@6.6.7, rxjs@^6.5.0, rxjs@^6.5.4, rxjs@^6.6.0, rxjs@~6.6.0:
version "6.6.7"
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9"
@ -13227,6 +13382,11 @@ typescript@4.3.5:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.5.tgz#4d1c37cc16e893973c45a06886b7113234f119f4"
integrity sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==
typescript@~3.9.2:
version "3.9.10"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.10.tgz#70f3910ac7a51ed6bef79da7800690b19bf778b8"
integrity sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==
uglify-js@^3.1.4:
version "3.14.3"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.14.3.tgz#c0f25dfea1e8e5323eccf59610be08b6043c15cf"

9
npm/preview-publish.ps1

@ -1,12 +1,9 @@
param(
[string]$Version,
[string]$User,
[string]$Pass,
[string]$Email,
[string]$Registry
)
npm install
yarn install
$NextVersion = $(node publish-utils.js --nextVersion)
$RootFolder = (Get-Item -Path "./" -Verbose).FullName
@ -21,8 +18,8 @@ exit
$commands = (
"cd ng-packs\scripts",
"npm install",
"npm run publish-packages -- --nextVersion $Version --preview --registry $Registry",
"yarn",
"npm run publish-packages -- --nextVersion $Version --preview --registry $Registry --skipVersionValidation",
"cd ../../",
"npm run lerna -- version $Version --yes --no-commit-hooks --skip-git --force-publish",
"npm run replace-with-tilde",

2
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/abp/utils/abp-utils.umd.js.map

File diff suppressed because one or more lines are too long

2
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/abp/utils/abp-utils.umd.min.js.map

File diff suppressed because one or more lines are too long

77
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/bootstrap/css/bootstrap.css

@ -1,6 +1,6 @@
@charset "UTF-8";
/*!
* Bootstrap v5.1.0 (https://getbootstrap.com/)
* Bootstrap v5.1.3 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
@ -46,7 +46,8 @@
--bs-dark-rgb: 33, 37, 41;
--bs-white-rgb: 255, 255, 255;
--bs-black-rgb: 0, 0, 0;
--bs-body-rgb: 33, 37, 41;
--bs-body-color-rgb: 33, 37, 41;
--bs-body-bg-rgb: 255, 255, 255;
--bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
@ -447,6 +448,10 @@ legend + * {
padding: 0;
}
::-webkit-file-upload-button {
font: inherit;
}
::file-selector-button {
font: inherit;
}
@ -660,16 +665,16 @@ progress {
--bs-gutter-y: 0;
display: flex;
flex-wrap: wrap;
margin-top: calc(var(--bs-gutter-y) * -1);
margin-right: calc(var(--bs-gutter-x) * -.5);
margin-left: calc(var(--bs-gutter-x) * -.5);
margin-top: calc(-1 * var(--bs-gutter-y));
margin-right: calc(-0.5 * var(--bs-gutter-x));
margin-left: calc(-0.5 * var(--bs-gutter-x));
}
.row > * {
flex-shrink: 0;
width: 100%;
max-width: 100%;
padding-right: calc(var(--bs-gutter-x) * .5);
padding-left: calc(var(--bs-gutter-x) * .5);
padding-right: calc(var(--bs-gutter-x) * 0.5);
padding-left: calc(var(--bs-gutter-x) * 0.5);
margin-top: var(--bs-gutter-y);
}
@ -1973,8 +1978,8 @@ progress {
.table > thead {
vertical-align: bottom;
}
.table > :not(:last-child) > :last-child > * {
border-bottom-color: currentColor;
.table > :not(:first-child) {
border-top: 2px solid currentColor;
}
.caption-top {
@ -1995,8 +2000,11 @@ progress {
.table-borderless > :not(caption) > * > * {
border-bottom-width: 0;
}
.table-borderless > :not(:first-child) {
border-top-width: 0;
}
.table-striped > tbody > tr:nth-of-type(odd) {
.table-striped > tbody > tr:nth-of-type(odd) > * {
--bs-table-accent-bg: var(--bs-table-striped-bg);
color: var(--bs-table-striped-color);
}
@ -2006,7 +2014,7 @@ progress {
color: var(--bs-table-active-color);
}
.table-hover > tbody > tr:hover {
.table-hover > tbody > tr:hover > * {
--bs-table-accent-bg: var(--bs-table-hover-bg);
color: var(--bs-table-hover-color);
}
@ -2222,6 +2230,22 @@ progress {
background-color: #e9ecef;
opacity: 1;
}
.form-control::-webkit-file-upload-button {
padding: 0.375rem 0.75rem;
margin: -0.375rem -0.75rem;
-webkit-margin-end: 0.75rem;
margin-inline-end: 0.75rem;
color: #212529;
background-color: #e9ecef;
pointer-events: none;
border-color: inherit;
border-style: solid;
border-width: 0;
border-inline-end-width: 1px;
border-radius: 0;
-webkit-transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.form-control::file-selector-button {
padding: 0.375rem 0.75rem;
margin: -0.375rem -0.75rem;
@ -2238,10 +2262,17 @@ progress {
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
@media (prefers-reduced-motion: reduce) {
.form-control::-webkit-file-upload-button {
-webkit-transition: none;
transition: none;
}
.form-control::file-selector-button {
transition: none;
}
}
.form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button {
background-color: #dde0e3;
}
.form-control:hover:not(:disabled):not([readonly])::file-selector-button {
background-color: #dde0e3;
}
@ -2293,6 +2324,12 @@ progress {
font-size: 0.875rem;
border-radius: 0.2rem;
}
.form-control-sm::-webkit-file-upload-button {
padding: 0.25rem 0.5rem;
margin: -0.25rem -0.5rem;
-webkit-margin-end: 0.5rem;
margin-inline-end: 0.5rem;
}
.form-control-sm::file-selector-button {
padding: 0.25rem 0.5rem;
margin: -0.25rem -0.5rem;
@ -2312,6 +2349,12 @@ progress {
font-size: 1.25rem;
border-radius: 0.3rem;
}
.form-control-lg::-webkit-file-upload-button {
padding: 0.5rem 1rem;
margin: -0.5rem -1rem;
-webkit-margin-end: 1rem;
margin-inline-end: 1rem;
}
.form-control-lg::file-selector-button {
padding: 0.5rem 1rem;
margin: -0.5rem -1rem;
@ -2400,6 +2443,7 @@ textarea.form-control-lg {
padding-bottom: 0.25rem;
padding-left: 0.5rem;
font-size: 0.875rem;
border-radius: 0.2rem;
}
.form-select-lg {
@ -2407,6 +2451,7 @@ textarea.form-control-lg {
padding-bottom: 0.5rem;
padding-left: 1rem;
font-size: 1.25rem;
border-radius: 0.3rem;
}
.form-check {
@ -6443,15 +6488,15 @@ textarea.form-control-lg {
}
.ratio-4x3 {
--bs-aspect-ratio: calc(3 / 4 * 100%);
--bs-aspect-ratio: 75%;
}
.ratio-16x9 {
--bs-aspect-ratio: calc(9 / 16 * 100%);
--bs-aspect-ratio: 56.25%;
}
.ratio-21x9 {
--bs-aspect-ratio: calc(9 / 21 * 100%);
--bs-aspect-ratio: 42.8571428571%;
}
.fixed-top {
@ -7699,7 +7744,7 @@ textarea.form-control-lg {
.text-body {
--bs-text-opacity: 1;
color: rgba(var(--bs-body-rgb), var(--bs-text-opacity)) !important;
color: rgba(var(--bs-body-color-rgb), var(--bs-text-opacity)) !important;
}
.text-muted {
@ -7790,7 +7835,7 @@ textarea.form-control-lg {
.bg-body {
--bs-bg-opacity: 1;
background-color: rgba(var(--bs-body-rgb), var(--bs-bg-opacity)) !important;
background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
}
.bg-transparent {

2
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/bootstrap/css/bootstrap.css.map

File diff suppressed because one or more lines are too long

4
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/bootstrap/css/bootstrap.min.css

File diff suppressed because one or more lines are too long

2
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/bootstrap/css/bootstrap.min.css.map

File diff suppressed because one or more lines are too long

77
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/bootstrap/css/bootstrap.rtl.css

@ -1,6 +1,6 @@
@charset "UTF-8";
/*!
* Bootstrap v5.1.0 (https://getbootstrap.com/)
* Bootstrap v5.1.3 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors
* Copyright 2011-2021 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
@ -46,7 +46,8 @@
--bs-dark-rgb: 33, 37, 41;
--bs-white-rgb: 255, 255, 255;
--bs-black-rgb: 0, 0, 0;
--bs-body-rgb: 33, 37, 41;
--bs-body-color-rgb: 33, 37, 41;
--bs-body-bg-rgb: 255, 255, 255;
--bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
@ -445,6 +446,10 @@ legend + * {
padding: 0;
}
::-webkit-file-upload-button {
font: inherit;
}
::file-selector-button {
font: inherit;
}
@ -658,16 +663,16 @@ progress {
--bs-gutter-y: 0;
display: flex;
flex-wrap: wrap;
margin-top: calc(var(--bs-gutter-y) * -1);
margin-left: calc(var(--bs-gutter-x) * -.5);
margin-right: calc(var(--bs-gutter-x) * -.5);
margin-top: calc(-1 * var(--bs-gutter-y));
margin-left: calc(-0.5 * var(--bs-gutter-x));
margin-right: calc(-0.5 * var(--bs-gutter-x));
}
.row > * {
flex-shrink: 0;
width: 100%;
max-width: 100%;
padding-left: calc(var(--bs-gutter-x) * .5);
padding-right: calc(var(--bs-gutter-x) * .5);
padding-left: calc(var(--bs-gutter-x) * 0.5);
padding-right: calc(var(--bs-gutter-x) * 0.5);
margin-top: var(--bs-gutter-y);
}
@ -1971,8 +1976,8 @@ progress {
.table > thead {
vertical-align: bottom;
}
.table > :not(:last-child) > :last-child > * {
border-bottom-color: currentColor;
.table > :not(:first-child) {
border-top: 2px solid currentColor;
}
.caption-top {
@ -1993,8 +1998,11 @@ progress {
.table-borderless > :not(caption) > * > * {
border-bottom-width: 0;
}
.table-borderless > :not(:first-child) {
border-top-width: 0;
}
.table-striped > tbody > tr:nth-of-type(odd) {
.table-striped > tbody > tr:nth-of-type(odd) > * {
--bs-table-accent-bg: var(--bs-table-striped-bg);
color: var(--bs-table-striped-color);
}
@ -2004,7 +2012,7 @@ progress {
color: var(--bs-table-active-color);
}
.table-hover > tbody > tr:hover {
.table-hover > tbody > tr:hover > * {
--bs-table-accent-bg: var(--bs-table-hover-bg);
color: var(--bs-table-hover-color);
}
@ -2220,6 +2228,22 @@ progress {
background-color: #e9ecef;
opacity: 1;
}
.form-control::-webkit-file-upload-button {
padding: 0.375rem 0.75rem;
margin: -0.375rem -0.75rem;
-webkit-margin-end: 0.75rem;
margin-inline-end: 0.75rem;
color: #212529;
background-color: #e9ecef;
pointer-events: none;
border-color: inherit;
border-style: solid;
border-width: 0;
border-inline-end-width: 1px;
border-radius: 0;
-webkit-transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.form-control::file-selector-button {
padding: 0.375rem 0.75rem;
margin: -0.375rem -0.75rem;
@ -2236,10 +2260,17 @@ progress {
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
@media (prefers-reduced-motion: reduce) {
.form-control::-webkit-file-upload-button {
-webkit-transition: none;
transition: none;
}
.form-control::file-selector-button {
transition: none;
}
}
.form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button {
background-color: #dde0e3;
}
.form-control:hover:not(:disabled):not([readonly])::file-selector-button {
background-color: #dde0e3;
}
@ -2291,6 +2322,12 @@ progress {
font-size: 0.875rem;
border-radius: 0.2rem;
}
.form-control-sm::-webkit-file-upload-button {
padding: 0.25rem 0.5rem;
margin: -0.25rem -0.5rem;
-webkit-margin-end: 0.5rem;
margin-inline-end: 0.5rem;
}
.form-control-sm::file-selector-button {
padding: 0.25rem 0.5rem;
margin: -0.25rem -0.5rem;
@ -2310,6 +2347,12 @@ progress {
font-size: 1.25rem;
border-radius: 0.3rem;
}
.form-control-lg::-webkit-file-upload-button {
padding: 0.5rem 1rem;
margin: -0.5rem -1rem;
-webkit-margin-end: 1rem;
margin-inline-end: 1rem;
}
.form-control-lg::file-selector-button {
padding: 0.5rem 1rem;
margin: -0.5rem -1rem;
@ -2398,6 +2441,7 @@ textarea.form-control-lg {
padding-bottom: 0.25rem;
padding-right: 0.5rem;
font-size: 0.875rem;
border-radius: 0.2rem;
}
.form-select-lg {
@ -2405,6 +2449,7 @@ textarea.form-control-lg {
padding-bottom: 0.5rem;
padding-right: 1rem;
font-size: 1.25rem;
border-radius: 0.3rem;
}
.form-check {
@ -6428,15 +6473,15 @@ textarea.form-control-lg {
}
.ratio-4x3 {
--bs-aspect-ratio: calc(3 / 4 * 100%);
--bs-aspect-ratio: 75%;
}
.ratio-16x9 {
--bs-aspect-ratio: calc(9 / 16 * 100%);
--bs-aspect-ratio: 56.25%;
}
.ratio-21x9 {
--bs-aspect-ratio: calc(9 / 21 * 100%);
--bs-aspect-ratio: 42.8571428571%;
}
.fixed-top {
@ -7676,7 +7721,7 @@ textarea.form-control-lg {
.text-body {
--bs-text-opacity: 1;
color: rgba(var(--bs-body-rgb), var(--bs-text-opacity)) !important;
color: rgba(var(--bs-body-color-rgb), var(--bs-text-opacity)) !important;
}
.text-muted {
@ -7767,7 +7812,7 @@ textarea.form-control-lg {
.bg-body {
--bs-bg-opacity: 1;
background-color: rgba(var(--bs-body-rgb), var(--bs-bg-opacity)) !important;
background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
}
.bg-transparent {

2
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/bootstrap/css/bootstrap.rtl.css.map

File diff suppressed because one or more lines are too long

4
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/bootstrap/css/bootstrap.rtl.min.css

File diff suppressed because one or more lines are too long

2
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/bootstrap/css/bootstrap.rtl.min.css.map

File diff suppressed because one or more lines are too long

316
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/bootstrap/js/bootstrap.bundle.js

@ -1,5 +1,5 @@
/*!
* Bootstrap v5.1.0 (https://getbootstrap.com/)
* Bootstrap v5.1.3 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
@ -7,11 +7,11 @@
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.bootstrap = factory());
}(this, (function () { 'use strict';
})(this, (function () { 'use strict';
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): util/index.js
* Bootstrap (v5.1.3): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@ -322,7 +322,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): dom/event-handler.js
* Bootstrap (v5.1.3): dom/event-handler.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@ -385,7 +385,6 @@
event.delegateTarget = target;
if (handler.oneOff) {
// eslint-disable-next-line unicorn/consistent-destructuring
EventHandler.off(element, event.type, selector, fn);
}
@ -611,7 +610,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): dom/data.js
* Bootstrap (v5.1.3): dom/data.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@ -622,7 +621,7 @@
* ------------------------------------------------------------------------
*/
const elementMap = new Map();
var Data = {
const Data = {
set(element, key, instance) {
if (!elementMap.has(element)) {
elementMap.set(element, new Map());
@ -665,7 +664,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): base-component.js
* Bootstrap (v5.1.3): base-component.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@ -675,7 +674,7 @@
* ------------------------------------------------------------------------
*/
const VERSION = '5.1.0';
const VERSION = '5.1.3';
class BaseComponent {
constructor(element) {
@ -731,7 +730,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): util/component-functions.js
* Bootstrap (v5.1.3): util/component-functions.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@ -757,7 +756,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): alert.js
* Bootstrap (v5.1.3): alert.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@ -846,7 +845,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): button.js
* Bootstrap (v5.1.3): button.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@ -917,7 +916,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): dom/manipulator.js
* Bootstrap (v5.1.3): dom/manipulator.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@ -991,7 +990,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): dom/selector-engine.js
* Bootstrap (v5.1.3): dom/selector-engine.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@ -1061,7 +1060,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): carousel.js
* Bootstrap (v5.1.3): carousel.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@ -1286,8 +1285,12 @@
}
_addTouchEventListeners() {
const hasPointerPenTouch = event => {
return this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH);
};
const start = event => {
if (this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) {
if (hasPointerPenTouch(event)) {
this.touchStartX = event.clientX;
} else if (!this._pointerEvent) {
this.touchStartX = event.touches[0].clientX;
@ -1300,7 +1303,7 @@
};
const end = event => {
if (this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) {
if (hasPointerPenTouch(event)) {
this.touchDeltaX = event.clientX - this.touchStartX;
}
@ -1325,7 +1328,7 @@
};
SelectorEngine.find(SELECTOR_ITEM_IMG, this._element).forEach(itemImg => {
EventHandler.on(itemImg, EVENT_DRAG_START, e => e.preventDefault());
EventHandler.on(itemImg, EVENT_DRAG_START, event => event.preventDefault());
});
if (this._pointerEvent) {
@ -1606,7 +1609,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): collapse.js
* Bootstrap (v5.1.3): collapse.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@ -1637,10 +1640,11 @@
const CLASS_NAME_COLLAPSE = 'collapse';
const CLASS_NAME_COLLAPSING = 'collapsing';
const CLASS_NAME_COLLAPSED = 'collapsed';
const CLASS_NAME_DEEPER_CHILDREN = `:scope .${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`;
const CLASS_NAME_HORIZONTAL = 'collapse-horizontal';
const WIDTH = 'width';
const HEIGHT = 'height';
const SELECTOR_ACTIVES = '.show, .collapsing';
const SELECTOR_ACTIVES = '.collapse.show, .collapse.collapsing';
const SELECTOR_DATA_TOGGLE$4 = '[data-bs-toggle="collapse"]';
/**
* ------------------------------------------------------------------------
@ -1706,7 +1710,7 @@
let activesData;
if (this._config.parent) {
const children = SelectorEngine.find(`.${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`, this._config.parent);
const children = SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent);
actives = SelectorEngine.find(SELECTOR_ACTIVES, this._config.parent).filter(elem => !children.includes(elem)); // remove children if greater depth
}
@ -1844,7 +1848,7 @@
return;
}
const children = SelectorEngine.find(`.${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`, this._config.parent);
const children = SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent);
SelectorEngine.find(SELECTOR_DATA_TOGGLE$4, this._config.parent).filter(elem => !children.includes(elem)).forEach(element => {
const selected = getElementFromSelector(element);
@ -2065,7 +2069,7 @@
} // eslint-disable-next-line import/no-unused-modules
var applyStyles$1 = {
const applyStyles$1 = {
name: 'applyStyles',
enabled: true,
phase: 'write',
@ -2078,31 +2082,39 @@
return placement.split('-')[0];
}
var round$1 = Math.round;
function getBoundingClientRect(element, includeScale) {
if (includeScale === void 0) {
includeScale = false;
}
// import { isHTMLElement } from './instanceOf';
function getBoundingClientRect(element, // eslint-disable-next-line unused-imports/no-unused-vars
includeScale) {
var rect = element.getBoundingClientRect();
var scaleX = 1;
var scaleY = 1;
if (isHTMLElement(element) && includeScale) {
// Fallback to 1 in case both values are `0`
scaleX = rect.width / element.offsetWidth || 1;
scaleY = rect.height / element.offsetHeight || 1;
}
var scaleY = 1; // FIXME:
// `offsetWidth` returns an integer while `getBoundingClientRect`
// returns a float. This results in `scaleX` or `scaleY` being
// non-1 when it should be for elements that aren't a full pixel in
// width or height.
// if (isHTMLElement(element) && includeScale) {
// const offsetHeight = element.offsetHeight;
// const offsetWidth = element.offsetWidth;
// // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
// // Fallback to 1 in case both values are `0`
// if (offsetWidth > 0) {
// scaleX = rect.width / offsetWidth || 1;
// }
// if (offsetHeight > 0) {
// scaleY = rect.height / offsetHeight || 1;
// }
// }
return {
width: round$1(rect.width / scaleX),
height: round$1(rect.height / scaleY),
top: round$1(rect.top / scaleY),
right: round$1(rect.right / scaleX),
bottom: round$1(rect.bottom / scaleY),
left: round$1(rect.left / scaleX),
x: round$1(rect.left / scaleX),
y: round$1(rect.top / scaleY)
width: rect.width / scaleX,
height: rect.height / scaleY,
top: rect.top / scaleY,
right: rect.right / scaleX,
bottom: rect.bottom / scaleY,
left: rect.left / scaleX,
x: rect.left / scaleX,
y: rect.top / scaleY
};
}
@ -2347,7 +2359,7 @@
} // eslint-disable-next-line import/no-unused-modules
var arrow$1 = {
const arrow$1 = {
name: 'arrow',
enabled: true,
phase: 'main',
@ -2357,6 +2369,10 @@
requiresIfExists: ['preventOverflow']
};
function getVariation(placement) {
return placement.split('-')[1];
}
var unsetSides = {
top: 'auto',
right: 'auto',
@ -2383,6 +2399,7 @@
var popper = _ref2.popper,
popperRect = _ref2.popperRect,
placement = _ref2.placement,
variation = _ref2.variation,
offsets = _ref2.offsets,
position = _ref2.position,
gpuAcceleration = _ref2.gpuAcceleration,
@ -2409,7 +2426,7 @@
if (offsetParent === getWindow(popper)) {
offsetParent = getDocumentElement(popper);
if (getComputedStyle$1(offsetParent).position !== 'static') {
if (getComputedStyle$1(offsetParent).position !== 'static' && position === 'absolute') {
heightProp = 'scrollHeight';
widthProp = 'scrollWidth';
}
@ -2418,14 +2435,14 @@
offsetParent = offsetParent;
if (placement === top) {
if (placement === top || (placement === left || placement === right) && variation === end) {
sideY = bottom; // $FlowFixMe[prop-missing]
y -= offsetParent[heightProp] - popperRect.height;
y *= gpuAcceleration ? 1 : -1;
}
if (placement === left) {
if (placement === left || (placement === top || placement === bottom) && variation === end) {
sideX = right; // $FlowFixMe[prop-missing]
x -= offsetParent[widthProp] - popperRect.width;
@ -2440,7 +2457,7 @@
if (gpuAcceleration) {
var _Object$assign;
return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) < 2 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign));
return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign));
}
return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
@ -2458,6 +2475,7 @@
var commonStyles = {
placement: getBasePlacement(state.placement),
variation: getVariation(state.placement),
popper: state.elements.popper,
popperRect: state.rects.popper,
gpuAcceleration: gpuAcceleration
@ -2487,7 +2505,7 @@
} // eslint-disable-next-line import/no-unused-modules
var computeStyles$1 = {
const computeStyles$1 = {
name: 'computeStyles',
enabled: true,
phase: 'beforeWrite',
@ -2534,7 +2552,7 @@
} // eslint-disable-next-line import/no-unused-modules
var eventListeners = {
const eventListeners = {
name: 'eventListeners',
enabled: true,
phase: 'write',
@ -2760,10 +2778,6 @@
return clippingRect;
}
function getVariation(placement) {
return placement.split('-')[1];
}
function computeOffsets(_ref) {
var reference = _ref.reference,
element = _ref.element,
@ -2849,11 +2863,10 @@
padding = _options$padding === void 0 ? 0 : _options$padding;
var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
var altContext = elementContext === popper ? reference : popper;
var referenceElement = state.elements.reference;
var popperRect = state.rects.popper;
var element = state.elements[altBoundary ? altContext : elementContext];
var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);
var referenceClientRect = getBoundingClientRect(referenceElement);
var referenceClientRect = getBoundingClientRect(state.elements.reference);
var popperOffsets = computeOffsets({
reference: referenceClientRect,
element: popperRect,
@ -3053,7 +3066,7 @@
} // eslint-disable-next-line import/no-unused-modules
var flip$1 = {
const flip$1 = {
name: 'flip',
enabled: true,
phase: 'main',
@ -3115,7 +3128,7 @@
} // eslint-disable-next-line import/no-unused-modules
var hide$1 = {
const hide$1 = {
name: 'hide',
enabled: true,
phase: 'main',
@ -3167,7 +3180,7 @@
} // eslint-disable-next-line import/no-unused-modules
var offset$1 = {
const offset$1 = {
name: 'offset',
enabled: true,
phase: 'main',
@ -3191,7 +3204,7 @@
} // eslint-disable-next-line import/no-unused-modules
var popperOffsets$1 = {
const popperOffsets$1 = {
name: 'popperOffsets',
enabled: true,
phase: 'read',
@ -3307,7 +3320,7 @@
} // eslint-disable-next-line import/no-unused-modules
var preventOverflow$1 = {
const preventOverflow$1 = {
name: 'preventOverflow',
enabled: true,
phase: 'main',
@ -3345,9 +3358,9 @@
}
var isOffsetParentAnElement = isHTMLElement(offsetParent);
var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
isHTMLElement(offsetParent) && isElementScaled(offsetParent);
var documentElement = getDocumentElement(offsetParent);
var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
var rect = getBoundingClientRect(elementOrVirtualElement);
var scroll = {
scrollLeft: 0,
scrollTop: 0
@ -3364,7 +3377,7 @@
}
if (isHTMLElement(offsetParent)) {
offsets = getBoundingClientRect(offsetParent, true);
offsets = getBoundingClientRect(offsetParent);
offsets.x += offsetParent.clientLeft;
offsets.y += offsetParent.clientTop;
} else if (documentElement) {
@ -3501,7 +3514,8 @@
var isDestroyed = false;
var instance = {
state: state,
setOptions: function setOptions(options) {
setOptions: function setOptions(setOptionsAction) {
var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;
cleanupModifierEffects();
state.options = Object.assign({}, defaultOptions, state.options, options);
state.scrollParents = {
@ -3656,41 +3670,41 @@
defaultModifiers: defaultModifiers
}); // eslint-disable-next-line import/no-unused-modules
var Popper = /*#__PURE__*/Object.freeze({
const Popper = /*#__PURE__*/Object.freeze({
__proto__: null,
popperGenerator: popperGenerator,
detectOverflow: detectOverflow,
popperGenerator,
detectOverflow,
createPopperBase: createPopper$2,
createPopper: createPopper,
createPopper,
createPopperLite: createPopper$1,
top: top,
bottom: bottom,
right: right,
left: left,
auto: auto,
basePlacements: basePlacements,
start: start,
end: end,
clippingParents: clippingParents,
viewport: viewport,
popper: popper,
reference: reference,
variationPlacements: variationPlacements,
placements: placements,
beforeRead: beforeRead,
read: read,
afterRead: afterRead,
beforeMain: beforeMain,
main: main,
afterMain: afterMain,
beforeWrite: beforeWrite,
write: write,
afterWrite: afterWrite,
modifierPhases: modifierPhases,
top,
bottom,
right,
left,
auto,
basePlacements,
start,
end,
clippingParents,
viewport,
popper,
reference,
variationPlacements,
placements,
beforeRead,
read,
afterRead,
beforeMain,
main,
afterMain,
beforeWrite,
write,
afterWrite,
modifierPhases,
applyStyles: applyStyles$1,
arrow: arrow$1,
computeStyles: computeStyles$1,
eventListeners: eventListeners,
eventListeners,
flip: flip$1,
hide: hide$1,
offset: offset$1,
@ -3700,7 +3714,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): dropdown.js
* Bootstrap (v5.1.3): dropdown.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@ -4162,7 +4176,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): util/scrollBar.js
* Bootstrap (v5.1.3): util/scrollBar.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@ -4266,8 +4280,8 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): util/backdrop.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Bootstrap (v5.1.3): util/backdrop.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const Default$7 = {
@ -4390,8 +4404,8 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): util/focustrap.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Bootstrap (v5.1.3): util/focustrap.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const Default$6 = {
@ -4493,7 +4507,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): modal.js
* Bootstrap (v5.1.3): modal.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@ -4533,6 +4547,7 @@
const CLASS_NAME_FADE$3 = 'fade';
const CLASS_NAME_SHOW$4 = 'show';
const CLASS_NAME_STATIC = 'modal-static';
const OPEN_SELECTOR$1 = '.modal.show';
const SELECTOR_DIALOG = '.modal-dialog';
const SELECTOR_MODAL_BODY = '.modal-body';
const SELECTOR_DATA_TOGGLE$2 = '[data-bs-toggle="modal"]';
@ -4898,7 +4913,14 @@
this.focus();
}
});
});
}); // avoid conflict when clicking moddal toggler while another one is open
const allReadyOpen = SelectorEngine.findOne(OPEN_SELECTOR$1);
if (allReadyOpen) {
Modal.getInstance(allReadyOpen).hide();
}
const data = Modal.getOrCreateInstance(target);
data.toggle(this);
});
@ -4914,8 +4936,8 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): offcanvas.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Bootstrap (v5.1.3): offcanvas.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
/**
@ -5170,42 +5192,42 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): util/sanitizer.js
* Bootstrap (v5.1.3): util/sanitizer.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const uriAttrs = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);
const uriAttributes = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);
const ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
/**
* A pattern that recognizes a commonly useful subset of URLs that are safe.
*
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
* Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
*/
const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/i;
const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i;
/**
* A pattern that matches safe data URLs. Only matches image, video and audio types.
*
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
* Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
*/
const DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;
const allowedAttribute = (attr, allowedAttributeList) => {
const attrName = attr.nodeName.toLowerCase();
const allowedAttribute = (attribute, allowedAttributeList) => {
const attributeName = attribute.nodeName.toLowerCase();
if (allowedAttributeList.includes(attrName)) {
if (uriAttrs.has(attrName)) {
return Boolean(SAFE_URL_PATTERN.test(attr.nodeValue) || DATA_URL_PATTERN.test(attr.nodeValue));
if (allowedAttributeList.includes(attributeName)) {
if (uriAttributes.has(attributeName)) {
return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue) || DATA_URL_PATTERN.test(attribute.nodeValue));
}
return true;
}
const regExp = allowedAttributeList.filter(attrRegex => attrRegex instanceof RegExp); // Check if a regular expression validates the attribute.
const regExp = allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp); // Check if a regular expression validates the attribute.
for (let i = 0, len = regExp.length; i < len; i++) {
if (regExp[i].test(attrName)) {
if (regExp[i].test(attributeName)) {
return true;
}
}
@ -5257,23 +5279,22 @@
const domParser = new window.DOMParser();
const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
const allowlistKeys = Object.keys(allowList);
const elements = [].concat(...createdDocument.body.querySelectorAll('*'));
for (let i = 0, len = elements.length; i < len; i++) {
const el = elements[i];
const elName = el.nodeName.toLowerCase();
const element = elements[i];
const elementName = element.nodeName.toLowerCase();
if (!allowlistKeys.includes(elName)) {
el.remove();
if (!Object.keys(allowList).includes(elementName)) {
element.remove();
continue;
}
const attributeList = [].concat(...el.attributes);
const allowedAttributes = [].concat(allowList['*'] || [], allowList[elName] || []);
attributeList.forEach(attr => {
if (!allowedAttribute(attr, allowedAttributes)) {
el.removeAttribute(attr.nodeName);
const attributeList = [].concat(...element.attributes);
const allowedAttributes = [].concat(allowList['*'] || [], allowList[elementName] || []);
attributeList.forEach(attribute => {
if (!allowedAttribute(attribute, allowedAttributes)) {
element.removeAttribute(attribute.nodeName);
}
});
}
@ -5283,7 +5304,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): tooltip.js
* Bootstrap (v5.1.3): tooltip.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@ -5457,9 +5478,7 @@
this.tip.remove();
}
if (this._popper) {
this._popper.destroy();
}
this._disposePopper();
super.dispose();
}
@ -5479,6 +5498,15 @@
if (showEvent.defaultPrevented || !isInTheDom) {
return;
} // A trick to recreate a tooltip in case a new title is given by using the NOT documented `data-bs-original-title`
// This will be removed later in favor of a `setContent` method
if (this.constructor.NAME === 'tooltip' && this.tip && this.getTitle() !== this.tip.querySelector(SELECTOR_TOOLTIP_INNER).innerHTML) {
this._disposePopper();
this.tip.remove();
this.tip = null;
}
const tip = this.getTipElement();
@ -5568,11 +5596,7 @@
EventHandler.trigger(this._element, this.constructor.Event.HIDDEN);
if (this._popper) {
this._popper.destroy();
this._popper = null;
}
this._disposePopper();
};
const hideEvent = EventHandler.trigger(this._element, this.constructor.Event.HIDE);
@ -5952,6 +5976,14 @@
this._cleanTipClass();
this._addAttachmentClass(this._getAttachment(state.placement));
}
_disposePopper() {
if (this._popper) {
this._popper.destroy();
this._popper = null;
}
} // Static
@ -5982,7 +6014,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): popover.js
* Bootstrap (v5.1.3): popover.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@ -6092,7 +6124,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): scrollspy.js
* Bootstrap (v5.1.3): scrollspy.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@ -6327,7 +6359,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): tab.js
* Bootstrap (v5.1.3): tab.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@ -6525,7 +6557,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): toast.js
* Bootstrap (v5.1.3): toast.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@ -6755,11 +6787,11 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): index.umd.js
* Bootstrap (v5.1.3): index.umd.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
var index_umd = {
const index_umd = {
Alert,
Button,
Carousel,
@ -6776,5 +6808,5 @@
return index_umd;
})));
}));
//# sourceMappingURL=bootstrap.bundle.js.map

2
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/bootstrap/js/bootstrap.bundle.js.map

File diff suppressed because one or more lines are too long

4
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/bootstrap/js/bootstrap.bundle.min.js

File diff suppressed because one or more lines are too long

2
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/bootstrap/js/bootstrap.bundle.min.js.map

File diff suppressed because one or more lines are too long

212
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/datatables.net-bs4/css/dataTables.bootstrap4.css

@ -1,212 +0,0 @@
table.dataTable {
clear: both;
margin-top: 6px !important;
margin-bottom: 6px !important;
max-width: none !important;
border-collapse: separate !important;
border-spacing: 0;
}
table.dataTable td,
table.dataTable th {
-webkit-box-sizing: content-box;
box-sizing: content-box;
}
table.dataTable td.dataTables_empty,
table.dataTable th.dataTables_empty {
text-align: center;
}
table.dataTable.nowrap th,
table.dataTable.nowrap td {
white-space: nowrap;
}
div.dataTables_wrapper div.dataTables_length label {
font-weight: normal;
text-align: left;
white-space: nowrap;
}
div.dataTables_wrapper div.dataTables_length select {
width: auto;
display: inline-block;
}
div.dataTables_wrapper div.dataTables_filter {
text-align: right;
}
div.dataTables_wrapper div.dataTables_filter label {
font-weight: normal;
white-space: nowrap;
text-align: left;
}
div.dataTables_wrapper div.dataTables_filter input {
margin-left: 0.5em;
display: inline-block;
width: auto;
}
div.dataTables_wrapper div.dataTables_info {
padding-top: 0.85em;
white-space: nowrap;
}
div.dataTables_wrapper div.dataTables_paginate {
margin: 0;
white-space: nowrap;
text-align: right;
}
div.dataTables_wrapper div.dataTables_paginate ul.pagination {
margin: 2px 0;
white-space: nowrap;
justify-content: flex-end;
}
div.dataTables_wrapper div.dataTables_processing {
position: absolute;
top: 50%;
left: 50%;
width: 200px;
margin-left: -100px;
margin-top: -26px;
text-align: center;
padding: 1em 0;
}
table.dataTable thead > tr > th.sorting_asc, table.dataTable thead > tr > th.sorting_desc, table.dataTable thead > tr > th.sorting,
table.dataTable thead > tr > td.sorting_asc,
table.dataTable thead > tr > td.sorting_desc,
table.dataTable thead > tr > td.sorting {
padding-right: 30px;
}
table.dataTable thead > tr > th:active,
table.dataTable thead > tr > td:active {
outline: none;
}
table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc,
table.dataTable thead .sorting_asc_disabled,
table.dataTable thead .sorting_desc_disabled {
cursor: pointer;
position: relative;
}
table.dataTable thead .sorting:before, table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:before,
table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:before,
table.dataTable thead .sorting_desc:after,
table.dataTable thead .sorting_asc_disabled:before,
table.dataTable thead .sorting_asc_disabled:after,
table.dataTable thead .sorting_desc_disabled:before,
table.dataTable thead .sorting_desc_disabled:after {
position: absolute;
bottom: 0.9em;
display: block;
opacity: 0.3;
}
table.dataTable thead .sorting:before,
table.dataTable thead .sorting_asc:before,
table.dataTable thead .sorting_desc:before,
table.dataTable thead .sorting_asc_disabled:before,
table.dataTable thead .sorting_desc_disabled:before {
right: 1em;
content: "\2191";
}
table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:after,
table.dataTable thead .sorting_asc_disabled:after,
table.dataTable thead .sorting_desc_disabled:after {
right: 0.5em;
content: "\2193";
}
table.dataTable thead .sorting_asc:before,
table.dataTable thead .sorting_desc:after {
opacity: 1;
}
table.dataTable thead .sorting_asc_disabled:before,
table.dataTable thead .sorting_desc_disabled:after {
opacity: 0;
}
div.dataTables_scrollHead table.dataTable {
margin-bottom: 0 !important;
}
div.dataTables_scrollBody table {
border-top: none;
margin-top: 0 !important;
margin-bottom: 0 !important;
}
div.dataTables_scrollBody table thead .sorting:before,
div.dataTables_scrollBody table thead .sorting_asc:before,
div.dataTables_scrollBody table thead .sorting_desc:before,
div.dataTables_scrollBody table thead .sorting:after,
div.dataTables_scrollBody table thead .sorting_asc:after,
div.dataTables_scrollBody table thead .sorting_desc:after {
display: none;
}
div.dataTables_scrollBody table tbody tr:first-child th,
div.dataTables_scrollBody table tbody tr:first-child td {
border-top: none;
}
div.dataTables_scrollFoot > .dataTables_scrollFootInner {
box-sizing: content-box;
}
div.dataTables_scrollFoot > .dataTables_scrollFootInner > table {
margin-top: 0 !important;
border-top: none;
}
@media screen and (max-width: 767px) {
div.dataTables_wrapper div.dataTables_length,
div.dataTables_wrapper div.dataTables_filter,
div.dataTables_wrapper div.dataTables_info,
div.dataTables_wrapper div.dataTables_paginate {
text-align: center;
}
div.dataTables_wrapper div.dataTables_paginate ul.pagination {
justify-content: center !important;
}
}
table.dataTable.table-sm > thead > tr > th :not(.sorting_disabled) {
padding-right: 20px;
}
table.dataTable.table-sm .sorting:before,
table.dataTable.table-sm .sorting_asc:before,
table.dataTable.table-sm .sorting_desc:before {
top: 5px;
right: 0.85em;
}
table.dataTable.table-sm .sorting:after,
table.dataTable.table-sm .sorting_asc:after,
table.dataTable.table-sm .sorting_desc:after {
top: 5px;
}
table.table-bordered.dataTable {
border-right-width: 0;
}
table.table-bordered.dataTable th,
table.table-bordered.dataTable td {
border-left-width: 0;
}
table.table-bordered.dataTable th:last-child, table.table-bordered.dataTable th:last-child,
table.table-bordered.dataTable td:last-child,
table.table-bordered.dataTable td:last-child {
border-right-width: 1px;
}
table.table-bordered.dataTable tbody th,
table.table-bordered.dataTable tbody td {
border-bottom-width: 0;
}
div.dataTables_scrollHead table.table-bordered {
border-bottom-width: 0;
}
div.table-responsive > div.dataTables_wrapper > div.row {
margin: 0;
}
div.table-responsive > div.dataTables_wrapper > div.row > div[class^="col-"]:first-child {
padding-left: 0;
}
div.table-responsive > div.dataTables_wrapper > div.row > div[class^="col-"]:last-child {
padding-right: 0;
}

184
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/datatables.net-bs4/js/dataTables.bootstrap4.js

@ -1,184 +0,0 @@
/*! DataTables Bootstrap 4 integration
* ©2011-2017 SpryMedia Ltd - datatables.net/license
*/
/**
* DataTables integration for Bootstrap 4. This requires Bootstrap 4 and
* DataTables 1.10 or newer.
*
* This file sets the defaults and adds options to DataTables to style its
* controls using Bootstrap. See http://datatables.net/manual/styling/bootstrap
* for further information.
*/
(function( factory ){
if ( typeof define === 'function' && define.amd ) {
// AMD
define( ['jquery', 'datatables.net'], function ( $ ) {
return factory( $, window, document );
} );
}
else if ( typeof exports === 'object' ) {
// CommonJS
module.exports = function (root, $) {
if ( ! root ) {
root = window;
}
if ( ! $ || ! $.fn.dataTable ) {
// Require DataTables, which attaches to jQuery, including
// jQuery if needed and have a $ property so we can access the
// jQuery object that is used
$ = require('datatables.net')(root, $).$;
}
return factory( $, root, root.document );
};
}
else {
// Browser
factory( jQuery, window, document );
}
}(function( $, window, document, undefined ) {
'use strict';
var DataTable = $.fn.dataTable;
/* Set the defaults for DataTables initialisation */
$.extend( true, DataTable.defaults, {
dom:
"<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6'f>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
renderer: 'bootstrap'
} );
/* Default class modification */
$.extend( DataTable.ext.classes, {
sWrapper: "dataTables_wrapper dt-bootstrap4",
sFilterInput: "form-control form-control-sm",
sLengthSelect: "custom-select custom-select-sm form-control form-control-sm",
sProcessing: "dataTables_processing card",
sPageButton: "paginate_button page-item"
} );
/* Bootstrap paging button renderer */
DataTable.ext.renderer.pageButton.bootstrap = function ( settings, host, idx, buttons, page, pages ) {
var api = new DataTable.Api( settings );
var classes = settings.oClasses;
var lang = settings.oLanguage.oPaginate;
var aria = settings.oLanguage.oAria.paginate || {};
var btnDisplay, btnClass, counter=0;
var attach = function( container, buttons ) {
var i, ien, node, button;
var clickHandler = function ( e ) {
e.preventDefault();
if ( !$(e.currentTarget).hasClass('disabled') && api.page() != e.data.action ) {
api.page( e.data.action ).draw( 'page' );
}
};
for ( i=0, ien=buttons.length ; i<ien ; i++ ) {
button = buttons[i];
if ( $.isArray( button ) ) {
attach( container, button );
}
else {
btnDisplay = '';
btnClass = '';
switch ( button ) {
case 'ellipsis':
btnDisplay = '&#x2026;';
btnClass = 'disabled';
break;
case 'first':
btnDisplay = lang.sFirst;
btnClass = button + (page > 0 ?
'' : ' disabled');
break;
case 'previous':
btnDisplay = lang.sPrevious;
btnClass = button + (page > 0 ?
'' : ' disabled');
break;
case 'next':
btnDisplay = lang.sNext;
btnClass = button + (page < pages-1 ?
'' : ' disabled');
break;
case 'last':
btnDisplay = lang.sLast;
btnClass = button + (page < pages-1 ?
'' : ' disabled');
break;
default:
btnDisplay = button + 1;
btnClass = page === button ?
'active' : '';
break;
}
if ( btnDisplay ) {
node = $('<li>', {
'class': classes.sPageButton+' '+btnClass,
'id': idx === 0 && typeof button === 'string' ?
settings.sTableId +'_'+ button :
null
} )
.append( $('<a>', {
'href': '#',
'aria-controls': settings.sTableId,
'aria-label': aria[ button ],
'data-dt-idx': counter,
'tabindex': settings.iTabIndex,
'class': 'page-link'
} )
.html( btnDisplay )
)
.appendTo( container );
settings.oApi._fnBindAction(
node, {action: button}, clickHandler
);
counter++;
}
}
}
};
// IE9 throws an 'unknown error' if document.activeElement is used
// inside an iframe or frame.
var activeEl;
try {
// Because this approach is destroying and recreating the paging
// elements, focus is lost on the select button which is bad for
// accessibility. So we want to restore focus once the draw has
// completed
activeEl = $(host).find(document.activeElement).data('dt-idx');
}
catch (e) {}
attach(
$(host).empty().html('<ul class="pagination"/>').children('ul'),
buttons
);
if ( activeEl !== undefined ) {
$(host).find( '[data-dt-idx='+activeEl+']' ).trigger('focus');
}
};
return DataTable;
}));

106
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/datatables.net-bs5/css/dataTables.bootstrap5.css

@ -1,4 +1,85 @@
@charset "UTF-8";
td.dt-control {
background: url("https://www.datatables.net/examples/resources/details_open.png") no-repeat center center;
cursor: pointer;
}
tr.dt-hasChild td.dt-control {
background: url("https://www.datatables.net/examples/resources/details_close.png") no-repeat center center;
}
table.dataTable th.dt-left,
table.dataTable td.dt-left {
text-align: left;
}
table.dataTable th.dt-center,
table.dataTable td.dt-center,
table.dataTable td.dataTables_empty {
text-align: center;
}
table.dataTable th.dt-right,
table.dataTable td.dt-right {
text-align: right;
}
table.dataTable th.dt-justify,
table.dataTable td.dt-justify {
text-align: justify;
}
table.dataTable th.dt-nowrap,
table.dataTable td.dt-nowrap {
white-space: nowrap;
}
table.dataTable thead th.dt-head-left,
table.dataTable thead td.dt-head-left,
table.dataTable tfoot th.dt-head-left,
table.dataTable tfoot td.dt-head-left {
text-align: left;
}
table.dataTable thead th.dt-head-center,
table.dataTable thead td.dt-head-center,
table.dataTable tfoot th.dt-head-center,
table.dataTable tfoot td.dt-head-center {
text-align: center;
}
table.dataTable thead th.dt-head-right,
table.dataTable thead td.dt-head-right,
table.dataTable tfoot th.dt-head-right,
table.dataTable tfoot td.dt-head-right {
text-align: right;
}
table.dataTable thead th.dt-head-justify,
table.dataTable thead td.dt-head-justify,
table.dataTable tfoot th.dt-head-justify,
table.dataTable tfoot td.dt-head-justify {
text-align: justify;
}
table.dataTable thead th.dt-head-nowrap,
table.dataTable thead td.dt-head-nowrap,
table.dataTable tfoot th.dt-head-nowrap,
table.dataTable tfoot td.dt-head-nowrap {
white-space: nowrap;
}
table.dataTable tbody th.dt-body-left,
table.dataTable tbody td.dt-body-left {
text-align: left;
}
table.dataTable tbody th.dt-body-center,
table.dataTable tbody td.dt-body-center {
text-align: center;
}
table.dataTable tbody th.dt-body-right,
table.dataTable tbody td.dt-body-right {
text-align: right;
}
table.dataTable tbody th.dt-body-justify,
table.dataTable tbody td.dt-body-justify {
text-align: justify;
}
table.dataTable tbody th.dt-body-nowrap,
table.dataTable tbody td.dt-body-nowrap {
white-space: nowrap;
}
/*! Bootstrap 5 integration for DataTables
*
* ©2020 SpryMedia Ltd, all rights reserved.
@ -131,21 +212,21 @@ div.dataTables_scrollHead table.dataTable {
margin-bottom: 0 !important;
}
div.dataTables_scrollBody table {
div.dataTables_scrollBody > table {
border-top: none;
margin-top: 0 !important;
margin-bottom: 0 !important;
}
div.dataTables_scrollBody table thead .sorting:before,
div.dataTables_scrollBody table thead .sorting_asc:before,
div.dataTables_scrollBody table thead .sorting_desc:before,
div.dataTables_scrollBody table thead .sorting:after,
div.dataTables_scrollBody table thead .sorting_asc:after,
div.dataTables_scrollBody table thead .sorting_desc:after {
div.dataTables_scrollBody > table > thead .sorting:before,
div.dataTables_scrollBody > table > thead .sorting_asc:before,
div.dataTables_scrollBody > table > thead .sorting_desc:before,
div.dataTables_scrollBody > table > thead .sorting:after,
div.dataTables_scrollBody > table > thead .sorting_asc:after,
div.dataTables_scrollBody > table > thead .sorting_desc:after {
display: none;
}
div.dataTables_scrollBody table tbody tr:first-child th,
div.dataTables_scrollBody table tbody tr:first-child td {
div.dataTables_scrollBody > table > tbody tr:first-child th,
div.dataTables_scrollBody > table > tbody tr:first-child td {
border-top: none;
}
@ -222,3 +303,10 @@ div.table-responsive > div.dataTables_wrapper > div.row > div[class^=col-]:first
div.table-responsive > div.dataTables_wrapper > div.row > div[class^=col-]:last-child {
padding-right: 0;
}
table.dataTable.table-striped > tbody > tr:nth-of-type(2n+1) {
--bs-table-accent-bg: transparent;
}
table.dataTable.table-striped > tbody > tr.odd {
--bs-table-accent-bg: var(--bs-table-striped-bg);
}

1178
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/datatables.net/js/jquery.dataTables.js

File diff suppressed because it is too large

6
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/select2/js/select2-bootstrap-modal-patch.js

@ -1,6 +0,0 @@
/*
https://select2.org/troubleshooting/common-problems
*/
if ($.fn.modal) {
$.fn.modal.Constructor.prototype._enforceFocus = function () { };
}

1
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/sweetalert/sweetalert.min.js

File diff suppressed because one or more lines are too long

2672
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/sweetalert2/sweetalert2.all.js

File diff suppressed because one or more lines are too long

4
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/sweetalert2/sweetalert2.all.min.js

File diff suppressed because one or more lines are too long

119
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/sweetalert2/sweetalert2.css

@ -6,14 +6,14 @@
padding: 1em;
overflow-y: hidden;
background: #fff;
box-shadow: 0 0 0.625em #d9d9d9;
box-shadow: 0 0 1px rgba(0, 0, 0, 0.075), 0 1px 2px rgba(0, 0, 0, 0.075), 1px 2px 4px rgba(0, 0, 0, 0.075), 1px 3px 8px rgba(0, 0, 0, 0.075), 2px 4px 16px rgba(0, 0, 0, 0.075);
pointer-events: all;
}
.swal2-popup.swal2-toast > * {
grid-column: 2;
}
.swal2-popup.swal2-toast .swal2-title {
margin: 1em;
margin: 0.5em 1em;
padding: 0;
font-size: 1em;
text-align: initial;
@ -44,7 +44,7 @@
font-size: 2em;
}
.swal2-popup.swal2-toast .swal2-html-container {
margin: 1em;
margin: 0.5em 1em;
padding: 0;
font-size: 1em;
text-align: initial;
@ -93,17 +93,14 @@
justify-content: flex-start;
height: auto;
margin: 0;
margin-top: 0.3125em;
padding: 0;
margin-top: 0.5em;
padding: 0 0.5em;
}
.swal2-popup.swal2-toast .swal2-styled {
margin: 0.25em 0.5em;
padding: 0.4em 0.6em;
font-size: 1em;
}
.swal2-popup.swal2-toast .swal2-styled:focus {
box-shadow: 0 0 0 1px #fff, 0 0 0 3px rgba(100, 150, 200, 0.5);
}
.swal2-popup.swal2-toast .swal2-success {
border-color: #a5dc86;
}
@ -285,7 +282,7 @@
max-width: 100%;
margin: 0;
padding: 0.8em 1em 0;
color: #595959;
color: inherit;
font-size: 1.875em;
font-weight: 600;
text-align: center;
@ -343,34 +340,34 @@
border: 0;
border-radius: 0.25em;
background: initial;
background-color: #7367f0;
background-color: #7066e0;
color: #fff;
font-size: 1em;
}
.swal2-styled.swal2-confirm:focus {
box-shadow: 0 0 0 3px rgba(115, 103, 240, 0.5);
box-shadow: 0 0 0 3px rgba(112, 102, 224, 0.5);
}
.swal2-styled.swal2-deny {
border: 0;
border-radius: 0.25em;
background: initial;
background-color: #ea5455;
background-color: #dc3741;
color: #fff;
font-size: 1em;
}
.swal2-styled.swal2-deny:focus {
box-shadow: 0 0 0 3px rgba(234, 84, 85, 0.5);
box-shadow: 0 0 0 3px rgba(220, 55, 65, 0.5);
}
.swal2-styled.swal2-cancel {
border: 0;
border-radius: 0.25em;
background: initial;
background-color: #6e7d88;
background-color: #6e7881;
color: #fff;
font-size: 1em;
}
.swal2-styled.swal2-cancel:focus {
box-shadow: 0 0 0 3px rgba(110, 125, 136, 0.5);
box-shadow: 0 0 0 3px rgba(110, 120, 129, 0.5);
}
.swal2-styled.swal2-default-outline:focus {
box-shadow: 0 0 0 3px rgba(100, 150, 200, 0.5);
@ -387,7 +384,7 @@
margin: 1em 0 0;
padding: 1em 1em 0;
border-top: 1px solid #eee;
color: #545454;
color: inherit;
font-size: 1em;
}
@ -455,7 +452,7 @@
margin: 1em 1.6em 0.3em;
padding: 0;
overflow: auto;
color: #545454;
color: inherit;
font-size: 1.125em;
font-weight: normal;
line-height: normal;
@ -470,7 +467,7 @@
.swal2-select,
.swal2-radio,
.swal2-checkbox {
margin: 1em 2em 0;
margin: 1em 2em 3px;
}
.swal2-input,
@ -512,7 +509,7 @@
}
.swal2-range {
margin: 1em 2em 0;
margin: 1em 2em 3px;
background: #fff;
}
.swal2-range input {
@ -669,14 +666,38 @@
border-color: #facea8;
color: #f8bb86;
}
.swal2-icon.swal2-warning.swal2-icon-show {
-webkit-animation: swal2-animate-error-icon 0.5s;
animation: swal2-animate-error-icon 0.5s;
}
.swal2-icon.swal2-warning.swal2-icon-show .swal2-icon-content {
-webkit-animation: swal2-animate-i-mark 0.5s;
animation: swal2-animate-i-mark 0.5s;
}
.swal2-icon.swal2-info {
border-color: #9de0f6;
color: #3fc3ee;
}
.swal2-icon.swal2-info.swal2-icon-show {
-webkit-animation: swal2-animate-error-icon 0.5s;
animation: swal2-animate-error-icon 0.5s;
}
.swal2-icon.swal2-info.swal2-icon-show .swal2-icon-content {
-webkit-animation: swal2-animate-i-mark 0.8s;
animation: swal2-animate-i-mark 0.8s;
}
.swal2-icon.swal2-question {
border-color: #c9dae1;
color: #87adbd;
}
.swal2-icon.swal2-question.swal2-icon-show {
-webkit-animation: swal2-animate-error-icon 0.5s;
animation: swal2-animate-error-icon 0.5s;
}
.swal2-icon.swal2-question.swal2-icon-show .swal2-icon-content {
-webkit-animation: swal2-animate-question-mark 0.8s;
animation: swal2-animate-question-mark 0.8s;
}
.swal2-icon.swal2-success {
border-color: #a5dc86;
color: #a5dc86;
@ -1224,6 +1245,66 @@
transform: rotate(360deg);
}
}
@-webkit-keyframes swal2-animate-question-mark {
0% {
transform: rotateY(-360deg);
}
100% {
transform: rotateY(0);
}
}
@keyframes swal2-animate-question-mark {
0% {
transform: rotateY(-360deg);
}
100% {
transform: rotateY(0);
}
}
@-webkit-keyframes swal2-animate-i-mark {
0% {
transform: rotateZ(45deg);
opacity: 0;
}
25% {
transform: rotateZ(-25deg);
opacity: 0.4;
}
50% {
transform: rotateZ(15deg);
opacity: 0.8;
}
75% {
transform: rotateZ(-5deg);
opacity: 1;
}
100% {
transform: rotateX(0);
opacity: 1;
}
}
@keyframes swal2-animate-i-mark {
0% {
transform: rotateZ(45deg);
opacity: 0;
}
25% {
transform: rotateZ(-25deg);
opacity: 0.4;
}
50% {
transform: rotateZ(15deg);
opacity: 0.8;
}
75% {
transform: rotateZ(-5deg);
opacity: 1;
}
100% {
transform: rotateX(0);
opacity: 1;
}
}
body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) {
overflow: hidden;
}

2670
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/wwwroot/libs/sweetalert2/sweetalert2.js

File diff suppressed because it is too large

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save