Browse Source
Merge pull request #25787 from abpframework/auto-merge/rel-10-6/4702
Merge branch dev with rel-10.6
pull/25788/head
Volosoft Agent
3 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
23 additions and
2 deletions
-
npm/ng-packs/packages/core/src/lib/directives/replaceable-template.directive.ts
-
npm/ng-packs/packages/permission-management/src/lib/components/permission-management.component.ts
|
|
@ -9,7 +9,7 @@ import { |
|
|
Type, |
|
|
Type, |
|
|
ViewContainerRef, |
|
|
ViewContainerRef, |
|
|
inject, |
|
|
inject, |
|
|
input |
|
|
input, |
|
|
} from '@angular/core'; |
|
|
} from '@angular/core'; |
|
|
import compare from 'just-compare'; |
|
|
import compare from 'just-compare'; |
|
|
import { Subscription } from 'rxjs'; |
|
|
import { Subscription } from 'rxjs'; |
|
|
@ -30,7 +30,9 @@ export class ReplaceableTemplateDirective implements OnInit, OnChanges { |
|
|
private replaceableComponents = inject(ReplaceableComponentsService); |
|
|
private replaceableComponents = inject(ReplaceableComponentsService); |
|
|
private subscription = inject(SubscriptionService); |
|
|
private subscription = inject(SubscriptionService); |
|
|
|
|
|
|
|
|
readonly data = input.required<ReplaceableComponents.ReplaceableTemplateDirectiveInput<any, any>>({ alias: "abpReplaceableTemplate" }); |
|
|
readonly data = input.required<ReplaceableComponents.ReplaceableTemplateDirectiveInput<any, any>>( |
|
|
|
|
|
{ alias: 'abpReplaceableTemplate' }, |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
providedData = { |
|
|
providedData = { |
|
|
inputs: {}, |
|
|
inputs: {}, |
|
|
|
|
|
@ -3,11 +3,13 @@ import { |
|
|
Component, |
|
|
Component, |
|
|
computed, |
|
|
computed, |
|
|
DOCUMENT, |
|
|
DOCUMENT, |
|
|
|
|
|
effect, |
|
|
inject, |
|
|
inject, |
|
|
input, |
|
|
input, |
|
|
output, |
|
|
output, |
|
|
signal, |
|
|
signal, |
|
|
TrackByFunction, |
|
|
TrackByFunction, |
|
|
|
|
|
untracked, |
|
|
} from '@angular/core'; |
|
|
} from '@angular/core'; |
|
|
import { NgStyle } from '@angular/common'; |
|
|
import { NgStyle } from '@angular/common'; |
|
|
import { FormsModule } from '@angular/forms'; |
|
|
import { FormsModule } from '@angular/forms'; |
|
|
@ -224,6 +226,10 @@ export class PermissionManagementComponent { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
set visible(value: boolean) { |
|
|
set visible(value: boolean) { |
|
|
|
|
|
this.setVisible(value); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private setVisible(value: boolean) { |
|
|
if (value && this.isClosingModal) { |
|
|
if (value && this.isClosingModal) { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
@ -303,6 +309,19 @@ export class PermissionManagementComponent { |
|
|
this.disabledSelectAllInAllTabsState.set(false); |
|
|
this.disabledSelectAllInAllTabsState.set(false); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// constructor() {
|
|
|
|
|
|
// effect(() => {
|
|
|
|
|
|
// this.setVisible(this.visibleInput());
|
|
|
|
|
|
// });
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
constructor() { |
|
|
|
|
|
effect(() => { |
|
|
|
|
|
const visible = this.visibleInput(); |
|
|
|
|
|
untracked(() => this.setVisible(visible)); |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
getChecked(name: string) { |
|
|
getChecked(name: string) { |
|
|
return (this.permissionsState().find(per => per.name === name) || { isGranted: false }) |
|
|
return (this.permissionsState().find(per => per.name === name) || { isGranted: false }) |
|
|
.isGranted; |
|
|
.isGranted; |
|
|
|