' +
@@ -433,13 +441,13 @@
return '';
}
-
+
function createInitialAbpDate(date, options) {
date = convertToMoment(date, options, undefined, options.isUtc);
if (options.isUtc) {
date = date.local();
}
-
+
return AbpDate(date, options);
}
@@ -468,8 +476,9 @@
var singleOpenAndClearButton = options.singleOpenAndClearButton && $clearButton.length > 0 && $openButton.length > 0;
var startDate = createInitialAbpDate(options.startDate || options.date || (options.autoUpdateInput ? new Date() : undefined), options);
+
var oldStartDate = AbpDate(undefined, options);
-
+
var endDate = createInitialAbpDate(options.endDate || (options.autoUpdateInput ? new Date() : undefined), options);
var oldEndDate = AbpDate(undefined, options);
@@ -544,6 +553,10 @@
triggerDateChange($input, startDate, isDateRangePickerTrigger);
}
}
+
+ if(isTrigger || isInputTrigger || isDateRangePickerTrigger){
+ triggerValidation();
+ }
}
function setDataDates(date, $selfInput, prefix){
@@ -553,6 +566,25 @@
$input.data(prefix + 'date', date);
}
+ function triggerValidation() {
+ checkValidity($startDateInput);
+ checkValidity($endDateInput);
+ checkValidity($dateInput);
+ checkValidity($input);
+ }
+
+ function checkValidity($selfInput) {
+ if (!$selfInput) {
+ return;
+ }
+
+ if($selfInput.closest('form').length === 0) {
+ return;
+ }
+
+ $selfInput.valid();
+ }
+
function triggerDateChange($selfInput, value, isDateRangePickerTrigger) {
$selfInput.trigger('change');
if(isDateRangePickerTrigger !== false){
@@ -583,7 +615,7 @@
}else{
picker.setStartDate(convertToMoment(startDate, options, options.inputDateFormat));
}
-
+
if(singleDatePicker){
picker.setEndDate(picker.startDate);
}else if(isEmptyDate(endDate, options)){
diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/ChangeThemeStep.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/ChangeThemeStep.cs
index b6408fb3e2..4a88ada34a 100644
--- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/ChangeThemeStep.cs
+++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/ChangeThemeStep.cs
@@ -372,7 +372,7 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
return;
}
- lines[lineIndex] = lines[lineIndex].Replace(lines[lineIndex], $"\t
");
+ lines[lineIndex] = lines[lineIndex].Replace(lines[lineIndex], $"\t\t
\n");
file.SetLines(lines);
}
@@ -568,7 +568,7 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
private static void ChangeThemeToBasicForMvcProjects(ProjectBuildContext context, string defaultThemeName)
{
var projectNames = new[]
-{
+ {
".Web", ".HttpApi.Host", ".AuthServer", ".Web.Public", ".Web.Public.Host",
"" //for app-nolayers-mvc
};
@@ -608,45 +608,46 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
{
var projects = new Dictionary
{
- {"Blazor", "MyProjectNameBlazorModule"},
- {"Blazor.Server.Tiered", "MyProjectNameBlazorModule"},
- {"Blazor.Server", "MyProjectNameModule"},
- {"Blazor.Server.Mongo", "MyProjectNameModule"}
+ {".Blazor", "MyProjectNameBlazorModule"},
+ {".Blazor.Server.Tiered", "MyProjectNameBlazorModule"},
+ {".Blazor.Server", "MyProjectNameModule"},
+ {"Blazor.Server.Mongo", "MyProjectNameModule"},
+ {"", ""} //for app-nolayers blazor-server
};
foreach (var project in projects)
{
ReplacePackageReferenceWithProjectReference(
context,
- $"/MyCompanyName.MyProjectName.{project.Key}/MyCompanyName.MyProjectName.{project.Key}.csproj",
- $"Volo.Abp.AspNetCore.Components.Server.{defaultThemeName}Theme",
- @"..\..\..\..\..\modules\basic-theme\src\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj"
+ $"/MyCompanyName.MyProjectName{project.Key}/MyCompanyName.MyProjectName{project.Key}.csproj",
+ $"Volo.Abp.AspNetCore.Components.Server.{defaultThemeName}",
+ @"..\..\..\..\..\modules\basic-theme\src\Volo.Abp.AspNetCore.Components.Server.BasicTheme\Volo.Abp.AspNetCore.Components.Server.BasicTheme.csproj"
);
ReplacePackageReferenceWithProjectReference(
context,
- $"/MyCompanyName.MyProjectName.{project.Key}/MyCompanyName.MyProjectName.{project.Key}.csproj",
+ $"/MyCompanyName.MyProjectName{project.Key}/MyCompanyName.MyProjectName{project.Key}.csproj",
$"Volo.Abp.AspNetCore.Mvc.UI.Theme.{defaultThemeName}",
- @"..\..\..\..\..\modules\basic-theme\src\Volo.Abp.AspNetCore.Components.Server.BasicTheme\Volo.Abp.AspNetCore.Components.Server.BasicTheme.csproj"
+ @"..\..\..\..\..\modules\basic-theme\src\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic\Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj"
);
ReplaceAllKeywords(
context,
- $"/MyCompanyName.MyProjectName.{project.Key}/Pages/_Host.cshtml",
+ $"/Pages/_Host.cshtml",
$"{defaultThemeName}Theme.Components",
Basic
);
ReplaceAllKeywords(
context,
- $"/MyCompanyName.MyProjectName.{project.Key}/{project.Value}.cs",
+ $"/MyCompanyName.MyProjectName{project.Key}/{project.Value}.cs",
defaultThemeName,
- Basic
+ Basic + "Theme"
);
ReplaceAllKeywords(
context,
- $"/MyCompanyName.MyProjectName.{project.Key}/Pages/_Host.cshtml",
+ $"/Pages/_Host.cshtml",
defaultThemeName,
Basic
);
@@ -682,7 +683,7 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
ReplaceAllKeywords(
context,
- $"/MyCompanyName.MyProjectName.{projectName}/Pages/_Host.cshtml",
+ $"/Pages/_Host.cshtml",
LeptonX,
Lepton
);
@@ -731,7 +732,7 @@ public class ChangeThemeStep : ProjectBuildPipelineStep
ReplaceAllKeywords(
context,
- $"/MyCompanyName.MyProjectName.{projectName}/Pages/_Host.cshtml",
+ $"/Pages/_Host.cshtml",
LeptonX,
Lepton
);
diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/AppNoLayersTemplateBase.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/AppNoLayersTemplateBase.cs
index 7bbba5c733..8b9df09ca5 100644
--- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/AppNoLayersTemplateBase.cs
+++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/AppNoLayersTemplateBase.cs
@@ -346,6 +346,7 @@ public abstract class AppNoLayersTemplateBase : TemplateInfo
var blazorServerUiPackageName = isProTemplate ? "@volo/aspnetcore.components.server.leptonxtheme" : "@abp/aspnetcore.components.server.leptonxlitetheme";
var blazorServerPackageJsonFilePaths = new List
{
+ "/MyCompanyName.MyProjectName/package.json",
"/MyCompanyName.MyProjectName.Blazor/package.json",
"/MyCompanyName.MyProjectName.Blazor.Server.Mongo/package.json"
};
diff --git a/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/ApplicationMenuExtensions.cs b/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/ApplicationMenuExtensions.cs
index 5a755f187a..c8ba277ccc 100644
--- a/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/ApplicationMenuExtensions.cs
+++ b/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/ApplicationMenuExtensions.cs
@@ -115,6 +115,11 @@ public static class ApplicationMenuExtensions
return menuWithGroups;
}
+ public static ApplicationMenuItem UseComponent(this ApplicationMenuItem applicationMenuItem)
+ {
+ return applicationMenuItem.UseComponent(typeof(TComponent));
+ }
+
public static ApplicationMenuItem UseComponent(this ApplicationMenuItem applicationMenuItem, Type componentType)
{
return applicationMenuItem.WithCustomData(CustomDataComponentKey, componentType);
diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Menu/Default.cshtml b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Menu/Default.cshtml
index f146878b0f..19471fecfd 100644
--- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Menu/Default.cshtml
+++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Menu/Default.cshtml
@@ -6,9 +6,15 @@
var cssClass = string.IsNullOrEmpty(menuItem.CssClass) ? string.Empty : menuItem.CssClass;
var disabled = menuItem.IsDisabled ? "disabled" : string.Empty;
var url = string.IsNullOrEmpty(menuItem.Url) ? "#" : Url.IsLocalUrl(menuItem.Url) ? Url.Content(menuItem.Url.EnsureStartsWith('~')) : menuItem.Url;
+ var customComponentType = menuItem.GetComponentTypeOrDefault();
+
if (menuItem.IsLeaf)
{
- if (menuItem.Url != null)
+ if (customComponentType != null)
+ {
+ @(await Component.InvokeAsync(customComponentType))
+ }
+ else if (menuItem.Url != null)
{
@@ -28,19 +34,26 @@
{
-
-
- @foreach (var childMenuItem in menuItem.Items)
- {
- @await Html.PartialAsync("~/Themes/Basic/Components/Menu/_MenuItem.cshtml", childMenuItem)
- }
-
+ @if (customComponentType != null)
+ {
+ @(await Component.InvokeAsync(customComponentType))
+ }
+ else
+ {
+
+
+ @foreach (var childMenuItem in menuItem.Items)
+ {
+ @await Html.PartialAsync("~/Themes/Basic/Components/Menu/_MenuItem.cshtml", childMenuItem)
+ }
+
+ }
}
diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Menu/_MenuItem.cshtml b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Menu/_MenuItem.cshtml
index 2dc72b8e58..1b5a4badbb 100644
--- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Menu/_MenuItem.cshtml
+++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Components/Menu/_MenuItem.cshtml
@@ -5,10 +5,16 @@
var cssClass = string.IsNullOrEmpty(Model.CssClass) ? string.Empty : Model.CssClass;
var disabled = Model.IsDisabled ? "disabled" : string.Empty;
var url = string.IsNullOrEmpty(Model.Url) ? "#" : Url.IsLocalUrl(Model.Url) ? Url.Content(Model.Url.EnsureStartsWith('~')) : Model.Url;
+ var customComponentType = Model.GetComponentTypeOrDefault();
+
}
@if (Model.IsLeaf)
{
- if (Model.Url != null)
+ if (customComponentType != null)
+ {
+ @(await Component.InvokeAsync(customComponentType))
+ }
+ else if (Model.Url != null)
{
@if (Model.Icon != null)
@@ -25,20 +31,27 @@
else
{
}
diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor/Components/PermissionManagementModal.razor.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor/Components/PermissionManagementModal.razor.cs
index 8a5c82e734..4a55b75df8 100644
--- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor/Components/PermissionManagementModal.razor.cs
+++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Blazor/Components/PermissionManagementModal.razor.cs
@@ -17,7 +17,7 @@ public partial class PermissionManagementModal
[Inject] protected ICurrentApplicationConfigurationCacheResetService CurrentApplicationConfigurationCacheResetService { get; set; }
[Inject] protected IOptions LocalizationOptions { get; set; }
-
+
protected Modal _modal;
protected string _providerName;
@@ -71,7 +71,7 @@ public partial class PermissionManagementModal
}
}
}
-
+
protected Dictionary _permissionDepths = new Dictionary();
public PermissionManagementModal()
@@ -137,7 +137,7 @@ public partial class PermissionManagementModal
{
try
{
-
+
var updateDto = new UpdatePermissionsDto
{
Permissions = _groups
@@ -145,7 +145,7 @@ public partial class PermissionManagementModal
.Select(p => new UpdatePermissionDto { IsGranted = p.IsGranted, Name = p.Name })
.ToArray()
};
-
+
if (!updateDto.Permissions.Any(x => x.IsGranted))
{
if (!await Message.Confirm(L["SaveWithoutAnyPermissionsWarningMessage"].Value))
@@ -182,7 +182,7 @@ public partial class PermissionManagementModal
}
}
}
-
+
protected virtual int GetPermissionDepthOrDefault(string name)
{
return _permissionDepths.GetValueOrDefault(name, 0);
@@ -207,7 +207,7 @@ public partial class PermissionManagementModal
{
SetParentPermissionGrant(permissionGroup, permission);
}
- else if (value == false)
+ else
{
var childPermissions = GetChildPermissions(permissionGroup, permission);
@@ -229,7 +229,7 @@ public partial class PermissionManagementModal
SetPermissionGrant(parentPermission, true);
SetParentPermissionGrant(permissionGroup, parentPermission);
-
+
}
private void SetPermissionGrant(PermissionGrantInfoDto permission, bool value)
@@ -260,7 +260,25 @@ public partial class PermissionManagementModal
protected List GetChildPermissions(PermissionGroupDto permissionGroup, PermissionGrantInfoDto permission)
{
- return permissionGroup.Permissions.Where(x => x.Name.StartsWith(permission.Name)).ToList();
+ var childPermissions = new List();
+ GetChildPermissions(childPermissions, permissionGroup.Permissions, permission);
+ return childPermissions;
+ }
+
+ protected void GetChildPermissions(List allChildPermissions, List permissions, PermissionGrantInfoDto permission)
+ {
+ var childPermissions = permissions.Where(x => x.ParentName == permission.Name).ToList();
+ if (childPermissions.Count == 0)
+ {
+ return;
+ }
+
+ allChildPermissions.AddRange(childPermissions);
+
+ foreach (var childPermission in childPermissions)
+ {
+ GetChildPermissions(allChildPermissions, permissions, childPermission);
+ }
}
protected bool IsDisabledPermission(PermissionGrantInfoDto permissionGrantInfo)
diff --git a/npm/publish-mvc.ps1 b/npm/publish-mvc.ps1
index ee12fc67c3..c9737baeda 100644
--- a/npm/publish-mvc.ps1
+++ b/npm/publish-mvc.ps1
@@ -25,7 +25,7 @@ if ($IsPrerelease) {
}
$commands = (
- "npm run lerna -- version $Version --yes --no-commit-hooks --skip-git --force-publish",
+ "npm run lerna -- version $Version --yes --no-commit-hooks --no-git-tag-version --no-push --force-publish",
"yarn replace-with-tilde",
"cd scripts",
"yarn install",