diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5fdb2a5..1787a5b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,7 +30,7 @@ build: # - build/ # expire_in: 1 week -deploy: +deploy:default: stage: deploy image: name: gcr.io/kaniko-project/executor:debug @@ -40,8 +40,26 @@ deploy: - echo "{\"auths\":{\"${CI_REGISTRY}\":{\"username\":\"${CI_REGISTRY_USER}\",\"password\":\"${CI_REGISTRY_PASSWORD}\"}}}" > /kaniko/.docker/config.json - /kaniko/executor --context ${CI_PROJECT_DIR} + --build-arg REACT_APP_BRAND=villasweb --dockerfile ${CI_PROJECT_DIR}/Dockerfile --destination ${DOCKER_IMAGE}:${DOCKER_TAG} --snapshotMode=redo dependencies: - build + +deploy:slew: + stage: deploy + image: + name: gcr.io/kaniko-project/executor:debug + entrypoint: [ "" ] + script: + - mkdir -p /kaniko/.docker + - echo "{\"auths\":{\"${CI_REGISTRY}\":{\"username\":\"${CI_REGISTRY_USER}\",\"password\":\"${CI_REGISTRY_PASSWORD}\"}}}" > /kaniko/.docker/config.json + - /kaniko/executor + --context ${CI_PROJECT_DIR} + --build-arg REACT_APP_BRAND=slew + --dockerfile ${CI_PROJECT_DIR}/Dockerfile + --destination ${DOCKER_IMAGE}:${DOCKER_TAG}-slew + --snapshotMode=redo + dependencies: + - build diff --git a/Dockerfile b/Dockerfile index cd62bcb..7fb328a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,6 +27,7 @@ ADD package.json /usr/src/app RUN npm install # Install app dependencies +ARG REACT_APP_BRAND COPY . /usr/src/app RUN npm run build diff --git a/package-lock.json b/package-lock.json index c9207a8..7d5f657 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,11 +40,6 @@ "source-map": "^0.5.0" }, "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - }, "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", @@ -904,13 +899,6 @@ "@babel/helper-plugin-utils": "^7.10.4", "resolve": "^1.8.1", "semver": "^5.5.1" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - } } }, "@babel/plugin-transform-shorthand-properties": { @@ -1111,26 +1099,10 @@ } } }, - "@babel/runtime-corejs2": { - "version": "7.13.17", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs2/-/runtime-corejs2-7.13.17.tgz", - "integrity": "sha512-uvDSI/cLYd3G7S/iFd635tVkIwPji2CjEZzCXznL/lTFDMevIhoIjxSeKQ+AUDaX7D6L4Y1dIGvN4ZtA32m6IA==", - "requires": { - "core-js": "^2.6.5", - "regenerator-runtime": "^0.13.4" - }, - "dependencies": { - "regenerator-runtime": { - "version": "0.13.7", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", - "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==" - } - } - }, "@babel/runtime-corejs3": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.12.13.tgz", - "integrity": "sha512-8fSpqYRETHATtNitsCXq8QQbKJP31/KnDl2Wz2Vtui9nKzjss2ysuZtyVsWjBtvkeEFo346gkwjYPab1hvrXkQ==", + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.13.10.tgz", + "integrity": "sha512-x/XYVQ1h684pp1mJwOV4CyvqZXqbc8CMsMGUnAbuc82ZCdv1U63w5RSUzgDSXQHG5Rps/kiksH6g2D5BuaKyXg==", "requires": { "core-js-pure": "^3.0.0", "regenerator-runtime": "^0.13.4" @@ -1185,9 +1157,9 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==" }, "@braintree/sanitize-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-5.0.0.tgz", - "integrity": "sha512-WmKrB/575EJCzbeSJR3YQ5sET5FaizeljLRw1382qVUeGqzuWBgIS+AF5a0FO51uQTrDpoRgvuHC2IWVsgwkkA==" + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-5.0.1.tgz", + "integrity": "sha512-KzIC8q/UsT8g6bwRAQ0NbOCNxRoGbPKtqGBUtDaN8WN80xqsbHFs8z+Eq0fR0W1wcrcTB5oKNACsrbkK4X+FWA==" }, "@cnakazawa/watch": { "version": "1.0.4", @@ -1253,6 +1225,11 @@ "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==" + }, "type-fest": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", @@ -1931,25 +1908,25 @@ } }, "@nodelib/fs.scandir": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz", - "integrity": "sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz", + "integrity": "sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA==", "requires": { - "@nodelib/fs.stat": "2.0.3", + "@nodelib/fs.stat": "2.0.4", "run-parallel": "^1.1.9" } }, "@nodelib/fs.stat": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz", - "integrity": "sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA==" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz", + "integrity": "sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q==" }, "@nodelib/fs.walk": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz", - "integrity": "sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ==", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz", + "integrity": "sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow==", "requires": { - "@nodelib/fs.scandir": "2.1.3", + "@nodelib/fs.scandir": "2.1.4", "fastq": "^1.6.0" } }, @@ -2038,64 +2015,6 @@ } } }, - "@rjsf/core": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@rjsf/core/-/core-2.5.1.tgz", - "integrity": "sha512-km8NYScXNONaL5BiSLS6wyDj49pOLZtn0iXg7Zxlm921uuf3o2AAX5SuZS5kB4Zj2zlrVMrXESexfX6bxdDYHw==", - "requires": { - "@babel/runtime-corejs2": "^7.8.7", - "@types/json-schema": "^7.0.4", - "ajv": "^6.7.0", - "core-js": "^2.5.7", - "json-schema-merge-allof": "^0.6.0", - "jsonpointer": "^4.0.1", - "lodash": "^4.17.15", - "prop-types": "^15.7.2", - "react-app-polyfill": "^1.0.4", - "react-is": "^16.9.0", - "shortid": "^2.2.14" - }, - "dependencies": { - "promise": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/promise/-/promise-8.1.0.tgz", - "integrity": "sha512-W04AqnILOL/sPRXziNicCjSNRruLAuIHEOVBazepu0545DDNGYHz7ar9ZgZ1fMU8/MA4mVxp5rkBWRi6OXIy3Q==", - "requires": { - "asap": "~2.0.6" - } - }, - "react-app-polyfill": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/react-app-polyfill/-/react-app-polyfill-1.0.6.tgz", - "integrity": "sha512-OfBnObtnGgLGfweORmdZbyEz+3dgVePQBb3zipiaDsMHV1NpWm0rDFYIVXFV/AK+x4VIIfWHhrdMIeoTLyRr2g==", - "requires": { - "core-js": "^3.5.0", - "object-assign": "^4.1.1", - "promise": "^8.0.3", - "raf": "^3.4.1", - "regenerator-runtime": "^0.13.3", - "whatwg-fetch": "^3.0.0" - }, - "dependencies": { - "core-js": { - "version": "3.10.2", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.10.2.tgz", - "integrity": "sha512-W+2oVYeNghuBr3yTzZFQ5rfmjZtYB/Ubg87R5YOmlGrIb+Uw9f7qjUbhsj+/EkXhcV7eOD3jiM4+sgraX3FZUw==" - } - } - }, - "react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" - }, - "regenerator-runtime": { - "version": "0.13.7", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", - "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==" - } - } - }, "@rollup/plugin-node-resolve": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-7.1.3.tgz", @@ -2419,9 +2338,9 @@ "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==" }, "@types/node": { - "version": "14.14.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.10.tgz", - "integrity": "sha512-J32dgx2hw8vXrSbu4ZlVhn1Nm3GbeCFNw2FWL8S5QKucHGY0cyNwjdQdO+KMBZ4wpmC7KhLCiNsdk1RFRIYUQQ==" + "version": "14.14.34", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.34.tgz", + "integrity": "sha512-dBPaxocOK6UVyvhbnpFIj2W+S+1cBTkHQbFQfeeJhoKFbzYcVUGHvddeWPSucKATb3F0+pgDq0i6ghEaZjsugA==" }, "@types/normalize-package-data": { "version": "2.4.0", @@ -2568,6 +2487,16 @@ "regexpp": "^3.0.0", "semver": "^7.3.2", "tsutils": "^3.17.1" + }, + "dependencies": { + "semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "requires": { + "lru-cache": "^6.0.0" + } + } } }, "@typescript-eslint/experimental-utils": { @@ -2620,6 +2549,16 @@ "is-glob": "^4.0.1", "semver": "^7.3.2", "tsutils": "^3.17.1" + }, + "dependencies": { + "semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "requires": { + "lru-cache": "^6.0.0" + } + } } }, "@typescript-eslint/visitor-keys": { @@ -3166,6 +3105,13 @@ "integrity": "sha512-t81i2bCpS+s+5FIhatoww9DmpjhbdiimuU9ATEuLxtZMQ7jLv9fyFn7SWNG8IkEfD4AmYyirL1ss9k1aqVWRvg==", "requires": { "tslib": "^1.9.3" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + } } }, "autoprefixer": { @@ -3634,11 +3580,6 @@ "version": "0.13.7", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==" - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" } } }, @@ -4036,6 +3977,36 @@ "unique-filename": "^1.1.1" }, "dependencies": { + "chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==" + }, + "fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "requires": { + "minipass": "^3.0.0" + } + }, + "minipass": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.3.tgz", + "integrity": "sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg==", + "requires": { + "yallist": "^4.0.0" + } + }, + "minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "requires": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + } + }, "mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", @@ -4048,6 +4019,11 @@ "requires": { "glob": "^7.1.3" } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" } } }, @@ -4202,26 +4178,18 @@ "requires": { "anymatch": "~3.1.1", "braces": "~3.0.2", - "fsevents": "~2.1.2", + "fsevents": "~2.3.1", "glob-parent": "~5.1.0", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", "readdirp": "~3.5.0" - }, - "dependencies": { - "fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", - "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", - "optional": true - } } }, "chownr": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==" + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" }, "chrome-trace-event": { "version": "1.0.2", @@ -4229,6 +4197,13 @@ "integrity": "sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ==", "requires": { "tslib": "^1.9.0" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + } } }, "ci-info": { @@ -4389,9 +4364,9 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, "color-string": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.4.tgz", - "integrity": "sha512-57yF5yt8Xa3czSEW1jfQDE79Idk0+AkN/4KWad6tbdxUmAs3MvjxlWSWD4deYytcRfoZ9nhKyFl1kj5tBvidbw==", + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.5.tgz", + "integrity": "sha512-jgIoum0OfQfq9Whcfc2z/VhCNcmQjWbey6qBX0vqt7YICflUmBCh9E9CiQD5GSJ+Uehixm3NUwHVhqUAWRivZg==", "requires": { "color-name": "^1.0.0", "simple-swizzle": "^0.2.2" @@ -4480,27 +4455,6 @@ } } }, - "compute-gcd": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/compute-gcd/-/compute-gcd-1.2.1.tgz", - "integrity": "sha512-TwMbxBNz0l71+8Sc4czv13h4kEqnchV9igQZBi6QUaz09dnz13juGnnaWWJTRsP3brxOoxeB4SA2WELLw1hCtg==", - "requires": { - "validate.io-array": "^1.0.3", - "validate.io-function": "^1.0.2", - "validate.io-integer-array": "^1.0.0" - } - }, - "compute-lcm": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/compute-lcm/-/compute-lcm-1.1.2.tgz", - "integrity": "sha512-OFNPdQAXnQhDSKioX8/XYT6sdUlXwpeMjfd6ApxMJfyZ4GxmLR1xvMERctlYhlHwIiz6CSpBc2+qYKjHGZw4TQ==", - "requires": { - "compute-gcd": "^1.2.1", - "validate.io-array": "^1.0.3", - "validate.io-function": "^1.0.2", - "validate.io-integer-array": "^1.0.0" - } - }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -4626,9 +4580,9 @@ } }, "core-js-pure": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.8.0.tgz", - "integrity": "sha512-fRjhg3NeouotRoIV0L1FdchA6CK7ZD+lyINyMoz19SyV+ROpC4noS1xItWHFtwZdlqfMfVPJEyEGdfri2bD1pA==" + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.9.1.tgz", + "integrity": "sha512-laz3Zx0avrw9a4QEIdmIblnVuJz8W51leY9iLThatCsFawWxC3sE4guASC78JbCin+DkwMpCdp1AVAuzL/GN7A==" }, "core-util-is": { "version": "1.0.2", @@ -4722,13 +4676,6 @@ "semver": "^5.5.0", "shebang-command": "^1.2.0", "which": "^1.2.9" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - } } }, "crypto-browserify": { @@ -4836,6 +4783,14 @@ "version": "6.2.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==" + }, + "semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "requires": { + "lru-cache": "^6.0.0" + } } } }, @@ -5643,9 +5598,9 @@ } }, "dnd-core": { - "version": "12.0.1", - "resolved": "https://registry.npmjs.org/dnd-core/-/dnd-core-12.0.1.tgz", - "integrity": "sha512-KzfKXQM9t9uSBO7DFmrILVgXUCShpY3/MbnLPF9/wg1Wcvq2KblbeT72GhjcrplS9cz0DFXilE1NXy43n8plag==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/dnd-core/-/dnd-core-14.0.0.tgz", + "integrity": "sha512-wTDYKyjSqWuYw3ZG0GJ7k+UIfzxTNoZLjDrut37PbcPGNfwhlKYlPUqjAKUjOOv80izshUiqusaKgJPItXSevA==", "requires": { "@react-dnd/asap": "^4.0.0", "@react-dnd/invariant": "^2.0.0", @@ -5769,9 +5724,9 @@ } }, "dompurify": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.2.7.tgz", - "integrity": "sha512-jdtDffdGNY+C76jvodNTu9jt5yYj59vuTUyx+wXdzcSwAGTYZDAQkQ7Iwx9zcGrA4ixC1syU4H3RZROqRxokxg==" + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.2.8.tgz", + "integrity": "sha512-9H0UL59EkDLgY3dUFjLV6IEUaHm5qp3mxSqWw7Yyx4Zhk2Jn2cmLe+CNPP3xy13zl8Bqg+0NehQzkdMoVhGRww==" }, "domutils": { "version": "1.7.0", @@ -6070,17 +6025,22 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "escodegen": { - "version": "1.14.3", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz", - "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz", + "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==", "requires": { "esprima": "^4.0.1", - "estraverse": "^4.2.0", + "estraverse": "^5.2.0", "esutils": "^2.0.2", "optionator": "^0.8.1", "source-map": "~0.6.1" }, "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==" + }, "levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", @@ -6233,6 +6193,14 @@ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" }, + "semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "requires": { + "lru-cache": "^6.0.0" + } + }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -6254,6 +6222,11 @@ "ansi-regex": "^5.0.0" } }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==" + }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -6590,6 +6563,14 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==" + }, + "semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "requires": { + "lru-cache": "^6.0.0" + } } } }, @@ -6951,9 +6932,9 @@ }, "dependencies": { "type": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/type/-/type-2.1.0.tgz", - "integrity": "sha512-G9absDWvhAWCV2gmF1zKud3OyC61nZDwWvBL2DApaVFogI07CprggiQAOOjvp2NRjYWFzPyu7vwtDrQFq8jeSA==" + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.5.0.tgz", + "integrity": "sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw==" } } }, @@ -7051,9 +7032,9 @@ "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" }, "fast-glob": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.4.tgz", - "integrity": "sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.5.tgz", + "integrity": "sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg==", "requires": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -7089,9 +7070,9 @@ "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==" }, "fastq": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.9.0.tgz", - "integrity": "sha512-i7FVWL8HhVY+CTkwFxkN2mk3h+787ixS5S63eb78diVRc1MCssarHq3W5cj0av7YDSwmaV928RNag+U1etRQ7w==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz", + "integrity": "sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g==", "requires": { "reusify": "^1.0.4" } @@ -7318,9 +7299,9 @@ } }, "follow-redirects": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.0.tgz", - "integrity": "sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA==" + "version": "1.13.3", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.3.tgz", + "integrity": "sha512-DUgl6+HDzB0iEptNQEXLx/KhTmDb8tZUHSeLqpnjpknR70H0nC2t9N73BK6fN4hOvJ84pKlIQVQ4k5FFlBedKA==" }, "for-in": { "version": "1.0.2", @@ -7432,11 +7413,6 @@ "to-regex": "^3.0.2" } }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - }, "to-regex-range": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", @@ -7624,9 +7600,9 @@ } }, "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "requires": { "is-glob": "^4.0.1" } @@ -7655,9 +7631,9 @@ "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" }, "globby": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.1.tgz", - "integrity": "sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ==", + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.2.tgz", + "integrity": "sha512-2ZThXDvvV8fYFRVIxnrMQBipZQDr7MxKAmQK1vujaj9/7eF0efG7BPUKJ7jP7G5SLF37xKDXvO4S/KKLj/Z0og==", "requires": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", @@ -10269,6 +10245,14 @@ "path-parse": "^1.0.6" } }, + "semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "requires": { + "lru-cache": "^6.0.0" + } + }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -10577,9 +10561,9 @@ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "js-yaml": { - "version": "3.14.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", - "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "requires": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -10591,36 +10575,43 @@ "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, "jsdom": { - "version": "16.4.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.4.0.tgz", - "integrity": "sha512-lYMm3wYdgPhrl7pDcRmvzPhhrGVBeVhPIqeHjzeiHN3DFmD1RBpbExbi8vU7BJdH8VAZYovR8DMt0PNNDM7k8w==", + "version": "16.5.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.5.0.tgz", + "integrity": "sha512-QxZH0nmDTnTTVI0YDm4RUlaUPl5dcyn62G5TMDNfMmTW+J1u1v9gCR8WR+WZ6UghAa7nKJjDOFaI00eMMWvJFQ==", "requires": { - "abab": "^2.0.3", - "acorn": "^7.1.1", + "abab": "^2.0.5", + "acorn": "^8.0.5", "acorn-globals": "^6.0.0", "cssom": "^0.4.4", - "cssstyle": "^2.2.0", + "cssstyle": "^2.3.0", "data-urls": "^2.0.0", - "decimal.js": "^10.2.0", + "decimal.js": "^10.2.1", "domexception": "^2.0.1", - "escodegen": "^1.14.1", + "escodegen": "^2.0.0", "html-encoding-sniffer": "^2.0.1", "is-potential-custom-element-name": "^1.0.0", "nwsapi": "^2.2.0", - "parse5": "5.1.1", + "parse5": "6.0.1", "request": "^2.88.2", - "request-promise-native": "^1.0.8", - "saxes": "^5.0.0", + "request-promise-native": "^1.0.9", + "saxes": "^5.0.1", "symbol-tree": "^3.2.4", - "tough-cookie": "^3.0.1", + "tough-cookie": "^4.0.0", "w3c-hr-time": "^1.0.2", "w3c-xmlserializer": "^2.0.0", "webidl-conversions": "^6.1.0", "whatwg-encoding": "^1.0.5", "whatwg-mimetype": "^2.3.0", "whatwg-url": "^8.0.0", - "ws": "^7.2.3", + "ws": "^7.4.4", "xml-name-validator": "^3.0.0" + }, + "dependencies": { + "acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==" + } } }, "jsesc": { @@ -10643,24 +10634,6 @@ "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" }, - "json-schema-compare": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/json-schema-compare/-/json-schema-compare-0.2.2.tgz", - "integrity": "sha512-c4WYmDKyJXhs7WWvAWm3uIYnfyWFoIp+JEoX34rctVvEkMYCPGhXtvmFFXiffBbxfZsvQ0RNnV5H7GvDF5HCqQ==", - "requires": { - "lodash": "^4.17.4" - } - }, - "json-schema-merge-allof": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/json-schema-merge-allof/-/json-schema-merge-allof-0.6.0.tgz", - "integrity": "sha512-LEw4VMQVRceOPLuGRWcxW5orTTiR9ZAtqTAe4rQUjNADTeR81bezBVFa0MqIwp0YmHIM1KkhSjZM7o+IQhaPbQ==", - "requires": { - "compute-lcm": "^1.1.0", - "json-schema-compare": "^0.2.2", - "lodash": "^4.17.4" - } - }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -10698,11 +10671,6 @@ "universalify": "^2.0.0" } }, - "jsonpointer": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.1.0.tgz", - "integrity": "sha512-CXcRvMyTlnR53xMcKnuMzfCA5i/nfblTnnr74CZb6C4vG39eu6w51t7nKmU5MfLfbTgGItliNyjO/ciNPDqClg==" - }, "jsonwebtoken": { "version": "8.5.1", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", @@ -11039,6 +11007,13 @@ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "requires": { "yallist": "^4.0.0" + }, + "dependencies": { + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } } }, "lru-queue": { @@ -11064,13 +11039,6 @@ "requires": { "pify": "^4.0.1", "semver": "^5.6.0" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - } } }, "makeerror": { @@ -11302,6 +11270,13 @@ "integrity": "sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg==", "requires": { "yallist": "^4.0.0" + }, + "dependencies": { + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } } }, "minipass-collect": { @@ -11318,6 +11293,21 @@ "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", "requires": { "minipass": "^3.0.0" + }, + "dependencies": { + "minipass": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.3.tgz", + "integrity": "sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg==", + "requires": { + "yallist": "^4.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } } }, "minipass-pipeline": { @@ -11335,6 +11325,13 @@ "requires": { "minipass": "^3.0.0", "yallist": "^4.0.0" + }, + "dependencies": { + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } } }, "mississippi": { @@ -11470,11 +11467,6 @@ "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", "optional": true }, - "nanoid": { - "version": "2.1.11", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-2.1.11.tgz", - "integrity": "sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA==" - }, "nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", @@ -11512,9 +11504,9 @@ "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" }, "neo-async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", - "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==" + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" }, "next-tick": { "version": "1.0.0", @@ -11608,6 +11600,15 @@ "which": "^2.0.2" }, "dependencies": { + "semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "optional": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, "uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -11857,9 +11858,9 @@ } }, "open": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/open/-/open-7.3.0.tgz", - "integrity": "sha512-mgLwQIx2F/ye9SmbrUkurZCnkoXyXyu9EbHtJZrICjVAJfyMArdHp3KkixGdZx1ZHFPNIwl0DDM1dFFqXbTLZw==", + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", + "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", "requires": { "is-docker": "^2.0.0", "is-wsl": "^2.1.1" @@ -11963,9 +11964,9 @@ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" }, "pako": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz", - "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==" + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" }, "parallel-transform": { "version": "1.2.0", @@ -12038,9 +12039,9 @@ } }, "parse5": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz", - "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==" + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==" }, "parseurl": { "version": "1.3.3", @@ -13524,6 +13525,11 @@ "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" }, + "queue-microtask": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.2.tgz", + "integrity": "sha512-dB15eXv3p2jDlbOiNLyMabYg1/sXvppd8DP2J3EOCQ0AkuSXCW2tP7mnVouVLJKgUMY6yP0kcQDVpLCN13h4Xg==" + }, "raf": { "version": "3.4.1", "resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz", @@ -13943,6 +13949,19 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==" }, + "globby": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.1.tgz", + "integrity": "sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ==", + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" + } + }, "immer": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/immer/-/immer-8.0.1.tgz", @@ -13995,25 +14014,21 @@ "integrity": "sha512-zvU6iouW+SWwHTyThwxGICjJYCMZFk/6r/+jmOdC7ntQoPlS/Pqb81MkxaMf2bHTSq9TN3K3zX2/ayMW/jCtyA==" }, "react-dnd": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/react-dnd/-/react-dnd-13.1.1.tgz", - "integrity": "sha512-oxQW8846omV1l3Pm2zY/atvNxryx+blW1rxnSmoGvFMgmxXpOHulaXrlXgxRH+OLRvLt2cfVTSxZ4ykbzBypaw==", + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/react-dnd/-/react-dnd-14.0.2.tgz", + "integrity": "sha512-JoEL78sBCg8SzjOKMlkR70GWaPORudhWuTNqJ56lb2P8Vq0eM2+er3ZrMGiSDhOmzaRPuA9SNBz46nHCrjn11A==", "requires": { "@react-dnd/invariant": "^2.0.0", "@react-dnd/shallowequal": "^2.0.0", - "dnd-core": "12.0.1", + "dnd-core": "14.0.0", + "fast-deep-equal": "^3.1.3", "hoist-non-react-statics": "^3.3.2" }, "dependencies": { - "dnd-core": { - "version": "12.0.1", - "resolved": "https://registry.npmjs.org/dnd-core/-/dnd-core-12.0.1.tgz", - "integrity": "sha512-KzfKXQM9t9uSBO7DFmrILVgXUCShpY3/MbnLPF9/wg1Wcvq2KblbeT72GhjcrplS9cz0DFXilE1NXy43n8plag==", - "requires": { - "@react-dnd/asap": "^4.0.0", - "@react-dnd/invariant": "^2.0.0", - "redux": "^4.0.5" - } + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "hoist-non-react-statics": { "version": "3.3.2", @@ -14026,11 +14041,11 @@ } }, "react-dnd-html5-backend": { - "version": "12.1.1", - "resolved": "https://registry.npmjs.org/react-dnd-html5-backend/-/react-dnd-html5-backend-12.1.1.tgz", - "integrity": "sha512-cQZgfuSGQEwHdvdoPtfUOvcrS8rye/V0hU046LjY/BLSgcrdjtQVviE2d/81QQaeJpvK00JizctsZqVY7IvHgA==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/react-dnd-html5-backend/-/react-dnd-html5-backend-14.0.0.tgz", + "integrity": "sha512-2wAQqRFC1hbRGmk6+dKhOXsyQQOn3cN8PSZyOUeOun9J8t3tjZ7PS2+aFu7CVu2ujMDwTJR3VTwZh8pj2kCv7g==", "requires": { - "dnd-core": "12.0.1" + "dnd-core": "14.0.0" } }, "react-dom": { @@ -14348,6 +14363,11 @@ "is-core-module": "^2.0.0", "path-parse": "^1.0.6" } + }, + "semver": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", + "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==" } } }, @@ -14527,12 +14547,26 @@ } }, "redux": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/redux/-/redux-4.0.5.tgz", - "integrity": "sha512-VSz1uMAH24DM6MF72vcojpYPtrTUu3ByVWfPL1nPfVRb5mZVTve5GnNCUV53QM/BZ66xfWrm0CTWoM+Xlz8V1w==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/redux/-/redux-4.1.0.tgz", + "integrity": "sha512-uI2dQN43zqLWCt6B/BMGRMY6db7TTY4qeHHfGeKb3EOhmOKjU3KdWvNLJyqaHRksv/ErdNH7cFZWg9jXtewy4g==", "requires": { - "loose-envify": "^1.4.0", - "symbol-observable": "^1.2.0" + "@babel/runtime": "^7.9.2" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.14.0.tgz", + "integrity": "sha512-JELkvo/DlpNdJ7dlyw/eY7E0suy5i5GQH+Vlxaq1nsNJ+H7f4Vtv3jMeCEgRhZZQFXTjldYfQgv2qmM6M1v5wA==", + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "regenerator-runtime": { + "version": "0.13.7", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", + "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==" + } } }, "redux-immutable": { @@ -15048,9 +15082,12 @@ "integrity": "sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA==" }, "run-parallel": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.10.tgz", - "integrity": "sha512-zb/1OuZ6flOlH6tQyMPUrE3x3Ulxjlo9WIVXR4yVYi4H9UXQaeIsPbLn2R3O3vQCnDKkAl2qHiuocKKX4Tz/Sw==" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "requires": { + "queue-microtask": "^1.2.2" + } }, "run-queue": { "version": "1.0.3", @@ -15260,6 +15297,14 @@ "ajv": "^6.12.5", "ajv-keywords": "^3.5.2" } + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "requires": { + "lru-cache": "^6.0.0" + } } } }, @@ -15333,9 +15378,9 @@ } }, "semver": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", - "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==" + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" }, "send": { "version": "0.17.1", @@ -15385,9 +15430,12 @@ } }, "serialize-error": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-2.1.0.tgz", - "integrity": "sha1-ULZ51WNc34Rme9yOWa9OW4HV9go=" + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-8.1.0.tgz", + "integrity": "sha512-3NnuWfM6vBYoy5gZFvHiYsVbafvI9vZv/+jlIigFn4oP4zjNPK3LhcY0xSCgeb1a5L8jO71Mit9LlNoi2UfDDQ==", + "requires": { + "type-fest": "^0.20.2" + } }, "serialize-javascript": { "version": "5.0.1", @@ -15537,14 +15585,6 @@ "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==", "optional": true }, - "shortid": { - "version": "2.2.16", - "resolved": "https://registry.npmjs.org/shortid/-/shortid-2.2.16.tgz", - "integrity": "sha512-Ugt+GIZqvGXCIItnsL+lvFJOiN7RYqlGy7QE41O3YC1xbNSeDGIRO7xg2JJXIAj1cAGnOeC1r7/T9pgrtQbv4g==", - "requires": { - "nanoid": "^2.1.0" - } - }, "side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -15927,6 +15967,21 @@ "integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==", "requires": { "minipass": "^3.1.1" + }, + "dependencies": { + "minipass": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.3.tgz", + "integrity": "sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg==", + "requires": { + "yallist": "^4.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } } }, "stable": { @@ -16360,11 +16415,11 @@ } }, "swagger-ui-react": { - "version": "3.47.1", - "resolved": "https://registry.npmjs.org/swagger-ui-react/-/swagger-ui-react-3.47.1.tgz", - "integrity": "sha512-KPfhRE3kJnN9/yKrPIvKNrZYzGxSLQOEc0gVUlYXrMh6iQ5rR/fW8s9xXCV0ivOOvhvr09LQ5H3ZjwAIbvUHoA==", + "version": "3.48.0", + "resolved": "https://registry.npmjs.org/swagger-ui-react/-/swagger-ui-react-3.48.0.tgz", + "integrity": "sha512-39cibLdJYeujP5CAzBg+LiNFyIuHomi4Blru/1hyFyiTkFx9yYGvcFpZrKFKq1Me4GSUCQJ1DzUyUMblo+VFcA==", "requires": { - "@babel/runtime-corejs3": "^7.13.10", + "@babel/runtime-corejs3": "^7.13.17", "@braintree/sanitize-url": "^5.0.0", "@kyleshockey/object-assign-deep": "^0.4.2", "@kyleshockey/xml": "^1.0.2", @@ -16372,7 +16427,7 @@ "classnames": "^2.3.1", "css.escape": "1.5.1", "deep-extend": "0.6.0", - "dompurify": "^2.2.7", + "dompurify": "^2.2.8", "ieee754": "^1.2.1", "immutable": "^3.x.x", "js-file-download": "^0.4.12", @@ -16393,7 +16448,7 @@ "redux-immutable": "3.1.0", "remarkable": "^2.0.1", "reselect": "^4.0.0", - "serialize-error": "^2.1.0", + "serialize-error": "^8.1.0", "sha.js": "^2.4.11", "swagger-client": "^3.13.2", "url-parse": "^1.5.1", @@ -16402,9 +16457,9 @@ }, "dependencies": { "@babel/runtime-corejs3": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.13.10.tgz", - "integrity": "sha512-x/XYVQ1h684pp1mJwOV4CyvqZXqbc8CMsMGUnAbuc82ZCdv1U63w5RSUzgDSXQHG5Rps/kiksH6g2D5BuaKyXg==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.14.0.tgz", + "integrity": "sha512-0R0HTZWHLk6G8jIk0FtoX+AatCtKnswS98VhXwGImFc759PJRp4Tru0PQYZofyijTFUr+gT8Mu7sgXVJLQ0ceg==", "requires": { "core-js-pure": "^3.0.0", "regenerator-runtime": "^0.13.4" @@ -16499,10 +16554,20 @@ "yallist": "^4.0.0" }, "dependencies": { + "chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==" + }, "mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" } } }, @@ -16799,13 +16864,20 @@ "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" }, "tough-cookie": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-3.0.1.tgz", - "integrity": "sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", + "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", "requires": { - "ip-regex": "^2.1.0", - "psl": "^1.1.28", - "punycode": "^2.1.1" + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.1.2" + }, + "dependencies": { + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + } } }, "tr46": { @@ -16873,6 +16945,13 @@ "integrity": "sha512-RYbuQuvkhuqVeXweWT3tJLKOEJ/UUw9GjNEZGWdrLLlM+611o1gwLHBpxoFJKKl25fLprp2eVthtKs5JOrNeXg==", "requires": { "tslib": "^1.8.1" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + } } }, "tty-browserify": { @@ -16911,6 +16990,11 @@ "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==" }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==" + }, "type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", @@ -17177,9 +17261,9 @@ } }, "url-parse": { - "version": "1.4.7", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.7.tgz", - "integrity": "sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.1.tgz", + "integrity": "sha512-HOfCOUJt7iSYzEx/UqgtwKRMC6EU91NFhsCHMv9oM03VJcVo2Qrp8T8kI9D7amFf1cu+/3CEhgb3rF9zL7k85Q==", "requires": { "querystringify": "^2.1.1", "requires-port": "^1.0.0" @@ -17258,9 +17342,9 @@ "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==" }, "v8-compile-cache": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz", - "integrity": "sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q==" + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==" }, "v8-to-istanbul": { "version": "7.1.0", @@ -17288,38 +17372,6 @@ "spdx-expression-parse": "^3.0.0" } }, - "validate.io-array": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/validate.io-array/-/validate.io-array-1.0.6.tgz", - "integrity": "sha1-W1osr9j4uFq7L4hroVPy2Tond00=" - }, - "validate.io-function": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/validate.io-function/-/validate.io-function-1.0.2.tgz", - "integrity": "sha1-NDoZgC7TsZaCaceA5VjpNBHAutc=" - }, - "validate.io-integer": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/validate.io-integer/-/validate.io-integer-1.0.5.tgz", - "integrity": "sha1-FoSWSAuVviJH7EQ/IjPeT4mHgGg=", - "requires": { - "validate.io-number": "^1.0.3" - } - }, - "validate.io-integer-array": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/validate.io-integer-array/-/validate.io-integer-array-1.0.0.tgz", - "integrity": "sha1-LKveAzKTpry+Bj/q/pHq9GsToIk=", - "requires": { - "validate.io-array": "^1.0.3", - "validate.io-integer": "^1.0.4" - } - }, - "validate.io-number": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/validate.io-number/-/validate.io-number-1.0.3.tgz", - "integrity": "sha1-9j/+2iSL8opnqNSODjtGGhZluvg=" - }, "value-equal": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/value-equal/-/value-equal-1.0.1.tgz", @@ -17701,11 +17753,6 @@ "y18n": "^4.0.0" } }, - "chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" - }, "eslint-scope": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", @@ -17854,11 +17901,6 @@ "is-number": "^3.0.0", "repeat-string": "^1.6.1" } - }, - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" } } }, @@ -18585,9 +18627,9 @@ } }, "ws": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.0.tgz", - "integrity": "sha512-kyFwXuV/5ymf+IXhS6f0+eAFvydbaBW3zjpT6hUdAh/hbVjTIB5EHBGi0bPoCLSK2wcuz3BrEkB9LrYv1Nm4NQ==" + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.4.tgz", + "integrity": "sha512-Qm8k8ojNQIMx7S+Zp8u/uHOx7Qazv3Yv4q68MiWWWOJhiwG5W3x7iqmRtJo8xxrciZUY4vRxUTJCKuRnF28ZZw==" }, "xml-but-prettier": { "version": "1.0.1", @@ -18618,9 +18660,9 @@ "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" }, "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" }, "yaml": { "version": "1.10.0", diff --git a/package.json b/package.json index 775dc24..c0a5d39 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,6 @@ "@fortawesome/fontawesome-svg-core": "^1.2.35", "@fortawesome/free-solid-svg-icons": "^5.15.3", "@fortawesome/react-fontawesome": "^0.1.14", - "@rjsf/core": "^2.5.1", "babel-runtime": "^6.26.0", "bootstrap": "^4.6.0", "classnames": "^2.3.1", @@ -39,8 +38,8 @@ "react-collapse": "^5.1.0", "react-color": "^2.19.3", "react-contexify": "^5.0.0", - "react-dnd": "^13.1.1", - "react-dnd-html5-backend": "^12.1.1", + "react-dnd": "^14.0.2", + "react-dnd-html5-backend": "^14.0.0", "react-dom": "^17.0.2", "react-fullscreenable": "^2.5.1-0", "react-grid-system": "^7.1.2", @@ -52,7 +51,7 @@ "react-svg-pan-zoom": "^3.10.0", "react-trafficlight": "^5.2.1", "superagent": "^6.1.0", - "swagger-ui-react": "^3.47.1", + "swagger-ui-react": "^3.48.0", "typescript": "^4.2.4" }, "devDependencies": {}, diff --git a/public/index.html b/public/index.html index 47e21e6..a223e54 100644 --- a/public/index.html +++ b/public/index.html @@ -3,7 +3,7 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + SLEW + + + + + + diff --git a/src/branding/slew/img/slew_logo.png b/src/branding/slew/img/slew_logo.png new file mode 100644 index 0000000..6ed12c6 Binary files /dev/null and b/src/branding/slew/img/slew_logo.png differ diff --git a/src/branding/slew/img/slew_magenta.svg b/src/branding/slew/img/slew_magenta.svg new file mode 100644 index 0000000..b5b5386 --- /dev/null +++ b/src/branding/slew/img/slew_magenta.svg @@ -0,0 +1,1057 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + SLEW + + + + + + diff --git a/src/branding/slew/slew-functions.js b/src/branding/slew/slew-functions.js new file mode 100644 index 0000000..0c4cff3 --- /dev/null +++ b/src/branding/slew/slew-functions.js @@ -0,0 +1,66 @@ +/** + * This file is part of VILLASweb. + * + * VILLASweb is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * VILLASweb is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with VILLASweb. If not, see . + ******************************************************************************/ +import React from 'react'; +import './slew.css' + + +export function slew_home() { + return ( +
+

