Browse Source

remove canActivaFn model

pull/18005/head
Sinan997 3 years ago
parent
commit
aac74fc03d
  1. 19
      npm/ng-packs/packages/account/src/lib/resolvers/extensions.resolver.ts
  2. 31
      npm/ng-packs/packages/identity/src/lib/resolvers/extensions.resolver.ts
  3. 34
      npm/ng-packs/packages/tenant-management/src/lib/resolvers/extensions.resolver.ts

19
npm/ng-packs/packages/account/src/lib/resolvers/extensions.resolver.ts

@ -1,9 +1,14 @@
import { ConfigStateService } from "@abp/ng.core";
import { ExtensionsService, getObjectExtensionEntitiesFromStore, mapEntitiesToContributors, mergeWithDefaultProps } from "@abp/ng.theme.shared/extensions";
import { inject } from "@angular/core";
import { map, tap } from "rxjs";
import { eAccountComponents } from "../enums";
import { ACCOUNT_EDIT_FORM_PROP_CONTRIBUTORS, DEFAULT_ACCOUNT_FORM_PROPS } from "../tokens";
import { inject } from '@angular/core';
import { ConfigStateService } from '@abp/ng.core';
import { map, tap } from 'rxjs';
import {
ExtensionsService,
getObjectExtensionEntitiesFromStore,
mapEntitiesToContributors,
mergeWithDefaultProps,
} from '@abp/ng.theme.shared/extensions';
import { eAccountComponents } from '../enums';
import { ACCOUNT_EDIT_FORM_PROP_CONTRIBUTORS, DEFAULT_ACCOUNT_FORM_PROPS } from '../tokens';
export const AccountExtensionsResolver = () => {
const configState = inject(ConfigStateService);
@ -28,4 +33,4 @@ export const AccountExtensionsResolver = () => {
}),
map(() => true),
);
};
};

31
npm/ng-packs/packages/identity/src/lib/resolvers/extensions.resolver.ts

@ -1,9 +1,26 @@
import { ConfigStateService } from "@abp/ng.core";
import { ExtensionsService, getObjectExtensionEntitiesFromStore, mapEntitiesToContributors, mergeWithDefaultActions, mergeWithDefaultProps } from "@abp/ng.theme.shared/extensions";
import { inject } from "@angular/core";
import { map, tap } from "rxjs";
import { eIdentityComponents } from "../enums";
import { IDENTITY_ENTITY_ACTION_CONTRIBUTORS, IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS, IDENTITY_ENTITY_PROP_CONTRIBUTORS, IDENTITY_CREATE_FORM_PROP_CONTRIBUTORS, IDENTITY_EDIT_FORM_PROP_CONTRIBUTORS, DEFAULT_IDENTITY_ENTITY_ACTIONS, DEFAULT_IDENTITY_TOOLBAR_ACTIONS, DEFAULT_IDENTITY_ENTITY_PROPS, DEFAULT_IDENTITY_CREATE_FORM_PROPS, DEFAULT_IDENTITY_EDIT_FORM_PROPS } from "../tokens";
import { inject } from '@angular/core';
import { map, tap } from 'rxjs';
import { ConfigStateService } from '@abp/ng.core';
import {
ExtensionsService,
getObjectExtensionEntitiesFromStore,
mapEntitiesToContributors,
mergeWithDefaultActions,
mergeWithDefaultProps,
} from '@abp/ng.theme.shared/extensions';
import { eIdentityComponents } from '../enums';
import {
IDENTITY_ENTITY_ACTION_CONTRIBUTORS,
IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS,
IDENTITY_ENTITY_PROP_CONTRIBUTORS,
IDENTITY_CREATE_FORM_PROP_CONTRIBUTORS,
IDENTITY_EDIT_FORM_PROP_CONTRIBUTORS,
DEFAULT_IDENTITY_ENTITY_ACTIONS,
DEFAULT_IDENTITY_TOOLBAR_ACTIONS,
DEFAULT_IDENTITY_ENTITY_PROPS,
DEFAULT_IDENTITY_CREATE_FORM_PROPS,
DEFAULT_IDENTITY_EDIT_FORM_PROPS,
} from '../tokens';
export const IdentityExtensionsResolver = () => {
const configState = inject(ConfigStateService);
@ -55,4 +72,4 @@ export const IdentityExtensionsResolver = () => {
}),
map(() => true),
);
};
};

34
npm/ng-packs/packages/tenant-management/src/lib/resolvers/extensions.resolver.ts

@ -1,12 +1,28 @@
import { ConfigStateService } from "@abp/ng.core";
import { ExtensionsService, getObjectExtensionEntitiesFromStore, mapEntitiesToContributors, mergeWithDefaultActions, mergeWithDefaultProps } from "@abp/ng.theme.shared/extensions";
import { inject } from "@angular/core";
import { CanActivateFn } from "@angular/router";
import { map, tap } from "rxjs";
import { eTenantManagementComponents } from "../enums";
import { TENANT_MANAGEMENT_ENTITY_ACTION_CONTRIBUTORS, TENANT_MANAGEMENT_TOOLBAR_ACTION_CONTRIBUTORS, TENANT_MANAGEMENT_ENTITY_PROP_CONTRIBUTORS, TENANT_MANAGEMENT_CREATE_FORM_PROP_CONTRIBUTORS, TENANT_MANAGEMENT_EDIT_FORM_PROP_CONTRIBUTORS, DEFAULT_TENANT_MANAGEMENT_ENTITY_ACTIONS, DEFAULT_TENANT_MANAGEMENT_TOOLBAR_ACTIONS, DEFAULT_TENANT_MANAGEMENT_ENTITY_PROPS, DEFAULT_TENANT_MANAGEMENT_CREATE_FORM_PROPS, DEFAULT_TENANT_MANAGEMENT_EDIT_FORM_PROPS } from "../tokens";
import { inject } from '@angular/core';
import { map, tap } from 'rxjs';
import { ConfigStateService } from '@abp/ng.core';
import {
ExtensionsService,
getObjectExtensionEntitiesFromStore,
mapEntitiesToContributors,
mergeWithDefaultActions,
mergeWithDefaultProps,
} from '@abp/ng.theme.shared/extensions';
import { eTenantManagementComponents } from '../enums';
import {
TENANT_MANAGEMENT_ENTITY_ACTION_CONTRIBUTORS,
TENANT_MANAGEMENT_TOOLBAR_ACTION_CONTRIBUTORS,
TENANT_MANAGEMENT_ENTITY_PROP_CONTRIBUTORS,
TENANT_MANAGEMENT_CREATE_FORM_PROP_CONTRIBUTORS,
TENANT_MANAGEMENT_EDIT_FORM_PROP_CONTRIBUTORS,
DEFAULT_TENANT_MANAGEMENT_ENTITY_ACTIONS,
DEFAULT_TENANT_MANAGEMENT_TOOLBAR_ACTIONS,
DEFAULT_TENANT_MANAGEMENT_ENTITY_PROPS,
DEFAULT_TENANT_MANAGEMENT_CREATE_FORM_PROPS,
DEFAULT_TENANT_MANAGEMENT_EDIT_FORM_PROPS,
} from '../tokens';
export const TenantManagementExtensionsResolver: CanActivateFn = () => {
export const TenantManagementExtensionsResolver = () => {
const configState = inject(ConfigStateService);
const extensions = inject(ExtensionsService);
@ -56,4 +72,4 @@ export const TenantManagementExtensionsResolver: CanActivateFn = () => {
}),
map(() => true),
);
};
};

Loading…
Cancel
Save