mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-15 17:42:15 +08:00
style(lint): fix lint errors
This commit is contained in:
210
packages/angular/package-lock.json
generated
210
packages/angular/package-lock.json
generated
@ -151,6 +151,15 @@
|
|||||||
"normalize-path": "2.1.1"
|
"normalize-path": "2.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"argparse": {
|
||||||
|
"version": "1.0.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
|
||||||
|
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"sprintf-js": "1.0.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
"arr-diff": {
|
"arr-diff": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz",
|
||||||
@ -205,6 +214,59 @@
|
|||||||
"integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=",
|
"integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"babel-code-frame": {
|
||||||
|
"version": "6.26.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
|
||||||
|
"integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"chalk": "1.1.3",
|
||||||
|
"esutils": "2.0.2",
|
||||||
|
"js-tokens": "3.0.2"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"ansi-regex": {
|
||||||
|
"version": "2.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
||||||
|
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"ansi-styles": {
|
||||||
|
"version": "2.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
|
||||||
|
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"chalk": {
|
||||||
|
"version": "1.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
||||||
|
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ansi-styles": "2.2.1",
|
||||||
|
"escape-string-regexp": "1.0.5",
|
||||||
|
"has-ansi": "2.0.0",
|
||||||
|
"strip-ansi": "3.0.1",
|
||||||
|
"supports-color": "2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"strip-ansi": {
|
||||||
|
"version": "3.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||||
|
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ansi-regex": "2.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"supports-color": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"balanced-match": {
|
"balanced-match": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
||||||
@ -411,6 +473,12 @@
|
|||||||
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
|
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"commander": {
|
||||||
|
"version": "2.14.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/commander/-/commander-2.14.1.tgz",
|
||||||
|
"integrity": "sha512-+YR16o3rK53SmWHU3rEM3tPAh2rwb1yPcQX5irVn7mb0gXbwuCCrnkbV5+PBfETdfg1vui07nM6PCG1zndcjQw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"concat-map": {
|
"concat-map": {
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||||
@ -522,6 +590,36 @@
|
|||||||
"rimraf": "2.6.2"
|
"rimraf": "2.6.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"diff": {
|
||||||
|
"version": "3.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/diff/-/diff-3.4.0.tgz",
|
||||||
|
"integrity": "sha512-QpVuMTEoJMF7cKzi6bvWhRulU1fZqZnvyVQgNhPaxxuTYwyjn/j1v9falseQ/uXWwPnO56RBfwtg4h/EQXmucA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"doctrine": {
|
||||||
|
"version": "0.7.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-0.7.2.tgz",
|
||||||
|
"integrity": "sha1-fLhgNZujvpDgQLJrcpzkv6ZUxSM=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"esutils": "1.1.6",
|
||||||
|
"isarray": "0.0.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"esutils": {
|
||||||
|
"version": "1.1.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/esutils/-/esutils-1.1.6.tgz",
|
||||||
|
"integrity": "sha1-wBzKqa5LiXxtDD4hCuUvPHqEQ3U=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"isarray": {
|
||||||
|
"version": "0.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
|
||||||
|
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"dot-prop": {
|
"dot-prop": {
|
||||||
"version": "4.2.0",
|
"version": "4.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz",
|
||||||
@ -558,6 +656,18 @@
|
|||||||
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
|
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"esprima": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"esutils": {
|
||||||
|
"version": "2.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
|
||||||
|
"integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"execa": {
|
"execa": {
|
||||||
"version": "0.8.0",
|
"version": "0.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/execa/-/execa-0.8.0.tgz",
|
"resolved": "https://registry.npmjs.org/execa/-/execa-0.8.0.tgz",
|
||||||
@ -1846,12 +1956,6 @@
|
|||||||
"through": "2.3.8"
|
"through": "2.3.8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ionicons": {
|
|
||||||
"version": "3.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/ionicons/-/ionicons-3.0.0.tgz",
|
|
||||||
"integrity": "sha1-QLja9P16MRUL0AIWD2ZJbiKpjDw=",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"is-arrayish": {
|
"is-arrayish": {
|
||||||
"version": "0.2.1",
|
"version": "0.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
|
||||||
@ -2059,6 +2163,22 @@
|
|||||||
"integrity": "sha1-VPzPYupl5PRyB1cri3jBs9neX3c=",
|
"integrity": "sha1-VPzPYupl5PRyB1cri3jBs9neX3c=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"js-tokens": {
|
||||||
|
"version": "3.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
|
||||||
|
"integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"js-yaml": {
|
||||||
|
"version": "3.10.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz",
|
||||||
|
"integrity": "sha512-O2v52ffjLa9VeM43J4XocZE//WT9N0IiwDa3KSHH7Tu8CtH+1qM8SIZvnsTh6v+4yFy5KUY3BHUVwjpfAWsjIA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"argparse": "1.0.10",
|
||||||
|
"esprima": "4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"json-parse-better-errors": {
|
"json-parse-better-errors": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.1.tgz",
|
||||||
@ -2905,6 +3025,12 @@
|
|||||||
"integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
|
"integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"path-parse": {
|
||||||
|
"version": "1.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz",
|
||||||
|
"integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"path-type": {
|
"path-type": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz",
|
||||||
@ -3125,6 +3251,15 @@
|
|||||||
"is-finite": "1.0.2"
|
"is-finite": "1.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"resolve": {
|
||||||
|
"version": "1.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz",
|
||||||
|
"integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"path-parse": "1.0.5"
|
||||||
|
}
|
||||||
|
},
|
||||||
"restore-cursor": {
|
"restore-cursor": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz",
|
||||||
@ -3287,6 +3422,12 @@
|
|||||||
"through": "2.3.8"
|
"through": "2.3.8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"sprintf-js": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
|
||||||
|
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"stream-to-observable": {
|
"stream-to-observable": {
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/stream-to-observable/-/stream-to-observable-0.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/stream-to-observable/-/stream-to-observable-0.2.0.tgz",
|
||||||
@ -3452,6 +3593,63 @@
|
|||||||
"integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==",
|
"integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"tslint": {
|
||||||
|
"version": "5.9.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.9.1.tgz",
|
||||||
|
"integrity": "sha1-ElX4ej/1frCw4fDmEKi0dIBGya4=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"babel-code-frame": "6.26.0",
|
||||||
|
"builtin-modules": "1.1.1",
|
||||||
|
"chalk": "2.3.1",
|
||||||
|
"commander": "2.14.1",
|
||||||
|
"diff": "3.4.0",
|
||||||
|
"glob": "7.1.2",
|
||||||
|
"js-yaml": "3.10.0",
|
||||||
|
"minimatch": "3.0.4",
|
||||||
|
"resolve": "1.5.0",
|
||||||
|
"semver": "5.5.0",
|
||||||
|
"tslib": "1.9.0",
|
||||||
|
"tsutils": "2.22.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tslint-eslint-rules": {
|
||||||
|
"version": "4.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/tslint-eslint-rules/-/tslint-eslint-rules-4.1.1.tgz",
|
||||||
|
"integrity": "sha1-fDDniC8mvCdr/5HSOEl1xp2viLo=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"doctrine": "0.7.2",
|
||||||
|
"tslib": "1.9.0",
|
||||||
|
"tsutils": "1.9.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"tsutils": {
|
||||||
|
"version": "1.9.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/tsutils/-/tsutils-1.9.1.tgz",
|
||||||
|
"integrity": "sha1-ufmrROVa+WgYMdXyjQrur1x1DLA=",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tslint-ionic-rules": {
|
||||||
|
"version": "0.0.13",
|
||||||
|
"resolved": "https://registry.npmjs.org/tslint-ionic-rules/-/tslint-ionic-rules-0.0.13.tgz",
|
||||||
|
"integrity": "sha512-wBQbKjLlazwTW9Ql2sZYdZ04cPYCaHSdo8PuJy9Ke9d4ewyjCRweJ8AB0OKtk3MtSuNiJJumnJJYUgNGuNjevg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"tslint-eslint-rules": "4.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tsutils": {
|
||||||
|
"version": "2.22.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.22.0.tgz",
|
||||||
|
"integrity": "sha512-05iMIQXsLVBx2vPTvpsHriRuNpKpU1Z9jqYUOBvwglO6I+QzdA1UQcVoNhsVkSZfns5TjFMFbdxdrkOW6cfwUQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"tslib": "1.9.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"typescript": {
|
"typescript": {
|
||||||
"version": "2.7.2",
|
"version": "2.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz",
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
"clean-generated": "node ./scripts/clean.js",
|
"clean-generated": "node ./scripts/clean.js",
|
||||||
"compile": "./node_modules/.bin/ngc",
|
"compile": "./node_modules/.bin/ngc",
|
||||||
"deploy": "npm run build && np --any-branch",
|
"deploy": "npm run build && np --any-branch",
|
||||||
|
"lint": "tslint --project .",
|
||||||
"tsc": "tsc -p ."
|
"tsc": "tsc -p ."
|
||||||
},
|
},
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
@ -43,10 +44,11 @@
|
|||||||
"@angular/router": "latest",
|
"@angular/router": "latest",
|
||||||
"@ionic/core": "next",
|
"@ionic/core": "next",
|
||||||
"glob": "7.1.2",
|
"glob": "7.1.2",
|
||||||
"ionicons": "~3.0.0",
|
|
||||||
"np": "^2.20.1",
|
"np": "^2.20.1",
|
||||||
"rimraf": "^2.6.2",
|
"rimraf": "^2.6.2",
|
||||||
"rxjs": "5.5.2",
|
"rxjs": "5.5.2",
|
||||||
|
"tslint": "^5.8.0",
|
||||||
|
"tslint-ionic-rules": "0.0.13",
|
||||||
"typescript": "latest",
|
"typescript": "latest",
|
||||||
"zone.js": "0.8.18"
|
"zone.js": "0.8.18"
|
||||||
}
|
}
|
||||||
|
@ -16,8 +16,8 @@ import { setIonicClasses } from './util/set-ionic-classes';
|
|||||||
})
|
})
|
||||||
export class BooleanValueAccessor implements ControlValueAccessor {
|
export class BooleanValueAccessor implements ControlValueAccessor {
|
||||||
constructor(private element: ElementRef, private renderer: Renderer2) {
|
constructor(private element: ElementRef, private renderer: Renderer2) {
|
||||||
this.onChange = () => { };
|
this.onChange = () => {/**/};
|
||||||
this.onTouched = () => { };
|
this.onTouched = () => {/**/};
|
||||||
}
|
}
|
||||||
|
|
||||||
onChange: (value: any) => void;
|
onChange: (value: any) => void;
|
||||||
|
@ -16,8 +16,8 @@ import { setIonicClasses } from './util/set-ionic-classes';
|
|||||||
})
|
})
|
||||||
export class NumericValueAccessor implements ControlValueAccessor {
|
export class NumericValueAccessor implements ControlValueAccessor {
|
||||||
constructor(private element: ElementRef, private renderer: Renderer2) {
|
constructor(private element: ElementRef, private renderer: Renderer2) {
|
||||||
this.onChange = () => { };
|
this.onChange = () => {/**/};
|
||||||
this.onTouched = () => { };
|
this.onTouched = () => {/**/};
|
||||||
}
|
}
|
||||||
|
|
||||||
onChange: (value: any) => void;
|
onChange: (value: any) => void;
|
||||||
|
@ -21,8 +21,8 @@ export class RadioValueAccessor implements ControlValueAccessor {
|
|||||||
onTouched: () => void;
|
onTouched: () => void;
|
||||||
|
|
||||||
constructor(private element: ElementRef, private renderer: Renderer2) {
|
constructor(private element: ElementRef, private renderer: Renderer2) {
|
||||||
this.onChange = () => { };
|
this.onChange = () => {/**/};
|
||||||
this.onTouched = () => { };
|
this.onTouched = () => {/**/};
|
||||||
}
|
}
|
||||||
|
|
||||||
writeValue(value: any) {
|
writeValue(value: any) {
|
||||||
|
@ -18,8 +18,8 @@ import { setIonicClasses } from './util/set-ionic-classes';
|
|||||||
})
|
})
|
||||||
export class SelectValueAccessor implements ControlValueAccessor {
|
export class SelectValueAccessor implements ControlValueAccessor {
|
||||||
constructor(private element: ElementRef, private renderer: Renderer2) {
|
constructor(private element: ElementRef, private renderer: Renderer2) {
|
||||||
this.onChange = () => { };
|
this.onChange = () => {/**/};
|
||||||
this.onTouched = () => { };
|
this.onTouched = () => {/**/};
|
||||||
}
|
}
|
||||||
|
|
||||||
onChange: (value: any) => void;
|
onChange: (value: any) => void;
|
||||||
|
@ -16,8 +16,8 @@ import { setIonicClasses } from './util/set-ionic-classes';
|
|||||||
})
|
})
|
||||||
export class TextValueAccessor implements ControlValueAccessor {
|
export class TextValueAccessor implements ControlValueAccessor {
|
||||||
constructor(private element: ElementRef, private renderer: Renderer2) {
|
constructor(private element: ElementRef, private renderer: Renderer2) {
|
||||||
this.onChange = () => { };
|
this.onChange = () => {/**/};
|
||||||
this.onTouched = () => { };
|
this.onTouched = () => {/**/};
|
||||||
}
|
}
|
||||||
|
|
||||||
onChange: (value: any) => void;
|
onChange: (value: any) => void;
|
||||||
|
@ -25,7 +25,7 @@ export function getProviders(element: HTMLElement, data: any) {
|
|||||||
{
|
{
|
||||||
provide: NavParams, useFactory: provideNavParamsInjectable, deps: [NavParamsToken]
|
provide: NavParams, useFactory: provideNavParamsInjectable, deps: [NavParamsToken]
|
||||||
},
|
},
|
||||||
]
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
export function provideNavControllerInjectable(element: HTMLIonNavElement) {
|
export function provideNavControllerInjectable(element: HTMLIonNavElement) {
|
||||||
|
@ -3,7 +3,6 @@ import {
|
|||||||
Directive,
|
Directive,
|
||||||
ElementRef,
|
ElementRef,
|
||||||
Injector,
|
Injector,
|
||||||
Optional,
|
|
||||||
Type,
|
Type,
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
|
||||||
@ -11,8 +10,6 @@ import { FrameworkDelegate } from '@ionic/core';
|
|||||||
|
|
||||||
import { AngularComponentMounter, AngularEscapeHatch } from '..';
|
import { AngularComponentMounter, AngularEscapeHatch } from '..';
|
||||||
|
|
||||||
let id = 0;
|
|
||||||
|
|
||||||
@Directive({
|
@Directive({
|
||||||
selector: 'ion-nav',
|
selector: 'ion-nav',
|
||||||
})
|
})
|
||||||
@ -45,4 +42,4 @@ export class IonNav implements FrameworkDelegate {
|
|||||||
return this.angularComponentMounter.removeViewFromDom(parentElement, childElement);
|
return this.angularComponentMounter.removeViewFromDom(parentElement, childElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { EmbeddedViewRef, AfterContentInit, ContentChild, Directive, ElementRef, Input, IterableDiffers, TrackByFunction, ChangeDetectorRef } from '@angular/core';
|
import { ChangeDetectorRef, ContentChild, Directive, ElementRef, EmbeddedViewRef } from '@angular/core';
|
||||||
import { VirtualItem } from './virtual-item';
|
import { VirtualItem } from './virtual-item';
|
||||||
import { VirtualHeader } from './virtual-header';
|
import { VirtualHeader } from './virtual-header';
|
||||||
import { VirtualFooter } from './virtual-footer';
|
import { VirtualFooter } from './virtual-footer';
|
||||||
@ -15,7 +15,7 @@ export class VirtualScroll {
|
|||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private el: ElementRef,
|
private el: ElementRef,
|
||||||
private cd: ChangeDetectorRef,
|
public cd: ChangeDetectorRef,
|
||||||
) {
|
) {
|
||||||
this.el.nativeElement.itemRender = this.itemRender.bind(this);
|
this.el.nativeElement.itemRender = this.itemRender.bind(this);
|
||||||
}
|
}
|
||||||
@ -39,7 +39,7 @@ export class VirtualScroll {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private getComponent(type: number) {
|
private getComponent(type: number) {
|
||||||
switch(type) {
|
switch (type) {
|
||||||
case 0: return this.itmTmp.templateRef;
|
case 0: return this.itmTmp.templateRef;
|
||||||
case 1: return this.hdrTmp.templateRef;
|
case 1: return this.hdrTmp.templateRef;
|
||||||
case 2: return this.ftrTmp.templateRef;
|
case 2: return this.ftrTmp.templateRef;
|
||||||
@ -50,7 +50,7 @@ export class VirtualScroll {
|
|||||||
|
|
||||||
function getElement(view: EmbeddedViewRef<VirtualContext>): HTMLElement {
|
function getElement(view: EmbeddedViewRef<VirtualContext>): HTMLElement {
|
||||||
const rootNodes = view.rootNodes;
|
const rootNodes = view.rootNodes;
|
||||||
for (var i = 0; i < rootNodes.length; i++) {
|
for (let i = 0; i < rootNodes.length; i++) {
|
||||||
if (rootNodes[i].nodeType === 1) {
|
if (rootNodes[i].nodeType === 1) {
|
||||||
return rootNodes[i];
|
return rootNodes[i];
|
||||||
}
|
}
|
||||||
|
@ -28,4 +28,4 @@ export { Platform } from './providers/platform';
|
|||||||
export { PopoverController, PopoverProxy } from './providers/popover-controller';
|
export { PopoverController, PopoverProxy } from './providers/popover-controller';
|
||||||
export { ToastController, ToastProxy } from './providers/toast-controller';
|
export { ToastController, ToastProxy } from './providers/toast-controller';
|
||||||
|
|
||||||
export * from './types/interfaces';
|
export * from './types/interfaces';
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import {
|
import {
|
||||||
|
CUSTOM_ELEMENTS_SCHEMA,
|
||||||
ModuleWithProviders,
|
ModuleWithProviders,
|
||||||
NgModule,
|
NgModule
|
||||||
CUSTOM_ELEMENTS_SCHEMA
|
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
|
||||||
import { BooleanValueAccessor } from './control-value-accessors/boolean-value-accessor';
|
import { BooleanValueAccessor } from './control-value-accessors/boolean-value-accessor';
|
||||||
|
@ -12,20 +12,20 @@ export class ActionSheetController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getActionSheetProxy(opts: ActionSheetOptions){
|
export function getActionSheetProxy(opts: ActionSheetOptions) {
|
||||||
return {
|
return {
|
||||||
id: actionSheetId++,
|
id: actionSheetId++,
|
||||||
state: PRESENTING,
|
state: PRESENTING,
|
||||||
opts: opts,
|
opts: opts,
|
||||||
present: function() { return present(this)},
|
present: function() { return present(this); },
|
||||||
dismiss: function() { return dismiss(this)},
|
dismiss: function() { return dismiss(this); },
|
||||||
onDidDismiss: function(callback: (data: any, role: string) => void) {
|
onDidDismiss: function(callback: (data: any, role: string) => void) {
|
||||||
(this as ActionSheetProxyInternal).onDidDismissHandler = callback;
|
(this as ActionSheetProxyInternal).onDidDismissHandler = callback;
|
||||||
},
|
},
|
||||||
onWillDismiss: function(callback: (data: any, role: string) => void) {
|
onWillDismiss: function(callback: (data: any, role: string) => void) {
|
||||||
(this as ActionSheetProxyInternal).onWillDismissHandler = callback;
|
(this as ActionSheetProxyInternal).onWillDismissHandler = callback;
|
||||||
},
|
},
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function present(actionSheetProxy: ActionSheetProxyInternal): Promise<any> {
|
export function present(actionSheetProxy: ActionSheetProxyInternal): Promise<any> {
|
||||||
@ -82,8 +82,8 @@ export function loadOverlay(opts: ActionSheetOptions): Promise<HTMLIonActionShee
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface ActionSheetProxy {
|
export interface ActionSheetProxy {
|
||||||
present(): Promise<void>
|
present(): Promise<void>;
|
||||||
dismiss(): Promise<void>
|
dismiss(): Promise<void>;
|
||||||
onDidDismiss(callback: (data: any, role: string) => void): void;
|
onDidDismiss(callback: (data: any, role: string) => void): void;
|
||||||
onWillDismiss(callback: (data: any, role: string) => void): void;
|
onWillDismiss(callback: (data: any, role: string) => void): void;
|
||||||
}
|
}
|
||||||
@ -101,4 +101,4 @@ export const PRESENTING = 1;
|
|||||||
export const DISMISSING = 2;
|
export const DISMISSING = 2;
|
||||||
|
|
||||||
const ION_ACTION_SHEET_DID_DISMISS_EVENT = 'ionActionSheetDidDismiss';
|
const ION_ACTION_SHEET_DID_DISMISS_EVENT = 'ionActionSheetDidDismiss';
|
||||||
const ION_ACTION_SHEET_WILL_DISMISS_EVENT = 'ionActionSheetWillDismiss';
|
const ION_ACTION_SHEET_WILL_DISMISS_EVENT = 'ionActionSheetWillDismiss';
|
||||||
|
@ -12,20 +12,20 @@ export class AlertController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getAlertProxy(opts: AlertOptions){
|
export function getAlertProxy(opts: AlertOptions) {
|
||||||
return {
|
return {
|
||||||
id: alertId++,
|
id: alertId++,
|
||||||
state: PRESENTING,
|
state: PRESENTING,
|
||||||
opts: opts,
|
opts: opts,
|
||||||
present: function() { return present(this)},
|
present: function() { return present(this); },
|
||||||
dismiss: function() { return dismiss(this)},
|
dismiss: function() { return dismiss(this); },
|
||||||
onDidDismiss: function(callback: (data: any, role: string) => void) {
|
onDidDismiss: function(callback: (data: any, role: string) => void) {
|
||||||
(this as AlertProxyInternal).onDidDismissHandler = callback;
|
(this as AlertProxyInternal).onDidDismissHandler = callback;
|
||||||
},
|
},
|
||||||
onWillDismiss: function(callback: (data: any, role: string) => void) {
|
onWillDismiss: function(callback: (data: any, role: string) => void) {
|
||||||
(this as AlertProxyInternal).onWillDismissHandler = callback;
|
(this as AlertProxyInternal).onWillDismissHandler = callback;
|
||||||
},
|
},
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function present(alertProxy: AlertProxyInternal): Promise<any> {
|
export function present(alertProxy: AlertProxyInternal): Promise<any> {
|
||||||
@ -82,8 +82,8 @@ export function loadOverlay(opts: AlertOptions): Promise<HTMLIonAlertElement> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface AlertProxy {
|
export interface AlertProxy {
|
||||||
present(): Promise<void>
|
present(): Promise<void>;
|
||||||
dismiss(): Promise<void>
|
dismiss(): Promise<void>;
|
||||||
onDidDismiss(callback: (data: any, role: string) => void): void;
|
onDidDismiss(callback: (data: any, role: string) => void): void;
|
||||||
onWillDismiss(callback: (data: any, role: string) => void): void;
|
onWillDismiss(callback: (data: any, role: string) => void): void;
|
||||||
}
|
}
|
||||||
@ -101,4 +101,4 @@ export const PRESENTING = 1;
|
|||||||
export const DISMISSING = 2;
|
export const DISMISSING = 2;
|
||||||
|
|
||||||
const ION_ALERT_DID_DISMISS_EVENT = 'ionAlertDidDismiss';
|
const ION_ALERT_DID_DISMISS_EVENT = 'ionAlertDidDismiss';
|
||||||
const ION_ALERT_WILL_DISMISS_EVENT = 'ionAlertWillDismiss';
|
const ION_ALERT_WILL_DISMISS_EVENT = 'ionAlertWillDismiss';
|
||||||
|
@ -90,4 +90,4 @@ export function getNavByIdOrNameAsyncImpl(app: App, nameOrId: number | string):
|
|||||||
return app._element.componentOnReady().then(() => {
|
return app._element.componentOnReady().then(() => {
|
||||||
return app._element.getNavByIdOrName(nameOrId);
|
return app._element.getNavByIdOrName(nameOrId);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -30,4 +30,4 @@ function getElement(): Promise<HTMLIonEventsElement> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const ELEMENT_NAME = 'ion-events';
|
const ELEMENT_NAME = 'ion-events';
|
||||||
|
@ -12,20 +12,20 @@ export class LoadingController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getLoadingProxy(opts: LoadingOptions){
|
export function getLoadingProxy(opts: LoadingOptions) {
|
||||||
return {
|
return {
|
||||||
id: loadingId++,
|
id: loadingId++,
|
||||||
state: PRESENTING,
|
state: PRESENTING,
|
||||||
opts: opts,
|
opts: opts,
|
||||||
present: function() { return present(this)},
|
present: function() { return present(this); },
|
||||||
dismiss: function() { return dismiss(this)},
|
dismiss: function() { return dismiss(this); },
|
||||||
onDidDismiss: function(callback: (data: any, role: string) => void) {
|
onDidDismiss: function(callback: (data: any, role: string) => void) {
|
||||||
(this as LoadingProxyInternal).onDidDismissHandler = callback;
|
(this as LoadingProxyInternal).onDidDismissHandler = callback;
|
||||||
},
|
},
|
||||||
onWillDismiss: function(callback: (data: any, role: string) => void) {
|
onWillDismiss: function(callback: (data: any, role: string) => void) {
|
||||||
(this as LoadingProxyInternal).onWillDismissHandler = callback;
|
(this as LoadingProxyInternal).onWillDismissHandler = callback;
|
||||||
},
|
},
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function present(loadingProxy: LoadingProxyInternal): Promise<any> {
|
export function present(loadingProxy: LoadingProxyInternal): Promise<any> {
|
||||||
@ -82,8 +82,8 @@ export function loadOverlay(opts: LoadingOptions): Promise<HTMLIonLoadingElement
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface LoadingProxy {
|
export interface LoadingProxy {
|
||||||
present(): Promise<void>
|
present(): Promise<void>;
|
||||||
dismiss(): Promise<void>
|
dismiss(): Promise<void>;
|
||||||
onDidDismiss(callback: (data: any, role: string) => void): void;
|
onDidDismiss(callback: (data: any, role: string) => void): void;
|
||||||
onWillDismiss(callback: (data: any, role: string) => void): void;
|
onWillDismiss(callback: (data: any, role: string) => void): void;
|
||||||
}
|
}
|
||||||
@ -101,4 +101,4 @@ export const PRESENTING = 1;
|
|||||||
export const DISMISSING = 2;
|
export const DISMISSING = 2;
|
||||||
|
|
||||||
const ION_LOADING_DID_DISMISS_EVENT = 'ionLoadingDidDismiss';
|
const ION_LOADING_DID_DISMISS_EVENT = 'ionLoadingDidDismiss';
|
||||||
const ION_LOADING_WILL_DISMISS_EVENT = 'ionLoadingWillDismiss';
|
const ION_LOADING_WILL_DISMISS_EVENT = 'ionLoadingWillDismiss';
|
||||||
|
@ -93,7 +93,7 @@ export class MenuController {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
isOpenAsync(menuId?: string): Promise<boolean>{
|
isOpenAsync(menuId?: string): Promise<boolean> {
|
||||||
return element.componentOnReady().then(() => {
|
return element.componentOnReady().then(() => {
|
||||||
return element.isOpen(menuId);
|
return element.isOpen(menuId);
|
||||||
});
|
});
|
||||||
@ -124,4 +124,4 @@ export class MenuController {
|
|||||||
return element.toggle(menuId);
|
return element.toggle(menuId);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -120,4 +120,4 @@ export class NavController implements PublicNav {
|
|||||||
}
|
}
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ export type DocumentDirection = 'ltr' | 'rtl';
|
|||||||
|
|
||||||
let dir: DocumentDirection = 'ltr';
|
let dir: DocumentDirection = 'ltr';
|
||||||
let isRtl = false;
|
let isRtl = false;
|
||||||
let lang: string = '';
|
let lang = '';
|
||||||
|
|
||||||
export class Platform {
|
export class Platform {
|
||||||
|
|
||||||
@ -225,4 +225,4 @@ export function getHydratedPlatform(platform: Platform): Promise<HTMLIonPlatform
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
return platform._element.componentOnReady();
|
return platform._element.componentOnReady();
|
||||||
}
|
}
|
||||||
|
@ -12,20 +12,20 @@ export class ToastController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getToastProxy(opts: ToastOptions){
|
export function getToastProxy(opts: ToastOptions) {
|
||||||
return {
|
return {
|
||||||
id: toastId++,
|
id: toastId++,
|
||||||
state: PRESENTING,
|
state: PRESENTING,
|
||||||
opts: opts,
|
opts: opts,
|
||||||
present: function() { return present(this)},
|
present: function() { return present(this); },
|
||||||
dismiss: function() { return dismiss(this)},
|
dismiss: function() { return dismiss(this); },
|
||||||
onDidDismiss: function(callback: (data: any, role: string) => void) {
|
onDidDismiss: function(callback: (data: any, role: string) => void) {
|
||||||
(this as ToastProxyInternal).onDidDismissHandler = callback;
|
(this as ToastProxyInternal).onDidDismissHandler = callback;
|
||||||
},
|
},
|
||||||
onWillDismiss: function(callback: (data: any, role: string) => void) {
|
onWillDismiss: function(callback: (data: any, role: string) => void) {
|
||||||
(this as ToastProxyInternal).onWillDismissHandler = callback;
|
(this as ToastProxyInternal).onWillDismissHandler = callback;
|
||||||
},
|
},
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function present(toastProxy: ToastProxyInternal): Promise<any> {
|
export function present(toastProxy: ToastProxyInternal): Promise<any> {
|
||||||
@ -82,8 +82,8 @@ export function loadOverlay(opts: ToastOptions): Promise<HTMLIonToastElement> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface ToastProxy {
|
export interface ToastProxy {
|
||||||
present(): Promise<void>
|
present(): Promise<void>;
|
||||||
dismiss(): Promise<void>
|
dismiss(): Promise<void>;
|
||||||
onDidDismiss(callback: (data: any, role: string) => void): void;
|
onDidDismiss(callback: (data: any, role: string) => void): void;
|
||||||
onWillDismiss(callback: (data: any, role: string) => void): void;
|
onWillDismiss(callback: (data: any, role: string) => void): void;
|
||||||
}
|
}
|
||||||
@ -101,4 +101,4 @@ export const PRESENTING = 1;
|
|||||||
export const DISMISSING = 2;
|
export const DISMISSING = 2;
|
||||||
|
|
||||||
const ION_TOAST_DID_DISMISS_EVENT = 'ionToastDidDismiss';
|
const ION_TOAST_DID_DISMISS_EVENT = 'ionToastDidDismiss';
|
||||||
const ION_TOAST_WILL_DISMISS_EVENT = 'ionToastWillDismiss';
|
const ION_TOAST_WILL_DISMISS_EVENT = 'ionToastWillDismiss';
|
||||||
|
@ -14,10 +14,10 @@ import {
|
|||||||
} from '@angular/router';
|
} from '@angular/router';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
TreeNode,
|
||||||
advanceActivatedRoute,
|
advanceActivatedRoute,
|
||||||
forEach,
|
forEach,
|
||||||
nodeChildrenAsMap,
|
nodeChildrenAsMap
|
||||||
TreeNode
|
|
||||||
} from './router-utils';
|
} from './router-utils';
|
||||||
|
|
||||||
export class AsyncActivateRoutes {
|
export class AsyncActivateRoutes {
|
||||||
@ -64,7 +64,7 @@ export class AsyncActivateRoutes {
|
|||||||
() => {
|
() => {
|
||||||
const promises: Promise<void>[] = [];
|
const promises: Promise<void>[] = [];
|
||||||
// De-activate the routes that will not be re-used
|
// De-activate the routes that will not be re-used
|
||||||
forEach(children, (v: TreeNode<ActivatedRoute>, childName: string) => {
|
forEach(children, (v: TreeNode<ActivatedRoute>) => {
|
||||||
promises.push(this.deactivateRouteAndItsChildren(v, contexts));
|
promises.push(this.deactivateRouteAndItsChildren(v, contexts));
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ export class AsyncActivateRoutes {
|
|||||||
const contexts = route.value.component ? context.children : parentContexts;
|
const contexts = route.value.component ? context.children : parentContexts;
|
||||||
|
|
||||||
const promises: Promise<void>[] = [];
|
const promises: Promise<void>[] = [];
|
||||||
forEach(children, (v: any, k: string) => {
|
forEach(children, (v: any) => {
|
||||||
promises.push(this.deactivateRouteAndItsChildren(v, contexts));
|
promises.push(this.deactivateRouteAndItsChildren(v, contexts));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ export function monkeyPatchRouter(router: any) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
routes.push(new AsyncActivateRoutes(router.routeReuseStrategy, state, storedState, (evt: Event) => router.triggerEvent(evt)))
|
routes.push(new AsyncActivateRoutes(router.routeReuseStrategy, state, storedState, (evt: Event) => router.triggerEvent(evt)));
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
@ -83,7 +83,7 @@ export function monkeyPatchRouter(router: any) {
|
|||||||
resolvePromise(false);
|
resolvePromise(false);
|
||||||
} else {
|
} else {
|
||||||
router.resetStateAndUrl(storedState, storedUrl, rawUrl);
|
router.resetStateAndUrl(storedState, storedUrl, rawUrl);
|
||||||
(router.events as any as Subject<Event>)
|
(router.events as Subject<Event>)
|
||||||
.next(new NavigationError(id, router.serializeUrl(url), e));
|
.next(new NavigationError(id, router.serializeUrl(url), e));
|
||||||
try {
|
try {
|
||||||
resolvePromise(router.errorHandler(e));
|
resolvePromise(router.errorHandler(e));
|
||||||
@ -100,4 +100,4 @@ function isNavigationCancelingError(error: any) {
|
|||||||
return error && (/** @type {?} */ (error))[NAVIGATION_CANCELING_ERROR];
|
return error && (/** @type {?} */ (error))[NAVIGATION_CANCELING_ERROR];
|
||||||
}
|
}
|
||||||
|
|
||||||
const NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError';
|
const NAVIGATION_CANCELING_ERROR = 'ngNavigationCancelingError';
|
||||||
|
@ -20,4 +20,4 @@ export class OutletInjector implements Injector {
|
|||||||
|
|
||||||
return this.parent.get(token, notFoundValue);
|
return this.parent.get(token, notFoundValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,6 @@ import {
|
|||||||
ElementRef,
|
ElementRef,
|
||||||
EventEmitter,
|
EventEmitter,
|
||||||
Injector,
|
Injector,
|
||||||
NgZone,
|
|
||||||
OnDestroy,
|
OnDestroy,
|
||||||
OnInit,
|
OnInit,
|
||||||
Output,
|
Output,
|
||||||
@ -16,13 +15,13 @@ import {
|
|||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
PRIMARY_OUTLET,
|
|
||||||
ActivatedRoute,
|
ActivatedRoute,
|
||||||
ChildrenOutletContexts,
|
ChildrenOutletContexts,
|
||||||
|
PRIMARY_OUTLET,
|
||||||
Router
|
Router
|
||||||
} from '@angular/router';
|
} from '@angular/router';
|
||||||
|
|
||||||
import { NavResult, RouterDelegate } from '@ionic/core';
|
import { RouterDelegate } from '@ionic/core';
|
||||||
|
|
||||||
import { OutletInjector } from './outlet-injector';
|
import { OutletInjector } from './outlet-injector';
|
||||||
import { RouteEventHandler } from './route-event-handler';
|
import { RouteEventHandler } from './route-event-handler';
|
||||||
@ -179,7 +178,7 @@ export function getDataFromRoute(activatedRoute: ActivatedRoute): Promise<any> {
|
|||||||
promises.push(getDataFromObservable(activatedRoute));
|
promises.push(getDataFromObservable(activatedRoute));
|
||||||
promises.push(getDataFromParams(activatedRoute));
|
promises.push(getDataFromParams(activatedRoute));
|
||||||
return Promise.all(promises).then(([data, params]: any[]) => {
|
return Promise.all(promises).then(([data, params]: any[]) => {
|
||||||
let combined = {};
|
const combined = {};
|
||||||
Object.assign(combined, data, params);
|
Object.assign(combined, data, params);
|
||||||
return combined;
|
return combined;
|
||||||
});
|
});
|
||||||
@ -199,4 +198,4 @@ export function getDataFromParams(activatedRoute: ActivatedRoute) {
|
|||||||
resolve(data || {});
|
resolve(data || {});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -38,4 +38,4 @@ export interface PushPopOutletContext {
|
|||||||
resolver?: ComponentFactoryResolver;
|
resolver?: ComponentFactoryResolver;
|
||||||
children?: PushPopOutletContexts;
|
children?: PushPopOutletContexts;
|
||||||
attachRef: ComponentRef<any>;
|
attachRef: ComponentRef<any>;
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ import { getIonApp } from '../util/util';
|
|||||||
@Injectable()
|
@Injectable()
|
||||||
export class RouteEventHandler {
|
export class RouteEventHandler {
|
||||||
|
|
||||||
constructor(private router: Router) {
|
constructor(public router: Router) {
|
||||||
|
|
||||||
router.events.subscribe((event: Event) => {
|
router.events.subscribe((event: Event) => {
|
||||||
if (event instanceof NavigationEnd) {
|
if (event instanceof NavigationEnd) {
|
||||||
|
@ -15,13 +15,13 @@ import {
|
|||||||
import {ɵgetDOM as getDOM} from '@angular/platform-browser';
|
import {ɵgetDOM as getDOM} from '@angular/platform-browser';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ROUTES,
|
|
||||||
ROUTER_CONFIGURATION,
|
|
||||||
ChildrenOutletContexts,
|
ChildrenOutletContexts,
|
||||||
ExtraOptions,
|
ExtraOptions,
|
||||||
|
ROUTER_CONFIGURATION,
|
||||||
|
ROUTES,
|
||||||
Route,
|
Route,
|
||||||
Router,
|
|
||||||
RouteReuseStrategy,
|
RouteReuseStrategy,
|
||||||
|
Router,
|
||||||
UrlHandlingStrategy,
|
UrlHandlingStrategy,
|
||||||
UrlSerializer
|
UrlSerializer
|
||||||
} from '@angular/router';
|
} from '@angular/router';
|
||||||
@ -70,7 +70,7 @@ export class IonicRouterModule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function setupRouter(
|
export function setupRouter(
|
||||||
ref: ApplicationRef, urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts,
|
_ref: ApplicationRef, urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts,
|
||||||
location: Location, injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler,
|
location: Location, injector: Injector, loader: NgModuleFactoryLoader, compiler: Compiler,
|
||||||
config: Route[][], opts: ExtraOptions = {}, urlHandlingStrategy?: UrlHandlingStrategy,
|
config: Route[][], opts: ExtraOptions = {}, urlHandlingStrategy?: UrlHandlingStrategy,
|
||||||
routeReuseStrategy?: RouteReuseStrategy) {
|
routeReuseStrategy?: RouteReuseStrategy) {
|
||||||
@ -96,7 +96,7 @@ if (opts.errorHandler) {
|
|||||||
if (opts.enableTracing) {
|
if (opts.enableTracing) {
|
||||||
const dom = getDOM();
|
const dom = getDOM();
|
||||||
router.events.subscribe((e: any) => {
|
router.events.subscribe((e: any) => {
|
||||||
dom.logGroup(`Router Event: ${(<any>e.constructor).name}`);
|
dom.logGroup(`Router Event: ${(e.constructor).name}`);
|
||||||
dom.log(e.toString());
|
dom.log(e.toString());
|
||||||
dom.log(e);
|
dom.log(e);
|
||||||
dom.logGroupEnd();
|
dom.logGroupEnd();
|
||||||
@ -112,4 +112,4 @@ if (opts.paramsInheritanceStrategy) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return router;
|
return router;
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ export function nodeChildrenAsMap<T extends{outlet: string}>(node: TreeNode<T>|
|
|||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function forEach<K, V>(map: {[key: string]: V}, callback: (v: V, k: string) => void): void {
|
export function forEach<_K, V>(map: {[key: string]: V}, callback: (v: V, k: string) => void): void {
|
||||||
for (const prop in map) {
|
for (const prop in map) {
|
||||||
if (map.hasOwnProperty(prop)) {
|
if (map.hasOwnProperty(prop)) {
|
||||||
callback(map[prop], prop);
|
callback(map[prop], prop);
|
||||||
@ -30,28 +30,28 @@ export class TreeNode<T> {
|
|||||||
export function advanceActivatedRoute(route: any): void {
|
export function advanceActivatedRoute(route: any): void {
|
||||||
if (route.snapshot) {
|
if (route.snapshot) {
|
||||||
const currentSnapshot = route.snapshot;
|
const currentSnapshot = route.snapshot;
|
||||||
const nextSnapshot = (route as any)._futureSnapshot;
|
const nextSnapshot = (route)._futureSnapshot;
|
||||||
route.snapshot = nextSnapshot;
|
route.snapshot = nextSnapshot;
|
||||||
if (!shallowEqual(currentSnapshot.queryParams, nextSnapshot.queryParams)) {
|
if (!shallowEqual(currentSnapshot.queryParams, nextSnapshot.queryParams)) {
|
||||||
(<any>route.queryParams).next(nextSnapshot.queryParams);
|
(route.queryParams).next(nextSnapshot.queryParams);
|
||||||
}
|
}
|
||||||
if (currentSnapshot.fragment !== nextSnapshot.fragment) {
|
if (currentSnapshot.fragment !== nextSnapshot.fragment) {
|
||||||
(<any>route.fragment).next(nextSnapshot.fragment);
|
(route.fragment).next(nextSnapshot.fragment);
|
||||||
}
|
}
|
||||||
if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) {
|
if (!shallowEqual(currentSnapshot.params, nextSnapshot.params)) {
|
||||||
(<any>route.params).next(nextSnapshot.params);
|
(route.params).next(nextSnapshot.params);
|
||||||
}
|
}
|
||||||
if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) {
|
if (!shallowEqualArrays(currentSnapshot.url, nextSnapshot.url)) {
|
||||||
(<any>route.url).next(nextSnapshot.url);
|
(route.url).next(nextSnapshot.url);
|
||||||
}
|
}
|
||||||
if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) {
|
if (!shallowEqual(currentSnapshot.data, nextSnapshot.data)) {
|
||||||
(<any>route.data).next(nextSnapshot.data);
|
(route.data).next(nextSnapshot.data);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
route.snapshot = (route as any)._futureSnapshot;
|
route.snapshot = (route)._futureSnapshot;
|
||||||
|
|
||||||
// this is for resolved data
|
// this is for resolved data
|
||||||
(<any>route.data).next((route as any)._futureSnapshot.data);
|
(route.data).next((route)._futureSnapshot.data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,6 +66,7 @@ export function shallowEqualArrays(a: any[], b: any[]): boolean {
|
|||||||
export function shallowEqual(a: {[x: string]: any}, b: {[x: string]: any}): boolean {
|
export function shallowEqual(a: {[x: string]: any}, b: {[x: string]: any}): boolean {
|
||||||
const k1 = Object.keys(a);
|
const k1 = Object.keys(a);
|
||||||
const k2 = Object.keys(b);
|
const k2 = Object.keys(b);
|
||||||
|
/*tslint:disable*/
|
||||||
if (k1.length != k2.length) {
|
if (k1.length != k2.length) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -81,4 +82,4 @@ export function shallowEqual(a: {[x: string]: any}, b: {[x: string]: any}): bool
|
|||||||
|
|
||||||
export function flatten<T>(arr: T[][]): T[] {
|
export function flatten<T>(arr: T[][]): T[] {
|
||||||
return Array.prototype.concat.apply([], arr);
|
return Array.prototype.concat.apply([], arr);
|
||||||
}
|
}
|
||||||
|
@ -20,4 +20,4 @@ export interface AngularEscapeHatch extends EscapeHatch {
|
|||||||
activatedRoute?: ActivatedRoute;
|
activatedRoute?: ActivatedRoute;
|
||||||
cfr?: ComponentFactoryResolver;
|
cfr?: ComponentFactoryResolver;
|
||||||
injector?: Injector;
|
injector?: Injector;
|
||||||
}
|
}
|
||||||
|
@ -29,4 +29,4 @@ export function isString(something: any) {
|
|||||||
export function getIonApp(): Promise<HTMLIonAppElement> {
|
export function getIonApp(): Promise<HTMLIonAppElement> {
|
||||||
const element = ensureElementInBody('ion-app') as HTMLIonAppElement;
|
const element = ensureElementInBody('ion-app') as HTMLIonAppElement;
|
||||||
return element.componentOnReady();
|
return element.componentOnReady();
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowUnreachableCode": false,
|
"alwaysStrict": true,
|
||||||
"allowSyntheticDefaultImports": true,
|
"allowSyntheticDefaultImports": true,
|
||||||
|
"allowUnreachableCode": false,
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"emitDecoratorMetadata": true,
|
"emitDecoratorMetadata": true,
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
@ -13,17 +14,16 @@
|
|||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"noImplicitAny": true,
|
"noImplicitAny": true,
|
||||||
"noImplicitReturns": true,
|
"noImplicitReturns": true,
|
||||||
"noUnusedLocals": false,
|
"noUnusedLocals": true,
|
||||||
"noUnusedParameters": false,
|
"noUnusedParameters": true,
|
||||||
"outDir": "dist",
|
"outDir": "dist",
|
||||||
|
"pretty": true,
|
||||||
"removeComments": false,
|
"removeComments": false,
|
||||||
|
"rootDir": "src",
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"target": "es2015",
|
"target": "es2015"
|
||||||
"rootDir": "src"
|
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"src/index.ts"
|
"src/index.ts"
|
||||||
],
|
]
|
||||||
"compileOnSave": false,
|
|
||||||
"buildOnSave": false
|
|
||||||
}
|
}
|
||||||
|
6
packages/core/package-lock.json
generated
6
packages/core/package-lock.json
generated
@ -10593,9 +10593,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tslint-ionic-rules": {
|
"tslint-ionic-rules": {
|
||||||
"version": "0.0.12",
|
"version": "0.0.13",
|
||||||
"resolved": "https://registry.npmjs.org/tslint-ionic-rules/-/tslint-ionic-rules-0.0.12.tgz",
|
"resolved": "https://registry.npmjs.org/tslint-ionic-rules/-/tslint-ionic-rules-0.0.13.tgz",
|
||||||
"integrity": "sha512-CPihu6XsjinOW++UbnNrXXUi2doHtGdT00v6/v6lVY3YVujqtX/Dtbvr2s+A3Vj06Q/MliBBWV8uysabxlL1NQ==",
|
"integrity": "sha512-wBQbKjLlazwTW9Ql2sZYdZ04cPYCaHSdo8PuJy9Ke9d4ewyjCRweJ8AB0OKtk3MtSuNiJJumnJJYUgNGuNjevg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"tslint-eslint-rules": "4.1.1"
|
"tslint-eslint-rules": "4.1.1"
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
"sass-lint": "^1.12.1",
|
"sass-lint": "^1.12.1",
|
||||||
"selenium-webdriver": "^3.6.0",
|
"selenium-webdriver": "^3.6.0",
|
||||||
"tslint": "^5.8.0",
|
"tslint": "^5.8.0",
|
||||||
"tslint-ionic-rules": "0.0.12",
|
"tslint-ionic-rules": "0.0.13",
|
||||||
"yargs": "^10.0.3"
|
"yargs": "^10.0.3"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -26,7 +26,7 @@ export class Events {
|
|||||||
* @return true if a handler was removed
|
* @return true if a handler was removed
|
||||||
*/
|
*/
|
||||||
unsubscribe(topic: string, handler: Function = null) {
|
unsubscribe(topic: string, handler: Function = null) {
|
||||||
let t = this.c[topic];
|
const t = this.c[topic];
|
||||||
if (!t) {
|
if (!t) {
|
||||||
// Wasn't found, wasn't removed
|
// Wasn't found, wasn't removed
|
||||||
return false;
|
return false;
|
||||||
@ -39,7 +39,7 @@ export class Events {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// We need to find and remove a specific handler
|
// We need to find and remove a specific handler
|
||||||
let i = t.indexOf(handler);
|
const i = t.indexOf(handler);
|
||||||
|
|
||||||
if (i < 0) {
|
if (i < 0) {
|
||||||
// Wasn't found, wasn't removed
|
// Wasn't found, wasn't removed
|
||||||
@ -63,12 +63,12 @@ export class Events {
|
|||||||
* @param {any} eventData the data to send as the event
|
* @param {any} eventData the data to send as the event
|
||||||
*/
|
*/
|
||||||
publish(topic: string, ...args: any[]) {
|
publish(topic: string, ...args: any[]) {
|
||||||
var t = this.c[topic];
|
const t = this.c[topic];
|
||||||
if (!t) {
|
if (!t) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
let responses: any[] = [];
|
const responses: any[] = [];
|
||||||
t.forEach((handler: any) => {
|
t.forEach((handler: any) => {
|
||||||
responses.push(handler(...args));
|
responses.push(handler(...args));
|
||||||
});
|
});
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowUnreachableCode": false,
|
|
||||||
"alwaysStrict": true,
|
"alwaysStrict": true,
|
||||||
|
"allowSyntheticDefaultImports": true,
|
||||||
|
"allowUnreachableCode": false,
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
@ -9,7 +10,7 @@
|
|||||||
"jsxFactory": "h",
|
"jsxFactory": "h",
|
||||||
"lib": [
|
"lib": [
|
||||||
"dom",
|
"dom",
|
||||||
"es2015"
|
"es2017"
|
||||||
],
|
],
|
||||||
"module": "es2015",
|
"module": "es2015",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
|
Reference in New Issue
Block a user