Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit c742536

Browse files
author
Sam Graber
authored
Merge pull request #408 from SamGraber/update_types
Update types to the latest
2 parents cbc41c4 + 775c842 commit c742536

File tree

81 files changed

+313
-302
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+313
-302
lines changed

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "typescript-angular-components",
3-
"version": "4.2.3",
3+
"version": "4.2.4",
44
"description": "Reusable responsive angular components",
55
"author": "Renovo Development Team",
66
"keywords": [
@@ -93,9 +93,9 @@
9393
"@types/core-js": "~0.9.34",
9494
"@types/jquery": "~2.0.32",
9595
"@types/jquery.jsignature": "~2.0.28",
96-
"@types/lodash": "~4.14.36",
97-
"@types/moment-timezone": "0.2.31",
98-
"@types/sinon": "1.16.31",
96+
"@types/lodash": "^4.14.53",
97+
"@types/moment-timezone": "^0.2.34",
98+
"@types/sinon": "^1.16.35",
9999
"angular": "~1.5.3",
100100
"angular-animate": "~1.5.3",
101101
"angular-mocks": "~1.5.0",
@@ -113,7 +113,7 @@
113113
"rl-http": "~1.5.1",
114114
"rxjs": "~5.0.0",
115115
"systemjs": "^0.19.28",
116-
"typescript-angular-utilities": "~4.1.2",
116+
"typescript-angular-utilities": "~4.1.3",
117117
"ui-select": "~0.14.7",
118118
"zone.js": "~0.7.2"
119119
},

source/behaviors/autosave/autosave.ng1.tests.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import test = services.test;
1010
import { IChild, IParentChildBehaviorService, serviceName as parentChildServiceName } from '../../services/parentChild/parentChild.service';
1111

1212
interface IAutosaveServiceMock {
13-
autosave: Sinon.SinonSpy;
13+
autosave: sinon.SinonSpy;
1414
}
1515

