Merge pull request #3866 from jsaalfeld/sc_multi_value_selector

multi-value-selector as shared component
This commit is contained in:
Finn Stutzenstein 2018-09-13 08:33:18 +02:00 committed by GitHub
commit 2269ddef91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
37 changed files with 575 additions and 164 deletions

221
client/package-lock.json generated
View File

@ -513,12 +513,12 @@
}, },
"dependencies": { "dependencies": {
"debug": { "debug": {
"version": "3.1.0", "version": "3.2.5",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.5.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", "integrity": "sha512-D61LaDQPQkxJ5AUM2mbSJRbPkNs/TmdmOeLAi1hgDkpDfIfetSrjmWhccwtuResSwMbACjx/xXQofvM9CE/aeg==",
"dev": true, "dev": true,
"requires": { "requires": {
"ms": "2.0.0" "ms": "^2.1.1"
} }
}, },
"globals": { "globals": {
@ -526,6 +526,12 @@
"resolved": "https://registry.npmjs.org/globals/-/globals-11.7.0.tgz", "resolved": "https://registry.npmjs.org/globals/-/globals-11.7.0.tgz",
"integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg==", "integrity": "sha512-K8BNSPySfeShBQXsahYB/AbbWruVOTyVpgoIDnl8odPpeSfP2J5QO2oLFFdl2j7GfDCtZj2bMKar2T49itTPCg==",
"dev": true "dev": true
},
"ms": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
"dev": true
} }
} }
}, },
@ -1373,9 +1379,9 @@
"dev": true "dev": true
}, },
"agent-base": { "agent-base": {
"version": "4.2.0", "version": "4.2.1",
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.0.tgz", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz",
"integrity": "sha512-c+R/U5X+2zz2+UCrCFv6odQzJdoqI+YecuhnAJLa1zYaMc13zPfwMwZrr91Pd1DYNo/yPRbiM4WVf9whgwFsIg==", "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==",
"dev": true, "dev": true,
"requires": { "requires": {
"es6-promisify": "^5.0.0" "es6-promisify": "^5.0.0"
@ -2062,7 +2068,7 @@
"dependencies": { "dependencies": {
"minimist": { "minimist": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
"dev": true "dev": true
} }
@ -3303,6 +3309,43 @@
} }
} }
}, },
"del": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz",
"integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=",
"dev": true,
"requires": {
"globby": "^5.0.0",
"is-path-cwd": "^1.0.0",
"is-path-in-cwd": "^1.0.0",
"object-assign": "^4.0.1",
"pify": "^2.0.0",
"pinkie-promise": "^2.0.0",
"rimraf": "^2.2.8"
},
"dependencies": {
"globby": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz",
"integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=",
"dev": true,
"requires": {
"array-union": "^1.0.1",
"arrify": "^1.0.0",
"glob": "^7.0.3",
"object-assign": "^4.0.1",
"pify": "^2.0.0",
"pinkie-promise": "^2.0.0"
}
},
"pify": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
"dev": true
}
}
},
"delayed-stream": { "delayed-stream": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
@ -3766,9 +3809,9 @@
} }
}, },
"es6-promise": { "es6-promise": {
"version": "4.2.4", "version": "4.2.5",
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.4.tgz", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.5.tgz",
"integrity": "sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ==", "integrity": "sha512-n6wvpdE43VFtJq+lUDYDBFUwV8TZbuGXLV4D6wKafg13ldznKsyEvatubnmUe31zcvelSzOHF+XbaT+Bl9ObDg==",
"dev": true "dev": true
}, },
"es6-promisify": { "es6-promisify": {
@ -4631,15 +4674,13 @@
"version": "1.0.0", "version": "1.0.0",
"resolved": false, "resolved": false,
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
"dev": true, "dev": true
"optional": true
}, },
"brace-expansion": { "brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
"resolved": false, "resolved": false,
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"balanced-match": "^1.0.0", "balanced-match": "^1.0.0",
"concat-map": "0.0.1" "concat-map": "0.0.1"
@ -4656,22 +4697,19 @@
"version": "1.1.0", "version": "1.1.0",
"resolved": false, "resolved": false,
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
"dev": true, "dev": true
"optional": true
}, },
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
"resolved": false, "resolved": false,
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
"dev": true, "dev": true
"optional": true
}, },
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"resolved": false, "resolved": false,
"integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",
"dev": true, "dev": true
"optional": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
@ -4802,8 +4840,7 @@
"version": "2.0.3", "version": "2.0.3",
"resolved": false, "resolved": false,
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
"dev": true, "dev": true
"optional": true
}, },
"ini": { "ini": {
"version": "1.3.5", "version": "1.3.5",
@ -4817,7 +4854,6 @@
"resolved": false, "resolved": false,
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"number-is-nan": "^1.0.0" "number-is-nan": "^1.0.0"
} }
@ -4834,7 +4870,6 @@
"resolved": false, "resolved": false,
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"brace-expansion": "^1.1.7" "brace-expansion": "^1.1.7"
} }
@ -4843,15 +4878,13 @@
"version": "0.0.8", "version": "0.0.8",
"resolved": false, "resolved": false,
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
"dev": true, "dev": true
"optional": true
}, },
"minipass": { "minipass": {
"version": "2.2.4", "version": "2.2.4",
"resolved": false, "resolved": false,
"integrity": "sha512-hzXIWWet/BzWhYs2b+u7dRHlruXhwdgvlTMDKC6Cb1U7ps6Ac6yQlR39xsbjWJE377YTCtKwIXIpJ5oP+j5y8g==", "integrity": "sha512-hzXIWWet/BzWhYs2b+u7dRHlruXhwdgvlTMDKC6Cb1U7ps6Ac6yQlR39xsbjWJE377YTCtKwIXIpJ5oP+j5y8g==",
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.1", "safe-buffer": "^5.1.1",
"yallist": "^3.0.0" "yallist": "^3.0.0"
@ -4872,7 +4905,6 @@
"resolved": false, "resolved": false,
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
@ -4961,8 +4993,7 @@
"version": "1.0.1", "version": "1.0.1",
"resolved": false, "resolved": false,
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
"dev": true, "dev": true
"optional": true
}, },
"object-assign": { "object-assign": {
"version": "4.1.1", "version": "4.1.1",
@ -4976,7 +5007,6 @@
"resolved": false, "resolved": false,
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"wrappy": "1" "wrappy": "1"
} }
@ -5114,7 +5144,6 @@
"resolved": false, "resolved": false,
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",
@ -5836,13 +5865,19 @@
}, },
"dependencies": { "dependencies": {
"debug": { "debug": {
"version": "3.1.0", "version": "3.2.5",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.5.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", "integrity": "sha512-D61LaDQPQkxJ5AUM2mbSJRbPkNs/TmdmOeLAi1hgDkpDfIfetSrjmWhccwtuResSwMbACjx/xXQofvM9CE/aeg==",
"dev": true, "dev": true,
"requires": { "requires": {
"ms": "2.0.0" "ms": "^2.1.1"
} }
},
"ms": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
"dev": true
} }
} }
}, },
@ -6632,12 +6667,12 @@
}, },
"dependencies": { "dependencies": {
"debug": { "debug": {
"version": "3.1.0", "version": "3.2.5",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.5.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", "integrity": "sha512-D61LaDQPQkxJ5AUM2mbSJRbPkNs/TmdmOeLAi1hgDkpDfIfetSrjmWhccwtuResSwMbACjx/xXQofvM9CE/aeg==",
"dev": true, "dev": true,
"requires": { "requires": {
"ms": "2.0.0" "ms": "^2.1.1"
} }
}, },
"istanbul-lib-coverage": { "istanbul-lib-coverage": {
@ -6646,6 +6681,12 @@
"integrity": "sha512-nPvSZsVlbG9aLhZYaC3Oi1gT/tpyo3Yt5fNyf6NmcKIayz4VV/txxJFFKAK/gU4dcNn8ehsanBbVHVl0+amOLA==", "integrity": "sha512-nPvSZsVlbG9aLhZYaC3Oi1gT/tpyo3Yt5fNyf6NmcKIayz4VV/txxJFFKAK/gU4dcNn8ehsanBbVHVl0+amOLA==",
"dev": true "dev": true
}, },
"ms": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
"dev": true
},
"source-map": { "source-map": {
"version": "0.6.1", "version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
@ -6857,7 +6898,7 @@
}, },
"es6-promise": { "es6-promise": {
"version": "3.0.2", "version": "3.0.2",
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.0.2.tgz", "resolved": "http://registry.npmjs.org/es6-promise/-/es6-promise-3.0.2.tgz",
"integrity": "sha1-AQ1YWEI6XxGJeWZfRkhqlcbuK7Y=", "integrity": "sha1-AQ1YWEI6XxGJeWZfRkhqlcbuK7Y=",
"dev": true "dev": true
}, },
@ -6869,7 +6910,7 @@
}, },
"readable-stream": { "readable-stream": {
"version": "2.0.6", "version": "2.0.6",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz",
"integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -6949,9 +6990,9 @@
} }
}, },
"karma-coverage-istanbul-reporter": { "karma-coverage-istanbul-reporter": {
"version": "2.0.3", "version": "2.0.4",
"resolved": "https://registry.npmjs.org/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-2.0.3.tgz", "resolved": "https://registry.npmjs.org/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-2.0.4.tgz",
"integrity": "sha512-UVs9IDulfwkBxjEnUzfR/nIc3oBneOPuorpLVBvEMtz2hy0wnVLhCMxpkqAtuQWqvOZRQlGqs+dDtMUeRydTQA==", "integrity": "sha512-xJS7QSQIVU6VK9HuJ/ieE5yynxKhjCCkd96NLY/BX/HXsx0CskU9JJiMQbd4cHALiddMwI4OWh1IIzeWrsavJw==",
"dev": true, "dev": true,
"requires": { "requires": {
"istanbul-api": "^2.0.5", "istanbul-api": "^2.0.5",
@ -7868,6 +7909,14 @@
"integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=",
"dev": true "dev": true
}, },
"ngx-mat-select-search": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/ngx-mat-select-search/-/ngx-mat-select-search-1.3.1.tgz",
"integrity": "sha512-ZggcqsfcJZ1tcy6ZgNnifrvn/ahWJqRO2B7QXHt0FDUo4lrv/2cuHALzwuwlY/z8rZeH+ZEmaAevzQtYH8mKpA==",
"requires": {
"tslib": "^1.9.0"
}
},
"nice-try": { "nice-try": {
"version": "1.0.4", "version": "1.0.4",
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.4.tgz", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.4.tgz",
@ -9173,9 +9222,9 @@
"dev": true "dev": true
}, },
"protractor": { "protractor": {
"version": "5.4.0", "version": "5.4.1",
"resolved": "https://registry.npmjs.org/protractor/-/protractor-5.4.0.tgz", "resolved": "https://registry.npmjs.org/protractor/-/protractor-5.4.1.tgz",
"integrity": "sha512-6TSYqMhUUzxr4/wN0ttSISqPMKvcVRXF4k8jOEpGWD8OioLak4KLgfzHK9FJ49IrjzRrZ+Mx1q2Op8Rk0zEcnQ==", "integrity": "sha512-ORey5ewQMYiXQxcQohsqEiKYOg/r5yJoJbt0tuROmmgajdg/CA3gTOZNIFJncUVMAJIk5YFqBBLUjKVmQO6tfA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@types/node": "^6.0.46", "@types/node": "^6.0.46",
@ -9192,14 +9241,14 @@
"saucelabs": "^1.5.0", "saucelabs": "^1.5.0",
"selenium-webdriver": "3.6.0", "selenium-webdriver": "3.6.0",
"source-map-support": "~0.4.0", "source-map-support": "~0.4.0",
"webdriver-js-extender": "2.0.0", "webdriver-js-extender": "2.1.0",
"webdriver-manager": "^12.0.6" "webdriver-manager": "^12.0.6"
}, },
"dependencies": { "dependencies": {
"@types/node": { "@types/node": {
"version": "6.0.116", "version": "6.0.117",
"resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.116.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-6.0.117.tgz",
"integrity": "sha512-vToa8YEeulfyYg1gSOeHjvvIRqrokng62VMSj2hoZrwZNcYrp2h3AWo6KeBVuymIklQUaY5zgVJvVsC4KiiLkQ==", "integrity": "sha512-sihk0SnN8PpiS5ihu5xJQ5ddnURNq4P+XPmW+nORlKkHy21CoZO/IVHK/Wq/l3G8fFW06Fkltgnqx229uPlnRg==",
"dev": true "dev": true
}, },
"ansi-styles": { "ansi-styles": {
@ -9210,7 +9259,7 @@
}, },
"chalk": { "chalk": {
"version": "1.1.3", "version": "1.1.3",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -9221,47 +9270,12 @@
"supports-color": "^2.0.0" "supports-color": "^2.0.0"
} }
}, },
"del": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz",
"integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=",
"dev": true,
"requires": {
"globby": "^5.0.0",
"is-path-cwd": "^1.0.0",
"is-path-in-cwd": "^1.0.0",
"object-assign": "^4.0.1",
"pify": "^2.0.0",
"pinkie-promise": "^2.0.0",
"rimraf": "^2.2.8"
}
},
"globby": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz",
"integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=",
"dev": true,
"requires": {
"array-union": "^1.0.1",
"arrify": "^1.0.0",
"glob": "^7.0.3",
"object-assign": "^4.0.1",
"pify": "^2.0.0",
"pinkie-promise": "^2.0.0"
}
},
"minimist": { "minimist": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
"dev": true "dev": true
}, },
"pify": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
"dev": true
},
"source-map-support": { "source-map-support": {
"version": "0.4.18", "version": "0.4.18",
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz",
@ -11914,36 +11928,13 @@
} }
}, },
"webdriver-js-extender": { "webdriver-js-extender": {
"version": "2.0.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/webdriver-js-extender/-/webdriver-js-extender-2.0.0.tgz", "resolved": "https://registry.npmjs.org/webdriver-js-extender/-/webdriver-js-extender-2.1.0.tgz",
"integrity": "sha512-fbyKiVu3azzIc5d4+26YfuPQcFTlgFQV5yQ/0OQj4Ybkl4g1YQuIPskf5v5wqwRJhHJnPHthB6tqCjWHOKLWag==", "integrity": "sha512-lcUKrjbBfCK6MNsh7xaY2UAUmZwe+/ib03AjVOpFobX4O7+83BUveSrLfU0Qsyb1DaKJdQRbuU+kM9aZ6QUhiQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@types/selenium-webdriver": "^3.0.0", "@types/selenium-webdriver": "^3.0.0",
"selenium-webdriver": "^3.0.1" "selenium-webdriver": "^3.0.1"
},
"dependencies": {
"selenium-webdriver": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-3.6.0.tgz",
"integrity": "sha512-WH7Aldse+2P5bbFBO4Gle/nuQOdVwpHMTL6raL3uuBj/vPG07k6uzt3aiahu352ONBr5xXh0hDlM3LhtXPOC4Q==",
"dev": true,
"requires": {
"jszip": "^3.1.3",
"rimraf": "^2.5.4",
"tmp": "0.0.30",
"xml2js": "^0.4.17"
}
},
"tmp": {
"version": "0.0.30",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.30.tgz",
"integrity": "sha1-ckGdSovn1s51FI/YsyTlk6cRwu0=",
"dev": true,
"requires": {
"os-tmpdir": "~1.0.1"
}
}
} }
}, },
"webpack": { "webpack": {

View File

@ -33,6 +33,7 @@
"@ngx-translate/core": "^10.0.2", "@ngx-translate/core": "^10.0.2",
"@ngx-translate/http-loader": "^3.0.1", "@ngx-translate/http-loader": "^3.0.1",
"core-js": "^2.5.4", "core-js": "^2.5.4",
"ngx-mat-select-search": "^1.3.1",
"rxjs": "^6.3.2", "rxjs": "^6.3.2",
"uuid": "^3.3.2", "uuid": "^3.3.2",
"zone.js": "^0.8.26" "zone.js": "^0.8.26"
@ -53,13 +54,13 @@
"jasmine-spec-reporter": "~4.2.1", "jasmine-spec-reporter": "~4.2.1",
"karma": "^3.0.0", "karma": "^3.0.0",
"karma-chrome-launcher": "~2.2.0", "karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "^2.0.3", "karma-coverage-istanbul-reporter": "^2.0.4",
"karma-jasmine": "~1.1.1", "karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^0.2.2", "karma-jasmine-html-reporter": "^0.2.2",
"npm-run-all": "^4.1.3", "npm-run-all": "^4.1.3",
"prettier": "^1.14.2", "prettier": "^1.14.2",
"pretty-quick": "^1.6.0", "pretty-quick": "^1.6.0",
"protractor": "^5.4.0", "protractor": "^5.4.1",
"ts-node": "~5.0.1", "ts-node": "~5.0.1",
"tslint": "~5.9.1", "tslint": "~5.9.1",
"typescript": "~2.7.2" "typescript": "~2.7.2"

View File

@ -0,0 +1,18 @@
<mat-form-field [formGroup]="form">
<mat-select [formControl]="formControl" placeholder="{{listname}}" multiple="{{multiple}}" #thisSelector>
<ngx-mat-select-search [formControl]="filterControl"></ngx-mat-select-search>
<mat-option *ngFor="let selectedItem of filteredItems | async" [value]="selectedItem">
{{selectedItem.toString()}}
</mat-option>
</mat-select>
</mat-form-field>
<div *ngIf="dispSelected">
<p>
<span translate>Selected Values</span>:
</p>
<mat-chip-list #chipList>
<mat-chip *ngFor="let selectedItem of thisSelector?.value" (removed)="remove(selectedItem)">{{selectedItem.name}}
<fa-icon matSuffix icon="times" (click)="remove(selectedItem)"></fa-icon>
</mat-chip>
</mat-chip-list>
</div>

View File

@ -0,0 +1,3 @@
fa-icon {
padding-left: 5px;
}

View File

@ -0,0 +1,24 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { SearchValueSelectorComponent } from './search-value-selector.component';
describe('SearchValueSelectorComponent', () => {
let component: SearchValueSelectorComponent;
let fixture: ComponentFixture<SearchValueSelectorComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [SearchValueSelectorComponent]
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(SearchValueSelectorComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,179 @@
import { Component, OnInit, Input, ViewChild } from '@angular/core';
import { FormControl, FormGroup } from '@angular/forms';
import { ReplaySubject, Subject } from 'rxjs';
import { MatSelect } from '@angular/material';
import { SelectorItem } from './search-value-selector.interfaces';
import { takeUntil } from 'rxjs/operators';
/**
* Reusable Searchable Value Selector
*
* Use `multiple="true"`, `[InputListValues]=myValues`,`[formControl]="myformcontrol"`, `[form]="myform_name"` and `placeholder={{listname}}` to pass the Values and Listname
*
* ## Examples:
*
* ### Usage of the selector:
*
* ngDefaultControl: https://stackoverflow.com/a/39053470
*
* ```html
* <os-search-value-selector
* ngDefaultControl
* multiple="true"
* placeholder="Placeholder"
* [InputListValues]="myListValues",
* [form]="myform_name",
* [formControl]="myformcontrol">
* </os-search-value-selector>
* ```
*
* ### Declaration of a Selector provided as `[InputListValues]=myListValues`:
*
* Every Class that enherits of BaseModel implements the SelectorItem Interface and can
* therefore be used directly in the Selector Component.
*
* ```ts
* import { SelectorItem } from '../../shared/components/search-value-selector/search-value-selector.interfaces';
*
* const myListValues: SelectorItem[];
* myListValues = this.DS.get(User);
* ```
*/
@Component({
selector: 'os-search-value-selector',
templateUrl: './search-value-selector.component.html',
styleUrls: ['./search-value-selector.component.scss']
})
export class SearchValueSelectorComponent implements OnInit {
/**
* ngModel variable - Depricated with Angular 7
* DO NOT USE: READ AT remove() FUNCTION!
*/
public myModel = [];
/**
* Control for the filtering of the list
*/
public filterControl = new FormControl();
/**
* List of the filtered content, when entering somithing in the search bar
*/
public filteredItems: ReplaySubject<SelectorItem[]> = new ReplaySubject<SelectorItem[]>(1);
/**
* Decide if this should be a single or multi-select-field
*/
@Input()
public multiple: boolean;
/**
* The Input List Values
*/
@Input()
public InputListValues: SelectorItem[];
/**
* Placeholder of the List
*/
@Input()
public listname: String;
/**
* Form Group
*/
@Input()
public form: FormGroup;
/**
* Name of the Form
*/
@Input()
public formControl: FormControl;
/**
* DO NOT USE UNTIL BUG IN UPSTREAM ARE RESOLVED!
* READ AT FUNCTION remove()
*
* Displayes the selected Items as Chip-List
*/
// @Input()
public dispSelected = false;
/**
* The MultiSelect Component
*/
@ViewChild('thisSelector')
public thisSelector: MatSelect;
/**
* Subject that emits when the component has been destroyed
*/
private _onDestroy = new Subject<void>();
/**
* Empty constructor
*/
public constructor() {}
/**
* onInit with filter ans subscription on filter
*/
public ngOnInit(): void {
// load the initial item list
this.filteredItems.next(this.InputListValues.slice());
// listen to value changes
this.filterControl.valueChanges.pipe(takeUntil(this._onDestroy)).subscribe(() => {
this.filterItems();
});
// this.multiSelect.stateChanges.subscribe(fn => console.log('ive changed'));
}
/**
* the filter function itself
*/
private filterItems(): void {
if (!this.InputListValues) {
return;
}
// get the search keyword
let search = this.filterControl.value;
if (!search) {
this.filteredItems.next(this.InputListValues.slice());
return;
} else {
search = search.toLowerCase();
}
// filter the values
this.filteredItems.next(
this.InputListValues.filter(
selectedItem =>
selectedItem
.toString()
.toLowerCase()
.indexOf(search) > -1
)
);
}
/**
* If the dispSelected value is marked as true, a chipList should be shown below the
* selection list. Unfortunately it is not possible (yet) to change the datamodel in the backend
* https://github.com/angular/material2/issues/10085 - therefore you can display the values in two
* places, but can't reflect the changes in both places. Until this can be done this will be unused code
* @param item the selected item to be removed
*/
public remove(item: SelectorItem): void {
const myArr = this.thisSelector.value;
const index = myArr.indexOf(item, 0);
// my model was the form according to fix
// https://github.com/angular/material2/issues/10044
// but this causes bad behaviour and will be depricated in Angular 7
this.myModel = this.myModel.slice(index, 1);
if (index > -1) {
myArr.splice(index, 1);
}
this.thisSelector.value = myArr;
}
}

View File

@ -0,0 +1,10 @@
/**
* Inteface for the Multi-Value-Selector Component to display and use
* the given values.
*/
export interface SelectorItem {
/**
* translates the displayable part of the function to a String
*/
toString(): string;
}

View File

@ -53,6 +53,10 @@ export class Item extends BaseModel {
}); });
} }
} }
public toString(): string {
return this.title;
}
} }
BaseModel.registerCollectionElement('agenda/item', Item); BaseModel.registerCollectionElement('agenda/item', Item);

