Skip to content

Commit 968d019

Browse files
committed
keep naming convention for interfaces
1 parent d4d40e1 commit 968d019

File tree

7 files changed

+102
-41
lines changed

7 files changed

+102
-41
lines changed

src/demo-app/app/dialog-declarative/dialog-declarative.component.html

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -227,20 +227,21 @@ <h5>Dialog configuration object</h5>
227227
</tr>
228228

229229
<tr>
230-
<td>openFrom?: <br/>MdlButtonComponent | <br/>MouseEvent | <br/>OpenCloseRect</td>
230+
<td>openFrom?: <br/>MdlButtonComponent | <br/>MouseEvent | <br/>IOpenCloseRect</td>
231231
<td>
232-
Use a show animation for the dialag that starts at a MdlButtonComponent, a MousEvent or a OpenCloseRect. From all
233-
of these types the top, left, width and height will be used to create the starting point and startings size of
232+
Use a show animation for the dialag that starts at a <i>MdlButtonComponent</i>,
233+
a <i>MousEvent</i> or a <i>IOpenCloseRect</i>. From all of these types the top, left,
234+
width and height will be used to create the starting point and startings size of
234235
the dialog animation.
235236
</td>
236237
</tr>
237238

238239
<tr>
239-
<td>closeTo?: <br/>MdlButtonComponent | <br/>MouseEvent | <br/>OpenCloseRect</td>
240+
<td>closeTo?: <br/>MdlButtonComponent | <br/>MouseEvent | <br/>IOpenCloseRect</td>
240241
<td>
241-
Use a show animation for the dialag that ends at a MdlButtonComponent, a MousEvent or a OpenCloseRect. From all
242-
of these types the top, left, width and height will be used to create the end point and end size of
243-
the dialog animation.
242+
Use a show animation for the dialag that ends at a <i>MdlButtonComponent</i>, a <i>MousEvent</i>
243+
or a <i>IOpenCloseRect</i>. From all of these types the top, left, width and height will be used
244+
to create the end point and end size of the dialog animation.
244245
</td>
245246
</tr>
246247
</tbody>

src/demo-app/app/dialog/dialog.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ <h5>Dialog with choises</h5>
111111
left: document.body.offsetWidth/2,
112112
height: 0,
113113
top: document.body.offsetHeight/2,
114-
width: 0} as OpenCloseRect
114+
width: 0} as IOpenCloseRect
115115
});
116116
pDialog.then( (dialogReference) => console.log('dialog visible', dialogReference) );
117117

src/demo-app/app/dialog/dialog.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
LoginDialogComponent,
1717
TEST_VALUE
1818
} from './login-dialog.component';
19-
import { OpenCloseRect } from '../../../lib/components/dialog/mdl-dialog-configuration';
19+
import { IOpenCloseRect } from '../../../lib/components/dialog/mdl-dialog-configuration';
2020

2121

2222
@Component({
@@ -93,7 +93,7 @@ export class DialogDemo extends AbstractDemoComponent {
9393
left: document.body.offsetWidth/2,
9494
height: 0,
9595
top: document.body.offsetHeight/2,
96-
width: 0} as OpenCloseRect
96+
width: 0} as IOpenCloseRect
9797
});
9898
pDialog.subscribe( (dialogReference) => console.log('dialog visible', dialogReference) );
9999
}

