diff --git a/demo/app/components/button/button.component.html b/demo/app/components/button/button.component.html index 4629ef4bf..4afd4f148 100644 --- a/demo/app/components/button/button.component.html +++ b/demo/app/components/button/button.component.html @@ -36,7 +36,7 @@

Demo Controls

format="hollow" [isDisabled]="true" [showProgress]="progress2" - (clickEvent)="run('progress2')" + (clicked)="run('progress2')" tsVerticalSpacing >I'm disabled AND empty inside :( diff --git a/demo/app/components/confirmation/confirmation.component.html b/demo/app/components/confirmation/confirmation.component.html index 279d55628..239fb07d2 100644 --- a/demo/app/components/confirmation/confirmation.component.html +++ b/demo/app/components/confirmation/confirmation.component.html @@ -19,7 +19,7 @@

Use 'after' when the button is on t Use 'before' when the button is on Use 'before' when the button is on Accordion as a stepper

And here is my standard panel content. - + Next @@ -197,10 +197,10 @@

Accordion as a stepper

And here is my standard panel content. - + Previous - + Next @@ -219,10 +219,10 @@

Accordion as a stepper

And here is my standard panel content. - + Previous - + End diff --git a/demo/app/components/icon-button/icon-button.component.html b/demo/app/components/icon-button/icon-button.component.html index c2104694b..a07bcedf1 100644 --- a/demo/app/components/icon-button/icon-button.component.html +++ b/demo/app/components/icon-button/icon-button.component.html @@ -1,7 +1,7 @@
- forum + forum
@@ -13,21 +13,21 @@
add_circle
reply_all
delete_forever
diff --git a/demo/app/components/icon-button/icon-button.component.ts b/demo/app/components/icon-button/icon-button.component.ts index d86961dde..8f6da9ddb 100644 --- a/demo/app/components/icon-button/icon-button.component.ts +++ b/demo/app/components/icon-button/icon-button.component.ts @@ -7,7 +7,7 @@ import { Component } from '@angular/core'; }) export class IconButtonComponent { - click(v: string): void { + clickTheme(v: string): void { console.log(`DEMO: '${v}' icon-button clicked.`); } diff --git a/demo/app/components/menu/menu.component.html b/demo/app/components/menu/menu.component.html index 63a1d41b1..d10f2ec0e 100644 --- a/demo/app/components/menu/menu.component.html +++ b/demo/app/components/menu/menu.component.html @@ -65,11 +65,11 @@

- + Roger, Roger. - + Don't call me Shirley. @@ -77,7 +77,7 @@

A tasty link - + And a final button diff --git a/terminus-ui/button/src/button.component.html b/terminus-ui/button/src/button.component.html index 530e87578..823f51a07 100644 --- a/terminus-ui/button/src/button.component.html +++ b/terminus-ui/button/src/button.component.html @@ -10,7 +10,7 @@ [attr.type]="buttonType" [disabled]="shouldBeDisabled" tabindex="{{ tabIndex }}" - (click)="clicked($event)" + (click)="clickedButton($event)" #button > Click Me! `, @@ -36,7 +36,7 @@ class TestHostComponent implements OnInit, OnDestroy { buttonComponent!: TsButtonComponent; changed = jest.fn(); - clickEvent = jest.fn(); + clicked = jest.fn(); private COLLAPSE_DEFAULT_DELAY = undefined; public ngOnInit() { } public ngOnDestroy() { } @@ -65,7 +65,7 @@ describe(`TsButtonComponent`, function() { expect(buttonComponent.isDisabled).toEqual(false); expect(button.disabled).toEqual(false); button.click(); - expect(component.clickEvent).toHaveBeenCalled(); + expect(component.clicked).toHaveBeenCalled(); }); test(`should have button disabled`, () => { @@ -73,14 +73,14 @@ describe(`TsButtonComponent`, function() { fixture.detectChanges(); expect(buttonComponent.isDisabled).toEqual(true); expect(button.disabled).toEqual(true); - expect(component.clickEvent).not.toHaveBeenCalled(); + expect(component.clicked).not.toHaveBeenCalled(); }); }); test(`click`, () => { - component.buttonComponent.clickEvent.emit = jest.fn(); + component.buttonComponent.clicked.emit = jest.fn(); button.click(); - expect(buttonComponent.clickEvent.emit).toHaveBeenCalled(); + expect(buttonComponent.clicked.emit).toHaveBeenCalled(); }); describe(`showProgress`, () => { @@ -326,27 +326,27 @@ describe(`TsButtonComponent`, function() { }); - describe(`clicked()`, () => { + describe(`clickedButton()`, () => { let mouseEvent: MouseEvent; beforeEach(() => { - buttonComponent.clickEvent.emit = jest.fn(); + buttonComponent.clicked.emit = jest.fn(); mouseEvent = createMouseEvent('click'); }); test(`should emit the click when interceptClick is false`, () => { - buttonComponent.clicked(mouseEvent); + buttonComponent.clickedButton(mouseEvent); - expect(buttonComponent.clickEvent.emit).toHaveBeenCalledWith(mouseEvent); + expect(buttonComponent.clicked.emit).toHaveBeenCalledWith(mouseEvent); }); test(`should not emit the click when interceptClick is true`, () => { buttonComponent.interceptClick = true; - buttonComponent.clicked(mouseEvent); + buttonComponent.clickedButton(mouseEvent); - expect(buttonComponent.clickEvent.emit).not.toHaveBeenCalledWith(); + expect(buttonComponent.clicked.emit).not.toHaveBeenCalledWith(); expect(buttonComponent.originalClickEvent).toEqual(mouseEvent); }); diff --git a/terminus-ui/button/src/button.component.ts b/terminus-ui/button/src/button.component.ts index 60f9cc2fb..0b411022f 100644 --- a/terminus-ui/button/src/button.component.ts +++ b/terminus-ui/button/src/button.component.ts @@ -75,7 +75,7 @@ export const tsButtonFormatTypesArray = ['filled', 'hollow', 'collapsable']; * [collapsed]="false" * collapseDelay="500" * tabIndex="2" - * (clickEvent)="myMethod($event)" + * (clicked)="myMethod($event)" * >Click Me! * * https://getterminus.github.io/ui-demos-master/components/button @@ -269,7 +269,7 @@ export class TsButtonComponent implements OnInit, OnDestroy { * Pass the click event through to the parent */ @Output() - public clickEvent: EventEmitter = new EventEmitter; + public clicked: EventEmitter = new EventEmitter(); /** * Provide access to the inner button element @@ -325,16 +325,16 @@ export class TsButtonComponent implements OnInit, OnDestroy { /** - * Do something when clicked + * Handle button clicks * * @param event - The MouseEvent */ - public clicked(event: MouseEvent): void { + public clickedButton(event: MouseEvent): void { // Allow the click to propagate if (!this.interceptClick) { - this.clickEvent.emit(event); + this.clicked.emit(event); } else { - // Save the original event but don't emit the clickEvent + // Save the original event but don't emit the originalClickEvent this.originalClickEvent = event; } } diff --git a/terminus-ui/checkbox/src/checkbox.component.ts b/terminus-ui/checkbox/src/checkbox.component.ts index 1092e9c64..9f5d3aad6 100644 --- a/terminus-ui/checkbox/src/checkbox.component.ts +++ b/terminus-ui/checkbox/src/checkbox.component.ts @@ -190,13 +190,13 @@ export class TsCheckboxComponent extends TsReactiveFormBaseComponent { * Emit an event on input change */ @Output() - readonly inputChange: EventEmitter = new EventEmitter; + readonly inputChange: EventEmitter = new EventEmitter(); /** * Emit a change when moving from the indeterminate state */ @Output() - readonly indeterminateChange: EventEmitter = new EventEmitter; + readonly indeterminateChange: EventEmitter = new EventEmitter(); constructor( diff --git a/terminus-ui/confirmation/src/confirmation-overlay.component.html b/terminus-ui/confirmation/src/confirmation-overlay.component.html index 998f8b4ea..c66a1be63 100644 --- a/terminus-ui/confirmation/src/confirmation-overlay.component.html +++ b/terminus-ui/confirmation/src/confirmation-overlay.component.html @@ -11,14 +11,14 @@ class="qa-confirmation-cancel" theme="warn" format="hollow" - (clickEvent)="confirm.next(false)" + (clicked)="confirm.next(false)" > {{ cancelButtonTxt }} {{ confirmationButtonTxt }} diff --git a/terminus-ui/confirmation/src/confirmation.directive.md b/terminus-ui/confirmation/src/confirmation.directive.md index 976524960..33b61344b 100644 --- a/terminus-ui/confirmation/src/confirmation.directive.md +++ b/terminus-ui/confirmation/src/confirmation.directive.md @@ -32,7 +32,7 @@ Add the directive to any `ts-button`: ```html Click me! @@ -47,7 +47,7 @@ from the confirmation pop-up. ```html Click me! @@ -62,7 +62,7 @@ Customizes the text in the overlay of the confirmation button; default is "Confi ```html @@ -78,7 +78,7 @@ Customizes the text in the overlay of the cancel button; default is "Cancel". ```html @@ -94,7 +94,7 @@ Optional text to appear inside of the overlay, generally to use as a warning, fo ```html @@ -109,7 +109,7 @@ Optional overlayPosition for defining where the overlay will appear relative to ```html diff --git a/terminus-ui/confirmation/src/confirmation.directive.spec.ts b/terminus-ui/confirmation/src/confirmation.directive.spec.ts index b8ab0c40b..b8d1528dd 100644 --- a/terminus-ui/confirmation/src/confirmation.directive.spec.ts +++ b/terminus-ui/confirmation/src/confirmation.directive.spec.ts @@ -48,14 +48,14 @@ class TsButtonComponentMock { @Input() public showProgress = false; @Output() - public clickEvent: EventEmitter = new EventEmitter; + public clicked: EventEmitter = new EventEmitter(); - public clicked(event: MouseEvent): void { + public clickedButton(event: MouseEvent): void { // Allow the click to propagate if (!this.interceptClick) { - this.clickEvent.emit(event); + this.clicked.emit(event); } else { - // Save the original event but don't emit the clickEvent + // Save the original event but don't emit the originalClickEvent this.originalClickEvent = event; } } @@ -157,7 +157,7 @@ describe(`TsConfirmationDirective`, function() { describe(`overlay content`, () => { test(`should dismiss the overlay and emit event on confirm`, () => { - directive['host'].clickEvent.emit = jest.fn(); + directive['host'].clicked.emit = jest.fn(); expect(directive['overlayRef']).toBeFalsy(); button.click(); expect(directive['overlayRef']).toBeTruthy(); @@ -165,7 +165,7 @@ describe(`TsConfirmationDirective`, function() { directive['overlayInstance'].confirm.next(true); expect(directive['overlayRef']!.hasAttached()).toEqual(false); - expect(directive['host'].clickEvent.emit).toHaveBeenCalled(); + expect(directive['host'].clicked.emit).toHaveBeenCalled(); }); diff --git a/terminus-ui/confirmation/src/confirmation.directive.ts b/terminus-ui/confirmation/src/confirmation.directive.ts index 9499d5be5..3765e6420 100644 --- a/terminus-ui/confirmation/src/confirmation.directive.ts +++ b/terminus-ui/confirmation/src/confirmation.directive.ts @@ -230,7 +230,7 @@ export class TsConfirmationDirective implements OnDestroy, OnInit { // Subscribe to the continue event this.overlayInstance.confirm.subscribe((shouldProceed: boolean) => { if (coerceBooleanProperty(shouldProceed)) { - this.host.clickEvent.emit(this.host.originalClickEvent); + this.host.clicked.emit(this.host.originalClickEvent); this.dismissOverlay(); } else { this.dismissOverlay(); diff --git a/terminus-ui/csv-entry/src/csv-entry.component.html b/terminus-ui/csv-entry/src/csv-entry.component.html index 6c963660f..cf8ae9b8c 100644 --- a/terminus-ui/csv-entry/src/csv-entry.component.html +++ b/terminus-ui/csv-entry/src/csv-entry.component.html @@ -135,14 +135,14 @@ class="qa-csv-entry-reset" format="hollow" theme="warn" - (click)="resetTable()" + (clicked)="resetTable()" >Reset Table Add Row

diff --git a/terminus-ui/csv-entry/src/csv-entry.component.spec.ts b/terminus-ui/csv-entry/src/csv-entry.component.spec.ts index 803113d86..d5dc4ed01 100644 --- a/terminus-ui/csv-entry/src/csv-entry.component.spec.ts +++ b/terminus-ui/csv-entry/src/csv-entry.component.spec.ts @@ -495,8 +495,8 @@ describe(`TsCSVEntryComponent`, function() { fixture.detectChanges(); const addRowButton = fixture.debugElement.query(By.css('#ts-csv-add-row')).nativeElement; - dispatchMouseEvent(addRowButton, 'click'); - dispatchMouseEvent(addRowButton, 'click'); + dispatchMouseEvent(addRowButton, 'clicked'); + dispatchMouseEvent(addRowButton, 'clicked'); fixture.detectChanges(); const message = fixture.debugElement.query(By.css('.c-csv-entry__message')).nativeElement; @@ -516,14 +516,14 @@ describe(`TsCSVEntryComponent`, function() { expect(row2Cell1.value).toEqual(expect.any(String)); const addRowButton = fixture.debugElement.query(By.css('#ts-csv-add-row')).nativeElement; - dispatchMouseEvent(addRowButton, 'click'); - dispatchMouseEvent(addRowButton, 'click'); + dispatchMouseEvent(addRowButton, 'clicked'); + dispatchMouseEvent(addRowButton, 'clicked'); fixture.detectChanges(); let message = fixture.debugElement.query(By.css('.c-csv-entry__message')).nativeElement; expect(message).toBeTruthy(); const resetButton: HTMLInputElement = fixture.debugElement.query(By.css('#ts-csv-reset')).nativeElement; - dispatchMouseEvent(resetButton, 'click'); + dispatchMouseEvent(resetButton, 'clicked'); fixture.detectChanges(); row2Cell1 = fixture.debugElement.query(By.css('#r_1Xc_0')).nativeElement; diff --git a/terminus-ui/expansion-panel/src/expansion-panel.component.md b/terminus-ui/expansion-panel/src/expansion-panel.component.md index bbefc4819..a92e3ae01 100644 --- a/terminus-ui/expansion-panel/src/expansion-panel.component.md +++ b/terminus-ui/expansion-panel/src/expansion-panel.component.md @@ -234,7 +234,7 @@ the `ts-expansion-panel-action-row`. And here is my standard panel content. - + Next @@ -249,10 +249,10 @@ the `ts-expansion-panel-action-row`. And here is my standard panel content. - + Previous - + Next @@ -267,10 +267,10 @@ the `ts-expansion-panel-action-row`. And here is my standard panel content. - + Previous - + End diff --git a/terminus-ui/file-upload/src/file-upload.component.html b/terminus-ui/file-upload/src/file-upload.component.html index 904636522..a6fc512b7 100644 --- a/terminus-ui/file-upload/src/file-upload.component.html +++ b/terminus-ui/file-upload/src/file-upload.component.html @@ -86,7 +86,7 @@ [class.c-file-upload__prompt--hidden]="hideButton" [theme]="theme" [isDisabled]="dragInProgress" - (clickEvent)="promptForFiles()" + (clicked)="promptForFiles()" > {{ buttonMessage }} diff --git a/terminus-ui/icon-button/src/icon-button.component.html b/terminus-ui/icon-button/src/icon-button.component.html index 8290cae3b..633d23a9f 100644 --- a/terminus-ui/icon-button/src/icon-button.component.html +++ b/terminus-ui/icon-button/src/icon-button.component.html @@ -4,7 +4,7 @@ [attr.type]="buttonType" [disabled]="isDisabled" tabindex="{{ tabIndex }}" - (click)="clickEvent.emit($event)" + (click)="clicked.emit($event)" >