Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Add pagination and further polishing

Roland Geider64a846a35c2d
diff --git a/angular/package-lock.json b/angular/package-lock.json
index da5203342..914cddbcc 100644
--- a/angular/package-lock.json
+++ b/angular/package-lock.json
@@ -515,7 +515,6 @@
"version": "12.0.2",
"resolved": "https://registry.npmjs.org/@angular/localize/-/localize-12.0.2.tgz",
"integrity": "sha512-1uWMDyD0kgDBc6LYTerZMp+16hOKQeDYxrRsCPAJ2EOBOZTEGbAEozge+CbBwUjCBu356L/6QQZeELS1XzCpbw==",
- "dev": true,
"requires": {
"@babel/core": "7.8.3",
"glob": "7.1.7",
@@ -526,7 +525,6 @@
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.8.3.tgz",
"integrity": "sha512-4XFkf8AwyrEG7Ziu3L2L0Cv+WyY47Tcsp70JFmpftbAA1K7YL/sgE9jh9HyNj08Y/U50ItUchpN0w6HxAoX1rA==",
- "dev": true,
"requires": {
"@babel/code-frame": "^7.8.3",
"@babel/generator": "^7.8.3",
@@ -549,7 +547,6 @@
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dev": true,
"requires": {
"color-convert": "^2.0.1"
}
@@ -558,7 +555,6 @@
"version": "7.0.4",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz",
"integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==",
- "dev": true,
"requires": {
"string-width": "^4.2.0",
"strip-ansi": "^6.0.0",
@@ -569,7 +565,6 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
"requires": {
"color-name": "~1.1.4"
}
@@ -577,14 +572,12 @@
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
},
"glob": {
"version": "7.1.7",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz",
"integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==",
- "dev": true,
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
@@ -597,20 +590,17 @@
"semver": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
- "dev": true
+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ=="
},
"source-map": {
"version": "0.5.7",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
- "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
- "dev": true
+ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w="
},
"wrap-ansi": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
"integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
- "dev": true,
"requires": {
"ansi-styles": "^4.0.0",
"string-width": "^4.1.0",
@@ -620,14 +610,12 @@
"y18n": {
"version": "5.0.8",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
- "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
- "dev": true
+ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA=="
},
"yargs": {
"version": "16.2.0",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
"integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==",
- "dev": true,
"requires": {
"cliui": "^7.0.2",
"escalade": "^3.1.1",
@@ -641,8 +629,7 @@
"yargs-parser": {
"version": "20.2.9",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz",
- "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==",
- "dev": true
+ "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w=="
}
}
},
@@ -674,7 +661,6 @@
"version": "7.12.13",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz",
"integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==",
- "dev": true,
"requires": {
"@babel/highlight": "^7.12.13"
}
@@ -726,7 +712,6 @@
"version": "7.12.11",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.11.tgz",
"integrity": "sha512-Ggg6WPOJtSi8yYQvLVjG8F/TlpWDlKx0OpS4Kt+xMQPs5OaGYWy+v1A+1TvxI6sAMGZpKWWoAQ1DaeQbImlItA==",
- "dev": true,
"requires": {
"@babel/types": "^7.12.11",
"jsesc": "^2.5.1",
@@ -736,8 +721,7 @@
"source-map": {
"version": "0.5.7",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
- "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
- "dev": true
+ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w="
}
}
},
@@ -841,7 +825,6 @@
"version": "7.14.2",
"resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.14.2.tgz",
"integrity": "sha512-NYZlkZRydxw+YT56IlhIcS8PAhb+FEUiOzuhFTfqDyPmzAhRge6ua0dQYT/Uh0t/EDHq05/i+e5M2d4XvjgarQ==",
- "dev": true,
"requires": {
"@babel/helper-get-function-arity": "^7.12.13",
"@babel/template": "^7.12.13",
@@ -852,7 +835,6 @@
"version": "7.12.13",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz",
"integrity": "sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA==",
- "dev": true,
"requires": {
"@babel/code-frame": "^7.12.13",
"@babel/parser": "^7.12.13",
@@ -865,7 +847,6 @@
"version": "7.12.13",
"resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz",
"integrity": "sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg==",
- "dev": true,
"requires": {
"@babel/types": "^7.12.13"
}
@@ -987,7 +968,6 @@
"version": "7.12.13",
"resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz",
"integrity": "sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg==",
- "dev": true,
"requires": {
"@babel/types": "^7.12.13"
}
@@ -995,8 +975,7 @@
"@babel/helper-validator-identifier": {
"version": "7.14.0",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.0.tgz",
- "integrity": "sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A==",
- "dev": true
+ "integrity": "sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A=="
},
"@babel/helper-validator-option": {
"version": "7.12.17",
@@ -1033,7 +1012,6 @@
"version": "7.14.0",
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.14.0.tgz",
"integrity": "sha512-+ufuXprtQ1D1iZTO/K9+EBRn+qPWMJjZSw/S0KlFrxCw4tkrzv9grgpDHkY9MeQTjTY8i2sp7Jep8DfU6tN9Mg==",
- "dev": true,
"requires": {
"@babel/template": "^7.12.13",
"@babel/traverse": "^7.14.0",
@@ -1044,7 +1022,6 @@
"version": "7.12.13",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz",
"integrity": "sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA==",
- "dev": true,
"requires": {
"@babel/code-frame": "^7.12.13",
"@babel/parser": "^7.12.13",
@@ -1057,7 +1034,6 @@
"version": "7.14.0",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.0.tgz",
"integrity": "sha512-YSCOwxvTYEIMSGaBQb5kDDsCopDdiUGsqpatp3fOlI4+2HQSkTmEVWnVuySdAC5EWCqSWWTv0ib63RjR7dTBdg==",
- "dev": true,
"requires": {
"@babel/helper-validator-identifier": "^7.14.0",
"chalk": "^2.0.0",
@@ -1067,8 +1043,7 @@
"@babel/parser": {
"version": "7.14.4",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.4.tgz",
- "integrity": "sha512-ArliyUsWDUqEGfWcmzpGUzNfLxTdTp6WU4IuP6QFSp9gGfWS6boxFCkJSJ/L4+RG8z/FnIU3WxCk6hPL9SSWeA==",
- "dev": true
+ "integrity": "sha512-ArliyUsWDUqEGfWcmzpGUzNfLxTdTp6WU4IuP6QFSp9gGfWS6boxFCkJSJ/L4+RG8z/FnIU3WxCk6hPL9SSWeA=="
},
"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": {
"version": "7.13.12",
@@ -1824,7 +1799,6 @@
"version": "7.12.7",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.7.tgz",
"integrity": "sha512-GkDzmHS6GV7ZeXfJZ0tLRBhZcMcY0/Lnb+eEbXDBfCAcZCjrZKe6p3J4we/D24O9Y8enxWAg1cWwof59yLh2ow==",
- "dev": true,
"requires": {
"@babel/code-frame": "^7.10.4",
"@babel/parser": "^7.12.7",
@@ -1835,7 +1809,6 @@
"version": "7.14.2",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.14.2.tgz",
"integrity": "sha512-TsdRgvBFHMyHOOzcP9S6QU0QQtjxlRpEYOy3mcCO5RgmC305ki42aSAmfZEMSSYBla2oZ9BMqYlncBaKmD/7iA==",
- "dev": true,
"requires": {
"@babel/code-frame": "^7.12.13",
"@babel/generator": "^7.14.2",
@@ -1851,7 +1824,6 @@
"version": "7.14.3",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.14.3.tgz",
"integrity": "sha512-bn0S6flG/j0xtQdz3hsjJ624h3W0r3llttBMfyHX3YrZ/KtLYr15bjA0FXkgW7FpvrDuTuElXeVjiKlYRpnOFA==",
- "dev": true,
"requires": {
"@babel/types": "^7.14.2",
"jsesc": "^2.5.1",
@@ -1861,8 +1833,7 @@
"source-map": {
"version": "0.5.7",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
- "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
- "dev": true
+ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w="
}
}
},
@@ -1870,7 +1841,6 @@
"version": "7.14.4",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.4.tgz",
"integrity": "sha512-lCj4aIs0xUefJFQnwwQv2Bxg7Omd6bgquZ6LGC+gGMh6/s5qDVfjuCMlDmYQ15SLsWHd9n+X3E75lKIhl5Lkiw==",
- "dev": true,
"requires": {
"@babel/helper-validator-identifier": "^7.14.0",
"to-fast-properties": "^2.0.0"
@@ -1947,6 +1917,14 @@
"schema-utils": "^2.7.0"
}
},
+ "@ng-bootstrap/ng-bootstrap": {
+ "version": "10.0.0",
+ "resolved": "https://registry.npmjs.org/@ng-bootstrap/ng-bootstrap/-/ng-bootstrap-10.0.0.tgz",
+ "integrity": "sha512-Sz+QaxjuyJYJ+zyUbf0TevgcgVesCPQiiFiggEzxKjzY5R+Hvq3YgryLdXf2r/ryePL+C3FXCcmmKpTM5bfczQ==",
+ "requires": {
+ "tslib": "^2.1.0"
+ }
+ },
"@ngtools/webpack": {
"version": "12.0.2",
"resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-12.0.2.tgz",
@@ -2678,14 +2656,12 @@
"ansi-regex": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
- "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
- "dev": true
+ "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg=="
},
"ansi-styles": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
- "dev": true,
"requires": {
"color-convert": "^1.9.0"
}
@@ -3012,8 +2988,7 @@
"balanced-match": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
- "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
- "dev": true
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
},
"base": {
"version": "0.11.2",
@@ -3199,14 +3174,12 @@
"bootstrap": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.6.0.tgz",
- "integrity": "sha512-Io55IuQY3kydzHtbGvQya3H+KorS/M9rSNyfCGCg9WZ4pyT/lCxIlpJgG1GXW/PswzC84Tr2fBYi+7+jFVQQBw==",
- "dev": true
+ "integrity": "sha512-Io55IuQY3kydzHtbGvQya3H+KorS/M9rSNyfCGCg9WZ4pyT/lCxIlpJgG1GXW/PswzC84Tr2fBYi+7+jFVQQBw=="
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
- "dev": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -3405,7 +3378,6 @@
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
- "dev": true,
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
@@ -3590,7 +3562,6 @@
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
- "dev": true,
"requires": {
"color-name": "1.1.3"
}
@@ -3598,8 +3569,7 @@
"color-name": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
- "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
- "dev": true
+ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
},
"colord": {
"version": "2.0.1",
@@ -3690,8 +3660,7 @@
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
- "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
- "dev": true
+ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
},
"connect": {
"version": "3.7.0",
@@ -3753,7 +3722,6 @@
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz",
"integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==",
- "dev": true,
"requires": {
"safe-buffer": "~5.1.1"
}
@@ -4508,7 +4476,6 @@
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
"integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
- "dev": true,
"requires": {
"ms": "2.1.2"
}
@@ -4847,8 +4814,7 @@
"emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
- "dev": true
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
},
"emojis-list": {
"version": "3.0.0",
@@ -5016,8 +4982,7 @@
"escalade": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
- "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
- "dev": true
+ "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw=="
},
"escape-html": {
"version": "1.0.3",
@@ -5028,8 +4993,7 @@
"escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
- "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
- "dev": true
+ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
},
"eslint": {
"version": "7.27.0",
@@ -5823,8 +5787,7 @@
"fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
- "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
- "dev": true
+ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
},
"fsevents": {
"version": "2.3.2",
@@ -5836,8 +5799,7 @@
"function-bind": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
- "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
- "dev": true
+ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
},
"functional-red-black-tree": {
"version": "1.0.1",
@@ -5901,14 +5863,12 @@
"gensync": {
"version": "1.0.0-beta.2",
"resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
- "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==",
- "dev": true
+ "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg=="
},
"get-caller-file": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
- "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
- "dev": true
+ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="
},
"get-intrinsic": {
"version": "1.1.1",
@@ -5977,8 +5937,7 @@
"globals": {
"version": "11.12.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",
- "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==",
- "dev": true
+ "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA=="
},
"globby": {
"version": "11.0.3",
@@ -6026,7 +5985,6 @@
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
- "dev": true,
"requires": {
"function-bind": "^1.1.1"
}
@@ -6051,8 +6009,7 @@
"has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
- "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
- "dev": true
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
},
"has-symbols": {
"version": "1.0.2",
@@ -6545,7 +6502,6 @@
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
- "dev": true,
"requires": {
"once": "^1.3.0",
"wrappy": "1"
@@ -6554,8 +6510,7 @@
"inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
- "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
- "dev": true
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"ini": {
"version": "2.0.0",
@@ -6750,7 +6705,6 @@
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.4.0.tgz",
"integrity": "sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A==",
- "dev": true,
"requires": {
"has": "^1.0.3"
}
@@ -6821,8 +6775,7 @@
"is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
- "dev": true
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="
},
"is-glob": {
"version": "4.0.1",
@@ -7123,8 +7076,7 @@
"js-tokens": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
- "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
- "dev": true
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
},
"js-yaml": {
"version": "3.14.1",
@@ -7145,8 +7097,7 @@
"jsesc": {
"version": "2.5.2",
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz",
- "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==",
- "dev": true
+ "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA=="
},
"json-parse-better-errors": {
"version": "1.0.2",
@@ -7194,7 +7145,6 @@
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz",
"integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==",
- "dev": true,
"requires": {
"minimist": "^1.2.5"
}
@@ -7586,8 +7536,7 @@
"lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
- "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
- "dev": true
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
},
"lodash.clonedeep": {
"version": "4.5.0",
@@ -7980,7 +7929,6 @@
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
- "dev": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@@ -7988,8 +7936,7 @@
"minimist": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
- "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
- "dev": true
+ "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
},
"minipass": {
"version": "3.1.3",
@@ -8098,8 +8045,7 @@
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
- "dev": true
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"multicast-dns": {
"version": "6.2.3",
@@ -8494,7 +8440,6 @@
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
- "dev": true,
"requires": {
"wrappy": "1"
}
@@ -8808,8 +8753,7 @@
"path-is-absolute": {
"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
+ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
},
"path-is-inside": {
"version": "1.0.2",
@@ -8826,8 +8770,7 @@
"path-parse": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
- "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
- "dev": true
+ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="
},
"path-to-regexp": {
"version": "0.1.7",
@@ -8883,6 +8826,12 @@
"find-up": "^4.0.0"
}
},
+ "popper.js": {
+ "version": "1.16.1",
+ "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz",
+ "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==",
+ "dev": true
+ },
"portfinder": {
"version": "1.0.28",
"resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz",
@@ -11173,8 +11122,7 @@
"require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
- "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
- "dev": true
+ "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I="
},
"require-from-string": {
"version": "2.0.2",
@@ -11198,7 +11146,6 @@
"version": "1.20.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz",
"integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==",
- "dev": true,
"requires": {
"is-core-module": "^2.2.0",
"path-parse": "^1.0.6"
@@ -11362,8 +11309,7 @@
"safe-buffer": {
"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
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"safe-regex": {
"version": "1.1.0",
@@ -12184,7 +12130,6 @@
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz",
"integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==",
- "dev": true,
"requires": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
@@ -12212,7 +12157,6 @@
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
"integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
- "dev": true,
"requires": {
"ansi-regex": "^5.0.0"
}
@@ -12316,7 +12260,6 @@
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
- "dev": true,
"requires": {
"has-flag": "^3.0.0"
}
@@ -12544,8 +12487,7 @@
"to-fast-properties": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
- "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=",
- "dev": true
+ "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4="
},
"to-object-path": {
"version": "0.3.0",
@@ -13583,8 +13525,7 @@
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
- "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
- "dev": true
+ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"ws": {
"version": "6.2.1",
diff --git a/angular/package.json b/angular/package.json
index 8df990fe1..2ad9eb828 100644
--- a/angular/package.json
+++ b/angular/package.json
@@ -12,14 +12,16 @@
"private": true,
"dependencies": {
"@angular/animations": "~12.0.2",
+ "@angular/cdk": "~12.0.2",
"@angular/common": "~12.0.2",
"@angular/compiler": "~12.0.2",
"@angular/core": "~12.0.2",
- "@angular/cdk": "~12.0.2",
"@angular/forms": "~12.0.2",
+ "@angular/localize": "~12.0.2",
"@angular/platform-browser": "~12.0.2",
"@angular/platform-browser-dynamic": "~12.0.2",
"@angular/router": "~12.0.2",
+ "@ng-bootstrap/ng-bootstrap": "^10.0.0",
"@swimlane/ngx-charts": "^18.0.1",
"rxjs": "~6.6.0",
"tslib": "^2.0.0",
diff --git a/angular/src/app/app.module.ts b/angular/src/app/app.module.ts
index 1c6a9b196..a3a609048 100644
--- a/angular/src/app/app.module.ts
+++ b/angular/src/app/app.module.ts
@@ -21,37 +21,41 @@ import {NgModule} from '@angular/core';
import {ReactiveFormsModule} from '@angular/forms';
import {BrowserModule} from '@angular/platform-browser';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
+import {NgbDropdownModule, NgbModalModule, NgbPaginationModule} from '@ng-bootstrap/ng-bootstrap';
import {NgxChartsModule} from '@swimlane/ngx-charts';
import {AppComponent} from './app.component';
import {ExerciseDetailComponent} from './exercise/exercise-detail/exercise-detail.component';
-import { ExerciseListComponent } from './exercise/exercise-list/exercise-list.component';
-import { ExerciseEditComponent } from './exercise/exercise-edit/exercise-edit.component';
+import {ExerciseEditComponent} from './exercise/exercise-edit/exercise-edit.component';
+import {ExerciseListComponent} from './exercise/exercise-list/exercise-list.component';
import {ExerciseService} from './exercise/exercise.service';
+import {WeightChartComponent} from './weight/weight-chart/weight-chart.component';
+import {WeightDetailComponent} from './weight/weight-detail/weight-detail.component';
+import {WeightEditComponent} from './weight/weight-edit/weight-edit.component';
import {WeightListComponent} from './weight/weight-list/weight-list.component';
-import { WeightDetailComponent } from './weight/weight-detail/weight-detail.component';
-import { WeightEditComponent } from './weight/weight-edit/weight-edit.component';
-import { WeightChartComponent } from './weight/weight-chart/weight-chart.component';
import {WeightService} from './weight/weight.service';
@NgModule({
declarations: [
AppComponent,
ExerciseDetailComponent,
- ExerciseListComponent,
ExerciseEditComponent,
+ ExerciseListComponent,
- WeightListComponent,
+ WeightChartComponent,
WeightDetailComponent,
WeightEditComponent,
- WeightChartComponent
+ WeightListComponent,
],
imports: [
+ BrowserAnimationsModule,
BrowserModule,
HttpClientModule,
- ReactiveFormsModule,
+ NgbDropdownModule,
+ NgbModalModule,
+ NgbPaginationModule,
NgxChartsModule,
- BrowserAnimationsModule
+ ReactiveFormsModule,
],
providers: [
ExerciseService,
diff --git a/angular/src/app/weight/weight-chart/weight-chart.component.ts b/angular/src/app/weight/weight-chart/weight-chart.component.ts
index 1f6bdb6e8..f6394fec4 100644
--- a/angular/src/app/weight/weight-chart/weight-chart.component.ts
+++ b/angular/src/app/weight/weight-chart/weight-chart.component.ts
@@ -1,4 +1,6 @@
-import {Component, OnInit} from '@angular/core';
+import {Component, OnInit, ViewChild} from '@angular/core';
+import {WeightEntry} from '../models/weight.model';
+import {WeightEditComponent} from '../weight-edit/weight-edit.component';
import {WeightService} from '../weight.service';
@Component({
@@ -18,8 +20,6 @@ export class WeightChartComponent implements OnInit {
yAxis: boolean = true;
showYAxisLabel: boolean = false;
showXAxisLabel: boolean = false;
- //xAxisLabel: string = 'Date';
- //yAxisLabel: string = 'Weight';
timeline: boolean = true;
autoScale = true;
@@ -29,20 +29,25 @@ export class WeightChartComponent implements OnInit {
data : any
+ selectedEntry?: WeightEntry;
- constructor(private service: WeightService) {
- }
+ @ViewChild(WeightEditComponent)
+ edit!: WeightEditComponent;
+
+ constructor(
+ private service: WeightService,
+ ) { }
async ngOnInit(): Promise<void> {
// TODO: only load service data once
await this.service.loadWeightEntries();
- const out: {name: Date, value: number}[] = this.service.entries.map(entry => {
- return {name: entry.date, value: entry.weight};
+ const out = this.service.entries.map(entry => {
+ return {name: entry.date, value: entry.weight, id: entry.id};
});
this.data = [{
- name: 'Weight',
+ name: $localize`Weight`,
series: out
}];
@@ -50,7 +55,13 @@ export class WeightChartComponent implements OnInit {
onSelect(data: any): void {
- console.log('Item clicked', JSON.parse(JSON.stringify(data)));
+
+ const entry = this.service.findById(data.id);
+ if(entry === undefined) {
+ return;
+ }
+ this.selectedEntry = entry;
+ console.log(`Loaded entry ${entry.id}`);
}
onActivate(data: any): void {
diff --git a/angular/src/app/weight/weight-detail/weight-detail.component.html b/angular/src/app/weight/weight-detail/weight-detail.component.html
index b32c43d18..f0327442e 100644
--- a/angular/src/app/weight/weight-detail/weight-detail.component.html
+++ b/angular/src/app/weight/weight-detail/weight-detail.component.html
@@ -1,9 +1,34 @@
<li class="list-group-item">
- <button class="btn btn-danger" (click)="deleteEntry()" i18n>Delete</button>
- <button class="btn btn-primary" (click)="toggleForm()" i18n>Edit</button>
+ <div class="row">
+ <div class="col-3">
+ <div *ngIf="!showForm">
+ {{entry.date | date:'shortDate'}}
+ </div>
+ </div>
- <div *ngIf="!showForm">
- {{entry.date | date:'shortDate'}} - {{entry.weight}}
+ <div class="col-3">
+ <div *ngIf="!showForm">
+ {{entry.weight}}
+ </div>
+ </div>
+
+ <div class="col-3">
+ +/-
+ </div>
+
+ <div class="col-3">
+ <div ngbDropdown class="text-right">
+ <button class="btn btn-link" id="dropdownBasic1" ngbDropdownToggle></button>
+ <div ngbDropdownMenu aria-labelledby="dropdownBasic1">
+ <button ngbDropdownItem (click)="toggleForm()" i18n>Edit</button>
+ <button ngbDropdownItem (click)="deleteEntry()" i18n>Delete</button>
+ </div>
+ </div>
+
+ </div>
</div>
+
<app-weight-edit *ngIf="showForm" [weight]="entry"></app-weight-edit>
+
+
</li>
diff --git a/angular/src/app/weight/weight-edit/weight-edit.component.html b/angular/src/app/weight/weight-edit/weight-edit.component.html
index 3339e5766..2e323416c 100644
--- a/angular/src/app/weight/weight-edit/weight-edit.component.html
+++ b/angular/src/app/weight/weight-edit/weight-edit.component.html
@@ -19,13 +19,9 @@
class="form-control">
</div>
</div>
- <div class="form-row">
- <div class="col">
- <button
- type="submit"
- class="btn btn-success"
- [disabled]="group.invalid" i18n>Save</button>
- </div>
- </div>
+ <button
+ type="submit"
+ class="btn btn-success mt-2"
+ [disabled]="group.invalid" i18n>Save</button>
</form>
diff --git a/angular/src/app/weight/weight-list/weight-list.component.html b/angular/src/app/weight/weight-list/weight-list.component.html
index aa8bf0183..7eadf7aaa 100644
--- a/angular/src/app/weight/weight-list/weight-list.component.html
+++ b/angular/src/app/weight/weight-list/weight-list.component.html
@@ -1,19 +1,40 @@
-
<div class="row">
<div class="col-12">
- <app-weight-chart></app-weight-chart>
+ <app-weight-chart></app-weight-chart>
</div>
</div>
-
<div class="row">
<div class="col-12">
- <ul *ngFor="let entry of weightEntries"
- class="list-group">
+ <ul *ngFor="let entry of weightEntries | slice: (page-1) * pageSize : page * pageSize"
+ class="list-group">
<app-weight-detail [entry]="entry"></app-weight-detail>
- </ul>
-</div>
+ </ul>
+
+ <ngb-pagination
+ [collectionSize]="weightEntries.length"
+ [pageSize]="pageSize"
+ [(page)]="page"
+ [boundaryLinks]="true"
+ [ellipses]="true"
+ [maxSize]="maxPageShown"
+ class="d-flex justify-content-center mt-2"></ngb-pagination>
+ </div>
</div>
-<button class="btn btn-primary" (click)="toggleForm()" i18n>Add entry</button>
-<app-weight-edit *ngIf="showForm"></app-weight-edit>
+<ng-template #content let-modal>
+ <div class="modal-header">
+ <h4 class="modal-title" id="modal-basic-title" i18n>Add entry</h4>
+ <button type="button" class="close" aria-label="Close" (click)="modal.dismiss('Cross click')">
+ <span aria-hidden="true">&times;</span>
+ </button>
+ </div>
+ <div class="modal-body">
+ <app-weight-edit></app-weight-edit>
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-outline-dark" (click)="modal.close('Save click')">Close</button>
+ </div>
+</ng-template>
+
+<button class="btn btn-primary" (click)="open(content)" i18n>Add entry</button>
diff --git a/angular/src/app/weight/weight-list/weight-list.component.ts b/angular/src/app/weight/weight-list/weight-list.component.ts
index 1941b79a8..993645dcd 100644
--- a/angular/src/app/weight/weight-list/weight-list.component.ts
+++ b/angular/src/app/weight/weight-list/weight-list.component.ts
@@ -1,4 +1,5 @@
import { Component, OnInit } from '@angular/core';
+import {NgbModal} from '@ng-bootstrap/ng-bootstrap';
import {WeightEntry} from '../models/weight.model';
import {WeightService} from '../weight.service';
@@ -9,19 +10,40 @@ import {WeightService} from '../weight.service';
})
export class WeightListComponent implements OnInit {
weightEntries: WeightEntry[] = [];
- showForm = false;
- constructor(private service: WeightService) { }
+ /**
+ Starting page for the pagination
+ */
+ page = 1;
+
+ /**
+ * number of elements per page
+ */
+ pageSize = 10;
+
+ /**
+ * Number of pages shown before the ellipsis
+ */
+ maxPageShown = 7;
+
+ constructor(
+ private service: WeightService,
+ private modalService: NgbModal
+ ) { }
ngOnInit(): void {
this.getWeightEntries();
}
- toggleForm() {
- this.showForm = !this.showForm;
- }
-
async getWeightEntries(): Promise<void> {
this.weightEntries = await this.service.loadWeightEntries();
}
+
+ open(content: any) {
+ this.modalService.open(content, {ariaLabelledBy: 'modal-basic-title'}).result.then((result) => {
+ console.log(`Closed with: ${result}`);
+ }, (reason) => {
+ console.log(`Dismissed`);
+ });
+ }
}
diff --git a/angular/src/app/weight/weight.service.ts b/angular/src/app/weight/weight.service.ts
index e62720efe..a77b5a4a9 100644
--- a/angular/src/app/weight/weight.service.ts
+++ b/angular/src/app/weight/weight.service.ts
@@ -82,4 +82,15 @@ export class WeightService {
}
});
}
+
+ /**
+ * Finds an entry by its ID
+ *
+ * @param id: ID of the weight entry
+ */
+ findById(id: number) {
+ return this.entries.find(value => value.id == id);
+ }
+
+
}
diff --git a/angular/src/locale/messages.xlf b/angular/src/locale/messages.xlf
index af6332134..a84657c95 100644
--- a/angular/src/locale/messages.xlf
+++ b/angular/src/locale/messages.xlf
@@ -2,46 +2,301 @@
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file source-language="en-US" datatype="plaintext" original="ng2.template">
<body>
- <trans-unit id="7022070615528435141" datatype="html">
- <source>Delete</source>
+ <trans-unit id="ngb.alert.close" datatype="html">
+ <source>Close</source>
<context-group purpose="location">
- <context context-type="sourcefile">src/app/weight/weight-detail/weight-detail.component.html</context>
- <context context-type="linenumber">2</context>
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/alert/alert.ts</context>
+ <context context-type="linenumber">58,61</context>
</context-group>
</trans-unit>
- <trans-unit id="7585826646011739428" datatype="html">
- <source>Edit</source>
+ <trans-unit id="ngb.carousel.slide-number" datatype="html">
+ <source> Slide <x id="INTERPOLATION" equiv-text="OnHover$ = new"/> of <x id="INTERPOLATION_1" equiv-text=";
+ private _pa"/> </source>
<context-group purpose="location">
- <context context-type="sourcefile">src/app/weight/weight-detail/weight-detail.component.html</context>
- <context context-type="linenumber">3</context>
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/carousel/carousel.ts</context>
+ <context context-type="linenumber">114,118</context>
</context-group>
+ <note priority="1" from="description">Currently selected slide number read by screen reader</note>
</trans-unit>
- <trans-unit id="3973931101896534797" datatype="html">
- <source>Date</source>
+ <trans-unit id="ngb.carousel.previous" datatype="html">
+ <source>Previous</source>
<context-group purpose="location">
- <context context-type="sourcefile">src/app/weight/weight-edit/weight-edit.component.html</context>
- <context context-type="linenumber">5</context>
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/carousel/carousel.ts</context>
+ <context context-type="linenumber">132,134</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="ngb.carousel.next" datatype="html">
+ <source>Next</source>
+ <context-group purpose="location">
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/carousel/carousel.ts</context>
+ <context context-type="linenumber">147,152</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="ngb.datepicker.select-month" datatype="html">
+ <source>Select month</source>
+ <context-group purpose="location">
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/datepicker/datepicker-navigation-select.ts</context>
+ <context context-type="linenumber">44,49</context>
+ </context-group>
+ <context-group purpose="location">
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/datepicker/datepicker-navigation-select.ts</context>
+ <context context-type="linenumber">49,50</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="ngb.datepicker.select-year" datatype="html">
+ <source>Select year</source>
+ <context-group purpose="location">
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/datepicker/datepicker-navigation-select.ts</context>
+ <context context-type="linenumber">59,63</context>
+ </context-group>
+ <context-group purpose="location">
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/datepicker/datepicker-navigation-select.ts</context>
+ <context context-type="linenumber">74</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="ngb.datepicker.previous-month" datatype="html">
+ <source>Previous month</source>
+ <context-group purpose="location">
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/datepicker/datepicker-navigation.ts</context>
+ <context context-type="linenumber">24,27</context>
+ </context-group>
+ <context-group purpose="location">
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/datepicker/datepicker-navigation.ts</context>
+ <context context-type="linenumber">35,36</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="ngb.datepicker.next-month" datatype="html">
+ <source>Next month</source>
+ <context-group purpose="location">
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/datepicker/datepicker-navigation.ts</context>
+ <context context-type="linenumber">47,50</context>
+ </context-group>
+ <context-group purpose="location">
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/datepicker/datepicker-navigation.ts</context>
+ <context context-type="linenumber">60,64</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="ngb.pagination.first" datatype="html">
+ <source>««</source>
+ <context-group purpose="location">
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/pagination/pagination.ts</context>
+ <context context-type="linenumber">182,183</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="ngb.pagination.previous" datatype="html">
+ <source>«</source>
+ <context-group purpose="location">
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/pagination/pagination.ts</context>
+ <context context-type="linenumber">186,190</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="ngb.pagination.next" datatype="html">
+ <source>»</source>
+ <context-group purpose="location">
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/pagination/pagination.ts</context>
+ <context context-type="linenumber">194,195</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="ngb.pagination.last" datatype="html">
+ <source>»»</source>
+ <context-group purpose="location">
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/pagination/pagination.ts</context>
+ <context context-type="linenumber">201,204</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="ngb.pagination.first-aria" datatype="html">
+ <source>First</source>
+ <context-group purpose="location">
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/pagination/pagination.ts</context>
+ <context context-type="linenumber">208,209</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="ngb.pagination.previous-aria" datatype="html">
+ <source>Previous</source>
+ <context-group purpose="location">
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/pagination/pagination.ts</context>
+ <context context-type="linenumber">215,216</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="ngb.pagination.next-aria" datatype="html">
+ <source>Next</source>
+ <context-group purpose="location">
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/pagination/pagination.ts</context>
+ <context context-type="linenumber">226,228</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="ngb.pagination.last-aria" datatype="html">
+ <source>Last</source>
+ <context-group purpose="location">
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/pagination/pagination.ts</context>
+ <context context-type="linenumber">232,233</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="ngb.progressbar.value" datatype="html">
+ <source><x id="INTERPOLATION" equiv-text="; }
+
+ /**
+ *"/></source>
+ <context-group purpose="location">
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/progressbar/progressbar.ts</context>
+ <context context-type="linenumber">32,38</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="ngb.timepicker.HH" datatype="html">
+ <source>HH</source>
+ <context-group purpose="location">
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/timepicker/timepicker.ts</context>
+ <context context-type="linenumber">40,41</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="ngb.timepicker.hours" datatype="html">
+ <source>Hours</source>
+ <context-group purpose="location">
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/timepicker/timepicker.ts</context>
+ <context context-type="linenumber">46,47</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="ngb.timepicker.MM" datatype="html">
+ <source>MM</source>
+ <context-group purpose="location">
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/timepicker/timepicker.ts</context>
+ <context context-type="linenumber">51,54</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="ngb.timepicker.minutes" datatype="html">
+ <source>Minutes</source>
+ <context-group purpose="location">
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/timepicker/timepicker.ts</context>
+ <context context-type="linenumber">58,59</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="ngb.timepicker.increment-hours" datatype="html">
+ <source>Increment hours</source>
+ <context-group purpose="location">
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/timepicker/timepicker.ts</context>
+ <context context-type="linenumber">63,64</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="ngb.timepicker.decrement-hours" datatype="html">
+ <source>Decrement hours</source>
+ <context-group purpose="location">
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/timepicker/timepicker.ts</context>
+ <context context-type="linenumber">69,70</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="ngb.timepicker.increment-minutes" datatype="html">
+ <source>Increment minutes</source>
+ <context-group purpose="location">
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/timepicker/timepicker.ts</context>
+ <context context-type="linenumber">76,78</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="ngb.timepicker.decrement-minutes" datatype="html">
+ <source>Decrement minutes</source>
+ <context-group purpose="location">
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/timepicker/timepicker.ts</context>
+ <context context-type="linenumber">82,84</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="ngb.timepicker.SS" datatype="html">
+ <source>SS</source>
+ <context-group purpose="location">
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/timepicker/timepicker.ts</context>
+ <context context-type="linenumber">87,88</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="ngb.timepicker.seconds" datatype="html">
+ <source>Seconds</source>
+ <context-group purpose="location">
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/timepicker/timepicker.ts</context>
+ <context context-type="linenumber">92,93</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="ngb.timepicker.increment-seconds" datatype="html">
+ <source>Increment seconds</source>
+ <context-group purpose="location">
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/timepicker/timepicker.ts</context>
+ <context context-type="linenumber">100,101</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="ngb.timepicker.decrement-seconds" datatype="html">
+ <source>Decrement seconds</source>
+ <context-group purpose="location">
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/timepicker/timepicker.ts</context>
+ <context context-type="linenumber">106,110</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="ngb.timepicker.AM" datatype="html">
+ <source><x id="INTERPOLATION" equiv-text="NgbTime;
+
+ pr"/></source>
+ <context-group purpose="location">
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/timepicker/timepicker.ts</context>
+ <context context-type="linenumber">115,121</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="ngb.timepicker.PM" datatype="html">
+ <source><x id="INTERPOLATION" equiv-text="t() meridian: b"/></source>
+ <context-group purpose="location">
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/timepicker/timepicker.ts</context>
+ <context context-type="linenumber">123,131</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="ngb.toast.close-aria" datatype="html">
+ <source>Close</source>
+ <context-group purpose="location">
+ <context context-type="sourcefile">node_modules/@ng-bootstrap/src/toast/toast.ts</context>
+ <context context-type="linenumber">78,85</context>
</context-group>
</trans-unit>
<trans-unit id="5848348023107769657" datatype="html">
<source>Weight</source>
+ <context-group purpose="location">
+ <context context-type="sourcefile">src/app/weight/weight-chart/weight-chart.component.ts</context>
+ <context context-type="linenumber">53</context>
+ </context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/weight/weight-edit/weight-edit.component.html</context>
<context context-type="linenumber">14</context>
</context-group>
</trans-unit>
+ <trans-unit id="7585826646011739428" datatype="html">
+ <source>Edit</source>
+ <context-group purpose="location">
+ <context context-type="sourcefile">src/app/weight/weight-detail/weight-detail.component.html</context>
+ <context context-type="linenumber">23</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="7022070615528435141" datatype="html">
+ <source>Delete</source>
+ <context-group purpose="location">
+ <context context-type="sourcefile">src/app/weight/weight-detail/weight-detail.component.html</context>
+ <context context-type="linenumber">24</context>
+ </context-group>
+ </trans-unit>
+ <trans-unit id="3973931101896534797" datatype="html">
+ <source>Date</source>
+ <context-group purpose="location">
+ <context context-type="sourcefile">src/app/weight/weight-edit/weight-edit.component.html</context>
+ <context context-type="linenumber">5</context>
+ </context-group>
+ </trans-unit>
<trans-unit id="3768927257183755959" datatype="html">
<source>Save</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/weight/weight-edit/weight-edit.component.html</context>
- <context context-type="linenumber">27</context>
+ <context context-type="linenumber">26</context>
</context-group>
</trans-unit>
<trans-unit id="2540594807548326286" datatype="html">
<source>Add entry</source>
<context-group purpose="location">
<context context-type="sourcefile">src/app/weight/weight-list/weight-list.component.html</context>
- <context context-type="linenumber">18</context>
+ <context context-type="linenumber">28</context>
+ </context-group>
+ <context-group purpose="location">
+ <context context-type="sourcefile">src/app/weight/weight-list/weight-list.component.html</context>
+ <context context-type="linenumber">41</context>
</context-group>
</trans-unit>
</body>