src/lib/components/dialog/mdl-dialog-configuration.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export interface IMdlDialogAction {
3535
/**
3636
* rect from where the dialog should be opened or closed to.
3737
*/
38-
export interface OpenCloseRect {
38+
export interface IOpenCloseRect {
3939
height: number;
4040
left: number;
4141
top: number;
@@ -76,12 +76,12 @@ export interface IMdlDialogConfiguration {
7676
/**
7777
* MdlButtonComponent or mouse event the dialog open animation should start from.
7878
*/
79-
openFrom?: MdlButtonComponent | MouseEvent | OpenCloseRect;
79+
openFrom?: MdlButtonComponent | MouseEvent | IOpenCloseRect;
8080

8181
/**
8282
* MdlButtonComponent or mouse event the dialog close animation shoul end.
8383
*/
84-
closeTo?: MdlButtonComponent | MouseEvent | OpenCloseRect;
84+
closeTo?: MdlButtonComponent | MouseEvent | IOpenCloseRect;
8585

8686
}
8787

src/lib/components/dialog/mdl-dialog-host.component.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
MIN_DIALOG_Z_INDEX,
1717
MDL_CONFIGUARTION
1818
} from './mdl-dialog.service';
19-
import { IMdlDialogConfiguration, OpenCloseRect } from './mdl-dialog-configuration';
19+
import { IMdlDialogConfiguration, IOpenCloseRect } from './mdl-dialog-configuration';
2020
import { MdlButtonComponent } from '../button/mdl-button.component';
2121
import { InternalMdlDialogReference } from './internal-dialog-reference';
2222

@@ -242,7 +242,7 @@ export class MdlDialogHostComponent implements OnInit {
242242
return this.config.animate;
243243
}
244244

245-
private getClientRect(input: MdlButtonComponent | MouseEvent | OpenCloseRect): OpenCloseRect {
245+
private getClientRect(input: MdlButtonComponent | MouseEvent | IOpenCloseRect): IOpenCloseRect {
246246

247247
if(input instanceof MdlButtonComponent){
248248

@@ -260,10 +260,10 @@ export class MdlDialogHostComponent implements OnInit {
260260
return this.createOpenCloseRect(rect);
261261

262262
}
263-
return input as OpenCloseRect;
263+
return input as IOpenCloseRect;
264264
}
265265

266-
private createOpenCloseRect(rect: ClientRect) : OpenCloseRect {
266+
private createOpenCloseRect(rect: ClientRect) : IOpenCloseRect {
267267
return {
268268
height: rect.top - rect.bottom,
269269
left: rect.left,
@@ -272,7 +272,7 @@ export class MdlDialogHostComponent implements OnInit {
272272
}
273273
}
274274

275-
private getCenterInScreen(rect: OpenCloseRect) {
275+
private getCenterInScreen(rect: IOpenCloseRect) {
276276
return {
277277
cx: Math.round(rect.left + (rect.width / 2)),
278278
cy: Math.round(rect.top + (rect.height / 2))

src/lib/components/dialog/mdl-dialog.service.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
} from './mdl-dialog.service';
1313
import { MdlDialogHostComponent } from './mdl-dialog-host.component';
1414
import { MdlSimpleDialogComponent } from './mdl-simple-dialog.component';
15-
import { IMdlDialogAction, OpenCloseRect } from './mdl-dialog-configuration';
15+
import { IMdlDialogAction, IOpenCloseRect } from './mdl-dialog-configuration';
1616
import { MdlDialogOutletModule } from '../dialog-outlet/index';
1717
import { MdlBackdropOverlayComponent } from '../dialog-outlet/mdl-backdrop-overlay.component';
1818
import { MdlDialogOutletService } from '../dialog-outlet/mdl-dialog-outlet.service';
@@ -380,7 +380,7 @@ describe('Service: MdlDialog', () => {
380380
component: TestCustomDialog,
381381
styles: {'width':'350px'},
382382
classes: 'a b',
383-
openFrom: ({ height: 10, left: 0, top: 0, width: 0} as OpenCloseRect)
383+
openFrom: ({ height: 10, left: 0, top: 0, width: 0} as IOpenCloseRect)
384384
});
385385

386386
p.subscribe( ( dialogRef ) => {

yarn.lock

Lines changed: 81 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@ ansi-align@^1.1.0:
163163
dependencies:
164164
string-width "^1.0.1"
165165

166+
ansi-escapes@^1.0.0:
167+
version "1.4.0"
168+
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e"
169+
166170
ansi-regex@^2.0.0:
167171
version "2.0.0"
168172
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.0.0.tgz#c5061b6e0ef8a81775e50f5d66151bf6bf371107"
@@ -723,6 +727,19 @@ cli-boxes@^1.0.0:
723727
version "1.0.0"
724728
resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-1.0.0.tgz#4fa917c3e59c94a004cd61f8ee509da651687143"
725729

730+
cli-cursor@^1.0.2:
731+
version "1.0.2"
732+
resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987"
733+
dependencies:
734+
restore-cursor "^1.0.1"
735+
736+
cli-truncate@^0.2.1:
737+
version "0.2.1"
738+
resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-0.2.1.tgz#9f15cfbb0705005369216c626ac7d05ab90dd574"
739+
dependencies:
740+
slice-ansi "0.0.4"
741+
string-width "^1.0.1"
742+
726743
cliui@^2.1.0:
727744
version "2.1.0"
728745
resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1"
@@ -1369,6 +1386,10 @@ ee-first@1.1.1:
13691386
version "1.1.1"
13701387
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
13711388

1389+
elegant-spinner@^1.0.1:
1390+
version "1.0.1"
1391+
resolved "https://registry.yarnpkg.com/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e"
1392+
13721393
elliptic@^6.0.0:
13731394
version "6.3.2"
13741395
resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.3.2.tgz#e4c81e0829cf0a65ab70e998b8232723b5c1bc48"
@@ -1547,6 +1568,10 @@ execSync@1.0.2:
15471568
dependencies:
15481569
temp "~0.5.1"
15491570

1571+
exit-hook@^1.0.0:
1572+
version "1.1.1"
1573+
resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8"
1574+
15501575
exit@^0.1.2:
15511576
version "0.1.2"
15521577
resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c"
@@ -3028,6 +3053,13 @@ log-driver@1.2.5:
30283053
version "1.2.5"
30293054
resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.5.tgz#7ae4ec257302fd790d557cb10c97100d857b0056"
30303055

3056+
log-update@^1.0.2:
3057+
version "1.0.2"
3058+
resolved "https://registry.yarnpkg.com/log-update/-/log-update-1.0.2.tgz#19929f64c4093d2d2e7075a1dad8af59c296b8d1"
3059+
dependencies:
3060+
ansi-escapes "^1.0.0"
3061+
cli-cursor "^1.0.2"
3062+
30313063
log4js@^0.6.31:
30323064
version "0.6.38"
30333065
resolved "https://registry.yarnpkg.com/log4js/-/log4js-0.6.38.tgz#2c494116695d6fb25480943d3fc872e662a522fd"
@@ -3481,6 +3513,10 @@ once@~1.3.3:
34813513
dependencies:
34823514
wrappy "1"
34833515

3516+
onetime@^1.0.0:
3517+
version "1.1.0"
3518+
resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789"
3519+
34843520
opn@4.0.2:
34853521
version "4.0.2"
34863522
resolved "https://registry.yarnpkg.com/opn/-/opn-4.0.2.tgz#7abc22e644dff63b0a96d5ab7f2790c0f01abc95"
@@ -3777,14 +3813,14 @@ postcss-filter-plugins@^2.0.0:
37773813
postcss "^5.0.4"
37783814
uniqid "^4.0.0"
37793815

3780-
postcss-load-config@^1.0.0-rc:
3781-
version "1.0.0-rc"
3782-
resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-1.0.0-rc.tgz#8aed0d0fb94afe2c1ab0ba2ca69da3af5079e2cc"
3816+
postcss-load-config@^1.0.0:
3817+
version "1.0.0"
3818+
resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-1.0.0.tgz#1399f60dcd6bd9c3124b2eb22960f77f9dc08b3d"
37833819
dependencies:
37843820
cosmiconfig "^2.1.0"
37853821
object-assign "^4.1.0"
37863822
postcss-load-options "^1.0.2"
3787-
postcss-load-plugins "^2.0.0-rc"
3823+
postcss-load-plugins "^2.0.0"
37883824

37893825
postcss-load-options@^1.0.2:
37903826
version "1.0.2"
@@ -3793,21 +3829,21 @@ postcss-load-options@^1.0.2:
37933829
cosmiconfig "^2.1.0"
37943830
object-assign "^4.1.0"
37953831

3796-
postcss-load-plugins@^2.0.0-rc:
3797-
version "2.0.0-rc"
3798-
resolved "https://registry.yarnpkg.com/postcss-load-plugins/-/postcss-load-plugins-2.0.0-rc.tgz#21242fb78de4d3d8eac9d1fef3863b8b794aa522"
3832+
postcss-load-plugins@^2.0.0:
3833+
version "2.0.0"
3834+
resolved "https://registry.yarnpkg.com/postcss-load-plugins/-/postcss-load-plugins-2.0.0.tgz#2840d8df1d1c57ebcb1d41b5f60d45796504b43f"
37993835
dependencies:
38003836
cosmiconfig "^2.1.0"
38013837
object-assign "^4.1.0"
38023838

3803-
postcss-loader@1.0.0:
3804-
version "1.0.0"
3805-
resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-1.0.0.tgz#e3b65d0c8596c1658f79d7db2d291310748d5d2a"
3839+
postcss-loader@1.1.0:
3840+
version "1.1.0"
3841+
resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-1.1.0.tgz#4eb0bcbfc710b8b11406f3ea6650aaaa6e51b84f"
38063842
dependencies:
38073843
loader-utils "^0.2.16"
38083844
object-assign "^4.1.0"
3809-
postcss "^5.2.4"
3810-
postcss-load-config "^1.0.0-rc"
3845+
postcss "^5.2.5"
3846+
postcss-load-config "^1.0.0"
38113847

38123848
postcss-merge-idents@^2.1.5:
38133849
version "2.1.7"
@@ -3980,6 +4016,15 @@ postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0
39804016
source-map "^0.5.6"
39814017
supports-color "^3.1.2"
39824018

4019+
postcss@^5.2.5:
4020+
version "5.2.5"
4021+
resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.5.tgz#ec428c27dffc7fac65961340a9b022fa4af5f056"
4022+
dependencies:
4023+
chalk "^1.1.3"
4024+
js-base64 "^2.1.9"
4025+
source-map "^0.5.6"
4026+
supports-color "^3.1.2"
4027+
39834028
prelude-ls@~1.1.2:
39844029
version "1.1.2"
39854030
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
@@ -4011,7 +4056,7 @@ process@~0.11.0:
40114056
version "0.11.9"
40124057
resolved "https://registry.yarnpkg.com/process/-/process-0.11.9.tgz#7bd5ad21aa6253e7da8682264f1e11d11c0318c1"
40134058

4014-
promise-finally@^2.0.1:
4059+
promise-finally@^2.0.1, promise-finally@^2.2.1:
40154060
version "2.2.1"
40164061
resolved "https://registry.yarnpkg.com/promise-finally/-/promise-finally-2.2.1.tgz#22616c4ba902916e988bd46c54d7caa08910cd77"
40174062
dependencies:
@@ -4406,6 +4451,13 @@ resolve@^1.1.7, resolve@1.1.x:
44064451
version "1.1.7"
44074452
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b"
44084453

4454+
restore-cursor@^1.0.1:
4455+
version "1.0.1"
4456+
resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541"
4457+
dependencies:
4458+
exit-hook "^1.0.0"
4459+
onetime "^1.0.0"
4460+
44094461
right-align@^0.1.1:
44104462
version "0.1.3"
44114463
resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef"
@@ -4560,6 +4612,10 @@ signal-exit@^3.0.0:
45604612
version "3.0.1"
45614613
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.1.tgz#5a4c884992b63a7acd9badb7894c3ee9cfccad81"
45624614

4615+
slice-ansi@0.0.4:
4616+
version "0.0.4"
4617+
resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35"
4618+
45634619
slide@^1.1.5:
45644620
version "1.1.6"
45654621
resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707"
@@ -5057,9 +5113,9 @@ typescript@2.0.6:
50575113
version "2.0.6"
50585114
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.0.6.tgz#5385499ac9811508c2c43e0ea07a1ddca435e111"
50595115

5060-
typings-core@^1.5.0:
5061-
version "1.6.0"
5062-
resolved "https://registry.yarnpkg.com/typings-core/-/typings-core-1.6.0.tgz#0784a214b9d0960366e12bb0c6bae72818b3de27"
5116+
typings-core@^1.6.1:
5117+
version "1.6.1"
5118+
resolved "https://registry.yarnpkg.com/typings-core/-/typings-core-1.6.1.tgz#ce4b2931ea2f19bb8f3dacbec69983ac4e964a37"
50635119
dependencies:
50645120
any-promise "^1.3.0"
50655121
array-uniq "^1.0.2"
@@ -5094,19 +5150,23 @@ typings-core@^1.5.0:
50945150
xtend "^4.0.0"
50955151
zip-object "^0.1.0"
50965152

5097-
typings@1.4.0:
5098-
version "1.4.0"
5099-
resolved "https://registry.yarnpkg.com/typings/-/typings-1.4.0.tgz#f699ae68e0ca62b66eb1bd8f4e145809be3c6b8f"
5153+
typings@1.5.0:
5154+
version "1.5.0"
5155+
resolved "https://registry.yarnpkg.com/typings/-/typings-1.5.0.tgz#b9d236cf1d37460854f8c671ea495d9405b8103f"
51005156
dependencies:
5101-
any-promise "^1.0.0"
5157+
any-promise "^1.3.0"
51025158
archy "^1.0.0"
51035159
bluebird "^3.1.1"
51045160
chalk "^1.0.0"
5161+
cli-truncate "^0.2.1"
51055162
columnify "^1.5.2"
5163+
elegant-spinner "^1.0.1"
51065164
has-unicode "^2.0.1"
51075165
listify "^1.0.0"
5166+
log-update "^1.0.2"
51085167
minimist "^1.2.0"
5109-
typings-core "^1.5.0"
5168+
promise-finally "^2.2.1"
5169+
typings-core "^1.6.1"
51105170
update-notifier "^1.0.0"
51115171
wordwrap "^1.0.0"
51125172
xtend "^4.0.1"

0 commit comments

Comments
 (0)