diff --git a/angular.json b/angular.json index 44593cd28..eb1773b43 100644 --- a/angular.json +++ b/angular.json @@ -79,7 +79,7 @@ "lint": { "builder": "@angular-devkit/build-angular:tslint", "options": { - "tsConfig": ["src/tsconfig.app.json", "src/tsconfig.spec.json"], + "tsConfig": ["demo/src/tsconfig.app.json", "demo/src/tsconfig.spec.json"], "exclude": ["**/node_modules/**"] } } diff --git a/package-lock.json b/package-lock.json index b5e7e666d..8c8d9c1e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "ngx-tethys", - "version": "7.6.18", + "version": "7.6.22", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -125,19 +125,22 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true + "dev": true, + "optional": true }, "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "dev": true + "dev": true, + "optional": true }, "aws4": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", - "dev": true + "dev": true, + "optional": true }, "big.js": { "version": "5.2.2", @@ -389,6 +392,7 @@ "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", "dev": true, + "optional": true, "requires": { "asynckit": "^0.4.0", "combined-stream": "^1.0.6", @@ -414,6 +418,7 @@ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", "dev": true, + "optional": true, "requires": { "ajv": "^6.5.5", "har-schema": "^2.0.0" @@ -424,6 +429,7 @@ "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", "dev": true, + "optional": true, "requires": { "assert-plus": "^1.0.0", "jsprim": "^1.2.2", @@ -542,13 +548,15 @@ "version": "1.38.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz", "integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg==", - "dev": true + "dev": true, + "optional": true }, "mime-types": { "version": "2.1.22", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz", "integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==", "dev": true, + "optional": true, "requires": { "mime-db": "~1.38.0" } @@ -621,19 +629,22 @@ "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "dev": true + "dev": true, + "optional": true }, "qs": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "dev": true + "dev": true, + "optional": true }, "request": { "version": "2.88.0", "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", "dev": true, + "optional": true, "requires": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -670,7 +681,8 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "dev": true, + "optional": true }, "semver": { "version": "5.6.0", @@ -712,6 +724,7 @@ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", "dev": true, + "optional": true, "requires": { "psl": "^1.1.24", "punycode": "^1.4.1" @@ -721,7 +734,8 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true + "dev": true, + "optional": true } } }, @@ -744,7 +758,8 @@ "version": "3.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", - "dev": true + "dev": true, + "optional": true }, "webpack": { "version": "4.29.0", @@ -1185,7 +1200,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -1206,12 +1222,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1226,17 +1244,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -1353,7 +1374,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -1365,6 +1387,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -1379,6 +1402,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -1386,12 +1410,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -1410,6 +1436,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -1490,7 +1517,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -1502,6 +1530,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -1587,7 +1616,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -1623,6 +1653,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -1642,6 +1673,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -1685,12 +1717,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -2134,7 +2168,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -2155,12 +2190,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2175,17 +2212,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -2302,7 +2342,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -2314,6 +2355,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -2328,6 +2370,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -2335,12 +2378,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -2359,6 +2404,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -2439,7 +2485,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -2451,6 +2498,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -2536,7 +2584,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -2572,6 +2621,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -2591,6 +2641,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -2634,12 +2685,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -2815,18 +2868,18 @@ } }, "@angular/cdk": { - "version": "7.3.3", - "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-7.3.3.tgz", - "integrity": "sha512-0M3nwq+c9+d+p0XeU12I9djutlsajRrxcu7AvHQXUs/5grYFsXsX0f468qXDiKmcgqGUBNtN2fBOUhGNlispuQ==", + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-7.3.7.tgz", + "integrity": "sha512-xbXxhHHKGkVuW6K7pzPmvpJXIwpl0ykBnvA2g+/7Sgy5Pd35wCC+UtHD9RYczDM/mkygNxMQtagyCErwFnDtQA==", "requires": { "parse5": "^5.0.0", "tslib": "^1.7.1" }, "dependencies": { "parse5": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.0.tgz", - "integrity": "sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz", + "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==", "optional": true } } @@ -3186,7 +3239,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -3207,12 +3261,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -3227,17 +3283,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -3354,7 +3413,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -3366,6 +3426,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -3380,6 +3441,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -3387,12 +3449,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -3411,6 +3475,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -3491,7 +3556,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -3503,6 +3569,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -3588,7 +3655,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -3624,6 +3692,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -3643,6 +3712,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -3686,12 +3756,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -4311,7 +4383,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -4332,12 +4405,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -4352,17 +4427,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -4479,7 +4557,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -4491,6 +4570,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -4505,6 +4585,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -4512,12 +4593,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -4536,6 +4619,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -4623,7 +4707,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -4635,6 +4720,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -4720,7 +4806,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -4756,6 +4843,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -4775,6 +4863,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -4818,12 +4907,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -4973,7 +5064,7 @@ }, "minimist": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, @@ -11830,7 +11921,8 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.1.1", @@ -11889,7 +11981,8 @@ "version": "0.4.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz", "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", - "dev": true + "dev": true, + "optional": true }, "bcrypt-pbkdf": { "version": "1.0.1", @@ -11906,6 +11999,7 @@ "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", "dev": true, + "optional": true, "requires": { "inherits": "~2.0.0" } @@ -11915,6 +12009,7 @@ "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz", "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=", "dev": true, + "optional": true, "requires": { "hoek": "2.x.x" } @@ -11924,6 +12019,7 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.7.tgz", "integrity": "sha1-Pv/DxQ4ABTH7cg6v+A8K6O8jz1k=", "dev": true, + "optional": true, "requires": { "balanced-match": "^0.4.1", "concat-map": "0.0.1" @@ -11933,7 +12029,8 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz", "integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E=", - "dev": true + "dev": true, + "optional": true }, "caseless": { "version": "0.12.0", @@ -11953,13 +12050,15 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true + "dev": true, + "optional": true }, "combined-stream": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", "dev": true, + "optional": true, "requires": { "delayed-stream": "~1.0.0" } @@ -11968,25 +12067,29 @@ "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true + "dev": true, + "optional": true }, "cryptiles": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=", "dev": true, + "optional": true, "requires": { "boom": "2.x.x" } @@ -12031,7 +12134,8 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true + "dev": true, + "optional": true }, "delegates": { "version": "1.0.0", @@ -12061,7 +12165,8 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz", "integrity": "sha1-4QgOBljjALBilJkMxw4VAiNf1VA=", - "dev": true + "dev": true, + "optional": true }, "forever-agent": { "version": "0.6.1", @@ -12086,7 +12191,8 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true + "dev": true, + "optional": true }, "fstream-ignore": { "version": "1.0.5", @@ -12141,6 +12247,7 @@ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "dev": true, + "optional": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -12185,6 +12292,7 @@ "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz", "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=", "dev": true, + "optional": true, "requires": { "boom": "2.x.x", "cryptiles": "2.x.x", @@ -12196,7 +12304,8 @@ "version": "2.16.3", "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=", - "dev": true + "dev": true, + "optional": true }, "http-signature": { "version": "1.1.1", @@ -12215,6 +12324,7 @@ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, + "optional": true, "requires": { "once": "^1.3.0", "wrappy": "1" @@ -12224,7 +12334,8 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.4", @@ -12238,6 +12349,7 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -12253,7 +12365,8 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true + "dev": true, + "optional": true }, "isstream": { "version": "0.1.2", @@ -12336,13 +12449,15 @@ "version": "1.27.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.27.0.tgz", "integrity": "sha1-gg9XIpa70g7CXtVeW13oaeVDbrE=", - "dev": true + "dev": true, + "optional": true }, "mime-types": { "version": "2.1.15", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz", "integrity": "sha1-pOv1BkCUVpI3uM9wBGd20J/JKu0=", "dev": true, + "optional": true, "requires": { "mime-db": "~1.27.0" } @@ -12352,6 +12467,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -12428,7 +12544,8 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true + "dev": true, + "optional": true }, "oauth-sign": { "version": "0.8.2", @@ -12449,6 +12566,7 @@ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -12482,7 +12600,8 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true + "dev": true, + "optional": true }, "performance-now": { "version": "0.2.0", @@ -12495,7 +12614,8 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", - "dev": true + "dev": true, + "optional": true }, "punycode": { "version": "1.4.1", @@ -12538,6 +12658,7 @@ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.9.tgz", "integrity": "sha1-z3jsb0ptHrQ9JkiMrJfwQudLf8g=", "dev": true, + "optional": true, "requires": { "buffer-shims": "~1.0.0", "core-util-is": "~1.0.0", @@ -12584,6 +12705,7 @@ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz", "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=", "dev": true, + "optional": true, "requires": { "glob": "^7.0.5" } @@ -12592,7 +12714,8 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz", "integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=", - "dev": true + "dev": true, + "optional": true }, "semver": { "version": "5.3.0", @@ -12620,6 +12743,7 @@ "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz", "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=", "dev": true, + "optional": true, "requires": { "hoek": "2.x.x" } @@ -12656,6 +12780,7 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -12667,6 +12792,7 @@ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz", "integrity": "sha1-YuIA8DmVWmgQ2N8KM//A8BNmLZg=", "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.0.1" } @@ -12676,6 +12802,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -12692,6 +12819,7 @@ "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", "dev": true, + "optional": true, "requires": { "block-stream": "*", "fstream": "^1.0.2", @@ -12753,7 +12881,8 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true + "dev": true, + "optional": true }, "uuid": { "version": "3.0.1", @@ -12786,7 +12915,8 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true + "dev": true, + "optional": true } } }, @@ -13554,7 +13684,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -13575,12 +13706,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -13595,17 +13728,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -13722,7 +13858,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -13734,6 +13871,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -13748,6 +13886,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -13755,12 +13894,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -13779,6 +13920,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -13859,7 +14001,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -13871,6 +14014,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -13956,7 +14100,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -13992,6 +14137,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -14011,6 +14157,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -14054,12 +14201,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -16949,7 +17098,7 @@ }, "onetime": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", "dev": true }, @@ -17086,7 +17235,7 @@ }, "onetime": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", "dev": true }, @@ -18604,7 +18753,8 @@ }, "ansi-regex": { "version": "2.1.1", - "bundled": true + "bundled": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -18622,11 +18772,13 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -18639,15 +18791,18 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "concat-map": { "version": "0.0.1", - "bundled": true + "bundled": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -18750,7 +18905,8 @@ }, "inherits": { "version": "2.0.3", - "bundled": true + "bundled": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -18760,6 +18916,7 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -18772,17 +18929,20 @@ "minimatch": { "version": "3.0.4", "bundled": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true + "bundled": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -18799,6 +18959,7 @@ "mkdirp": { "version": "0.5.1", "bundled": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -18871,7 +19032,8 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true + "bundled": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -18881,6 +19043,7 @@ "once": { "version": "1.4.0", "bundled": true, + "optional": true, "requires": { "wrappy": "1" } @@ -18956,7 +19119,8 @@ }, "safe-buffer": { "version": "5.1.2", - "bundled": true + "bundled": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -18986,6 +19150,7 @@ "string-width": { "version": "1.0.2", "bundled": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -19003,6 +19168,7 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -19041,11 +19207,13 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true + "bundled": true, + "optional": true }, "yallist": { "version": "3.0.3", - "bundled": true + "bundled": true, + "optional": true } } }, @@ -19758,7 +19926,7 @@ }, "typescript": { "version": "2.7.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz", + "resolved": "http://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz", "integrity": "sha512-p5TCYZDAO0m4G344hD+wx/LATebLWZNkkh2asWUFqSsD2OrDNhbAHuSjobrmsUmdzjJjEeZVU9g1h3O6vpstnw==", "dev": true }, @@ -20666,7 +20834,7 @@ }, "onetime": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", "dev": true }, @@ -25540,7 +25708,7 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" }, "source-map": { @@ -27579,7 +27747,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -27600,12 +27769,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -27620,17 +27791,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -27747,7 +27921,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -27759,6 +27934,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -27773,6 +27949,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -27780,12 +27957,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -27804,6 +27983,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -27884,7 +28064,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -27896,6 +28077,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -27981,7 +28163,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -28017,6 +28200,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -28036,6 +28220,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -28079,12 +28264,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, diff --git a/package.json b/package.json index e102b52c4..3b078311f 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ ], "dependencies": { "@angular/animations": "^7.2.6", - "@angular/cdk": "^7.3.3", + "@angular/cdk": "^7.3.7", "@angular/common": "^7.2.6", "@angular/compiler": "^7.2.6", "@angular/core": "^7.2.6", diff --git a/src/core/overlay/upper-overlay-ref.ts b/src/core/overlay/upper-overlay-ref.ts index 216202756..3b8f2897e 100644 --- a/src/core/overlay/upper-overlay-ref.ts +++ b/src/core/overlay/upper-overlay-ref.ts @@ -163,9 +163,13 @@ export abstract class ThyInternalUpperOverlayRef< * Updates the overlay's position when is GlobalPositionStrategy * @param position New overlay position. */ - protected updateGlobalPosition(position?: ThyUpperOverlayPosition): this { + updateGlobalPosition(position?: ThyUpperOverlayPosition): this { const strategy = this.getPositionStrategy() as GlobalPositionStrategy; + if (!(strategy instanceof GlobalPositionStrategy)) { + throw new Error(`current strategy is not GlobalPositionStrategy`); + } + if (position && (position.left || position.right)) { position.left ? strategy.left(position.left) : strategy.right(position.right); } else { diff --git a/src/core/overlay/upper-overlay.config.ts b/src/core/overlay/upper-overlay.config.ts index a3bacf555..ed1410480 100644 --- a/src/core/overlay/upper-overlay.config.ts +++ b/src/core/overlay/upper-overlay.config.ts @@ -57,9 +57,6 @@ export class ThyUpperOverlayConfig { /** Max-height of the dialog. If a number is provided, pixel units are assumed. */ maxHeight?: number | string; - /** Position overrides. */ - position?: ThyUpperOverlayPosition; - /** Data being injected into the child component. */ initialState?: TData | null = null; diff --git a/src/core/overlay/upper-overlay.service.ts b/src/core/overlay/upper-overlay.service.ts index 6a924b9c7..f6ef640e9 100644 --- a/src/core/overlay/upper-overlay.service.ts +++ b/src/core/overlay/upper-overlay.service.ts @@ -140,21 +140,21 @@ export abstract class ThyUpperOverlayService< const overlayConfig: OverlayConfig = this.buildOverlayConfig(config); const overlayRef = this.overlay.create(overlayConfig); - const dialogContainer = this.attachUpperOverlayContainer(overlayRef, config); - const dialogRef = this.attachUpperOverlayContent( + const overlayContainer = this.attachUpperOverlayContainer(overlayRef, config); + const upperOverlayRef = this.attachUpperOverlayContent( componentOrTemplateRef, - dialogContainer, + overlayContainer, overlayRef, config ); - this.openedOverlays.push(dialogRef); - dialogRef.afterClosed().subscribe(() => { - this.removeOpenedOverlay(dialogRef); + this.openedOverlays.push(upperOverlayRef); + upperOverlayRef.afterClosed().subscribe(() => { + this.removeOpenedOverlay(upperOverlayRef); }); - this._afterOpened.next(dialogRef); + this._afterOpened.next(upperOverlayRef); - return dialogRef; + return upperOverlayRef; } afterAllClosed() { diff --git a/src/core/overlay/utils.spec.ts b/src/core/overlay/utils.spec.ts index d7d812977..7eaab0b4f 100644 --- a/src/core/overlay/utils.spec.ts +++ b/src/core/overlay/utils.spec.ts @@ -118,17 +118,17 @@ describe(`overlay`, () => { describe('getFlexiblePositions', () => { const connectionFallbackPositionsMap: { [key: string]: ThyPlacement[] } = { top: ['topLeft', 'topRight', 'bottom', 'bottomLeft', 'bottomRight'], - topLeft: ['top', 'topRight', 'bottom', 'bottomLeft', 'bottomRight'], - topRight: ['top', 'topLeft', 'bottom', 'bottomLeft', 'bottomRight'], + topLeft: ['top', 'topRight', 'bottomLeft', 'bottom', 'bottomRight'], + topRight: ['top', 'topLeft', 'bottomRight', 'bottom', 'bottomLeft'], bottom: ['bottomLeft', 'bottomRight', 'top', 'topLeft', 'topRight'], - bottomLeft: ['bottom', 'bottomRight', 'top', 'topLeft', 'topRight'], - bottomRight: ['bottom', 'bottomLeft', 'top', 'topLeft', 'topRight'], + bottomLeft: ['bottom', 'bottomRight', 'topLeft', 'top', 'topRight'], + bottomRight: ['bottom', 'bottomLeft', 'topRight', 'top', 'topLeft'], left: ['leftTop', 'leftBottom', 'right', 'rightTop', 'rightBottom'], - leftTop: ['left', 'leftBottom', 'right', 'rightTop', 'rightBottom'], - leftBottom: ['left', 'leftTop', 'right', 'rightTop', 'rightBottom'], + leftTop: ['left', 'leftBottom', 'rightTop', 'right', 'rightBottom'], + leftBottom: ['left', 'leftTop', 'rightBottom', 'right', 'rightTop'], right: ['rightTop', 'rightBottom', 'left', 'leftTop', 'leftBottom'], - rightTop: ['right', 'rightBottom', 'left', 'leftTop', 'leftBottom'], - rightBottom: ['right', 'rightTop', 'left', 'leftTop', 'leftBottom'] + rightTop: ['right', 'rightBottom', 'leftTop', 'left', 'leftBottom'], + rightBottom: ['right', 'rightTop', 'leftBottom', 'left', 'leftTop'] }; it(`should get correct positions for top placement without offset`, () => { diff --git a/src/core/overlay/utils.ts b/src/core/overlay/utils.ts index 082c49e09..b4c1673d1 100644 --- a/src/core/overlay/utils.ts +++ b/src/core/overlay/utils.ts @@ -4,17 +4,17 @@ import { ConnectionPositionPair } from '@angular/cdk/overlay'; const connectionFallbackPositionsMap: { [key: string]: ThyPlacement[] } = { top: ['topLeft', 'topRight', 'bottom', 'bottomLeft', 'bottomRight'], - topLeft: ['top', 'topRight', 'bottom', 'bottomLeft', 'bottomRight'], - topRight: ['top', 'topLeft', 'bottom', 'bottomLeft', 'bottomRight'], + topLeft: ['top', 'topRight', 'bottomLeft', 'bottom', 'bottomRight'], + topRight: ['top', 'topLeft', 'bottomRight', 'bottom', 'bottomLeft'], bottom: ['bottomLeft', 'bottomRight', 'top', 'topLeft', 'topRight'], - bottomLeft: ['bottom', 'bottomRight', 'top', 'topLeft', 'topRight'], - bottomRight: ['bottom', 'bottomLeft', 'top', 'topLeft', 'topRight'], + bottomLeft: ['bottom', 'bottomRight', 'topLeft', 'top', 'topRight'], + bottomRight: ['bottom', 'bottomLeft', 'topRight', 'top', 'topLeft'], left: ['leftTop', 'leftBottom', 'right', 'rightTop', 'rightBottom'], - leftTop: ['left', 'leftBottom', 'right', 'rightTop', 'rightBottom'], - leftBottom: ['left', 'leftTop', 'right', 'rightTop', 'rightBottom'], + leftTop: ['left', 'leftBottom', 'rightTop', 'right', 'rightBottom'], + leftBottom: ['left', 'leftTop', 'rightBottom', 'right', 'rightTop'], right: ['rightTop', 'rightBottom', 'left', 'leftTop', 'leftBottom'], - rightTop: ['right', 'rightBottom', 'left', 'leftTop', 'leftBottom'], - rightBottom: ['right', 'rightTop', 'left', 'leftTop', 'leftBottom'] + rightTop: ['right', 'rightBottom', 'leftTop', 'left', 'leftBottom'], + rightBottom: ['right', 'rightTop', 'leftBottom', 'left', 'leftTop'] }; export function buildConnectedPositionOffset(placement: ThyPlacement, offset: number): ConnectedPositionOffset { diff --git a/src/dialog/dialog.config.ts b/src/dialog/dialog.config.ts index 400046cba..e235b3f71 100644 --- a/src/dialog/dialog.config.ts +++ b/src/dialog/dialog.config.ts @@ -9,7 +9,7 @@ import { ViewContainerRef, InjectionToken } from '@angular/core'; import { Direction } from '@angular/cdk/bidi'; import { ScrollStrategy } from '@angular/cdk/overlay'; -import { ThyUpperOverlayConfig } from '../core/overlay'; +import { ThyUpperOverlayConfig, ThyUpperOverlayPosition } from '../core/overlay'; /** Valid ARIA roles for a dialog element. */ export type ThyDialogRole = 'dialog' | 'alertdialog'; @@ -30,6 +30,9 @@ export class ThyDialogConfig extends ThyUpperOverlayConfig { /** The ARIA role of the dialog element. */ role?: ThyDialogRole = 'dialog'; + /** Position overrides. */ + position?: ThyUpperOverlayPosition; + /** Dialog size md, lg, sm*/ size?: ThyDialogSizes; diff --git a/src/dialog/dialog.service.ts b/src/dialog/dialog.service.ts index ec26a81d6..6be2a1cac 100644 --- a/src/dialog/dialog.service.ts +++ b/src/dialog/dialog.service.ts @@ -118,7 +118,7 @@ export class ThyDialog extends ThyUpperOverlayService | undefined { - return this.getUpperOverlayById(id); + return this.getUpperOverlayById(id) as ThyDialogRef | undefined; } /** diff --git a/src/list/selection/selection-list.ts b/src/list/selection/selection-list.ts index 49244a0ef..5efd8d183 100644 --- a/src/list/selection/selection-list.ts +++ b/src/list/selection/selection-list.ts @@ -113,6 +113,12 @@ export class ThySelectionListComponent this._setListSize(value); } + private spaceEnabled = true; + /** Whether keydown space toggle focused option */ + @Input() set thySpaceKeyEnabled(value: boolean) { + this.spaceEnabled = inputValueToBoolean(value); + } + /** Emits a change event whenever the selected state of an option changes. */ @Output() readonly thySelectionChange: EventEmitter = new EventEmitter< ThySelectionListChange @@ -320,6 +326,9 @@ export class ThySelectionListComponent switch (keyCode) { case keycodes.SPACE: case keycodes.ENTER: + if (keyCode === keycodes.SPACE && !this.spaceEnabled) { + return; + } this._toggleFocusedOption(event); // Always prevent space from scrolling the page since the list has focus event.preventDefault(); diff --git a/src/mention/caret-positioner.ts b/src/mention/caret-positioner.ts index 27c2eeae2..6678a51df 100644 --- a/src/mention/caret-positioner.ts +++ b/src/mention/caret-positioner.ts @@ -221,8 +221,8 @@ export class CaretPositioner { const coordinates = CaretPositioner.getCaretCoordinates(element, position, options); const elementOffset = getElementOffset(element); return { - top: coordinates.top + elementOffset.top + coordinates.height + 'px', - left: coordinates.left + elementOffset.left + 'px' + top: coordinates.top + elementOffset.top + coordinates.height, + left: coordinates.left + elementOffset.left }; } } diff --git a/src/mention/mention.directive.ts b/src/mention/mention.directive.ts index a49fab6c9..15affd11a 100644 --- a/src/mention/mention.directive.ts +++ b/src/mention/mention.directive.ts @@ -1,9 +1,10 @@ -import { Directive, ElementRef, Input, OnInit, EventEmitter, Output } from '@angular/core'; +import { Directive, ElementRef, Input, OnInit, EventEmitter, Output, NgZone } from '@angular/core'; import { Mention, MentionSuggestionSelectEvent } from './interfaces'; import { ThyPopover, ThyPopoverRef } from '../popover'; import { ThyMentionSuggestionsComponent } from './suggestions/suggestions.component'; import { CaretPositioner } from './caret-positioner'; import { MentionAdapter, createMentionAdapter, MatchedMention } from './adapter'; +import { take } from 'rxjs/operators'; const SUGGESTION_BACKDROP_CLASS = 'thy-mention-suggestions-backdrop'; @Directive({ @@ -31,7 +32,7 @@ export class ThyMentionDirective implements OnInit { @Output('thySelectSuggestion') select = new EventEmitter(); - constructor(private elementRef: ElementRef, private thyPopover: ThyPopover) { + constructor(private elementRef: ElementRef, private thyPopover: ThyPopover, private ngZone: NgZone) { this.adapter = createMentionAdapter(elementRef.nativeElement); this.bindEvents(); } @@ -67,11 +68,15 @@ export class ThyMentionDirective implements OnInit { private openSuggestions(matched: MatchedMention) { if (!this.openedSuggestionsRef) { const inputElement = this.elementRef.nativeElement as HTMLInputElement; - const position = CaretPositioner.getCaretPosition(inputElement, inputElement.selectionEnd); + const position = CaretPositioner.getCaretPosition(inputElement, matched.query.start); this.openedSuggestionsRef = this.thyPopover.open(ThyMentionSuggestionsComponent, { origin: this.elementRef, backdropClass: SUGGESTION_BACKDROP_CLASS, - position: position, + originPosition: { + x: position.left, + y: position.top + }, + placement: 'bottomLeft', initialState: { mention: matched.mention } @@ -88,6 +93,9 @@ export class ThyMentionDirective implements OnInit { if (this.openedSuggestionsRef) { this.openedSuggestionsRef.componentInstance.search(matched.query); + this.ngZone.onStable.pipe(take(1)).subscribe(() => { + this.openedSuggestionsRef.updatePosition(); + }); } } diff --git a/src/mention/suggestions/suggestions.component.html b/src/mention/suggestions/suggestions.component.html index dbe700da4..7f72d11d1 100644 --- a/src/mention/suggestions/suggestions.component.html +++ b/src/mention/suggestions/suggestions.component.html @@ -5,6 +5,7 @@ thyBindKeyEventContainer="body" thyMultiple="false" thyFirstItemDefaultActive="true" + thySpaceKeyEnabled="false" [thyScrollContainer]="elementRef" (thySelectionChange)="selectionChange($event)" > diff --git a/src/popover/popover-ref.ts b/src/popover/popover-ref.ts index 7f66d9200..1a8dba6a8 100644 --- a/src/popover/popover-ref.ts +++ b/src/popover/popover-ref.ts @@ -1,5 +1,5 @@ import { ESCAPE } from '@angular/cdk/keycodes'; -import { GlobalPositionStrategy, OverlayRef } from '@angular/cdk/overlay'; +import { GlobalPositionStrategy, OverlayRef, FlexibleConnectedPositionStrategy } from '@angular/cdk/overlay'; import { Observable, Subject } from 'rxjs'; import { filter, take } from 'rxjs/operators'; import { ThyPopoverContainerComponent } from './popover-container.component'; @@ -27,7 +27,8 @@ export class ThyInternalPopoverRef * Updates the popover's position. * @param position New popover position. */ - updatePosition(position?: ThyUpperOverlayPosition): this { - return this.updateGlobalPosition(position); + updatePosition(): this { + this.overlayRef.updatePosition(); + return this; } } diff --git a/src/popover/popover.config.ts b/src/popover/popover.config.ts index ff74b1217..1672f82c6 100644 --- a/src/popover/popover.config.ts +++ b/src/popover/popover.config.ts @@ -7,6 +7,12 @@ export class ThyPopoverConfig extends ThyUpperOverlayConfig /** Origin Element, for overlay flexible connected to */ origin: ElementRef | HTMLElement; + /** Origin point, default use origin's boundingClientRect*/ + originPosition?: { + x: number; + y: number; + }; + /** Placement be relative to origin, topCenter, topLeft, topRight, bottomCenter, bottomLeft, bottomRight ...*/ placement?: ThyPlacement; diff --git a/src/popover/popover.service.ts b/src/popover/popover.service.ts index 3eb5c6e4c..1ca78c976 100644 --- a/src/popover/popover.service.ts +++ b/src/popover/popover.service.ts @@ -27,6 +27,7 @@ import { getFlexiblePositions, ThyUpperOverlayService, ThyUpperOverlayRef } from import { takeUntil } from 'rxjs/operators'; import { helpers } from '../util'; import { popoverUpperOverlayOptions } from './popover.options'; +import { FlexibleConnectedPositionStrategyOrigin } from '@angular/cdk/overlay/typings/position/flexible-connected-position-strategy'; @Injectable({ providedIn: 'root' @@ -44,22 +45,20 @@ export class ThyPopover extends ThyUpperOverlayService(); private buildPositionStrategy(config: ThyPopoverConfig): PositionStrategy { - if (config.position) { - const positionStrategy = this.overlay.position().global(); - return positionStrategy; - } else { - const positionStrategy = this.overlay.position().flexibleConnectedTo(coerceElement(config.origin)); - const positions = getFlexiblePositions(config.placement, config.offset, 'thy-popover'); - positionStrategy.withPositions(positions); - positionStrategy.positionChanges.pipe(takeUntil(this.ngUnsubscribe$)).subscribe(change => { - if (change.scrollableViewProperties.isOverlayClipped) { - // After position changes occur and the overlay is clipped by - // a parent scrollable then close the tooltip. - this.ngZone.run(() => this.close()); - } - }); - return positionStrategy; - } + const origin: FlexibleConnectedPositionStrategyOrigin = config.originPosition + ? config.originPosition + : config.origin; + const positionStrategy = this.overlay.position().flexibleConnectedTo(origin); + const positions = getFlexiblePositions(config.placement, config.offset, 'thy-popover'); + positionStrategy.withPositions(positions); + positionStrategy.positionChanges.pipe(takeUntil(this.ngUnsubscribe$)).subscribe(change => { + if (change.scrollableViewProperties.isOverlayClipped) { + // After position changes occur and the overlay is clipped by + // a parent scrollable then close the tooltip. + this.ngZone.run(() => this.close()); + } + }); + return positionStrategy; } private buildOverlayPanelClasses(config: ThyPopoverConfig) { @@ -176,7 +175,7 @@ export class ThyPopover extends ThyUpperOverlayService; config = popoverRef.containerInstance.config; popoverRef.afterClosed().subscribe(() => { this.originElementRemoveActiveClass(config); @@ -184,9 +183,6 @@ export class ThyPopover extends ThyUpperOverlayService extends ThyUpperOverlayRef< + T, + ThySlideContainerComponent, + TResult +> {} + @Injectable() export class ThyInternalSlideRef extends ThyInternalUpperOverlayRef @@ -16,9 +22,3 @@ export class ThyInternalSlideRef return this.updateGlobalPosition(position); } } - -export abstract class ThySlideRef extends ThyUpperOverlayRef< - T, - ThySlideContainerComponent, - TResult -> {}