View File

@ -53,6 +53,10 @@ export class Assignment extends BaseModel {
}); });
} }
} }
public toString(): string {
return this.title;
}
} }
BaseModel.registerCollectionElement('assignments/assignment', Assignment); BaseModel.registerCollectionElement('assignments/assignment', Assignment);

View File

@ -1,6 +1,7 @@
import { OpenSlidesComponent } from 'app/openslides.component'; import { OpenSlidesComponent } from 'app/openslides.component';
import { Deserializable } from './deserializable.model'; import { Deserializable } from './deserializable.model';
import { CollectionStringModelMapperService } from '../../core/services/collectionStringModelMapper.service'; import { CollectionStringModelMapperService } from '../../core/services/collectionStringModelMapper.service';
import { SelectorItem } from '../components/search-value-selector/search-value-selector.interfaces';
export interface ModelConstructor<T extends BaseModel> { export interface ModelConstructor<T extends BaseModel> {
new (...args: any[]): T; new (...args: any[]): T;
@ -9,7 +10,7 @@ export interface ModelConstructor<T extends BaseModel> {
/** /**
* Abstract parent class to set rules and functions for all models. * Abstract parent class to set rules and functions for all models.
*/ */
export abstract class BaseModel extends OpenSlidesComponent implements Deserializable { export abstract class BaseModel extends OpenSlidesComponent implements Deserializable, SelectorItem {
/** /**
* Register the collection string to the type. * Register the collection string to the type.
* @param collectionString * @param collectionString
@ -55,6 +56,10 @@ export abstract class BaseModel extends OpenSlidesComponent implements Deseriali
} }
}); });
} }
/**
* force children to have a toString() method
*/
public abstract toString(): string;
/** /**
* returns the collectionString. * returns the collectionString.

View File

@ -18,6 +18,10 @@ export class ChatMessage extends BaseModel {
public getUser(): User { public getUser(): User {
return this.DS.get<User>('users/user', this.user_id); return this.DS.get<User>('users/user', this.user_id);
} }
public toString(): string {
return this.message;
}
} }
BaseModel.registerCollectionElement('core/chat-message', ChatMessage); BaseModel.registerCollectionElement('core/chat-message', ChatMessage);

View File

@ -12,6 +12,10 @@ export class Config extends BaseModel {
public constructor(input?: any) { public constructor(input?: any) {
super('core/config', input); super('core/config', input);
} }
public toString(): string {
return this.key;
}
} }
BaseModel.registerCollectionElement('core/config', Config); BaseModel.registerCollectionElement('core/config', Config);

View File

@ -14,6 +14,10 @@ export class Countdown extends BaseModel {
public constructor(input?: any) { public constructor(input?: any) {
super('core/countdown'); super('core/countdown');
} }
public toString(): string {
return this.description;
}
} }
BaseModel.registerCollectionElement('core/countdown', Countdown); BaseModel.registerCollectionElement('core/countdown', Countdown);

View File

@ -11,6 +11,10 @@ export class ProjectorMessage extends BaseModel {
public constructor(input?: any) { public constructor(input?: any) {
super('core/projector-message', input); super('core/projector-message', input);
} }
public toString(): string {
return this.message;
}
} }
BaseModel.registerCollectionElement('core/projector-message', ProjectorMessage); BaseModel.registerCollectionElement('core/projector-message', ProjectorMessage);

View File

@ -18,6 +18,10 @@ export class Projector extends BaseModel {
public constructor(input?: any) { public constructor(input?: any) {
super('core/projector', input); super('core/projector', input);
} }
public toString(): string {
return this.name;
}
} }
BaseModel.registerCollectionElement('core/projector', Projector); BaseModel.registerCollectionElement('core/projector', Projector);

View File

@ -11,6 +11,10 @@ export class Tag extends BaseModel {
public constructor(input?: any) { public constructor(input?: any) {
super('core/tag', input); super('core/tag', input);
} }
public toString(): string {
return this.name;
}
} }
BaseModel.registerCollectionElement('core/tag', Tag); BaseModel.registerCollectionElement('core/tag', Tag);

View File

@ -28,6 +28,10 @@ export class Mediafile extends BaseModel {
public getUploader(): User { public getUploader(): User {
return this.DS.get<User>('users/user', this.uploader_id); return this.DS.get<User>('users/user', this.uploader_id);
} }
public toString(): string {
return this.title;
}
} }
BaseModel.registerCollectionElement('amediafiles/mediafile', Mediafile); BaseModel.registerCollectionElement('amediafiles/mediafile', Mediafile);

View File

@ -13,9 +13,9 @@ export class Category extends BaseModel {
super('motions/category', input); super('motions/category', input);
} }
public toString = (): string => { public toString(): string {
return this.prefix + ' - ' + this.name; return this.prefix + ' - ' + this.name;
}; }
} }
BaseModel.registerCollectionElement('motions/category', Category); BaseModel.registerCollectionElement('motions/category', Category);

View File

@ -17,6 +17,10 @@ export class MotionBlock extends BaseModel {
public getAgenda(): BaseModel | BaseModel[] { public getAgenda(): BaseModel | BaseModel[] {
return this.DS.get<Item>('agenda/item', this.agenda_item_id); return this.DS.get<Item>('agenda/item', this.agenda_item_id);
} }
public toString(): string {
return this.title;
}
} }
BaseModel.registerCollectionElement('motions/motion-block', MotionBlock); BaseModel.registerCollectionElement('motions/motion-block', MotionBlock);

View File

@ -18,6 +18,10 @@ export class MotionChangeReco extends BaseModel {
public constructor(input?: any) { public constructor(input?: any) {
super('motions/motion-change-recommendation', input); super('motions/motion-change-recommendation', input);
} }
public toString(): string {
return this.text;
}
} }
BaseModel.registerCollectionElement('motions/motion-change-recommendation', MotionChangeReco); BaseModel.registerCollectionElement('motions/motion-change-recommendation', MotionChangeReco);

View File

@ -13,6 +13,10 @@ export class MotionCommentSection extends BaseModel {
public constructor(input?: any) { public constructor(input?: any) {
super('motions/motion-comment-section', input); super('motions/motion-comment-section', input);
} }
public toString(): string {
return this.name;
}
} }
BaseModel.registerCollectionElement('motions/motion-comment-section', MotionCommentSection); BaseModel.registerCollectionElement('motions/motion-comment-section', MotionCommentSection);

View File

@ -1,4 +1,5 @@
import { Deserializer } from '../deserializer.model'; import { Deserializer } from '../deserializer.model';
import { User } from '../users/user';
/** /**
* Representation of a Motion Submitter. * Representation of a Motion Submitter.
@ -11,7 +12,16 @@ export class MotionSubmitter extends Deserializer {
public motion_id: number; public motion_id: number;
public weight: number; public weight: number;
public constructor(input?: any) { public constructor(input?: any, motion_id?: number, weight?: number) {
super(input); super();
this.id = input.id;
if (input instanceof User) {
const user_obj = input as User;
this.user_id = user_obj.id;
this.motion_id = motion_id;
this.weight = weight;
} else {
this.deserialize(input);
}
} }
} }

View File

@ -25,6 +25,7 @@ export class Motion extends BaseModel {
public motion_block_id: number; public motion_block_id: number;
public origin: string; public origin: string;
public submitters: MotionSubmitter[]; public submitters: MotionSubmitter[];
public submitters_id: number[];
public supporters_id: number[]; public supporters_id: number[];
public comments: MotionComment[]; public comments: MotionComment[];
public workflow_id: number; public workflow_id: number;
@ -61,15 +62,16 @@ export class Motion extends BaseModel {
.map((submitter: MotionSubmitter) => submitter.user_id); .map((submitter: MotionSubmitter) => submitter.user_id);
} }
/**
* returns the Motion name
*/
public toString(): string {
return this.title;
}
public deserialize(input: any): void { public deserialize(input: any): void {
Object.assign(this, input); Object.assign(this, input);
if (input.submitters instanceof Array) {
input.submitters.forEach(SubmitterData => {
this.submitters.push(new MotionSubmitter(SubmitterData));
});
}
this.log_messages = []; this.log_messages = [];
if (input.log_messages instanceof Array) { if (input.log_messages instanceof Array) {
input.log_messages.forEach(logData => { input.log_messages.forEach(logData => {

View File

@ -53,6 +53,10 @@ export class Workflow extends BaseModel {
}); });
} }
} }
public toString(): string {
return this.name;
}
} }
BaseModel.registerCollectionElement('motions/workflow', Workflow); BaseModel.registerCollectionElement('motions/workflow', Workflow);

View File

@ -24,6 +24,10 @@ export class Topic extends BaseModel {
public getAgenda(): Item { public getAgenda(): Item {
return this.DS.get<Item>('agenda/item', this.agenda_item_id); return this.DS.get<Item>('agenda/item', this.agenda_item_id);
} }
public toString(): string {
return this.title;
}
} }
BaseModel.registerCollectionElement('topics/topic', Topic); BaseModel.registerCollectionElement('topics/topic', Topic);

View File

@ -20,6 +20,10 @@ export class Group extends BaseModel {
return user.groups_id.includes(this.id); return user.groups_id.includes(this.id);
}); });
} }
public toString(): string {
return this.name;
}
} }
BaseModel.registerCollectionElement('users/group', Group); BaseModel.registerCollectionElement('users/group', Group);