1616
interface IParentScope extends angular.IScope {
@@ -19,7 +19,7 @@ interface IParentScope extends angular.IScope {
1919

2020
interface IMockFormController {
2121
$pristine: boolean;
22-
$setPristine: Sinon.SinonSpy;
22+
$setPristine: sinon.SinonSpy;
2323
}
2424

2525
interface IChildLinkMock extends IChild<any> {}
@@ -29,7 +29,7 @@ describe('AutosaveController', () => {
2929
var autosave: AutosaveController;
3030
var parentChildBehavior: IParentChildBehaviorService;
3131
var $attrs: IAutosaveAttributes;
32-
var autosaveSpy: Sinon.SinonSpy;
32+
var autosaveSpy: sinon.SinonSpy;
3333
var childLink: IChildLinkMock;
3434

3535
beforeEach(() => {
@@ -76,7 +76,7 @@ describe('AutosaveController', () => {
7676
childLink = <any>{};
7777
}
7878

79-
var $parse: any = (expression: string): Sinon.SinonSpy => {
79+
var $parse: any = (expression: string): sinon.SinonSpy => {
8080
if (expression === 'link') {
8181
return sinon.spy((): IChildLinkMock => {
8282
return childLink;

source/behaviors/autosave/autosave.tests.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ import { AutosaveDirective, DEFAULT_AUTOSAVE_DEBOUNCE } from './autosave';
66
interface IFormMock {
77
dirty: boolean;
88
form: { statusChanges: Subject<void> };
9-
validate: Sinon.SinonSpy;
10-
submitAndWait: Sinon.SinonSpy;
11-
saveForm: Sinon.SinonSpy;
9+
validate: sinon.SinonSpy;
10+
submitAndWait: sinon.SinonSpy;
11+
saveForm: sinon.SinonSpy;
1212
}
1313

1414
interface IAutosaveActionMock {
15-
waitOn: Sinon.SinonSpy;
15+
waitOn: sinon.SinonSpy;
1616
}
1717

1818
describe('AutosaveDirective', () => {

source/components/buttons/buttonAsync/buttonAsync.tests.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
import { ButtonAsyncComponent } from './buttonAsync';
44

55
interface IMockBusy {
6-
waitOn: Sinon.SinonSpy;
6+
waitOn: sinon.SinonSpy;
77
}
88

99
describe('ButtonAsyncComponent', () => {
1010
let button: ButtonAsyncComponent;
1111
let busy: IMockBusy;
12-
let action: Sinon.SinonSpy;
12+
let action: sinon.SinonSpy;
1313

1414
beforeEach(() => {
1515
button = new ButtonAsyncComponent();

source/components/buttons/buttonLongClick/buttonLongClick.tests.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ import __timeout = services.timeout;
77
import { ButtonLongClickComponent } from './buttonLongClick';
88

99
interface IMockBusy {
10-
waitOn: Sinon.SinonSpy;
10+
waitOn: sinon.SinonSpy;
1111
}
1212

1313
interface IMockNotification {
14-
warning: Sinon.SinonSpy;
14+
warning: sinon.SinonSpy;
1515
}
1616

1717
describe('ButtonLongClickComponent', () => {
1818
let button: ButtonLongClickComponent;
1919
let busy: IMockBusy;
20-
let action: Sinon.SinonSpy;
20+
let action: sinon.SinonSpy;
2121
let notification: IMockNotification;
2222

2323
beforeEach(() => {

source/components/buttons/buttonSubmit/buttonSubmit.tests.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ import { Observable } from 'rxjs';
22
import { ButtonSubmitComponent } from './buttonSubmit';
33

44
interface IMockForm {
5-
submitAndWait: Sinon.SinonSpy;
5+
submitAndWait: sinon.SinonSpy;
66
}
77

88
interface IMockBusy {
9-
waitOn: Sinon.SinonSpy;
9+
waitOn: sinon.SinonSpy;
1010
}
1111

1212
interface IMockExceptionHandler {
13-
call: Sinon.SinonSpy;
13+
call: sinon.SinonSpy;
1414
}
1515

1616
describe('ButtonSubmitComponent', (): void => {

source/components/buttons/buttonToggle/buttonToggle.ng1.tests.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import test = services.test;
1414
interface INgModelMock {
1515
$viewValue: boolean;
1616
$modelValue: boolean;
17-
$setViewValue: Sinon.SinonSpy;
17+
$setViewValue: sinon.SinonSpy;
1818
}
1919

2020
describe('ButtonToggleController', () => {
@@ -42,7 +42,7 @@ describe('ButtonToggleController', () => {
4242
it('should call toggle on the scope if a toggle function is specified', (): void => {
4343
buildController();
4444

45-
let toggleSpy: Sinon.SinonSpy = sinon.spy();
45+
let toggleSpy: sinon.SinonSpy = sinon.spy();
4646
buttonToggle.onToggle = toggleSpy;
4747

4848
buttonToggle.clicked();

source/components/buttons/buttonToggle/buttonToggle.tests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ describe('ButtonToggleComponent', () => {
88
});
99

1010
it('should update the value and emit a change event when the button is toggled', (): void => {
11-
const changeSpy: Sinon.SinonSpy = sinon.spy();
11+
const changeSpy: sinon.SinonSpy = sinon.spy();
1212

1313
buttonToggle.change.emit = changeSpy;
1414

source/components/cardContainer/card/card.ng1.tests.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ import * as angular from 'angular';
1717
import 'angular-mocks';
1818

1919
interface ICardContainerMock {
20-
openCard: Sinon.SinonSpy;
20+
openCard: sinon.SinonSpy;
2121
}
2222

2323
interface ICardChildBehaviorMock {
24-
initCard?: Sinon.SinonSpy;
25-
validateCard?: Sinon.SinonSpy;
26-
saveCard?: Sinon.SinonSpy;
27-
clickCard?: Sinon.SinonSpy;
24+
initCard?: sinon.SinonSpy;
25+
validateCard?: sinon.SinonSpy;
26+
saveCard?: sinon.SinonSpy;
27+
clickCard?: sinon.SinonSpy;
2828
}
2929

3030
interface IAutosaveBehaviorMock {
31-
autosave: Sinon.SinonSpy;
31+
autosave: sinon.SinonSpy;
3232
}
3333

3434
describe('CardController', () => {
@@ -64,7 +64,7 @@ describe('CardController', () => {
6464
});
6565

6666
it('should provide a function for setting the selected property', (): void => {
67-
let selectSpy: Sinon.SinonSpy = sinon.spy();
67+
let selectSpy: sinon.SinonSpy = sinon.spy();
6868
buildController();
6969
card.selectionChanged = selectSpy;
7070

@@ -83,12 +83,12 @@ describe('CardController', () => {
8383

8484
it('should provide a function for refreshing the data source', (): void => {
8585
buildController();
86-
let refreshSpy: Sinon.SinonSpy = sinon.spy();
86+
let refreshSpy: sinon.SinonSpy = sinon.spy();
8787
card.refresh.subscribe(refreshSpy);
8888

8989
scope.refresh();
9090

91-
sinon.assert.calledOnce(<Sinon.SinonSpy>card.source.refresh);
91+
sinon.assert.calledOnce(<sinon.SinonSpy>card.source.refresh);
9292
sinon.assert.calledOnce(refreshSpy);
9393
});
9494

@@ -99,8 +99,8 @@ describe('CardController', () => {
9999

100100
scope.remove();
101101

102-
sinon.assert.calledOnce(<Sinon.SinonSpy>card.source.remove);
103-
sinon.assert.calledWith(<Sinon.SinonSpy>card.source.remove, item);
102+
sinon.assert.calledOnce(<sinon.SinonSpy>card.source.remove);
103+
sinon.assert.calledWith(<sinon.SinonSpy>card.source.remove, item);
104104
});
105105
});
106106

source/components/cardContainer/card/card.tests.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ import { FormService } from '../../../services/form/form.service';
99
import { CardComponent } from './card';
1010

1111
interface ICardContainerMock {
12-
openCard: Sinon.SinonSpy;
12+
openCard: sinon.SinonSpy;
1313
dataSource: any;
1414
columnTemplates?: any;
1515
}
1616

1717
interface IGuidServiceMock {
18-
random: Sinon.SinonSpy;
18+
random: sinon.SinonSpy;
1919
}
2020

2121
describe('CardComponent', () => {
@@ -53,8 +53,8 @@ describe('CardComponent', () => {
5353

5454
card.remove();
5555

56-
sinon.assert.calledOnce(<Sinon.SinonSpy>cardContainer.dataSource.remove);
57-
sinon.assert.calledWith(<Sinon.SinonSpy>cardContainer.dataSource.remove, item);
56+
sinon.assert.calledOnce(<sinon.SinonSpy>cardContainer.dataSource.remove);
57+
sinon.assert.calledWith(<sinon.SinonSpy>cardContainer.dataSource.remove, item);
5858
});
5959

6060
it('should get a matching column template from the card container', (): void => {

source/components/cardContainer/card/headerColumn/headerColumn.tests.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { CardHeaderColumnComponent } from './headerColumn';
22

33
interface ITransformMock {
4-
getValue: Sinon.SinonSpy;
4+
getValue: sinon.SinonSpy;
55
}
66

77
interface ISizeForBreakpointsMock {
8-
getClass: Sinon.SinonSpy;
8+
getClass: sinon.SinonSpy;
99
}
1010

1111
describe('CardHeaderColumnComponent', () => {

source/components/cardContainer/card/selectableCard.tests.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ import { FormService } from '../../../services/form/form.service';
66
import { SelectableCardComponent } from './selectableCard';
77

88
interface ICardContainerMock {
9-
setSelected: Sinon.SinonSpy;
9+
setSelected: sinon.SinonSpy;
1010
}
1111

1212
interface IGuidServiceMock {
13-
random: Sinon.SinonSpy;
13+
random: sinon.SinonSpy;
1414
}
1515

1616
describe('SelectableCardComponent', () => {

source/components/cardContainer/cardContainer.ng1.tests.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,27 @@ import 'angular-mocks';
2222
import { Subject } from 'rxjs';
2323

2424
interface IDataSourceMock {
25-
refresh: Sinon.SinonSpy;
26-
onSortChange?: Sinon.SinonSpy;
25+
refresh: sinon.SinonSpy;
26+
onSortChange?: sinon.SinonSpy;
2727
pager?: IDataPagerMock;
2828
filters?: IFilterMock[];
2929
rawDataSet?: any[];
3030
dataSet?: any[];
3131
filteredDataSet?: any[];
32-
initPager: Sinon.SinonSpy;
32+
initPager: sinon.SinonSpy;
3333
changed: Subject<void>;
3434
redrawing: Subject<void>;
3535
}
3636

3737
interface IDataPagerMock {
3838
pageSize: number;
3939
pageNumber: number;
40-
filter: Sinon.SinonSpy;
40+
filter: sinon.SinonSpy;
4141
}
4242

4343
interface IFilterMock {
4444
type: string;
45-
filter: Sinon.SinonSpy;
45+
filter: sinon.SinonSpy;
4646
}
4747

4848
describe('CardContainerController', () => {
@@ -132,7 +132,7 @@ describe('CardContainerController', () => {
132132

133133
okayToOpen = cardContainer.openCard();
134134

135-
sinon.assert.calledOnce(<Sinon.SinonSpy>behavior.close);
135+
sinon.assert.calledOnce(<sinon.SinonSpy>behavior.close);
136136

137137
expect(okayToOpen).to.be.true;
138138
});
@@ -453,8 +453,8 @@ describe('CardContainerController', () => {
453453
expect(dataSource.rawDataSet[0].viewData).to.exist;
454454
expect(dataSource.rawDataSet[1].viewData).to.exist;
455455

456-
sinon.assert.calledOnce(<Sinon.SinonSpy>dataSource.redrawing.subscribe);
457-
sinon.assert.calledOnce(<Sinon.SinonSpy>dataSource.changed.subscribe);
456+
sinon.assert.calledOnce(<sinon.SinonSpy>dataSource.redrawing.subscribe);
457+
sinon.assert.calledOnce(<sinon.SinonSpy>dataSource.changed.subscribe);
458458
});
459459

460460
it('should add view data to new items when changed is fire', (): void => {
@@ -480,7 +480,7 @@ describe('CardContainerController', () => {
480480
dataSource.dataSet = dataSource.rawDataSet;
481481
dataSource.filteredDataSet = dataSource.rawDataSet;
482482
buildController();
483-
const numberSelectedSpy: Sinon.SinonSpy = sinon.spy();
483+
const numberSelectedSpy: sinon.SinonSpy = sinon.spy();
484484
cardContainer.numberSelectedChanges.subscribe(numberSelectedSpy);
485485

486486
_.each(dataSource.dataSet, (item: any): void => {
@@ -507,7 +507,7 @@ describe('CardContainerController', () => {
507507
});
508508

509509
it('should fire selectionChangedEvent when selectionChanged is called', (): void => {
510-
let selectionSpy: Sinon.SinonSpy = sinon.spy();
510+
let selectionSpy: sinon.SinonSpy = sinon.spy();
511511
buildController();
512512

513513
cardContainer.selectionChangedEvent = selectionSpy;

source/components/cardContainer/cardContainer.tests.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,22 @@ interface IDataSourceMock {
1818
rawDataSet$: BehaviorSubject<any>;
1919
dataSet$: BehaviorSubject<any>;
2020
filteredDataSet$: BehaviorSubject<any>;
21-
init: Sinon.SinonSpy;
21+
init: sinon.SinonSpy;
2222
}
2323

2424
interface IDataPagerMock {
2525
pageSize$: BehaviorSubject<number>;
2626
pageNumber$: BehaviorSubject<number>;
27-
filter: Sinon.SinonSpy;
27+
filter: sinon.SinonSpy;
2828
}
2929

3030
interface IFilterMock {
31-
filter: Sinon.SinonSpy;
31+
filter: sinon.SinonSpy;
3232
}
3333

3434
interface SortManagerMock {
35-
updateSorts: Sinon.SinonSpy;
36-
setup: Sinon.SinonSpy;
35+
updateSorts: sinon.SinonSpy;
36+
setup: sinon.SinonSpy;
3737
}
3838

3939
describe('CardContainerComponent', () => {
@@ -138,7 +138,7 @@ describe('CardContainerComponent', () => {
138138

139139
okayToOpen = cardContainer.openCard();
140140

141-
sinon.assert.calledOnce(<Sinon.SinonSpy>card.close);
141+
sinon.assert.calledOnce(<sinon.SinonSpy>card.close);
142142

143143
expect(okayToOpen).to.be.true;
144144
});

0 commit comments

Comments
 (0)