feat: add action chips to search results

This commit is contained in:
Wieland Schöbl
2021-06-22 15:09:40 +00:00
parent 0aa26020be
commit 67fb4a43c9
27 changed files with 771 additions and 303 deletions

364
package-lock.json generated
View File

@@ -1903,6 +1903,13 @@
"integrity": "sha512-dmS6rL38FAWCX9Xry2rtaMEe144MJgZ/8YVR5tVfWNSRmOOnDg+cZTYwt8Qeqm9ndqFBCjGh8PE7mteC8FvUGg==",
"requires": {
"@types/cordova": "^0.0.34"
},
"dependencies": {
"@types/cordova": {
"version": "0.0.34",
"resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz",
"integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ="
}
}
},
"@ionic-native/geolocation": {
@@ -1911,6 +1918,13 @@
"integrity": "sha512-hv8h7sgN57KDBl+hOWB/w2egrS7DEJJLmM098e+Rq/6PEKfV+Spx6fDgGaZvfppoKThayoL3enJoWd3NHcQeDQ==",
"requires": {
"@types/cordova": "^0.0.34"
},
"dependencies": {
"@types/cordova": {
"version": "0.0.34",
"resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz",
"integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ="
}
}
},
"@ionic-native/network": {
@@ -1919,6 +1933,13 @@
"integrity": "sha512-dSN7jaiXXgm8kVcvxcD39wWPFg2NujWTrEnj9Fq7Fx2aGKkxPkocNsxoy02aFVyBp1LQZvp+uiDNmVIVRjrA7A==",
"requires": {
"@types/cordova": "^0.0.34"
},
"dependencies": {
"@types/cordova": {
"version": "0.0.34",
"resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz",
"integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ="
}
}
},
"@ionic-native/splash-screen": {
@@ -1927,6 +1948,13 @@
"integrity": "sha512-F/AvowDaIwlb3+DcR10ezmaFQR7HyiSAu7R4Hf25HPU4PsqCuTezTARbEqa2xM5+5JkkIlIQKG/CPvipG4FV3w==",
"requires": {
"@types/cordova": "^0.0.34"
},
"dependencies": {
"@types/cordova": {
"version": "0.0.34",
"resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz",
"integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ="
}
}
},
"@ionic-native/status-bar": {
@@ -1935,14 +1963,21 @@
"integrity": "sha512-fv4mfH3Fb99fIEOtoxUFYvw+YW10Nk0lUCUkdGTX4LV8Big2o3TfEcUczGQOXJ28Wz1WrAuzh6l9A5JiK3umLw==",
"requires": {
"@types/cordova": "^0.0.34"
},
"dependencies": {
"@types/cordova": {
"version": "0.0.34",
"resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz",
"integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ="
}
}
},
"@ionic/angular": {
"version": "5.4.1",
"resolved": "https://registry.npmjs.org/@ionic/angular/-/angular-5.4.1.tgz",
"integrity": "sha512-jPUM6Mf7sjYHOevzCHvx5BKbn4gSWDVux6xyh1ZDextQUAEQhoRO/FV6ZjwlzVeoIKzEEN57oaF2zdPw8OFLZg==",
"version": "5.6.9",
"resolved": "https://registry.npmjs.org/@ionic/angular/-/angular-5.6.9.tgz",
"integrity": "sha512-FreCExssGFeifAMFvWbNCJ+x7KPNXt+FrQLh6oDaSr+AfNlYYwDaxfuXmaxeKsRq/Pf2roQKLyL8VAqPohBRcw==",
"requires": {
"@ionic/core": "5.4.1",
"@ionic/core": "5.6.9",
"tslib": "^1.9.3"
}
},
@@ -2076,12 +2111,20 @@
}
},
"@ionic/core": {
"version": "5.4.1",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-5.4.1.tgz",
"integrity": "sha512-yONXeHjbVGUSL7zPgiCv0fQkw47VHJJ+8zVkYgTg4At+B0VhoLAMgS/ah3EUwSVTOATXdHa6Ak5+71uHPKpViQ==",
"version": "5.6.9",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-5.6.9.tgz",
"integrity": "sha512-OFwlWFsei4r7rVJSQxIB7XbfeU5FI8aIEs9yDEsqBudLquph9b/EA/5MgKxfNX7ahs6/A8Och5zYhXg+dpa3zA==",
"requires": {
"ionicons": "^5.1.2",
"tslib": "^1.10.0"
"@stencil/core": "^2.4.0",
"ionicons": "^5.5.1",
"tslib": "^2.1.0"
},
"dependencies": {
"tslib": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz",
"integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w=="
}
}
},
"@ionic/storage": {
@@ -2423,11 +2466,6 @@
}
}
},
"@sindresorhus/is": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-2.1.1.tgz",
"integrity": "sha512-/aPsuoj/1Dw/kzhkgz+ES6TxG0zfTMGLwuK2ZG00k/iJzYHTLCE8mVU8EPqEOp/lmxPoq1C1C9RYToRKb2KEfg=="
},
"@types/glob": {
"version": "7.1.3",
"resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz",
@@ -2437,29 +2475,6 @@
"@types/node": "*"
}
},
"@types/got": {
"version": "9.6.11",
"resolved": "https://registry.npmjs.org/@types/got/-/got-9.6.11.tgz",
"integrity": "sha512-dr3IiDNg5TDesGyuwTrN77E1Cd7DCdmCFtEfSGqr83jMMtcwhf/SGPbN2goY4JUWQfvxwY56+e5tjfi+oXeSdA==",
"requires": {
"@types/node": "*",
"@types/tough-cookie": "*",
"form-data": "^2.5.0"
}
},
"@types/mustache": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/@types/mustache/-/mustache-4.1.1.tgz",
"integrity": "sha512-Sm0NWeLhS2QL7NNGsXvO+Fgp7e3JLHCO6RS3RCnfjAnkw6Y1bsji/AGfISdQZDIR/AeOyzkrxRk9jBkl55zdJw=="
},
"@types/nodemailer": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@types/nodemailer/-/nodemailer-6.4.1.tgz",
"integrity": "sha512-8081UY/0XTTDpuGqCnDc8IY+Q3DSg604wB3dBH0CaZlj4nZWHWuxtZ3NRZ9c9WUrz1Vfm6wioAUnqL3bsh49uQ==",
"requires": {
"@types/node": "*"
}
},
"ajv": {
"version": "6.12.6",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
@@ -2471,61 +2486,6 @@
"uri-js": "^4.2.2"
}
},
"better-ajv-errors": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/better-ajv-errors/-/better-ajv-errors-0.7.0.tgz",
"integrity": "sha512-6GtJQ/AwVSo1pI1MDQU/yg8O86gMsrt5RKtELo08Epa2zWJPCOK85v/O8/U5A9JkWmwRkE16JpSgssKSx6moog==",
"requires": {
"@babel/code-frame": "^7.0.0",
"@babel/runtime": "^7.0.0",
"chalk": "^2.4.1",
"core-js": "^3.2.1",
"json-to-ast": "^2.0.3",
"jsonpointer": "^4.0.1",
"leven": "^3.1.0"
},
"dependencies": {
"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==",
"requires": {
"color-convert": "^1.9.0"
}
},
"chalk": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
}
},
"supports-color": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"requires": {
"has-flag": "^3.0.0"
}
}
}
},
"chai": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/chai/-/chai-4.3.4.tgz",
"integrity": "sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA==",
"requires": {
"assertion-error": "^1.1.0",
"check-error": "^1.0.2",
"deep-eql": "^3.0.1",
"get-func-name": "^2.0.0",
"pathval": "^1.1.1",
"type-detect": "^4.0.5"
}
},
"chalk": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
@@ -2535,29 +2495,11 @@
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"requires": {
"color-name": "1.1.3"
}
},
"color-name": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
},
"commander": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz",
"integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA=="
},
"core-js": {
"version": "3.12.1",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.12.1.tgz",
"integrity": "sha512-Ne9DKPHTObRuB09Dru5AjwKjY4cJHVGu+y5f7coGn1E9Grkc3p2iBwE9AI/nJzsE29mQF7oq+mhYYRqOMFN1Bw=="
},
"deepmerge": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz",
@@ -2590,45 +2532,6 @@
"type-fest": "^0.10.0"
}
},
"has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
},
"mustache": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz",
"integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ=="
},
"nodemailer": {
"version": "6.5.0",
"resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.5.0.tgz",
"integrity": "sha512-Tm4RPrrIZbnqDKAvX+/4M+zovEReiKlEXWDzG4iwtpL9X34MJY+D5LnQPH/+eghe8DLlAVshHAJZAZWBGhkguw=="
},
"ts-json-schema-generator": {
"version": "0.70.2",
"resolved": "https://registry.npmjs.org/ts-json-schema-generator/-/ts-json-schema-generator-0.70.2.tgz",
"integrity": "sha512-4miuxRyxYvwzCGGzxGvN39fwlY7HDlj1KRpZq8Hi3IegeAnguc9q4gDvcqMaDKoRiNNnV5fwplRWZFhRrtvr4Q==",
"requires": {
"@types/json-schema": "^7.0.5",
"commander": "~5.1.0",
"glob": "~7.1.6",
"json-stable-stringify": "^1.0.1",
"typescript": "~3.9.5"
},
"dependencies": {
"commander": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz",
"integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg=="
},
"typescript": {
"version": "3.9.9",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz",
"integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w=="
}
}
},
"ts-node": {
"version": "8.10.2",
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.2.tgz",
@@ -2640,11 +2543,6 @@
"source-map-support": "^0.5.17",
"yn": "3.1.1"
}
},
"type-fest": {
"version": "0.10.0",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.10.0.tgz",
"integrity": "sha512-EUV9jo4sffrwlg8s0zDhP0T2WD3pru5Xi0+HTE3zTUmBaZNhfkite9PdSJwdXLwPVW0jnAHT56pZHIOYckPEiw=="
}
}
},
@@ -2890,14 +2788,14 @@
"integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ=="
},
"@sindresorhus/is": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.0.1.tgz",
"integrity": "sha512-Qm9hBEBu18wt1PO2flE7LPb30BHMQt1eQgbV76YntdNk73XZGpn3izvGTYxbGgzXKgbCjiia0uxTd3aTNQrY/g=="
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-2.1.1.tgz",
"integrity": "sha512-/aPsuoj/1Dw/kzhkgz+ES6TxG0zfTMGLwuK2ZG00k/iJzYHTLCE8mVU8EPqEOp/lmxPoq1C1C9RYToRKb2KEfg=="
},
"@stencil/core": {
"version": "2.5.2",
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-2.5.2.tgz",
"integrity": "sha512-bgjPXkSzzg1WnTgVUm6m5ZzpKt602WmA/QljODAW1xVN40OHJdbGblzF/F6MFzqv2c5Cy30CB41arc8qADIdcQ=="
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-2.6.0.tgz",
"integrity": "sha512-QsxWayZyusnqSZrlCl81R71rA3KqFjVVQSH4E0rGN15F1GdQaFonKlHLyCOLKLig1zzC+DQkLLiUuocexuvdeQ=="
},
"@szmarczak/http-timer": {
"version": "4.0.5",
@@ -2925,13 +2823,6 @@
"@types/keyv": "*",
"@types/node": "*",
"@types/responselike": "*"
},
"dependencies": {
"@types/node": {
"version": "15.3.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-15.3.0.tgz",
"integrity": "sha512-8/bnjSZD86ZfpBsDlCIkNXIvm+h6wi9g7IqL+kmFkQ+Wvu3JrasgLElfiPgoo8V8vVfnEi0QVS12gbl94h9YsQ=="
}
}
},
"@types/cli-progress": {
@@ -2950,11 +2841,6 @@
"@types/node": "*"
}
},
"@types/cordova": {
"version": "0.0.34",
"resolved": "https://registry.npmjs.org/@types/cordova/-/cordova-0.0.34.tgz",
"integrity": "sha1-6nrd907Ow9dimCegw54smt3HPQQ="
},
"@types/deepmerge": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/@types/deepmerge/-/deepmerge-2.2.0.tgz",
@@ -3021,6 +2907,16 @@
}
}
},
"@types/got": {
"version": "9.6.11",
"resolved": "https://registry.npmjs.org/@types/got/-/got-9.6.11.tgz",
"integrity": "sha512-dr3IiDNg5TDesGyuwTrN77E1Cd7DCdmCFtEfSGqr83jMMtcwhf/SGPbN2goY4JUWQfvxwY56+e5tjfi+oXeSdA==",
"requires": {
"@types/node": "*",
"@types/tough-cookie": "*",
"form-data": "^2.5.0"
}
},
"@types/http-cache-semantics": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.0.tgz",
@@ -3057,19 +2953,12 @@
"integrity": "sha512-MPtoySlAZQ37VoLaPcTHCu1RWJ4llDkULYZIzOYxlhxBqYPB0RsRlmMU0R6tahtFe27mIdkHV+551ZWV4PLmVw==",
"requires": {
"@types/node": "*"
},
"dependencies": {
"@types/node": {
"version": "15.3.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-15.3.0.tgz",
"integrity": "sha512-8/bnjSZD86ZfpBsDlCIkNXIvm+h6wi9g7IqL+kmFkQ+Wvu3JrasgLElfiPgoo8V8vVfnEi0QVS12gbl94h9YsQ=="
}
}
},
"@types/lodash": {
"version": "4.14.168",
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.168.tgz",
"integrity": "sha512-oVfRvqHV/V6D1yifJbVRU3TMp8OT6o6BG+U9MkwuJ3U8/CsDHvalRpsxBqivn71ztOFZBTfJMvETbqHiaNSj7Q==",
"version": "4.14.170",
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.170.tgz",
"integrity": "sha512-bpcvu/MKHHeYX+qeEN8GE7DIravODWdACVA1ctevD8CN24RhPZIKMn9ntfAsrvLfSX3cR5RrBKAbYm9bGs0A+Q==",
"dev": true
},
"@types/lodash-es": {
@@ -3156,13 +3045,6 @@
"integrity": "sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==",
"requires": {
"@types/node": "*"
},
"dependencies": {
"@types/node": {
"version": "15.3.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-15.3.0.tgz",
"integrity": "sha512-8/bnjSZD86ZfpBsDlCIkNXIvm+h6wi9g7IqL+kmFkQ+Wvu3JrasgLElfiPgoo8V8vVfnEi0QVS12gbl94h9YsQ=="
}
}
},
"@types/selenium-webdriver": {
@@ -4349,16 +4231,6 @@
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
"dev": true
},
"bindings": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
"dev": true,
"optional": true,
"requires": {
"file-uri-to-path": "1.0.0"
}
},
"blob": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz",
@@ -4812,16 +4684,16 @@
}
},
"cacheable-request": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.1.tgz",
"integrity": "sha512-lt0mJ6YAnsrBErpTMWeu5kl/tg9xMAWjavYTN6VQXM1A/teBITuNcccXsCxF0tDQQJf9DfAaX5O4e0zp0KlfZw==",
"version": "7.0.2",
"resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz",
"integrity": "sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==",
"requires": {
"clone-response": "^1.0.2",
"get-stream": "^5.1.0",
"http-cache-semantics": "^4.0.0",
"keyv": "^4.0.0",
"lowercase-keys": "^2.0.0",
"normalize-url": "^4.1.0",
"normalize-url": "^6.0.1",
"responselike": "^2.0.0"
}
},
@@ -6757,16 +6629,6 @@
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
"dev": true
},
"cors": {
"version": "2.8.5",
"resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
"integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
"dev": true,
"requires": {
"object-assign": "^4",
"vary": "^1"
}
},
"cosmiconfig": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz",
@@ -8591,13 +8453,6 @@
"schema-utils": "^2.6.5"
}
},
"file-uri-to-path": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
"dev": true,
"optional": true
},
"fileset": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz",
@@ -9633,6 +9488,11 @@
"responselike": "^2.0.0"
},
"dependencies": {
"@sindresorhus/is": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.0.1.tgz",
"integrity": "sha512-Qm9hBEBu18wt1PO2flE7LPb30BHMQt1eQgbV76YntdNk73XZGpn3izvGTYxbGgzXKgbCjiia0uxTd3aTNQrY/g=="
},
"cacheable-lookup": {
"version": "5.0.4",
"resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz",
@@ -9881,9 +9741,9 @@
"dev": true
},
"highlight.js": {
"version": "10.7.2",
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.2.tgz",
"integrity": "sha512-oFLl873u4usRM9K63j4ME9u3etNF0PLiJhSQ8rdfuL51Wn3zkD6drf9ZW0dOzjnZI22YYG24z30JcmfCZjMgYg=="
"version": "10.7.3",
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz",
"integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A=="
},
"hmac-drbg": {
"version": "1.0.1",
@@ -11767,6 +11627,16 @@
"integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==",
"dev": true
},
"cors": {
"version": "2.8.5",
"resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
"integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
"dev": true,
"requires": {
"object-assign": "^4",
"vary": "^1"
}
},
"faye-websocket": {
"version": "0.11.3",
"resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.3.tgz",
@@ -11804,11 +11674,7 @@
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
"dev": true,
"optional": true,
"requires": {
"bindings": "^1.5.0",
"nan": "^2.12.1"
}
"optional": true
},
"glob-parent": {
"version": "3.1.0",
@@ -11902,6 +11768,12 @@
"is-wsl": "^1.1.0"
}
},
"proxy-middleware": {
"version": "0.15.0",
"resolved": "https://registry.npmjs.org/proxy-middleware/-/proxy-middleware-0.15.0.tgz",
"integrity": "sha1-o/3xvvtzD5UZZYcqwvYHTGFHelY=",
"dev": true
},
"readdirp": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz",
@@ -12865,13 +12737,6 @@
"integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==",
"dev": true
},
"nan": {
"version": "2.14.2",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz",
"integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==",
"dev": true,
"optional": true
},
"nanomatch": {
"version": "1.2.13",
"resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
@@ -13075,9 +12940,9 @@
"dev": true
},
"normalize-url": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz",
"integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ=="
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.0.1.tgz",
"integrity": "sha512-VU4pzAuh7Kip71XEmO9aNREYAdMHFGTVj/i+CaTImS8x0i1d3jUZkXhqluy/PRgjPLMgsLQulYY3PJ/aSbSjpQ=="
},
"npm-bundled": {
"version": "1.1.2",
@@ -15151,12 +15016,6 @@
"ipaddr.js": "1.9.1"
}
},
"proxy-middleware": {
"version": "0.15.0",
"resolved": "https://registry.npmjs.org/proxy-middleware/-/proxy-middleware-0.15.0.tgz",
"integrity": "sha1-o/3xvvtzD5UZZYcqwvYHTGFHelY=",
"dev": true
},
"prr": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz",
@@ -18615,6 +18474,11 @@
"resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
"integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g=="
},
"type-fest": {
"version": "0.10.0",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.10.0.tgz",
"integrity": "sha512-EUV9jo4sffrwlg8s0zDhP0T2WD3pru5Xi0+HTE3zTUmBaZNhfkite9PdSJwdXLwPVW0jnAHT56pZHIOYckPEiw=="
},
"type-is": {
"version": "1.6.18",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
@@ -19290,11 +19154,7 @@
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
"dev": true,
"optional": true,
"requires": {
"bindings": "^1.5.0",
"nan": "^2.12.1"
}
"optional": true
},
"glob-parent": {
"version": "3.1.0",
@@ -19902,11 +19762,7 @@
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
"dev": true,
"optional": true,
"requires": {
"bindings": "^1.5.0",
"nan": "^2.12.1"
}
"optional": true
},
"glob-parent": {
"version": "3.1.0",

View File

@@ -53,7 +53,7 @@
"@ionic-native/network": "5.31.1",
"@ionic-native/splash-screen": "5.29.0",
"@ionic-native/status-bar": "5.29.0",
"@ionic/angular": "5.4.1",
"@ionic/angular": "5.6.9",
"@ionic/storage": "2.2.0",
"@ngx-translate/core": "11.0.1",
"@ngx-translate/http-loader": "4.0.0",
@@ -96,9 +96,9 @@
"@ionic/angular-toolkit": "2.3.3",
"@types/deepmerge": "2.2.0",
"@types/form-data": "2.5.0",
"@types/lodash-es": "4.17.4",
"@types/jasmine": "3.3.12",
"@types/jasminewd2": "2.0.6",
"@types/lodash-es": "4.17.4",
"@types/node": "14.14.37",
"codelyzer": "5.1.2",
"conventional-changelog-cli": "2.0.12",

View File

@@ -0,0 +1,40 @@
/*
* Copyright (C) 2021 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {Component, Input} from '@angular/core';
import {SCDateSeries, SCThings, SCThingType} from '@openstapps/core';
/**
* Shows a horizontal list of action chips
*/
@Component({
selector: 'stapps-action-chip-list',
templateUrl: 'action-chip-list.html',
styleUrls: ['action-chip-list.scss'],
})
export class ActionChipListComponent {
/**
* If chips are applicable
*/
applicable: Record<string, () => boolean> = {
'locate': () => this.item.hasOwnProperty('inPlace'),
'event': () => this.item.type === SCThingType.AcademicEvent ||
(this.item.type === SCThingType.DateSeries && (this.item as SCDateSeries).dates.length !== 0),
};
/**
* The item the action belongs to
*/
@Input() item: SCThings;
}

View File

@@ -0,0 +1,4 @@
<div>
<stapps-locate-action-chip *ngIf='applicable["locate"]()' [item]='item'></stapps-locate-action-chip>
<stapps-add-event-action-chip *ngIf='applicable["event"]()' [item]='item'></stapps-add-event-action-chip>
</div>

View File

@@ -0,0 +1,4 @@
div {
display: flex;
flex-direction: row;
}

View File

@@ -0,0 +1,176 @@
/*
* Copyright (C) 2021 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {ChangeDetectorRef, Component, Input, OnInit} from '@angular/core';
import {SCDateSeries} from '@openstapps/core';
import {every, groupBy, some, sortBy, values} from 'lodash-es';
import {capitalize, last} from 'lodash-es';
enum Selection {
ON = 2,
PARTIAL = 1,
OFF = 1,
}
/**
* A tree
*
* The generic is to preserve type safety of how deep the tree goes.
*/
// tslint:disable-next-line:no-any
class TreeNode<T extends TreeNode<any> | SelectionValue> {
/**
* Value of this node
*/
checked: boolean;
/**
* If items are partially selected
*/
indeterminate: boolean;
/**
* Parent of this node
*/
parent?: TreeNode<TreeNode<T>>;
constructor(readonly children: T[], readonly ref: ChangeDetectorRef) {
this.updateParents();
this.accumulateApplyValues();
}
/**
* Accumulate values of children to set current value
*/
private accumulateApplyValues() {
const selections: number[] =
this.children.map(it => it instanceof TreeNode ?
(it.checked ? Selection.ON : (it.indeterminate ? Selection.PARTIAL : Selection.OFF)) :
(it as SelectionValue).selected ? Selection.ON : Selection.OFF);
this.checked = every(selections, it => it === Selection.ON);
this.indeterminate = this.checked ? false : some(selections, it => it > Selection.OFF);
}
/**
* Apply the value of this node to all child nodes
*/
private applyValueDownwards() {
for (const child of this.children) {
if (child instanceof TreeNode) {
child.checked = this.checked;
child.indeterminate = false;
// tslint:disable-next-line:no-any
(child as TreeNode<any>).applyValueDownwards();
} else {
(child as SelectionValue).selected = this.checked;
}
}
}
/**
* Set all children's parent to this
*/
private updateParents() {
for (const child of this.children) {
if (child instanceof TreeNode) {
child.parent = this as TreeNode<TreeNode<T>>;
}
}
}
/**
* Update values to all parents upwards
*/
private updateValueUpwards() {
this.parent?.accumulateApplyValues();
this.parent?.updateValueUpwards();
}
/**
* Click on this node
*/
click() {
this.checked = !this.checked;
this.indeterminate = false;
this.applyValueDownwards();
this.updateValueUpwards();
}
/**
* Notify that a child's value has changed
*/
notifyChildChanged() {
this.accumulateApplyValues();
this.updateValueUpwards();
}
}
interface SelectionValue {
/**
* Item that was selected
*/
item: SCDateSeries;
/**
* Selection
*/
selected: boolean;
}
/**
* Shows a horizontal list of action chips
*/
@Component({
selector: 'stapps-add-event-popover-component',
templateUrl: 'add-event-popover.html',
styleUrls: ['add-event-popover.scss'],
})
export class AddEventPopoverComponent implements OnInit {
/**
* Lodash alias
*/
capitalize: (item: string) => string = capitalize;
/**
* The item the action belongs to
*/
@Input() items: SCDateSeries[];
/**
* Lodash alias
*/
last: <T>(item: T[] | null | undefined) => T | undefined = last;
/**
* Selection of the item
*/
selection: TreeNode<TreeNode<SelectionValue>>;
constructor(readonly ref: ChangeDetectorRef) {
}
/**
* Init
*/
ngOnInit() {
this.selection =
new TreeNode(values(groupBy(sortBy(this.items.map(item => ({
selected: false,
item: item,
})), it => it.item.frequency), it => it.item.frequency))
.map(item => new TreeNode(item, this.ref)), this.ref);
}
}

View File

@@ -0,0 +1,40 @@
<ion-card-content>
<ion-item-group>
<ion-item-divider (click)='selection.click()'>
<ion-label>{{'data.chips.add_events.popover.ALL' | translate}}</ion-label>
<ion-checkbox slot='start'
[checked]='selection.checked'
[indeterminate]='selection.indeterminate'>
</ion-checkbox>
</ion-item-divider>
<ion-item-group *ngFor='let frequency of selection.children'>
<ion-item-divider (click)='frequency.click()'>
<ion-label>{{('frequency' | thingTranslate: frequency.children[0].item) | titlecase}}</ion-label>
<ion-checkbox slot='start'
[checked]='frequency.checked'
[indeterminate]='frequency.indeterminate'>
</ion-checkbox>
</ion-item-divider>
<ion-item *ngFor='let date of frequency.children'
(click)='date.selected = !date.selected; frequency.notifyChildChanged()'>
<ion-label *ngIf='date.item.dates.length > 1; else single_event'>
{{date.item.duration | amDuration: 'hours'}}
{{'data.chips.add_events.popover.AT' | translate}}
{{date.item.dates[0] | amDateFormat: 'HH:mm ddd'}}
{{'data.chips.add_events.popover.UNTIL' | translate}}
{{last(date.item.dates) | amDateFormat: 'll'}}
</ion-label>
<ng-template #single_event>
<ion-label>
{{date.item.duration | amDuration: 'hours'}}
{{'data.chips.add_events.popover.AT' | translate}}
{{last(date.item.dates) | amDateFormat: 'll, HH:mm'}}
</ion-label>
</ng-template>
<ion-checkbox slot='start'
[checked]='date.selected'>
</ion-checkbox>
</ion-item>
</ion-item-group>
</ion-item-group>
</ion-card-content>

View File

@@ -0,0 +1,7 @@
::ng-deep ion-item-divider {
cursor: pointer;
}
ion-card-content {
width: fit-content;
}

View File

@@ -0,0 +1,165 @@
/* tslint:disable:prefer-function-over-method */
/*
* Copyright (C) 2021 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {Component, Input, OnInit} from '@angular/core';
import {PopoverController} from '@ionic/angular';
import {SCDateSeries, SCThing, SCThingType} from '@openstapps/core';
import {DataProvider} from '../../data.provider';
import {AddEventPopoverComponent} from '../add-event-popover.component';
enum AddEventStates {
ADDED_ALL,
ADDED_SOME,
REMOVED_ALL,
UNAVAILABLE,
}
/**
* Shows a horizontal list of action chips
*/
@Component({
selector: 'stapps-add-event-action-chip',
templateUrl: 'add-event-action-chip.html',
styleUrls: ['add-event-action-chip.scss'],
})
export class AddEventActionChipComponent implements OnInit {
/**
* Associated date series
*/
associatedDateSeries: Promise<SCDateSeries[]>;
/**
* Disabled
*/
disabled: boolean;
/**
* Icon
*/
icon: string;
/**
* Item
*/
@Input() item: SCThing;
/**
* Label
*/
label: string;
/**
* State
*/
state: AddEventStates;
/**
* States
*/
states = {
[AddEventStates.ADDED_ALL]: {
icon: 'events-all',
label: 'data.chips.add_events.ADDED_ALL',
disabled: false,
},
[AddEventStates.ADDED_SOME]: {
icon: 'events-partial',
label: 'data.chips.add_events.ADDED_SOME',
disabled: false,
},
[AddEventStates.REMOVED_ALL]: {
icon: 'events',
label: 'data.chips.add_events.REMOVED_ALL',
disabled: false,
},
[AddEventStates.UNAVAILABLE]: {
icon: 'close',
label: 'data.chips.add_events.UNAVAILABLE',
disabled: true,
},
};
constructor(readonly popoverController: PopoverController,
readonly dataProvider: DataProvider) {
}
/**
* Apply state
*/
applyState(state: AddEventStates) {
this.state = state;
const {label, icon, disabled} = this.states[state];
this.label = label;
this.icon = icon;
this.disabled = disabled;
}
/**
* Init
*/
ngOnInit() {
this.associatedDateSeries = this.item.type === SCThingType.DateSeries ?
Promise.resolve([this.item as SCDateSeries]) :
this.dataProvider.search({
filter: {
arguments: {
filters: [
{
arguments: {
field: 'type',
value: SCThingType.DateSeries,
},
type: 'value',
},
{
arguments: {
field: 'event.uid',
value: this.item.uid,
},
type: 'value',
},
],
operation: 'and',
},
type: 'boolean',
},
})
.then((it) => it.data as SCDateSeries[]);
this.associatedDateSeries.then((it) => this.applyState(
it.length < 1 ? AddEventStates.UNAVAILABLE : AddEventStates.REMOVED_ALL));
}
/**
* Action
*/
// @Override
async onClick(event: MouseEvent) {
const associatedDateSeries = await this.associatedDateSeries;
const popover = await this.popoverController.create({
component: AddEventPopoverComponent,
translucent: true,
cssClass: 'add-event-popover',
componentProps: {
items: associatedDateSeries,
},
event: event,
});
await popover.present();
// TODO: replace dummy implementation
await popover.onDidDismiss();
this.applyState(this.state === AddEventStates.ADDED_ALL ?
AddEventStates.REMOVED_ALL : AddEventStates.ADDED_ALL);
}
}

View File

@@ -0,0 +1,11 @@
<div *ngIf='(associatedDateSeries | async) as associatedDateSeries; else loading'>
<ion-chip [disabled]='disabled' (click)='$event.stopPropagation(); onClick($event)'>
<ion-icon [name]='icon'></ion-icon>
<ion-label>{{label | translate}}</ion-label>
</ion-chip>
</div>
<ng-template #loading>
<ion-chip>
<ion-skeleton-text animated='true' ></ion-skeleton-text>
</ion-chip>
</ng-template>

View File

@@ -0,0 +1,3 @@
::ng-deep ion-skeleton-text {
width: 50px;
}

View File

@@ -0,0 +1,39 @@
/* tslint:disable:prefer-function-over-method */
/*
* Copyright (C) 2021 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {Component, Input} from '@angular/core';
import {SCThing} from '@openstapps/core';
/**
* Shows a horizontal list of action chips
*/
@Component({
selector: 'stapps-locate-action-chip',
templateUrl: 'locate-action-chip.html',
})
export class LocateActionChipComponent {
/**
* Item
*/
@Input() item: SCThing;
/**
* Click
*/
onClick(/*event: MouseEvent*/) {
// TODO
}
}

View File

@@ -0,0 +1,7 @@
<ion-chip class='chip-class' (click)='$event.stopPropagation(); onClick()'>
<ion-icon name='location'></ion-icon>
<ion-label>{{'Locate' | translate}}</ion-label>
<ng-template #loading>
<ion-skeleton-text animated='true'></ion-skeleton-text>
</ng-template>
</ion-chip>

View File

@@ -25,6 +25,10 @@ import {MomentModule} from 'ngx-moment';
import {ThingTranslateModule} from '../../translation/thing-translate.module';
import {MenuModule} from '../menu/menu.module';
import {StorageModule} from '../storage/storage.module';
import {ActionChipListComponent} from './chips/action-chip-list.component';
import {AddEventPopoverComponent} from './chips/add-event-popover.component';
import {AddEventActionChipComponent} from './chips/data/add-event-action-chip.component';
import {LocateActionChipComponent} from './chips/data/locate-action-chip.component';
import {DataFacetsProvider} from './data-facets.provider';
import {DataIconPipe} from './data-icon.pipe';
import {DataRoutingModule} from './data-routing.module';
@@ -77,6 +81,7 @@ import {VideoListItem} from './types/video/video-list-item.component';
*/
@NgModule({
declarations: [
AddEventPopoverComponent,
OffersDetailComponent,
OffersInListComponent,
AddressDetailComponent,
@@ -119,6 +124,9 @@ import {VideoListItem} from './types/video/video-list-item.component';
VideoDetailContentComponent,
VideoListItem,
DataIconPipe,
ActionChipListComponent,
AddEventActionChipComponent,
LocateActionChipComponent,
],
entryComponents: [
DataListComponent,

View File

@@ -7,7 +7,8 @@
::ng-deep {
ion-slides.work-locations {
ion-slide {
display: block; text-align: left;
display: block;
text-align: left;
}
}
}

View File

@@ -1,13 +1,19 @@
<ion-item>
<ion-thumbnail slot="start" class="ion-margin-end">
<ion-thumbnail slot='start' class='ion-margin-end'>
<ion-skeleton-text animated></ion-skeleton-text>
</ion-thumbnail>
<ion-grid>
<ion-row>
<ion-col>
<h2 class="name"><ion-skeleton-text animated style="width: 80%"></ion-skeleton-text></h2>
<p><ion-skeleton-text animated style="width: 80%;"></ion-skeleton-text></p>
<ion-note><ion-skeleton-text animated style="width: 20%"></ion-skeleton-text></ion-note>
<h2 class='name'>
<ion-skeleton-text animated style='width: 80%'></ion-skeleton-text>
</h2>
<p>
<ion-skeleton-text animated style='width: 80%;'></ion-skeleton-text>
</p>
<ion-note>
<ion-skeleton-text animated style='width: 20%'></ion-skeleton-text>
</ion-note>
</ion-col>
</ion-row>
</ion-grid>

View File

@@ -1,30 +1,36 @@
<ion-item button="true" lines="inset" (click)="notifySelect()">
<ion-thumbnail slot="start" *ngIf="!hideThumbnail" class="ion-margin-end">
<ion-icon color="medium" [attr.name]="item.type | dataIcon"></ion-icon>
<ion-item class='ion-text-wrap' button='true' lines='inset' (click)='notifySelect()'>
<div class='item-height-placeholder'></div>
<ion-thumbnail slot='start' *ngIf='!hideThumbnail' class='ion-margin-end'>
<ion-icon color='medium' [attr.name]='item.type | dataIcon'></ion-icon>
</ion-thumbnail>
<ion-label class="ion-text-wrap" [ngSwitch]="true">
<stapps-catalog-list-item [item]="item" *ngSwitchCase="item.type === 'catalog'"></stapps-catalog-list-item>
<stapps-date-series-list-item [item]="item" *ngSwitchCase="item.type === 'date series'"></stapps-date-series-list-item>
<stapps-dish-list-item [item]="item" *ngSwitchCase="item.type === 'dish'"></stapps-dish-list-item>
<stapps-event-list-item [item]="item" *ngSwitchCase="item.type === 'academic event'"></stapps-event-list-item>
<stapps-event-list-item [item]="item" *ngSwitchCase="item.type === 'sport course'"></stapps-event-list-item>
<stapps-favorite-list-item [item]="item" *ngSwitchCase="item.type === 'favorite'"></stapps-favorite-list-item>
<stapps-message-list-item [item]="item" *ngSwitchCase="item.type === 'message'"></stapps-message-list-item>
<stapps-organization-list-item [item]="item" *ngSwitchCase="item.type === 'organization'"></stapps-organization-list-item>
<stapps-person-list-item [item]="item" *ngSwitchCase="item.type === 'person'"></stapps-person-list-item>
<stapps-place-list-item [item]="item" *ngSwitchCase="item.type === 'building'"></stapps-place-list-item>
<stapps-place-list-item [item]="item" *ngSwitchCase="item.type === 'floor'"></stapps-place-list-item>
<stapps-place-list-item [item]="item" *ngSwitchCase="item.type === 'point of interest'"></stapps-place-list-item>
<stapps-place-list-item [item]="item" *ngSwitchCase="item.type === 'room'"></stapps-place-list-item>
<stapps-semester-list-item [item]="item" *ngSwitchCase="item.type === 'semester'"></stapps-semester-list-item>
<stapps-video-list-item [item]="item" *ngSwitchCase="item.type === 'video'"></stapps-video-list-item>
<ion-label class='ion-text-wrap' [ngSwitch]='true'>
<div>
<stapps-catalog-list-item [item]='item' *ngSwitchCase="item.type === 'catalog'"></stapps-catalog-list-item>
<stapps-date-series-list-item [item]='item'
*ngSwitchCase="item.type === 'date series'"></stapps-date-series-list-item>
<stapps-dish-list-item [item]='item' *ngSwitchCase="item.type === 'dish'"></stapps-dish-list-item>
<stapps-event-list-item [item]='item' *ngSwitchCase="item.type === 'academic event'"></stapps-event-list-item>
<stapps-event-list-item [item]='item' *ngSwitchCase="item.type === 'sport course'"></stapps-event-list-item>
<stapps-favorite-list-item [item]='item' *ngSwitchCase="item.type === 'favorite'"></stapps-favorite-list-item>
<stapps-message-list-item [item]='item' *ngSwitchCase="item.type === 'message'"></stapps-message-list-item>
<stapps-organization-list-item [item]='item'
*ngSwitchCase="item.type === 'organization'"></stapps-organization-list-item>
<stapps-person-list-item [item]='item' *ngSwitchCase="item.type === 'person'"></stapps-person-list-item>
<stapps-place-list-item [item]='item' *ngSwitchCase="item.type === 'building'"></stapps-place-list-item>
<stapps-place-list-item [item]='item' *ngSwitchCase="item.type === 'floor'"></stapps-place-list-item>
<stapps-place-list-item [item]='item' *ngSwitchCase="item.type === 'point of interest'"></stapps-place-list-item>
<stapps-place-list-item [item]='item' *ngSwitchCase="item.type === 'room'"></stapps-place-list-item>
<stapps-semester-list-item [item]='item' *ngSwitchCase="item.type === 'semester'"></stapps-semester-list-item>
<stapps-video-list-item [item]='item' *ngSwitchCase="item.type === 'video'"></stapps-video-list-item>
<div *ngSwitchDefault>
<h2>
{{'name' | thingTranslate: item}}
</h2>
<p *ngIf="item.description">
<stapps-long-inline-text [text]="'description' | thingTranslate: item" [size]="80"></stapps-long-inline-text>
<p *ngIf='item.description'>
<stapps-long-inline-text [text]="'description' | thingTranslate: item" [size]='80'></stapps-long-inline-text>
</p>
</div>
<stapps-action-chip-list slot='end' [item]='item'></stapps-action-chip-list>
</div>
</ion-label>
</ion-item>

View File

@@ -1,3 +1,13 @@
.item {
ion-label {
width: 100%;
div {
display: flex;
flex-direction: column;
}
}
}
::ng-deep {
ion-grid, ion-col {

View File

@@ -13,8 +13,19 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {CdkVirtualScrollViewport} from '@angular/cdk/scrolling';
import {Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild} from '@angular/core';
import {
Component,
EventEmitter,
HostListener,
Input,
OnChanges,
OnInit,
Output,
SimpleChanges,
ViewChild,
} from '@angular/core';
import {SCThings} from '@openstapps/core';
import {ceil} from 'lodash-es';
import {BehaviorSubject, Observable, Subscription} from 'rxjs';
/**
@@ -51,6 +62,10 @@ export class DataListComponent implements OnChanges, OnInit {
* Indicates whether or not the list is to display SCThings of a single type
*/
@Input() singleType = false;
/**
* Items that display the skeleton list
*/
skeletonItems: number[];
/**
* Array of all subscriptions to Observables
*/
@@ -58,9 +73,19 @@ export class DataListComponent implements OnChanges, OnInit {
// tslint:disable-next-line: completed-docs
@ViewChild(CdkVirtualScrollViewport) viewPort: CdkVirtualScrollViewport;
/**
* Calculate how many items would fill the screen
*/
@HostListener('window.resize', ['$event'])
calcSkeletonItems() {
const itemHeight = 122;
this.skeletonItems = new Array(ceil(window.innerHeight / itemHeight));
}
/**
* Uniquely identifies item at a certain list index
*/
// tslint:disable-next-line:prefer-function-over-method
identifyItem(_index: number, item: SCThings) {
return item.uid;
}
@@ -73,18 +98,19 @@ export class DataListComponent implements OnChanges, OnInit {
}
// tslint:disable-next-line: completed-docs
ngOnInit(): void {
if (typeof this.resetToTop !== 'undefined') {
this.subscriptions.push(this.resetToTop.subscribe(() => {
this.viewPort.scrollToIndex(0);
}));
ngOnDestroy(): void {
for (const subscription of this.subscriptions) {
subscription.unsubscribe();
}
}
// tslint:disable-next-line: completed-docs
ngOnDestroy(): void {
for (const subscription of this.subscriptions) {
subscription.unsubscribe();
ngOnInit(): void {
this.calcSkeletonItems();
if (typeof this.resetToTop !== 'undefined') {
this.subscriptions.push(this.resetToTop.subscribe(() => {
this.viewPort.scrollToIndex(0);
}));
}
}

View File

@@ -13,5 +13,5 @@
</ion-label>
</div>
<ion-list [style.display]="items ? 'none': 'block'">
<stapps-skeleton-list-item *ngFor="let skeleton of [1, 2, 3, 4, 5]"></stapps-skeleton-list-item>
<stapps-skeleton-list-item *ngFor="let skeleton of skeletonItems"></stapps-skeleton-list-item>
</ion-list>

View File

@@ -42,12 +42,14 @@ export class ThingTranslatePipe implements PipeTransform, OnDestroy {
this.value = this.thingTranslate.get(thing, key);
}
transform(query: unknown, thing: SCThings): unknown {
transform<T extends SCThings, P extends string[] | keyof T>(query: P, thing: T):
P extends keyof T ? T[P] : P | unknown {
if (typeof query !== 'string' || query.length <= 0) {
return query;
// tslint:disable-next-line:no-any
return query as any;
}
if (!isThing(thing)){
if (!isThing(thing)) {
throw new SyntaxError(`Wrong parameter in ThingTranslatePipe. Expected a valid SCThing, received: ${thing}`);
}
@@ -69,7 +71,8 @@ export class ThingTranslatePipe implements PipeTransform, OnDestroy {
});
}
return this.value;
// tslint:disable-next-line:no-any
return this.value as any;
}
/**
@@ -111,13 +114,13 @@ export class ThingPropertyNameTranslatePipe implements PipeTransform, OnDestroy
return query;
}
if (!isThing(thingOrType) && typeof thingOrType !== 'string'){
if (!isThing(thingOrType) && typeof thingOrType !== 'string') {
throw new SyntaxError(`Wrong parameter in ThingTranslatePipe. Expected a valid SCThing or String, received: ${thingOrType}`);
}
// store the params, in case they change
this.lastKey = query;
this.lastType= typeof thingOrType === 'string' ? thingOrType : thingOrType.type;
this.lastType = typeof thingOrType === 'string' ? thingOrType : thingOrType.type;
this.updateValue(query, this.lastType);

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 512 512" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<path d="M108.501,426.805C108.501,455.987 132.458,480 161.572,480L426.929,480C456.043,480 480,455.987 480,426.805L480,229.819C480,228.452 478.877,227.326 477.512,227.326L110.989,227.326C109.624,227.326 108.501,228.452 108.501,229.819L108.501,426.805ZM254.947,391.406L215.221,351.68C211.334,347.793 205.022,347.793 201.135,351.68C197.248,355.568 197.248,361.879 201.135,365.766L240.861,405.492C244.748,409.379 251.06,409.379 254.947,405.492C258.834,401.605 258.834,395.293 254.947,391.406ZM372.827,285.955L287.144,383.878C287.144,383.878 254.947,351.68 254.947,351.68C251.06,347.793 244.748,347.793 240.861,351.68C236.974,355.568 236.974,361.879 240.861,365.766L280.586,405.492C282.536,407.441 285.206,408.496 287.961,408.404C290.716,408.312 293.31,407.083 295.125,405.008L387.819,299.073C391.439,294.936 391.019,288.638 386.882,285.018C382.744,281.398 376.447,281.818 372.827,285.955ZM333.089,285.969L276.811,350.523C273.199,354.667 273.63,360.964 277.774,364.576C281.917,368.189 288.214,367.757 291.827,363.613L348.105,299.059C351.717,294.916 351.286,288.619 347.142,285.006C342.999,281.394 336.702,281.825 333.089,285.969ZM480,187.43C480,158.248 456.043,134.235 426.929,134.235L161.572,134.235C132.458,134.235 108.501,158.248 108.501,187.43L108.501,197.404C108.501,199.228 109.998,200.729 111.818,200.729L476.683,200.729C478.503,200.729 480,199.228 480,197.404L480,187.43Z"/>
<g transform="matrix(0.829239,0,0,0.831165,18.4134,32)">
<path d="M83.619,143.999L20.384,143.999C18.19,143.999 16.384,145.804 16.384,147.999L16.384,383.999C16.384,417.261 42.316,444.942 74.896,447.744L74.896,182.264C74.896,168.561 78.028,155.581 83.619,143.999ZM109.789,111.999C124.68,100.626 143.302,93.874 163.492,93.874L464.33,93.874C463.209,59.728 434.781,31.999 400.384,31.999L384.384,31.999L384.384,16.449C384.384,7.839 377.764,0.449 369.154,0.019C368.898,0.006 368.641,0 368.384,0C359.608,0 352.385,7.222 352.384,15.999L352.384,31.999L128.384,31.999L128.384,16.449C128.384,7.839 121.764,0.449 113.154,0.019C112.898,0.006 112.641,0 112.384,0C103.608,0 96.385,7.222 96.384,15.999L96.384,31.999L80.384,31.999C45.275,31.999 16.384,60.889 16.384,95.999L16.384,107.999C16.384,110.193 18.19,111.999 20.384,111.999L109.789,111.999Z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 512 512" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<path d="M108.501,426.805C108.501,455.987 132.458,480 161.572,480L426.929,480C456.043,480 480,455.987 480,426.805L480,229.819C480,228.452 478.877,227.326 477.512,227.326L110.989,227.326C109.624,227.326 108.501,228.452 108.501,229.819L108.501,426.805ZM327.42,386.91C338.338,386.91 347.322,395.914 347.322,406.858C347.322,417.801 338.338,426.805 327.42,426.805C316.502,426.805 307.518,417.801 307.518,406.858C307.518,395.914 316.502,386.91 327.42,386.91ZM255.609,296.582L193.751,367.277C193.751,367.277 174.507,348.033 174.507,348.033C168.263,341.789 158.124,341.789 151.88,348.033C145.635,354.277 145.635,364.416 151.88,370.66L183.217,401.997C186.348,405.129 190.637,406.822 195.063,406.675C199.489,406.527 203.655,404.552 206.572,401.22L279.692,317.654C285.507,311.008 284.832,300.892 278.186,295.077C271.541,289.262 261.424,289.936 255.609,296.582ZM393.759,320.416C404.677,320.416 413.661,329.421 413.661,340.364C413.661,351.307 404.677,360.312 393.759,360.312C382.841,360.312 373.857,351.307 373.857,340.364C373.857,329.421 382.841,320.416 393.759,320.416ZM327.42,320.416C338.338,320.416 347.322,329.421 347.322,340.364C347.322,351.307 338.338,360.312 327.42,360.312C316.502,360.312 307.518,351.307 307.518,340.364C307.518,329.421 316.502,320.416 327.42,320.416ZM393.759,253.923C404.677,253.923 413.661,262.928 413.661,273.871C413.661,284.814 404.677,293.819 393.759,293.819C382.841,293.819 373.857,284.814 373.857,273.871C373.857,262.928 382.841,253.923 393.759,253.923ZM327.42,253.923C338.338,253.923 347.322,262.928 347.322,273.871C347.322,284.814 338.338,293.819 327.42,293.819C316.502,293.819 307.518,284.814 307.518,273.871C307.518,262.928 316.502,253.923 327.42,253.923ZM480,187.43C480,158.248 456.043,134.235 426.929,134.235L161.572,134.235C132.458,134.235 108.501,158.248 108.501,187.43L108.501,197.404C108.501,199.228 109.998,200.729 111.818,200.729L476.683,200.729C478.503,200.729 480,199.228 480,197.404L480,187.43Z"/>
<g transform="matrix(0.829239,0,0,0.831165,18.4134,32)">
<path d="M83.619,143.999L20.384,143.999C18.19,143.999 16.384,145.804 16.384,147.999L16.384,383.999C16.384,417.261 42.316,444.942 74.896,447.744L74.896,182.264C74.896,168.561 78.028,155.581 83.619,143.999ZM109.789,111.999C124.68,100.626 143.302,93.874 163.492,93.874L464.33,93.874C463.209,59.728 434.781,31.999 400.384,31.999L384.384,31.999L384.384,16.449C384.384,7.839 377.764,0.449 369.154,0.019C368.898,0.006 368.641,0 368.384,0C359.608,0 352.385,7.222 352.384,15.999L352.384,31.999L128.384,31.999L128.384,16.449C128.384,7.839 121.764,0.449 113.154,0.019C112.898,0.006 112.641,0 112.384,0C103.608,0 96.385,7.222 96.384,15.999L96.384,31.999L80.384,31.999C45.275,31.999 16.384,60.889 16.384,95.999L16.384,107.999C16.384,110.193 18.19,111.999 20.384,111.999L109.789,111.999Z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 512 512" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
<g transform="matrix(0.829239,0,0,0.831165,81.9652,81.0409)">
<path d="M480,128C480,92.891 451.109,64 416,64L96,64C60.891,64 32,92.891 32,128L32,140C32,142.194 33.806,144 36,144L476,144C478.194,144 480,142.194 480,140L480,128ZM32,416C32,451.109 60.891,480 96,480L416,480C451.109,480 480,451.109 480,416L480,179C480,177.354 478.646,176 477,176L35,176C33.354,176 32,177.354 32,179L32,416ZM376,208C389.166,208 400,218.834 400,232C400,245.166 389.166,256 376,256C362.834,256 352,245.166 352,232C352,218.834 362.834,208 376,208ZM376,288C389.166,288 400,298.834 400,312C400,325.166 389.166,336 376,336C362.834,336 352,325.166 352,312C352,298.834 362.834,288 376,288ZM296,208C309.166,208 320,218.834 320,232C320,245.166 309.166,256 296,256C282.834,256 272,245.166 272,232C272,218.834 282.834,208 296,208ZM296,288C309.166,288 320,298.834 320,312C320,325.166 309.166,336 296,336C282.834,336 272,325.166 272,312C272,298.834 282.834,288 296,288ZM296,368C309.166,368 320,378.834 320,392C320,405.166 309.166,416 296,416C282.834,416 272,405.166 272,392C272,378.834 282.834,368 296,368ZM216,288C229.166,288 240,298.834 240,312C240,325.166 229.166,336 216,336C202.834,336 192,325.166 192,312C192,298.834 202.834,288 216,288ZM216,368C229.166,368 240,378.834 240,392C240,405.166 229.166,416 216,416C202.834,416 192,405.166 192,392C192,378.834 202.834,368 216,368ZM136,288C149.166,288 160,298.834 160,312C160,325.166 149.166,336 136,336C122.834,336 112,325.166 112,312C112,298.834 122.834,288 136,288ZM136,368C149.166,368 160,378.834 160,392C160,405.166 149.166,416 136,416C122.834,416 112,405.166 112,392C112,378.834 122.834,368 136,368Z" style="fill-rule:nonzero;"/>
</g>
<g transform="matrix(0.829239,0,0,0.831165,18.4134,32)">
<path d="M83.619,143.999L20.384,143.999C18.19,143.999 16.384,145.804 16.384,147.999L16.384,383.999C16.384,417.261 42.316,444.942 74.896,447.744L74.896,182.264C74.896,168.561 78.028,155.581 83.619,143.999ZM109.789,111.999C124.68,100.626 143.302,93.874 163.492,93.874L464.33,93.874C463.209,59.728 434.781,31.999 400.384,31.999L384.384,31.999L384.384,16.449C384.384,7.839 377.764,0.449 369.154,0.019C368.898,0.006 368.641,0 368.384,0C359.608,0 352.385,7.222 352.384,15.999L352.384,31.999L128.384,31.999L128.384,16.449C128.384,7.839 121.764,0.449 113.154,0.019C112.898,0.006 112.641,0 112.384,0C103.608,0 96.385,7.222 96.384,15.999L96.384,31.999L80.384,31.999C45.275,31.999 16.384,60.889 16.384,95.999L16.384,107.999C16.384,110.193 18.19,111.999 20.384,111.999L109.789,111.999Z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@@ -19,6 +19,19 @@
"TITLE": "Angebote"
}
},
"chips": {
"add_events": {
"ADDED_ALL": "Hinzugefügt",
"ADDED_SOME": "Manche Termine Hinzugefügt",
"REMOVED_ALL": "Termine Auswählen",
"UNAVAILABLE": "Keine Termine Verfügbar",
"popover": {
"ALL": "Alle Termine",
"AT": "um",
"UNTIL": "bis"
}
}
},
"types": {
"dish": {
"detail": {

View File

@@ -19,6 +19,19 @@
"TITLE": "offers"
}
},
"chips": {
"add_events": {
"ADDED_ALL": "Added",
"ADDED_SOME": "Added Some Events",
"REMOVED_ALL": "Choose Events",
"UNAVAILABLE": "No Associated Events",
"popover": {
"ALL": "All Events",
"AT": "at",
"UNTIL": "until"
}
}
},
"types": {
"dish": {
"detail": {

View File

@@ -48,3 +48,7 @@ ion-item {
font-size: x-large;
}
}
.add-event-popover {
--width: fit-content;
}