View File

@ -17,6 +17,10 @@ export class PersonalNote extends BaseModel {
public getUser(): User { public getUser(): User {
return this.DS.get<User>('users/user', this.user_id); return this.DS.get<User>('users/user', this.user_id);
} }
public toString(): string {
return this.notes.toString();
}
} }
BaseModel.registerCollectionElement('users/personal-note', PersonalNote); BaseModel.registerCollectionElement('users/personal-note', PersonalNote);

View File

@ -82,9 +82,9 @@ export class User extends BaseModel {
return shortName.trim(); return shortName.trim();
} }
public toString = (): string => { public toString(): string {
return this.short_name; return this.short_name;
}; }
} }
BaseModel.registerCollectionElement('users/user', User); BaseModel.registerCollectionElement('users/user', User);

View File

@ -18,6 +18,9 @@ import {
MatSortModule, MatSortModule,
MatTabsModule MatTabsModule
} from '@angular/material'; } from '@angular/material';
import { MatAutocompleteModule } from '@angular/material/autocomplete';
import { MatChipsModule } from '@angular/material';
import { NgxMatSelectSearchModule } from 'ngx-mat-select-search';
import { MatDialogModule } from '@angular/material/dialog'; import { MatDialogModule } from '@angular/material/dialog';
import { MatListModule } from '@angular/material/list'; import { MatListModule } from '@angular/material/list';
import { MatExpansionModule } from '@angular/material/expansion'; import { MatExpansionModule } from '@angular/material/expansion';
@ -40,6 +43,7 @@ import { HeadBarComponent } from './components/head-bar/head-bar.component';
import { FooterComponent } from './components/footer/footer.component'; import { FooterComponent } from './components/footer/footer.component';
import { LegalNoticeContentComponent } from './components/legal-notice-content/legal-notice-content.component'; import { LegalNoticeContentComponent } from './components/legal-notice-content/legal-notice-content.component';
import { PrivacyPolicyContentComponent } from './components/privacy-policy-content/privacy-policy-content.component'; import { PrivacyPolicyContentComponent } from './components/privacy-policy-content/privacy-policy-content.component';
import { SearchValueSelectorComponent } from './components/search-value-selector/search-value-selector.component';
library.add(fas); library.add(fas);
@ -59,6 +63,7 @@ library.add(fas);
MatFormFieldModule, MatFormFieldModule,
MatSelectModule, MatSelectModule,
ReactiveFormsModule, ReactiveFormsModule,
MatAutocompleteModule,
MatButtonModule, MatButtonModule,
MatCheckboxModule, MatCheckboxModule,
MatToolbarModule, MatToolbarModule,
@ -76,10 +81,13 @@ library.add(fas);
MatSnackBarModule, MatSnackBarModule,
FontAwesomeModule, FontAwesomeModule,
TranslateModule.forChild(), TranslateModule.forChild(),
RouterModule RouterModule,
MatChipsModule,
NgxMatSelectSearchModule
], ],
exports: [ exports: [
FormsModule, FormsModule,
MatAutocompleteModule,
MatFormFieldModule, MatFormFieldModule,
MatSelectModule, MatSelectModule,
ReactiveFormsModule, ReactiveFormsModule,
@ -99,12 +107,14 @@ library.add(fas);
MatDialogModule, MatDialogModule,
MatSnackBarModule, MatSnackBarModule,
MatTabsModule, MatTabsModule,
NgxMatSelectSearchModule,
FontAwesomeModule, FontAwesomeModule,
TranslateModule, TranslateModule,
PermsDirective, PermsDirective,
DomChangeDirective, DomChangeDirective,
FooterComponent, FooterComponent,
HeadBarComponent, HeadBarComponent,
SearchValueSelectorComponent,
LegalNoticeContentComponent, LegalNoticeContentComponent,
PrivacyPolicyContentComponent PrivacyPolicyContentComponent
], ],
@ -114,7 +124,8 @@ library.add(fas);
HeadBarComponent, HeadBarComponent,
FooterComponent, FooterComponent,
LegalNoticeContentComponent, LegalNoticeContentComponent,
PrivacyPolicyContentComponent PrivacyPolicyContentComponent,
SearchValueSelectorComponent
] ]
}) })
export class SharedModule {} export class SharedModule {}

