Merged develop into master
This commit is contained in:
commit
9e75f1ce67
|
|
@ -2460,7 +2460,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": {
|
||||||
|
|
@ -2492,7 +2492,7 @@
|
||||||
},
|
},
|
||||||
"onetime": {
|
"onetime": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz",
|
"resolved": "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz",
|
||||||
"integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=",
|
"integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
|
@ -2757,12 +2757,6 @@
|
||||||
"@types/yargs": "^12.0.9"
|
"@types/yargs": "^12.0.9"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/async": {
|
|
||||||
"version": "2.0.49",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/async/-/async-2.0.49.tgz",
|
|
||||||
"integrity": "sha512-Benr3i5odUkvpFkOpzGqrltGdbSs+EVCkEBGXbuR7uT0VzhXKIkhem6PDzHdx5EonA+rfbB3QvP6aDOw5+zp5Q==",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"@types/babel__core": {
|
"@types/babel__core": {
|
||||||
"version": "7.1.2",
|
"version": "7.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.2.tgz",
|
||||||
|
|
@ -2921,11 +2915,6 @@
|
||||||
"@types/node": "*"
|
"@types/node": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/graphql": {
|
|
||||||
"version": "0.12.6",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/graphql/-/graphql-0.12.6.tgz",
|
|
||||||
"integrity": "sha512-wXAVyLfkG1UMkKOdMijVWFky39+OD/41KftzqfX1Oejd0Gm6dOIKjCihSVECg6X7PHjftxXmfOKA/d1H79ZfvQ=="
|
|
||||||
},
|
|
||||||
"@types/istanbul-lib-coverage": {
|
"@types/istanbul-lib-coverage": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz",
|
||||||
|
|
@ -2960,8 +2949,7 @@
|
||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "12.7.1",
|
"version": "12.7.1",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.7.1.tgz",
|
||||||
"integrity": "sha512-aK9jxMypeSrhiYofWWBf/T7O+KwaiAHzM4sveCdWPn71lzUSMimRnKzhXDKfKwV1kWoBo2P1aGgaIYGLf9/ljw==",
|
"integrity": "sha512-aK9jxMypeSrhiYofWWBf/T7O+KwaiAHzM4sveCdWPn71lzUSMimRnKzhXDKfKwV1kWoBo2P1aGgaIYGLf9/ljw=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"@types/stack-utils": {
|
"@types/stack-utils": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
|
|
@ -3011,6 +2999,23 @@
|
||||||
"lodash": "^4.17.4"
|
"lodash": "^4.17.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@wry/context": {
|
||||||
|
"version": "0.4.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@wry/context/-/context-0.4.4.tgz",
|
||||||
|
"integrity": "sha512-LrKVLove/zw6h2Md/KZyWxIkFM6AoyKp71OqpH9Hiip1csjPVoD3tPxlbQUNxEnHENks3UGgNpSBCAfq9KWuag==",
|
||||||
|
"requires": {
|
||||||
|
"@types/node": ">=6",
|
||||||
|
"tslib": "^1.9.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@wry/equality": {
|
||||||
|
"version": "0.1.9",
|
||||||
|
"resolved": "https://registry.npmjs.org/@wry/equality/-/equality-0.1.9.tgz",
|
||||||
|
"integrity": "sha512-mB6ceGjpMGz1ZTza8HYnrPGos2mC6So4NhS1PtZ8s4Qt0K7fBiIGhpSxUbQmhwcSWE3no+bYxmI2OL6KuXYmoQ==",
|
||||||
|
"requires": {
|
||||||
|
"tslib": "^1.9.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
"abab": {
|
"abab": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/abab/-/abab-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/abab/-/abab-2.0.0.tgz",
|
||||||
|
|
@ -3175,79 +3180,109 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"apollo-cache": {
|
"apollo-cache": {
|
||||||
"version": "1.1.14",
|
"version": "1.3.4",
|
||||||
"resolved": "https://registry.npmjs.org/apollo-cache/-/apollo-cache-1.1.14.tgz",
|
"resolved": "https://registry.npmjs.org/apollo-cache/-/apollo-cache-1.3.4.tgz",
|
||||||
"integrity": "sha512-Zmo9nVqpWFogki2QyulX6Xx6KYXMyYWX74grwgsYYUOukl4pIAdtYyK8e874o0QDgzSOq5AYPXjtfkoVpqhCRw==",
|
"integrity": "sha512-7X5aGbqaOWYG+SSkCzJNHTz2ZKDcyRwtmvW4mGVLRqdQs+HxfXS4dUS2CcwrAj449se6tZ6NLUMnjko4KMt3KA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"apollo-utilities": "^1.0.18"
|
"apollo-utilities": "^1.3.3",
|
||||||
|
"tslib": "^1.10.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"tslib": {
|
||||||
|
"version": "1.10.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz",
|
||||||
|
"integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ=="
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"apollo-cache-inmemory": {
|
"apollo-cache-inmemory": {
|
||||||
"version": "1.2.7",
|
"version": "1.6.5",
|
||||||
"resolved": "https://registry.npmjs.org/apollo-cache-inmemory/-/apollo-cache-inmemory-1.2.7.tgz",
|
"resolved": "https://registry.npmjs.org/apollo-cache-inmemory/-/apollo-cache-inmemory-1.6.5.tgz",
|
||||||
"integrity": "sha512-ikL3hWsd1DejiZSAuiGnX6TG3cKAZmkMTZZfNZggp9vcTa47kfPqms/pX0F4iajCJP/p7/AllhbpsQ3zVMOZGg==",
|
"integrity": "sha512-koB76JUDJaycfejHmrXBbWIN9pRKM0Z9CJGQcBzIOtmte1JhEBSuzsOUu7NQgiXKYI4iGoMREcnaWffsosZynA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"apollo-cache": "^1.1.14",
|
"apollo-cache": "^1.3.4",
|
||||||
"apollo-utilities": "^1.0.18",
|
"apollo-utilities": "^1.3.3",
|
||||||
"graphql-anywhere": "^4.1.16"
|
"optimism": "^0.10.0",
|
||||||
|
"ts-invariant": "^0.4.0",
|
||||||
|
"tslib": "^1.10.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"tslib": {
|
||||||
|
"version": "1.10.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz",
|
||||||
|
"integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ=="
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"apollo-client": {
|
"apollo-client": {
|
||||||
"version": "2.3.8",
|
"version": "2.6.8",
|
||||||
"resolved": "https://registry.npmjs.org/apollo-client/-/apollo-client-2.3.8.tgz",
|
"resolved": "https://registry.npmjs.org/apollo-client/-/apollo-client-2.6.8.tgz",
|
||||||
"integrity": "sha512-X5wsBD1be1P/mScGsH5H+2hIE8d78WAfqOvFvBpP+C+jzJ9387uHLyFmYYMLRRqDQ3ihjI4iSID7KEOW2gyCcQ==",
|
"integrity": "sha512-0zvJtAcONiozpa5z5zgou83iEKkBaXhhSSXJebFHRXs100SecDojyUWKjwTtBPn9HbM6o5xrvC5mo9VQ5fgAjw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/async": "2.0.49",
|
|
||||||
"@types/zen-observable": "^0.8.0",
|
"@types/zen-observable": "^0.8.0",
|
||||||
"apollo-cache": "^1.1.14",
|
"apollo-cache": "1.3.4",
|
||||||
"apollo-link": "^1.0.0",
|
"apollo-link": "^1.0.0",
|
||||||
"apollo-link-dedup": "^1.0.0",
|
"apollo-utilities": "1.3.3",
|
||||||
"apollo-utilities": "^1.0.18",
|
|
||||||
"symbol-observable": "^1.0.2",
|
"symbol-observable": "^1.0.2",
|
||||||
|
"ts-invariant": "^0.4.0",
|
||||||
|
"tslib": "^1.10.0",
|
||||||
"zen-observable": "^0.8.0"
|
"zen-observable": "^0.8.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"tslib": {
|
||||||
|
"version": "1.10.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz",
|
||||||
|
"integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ=="
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"apollo-link": {
|
"apollo-link": {
|
||||||
"version": "1.2.2",
|
"version": "1.2.13",
|
||||||
"resolved": "https://registry.npmjs.org/apollo-link/-/apollo-link-1.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/apollo-link/-/apollo-link-1.2.13.tgz",
|
||||||
"integrity": "sha512-Uk/BC09dm61DZRDSu52nGq0nFhq7mcBPTjy5EEH1eunJndtCaNXQhQz/BjkI2NdrfGI+B+i5he6YSoRBhYizdw==",
|
"integrity": "sha512-+iBMcYeevMm1JpYgwDEIDt/y0BB7VWyvlm/7x+TIPNLHCTCMgcEgDuW5kH86iQZWo0I7mNwQiTOz+/3ShPFmBw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/graphql": "0.12.6",
|
"apollo-utilities": "^1.3.0",
|
||||||
"apollo-utilities": "^1.0.0",
|
"ts-invariant": "^0.4.0",
|
||||||
"zen-observable-ts": "^0.8.9"
|
"tslib": "^1.9.3",
|
||||||
}
|
"zen-observable-ts": "^0.8.20"
|
||||||
},
|
|
||||||
"apollo-link-dedup": {
|
|
||||||
"version": "1.0.9",
|
|
||||||
"resolved": "https://registry.npmjs.org/apollo-link-dedup/-/apollo-link-dedup-1.0.9.tgz",
|
|
||||||
"integrity": "sha512-RbuEKpmSHVMtoREMPh2wUFTeh65q+0XPVeqgaOP/rGEAfvLyOMvX0vT2nVaejMohoMxuUnfZwpldXaDFWnlVbg==",
|
|
||||||
"requires": {
|
|
||||||
"apollo-link": "^1.2.2"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"apollo-link-http": {
|
"apollo-link-http": {
|
||||||
"version": "1.5.4",
|
"version": "1.5.16",
|
||||||
"resolved": "https://registry.npmjs.org/apollo-link-http/-/apollo-link-http-1.5.4.tgz",
|
"resolved": "https://registry.npmjs.org/apollo-link-http/-/apollo-link-http-1.5.16.tgz",
|
||||||
"integrity": "sha512-e9Ng3HfnW00Mh3TI6DhNRfozmzQOtKgdi+qUAsHBOEcTP0PTAmb+9XpeyEEOueLyO0GXhB92HUCIhzrWMXgwyg==",
|
"integrity": "sha512-IA3xA/OcrOzINRZEECI6IdhRp/Twom5X5L9jMehfzEo2AXdeRwAMlH5LuvTZHgKD8V1MBnXdM6YXawXkTDSmJw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"apollo-link": "^1.2.2",
|
"apollo-link": "^1.2.13",
|
||||||
"apollo-link-http-common": "^0.2.4"
|
"apollo-link-http-common": "^0.2.15",
|
||||||
|
"tslib": "^1.9.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"apollo-link-http-common": {
|
"apollo-link-http-common": {
|
||||||
"version": "0.2.4",
|
"version": "0.2.15",
|
||||||
"resolved": "https://registry.npmjs.org/apollo-link-http-common/-/apollo-link-http-common-0.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/apollo-link-http-common/-/apollo-link-http-common-0.2.15.tgz",
|
||||||
"integrity": "sha512-4j6o6WoXuSPen9xh4NBaX8/vL98X1xY2cYzUEK1F8SzvHe2oFONfxJBTekwU8hnvapcuq8Qh9Uct+gelu8T10g==",
|
"integrity": "sha512-+Heey4S2IPsPyTf8Ag3PugUupASJMW894iVps6hXbvwtg1aHSNMXUYO5VG7iRHkPzqpuzT4HMBanCTXPjtGzxg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"apollo-link": "^1.2.2"
|
"apollo-link": "^1.2.13",
|
||||||
|
"ts-invariant": "^0.4.0",
|
||||||
|
"tslib": "^1.9.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"apollo-utilities": {
|
"apollo-utilities": {
|
||||||
"version": "1.0.18",
|
"version": "1.3.3",
|
||||||
"resolved": "https://registry.npmjs.org/apollo-utilities/-/apollo-utilities-1.0.18.tgz",
|
"resolved": "https://registry.npmjs.org/apollo-utilities/-/apollo-utilities-1.3.3.tgz",
|
||||||
"integrity": "sha512-hHrmsoMYzzzfUlTOPpxr0qRpTLotMkBIQ93Ub7ki2SWdLfYYKrp6/KB8YOUkbCwXxSFvYSV24ccuwUEqZIaHIA==",
|
"integrity": "sha512-F14aX2R/fKNYMvhuP2t9GD9fggID7zp5I96MF5QeKYWDWTrkRdHRp4+SVfXUVN+cXOaB/IebfvRtzPf25CM0zw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"fast-json-stable-stringify": "^2.0.0"
|
"@wry/equality": "^0.1.2",
|
||||||
|
"fast-json-stable-stringify": "^2.0.0",
|
||||||
|
"ts-invariant": "^0.4.0",
|
||||||
|
"tslib": "^1.10.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"tslib": {
|
||||||
|
"version": "1.10.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz",
|
||||||
|
"integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ=="
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"appolo": {
|
"appolo": {
|
||||||
|
|
@ -7103,7 +7138,7 @@
|
||||||
},
|
},
|
||||||
"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
|
||||||
},
|
},
|
||||||
|
|
@ -8985,7 +9020,8 @@
|
||||||
},
|
},
|
||||||
"ansi-regex": {
|
"ansi-regex": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"bundled": true
|
"bundled": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"aproba": {
|
"aproba": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
|
|
@ -9003,11 +9039,13 @@
|
||||||
},
|
},
|
||||||
"balanced-match": {
|
"balanced-match": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true
|
"bundled": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"brace-expansion": {
|
"brace-expansion": {
|
||||||
"version": "1.1.11",
|
"version": "1.1.11",
|
||||||
"bundled": true,
|
"bundled": 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"
|
||||||
|
|
@ -9020,15 +9058,18 @@
|
||||||
},
|
},
|
||||||
"code-point-at": {
|
"code-point-at": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"bundled": true
|
"bundled": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"concat-map": {
|
"concat-map": {
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"bundled": true
|
"bundled": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"console-control-strings": {
|
"console-control-strings": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"bundled": true
|
"bundled": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"core-util-is": {
|
"core-util-is": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
|
|
@ -9131,7 +9172,8 @@
|
||||||
},
|
},
|
||||||
"inherits": {
|
"inherits": {
|
||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
"bundled": true
|
"bundled": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"ini": {
|
"ini": {
|
||||||
"version": "1.3.5",
|
"version": "1.3.5",
|
||||||
|
|
@ -9141,6 +9183,7 @@
|
||||||
"is-fullwidth-code-point": {
|
"is-fullwidth-code-point": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"number-is-nan": "^1.0.0"
|
"number-is-nan": "^1.0.0"
|
||||||
}
|
}
|
||||||
|
|
@ -9153,17 +9196,20 @@
|
||||||
"minimatch": {
|
"minimatch": {
|
||||||
"version": "3.0.4",
|
"version": "3.0.4",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"brace-expansion": "^1.1.7"
|
"brace-expansion": "^1.1.7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "0.0.8",
|
"version": "0.0.8",
|
||||||
"bundled": true
|
"bundled": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"minipass": {
|
"minipass": {
|
||||||
"version": "2.2.4",
|
"version": "2.2.4",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"safe-buffer": "^5.1.1",
|
"safe-buffer": "^5.1.1",
|
||||||
"yallist": "^3.0.0"
|
"yallist": "^3.0.0"
|
||||||
|
|
@ -9180,6 +9226,7 @@
|
||||||
"mkdirp": {
|
"mkdirp": {
|
||||||
"version": "0.5.1",
|
"version": "0.5.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"minimist": "0.0.8"
|
"minimist": "0.0.8"
|
||||||
}
|
}
|
||||||
|
|
@ -9252,7 +9299,8 @@
|
||||||
},
|
},
|
||||||
"number-is-nan": {
|
"number-is-nan": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"bundled": true
|
"bundled": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"object-assign": {
|
"object-assign": {
|
||||||
"version": "4.1.1",
|
"version": "4.1.1",
|
||||||
|
|
@ -9262,6 +9310,7 @@
|
||||||
"once": {
|
"once": {
|
||||||
"version": "1.4.0",
|
"version": "1.4.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"wrappy": "1"
|
"wrappy": "1"
|
||||||
}
|
}
|
||||||
|
|
@ -9367,6 +9416,7 @@
|
||||||
"string-width": {
|
"string-width": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"bundled": true,
|
"bundled": 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",
|
||||||
|
|
@ -9384,6 +9434,7 @@
|
||||||
"strip-ansi": {
|
"strip-ansi": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"ansi-regex": "^2.0.0"
|
"ansi-regex": "^2.0.0"
|
||||||
}
|
}
|
||||||
|
|
@ -9422,7 +9473,8 @@
|
||||||
},
|
},
|
||||||
"wrappy": {
|
"wrappy": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"bundled": true
|
"bundled": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"yallist": {
|
"yallist": {
|
||||||
"version": "3.0.2",
|
"version": "3.0.2",
|
||||||
|
|
@ -9666,18 +9718,10 @@
|
||||||
"iterall": "^1.2.1"
|
"iterall": "^1.2.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"graphql-anywhere": {
|
|
||||||
"version": "4.1.16",
|
|
||||||
"resolved": "https://registry.npmjs.org/graphql-anywhere/-/graphql-anywhere-4.1.16.tgz",
|
|
||||||
"integrity": "sha512-DNQGxrh2p8w4vQwHIW1Sw65ZDbOr6ktQCeol6itH3LeWy1a3IoZ67jxrhgrHM+Upg8oiazvteSr64VRxJ8n5+g==",
|
|
||||||
"requires": {
|
|
||||||
"apollo-utilities": "^1.0.18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"graphql-tag": {
|
"graphql-tag": {
|
||||||
"version": "2.9.2",
|
"version": "2.10.1",
|
||||||
"resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.9.2.tgz",
|
"resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.10.1.tgz",
|
||||||
"integrity": "sha512-qnNmof9pAqj/LUzs3lStP0Gw1qhdVCUS7Ab7+SUB6KD5aX1uqxWQRwMnOGTkhKuLvLNIs1TvNz+iS9kUGl1MhA=="
|
"integrity": "sha512-jApXqWBzNXQ8jYa/HLkZJaVw9jgwNqZkywa2zfFn16Iv1Zb7ELNHkJaXHR7Quvd5SIGsy6Ny7SUKATgnu05uEg=="
|
||||||
},
|
},
|
||||||
"growl": {
|
"growl": {
|
||||||
"version": "1.9.2",
|
"version": "1.9.2",
|
||||||
|
|
@ -11430,12 +11474,14 @@
|
||||||
"balanced-match": {
|
"balanced-match": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"brace-expansion": {
|
"brace-expansion": {
|
||||||
"version": "1.1.11",
|
"version": "1.1.11",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"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"
|
||||||
|
|
@ -11455,7 +11501,8 @@
|
||||||
"concat-map": {
|
"concat-map": {
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"console-control-strings": {
|
"console-control-strings": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
|
|
@ -13065,7 +13112,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": {
|
||||||
|
|
@ -13112,13 +13159,13 @@
|
||||||
},
|
},
|
||||||
"onetime": {
|
"onetime": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz",
|
"resolved": "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz",
|
||||||
"integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=",
|
"integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"ora": {
|
"ora": {
|
||||||
"version": "0.2.3",
|
"version": "0.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/ora/-/ora-0.2.3.tgz",
|
"resolved": "http://registry.npmjs.org/ora/-/ora-0.2.3.tgz",
|
||||||
"integrity": "sha1-N1J9Igrc1Tw5tzVx11QVbV22V6Q=",
|
"integrity": "sha1-N1J9Igrc1Tw5tzVx11QVbV22V6Q=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
|
@ -13176,7 +13223,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": {
|
||||||
|
|
@ -13240,7 +13287,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": {
|
||||||
|
|
@ -13272,7 +13319,7 @@
|
||||||
},
|
},
|
||||||
"onetime": {
|
"onetime": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz",
|
"resolved": "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz",
|
||||||
"integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=",
|
"integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
|
@ -13542,7 +13589,7 @@
|
||||||
},
|
},
|
||||||
"onetime": {
|
"onetime": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz",
|
"resolved": "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz",
|
||||||
"integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=",
|
"integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
|
@ -14685,6 +14732,14 @@
|
||||||
"is-wsl": "^1.1.0"
|
"is-wsl": "^1.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"optimism": {
|
||||||
|
"version": "0.10.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/optimism/-/optimism-0.10.3.tgz",
|
||||||
|
"integrity": "sha512-9A5pqGoQk49H6Vhjb9kPgAeeECfUDF6aIICbMDL23kDLStBn1MWk3YvcZ4xWF9CsSf6XEgvRLkXy4xof/56vVw==",
|
||||||
|
"requires": {
|
||||||
|
"@wry/context": "^0.4.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"optimist": {
|
"optimist": {
|
||||||
"version": "0.6.1",
|
"version": "0.6.1",
|
||||||
"resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz",
|
"resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz",
|
||||||
|
|
@ -19027,6 +19082,14 @@
|
||||||
"resolved": "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz",
|
||||||
"integrity": "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA=="
|
"integrity": "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA=="
|
||||||
},
|
},
|
||||||
|
"ts-invariant": {
|
||||||
|
"version": "0.4.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/ts-invariant/-/ts-invariant-0.4.4.tgz",
|
||||||
|
"integrity": "sha512-uEtWkFM/sdZvRNNDL3Ehu4WVpwaulhwQszV8mrtcdeE8nN00BV9mAmQ88RkrBhFgl9gMgvjJLAQcZbnPXI9mlA==",
|
||||||
|
"requires": {
|
||||||
|
"tslib": "^1.9.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
"tsconfig": {
|
"tsconfig": {
|
||||||
"version": "7.0.0",
|
"version": "7.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-7.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-7.0.0.tgz",
|
||||||
|
|
@ -20570,15 +20633,16 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"zen-observable": {
|
"zen-observable": {
|
||||||
"version": "0.8.9",
|
"version": "0.8.15",
|
||||||
"resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.8.9.tgz",
|
"resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.8.15.tgz",
|
||||||
"integrity": "sha512-Y9kPzjGvIZ5jchSlqlCpBW3I82zBBL4z+ulXDRVA1NwsKzjt5kwAi+gOYIy0htNkfuehGZZtP5mRXHRV6TjDWw=="
|
"integrity": "sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ=="
|
||||||
},
|
},
|
||||||
"zen-observable-ts": {
|
"zen-observable-ts": {
|
||||||
"version": "0.8.9",
|
"version": "0.8.20",
|
||||||
"resolved": "https://registry.npmjs.org/zen-observable-ts/-/zen-observable-ts-0.8.9.tgz",
|
"resolved": "https://registry.npmjs.org/zen-observable-ts/-/zen-observable-ts-0.8.20.tgz",
|
||||||
"integrity": "sha512-KJz2O8FxbAdAU5CSc8qZ1K2WYEJb1HxS6XDRF+hOJ1rOYcg6eTMmS9xYHCXzqZZzKw6BbXWyF4UpwSsBQnHJeA==",
|
"integrity": "sha512-2rkjiPALhOtRaDX6pWyNqK1fnP5KkJJybYebopNSn6wDG1lxBoFs2+nwwXKoA6glHIrtwrfBBy6da0stkKtTAA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
|
"tslib": "^1.9.3",
|
||||||
"zen-observable": "^0.8.0"
|
"zen-observable": "^0.8.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,10 +21,10 @@
|
||||||
"@babel/preset-env": "^7.5.4",
|
"@babel/preset-env": "^7.5.4",
|
||||||
"@babel/preset-stage-2": "^7.0.0",
|
"@babel/preset-stage-2": "^7.0.0",
|
||||||
"@babel/runtime": "^7.5.4",
|
"@babel/runtime": "^7.5.4",
|
||||||
"apollo-cache-inmemory": "^1.2.2",
|
"apollo-cache-inmemory": "^1.6.5",
|
||||||
"apollo-client": "^2.3.2",
|
"apollo-client": "^2.6.8",
|
||||||
"apollo-link": "^1.2.2",
|
"apollo-link": "^1.2.13",
|
||||||
"apollo-link-http": "^1.5.4",
|
"apollo-link-http": "^1.5.16",
|
||||||
"appolo": "^6.0.19",
|
"appolo": "^6.0.19",
|
||||||
"autoprefixer": "^7.1.2",
|
"autoprefixer": "^7.1.2",
|
||||||
"axios": "^0.18.0",
|
"axios": "^0.18.0",
|
||||||
|
|
@ -50,7 +50,7 @@
|
||||||
"file-loader": "^1.1.4",
|
"file-loader": "^1.1.4",
|
||||||
"friendly-errors-webpack-plugin": "^1.6.1",
|
"friendly-errors-webpack-plugin": "^1.6.1",
|
||||||
"graphql": "^0.13.2",
|
"graphql": "^0.13.2",
|
||||||
"graphql-tag": "^2.9.2",
|
"graphql-tag": "^2.10.1",
|
||||||
"html-webpack-plugin": "^2.30.1",
|
"html-webpack-plugin": "^2.30.1",
|
||||||
"lodash": "^4.17.10",
|
"lodash": "^4.17.10",
|
||||||
"moment": "^2.24.0",
|
"moment": "^2.24.0",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="chapter">
|
<div class="chapter" :data-scrollto="chapter.id">
|
||||||
<h3 :id="'chapter-' + index">{{chapter.title}}</h3>
|
<h3 :id="'chapter-' + index">{{chapter.title}}</h3>
|
||||||
|
|
||||||
<bookmark-actions
|
<bookmark-actions
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="content-component" :class="{'content-component--bookmarked': bookmarked}">
|
<div class="content-component"
|
||||||
|
:class="{'content-component--bookmarked': bookmarked}"
|
||||||
|
:data-scrollto="component.id">
|
||||||
<bookmark-actions
|
<bookmark-actions
|
||||||
v-if="showBookmarkActions"
|
v-if="showBookmarkActions"
|
||||||
@add-note="addNote(component.id)"
|
@add-note="addNote(component.id)"
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="link-block">
|
<div class="link-block" :class="{ 'link-block--no-margin': noMargin}">
|
||||||
<link-icon class="link-block__icon"></link-icon>
|
<link-icon class="link-block__icon"></link-icon>
|
||||||
<a :href="href" class="link-block__link" target="_blank">{{value.text}}</a>
|
<a :href="href" class="link-block__link" target="_blank">{{value.text}}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -9,7 +9,12 @@
|
||||||
import LinkIcon from '@/components/icons/LinkIcon';
|
import LinkIcon from '@/components/icons/LinkIcon';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: ['value'],
|
props: {
|
||||||
|
value: Object,
|
||||||
|
'no-margin': {
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
LinkIcon
|
LinkIcon
|
||||||
|
|
@ -31,6 +36,10 @@
|
||||||
grid-template-columns: 50px 1fr;
|
grid-template-columns: 50px 1fr;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
|
&--no-margin {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
&__icon {
|
&__icon {
|
||||||
width: 30px;
|
width: 30px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="survey-block">
|
<div class="survey-block" :data-scrollto="value.id">
|
||||||
<router-link class="button button--primary"
|
<router-link class="button button--primary"
|
||||||
:to="{name: 'survey', params: {id:value.id}}">Übung anzeigen
|
:to="{name: 'survey', params: {id:value.id}}">Übung anzeigen
|
||||||
</router-link>
|
</router-link>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="assignment">
|
<div class="assignment" :data-scrollto="value.id">
|
||||||
<p class="assignment__assignment-text">
|
<p class="assignment__assignment-text">
|
||||||
{{assignment.assignment}}
|
{{assignment.assignment}}
|
||||||
</p>
|
</p>
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
<a class="bookmark-actions__action bookmark-actions__add-note" v-if="bookmarked && !note" @click="$emit('add-note')">
|
<a class="bookmark-actions__action bookmark-actions__add-note" v-if="bookmarked && !note" @click="$emit('add-note')">
|
||||||
<add-note-icon></add-note-icon>
|
<add-note-icon></add-note-icon>
|
||||||
</a>
|
</a>
|
||||||
<a class="bookmark-actions__action bookmark-actions__edit-note bookmark-actions__action--noted" @click="$emit('edit-note')" v-if="note">
|
<a :data-scrollto="note.id" class="bookmark-actions__action bookmark-actions__edit-note bookmark-actions__action--noted" @click="$emit('edit-note')" v-if="note">
|
||||||
<note-icon></note-icon>
|
<note-icon></note-icon>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,64 @@
|
||||||
|
<template>
|
||||||
|
<div class="activity-entry">
|
||||||
|
<div class="activity-entry__content">
|
||||||
|
<h3 class="activity-entry__title">{{title}}</h3>
|
||||||
|
<slot></slot>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="activity-entry__link" @click="$emit('link')">
|
||||||
|
<chevron-right class="activity-entry__icon"></chevron-right>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import ChevronRight from '@/components/icons/ChevronRight';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: ['title'],
|
||||||
|
|
||||||
|
components: {
|
||||||
|
ChevronRight
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
@import "@/styles/_variables.scss";
|
||||||
|
@import "@/styles/_mixins.scss";
|
||||||
|
|
||||||
|
.activity-entry {
|
||||||
|
padding: $small-spacing 0;
|
||||||
|
border-bottom: 1px solid $color-silver;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
&__title {
|
||||||
|
@include small-text;
|
||||||
|
// todo: make style definition for small text and silver color
|
||||||
|
color: $color-silver-dark;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__content {
|
||||||
|
flex-grow: 1;
|
||||||
|
@include regular-text;
|
||||||
|
line-height: $default-line-height;
|
||||||
|
}
|
||||||
|
&__link {
|
||||||
|
display: flex;
|
||||||
|
flex-grow: 0;
|
||||||
|
align-content: center;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__icon {
|
||||||
|
fill: $color-brand;
|
||||||
|
width: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ p {
|
||||||
|
@include regular-text;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
<template>
|
||||||
|
<div class="activity-filter">
|
||||||
|
<a class="activity-filter__link"
|
||||||
|
:class="{'activity-filter__link--active': filter === entry.tag}"
|
||||||
|
@click="$emit('change-filter', entry.tag)"
|
||||||
|
v-for="(entry, i) in filters"
|
||||||
|
:key="i"
|
||||||
|
>{{entry.label}}</a>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: ['filter'],
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
filters: [
|
||||||
|
{tag: '', label: 'Alle'},
|
||||||
|
{tag: 'assignments', label: 'Ergebnisse'},
|
||||||
|
{tag: 'surveys', label: 'Übungen'},
|
||||||
|
{tag: 'bookmarks', label: 'Lesezeichen'},
|
||||||
|
{tag: 'notes', label: 'Notizen'},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
@import "@/styles/_variables.scss";
|
||||||
|
@import "@/styles/_mixins.scss";
|
||||||
|
|
||||||
|
.activity-filter {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
&__link {
|
||||||
|
@include small-text;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: $large-spacing 0;
|
||||||
|
color: $color-silver-dark;
|
||||||
|
|
||||||
|
&--active {
|
||||||
|
color: $color-brand;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
<template>
|
||||||
|
<div class="content-bookmark module-activity-entry">
|
||||||
|
<div v-html="text" v-if="content.type === 'text_block'"></div>
|
||||||
|
<div v-else-if="content.type === 'link_block'">
|
||||||
|
<link-block :value="content.value" :no-margin="true"></link-block>
|
||||||
|
</div>
|
||||||
|
<p v-else>
|
||||||
|
{{type}}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import LinkBlock from '@/components/content-blocks/LinkBlock';
|
||||||
|
export default {
|
||||||
|
components: {LinkBlock},
|
||||||
|
props: ['bookmark'],
|
||||||
|
computed: {
|
||||||
|
content() {
|
||||||
|
return this.bookmark.contentBlock.contents.find(e => e.id === this.bookmark.uuid)
|
||||||
|
},
|
||||||
|
text() {
|
||||||
|
return this.content.value.text ? this.content.value.text : 'TO BE DEFINED'
|
||||||
|
},
|
||||||
|
type() {
|
||||||
|
switch (this.content.type) {
|
||||||
|
case 'assignment':
|
||||||
|
return 'Aufgabe & Ergebnis';
|
||||||
|
case 'link_block':
|
||||||
|
return this.content;
|
||||||
|
case 'survey':
|
||||||
|
return 'Übung';
|
||||||
|
case 'image_url_block':
|
||||||
|
return 'Bild';
|
||||||
|
default:
|
||||||
|
return this.content.type;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
@ -1,16 +1,42 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="module-activity">
|
<div class="module-activity" v-if="!empty">
|
||||||
<h3 class="module-activity__module-name">{{moduleTitle}}</h3>
|
<h3 class="module-activity__module-name">{{module.topic.title}}</h3>
|
||||||
<h2 class="module-activity__title">{{title}}</h2>
|
<h2 class="module-activity__title">{{module.metaTitle}} - {{module.title}}</h2>
|
||||||
<div class="module-activity__tasks activity-tasks">
|
<div class="module-activity__tasks activity-tasks">
|
||||||
<h4 class="activity-tasks__title">Meine Ergebnisse</h4>
|
<activity-entry title="Aufgabe & Ergebnis" class="module-activity__entry"
|
||||||
<ol class="activity-tasks__task-list task-list">
|
v-for="submission in module.mySubmissions"
|
||||||
<li v-for="activity in activities" :key="activity.key" class="task-list__item task-item">
|
:key="submission.id"
|
||||||
<h5 class="task-item__title">{{activity.assignmentTitle}}</h5>
|
v-if="applyFilter('assignments')"
|
||||||
<p class="task-item__submission">{{activity.answer}}</p>
|
@link="goTo(submission.assignment.id)">
|
||||||
<a href="#" @click="goToAssignment(activity)"><chevron-right class="task-item__chevron"></chevron-right></a>
|
{{submission.text}}
|
||||||
</li>
|
</activity-entry>
|
||||||
</ol>
|
<activity-entry title="Übung" class="module-activity__entry"
|
||||||
|
v-for="answer in module.myAnswers"
|
||||||
|
v-if="applyFilter('surveys')"
|
||||||
|
:key="answer.id"
|
||||||
|
@link="goTo(answer.survey.id)">
|
||||||
|
{{answer.survey.title}}
|
||||||
|
</activity-entry>
|
||||||
|
<activity-entry title="Lesezeichen" class="module-activity__entry"
|
||||||
|
v-for="bookmark in module.myContentBookmarks"
|
||||||
|
:key="bookmark.id"
|
||||||
|
v-if="applyFilter('bookmarks')"
|
||||||
|
@link="goTo(bookmark.uuid)">
|
||||||
|
<content-bookmark :bookmark="bookmark"></content-bookmark>
|
||||||
|
</activity-entry>
|
||||||
|
<activity-entry title="Lesezeichen" class="module-activity__entry"
|
||||||
|
v-for="bookmark in module.myChapterBookmarks"
|
||||||
|
v-if="applyFilter('bookmarks')"
|
||||||
|
:key="bookmark.id"
|
||||||
|
@link="goTo(bookmark.chapter.id)">
|
||||||
|
{{bookmark.chapter.description}}
|
||||||
|
</activity-entry>
|
||||||
|
<activity-entry title="Notiz" class="module-activity__entry"
|
||||||
|
v-if="applyFilter('notes')"
|
||||||
|
v-for="note in notes" :key="note.id"
|
||||||
|
@link="goTo(note.id)">
|
||||||
|
{{note.text}}
|
||||||
|
</activity-entry>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -18,22 +44,47 @@
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import {mapActions} from 'vuex'
|
import {mapActions} from 'vuex'
|
||||||
import ChevronRight from '@/components/icons/ChevronRight';
|
import ContentBookmark from '@/components/profile/ContentBookmark';
|
||||||
|
import ActivityEntry from '@/components/profile/ActivityEntry';
|
||||||
|
|
||||||
|
import SCROLL_TO_MUTATION from '@/graphql/gql/local/mutations/scrollTo.gql';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: ['metaTitle', 'title', 'activities', 'topic', 'slug'],
|
props: ['module', 'filter'],
|
||||||
components: {ChevronRight},
|
components: {
|
||||||
|
ContentBookmark,
|
||||||
|
ActivityEntry
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
moduleTitle () {
|
empty() {
|
||||||
return `${this.topic.title} - ${this.metaTitle}`
|
return !(this.module.mySubmissions.length ||
|
||||||
|
this.module.myAnswers.length ||
|
||||||
|
this.module.myContentBookmarks.length ||
|
||||||
|
this.module.myChapterBookmarks.length ||
|
||||||
|
this.module.bookmark)
|
||||||
|
},
|
||||||
|
notes() {
|
||||||
|
return this.module.myChapterBookmarks
|
||||||
|
.concat(this.module.myContentBookmarks)
|
||||||
|
.concat([this.module.bookmark ? this.module.bookmark : {}])
|
||||||
|
.filter(b => b.note)
|
||||||
|
.map(b => b.note);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions(['scrollToAssignmentId']),
|
...mapActions(['scrollToAssignmentId']),
|
||||||
goToAssignment (activity) {
|
goTo(scrollTo) {
|
||||||
const url = `/module/${this.slug}/`;
|
const url = `/module/${this.module.slug}/`;
|
||||||
this.scrollToAssignmentId(activity.assignmentId);
|
this.$apollo.mutate({
|
||||||
|
mutation: SCROLL_TO_MUTATION,
|
||||||
|
variables: {
|
||||||
|
scrollTo
|
||||||
|
}
|
||||||
|
});
|
||||||
this.$router.push(url);
|
this.$router.push(url);
|
||||||
|
},
|
||||||
|
applyFilter(filterCriteria) {
|
||||||
|
return !this.filter || this.filter === filterCriteria;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -44,11 +95,6 @@
|
||||||
@import "@/styles/_mixins.scss";
|
@import "@/styles/_mixins.scss";
|
||||||
|
|
||||||
.module-activity {
|
.module-activity {
|
||||||
@include widget-shadow;
|
|
||||||
padding: $medium-spacing;
|
|
||||||
|
|
||||||
/* used for text ellipis... somehow https://css-flexbox-text-ellipsis.dinhquangtrung.net/ just does not work */
|
|
||||||
|
|
||||||
max-width: 640px;
|
max-width: 640px;
|
||||||
|
|
||||||
@include desktop {
|
@include desktop {
|
||||||
|
|
@ -63,60 +109,22 @@
|
||||||
max-width: 320px;
|
max-width: 320px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
margin-bottom: 2*$large-spacing;
|
||||||
|
|
||||||
&__module-name {
|
&__module-name {
|
||||||
@include small-text;
|
@include regular-text;
|
||||||
color: $color-silver-dark;
|
margin-bottom: $small-spacing;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.activity-tasks {
|
|
||||||
&__title {
|
|
||||||
background-color: $color-brand-light;
|
|
||||||
padding: $small-spacing $medium-spacing;
|
|
||||||
border-radius: $default-border-radius;
|
|
||||||
|
|
||||||
&--alternative {
|
|
||||||
background-color: $color-accent-1-light;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.task-item {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: space-between;
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
$line-height: 50px;
|
|
||||||
|
|
||||||
&__title {
|
&__title {
|
||||||
&::after {
|
@include heading-2;
|
||||||
content: ":"
|
|
||||||
}
|
|
||||||
margin-right: $medium-spacing;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&__submission {
|
&__entry {
|
||||||
width: 100%;
|
&:first-of-type {
|
||||||
min-width: 0;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
&__title, &__submission {
|
border-top: 1px solid $color-silver;
|
||||||
line-height: $line-height;
|
|
||||||
height: $line-height;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&__chevron {
|
|
||||||
line-height: $line-height;
|
|
||||||
height: $medium-spacing;
|
|
||||||
vertical-align: middle;
|
|
||||||
position: relative;
|
|
||||||
top: ($line-height - $medium-spacing) / 2;
|
|
||||||
fill: $color-brand;
|
|
||||||
width: 30px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
import {InMemoryCache} from 'apollo-cache-inmemory/lib/index'
|
import {InMemoryCache} from 'apollo-cache-inmemory/lib/index'
|
||||||
import {HttpLink} from 'apollo-link-http/lib/index'
|
import {createHttpLink} from 'apollo-link-http'
|
||||||
import {ApolloClient} from 'apollo-client/index'
|
import {ApolloClient} from 'apollo-client'
|
||||||
import {ApolloLink} from 'apollo-link'
|
import {ApolloLink} from 'apollo-link'
|
||||||
import fetch from 'unfetch'
|
import fetch from 'unfetch'
|
||||||
|
import {typeDefs} from '@/graphql/typedefs';
|
||||||
|
import {resolvers} from '@/graphql/resolvers';
|
||||||
|
|
||||||
export default function (uri) {
|
export default function (uri) {
|
||||||
const httpLink = new HttpLink({
|
const httpLink = createHttpLink({
|
||||||
// uri: process.env.NODE_ENV !== 'production' ? 'http://localhost:8000/api/graphql/' : '/api/graphql/',
|
// uri: process.env.NODE_ENV !== 'production' ? 'http://localhost:8000/api/graphql/' : '/api/graphql/',
|
||||||
uri,
|
uri,
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
|
|
@ -48,7 +50,8 @@ export default function (uri) {
|
||||||
assignment: (_, args, {getCacheKey}) => getCacheKey({__typename: 'AssignmentNode', id: args.id}),
|
assignment: (_, args, {getCacheKey}) => getCacheKey({__typename: 'AssignmentNode', id: args.id}),
|
||||||
objective: (_, args, {getCacheKey}) => getCacheKey({__typename: 'ObjectiveNode', id: args.id}),
|
objective: (_, args, {getCacheKey}) => getCacheKey({__typename: 'ObjectiveNode', id: args.id}),
|
||||||
objectiveGroup: (_, args, {getCacheKey}) => getCacheKey({__typename: 'ObjectiveGroupNode', id: args.id}),
|
objectiveGroup: (_, args, {getCacheKey}) => getCacheKey({__typename: 'ObjectiveGroupNode', id: args.id}),
|
||||||
module: (_, args, {getCacheKey}) => getCacheKey({__typename: 'ModuleNode', id: args.id}),
|
// todo: remove, the new client seems to cache this correctly by itself
|
||||||
|
// module: (_, args, {getCacheKey}) => getCacheKey({__typename: 'ModuleNode', id: args.id}),
|
||||||
projectEntry: (_, args, {getCacheKey}) => getCacheKey({__typename: 'ProjectEntryNode', id: args.id}),
|
projectEntry: (_, args, {getCacheKey}) => getCacheKey({__typename: 'ProjectEntryNode', id: args.id}),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -66,11 +69,23 @@ export default function (uri) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// we use the cache as our local state
|
||||||
|
cache.writeData({
|
||||||
|
data: {
|
||||||
|
scrollPosition: {
|
||||||
|
__typename: 'ScrollPosition',
|
||||||
|
scrollTo: ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Create the apollo client
|
// Create the apollo client
|
||||||
return new ApolloClient({
|
return new ApolloClient({
|
||||||
link: composedLink,
|
link: composedLink,
|
||||||
// link: httpLink,
|
// link: httpLink,
|
||||||
cache: cache,
|
cache,
|
||||||
connectToDevTools: true
|
connectToDevTools: true,
|
||||||
|
typeDefs,
|
||||||
|
resolvers
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
mutation($scrollTo: String!) {
|
||||||
|
scrollTo(scrollTo: $scrollTo) @client
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
query ScrollPosition {
|
||||||
|
scrollPosition @client {
|
||||||
|
scrollTo
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,15 @@
|
||||||
query {
|
query MyActivityQuery {
|
||||||
myActivity {
|
myActivity {
|
||||||
|
edges {
|
||||||
|
node {
|
||||||
|
id
|
||||||
|
title
|
||||||
|
slug
|
||||||
|
metaTitle
|
||||||
|
topic {
|
||||||
|
title
|
||||||
|
}
|
||||||
|
mySubmissions {
|
||||||
edges {
|
edges {
|
||||||
node {
|
node {
|
||||||
id
|
id
|
||||||
|
|
@ -7,17 +17,68 @@ query {
|
||||||
assignment {
|
assignment {
|
||||||
id
|
id
|
||||||
title
|
title
|
||||||
module {
|
}
|
||||||
title
|
}
|
||||||
metaTitle
|
}
|
||||||
slug
|
}
|
||||||
|
myAnswers {
|
||||||
|
edges {
|
||||||
|
node {
|
||||||
|
id
|
||||||
|
survey {
|
||||||
id
|
id
|
||||||
topic {
|
|
||||||
title
|
title
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
myContentBookmarks {
|
||||||
|
edges {
|
||||||
|
node {
|
||||||
|
id
|
||||||
|
uuid
|
||||||
|
note {
|
||||||
|
id
|
||||||
|
text
|
||||||
|
}
|
||||||
|
contentBlock {
|
||||||
|
id
|
||||||
|
type
|
||||||
|
contents
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
myChapterBookmarks {
|
||||||
|
edges {
|
||||||
|
node {
|
||||||
|
id
|
||||||
|
note {
|
||||||
|
id
|
||||||
|
text
|
||||||
|
}
|
||||||
|
chapter {
|
||||||
|
id
|
||||||
|
title
|
||||||
|
description
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bookmark {
|
||||||
|
id
|
||||||
|
note {
|
||||||
|
id
|
||||||
|
text
|
||||||
|
}
|
||||||
|
module {
|
||||||
|
id
|
||||||
|
teaser
|
||||||
|
metaTitle
|
||||||
|
intro
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
import SCROLL_POSITION from '@/graphql/gql/local/scrollPosition.gql';
|
||||||
|
|
||||||
|
export const resolvers = {
|
||||||
|
Mutation: {
|
||||||
|
scrollTo: (_, {scrollTo}, {cache}) => {
|
||||||
|
const data = cache.readQuery({query: SCROLL_POSITION});
|
||||||
|
data.scrollPosition.scrollTo = scrollTo;
|
||||||
|
cache.writeQuery({query: SCROLL_POSITION, data});
|
||||||
|
return data.scrollPosition;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
import gql from 'graphql-tag';
|
||||||
|
|
||||||
|
export const typeDefs = gql`
|
||||||
|
type ScrollPosition {
|
||||||
|
scrollTo: String!
|
||||||
|
}
|
||||||
|
|
||||||
|
type Mutation {
|
||||||
|
scrollTo(scrollTo: String!): ScrollPosition
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
@ -1,58 +1,46 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="activity">
|
<div class="activity">
|
||||||
<h1 class="activity__header">Meine Aktivitäten</h1>
|
<h1 class="activity__header">Meine Aktivitäten</h1>
|
||||||
|
<activity-filter
|
||||||
|
:filter="filter"
|
||||||
|
@change-filter="filter = $event"
|
||||||
|
></activity-filter>
|
||||||
<div class="modules">
|
<div class="modules">
|
||||||
<module-activity v-for="moduleId in Object.keys(modules)" v-bind="modules[moduleId]" :key="moduleId" class="activity"></module-activity>
|
<module-activity
|
||||||
|
v-for="(module, id) in modules"
|
||||||
|
:filter="filter"
|
||||||
|
:module="module"
|
||||||
|
:key="id"
|
||||||
|
class="activity"></module-activity>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import ModuleActivity from '@/components/profile/ModuleActivity';
|
import ModuleActivity from '@/components/profile/ModuleActivity';
|
||||||
|
import ActivityFilter from '@/components/profile/ActivityFilter';
|
||||||
import MY_ACTIVITY_QUERY from '@/graphql/gql/myActivity.gql'
|
import MY_ACTIVITY_QUERY from '@/graphql/gql/myActivity.gql'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
ModuleActivity
|
ModuleActivity,
|
||||||
|
ActivityFilter
|
||||||
},
|
},
|
||||||
|
|
||||||
apollo: {
|
apollo: {
|
||||||
submissions: {
|
modules: {
|
||||||
query: MY_ACTIVITY_QUERY,
|
query: MY_ACTIVITY_QUERY,
|
||||||
update(data) {
|
update(data) {
|
||||||
return this.$getRidOfEdges(data).myActivity;
|
return this.$getRidOfEdges(data).myActivity;
|
||||||
}
|
},
|
||||||
|
pollInterval: 5000,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
submissions: []
|
modules: [],
|
||||||
}
|
filter: ''
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
modules () {
|
|
||||||
let modules = {};
|
|
||||||
|
|
||||||
this.submissions.map((submission) => {
|
|
||||||
let activity = {
|
|
||||||
assignmentId: submission.assignment.id,
|
|
||||||
assignmentTitle: submission.assignment.title,
|
|
||||||
answer: submission.text
|
|
||||||
};
|
|
||||||
|
|
||||||
const module = submission.assignment.module
|
|
||||||
if (!(module.id in modules)) {
|
|
||||||
modules[module.id] = {
|
|
||||||
...module,
|
|
||||||
activities: []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
modules[module.id].activities = [...modules[module.id].activities, activity];
|
|
||||||
});
|
|
||||||
return modules
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,10 @@
|
||||||
<script>
|
<script>
|
||||||
import {mapGetters, mapActions} from 'vuex'
|
import {mapGetters, mapActions} from 'vuex'
|
||||||
import ASSIGNMENTS_QUERY from '@/graphql/gql/assignmentsQuery.gql';
|
import ASSIGNMENTS_QUERY from '@/graphql/gql/assignmentsQuery.gql';
|
||||||
import {moduleQuery} from '@/graphql/queries';
|
import MODULE_DETAILS_QUERY from '@/graphql/gql/moduleDetailsQuery.gql';
|
||||||
|
|
||||||
|
import SCROLL_POSITION from '@/graphql/gql/local/scrollPosition.gql';
|
||||||
|
import SCROLL_TO_MUTATION from '@/graphql/gql/local/mutations/scrollTo.gql';
|
||||||
|
|
||||||
import Module from '@/components/modules/Module.vue';
|
import Module from '@/components/modules/Module.vue';
|
||||||
|
|
||||||
|
|
@ -16,44 +19,15 @@
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions(['scrollToAssignmentReady', 'scrollingToAssignment']),
|
...mapActions(['scrollToAssignmentReady', 'scrollingToAssignment']),
|
||||||
},
|
scrollTo() {
|
||||||
|
if (this.scrollPosition && this.scrollPosition.scrollTo) {
|
||||||
computed: {
|
|
||||||
...mapGetters({
|
|
||||||
scrollToAssignmentId: 'scrollToAssignmentId',
|
|
||||||
isScrollingToAssignment: 'scrollingToAssignment',
|
|
||||||
editModule: 'editModule'
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
|
|
||||||
apollo: {
|
|
||||||
module: moduleQuery,
|
|
||||||
assignments() {
|
|
||||||
return {
|
|
||||||
query: ASSIGNMENTS_QUERY
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
module: {},
|
|
||||||
assignments: []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted () {
|
|
||||||
this.$store.subscribe((mutation, state) => {
|
|
||||||
if (mutation.type === 'setScrollToAssignmentReady' && mutation.payload && !this.isScrollingToAssignment) {
|
|
||||||
this.scrollingToAssignment(true);
|
|
||||||
let options = {
|
let options = {
|
||||||
container: '#app',
|
container: 'body',
|
||||||
easing: 'ease',
|
easing: 'ease',
|
||||||
offset: -60,
|
offset: -60,
|
||||||
onStart: (element) => {
|
onStart: (element) => {
|
||||||
},
|
},
|
||||||
onDone: (element) => {
|
onDone: (element) => {
|
||||||
this.scrollToAssignmentReady(false);
|
|
||||||
this.scrollingToAssignment(false);
|
|
||||||
},
|
},
|
||||||
onCancel: function () {
|
onCancel: function () {
|
||||||
// scrolling has been interrupted
|
// scrolling has been interrupted
|
||||||
|
|
@ -62,13 +36,55 @@
|
||||||
y: true
|
y: true
|
||||||
};
|
};
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$scrollTo(`#${this.scrollToAssignmentId.replace(/=/g, '')}`, 1000, options);
|
this.$scrollTo(`[data-scrollto="${this.scrollPosition.scrollTo}"]`, 1000, options);
|
||||||
}, 250) // unfortunately this timeout is needed as it is hard to tell when everything is rendered
|
this.$apollo.mutate({
|
||||||
|
mutation: SCROLL_TO_MUTATION,
|
||||||
|
variables: {
|
||||||
|
scrollTo: ''
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
}, 250); // unfortunately this timeout is needed as it is hard to tell when everything is rendered
|
||||||
beforeDestroy () {
|
|
||||||
this.scrollToAssignmentReady(false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
...mapGetters({
|
||||||
|
editModule: 'editModule'
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
|
||||||
|
apollo: {
|
||||||
|
module() {
|
||||||
|
return {
|
||||||
|
query: MODULE_DETAILS_QUERY,
|
||||||
|
variables: {
|
||||||
|
slug: this.$route.params.slug
|
||||||
|
},
|
||||||
|
update(data) {
|
||||||
|
return this.$getRidOfEdges(data).module || {};
|
||||||
|
},
|
||||||
|
result() {
|
||||||
|
// scroll only after the module has been loaded completely
|
||||||
|
this.scrollTo();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
assignments() {
|
||||||
|
return {
|
||||||
|
query: ASSIGNMENTS_QUERY
|
||||||
|
}
|
||||||
|
},
|
||||||
|
scrollPosition: {
|
||||||
|
query: SCROLL_POSITION
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
module: {},
|
||||||
|
assignments: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ import Vuex from 'vuex'
|
||||||
|
|
||||||
Vue.use(Vuex)
|
Vue.use(Vuex)
|
||||||
|
|
||||||
|
// WARNING fixme todo: please do not use this anymore, use the local GraphQL cache
|
||||||
export default new Vuex.Store({
|
export default new Vuex.Store({
|
||||||
modules: {},
|
modules: {},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,3 +21,4 @@
|
||||||
@import "password_forms";
|
@import "password_forms";
|
||||||
@import "public-page";
|
@import "public-page";
|
||||||
@import "student-submission";
|
@import "student-submission";
|
||||||
|
@import "module-activity";
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
.module-activity-entry {
|
||||||
|
&__title {
|
||||||
|
@include small-text;
|
||||||
|
// todo: make style definition for small text and silver color
|
||||||
|
color: $color-silver-dark;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__text {
|
||||||
|
@include regular-text;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -6,7 +6,7 @@ from graphene_django.debug import DjangoDebug
|
||||||
# noinspection PyUnresolvedReferences
|
# noinspection PyUnresolvedReferences
|
||||||
from api import graphene_wagtail # Keep this import exactly here, it's necessary for StreamField conversion
|
from api import graphene_wagtail # Keep this import exactly here, it's necessary for StreamField conversion
|
||||||
from assignments.schema.mutations import AssignmentMutations
|
from assignments.schema.mutations import AssignmentMutations
|
||||||
from assignments.schema.queries import AssignmentsQuery, StudentSubmissionQuery, MyActivityQuery
|
from assignments.schema.queries import AssignmentsQuery, StudentSubmissionQuery
|
||||||
from basicknowledge.queries import BasicKnowledgeQuery
|
from basicknowledge.queries import BasicKnowledgeQuery
|
||||||
from books.schema.mutations.main import BookMutations
|
from books.schema.mutations.main import BookMutations
|
||||||
from books.schema.queries import BookQuery
|
from books.schema.queries import BookQuery
|
||||||
|
|
@ -26,7 +26,7 @@ from registration.mutations_public import RegistrationMutations
|
||||||
|
|
||||||
|
|
||||||
class Query(UsersQuery, AllUsersQuery, ModuleRoomsQuery, RoomsQuery, ObjectivesQuery, BookQuery, AssignmentsQuery,
|
class Query(UsersQuery, AllUsersQuery, ModuleRoomsQuery, RoomsQuery, ObjectivesQuery, BookQuery, AssignmentsQuery,
|
||||||
StudentSubmissionQuery, BasicKnowledgeQuery, PortfolioQuery, MyActivityQuery, SurveysQuery,
|
StudentSubmissionQuery, BasicKnowledgeQuery, PortfolioQuery, SurveysQuery,
|
||||||
graphene.ObjectType):
|
graphene.ObjectType):
|
||||||
node = relay.Node.Field()
|
node = relay.Node.Field()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,11 +12,3 @@ class AssignmentsQuery(object):
|
||||||
|
|
||||||
class StudentSubmissionQuery(object):
|
class StudentSubmissionQuery(object):
|
||||||
student_submission = relay.Node.Field(StudentSubmissionNode)
|
student_submission = relay.Node.Field(StudentSubmissionNode)
|
||||||
|
|
||||||
|
|
||||||
class MyActivityQuery(object):
|
|
||||||
my_activity = DjangoFilterConnectionField(StudentSubmissionNode)
|
|
||||||
|
|
||||||
def resolve_my_activity(self, info, **kwargs):
|
|
||||||
user = info.context.user
|
|
||||||
return StudentSubmission.objects.filter(student=user)
|
|
||||||
|
|
|
||||||
|
|
@ -39,8 +39,15 @@ class MyAssignemntsText(DefaultUserTestCase):
|
||||||
|
|
||||||
def query_my_assignments(self):
|
def query_my_assignments(self):
|
||||||
query = '''
|
query = '''
|
||||||
query {
|
query MyActivityQuery {
|
||||||
myActivity {
|
myActivity {
|
||||||
|
edges {
|
||||||
|
node {
|
||||||
|
id
|
||||||
|
title
|
||||||
|
slug
|
||||||
|
metaTitle
|
||||||
|
mySubmissions {
|
||||||
edges {
|
edges {
|
||||||
node {
|
node {
|
||||||
id
|
id
|
||||||
|
|
@ -52,7 +59,68 @@ class MyAssignemntsText(DefaultUserTestCase):
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
myAnswers {
|
||||||
|
edges {
|
||||||
|
node {
|
||||||
|
id
|
||||||
|
survey {
|
||||||
|
id
|
||||||
|
title
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
myContentBookmarks {
|
||||||
|
edges {
|
||||||
|
node {
|
||||||
|
id
|
||||||
|
uuid
|
||||||
|
note {
|
||||||
|
id
|
||||||
|
text
|
||||||
|
}
|
||||||
|
contentBlock {
|
||||||
|
id
|
||||||
|
type
|
||||||
|
contents
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
myChapterBookmarks {
|
||||||
|
edges {
|
||||||
|
node {
|
||||||
|
id
|
||||||
|
note {
|
||||||
|
id
|
||||||
|
text
|
||||||
|
}
|
||||||
|
chapter {
|
||||||
|
id
|
||||||
|
title
|
||||||
|
description
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bookmark {
|
||||||
|
id
|
||||||
|
note {
|
||||||
|
id
|
||||||
|
text
|
||||||
|
}
|
||||||
|
module {
|
||||||
|
id
|
||||||
|
teaser
|
||||||
|
metaTitle
|
||||||
|
intro
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
result = self.client.execute(query)
|
result = self.client.execute(query)
|
||||||
|
|
@ -68,5 +136,5 @@ class MyAssignemntsText(DefaultUserTestCase):
|
||||||
result = self.query_my_assignments()
|
result = self.query_my_assignments()
|
||||||
contents = self.get_content(result)
|
contents = self.get_content(result)
|
||||||
self.assertEqual(len(contents), 1)
|
self.assertEqual(len(contents), 1)
|
||||||
self.assertEquals(contents[0].get('node').get('text'), self.submission1.text)
|
self.assertEquals(contents[0].get('node').get('mySubmissions').get('edges')[0].get('node').get('text'), self.submission1.text)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,14 @@ from graphene_django import DjangoObjectType
|
||||||
from graphene_django.filter import DjangoFilterConnectionField
|
from graphene_django.filter import DjangoFilterConnectionField
|
||||||
|
|
||||||
from api.utils import get_object
|
from api.utils import get_object
|
||||||
|
from assignments.models import StudentSubmission
|
||||||
|
from assignments.schema.types import StudentSubmissionNode
|
||||||
from books.utils import are_solutions_enabled_for
|
from books.utils import are_solutions_enabled_for
|
||||||
from notes.models import ContentBlockBookmark, ChapterBookmark, ModuleBookmark
|
from notes.models import ContentBlockBookmark, ChapterBookmark, ModuleBookmark
|
||||||
from notes.schema import ContentBlockBookmarkNode, ChapterBookmarkNode, ModuleBookmarkNode
|
from notes.schema import ContentBlockBookmarkNode, ChapterBookmarkNode, ModuleBookmarkNode
|
||||||
from rooms.models import ModuleRoomSlug
|
from rooms.models import ModuleRoomSlug
|
||||||
|
from surveys.models import Answer
|
||||||
|
from surveys.schema import AnswerNode
|
||||||
from ..models import Book, Topic, Module, Chapter, ContentBlock
|
from ..models import Book, Topic, Module, Chapter, ContentBlock
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -103,6 +107,7 @@ class ChapterNode(DjangoObjectType):
|
||||||
chapter=self
|
chapter=self
|
||||||
).first()
|
).first()
|
||||||
|
|
||||||
|
|
||||||
class ModuleNode(DjangoObjectType):
|
class ModuleNode(DjangoObjectType):
|
||||||
pk = graphene.Int()
|
pk = graphene.Int()
|
||||||
chapters = DjangoFilterConnectionField(ChapterNode)
|
chapters = DjangoFilterConnectionField(ChapterNode)
|
||||||
|
|
@ -110,6 +115,10 @@ class ModuleNode(DjangoObjectType):
|
||||||
hero_image = graphene.String()
|
hero_image = graphene.String()
|
||||||
solutions_enabled = graphene.Boolean()
|
solutions_enabled = graphene.Boolean()
|
||||||
bookmark = graphene.Field(ModuleBookmarkNode)
|
bookmark = graphene.Field(ModuleBookmarkNode)
|
||||||
|
my_submissions = DjangoFilterConnectionField(StudentSubmissionNode)
|
||||||
|
my_answers = DjangoFilterConnectionField(AnswerNode)
|
||||||
|
my_content_bookmarks = DjangoFilterConnectionField(ContentBlockBookmarkNode)
|
||||||
|
my_chapter_bookmarks = DjangoFilterConnectionField(ChapterBookmarkNode)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Module
|
model = Module
|
||||||
|
|
@ -145,6 +154,32 @@ class ModuleNode(DjangoObjectType):
|
||||||
module=self
|
module=self
|
||||||
).first()
|
).first()
|
||||||
|
|
||||||
|
def resolve_my_submissions(self, info, **kwargs):
|
||||||
|
user = info.context.user
|
||||||
|
return StudentSubmission.objects.filter(student=user, assignment__module=self)
|
||||||
|
# we want:
|
||||||
|
# StudentSubmission
|
||||||
|
|
||||||
|
def resolve_my_answers(self, info, **kwargs):
|
||||||
|
user = info.context.user
|
||||||
|
return Answer.objects.filter(owner=user, survey__module=self)
|
||||||
|
# Survey
|
||||||
|
|
||||||
|
def resolve_my_content_bookmarks(self, info, **kwargs):
|
||||||
|
user = info.context.user
|
||||||
|
content_blocks = ContentBlock.objects.live().descendant_of(self)
|
||||||
|
return ContentBlockBookmark.objects.filter(content_block__in=content_blocks, user=user)
|
||||||
|
# Bookmark Text
|
||||||
|
# Bookmark Image etc
|
||||||
|
# Bookmark Other
|
||||||
|
# Note
|
||||||
|
#
|
||||||
|
|
||||||
|
def resolve_my_chapter_bookmarks(self, info, **kwargs):
|
||||||
|
user = info.context.user
|
||||||
|
chapters = Chapter.objects.live().descendant_of(self)
|
||||||
|
return ChapterBookmark.objects.filter(chapter__in=chapters, user=user)
|
||||||
|
|
||||||
|
|
||||||
class TopicNode(DjangoObjectType):
|
class TopicNode(DjangoObjectType):
|
||||||
pk = graphene.Int()
|
pk = graphene.Int()
|
||||||
|
|
@ -190,34 +225,35 @@ class BookNode(DjangoObjectType):
|
||||||
return Topic.get_by_parent(self)
|
return Topic.get_by_parent(self)
|
||||||
|
|
||||||
|
|
||||||
class FilteredChapterNode(DjangoObjectType):
|
# todo: do we need this?
|
||||||
content_blocks = DjangoFilterConnectionField(ContentBlockNode)
|
# class FilteredChapterNode(DjangoObjectType):
|
||||||
|
# content_blocks = DjangoFilterConnectionField(ContentBlockNode)
|
||||||
class Meta:
|
#
|
||||||
model = Chapter
|
# class Meta:
|
||||||
only_fields = [
|
# model = Chapter
|
||||||
'slug', 'title',
|
# only_fields = [
|
||||||
]
|
# 'slug', 'title', 'description',
|
||||||
filter_fields = [
|
# ]
|
||||||
'slug', 'title',
|
# filter_fields = [
|
||||||
]
|
# 'slug', 'title',
|
||||||
interfaces = (relay.Node,)
|
# ]
|
||||||
|
# interfaces = (relay.Node,)
|
||||||
def resolve_content_blocks(self, *args, **kwargs):
|
#
|
||||||
return ContentBlock.get_by_parent(self)
|
# def resolve_content_blocks(self, *args, **kwargs):
|
||||||
|
# return ContentBlock.get_by_parent(self)
|
||||||
|
|
||||||
|
|
||||||
class BookQuery(object):
|
class BookQuery(object):
|
||||||
book = relay.Node.Field(BookNode)
|
book = relay.Node.Field(BookNode)
|
||||||
topic = graphene.Field(TopicNode, slug=graphene.String())
|
topic = graphene.Field(TopicNode, slug=graphene.String())
|
||||||
module = graphene.Field(ModuleNode, slug=graphene.String(), id=graphene.ID())
|
module = graphene.Field(ModuleNode, slug=graphene.String(), id=graphene.ID())
|
||||||
chapter = relay.Node.Field(FilteredChapterNode)
|
chapter = relay.Node.Field(ChapterNode)
|
||||||
content_block = relay.Node.Field(ContentBlockNode)
|
content_block = relay.Node.Field(ContentBlockNode)
|
||||||
|
|
||||||
books = DjangoFilterConnectionField(BookNode)
|
books = DjangoFilterConnectionField(BookNode)
|
||||||
topics = DjangoFilterConnectionField(TopicNode)
|
topics = DjangoFilterConnectionField(TopicNode)
|
||||||
modules = DjangoFilterConnectionField(ModuleNode)
|
modules = DjangoFilterConnectionField(ModuleNode)
|
||||||
chapters = DjangoFilterConnectionField(FilteredChapterNode)
|
chapters = DjangoFilterConnectionField(ChapterNode)
|
||||||
|
|
||||||
def resolve_books(self, *args, **kwargs):
|
def resolve_books(self, *args, **kwargs):
|
||||||
return Book.objects.filter(**kwargs).live()
|
return Book.objects.filter(**kwargs).live()
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
from django.core.management import BaseCommand
|
||||||
|
|
||||||
|
from assignments.models import Assignment, StudentSubmission
|
||||||
|
import random
|
||||||
|
import json
|
||||||
|
from django.db.models import Q
|
||||||
|
|
||||||
|
class Command(BaseCommand):
|
||||||
|
def add_arguments(self, parser):
|
||||||
|
parser.add_argument('jsonfile', type=str)
|
||||||
|
|
||||||
|
def handle(self, *args, **options):
|
||||||
|
jsonfile = options['jsonfile']
|
||||||
|
self.stdout.write("Exporting assignments")
|
||||||
|
assignment_list = []
|
||||||
|
for assignment in Assignment.objects.filter(user_created=False):
|
||||||
|
assignment_dict = {
|
||||||
|
"title": assignment.title,
|
||||||
|
"id": assignment.id,
|
||||||
|
"text": assignment.assignment,
|
||||||
|
}
|
||||||
|
submissions = assignment.submissions.filter(text__isnull=False).filter(~Q(text=''))
|
||||||
|
if submissions.count() > 0:
|
||||||
|
example = random.choice(submissions)
|
||||||
|
assignment_dict['example'] = example.text
|
||||||
|
assignment_list.append(assignment_dict)
|
||||||
|
|
||||||
|
with open(jsonfile, 'w') as f:
|
||||||
|
f.write(json.dumps(assignment_list, indent=2, sort_keys=True))
|
||||||
|
|
@ -23,6 +23,8 @@ class ContentBlockBookmarkNode(DjangoObjectType):
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = ContentBlockBookmark
|
model = ContentBlockBookmark
|
||||||
|
filter_fields = []
|
||||||
|
interfaces = (relay.Node,)
|
||||||
|
|
||||||
|
|
||||||
class ModuleBookmarkNode(DjangoObjectType):
|
class ModuleBookmarkNode(DjangoObjectType):
|
||||||
|
|
@ -37,3 +39,5 @@ class ChapterBookmarkNode(DjangoObjectType):
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = ChapterBookmark
|
model = ChapterBookmark
|
||||||
|
filter_fields = []
|
||||||
|
interfaces = (relay.Node,)
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ class AnswerNode(DjangoObjectType):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Answer
|
model = Answer
|
||||||
interfaces = (relay.Node,)
|
interfaces = (relay.Node,)
|
||||||
|
filter_fields = []
|
||||||
|
|
||||||
def resolve_pk(self, *args, **kwargs):
|
def resolve_pk(self, *args, **kwargs):
|
||||||
return self.id
|
return self.id
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,10 @@ from graphene import relay
|
||||||
from graphene_django import DjangoObjectType
|
from graphene_django import DjangoObjectType
|
||||||
from graphene_django.filter import DjangoFilterConnectionField
|
from graphene_django.filter import DjangoFilterConnectionField
|
||||||
|
|
||||||
|
from assignments.models import StudentSubmission
|
||||||
|
from assignments.schema.types import StudentSubmissionNode
|
||||||
|
from books.models import Module
|
||||||
|
from books.schema.queries import ModuleNode
|
||||||
from users.models import User, SchoolClass
|
from users.models import User, SchoolClass
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -43,6 +47,7 @@ class UserNode(DjangoObjectType):
|
||||||
class UsersQuery(object):
|
class UsersQuery(object):
|
||||||
me = graphene.Field(UserNode)
|
me = graphene.Field(UserNode)
|
||||||
all_users = DjangoFilterConnectionField(UserNode)
|
all_users = DjangoFilterConnectionField(UserNode)
|
||||||
|
my_activity = DjangoFilterConnectionField(ModuleNode)
|
||||||
|
|
||||||
def resolve_me(self, info, **kwargs):
|
def resolve_me(self, info, **kwargs):
|
||||||
return info.context.user
|
return info.context.user
|
||||||
|
|
@ -53,6 +58,9 @@ class UsersQuery(object):
|
||||||
else:
|
else:
|
||||||
return User.objects.all()
|
return User.objects.all()
|
||||||
|
|
||||||
|
def resolve_my_activity(self, info, **kwargs):
|
||||||
|
return Module.objects.all()
|
||||||
|
|
||||||
|
|
||||||
class AllUsersQuery(object):
|
class AllUsersQuery(object):
|
||||||
me = graphene.Field(UserNode)
|
me = graphene.Field(UserNode)
|
||||||
|
|
@ -63,5 +71,3 @@ class AllUsersQuery(object):
|
||||||
return User.objects.none()
|
return User.objects.none()
|
||||||
else:
|
else:
|
||||||
return User.objects.all()
|
return User.objects.all()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue