From 49c7e8059c148978033936913a4496f05258e5ed Mon Sep 17 00:00:00 2001 From: Kevin Buhmann Date: Wed, 21 Sep 2022 21:21:24 -0500 Subject: [PATCH] chore: remove unnecessary explicit `public` access modifiers The `public` access modifier was inconsistently used. This change makes the code more concise and consistent. --- .eslintrc.js | 6 ++ .../src/button/button-group/button-group.ts | 4 +- .../angular/src/button/button-group/button.ts | 2 +- .../button/button-loading/loading-button.ts | 8 +-- .../datagrid-property-comparator.ts | 2 +- .../filters/datagrid-numeric-filter-impl.ts | 22 +++---- .../filters/datagrid-numeric-filter.ts | 18 ++--- .../filters/datagrid-string-filter-impl.ts | 16 ++--- .../filters/datagrid-string-filter.ts | 10 +-- .../data/datagrid/built-in/nested-property.ts | 2 +- .../data/datagrid/datagrid-action-overflow.ts | 8 +-- .../src/data/datagrid/datagrid-cell.ts | 2 +- .../datagrid/datagrid-column-separator.ts | 6 +- .../data/datagrid/datagrid-column-toggle.ts | 8 +-- .../src/data/datagrid/datagrid-column.ts | 50 +++++++------- .../src/data/datagrid/datagrid-detail.ts | 2 +- .../src/data/datagrid/datagrid-filter.spec.ts | 2 +- .../src/data/datagrid/datagrid-filter.ts | 14 ++-- .../src/data/datagrid/datagrid-footer.ts | 2 +- .../data/datagrid/datagrid-hideable-column.ts | 2 +- .../src/data/datagrid/datagrid-if-detail.ts | 2 +- .../src/data/datagrid/datagrid-items.ts | 2 +- .../src/data/datagrid/datagrid-pagination.ts | 30 ++++----- .../src/data/datagrid/datagrid-placeholder.ts | 2 +- .../data/datagrid/datagrid-row-detail.spec.ts | 4 +- .../src/data/datagrid/datagrid-row-detail.ts | 8 +-- .../angular/src/data/datagrid/datagrid-row.ts | 34 +++++----- .../angular/src/data/datagrid/datagrid.ts | 22 +++---- .../providers/column-resizer.service.ts | 16 ++--- .../data/datagrid/providers/detail.service.ts | 4 +- .../datagrid/providers/display-mode.mock.ts | 2 +- .../providers/display-mode.service.ts | 2 +- .../src/data/datagrid/providers/filters.ts | 10 +-- .../providers/global-expandable-rows.ts | 6 +- .../src/data/datagrid/providers/items.spec.ts | 2 +- .../src/data/datagrid/providers/items.ts | 22 +++---- .../src/data/datagrid/providers/page.ts | 32 ++++----- .../datagrid/providers/row-action-service.ts | 6 +- .../src/data/datagrid/providers/selection.ts | 42 ++++++------ .../src/data/datagrid/providers/sort.ts | 16 ++--- .../providers/state-debouncer.provider.ts | 6 +- .../providers/table-size.service.mock.ts | 2 +- .../providers/table-size.service.spec.ts | 2 +- .../datagrid/providers/table-size.service.ts | 6 +- .../data/datagrid/render/header-renderer.ts | 4 +- .../src/data/datagrid/render/main-renderer.ts | 2 +- .../datagrid/render/render-organizer.mock.ts | 2 +- .../data/datagrid/render/render-organizer.ts | 6 +- .../src/data/datagrid/render/row-renderer.ts | 2 +- .../utils/datagrid-filter-registrar.ts | 10 +-- .../tree-view/tree-focus-manager.service.ts | 2 +- .../angular/src/emphasis/alert/alerts.spec.ts | 14 ++-- projects/angular/src/emphasis/alert/alerts.ts | 6 +- .../alert/providers/icon-and-types.service.ts | 2 +- .../alert/providers/multi-alert.service.ts | 2 +- .../src/forms/checkbox/checkbox-container.ts | 2 +- .../angular/src/forms/combobox/combobox.ts | 8 +-- .../forms/combobox/option-items.directive.ts | 4 +- projects/angular/src/forms/combobox/option.ts | 2 +- .../angular/src/forms/combobox/options.ts | 6 +- .../combobox-focus-handler.service.ts | 2 +- .../providers/option-selection.service.ts | 6 +- .../src/forms/common/abstract-control.ts | 4 +- .../common/providers/container-id.service.ts | 2 +- .../common/providers/control-id.service.ts | 2 +- .../datalist/providers/datalist-id.service.ts | 2 +- .../src/forms/datepicker/date-container.ts | 2 +- .../src/forms/datepicker/date-input.ts | 2 +- projects/angular/src/forms/datepicker/day.ts | 6 +- .../forms/datepicker/model/calendar.model.ts | 2 +- .../src/forms/datepicker/model/day.model.ts | 4 +- .../providers/date-form-control.service.ts | 2 +- .../datepicker/providers/date-io.service.ts | 8 +-- .../providers/date-navigation.service.ts | 4 +- .../src/forms/radio/radio-container.ts | 2 +- .../src/layout/nav/aria-current-link.ts | 2 +- .../responsive-navigation.service.ts | 2 +- .../src/layout/nav/responsive-nav-codes.ts | 24 +++---- ...vertical-nav-group-registration.service.ts | 2 +- .../src/popover/common/abstract-popover.ts | 2 +- .../angular/src/popover/common/popover.ts | 4 +- .../src/popover/dropdown/dropdown-item.ts | 2 +- .../src/popover/dropdown/dropdown-trigger.ts | 2 +- .../src/popover/signpost/signpost-trigger.ts | 6 +- .../angular/src/popover/signpost/signpost.ts | 2 +- .../src/popover/tooltip/tooltip-trigger.ts | 2 +- .../timeline-icon-attribute.service.ts | 6 +- .../angular/src/timeline/timeline-step.ts | 2 +- .../src/utils/a11y/aria-live.service.ts | 9 +-- .../utils/chocolate/chocolate-factory.spec.ts | 4 +- .../src/utils/chocolate/willy-wonka.ts | 2 +- .../utils/conditional/if-active.directive.ts | 6 +- .../utils/conditional/if-active.service.ts | 6 +- .../conditional/if-expanded.directive.spec.ts | 2 +- .../utils/conditional/if-expanded.service.ts | 6 +- .../utils/conditional/if-open.directive.ts | 8 +-- .../drag-and-drop-integrated.spec.ts | 16 ++--- .../src/utils/drag-and-drop/drag-event.ts | 8 +-- .../drag-and-drop/draggable/draggable.ts | 2 +- .../drag-and-drop/droppable/droppable.spec.ts | 24 +++---- .../drag-and-drop-event-bus.service.mock.ts | 8 +-- .../drag-event-listener.service.mock.ts | 14 ++-- .../providers/drag-event-listener.service.ts | 14 ++-- .../drag-handle-registrar.service.mock.ts | 4 +- .../drag-handle-registrar.service.ts | 4 +- .../providers/draggable-snapshot.service.ts | 4 +- .../utils/focus-trap/focus-trap.directive.ts | 2 +- .../angular/src/utils/focus/focus.service.ts | 4 +- .../angular/src/utils/loading/loading.spec.ts | 6 +- projects/angular/src/utils/loading/loading.ts | 6 +- .../utils/outside-click/outside-click.spec.ts | 4 +- .../src/utils/popover/popover-content.spec.ts | 10 +-- .../src/utils/popover/popover-content.ts | 2 +- .../providers/popover-events.service.ts | 34 +++++----- .../providers/popover-position.service.ts | 2 +- .../providers/popover-toggle.service.ts | 18 ++--- .../providers/button-hub.service.mock.ts | 4 +- .../wizard/providers/button-hub.service.ts | 16 ++--- .../providers/header-actions.service.ts | 10 +-- .../providers/page-collection.service.mock.ts | 8 +-- .../providers/page-collection.service.ts | 42 ++++++------ .../providers/wizard-navigation.service.ts | 64 +++++++++--------- .../angular/src/wizard/wizard-button.spec.ts | 16 ++--- projects/angular/src/wizard/wizard-button.ts | 24 +++---- .../src/wizard/wizard-header-action.spec.ts | 6 +- .../src/wizard/wizard-header-action.ts | 4 +- .../angular/src/wizard/wizard-page.mock.ts | 16 ++--- .../angular/src/wizard/wizard-page.spec.ts | 46 ++++++------- projects/angular/src/wizard/wizard-page.ts | 66 +++++++++---------- .../src/wizard/wizard-stepnav-item.spec.ts | 2 +- .../angular/src/wizard/wizard-stepnav-item.ts | 16 ++--- .../angular/src/wizard/wizard-stepnav.spec.ts | 2 +- projects/angular/src/wizard/wizard.ts | 42 ++++++------ projects/demo/src/app/app.component.ts | 2 +- .../demo/src/app/buttons/button-loading.ts | 18 ++--- .../src/app/content-container.component.ts | 2 +- .../src/app/datagrid/inventory/inventory.ts | 4 +- .../app/modal/modal-angular-not-closable.ts | 2 +- .../demo/src/app/modal/modal-angular-show.ts | 2 +- .../modal/modal-angular-static-backdrop.ts | 2 +- .../demo/src/app/modal/modal-max-height.ts | 2 +- .../src/app/typography/utils/font-switcher.ts | 2 +- .../demo/src/app/wizard/wizard-inline.demo.ts | 2 +- .../demo/src/app/wizard/wizard-reset.demo.ts | 10 +-- .../src/app/z-index/custom-filter.demo.ts | 6 +- 145 files changed, 659 insertions(+), 656 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index dc75d831c1..d382c5ea94 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -30,6 +30,12 @@ module.exports = { extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'], plugins: ['license-header', '@typescript-eslint', 'jasmine', 'unused-imports'], rules: { + '@typescript-eslint/explicit-member-accessibility': [ + 'error', + { + accessibility: 'no-public', + }, + ], '@typescript-eslint/no-explicit-any': 'off', // Would LOVE to turn this on '@typescript-eslint/no-non-null-assertion': 'error', '@typescript-eslint/no-unused-vars': 'error', diff --git a/projects/angular/src/button/button-group/button-group.ts b/projects/angular/src/button/button-group/button-group.ts index 51d37bc518..512684b7d1 100644 --- a/projects/angular/src/button/button-group/button-group.ts +++ b/projects/angular/src/button/button-group/button-group.ts @@ -42,9 +42,9 @@ export class ClrButtonGroup implements AfterContentInit { private destroy$: ClrDestroyService ) {} - public popoverPosition: ClrPopoverPosition = ClrPopoverPositions['bottom-left']; + popoverPosition: ClrPopoverPosition = ClrPopoverPositions['bottom-left']; - public get open() { + get open() { return this.toggleService.open; } diff --git a/projects/angular/src/button/button-group/button.ts b/projects/angular/src/button/button-group/button.ts index 1efa4344dc..b48c702526 100644 --- a/projects/angular/src/button/button-group/button.ts +++ b/projects/angular/src/button/button-group/button.ts @@ -133,7 +133,7 @@ export class ClrButton implements LoadingListener { } } - public loading: boolean; + loading: boolean; loadingStateChange(state: ClrLoadingState): void { this.loading = state === ClrLoadingState.LOADING; diff --git a/projects/angular/src/button/button-loading/loading-button.ts b/projects/angular/src/button/button-loading/loading-button.ts index 01efce4966..b93143254b 100644 --- a/projects/angular/src/button/button-loading/loading-button.ts +++ b/projects/angular/src/button/button-loading/loading-button.ts @@ -62,13 +62,13 @@ const MIN_BUTTON_WIDTH = 42; host: { '[attr.disabled]': "disabled? '' : null" }, }) export class ClrLoadingButton implements LoadingListener { - public buttonState = ClrLoadingState; - public state: ClrLoadingState = ClrLoadingState.DEFAULT; + buttonState = ClrLoadingState; + state: ClrLoadingState = ClrLoadingState.DEFAULT; - @Input('disabled') public disabled: boolean; + @Input('disabled') disabled: boolean; @Output('clrLoadingChange') - public clrLoadingChange: EventEmitter = new EventEmitter(false); + clrLoadingChange: EventEmitter = new EventEmitter(false); constructor(public el: ElementRef, private renderer: Renderer2) {} diff --git a/projects/angular/src/data/datagrid/built-in/comparators/datagrid-property-comparator.ts b/projects/angular/src/data/datagrid/built-in/comparators/datagrid-property-comparator.ts index be92e0db48..99b5fd9b84 100644 --- a/projects/angular/src/data/datagrid/built-in/comparators/datagrid-property-comparator.ts +++ b/projects/angular/src/data/datagrid/built-in/comparators/datagrid-property-comparator.ts @@ -14,7 +14,7 @@ export class DatagridPropertyComparator implements ClrDatagridComparato this.nestedProp = new NestedProperty(prop); } - public compare(a: T, b: T): number { + compare(a: T, b: T): number { let propA = this.nestedProp.getPropValue(a); let propB = this.nestedProp.getPropValue(b); diff --git a/projects/angular/src/data/datagrid/built-in/filters/datagrid-numeric-filter-impl.ts b/projects/angular/src/data/datagrid/built-in/filters/datagrid-numeric-filter-impl.ts index dfb4832e32..826940c6dc 100644 --- a/projects/angular/src/data/datagrid/built-in/filters/datagrid-numeric-filter-impl.ts +++ b/projects/angular/src/data/datagrid/built-in/filters/datagrid-numeric-filter-impl.ts @@ -18,7 +18,7 @@ export class DatagridNumericFilterImpl implements ClrDatagridFilterInte */ private _changes = new Subject<[number, number]>(); // We do not want to expose the Subject itself, but the Observable which is read-only - public get changes(): Observable<[number, number]> { + get changes(): Observable<[number, number]> { return this._changes.asObservable(); } @@ -34,11 +34,11 @@ export class DatagridNumericFilterImpl implements ClrDatagridFilterInte * to the built-in string filter. */ - public get value(): [number, number] { + get value(): [number, number] { return [this._low, this._high]; } - public set value(vals: [number, number]) { + set value(vals: [number, number]) { const low = vals[0]; const high = vals[1]; if (low !== this._low || high !== this._high) { @@ -48,20 +48,20 @@ export class DatagridNumericFilterImpl implements ClrDatagridFilterInte } } - public get low() { + get low() { return this._low; } - public set low(low: number) { + set low(low: number) { if (low !== this._low) { this._low = low; this._changes.next([this._low, this._high]); } } - public get high() { + get high() { return this._high; } - public set high(high: number) { + set high(high: number) { if (high !== this._high) { this._high = high; this._changes.next([this._low, this._high]); @@ -71,20 +71,20 @@ export class DatagridNumericFilterImpl implements ClrDatagridFilterInte /** * Indicates if the filter is currently active, (at least one input is set) */ - public isActive(): boolean { + isActive(): boolean { return this._low !== null || this.high !== null; } /** * Tests if an item matches a search text */ - public accepts(item: T): boolean { + accepts(item: T): boolean { // We have a filter function in case someone wants to implement a numeric // filter that always passes nulls or similar return this.filterFn.accepts(item, this._low, this._high); } - public get state() { + get state() { if (this.filterFn instanceof DatagridPropertyNumericFilter) { return { property: this.filterFn.prop, @@ -95,7 +95,7 @@ export class DatagridNumericFilterImpl implements ClrDatagridFilterInte return this; } - public equals(other: ClrDatagridFilterInterface): boolean { + equals(other: ClrDatagridFilterInterface): boolean { if (other instanceof DatagridNumericFilterImpl) { if (other.filterFn instanceof DatagridPropertyNumericFilter) { return ( diff --git a/projects/angular/src/data/datagrid/built-in/filters/datagrid-numeric-filter.ts b/projects/angular/src/data/datagrid/built-in/filters/datagrid-numeric-filter.ts index b48d590cc1..4bb44ff648 100644 --- a/projects/angular/src/data/datagrid/built-in/filters/datagrid-numeric-filter.ts +++ b/projects/angular/src/data/datagrid/built-in/filters/datagrid-numeric-filter.ts @@ -106,17 +106,17 @@ export class DatagridNumericFilter /** * Indicates if the filter dropdown is open */ - public open = false; + open = false; /** * We need the actual input element to automatically focus on it */ - @ViewChild('input_low') public input: ElementRef; + @ViewChild('input_low') input: ElementRef; /** * We grab the ClrDatagridFilter we wrap to register this StringFilter to it. */ - @ViewChild(ClrDatagridFilter) public filterContainer: ClrDatagridFilter; + @ViewChild(ClrDatagridFilter) filterContainer: ClrDatagridFilter; ngAfterViewInit() { this.subscriptions.push( this.popoverToggleService.openChange.subscribe(openChange => { @@ -140,12 +140,12 @@ export class DatagridNumericFilter /** * Common setter for the input values */ - public get value() { + get value() { return [this.filter.low, this.filter.high]; } @Input('clrFilterValue') - public set value(values: [number, number]) { + set value(values: [number, number]) { if (this.filter && Array.isArray(values)) { if (values && (values[0] !== this.filter.low || values[1] !== this.filter.high)) { if (typeof values[0] === 'number') { @@ -165,7 +165,7 @@ export class DatagridNumericFilter } } - public get low() { + get low() { if (typeof this.filter.low === 'number' && isFinite(this.filter.low)) { return this.filter.low; } else { @@ -174,7 +174,7 @@ export class DatagridNumericFilter } } - public set low(low: number | string) { + set low(low: number | string) { if (typeof low === 'number' && low !== this.filter.low) { this.filter.low = low; this.filterValueChange.emit([this.filter.low, this.filter.high]); @@ -184,7 +184,7 @@ export class DatagridNumericFilter } } - public get high() { + get high() { if (typeof this.filter.high === 'number' && isFinite(this.filter.high)) { return this.filter.high; } else { @@ -193,7 +193,7 @@ export class DatagridNumericFilter } } - public set high(high: number | string) { + set high(high: number | string) { if (typeof high === 'number' && high !== this.filter.high) { this.filter.high = high; this.filterValueChange.emit([this.filter.low, this.filter.high]); diff --git a/projects/angular/src/data/datagrid/built-in/filters/datagrid-string-filter-impl.ts b/projects/angular/src/data/datagrid/built-in/filters/datagrid-string-filter-impl.ts index 983227119b..1143020b88 100644 --- a/projects/angular/src/data/datagrid/built-in/filters/datagrid-string-filter-impl.ts +++ b/projects/angular/src/data/datagrid/built-in/filters/datagrid-string-filter-impl.ts @@ -18,7 +18,7 @@ export class DatagridStringFilterImpl implements ClrDatagridFilterInter */ private _changes = new Subject(); // We do not want to expose the Subject itself, but the Observable which is read-only - public get changes(): Observable { + get changes(): Observable { return this._changes.asObservable(); } @@ -26,7 +26,7 @@ export class DatagridStringFilterImpl implements ClrDatagridFilterInter * Input value converted to lowercase */ private _lowerCaseValue = ''; - public get lowerCaseValue() { + get lowerCaseValue() { return this._lowerCaseValue; } @@ -34,13 +34,13 @@ export class DatagridStringFilterImpl implements ClrDatagridFilterInter * Raw input value */ private _rawValue = ''; - public get value(): string { + get value(): string { return this._rawValue; } /** * Common setter for the input value */ - public set value(value: string) { + set value(value: string) { if (!value) { value = ''; } @@ -54,19 +54,19 @@ export class DatagridStringFilterImpl implements ClrDatagridFilterInter /** * Indicates if the filter is currently active, meaning the input is not empty */ - public isActive(): boolean { + isActive(): boolean { return !!this.value; } /** * Tests if an item matches a search text */ - public accepts(item: T): boolean { + accepts(item: T): boolean { // We always test with the lowercase value of the input, to stay case insensitive return this.filterFn.accepts(item, this.lowerCaseValue); } - public get state() { + get state() { if (this.filterFn instanceof DatagridPropertyStringFilter) { return { property: this.filterFn.prop, @@ -76,7 +76,7 @@ export class DatagridStringFilterImpl implements ClrDatagridFilterInter return this; } - public equals(other: ClrDatagridFilterInterface): boolean { + equals(other: ClrDatagridFilterInterface): boolean { if (other instanceof DatagridStringFilterImpl) { if (other.filterFn instanceof DatagridPropertyStringFilter) { return ( diff --git a/projects/angular/src/data/datagrid/built-in/filters/datagrid-string-filter.ts b/projects/angular/src/data/datagrid/built-in/filters/datagrid-string-filter.ts index 99b5fb7e7a..a6adf6b903 100644 --- a/projects/angular/src/data/datagrid/built-in/filters/datagrid-string-filter.ts +++ b/projects/angular/src/data/datagrid/built-in/filters/datagrid-string-filter.ts @@ -92,17 +92,17 @@ export class DatagridStringFilter /** * Indicates if the filter dropdown is open */ - public open = false; + open = false; /** * We need the actual input element to automatically focus on it */ - @ViewChild('input') public input: ElementRef; + @ViewChild('input') input: ElementRef; /** * We grab the ClrDatagridFilter we wrap to register this StringFilter to it. */ - @ViewChild(ClrDatagridFilter) public filterContainer: ClrDatagridFilter; + @ViewChild(ClrDatagridFilter) filterContainer: ClrDatagridFilter; ngAfterViewInit() { this.subs.push( @@ -133,11 +133,11 @@ export class DatagridStringFilter /** * Common setter for the input value */ - public get value() { + get value() { return this.filter.value; } @Input('clrFilterValue') - public set value(value: string) { + set value(value: string) { if (this.filter && typeof value === 'string') { if (!value) { value = ''; diff --git a/projects/angular/src/data/datagrid/built-in/nested-property.ts b/projects/angular/src/data/datagrid/built-in/nested-property.ts index 7b73d72bf1..ceea21db26 100644 --- a/projects/angular/src/data/datagrid/built-in/nested-property.ts +++ b/projects/angular/src/data/datagrid/built-in/nested-property.ts @@ -19,7 +19,7 @@ export class NestedProperty { // Safe getter for a deep object property, will not throw an error but return // undefined if one of the intermediate properties is null or undefined. - public getPropValue(item: T): any { + getPropValue(item: T): any { if (this.splitProp) { let value = item; for (const nestedProp of this.splitProp) { diff --git a/projects/angular/src/data/datagrid/datagrid-action-overflow.ts b/projects/angular/src/data/datagrid/datagrid-action-overflow.ts index 454253f3b4..4cacb9c1a3 100644 --- a/projects/angular/src/data/datagrid/datagrid-action-overflow.ts +++ b/projects/angular/src/data/datagrid/datagrid-action-overflow.ts @@ -67,7 +67,7 @@ let clrDgActionId = 0; }) export class ClrDatagridActionOverflow implements OnDestroy { private subscriptions: Subscription[] = []; - public smartPosition: ClrPopoverPosition = { + smartPosition: ClrPopoverPosition = { axis: ClrAxis.HORIZONTAL, side: ClrSide.AFTER, anchor: ClrAlignment.CENTER, @@ -124,12 +124,12 @@ export class ClrDatagridActionOverflow implements OnDestroy { } private _open = false; - public get open() { + get open() { return this._open; } @Input('clrDgActionOverflowOpen') - public set open(open: boolean) { + set open(open: boolean) { const openState = !!open; if (!!openState !== this.open) { // prevents chocolate mess @@ -139,5 +139,5 @@ export class ClrDatagridActionOverflow implements OnDestroy { } } - @Output('clrDgActionOverflowOpenChange') public openChange = new EventEmitter(false); + @Output('clrDgActionOverflowOpenChange') openChange = new EventEmitter(false); } diff --git a/projects/angular/src/data/datagrid/datagrid-cell.ts b/projects/angular/src/data/datagrid/datagrid-cell.ts index 54a758896e..1cbe4015ff 100644 --- a/projects/angular/src/data/datagrid/datagrid-cell.ts +++ b/projects/angular/src/data/datagrid/datagrid-cell.ts @@ -38,7 +38,7 @@ export class ClrDatagridCell implements OnInit { this.wrappedInjector = new HostWrapper(WrappedCell, this.vcr); } - public get _view() { + get _view() { return this.wrappedInjector.get(WrappedCell, this.vcr).cellView; } } diff --git a/projects/angular/src/data/datagrid/datagrid-column-separator.ts b/projects/angular/src/data/datagrid/datagrid-column-separator.ts index 80e532aa40..932ec56307 100644 --- a/projects/angular/src/data/datagrid/datagrid-column-separator.ts +++ b/projects/angular/src/data/datagrid/datagrid-column-separator.ts @@ -92,21 +92,21 @@ export class ClrDatagridColumnSeparator implements AfterViewInit, OnDestroy { return `${this.columnSeparatorId}-aria-describedby`; } - public showTracker(): void { + showTracker(): void { this.columnResizerService.startResize(); const tableHeight = this.tableSizeService.getColumnDragHeight(); this.renderer.setStyle(this.resizeTrackerEl, 'height', tableHeight); this.renderer.setStyle(this.resizeTrackerEl, 'display', 'block'); } - public moveTracker(movedBy: number): void { + moveTracker(movedBy: number): void { this.columnResizerService.calculateResize(movedBy); this.renderer.setStyle(this.resizeTrackerEl, 'transform', `translateX(${this.columnResizerService.resizedBy}px)`); this.renderer.setStyle(this.document.body, 'cursor', 'col-resize'); this.redFlagTracker(); } - public hideTracker(): void { + hideTracker(): void { this.columnResizerService.endResize(); this.renderer.setStyle(this.resizeTrackerEl, 'display', 'none'); this.renderer.setStyle(this.resizeTrackerEl, 'transform', `translateX(0px)`); diff --git a/projects/angular/src/data/datagrid/datagrid-column-toggle.ts b/projects/angular/src/data/datagrid/datagrid-column-toggle.ts index bd697e4a42..082508c7d2 100644 --- a/projects/angular/src/data/datagrid/datagrid-column-toggle.ts +++ b/projects/angular/src/data/datagrid/datagrid-column-toggle.ts @@ -97,24 +97,24 @@ export class ClrDatagridColumnToggle implements OnDestroy { private subscription: Subscription; // Smart Popover - public smartPosition: ClrPopoverPosition = { + smartPosition: ClrPopoverPosition = { axis: ClrAxis.VERTICAL, side: ClrSide.BEFORE, anchor: ClrAlignment.START, content: ClrAlignment.START, }; - public openState: boolean; + openState: boolean; @ContentChild(ClrDatagridColumnToggleTitle) customToggleTitle: ClrDatagridColumnToggleTitle; @ContentChild(ClrDatagridColumnToggleButton) customToggleButton: ClrDatagridColumnToggleButton; @ViewChild('allSelected', { read: ElementRef }) private allSelectedElement: ElementRef; - public get allColumnsVisible(): boolean { + get allColumnsVisible(): boolean { return this._allColumnsVisible; } - public set allColumnsVisible(value: boolean) { + set allColumnsVisible(value: boolean) { this._allColumnsVisible = value; } diff --git a/projects/angular/src/data/datagrid/datagrid-column.ts b/projects/angular/src/data/datagrid/datagrid-column.ts index 970026325d..052e3199a6 100644 --- a/projects/angular/src/data/datagrid/datagrid-column.ts +++ b/projects/angular/src/data/datagrid/datagrid-column.ts @@ -109,7 +109,7 @@ export class ClrDatagridColumn this.subscriptions.push(this.listenForDetailPaneChanges()); } - public showSeparator = true; + showSeparator = true; /** * Subscription to the sort service changes @@ -176,12 +176,12 @@ export class ClrDatagridColumn * based on native comparison of the specified property on the items. */ private _field: string; - public get field() { + get field() { return this._field; } @Input('clrDgField') - public set field(field: string) { + set field(field: string) { if (typeof field === 'string') { this._field = field; @@ -229,12 +229,12 @@ export class ClrDatagridColumn private _sortBy: ClrDatagridComparatorInterface; - public get sortBy() { + get sortBy() { return this._sortBy; } @Input('clrDgSortBy') - public set sortBy(comparator: ClrDatagridComparatorInterface | string) { + set sortBy(comparator: ClrDatagridComparatorInterface | string) { if (typeof comparator === 'string') { this._sortBy = new DatagridPropertyComparator(comparator); } else { @@ -253,7 +253,7 @@ export class ClrDatagridColumn /** * Indicates if the column is sortable */ - public get sortable(): boolean { + get sortable(): boolean { return !!this._sortBy; } @@ -264,7 +264,7 @@ export class ClrDatagridColumn * @deprecated This will be removed soon, in favor of the sortOrder mechanism */ private _sorted = false; - public get sorted() { + get sorted() { return this._sorted; } @@ -272,7 +272,7 @@ export class ClrDatagridColumn * @deprecated This will be removed soon, in favor of the sortOrder mechanism */ @Input('clrDgSorted') - public set sorted(value: boolean) { + set sorted(value: boolean) { if (!value && this.sorted) { this._sorted = false; this._sort.clear(); @@ -284,7 +284,7 @@ export class ClrDatagridColumn /** * @deprecated This will be removed soon, in favor of the sortOrder mechanism */ - @Output('clrDgSortedChange') public sortedChange = new EventEmitter(); + @Output('clrDgSortedChange') sortedChange = new EventEmitter(); // deprecated: to be removed - END @@ -292,12 +292,12 @@ export class ClrDatagridColumn * Indicates how the column is currently sorted */ private _sortOrder: ClrDatagridSortOrder = ClrDatagridSortOrder.UNSORTED; - public get sortOrder() { + get sortOrder() { return this._sortOrder; } @Input('clrDgSortOrder') - public set sortOrder(value: ClrDatagridSortOrder) { + set sortOrder(value: ClrDatagridSortOrder) { if (typeof value === 'undefined') { return; } @@ -322,7 +322,7 @@ export class ClrDatagridColumn } } - public get ariaSort() { + get ariaSort() { switch (this._sortOrder) { default: case ClrDatagridSortOrder.UNSORTED: @@ -334,25 +334,25 @@ export class ClrDatagridColumn } } - @Output('clrDgSortOrderChange') public sortOrderChange = new EventEmitter(); + @Output('clrDgSortOrderChange') sortOrderChange = new EventEmitter(); /** * @deprecated * * Use `sortDirection` to indentify the sort direction */ - public sortIcon: string | null; + sortIcon: string | null; private _sortDirection: 'up' | 'down' | null; - public get sortDirection(): 'up' | 'down' | null { + get sortDirection(): 'up' | 'down' | null { return this._sortDirection; } /** * Sorts the datagrid based on this column */ - public sort(reverse?: boolean) { + sort(reverse?: boolean) { if (!this.sortable) { return; } @@ -375,10 +375,10 @@ export class ClrDatagridColumn /** * A custom filter for this column that can be provided in the projected content */ - public customFilter = false; + customFilter = false; @ContentChild(CustomFilter) - public set projectedFilter(custom: any) { + set projectedFilter(custom: any) { if (custom) { this.deleteFilter(); this.customFilter = true; @@ -388,23 +388,23 @@ export class ClrDatagridColumn /** * Help with accessibility for screen readers by providing custom placeholder text inside internal filters */ - @Input('clrFilterStringPlaceholder') public filterStringPlaceholder: string; + @Input('clrFilterStringPlaceholder') filterStringPlaceholder: string; get filterStringPlaceholderValue() { return this.filterStringPlaceholder || this.commonStrings.keys.filterItems; } - @Input('clrFilterNumberMaxPlaceholder') public filterNumberMaxPlaceholder: string; + @Input('clrFilterNumberMaxPlaceholder') filterNumberMaxPlaceholder: string; get filterNumberMaxPlaceholderValue() { return this.filterNumberMaxPlaceholder || this.commonStrings.keys.maxValue; } - @Input('clrFilterNumberMinPlaceholder') public filterNumberMinPlaceholder: string; + @Input('clrFilterNumberMinPlaceholder') filterNumberMinPlaceholder: string; get filterNumberMinPlaceholderValue() { return this.filterNumberMinPlaceholder || this.commonStrings.keys.minValue; } @Input('clrFilterValue') - public set updateFilterValue(newValue: string | [number, number]) { + set updateFilterValue(newValue: string | [number, number]) { if (this.filter) { if (this.filter instanceof DatagridStringFilterImpl) { if (!newValue || typeof newValue !== 'string') { @@ -431,7 +431,7 @@ export class ClrDatagridColumn // private initFilterValue: string | [number, number]; - public get filterValue() { + get filterValue() { if (this.filter instanceof DatagridStringFilterImpl || this.filter instanceof DatagridNumericFilterImpl) { return this.filter.value; } @@ -446,7 +446,7 @@ export class ClrDatagridColumn * * Orignial types: string | [number, number] */ - public set filterValue(newValue: any) { + set filterValue(newValue: any) { if (this.filter instanceof DatagridStringFilterImpl || this.filter instanceof DatagridNumericFilterImpl) { this.updateFilterValue = newValue; this.filterValueChange.emit(this.filter.value); @@ -461,7 +461,7 @@ export class ClrDatagridColumn this.wrappedInjector = new HostWrapper(WrappedColumn, this.vcr); } - public get _view() { + get _view() { return this.wrappedInjector.get(WrappedColumn, this.vcr).columnView; } } diff --git a/projects/angular/src/data/datagrid/datagrid-detail.ts b/projects/angular/src/data/datagrid/datagrid-detail.ts index 05374e710f..ad589811a9 100644 --- a/projects/angular/src/data/datagrid/datagrid-detail.ts +++ b/projects/angular/src/data/datagrid/datagrid-detail.ts @@ -34,7 +34,7 @@ import { DetailService } from './providers/detail.service'; `, }) export class ClrDatagridDetail { - @ContentChild(ClrDatagridDetailHeader) public header: ClrDatagridDetailHeader; + @ContentChild(ClrDatagridDetailHeader) header: ClrDatagridDetailHeader; constructor(public detailService: DetailService, public commonStrings: ClrCommonStringsService) {} diff --git a/projects/angular/src/data/datagrid/datagrid-filter.spec.ts b/projects/angular/src/data/datagrid/datagrid-filter.spec.ts index 52dae3043a..447a48cf2e 100644 --- a/projects/angular/src/data/datagrid/datagrid-filter.spec.ts +++ b/projects/angular/src/data/datagrid/datagrid-filter.spec.ts @@ -197,7 +197,7 @@ export default function (): void { } class TestFilter implements ClrDatagridFilterInterface { - public active = true; + active = true; isActive(): boolean { return this.active; diff --git a/projects/angular/src/data/datagrid/datagrid-filter.ts b/projects/angular/src/data/datagrid/datagrid-filter.ts index e83e495df0..839ec7de89 100644 --- a/projects/angular/src/data/datagrid/datagrid-filter.ts +++ b/projects/angular/src/data/datagrid/datagrid-filter.ts @@ -82,7 +82,7 @@ export class ClrDatagridFilter implements CustomFilter, OnDestroy { private subs: Subscription[] = []; - public ariaExpanded = false; + ariaExpanded = false; popoverId = uniqueIdFactory(); @@ -105,7 +105,7 @@ export class ClrDatagridFilter anchor: ElementRef; // Smart Popover - public smartPosition: ClrPopoverPosition = { + smartPosition: ClrPopoverPosition = { axis: ClrAxis.VERTICAL, side: ClrSide.AFTER, anchor: ClrAlignment.END, @@ -113,12 +113,12 @@ export class ClrDatagridFilter }; private _open = false; - public get open() { + get open() { return this._open; } @Input('clrDgFilterOpen') - public set open(open: boolean) { + set open(open: boolean) { open = !!open; if (this.open !== open) { this.smartToggleService.open = open; @@ -131,17 +131,17 @@ export class ClrDatagridFilter } } - @Output('clrDgFilterOpenChange') public openChange = new EventEmitter(false); + @Output('clrDgFilterOpenChange') openChange = new EventEmitter(false); @Input('clrDgFilter') - public set customFilter(filter: ClrDatagridFilterInterface | RegisteredFilter>) { + set customFilter(filter: ClrDatagridFilterInterface | RegisteredFilter>) { this.setFilter(filter); } /** * Indicates if the filter is currently active */ - public get active() { + get active() { return !!this.filter && this.filter.isActive(); } diff --git a/projects/angular/src/data/datagrid/datagrid-footer.ts b/projects/angular/src/data/datagrid/datagrid-footer.ts index 135040af8c..3b13b692c5 100644 --- a/projects/angular/src/data/datagrid/datagrid-footer.ts +++ b/projects/angular/src/data/datagrid/datagrid-footer.ts @@ -47,7 +47,7 @@ export class ClrDatagridFooter { ) {} /* reference to the enum so that template can access */ - public SELECTION_TYPE = SelectionType; + SELECTION_TYPE = SelectionType; @ContentChild(ClrDatagridColumnToggle) toggle: ClrDatagridColumnToggle; diff --git a/projects/angular/src/data/datagrid/datagrid-hideable-column.ts b/projects/angular/src/data/datagrid/datagrid-hideable-column.ts index d61c938ea4..d458572165 100644 --- a/projects/angular/src/data/datagrid/datagrid-hideable-column.ts +++ b/projects/angular/src/data/datagrid/datagrid-hideable-column.ts @@ -81,7 +81,7 @@ export class ClrDatagridHideableColumn implements OnDestroy { }); } - @Output('clrDgHiddenChange') public hiddenChange = new EventEmitter(); + @Output('clrDgHiddenChange') hiddenChange = new EventEmitter(); constructor( private titleTemplateRef: TemplateRef, diff --git a/projects/angular/src/data/datagrid/datagrid-if-detail.ts b/projects/angular/src/data/datagrid/datagrid-if-detail.ts index d06e66135d..f170d627d6 100644 --- a/projects/angular/src/data/datagrid/datagrid-if-detail.ts +++ b/projects/angular/src/data/datagrid/datagrid-if-detail.ts @@ -35,7 +35,7 @@ export class ClrIfDetail implements OnInit, OnDestroy { this.skip = false; } - @Output('clrIfDetailChange') public stateChange = new EventEmitter(null); + @Output('clrIfDetailChange') stateChange = new EventEmitter(null); constructor( private templateRef: TemplateRef, diff --git a/projects/angular/src/data/datagrid/datagrid-items.ts b/projects/angular/src/data/datagrid/datagrid-items.ts index f532dc328a..f68efac549 100644 --- a/projects/angular/src/data/datagrid/datagrid-items.ts +++ b/projects/angular/src/data/datagrid/datagrid-items.ts @@ -30,7 +30,7 @@ export class ClrDatagridItems implements DoCheck, OnDestroy { private subscriptions: Subscription[] = []; @Input('clrDgItemsOf') - public set rawItems(items: T[]) { + set rawItems(items: T[]) { this._rawItems = items ? items : []; // local copy for ngOnChange diffing } diff --git a/projects/angular/src/data/datagrid/datagrid-pagination.ts b/projects/angular/src/data/datagrid/datagrid-pagination.ts index 86e8e64587..343e01338c 100644 --- a/projects/angular/src/data/datagrid/datagrid-pagination.ts +++ b/projects/angular/src/data/datagrid/datagrid-pagination.ts @@ -158,17 +158,17 @@ export class ClrDatagridPagination implements OnDestroy, OnInit { } } - @Input('clrDgPageInputDisabled') public disableCurrentPageInput: boolean; + @Input('clrDgPageInputDisabled') disableCurrentPageInput: boolean; /** * Page size */ - public get pageSize(): number | string { + get pageSize(): number | string { return this.page.size; } @Input('clrDgPageSize') - public set pageSize(size: number | string) { + set pageSize(size: number | string) { if (typeof size === 'number') { this.page.size = size as number; } @@ -177,12 +177,12 @@ export class ClrDatagridPagination implements OnDestroy, OnInit { /** * Total items (needed to guess the last page) */ - public get totalItems(): number | string { + get totalItems(): number | string { return this.page.totalItems; } @Input('clrDgTotalItems') - public set totalItems(total: number | string) { + set totalItems(total: number | string) { if (typeof total === 'number') { this.page.totalItems = total as number; } @@ -191,12 +191,12 @@ export class ClrDatagridPagination implements OnDestroy, OnInit { /** * Last page */ - public get lastPage(): number | string { + get lastPage(): number | string { return this.page.last; } @Input('clrDgLastPage') - public set lastPage(last: number | string) { + set lastPage(last: number | string) { if (typeof last === 'number') { this.page.last = last as number; } @@ -205,12 +205,12 @@ export class ClrDatagridPagination implements OnDestroy, OnInit { /** * Current page */ - public get currentPage(): number | string { + get currentPage(): number | string { return this.page.current; } @Input('clrDgPage') - public set currentPage(page: number | string) { + set currentPage(page: number | string) { if (typeof page === 'number') { this.page.current = page as number; } @@ -221,35 +221,35 @@ export class ClrDatagridPagination implements OnDestroy, OnInit { /** * Moves to the previous page if it exists */ - public previous() { + previous() { this.page.previous(); } /** * Moves to the next page if it exists */ - public next() { + next() { this.page.next(); } /** * Index of the first item displayed on the current page, starting at 0, -1 if none displayed */ - public get firstItem(): number { + get firstItem(): number { return this.page.firstItem; } /** * Index of the last item displayed on the current page, starting at 0, -1 if none displayed */ - public get lastItem(): number { + get lastItem(): number { return this.page.lastItem; } /** * Conditionally adds page numbers before and after the current page */ - public get middlePages(): number[] { + get middlePages(): number[] { const middlePages: number[] = []; if (this.page.current > 1) { middlePages.push(this.page.current - 1); @@ -265,7 +265,7 @@ export class ClrDatagridPagination implements OnDestroy, OnInit { * We only update the pagination's current page on blur of the input field, or * when they press enter. */ - public updateCurrentPage(event: any): void { + updateCurrentPage(event: any): void { const parsed = parseInt(event.target.value, 10); // if the input value, is not a number, we don't update the page diff --git a/projects/angular/src/data/datagrid/datagrid-placeholder.ts b/projects/angular/src/data/datagrid/datagrid-placeholder.ts index 3fb9f3f2ce..1d51303462 100644 --- a/projects/angular/src/data/datagrid/datagrid-placeholder.ts +++ b/projects/angular/src/data/datagrid/datagrid-placeholder.ts @@ -24,7 +24,7 @@ export class ClrDatagridPlaceholder { /** * Tests if the datagrid is empty, meaning it doesn't contain any items */ - public get emptyDatagrid() { + get emptyDatagrid() { return !this.items.loading && (!this.items.displayed || this.items.displayed.length === 0); } } diff --git a/projects/angular/src/data/datagrid/datagrid-row-detail.spec.ts b/projects/angular/src/data/datagrid/datagrid-row-detail.spec.ts index 2fd5bd3797..48cfd2bd79 100644 --- a/projects/angular/src/data/datagrid/datagrid-row-detail.spec.ts +++ b/projects/angular/src/data/datagrid/datagrid-row-detail.spec.ts @@ -91,6 +91,6 @@ export default function (): void { `, }) class FullTest { - public replace = false; - public cell = false; + replace = false; + cell = false; } diff --git a/projects/angular/src/data/datagrid/datagrid-row-detail.ts b/projects/angular/src/data/datagrid/datagrid-row-detail.ts index 0aef5aa114..754fd7324e 100644 --- a/projects/angular/src/data/datagrid/datagrid-row-detail.ts +++ b/projects/angular/src/data/datagrid/datagrid-row-detail.ts @@ -40,7 +40,7 @@ import { Selection } from './providers/selection'; }) export class ClrDatagridRowDetail implements AfterContentInit, OnDestroy { /* reference to the enum so that template can access it */ - public SELECTION_TYPE = SelectionType; + SELECTION_TYPE = SelectionType; constructor( public selection: Selection, @@ -57,7 +57,7 @@ export class ClrDatagridRowDetail implements AfterContentInit, OnDestroy { this.expand.setReplace(!!value); } private subscriptions: Subscription[] = []; - public replacedRow = false; + replacedRow = false; ngAfterContentInit() { this.subscriptions.push( @@ -73,7 +73,7 @@ export class ClrDatagridRowDetail implements AfterContentInit, OnDestroy { // TODO: @deprecated - dategrid* keys are deprecated. Remove in v14. @Input('clrRowDetailBeginningAriaText') _beginningOfExpandableContentAriaText: string; - public get beginningOfExpandableContentAriaText() { + get beginningOfExpandableContentAriaText() { return ( this._beginningOfExpandableContentAriaText || `${ @@ -85,7 +85,7 @@ export class ClrDatagridRowDetail implements AfterContentInit, OnDestroy { // TODO: @deprecated - dategrid* keys are deprecated. Remove in v14. @Input('clrRowDetailEndAriaText') _endOfExpandableContentAriaText: string; - public get endOfExpandableContentAriaText() { + get endOfExpandableContentAriaText() { return ( this._endOfExpandableContentAriaText || `${this.commonStrings.keys.dategridExpandableEndOf || this.commonStrings.keys.datagridExpandableEndOf} diff --git a/projects/angular/src/data/datagrid/datagrid-row.ts b/projects/angular/src/data/datagrid/datagrid-row.ts index cdb8d27f4f..2491ed2bb9 100644 --- a/projects/angular/src/data/datagrid/datagrid-row.ts +++ b/projects/angular/src/data/datagrid/datagrid-row.ts @@ -58,13 +58,13 @@ let nbRow = 0; ], }) export class ClrDatagridRow implements AfterContentInit, AfterViewInit { - public id: string; - public radioId: string; - public checkboxId: string; - public expandableId: string; + id: string; + radioId: string; + checkboxId: string; + expandableId: string; /* reference to the enum so that template can access */ - public SELECTION_TYPE = SelectionType; + SELECTION_TYPE = SelectionType; @ViewChild(ClrExpandableAnimation) expandAnimation: ClrExpandableAnimation; @@ -73,9 +73,9 @@ export class ClrDatagridRow implements AfterContentInit, AfterViewInit */ @Input('clrDgItem') item: T; - public replaced: boolean; + replaced: boolean; - public expandAnimationTrigger = false; + expandAnimationTrigger = false; /** * The default behavior in Chrome and Firefox for shift-clicking on a label is to perform text-selection. @@ -138,7 +138,7 @@ export class ClrDatagridRow implements AfterContentInit, AfterViewInit /** * Indicates if the row is selected */ - public get selected() { + get selected() { if (this.selection.selectionType === SelectionType.None) { return this._selected; } else { @@ -147,7 +147,7 @@ export class ClrDatagridRow implements AfterContentInit, AfterViewInit } @Input('clrDgSelected') - public set selected(value: boolean | string) { + set selected(value: boolean | string) { if (this.selection.selectionType === SelectionType.None) { this._selected = value as boolean; } else { @@ -162,35 +162,35 @@ export class ClrDatagridRow implements AfterContentInit, AfterViewInit // By default every item is selectable; it becomes not selectable only if it's explicitly set to false @Input('clrDgSelectable') - public set clrDgSelectable(value: boolean | string) { + set clrDgSelectable(value: boolean | string) { this.selection.lockItem(this.item, value === false); } - public get clrDgSelectable() { + get clrDgSelectable() { return !this.selection.isLocked(this.item); } @Output('clrDgSelectedChange') selectedChanged = new EventEmitter(false); - public toggle(selected = !this.selected) { + toggle(selected = !this.selected) { if (selected !== this.selected) { this.selected = selected; this.selectedChanged.emit(selected); } } - public get expanded() { + get expanded() { return this.expand.expanded; } @Input('clrDgExpanded') - public set expanded(value: boolean | string) { + set expanded(value: boolean | string) { this.expand.expanded = value as boolean; } @Output('clrDgExpandedChange') expandedChange = new EventEmitter(false); - public toggleExpand() { + toggleExpand() { if (this.expand.expandable) { this.expandAnimation.updateStartHeight(); this.expanded = !this.expanded; @@ -312,7 +312,7 @@ export class ClrDatagridRow implements AfterContentInit, AfterViewInit this.subscriptions.forEach((sub: Subscription) => sub.unsubscribe()); } - public displayCells = false; + displayCells = false; @ViewChild('stickyCells', { read: ViewContainerRef }) _stickyCells: ViewContainerRef; @@ -328,7 +328,7 @@ export class ClrDatagridRow implements AfterContentInit, AfterViewInit this.selection.lockItem(this.item, this.clrDgSelectable === false); } - public get _view() { + get _view() { return this.wrappedInjector.get(WrappedRow, this.vcr).rowView; } } diff --git a/projects/angular/src/data/datagrid/datagrid.ts b/projects/angular/src/data/datagrid/datagrid.ts index c5026782b9..9bca36219c 100644 --- a/projects/angular/src/data/datagrid/datagrid.ts +++ b/projects/angular/src/data/datagrid/datagrid.ts @@ -76,7 +76,7 @@ import { KeyNavigationGridController } from './utils/key-navigation-grid.control }, }) export class ClrDatagrid implements AfterContentInit, AfterViewInit, OnDestroy { - public selectAllId: string; + selectAllId: string; constructor( private organizer: DatagridRenderOrganizer, public items: Items, @@ -102,36 +102,36 @@ export class ClrDatagrid implements AfterContentInit, AfterViewInit, On } /* reference to the enum so that template can access */ - public SELECTION_TYPE = SelectionType; + SELECTION_TYPE = SelectionType; /** * Freezes the datagrid while data is loading */ - public get loading(): boolean { + get loading(): boolean { return this.items.loading; } @Input('clrDgLoading') - public set loading(value: boolean) { + set loading(value: boolean) { this.items.loading = value; } /** * Output emitted whenever the data needs to be refreshed, based on user action or external ones */ - @Output('clrDgRefresh') public refresh = new EventEmitter>(false); + @Output('clrDgRefresh') refresh = new EventEmitter>(false); /** * Public method to re-trigger the computation of displayed items manually */ - public dataChanged() { + dataChanged() { this.items.refresh(); } /** * We grab the smart iterator from projected content */ - @ContentChild(ClrDatagridItems) public iterator: ClrDatagridItems; + @ContentChild(ClrDatagridItems) iterator: ClrDatagridItems; /** * Array of all selected items @@ -189,7 +189,7 @@ export class ClrDatagrid implements AfterContentInit, AfterViewInit, On /** * Indicates if all currently displayed items are selected */ - public get allSelected() { + get allSelected() { return this.selection.isAllSelected(); } @@ -197,7 +197,7 @@ export class ClrDatagrid implements AfterContentInit, AfterViewInit, On * Selects/deselects all currently displayed items * @param value */ - public set allSelected(_value: boolean) { + set allSelected(_value: boolean) { /** * This is a setter but we ignore the value. * It's strange, but it lets us have an indeterminate state where only @@ -209,12 +209,12 @@ export class ClrDatagrid implements AfterContentInit, AfterViewInit, On /** * Custom placeholder detection */ - @ContentChild(ClrDatagridPlaceholder) public placeholder: ClrDatagridPlaceholder; + @ContentChild(ClrDatagridPlaceholder) placeholder: ClrDatagridPlaceholder; /** * Hideable Column data source / detection. */ - @ContentChildren(ClrDatagridColumn) public columns: QueryList>; + @ContentChildren(ClrDatagridColumn) columns: QueryList>; /** * When the datagrid is user-managed without the smart iterator, we get the items displayed diff --git a/projects/angular/src/data/datagrid/providers/column-resizer.service.ts b/projects/angular/src/data/datagrid/providers/column-resizer.service.ts index e881158c0b..8dff855478 100644 --- a/projects/angular/src/data/datagrid/providers/column-resizer.service.ts +++ b/projects/angular/src/data/datagrid/providers/column-resizer.service.ts @@ -22,36 +22,36 @@ export class ColumnResizerService { private _resizedBy = 0; - public get resizedBy() { + get resizedBy() { return this._resizedBy; } // is it within the maximum resize range to the left - public isWithinMaxResizeRange: boolean; + isWithinMaxResizeRange: boolean; - public get minColumnWidth() { + get minColumnWidth() { return this.domAdapter.minWidth(this.el.nativeElement) || MIN_COLUMN_WIDTH; } - public get maxResizeRange() { + get maxResizeRange() { return this.widthBeforeResize - this.minColumnWidth; } - public startResize(): void { + startResize(): void { this._resizedBy = 0; this.isWithinMaxResizeRange = true; this.widthBeforeResize = this.domAdapter.clientRect(this.el.nativeElement).width; } - public endResize(): void { + endResize(): void { this.organizer.resize(); } - public get widthAfterResize(): number { + get widthAfterResize(): number { return this.widthBeforeResize + this._resizedBy; } - public calculateResize(resizedBy: number): void { + calculateResize(resizedBy: number): void { // calculates the resize amount within the allowed range if (resizedBy < -this.maxResizeRange) { this._resizedBy = -this.maxResizeRange; diff --git a/projects/angular/src/data/datagrid/providers/detail.service.ts b/projects/angular/src/data/datagrid/providers/detail.service.ts index 0535c9e89a..3872471ac2 100644 --- a/projects/angular/src/data/datagrid/providers/detail.service.ts +++ b/projects/angular/src/data/datagrid/providers/detail.service.ts @@ -14,7 +14,7 @@ export class DetailService { private cache: any; private _enabled = false; private button: HTMLButtonElement; - public id: string; + id: string; get enabled(): boolean { return this._enabled; @@ -24,7 +24,7 @@ export class DetailService { this._enabled = state; } - public get stateChange(): Observable { + get stateChange(): Observable { return this._state.asObservable(); } diff --git a/projects/angular/src/data/datagrid/providers/display-mode.mock.ts b/projects/angular/src/data/datagrid/providers/display-mode.mock.ts index 86d837c055..c02eb85c20 100644 --- a/projects/angular/src/data/datagrid/providers/display-mode.mock.ts +++ b/projects/angular/src/data/datagrid/providers/display-mode.mock.ts @@ -16,7 +16,7 @@ export class MockDisplayModeService extends DisplayModeService { super(renderOrganizer); } - public updateView(mode: DatagridDisplayMode) { + updateView(mode: DatagridDisplayMode) { this._view.next(mode); } } diff --git a/projects/angular/src/data/datagrid/providers/display-mode.service.ts b/projects/angular/src/data/datagrid/providers/display-mode.service.ts index a4c4791bbd..5380b35015 100644 --- a/projects/angular/src/data/datagrid/providers/display-mode.service.ts +++ b/projects/angular/src/data/datagrid/providers/display-mode.service.ts @@ -32,7 +32,7 @@ export class DisplayModeService implements OnDestroy { ); } - public get view(): Observable { + get view(): Observable { return this._view.asObservable(); } diff --git a/projects/angular/src/data/datagrid/providers/filters.ts b/projects/angular/src/data/datagrid/providers/filters.ts index cfaa74488a..4df41d9483 100644 --- a/projects/angular/src/data/datagrid/providers/filters.ts +++ b/projects/angular/src/data/datagrid/providers/filters.ts @@ -21,7 +21,7 @@ export class FiltersProvider { */ private _change = new Subject[]>(); // We do not want to expose the Subject itself, but the Observable which is read-only - public get change(): Observable[]> { + get change(): Observable[]> { return this._change.asObservable(); } @@ -33,7 +33,7 @@ export class FiltersProvider { /** * Tests if at least one filter is currently active */ - public hasActiveFilters(): boolean { + hasActiveFilters(): boolean { // We do not use getActiveFilters() because this function will be called much more often // and stopping the loop early might be relevant. for (const { filter } of this._all) { @@ -47,7 +47,7 @@ export class FiltersProvider { /** * Returns a list of all currently active filters */ - public getActiveFilters(): ClrDatagridFilterInterface[] { + getActiveFilters(): ClrDatagridFilterInterface[] { const ret: ClrDatagridFilterInterface[] = []; for (const { filter } of this._all) { if (filter && filter.isActive()) { @@ -60,7 +60,7 @@ export class FiltersProvider { /** * Registers a filter, and returns a deregistration function */ - public add>(filter: F): RegisteredFilter { + add>(filter: F): RegisteredFilter { const subscription = filter.changes.subscribe(() => this.resetPageAndEmitFilterChange([filter])); let hasUnregistered = false; const registered = new RegisteredFilter(filter, () => { @@ -87,7 +87,7 @@ export class FiltersProvider { /** * Accepts an item if it is accepted by all currently active filters */ - public accepts(item: T): boolean { + accepts(item: T): boolean { for (const { filter } of this._all) { if (filter && filter.isActive() && !filter.accepts(item)) { return false; diff --git a/projects/angular/src/data/datagrid/providers/global-expandable-rows.ts b/projects/angular/src/data/datagrid/providers/global-expandable-rows.ts index dc86102b7c..0b4551b147 100644 --- a/projects/angular/src/data/datagrid/providers/global-expandable-rows.ts +++ b/projects/angular/src/data/datagrid/providers/global-expandable-rows.ts @@ -14,11 +14,11 @@ export class ExpandableRowsCount { private expandableCount = 0; - public register() { + register() { this.expandableCount++; } - public unregister() { + unregister() { this.expandableCount--; } @@ -26,7 +26,7 @@ export class ExpandableRowsCount { * false means no rows with action * check if details are on, and disable rows entirely */ - public get hasExpandableRow(): boolean { + get hasExpandableRow(): boolean { return !this.detailService.enabled && this.expandableCount > 0; } } diff --git a/projects/angular/src/data/datagrid/providers/items.spec.ts b/projects/angular/src/data/datagrid/providers/items.spec.ts index e5efc25bf1..213ee70362 100644 --- a/projects/angular/src/data/datagrid/providers/items.spec.ts +++ b/projects/angular/src/data/datagrid/providers/items.spec.ts @@ -251,7 +251,7 @@ class TestComparator implements ClrDatagridComparatorInterface { class NameFilter implements ClrDatagridFilterInterface { private _search = ''; - public search(value: string) { + search(value: string) { this._search = value; this.changes.next(value); } diff --git a/projects/angular/src/data/datagrid/providers/items.ts b/projects/angular/src/data/datagrid/providers/items.ts index 4c6c7f142b..daca121eb1 100644 --- a/projects/angular/src/data/datagrid/providers/items.ts +++ b/projects/angular/src/data/datagrid/providers/items.ts @@ -20,13 +20,13 @@ export class Items { /** * Indicates if the data is currently loading */ - public loading = false; + loading = false; // TODO: Verify that trackBy is registered for the *ngFor case too /** * Tracking function to identify objects. Default is reference equality. */ - public trackBy: TrackByFunction = (_index: number, item: T) => item; + trackBy: TrackByFunction = (_index: number, item: T) => item; /** * Subscriptions to the other providers changes. @@ -37,7 +37,7 @@ export class Items { /** * Cleans up our subscriptions to other providers */ - public destroy() { + destroy() { if (this._filtersSub) { this._filtersSub.unsubscribe(); } @@ -54,10 +54,10 @@ export class Items { * everything. */ private _smart = false; - public get smart(): boolean { + get smart(): boolean { return this._smart; } - public smartenUp() { + smartenUp() { this._smart = true; /* * These observers trigger a chain of function: filter -> sort -> paginate @@ -80,10 +80,10 @@ export class Items { * List of all items in the datagrid */ private _all: T[]; - public get all() { + get all() { return this._all; } - public set all(items: T[]) { + set all(items: T[]) { this._all = items; this.emitAllChanges(items); if (this.smart) { @@ -97,7 +97,7 @@ export class Items { /** * Manually recompute the list of displayed items */ - public refresh() { + refresh() { if (this.smart) { this._filterItems(); } @@ -112,7 +112,7 @@ export class Items { * List of items currently displayed */ private _displayed: T[] = []; - public get displayed(): T[] { + get displayed(): T[] { // Ideally we could return an immutable array, but we don't have it in Clarity yet. return this._displayed; } @@ -125,7 +125,7 @@ export class Items { this._change.next(this.displayed); } // We do not want to expose the Subject itself, but the Observable which is read-only - public get change(): Observable { + get change(): Observable { return this._change.asObservable(); } @@ -134,7 +134,7 @@ export class Items { this._allChanges.next(items); } - public get allChanges(): Observable { + get allChanges(): Observable { return this._allChanges.asObservable(); } diff --git a/projects/angular/src/data/datagrid/providers/page.ts b/projects/angular/src/data/datagrid/providers/page.ts index 089acab60d..4d652a3177 100644 --- a/projects/angular/src/data/datagrid/providers/page.ts +++ b/projects/angular/src/data/datagrid/providers/page.ts @@ -15,16 +15,16 @@ export class Page { constructor(private stateDebouncer: StateDebouncer) {} private preventEmit = false; - public activated = false; + activated = false; /** * Page size, a value of 0 means no pagination */ private _size = 0; - public get size(): number { + get size(): number { return this._size; } - public set size(size: number) { + set size(size: number) { const oldSize = this._size; if (size !== oldSize) { if (!this.preventEmit) { @@ -53,10 +53,10 @@ export class Page { * Total items (needed to guess the last page) */ private _totalItems?: number; - public get totalItems(): number { + get totalItems(): number { return this._totalItems || 0; // remains 0 if not set to avoid breaking change } - public set totalItems(total: number) { + set totalItems(total: number) { this._totalItems = total; // If we have less items than before, we might need to change the current page if (this.current > this.last) { @@ -68,7 +68,7 @@ export class Page { * Last page */ private _last: number; - public get last(): number { + get last(): number { if (this._last) { return this._last; } @@ -78,7 +78,7 @@ export class Page { } return 1; } - public set last(page: number) { + set last(page: number) { this._last = page; } @@ -87,13 +87,13 @@ export class Page { */ private _change = new Subject(); // We do not want to expose the Subject itself, but the Observable which is read-only - public get change(): Observable { + get change(): Observable { return this._change.asObservable(); } private _sizeChange = new Subject(); - public get sizeChange(): Observable { + get sizeChange(): Observable { return this._sizeChange.asObservable(); } @@ -101,10 +101,10 @@ export class Page { * Current page */ private _current = 1; - public get current(): number { + get current(): number { return this._current; } - public set current(page: number) { + set current(page: number) { if (page !== this._current) { this.stateDebouncer.changeStart(); this._current = page; @@ -116,7 +116,7 @@ export class Page { /** * Moves to the previous page if it exists */ - public previous() { + previous() { if (this.current > 1) { this.current--; } @@ -125,7 +125,7 @@ export class Page { /** * Moves to the next page if it exists */ - public next() { + next() { if (this.current < this.last) { this.current++; } @@ -134,7 +134,7 @@ export class Page { /** * Index of the first item displayed on the current page, starting at 0, -1 if none displayed */ - public get firstItem(): number { + get firstItem(): number { if (this._totalItems === 0) { return -1; } @@ -148,7 +148,7 @@ export class Page { /** * Index of the last item displayed on the current page, starting at 0, -1 if none displayed */ - public get lastItem(): number { + get lastItem(): number { if (this._totalItems === 0) { return -1; } @@ -166,7 +166,7 @@ export class Page { /** * Resets the page size to 0 */ - public resetPageSize(preventEmit = false): void { + resetPageSize(preventEmit = false): void { this.preventEmit = preventEmit; this.size = 0; } diff --git a/projects/angular/src/data/datagrid/providers/row-action-service.ts b/projects/angular/src/data/datagrid/providers/row-action-service.ts index e33b35c777..aa4c500aad 100644 --- a/projects/angular/src/data/datagrid/providers/row-action-service.ts +++ b/projects/angular/src/data/datagrid/providers/row-action-service.ts @@ -10,18 +10,18 @@ import { Injectable } from '@angular/core'; export class RowActionService { private actionableCount = 0; - public register() { + register() { this.actionableCount++; } - public unregister() { + unregister() { this.actionableCount--; } /** * false means no rows with action */ - public get hasActionableRow(): boolean { + get hasActionableRow(): boolean { return this.actionableCount > 0; } } diff --git a/projects/angular/src/data/datagrid/providers/selection.ts b/projects/angular/src/data/datagrid/providers/selection.ts index 1180215037..a7601e2f4c 100644 --- a/projects/angular/src/data/datagrid/providers/selection.ts +++ b/projects/angular/src/data/datagrid/providers/selection.ts @@ -16,8 +16,8 @@ let nbSelection = 0; @Injectable() export class Selection { - public id: string; - public preserveSelection = false; + id: string; + preserveSelection = false; private prevSelectionRefs: T[] = []; // Refs of selected items private prevSingleSelectionRef: T; // Ref of single selected item private lockedRefs: T[] = []; // Ref of locked items @@ -165,7 +165,7 @@ export class Selection { this.subscriptions.push(this.valueCollector.pipe(debounceTime(0)).subscribe(() => this.emitChange())); } - public clearSelection(): void { + clearSelection(): void { this._current = []; this.prevSelectionRefs = []; this.prevSingleSelectionRef = null; @@ -174,10 +174,10 @@ export class Selection { } private _selectionType: SelectionType = SelectionType.None; - public get selectionType(): SelectionType { + get selectionType(): SelectionType { return this._selectionType; } - public set selectionType(value: SelectionType) { + set selectionType(value: SelectionType) { if (value === this.selectionType) { return; } @@ -190,7 +190,7 @@ export class Selection { } /** @deprecated since 2.0, remove in 3.0 */ - public rowSelectionMode = false; + rowSelectionMode = false; private get _selectable(): boolean { return this._selectionType === SelectionType.Multi || this._selectionType === SelectionType.Single; @@ -204,7 +204,7 @@ export class Selection { /** * Cleans up our subscriptions to other providers */ - public destroy() { + destroy() { this.subscriptions.forEach(sub => sub.unsubscribe()); } @@ -212,10 +212,10 @@ export class Selection { * The current selection in single selection type */ private _currentSingle: T; - public get currentSingle(): T { + get currentSingle(): T { return this._currentSingle; } - public set currentSingle(value: T) { + set currentSingle(value: T) { if (value === this._currentSingle) { return; } @@ -232,24 +232,24 @@ export class Selection { * The current selection */ private _current: T[]; - public get current(): T[] { + get current(): T[] { return this._current; } - public set current(value: T[]) { + set current(value: T[]) { this.updateCurrent(value, true); } /** * Last selection, for use in range selection. */ - public rangeStart: T; + rangeStart: T; /** * Shift key state, for use in range selection. */ - public shiftPressed = false; + shiftPressed = false; private valueCollector: Subject = new Subject(); - public updateCurrent(value: T[], emit: boolean) { + updateCurrent(value: T[], emit: boolean) { this._current = value; if (emit) { @@ -269,14 +269,14 @@ export class Selection { } } // We do not want to expose the Subject itself, but the Observable which is read-only - public get change(): Observable { + get change(): Observable { return this._change.asObservable(); } /** * Checks if an item is currently selected */ - public isSelected(item: T): boolean { + isSelected(item: T): boolean { if (this._selectionType === SelectionType.Single) { return this.currentSingle === item; } else if (this._selectionType === SelectionType.Multi) { @@ -313,7 +313,7 @@ export class Selection { /** * Selects or deselects an item */ - public setSelected(item: T, selected: boolean) { + setSelected(item: T, selected: boolean) { const index = this.current ? this.current.indexOf(item) : -1; switch (this._selectionType) { @@ -337,7 +337,7 @@ export class Selection { /** * Checks if all currently displayed items are selected */ - public isAllSelected(): boolean { + isAllSelected(): boolean { if (this._selectionType !== SelectionType.Multi || !this._items.displayed) { return false; } @@ -369,7 +369,7 @@ export class Selection { /** * Lock and unlock item */ - public lockItem(item: T, lock: boolean) { + lockItem(item: T, lock: boolean) { if (this.canItBeLocked()) { const ref = this._items.trackBy( this._items.all.findIndex(maybe => maybe === item), @@ -388,7 +388,7 @@ export class Selection { /** * Check is item locked or not by searcing into lockedRefs for entry */ - public isLocked(item: T): boolean { + isLocked(item: T): boolean { /** * The check for selectionType will boost the performence by NOT searching * into the array when there is no need for that. @@ -407,7 +407,7 @@ export class Selection { /** * Selects or deselects all currently displayed items */ - public toggleAll() { + toggleAll() { if (this._selectionType === SelectionType.None || this._selectionType === SelectionType.Single) { return; } diff --git a/projects/angular/src/data/datagrid/providers/sort.ts b/projects/angular/src/data/datagrid/providers/sort.ts index d99f04b3d0..b2eb4db4a2 100644 --- a/projects/angular/src/data/datagrid/providers/sort.ts +++ b/projects/angular/src/data/datagrid/providers/sort.ts @@ -19,10 +19,10 @@ export class Sort { * Currently active comparator */ private _comparator: ClrDatagridComparatorInterface; - public get comparator(): ClrDatagridComparatorInterface { + get comparator(): ClrDatagridComparatorInterface { return this._comparator; } - public set comparator(value: ClrDatagridComparatorInterface) { + set comparator(value: ClrDatagridComparatorInterface) { this.stateDebouncer.changeStart(); this._comparator = value; this.emitChange(); @@ -33,10 +33,10 @@ export class Sort { * Ascending order if false, descending if true */ private _reverse = false; - public get reverse(): boolean { + get reverse(): boolean { return this._reverse; } - public set reverse(value: boolean) { + set reverse(value: boolean) { this.stateDebouncer.changeStart(); this._reverse = value; this.emitChange(); @@ -51,7 +51,7 @@ export class Sort { this._change.next(this); } // We do not want to expose the Subject itself, but the Observable which is read-only - public get change(): Observable> { + get change(): Observable> { return this._change.asObservable(); } @@ -62,7 +62,7 @@ export class Sort { * * @memberof Sort */ - public toggle(sortBy: ClrDatagridComparatorInterface, forceReverse?: boolean) { + toggle(sortBy: ClrDatagridComparatorInterface, forceReverse?: boolean) { this.stateDebouncer.changeStart(); // We modify private properties directly, to batch the change event if (this.comparator === sortBy) { @@ -78,14 +78,14 @@ export class Sort { /** * Clears the current sorting order */ - public clear() { + clear() { this.comparator = null; } /** * Compares two objects according to the current comparator */ - public compare(a: T, b: T): number { + compare(a: T, b: T): number { return (this.reverse ? -1 : 1) * this.comparator.compare(a, b); } } diff --git a/projects/angular/src/data/datagrid/providers/state-debouncer.provider.ts b/projects/angular/src/data/datagrid/providers/state-debouncer.provider.ts index e24eca1c1c..5e6c71b529 100644 --- a/projects/angular/src/data/datagrid/providers/state-debouncer.provider.ts +++ b/projects/angular/src/data/datagrid/providers/state-debouncer.provider.ts @@ -19,7 +19,7 @@ export class StateDebouncer { */ private _change = new Subject(); // We do not want to expose the Subject itself, but the Observable which is read-only - public get change(): Observable { + get change(): Observable { return this._change.asObservable(); } @@ -28,11 +28,11 @@ export class StateDebouncer { */ private nbChanges = 0; - public changeStart() { + changeStart() { this.nbChanges++; } - public changeDone() { + changeDone() { if (--this.nbChanges === 0) { this._change.next(); } diff --git a/projects/angular/src/data/datagrid/providers/table-size.service.mock.ts b/projects/angular/src/data/datagrid/providers/table-size.service.mock.ts index 1e704cee35..03a9de18a9 100644 --- a/projects/angular/src/data/datagrid/providers/table-size.service.mock.ts +++ b/projects/angular/src/data/datagrid/providers/table-size.service.mock.ts @@ -13,7 +13,7 @@ import { TableSizeService } from './table-size.service'; export class MockTableSizeService { // Currently only this property needed. // We could add more properties if necessary in the future - public getColumnDragHeight(): string { + getColumnDragHeight(): string { return '500px'; } } diff --git a/projects/angular/src/data/datagrid/providers/table-size.service.spec.ts b/projects/angular/src/data/datagrid/providers/table-size.service.spec.ts index 283a077eb2..74e4470b18 100644 --- a/projects/angular/src/data/datagrid/providers/table-size.service.spec.ts +++ b/projects/angular/src/data/datagrid/providers/table-size.service.spec.ts @@ -32,7 +32,7 @@ import { TableSizeService } from './table-size.service'; class TestComponent { constructor(public elementRef: ElementRef) {} - public height = 300; + height = 300; } interface TestContext { diff --git a/projects/angular/src/data/datagrid/providers/table-size.service.ts b/projects/angular/src/data/datagrid/providers/table-size.service.ts index 73650724a5..66c0ba7659 100644 --- a/projects/angular/src/data/datagrid/providers/table-size.service.ts +++ b/projects/angular/src/data/datagrid/providers/table-size.service.ts @@ -15,16 +15,16 @@ import { ElementRef, Inject, Injectable, PLATFORM_ID } from '@angular/core'; export class TableSizeService { private _tableRef: HTMLElement; - public get tableRef(): HTMLElement { + get tableRef(): HTMLElement { return this._tableRef; } - public set tableRef(element: HTMLElement) { + set tableRef(element: HTMLElement) { this._tableRef = element; } constructor(@Inject(PLATFORM_ID) private platformId: any) {} - public set table(table: ElementRef) { + set table(table: ElementRef) { if (isPlatformBrowser(this.platformId) && table.nativeElement) { this.tableRef = table.nativeElement.querySelector('.datagrid-table'); } diff --git a/projects/angular/src/data/datagrid/render/header-renderer.ts b/projects/angular/src/data/datagrid/render/header-renderer.ts index 673dac8e25..e65cdf5b20 100644 --- a/projects/angular/src/data/datagrid/render/header-renderer.ts +++ b/projects/angular/src/data/datagrid/render/header-renderer.ts @@ -97,7 +97,7 @@ export class DatagridHeaderRenderer implements OnDestroy { return width; } - public getColumnWidthState(): Partial { + getColumnWidthState(): Partial { const strictWidth = this.detectStrictWidth(); return { width: this.computeWidth(strictWidth), @@ -105,7 +105,7 @@ export class DatagridHeaderRenderer implements OnDestroy { }; } - public setColumnState(index: number) { + setColumnState(index: number) { this.columnsService.columns[index] = this.columnState; } diff --git a/projects/angular/src/data/datagrid/render/main-renderer.ts b/projects/angular/src/data/datagrid/render/main-renderer.ts index 3f793935c9..eb0bc0d8de 100644 --- a/projects/angular/src/data/datagrid/render/main-renderer.ts +++ b/projects/angular/src/data/datagrid/render/main-renderer.ts @@ -133,7 +133,7 @@ export class DatagridMainRenderer implements AfterContentInit, AfterViewInit, Af return false; } - public toggleDetailPane(state: boolean) { + toggleDetailPane(state: boolean) { if (this.headers) { if (state && !this.columnsService.hasCache()) { this.columnsService.cache(); diff --git a/projects/angular/src/data/datagrid/render/render-organizer.mock.ts b/projects/angular/src/data/datagrid/render/render-organizer.mock.ts index 16135c7fdd..e2a47c5b42 100644 --- a/projects/angular/src/data/datagrid/render/render-organizer.mock.ts +++ b/projects/angular/src/data/datagrid/render/render-organizer.mock.ts @@ -15,7 +15,7 @@ import { DatagridRenderOrganizer } from './render-organizer'; */ @Injectable() export class MockDatagridRenderOrganizer extends DatagridRenderOrganizer { - public get updateRenderStep(): Subject { + get updateRenderStep(): Subject { return this._renderStep; } } diff --git a/projects/angular/src/data/datagrid/render/render-organizer.ts b/projects/angular/src/data/datagrid/render/render-organizer.ts index 87ec18ac1b..8198e53309 100644 --- a/projects/angular/src/data/datagrid/render/render-organizer.ts +++ b/projects/angular/src/data/datagrid/render/render-organizer.ts @@ -13,17 +13,17 @@ import { DatagridRenderStep } from '../enums/render-step.enum'; @Injectable() export class DatagridRenderOrganizer { protected _renderStep: Subject = new Subject(); - public get renderStep(): Observable { + get renderStep(): Observable { return this._renderStep.asObservable(); } - public filterRenderSteps(step: DatagridRenderStep) { + filterRenderSteps(step: DatagridRenderStep) { return this.renderStep.pipe(filter(testStep => step === testStep)); } private alreadySized = false; - public resize() { + resize() { this._renderStep.next(DatagridRenderStep.CALCULATE_MODE_ON); if (this.alreadySized) { this._renderStep.next(DatagridRenderStep.CLEAR_WIDTHS); diff --git a/projects/angular/src/data/datagrid/render/row-renderer.ts b/projects/angular/src/data/datagrid/render/row-renderer.ts index 137b38264f..f7fde512ae 100644 --- a/projects/angular/src/data/datagrid/render/row-renderer.ts +++ b/projects/angular/src/data/datagrid/render/row-renderer.ts @@ -39,7 +39,7 @@ export class DatagridRowRenderer implements AfterContentInit, OnDestroy { this.subscriptions.forEach(sub => sub.unsubscribe()); } - public setColumnState() { + setColumnState() { // This method runs in four cases: // 1. When the initial rows appear on the first page. // In this case, the method will be called in DatagridMainRenderer. diff --git a/projects/angular/src/data/datagrid/utils/datagrid-filter-registrar.ts b/projects/angular/src/data/datagrid/utils/datagrid-filter-registrar.ts index 49d338d98f..441f93cfc8 100644 --- a/projects/angular/src/data/datagrid/utils/datagrid-filter-registrar.ts +++ b/projects/angular/src/data/datagrid/utils/datagrid-filter-registrar.ts @@ -16,13 +16,13 @@ export abstract class DatagridFilterRegistrar) { + setFilter(filter: F | RegisteredFilter) { // If we previously had another filter, we unregister it this.deleteFilter(); if (filter instanceof RegisteredFilter) { @@ -32,14 +32,14 @@ export abstract class DatagridFilterRegistrar { - public rootNodeModels: TreeNodeModel[]; + rootNodeModels: TreeNodeModel[]; private focusedNodeId: string; diff --git a/projects/angular/src/emphasis/alert/alerts.spec.ts b/projects/angular/src/emphasis/alert/alerts.spec.ts index fbd57d8167..3b1c8f11fd 100644 --- a/projects/angular/src/emphasis/alert/alerts.spec.ts +++ b/projects/angular/src/emphasis/alert/alerts.spec.ts @@ -266,8 +266,8 @@ export default function () { `, }) class TestComponent { - @ViewChild(ClrAlerts) public alertsInstance: ClrAlerts; - @ViewChildren(ClrAlert) public alertInstances: QueryList; + @ViewChild(ClrAlerts) alertsInstance: ClrAlerts; + @ViewChildren(ClrAlert) alertInstances: QueryList; currentAlertIndex = 0; } @@ -299,10 +299,10 @@ class TestComponent { `, }) class TestAlertInstance { - @ViewChild(ClrAlerts) public alertsInstance: ClrAlerts; - @ViewChildren(ClrAlert) public alertInstances: QueryList; + @ViewChild(ClrAlerts) alertsInstance: ClrAlerts; + @ViewChildren(ClrAlert) alertInstances: QueryList; - public currentAlert: ClrAlert; + currentAlert: ClrAlert; } @Component({ @@ -319,8 +319,8 @@ class TestAlertInstance { `, }) class DynamicAlerts { - @ViewChild(ClrAlerts) public alertsInstance: ClrAlerts; - @ViewChildren(ClrAlert) public alertInstances: QueryList; + @ViewChild(ClrAlerts) alertsInstance: ClrAlerts; + @ViewChildren(ClrAlert) alertInstances: QueryList; dynamicAlerts: Array; diff --git a/projects/angular/src/emphasis/alert/alerts.ts b/projects/angular/src/emphasis/alert/alerts.ts index cd3eb925cb..8572721487 100644 --- a/projects/angular/src/emphasis/alert/alerts.ts +++ b/projects/angular/src/emphasis/alert/alerts.ts @@ -44,13 +44,13 @@ export class ClrAlerts implements AfterContentInit, OnDestroy { * Input/Output to support two way binding on current alert index */ @Input('clrCurrentAlertIndex') - public set _inputCurrentIndex(index: number) { + set _inputCurrentIndex(index: number) { if (Number.isInteger(index) && index >= 0) { this.multiAlertService.current = index; } } - @Output('clrCurrentAlertIndexChange') public currentAlertIndexChange = new EventEmitter(false); + @Output('clrCurrentAlertIndexChange') currentAlertIndexChange = new EventEmitter(false); set currentAlertIndex(index: number) { this.multiAlertService.current = index; @@ -71,7 +71,7 @@ export class ClrAlerts implements AfterContentInit, OnDestroy { get currentAlert() { return this.multiAlertService.currentAlert; } - @Output('clrCurrentAlertChange') public currentAlertChange = new EventEmitter(false); + @Output('clrCurrentAlertChange') currentAlertChange = new EventEmitter(false); /** * Ensure we are only dealing with alerts that have not been closed yet diff --git a/projects/angular/src/emphasis/alert/providers/icon-and-types.service.ts b/projects/angular/src/emphasis/alert/providers/icon-and-types.service.ts index 9149fb01c8..3b8f6145b2 100644 --- a/projects/angular/src/emphasis/alert/providers/icon-and-types.service.ts +++ b/projects/angular/src/emphasis/alert/providers/icon-and-types.service.ts @@ -45,7 +45,7 @@ export class AlertIconAndTypesService { return this.iconInfoFromType(this._alertType).title; } - public iconInfoFromType(type: string): AlertInfoObject { + iconInfoFromType(type: string): AlertInfoObject { const returnObj = { shape: '', cssClass: '', title: '' }; switch (type) { diff --git a/projects/angular/src/emphasis/alert/providers/multi-alert.service.ts b/projects/angular/src/emphasis/alert/providers/multi-alert.service.ts index 14cdadfada..1035cab4dd 100644 --- a/projects/angular/src/emphasis/alert/providers/multi-alert.service.ts +++ b/projects/angular/src/emphasis/alert/providers/multi-alert.service.ts @@ -19,7 +19,7 @@ export class MultiAlertService { * The Observable that lets other classes subscribe to changes */ private _change = new Subject(); - public get changes(): Observable { + get changes(): Observable { return this._change.asObservable(); } diff --git a/projects/angular/src/forms/checkbox/checkbox-container.ts b/projects/angular/src/forms/checkbox/checkbox-container.ts index 441697f994..088b7fe5eb 100644 --- a/projects/angular/src/forms/checkbox/checkbox-container.ts +++ b/projects/angular/src/forms/checkbox/checkbox-container.ts @@ -52,7 +52,7 @@ import { ClrCheckbox } from './checkbox'; }) export class ClrCheckboxContainer extends ClrAbstractContainer implements AfterContentInit { private inline = false; - public role: string; + role: string; @ContentChildren(ClrCheckbox, { descendants: true }) checkboxes: QueryList; diff --git a/projects/angular/src/forms/combobox/combobox.ts b/projects/angular/src/forms/combobox/combobox.ts index 7a2c5f8f2e..f7aab57099 100644 --- a/projects/angular/src/forms/combobox/combobox.ts +++ b/projects/angular/src/forms/combobox/combobox.ts @@ -159,7 +159,7 @@ export class ClrCombobox return (this.optionSelectionService.selectionModel as MultiSelectComboboxModel).model; } - public smartPosition: ClrPopoverPosition = { + smartPosition: ClrPopoverPosition = { axis: ClrAxis.VERTICAL, side: ClrSide.AFTER, anchor: ClrAlignment.START, @@ -252,12 +252,12 @@ export class ClrCombobox } } - @Output('clrInputChange') public clrInputChange: EventEmitter = new EventEmitter(false); + @Output('clrInputChange') clrInputChange: EventEmitter = new EventEmitter(false); - @Output('clrOpenChange') public clrOpenChange: Observable = this.toggleService.openChange; + @Output('clrOpenChange') clrOpenChange: Observable = this.toggleService.openChange; // This output should be used to set up a live region using aria-live and populate it with updates that reflect each combobox change - @Output('clrSelectionChange') public clrSelectionChange: Observable> = + @Output('clrSelectionChange') clrSelectionChange: Observable> = this.optionSelectionService.selectionChanged; private initializeSubscriptions(): void { diff --git a/projects/angular/src/forms/combobox/option-items.directive.ts b/projects/angular/src/forms/combobox/option-items.directive.ts index 7be479eaca..712f22d116 100644 --- a/projects/angular/src/forms/combobox/option-items.directive.ts +++ b/projects/angular/src/forms/combobox/option-items.directive.ts @@ -34,7 +34,7 @@ export class ClrOptionItems implements DoCheck, OnDestroy { private differ: IterableDiffer | null = null; @Input('clrOptionItemsOf') - public set rawItems(items: T[]) { + set rawItems(items: T[]) { this._rawItems = items ? items : []; this.updateItems(); } @@ -45,7 +45,7 @@ export class ClrOptionItems implements DoCheck, OnDestroy { } @Input('clrOptionItemsField') - public set field(field: string) { + set field(field: string) { this._filterField = field; this.optionService.displayField = field; } diff --git a/projects/angular/src/forms/combobox/option.ts b/projects/angular/src/forms/combobox/option.ts index 1a5ba49563..348849d4d3 100644 --- a/projects/angular/src/forms/combobox/option.ts +++ b/projects/angular/src/forms/combobox/option.ts @@ -26,7 +26,7 @@ import { OptionSelectionService } from './providers/option-selection.service'; }) export class ClrOption implements OnInit { // A proxy with only the necessary data to be used for a11y and the focus handler service. - public optionProxy: OptionProxy = new OptionProxy(null, null); + optionProxy: OptionProxy = new OptionProxy(null, null); private _id: string; @Input('id') diff --git a/projects/angular/src/forms/combobox/options.ts b/projects/angular/src/forms/combobox/options.ts index ec73cbe039..16104304f4 100644 --- a/projects/angular/src/forms/combobox/options.ts +++ b/projects/angular/src/forms/combobox/options.ts @@ -60,7 +60,7 @@ let nbOptionsComponents = 0; }, }) export class ClrOptions implements AfterViewInit, LoadingListener, OnDestroy { - public loading = false; + loading = false; private subscriptions: Subscription[] = []; constructor( @@ -84,14 +84,14 @@ export class ClrOptions implements AfterViewInit, LoadingListener, OnDestroy } } - public searchText(input: string) { + searchText(input: string) { return this.commonStrings.parse(this.commonStrings.keys.comboboxSearching, { INPUT: input }); } /** * Tests if the list of options is empty, meaning it doesn't contain any items */ - public get emptyOptions() { + get emptyOptions() { return !this.optionSelectionService.loading && this.items.length === 0; } diff --git a/projects/angular/src/forms/combobox/providers/combobox-focus-handler.service.ts b/projects/angular/src/forms/combobox/providers/combobox-focus-handler.service.ts index 0086666026..c0cb0b989d 100644 --- a/projects/angular/src/forms/combobox/providers/combobox-focus-handler.service.ts +++ b/projects/angular/src/forms/combobox/providers/combobox-focus-handler.service.ts @@ -61,7 +61,7 @@ export class ComboboxFocusHandler { this.addFocusOnBlurListener(el); } - public pseudoFocus: PseudoFocusModel> = new PseudoFocusModel>(); + pseudoFocus: PseudoFocusModel> = new PseudoFocusModel>(); private _textInput: HTMLElement; get textInput() { diff --git a/projects/angular/src/forms/combobox/providers/option-selection.service.ts b/projects/angular/src/forms/combobox/providers/option-selection.service.ts index 12598c9fd5..6939d26dad 100644 --- a/projects/angular/src/forms/combobox/providers/option-selection.service.ts +++ b/projects/angular/src/forms/combobox/providers/option-selection.service.ts @@ -12,9 +12,9 @@ import { MultiSelectComboboxModel } from '../model/multi-select-combobox.model'; @Injectable() export class OptionSelectionService { - public selectionModel: ComboboxModel; - public loading = false; - public displayField: string; + selectionModel: ComboboxModel; + loading = false; + displayField: string; private _currentInput = ''; get currentInput(): string { return this._currentInput; diff --git a/projects/angular/src/forms/common/abstract-control.ts b/projects/angular/src/forms/common/abstract-control.ts index 1486a148f9..e036be5a57 100644 --- a/projects/angular/src/forms/common/abstract-control.ts +++ b/projects/angular/src/forms/common/abstract-control.ts @@ -21,14 +21,14 @@ export abstract class ClrAbstractControl { /** * Hold the suffix for the ID */ - public controlIdSuffix = 'abstract'; + controlIdSuffix = 'abstract'; constructor( @Optional() protected controlIdService: ControlIdService, @Optional() protected containerIdService: ContainerIdService ) {} - public get id(): string { + get id(): string { /** * The order of witch the id will be pick is: * - Container ID (Wrapper arround multiple Controls like, Checkbox, Radio, ...) diff --git a/projects/angular/src/forms/common/providers/container-id.service.ts b/projects/angular/src/forms/common/providers/container-id.service.ts index 8d20957c28..c8e941de99 100644 --- a/projects/angular/src/forms/common/providers/container-id.service.ts +++ b/projects/angular/src/forms/common/providers/container-id.service.ts @@ -29,7 +29,7 @@ export class ContainerIdService { } private _idChange: BehaviorSubject = new BehaviorSubject(this._id); - public get idChange(): Observable { + get idChange(): Observable { return this._idChange.asObservable(); } } diff --git a/projects/angular/src/forms/common/providers/control-id.service.ts b/projects/angular/src/forms/common/providers/control-id.service.ts index e1c2748af9..187ab8c2e6 100644 --- a/projects/angular/src/forms/common/providers/control-id.service.ts +++ b/projects/angular/src/forms/common/providers/control-id.service.ts @@ -22,7 +22,7 @@ export class ControlIdService { } private _idChange: BehaviorSubject = new BehaviorSubject(this._id); - public get idChange(): Observable { + get idChange(): Observable { return this._idChange.asObservable(); } } diff --git a/projects/angular/src/forms/datalist/providers/datalist-id.service.ts b/projects/angular/src/forms/datalist/providers/datalist-id.service.ts index cbd503d349..f89109dc60 100644 --- a/projects/angular/src/forms/datalist/providers/datalist-id.service.ts +++ b/projects/angular/src/forms/datalist/providers/datalist-id.service.ts @@ -23,7 +23,7 @@ export class DatalistIdService { } private _idChange: BehaviorSubject = new BehaviorSubject(this._id); - public get idChange(): Observable { + get idChange(): Observable { return this._idChange.asObservable(); } } diff --git a/projects/angular/src/forms/datepicker/date-container.ts b/projects/angular/src/forms/datepicker/date-container.ts index b7e52ff7c3..f043f19499 100644 --- a/projects/angular/src/forms/datepicker/date-container.ts +++ b/projects/angular/src/forms/datepicker/date-container.ts @@ -108,7 +108,7 @@ export class ClrDateContainer extends ClrAbstractContainer implements AfterViewI return this.viewManagerService.position; } - public get open() { + get open() { return this.toggleService.open; } diff --git a/projects/angular/src/forms/datepicker/date-input.ts b/projects/angular/src/forms/datepicker/date-input.ts index 30eea97f26..19b153bd2e 100644 --- a/projects/angular/src/forms/datepicker/date-input.ts +++ b/projects/angular/src/forms/datepicker/date-input.ts @@ -54,7 +54,7 @@ import { datesAreEqual } from './utils/date-utils'; providers: [DatepickerFocusService], }) export class ClrDateInput extends WrappedFormControl implements OnInit, AfterViewInit, OnDestroy { - public static ngAcceptInputType_date: Date | null | string; + static ngAcceptInputType_date: Date | null | string; @Input() placeholder: string; @Output('clrDateChange') dateChange: EventEmitter = new EventEmitter(false); diff --git a/projects/angular/src/forms/datepicker/day.ts b/projects/angular/src/forms/datepicker/day.ts index 9f5efeb5eb..00202b1279 100644 --- a/projects/angular/src/forms/datepicker/day.ts +++ b/projects/angular/src/forms/datepicker/day.ts @@ -50,15 +50,15 @@ export class ClrDay { */ @Input('clrDayView') - public set dayView(day: DayViewModel) { + set dayView(day: DayViewModel) { this._dayView = day; } - public get dayView(): DayViewModel { + get dayView(): DayViewModel { return this._dayView; } - public get dayString(): string { + get dayString(): string { return this.dayView.isSelected ? this.commonStrings.parse(this.commonStrings.keys.datepickerSelectedLabel, { FULL_DATE: this._dayView.dayModel.toDateString(), diff --git a/projects/angular/src/forms/datepicker/model/calendar.model.ts b/projects/angular/src/forms/datepicker/model/calendar.model.ts index 7f039db0fa..40f3c03a96 100644 --- a/projects/angular/src/forms/datepicker/model/calendar.model.ts +++ b/projects/angular/src/forms/datepicker/model/calendar.model.ts @@ -8,7 +8,7 @@ import { getNumberOfDaysInTheMonth } from '../utils/date-utils'; import { DayModel } from './day.model'; export class CalendarModel { - constructor(public readonly year: number, public readonly month: number) { + constructor(readonly year: number, readonly month: number) { this.initializeDaysInCalendar(); } diff --git a/projects/angular/src/forms/datepicker/model/day.model.ts b/projects/angular/src/forms/datepicker/model/day.model.ts index a5d77849e9..e0d25f037c 100644 --- a/projects/angular/src/forms/datepicker/model/day.model.ts +++ b/projects/angular/src/forms/datepicker/model/day.model.ts @@ -5,7 +5,7 @@ */ export class DayModel { - constructor(public readonly year: number, public readonly month: number, public readonly date: number) {} + constructor(readonly year: number, readonly month: number, readonly date: number) {} /** * Checks if the passed CalendarDate is equal to itself. @@ -47,7 +47,7 @@ export class DayModel { return num < 10 ? `0${num}` : `${num}`; } - public toDateString(): string { + toDateString(): string { return this.toDate().toLocaleDateString(); } } diff --git a/projects/angular/src/forms/datepicker/providers/date-form-control.service.ts b/projects/angular/src/forms/datepicker/providers/date-form-control.service.ts index 059261d065..41da9d4a0a 100644 --- a/projects/angular/src/forms/datepicker/providers/date-form-control.service.ts +++ b/projects/angular/src/forms/datepicker/providers/date-form-control.service.ts @@ -10,7 +10,7 @@ import { Observable, Subject } from 'rxjs'; @Injectable() export class DateFormControlService { private _touchedChange: Subject = new Subject(); - public disabled: boolean; + disabled: boolean; get touchedChange(): Observable { return this._touchedChange.asObservable(); diff --git a/projects/angular/src/forms/datepicker/providers/date-io.service.ts b/projects/angular/src/forms/datepicker/providers/date-io.service.ts index d5c9a3038d..572658a788 100644 --- a/projects/angular/src/forms/datepicker/providers/date-io.service.ts +++ b/projects/angular/src/forms/datepicker/providers/date-io.service.ts @@ -25,14 +25,14 @@ import { LocaleHelperService } from './locale-helper.service'; @Injectable() export class DateIOService { - public disabledDates: DateRange = { + disabledDates: DateRange = { // This is the default range. It approximates the beginning of time to the end of time. // Unless a minDate or maxDate is set with the native HTML5 api the range is all dates // TODO: turn this into an Array of min/max ranges that allow configuration of multiple ranges. minDate: new DayModel(0, 0, 1), maxDate: new DayModel(9999, 11, 31), }; - public cldrLocaleDateFormat: string = DEFAULT_LOCALE_FORMAT; + cldrLocaleDateFormat: string = DEFAULT_LOCALE_FORMAT; private localeDisplayFormat: InputDateDisplayFormat = LITTLE_ENDIAN; private delimiters: [string, string] = ['/', '/']; @@ -41,7 +41,7 @@ export class DateIOService { this.initializeLocaleDisplayFormat(); } - public setMinDate(date: string): void { + setMinDate(date: string): void { // NOTE: I'm expecting consumers to pass one of four things here: // A proper date string(2019-11-11), null, undefined or empty string ('') if (!date) { @@ -53,7 +53,7 @@ export class DateIOService { } } - public setMaxDate(date: string): void { + setMaxDate(date: string): void { // NOTE: I'm expecting consumers to pass one of four things here: // A proper date string(2019-11-11), null, undefined or empty string ('') if (!date) { diff --git a/projects/angular/src/forms/datepicker/providers/date-navigation.service.ts b/projects/angular/src/forms/datepicker/providers/date-navigation.service.ts index 1559e821f8..60c2018aed 100644 --- a/projects/angular/src/forms/datepicker/providers/date-navigation.service.ts +++ b/projects/angular/src/forms/datepicker/providers/date-navigation.service.ts @@ -52,7 +52,7 @@ export class DateNavigationService { return this._today; } - public selectedDay: DayModel; + selectedDay: DayModel; private _selectedDayChange: Subject = new Subject(); @@ -69,7 +69,7 @@ export class DateNavigationService { this._selectedDayChange.next(dayModel); } - public focusedDay: DayModel; + focusedDay: DayModel; /** * Initializes the calendar based on the selected day. diff --git a/projects/angular/src/forms/radio/radio-container.ts b/projects/angular/src/forms/radio/radio-container.ts index a7d68f8bd7..c8fbf53c78 100644 --- a/projects/angular/src/forms/radio/radio-container.ts +++ b/projects/angular/src/forms/radio/radio-container.ts @@ -52,7 +52,7 @@ import { ClrRadio } from './radio'; }) export class ClrRadioContainer extends ClrAbstractContainer implements AfterContentInit { private inline = false; - public role: string; + role: string; @ContentChildren(ClrRadio, { descendants: true }) radios: QueryList; diff --git a/projects/angular/src/layout/nav/aria-current-link.ts b/projects/angular/src/layout/nav/aria-current-link.ts index 946f4aa2c2..a4bf47410c 100644 --- a/projects/angular/src/layout/nav/aria-current-link.ts +++ b/projects/angular/src/layout/nav/aria-current-link.ts @@ -13,7 +13,7 @@ import { Subscription } from 'rxjs'; host: { '[attr.aria-current]': 'ariaCurrent' }, }) export class ClrAriaCurrentLink implements OnInit, OnDestroy { - public ariaCurrent: string | undefined; + ariaCurrent: string | undefined; private subscription: Subscription; constructor(private rla: RouterLinkActive) {} diff --git a/projects/angular/src/layout/nav/providers/responsive-navigation.service.ts b/projects/angular/src/layout/nav/providers/responsive-navigation.service.ts index e5bf8d33e2..ed023ce889 100644 --- a/projects/angular/src/layout/nav/providers/responsive-navigation.service.ts +++ b/projects/angular/src/layout/nav/providers/responsive-navigation.service.ts @@ -13,7 +13,7 @@ import { ResponsiveNavControlMessage } from '../responsive-nav-control-message'; @Injectable({ providedIn: 'root' }) export class ResponsiveNavigationService { - public responsiveNavList: number[] = []; + responsiveNavList: number[] = []; private registerNavSubject = new ReplaySubject(); private controlNavSubject = new Subject(); diff --git a/projects/angular/src/layout/nav/responsive-nav-codes.ts b/projects/angular/src/layout/nav/responsive-nav-codes.ts index cf75cbdac1..ca85d37707 100644 --- a/projects/angular/src/layout/nav/responsive-nav-codes.ts +++ b/projects/angular/src/layout/nav/responsive-nav-codes.ts @@ -5,16 +5,16 @@ */ export class ResponsiveNavCodes { - public static NAV_LEVEL_1 = 1; - public static NAV_LEVEL_2 = 2; - public static NAV_CLOSE_ALL = 'NAV_CLOSE_ALL'; - public static NAV_OPEN = 'NAV_OPEN'; - public static NAV_CLOSE = 'NAV_CLOSE'; - public static NAV_TOGGLE = 'NAV_TOGGLE'; - public static NAV_CLASS_HAMBURGER_MENU = 'open-hamburger-menu'; - public static NAV_CLASS_OVERFLOW_MENU = 'open-overflow-menu'; - public static NAV_CLASS_TRIGGER_1 = 'header-hamburger-trigger'; - public static NAV_CLASS_TRIGGER_2 = 'header-overflow-trigger'; - public static NAV_CLASS_LEVEL_1 = 'clr-nav-level-1'; - public static NAV_CLASS_LEVEL_2 = 'clr-nav-level-2'; + static NAV_LEVEL_1 = 1; + static NAV_LEVEL_2 = 2; + static NAV_CLOSE_ALL = 'NAV_CLOSE_ALL'; + static NAV_OPEN = 'NAV_OPEN'; + static NAV_CLOSE = 'NAV_CLOSE'; + static NAV_TOGGLE = 'NAV_TOGGLE'; + static NAV_CLASS_HAMBURGER_MENU = 'open-hamburger-menu'; + static NAV_CLASS_OVERFLOW_MENU = 'open-overflow-menu'; + static NAV_CLASS_TRIGGER_1 = 'header-hamburger-trigger'; + static NAV_CLASS_TRIGGER_2 = 'header-overflow-trigger'; + static NAV_CLASS_LEVEL_1 = 'clr-nav-level-1'; + static NAV_CLASS_LEVEL_2 = 'clr-nav-level-2'; } diff --git a/projects/angular/src/layout/vertical-nav/providers/vertical-nav-group-registration.service.ts b/projects/angular/src/layout/vertical-nav/providers/vertical-nav-group-registration.service.ts index 6ebc54fb54..fed051acc1 100644 --- a/projects/angular/src/layout/vertical-nav/providers/vertical-nav-group-registration.service.ts +++ b/projects/angular/src/layout/vertical-nav/providers/vertical-nav-group-registration.service.ts @@ -8,7 +8,7 @@ import { Injectable } from '@angular/core'; @Injectable() export class VerticalNavGroupRegistrationService { - public navGroupCount = 0; + navGroupCount = 0; registerNavGroup() { this.navGroupCount++; diff --git a/projects/angular/src/popover/common/abstract-popover.ts b/projects/angular/src/popover/common/abstract-popover.ts index 7223bae66e..6e91072a7c 100644 --- a/projects/angular/src/popover/common/abstract-popover.ts +++ b/projects/angular/src/popover/common/abstract-popover.ts @@ -109,7 +109,7 @@ export abstract class AbstractPopover implements AfterViewChecked, OnDestroy { * Until https://github.com/angular/angular/issues/8785 is supported, we don't have any way to instantiate * a separate directive on the host. So let's do dirty but performant for now. */ - public closeOnOutsideClick = false; + closeOnOutsideClick = false; private documentESCListener: VoidFunction | null = null; private attachESCListener(): void { diff --git a/projects/angular/src/popover/common/popover.ts b/projects/angular/src/popover/common/popover.ts index ef1a9c249d..7f72c3e273 100644 --- a/projects/angular/src/popover/common/popover.ts +++ b/projects/angular/src/popover/common/popover.ts @@ -48,7 +48,7 @@ export class Popover { } // TODO: need a way to account for parameters that change dynamically (positioning). - public anchor( + anchor( anchor: any, anchorAlign: Point, popoverAlign: Point, @@ -242,7 +242,7 @@ export class Popover { return this._scroll.asObservable(); } - public release() { + release() { this.element.style.transform = ''; this.removeScrollEventListeners(); } diff --git a/projects/angular/src/popover/dropdown/dropdown-item.ts b/projects/angular/src/popover/dropdown/dropdown-item.ts index d140b66e52..2869cff3c8 100644 --- a/projects/angular/src/popover/dropdown/dropdown-item.ts +++ b/projects/angular/src/popover/dropdown/dropdown-item.ts @@ -33,7 +33,7 @@ export class ClrDropdownItem implements AfterViewInit { ) {} private unlisten: () => void; - public setByDeprecatedDisabled = false; + setByDeprecatedDisabled = false; @Input('clrDisabled') set disabled(value: boolean | string) { diff --git a/projects/angular/src/popover/dropdown/dropdown-trigger.ts b/projects/angular/src/popover/dropdown/dropdown-trigger.ts index fe791a11b7..d16a5e4710 100644 --- a/projects/angular/src/popover/dropdown/dropdown-trigger.ts +++ b/projects/angular/src/popover/dropdown/dropdown-trigger.ts @@ -23,7 +23,7 @@ import { DropdownFocusHandler } from './providers/dropdown-focus-handler.service }, }) export class ClrDropdownTrigger { - public isRootLevelToggle = true; + isRootLevelToggle = true; constructor( dropdown: ClrDropdown, diff --git a/projects/angular/src/popover/signpost/signpost-trigger.ts b/projects/angular/src/popover/signpost/signpost-trigger.ts index d6f63b0536..042a27cb82 100644 --- a/projects/angular/src/popover/signpost/signpost-trigger.ts +++ b/projects/angular/src/popover/signpost/signpost-trigger.ts @@ -33,9 +33,9 @@ import { SignpostIdService } from './providers/signpost-id.service'; export class ClrSignpostTrigger implements OnDestroy { private subscriptions: Subscription[] = []; - public ariaExpanded: boolean; - public ariaControl: string; - public isOpen: boolean; + ariaExpanded: boolean; + ariaControl: string; + isOpen: boolean; private document: Document; diff --git a/projects/angular/src/popover/signpost/signpost.ts b/projects/angular/src/popover/signpost/signpost.ts index d0abae043c..f02f2fab7b 100644 --- a/projects/angular/src/popover/signpost/signpost.ts +++ b/projects/angular/src/popover/signpost/signpost.ts @@ -52,7 +52,7 @@ export class ClrSignpost { * Flag used to determine if we need to use the default trigger or a user supplied trigger element. * */ - public useCustomTrigger = false; + useCustomTrigger = false; /********** * @property signPostTrigger diff --git a/projects/angular/src/popover/tooltip/tooltip-trigger.ts b/projects/angular/src/popover/tooltip/tooltip-trigger.ts index 20ef0e5af7..2f719c0eea 100644 --- a/projects/angular/src/popover/tooltip/tooltip-trigger.ts +++ b/projects/angular/src/popover/tooltip/tooltip-trigger.ts @@ -20,7 +20,7 @@ import { TooltipIdService } from './providers/tooltip-id.service'; }, }) export class ClrTooltipTrigger { - public ariaDescribedBy: string; + ariaDescribedBy: string; private subs: Subscription[] = []; constructor(private toggleService: ClrPopoverToggleService, private tooltipIdService: TooltipIdService) { // The aria-described by comes from the id of content. It diff --git a/projects/angular/src/timeline/providers/timeline-icon-attribute.service.ts b/projects/angular/src/timeline/providers/timeline-icon-attribute.service.ts index d69ac67e55..a1817017e2 100644 --- a/projects/angular/src/timeline/providers/timeline-icon-attribute.service.ts +++ b/projects/angular/src/timeline/providers/timeline-icon-attribute.service.ts @@ -42,15 +42,15 @@ export class TimelineIconAttributeService { }); } - public getAriaLabel(step: ClrTimelineStepState): string { + getAriaLabel(step: ClrTimelineStepState): string { return this.attributeMap.get(step).ariaLabel; } - public getIconShape(step: ClrTimelineStepState): string { + getIconShape(step: ClrTimelineStepState): string { return this.attributeMap.get(step).iconShape; } - public getIconStatus(step: ClrTimelineStepState): string { + getIconStatus(step: ClrTimelineStepState): string { return this.attributeMap.get(step).iconStatus; } } diff --git a/projects/angular/src/timeline/timeline-step.ts b/projects/angular/src/timeline/timeline-step.ts index 5183329431..1b4e137983 100644 --- a/projects/angular/src/timeline/timeline-step.ts +++ b/projects/angular/src/timeline/timeline-step.ts @@ -38,7 +38,7 @@ import { ClrTimelineStepTitle } from './timeline-step-title'; export class ClrTimelineStep { @Input('clrState') state: ClrTimelineStepState = ClrTimelineStepState.NOT_STARTED; - public stepTitleText: string; + stepTitleText: string; @ContentChild(ClrTimelineStepTitle, { read: ElementRef }) stepTitle: ElementRef; diff --git a/projects/angular/src/utils/a11y/aria-live.service.ts b/projects/angular/src/utils/a11y/aria-live.service.ts index b02be66185..f23b6ed736 100644 --- a/projects/angular/src/utils/a11y/aria-live.service.ts +++ b/projects/angular/src/utils/a11y/aria-live.service.ts @@ -70,7 +70,7 @@ export class ClrAriaLiveService implements OnDestroy { * get access to the internal HTML `id` that gonna be used for the AriaLive container. * @return ID of the DOM Element as string. */ - public get id(): string { + get id(): string { return this._id; } @@ -91,10 +91,7 @@ export class ClrAriaLiveService implements OnDestroy { * @param message - This could be simple string or HTMLElement * @param politeness - 'polite', 'assertive' or 'off' */ - public announce( - message: string | HTMLElement, - politeness: ClrAriaLivePoliteness = ClrAriaLivePoliteness.polite - ): void { + announce(message: string | HTMLElement, politeness: ClrAriaLivePoliteness = ClrAriaLivePoliteness.polite): void { if (politeness === ClrAriaLivePoliteness.off) { return; } @@ -132,7 +129,7 @@ export class ClrAriaLiveService implements OnDestroy { * onDestroy life cycle - must stop all active setTimeouts and remove the AriaLive * container from the document. */ - public ngOnDestroy() { + ngOnDestroy() { clearTimeout(this.previousTimeout); if (isPlatformBrowser(this.platformId) && this.ariaLiveElement) { this.document.body.removeChild(this.ariaLiveElement); diff --git a/projects/angular/src/utils/chocolate/chocolate-factory.spec.ts b/projects/angular/src/utils/chocolate/chocolate-factory.spec.ts index 4f4c0d7606..56217ae6a2 100644 --- a/projects/angular/src/utils/chocolate/chocolate-factory.spec.ts +++ b/projects/angular/src/utils/chocolate/chocolate-factory.spec.ts @@ -84,7 +84,7 @@ class ChocolateTest extends WillyWonka { class ChocolateParent extends WillyWonka { nbChildren = 0; - public changes = 0; + changes = 0; incrementChange() { this.changes++; } @@ -118,7 +118,7 @@ class ChocolateChild extends OompaLoompa implements OnInit, OnDestroy { return this.index === this.parent.nbChildren - 1; } - public changes = 0; + changes = 0; incrementChange() { this.changes++; } diff --git a/projects/angular/src/utils/chocolate/willy-wonka.ts b/projects/angular/src/utils/chocolate/willy-wonka.ts index 9a31f20e13..5b0814fc17 100644 --- a/projects/angular/src/utils/chocolate/willy-wonka.ts +++ b/projects/angular/src/utils/chocolate/willy-wonka.ts @@ -20,7 +20,7 @@ import { Subject } from 'rxjs'; export class WillyWonka implements AfterViewChecked { private _chocolate = new Subject(); - public get chocolate(): Observable { + get chocolate(): Observable { return this._chocolate.asObservable(); } diff --git a/projects/angular/src/utils/conditional/if-active.directive.ts b/projects/angular/src/utils/conditional/if-active.directive.ts index c916e27ea3..1b87b2a3bf 100644 --- a/projects/angular/src/utils/conditional/if-active.directive.ts +++ b/projects/angular/src/utils/conditional/if-active.directive.ts @@ -67,7 +67,7 @@ export class ClrIfActive implements OnDestroy { * @param value */ @Input('clrIfActive') - public set active(value: boolean | string) { + set active(value: boolean | string) { if (value) { this.ifActiveService.current = this.id; } @@ -78,7 +78,7 @@ export class ClrIfActive implements OnDestroy { * @description * A getter that returns the current IfActiveService.active value. */ - public get active() { + get active() { return this.ifActiveService.current === this.id; } @@ -99,7 +99,7 @@ export class ClrIfActive implements OnDestroy { * Clears all views from the ViewContainerRef * @param value */ - public updateView(value: boolean) { + updateView(value: boolean) { if (value) { this.container.createEmbeddedView(this.template); } else { diff --git a/projects/angular/src/utils/conditional/if-active.service.ts b/projects/angular/src/utils/conditional/if-active.service.ts index 1b10072dd6..0b5538a4d4 100644 --- a/projects/angular/src/utils/conditional/if-active.service.ts +++ b/projects/angular/src/utils/conditional/if-active.service.ts @@ -57,7 +57,7 @@ export class IfActiveService { * A getter function that provides an observable for the _current Subject. * */ - public get currentChange(): Observable { + get currentChange(): Observable { return this._currentChange.asObservable(); } @@ -69,7 +69,7 @@ export class IfActiveService { * * @param value */ - public set current(value: number) { + set current(value: number) { if (this._current !== value) { this._current = value; this._currentChange.next(value); @@ -82,7 +82,7 @@ export class IfActiveService { * A getter that returns the current value of this IfActive instance. * @returns */ - public get current(): number { + get current(): number { return this._current; } } diff --git a/projects/angular/src/utils/conditional/if-expanded.directive.spec.ts b/projects/angular/src/utils/conditional/if-expanded.directive.spec.ts index d3595829bc..0f37e7e018 100644 --- a/projects/angular/src/utils/conditional/if-expanded.directive.spec.ts +++ b/projects/angular/src/utils/conditional/if-expanded.directive.spec.ts @@ -115,7 +115,7 @@ class SimpleTest { template: `{{ count }}`, }) class TestCounter { - public count: number; + count: number; constructor(@Inject('counter') counter: { total: number }) { this.count = ++counter.total; diff --git a/projects/angular/src/utils/conditional/if-expanded.service.ts b/projects/angular/src/utils/conditional/if-expanded.service.ts index 187fe33065..d8d58b53c6 100644 --- a/projects/angular/src/utils/conditional/if-expanded.service.ts +++ b/projects/angular/src/utils/conditional/if-expanded.service.ts @@ -12,7 +12,7 @@ import { LoadingListener } from '../loading/loading-listener'; @Injectable() export class IfExpandService implements LoadingListener { - public expandable = 0; + expandable = 0; protected _loading = false; get loading(): boolean { @@ -39,12 +39,12 @@ export class IfExpandService implements LoadingListener { } } - public toggle() { + toggle() { this.expanded = !this._expanded; } protected _expandChange: Subject = new Subject(); - public get expandChange(): Observable { + get expandChange(): Observable { return this._expandChange.asObservable(); } diff --git a/projects/angular/src/utils/conditional/if-open.directive.ts b/projects/angular/src/utils/conditional/if-open.directive.ts index adb6f99dc2..d5d49c5881 100644 --- a/projects/angular/src/utils/conditional/if-open.directive.ts +++ b/projects/angular/src/utils/conditional/if-open.directive.ts @@ -24,7 +24,7 @@ import { ClrPopoverToggleService } from '../popover/providers/popover-toggle.ser * */ export class ClrIfOpen implements OnDestroy { - public static ngAcceptInputType_open: boolean | ''; + static ngAcceptInputType_open: boolean | ''; private subscription: Subscription; @@ -36,7 +36,7 @@ export class ClrIfOpen implements OnDestroy { * @param value */ @Input('clrIfOpen') - public set open(value: boolean | string) { + set open(value: boolean | string) { this.toggleService.open = value as boolean; } @@ -46,7 +46,7 @@ export class ClrIfOpen implements OnDestroy { * A getter that returns the current ClrPopoverToggleService.open value. * */ - public get open() { + get open() { return this.toggleService.open; } @@ -77,7 +77,7 @@ export class ClrIfOpen implements OnDestroy { * Clears all views from the ViewContainerRef * @param value */ - public updateView(value: boolean) { + updateView(value: boolean) { if (value) { this.container.createEmbeddedView(this.template); } else { diff --git a/projects/angular/src/utils/drag-and-drop/drag-and-drop-integrated.spec.ts b/projects/angular/src/utils/drag-and-drop/drag-and-drop-integrated.spec.ts index a2ad26ea32..19ba168861 100644 --- a/projects/angular/src/utils/drag-and-drop/drag-and-drop-integrated.spec.ts +++ b/projects/angular/src/utils/drag-and-drop/drag-and-drop-integrated.spec.ts @@ -273,12 +273,12 @@ export default function (): void { `, }) class WithDraggableTest { - public mockDataPayload = MOCK_DATA_PAYLOAD; - public dragStartDelay: number; - public dragStartEvent: any; - public dragMoveEvent: any; - public dragEndEvent: any; - public dragLeaveEvent: any; - public dragEnterEvent: any; - public dropEvent: any; + mockDataPayload = MOCK_DATA_PAYLOAD; + dragStartDelay: number; + dragStartEvent: any; + dragMoveEvent: any; + dragEndEvent: any; + dragLeaveEvent: any; + dragEnterEvent: any; + dropEvent: any; } diff --git a/projects/angular/src/utils/drag-and-drop/drag-event.ts b/projects/angular/src/utils/drag-and-drop/drag-event.ts index 94f0324e62..399ee66e99 100644 --- a/projects/angular/src/utils/drag-and-drop/drag-event.ts +++ b/projects/angular/src/utils/drag-and-drop/drag-event.ts @@ -9,10 +9,10 @@ import { DragEventInterface, DragPointPosition } from './interfaces/drag-event.i // This class is used to convert an internal event // to an external event to be emitted. export class ClrDragEvent { - public dragPosition: DragPointPosition; - public group: string | string[]; - public dragDataTransfer: T; - public dropPointPosition: DragPointPosition; + dragPosition: DragPointPosition; + group: string | string[]; + dragDataTransfer: T; + dropPointPosition: DragPointPosition; constructor(dragEvent: DragEventInterface) { this.dragPosition = dragEvent.dragPosition; diff --git a/projects/angular/src/utils/drag-and-drop/draggable/draggable.ts b/projects/angular/src/utils/drag-and-drop/draggable/draggable.ts index 57eac7d6bd..02d7216740 100644 --- a/projects/angular/src/utils/drag-and-drop/draggable/draggable.ts +++ b/projects/angular/src/utils/drag-and-drop/draggable/draggable.ts @@ -45,7 +45,7 @@ export class ClrDraggable implements AfterContentInit, OnDestroy { private draggableEl: any; private subscriptions: Subscription[] = []; private componentFactory: ComponentFactory>; - public dragOn = false; + dragOn = false; constructor( private el: ElementRef, diff --git a/projects/angular/src/utils/drag-and-drop/droppable/droppable.spec.ts b/projects/angular/src/utils/drag-and-drop/droppable/droppable.spec.ts index 23a996bb36..85a14b52ed 100644 --- a/projects/angular/src/utils/drag-and-drop/droppable/droppable.spec.ts +++ b/projects/angular/src/utils/drag-and-drop/droppable/droppable.spec.ts @@ -516,12 +516,12 @@ export default function (): void { `, }) class BasicDroppable { - public dragStartEvent: any; - public dragMoveEvent: any; - public dragEndEvent: any; - public dragLeaveEvent: any; - public dragEnterEvent: any; - public dropEvent: any; + dragStartEvent: any; + dragMoveEvent: any; + dragEndEvent: any; + dragLeaveEvent: any; + dragEnterEvent: any; + dropEvent: any; } @Component({ @@ -532,8 +532,8 @@ class BasicDroppable { `, }) class DroppableWithGroup { - public droppableGroup: string | string[]; - public dragStartEvent: any; + droppableGroup: string | string[]; + dragStartEvent: any; } @Component({ @@ -552,8 +552,8 @@ class DroppableWithGroup { `, }) class DroppableWithTolerance { - public tolerance: number | ClrDropToleranceInterface; - public dragStartEvent: any; - public dragLeaveEvent: any; - public dragEnterEvent: any; + tolerance: number | ClrDropToleranceInterface; + dragStartEvent: any; + dragLeaveEvent: any; + dragEnterEvent: any; } diff --git a/projects/angular/src/utils/drag-and-drop/providers/drag-and-drop-event-bus.service.mock.ts b/projects/angular/src/utils/drag-and-drop/providers/drag-and-drop-event-bus.service.mock.ts index f1b5fad076..1f30c08b84 100644 --- a/projects/angular/src/utils/drag-and-drop/providers/drag-and-drop-event-bus.service.mock.ts +++ b/projects/angular/src/utils/drag-and-drop/providers/drag-and-drop-event-bus.service.mock.ts @@ -10,10 +10,10 @@ import { DragEventType } from '../interfaces/drag-event.interface'; import { DragAndDropEventBusService } from './drag-and-drop-event-bus.service'; export class MockDragAndDropEventBus { - public dragStarted: Subject = new Subject(); - public dragMoved: Subject = new Subject(); - public dragEnded: Subject = new Subject(); - public dropped: Subject = new Subject(); + dragStarted: Subject = new Subject(); + dragMoved: Subject = new Subject(); + dragEnded: Subject = new Subject(); + dropped: Subject = new Subject(); broadcast(event: any): void { switch (event.type) { diff --git a/projects/angular/src/utils/drag-and-drop/providers/drag-event-listener.service.mock.ts b/projects/angular/src/utils/drag-and-drop/providers/drag-event-listener.service.mock.ts index 5546de3931..7f4eafb001 100644 --- a/projects/angular/src/utils/drag-and-drop/providers/drag-event-listener.service.mock.ts +++ b/projects/angular/src/utils/drag-and-drop/providers/drag-event-listener.service.mock.ts @@ -16,13 +16,13 @@ import { DragEventListenerService } from './drag-event-listener.service'; @Injectable() export class MockDragEventListener { private listeners: (() => void)[]; - public draggableEl: any; - public dragStarted: Subject = new Subject(); - public dragMoved: Subject = new Subject(); - public dragEnded: Subject = new Subject(); - public dragStartPosition: DragPointPosition; + draggableEl: any; + dragStarted: Subject = new Subject(); + dragMoved: Subject = new Subject(); + dragEnded: Subject = new Subject(); + dragStartPosition: DragPointPosition; - public attachDragListeners(draggableEl: any) { + attachDragListeners(draggableEl: any) { this.draggableEl = draggableEl; this.draggableEl.hasListener = true; this.draggableEl.setAttribute('hasListener', 'true'); @@ -33,7 +33,7 @@ export class MockDragEventListener { ]; } - public detachDragListeners() { + detachDragListeners() { if (this.listeners) { this.listeners.map(event => event()); } diff --git a/projects/angular/src/utils/drag-and-drop/providers/drag-event-listener.service.ts b/projects/angular/src/utils/drag-and-drop/providers/drag-event-listener.service.ts index ec75394b48..46010baefd 100644 --- a/projects/angular/src/utils/drag-and-drop/providers/drag-event-listener.service.ts +++ b/projects/angular/src/utils/drag-and-drop/providers/drag-event-listener.service.ts @@ -52,21 +52,21 @@ export class DragEventListenerService { private initialPosition: DragPointPosition; // Draggable component sets these properties: - public dragDataTransfer?: T; - public group?: string | string[]; - public dragStartDelay = 0; + dragDataTransfer?: T; + group?: string | string[]; + dragStartDelay = 0; // DraggableGhost component sets these properties: - public ghostElement?: any; - public dropPointPosition?: DragPointPosition; + ghostElement?: any; + dropPointPosition?: DragPointPosition; - public attachDragListeners(draggableEl: Node) { + attachDragListeners(draggableEl: Node) { this.draggableEl = draggableEl; this.listeners.push(this.customDragEvent(this.draggableEl, 'mousedown', 'mousemove', 'mouseup')); this.listeners.push(this.customDragEvent(this.draggableEl, 'touchstart', 'touchmove', 'touchend')); } - public detachDragListeners() { + detachDragListeners() { if (this.listeners) { this.listeners.map(event => event()); } diff --git a/projects/angular/src/utils/drag-and-drop/providers/drag-handle-registrar.service.mock.ts b/projects/angular/src/utils/drag-and-drop/providers/drag-handle-registrar.service.mock.ts index 68ca101aad..dd338a4a69 100644 --- a/projects/angular/src/utils/drag-and-drop/providers/drag-handle-registrar.service.mock.ts +++ b/projects/angular/src/utils/drag-and-drop/providers/drag-handle-registrar.service.mock.ts @@ -13,11 +13,11 @@ export class MockDragHandleRegistrar { return this._customHandleEl; } - public registerCustomHandle(handleElement: Node) { + registerCustomHandle(handleElement: Node) { this._customHandleEl = handleElement; } - public unregisterCustomHandle() { + unregisterCustomHandle() { delete this._customHandleEl; } } diff --git a/projects/angular/src/utils/drag-and-drop/providers/drag-handle-registrar.service.ts b/projects/angular/src/utils/drag-and-drop/providers/drag-handle-registrar.service.ts index 6a757ef334..14a65065aa 100644 --- a/projects/angular/src/utils/drag-and-drop/providers/drag-handle-registrar.service.ts +++ b/projects/angular/src/utils/drag-and-drop/providers/drag-handle-registrar.service.ts @@ -46,13 +46,13 @@ export class DragHandleRegistrarService { return this._customHandleEl; } - public registerCustomHandle(el: Node) { + registerCustomHandle(el: Node) { this.dragEventListener.detachDragListeners(); // removes the existing listeners this._customHandleEl = el; this.makeElementHandle(this._customHandleEl); } - public unregisterCustomHandle() { + unregisterCustomHandle() { this.dragEventListener.detachDragListeners(); // removes the existing listeners this.renderer.removeClass(this._customHandleEl, 'drag-handle'); delete this._customHandleEl; diff --git a/projects/angular/src/utils/drag-and-drop/providers/draggable-snapshot.service.ts b/projects/angular/src/utils/drag-and-drop/providers/draggable-snapshot.service.ts index e73d0e8714..2107fe5c00 100644 --- a/projects/angular/src/utils/drag-and-drop/providers/draggable-snapshot.service.ts +++ b/projects/angular/src/utils/drag-and-drop/providers/draggable-snapshot.service.ts @@ -18,11 +18,11 @@ export class DraggableSnapshotService { private draggableElClientRect: ClientRect; private snapshotDragEvent: DragEventInterface; - public capture(el: Node, event: DragEventInterface): void { + capture(el: Node, event: DragEventInterface): void { this.draggableElClientRect = this.domAdapter.clientRect(el); this.snapshotDragEvent = event; } - public discard(): void { + discard(): void { delete this.draggableElClientRect; delete this.snapshotDragEvent; } diff --git a/projects/angular/src/utils/focus-trap/focus-trap.directive.ts b/projects/angular/src/utils/focus-trap/focus-trap.directive.ts index a1c7c6eb45..a854ae5991 100644 --- a/projects/angular/src/utils/focus-trap/focus-trap.directive.ts +++ b/projects/angular/src/utils/focus-trap/focus-trap.directive.ts @@ -120,7 +120,7 @@ export class FocusTrapDirective implements OnInit, AfterViewInit, OnDestroy { } } - public setPreviousFocus(): void { + setPreviousFocus(): void { if (this.previousActiveElement && this.previousActiveElement.focus) { this.previousActiveElement.focus(); } diff --git a/projects/angular/src/utils/focus/focus.service.ts b/projects/angular/src/utils/focus/focus.service.ts index 5e1b4c5f3b..b044ef3c61 100644 --- a/projects/angular/src/utils/focus/focus.service.ts +++ b/projects/angular/src/utils/focus/focus.service.ts @@ -16,7 +16,7 @@ export class FocusService { private _unlistenFuncs: (() => void)[] = []; private _current: FocusableItem; - public get current() { + get current() { return this._current; } @@ -86,7 +86,7 @@ export class FocusService { return false; } - public detachListeners() { + detachListeners() { this._unlistenFuncs.forEach(unlisten => unlisten()); } } diff --git a/projects/angular/src/utils/loading/loading.spec.ts b/projects/angular/src/utils/loading/loading.spec.ts index b9735546d3..d2ba7bc10b 100644 --- a/projects/angular/src/utils/loading/loading.spec.ts +++ b/projects/angular/src/utils/loading/loading.spec.ts @@ -105,13 +105,13 @@ describe('Loading directive without listener', function () { class FullTest { @ViewChild(ClrLoading) loadingDirective: ClrLoading; - public displayed = true; - public loading = false; + displayed = true; + loading = false; } @Injectable() class DummyListener implements LoadingListener { - public loading = false; + loading = false; loadingStateChange(state: ClrLoadingState): void { this.loading = state === ClrLoadingState.LOADING; diff --git a/projects/angular/src/utils/loading/loading.ts b/projects/angular/src/utils/loading/loading.ts index 7b31c0ebff..15268a77bd 100644 --- a/projects/angular/src/utils/loading/loading.ts +++ b/projects/angular/src/utils/loading/loading.ts @@ -19,19 +19,19 @@ export enum ClrLoadingState { selector: '[clrLoading]', }) export class ClrLoading implements OnDestroy { - public static ngAcceptInputType_loadingState: boolean | ClrLoadingState | null | string; + static ngAcceptInputType_loadingState: boolean | ClrLoadingState | null | string; // We find the first parent that handles something loading constructor(@Optional() private listener: LoadingListener) {} private _loadingState: ClrLoadingState | string = ClrLoadingState.DEFAULT; - public get loadingState() { + get loadingState() { return this._loadingState; } @Input('clrLoading') - public set loadingState(value: boolean | string | ClrLoadingState) { + set loadingState(value: boolean | string | ClrLoadingState) { if (value === true) { value = ClrLoadingState.LOADING; } else if (!value) { diff --git a/projects/angular/src/utils/outside-click/outside-click.spec.ts b/projects/angular/src/utils/outside-click/outside-click.spec.ts index fffc386c9a..5abf1b7827 100644 --- a/projects/angular/src/utils/outside-click/outside-click.spec.ts +++ b/projects/angular/src/utils/outside-click/outside-click.spec.ts @@ -78,8 +78,8 @@ describe('Outside click', () => { `, }) class FullTest { - public strict = false; - public nbClicks = 0; + strict = false; + nbClicks = 0; inc() { this.nbClicks++; diff --git a/projects/angular/src/utils/popover/popover-content.spec.ts b/projects/angular/src/utils/popover/popover-content.spec.ts index 3bbfd84f27..cad022508d 100644 --- a/projects/angular/src/utils/popover/popover-content.spec.ts +++ b/projects/angular/src/utils/popover/popover-content.spec.ts @@ -38,16 +38,16 @@ import { ClrPopoverToggleService } from './providers/popover-toggle.service'; class SimpleContent { @ViewChild(ClrPopoverContent, { read: ClrPopoverContent, static: true }) content: ClrPopoverContent; - public smartPosition: ClrPopoverPosition = { + smartPosition: ClrPopoverPosition = { axis: ClrAxis.VERTICAL, side: ClrSide.BEFORE, anchor: ClrAlignment.START, content: ClrAlignment.START, }; - public openState = false; - public closeClick = true; - public closeScroll = true; - public changeCount = 0; + openState = false; + closeClick = true; + closeScroll = true; + changeCount = 0; changeCounter() { this.changeCount += 1; } diff --git a/projects/angular/src/utils/popover/popover-content.ts b/projects/angular/src/utils/popover/popover-content.ts index 9d2f7dc28b..7f28a37dcc 100644 --- a/projects/angular/src/utils/popover/popover-content.ts +++ b/projects/angular/src/utils/popover/popover-content.ts @@ -35,7 +35,7 @@ export class ClrPopoverContent implements AfterContentChecked, OnDestroy { private subscriptions: Subscription[] = []; @Input('clrPopoverContent') - public set open(value: boolean) { + set open(value: boolean) { this.smartOpenService.open = !!value; } diff --git a/projects/angular/src/utils/popover/providers/popover-events.service.ts b/projects/angular/src/utils/popover/providers/popover-events.service.ts index 5b5fada8c2..818e3e5663 100644 --- a/projects/angular/src/utils/popover/providers/popover-events.service.ts +++ b/projects/angular/src/utils/popover/providers/popover-events.service.ts @@ -15,10 +15,10 @@ import { ClrPopoverToggleService } from './popover-toggle.service'; /** @dynamic */ @Injectable() export class ClrPopoverEventsService implements OnDestroy { - public outsideClickClose = true; - public scrollToClose = true; + outsideClickClose = true; + scrollToClose = true; private documentClickListener: () => void; - public ignoredEvent: any; + ignoredEvent: any; private subscriptions: Subscription[] = []; constructor( @@ -44,7 +44,7 @@ export class ClrPopoverEventsService implements OnDestroy { } private scrollSubscription: Subscription; - public addScrollListener() { + addScrollListener() { if (this.scrollToClose) { this.documentScroller = fromEvent(this.document, 'scroll', { capture: true }); this.scrollSubscription = this.documentScroller @@ -63,7 +63,7 @@ export class ClrPopoverEventsService implements OnDestroy { } } - public removeScrollListener() { + removeScrollListener() { if (this.documentScroller) { this.scrollSubscription.unsubscribe(); delete this.documentScroller; @@ -91,7 +91,7 @@ export class ClrPopoverEventsService implements OnDestroy { } } - public addClickListener() { + addClickListener() { if (this.outsideClickClose) { this.documentClickListener = this.renderer.listen(this.document, 'click', (event: MouseEvent) => { if (event === this.ignoredEvent) { @@ -107,7 +107,7 @@ export class ClrPopoverEventsService implements OnDestroy { } } - public removeClickListener() { + removeClickListener() { if (this.outsideClickClose) { delete this.ignoredEvent; if (this.documentClickListener) { @@ -118,14 +118,14 @@ export class ClrPopoverEventsService implements OnDestroy { } private escapeListener: () => void; - public addEscapeListener() { + addEscapeListener() { this.escapeListener = this.renderer.listen(this.document, 'keydown.escape', () => { this.smartOpenService.open = false; this.setAnchorFocus(); }); } - public removeEscapeListener() { + removeEscapeListener() { if (this.escapeListener) { this.escapeListener(); delete this.escapeListener; @@ -133,34 +133,34 @@ export class ClrPopoverEventsService implements OnDestroy { } private _anchorButtonRef: ElementRef; - public set anchorButtonRef(ref: ElementRef) { + set anchorButtonRef(ref: ElementRef) { this._anchorButtonRef = ref; } - public get anchorButtonRef(): ElementRef { + get anchorButtonRef(): ElementRef { return this._anchorButtonRef; } private _closeButtonRef: ElementRef; - public set closeButtonRef(ref: ElementRef) { + set closeButtonRef(ref: ElementRef) { this._closeButtonRef = ref; } - public get closeButtonRef(): ElementRef { + get closeButtonRef(): ElementRef { return this._closeButtonRef; } - public setCloseFocus(): void { + setCloseFocus(): void { this._closeButtonRef.nativeElement.focus(); } - public setAnchorFocus(): void { + setAnchorFocus(): void { this.anchorButtonRef.nativeElement.focus(); } private _contentRef: ElementRef; - public set contentRef(host: ElementRef) { + set contentRef(host: ElementRef) { this._contentRef = host; } - public get contentRef(): ElementRef { + get contentRef(): ElementRef { return this._contentRef; } diff --git a/projects/angular/src/utils/popover/providers/popover-position.service.ts b/projects/angular/src/utils/popover/providers/popover-position.service.ts index 2837f0fcf1..622aa2ca89 100644 --- a/projects/angular/src/utils/popover/providers/popover-position.service.ts +++ b/projects/angular/src/utils/popover/providers/popover-position.service.ts @@ -38,7 +38,7 @@ export class ClrPopoverPositionService { constructor(private eventService: ClrPopoverEventsService, @Inject(PLATFORM_ID) public platformId: any) {} - public alignContent(content: HTMLElement): ClrPopoverContentOffset { + alignContent(content: HTMLElement): ClrPopoverContentOffset { if (!isPlatformBrowser(this.platformId)) { // Only position when in a browser. // Default to the browser origin and prevent getBoundingClientRect from running. diff --git a/projects/angular/src/utils/popover/providers/popover-toggle.service.ts b/projects/angular/src/utils/popover/providers/popover-toggle.service.ts index 34564deb01..4a5cfd4001 100644 --- a/projects/angular/src/utils/popover/providers/popover-toggle.service.ts +++ b/projects/angular/src/utils/popover/providers/popover-toggle.service.ts @@ -20,24 +20,24 @@ export class ClrPopoverToggleService { private _openEvent: Event; private _openEventChange: Subject = new Subject(); - public get openChange(): Observable { + get openChange(): Observable { return this._openChange.asObservable(); } - public set openEvent(event: Event) { + set openEvent(event: Event) { this._openEvent = event; this._openEventChange.next(event); } - public get openEvent(): Event { + get openEvent(): Event { return this._openEvent; } - public getEventChange(): Observable { + getEventChange(): Observable { return this._openEventChange.asObservable(); } - public set open(value: boolean) { + set open(value: boolean) { value = !!value; if (this._open !== value) { this._open = value; @@ -45,7 +45,7 @@ export class ClrPopoverToggleService { } } - public get open(): boolean { + get open(): boolean { return this._open; } @@ -58,7 +58,7 @@ export class ClrPopoverToggleService { * Sometimes, we need to remember the event that triggered the toggling to avoid loops. * This is for instance the case of components that open on a click, but close on a click outside. */ - public toggleWithEvent(event: any) { + toggleWithEvent(event: any) { preventArrowKeyScroll(event); this.openEvent = event; @@ -67,11 +67,11 @@ export class ClrPopoverToggleService { private _popoverAligned: Subject = new Subject(); - public get popoverAligned(): Observable { + get popoverAligned(): Observable { return this._popoverAligned.asObservable(); } - public popoverAlignedEmit(popoverNode: HTMLElement) { + popoverAlignedEmit(popoverNode: HTMLElement) { this._popoverAligned.next(popoverNode); } } diff --git a/projects/angular/src/wizard/providers/button-hub.service.mock.ts b/projects/angular/src/wizard/providers/button-hub.service.mock.ts index 6782f68433..062e89caa0 100644 --- a/projects/angular/src/wizard/providers/button-hub.service.mock.ts +++ b/projects/angular/src/wizard/providers/button-hub.service.mock.ts @@ -5,9 +5,9 @@ */ export class ButtonHubMock { - public buttonsReady = false; + buttonsReady = false; - public buttonClicked(type: string): string { + buttonClicked(type: string): string { return type; } } diff --git a/projects/angular/src/wizard/providers/button-hub.service.ts b/projects/angular/src/wizard/providers/button-hub.service.ts index 41c76d7f44..afafcbfb4d 100644 --- a/projects/angular/src/wizard/providers/button-hub.service.ts +++ b/projects/angular/src/wizard/providers/button-hub.service.ts @@ -10,39 +10,39 @@ import { Subject } from 'rxjs'; @Injectable() export class ButtonHubService { - public buttonsReady = false; + buttonsReady = false; private _previousBtnClicked = new Subject(); - public get previousBtnClicked(): Observable { + get previousBtnClicked(): Observable { return this._previousBtnClicked.asObservable(); } private _nextBtnClicked = new Subject(); - public get nextBtnClicked(): Observable { + get nextBtnClicked(): Observable { return this._nextBtnClicked.asObservable(); } private _dangerBtnClicked = new Subject(); - public get dangerBtnClicked(): Observable { + get dangerBtnClicked(): Observable { return this._dangerBtnClicked.asObservable(); } private _cancelBtnClicked = new Subject(); - public get cancelBtnClicked(): Observable { + get cancelBtnClicked(): Observable { return this._cancelBtnClicked.asObservable(); } private _finishBtnClicked = new Subject(); - public get finishBtnClicked(): Observable { + get finishBtnClicked(): Observable { return this._finishBtnClicked.asObservable(); } private _customBtnClicked = new Subject(); - public get customBtnClicked(): Observable { + get customBtnClicked(): Observable { return this._customBtnClicked.asObservable(); } - public buttonClicked(buttonType: string): void { + buttonClicked(buttonType: string): void { if ('previous' === buttonType) { this._previousBtnClicked.next(); } else if ('next' === buttonType) { diff --git a/projects/angular/src/wizard/providers/header-actions.service.ts b/projects/angular/src/wizard/providers/header-actions.service.ts index 6afa111607..5fa8d6f5a6 100644 --- a/projects/angular/src/wizard/providers/header-actions.service.ts +++ b/projects/angular/src/wizard/providers/header-actions.service.ts @@ -16,9 +16,9 @@ export class HeaderActionService { constructor(public navService: WizardNavigationService) {} - public wizardHeaderActions: QueryList; + wizardHeaderActions: QueryList; - public get wizardHasHeaderActions(): boolean { + get wizardHasHeaderActions(): boolean { const wizardHdrActions = this.wizardHeaderActions; if (!wizardHdrActions) { return false; @@ -26,15 +26,15 @@ export class HeaderActionService { return wizardHdrActions.toArray().length > 0; } - public get currentPageHasHeaderActions(): boolean { + get currentPageHasHeaderActions(): boolean { return this.navService.currentPage ? this.navService.currentPage.hasHeaderActions : false; } - public get showWizardHeaderActions(): boolean { + get showWizardHeaderActions(): boolean { return !this.currentPageHasHeaderActions && this.wizardHasHeaderActions; } - public get displayHeaderActionsWrapper(): boolean { + get displayHeaderActionsWrapper(): boolean { return this.currentPageHasHeaderActions || this.wizardHasHeaderActions; } } diff --git a/projects/angular/src/wizard/providers/page-collection.service.mock.ts b/projects/angular/src/wizard/providers/page-collection.service.mock.ts index f33fc7f9f9..9530f81663 100644 --- a/projects/angular/src/wizard/providers/page-collection.service.mock.ts +++ b/projects/angular/src/wizard/providers/page-collection.service.mock.ts @@ -9,21 +9,21 @@ import { Subject } from 'rxjs'; export class PageCollectionMock { private _pagesReset = new Subject(); - public get pagesReset(): Observable { + get pagesReset(): Observable { return this._pagesReset.asObservable(); } private _stepItemIdWasCalled = false; - public getStepItemIdForPage(): string { + getStepItemIdForPage(): string { this._stepItemIdWasCalled = true; return 'mock-id'; } - public get stepItemIdWasCalled(): boolean { + get stepItemIdWasCalled(): boolean { return this._stepItemIdWasCalled; } - public _previousPageIsCompleted = true; + _previousPageIsCompleted = true; // eslint-disable-next-line public previousPageIsCompleted(_page: any = null): boolean { diff --git a/projects/angular/src/wizard/providers/page-collection.service.ts b/projects/angular/src/wizard/providers/page-collection.service.ts index e9f162df8d..7a5b0c5dc3 100644 --- a/projects/angular/src/wizard/providers/page-collection.service.ts +++ b/projects/angular/src/wizard/providers/page-collection.service.ts @@ -41,7 +41,7 @@ export class PageCollectionService { * * @memberof PageCollectionService */ - public pages: QueryList; + pages: QueryList; /** * Converts the PageCollectionService.pages QueryList to an array and returns it. @@ -50,7 +50,7 @@ export class PageCollectionService { * * @memberof PageCollectionService */ - public get pagesAsArray(): ClrWizardPage[] { + get pagesAsArray(): ClrWizardPage[] { return this.pages ? this.pages.toArray() : []; } @@ -59,7 +59,7 @@ export class PageCollectionService { * * @memberof PageCollectionService */ - public get pagesCount(): number { + get pagesCount(): number { return this.pages ? this.pages.length : 0; } @@ -69,7 +69,7 @@ export class PageCollectionService { * * @memberof PageCollectionService */ - public get penultimatePage(): ClrWizardPage { + get penultimatePage(): ClrWizardPage { const pageCount = this.pagesCount; if (pageCount < 2) { @@ -85,7 +85,7 @@ export class PageCollectionService { * * @memberof PageCollectionService */ - public get lastPage(): ClrWizardPage { + get lastPage(): ClrWizardPage { const pageCount = this.pagesCount; if (pageCount < 1) { @@ -101,7 +101,7 @@ export class PageCollectionService { * * @memberof PageCollectionService */ - public get firstPage(): ClrWizardPage { + get firstPage(): ClrWizardPage { if (!this.pagesCount) { return null; } @@ -119,7 +119,7 @@ export class PageCollectionService { * * @memberof PageCollectionService */ - public getPageById(id: string): ClrWizardPage { + getPageById(id: string): ClrWizardPage { const foundPages: ClrWizardPage[] = this.pages.filter((page: ClrWizardPage) => id === page.id); return this.checkResults(foundPages, id); } @@ -130,7 +130,7 @@ export class PageCollectionService { * * @memberof PageCollectionService */ - public getPageByIndex(index: number): ClrWizardPage { + getPageByIndex(index: number): ClrWizardPage { const pageCount = this.pagesCount; const pagesLastIndex: number = pageCount > 1 ? pageCount - 1 : 0; @@ -151,7 +151,7 @@ export class PageCollectionService { * * @memberof PageCollectionService */ - public getPageIndex(page: ClrWizardPage): number { + getPageIndex(page: ClrWizardPage): number { const index = this.pagesAsArray.indexOf(page); if (index < 0) { @@ -185,7 +185,7 @@ export class PageCollectionService { * * @memberof PageCollectionService */ - public pageRange(start: number, end: number): ClrWizardPage[] { + pageRange(start: number, end: number): ClrWizardPage[] { let pages: ClrWizardPage[] = []; if (start < 0 || end < 0) { @@ -228,7 +228,7 @@ export class PageCollectionService { * * @memberof PageCollectionService */ - public getPageRangeFromPages(page: ClrWizardPage, otherPage: ClrWizardPage): ClrWizardPage[] { + getPageRangeFromPages(page: ClrWizardPage, otherPage: ClrWizardPage): ClrWizardPage[] { const pageIndex = this.getPageIndex(page); const otherPageIndex = this.getPageIndex(otherPage); let startIndex: number; @@ -251,7 +251,7 @@ export class PageCollectionService { * * @memberof PageCollectionService */ - public getPreviousPage(page: ClrWizardPage) { + getPreviousPage(page: ClrWizardPage) { const myPageIndex = this.getPageIndex(page); const previousPageIndex = myPageIndex - 1; if (previousPageIndex < 0) { @@ -266,7 +266,7 @@ export class PageCollectionService { * * @memberof PageCollectionService */ - public previousPageIsCompleted(page: ClrWizardPage) { + previousPageIsCompleted(page: ClrWizardPage) { if (!page) { return false; } @@ -288,7 +288,7 @@ export class PageCollectionService { * * @memberof PageCollectionService */ - public getNextPage(page: ClrWizardPage) { + getNextPage(page: ClrWizardPage) { const myPageIndex = this.getPageIndex(page); const nextPageIndex = myPageIndex + 1; @@ -304,7 +304,7 @@ export class PageCollectionService { * * @memberof PageCollectionService */ - public getStepItemIdForPage(page: ClrWizardPage) { + getStepItemIdForPage(page: ClrWizardPage) { const pageId = page.id; const pageIdParts = pageId.split('-').reverse(); @@ -320,7 +320,7 @@ export class PageCollectionService { * * @memberof PageCollectionService */ - public commitPage(page: ClrWizardPage) { + commitPage(page: ClrWizardPage) { const pageHasOverrides = page.stopNext || page.preventDefault; page.completed = true; @@ -348,7 +348,7 @@ export class PageCollectionService { * * @memberof PageCollectionService */ - public get pagesReset(): Observable { + get pagesReset(): Observable { return this._pagesReset.asObservable(); } @@ -358,7 +358,7 @@ export class PageCollectionService { * * @memberof PageCollectionService */ - public reset() { + reset() { this.pagesAsArray.forEach((page: ClrWizardPage) => { page.completed = false; }); @@ -373,7 +373,7 @@ export class PageCollectionService { * * @memberof PageCollectionService */ - public updateCompletedStates(): void { + updateCompletedStates(): void { const firstIncompleteIndex = this.findFirstIncompletePageIndex(); if (firstIncompleteIndex === this.pagesAsArray.length - 1) { @@ -393,7 +393,7 @@ export class PageCollectionService { * * @memberof PageCollectionService */ - public findFirstIncompletePageIndex(): number { + findFirstIncompletePageIndex(): number { let returnIndex: number = null; this.pagesAsArray.forEach((page: ClrWizardPage, index: number) => { if (null === returnIndex && false === page.completed) { @@ -409,7 +409,7 @@ export class PageCollectionService { return returnIndex; } - public findFirstIncompletePage(): ClrWizardPage { + findFirstIncompletePage(): ClrWizardPage { const myIncompleteIndex = this.findFirstIncompletePageIndex(); return this.pagesAsArray[myIncompleteIndex]; } diff --git a/projects/angular/src/wizard/providers/wizard-navigation.service.ts b/projects/angular/src/wizard/providers/wizard-navigation.service.ts index 2743b2e05c..a6434d604a 100644 --- a/projects/angular/src/wizard/providers/wizard-navigation.service.ts +++ b/projects/angular/src/wizard/providers/wizard-navigation.service.ts @@ -40,35 +40,35 @@ export class WizardNavigationService implements OnDestroy { * * @memberof WizardNavigationService */ - public previousButtonSubscription: Subscription; + previousButtonSubscription: Subscription; /** * Is notified when a Next button is clicked in the wizard. * * @memberof WizardNavigationService */ - public nextButtonSubscription: Subscription; + nextButtonSubscription: Subscription; /** * Is notified when a danger button is clicked in the wizard. * * @memberof WizardNavigationService */ - public dangerButtonSubscription: Subscription; + dangerButtonSubscription: Subscription; /** * Is notified when a finish button is clicked in the wizard. * * @memberof WizardNavigationService */ - public finishButtonSubscription: Subscription; + finishButtonSubscription: Subscription; /** * Is notified when a Custom button is clicked in the wizard. * * @memberof WizardNavigationService */ - public customButtonSubscription: Subscription; + customButtonSubscription: Subscription; /** * Is notified when a Cancel button is clicked in the wizard. Notifies the wizard, @@ -77,7 +77,7 @@ export class WizardNavigationService implements OnDestroy { * * @memberof WizardNavigationService */ - public cancelButtonSubscription: Subscription; + cancelButtonSubscription: Subscription; /** * Resets navigation to make the first page current when the page collection service @@ -86,7 +86,7 @@ export class WizardNavigationService implements OnDestroy { * * @memberof WizardNavigationService */ - public pagesResetSubscription: Subscription; + pagesResetSubscription: Subscription; /** * Creates an instance of WizardNavigationService. Also sets up subscriptions @@ -170,7 +170,7 @@ export class WizardNavigationService implements OnDestroy { * * @memberof WizardNavigationService */ - public get currentPageChanged(): Observable { + get currentPageChanged(): Observable { // TODO: MAKE SURE EXTERNAL OUTPUTS SAY 'CHANGE' NOT 'CHANGED' // A BREAKING CHANGE SO AWAITING MINOR RELEASE return this._currentChanged.asObservable(); @@ -182,7 +182,7 @@ export class WizardNavigationService implements OnDestroy { * * @memberof WizardNavigationService */ - public navServiceLoaded = false; + navServiceLoaded = false; /** * A boolean flag shared across the Wizard subcomponents that follows the value @@ -195,12 +195,12 @@ export class WizardNavigationService implements OnDestroy { * * @memberof WizardNavigationService */ - public forceForwardNavigation = false; + forceForwardNavigation = false; /** * @memberof WizardNavigationService */ - public get currentPageTitle(): TemplateRef { + get currentPageTitle(): TemplateRef { // when the querylist of pages is empty. this is the first place it fails... if (!this.currentPage) { return null; @@ -216,7 +216,7 @@ export class WizardNavigationService implements OnDestroy { * * @memberof WizardNavigationService */ - public get currentPageIsFirst(): boolean { + get currentPageIsFirst(): boolean { return this.pageCollection.firstPage === this.currentPage; } @@ -228,7 +228,7 @@ export class WizardNavigationService implements OnDestroy { * * @memberof WizardNavigationService */ - public get currentPageIsLast(): boolean { + get currentPageIsLast(): boolean { return this.pageCollection.lastPage === this.currentPage; } @@ -279,7 +279,7 @@ export class WizardNavigationService implements OnDestroy { * * @memberof WizardNavigationService */ - public get movedToNextPage(): Observable { + get movedToNextPage(): Observable { return this._movedToNextPage.asObservable(); } @@ -297,7 +297,7 @@ export class WizardNavigationService implements OnDestroy { * * @memberof WizardNavigationService */ - public get wizardFinished(): Observable { + get wizardFinished(): Observable { return this._wizardFinished.asObservable(); } @@ -313,7 +313,7 @@ export class WizardNavigationService implements OnDestroy { * * @memberof WizardNavigationService */ - public next(): void { + next(): void { if (this.currentPageIsLast) { this.checkAndCommitCurrentPage('finish'); } else { @@ -328,7 +328,7 @@ export class WizardNavigationService implements OnDestroy { * * @memberof WizardNavigationService */ - public forceNext(): void { + forceNext(): void { const currentPage: ClrWizardPage = this.currentPage; const nextPage: ClrWizardPage = this.pageCollection.getNextPage(currentPage); @@ -356,7 +356,7 @@ export class WizardNavigationService implements OnDestroy { * * @memberof WizardNavigationService */ - public checkAndCommitCurrentPage(buttonType: string): void { + checkAndCommitCurrentPage(buttonType: string): void { const currentPage: ClrWizardPage = this.currentPage; if (!currentPage.readyToComplete || this.wizardStopNavigation) { @@ -430,7 +430,7 @@ export class WizardNavigationService implements OnDestroy { * * @memberof WizardNavigationService */ - public finish(): void { + finish(): void { this.checkAndCommitCurrentPage('finish'); } @@ -445,7 +445,7 @@ export class WizardNavigationService implements OnDestroy { * * @memberof WizardNavigationService */ - public get movedToPreviousPage(): Observable { + get movedToPreviousPage(): Observable { return this._movedToPreviousPage.asObservable(); } @@ -457,7 +457,7 @@ export class WizardNavigationService implements OnDestroy { * * @memberof WizardNavigationService */ - public previous(): void { + previous(): void { if (this.currentPageIsFirst || this.wizardStopNavigation) { return; } @@ -487,7 +487,7 @@ export class WizardNavigationService implements OnDestroy { * * @memberof WizardNavigationService */ - public get notifyWizardCancel(): Observable { + get notifyWizardCancel(): Observable { return this._cancelWizard.asObservable(); } @@ -506,7 +506,7 @@ export class WizardNavigationService implements OnDestroy { * * @memberof WizardNavigationService */ - public cancel(): void { + cancel(): void { this._cancelWizard.next(); } @@ -518,7 +518,7 @@ export class WizardNavigationService implements OnDestroy { * * @memberof WizardNavigationService */ - public wizardHasAltCancel = false; + wizardHasAltCancel = false; /** * A boolean flag shared across the Wizard subcomponents that follows the value @@ -528,7 +528,7 @@ export class WizardNavigationService implements OnDestroy { * * @memberof WizardNavigationService */ - public wizardHasAltNext = false; + wizardHasAltNext = false; /** * A boolean flag shared across the Wizard subcomponents that follows the value @@ -540,7 +540,7 @@ export class WizardNavigationService implements OnDestroy { * * @memberof WizardNavigationService */ - public wizardStopNavigation = false; + wizardStopNavigation = false; /** * A boolean flag shared with the stepnav items that prevents user clicks on @@ -548,7 +548,7 @@ export class WizardNavigationService implements OnDestroy { * * @memberof WizardNavigationService */ - public wizardDisableStepnav = false; + wizardDisableStepnav = false; /** * Performs all required checks to determine if a user can navigate to a page. Checking at each @@ -567,7 +567,7 @@ export class WizardNavigationService implements OnDestroy { * * @memberof WizardNavigationService */ - public goTo(pageToGoToOrId: any, lazyComplete = false) { + goTo(pageToGoToOrId: any, lazyComplete = false) { const myPages = this.pageCollection; const pageToGoTo = typeof pageToGoToOrId === 'string' ? myPages.getPageById(pageToGoToOrId) : pageToGoToOrId; const currentPage = this.currentPage; @@ -609,7 +609,7 @@ export class WizardNavigationService implements OnDestroy { * * @memberof WizardNavigationService */ - public canGoTo(pagesToCheck: ClrWizardPage[]): boolean { + canGoTo(pagesToCheck: ClrWizardPage[]): boolean { let okayToMove = true; const myPages = this.pageCollection; @@ -652,7 +652,7 @@ export class WizardNavigationService implements OnDestroy { * * @memberof WizardNavigationService */ - public setLastEnabledPageCurrent(): void { + setLastEnabledPageCurrent(): void { const allPages: ClrWizardPage[] = this.pageCollection.pagesAsArray; let lastCompletedPageIndex: number = null; @@ -678,7 +678,7 @@ export class WizardNavigationService implements OnDestroy { * * @memberof WizardNavigationService */ - public setFirstPageCurrent(): void { + setFirstPageCurrent(): void { this.currentPage = this.pageCollection.pagesAsArray[0]; } @@ -688,7 +688,7 @@ export class WizardNavigationService implements OnDestroy { * * @memberof WizardNavigationService */ - public updateNavigation(): void { + updateNavigation(): void { let toSetCurrent: ClrWizardPage; this.pageCollection.updateCompletedStates(); diff --git a/projects/angular/src/wizard/wizard-button.spec.ts b/projects/angular/src/wizard/wizard-button.spec.ts index fc1625bb55..a590c1c59f 100644 --- a/projects/angular/src/wizard/wizard-button.spec.ts +++ b/projects/angular/src/wizard/wizard-button.spec.ts @@ -30,20 +30,20 @@ import { ClrWizardModule } from './wizard.module'; `, }) class ViewTestComponent { - public show = true; - public btnType = ''; - public disableBtn = false; - public hideBtn = false; - public projector = 'mundo'; + show = true; + btnType = ''; + disableBtn = false; + hideBtn = false; + projector = 'mundo'; private _clickCount = 0; private _lastBtnClicked = ''; - public get clickCount(): number { + get clickCount(): number { return this._clickCount; } - public get lastBtnClicked(): string { + get lastBtnClicked(): string { return this._lastBtnClicked; } - public doClick(btnType: string) { + doClick(btnType: string) { this._lastBtnClicked = btnType; this._clickCount++; } diff --git a/projects/angular/src/wizard/wizard-button.ts b/projects/angular/src/wizard/wizard-button.ts index 8d1ccfd69e..867b18a594 100644 --- a/projects/angular/src/wizard/wizard-button.ts +++ b/projects/angular/src/wizard/wizard-button.ts @@ -49,11 +49,11 @@ export const CUSTOM_BUTTON_TYPES: any = { host: { class: 'clr-wizard-btn-wrapper', '[attr.aria-hidden]': 'isHidden' }, }) export class ClrWizardButton { - @Input('type') public type = ''; + @Input('type') type = ''; - @Input('clrWizardButtonDisabled') public disabled = false; + @Input('clrWizardButtonDisabled') disabled = false; - @Input('clrWizardButtonHidden') public hidden = false; + @Input('clrWizardButtonHidden') hidden = false; // EventEmitter which is emitted when a button is clicked. @Output('clrWizardButtonClicked') wasClicked: EventEmitter = new EventEmitter(false); @@ -70,38 +70,38 @@ export class ClrWizardButton { return false; } - public get isCancel(): boolean { + get isCancel(): boolean { return this.checkDefaultAndCustomType(this.type, 'cancel'); } - public get isNext(): boolean { + get isNext(): boolean { return this.checkDefaultAndCustomType(this.type, 'next'); } - public get isPrevious(): boolean { + get isPrevious(): boolean { return this.checkDefaultAndCustomType(this.type, 'previous'); } - public get isFinish(): boolean { + get isFinish(): boolean { return this.checkDefaultAndCustomType(this.type, 'finish'); } - public get isDanger(): boolean { + get isDanger(): boolean { return this.checkDefaultAndCustomType(this.type, 'danger'); } - public get isPrimaryAction(): boolean { + get isPrimaryAction(): boolean { return this.isNext || this.isDanger || this.isFinish; } - public get _disabledAttribute(): string | null { + get _disabledAttribute(): string | null { if (this.isDisabled) { return ''; } return null; } - public get isDisabled(): boolean { + get isDisabled(): boolean { // dealing with negatives here. cognitively easier to think of it like this... const disabled = true; const nav = this.navService; @@ -139,7 +139,7 @@ export class ClrWizardButton { return !disabled; } - public get isHidden(): boolean { + get isHidden(): boolean { // dealing with negatives here. cognitively easier to think of it like this... const hidden = true; const nav = this.navService; diff --git a/projects/angular/src/wizard/wizard-header-action.spec.ts b/projects/angular/src/wizard/wizard-header-action.spec.ts index f75c6cf9a7..13a4c0a706 100644 --- a/projects/angular/src/wizard/wizard-header-action.spec.ts +++ b/projects/angular/src/wizard/wizard-header-action.spec.ts @@ -43,13 +43,13 @@ class TestComponent { clickedHA: ClrWizardHeaderAction; private _lastClickedHeaderAction = ''; - public get lastClickedHeaderAction(): string { + get lastClickedHeaderAction(): string { return this._lastClickedHeaderAction; } - public titleToUpdate = 'title to update'; + titleToUpdate = 'title to update'; - public click(clickedActionId: string) { + click(clickedActionId: string) { this._lastClickedHeaderAction = clickedActionId; } } diff --git a/projects/angular/src/wizard/wizard-header-action.ts b/projects/angular/src/wizard/wizard-header-action.ts index 8fd6fd37b0..0946d10ba1 100644 --- a/projects/angular/src/wizard/wizard-header-action.ts +++ b/projects/angular/src/wizard/wizard-header-action.ts @@ -31,11 +31,11 @@ export class ClrWizardHeaderAction { // If our host has an ID attribute, we use this instead of our index. @Input('id') _id: string = (wizardHeaderActionIndex++).toString(); - public get id(): string { + get id(): string { return `clr-wizard-header-action-${this._id}`; } - @Input('clrWizardHeaderActionDisabled') public disabled = false; + @Input('clrWizardHeaderActionDisabled') disabled = false; @Output('actionClicked') headerActionClicked: EventEmitter = new EventEmitter(false); diff --git a/projects/angular/src/wizard/wizard-page.mock.ts b/projects/angular/src/wizard/wizard-page.mock.ts index bf81bb1c31..37a8c0ad04 100644 --- a/projects/angular/src/wizard/wizard-page.mock.ts +++ b/projects/angular/src/wizard/wizard-page.mock.ts @@ -11,14 +11,14 @@ export class MockPage { this.id = 'this-is-my-page-id-' + pageIndex++; } - public id: string; - public disabled = false; - public current = false; - public completed = false; - public readyToComplete = false; - public hasError = false; + id: string; + disabled = false; + current = false; + completed = false; + readyToComplete = false; + hasError = false; - public reset(): void { + reset(): void { this.disabled = false; this.current = false; this.completed = false; @@ -26,5 +26,5 @@ export class MockPage { this.hasError = false; } - public navTitle: TemplateRef; + navTitle: TemplateRef; } diff --git a/projects/angular/src/wizard/wizard-page.spec.ts b/projects/angular/src/wizard/wizard-page.spec.ts index 787dfa8db1..8ebd921987 100644 --- a/projects/angular/src/wizard/wizard-page.spec.ts +++ b/projects/angular/src/wizard/wizard-page.spec.ts @@ -23,9 +23,9 @@ import { MockPage } from './wizard-page.mock'; import { ClrWizardModule } from './wizard.module'; class MyPageCollectionMock extends PageCollectionMock { - public previousPage: MockPage; + previousPage: MockPage; - public getPreviousPage(): MockPage { + getPreviousPage(): MockPage { if (this.previousPage) { return this.previousPage; } @@ -79,14 +79,14 @@ class TemplateTestComponent { @ViewChild('lifecycle') lifecycleTemplateTester: ClrWizardPage; @ViewChild('other') otherTemplateTester: ClrWizardPage; - public navTwoWayBindingPassed = false; - public testId = 'ohai'; + navTwoWayBindingPassed = false; + testId = 'ohai'; private _navTestNextDisabled = false; - public get navTestNextDisabled(): boolean { + get navTestNextDisabled(): boolean { return this._navTestNextDisabled; } - public set navTestNextDisabled(val: boolean) { + set navTestNextDisabled(val: boolean) { if (val !== this._navTestNextDisabled) { this.navTwoWayBindingPassed = true; this._navTestNextDisabled = val; @@ -94,10 +94,10 @@ class TemplateTestComponent { } private _navTestPreviousDisabled = true; - public get navTestPreviousDisabled(): boolean { + get navTestPreviousDisabled(): boolean { return this._navTestPreviousDisabled; } - public set navTestPreviousDisabled(val: boolean) { + set navTestPreviousDisabled(val: boolean) { if (val !== this._navTestPreviousDisabled) { this.navTwoWayBindingPassed = true; this._navTestPreviousDisabled = val; @@ -105,16 +105,16 @@ class TemplateTestComponent { } private _navStopCancel = false; - public get navStopCancel(): boolean { + get navStopCancel(): boolean { return this._navStopCancel; } - public set navStopCancel(val: boolean) { + set navStopCancel(val: boolean) { this.navTwoWayBindingPassed = true; this._navStopCancel = val; } - public loadedPageId = ''; - public onLoadCheck(pageId: string): void { + loadedPageId = ''; + onLoadCheck(pageId: string): void { this.loadedPageId = pageId; } } @@ -200,23 +200,23 @@ class ViewTestComponent { @ViewChild('wizardCancelBtn') wizardCancelBtn: ClrWizardButton; @ViewChild('pageCancelBtn') pageCancelBtn: ClrWizardButton; - public projector = 'my projected content'; - public innerProjector = 12; - public asyncLoaded = false; - public asyncContent = ''; + projector = 'my projected content'; + innerProjector = 12; + asyncLoaded = false; + asyncContent = ''; // wizard has to init to open or all the pages are hidden inside modal - public open = true; - public loadAsync(): void { + open = true; + loadAsync(): void { setTimeout(() => { this.asyncLoaded = true; this.asyncContent = 'better late than never'; }, 100); } - public testId = 'ohai'; - public disablePrevious = false; - public preventCancel = false; - public altCancelRan = false; - public altCancel() { + testId = 'ohai'; + disablePrevious = false; + preventCancel = false; + altCancelRan = false; + altCancel() { this.altCancelRan = true; } } diff --git a/projects/angular/src/wizard/wizard-page.ts b/projects/angular/src/wizard/wizard-page.ts index 86b2169b1b..f1904fb214 100644 --- a/projects/angular/src/wizard/wizard-page.ts +++ b/projects/angular/src/wizard/wizard-page.ts @@ -57,7 +57,7 @@ export class ClrWizardPage implements OnInit { * */ @ContentChild(ClrWizardPageTitle, { static: true }) - public pageTitle: ClrWizardPageTitle; + pageTitle: ClrWizardPageTitle; /** * Contains a reference to the desired title for the page's step in the @@ -70,7 +70,7 @@ export class ClrWizardPage implements OnInit { * */ @ContentChild(ClrWizardPageNavTitle, { static: true }) - public pageNavTitle: ClrWizardPageNavTitle; + pageNavTitle: ClrWizardPageNavTitle; /** * Contains a reference to the buttons defined within the page. If not defined, @@ -81,7 +81,7 @@ export class ClrWizardPage implements OnInit { * */ @ContentChild(ClrWizardPageButtons, { static: true }) - public _buttons: ClrWizardPageButtons; + _buttons: ClrWizardPageButtons; /** * Contains a reference to the header actions defined within the page. If not defined, @@ -92,7 +92,7 @@ export class ClrWizardPage implements OnInit { * */ @ContentChild(ClrWizardPageHeaderActions, { static: true }) - public _headerActions: ClrWizardPageHeaderActions; + _headerActions: ClrWizardPageHeaderActions; /** * @@ -115,7 +115,7 @@ export class ClrWizardPage implements OnInit { * @memberof WizardPage * */ - public get nextStepDisabled(): boolean { + get nextStepDisabled(): boolean { return this._nextStepDisabled; } @@ -126,7 +126,7 @@ export class ClrWizardPage implements OnInit { * */ @Input('clrWizardPageNextDisabled') - public set nextStepDisabled(val: boolean) { + set nextStepDisabled(val: boolean) { const valBool = !!val; if (valBool !== this._nextStepDisabled) { this._nextStepDisabled = valBool; @@ -164,7 +164,7 @@ export class ClrWizardPage implements OnInit { * @memberof WizardPage * */ - public get previousStepDisabled(): boolean { + get previousStepDisabled(): boolean { return this._previousStepDisabled; } @@ -175,7 +175,7 @@ export class ClrWizardPage implements OnInit { * */ @Input('clrWizardPagePreviousDisabled') - public set previousStepDisabled(val: boolean) { + set previousStepDisabled(val: boolean) { const valBool = !!val; if (valBool !== this._previousStepDisabled) { this._previousStepDisabled = valBool; @@ -191,7 +191,7 @@ export class ClrWizardPage implements OnInit { * */ @Output('clrWizardPagePreviousDisabledChange') - public previousStepDisabledChange: EventEmitter = new EventEmitter(); + previousStepDisabledChange: EventEmitter = new EventEmitter(); /** * @@ -206,7 +206,7 @@ export class ClrWizardPage implements OnInit { * @memberof WizardPage * */ - public get hasError(): boolean { + get hasError(): boolean { return this._hasError; } @@ -219,7 +219,7 @@ export class ClrWizardPage implements OnInit { * */ @Input('clrWizardPageHasError') - public set hasError(val: boolean) { + set hasError(val: boolean) { const valBool = !!val; if (valBool !== this._hasError) { this._hasError = valBool; @@ -235,7 +235,7 @@ export class ClrWizardPage implements OnInit { * @memberof WizardPage * */ - @Input('clrWizardPagePreventDefault') public preventDefault: boolean | string = false; + @Input('clrWizardPagePreventDefault') preventDefault: boolean | string = false; /** * @@ -250,7 +250,7 @@ export class ClrWizardPage implements OnInit { * @memberof WizardPage * */ - public get stopCancel(): boolean { + get stopCancel(): boolean { return this._stopCancel; } @@ -266,7 +266,7 @@ export class ClrWizardPage implements OnInit { * @memberof ClrWizardPage */ @Input('clrWizardPagePreventDefaultCancel') - public set stopCancel(val: boolean) { + set stopCancel(val: boolean) { const valBool = !!val; if (valBool !== this._stopCancel) { this._stopCancel = valBool; @@ -294,7 +294,7 @@ export class ClrWizardPage implements OnInit { * @memberof WizardPage * */ - public get stopNext(): boolean { + get stopNext(): boolean { return this._stopNext; } @@ -312,7 +312,7 @@ export class ClrWizardPage implements OnInit { * @memberof ClrWizardPage */ @Input('clrWizardPagePreventDefaultNext') - public set stopNext(val: boolean) { + set stopNext(val: boolean) { const valBool = !!val; if (valBool !== this._stopNext) { this._stopNext = valBool; @@ -488,7 +488,7 @@ export class ClrWizardPage implements OnInit { * * @memberof ClrWizardPage */ - public get id(): string { + get id(): string { // covers things like null, undefined, false, and empty string // while allowing zero to pass const idIsNonZeroFalsy = !this._id && this._id !== 0; @@ -510,7 +510,7 @@ export class ClrWizardPage implements OnInit { * @memberof WizardPage * */ - public get readyToComplete(): boolean { + get readyToComplete(): boolean { return !this.nextStepDisabled; } @@ -533,7 +533,7 @@ export class ClrWizardPage implements OnInit { * @memberof WizardPage * */ - public get completed(): boolean { + get completed(): boolean { return this._complete && this.readyToComplete; // FOR V2: UNWIND COMPLETED, READYTOCOMPLETE, AND ERRORS @@ -550,7 +550,7 @@ export class ClrWizardPage implements OnInit { * * @memberof ClrWizardPage */ - public set completed(value: boolean) { + set completed(value: boolean) { this._complete = value; } @@ -560,11 +560,11 @@ export class ClrWizardPage implements OnInit { * @memberof WizardPage * */ - public get current(): boolean { + get current(): boolean { return this.navService.currentPage === this; } - public get disabled(): boolean { + get disabled(): boolean { return !this.enabled; } @@ -579,7 +579,7 @@ export class ClrWizardPage implements OnInit { * @memberof WizardPage * */ - public get enabled(): boolean { + get enabled(): boolean { return this.current || this.completed || this.previousCompleted; } @@ -591,7 +591,7 @@ export class ClrWizardPage implements OnInit { * @memberof WizardPage * */ - public get previousCompleted(): boolean { + get previousCompleted(): boolean { const previousPage = this.pageCollection.getPreviousPage(this); if (!previousPage) { @@ -606,7 +606,7 @@ export class ClrWizardPage implements OnInit { * @memberof WizardPage * */ - public get title(): TemplateRef { + get title(): TemplateRef { return this.pageTitle.pageTitleTemplateRef; } @@ -615,7 +615,7 @@ export class ClrWizardPage implements OnInit { * @memberof WizardPage * */ - public get navTitle(): TemplateRef { + get navTitle(): TemplateRef { if (this.pageNavTitle) { return this.pageNavTitle.pageNavTitleTemplateRef; } @@ -627,7 +627,7 @@ export class ClrWizardPage implements OnInit { * @memberof WizardPage * */ - public get headerActions(): TemplateRef { + get headerActions(): TemplateRef { if (!this._headerActions) { return undefined; } @@ -639,7 +639,7 @@ export class ClrWizardPage implements OnInit { * @memberof WizardPage * */ - public get hasHeaderActions(): boolean { + get hasHeaderActions(): boolean { return !!this._headerActions; } @@ -648,7 +648,7 @@ export class ClrWizardPage implements OnInit { * @memberof WizardPage * */ - public get buttons(): TemplateRef { + get buttons(): TemplateRef { if (!this._buttons) { return undefined; } @@ -664,7 +664,7 @@ export class ClrWizardPage implements OnInit { * @memberof WizardPage * */ - public get hasButtons(): boolean { + get hasButtons(): boolean { return !!this._buttons; } @@ -679,7 +679,7 @@ export class ClrWizardPage implements OnInit { * @memberof WizardPage * */ - public makeCurrent(): void { + makeCurrent(): void { this.navService.currentPage = this; } @@ -689,7 +689,7 @@ export class ClrWizardPage implements OnInit { * @memberof WizardPage * */ - public ngOnInit(): void { + ngOnInit(): void { const navService = this.navService; if (!navService.currentPage && !navService.navServiceLoaded) { this.makeCurrent(); @@ -705,7 +705,7 @@ export class ClrWizardPage implements OnInit { * @memberof WizardPage * */ - public get stepItemId(): string { + get stepItemId(): string { return this.pageCollection.getStepItemIdForPage(this); } } diff --git a/projects/angular/src/wizard/wizard-stepnav-item.spec.ts b/projects/angular/src/wizard/wizard-stepnav-item.spec.ts index d61a757078..f8d300682d 100644 --- a/projects/angular/src/wizard/wizard-stepnav-item.spec.ts +++ b/projects/angular/src/wizard/wizard-stepnav-item.spec.ts @@ -39,7 +39,7 @@ class TestComponent implements AfterContentInit { @ViewChild(ClrWizardPageNavTitle, { static: true }) navTitleRef: ClrWizardPageNavTitle; - public ngAfterContentInit(): void { + ngAfterContentInit(): void { this.page.navTitle = this.navTitleRef.pageNavTitleTemplateRef; } } diff --git a/projects/angular/src/wizard/wizard-stepnav-item.ts b/projects/angular/src/wizard/wizard-stepnav-item.ts index 29264dcd76..7a5beebaef 100644 --- a/projects/angular/src/wizard/wizard-stepnav-item.ts +++ b/projects/angular/src/wizard/wizard-stepnav-item.ts @@ -50,7 +50,7 @@ import { ClrWizardPage } from './wizard-page'; }, }) export class ClrWizardStepnavItem { - @Input('page') public page: ClrWizardPage; + @Input('page') page: ClrWizardPage; constructor( public navService: WizardNavigationService, @@ -64,36 +64,36 @@ export class ClrWizardStepnavItem { } } - public get id(): string { + get id(): string { this.pageGuard(); return this.pageCollection.getStepItemIdForPage(this.page); } - public get stepAriaCurrent(): string { + get stepAriaCurrent(): string { return this.isCurrent && 'step'; } - public get isDisabled(): boolean { + get isDisabled(): boolean { this.pageGuard(); return this.page.disabled || this.navService.wizardStopNavigation || this.navService.wizardDisableStepnav; } - public get isCurrent(): boolean { + get isCurrent(): boolean { this.pageGuard(); return this.page.current; } - public get isComplete(): boolean { + get isComplete(): boolean { this.pageGuard(); return this.page.completed; } - public get hasError(): boolean { + get hasError(): boolean { this.pageGuard(); return this.page.hasError && this.isComplete; } - public get canNavigate(): boolean { + get canNavigate(): boolean { this.pageGuard(); return this.pageCollection.previousPageIsCompleted(this.page); } diff --git a/projects/angular/src/wizard/wizard-stepnav.spec.ts b/projects/angular/src/wizard/wizard-stepnav.spec.ts index 531e00fd68..e20f11f3c7 100644 --- a/projects/angular/src/wizard/wizard-stepnav.spec.ts +++ b/projects/angular/src/wizard/wizard-stepnav.spec.ts @@ -19,7 +19,7 @@ import { ClrWizardModule } from './wizard.module'; let mockPages: MockPage[]; class StepnavPageCollection extends PageCollectionMock { - public get pages(): MockPage[] { + get pages(): MockPage[] { return mockPages; } } diff --git a/projects/angular/src/wizard/wizard.ts b/projects/angular/src/wizard/wizard.ts index c0d68ef629..8079601c47 100644 --- a/projects/angular/src/wizard/wizard.ts +++ b/projects/angular/src/wizard/wizard.ts @@ -213,23 +213,23 @@ export class ClrWizard implements OnDestroy, AfterContentInit, DoCheck { @ContentChildren(ClrWizardHeaderAction) headerActions: QueryList; @ViewChild('wizardTitle') wizardTitle: ElementRef; - public get currentPage(): ClrWizardPage { + get currentPage(): ClrWizardPage { return this.navService.currentPage; } - public set currentPage(page: ClrWizardPage) { + set currentPage(page: ClrWizardPage) { this.navService.goTo(page, true); } - public get isLast(): boolean { + get isLast(): boolean { return this.navService.currentPageIsLast; } - public get isFirst(): boolean { + get isFirst(): boolean { return this.navService.currentPageIsFirst; } - public get isStatic(): boolean { + get isStatic(): boolean { return (this.elementRef.nativeElement as HTMLElement).classList.contains('clr-wizard--inline'); } @@ -258,17 +258,17 @@ export class ClrWizard implements OnDestroy, AfterContentInit, DoCheck { this.differ = differs.find([]).create(null); } - public ngAfterContentInit(): void { + ngAfterContentInit(): void { this.pageCollection.pages = this.pages; this.headerActionService.wizardHeaderActions = this.headerActions; this.initializeButtons(); } - public ngDoCheck(): void { + ngDoCheck(): void { this.updateNavOnPageChanges(); } - public ngOnDestroy(): void { + ngOnDestroy(): void { this.subscriptions.forEach(s => s.unsubscribe()); } @@ -282,7 +282,7 @@ export class ClrWizard implements OnDestroy, AfterContentInit, DoCheck { * navigation where event emissions have already been done and firing them again * may cause an event loop. */ - public finish(skipChecksAndEmits = true): void { + finish(skipChecksAndEmits = true): void { if (skipChecksAndEmits) { this.forceFinish(); } else { @@ -295,7 +295,7 @@ export class ClrWizard implements OnDestroy, AfterContentInit, DoCheck { * Good for a last step in an alternate workflow. Does the same thing as * calling `ClrWizard.finish(true)` or `ClrWizard.finish()` without a parameter. */ - public forceFinish(): void { + forceFinish(): void { if (this.stopNavigation) { return; } @@ -306,7 +306,7 @@ export class ClrWizard implements OnDestroy, AfterContentInit, DoCheck { /** * Opens the wizard. If there is no current page defined, sets the first page in the wizard to be current. */ - public open(): void { + open(): void { this._open = true; if (!this.currentPage) { @@ -322,7 +322,7 @@ export class ClrWizard implements OnDestroy, AfterContentInit, DoCheck { /** * Closes the wizard. Call this directly instead of `cancel()` to implement alternative cancel functionality. */ - public close(): void { + close(): void { if (this.stopNavigation) { return; } @@ -336,7 +336,7 @@ export class ClrWizard implements OnDestroy, AfterContentInit, DoCheck { * close if invoked with no parameter. If parameter is true wizard will open * else if false will close. */ - public toggle(open: boolean): void { + toggle(open: boolean): void { if (open) { this.open(); } else { @@ -347,7 +347,7 @@ export class ClrWizard implements OnDestroy, AfterContentInit, DoCheck { /** * Moves the wizard to the previous page. */ - public previous(): void { + previous(): void { this.navService.previous(); } @@ -365,7 +365,7 @@ export class ClrWizard implements OnDestroy, AfterContentInit, DoCheck { * It is another way to navigate without having to rewrite the wizard’s default * functionality from scratch. */ - public next(skipChecksAndEmits = true): void { + next(skipChecksAndEmits = true): void { if (skipChecksAndEmits) { this.forceNext(); } else { @@ -378,7 +378,7 @@ export class ClrWizard implements OnDestroy, AfterContentInit, DoCheck { * Good for a last step in an alternate workflow. * Alias for `ClrWizard.next(true)` or `ClrWizard.next()` */ - public forceNext(): void { + forceNext(): void { this.navService.forceNext(); } @@ -388,7 +388,7 @@ export class ClrWizard implements OnDestroy, AfterContentInit, DoCheck { * or `[clrWizardPagePreventDefault]` because it will initiate the same checks * and event emissions that invoked your event handler. Use `ClrWizard.close()` instead. */ - public cancel(): void { + cancel(): void { this.navService.cancel(); } @@ -396,7 +396,7 @@ export class ClrWizard implements OnDestroy, AfterContentInit, DoCheck { * Overrides behavior of the underlying modal to avoid collisions with * alternative cancel functionality. In most cases, use `ClrWizard.cancel()` instead. */ - public modalCancel(): void { + modalCancel(): void { if (this.closable) { this.checkAndCancel(); } @@ -407,7 +407,7 @@ export class ClrWizard implements OnDestroy, AfterContentInit, DoCheck { * wizard level. Performs a canceled if not. Emits events that initiate * the alternative cancel outputs `(clrWizardPageOnCancel)` and `(clrWizardOnCancel)`. */ - public checkAndCancel(): void { + checkAndCancel(): void { const currentPage = this.currentPage; const currentPageHasOverrides = currentPage.stopCancel || currentPage.preventDefault; @@ -433,7 +433,7 @@ export class ClrWizard implements OnDestroy, AfterContentInit, DoCheck { * ClrWizardPage.id getter, usually prefixed with `clr-wizard-page-` and then either a * numeric ID or the ID specified for the `ClrWizardPage` component’s `id` input. */ - public goTo(pageId: string): void { + goTo(pageId: string): void { if (!pageId) { return; } @@ -445,7 +445,7 @@ export class ClrWizard implements OnDestroy, AfterContentInit, DoCheck { * be the current page, resetting the wizard navigation. * Use `(clrWizardOnReset)` event to reset the data or model of your wizard. */ - public reset(): void { + reset(): void { this.pageCollection.reset(); this.onReset.next(); } diff --git a/projects/demo/src/app/app.component.ts b/projects/demo/src/app/app.component.ts index 876679c284..835bb8054f 100644 --- a/projects/demo/src/app/app.component.ts +++ b/projects/demo/src/app/app.component.ts @@ -28,7 +28,7 @@ import { APP_ROUTES } from './app.routing'; templateUrl: './app.component.html', }) export class AppComponent { - public routes: Route[] = APP_ROUTES; + routes: Route[] = APP_ROUTES; constructor() { loadChartIconSet(); diff --git a/projects/demo/src/app/buttons/button-loading.ts b/projects/demo/src/app/buttons/button-loading.ts index c56472a658..0b56b5c94c 100644 --- a/projects/demo/src/app/buttons/button-loading.ts +++ b/projects/demo/src/app/buttons/button-loading.ts @@ -13,16 +13,16 @@ import { ClrLoadingState } from '@clr/angular'; styleUrls: ['./buttons.demo.scss'], }) export class ButtonLoadingDemo { - public validateState: ClrLoadingState = ClrLoadingState.DEFAULT; - public submitState: ClrLoadingState = ClrLoadingState.DEFAULT; - public disabledState: ClrLoadingState = ClrLoadingState.DEFAULT; - public enabledState: ClrLoadingState = ClrLoadingState.DEFAULT; - public disabledStateDisabled = false; - public enabledStateDisabled = false; + validateState: ClrLoadingState = ClrLoadingState.DEFAULT; + submitState: ClrLoadingState = ClrLoadingState.DEFAULT; + disabledState: ClrLoadingState = ClrLoadingState.DEFAULT; + enabledState: ClrLoadingState = ClrLoadingState.DEFAULT; + disabledStateDisabled = false; + enabledStateDisabled = false; - public validateSmState = false; - public submitSmState: ClrLoadingState = ClrLoadingState.DEFAULT; - public validateFalsyState: any; + validateSmState = false; + submitSmState: ClrLoadingState = ClrLoadingState.DEFAULT; + validateFalsyState: any; disabledDemo() { this.disabledState = ClrLoadingState.LOADING; diff --git a/projects/demo/src/app/content-container.component.ts b/projects/demo/src/app/content-container.component.ts index ef35d62f81..255f0f675b 100644 --- a/projects/demo/src/app/content-container.component.ts +++ b/projects/demo/src/app/content-container.component.ts @@ -56,5 +56,5 @@ import { APP_ROUTES } from './app.routing'; `, }) export class AppContentContainerComponent { - public routes: Route[] = APP_ROUTES; + routes: Route[] = APP_ROUTES; } diff --git a/projects/demo/src/app/datagrid/inventory/inventory.ts b/projects/demo/src/app/datagrid/inventory/inventory.ts index def52c6254..146d58af7a 100644 --- a/projects/demo/src/app/datagrid/inventory/inventory.ts +++ b/projects/demo/src/app/datagrid/inventory/inventory.ts @@ -11,8 +11,8 @@ import { COLORS, NAMES, POKEMONS } from './values'; @Injectable() export class Inventory { - public size = 100; - public latency = 0; + size = 100; + latency = 0; private _all: User[]; private _currentQuery: User[]; diff --git a/projects/demo/src/app/modal/modal-angular-not-closable.ts b/projects/demo/src/app/modal/modal-angular-not-closable.ts index 94e4353cdc..0a7ac2917b 100644 --- a/projects/demo/src/app/modal/modal-angular-not-closable.ts +++ b/projects/demo/src/app/modal/modal-angular-not-closable.ts @@ -12,5 +12,5 @@ import { Component } from '@angular/core'; }) export class ModalAngularNotClosableDemo { // Booleans to open each example modal - public closable = false; + closable = false; } diff --git a/projects/demo/src/app/modal/modal-angular-show.ts b/projects/demo/src/app/modal/modal-angular-show.ts index 179b3736a7..4738b6be1e 100644 --- a/projects/demo/src/app/modal/modal-angular-show.ts +++ b/projects/demo/src/app/modal/modal-angular-show.ts @@ -12,7 +12,7 @@ import { Component } from '@angular/core'; }) export class ModalAngularShowDemo { // Booleans to open each example modal - public basic = false; + basic = false; onModalClose() { console.log('modal change event'); diff --git a/projects/demo/src/app/modal/modal-angular-static-backdrop.ts b/projects/demo/src/app/modal/modal-angular-static-backdrop.ts index 65f2ff6bb6..71aa6b3d16 100644 --- a/projects/demo/src/app/modal/modal-angular-static-backdrop.ts +++ b/projects/demo/src/app/modal/modal-angular-static-backdrop.ts @@ -12,5 +12,5 @@ import { Component } from '@angular/core'; }) export class ModalAngularStaticBackdropDemo { // Booleans to open each example modal - public static = false; + static = false; } diff --git a/projects/demo/src/app/modal/modal-max-height.ts b/projects/demo/src/app/modal/modal-max-height.ts index b54982f655..9a9853e188 100644 --- a/projects/demo/src/app/modal/modal-max-height.ts +++ b/projects/demo/src/app/modal/modal-max-height.ts @@ -11,5 +11,5 @@ import { Component } from '@angular/core'; templateUrl: './modal-max-height.html', }) export class ModalMaxHeightDemo { - public open = false; + open = false; } diff --git a/projects/demo/src/app/typography/utils/font-switcher.ts b/projects/demo/src/app/typography/utils/font-switcher.ts index a47f92ab8f..1e927645ac 100644 --- a/projects/demo/src/app/typography/utils/font-switcher.ts +++ b/projects/demo/src/app/typography/utils/font-switcher.ts @@ -41,7 +41,7 @@ export class FontSwitcher { this.switchFont(val); } - public handleSwitchFont(event: Event) { + handleSwitchFont(event: Event) { this.switchFont((event.target as HTMLInputElement).value); } diff --git a/projects/demo/src/app/wizard/wizard-inline.demo.ts b/projects/demo/src/app/wizard/wizard-inline.demo.ts index 8e3e1dbd4f..b4ee0888e9 100644 --- a/projects/demo/src/app/wizard/wizard-inline.demo.ts +++ b/projects/demo/src/app/wizard/wizard-inline.demo.ts @@ -15,5 +15,5 @@ import { ClrWizard } from '@clr/angular'; export class WizardInlineDemo { @ViewChild('wizard') wizard: ClrWizard; - public open = true; + open = true; } diff --git a/projects/demo/src/app/wizard/wizard-reset.demo.ts b/projects/demo/src/app/wizard/wizard-reset.demo.ts index 8d9d7bbe7c..b76280d785 100644 --- a/projects/demo/src/app/wizard/wizard-reset.demo.ts +++ b/projects/demo/src/app/wizard/wizard-reset.demo.ts @@ -14,19 +14,19 @@ import { ClrWizard } from '@clr/angular'; export class WizardResetDemo implements OnInit { @ViewChild('wizard') wizard: ClrWizard; - public open = false; + open = false; - public model: any; + model: any; - public ngOnInit() { + ngOnInit() { this.model = { forceReset: false, favoriteColor: '', luckyNumber: '', flavorOfIceCream: '' }; } - public doFinish(): void { + doFinish(): void { this.doReset(); } - public doReset(): void { + doReset(): void { if (this.model.forceReset) { this.model.forceReset = false; this.model.favoriteColor = ''; diff --git a/projects/demo/src/app/z-index/custom-filter.demo.ts b/projects/demo/src/app/z-index/custom-filter.demo.ts index 35112067a9..a23d31a74b 100644 --- a/projects/demo/src/app/z-index/custom-filter.demo.ts +++ b/projects/demo/src/app/z-index/custom-filter.demo.ts @@ -21,21 +21,21 @@ export class ZIndexCustomFilter implements ClrDatagridFilterInterface { * The Observable required as part of the Filter interface */ private changesSubject: Subject = new Subject(); - public get changes(): Observable { + get changes(): Observable { return this.changesSubject.asObservable(); } /** * Tests if an item matches a search text */ - public accepts(): boolean { + accepts(): boolean { return false; } /** * Indicates if the filter is currently active, (at least one input is set) */ - public isActive(): boolean { + isActive(): boolean { return false; } }