View File

@ -68,6 +68,28 @@ export abstract class BaseRepository<V extends BaseViewModel, M extends BaseMode
}); });
} }
/**
* Saves the update to an existing model. So called "update"-function
* @param update the update that should be created
* @param viewModel the view model that the update is based on
*/
public abstract save(update: M, viewModel: V): Observable<M>;
/**
* Deletes a given Model
* @param update the update that should be created
* @param viewModel the view model that the update is based on
*/
public abstract delete(viewModel: V): Observable<M>;
/**
* Creates a new model
* @param update the update that should be created
* @param viewModel the view model that the update is based on
* TODO: remove the viewModel
*/
public abstract create(update: M, viewModel: V): Observable<M>;
protected abstract createViewModel(model: M): V; protected abstract createViewModel(model: M): V;
/** /**

View File

@ -146,14 +146,33 @@
<!-- Submitter --> <!-- Submitter -->
<div *ngIf="motion && motion.submitters || editMotion"> <div *ngIf="motion && motion.submitters || editMotion">
<div *ngIf="editMotion && newMotion">
<div *ngIf="motion && editMotion">
<os-search-value-selector ngDefaultControl [form]="metaInfoForm" [formControl]="this.metaInfoForm.get('submitters')" multiple="true" listname="Submitter" [InputListValues]="getAllUsers()"></os-search-value-selector>
</div>
</div>
<div *ngIf="!editMotion || !newMotion">
<h3 translate>Submitters</h3> <h3 translate>Submitters</h3>
{{motion.submitters}} <ul *ngFor="let submitters of motion.submitters">
<li>{{submitters}}</li>
</ul>
</div>
</div> </div>
<!-- Supporter --> <!-- Supporter -->
<div *ngIf='motion && motion.hasSupporters() || editMotion'> <div *ngIf='motion && motion.hasSupporters() || editMotion'>
<h3 translate>Supporters</h3>
<!-- print all motion supporters --> <!-- print all motion supporters -->
<div *ngIf="editMotion">
<div *ngIf="motion && editMotion">
<os-search-value-selector ngDefaultControl [form]="metaInfoForm" [formControl]="this.metaInfoForm.get('supporters_id')" multiple="true" listname="Supporter" [InputListValues]="getAllUsers()"></os-search-value-selector>
</div>
</div>
<div *ngIf="!editMotion && motion.hasSupporters()">
<h3 translate>Supporters</h3>
<ul *ngFor="let supporters of motion.supporters">
<li>{{supporters}}</li>
</ul>
</div>
</div> </div>
<!-- State --> <!-- State -->
@ -202,13 +221,9 @@
<h3 translate> Category</h3> <h3 translate> Category</h3>
{{motion.category}} {{motion.category}}
</div> </div>
<mat-form-field *ngIf="motion && editMotion"> <div *ngIf="editMotion">
<mat-select placeholder='Category' formControlName='category_id'> <os-search-value-selector ngDefaultControl [form]="metaInfoForm" [formControl]="this.metaInfoForm.get('category_id')" multiple="false" listname="Category" [InputListValues]="getMotionCategories()"></os-search-value-selector>
<mat-option>None</mat-option> </div>
<mat-divider></mat-divider>
<mat-option *ngFor="let cat of getMotionCategories()" [value]="cat.id">{{cat}}</mat-option>
</mat-select>
</mat-form-field>
</div> </div>
<!-- Origin --> <!-- Origin -->

View File

@ -8,6 +8,7 @@ import { Category } from '../../../../shared/models/motions/category';
import { ViewportService } from '../../../../core/services/viewport.service'; import { ViewportService } from '../../../../core/services/viewport.service';
import { MotionRepositoryService } from '../../services/motion-repository.service'; import { MotionRepositoryService } from '../../services/motion-repository.service';
import { ViewMotion } from '../../models/view-motion'; import { ViewMotion } from '../../models/view-motion';
import { User } from '../../../../shared/models/users/user';
/** /**
* Component for the motion detail view * Component for the motion detail view
@ -22,13 +23,15 @@ export class MotionDetailComponent extends BaseComponent implements OnInit {
* MatExpansionPanel for the meta info * MatExpansionPanel for the meta info
* Only relevant in mobile view * Only relevant in mobile view
*/ */
@ViewChild('metaInfoPanel') public metaInfoPanel: MatExpansionPanel; @ViewChild('metaInfoPanel')
public metaInfoPanel: MatExpansionPanel;
/** /**
* MatExpansionPanel for the content panel * MatExpansionPanel for the content panel
* Only relevant in mobile view * Only relevant in mobile view
*/ */
@ViewChild('contentPanel') public contentPanel: MatExpansionPanel; @ViewChild('contentPanel')
public contentPanel: MatExpansionPanel;
/** /**
* Motions meta-info * Motions meta-info
@ -103,6 +106,8 @@ export class MotionDetailComponent extends BaseComponent implements OnInit {
public patchForm(formMotion: ViewMotion): void { public patchForm(formMotion: ViewMotion): void {
this.metaInfoForm.patchValue({ this.metaInfoForm.patchValue({
category_id: formMotion.categoryId, category_id: formMotion.categoryId,
supporters_id: formMotion.supporters,
submitters: formMotion.submitters,
state_id: formMotion.stateId, state_id: formMotion.stateId,
recommendation_id: formMotion.recommendationId, recommendation_id: formMotion.recommendationId,
identifier: formMotion.identifier, identifier: formMotion.identifier,
@ -126,6 +131,8 @@ export class MotionDetailComponent extends BaseComponent implements OnInit {
category_id: [''], category_id: [''],
state_id: [''], state_id: [''],
recommendation_id: [''], recommendation_id: [''],
submitters: [''],
supporters_id: [''],
origin: [''] origin: ['']
}); });
this.contentForm = this.formBuilder.group({ this.contentForm = this.formBuilder.group({
@ -149,11 +156,11 @@ export class MotionDetailComponent extends BaseComponent implements OnInit {
public saveMotion(): void { public saveMotion(): void {
const newMotionValues = { ...this.metaInfoForm.value, ...this.contentForm.value }; const newMotionValues = { ...this.metaInfoForm.value, ...this.contentForm.value };
if (this.newMotion) { if (this.newMotion) {
this.repo.saveMotion(newMotionValues).subscribe(response => { this.repo.create(newMotionValues).subscribe(response => {
this.router.navigate(['./motions/' + response.id]); this.router.navigate(['./motions/' + response.id]);
}); });
} else { } else {
this.repo.saveMotion(newMotionValues, this.motionCopy).subscribe(); this.repo.save(newMotionValues, this.motionCopy).subscribe();
} }
} }
@ -201,11 +208,18 @@ export class MotionDetailComponent extends BaseComponent implements OnInit {
* TODO: Repo should handle * TODO: Repo should handle
*/ */
public deleteMotionButton(): void { public deleteMotionButton(): void {
this.repo.deleteMotion(this.motion).subscribe(answer => { this.repo.delete(this.motion).subscribe(answer => {
this.router.navigate(['./motions/']); this.router.navigate(['./motions/']);
}); });
} }
/**
* returns all Possible supporters
*/
public getAllUsers(): User[] {
return this.DS.getAll(User);
}
/** /**
* Init. Does nothing here. * Init. Does nothing here.
*/ */

