From d3e816eddb06be40dde28fa7b9db2d14719ec40a Mon Sep 17 00:00:00 2001 From: Gareth Latty Date: Tue, 31 May 2022 17:30:13 +0100 Subject: [PATCH] Move to using shared material library. --- .github/dependabot.yml | 5 + .github/workflows/build.yml | 2 + .gitmodules | 3 + client/Dockerfile | 4 +- client/elm-material | 1 + client/elm.json | 3 +- client/package-lock.json | 568 ++++++++++-------- client/package.json | 16 +- .../src/elm/MassiveDecks/Card/Call/Editor.elm | 36 +- client/src/elm/MassiveDecks/Card/Source.elm | 8 +- .../elm/MassiveDecks/Card/Source/BuiltIn.elm | 8 +- .../Card/Source/JsonAgainstHumanity.elm | 9 +- .../MassiveDecks/Card/Source/ManyDecks.elm | 14 +- .../Components/{Menu.elm => ContextMenu.elm} | 54 +- .../{Menu => ContextMenu}/Model.elm | 26 +- .../MassiveDecks/Components/Form/Message.elm | 7 +- client/src/elm/MassiveDecks/Error/Overlay.elm | 12 +- client/src/elm/MassiveDecks/Game.elm | 57 +- client/src/elm/MassiveDecks/Game/Action.elm | 7 +- client/src/elm/MassiveDecks/Game/History.elm | 8 +- client/src/elm/MassiveDecks/Pages/Lobby.elm | 93 +-- .../MassiveDecks/Pages/Lobby/Configure.elm | 68 +-- .../Lobby/Configure/Configurable/Editor.elm | 98 +-- .../Pages/Lobby/Configure/Decks.elm | 11 +- .../Pages/Lobby/Configure/Messages.elm | 2 +- .../Rules/HouseRules/CzarChoices.elm | 6 +- .../Pages/Lobby/Configure/Stages.elm | 6 +- .../elm/MassiveDecks/Pages/Lobby/Invite.elm | 18 +- .../elm/MassiveDecks/Pages/Lobby/Messages.elm | 2 +- .../elm/MassiveDecks/Pages/Lobby/Model.elm | 2 +- .../elm/MassiveDecks/Pages/Lobby/Spectate.elm | 19 +- client/src/elm/MassiveDecks/Pages/Start.elm | 110 ++-- .../MassiveDecks/Pages/Start/LobbyBrowser.elm | 3 +- .../elm/MassiveDecks/Requests/HttpData.elm | 7 +- client/src/elm/MassiveDecks/Settings.elm | 141 +++-- client/src/elm/Material/Attributes.elm | 24 - client/src/elm/Material/Button.elm | 47 -- client/src/elm/Material/Card.elm | 9 - client/src/elm/Material/Fab.elm | 51 -- client/src/elm/Material/IconButton.elm | 68 --- client/src/elm/Material/LinearProgress.elm | 44 -- client/src/elm/Material/ListView.elm | 89 --- client/src/elm/Material/Menu.elm | 60 -- client/src/elm/Material/Ripple.elm | 8 - client/src/elm/Material/Select.elm | 87 --- client/src/elm/Material/Slider.elm | 56 -- client/src/elm/Material/Switch.elm | 8 - client/src/elm/Material/Tabs.elm | 88 --- client/src/elm/Material/TextArea.elm | 8 - client/src/elm/Material/TextField.elm | 96 --- client/src/scss/_material.scss | 76 --- client/src/scss/_settings.scss | 2 +- client/src/scss/massive-decks.scss | 27 +- client/src/scss/pages/_lobby.scss | 7 +- client/src/ts/massive-decks.ts | 10 +- client/src/ts/material.ts | 14 - client/tsconfig.json | 15 +- server/package-lock.json | 236 ++++---- 58 files changed, 881 insertions(+), 1683 deletions(-) create mode 100644 .gitmodules create mode 160000 client/elm-material rename client/src/elm/MassiveDecks/Components/{Menu.elm => ContextMenu.elm} (60%) rename client/src/elm/MassiveDecks/Components/{Menu => ContextMenu}/Model.elm (53%) delete mode 100644 client/src/elm/Material/Attributes.elm delete mode 100644 client/src/elm/Material/Button.elm delete mode 100644 client/src/elm/Material/Card.elm delete mode 100644 client/src/elm/Material/Fab.elm delete mode 100644 client/src/elm/Material/IconButton.elm delete mode 100644 client/src/elm/Material/LinearProgress.elm delete mode 100644 client/src/elm/Material/ListView.elm delete mode 100644 client/src/elm/Material/Menu.elm delete mode 100644 client/src/elm/Material/Ripple.elm delete mode 100644 client/src/elm/Material/Select.elm delete mode 100644 client/src/elm/Material/Slider.elm delete mode 100644 client/src/elm/Material/Switch.elm delete mode 100644 client/src/elm/Material/Tabs.elm delete mode 100644 client/src/elm/Material/TextArea.elm delete mode 100644 client/src/elm/Material/TextField.elm delete mode 100644 client/src/ts/material.ts diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 5653cd86..ccd7aae2 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -16,6 +16,11 @@ updates: schedule: interval: "weekly" + - package-ecosystem: "gitsubmodule" + directory: "/client/elm-material" + schedule: + interval: "weekly" + - package-ecosystem: "npm" directory: "/server" schedule: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ae083c40..296a70a8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,6 +19,8 @@ jobs: steps: - name: Checkout repository. uses: actions/checkout@v3 + with: + submodules: true - name: Get version from tag. uses: little-core-labs/get-git-tag@v3.0.2 diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..20c7323b --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "client/elm-material"] + path = client/elm-material + url = git@github.com:Lattyware/elm-material.git diff --git a/client/Dockerfile b/client/Dockerfile index eac5d2d3..e1724037 100644 --- a/client/Dockerfile +++ b/client/Dockerfile @@ -17,9 +17,11 @@ RUN ["apk", "add", "--no-cache", "python3", "make", "g++"] ENV MD_VERSION ${VERSION} ENV WEBPACK_MODE ${MODE} +COPY ["./elm-material/package.json", "./elm-material/package-lock.json", "./"] COPY ["./package.json", "./package-lock.json", "./"] RUN ["npm", "ci"] +COPY ["./elm-material", "./elm-material"] COPY ["./tsconfig.json", "postcss.config.js", "./webpack.config.js", "./elm.json", "./"] COPY ["./src", "./src"] COPY ["./assets", "./assets"] @@ -49,5 +51,5 @@ LABEL org.opencontainers.image.licenses="AGPL-3.0+" LABEL org.opencontainers.image.title="Massive Decks (Client)" LABEL org.opencontainers.image.description="The web client for Massive Decks, a comedy party game." -COPY --from=static ["/md/dist", "/usr/share/nginx/html/"] +COPY --from=static ["/", "/usr/share/nginx/html/"] COPY ["./nginx.conf", "/etc/nginx/nginx.conf"] diff --git a/client/elm-material b/client/elm-material new file mode 160000 index 00000000..035cca88 --- /dev/null +++ b/client/elm-material @@ -0,0 +1 @@ +Subproject commit 035cca888c5ef675d0d632071e7418691bd0c33c diff --git a/client/elm.json b/client/elm.json index 96188aed..b4b0f175 100644 --- a/client/elm.json +++ b/client/elm.json @@ -1,7 +1,8 @@ { "type": "application", "source-directories": [ - "./src/elm" + "./src/elm", + "./elm-material/src/elm" ], "elm-version": "0.19.1", "dependencies": { diff --git a/client/package-lock.json b/client/package-lock.json index afea2aab..ad2c13a1 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -10,22 +10,10 @@ "license": "AGPL-3.0-or-later", "dependencies": { "@fortawesome/fontawesome-svg-core": "^6.1.1", - "@material/card": "^14.0.0", - "@material/mwc-button": "^0.26.1", - "@material/mwc-fab": "^0.26.1", - "@material/mwc-icon-button": "^0.26.1", - "@material/mwc-linear-progress": "^0.26.1", - "@material/mwc-menu": "^0.26.1", - "@material/mwc-select": "^0.26.1", - "@material/mwc-slider": "^0.26.1", - "@material/mwc-switch": "^0.26.1", - "@material/mwc-tab": "^0.26.1", - "@material/mwc-tab-bar": "^0.26.1", - "@material/mwc-textarea": "^0.26.1", - "@material/mwc-textfield": "^0.26.1", "@polymer/paper-tooltip": "^3.0.1", - "@webcomponents/webcomponentsjs": "^2.5.0", - "canvas-confetti": "^1.3.2" + "@webcomponents/webcomponentsjs": "^2.6.0", + "canvas-confetti": "^1.3.2", + "elm-material": "file:elm-material" }, "devDependencies": { "@types/canvas-confetti": "^1.3.0", @@ -64,6 +52,32 @@ "webpack-dev-server": "^4.3.0" } }, + "elm-material": { + "version": "1.0.0", + "license": "AGPL-3.0-or-later", + "dependencies": { + "@material/card": "^14.0.0", + "@material/mwc-button": "^0.26.1", + "@material/mwc-fab": "^0.26.1", + "@material/mwc-icon-button": "^0.26.1", + "@material/mwc-linear-progress": "^0.26.1", + "@material/mwc-list": "^0.26.1", + "@material/mwc-menu": "^0.26.1", + "@material/mwc-select": "^0.26.1", + "@material/mwc-slider": "^0.26.1", + "@material/mwc-switch": "^0.26.1", + "@material/mwc-tab": "^0.26.1", + "@material/mwc-tab-bar": "^0.26.1", + "@material/mwc-textarea": "^0.26.1", + "@material/mwc-textfield": "^0.26.1", + "@webcomponents/webcomponentsjs": "^2.6.0" + }, + "devDependencies": { + "elm": "^0.19.1-5", + "prettier": "2.6.2", + "prettier-plugin-elm": "0.8.0" + } + }, "node_modules/@babel/code-frame": { "version": "7.16.7", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", @@ -296,6 +310,25 @@ "postcss": "^8.3" } }, + "node_modules/@csstools/postcss-trigonometric-functions": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@csstools/postcss-trigonometric-functions/-/postcss-trigonometric-functions-1.0.1.tgz", + "integrity": "sha512-G78CY/+GePc6dDCTUbwI6TTFQ5fs3N9POHhI6v0QzteGpf6ylARiJUNz9HrRKi4eVYBNXjae1W2766iUEFxHlw==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.2.0" + }, + "engines": { + "node": "^14 || >=16" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + }, + "peerDependencies": { + "postcss": "^8.4" + } + }, "node_modules/@csstools/postcss-unset-value": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@csstools/postcss-unset-value/-/postcss-unset-value-1.0.1.tgz", @@ -359,6 +392,64 @@ "node": ">=6" } }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.1.tgz", + "integrity": "sha512-GcHwniMlA2z+WFPWuY8lp3fsza0I8xPFMWL5+n8LYyP6PSvPrXf4+n8stDHZY2DM0zy9sVkRDy1jDI4XGzYVqg==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.0", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz", + "integrity": "sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.1.tgz", + "integrity": "sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", + "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.13", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.13.tgz", + "integrity": "sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz", + "integrity": "sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, "node_modules/@leichtgewicht/ip-codec": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz", @@ -2652,9 +2743,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "17.0.36", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.36.tgz", - "integrity": "sha512-V3orv+ggDsWVHP99K3JlwtH20R7J4IhI1Kksgc+64q5VxgfRkQG8Ws3MFm/FZOKDYGy9feGFlZ70/HpCNe9QaA==", + "version": "17.0.38", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.38.tgz", + "integrity": "sha512-5jY9RhV7c0Z4Jy09G+NIDTsCZ5G0L5n+Z+p+Y7t5VJHM30bgwzSjVtlcBxqAj+6L/swIlvtOSzr8rBk/aNyV2g==", "dev": true }, "node_modules/@types/parse-json": { @@ -4191,9 +4282,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001344", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001344.tgz", - "integrity": "sha512-0ZFjnlCaXNOAYcV7i+TtdKBp0L/3XEU2MF/x6Du1lrh+SRX4IfzIVL4HNJg5pB2PmFb8rszIGyOvsZnqqRoc2g==", + "version": "1.0.30001346", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001346.tgz", + "integrity": "sha512-q6ibZUO2t88QCIPayP/euuDREq+aMAxFE5S70PkrLh0iTDj/zEhgvJRKC2+CvXY6EWc6oQwUR48lL5vCW6jiXQ==", "dev": true, "funding": [ { @@ -4548,9 +4639,9 @@ "dev": true }, "node_modules/core-js": { - "version": "3.22.7", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.22.7.tgz", - "integrity": "sha512-Jt8SReuDKVNZnZEzyEQT5eK6T2RRCXkfTq7Lo09kpm+fHjgGewSbNjV+Wt4yZMhPDdzz2x1ulI5z/w4nxpBseg==", + "version": "3.22.8", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.22.8.tgz", + "integrity": "sha512-UoGQ/cfzGYIuiq6Z7vWL1HfkE9U9IZ4Ub+0XSiJTCzvbZzgPA69oDF2f+lgJ6dFFLEdjW5O6svvoKzXX23xFkA==", "dev": true, "hasInstallScript": true, "funding": { @@ -5058,9 +5149,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.141", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.141.tgz", - "integrity": "sha512-mfBcbqc0qc6RlxrsIgLG2wCqkiPAjEezHxGTu7p3dHHFOurH4EjS9rFZndX5axC8264rI1Pcbw8uQP39oZckeA==", + "version": "1.4.144", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.144.tgz", + "integrity": "sha512-R3RV3rU1xWwFJlSClVWDvARaOk6VUO/FubHLodIASDB3Mc2dzuWvNdfOgH9bwHUTqT79u92qw60NWfwUdzAqdg==", "dev": true }, "node_modules/elm": { @@ -5106,7 +5197,7 @@ "node_modules/elm-analyse/node_modules/punycode": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", "dev": true }, "node_modules/elm-analyse/node_modules/qs": { @@ -5207,6 +5298,10 @@ "elm-format": "bin/elm-format" } }, + "node_modules/elm-material": { + "resolved": "elm-material", + "link": true + }, "node_modules/elm-webpack-loader": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/elm-webpack-loader/-/elm-webpack-loader-8.0.0.tgz", @@ -5633,7 +5728,7 @@ "node_modules/express/node_modules/raw-body": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", - "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", + "integrity": "sha512-Ss0DsBxqLxCmQkfG5yazYhtbVVTJqS9jTsZG2lhrNwqzOk2SUC7O/NB/M//CkEBqsrtmlNgJCPccJGuYSFr6Vg==", "dev": true, "dependencies": { "bytes": "3.0.0", @@ -7000,19 +7095,13 @@ "node_modules/lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", - "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", - "dev": true - }, - "node_modules/lodash.sortby": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", - "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", "dev": true }, "node_modules/lodash.uniq": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", - "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", + "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==", "dev": true }, "node_modules/loose-envify": { @@ -7081,7 +7170,7 @@ "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", "dev": true, "engines": { "node": ">= 0.6" @@ -7102,7 +7191,7 @@ "node_modules/merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", "dev": true }, "node_modules/merge-stream": { @@ -7114,7 +7203,7 @@ "node_modules/methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", "dev": true, "engines": { "node": ">= 0.6" @@ -7212,7 +7301,7 @@ "node_modules/minimist": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "integrity": "sha512-7Wl+Jz+IGWuSdgsQEJ4JunV0si/iMhg42MnQQG6h1R6TNeVenp4U9x5CC5v/gYqz/fENLQITAWXidNtVL0NNbw==", "dev": true }, "node_modules/minipass": { @@ -7261,7 +7350,7 @@ "node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, "node_modules/multicast-dns": { @@ -7368,7 +7457,7 @@ "node_modules/normalize-range": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", - "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", + "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", "dev": true, "engines": { "node": ">=0.10.0" @@ -7377,7 +7466,7 @@ "node_modules/normalize-url": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-1.9.1.tgz", - "integrity": "sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=", + "integrity": "sha512-A48My/mtCklowHBlI8Fq2jFWK4tX4lJ5E6ytFsSOq1fzpvT0SQSgKhSg7lN5c2uYFOrUAOQp6zhhJnpp1eMloQ==", "dev": true, "dependencies": { "object-assign": "^4.0.1", @@ -7434,7 +7523,7 @@ "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", "dev": true, "engines": { "node": ">=0.10.0" @@ -7467,7 +7556,7 @@ "node_modules/on-finished": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", "dev": true, "dependencies": { "ee-first": "1.1.1" @@ -7488,7 +7577,7 @@ "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, "dependencies": { "wrappy": "1" @@ -7553,7 +7642,7 @@ "node_modules/options": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz", - "integrity": "sha1-7CLTEoBrtT5zF3Pnza788cZDEo8=", + "integrity": "sha512-bOj3L1ypm++N+n7CEbbe473A414AB7z+amKYshRb//iuL3MpdDCLhPnw6aVTdKB9g5ZRVHIEp8eUln6L2NUStg==", "dev": true, "engines": { "node": ">=0.4.0" @@ -7562,7 +7651,7 @@ "node_modules/os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "integrity": "sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==", "dev": true, "engines": { "node": ">=0.10.0" @@ -7571,7 +7660,7 @@ "node_modules/os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", "dev": true, "engines": { "node": ">=0.10.0" @@ -7703,7 +7792,7 @@ "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, "engines": { "node": ">=0.10.0" @@ -7712,7 +7801,7 @@ "node_modules/path-key": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", "dev": true, "engines": { "node": ">=4" @@ -7727,7 +7816,7 @@ "node_modules/path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", "dev": true }, "node_modules/path-type": { @@ -7742,7 +7831,7 @@ "node_modules/performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", "dev": true }, "node_modules/picocolors": { @@ -7766,7 +7855,7 @@ "node_modules/pify": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", "dev": true, "engines": { "node": ">=0.10.0" @@ -8769,12 +8858,12 @@ } }, "node_modules/postcss-preset-env": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/postcss-preset-env/-/postcss-preset-env-7.6.0.tgz", - "integrity": "sha512-5cnzpSFZnQJOlBu85xn4Nnluy/WjIST/ugn+gOVcKnmFJ+GLtkfRhmJPo/TW9UDpG7oyA467kvDOO8mtcpOL4g==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/postcss-preset-env/-/postcss-preset-env-7.7.0.tgz", + "integrity": "sha512-2Q9YARQju+j2BVgAyDnW1pIWIMlaHZqbaGISPMmalznNlWcNFIZFQsJfRLXS+WHmHJDCmV7wIWpVf9JNKR4Elw==", "dev": true, "dependencies": { - "@csstools/postcss-cascade-layers": "^1.0.1", + "@csstools/postcss-cascade-layers": "^1.0.2", "@csstools/postcss-color-function": "^1.1.0", "@csstools/postcss-font-format-keywords": "^1.0.0", "@csstools/postcss-hwb-function": "^1.0.1", @@ -8784,16 +8873,17 @@ "@csstools/postcss-oklab-function": "^1.1.0", "@csstools/postcss-progressive-custom-properties": "^1.3.0", "@csstools/postcss-stepped-value-functions": "^1.0.0", + "@csstools/postcss-trigonometric-functions": "^1.0.0", "@csstools/postcss-unset-value": "^1.0.1", "autoprefixer": "^10.4.7", "browserslist": "^4.20.3", "css-blank-pseudo": "^3.0.3", "css-has-pseudo": "^3.0.4", "css-prefers-color-scheme": "^6.0.3", - "cssdb": "^6.6.1", + "cssdb": "^6.6.2", "postcss-attribute-case-insensitive": "^5.0.0", "postcss-clamp": "^4.1.0", - "postcss-color-functional-notation": "^4.2.2", + "postcss-color-functional-notation": "^4.2.3", "postcss-color-hex-alpha": "^8.0.3", "postcss-color-rebeccapurple": "^7.0.2", "postcss-custom-media": "^8.0.0", @@ -8811,7 +8901,7 @@ "postcss-lab-function": "^4.2.0", "postcss-logical": "^5.0.4", "postcss-media-minmax": "^5.0.0", - "postcss-nesting": "^10.1.6", + "postcss-nesting": "^10.1.7", "postcss-opacity-percentage": "^1.1.2", "postcss-overflow-shorthand": "^3.0.3", "postcss-page-break": "^3.0.4", @@ -9014,7 +9104,7 @@ "node_modules/prepend-http": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "integrity": "sha512-PhmXi5XmoyKw1Un4E+opM2KcsJInDvKyuOumcjjw3waw86ZNjHwVUOOWLc4bCzLdcKNaWBH9e99sbWzDQsVaYg==", "dev": true, "engines": { "node": ">=0.10.0" @@ -9074,7 +9164,7 @@ "node_modules/process-nextick-args": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "integrity": "sha512-yN0WQmuCX63LP/TMvAg31nvT6m4vDqJEiiv2CAZqWOGNWutc9DfDk1NPYYmKUFmaVM2UwDowH4u5AHWYP/jxKw==", "dev": true }, "node_modules/proxy-addr": { @@ -9117,7 +9207,7 @@ "node_modules/query-string": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz", - "integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=", + "integrity": "sha512-O2XLNDBIg1DnTOa+2XrIwSiXEV8h2KImXUnjhhn2+UsvZ+Es2uyd5CCRTNQlDGbzUQOW3aYCBx9rVA6dzsiY7Q==", "dev": true, "dependencies": { "object-assign": "^4.1.0", @@ -10289,14 +10379,14 @@ } }, "node_modules/terser": { - "version": "5.13.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.13.1.tgz", - "integrity": "sha512-hn4WKOfwnwbYfe48NgrQjqNOH9jzLqRcIfbYytOXCOv46LBfWr9bDS17MQqOi+BWGD0sJK3Sj5NC/gJjiojaoA==", + "version": "5.14.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.14.0.tgz", + "integrity": "sha512-JC6qfIEkPBd9j1SMO3Pfn+A6w2kQV54tv+ABQLgZr7dA3k/DL/OBoYSWxzVpZev3J+bUHXfr55L8Mox7AaNo6g==", "dev": true, "dependencies": { + "@jridgewell/source-map": "^0.3.2", "acorn": "^8.5.0", "commander": "^2.20.0", - "source-map": "~0.8.0-beta.0", "source-map-support": "~0.5.20" }, "bin": { @@ -10307,15 +10397,15 @@ } }, "node_modules/terser-webpack-plugin": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.1.tgz", - "integrity": "sha512-GvlZdT6wPQKbDNW/GDQzZFg/j4vKU96yl2q6mcUkzKOgW4gwf1Z8cZToUCrz31XHlPWH8MVb1r2tFtdDtTGJ7g==", + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.3.tgz", + "integrity": "sha512-Fx60G5HNYknNTNQnzQ1VePRuu89ZVYWfjRAeT5rITuCY/1b08s49e5kSQwHDirKZWuoKOBRFS98EUUoZ9kLEwQ==", "dev": true, "dependencies": { + "@jridgewell/trace-mapping": "^0.3.7", "jest-worker": "^27.4.5", "schema-utils": "^3.1.1", "serialize-javascript": "^6.0.0", - "source-map": "^0.6.1", "terser": "^5.7.2" }, "engines": { @@ -10389,7 +10479,7 @@ "url": "https://opencollective.com/webpack" } }, - "node_modules/terser-webpack-plugin/node_modules/source-map": { + "node_modules/terser/node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", @@ -10398,18 +10488,6 @@ "node": ">=0.10.0" } }, - "node_modules/terser/node_modules/source-map": { - "version": "0.8.0-beta.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.8.0-beta.0.tgz", - "integrity": "sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==", - "dev": true, - "dependencies": { - "whatwg-url": "^7.0.0" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/terser/node_modules/source-map-support": { "version": "0.5.21", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", @@ -10420,15 +10498,6 @@ "source-map": "^0.6.0" } }, - "node_modules/terser/node_modules/source-map-support/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/through2": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.1.tgz", @@ -10500,15 +10569,6 @@ "node": ">=0.8" } }, - "node_modules/tr46": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", - "integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=", - "dev": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, "node_modules/traverse": { "version": "0.3.9", "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz", @@ -10784,9 +10844,9 @@ "dev": true }, "node_modules/watchpack": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.3.1.tgz", - "integrity": "sha512-x0t0JuydIo8qCNctdDrn1OzH/qDzk2+rdCOC3YzumZ42fiMqmQ7T3xQurykYMhYfHaPHTp4ZxAx2NfUo1K6QaA==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", + "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", "dev": true, "dependencies": { "glob-to-regexp": "^0.4.1", @@ -10805,16 +10865,10 @@ "minimalistic-assert": "^1.0.0" } }, - "node_modules/webidl-conversions": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", - "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", - "dev": true - }, "node_modules/webpack": { - "version": "5.72.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.72.1.tgz", - "integrity": "sha512-dXG5zXCLspQR4krZVR6QgajnZOjW2K/djHvdcRaDQvsjV9z9vaW6+ja5dZOYbqBBjF6kGXka/2ZyxNdc+8Jung==", + "version": "5.73.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.73.0.tgz", + "integrity": "sha512-svjudQRPPa0YiOYa2lM/Gacw0r6PvxptHj4FuEKQ2kX05ZLkjbVc5MnPs6its5j7IZljnIqSVo/OsY2X0IpHGA==", "dev": true, "dependencies": { "@types/eslint-scope": "^3.7.3", @@ -10934,9 +10988,9 @@ } }, "node_modules/webpack-dev-server": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.9.0.tgz", - "integrity": "sha512-+Nlb39iQSOSsFv0lWUuUTim3jDQO8nhK3E68f//J2r5rIcp4lULHXz2oZ0UVdEeWXEh5lSzYUlzarZhDAeAVQw==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.9.1.tgz", + "integrity": "sha512-CTMfu2UMdR/4OOZVHRpdy84pNopOuigVIsRbGX3LVDMWNP8EUgC5mUBMErbwBlHTEX99ejZJpVqrir6EXAEajA==", "dev": true, "dependencies": { "@types/bonjour": "^3.5.9", @@ -10963,7 +11017,7 @@ "schema-utils": "^4.0.0", "selfsigned": "^2.0.1", "serve-index": "^1.9.1", - "sockjs": "^0.3.21", + "sockjs": "^0.3.24", "spdy": "^4.0.2", "webpack-dev-middleware": "^5.3.1", "ws": "^8.4.2" @@ -11449,17 +11503,6 @@ "node": ">=0.8.0" } }, - "node_modules/whatwg-url": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", - "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", - "dev": true, - "dependencies": { - "lodash.sortby": "^4.7.0", - "tr46": "^1.0.1", - "webidl-conversions": "^4.0.2" - } - }, "node_modules/which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", @@ -11669,6 +11712,15 @@ "postcss-value-parser": "^4.2.0" } }, + "@csstools/postcss-trigonometric-functions": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@csstools/postcss-trigonometric-functions/-/postcss-trigonometric-functions-1.0.1.tgz", + "integrity": "sha512-G78CY/+GePc6dDCTUbwI6TTFQ5fs3N9POHhI6v0QzteGpf6ylARiJUNz9HrRKi4eVYBNXjae1W2766iUEFxHlw==", + "dev": true, + "requires": { + "postcss-value-parser": "^4.2.0" + } + }, "@csstools/postcss-unset-value": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@csstools/postcss-unset-value/-/postcss-unset-value-1.0.1.tgz", @@ -11702,6 +11754,55 @@ "@fortawesome/fontawesome-common-types": "6.1.1" } }, + "@jridgewell/gen-mapping": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.1.tgz", + "integrity": "sha512-GcHwniMlA2z+WFPWuY8lp3fsza0I8xPFMWL5+n8LYyP6PSvPrXf4+n8stDHZY2DM0zy9sVkRDy1jDI4XGzYVqg==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.0", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz", + "integrity": "sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA==", + "dev": true + }, + "@jridgewell/set-array": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.1.tgz", + "integrity": "sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ==", + "dev": true + }, + "@jridgewell/source-map": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", + "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", + "dev": true, + "requires": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.13", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.13.tgz", + "integrity": "sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz", + "integrity": "sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, "@leichtgewicht/ip-codec": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz", @@ -14048,9 +14149,9 @@ "dev": true }, "@types/node": { - "version": "17.0.36", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.36.tgz", - "integrity": "sha512-V3orv+ggDsWVHP99K3JlwtH20R7J4IhI1Kksgc+64q5VxgfRkQG8Ws3MFm/FZOKDYGy9feGFlZ70/HpCNe9QaA==", + "version": "17.0.38", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.38.tgz", + "integrity": "sha512-5jY9RhV7c0Z4Jy09G+NIDTsCZ5G0L5n+Z+p+Y7t5VJHM30bgwzSjVtlcBxqAj+6L/swIlvtOSzr8rBk/aNyV2g==", "dev": true }, "@types/parse-json": { @@ -15405,9 +15506,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001344", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001344.tgz", - "integrity": "sha512-0ZFjnlCaXNOAYcV7i+TtdKBp0L/3XEU2MF/x6Du1lrh+SRX4IfzIVL4HNJg5pB2PmFb8rszIGyOvsZnqqRoc2g==", + "version": "1.0.30001346", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001346.tgz", + "integrity": "sha512-q6ibZUO2t88QCIPayP/euuDREq+aMAxFE5S70PkrLh0iTDj/zEhgvJRKC2+CvXY6EWc6oQwUR48lL5vCW6jiXQ==", "dev": true }, "canvas-confetti": { @@ -15674,9 +15775,9 @@ "dev": true }, "core-js": { - "version": "3.22.7", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.22.7.tgz", - "integrity": "sha512-Jt8SReuDKVNZnZEzyEQT5eK6T2RRCXkfTq7Lo09kpm+fHjgGewSbNjV+Wt4yZMhPDdzz2x1ulI5z/w4nxpBseg==", + "version": "3.22.8", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.22.8.tgz", + "integrity": "sha512-UoGQ/cfzGYIuiq6Z7vWL1HfkE9U9IZ4Ub+0XSiJTCzvbZzgPA69oDF2f+lgJ6dFFLEdjW5O6svvoKzXX23xFkA==", "dev": true }, "core-util-is": { @@ -16045,9 +16146,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.4.141", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.141.tgz", - "integrity": "sha512-mfBcbqc0qc6RlxrsIgLG2wCqkiPAjEezHxGTu7p3dHHFOurH4EjS9rFZndX5axC8264rI1Pcbw8uQP39oZckeA==", + "version": "1.4.144", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.144.tgz", + "integrity": "sha512-R3RV3rU1xWwFJlSClVWDvARaOk6VUO/FubHLodIASDB3Mc2dzuWvNdfOgH9bwHUTqT79u92qw60NWfwUdzAqdg==", "dev": true }, "elm": { @@ -16083,7 +16184,7 @@ "punycode": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", "dev": true }, "qs": { @@ -16160,6 +16261,29 @@ "binwrap": "^0.2.3" } }, + "elm-material": { + "version": "file:elm-material", + "requires": { + "@material/card": "^14.0.0", + "@material/mwc-button": "^0.26.1", + "@material/mwc-fab": "^0.26.1", + "@material/mwc-icon-button": "^0.26.1", + "@material/mwc-linear-progress": "^0.26.1", + "@material/mwc-list": "^0.26.1", + "@material/mwc-menu": "^0.26.1", + "@material/mwc-select": "^0.26.1", + "@material/mwc-slider": "^0.26.1", + "@material/mwc-switch": "^0.26.1", + "@material/mwc-tab": "^0.26.1", + "@material/mwc-tab-bar": "^0.26.1", + "@material/mwc-textarea": "^0.26.1", + "@material/mwc-textfield": "^0.26.1", + "@webcomponents/webcomponentsjs": "^2.6.0", + "elm": "^0.19.1-5", + "prettier": "2.6.2", + "prettier-plugin-elm": "0.8.0" + } + }, "elm-webpack-loader": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/elm-webpack-loader/-/elm-webpack-loader-8.0.0.tgz", @@ -16462,7 +16586,7 @@ "raw-body": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", - "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", + "integrity": "sha512-Ss0DsBxqLxCmQkfG5yazYhtbVVTJqS9jTsZG2lhrNwqzOk2SUC7O/NB/M//CkEBqsrtmlNgJCPccJGuYSFr6Vg==", "dev": true, "requires": { "bytes": "3.0.0", @@ -17518,19 +17642,13 @@ "lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", - "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", - "dev": true - }, - "lodash.sortby": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", - "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", "dev": true }, "lodash.uniq": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", - "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", + "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==", "dev": true }, "loose-envify": { @@ -17586,7 +17704,7 @@ "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", "dev": true }, "memfs": { @@ -17601,7 +17719,7 @@ "merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", "dev": true }, "merge-stream": { @@ -17613,7 +17731,7 @@ "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", "dev": true }, "micromatch": { @@ -17680,7 +17798,7 @@ "minimist": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "integrity": "sha512-7Wl+Jz+IGWuSdgsQEJ4JunV0si/iMhg42MnQQG6h1R6TNeVenp4U9x5CC5v/gYqz/fENLQITAWXidNtVL0NNbw==", "dev": true }, "minipass": { @@ -17722,7 +17840,7 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, "multicast-dns": { @@ -17808,13 +17926,13 @@ "normalize-range": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", - "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", + "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", "dev": true }, "normalize-url": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-1.9.1.tgz", - "integrity": "sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=", + "integrity": "sha512-A48My/mtCklowHBlI8Fq2jFWK4tX4lJ5E6ytFsSOq1fzpvT0SQSgKhSg7lN5c2uYFOrUAOQp6zhhJnpp1eMloQ==", "dev": true, "requires": { "object-assign": "^4.0.1", @@ -17858,7 +17976,7 @@ "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", "dev": true }, "object-hash": { @@ -17882,7 +18000,7 @@ "on-finished": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", "dev": true, "requires": { "ee-first": "1.1.1" @@ -17897,7 +18015,7 @@ "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, "requires": { "wrappy": "1" @@ -17946,19 +18064,19 @@ "options": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz", - "integrity": "sha1-7CLTEoBrtT5zF3Pnza788cZDEo8=", + "integrity": "sha512-bOj3L1ypm++N+n7CEbbe473A414AB7z+amKYshRb//iuL3MpdDCLhPnw6aVTdKB9g5ZRVHIEp8eUln6L2NUStg==", "dev": true }, "os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "integrity": "sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==", "dev": true }, "os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", "dev": true }, "p-limit": { @@ -18057,13 +18175,13 @@ "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true }, "path-key": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", "dev": true }, "path-parse": { @@ -18075,7 +18193,7 @@ "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", "dev": true }, "path-type": { @@ -18087,7 +18205,7 @@ "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", "dev": true }, "picocolors": { @@ -18105,7 +18223,7 @@ "pify": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", "dev": true }, "pkg-dir": { @@ -18692,12 +18810,12 @@ } }, "postcss-preset-env": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/postcss-preset-env/-/postcss-preset-env-7.6.0.tgz", - "integrity": "sha512-5cnzpSFZnQJOlBu85xn4Nnluy/WjIST/ugn+gOVcKnmFJ+GLtkfRhmJPo/TW9UDpG7oyA467kvDOO8mtcpOL4g==", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/postcss-preset-env/-/postcss-preset-env-7.7.0.tgz", + "integrity": "sha512-2Q9YARQju+j2BVgAyDnW1pIWIMlaHZqbaGISPMmalznNlWcNFIZFQsJfRLXS+WHmHJDCmV7wIWpVf9JNKR4Elw==", "dev": true, "requires": { - "@csstools/postcss-cascade-layers": "^1.0.1", + "@csstools/postcss-cascade-layers": "^1.0.2", "@csstools/postcss-color-function": "^1.1.0", "@csstools/postcss-font-format-keywords": "^1.0.0", "@csstools/postcss-hwb-function": "^1.0.1", @@ -18707,16 +18825,17 @@ "@csstools/postcss-oklab-function": "^1.1.0", "@csstools/postcss-progressive-custom-properties": "^1.3.0", "@csstools/postcss-stepped-value-functions": "^1.0.0", + "@csstools/postcss-trigonometric-functions": "^1.0.0", "@csstools/postcss-unset-value": "^1.0.1", "autoprefixer": "^10.4.7", "browserslist": "^4.20.3", "css-blank-pseudo": "^3.0.3", "css-has-pseudo": "^3.0.4", "css-prefers-color-scheme": "^6.0.3", - "cssdb": "^6.6.1", + "cssdb": "^6.6.2", "postcss-attribute-case-insensitive": "^5.0.0", "postcss-clamp": "^4.1.0", - "postcss-color-functional-notation": "^4.2.2", + "postcss-color-functional-notation": "^4.2.3", "postcss-color-hex-alpha": "^8.0.3", "postcss-color-rebeccapurple": "^7.0.2", "postcss-custom-media": "^8.0.0", @@ -18734,7 +18853,7 @@ "postcss-lab-function": "^4.2.0", "postcss-logical": "^5.0.4", "postcss-media-minmax": "^5.0.0", - "postcss-nesting": "^10.1.6", + "postcss-nesting": "^10.1.7", "postcss-opacity-percentage": "^1.1.2", "postcss-overflow-shorthand": "^3.0.3", "postcss-page-break": "^3.0.4", @@ -18857,7 +18976,7 @@ "prepend-http": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "integrity": "sha512-PhmXi5XmoyKw1Un4E+opM2KcsJInDvKyuOumcjjw3waw86ZNjHwVUOOWLc4bCzLdcKNaWBH9e99sbWzDQsVaYg==", "dev": true }, "prettier": { @@ -18899,7 +19018,7 @@ "process-nextick-args": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "integrity": "sha512-yN0WQmuCX63LP/TMvAg31nvT6m4vDqJEiiv2CAZqWOGNWutc9DfDk1NPYYmKUFmaVM2UwDowH4u5AHWYP/jxKw==", "dev": true }, "proxy-addr": { @@ -18933,7 +19052,7 @@ "query-string": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz", - "integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=", + "integrity": "sha512-O2XLNDBIg1DnTOa+2XrIwSiXEV8h2KImXUnjhhn2+UsvZ+Es2uyd5CCRTNQlDGbzUQOW3aYCBx9rVA6dzsiY7Q==", "dev": true, "requires": { "object-assign": "^4.1.0", @@ -19812,25 +19931,22 @@ "dev": true }, "terser": { - "version": "5.13.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.13.1.tgz", - "integrity": "sha512-hn4WKOfwnwbYfe48NgrQjqNOH9jzLqRcIfbYytOXCOv46LBfWr9bDS17MQqOi+BWGD0sJK3Sj5NC/gJjiojaoA==", + "version": "5.14.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.14.0.tgz", + "integrity": "sha512-JC6qfIEkPBd9j1SMO3Pfn+A6w2kQV54tv+ABQLgZr7dA3k/DL/OBoYSWxzVpZev3J+bUHXfr55L8Mox7AaNo6g==", "dev": true, "requires": { + "@jridgewell/source-map": "^0.3.2", "acorn": "^8.5.0", "commander": "^2.20.0", - "source-map": "~0.8.0-beta.0", "source-map-support": "~0.5.20" }, "dependencies": { "source-map": { - "version": "0.8.0-beta.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.8.0-beta.0.tgz", - "integrity": "sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==", - "dev": true, - "requires": { - "whatwg-url": "^7.0.0" - } + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true }, "source-map-support": { "version": "0.5.21", @@ -19840,28 +19956,20 @@ "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } } } } }, "terser-webpack-plugin": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.1.tgz", - "integrity": "sha512-GvlZdT6wPQKbDNW/GDQzZFg/j4vKU96yl2q6mcUkzKOgW4gwf1Z8cZToUCrz31XHlPWH8MVb1r2tFtdDtTGJ7g==", + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.3.tgz", + "integrity": "sha512-Fx60G5HNYknNTNQnzQ1VePRuu89ZVYWfjRAeT5rITuCY/1b08s49e5kSQwHDirKZWuoKOBRFS98EUUoZ9kLEwQ==", "dev": true, "requires": { + "@jridgewell/trace-mapping": "^0.3.7", "jest-worker": "^27.4.5", "schema-utils": "^3.1.1", "serialize-javascript": "^6.0.0", - "source-map": "^0.6.1", "terser": "^5.7.2" }, "dependencies": { @@ -19900,12 +20008,6 @@ "ajv": "^6.12.5", "ajv-keywords": "^3.5.2" } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true } } }, @@ -19965,15 +20067,6 @@ "punycode": "^2.1.1" } }, - "tr46": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", - "integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, "traverse": { "version": "0.3.9", "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz", @@ -20184,9 +20277,9 @@ } }, "watchpack": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.3.1.tgz", - "integrity": "sha512-x0t0JuydIo8qCNctdDrn1OzH/qDzk2+rdCOC3YzumZ42fiMqmQ7T3xQurykYMhYfHaPHTp4ZxAx2NfUo1K6QaA==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", + "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", "dev": true, "requires": { "glob-to-regexp": "^0.4.1", @@ -20202,16 +20295,10 @@ "minimalistic-assert": "^1.0.0" } }, - "webidl-conversions": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", - "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", - "dev": true - }, "webpack": { - "version": "5.72.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.72.1.tgz", - "integrity": "sha512-dXG5zXCLspQR4krZVR6QgajnZOjW2K/djHvdcRaDQvsjV9z9vaW6+ja5dZOYbqBBjF6kGXka/2ZyxNdc+8Jung==", + "version": "5.73.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.73.0.tgz", + "integrity": "sha512-svjudQRPPa0YiOYa2lM/Gacw0r6PvxptHj4FuEKQ2kX05ZLkjbVc5MnPs6its5j7IZljnIqSVo/OsY2X0IpHGA==", "dev": true, "requires": { "@types/eslint-scope": "^3.7.3", @@ -20333,9 +20420,9 @@ } }, "webpack-dev-server": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.9.0.tgz", - "integrity": "sha512-+Nlb39iQSOSsFv0lWUuUTim3jDQO8nhK3E68f//J2r5rIcp4lULHXz2oZ0UVdEeWXEh5lSzYUlzarZhDAeAVQw==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.9.1.tgz", + "integrity": "sha512-CTMfu2UMdR/4OOZVHRpdy84pNopOuigVIsRbGX3LVDMWNP8EUgC5mUBMErbwBlHTEX99ejZJpVqrir6EXAEajA==", "dev": true, "requires": { "@types/bonjour": "^3.5.9", @@ -20362,7 +20449,7 @@ "schema-utils": "^4.0.0", "selfsigned": "^2.0.1", "serve-index": "^1.9.1", - "sockjs": "^0.3.21", + "sockjs": "^0.3.24", "spdy": "^4.0.2", "webpack-dev-middleware": "^5.3.1", "ws": "^8.4.2" @@ -20650,17 +20737,6 @@ "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", "dev": true }, - "whatwg-url": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", - "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", - "dev": true, - "requires": { - "lodash.sortby": "^4.7.0", - "tr46": "^1.0.1", - "webidl-conversions": "^4.0.2" - } - }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", diff --git a/client/package.json b/client/package.json index f9af4204..38d2bbbc 100644 --- a/client/package.json +++ b/client/package.json @@ -22,22 +22,10 @@ "> 0.2%" ], "dependencies": { + "@webcomponents/webcomponentsjs": "^2.6.0", "@fortawesome/fontawesome-svg-core": "^6.1.1", - "@material/card": "^14.0.0", - "@material/mwc-button": "^0.26.1", - "@material/mwc-fab": "^0.26.1", - "@material/mwc-icon-button": "^0.26.1", - "@material/mwc-linear-progress": "^0.26.1", - "@material/mwc-menu": "^0.26.1", - "@material/mwc-select": "^0.26.1", - "@material/mwc-slider": "^0.26.1", - "@material/mwc-switch": "^0.26.1", - "@material/mwc-tab": "^0.26.1", - "@material/mwc-tab-bar": "^0.26.1", - "@material/mwc-textarea": "^0.26.1", - "@material/mwc-textfield": "^0.26.1", + "elm-material": "file:elm-material", "@polymer/paper-tooltip": "^3.0.1", - "@webcomponents/webcomponentsjs": "^2.5.0", "canvas-confetti": "^1.3.2" }, "devDependencies": { diff --git a/client/src/elm/MassiveDecks/Card/Call/Editor.elm b/client/src/elm/MassiveDecks/Card/Call/Editor.elm index d1eb5c26..75eee0d4 100644 --- a/client/src/elm/MassiveDecks/Card/Call/Editor.elm +++ b/client/src/elm/MassiveDecks/Card/Call/Editor.elm @@ -24,7 +24,6 @@ import MassiveDecks.Strings as Strings exposing (MdString) import MassiveDecks.Strings.Languages as Lang import MassiveDecks.Util.Html as Html import MassiveDecks.Util.Maybe as Maybe -import MassiveDecks.Util.NeList as NeList import Material.Button as Button import Material.IconButton as IconButton import Material.TextArea as TextArea @@ -132,10 +131,13 @@ view wrap shared { parts, selected, error } = addSlot = addAction (Parts.Slot nextSlotIndex Part.NoTransform Part.NoStyle) + inlineButton string icon action = + Button.view Button.Outlined Button.Padded (string |> Lang.string shared) (Just icon) action + inlineControls = Html.p [] - [ Button.view shared Button.Outlined Strings.AddText Strings.AddText (Icon.add |> Icon.view) [ addAction (Parts.Text "..." Part.NoStyle) |> HtmlE.onClick ] - , Button.view shared Button.Outlined Strings.AddSlot Strings.AddSlot (Icon.add |> Icon.view) [ addSlot |> HtmlE.onClick ] + [ inlineButton Strings.AddText (Icon.add |> Icon.view) (Parts.Text "..." Part.NoStyle |> addAction |> Just) + , inlineButton Strings.AddSlot (Icon.add |> Icon.view) (Just addSlot) ] selectedPart = @@ -166,13 +168,12 @@ view wrap shared { parts, selected, error } = in Form.section shared "part-editor" - (TextField.view shared - Strings.Blank + (TextField.viewWithAttrs + (Strings.Blank |> Lang.string shared) TextField.Number (slotIndex + 1 |> String.fromInt) - [ HtmlA.min "1" - , HtmlE.onInput setSlotIndex - ] + (setSlotIndex |> Just) + [ HtmlA.min "1" ] ) [ Message.info Strings.SlotIndexExplanation ] @@ -242,18 +243,21 @@ controls wrap shared max selected = move by test = index |> Maybe.andThen (\i -> Move i by |> wrap |> Maybe.justIf (test i)) + iconButton string icon action = + IconButton.view icon (string |> Lang.string shared) action + generalControls = - [ IconButton.view shared Strings.Remove (Icon.remove |> NeList.just) (index |> Maybe.map (Remove >> wrap)) - , IconButton.view shared Strings.MoveLeft (Icon.left |> NeList.just) (move -1 ((<) 0)) - , IconButton.view shared Strings.MoveRight (Icon.right |> NeList.just) (move 1 ((>) max)) + [ iconButton Strings.Remove (Icon.remove |> Icon.view) (index |> Maybe.map (Remove >> wrap)) + , iconButton Strings.MoveLeft (Icon.left |> Icon.view) (move -1 ((<) 0)) + , iconButton Strings.MoveRight (Icon.right |> Icon.view) (move 1 ((>) max)) ] setIfDifferent old updated new = index |> Maybe.andThen (\i -> Set i (updated new) |> wrap |> Maybe.justIf (old /= new)) styleControls setStyle = - [ IconButton.view shared Strings.Normal (Icon.normalText |> NeList.just) (setStyle Part.NoStyle) - , IconButton.view shared Strings.Emphasise (Icon.italicText |> NeList.just) (setStyle Part.Em) + [ iconButton Strings.Normal (Icon.normalText |> Icon.view) (setStyle Part.NoStyle) + , iconButton Strings.Emphasise (Icon.italicText |> Icon.view) (setStyle Part.Em) ] transformControls setTransform = @@ -261,9 +265,9 @@ controls wrap shared max selected = textIcon text = Icon.layers [] [ Icon.text [] text ] in - [ IconButton.viewCustomIcon shared Strings.Normal (textIcon "aa") (setTransform Part.NoTransform) - , IconButton.viewCustomIcon shared Strings.Capitalise (textIcon "Aa") (setTransform Part.Capitalize) - , IconButton.viewCustomIcon shared Strings.UpperCase (textIcon "AA") (setTransform Part.UpperCase) + [ iconButton Strings.Normal (textIcon "aa") (setTransform Part.NoTransform) + , iconButton Strings.Capitalise (textIcon "Aa") (setTransform Part.Capitalize) + , iconButton Strings.UpperCase (textIcon "AA") (setTransform Part.UpperCase) ] ( replaceStyle, replaceTransform ) = diff --git a/client/src/elm/MassiveDecks/Card/Source.elm b/client/src/elm/MassiveDecks/Card/Source.elm index ffdb58ef..44507d3e 100644 --- a/client/src/elm/MassiveDecks/Card/Source.elm +++ b/client/src/elm/MassiveDecks/Card/Source.elm @@ -196,14 +196,16 @@ generalEditor shared existing currentValue update submit noOp = , meta = Nothing } in - ( Select.view shared - { label = Strings.DeckSource + ( Select.view + { label = Strings.DeckSource |> Lang.string shared , idToString = generalToString , idFromString = generalFromString , selected = currentValue |> generalMatching |> Just , wrap = Maybe.map (empty shared) >> Maybe.withDefault (default shared) >> update + , disabled = False + , fullWidth = True + , attrs = [ HtmlA.id "source-selector", HtmlA.class "primary" ] } - [ HtmlA.id "source-selector", HtmlA.class "primary" ] (enabledSources |> List.filterMap (Maybe.map toItem)) , editor shared existing currentValue update submit noOp ) diff --git a/client/src/elm/MassiveDecks/Card/Source/BuiltIn.elm b/client/src/elm/MassiveDecks/Card/Source/BuiltIn.elm index 5f7cbfcd..b7e6d8e8 100644 --- a/client/src/elm/MassiveDecks/Card/Source/BuiltIn.elm +++ b/client/src/elm/MassiveDecks/Card/Source/BuiltIn.elm @@ -125,14 +125,16 @@ editor selected shared existing update _ _ = } in Html.div [ HtmlA.class "primary" ] - [ Select.view shared - { label = Strings.Deck + [ Select.view + { label = Strings.Deck |> Lang.string shared , idToString = toString , idFromString = fromString shared.sources.builtIn , selected = Just selected , wrap = Maybe.withDefault (hardcoded "") >> Source.BuiltIn >> update + , disabled = False + , fullWidth = True + , attrs = [ HtmlA.id "built-in-selector" ] } - [ HtmlA.id "built-in-selector" ] (decks |> NeList.toList |> List.sortWith (sortClosestFirst (Lang.currentLanguage shared |> Lang.code) |> Order.map .language) diff --git a/client/src/elm/MassiveDecks/Card/Source/JsonAgainstHumanity.elm b/client/src/elm/MassiveDecks/Card/Source/JsonAgainstHumanity.elm index e4444776..1aa86145 100644 --- a/client/src/elm/MassiveDecks/Card/Source/JsonAgainstHumanity.elm +++ b/client/src/elm/MassiveDecks/Card/Source/JsonAgainstHumanity.elm @@ -15,6 +15,7 @@ import MassiveDecks.Icon as Icon import MassiveDecks.Model exposing (..) import MassiveDecks.Pages.Lobby.Configure.Decks.Model exposing (DeckOrError) import MassiveDecks.Strings as Strings exposing (MdString) +import MassiveDecks.Strings.Languages as Lang import MassiveDecks.Util.Html as Html import MassiveDecks.Util.Maybe as Maybe import Material.Select as Select @@ -111,14 +112,16 @@ editor selected shared existing update _ _ = } in Html.span [ HtmlA.id "json-against-humanity-editor", HtmlA.class "primary" ] - [ Select.view shared - { label = Strings.Deck + [ Select.view + { label = Strings.Deck |> Lang.string shared , idToString = toString , idFromString = fromString shared.sources.jsonAgainstHumanity , selected = Just selected , wrap = Maybe.withDefault (hardcoded "") >> Source.JsonAgainstHumanity >> update + , disabled = False + , fullWidth = True + , attrs = [ HtmlA.id "built-in-selector" ] } - [ HtmlA.id "built-in-selector" ] (decks |> List.map deck) ] diff --git a/client/src/elm/MassiveDecks/Card/Source/ManyDecks.elm b/client/src/elm/MassiveDecks/Card/Source/ManyDecks.elm index 95f4b4c1..8b6b7be5 100644 --- a/client/src/elm/MassiveDecks/Card/Source/ManyDecks.elm +++ b/client/src/elm/MassiveDecks/Card/Source/ManyDecks.elm @@ -6,8 +6,6 @@ module MassiveDecks.Card.Source.ManyDecks exposing import FontAwesome as Icon import Html as Html exposing (Html) import Html.Attributes as HtmlA -import Html.Events as HtmlE -import Json.Decode as Json import MassiveDecks.Card.Source.ManyDecks.Model exposing (..) import MassiveDecks.Card.Source.Methods as Source import MassiveDecks.Card.Source.Model as Source @@ -93,15 +91,13 @@ problems dc () = editor : DeckCode -> Shared -> List DeckOrError -> (Source.External -> msg) -> Maybe msg -> msg -> Html msg editor dc shared _ update submit noOp = Html.div [ HtmlA.class "primary" ] - [ TextField.view shared - Strings.ManyDecksDeckCodeTitle + [ TextField.viewWithReturn + (Strings.ManyDecksDeckCodeTitle |> Lang.string shared) TextField.Text (dc |> toString) - [ HtmlE.onInput (deckCode >> Source.ManyDecks >> update) - , HtmlE.keyCode - |> Json.map (\k -> submit |> Maybe.andThen (Maybe.justIf (k == 13)) |> Maybe.withDefault noOp) - |> HtmlE.on "keydown" - ] + (deckCode >> Source.ManyDecks >> update |> Just) + (submit |> Maybe.withDefault noOp) + noOp ] diff --git a/client/src/elm/MassiveDecks/Components/Menu.elm b/client/src/elm/MassiveDecks/Components/ContextMenu.elm similarity index 60% rename from client/src/elm/MassiveDecks/Components/Menu.elm rename to client/src/elm/MassiveDecks/Components/ContextMenu.elm index 9a01d2e1..5754b067 100644 --- a/client/src/elm/MassiveDecks/Components/Menu.elm +++ b/client/src/elm/MassiveDecks/Components/ContextMenu.elm @@ -1,4 +1,4 @@ -module MassiveDecks.Components.Menu exposing +module MassiveDecks.Components.ContextMenu exposing ( button , link , open @@ -10,7 +10,7 @@ import FontAwesome as Icon exposing (Icon) import Html exposing (Html) import Html.Attributes as HtmlA import Html.Attributes.Aria as HtmlA -import MassiveDecks.Components.Menu.Model exposing (..) +import MassiveDecks.Components.ContextMenu.Model exposing (..) import MassiveDecks.Model exposing (..) import MassiveDecks.Strings exposing (MdString) import MassiveDecks.Strings.Languages as Lang @@ -22,25 +22,25 @@ import Material.Menu as Menu {-| Toggle the state of a menu. -} -toggle : State -> State +toggle : Menu.State -> Menu.State toggle state = case state of - Open -> - Closed + Menu.Open -> + Menu.Closed - Closed -> - Open + Menu.Closed -> + Menu.Open {-| Get an open state from a boolean indicating if the menu is open. -} -open : Bool -> State +open : Bool -> Menu.State open isOpen = if isOpen then - Open + Menu.Open else - Closed + Menu.Closed {-| Convenience function for a menu button. @@ -59,7 +59,7 @@ link icon text description href = {-| Render a menu to Html. -} -view : Shared -> msg -> State -> Corner -> Html msg -> Menu msg -> Html msg +view : Shared -> msg -> Menu.State -> Menu.Corner -> Html msg -> Menu msg -> Html msg view shared onClose state corner anchor menu = Menu.view onClose state corner anchor (menu |> List.map (menuItem shared)) @@ -72,24 +72,30 @@ menuItem : Shared -> Part msg -> Html msg menuItem shared mi = case mi of Button { icon, text, description } action -> - ListView.viewItem (ListView.action action) - (Just icon) - (description |> Lang.string shared) - Nothing + ListView.viewItem + (ListView.Button action) + (icon |> Icon.view |> Just) + ([ description |> Lang.string shared |> Html.text ] |> Just) Nothing [ text |> Lang.string shared |> Html.text ] Link { icon, text, description } href -> + let + linkify = + List.singleton + >> Html.blankA + [ href + |> Maybe.map HtmlA.href + |> Maybe.withDefault HtmlA.nothing + ] + in -- TODO: Deal with being disabled in a decent way. - Html.blankA [ href |> Maybe.map HtmlA.href |> Maybe.withDefault HtmlA.nothing ] - [ ListView.viewItem - ListView.Link - (Just icon) - (description |> Lang.string shared) - Nothing - Nothing - [ text |> Lang.string shared |> Html.text ] - ] + ListView.viewItem + (ListView.Link linkify) + (icon |> Icon.view |> Just) + ([ description |> Lang.string shared |> Html.text ] |> Just) + Nothing + [ text |> Lang.string shared |> Html.text ] Separator -> Html.li [ HtmlA.attribute "divider" "divider", HtmlA.role "separator" ] [] diff --git a/client/src/elm/MassiveDecks/Components/Menu/Model.elm b/client/src/elm/MassiveDecks/Components/ContextMenu/Model.elm similarity index 53% rename from client/src/elm/MassiveDecks/Components/Menu/Model.elm rename to client/src/elm/MassiveDecks/Components/ContextMenu/Model.elm index 20c3551f..ed3ed592 100644 --- a/client/src/elm/MassiveDecks/Components/Menu/Model.elm +++ b/client/src/elm/MassiveDecks/Components/ContextMenu/Model.elm @@ -1,9 +1,7 @@ -module MassiveDecks.Components.Menu.Model exposing - ( Corner(..) - , Item +module MassiveDecks.Components.ContextMenu.Model exposing + ( Item , Menu , Part(..) - , State(..) ) import FontAwesome as Icon exposing (Icon) @@ -32,23 +30,3 @@ type alias Item = , text : MdString , description : MdString } - - -{-| The corner of the anchor element the menu should position itself at. --} -type Corner - = TopLeft - | TopRight - | BottomLeft - | BottomRight - | TopStart - | TopEnd - | BottomStart - | BottomEnd - - -{-| If the menu is visible or not. --} -type State - = Open - | Closed diff --git a/client/src/elm/MassiveDecks/Components/Form/Message.elm b/client/src/elm/MassiveDecks/Components/Form/Message.elm index 6ac8ee3e..deb45d25 100644 --- a/client/src/elm/MassiveDecks/Components/Form/Message.elm +++ b/client/src/elm/MassiveDecks/Components/Form/Message.elm @@ -21,7 +21,6 @@ import MassiveDecks.Model exposing (..) import MassiveDecks.Models.MdError as MdError exposing (MdError) import MassiveDecks.Strings exposing (MdString) import MassiveDecks.Strings.Languages as Lang -import MassiveDecks.Util.NeList as NeList exposing (NeList(..)) import Material.IconButton as IconButton import Svg.Attributes as Svg @@ -137,4 +136,8 @@ internalMessage shared { severity, description, fixes } = viewFix : Shared -> Fix msg -> Html msg viewFix shared { icon, description, action } = - Html.li [] [ IconButton.view shared description (icon |> NeList.just) (Just action) ] + Html.li [] + [ IconButton.view (icon |> Icon.view) + (description |> Lang.string shared) + (Just action) + ] diff --git a/client/src/elm/MassiveDecks/Error/Overlay.elm b/client/src/elm/MassiveDecks/Error/Overlay.elm index 91607b19..8fc4e1f6 100644 --- a/client/src/elm/MassiveDecks/Error/Overlay.elm +++ b/client/src/elm/MassiveDecks/Error/Overlay.elm @@ -30,13 +30,13 @@ view shared route model = else [ Html.div [ HtmlA.class "error-overlay" ] [ Html.div [ HtmlA.class "actions" ] - [ IconButton.view shared - Strings.Close - (Icon.close |> NeList.just) + [ IconButton.view + (Icon.close |> Icon.view) + (Strings.Close |> Lang.string shared) (Clear |> Global.ErrorMsg |> Just) - , IconButton.view shared - Strings.Refresh - (Icon.redo |> NeList.just) + , IconButton.view + (Icon.redo |> Icon.view) + (Strings.Refresh |> Lang.string shared) (Just Global.Refresh) ] , Card.view [ HtmlA.class "help" ] diff --git a/client/src/elm/MassiveDecks/Game.elm b/client/src/elm/MassiveDecks/Game.elm index 50e5ee2a..ded1ed49 100644 --- a/client/src/elm/MassiveDecks/Game.elm +++ b/client/src/elm/MassiveDecks/Game.elm @@ -13,6 +13,7 @@ import Browser.Events as Browser import Dict exposing (Dict) import FontAwesome as Icon import FontAwesome.Attributes as Icon +import FontAwesome.Layering as Icon import Html exposing (Html) import Html.Attributes as HtmlA import Html.Events as HtmlE @@ -1173,14 +1174,13 @@ viewWinner wrapLobby shared users localUser winners = let configureNextGame = if users |> Dict.get localUser |> Maybe.map (.privilege >> (==) User.Privileged) |> Maybe.withDefault False then - Button.view shared + Button.viewWithAttrs Button.Raised - Strings.ConfigureNextGame - Strings.ConfigureNextGame - (Icon.configure |> Icon.view) - [ HtmlA.id "new-game-config" - , Lobby.Configure |> Just |> Lobby.ChangeSection |> wrapLobby |> HtmlE.onClick - ] + Button.Padded + (Strings.ConfigureNextGame |> Lang.string shared) + (Icon.configure |> Icon.view |> Just) + (Lobby.Configure |> Just |> Lobby.ChangeSection |> wrapLobby |> Just) + [ HtmlA.id "new-game-config" ] else Html.nothing @@ -1257,7 +1257,7 @@ viewRound wrap shared auth timeAnchor config users model = -- TODO: Hide this when at top. Waiting on native elm scroll events, as currently we'd have to ping constantly. , Html.div [ HtmlA.class "scroll-top" ] - [ IconButton.view shared Strings.ScrollToTop (Icon.toTop |> NeList.just) (ScrollToTop |> wrap |> Just) ] + [ IconButton.view (Icon.toTop |> Icon.view) (Strings.ScrollToTop |> Lang.string shared) (ScrollToTop |> wrap |> Just) ] , renderDiscarded wrap shared config users model.discarded |> Maybe.withDefault Html.nothing ] @@ -1278,12 +1278,12 @@ renderDiscarded wrap shared config users discarded = [ Strings.Discarded { player = name } |> Lang.html shared ] , card |> Response.view shared config Card.Front [] - , Button.view shared + , Button.view Button.Standard - Strings.Accept - Strings.Accept - (Icon.accept |> Icon.view) - [ DismissDiscard |> wrap |> HtmlE.onClick ] + Button.Padded + (Strings.Accept |> Lang.string shared) + (Icon.accept |> Icon.view |> Just) + (DismissDiscard |> wrap |> Just) ] ] |> Just @@ -1297,15 +1297,16 @@ toggleHelp wrap shared enabled = let extra = if enabled then - [ Icon.slash |> Icon.styled [ Icon.fw ] ] + [ Icon.slash |> Icon.styled [ Icon.fw ] |> Icon.view ] else [] icon = - Icon.help |> Icon.styled [ Icon.fw ] |> NeList.just |> NeList.extend extra + ((Icon.help |> Icon.styled [ Icon.fw ] |> Icon.view) :: extra) + |> Icon.layers [] in - IconButton.view shared Strings.ViewHelpAction icon (ToggleHelp |> wrap |> Just) + IconButton.view icon (Strings.ViewHelpAction |> Lang.string shared) (ToggleHelp |> wrap |> Just) timer : Time.Anchor -> Model -> Html msg @@ -1406,9 +1407,9 @@ minorActions wrap shared auth game helpEnabled = enforceTimeLimit = if timedOut && game.rules.stages.mode == Rules.Soft then - IconButton.view shared - Strings.EnforceTimeLimitAction - (Icon.skip |> NeList.just) + IconButton.view + (Icon.skip |> Icon.view) + (Strings.EnforceTimeLimitAction |> Lang.string shared) (EnforceTimeLimit |> wrap |> Just) |> Just @@ -1439,17 +1440,17 @@ discardButton wrap shared game = _ -> Nothing in - IconButton.view shared - Strings.Discard - (Icon.discard |> NeList.just) + IconButton.view + (Icon.discard |> Icon.view) + (Strings.Discard |> Lang.string shared) action historyButton : (Msg -> msg) -> Shared -> Html msg historyButton wrap shared = - IconButton.view shared - Strings.ViewGameHistoryAction - (Icon.history |> NeList.just) + IconButton.view + (Icon.history |> Icon.view) + (Strings.ViewGameHistoryAction |> Lang.string shared) (ToggleHistoryView |> wrap |> Just) @@ -1463,9 +1464,9 @@ rebootButton wrap shared score reboot = else Redraw |> wrap |> Just in - IconButton.view shared - ({ cost = reboot.cost } |> Strings.HouseRuleRebootAction) - (Icon.random |> NeList.just) + IconButton.view + (Icon.random |> Icon.view) + ({ cost = reboot.cost } |> Strings.HouseRuleRebootAction |> Lang.string shared) action diff --git a/client/src/elm/MassiveDecks/Game/Action.elm b/client/src/elm/MassiveDecks/Game/Action.elm index 3d533c8c..65f03c9a 100644 --- a/client/src/elm/MassiveDecks/Game/Action.elm +++ b/client/src/elm/MassiveDecks/Game/Action.elm @@ -8,6 +8,7 @@ import MassiveDecks.Game.Messages as Game exposing (Msg) import MassiveDecks.Icon as Icon import MassiveDecks.Model exposing (..) import MassiveDecks.Strings as Strings exposing (MdString) +import MassiveDecks.Strings.Languages as Lang import Material.Fab as Fab @@ -64,10 +65,10 @@ viewSingle wrap shared visible action = Discard -> IconView Icon.discard normal Fab.Mini Strings.HouseRuleNeverHaveIEver Game.Discard in - Fab.view shared + Fab.view type_ - title - icon + (title |> Lang.string shared) + (icon |> Icon.view) (onClick |> wrap |> Just) (HtmlA.classList [ ( "action", True ), ( "exited", visible /= Just action ) ] :: attrs) diff --git a/client/src/elm/MassiveDecks/Game/History.elm b/client/src/elm/MassiveDecks/Game/History.elm index 925bcf5f..4f7d3402 100644 --- a/client/src/elm/MassiveDecks/Game/History.elm +++ b/client/src/elm/MassiveDecks/Game/History.elm @@ -16,9 +16,9 @@ import MassiveDecks.Icon as Icon import MassiveDecks.Model exposing (Shared) import MassiveDecks.Pages.Lobby.Configure.Model exposing (Config) import MassiveDecks.Strings as Strings +import MassiveDecks.Strings.Languages as Lang import MassiveDecks.User as User exposing (User) import MassiveDecks.Util.Maybe as Maybe -import MassiveDecks.Util.NeList as NeList import Material.IconButton as IconButton @@ -26,9 +26,9 @@ view : (Msg -> msg) -> Shared -> Config -> Dict User.Id User -> String -> List ( view wrap shared config users name history = [ Html.div [ HtmlA.id "top-content" ] [ Html.div [ HtmlA.id "minor-actions" ] - [ IconButton.view shared - Strings.ViewGameHistoryAction - (Icon.back |> NeList.just) + [ IconButton.view + (Icon.back |> Icon.view) + (Strings.ViewGameHistoryAction |> Lang.string shared) (ToggleHistoryView |> wrap |> Just) ] ] diff --git a/client/src/elm/MassiveDecks/Pages/Lobby.elm b/client/src/elm/MassiveDecks/Pages/Lobby.elm index 8ff24ffe..a2ebe319 100644 --- a/client/src/elm/MassiveDecks/Pages/Lobby.elm +++ b/client/src/elm/MassiveDecks/Pages/Lobby.elm @@ -23,9 +23,9 @@ import MassiveDecks.Animated as Animated exposing (Animated) import MassiveDecks.Card.Model as Card import MassiveDecks.Cast.Client as Cast import MassiveDecks.Cast.Model as Cast +import MassiveDecks.Components.ContextMenu as ContextMenu +import MassiveDecks.Components.ContextMenu.Model as ContextMenu import MassiveDecks.Components.Form.Message as Message exposing (Message) -import MassiveDecks.Components.Menu as Menu -import MassiveDecks.Components.Menu.Model as Menu import MassiveDecks.Error as MdError import MassiveDecks.Error.Model as Error exposing (Error) import MassiveDecks.Game as Game @@ -64,6 +64,7 @@ import MassiveDecks.Util.NeList as NeList import Material.Button as Button import Material.Card as Card import Material.IconButton as IconButton +import Material.Menu as Menu changeRoute : Shared -> Route -> Model -> Route.Fork ( Model, Cmd msg ) @@ -573,9 +574,9 @@ viewWithUsers wrap wrapSettings shared s viewContent model = (Html.div [ HtmlA.id "top-bar" ] [ Html.div [ HtmlA.class "left" ] (List.concat - [ [ IconButton.view shared - Strings.ToggleUserList - (usersIcon |> Icon.styled [ Icon.lg ] |> NeList.just) + [ [ IconButton.view + (usersIcon |> Icon.styled [ Icon.lg ] |> Icon.view) + (Strings.ToggleUserList |> Lang.string shared) (usersShown |> not |> Settings.ChangeOpenUserList |> wrapSettings |> Just) , lobbyMenu wrap shared model.gameMenu model.route s audienceMode localUser localPlayer (maybeGame |> Maybe.map .game) ] @@ -654,7 +655,7 @@ lobbyMenu : (Msg -> msg) -> Shared -> Menu.State -> Route -> Section -> Bool -> lobbyMenu wrap shared menuState r s audienceMode user player game = let lobbyMenuItems = - [ Menu.button Icon.invite Strings.InvitePlayers Strings.InvitePlayersDescription (ToggleInviteDialog |> wrap |> Just) ] + [ ContextMenu.button Icon.invite Strings.InvitePlayers Strings.InvitePlayersDescription (ToggleInviteDialog |> wrap |> Just) ] setPresence = setPresenceMenuItem wrap player @@ -662,17 +663,17 @@ lobbyMenu wrap shared menuState r s audienceMode user player game = playerState role = case role of User.Player -> - Menu.button Icon.spectator Strings.BecomeSpectator Strings.BecomeSpectatorDescription (SetUserRole Nothing User.Spectator |> wrap |> Just) + ContextMenu.button Icon.spectator Strings.BecomeSpectator Strings.BecomeSpectatorDescription (SetUserRole Nothing User.Spectator |> wrap |> Just) User.Spectator -> - Menu.button Icon.player Strings.BecomePlayer Strings.BecomePlayerDescription (SetUserRole Nothing User.Player |> wrap |> Just) + ContextMenu.button Icon.player Strings.BecomePlayer Strings.BecomePlayerDescription (SetUserRole Nothing User.Player |> wrap |> Just) userLobbyMenuItems = [ setPresence |> Just , user |> Maybe.andThen (\u -> u |> Maybe.justIf (u.privilege == User.Privileged || not audienceMode)) |> Maybe.map (.role >> playerState) - , Menu.button + , ContextMenu.button Icon.leave Strings.LeaveGame Strings.LeaveGameDescription @@ -682,22 +683,22 @@ lobbyMenu wrap shared menuState r s audienceMode user player game = |> List.filterMap identity viewMenuItems = - [ Menu.link Icon.spectator Strings.Spectate Strings.SpectateDescription ({ r | section = Just Spectate } |> Route.Lobby |> Route.url |> Just) + [ ContextMenu.link Icon.spectator Strings.Spectate Strings.SpectateDescription ({ r | section = Just Spectate } |> Route.Lobby |> Route.url |> Just) , case s of Configure -> - Menu.button Icon.start Strings.ReturnViewToGame Strings.ReturnViewToGameDescription (Nothing |> ChangeSection |> wrap |> Maybe.justIf (game /= Nothing)) + ContextMenu.button Icon.start Strings.ReturnViewToGame Strings.ReturnViewToGameDescription (Nothing |> ChangeSection |> wrap |> Maybe.justIf (game /= Nothing)) _ -> - Menu.button Icon.configure Strings.ViewConfiguration Strings.ViewConfigurationDescription (Configure |> Just |> ChangeSection |> wrap |> Just) + ContextMenu.button Icon.configure Strings.ViewConfiguration Strings.ViewConfigurationDescription (Configure |> Just |> ChangeSection |> wrap |> Just) ] privilegedLobbyMenuItems = - [ Menu.button Icon.end Strings.EndGame Strings.EndGameDescription (game |> Maybe.andThen (\g -> EndGame |> wrap |> Maybe.justIf (g.winner == Nothing))) + [ ContextMenu.button Icon.end Strings.EndGame Strings.EndGameDescription (game |> Maybe.andThen (\g -> EndGame |> wrap |> Maybe.justIf (g.winner == Nothing))) ] mdMenuItems = - [ Menu.link Icon.info Strings.AboutTheGame Strings.AboutTheGameDescription (Just "https://github.com/lattyware/massivedecks") - , Menu.link Icon.bug Strings.ReportError Strings.ReportErrorDescription (Just "https://github.com/Lattyware/massivedecks/issues/new") + [ ContextMenu.link Icon.info Strings.AboutTheGame Strings.AboutTheGameDescription (Just "https://github.com/lattyware/massivedecks") + , ContextMenu.link Icon.bug Strings.ReportError Strings.ReportErrorDescription (Just "https://github.com/Lattyware/massivedecks/issues/new") ] menuItems = @@ -709,16 +710,16 @@ lobbyMenu wrap shared menuState r s audienceMode user player game = ] separatedMenuItems = - menuItems |> List.filterMap identity |> List.intersperse [ Menu.Separator ] |> List.concat + menuItems |> List.filterMap identity |> List.intersperse [ ContextMenu.Separator ] |> List.concat in - Menu.view shared + ContextMenu.view shared (Menu.Closed |> SetGameMenuState |> wrap) menuState Menu.BottomEnd - (IconButton.view shared - Strings.GameMenu - (Icon.menu |> Icon.styled [ Icon.lg ] |> NeList.just) - (menuState |> Menu.toggle |> SetGameMenuState |> wrap |> Just) + (IconButton.view + (Icon.menu |> Icon.styled [ Icon.lg ] |> Icon.view) + (Strings.GameMenu |> Lang.string shared) + (menuState |> ContextMenu.toggle |> SetGameMenuState |> wrap |> Just) ) separatedMenuItems @@ -871,14 +872,13 @@ viewNotification wrap shared users animationState notification = [ Html.div [ HtmlA.class "content" ] [ Html.span [ HtmlA.class "icon" ] [ icon ] , Html.span [ HtmlA.class "message" ] [ message ] - , Button.view shared + , Button.viewWithAttrs Button.Standard - Strings.Dismiss - Strings.Dismiss - Html.nothing - [ notification |> Animated.Exit |> NotificationMsg |> wrap |> HtmlE.onClick - , HtmlA.class "action" - ] + Button.Padded + (Strings.Dismiss |> Lang.string shared) + Nothing + (notification |> Animated.Exit |> NotificationMsg |> wrap |> Just) + [ HtmlA.class "action" ] ] ] @@ -990,7 +990,8 @@ viewUser wrap shared localUserId localUserPrivilege audienceMode openUserMenu ga if localUserId /= userId then case user.privilege of User.Unprivileged -> - [ Menu.button Icon.userPromote + [ ContextMenu.button + Icon.userPromote Strings.Promote Strings.Promote (SetPrivilege userId User.Privileged |> wrap |> Just) @@ -998,7 +999,7 @@ viewUser wrap shared localUserId localUserPrivilege audienceMode openUserMenu ga ] User.Privileged -> - [ Menu.button + [ ContextMenu.button Icon.userDemote Strings.Demote Strings.Demote @@ -1016,7 +1017,7 @@ viewUser wrap shared localUserId localUserPrivilege audienceMode openUserMenu ga if (localUserId == userId && not audienceMode) || localUserPrivilege == User.Privileged then case user.role of User.Player -> - [ Menu.button Icon.spectator + [ ContextMenu.button Icon.spectator Strings.BecomeSpectator Strings.BecomeSpectatorDescription (SetUserRole (Just userId) User.Spectator |> wrap |> Just) @@ -1024,7 +1025,7 @@ viewUser wrap shared localUserId localUserPrivilege audienceMode openUserMenu ga ] User.Spectator -> - [ Menu.button Icon.player + [ ContextMenu.button Icon.player Strings.BecomePlayer Strings.BecomePlayerDescription (SetUserRole (Just userId) User.Player |> wrap |> Just) @@ -1040,12 +1041,12 @@ viewUser wrap shared localUserId localUserPrivilege audienceMode openUserMenu ga let kickOrLeave = if userId == localUserId then - Menu.button Icon.leave Strings.LeaveGame Strings.LeaveGame (Leave |> wrap |> Just) |> Just + ContextMenu.button Icon.leave Strings.LeaveGame Strings.LeaveGame (Leave |> wrap |> Just) |> Just else case localUserPrivilege of User.Privileged -> - Menu.button Icon.userKick Strings.KickUser Strings.KickUser (userId |> Kick |> wrap |> Just) |> Just + ContextMenu.button Icon.userKick Strings.KickUser Strings.KickUser (userId |> Kick |> wrap |> Just) |> Just User.Unprivileged -> Nothing @@ -1058,7 +1059,7 @@ viewUser wrap shared localUserId localUserPrivilege audienceMode openUserMenu ga else if not isAway && game /= Nothing then case localUserPrivilege of User.Privileged -> - Menu.button Icon.userAway Strings.SetAway Strings.SetAway (userId |> SetAway |> wrap |> Just) |> Just + ContextMenu.button Icon.userAway Strings.SetAway Strings.SetAway (userId |> SetAway |> wrap |> Just) |> Just User.Unprivileged -> Nothing @@ -1078,7 +1079,7 @@ viewUser wrap shared localUserId localUserPrivilege audienceMode openUserMenu ga , presenceMenuItems ] |> List.filterMap (\part -> part |> List.filterMap identity |> (\l -> l |> Maybe.justIf (l |> List.isEmpty >> not))) - |> List.intersperse [ Menu.Separator ] + |> List.intersperse [ ContextMenu.Separator ] |> List.concat else @@ -1094,13 +1095,13 @@ viewUser wrap shared localUserId localUserPrivilege audienceMode openUserMenu ga Just userId == openUserMenu in ( \c -> - Menu.view shared + ContextMenu.view shared (SetUserMenuState userId Menu.Closed |> wrap) - (isOpen |> Menu.open) + (isOpen |> ContextMenu.open) Menu.BottomRight c menuItems - , [ not isOpen |> Menu.open |> SetUserMenuState userId |> wrap |> HtmlE.onClick + , [ not isOpen |> ContextMenu.open |> SetUserMenuState userId |> wrap |> HtmlE.onClick , HtmlA.classList [ ( "active", isOpen ), ( "has-menu", True ) ] ] ) @@ -1120,17 +1121,17 @@ viewUser wrap shared localUserId localUserPrivilege audienceMode openUserMenu ga ) -setPresenceMenuItem : (Msg -> msg) -> Maybe Player -> Menu.Part msg +setPresenceMenuItem : (Msg -> msg) -> Maybe Player -> ContextMenu.Part msg setPresenceMenuItem wrap player = case player |> Maybe.map .presence of Just Player.Active -> - Menu.button Icon.userAway Strings.SetAway Strings.SetAway (Player.Away |> Game.SetPresence |> GameMsg |> wrap |> Just) + ContextMenu.button Icon.userAway Strings.SetAway Strings.SetAway (Player.Away |> Game.SetPresence |> GameMsg |> wrap |> Just) Just Player.Away -> - Menu.button Icon.userBack Strings.SetBack Strings.SetBack (Player.Active |> Game.SetPresence |> GameMsg |> wrap |> Just) + ContextMenu.button Icon.userBack Strings.SetBack Strings.SetBack (Player.Active |> Game.SetPresence |> GameMsg |> wrap |> Just) Nothing -> - Menu.button Icon.userAway Strings.SetAway Strings.SetAway Nothing + ContextMenu.button Icon.userAway Strings.SetAway Strings.SetAway Nothing userDetails : Shared -> Maybe Game -> User.Id -> User -> ( List (Html msg), List (Html msg) ) @@ -1191,9 +1192,9 @@ viewDetails shared = viewCastButton : (Msg -> msg) -> Shared -> Auth -> List (Html.Attribute msg) -> List (Html msg) viewCastButton wrap shared auth attrs = [ Html.div (HtmlA.class "cast-button" :: attrs) - [ IconButton.view shared - Strings.Cast - (Icon.chromecast |> Icon.styled [ Icon.lg ] |> NeList.just) + [ IconButton.view + (Icon.chromecast |> Icon.styled [ Icon.lg ] |> Icon.view) + (Strings.Cast |> Lang.string shared) (auth |> TryCast |> wrap |> Just) ] ] diff --git a/client/src/elm/MassiveDecks/Pages/Lobby/Configure.elm b/client/src/elm/MassiveDecks/Pages/Lobby/Configure.elm index 30e2ce7b..11a94592 100644 --- a/client/src/elm/MassiveDecks/Pages/Lobby/Configure.elm +++ b/client/src/elm/MassiveDecks/Pages/Lobby/Configure.elm @@ -88,7 +88,7 @@ update shared msg model config = ( model, shared, Actions.startGame ) ChangeTab t -> - ( { model | tab = t }, shared, Cmd.none ) + ( { model | tab = t |> Maybe.withDefault model.tab }, shared, Cmd.none ) ResolveConflict source id -> case getComponent id of @@ -191,12 +191,13 @@ view wrap wrapLobby shared return disabledReason gameCode { lobby, configure } = Privacy.All |> PrivacyId |> getComponent |> Maybe.map viewComponent |> Maybe.withDefault [] viewReturnButton msg = - Button.view shared + Button.viewWithAttrs Button.Raised - Strings.ReturnViewToGame - Strings.ReturnViewToGameDescription - (Icon.back |> Icon.view) - [ HtmlA.class "game-in-progress", HtmlE.onClick msg ] + Button.Padded + (Strings.ReturnViewToGame |> Lang.string shared) + (Icon.back |> Icon.view |> Just) + (Just msg) + [ HtmlA.class "game-in-progress" ] returnButton = return |> Maybe.map viewReturnButton |> Maybe.withDefault (Html.div [] []) @@ -218,12 +219,13 @@ view wrap wrapLobby shared return disabledReason gameCode { lobby, configure } = , disabledReason |> Message.view shared |> Maybe.withDefault Html.nothing - , Tabs.view shared + , Tabs.view { selected = model.tab , change = ChangeTab >> wrap , ids = tabs - , tab = tab + , tab = tab shared , equals = (==) + , stacked = False } , Html.div [] tabComponent , startGameSegment wrap wrapLobby shared canEdit model lobby returnButton @@ -259,16 +261,16 @@ applyChange wrap change config model = actions : (Msg -> msg) -> Shared -> Bool -> Config -> Html msg actions wrap shared hasChanges config = Html.div [ HtmlA.class "actions" ] - [ Fab.view shared + [ Fab.view Fab.Normal - Strings.SaveChanges - Icon.save + (Strings.SaveChanges |> Lang.string shared) + (Icon.save |> Icon.view) (SaveChanges |> wrap |> Maybe.justIf (Configurable.isValid (all wrap config) config)) [ HtmlA.classList [ ( "action", True ), ( "important", True ), ( "exited", not hasChanges ) ] ] - , Fab.view shared + , Fab.view Fab.Mini - Strings.RevertChanges - Icon.undo + (Strings.RevertChanges |> Lang.string shared) + (Icon.undo |> Icon.view) (RevertChanges |> wrap |> Just) [ HtmlA.classList [ ( "action", True ), ( "exited", not hasChanges ), ( "normal", True ) ] ] ] @@ -319,12 +321,13 @@ viewConflict wrap shared model local config conflict = resolveButton : (Msg -> msg) -> Shared -> Id -> Config.Source -> MdString -> Html msg resolveButton wrap shared conflict source description = - Button.view shared + Button.viewWithAttrs Button.Raised - description - description - Html.nothing - [ HtmlA.class "resolve", ResolveConflict source conflict |> wrap |> HtmlE.onClick ] + Button.Padded + (description |> Lang.string shared) + Nothing + (ResolveConflict source conflict |> wrap |> Just) + [ HtmlA.class "resolve" ] all : (Msg -> msg) -> Config -> Configurable.Component Id Config Model msg @@ -390,13 +393,6 @@ startGameSegment wrap wrapLobby shared canEdit model lobby returnButton = startErrors = startGameProblems shared wrap wrapLobby lobby.users model config - - startGameAttrs = - if List.isEmpty startErrors && canEdit then - StartGame |> wrap |> HtmlE.onClick - - else - HtmlA.disabled True in Html.div [] [ Form.section @@ -406,12 +402,12 @@ startGameSegment wrap wrapLobby shared canEdit model lobby returnButton = (startErrors |> Maybe.justIf canEdit |> Maybe.withDefault []) , Html.div [ HtmlA.class "button-spread" ] [ returnButton - , Button.view shared + , Button.view Button.Raised - Strings.StartGame - Strings.StartGame - (Icon.start |> Icon.view) - [ startGameAttrs ] + Button.Padded + (Strings.StartGame |> Lang.string shared) + (Icon.start |> Icon.view |> Just) + (StartGame |> wrap |> Maybe.justIf (List.isEmpty startErrors && canEdit)) ] ] @@ -626,14 +622,14 @@ startGameProblems shared wrap wrapLobby users model remote = [ deckIssues, playerIssues, aisNoWriteGoodIssues, configurationIssues ] |> List.concat |> List.filterMap identity -tabs : NeList Tab +tabs : List Tab tabs = - NeList Decks [ Rules, Stages, Privacy ] + [ Decks, Rules, Stages, Privacy ] -tab : Tab -> Tabs.TabModel -tab target = - { label = target |> tabName +tab : Shared -> Tab -> Tabs.TabModel msg +tab shared target = + { label = target |> tabName |> Lang.string shared , icon = Nothing } diff --git a/client/src/elm/MassiveDecks/Pages/Lobby/Configure/Configurable/Editor.elm b/client/src/elm/MassiveDecks/Pages/Lobby/Configure/Configurable/Editor.elm index a5b4574f..874925c5 100644 --- a/client/src/elm/MassiveDecks/Pages/Lobby/Configure/Configurable/Editor.elm +++ b/client/src/elm/MassiveDecks/Pages/Lobby/Configure/Configurable/Editor.elm @@ -15,14 +15,12 @@ module MassiveDecks.Pages.Lobby.Configure.Configurable.Editor exposing import FontAwesome as Icon import Html exposing (Html) import Html.Attributes as HtmlA -import Html.Events as HtmlE import MassiveDecks.Icon as Icon import MassiveDecks.Model exposing (Shared) import MassiveDecks.Strings as Strings exposing (MdString) import MassiveDecks.Strings.Languages as Lang -import MassiveDecks.Util.Html.Events as HtmlE +import MassiveDecks.Util.Html as Html import MassiveDecks.Util.Maybe as Maybe -import MassiveDecks.Util.NeList as NeList import Material.IconButton as IconButton import Material.Switch as Switch import Material.TextField as TextField @@ -55,23 +53,18 @@ maybe default base noOp update model value args = Nothing -> ( False, True ) + + updateWithNewValue v = + if v then + default |> Just |> update + + else + Nothing |> update in Switch.view - [ selected |> HtmlA.selected - , if readOnly || disabled then - HtmlA.disabled True - - else - let - newValue = - if selected then - Nothing - - else - Just default - in - newValue |> update |> HtmlE.onClick - ] + Html.nothing + selected + (updateWithNewValue |> Maybe.justIf (not (readOnly || disabled))) :: base noOp (Just >> update) model (value |> Maybe.andThen identity) args @@ -81,28 +74,14 @@ bool label _ update _ value { shared, readOnly } = disabled = readOnly || value == Nothing - labelClick = - value |> Maybe.andThen (Maybe.justIf (not disabled)) |> Maybe.map (not >> update >> HtmlE.onClick) - selected = value |> Maybe.withDefault False in - [ Html.label - (List.filterMap identity - [ labelClick - , HtmlA.class "primary" |> Just - ] - ) - [ Switch.view - [ selected |> HtmlA.selected - , if disabled then - HtmlA.disabled True - - else - selected |> not |> update |> HtmlE.onClickNoPropagation - ] - , label |> Lang.html shared - ] + [ Switch.viewWithAttrs + (label |> Lang.html shared) + selected + (update |> Maybe.justIf (not disabled)) + [ HtmlA.class "primary" ] ] @@ -125,33 +104,23 @@ map f g base noOp update model value args = string : MdString -> Def String model msg string label _ update _ value { shared, readOnly } = - [ TextField.view shared - label + [ TextField.viewWithAttrs + (label |> Lang.string shared) TextField.Text (value |> Maybe.withDefault "") - [ if readOnly || value == Nothing then - HtmlA.disabled True - - else - HtmlE.onInput update - , HtmlA.class "primary" - ] + (update |> Maybe.justIf (not (readOnly || (value == Nothing)))) + [ HtmlA.class "primary" ] ] int : MdString -> Def Int model msg int label noOp update _ value { shared, readOnly } = - [ TextField.view shared - label + [ TextField.viewWithAttrs + (label |> Lang.string shared) TextField.Number (value |> Maybe.withDefault 0 |> String.fromInt) - [ if readOnly || value == Nothing then - HtmlA.disabled True - - else - HtmlE.onInput (String.toInt >> Maybe.map update >> Maybe.withDefault noOp) - , HtmlA.class "primary" - ] + ((String.toInt >> Maybe.map update >> Maybe.withDefault noOp) |> Maybe.justIf (not (readOnly || (value == Nothing)))) + [ HtmlA.class "primary" ] ] @@ -190,21 +159,16 @@ password setPasswordVisibility label _ update model value { shared, readOnly } = ( Icon.show, TextField.Password ) toggleVisibility = - IconButton.view shared - Strings.LobbyPassword - (icon |> NeList.just) + IconButton.view + (icon |> Icon.view) + (Strings.LobbyPassword |> Lang.string shared) (model.passwordVisible |> not |> setPasswordVisibility |> Just) in - [ TextField.view shared - label + [ TextField.viewWithAttrs + (label |> Lang.string shared) type_ (value |> Maybe.withDefault "") - [ if readOnly || (value == Nothing) then - HtmlA.disabled True - - else - HtmlE.onInput update - , HtmlA.class "primary" - ] + (update |> Maybe.justIf (not (readOnly || (value == Nothing)))) + [ HtmlA.class "primary" ] , toggleVisibility ] diff --git a/client/src/elm/MassiveDecks/Pages/Lobby/Configure/Decks.elm b/client/src/elm/MassiveDecks/Pages/Lobby/Configure/Decks.elm index f2818e93..1e80fdf0 100644 --- a/client/src/elm/MassiveDecks/Pages/Lobby/Configure/Decks.elm +++ b/client/src/elm/MassiveDecks/Pages/Lobby/Configure/Decks.elm @@ -202,9 +202,9 @@ addDeckWidget wrap shared existing deckToAdd = [ Html.div [ HtmlA.class "multipart" ] [ sourcePicker ] , Html.div [ HtmlA.class "multipart" ] [ deckPicker - , IconButton.view shared - Strings.AddDeck - (NeList Icon.add []) + , IconButton.view + (Icon.add |> Icon.view) + (Strings.AddDeck |> Lang.string shared) (submit |> Result.toMaybe) ] ] @@ -284,9 +284,8 @@ name wrap shared canEdit index source loading maybeError details = let removeButton = IconButton.view - shared - Strings.RemoveDeck - (NeList Icon.remove []) + (Icon.remove |> Icon.view) + (Strings.RemoveDeck |> Lang.string shared) (index |> Remove |> wrap |> Just) |> Maybe.justIf canEdit diff --git a/client/src/elm/MassiveDecks/Pages/Lobby/Configure/Messages.elm b/client/src/elm/MassiveDecks/Pages/Lobby/Configure/Messages.elm index 51aac6a9..77bad93a 100644 --- a/client/src/elm/MassiveDecks/Pages/Lobby/Configure/Messages.elm +++ b/client/src/elm/MassiveDecks/Pages/Lobby/Configure/Messages.elm @@ -7,7 +7,7 @@ import MassiveDecks.Pages.Lobby.Configure.Model exposing (..) type Msg = ApplyChange Id Config | DecksMsg Decks.Msg - | ChangeTab Tab + | ChangeTab (Maybe Tab) | StartGame | ResolveConflict Source Id | SetPasswordVisibility Bool diff --git a/client/src/elm/MassiveDecks/Pages/Lobby/Configure/Rules/HouseRules/CzarChoices.elm b/client/src/elm/MassiveDecks/Pages/Lobby/Configure/Rules/HouseRules/CzarChoices.elm index 3000abbf..e3fea582 100644 --- a/client/src/elm/MassiveDecks/Pages/Lobby/Configure/Rules/HouseRules/CzarChoices.elm +++ b/client/src/elm/MassiveDecks/Pages/Lobby/Configure/Rules/HouseRules/CzarChoices.elm @@ -42,7 +42,11 @@ enabled wrap = always [ Message.info Strings.HouseRuleCzarChoicesDescription , Message.infoWithFix (Strings.SeeAlso { rule = Strings.DuringTitle }) - [ { description = Strings.ConfigureTimeLimits, icon = Icon.show, action = ChangeTab Stages |> wrap } ] + [ { description = Strings.ConfigureTimeLimits + , icon = Icon.show + , action = Stages |> Just |> ChangeTab |> wrap + } + ] ] } diff --git a/client/src/elm/MassiveDecks/Pages/Lobby/Configure/Stages.elm b/client/src/elm/MassiveDecks/Pages/Lobby/Configure/Stages.elm index 7d3abd6b..ba593f59 100644 --- a/client/src/elm/MassiveDecks/Pages/Lobby/Configure/Stages.elm +++ b/client/src/elm/MassiveDecks/Pages/Lobby/Configure/Stages.elm @@ -85,7 +85,11 @@ starting wrap = always [ Message.info Strings.StartingTimeLimitDescription , Message.infoWithFix (Strings.SeeAlso { rule = Strings.HouseRuleCzarChoices }) - [ { description = Strings.ConfigureRules, icon = Icon.show, action = Rules |> ChangeTab |> wrap } ] + [ { description = Strings.ConfigureRules + , icon = Icon.show + , action = Rules |> Just |> ChangeTab |> wrap + } + ] ] } ] diff --git a/client/src/elm/MassiveDecks/Pages/Lobby/Invite.elm b/client/src/elm/MassiveDecks/Pages/Lobby/Invite.elm index b80cdf99..c6ad1d4f 100644 --- a/client/src/elm/MassiveDecks/Pages/Lobby/Invite.elm +++ b/client/src/elm/MassiveDecks/Pages/Lobby/Invite.elm @@ -16,7 +16,6 @@ import MassiveDecks.Strings as Strings import MassiveDecks.Strings.Languages as Lang import MassiveDecks.Util.Html as Html import MassiveDecks.Util.Html.Events as HtmlE -import MassiveDecks.Util.NeList as NeList exposing (NeList(..)) import Material.Card as Card import Material.IconButton as IconButton import QRCode @@ -27,7 +26,10 @@ import Url exposing (Url) -} button : (Msg -> msg) -> Shared -> Html msg button wrap shared = - IconButton.view shared Strings.Invite (Icon.invite |> NeList.just) (ToggleInviteDialog |> wrap |> Just) + IconButton.view + (Icon.invite |> Icon.view) + (Strings.Invite |> Lang.string shared) + (ToggleInviteDialog |> wrap |> Just) {-| A dialog overlay that displays information on how to invite people to the game. @@ -43,9 +45,9 @@ dialog wrap shared gameCode password open = , HtmlA.classList [ ( "open", open ) ] , Lobby.ToggleInviteDialog |> wrap |> HtmlE.onClick ] - [ IconButton.viewNoPropagation shared - Strings.Close - (Icon.close |> NeList.just) + [ IconButton.viewNoPropagation + (Icon.close |> Icon.view) + (Strings.Close |> Lang.string shared) (Lobby.ToggleInviteDialog |> wrap |> Just) , Card.view [ HtmlE.onClickNoPropagation (wrap NoOp) ] [ Strings.InviteExplanation { gameCode = GameCode.toString gameCode, password = password } |> Lang.html shared @@ -59,9 +61,9 @@ dialog wrap shared gameCode password open = , HtmlA.id "invite-link-field" ] [] - , IconButton.view shared - Strings.Copy - (Icon.copy |> NeList.just) + , IconButton.view + (Icon.copy |> Icon.view) + (Strings.Copy |> Lang.string shared) ("invite-link-field" |> Copy |> wrap |> Just) ] ) diff --git a/client/src/elm/MassiveDecks/Pages/Lobby/Messages.elm b/client/src/elm/MassiveDecks/Pages/Lobby/Messages.elm index 8a4b97cd..c9f881de 100644 --- a/client/src/elm/MassiveDecks/Pages/Lobby/Messages.elm +++ b/client/src/elm/MassiveDecks/Pages/Lobby/Messages.elm @@ -1,7 +1,6 @@ module MassiveDecks.Pages.Lobby.Messages exposing (Msg(..)) import MassiveDecks.Animated as Animated -import MassiveDecks.Components.Menu.Model as Menu import MassiveDecks.Game.Messages as Game import MassiveDecks.Game.Time as Time import MassiveDecks.Models.MdError exposing (MdError) @@ -11,6 +10,7 @@ import MassiveDecks.Pages.Lobby.Model exposing (..) import MassiveDecks.Pages.Lobby.Route exposing (Section) import MassiveDecks.Pages.Lobby.Spectate.Messages as Spectate import MassiveDecks.User as User +import Material.Menu as Menu type Msg diff --git a/client/src/elm/MassiveDecks/Pages/Lobby/Model.elm b/client/src/elm/MassiveDecks/Pages/Lobby/Model.elm index 308f0397..53349e01 100644 --- a/client/src/elm/MassiveDecks/Pages/Lobby/Model.elm +++ b/client/src/elm/MassiveDecks/Pages/Lobby/Model.elm @@ -14,7 +14,6 @@ module MassiveDecks.Pages.Lobby.Model exposing import Dict exposing (Dict) import MassiveDecks.Animated exposing (Animated) -import MassiveDecks.Components.Menu.Model as Menu import MassiveDecks.Error.Model exposing (Error) import MassiveDecks.Game.Model as Game import MassiveDecks.Game.Time as Time @@ -24,6 +23,7 @@ import MassiveDecks.Pages.Lobby.GameCode exposing (GameCode) import MassiveDecks.Pages.Lobby.Route exposing (..) import MassiveDecks.Pages.Lobby.Spectate.Model as Spectate import MassiveDecks.User as User exposing (User) +import Material.Menu as Menu {-| A change. This is the result of the update function, and implies either an update to the current page or a redirect diff --git a/client/src/elm/MassiveDecks/Pages/Lobby/Spectate.elm b/client/src/elm/MassiveDecks/Pages/Lobby/Spectate.elm index 985ed1d6..8ace2439 100644 --- a/client/src/elm/MassiveDecks/Pages/Lobby/Spectate.elm +++ b/client/src/elm/MassiveDecks/Pages/Lobby/Spectate.elm @@ -26,7 +26,6 @@ import MassiveDecks.Pages.Start.Route as Start import MassiveDecks.Strings as Strings import MassiveDecks.Strings.Languages as Lang import MassiveDecks.User as User -import MassiveDecks.Util.NeList as NeList import Material.IconButton as IconButton import QRCode import Url exposing (Url) @@ -97,17 +96,17 @@ viewSettings wrap changePage shared lobby = ( wrap BecomePlayer, Strings.BecomePlayerDescription ) in [ Html.div [ HtmlA.id "spectate-actions" ] - [ IconButton.view shared - backDescription - (Icon.back |> NeList.just) + [ IconButton.view + (Icon.back |> Icon.view) + (backDescription |> Lang.string shared) (Just backAction) - , IconButton.view shared - Strings.ViewConfigurationDescription - (Icon.configure |> NeList.just) + , IconButton.view + (Icon.configure |> Icon.view) + (Strings.ViewConfigurationDescription |> Lang.string shared) ({ route | section = Just Lobby.Configure } |> Route.Lobby |> changePage |> Just) - , IconButton.view shared - Strings.ToggleAdvertDescription - (advertiseIcon |> NeList.just) + , IconButton.view + (advertiseIcon |> Icon.view) + (Strings.ToggleAdvertDescription |> Lang.string shared) (ToggleAdvert |> wrap |> Just) ] ] diff --git a/client/src/elm/MassiveDecks/Pages/Start.elm b/client/src/elm/MassiveDecks/Pages/Start.elm index 583f209a..b4c4c21e 100644 --- a/client/src/elm/MassiveDecks/Pages/Start.elm +++ b/client/src/elm/MassiveDecks/Pages/Start.elm @@ -239,12 +239,13 @@ view shared model = ] ] , Card.view [] - [ Tabs.view shared + [ Tabs.view { selected = r.section - , change = \s -> Route.Start { r | section = s } |> Global.ChangePage - , ids = NeList New [ Join model.gameCode, Find, About ] - , tab = tabFor + , change = \s -> Route.Start { r | section = s |> Maybe.withDefault r.section } |> Global.ChangePage + , ids = [ New, Join model.gameCode, Find, About ] + , tab = tabFor shared , equals = sectionsMatch + , stacked = False } , sectionContent shared model ] @@ -280,20 +281,24 @@ view shared model = {- Private -} -tabFor : Section -> Tabs.TabModel -tabFor section = - case section of - New -> - Tabs.TabModel Strings.NewGame (Just Icon.new) +tabFor : Shared -> Section -> Tabs.TabModel msg +tabFor shared section = + let + ( name, icon ) = + case section of + New -> + ( Strings.NewGame, Icon.new ) - Join _ -> - Tabs.TabModel Strings.JoinPrivateGame (Just Icon.join) + Join _ -> + ( Strings.JoinPrivateGame, Icon.join ) - Find -> - Tabs.TabModel Strings.FindPublicGame (Just Icon.find) + Find -> + ( Strings.FindPublicGame, Icon.find ) - About -> - Tabs.TabModel Strings.AboutTheGame (Just Icon.about) + About -> + ( Strings.AboutTheGame, Icon.about ) + in + Tabs.TabModel (name |> Lang.string shared) (icon |> Icon.view |> Just) overlay : Shared -> Maybe MdString -> Html Global.Msg @@ -301,9 +306,9 @@ overlay shared content = case content of Just text -> Html.div [ HtmlA.id "overlay" ] - [ IconButton.view shared - Strings.Close - (Icon.close |> NeList.just) + [ IconButton.view + (Icon.close |> Icon.view) + (Strings.Close |> Lang.string shared) (HideOverlay |> Global.StartMsg |> Just) , Card.view [] [ text |> Lang.html shared @@ -397,24 +402,20 @@ newContent shared model = loading = loadingOrLoaded model - buttonAttr = - if model.name == "" || loading then - HtmlA.disabled True - - else - StartGame HttpData.Pull |> Global.StartMsg |> HtmlE.onClick - buttonIcon = if loading then - Icon.loading |> Icon.view + Icon.loading else - Icon.view Icon.start + Icon.start error = model.newLobbyRequest.generalError |> Maybe.map (Error.view shared (Route.Start model.route)) |> Maybe.withDefault Html.nothing + + canStart = + not (model.name == "" || loading) in Html.div [ HtmlA.class "new-game start-tab" ] [ Html.div [ HtmlA.class "tab-content" ] @@ -422,12 +423,12 @@ newContent shared model = , Html.p [] [ Strings.NewGameDescription |> Lang.html shared ] , error , nameField shared model Nothing - , Button.view shared + , Button.view Button.Raised - Strings.PlayGame - Strings.PlayGame - buttonIcon - [ buttonAttr ] + Button.Padded + (Strings.PlayGame |> Lang.string shared) + (buttonIcon |> Icon.view |> Just) + (StartGame HttpData.Pull |> Global.StartMsg |> Maybe.justIf canStart) ] ] @@ -438,19 +439,12 @@ joinContent shared model = loading = loadingOrLoaded model - buttonAttr = - if String.isEmpty model.name || model.gameCode == Nothing || loading then - HtmlA.disabled True - - else - JoinGame HttpData.Pull |> Global.StartMsg |> HtmlE.onClick - buttonIcon = if loading then - Icon.loading |> Icon.view + Icon.loading else - Icon.view Icon.start + Icon.start error = model.joinLobbyRequest.generalError @@ -472,6 +466,9 @@ joinContent shared model = model.password |> Maybe.map (passwordField shared passwordError) |> Maybe.withDefault [] + + canStart = + not (String.isEmpty model.name || model.gameCode == Nothing || loading) in Html.div [ HtmlA.class "join-game start-tab" ] [ Html.div [ HtmlA.class "tab-content" ] @@ -484,25 +481,24 @@ joinContent shared model = , [ nameField shared model nameError , Form.section shared "game-code-input" - (TextField.view shared - Strings.GameCodeTerm + (TextField.viewWithAttrs + (Strings.GameCodeTerm |> Lang.string shared) TextField.Text (model.gameCode |> Maybe.map GameCode.toString |> Maybe.withDefault "") - [ HtmlA.class "game-code-input" - , GameCodeChanged >> Global.StartMsg |> HtmlE.onInput - ] + (GameCodeChanged >> Global.StartMsg |> Just) + [ HtmlA.class "game-code-input" ] ) [ Message.info Strings.GameCodeHowToAcquire , gameError |> Maybe.map Message.mdError |> Maybe.withDefault Message.none ] ] , maybePasswordField - , [ Button.view shared + , [ Button.view Button.Raised - Strings.PlayGame - Strings.PlayGame - buttonIcon - [ buttonAttr ] + Button.Padded + (Strings.PlayGame |> Lang.string shared) + (buttonIcon |> Icon.view |> Just) + (JoinGame HttpData.Pull |> Global.StartMsg |> Maybe.justIf canStart) ] ] ) @@ -513,11 +509,11 @@ passwordField : Shared -> Maybe MdError -> String -> List (Html Global.Msg) passwordField shared error password = [ Form.section shared "password-input" - (TextField.view shared - Strings.LobbyPassword + (TextField.view + (Strings.LobbyPassword |> Lang.string shared) TextField.Password password - [ PasswordChanged >> Global.StartMsg |> HtmlE.onInput ] + (PasswordChanged >> Global.StartMsg |> Just) ) [ Message.info Strings.LobbyRequiresPassword , error |> Maybe.map (MdError.describe >> Message.error) |> Maybe.withDefault Message.none @@ -561,11 +557,11 @@ nameField : Shared -> Model -> Maybe MdError -> Html Global.Msg nameField shared model error = Form.section shared "name-input" - (TextField.view shared - Strings.NameLabel + (TextField.view + (Strings.NameLabel |> Lang.string shared) TextField.Text model.name - [ NameChanged >> Global.StartMsg |> HtmlE.onInput ] + (NameChanged >> Global.StartMsg |> Just) ) [ error |> Maybe.map (MdError.describe >> Message.error) |> Maybe.withDefault Message.none ] diff --git a/client/src/elm/MassiveDecks/Pages/Start/LobbyBrowser.elm b/client/src/elm/MassiveDecks/Pages/Start/LobbyBrowser.elm index 1b438e56..d1cfa181 100644 --- a/client/src/elm/MassiveDecks/Pages/Start/LobbyBrowser.elm +++ b/client/src/elm/MassiveDecks/Pages/Start/LobbyBrowser.elm @@ -162,9 +162,8 @@ lobby : Shared -> Summary -> ( String, Html Global.Msg ) lobby shared data = ( data.gameCode |> GameCode.toString , ListView.viewItem - (ListView.Enabled (Route.Start { section = Start.Join (Just data.gameCode) } |> Global.ChangePage)) + (Route.Start { section = Start.Join (Just data.gameCode) } |> Global.ChangePage |> Just |> ListView.Button) Nothing - data.name ([ Html.span [ HtmlA.class "lobby-game-code" ] [ Strings.GameCode { code = GameCode.toString data.gameCode } |> Lang.html shared ] ] diff --git a/client/src/elm/MassiveDecks/Requests/HttpData.elm b/client/src/elm/MassiveDecks/Requests/HttpData.elm index 72b0d8d6..f909fbb5 100644 --- a/client/src/elm/MassiveDecks/Requests/HttpData.elm +++ b/client/src/elm/MassiveDecks/Requests/HttpData.elm @@ -20,6 +20,7 @@ import MassiveDecks.Requests.HttpData.Messages exposing (..) import MassiveDecks.Requests.HttpData.Model exposing (..) import MassiveDecks.Requests.Request as Request import MassiveDecks.Strings as Strings +import MassiveDecks.Strings.Languages as Lang import MassiveDecks.Util.Maybe as Maybe import MassiveDecks.Util.NeList as NeList exposing (NeList(..)) import Material.IconButton as IconButton @@ -119,7 +120,7 @@ refreshButton shared { loading } = else identity in - IconButton.view shared - Strings.Refresh - (Icon.refresh |> applyStyle |> NeList.just) + IconButton.view + (Icon.refresh |> applyStyle |> Icon.view) + (Strings.Refresh |> Lang.string shared) (Pull |> Maybe.justIf (not loading)) diff --git a/client/src/elm/MassiveDecks/Settings.elm b/client/src/elm/MassiveDecks/Settings.elm index ef778e70..dfafbaf3 100644 --- a/client/src/elm/MassiveDecks/Settings.elm +++ b/client/src/elm/MassiveDecks/Settings.elm @@ -16,7 +16,6 @@ import FontAwesome as Icon import FontAwesome.Attributes as Icon import Html as Html exposing (Html) import Html.Attributes as HtmlA -import Html.Events as HtmlE import Http import MassiveDecks.Card.Source as Source import MassiveDecks.Card.Source.Model as Source @@ -167,9 +166,9 @@ view wrap shared = Icon.configure button = - IconButton.view shared - Strings.SettingsTitle - (icon |> Icon.styled [ Icon.lg ] |> NeList.just) + IconButton.view + (icon |> Icon.styled [ Icon.lg ] |> Icon.view) + (Strings.SettingsTitle |> Lang.string shared) (ToggleOpen |> wrap |> Just) panel = @@ -298,18 +297,18 @@ cardSize wrap shared = [ HtmlA.class "card-size-slider" ] [ Icon.minimalCardSize |> Icon.view , Slider.view - [ HtmlA.class "primary" - , Slider.step 1 - , Slider.min 1 - , Slider.max 3 - , Slider.withTickMarks 3 - , cardSizeFromValue - >> Maybe.withDefault Full - >> ChangeCardSize - >> wrap - |> Slider.onChange - , settings.cardSize |> cardSizeToValue |> Slider.value - ] + { min = 1 + , max = 3 + , step = 1 + , value = settings.cardSize |> cardSizeToValue + , onChange = + cardSizeFromValue + >> Maybe.withDefault Full + >> ChangeCardSize + >> wrap + |> Just + , attrs = [ HtmlA.class "primary" ] + } , Icon.callCard |> Icon.view ] ] @@ -331,15 +330,14 @@ autoAdvanceRound wrap shared = (Html.div [ HtmlA.class "multipart" ] [ Switch.view - [ HtmlE.onClick (currentValue |> not |> ToggleAutoAdvance >> wrap) - , HtmlA.selected currentValue - , HtmlA.id "auto-advance-enable" - ] - , Html.label [ HtmlA.for "auto-advance-enable" ] - [ Icon.view Icon.autoAdvance - , Html.text " " - , Strings.AutoAdvanceSetting |> Lang.html shared - ] + (Html.span [] + [ Icon.view Icon.autoAdvance + , Html.text " " + , Strings.AutoAdvanceSetting |> Lang.html shared + ] + ) + currentValue + (ToggleAutoAdvance >> wrap |> Just) ] ) [ Message.info Strings.AutoAdvanceExplanation ] @@ -380,28 +378,26 @@ speechVoiceSelector wrap shared = [ Html.div [ HtmlA.class "multipart" ] [ Switch.view - [ HtmlE.onClick (enabled |> not |> ToggleSpeech >> wrap) - , HtmlA.disabled isDisabled - , HtmlA.selected enabled - , HtmlA.id "speech-enable" - ] - , Html.label [ HtmlA.for "speech-enable" ] - [ Icon.view Icon.tts - , Html.text " " - , Strings.SpeechSetting |> Lang.html shared - ] + (Html.span [] + [ Icon.view Icon.tts + , Html.text " " + , Strings.SpeechSetting |> Lang.html shared + ] + ) + enabled + (ToggleSpeech >> wrap |> Maybe.justIf (not isDisabled)) ] , Html.div [ HtmlA.class "children" ] - [ Select.view shared - { label = Strings.VoiceSetting + [ Select.view + { label = Strings.VoiceSetting |> Lang.string shared , idToString = identity , idFromString = Just , selected = selectedVoice , wrap = ChangeSpeech >> wrap + , disabled = not enabled || isDisabled + , fullWidth = True + , attrs = [ HtmlA.class "secondary" ] } - [ HtmlA.disabled (not enabled || isDisabled) - , HtmlA.class "secondary" - ] (voices |> List.sortWith voiceSortOrder |> List.map speechVoiceOption) ] ] @@ -464,34 +460,34 @@ notificationsSwitch wrap shared = settings = shared.settings.settings.notifications - unsupported = - not (Notifications.supportsNotifications shared.notifications) + supported = + Notifications.supportsNotifications shared.notifications enabled = - not unsupported && settings.enabled + supported && settings.enabled visibilityUnsupported = not (Notifications.supportsVisibility shared.notifications) visibilityDisabled = - visibilityUnsupported || unsupported || not settings.enabled + visibilityUnsupported || not enabled in Form.section shared "notifications" (Html.div [] [ Html.div [ HtmlA.class "multipart" ] - [ Switch.view - [ HtmlE.onClick (enabled |> not |> ToggleNotifications >> wrap) - , HtmlA.disabled unsupported - , HtmlA.selected enabled - , HtmlA.id "notifications-enable" - ] - , Html.label [ HtmlA.for "notifications-enable" ] - [ Icon.view Icon.notification - , Html.text " " - , Strings.NotificationsSetting |> Lang.html shared - ] + [ Switch.viewWithAttrs + (Html.span + [] + [ Icon.view Icon.notification + , Html.text " " + , Strings.NotificationsSetting |> Lang.html shared + ] + ) + enabled + (ToggleNotifications >> wrap |> Maybe.justIf supported) + [ HtmlA.id "notifications-enable" ] ] , Html.div [ HtmlA.classList [ ( "children", True ), ( "inactive", not enabled ) ] ] [ Form.section @@ -499,17 +495,16 @@ notificationsSwitch wrap shared = "only-when-hidden" (Html.div [ HtmlA.class "multipart" ] - [ Switch.view - [ HtmlE.onClick (settings.requireNotVisible |> not |> ToggleOnlyWhenHidden >> wrap) - , HtmlA.disabled visibilityDisabled - , HtmlA.selected settings.requireNotVisible - , HtmlA.id "only-when-hidden-toggle" - ] - , Html.label [ HtmlA.for "only-when-hidden-toggle" ] - [ Icon.view Icon.hide - , Html.text " " - , Strings.NotificationOnlyWhenHiddenSetting |> Lang.html shared - ] + [ Switch.viewWithAttrs + (Html.span [] + [ Icon.view Icon.hide + , Html.text " " + , Strings.NotificationOnlyWhenHiddenSetting |> Lang.html shared + ] + ) + settings.requireNotVisible + (ToggleOnlyWhenHidden >> wrap |> Maybe.justIf (not visibilityDisabled)) + [ HtmlA.id "only-when-hidden-enable" ] ] ) [ Message.info Strings.NotificationsOnlyWhenHiddenExplanation @@ -524,11 +519,11 @@ notificationsSwitch wrap shared = ) [ Message.info Strings.NotificationsExplanation , Message.info Strings.NotificationsBrowserPermissions - , if unsupported then - Message.warning Strings.NotificationsUnsupportedExplanation + , if supported then + Message.none else - Message.none + Message.warning Strings.NotificationsUnsupportedExplanation ] @@ -541,14 +536,16 @@ languageSelector wrap shared = Form.section shared "language" - (Select.view shared - { label = Strings.LanguageSetting + (Select.view + { label = Strings.LanguageSetting |> Lang.string shared , idToString = Lang.code , idFromString = Lang.fromCode , selected = Just selected , wrap = ChangeLang >> wrap + , disabled = False + , fullWidth = True + , attrs = [] } - [] (Lang.languages |> List.map (languageOption shared selected)) ) [ Message.info Strings.MissingLanguage ] diff --git a/client/src/elm/Material/Attributes.elm b/client/src/elm/Material/Attributes.elm deleted file mode 100644 index e882eadb..00000000 --- a/client/src/elm/Material/Attributes.elm +++ /dev/null @@ -1,24 +0,0 @@ -module Material.Attributes exposing - ( label - , maxLength - , minLength - ) - -import Html -import Html.Attributes as HtmlA -import Json.Encode as Json - - -label : String -> Html.Attribute msg -label = - HtmlA.attribute "label" - - -minLength : Int -> Html.Attribute msg -minLength = - Json.int >> HtmlA.property "minLength" - - -maxLength : Int -> Html.Attribute msg -maxLength = - Json.int >> HtmlA.property "maxLength" diff --git a/client/src/elm/Material/Button.elm b/client/src/elm/Material/Button.elm deleted file mode 100644 index 5ed5e02e..00000000 --- a/client/src/elm/Material/Button.elm +++ /dev/null @@ -1,47 +0,0 @@ -module Material.Button exposing - ( Type(..) - , view - ) - -import Html exposing (Html) -import Html.Attributes as HtmlA -import MassiveDecks.Model exposing (Shared) -import MassiveDecks.Strings exposing (MdString) -import MassiveDecks.Strings.Languages as Lang -import MassiveDecks.Util.Html.Attributes as HtmlA - - -type Type - = Standard - | Outlined - | Raised - | Unelevated - - -view : Shared -> Type -> MdString -> MdString -> Html msg -> List (Html.Attribute msg) -> Html msg -view shared type_ label title icon attributes = - let - typeAttr = - case type_ of - Standard -> - [] - - Outlined -> - [ HtmlA.attribute "outlined" "" ] - - Raised -> - [ HtmlA.attribute "raised" "" ] - - Unelevated -> - [ HtmlA.attribute "unelevated" "" ] - - allAttrs = - List.concat - [ [ label |> Lang.label shared - , title |> Lang.title shared - ] - , typeAttr - , attributes - ] - in - Html.node "mwc-button" allAttrs [ Html.span [ HtmlA.slot "icon" ] [ icon ] ] diff --git a/client/src/elm/Material/Card.elm b/client/src/elm/Material/Card.elm deleted file mode 100644 index d808699c..00000000 --- a/client/src/elm/Material/Card.elm +++ /dev/null @@ -1,9 +0,0 @@ -module Material.Card exposing (view) - -import Html as HtmlA -import Html.Attributes as HtmlA - - -view : List (HtmlA.Attribute msg) -> List (HtmlA.Html msg) -> HtmlA.Html msg -view attributes = - HtmlA.div (HtmlA.class "mdc-card" :: attributes) diff --git a/client/src/elm/Material/Fab.elm b/client/src/elm/Material/Fab.elm deleted file mode 100644 index f510d407..00000000 --- a/client/src/elm/Material/Fab.elm +++ /dev/null @@ -1,51 +0,0 @@ -module Material.Fab exposing - ( Type(..) - , view - ) - -import FontAwesome as Icon exposing (Icon) -import Html exposing (Html) -import Html.Attributes as HtmlA -import Html.Events as HtmlE -import MassiveDecks.Model exposing (Shared) -import MassiveDecks.Strings exposing (MdString) -import MassiveDecks.Strings.Languages as Lang -import MassiveDecks.Util.Html.Attributes as HtmlA - - -type Type - = Normal - | Extended - | Mini - - -view : Shared -> Type -> MdString -> Icon hasId -> Maybe msg -> List (Html.Attribute msg) -> Html msg -view shared type_ title icon action attrs = - let - content = - case type_ of - Extended -> - [ title |> Lang.html shared ] - - _ -> - [] - - style = - case type_ of - Mini -> - [ HtmlA.attribute "mini" "" ] - - _ -> - [] - - onClick = - case action of - Just msg -> - msg |> HtmlE.onClick - - Nothing -> - HtmlA.attribute "disabled" "" - in - Html.node "mwc-fab" - (List.concat [ [ title |> Lang.title shared, onClick ], style, attrs ]) - ((icon |> Icon.styled [ HtmlA.slot "icon" ] |> Icon.view) :: content) diff --git a/client/src/elm/Material/IconButton.elm b/client/src/elm/Material/IconButton.elm deleted file mode 100644 index 02e7724a..00000000 --- a/client/src/elm/Material/IconButton.elm +++ /dev/null @@ -1,68 +0,0 @@ -module Material.IconButton exposing - ( view - , viewCustomIcon - , viewNoPropagation - ) - -import FontAwesome as Icon exposing (Icon) -import FontAwesome.Layering as Icon -import Html exposing (Html) -import Html.Attributes as HtmlA -import Html.Events as HtmlE -import MassiveDecks.Model exposing (Shared) -import MassiveDecks.Strings exposing (MdString) -import MassiveDecks.Strings.Languages as Lang -import MassiveDecks.Util.Html.Events as HtmlE -import MassiveDecks.Util.NeList exposing (NeList(..)) - - -{-| View a button that displays as a simple icon. --} -view : Shared -> MdString -> NeList (Icon hasId) -> Maybe msg -> Html msg -view shared title icon action = - viewRenderedIcon [ actionAttrFromMaybe HtmlE.onClick action ] shared title (renderIcon icon) - - -{-| View a button that displays as a simple icon, and blocks clicks propagating to other elements. --} -viewNoPropagation : Shared -> MdString -> NeList (Icon hasId) -> Maybe msg -> Html msg -viewNoPropagation shared title icon action = - viewRenderedIcon [ actionAttrFromMaybe HtmlE.onClickNoPropagation action ] shared title (renderIcon icon) - - -{-| View a button that displays as a custom rendered icon. --} -viewCustomIcon : Shared -> MdString -> Html msg -> Maybe msg -> Html msg -viewCustomIcon shared title icon action = - viewRenderedIcon [ actionAttrFromMaybe HtmlE.onClick action ] shared title icon - - - -{- Private -} - - -actionAttrFromMaybe : (a -> Html.Attribute msg) -> Maybe a -> Html.Attribute msg -actionAttrFromMaybe onClick action = - case action of - Just msg -> - msg |> onClick - - Nothing -> - HtmlA.disabled True - - -renderIcon : NeList (Icon hasId) -> Html msg -renderIcon (NeList first rest) = - case rest of - [] -> - first |> Icon.view - - _ -> - (first :: rest) |> List.map Icon.view |> Icon.layers [] - - -viewRenderedIcon : List (Html.Attribute msg) -> Shared -> MdString -> Html msg -> Html msg -viewRenderedIcon actionAttr shared title renderedIcon = - Html.node "mwc-icon-button" - ((title |> Lang.title shared) :: actionAttr) - [ renderedIcon ] diff --git a/client/src/elm/Material/LinearProgress.elm b/client/src/elm/Material/LinearProgress.elm deleted file mode 100644 index ba642eec..00000000 --- a/client/src/elm/Material/LinearProgress.elm +++ /dev/null @@ -1,44 +0,0 @@ -module Material.LinearProgress exposing - ( Progress(..) - , view - ) - -import Html exposing (Html) -import Html.Attributes as HtmlA -import Json.Encode as Json - - -{-| What progress to display. --} -type - Progress - -- An unknown amount of progress. - = Indeterminate - -- A float progress from 0 (no progress) to 1 (complete). - | Progress Float - -- Complete. - | Closed - - -{-| A progress bar. --} -view : Progress -> List (Html.Attribute msg) -> Html msg -view p attributes = - Html.node "mwc-linear-progress" (progress p :: attributes) [] - - - -{- Private -} - - -progress : Progress -> Html.Attribute msg -progress p = - case p of - Indeterminate -> - True |> Json.bool |> HtmlA.property "indeterminate" - - Progress float -> - float |> Json.float |> HtmlA.property "progress" - - Closed -> - True |> Json.bool |> HtmlA.property "closed" diff --git a/client/src/elm/Material/ListView.elm b/client/src/elm/Material/ListView.elm deleted file mode 100644 index e5509f32..00000000 --- a/client/src/elm/Material/ListView.elm +++ /dev/null @@ -1,89 +0,0 @@ -module Material.ListView exposing - ( Action(..) - , action - , interactive - , view - , viewItem - ) - -import FontAwesome as Icon exposing (Icon) -import Html exposing (Html) -import Html.Attributes as HtmlA -import Html.Events as HtmlE -import Json.Encode as Json -import MassiveDecks.Util.Html.Attributes as HtmlA - - -{-| A list. --} -view : List (Html.Attribute msg) -> List (Html msg) -> Html msg -view attributes children = - Html.node "mwc-list" attributes children - - -{-| What happens when you interact with the item. --} -type Action msg - = None - | Link - | Enabled msg - | Disabled - - -{-| A list item that is only sometimes enabled. --} -interactive : msg -> Bool -> Action msg -interactive msg enabled = - if enabled then - Enabled msg - - else - Disabled - - -{-| An action from a maybe, if it is enabled. --} -action : Maybe msg -> Action msg -action a = - case a of - Just msg -> - Enabled msg - - Nothing -> - Disabled - - -{-| An item within a list. --} -viewItem : Action msg -> Maybe (Icon hasId) -> String -> Maybe (List (Html msg)) -> Maybe (List (Html msg)) -> List (Html msg) -> Html msg -viewItem action_ icon title secondary meta children = - let - ( optionalAttrs, optionalSlots ) = - [ icon |> Maybe.map (\i -> ( HtmlA.attribute "graphic" "large", i |> Icon.styled [ HtmlA.slot "graphic" ] |> Icon.view )) - , meta |> Maybe.map (\m -> ( True |> Json.bool |> HtmlA.property "hasMeta", Html.span [ HtmlA.slot "meta" ] m )) - , secondary |> Maybe.map (\s -> ( True |> Json.bool |> HtmlA.property "twoline", Html.span [ HtmlA.slot "secondary" ] s )) - ] - |> List.filterMap identity - |> List.unzip - - actionAttr = - case action_ of - Enabled msg -> - msg |> HtmlE.onClick - - Disabled -> - HtmlA.disabled True - - Link -> - HtmlA.nothing - - None -> - True |> Json.bool |> HtmlA.property "noninteractive" - - attrs = - List.concat [ optionalAttrs, [ actionAttr, HtmlA.title title ] ] - - slots = - List.concat [ optionalSlots, [ Html.span [] children ] ] - in - Html.node "mwc-list-item" attrs slots diff --git a/client/src/elm/Material/Menu.elm b/client/src/elm/Material/Menu.elm deleted file mode 100644 index 538160ad..00000000 --- a/client/src/elm/Material/Menu.elm +++ /dev/null @@ -1,60 +0,0 @@ -module Material.Menu exposing (view) - -import Html exposing (Html) -import Html.Attributes as HtmlA -import Html.Events as HtmlE -import Json.Decode -import Json.Encode as Json -import MassiveDecks.Components.Menu.Model exposing (..) - - -{-| View a pop-up menu. --} -view : msg -> State -> Corner -> Html msg -> List (Html msg) -> Html msg -view onClose state corner anchor menuItems = - let - open = - case state of - Open -> - True - - Closed -> - False - - stringCorner = - case corner of - TopLeft -> - "TOP_LEFT" - - TopRight -> - "TOP_RIGHT" - - BottomLeft -> - "BOTTOM_LEFT" - - BottomRight -> - "BOTTOM_RIGHT" - - TopStart -> - "TOP_START" - - TopEnd -> - "TOP_END" - - BottomStart -> - "BOTTOM_START" - - BottomEnd -> - "BOTTOM_END" - in - Html.div [ HtmlA.class "menu-anchor" ] - [ anchor - , Html.node "mwc-menu" - [ True |> Json.bool |> HtmlA.property "activatable" - , open |> Json.bool |> HtmlA.property "open" - , stringCorner |> HtmlA.attribute "corner" - , HtmlA.class "menu" - , onClose |> Json.Decode.succeed |> HtmlE.on "closed" - ] - menuItems - ] diff --git a/client/src/elm/Material/Ripple.elm b/client/src/elm/Material/Ripple.elm deleted file mode 100644 index a9faa0da..00000000 --- a/client/src/elm/Material/Ripple.elm +++ /dev/null @@ -1,8 +0,0 @@ -module Material.Ripple exposing (view) - -import Html as HtmlA - - -view : List (HtmlA.Attribute msg) -> List (HtmlA.Html msg) -> HtmlA.Html msg -view = - HtmlA.node "mwc-ripple" diff --git a/client/src/elm/Material/Select.elm b/client/src/elm/Material/Select.elm deleted file mode 100644 index 2aae30dc..00000000 --- a/client/src/elm/Material/Select.elm +++ /dev/null @@ -1,87 +0,0 @@ -module Material.Select exposing - ( ItemModel - , Model - , view - ) - -import Html exposing (Html) -import Html.Attributes as HtmlA -import Html.Events as HtmlE -import Json.Decode as Json -import Json.Encode -import MassiveDecks.Model exposing (Shared) -import MassiveDecks.Strings exposing (MdString) -import MassiveDecks.Strings.Languages as Lang -import MassiveDecks.Util.Html.Attributes as HtmlA - - -{-| A combo box. --} -view : Shared -> Model id msg -> List (Html.Attribute msg) -> List (ItemModel id msg) -> Html msg -view shared model attrs items = - let - allAttrs = - List.concat - [ [ model.label |> Lang.label shared - , model.idFromString >> model.wrap |> onChange - , HtmlA.fullWidth - ] - , attrs - ] - in - Html.node "mwc-select" allAttrs (items |> List.map (viewItem model)) - - -{-| The things needed to render the select. --} -type alias Model id msg = - { label : MdString - , idToString : id -> String - , idFromString : String -> Maybe id - , selected : Maybe id - , wrap : Maybe id -> msg - } - - -{-| The things needed to render a specific item in the select. --} -type alias ItemModel id msg = - { id : id - , icon : Maybe (Html msg) - , primary : List (Html msg) - , secondary : Maybe (List (Html msg)) - , meta : Maybe (Html msg) - } - - - -{- Private -} - - -{-| An item within a list. --} -viewItem : Model id msg -> ItemModel id msg -> Html msg -viewItem { idToString, selected } { id, icon, primary, secondary, meta } = - let - ( optionalAttrs, optionalSlots ) = - [ icon |> Maybe.map (\i -> ( HtmlA.attribute "graphic" "large", Html.span [ HtmlA.slot "graphic" ] [ i ] )) - , meta |> Maybe.map (\m -> ( True |> Json.Encode.bool |> HtmlA.property "hasMeta", Html.span [ HtmlA.slot "meta" ] [ m ] )) - , secondary |> Maybe.map (\s -> ( True |> Json.Encode.bool |> HtmlA.property "twoline", Html.span [ HtmlA.slot "secondary" ] s )) - ] - |> List.filterMap identity - |> List.unzip - - attrs = - List.concat [ optionalAttrs, [ id |> idToString |> HtmlA.value, selected == Just id |> HtmlA.selected ] ] - - slots = - List.concat [ primary, optionalSlots ] |> List.intersperse (Html.text " ") - in - Html.node "mwc-list-item" attrs slots - - -{-| An event for when the user changes the selection. --} -onChange : (String -> msg) -> Html.Attribute msg -onChange wrap = - Json.at [ "target", "value" ] Json.string |> Json.map wrap |> HtmlE.on "change" diff --git a/client/src/elm/Material/Slider.elm b/client/src/elm/Material/Slider.elm deleted file mode 100644 index 2067be25..00000000 --- a/client/src/elm/Material/Slider.elm +++ /dev/null @@ -1,56 +0,0 @@ -module Material.Slider exposing - ( discrete - , max - , min - , onChange - , step - , value - , view - , withTickMarks - ) - -import Html exposing (Html) -import Html.Attributes as HtmlA -import Html.Events as HtmlE -import Json.Decode -import Json.Encode as Json - - -view : List (Html.Attribute msg) -> Html msg -view attributes = - Html.node "mwc-slider" attributes [] - - -step : Int -> Html.Attribute msg -step = - Json.int >> HtmlA.property "step" - - -min : Int -> Html.Attribute msg -min = - Json.int >> HtmlA.property "min" - - -max : Int -> Html.Attribute msg -max = - Json.int >> HtmlA.property "max" - - -withTickMarks : Int -> Html.Attribute msg -withTickMarks = - Json.int >> HtmlA.property "withTickMarks" - - -value : Int -> Html.Attribute msg -value = - Json.int >> HtmlA.property "value" - - -discrete : Bool -> Html.Attribute msg -discrete = - Json.bool >> HtmlA.property "discrete" - - -onChange : (Int -> msg) -> Html.Attribute msg -onChange wrap = - Json.Decode.at [ "target", "value" ] Json.Decode.int |> Json.Decode.map wrap |> HtmlE.on "change" diff --git a/client/src/elm/Material/Switch.elm b/client/src/elm/Material/Switch.elm deleted file mode 100644 index eb05188a..00000000 --- a/client/src/elm/Material/Switch.elm +++ /dev/null @@ -1,8 +0,0 @@ -module Material.Switch exposing (view) - -import Html exposing (Html) - - -view : List (Html.Attribute msg) -> Html msg -view attributes = - Html.node "mwc-switch" attributes [] diff --git a/client/src/elm/Material/Tabs.elm b/client/src/elm/Material/Tabs.elm deleted file mode 100644 index 827a793e..00000000 --- a/client/src/elm/Material/Tabs.elm +++ /dev/null @@ -1,88 +0,0 @@ -module Material.Tabs exposing - ( Model - , TabModel - , view - ) - -import FontAwesome as Icon exposing (Icon) -import Html exposing (Html) -import Html.Attributes as HtmlA -import Html.Events as HtmlE -import Json.Decode -import Json.Encode -import List.Extra as List -import MassiveDecks.Model exposing (Shared) -import MassiveDecks.Strings exposing (MdString) -import MassiveDecks.Strings.Languages as Lang -import MassiveDecks.Util.Html as Html -import MassiveDecks.Util.Html.Attributes as HtmlA -import MassiveDecks.Util.NeList as NonEmptyList exposing (NeList) - - -{-| A model for a bar of tabs. --} -type alias Model id msg = - { selected : id - , change : id -> msg - , ids : NeList id - , tab : id -> TabModel - , equals : id -> id -> Bool - } - - -{-| A model for a tab. --} -type alias TabModel = - { label : MdString - , icon : Maybe (Icon Icon.WithoutId) - } - - -{-| View a bar of tabs. --} -view : Shared -> Model id msg -> Html msg -view shared { selected, change, ids, tab, equals } = - let - idsList = - ids |> NonEmptyList.toList - - attrs = - [ idsList |> List.findIndex (equals selected) |> Maybe.withDefault 0 |> activeIndex - , ((\id -> List.getAt id idsList) >> (ids |> NonEmptyList.head |> Maybe.withDefault) >> change) |> onActivated - ] - - viewTab { label, icon } = - let - ( iconAttr, iconNode ) = - case icon of - Just i -> - ( hasImageIcon, i |> Icon.styled [ HtmlA.slot "icon" ] |> Icon.view ) - - Nothing -> - ( HtmlA.nothing, Html.nothing ) - in - Html.node "mwc-tab" [ label |> Lang.label shared, iconAttr ] [ iconNode ] - - tabs = - idsList |> List.map (tab >> viewTab) - in - Html.node "mwc-tab-bar" attrs tabs - - - -{- Private -} - - -activeIndex : Int -> Html.Attribute msg -activeIndex = - Json.Encode.int >> HtmlA.property "activeIndex" - - -hasImageIcon : Html.Attribute msg -hasImageIcon = - HtmlA.attribute "hasImageIcon" "hasImageIcon" - - -onActivated : (Int -> msg) -> Html.Attribute msg -onActivated wrap = - Json.Decode.int |> Json.Decode.map wrap |> Json.Decode.at [ "target", "activeIndex" ] |> HtmlE.on "MDCTabBar:activated" diff --git a/client/src/elm/Material/TextArea.elm b/client/src/elm/Material/TextArea.elm deleted file mode 100644 index 3fdc6e59..00000000 --- a/client/src/elm/Material/TextArea.elm +++ /dev/null @@ -1,8 +0,0 @@ -module Material.TextArea exposing (view) - -import Html - - -view : List (Html.Attribute msg) -> List (Html.Html msg) -> Html.Html msg -view = - Html.node "mwc-textarea" diff --git a/client/src/elm/Material/TextField.elm b/client/src/elm/Material/TextField.elm deleted file mode 100644 index 77db9d25..00000000 --- a/client/src/elm/Material/TextField.elm +++ /dev/null @@ -1,96 +0,0 @@ -module Material.TextField exposing - ( Type(..) - , view - ) - -import Html exposing (Html) -import Html.Attributes as HtmlA -import MassiveDecks.Model exposing (Shared) -import MassiveDecks.Strings exposing (MdString) -import MassiveDecks.Strings.Languages as Lang - - -{-| The type of field. --} -type Type - = Text - | Search - | Tel - | Url - | Email - | Password - | Date - | Month - | Week - | Time - | DateTimeLocal - | Number - | Color - - -{-| A text field for the given type of data. --} -view : Shared -> MdString -> Type -> String -> List (Html.Attribute msg) -> Html msg -view shared label t value attributes = - let - allAttrs = - List.concat - [ [ label |> Lang.label shared - , t |> type_ - , value |> HtmlA.value - ] - , attributes - ] - in - Html.node "mwc-textfield" allAttrs [] - - - -{- Private -} - - -type_ : Type -> Html.Attribute msg -type_ t = - let - stringType = - case t of - Text -> - "text" - - Search -> - "search" - - Tel -> - "tel" - - Url -> - "url" - - Email -> - "email" - - Password -> - "password" - - Date -> - "date" - - Month -> - "month" - - Week -> - "week" - - Time -> - "time" - - DateTimeLocal -> - "datetime-local" - - Number -> - "number" - - Color -> - "color" - in - stringType |> HtmlA.attribute "type" diff --git a/client/src/scss/_material.scss b/client/src/scss/_material.scss index b1219742..02d83e81 100644 --- a/client/src/scss/_material.scss +++ b/client/src/scss/_material.scss @@ -1,9 +1,6 @@ @use "_colors"; @use "_fonts"; -@use "~@material/card"; -@include card.core-styles; - /// Support styling for Material Web Components. :root { @@ -29,76 +26,3 @@ mwc-tab .svg-inline--fa { font-size: 1em; } - -mwc-icon-button { - svg, - .fa-layers { - display: block !important; - width: 0.7em !important; - height: 0.7em !important; - } -} - -.mdc-card { - padding: 1em; -} - -mwc-select { - width: 100%; -} - -mwc-textfield { - width: 100%; -} - -mwc-fab { - line-height: 1; - - &:focus, - &::-moz-focus-inner { - outline: none; - border: 0; - } - - .svg-inline--fa { - margin-right: 0; - } - - display: inline-flex; - justify-content: center; - - transition: opacity 15ms linear 30ms, - transform 0.27s cubic-bezier(0, 0, 0.2, 1) 0ms; - - &.exited { - transition: opacity 15ms linear 0.15s, - transform 0.18s cubic-bezier(0.4, 0, 1, 1) 0ms; - - transform: scale(0); - opacity: 0; - } - - &.large { - --button-fab-size: 3em; - font-size: 1.2em; - } - - &[disabled] { - pointer-events: none; - --mdc-theme-secondary: #cccccc; - } -} - -.menu-anchor { - position: relative; - - mwc-menu { - position: absolute; - right: 0; - top: 0; - } -} - -a > mwc-list-item { - height: 48px; -} diff --git a/client/src/scss/_settings.scss b/client/src/scss/_settings.scss index e1072ce7..8da93704 100644 --- a/client/src/scss/_settings.scss +++ b/client/src/scss/_settings.scss @@ -16,7 +16,7 @@ } } -.settings-panel { +div.settings-panel { display: none; position: absolute; top: 4em; diff --git a/client/src/scss/massive-decks.scss b/client/src/scss/massive-decks.scss index ff6e7d2e..6f746162 100644 --- a/client/src/scss/massive-decks.scss +++ b/client/src/scss/massive-decks.scss @@ -1,16 +1,17 @@ -@use "_colors"; -@use "_fonts"; -@use "_material"; - -@use "_game"; -@use "pages/_start"; -@use "pages/_lobby"; -@use "pages/_spectate"; -@use "pages/_unknown-page"; -@use "_settings"; -@use "_error"; - -@use "@fortawesome/fontawesome-svg-core/styles.css"; +@use "./colors"; +@use "./fonts"; +@use "./material"; + +@use "./game"; +@use "./pages/start"; +@use "./pages/lobby"; +@use "./pages/spectate"; +@use "./pages/unknown-page"; +@use "./settings"; +@use "./error"; + +@import "../../elm-material/src/scss/material"; +@import "@fortawesome/fontawesome-svg-core/styles.css"; $min-page-width: 320px; diff --git a/client/src/scss/pages/_lobby.scss b/client/src/scss/pages/_lobby.scss index a56b57bc..bfdb093e 100644 --- a/client/src/scss/pages/_lobby.scss +++ b/client/src/scss/pages/_lobby.scss @@ -14,9 +14,6 @@ $users-width: 18rem; } } -#lobby { -} - #top-bar { position: absolute; top: 0; @@ -99,6 +96,8 @@ $users-width: 18rem; transition: width 0.3s; + --mdc-menu-max-width: #{calc($users-width - 2em)}; + mwc-menu { left: 0; right: 0; @@ -210,7 +209,7 @@ $users-width: 18rem; z-index: 500; } -.notification { +div.notification { position: fixed; left: 0; bottom: 0; diff --git a/client/src/ts/massive-decks.ts b/client/src/ts/massive-decks.ts index 1fbf089e..c9e0fe43 100644 --- a/client/src/ts/massive-decks.ts +++ b/client/src/ts/massive-decks.ts @@ -1,5 +1,5 @@ import "@webcomponents/webcomponentsjs/webcomponents-loader"; -import "./material"; +import "../../elm-material/src/ts/material"; import "./paper"; import "../scss/massive-decks.scss"; import * as serverConnection from "./server-connection"; @@ -30,22 +30,22 @@ export function load(remoteMode: boolean) { copy.register(app.ports.copyText); notificationManager.register( app.ports.notificationState, - app.ports.notificationCommands + app.ports.notificationCommands, ); language.register(app.ports.languageChanged); confetti.register(app.ports.startConfetti); import(/* webpackChunkName: "cast-client" */ "./cast/client").then( (cast) => { cast.register(app.ports.tryCast, app.ports.castStatus); - } + }, ); } else { import(/* webpackChunkName: "cast-server" */ "./cast/server").then( (cast) => { cast.register(app.ports.remoteControl); - } + }, ); } - } + }, ); } diff --git a/client/src/ts/material.ts b/client/src/ts/material.ts deleted file mode 100644 index c915d71a..00000000 --- a/client/src/ts/material.ts +++ /dev/null @@ -1,14 +0,0 @@ -import "@material/mwc-button"; -import "@material/mwc-fab"; -import "@material/mwc-switch"; -import "@material/mwc-slider"; -import "@material/mwc-select"; -import "@material/mwc-tab"; -import "@material/mwc-tab-bar"; -import "@material/mwc-menu"; -import "@material/mwc-list"; -import "@material/mwc-list/mwc-list-item"; -import "@material/mwc-textarea"; -import "@material/mwc-textfield"; -import "@material/mwc-icon-button"; -import "@material/mwc-linear-progress"; diff --git a/client/tsconfig.json b/client/tsconfig.json index cb37bacb..f6c63d02 100644 --- a/client/tsconfig.json +++ b/client/tsconfig.json @@ -5,17 +5,12 @@ "noImplicitAny": true, "preserveConstEnums": true, "outDir": "dist", - "strict": true, + "strict": true, "sourceMap": true, - "baseUrl": ".", + "baseUrl": ".", "moduleResolution": "node", - "lib": [ "es2015", "dom" ] + "lib": ["es2015", "dom"] }, - "include": [ - "src/ts/**/*" - ], - "exclude": [ - "node_modules", - "dist" - ] + "include": ["src/ts/**/*", "elm-material/src/ts/**/*"], + "exclude": ["node_modules", "dist"] } diff --git a/server/package-lock.json b/server/package-lock.json index 6a0ed0d4..a5c8a456 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -277,9 +277,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "17.0.36", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.36.tgz", - "integrity": "sha512-V3orv+ggDsWVHP99K3JlwtH20R7J4IhI1Kksgc+64q5VxgfRkQG8Ws3MFm/FZOKDYGy9feGFlZ70/HpCNe9QaA==", + "version": "17.0.38", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.38.tgz", + "integrity": "sha512-5jY9RhV7c0Z4Jy09G+NIDTsCZ5G0L5n+Z+p+Y7t5VJHM30bgwzSjVtlcBxqAj+6L/swIlvtOSzr8rBk/aNyV2g==", "dev": true }, "node_modules/@types/pg": { @@ -346,14 +346,14 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.26.0.tgz", - "integrity": "sha512-oGCmo0PqnRZZndr+KwvvAUvD3kNE4AfyoGCwOZpoCncSh4MVD06JTE8XQa2u9u+NX5CsyZMBTEc2C72zx38eYA==", + "version": "5.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.27.0.tgz", + "integrity": "sha512-DDrIA7GXtmHXr1VCcx9HivA39eprYBIFxbQEHI6NyraRDxCGpxAFiYQAT/1Y0vh1C+o2vfBiy4IuPoXxtTZCAQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.26.0", - "@typescript-eslint/type-utils": "5.26.0", - "@typescript-eslint/utils": "5.26.0", + "@typescript-eslint/scope-manager": "5.27.0", + "@typescript-eslint/type-utils": "5.27.0", + "@typescript-eslint/utils": "5.27.0", "debug": "^4.3.4", "functional-red-black-tree": "^1.0.1", "ignore": "^5.2.0", @@ -408,14 +408,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.26.0.tgz", - "integrity": "sha512-n/IzU87ttzIdnAH5vQ4BBDnLPly7rC5VnjN3m0xBG82HK6rhRxnCb3w/GyWbNDghPd+NktJqB/wl6+YkzZ5T5Q==", + "version": "5.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.27.0.tgz", + "integrity": "sha512-8oGjQF46c52l7fMiPPvX4It3u3V3JipssqDfHQ2hcR0AeR8Zge+OYyKUCm5b70X72N1qXt0qgHenwN6Gc2SXZA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.26.0", - "@typescript-eslint/types": "5.26.0", - "@typescript-eslint/typescript-estree": "5.26.0", + "@typescript-eslint/scope-manager": "5.27.0", + "@typescript-eslint/types": "5.27.0", + "@typescript-eslint/typescript-estree": "5.27.0", "debug": "^4.3.4" }, "engines": { @@ -435,13 +435,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.26.0.tgz", - "integrity": "sha512-gVzTJUESuTwiju/7NiTb4c5oqod8xt5GhMbExKsCTp6adU3mya6AGJ4Pl9xC7x2DX9UYFsjImC0mA62BCY22Iw==", + "version": "5.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.27.0.tgz", + "integrity": "sha512-VnykheBQ/sHd1Vt0LJ1JLrMH1GzHO+SzX6VTXuStISIsvRiurue/eRkTqSrG0CexHQgKG8shyJfR4o5VYioB9g==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.26.0", - "@typescript-eslint/visitor-keys": "5.26.0" + "@typescript-eslint/types": "5.27.0", + "@typescript-eslint/visitor-keys": "5.27.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -452,12 +452,12 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.26.0.tgz", - "integrity": "sha512-7ccbUVWGLmcRDSA1+ADkDBl5fP87EJt0fnijsMFTVHXKGduYMgienC/i3QwoVhDADUAPoytgjbZbCOMj4TY55A==", + "version": "5.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.27.0.tgz", + "integrity": "sha512-vpTvRRchaf628Hb/Xzfek+85o//zEUotr1SmexKvTfs7czXfYjXVT/a5yDbpzLBX1rhbqxjDdr1Gyo0x1Fc64g==", "dev": true, "dependencies": { - "@typescript-eslint/utils": "5.26.0", + "@typescript-eslint/utils": "5.27.0", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -507,9 +507,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.26.0.tgz", - "integrity": "sha512-8794JZFE1RN4XaExLWLI2oSXsVImNkl79PzTOOWt9h0UHROwJedNOD2IJyfL0NbddFllcktGIO2aOu10avQQyA==", + "version": "5.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.27.0.tgz", + "integrity": "sha512-lY6C7oGm9a/GWhmUDOs3xAVRz4ty/XKlQ2fOLr8GAIryGn0+UBOoJDWyHer3UgrHkenorwvBnphhP+zPmzmw0A==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -520,13 +520,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.26.0.tgz", - "integrity": "sha512-EyGpw6eQDsfD6jIqmXP3rU5oHScZ51tL/cZgFbFBvWuCwrIptl+oueUZzSmLtxFuSOQ9vDcJIs+279gnJkfd1w==", + "version": "5.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.27.0.tgz", + "integrity": "sha512-QywPMFvgZ+MHSLRofLI7BDL+UczFFHyj0vF5ibeChDAJgdTV8k4xgEwF0geFhVlPc1p8r70eYewzpo6ps+9LJQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.26.0", - "@typescript-eslint/visitor-keys": "5.26.0", + "@typescript-eslint/types": "5.27.0", + "@typescript-eslint/visitor-keys": "5.27.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -576,15 +576,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.26.0.tgz", - "integrity": "sha512-PJFwcTq2Pt4AMOKfe3zQOdez6InIDOjUJJD3v3LyEtxHGVVRK3Vo7Dd923t/4M9hSH2q2CLvcTdxlLPjcIk3eg==", + "version": "5.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.27.0.tgz", + "integrity": "sha512-nZvCrkIJppym7cIbP3pOwIkAefXOmfGPnCM0LQfzNaKxJHI6VjI8NC662uoiPlaf5f6ymkTy9C3NQXev2mdXmA==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.26.0", - "@typescript-eslint/types": "5.26.0", - "@typescript-eslint/typescript-estree": "5.26.0", + "@typescript-eslint/scope-manager": "5.27.0", + "@typescript-eslint/types": "5.27.0", + "@typescript-eslint/typescript-estree": "5.27.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -600,12 +600,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.26.0.tgz", - "integrity": "sha512-wei+ffqHanYDOQgg/fS6Hcar6wAWv0CUPQ3TZzOWd2BLfgP539rb49bwua8WRAs7R6kOSLn82rfEu2ro6Llt8Q==", + "version": "5.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.27.0.tgz", + "integrity": "sha512-46cYrteA2MrIAjv9ai44OQDUoCZyHeGIc4lsjCUX2WT6r4C+kidz1bNiR4017wHOPUythYeH+Sc7/cFP97KEAA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.26.0", + "@typescript-eslint/types": "5.27.0", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -820,7 +820,7 @@ "node_modules/body-parser/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/boxen": { "version": "5.1.2", @@ -1801,7 +1801,7 @@ "node_modules/express/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/fast-deep-equal": { "version": "3.1.3", @@ -1925,7 +1925,7 @@ "node_modules/finalhandler/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/flat-cache": { "version": "3.0.4", @@ -2720,7 +2720,7 @@ "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", "engines": { "node": ">= 0.6" } @@ -2728,7 +2728,7 @@ "node_modules/merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" }, "node_modules/merge2": { "version": "1.4.1", @@ -2742,7 +2742,7 @@ "node_modules/methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", "engines": { "node": ">= 0.6" } @@ -2833,7 +2833,7 @@ "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, "node_modules/negotiator": { @@ -2915,7 +2915,7 @@ "node_modules/nopt": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", - "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", + "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", "dev": true, "dependencies": { "abbrev": "1" @@ -2967,7 +2967,7 @@ "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, "dependencies": { "wrappy": "1" @@ -3059,7 +3059,7 @@ "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, "engines": { "node": ">=0.10.0" @@ -3077,7 +3077,7 @@ "node_modules/path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" }, "node_modules/path-type": { "version": "4.0.0", @@ -3185,7 +3185,7 @@ "node_modules/postgres-bytea": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz", - "integrity": "sha1-AntTPAqokOJtFy1Hz5zOzFIazTU=", + "integrity": "sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w==", "engines": { "node": ">=0.10.0" } @@ -3221,7 +3221,7 @@ "node_modules/prepend-http": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "integrity": "sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA==", "dev": true, "engines": { "node": ">=4" @@ -3630,7 +3630,7 @@ "node_modules/send/node_modules/debug/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/send/node_modules/ms": { "version": "2.1.3", @@ -3921,9 +3921,9 @@ } }, "node_modules/typescript": { - "version": "4.8.0-dev.20220530", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.0-dev.20220530.tgz", - "integrity": "sha512-NB9F5TGowxNmBQ9GY/ufx1dreQby8NuzdtuogOEFFsK1SruBRlmCCUX6YkrTUK76WnhEoSzoLGGFj45qb8wfbw==", + "version": "4.8.0-dev.20220602", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.0-dev.20220602.tgz", + "integrity": "sha512-1T4oqo8KYojf6edCkymgrNS7Rnmou3o02jhI3cT5zLQx7WeVqwFii9hTZ0E39oYOVnRKSoDDeQw9hPdX/3SOVA==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -4390,9 +4390,9 @@ "dev": true }, "@types/node": { - "version": "17.0.36", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.36.tgz", - "integrity": "sha512-V3orv+ggDsWVHP99K3JlwtH20R7J4IhI1Kksgc+64q5VxgfRkQG8Ws3MFm/FZOKDYGy9feGFlZ70/HpCNe9QaA==", + "version": "17.0.38", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.38.tgz", + "integrity": "sha512-5jY9RhV7c0Z4Jy09G+NIDTsCZ5G0L5n+Z+p+Y7t5VJHM30bgwzSjVtlcBxqAj+6L/swIlvtOSzr8rBk/aNyV2g==", "dev": true }, "@types/pg": { @@ -4459,14 +4459,14 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.26.0.tgz", - "integrity": "sha512-oGCmo0PqnRZZndr+KwvvAUvD3kNE4AfyoGCwOZpoCncSh4MVD06JTE8XQa2u9u+NX5CsyZMBTEc2C72zx38eYA==", + "version": "5.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.27.0.tgz", + "integrity": "sha512-DDrIA7GXtmHXr1VCcx9HivA39eprYBIFxbQEHI6NyraRDxCGpxAFiYQAT/1Y0vh1C+o2vfBiy4IuPoXxtTZCAQ==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.26.0", - "@typescript-eslint/type-utils": "5.26.0", - "@typescript-eslint/utils": "5.26.0", + "@typescript-eslint/scope-manager": "5.27.0", + "@typescript-eslint/type-utils": "5.27.0", + "@typescript-eslint/utils": "5.27.0", "debug": "^4.3.4", "functional-red-black-tree": "^1.0.1", "ignore": "^5.2.0", @@ -4494,34 +4494,34 @@ } }, "@typescript-eslint/parser": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.26.0.tgz", - "integrity": "sha512-n/IzU87ttzIdnAH5vQ4BBDnLPly7rC5VnjN3m0xBG82HK6rhRxnCb3w/GyWbNDghPd+NktJqB/wl6+YkzZ5T5Q==", + "version": "5.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.27.0.tgz", + "integrity": "sha512-8oGjQF46c52l7fMiPPvX4It3u3V3JipssqDfHQ2hcR0AeR8Zge+OYyKUCm5b70X72N1qXt0qgHenwN6Gc2SXZA==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.26.0", - "@typescript-eslint/types": "5.26.0", - "@typescript-eslint/typescript-estree": "5.26.0", + "@typescript-eslint/scope-manager": "5.27.0", + "@typescript-eslint/types": "5.27.0", + "@typescript-eslint/typescript-estree": "5.27.0", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.26.0.tgz", - "integrity": "sha512-gVzTJUESuTwiju/7NiTb4c5oqod8xt5GhMbExKsCTp6adU3mya6AGJ4Pl9xC7x2DX9UYFsjImC0mA62BCY22Iw==", + "version": "5.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.27.0.tgz", + "integrity": "sha512-VnykheBQ/sHd1Vt0LJ1JLrMH1GzHO+SzX6VTXuStISIsvRiurue/eRkTqSrG0CexHQgKG8shyJfR4o5VYioB9g==", "dev": true, "requires": { - "@typescript-eslint/types": "5.26.0", - "@typescript-eslint/visitor-keys": "5.26.0" + "@typescript-eslint/types": "5.27.0", + "@typescript-eslint/visitor-keys": "5.27.0" } }, "@typescript-eslint/type-utils": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.26.0.tgz", - "integrity": "sha512-7ccbUVWGLmcRDSA1+ADkDBl5fP87EJt0fnijsMFTVHXKGduYMgienC/i3QwoVhDADUAPoytgjbZbCOMj4TY55A==", + "version": "5.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.27.0.tgz", + "integrity": "sha512-vpTvRRchaf628Hb/Xzfek+85o//zEUotr1SmexKvTfs7czXfYjXVT/a5yDbpzLBX1rhbqxjDdr1Gyo0x1Fc64g==", "dev": true, "requires": { - "@typescript-eslint/utils": "5.26.0", + "@typescript-eslint/utils": "5.27.0", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -4545,19 +4545,19 @@ } }, "@typescript-eslint/types": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.26.0.tgz", - "integrity": "sha512-8794JZFE1RN4XaExLWLI2oSXsVImNkl79PzTOOWt9h0UHROwJedNOD2IJyfL0NbddFllcktGIO2aOu10avQQyA==", + "version": "5.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.27.0.tgz", + "integrity": "sha512-lY6C7oGm9a/GWhmUDOs3xAVRz4ty/XKlQ2fOLr8GAIryGn0+UBOoJDWyHer3UgrHkenorwvBnphhP+zPmzmw0A==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.26.0.tgz", - "integrity": "sha512-EyGpw6eQDsfD6jIqmXP3rU5oHScZ51tL/cZgFbFBvWuCwrIptl+oueUZzSmLtxFuSOQ9vDcJIs+279gnJkfd1w==", + "version": "5.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.27.0.tgz", + "integrity": "sha512-QywPMFvgZ+MHSLRofLI7BDL+UczFFHyj0vF5ibeChDAJgdTV8k4xgEwF0geFhVlPc1p8r70eYewzpo6ps+9LJQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.26.0", - "@typescript-eslint/visitor-keys": "5.26.0", + "@typescript-eslint/types": "5.27.0", + "@typescript-eslint/visitor-keys": "5.27.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -4584,26 +4584,26 @@ } }, "@typescript-eslint/utils": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.26.0.tgz", - "integrity": "sha512-PJFwcTq2Pt4AMOKfe3zQOdez6InIDOjUJJD3v3LyEtxHGVVRK3Vo7Dd923t/4M9hSH2q2CLvcTdxlLPjcIk3eg==", + "version": "5.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.27.0.tgz", + "integrity": "sha512-nZvCrkIJppym7cIbP3pOwIkAefXOmfGPnCM0LQfzNaKxJHI6VjI8NC662uoiPlaf5f6ymkTy9C3NQXev2mdXmA==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.26.0", - "@typescript-eslint/types": "5.26.0", - "@typescript-eslint/typescript-estree": "5.26.0", + "@typescript-eslint/scope-manager": "5.27.0", + "@typescript-eslint/types": "5.27.0", + "@typescript-eslint/typescript-estree": "5.27.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" } }, "@typescript-eslint/visitor-keys": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.26.0.tgz", - "integrity": "sha512-wei+ffqHanYDOQgg/fS6Hcar6wAWv0CUPQ3TZzOWd2BLfgP539rb49bwua8WRAs7R6kOSLn82rfEu2ro6Llt8Q==", + "version": "5.27.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.27.0.tgz", + "integrity": "sha512-46cYrteA2MrIAjv9ai44OQDUoCZyHeGIc4lsjCUX2WT6r4C+kidz1bNiR4017wHOPUythYeH+Sc7/cFP97KEAA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.26.0", + "@typescript-eslint/types": "5.27.0", "eslint-visitor-keys": "^3.3.0" } }, @@ -4766,7 +4766,7 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" } } }, @@ -5445,7 +5445,7 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" } } }, @@ -5632,7 +5632,7 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" } } }, @@ -6237,12 +6237,12 @@ "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==" }, "merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" }, "merge2": { "version": "1.4.1", @@ -6253,7 +6253,7 @@ "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==" }, "micromatch": { "version": "4.0.5", @@ -6317,7 +6317,7 @@ "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, "negotiator": { @@ -6378,7 +6378,7 @@ "nopt": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", - "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", + "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", "dev": true, "requires": { "abbrev": "1" @@ -6412,7 +6412,7 @@ "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, "requires": { "wrappy": "1" @@ -6488,7 +6488,7 @@ "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true }, "path-key": { @@ -6500,7 +6500,7 @@ "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" }, "path-type": { "version": "4.0.0", @@ -6577,7 +6577,7 @@ "postgres-bytea": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz", - "integrity": "sha1-AntTPAqokOJtFy1Hz5zOzFIazTU=" + "integrity": "sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w==" }, "postgres-date": { "version": "1.0.7", @@ -6601,7 +6601,7 @@ "prepend-http": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "integrity": "sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA==", "dev": true }, "prettier": { @@ -6878,7 +6878,7 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" } } }, @@ -7107,9 +7107,9 @@ } }, "typescript": { - "version": "4.8.0-dev.20220530", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.0-dev.20220530.tgz", - "integrity": "sha512-NB9F5TGowxNmBQ9GY/ufx1dreQby8NuzdtuogOEFFsK1SruBRlmCCUX6YkrTUK76WnhEoSzoLGGFj45qb8wfbw==", + "version": "4.8.0-dev.20220602", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.0-dev.20220602.tgz", + "integrity": "sha512-1T4oqo8KYojf6edCkymgrNS7Rnmou3o02jhI3cT5zLQx7WeVqwFii9hTZ0E39oYOVnRKSoDDeQw9hPdX/3SOVA==", "dev": true }, "undefsafe": {