Home

+

+ Welcome to SLEW! +

+

SLEW is a learning platform for running experiments in a virtual power engineering world. + The platform enables interaction with the experiments in real time and performing analysis on the experimental results.

+ +

The motivation behind SLEW is the ongoing transformation of the energy system, which is making the system more and more complex. + Hence, understanding new phenomena and underlying interactions is getting more challenging, also because real experimental + activities for obtaining a better understanding are not possible for obvious reasons of security and safety.

+ +

The SLEW platform gives the possibility to perform experiments in a virtual infrastructure and to learn from the execution + of complex models. It provides a virtual power engineering world where complex phenomena take place while users can interact + with the system in real time.

+ +

The platform is based on the real-time simulation tool DPsim developed in RWTH, + which is available as open-source software project to the power engineering community. Besides, it integrates the interactive + computing environment Jupyter for further analysis of experimental results.

+ +

Contacts

+ + +

Credits

+
+ Logo EONERC + Logo Erigrid + Logo EU +
+
) +} + +export function slew_welcome() { + return ( +
+

Welcome!

+

SLEW is a learning platform for running experiments in a virtual power engineering world. + The platform enables to interact with the experiments in real time and perform analyses on the experimental results.

+
) +} \ No newline at end of file diff --git a/src/branding/slew/slew-values.js b/src/branding/slew/slew-values.js new file mode 100644 index 0000000..1a7c323 --- /dev/null +++ b/src/branding/slew/slew-values.js @@ -0,0 +1,44 @@ +/** + * This file is part of VILLASweb. + * + * VILLASweb is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * VILLASweb is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with VILLASweb. If not, see . + ******************************************************************************/ + +const slew_values = { + title: 'SLEW', + subtitle: 'Second Life for Energiewende', + icon: "slew_blue.png", + logo: "slew_logo.png", + pages: { + home: true, + scenarios: true, + infrastructure: false, + account: false, + api: false + }, + links: { + "DPsim Simulator": "https://dpsim.fein-aachen.org", + "VILLASframework": "https://villas.fein-aachen.org/doc" + }, + style: { + background: 'rgba(207,209,210, 1)', + highlights: 'rgba(0,84,159, 0.75)', + maincolor: 'rgba(80,80,80, 1)', + secondarytext: 'rgba(80,80,80, 0.9)', + font: "16px Roboto, sans-serif", + borderradius: "10px" + } +} + +export default slew_values; \ No newline at end of file diff --git a/src/branding/slew/slew.css b/src/branding/slew/slew.css new file mode 100644 index 0000000..c8f2ddf --- /dev/null +++ b/src/branding/slew/slew.css @@ -0,0 +1,4 @@ +#images { + margin-left: 2em; + margin-right: 2em +} \ No newline at end of file diff --git a/src/branding/template/img/template_logo.svg b/src/branding/template/img/template_logo.svg new file mode 100644 index 0000000..6d7f29c --- /dev/null +++ b/src/branding/template/img/template_logo.svg @@ -0,0 +1,109 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/src/branding/template/template-functions.js b/src/branding/template/template-functions.js new file mode 100644 index 0000000..d6b8d58 --- /dev/null +++ b/src/branding/template/template-functions.js @@ -0,0 +1,52 @@ +/** + * This file is part of VILLASweb. + * + * VILLASweb is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * VILLASweb is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with VILLASweb. If not, see . + ******************************************************************************/ + import React from 'react'; + + + export function template_home() { + return ( +
+ Template Logo +