View File

@ -56,7 +56,20 @@ export class MotionRepositoryService extends BaseRepository<ViewMotion, Motion>
} }
/** /**
* Creates and updates a motion * Creates a motion
* Creates a (real) motion with patched data and delegate it
* to the {@link DataSendService}
*
* @param update the form data containing the update values
* @param viewMotion The View Motion. If not present, a new motion will be created
* TODO: Remove the viewMotion and make it actually distignuishable from save()
*/
public create(update: any, viewMotion?: ViewMotion): Observable<any> {
return this.save(update, viewMotion);
}
/**
* updates a motion
* *
* Creates a (real) motion with patched data and delegate it * Creates a (real) motion with patched data and delegate it
* to the {@link DataSendService} * to the {@link DataSendService}
@ -64,9 +77,8 @@ export class MotionRepositoryService extends BaseRepository<ViewMotion, Motion>
* @param update the form data containing the update values * @param update the form data containing the update values
* @param viewMotion The View Motion. If not present, a new motion will be created * @param viewMotion The View Motion. If not present, a new motion will be created
*/ */
public saveMotion(update: any, viewMotion?: ViewMotion): Observable<any> { public save(update: any, viewMotion?: ViewMotion): Observable<any> {
let updateMotion: Motion; let updateMotion: Motion;
if (viewMotion) { if (viewMotion) {
// implies that an existing motion was updated // implies that an existing motion was updated
updateMotion = viewMotion.motion; updateMotion = viewMotion.motion;
@ -74,6 +86,28 @@ export class MotionRepositoryService extends BaseRepository<ViewMotion, Motion>
// implies that a new motion was created // implies that a new motion was created
updateMotion = new Motion(); updateMotion = new Motion();
} }
// submitters: User[] -> submitter: MotionSubmitter[]
const submitters = update.submitters as User[];
// The server doesn't really accept MotionSubmitter arrays on create.
// We simply need to send an number[] on create.
// MotionSubmitter[] should be send on update
update.submitters = undefined;
const submitterIds: number[] = [];
if (submitters.length > 0) {
submitters.forEach(submitter => {
submitterIds.push(submitter.id);
});
}
update.submitters_id = submitterIds;
// supporters[]: User -> supporters_id: number[];
const supporters = update.supporters_id as User[];
const supporterIds: number[] = [];
if (supporters.length > 0) {
supporters.forEach(supporter => {
supporterIds.push(supporter.id);
});
}
update.supporters_id = supporterIds;
updateMotion.patchValues(update); updateMotion.patchValues(update);
return this.dataSend.saveModel(updateMotion); return this.dataSend.saveModel(updateMotion);
} }
@ -85,7 +119,7 @@ export class MotionRepositoryService extends BaseRepository<ViewMotion, Motion>
* to {@link DataSendService} * to {@link DataSendService}
* @param viewMotion * @param viewMotion
*/ */
public deleteMotion(viewMotion: ViewMotion): Observable<any> { public delete(viewMotion: ViewMotion): Observable<any> {
return this.dataSend.delete(viewMotion.motion); return this.dataSend.delete(viewMotion.motion);
} }
} }

