From 871c0838bde9b4d2dde0520d33fe9b11040f2dd8 Mon Sep 17 00:00:00 2001 From: Matheus Cruz Rocha Date: Tue, 2 Feb 2016 16:00:50 -0300 Subject: [PATCH 001/117] Dark colors toolbar --- ionic/themes/dark.scss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ionic/themes/dark.scss b/ionic/themes/dark.scss index 303631251c..e918fc35d5 100644 --- a/ionic/themes/dark.scss +++ b/ionic/themes/dark.scss @@ -18,14 +18,14 @@ $colors: ( $text-color: #fff !default; $paragraph-color: $text-color !default; $link-color: map-get($colors, primary) !default; -$background-color: #000 !default; +$background-color: #1e1e1e !default; $subdued-text-color: #666 !default; $font-family-base: -apple-system, "Helvetica Neue", "Roboto", sans-serif !default; $font-size-base: 1.4rem !default; // 1.4rem == 14px -$toolbar-background: #000 !default; -$toolbar-border-color: #b2b2b2 !default; +$toolbar-background: #151515 !default; +$toolbar-border-color: map-get($colors, dark) !default; $toolbar-text-color: $text-color !default; $toolbar-active-color: $link-color !default; $toolbar-inactive-color: #8c8c8c !default; From b54fe34468512ba5338672d44e5e02a39013febd Mon Sep 17 00:00:00 2001 From: Matheus Cruz Rocha Date: Tue, 2 Feb 2016 16:05:13 -0300 Subject: [PATCH 002/117] New colors --- ionic/themes/dark.scss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ionic/themes/dark.scss b/ionic/themes/dark.scss index e918fc35d5..51d384e18a 100644 --- a/ionic/themes/dark.scss +++ b/ionic/themes/dark.scss @@ -6,9 +6,9 @@ $colors: ( - primary: #327eff, - secondary: #32db64, - danger: #f53d3d, + primary: #3498DB, + secondary: #00B16A, + danger: #D91E18, light: #f4f4f4, dark: #222, From 21bf106ea0ed2c7e11185a531000d70ed191faa4 Mon Sep 17 00:00:00 2001 From: Matheus Cruz Rocha Date: Tue, 2 Feb 2016 18:55:01 -0300 Subject: [PATCH 003/117] Dark theme list --- ionic/themes/dark.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ionic/themes/dark.scss b/ionic/themes/dark.scss index 51d384e18a..4009431a1c 100644 --- a/ionic/themes/dark.scss +++ b/ionic/themes/dark.scss @@ -31,5 +31,5 @@ $toolbar-active-color: $link-color !default; $toolbar-inactive-color: #8c8c8c !default; $list-text-color: $text-color !default; -$list-background-color: $background-color !default; -$list-border-color: #c8c7cc !default; +$list-background-color: #242424 !default; +$list-border-color: #000 !default; From af8ced290a81b3e2126eeb976f7fd02e6d044485 Mon Sep 17 00:00:00 2001 From: Matheus Cruz Rocha Date: Tue, 2 Feb 2016 19:18:40 -0300 Subject: [PATCH 004/117] Dark theme ios list header --- ionic/themes/dark.ios.scss | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ionic/themes/dark.ios.scss b/ionic/themes/dark.ios.scss index 2ab19c6645..a7e3bdf837 100644 --- a/ionic/themes/dark.ios.scss +++ b/ionic/themes/dark.ios.scss @@ -33,6 +33,12 @@ $list-ios-border-color: $list-border-color !default; $list-ios-background-color: $list-background-color !default; $list-ios-activated-background-color: #d9d9d9 !default; +// iOS List header +// -------------------------------------------------- +$list-ios-header-color: $text-color !default; +ion-list-header { + background-color: $background-ios-color; +} // iOS Item // -------------------------------------------------- From 0d4c9beaf523d145b6ee3bbfa36cf78cd2db9bed Mon Sep 17 00:00:00 2001 From: Matheus Cruz Rocha Date: Wed, 3 Feb 2016 09:12:44 -0300 Subject: [PATCH 005/117] Changing list-headers and sticky headers colors For iOS --- ionic/themes/dark.ios.scss | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ionic/themes/dark.ios.scss b/ionic/themes/dark.ios.scss index a7e3bdf837..77881c80be 100644 --- a/ionic/themes/dark.ios.scss +++ b/ionic/themes/dark.ios.scss @@ -36,8 +36,11 @@ $list-ios-activated-background-color: #d9d9d9 !default; // iOS List header // -------------------------------------------------- $list-ios-header-color: $text-color !default; +$item-ios-divider-bg: #151515 !default; +$item-ios-divider-color: $text-color !default; + ion-list-header { - background-color: $background-ios-color; + background-color: #151515; } // iOS Item From a955482e7032449f59ebc48b8dec31de9830ab1c Mon Sep 17 00:00:00 2001 From: Matheus Cruz Rocha Date: Wed, 3 Feb 2016 09:26:53 -0300 Subject: [PATCH 006/117] Toggle iOS colors --- ionic/themes/dark.ios.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ionic/themes/dark.ios.scss b/ionic/themes/dark.ios.scss index 77881c80be..4ab6a04ac4 100644 --- a/ionic/themes/dark.ios.scss +++ b/ionic/themes/dark.ios.scss @@ -55,6 +55,10 @@ $item-ios-padding-media-bottom: 10px !default; $item-ios-padding-icon-top: 10px !default; $item-ios-padding-icon-bottom: 9px !default; +// iOS Toggle +// -------------------------------------------------- + +$toggle-ios-handle-background-color: map-get($colors-ios, light) !default; // iOS Icon // -------------------------------------------------- From 10d95f237f9151f6e0ebbd60c526b684b67fe38b Mon Sep 17 00:00:00 2001 From: Matheus Cruz Rocha Date: Thu, 4 Feb 2016 10:08:54 -0300 Subject: [PATCH 007/117] Change color iOS outer-content background --- ionic/themes/dark.ios.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ionic/themes/dark.ios.scss b/ionic/themes/dark.ios.scss index 4ab6a04ac4..08b51d82f9 100644 --- a/ionic/themes/dark.ios.scss +++ b/ionic/themes/dark.ios.scss @@ -14,6 +14,10 @@ $subdued-text-ios-color: $subdued-text-color !default; $font-family-ios-base: $font-family-base !default; $font-size-ios-base: $font-size-base !default; +// iOS Outer content +// -------------------------------------------------- +$outer-content-ios-background-color: $background-color !default; + // iOS Toolbar // -------------------------------------------------- From d833bec04fdb2b1dd11991f255c1d4ee89a1d93d Mon Sep 17 00:00:00 2001 From: Matheus Cruz Rocha Date: Thu, 4 Feb 2016 10:22:16 -0300 Subject: [PATCH 008/117] Dark theme ion-note --- ionic/themes/dark.ios.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ionic/themes/dark.ios.scss b/ionic/themes/dark.ios.scss index 08b51d82f9..c6764dadc7 100644 --- a/ionic/themes/dark.ios.scss +++ b/ionic/themes/dark.ios.scss @@ -18,6 +18,10 @@ $font-size-ios-base: $font-size-base !default; // -------------------------------------------------- $outer-content-ios-background-color: $background-color !default; +// iOS Note +// -------------------------------------------------- + +$item-ios-note-color: map-get($colors-ios, light) !default; // iOS Toolbar // -------------------------------------------------- From 572f7cc1772856deadc427d780d011e93395a810 Mon Sep 17 00:00:00 2001 From: Matheus Cruz Rocha Date: Thu, 4 Feb 2016 10:22:50 -0300 Subject: [PATCH 009/117] Dark theme card header color Also fixing code alignment --- ionic/themes/dark.ios.scss | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ionic/themes/dark.ios.scss b/ionic/themes/dark.ios.scss index c6764dadc7..a260e3f7d5 100644 --- a/ionic/themes/dark.ios.scss +++ b/ionic/themes/dark.ios.scss @@ -16,7 +16,12 @@ $font-size-ios-base: $font-size-base !default; // iOS Outer content // -------------------------------------------------- -$outer-content-ios-background-color: $background-color !default; +$outer-content-ios-background-color: $background-color !default; + +// iOS Card +// -------------------------------------------------- + +$card-ios-header-color: #ddd !default; // iOS Note // -------------------------------------------------- @@ -43,9 +48,9 @@ $list-ios-activated-background-color: #d9d9d9 !default; // iOS List header // -------------------------------------------------- -$list-ios-header-color: $text-color !default; -$item-ios-divider-bg: #151515 !default; -$item-ios-divider-color: $text-color !default; +$list-ios-header-color: $text-color !default; +$item-ios-divider-bg: #151515 !default; +$item-ios-divider-color: $text-color !default; ion-list-header { background-color: #151515; From 70bee0fcc6f4f2f44d11381956e56f1ff1765192 Mon Sep 17 00:00:00 2001 From: Matheus Cruz Rocha Date: Thu, 4 Feb 2016 10:28:01 -0300 Subject: [PATCH 010/117] Changing background color Darken background color to give more relevance to itens with dark color --- ionic/themes/dark.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ionic/themes/dark.scss b/ionic/themes/dark.scss index 4009431a1c..9883e6f02e 100644 --- a/ionic/themes/dark.scss +++ b/ionic/themes/dark.scss @@ -18,7 +18,7 @@ $colors: ( $text-color: #fff !default; $paragraph-color: $text-color !default; $link-color: map-get($colors, primary) !default; -$background-color: #1e1e1e !default; +$background-color: #191919 !default; $subdued-text-color: #666 !default; $font-family-base: -apple-system, "Helvetica Neue", "Roboto", sans-serif !default; From 4e57fcf98a65e83a36d08cdc9478a7bfd7074b6d Mon Sep 17 00:00:00 2001 From: "Manu Mtz.-Almeida" Date: Mon, 8 Feb 2016 00:41:19 +0100 Subject: [PATCH 011/117] feat(ion-item-sliding): style icons on top of text in an option button closes #5352 --- ionic/components/button/button.scss | 2 +- ionic/components/item/item-sliding.scss | 16 +++++++++++++- ionic/components/item/test/sliding/main.html | 23 +++++++++++++++----- 3 files changed, 34 insertions(+), 7 deletions(-) diff --git a/ionic/components/button/button.scss b/ionic/components/button/button.scss index 3b26fc0234..8184beac68 100644 --- a/ionic/components/button/button.scss +++ b/ionic/components/button/button.scss @@ -29,7 +29,7 @@ $button-round-border-radius: 64px !default; @include appearance(none); } -span.button-inner { +.button-inner { width: 100%; height: 100%; display: flex; diff --git a/ionic/components/item/item-sliding.scss b/ionic/components/item/item-sliding.scss index 11a56bf6a9..0787b8336f 100644 --- a/ionic/components/item/item-sliding.scss +++ b/ionic/components/item/item-sliding.scss @@ -32,8 +32,22 @@ ion-item-options .button { height: 100%; } -ion-item-sliding.active-slide { +ion-item-sliding:not([horizontal]) { + .button.button-icon-left { + font-size: 14px; + .button-inner { + flex-direction: column; + } + ion-icon { + padding-left: 0 !important; + padding-right: 0 !important; + padding-bottom: 0.3em; + } + } +} + +ion-item-sliding.active-slide { .item, .item.activated { diff --git a/ionic/components/item/test/sliding/main.html b/ionic/components/item/test/sliding/main.html index 9240f6b270..bfa79cc813 100644 --- a/ionic/components/item/test/sliding/main.html +++ b/ionic/components/item/test/sliding/main.html @@ -31,7 +31,9 @@ - + @@ -48,13 +50,15 @@ - + One Line w/ Icon, div only text - + @@ -66,7 +70,16 @@ One Line w/ Avatar, div only text - + + + + @@ -104,4 +117,4 @@ img { height: 100px; } - + \ No newline at end of file From 14abe9eb41fe48dc9ad7fd6ae81de574ee36fe71 Mon Sep 17 00:00:00 2001 From: "Manu Mtz.-Almeida" Date: Mon, 8 Feb 2016 04:16:15 +0100 Subject: [PATCH 012/117] icon-left attribute belongs to ion-item-options --- ionic/components/item/item-sliding.scss | 20 +++++++++----------- ionic/components/item/test/sliding/main.html | 4 ++-- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/ionic/components/item/item-sliding.scss b/ionic/components/item/item-sliding.scss index 0787b8336f..251bcf0e49 100644 --- a/ionic/components/item/item-sliding.scss +++ b/ionic/components/item/item-sliding.scss @@ -32,18 +32,16 @@ ion-item-options .button { height: 100%; } -ion-item-sliding:not([horizontal]) { - .button.button-icon-left { - font-size: 14px; +ion-item-options:not([icon-left]) > .button-icon-left { + font-size: 14px; - .button-inner { - flex-direction: column; - } - ion-icon { - padding-left: 0 !important; - padding-right: 0 !important; - padding-bottom: 0.3em; - } + .button-inner { + flex-direction: column; + } + ion-icon { + padding-left: 0 !important; + padding-right: 0 !important; + padding-bottom: 0.3em; } } diff --git a/ionic/components/item/test/sliding/main.html b/ionic/components/item/test/sliding/main.html index bfa79cc813..d98eb5b2ad 100644 --- a/ionic/components/item/test/sliding/main.html +++ b/ionic/components/item/test/sliding/main.html @@ -50,12 +50,12 @@ - + One Line w/ Icon, div only text - + From c8bb18f3e9b3c4e571aecc8c483d84ca94cc34b6 Mon Sep 17 00:00:00 2001 From: "Manu Mtz.-Almeida" Date: Mon, 8 Feb 2016 04:20:18 +0100 Subject: [PATCH 013/117] drops > selector --- ionic/components/item/item-sliding.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ionic/components/item/item-sliding.scss b/ionic/components/item/item-sliding.scss index 251bcf0e49..db8698663b 100644 --- a/ionic/components/item/item-sliding.scss +++ b/ionic/components/item/item-sliding.scss @@ -32,7 +32,7 @@ ion-item-options .button { height: 100%; } -ion-item-options:not([icon-left]) > .button-icon-left { +ion-item-options:not([icon-left]) .button-icon-left { font-size: 14px; .button-inner { From 9e34235abbb030c3c4a7a0cf25c8e0e3e7bdef08 Mon Sep 17 00:00:00 2001 From: Klaus Karkia Date: Tue, 9 Feb 2016 15:53:07 +0200 Subject: [PATCH 014/117] Corrected documented signature for remove() method Documentation claimed the remove() method took two parameters: key and value, whereas in reality it only takes one: the key to be removed, as one would expect. --- ionic/platform/storage/sql.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/ionic/platform/storage/sql.ts b/ionic/platform/storage/sql.ts index 69b58a9027..c01bda6706 100644 --- a/ionic/platform/storage/sql.ts +++ b/ionic/platform/storage/sql.ts @@ -186,7 +186,6 @@ export class SqlStorage extends StorageEngine { /** * Remove the value in the database for the given key. * @param {string} key the key - * @param {string} value The value (as a string) * @return {Promise} that resolves or rejects with an object of the form { tx: Transaction, res: Result (or err)} */ remove(key: string): Promise { From 7d8e567c652658971c7026ee099c066b1a1ea191 Mon Sep 17 00:00:00 2001 From: Drew Rygh Date: Tue, 9 Feb 2016 18:37:01 -0600 Subject: [PATCH 015/117] docs(id): fix broken link --- ionic/components/app/id.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ionic/components/app/id.ts b/ionic/components/app/id.ts index cca91f0c97..800895c127 100644 --- a/ionic/components/app/id.ts +++ b/ionic/components/app/id.ts @@ -18,7 +18,7 @@ import {IonicApp} from './app'; * * ``` * - * To get a reference to the registered component, inject the [IonicApp](../app/IonicApp/) + * To get a reference to the registered component, inject the [IonicApp](../IonicApp/) * service: * ```ts * constructor(app: IonicApp) { From d1b92e6335c98268094ffefdffbf7dece723ca39 Mon Sep 17 00:00:00 2001 From: Drew Rygh Date: Tue, 9 Feb 2016 18:59:20 -0600 Subject: [PATCH 016/117] docs(demos): update item-sliding demo styling --- demos/item-sliding/main.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demos/item-sliding/main.html b/demos/item-sliding/main.html index 6b24c9f3bb..75912f3bf6 100644 --- a/demos/item-sliding/main.html +++ b/demos/item-sliding/main.html @@ -169,7 +169,7 @@ margin-top: -8px; } - .chat-sliding-demo ion-item-options button { + .chat-sliding-demo ion-item-options .button-inner { font-size: 14px; flex-direction: column; } From ab61c0b9d1460716bc8dbc30ede1ce6b10aafcd7 Mon Sep 17 00:00:00 2001 From: perry Date: Tue, 9 Feb 2016 19:02:11 -0600 Subject: [PATCH 017/117] chore(dgeni): setting inputs and outputs detection in dgeni --- ionic/components/searchbar/searchbar.ts | 38 +++++------- scripts/docs/dgeni-config.js | 5 +- .../docs/processors/collect-inputs-outputs.js | 62 +++++++++++++++++++ scripts/docs/templates/common.template.html | 34 ++++++++++ 4 files changed, 115 insertions(+), 24 deletions(-) create mode 100644 scripts/docs/processors/collect-inputs-outputs.js diff --git a/ionic/components/searchbar/searchbar.ts b/ionic/components/searchbar/searchbar.ts index 7a218addd3..5904229b48 100644 --- a/ionic/components/searchbar/searchbar.ts +++ b/ionic/components/searchbar/searchbar.ts @@ -42,19 +42,6 @@ export class SearchbarInput { * * ``` * - * @property {string} [cancelButtonText=Cancel] - Sets the cancel button text to the value passed in - * @property {boolean} [hideCancelButton=false] - Hides the cancel button - * @property {string} [placeholder=Search] - Sets input placeholder to the value passed in - * - * @property {Any} [input] - Expression to evaluate when the Searchbar input has changed including cleared - * @property {Any} [keydown] - Expression to evaluate when a key is pushed down in the Searchbar input - * @property {Any} [keypress] - Expression to evaluate when a character is inserted in the Searchbar input - * @property {Any} [keyup] - Expression to evaluate when a key is released in the Searchbar input - * @property {Any} [blur] - Expression to evaluate when the Searchbar input has blurred - * @property {Any} [focus] - Expression to evaluate when the Searchbar input has focused - * @property {Any} [cancel] - Expression to evaluate when the cancel button is clicked - * @property {Any} [clear] - Expression to evaluate when the clear input button is clicked - * * @demo /docs/v2/demos/searchbar/ * @see {@link /docs/v2/components#searchbar Searchbar Component Docs} */ @@ -79,40 +66,47 @@ export class Searchbar extends Ion { @ViewChild(SearchbarInput) searchbarInput; /** - * @private + * @input {string} Sets the cancel button text to the value passed in */ @Input() cancelButtonText: string; + /** - * @private + * @input {boolean} Hides the cancel button */ @Input() hideCancelButton: any; + /** - * @private + * @input {string} Sets input placeholder to the value passed in */ @Input() placeholder: string; + /** - * @private + * @input {Any} Expression to evaluate when the Searchbar input has changed including cleared */ @Input() ngModel: any; /** - * @private + * @output {event} When the Searchbar input has changed including cleared */ @Output() input: EventEmitter = new EventEmitter(); + /** - * @private + * @output {event} When the Searchbar input has blurred */ @Output() blur: EventEmitter = new EventEmitter(); + /** - * @private + * @output {event} When the Searchbar input has focused */ @Output() focus: EventEmitter = new EventEmitter(); + /** - * @private + * @output {event} When the cancel button is clicked */ @Output() cancel: EventEmitter = new EventEmitter(); + /** - * @private + * @output {event} When the clear input button is clicked */ @Output() clear: EventEmitter = new EventEmitter(); diff --git a/scripts/docs/dgeni-config.js b/scripts/docs/dgeni-config.js index 59519b99dc..dab42849e4 100644 --- a/scripts/docs/dgeni-config.js +++ b/scripts/docs/dgeni-config.js @@ -20,6 +20,7 @@ module.exports = function(currentVersion){ .processor(require('./processors/jekyll')) .processor(require('./processors/remove-private-members')) .processor(require('./processors/hide-private-api')) +.processor(require('./processors/collect-inputs-outputs')) // for debugging docs @@ -29,7 +30,8 @@ module.exports = function(currentVersion){ // $runBefore: ['rendering-docs'], // $process: function(docs){ // docs.forEach(function(doc){ -// if (doc.members && doc.name == "IonicApp"){ +// if (doc.name == "Searchbar"){ +// console.log(doc.input); // doc.members.forEach(function(method){ // if (method.name === "load") { // console.log(method); @@ -173,4 +175,3 @@ module.exports = function(currentVersion){ }) } - diff --git a/scripts/docs/processors/collect-inputs-outputs.js b/scripts/docs/processors/collect-inputs-outputs.js new file mode 100644 index 0000000000..b8b2af97ac --- /dev/null +++ b/scripts/docs/processors/collect-inputs-outputs.js @@ -0,0 +1,62 @@ +module.exports = function collectInputsOutputs() { + return { + + $runBefore: ['rendering-docs'], + $process: function(docs) { + docs.forEach(function(doc) { + // if (doc.members && doc.name == "Searchbar"){ + // console.log(doc.exportSymbol.members.hideCancelButton.valueDeclaration.decorators[0].expression.expression); + // doc.members.forEach(function(method){ + // if (method.name === "load") { + // console.log(method); + // } + // }) + // } + + if (doc.members && doc.members.length) { + var members = []; + var inputs = []; + var outputs = []; + + memberLoop: + for (var i in doc.members) { + if (doc.members[i].decorators && doc.members[i].decorators.length) { + + decoratorLoop: + for (var ii in doc.members[i].decorators) { + + if (doc.members[i].decorators[ii].name == 'Input') { + inputs.push(parseMember(doc.members[i])); + continue memberLoop; + } + if (doc.members[i].decorators[ii].name == 'Output') { + outputs.push(parseMember(doc.members[i])); + continue memberLoop; + } + } + // not an input or output, must be a plain member + members.push(doc.members[i]); + }; + } + + // update doc with pruned members list and add inputs and outputs + doc.members = members; + doc.inputs = inputs; + doc.outputs = outputs; + } + + function parseMember(member) { + member.type = member.content.substring( + member.content.indexOf('{') + 1, + member.content.indexOf('}') + ); + member.description = member.content.substring( + member.content.indexOf('}') + 1, + member.content.length + ); + return member; + } + }); + } + }; +}; diff --git a/scripts/docs/templates/common.template.html b/scripts/docs/templates/common.template.html index a0d049f313..dea028ad4c 100644 --- a/scripts/docs/templates/common.template.html +++ b/scripts/docs/templates/common.template.html @@ -57,6 +57,26 @@ angular_controller: APIDemoCtrl <@ endif @> <@- endmacro -@> +<@ macro inputTable(params, isDirective) -@> + + + + + + + + + + <@ for param in params @> + + + + + + <@ endfor @> + +
AttrTypeDetails
<$ param.name $><$ param.type $><$ param.description | marked $>
+<@- endmacro -@> <@- macro functionSyntax(fn) @> <@- set sep = joiner(', ') -@> @@ -244,6 +264,20 @@ Improve this doc <@- endif -@> + +<@- if doc.inputs and doc.inputs.length @> + +

Element Input Attributes

+<$ inputTable(doc.inputs) $> +<@- endif -@> + +<@- if doc.inputs and doc.inputs.length @> + +

Element Output Attributes

+<$ inputTable(doc.outputs) $> +<@- endif -@> + + <@- if doc.see @> From cb14eb441c1a85fcda79e1f20372d9265f831dcd Mon Sep 17 00:00:00 2001 From: perry Date: Tue, 9 Feb 2016 19:04:47 -0600 Subject: [PATCH 018/117] chore(CI): ignore WIP branch --- circle.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/circle.yml b/circle.yml index f10432f336..60d75cf33d 100644 --- a/circle.yml +++ b/circle.yml @@ -1,3 +1,7 @@ +general: + branches: + ignore: + - ins_n_outs machine: node: version: 4.1.0 From c46d25baedec66c797cdcb8652e2058b77335bc7 Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Wed, 10 Feb 2016 01:49:43 -0600 Subject: [PATCH 019/117] chore(snapshot): do not exit on error --- scripts/snapshot/ionic.snapshot.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/snapshot/ionic.snapshot.js b/scripts/snapshot/ionic.snapshot.js index 68142fe019..35d9800fe8 100644 --- a/scripts/snapshot/ionic.snapshot.js +++ b/scripts/snapshot/ionic.snapshot.js @@ -130,11 +130,9 @@ var IonicSnapshot = function(options) { try { if (error) { log(specIdString, colors.red('error posting screenshot:'), error); - process.exit(1); } else if (response.statusCode >= 400) { log(specIdString, colors.red('error posting screenshot:'), response.statusCode, body); - process.exit(1); } else { var rspData = JSON.parse(body); From 7c10c4dd4255b109e2b1b04e7e6bf7c9ed945e95 Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Wed, 10 Feb 2016 01:56:51 -0600 Subject: [PATCH 020/117] chore(): update modal tests --- ionic/components/alert/test/basic/index.ts | 2 +- ionic/components/menu/test/basic/e2e.ts | 2 +- ionic/components/menu/test/basic/main.html | 2 +- ionic/components/slides/slides.ts | 3 +-- ionic/util/dom.ts | 6 +++--- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/ionic/components/alert/test/basic/index.ts b/ionic/components/alert/test/basic/index.ts index b3117960e5..cef1da39b3 100644 --- a/ionic/components/alert/test/basic/index.ts +++ b/ionic/components/alert/test/basic/index.ts @@ -234,7 +234,7 @@ class E2EPage { setTimeout(() => { alert.dismiss(); - }, 100); + }, 200); } doDisabledBackdropAlert() { diff --git a/ionic/components/menu/test/basic/e2e.ts b/ionic/components/menu/test/basic/e2e.ts index f9f2e51243..ee5aa0f45e 100644 --- a/ionic/components/menu/test/basic/e2e.ts +++ b/ionic/components/menu/test/basic/e2e.ts @@ -5,5 +5,5 @@ it('should toggle open menu', function() { it('should close menu', function() { - element(by.css('[menuClose=left]')).click(); + element(by.css('.e2eCloseLeftMenu')).click(); }); diff --git a/ionic/components/menu/test/basic/main.html b/ionic/components/menu/test/basic/main.html index 8ca9375f0a..0052e0b3b9 100644 --- a/ionic/components/menu/test/basic/main.html +++ b/ionic/components/menu/test/basic/main.html @@ -12,7 +12,7 @@ {{p.title}} - diff --git a/ionic/components/slides/slides.ts b/ionic/components/slides/slides.ts index 5f155ab6f7..d6bbe87663 100644 --- a/ionic/components/slides/slides.ts +++ b/ionic/components/slides/slides.ts @@ -454,8 +454,7 @@ export class Slides extends Ion { let zi = new Animation(this.touch.target.children[0]) .duration(this.zoomDuration) - .easing('linear') - .fill('none'); + .easing('linear'); let zw = new Animation(this.touch.target.children[0]) .duration(this.zoomDuration) diff --git a/ionic/util/dom.ts b/ionic/util/dom.ts index 4c4fc2e0eb..2730b47b7d 100644 --- a/ionic/util/dom.ts +++ b/ionic/util/dom.ts @@ -91,7 +91,7 @@ export let CSS: { export function transitionEnd(el: HTMLElement, callback: Function) { if (el) { - function deregister() { + function unregister() { CSS.transitionEnd.split(' ').forEach(eventName => { el.removeEventListener(eventName, onEvent); }); @@ -99,7 +99,7 @@ export function transitionEnd(el: HTMLElement, callback: Function) { function onEvent(ev) { if (el === ev.target) { - deregister(); + unregister(); callback(ev); } } @@ -108,7 +108,7 @@ export function transitionEnd(el: HTMLElement, callback: Function) { el.addEventListener(eventName, onEvent); }); - return deregister; + return unregister; } } From e6068785f6371debdeea43d6d7e430491cdcbd20 Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Wed, 10 Feb 2016 01:57:54 -0600 Subject: [PATCH 021/117] refactor(transitions): created Transition class Created interfaces for NavOptions, AnimationOptions and TransitionOptions Created Transition class and move transition ts files to their own folder. --- ionic/animations/animation.ts | 132 ++++++++++------- ionic/components/action-sheet/action-sheet.ts | 33 ++--- ionic/components/alert/alert.ts | 33 ++--- ionic/components/modal/modal.ts | 37 ++--- ionic/components/nav/nav-controller.ts | 136 +++++++++--------- ionic/components/nav/view-controller.ts | 6 +- ionic/ionic.ts | 4 +- .../transition-ios.ts} | 12 +- .../transition-md.ts} | 12 +- ionic/transitions/transition.ts | 41 ++++++ 10 files changed, 267 insertions(+), 179 deletions(-) rename ionic/{animations/ios-transition.ts => transitions/transition-ios.ts} (93%) rename ionic/{animations/md-transition.ts => transitions/transition-md.ts} (81%) create mode 100644 ionic/transitions/transition.ts diff --git a/ionic/animations/animation.ts b/ionic/animations/animation.ts index f09d6df4cb..07c761efd4 100644 --- a/ionic/animations/animation.ts +++ b/ionic/animations/animation.ts @@ -1,6 +1,5 @@ -import {ViewController} from '../components/nav/view-controller'; import {CSS, rafFrames, raf, transitionEnd} from '../util/dom'; -import {assign} from '../util/util'; +import {assign, isDefined} from '../util/util'; /** @@ -25,12 +24,14 @@ export class Animation { private _fOnceFns: Array; private _wChg: boolean = false; private _rv: boolean; + private _unregTrans: Function; + private _tmr; public isPlaying: boolean; public hasTween: boolean; public meta; - constructor(ele?, opts={}) { + constructor(ele?, opts: AnimationOptions = {}) { this._reset(); this.element(ele); @@ -54,6 +55,8 @@ export class Animation { this._fFns = []; this._fOnceFns = []; + this._clearAsync(); + this.isPlaying = this.hasTween = this._rv = false; this._el = this._easing = this._dur = null; } @@ -106,11 +109,11 @@ export class Animation { return this; } - from(prop: string, val: string): Animation { + from(prop: string, val): Animation { return this._addProp('from', prop, val); } - to(prop: string, val: string): Animation { + to(prop: string, val): Animation { return this._addProp('to', prop, val); } @@ -196,12 +199,12 @@ export class Animation { } } - play() { + play(opts: PlayOptions = {}) { var self = this; + var i; + var duration = isDefined(opts.duration) ? opts.duration : self._dur; - var i, fallbackTimerId, deregTransEnd; - - console.debug('Animation, play, duration', self._dur, 'easing', self._easing); + console.debug('Animation, play, duration', duration, 'easing', self._easing); // always default that an animation does not tween // a tween requires that an Animation class has an element @@ -226,7 +229,10 @@ export class Animation { // will recursively stage all child elements self._before(); - if (self._dur > 30) { + // ensure all past transition end events have been cleared + this._clearAsync(); + + if (duration > 30) { // this animation has a duration, so it should animate // place all the elements with their FROM properties @@ -235,9 +241,9 @@ export class Animation { self._willChange(true); - // set the TRANSITION END event + // set the async TRANSITION END event // and run onFinishes when the transition ends - self._asyncEnd(self._dur); + self._asyncEnd(duration); // begin each animation when everything is rendered in their place // and the transition duration/easing is ready to go @@ -245,7 +251,7 @@ export class Animation { // there's been a moment and the elements are in place // now set the TRANSITION duration/easing - self._setTrans(self._dur, false); + self._setTrans(duration, false); // wait a few moments again to wait for the transition // info to take hold in the DOM @@ -264,10 +270,43 @@ export class Animation { // just go straight to the TO properties and call it done self._progress(1); - // so there was no animation, immediately run the after + // since there was no animation, immediately run the after self._after(); - // so there was no animation, it's done + // since there was no animation, it's done + // fire off all the onFinishes + self._onFinish(); + } + } + + stop(opts: PlayOptions = {}) { + var self = this; + var duration = isDefined(opts.duration) ? opts.duration : 0; + var stepValue = isDefined(opts.stepValue) ? opts.stepValue : 1; + + // ensure all past transition end events have been cleared + this._clearAsync(); + + // set the TO properties + self._progress(stepValue); + + if (duration > 30) { + // this animation has a duration, so it should animate + // place all the elements with their TO properties + + // now set the TRANSITION duration + self._setTrans(duration, true); + + // set the async TRANSITION END event + // and run onFinishes when the transition ends + self._asyncEnd(duration); + + } else { + // this animation does not have a duration, so it should not animate + // just go straight to the TO properties and call it done + self._after(); + + // since there was no animation, it's done // fire off all the onFinishes self._onFinish(); } @@ -275,36 +314,29 @@ export class Animation { _asyncEnd(duration: number) { var self = this; - var deregTransEnd, fallbackTimerId; - // set the TRANSITION END event - deregTransEnd = transitionEnd(self._transEl(), function() { - // transition has completed - console.debug('Animation, transition end'); + function onTransitionEnd(ev) { + console.debug('Animation async end,', (ev ? 'transitionEnd event' : 'fallback timeout')); - // cancel the fallback timer so it doesn't fire also - clearTimeout(fallbackTimerId); + // ensure transition end events and timeouts have been cleared + self._clearAsync(); // set the after styles self._after(); self._willChange(false); self._onFinish(); - }); + } + + // set the TRANSITION END event on one of the transition elements + self._unregTrans = transitionEnd(self._transEl(), onTransitionEnd); // set a fallback timeout if the transition end event never fires - fallbackTimerId = setTimeout(function() { - // fallback timeout fired instead of the transition end - console.debug('Animation, fallback end'); + self._tmr = setTimeout(onTransitionEnd, duration + 300); + } - // deregister the transition end event listener - deregTransEnd(); - - // set the after styles - self._after(); - self._willChange(false); - self._onFinish(); - - }, duration + 300); + _clearAsync() { + this._unregTrans && this._unregTrans(); + clearTimeout(this._tmr); } _progress(stepValue: number) { @@ -565,7 +597,11 @@ export class Animation { return this; } - onFinish(callback: Function, onceTimeCallback: boolean = false) { + onFinish(callback: Function, onceTimeCallback: boolean = false, clearOnFinishCallacks: boolean = false) { + if (clearOnFinishCallacks) { + this._fFns = []; + this._fOnceFns = []; + } if (onceTimeCallback) { this._fOnceFns.push(callback); @@ -625,7 +661,7 @@ export class Animation { /* STATIC CLASSES */ - static create(name: string): Animation { + static create(name: string, opts: AnimationOptions = {}): Animation { let AnimationClass = AnimationRegistry[name]; if (!AnimationClass) { @@ -633,17 +669,7 @@ export class Animation { // fallback to just the base Animation class AnimationClass = Animation; } - return new AnimationClass(); - } - - static createTransition(enteringView: ViewController, leavingView: ViewController, opts: any = {}): Animation { - let TransitionClass = AnimationRegistry[opts.animation]; - if (!TransitionClass) { - // didn't find a transition animation, default to ios-transition - TransitionClass = AnimationRegistry['ios-transition']; - } - - return new TransitionClass(enteringView, leavingView, opts); + return new AnimationClass(null, opts); } static register(name: string, AnimationClass) { @@ -652,6 +678,16 @@ export class Animation { } +export interface AnimationOptions { + animation?: string; + renderDelay?: number; +} + +export interface PlayOptions { + duration?: number; + stepValue?: number; +} + const doc: any = document; const TRANSFORMS = [ 'translateX', 'translateY', 'translateZ', 'scale', 'scaleX', 'scaleY', 'scaleZ', diff --git a/ionic/components/action-sheet/action-sheet.ts b/ionic/components/action-sheet/action-sheet.ts index c6cc230aa4..42db9be437 100644 --- a/ionic/components/action-sheet/action-sheet.ts +++ b/ionic/components/action-sheet/action-sheet.ts @@ -2,6 +2,7 @@ import {Component, Renderer, ElementRef} from 'angular2/core'; import {NgFor, NgIf} from 'angular2/common'; import {Animation} from '../../animations/animation'; +import {Transition, TransitionOptions} from '../../transitions/transition'; import {Config} from '../../config/config'; import {Icon} from '../icon/icon'; import {isDefined} from '../../util/util'; @@ -272,9 +273,9 @@ class ActionSheetCmp { -class ActionSheetSlideIn extends Animation { - constructor(enteringView, leavingView, opts) { - super(null, opts); +class ActionSheetSlideIn extends Transition { + constructor(enteringView, leavingView, opts: TransitionOptions) { + super(opts); let ele = enteringView.pageRef().nativeElement; let backdrop = new Animation(ele.querySelector('.backdrop')); @@ -286,12 +287,12 @@ class ActionSheetSlideIn extends Animation { this.easing('cubic-bezier(.36,.66,.04,1)').duration(400).add(backdrop).add(wrapper); } } -Animation.register('action-sheet-slide-in', ActionSheetSlideIn); +Transition.register('action-sheet-slide-in', ActionSheetSlideIn); -class ActionSheetSlideOut extends Animation { - constructor(enteringView, leavingView, opts) { - super(null, opts); +class ActionSheetSlideOut extends Transition { + constructor(enteringView: ViewController, leavingView: ViewController, opts: TransitionOptions) { + super(opts); let ele = leavingView.pageRef().nativeElement; let backdrop = new Animation(ele.querySelector('.backdrop')); @@ -303,12 +304,12 @@ class ActionSheetSlideOut extends Animation { this.easing('cubic-bezier(.36,.66,.04,1)').duration(300).add(backdrop).add(wrapper); } } -Animation.register('action-sheet-slide-out', ActionSheetSlideOut); +Transition.register('action-sheet-slide-out', ActionSheetSlideOut); -class ActionSheetMdSlideIn extends Animation { - constructor(enteringView, leavingView, opts) { - super(null, opts); +class ActionSheetMdSlideIn extends Transition { + constructor(enteringView: ViewController, leavingView: ViewController, opts: TransitionOptions) { + super(opts); let ele = enteringView.pageRef().nativeElement; let backdrop = new Animation(ele.querySelector('.backdrop')); @@ -320,12 +321,12 @@ class ActionSheetMdSlideIn extends Animation { this.easing('cubic-bezier(.36,.66,.04,1)').duration(450).add(backdrop).add(wrapper); } } -Animation.register('action-sheet-md-slide-in', ActionSheetMdSlideIn); +Transition.register('action-sheet-md-slide-in', ActionSheetMdSlideIn); -class ActionSheetMdSlideOut extends Animation { - constructor(enteringView, leavingView, opts) { - super(null, opts); +class ActionSheetMdSlideOut extends Transition { + constructor(enteringView: ViewController, leavingView: ViewController, opts: TransitionOptions) { + super(opts); let ele = leavingView.pageRef().nativeElement; let backdrop = new Animation(ele.querySelector('.backdrop')); @@ -337,4 +338,4 @@ class ActionSheetMdSlideOut extends Animation { this.easing('cubic-bezier(.36,.66,.04,1)').duration(450).add(backdrop).add(wrapper); } } -Animation.register('action-sheet-md-slide-out', ActionSheetMdSlideOut); +Transition.register('action-sheet-md-slide-out', ActionSheetMdSlideOut); diff --git a/ionic/components/alert/alert.ts b/ionic/components/alert/alert.ts index 3874a8e823..36cd2d367b 100644 --- a/ionic/components/alert/alert.ts +++ b/ionic/components/alert/alert.ts @@ -2,6 +2,7 @@ import {Component, ElementRef, Renderer} from 'angular2/core'; import {NgClass, NgSwitch, NgIf, NgFor} from 'angular2/common'; import {Animation} from '../../animations/animation'; +import {Transition, TransitionOptions} from '../../transitions/transition'; import {Config} from '../../config/config'; import {isDefined} from '../../util/util'; import {NavParams} from '../nav/nav-params'; @@ -484,9 +485,9 @@ class AlertCmp { /** * Animations for alerts */ -class AlertPopIn extends Animation { - constructor(enteringView, leavingView, opts) { - super(null, opts); +class AlertPopIn extends Transition { + constructor(enteringView: ViewController, leavingView: ViewController, opts: TransitionOptions) { + super(opts); let ele = enteringView.pageRef().nativeElement; let backdrop = new Animation(ele.querySelector('.backdrop')); @@ -502,12 +503,12 @@ class AlertPopIn extends Animation { .add(wrapper); } } -Animation.register('alert-pop-in', AlertPopIn); +Transition.register('alert-pop-in', AlertPopIn); -class AlertPopOut extends Animation { - constructor(enteringView, leavingView, opts) { - super(null, opts); +class AlertPopOut extends Transition { + constructor(enteringView: ViewController, leavingView: ViewController, opts: TransitionOptions) { + super(opts); let ele = leavingView.pageRef().nativeElement; let backdrop = new Animation(ele.querySelector('.backdrop')); @@ -523,12 +524,12 @@ class AlertPopOut extends Animation { .add(wrapper); } } -Animation.register('alert-pop-out', AlertPopOut); +Transition.register('alert-pop-out', AlertPopOut); -class AlertMdPopIn extends Animation { - constructor(enteringView, leavingView, opts) { - super(null, opts); +class AlertMdPopIn extends Transition { + constructor(enteringView: ViewController, leavingView: ViewController, opts: TransitionOptions) { + super(opts); let ele = enteringView.pageRef().nativeElement; let backdrop = new Animation(ele.querySelector('.backdrop')); @@ -544,12 +545,12 @@ class AlertMdPopIn extends Animation { .add(wrapper); } } -Animation.register('alert-md-pop-in', AlertMdPopIn); +Transition.register('alert-md-pop-in', AlertMdPopIn); -class AlertMdPopOut extends Animation { - constructor(enteringView, leavingView, opts) { - super(null, opts); +class AlertMdPopOut extends Transition { + constructor(enteringView: ViewController, leavingView: ViewController, opts: TransitionOptions) { + super(opts); let ele = leavingView.pageRef().nativeElement; let backdrop = new Animation(ele.querySelector('.backdrop')); @@ -565,6 +566,6 @@ class AlertMdPopOut extends Animation { .add(wrapper); } } -Animation.register('alert-md-pop-out', AlertMdPopOut); +Transition.register('alert-md-pop-out', AlertMdPopOut); let alertIds = -1; diff --git a/ionic/components/modal/modal.ts b/ionic/components/modal/modal.ts index 623540823f..57aa548aff 100644 --- a/ionic/components/modal/modal.ts +++ b/ionic/components/modal/modal.ts @@ -1,5 +1,6 @@ import {ViewController} from '../nav/view-controller'; import {Animation} from '../../animations/animation'; +import {Transition, TransitionOptions} from '../../transitions/transition'; /** * @name Modal @@ -129,10 +130,11 @@ export class Modal extends ViewController { /** * Animations for modals */ -class ModalSlideIn extends Animation { - constructor(enteringView, leavingView, opts) { - super(enteringView.pageRef(), opts); +class ModalSlideIn extends Transition { + constructor(enteringView: ViewController, leavingView: ViewController, opts: TransitionOptions) { + super(opts); this + .element(enteringView.pageRef()) .easing('cubic-bezier(0.36,0.66,0.04,1)') .duration(400) .fromTo('translateY', '100%', '0%') @@ -146,25 +148,27 @@ class ModalSlideIn extends Animation { } } } -Animation.register('modal-slide-in', ModalSlideIn); +Transition.register('modal-slide-in', ModalSlideIn); -class ModalSlideOut extends Animation { - constructor(enteringView, leavingView, opts) { - super(leavingView.pageRef(), opts); +class ModalSlideOut extends Transition { + constructor(enteringView: ViewController, leavingView: ViewController, opts: TransitionOptions) { + super(opts); this + .element(leavingView.pageRef()) .easing('ease-out') .duration(250) .fromTo('translateY', '0%', '100%'); } } -Animation.register('modal-slide-out', ModalSlideOut); +Transition.register('modal-slide-out', ModalSlideOut); -class ModalMDSlideIn extends Animation { - constructor(enteringView, leavingView, opts) { - super(enteringView.pageRef(), opts); +class ModalMDSlideIn extends Transition { + constructor(enteringView: ViewController, leavingView: ViewController, opts: TransitionOptions) { + super(opts); this + .element(enteringView.pageRef()) .easing('cubic-bezier(0.36,0.66,0.04,1)') .duration(280) .fromTo('translateY', '40px', '0px') @@ -179,17 +183,18 @@ class ModalMDSlideIn extends Animation { } } } -Animation.register('modal-md-slide-in', ModalMDSlideIn); +Transition.register('modal-md-slide-in', ModalMDSlideIn); -class ModalMDSlideOut extends Animation { - constructor(enteringView, leavingView, opts) { - super(leavingView.pageRef(), opts); +class ModalMDSlideOut extends Transition { + constructor(enteringView: ViewController, leavingView: ViewController, opts: TransitionOptions) { + super(opts); this + .element(leavingView.pageRef()) .duration(200) .easing('cubic-bezier(0.47,0,0.745,0.715)') .fromTo('translateY', '0px', '40px') .fadeOut(); } } -Animation.register('modal-md-slide-out', ModalMDSlideOut); +Transition.register('modal-md-slide-out', ModalMDSlideOut); diff --git a/ionic/components/nav/nav-controller.ts b/ionic/components/nav/nav-controller.ts index 5ca801f04f..d2e96c6e9b 100644 --- a/ionic/components/nav/nav-controller.ts +++ b/ionic/components/nav/nav-controller.ts @@ -1,16 +1,16 @@ import {Compiler, ElementRef, Injector, provide, NgZone, AppViewManager, Renderer, ResolvedProvider, Type} from 'angular2/core'; import {wtfLeave, wtfCreateScope, WtfScopeFn, wtfStartTimeRange, wtfEndTimeRange} from 'angular2/instrumentation'; -import {Animation} from '../../animations/animation'; import {Config} from '../../config/config'; import {Ion} from '../ion'; import {IonicApp} from '../app/app'; -import {isBoolean, array, pascalCaseToDashCase} from '../../util/util'; import {Keyboard} from '../../util/keyboard'; import {NavParams} from './nav-params'; import {NavRouter} from './nav-router'; -import {raf, rafFrames} from '../../util/dom'; +import {pascalCaseToDashCase} from '../../util/util'; +import {raf} from '../../util/dom'; import {SwipeBackGesture} from './swipe-back'; +import {Transition} from '../../transitions/transition'; import {ViewController} from './view-controller'; /** @@ -106,11 +106,11 @@ import {ViewController} from './view-controller'; export class NavController extends Ion { private _transIds = 0; private _init = false; - private _lastTrans; + private _lastTrans: Transition; protected _ids: number = -1; protected _sbEnabled: any; protected _sbThreshold: any; - protected _sbTrans: any = null; + protected _sbTrans: Transition = null; protected _trnsDelay: any; protected _trnsTime: number = 0; protected _views: Array = []; @@ -182,7 +182,7 @@ export class NavController extends Ion { * @param {object} [opts={}] Any options you want to use pass to transtion * @returns {Promise} Returns a promise when done */ - setRoot(page: Type, params: any = {}, opts: any = {}): Promise { + setRoot(page: Type, params: any = {}, opts: NavOptions = {}): Promise { return this.setPages([{page, params}], opts); } @@ -259,7 +259,7 @@ export class NavController extends Ion { * @param {object} [opts={}] Any options you want to use pass * @returns {Promise} Returns a promise when the pages are set */ - setPages(pages: Array<{page: Type, params?: any}>, opts: any = {}): Promise { + setPages(pages: Array<{page: Type, params?: any}>, opts: NavOptions = {}): Promise { if (!pages || !pages.length) { return Promise.resolve(); } @@ -307,7 +307,7 @@ export class NavController extends Ion { /** * @private */ - private setViews(components, opts = {}) { + private setViews(components, opts: NavOptions = {}) { console.warn('setViews() deprecated, use setPages() instead'); return this.setPages(components, opts); } @@ -377,14 +377,7 @@ export class NavController extends Ion { * @param {object} [opts={}] Any options you want to use pass to transtion * @returns {Promise} Returns a promise, which resolves when the transition has completed */ - push(page: Type, - params: any={}, - opts: { - animate?: boolean, - animation?: string - direction?: string - }={} - ) { + push(page: Type, params: any = {}, opts: NavOptions = {}) { return this.insertPages(-1, [{page: page, params: params}], opts); } @@ -413,7 +406,7 @@ export class NavController extends Ion { * @param {object} [opts={}] Any options you want to use pass to transtion * @returns {Promise} Returns a promise, which resolves when the transition has completed */ - present(enteringView: ViewController, opts: any = {}): Promise { + present(enteringView: ViewController, opts: NavOptions = {}): Promise { let rootNav = this.rootNav; if (rootNav['_tabs']) { @@ -424,7 +417,6 @@ export class NavController extends Ion { } opts.keyboardClose = false; - opts.skipCache = true; opts.direction = 'forward'; if (!opts.animation) { @@ -433,7 +425,6 @@ export class NavController extends Ion { enteringView.setLeavingOpts({ keyboardClose: false, - skipCache: true, direction: 'back', animation: enteringView.getTransitionName('back') }); @@ -465,7 +456,7 @@ export class NavController extends Ion { * @param {object} [opts={}] Any options you want to use pass to transtion * @returns {Promise} Returns a promise when the page has been inserted into the navigation stack */ - insert(insertIndex: number, page: Type, params: any = {}, opts: any = {}): Promise { + insert(insertIndex: number, page: Type, params: any = {}, opts: NavOptions = {}): Promise { return this.insertPages(insertIndex, [{page: page, params: params}], opts); } @@ -497,12 +488,12 @@ export class NavController extends Ion { * @param {object} [opts={}] Any options you want to use pass to transtion * @returns {Promise} Returns a promise when the pages have been inserted into the navigation stack */ - insertPages(insertIndex: number, insertPages: Array<{page: Type, params?: any}>, opts: any = {}): Promise { + insertPages(insertIndex: number, insertPages: Array<{page: Type, params?: any}>, opts: NavOptions = {}): Promise { let views = insertPages.map(p => new ViewController(p.page, p.params)); return this._insertViews(insertIndex, views, opts); } - private _insertViews(insertIndex: number, insertViews: Array, opts: any = {}): Promise { + private _insertViews(insertIndex: number, insertViews: Array, opts: NavOptions = {}): Promise { if (!insertViews || !insertViews.length) { return Promise.reject('invalid pages'); } @@ -526,7 +517,7 @@ export class NavController extends Ion { // transition in, but was simply inserted somewhere in the stack // go backwards through the stack and find the first active view // which could be active or one ready to enter - for (let i = this._views.length - 1; i >= 0; i--) { + for (var i = this._views.length - 1; i >= 0; i--) { if (this._views[i].state === STATE_ACTIVE || this._views[i].state === STATE_INIT_ENTER) { // found the view at the end of the stack that's either // already active or it is about to enter @@ -627,7 +618,7 @@ export class NavController extends Ion { * @param {object} [opts={}] Any options you want to use pass to transtion * @returns {Promise} Returns a promise when the transition is completed */ - pop(opts: any = {}): Promise { + pop(opts: NavOptions = {}): Promise { // get the index of the active view // which will become the view to be leaving let activeView = this.getByState(STATE_TRANS_ENTER) || @@ -640,7 +631,7 @@ export class NavController extends Ion { * Similar to `pop()`, this method let's you navigate back to the root of the stack, no matter how many views that is * @param {object} [opts={}] Any options you want to use pass to transtion */ - popToRoot(opts = {}): Promise { + popToRoot(opts: NavOptions = {}): Promise { return this.popTo(this.first(), opts); } @@ -649,7 +640,7 @@ export class NavController extends Ion { * @param {ViewController} view to pop to * @param {object} [opts={}] Any options you want to use pass to transtion */ - popTo(view: ViewController, opts: any = {}): Promise { + popTo(view: ViewController, opts: NavOptions = {}): Promise { let startIndex = this.indexOf(view); let activeView = this.getByState(STATE_TRANS_ENTER) || this.getByState(STATE_INIT_ENTER) || @@ -678,7 +669,7 @@ export class NavController extends Ion { * @param {object} [opts={}] Any options you want to use pass to transtion. * @returns {Promise} Returns a promise when the page has been removed. */ - remove(startIndex: number = -1, removeCount: number = 1, opts: any = {}): Promise { + remove(startIndex: number = -1, removeCount: number = 1, opts: NavOptions = {}): Promise { if (startIndex === -1) { startIndex = this._views.length - 1; @@ -705,13 +696,16 @@ export class NavController extends Ion { } if (this._lastTrans) { - this._lastTrans.playbackRate(100).onFinish(() => { - opts.animate = false; - this._transition(forcedActive, null, opts, () => { - // transition has completed!! - resolve(); - }); - }); + this._lastTrans + .onFinish(() => { + opts.animate = false; + this._transition(forcedActive, null, opts, () => { + // transition has completed!! + resolve(); + }); + }, false, true) + .stop(); + this._lastTrans.destroy(); this._lastTrans = null; } else { @@ -761,7 +755,7 @@ export class NavController extends Ion { let view: ViewController = null; // loop through each view that is set to be removed - for (let i = startIndex, ii = removeCount + startIndex; i < ii; i++) { + for (var i = startIndex, ii = removeCount + startIndex; i < ii; i++) { view = this.getByIndex(i); if (!view) break; @@ -792,7 +786,7 @@ export class NavController extends Ion { // from the index of the leaving view, go backwards and // find the first view that is inactive - for (let i = this.indexOf(view) - 1; i >= 0; i--) { + for (var i = this.indexOf(view) - 1; i >= 0; i--) { if (this._views[i].state === STATE_INACTIVE) { this._views[i].state = STATE_INIT_ENTER; break; @@ -813,7 +807,7 @@ export class NavController extends Ion { // from the index of the leaving view, go backwards and // find the first view that is inactive so it can be the entering - for (let i = this.indexOf(view) - 1; i >= 0; i--) { + for (var i = this.indexOf(view) - 1; i >= 0; i--) { if (this._views[i].state === STATE_INACTIVE) { this._views[i].state = STATE_INIT_ENTER; break; @@ -855,7 +849,7 @@ export class NavController extends Ion { /** * @private */ - private _transition(enteringView: ViewController, leavingView: ViewController, opts, done: Function) { + private _transition(enteringView: ViewController, leavingView: ViewController, opts: NavOptions, done: Function) { let transId = ++this._transIds; if (enteringView === leavingView) { @@ -902,7 +896,7 @@ export class NavController extends Ion { /** * @private */ - private _render(transId, enteringView: ViewController, leavingView: ViewController, opts: any, done: Function) { + private _render(transId, enteringView: ViewController, leavingView: ViewController, opts: NavOptions, done: Function) { // compile/load the view into the DOM if (enteringView.state === STATE_INACTIVE) { @@ -948,7 +942,7 @@ export class NavController extends Ion { /** * @private */ - private _postRender(transId, enteringView: ViewController, leavingView: ViewController, isAlreadyTransitioning: boolean, opts: any, done: Function) { + private _postRender(transId, enteringView: ViewController, leavingView: ViewController, isAlreadyTransitioning: boolean, opts: NavOptions, done: Function) { // called after _render has completed and the view is compiled/loaded if (enteringView.state === STATE_INACTIVE) { @@ -1007,7 +1001,7 @@ export class NavController extends Ion { /** * @private */ - private _beforeTrans(enteringView: ViewController, leavingView: ViewController, opts: any, done: Function) { + private _beforeTrans(enteringView: ViewController, leavingView: ViewController, opts: NavOptions, done: Function) { // called after one raf from postRender() // create the transitions animation, play the animation // when the transition ends call wait for it to end @@ -1025,15 +1019,20 @@ export class NavController extends Ion { this._zone.runOutsideAngular(() => { // init the transition animation - opts.renderDelay = opts.transitionDelay || this._trnsDelay; + let transitionOpts = { + animation: opts.animation, + direction: opts.direction, + duration: opts.duration, + easing: opts.easing, + renderDelay: opts.transitionDelay || this._trnsDelay, + isRTL: this.config.platform.isRTL() + }; - // set if this app is right-to-left or not - opts.isRTL = this.config.platform.isRTL(); - - let transAnimation = Animation.createTransition(enteringView, - leavingView, - opts); + let transAnimation = Transition.createTransition(enteringView, + leavingView, + transitionOpts); + this._lastTrans && this._lastTrans.destroy(); this._lastTrans = transAnimation; if (opts.animate === false) { @@ -1070,7 +1069,7 @@ export class NavController extends Ion { /** * @private */ - private _afterTrans(enteringView: ViewController, leavingView: ViewController, opts: any, done: Function) { + private _afterTrans(enteringView: ViewController, leavingView: ViewController, opts: NavOptions, done: Function) { // transition has completed, update each view's state // place back into the zone, run didEnter/didLeave // call the final callback when done @@ -1176,7 +1175,7 @@ export class NavController extends Ion { let activeViewIndex = this.indexOf(this.getActive()); let destroys = this._views.filter(v => v.state === STATE_REMOVE_AFTER_TRANS); - for (let i = activeViewIndex + 1; i < this._views.length; i++) { + for (var i = activeViewIndex + 1; i < this._views.length; i++) { if (this._views[i].state === STATE_INACTIVE) { destroys.push(this._views[i]); } @@ -1193,7 +1192,7 @@ export class NavController extends Ion { /** * @private */ - loadPage(view: ViewController, navbarContainerRef, opts: any, done: Function) { + loadPage(view: ViewController, navbarContainerRef, opts: NavOptions, done: Function) { let wtfTimeRangeScope = wtfStartTimeRange('NavController#loadPage', view.name); // guts of DynamicComponentLoader#loadIntoLocation @@ -1295,19 +1294,8 @@ export class NavController extends Ion { // wait for the new view to complete setup this._render(0, enteringView, leavingView, {}, () => { - this._zone.runOutsideAngular(() => { - // set that the new view pushed on the stack is staged to be entering/leaving - // staged state is important for the transition to find the correct view - // enteringView.state = STATE_RENDERED_ENTER; - // leavingView.state = STATE_RENDERED_LEAVE; - // init the swipe back transition animation - this._sbTrans = Animation.createTransition(enteringView, leavingView, opts); - this._sbTrans.easing('linear').progressStart(); - - }); }); - } /** @@ -1321,7 +1309,7 @@ export class NavController extends Ion { this.setTransitioning(true, 4000); // set the transition animation's progress - this._sbTrans.progress(value); + this._sbTrans.progressStep(value); } } @@ -1336,8 +1324,7 @@ export class NavController extends Ion { this._app.setEnabled(false); this.setTransitioning(true); - this._sbTrans.progressEnd(completeSwipeBack, rate).then(() => { - + this._sbTrans.onFinish(() => { this._zone.run(() => { // find the views that were entering and leaving let enteringView = null;// this._getStagedEntering(); @@ -1376,14 +1363,15 @@ export class NavController extends Ion { } // empty out and dispose the swipe back transition animation - this._sbTrans && this._sbTrans.dispose(); + this._sbTrans && this._sbTrans.destroy(); this._sbTrans = null; // all done! //this._transComplete(); }); - }); + }, true); + this._sbTrans.progressEnd(completeSwipeBack, 0.5); } /** @@ -1475,7 +1463,7 @@ export class NavController extends Ion { * @returns {ViewController} */ getByState(state: string): ViewController { - for (let i = this._views.length - 1; i >= 0; i--) { + for (var i = this._views.length - 1; i >= 0; i--) { if (this._views[i].state === state) { return this._views[i]; } @@ -1595,6 +1583,18 @@ export class NavController extends Ion { } +export interface NavOptions { + animate?: boolean; + animation?: string; + direction?: string; + duration?: number; + easing?: string; + keyboardClose?: boolean; + preload?: boolean; + transitionDelay?: number; + postLoad?: Function +} + const STATE_ACTIVE = 'active'; const STATE_INACTIVE = 'inactive'; const STATE_INIT_ENTER = 'init_enter'; diff --git a/ionic/components/nav/view-controller.ts b/ionic/components/nav/view-controller.ts index 1cabd98ff8..75339e61f1 100644 --- a/ionic/components/nav/view-controller.ts +++ b/ionic/components/nav/view-controller.ts @@ -1,7 +1,7 @@ import {Output, EventEmitter, Type, TemplateRef, ViewContainerRef, ElementRef, Renderer} from 'angular2/core'; import {Navbar} from '../navbar/navbar'; -import {NavController} from './nav-controller'; +import {NavController, NavOptions} from './nav-controller'; import {NavParams} from './nav-params'; @@ -112,7 +112,7 @@ export class ViewController { /** * @private */ - setLeavingOpts(opts) { + setLeavingOpts(opts: NavOptions) { this._leavingOpts = opts; } @@ -183,7 +183,7 @@ export class ViewController { * @private */ destroy() { - for (let i = 0; i < this._destroys.length; i++) { + for (var i = 0; i < this._destroys.length; i++) { this._destroys[i](); } this._destroys = []; diff --git a/ionic/ionic.ts b/ionic/ionic.ts index afa2b208a9..821c0aba60 100644 --- a/ionic/ionic.ts +++ b/ionic/ionic.ts @@ -24,5 +24,5 @@ export * from './translation/translate_pipe' import './config/modes' import './platform/registry' import './animations/builtins' -import './animations/ios-transition' -import './animations/md-transition' +import './transitions/transition-ios' +import './transitions/transition-md' diff --git a/ionic/animations/ios-transition.ts b/ionic/transitions/transition-ios.ts similarity index 93% rename from ionic/animations/ios-transition.ts rename to ionic/transitions/transition-ios.ts index 6beb0c7368..84b28726d7 100644 --- a/ionic/animations/ios-transition.ts +++ b/ionic/transitions/transition-ios.ts @@ -1,4 +1,6 @@ -import {Animation} from './animation'; +import {Animation} from '../animations/animation'; +import {Transition, TransitionOptions} from './transition'; +import {ViewController} from '../components/nav/view-controller'; const DURATION = 500; const EASING = 'cubic-bezier(0.36,0.66,0.04,1)'; @@ -11,10 +13,10 @@ const OFF_OPACITY = 0.8; const SHOW_BACK_BTN_CSS = 'show-back-button'; -class IOSTransition extends Animation { +class IOSTransition extends Transition { - constructor(enteringView, leavingView, opts) { - super(null, opts); + constructor(enteringView: ViewController, leavingView: ViewController, opts: TransitionOptions) { + super(opts); this.duration(opts.duration || DURATION); this.easing(opts.easing || EASING); @@ -187,4 +189,4 @@ class IOSTransition extends Animation { } -Animation.register('ios-transition', IOSTransition); +Transition.register('ios-transition', IOSTransition); diff --git a/ionic/animations/md-transition.ts b/ionic/transitions/transition-md.ts similarity index 81% rename from ionic/animations/md-transition.ts rename to ionic/transitions/transition-md.ts index 479a00925e..e3909649ea 100644 --- a/ionic/animations/md-transition.ts +++ b/ionic/transitions/transition-md.ts @@ -1,4 +1,6 @@ -import {Animation} from './animation'; +import {Animation} from '../animations/animation'; +import {Transition, TransitionOptions} from './transition'; +import {ViewController} from '../components/nav/view-controller'; const TRANSLATEY = 'translateY'; const OFF_BOTTOM = '40px'; @@ -6,10 +8,10 @@ const CENTER = '0px' const SHOW_BACK_BTN_CSS = 'show-back-button'; -class MDTransition extends Animation { +class MDTransition extends Transition { - constructor(enteringView, leavingView, opts) { - super(null, opts); + constructor(enteringView: ViewController, leavingView: ViewController, opts: TransitionOptions) { + super(opts); // what direction is the transition going let backDirection = (opts.direction === 'back'); @@ -60,4 +62,4 @@ class MDTransition extends Animation { } -Animation.register('md-transition', MDTransition); +Transition.register('md-transition', MDTransition); diff --git a/ionic/transitions/transition.ts b/ionic/transitions/transition.ts new file mode 100644 index 0000000000..0e0a88dd5c --- /dev/null +++ b/ionic/transitions/transition.ts @@ -0,0 +1,41 @@ +import {Animation} from '../animations/animation'; +import {ViewController} from '../components/nav/view-controller'; + + +/** + * @private + **/ +export class Transition extends Animation { + + constructor(opts: TransitionOptions) { + super(null, { + renderDelay: opts.renderDelay + }); + } + + static createTransition(enteringView: ViewController, leavingView: ViewController, opts: TransitionOptions): Transition { + let TransitionClass = TransitionRegistry[opts.animation]; + if (!TransitionClass) { + // didn't find a transition animation, default to ios-transition + TransitionClass = TransitionRegistry['ios-transition']; + } + + return new TransitionClass(enteringView, leavingView, opts); + } + + static register(name: string, TransitionClass) { + TransitionRegistry[name] = TransitionClass; + } + +} + +export interface TransitionOptions { + animation: string; + duration: number; + easing: string; + direction: string; + renderDelay?: number; + isRTL?: boolean; +} + +let TransitionRegistry = {}; From 38a3be438f8254165b2bee51f391feb072c2341e Mon Sep 17 00:00:00 2001 From: "Manu Mtz.-Almeida" Date: Tue, 9 Feb 2016 01:53:34 +0100 Subject: [PATCH 022/117] fix(button): bar-button uses inner span as flexbox - Fixed block/full buttons, now there are display: block - Fixes warnings --- ionic/components/button/button.ios.scss | 6 +-- ionic/components/button/button.md.scss | 19 ++++---- ionic/components/button/button.scss | 22 +++++---- ionic/components/nav/test/basic/index.ts | 15 +++--- .../components/nav/test/insert-views/index.ts | 10 ++-- ionic/components/navbar/navbar.ts | 8 ++-- .../toolbar/test/scenarios/main.html | 46 ++++++++++++------- ionic/components/toolbar/toolbar-button.scss | 9 ++-- ionic/components/toolbar/toolbar.ios.scss | 10 ++-- ionic/components/toolbar/toolbar.md.scss | 3 +- ionic/components/toolbar/toolbar.ts | 8 ++-- 11 files changed, 81 insertions(+), 75 deletions(-) diff --git a/ionic/components/button/button.ios.scss b/ionic/components/button/button.ios.scss index 934b244f58..a1ccaf1515 100644 --- a/ionic/components/button/button.ios.scss +++ b/ionic/components/button/button.ios.scss @@ -97,7 +97,6 @@ $button-ios-small-icon-font-size: 1.3em !default; margin-right: 0; } - // iOS Full Button // -------------------------------------------------- @@ -105,11 +104,10 @@ $button-ios-small-icon-font-size: 1.3em !default; margin-right: 0; margin-left: 0; border-radius: 0; - border-left: none; - border-right: none; + border-right-width: 0; + border-left-width: 0; } - // iOS Outline Button // -------------------------------------------------- diff --git a/ionic/components/button/button.md.scss b/ionic/components/button/button.md.scss index d49f12a52c..6d9ac3fe11 100644 --- a/ionic/components/button/button.md.scss +++ b/ionic/components/button/button.md.scss @@ -110,28 +110,25 @@ $button-md-small-icon-font-size: 1.4em !default; font-size: $button-md-small-icon-font-size; } +// Material Design Block Button +// -------------------------------------------------- + +.button-block { + margin-left: 0; + margin-right: 0; +} // Material Design Full Button // -------------------------------------------------- .button-full { - border-radius: 0; margin-right: 0; margin-left: 0; + border-radius: 0; border-right-width: 0; border-left-width: 0; } - -// Material Design Block Button -// -------------------------------------------------- - -.button-block { - margin-right: 0; - margin-left: 0; -} - - // Material Design Outline Button // -------------------------------------------------- diff --git a/ionic/components/button/button.scss b/ionic/components/button/button.scss index 3b26fc0234..33f18fd422 100644 --- a/ionic/components/button/button.scss +++ b/ionic/components/button/button.scss @@ -29,17 +29,18 @@ $button-round-border-radius: 64px !default; @include appearance(none); } -span.button-inner { - width: 100%; - height: 100%; - display: flex; - flex-shrink: 0; - flex-flow: row nowrap; - align-items: center; - justify-content: center; +.button-inner { + width: 100%; + height: 100%; + + display: flex; + flex-shrink: 0; + flex-flow: row nowrap; + align-items: center; + justify-content: center; } -a.button { +a.button, a[button] { text-decoration: none; } @@ -54,7 +55,7 @@ a.button { // -------------------------------------------------- .button-block { - display: flex; + display: block; clear: both; width: 100%; @@ -68,6 +69,7 @@ a.button { // -------------------------------------------------- .button-full { + display: block; width: 100%; } diff --git a/ionic/components/nav/test/basic/index.ts b/ionic/components/nav/test/basic/index.ts index c45476d72a..f75bb8a2bb 100644 --- a/ionic/components/nav/test/basic/index.ts +++ b/ionic/components/nav/test/basic/index.ts @@ -20,7 +20,7 @@ class MyCmpTest{} - + @@ -74,7 +74,7 @@ class FirstPage { setPages() { let items = [ - {page: PrimaryHeaderPage} + { page: PrimaryHeaderPage } ]; this.nav.setPages(items); @@ -89,7 +89,7 @@ class FirstPage { } pushFullPage() { - this.nav.push(FullPage, { id: 8675309, myData: [1,2,3,4] } ); + this.nav.push(FullPage, { id: 8675309, myData: [1, 2, 3, 4] }); } pushAnother() { @@ -139,8 +139,8 @@ class FullPage { setPages() { let items = [ - {page: FirstPage}, - {page: PrimaryHeaderPage} + { page: FirstPage }, + { page: PrimaryHeaderPage } ]; this.nav.setPages(items); @@ -190,6 +190,9 @@ class FullPage { template: ` Primary Color Page Header + + +

@@ -218,7 +221,7 @@ class PrimaryHeaderPage { } pushFullPage() { - this.nav.push(FullPage, { id: 8675309, myData: [1,2,3,4] } ); + this.nav.push(FullPage, { id: 8675309, myData: [1, 2, 3, 4] }); } insert() { diff --git a/ionic/components/nav/test/insert-views/index.ts b/ionic/components/nav/test/insert-views/index.ts index eabc724299..f27dc027e9 100644 --- a/ionic/components/nav/test/insert-views/index.ts +++ b/ionic/components/nav/test/insert-views/index.ts @@ -9,14 +9,14 @@ import {App, Page, NavController} from 'ionic/ionic'; - `, }) class FirstPage { constructor(nav: NavController) { this.nav = nav; } - pushPage(){ + pushPage() { this.nav.push(SecondPage) } } @@ -30,7 +30,7 @@ class FirstPage {

Second page

-
` }) @@ -38,7 +38,7 @@ class SecondPage { constructor(nav: NavController) { this.nav = nav; } - insertPage(){ + insertPage() { this.nav.insert(1, InsertPage) } } @@ -55,7 +55,7 @@ class SecondPage { ` }) class InsertPage { - constructor() {} + constructor() { } } diff --git a/ionic/components/navbar/navbar.ts b/ionic/components/navbar/navbar.ts index ff5ce24c91..c225df3cfa 100644 --- a/ionic/components/navbar/navbar.ts +++ b/ionic/components/navbar/navbar.ts @@ -94,9 +94,11 @@ class ToolbarBackground { template: '
' + '' + '' + diff --git a/ionic/components/toolbar/test/scenarios/main.html b/ionic/components/toolbar/test/scenarios/main.html index 66a5faf63e..be6f13db2c 100644 --- a/ionic/components/toolbar/test/scenarios/main.html +++ b/ionic/components/toolbar/test/scenarios/main.html @@ -1,4 +1,3 @@ - This is the title that never ends. It just goes on and on my friend. @@ -62,9 +61,9 @@ - + - + Icon/Color Attr + + + + + + + Edit + + + Text Only + + - + + + Right side menu toggle - + Something - + Else @@ -178,13 +190,13 @@ - + Light - + Toolbar - + Default Segment @@ -195,4 +207,4 @@ .toolbar { border-bottom: 1px solid black; } - + \ No newline at end of file diff --git a/ionic/components/toolbar/toolbar-button.scss b/ionic/components/toolbar/toolbar-button.scss index 9f14aa5fc3..6532b06070 100644 --- a/ionic/components/toolbar/toolbar-button.scss +++ b/ionic/components/toolbar/toolbar-button.scss @@ -5,11 +5,7 @@ .bar-button { position: relative; - display: inline-flex; - flex-shrink: 0; - flex-flow: row nowrap; - align-items: center; - justify-content: center; + display: inline-block; margin: 0; padding: 0; @@ -19,6 +15,7 @@ text-align: center; text-transform: none; + line-height: 1; vertical-align: top; // the better option for most scenarios vertical-align: -webkit-baseline-middle; // the best for those that support it @@ -54,7 +51,7 @@ .back-button { display: none; &.show-back-button { - display: flex; + display: inline-block; } } diff --git a/ionic/components/toolbar/toolbar.ios.scss b/ionic/components/toolbar/toolbar.ios.scss index 50c96fa9ce..9e32bdde95 100644 --- a/ionic/components/toolbar/toolbar.ios.scss +++ b/ionic/components/toolbar/toolbar.ios.scss @@ -62,7 +62,6 @@ ion-navbar-section { .toolbar-title { font-size: $toolbar-ios-title-font-size; font-weight: 600; - margin-top: 1px; text-align: center; pointer-events: auto; color: $toolbar-ios-text-color; @@ -123,10 +122,8 @@ ion-buttons[right] { // -------------------------------------------------- .bar-button { - margin-top: 0; - margin-bottom: 0; padding: 0 5px; - min-height: 32px; + height: 32px; border: 0; font-size: $toolbar-ios-button-font-size; border-radius: $bar-button-ios-border-radius; @@ -225,7 +222,6 @@ ion-buttons[right] { // -------------------------------------------------- .bar-button-icon-left ion-icon { - margin-left: -0.1em; padding-right: 0.3em; font-size: 1.4em; line-height: 0.67; @@ -257,7 +253,6 @@ ion-buttons[right] { .back-button { margin: 0; - margin-top: 2px; min-height: 3.2rem; line-height: 1; order: map-get($toolbar-order-ios, back-button); @@ -268,8 +263,9 @@ ion-buttons[right] { .back-button-icon { display: inherit; margin: 0; + margin-top: -1px; min-width: 18px; - font-size: 3.3rem; + font-size: 3.4rem; } .back-button-text { diff --git a/ionic/components/toolbar/toolbar.md.scss b/ionic/components/toolbar/toolbar.md.scss index 59b75ce705..4e3b02bb65 100644 --- a/ionic/components/toolbar/toolbar.md.scss +++ b/ionic/components/toolbar/toolbar.md.scss @@ -125,7 +125,7 @@ ion-buttons[right] { margin-left: 0.2rem; margin-right: 0.2rem; padding: 0 5px; - min-height: 32px; + height: 32px; border: 0; font-size: $toolbar-md-button-font-size; border-radius: $bar-button-md-border-radius; @@ -226,7 +226,6 @@ ion-buttons[right] { // -------------------------------------------------- .bar-button-icon-left ion-icon { - margin-left: -0.1em; padding-right: 0.3em; font-size: 1.4em; line-height: 0.67; diff --git a/ionic/components/toolbar/toolbar.ts b/ionic/components/toolbar/toolbar.ts index 09a711e29b..6de072e823 100644 --- a/ionic/components/toolbar/toolbar.ts +++ b/ionic/components/toolbar/toolbar.ts @@ -9,7 +9,7 @@ import {Button} from '../button/button'; /** * @private */ -export class ToolbarBase extends Ion { +export class ToolbarBase extends Ion { itemRefs = []; titleRef = null; titleCmp: any; @@ -155,9 +155,9 @@ export class ToolbarTitle extends Ion { toolbar && toolbar.setTitleCmp(this); navbar && navbar.setTitleCmp(this); } -/** - * @private - */ + /** + * @private + */ getTitleText() { return this.getNativeElement().textContent; } From 19ecc7a3afa9da8eee51b6638c9a890d1472e539 Mon Sep 17 00:00:00 2001 From: perry Date: Tue, 9 Feb 2016 19:02:11 -0600 Subject: [PATCH 023/117] chore(dgeni): setting inputs and outputs detection in dgeni --- ionic/components/searchbar/searchbar.ts | 38 +++++------- scripts/docs/dgeni-config.js | 5 +- .../docs/processors/collect-inputs-outputs.js | 62 +++++++++++++++++++ scripts/docs/templates/common.template.html | 34 ++++++++++ 4 files changed, 115 insertions(+), 24 deletions(-) create mode 100644 scripts/docs/processors/collect-inputs-outputs.js diff --git a/ionic/components/searchbar/searchbar.ts b/ionic/components/searchbar/searchbar.ts index 7a218addd3..5904229b48 100644 --- a/ionic/components/searchbar/searchbar.ts +++ b/ionic/components/searchbar/searchbar.ts @@ -42,19 +42,6 @@ export class SearchbarInput { * * ``` * - * @property {string} [cancelButtonText=Cancel] - Sets the cancel button text to the value passed in - * @property {boolean} [hideCancelButton=false] - Hides the cancel button - * @property {string} [placeholder=Search] - Sets input placeholder to the value passed in - * - * @property {Any} [input] - Expression to evaluate when the Searchbar input has changed including cleared - * @property {Any} [keydown] - Expression to evaluate when a key is pushed down in the Searchbar input - * @property {Any} [keypress] - Expression to evaluate when a character is inserted in the Searchbar input - * @property {Any} [keyup] - Expression to evaluate when a key is released in the Searchbar input - * @property {Any} [blur] - Expression to evaluate when the Searchbar input has blurred - * @property {Any} [focus] - Expression to evaluate when the Searchbar input has focused - * @property {Any} [cancel] - Expression to evaluate when the cancel button is clicked - * @property {Any} [clear] - Expression to evaluate when the clear input button is clicked - * * @demo /docs/v2/demos/searchbar/ * @see {@link /docs/v2/components#searchbar Searchbar Component Docs} */ @@ -79,40 +66,47 @@ export class Searchbar extends Ion { @ViewChild(SearchbarInput) searchbarInput; /** - * @private + * @input {string} Sets the cancel button text to the value passed in */ @Input() cancelButtonText: string; + /** - * @private + * @input {boolean} Hides the cancel button */ @Input() hideCancelButton: any; + /** - * @private + * @input {string} Sets input placeholder to the value passed in */ @Input() placeholder: string; + /** - * @private + * @input {Any} Expression to evaluate when the Searchbar input has changed including cleared */ @Input() ngModel: any; /** - * @private + * @output {event} When the Searchbar input has changed including cleared */ @Output() input: EventEmitter = new EventEmitter(); + /** - * @private + * @output {event} When the Searchbar input has blurred */ @Output() blur: EventEmitter = new EventEmitter(); + /** - * @private + * @output {event} When the Searchbar input has focused */ @Output() focus: EventEmitter = new EventEmitter(); + /** - * @private + * @output {event} When the cancel button is clicked */ @Output() cancel: EventEmitter = new EventEmitter(); + /** - * @private + * @output {event} When the clear input button is clicked */ @Output() clear: EventEmitter = new EventEmitter(); diff --git a/scripts/docs/dgeni-config.js b/scripts/docs/dgeni-config.js index 59519b99dc..dab42849e4 100644 --- a/scripts/docs/dgeni-config.js +++ b/scripts/docs/dgeni-config.js @@ -20,6 +20,7 @@ module.exports = function(currentVersion){ .processor(require('./processors/jekyll')) .processor(require('./processors/remove-private-members')) .processor(require('./processors/hide-private-api')) +.processor(require('./processors/collect-inputs-outputs')) // for debugging docs @@ -29,7 +30,8 @@ module.exports = function(currentVersion){ // $runBefore: ['rendering-docs'], // $process: function(docs){ // docs.forEach(function(doc){ -// if (doc.members && doc.name == "IonicApp"){ +// if (doc.name == "Searchbar"){ +// console.log(doc.input); // doc.members.forEach(function(method){ // if (method.name === "load") { // console.log(method); @@ -173,4 +175,3 @@ module.exports = function(currentVersion){ }) } - diff --git a/scripts/docs/processors/collect-inputs-outputs.js b/scripts/docs/processors/collect-inputs-outputs.js new file mode 100644 index 0000000000..b8b2af97ac --- /dev/null +++ b/scripts/docs/processors/collect-inputs-outputs.js @@ -0,0 +1,62 @@ +module.exports = function collectInputsOutputs() { + return { + + $runBefore: ['rendering-docs'], + $process: function(docs) { + docs.forEach(function(doc) { + // if (doc.members && doc.name == "Searchbar"){ + // console.log(doc.exportSymbol.members.hideCancelButton.valueDeclaration.decorators[0].expression.expression); + // doc.members.forEach(function(method){ + // if (method.name === "load") { + // console.log(method); + // } + // }) + // } + + if (doc.members && doc.members.length) { + var members = []; + var inputs = []; + var outputs = []; + + memberLoop: + for (var i in doc.members) { + if (doc.members[i].decorators && doc.members[i].decorators.length) { + + decoratorLoop: + for (var ii in doc.members[i].decorators) { + + if (doc.members[i].decorators[ii].name == 'Input') { + inputs.push(parseMember(doc.members[i])); + continue memberLoop; + } + if (doc.members[i].decorators[ii].name == 'Output') { + outputs.push(parseMember(doc.members[i])); + continue memberLoop; + } + } + // not an input or output, must be a plain member + members.push(doc.members[i]); + }; + } + + // update doc with pruned members list and add inputs and outputs + doc.members = members; + doc.inputs = inputs; + doc.outputs = outputs; + } + + function parseMember(member) { + member.type = member.content.substring( + member.content.indexOf('{') + 1, + member.content.indexOf('}') + ); + member.description = member.content.substring( + member.content.indexOf('}') + 1, + member.content.length + ); + return member; + } + }); + } + }; +}; diff --git a/scripts/docs/templates/common.template.html b/scripts/docs/templates/common.template.html index a0d049f313..dea028ad4c 100644 --- a/scripts/docs/templates/common.template.html +++ b/scripts/docs/templates/common.template.html @@ -57,6 +57,26 @@ angular_controller: APIDemoCtrl <@ endif @> <@- endmacro -@> +<@ macro inputTable(params, isDirective) -@> + + + + + + + + + + <@ for param in params @> + + + + + + <@ endfor @> + +
AttrTypeDetails
<$ param.name $><$ param.type $><$ param.description | marked $>
+<@- endmacro -@> <@- macro functionSyntax(fn) @> <@- set sep = joiner(', ') -@> @@ -244,6 +264,20 @@ Improve this doc <@- endif -@> + +<@- if doc.inputs and doc.inputs.length @> + +

Element Input Attributes

+<$ inputTable(doc.inputs) $> +<@- endif -@> + +<@- if doc.inputs and doc.inputs.length @> + +

Element Output Attributes

+<$ inputTable(doc.outputs) $> +<@- endif -@> + + <@- if doc.see @> From 10ab705f61fcb1a1acdcaf74fc6623759fb94c71 Mon Sep 17 00:00:00 2001 From: perry Date: Tue, 9 Feb 2016 19:04:47 -0600 Subject: [PATCH 024/117] chore(CI): ignore WIP branch --- circle.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/circle.yml b/circle.yml index f10432f336..60d75cf33d 100644 --- a/circle.yml +++ b/circle.yml @@ -1,3 +1,7 @@ +general: + branches: + ignore: + - ins_n_outs machine: node: version: 4.1.0 From ab09b81158aabbd38efd308be364a7723949f1e3 Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Wed, 10 Feb 2016 09:50:34 -0600 Subject: [PATCH 025/117] chore(release): release alpha57 --- CHANGELOG.md | 19 +++++++++++++++++++ package.json | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b83d833be..fad117f989 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,22 @@ + +# [2.0.0-alpha.57](https://github.com/driftyco/ionic/compare/v2.0.0-alpha.56...v2.0.0-alpha.57) (2016-02-10) + + +### Bug Fixes + +* **button:** bar-button uses inner span as flexbox ([38a3be4](https://github.com/driftyco/ionic/commit/38a3be4)) + +### Features + +* Improved transitions and animations +* hairlines width can be configured with a sass variable ([06b3a5b](https://github.com/driftyco/ionic/commit/06b3a5b)) +* **ion-item-sliding:** style icons on top of text in an option button ([4e57fcf](https://github.com/driftyco/ionic/commit/4e57fcf)), closes [#5352](https://github.com/driftyco/ionic/issues/5352) + +### Refactor + +* **animations:** no longer using Web Animations polyfill ([da18868](https://github.com/driftyco/ionic/commit/da18868)) + + # [2.0.0-alpha.56](https://github.com/driftyco/ionic/compare/v2.0.0-alpha.55...v2.0.0-alpha.56) (2016-02-05) diff --git a/package.json b/package.json index d785bcaa9f..c58938e945 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": "true", "name": "ionic2", - "version": "2.0.0-alpha.56", + "version": "2.0.0-alpha.57", "license": "Apache-2.0", "repository": { "type": "git", From b71acecd9e7376aeab209b9bce837c23586b31b4 Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Wed, 10 Feb 2016 10:01:00 -0600 Subject: [PATCH 026/117] test(card): fix icon markup in card tests --- ionic/components/card/test/map/main.html | 24 ++++++++++----------- ionic/components/card/test/social/main.html | 12 +++++------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/ionic/components/card/test/map/main.html b/ionic/components/card/test/map/main.html index 96572af045..51b6fcb4a5 100644 --- a/ionic/components/card/test/map/main.html +++ b/ionic/components/card/test/map/main.html @@ -9,17 +9,17 @@ - +

Museum of Football

11 N. Way St, Madison, WI 53703

- +

Institute of Fine Cocktails

14 S. Hop Avenue, Madison, WI 53703

@@ -28,7 +28,7 @@ 18 min (2.6 mi) @@ -39,17 +39,17 @@ - +

Yoshi's Island

Iggy Koopa

- +

Forest of Illusion

Roy Koopa

@@ -58,7 +58,7 @@ 3 hr (4.8 mi) @@ -69,17 +69,17 @@ - +

Museum of Information

44 Rue de Info, 75010 Paris, France

- +

General Pharmacy

1 Avenue Faux, 75010 Paris, France

@@ -88,7 +88,7 @@ 26 min (8.1 mi) diff --git a/ionic/components/card/test/social/main.html b/ionic/components/card/test/social/main.html index 5486f8df90..7175493542 100644 --- a/ionic/components/card/test/social/main.html +++ b/ionic/components/card/test/social/main.html @@ -23,11 +23,11 @@ @@ -56,11 +56,11 @@ @@ -88,11 +88,11 @@ From a8515115c1a253ba3b2ee4cfae015f4f2b8149ef Mon Sep 17 00:00:00 2001 From: perry Date: Wed, 10 Feb 2016 10:15:10 -0600 Subject: [PATCH 027/117] chore(dgeni): Updating API landing page title --- scripts/docs/templates/api_index.template.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/docs/templates/api_index.template.html b/scripts/docs/templates/api_index.template.html index 3884ecbbe1..97ab962a48 100644 --- a/scripts/docs/templates/api_index.template.html +++ b/scripts/docs/templates/api_index.template.html @@ -11,7 +11,7 @@ header_sub_title: Extend Ionic even further with the power of AngularJS searchable: false --- -# Ionic 2 Components +# Ionic 2 API Docs From b8c0f770348068d23936610ccae358d72c65804b Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Wed, 10 Feb 2016 10:42:16 -0600 Subject: [PATCH 028/117] test(list): remove infinite list code as this is outdated and broken --- ionic/components/list/test/infinite/index.ts | 39 ++----------------- ionic/components/list/test/infinite/main.html | 11 ++---- 2 files changed, 7 insertions(+), 43 deletions(-) diff --git a/ionic/components/list/test/infinite/index.ts b/ionic/components/list/test/infinite/index.ts index 9164945f91..ffb2f827d0 100644 --- a/ionic/components/list/test/infinite/index.ts +++ b/ionic/components/list/test/infinite/index.ts @@ -1,42 +1,9 @@ -import {ProtoViewRef, ViewContainerRef} from 'angular2/core' -import {Directive, Host, forwardRef} from 'angular2/core'; - -import {App, List} from 'ionic/ionic'; - +import {App} from 'ionic/ionic'; @App({ - templateUrl: 'main.html', - directives: [forwardRef(() => ItemCellTemplate)] + templateUrl: 'main.html' }) class E2EApp { - constructor() { - - this.items = [] - for(let i = 0; i < 1000; i++) { - this.items.push({ - title: 'Item ' + i - }) - } - } -} - - -/* - Used to find and register headers in a view, and this directive's - content will be moved up to the common navbar location, and created - using the same context as the view's content area. -*/ -@Directive({ - selector: 'template[cell]' -}) -export class ItemCellTemplate { - constructor(@Host() list: List, viewContainer: ViewContainerRef, protoViewRef: ProtoViewRef) { - console.log('Item cell template', list, viewContainer, protoViewRef); - - this.protoViewRef = protoViewRef; - this.viewContainer = viewContainer; - - list.setItemTemplate(this); - } + // TODO } diff --git a/ionic/components/list/test/infinite/main.html b/ionic/components/list/test/infinite/main.html index d6f233e191..0b680180a1 100644 --- a/ionic/components/list/test/infinite/main.html +++ b/ionic/components/list/test/infinite/main.html @@ -1,10 +1,7 @@ - +Infinite List - - - {{item.title}} - - - + + +TODO From 17c1846f056e9da62bfda7520ceeab075f11f759 Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Wed, 10 Feb 2016 11:01:41 -0600 Subject: [PATCH 029/117] test(menu): fix menu swipe enabling on right side menu --- ionic/components/menu/test/disable-swipe/index.ts | 4 ++-- ionic/components/menu/test/disable-swipe/main.html | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/ionic/components/menu/test/disable-swipe/index.ts b/ionic/components/menu/test/disable-swipe/index.ts index c255978493..cd306e0502 100644 --- a/ionic/components/menu/test/disable-swipe/index.ts +++ b/ionic/components/menu/test/disable-swipe/index.ts @@ -14,13 +14,13 @@ class Page1 { toggleLeftMenuSwipeable() { this.leftMenuSwipeEnabled = !this.leftMenuSwipeEnabled; - this.menu.swipeEnable(this.leftMenuSwipeEnabled, 'leftMenu'); + this.menu.swipeEnable(this.leftMenuSwipeEnabled, 'left'); } toggleRightMenuSwipeable() { this.rightMenuSwipeEnabled = !this.rightMenuSwipeEnabled; - this.menu.swipeEnable(this.leftMenuSwipeEnabled, 'rightMenu'); + this.menu.swipeEnable(this.rightMenuSwipeEnabled, 'right'); } } diff --git a/ionic/components/menu/test/disable-swipe/main.html b/ionic/components/menu/test/disable-swipe/main.html index b687ca825e..71b314b01c 100644 --- a/ionic/components/menu/test/disable-swipe/main.html +++ b/ionic/components/menu/test/disable-swipe/main.html @@ -7,11 +7,9 @@ - - @@ -27,11 +25,9 @@ - - From 3a1c7b4433efa8c01b2bee2f7a6b18846eee56ed Mon Sep 17 00:00:00 2001 From: mhartington Date: Wed, 10 Feb 2016 12:08:12 -0500 Subject: [PATCH 030/117] docs(tabs): update inputs/outputs --- ionic/components/tabs/tabs.ts | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/ionic/components/tabs/tabs.ts b/ionic/components/tabs/tabs.ts index 645744a5e3..c273402f69 100644 --- a/ionic/components/tabs/tabs.ts +++ b/ionic/components/tabs/tabs.ts @@ -17,17 +17,6 @@ import {isUndefined, isTrueProperty} from '../../util/util'; /** * @name Tabs - * @property {any} [selectedIndex] - The default selected tab index when first loaded. If a selected index wasn't provided then it'll use `0`, the first tab. - * @property {any} [tabbarPlacement] - set position of the tabbar, top or bottom - * @property {any} [tabbarIcons] - set the position of the tabbar's icons: top, bottom, left, right, hide - * @property {any} [preloadTabs] - sets whether to preload all the tabs, true or false - * @property {any} (change) - expression you want to evaluate when the tabs chage - * @usage -* ```html - * - * - * - * ``` * @description * _For basic Tabs usage, see the [Tabs section](../../../../components/#tabs) * of the Component docs._ @@ -36,9 +25,18 @@ import {isUndefined, isTrueProperty} from '../../util/util'; * individual Tab components. On iOS, the TabBar is placed on the bottom of * the screen, while on Android it is at the top. * + * @usage + * ```html + * + * + * + * ``` + * * @demo /docs/v2/demos/tabs/ + * * @see {@link /docs/v2/components#tabs Tabs Component Docs} * @see {@link ../Tab Tab API Docs} + * */ @Component({ selector: 'ion-tabs', @@ -92,23 +90,27 @@ export class Tabs extends Ion { subPages: boolean; /** - * @private + * @input {Any} The default selected tab index when first loaded. If a selected index wasn't provided then it'll use `0`, the first tab. */ @Input() selectedIndex: any; + /** - * @private + * @input {Any} Sets whether to preload all the tabs, true or false */ @Input() preloadTabs: any; + /** - * @private + * @input {String} set the position of the tabbar's icons: top, bottom, left, right, hide */ @Input() tabbarIcons: string; + /** - * @private + * @input {String} Set position of the tabbar, top or bottom */ @Input() tabbarPlacement: string; + /** - * @private + * @input {any} expression you want to evaluate when the tabs change */ @Output() change: EventEmitter = new EventEmitter(); @@ -116,6 +118,7 @@ export class Tabs extends Ion { * @private */ @ViewChild(TabHighlight) private _highlight: TabHighlight; + /** * @private */ From 4ad8c53810675b41646840f48b418bba6149a705 Mon Sep 17 00:00:00 2001 From: mhartington Date: Wed, 10 Feb 2016 12:24:07 -0500 Subject: [PATCH 031/117] docs(tab): update inputs/outputs --- ionic/components/tabs/tab.ts | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/ionic/components/tabs/tab.ts b/ionic/components/tabs/tab.ts index fda936de71..57ec6420da 100644 --- a/ionic/components/tabs/tab.ts +++ b/ionic/components/tabs/tab.ts @@ -69,14 +69,8 @@ import {TabButton} from './tab-button'; * ``` * * - * @property {Page} [root] - set the root page for this tab - * @property {String} [tabTitle] - set the title of this tab - * @property {String} [tabIcon] - set the icon for this tab - * @property {Any} [tabBadge] - set the badge for this tab - * @property {String} [tabBadgeStyle] - set the badge color for this tab - * @property {Any} (select) - method to call when the current tab is selected * - * @demo /docs/v2/demos/tabs/ + * @demo /docs/v2/demos/tabs/ */ @Component({ selector: 'ion-tab', @@ -107,32 +101,32 @@ export class Tab extends NavController { /** - * @private + * @input {Page} Set the root page for this tab */ @Input() root: Type; /** - * @private + * @input {String} Set the title of this tab */ @Input() tabTitle: string; /** - * @private + * @input {String} Set the icon for this tab */ @Input() tabIcon: string; /** - * @private + * @input {String} Set the badge for this tab */ @Input() tabBadge: string; /** - * @private + * @input {String} Set the badge color for this tab */ @Input() tabBadgeStyle: string; /** - * @private + * @pinput {Any} Method to call when the current tab is selected */ @Output() select: EventEmitter = new EventEmitter(); From ccdc08f9cd64099fc1673bd6b1559701cffccda4 Mon Sep 17 00:00:00 2001 From: mhartington Date: Wed, 10 Feb 2016 12:36:43 -0500 Subject: [PATCH 032/117] docs(tab): update inputs/outputs --- ionic/components/option/option.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ionic/components/option/option.ts b/ionic/components/option/option.ts index fd8497b0e7..ef19fce56f 100644 --- a/ionic/components/option/option.ts +++ b/ionic/components/option/option.ts @@ -7,9 +7,6 @@ import {isDefined, isTrueProperty} from '../../util/util'; * @description * `ion-option` is a child component of `ion-select`. Similar to the native option element, `ion-option` can take a value and a checked property. * - * @property [value] - the value of the option - * @property [checked] - whether or not the option is already checked and selected - * * @demo /docs/v2/demos/item-sliding/ */ @Directive({ @@ -20,14 +17,14 @@ export class Option { private _value; /** - * @private + * @input {Any} Event to evaluate when option has changed */ @Output() select: EventEmitter = new EventEmitter(); constructor(private _elementRef: ElementRef) {} /** - * @private + * @input {Bool} Whether or not the option is already checked and selected */ @Input() get checked() { @@ -39,7 +36,7 @@ export class Option { } /** - * @private + * @input {Any} The value of the option */ @Input() get value() { From 8bde8d7522134c04a7d5cacf924db6e207f5a71c Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Wed, 10 Feb 2016 11:38:57 -0600 Subject: [PATCH 033/117] fix(modal): set root nav view controller --- ionic/components/modal/test/basic/index.ts | 14 +++++++------- ionic/components/nav/nav-controller.ts | 2 ++ ionic/ionic.ts | 1 + 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/ionic/components/modal/test/basic/index.ts b/ionic/components/modal/test/basic/index.ts index c4144aa706..e975e48ebf 100644 --- a/ionic/components/modal/test/basic/index.ts +++ b/ionic/components/modal/test/basic/index.ts @@ -1,5 +1,5 @@ import {App, Page, Config, Platform} from 'ionic/ionic'; -import {Modal, ActionSheet, NavController, NavParams, Animation, ViewController} from 'ionic/ionic'; +import {Modal, ActionSheet, NavController, NavParams, Transition, ViewController} from 'ionic/ionic'; @Page({ @@ -284,8 +284,8 @@ class E2EApp { } -class FadeIn extends Animation { - constructor(enteringView, leavingView) { +class FadeIn extends Transition { + constructor(enteringView: ViewController, leavingView: ViewController) { super(enteringView.pageRef()); this .easing('ease') @@ -295,10 +295,10 @@ class FadeIn extends Animation { .before.addClass('show-page'); } } -Animation.register('my-fade-in', FadeIn); +Transition.register('my-fade-in', FadeIn); -class FadeOut extends Animation { - constructor(enteringView, leavingView) { +class FadeOut extends Transition { + constructor(enteringView: ViewController, leavingView: ViewController) { super(leavingView.pageRef()); this .easing('ease') @@ -307,4 +307,4 @@ class FadeOut extends Animation { .before.addClass('show-page'); } } -Animation.register('my-fade-out', FadeOut); +Transition.register('my-fade-out', FadeOut); diff --git a/ionic/components/nav/nav-controller.ts b/ionic/components/nav/nav-controller.ts index d2e96c6e9b..bf39b8c762 100644 --- a/ionic/components/nav/nav-controller.ts +++ b/ionic/components/nav/nav-controller.ts @@ -416,6 +416,8 @@ export class NavController extends Ion { return; } + enteringView.setNav(rootNav); + opts.keyboardClose = false; opts.direction = 'forward'; diff --git a/ionic/ionic.ts b/ionic/ionic.ts index 821c0aba60..cbb0b9dcfe 100644 --- a/ionic/ionic.ts +++ b/ionic/ionic.ts @@ -16,6 +16,7 @@ export * from './util/events' export * from './util/keyboard' export * from './animations/animation' +export * from './transitions/transition' export * from './translation/translate' export * from './translation/translate_pipe' From ef1fc752033caaa0ddd3c12d5841942b770eb9e8 Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Wed, 10 Feb 2016 11:39:45 -0600 Subject: [PATCH 034/117] test(slides): fix slides test to remove errors --- ionic/components/slides/test/basic/index.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ionic/components/slides/test/basic/index.ts b/ionic/components/slides/test/basic/index.ts index cb020b52ff..a2181da18e 100644 --- a/ionic/components/slides/test/basic/index.ts +++ b/ionic/components/slides/test/basic/index.ts @@ -22,14 +22,13 @@ class MyApp { this.http.get(baseUrl + '?method=flickr.groups.pools.getPhotos&group_id=1463451@N25&safe_search=1&api_key=' + FLICKR_API_KEY + '&nojsoncallback=1&format=json&tags=' + tags) - .map(res => res.json()) .subscribe(data => { - this.images = data.photos.photo.slice(0, 20); + this.images = data.json().photos.photo.slice(0, 20); setTimeout(() => { this.slider.update(); }); }, (err) => { - alert('Unable to load images'); + console.info('Unable to load images'); console.error(err); }) } From f14cf9a8dcd0e20b311c8bb510bb603c8d2289da Mon Sep 17 00:00:00 2001 From: Tim Lancina Date: Wed, 10 Feb 2016 11:49:12 -0600 Subject: [PATCH 035/117] docs(changelog): add breaking change notice about removal of web animations polyfill --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fad117f989..de016c939b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,11 @@ * **animations:** no longer using Web Animations polyfill ([da18868](https://github.com/driftyco/ionic/commit/da18868)) +### Breaking Changes + +The Web Animations polyfill is no longer shipped with the framework and may cause build errors. + +Projects will need to be [updated accordingly](https://github.com/driftyco/ionic-conference-app/commit/2ed59e6fd275c4616792c7b2e5aa9da4a20fb188). # [2.0.0-alpha.56](https://github.com/driftyco/ionic/compare/v2.0.0-alpha.55...v2.0.0-alpha.56) (2016-02-05) From 79a94db490b42842ebfe0e9a2cac14294de1b8a8 Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Wed, 10 Feb 2016 11:52:03 -0600 Subject: [PATCH 036/117] test(tabs): fix toggles in modal for tabs --- ionic/components/tabs/test/basic/index.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ionic/components/tabs/test/basic/index.ts b/ionic/components/tabs/test/basic/index.ts index bd293e6257..9131f30381 100644 --- a/ionic/components/tabs/test/basic/index.ts +++ b/ionic/components/tabs/test/basic/index.ts @@ -23,9 +23,10 @@ Tracks - - Toggle {{i}} - + + Toggle {{i}} + + From 5de31fb501b4e619d2a868ae5636b2dc03e64236 Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Wed, 10 Feb 2016 11:54:46 -0600 Subject: [PATCH 037/117] test(modal): fix custom modal transition --- ionic/components/modal/test/basic/index.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ionic/components/modal/test/basic/index.ts b/ionic/components/modal/test/basic/index.ts index e975e48ebf..6fb0c07fb2 100644 --- a/ionic/components/modal/test/basic/index.ts +++ b/ionic/components/modal/test/basic/index.ts @@ -1,5 +1,5 @@ import {App, Page, Config, Platform} from 'ionic/ionic'; -import {Modal, ActionSheet, NavController, NavParams, Transition, ViewController} from 'ionic/ionic'; +import {Modal, ActionSheet, NavController, NavParams, Transition, TransitionOptions, ViewController} from 'ionic/ionic'; @Page({ @@ -285,9 +285,10 @@ class E2EApp { class FadeIn extends Transition { - constructor(enteringView: ViewController, leavingView: ViewController) { - super(enteringView.pageRef()); + constructor(enteringView: ViewController, leavingView: ViewController, opts: TransitionOptions) { + super(opts); this + .element(enteringView.pageRef()) .easing('ease') .duration(1000) .fromTo('translateY', '0%', '0%') @@ -298,9 +299,10 @@ class FadeIn extends Transition { Transition.register('my-fade-in', FadeIn); class FadeOut extends Transition { - constructor(enteringView: ViewController, leavingView: ViewController) { - super(leavingView.pageRef()); + constructor(enteringView: ViewController, leavingView: ViewController, opts: TransitionOptions) { + super(opts); this + .element(leavingView.pageRef()) .easing('ease') .duration(500) .fadeOut() From 8d571ea96dc44be61d71ae6484618525078f9303 Mon Sep 17 00:00:00 2001 From: mhartington Date: Wed, 10 Feb 2016 13:03:35 -0500 Subject: [PATCH 038/117] docs(icon): update inputs/outputs --- ionic/components/icon/icon.ts | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/ionic/components/icon/icon.ts b/ionic/components/icon/icon.ts index 7f821d867d..b8fe6b0c14 100644 --- a/ionic/components/icon/icon.ts +++ b/ionic/components/icon/icon.ts @@ -30,15 +30,7 @@ import {Config} from '../../config/config'; * * ``` * - * @property {string} [name] - Use the appropriate icon for the mode. - * @property {string} [ios] - Explicitly set the icon to use on iOS. - * @property {string} [md] - Explicitly set the icon to use on Android. - * @property {boolean} [isActive] - Whether or not the icon has an "active" - * appearance. On iOS an active icon is filled in or full appearance, and an - * inactive icon on iOS will use an outlined version of the icon same icon. - * Material Design icons do not change appearance depending if they're active - * or not. The `isActive` property is largely used by the tabbar. - * @demo /docs/v2/demos/icon/ + * @demo /docs/v2/demos/icon/ * @see {@link /docs/v2/components#icons Icon Component Docs} * */ @@ -85,7 +77,7 @@ export class Icon { } /** - * @private + * @input {String} Icon to use. Will load the appropriate icon for each mode */ @Input() get name(): string { @@ -103,7 +95,7 @@ export class Icon { } /** - * @private + * @input {String} Explicitly set the icon to use on iOS */ @Input() get ios(): string { @@ -116,7 +108,7 @@ export class Icon { } /** - * @private + * @input {String} Explicitly set the icon to use on MD */ @Input() get md(): string { @@ -128,8 +120,9 @@ export class Icon { this.update(); } + /** - * @private + * @input {Bool} Whether or not the icon has an "active" appearance. On iOS an active icon is filled in or full appearance, and an inactive icon on iOS will use an outlined version of the icon same icon. Material Design icons do not change appearance depending if they're active or not. The `isActive` property is largely used by the tabbar. */ @Input() get isActive(): boolean { From 4b1943f0345402018b13565c1f81f36ba9e20480 Mon Sep 17 00:00:00 2001 From: mhartington Date: Wed, 10 Feb 2016 13:06:14 -0500 Subject: [PATCH 039/117] chore(dgeni): fix output template Template for @Outputs were still rengering since they were checking for @Inputs. --- scripts/docs/templates/common.template.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/docs/templates/common.template.html b/scripts/docs/templates/common.template.html index dea028ad4c..4c3227f499 100644 --- a/scripts/docs/templates/common.template.html +++ b/scripts/docs/templates/common.template.html @@ -271,7 +271,7 @@ Improve this doc <$ inputTable(doc.inputs) $> <@- endif -@> -<@- if doc.inputs and doc.inputs.length @> +<@- if doc.outputs and doc.outputs.length @>

Element Output Attributes

<$ inputTable(doc.outputs) $> From 2766f7fda8f537baa18f6b91df5f73f7da7a344e Mon Sep 17 00:00:00 2001 From: "Manu Mtz.-Almeida" Date: Wed, 10 Feb 2016 18:52:11 +0100 Subject: [PATCH 040/117] fix(toolbar): fixes segment/title aligment when cordova iOS style is applied closes #5208 --- ionic/components/toolbar/toolbar.ios.scss | 2 +- ionic/platform/cordova.ios.scss | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ionic/components/toolbar/toolbar.ios.scss b/ionic/components/toolbar/toolbar.ios.scss index 9e32bdde95..8c142ed261 100644 --- a/ionic/components/toolbar/toolbar.ios.scss +++ b/ionic/components/toolbar/toolbar.ios.scss @@ -17,7 +17,7 @@ $toolbar-order-ios: ( ); $toolbar-ios-padding: 4px !default; -$toolbar-ios-height: 4.4rem !default; +$toolbar-ios-height: 44px !default; $toolbar-ios-button-font-size: 1.7rem !default; $toolbar-ios-title-font-size: 1.7rem !default; $navbar-ios-height: $toolbar-ios-height !default; diff --git a/ionic/platform/cordova.ios.scss b/ionic/platform/cordova.ios.scss index 25b7e84b1a..c07eb2a8a7 100644 --- a/ionic/platform/cordova.ios.scss +++ b/ionic/platform/cordova.ios.scss @@ -3,7 +3,7 @@ // iOS Cordova // -------------------------------------------------- -$cordova-ios-toolbar-padding: 2rem !default; +$cordova-ios-toolbar-padding: 20px !default; &.platform-cordova.platform-ios { @@ -15,7 +15,7 @@ $cordova-ios-toolbar-padding: 2rem !default; ion-navbar ion-title, ion-navbar ion-segment, { - padding-top: $cordova-ios-toolbar-padding; + padding-top: $cordova-ios-toolbar-padding - $toolbar-ios-padding; } ion-navbar, From 6311e7e3f18ffbc5b5a153ae1a9967c2312ce888 Mon Sep 17 00:00:00 2001 From: mhartington Date: Wed, 10 Feb 2016 13:21:57 -0500 Subject: [PATCH 041/117] docs(slides): update inputs/outputs --- ionic/components/slides/slides.ts | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/ionic/components/slides/slides.ts b/ionic/components/slides/slides.ts index d6bbe87663..85c15ffd91 100644 --- a/ionic/components/slides/slides.ts +++ b/ionic/components/slides/slides.ts @@ -48,16 +48,6 @@ import {Scroll} from '../scroll/scroll'; *}) * *``` - * @property {Boolean} [autoplay] - whether or not the slides should automatically change - * @property {Boolean} [loop] - whether the slides should loop from the last slide back to the first - * @property {Number} [index] - The slide index to start on - * @property {Boolean} [bounce] - whether the slides should bounce - * @property {Boolean} [pager] - Whether the slide should show the page or not - * @property {Any} [options] - Any additional slider options you want to pass - * @property {Number} [zoom] - Whether or not the slider can zoom in or out - * @property {Number} [zoomDuration] - how long it should take to zoom a slide - * @property {Number} [zoomMax] - the max scale an slide can be zoomed - * @property {Any} (change) - expression to evaluate when a slide has been changed * @demo /docs/v2/demos/slides/ * @see {@link /docs/v2/components#slides Slides Component Docs} * @@ -165,52 +155,52 @@ export class Slides extends Ion { /** - * @private + * @input {Bool} whether or not the slides should automatically change */ @Input() autoplay: any; /** - * @private + * @input {Boolean} whether or not the slides should automatically change */ @Input() loop: any; /** - * @private + * @input {Number} The slide index to start on */ @Input() index: any; /** - * @private + * @input {Boolean} whether the slides should bounce */ @Input() bounce: any; /** - * @private + * @input {Boolean} Whether the slide should show the page or not */ @Input() pager: any; /** - * @private + * @input {Any} Any additional slider options you want to pass */ @Input() options: any; /** - * @private + * @input {Number} Whether or not the slider can zoom in or out */ @Input() zoom: any; /** - * @private + * @input {Number} how long it should take to zoom a slide */ @Input() zoomDuration: any; /** - * @private + * @input {Number} the max scale an slide can be zoomed */ @Input() zoomMax: any; /** - * @private + * @output {Any} expression to evaluate when a slide has been changed */ @Output() change: EventEmitter = new EventEmitter(); From ca2881d97d5d245a7870869bb332b1f960a3e6de Mon Sep 17 00:00:00 2001 From: mhartington Date: Wed, 10 Feb 2016 13:28:45 -0500 Subject: [PATCH 042/117] docs(segment): update inputs/outputs --- ionic/components/segment/segment.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ionic/components/segment/segment.ts b/ionic/components/segment/segment.ts index 5c4c6f2d91..43bffdb34d 100644 --- a/ionic/components/segment/segment.ts +++ b/ionic/components/segment/segment.ts @@ -38,8 +38,6 @@ import {isDefined} from '../../util/util'; * * ``` * - * @property {string} [value] - the value of the segment button. Required. - * @property {Any} (select) - expression to evaluate when a segment button has been clicked * * @demo /docs/v2/demos/segment/ * @see {@link /docs/v2/components#segment Segment Component Docs} @@ -59,12 +57,12 @@ import {isDefined} from '../../util/util'; export class SegmentButton { /** - * @private + * @input {String} the value of the segment button. Required. */ @Input() value: string; /** - * @private + * @output {Any} expression to evaluate when a segment button has been clicked */ @Output() select: EventEmitter = new EventEmitter(); @@ -138,7 +136,6 @@ export class SegmentButton { * * ``` * - * @property {Any} (change) - expression to evaluate when a segment button has been changed * * @demo /docs/v2/demos/segment/ * @see {@link /docs/v2/components#segment Segment Component Docs} @@ -156,7 +153,7 @@ export class Segment { /** - * @private + * @output {Any} expression to evaluate when a segment button has been changed */ @Output() change: EventEmitter = new EventEmitter(); From 12c2709559409a358cbb172423c9ec4dbb9e58fb Mon Sep 17 00:00:00 2001 From: mhartington Date: Wed, 10 Feb 2016 13:32:22 -0500 Subject: [PATCH 043/117] docs(checkbox): update inputs/outputs --- ionic/components/checkbox/checkbox.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ionic/components/checkbox/checkbox.ts b/ionic/components/checkbox/checkbox.ts index b7300d8e64..092b21b274 100644 --- a/ionic/components/checkbox/checkbox.ts +++ b/ionic/components/checkbox/checkbox.ts @@ -12,9 +12,6 @@ import {isTrueProperty} from '../../util/util'; * * See the [Angular 2 Docs](https://angular.io/docs/js/latest/api/core/Form-interface.html) for more info on forms and input. * - * @property [checked] - whether or not the checkbox is checked (defaults to false) - * @property [value] - the value of the checkbox component - * @property [disabled] - whether or not the checkbox is disabled or not. * * @usage * ```html @@ -69,7 +66,7 @@ export class Checkbox { id: string; /** - * @private + * @input {String} the value of the checkbox component */ @Input() value: string = ''; @@ -100,7 +97,7 @@ export class Checkbox { } /** - * @private + * @input {Bool} whether or not the checkbox is checked (defaults to false) */ @Input() get checked() { @@ -116,7 +113,7 @@ export class Checkbox { } /** - * @private + * @input {Bool} whether or not the checkbox is disabled or not. */ @Input() get disabled() { From 3170a87b397b66bb982f0bccc9ddae0b0c145945 Mon Sep 17 00:00:00 2001 From: Tim Lancina Date: Wed, 10 Feb 2016 12:39:10 -0600 Subject: [PATCH 044/117] chore(): beta release :tada: --- CHANGELOG.md | 9 +++++++++ package.json | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de016c939b..b9ac72d5b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ + +# 2.0.0-beta.0 + +Enjoy! + +<3 The Ionic Team + + + # [2.0.0-alpha.57](https://github.com/driftyco/ionic/compare/v2.0.0-alpha.56...v2.0.0-alpha.57) (2016-02-10) diff --git a/package.json b/package.json index c58938e945..323357707c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": "true", "name": "ionic2", - "version": "2.0.0-alpha.57", + "version": "2.0.0-beta.0", "license": "Apache-2.0", "repository": { "type": "git", @@ -88,4 +88,4 @@ "path": "node_modules/ionic-cz-conventional-changelog" } } -} \ No newline at end of file +} From 3c5ba4d67e2de0e41e35af9a3a5f7185bdb11bd2 Mon Sep 17 00:00:00 2001 From: mhartington Date: Wed, 10 Feb 2016 14:25:16 -0500 Subject: [PATCH 045/117] docs(radio): update inputs/outputs --- ionic/components/radio/radio-button.ts | 2 +- ionic/components/radio/radio-group.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ionic/components/radio/radio-button.ts b/ionic/components/radio/radio-button.ts index 505dcc25e7..5e3f757c10 100644 --- a/ionic/components/radio/radio-button.ts +++ b/ionic/components/radio/radio-button.ts @@ -58,7 +58,7 @@ export class RadioButton { id: string; /** - * @private + * @output {Any} expression to be evaluated when clicked */ @Output() select: EventEmitter = new EventEmitter(); diff --git a/ionic/components/radio/radio-group.ts b/ionic/components/radio/radio-group.ts index d51331db21..5b570336d2 100644 --- a/ionic/components/radio/radio-group.ts +++ b/ionic/components/radio/radio-group.ts @@ -76,7 +76,7 @@ export class RadioGroup { value; /** - * @private + * @output {Any} expression to be evaluated when selection has been changed */ @Output() change: EventEmitter = new EventEmitter(); From 497d665e4a3b954206d061578ed9ac1d60602ce9 Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Wed, 10 Feb 2016 14:55:44 -0600 Subject: [PATCH 046/117] test(label): remove label test closes #5391 --- ionic/components/label/test/basic/index.ts | 10 ---------- ionic/components/label/test/basic/main.html | 13 ------------- 2 files changed, 23 deletions(-) delete mode 100644 ionic/components/label/test/basic/index.ts delete mode 100644 ionic/components/label/test/basic/main.html diff --git a/ionic/components/label/test/basic/index.ts b/ionic/components/label/test/basic/index.ts deleted file mode 100644 index ac2d757460..0000000000 --- a/ionic/components/label/test/basic/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -import {App} from 'ionic/ionic'; - - -@App({ - templateUrl: 'main.html' -}) -class E2EApp { - constructor() { - } -} diff --git a/ionic/components/label/test/basic/main.html b/ionic/components/label/test/basic/main.html deleted file mode 100644 index b57fb20282..0000000000 --- a/ionic/components/label/test/basic/main.html +++ /dev/null @@ -1,13 +0,0 @@ - - - Icons - - - - - - Username - - - - From db535dd2c4a1e2847d8012c67d10cc0cc3d69fbc Mon Sep 17 00:00:00 2001 From: "Manu Mtz.-Almeida" Date: Wed, 10 Feb 2016 22:58:50 +0100 Subject: [PATCH 047/117] fix(toolbar): toolbar padding when running in cordova iOS --- ionic/platform/cordova.ios.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ionic/platform/cordova.ios.scss b/ionic/platform/cordova.ios.scss index c07eb2a8a7..71587b9a8b 100644 --- a/ionic/platform/cordova.ios.scss +++ b/ionic/platform/cordova.ios.scss @@ -15,7 +15,7 @@ $cordova-ios-toolbar-padding: 20px !default; ion-navbar ion-title, ion-navbar ion-segment, { - padding-top: $cordova-ios-toolbar-padding - $toolbar-ios-padding; + padding-top: $cordova-ios-toolbar-padding; } ion-navbar, @@ -30,7 +30,7 @@ $cordova-ios-toolbar-padding: 20px !default; ion-page.modal > ion-toolbar:first-child ion-segment, { min-height: $toolbar-ios-height + $cordova-ios-toolbar-padding; height: $toolbar-ios-height + $cordova-ios-toolbar-padding; - padding-top: $cordova-ios-toolbar-padding; + padding-top: $toolbar-ios-padding + $cordova-ios-toolbar-padding; } } From 2df115b1e32551b65bd4f135d297ec0cb279d075 Mon Sep 17 00:00:00 2001 From: Juan Ignacio Donoso Date: Wed, 10 Feb 2016 17:14:23 -0500 Subject: [PATCH 048/117] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index eb30dde795..3bc3426ac3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) -# Ionic 2: Alpha +# Ionic 2: Beta Ionic 2 is the next generation of [Ionic](http://ionicframework.com/), the open-source mobile app development SDK that makes it easy to build top quality mobile apps with web technologies. From 0e5d3d7d76240f43d993aa44cd4acbf6cd8c7a77 Mon Sep 17 00:00:00 2001 From: Jose Zamudio Date: Wed, 10 Feb 2016 15:54:51 -0800 Subject: [PATCH 049/117] fix(button): button goes transparent on hover on desktop (non-touch devices) --- ionic/components/button/button.md.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ionic/components/button/button.md.scss b/ionic/components/button/button.md.scss index 90c56d28b9..8dcc53a3ca 100644 --- a/ionic/components/button/button.md.scss +++ b/ionic/components/button/button.md.scss @@ -58,7 +58,7 @@ $button-md-small-icon-font-size: 1.4em !default; color $button-md-transition-duration $button-md-animation-curve; &:hover:not(.disable-hover) { - background-color: $button-md-clear-hover-background-color; + background-color: $button-md-color; } &.activated { @@ -198,7 +198,7 @@ $button-md-small-icon-font-size: 1.4em !default; } &:hover:not(.disable-hover) { - color: $button-md-color; + background-color: $button-md-clear-hover-background-color; } ion-button-effect { From 8314ad25c23be33243cddd93b690bb71e42fd6f5 Mon Sep 17 00:00:00 2001 From: perry Date: Thu, 11 Feb 2016 11:02:33 -0600 Subject: [PATCH 050/117] chore(dgeni): re-adding instance methods to docgen --- scripts/docs/processors/collect-inputs-outputs.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/scripts/docs/processors/collect-inputs-outputs.js b/scripts/docs/processors/collect-inputs-outputs.js index b8b2af97ac..f92c14ce23 100644 --- a/scripts/docs/processors/collect-inputs-outputs.js +++ b/scripts/docs/processors/collect-inputs-outputs.js @@ -4,14 +4,6 @@ module.exports = function collectInputsOutputs() { $runBefore: ['rendering-docs'], $process: function(docs) { docs.forEach(function(doc) { - // if (doc.members && doc.name == "Searchbar"){ - // console.log(doc.exportSymbol.members.hideCancelButton.valueDeclaration.decorators[0].expression.expression); - // doc.members.forEach(function(method){ - // if (method.name === "load") { - // console.log(method); - // } - // }) - // } if (doc.members && doc.members.length) { var members = []; @@ -36,6 +28,8 @@ module.exports = function collectInputsOutputs() { } // not an input or output, must be a plain member members.push(doc.members[i]); + } else { + members.push(doc.members[i]); }; } From d958085c03d20e92e0149ec2accb89ec774a7dde Mon Sep 17 00:00:00 2001 From: mhartington Date: Thu, 11 Feb 2016 12:23:07 -0500 Subject: [PATCH 051/117] docs(navPush): add input docs --- ionic/components/nav/nav-push.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ionic/components/nav/nav-push.ts b/ionic/components/nav/nav-push.ts index 8a18e821e3..4601ae8333 100644 --- a/ionic/components/nav/nav-push.ts +++ b/ionic/components/nav/nav-push.ts @@ -50,7 +50,15 @@ import {NavRegistry} from './nav-registry'; } }) export class NavPush { + + /** + * @input {Page} the page you want to push + */ @Input() navPush; + + /** + * @input {Any} Any parameters you want to pass along + */ @Input() navParams; constructor( From 2df72ccda33e7376d393b9e8a82ec1aaee58f57f Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Thu, 11 Feb 2016 11:36:37 -0600 Subject: [PATCH 052/117] fix(button): fix colorized buttons on hover and outline buttons on hover references #5403 --- ionic/components/button/button.md.scss | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ionic/components/button/button.md.scss b/ionic/components/button/button.md.scss index 8dcc53a3ca..18cc26ed72 100644 --- a/ionic/components/button/button.md.scss +++ b/ionic/components/button/button.md.scss @@ -85,6 +85,10 @@ $button-md-small-icon-font-size: 1.4em !default; color: $fg-color; background-color: $bg-color; + &:hover:not(.disable-hover) { + background-color: $bg-color; + } + &.activated { opacity: 1; background-color: $bg-color-activated; @@ -147,6 +151,10 @@ $button-md-small-icon-font-size: 1.4em !default; color: $button-md-color; box-shadow: none; + &:hover:not(.disable-hover) { + background-color: $button-md-clear-hover-background-color; + } + &.activated { opacity: 1; box-shadow: none; @@ -170,6 +178,10 @@ $button-md-small-icon-font-size: 1.4em !default; background-color: transparent; color: $fg-color; + &:hover:not(.disable-hover) { + background-color: $button-md-clear-hover-background-color; + } + &.activated { background-color: transparent; } From 74c8d6a2a9900535fdaf8670ec8b3c3245548bf8 Mon Sep 17 00:00:00 2001 From: perry Date: Thu, 11 Feb 2016 11:48:04 -0600 Subject: [PATCH 053/117] formatting output events --- scripts/docs/templates/common.template.html | 25 ++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/scripts/docs/templates/common.template.html b/scripts/docs/templates/common.template.html index 4c3227f499..eb386a41f1 100644 --- a/scripts/docs/templates/common.template.html +++ b/scripts/docs/templates/common.template.html @@ -78,6 +78,25 @@ angular_controller: APIDemoCtrl <@ endif @> <@- endmacro -@> +<@ macro outputTable(params, isDirective) -@> + + + + + + + + + <@ for param in params @> + + + + + <@ endfor @> + +
AttrDetails
<$ param.name $><$ param.description | marked $>
+<@- endmacro -@> + <@- macro functionSyntax(fn) @> <@- set sep = joiner(', ') -@> <$ fn.name $>(<@- for param in fn.params @><$ sep() $> @@ -267,14 +286,14 @@ Improve this doc <@- if doc.inputs and doc.inputs.length @> -

Element Input Attributes

+

Input Properties

<$ inputTable(doc.inputs) $> <@- endif -@> <@- if doc.outputs and doc.outputs.length @> -

Element Output Attributes

-<$ inputTable(doc.outputs) $> +

Output Events

+<$ outputTable(doc.outputs) $> <@- endif -@> From 569beabbf13f4dbba0f4cf6402b7fc550630f7ca Mon Sep 17 00:00:00 2001 From: Matheus Cruz Rocha Date: Thu, 11 Feb 2016 18:37:23 -0300 Subject: [PATCH 054/117] feat(Themes): md toggle dark theme This commit overrides the toggle handle background color for MD dark theme --- ionic/themes/dark.md.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ionic/themes/dark.md.scss b/ionic/themes/dark.md.scss index c3ed5285b5..c9dcd70ce6 100644 --- a/ionic/themes/dark.md.scss +++ b/ionic/themes/dark.md.scss @@ -48,6 +48,10 @@ $item-md-padding-media-bottom: 9px !default; $item-md-padding-icon-top: 11px !default; $item-md-padding-icon-bottom: 10px !default; +// Material Design Toggle +// --------------------------------------------------- +$toggle-md-handle-background-color-off: map-get($colors-md, light) !default; + // Ripple Color // -------------------------------------------------- From eb8e778473481ac122fc683c4a62a3d86eb24a93 Mon Sep 17 00:00:00 2001 From: Matheus Cruz Rocha Date: Thu, 11 Feb 2016 19:15:12 -0300 Subject: [PATCH 055/117] feat(Themes): md dark theme item-divider Overriding color of item-divider for material design dark theme --- ionic/themes/dark.md.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ionic/themes/dark.md.scss b/ionic/themes/dark.md.scss index c9dcd70ce6..aa62475dc3 100644 --- a/ionic/themes/dark.md.scss +++ b/ionic/themes/dark.md.scss @@ -47,6 +47,8 @@ $item-md-padding-media-top: 9px !default; $item-md-padding-media-bottom: 9px !default; $item-md-padding-icon-top: 11px !default; $item-md-padding-icon-bottom: 10px !default; +$item-md-divider-bg: #151515 !default; +$item-md-divider-color: map-get($colors-md, light) !default; // Material Design Toggle // --------------------------------------------------- From bcaa4841c439c7dbca48a46c632d3ff2c6206362 Mon Sep 17 00:00:00 2001 From: Matheus Cruz Rocha Date: Thu, 11 Feb 2016 19:16:22 -0300 Subject: [PATCH 056/117] feat(Themes): md outer content dark theme Overriding background color of outer content for material design dark theme --- ionic/themes/dark.md.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ionic/themes/dark.md.scss b/ionic/themes/dark.md.scss index aa62475dc3..165e64bfa7 100644 --- a/ionic/themes/dark.md.scss +++ b/ionic/themes/dark.md.scss @@ -16,6 +16,10 @@ $font-family-md-base: "Roboto", "Helvetica Neue", sans-serif !de $font-size-md-base: $font-size-base !default; +// Material Design Outer content +// -------------------------------------------------- +$outer-content-md-background-color: $background-color !default; + // Material Design Toolbar // -------------------------------------------------- From 3dbd9a992e4b75dee8a987056bf0d27795c4eb8d Mon Sep 17 00:00:00 2001 From: Matheus Cruz Rocha Date: Thu, 11 Feb 2016 19:17:07 -0300 Subject: [PATCH 057/117] feat(Themes): md cards dark theme Creating dark theme for Material Design cards --- ionic/themes/dark.md.scss | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ionic/themes/dark.md.scss b/ionic/themes/dark.md.scss index 165e64bfa7..0d537c4315 100644 --- a/ionic/themes/dark.md.scss +++ b/ionic/themes/dark.md.scss @@ -30,6 +30,12 @@ $toolbar-md-active-color: $toolbar-active-color !default; $toolbar-md-inactive-color: $toolbar-inactive-color !default; $toolbar-md-button-color: #424242 !default; +// Material Design Card +// -------------------------------------------------- + +$card-md-header-color: #ddd !default; +$card-md-title-text-color: #fff !default; +$card-md-text-color: #ddd !default; // Material Design List // -------------------------------------------------- @@ -37,7 +43,7 @@ $toolbar-md-button-color: #424242 !default; $list-md-text-color: $list-text-color !default; $list-md-border-color: #dedede !default; $list-md-background-color: $list-background-color !default; -$list-md-activated-background-color: #f1f1f1 !default; +$list-md-activated-background-color: #d9d9d9 !default; // Material Design Item From 7eb7952849dfaf9048e36f06dfb211cdfbad925e Mon Sep 17 00:00:00 2001 From: Matheus Cruz Rocha Date: Thu, 11 Feb 2016 19:21:31 -0300 Subject: [PATCH 058/117] feat(Theme): md toolbar dark theme Changing text default color on toolbar for Material Design dark theme --- ionic/themes/dark.md.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ionic/themes/dark.md.scss b/ionic/themes/dark.md.scss index 0d537c4315..8041a23f22 100644 --- a/ionic/themes/dark.md.scss +++ b/ionic/themes/dark.md.scss @@ -25,7 +25,7 @@ $outer-content-md-background-color: $background-color !default; $toolbar-md-background: $toolbar-background !default; $toolbar-md-border-color: $toolbar-border-color !default; -$toolbar-md-text-color: #424242 !default; +$toolbar-md-text-color: #fff !default; $toolbar-md-active-color: $toolbar-active-color !default; $toolbar-md-inactive-color: $toolbar-inactive-color !default; $toolbar-md-button-color: #424242 !default; From 3ee5bd3d0313758e3c86956bca982043094a5fee Mon Sep 17 00:00:00 2001 From: Matheus Cruz Rocha Date: Thu, 11 Feb 2016 19:26:13 -0300 Subject: [PATCH 059/117] feat(Themes): dark theme Changing default primary and secondary color for dark theme --- ionic/themes/dark.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ionic/themes/dark.scss b/ionic/themes/dark.scss index 9883e6f02e..be9df7aefa 100644 --- a/ionic/themes/dark.scss +++ b/ionic/themes/dark.scss @@ -6,8 +6,8 @@ $colors: ( - primary: #3498DB, - secondary: #00B16A, + primary: #007AFF, + secondary: #32db64, danger: #D91E18, light: #f4f4f4, dark: #222, From e2554f090f5750e5897bdc2f35d3ac60357bfc62 Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Thu, 11 Feb 2016 21:15:52 -0600 Subject: [PATCH 060/117] fix(input): fix stand-alone text-input item cover Closes #5387 --- ionic/components/input/input.scss | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ionic/components/input/input.scss b/ionic/components/input/input.scss index e41563a460..e589b2f17a 100644 --- a/ionic/components/input/input.scss +++ b/ionic/components/input/input.scss @@ -5,12 +5,18 @@ ion-input, ion-textarea { + position: relative; display: block; flex: 1; width: 100%; } +.item-input ion-input, +.item-input ion-textarea { + position: static; +} + // Textarea Within An Item // -------------------------------------------------- From 38595fa98203ea13ef82f4d33d15d8d7fed1d912 Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Thu, 11 Feb 2016 21:38:34 -0600 Subject: [PATCH 061/117] fix(input): make ion-label tappable to focus input closes #5378 --- ionic/components/input/input.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ionic/components/input/input.ts b/ionic/components/input/input.ts index e45406d2c6..64d8655495 100644 --- a/ionic/components/input/input.ts +++ b/ionic/components/input/input.ts @@ -129,14 +129,14 @@ export class TextInput extends InputBase { *
* ``` * - * @demo /docs/v2/demos/textarea/ + * @demo /docs/v2/demos/textarea/ */ @Component({ selector: 'ion-textarea', template: '' + '' + - '
', + '
', directives: [ NgIf, NextInput, From d1808f9dd10fab7c0f835efab510839f349bdde8 Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Thu, 11 Feb 2016 21:48:52 -0600 Subject: [PATCH 062/117] chore(upgrade): upgrade to angular 2.0.0-beta.6 --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 323357707c..21c30b7368 100644 --- a/package.json +++ b/package.json @@ -13,10 +13,10 @@ "link": "npm install && gulp src && npm link" }, "dependencies": { - "angular2": "2.0.0-beta.2", + "angular2": "2.0.0-beta.6", "colors": "^1.1.2", "es6-promise": "^3.0.2", - "es6-shim": "0.33.6", + "es6-shim": "^0.33.6", "inquirer": "0.11.0", "ionicons": "3.0.0-alpha.3", "lodash": "3.10.1", @@ -24,7 +24,7 @@ "q": "1.4.1", "reflect-metadata": "0.1.2", "rxjs": "5.0.0-beta.0", - "zone.js": "0.5.10" + "zone.js": "0.5.14" }, "devDependencies": { "canonical-path": "0.0.2", From 89861e0e6139de60204addc8b9ec6361859242aa Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Thu, 11 Feb 2016 22:12:02 -0600 Subject: [PATCH 063/117] fix(radio): radio w/ falsy value not checkable Closes #5348 --- ionic/components/radio/radio-group.ts | 2 +- ionic/components/radio/test/basic/index.ts | 7 +++++++ ionic/components/radio/test/basic/main.html | 14 ++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/ionic/components/radio/radio-group.ts b/ionic/components/radio/radio-group.ts index 5b570336d2..9965891135 100644 --- a/ionic/components/radio/radio-group.ts +++ b/ionic/components/radio/radio-group.ts @@ -103,7 +103,7 @@ export class RadioGroup { let oldVal = this.value; // set the radiogroup's value - this.value = val || ''; + this.value = isDefined(val) ? val : ''; this.updateValue(); diff --git a/ionic/components/radio/test/basic/index.ts b/ionic/components/radio/test/basic/index.ts index 87116f9695..17887cecd5 100644 --- a/ionic/components/radio/test/basic/index.ts +++ b/ionic/components/radio/test/basic/index.ts @@ -34,6 +34,13 @@ class E2EApp { this.relationship = 'enemies'; + + this.items = [ + { description: 'value undefined', value: undefined }, + { description: 'value false string', value: 'false' }, + { description: 'value false boolean', value: false }, + { description: 'value 0', value: 0 }, + ]; } setApple() { diff --git a/ionic/components/radio/test/basic/main.html b/ionic/components/radio/test/basic/main.html index 5000028ecb..2fbfc97e49 100644 --- a/ionic/components/radio/test/basic/main.html +++ b/ionic/components/radio/test/basic/main.html @@ -99,4 +99,18 @@ pet: {{pet}} + + + + {{ item.description }} + +​ + + + + +
+ someNumber: {{someNumber}} +
+
From 576ffa5cc17f8441526a35dba9a4f8d6b8ea34fd Mon Sep 17 00:00:00 2001 From: Nikhil Dev Date: Fri, 12 Feb 2016 16:13:35 +0530 Subject: [PATCH 064/117] Update config.ts md should be a string for mode --- ionic/config/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ionic/config/config.ts b/ionic/config/config.ts index 09ce30a5cf..ea1c4295b0 100644 --- a/ionic/config/config.ts +++ b/ionic/config/config.ts @@ -35,7 +35,7 @@ import {isObject, isDefined, isFunction, isArray} from '../util/util'; * @App({ * template: `` * config: { - * mode: md + * mode: 'md' * } * }) * ``` From 2dacac2186d68f20df78b39952eac41fb7d40abb Mon Sep 17 00:00:00 2001 From: Tim Lancina Date: Fri, 12 Feb 2016 09:41:29 -0600 Subject: [PATCH 065/117] chore(prerelease): change prerelease type to beta --- gulpfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 56cbab1324..49004fabd2 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -709,7 +709,7 @@ gulp.task('prepare', function(){ //Update package.json version var packageJSON = require('./package.json'); - packageJSON.version = semver.inc(packageJSON.version, 'prerelease', 'alpha'); + packageJSON.version = semver.inc(packageJSON.version, 'prerelease', 'beta'); fs.writeFileSync('package.json', JSON.stringify(packageJSON, null, 2)); //Update changelog From 5f254f285fbceddc8271b01aa00c8e1e826abfc3 Mon Sep 17 00:00:00 2001 From: Tim Lancina Date: Fri, 12 Feb 2016 11:37:39 -0600 Subject: [PATCH 066/117] chore(e2e): make typescript and e2e friends --- ionic/components/action-sheet/test/basic/index.ts | 2 +- ionic/components/alert/test/basic/index.ts | 2 +- ionic/components/app/test/animations/index.ts | 2 +- ionic/components/app/test/storage/index.ts | 2 +- ionic/components/app/test/typography/index.ts | 2 +- ionic/components/badge/test/basic/index.ts | 2 +- ionic/components/blur/test/basic/index.ts | 2 +- ionic/components/button/test/basic/index.ts | 2 +- ionic/components/button/test/block/index.ts | 2 +- ionic/components/button/test/clear/index.ts | 2 +- ionic/components/button/test/fab/index.ts | 2 +- ionic/components/button/test/full/index.ts | 2 +- ionic/components/button/test/icons/index.ts | 2 +- ionic/components/button/test/outline/index.ts | 2 +- ionic/components/button/test/round/index.ts | 2 +- ionic/components/button/test/sizes/index.ts | 2 +- ionic/components/card/test/advanced/index.ts | 2 +- ionic/components/card/test/basic/index.ts | 2 +- ionic/components/card/test/images/index.ts | 2 +- ionic/components/card/test/list/index.ts | 2 +- ionic/components/card/test/map/index.ts | 2 +- ionic/components/card/test/social/index.ts | 2 +- ionic/components/checkbox/test/basic/index.ts | 2 +- ionic/components/chip/test/basic/index.ts | 2 +- ionic/components/chip/test/delete/index.ts | 2 +- ionic/components/chip/test/icon/index.ts | 2 +- ionic/components/chip/test/image/index.ts | 2 +- ionic/components/grid/test/alignment/index.ts | 2 +- ionic/components/grid/test/basic/index.ts | 2 +- ionic/components/grid/test/full/index.ts | 2 +- ionic/components/icon/test/basic/index.ts | 2 +- ionic/components/input/test/fixed-inline-labels/index.ts | 2 +- ionic/components/input/test/floating-labels/index.ts | 2 +- ionic/components/input/test/form-inputs/index.ts | 2 +- ionic/components/input/test/inline-labels/index.ts | 2 +- ionic/components/input/test/input-focus/index.ts | 2 +- ionic/components/input/test/inset-inputs/index.ts | 2 +- ionic/components/input/test/placeholder-labels/index.ts | 2 +- ionic/components/input/test/stacked-labels/index.ts | 2 +- ionic/components/item/test/buttons/index.ts | 2 +- ionic/components/item/test/dividers/index.ts | 2 +- ionic/components/item/test/groups/index.ts | 2 +- ionic/components/item/test/images/index.ts | 2 +- ionic/components/item/test/media/index.ts | 2 +- ionic/components/item/test/sliding/index.ts | 2 +- ionic/components/item/test/text/index.ts | 2 +- ionic/components/list/test/headers/index.ts | 2 +- ionic/components/list/test/infinite/index.ts | 2 +- ionic/components/list/test/inset/index.ts | 2 +- ionic/components/list/test/no-lines/index.ts | 2 +- ionic/components/list/test/repeat-headers/index.ts | 2 +- ionic/components/list/test/sticky/index.ts | 2 +- ionic/components/menu/test/basic/index.ts | 2 +- ionic/components/menu/test/disable-swipe/index.ts | 2 +- ionic/components/menu/test/multiple/index.ts | 2 +- ionic/components/menu/test/overlay/index.ts | 2 +- ionic/components/menu/test/push/index.ts | 2 +- ionic/components/menu/test/reveal/index.ts | 2 +- ionic/components/modal/test/basic/index.ts | 4 ++-- ionic/components/nav/test/basic/index.ts | 6 +++--- ionic/components/nav/test/insert-views/index.ts | 2 +- ionic/components/nav/test/nested/index.ts | 4 ++-- ionic/components/nav/test/routing/index.ts | 2 +- ionic/components/radio/test/basic/index.ts | 2 +- ionic/components/scroll/test/basic/index.ts | 2 +- ionic/components/scroll/test/pull-to-refresh/index.ts | 2 +- ionic/components/searchbar/test/floating/index.ts | 2 +- ionic/components/searchbar/test/nav/index.ts | 2 +- ionic/components/searchbar/test/toolbar/index.ts | 2 +- ionic/components/segment/test/basic/index.ts | 2 +- ionic/components/segment/test/nav/index.ts | 2 +- ionic/components/segment/test/swipe/index.ts | 3 +-- ionic/components/select/test/multiple-value/index.ts | 2 +- ionic/components/select/test/single-value/index.ts | 2 +- ionic/components/show-hide-when/test/basic/index.ts | 2 +- ionic/components/slides/test/basic/index.ts | 2 +- ionic/components/slides/test/intro/index.ts | 2 +- ionic/components/slides/test/loop/index.ts | 2 +- ionic/components/slides/test/scroll/index.ts | 2 +- ionic/components/tabs/test/advanced/index.ts | 2 +- ionic/components/tabs/test/badges/index.ts | 2 +- ionic/components/tabs/test/basic/index.ts | 2 +- ionic/components/tabs/test/ghost/index.ts | 2 +- ionic/components/tabs/test/tab-bar-scenarios/index.ts | 2 +- ionic/components/toggle/test/basic/index.ts | 2 +- ionic/components/toolbar/test/colors/index.ts | 2 +- ionic/components/toolbar/test/scenarios/index.ts | 2 +- scripts/e2e/e2e.template.html | 9 +++++++++ tsconfig.json | 3 --- 89 files changed, 100 insertions(+), 95 deletions(-) diff --git a/ionic/components/action-sheet/test/basic/index.ts b/ionic/components/action-sheet/test/basic/index.ts index 0c86f08c4b..134d6258f1 100644 --- a/ionic/components/action-sheet/test/basic/index.ts +++ b/ionic/components/action-sheet/test/basic/index.ts @@ -1,4 +1,4 @@ -import {App, Page, ActionSheet, NavController} from 'ionic/ionic'; +import {App, Page, ActionSheet, NavController} from '../../../../../ionic/ionic'; @Page({ diff --git a/ionic/components/alert/test/basic/index.ts b/ionic/components/alert/test/basic/index.ts index cef1da39b3..910ba4243b 100644 --- a/ionic/components/alert/test/basic/index.ts +++ b/ionic/components/alert/test/basic/index.ts @@ -1,4 +1,4 @@ -import {App, Page, Alert, NavController} from 'ionic/ionic'; +import {App, Page, Alert, NavController} from '../../../../../ionic/ionic'; @Page({ diff --git a/ionic/components/app/test/animations/index.ts b/ionic/components/app/test/animations/index.ts index 0cd0ff07ff..28e529ad7b 100644 --- a/ionic/components/app/test/animations/index.ts +++ b/ionic/components/app/test/animations/index.ts @@ -1,4 +1,4 @@ -import {App, Page, Animation} from 'ionic/ionic'; +import {App, Page, Animation} from '../../../../../ionic/ionic'; @Page({ diff --git a/ionic/components/app/test/storage/index.ts b/ionic/components/app/test/storage/index.ts index 0c60345a83..ad60d39f86 100644 --- a/ionic/components/app/test/storage/index.ts +++ b/ionic/components/app/test/storage/index.ts @@ -1,7 +1,7 @@ import {Component} from 'angular2/core'; import {Control, ControlGroup} from 'angular2/common'; -import {App, Storage, LocalStorage, SqlStorage} from 'ionic/ionic'; +import {App, Storage, LocalStorage, SqlStorage} from '../../../../../ionic/ionic'; @App({ templateUrl: 'main.html' diff --git a/ionic/components/app/test/typography/index.ts b/ionic/components/app/test/typography/index.ts index ff6f299c59..c77689fd38 100644 --- a/ionic/components/app/test/typography/index.ts +++ b/ionic/components/app/test/typography/index.ts @@ -1,4 +1,4 @@ -import {App, IonicApp} from 'ionic/ionic'; +import {App, IonicApp} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/badge/test/basic/index.ts b/ionic/components/badge/test/basic/index.ts index 2dd534c468..b4a0c315f8 100644 --- a/ionic/components/badge/test/basic/index.ts +++ b/ionic/components/badge/test/basic/index.ts @@ -1,4 +1,4 @@ -import {App, IonicApp} from 'ionic/ionic'; +import {App, IonicApp} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/blur/test/basic/index.ts b/ionic/components/blur/test/basic/index.ts index ac2d757460..bc32179fee 100644 --- a/ionic/components/blur/test/basic/index.ts +++ b/ionic/components/blur/test/basic/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/button/test/basic/index.ts b/ionic/components/button/test/basic/index.ts index 01b30a6221..0619a93f8d 100644 --- a/ionic/components/button/test/basic/index.ts +++ b/ionic/components/button/test/basic/index.ts @@ -1,4 +1,4 @@ -import {App, IonicApp} from 'ionic/ionic'; +import {App, IonicApp} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/button/test/block/index.ts b/ionic/components/button/test/block/index.ts index 43aed36502..6a30176f2a 100644 --- a/ionic/components/button/test/block/index.ts +++ b/ionic/components/button/test/block/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/button/test/clear/index.ts b/ionic/components/button/test/clear/index.ts index 43aed36502..6a30176f2a 100644 --- a/ionic/components/button/test/clear/index.ts +++ b/ionic/components/button/test/clear/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/button/test/fab/index.ts b/ionic/components/button/test/fab/index.ts index 43aed36502..6a30176f2a 100644 --- a/ionic/components/button/test/fab/index.ts +++ b/ionic/components/button/test/fab/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/button/test/full/index.ts b/ionic/components/button/test/full/index.ts index 43aed36502..6a30176f2a 100644 --- a/ionic/components/button/test/full/index.ts +++ b/ionic/components/button/test/full/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/button/test/icons/index.ts b/ionic/components/button/test/icons/index.ts index 43aed36502..6a30176f2a 100644 --- a/ionic/components/button/test/icons/index.ts +++ b/ionic/components/button/test/icons/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/button/test/outline/index.ts b/ionic/components/button/test/outline/index.ts index 43aed36502..6a30176f2a 100644 --- a/ionic/components/button/test/outline/index.ts +++ b/ionic/components/button/test/outline/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/button/test/round/index.ts b/ionic/components/button/test/round/index.ts index 43aed36502..6a30176f2a 100644 --- a/ionic/components/button/test/round/index.ts +++ b/ionic/components/button/test/round/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/button/test/sizes/index.ts b/ionic/components/button/test/sizes/index.ts index 43aed36502..6a30176f2a 100644 --- a/ionic/components/button/test/sizes/index.ts +++ b/ionic/components/button/test/sizes/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/card/test/advanced/index.ts b/ionic/components/card/test/advanced/index.ts index 43aed36502..6a30176f2a 100644 --- a/ionic/components/card/test/advanced/index.ts +++ b/ionic/components/card/test/advanced/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/card/test/basic/index.ts b/ionic/components/card/test/basic/index.ts index 43aed36502..6a30176f2a 100644 --- a/ionic/components/card/test/basic/index.ts +++ b/ionic/components/card/test/basic/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/card/test/images/index.ts b/ionic/components/card/test/images/index.ts index 43aed36502..6a30176f2a 100644 --- a/ionic/components/card/test/images/index.ts +++ b/ionic/components/card/test/images/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/card/test/list/index.ts b/ionic/components/card/test/list/index.ts index 43aed36502..6a30176f2a 100644 --- a/ionic/components/card/test/list/index.ts +++ b/ionic/components/card/test/list/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/card/test/map/index.ts b/ionic/components/card/test/map/index.ts index 43aed36502..6a30176f2a 100644 --- a/ionic/components/card/test/map/index.ts +++ b/ionic/components/card/test/map/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/card/test/social/index.ts b/ionic/components/card/test/social/index.ts index 43aed36502..6a30176f2a 100644 --- a/ionic/components/card/test/social/index.ts +++ b/ionic/components/card/test/social/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/checkbox/test/basic/index.ts b/ionic/components/checkbox/test/basic/index.ts index f25c1e455d..cbdcaac68f 100644 --- a/ionic/components/checkbox/test/basic/index.ts +++ b/ionic/components/checkbox/test/basic/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; import { Control, ControlGroup, diff --git a/ionic/components/chip/test/basic/index.ts b/ionic/components/chip/test/basic/index.ts index 2dd534c468..b4a0c315f8 100644 --- a/ionic/components/chip/test/basic/index.ts +++ b/ionic/components/chip/test/basic/index.ts @@ -1,4 +1,4 @@ -import {App, IonicApp} from 'ionic/ionic'; +import {App, IonicApp} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/chip/test/delete/index.ts b/ionic/components/chip/test/delete/index.ts index e86f128fb0..c35cc11fbc 100644 --- a/ionic/components/chip/test/delete/index.ts +++ b/ionic/components/chip/test/delete/index.ts @@ -1,4 +1,4 @@ -import {App, IonicApp} from 'ionic/ionic'; +import {App, IonicApp} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/chip/test/icon/index.ts b/ionic/components/chip/test/icon/index.ts index 2dd534c468..b4a0c315f8 100644 --- a/ionic/components/chip/test/icon/index.ts +++ b/ionic/components/chip/test/icon/index.ts @@ -1,4 +1,4 @@ -import {App, IonicApp} from 'ionic/ionic'; +import {App, IonicApp} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/chip/test/image/index.ts b/ionic/components/chip/test/image/index.ts index 2dd534c468..b4a0c315f8 100644 --- a/ionic/components/chip/test/image/index.ts +++ b/ionic/components/chip/test/image/index.ts @@ -1,4 +1,4 @@ -import {App, IonicApp} from 'ionic/ionic'; +import {App, IonicApp} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/grid/test/alignment/index.ts b/ionic/components/grid/test/alignment/index.ts index 43aed36502..6a30176f2a 100644 --- a/ionic/components/grid/test/alignment/index.ts +++ b/ionic/components/grid/test/alignment/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/grid/test/basic/index.ts b/ionic/components/grid/test/basic/index.ts index 43aed36502..6a30176f2a 100644 --- a/ionic/components/grid/test/basic/index.ts +++ b/ionic/components/grid/test/basic/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/grid/test/full/index.ts b/ionic/components/grid/test/full/index.ts index 43aed36502..6a30176f2a 100644 --- a/ionic/components/grid/test/full/index.ts +++ b/ionic/components/grid/test/full/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/icon/test/basic/index.ts b/ionic/components/icon/test/basic/index.ts index 13798b4acc..e390fb7f11 100644 --- a/ionic/components/icon/test/basic/index.ts +++ b/ionic/components/icon/test/basic/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/input/test/fixed-inline-labels/index.ts b/ionic/components/input/test/fixed-inline-labels/index.ts index 82ea1a071b..bb337d3a10 100644 --- a/ionic/components/input/test/fixed-inline-labels/index.ts +++ b/ionic/components/input/test/fixed-inline-labels/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/input/test/floating-labels/index.ts b/ionic/components/input/test/floating-labels/index.ts index a5b58ac16d..35e138caf5 100644 --- a/ionic/components/input/test/floating-labels/index.ts +++ b/ionic/components/input/test/floating-labels/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/input/test/form-inputs/index.ts b/ionic/components/input/test/form-inputs/index.ts index 0a4f0fd1e2..1c48bec6eb 100644 --- a/ionic/components/input/test/form-inputs/index.ts +++ b/ionic/components/input/test/form-inputs/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; import {FormBuilder, Validators} from 'angular2/common'; diff --git a/ionic/components/input/test/inline-labels/index.ts b/ionic/components/input/test/inline-labels/index.ts index a9bdbc8a78..7c1848b72b 100644 --- a/ionic/components/input/test/inline-labels/index.ts +++ b/ionic/components/input/test/inline-labels/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/input/test/input-focus/index.ts b/ionic/components/input/test/input-focus/index.ts index b8a6ae0b86..f6216ae6b9 100644 --- a/ionic/components/input/test/input-focus/index.ts +++ b/ionic/components/input/test/input-focus/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/input/test/inset-inputs/index.ts b/ionic/components/input/test/inset-inputs/index.ts index 43aed36502..6a30176f2a 100644 --- a/ionic/components/input/test/inset-inputs/index.ts +++ b/ionic/components/input/test/inset-inputs/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/input/test/placeholder-labels/index.ts b/ionic/components/input/test/placeholder-labels/index.ts index 43aed36502..6a30176f2a 100644 --- a/ionic/components/input/test/placeholder-labels/index.ts +++ b/ionic/components/input/test/placeholder-labels/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/input/test/stacked-labels/index.ts b/ionic/components/input/test/stacked-labels/index.ts index 43aed36502..6a30176f2a 100644 --- a/ionic/components/input/test/stacked-labels/index.ts +++ b/ionic/components/input/test/stacked-labels/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/item/test/buttons/index.ts b/ionic/components/item/test/buttons/index.ts index 2afa53ee3b..1759142cf0 100644 --- a/ionic/components/item/test/buttons/index.ts +++ b/ionic/components/item/test/buttons/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/item/test/dividers/index.ts b/ionic/components/item/test/dividers/index.ts index 43aed36502..6a30176f2a 100644 --- a/ionic/components/item/test/dividers/index.ts +++ b/ionic/components/item/test/dividers/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/item/test/groups/index.ts b/ionic/components/item/test/groups/index.ts index 806adf048d..40545aad83 100644 --- a/ionic/components/item/test/groups/index.ts +++ b/ionic/components/item/test/groups/index.ts @@ -1,4 +1,4 @@ -import {App, Page, NavController, NavParams} from 'ionic/ionic'; +import {App, Page, NavController, NavParams} from '../../../../../ionic/ionic'; @Page({ diff --git a/ionic/components/item/test/images/index.ts b/ionic/components/item/test/images/index.ts index 43aed36502..6a30176f2a 100644 --- a/ionic/components/item/test/images/index.ts +++ b/ionic/components/item/test/images/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/item/test/media/index.ts b/ionic/components/item/test/media/index.ts index 43aed36502..6a30176f2a 100644 --- a/ionic/components/item/test/media/index.ts +++ b/ionic/components/item/test/media/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/item/test/sliding/index.ts b/ionic/components/item/test/sliding/index.ts index 6b8723c9b7..196760ef88 100644 --- a/ionic/components/item/test/sliding/index.ts +++ b/ionic/components/item/test/sliding/index.ts @@ -1,4 +1,4 @@ -import {App, Page, IonicApp, Alert, NavController} from 'ionic/ionic'; +import {App, Page, IonicApp, Alert, NavController} from '../../../../../ionic/ionic'; @Page({ diff --git a/ionic/components/item/test/text/index.ts b/ionic/components/item/test/text/index.ts index 43aed36502..6a30176f2a 100644 --- a/ionic/components/item/test/text/index.ts +++ b/ionic/components/item/test/text/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/list/test/headers/index.ts b/ionic/components/list/test/headers/index.ts index 43aed36502..6a30176f2a 100644 --- a/ionic/components/list/test/headers/index.ts +++ b/ionic/components/list/test/headers/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/list/test/infinite/index.ts b/ionic/components/list/test/infinite/index.ts index ffb2f827d0..bbfbeb77cf 100644 --- a/ionic/components/list/test/infinite/index.ts +++ b/ionic/components/list/test/infinite/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/list/test/inset/index.ts b/ionic/components/list/test/inset/index.ts index 43aed36502..6a30176f2a 100644 --- a/ionic/components/list/test/inset/index.ts +++ b/ionic/components/list/test/inset/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/list/test/no-lines/index.ts b/ionic/components/list/test/no-lines/index.ts index 43aed36502..6a30176f2a 100644 --- a/ionic/components/list/test/no-lines/index.ts +++ b/ionic/components/list/test/no-lines/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/list/test/repeat-headers/index.ts b/ionic/components/list/test/repeat-headers/index.ts index 0aea852e02..55b159d8ab 100644 --- a/ionic/components/list/test/repeat-headers/index.ts +++ b/ionic/components/list/test/repeat-headers/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/list/test/sticky/index.ts b/ionic/components/list/test/sticky/index.ts index 0fe2844026..e753b62ae5 100644 --- a/ionic/components/list/test/sticky/index.ts +++ b/ionic/components/list/test/sticky/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/menu/test/basic/index.ts b/ionic/components/menu/test/basic/index.ts index fa8d5e3f4a..bbe12a8b56 100644 --- a/ionic/components/menu/test/basic/index.ts +++ b/ionic/components/menu/test/basic/index.ts @@ -1,4 +1,4 @@ -import {App, IonicApp, MenuController, Page, NavController, Alert} from 'ionic/ionic'; +import {App, IonicApp, MenuController, Page, NavController, Alert} from '../../../../../ionic/ionic'; @Page({ diff --git a/ionic/components/menu/test/disable-swipe/index.ts b/ionic/components/menu/test/disable-swipe/index.ts index cd306e0502..f082752d49 100644 --- a/ionic/components/menu/test/disable-swipe/index.ts +++ b/ionic/components/menu/test/disable-swipe/index.ts @@ -1,4 +1,4 @@ -import {App, Page, NavController, MenuController} from 'ionic/ionic'; +import {App, Page, NavController, MenuController} from '../../../../../ionic/ionic'; @Page({ templateUrl: 'page1.html' diff --git a/ionic/components/menu/test/multiple/index.ts b/ionic/components/menu/test/multiple/index.ts index 46e9d35e60..5e212df941 100644 --- a/ionic/components/menu/test/multiple/index.ts +++ b/ionic/components/menu/test/multiple/index.ts @@ -1,4 +1,4 @@ -import {App, Page, MenuController} from 'ionic/ionic'; +import {App, Page, MenuController} from '../../../../../ionic/ionic'; @Page({ diff --git a/ionic/components/menu/test/overlay/index.ts b/ionic/components/menu/test/overlay/index.ts index 849c7cbed5..02f1dee577 100644 --- a/ionic/components/menu/test/overlay/index.ts +++ b/ionic/components/menu/test/overlay/index.ts @@ -1,4 +1,4 @@ -import {App, IonicApp, Page} from 'ionic/ionic'; +import {App, IonicApp, Page} from '../../../../../ionic/ionic'; @Page({templateUrl: 'page1.html'}) diff --git a/ionic/components/menu/test/push/index.ts b/ionic/components/menu/test/push/index.ts index 849c7cbed5..02f1dee577 100644 --- a/ionic/components/menu/test/push/index.ts +++ b/ionic/components/menu/test/push/index.ts @@ -1,4 +1,4 @@ -import {App, IonicApp, Page} from 'ionic/ionic'; +import {App, IonicApp, Page} from '../../../../../ionic/ionic'; @Page({templateUrl: 'page1.html'}) diff --git a/ionic/components/menu/test/reveal/index.ts b/ionic/components/menu/test/reveal/index.ts index 849c7cbed5..02f1dee577 100644 --- a/ionic/components/menu/test/reveal/index.ts +++ b/ionic/components/menu/test/reveal/index.ts @@ -1,4 +1,4 @@ -import {App, IonicApp, Page} from 'ionic/ionic'; +import {App, IonicApp, Page} from '../../../../../ionic/ionic'; @Page({templateUrl: 'page1.html'}) diff --git a/ionic/components/modal/test/basic/index.ts b/ionic/components/modal/test/basic/index.ts index 6fb0c07fb2..713e88f314 100644 --- a/ionic/components/modal/test/basic/index.ts +++ b/ionic/components/modal/test/basic/index.ts @@ -1,5 +1,5 @@ -import {App, Page, Config, Platform} from 'ionic/ionic'; -import {Modal, ActionSheet, NavController, NavParams, Transition, TransitionOptions, ViewController} from 'ionic/ionic'; +import {App, Page, Config, Platform} from '../../../../../ionic/ionic'; +import {Modal, ActionSheet, NavController, NavParams, Transition, TransitionOptions, ViewController} from '../../../../../ionic/ionic';; @Page({ diff --git a/ionic/components/nav/test/basic/index.ts b/ionic/components/nav/test/basic/index.ts index f75bb8a2bb..cad35e3432 100644 --- a/ionic/components/nav/test/basic/index.ts +++ b/ionic/components/nav/test/basic/index.ts @@ -1,7 +1,7 @@ import {Component, Type} from 'angular2/core'; -import {App, NavController, Alert} from 'ionic/ionic'; -import {Page, Config, IonicApp} from 'ionic/ionic'; -import {NavParams, ViewController, IONIC_DIRECTIVES} from 'ionic/ionic'; +import {App, NavController, Alert} from '../../../../../ionic/ionic'; +import {Page, Config, IonicApp} from '../../../../../ionic/ionic'; +import {NavParams, ViewController, IONIC_DIRECTIVES} from '../../../../../ionic/ionic';; @Component({ diff --git a/ionic/components/nav/test/insert-views/index.ts b/ionic/components/nav/test/insert-views/index.ts index f27dc027e9..168e348d2a 100644 --- a/ionic/components/nav/test/insert-views/index.ts +++ b/ionic/components/nav/test/insert-views/index.ts @@ -1,4 +1,4 @@ -import {App, Page, NavController} from 'ionic/ionic'; +import {App, Page, NavController} from '../../../../../ionic/ionic'; diff --git a/ionic/components/nav/test/nested/index.ts b/ionic/components/nav/test/nested/index.ts index 68f6f4ff45..3339ea7e3a 100644 --- a/ionic/components/nav/test/nested/index.ts +++ b/ionic/components/nav/test/nested/index.ts @@ -1,5 +1,5 @@ -import {App, NavParams, NavController, ViewController, MenuController} from 'ionic/ionic'; -import {Page, Config, IonicApp} from 'ionic/ionic'; +import {App, NavParams, NavController, ViewController, MenuController} from '../../../../../ionic/ionic'; +import {Page, Config, IonicApp} from '../../../../../ionic/ionic'; @Page({ diff --git a/ionic/components/nav/test/routing/index.ts b/ionic/components/nav/test/routing/index.ts index 2ed275e313..45c0b14278 100644 --- a/ionic/components/nav/test/routing/index.ts +++ b/ionic/components/nav/test/routing/index.ts @@ -1,6 +1,6 @@ import {RouteConfig, Location} from 'angular2/router'; -import {App, Page, NavParams, ViewController} from 'ionic/ionic'; +import {App, Page, NavParams, ViewController} from '../../../../../ionic/ionic'; @Page({templateUrl: 'view1.html'}) diff --git a/ionic/components/radio/test/basic/index.ts b/ionic/components/radio/test/basic/index.ts index 17887cecd5..f17be3e155 100644 --- a/ionic/components/radio/test/basic/index.ts +++ b/ionic/components/radio/test/basic/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; import { Control, ControlGroup, diff --git a/ionic/components/scroll/test/basic/index.ts b/ionic/components/scroll/test/basic/index.ts index ff21e93aca..5a02c325b6 100644 --- a/ionic/components/scroll/test/basic/index.ts +++ b/ionic/components/scroll/test/basic/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/scroll/test/pull-to-refresh/index.ts b/ionic/components/scroll/test/pull-to-refresh/index.ts index f0958056d7..f27fb00f95 100644 --- a/ionic/components/scroll/test/pull-to-refresh/index.ts +++ b/ionic/components/scroll/test/pull-to-refresh/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/searchbar/test/floating/index.ts b/ionic/components/searchbar/test/floating/index.ts index 5713049de8..0844e09d10 100644 --- a/ionic/components/searchbar/test/floating/index.ts +++ b/ionic/components/searchbar/test/floating/index.ts @@ -1,6 +1,6 @@ import {FORM_DIRECTIVES, FormBuilder, Validators, Control, ControlGroup} from 'angular2/common'; -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ templateUrl: 'main.html', diff --git a/ionic/components/searchbar/test/nav/index.ts b/ionic/components/searchbar/test/nav/index.ts index 44046163c4..10f1a73c9c 100644 --- a/ionic/components/searchbar/test/nav/index.ts +++ b/ionic/components/searchbar/test/nav/index.ts @@ -1,4 +1,4 @@ -import {App, Page, NavController} from 'ionic/ionic'; +import {App, Page, NavController} from '../../../../../ionic/ionic'; @Page({ templateUrl: 'first.html' diff --git a/ionic/components/searchbar/test/toolbar/index.ts b/ionic/components/searchbar/test/toolbar/index.ts index 810b63c5bc..119aac7c69 100644 --- a/ionic/components/searchbar/test/toolbar/index.ts +++ b/ionic/components/searchbar/test/toolbar/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ templateUrl: 'main.html' diff --git a/ionic/components/segment/test/basic/index.ts b/ionic/components/segment/test/basic/index.ts index 3b77594c40..a431191455 100644 --- a/ionic/components/segment/test/basic/index.ts +++ b/ionic/components/segment/test/basic/index.ts @@ -1,6 +1,6 @@ import {FORM_DIRECTIVES, FormBuilder, Validators, Control, ControlGroup} from 'angular2/common'; -import {App, IonicApp} from 'ionic/ionic'; +import {App, IonicApp} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/segment/test/nav/index.ts b/ionic/components/segment/test/nav/index.ts index 7bdae186f2..e8b40ba636 100644 --- a/ionic/components/segment/test/nav/index.ts +++ b/ionic/components/segment/test/nav/index.ts @@ -1,5 +1,5 @@ import {Validators, Control, ControlGroup} from 'angular2/common'; -import {App, Page, NavController} from 'ionic/ionic'; +import {App, Page, NavController} from '../../../../../ionic/ionic'; @Page({ diff --git a/ionic/components/segment/test/swipe/index.ts b/ionic/components/segment/test/swipe/index.ts index 1ffab619b0..158b6ec662 100644 --- a/ionic/components/segment/test/swipe/index.ts +++ b/ionic/components/segment/test/swipe/index.ts @@ -1,7 +1,6 @@ import {Validators, Control, ControlGroup} from 'angular2/common'; import {Http} from 'angular2/http'; -import {App, Page, IonicApp, NavController} from 'ionic/ionic'; -import _ from 'lodash'; +import {App, Page, IonicApp, NavController} from '../../../../../ionic/ionic'; @Page({ diff --git a/ionic/components/select/test/multiple-value/index.ts b/ionic/components/select/test/multiple-value/index.ts index 70d2f5caae..e2fdaa7a53 100644 --- a/ionic/components/select/test/multiple-value/index.ts +++ b/ionic/components/select/test/multiple-value/index.ts @@ -1,4 +1,4 @@ -import {App, Page} from 'ionic/ionic'; +import {App, Page} from '../../../../../ionic/ionic'; @Page({ diff --git a/ionic/components/select/test/single-value/index.ts b/ionic/components/select/test/single-value/index.ts index 3459f210f1..2b872328d5 100644 --- a/ionic/components/select/test/single-value/index.ts +++ b/ionic/components/select/test/single-value/index.ts @@ -1,4 +1,4 @@ -import {App, Page} from 'ionic/ionic'; +import {App, Page} from '../../../../../ionic/ionic'; @Page({ diff --git a/ionic/components/show-hide-when/test/basic/index.ts b/ionic/components/show-hide-when/test/basic/index.ts index 611ee2dc2a..43da3f5c87 100644 --- a/ionic/components/show-hide-when/test/basic/index.ts +++ b/ionic/components/show-hide-when/test/basic/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; import { Control, ControlGroup, diff --git a/ionic/components/slides/test/basic/index.ts b/ionic/components/slides/test/basic/index.ts index a2181da18e..981f2428a2 100644 --- a/ionic/components/slides/test/basic/index.ts +++ b/ionic/components/slides/test/basic/index.ts @@ -1,4 +1,4 @@ -import {App, IonicApp} from 'ionic/ionic'; +import {App, IonicApp} from '../../../../../ionic/ionic'; import {Http} from 'angular2/http'; @App({ diff --git a/ionic/components/slides/test/intro/index.ts b/ionic/components/slides/test/intro/index.ts index f3795a8ce5..277825b69e 100644 --- a/ionic/components/slides/test/intro/index.ts +++ b/ionic/components/slides/test/intro/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/slides/test/loop/index.ts b/ionic/components/slides/test/loop/index.ts index ecee3ee043..e6d3d71cc3 100644 --- a/ionic/components/slides/test/loop/index.ts +++ b/ionic/components/slides/test/loop/index.ts @@ -1,4 +1,4 @@ -import {App, IonicApp} from 'ionic/ionic'; +import {App, IonicApp} from '../../../../../ionic/ionic'; @App({ templateUrl: 'main.html' diff --git a/ionic/components/slides/test/scroll/index.ts b/ionic/components/slides/test/scroll/index.ts index edfdcec9b6..1f71954369 100644 --- a/ionic/components/slides/test/scroll/index.ts +++ b/ionic/components/slides/test/scroll/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ templateUrl: 'main.html', diff --git a/ionic/components/tabs/test/advanced/index.ts b/ionic/components/tabs/test/advanced/index.ts index f8786ce6fd..725fe6bff7 100644 --- a/ionic/components/tabs/test/advanced/index.ts +++ b/ionic/components/tabs/test/advanced/index.ts @@ -1,7 +1,7 @@ import {ViewChild} from 'angular2/core'; import {RouteConfig, Location} from 'angular2/router'; -import {App, Page, NavController, Modal, ViewController, Tabs} from 'ionic/ionic'; +import {App, Page, NavController, Modal, ViewController, Tabs} from '../../../../../ionic/ionic'; @Page({ diff --git a/ionic/components/tabs/test/badges/index.ts b/ionic/components/tabs/test/badges/index.ts index cdb0c6642f..afc358b1fa 100644 --- a/ionic/components/tabs/test/badges/index.ts +++ b/ionic/components/tabs/test/badges/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/tabs/test/basic/index.ts b/ionic/components/tabs/test/basic/index.ts index 9131f30381..b859cb557b 100644 --- a/ionic/components/tabs/test/basic/index.ts +++ b/ionic/components/tabs/test/basic/index.ts @@ -1,4 +1,4 @@ - import {App, Page, NavController, Alert, Modal, ViewController} from 'ionic/ionic'; + import {App, Page, NavController, Alert, Modal, ViewController} from '../../../../../ionic/ionic'; // // Modal diff --git a/ionic/components/tabs/test/ghost/index.ts b/ionic/components/tabs/test/ghost/index.ts index dabcba3148..1de90c7070 100644 --- a/ionic/components/tabs/test/ghost/index.ts +++ b/ionic/components/tabs/test/ghost/index.ts @@ -1,4 +1,4 @@ - import {App, Page, NavController, Tab} from 'ionic/ionic'; + import {App, Page, NavController, Tab} from '../../../../../ionic/ionic'; import {ContentChild, QueryList, ViewChildren} from 'angular2/core'; diff --git a/ionic/components/tabs/test/tab-bar-scenarios/index.ts b/ionic/components/tabs/test/tab-bar-scenarios/index.ts index 45d9e0103e..67b9bf20ba 100644 --- a/ionic/components/tabs/test/tab-bar-scenarios/index.ts +++ b/ionic/components/tabs/test/tab-bar-scenarios/index.ts @@ -1,4 +1,4 @@ -import {App, Page} from 'ionic/ionic'; +import {App, Page} from '../../../../../ionic/ionic'; @Page({template:'hi'}) diff --git a/ionic/components/toggle/test/basic/index.ts b/ionic/components/toggle/test/basic/index.ts index 1d8c6a59c3..2e4e3c4691 100644 --- a/ionic/components/toggle/test/basic/index.ts +++ b/ionic/components/toggle/test/basic/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; import { Control, ControlGroup, diff --git a/ionic/components/toolbar/test/colors/index.ts b/ionic/components/toolbar/test/colors/index.ts index 590a6f9d35..bc269a63d8 100644 --- a/ionic/components/toolbar/test/colors/index.ts +++ b/ionic/components/toolbar/test/colors/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/ionic/components/toolbar/test/scenarios/index.ts b/ionic/components/toolbar/test/scenarios/index.ts index 590a6f9d35..bc269a63d8 100644 --- a/ionic/components/toolbar/test/scenarios/index.ts +++ b/ionic/components/toolbar/test/scenarios/index.ts @@ -1,4 +1,4 @@ -import {App} from 'ionic/ionic'; +import {App} from '../../../../../ionic/ionic'; @App({ diff --git a/scripts/e2e/e2e.template.html b/scripts/e2e/e2e.template.html index 3be6f6f9d0..08b91bb9f4 100644 --- a/scripts/e2e/e2e.template.html +++ b/scripts/e2e/e2e.template.html @@ -36,6 +36,14 @@ + @@ -101,6 +109,7 @@ document.body.classList.remove('rtl'); } + System.import('index.js').then(function(m) {}, console.error.bind(console)); diff --git a/tsconfig.json b/tsconfig.json index 308d102a5d..fc882ee1ca 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,9 +7,6 @@ "declaration": true, "outDir": "dist" }, - "files": [ - "ionic/ionic.ts" - ], "compileOnSave" : false, "buildOnSave": false, "exclude": [ From df9a4df26455392381132dbbd3bbc0d670a7cb78 Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Fri, 12 Feb 2016 11:48:34 -0600 Subject: [PATCH 067/117] fix(segment): add the active background color to the colorized segments and remove activated css closes #5308 --- ionic/components/segment/segment.ios.scss | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ionic/components/segment/segment.ios.scss b/ionic/components/segment/segment.ios.scss index 9cdbfadf01..3cf7a22996 100644 --- a/ionic/components/segment/segment.ios.scss +++ b/ionic/components/segment/segment.ios.scss @@ -46,10 +46,10 @@ $segment-button-ios-toolbar-button-max-width: 100px !default; background-color: rgba($segment-button-ios-bg-color-activated, $segment-button-ios-hover-opacity); transition: $segment-button-ios-hover-transition; } - + &:active:not(.segment-activated) { - background-color: rgba($segment-button-ios-bg-color-activated, $segment-button-ios-active-opacity); - transition: $segment-button-ios-active-transition; + background-color: rgba($segment-button-ios-bg-color-activated, $segment-button-ios-active-opacity); + transition: $segment-button-ios-active-transition; } &:first-of-type { @@ -100,7 +100,10 @@ $segment-button-ios-toolbar-button-max-width: 100px !default; background-color: rgba($color-value, $segment-button-ios-hover-opacity); } - &.activated, + &:active:not(.segment-activated) { + background-color: rgba($color-value, $segment-button-ios-active-opacity); + } + &.segment-activated { color: inverse($color-value); background-color: $color-value; @@ -119,4 +122,4 @@ $segment-button-ios-toolbar-button-max-width: 100px !default; .toolbar[#{$color-name}] .segment-button.segment-activated { color: $color-value; } -} \ No newline at end of file +} From 8b724a3bcb9ab6f10398d9ed7fb9e3f5f281b41c Mon Sep 17 00:00:00 2001 From: Tim Lancina Date: Fri, 12 Feb 2016 13:59:28 -0600 Subject: [PATCH 068/117] chore(tests): make typescript and unit tests friends --- ionic/components/button/test/button.spec.ts | 4 +++- ionic/components/input/test/text-input.spec.ts | 4 +++- ionic/components/nav/test/nav-controller.spec.ts | 4 +++- ionic/components/tap-click/test/tapClick.spec.ts | 2 +- ionic/config/test/config.spec.ts | 4 +++- ionic/platform/test/platform.spec.ts | 4 +++- ionic/util/test/util.spec.ts | 4 +++- scripts/e2e/e2e.template.html | 2 +- scripts/karma/karma.conf.js | 1 + scripts/karma/system.config.js | 6 ++++++ 10 files changed, 27 insertions(+), 8 deletions(-) create mode 100644 scripts/karma/system.config.js diff --git a/ionic/components/button/test/button.spec.ts b/ionic/components/button/test/button.spec.ts index a7c17093ca..0d284cca96 100644 --- a/ionic/components/button/test/button.spec.ts +++ b/ionic/components/button/test/button.spec.ts @@ -1,4 +1,6 @@ -import {Button, Config} from 'ionic/ionic'; +/// + +import {Button, Config} from '../../../../ionic/ionic'; export function run() { diff --git a/ionic/components/input/test/text-input.spec.ts b/ionic/components/input/test/text-input.spec.ts index e8bf672c8b..da377f754a 100644 --- a/ionic/components/input/test/text-input.spec.ts +++ b/ionic/components/input/test/text-input.spec.ts @@ -1,4 +1,6 @@ -import {TextInput} from 'ionic/ionic'; +/// + +import {TextInput} from '../../../../ionic/ionic'; export function run() { diff --git a/ionic/components/nav/test/nav-controller.spec.ts b/ionic/components/nav/test/nav-controller.spec.ts index e842e22a5c..f9973768c5 100644 --- a/ionic/components/nav/test/nav-controller.spec.ts +++ b/ionic/components/nav/test/nav-controller.spec.ts @@ -1,4 +1,6 @@ -import {NavController, Config, ViewController} from 'ionic/ionic'; +/// + +import {NavController, Config, ViewController} from '../../../../ionic/ionic'; export function run() { describe('NavController', () => { diff --git a/ionic/components/tap-click/test/tapClick.spec.ts b/ionic/components/tap-click/test/tapClick.spec.ts index b275d3d6d6..58f7d64ac7 100644 --- a/ionic/components/tap-click/test/tapClick.spec.ts +++ b/ionic/components/tap-click/test/tapClick.spec.ts @@ -1,4 +1,4 @@ -import * as tapClick from 'ionic/ionic'; +import * as tapClick from '../../../../ionic/ionic'; export function run() { diff --git a/ionic/config/test/config.spec.ts b/ionic/config/test/config.spec.ts index 1c8f4c3ad5..4b4af5105d 100644 --- a/ionic/config/test/config.spec.ts +++ b/ionic/config/test/config.spec.ts @@ -1,4 +1,6 @@ -import {Config, Platform, ionicProviders} from 'ionic/ionic'; +/// + +import {Config, Platform, ionicProviders} from '../../../ionic/ionic'; export function run() { diff --git a/ionic/platform/test/platform.spec.ts b/ionic/platform/test/platform.spec.ts index 374bd6d652..a5e664a2d8 100644 --- a/ionic/platform/test/platform.spec.ts +++ b/ionic/platform/test/platform.spec.ts @@ -1,4 +1,6 @@ -import {Platform} from 'ionic/ionic'; +/// + +import {Platform} from '../../../ionic/ionic'; export function run() { diff --git a/ionic/util/test/util.spec.ts b/ionic/util/test/util.spec.ts index 4b0e0e73b0..efd4423194 100644 --- a/ionic/util/test/util.spec.ts +++ b/ionic/util/test/util.spec.ts @@ -1,4 +1,6 @@ -import * as util from 'ionic/util'; +/// + +import * as util from '../../../ionic/util'; export function run() { describe('extend', function() { diff --git a/scripts/e2e/e2e.template.html b/scripts/e2e/e2e.template.html index 08b91bb9f4..71a6c8c1cd 100644 --- a/scripts/e2e/e2e.template.html +++ b/scripts/e2e/e2e.template.html @@ -36,7 +36,7 @@ -