Browse Source

chore(core): change the class name of stop-propagation.directive

pull/6641/head
mehmet-erim 7 years ago
parent
commit
c24afe6982
  1. 6
      npm/ng-packs/packages/core/src/lib/core.module.ts
  2. 2
      npm/ng-packs/packages/core/src/lib/directives/stop-propagation.directive.ts
  3. 10
      npm/ng-packs/packages/core/src/lib/tests/stop-propagation.directive.spec.ts

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

@ -16,7 +16,7 @@ import { EllipsisDirective } from './directives/ellipsis.directive';
import { ForDirective } from './directives/for.directive';
import { FormSubmitDirective } from './directives/form-submit.directive';
import { PermissionDirective } from './directives/permission.directive';
import { ClickEventStopPropagationDirective } from './directives/stop-propagation.directive';
import { StopPropagationDirective } from './directives/stop-propagation.directive';
import { VisibilityDirective } from './directives/visibility.directive';
import { ApiInterceptor } from './interceptors/api.interceptor';
import { ABP } from './models/common';
@ -54,7 +54,7 @@ import './utils/date-extensions';
PermissionDirective,
VisibilityDirective,
InputEventDebounceDirective,
ClickEventStopPropagationDirective,
StopPropagationDirective,
AbstractNgModelComponent,
],
exports: [
@ -75,7 +75,7 @@ import './utils/date-extensions';
VisibilityDirective,
InputEventDebounceDirective,
LocalizationPipe,
ClickEventStopPropagationDirective,
StopPropagationDirective,
AbstractNgModelComponent,
],
providers: [LocalizationPipe],

2
npm/ng-packs/packages/core/src/lib/directives/stop-propagation.directive.ts

@ -6,7 +6,7 @@ import { takeUntilDestroy } from '../utils/rxjs-utils';
// tslint:disable-next-line: directive-selector
selector: '[click.stop]',
})
export class ClickEventStopPropagationDirective implements OnInit, OnDestroy {
export class StopPropagationDirective implements OnInit, OnDestroy {
@Output('click.stop') readonly stopPropEvent = new EventEmitter<MouseEvent>();
constructor(private el: ElementRef) {}

10
npm/ng-packs/packages/core/src/lib/tests/stop-propagation.directive.spec.ts

@ -1,14 +1,14 @@
import { createDirectiveFactory, SpectatorDirective } from '@ngneat/spectator/jest';
import { ClickEventStopPropagationDirective } from '../directives/stop-propagation.directive';
import { StopPropagationDirective } from '../directives/stop-propagation.directive';
describe('ClickEventStopPropagationDirective', () => {
let spectator: SpectatorDirective<ClickEventStopPropagationDirective>;
let directive: ClickEventStopPropagationDirective;
describe('StopPropagationDirective', () => {
let spectator: SpectatorDirective<StopPropagationDirective>;
let directive: StopPropagationDirective;
let link: HTMLAnchorElement;
const childClickEventFn = jest.fn(() => null);
const parentClickEventFn = jest.fn(() => null);
const createDirective = createDirectiveFactory({
directive: ClickEventStopPropagationDirective,
directive: StopPropagationDirective,
});
beforeEach(() => {

Loading…
Cancel
Save