Browse Source

refactor: move free-text-directive to feature-mng

pull/5538/head
bnymncoskuner 6 years ago
parent
commit
3115d44251
  1. 2
      npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.html
  2. 6
      npm/ng-packs/packages/feature-management/src/lib/directives/free-text-input.directive.ts
  3. 1
      npm/ng-packs/packages/feature-management/src/lib/directives/index.ts
  4. 11
      npm/ng-packs/packages/feature-management/src/lib/feature-management.module.ts
  5. 1
      npm/ng-packs/packages/theme-shared/src/lib/directives/index.ts
  6. 3
      npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts

2
npm/ng-packs/packages/feature-management/src/lib/components/feature-management/feature-management.component.html

@ -55,7 +55,7 @@
type="text"
[id]="feature.name"
[(ngModel)]="feature.value"
[abpFreeText]="feature"
[abpFeatureManagementFreeText]="feature"
/>
<ng-container

6
npm/ng-packs/packages/theme-shared/src/lib/directives/free-text-input.directive.ts → npm/ng-packs/packages/feature-management/src/lib/directives/free-text-input.directive.ts

@ -15,12 +15,12 @@ export const INPUT_TYPES = {
};
@Directive({
selector: 'input[abpFreeText]',
exportAs: 'inputAbpFreeText',
selector: 'input[abpFeatureManagementFreeText]',
exportAs: 'inputAbpFeatureManagementFreeText',
})
export class FreeTextInputDirective {
_feature: FreeTextType;
@Input('abpFreeText') set feature(val: FreeTextType) {
@Input('abpFeatureManagementFreeText') set feature(val: FreeTextType) {
this._feature = val;
this.setInputType();
}

1
npm/ng-packs/packages/feature-management/src/lib/directives/index.ts

@ -0,0 +1 @@
export * from './free-text-input.directive';

11
npm/ng-packs/packages/feature-management/src/lib/feature-management.module.ts

@ -1,19 +1,22 @@
import { CoreModule } from '@abp/ng.core';
import { ThemeSharedModule } from '@abp/ng.theme.shared';
import { NgModule } from '@angular/core';
import { FeatureManagementComponent } from './components/feature-management/feature-management.component';
import { NgxsModule } from '@ngxs/store';
import { FeatureManagementState } from './states/feature-management.state';
import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap';
import { FreeTextInputDirective } from './directives/free-text-input.directive';
import { FeatureManagementComponent } from './components/feature-management/feature-management.component';
import { FeatureManagementState } from './states/feature-management.state';
const exported = [FeatureManagementComponent, FreeTextInputDirective];
@NgModule({
declarations: [FeatureManagementComponent],
declarations: [...exported],
imports: [
CoreModule,
ThemeSharedModule,
NgbNavModule,
NgxsModule.forFeature([FeatureManagementState]),
],
exports: [FeatureManagementComponent],
exports: [...exported],
})
export class FeatureManagementModule {}

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

@ -2,4 +2,3 @@ export * from './loading.directive';
export * from './ngx-datatable-default.directive';
export * from './ngx-datatable-list.directive';
export * from './table-sort.directive';
export * from './free-text-input.directive';

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

@ -29,7 +29,6 @@ import { THEME_SHARED_ROUTE_PROVIDERS } from './providers/route.provider';
import { THEME_SHARED_APPEND_CONTENT } from './tokens/append-content.token';
import { httpErrorConfigFactory, HTTP_ERROR_CONFIG } from './tokens/http-error.token';
import { DateParserFormatter } from './utils/date-parser-formatter';
import { FreeTextInputDirective } from './directives/free-text-input.directive';
@NgModule({
imports: [CoreModule, NgxDatatableModule, NgxValidateCoreModule, NgbPaginationModule],
@ -52,7 +51,6 @@ import { FreeTextInputDirective } from './directives/free-text-input.directive';
NgxDatatableListDirective,
LoadingDirective,
TableSortDirective,
FreeTextInputDirective,
],
exports: [
NgxDatatableModule,
@ -72,7 +70,6 @@ import { FreeTextInputDirective } from './directives/free-text-input.directive';
NgxDatatableListDirective,
LoadingDirective,
TableSortDirective,
FreeTextInputDirective,
],
providers: [DatePipe],
entryComponents: [

Loading…
Cancel
Save