View File

@ -42,7 +42,6 @@ export class StartComponent extends BaseComponent implements OnInit {
// tslint:disable-next-line // tslint:disable-next-line
const welcomeTitleTranslateDummy = this.translate.instant('Welcome to OpenSlides'); const welcomeTitleTranslateDummy = this.translate.instant('Welcome to OpenSlides');
super.setTitle('Home'); super.setTitle('Home');
// set welcome title and text // set welcome title and text
const welcomeTitleConfig = this.DS.filter<Config>( const welcomeTitleConfig = this.DS.filter<Config>(
Config, Config,

View File

@ -4,11 +4,8 @@
"Category": "", "Category": "",
"Change Password": "Passwort ändern", "Change Password": "Passwort ändern",
"Content": "", "Content": "",
"Cookies": "",
"Copyright by": "Copyright by", "Copyright by": "Copyright by",
"Database": "",
"DeleteMotion": "", "DeleteMotion": "",
"Deleting Files": "",
"Edit Profile": "Profil bearbeiten", "Edit Profile": "Profil bearbeiten",
"English": "Englisch", "English": "Englisch",
"Export As": { "Export As": {
@ -24,8 +21,9 @@
"German": "Deutsch", "German": "Deutsch",
"Home": "Startseite", "Home": "Startseite",
"Identifier": "", "Identifier": "",
"Installed plugins": "",
"Legal Notice": "Impressum", "Legal Notice": "Impressum",
"Logfiles": "", "License": "",
"Login": "", "Login": "",
"Login as Guest": "", "Login as Guest": "",
"Logout": "Abmelden", "Logout": "Abmelden",
@ -38,6 +36,7 @@
}, },
"Origin": "", "Origin": "",
"Participants": "Teilnehmer", "Participants": "Teilnehmer",
"Personal Note": "",
"Personal note": "", "Personal note": "",
"Privacy Policy": "Datenschutz", "Privacy Policy": "Datenschutz",
"Project": "", "Project": "",
@ -46,11 +45,15 @@
"Reset State": "", "Reset State": "",
"Reset recommendation": "", "Reset recommendation": "",
"SORT": "", "SORT": "",
"Selected Values": "",
"Settings": "Einstellungen", "Settings": "Einstellungen",
"State": "", "State": "",
"Submitters": "", "Submitters": "",
"Supporters": "", "Supporters": "",
"The assembly may decide:": "", "The assembly may decide:": "",
"The event manager hasn't set up a privacy policy yet": {
"0": ""
},
"Welcome to OpenSlides": "Willkommen bei OpenSlides", "Welcome to OpenSlides": "Willkommen bei OpenSlides",
"by": "" "by": ""
} }

View File

@ -4,11 +4,8 @@
"Category": "", "Category": "",
"Change Password": "", "Change Password": "",
"Content": "", "Content": "",
"Cookies": "",
"Copyright by": "", "Copyright by": "",
"Database": "",
"DeleteMotion": "", "DeleteMotion": "",
"Deleting Files": "",
"Edit Profile": "", "Edit Profile": "",
"English": "", "English": "",
"Export As": { "Export As": {
@ -24,8 +21,9 @@
"German": "", "German": "",
"Home": "", "Home": "",
"Identifier": "", "Identifier": "",
"Installed plugins": "",
"Legal Notice": "", "Legal Notice": "",
"Logfiles": "", "License": "",
"Login": "", "Login": "",
"Login as Guest": "", "Login as Guest": "",
"Logout": "", "Logout": "",
@ -38,6 +36,7 @@
}, },
"Origin": "", "Origin": "",
"Participants": "", "Participants": "",
"Personal Note": "",
"Personal note": "", "Personal note": "",
"Privacy Policy": "", "Privacy Policy": "",
"Project": "", "Project": "",
@ -46,11 +45,15 @@
"Reset State": "", "Reset State": "",
"Reset recommendation": "", "Reset recommendation": "",
"SORT": "", "SORT": "",
"Selected Values": "",
"Settings": "", "Settings": "",
"State": "", "State": "",
"Submitters": "", "Submitters": "",
"Supporters": "", "Supporters": "",
"The assembly may decide:": "", "The assembly may decide:": "",
"The event manager hasn't set up a privacy policy yet": {
"0": ""
},
"Welcome to OpenSlides": "", "Welcome to OpenSlides": "",
"by": "" "by": ""
} }