Home

+

+ Welcome to BRAND! +

+

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut + labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. + Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

+ +

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore + et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. + Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

+
) + } + + export function template_welcome() { + return ( +
+

Welcome!

+

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut + labore et dolore magna aliquyam erat, sed diam voluptua.

+
) + } + + export function template_footer() { + return ( +
+

HELLO WORLD, THIS IS MY FOOTER!

+
) + } \ No newline at end of file diff --git a/src/config.js b/src/branding/template/template-values.js similarity index 53% rename from src/config.js rename to src/branding/template/template-values.js index bdcc841..6eb7215 100644 --- a/src/config.js +++ b/src/branding/template/template-values.js @@ -15,18 +15,30 @@ * along with VILLASweb. If not, see . ******************************************************************************/ -const config = { - publicPathBase: 'public/', - instance: 'VILLASweb', - subtitle: 'ACS', - admin: { - name: 'Institute for Automation of Complex Power Systems (ACS), RWTH Aachen University, Germany', - mail: 'stvogel@eonerc.rwth-aachen.de' + const template_values = { + title: 'Template', + subtitle: 'change me!', + icon: "template_logo.svg", + pages: { + home: true, + scenarios: true, + infrastructure: true, + users: true, + account: true, + api: true }, - externalAuth: true, - loginURL: '/oauth2/start?rd=/login/complete', - provider: 'Jupyter', - disableVillasLogin: false, -}; - -export default config + links: { + "Google": "https://www.google.com/", + "StackOverFlow": "https://stackoverflow.com/" + }, + style: { + background: 'rgba(50,30,90, 0.6)', + highlights: 'rgba(0,230,5, 0.75)', + maincolor: 'rgba(255,0,0, 1)', + secondarytext: 'rgba(0,0,100, 0.8)', + font: "16px Comic Sans, sans-serif", + borderradius: "60px" + } + } + + export default template_values; \ No newline at end of file diff --git a/src/img/datamodel.png b/src/branding/villasweb/img/datamodel.png similarity index 100% rename from src/img/datamodel.png rename to src/branding/villasweb/img/datamodel.png diff --git a/src/branding/villasweb/img/eonerc_rwth.svg b/src/branding/villasweb/img/eonerc_rwth.svg new file mode 100644 index 0000000..42c4c3f --- /dev/null +++ b/src/branding/villasweb/img/eonerc_rwth.svg @@ -0,0 +1,152 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/src/branding/villasweb/img/erigrid2.png b/src/branding/villasweb/img/erigrid2.png new file mode 100644 index 0000000..0c19b4c Binary files /dev/null and b/src/branding/villasweb/img/erigrid2.png differ diff --git a/src/branding/villasweb/img/european_commission.svg b/src/branding/villasweb/img/european_commission.svg new file mode 100644 index 0000000..5bf4867 --- /dev/null +++ b/src/branding/villasweb/img/european_commission.svg @@ -0,0 +1,272 @@ + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/img/jara.svg b/src/branding/villasweb/img/jara.svg similarity index 100% rename from src/img/jara.svg rename to src/branding/villasweb/img/jara.svg diff --git a/src/img/reserve.svg b/src/branding/villasweb/img/reserve.svg similarity index 100% rename from src/img/reserve.svg rename to src/branding/villasweb/img/reserve.svg diff --git a/src/img/uel.png b/src/branding/villasweb/img/uel.png similarity index 100% rename from src/img/uel.png rename to src/branding/villasweb/img/uel.png diff --git a/src/img/uel_efre.jpeg b/src/branding/villasweb/img/uel_efre.jpeg similarity index 100% rename from src/img/uel_efre.jpeg rename to src/branding/villasweb/img/uel_efre.jpeg diff --git a/src/branding/villasweb/img/villas_web.svg b/src/branding/villasweb/img/villas_web.svg new file mode 100644 index 0000000..ccbc714 --- /dev/null +++ b/src/branding/villasweb/img/villas_web.svg @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/src/branding/villasweb/villasweb-functions.js b/src/branding/villasweb/villasweb-functions.js new file mode 100644 index 0000000..5f78f50 --- /dev/null +++ b/src/branding/villasweb/villasweb-functions.js @@ -0,0 +1,91 @@ +/** + * This file is part of VILLASweb. + * + * VILLASweb is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * VILLASweb is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with VILLASweb. If not, see . + ******************************************************************************/ +import React from 'react'; +import { Button } from 'react-bootstrap'; +import { NavLink } from 'react-router-dom'; + + +export function villasweb_welcome() { + let url = 'https://villas.fein-aachen.org/doc/web.html'; + return ( +
+

Welcome!

+

VILLASweb is a tool to configure real-time co-simulations and display simulation real-time data. + It enables the management and monitoring of simulators, models and simulations.

+ + + +
) +} + +export function villasweb_home(title, username, userid, role) { + return ( +
+ Logo VILLASweb +

Home

+

+ Welcome to {title}! +

+

+ You are logged in as user {username} with ID {userid} and role {role}. +

+

Credits

+

VILLASweb is an open source project developed by the Institute for Automation of Complex Power Systems at RWTH Aachen University.

+ Logo ACS + +

Links

+ +

Funding

+

The development of VILLASframework projects has received funding from

+
    +

    SLEW: Second Life for Energiewende, an Exploratory Teaching Space project funded by RWTH Aachen University

    +

    ERIgrid 2.0: An EU Horizon 2020 research and innovation action project for connecting European Smart Grid Infrastructures (grant agreement No 870620)

    +

    + Logo EU + Logo ERIgrid 2.0 +

    +

    Urban Energy Lab 4.0: A project funded by EFRE.NRW (European Regional Development Fund) for the setup of a novel energy research infrastructure.

    +

    + Logo UEL OP EFRE NRW + Logo UEL +

    +

    RESERVE: An EU Horizon 2020 research and innovation project (grant agreement No 727481)

    +

    + Logo EU + Logo RESERVE +

    +

    JARA-ENERGY: Jülich-Aachen Research Alliance (JARA) is an initiative of RWTH Aachen University and Forschungszentrum Jülich.

    +
+
) +} + +export function villasweb_footer() { + return ( + + ); +} \ No newline at end of file diff --git a/src/common/footer.js b/src/branding/villasweb/villasweb-values.js similarity index 64% rename from src/common/footer.js rename to src/branding/villasweb/villasweb-values.js index 534a18a..2b0fdf5 100644 --- a/src/common/footer.js +++ b/src/branding/villasweb/villasweb-values.js @@ -15,16 +15,23 @@ * along with VILLASweb. If not, see . ******************************************************************************/ -import React, { Component } from 'react'; - -class Footer extends Component { - render() { - return ( - - ); - } +const villasweb_values = { + title: 'VILLASweb', + subtitle: 'ACS', + logo: 'villas_web.svg', + pages: { + home: true, + scenarios: true, + infrastructure: true, + account: true, + api: true, + }, + style: { + background: '#6EA2B0', + highlights: '#527984', + maincolor: '#4d4d4d', + secondarytext: '#818181', + } } -export default Footer; +export default villasweb_values; \ No newline at end of file diff --git a/src/dashboard/new-dashboard.js b/src/common/dialogs/new-dialog.js similarity index 68% rename from src/dashboard/new-dashboard.js rename to src/common/dialogs/new-dialog.js index 5cc8a3e..8c7b44f 100644 --- a/src/dashboard/new-dashboard.js +++ b/src/common/dialogs/new-dialog.js @@ -18,49 +18,47 @@ import React from 'react'; import { Form } from 'react-bootstrap'; -import Dialog from '../common/dialogs/dialog'; - -class NewDashboardDialog extends React.Component { - valid: false; +import Dialog from './dialog'; +class NewDialog extends React.Component { constructor(props) { super(props); this.state = { - name: '' + value: '' } } onClose(canceled) { if (canceled === false) { - if (this.valid) { - this.props.onClose(this.state); - } + this.props.onClose(this.state); } else { this.props.onClose(); } } handleChange(e) { + console.log(e) + this.setState({ [e.target.id]: e.target.value }); } resetState() { - this.setState({ name: '' }); + this.setState({ value: '' }); } validateForm(target) { // check all controls - var name = true; + var inputGiven = true; - if (this.state.name === '') { - name = false; + if (this.state.value === '') { + inputGiven = false; } - this.valid = name; + this.valid = inputGiven; // return state to control - if (target === 'name') return name ? "success" : "error"; + if (target === 'value') return inputGiven ? "success" : "error"; return "success"; } @@ -68,17 +66,18 @@ class NewDashboardDialog extends React.Component { render() { return ( this.onClose(c)} onReset={() => this.resetState()} valid={this.valid} >
- - Name - this.handleChange(e)} /> + + {this.props.inputLabel} + this.handleChange(e)} /> @@ -87,4 +86,4 @@ class NewDashboardDialog extends React.Component { } } -export default NewDashboardDialog; +export default NewDialog; diff --git a/src/common/header.js b/src/common/header.js index c305d5f..a01575e 100644 --- a/src/common/header.js +++ b/src/common/header.js @@ -16,19 +16,25 @@ ******************************************************************************/ import React from 'react'; -import { Col, Button } from 'react-bootstrap'; -import { Hidden } from 'react-grid-system' -import Icon from './icon'; -import config from '../config'; +import branding from '../branding/branding'; class Header extends React.Component { render() { + let hasSubtitle = branding.getSubtitle(); return ( -
-

{config.instance} - {config.subtitle}

+
+ { hasSubtitle ? +
+

{branding.getTitle()} - {branding.getSubtitle()}

+ : +
+

{branding.getTitle()}

+
+ } +
); } } -export default Header; +export default Header; \ No newline at end of file diff --git a/src/common/home.js b/src/common/home.js index 20d8ff2..1abc7be 100644 --- a/src/common/home.js +++ b/src/common/home.js @@ -17,9 +17,9 @@ import React from 'react'; -import config from '../config'; import { Redirect } from "react-router-dom"; -import { NavLink } from 'react-router-dom'; +import branding from '../branding/branding'; + class Home extends React.Component { @@ -31,101 +31,16 @@ class Home extends React.Component { } render() { - let currentUser = JSON.parse(localStorage.getItem("currentUser")); - if (currentUser == null){ + if (currentUser == null) { console.log("HOME redirecting to logout/ login") return (); } return ( -
- Logo VILLASweb -

Home

-

- {/*Welcome to {config.instance} hosted by {config.admin.name}!
*/} - Welcome to {config.instance}! -

-

- You are logged in as user {currentUser.username} with ID {currentUser.id} and role {currentUser.role}. -

- - - {/*

Data Model

- Datamodel VILLASweb - -

Terminology

- -
Infrastructure Component
-
    -
  • A component of research infrastructure
  • -
  • Category: for example simulator, gateway, amplifier, database, etc.
  • -
  • Type: for example RTDS, OpalRT, VILLASnode, Cassandra
  • -
- -
Component Configuration
-
    -
  • Input signals: Signals that can be modified in VILLASweb
  • -
  • Output signals: Signals that can be visualized on dashboards of VILLASweb
  • -
  • Parameters: Further configuration parameters of the infrastructure component
  • -
- -
Dashboard
-
    -
  • Visualize ongoing experiments in real-time
  • -
  • Interact with ongoing experiments in real-time
  • -
- -
Scenario
-
    -
  • A collection of component configurations and dashboards for a specific experiment
  • -
  • Users can have access to multiple scenarios
  • -
*/} - -

Credits

-

VILLASweb is an open source project developed by the Institute for Automation of Complex Power Systems at RWTH Aachen University.

- Logo ACS - -

Links

- -

Funding

-

The development of VILLASframework projects has received funding from

-
    -

    SLEW: Second Life for Energiewende, an Exploratory Teaching Space project funded by RWTH Aachen University

    -

    ERIgrid 2.0: An EU Horizon 2020 research and innovation action project for connecting European Smart Grid Infrastructures (grant agreement No 870620)

    -

    - Logo EU - Logo ERIgrid 2.0 -

    -

    Urban Energy Lab 4.0: A project funded by EFRE.NRW (European Regional Development Fund) for the setup of a novel energy research infrastructure.

    -

    - Logo UEL OP EFRE NRW - Logo UEL -

    -

    RESERVE: An EU Horizon 2020 research and innovation project (grant agreement No 727481)

    -

    - Logo EU - Logo RESERVE -

    -

    JARA-ENERGY: Jülich-Aachen Research Alliance (JARA) is an initiative of RWTH Aachen University and Forschungszentrum Jülich.

    -
- - - - { - //Logo JARA - } -
- ); +
+ {branding.getHome(currentUser.username, currentUser.id, currentUser.role)} +
); } } diff --git a/src/common/icon-button.js b/src/common/icon-button.js index 2a65b95..438b206 100644 --- a/src/common/icon-button.js +++ b/src/common/icon-button.js @@ -43,9 +43,9 @@ class IconButton extends React.Component { button = btn; } else { button = {this.props.tooltip}} > + overlay={{this.props.tooltip}} > {btn} } diff --git a/src/common/icon-toggle-button.js b/src/common/icon-toggle-button.js index e9adc8a..031caa3 100644 --- a/src/common/icon-toggle-button.js +++ b/src/common/icon-toggle-button.js @@ -28,9 +28,9 @@ class IconToggleButton extends React.Component { let tooltip = this.props.checked ? this.props.tooltipChecked : this.props.tooltipUnchecked; return {tooltip}} > + overlay={{tooltip}} > -

Menu

+ const values = branding.values; + let links = [] + if (values.links) { + Object.keys(values.links).forEach(key => { + links.push(
  • {key}
  • ); + }) + } + var logoStyle = { width: 110, margin: 'auto' }; + var logo = branding.getLogo(logoStyle); - {this.state.externalAuth ? -
      -
    • Home
    • -
    • Scenarios
    • -
    • Infrastructure
    • - { this.props.currentRole === 'Admin' ? + return ( +
      + { logo ? +
      + {logo} +
      + : '' + } +
      +

      Menu

      + + {this.state.externalAuth ? +
        + + + {this.props.currentRole === 'Admin' || values.pages.infrastructure ? +
      • Infrastructure
      • : '' + } + {this.props.currentRole === 'Admin' ?
      • Users
      • : '' - } -
      • Account
      • - Logout -
      • API Browser
      • -
      - :
        -
      • Home
      • -
      • Scenarios
      • -
      • Infrastructure
      • - { this.props.currentRole === 'Admin' ? -
      • Users
      • : '' + } + + Logout + +
      + :
        + + + {this.props.currentRole === 'Admin' || values.pages.infrastructure ? +
      • Infrastructure
      • : '' + } + {this.props.currentRole === 'Admin' ? +
      • Users
      • : '' + } + +
      • Logout
      • + +
      } + + { + links.length > 0 ? +
      +

      +

      Links

      +
        {links}
      +
      + : '' } -
    • Account
    • -
    • Logout
    • -
    • API Browser
    • -
    } + + + ); } diff --git a/src/common/table.js b/src/common/table.js index 8ea1579..614a49f 100644 --- a/src/common/table.js +++ b/src/common/table.js @@ -140,7 +140,7 @@ class CustomTable extends Component { cell.push( child.props.onChangeLock(index)} checked={isLocked} checkedIcon='lock' @@ -188,7 +188,7 @@ class CustomTable extends Component { cell.push( . ******************************************************************************/ -import React, {Component} from "react"; +import React, { Component } from "react"; import FileSaver from 'file-saver'; import IconButton from "../common/icon-button"; import Table from "../common/table"; import TableColumn from "../common/table-column"; +import NewDialog from "../common/dialogs/new-dialog"; import DeleteDialog from "../common/dialogs/delete-dialog"; import AppDispatcher from "../common/app-dispatcher"; import NotificationsDataManager from "../common/data-managers/notifications-data-manager"; @@ -37,21 +38,21 @@ class ConfigTable extends Component { editConfigModal: false, modalConfigData: {}, modalConfigIndex: 0, + newConfigModal: false, deleteConfigModal: false, importConfigModal: false, - newConfig: false, selectedConfigs: [], ExternalICInUse: false, - editOutputSignalsModal: false, - editInputSignalsModal: false, + editOutputSignalsModal: false, + editInputSignalsModal: false, } } - static getDerivedStateFromProps(props, state){ + static getDerivedStateFromProps(props, state) { let ExternalICInUse = false - for (let config of props.configs){ + for (let config of props.configs) { for (let component of props.ics) { if ((config.icID === component.id) && (component.managedexternally === true)) { ExternalICInUse = true; @@ -65,26 +66,27 @@ class ConfigTable extends Component { }; } - addConfig() { - const config = { - scenarioID: this.props.scenario.id, - name: 'New Component Configuration', - icID: this.props.ics.length > 0 ? this.props.ics[0].id : null, - startParameters: {}, - }; + closeNewConfigModal(data) { + this.setState({ newConfigModal: false }); - AppDispatcher.dispatch({ - type: 'configs/start-add', - data: config, - token: this.props.sessionToken - }); - - this.setState({ newConfig: true }); + if (data) { + const config = { + scenarioID: this.props.scenario.id, + name: data.value, + icID: this.props.ics.length > 0 ? this.props.ics[0].id : null, + startParameters: {}, + }; + AppDispatcher.dispatch({ + type: 'configs/start-add', + data: config, + token: this.props.sessionToken + }); + } } closeEditConfigModal(data) { - this.setState({ editConfigModal: false, newConfig: false }); + this.setState({ editConfigModal: false }); if (data) { AppDispatcher.dispatch({ @@ -312,27 +314,27 @@ class ConfigTable extends Component { {/*Component Configurations table*/}

    Component Configurations - this.addConfig()} - icon='plus' - disabled={this.props.locked} - hidetooltip={this.props.locked} - buttonStyle={buttonStyle} - iconStyle={iconStyle} - /> - this.setState({ importConfigModal: true })} - icon='upload' - disabled={this.props.locked} - hidetooltip={this.props.locked} - buttonStyle={buttonStyle} - iconStyle={iconStyle} - /> - + this.setState({ newConfigModal: true })} + icon='plus' + disabled={this.props.locked} + hidetooltip={this.props.locked} + buttonStyle={buttonStyle} + iconStyle={iconStyle} + /> + this.setState({ importConfigModal: true })} + icon='upload' + disabled={this.props.locked} + hidetooltip={this.props.locked} + buttonStyle={buttonStyle} + iconStyle={iconStyle} + /> +

    this.copyConfig(index)} - token = {this.props.sessionToken} + selectedConfigs={this.state.selectedConfigs} + snapshotConfig={(index) => this.copyConfig(index)} + token={this.props.sessionToken} actions={[ { id: '0', title: 'Start', data: { action: 'start' } }, { id: '1', title: 'Stop', data: { action: 'stop' } }, @@ -432,6 +434,13 @@ class ConfigTable extends Component { onClose={data => this.importConfig(data)} ics={this.props.ics} /> + this.closeNewConfigModal(data)} + /> Dashboards this.setState({newDashboardModal: true})} icon='plus' @@ -162,7 +162,7 @@ class DashboardTable extends Component { iconStyle={iconStyle} /> this.setState({importDashboardModal: true})} icon='upload' @@ -218,10 +218,14 @@ class DashboardTable extends Component { />
    - this.closeNewDashboardModal(data)} /> + this.setState({newModal: true})} icon='plus' + buttonStyle={buttonStyle} + iconStyle={iconStyle} /> this.setState({importModal: true})} icon='upload' + buttonStyle={buttonStyle} + iconStyle={iconStyle} /> : diff --git a/src/img/ajax-loader.gif b/src/img/ajax-loader.gif new file mode 100644 index 0000000..926ee54 Binary files /dev/null and b/src/img/ajax-loader.gif differ diff --git a/src/img/dog-waiting-bw.jpg b/src/img/dog-waiting-bw.jpg deleted file mode 100644 index 31c17ff..0000000 Binary files a/src/img/dog-waiting-bw.jpg and /dev/null differ diff --git a/src/result/new-result.js b/src/result/new-result.js deleted file mode 100644 index 2529d02..0000000 --- a/src/result/new-result.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * This file is part of VILLASweb. - * - * VILLASweb is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * VILLASweb is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with VILLASweb. If not, see . - ******************************************************************************/ - -import React from 'react'; -import { Form } from 'react-bootstrap'; - -import Dialog from '../common/dialogs/dialog'; - -class NewResultDialog extends React.Component { - - constructor(props) { - super(props); - - this.state = { - ConfigSnapshots: '', - Description: '', - ResultFileIDs: [], - } - } - - onClose(canceled) { - if (canceled === false) { - this.props.onClose(this.state); - } else { - this.props.onClose(); - } - } - - handleChange(e) { - this.setState({ [e.target.id]: e.target.value }); - } - - resetState() { - this.setState({ - ConfigSnapshots: '', - Description: '', - ResultFileIDs: [], - }); - } - - render() { - return ( - this.onClose(c)} - onReset={() => this.resetState()} - valid={true} - > -
    - - Description - this.handleChange(e)} /> - - -
    -
    - ); - } -} - -export default NewResultDialog; diff --git a/src/result/result-table.js b/src/result/result-table.js index a38d160..f50707c 100644 --- a/src/result/result-table.js +++ b/src/result/result-table.js @@ -26,7 +26,7 @@ import TableColumn from "../common/table-column"; import DeleteDialog from "../common/dialogs/delete-dialog"; import EditResultDialog from "./edit-result"; import ResultConfigDialog from "./result-configs-dialog"; -import NewResultDialog from "./new-result"; +import NewDialog from "../common/dialogs/new-dialog"; class ResultTable extends Component { @@ -79,10 +79,13 @@ class ResultTable extends Component { closeNewResultModal(data) { this.setState({ newResultModal: false }); if (data) { - data["scenarioID"] = this.props.scenario.id; + let newResult = { ConfigSnapshots: '', ResultFileIDs: [] }; + newResult["scenarioID"] = this.props.scenario.id; + newResult["Description"] = data.value; + AppDispatcher.dispatch({ type: 'results/start-add', - data, + data: newResult, token: this.props.sessionToken, }); } @@ -169,7 +172,7 @@ class ResultTable extends Component {

    Results this.setState({ newResultModal: true })} icon='plus' @@ -245,8 +248,11 @@ class ResultTable extends Component { resultNo={this.state.modalResultConfigsIndex} onClose={this.closeResultConfigSnapshots.bind(this)} /> - this.closeNewResultModal(data)} /> diff --git a/src/router.js b/src/router.js index 2834a04..98597ed 100644 --- a/src/router.js +++ b/src/router.js @@ -32,6 +32,7 @@ import User from "./user/user"; import LoginComplete from './user/login-complete' + class Root extends React.Component { render() { return ( diff --git a/src/scenario/scenario-users-table.js b/src/scenario/scenario-users-table.js index 26eb06f..2cefc5b 100644 --- a/src/scenario/scenario-users-table.js +++ b/src/scenario/scenario-users-table.js @@ -134,7 +134,7 @@ class ScenarioUsersTable extends Component { this.addUser()} icon='plus' diff --git a/src/scenario/scenario.js b/src/scenario/scenario.js index ac618d7..d9e9d4c 100644 --- a/src/scenario/scenario.js +++ b/src/scenario/scenario.js @@ -154,7 +154,7 @@ class Scenario extends React.Component { return
    this.onChangeLock()} checked={this.state.scenario.isLocked} checkedIcon='lock' diff --git a/src/scenario/scenarios.js b/src/scenario/scenarios.js index 89b52d9..51f8d3e 100644 --- a/src/scenario/scenarios.js +++ b/src/scenario/scenarios.js @@ -257,7 +257,7 @@ class Scenarios extends Component {

    Scenarios this.setState({ newModal: true })} icon='plus' @@ -265,7 +265,7 @@ class Scenarios extends Component { iconStyle={iconStyle} /> this.setState({ importModal: true })} icon='upload' diff --git a/src/styles/app.css b/src/styles/app.css index c1d3b53..29cb9b9 100644 --- a/src/styles/app.css +++ b/src/styles/app.css @@ -18,22 +18,36 @@ /** * Application container */ + +:root { + --bg: #eceded; + --highlights: #527984; + --secondarytext: #818181; + --borderradius: 0px; + --mainfont: 16px 'Helvetica Neue', Helvetica, Arial, sans-serif; + --maincolor: #4d4d4d; +} + +* { + color: var(--maincolor); +} + body { - background-color: #6EA2B0 !important; + background-color: var(--bg) !important; } .app { height: 100vh; - color: #4d4d4d; + color: var(--maincolor); + border-radius: var(--borderradius); - font: 16px 'Helvetica Neue', Helvetica, Arial, sans-serif; + + font: var(--mainfont); hyphens: auto; } .app-header { width: 100%; - - color: #527984; background-color: #fff; } @@ -42,6 +56,7 @@ body { margin: 0; width: 100%; text-align: center; + color: var(--highlights); } .btn-link { @@ -53,13 +68,11 @@ body { margin-top: 20px; padding-bottom: 10px; - + color: var(--secondarytext); text-align: center; } .app-footer a { - color: #4d4d4d; - text-decoration: underline; } @@ -73,6 +86,8 @@ body { .app-content { padding: 15px 20px 20px 20px; + border-radius: var(--borderradius); + width: auto; min-height: 300px; @@ -96,10 +111,30 @@ body { /** * Menus */ +.menucontainer { + float: left; + flex-direction: column; +} + .menu { padding: 20px; + margin-bottom: 20px; width: 160px; - float: left; + border-radius: var(--borderradius); + + + background-color: #fff; + box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), + 0 9px 18px 0 rgba(0, 0, 0, 0.1); +} + +.menulogo { + padding-top: 20px; + padding-bottom: 20px; + text-align: center; + margin-bottom: 20px; + width: 160px; + border-radius: var(--borderradius); background-color: #fff; box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), @@ -107,7 +142,7 @@ body { } .menu a { - color: #4d4d4d; + color: var(--secondarytext); text-decoration:none; } @@ -157,7 +192,7 @@ body { padding: 8px 8px 8px 32px; text-decoration: none; font-size: 25px; - color: #818181; + color: var(--secondarytext); display: block; transition: 0.3s; } @@ -175,7 +210,7 @@ body { margin-left: 50px; text-decoration: none; display: block; - color: #818181; + color: var(--secondarytext); transition: 0.3s; } @@ -204,33 +239,30 @@ body { } /** - * Login select + * Login form */ -.login-select { - position: sticky; - width: 300px; - height: 150px; - top: 50%; - left: 50%; - margin-top: 50px; - margin-bottom: 100px; - transform: translate(-50%); + .login-parent { + display: flex; + max-width: 800px; + margin: 30px auto; + } - padding: 20px 20px; + .login-welcome { + float: right; + max-width: 400px; + padding: 15px 20px; + border-radius: var(--borderradius) 0px 0px var(--borderradius); - background-color: #a8c7cf; + background-color: #fff; box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 9px 18px 0 rgba(0, 0, 0, 0.1); } -/** - * Login form - */ .login-container { + float: left; max-width: 400px; - - margin: 30px auto; + border-radius: 0px var(--borderradius) var(--borderradius) 0px; padding: 15px 20px; background-color: #fff; @@ -253,7 +285,7 @@ hr { } .table th { - background-color: #527984; + background-color: var(--highlights); color: #fff; } @@ -402,23 +434,23 @@ hr { } .section-buttons-group-left .btn{ - background-color: #527984; - border-color: #527984; + background-color: var(--highlights); + border-color: var(--highlights); } .section-buttons-group-left .btn:hover{ - background-color: #31484f; + background-color: #31484f; border-color: #31484f; } .drag-and-drop .btn{ - color: #527984; - border-color: #527984; + color: var(--highlights); + border-color: var(--highlights); } .drag-and-drop .btn:hover{ - color: #527984; - border-color: #527984; + color: var(--highlights); + border-color: var(--highlights); } @@ -427,8 +459,8 @@ hr { } .solid-button .btn{ - background-color: #527984; - border-color: #527984; + background-color: var(--highlights); + border-color: var(--highlights); } .solid-button .btn:hover{ @@ -437,8 +469,8 @@ hr { } .solid-button .btn:disabled{ - background-color: #527984; - border-color: #527984; + background-color: var(--highlights); + border-color: var(--highlights); } .icon-button .btn{ @@ -452,7 +484,7 @@ hr { } .icon-color { - color: #527984; + color: var(--highlights); } .form-horizontal .form-group { diff --git a/src/user/login-complete.js b/src/user/login-complete.js index 7df0d00..7a6b3a5 100644 --- a/src/user/login-complete.js +++ b/src/user/login-complete.js @@ -96,8 +96,8 @@ class LoginComplete extends React.Component { } else { return
    Waiting Dog
    ; } diff --git a/src/user/login.js b/src/user/login.js index bc4840a..a91fa89 100644 --- a/src/user/login.js +++ b/src/user/login.js @@ -23,10 +23,11 @@ import { Redirect } from 'react-router-dom'; import LoginForm from './login-form'; import Header from '../common/header'; -import Footer from '../common/footer'; import NotificationsDataManager from '../common/data-managers/notifications-data-manager'; import LoginStore from './login-store' import AppDispatcher from '../common/app-dispatcher'; +import branding from '../branding/branding'; + class Login extends React.Component { constructor(props) { @@ -70,14 +71,19 @@ class Login extends React.Component {
    +
    +
    + {branding.getWelcome()} +
    -
    - Login +
    + Login - + +
    -
    + {branding.getFooter()}
    ); } diff --git a/src/user/recover-password.js b/src/user/recover-password.js index 4105f4f..8ac6991 100644 --- a/src/user/recover-password.js +++ b/src/user/recover-password.js @@ -17,15 +17,20 @@ import React from 'react'; import Dialog from '../common/dialogs/dialog'; -import Config from '../config'; +import { Container } from 'flux/utils'; +import LoginStore from './login-store' +import _ from 'lodash'; class RecoverPassword extends React.Component { - constructor(props) { - super(props); - this.state = { - admin: Config.admin + static getStores() { + return [LoginStore] + } + + static calculateState(prevState, props) { + return { + config: LoginStore.getState().config } } @@ -44,14 +49,14 @@ class RecoverPassword extends React.Component { valid={true} >
    -
    Please contact:
    -
    {this.state.admin.name}
    -
    E-Mail:
    - {this.state.admin.mail} +
    Please contact:
    +
    {_.get(this.state.config, ['contact', 'name'])}
    + {_.get(this.state.config, ['contact', 'mail'])}

    ); } } -export default RecoverPassword; +let fluxContainerConverter = require('../common/FluxContainerConverter'); +export default Container.create(fluxContainerConverter.convert(RecoverPassword)); \ No newline at end of file diff --git a/src/user/users-to-scenario.js b/src/user/users-to-scenario.js new file mode 100644 index 0000000..81e4a19 --- /dev/null +++ b/src/user/users-to-scenario.js @@ -0,0 +1,71 @@ +/** + * This file is part of VILLASweb. + * + * VILLASweb is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * VILLASweb is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with VILLASweb. If not, see . + ******************************************************************************/ + +import React from 'react'; +import { Table } from 'react-bootstrap'; + +import Dialog from '../common/dialogs/dialog'; + +class UsersToScenarioDialog extends React.Component { + valid = true; + + onClose() { + if (this.props.onClose != null) { + this.props.onClose(); + } + }; + + renderRow(value, key) { + return ( + {key} + {value} + ); + } + + renderData() { + let arr = []; + this.props.users.forEach((value, key) => { + arr.push(this.renderRow(value,key)) + }) + return arr; + } + + render() { + return this.onClose()} + valid={true} + > + + + + + + + + + { this.renderData() } + +
    IDName
    +
    ; + } +} + +export default UsersToScenarioDialog; diff --git a/src/user/users.js b/src/user/users.js index 5d97e68..3cf7721 100644 --- a/src/user/users.js +++ b/src/user/users.js @@ -20,13 +20,16 @@ import { Container } from 'flux/utils'; import AppDispatcher from '../common/app-dispatcher'; import UsersStore from './users-store'; +import ScenarioStore from '../scenario/scenario-store'; import Icon from '../common/icon'; import IconButton from '../common/icon-button'; +import { Dropdown, DropdownButton } from 'react-bootstrap'; import Table from '../common/table'; import TableColumn from '../common/table-column'; import NewUserDialog from './new-user'; import EditUserDialog from './edit-user'; +import UsersToScenarioDialog from './users-to-scenario'; import DeleteDialog from '../common/dialogs/delete-dialog'; import NotificationsDataManager from "../common/data-managers/notifications-data-manager"; @@ -34,25 +37,25 @@ import NotificationsFactory from "../common/data-managers/notifications-factory" class Users extends Component { static getStores() { - return [ UsersStore ]; + return [UsersStore, ScenarioStore]; } static calculateState(prevState, props) { - let token = localStorage.getItem("token"); - // If there is a token available and this method was called as a result of loading users - if (!prevState && token) { - AppDispatcher.dispatch({ - type: 'users/start-load', - token: token - }); + if (prevState == null) { + prevState = {}; } return { - token: token, + token: localStorage.getItem("token"), users: UsersStore.getState(), + scenarios: ScenarioStore.getState(), + usersToAdd: prevState.usersToAdd || new Map(), + selectedScenarioID: prevState.selectedScenarioID || null, + selectedScenario: prevState.selectedScenario || '', newModal: false, + addUsersModal: false, editModal: false, deleteModal: false, modalData: {}, @@ -60,6 +63,19 @@ class Users extends Component { }; } + componentDidMount() { + AppDispatcher.dispatch({ + type: 'scenarios/start-load', + token: this.state.token + }); + + AppDispatcher.dispatch({ + type: 'users/start-load', + token: this.state.token + }); + + } + closeNewModal(data) { this.setState({ newModal: false }); @@ -102,77 +118,137 @@ class Users extends Component { } } - onModalKeyPress = (event) => { - if (event.key === 'Enter') { - event.preventDefault(); - - this.confirmDeleteModal(); + onUserChecked(user) { + let temp = this.state.usersToAdd; + const found = temp.get(user.id); + if (!found) { + temp.set(user.id, user.username); + } else { + temp.delete(user.id) } + this.setState({ usersToAdd: temp }); + } + + setScenario(ID) { + + let scenarioID = parseInt(ID, 10) + let scenario = this.state.scenarios.find(s => s.id === scenarioID); + this.setState({ selectedScenarioID: scenario.id, selectedScenario: scenario.name, addUsersModal: true }) }; + closeAddUsersModal() { + this.state.usersToAdd.forEach((value, key) => { + AppDispatcher.dispatch({ + type: 'scenarios/add-user', + data: this.state.selectedScenarioID, + username: value, + token: this.state.token + }); + }) + + this.setState({ addUsersModal: false, selectedScenarioID: null }) + } + modifyActiveColumn(active) { return } render() { + const buttonStyle = { + marginLeft: '10px', + } + + const iconStyle = { + height: '30px', + width: '30px' + } + return
    -

    Users +

    Users - this.setState({ newModal: true })} - icon='plus' - /> - -

    + this.setState({ newModal: true })} + icon='plus' + buttonStyle={buttonStyle} + iconStyle={iconStyle} + /> + + - - {this.state.currentUser.role === "Admin" ? - - : <> - } +
    + {this.state.currentUser.role === "Admin" ? + : <> + } + {this.state.currentUser.role === "Admin" ? this.onUserChecked(index, event)} + checkboxKey='checked' + width='30' /> - - this.modifyActiveColumn(active)} - /> - this.setState({ - editModal: true, - modalData: this.state.users[index] - })} - onDelete={index => this.setState({ - deleteModal: true, - modalData: this.state.users[index] - })} - /> -
    + : <> + } + + + + this.modifyActiveColumn(active)} + /> + this.setState({ + editModal: true, + modalData: this.state.users[index] + })} + onDelete={index => this.setState({ + deleteModal: true, + modalData: this.state.users[index] + })} + /> + + + this.setScenario(id)} + > + {this.state.scenarios.map(scenario => ( + {scenario.name} + ))} + + - this.closeNewModal(data)} /> - this.closeEditModal(data)} user={this.state.modalData} /> - this.closeDeleteModal(e)} /> -
    ; + this.closeAddUsersModal()} + /> + this.closeNewModal(data)} /> + this.closeEditModal(data)} user={this.state.modalData} /> + this.closeDeleteModal(e)} /> + ; } }