From 1cb227305ce9d2d4cf05f2c70beebd629b42675c Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 21 Nov 2020 20:48:49 +0100 Subject: [PATCH] static: format code --- passbook/static/static/.prettierignore | 3 + passbook/static/static/.prettierrc.json | 1 + passbook/static/static/package-lock.json | 1332 +++++++++-------- passbook/static/static/package.json | 53 +- passbook/static/static/passbook/passbook.css | 42 +- passbook/static/static/rollup.config.js | 50 +- .../static/src/elements/ActionButton.ts | 51 +- .../static/src/elements/AdminLoginsChart.ts | 142 +- .../static/src/elements/AdminSidebar.ts | 33 +- .../static/static/src/elements/CodeMirror.ts | 4 +- .../static/static/src/elements/Dropdown.ts | 10 +- .../static/src/elements/FetchFillSlot.ts | 48 +- .../static/static/src/elements/Messages.ts | 32 +- .../static/static/src/elements/ModalButton.ts | 157 +- passbook/static/static/src/elements/Tabs.ts | 28 +- passbook/static/static/src/legacy.js | 58 +- passbook/static/static/src/main.ts | 20 +- .../static/static/src/pages/AdminSiteShell.ts | 119 +- .../static/static/src/pages/FlowShellCard.ts | 95 +- passbook/static/static/src/utils.ts | 14 +- passbook/static/static/tsconfig.json | 6 +- 21 files changed, 1221 insertions(+), 1077 deletions(-) create mode 100644 passbook/static/static/.prettierignore create mode 100644 passbook/static/static/.prettierrc.json diff --git a/passbook/static/static/.prettierignore b/passbook/static/static/.prettierignore new file mode 100644 index 000000000..4b7e16f97 --- /dev/null +++ b/passbook/static/static/.prettierignore @@ -0,0 +1,3 @@ +# Ignore artifacts: +dist +coverage diff --git a/passbook/static/static/.prettierrc.json b/passbook/static/static/.prettierrc.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/passbook/static/static/.prettierrc.json @@ -0,0 +1 @@ +{} diff --git a/passbook/static/static/package-lock.json b/passbook/static/static/package-lock.json index 54fd0be92..5d05ed098 100644 --- a/passbook/static/static/package-lock.json +++ b/passbook/static/static/package-lock.json @@ -1,674 +1,680 @@ { - "requires": true, - "lockfileVersion": 1, - "dependencies": { - "@babel/code-frame": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", - "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", - "dev": true, - "requires": { - "@babel/highlight": "^7.10.4" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", - "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==", - "dev": true - }, - "@babel/highlight": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", - "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.10.4", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, - "@fortawesome/fontawesome-free": { - "version": "5.15.1", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.1.tgz", - "integrity": "sha512-OEdH7SyC1suTdhBGW91/zBfR6qaIhThbcN8PUXtXilY4GYnSBbVqOntdHbC1vXwsDnX0Qix2m2+DSU1J51ybOQ==" - }, - "@patternfly/patternfly": { - "version": "4.65.6", - "resolved": "https://registry.npmjs.org/@patternfly/patternfly/-/patternfly-4.65.6.tgz", - "integrity": "sha512-dENO2nZbf5SoEH68coW9U+6FpZmdVnFVjztl7rUeWUPSBUuF1eWld5LT03Q6PVoZuWqqbJxFJodyFKwLb+L9vw==" - }, - "@rollup/plugin-typescript": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-6.1.0.tgz", - "integrity": "sha512-hJxaiE6WyNOsK+fZpbFh9CUijZYqPQuAOWO5khaGTUkM8DYNNyA2TDlgamecE+qLOG1G1+CwbWMAx3rbqpp6xQ==", - "dev": true, - "requires": { - "@rollup/pluginutils": "^3.1.0", - "resolve": "^1.17.0" - } - }, - "@rollup/pluginutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", - "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", - "dev": true, - "requires": { - "@types/estree": "0.0.39", - "estree-walker": "^1.0.1", - "picomatch": "^2.2.2" - }, - "dependencies": { + "requires": true, + "lockfileVersion": 1, + "dependencies": { + "@babel/code-frame": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", + "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==", + "dev": true + }, + "@babel/highlight": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", + "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "@fortawesome/fontawesome-free": { + "version": "5.15.1", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.1.tgz", + "integrity": "sha512-OEdH7SyC1suTdhBGW91/zBfR6qaIhThbcN8PUXtXilY4GYnSBbVqOntdHbC1vXwsDnX0Qix2m2+DSU1J51ybOQ==" + }, + "@patternfly/patternfly": { + "version": "4.65.6", + "resolved": "https://registry.npmjs.org/@patternfly/patternfly/-/patternfly-4.65.6.tgz", + "integrity": "sha512-dENO2nZbf5SoEH68coW9U+6FpZmdVnFVjztl7rUeWUPSBUuF1eWld5LT03Q6PVoZuWqqbJxFJodyFKwLb+L9vw==" + }, + "@rollup/plugin-typescript": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-6.1.0.tgz", + "integrity": "sha512-hJxaiE6WyNOsK+fZpbFh9CUijZYqPQuAOWO5khaGTUkM8DYNNyA2TDlgamecE+qLOG1G1+CwbWMAx3rbqpp6xQ==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^3.1.0", + "resolve": "^1.17.0" + } + }, + "@rollup/pluginutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", + "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", + "dev": true, + "requires": { + "@types/estree": "0.0.39", + "estree-walker": "^1.0.1", + "picomatch": "^2.2.2" + }, + "dependencies": { + "@types/estree": { + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", + "dev": true + }, + "estree-walker": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "dev": true + } + } + }, + "@types/chart.js": { + "version": "2.9.28", + "resolved": "https://registry.npmjs.org/@types/chart.js/-/chart.js-2.9.28.tgz", + "integrity": "sha512-9YYhsxRngRJb0dkuaU5BezkF+zvvVHnwdRw+rtlahtFb4zqNf9YSgWsOq+dLYeh0fqsWmHUYLR64eNigh02F+w==", + "requires": { + "moment": "^2.10.2" + } + }, + "@types/clean-css": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@types/clean-css/-/clean-css-4.2.2.tgz", + "integrity": "sha512-xiTJn3bmDh1lA8c6iVJs4ZhHw+pcmxXlJQXOB6G1oULaak8rmarIeFKI4aTJ7849dEhaO612wgIualZfbxTJwA==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/codemirror": { + "version": "0.0.98", + "resolved": "https://registry.npmjs.org/@types/codemirror/-/codemirror-0.0.98.tgz", + "integrity": "sha512-cbty5LPayy2vNSeuUdjNA9tggG+go5vAxmnLDRWpiZI5a+RDBi9dlozy4/jW/7P/gletbBWbQREEa7A81YxstA==", + "requires": { + "@types/tern": "*" + } + }, "@types/estree": { - "version": "0.0.39", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", - "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", - "dev": true + "version": "0.0.45", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.45.tgz", + "integrity": "sha512-jnqIUKDUqJbDIUxm0Uj7bnlMnRm1T/eZ9N+AVMqhPgzrba2GhGG5o/jCTwmdPK709nEZsGoMzXEDUjcXHa3W0g==" + }, + "@types/html-minifier": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/@types/html-minifier/-/html-minifier-3.5.3.tgz", + "integrity": "sha512-j1P/4PcWVVCPEy5lofcHnQ6BtXz9tHGiFPWzqm7TtGuWZEfCHEP446HlkSNc9fQgNJaJZ6ewPtp2aaFla/Uerg==", + "dev": true, + "requires": { + "@types/clean-css": "*", + "@types/relateurl": "*", + "@types/uglify-js": "*" + } + }, + "@types/node": { + "version": "14.11.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.11.2.tgz", + "integrity": "sha512-jiE3QIxJ8JLNcb1Ps6rDbysDhN4xa8DJJvuC9prr6w+1tIh+QAbYyNF3tyiZNLDBIuBCf4KEcV2UvQm/V60xfA==", + "dev": true + }, + "@types/relateurl": { + "version": "0.2.28", + "resolved": "https://registry.npmjs.org/@types/relateurl/-/relateurl-0.2.28.tgz", + "integrity": "sha1-a9p9uGU/piZD9e5p6facEaOS46Y=", + "dev": true + }, + "@types/resolve": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz", + "integrity": "sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/tern": { + "version": "0.23.3", + "resolved": "https://registry.npmjs.org/@types/tern/-/tern-0.23.3.tgz", + "integrity": "sha512-imDtS4TAoTcXk0g7u4kkWqedB3E4qpjXzCpD2LU5M5NAXHzCDsypyvXSaG7mM8DKYkCRa7tFp4tS/lp/Wo7Q3w==", + "requires": { + "@types/estree": "*" + } + }, + "@types/uglify-js": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.11.0.tgz", + "integrity": "sha512-I0Yd8TUELTbgRHq2K65j8rnDPAzAP+DiaF/syLem7yXwYLsHZhPd+AM2iXsWmf9P2F2NlFCgl5erZPQx9IbM9Q==", + "dev": true, + "requires": { + "source-map": "^0.6.1" + } + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "builtin-modules": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.1.0.tgz", + "integrity": "sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw==", + "dev": true + }, + "camel-case": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", + "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", + "dev": true, + "requires": { + "no-case": "^2.2.0", + "upper-case": "^1.1.1" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "chart.js": { + "version": "2.9.4", + "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-2.9.4.tgz", + "integrity": "sha512-B07aAzxcrikjAPyV+01j7BmOpxtQETxTSlQ26BEYJ+3iUkbNKaOJ/nDbT6JjyqYxseM0ON12COHYdU2cTIjC7A==", + "requires": { + "chartjs-color": "^2.1.0", + "moment": "^2.10.2" + } + }, + "chartjs-color": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chartjs-color/-/chartjs-color-2.4.1.tgz", + "integrity": "sha512-haqOg1+Yebys/Ts/9bLo/BqUcONQOdr/hoEr2LLTRl6C5LXctUdHxsCYfvQVg5JIxITrfCNUDr4ntqmQk9+/0w==", + "requires": { + "chartjs-color-string": "^0.6.0", + "color-convert": "^1.9.3" + } + }, + "chartjs-color-string": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/chartjs-color-string/-/chartjs-color-string-0.6.0.tgz", + "integrity": "sha512-TIB5OKn1hPJvO7JcteW4WY/63v6KwEdt6udfnDE9iCAZgy+V4SrbSxoIbTw/xkUIapjEI4ExGtD0+6D3KyFd7A==", + "requires": { + "color-name": "^1.0.0" + } + }, + "clean-css": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz", + "integrity": "sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA==", + "dev": true, + "requires": { + "source-map": "~0.6.0" + } + }, + "codemirror": { + "version": "5.58.3", + "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.58.3.tgz", + "integrity": "sha512-KBhB+juiyOOgn0AqtRmWyAT3yoElkuvWTI6hsHa9E6GQrl6bk/fdAYcvuqW1/upO9T9rtEtapWdw4XYcNiVDEA==" + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true }, "estree-walker": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", - "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", - "dev": true - } - } - }, - "@types/chart.js": { - "version": "2.9.28", - "resolved": "https://registry.npmjs.org/@types/chart.js/-/chart.js-2.9.28.tgz", - "integrity": "sha512-9YYhsxRngRJb0dkuaU5BezkF+zvvVHnwdRw+rtlahtFb4zqNf9YSgWsOq+dLYeh0fqsWmHUYLR64eNigh02F+w==", - "requires": { - "moment": "^2.10.2" - } - }, - "@types/clean-css": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@types/clean-css/-/clean-css-4.2.2.tgz", - "integrity": "sha512-xiTJn3bmDh1lA8c6iVJs4ZhHw+pcmxXlJQXOB6G1oULaak8rmarIeFKI4aTJ7849dEhaO612wgIualZfbxTJwA==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/codemirror": { - "version": "0.0.98", - "resolved": "https://registry.npmjs.org/@types/codemirror/-/codemirror-0.0.98.tgz", - "integrity": "sha512-cbty5LPayy2vNSeuUdjNA9tggG+go5vAxmnLDRWpiZI5a+RDBi9dlozy4/jW/7P/gletbBWbQREEa7A81YxstA==", - "requires": { - "@types/tern": "*" - } - }, - "@types/estree": { - "version": "0.0.45", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.45.tgz", - "integrity": "sha512-jnqIUKDUqJbDIUxm0Uj7bnlMnRm1T/eZ9N+AVMqhPgzrba2GhGG5o/jCTwmdPK709nEZsGoMzXEDUjcXHa3W0g==" - }, - "@types/html-minifier": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/@types/html-minifier/-/html-minifier-3.5.3.tgz", - "integrity": "sha512-j1P/4PcWVVCPEy5lofcHnQ6BtXz9tHGiFPWzqm7TtGuWZEfCHEP446HlkSNc9fQgNJaJZ6ewPtp2aaFla/Uerg==", - "dev": true, - "requires": { - "@types/clean-css": "*", - "@types/relateurl": "*", - "@types/uglify-js": "*" - } - }, - "@types/node": { - "version": "14.11.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.11.2.tgz", - "integrity": "sha512-jiE3QIxJ8JLNcb1Ps6rDbysDhN4xa8DJJvuC9prr6w+1tIh+QAbYyNF3tyiZNLDBIuBCf4KEcV2UvQm/V60xfA==", - "dev": true - }, - "@types/relateurl": { - "version": "0.2.28", - "resolved": "https://registry.npmjs.org/@types/relateurl/-/relateurl-0.2.28.tgz", - "integrity": "sha1-a9p9uGU/piZD9e5p6facEaOS46Y=", - "dev": true - }, - "@types/resolve": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz", - "integrity": "sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/tern": { - "version": "0.23.3", - "resolved": "https://registry.npmjs.org/@types/tern/-/tern-0.23.3.tgz", - "integrity": "sha512-imDtS4TAoTcXk0g7u4kkWqedB3E4qpjXzCpD2LU5M5NAXHzCDsypyvXSaG7mM8DKYkCRa7tFp4tS/lp/Wo7Q3w==", - "requires": { - "@types/estree": "*" - } - }, - "@types/uglify-js": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.11.0.tgz", - "integrity": "sha512-I0Yd8TUELTbgRHq2K65j8rnDPAzAP+DiaF/syLem7yXwYLsHZhPd+AM2iXsWmf9P2F2NlFCgl5erZPQx9IbM9Q==", - "dev": true, - "requires": { - "source-map": "^0.6.1" - } - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true - }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", - "dev": true - }, - "builtin-modules": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.1.0.tgz", - "integrity": "sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw==", - "dev": true - }, - "camel-case": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", - "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", - "dev": true, - "requires": { - "no-case": "^2.2.0", - "upper-case": "^1.1.1" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "chart.js": { - "version": "2.9.4", - "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-2.9.4.tgz", - "integrity": "sha512-B07aAzxcrikjAPyV+01j7BmOpxtQETxTSlQ26BEYJ+3iUkbNKaOJ/nDbT6JjyqYxseM0ON12COHYdU2cTIjC7A==", - "requires": { - "chartjs-color": "^2.1.0", - "moment": "^2.10.2" - } - }, - "chartjs-color": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chartjs-color/-/chartjs-color-2.4.1.tgz", - "integrity": "sha512-haqOg1+Yebys/Ts/9bLo/BqUcONQOdr/hoEr2LLTRl6C5LXctUdHxsCYfvQVg5JIxITrfCNUDr4ntqmQk9+/0w==", - "requires": { - "chartjs-color-string": "^0.6.0", - "color-convert": "^1.9.3" - } - }, - "chartjs-color-string": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/chartjs-color-string/-/chartjs-color-string-0.6.0.tgz", - "integrity": "sha512-TIB5OKn1hPJvO7JcteW4WY/63v6KwEdt6udfnDE9iCAZgy+V4SrbSxoIbTw/xkUIapjEI4ExGtD0+6D3KyFd7A==", - "requires": { - "color-name": "^1.0.0" - } - }, - "clean-css": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz", - "integrity": "sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA==", - "dev": true, - "requires": { - "source-map": "~0.6.0" - } - }, - "codemirror": { - "version": "5.58.3", - "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.58.3.tgz", - "integrity": "sha512-KBhB+juiyOOgn0AqtRmWyAT3yoElkuvWTI6hsHa9E6GQrl6bk/fdAYcvuqW1/upO9T9rtEtapWdw4XYcNiVDEA==" - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" - }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "estree-walker": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", - "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", - "dev": true - }, - "fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", - "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", - "optional": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true - }, - "html-minifier": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-4.0.0.tgz", - "integrity": "sha512-aoGxanpFPLg7MkIl/DDFYtb0iWz7jMFGqFhvEDZga6/4QTjneiD8I/NXL1x5aaoCp7FSIT6h/OhykDdPsbtMig==", - "dev": true, - "requires": { - "camel-case": "^3.0.0", - "clean-css": "^4.2.1", - "commander": "^2.19.0", - "he": "^1.2.0", - "param-case": "^2.1.1", - "relateurl": "^0.2.7", - "uglify-js": "^3.5.1" - } - }, - "is-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", - "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", - "dev": true - }, - "is-reference": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", - "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", - "dev": true, - "requires": { - "@types/estree": "*" - } - }, - "jest-worker": { - "version": "26.3.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.3.0.tgz", - "integrity": "sha512-Vmpn2F6IASefL+DVBhPzI2J9/GJUsqzomdeN+P+dK8/jKxbh8R3BtFnx3FIta7wYlPU62cpJMJQo4kuOowcMnw==", - "dev": true, - "requires": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^7.0.0" - }, - "dependencies": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", + "dev": true + }, + "fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "optional": true + }, "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true + }, + "html-minifier": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-4.0.0.tgz", + "integrity": "sha512-aoGxanpFPLg7MkIl/DDFYtb0iWz7jMFGqFhvEDZga6/4QTjneiD8I/NXL1x5aaoCp7FSIT6h/OhykDdPsbtMig==", + "dev": true, + "requires": { + "camel-case": "^3.0.0", + "clean-css": "^4.2.1", + "commander": "^2.19.0", + "he": "^1.2.0", + "param-case": "^2.1.1", + "relateurl": "^0.2.7", + "uglify-js": "^3.5.1" + } + }, + "is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", + "dev": true + }, + "is-reference": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", + "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", + "dev": true, + "requires": { + "@types/estree": "*" + } + }, + "jest-worker": { + "version": "26.3.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.3.0.tgz", + "integrity": "sha512-Vmpn2F6IASefL+DVBhPzI2J9/GJUsqzomdeN+P+dK8/jKxbh8R3BtFnx3FIta7wYlPU62cpJMJQo4kuOowcMnw==", + "dev": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^7.0.0" + }, + "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "lit-element": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-2.4.0.tgz", + "integrity": "sha512-pBGLglxyhq/Prk2H91nA0KByq/hx/wssJBQFiYqXhGDvEnY31PRGYf1RglVzyLeRysu0IHm2K0P196uLLWmwFg==", + "requires": { + "lit-html": "^1.1.1" + } + }, + "lit-html": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-1.3.0.tgz", + "integrity": "sha512-0Q1bwmaFH9O14vycPHw8C/IeHMk/uSDldVLIefu/kfbTBGIc44KGH6A8p1bDfxUfHdc8q6Ct7kQklWoHgr4t1Q==" + }, + "lower-case": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", + "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", + "dev": true + }, + "magic-string": { + "version": "0.25.7", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", + "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", + "dev": true, + "requires": { + "sourcemap-codec": "^1.4.4" + } + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "minify-html-literals": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/minify-html-literals/-/minify-html-literals-1.3.2.tgz", + "integrity": "sha512-DBdi0md84vjvwmLoo9xleFV5FkhzOwfKBqcmoVFL54c9CFlSBtG9KTKEQqiwscB+acewculqys1cDnwyrYlNtg==", + "dev": true, + "requires": { + "@types/html-minifier": "^3.5.3", + "clean-css": "^4.2.1", + "html-minifier": "^4.0.0", + "magic-string": "^0.25.0", + "parse-literals": "^1.2.0" + } + }, + "moment": { + "version": "2.29.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz", + "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==" + }, + "no-case": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", + "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", + "dev": true, + "requires": { + "lower-case": "^1.1.1" + } + }, + "param-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", + "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", + "dev": true, + "requires": { + "no-case": "^2.2.0" + } + }, + "parse-literals": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/parse-literals/-/parse-literals-1.2.0.tgz", + "integrity": "sha512-gh4zPwvFSXx9ginX8lu9MP3OPHN3VV12PXI8IXD6oMCklFqM82pfbU9e/PKf9r7oLpbqlDSDyHYSVlxxuq3Iew==", + "dev": true, + "requires": { + "typescript": "^2.9.2 || ^3.0.0" + } + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "picomatch": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==" + }, + "prettier": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.0.tgz", + "integrity": "sha512-yYerpkvseM4iKD/BXLYUkQV5aKt4tQPqaGW6EsZjzyu0r7sVZZNPJW4Y8MyKmicp6t42XUPcBVA+H6sB3gqndw==", + "dev": true + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "relateurl": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", + "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=", + "dev": true + }, + "resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "rollup": { + "version": "2.33.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.33.3.tgz", + "integrity": "sha512-RpayhPTe4Gu/uFGCmk7Gp5Z9Qic2VsqZ040G+KZZvsZYdcuWaJg678JeDJJvJeEQXminu24a2au+y92CUWVd+w==", + "requires": { + "fsevents": "~2.1.2" + } + }, + "rollup-plugin-commonjs": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-10.1.0.tgz", + "integrity": "sha512-jlXbjZSQg8EIeAAvepNwhJj++qJWNJw1Cl0YnOqKtP5Djx+fFGkp3WRh+W0ASCaFG5w1jhmzDxgu3SJuVxPF4Q==", + "dev": true, + "requires": { + "estree-walker": "^0.6.1", + "is-reference": "^1.1.2", + "magic-string": "^0.25.2", + "resolve": "^1.11.0", + "rollup-pluginutils": "^2.8.1" + } + }, + "rollup-plugin-cssimport": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-cssimport/-/rollup-plugin-cssimport-1.0.2.tgz", + "integrity": "sha512-HT24rkJN1jUOiVzyAxYkTkh1g+dIMMVTC9qP7KeZolGQh8BDA0nnsbeND9LjNNOmjcZMIlLIqyrtDRjkVeHHFA==", + "requires": { + "@rollup/pluginutils": "^4.0.0" + }, + "dependencies": { + "@rollup/pluginutils": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.1.0.tgz", + "integrity": "sha512-TrBhfJkFxA+ER+ew2U2/fHbebhLT/l/2pRk0hfj9KusXUuRXd2v0R58AfaZK9VXDQ4TogOSEmICVrQAA3zFnHQ==", + "requires": { + "estree-walker": "^2.0.1", + "picomatch": "^2.2.2" + } + }, + "estree-walker": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.1.tgz", + "integrity": "sha512-tF0hv+Yi2Ot1cwj9eYHtxC0jB9bmjacjQs6ZBTj82H8JwUywFuc+7E83NWfNMwHXZc11mjfFcVXPe9gEP4B8dg==" + } + } + }, + "rollup-plugin-minify-html-literals": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/rollup-plugin-minify-html-literals/-/rollup-plugin-minify-html-literals-1.2.5.tgz", + "integrity": "sha512-x4FzCnbBpYdme7MQDS3+18CvYLqakAtM/JmA3hqXplwzMeZWW3l14KU7H33RhJlHH8Klgv49hGtBRLWLfjCudw==", + "dev": true, + "requires": { + "minify-html-literals": "^1.3.2", + "rollup-pluginutils": "^2.8.2" + } + }, + "rollup-plugin-node-resolve": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-5.2.0.tgz", + "integrity": "sha512-jUlyaDXts7TW2CqQ4GaO5VJ4PwwaV8VUGA7+km3n6k6xtOEacf61u0VXwN80phY/evMcaS+9eIeJ9MOyDxt5Zw==", + "dev": true, + "requires": { + "@types/resolve": "0.0.8", + "builtin-modules": "^3.1.0", + "is-module": "^1.0.0", + "resolve": "^1.11.1", + "rollup-pluginutils": "^2.8.1" + } + }, + "rollup-plugin-sourcemaps": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/rollup-plugin-sourcemaps/-/rollup-plugin-sourcemaps-0.6.3.tgz", + "integrity": "sha512-paFu+nT1xvuO1tPFYXGe+XnQvg4Hjqv/eIhG8i5EspfYYPBKL57X7iVbfv55aNVASg3dzWvES9dmWsL2KhfByw==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^3.0.9", + "source-map-resolve": "^0.6.0" + } + }, + "rollup-plugin-terser": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz", + "integrity": "sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "jest-worker": "^26.2.1", + "serialize-javascript": "^4.0.0", + "terser": "^5.0.0" + } + }, + "rollup-pluginutils": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", + "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", + "dev": true, + "requires": { + "estree-walker": "^0.6.1" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + }, + "serialize-javascript": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, + "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 + }, + "source-map-resolve": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.6.0.tgz", + "integrity": "sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==", + "dev": true, + "requires": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0" + } + }, + "source-map-support": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "sourcemap-codec": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", + "dev": true }, "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "lit-element": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-2.4.0.tgz", - "integrity": "sha512-pBGLglxyhq/Prk2H91nA0KByq/hx/wssJBQFiYqXhGDvEnY31PRGYf1RglVzyLeRysu0IHm2K0P196uLLWmwFg==", - "requires": { - "lit-html": "^1.1.1" - } - }, - "lit-html": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-1.3.0.tgz", - "integrity": "sha512-0Q1bwmaFH9O14vycPHw8C/IeHMk/uSDldVLIefu/kfbTBGIc44KGH6A8p1bDfxUfHdc8q6Ct7kQklWoHgr4t1Q==" - }, - "lower-case": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", - "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", - "dev": true - }, - "magic-string": { - "version": "0.25.7", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", - "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", - "dev": true, - "requires": { - "sourcemap-codec": "^1.4.4" - } - }, - "merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "minify-html-literals": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/minify-html-literals/-/minify-html-literals-1.3.2.tgz", - "integrity": "sha512-DBdi0md84vjvwmLoo9xleFV5FkhzOwfKBqcmoVFL54c9CFlSBtG9KTKEQqiwscB+acewculqys1cDnwyrYlNtg==", - "dev": true, - "requires": { - "@types/html-minifier": "^3.5.3", - "clean-css": "^4.2.1", - "html-minifier": "^4.0.0", - "magic-string": "^0.25.0", - "parse-literals": "^1.2.0" - } - }, - "moment": { - "version": "2.29.1", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz", - "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==" - }, - "no-case": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", - "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", - "dev": true, - "requires": { - "lower-case": "^1.1.1" - } - }, - "param-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", - "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", - "dev": true, - "requires": { - "no-case": "^2.2.0" - } - }, - "parse-literals": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/parse-literals/-/parse-literals-1.2.0.tgz", - "integrity": "sha512-gh4zPwvFSXx9ginX8lu9MP3OPHN3VV12PXI8IXD6oMCklFqM82pfbU9e/PKf9r7oLpbqlDSDyHYSVlxxuq3Iew==", - "dev": true, - "requires": { - "typescript": "^2.9.2 || ^3.0.0" - } - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true - }, - "picomatch": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==" - }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "relateurl": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", - "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=", - "dev": true - }, - "resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - }, - "rollup": { - "version": "2.33.3", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.33.3.tgz", - "integrity": "sha512-RpayhPTe4Gu/uFGCmk7Gp5Z9Qic2VsqZ040G+KZZvsZYdcuWaJg678JeDJJvJeEQXminu24a2au+y92CUWVd+w==", - "requires": { - "fsevents": "~2.1.2" - } - }, - "rollup-plugin-commonjs": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-10.1.0.tgz", - "integrity": "sha512-jlXbjZSQg8EIeAAvepNwhJj++qJWNJw1Cl0YnOqKtP5Djx+fFGkp3WRh+W0ASCaFG5w1jhmzDxgu3SJuVxPF4Q==", - "dev": true, - "requires": { - "estree-walker": "^0.6.1", - "is-reference": "^1.1.2", - "magic-string": "^0.25.2", - "resolve": "^1.11.0", - "rollup-pluginutils": "^2.8.1" - } - }, - "rollup-plugin-cssimport": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/rollup-plugin-cssimport/-/rollup-plugin-cssimport-1.0.2.tgz", - "integrity": "sha512-HT24rkJN1jUOiVzyAxYkTkh1g+dIMMVTC9qP7KeZolGQh8BDA0nnsbeND9LjNNOmjcZMIlLIqyrtDRjkVeHHFA==", - "requires": { - "@rollup/pluginutils": "^4.0.0" - }, - "dependencies": { - "@rollup/pluginutils": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.1.0.tgz", - "integrity": "sha512-TrBhfJkFxA+ER+ew2U2/fHbebhLT/l/2pRk0hfj9KusXUuRXd2v0R58AfaZK9VXDQ4TogOSEmICVrQAA3zFnHQ==", - "requires": { - "estree-walker": "^2.0.1", - "picomatch": "^2.2.2" - } + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } }, - "estree-walker": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.1.tgz", - "integrity": "sha512-tF0hv+Yi2Ot1cwj9eYHtxC0jB9bmjacjQs6ZBTj82H8JwUywFuc+7E83NWfNMwHXZc11mjfFcVXPe9gEP4B8dg==" + "terser": { + "version": "5.3.4", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.3.4.tgz", + "integrity": "sha512-dxuB8KQo8Gt6OVOeLg/rxfcxdNZI/V1G6ze1czFUzPeCFWZRtvZMgSzlZZ5OYBZ4HoG607F6pFPNLekJyV+yVw==", + "dev": true, + "requires": { + "commander": "^2.20.0", + "source-map": "~0.7.2", + "source-map-support": "~0.5.19" + }, + "dependencies": { + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true + } + } + }, + "tslib": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" + }, + "typescript": { + "version": "3.9.7", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.7.tgz", + "integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==", + "dev": true + }, + "uglify-js": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.11.0.tgz", + "integrity": "sha512-e1KQFRCpOxnrJsJVqDUCjURq+wXvIn7cK2sRAx9XL3HYLL9aezOP4Pb1+Y3/o693EPk111Yj2Q+IUXxcpHlygQ==", + "dev": true + }, + "upper-case": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", + "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=", + "dev": true } - } - }, - "rollup-plugin-minify-html-literals": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/rollup-plugin-minify-html-literals/-/rollup-plugin-minify-html-literals-1.2.5.tgz", - "integrity": "sha512-x4FzCnbBpYdme7MQDS3+18CvYLqakAtM/JmA3hqXplwzMeZWW3l14KU7H33RhJlHH8Klgv49hGtBRLWLfjCudw==", - "dev": true, - "requires": { - "minify-html-literals": "^1.3.2", - "rollup-pluginutils": "^2.8.2" - } - }, - "rollup-plugin-node-resolve": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-5.2.0.tgz", - "integrity": "sha512-jUlyaDXts7TW2CqQ4GaO5VJ4PwwaV8VUGA7+km3n6k6xtOEacf61u0VXwN80phY/evMcaS+9eIeJ9MOyDxt5Zw==", - "dev": true, - "requires": { - "@types/resolve": "0.0.8", - "builtin-modules": "^3.1.0", - "is-module": "^1.0.0", - "resolve": "^1.11.1", - "rollup-pluginutils": "^2.8.1" - } - }, - "rollup-plugin-sourcemaps": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/rollup-plugin-sourcemaps/-/rollup-plugin-sourcemaps-0.6.3.tgz", - "integrity": "sha512-paFu+nT1xvuO1tPFYXGe+XnQvg4Hjqv/eIhG8i5EspfYYPBKL57X7iVbfv55aNVASg3dzWvES9dmWsL2KhfByw==", - "dev": true, - "requires": { - "@rollup/pluginutils": "^3.0.9", - "source-map-resolve": "^0.6.0" - } - }, - "rollup-plugin-terser": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz", - "integrity": "sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.10.4", - "jest-worker": "^26.2.1", - "serialize-javascript": "^4.0.0", - "terser": "^5.0.0" - } - }, - "rollup-pluginutils": { - "version": "2.8.2", - "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", - "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", - "dev": true, - "requires": { - "estree-walker": "^0.6.1" - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true - }, - "serialize-javascript": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", - "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", - "dev": true, - "requires": { - "randombytes": "^2.1.0" - } - }, - "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 - }, - "source-map-resolve": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.6.0.tgz", - "integrity": "sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==", - "dev": true, - "requires": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0" - } - }, - "source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "sourcemap-codec": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", - "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "terser": { - "version": "5.3.4", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.3.4.tgz", - "integrity": "sha512-dxuB8KQo8Gt6OVOeLg/rxfcxdNZI/V1G6ze1czFUzPeCFWZRtvZMgSzlZZ5OYBZ4HoG607F6pFPNLekJyV+yVw==", - "dev": true, - "requires": { - "commander": "^2.20.0", - "source-map": "~0.7.2", - "source-map-support": "~0.5.19" - }, - "dependencies": { - "source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", - "dev": true - } - } - }, - "tslib": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", - "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==" - }, - "typescript": { - "version": "3.9.7", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.7.tgz", - "integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==", - "dev": true - }, - "uglify-js": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.11.0.tgz", - "integrity": "sha512-e1KQFRCpOxnrJsJVqDUCjURq+wXvIn7cK2sRAx9XL3HYLL9aezOP4Pb1+Y3/o693EPk111Yj2Q+IUXxcpHlygQ==", - "dev": true - }, - "upper-case": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", - "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=", - "dev": true } - } } diff --git a/passbook/static/static/package.json b/passbook/static/static/package.json index 06a0962ed..315bce90c 100644 --- a/passbook/static/static/package.json +++ b/passbook/static/static/package.json @@ -1,28 +1,29 @@ { - "license": "MIT", - "scripts": { - "build": "rollup -c ./rollup.config.js", - "watch": "rollup -c -w" - }, - "dependencies": { - "@fortawesome/fontawesome-free": "^5.15.1", - "@patternfly/patternfly": "^4.65.6", - "@types/chart.js": "^2.9.28", - "@types/codemirror": "0.0.98", - "chart.js": "^2.9.4", - "codemirror": "^5.58.3", - "lit-element": "^2.4.0", - "lit-html": "^1.3.0", - "rollup": "^2.33.3", - "rollup-plugin-cssimport": "^1.0.2", - "tslib": "^2.0.3" - }, - "devDependencies": { - "@rollup/plugin-typescript": "^6.1.0", - "rollup-plugin-commonjs": "^10.1.0", - "rollup-plugin-minify-html-literals": "^1.2.5", - "rollup-plugin-node-resolve": "^5.2.0", - "rollup-plugin-sourcemaps": "^0.6.3", - "rollup-plugin-terser": "^7.0.2" - } + "license": "MIT", + "scripts": { + "build": "rollup -c ./rollup.config.js", + "watch": "rollup -c -w" + }, + "dependencies": { + "@fortawesome/fontawesome-free": "^5.15.1", + "@patternfly/patternfly": "^4.65.6", + "@types/chart.js": "^2.9.28", + "@types/codemirror": "0.0.98", + "chart.js": "^2.9.4", + "codemirror": "^5.58.3", + "lit-element": "^2.4.0", + "lit-html": "^1.3.0", + "rollup": "^2.33.3", + "rollup-plugin-cssimport": "^1.0.2", + "tslib": "^2.0.3" + }, + "devDependencies": { + "@rollup/plugin-typescript": "^6.1.0", + "prettier": "2.2.0", + "rollup-plugin-commonjs": "^10.1.0", + "rollup-plugin-minify-html-literals": "^1.2.5", + "rollup-plugin-node-resolve": "^5.2.0", + "rollup-plugin-sourcemaps": "^0.6.3", + "rollup-plugin-terser": "^7.0.2" + } } diff --git a/passbook/static/static/passbook/passbook.css b/passbook/static/static/passbook/passbook.css index 274765444..9f91b8b0a 100644 --- a/passbook/static/static/passbook/passbook.css +++ b/passbook/static/static/passbook/passbook.css @@ -1,7 +1,7 @@ @font-face { - font-family: 'DIN 1451 Std'; - src: url('fonts/DINEngschriftStd.woff2') format('woff2'), - url('fonts/DINEngschriftStd.woff') format('woff'); + font-family: "DIN 1451 Std"; + src: url("fonts/DINEngschriftStd.woff2") format("woff2"), + url("fonts/DINEngschriftStd.woff") format("woff"); font-weight: normal; font-style: normal; font-display: swap; @@ -13,7 +13,7 @@ display: flex; flex-direction: row; align-items: center; - margin-right: .5em; + margin-right: 0.5em; color: var(--pf-global--Color--light-200); } @@ -23,11 +23,11 @@ .pb-brand > img { max-height: 68px; - margin-right: .5em; + margin-right: 0.5em; } .pf-c-background-image::before { - background-image: url('./flow_background.jpg'); + background-image: url("./flow_background.jpg"); background-position: center; } @@ -91,7 +91,8 @@ select[multiple] { flex: 1 1; } -.selector-available, .selector-chosen { +.selector-available, +.selector-chosen { width: auto; flex: 1 1; display: flex; @@ -114,7 +115,8 @@ select[multiple] { list-style: none; } -.selector-add, .selector-remove { +.selector-add, +.selector-remove { width: 20px; height: 20px; background-size: 20px auto; @@ -128,7 +130,8 @@ select[multiple] { background-position: 0 -80px; } -a.selector-chooseall, a.selector-clearall { +a.selector-chooseall, +a.selector-clearall { align-self: center; } @@ -145,7 +148,8 @@ a.selector-chooseall, a.selector-clearall { margin-bottom: 0; } -.stacked .selector-available, .stacked .selector-chosen { +.stacked .selector-available, +.stacked .selector-chosen { width: auto; } @@ -161,7 +165,8 @@ a.selector-chooseall, a.selector-clearall { padding: 3px; } -.stacked .selector-add, .stacked .selector-remove { +.stacked .selector-add, +.stacked .selector-remove { background-size: 20px auto; } @@ -181,7 +186,8 @@ a.selector-chooseall, a.selector-clearall { background-position: 0 -20px; } -.help-tooltip, .selector .help-icon { +.help-tooltip, +.selector .help-icon { display: none; } @@ -212,7 +218,8 @@ form .form-row p.datetime { overflow: auto; } -.selector-add, .selector-remove { +.selector-add, +.selector-remove { width: 16px; height: 16px; display: block; @@ -222,11 +229,13 @@ form .form-row p.datetime { opacity: 0.3; } -.active.selector-add, .active.selector-remove { +.active.selector-add, +.active.selector-remove { opacity: 1; } -.active.selector-add:hover, .active.selector-remove:hover { +.active.selector-add:hover, +.active.selector-remove:hover { cursor: pointer; } @@ -234,7 +243,8 @@ form .form-row p.datetime { background: url(../admin/img/selector-icons.svg) 0 -96px no-repeat; } -.active.selector-add:focus, .active.selector-add:hover { +.active.selector-add:focus, +.active.selector-add:hover { background-position: 0 -112px; } diff --git a/passbook/static/static/rollup.config.js b/passbook/static/static/rollup.config.js index aedf52314..0e7e6a3ed 100644 --- a/passbook/static/static/rollup.config.js +++ b/passbook/static/static/rollup.config.js @@ -1,27 +1,29 @@ -import resolve from 'rollup-plugin-node-resolve'; -import commonjs from 'rollup-plugin-commonjs'; -import minifyHTML from 'rollup-plugin-minify-html-literals'; -import { terser } from 'rollup-plugin-terser'; -import sourcemaps from 'rollup-plugin-sourcemaps'; -import typescript from '@rollup/plugin-typescript'; +import resolve from "rollup-plugin-node-resolve"; +import commonjs from "rollup-plugin-commonjs"; +import minifyHTML from "rollup-plugin-minify-html-literals"; +import { terser } from "rollup-plugin-terser"; +import sourcemaps from "rollup-plugin-sourcemaps"; +import typescript from "@rollup/plugin-typescript"; import cssimport from "rollup-plugin-cssimport"; -export default [{ - input: './src/main.ts', - output: [ +export default [ { - format: 'es', - dir: 'dist', - sourcemap: true - } - ], - plugins: [ - cssimport(), - typescript(), - resolve({browser: true}), - commonjs(), - sourcemaps(), - minifyHTML(), - terser(), - ], -}]; + input: "./src/main.ts", + output: [ + { + format: "es", + dir: "dist", + sourcemap: true, + }, + ], + plugins: [ + cssimport(), + typescript(), + resolve({ browser: true }), + commonjs(), + sourcemaps(), + minifyHTML(), + terser(), + ], + }, +]; diff --git a/passbook/static/static/src/elements/ActionButton.ts b/passbook/static/static/src/elements/ActionButton.ts index df0c1a023..d4ad5e34a 100644 --- a/passbook/static/static/src/elements/ActionButton.ts +++ b/passbook/static/static/src/elements/ActionButton.ts @@ -9,10 +9,11 @@ const PROGRESS_CLASSES = ["pf-m-progress", "pf-m-in-progress"]; @customElement("pb-action-button") export class ActionButton extends LitElement { - constructor() { super(); - this.querySelector("button")?.addEventListener('click', e => this.callAction()); + this.querySelector("button")?.addEventListener("click", (e) => + this.callAction() + ); } @property() @@ -41,33 +42,39 @@ export class ActionButton extends LitElement { return; } this.setLoading(); - const csrftoken = getCookie('passbook_csrf'); - const request = new Request( - this.url, - { headers: { 'X-CSRFToken': csrftoken! } } - ); + const csrftoken = getCookie("passbook_csrf"); + const request = new Request(this.url, { + headers: { "X-CSRFToken": csrftoken! }, + }); fetch(request, { method: "POST", - mode: 'same-origin', - }).then(r => r.json()).then(r => { - this.setDone(SUCCESS_CLASS); - }).catch(() => { - this.setDone(ERROR_CLASS); - }); + mode: "same-origin", + }) + .then((r) => r.json()) + .then((r) => { + this.setDone(SUCCESS_CLASS); + }) + .catch(() => { + this.setDone(ERROR_CLASS); + }); } render() { return html``; } - } diff --git a/passbook/static/static/src/elements/AdminLoginsChart.ts b/passbook/static/static/src/elements/AdminLoginsChart.ts index 99e4b055c..88f7585ba 100644 --- a/passbook/static/static/src/elements/AdminLoginsChart.ts +++ b/passbook/static/static/src/elements/AdminLoginsChart.ts @@ -8,7 +8,6 @@ interface TickValue { @customElement("pb-admin-logins-chart") export class AdminLoginsChart extends LitElement { - @property() url: string = ""; @@ -16,23 +15,23 @@ export class AdminLoginsChart extends LitElement { static get styles() { return css` - :host { - position: relative; - height: 100%; - width: 100%; - display: block; - min-height: 25rem; - } - canvas { - width: 100px; - height: 100px; - } + :host { + position: relative; + height: 100%; + width: 100%; + display: block; + min-height: 25rem; + } + canvas { + width: 100px; + height: 100px; + } `; } constructor() { super(); - window.addEventListener('resize', () => { + window.addEventListener("resize", () => { if (this.chart) { this.chart.resize(); } @@ -40,62 +39,79 @@ export class AdminLoginsChart extends LitElement { } firstUpdated() { - fetch(this.url).then(r => r.json()).catch(e => console.error(e)).then(r => { - let ctx = (this.shadowRoot?.querySelector("canvas")).getContext('2d')!; - this.chart = new Chart(ctx, { - type: 'bar', - data: { - datasets: [ - { - label: 'Failed Logins', - backgroundColor: "rgba(201, 25, 11, .5)", - spanGaps: true, - data: r.logins_failed_per_1h, - }, - { - label: 'Successful Logins', - backgroundColor: "rgba(189, 229, 184, .5)", - spanGaps: true, - data: r.logins_per_1h, - }, - ] - }, - options: { - maintainAspectRatio: false, - spanGaps: true, - scales: { - xAxes: [{ - stacked: true, - gridLines: { - color: "rgba(0, 0, 0, 0)", + fetch(this.url) + .then((r) => r.json()) + .catch((e) => console.error(e)) + .then((r) => { + let ctx = (( + this.shadowRoot?.querySelector("canvas") + )).getContext("2d")!; + this.chart = new Chart(ctx, { + type: "bar", + data: { + datasets: [ + { + label: "Failed Logins", + backgroundColor: "rgba(201, 25, 11, .5)", + spanGaps: true, + data: r.logins_failed_per_1h, }, - type: 'time', - offset: true, - ticks: { - callback: function (value, index: number, values) { - const valueStamp = (values[index]); - const delta = (Date.now() - valueStamp.value); - const ago = Math.round(delta / 1000 / 3600); - return `${ago} Hours ago`; + { + label: "Successful Logins", + backgroundColor: "rgba(189, 229, 184, .5)", + spanGaps: true, + data: r.logins_per_1h, + }, + ], + }, + options: { + maintainAspectRatio: false, + spanGaps: true, + scales: { + xAxes: [ + { + stacked: true, + gridLines: { + color: "rgba(0, 0, 0, 0)", + }, + type: "time", + offset: true, + ticks: { + callback: function ( + value, + index: number, + values + ) { + const valueStamp = ( + (values[index]) + ); + const delta = + Date.now() - valueStamp.value; + const ago = Math.round( + delta / 1000 / 3600 + ); + return `${ago} Hours ago`; + }, + autoSkip: true, + maxTicksLimit: 8, + }, }, - autoSkip: true, - maxTicksLimit: 8 - } - }], - yAxes: [{ - stacked: true, - gridLines: { - color: "rgba(0, 0, 0, 0)", - } - }] - } - } + ], + yAxes: [ + { + stacked: true, + gridLines: { + color: "rgba(0, 0, 0, 0)", + }, + }, + ], + }, + }, + }); }); - }); } render() { return html``; } - } diff --git a/passbook/static/static/src/elements/AdminSidebar.ts b/passbook/static/static/src/elements/AdminSidebar.ts index 7c0131f22..4e0064e1a 100644 --- a/passbook/static/static/src/elements/AdminSidebar.ts +++ b/passbook/static/static/src/elements/AdminSidebar.ts @@ -7,7 +7,6 @@ interface RegexAnchor { @customElement("pb-admin-sidebar") export class AdminSideBar extends LitElement { - @property() activePath: string; @@ -16,33 +15,35 @@ export class AdminSideBar extends LitElement { constructor() { super(); this.activePath = window.location.hash.slice(1, Infinity); - window.addEventListener("hashchange", e => { + window.addEventListener("hashchange", (e) => { this.activePath = window.location.hash.slice(1, Infinity); }); - this.querySelectorAll(".pf-c-nav__link").forEach(a => { - let rawValue = a.attributes.getNamedItem("pb-url-prefix")?.value; - if (!rawValue) { - const parsedURL = new URL(a.href); - if (parsedURL.hash === "") { - console.log(`Ignoring ${a}`); - return; + this.querySelectorAll(".pf-c-nav__link").forEach( + (a) => { + let rawValue = a.attributes.getNamedItem("pb-url-prefix") + ?.value; + if (!rawValue) { + const parsedURL = new URL(a.href); + if (parsedURL.hash === "") { + console.log(`Ignoring ${a}`); + return; + } + rawValue = `^${parsedURL.hash.slice(1, Infinity)}$`; } - rawValue = `^${parsedURL.hash.slice(1, Infinity)}$`; + const regexp = RegExp(rawValue); + this.paths.push({ anchor: a, match: regexp }); } - const regexp = RegExp(rawValue); - this.paths.push({anchor: a, match: regexp}); - }); + ); } render() { - this.paths.forEach(path => { + this.paths.forEach((path) => { if (path.match.exec(this.activePath)) { path.anchor.classList.add("pf-m-current"); } else { path.anchor.classList.remove("pf-m-current"); } - }) + }); return html``; } - } diff --git a/passbook/static/static/src/elements/CodeMirror.ts b/passbook/static/static/src/elements/CodeMirror.ts index f08178814..4166f92bb 100644 --- a/passbook/static/static/src/elements/CodeMirror.ts +++ b/passbook/static/static/src/elements/CodeMirror.ts @@ -9,7 +9,6 @@ import "codemirror/mode/python/python.js"; @customElement("pb-codemirror") export class CodeMirrorTextarea extends LitElement { - @property() readOnly: boolean = false; @@ -29,7 +28,7 @@ export class CodeMirrorTextarea extends LitElement { } this.editor = CodeMirror.fromTextArea(textarea, { mode: this.mode, - theme: 'monokai', + theme: "monokai", lineNumbers: false, readOnly: this.readOnly, autoRefresh: true, @@ -38,5 +37,4 @@ export class CodeMirrorTextarea extends LitElement { this.editor?.save(); }); } - } diff --git a/passbook/static/static/src/elements/Dropdown.ts b/passbook/static/static/src/elements/Dropdown.ts index 452487135..325512fe4 100644 --- a/passbook/static/static/src/elements/Dropdown.ts +++ b/passbook/static/static/src/elements/Dropdown.ts @@ -2,12 +2,11 @@ import { customElement, html, LitElement } from "lit-element"; @customElement("pb-dropdown") export class DropdownButton extends LitElement { - constructor() { - super() - const menu = this.querySelector('.pf-c-dropdown__menu')!; - this.querySelectorAll("button").forEach(btn => { - btn.addEventListener("click", e => { + super(); + const menu = this.querySelector(".pf-c-dropdown__menu")!; + this.querySelectorAll("button").forEach((btn) => { + btn.addEventListener("click", (e) => { menu.hidden = !menu.hidden; }); }); @@ -16,5 +15,4 @@ export class DropdownButton extends LitElement { render() { return html``; } - } diff --git a/passbook/static/static/src/elements/FetchFillSlot.ts b/passbook/static/static/src/elements/FetchFillSlot.ts index de55a8ee4..f436fb48e 100644 --- a/passbook/static/static/src/elements/FetchFillSlot.ts +++ b/passbook/static/static/src/elements/FetchFillSlot.ts @@ -1,12 +1,11 @@ -import { LitElement, html, customElement, property } from 'lit-element'; +import { LitElement, html, customElement, property } from "lit-element"; interface ComparisonHash { - [key: string]: (a: any, b: any) => boolean + [key: string]: (a: any, b: any) => boolean; } @customElement("fetch-fill-slot") export class FetchFillSlot extends LitElement { - @property() url: string = ""; @@ -18,14 +17,30 @@ export class FetchFillSlot extends LitElement { comparison(slotName: string) { let comparisonOperatorsHash = { - '<': function (a: any, b: any) { return a < b; }, - '>': function (a: any, b: any) { return a > b; }, - '>=': function (a: any, b: any) { return a >= b; }, - '<=': function (a: any, b: any) { return a <= b; }, - '==': function (a: any, b: any) { return a == b; }, - '!=': function (a: any, b: any) { return a != b; }, - '===': function (a: any, b: any) { return a === b; }, - '!==': function (a: any, b: any) { return a !== b; }, + "<": function (a: any, b: any) { + return a < b; + }, + ">": function (a: any, b: any) { + return a > b; + }, + ">=": function (a: any, b: any) { + return a >= b; + }, + "<=": function (a: any, b: any) { + return a <= b; + }, + "==": function (a: any, b: any) { + return a == b; + }, + "!=": function (a: any, b: any) { + return a != b; + }, + "===": function (a: any, b: any) { + return a === b; + }, + "!==": function (a: any, b: any) { + return a !== b; + }, }; const tokens = slotName.split(" "); if (tokens.length < 3) { @@ -45,13 +60,16 @@ export class FetchFillSlot extends LitElement { } const comp = tokens[1]; if (!(comp in comparisonOperatorsHash)) { - throw new Error("Invalid comparison") + throw new Error("Invalid comparison"); } return comparisonOperatorsHash[comp](a, b); } firstUpdated() { - fetch(this.url).then(r => r.json()).then(r => r[this.key]).then(r => this.value = r); + fetch(this.url) + .then((r) => r.json()) + .then((r) => r[this.key]) + .then((r) => (this.value = r)); } render() { @@ -59,13 +77,13 @@ export class FetchFillSlot extends LitElement { return html``; } let selectedSlot = ""; - this.querySelectorAll("[slot]").forEach(slot => { + this.querySelectorAll("[slot]").forEach((slot) => { const comp = slot.getAttribute("slot")!; if (this.comparison(comp)) { selectedSlot = comp; } }); - this.querySelectorAll("[data-value]").forEach(dv => { + this.querySelectorAll("[data-value]").forEach((dv) => { dv.textContent = this.value; }); return html``; diff --git a/passbook/static/static/src/elements/Messages.ts b/passbook/static/static/src/elements/Messages.ts index e79d8de58..60b42698d 100644 --- a/passbook/static/static/src/elements/Messages.ts +++ b/passbook/static/static/src/elements/Messages.ts @@ -1,10 +1,10 @@ -import { LitElement, html, customElement, property } from 'lit-element'; +import { LitElement, html, customElement, property } from "lit-element"; const LEVEL_ICON_MAP: { [key: string]: string } = { - "error": "fas fa-exclamation-circle", - "warning": "fas fa-exclamation-triangle", - "success": "fas fa-check-circle", - "info": "fas fa-info", + error: "fas fa-exclamation-circle", + warning: "fas fa-exclamation-triangle", + success: "fas fa-check-circle", + info: "fas fa-info", }; let ID = function (prefix: string) { @@ -23,7 +23,6 @@ interface Message { @customElement("pb-messages") export class Messages extends LitElement { - @property() url: string = ""; @@ -39,20 +38,27 @@ export class Messages extends LitElement { } fetchMessages() { - return fetch(this.url).then(r => r.json()).then(r => this.messages = r).then((r) => { - const container = this.querySelector(".pf-c-alert-group")!; - r.forEach((message: Message) => { - const messageElement = this.renderMessage(message); - container.appendChild(messageElement); + return fetch(this.url) + .then((r) => r.json()) + .then((r) => (this.messages = r)) + .then((r) => { + const container = ( + this.querySelector(".pf-c-alert-group")! + ); + r.forEach((message: Message) => { + const messageElement = this.renderMessage(message); + container.appendChild(messageElement); + }); }); - }); } renderMessage(message: Message): ChildNode { const id = ID("pb-message"); const el = document.createElement("template"); el.innerHTML = `
  • -
    +
    diff --git a/passbook/static/static/src/elements/ModalButton.ts b/passbook/static/static/src/elements/ModalButton.ts index 40de87434..37492f19b 100644 --- a/passbook/static/static/src/elements/ModalButton.ts +++ b/passbook/static/static/src/elements/ModalButton.ts @@ -10,7 +10,6 @@ import { convertToSlug } from "../utils"; @customElement("pb-modal-button") export class ModalButton extends LitElement { - @property() href: string = ""; @@ -18,12 +17,12 @@ export class ModalButton extends LitElement { open: boolean = false; static get styles() { - return [ModalBoxStyle, BullseyeStyle, BackdropStyle] + return [ModalBoxStyle, BullseyeStyle, BackdropStyle]; } constructor() { super(); - window.addEventListener("keyup", e => { + window.addEventListener("keyup", (e) => { if (e.code === "Escape") { this.open = false; } @@ -33,84 +32,116 @@ export class ModalButton extends LitElement { setContent(content: string) { this.querySelector("[slot=modal]")!.innerHTML = content; // Ensure links close the modal - this.querySelectorAll("[slot=modal] a").forEach(a => { - // Make click on a close the modal - a.addEventListener("click", e => { - e.preventDefault(); - this.open = false; - }); - }); - // Make name field update slug field - this.querySelectorAll("input[name=name]").forEach((input) => { - input.addEventListener("input", (e) => { - const form = input.closest("form"); - if (form === null) { - return; - } - const slugField = form.querySelector("input[name=slug]"); - if (!slugField) { - return; - } - slugField.value = convertToSlug(input.value); - }); - }); - // Ensure forms sends in AJAX - this.querySelectorAll("[slot=modal] form").forEach(form => { - form.addEventListener('submit', (e) => { - e.preventDefault(); - let formData = new FormData(form); - fetch((form.action === window.location.toString()) ? this.href : form.action, { - method: form.method, - body: formData, - }).then((response) => { - return response.text(); - }).then(data => { - if (data.indexOf("csrfmiddlewaretoken") !== -1) { - this.setContent(data); - } else { - this.open = false; - this.dispatchEvent(new CustomEvent('hashchange', { bubbles: true })); - updateMessages(); - } - }).catch((e) => { - console.error(e); + this.querySelectorAll("[slot=modal] a").forEach( + (a) => { + // Make click on a close the modal + a.addEventListener("click", (e) => { + e.preventDefault(); + this.open = false; }); - }); - }); + } + ); + // Make name field update slug field + this.querySelectorAll("input[name=name]").forEach( + (input) => { + input.addEventListener("input", (e) => { + const form = input.closest("form"); + if (form === null) { + return; + } + const slugField = form.querySelector( + "input[name=slug]" + ); + if (!slugField) { + return; + } + slugField.value = convertToSlug(input.value); + }); + } + ); + // Ensure forms sends in AJAX + this.querySelectorAll("[slot=modal] form").forEach( + (form) => { + form.addEventListener("submit", (e) => { + e.preventDefault(); + let formData = new FormData(form); + fetch( + form.action === window.location.toString() + ? this.href + : form.action, + { + method: form.method, + body: formData, + } + ) + .then((response) => { + return response.text(); + }) + .then((data) => { + if (data.indexOf("csrfmiddlewaretoken") !== -1) { + this.setContent(data); + } else { + this.open = false; + this.dispatchEvent( + new CustomEvent("hashchange", { + bubbles: true, + }) + ); + updateMessages(); + } + }) + .catch((e) => { + console.error(e); + }); + }); + } + ); } onClick(e: MouseEvent) { - const request = new Request( - this.href, - ); + const request = new Request(this.href); fetch(request, { - mode: 'same-origin', - }).then(r => r.text()).then((t) => { - this.setContent(t); - this.open = true; - }).catch(e => { - console.error(e); - }); + mode: "same-origin", + }) + .then((r) => r.text()) + .then((t) => { + this.setContent(t); + this.open = true; + }) + .catch((e) => { + console.error(e); + }); } renderModal() { return html`
    -
    `; } render() { - return html` - this.onClick(e)}> + return html` this.onClick(e)} + > ${this.open ? this.renderModal() : ""}`; } - } diff --git a/passbook/static/static/src/elements/Tabs.ts b/passbook/static/static/src/elements/Tabs.ts index 0939cc29a..1f2b0e549 100644 --- a/passbook/static/static/src/elements/Tabs.ts +++ b/passbook/static/static/src/elements/Tabs.ts @@ -1,27 +1,34 @@ -import { LitElement, html, customElement } from 'lit-element'; +import { LitElement, html, customElement } from "lit-element"; @customElement("pb-tabs") export class Tabs extends LitElement { - _currentPage? = ""; _firstPage? = ""; get currentPage() { - return this._currentPage + return this._currentPage; } set currentPage(value) { try { // Show active tab page - this.querySelector(`.pf-c-tab-content[tab-name='${value}']`)?.removeAttribute("hidden"); + this.querySelector( + `.pf-c-tab-content[tab-name='${value}']` + )?.removeAttribute("hidden"); // Update active status on buttons - this.querySelector(`.pf-c-tabs__item[tab-name='${value}']`)?.classList.add("pf-m-current"); + this.querySelector( + `.pf-c-tabs__item[tab-name='${value}']` + )?.classList.add("pf-m-current"); // Hide other tab pages - this.querySelectorAll(`.pf-c-tab-content:not([tab-name='${value}'])`).forEach((el) => { + this.querySelectorAll( + `.pf-c-tab-content:not([tab-name='${value}'])` + ).forEach((el) => { el.setAttribute("hidden", ""); }); // Update active status on other buttons - this.querySelectorAll(`.pf-c-tabs__item:not([tab-name='${value}'])`).forEach((el) => { + this.querySelectorAll( + `.pf-c-tabs__item:not([tab-name='${value}'])` + ).forEach((el) => { el.classList.remove("pf-m-current"); }); // Update window hash @@ -37,7 +44,9 @@ export class Tabs extends LitElement { } firstUpdated() { - this._firstPage = this.querySelector(".pf-c-tab-content")?.getAttribute("tab-name")!; + this._firstPage = this.querySelector(".pf-c-tab-content")?.getAttribute( + "tab-name" + )!; if (window.location.hash) { this.currentPage = window.location.hash; } else { @@ -47,8 +56,7 @@ export class Tabs extends LitElement { button.addEventListener("click", (e) => { let tabPage = button.parentElement?.getAttribute("tab-name")!; this.currentPage = tabPage; - }) + }); }); } - } diff --git a/passbook/static/static/src/legacy.js b/passbook/static/static/src/legacy.js index 6ecbc9018..624962e76 100644 --- a/passbook/static/static/src/legacy.js +++ b/passbook/static/static/src/legacy.js @@ -11,23 +11,25 @@ document.querySelectorAll("input[type=search]").forEach((si) => { document.querySelectorAll("[data-pb-fetch-fill]").forEach((el) => { const url = el.dataset.pbFetchFill; const key = el.dataset.pbFetchKey; - fetch(url).then(r => r.json()).then(r => { - el.textContent = r[key]; - el.value = r[key]; - }); + fetch(url) + .then((r) => r.json()) + .then((r) => { + el.textContent = r[key]; + el.value = r[key]; + }); }); // Modal document.querySelectorAll("[data-target='modal']").forEach((m) => { m.addEventListener("click", (e) => { const parentContainer = e.target.closest('[data-target="modal"]'); - const modalId = parentContainer.attributes['data-modal'].value; + const modalId = parentContainer.attributes["data-modal"].value; document.querySelector(`#${modalId}`).removeAttribute("hidden"); }); }); document.querySelectorAll(".pf-c-modal-box [data-modal-close]").forEach((b) => { b.addEventListener("click", (e) => { - const parentContainer = e.target.closest('.pf-c-backdrop'); + const parentContainer = e.target.closest(".pf-c-backdrop"); parentContainer.setAttribute("hidden", true); }); }); @@ -35,31 +37,37 @@ document.querySelectorAll(".pf-c-modal-box [data-modal-close]").forEach((b) => { // Make Checkbox label click trigger checkbox toggle document.querySelectorAll(".pf-c-check__label").forEach((checkLabel) => { checkLabel.addEventListener("click", (e) => { - const checkbox = e.target.parentElement.querySelector("input[type=checkbox]"); + const checkbox = e.target.parentElement.querySelector( + "input[type=checkbox]" + ); checkbox.checked = !checkbox.checked; }); }); // Hamburger Menu -document.querySelectorAll(".pf-c-page__header-brand-toggle>button").forEach((toggle) => { - toggle.addEventListener("click", (e) => { - const sidebar = document.querySelector(".pf-c-page__sidebar"); - if (sidebar.classList.contains("pf-m-expanded")) { - // Sidebar already expanded - sidebar.classList.remove("pf-m-expanded"); - sidebar.style.zIndex = 0; - } else { - // Sidebar not expanded yet - sidebar.classList.add("pf-m-expanded"); - sidebar.style.zIndex = 200; - } +document + .querySelectorAll(".pf-c-page__header-brand-toggle>button") + .forEach((toggle) => { + toggle.addEventListener("click", (e) => { + const sidebar = document.querySelector(".pf-c-page__sidebar"); + if (sidebar.classList.contains("pf-m-expanded")) { + // Sidebar already expanded + sidebar.classList.remove("pf-m-expanded"); + sidebar.style.zIndex = 0; + } else { + // Sidebar not expanded yet + sidebar.classList.add("pf-m-expanded"); + sidebar.style.zIndex = 200; + } + }); }); -}); // Collapsable Menus in Sidebar -document.querySelectorAll(".pf-m-expandable>.pf-c-nav__link").forEach((menu) => { - menu.addEventListener("click", (e) => { - e.preventDefault(); - menu.parentElement.classList.toggle("pf-m-expanded"); +document + .querySelectorAll(".pf-m-expandable>.pf-c-nav__link") + .forEach((menu) => { + menu.addEventListener("click", (e) => { + e.preventDefault(); + menu.parentElement.classList.toggle("pf-m-expanded"); + }); }); -}); diff --git a/passbook/static/static/src/main.ts b/passbook/static/static/src/main.ts index a68edc77d..85f08a3bb 100644 --- a/passbook/static/static/src/main.ts +++ b/passbook/static/static/src/main.ts @@ -1,13 +1,13 @@ import "./legacy.js"; -import './elements/ActionButton'; -import './elements/AdminSidebar'; -import './elements/CodeMirror'; -import './elements/Dropdown'; -import './elements/FetchFillSlot'; -import './elements/Messages'; -import './elements/ModalButton'; -import './elements/Tabs'; -import './pages/AdminSiteShell'; -import './pages/FlowShellCard'; +import "./elements/ActionButton"; +import "./elements/AdminSidebar"; +import "./elements/CodeMirror"; +import "./elements/Dropdown"; +import "./elements/FetchFillSlot"; +import "./elements/Messages"; +import "./elements/ModalButton"; +import "./elements/Tabs"; +import "./pages/AdminSiteShell"; +import "./pages/FlowShellCard"; import "./elements/AdminLoginsChart"; diff --git a/passbook/static/static/src/pages/AdminSiteShell.ts b/passbook/static/static/src/pages/AdminSiteShell.ts index 85cabe080..418abfceb 100644 --- a/passbook/static/static/src/pages/AdminSiteShell.ts +++ b/passbook/static/static/src/pages/AdminSiteShell.ts @@ -1,4 +1,11 @@ -import { css, customElement, html, LitElement, property, TemplateResult } from "lit-element"; +import { + css, + customElement, + html, + LitElement, + property, + TemplateResult, +} from "lit-element"; // @ts-ignore import BullseyeStyle from "@patternfly/patternfly/layouts/Bullseye/bullseye.css"; // @ts-ignore @@ -6,7 +13,6 @@ import SpinnerStyle from "@patternfly/patternfly/components/Spinner/spinner.css" @customElement("pb-admin-shell") export class AdminSiteShell extends LitElement { - @property() set defaultUrl(value: string) { if (window.location.hash === "" && value !== undefined) { @@ -18,18 +24,22 @@ export class AdminSiteShell extends LitElement { loading: boolean = false; static get styles() { - return [css` - :host { - position: relative; - } - :host .pf-l-bullseye { - position: absolute; - height: 100%; - width: 100%; - top: 0; - left: 0; - } - `, BullseyeStyle, SpinnerStyle]; + return [ + css` + :host { + position: relative; + } + :host .pf-l-bullseye { + position: absolute; + height: 100%; + width: 100%; + top: 0; + left: 0; + } + `, + BullseyeStyle, + SpinnerStyle, + ]; } constructor() { @@ -41,49 +51,56 @@ export class AdminSiteShell extends LitElement { loadContent() { let url = window.location.hash.slice(1, Infinity); if (url === "") { - return + return; } this.loading = true; - fetch(url).then(r => r.text()).then((t) => { - this.querySelector("[slot=body]")!.innerHTML = t; - }).then(() => { - // Ensure anchors only change the hash - this.querySelectorAll("a:not(.pb-root-link)").forEach(a => { - if (a.href === "") { - return; - } - try { - const url = new URL(a.href); - const qs = url.search || ""; - a.href = `#${url.pathname}${qs}`; - } catch (e) { - a.href = `#${a.href}`; - } - }); - // Create refresh buttons - this.querySelectorAll("[role=pb-refresh]").forEach(rt => { - rt.addEventListener("click", e => { - this.loadContent(); + fetch(url) + .then((r) => r.text()) + .then((t) => { + this.querySelector("[slot=body]")!.innerHTML = t; + }) + .then(() => { + // Ensure anchors only change the hash + this.querySelectorAll( + "a:not(.pb-root-link)" + ).forEach((a) => { + if (a.href === "") { + return; + } + try { + const url = new URL(a.href); + const qs = url.search || ""; + a.href = `#${url.pathname}${qs}`; + } catch (e) { + a.href = `#${a.href}`; + } }); + // Create refresh buttons + this.querySelectorAll("[role=pb-refresh]").forEach((rt) => { + rt.addEventListener("click", (e) => { + this.loadContent(); + }); + }); + this.loading = false; }); - this.loading = false; - }); } render() { - return html` - ${this.loading ? html` -
    -
    - - - - - -
    -
    `: ""} - - `; + return html` ${this.loading + ? html`
    +
    + + + + + +
    +
    ` + : ""} + `; } - } diff --git a/passbook/static/static/src/pages/FlowShellCard.ts b/passbook/static/static/src/pages/FlowShellCard.ts index cc54ecc38..e8bff5046 100644 --- a/passbook/static/static/src/pages/FlowShellCard.ts +++ b/passbook/static/static/src/pages/FlowShellCard.ts @@ -1,9 +1,9 @@ -import { LitElement, html, customElement, property } from 'lit-element'; +import { LitElement, html, customElement, property } from "lit-element"; import { updateMessages } from "../elements/Messages"; enum ResponseType { redirect = "redirect", - template = "template" + template = "template", } interface Response { @@ -14,7 +14,6 @@ interface Response { @customElement("pb-flow-shell-card") export class FlowShellCard extends LitElement { - @property() flowBodyUrl: string = ""; @@ -26,19 +25,23 @@ export class FlowShellCard extends LitElement { } firstUpdated() { - fetch(this.flowBodyUrl).then(r => { - if (!r.ok) { - throw Error(r.statusText); - } - return r; - }).then((r) => { - return r.json(); - }).then((r) => { - this.updateCard(r); - }).catch((e) => { - // Catch JSON or Update errors - this.errorMessage(e); - }); + fetch(this.flowBodyUrl) + .then((r) => { + if (!r.ok) { + throw Error(r.statusText); + } + return r; + }) + .then((r) => { + return r.json(); + }) + .then((r) => { + this.updateCard(r); + }) + .catch((e) => { + // Catch JSON or Update errors + this.errorMessage(e); + }); } async updateCard(data: Response) { @@ -54,13 +57,15 @@ export class FlowShellCard extends LitElement { this.loadFormCode(); this.setFormSubmitHandlers(); default: - console.log(`passbook/flows: unexpected data type ${data.type}`); + console.log( + `passbook/flows: unexpected data type ${data.type}` + ); break; } - }; + } loadFormCode() { - this.querySelectorAll("script").forEach(script => { + this.querySelectorAll("script").forEach((script) => { let newScript = document.createElement("script"); newScript.src = script.src; document.head.appendChild(newScript); @@ -78,7 +83,9 @@ export class FlowShellCard extends LitElement { for (let index = 0; index < form.elements.length; index++) { const element = form.elements[index]; if (element.value === form.action) { - console.log("passbook/flows: Found Form action URL in form elements, not changing form action."); + console.log( + "passbook/flows: Found Form action URL in form elements, not changing form action." + ); return false; } } @@ -94,26 +101,31 @@ export class FlowShellCard extends LitElement { } setFormSubmitHandlers() { - this.querySelectorAll("form").forEach(form => { - console.log(`passbook/flows: Checking for autosubmit attribute ${form}`); + this.querySelectorAll("form").forEach((form) => { + console.log( + `passbook/flows: Checking for autosubmit attribute ${form}` + ); this.checkAutosubmit(form); console.log(`passbook/flows: Setting action for form ${form}`); this.updateFormAction(form); console.log(`passbook/flows: Adding handler for form ${form}`); - form.addEventListener('submit', (e) => { + form.addEventListener("submit", (e) => { e.preventDefault(); let formData = new FormData(form); this.flowBody = undefined; fetch(this.flowBodyUrl, { - method: 'post', + method: "post", body: formData, - }).then((response) => { - return response.json() - }).then(data => { - this.updateCard(data); - }).catch((e) => { - this.errorMessage(e); - }); + }) + .then((response) => { + return response.json(); + }) + .then((data) => { + this.updateCard(data); + }) + .catch((e) => { + this.errorMessage(e); + }); }); form.classList.add("pb-flow-wrapped"); }); @@ -141,19 +153,22 @@ export class FlowShellCard extends LitElement { } loading() { - return html` - `; + return html` `; } render() { if (this.flowBody) { - return html([this.flowBody]); + return html(([this.flowBody])); } return this.loading(); } diff --git a/passbook/static/static/src/utils.ts b/passbook/static/static/src/utils.ts index 33d83d52b..2312bce3a 100644 --- a/passbook/static/static/src/utils.ts +++ b/passbook/static/static/src/utils.ts @@ -1,12 +1,14 @@ export function getCookie(name: string) { let cookieValue = null; - if (document.cookie && document.cookie !== '') { - const cookies = document.cookie.split(';'); + if (document.cookie && document.cookie !== "") { + const cookies = document.cookie.split(";"); for (let i = 0; i < cookies.length; i++) { const cookie = cookies[i].trim(); // Does this cookie string begin with the name we want? - if (cookie.substring(0, name.length + 1) === (name + '=')) { - cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); + if (cookie.substring(0, name.length + 1) === name + "=") { + cookieValue = decodeURIComponent( + cookie.substring(name.length + 1) + ); break; } } @@ -17,6 +19,6 @@ export function getCookie(name: string) { export function convertToSlug(text: string): string { return text .toLowerCase() - .replace(/ /g, '-') - .replace(/[^\w-]+/g, ''); + .replace(/ /g, "-") + .replace(/[^\w-]+/g, ""); } diff --git a/passbook/static/static/tsconfig.json b/passbook/static/static/tsconfig.json index 70b808d35..e14404fec 100644 --- a/passbook/static/static/tsconfig.json +++ b/passbook/static/static/tsconfig.json @@ -9,10 +9,6 @@ "target": "es2017", "module": "es2015", "moduleResolution": "node", - "lib": [ - "es2017", - "dom", - "dom.iterable" - ], + "lib": ["es2017", "dom", "dom.iterable"] } }