View File

@ -4,11 +4,8 @@
"Category": "", "Category": "",
"Change Password": "", "Change Password": "",
"Content": "", "Content": "",
"Cookies": "",
"Copyright by": "", "Copyright by": "",
"Database": "",
"DeleteMotion": "", "DeleteMotion": "",
"Deleting Files": "",
"Edit Profile": "", "Edit Profile": "",
"English": "", "English": "",
"Export As": { "Export As": {
@ -24,8 +21,9 @@
"German": "", "German": "",
"Home": "", "Home": "",
"Identifier": "", "Identifier": "",
"Installed plugins": "",
"Legal Notice": "", "Legal Notice": "",
"Logfiles": "", "License": "",
"Login": "", "Login": "",
"Login as Guest": "", "Login as Guest": "",
"Logout": "", "Logout": "",
@ -38,6 +36,7 @@
}, },
"Origin": "", "Origin": "",
"Participants": "", "Participants": "",
"Personal Note": "",
"Personal note": "", "Personal note": "",
"Privacy Policy": "", "Privacy Policy": "",
"Project": "", "Project": "",
@ -46,11 +45,15 @@
"Reset State": "", "Reset State": "",
"Reset recommendation": "", "Reset recommendation": "",
"SORT": "", "SORT": "",
"Selected Values": "",
"Settings": "", "Settings": "",
"State": "", "State": "",
"Submitters": "", "Submitters": "",
"Supporters": "", "Supporters": "",
"The assembly may decide:": "", "The assembly may decide:": "",
"The event manager hasn't set up a privacy policy yet": {
"0": ""
},
"Welcome to OpenSlides": "", "Welcome to OpenSlides": "",
"by": "" "by": ""
} }