Skip to content

Commit 32421fe

Browse files
author
lon
committed
Remove private
1 parent c579f3c commit 32421fe

File tree

13 files changed

+95
-95
lines changed

13 files changed

+95
-95
lines changed

Diff for: components/accordion/accordion.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ export class AccordionComponent implements AfterContentInit {
1515
public accordions: QueryList<AccordionPanelComponent>;
1616

1717
@Input()
18-
private option: any = {};
18+
option: any = {};
1919

20-
private _accordions: Array<AccordionPanelComponent> = [];
20+
_accordions: Array<AccordionPanelComponent> = [];
2121

2222
constructor() {
2323

Diff for: components/accordion/accordion_panel.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ export class AccordionPanelComponent {
4747
}
4848
}
4949

50-
private _active: boolean = false;
51-
private panelState: string = 'inactive';
52-
private parent: any;
50+
_active: boolean = false;
51+
panelState: string = 'inactive';
52+
parent: any;
5353
constructor() {
5454

5555
}

Diff for: components/checkbox/checkbox.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ export class CheckBoxComponent implements ControlValueAccessor {
3636
@Output()
3737
onChange: EventEmitter<boolean> = new EventEmitter<boolean>();
3838

39-
private checked: boolean = false;
40-
private _onChange = (_: any) => { };
41-
private _onTouched = () => { };
39+
checked: boolean = false;
40+
_onChange = (_: any) => { };
41+
_onTouched = () => { };
4242

4343
constructor() {
4444
}

Diff for: components/dimmer/dimmer.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import { Component, Input, ElementRef, ViewChild } from '@angular/core'
1616
export class DimmerComponent {
1717
@ViewChild("dimmerDiv") dimmerDiv: ElementRef;
1818

19-
private parentEle: any
20-
private _active: boolean;
19+
parentEle: any
20+
_active: boolean;
2121

2222
@Input()
2323
public set active(val: boolean) {

Diff for: components/dropdown/dropdown.ts

+11-11
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ export class DropdownComponent implements ControlValueAccessor {
6767
@Input()
6868
public multiple: boolean = false;
6969

70-
private get active(): boolean {
70+
get active(): boolean {
7171
return this._active;
7272
}
73-
private set active(v: boolean) {
73+
set active(v: boolean) {
7474
this._active = !!v;
7575
if (this._active) {
7676
this.menuPanelState = 'active';
@@ -80,14 +80,14 @@ export class DropdownComponent implements ControlValueAccessor {
8080
}
8181

8282

83-
private selectedItem: any;
84-
private menuPanelState: string = 'inactive';
83+
selectedItem: any;
84+
menuPanelState: string = 'inactive';
8585

86-
private id: string;
86+
id: string;
8787

88-
private _active: boolean = false;
89-
private _onChange = (_: any) => { };
90-
private _onTouched = () => { };
88+
_active: boolean = false;
89+
_onChange = (_: any) => { };
90+
_onTouched = () => { };
9191

9292
constructor() {
9393
this.id = `lsu_dropdown_${Math.random()}`;
@@ -121,21 +121,21 @@ export class DropdownComponent implements ControlValueAccessor {
121121
}
122122
}
123123

124-
private onDocumentClick(event: any): void {
124+
onDocumentClick(event: any): void {
125125
let id: string = event.target.id;
126126
if (this.active && id !== this.id) {
127127
this.active = false;
128128
}
129129
}
130130

131-
private toggleSelectPanel(event?: any): void {
131+
toggleSelectPanel(event?: any): void {
132132
this.active = !this.active;
133133
if (event) {
134134
event.target.id = this.id;
135135
}
136136
}
137137

138-
private isSelected(item: any): boolean {
138+
isSelected(item: any): boolean {
139139
if (!this.selectedItem) {
140140
return false;
141141
}

Diff for: components/loader/loader.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { Component, Input, ElementRef, ViewChild } from '@angular/core'
1212
export class LoaderComponent {
1313
@ViewChild("loaderDiv") loaderDiv: ElementRef;
1414

15-
private _active: boolean;
15+
_active: boolean;
1616
@Input()
1717
public set active(val: boolean) {
1818
this._active = val;
@@ -28,7 +28,7 @@ export class LoaderComponent {
2828
@Input()
2929
public loaderSize: string
3030

31-
private parentEle: any
31+
parentEle: any
3232

3333
constructor() {
3434
}

Diff for: components/modal/modal.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ export class ModalComponent implements ControlValueAccessor {
3434
@Input()
3535
public options: any = {};
3636

37-
private _showModal: boolean;
38-
private element: any;
39-
private id: string;
40-
private _onChange = (_: any) => { };
41-
private _onTouched = () => { };
37+
_showModal: boolean;
38+
element: any;
39+
id: string;
40+
_onChange = (_: any) => { };
41+
_onTouched = () => { };
4242

4343
constructor() {
4444
this.id = `lsu_modal_${Math.random()}`
@@ -74,11 +74,11 @@ export class ModalComponent implements ControlValueAccessor {
7474
this.element = document.getElementById(this.id);
7575
}
7676

77-
private clickContent(event: any): void {
77+
clickContent(event: any): void {
7878
event.stopPropagation();
7979
}
8080

81-
private closeModal(): void {
81+
closeModal(): void {
8282
if (!this.options.closeable) {
8383
return;
8484
}

Diff for: components/pagination/pagination.ts

+22-22
Original file line numberDiff line numberDiff line change
@@ -41,34 +41,34 @@ import { Component, Input, Output, EventEmitter } from '@angular/core';
4141

4242
export class PaginationComponent {
4343
@Input()
44-
private set maxSize(value: number) {
44+
set maxSize(value: number) {
4545
this._maxSize = value || 10;
4646
this.updateTotalPages();
4747
}
48-
private get maxSize(): number {
48+
get maxSize(): number {
4949
return this._maxSize;
5050
}
5151

5252
@Input()
53-
private set pageSize(value: number) {
53+
set pageSize(value: number) {
5454
this._pageSize = value || 10;
5555
this.updateTotalPages();
5656
}
57-
private get pageSize(): number {
57+
get pageSize(): number {
5858
return this._pageSize;
5959
}
6060

6161
@Input()
62-
private set totalCount(value: number) {
62+
set totalCount(value: number) {
6363
this._totalCount = value || 0;
6464
this.updateTotalPages();
6565
}
66-
private get totalCount(): number {
66+
get totalCount(): number {
6767
return this._totalCount;
6868
}
6969

7070
@Input()
71-
private set currentPage(value: number) {
71+
set currentPage(value: number) {
7272
value = value || 1;
7373
const _temp = this._currentPage;
7474
this._currentPage = value < 1 ? 1 : value > this.totalPages ? this.totalPages : value;
@@ -79,28 +79,28 @@ export class PaginationComponent {
7979
this.onSelectPage.next(value);
8080
}
8181
}
82-
private get currentPage(): number {
82+
get currentPage(): number {
8383
return this._currentPage;
8484
}
8585

8686
@Input()
87-
private disabled: boolean = false;
87+
disabled: boolean = false;
8888

8989
@Input()
90-
private options: any = {};
90+
options: any = {};
9191

9292
@Output()
93-
private onSelectPage: EventEmitter<any>;
93+
onSelectPage: EventEmitter<any>;
9494

9595
protected _maxSize: number;
9696
protected _pageSize: number;
9797
protected _totalCount: number;
9898
protected _currentPage: number;
9999
protected _inited: boolean = false;
100-
private totalPages: number;
101-
private pages: Array<number> = [];
102-
private showPrevMoreBtn: boolean = false;
103-
private showNextMoreBtn: boolean = false;
100+
totalPages: number;
101+
pages: Array<number> = [];
102+
showPrevMoreBtn: boolean = false;
103+
showNextMoreBtn: boolean = false;
104104

105105
constructor() {
106106
this.onSelectPage = new EventEmitter();
@@ -113,7 +113,7 @@ export class PaginationComponent {
113113
this.updateTotalPages();
114114
}
115115

116-
private updateTotalPages(): void {
116+
updateTotalPages(): void {
117117
if (!this._inited) return;
118118
let pageCount: number;
119119
if (this.totalCount !== undefined) {
@@ -128,7 +128,7 @@ export class PaginationComponent {
128128
this.setPage(this.currentPage);
129129
}
130130

131-
private getPages(currentPage: number, totalPage: number): Array<number> {
131+
getPages(currentPage: number, totalPage: number): Array<number> {
132132
let pages: Array<number> = [];
133133
let maxSize = this.maxSize;
134134
if (currentPage > totalPage) {
@@ -151,7 +151,7 @@ export class PaginationComponent {
151151
return pages;
152152
}
153153

154-
private setPage(pageIndex: number, updateCurrentPage: boolean = true): void {
154+
setPage(pageIndex: number, updateCurrentPage: boolean = true): void {
155155
if (pageIndex < 1) {
156156
pageIndex = 1;
157157
}
@@ -164,22 +164,22 @@ export class PaginationComponent {
164164
this.pages = this.getPages(pageIndex, this.totalPages);
165165
}
166166

167-
private pageUp(): void {
167+
pageUp(): void {
168168
let pageIndex = this.currentPage - 1;
169169
this.setPage(pageIndex);
170170
}
171171

172-
private pageDown(): void {
172+
pageDown(): void {
173173
let pageIndex = this.currentPage + 1;
174174
this.setPage(pageIndex);
175175
}
176176

177-
private prevMore(): void {
177+
prevMore(): void {
178178
let pageIndex = this.pages[0] - 1;
179179
this.setPage(pageIndex, false);
180180
}
181181

182-
private nextMore(): void {
182+
nextMore(): void {
183183
let pageIndex = this.pages[this.pages.length - 1] + 1
184184
this.setPage(pageIndex, false);
185185
}

Diff for: components/popup/popup.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ import { Directive, Input, ElementRef } from '@angular/core';
1414

1515
export class PopupDirective {
1616
@Input()
17-
private content: string = "";
17+
content: string = "";
1818

1919
@Input()
20-
private trigger: string = "hover";
20+
trigger: string = "hover";
2121

22-
private element: any;
23-
private popupEle: any;
24-
private timeout: any;
22+
element: any;
23+
popupEle: any;
24+
timeout: any;
2525

2626
constructor(el: ElementRef) {
2727
this.element = el.nativeElement;
@@ -39,26 +39,26 @@ export class PopupDirective {
3939
this.setPosition();
4040
}
4141

42-
private setPosition(): void {
42+
setPosition(): void {
4343
let top = this.element.offsetTop;
4444
let left = this.element.offsetLeft;
4545
let height = this.popupEle.offsetHeight;
4646
this.popupEle.style.top = top - height - 10 + 'px';
4747
this.popupEle.style.left = left + 'px';
4848
}
4949

50-
private show(): void {
50+
show(): void {
5151
this.popupEle.classList.remove('hidden');
5252
this.popupEle.classList.add('visible');
5353
this.setPosition();
5454
}
5555

56-
private hidden(): void {
56+
hidden(): void {
5757
this.popupEle.classList.remove('visible');
5858
this.popupEle.classList.add('hidden');
5959
}
6060

61-
private isActived(): boolean {
61+
isActived(): boolean {
6262
return this.popupEle.classList.contains('visible');
6363
}
6464

Diff for: components/rating/rating.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ export class RatingComponent implements ControlValueAccessor {
3838
@Input()
3939
public size: string = "";
4040

41-
private ratings: Array<number>;
41+
ratings: Array<number>;
4242

43-
private _onChange = (_: any) => { };
44-
private _onTouched = () => { };
43+
_onChange = (_: any) => { };
44+
_onTouched = () => { };
4545

4646
constructor() {
4747
}
@@ -65,15 +65,15 @@ export class RatingComponent implements ControlValueAccessor {
6565
this.ratings = this.getRatings(this.maxRating);
6666
}
6767

68-
private getRatings(size: number): Array<number> {
68+
getRatings(size: number): Array<number> {
6969
let ratings: Array<number> = [];
7070
for (let i = 0; i < size; i++) {
7171
ratings.push(i + 1);
7272
}
7373
return ratings;
7474
}
7575

76-
private setRating(item: number): void {
76+
setRating(item: number): void {
7777
this.writeValue(item);
7878
}
7979
}

0 commit comments

Comments
 (0)