From 3a41d0154964f70d5ac3c9457e8e6ec8837c51fe Mon Sep 17 00:00:00 2001 From: Tomas Kikutis Date: Tue, 23 May 2023 12:10:48 +0200 Subject: [PATCH 01/71] builds --- assets/common.js | 1 - assets/design_pages.js | 1 - package-lock.json | 757 ++++------------------------------------- package.json | 10 +- tsconfig.json | 16 + webpack.config.js | 11 +- 6 files changed, 90 insertions(+), 706 deletions(-) create mode 100644 tsconfig.json diff --git a/assets/common.js b/assets/common.js index b5f56f471..e057d7785 100644 --- a/assets/common.js +++ b/assets/common.js @@ -1,5 +1,4 @@ import 'alertifyjs'; -import 'babel-polyfill'; import 'bootstrap'; import 'classnames'; diff --git a/assets/design_pages.js b/assets/design_pages.js index 64a99f04e..7e6066db1 100644 --- a/assets/design_pages.js +++ b/assets/design_pages.js @@ -1,4 +1,3 @@ -import 'babel-polyfill'; import 'url-search-params-polyfill'; import 'whatwg-fetch'; import {Tooltip, Dropdown} from 'bootstrap'; diff --git a/package-lock.json b/package-lock.json index 4abdfe2e6..5abf7972e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -932,557 +932,6 @@ "js-tokens": "^3.0.2" } }, - "babel-core": { - "version": "6.26.3", - "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", - "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", - "requires": { - "babel-code-frame": "^6.26.0", - "babel-generator": "^6.26.0", - "babel-helpers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-register": "^6.26.0", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "convert-source-map": "^1.5.1", - "debug": "^2.6.9", - "json5": "^0.5.1", - "lodash": "^4.17.4", - "minimatch": "^3.0.4", - "path-is-absolute": "^1.0.1", - "private": "^0.1.8", - "slash": "^1.0.0", - "source-map": "^0.5.7" - } - }, - "babel-generator": { - "version": "6.26.1", - "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", - "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", - "requires": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.17.4", - "source-map": "^0.5.7", - "trim-right": "^1.0.1" - } - }, - "babel-helper-builder-react-jsx": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.26.0.tgz", - "integrity": "sha512-02I9jDjnVEuGy2BR3LRm9nPRb/+Ja0pvZVLr1eI5TYAA/dB0Xoc+WBo50+aDfhGDLhlBY1+QURjn9uvcFd8gzg==", - "requires": { - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "esutils": "^2.0.2" - } - }, - "babel-helper-call-delegate": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", - "integrity": "sha512-RL8n2NiEj+kKztlrVJM9JT1cXzzAdvWFh76xh/H1I4nKwunzE4INBXn8ieCZ+wh4zWszZk7NBS1s/8HR5jDkzQ==", - "requires": { - "babel-helper-hoist-variables": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helper-define-map": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz", - "integrity": "sha512-bHkmjcC9lM1kmZcVpA5t2om2nzT/xiZpo6TJq7UlZ3wqKfzia4veeXbIhKvJXAMzhhEBd3cR1IElL5AenWEUpA==", - "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" - } - }, - "babel-helper-function-name": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", - "integrity": "sha512-Oo6+e2iX+o9eVvJ9Y5eKL5iryeRdsIkwRYheCuhYdVHsdEQysbc2z2QkqCLIYnNxkT5Ss3ggrHdXiDI7Dhrn4Q==", - "requires": { - "babel-helper-get-function-arity": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helper-get-function-arity": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", - "integrity": "sha512-WfgKFX6swFB1jS2vo+DwivRN4NB8XUdM3ij0Y1gnC21y1tdBoe6xjVnd7NSI6alv+gZXCtJqvrTeMW3fR/c0ng==", - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-helper-hoist-variables": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", - "integrity": "sha512-zAYl3tqerLItvG5cKYw7f1SpvIxS9zi7ohyGHaI9cgDUjAT6YcY9jIEH5CstetP5wHIVSceXwNS7Z5BpJg+rOw==", - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-helper-optimise-call-expression": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz", - "integrity": "sha512-Op9IhEaxhbRT8MDXx2iNuMgciu2V8lDvYCNQbDGjdBNCjaMvyLf4wl4A3b8IgndCyQF8TwfgsQ8T3VD8aX1/pA==", - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-helper-regex": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz", - "integrity": "sha512-VlPiWmqmGJp0x0oK27Out1D+71nVVCTSdlbhIVoaBAj2lUgrNjBCRR9+llO4lTSb2O4r7PJg+RobRkhBrf6ofg==", - "requires": { - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" - } - }, - "babel-helper-replace-supers": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz", - "integrity": "sha512-sLI+u7sXJh6+ToqDr57Bv973kCepItDhMou0xCP2YPVmR1jkHSCY+p1no8xErbV1Siz5QE8qKT1WIwybSWlqjw==", - "requires": { - "babel-helper-optimise-call-expression": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-helpers": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", - "integrity": "sha512-n7pFrqQm44TCYvrCDb0MqabAF+JUBq+ijBvNMUxpkLjJaAu32faIexewMumrH5KLLJ1HDyT0PTEqRyAe/GwwuQ==", - "requires": { - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, - "babel-loader": { - "version": "7.1.5", - "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-7.1.5.tgz", - "integrity": "sha512-iCHfbieL5d1LfOQeeVJEUyD9rTwBcP/fcEbRCfempxTDuqrKpu0AZjLAQHEQa3Yqyj9ORKe2iHfoj4rHLf7xpw==", - "requires": { - "find-cache-dir": "^1.0.0", - "loader-utils": "^1.0.2", - "mkdirp": "^0.5.1" - } - }, - "babel-messages": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", - "integrity": "sha512-Bl3ZiA+LjqaMtNYopA9TYE9HP1tQ+E5dLxE0XrAzcIJeK2UqF0/EaqXwBn9esd4UmTfEab+P+UYQ1GnioFIb/w==", - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-check-es2015-constants": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", - "integrity": "sha512-B1M5KBP29248dViEo1owyY32lk1ZSH2DaNNrXLGt8lyjjHm7pBqAdQ7VKUPR6EEDO323+OvT3MQXbCin8ooWdA==", - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-syntax-flow": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz", - "integrity": "sha512-HbTDIoG1A1op7Tl/wIFQPULIBA61tsJ8Ntq2FAhLwuijrzosM/92kAfgU1Q3Kc7DH/cprJg5vDfuTY4QUL4rDA==" - }, - "babel-plugin-syntax-jsx": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz", - "integrity": "sha512-qrPaCSo9c8RHNRHIotaufGbuOBN8rtdC4QrrFFc43vyWCCz7Kl7GL1PGaXtMGQZUXrkCjNEgxDfmAuAabr/rlw==" - }, - "babel-plugin-syntax-object-rest-spread": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", - "integrity": "sha512-C4Aq+GaAj83pRQ0EFgTvw5YO6T3Qz2KGrNRwIj9mSoNHVvdZY4KO2uA6HNtNXCw993iSZnckY1aLW8nOi8i4+w==" - }, - "babel-plugin-transform-es2015-arrow-functions": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz", - "integrity": "sha512-PCqwwzODXW7JMrzu+yZIaYbPQSKjDTAsNNlK2l5Gg9g4rz2VzLnZsStvp/3c46GfXpwkyufb3NCyG9+50FF1Vg==", - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-block-scoped-functions": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz", - "integrity": "sha512-2+ujAT2UMBzYFm7tidUsYh+ZoIutxJ3pN9IYrF1/H6dCKtECfhmB8UkHVpyxDwkj0CYbQG35ykoz925TUnBc3A==", - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-block-scoping": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz", - "integrity": "sha512-YiN6sFAQ5lML8JjCmr7uerS5Yc/EMbgg9G8ZNmk2E3nYX4ckHR01wrkeeMijEf5WHNK5TW0Sl0Uu3pv3EdOJWw==", - "requires": { - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" - } - }, - "babel-plugin-transform-es2015-classes": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz", - "integrity": "sha512-5Dy7ZbRinGrNtmWpquZKZ3EGY8sDgIVB4CU8Om8q8tnMLrD/m94cKglVcHps0BCTdZ0TJeeAWOq2TK9MIY6cag==", - "requires": { - "babel-helper-define-map": "^6.24.1", - "babel-helper-function-name": "^6.24.1", - "babel-helper-optimise-call-expression": "^6.24.1", - "babel-helper-replace-supers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-computed-properties": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz", - "integrity": "sha512-C/uAv4ktFP/Hmh01gMTvYvICrKze0XVX9f2PdIXuriCSvUmV9j+u+BB9f5fJK3+878yMK6dkdcq+Ymr9mrcLzw==", - "requires": { - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-destructuring": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz", - "integrity": "sha512-aNv/GDAW0j/f4Uy1OEPZn1mqD+Nfy9viFGBfQ5bZyT35YqOiqx7/tXdyfZkJ1sC21NyEsBdfDY6PYmLHF4r5iA==", - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-duplicate-keys": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz", - "integrity": "sha512-ossocTuPOssfxO2h+Z3/Ea1Vo1wWx31Uqy9vIiJusOP4TbF7tPs9U0sJ9pX9OJPf4lXRGj5+6Gkl/HHKiAP5ug==", - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-for-of": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz", - "integrity": "sha512-DLuRwoygCoXx+YfxHLkVx5/NpeSbVwfoTeBykpJK7JhYWlL/O8hgAK/reforUnZDlxasOrVPPJVI/guE3dCwkw==", - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-function-name": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", - "integrity": "sha512-iFp5KIcorf11iBqu/y/a7DK3MN5di3pNCzto61FqCNnUX4qeBwcV1SLqe10oXNnCaxBUImX3SckX2/o1nsrTcg==", - "requires": { - "babel-helper-function-name": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-literals": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz", - "integrity": "sha512-tjFl0cwMPpDYyoqYA9li1/7mGFit39XiNX5DKC/uCNjBctMxyL1/PT/l4rSlbvBG1pOKI88STRdUsWXB3/Q9hQ==", - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-modules-amd": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz", - "integrity": "sha512-LnIIdGWIKdw7zwckqx+eGjcS8/cl8D74A3BpJbGjKTFFNJSMrjN4bIh22HY1AlkUbeLG6X6OZj56BDvWD+OeFA==", - "requires": { - "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-modules-commonjs": { - "version": "6.26.2", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz", - "integrity": "sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==", - "requires": { - "babel-plugin-transform-strict-mode": "^6.24.1", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-types": "^6.26.0" - } - }, - "babel-plugin-transform-es2015-modules-systemjs": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz", - "integrity": "sha512-ONFIPsq8y4bls5PPsAWYXH/21Hqv64TBxdje0FvU3MhIV6QM2j5YS7KvAzg/nTIVLot2D2fmFQrFWCbgHlFEjg==", - "requires": { - "babel-helper-hoist-variables": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-modules-umd": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz", - "integrity": "sha512-LpVbiT9CLsuAIp3IG0tfbVo81QIhn6pE8xBJ7XSeCtFlMltuar5VuBV6y6Q45tpui9QWcy5i0vLQfCfrnF7Kiw==", - "requires": { - "babel-plugin-transform-es2015-modules-amd": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-object-super": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz", - "integrity": "sha512-8G5hpZMecb53vpD3mjs64NhI1au24TAmokQ4B+TBFBjN9cVoGoOvotdrMMRmHvVZUEvqGUPWL514woru1ChZMA==", - "requires": { - "babel-helper-replace-supers": "^6.24.1", - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-parameters": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", - "integrity": "sha512-8HxlW+BB5HqniD+nLkQ4xSAVq3bR/pcYW9IigY+2y0dI+Y7INFeTbfAQr+63T3E4UDsZGjyb+l9txUnABWxlOQ==", - "requires": { - "babel-helper-call-delegate": "^6.24.1", - "babel-helper-get-function-arity": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1", - "babel-traverse": "^6.24.1", - "babel-types": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-shorthand-properties": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz", - "integrity": "sha512-mDdocSfUVm1/7Jw/FIRNw9vPrBQNePy6wZJlR8HAUBLybNp1w/6lr6zZ2pjMShee65t/ybR5pT8ulkLzD1xwiw==", - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-spread": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", - "integrity": "sha512-3Ghhi26r4l3d0Js933E5+IhHwk0A1yiutj9gwvzmFbVV0sPMYk2lekhOufHBswX7NCoSeF4Xrl3sCIuSIa+zOg==", - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-sticky-regex": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz", - "integrity": "sha512-CYP359ADryTo3pCsH0oxRo/0yn6UsEZLqYohHmvLQdfS9xkf+MbCzE3/Kolw9OYIY4ZMilH25z/5CbQbwDD+lQ==", - "requires": { - "babel-helper-regex": "^6.24.1", - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-plugin-transform-es2015-template-literals": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz", - "integrity": "sha512-x8b9W0ngnKzDMHimVtTfn5ryimars1ByTqsfBDwAqLibmuuQY6pgBQi5z1ErIsUOWBdw1bW9FSz5RZUojM4apg==", - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-typeof-symbol": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz", - "integrity": "sha512-fz6J2Sf4gYN6gWgRZaoFXmq93X+Li/8vf+fb0sGDVtdeWvxC9y5/bTD7bvfWMEq6zetGEHpWjtzRGSugt5kNqw==", - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-unicode-regex": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz", - "integrity": "sha512-v61Dbbihf5XxnYjtBN04B/JBvsScY37R1cZT5r9permN1cp+b70DY3Ib3fIkgn1DI9U3tGgBJZVD8p/mE/4JbQ==", - "requires": { - "babel-helper-regex": "^6.24.1", - "babel-runtime": "^6.22.0", - "regexpu-core": "^2.0.0" - } - }, - "babel-plugin-transform-flow-strip-types": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz", - "integrity": "sha512-TxIM0ZWNw9oYsoTthL3lvAK3+eTujzktoXJg4ubGvICGbVuXVYv5hHv0XXpz8fbqlJaGYY4q5SVzaSmsg3t4Fg==", - "requires": { - "babel-plugin-syntax-flow": "^6.18.0", - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-object-rest-spread": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz", - "integrity": "sha512-ocgA9VJvyxwt+qJB0ncxV8kb/CjfTcECUY4tQ5VT7nP6Aohzobm8CDFaQ5FHdvZQzLmf0sgDxB8iRXZXxwZcyA==", - "requires": { - "babel-plugin-syntax-object-rest-spread": "^6.8.0", - "babel-runtime": "^6.26.0" - } - }, - "babel-plugin-transform-react-display-name": { - "version": "6.25.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.25.0.tgz", - "integrity": "sha512-QLYkLiZeeED2PKd4LuXGg5y9fCgPB5ohF8olWUuETE2ryHNRqqnXlEVP7RPuef89+HTfd3syptMGVHeoAu0Wig==", - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-react-jsx": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz", - "integrity": "sha512-s+q/Y2u2OgDPHRuod3t6zyLoV8pUHc64i/O7ZNgIOEdYTq+ChPeybcKBi/xk9VI60VriILzFPW+dUxAEbTxh2w==", - "requires": { - "babel-helper-builder-react-jsx": "^6.24.1", - "babel-plugin-syntax-jsx": "^6.8.0", - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-react-jsx-self": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx-self/-/babel-plugin-transform-react-jsx-self-6.22.0.tgz", - "integrity": "sha512-Y3ZHP1nunv0U1+ysTNwLK39pabHj6cPVsfN4TRC7BDBfbgbyF4RifP5kd6LnbuMV9wcfedQMe7hn1fyKc7IzTQ==", - "requires": { - "babel-plugin-syntax-jsx": "^6.8.0", - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-react-jsx-source": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx-source/-/babel-plugin-transform-react-jsx-source-6.22.0.tgz", - "integrity": "sha512-pcDNDsZ9q/6LJmujQ/OhjeoIlp5Nl546HJ2yiFIJK3mYpgNXhI5/S9mXfVxu5yqWAi7HdI7e/q6a9xtzwL69Vw==", - "requires": { - "babel-plugin-syntax-jsx": "^6.8.0", - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-regenerator": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz", - "integrity": "sha512-LS+dBkUGlNR15/5WHKe/8Neawx663qttS6AGqoOUhICc9d1KciBvtrQSuc0PI+CxQ2Q/S1aKuJ+u64GtLdcEZg==", - "requires": { - "regenerator-transform": "^0.10.0" - } - }, - "babel-plugin-transform-strict-mode": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", - "integrity": "sha512-j3KtSpjyLSJxNoCDrhwiJad8kw0gJ9REGj8/CqL0HeRyLnvUNYV9zcqluL6QJSXh3nfsLEmSLvwRfGzrgR96Pw==", - "requires": { - "babel-runtime": "^6.22.0", - "babel-types": "^6.24.1" - } - }, - "babel-polyfill": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz", - "integrity": "sha512-F2rZGQnAdaHWQ8YAoeRbukc7HS9QgdgeyJ0rQDd485v9opwuPvjpPFcOOT/WmkKTdgy9ESgSPXDcTNpzrGr6iQ==", - "requires": { - "babel-runtime": "^6.26.0", - "core-js": "^2.5.0", - "regenerator-runtime": "^0.10.5" - }, - "dependencies": { - "regenerator-runtime": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", - "integrity": "sha512-02YopEIhAgiBHWeoTiA8aitHDt8z6w+rQqNuIftlM+ZtvSl/brTouaU7DW6GO/cHtvxJvS4Hwv2ibKdxIRi24w==" - } - } - }, - "babel-preset-es2015": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz", - "integrity": "sha512-XfwUqG1Ry6R43m4Wfob+vHbIVBIqTg/TJY4Snku1iIzeH7mUnwHA8Vagmv+ZQbPwhS8HgsdQvy28Py3k5zpoFQ==", - "requires": { - "babel-plugin-check-es2015-constants": "^6.22.0", - "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", - "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0", - "babel-plugin-transform-es2015-block-scoping": "^6.24.1", - "babel-plugin-transform-es2015-classes": "^6.24.1", - "babel-plugin-transform-es2015-computed-properties": "^6.24.1", - "babel-plugin-transform-es2015-destructuring": "^6.22.0", - "babel-plugin-transform-es2015-duplicate-keys": "^6.24.1", - "babel-plugin-transform-es2015-for-of": "^6.22.0", - "babel-plugin-transform-es2015-function-name": "^6.24.1", - "babel-plugin-transform-es2015-literals": "^6.22.0", - "babel-plugin-transform-es2015-modules-amd": "^6.24.1", - "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", - "babel-plugin-transform-es2015-modules-systemjs": "^6.24.1", - "babel-plugin-transform-es2015-modules-umd": "^6.24.1", - "babel-plugin-transform-es2015-object-super": "^6.24.1", - "babel-plugin-transform-es2015-parameters": "^6.24.1", - "babel-plugin-transform-es2015-shorthand-properties": "^6.24.1", - "babel-plugin-transform-es2015-spread": "^6.22.0", - "babel-plugin-transform-es2015-sticky-regex": "^6.24.1", - "babel-plugin-transform-es2015-template-literals": "^6.22.0", - "babel-plugin-transform-es2015-typeof-symbol": "^6.22.0", - "babel-plugin-transform-es2015-unicode-regex": "^6.24.1", - "babel-plugin-transform-regenerator": "^6.24.1" - } - }, - "babel-preset-flow": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-preset-flow/-/babel-preset-flow-6.23.0.tgz", - "integrity": "sha512-PQZFJXnM3d80Vq4O67OE6EMVKIw2Vmzy8UXovqulNogCtblWU8rzP7Sm5YgHiCg4uejUxzCkHfNXQ4Z6GI+Dhw==", - "requires": { - "babel-plugin-transform-flow-strip-types": "^6.22.0" - } - }, - "babel-preset-react": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-preset-react/-/babel-preset-react-6.24.1.tgz", - "integrity": "sha512-phQe3bElbgF887UM0Dhz55d22ob8czTL1kbhZFwpCE6+R/X9kHktfwmx9JZb+bBSVRGphP5tZ9oWhVhlgjrX3Q==", - "requires": { - "babel-plugin-syntax-jsx": "^6.3.13", - "babel-plugin-transform-react-display-name": "^6.23.0", - "babel-plugin-transform-react-jsx": "^6.24.1", - "babel-plugin-transform-react-jsx-self": "^6.22.0", - "babel-plugin-transform-react-jsx-source": "^6.22.0", - "babel-preset-flow": "^6.23.0" - } - }, - "babel-register": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", - "integrity": "sha512-veliHlHX06wjaeY8xNITbveXSiI+ASFnOqvne/LaIJIqOWi2Ogmj91KOugEz/hoh/fwMhXNBJPCv8Xaz5CyM4A==", - "requires": { - "babel-core": "^6.26.0", - "babel-runtime": "^6.26.0", - "core-js": "^2.5.0", - "home-or-tmp": "^2.0.0", - "lodash": "^4.17.4", - "mkdirp": "^0.5.1", - "source-map-support": "^0.4.15" - } - }, "babel-runtime": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", @@ -1492,50 +941,6 @@ "regenerator-runtime": "^0.11.0" } }, - "babel-template": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", - "integrity": "sha512-PCOcLFW7/eazGUKIoqH97sO9A2UYMahsn/yRQ7uOk37iutwjq7ODtcTNF+iFDSHNfkctqsLRjLP7URnOx0T1fg==", - "requires": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" - } - }, - "babel-traverse": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", - "integrity": "sha512-iSxeXx7apsjCHe9c7n8VtRXGzI2Bk1rBSOJgCCjfyXb6v1aCqE1KSEpq/8SXuVN8Ka/Rh1WDTF0MDzkvTA4MIA==", - "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" - } - }, - "babel-types": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", - "integrity": "sha512-zhe3V/26rCWsEZK8kZN+HaQj5yQ1CilTObixFzKW1UWjqG7618Twz6YEsCnjfg5gBcJh02DrpCkS9h98ZqDY+g==", - "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" - } - }, - "babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==" - }, "backo2": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", @@ -3007,14 +2412,6 @@ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==" }, - "detect-indent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", - "integrity": "sha512-BDKtmHlOzwI7iRuEkhzsnPoi5ypEhWAJB5RvHWe1kMr06js3uK5B3734i3ui5Yd+wOJV1cpE4JnivPD283GU/A==", - "requires": { - "repeating": "^2.0.0" - } - }, "detect-node": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz", @@ -4519,6 +3916,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", "integrity": "sha512-46TFiBOzX7xq/PcSWfFwkyjpemdRnMe31UQF+os0y+1W3k95f6R4SEt02Hj4p3X0Mir9gfrkmOtshFidS0VPUg==", + "dev": true, "requires": { "commondir": "^1.0.1", "make-dir": "^1.0.0", @@ -4853,11 +4251,6 @@ "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==" }, - "globals": { - "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==" - }, "globalthis": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", @@ -5157,15 +4550,6 @@ "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz", "integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw==" }, - "home-or-tmp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", - "integrity": "sha512-ycURW7oUxE2sNiPVw1HVEFsW+ecOpJ5zaj7eC0RlwhibhRBod20muUN8qu/gzx956YrLolVvs1MTXwKgC2rVEg==", - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.1" - } - }, "hosted-git-info": { "version": "2.8.9", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", @@ -6406,11 +5790,6 @@ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==" }, - "jsesc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", - "integrity": "sha512-Mke0DA0QjUWuJlhsE0ZPPhYiJkRap642SmI/4ztCFaUs6V2AiH1sfecc+57NgaryfAA2VR3v6O+CSjC1jZJKOA==" - }, "json-loader": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/json-loader/-/json-loader-0.5.7.tgz", @@ -7281,6 +6660,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", + "dev": true, "requires": { "pify": "^3.0.0" } @@ -9125,11 +8505,6 @@ "react-transition-group": "^4.4.1" } }, - "private": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", - "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==" - }, "process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", @@ -9653,26 +9028,11 @@ "resolved": "https://registry.npmjs.org/redux-thunk/-/redux-thunk-2.3.0.tgz", "integrity": "sha512-km6dclyFnmcvxhAcrQV2AkZmPQjzPDjgVlQtR0EQjxZPyJ0BnMf3in1ryuR8A2qU0HldVRfxYXbFSKlI3N7Slw==" }, - "regenerate": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", - "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==" - }, "regenerator-runtime": { "version": "0.11.1", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" }, - "regenerator-transform": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz", - "integrity": "sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q==", - "requires": { - "babel-runtime": "^6.18.0", - "babel-types": "^6.19.0", - "private": "^0.1.6" - } - }, "regex-cache": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", @@ -9706,36 +9066,6 @@ "integrity": "sha512-LOPw8FpgdQF9etWMaAfG/WRthIdXJGYp4mJ2Jgn/2lpkbod9jPn0t9UqN7AxBOKNfzRbYyVfgc7Vk4t/MpnXgw==", "dev": true }, - "regexpu-core": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz", - "integrity": "sha512-tJ9+S4oKjxY8IZ9jmjnp/mtytu1u3iyIQAfmI51IKWH6bFf7XR1ybtaO6j7INhZKXOTYADk7V5qxaqLkmNxiZQ==", - "requires": { - "regenerate": "^1.2.1", - "regjsgen": "^0.2.0", - "regjsparser": "^0.1.4" - } - }, - "regjsgen": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", - "integrity": "sha512-x+Y3yA24uF68m5GA+tBjbGYo64xXVJpbToBaWCoSNSc1hdk6dfctaRWrNFTVJZIIhL5GxW8zwjoixbnifnK59g==" - }, - "regjsparser": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", - "integrity": "sha512-jlQ9gYLfk2p3V5Ag5fYhA7fv7OHzd1KUH0PRP46xc3TgwjwgROIW572AfYg/X9kaNq/LJnu6oJcFRXlIrGoTRw==", - "requires": { - "jsesc": "~0.5.0" - }, - "dependencies": { - "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==" - } - } - }, "relateurl": { "version": "0.2.7", "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", @@ -10348,7 +9678,8 @@ "slash": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha512-3TYDR7xWt4dIqV2JauJr+EJeW356RXijHeUlO+8djJ+uBXPn8/2dpzBc8yQhh583sVvc9CvFAeQVgijsH+PNNg==" + "integrity": "sha512-3TYDR7xWt4dIqV2JauJr+EJeW356RXijHeUlO+8djJ+uBXPn8/2dpzBc8yQhh583sVvc9CvFAeQVgijsH+PNNg==", + "dev": true }, "slice-ansi": { "version": "1.0.0", @@ -10680,14 +10011,6 @@ "urix": "^0.1.0" } }, - "source-map-support": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", - "requires": { - "source-map": "^0.5.6" - } - }, "source-map-url": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", @@ -11316,11 +10639,6 @@ "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", "integrity": "sha512-okFlQcoGTi4LQBG/PgSYblw9VOyptsz2KJZqc6qtgGdes8VktzUQkj4BI2blit072iS8VODNcMA+tvnS9dnuMA==" }, - "to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha512-lxrWP8ejsq+7E3nNjwYmUBMAgjMTZoTI+sdBOpvNyijeDLa29LUn9QaoXAHv4+Z578hbmHHJKZknzxVtvo77og==" - }, "to-object-path": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", @@ -11392,11 +10710,6 @@ "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", "integrity": "sha512-Nm4cF79FhSTzrLKGDMi3I4utBtFv8qKy4sq1enftf2gMdpqI8oVQTAfySkTz5r49giVzDj88SVZXP4CeYQwjaw==" }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha512-WZGXGstmCWgeevgTL54hrCuw1dyMQIzWy7ZfqRJfSmJZBwklI15egmQytFP6bPidmw3M8d5yEowl1niq4vmqZw==" - }, "true-case-path": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.3.tgz", @@ -11405,6 +10718,62 @@ "glob": "^7.1.2" } }, + "ts-loader": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-3.5.0.tgz", + "integrity": "sha512-JTia3kObhTk36wPFgy0RnkZReiusYx7Le9IhcUWRrCTcFcr6Dy1zGsFd3x8DG4gevlbN65knI8W50FfoykXcng==", + "dev": true, + "requires": { + "chalk": "^2.3.0", + "enhanced-resolve": "^3.0.0", + "loader-utils": "^1.0.2", + "micromatch": "^3.1.4", + "semver": "^5.0.1" + }, + "dependencies": { + "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" + } + }, + "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" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "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" + } + } + } + }, "tty-browserify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", @@ -11467,6 +10836,12 @@ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==" }, + "typescript": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz", + "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==", + "dev": true + }, "uglify-js": { "version": "2.8.29", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", diff --git a/package.json b/package.json index 758e7d33a..1f5e05dc4 100644 --- a/package.json +++ b/package.json @@ -18,12 +18,6 @@ "dependencies": { "@popperjs/core": "^2.11.4", "alertifyjs": "1.11.2", - "babel-core": "6.26.3", - "babel-loader": "7.1.5", - "babel-plugin-transform-object-rest-spread": "^6.26.0", - "babel-polyfill": "^6.26.0", - "babel-preset-es2015": "^6.24.1", - "babel-preset-react": "^6.24.1", "bootstrap": "5.1.3", "classnames": "^2.3.1", "css-loader": "^0.28.5", @@ -75,6 +69,8 @@ "karma-webpack": "^2.0.4", "react-router-dom": "^6.3.0", "react-test-renderer": "^16.14.0", - "sinon": "^4.0.0" + "sinon": "^4.0.0", + "ts-loader": "^3.5.0", + "typescript": "^5.0.4" } } diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 000000000..ddf1d6854 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,16 @@ +{ + "include": [ + "assets" + ], + "compilerOptions": { + "allowJs": true, + "baseUrl": ".", + "esModuleInterop": true, + "target": "es5", + "module": "commonjs", + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true, + "jsx": "react", + } +} \ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js index 061d8f40b..66fe8fefe 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -43,17 +43,16 @@ const config = { module: { rules: [ { - test: /\.jsx?$/, + test: /\.(ts|tsx|js|jsx)$/, include: [ path.resolve(__dirname, 'assets'), path.resolve(__dirname, 'node_modules/bootstrap'), path.resolve(process.cwd(), 'node_modules/bootstrap'), ], - loader: 'babel-loader', + loader: 'ts-loader', options: { - presets: ['es2015', 'react'], - plugins: ['transform-object-rest-spread'], - } + transpileOnly: true, + }, }, { test: /\.css$/, @@ -79,7 +78,7 @@ const config = { ] }, resolve: { - extensions: ['.js', '.jsx'], + extensions: [ '.ts', '.tsx', '.js', '.jsx'], modules: [ path.resolve(__dirname, 'assets'), 'node_modules', From a07443e964c3586f591ddf05aef5ba2404b69904 Mon Sep 17 00:00:00 2001 From: Tomas Kikutis Date: Mon, 29 May 2023 13:20:00 +0200 Subject: [PATCH 02/71] convert a few files to TS --- .../{ArticleAbstract.jsx => ArticleAbstract.tsx} | 9 ++++++++- .../ui/components/{PreviewText.jsx => PreviewText.tsx} | 5 ++++- 2 files changed, 12 insertions(+), 2 deletions(-) rename assets/ui/components/{ArticleAbstract.jsx => ArticleAbstract.tsx} (65%) rename assets/ui/components/{PreviewText.jsx => PreviewText.tsx} (83%) diff --git a/assets/ui/components/ArticleAbstract.jsx b/assets/ui/components/ArticleAbstract.tsx similarity index 65% rename from assets/ui/components/ArticleAbstract.jsx rename to assets/ui/components/ArticleAbstract.tsx index 959c631e8..55bd428c1 100644 --- a/assets/ui/components/ArticleAbstract.jsx +++ b/assets/ui/components/ArticleAbstract.tsx @@ -1,7 +1,14 @@ import React from 'react'; import PropTypes from 'prop-types'; -export default function ArticleAbstract({item, displayAbstract}) { +interface IProps { + item: { + description_text?: string; + }; + displayAbstract?: boolean; +} + +export default function ArticleAbstract({item, displayAbstract}: IProps) { return ( (item.description_text && displayAbstract) &&

{item.description_text}

|| null diff --git a/assets/ui/components/PreviewText.jsx b/assets/ui/components/PreviewText.tsx similarity index 83% rename from assets/ui/components/PreviewText.jsx rename to assets/ui/components/PreviewText.tsx index c0a426a96..48f2b0bdb 100644 --- a/assets/ui/components/PreviewText.jsx +++ b/assets/ui/components/PreviewText.tsx @@ -1,8 +1,11 @@ import * as React from 'react'; import PropTypes from 'prop-types'; +interface IProps { + text: string; +} -export function PreviewText({text}) { +export function PreviewText({text}: IProps) { if (text == null || !text.length) { return null; } From 209e6a2adc5f41fcdf087748d5ba39f7a697577c Mon Sep 17 00:00:00 2001 From: Tomas Kikutis Date: Mon, 29 May 2023 17:06:05 +0200 Subject: [PATCH 03/71] jsx to tsx --- assets/agenda/components/{AgendaApp.jsx => AgendaApp.tsx} | 0 .../components/{AgendaAttachments.jsx => AgendaAttachments.tsx} | 0 ...ndaCalendarAgendaFilter.jsx => AgendaCalendarAgendaFilter.tsx} | 0 ...ndaCoverageExistsFilter.jsx => AgendaCoverageExistsFilter.tsx} | 0 .../{AgendaCoverageRequest.jsx => AgendaCoverageRequest.tsx} | 0 .../components/{AgendaCoverages.jsx => AgendaCoverages.tsx} | 0 .../components/{AgendaDateButtons.jsx => AgendaDateButtons.tsx} | 0 .../{AgendaDateNavigation.jsx => AgendaDateNavigation.tsx} | 0 .../{AgendaDetailCoverages.jsx => AgendaDetailCoverages.tsx} | 0 .../agenda/components/{AgendaDropdown.jsx => AgendaDropdown.tsx} | 0 .../{AgendaDropdownFilter.jsx => AgendaDropdownFilter.tsx} | 0 assets/agenda/components/{AgendaEdNote.jsx => AgendaEdNote.tsx} | 0 .../components/{AgendaEventInfo.jsx => AgendaEventInfo.tsx} | 0 ...aFeaturedStoriesToogle.jsx => AgendaFeaturedStoriesToogle.tsx} | 0 .../components/{AgendaFilterButton.jsx => AgendaFilterButton.tsx} | 0 assets/agenda/components/{AgendaFilters.jsx => AgendaFilters.tsx} | 0 .../components/{AgendaInternalNote.jsx => AgendaInternalNote.tsx} | 0 .../components/{AgendaItemDetails.jsx => AgendaItemDetails.tsx} | 0 .../{AgendaItemTimeUpdater.jsx => AgendaItemTimeUpdater.tsx} | 0 .../{AgendaItemTypeFilter.jsx => AgendaItemTypeFilter.tsx} | 0 assets/agenda/components/{AgendaList.jsx => AgendaList.tsx} | 0 .../{AgendaListCoverageItem.jsx => AgendaListCoverageItem.tsx} | 0 .../agenda/components/{AgendaListItem.jsx => AgendaListItem.tsx} | 0 .../{AgendaListItemIcons.jsx => AgendaListItemIcons.tsx} | 0 .../{AgendaListItemLabels.jsx => AgendaListItemLabels.tsx} | 0 .../{AgendaListViewControls.jsx => AgendaListViewControls.tsx} | 0 .../agenda/components/{AgendaLocation.jsx => AgendaLocation.tsx} | 0 .../{AgendaLongDescription.jsx => AgendaLongDescription.tsx} | 0 assets/agenda/components/{AgendaMap.jsx => AgendaMap.tsx} | 0 assets/agenda/components/{AgendaMeta.jsx => AgendaMeta.tsx} | 0 .../agenda/components/{AgendaMetaTime.jsx => AgendaMetaTime.tsx} | 0 assets/agenda/components/{AgendaName.jsx => AgendaName.tsx} | 0 assets/agenda/components/{AgendaPreview.jsx => AgendaPreview.tsx} | 0 ...{AgendaPreviewAttachments.jsx => AgendaPreviewAttachments.tsx} | 0 .../{AgendaPreviewCoverages.jsx => AgendaPreviewCoverages.tsx} | 0 .../components/{AgendaPreviewEvent.jsx => AgendaPreviewEvent.tsx} | 0 .../components/{AgendaPreviewImage.jsx => AgendaPreviewImage.tsx} | 0 .../{AgendaPreviewPlanning.jsx => AgendaPreviewPlanning.tsx} | 0 ...itationDetails.jsx => AgendaRegistrationInvitationDetails.tsx} | 0 assets/agenda/components/{AgendaTags.jsx => AgendaTags.tsx} | 0 assets/agenda/components/{AgendaTime.jsx => AgendaTime.tsx} | 0 .../components/{CoverageItemStatus.jsx => CoverageItemStatus.tsx} | 0 .../agenda/components/{LocationFilter.jsx => LocationFilter.tsx} | 0 assets/am-news/components/{AmNewsApp.jsx => AmNewsApp.tsx} | 0 assets/am-news/components/{AmNewsIcon.jsx => AmNewsIcon.tsx} | 0 assets/am-news/components/{AmNewsList.jsx => AmNewsList.tsx} | 0 .../am-news/components/{AmNewsListItem.jsx => AmNewsListItem.tsx} | 0 assets/am-news/components/{Navigations.jsx => Navigations.tsx} | 0 assets/cards/components/{CardList.jsx => CardList.tsx} | 0 assets/cards/components/{CardListItem.jsx => CardListItem.tsx} | 0 assets/cards/components/{Cards.jsx => Cards.tsx} | 0 assets/cards/components/{CardsApp.jsx => CardsApp.tsx} | 0 assets/cards/components/{EditCard.jsx => EditCard.tsx} | 0 .../companies/components/{CompaniesApp.jsx => CompaniesApp.tsx} | 0 assets/companies/components/{CompanyList.jsx => CompanyList.tsx} | 0 .../components/{CompanyListItem.jsx => CompanyListItem.tsx} | 0 .../components/{CompanyPermissions.jsx => CompanyPermissions.tsx} | 0 assets/companies/components/{EditCompany.jsx => EditCompany.tsx} | 0 .../components/{EditCompanyAPI.jsx => EditCompanyAPI.tsx} | 0 .../components/{EditCompanyDetails.jsx => EditCompanyDetails.tsx} | 0 .../components/{CompanyAdminApp.jsx => CompanyAdminApp.tsx} | 0 ...atRequestModal.jsx => CompanyAdminProductSeatRequestModal.tsx} | 0 .../{CompanyAdminSideNav.jsx => CompanyAdminSideNav.tsx} | 0 .../components/{CompanyDetails.jsx => CompanyDetails.tsx} | 0 ...nyDetailsProductFilter.jsx => CompanyDetailsProductFilter.tsx} | 0 ...{CompanyDetailsProductRow.jsx => CompanyDetailsProductRow.tsx} | 0 .../{CompanyUserListItem.jsx => CompanyUserListItem.tsx} | 0 .../components/{CompanyUsers.jsx => CompanyUsers.tsx} | 0 .../{ComapnyNewsApiUsage.jsx => ComapnyNewsApiUsage.tsx} | 0 assets/company-reports/components/{Company.jsx => Company.tsx} | 0 .../components/{CompanyProducts.jsx => CompanyProducts.tsx} | 0 .../components/{CompanyReportsApp.jsx => CompanyReportsApp.tsx} | 0 .../{CompanySavedSearches.jsx => CompanySavedSearches.tsx} | 0 .../components/{ContentActivity.jsx => ContentActivity.tsx} | 0 .../components/{ExpiredCompanies.jsx => ExpiredCompanies.tsx} | 0 .../components/{ProductCompanies.jsx => ProductCompanies.tsx} | 0 .../components/{ProductStories.jsx => ProductStories.tsx} | 0 .../components/{ReportsTable.jsx => ReportsTable.tsx} | 0 .../components/{SubscriberActivity.jsx => SubscriberActivity.tsx} | 0 .../components/{UserSavedSearches.jsx => UserSavedSearches.tsx} | 0 assets/components/{ActionButton.jsx => ActionButton.tsx} | 0 assets/components/{ActionList.jsx => ActionList.tsx} | 0 assets/components/{ActionMenu.jsx => ActionMenu.tsx} | 0 assets/components/{AuditInformation.jsx => AuditInformation.tsx} | 0 assets/components/{BannerDrop.jsx => BannerDrop.tsx} | 0 assets/components/{BookmarkTabs.jsx => BookmarkTabs.tsx} | 0 assets/components/{CalendarButton.jsx => CalendarButton.tsx} | 0 .../{CalendarButtonWrapper.jsx => CalendarButtonWrapper.tsx} | 0 assets/components/{CardEditor.jsx => CardEditor.tsx} | 0 assets/components/{CheckboxInput.jsx => CheckboxInput.tsx} | 0 assets/components/{CloseButton.jsx => CloseButton.tsx} | 0 assets/components/{DateInput.jsx => DateInput.tsx} | 0 assets/components/{Dropdown.jsx => Dropdown.tsx} | 0 assets/components/{DropdownFilter.jsx => DropdownFilter.tsx} | 0 .../{DropdownFilterButton.jsx => DropdownFilterButton.tsx} | 0 assets/components/{EditPanel.jsx => EditPanel.tsx} | 0 .../{ExpiryButtonWrapper.jsx => ExpiryButtonWrapper.tsx} | 0 assets/components/{ExpiryDateInput.jsx => ExpiryDateInput.tsx} | 0 assets/components/{FileInput.jsx => FileInput.tsx} | 0 assets/components/{InputWrapper.jsx => InputWrapper.tsx} | 0 assets/components/{ListBar.jsx => ListBar.tsx} | 0 assets/components/{ListViewOptions.jsx => ListViewOptions.tsx} | 0 assets/components/{Modal.jsx => Modal.tsx} | 0 .../{MultiSelectDropdown.jsx => MultiSelectDropdown.tsx} | 0 assets/components/{NotificationList.jsx => NotificationList.tsx} | 0 .../{NotificationListItem.jsx => NotificationListItem.tsx} | 0 .../{PreviewActionButtons.jsx => PreviewActionButtons.tsx} | 0 assets/components/{SelectInput.jsx => SelectInput.tsx} | 0 assets/components/{ShareItemModal.jsx => ShareItemModal.tsx} | 0 assets/components/{SortItems.jsx => SortItems.tsx} | 0 assets/components/{Tag.jsx => Tag.tsx} | 0 assets/components/{TagList.jsx => TagList.tsx} | 0 assets/components/{TextAreaInput.jsx => TextAreaInput.tsx} | 0 assets/components/{TextInput.jsx => TextInput.tsx} | 0 assets/components/{TextListInput.jsx => TextListInput.tsx} | 0 assets/components/cards/edit/{ConfigEvent.jsx => ConfigEvent.tsx} | 0 .../edit/{ConfigExternalMedia.jsx => ConfigExternalMedia.tsx} | 0 .../cards/edit/{ConfigNavigation.jsx => ConfigNavigation.tsx} | 0 .../cards/edit/{ConfigProduct.jsx => ConfigProduct.tsx} | 0 assets/components/cards/render/{CardBody.jsx => CardBody.tsx} | 0 assets/components/cards/render/{CardFooter.jsx => CardFooter.tsx} | 0 assets/components/cards/render/{CardMeta.jsx => CardMeta.tsx} | 0 assets/components/cards/render/{CardRow.jsx => CardRow.tsx} | 0 .../render/{EventsTwoByTwoCard.jsx => EventsTwoByTwoCard.tsx} | 0 .../render/{LargePictureTextCard.jsx => LargePictureTextCard.tsx} | 0 .../cards/render/{LargeTextOnlyCard.jsx => LargeTextOnlyCard.tsx} | 0 .../cards/render/{MediaGalleryCard.jsx => MediaGalleryCard.tsx} | 0 .../cards/render/{MoreNewsButton.jsx => MoreNewsButton.tsx} | 0 .../cards/render/{NavigationCard.jsx => NavigationCard.tsx} | 0 .../render/{NavigationSixPerRow.jsx => NavigationSixPerRow.tsx} | 0 .../cards/render/{PhotoGalleryCard.jsx => PhotoGalleryCard.tsx} | 0 .../cards/render/{PictureTextCard.jsx => PictureTextCard.tsx} | 0 .../cards/render/{TextOnlyCard.jsx => TextOnlyCard.tsx} | 0 .../render/{TopNewsOneByOneCard.jsx => TopNewsOneByOneCard.tsx} | 0 .../render/{TopNewsTwoByTwoCard.jsx => TopNewsTwoByTwoCard.tsx} | 0 .../dashboard/{DashboardSwitch.jsx => DashboardSwitch.tsx} | 0 assets/features/sections/{SectionSwitch.jsx => SectionSwitch.tsx} | 0 .../components/{GeneralSettingsApp.jsx => GeneralSettingsApp.tsx} | 0 assets/home/components/{HomeApp.jsx => HomeApp.tsx} | 0 assets/home/components/{search-bar.jsx => search-bar.tsx} | 0 assets/layout/components/{BaseApp.jsx => BaseApp.tsx} | 0 assets/maps/components/{map.jsx => map.tsx} | 0 assets/maps/components/{static.jsx => static.tsx} | 0 .../components/{MarketPlaceApp.jsx => MarketPlaceApp.tsx} | 0 .../{EditMonitoringProfile.jsx => EditMonitoringProfile.tsx} | 0 .../components/{MonitoringApp.jsx => MonitoringApp.tsx} | 0 .../components/{MonitoringItem.jsx => MonitoringItem.tsx} | 0 .../components/{MonitoringList.jsx => MonitoringList.tsx} | 0 .../components/{MonitoringPanel.jsx => MonitoringPanel.tsx} | 0 .../components/{MonitoringSchedule.jsx => MonitoringSchedule.tsx} | 0 assets/navigations/{actions.jsx => actions.tsx} | 0 .../components/{EditNavigation.jsx => EditNavigation.tsx} | 0 .../components/{NavigationList.jsx => NavigationList.tsx} | 0 .../components/{NavigationListItem.jsx => NavigationListItem.tsx} | 0 .../navigations/components/{Navigations.jsx => Navigations.tsx} | 0 .../components/{NavigationsApp.jsx => NavigationsApp.tsx} | 0 assets/navigations/{reducers.jsx => reducers.tsx} | 0 assets/news-api/components/{EditAPIToken.jsx => EditAPIToken.tsx} | 0 .../{BasicNotificationItem.jsx => BasicNotificationItem.tsx} | 0 .../components/{NotificationsApp.jsx => NotificationsApp.tsx} | 0 .../components/{notificationItems.jsx => notificationItems.tsx} | 0 .../oauth_clients/components/{ClientList.jsx => ClientList.tsx} | 0 .../components/{ClientListItem.jsx => ClientListItem.tsx} | 0 assets/oauth_clients/components/{Clients.jsx => Clients.tsx} | 0 .../oauth_clients/components/{ClientsApp.jsx => ClientsApp.tsx} | 0 .../oauth_clients/components/{EditClient.jsx => EditClient.tsx} | 0 assets/products/components/{EditProduct.jsx => EditProduct.tsx} | 0 assets/products/components/{ProductList.jsx => ProductList.tsx} | 0 .../components/{ProductListItem.jsx => ProductListItem.tsx} | 0 assets/products/components/{Products.jsx => Products.tsx} | 0 assets/products/components/{ProductsApp.jsx => ProductsApp.tsx} | 0 .../{AdvancedSearchPanel.jsx => AdvancedSearchPanel.tsx} | 0 .../{ContentSearchResults.jsx => ContentSearchResults.tsx} | 0 .../search/components/{FollowedTopics.jsx => FollowedTopics.tsx} | 0 .../components/{MonitoringEditor.jsx => MonitoringEditor.tsx} | 0 assets/search/components/{NewItemsIcon.jsx => NewItemsIcon.tsx} | 0 assets/search/components/{SearchBar.jsx => SearchBar.tsx} | 0 assets/search/components/{SearchResults.jsx => SearchResults.tsx} | 0 .../components/{SearchResultsInfo.jsx => SearchResultsInfo.tsx} | 0 assets/search/components/{TopicEditor.jsx => TopicEditor.tsx} | 0 assets/search/components/{TopicForm.jsx => TopicForm.tsx} | 0 assets/search/components/{TopicItem.jsx => TopicItem.tsx} | 0 assets/search/components/{TopicList.jsx => TopicList.tsx} | 0 .../components/{TopicParameters.jsx => TopicParameters.tsx} | 0 assets/search/components/{TopicsTab.jsx => TopicsTab.tsx} | 0 .../components/{EditSectionFilter.jsx => EditSectionFilter.tsx} | 0 .../components/{SectionFilterList.jsx => SectionFilterList.tsx} | 0 .../{SectionFilterListItem.jsx => SectionFilterListItem.tsx} | 0 .../components/{SectionFilters.jsx => SectionFilters.tsx} | 0 .../components/{SectionFiltersApp.jsx => SectionFiltersApp.tsx} | 0 assets/ui/components/{Article.jsx => Article.tsx} | 0 assets/ui/components/{ArticleAuthor.jsx => ArticleAuthor.tsx} | 0 assets/ui/components/{ArticleBody.jsx => ArticleBody.tsx} | 0 assets/ui/components/{ArticleBodyHtml.jsx => ArticleBodyHtml.tsx} | 0 assets/ui/components/{ArticleContent.jsx => ArticleContent.tsx} | 0 ...rticleContentInfoWrapper.jsx => ArticleContentInfoWrapper.tsx} | 0 .../{ArticleContentWrapper.jsx => ArticleContentWrapper.tsx} | 0 .../ui/components/{ArticleEmbargoed.jsx => ArticleEmbargoed.tsx} | 0 assets/ui/components/{ArticleHeadline.jsx => ArticleHeadline.tsx} | 0 .../components/{ArticleItemDetails.jsx => ArticleItemDetails.tsx} | 0 assets/ui/components/{ArticleMedia.jsx => ArticleMedia.tsx} | 0 assets/ui/components/{ArticlePicture.jsx => ArticlePicture.tsx} | 0 assets/ui/components/{ArticleSidebar.jsx => ArticleSidebar.tsx} | 0 .../components/{ArticleSidebarBox.jsx => ArticleSidebarBox.tsx} | 0 assets/ui/components/{ArticleSlugline.jsx => ArticleSlugline.tsx} | 0 assets/ui/components/{Collapse.jsx => Collapse.tsx} | 0 assets/ui/components/{Content.jsx => Content.tsx} | 0 assets/ui/components/{ContentBar.jsx => ContentBar.tsx} | 0 assets/ui/components/{ContentHeader.jsx => ContentHeader.tsx} | 0 assets/ui/components/{FormToggle.jsx => FormToggle.tsx} | 0 assets/ui/components/{MetaTime.jsx => MetaTime.tsx} | 0 assets/ui/components/{PlainText.jsx => PlainText.tsx} | 0 assets/ui/components/{Preview.jsx => Preview.tsx} | 0 assets/ui/components/{PreviewBox.jsx => PreviewBox.tsx} | 0 assets/ui/components/{ToolTip.jsx => ToolTip.tsx} | 0 .../components/{ProfileToggle.jsx => ProfileToggle.tsx} | 0 .../components/{UserProfileApp.jsx => UserProfileApp.tsx} | 0 .../components/{UserProfileAvatar.jsx => UserProfileAvatar.tsx} | 0 .../components/{UserProfileMenu.jsx => UserProfileMenu.tsx} | 0 .../components/profile/{UserProfile.jsx => UserProfile.tsx} | 0 assets/users/components/{EditUser.jsx => EditUser.tsx} | 0 ...ditUserProductPermission.jsx => EditUserProductPermission.tsx} | 0 assets/users/components/{UserListItem.jsx => UserListItem.tsx} | 0 assets/users/components/{Users.jsx => Users.tsx} | 0 assets/users/components/{UsersApp.jsx => UsersApp.tsx} | 0 assets/users/components/{UsersList.jsx => UsersList.tsx} | 0 .../{UserListCompanyFilter.jsx => UserListCompanyFilter.tsx} | 0 .../filters/{UserListSortFilter.jsx => UserListSortFilter.tsx} | 0 assets/wire/components/{AgendaLinks.jsx => AgendaLinks.tsx} | 0 .../components/{DownloadItemsModal.jsx => DownloadItemsModal.tsx} | 0 assets/wire/components/{FollowStory.jsx => FollowStory.tsx} | 0 assets/wire/components/{InfoBox.jsx => InfoBox.tsx} | 0 assets/wire/components/{InfoBoxContent.jsx => InfoBoxContent.tsx} | 0 assets/wire/components/{ItemDetails.jsx => ItemDetails.tsx} | 0 .../{ItemStatisticsModal.jsx => ItemStatisticsModal.tsx} | 0 assets/wire/components/{ItemVersion.jsx => ItemVersion.tsx} | 0 assets/wire/components/{ItemsList.jsx => ItemsList.tsx} | 0 .../{ListItemNextVersion.jsx => ListItemNextVersion.tsx} | 0 ...{ListItemPreviousVersions.jsx => ListItemPreviousVersions.tsx} | 0 .../components/{ListSearchOptions.jsx => ListSearchOptions.tsx} | 0 .../components/{ListViewControls.jsx => ListViewControls.tsx} | 0 .../wire/components/{NewsOnlyControl.jsx => NewsOnlyControl.tsx} | 0 assets/wire/components/{PreviewEdnote.jsx => PreviewEdnote.tsx} | 0 assets/wire/components/{PreviewMeta.jsx => PreviewMeta.tsx} | 0 assets/wire/components/{PreviewTags.jsx => PreviewTags.tsx} | 0 .../components/{PreviewTagsBlock.jsx => PreviewTagsBlock.tsx} | 0 .../wire/components/{PreviewTagsLink.jsx => PreviewTagsLink.tsx} | 0 .../{PreviewTagsLinkList.jsx => PreviewTagsLinkList.tsx} | 0 .../{PreviewTagsSubjects.jsx => PreviewTagsSubjects.tsx} | 0 ...{SearchAllVersionsControl.jsx => SearchAllVersionsControl.tsx} | 0 .../components/{SearchResultsInfo.jsx => SearchResultsInfo.tsx} | 0 assets/wire/components/{SearchSidebar.jsx => SearchSidebar.tsx} | 0 .../components/{SelectedItemsBar.jsx => SelectedItemsBar.tsx} | 0 .../components/{WireActionButtons.jsx => WireActionButtons.tsx} | 0 assets/wire/components/{WireApp.jsx => WireApp.tsx} | 0 assets/wire/components/{WireListItem.jsx => WireListItem.tsx} | 0 .../{WireListItemDeleted.jsx => WireListItemDeleted.tsx} | 0 .../components/{WireListItemIcons.jsx => WireListItemIcons.tsx} | 0 assets/wire/components/{WirePreview.jsx => WirePreview.tsx} | 0 assets/wire/components/fields/{Authors.jsx => Authors.tsx} | 0 assets/wire/components/fields/{CharCount.jsx => CharCount.tsx} | 0 assets/wire/components/fields/{Embargo.jsx => Embargo.tsx} | 0 assets/wire/components/fields/{MatchLabel.jsx => MatchLabel.tsx} | 0 .../fields/{PreviousVersions.jsx => PreviousVersions.tsx} | 0 assets/wire/components/fields/{Source.jsx => Source.tsx} | 0 .../wire/components/fields/{UrgencyLabel.jsx => UrgencyLabel.tsx} | 0 .../components/fields/{VersionCreated.jsx => VersionCreated.tsx} | 0 .../wire/components/fields/{VersionType.jsx => VersionType.tsx} | 0 assets/wire/components/fields/{WordCount.jsx => WordCount.tsx} | 0 assets/wire/components/fields/{index.jsx => index.tsx} | 0 .../components/filters/{FilterButton.jsx => FilterButton.tsx} | 0 .../wire/components/filters/{FilterGroup.jsx => FilterGroup.tsx} | 0 assets/wire/components/filters/{FilterItem.jsx => FilterItem.tsx} | 0 assets/wire/components/filters/{FiltersTab.jsx => FiltersTab.tsx} | 0 .../filters/{NavCreatedPicker.jsx => NavCreatedPicker.tsx} | 0 assets/wire/components/filters/{NavGroup.jsx => NavGroup.tsx} | 0 assets/wire/components/filters/{NavLink.jsx => NavLink.tsx} | 0 .../components/filters/{NavigationTab.jsx => NavigationTab.tsx} | 0 278 files changed, 0 insertions(+), 0 deletions(-) rename assets/agenda/components/{AgendaApp.jsx => AgendaApp.tsx} (100%) rename assets/agenda/components/{AgendaAttachments.jsx => AgendaAttachments.tsx} (100%) rename assets/agenda/components/{AgendaCalendarAgendaFilter.jsx => AgendaCalendarAgendaFilter.tsx} (100%) rename assets/agenda/components/{AgendaCoverageExistsFilter.jsx => AgendaCoverageExistsFilter.tsx} (100%) rename assets/agenda/components/{AgendaCoverageRequest.jsx => AgendaCoverageRequest.tsx} (100%) rename assets/agenda/components/{AgendaCoverages.jsx => AgendaCoverages.tsx} (100%) rename assets/agenda/components/{AgendaDateButtons.jsx => AgendaDateButtons.tsx} (100%) rename assets/agenda/components/{AgendaDateNavigation.jsx => AgendaDateNavigation.tsx} (100%) rename assets/agenda/components/{AgendaDetailCoverages.jsx => AgendaDetailCoverages.tsx} (100%) rename assets/agenda/components/{AgendaDropdown.jsx => AgendaDropdown.tsx} (100%) rename assets/agenda/components/{AgendaDropdownFilter.jsx => AgendaDropdownFilter.tsx} (100%) rename assets/agenda/components/{AgendaEdNote.jsx => AgendaEdNote.tsx} (100%) rename assets/agenda/components/{AgendaEventInfo.jsx => AgendaEventInfo.tsx} (100%) rename assets/agenda/components/{AgendaFeaturedStoriesToogle.jsx => AgendaFeaturedStoriesToogle.tsx} (100%) rename assets/agenda/components/{AgendaFilterButton.jsx => AgendaFilterButton.tsx} (100%) rename assets/agenda/components/{AgendaFilters.jsx => AgendaFilters.tsx} (100%) rename assets/agenda/components/{AgendaInternalNote.jsx => AgendaInternalNote.tsx} (100%) rename assets/agenda/components/{AgendaItemDetails.jsx => AgendaItemDetails.tsx} (100%) rename assets/agenda/components/{AgendaItemTimeUpdater.jsx => AgendaItemTimeUpdater.tsx} (100%) rename assets/agenda/components/{AgendaItemTypeFilter.jsx => AgendaItemTypeFilter.tsx} (100%) rename assets/agenda/components/{AgendaList.jsx => AgendaList.tsx} (100%) rename assets/agenda/components/{AgendaListCoverageItem.jsx => AgendaListCoverageItem.tsx} (100%) rename assets/agenda/components/{AgendaListItem.jsx => AgendaListItem.tsx} (100%) rename assets/agenda/components/{AgendaListItemIcons.jsx => AgendaListItemIcons.tsx} (100%) rename assets/agenda/components/{AgendaListItemLabels.jsx => AgendaListItemLabels.tsx} (100%) rename assets/agenda/components/{AgendaListViewControls.jsx => AgendaListViewControls.tsx} (100%) rename assets/agenda/components/{AgendaLocation.jsx => AgendaLocation.tsx} (100%) rename assets/agenda/components/{AgendaLongDescription.jsx => AgendaLongDescription.tsx} (100%) rename assets/agenda/components/{AgendaMap.jsx => AgendaMap.tsx} (100%) rename assets/agenda/components/{AgendaMeta.jsx => AgendaMeta.tsx} (100%) rename assets/agenda/components/{AgendaMetaTime.jsx => AgendaMetaTime.tsx} (100%) rename assets/agenda/components/{AgendaName.jsx => AgendaName.tsx} (100%) rename assets/agenda/components/{AgendaPreview.jsx => AgendaPreview.tsx} (100%) rename assets/agenda/components/{AgendaPreviewAttachments.jsx => AgendaPreviewAttachments.tsx} (100%) rename assets/agenda/components/{AgendaPreviewCoverages.jsx => AgendaPreviewCoverages.tsx} (100%) rename assets/agenda/components/{AgendaPreviewEvent.jsx => AgendaPreviewEvent.tsx} (100%) rename assets/agenda/components/{AgendaPreviewImage.jsx => AgendaPreviewImage.tsx} (100%) rename assets/agenda/components/{AgendaPreviewPlanning.jsx => AgendaPreviewPlanning.tsx} (100%) rename assets/agenda/components/{AgendaRegistrationInvitationDetails.jsx => AgendaRegistrationInvitationDetails.tsx} (100%) rename assets/agenda/components/{AgendaTags.jsx => AgendaTags.tsx} (100%) rename assets/agenda/components/{AgendaTime.jsx => AgendaTime.tsx} (100%) rename assets/agenda/components/{CoverageItemStatus.jsx => CoverageItemStatus.tsx} (100%) rename assets/agenda/components/{LocationFilter.jsx => LocationFilter.tsx} (100%) rename assets/am-news/components/{AmNewsApp.jsx => AmNewsApp.tsx} (100%) rename assets/am-news/components/{AmNewsIcon.jsx => AmNewsIcon.tsx} (100%) rename assets/am-news/components/{AmNewsList.jsx => AmNewsList.tsx} (100%) rename assets/am-news/components/{AmNewsListItem.jsx => AmNewsListItem.tsx} (100%) rename assets/am-news/components/{Navigations.jsx => Navigations.tsx} (100%) rename assets/cards/components/{CardList.jsx => CardList.tsx} (100%) rename assets/cards/components/{CardListItem.jsx => CardListItem.tsx} (100%) rename assets/cards/components/{Cards.jsx => Cards.tsx} (100%) rename assets/cards/components/{CardsApp.jsx => CardsApp.tsx} (100%) rename assets/cards/components/{EditCard.jsx => EditCard.tsx} (100%) rename assets/companies/components/{CompaniesApp.jsx => CompaniesApp.tsx} (100%) rename assets/companies/components/{CompanyList.jsx => CompanyList.tsx} (100%) rename assets/companies/components/{CompanyListItem.jsx => CompanyListItem.tsx} (100%) rename assets/companies/components/{CompanyPermissions.jsx => CompanyPermissions.tsx} (100%) rename assets/companies/components/{EditCompany.jsx => EditCompany.tsx} (100%) rename assets/companies/components/{EditCompanyAPI.jsx => EditCompanyAPI.tsx} (100%) rename assets/companies/components/{EditCompanyDetails.jsx => EditCompanyDetails.tsx} (100%) rename assets/company-admin/components/{CompanyAdminApp.jsx => CompanyAdminApp.tsx} (100%) rename assets/company-admin/components/{CompanyAdminProductSeatRequestModal.jsx => CompanyAdminProductSeatRequestModal.tsx} (100%) rename assets/company-admin/components/{CompanyAdminSideNav.jsx => CompanyAdminSideNav.tsx} (100%) rename assets/company-admin/components/{CompanyDetails.jsx => CompanyDetails.tsx} (100%) rename assets/company-admin/components/{CompanyDetailsProductFilter.jsx => CompanyDetailsProductFilter.tsx} (100%) rename assets/company-admin/components/{CompanyDetailsProductRow.jsx => CompanyDetailsProductRow.tsx} (100%) rename assets/company-admin/components/{CompanyUserListItem.jsx => CompanyUserListItem.tsx} (100%) rename assets/company-admin/components/{CompanyUsers.jsx => CompanyUsers.tsx} (100%) rename assets/company-reports/components/{ComapnyNewsApiUsage.jsx => ComapnyNewsApiUsage.tsx} (100%) rename assets/company-reports/components/{Company.jsx => Company.tsx} (100%) rename assets/company-reports/components/{CompanyProducts.jsx => CompanyProducts.tsx} (100%) rename assets/company-reports/components/{CompanyReportsApp.jsx => CompanyReportsApp.tsx} (100%) rename assets/company-reports/components/{CompanySavedSearches.jsx => CompanySavedSearches.tsx} (100%) rename assets/company-reports/components/{ContentActivity.jsx => ContentActivity.tsx} (100%) rename assets/company-reports/components/{ExpiredCompanies.jsx => ExpiredCompanies.tsx} (100%) rename assets/company-reports/components/{ProductCompanies.jsx => ProductCompanies.tsx} (100%) rename assets/company-reports/components/{ProductStories.jsx => ProductStories.tsx} (100%) rename assets/company-reports/components/{ReportsTable.jsx => ReportsTable.tsx} (100%) rename assets/company-reports/components/{SubscriberActivity.jsx => SubscriberActivity.tsx} (100%) rename assets/company-reports/components/{UserSavedSearches.jsx => UserSavedSearches.tsx} (100%) rename assets/components/{ActionButton.jsx => ActionButton.tsx} (100%) rename assets/components/{ActionList.jsx => ActionList.tsx} (100%) rename assets/components/{ActionMenu.jsx => ActionMenu.tsx} (100%) rename assets/components/{AuditInformation.jsx => AuditInformation.tsx} (100%) rename assets/components/{BannerDrop.jsx => BannerDrop.tsx} (100%) rename assets/components/{BookmarkTabs.jsx => BookmarkTabs.tsx} (100%) rename assets/components/{CalendarButton.jsx => CalendarButton.tsx} (100%) rename assets/components/{CalendarButtonWrapper.jsx => CalendarButtonWrapper.tsx} (100%) rename assets/components/{CardEditor.jsx => CardEditor.tsx} (100%) rename assets/components/{CheckboxInput.jsx => CheckboxInput.tsx} (100%) rename assets/components/{CloseButton.jsx => CloseButton.tsx} (100%) rename assets/components/{DateInput.jsx => DateInput.tsx} (100%) rename assets/components/{Dropdown.jsx => Dropdown.tsx} (100%) rename assets/components/{DropdownFilter.jsx => DropdownFilter.tsx} (100%) rename assets/components/{DropdownFilterButton.jsx => DropdownFilterButton.tsx} (100%) rename assets/components/{EditPanel.jsx => EditPanel.tsx} (100%) rename assets/components/{ExpiryButtonWrapper.jsx => ExpiryButtonWrapper.tsx} (100%) rename assets/components/{ExpiryDateInput.jsx => ExpiryDateInput.tsx} (100%) rename assets/components/{FileInput.jsx => FileInput.tsx} (100%) rename assets/components/{InputWrapper.jsx => InputWrapper.tsx} (100%) rename assets/components/{ListBar.jsx => ListBar.tsx} (100%) rename assets/components/{ListViewOptions.jsx => ListViewOptions.tsx} (100%) rename assets/components/{Modal.jsx => Modal.tsx} (100%) rename assets/components/{MultiSelectDropdown.jsx => MultiSelectDropdown.tsx} (100%) rename assets/components/{NotificationList.jsx => NotificationList.tsx} (100%) rename assets/components/{NotificationListItem.jsx => NotificationListItem.tsx} (100%) rename assets/components/{PreviewActionButtons.jsx => PreviewActionButtons.tsx} (100%) rename assets/components/{SelectInput.jsx => SelectInput.tsx} (100%) rename assets/components/{ShareItemModal.jsx => ShareItemModal.tsx} (100%) rename assets/components/{SortItems.jsx => SortItems.tsx} (100%) rename assets/components/{Tag.jsx => Tag.tsx} (100%) rename assets/components/{TagList.jsx => TagList.tsx} (100%) rename assets/components/{TextAreaInput.jsx => TextAreaInput.tsx} (100%) rename assets/components/{TextInput.jsx => TextInput.tsx} (100%) rename assets/components/{TextListInput.jsx => TextListInput.tsx} (100%) rename assets/components/cards/edit/{ConfigEvent.jsx => ConfigEvent.tsx} (100%) rename assets/components/cards/edit/{ConfigExternalMedia.jsx => ConfigExternalMedia.tsx} (100%) rename assets/components/cards/edit/{ConfigNavigation.jsx => ConfigNavigation.tsx} (100%) rename assets/components/cards/edit/{ConfigProduct.jsx => ConfigProduct.tsx} (100%) rename assets/components/cards/render/{CardBody.jsx => CardBody.tsx} (100%) rename assets/components/cards/render/{CardFooter.jsx => CardFooter.tsx} (100%) rename assets/components/cards/render/{CardMeta.jsx => CardMeta.tsx} (100%) rename assets/components/cards/render/{CardRow.jsx => CardRow.tsx} (100%) rename assets/components/cards/render/{EventsTwoByTwoCard.jsx => EventsTwoByTwoCard.tsx} (100%) rename assets/components/cards/render/{LargePictureTextCard.jsx => LargePictureTextCard.tsx} (100%) rename assets/components/cards/render/{LargeTextOnlyCard.jsx => LargeTextOnlyCard.tsx} (100%) rename assets/components/cards/render/{MediaGalleryCard.jsx => MediaGalleryCard.tsx} (100%) rename assets/components/cards/render/{MoreNewsButton.jsx => MoreNewsButton.tsx} (100%) rename assets/components/cards/render/{NavigationCard.jsx => NavigationCard.tsx} (100%) rename assets/components/cards/render/{NavigationSixPerRow.jsx => NavigationSixPerRow.tsx} (100%) rename assets/components/cards/render/{PhotoGalleryCard.jsx => PhotoGalleryCard.tsx} (100%) rename assets/components/cards/render/{PictureTextCard.jsx => PictureTextCard.tsx} (100%) rename assets/components/cards/render/{TextOnlyCard.jsx => TextOnlyCard.tsx} (100%) rename assets/components/cards/render/{TopNewsOneByOneCard.jsx => TopNewsOneByOneCard.tsx} (100%) rename assets/components/cards/render/{TopNewsTwoByTwoCard.jsx => TopNewsTwoByTwoCard.tsx} (100%) rename assets/features/dashboard/{DashboardSwitch.jsx => DashboardSwitch.tsx} (100%) rename assets/features/sections/{SectionSwitch.jsx => SectionSwitch.tsx} (100%) rename assets/general-settings/components/{GeneralSettingsApp.jsx => GeneralSettingsApp.tsx} (100%) rename assets/home/components/{HomeApp.jsx => HomeApp.tsx} (100%) rename assets/home/components/{search-bar.jsx => search-bar.tsx} (100%) rename assets/layout/components/{BaseApp.jsx => BaseApp.tsx} (100%) rename assets/maps/components/{map.jsx => map.tsx} (100%) rename assets/maps/components/{static.jsx => static.tsx} (100%) rename assets/market-place/components/{MarketPlaceApp.jsx => MarketPlaceApp.tsx} (100%) rename assets/monitoring/components/{EditMonitoringProfile.jsx => EditMonitoringProfile.tsx} (100%) rename assets/monitoring/components/{MonitoringApp.jsx => MonitoringApp.tsx} (100%) rename assets/monitoring/components/{MonitoringItem.jsx => MonitoringItem.tsx} (100%) rename assets/monitoring/components/{MonitoringList.jsx => MonitoringList.tsx} (100%) rename assets/monitoring/components/{MonitoringPanel.jsx => MonitoringPanel.tsx} (100%) rename assets/monitoring/components/{MonitoringSchedule.jsx => MonitoringSchedule.tsx} (100%) rename assets/navigations/{actions.jsx => actions.tsx} (100%) rename assets/navigations/components/{EditNavigation.jsx => EditNavigation.tsx} (100%) rename assets/navigations/components/{NavigationList.jsx => NavigationList.tsx} (100%) rename assets/navigations/components/{NavigationListItem.jsx => NavigationListItem.tsx} (100%) rename assets/navigations/components/{Navigations.jsx => Navigations.tsx} (100%) rename assets/navigations/components/{NavigationsApp.jsx => NavigationsApp.tsx} (100%) rename assets/navigations/{reducers.jsx => reducers.tsx} (100%) rename assets/news-api/components/{EditAPIToken.jsx => EditAPIToken.tsx} (100%) rename assets/notifications/components/{BasicNotificationItem.jsx => BasicNotificationItem.tsx} (100%) rename assets/notifications/components/{NotificationsApp.jsx => NotificationsApp.tsx} (100%) rename assets/notifications/components/{notificationItems.jsx => notificationItems.tsx} (100%) rename assets/oauth_clients/components/{ClientList.jsx => ClientList.tsx} (100%) rename assets/oauth_clients/components/{ClientListItem.jsx => ClientListItem.tsx} (100%) rename assets/oauth_clients/components/{Clients.jsx => Clients.tsx} (100%) rename assets/oauth_clients/components/{ClientsApp.jsx => ClientsApp.tsx} (100%) rename assets/oauth_clients/components/{EditClient.jsx => EditClient.tsx} (100%) rename assets/products/components/{EditProduct.jsx => EditProduct.tsx} (100%) rename assets/products/components/{ProductList.jsx => ProductList.tsx} (100%) rename assets/products/components/{ProductListItem.jsx => ProductListItem.tsx} (100%) rename assets/products/components/{Products.jsx => Products.tsx} (100%) rename assets/products/components/{ProductsApp.jsx => ProductsApp.tsx} (100%) rename assets/search/components/{AdvancedSearchPanel.jsx => AdvancedSearchPanel.tsx} (100%) rename assets/search/components/{ContentSearchResults.jsx => ContentSearchResults.tsx} (100%) rename assets/search/components/{FollowedTopics.jsx => FollowedTopics.tsx} (100%) rename assets/search/components/{MonitoringEditor.jsx => MonitoringEditor.tsx} (100%) rename assets/search/components/{NewItemsIcon.jsx => NewItemsIcon.tsx} (100%) rename assets/search/components/{SearchBar.jsx => SearchBar.tsx} (100%) rename assets/search/components/{SearchResults.jsx => SearchResults.tsx} (100%) rename assets/search/components/{SearchResultsInfo.jsx => SearchResultsInfo.tsx} (100%) rename assets/search/components/{TopicEditor.jsx => TopicEditor.tsx} (100%) rename assets/search/components/{TopicForm.jsx => TopicForm.tsx} (100%) rename assets/search/components/{TopicItem.jsx => TopicItem.tsx} (100%) rename assets/search/components/{TopicList.jsx => TopicList.tsx} (100%) rename assets/search/components/{TopicParameters.jsx => TopicParameters.tsx} (100%) rename assets/search/components/{TopicsTab.jsx => TopicsTab.tsx} (100%) rename assets/section-filters/components/{EditSectionFilter.jsx => EditSectionFilter.tsx} (100%) rename assets/section-filters/components/{SectionFilterList.jsx => SectionFilterList.tsx} (100%) rename assets/section-filters/components/{SectionFilterListItem.jsx => SectionFilterListItem.tsx} (100%) rename assets/section-filters/components/{SectionFilters.jsx => SectionFilters.tsx} (100%) rename assets/section-filters/components/{SectionFiltersApp.jsx => SectionFiltersApp.tsx} (100%) rename assets/ui/components/{Article.jsx => Article.tsx} (100%) rename assets/ui/components/{ArticleAuthor.jsx => ArticleAuthor.tsx} (100%) rename assets/ui/components/{ArticleBody.jsx => ArticleBody.tsx} (100%) rename assets/ui/components/{ArticleBodyHtml.jsx => ArticleBodyHtml.tsx} (100%) rename assets/ui/components/{ArticleContent.jsx => ArticleContent.tsx} (100%) rename assets/ui/components/{ArticleContentInfoWrapper.jsx => ArticleContentInfoWrapper.tsx} (100%) rename assets/ui/components/{ArticleContentWrapper.jsx => ArticleContentWrapper.tsx} (100%) rename assets/ui/components/{ArticleEmbargoed.jsx => ArticleEmbargoed.tsx} (100%) rename assets/ui/components/{ArticleHeadline.jsx => ArticleHeadline.tsx} (100%) rename assets/ui/components/{ArticleItemDetails.jsx => ArticleItemDetails.tsx} (100%) rename assets/ui/components/{ArticleMedia.jsx => ArticleMedia.tsx} (100%) rename assets/ui/components/{ArticlePicture.jsx => ArticlePicture.tsx} (100%) rename assets/ui/components/{ArticleSidebar.jsx => ArticleSidebar.tsx} (100%) rename assets/ui/components/{ArticleSidebarBox.jsx => ArticleSidebarBox.tsx} (100%) rename assets/ui/components/{ArticleSlugline.jsx => ArticleSlugline.tsx} (100%) rename assets/ui/components/{Collapse.jsx => Collapse.tsx} (100%) rename assets/ui/components/{Content.jsx => Content.tsx} (100%) rename assets/ui/components/{ContentBar.jsx => ContentBar.tsx} (100%) rename assets/ui/components/{ContentHeader.jsx => ContentHeader.tsx} (100%) rename assets/ui/components/{FormToggle.jsx => FormToggle.tsx} (100%) rename assets/ui/components/{MetaTime.jsx => MetaTime.tsx} (100%) rename assets/ui/components/{PlainText.jsx => PlainText.tsx} (100%) rename assets/ui/components/{Preview.jsx => Preview.tsx} (100%) rename assets/ui/components/{PreviewBox.jsx => PreviewBox.tsx} (100%) rename assets/ui/components/{ToolTip.jsx => ToolTip.tsx} (100%) rename assets/user-profile/components/{ProfileToggle.jsx => ProfileToggle.tsx} (100%) rename assets/user-profile/components/{UserProfileApp.jsx => UserProfileApp.tsx} (100%) rename assets/user-profile/components/{UserProfileAvatar.jsx => UserProfileAvatar.tsx} (100%) rename assets/user-profile/components/{UserProfileMenu.jsx => UserProfileMenu.tsx} (100%) rename assets/user-profile/components/profile/{UserProfile.jsx => UserProfile.tsx} (100%) rename assets/users/components/{EditUser.jsx => EditUser.tsx} (100%) rename assets/users/components/{EditUserProductPermission.jsx => EditUserProductPermission.tsx} (100%) rename assets/users/components/{UserListItem.jsx => UserListItem.tsx} (100%) rename assets/users/components/{Users.jsx => Users.tsx} (100%) rename assets/users/components/{UsersApp.jsx => UsersApp.tsx} (100%) rename assets/users/components/{UsersList.jsx => UsersList.tsx} (100%) rename assets/users/components/filters/{UserListCompanyFilter.jsx => UserListCompanyFilter.tsx} (100%) rename assets/users/components/filters/{UserListSortFilter.jsx => UserListSortFilter.tsx} (100%) rename assets/wire/components/{AgendaLinks.jsx => AgendaLinks.tsx} (100%) rename assets/wire/components/{DownloadItemsModal.jsx => DownloadItemsModal.tsx} (100%) rename assets/wire/components/{FollowStory.jsx => FollowStory.tsx} (100%) rename assets/wire/components/{InfoBox.jsx => InfoBox.tsx} (100%) rename assets/wire/components/{InfoBoxContent.jsx => InfoBoxContent.tsx} (100%) rename assets/wire/components/{ItemDetails.jsx => ItemDetails.tsx} (100%) rename assets/wire/components/{ItemStatisticsModal.jsx => ItemStatisticsModal.tsx} (100%) rename assets/wire/components/{ItemVersion.jsx => ItemVersion.tsx} (100%) rename assets/wire/components/{ItemsList.jsx => ItemsList.tsx} (100%) rename assets/wire/components/{ListItemNextVersion.jsx => ListItemNextVersion.tsx} (100%) rename assets/wire/components/{ListItemPreviousVersions.jsx => ListItemPreviousVersions.tsx} (100%) rename assets/wire/components/{ListSearchOptions.jsx => ListSearchOptions.tsx} (100%) rename assets/wire/components/{ListViewControls.jsx => ListViewControls.tsx} (100%) rename assets/wire/components/{NewsOnlyControl.jsx => NewsOnlyControl.tsx} (100%) rename assets/wire/components/{PreviewEdnote.jsx => PreviewEdnote.tsx} (100%) rename assets/wire/components/{PreviewMeta.jsx => PreviewMeta.tsx} (100%) rename assets/wire/components/{PreviewTags.jsx => PreviewTags.tsx} (100%) rename assets/wire/components/{PreviewTagsBlock.jsx => PreviewTagsBlock.tsx} (100%) rename assets/wire/components/{PreviewTagsLink.jsx => PreviewTagsLink.tsx} (100%) rename assets/wire/components/{PreviewTagsLinkList.jsx => PreviewTagsLinkList.tsx} (100%) rename assets/wire/components/{PreviewTagsSubjects.jsx => PreviewTagsSubjects.tsx} (100%) rename assets/wire/components/{SearchAllVersionsControl.jsx => SearchAllVersionsControl.tsx} (100%) rename assets/wire/components/{SearchResultsInfo.jsx => SearchResultsInfo.tsx} (100%) rename assets/wire/components/{SearchSidebar.jsx => SearchSidebar.tsx} (100%) rename assets/wire/components/{SelectedItemsBar.jsx => SelectedItemsBar.tsx} (100%) rename assets/wire/components/{WireActionButtons.jsx => WireActionButtons.tsx} (100%) rename assets/wire/components/{WireApp.jsx => WireApp.tsx} (100%) rename assets/wire/components/{WireListItem.jsx => WireListItem.tsx} (100%) rename assets/wire/components/{WireListItemDeleted.jsx => WireListItemDeleted.tsx} (100%) rename assets/wire/components/{WireListItemIcons.jsx => WireListItemIcons.tsx} (100%) rename assets/wire/components/{WirePreview.jsx => WirePreview.tsx} (100%) rename assets/wire/components/fields/{Authors.jsx => Authors.tsx} (100%) rename assets/wire/components/fields/{CharCount.jsx => CharCount.tsx} (100%) rename assets/wire/components/fields/{Embargo.jsx => Embargo.tsx} (100%) rename assets/wire/components/fields/{MatchLabel.jsx => MatchLabel.tsx} (100%) rename assets/wire/components/fields/{PreviousVersions.jsx => PreviousVersions.tsx} (100%) rename assets/wire/components/fields/{Source.jsx => Source.tsx} (100%) rename assets/wire/components/fields/{UrgencyLabel.jsx => UrgencyLabel.tsx} (100%) rename assets/wire/components/fields/{VersionCreated.jsx => VersionCreated.tsx} (100%) rename assets/wire/components/fields/{VersionType.jsx => VersionType.tsx} (100%) rename assets/wire/components/fields/{WordCount.jsx => WordCount.tsx} (100%) rename assets/wire/components/fields/{index.jsx => index.tsx} (100%) rename assets/wire/components/filters/{FilterButton.jsx => FilterButton.tsx} (100%) rename assets/wire/components/filters/{FilterGroup.jsx => FilterGroup.tsx} (100%) rename assets/wire/components/filters/{FilterItem.jsx => FilterItem.tsx} (100%) rename assets/wire/components/filters/{FiltersTab.jsx => FiltersTab.tsx} (100%) rename assets/wire/components/filters/{NavCreatedPicker.jsx => NavCreatedPicker.tsx} (100%) rename assets/wire/components/filters/{NavGroup.jsx => NavGroup.tsx} (100%) rename assets/wire/components/filters/{NavLink.jsx => NavLink.tsx} (100%) rename assets/wire/components/filters/{NavigationTab.jsx => NavigationTab.tsx} (100%) diff --git a/assets/agenda/components/AgendaApp.jsx b/assets/agenda/components/AgendaApp.tsx similarity index 100% rename from assets/agenda/components/AgendaApp.jsx rename to assets/agenda/components/AgendaApp.tsx diff --git a/assets/agenda/components/AgendaAttachments.jsx b/assets/agenda/components/AgendaAttachments.tsx similarity index 100% rename from assets/agenda/components/AgendaAttachments.jsx rename to assets/agenda/components/AgendaAttachments.tsx diff --git a/assets/agenda/components/AgendaCalendarAgendaFilter.jsx b/assets/agenda/components/AgendaCalendarAgendaFilter.tsx similarity index 100% rename from assets/agenda/components/AgendaCalendarAgendaFilter.jsx rename to assets/agenda/components/AgendaCalendarAgendaFilter.tsx diff --git a/assets/agenda/components/AgendaCoverageExistsFilter.jsx b/assets/agenda/components/AgendaCoverageExistsFilter.tsx similarity index 100% rename from assets/agenda/components/AgendaCoverageExistsFilter.jsx rename to assets/agenda/components/AgendaCoverageExistsFilter.tsx diff --git a/assets/agenda/components/AgendaCoverageRequest.jsx b/assets/agenda/components/AgendaCoverageRequest.tsx similarity index 100% rename from assets/agenda/components/AgendaCoverageRequest.jsx rename to assets/agenda/components/AgendaCoverageRequest.tsx diff --git a/assets/agenda/components/AgendaCoverages.jsx b/assets/agenda/components/AgendaCoverages.tsx similarity index 100% rename from assets/agenda/components/AgendaCoverages.jsx rename to assets/agenda/components/AgendaCoverages.tsx diff --git a/assets/agenda/components/AgendaDateButtons.jsx b/assets/agenda/components/AgendaDateButtons.tsx similarity index 100% rename from assets/agenda/components/AgendaDateButtons.jsx rename to assets/agenda/components/AgendaDateButtons.tsx diff --git a/assets/agenda/components/AgendaDateNavigation.jsx b/assets/agenda/components/AgendaDateNavigation.tsx similarity index 100% rename from assets/agenda/components/AgendaDateNavigation.jsx rename to assets/agenda/components/AgendaDateNavigation.tsx diff --git a/assets/agenda/components/AgendaDetailCoverages.jsx b/assets/agenda/components/AgendaDetailCoverages.tsx similarity index 100% rename from assets/agenda/components/AgendaDetailCoverages.jsx rename to assets/agenda/components/AgendaDetailCoverages.tsx diff --git a/assets/agenda/components/AgendaDropdown.jsx b/assets/agenda/components/AgendaDropdown.tsx similarity index 100% rename from assets/agenda/components/AgendaDropdown.jsx rename to assets/agenda/components/AgendaDropdown.tsx diff --git a/assets/agenda/components/AgendaDropdownFilter.jsx b/assets/agenda/components/AgendaDropdownFilter.tsx similarity index 100% rename from assets/agenda/components/AgendaDropdownFilter.jsx rename to assets/agenda/components/AgendaDropdownFilter.tsx diff --git a/assets/agenda/components/AgendaEdNote.jsx b/assets/agenda/components/AgendaEdNote.tsx similarity index 100% rename from assets/agenda/components/AgendaEdNote.jsx rename to assets/agenda/components/AgendaEdNote.tsx diff --git a/assets/agenda/components/AgendaEventInfo.jsx b/assets/agenda/components/AgendaEventInfo.tsx similarity index 100% rename from assets/agenda/components/AgendaEventInfo.jsx rename to assets/agenda/components/AgendaEventInfo.tsx diff --git a/assets/agenda/components/AgendaFeaturedStoriesToogle.jsx b/assets/agenda/components/AgendaFeaturedStoriesToogle.tsx similarity index 100% rename from assets/agenda/components/AgendaFeaturedStoriesToogle.jsx rename to assets/agenda/components/AgendaFeaturedStoriesToogle.tsx diff --git a/assets/agenda/components/AgendaFilterButton.jsx b/assets/agenda/components/AgendaFilterButton.tsx similarity index 100% rename from assets/agenda/components/AgendaFilterButton.jsx rename to assets/agenda/components/AgendaFilterButton.tsx diff --git a/assets/agenda/components/AgendaFilters.jsx b/assets/agenda/components/AgendaFilters.tsx similarity index 100% rename from assets/agenda/components/AgendaFilters.jsx rename to assets/agenda/components/AgendaFilters.tsx diff --git a/assets/agenda/components/AgendaInternalNote.jsx b/assets/agenda/components/AgendaInternalNote.tsx similarity index 100% rename from assets/agenda/components/AgendaInternalNote.jsx rename to assets/agenda/components/AgendaInternalNote.tsx diff --git a/assets/agenda/components/AgendaItemDetails.jsx b/assets/agenda/components/AgendaItemDetails.tsx similarity index 100% rename from assets/agenda/components/AgendaItemDetails.jsx rename to assets/agenda/components/AgendaItemDetails.tsx diff --git a/assets/agenda/components/AgendaItemTimeUpdater.jsx b/assets/agenda/components/AgendaItemTimeUpdater.tsx similarity index 100% rename from assets/agenda/components/AgendaItemTimeUpdater.jsx rename to assets/agenda/components/AgendaItemTimeUpdater.tsx diff --git a/assets/agenda/components/AgendaItemTypeFilter.jsx b/assets/agenda/components/AgendaItemTypeFilter.tsx similarity index 100% rename from assets/agenda/components/AgendaItemTypeFilter.jsx rename to assets/agenda/components/AgendaItemTypeFilter.tsx diff --git a/assets/agenda/components/AgendaList.jsx b/assets/agenda/components/AgendaList.tsx similarity index 100% rename from assets/agenda/components/AgendaList.jsx rename to assets/agenda/components/AgendaList.tsx diff --git a/assets/agenda/components/AgendaListCoverageItem.jsx b/assets/agenda/components/AgendaListCoverageItem.tsx similarity index 100% rename from assets/agenda/components/AgendaListCoverageItem.jsx rename to assets/agenda/components/AgendaListCoverageItem.tsx diff --git a/assets/agenda/components/AgendaListItem.jsx b/assets/agenda/components/AgendaListItem.tsx similarity index 100% rename from assets/agenda/components/AgendaListItem.jsx rename to assets/agenda/components/AgendaListItem.tsx diff --git a/assets/agenda/components/AgendaListItemIcons.jsx b/assets/agenda/components/AgendaListItemIcons.tsx similarity index 100% rename from assets/agenda/components/AgendaListItemIcons.jsx rename to assets/agenda/components/AgendaListItemIcons.tsx diff --git a/assets/agenda/components/AgendaListItemLabels.jsx b/assets/agenda/components/AgendaListItemLabels.tsx similarity index 100% rename from assets/agenda/components/AgendaListItemLabels.jsx rename to assets/agenda/components/AgendaListItemLabels.tsx diff --git a/assets/agenda/components/AgendaListViewControls.jsx b/assets/agenda/components/AgendaListViewControls.tsx similarity index 100% rename from assets/agenda/components/AgendaListViewControls.jsx rename to assets/agenda/components/AgendaListViewControls.tsx diff --git a/assets/agenda/components/AgendaLocation.jsx b/assets/agenda/components/AgendaLocation.tsx similarity index 100% rename from assets/agenda/components/AgendaLocation.jsx rename to assets/agenda/components/AgendaLocation.tsx diff --git a/assets/agenda/components/AgendaLongDescription.jsx b/assets/agenda/components/AgendaLongDescription.tsx similarity index 100% rename from assets/agenda/components/AgendaLongDescription.jsx rename to assets/agenda/components/AgendaLongDescription.tsx diff --git a/assets/agenda/components/AgendaMap.jsx b/assets/agenda/components/AgendaMap.tsx similarity index 100% rename from assets/agenda/components/AgendaMap.jsx rename to assets/agenda/components/AgendaMap.tsx diff --git a/assets/agenda/components/AgendaMeta.jsx b/assets/agenda/components/AgendaMeta.tsx similarity index 100% rename from assets/agenda/components/AgendaMeta.jsx rename to assets/agenda/components/AgendaMeta.tsx diff --git a/assets/agenda/components/AgendaMetaTime.jsx b/assets/agenda/components/AgendaMetaTime.tsx similarity index 100% rename from assets/agenda/components/AgendaMetaTime.jsx rename to assets/agenda/components/AgendaMetaTime.tsx diff --git a/assets/agenda/components/AgendaName.jsx b/assets/agenda/components/AgendaName.tsx similarity index 100% rename from assets/agenda/components/AgendaName.jsx rename to assets/agenda/components/AgendaName.tsx diff --git a/assets/agenda/components/AgendaPreview.jsx b/assets/agenda/components/AgendaPreview.tsx similarity index 100% rename from assets/agenda/components/AgendaPreview.jsx rename to assets/agenda/components/AgendaPreview.tsx diff --git a/assets/agenda/components/AgendaPreviewAttachments.jsx b/assets/agenda/components/AgendaPreviewAttachments.tsx similarity index 100% rename from assets/agenda/components/AgendaPreviewAttachments.jsx rename to assets/agenda/components/AgendaPreviewAttachments.tsx diff --git a/assets/agenda/components/AgendaPreviewCoverages.jsx b/assets/agenda/components/AgendaPreviewCoverages.tsx similarity index 100% rename from assets/agenda/components/AgendaPreviewCoverages.jsx rename to assets/agenda/components/AgendaPreviewCoverages.tsx diff --git a/assets/agenda/components/AgendaPreviewEvent.jsx b/assets/agenda/components/AgendaPreviewEvent.tsx similarity index 100% rename from assets/agenda/components/AgendaPreviewEvent.jsx rename to assets/agenda/components/AgendaPreviewEvent.tsx diff --git a/assets/agenda/components/AgendaPreviewImage.jsx b/assets/agenda/components/AgendaPreviewImage.tsx similarity index 100% rename from assets/agenda/components/AgendaPreviewImage.jsx rename to assets/agenda/components/AgendaPreviewImage.tsx diff --git a/assets/agenda/components/AgendaPreviewPlanning.jsx b/assets/agenda/components/AgendaPreviewPlanning.tsx similarity index 100% rename from assets/agenda/components/AgendaPreviewPlanning.jsx rename to assets/agenda/components/AgendaPreviewPlanning.tsx diff --git a/assets/agenda/components/AgendaRegistrationInvitationDetails.jsx b/assets/agenda/components/AgendaRegistrationInvitationDetails.tsx similarity index 100% rename from assets/agenda/components/AgendaRegistrationInvitationDetails.jsx rename to assets/agenda/components/AgendaRegistrationInvitationDetails.tsx diff --git a/assets/agenda/components/AgendaTags.jsx b/assets/agenda/components/AgendaTags.tsx similarity index 100% rename from assets/agenda/components/AgendaTags.jsx rename to assets/agenda/components/AgendaTags.tsx diff --git a/assets/agenda/components/AgendaTime.jsx b/assets/agenda/components/AgendaTime.tsx similarity index 100% rename from assets/agenda/components/AgendaTime.jsx rename to assets/agenda/components/AgendaTime.tsx diff --git a/assets/agenda/components/CoverageItemStatus.jsx b/assets/agenda/components/CoverageItemStatus.tsx similarity index 100% rename from assets/agenda/components/CoverageItemStatus.jsx rename to assets/agenda/components/CoverageItemStatus.tsx diff --git a/assets/agenda/components/LocationFilter.jsx b/assets/agenda/components/LocationFilter.tsx similarity index 100% rename from assets/agenda/components/LocationFilter.jsx rename to assets/agenda/components/LocationFilter.tsx diff --git a/assets/am-news/components/AmNewsApp.jsx b/assets/am-news/components/AmNewsApp.tsx similarity index 100% rename from assets/am-news/components/AmNewsApp.jsx rename to assets/am-news/components/AmNewsApp.tsx diff --git a/assets/am-news/components/AmNewsIcon.jsx b/assets/am-news/components/AmNewsIcon.tsx similarity index 100% rename from assets/am-news/components/AmNewsIcon.jsx rename to assets/am-news/components/AmNewsIcon.tsx diff --git a/assets/am-news/components/AmNewsList.jsx b/assets/am-news/components/AmNewsList.tsx similarity index 100% rename from assets/am-news/components/AmNewsList.jsx rename to assets/am-news/components/AmNewsList.tsx diff --git a/assets/am-news/components/AmNewsListItem.jsx b/assets/am-news/components/AmNewsListItem.tsx similarity index 100% rename from assets/am-news/components/AmNewsListItem.jsx rename to assets/am-news/components/AmNewsListItem.tsx diff --git a/assets/am-news/components/Navigations.jsx b/assets/am-news/components/Navigations.tsx similarity index 100% rename from assets/am-news/components/Navigations.jsx rename to assets/am-news/components/Navigations.tsx diff --git a/assets/cards/components/CardList.jsx b/assets/cards/components/CardList.tsx similarity index 100% rename from assets/cards/components/CardList.jsx rename to assets/cards/components/CardList.tsx diff --git a/assets/cards/components/CardListItem.jsx b/assets/cards/components/CardListItem.tsx similarity index 100% rename from assets/cards/components/CardListItem.jsx rename to assets/cards/components/CardListItem.tsx diff --git a/assets/cards/components/Cards.jsx b/assets/cards/components/Cards.tsx similarity index 100% rename from assets/cards/components/Cards.jsx rename to assets/cards/components/Cards.tsx diff --git a/assets/cards/components/CardsApp.jsx b/assets/cards/components/CardsApp.tsx similarity index 100% rename from assets/cards/components/CardsApp.jsx rename to assets/cards/components/CardsApp.tsx diff --git a/assets/cards/components/EditCard.jsx b/assets/cards/components/EditCard.tsx similarity index 100% rename from assets/cards/components/EditCard.jsx rename to assets/cards/components/EditCard.tsx diff --git a/assets/companies/components/CompaniesApp.jsx b/assets/companies/components/CompaniesApp.tsx similarity index 100% rename from assets/companies/components/CompaniesApp.jsx rename to assets/companies/components/CompaniesApp.tsx diff --git a/assets/companies/components/CompanyList.jsx b/assets/companies/components/CompanyList.tsx similarity index 100% rename from assets/companies/components/CompanyList.jsx rename to assets/companies/components/CompanyList.tsx diff --git a/assets/companies/components/CompanyListItem.jsx b/assets/companies/components/CompanyListItem.tsx similarity index 100% rename from assets/companies/components/CompanyListItem.jsx rename to assets/companies/components/CompanyListItem.tsx diff --git a/assets/companies/components/CompanyPermissions.jsx b/assets/companies/components/CompanyPermissions.tsx similarity index 100% rename from assets/companies/components/CompanyPermissions.jsx rename to assets/companies/components/CompanyPermissions.tsx diff --git a/assets/companies/components/EditCompany.jsx b/assets/companies/components/EditCompany.tsx similarity index 100% rename from assets/companies/components/EditCompany.jsx rename to assets/companies/components/EditCompany.tsx diff --git a/assets/companies/components/EditCompanyAPI.jsx b/assets/companies/components/EditCompanyAPI.tsx similarity index 100% rename from assets/companies/components/EditCompanyAPI.jsx rename to assets/companies/components/EditCompanyAPI.tsx diff --git a/assets/companies/components/EditCompanyDetails.jsx b/assets/companies/components/EditCompanyDetails.tsx similarity index 100% rename from assets/companies/components/EditCompanyDetails.jsx rename to assets/companies/components/EditCompanyDetails.tsx diff --git a/assets/company-admin/components/CompanyAdminApp.jsx b/assets/company-admin/components/CompanyAdminApp.tsx similarity index 100% rename from assets/company-admin/components/CompanyAdminApp.jsx rename to assets/company-admin/components/CompanyAdminApp.tsx diff --git a/assets/company-admin/components/CompanyAdminProductSeatRequestModal.jsx b/assets/company-admin/components/CompanyAdminProductSeatRequestModal.tsx similarity index 100% rename from assets/company-admin/components/CompanyAdminProductSeatRequestModal.jsx rename to assets/company-admin/components/CompanyAdminProductSeatRequestModal.tsx diff --git a/assets/company-admin/components/CompanyAdminSideNav.jsx b/assets/company-admin/components/CompanyAdminSideNav.tsx similarity index 100% rename from assets/company-admin/components/CompanyAdminSideNav.jsx rename to assets/company-admin/components/CompanyAdminSideNav.tsx diff --git a/assets/company-admin/components/CompanyDetails.jsx b/assets/company-admin/components/CompanyDetails.tsx similarity index 100% rename from assets/company-admin/components/CompanyDetails.jsx rename to assets/company-admin/components/CompanyDetails.tsx diff --git a/assets/company-admin/components/CompanyDetailsProductFilter.jsx b/assets/company-admin/components/CompanyDetailsProductFilter.tsx similarity index 100% rename from assets/company-admin/components/CompanyDetailsProductFilter.jsx rename to assets/company-admin/components/CompanyDetailsProductFilter.tsx diff --git a/assets/company-admin/components/CompanyDetailsProductRow.jsx b/assets/company-admin/components/CompanyDetailsProductRow.tsx similarity index 100% rename from assets/company-admin/components/CompanyDetailsProductRow.jsx rename to assets/company-admin/components/CompanyDetailsProductRow.tsx diff --git a/assets/company-admin/components/CompanyUserListItem.jsx b/assets/company-admin/components/CompanyUserListItem.tsx similarity index 100% rename from assets/company-admin/components/CompanyUserListItem.jsx rename to assets/company-admin/components/CompanyUserListItem.tsx diff --git a/assets/company-admin/components/CompanyUsers.jsx b/assets/company-admin/components/CompanyUsers.tsx similarity index 100% rename from assets/company-admin/components/CompanyUsers.jsx rename to assets/company-admin/components/CompanyUsers.tsx diff --git a/assets/company-reports/components/ComapnyNewsApiUsage.jsx b/assets/company-reports/components/ComapnyNewsApiUsage.tsx similarity index 100% rename from assets/company-reports/components/ComapnyNewsApiUsage.jsx rename to assets/company-reports/components/ComapnyNewsApiUsage.tsx diff --git a/assets/company-reports/components/Company.jsx b/assets/company-reports/components/Company.tsx similarity index 100% rename from assets/company-reports/components/Company.jsx rename to assets/company-reports/components/Company.tsx diff --git a/assets/company-reports/components/CompanyProducts.jsx b/assets/company-reports/components/CompanyProducts.tsx similarity index 100% rename from assets/company-reports/components/CompanyProducts.jsx rename to assets/company-reports/components/CompanyProducts.tsx diff --git a/assets/company-reports/components/CompanyReportsApp.jsx b/assets/company-reports/components/CompanyReportsApp.tsx similarity index 100% rename from assets/company-reports/components/CompanyReportsApp.jsx rename to assets/company-reports/components/CompanyReportsApp.tsx diff --git a/assets/company-reports/components/CompanySavedSearches.jsx b/assets/company-reports/components/CompanySavedSearches.tsx similarity index 100% rename from assets/company-reports/components/CompanySavedSearches.jsx rename to assets/company-reports/components/CompanySavedSearches.tsx diff --git a/assets/company-reports/components/ContentActivity.jsx b/assets/company-reports/components/ContentActivity.tsx similarity index 100% rename from assets/company-reports/components/ContentActivity.jsx rename to assets/company-reports/components/ContentActivity.tsx diff --git a/assets/company-reports/components/ExpiredCompanies.jsx b/assets/company-reports/components/ExpiredCompanies.tsx similarity index 100% rename from assets/company-reports/components/ExpiredCompanies.jsx rename to assets/company-reports/components/ExpiredCompanies.tsx diff --git a/assets/company-reports/components/ProductCompanies.jsx b/assets/company-reports/components/ProductCompanies.tsx similarity index 100% rename from assets/company-reports/components/ProductCompanies.jsx rename to assets/company-reports/components/ProductCompanies.tsx diff --git a/assets/company-reports/components/ProductStories.jsx b/assets/company-reports/components/ProductStories.tsx similarity index 100% rename from assets/company-reports/components/ProductStories.jsx rename to assets/company-reports/components/ProductStories.tsx diff --git a/assets/company-reports/components/ReportsTable.jsx b/assets/company-reports/components/ReportsTable.tsx similarity index 100% rename from assets/company-reports/components/ReportsTable.jsx rename to assets/company-reports/components/ReportsTable.tsx diff --git a/assets/company-reports/components/SubscriberActivity.jsx b/assets/company-reports/components/SubscriberActivity.tsx similarity index 100% rename from assets/company-reports/components/SubscriberActivity.jsx rename to assets/company-reports/components/SubscriberActivity.tsx diff --git a/assets/company-reports/components/UserSavedSearches.jsx b/assets/company-reports/components/UserSavedSearches.tsx similarity index 100% rename from assets/company-reports/components/UserSavedSearches.jsx rename to assets/company-reports/components/UserSavedSearches.tsx diff --git a/assets/components/ActionButton.jsx b/assets/components/ActionButton.tsx similarity index 100% rename from assets/components/ActionButton.jsx rename to assets/components/ActionButton.tsx diff --git a/assets/components/ActionList.jsx b/assets/components/ActionList.tsx similarity index 100% rename from assets/components/ActionList.jsx rename to assets/components/ActionList.tsx diff --git a/assets/components/ActionMenu.jsx b/assets/components/ActionMenu.tsx similarity index 100% rename from assets/components/ActionMenu.jsx rename to assets/components/ActionMenu.tsx diff --git a/assets/components/AuditInformation.jsx b/assets/components/AuditInformation.tsx similarity index 100% rename from assets/components/AuditInformation.jsx rename to assets/components/AuditInformation.tsx diff --git a/assets/components/BannerDrop.jsx b/assets/components/BannerDrop.tsx similarity index 100% rename from assets/components/BannerDrop.jsx rename to assets/components/BannerDrop.tsx diff --git a/assets/components/BookmarkTabs.jsx b/assets/components/BookmarkTabs.tsx similarity index 100% rename from assets/components/BookmarkTabs.jsx rename to assets/components/BookmarkTabs.tsx diff --git a/assets/components/CalendarButton.jsx b/assets/components/CalendarButton.tsx similarity index 100% rename from assets/components/CalendarButton.jsx rename to assets/components/CalendarButton.tsx diff --git a/assets/components/CalendarButtonWrapper.jsx b/assets/components/CalendarButtonWrapper.tsx similarity index 100% rename from assets/components/CalendarButtonWrapper.jsx rename to assets/components/CalendarButtonWrapper.tsx diff --git a/assets/components/CardEditor.jsx b/assets/components/CardEditor.tsx similarity index 100% rename from assets/components/CardEditor.jsx rename to assets/components/CardEditor.tsx diff --git a/assets/components/CheckboxInput.jsx b/assets/components/CheckboxInput.tsx similarity index 100% rename from assets/components/CheckboxInput.jsx rename to assets/components/CheckboxInput.tsx diff --git a/assets/components/CloseButton.jsx b/assets/components/CloseButton.tsx similarity index 100% rename from assets/components/CloseButton.jsx rename to assets/components/CloseButton.tsx diff --git a/assets/components/DateInput.jsx b/assets/components/DateInput.tsx similarity index 100% rename from assets/components/DateInput.jsx rename to assets/components/DateInput.tsx diff --git a/assets/components/Dropdown.jsx b/assets/components/Dropdown.tsx similarity index 100% rename from assets/components/Dropdown.jsx rename to assets/components/Dropdown.tsx diff --git a/assets/components/DropdownFilter.jsx b/assets/components/DropdownFilter.tsx similarity index 100% rename from assets/components/DropdownFilter.jsx rename to assets/components/DropdownFilter.tsx diff --git a/assets/components/DropdownFilterButton.jsx b/assets/components/DropdownFilterButton.tsx similarity index 100% rename from assets/components/DropdownFilterButton.jsx rename to assets/components/DropdownFilterButton.tsx diff --git a/assets/components/EditPanel.jsx b/assets/components/EditPanel.tsx similarity index 100% rename from assets/components/EditPanel.jsx rename to assets/components/EditPanel.tsx diff --git a/assets/components/ExpiryButtonWrapper.jsx b/assets/components/ExpiryButtonWrapper.tsx similarity index 100% rename from assets/components/ExpiryButtonWrapper.jsx rename to assets/components/ExpiryButtonWrapper.tsx diff --git a/assets/components/ExpiryDateInput.jsx b/assets/components/ExpiryDateInput.tsx similarity index 100% rename from assets/components/ExpiryDateInput.jsx rename to assets/components/ExpiryDateInput.tsx diff --git a/assets/components/FileInput.jsx b/assets/components/FileInput.tsx similarity index 100% rename from assets/components/FileInput.jsx rename to assets/components/FileInput.tsx diff --git a/assets/components/InputWrapper.jsx b/assets/components/InputWrapper.tsx similarity index 100% rename from assets/components/InputWrapper.jsx rename to assets/components/InputWrapper.tsx diff --git a/assets/components/ListBar.jsx b/assets/components/ListBar.tsx similarity index 100% rename from assets/components/ListBar.jsx rename to assets/components/ListBar.tsx diff --git a/assets/components/ListViewOptions.jsx b/assets/components/ListViewOptions.tsx similarity index 100% rename from assets/components/ListViewOptions.jsx rename to assets/components/ListViewOptions.tsx diff --git a/assets/components/Modal.jsx b/assets/components/Modal.tsx similarity index 100% rename from assets/components/Modal.jsx rename to assets/components/Modal.tsx diff --git a/assets/components/MultiSelectDropdown.jsx b/assets/components/MultiSelectDropdown.tsx similarity index 100% rename from assets/components/MultiSelectDropdown.jsx rename to assets/components/MultiSelectDropdown.tsx diff --git a/assets/components/NotificationList.jsx b/assets/components/NotificationList.tsx similarity index 100% rename from assets/components/NotificationList.jsx rename to assets/components/NotificationList.tsx diff --git a/assets/components/NotificationListItem.jsx b/assets/components/NotificationListItem.tsx similarity index 100% rename from assets/components/NotificationListItem.jsx rename to assets/components/NotificationListItem.tsx diff --git a/assets/components/PreviewActionButtons.jsx b/assets/components/PreviewActionButtons.tsx similarity index 100% rename from assets/components/PreviewActionButtons.jsx rename to assets/components/PreviewActionButtons.tsx diff --git a/assets/components/SelectInput.jsx b/assets/components/SelectInput.tsx similarity index 100% rename from assets/components/SelectInput.jsx rename to assets/components/SelectInput.tsx diff --git a/assets/components/ShareItemModal.jsx b/assets/components/ShareItemModal.tsx similarity index 100% rename from assets/components/ShareItemModal.jsx rename to assets/components/ShareItemModal.tsx diff --git a/assets/components/SortItems.jsx b/assets/components/SortItems.tsx similarity index 100% rename from assets/components/SortItems.jsx rename to assets/components/SortItems.tsx diff --git a/assets/components/Tag.jsx b/assets/components/Tag.tsx similarity index 100% rename from assets/components/Tag.jsx rename to assets/components/Tag.tsx diff --git a/assets/components/TagList.jsx b/assets/components/TagList.tsx similarity index 100% rename from assets/components/TagList.jsx rename to assets/components/TagList.tsx diff --git a/assets/components/TextAreaInput.jsx b/assets/components/TextAreaInput.tsx similarity index 100% rename from assets/components/TextAreaInput.jsx rename to assets/components/TextAreaInput.tsx diff --git a/assets/components/TextInput.jsx b/assets/components/TextInput.tsx similarity index 100% rename from assets/components/TextInput.jsx rename to assets/components/TextInput.tsx diff --git a/assets/components/TextListInput.jsx b/assets/components/TextListInput.tsx similarity index 100% rename from assets/components/TextListInput.jsx rename to assets/components/TextListInput.tsx diff --git a/assets/components/cards/edit/ConfigEvent.jsx b/assets/components/cards/edit/ConfigEvent.tsx similarity index 100% rename from assets/components/cards/edit/ConfigEvent.jsx rename to assets/components/cards/edit/ConfigEvent.tsx diff --git a/assets/components/cards/edit/ConfigExternalMedia.jsx b/assets/components/cards/edit/ConfigExternalMedia.tsx similarity index 100% rename from assets/components/cards/edit/ConfigExternalMedia.jsx rename to assets/components/cards/edit/ConfigExternalMedia.tsx diff --git a/assets/components/cards/edit/ConfigNavigation.jsx b/assets/components/cards/edit/ConfigNavigation.tsx similarity index 100% rename from assets/components/cards/edit/ConfigNavigation.jsx rename to assets/components/cards/edit/ConfigNavigation.tsx diff --git a/assets/components/cards/edit/ConfigProduct.jsx b/assets/components/cards/edit/ConfigProduct.tsx similarity index 100% rename from assets/components/cards/edit/ConfigProduct.jsx rename to assets/components/cards/edit/ConfigProduct.tsx diff --git a/assets/components/cards/render/CardBody.jsx b/assets/components/cards/render/CardBody.tsx similarity index 100% rename from assets/components/cards/render/CardBody.jsx rename to assets/components/cards/render/CardBody.tsx diff --git a/assets/components/cards/render/CardFooter.jsx b/assets/components/cards/render/CardFooter.tsx similarity index 100% rename from assets/components/cards/render/CardFooter.jsx rename to assets/components/cards/render/CardFooter.tsx diff --git a/assets/components/cards/render/CardMeta.jsx b/assets/components/cards/render/CardMeta.tsx similarity index 100% rename from assets/components/cards/render/CardMeta.jsx rename to assets/components/cards/render/CardMeta.tsx diff --git a/assets/components/cards/render/CardRow.jsx b/assets/components/cards/render/CardRow.tsx similarity index 100% rename from assets/components/cards/render/CardRow.jsx rename to assets/components/cards/render/CardRow.tsx diff --git a/assets/components/cards/render/EventsTwoByTwoCard.jsx b/assets/components/cards/render/EventsTwoByTwoCard.tsx similarity index 100% rename from assets/components/cards/render/EventsTwoByTwoCard.jsx rename to assets/components/cards/render/EventsTwoByTwoCard.tsx diff --git a/assets/components/cards/render/LargePictureTextCard.jsx b/assets/components/cards/render/LargePictureTextCard.tsx similarity index 100% rename from assets/components/cards/render/LargePictureTextCard.jsx rename to assets/components/cards/render/LargePictureTextCard.tsx diff --git a/assets/components/cards/render/LargeTextOnlyCard.jsx b/assets/components/cards/render/LargeTextOnlyCard.tsx similarity index 100% rename from assets/components/cards/render/LargeTextOnlyCard.jsx rename to assets/components/cards/render/LargeTextOnlyCard.tsx diff --git a/assets/components/cards/render/MediaGalleryCard.jsx b/assets/components/cards/render/MediaGalleryCard.tsx similarity index 100% rename from assets/components/cards/render/MediaGalleryCard.jsx rename to assets/components/cards/render/MediaGalleryCard.tsx diff --git a/assets/components/cards/render/MoreNewsButton.jsx b/assets/components/cards/render/MoreNewsButton.tsx similarity index 100% rename from assets/components/cards/render/MoreNewsButton.jsx rename to assets/components/cards/render/MoreNewsButton.tsx diff --git a/assets/components/cards/render/NavigationCard.jsx b/assets/components/cards/render/NavigationCard.tsx similarity index 100% rename from assets/components/cards/render/NavigationCard.jsx rename to assets/components/cards/render/NavigationCard.tsx diff --git a/assets/components/cards/render/NavigationSixPerRow.jsx b/assets/components/cards/render/NavigationSixPerRow.tsx similarity index 100% rename from assets/components/cards/render/NavigationSixPerRow.jsx rename to assets/components/cards/render/NavigationSixPerRow.tsx diff --git a/assets/components/cards/render/PhotoGalleryCard.jsx b/assets/components/cards/render/PhotoGalleryCard.tsx similarity index 100% rename from assets/components/cards/render/PhotoGalleryCard.jsx rename to assets/components/cards/render/PhotoGalleryCard.tsx diff --git a/assets/components/cards/render/PictureTextCard.jsx b/assets/components/cards/render/PictureTextCard.tsx similarity index 100% rename from assets/components/cards/render/PictureTextCard.jsx rename to assets/components/cards/render/PictureTextCard.tsx diff --git a/assets/components/cards/render/TextOnlyCard.jsx b/assets/components/cards/render/TextOnlyCard.tsx similarity index 100% rename from assets/components/cards/render/TextOnlyCard.jsx rename to assets/components/cards/render/TextOnlyCard.tsx diff --git a/assets/components/cards/render/TopNewsOneByOneCard.jsx b/assets/components/cards/render/TopNewsOneByOneCard.tsx similarity index 100% rename from assets/components/cards/render/TopNewsOneByOneCard.jsx rename to assets/components/cards/render/TopNewsOneByOneCard.tsx diff --git a/assets/components/cards/render/TopNewsTwoByTwoCard.jsx b/assets/components/cards/render/TopNewsTwoByTwoCard.tsx similarity index 100% rename from assets/components/cards/render/TopNewsTwoByTwoCard.jsx rename to assets/components/cards/render/TopNewsTwoByTwoCard.tsx diff --git a/assets/features/dashboard/DashboardSwitch.jsx b/assets/features/dashboard/DashboardSwitch.tsx similarity index 100% rename from assets/features/dashboard/DashboardSwitch.jsx rename to assets/features/dashboard/DashboardSwitch.tsx diff --git a/assets/features/sections/SectionSwitch.jsx b/assets/features/sections/SectionSwitch.tsx similarity index 100% rename from assets/features/sections/SectionSwitch.jsx rename to assets/features/sections/SectionSwitch.tsx diff --git a/assets/general-settings/components/GeneralSettingsApp.jsx b/assets/general-settings/components/GeneralSettingsApp.tsx similarity index 100% rename from assets/general-settings/components/GeneralSettingsApp.jsx rename to assets/general-settings/components/GeneralSettingsApp.tsx diff --git a/assets/home/components/HomeApp.jsx b/assets/home/components/HomeApp.tsx similarity index 100% rename from assets/home/components/HomeApp.jsx rename to assets/home/components/HomeApp.tsx diff --git a/assets/home/components/search-bar.jsx b/assets/home/components/search-bar.tsx similarity index 100% rename from assets/home/components/search-bar.jsx rename to assets/home/components/search-bar.tsx diff --git a/assets/layout/components/BaseApp.jsx b/assets/layout/components/BaseApp.tsx similarity index 100% rename from assets/layout/components/BaseApp.jsx rename to assets/layout/components/BaseApp.tsx diff --git a/assets/maps/components/map.jsx b/assets/maps/components/map.tsx similarity index 100% rename from assets/maps/components/map.jsx rename to assets/maps/components/map.tsx diff --git a/assets/maps/components/static.jsx b/assets/maps/components/static.tsx similarity index 100% rename from assets/maps/components/static.jsx rename to assets/maps/components/static.tsx diff --git a/assets/market-place/components/MarketPlaceApp.jsx b/assets/market-place/components/MarketPlaceApp.tsx similarity index 100% rename from assets/market-place/components/MarketPlaceApp.jsx rename to assets/market-place/components/MarketPlaceApp.tsx diff --git a/assets/monitoring/components/EditMonitoringProfile.jsx b/assets/monitoring/components/EditMonitoringProfile.tsx similarity index 100% rename from assets/monitoring/components/EditMonitoringProfile.jsx rename to assets/monitoring/components/EditMonitoringProfile.tsx diff --git a/assets/monitoring/components/MonitoringApp.jsx b/assets/monitoring/components/MonitoringApp.tsx similarity index 100% rename from assets/monitoring/components/MonitoringApp.jsx rename to assets/monitoring/components/MonitoringApp.tsx diff --git a/assets/monitoring/components/MonitoringItem.jsx b/assets/monitoring/components/MonitoringItem.tsx similarity index 100% rename from assets/monitoring/components/MonitoringItem.jsx rename to assets/monitoring/components/MonitoringItem.tsx diff --git a/assets/monitoring/components/MonitoringList.jsx b/assets/monitoring/components/MonitoringList.tsx similarity index 100% rename from assets/monitoring/components/MonitoringList.jsx rename to assets/monitoring/components/MonitoringList.tsx diff --git a/assets/monitoring/components/MonitoringPanel.jsx b/assets/monitoring/components/MonitoringPanel.tsx similarity index 100% rename from assets/monitoring/components/MonitoringPanel.jsx rename to assets/monitoring/components/MonitoringPanel.tsx diff --git a/assets/monitoring/components/MonitoringSchedule.jsx b/assets/monitoring/components/MonitoringSchedule.tsx similarity index 100% rename from assets/monitoring/components/MonitoringSchedule.jsx rename to assets/monitoring/components/MonitoringSchedule.tsx diff --git a/assets/navigations/actions.jsx b/assets/navigations/actions.tsx similarity index 100% rename from assets/navigations/actions.jsx rename to assets/navigations/actions.tsx diff --git a/assets/navigations/components/EditNavigation.jsx b/assets/navigations/components/EditNavigation.tsx similarity index 100% rename from assets/navigations/components/EditNavigation.jsx rename to assets/navigations/components/EditNavigation.tsx diff --git a/assets/navigations/components/NavigationList.jsx b/assets/navigations/components/NavigationList.tsx similarity index 100% rename from assets/navigations/components/NavigationList.jsx rename to assets/navigations/components/NavigationList.tsx diff --git a/assets/navigations/components/NavigationListItem.jsx b/assets/navigations/components/NavigationListItem.tsx similarity index 100% rename from assets/navigations/components/NavigationListItem.jsx rename to assets/navigations/components/NavigationListItem.tsx diff --git a/assets/navigations/components/Navigations.jsx b/assets/navigations/components/Navigations.tsx similarity index 100% rename from assets/navigations/components/Navigations.jsx rename to assets/navigations/components/Navigations.tsx diff --git a/assets/navigations/components/NavigationsApp.jsx b/assets/navigations/components/NavigationsApp.tsx similarity index 100% rename from assets/navigations/components/NavigationsApp.jsx rename to assets/navigations/components/NavigationsApp.tsx diff --git a/assets/navigations/reducers.jsx b/assets/navigations/reducers.tsx similarity index 100% rename from assets/navigations/reducers.jsx rename to assets/navigations/reducers.tsx diff --git a/assets/news-api/components/EditAPIToken.jsx b/assets/news-api/components/EditAPIToken.tsx similarity index 100% rename from assets/news-api/components/EditAPIToken.jsx rename to assets/news-api/components/EditAPIToken.tsx diff --git a/assets/notifications/components/BasicNotificationItem.jsx b/assets/notifications/components/BasicNotificationItem.tsx similarity index 100% rename from assets/notifications/components/BasicNotificationItem.jsx rename to assets/notifications/components/BasicNotificationItem.tsx diff --git a/assets/notifications/components/NotificationsApp.jsx b/assets/notifications/components/NotificationsApp.tsx similarity index 100% rename from assets/notifications/components/NotificationsApp.jsx rename to assets/notifications/components/NotificationsApp.tsx diff --git a/assets/notifications/components/notificationItems.jsx b/assets/notifications/components/notificationItems.tsx similarity index 100% rename from assets/notifications/components/notificationItems.jsx rename to assets/notifications/components/notificationItems.tsx diff --git a/assets/oauth_clients/components/ClientList.jsx b/assets/oauth_clients/components/ClientList.tsx similarity index 100% rename from assets/oauth_clients/components/ClientList.jsx rename to assets/oauth_clients/components/ClientList.tsx diff --git a/assets/oauth_clients/components/ClientListItem.jsx b/assets/oauth_clients/components/ClientListItem.tsx similarity index 100% rename from assets/oauth_clients/components/ClientListItem.jsx rename to assets/oauth_clients/components/ClientListItem.tsx diff --git a/assets/oauth_clients/components/Clients.jsx b/assets/oauth_clients/components/Clients.tsx similarity index 100% rename from assets/oauth_clients/components/Clients.jsx rename to assets/oauth_clients/components/Clients.tsx diff --git a/assets/oauth_clients/components/ClientsApp.jsx b/assets/oauth_clients/components/ClientsApp.tsx similarity index 100% rename from assets/oauth_clients/components/ClientsApp.jsx rename to assets/oauth_clients/components/ClientsApp.tsx diff --git a/assets/oauth_clients/components/EditClient.jsx b/assets/oauth_clients/components/EditClient.tsx similarity index 100% rename from assets/oauth_clients/components/EditClient.jsx rename to assets/oauth_clients/components/EditClient.tsx diff --git a/assets/products/components/EditProduct.jsx b/assets/products/components/EditProduct.tsx similarity index 100% rename from assets/products/components/EditProduct.jsx rename to assets/products/components/EditProduct.tsx diff --git a/assets/products/components/ProductList.jsx b/assets/products/components/ProductList.tsx similarity index 100% rename from assets/products/components/ProductList.jsx rename to assets/products/components/ProductList.tsx diff --git a/assets/products/components/ProductListItem.jsx b/assets/products/components/ProductListItem.tsx similarity index 100% rename from assets/products/components/ProductListItem.jsx rename to assets/products/components/ProductListItem.tsx diff --git a/assets/products/components/Products.jsx b/assets/products/components/Products.tsx similarity index 100% rename from assets/products/components/Products.jsx rename to assets/products/components/Products.tsx diff --git a/assets/products/components/ProductsApp.jsx b/assets/products/components/ProductsApp.tsx similarity index 100% rename from assets/products/components/ProductsApp.jsx rename to assets/products/components/ProductsApp.tsx diff --git a/assets/search/components/AdvancedSearchPanel.jsx b/assets/search/components/AdvancedSearchPanel.tsx similarity index 100% rename from assets/search/components/AdvancedSearchPanel.jsx rename to assets/search/components/AdvancedSearchPanel.tsx diff --git a/assets/search/components/ContentSearchResults.jsx b/assets/search/components/ContentSearchResults.tsx similarity index 100% rename from assets/search/components/ContentSearchResults.jsx rename to assets/search/components/ContentSearchResults.tsx diff --git a/assets/search/components/FollowedTopics.jsx b/assets/search/components/FollowedTopics.tsx similarity index 100% rename from assets/search/components/FollowedTopics.jsx rename to assets/search/components/FollowedTopics.tsx diff --git a/assets/search/components/MonitoringEditor.jsx b/assets/search/components/MonitoringEditor.tsx similarity index 100% rename from assets/search/components/MonitoringEditor.jsx rename to assets/search/components/MonitoringEditor.tsx diff --git a/assets/search/components/NewItemsIcon.jsx b/assets/search/components/NewItemsIcon.tsx similarity index 100% rename from assets/search/components/NewItemsIcon.jsx rename to assets/search/components/NewItemsIcon.tsx diff --git a/assets/search/components/SearchBar.jsx b/assets/search/components/SearchBar.tsx similarity index 100% rename from assets/search/components/SearchBar.jsx rename to assets/search/components/SearchBar.tsx diff --git a/assets/search/components/SearchResults.jsx b/assets/search/components/SearchResults.tsx similarity index 100% rename from assets/search/components/SearchResults.jsx rename to assets/search/components/SearchResults.tsx diff --git a/assets/search/components/SearchResultsInfo.jsx b/assets/search/components/SearchResultsInfo.tsx similarity index 100% rename from assets/search/components/SearchResultsInfo.jsx rename to assets/search/components/SearchResultsInfo.tsx diff --git a/assets/search/components/TopicEditor.jsx b/assets/search/components/TopicEditor.tsx similarity index 100% rename from assets/search/components/TopicEditor.jsx rename to assets/search/components/TopicEditor.tsx diff --git a/assets/search/components/TopicForm.jsx b/assets/search/components/TopicForm.tsx similarity index 100% rename from assets/search/components/TopicForm.jsx rename to assets/search/components/TopicForm.tsx diff --git a/assets/search/components/TopicItem.jsx b/assets/search/components/TopicItem.tsx similarity index 100% rename from assets/search/components/TopicItem.jsx rename to assets/search/components/TopicItem.tsx diff --git a/assets/search/components/TopicList.jsx b/assets/search/components/TopicList.tsx similarity index 100% rename from assets/search/components/TopicList.jsx rename to assets/search/components/TopicList.tsx diff --git a/assets/search/components/TopicParameters.jsx b/assets/search/components/TopicParameters.tsx similarity index 100% rename from assets/search/components/TopicParameters.jsx rename to assets/search/components/TopicParameters.tsx diff --git a/assets/search/components/TopicsTab.jsx b/assets/search/components/TopicsTab.tsx similarity index 100% rename from assets/search/components/TopicsTab.jsx rename to assets/search/components/TopicsTab.tsx diff --git a/assets/section-filters/components/EditSectionFilter.jsx b/assets/section-filters/components/EditSectionFilter.tsx similarity index 100% rename from assets/section-filters/components/EditSectionFilter.jsx rename to assets/section-filters/components/EditSectionFilter.tsx diff --git a/assets/section-filters/components/SectionFilterList.jsx b/assets/section-filters/components/SectionFilterList.tsx similarity index 100% rename from assets/section-filters/components/SectionFilterList.jsx rename to assets/section-filters/components/SectionFilterList.tsx diff --git a/assets/section-filters/components/SectionFilterListItem.jsx b/assets/section-filters/components/SectionFilterListItem.tsx similarity index 100% rename from assets/section-filters/components/SectionFilterListItem.jsx rename to assets/section-filters/components/SectionFilterListItem.tsx diff --git a/assets/section-filters/components/SectionFilters.jsx b/assets/section-filters/components/SectionFilters.tsx similarity index 100% rename from assets/section-filters/components/SectionFilters.jsx rename to assets/section-filters/components/SectionFilters.tsx diff --git a/assets/section-filters/components/SectionFiltersApp.jsx b/assets/section-filters/components/SectionFiltersApp.tsx similarity index 100% rename from assets/section-filters/components/SectionFiltersApp.jsx rename to assets/section-filters/components/SectionFiltersApp.tsx diff --git a/assets/ui/components/Article.jsx b/assets/ui/components/Article.tsx similarity index 100% rename from assets/ui/components/Article.jsx rename to assets/ui/components/Article.tsx diff --git a/assets/ui/components/ArticleAuthor.jsx b/assets/ui/components/ArticleAuthor.tsx similarity index 100% rename from assets/ui/components/ArticleAuthor.jsx rename to assets/ui/components/ArticleAuthor.tsx diff --git a/assets/ui/components/ArticleBody.jsx b/assets/ui/components/ArticleBody.tsx similarity index 100% rename from assets/ui/components/ArticleBody.jsx rename to assets/ui/components/ArticleBody.tsx diff --git a/assets/ui/components/ArticleBodyHtml.jsx b/assets/ui/components/ArticleBodyHtml.tsx similarity index 100% rename from assets/ui/components/ArticleBodyHtml.jsx rename to assets/ui/components/ArticleBodyHtml.tsx diff --git a/assets/ui/components/ArticleContent.jsx b/assets/ui/components/ArticleContent.tsx similarity index 100% rename from assets/ui/components/ArticleContent.jsx rename to assets/ui/components/ArticleContent.tsx diff --git a/assets/ui/components/ArticleContentInfoWrapper.jsx b/assets/ui/components/ArticleContentInfoWrapper.tsx similarity index 100% rename from assets/ui/components/ArticleContentInfoWrapper.jsx rename to assets/ui/components/ArticleContentInfoWrapper.tsx diff --git a/assets/ui/components/ArticleContentWrapper.jsx b/assets/ui/components/ArticleContentWrapper.tsx similarity index 100% rename from assets/ui/components/ArticleContentWrapper.jsx rename to assets/ui/components/ArticleContentWrapper.tsx diff --git a/assets/ui/components/ArticleEmbargoed.jsx b/assets/ui/components/ArticleEmbargoed.tsx similarity index 100% rename from assets/ui/components/ArticleEmbargoed.jsx rename to assets/ui/components/ArticleEmbargoed.tsx diff --git a/assets/ui/components/ArticleHeadline.jsx b/assets/ui/components/ArticleHeadline.tsx similarity index 100% rename from assets/ui/components/ArticleHeadline.jsx rename to assets/ui/components/ArticleHeadline.tsx diff --git a/assets/ui/components/ArticleItemDetails.jsx b/assets/ui/components/ArticleItemDetails.tsx similarity index 100% rename from assets/ui/components/ArticleItemDetails.jsx rename to assets/ui/components/ArticleItemDetails.tsx diff --git a/assets/ui/components/ArticleMedia.jsx b/assets/ui/components/ArticleMedia.tsx similarity index 100% rename from assets/ui/components/ArticleMedia.jsx rename to assets/ui/components/ArticleMedia.tsx diff --git a/assets/ui/components/ArticlePicture.jsx b/assets/ui/components/ArticlePicture.tsx similarity index 100% rename from assets/ui/components/ArticlePicture.jsx rename to assets/ui/components/ArticlePicture.tsx diff --git a/assets/ui/components/ArticleSidebar.jsx b/assets/ui/components/ArticleSidebar.tsx similarity index 100% rename from assets/ui/components/ArticleSidebar.jsx rename to assets/ui/components/ArticleSidebar.tsx diff --git a/assets/ui/components/ArticleSidebarBox.jsx b/assets/ui/components/ArticleSidebarBox.tsx similarity index 100% rename from assets/ui/components/ArticleSidebarBox.jsx rename to assets/ui/components/ArticleSidebarBox.tsx diff --git a/assets/ui/components/ArticleSlugline.jsx b/assets/ui/components/ArticleSlugline.tsx similarity index 100% rename from assets/ui/components/ArticleSlugline.jsx rename to assets/ui/components/ArticleSlugline.tsx diff --git a/assets/ui/components/Collapse.jsx b/assets/ui/components/Collapse.tsx similarity index 100% rename from assets/ui/components/Collapse.jsx rename to assets/ui/components/Collapse.tsx diff --git a/assets/ui/components/Content.jsx b/assets/ui/components/Content.tsx similarity index 100% rename from assets/ui/components/Content.jsx rename to assets/ui/components/Content.tsx diff --git a/assets/ui/components/ContentBar.jsx b/assets/ui/components/ContentBar.tsx similarity index 100% rename from assets/ui/components/ContentBar.jsx rename to assets/ui/components/ContentBar.tsx diff --git a/assets/ui/components/ContentHeader.jsx b/assets/ui/components/ContentHeader.tsx similarity index 100% rename from assets/ui/components/ContentHeader.jsx rename to assets/ui/components/ContentHeader.tsx diff --git a/assets/ui/components/FormToggle.jsx b/assets/ui/components/FormToggle.tsx similarity index 100% rename from assets/ui/components/FormToggle.jsx rename to assets/ui/components/FormToggle.tsx diff --git a/assets/ui/components/MetaTime.jsx b/assets/ui/components/MetaTime.tsx similarity index 100% rename from assets/ui/components/MetaTime.jsx rename to assets/ui/components/MetaTime.tsx diff --git a/assets/ui/components/PlainText.jsx b/assets/ui/components/PlainText.tsx similarity index 100% rename from assets/ui/components/PlainText.jsx rename to assets/ui/components/PlainText.tsx diff --git a/assets/ui/components/Preview.jsx b/assets/ui/components/Preview.tsx similarity index 100% rename from assets/ui/components/Preview.jsx rename to assets/ui/components/Preview.tsx diff --git a/assets/ui/components/PreviewBox.jsx b/assets/ui/components/PreviewBox.tsx similarity index 100% rename from assets/ui/components/PreviewBox.jsx rename to assets/ui/components/PreviewBox.tsx diff --git a/assets/ui/components/ToolTip.jsx b/assets/ui/components/ToolTip.tsx similarity index 100% rename from assets/ui/components/ToolTip.jsx rename to assets/ui/components/ToolTip.tsx diff --git a/assets/user-profile/components/ProfileToggle.jsx b/assets/user-profile/components/ProfileToggle.tsx similarity index 100% rename from assets/user-profile/components/ProfileToggle.jsx rename to assets/user-profile/components/ProfileToggle.tsx diff --git a/assets/user-profile/components/UserProfileApp.jsx b/assets/user-profile/components/UserProfileApp.tsx similarity index 100% rename from assets/user-profile/components/UserProfileApp.jsx rename to assets/user-profile/components/UserProfileApp.tsx diff --git a/assets/user-profile/components/UserProfileAvatar.jsx b/assets/user-profile/components/UserProfileAvatar.tsx similarity index 100% rename from assets/user-profile/components/UserProfileAvatar.jsx rename to assets/user-profile/components/UserProfileAvatar.tsx diff --git a/assets/user-profile/components/UserProfileMenu.jsx b/assets/user-profile/components/UserProfileMenu.tsx similarity index 100% rename from assets/user-profile/components/UserProfileMenu.jsx rename to assets/user-profile/components/UserProfileMenu.tsx diff --git a/assets/user-profile/components/profile/UserProfile.jsx b/assets/user-profile/components/profile/UserProfile.tsx similarity index 100% rename from assets/user-profile/components/profile/UserProfile.jsx rename to assets/user-profile/components/profile/UserProfile.tsx diff --git a/assets/users/components/EditUser.jsx b/assets/users/components/EditUser.tsx similarity index 100% rename from assets/users/components/EditUser.jsx rename to assets/users/components/EditUser.tsx diff --git a/assets/users/components/EditUserProductPermission.jsx b/assets/users/components/EditUserProductPermission.tsx similarity index 100% rename from assets/users/components/EditUserProductPermission.jsx rename to assets/users/components/EditUserProductPermission.tsx diff --git a/assets/users/components/UserListItem.jsx b/assets/users/components/UserListItem.tsx similarity index 100% rename from assets/users/components/UserListItem.jsx rename to assets/users/components/UserListItem.tsx diff --git a/assets/users/components/Users.jsx b/assets/users/components/Users.tsx similarity index 100% rename from assets/users/components/Users.jsx rename to assets/users/components/Users.tsx diff --git a/assets/users/components/UsersApp.jsx b/assets/users/components/UsersApp.tsx similarity index 100% rename from assets/users/components/UsersApp.jsx rename to assets/users/components/UsersApp.tsx diff --git a/assets/users/components/UsersList.jsx b/assets/users/components/UsersList.tsx similarity index 100% rename from assets/users/components/UsersList.jsx rename to assets/users/components/UsersList.tsx diff --git a/assets/users/components/filters/UserListCompanyFilter.jsx b/assets/users/components/filters/UserListCompanyFilter.tsx similarity index 100% rename from assets/users/components/filters/UserListCompanyFilter.jsx rename to assets/users/components/filters/UserListCompanyFilter.tsx diff --git a/assets/users/components/filters/UserListSortFilter.jsx b/assets/users/components/filters/UserListSortFilter.tsx similarity index 100% rename from assets/users/components/filters/UserListSortFilter.jsx rename to assets/users/components/filters/UserListSortFilter.tsx diff --git a/assets/wire/components/AgendaLinks.jsx b/assets/wire/components/AgendaLinks.tsx similarity index 100% rename from assets/wire/components/AgendaLinks.jsx rename to assets/wire/components/AgendaLinks.tsx diff --git a/assets/wire/components/DownloadItemsModal.jsx b/assets/wire/components/DownloadItemsModal.tsx similarity index 100% rename from assets/wire/components/DownloadItemsModal.jsx rename to assets/wire/components/DownloadItemsModal.tsx diff --git a/assets/wire/components/FollowStory.jsx b/assets/wire/components/FollowStory.tsx similarity index 100% rename from assets/wire/components/FollowStory.jsx rename to assets/wire/components/FollowStory.tsx diff --git a/assets/wire/components/InfoBox.jsx b/assets/wire/components/InfoBox.tsx similarity index 100% rename from assets/wire/components/InfoBox.jsx rename to assets/wire/components/InfoBox.tsx diff --git a/assets/wire/components/InfoBoxContent.jsx b/assets/wire/components/InfoBoxContent.tsx similarity index 100% rename from assets/wire/components/InfoBoxContent.jsx rename to assets/wire/components/InfoBoxContent.tsx diff --git a/assets/wire/components/ItemDetails.jsx b/assets/wire/components/ItemDetails.tsx similarity index 100% rename from assets/wire/components/ItemDetails.jsx rename to assets/wire/components/ItemDetails.tsx diff --git a/assets/wire/components/ItemStatisticsModal.jsx b/assets/wire/components/ItemStatisticsModal.tsx similarity index 100% rename from assets/wire/components/ItemStatisticsModal.jsx rename to assets/wire/components/ItemStatisticsModal.tsx diff --git a/assets/wire/components/ItemVersion.jsx b/assets/wire/components/ItemVersion.tsx similarity index 100% rename from assets/wire/components/ItemVersion.jsx rename to assets/wire/components/ItemVersion.tsx diff --git a/assets/wire/components/ItemsList.jsx b/assets/wire/components/ItemsList.tsx similarity index 100% rename from assets/wire/components/ItemsList.jsx rename to assets/wire/components/ItemsList.tsx diff --git a/assets/wire/components/ListItemNextVersion.jsx b/assets/wire/components/ListItemNextVersion.tsx similarity index 100% rename from assets/wire/components/ListItemNextVersion.jsx rename to assets/wire/components/ListItemNextVersion.tsx diff --git a/assets/wire/components/ListItemPreviousVersions.jsx b/assets/wire/components/ListItemPreviousVersions.tsx similarity index 100% rename from assets/wire/components/ListItemPreviousVersions.jsx rename to assets/wire/components/ListItemPreviousVersions.tsx diff --git a/assets/wire/components/ListSearchOptions.jsx b/assets/wire/components/ListSearchOptions.tsx similarity index 100% rename from assets/wire/components/ListSearchOptions.jsx rename to assets/wire/components/ListSearchOptions.tsx diff --git a/assets/wire/components/ListViewControls.jsx b/assets/wire/components/ListViewControls.tsx similarity index 100% rename from assets/wire/components/ListViewControls.jsx rename to assets/wire/components/ListViewControls.tsx diff --git a/assets/wire/components/NewsOnlyControl.jsx b/assets/wire/components/NewsOnlyControl.tsx similarity index 100% rename from assets/wire/components/NewsOnlyControl.jsx rename to assets/wire/components/NewsOnlyControl.tsx diff --git a/assets/wire/components/PreviewEdnote.jsx b/assets/wire/components/PreviewEdnote.tsx similarity index 100% rename from assets/wire/components/PreviewEdnote.jsx rename to assets/wire/components/PreviewEdnote.tsx diff --git a/assets/wire/components/PreviewMeta.jsx b/assets/wire/components/PreviewMeta.tsx similarity index 100% rename from assets/wire/components/PreviewMeta.jsx rename to assets/wire/components/PreviewMeta.tsx diff --git a/assets/wire/components/PreviewTags.jsx b/assets/wire/components/PreviewTags.tsx similarity index 100% rename from assets/wire/components/PreviewTags.jsx rename to assets/wire/components/PreviewTags.tsx diff --git a/assets/wire/components/PreviewTagsBlock.jsx b/assets/wire/components/PreviewTagsBlock.tsx similarity index 100% rename from assets/wire/components/PreviewTagsBlock.jsx rename to assets/wire/components/PreviewTagsBlock.tsx diff --git a/assets/wire/components/PreviewTagsLink.jsx b/assets/wire/components/PreviewTagsLink.tsx similarity index 100% rename from assets/wire/components/PreviewTagsLink.jsx rename to assets/wire/components/PreviewTagsLink.tsx diff --git a/assets/wire/components/PreviewTagsLinkList.jsx b/assets/wire/components/PreviewTagsLinkList.tsx similarity index 100% rename from assets/wire/components/PreviewTagsLinkList.jsx rename to assets/wire/components/PreviewTagsLinkList.tsx diff --git a/assets/wire/components/PreviewTagsSubjects.jsx b/assets/wire/components/PreviewTagsSubjects.tsx similarity index 100% rename from assets/wire/components/PreviewTagsSubjects.jsx rename to assets/wire/components/PreviewTagsSubjects.tsx diff --git a/assets/wire/components/SearchAllVersionsControl.jsx b/assets/wire/components/SearchAllVersionsControl.tsx similarity index 100% rename from assets/wire/components/SearchAllVersionsControl.jsx rename to assets/wire/components/SearchAllVersionsControl.tsx diff --git a/assets/wire/components/SearchResultsInfo.jsx b/assets/wire/components/SearchResultsInfo.tsx similarity index 100% rename from assets/wire/components/SearchResultsInfo.jsx rename to assets/wire/components/SearchResultsInfo.tsx diff --git a/assets/wire/components/SearchSidebar.jsx b/assets/wire/components/SearchSidebar.tsx similarity index 100% rename from assets/wire/components/SearchSidebar.jsx rename to assets/wire/components/SearchSidebar.tsx diff --git a/assets/wire/components/SelectedItemsBar.jsx b/assets/wire/components/SelectedItemsBar.tsx similarity index 100% rename from assets/wire/components/SelectedItemsBar.jsx rename to assets/wire/components/SelectedItemsBar.tsx diff --git a/assets/wire/components/WireActionButtons.jsx b/assets/wire/components/WireActionButtons.tsx similarity index 100% rename from assets/wire/components/WireActionButtons.jsx rename to assets/wire/components/WireActionButtons.tsx diff --git a/assets/wire/components/WireApp.jsx b/assets/wire/components/WireApp.tsx similarity index 100% rename from assets/wire/components/WireApp.jsx rename to assets/wire/components/WireApp.tsx diff --git a/assets/wire/components/WireListItem.jsx b/assets/wire/components/WireListItem.tsx similarity index 100% rename from assets/wire/components/WireListItem.jsx rename to assets/wire/components/WireListItem.tsx diff --git a/assets/wire/components/WireListItemDeleted.jsx b/assets/wire/components/WireListItemDeleted.tsx similarity index 100% rename from assets/wire/components/WireListItemDeleted.jsx rename to assets/wire/components/WireListItemDeleted.tsx diff --git a/assets/wire/components/WireListItemIcons.jsx b/assets/wire/components/WireListItemIcons.tsx similarity index 100% rename from assets/wire/components/WireListItemIcons.jsx rename to assets/wire/components/WireListItemIcons.tsx diff --git a/assets/wire/components/WirePreview.jsx b/assets/wire/components/WirePreview.tsx similarity index 100% rename from assets/wire/components/WirePreview.jsx rename to assets/wire/components/WirePreview.tsx diff --git a/assets/wire/components/fields/Authors.jsx b/assets/wire/components/fields/Authors.tsx similarity index 100% rename from assets/wire/components/fields/Authors.jsx rename to assets/wire/components/fields/Authors.tsx diff --git a/assets/wire/components/fields/CharCount.jsx b/assets/wire/components/fields/CharCount.tsx similarity index 100% rename from assets/wire/components/fields/CharCount.jsx rename to assets/wire/components/fields/CharCount.tsx diff --git a/assets/wire/components/fields/Embargo.jsx b/assets/wire/components/fields/Embargo.tsx similarity index 100% rename from assets/wire/components/fields/Embargo.jsx rename to assets/wire/components/fields/Embargo.tsx diff --git a/assets/wire/components/fields/MatchLabel.jsx b/assets/wire/components/fields/MatchLabel.tsx similarity index 100% rename from assets/wire/components/fields/MatchLabel.jsx rename to assets/wire/components/fields/MatchLabel.tsx diff --git a/assets/wire/components/fields/PreviousVersions.jsx b/assets/wire/components/fields/PreviousVersions.tsx similarity index 100% rename from assets/wire/components/fields/PreviousVersions.jsx rename to assets/wire/components/fields/PreviousVersions.tsx diff --git a/assets/wire/components/fields/Source.jsx b/assets/wire/components/fields/Source.tsx similarity index 100% rename from assets/wire/components/fields/Source.jsx rename to assets/wire/components/fields/Source.tsx diff --git a/assets/wire/components/fields/UrgencyLabel.jsx b/assets/wire/components/fields/UrgencyLabel.tsx similarity index 100% rename from assets/wire/components/fields/UrgencyLabel.jsx rename to assets/wire/components/fields/UrgencyLabel.tsx diff --git a/assets/wire/components/fields/VersionCreated.jsx b/assets/wire/components/fields/VersionCreated.tsx similarity index 100% rename from assets/wire/components/fields/VersionCreated.jsx rename to assets/wire/components/fields/VersionCreated.tsx diff --git a/assets/wire/components/fields/VersionType.jsx b/assets/wire/components/fields/VersionType.tsx similarity index 100% rename from assets/wire/components/fields/VersionType.jsx rename to assets/wire/components/fields/VersionType.tsx diff --git a/assets/wire/components/fields/WordCount.jsx b/assets/wire/components/fields/WordCount.tsx similarity index 100% rename from assets/wire/components/fields/WordCount.jsx rename to assets/wire/components/fields/WordCount.tsx diff --git a/assets/wire/components/fields/index.jsx b/assets/wire/components/fields/index.tsx similarity index 100% rename from assets/wire/components/fields/index.jsx rename to assets/wire/components/fields/index.tsx diff --git a/assets/wire/components/filters/FilterButton.jsx b/assets/wire/components/filters/FilterButton.tsx similarity index 100% rename from assets/wire/components/filters/FilterButton.jsx rename to assets/wire/components/filters/FilterButton.tsx diff --git a/assets/wire/components/filters/FilterGroup.jsx b/assets/wire/components/filters/FilterGroup.tsx similarity index 100% rename from assets/wire/components/filters/FilterGroup.jsx rename to assets/wire/components/filters/FilterGroup.tsx diff --git a/assets/wire/components/filters/FilterItem.jsx b/assets/wire/components/filters/FilterItem.tsx similarity index 100% rename from assets/wire/components/filters/FilterItem.jsx rename to assets/wire/components/filters/FilterItem.tsx diff --git a/assets/wire/components/filters/FiltersTab.jsx b/assets/wire/components/filters/FiltersTab.tsx similarity index 100% rename from assets/wire/components/filters/FiltersTab.jsx rename to assets/wire/components/filters/FiltersTab.tsx diff --git a/assets/wire/components/filters/NavCreatedPicker.jsx b/assets/wire/components/filters/NavCreatedPicker.tsx similarity index 100% rename from assets/wire/components/filters/NavCreatedPicker.jsx rename to assets/wire/components/filters/NavCreatedPicker.tsx diff --git a/assets/wire/components/filters/NavGroup.jsx b/assets/wire/components/filters/NavGroup.tsx similarity index 100% rename from assets/wire/components/filters/NavGroup.jsx rename to assets/wire/components/filters/NavGroup.tsx diff --git a/assets/wire/components/filters/NavLink.jsx b/assets/wire/components/filters/NavLink.tsx similarity index 100% rename from assets/wire/components/filters/NavLink.jsx rename to assets/wire/components/filters/NavLink.tsx diff --git a/assets/wire/components/filters/NavigationTab.jsx b/assets/wire/components/filters/NavigationTab.tsx similarity index 100% rename from assets/wire/components/filters/NavigationTab.jsx rename to assets/wire/components/filters/NavigationTab.tsx From 88b5dc749dfbaa2123d93922399e3e60bd715f74 Mon Sep 17 00:00:00 2001 From: Tomas Kikutis Date: Mon, 29 May 2023 17:08:04 +0200 Subject: [PATCH 04/71] js to ts --- assets/{actions.js => actions.ts} | 0 assets/agenda/{actions.js => actions.ts} | 0 assets/agenda/{index.js => index.ts} | 0 assets/agenda/{item-actions.js => item-actions.ts} | 0 assets/agenda/{reducers.js => reducers.ts} | 0 assets/agenda/{selectors.js => selectors.ts} | 0 .../{CoverageItemStatus.spec.js => CoverageItemStatus.spec.ts} | 0 assets/agenda/tests/{utils.spec.js => utils.spec.ts} | 0 assets/agenda/{utils.js => utils.ts} | 0 assets/am-news/{index.js => index.ts} | 0 assets/am-news/{style.js => style.ts} | 0 assets/am-news/{utils.js => utils.ts} | 0 assets/{analytics.js => analytics.ts} | 0 assets/cards/{actions.js => actions.ts} | 0 assets/cards/{index.js => index.ts} | 0 assets/cards/{reducers.js => reducers.ts} | 0 assets/{common.js => common.ts} | 0 assets/companies/{actions.js => actions.ts} | 0 assets/companies/{index.js => index.ts} | 0 assets/companies/{reducers.js => reducers.ts} | 0 assets/companies/{utils.js => utils.ts} | 0 assets/company-admin/{actions.js => actions.ts} | 0 assets/company-admin/{index.js => index.ts} | 0 assets/company-admin/{reducers.js => reducers.ts} | 0 assets/company-admin/{selectors.js => selectors.ts} | 0 assets/company-reports/{actions.js => actions.ts} | 0 assets/company-reports/components/{index.js => index.ts} | 0 assets/company-reports/{index.js => index.ts} | 0 assets/company-reports/{reducers.js => reducers.ts} | 0 assets/company-reports/{utils.js => utils.ts} | 0 assets/components/cards/{utils.js => utils.ts} | 0 assets/{defaults.js => defaults.ts} | 0 assets/{design_pages.js => design_pages.ts} | 0 assets/{domUtils.js => domUtils.ts} | 0 assets/factcheck/{index.js => index.ts} | 0 assets/features/dashboard/{actions.js => actions.ts} | 0 assets/features/dashboard/{reducers.js => reducers.ts} | 0 assets/features/dashboard/{types.js => types.ts} | 0 assets/features/sections/{actions.js => actions.ts} | 0 assets/features/sections/{reducers.js => reducers.ts} | 0 assets/features/sections/{selectors.js => selectors.ts} | 0 assets/features/sections/{types.js => types.ts} | 0 assets/general-settings/{actions.js => actions.ts} | 0 assets/general-settings/{index.js => index.ts} | 0 assets/general-settings/{reducers.js => reducers.ts} | 0 assets/home/{actions.js => actions.ts} | 0 assets/home/{index.js => index.ts} | 0 assets/home/{reducers.js => reducers.ts} | 0 assets/home/{utils.js => utils.ts} | 0 assets/{index.js => index.ts} | 0 assets/{item-actions.js => item-actions.ts} | 0 assets/{local-store.js => local-store.ts} | 0 assets/maps/{utils.js => utils.ts} | 0 assets/market-place/{actions.js => actions.ts} | 0 assets/market-place/{index.js => index.ts} | 0 assets/market-place/{reducers.js => reducers.ts} | 0 assets/media-releases/{index.js => index.ts} | 0 assets/{missing-translations.js => missing-translations.ts} | 0 assets/monitoring/{actions.js => actions.ts} | 0 assets/monitoring/{index.js => index.ts} | 0 assets/monitoring/{reducers.js => reducers.ts} | 0 assets/monitoring/{selectors.js => selectors.ts} | 0 assets/monitoring/{utils.js => utils.ts} | 0 assets/navigations/{index.js => index.ts} | 0 assets/navigations/{utils.js => utils.ts} | 0 assets/news-api/{actions.js => actions.ts} | 0 assets/news-api/{index.js => index.ts} | 0 assets/notifications/{actions.js => actions.ts} | 0 assets/notifications/{index.js => index.ts} | 0 assets/notifications/{reducers.js => reducers.ts} | 0 assets/oauth_clients/{actions.js => actions.ts} | 0 assets/oauth_clients/{index.js => index.ts} | 0 assets/oauth_clients/{reducers.js => reducers.ts} | 0 assets/products/{actions.js => actions.ts} | 0 assets/products/{index.js => index.ts} | 0 assets/products/{reducers.js => reducers.ts} | 0 assets/{reducers.js => reducers.ts} | 0 assets/search/{actions.js => actions.ts} | 0 assets/search/{reducers.js => reducers.ts} | 0 assets/search/{selectors.js => selectors.ts} | 0 assets/search/tests/{actions.spec.js => actions.spec.ts} | 0 assets/search/{utils.js => utils.ts} | 0 assets/section-filters/{actions.js => actions.ts} | 0 assets/section-filters/{index.js => index.ts} | 0 assets/section-filters/{reducers.js => reducers.ts} | 0 assets/{selectors.js => selectors.ts} | 0 assets/{server.js => server.ts} | 0 assets/{style.js => style.ts} | 0 assets/{tests.js => tests.ts} | 0 assets/tests/{TextInput.spec.js => TextInput.spec.ts} | 0 assets/tests/{reducers.spec.js => reducers.spec.ts} | 0 assets/tests/{setup.js => setup.ts} | 0 assets/tests/{utils.spec.js => utils.spec.ts} | 0 assets/topics/{actions.js => actions.ts} | 0 assets/topics/{reducer.js => reducer.ts} | 0 assets/topics/{utils.js => utils.ts} | 0 assets/ui/{selectors.js => selectors.ts} | 0 assets/ui/{utils.spec.js => utils.spec.ts} | 0 assets/ui/{utils.js => utils.ts} | 0 assets/user-profile/{actions.js => actions.ts} | 0 assets/user-profile/{index.js => index.ts} | 0 assets/user-profile/{reducers.js => reducers.ts} | 0 assets/user-profile/{selectors.js => selectors.ts} | 0 assets/user-profile/{store.js => store.ts} | 0 assets/user-profile/{style.js => style.ts} | 0 assets/users/{actions.js => actions.ts} | 0 assets/users/{index.js => index.ts} | 0 assets/users/{reducers.js => reducers.ts} | 0 assets/users/{selectors.js => selectors.ts} | 0 assets/users/tests/{actions.spec.js => actions.spec.ts} | 0 assets/users/{utils.js => utils.ts} | 0 assets/{utils.js => utils.ts} | 0 assets/{websocket.js => websocket.ts} | 0 assets/wire/{actions.js => actions.ts} | 0 assets/wire/{defaults.js => defaults.ts} | 0 assets/wire/{index.js => index.ts} | 0 assets/wire/{item-actions.js => item-actions.ts} | 0 assets/wire/{reducers.js => reducers.ts} | 0 assets/wire/tests/{WireApp.spec.js => WireApp.spec.ts} | 0 assets/wire/tests/{actions.spec.js => actions.spec.ts} | 0 assets/wire/tests/{utils.spec.js => utils.spec.ts} | 0 assets/wire/{types.js => types.ts} | 0 assets/wire/{utils.js => utils.ts} | 0 123 files changed, 0 insertions(+), 0 deletions(-) rename assets/{actions.js => actions.ts} (100%) rename assets/agenda/{actions.js => actions.ts} (100%) rename assets/agenda/{index.js => index.ts} (100%) rename assets/agenda/{item-actions.js => item-actions.ts} (100%) rename assets/agenda/{reducers.js => reducers.ts} (100%) rename assets/agenda/{selectors.js => selectors.ts} (100%) rename assets/agenda/tests/{CoverageItemStatus.spec.js => CoverageItemStatus.spec.ts} (100%) rename assets/agenda/tests/{utils.spec.js => utils.spec.ts} (100%) rename assets/agenda/{utils.js => utils.ts} (100%) rename assets/am-news/{index.js => index.ts} (100%) rename assets/am-news/{style.js => style.ts} (100%) rename assets/am-news/{utils.js => utils.ts} (100%) rename assets/{analytics.js => analytics.ts} (100%) rename assets/cards/{actions.js => actions.ts} (100%) rename assets/cards/{index.js => index.ts} (100%) rename assets/cards/{reducers.js => reducers.ts} (100%) rename assets/{common.js => common.ts} (100%) rename assets/companies/{actions.js => actions.ts} (100%) rename assets/companies/{index.js => index.ts} (100%) rename assets/companies/{reducers.js => reducers.ts} (100%) rename assets/companies/{utils.js => utils.ts} (100%) rename assets/company-admin/{actions.js => actions.ts} (100%) rename assets/company-admin/{index.js => index.ts} (100%) rename assets/company-admin/{reducers.js => reducers.ts} (100%) rename assets/company-admin/{selectors.js => selectors.ts} (100%) rename assets/company-reports/{actions.js => actions.ts} (100%) rename assets/company-reports/components/{index.js => index.ts} (100%) rename assets/company-reports/{index.js => index.ts} (100%) rename assets/company-reports/{reducers.js => reducers.ts} (100%) rename assets/company-reports/{utils.js => utils.ts} (100%) rename assets/components/cards/{utils.js => utils.ts} (100%) rename assets/{defaults.js => defaults.ts} (100%) rename assets/{design_pages.js => design_pages.ts} (100%) rename assets/{domUtils.js => domUtils.ts} (100%) rename assets/factcheck/{index.js => index.ts} (100%) rename assets/features/dashboard/{actions.js => actions.ts} (100%) rename assets/features/dashboard/{reducers.js => reducers.ts} (100%) rename assets/features/dashboard/{types.js => types.ts} (100%) rename assets/features/sections/{actions.js => actions.ts} (100%) rename assets/features/sections/{reducers.js => reducers.ts} (100%) rename assets/features/sections/{selectors.js => selectors.ts} (100%) rename assets/features/sections/{types.js => types.ts} (100%) rename assets/general-settings/{actions.js => actions.ts} (100%) rename assets/general-settings/{index.js => index.ts} (100%) rename assets/general-settings/{reducers.js => reducers.ts} (100%) rename assets/home/{actions.js => actions.ts} (100%) rename assets/home/{index.js => index.ts} (100%) rename assets/home/{reducers.js => reducers.ts} (100%) rename assets/home/{utils.js => utils.ts} (100%) rename assets/{index.js => index.ts} (100%) rename assets/{item-actions.js => item-actions.ts} (100%) rename assets/{local-store.js => local-store.ts} (100%) rename assets/maps/{utils.js => utils.ts} (100%) rename assets/market-place/{actions.js => actions.ts} (100%) rename assets/market-place/{index.js => index.ts} (100%) rename assets/market-place/{reducers.js => reducers.ts} (100%) rename assets/media-releases/{index.js => index.ts} (100%) rename assets/{missing-translations.js => missing-translations.ts} (100%) rename assets/monitoring/{actions.js => actions.ts} (100%) rename assets/monitoring/{index.js => index.ts} (100%) rename assets/monitoring/{reducers.js => reducers.ts} (100%) rename assets/monitoring/{selectors.js => selectors.ts} (100%) rename assets/monitoring/{utils.js => utils.ts} (100%) rename assets/navigations/{index.js => index.ts} (100%) rename assets/navigations/{utils.js => utils.ts} (100%) rename assets/news-api/{actions.js => actions.ts} (100%) rename assets/news-api/{index.js => index.ts} (100%) rename assets/notifications/{actions.js => actions.ts} (100%) rename assets/notifications/{index.js => index.ts} (100%) rename assets/notifications/{reducers.js => reducers.ts} (100%) rename assets/oauth_clients/{actions.js => actions.ts} (100%) rename assets/oauth_clients/{index.js => index.ts} (100%) rename assets/oauth_clients/{reducers.js => reducers.ts} (100%) rename assets/products/{actions.js => actions.ts} (100%) rename assets/products/{index.js => index.ts} (100%) rename assets/products/{reducers.js => reducers.ts} (100%) rename assets/{reducers.js => reducers.ts} (100%) rename assets/search/{actions.js => actions.ts} (100%) rename assets/search/{reducers.js => reducers.ts} (100%) rename assets/search/{selectors.js => selectors.ts} (100%) rename assets/search/tests/{actions.spec.js => actions.spec.ts} (100%) rename assets/search/{utils.js => utils.ts} (100%) rename assets/section-filters/{actions.js => actions.ts} (100%) rename assets/section-filters/{index.js => index.ts} (100%) rename assets/section-filters/{reducers.js => reducers.ts} (100%) rename assets/{selectors.js => selectors.ts} (100%) rename assets/{server.js => server.ts} (100%) rename assets/{style.js => style.ts} (100%) rename assets/{tests.js => tests.ts} (100%) rename assets/tests/{TextInput.spec.js => TextInput.spec.ts} (100%) rename assets/tests/{reducers.spec.js => reducers.spec.ts} (100%) rename assets/tests/{setup.js => setup.ts} (100%) rename assets/tests/{utils.spec.js => utils.spec.ts} (100%) rename assets/topics/{actions.js => actions.ts} (100%) rename assets/topics/{reducer.js => reducer.ts} (100%) rename assets/topics/{utils.js => utils.ts} (100%) rename assets/ui/{selectors.js => selectors.ts} (100%) rename assets/ui/{utils.spec.js => utils.spec.ts} (100%) rename assets/ui/{utils.js => utils.ts} (100%) rename assets/user-profile/{actions.js => actions.ts} (100%) rename assets/user-profile/{index.js => index.ts} (100%) rename assets/user-profile/{reducers.js => reducers.ts} (100%) rename assets/user-profile/{selectors.js => selectors.ts} (100%) rename assets/user-profile/{store.js => store.ts} (100%) rename assets/user-profile/{style.js => style.ts} (100%) rename assets/users/{actions.js => actions.ts} (100%) rename assets/users/{index.js => index.ts} (100%) rename assets/users/{reducers.js => reducers.ts} (100%) rename assets/users/{selectors.js => selectors.ts} (100%) rename assets/users/tests/{actions.spec.js => actions.spec.ts} (100%) rename assets/users/{utils.js => utils.ts} (100%) rename assets/{utils.js => utils.ts} (100%) rename assets/{websocket.js => websocket.ts} (100%) rename assets/wire/{actions.js => actions.ts} (100%) rename assets/wire/{defaults.js => defaults.ts} (100%) rename assets/wire/{index.js => index.ts} (100%) rename assets/wire/{item-actions.js => item-actions.ts} (100%) rename assets/wire/{reducers.js => reducers.ts} (100%) rename assets/wire/tests/{WireApp.spec.js => WireApp.spec.ts} (100%) rename assets/wire/tests/{actions.spec.js => actions.spec.ts} (100%) rename assets/wire/tests/{utils.spec.js => utils.spec.ts} (100%) rename assets/wire/{types.js => types.ts} (100%) rename assets/wire/{utils.js => utils.ts} (100%) diff --git a/assets/actions.js b/assets/actions.ts similarity index 100% rename from assets/actions.js rename to assets/actions.ts diff --git a/assets/agenda/actions.js b/assets/agenda/actions.ts similarity index 100% rename from assets/agenda/actions.js rename to assets/agenda/actions.ts diff --git a/assets/agenda/index.js b/assets/agenda/index.ts similarity index 100% rename from assets/agenda/index.js rename to assets/agenda/index.ts diff --git a/assets/agenda/item-actions.js b/assets/agenda/item-actions.ts similarity index 100% rename from assets/agenda/item-actions.js rename to assets/agenda/item-actions.ts diff --git a/assets/agenda/reducers.js b/assets/agenda/reducers.ts similarity index 100% rename from assets/agenda/reducers.js rename to assets/agenda/reducers.ts diff --git a/assets/agenda/selectors.js b/assets/agenda/selectors.ts similarity index 100% rename from assets/agenda/selectors.js rename to assets/agenda/selectors.ts diff --git a/assets/agenda/tests/CoverageItemStatus.spec.js b/assets/agenda/tests/CoverageItemStatus.spec.ts similarity index 100% rename from assets/agenda/tests/CoverageItemStatus.spec.js rename to assets/agenda/tests/CoverageItemStatus.spec.ts diff --git a/assets/agenda/tests/utils.spec.js b/assets/agenda/tests/utils.spec.ts similarity index 100% rename from assets/agenda/tests/utils.spec.js rename to assets/agenda/tests/utils.spec.ts diff --git a/assets/agenda/utils.js b/assets/agenda/utils.ts similarity index 100% rename from assets/agenda/utils.js rename to assets/agenda/utils.ts diff --git a/assets/am-news/index.js b/assets/am-news/index.ts similarity index 100% rename from assets/am-news/index.js rename to assets/am-news/index.ts diff --git a/assets/am-news/style.js b/assets/am-news/style.ts similarity index 100% rename from assets/am-news/style.js rename to assets/am-news/style.ts diff --git a/assets/am-news/utils.js b/assets/am-news/utils.ts similarity index 100% rename from assets/am-news/utils.js rename to assets/am-news/utils.ts diff --git a/assets/analytics.js b/assets/analytics.ts similarity index 100% rename from assets/analytics.js rename to assets/analytics.ts diff --git a/assets/cards/actions.js b/assets/cards/actions.ts similarity index 100% rename from assets/cards/actions.js rename to assets/cards/actions.ts diff --git a/assets/cards/index.js b/assets/cards/index.ts similarity index 100% rename from assets/cards/index.js rename to assets/cards/index.ts diff --git a/assets/cards/reducers.js b/assets/cards/reducers.ts similarity index 100% rename from assets/cards/reducers.js rename to assets/cards/reducers.ts diff --git a/assets/common.js b/assets/common.ts similarity index 100% rename from assets/common.js rename to assets/common.ts diff --git a/assets/companies/actions.js b/assets/companies/actions.ts similarity index 100% rename from assets/companies/actions.js rename to assets/companies/actions.ts diff --git a/assets/companies/index.js b/assets/companies/index.ts similarity index 100% rename from assets/companies/index.js rename to assets/companies/index.ts diff --git a/assets/companies/reducers.js b/assets/companies/reducers.ts similarity index 100% rename from assets/companies/reducers.js rename to assets/companies/reducers.ts diff --git a/assets/companies/utils.js b/assets/companies/utils.ts similarity index 100% rename from assets/companies/utils.js rename to assets/companies/utils.ts diff --git a/assets/company-admin/actions.js b/assets/company-admin/actions.ts similarity index 100% rename from assets/company-admin/actions.js rename to assets/company-admin/actions.ts diff --git a/assets/company-admin/index.js b/assets/company-admin/index.ts similarity index 100% rename from assets/company-admin/index.js rename to assets/company-admin/index.ts diff --git a/assets/company-admin/reducers.js b/assets/company-admin/reducers.ts similarity index 100% rename from assets/company-admin/reducers.js rename to assets/company-admin/reducers.ts diff --git a/assets/company-admin/selectors.js b/assets/company-admin/selectors.ts similarity index 100% rename from assets/company-admin/selectors.js rename to assets/company-admin/selectors.ts diff --git a/assets/company-reports/actions.js b/assets/company-reports/actions.ts similarity index 100% rename from assets/company-reports/actions.js rename to assets/company-reports/actions.ts diff --git a/assets/company-reports/components/index.js b/assets/company-reports/components/index.ts similarity index 100% rename from assets/company-reports/components/index.js rename to assets/company-reports/components/index.ts diff --git a/assets/company-reports/index.js b/assets/company-reports/index.ts similarity index 100% rename from assets/company-reports/index.js rename to assets/company-reports/index.ts diff --git a/assets/company-reports/reducers.js b/assets/company-reports/reducers.ts similarity index 100% rename from assets/company-reports/reducers.js rename to assets/company-reports/reducers.ts diff --git a/assets/company-reports/utils.js b/assets/company-reports/utils.ts similarity index 100% rename from assets/company-reports/utils.js rename to assets/company-reports/utils.ts diff --git a/assets/components/cards/utils.js b/assets/components/cards/utils.ts similarity index 100% rename from assets/components/cards/utils.js rename to assets/components/cards/utils.ts diff --git a/assets/defaults.js b/assets/defaults.ts similarity index 100% rename from assets/defaults.js rename to assets/defaults.ts diff --git a/assets/design_pages.js b/assets/design_pages.ts similarity index 100% rename from assets/design_pages.js rename to assets/design_pages.ts diff --git a/assets/domUtils.js b/assets/domUtils.ts similarity index 100% rename from assets/domUtils.js rename to assets/domUtils.ts diff --git a/assets/factcheck/index.js b/assets/factcheck/index.ts similarity index 100% rename from assets/factcheck/index.js rename to assets/factcheck/index.ts diff --git a/assets/features/dashboard/actions.js b/assets/features/dashboard/actions.ts similarity index 100% rename from assets/features/dashboard/actions.js rename to assets/features/dashboard/actions.ts diff --git a/assets/features/dashboard/reducers.js b/assets/features/dashboard/reducers.ts similarity index 100% rename from assets/features/dashboard/reducers.js rename to assets/features/dashboard/reducers.ts diff --git a/assets/features/dashboard/types.js b/assets/features/dashboard/types.ts similarity index 100% rename from assets/features/dashboard/types.js rename to assets/features/dashboard/types.ts diff --git a/assets/features/sections/actions.js b/assets/features/sections/actions.ts similarity index 100% rename from assets/features/sections/actions.js rename to assets/features/sections/actions.ts diff --git a/assets/features/sections/reducers.js b/assets/features/sections/reducers.ts similarity index 100% rename from assets/features/sections/reducers.js rename to assets/features/sections/reducers.ts diff --git a/assets/features/sections/selectors.js b/assets/features/sections/selectors.ts similarity index 100% rename from assets/features/sections/selectors.js rename to assets/features/sections/selectors.ts diff --git a/assets/features/sections/types.js b/assets/features/sections/types.ts similarity index 100% rename from assets/features/sections/types.js rename to assets/features/sections/types.ts diff --git a/assets/general-settings/actions.js b/assets/general-settings/actions.ts similarity index 100% rename from assets/general-settings/actions.js rename to assets/general-settings/actions.ts diff --git a/assets/general-settings/index.js b/assets/general-settings/index.ts similarity index 100% rename from assets/general-settings/index.js rename to assets/general-settings/index.ts diff --git a/assets/general-settings/reducers.js b/assets/general-settings/reducers.ts similarity index 100% rename from assets/general-settings/reducers.js rename to assets/general-settings/reducers.ts diff --git a/assets/home/actions.js b/assets/home/actions.ts similarity index 100% rename from assets/home/actions.js rename to assets/home/actions.ts diff --git a/assets/home/index.js b/assets/home/index.ts similarity index 100% rename from assets/home/index.js rename to assets/home/index.ts diff --git a/assets/home/reducers.js b/assets/home/reducers.ts similarity index 100% rename from assets/home/reducers.js rename to assets/home/reducers.ts diff --git a/assets/home/utils.js b/assets/home/utils.ts similarity index 100% rename from assets/home/utils.js rename to assets/home/utils.ts diff --git a/assets/index.js b/assets/index.ts similarity index 100% rename from assets/index.js rename to assets/index.ts diff --git a/assets/item-actions.js b/assets/item-actions.ts similarity index 100% rename from assets/item-actions.js rename to assets/item-actions.ts diff --git a/assets/local-store.js b/assets/local-store.ts similarity index 100% rename from assets/local-store.js rename to assets/local-store.ts diff --git a/assets/maps/utils.js b/assets/maps/utils.ts similarity index 100% rename from assets/maps/utils.js rename to assets/maps/utils.ts diff --git a/assets/market-place/actions.js b/assets/market-place/actions.ts similarity index 100% rename from assets/market-place/actions.js rename to assets/market-place/actions.ts diff --git a/assets/market-place/index.js b/assets/market-place/index.ts similarity index 100% rename from assets/market-place/index.js rename to assets/market-place/index.ts diff --git a/assets/market-place/reducers.js b/assets/market-place/reducers.ts similarity index 100% rename from assets/market-place/reducers.js rename to assets/market-place/reducers.ts diff --git a/assets/media-releases/index.js b/assets/media-releases/index.ts similarity index 100% rename from assets/media-releases/index.js rename to assets/media-releases/index.ts diff --git a/assets/missing-translations.js b/assets/missing-translations.ts similarity index 100% rename from assets/missing-translations.js rename to assets/missing-translations.ts diff --git a/assets/monitoring/actions.js b/assets/monitoring/actions.ts similarity index 100% rename from assets/monitoring/actions.js rename to assets/monitoring/actions.ts diff --git a/assets/monitoring/index.js b/assets/monitoring/index.ts similarity index 100% rename from assets/monitoring/index.js rename to assets/monitoring/index.ts diff --git a/assets/monitoring/reducers.js b/assets/monitoring/reducers.ts similarity index 100% rename from assets/monitoring/reducers.js rename to assets/monitoring/reducers.ts diff --git a/assets/monitoring/selectors.js b/assets/monitoring/selectors.ts similarity index 100% rename from assets/monitoring/selectors.js rename to assets/monitoring/selectors.ts diff --git a/assets/monitoring/utils.js b/assets/monitoring/utils.ts similarity index 100% rename from assets/monitoring/utils.js rename to assets/monitoring/utils.ts diff --git a/assets/navigations/index.js b/assets/navigations/index.ts similarity index 100% rename from assets/navigations/index.js rename to assets/navigations/index.ts diff --git a/assets/navigations/utils.js b/assets/navigations/utils.ts similarity index 100% rename from assets/navigations/utils.js rename to assets/navigations/utils.ts diff --git a/assets/news-api/actions.js b/assets/news-api/actions.ts similarity index 100% rename from assets/news-api/actions.js rename to assets/news-api/actions.ts diff --git a/assets/news-api/index.js b/assets/news-api/index.ts similarity index 100% rename from assets/news-api/index.js rename to assets/news-api/index.ts diff --git a/assets/notifications/actions.js b/assets/notifications/actions.ts similarity index 100% rename from assets/notifications/actions.js rename to assets/notifications/actions.ts diff --git a/assets/notifications/index.js b/assets/notifications/index.ts similarity index 100% rename from assets/notifications/index.js rename to assets/notifications/index.ts diff --git a/assets/notifications/reducers.js b/assets/notifications/reducers.ts similarity index 100% rename from assets/notifications/reducers.js rename to assets/notifications/reducers.ts diff --git a/assets/oauth_clients/actions.js b/assets/oauth_clients/actions.ts similarity index 100% rename from assets/oauth_clients/actions.js rename to assets/oauth_clients/actions.ts diff --git a/assets/oauth_clients/index.js b/assets/oauth_clients/index.ts similarity index 100% rename from assets/oauth_clients/index.js rename to assets/oauth_clients/index.ts diff --git a/assets/oauth_clients/reducers.js b/assets/oauth_clients/reducers.ts similarity index 100% rename from assets/oauth_clients/reducers.js rename to assets/oauth_clients/reducers.ts diff --git a/assets/products/actions.js b/assets/products/actions.ts similarity index 100% rename from assets/products/actions.js rename to assets/products/actions.ts diff --git a/assets/products/index.js b/assets/products/index.ts similarity index 100% rename from assets/products/index.js rename to assets/products/index.ts diff --git a/assets/products/reducers.js b/assets/products/reducers.ts similarity index 100% rename from assets/products/reducers.js rename to assets/products/reducers.ts diff --git a/assets/reducers.js b/assets/reducers.ts similarity index 100% rename from assets/reducers.js rename to assets/reducers.ts diff --git a/assets/search/actions.js b/assets/search/actions.ts similarity index 100% rename from assets/search/actions.js rename to assets/search/actions.ts diff --git a/assets/search/reducers.js b/assets/search/reducers.ts similarity index 100% rename from assets/search/reducers.js rename to assets/search/reducers.ts diff --git a/assets/search/selectors.js b/assets/search/selectors.ts similarity index 100% rename from assets/search/selectors.js rename to assets/search/selectors.ts diff --git a/assets/search/tests/actions.spec.js b/assets/search/tests/actions.spec.ts similarity index 100% rename from assets/search/tests/actions.spec.js rename to assets/search/tests/actions.spec.ts diff --git a/assets/search/utils.js b/assets/search/utils.ts similarity index 100% rename from assets/search/utils.js rename to assets/search/utils.ts diff --git a/assets/section-filters/actions.js b/assets/section-filters/actions.ts similarity index 100% rename from assets/section-filters/actions.js rename to assets/section-filters/actions.ts diff --git a/assets/section-filters/index.js b/assets/section-filters/index.ts similarity index 100% rename from assets/section-filters/index.js rename to assets/section-filters/index.ts diff --git a/assets/section-filters/reducers.js b/assets/section-filters/reducers.ts similarity index 100% rename from assets/section-filters/reducers.js rename to assets/section-filters/reducers.ts diff --git a/assets/selectors.js b/assets/selectors.ts similarity index 100% rename from assets/selectors.js rename to assets/selectors.ts diff --git a/assets/server.js b/assets/server.ts similarity index 100% rename from assets/server.js rename to assets/server.ts diff --git a/assets/style.js b/assets/style.ts similarity index 100% rename from assets/style.js rename to assets/style.ts diff --git a/assets/tests.js b/assets/tests.ts similarity index 100% rename from assets/tests.js rename to assets/tests.ts diff --git a/assets/tests/TextInput.spec.js b/assets/tests/TextInput.spec.ts similarity index 100% rename from assets/tests/TextInput.spec.js rename to assets/tests/TextInput.spec.ts diff --git a/assets/tests/reducers.spec.js b/assets/tests/reducers.spec.ts similarity index 100% rename from assets/tests/reducers.spec.js rename to assets/tests/reducers.spec.ts diff --git a/assets/tests/setup.js b/assets/tests/setup.ts similarity index 100% rename from assets/tests/setup.js rename to assets/tests/setup.ts diff --git a/assets/tests/utils.spec.js b/assets/tests/utils.spec.ts similarity index 100% rename from assets/tests/utils.spec.js rename to assets/tests/utils.spec.ts diff --git a/assets/topics/actions.js b/assets/topics/actions.ts similarity index 100% rename from assets/topics/actions.js rename to assets/topics/actions.ts diff --git a/assets/topics/reducer.js b/assets/topics/reducer.ts similarity index 100% rename from assets/topics/reducer.js rename to assets/topics/reducer.ts diff --git a/assets/topics/utils.js b/assets/topics/utils.ts similarity index 100% rename from assets/topics/utils.js rename to assets/topics/utils.ts diff --git a/assets/ui/selectors.js b/assets/ui/selectors.ts similarity index 100% rename from assets/ui/selectors.js rename to assets/ui/selectors.ts diff --git a/assets/ui/utils.spec.js b/assets/ui/utils.spec.ts similarity index 100% rename from assets/ui/utils.spec.js rename to assets/ui/utils.spec.ts diff --git a/assets/ui/utils.js b/assets/ui/utils.ts similarity index 100% rename from assets/ui/utils.js rename to assets/ui/utils.ts diff --git a/assets/user-profile/actions.js b/assets/user-profile/actions.ts similarity index 100% rename from assets/user-profile/actions.js rename to assets/user-profile/actions.ts diff --git a/assets/user-profile/index.js b/assets/user-profile/index.ts similarity index 100% rename from assets/user-profile/index.js rename to assets/user-profile/index.ts diff --git a/assets/user-profile/reducers.js b/assets/user-profile/reducers.ts similarity index 100% rename from assets/user-profile/reducers.js rename to assets/user-profile/reducers.ts diff --git a/assets/user-profile/selectors.js b/assets/user-profile/selectors.ts similarity index 100% rename from assets/user-profile/selectors.js rename to assets/user-profile/selectors.ts diff --git a/assets/user-profile/store.js b/assets/user-profile/store.ts similarity index 100% rename from assets/user-profile/store.js rename to assets/user-profile/store.ts diff --git a/assets/user-profile/style.js b/assets/user-profile/style.ts similarity index 100% rename from assets/user-profile/style.js rename to assets/user-profile/style.ts diff --git a/assets/users/actions.js b/assets/users/actions.ts similarity index 100% rename from assets/users/actions.js rename to assets/users/actions.ts diff --git a/assets/users/index.js b/assets/users/index.ts similarity index 100% rename from assets/users/index.js rename to assets/users/index.ts diff --git a/assets/users/reducers.js b/assets/users/reducers.ts similarity index 100% rename from assets/users/reducers.js rename to assets/users/reducers.ts diff --git a/assets/users/selectors.js b/assets/users/selectors.ts similarity index 100% rename from assets/users/selectors.js rename to assets/users/selectors.ts diff --git a/assets/users/tests/actions.spec.js b/assets/users/tests/actions.spec.ts similarity index 100% rename from assets/users/tests/actions.spec.js rename to assets/users/tests/actions.spec.ts diff --git a/assets/users/utils.js b/assets/users/utils.ts similarity index 100% rename from assets/users/utils.js rename to assets/users/utils.ts diff --git a/assets/utils.js b/assets/utils.ts similarity index 100% rename from assets/utils.js rename to assets/utils.ts diff --git a/assets/websocket.js b/assets/websocket.ts similarity index 100% rename from assets/websocket.js rename to assets/websocket.ts diff --git a/assets/wire/actions.js b/assets/wire/actions.ts similarity index 100% rename from assets/wire/actions.js rename to assets/wire/actions.ts diff --git a/assets/wire/defaults.js b/assets/wire/defaults.ts similarity index 100% rename from assets/wire/defaults.js rename to assets/wire/defaults.ts diff --git a/assets/wire/index.js b/assets/wire/index.ts similarity index 100% rename from assets/wire/index.js rename to assets/wire/index.ts diff --git a/assets/wire/item-actions.js b/assets/wire/item-actions.ts similarity index 100% rename from assets/wire/item-actions.js rename to assets/wire/item-actions.ts diff --git a/assets/wire/reducers.js b/assets/wire/reducers.ts similarity index 100% rename from assets/wire/reducers.js rename to assets/wire/reducers.ts diff --git a/assets/wire/tests/WireApp.spec.js b/assets/wire/tests/WireApp.spec.ts similarity index 100% rename from assets/wire/tests/WireApp.spec.js rename to assets/wire/tests/WireApp.spec.ts diff --git a/assets/wire/tests/actions.spec.js b/assets/wire/tests/actions.spec.ts similarity index 100% rename from assets/wire/tests/actions.spec.js rename to assets/wire/tests/actions.spec.ts diff --git a/assets/wire/tests/utils.spec.js b/assets/wire/tests/utils.spec.ts similarity index 100% rename from assets/wire/tests/utils.spec.js rename to assets/wire/tests/utils.spec.ts diff --git a/assets/wire/types.js b/assets/wire/types.ts similarity index 100% rename from assets/wire/types.js rename to assets/wire/types.ts diff --git a/assets/wire/utils.js b/assets/wire/utils.ts similarity index 100% rename from assets/wire/utils.js rename to assets/wire/utils.ts From aec26ce5896213141f1c26d619a50f263a48d106 Mon Sep 17 00:00:00 2001 From: Tomas Kikutis Date: Mon, 29 May 2023 17:20:45 +0200 Subject: [PATCH 05/71] builds after rename to ts/tsx --- .../components/AgendaListViewControls.tsx | 4 +- assets/{utils.ts => utils.tsx} | 0 package-lock.json | 6 +-- package.json | 2 +- webpack.config.js | 52 +++++++++---------- 5 files changed, 32 insertions(+), 32 deletions(-) rename assets/{utils.ts => utils.tsx} (100%) diff --git a/assets/agenda/components/AgendaListViewControls.tsx b/assets/agenda/components/AgendaListViewControls.tsx index 1f0454197..85cbd6b28 100644 --- a/assets/agenda/components/AgendaListViewControls.tsx +++ b/assets/agenda/components/AgendaListViewControls.tsx @@ -1,14 +1,14 @@ import React from 'react'; import PropTypes from 'prop-types'; -import AgendaFeaturedStoriesToogle from './AgendaFeaturedStoriesToogle.jsx'; +import AgendaFeaturedStoriesToogle from './AgendaFeaturedStoriesToogle'; import {DISPLAY_AGENDA_FEATURED_STORIES_ONLY} from 'utils'; import ListViewOptions from 'components/ListViewOptions'; function AgendaListViewControls({activeView, setView, hideFeaturedToggle, toggleFeaturedFilter, featuredFilter, hasAgendaFeaturedItems}) { return(
- {!hideFeaturedToggle && hasAgendaFeaturedItems && DISPLAY_AGENDA_FEATURED_STORIES_ONLY && + {!hideFeaturedToggle && hasAgendaFeaturedItems && DISPLAY_AGENDA_FEATURED_STORIES_ONLY && } diff --git a/assets/utils.ts b/assets/utils.tsx similarity index 100% rename from assets/utils.ts rename to assets/utils.tsx diff --git a/package-lock.json b/package-lock.json index 5abf7972e..6ceebb287 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10837,9 +10837,9 @@ "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==" }, "typescript": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz", - "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true }, "uglify-js": { diff --git a/package.json b/package.json index 1f5e05dc4..14406cf2a 100644 --- a/package.json +++ b/package.json @@ -71,6 +71,6 @@ "react-test-renderer": "^16.14.0", "sinon": "^4.0.0", "ts-loader": "^3.5.0", - "typescript": "^5.0.4" + "typescript": "^4.9.5" } } diff --git a/webpack.config.js b/webpack.config.js index 66fe8fefe..6e7e82e9b 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -7,32 +7,32 @@ const TerserPlugin = require('terser-webpack-plugin-legacy'); const config = { entry: { - newsroom_js: path.resolve(__dirname, 'assets/index.js'), - companies_js: path.resolve(__dirname, 'assets/companies/index.js'), - oauth_clients_js: path.resolve(__dirname, 'assets/oauth_clients/index.js'), - users_js: path.resolve(__dirname, 'assets/users/index.js'), - products_js: path.resolve(__dirname, 'assets/products/index.js'), - 'section-filters_js': path.resolve(__dirname, 'assets/section-filters/index.js'), - navigations_js: path.resolve(__dirname, 'assets/navigations/index.js'), - cards_js: path.resolve(__dirname, 'assets/cards/index.js'), - user_profile_js: path.resolve(__dirname, 'assets/user-profile/index.js'), - newsroom_css: path.resolve(__dirname, 'assets/style.js'), - wire_js: path.resolve(__dirname, 'assets/wire/index.js'), - home_js: path.resolve(__dirname, 'assets/home/index.js'), - agenda_js: path.resolve(__dirname, 'assets/agenda/index.js'), - notifications_js: path.resolve(__dirname, 'assets/notifications/index.js'), - company_reports_js: path.resolve(__dirname, 'assets/company-reports/index.js'), - print_reports_js: path.resolve(__dirname, 'assets/company-reports/components/index.js'), - am_news_js: path.resolve(__dirname, 'assets/am-news/index.js'), - am_news_css: path.resolve(__dirname, 'assets/am-news/style.js'), - 'general-settings_js': path.resolve(__dirname, 'assets/general-settings/index.js'), - market_place_js: path.resolve(__dirname, 'assets/market-place/index.js'), - media_releases_js: path.resolve(__dirname, 'assets/media-releases/index.js'), - monitoring_js: path.resolve(__dirname, 'assets/monitoring/index.js'), - factcheck_js: path.resolve(__dirname, 'assets/factcheck/index.js'), - common: path.resolve(__dirname, 'assets/common.js'), - design_js: path.resolve(__dirname, 'assets/design_pages.js'), - company_admin_js: path.resolve(__dirname, 'assets/company-admin/index.js'), + newsroom_ts: path.resolve(__dirname, 'assets/index.ts'), + companies_ts: path.resolve(__dirname, 'assets/companies/index.ts'), + oauth_clients_ts: path.resolve(__dirname, 'assets/oauth_clients/index.ts'), + users_ts: path.resolve(__dirname, 'assets/users/index.ts'), + products_ts: path.resolve(__dirname, 'assets/products/index.ts'), + 'section-filters_ts': path.resolve(__dirname, 'assets/section-filters/index.ts'), + navigations_ts: path.resolve(__dirname, 'assets/navigations/index.ts'), + cards_ts: path.resolve(__dirname, 'assets/cards/index.ts'), + user_profile_ts: path.resolve(__dirname, 'assets/user-profile/index.ts'), + newsroom_css: path.resolve(__dirname, 'assets/style.ts'), + wire_ts: path.resolve(__dirname, 'assets/wire/index.ts'), + home_ts: path.resolve(__dirname, 'assets/home/index.ts'), + agenda_ts: path.resolve(__dirname, 'assets/agenda/index.ts'), + notifications_ts: path.resolve(__dirname, 'assets/notifications/index.ts'), + company_reports_ts: path.resolve(__dirname, 'assets/company-reports/index.ts'), + print_reports_ts: path.resolve(__dirname, 'assets/company-reports/components/index.ts'), + am_news_ts: path.resolve(__dirname, 'assets/am-news/index.ts'), + am_news_css: path.resolve(__dirname, 'assets/am-news/style.ts'), + 'general-settings_ts': path.resolve(__dirname, 'assets/general-settings/index.ts'), + market_place_ts: path.resolve(__dirname, 'assets/market-place/index.ts'), + media_releases_ts: path.resolve(__dirname, 'assets/media-releases/index.ts'), + monitoring_ts: path.resolve(__dirname, 'assets/monitoring/index.ts'), + factcheck_ts: path.resolve(__dirname, 'assets/factcheck/index.ts'), + common: path.resolve(__dirname, 'assets/common.ts'), + design_ts: path.resolve(__dirname, 'assets/design_pages.ts'), + company_admin_ts: path.resolve(__dirname, 'assets/company-admin/index.ts'), }, output: { path: path.resolve(process.cwd(), 'dist'), From 6141db3a2c3dddc36ace727f85932858ac75418f Mon Sep 17 00:00:00 2001 From: Tomas Kikutis Date: Mon, 29 May 2023 17:23:56 +0200 Subject: [PATCH 06/71] missing renames jsx is used inside, but extension was js --- .../{CoverageItemStatus.spec.ts => CoverageItemStatus.spec.tsx} | 0 assets/tests/{TextInput.spec.ts => TextInput.spec.tsx} | 0 assets/wire/tests/{WireApp.spec.ts => WireApp.spec.tsx} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename assets/agenda/tests/{CoverageItemStatus.spec.ts => CoverageItemStatus.spec.tsx} (100%) rename assets/tests/{TextInput.spec.ts => TextInput.spec.tsx} (100%) rename assets/wire/tests/{WireApp.spec.ts => WireApp.spec.tsx} (100%) diff --git a/assets/agenda/tests/CoverageItemStatus.spec.ts b/assets/agenda/tests/CoverageItemStatus.spec.tsx similarity index 100% rename from assets/agenda/tests/CoverageItemStatus.spec.ts rename to assets/agenda/tests/CoverageItemStatus.spec.tsx diff --git a/assets/tests/TextInput.spec.ts b/assets/tests/TextInput.spec.tsx similarity index 100% rename from assets/tests/TextInput.spec.ts rename to assets/tests/TextInput.spec.tsx diff --git a/assets/wire/tests/WireApp.spec.ts b/assets/wire/tests/WireApp.spec.tsx similarity index 100% rename from assets/wire/tests/WireApp.spec.ts rename to assets/wire/tests/WireApp.spec.tsx From d741bdb3b5c7fe37fd878c1d4f79e33d562de793 Mon Sep 17 00:00:00 2001 From: Tomas Kikutis Date: Tue, 30 May 2023 09:27:32 +0200 Subject: [PATCH 07/71] install types for libraries --- assets/utils.tsx | 3 + package-lock.json | 297 ++++++++++++++++++++++++++++++++++++++++++++-- package.json | 14 +++ 3 files changed, 301 insertions(+), 13 deletions(-) diff --git a/assets/utils.tsx b/assets/utils.tsx index d97a5c653..bfb28c9b5 100644 --- a/assets/utils.tsx +++ b/assets/utils.tsx @@ -7,7 +7,10 @@ import {createStore as _createStore, applyMiddleware, compose} from 'redux'; import {createLogger} from 'redux-logger'; import thunk from 'redux-thunk'; import {render as _render} from 'react-dom'; + +// @ts-ignore import alertify from 'alertifyjs'; + import moment from 'moment-timezone'; import { hasCoverages, diff --git a/package-lock.json b/package-lock.json index 6ceebb287..d49927137 100644 --- a/package-lock.json +++ b/package-lock.json @@ -416,26 +416,183 @@ "integrity": "sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==", "dev": true }, + "@types/bootstrap": { + "version": "5.2.6", + "resolved": "https://registry.npmjs.org/@types/bootstrap/-/bootstrap-5.2.6.tgz", + "integrity": "sha512-BlAc3YATdasbHoxMoBWODrSF6qwQO/E9X8wVxCCSa6rWjnaZfpkr2N6pUMCY6jj2+wf0muUtLySbvU9etX6YqA==", + "dev": true, + "requires": { + "@popperjs/core": "^2.9.2" + } + }, + "@types/cheerio": { + "version": "0.22.31", + "resolved": "https://registry.npmjs.org/@types/cheerio/-/cheerio-0.22.31.tgz", + "integrity": "sha512-Kt7Cdjjdi2XWSfrZ53v4Of0wG3ZcmaegFXjMmz9tfNrZSkzzo36G0AL1YqSdcIA78Etjt6E609pt5h1xnQkPUw==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/enzyme": { + "version": "3.10.13", + "resolved": "https://registry.npmjs.org/@types/enzyme/-/enzyme-3.10.13.tgz", + "integrity": "sha512-FCtoUhmFsud0Yx9fmZk179GkdZ4U9B0GFte64/Md+W/agx0L5SxsIIbhLBOxIb9y2UfBA4WQnaG1Od/UsUQs9Q==", + "dev": true, + "requires": { + "@types/cheerio": "*", + "@types/react": "^16" + }, + "dependencies": { + "@types/react": { + "version": "16.14.42", + "resolved": "https://registry.npmjs.org/@types/react/-/react-16.14.42.tgz", + "integrity": "sha512-r6lbqQBJsQ5JJ0fp5I1+F3weosNhk7jOEcKeusIlCDYUK6kCpvIkYCamBNqGyS6WEztYlT8wmAVgblV0HxOFoA==", + "dev": true, + "requires": { + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" + } + } + } + }, + "@types/jasmine": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-4.3.2.tgz", + "integrity": "sha512-lKkWBcbxEZX/7nxPqEtv/OjPLaBa2j0o+hmv5Yn83b/+11C1kfBAkgvmrb13WDkmizUJ3B+jYrWh4M0YRtrzEQ==", + "dev": true + }, "@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==" }, + "@types/karma": { + "version": "6.3.4", + "resolved": "https://registry.npmjs.org/@types/karma/-/karma-6.3.4.tgz", + "integrity": "sha512-aefuFcs4e4NAOi1Ue4AP9fR2TQv45NFpdaLXdg+3FxDDndk/4T6LoHRTmKtRVqkwtQPh5Ntc3CxsoOgzldAAfg==", + "dev": true, + "requires": { + "@types/node": "*", + "log4js": "^6.4.1" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "log4js": { + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.9.1.tgz", + "integrity": "sha512-1somDdy9sChrr9/f4UlzhdaGfDR2c/SaD2a4T7qEkG4jTS57/B3qmnjLYePwQ8cqWnUHZI0iAKxMBpCZICiZ2g==", + "dev": true, + "requires": { + "date-format": "^4.0.14", + "debug": "^4.3.4", + "flatted": "^3.2.7", + "rfdc": "^1.3.0", + "streamroller": "^3.1.5" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, + "@types/karma-chrome-launcher": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@types/karma-chrome-launcher/-/karma-chrome-launcher-3.1.1.tgz", + "integrity": "sha512-Yh4CuoVjpcXh+p+TPKZC6AlodS4w9217Y+uWy1jNkhX/9+wuvSiyE0uD8SaZCkpWVoJUisuhC8eS4QpZ6EKCtQ==", + "dev": true, + "requires": { + "@types/karma": "*" + } + }, + "@types/karma-jasmine": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/karma-jasmine/-/karma-jasmine-4.0.2.tgz", + "integrity": "sha512-eI7nm/IOPMMMYv9E0iVJVb90sp+mYSVCeWAEToyji37jOGEJKf8nfQZ7OwG9gMbymYuiaViEHY3l+fU7cmlI6w==", + "dev": true, + "requires": { + "@types/jasmine": "*", + "@types/karma": "*" + } + }, + "@types/lodash": { + "version": "4.14.117", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.117.tgz", + "integrity": "sha512-xyf2m6tRbz8qQKcxYZa7PA4SllYcay+eh25DN3jmNYY6gSTL7Htc/bttVdkqj2wfJGbeWlQiX8pIyJpKU+tubw==", + "dev": true + }, + "@types/node": { + "version": "20.2.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.2.5.tgz", + "integrity": "sha512-JJulVEQXmiY9Px5axXHeYGLSjhkZEnD+MDPDGbCbIAbMslkKwmygtZFy1X6s/075Yo94sf8GuSlFfPzysQrWZQ==", + "dev": true + }, "@types/prop-types": { "version": "15.7.5", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==" }, "@types/react": { - "version": "18.0.35", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.35.tgz", - "integrity": "sha512-6Laome31HpetaIUGFWl1VQ3mdSImwxtFZ39rh059a1MNnKGqBpC88J6NJ8n/Is3Qx7CefDGLgf/KhN/sYCf7ag==", + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.2.tgz", + "integrity": "sha512-Xt40xQsrkdvjn1EyWe1Bc0dJLcil/9x2vAuW7ya+PuQip4UYUaXyhzWmAbwRsdMgwOFHpfp7/FFZebDU6Y8VHA==", "requires": { "@types/prop-types": "*", - "@types/scheduler": "*", "csstype": "^3.0.2" } }, + "@types/react-datepicker": { + "version": "4.11.2", + "resolved": "https://registry.npmjs.org/@types/react-datepicker/-/react-datepicker-4.11.2.tgz", + "integrity": "sha512-ELYyX3lb3K1WltqdlF1hbnaDGgzlF6PIR5T4W38cSEcfrQDIrPE+Ioq5pwRe/KEJ+ihHMjvTVZQkwJx0pWMNHQ==", + "dev": true, + "requires": { + "@popperjs/core": "^2.9.2", + "@types/react": "*", + "date-fns": "^2.0.1", + "react-popper": "^2.2.5" + } + }, + "@types/react-dom": { + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.1.tgz", + "integrity": "sha512-yIVyopxQb8IDZ7SOHeTovurFq+fXiPICa+GV3gp0Xedsl+MwQlMLKmvrnEjFbQxjliH5YVAEWFh975eVNmKj7Q==", + "dev": true, + "requires": { + "@types/react": "*" + } + }, + "@types/react-redux": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-5.0.7.tgz", + "integrity": "sha512-2lZLNPU5FiKIJwa7EXeOdyCg7pA9o6DCaGQ/9sJxVgZINIOQDDWXoQz2rVdsrHixOi/wK6hfja/oeCKLtbjofA==", + "dev": true, + "requires": { + "@types/react": "*", + "redux": "^3.6.0" + } + }, + "@types/react-toggle": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/react-toggle/-/react-toggle-4.0.3.tgz", + "integrity": "sha512-57QdMWeeQdRjM2/p+udgYerxUbSkmeUIW18kwUttcci6GHkgxoqCsDZfRtsCsAHcvvM5VBQdtDUEgLWo2e87mA==", + "dev": true, + "requires": { + "@types/react": "*" + } + }, "@types/react-transition-group": { "version": "4.4.5", "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.5.tgz", @@ -444,10 +601,52 @@ "@types/react": "*" } }, + "@types/redux-logger": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/@types/redux-logger/-/redux-logger-3.0.9.tgz", + "integrity": "sha512-cwYhVbYNgH01aepeMwhd0ABX6fhVB2rcQ9m80u8Fl50ZODhsZ8RhQArnLTkE7/Zrfq4Sz/taNoF7DQy9pCZSKg==", + "dev": true, + "requires": { + "redux": "^4.0.0" + }, + "dependencies": { + "redux": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/redux/-/redux-4.2.1.tgz", + "integrity": "sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w==", + "dev": true, + "requires": { + "@babel/runtime": "^7.9.2" + } + } + } + }, "@types/scheduler": { "version": "0.16.3", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.3.tgz", - "integrity": "sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ==" + "integrity": "sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ==", + "dev": true + }, + "@types/sinon": { + "version": "10.0.15", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.15.tgz", + "integrity": "sha512-3lrFNQG0Kr2LDzvjyjB6AMJk4ge+8iYhQfdnSwIwlG88FUOV43kPcQqDZkDa/h3WSZy6i8Fr0BSjfQtB1B3xuQ==", + "dev": true, + "requires": { + "@types/sinonjs__fake-timers": "*" + } + }, + "@types/sinonjs__fake-timers": { + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.2.tgz", + "integrity": "sha512-9GcLXF0/v3t80caGs5p2rRfkB+a8VBGLJZVih6CNFkx8IZ994wiKKLSRs9nuFwk1HevWs/1mnUmkApGrSGsShA==", + "dev": true + }, + "@types/store": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@types/store/-/store-2.0.2.tgz", + "integrity": "sha512-ZPHnXkzmGMfk+pHqAGzTSpA9CbsHmJLgkvOl5w52LZ0XTxB1ZIHWZzQ7lEtjTNWScBbsQekg8TjApMXkMe4nkw==", + "dev": true }, "@wojtekmaj/enzyme-adapter-react-17": { "version": "0.8.0", @@ -2277,6 +2476,12 @@ "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.29.3.tgz", "integrity": "sha512-dDCnyH2WnnKusqvZZ6+jA1O51Ibt8ZMRNkDZdyAyK4YfbDwa/cEmuztzG5pk6hqlp9aSBPYcjOlktquahGwGeA==" }, + "date-format": { + "version": "4.0.14", + "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.14.tgz", + "integrity": "sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==", + "dev": true + }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -3514,17 +3719,17 @@ } }, "expect": { - "version": "21.2.1", - "resolved": "https://registry.npmjs.org/expect/-/expect-21.2.1.tgz", - "integrity": "sha512-orfQQqFRTX0jH7znRIGi8ZMR8kTNpXklTTz8+HGTpmTKZo3Occ6JNB5FXMb8cRuiiC/GyDqsr30zUa66ACYlYw==", + "version": "21.1.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-21.1.0.tgz", + "integrity": "sha512-gBmUVy+A4+brj/MnuiwLe+MIMfSffWUmZMNjKHrMkB0cpkAjnFdwHAxs6MvYeh4+14ocp+SfKp4ebNEhkbV3YQ==", "dev": true, "requires": { "ansi-styles": "^3.2.0", - "jest-diff": "^21.2.1", - "jest-get-type": "^21.2.0", - "jest-matcher-utils": "^21.2.1", - "jest-message-util": "^21.2.1", - "jest-regex-util": "^21.2.0" + "jest-diff": "^21.1.0", + "jest-get-type": "^21.0.2", + "jest-matcher-utils": "^21.1.0", + "jest-message-util": "^21.1.0", + "jest-regex-util": "^21.1.0" }, "dependencies": { "ansi-styles": { @@ -3954,6 +4159,12 @@ } } }, + "flatted": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "dev": true + }, "flatten": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.3.tgz", @@ -9280,6 +9491,12 @@ "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" }, + "rfdc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", + "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", + "dev": true + }, "right-align": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", @@ -10180,6 +10397,54 @@ "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==" }, + "streamroller": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.1.5.tgz", + "integrity": "sha512-KFxaM7XT+irxvdqSP1LGLgNWbYN7ay5owZ3r/8t77p+EtSUAfUgtl7be3xtqtOmGUl9K9YPO2ca8133RlTjvKw==", + "dev": true, + "requires": { + "date-format": "^4.0.14", + "debug": "^4.3.4", + "fs-extra": "^8.1.0" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, "strict-uri-encode": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", @@ -10950,6 +11215,12 @@ "imurmurhash": "^0.1.4" } }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true + }, "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", diff --git a/package.json b/package.json index 14406cf2a..c7e72dee6 100644 --- a/package.json +++ b/package.json @@ -55,6 +55,20 @@ "whatwg-fetch": "2.0.4" }, "devDependencies": { + "@types/bootstrap": "^5.2.6", + "@types/enzyme": "^3.10.13", + "@types/karma": "^6.3.4", + "@types/karma-chrome-launcher": "^3.1.1", + "@types/karma-jasmine": "^4.0.2", + "@types/lodash": "^4.14.117", + "@types/react": "^17.0.2", + "@types/react-datepicker": "^4.11.2", + "@types/react-dom": "^17.0.1", + "@types/react-redux": "^5.0.7", + "@types/react-toggle": "^4.0.3", + "@types/redux-logger": "^3.0.9", + "@types/sinon": "^10.0.15", + "@types/store": "^2.0.2", "@wojtekmaj/enzyme-adapter-react-17": "^0.8.0", "copy-webpack-plugin": "^4.6.0", "enzyme": "^3.0.0", From 60694fcf948583665d690fb082ef2e1f57f6e66d Mon Sep 17 00:00:00 2001 From: Tomas Kikutis Date: Tue, 30 May 2023 09:36:20 +0200 Subject: [PATCH 08/71] set base path to prevent compiler from throwing import errors --- tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index ddf1d6854..4e6413529 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,7 +4,7 @@ ], "compilerOptions": { "allowJs": true, - "baseUrl": ".", + "baseUrl": "./assets", "esModuleInterop": true, "target": "es5", "module": "commonjs", From 99f1df2aafce699d8953c0645724b5c9135f6e98 Mon Sep 17 00:00:00 2001 From: Tomas Kikutis Date: Wed, 31 May 2023 16:06:24 +0200 Subject: [PATCH 09/71] return original keys --- webpack.config.js | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 6e7e82e9b..ba3c68d4c 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -7,32 +7,32 @@ const TerserPlugin = require('terser-webpack-plugin-legacy'); const config = { entry: { - newsroom_ts: path.resolve(__dirname, 'assets/index.ts'), - companies_ts: path.resolve(__dirname, 'assets/companies/index.ts'), - oauth_clients_ts: path.resolve(__dirname, 'assets/oauth_clients/index.ts'), - users_ts: path.resolve(__dirname, 'assets/users/index.ts'), - products_ts: path.resolve(__dirname, 'assets/products/index.ts'), - 'section-filters_ts': path.resolve(__dirname, 'assets/section-filters/index.ts'), - navigations_ts: path.resolve(__dirname, 'assets/navigations/index.ts'), - cards_ts: path.resolve(__dirname, 'assets/cards/index.ts'), - user_profile_ts: path.resolve(__dirname, 'assets/user-profile/index.ts'), + newsroom_js: path.resolve(__dirname, 'assets/index.ts'), + companies_js: path.resolve(__dirname, 'assets/companies/index.ts'), + oauth_clients_js: path.resolve(__dirname, 'assets/oauth_clients/index.ts'), + users_js: path.resolve(__dirname, 'assets/users/index.ts'), + products_js: path.resolve(__dirname, 'assets/products/index.ts'), + 'section-filters_js': path.resolve(__dirname, 'assets/section-filters/index.ts'), + navigations_js: path.resolve(__dirname, 'assets/navigations/index.ts'), + cards_js: path.resolve(__dirname, 'assets/cards/index.ts'), + user_profile_js: path.resolve(__dirname, 'assets/user-profile/index.ts'), newsroom_css: path.resolve(__dirname, 'assets/style.ts'), - wire_ts: path.resolve(__dirname, 'assets/wire/index.ts'), - home_ts: path.resolve(__dirname, 'assets/home/index.ts'), - agenda_ts: path.resolve(__dirname, 'assets/agenda/index.ts'), - notifications_ts: path.resolve(__dirname, 'assets/notifications/index.ts'), - company_reports_ts: path.resolve(__dirname, 'assets/company-reports/index.ts'), - print_reports_ts: path.resolve(__dirname, 'assets/company-reports/components/index.ts'), - am_news_ts: path.resolve(__dirname, 'assets/am-news/index.ts'), + wire_js: path.resolve(__dirname, 'assets/wire/index.ts'), + home_js: path.resolve(__dirname, 'assets/home/index.ts'), + agenda_js: path.resolve(__dirname, 'assets/agenda/index.ts'), + notifications_js: path.resolve(__dirname, 'assets/notifications/index.ts'), + company_reports_js: path.resolve(__dirname, 'assets/company-reports/index.ts'), + print_reports_js: path.resolve(__dirname, 'assets/company-reports/components/index.ts'), + am_news_js: path.resolve(__dirname, 'assets/am-news/index.ts'), am_news_css: path.resolve(__dirname, 'assets/am-news/style.ts'), - 'general-settings_ts': path.resolve(__dirname, 'assets/general-settings/index.ts'), - market_place_ts: path.resolve(__dirname, 'assets/market-place/index.ts'), - media_releases_ts: path.resolve(__dirname, 'assets/media-releases/index.ts'), - monitoring_ts: path.resolve(__dirname, 'assets/monitoring/index.ts'), - factcheck_ts: path.resolve(__dirname, 'assets/factcheck/index.ts'), + 'general-settings_js': path.resolve(__dirname, 'assets/general-settings/index.ts'), + market_place_js: path.resolve(__dirname, 'assets/market-place/index.ts'), + media_releases_js: path.resolve(__dirname, 'assets/media-releases/index.ts'), + monitoring_js: path.resolve(__dirname, 'assets/monitoring/index.ts'), + factcheck_js: path.resolve(__dirname, 'assets/factcheck/index.ts'), common: path.resolve(__dirname, 'assets/common.ts'), - design_ts: path.resolve(__dirname, 'assets/design_pages.ts'), - company_admin_ts: path.resolve(__dirname, 'assets/company-admin/index.ts'), + design_js: path.resolve(__dirname, 'assets/design_pages.ts'), + company_admin_js: path.resolve(__dirname, 'assets/company-admin/index.ts'), }, output: { path: path.resolve(process.cwd(), 'dist'), From 5974381c506f3ed103b6de6046d8f90ec870af83 Mon Sep 17 00:00:00 2001 From: Tomas Kikutis Date: Thu, 1 Jun 2023 21:35:29 +0200 Subject: [PATCH 10/71] fix circular import utils were imported inside websocket.ts and websocket.ts was being imported inside utils - solely for exporting it --- assets/agenda/index.ts | 3 ++- assets/am-news/index.ts | 3 ++- assets/factcheck/index.ts | 3 ++- assets/home/index.ts | 3 ++- assets/market-place/index.ts | 3 ++- assets/media-releases/index.ts | 3 ++- assets/monitoring/index.ts | 3 ++- assets/notifications/index.ts | 3 ++- assets/user-profile/index.ts | 3 ++- assets/utils.tsx | 1 - assets/wire/index.ts | 3 ++- 11 files changed, 20 insertions(+), 11 deletions(-) diff --git a/assets/agenda/index.ts b/assets/agenda/index.ts index b5286e4b9..27abe624b 100644 --- a/assets/agenda/index.ts +++ b/assets/agenda/index.ts @@ -1,4 +1,5 @@ -import {createStore, render, initWebSocket, getInitData, isMobilePhone, closeItemOnMobile} from 'utils'; +import {createStore, render, getInitData, isMobilePhone, closeItemOnMobile} from 'utils'; +import {initWebSocket} from 'websocket'; import agendaReducer from './reducers'; import {getActiveDate, getReadItems, getFeaturedOnlyParam} from 'local-store'; diff --git a/assets/am-news/index.ts b/assets/am-news/index.ts index 08a769090..362312683 100644 --- a/assets/am-news/index.ts +++ b/assets/am-news/index.ts @@ -1,6 +1,7 @@ import {get, startsWith} from 'lodash'; -import {createStore, render, initWebSocket, getInitData, closeItemOnMobile, isMobilePhone} from '../utils'; +import {createStore, render, getInitData, closeItemOnMobile, isMobilePhone} from '../utils'; +import {initWebSocket} from 'websocket'; import {getReadItems} from 'local-store'; import AmNewsApp from './components/AmNewsApp'; diff --git a/assets/factcheck/index.ts b/assets/factcheck/index.ts index c5956d380..dd87b208c 100644 --- a/assets/factcheck/index.ts +++ b/assets/factcheck/index.ts @@ -1,4 +1,5 @@ -import {createStore, render, initWebSocket, getInitData, closeItemOnMobile, isMobilePhone} from '../utils'; +import {createStore, render, getInitData, closeItemOnMobile, isMobilePhone} from '../utils'; +import {initWebSocket} from 'websocket'; import {getReadItems} from 'local-store'; import WireApp from '../wire/components/WireApp'; diff --git a/assets/home/index.ts b/assets/home/index.ts index 102dd9469..c75b6c532 100644 --- a/assets/home/index.ts +++ b/assets/home/index.ts @@ -1,4 +1,5 @@ -import {createStore, render, getInitData, initWebSocket} from 'utils'; +import {createStore, render, getInitData} from 'utils'; +import {initWebSocket} from 'websocket'; import homeReducer from './reducers'; import HomeApp from './components/HomeApp'; import {initData, pushNotification} from './actions'; diff --git a/assets/market-place/index.ts b/assets/market-place/index.ts index 9bd654216..3727d2785 100644 --- a/assets/market-place/index.ts +++ b/assets/market-place/index.ts @@ -1,4 +1,5 @@ -import {createStore, render, initWebSocket, getInitData, closeItemOnMobile, isMobilePhone} from '../utils'; +import {createStore, render, getInitData, closeItemOnMobile, isMobilePhone} from '../utils'; +import {initWebSocket} from 'websocket'; import {getReadItems} from 'local-store'; import MarketPlaceApp from './components/MarketPlaceApp'; diff --git a/assets/media-releases/index.ts b/assets/media-releases/index.ts index d864a4120..0799419b8 100644 --- a/assets/media-releases/index.ts +++ b/assets/media-releases/index.ts @@ -1,4 +1,5 @@ -import {createStore, render, initWebSocket, getInitData, closeItemOnMobile, isMobilePhone} from '../utils'; +import {createStore, render, getInitData, closeItemOnMobile, isMobilePhone} from '../utils'; +import {initWebSocket} from 'websocket'; import {getReadItems} from 'local-store'; import WireApp from '../wire/components/WireApp'; diff --git a/assets/monitoring/index.ts b/assets/monitoring/index.ts index d973e0109..7961a9c96 100644 --- a/assets/monitoring/index.ts +++ b/assets/monitoring/index.ts @@ -1,6 +1,7 @@ import {get, startsWith} from 'lodash'; -import {createStore, render, getInitData, initWebSocket, closeItemOnMobile, isMobilePhone} from 'utils'; +import {createStore, render, getInitData, closeItemOnMobile, isMobilePhone} from 'utils'; +import {initWebSocket} from 'websocket'; import {getReadItems} from 'local-store'; import monitoringReducer from './reducers'; import WireApp from 'wire/components/WireApp'; diff --git a/assets/notifications/index.ts b/assets/notifications/index.ts index fe84ad3ff..e1830576e 100644 --- a/assets/notifications/index.ts +++ b/assets/notifications/index.ts @@ -1,4 +1,5 @@ -import {createStore, render, initWebSocket} from 'utils'; +import {createStore, render} from 'utils'; +import {initWebSocket} from 'websocket'; import notificationReducer from './reducers'; import NotificationApp from './components/NotificationsApp'; import {initData, pushNotification} from './actions'; diff --git a/assets/user-profile/index.ts b/assets/user-profile/index.ts index 5f634ab1d..f8823457f 100644 --- a/assets/user-profile/index.ts +++ b/assets/user-profile/index.ts @@ -1,4 +1,5 @@ -import {render, isWireContext, initWebSocket} from 'utils'; +import {render, isWireContext} from 'utils'; +import {initWebSocket} from 'websocket'; import UserProfileApp from './components/UserProfileApp'; import {initData, selectMenu, pushNotification} from './actions'; import {store} from './store'; diff --git a/assets/utils.tsx b/assets/utils.tsx index bfb28c9b5..16e79c3f9 100644 --- a/assets/utils.tsx +++ b/assets/utils.tsx @@ -18,7 +18,6 @@ import { SCHEDULE_TYPE, isItemTBC, } from './agenda/utils'; -export {initWebSocket} from './websocket'; /* * Import and load all locales that will be used in moment.js diff --git a/assets/wire/index.ts b/assets/wire/index.ts index c1b258f01..31fe634ee 100644 --- a/assets/wire/index.ts +++ b/assets/wire/index.ts @@ -1,4 +1,5 @@ -import {createStore, render, initWebSocket, getInitData, closeItemOnMobile, isMobilePhone} from 'utils'; +import {createStore, render, getInitData, closeItemOnMobile, isMobilePhone} from 'utils'; +import {initWebSocket} from 'websocket'; import wireReducer from './reducers'; import {getNewsOnlyParam, getSearchAllVersionsParam, getReadItems} from 'local-store'; From 2e0310a594e9fc5bda5c72901aaa6c565060cbac Mon Sep 17 00:00:00 2001 From: Tomas Kikutis Date: Fri, 2 Jun 2023 15:16:59 +0200 Subject: [PATCH 11/71] fix circular import - utils <> agenda/utils move formatAgendaDate and getScheduleType to agenda/utils. --- assets/agenda/components/AgendaMetaTime.tsx | 3 +- assets/agenda/components/AgendaTime.tsx | 3 +- assets/agenda/utils.ts | 155 ++++++++++++++++++- assets/utils.tsx | 156 -------------------- 4 files changed, 155 insertions(+), 162 deletions(-) diff --git a/assets/agenda/components/AgendaMetaTime.tsx b/assets/agenda/components/AgendaMetaTime.tsx index 79be696b7..ba4516820 100644 --- a/assets/agenda/components/AgendaMetaTime.tsx +++ b/assets/agenda/components/AgendaMetaTime.tsx @@ -3,8 +3,7 @@ import PropTypes from 'prop-types'; import classNames from 'classnames'; import {bem} from 'ui/utils'; -import {hasCoverages} from '../utils'; -import {formatAgendaDate} from 'utils'; +import {formatAgendaDate, hasCoverages} from '../utils'; import AgendaItemTimeUpdater from './AgendaItemTimeUpdater'; diff --git a/assets/agenda/components/AgendaTime.tsx b/assets/agenda/components/AgendaTime.tsx index fdaac55d5..0766e6afb 100644 --- a/assets/agenda/components/AgendaTime.tsx +++ b/assets/agenda/components/AgendaTime.tsx @@ -5,8 +5,7 @@ import {get} from 'lodash'; import classNames from 'classnames'; import {bem} from 'ui/utils'; -import {isItemTBC} from '../utils'; -import {formatAgendaDate} from 'utils'; +import {formatAgendaDate, isItemTBC} from '../utils'; import {shouldRenderLocation} from'maps/utils'; export default function AgendaTime({item, children}) { diff --git a/assets/agenda/utils.ts b/assets/agenda/utils.ts index 1856b91c0..cf4d76ed9 100644 --- a/assets/agenda/utils.ts +++ b/assets/agenda/utils.ts @@ -12,6 +12,7 @@ import { parseDate, AGENDA_DATE_FORMAT_SHORT, formatTime, + DAY_IN_MINUTES, } from '../utils'; export const STATUS_KILLED = 'killed'; @@ -28,7 +29,7 @@ const navigationFunctions = { 'week': { 'next': getNextWeek, 'previous': getPreviousWeek, - 'format': (dateString) => `${moment(dateString).format('D MMMM')} - + 'format': (dateString) => `${moment(dateString).format('D MMMM')} - ${moment(dateString).add(6, 'days').format('D MMMM')}`, }, 'month': { @@ -645,7 +646,7 @@ const isBetweenDay = (day, start, end) => { // it will be converted to local time // if passed as string which we need // for all day events which are in utc mode - const startDate = start.format('YYYY-MM-DD'); + const startDate = start.format('YYYY-MM-DD'); const endDate = end.format('YYYY-MM-DD'); return day.isBetween(startDate, endDate, 'day', '[]'); @@ -902,3 +903,153 @@ export const getCoverageTooltip = (coverage, beingUpdated) => { return gettext('{{ type }} coverage', {type: coverageType}); }; + +function getScheduleType(item) { + const start = moment(item.dates.start) + const end = moment(item.dates.end); + const duration = end.diff(start, 'minutes'); + + if (item.dates.all_day) { + return duration === 0 ? SCHEDULE_TYPE.ALL_DAY : SCHEDULE_TYPE.MULTI_DAY; + } + + if (item.dates.no_end_time) { + return SCHEDULE_TYPE.NO_DURATION; + } + + if (duration > DAY_IN_MINUTES || !start.isSame(end, 'day')) { + return SCHEDULE_TYPE.MULTI_DAY; + } + + if (duration === DAY_IN_MINUTES && start.isSame(end, 'day')) { + return SCHEDULE_TYPE.ALL_DAY; + } + + if (duration === 0) { + return SCHEDULE_TYPE.NO_DURATION; + } + + return SCHEDULE_TYPE.REGULAR; +} + +/** + * Format agenda item start and end dates + * + * @param {String} dateString + * @param {String} group: date of the selected event group + * @param {Object} options + * @return {Array} [time string, date string] + */ +export function formatAgendaDate(item, group, {localTimeZone = true, onlyDates = false} = {}) { + const getFormattedTimezone = (date) => { + let tzStr = date.format('z'); + if (tzStr.indexOf('+0') >= 0) { + return tzStr.replace('+0', 'GMT+'); + } + + if (tzStr.indexOf('+') >= 0) { + return tzStr.replace('+', 'GMT+'); + } + + return tzStr; + }; + + const isTBCItem = isItemTBC(item); + let start = parseDate(item.dates.start, item.dates.all_day); + let end = parseDate(item.dates.end, item.dates.all_day || item.dates.no_end_time); + let dateGroup = group ? moment(group, DATE_FORMAT) : null; + + let isGroupBetweenEventDates = dateGroup ? + start.isSameOrBefore(dateGroup, 'day') && end.isSameOrAfter(dateGroup, 'day') : true; + + if (!isGroupBetweenEventDates && hasCoverages(item)) { + // we rendering for extra days + const scheduleDates = item.coverages + .map((coverage) => { + if (isCoverageForExtraDay(coverage, group)) { + return coverage.scheduled; + } + return null; + }) + .filter((d) => d) + .sort((a, b) => { + if (a < b) return -1; + if (a > b) return 1; + return 0; + }); + if (scheduleDates.length > 0) { + start = moment(scheduleDates[0]); + } + } + + const scheduleType = getScheduleType(item); + const startDate = formatDate(start); + const startTime = formatTime(start); + const endDate = formatDate(end); + const endTime = formatTime(end); + const timezone = localTimeZone ? '' : getFormattedTimezone(start); + + switch (true) { + case isTBCItem && startDate !== endDate: + return gettext('{{startDate}} to {{endDate}} (Time to be confirmed)', { + startDate, + endDate, + }); + + case isTBCItem: + return gettext('{{startDate}} (Time to be confirmed)', { + startDate, + }); + + case startDate !== endDate && (item.dates.all_day || onlyDates || (startTime === '00:00' && endTime === '23:59')): + return gettext('{{startDate}} to {{endDate}}', { + startDate, + endDate, + }); + + case startDate === endDate && (item.dates.all_day || onlyDates || scheduleType === SCHEDULE_TYPE.ALL_DAY): + return startDate; + + case item.dates.no_end_time && startDate !== endDate: + return gettext('{{startTime}} {{startDate}} - {{endDate}} {{timezone}}', { + startTime, + startDate, + endDate, + timezone, + }); + + case item.dates.no_end_time || scheduleType === SCHEDULE_TYPE.NO_DURATION: + return gettext('{{startTime}} {{startDate}} {{timezone}}', { + startTime, + startDate, + timezone, + }); + + case scheduleType === SCHEDULE_TYPE.REGULAR: + return gettext('{{startTime}} - {{endTime}} {{startDate}} {{timezone}}', { + startTime, + startDate, + endTime, + timezone, + }); + + case scheduleType === SCHEDULE_TYPE.MULTI_DAY: + return gettext('{{startTime}} {{startDate}} to {{endTime}} {{endDate}} {{timezone}}', { + startTime, + startDate, + endTime, + endDate, + timezone, + }); + + default: + console.warn('not sure about the datetime format', item, scheduleType); + return gettext('{{startTime}} {{startDate}} to {{endTime}} {{endDate}} {{timezone}}', { + startTime, + startDate, + endTime, + endDate, + timezone + }); + } +} diff --git a/assets/utils.tsx b/assets/utils.tsx index 16e79c3f9..0beab90c2 100644 --- a/assets/utils.tsx +++ b/assets/utils.tsx @@ -12,12 +12,6 @@ import {render as _render} from 'react-dom'; import alertify from 'alertifyjs'; import moment from 'moment-timezone'; -import { - hasCoverages, - isCoverageForExtraDay, - SCHEDULE_TYPE, - isItemTBC, -} from './agenda/utils'; /* * Import and load all locales that will be used in moment.js @@ -339,156 +333,6 @@ export function convertUtcToTimezone(datetime, timezone) { .tz(timezone); } -function getScheduleType(item) { - const start = moment(item.dates.start); - const end = moment(item.dates.end); - const duration = end.diff(start, 'minutes'); - - if (item.dates.all_day) { - return duration === 0 ? SCHEDULE_TYPE.ALL_DAY : SCHEDULE_TYPE.MULTI_DAY; - } - - if (item.dates.no_end_time) { - return SCHEDULE_TYPE.NO_DURATION; - } - - if (duration > DAY_IN_MINUTES || !start.isSame(end, 'day')) { - return SCHEDULE_TYPE.MULTI_DAY; - } - - if (duration === DAY_IN_MINUTES && start.isSame(end, 'day')) { - return SCHEDULE_TYPE.ALL_DAY; - } - - if (duration === 0) { - return SCHEDULE_TYPE.NO_DURATION; - } - - return SCHEDULE_TYPE.REGULAR; -} - -/** - * Format agenda item start and end dates - * - * @param {String} dateString - * @param {String} group: date of the selected event group - * @param {Object} options - * @return {Array} [time string, date string] - */ -export function formatAgendaDate(item, group, {localTimeZone = true, onlyDates = false} = {}) { - const getFormattedTimezone = (date) => { - let tzStr = date.format('z'); - if (tzStr.indexOf('+0') >= 0) { - return tzStr.replace('+0', 'GMT+'); - } - - if (tzStr.indexOf('+') >= 0) { - return tzStr.replace('+', 'GMT+'); - } - - return tzStr; - }; - - const isTBCItem = isItemTBC(item); - let start = parseDate(item.dates.start, item.dates.all_day); - let end = parseDate(item.dates.end, item.dates.all_day || item.dates.no_end_time); - let dateGroup = group ? moment(group, DATE_FORMAT) : null; - - let isGroupBetweenEventDates = dateGroup ? - start.isSameOrBefore(dateGroup, 'day') && end.isSameOrAfter(dateGroup, 'day') : true; - - if (!isGroupBetweenEventDates && hasCoverages(item)) { - // we rendering for extra days - const scheduleDates = item.coverages - .map((coverage) => { - if (isCoverageForExtraDay(coverage, group)) { - return coverage.scheduled; - } - return null; - }) - .filter((d) => d) - .sort((a, b) => { - if (a < b) return -1; - if (a > b) return 1; - return 0; - }); - if (scheduleDates.length > 0) { - start = moment(scheduleDates[0]); - } - } - - const scheduleType = getScheduleType(item); - const startDate = formatDate(start); - const startTime = formatTime(start); - const endDate = formatDate(end); - const endTime = formatTime(end); - const timezone = localTimeZone ? '' : getFormattedTimezone(start); - - switch (true) { - case isTBCItem && startDate !== endDate: - return gettext('{{startDate}} to {{endDate}} (Time to be confirmed)', { - startDate, - endDate, - }); - - case isTBCItem: - return gettext('{{startDate}} (Time to be confirmed)', { - startDate, - }); - - case startDate !== endDate && (item.dates.all_day || onlyDates || (startTime === '00:00' && endTime === '23:59')): - return gettext('{{startDate}} to {{endDate}}', { - startDate, - endDate, - }); - - case startDate === endDate && (item.dates.all_day || onlyDates || scheduleType === SCHEDULE_TYPE.ALL_DAY): - return startDate; - - case item.dates.no_end_time && startDate !== endDate: - return gettext('{{startTime}} {{startDate}} - {{endDate}} {{timezone}}', { - startTime, - startDate, - endDate, - timezone, - }); - - case item.dates.no_end_time || scheduleType === SCHEDULE_TYPE.NO_DURATION: - return gettext('{{startTime}} {{startDate}} {{timezone}}', { - startTime, - startDate, - timezone, - }); - - case scheduleType === SCHEDULE_TYPE.REGULAR: - return gettext('{{startTime}} - {{endTime}} {{startDate}} {{timezone}}', { - startTime, - startDate, - endTime, - timezone, - }); - - case scheduleType === SCHEDULE_TYPE.MULTI_DAY: - return gettext('{{startTime}} {{startDate}} to {{endTime}} {{endDate}} {{timezone}}', { - startTime, - startDate, - endTime, - endDate, - timezone, - }); - - default: - console.warn('not sure about the datetime format', item, scheduleType); - return gettext('{{startTime}} {{startDate}} to {{endTime}} {{endDate}} {{timezone}}', { - startTime, - startDate, - endTime, - endDate, - timezone - }); - } -} - /** * Format week of a date (without time) * From 48b2c1090ed0dff8541b3ec05aeb9b2bdba6df5f Mon Sep 17 00:00:00 2001 From: Tomas Kikutis Date: Fri, 2 Jun 2023 17:42:05 +0200 Subject: [PATCH 12/71] add any types for arguments of simple function declarations --- assets/actions.ts | 8 +- assets/agenda/actions.ts | 24 ++--- .../components/AgendaCoverageExistsFilter.tsx | 2 +- assets/agenda/components/AgendaFilters.tsx | 4 +- assets/agenda/components/AgendaMetaTime.tsx | 4 +- .../agenda/components/CoverageItemStatus.tsx | 4 +- assets/agenda/reducers.ts | 6 +- .../agenda/tests/CoverageItemStatus.spec.tsx | 2 +- assets/agenda/utils.ts | 100 +++++++++--------- assets/cards/actions.ts | 16 +-- assets/cards/components/CardListItem.tsx | 2 +- assets/cards/reducers.ts | 2 +- assets/companies/actions.ts | 26 ++--- assets/companies/components/EditCompany.tsx | 2 +- assets/companies/reducers.ts | 4 +- assets/companies/utils.ts | 4 +- assets/company-admin/actions.ts | 8 +- .../components/CompanyUserListItem.tsx | 2 +- assets/company-admin/reducers.ts | 2 +- assets/company-reports/actions.ts | 24 ++--- assets/company-reports/components/Company.tsx | 6 +- .../components/CompanyProducts.tsx | 2 +- assets/company-reports/reducers.ts | 2 +- assets/components/BookmarkTabs.tsx | 2 +- assets/components/DropdownFilter.tsx | 2 +- assets/components/Modal.tsx | 2 +- assets/domUtils.ts | 10 +- assets/features/dashboard/actions.ts | 4 +- assets/features/dashboard/reducers.ts | 2 +- assets/features/sections/actions.ts | 4 +- assets/features/sections/reducers.ts | 2 +- assets/general-settings/actions.ts | 6 +- .../components/GeneralSettingsApp.tsx | 2 +- assets/general-settings/reducers.ts | 2 +- assets/home/reducers.ts | 2 +- assets/home/utils.ts | 2 +- assets/item-actions.ts | 2 +- assets/local-store.ts | 16 +-- assets/maps/utils.ts | 26 ++--- assets/market-place/actions.ts | 2 +- assets/market-place/reducers.ts | 2 +- assets/monitoring/actions.ts | 26 ++--- assets/monitoring/reducers.ts | 2 +- assets/monitoring/utils.ts | 2 +- assets/navigations/actions.tsx | 14 +-- assets/navigations/reducers.tsx | 2 +- assets/news-api/actions.ts | 8 +- .../components/notificationItems.tsx | 10 +- assets/notifications/reducers.ts | 2 +- assets/oauth_clients/actions.ts | 18 ++-- assets/oauth_clients/reducers.ts | 4 +- assets/products/actions.ts | 22 ++-- assets/products/reducers.ts | 2 +- assets/reducers.ts | 8 +- assets/search/actions.ts | 60 +++++------ assets/search/reducers.ts | 2 +- assets/section-filters/actions.ts | 12 +-- assets/section-filters/reducers.ts | 2 +- assets/server.ts | 4 +- assets/tests/TextInput.spec.tsx | 2 +- assets/topics/actions.ts | 2 +- assets/topics/reducer.ts | 4 +- assets/topics/utils.ts | 2 +- assets/ui/components/ArticleBody.tsx | 2 +- assets/ui/components/ArticleContent.tsx | 2 +- .../components/ArticleContentInfoWrapper.tsx | 2 +- .../ui/components/ArticleContentWrapper.tsx | 2 +- assets/ui/components/ArticleItemDetails.tsx | 2 +- assets/ui/components/ArticlePicture.tsx | 2 +- assets/ui/components/ArticleSidebar.tsx | 2 +- assets/ui/components/ArticleSidebarBox.tsx | 2 +- assets/ui/components/Content.tsx | 2 +- assets/ui/components/ContentBar.tsx | 2 +- assets/ui/components/ContentHeader.tsx | 2 +- assets/ui/components/Preview.tsx | 2 +- assets/ui/components/PreviewBox.tsx | 2 +- assets/ui/utils.ts | 2 +- assets/user-profile/reducers.ts | 2 +- assets/users/actions.ts | 26 ++--- assets/users/components/UsersApp.tsx | 2 +- assets/users/reducers.ts | 2 +- assets/users/utils.ts | 12 +-- assets/utils.tsx | 78 +++++++------- assets/websocket.ts | 6 +- assets/wire/actions.ts | 14 +-- assets/wire/components/InfoBox.tsx | 2 +- assets/wire/components/PreviewTagsBlock.tsx | 2 +- assets/wire/components/PreviewTagsLink.tsx | 2 +- assets/wire/components/WireActionButtons.tsx | 2 +- assets/wire/components/WireListItem.tsx | 2 +- .../wire/components/fields/UrgencyLabel.tsx | 2 +- assets/wire/components/fields/index.tsx | 2 +- assets/wire/reducers.ts | 10 +- assets/wire/tests/WireApp.spec.tsx | 8 +- assets/wire/utils.ts | 42 ++++---- 95 files changed, 400 insertions(+), 400 deletions(-) diff --git a/assets/actions.ts b/assets/actions.ts index 77e4b2b98..38f553d18 100644 --- a/assets/actions.ts +++ b/assets/actions.ts @@ -2,7 +2,7 @@ import {get, differenceBy} from 'lodash'; import server from 'server'; export const RENDER_MODAL = 'RENDER_MODAL'; -export function renderModal(modal, data) { +export function renderModal(modal: any, data: any) { return {type: RENDER_MODAL, modal, data}; } @@ -12,12 +12,12 @@ export function closeModal() { } export const SAVED_ITEMS_COUNT = 'SAVED_ITEMS_COUNT'; -export function setSavedItemsCount(count) { +export function setSavedItemsCount(count: any) { return {type: SAVED_ITEMS_COUNT, count: count}; } export const SET_UI_CONFIG = 'SET_UI_CONFIG'; -export function setUiConfig(config) { +export function setUiConfig(config: any) { return {type: SET_UI_CONFIG, config: config}; } @@ -49,7 +49,7 @@ export function userProfileClosed() { } export const ADD_EDIT_USERS = 'ADD_EDIT_USERS'; -export function getEditUsers(item) { +export function getEditUsers(item: any) { return function (dispatch, getState) { let findUsers = []; const itemUsers = ([ diff --git a/assets/agenda/actions.ts b/assets/agenda/actions.ts index 404002a00..ea0cc0975 100644 --- a/assets/agenda/actions.ts +++ b/assets/agenda/actions.ts @@ -443,7 +443,7 @@ export function pushNotification(push) { }; } -export function reloadMyTopics(reloadTopic = false) { +export function reloadMyTopics(reloadTopic: any = false) { return function(dispatch) { return loadMyTopics() .then((data) => { @@ -462,7 +462,7 @@ export function reloadMyTopics(reloadTopic = false) { } export const SET_NEW_ITEM = 'SET_NEW_ITEM'; -export function setAndUpdateNewItems(data) { +export function setAndUpdateNewItems(data: any) { return function(dispatch, getState) { const item = data.item || {}; @@ -502,11 +502,11 @@ export function setAndUpdateNewItems(data) { } export const UPDATE_ITEM = 'UPDATE_ITEM'; -export function updateItem(item) { +export function updateItem(item: any) { return {type: UPDATE_ITEM, item: item}; } -export function toggleDropdownFilter(key, val) { +export function toggleDropdownFilter(key: any, val: any) { return (dispatch) => { dispatch(setActive(null)); dispatch(preview(null)); @@ -523,7 +523,7 @@ export function toggleDropdownFilter(key, val) { }; } -function setLocationFilter(location) { +function setLocationFilter(location: any) { return (dispatch, getState) => { const state = getState(); const currentFilters = cloneDeep(searchFilterSelector(state)); @@ -550,7 +550,7 @@ export function startLoading() { } export const RECIEVE_NEXT_ITEMS = 'RECIEVE_NEXT_ITEMS'; -export function recieveNextItems(data) { +export function recieveNextItems(data: any) { return {type: RECIEVE_NEXT_ITEMS, data}; } @@ -576,7 +576,7 @@ export function fetchMoreItems() { * * @param {URLSearchParams} params */ -export function initParams(params) { +export function initParams(params: any) { if (params.get('filter') || params.get('created')) { clearAgendaDropdownFilters(); } @@ -606,7 +606,7 @@ export function initParams(params) { * @param {String} topicId * @return {Promise} */ -export function loadMyAgendaTopic(topicId) { +export function loadMyAgendaTopic(topicId: any) { return (dispatch, getState) => { // Set featured query option to false when using navigations if (get(getState(), 'agenda.featuredOnly')) { @@ -619,7 +619,7 @@ export function loadMyAgendaTopic(topicId) { } export const TOGGLE_FEATURED_FILTER = 'TOGGLE_FEATURED_FILTER'; -export function toggleFeaturedFilter(fetch = true) { +export function toggleFeaturedFilter(fetch: any = true) { return (dispatch) => { toggleFeaturedOnlyParam(); dispatch({type: TOGGLE_FEATURED_FILTER}); @@ -632,12 +632,12 @@ export function toggleFeaturedFilter(fetch = true) { } export const SET_ITEM_TYPE_FILTER = 'SET_ITEM_TYPE_FILTER'; -export function setItemTypeFilter(value) { +export function setItemTypeFilter(value: any) { return {type: SET_ITEM_TYPE_FILTER, value}; } export const WATCH_COVERAGE = 'WATCH_COVERAGE'; -export function watchCoverage(coverage, item) { +export function watchCoverage(coverage: any, item: any) { return (dispatch) => { server.post(WATCH_COVERAGE_URL, { coverage_id: coverage.coverage_id, @@ -655,7 +655,7 @@ export function watchCoverage(coverage, item) { } export const STOP_WATCHING_COVERAGE = 'STOP_WATCHING_COVERAGE'; -export function stopWatchingCoverage(coverage, item) { +export function stopWatchingCoverage(coverage: any, item: any) { return (dispatch, getState) => { server.del(WATCH_COVERAGE_URL, { coverage_id: coverage.coverage_id, diff --git a/assets/agenda/components/AgendaCoverageExistsFilter.tsx b/assets/agenda/components/AgendaCoverageExistsFilter.tsx index 41ef97de9..458abdceb 100644 --- a/assets/agenda/components/AgendaCoverageExistsFilter.tsx +++ b/assets/agenda/components/AgendaCoverageExistsFilter.tsx @@ -17,7 +17,7 @@ const FILTER_VALUES = { NOT_PLANNED: 'not planned', }; -function getActiveFilterLabel(filter, activeFilter) { +function getActiveFilterLabel(filter: any, activeFilter: any) { const filterValue = get(activeFilter, `${filter.field}[0]`); switch (filterValue) { diff --git a/assets/agenda/components/AgendaFilters.tsx b/assets/agenda/components/AgendaFilters.tsx index 7e694dad9..d2d1f336c 100644 --- a/assets/agenda/components/AgendaFilters.tsx +++ b/assets/agenda/components/AgendaFilters.tsx @@ -112,7 +112,7 @@ const renderFilter = { ), }; -export function getDropdownItems(filter, aggregations, toggleFilter, processBuckets, props) { +export function getDropdownItems(filter: any, aggregations: any, toggleFilter: any, processBuckets: any, props: any) { if (!filter.nestedField && aggregations && aggregations[filter.field]) { return processBuckets(transformFilterBuckets(filter, aggregations, props), filter, toggleFilter); } @@ -124,7 +124,7 @@ export function getDropdownItems(filter, aggregations, toggleFilter, processBuck return []; } -function AgendaFiltersComponent(props) { +function AgendaFiltersComponent(props: any) { return (
{props.filtersConfig.map((filterName) => ( diff --git a/assets/agenda/components/AgendaMetaTime.tsx b/assets/agenda/components/AgendaMetaTime.tsx index ba4516820..b965a3499 100644 --- a/assets/agenda/components/AgendaMetaTime.tsx +++ b/assets/agenda/components/AgendaMetaTime.tsx @@ -7,7 +7,7 @@ import {formatAgendaDate, hasCoverages} from '../utils'; import AgendaItemTimeUpdater from './AgendaItemTimeUpdater'; -function format(item, group, onlyDates) { +function format(item: any, group: any, onlyDates: any) { return ( {formatAgendaDate(item, group, {onlyDates})} @@ -15,7 +15,7 @@ function format(item, group, onlyDates) { ); } -function getCalendarClass(item) { +function getCalendarClass(item: any) { if (item.state === 'rescheduled') { return 'icon--orange'; } diff --git a/assets/agenda/components/CoverageItemStatus.tsx b/assets/agenda/components/CoverageItemStatus.tsx index 9a425c270..eeff3cc81 100644 --- a/assets/agenda/components/CoverageItemStatus.tsx +++ b/assets/agenda/components/CoverageItemStatus.tsx @@ -13,11 +13,11 @@ import AgendaInternalNote from './AgendaInternalNote'; import AgendaEdNote from './AgendaEdNote'; import ActionButton from 'components/ActionButton'; -function getDeliveryHref(coverage) { +function getDeliveryHref(coverage: any) { return get(coverage, 'delivery_href'); } -function getDeliveryId(coverage) { +function getDeliveryId(coverage: any) { return get(coverage, 'delivery_id'); } diff --git a/assets/agenda/reducers.ts b/assets/agenda/reducers.ts index 78ba752a2..a614e899d 100644 --- a/assets/agenda/reducers.ts +++ b/assets/agenda/reducers.ts @@ -60,7 +60,7 @@ const initialState = { hasAgendaFeaturedItems: false, }; -function recieveItems(state, data) { +function recieveItems(state: any, data: any) { const itemsById = Object.assign({}, state.itemsById); const items = data._items.map((item) => { itemsById[item._id] = item; @@ -79,7 +79,7 @@ function recieveItems(state, data) { }; } -function _agendaReducer(state, action) { +function _agendaReducer(state: any, action: any) { switch (action.type) { case SELECT_DATE: @@ -95,7 +95,7 @@ function _agendaReducer(state, action) { } } -export default function agendaReducer(state = initialState, action) { +export default function agendaReducer(state: any = initialState, action: any) { switch (action.type) { case RECIEVE_ITEMS: diff --git a/assets/agenda/tests/CoverageItemStatus.spec.tsx b/assets/agenda/tests/CoverageItemStatus.spec.tsx index d2550e27b..b0a524d06 100644 --- a/assets/agenda/tests/CoverageItemStatus.spec.tsx +++ b/assets/agenda/tests/CoverageItemStatus.spec.tsx @@ -5,7 +5,7 @@ import CoverageItemStatus from '../components/CoverageItemStatus'; import 'tests/setup'; -function setup(coverage) { +function setup(coverage: any) { return shallow(); } diff --git a/assets/agenda/utils.ts b/assets/agenda/utils.ts index cf4d76ed9..cf5e79654 100644 --- a/assets/agenda/utils.ts +++ b/assets/agenda/utils.ts @@ -45,7 +45,7 @@ const Groupers = { 'month': formatMonth, }; -export function getCoverageStatusText(coverage) { +export function getCoverageStatusText(coverage: any) { if (coverage.workflow_status === WORKFLOW_STATUS.DRAFT) { return get(DRAFT_STATUS_TEXTS, coverage.coverage_status, ''); } @@ -116,7 +116,7 @@ export const EARLIEST_DATE = moment('20170101').valueOf(); * @param {Object} item * @return {Boolean} */ -export function isCanceled(item) { +export function isCanceled(item: any) { return item && (item.state === STATUS_CANCELED || item.state === STATUS_KILLED); } @@ -126,7 +126,7 @@ export function isCanceled(item) { * @param {Object} item * @return {Boolean} */ -export function isPostponed(item) { +export function isPostponed(item: any) { return item && item.state === STATUS_POSTPONED; } @@ -136,7 +136,7 @@ export function isPostponed(item) { * @param {Object} item * @return {Boolean} */ -export function isRescheduled(item) { +export function isRescheduled(item: any) { return item && item.state === STATUS_RESCHEDULED; } @@ -146,7 +146,7 @@ export function isRescheduled(item) { * @param {Object} item * @return {Boolean} */ -export function hasCoverages(item) { +export function hasCoverages(item: any) { return !isEmpty(get(item, 'coverages')); } @@ -156,7 +156,7 @@ export function hasCoverages(item) { * @param coverageType * @returns {*} */ -export function getCoverageIcon(coverageType) { +export function getCoverageIcon(coverageType: any) { const coverageTypes = getConfig('coverage_types', {}); return get(coverageTypes, `${coverageType}.icon`, 'unrecognized'); } @@ -167,7 +167,7 @@ export function getCoverageIcon(coverageType) { * @param coverageType * @returns {*} */ -export function getCoverageDisplayName(coverageType) { +export function getCoverageDisplayName(coverageType: any) { const coverageTypes = getConfig('coverage_types', {}); const locale = (window.locale || 'en').toLowerCase(); @@ -182,7 +182,7 @@ export function getCoverageDisplayName(coverageType) { * @param {String} userId * @return {Boolean} */ -export function isWatched(item, userId) { +export function isWatched(item: any, userId: any) { return userId && includes(get(item, 'watches', []), userId); } @@ -193,7 +193,7 @@ export function isWatched(item, userId) { * @param {String} dateString * @return {Boolean} */ -export function isCoverageForExtraDay(coverage) { +export function isCoverageForExtraDay(coverage: any) { return coverage.scheduled != null; } @@ -203,7 +203,7 @@ export function isCoverageForExtraDay(coverage) { * @param {Object} item * @return {Boolean} */ -export function isRecurring(item) { +export function isRecurring(item: any) { return item && !!item.recurrence_id; } @@ -213,7 +213,7 @@ export function isRecurring(item) { * @param {Object} item * @return {String} */ -export function getGeoLocation(item) { +export function getGeoLocation(item: any) { return get(item, 'location.location', null); } @@ -223,7 +223,7 @@ export function getGeoLocation(item) { * @param {Object} item * @return {String} */ -export function getLocationString(item) { +export function getLocationString(item: any) { return [ get(item, 'location.0.name', get(item, 'location.0.address.title')), get(item, 'location.0.address.line.0'), @@ -240,11 +240,11 @@ export function getLocationString(item) { * @param {Object} item * @return {Boolean} */ -export function hasLocation(item) { +export function hasLocation(item: any) { return !!getLocationString(item); } -export function hasLocationNotes(item) { +export function hasLocationNotes(item: any) { return get(item, 'location[0].details[0].length', 0) > 0; } @@ -254,7 +254,7 @@ export function hasLocationNotes(item) { * @param {Object} item * @return {String} */ -export function getPublicContacts(item) { +export function getPublicContacts(item: any) { const contacts = get(item, 'event.event_contact_info', []); return contacts.filter(c => c.public).map(c => ({ name: [c.first_name, c.last_name].filter((x) => !!x).join(' '), @@ -271,24 +271,24 @@ export function getPublicContacts(item) { * @param {Object} item * @return {String} */ -export function getCalendars(item) { +export function getCalendars(item: any) { return (get(item, 'calendars') || []).map(cal => cal.name).join(', '); } -export function getAgendaNames(item) { +export function getAgendaNames(item: any) { return (get(item, 'agendas') || []) .map((agenda) => agenda.name) .join(', '); } -export function isPlanningItem(item) { +export function isPlanningItem(item: any) { return item.item_type === 'planning' || ( item.item_type == null && item.event_id == null ); } -export function planHasEvent(item) { +export function planHasEvent(item: any) { return isPlanningItem(item) && item.event_id != null; } @@ -298,7 +298,7 @@ export function planHasEvent(item) { * @param {Object} item * @return {String} */ -export function getEventLinks(item) { +export function getEventLinks(item: any) { return get(item, 'event.links') || []; } @@ -309,7 +309,7 @@ export function getEventLinks(item) { * @param {String} dateString * @return {String} */ -export function formatNavigationDate(dateString, grouping) { +export function formatNavigationDate(dateString: any, grouping: any) { return navigationFunctions[grouping].format(dateString); } @@ -320,7 +320,7 @@ export function formatNavigationDate(dateString, grouping) { * @param {String} dateString * @return {String} */ -export function getDateInputDate(dateString) { +export function getDateInputDate(dateString: any) { if (dateString) { const parsed = moment(parseInt(dateString)); return parsed.format('YYYY-MM-DD'); @@ -335,7 +335,7 @@ export function getDateInputDate(dateString) { * @param {String} dateString * @return {String} */ -export function getMomentDate(dateString) { +export function getMomentDate(dateString: any) { if (dateString) { return moment(parseInt(dateString)); } @@ -349,7 +349,7 @@ export function getMomentDate(dateString) { * @param {String} dateString * @return {String} number of milliseconds since the Unix Epoch */ -function getNextDay(dateString) { +function getNextDay(dateString: any) { return moment(dateString).add(1, 'days').valueOf(); } @@ -360,7 +360,7 @@ function getNextDay(dateString) { * @param {String} dateString * @return {String} number of milliseconds since the Unix Epoch */ -function getPreviousDay(dateString) { +function getPreviousDay(dateString: any) { return moment(dateString).add(-1, 'days').valueOf(); } @@ -370,7 +370,7 @@ function getPreviousDay(dateString) { * @param {String} dateString * @return {String} number of milliseconds since the Unix Epoch */ -function getNextWeek(dateString) { +function getNextWeek(dateString: any) { return moment(dateString).add(7, 'days').isoWeekday(1).valueOf(); } @@ -381,7 +381,7 @@ function getNextWeek(dateString) { * @param {String} dateString * @return {String} number of milliseconds since the Unix Epoch */ -function getPreviousWeek(dateString) { +function getPreviousWeek(dateString: any) { return moment(dateString).add(-7, 'days').isoWeekday(1).valueOf(); } @@ -391,7 +391,7 @@ function getPreviousWeek(dateString) { * @param {String} dateString * @return {String} number of milliseconds since the Unix Epoch */ -function getNextMonth(dateString) { +function getNextMonth(dateString: any) { return moment(dateString).add(1, 'months').startOf('month').valueOf(); } @@ -402,7 +402,7 @@ function getNextMonth(dateString) { * @param {String} dateString * @return {String} number of milliseconds since the Unix Epoch */ -export function getPreviousMonth(dateString) { +export function getPreviousMonth(dateString: any) { return moment(dateString).add(-1, 'months').startOf('month').valueOf(); } @@ -413,7 +413,7 @@ export function getPreviousMonth(dateString) { * @param {String} grouping: day, week or month * @return {String} number of milliseconds since the Unix Epoch */ -export function getNext(dateString, grouping) { +export function getNext(dateString: any, grouping: any) { return navigationFunctions[grouping].next(dateString); } @@ -424,7 +424,7 @@ export function getNext(dateString, grouping) { * @param {String} grouping: day, week or month * @return {String} number of milliseconds since the Unix Epoch */ -export function getPrevious(dateString, grouping) { +export function getPrevious(dateString: any, grouping: any) { return navigationFunctions[grouping].previous(dateString); } @@ -434,7 +434,7 @@ export function getPrevious(dateString, grouping) { * @param {Object} item * @return {Array} */ -export function getAttachments(item) { +export function getAttachments(item: any) { return get(item, 'event.files', []); } @@ -444,7 +444,7 @@ export function getAttachments(item) { * @param {Object} item * @return {Array} */ -export function getInternalNote(item, plan) { +export function getInternalNote(item: any, plan: any) { return get(plan, 'internal_note') || get(item, 'event.internal_note'); } @@ -454,7 +454,7 @@ export function getInternalNote(item, plan) { * @param {Object} item * @return {Object} */ -export function getDataFromCoverages(item) { +export function getDataFromCoverages(item: any) { const planningItems = get(item, 'planning_items', []); let data = { 'internal_note': {}, @@ -532,7 +532,7 @@ const getNextPendingScheduledUpdate = (coverage) => { * @param {Object} item * @return {Array} */ -export function getSubjects(item) { +export function getSubjects(item: any) { return get(item, 'subject') || []; } @@ -542,7 +542,7 @@ export function getSubjects(item) { * @param {Object} item * @return {Boolean} */ -export function hasAttachments(item) { +export function hasAttachments(item: any) { return !isEmpty(getAttachments(item)); } @@ -552,7 +552,7 @@ export function hasAttachments(item) { * @param {Object} item * @return {String} */ -export function getName(item) { +export function getName(item: any) { return item.name || item.slugline || item.headline; } @@ -563,7 +563,7 @@ export function getName(item) { * @param {Object} plan * @return {String} */ -export function getDescription(item, plan) { +export function getDescription(item: any, plan: any) { return plan.description_text || item.definition_short; } @@ -574,7 +574,7 @@ export function getDescription(item, plan) { * @param {Object} item * @return {Array} list of dates */ -export function getExtraDates(item) { +export function getExtraDates(item: any) { return getDisplayDates(item).map((ed) => moment(ed.date)); } @@ -583,7 +583,7 @@ export function getExtraDates(item) { * @param item: Event or Planning item * @returns {Array.<{date: moment.Moment}>} */ -export function getDisplayDates(item) { +export function getDisplayDates(item: any) { const matchedPlanning = get(item, '_hits.matched_planning_items'); if (matchedPlanning == null) { @@ -629,7 +629,7 @@ export function getDisplayDates(item) { * @param {Date} date to check (moment) * @return {Boolean} */ -export function containsExtraDate(item, dateToCheck) { +export function containsExtraDate(item: any, dateToCheck: any) { return getDisplayDates(item).map(ed => moment(ed.date).format('YYYY-MM-DD')).includes(dateToCheck.format('YYYY-MM-DD')); } @@ -658,7 +658,7 @@ const isBetweenDay = (day, start, end) => { * @param activeDate: date that the grouping will start from * @param activeGrouping: type of grouping i.e. day, week, month */ -export function groupItems(items, activeDate, activeGrouping, featuredOnly) { +export function groupItems(items: any, activeDate: any, activeGrouping: any, featuredOnly: any) { const maxStart = moment(activeDate).set({'h': 0, 'm': 0, 's': 0}); const groupedItems = {}; const grouper = Groupers[activeGrouping]; @@ -738,7 +738,7 @@ export function groupItems(items, activeDate, activeGrouping, featuredOnly) { * @param item: Agenda item * @param group: Group Date */ -export function getPlanningItemsByGroup(item, group) { +export function getPlanningItemsByGroup(item: any, group: any) { const planningItems = get(item, 'planning_items') || []; if (planningItems.length === 0) { @@ -769,7 +769,7 @@ export function getPlanningItemsByGroup(item, group) { return [...plansWithCoverages, ...plansWithoutCoverages]; } -export function isCoverageOnPreviousDay(coverage, group) { +export function isCoverageOnPreviousDay(coverage: any, group: any) { return ( coverage.scheduled != null && moment(coverage.scheduled).isBefore(moment(group, DATE_FORMAT), 'day') @@ -777,7 +777,7 @@ export function isCoverageOnPreviousDay(coverage, group) { } -export function getCoveragesForDisplay(item, plan, group) { +export function getCoveragesForDisplay(item: any, plan: any, group: any) { const currentCoverage = []; const previousCoverage = []; // get current and preview coverages @@ -797,7 +797,7 @@ export function getCoveragesForDisplay(item, plan, group) { return {current: currentCoverage, previous: previousCoverage}; } -export function getListItems(groups, itemsById) { +export function getListItems(groups: any, itemsById: any) { const listItems = []; groups.forEach((group) => { @@ -815,7 +815,7 @@ export function getListItems(groups, itemsById) { return listItems; } -export function isCoverageBeingUpdated(coverage) { +export function isCoverageBeingUpdated(coverage: any) { return get(coverage, 'deliveries[0].delivery_state', null) && !['published', 'corrected'].includes(coverage.deliveries[0].delivery_state); } @@ -852,7 +852,7 @@ export const isItemTBC = (item) => ( * @param {String} dateString * @return {String} */ -export function formatCoverageDate(coverage) { +export function formatCoverageDate(coverage: any) { return get(coverage, TO_BE_CONFIRMED_FIELD) ? `${parseDate(coverage.scheduled).format(COVERAGE_DATE_FORMAT)} ${TO_BE_CONFIRMED_TEXT}` : parseDate(coverage.scheduled).format(COVERAGE_DATE_TIME_FORMAT); @@ -904,7 +904,7 @@ export const getCoverageTooltip = (coverage, beingUpdated) => { return gettext('{{ type }} coverage', {type: coverageType}); }; -function getScheduleType(item) { +function getScheduleType(item: any) { const start = moment(item.dates.start) const end = moment(item.dates.end); const duration = end.diff(start, 'minutes'); @@ -940,7 +940,7 @@ function getScheduleType(item) { * @param {Object} options * @return {Array} [time string, date string] */ -export function formatAgendaDate(item, group, {localTimeZone = true, onlyDates = false} = {}) { +export function formatAgendaDate(item: any, group: any, {localTimeZone = true, onlyDates = false}) { const getFormattedTimezone = (date) => { let tzStr = date.format('z'); if (tzStr.indexOf('+0') >= 0) { diff --git a/assets/cards/actions.ts b/assets/cards/actions.ts index 7cdbbbbb8..ab7aca62d 100644 --- a/assets/cards/actions.ts +++ b/assets/cards/actions.ts @@ -5,12 +5,12 @@ import {searchQuerySelector} from 'search/selectors'; export const SELECT_CARD = 'SELECT_CARD'; -export function selectCard(id) { +export function selectCard(id: any) { return {type: SELECT_CARD, id}; } export const EDIT_CARD = 'EDIT_CARD'; -export function editCard(event) { +export function editCard(event: any) { return {type: EDIT_CARD, event}; } @@ -20,7 +20,7 @@ export function newCard() { } export const CANCEL_EDIT = 'CANCEL_EDIT'; -export function cancelEdit(event) { +export function cancelEdit(event: any) { return {type: CANCEL_EDIT, event}; } @@ -30,22 +30,22 @@ export function queryCards() { } export const GET_CARDS = 'GET_CARDS'; -export function getCards(data) { +export function getCards(data: any) { return {type: GET_CARDS, data}; } export const GET_PRODUCTS = 'GET_PRODUCTS'; -export function getProducts(data) { +export function getProducts(data: any) { return {type: GET_PRODUCTS, data}; } export const SET_ERROR = 'SET_ERROR'; -export function setError(errors) { +export function setError(errors: any) { return {type: SET_ERROR, errors}; } export const GET_NAVIGATIONS = 'GET_NAVIGATIONS'; -export function getNavigations(data) { +export function getNavigations(data: any) { return {type: GET_NAVIGATIONS, data}; } @@ -176,7 +176,7 @@ export function fetchProducts() { } -export function initViewData(data) { +export function initViewData(data: any) { return function (dispatch) { dispatch(getCards(data.cards)); dispatch(getProducts(data.products)); diff --git a/assets/cards/components/CardListItem.tsx b/assets/cards/components/CardListItem.tsx index 15c8406d9..208e27396 100644 --- a/assets/cards/components/CardListItem.tsx +++ b/assets/cards/components/CardListItem.tsx @@ -4,7 +4,7 @@ import {shortDate} from 'utils'; import {gettext} from '../../utils'; -function getProductName(products, id) { +function getProductName(products: any, id: any) { const product = products.find((product) => product._id == id); return product && product.name; } diff --git a/assets/cards/reducers.ts b/assets/cards/reducers.ts index e77d0e9e2..507756d9c 100644 --- a/assets/cards/reducers.ts +++ b/assets/cards/reducers.ts @@ -32,7 +32,7 @@ const initialState = { search: searchReducer(), }; -export default function cardReducer(state = initialState, action) { +export default function cardReducer(state: any = initialState, action: any) { switch (action.type) { case SELECT_CARD: { diff --git a/assets/companies/actions.ts b/assets/companies/actions.ts index 22be79a14..ba2d00de7 100644 --- a/assets/companies/actions.ts +++ b/assets/companies/actions.ts @@ -4,29 +4,29 @@ import {searchQuerySelector} from 'search/selectors'; export const SELECT_COMPANY = 'SELECT_COMPANY'; -export function selectCompany(id) { +export function selectCompany(id: any) { return function (dispatch) { dispatch(select(id)); dispatch(fetchCompanyUsers(id)); }; } -function select(id) { +function select(id: any) { return {type: SELECT_COMPANY, id}; } export const EDIT_COMPANY = 'EDIT_COMPANY'; -export function editCompany(event) { +export function editCompany(event: any) { return {type: EDIT_COMPANY, event}; } export const NEW_COMPANY = 'NEW_COMPANY'; -export function newCompany(data) { +export function newCompany(data: any) { return {type: NEW_COMPANY, data}; } export const CANCEL_EDIT = 'CANCEL_EDIT'; -export function cancelEdit(event) { +export function cancelEdit(event: any) { return {type: CANCEL_EDIT, event}; } @@ -36,22 +36,22 @@ export function queryCompanies() { } export const GET_COMPANIES = 'GET_COMPANIES'; -export function getCompanies(data) { +export function getCompanies(data: any) { return {type: GET_COMPANIES, data}; } export const GET_COMPANY_USERS = 'GET_COMPANY_USERS'; -export function getCompanyUsers(data) { +export function getCompanyUsers(data: any) { return {type: GET_COMPANY_USERS, data}; } export const GET_PRODUCTS = 'GET_PRODUCTS'; -export function getProducts(data) { +export function getProducts(data: any) { return {type: GET_PRODUCTS, data}; } export const SET_ERROR = 'SET_ERROR'; -export function setError(errors) { +export function setError(errors: any) { return {type: SET_ERROR, errors}; } @@ -78,7 +78,7 @@ export function fetchCompanies() { * * @param {String} companyId */ -export function fetchCompanyUsers(companyId, force = false) { +export function fetchCompanyUsers(companyId: any, force: any = false) { return function (dispatch, getState) { if (!force && !getState().companiesById[companyId].name) { return; @@ -97,7 +97,7 @@ export function fetchCompanyUsers(companyId, force = false) { * Creates new company * */ -export function postCompany(permissions = null) { +export function postCompany(permissions: any = null) { return function (dispatch, getState) { const company = getState().companyToEdit; @@ -142,7 +142,7 @@ export function fetchProducts() { * Save permissions for a company * */ -export function savePermissions(company, permissions) { +export function savePermissions(company: any, permissions: any) { return function (dispatch) { return server.post(`/companies/${company._id}/permissions`, permissions) .catch((error) => errorHandler(error, dispatch, setError)); @@ -177,6 +177,6 @@ export function deleteCompany() { } export const INIT_VIEW_DATA = 'INIT_VIEW_DATA'; -export function initViewData(data) { +export function initViewData(data: any) { return {type: INIT_VIEW_DATA, data}; } diff --git a/assets/companies/components/EditCompany.tsx b/assets/companies/components/EditCompany.tsx index 3e4fbde52..369c88f55 100644 --- a/assets/companies/components/EditCompany.tsx +++ b/assets/companies/components/EditCompany.tsx @@ -19,7 +19,7 @@ import EditCompanyAPI from './EditCompanyAPI'; import AuditInformation from 'components/AuditInformation'; import {EditCompanyDetails} from './EditCompanyDetails'; -function deriveInitialPermissionState(company, sectionList, productList) { +function deriveInitialPermissionState(company: any, sectionList: any, productList: any) { const sections = {}; const products = {}; const seats = {}; diff --git a/assets/companies/reducers.ts b/assets/companies/reducers.ts index 6d4a3cd93..60787b384 100644 --- a/assets/companies/reducers.ts +++ b/assets/companies/reducers.ts @@ -30,7 +30,7 @@ const initialState = { search: searchReducer(), }; -function setupCompanies(companyList, state) { +function setupCompanies(companyList: any, state: any) { const companiesById = {}; const companyOptions = []; const companies = companyList.map((company) => { @@ -49,7 +49,7 @@ function setupCompanies(companyList, state) { }; } -export default function companyReducer(state = initialState, action) { +export default function companyReducer(state: any = initialState, action: any) { switch (action.type) { case SELECT_COMPANY: { diff --git a/assets/companies/utils.ts b/assets/companies/utils.ts index 61d88e9f6..57e7b2ef3 100644 --- a/assets/companies/utils.ts +++ b/assets/companies/utils.ts @@ -7,10 +7,10 @@ export const countries = [ {value: 'other', text: gettext('Other')}, ]; -export function getCountryLabel(code) { +export function getCountryLabel(code: any) { return (countries.find(c => c.value === code) || {}).text; } -export function isProductEnabled(products, productId) { +export function isProductEnabled(products: any, productId: any) { return products.findIndex((product) => product._id === productId) !== -1; } diff --git a/assets/company-admin/actions.ts b/assets/company-admin/actions.ts index 5f09b58d1..500e0974a 100644 --- a/assets/company-admin/actions.ts +++ b/assets/company-admin/actions.ts @@ -3,7 +3,7 @@ import server from 'server'; import {initViewData as initUserViewData, setError, fetchUsers} from 'users/actions'; export const INIT_VIEW_DATA = 'INIT_VIEW_DATA'; -export function initViewData(data) { +export function initViewData(data: any) { return (dispatch) => { dispatch({type: INIT_VIEW_DATA, data: data}); dispatch(initUserViewData(data)); @@ -11,19 +11,19 @@ export function initViewData(data) { } export const SET_SECTION = 'SET_SECTION'; -export function setSection(id) { +export function setSection(id: any) { return {type: SET_SECTION, id: id}; } export const SET_PRODUCT_FILTER = 'SET_PRODUCT_FILTER'; -export function setProductFilter(id) { +export function setProductFilter(id: any) { return function(dispatch) { dispatch({type: SET_PRODUCT_FILTER, id: id}); dispatch(fetchUsers()); }; } -export function sendProductSeatRequest(data) { +export function sendProductSeatRequest(data: any) { return function (dispatch) { return server.post('/company_admin/send_product_seat_request', data) .then(() => notify.success(gettext('Product Seat request sent'))) diff --git a/assets/company-admin/components/CompanyUserListItem.tsx b/assets/company-admin/components/CompanyUserListItem.tsx index afd285f1a..0d08e8441 100644 --- a/assets/company-admin/components/CompanyUserListItem.tsx +++ b/assets/company-admin/components/CompanyUserListItem.tsx @@ -4,7 +4,7 @@ import classNames from 'classnames'; import {gettext, fullDate} from 'utils'; -export function getUserStateLabelDetails(user) { +export function getUserStateLabelDetails(user: any) { if (user.is_approved && user.is_enabled && user.is_validated) { return { colour: 'green', diff --git a/assets/company-admin/reducers.ts b/assets/company-admin/reducers.ts index c0a8b622c..5a6f50706 100644 --- a/assets/company-admin/reducers.ts +++ b/assets/company-admin/reducers.ts @@ -30,7 +30,7 @@ const initialState = { productId: null, }; -export function companyAdminReducer(state = initialState, action) { +export function companyAdminReducer(state: any = initialState, action: any) { switch (action.type) { case INIT_VIEW_DATA: return { diff --git a/assets/company-reports/actions.ts b/assets/company-reports/actions.ts index 9beeca5a5..658f97df1 100644 --- a/assets/company-reports/actions.ts +++ b/assets/company-reports/actions.ts @@ -29,7 +29,7 @@ export const REPORTS = { [REPORTS_NAMES.EXPIRED_COMPANIES]: '/reports/expired-companies', }; -function getReportQueryString(currentState, next, exportReport, notify) { +function getReportQueryString(currentState: any, next: any, exportReport: any, notify: any) { let params = cloneDeep(currentState.reportParams); if (params) { if (params.company) { @@ -70,7 +70,7 @@ function getReportQueryString(currentState, next, exportReport, notify) { } export const INIT_DATA = 'INIT_DATA'; -export function initData(data) { +export function initData(data: any) { return function (dispatch) { dispatch(fetchProducts()); dispatch({type: INIT_DATA, data}); @@ -83,32 +83,32 @@ export function queryReport() { } export const SET_ACTIVE_REPORT = 'SET_ACTIVE_REPORT'; -export function setActiveReport(data) { +export function setActiveReport(data: any) { return {type: SET_ACTIVE_REPORT, data}; } export const RECEIVED_DATA = 'RECEIVED_DATA'; -export function receivedData(data) { +export function receivedData(data: any) { return {type: RECEIVED_DATA, data}; } export const ADD_RESULTS = 'ADD_RESULTS'; -export function addResults(results) { +export function addResults(results: any) { return {type: ADD_RESULTS, data: results}; } export const SET_ERROR = 'SET_ERROR'; -export function setError(errors) { +export function setError(errors: any) { return {type: SET_ERROR, errors}; } export const SET_IS_LOADING = 'SET_IS_LOADING'; -export function isLoading(data = false) { +export function isLoading(data: any = false) { return {type: SET_IS_LOADING, data}; } export const GET_PRODUCTS = 'GET_PRODUCTS'; -export function getProducts(data) { +export function getProducts(data: any) { return {type: GET_PRODUCTS, data}; } @@ -119,7 +119,7 @@ export function runReport() { }; } -export function fetchAggregations(url) { +export function fetchAggregations(url: any) { return function(dispatch, getState) { let queryString = getReportQueryString(getState(), 0, false, notify); @@ -137,7 +137,7 @@ export function fetchAggregations(url) { * Fetches the report data * */ -export function fetchReport(url, next, exportReport) { +export function fetchReport(url: any, next: any, exportReport: any) { return function (dispatch, getState) { if (next) { dispatch(isLoading(next)); @@ -175,7 +175,7 @@ export function fetchReport(url, next, exportReport) { } export const TOGGLE_REPORT_FILTER = 'TOGGLE_REPORT_FILTER'; -export function toggleFilter(filter, value) { +export function toggleFilter(filter: any, value: any) { return { type: TOGGLE_REPORT_FILTER, data: { @@ -185,7 +185,7 @@ export function toggleFilter(filter, value) { }; } -export function toggleFilterAndQuery(filter, value) { +export function toggleFilterAndQuery(filter: any, value: any) { return function (dispatch) { dispatch(toggleFilter(filter, value)); return dispatch(runReport()); diff --git a/assets/company-reports/components/Company.tsx b/assets/company-reports/components/Company.tsx index 458ddda2b..2ccf6eb3d 100644 --- a/assets/company-reports/components/Company.tsx +++ b/assets/company-reports/components/Company.tsx @@ -5,7 +5,7 @@ import {get, groupBy} from 'lodash'; import ReportsTable from './ReportsTable'; -function getProductDetails(products = []) { +function getProductDetails(products: any = []) { const productsByGroup = groupBy(products, (p) => p.product_type); const getProductSectionName = (productType) => { if (productType === 'am_news') { @@ -30,7 +30,7 @@ function getProductDetails(products = []) {
); } -function getContactDetails(company) { +function getContactDetails(company: any) { const contactInfo = company.contact_email ? `${company.contact_name} (${company.contact_email})` : company.contact_name; return (
@@ -39,7 +39,7 @@ function getContactDetails(company) {
); } -function getUsers(users = []) { +function getUsers(users: any = []) { const usersInfo = users.length <= 0 ? '-' : users.map((u) => `${u.first_name} ${u.last_name} (${u.email})`).join(', '); diff --git a/assets/company-reports/components/CompanyProducts.tsx b/assets/company-reports/components/CompanyProducts.tsx index 3e9a6e551..b4ea92769 100644 --- a/assets/company-reports/components/CompanyProducts.tsx +++ b/assets/company-reports/components/CompanyProducts.tsx @@ -5,7 +5,7 @@ import ReportsTable from './ReportsTable'; import {gettext} from 'utils'; -function getProductDetails(products) { +function getProductDetails(products: any) { return (products.map((product) => (
{gettext('Product name')}: {product.name}
{gettext('Is enabled')}:{product.is_enabled.toString()}
diff --git a/assets/company-reports/reducers.ts b/assets/company-reports/reducers.ts index 9ea568802..e2216dde2 100644 --- a/assets/company-reports/reducers.ts +++ b/assets/company-reports/reducers.ts @@ -34,7 +34,7 @@ const initialState = { }; -export default function companyReportReducer(state = initialState, action) { +export default function companyReportReducer(state: any = initialState, action: any) { switch (action.type) { case INIT_DATA: diff --git a/assets/components/BookmarkTabs.tsx b/assets/components/BookmarkTabs.tsx index 6c3d69f96..c06daa1bb 100644 --- a/assets/components/BookmarkTabs.tsx +++ b/assets/components/BookmarkTabs.tsx @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import {gettext} from '../utils'; -export default function BookmarkTabs(props) { +export default function BookmarkTabs(props: any) { const sections = Object.keys(props.sections).map((id) => { const section = props.sections[id]; diff --git a/assets/components/DropdownFilter.tsx b/assets/components/DropdownFilter.tsx index 66df25ce6..b1452cc47 100644 --- a/assets/components/DropdownFilter.tsx +++ b/assets/components/DropdownFilter.tsx @@ -22,7 +22,7 @@ export const processBuckets = (buckets, filter, toggleFilter) => (filter.notSort >{filter.transform ? filter.transform(bucket.key, bucket) : bucket.key}); -function getActiveFilterLabel(filter, activeFilter, isActive) { +function getActiveFilterLabel(filter: any, activeFilter: any, isActive: any) { if (isActive) { return filter.transform ? filter.transform(activeFilter[filter.field][0]) : gettext(activeFilter[filter.field][0]); } diff --git a/assets/components/Modal.tsx b/assets/components/Modal.tsx index 6d00644e7..6cfe45ae8 100644 --- a/assets/components/Modal.tsx +++ b/assets/components/Modal.tsx @@ -67,7 +67,7 @@ ModalSecondaryButton.propTypes = { * @param {string} type * @param {func} onClick */ -function assertButtonHandler(label, type, onClick) { +function assertButtonHandler(label: any, type: any, onClick: any) { if (!type && !onClick) { console.warn('You should use either type or onClick handler for button', label); } diff --git a/assets/domUtils.ts b/assets/domUtils.ts index 3589d8fef..b450fdfc0 100644 --- a/assets/domUtils.ts +++ b/assets/domUtils.ts @@ -1,5 +1,5 @@ -export function setElementStyle(selector, field, value) { +export function setElementStyle(selector: any, field: any, value: any) { const ele = document.querySelector(selector); if (ele) { @@ -7,13 +7,13 @@ export function setElementStyle(selector, field, value) { } } -export function elementHasClass(selector, className) { +export function elementHasClass(selector: any, className: any) { const ele = document.querySelector(selector); return ele && ele.classList.contains(className); } -export function replaceElementClasses(selector, classNames) { +export function replaceElementClasses(selector: any, classNames: any) { const ele = document.querySelector(selector); if (ele) { @@ -21,7 +21,7 @@ export function replaceElementClasses(selector, classNames) { } } -export function removeElementClass(selector, className) { +export function removeElementClass(selector: any, className: any) { const ele = document.querySelector(selector); if (ele) { @@ -29,7 +29,7 @@ export function removeElementClass(selector, className) { } } -export function onElementClicked(selector, callback) { +export function onElementClicked(selector: any, callback: any) { const ele = document.querySelector(selector); if (ele) { diff --git a/assets/features/dashboard/actions.ts b/assets/features/dashboard/actions.ts index e9f43523b..03b77c0b6 100644 --- a/assets/features/dashboard/actions.ts +++ b/assets/features/dashboard/actions.ts @@ -1,10 +1,10 @@ export const INIT_DASHBOARD = 'INIT_DASHBOARD'; -export function initDashboard(dashboards) { +export function initDashboard(dashboards: any) { return {type: INIT_DASHBOARD, dashboards: dashboards}; } export const SELECT_DASHBOARD = 'SELECT_DASHBOARD'; -export function selectDashboard(dashboard) { +export function selectDashboard(dashboard: any) { return {type: SELECT_DASHBOARD, dashboard: dashboard}; } diff --git a/assets/features/dashboard/reducers.ts b/assets/features/dashboard/reducers.ts index 97f4fd0b6..f1a8ede14 100644 --- a/assets/features/dashboard/reducers.ts +++ b/assets/features/dashboard/reducers.ts @@ -8,7 +8,7 @@ const INITIAL_STATE = { active: '', }; -export function dashboardReducer(state=INITIAL_STATE, action) { +export function dashboardReducer(state: any = INITIAL_STATE, action: any) { if (!action) { return state; } diff --git a/assets/features/sections/actions.ts b/assets/features/sections/actions.ts index a790f383d..8ee5a6e15 100644 --- a/assets/features/sections/actions.ts +++ b/assets/features/sections/actions.ts @@ -1,10 +1,10 @@ export const INIT_SECTIONS = 'INIT_SECTIONS'; -export function initSections(sections) { +export function initSections(sections: any) { return {type: INIT_SECTIONS, sections: sections}; } export const SELECT_SECTION = 'SELECT_SECTION'; -export function selectSection(section) { +export function selectSection(section: any) { return {type: SELECT_SECTION, section: section}; } diff --git a/assets/features/sections/reducers.ts b/assets/features/sections/reducers.ts index 2d5a8a417..7140fec67 100644 --- a/assets/features/sections/reducers.ts +++ b/assets/features/sections/reducers.ts @@ -8,7 +8,7 @@ const INITIAL_STATE = { active: '', }; -export function sectionsReducer(state=INITIAL_STATE, action) { +export function sectionsReducer(state: any = INITIAL_STATE, action: any) { if (!action) { return state; } diff --git a/assets/general-settings/actions.ts b/assets/general-settings/actions.ts index 5de8fb9f8..a7403a2d1 100644 --- a/assets/general-settings/actions.ts +++ b/assets/general-settings/actions.ts @@ -3,11 +3,11 @@ import {errorHandler} from '../utils'; import {gettext, notify} from 'utils'; export const UPDATE_VALUES = 'UPDATE_VALUES'; -function updateValues(data) { +function updateValues(data: any) { return {type: UPDATE_VALUES, data}; } -export function save(values) { +export function save(values: any) { return (dispatch) => { server.post('/settings/general_settings', values) .then((data) => { @@ -18,6 +18,6 @@ export function save(values) { } export const INIT_VIEW_DATA = 'INIT_VIEW_DATA'; -export function initViewData(data) { +export function initViewData(data: any) { return {type: INIT_VIEW_DATA, data: data}; } diff --git a/assets/general-settings/components/GeneralSettingsApp.tsx b/assets/general-settings/components/GeneralSettingsApp.tsx index 109b0e54e..613f21f7a 100644 --- a/assets/general-settings/components/GeneralSettingsApp.tsx +++ b/assets/general-settings/components/GeneralSettingsApp.tsx @@ -10,7 +10,7 @@ import TextInput from 'components/TextInput'; import CheckboxInput from 'components/CheckboxInput'; import AuditInformation from 'components/AuditInformation'; -function isInput(field) { +function isInput(field: any) { return ['text', 'number', 'boolean'].includes(field.type); } diff --git a/assets/general-settings/reducers.ts b/assets/general-settings/reducers.ts index 421cbf759..011487019 100644 --- a/assets/general-settings/reducers.ts +++ b/assets/general-settings/reducers.ts @@ -8,7 +8,7 @@ const initialState = { config: {}, }; -export default function settingsReducer(state=initialState, action) { +export default function settingsReducer(state: any = initialState, action: any) { switch (action.type) { case INIT_VIEW_DATA: diff --git a/assets/home/reducers.ts b/assets/home/reducers.ts index 42b470f0a..0e394273c 100644 --- a/assets/home/reducers.ts +++ b/assets/home/reducers.ts @@ -20,7 +20,7 @@ const initialState = { uiConfig: {}, }; -export default function homeReducer(state=initialState, action) { +export default function homeReducer(state: any = initialState, action: any) { switch (action.type) { diff --git a/assets/home/utils.ts b/assets/home/utils.ts index 8cd4f8b73..967e27e40 100644 --- a/assets/home/utils.ts +++ b/assets/home/utils.ts @@ -1,6 +1,6 @@ import {get} from 'lodash'; -export function getNavigationImageUrl(navigation) { +export function getNavigationImageUrl(navigation: any) { if (get(navigation, 'tile_images.length', 0) === 0) { return null; } diff --git a/assets/item-actions.ts b/assets/item-actions.ts index d35a7de4a..ca9f6cba0 100644 --- a/assets/item-actions.ts +++ b/assets/item-actions.ts @@ -1,6 +1,6 @@ import {gettext, isActionEnabled} from './utils'; -export function getItemActions(dispatch, actions) { +export function getItemActions(dispatch: any, actions: any) { const { openItem, shareItems, diff --git a/assets/local-store.ts b/assets/local-store.ts index 9da6d8b79..3553f4d60 100644 --- a/assets/local-store.ts +++ b/assets/local-store.ts @@ -33,7 +33,7 @@ export function getReadItems() { * @param {Object} item * @param {Object} state */ -export function markItemAsRead(item, state) { +export function markItemAsRead(item: any, state: any) { if (item && item._id) { const readItems = get(state, 'readItems', getReadItems()) || {}; @@ -94,13 +94,13 @@ export function toggleFeaturedOnlyParam() { store.assign(FEATURED_ONLY_STORE, {value: !getFeaturedOnlyParam()}); } -export function getFilterPanelOpenState(context) { +export function getFilterPanelOpenState(context: any) { const defaultValue = get(getConfig('filter_panel_defaults') || {}, `open.${context}`, false); return get(store.get(FILTER_PANEL_OPEN), context, defaultValue); } -export function setFilterPanelOpenState(open, context) { +export function setFilterPanelOpenState(open: any, context: any) { const filterTabs = {...store.get(FILTER_PANEL_OPEN) || {}}; filterTabs[context] = open; @@ -112,7 +112,7 @@ export function setFilterPanelOpenState(open, context) { * * @returns {boolean} */ -export function getActiveFilterTab(context) { +export function getActiveFilterTab(context: any) { const defaultValue = get(getConfig('filter_panel_defaults') || {}, `tab.${context}`, 'nav'); return get(store.get(FILTER_TAB), context, defaultValue); @@ -122,7 +122,7 @@ export function getActiveFilterTab(context) { * Set active filter tab * */ -export function setActiveFilterTab(tab, context) { +export function setActiveFilterTab(tab: any, context: any) { let filterTabs = {...store.get(FILTER_TAB) || {}}; filterTabs[context] = tab; store.assign(FILTER_TAB, filterTabs); @@ -136,7 +136,7 @@ export function setActiveFilterTab(tab, context) { * @param versionB * @returns {number} */ -export function getMaxVersion(versionA, versionB) { +export function getMaxVersion(versionA: any, versionB: any) { return Math.max(parseInt(versionA, 10) || 0, parseInt(versionB, 10) || 0); } @@ -155,7 +155,7 @@ function getExpiryDate() { * * @param activeDate */ -export function setActiveDate(activeDate) { +export function setActiveDate(activeDate: any) { store.set(ACTIVE_DATE, activeDate, getExpiryDate()); } @@ -176,7 +176,7 @@ export function getActiveDate() { * @param filter * @param value */ -export function setAgendaDropdownFilter(filter, value) { +export function setAgendaDropdownFilter(filter: any, value: any) { const filters = store.get(DROPDOWN_FILTERS) || {}; filters[filter] = value; store.set(DROPDOWN_FILTERS, filters, getExpiryDate()); diff --git a/assets/maps/utils.ts b/assets/maps/utils.ts index b1fe2b19a..3593a31f1 100644 --- a/assets/maps/utils.ts +++ b/assets/maps/utils.ts @@ -7,7 +7,7 @@ const MAPS_URL = 'https://maps.googleapis.com/maps/api/staticmap'; * Get item locations * @param {Object} item */ -export function getLocations(item) { +export function getLocations(item: any) { return (get(item, 'location')) || []; } @@ -16,7 +16,7 @@ export function getLocations(item) { * @param {Object} item * @return {Array} */ -export function getGeoLocations(locations) { +export function getGeoLocations(locations: any) { return locations.filter((loc) => get(loc, 'location.lat')); } @@ -26,7 +26,7 @@ export function getGeoLocations(locations) { * @param {Object} item * @return {Object} */ -export function getAddress(item) { +export function getAddress(item: any) { return get(item, 'location.0.address'); } @@ -35,7 +35,7 @@ export function getAddress(item) { * @param {Object} location * @return {Array} */ -export function getBoundingBox(location) { +export function getBoundingBox(location: any) { return get(location, 'address.boundingbox'); } @@ -44,7 +44,7 @@ export function getBoundingBox(location) { * @param {Object} location * @return {String} */ -export function getAddressLine(location) { +export function getAddressLine(location: any) { return get(location, 'address.line.0'); } @@ -53,7 +53,7 @@ export function getAddressLine(location) { * * @param {Object} location */ -export function getAddressState(location) { +export function getAddressState(location: any) { return get(location, 'address.state') || get(location, 'address.locality'); } @@ -62,7 +62,7 @@ export function getAddressState(location) { * * @param {Object} location */ -export function getAddressCountry(location) { +export function getAddressCountry(location: any) { return get(location, 'address.country'); } @@ -71,7 +71,7 @@ export function getAddressCountry(location) { * @param {Object} location * @return {LatLngBoundsLiteral} */ -export function getBounds(location) { +export function getBounds(location: any) { const bbox = getBoundingBox(location); if (bbox) { @@ -89,7 +89,7 @@ export function getBounds(location) { * @param {Object} location * @return {LatLngLiteral} */ -export function getLatLng(location) { +export function getLatLng(location: any) { return { lat: get(location, 'location.lat'), lng: get(location, 'location.lon'), @@ -108,7 +108,7 @@ export function mapsKey() { * Get zoom param based on location * @param {Object} location */ -function getZoom(location) { +function getZoom(location: any) { const box = getBoundingBox(location); const line = getAddressLine(location); @@ -123,7 +123,7 @@ function getZoom(location) { return !isEmpty(line) ? 'zoom=15' : 'zoom=8'; } -function getLocationDetails(location) { +function getLocationDetails(location: any) { return [location.name, getAddressLine(location), getAddressState(location), @@ -131,7 +131,7 @@ function getLocationDetails(location) { ].filter((x) => !!x).join(', '); } -export function getMapSource(locations, scale = 1) { +export function getMapSource(locations: any, scale: any = 1) { if (isEmpty(locations)) { return ''; } @@ -168,6 +168,6 @@ export function getMapSource(locations, scale = 1) { return src; } -export function shouldRenderLocation(item) { +export function shouldRenderLocation(item: any) { return !isEmpty(mapsKey()) && !isEmpty(getLocations(item)); } diff --git a/assets/market-place/actions.ts b/assets/market-place/actions.ts index 5d8760371..4236c86e3 100644 --- a/assets/market-place/actions.ts +++ b/assets/market-place/actions.ts @@ -1,6 +1,6 @@ export const INIT_DATA = 'INIT_DATA'; -export function initData(data) { +export function initData(data: any) { return {type: INIT_DATA, data}; } diff --git a/assets/market-place/reducers.ts b/assets/market-place/reducers.ts index 9356f97d5..c27a915e6 100644 --- a/assets/market-place/reducers.ts +++ b/assets/market-place/reducers.ts @@ -9,7 +9,7 @@ const initialState = { }; -export default function marketPlaceHomeReducer(state = initialState, action) { +export default function marketPlaceHomeReducer(state: any = initialState, action: any) { if (action.type === INIT_DATA) { // map the navigation id to navigation object const navigationById = keyBy(action.data.navigations|| [], '_id'); diff --git a/assets/monitoring/actions.ts b/assets/monitoring/actions.ts index 7871fc888..7f6b42896 100644 --- a/assets/monitoring/actions.ts +++ b/assets/monitoring/actions.ts @@ -5,16 +5,16 @@ import {get} from 'lodash'; export const INIT_DATA = 'INIT_DATA'; -export function initData(data) { +export function initData(data: any) { return {type: INIT_DATA, data}; } export const SET_COMPANIES = 'SET_COMPANIES'; -export function setCompanies(data) { +export function setCompanies(data: any) { return {type: SET_COMPANIES, data}; } -export function initViewData(data) { +export function initViewData(data: any) { return function (dispatch) { dispatch(setCompanies(data.companies)); }; @@ -31,7 +31,7 @@ export function cancelEdit() { } export const UPDATE_MONITORING_PROFILE = 'UPDATE_MONITORING_PROFILE'; -export function updateMonitoringProfile(event) { +export function updateMonitoringProfile(event: any) { const target = event.target; const field = target.name; return { @@ -41,22 +41,22 @@ export function updateMonitoringProfile(event) { } export const SET_ERROR = 'SET_ERROR'; -export function setError(errors) { +export function setError(errors: any) { return {type: SET_ERROR, errors}; } export const SET_COMPANY = 'SET_COMPANY'; -export function setCompany(company) { +export function setCompany(company: any) { return {type: SET_COMPANY, company}; } export const SET_MONITORING_LIST = 'SET_MONITORING_LIST'; -export function setMonitoringList(data) { +export function setMonitoringList(data: any) { return {type: SET_MONITORING_LIST, data}; } export const SET_USER_COMPANY_MONITORING_LIST = 'SET_USER_COMPANY_MONITORING_LIST'; -export function setUserCompanyMonitoringList(data) { +export function setUserCompanyMonitoringList(data: any) { return {type: SET_USER_COMPANY_MONITORING_LIST, data}; } @@ -66,12 +66,12 @@ export function queryMonitoring() { } export const SELECT_MONITORING_PROFILE = 'SELECT_MONITORING_PROFILE'; -export function selectMonitoringProfile(id) { +export function selectMonitoringProfile(id: any) { return {type: SELECT_MONITORING_PROFILE, id}; } export const SET_MONITORING_COMPANIES = 'SET_MONITORING_COMPANIES'; -export function setMonitoringCompanies(data) { +export function setMonitoringCompanies(data: any) { return {type: SET_MONITORING_COMPANIES, data}; } @@ -80,7 +80,7 @@ export function toggleScheduleMode() { return {type: SET_SCHEDULE_MODE}; } -export function postMonitoringProfile(userProfile, notifyMsg) { +export function postMonitoringProfile(userProfile: any, notifyMsg: any) { return function (dispatch, getState) { const p = userProfile || monitoringProfileToEdit(getState()); @@ -118,7 +118,7 @@ export function postMonitoringProfile(userProfile, notifyMsg) { }; } -export function fetchMonitoring(userCompany) { +export function fetchMonitoring(userCompany: any) { return function (dispatch, getState) { dispatch(queryMonitoring()); const companyFilter = userCompany || company(getState()); @@ -152,7 +152,7 @@ export function fetchMonitoringCompanies() { }; } -export function saveMonitoringProfileUsers(users) { +export function saveMonitoringProfileUsers(users: any) { return function (dispatch, getState) { const p = monitoringProfileToEdit(getState()); return server.post(`/monitoring/${p._id}/users`, {users}) diff --git a/assets/monitoring/reducers.ts b/assets/monitoring/reducers.ts index 2e7c282b3..04bd941d7 100644 --- a/assets/monitoring/reducers.ts +++ b/assets/monitoring/reducers.ts @@ -25,7 +25,7 @@ const initialState = { monitoringListCompanies: [], }; -export default function monitoringReducer(state = initialState, action) { +export default function monitoringReducer(state: any = initialState, action: any) { switch (action.type) { case SELECT_MONITORING_PROFILE: diff --git a/assets/monitoring/utils.ts b/assets/monitoring/utils.ts index c77ab8d03..32be4682b 100644 --- a/assets/monitoring/utils.ts +++ b/assets/monitoring/utils.ts @@ -7,6 +7,6 @@ export const userTypes = [ {value: 'account_management', text: gettext('Account Management')}, ]; -export function getUserLabel(code) { +export function getUserLabel(code: any) { return (userTypes.find(c => c.value === code) || {}).text; } diff --git a/assets/navigations/actions.tsx b/assets/navigations/actions.tsx index f05d6f8cc..f6892581a 100644 --- a/assets/navigations/actions.tsx +++ b/assets/navigations/actions.tsx @@ -8,12 +8,12 @@ import {searchQuerySelector} from 'search/selectors'; export const MAX_TILE_IMAGES = 4; export const SELECT_NAVIGATION = 'SELECT_NAVIGATION'; -export function selectNavigation(id) { +export function selectNavigation(id: any) { return {type: SELECT_NAVIGATION, id}; } export const EDIT_NAVIGATION = 'EDIT_NAVIGATION'; -export function editNavigation(event) { +export function editNavigation(event: any) { return {type: EDIT_NAVIGATION, event}; } @@ -23,7 +23,7 @@ export function newNavigation() { } export const CANCEL_EDIT = 'CANCEL_EDIT'; -export function cancelEdit(event) { +export function cancelEdit(event: any) { return {type: CANCEL_EDIT, event}; } @@ -33,17 +33,17 @@ export function queryNavigations() { } export const GET_NAVIGATIONS = 'GET_NAVIGATIONS'; -export function getNavigations(data) { +export function getNavigations(data: any) { return {type: GET_NAVIGATIONS, data}; } export const GET_PRODUCTS = 'GET_PRODUCTS'; -export function getProducts(data) { +export function getProducts(data: any) { return {type: GET_PRODUCTS, data}; } export const SET_ERROR = 'SET_ERROR'; -export function setError(errors) { +export function setError(errors: any) { return {type: SET_ERROR, errors}; } @@ -138,7 +138,7 @@ export function fetchProducts() { }; } -export function initViewData(data) { +export function initViewData(data: any) { return function (dispatch) { dispatch(getNavigations(data.navigations)); dispatch(getProducts(data.products)); diff --git a/assets/navigations/reducers.tsx b/assets/navigations/reducers.tsx index ff7603feb..1d7664c7f 100644 --- a/assets/navigations/reducers.tsx +++ b/assets/navigations/reducers.tsx @@ -32,7 +32,7 @@ const initialState = { search: searchReducer(), }; -export default function navigationReducer(state = initialState, action) { +export default function navigationReducer(state: any = initialState, action: any) { switch (action.type) { case SELECT_NAVIGATION: { diff --git a/assets/news-api/actions.ts b/assets/news-api/actions.ts index e25aec30d..fe40e48ce 100644 --- a/assets/news-api/actions.ts +++ b/assets/news-api/actions.ts @@ -3,11 +3,11 @@ import {cloneDeep} from 'lodash'; import {notify, gettext} from '../utils'; -export function getTokenForCompany(companyId) { +export function getTokenForCompany(companyId: any) { return server.get(`/news_api_tokens?company=${companyId}`); } -export function generateTokenForCompany(token) { +export function generateTokenForCompany(token: any) { const newToken = cloneDeep(token); newToken.expiry = !token.expiry ? null : token.expiry; @@ -19,14 +19,14 @@ export function generateTokenForCompany(token) { }); } -export function deleteTokenForCompany(companyId) { +export function deleteTokenForCompany(companyId: any) { return server.del(`/news_api_tokens?company=${companyId}`) .then(() => { notify.success(gettext('API Token deleted successfully')); }); } -export function updateTokenForCompany(token) { +export function updateTokenForCompany(token: any) { const tokenId = encodeURIComponent(token.token); return server.patch(`/news_api_tokens?token=${tokenId}`, { diff --git a/assets/notifications/components/notificationItems.tsx b/assets/notifications/components/notificationItems.tsx index 4b6986146..405847fa3 100644 --- a/assets/notifications/components/notificationItems.tsx +++ b/assets/notifications/components/notificationItems.tsx @@ -6,11 +6,11 @@ import {BasicNotificationItem} from './BasicNotificationItem'; export const registeredNotifications = []; -export function registerNotification(condition, component) { +export function registerNotification(condition: any, component: any) { registeredNotifications.unshift({condition, component}); } -export function renderNotificationComponent(notification, item) { +export function renderNotificationComponent(notification: any, item: any) { let notificationEntry = registeredNotifications.find( (entry) => entry.condition(notification, item) ); @@ -24,7 +24,7 @@ export function renderNotificationComponent(notification, item) { return notificationEntry.component(notification, item); } -function getNotificationFooterText(notification) { +function getNotificationFooterText(notification: any) { switch (notification.action) { case 'share': return ( @@ -56,7 +56,7 @@ function getNotificationFooterText(notification) { } } -function getNotificationUrl(notification, item) { +function getNotificationUrl(notification: any, item: any) { if (get(notification, 'data.url')) { return notification.data.url; } @@ -66,7 +66,7 @@ function getNotificationUrl(notification, item) { `/wire?item=${item._id}`; } -function getNotificationName(item) { +function getNotificationName(item: any) { return item.label || item.name || item.headline || item.slugline; } diff --git a/assets/notifications/reducers.ts b/assets/notifications/reducers.ts index 2315ea690..570e1752d 100644 --- a/assets/notifications/reducers.ts +++ b/assets/notifications/reducers.ts @@ -15,7 +15,7 @@ const initialState = { loading: false, }; -export default function notificationReducer(state = initialState, action) { +export default function notificationReducer(state: any = initialState, action: any) { switch (action.type) { case SET_NOTIFICATIONS: return { diff --git a/assets/oauth_clients/actions.ts b/assets/oauth_clients/actions.ts index 1cc9cbdd5..b19b09a3c 100644 --- a/assets/oauth_clients/actions.ts +++ b/assets/oauth_clients/actions.ts @@ -4,28 +4,28 @@ import {searchQuerySelector} from 'search/selectors'; export const SELECT_CLIENT = 'SELECT_CLIENT'; -export function selectClient(id) { +export function selectClient(id: any) { return function (dispatch) { dispatch(select(id)); }; } -function select(id) { +function select(id: any) { return {type: SELECT_CLIENT, id}; } export const EDIT_CLIENT = 'EDIT_CLIENT'; -export function editClient(event) { +export function editClient(event: any) { return {type: EDIT_CLIENT, event}; } export const NEW_CLIENT = 'NEW_CLIENT'; -export function newClient(data) { +export function newClient(data: any) { return {type: NEW_CLIENT, data}; } export const CANCEL_EDIT = 'CANCEL_EDIT'; -export function cancelEdit(event) { +export function cancelEdit(event: any) { return {type: CANCEL_EDIT, event}; } @@ -35,18 +35,18 @@ export function queryClients() { } export const GET_CLIENTS = 'GET_CLIENTS'; -export function getClients(data) { +export function getClients(data: any) { return {type: GET_CLIENTS, data}; } export const SET_ERROR = 'SET_ERROR'; -export function setError(errors) { +export function setError(errors: any) { return {type: SET_ERROR, errors}; } export const GET_CLIENT_PASSWORD = 'GET_CLIENT_PASSWORD'; -export function getClientPassword(data) { +export function getClientPassword(data: any) { return {type: GET_CLIENT_PASSWORD, data}; } @@ -114,6 +114,6 @@ export function deleteClient() { } export const INIT_VIEW_DATA = 'INIT_VIEW_DATA'; -export function initViewData(data) { +export function initViewData(data: any) { return {type: INIT_VIEW_DATA, data}; } diff --git a/assets/oauth_clients/reducers.ts b/assets/oauth_clients/reducers.ts index eb503ba75..9766c09a7 100644 --- a/assets/oauth_clients/reducers.ts +++ b/assets/oauth_clients/reducers.ts @@ -20,7 +20,7 @@ const initialState = { search: searchReducer(), }; -function setupClients(clientList, state) { +function setupClients(clientList: any, state: any) { const clientsById = {}; const clients = clientList.map((client) => { clientsById[client._id] = client; @@ -34,7 +34,7 @@ function setupClients(clientList, state) { }; } -export default function clientReducer(state = initialState, action) { +export default function clientReducer(state: any = initialState, action: any) { switch (action.type) { case SELECT_CLIENT: { diff --git a/assets/products/actions.ts b/assets/products/actions.ts index 3791668d7..59ac96a49 100644 --- a/assets/products/actions.ts +++ b/assets/products/actions.ts @@ -5,12 +5,12 @@ import {searchQuerySelector} from 'search/selectors'; export const SELECT_PRODUCT = 'SELECT_PRODUCT'; -export function selectProduct(id) { +export function selectProduct(id: any) { return {type: SELECT_PRODUCT, id}; } export const EDIT_PRODUCT = 'EDIT_PRODUCT'; -export function editProduct(event) { +export function editProduct(event: any) { return {type: EDIT_PRODUCT, event}; } @@ -20,7 +20,7 @@ export function newProduct() { } export const CANCEL_EDIT = 'CANCEL_EDIT'; -export function cancelEdit(event) { +export function cancelEdit(event: any) { return {type: CANCEL_EDIT, event}; } @@ -30,27 +30,27 @@ export function queryProducts() { } export const GET_PRODUCTS = 'GET_PRODUCTS'; -export function getProducts(data) { +export function getProducts(data: any) { return {type: GET_PRODUCTS, data}; } export const GET_COMPANIES = 'GET_COMPANIES'; -export function getCompanies(data) { +export function getCompanies(data: any) { return {type: GET_COMPANIES, data}; } export const GET_NAVIGATIONS = 'GET_NAVIGATIONS'; -export function getNavigations(data) { +export function getNavigations(data: any) { return {type: GET_NAVIGATIONS, data}; } export const UPDATE_PRODUCT_NAVIGATIONS = 'UPDATE_PRODUCT_NAVIGATIONS'; -export function updateProductNavigations(product, navigations) { +export function updateProductNavigations(product: any, navigations: any) { return {type: UPDATE_PRODUCT_NAVIGATIONS, product, navigations}; } export const SET_ERROR = 'SET_ERROR'; -export function setError(errors) { +export function setError(errors: any) { return {type: SET_ERROR, errors}; } @@ -134,7 +134,7 @@ export function fetchCompanies() { * Saves companies for a product * */ -export function saveCompanies(companies) { +export function saveCompanies(companies: any) { return function (dispatch, getState) { const product = getState().productToEdit; return server.post(`/products/${product._id}/companies`, {companies}) @@ -164,7 +164,7 @@ export function fetchNavigations() { * Saves navigations for a product * */ -export function saveNavigations(navigations) { +export function saveNavigations(navigations: any) { return function (dispatch, getState) { const product = getState().productToEdit; return server.post(`/products/${product._id}/navigations`, {navigations}) @@ -176,7 +176,7 @@ export function saveNavigations(navigations) { }; } -export function initViewData(data) { +export function initViewData(data: any) { return function (dispatch) { dispatch(getProducts(data.products)); dispatch(getCompanies(data.companies)); diff --git a/assets/products/reducers.ts b/assets/products/reducers.ts index 305d8bf0f..ea91d2fd8 100644 --- a/assets/products/reducers.ts +++ b/assets/products/reducers.ts @@ -30,7 +30,7 @@ const initialState = { search: searchReducer(), }; -export default function productReducer(state = initialState, action) { +export default function productReducer(state: any = initialState, action: any) { switch (action.type) { case SELECT_PRODUCT: { diff --git a/assets/reducers.ts b/assets/reducers.ts index 8406d010a..dbea74049 100644 --- a/assets/reducers.ts +++ b/assets/reducers.ts @@ -39,7 +39,7 @@ import {REMOVE_NEW_ITEMS, SET_NEW_ITEM} from './agenda/actions'; import {toggleValue} from 'utils'; import {topicsReducer} from './topics/reducer'; -export function modalReducer(state, action) { +export function modalReducer(state: any, action: any) { if (!action) { return state; } @@ -73,7 +73,7 @@ export function modalReducer(state, action) { } -function getReadItems(state, item) { +function getReadItems(state: any, item: any) { const readItems = Object.assign({}, state.readItems); if (item) { @@ -84,7 +84,7 @@ function getReadItems(state, item) { } -function updateItemActions(state, items, action) { +function updateItemActions(state: any, items: any, action: any) { const itemsById = Object.assign({}, state.itemsById); items.map((item) => { @@ -97,7 +97,7 @@ function updateItemActions(state, items, action) { -export function defaultReducer(state={}, action) { +export function defaultReducer(state: any = {}, action: any) { if (!action) { return state; } diff --git a/assets/search/actions.ts b/assets/search/actions.ts index 326dc6df8..baf785ea3 100644 --- a/assets/search/actions.ts +++ b/assets/search/actions.ts @@ -23,7 +23,7 @@ import { import {context} from 'selectors'; export const SET_QUERY = 'SET_QUERY'; -export function setQuery(query) { +export function setQuery(query: any) { return function(dispatch, getState) { query && analytics.event('search', query); dispatch(setSearchQuery(query)); @@ -35,17 +35,17 @@ export function setQuery(query) { } export const TOGGLE_TOPIC = 'TOGGLE_TOPIC'; -export function toggleTopic(topic) { +export function toggleTopic(topic: any) { return {type: TOGGLE_TOPIC, topic}; } export const ADD_TOPIC = 'ADD_TOPIC'; -export function addTopic(topic) { +export function addTopic(topic: any) { return {type: ADD_TOPIC, topic}; } export const SET_NEW_ITEM_BY_TOPIC = 'SET_NEW_ITEM_BY_TOPIC'; -export function setNewItemByTopic(data) { +export function setNewItemByTopic(data: any) { return {type: SET_NEW_ITEM_BY_TOPIC, data}; } @@ -54,12 +54,12 @@ export function loadMyTopics() { } export const SET_TOPICS = 'SET_TOPICS'; -export function setTopics(topics) { +export function setTopics(topics: any) { return {type: SET_TOPICS, topics}; } export const TOGGLE_NAVIGATION = 'TOGGLE_NAVIGATION'; -export function toggleNavigation(navigation, disableSameNavigationDeselect) { +export function toggleNavigation(navigation: any, disableSameNavigationDeselect: any) { return (dispatch, getState) => { const state = getState(); const currentNavigation = searchNavigationSelector(state); @@ -108,7 +108,7 @@ export function toggleNavigation(navigation, disableSameNavigationDeselect) { } export const TOGGLE_FILTER = 'TOGGLE_FILTER'; -export function toggleFilter(key, value, single) { +export function toggleFilter(key: any, value: any, single: any) { return function (dispatch, getState) { const state = getState(); const currentFilters = cloneDeep(searchFilterSelector(state)); @@ -137,7 +137,7 @@ export function toggleFilter(key, value, single) { } export const SET_CREATED_FILTER = 'SET_CREATED_FILTER'; -export function setCreatedFilter(filter) { +export function setCreatedFilter(filter: any) { return function(dispatch, getState) { const state = getState(); @@ -160,7 +160,7 @@ export function setCreatedFilter(filter) { } export const RESET_FILTER = 'RESET_FILTER'; -export function resetFilter(filter) { +export function resetFilter(filter: any) { return function(dispatch, getState) { updateRouteParams({ filter: null, @@ -171,7 +171,7 @@ export function resetFilter(filter) { } export const SET_VIEW = 'SET_VIEW'; -export function setView(view) { +export function setView(view: any) { localStorage.setItem('view', view); return {type: SET_VIEW, view}; } @@ -181,7 +181,7 @@ export function setView(view) { * * @param {Object} searchParams */ -export function saveMyTopic(searchParams) { +export function saveMyTopic(searchParams: any) { const type = get(searchParams, 'topic_type') || 'wire'; const menu = type === 'agenda' ? @@ -197,7 +197,7 @@ export function saveMyTopic(searchParams) { createOrUpdateTopic(menu, searchParams, true); } -export function followStory(item, type) { +export function followStory(item: any, type: any) { const slugline = get(item, 'slugline'); saveMyTopic({ @@ -212,7 +212,7 @@ export function followStory(item, type) { * * @param {String} navigationId */ -export function toggleNavigationById(navigationId) { +export function toggleNavigationById(navigationId: any) { return (dispatch, getState) => { const navigation = (get(getState().search, 'navigations') || []).find((nav) => navigationId === nav._id); if (navigation) { @@ -226,7 +226,7 @@ export function toggleNavigationById(navigationId) { * * @param {Array} navigationIds */ -export function toggleNavigationByIds(navigationIds) { +export function toggleNavigationByIds(navigationIds: any) { return (dispatch, getState) => { const navigations = (get(getState().search, 'navigations') || []); @@ -237,7 +237,7 @@ export function toggleNavigationByIds(navigationIds) { }; } -export function submitFollowTopic(data) { +export function submitFollowTopic(data: any) { return (dispatch, getState) => { const user = getState().user; const userId = get(user, '_id') || user; @@ -261,7 +261,7 @@ export function submitFollowTopic(data) { * * @param {Object} data */ -export function submitShareItem(data) { +export function submitShareItem(data: any) { return (dispatch, getState) => { const userContext = context(getState()); const type = userContext || data.items[0].topic_type; @@ -290,7 +290,7 @@ export function submitShareItem(data) { }; } -export function loadMyTopic(topicId) { +export function loadMyTopic(topicId: any) { return (dispatch, getState) => { const state = getState(); const currentTopicId = searchTopicIdSelector(state); @@ -318,7 +318,7 @@ export function updateSearchParams() { }; } -export function updateFilterStateAndURL(activeFilter, createdFilter) { +export function updateFilterStateAndURL(activeFilter: any, createdFilter: any) { return function(dispatch, getState) { const state = getState(); dispatch(setSearchFilters(activeFilter)); @@ -332,17 +332,17 @@ export function updateFilterStateAndURL(activeFilter, createdFilter) { } export const SET_SEARCH_TOPIC_ID = 'SET_SEARCH_TOPIC_ID'; -export function setSearchTopicId(topicId) { +export function setSearchTopicId(topicId: any) { return {type: SET_SEARCH_TOPIC_ID, payload: topicId}; } export const SET_SEARCH_NAVIGATION_IDS = 'SET_SEARCH_NAVIGATION_IDS'; -export function setSearchNavigationIds(navIds) { +export function setSearchNavigationIds(navIds: any) { return {type: SET_SEARCH_NAVIGATION_IDS, payload: navIds}; } export const SET_SEARCH_QUERY = 'SET_SEARCH_QUERY'; -export function setSearchQuery(query) { +export function setSearchQuery(query: any) { if (query) { analytics.event('search', query); } @@ -351,17 +351,17 @@ export function setSearchQuery(query) { } export const SET_SEARCH_FILTERS = 'SET_SEARCH_FILTERS'; -export function setSearchFilters(filters) { +export function setSearchFilters(filters: any) { return {type: SET_SEARCH_FILTERS, payload: filters}; } export const SET_SEARCH_CREATED = 'SET_SEARCH_CREATED'; -export function setSearchCreated(created) { +export function setSearchCreated(created: any) { return {type: SET_SEARCH_CREATED, payload: created}; } export const SET_SEARCH_PRODUCT = 'SET_SEARCH_PRODUCT'; -export function setSearchProduct(productId) { +export function setSearchProduct(productId: any) { return {type: SET_SEARCH_PRODUCT, payload: productId}; } @@ -371,12 +371,12 @@ export function resetSearchParams() { } export const TOGGLE_ADVANCED_SEARCH_FIELD = 'TOGGLE_ADVANCED_SEARCH_FIELD'; -export function toggleAdvancedSearchField(field) { +export function toggleAdvancedSearchField(field: any) { return {type: TOGGLE_ADVANCED_SEARCH_FIELD, payload: field}; } export const SET_ADVANCED_SEARCH_KEYWORDS = 'SET_ADVANCED_SEARCH_KEYWORDS'; -export function setAdvancedSearchKeywords(field, keywords) { +export function setAdvancedSearchKeywords(field: any, keywords: any) { return {type: SET_ADVANCED_SEARCH_KEYWORDS, payload: { field: field, keywords: keywords, @@ -388,7 +388,7 @@ export function clearAdvanedSearchParams() { return {type: CLEAR_ADVANCED_SEARCH_PARAMS}; } -export function setParams(params) { +export function setParams(params: any) { return function(dispatch) { if (get(params, 'created')) { dispatch(setSearchCreated(params.created)); @@ -417,7 +417,7 @@ export function setParams(params) { * * @param {URLSearchParams} params */ -export function initParams(params) { +export function initParams(params: any) { return (dispatch, getState) => { const custom = { query: params.get('q'), @@ -441,7 +441,7 @@ export function initParams(params) { }; } -export function subscribeToTopic(topic) { +export function subscribeToTopic(topic: any) { server.post(`/topics/${topic._id}/subscribe`) .then(() => { notify.success(gettext('Topic subscribed successfully')); @@ -449,7 +449,7 @@ export function subscribeToTopic(topic) { .catch(errorHandler); } -export function unsubscribeToTopic(topic) { +export function unsubscribeToTopic(topic: any) { server.del(`/topics/${topic._id}/subscribe`) .then(() => { notify.success(gettext('Topic unsubscribed successfully')); diff --git a/assets/search/reducers.ts b/assets/search/reducers.ts index 409b78d9d..556dc28bd 100644 --- a/assets/search/reducers.ts +++ b/assets/search/reducers.ts @@ -44,7 +44,7 @@ const INITIAL_STATE = { }, }; -export function searchReducer(state=INITIAL_STATE, action) { +export function searchReducer(state: any = INITIAL_STATE, action: any) { if (!action) { return state; } diff --git a/assets/section-filters/actions.ts b/assets/section-filters/actions.ts index 8b478cce2..4f0529a99 100644 --- a/assets/section-filters/actions.ts +++ b/assets/section-filters/actions.ts @@ -5,12 +5,12 @@ import {searchQuerySelector} from 'search/selectors'; export const SELECT_SECTION_FILTER = 'SELECT_SECTION_FILTER'; -export function selectSectionFilter(id) { +export function selectSectionFilter(id: any) { return {type: SELECT_SECTION_FILTER, id}; } export const EDIT_SECTION_FILTER = 'EDIT_SECTION_FILTER'; -export function editSectionFilter(event) { +export function editSectionFilter(event: any) { return {type: EDIT_SECTION_FILTER, event}; } @@ -20,7 +20,7 @@ export function newSectionFilter() { } export const CANCEL_EDIT = 'CANCEL_EDIT'; -export function cancelEdit(event) { +export function cancelEdit(event: any) { return {type: CANCEL_EDIT, event}; } @@ -30,12 +30,12 @@ export function querySectionFilters() { } export const GET_SECTION_FILTERS = 'GET_SECTION_FILTERS'; -export function getSectionFilters(data) { +export function getSectionFilters(data: any) { return {type: GET_SECTION_FILTERS, data}; } export const SET_ERROR = 'SET_ERROR'; -export function setError(errors) { +export function setError(errors: any) { return {type: SET_ERROR, errors}; } @@ -103,7 +103,7 @@ export function deleteSectionFilter() { -export function initViewData(data) { +export function initViewData(data: any) { return function (dispatch) { dispatch(getSectionFilters(data.section_filters)); dispatch(initSections(data.sections)); diff --git a/assets/section-filters/reducers.ts b/assets/section-filters/reducers.ts index c560f6276..4c18ec350 100644 --- a/assets/section-filters/reducers.ts +++ b/assets/section-filters/reducers.ts @@ -25,7 +25,7 @@ const initialState = { search: searchReducer, }; -export default function sectionFiltersReducer(state = initialState, action) { +export default function sectionFiltersReducer(state: any = initialState, action: any) { switch (action.type) { case SELECT_SECTION_FILTER: { diff --git a/assets/server.ts b/assets/server.ts index 45e67288c..d8226bf8e 100644 --- a/assets/server.ts +++ b/assets/server.ts @@ -3,11 +3,11 @@ const defaultOptions = { redirect: 'manual', }; -function options(custom={}) { +function options(custom: any = {}) { return Object.assign({}, defaultOptions, custom); } -function checkStatus(response) { +function checkStatus(response: any) { if (response.status >= 200 && response.status < 300) { return response.json(); } else { diff --git a/assets/tests/TextInput.spec.tsx b/assets/tests/TextInput.spec.tsx index 689bf0e7d..599251bd0 100644 --- a/assets/tests/TextInput.spec.tsx +++ b/assets/tests/TextInput.spec.tsx @@ -6,7 +6,7 @@ import {spy} from 'sinon'; import 'tests/setup'; -function setup(errorStrings) { +function setup(errorStrings: any) { const handleChange = spy(); const props = { diff --git a/assets/topics/actions.ts b/assets/topics/actions.ts index 63d4c38a7..46be6c0bd 100644 --- a/assets/topics/actions.ts +++ b/assets/topics/actions.ts @@ -1,5 +1,5 @@ export const SET_TOPICS = 'SET_TOPICS'; -export function setTopics(topics) { +export function setTopics(topics: any) { return {type: SET_TOPICS, topics}; } diff --git a/assets/topics/reducer.ts b/assets/topics/reducer.ts index 15fdec065..cfc402112 100644 --- a/assets/topics/reducer.ts +++ b/assets/topics/reducer.ts @@ -3,9 +3,9 @@ import { SET_TOPICS } from './actions'; -const initialState = []; +const initialState: Array = []; -export function topicsReducer(state=initialState, action) { +export function topicsReducer(state = initialState, action: any) { switch (action.type) { case SET_TOPICS: return action.topics; diff --git a/assets/topics/utils.ts b/assets/topics/utils.ts index ad6ce6643..df0d60c32 100644 --- a/assets/topics/utils.ts +++ b/assets/topics/utils.ts @@ -1,6 +1,6 @@ import {canUserManageTopics} from 'users/utils'; -export function canUserEditTopic(topic, user) { +export function canUserEditTopic(topic: any, user: any) { return !( topic.is_global && !canUserManageTopics(user) && diff --git a/assets/ui/components/ArticleBody.tsx b/assets/ui/components/ArticleBody.tsx index 6756139ec..731ae42e6 100644 --- a/assets/ui/components/ArticleBody.tsx +++ b/assets/ui/components/ArticleBody.tsx @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -export default function ArticleText(props) { +export default function ArticleText(props: any) { return (
{props.children} diff --git a/assets/ui/components/ArticleContent.tsx b/assets/ui/components/ArticleContent.tsx index fbab7fc99..3d8619add 100644 --- a/assets/ui/components/ArticleContent.tsx +++ b/assets/ui/components/ArticleContent.tsx @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -export default function ArticleContent(props) { +export default function ArticleContent(props: any) { return (
{props.children} diff --git a/assets/ui/components/ArticleContentInfoWrapper.tsx b/assets/ui/components/ArticleContentInfoWrapper.tsx index 8a42693cd..068bc4931 100644 --- a/assets/ui/components/ArticleContentInfoWrapper.tsx +++ b/assets/ui/components/ArticleContentInfoWrapper.tsx @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -export default function ArticleContentInfoWrapper(props) { +export default function ArticleContentInfoWrapper(props: any) { return (
{props.children} diff --git a/assets/ui/components/ArticleContentWrapper.tsx b/assets/ui/components/ArticleContentWrapper.tsx index 7e1031935..bd6207b73 100644 --- a/assets/ui/components/ArticleContentWrapper.tsx +++ b/assets/ui/components/ArticleContentWrapper.tsx @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -export default function ArticleContentWrapper(props) { +export default function ArticleContentWrapper(props: any) { const itemWrapperClassName = `wire-column__preview__content--item-detail-${props.itemType}-wrap`; return (
diff --git a/assets/ui/components/ArticleItemDetails.tsx b/assets/ui/components/ArticleItemDetails.tsx index 6c5c9fed1..f3693e3e6 100644 --- a/assets/ui/components/ArticleItemDetails.tsx +++ b/assets/ui/components/ArticleItemDetails.tsx @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; -export default function ArticleItemDetails(props) { +export default function ArticleItemDetails(props: any) { return (
diff --git a/assets/ui/components/ArticleSidebarBox.tsx b/assets/ui/components/ArticleSidebarBox.tsx index e88de2b82..59fac5ea6 100644 --- a/assets/ui/components/ArticleSidebarBox.tsx +++ b/assets/ui/components/ArticleSidebarBox.tsx @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -export default function ArticleSidebarBox(props) { +export default function ArticleSidebarBox(props: any) { return (
diff --git a/assets/ui/components/Content.tsx b/assets/ui/components/Content.tsx index 5b4fe852a..45a79440b 100644 --- a/assets/ui/components/Content.tsx +++ b/assets/ui/components/Content.tsx @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import {gettext} from 'utils'; -export default function Content(props) { +export default function Content(props: any) { return (

{gettext('Item Detail')}

diff --git a/assets/ui/components/ContentBar.tsx b/assets/ui/components/ContentBar.tsx index 1c7f4d624..b6ef7fedf 100644 --- a/assets/ui/components/ContentBar.tsx +++ b/assets/ui/components/ContentBar.tsx @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import {gettext} from 'utils'; -export default function ContentBar(props) { +export default function ContentBar(props: any) { return (
diff --git a/assets/agenda/item-actions.ts b/assets/agenda/item-actions.ts index e165fd760..4956a3997 100644 --- a/assets/agenda/item-actions.ts +++ b/assets/agenda/item-actions.ts @@ -4,7 +4,7 @@ import * as agendaActions from './actions'; import {gettext} from '../utils'; import {isWatched} from './utils'; -const canWatchAgendaItem = (state, item, includeCoverages) => { +const canWatchAgendaItem = (state: any, item: any, includeCoverages: any) => { let result = state.user && !isWatched(item, state.user); if (!state.bookmarks || includeCoverages) { return result; @@ -14,41 +14,41 @@ const canWatchAgendaItem = (state, item, includeCoverages) => { return coveragesWatched.length > 0 ? false : result; }; -export const getAgendaItemActions = (dispatch) => { +export const getAgendaItemActions = (dispatch: any) => { const {watchEvents, stopWatchingEvents} = agendaActions; return getItemActions(dispatch, {...agendaActions}).concat([ { name: gettext('Watch'), icon: 'watch', multi: true, - when: (state, item, includeCoverages) => canWatchAgendaItem(state, item, includeCoverages), - action: (items) => dispatch(watchEvents(items)), + when: (state: any, item: any, includeCoverages: any) => canWatchAgendaItem(state, item, includeCoverages), + action: (items: any) => dispatch(watchEvents(items)), }, { name: gettext('Stop watching'), icon: 'unwatch', multi: true, - when: (state, item, includeCoverages) => !canWatchAgendaItem(state, item, includeCoverages), - action: (items) => dispatch(stopWatchingEvents(items)), + when: (state: any, item: any, includeCoverages: any) => !canWatchAgendaItem(state, item, includeCoverages), + action: (items: any) => dispatch(stopWatchingEvents(items)), }, ]); }; -export const getCoverageItemActions = (dispatch) => { +export const getCoverageItemActions = (dispatch: any) => { const {watchCoverage, stopWatchingCoverage} = agendaActions; return [ { name: gettext('Watch'), icon: 'watch', - when: (cov, user) => user && !isWatched(cov, user), - action: (coverage, group, item) => dispatch(watchCoverage(coverage, item)), + when: (cov: any, user: any) => user && !isWatched(cov, user), + action: (coverage: any, group: any, item: any) => dispatch(watchCoverage(coverage, item)), tooltip: gettext('Watch this coverage'), }, { name: gettext('Stop watching'), icon: 'unwatch', - when: (cov, user) => user && isWatched(cov, user), - action: (coverage, group, item) => dispatch(stopWatchingCoverage(coverage, item)), + when: (cov: any, user: any) => user && isWatched(cov, user), + action: (coverage: any, group: any, item: any) => dispatch(stopWatchingCoverage(coverage, item)), }, ]; }; diff --git a/assets/agenda/selectors.ts b/assets/agenda/selectors.ts index f3d01440b..7b2d6b96f 100644 --- a/assets/agenda/selectors.ts +++ b/assets/agenda/selectors.ts @@ -1,7 +1,7 @@ import {get} from 'lodash'; import {uiConfigSelector} from 'ui/selectors'; -export const agendaFiltersConfigSelector = (state) => get(uiConfigSelector(state), 'subnav.filters') || [ +export const agendaFiltersConfigSelector = (state: any) => get(uiConfigSelector(state), 'subnav.filters') || [ 'item_type', 'calendar', 'location', diff --git a/assets/agenda/utils.ts b/assets/agenda/utils.ts index cf5e79654..582870a8f 100644 --- a/assets/agenda/utils.ts +++ b/assets/agenda/utils.ts @@ -24,18 +24,18 @@ const navigationFunctions = { 'day': { 'next': getNextDay, 'previous': getPreviousDay, - 'format': (dateString) => moment(dateString).format(AGENDA_DATE_FORMAT_SHORT), + 'format': (dateString: any) => moment(dateString).format(AGENDA_DATE_FORMAT_SHORT), }, 'week': { 'next': getNextWeek, 'previous': getPreviousWeek, - 'format': (dateString) => `${moment(dateString).format('D MMMM')} - + 'format': (dateString: any) => `${moment(dateString).format('D MMMM')} - ${moment(dateString).add(6, 'days').format('D MMMM')}`, }, 'month': { 'next': getNextMonth, 'previous': getPreviousMonth, - 'format': (dateString) => moment(dateString).format('MMMM, YYYY'), + 'format': (dateString: any) => moment(dateString).format('MMMM, YYYY'), } }; @@ -491,7 +491,7 @@ export function getDataFromCoverages(item: any) { return data; } -const getNextPendingScheduledUpdate = (coverage) => { +const getNextPendingScheduledUpdate = (coverage: any) => { if (coverage.scheduled == null) { // Not privileged to see coverage details return null; @@ -634,15 +634,15 @@ export function containsExtraDate(item: any, dateToCheck: any) { } // get start date in utc mode if there is no time info -const getStartDate = (item) => item.dates.all_day ? moment.utc(item.dates.start) : moment(item.dates.start); +const getStartDate = (item: any) => item.dates.all_day ? moment.utc(item.dates.start) : moment(item.dates.start); // get end date in utc mode if there is no end time info -const getEndDate = (item) => item.dates.no_end_time || item.dates.all_day ? +const getEndDate = (item: any) => item.dates.no_end_time || item.dates.all_day ? moment.utc(item.dates.end || item.dates.start) : moment(item.dates.end || item.dates.start); // compare days without being affected by timezone -const isBetweenDay = (day, start, end) => { +const isBetweenDay = (day: any, start: any, end: any) => { // it will be converted to local time // if passed as string which we need // for all day events which are in utc mode @@ -730,7 +730,7 @@ export function groupItems(items: any, activeDate: any, activeGrouping: any, fea items: groupedItems[k], _sortDate: moment(k, DATE_FORMAT) })), - (g) => g._sortDate); + (g: any) => g._sortDate); } /** @@ -820,7 +820,7 @@ export function isCoverageBeingUpdated(coverage: any) { !['published', 'corrected'].includes(coverage.deliveries[0].delivery_state); } -export const groupRegions = (filter, aggregations, props) => { +export const groupRegions = (filter: any, aggregations: any, props: any) => { if (props.locators && Object.keys(props.locators).length > 0) { let regions = sortBy(props.locators.filter((l) => l.state).map((l) => ({...l, 'key': l.name, 'label': l.state})), 'label'); const others = props.locators.filter((l) => !l.state).map((l) => ({...l, 'key': l.name, 'label': l.country || l.world_region})); @@ -839,9 +839,9 @@ export const groupRegions = (filter, aggregations, props) => { return aggregations[filter.field].buckets; }; -export const getRegionName = (key, locator) => locator.label || key; +export const getRegionName = (key: any, locator: any) => locator.label || key; -export const isItemTBC = (item) => ( +export const isItemTBC = (item: any) => ( !get(item, 'event') ? get(item, `planning_items[0].${TO_BE_CONFIRMED_FIELD}`) : get(item, `event.${TO_BE_CONFIRMED_FIELD}`) ); @@ -858,7 +858,7 @@ export function formatCoverageDate(coverage: any) { parseDate(coverage.scheduled).format(COVERAGE_DATE_TIME_FORMAT); } -export const getCoverageTooltip = (coverage, beingUpdated) => { +export const getCoverageTooltip = (coverage: any, beingUpdated: any) => { const slugline = coverage.item_slugline || coverage.slugline; const coverageType = getCoverageDisplayName(coverage.coverage_type); const coverageScheduled = moment(coverage.scheduled); @@ -941,7 +941,7 @@ function getScheduleType(item: any) { * @return {Array} [time string, date string] */ export function formatAgendaDate(item: any, group: any, {localTimeZone = true, onlyDates = false}) { - const getFormattedTimezone = (date) => { + const getFormattedTimezone = (date: any) => { let tzStr = date.format('z'); if (tzStr.indexOf('+0') >= 0) { return tzStr.replace('+0', 'GMT+'); diff --git a/assets/am-news/components/AmNewsApp.tsx b/assets/am-news/components/AmNewsApp.tsx index 8b0a372ae..f2c3cacd7 100644 --- a/assets/am-news/components/AmNewsApp.tsx +++ b/assets/am-news/components/AmNewsApp.tsx @@ -250,7 +250,7 @@ AmNewsApp.propTypes = { context: PropTypes.string, }; -const mapStateToProps = (state) => ({ +const mapStateToProps = (state: any) => ({ state: state, isLoading: state.isLoading, totalItems: state.totalItems, @@ -274,13 +274,13 @@ const mapStateToProps = (state) => ({ context: state.context, }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = (dispatch: any) => ({ fetchItems: () => dispatch(fetchItems()), - setQuery: (query) => dispatch(setQuery(query)), + setQuery: (query: any) => dispatch(setQuery(query)), actions: getItemActions(dispatch), fetchMoreItems: () => dispatch(fetchMoreItems()), closePreview: () => dispatch(previewItem(null)), - toggleNavigation: (navigation) => dispatch(toggleNavigation(navigation)), + toggleNavigation: (navigation: any) => dispatch(toggleNavigation(navigation)), }); export default connect(mapStateToProps, mapDispatchToProps)(AmNewsApp); diff --git a/assets/am-news/components/AmNewsList.tsx b/assets/am-news/components/AmNewsList.tsx index b532a4499..c93ffe828 100644 --- a/assets/am-news/components/AmNewsList.tsx +++ b/assets/am-news/components/AmNewsList.tsx @@ -219,7 +219,7 @@ AmNewsList.propTypes = { contextName: PropTypes.string, }; -const mapStateToProps = (state) => ({ +const mapStateToProps = (state: any) => ({ items: state.items, itemsById: state.itemsById, activeItem: state.activeItem, diff --git a/assets/am-news/components/AmNewsListItem.tsx b/assets/am-news/components/AmNewsListItem.tsx index 319e1500d..8cbba0820 100644 --- a/assets/am-news/components/AmNewsListItem.tsx +++ b/assets/am-news/components/AmNewsListItem.tsx @@ -93,7 +93,7 @@ class AmNewsListItem extends React.Component { return (
this.articleElem = elem} + ref={(elem: any) => this.articleElem = elem} onClick={() => onClick(item)} onDoubleClick={() => onDoubleClick(item)} onKeyDown={this.onKeyDown} diff --git a/assets/am-news/components/Navigations.tsx b/assets/am-news/components/Navigations.tsx index 1df070839..c8eb0b358 100644 --- a/assets/am-news/components/Navigations.tsx +++ b/assets/am-news/components/Navigations.tsx @@ -15,7 +15,7 @@ const Navigations = ({navigations=[], activeNavigation, toggleNavigation, fetchI 'nav-link', {active: get(activeNavigation, '[0]') === navigation._id} )} - onClick={(event) => { + onClick={(event: any) => { event.preventDefault(); toggleNavigation(navigation); fetchItems(); diff --git a/assets/am-news/utils.ts b/assets/am-news/utils.ts index 6db63c227..8be7b41bd 100644 --- a/assets/am-news/utils.ts +++ b/assets/am-news/utils.ts @@ -2,16 +2,16 @@ import {get} from 'lodash'; import {gettext} from '../utils'; -export const isFuel = (item) => (get(item, 'slugline') || '').match(/fuel/gi); -export const isWeather = (item) => (get(item, 'slugline') || '').match(/weather|observation|forecast/gi); -export const isTraffic = (item) => (get(item, 'slugline') || '').match(/traffic/gi); -export const isPublicTransport = (item) => (get(item, 'slugline') || '').match(/public transport/gi); -export const isAlert = (item) => !isFuel(item) && (get(item, 'slugline') || '').match(/^alert /gi); -export const isQuote = (item) => !isFuel(item) && (get(item, 'slugline') || '').match(/^quote /gi); -export const isHeadlines = (item) => !isFuel(item) && (get(item, 'slugline') || '').match(/headlines/gi); -export const isDataItem = (item) => (isFuel(item) || isWeather(item)); - -export const getAMNewsIcon = (item) => { +export const isFuel = (item: any) => (get(item, 'slugline') || '').match(/fuel/gi); +export const isWeather = (item: any) => (get(item, 'slugline') || '').match(/weather|observation|forecast/gi); +export const isTraffic = (item: any) => (get(item, 'slugline') || '').match(/traffic/gi); +export const isPublicTransport = (item: any) => (get(item, 'slugline') || '').match(/public transport/gi); +export const isAlert = (item: any) => !isFuel(item) && (get(item, 'slugline') || '').match(/^alert /gi); +export const isQuote = (item: any) => !isFuel(item) && (get(item, 'slugline') || '').match(/^quote /gi); +export const isHeadlines = (item: any) => !isFuel(item) && (get(item, 'slugline') || '').match(/headlines/gi); +export const isDataItem = (item: any) => (isFuel(item) || isWeather(item)); + +export const getAMNewsIcon = (item: any) => { let iconType = 'text'; if (isDataItem(item)) { @@ -33,7 +33,7 @@ export const getAMNewsIcon = (item) => { return iconType; }; -export const getAMNewsToolTip = (item) => { +export const getAMNewsToolTip = (item: any) => { let iconType = gettext('Text'); if (isDataItem(item)) { diff --git a/assets/cards/components/Cards.tsx b/assets/cards/components/Cards.tsx index dc8f2b1c5..496e8033a 100644 --- a/assets/cards/components/Cards.tsx +++ b/assets/cards/components/Cards.tsx @@ -68,7 +68,7 @@ class Cards extends React.Component { render() { const progressStyle = {width: '25%'}; - const cardFilter = (card) => !this.props.activeDashboard || + const cardFilter = (card: any) => !this.props.activeDashboard || get(card, 'dashboard', 'newsroom') === this.props.activeDashboard; return ( @@ -133,7 +133,7 @@ Cards.propTypes = { dashboards: PropTypes.arrayOf(PropTypes.object), }; -const mapStateToProps = (state) => ({ +const mapStateToProps = (state: any) => ({ cards: state.cards.map((id) => state.cardsById[id]), cardToEdit: state.cardToEdit, activeCardId: state.activeCardId, @@ -147,13 +147,13 @@ const mapStateToProps = (state) => ({ dashboards: state.dashboards.list, }); -const mapDispatchToProps = (dispatch) => ({ - selectCard: (_id) => dispatch(selectCard(_id)), - editCard: (event) => dispatch(editCard(event)), - saveCard: (type) => dispatch(postCard(type)), - deleteCard: (type) => dispatch(deleteCard(type)), +const mapDispatchToProps = (dispatch: any) => ({ + selectCard: (_id: any) => dispatch(selectCard(_id)), + editCard: (event: any) => dispatch(editCard(event)), + saveCard: (type: any) => dispatch(postCard(type)), + deleteCard: (type: any) => dispatch(deleteCard(type)), newCard: () => dispatch(newCard()), - cancelEdit: (event) => dispatch(cancelEdit(event)), + cancelEdit: (event: any) => dispatch(cancelEdit(event)), dispatch: dispatch, }); diff --git a/assets/cards/components/CardsApp.tsx b/assets/cards/components/CardsApp.tsx index 8676875b6..2a1d2f02d 100644 --- a/assets/cards/components/CardsApp.tsx +++ b/assets/cards/components/CardsApp.tsx @@ -45,7 +45,7 @@ CardsApp.propTypes = { activeDashboard: PropTypes.string, }; -const mapStateToProps = (state) => ({ +const mapStateToProps = (state: any) => ({ dashboards: state.dashboards.list, activeDashboard: state.dashboards.active, }); diff --git a/assets/cards/components/EditCard.tsx b/assets/cards/components/EditCard.tsx index 3ea012b3a..ca7c51b7d 100644 --- a/assets/cards/components/EditCard.tsx +++ b/assets/cards/components/EditCard.tsx @@ -23,7 +23,7 @@ class EditCard extends React.Component { const cardType = this.props.card.type || ''; const CardComponent = getCardEditComponent(cardType); const cardTypes = CARD_TYPES.filter( - (card) => dashboard.cards.includes(card._id) + (card: any) => dashboard.cards.includes(card._id) ).map((c) => ({value: c._id, text: c.text})); cardTypes.unshift({value: '', text: '', component: getCardEditComponent('')}); diff --git a/assets/companies/components/CompaniesApp.tsx b/assets/companies/components/CompaniesApp.tsx index 9c14aa236..d7664a90b 100644 --- a/assets/companies/components/CompaniesApp.tsx +++ b/assets/companies/components/CompaniesApp.tsx @@ -65,7 +65,7 @@ CompaniesApp.propTypes = { setQuery: PropTypes.func, }; -const mapStateToProps = (state) => ({ +const mapStateToProps = (state: any) => ({ isLoading: state.isLoading, totalCompanies: state.totalCompanies, activeQuery: searchQuerySelector(state), diff --git a/assets/companies/components/CompanyList.tsx b/assets/companies/components/CompanyList.tsx index bf4367df0..40b9b8bb7 100644 --- a/assets/companies/components/CompanyList.tsx +++ b/assets/companies/components/CompanyList.tsx @@ -58,7 +58,7 @@ CompanyList.propTypes = { selectCompany: PropTypes.func.isRequired, }; -const mapStateToProps = (state) => ({ +const mapStateToProps = (state: any) => ({ companies: state.companies.map((id) => state.companiesById[id]), activeCompanyId: state.activeCompanyId, companyTypes: state.companyTypes, diff --git a/assets/companies/components/CompanyPermissions.tsx b/assets/companies/components/CompanyPermissions.tsx index f4c73c0ce..0fdf0e869 100644 --- a/assets/companies/components/CompanyPermissions.tsx +++ b/assets/companies/components/CompanyPermissions.tsx @@ -120,7 +120,7 @@ function CompanyPermissions({ min="0" tabIndex="0" value={(seats[product._id] || 0).toString()} - onChange={(event) => { + onChange={(event: any) => { updateCompanySeats( product._id, parseInt(event.target.value) diff --git a/assets/companies/components/EditCompany.tsx b/assets/companies/components/EditCompany.tsx index ea644400b..039d43780 100644 --- a/assets/companies/components/EditCompany.tsx +++ b/assets/companies/components/EditCompany.tsx @@ -225,7 +225,7 @@ EditCompany.propTypes = { })).isRequired, }; -const mapStateToProps = (state) => ({ +const mapStateToProps = (state: any) => ({ company: state.companyToEdit, companiesById: state.companiesById, sections: state.sections, @@ -237,16 +237,16 @@ const mapStateToProps = (state) => ({ ssoEnabled: state.ssoEnabled, }); -const mapDispatchToProps = (dispatch) => ({ - onChange: (event) => dispatch(editCompany(event)), - toggleCompanySection: (sectionId) => dispatch(toggleCompanySection(sectionId)), - toggleCompanyProduct: (productId, sectionId, enable) => dispatch(toggleCompanyProduct(productId, sectionId, enable)), - updateCompanySeats: (productId, seats) => dispatch(updateCompanySeats(productId, seats)), - saveCompany: (permissions) => dispatch(postCompany(permissions)), - setError: (errors) => dispatch(setError(errors)), +const mapDispatchToProps = (dispatch: any) => ({ + onChange: (event: any) => dispatch(editCompany(event)), + toggleCompanySection: (sectionId: any) => dispatch(toggleCompanySection(sectionId)), + toggleCompanyProduct: (productId: any, sectionId: any, enable: any) => dispatch(toggleCompanyProduct(productId, sectionId, enable)), + updateCompanySeats: (productId: any, seats: any) => dispatch(updateCompanySeats(productId, seats)), + saveCompany: (permissions: any) => dispatch(postCompany(permissions)), + setError: (errors: any) => dispatch(setError(errors)), deleteCompany: () => dispatch(deleteCompany()), - cancelEdit: (event) => dispatch(cancelEdit(event)), - fetchCompanyUsers: (companyId) => dispatch(fetchCompanyUsers(companyId)), + cancelEdit: (event: any) => dispatch(cancelEdit(event)), + fetchCompanyUsers: (companyId: any) => dispatch(fetchCompanyUsers(companyId)), }); export default connect(mapStateToProps, mapDispatchToProps)(EditCompany); diff --git a/assets/companies/reducers.ts b/assets/companies/reducers.ts index d1995941b..31ae20e00 100644 --- a/assets/companies/reducers.ts +++ b/assets/companies/reducers.ts @@ -115,7 +115,7 @@ export default function companyReducer(state: any = initialState, action: any) { }); } else { company.products = company.products.filter( - (product) => ( + (product: any) => ( product._id !== productId ) ); diff --git a/assets/company-admin/components/CompanyAdminApp.tsx b/assets/company-admin/components/CompanyAdminApp.tsx index a928d5af3..f8203ef22 100644 --- a/assets/company-admin/components/CompanyAdminApp.tsx +++ b/assets/company-admin/components/CompanyAdminApp.tsx @@ -243,7 +243,7 @@ CompanyAdminAppComponent.propTypes = { totalUsers:PropTypes.number }; -const mapStateToProps = (state) => ({ +const mapStateToProps = (state: any) => ({ sectionId: state.sectionId, usersById: state.usersById, user: currentUserSelector(state), @@ -258,22 +258,22 @@ const mapStateToProps = (state) => ({ totalUsers:state.totalUsers }); -const mapDispatchToProps = (dispatch) => ({ - setSection: (sectionId) => dispatch(setSection(sectionId)), +const mapDispatchToProps = (dispatch: any) => ({ + setSection: (sectionId: any) => dispatch(setSection(sectionId)), newUser: () => dispatch(newUser()), - editUser: (event) => dispatch(editUser(event)), - setError: (errors) => dispatch(setError(errors)), + editUser: (event: any) => dispatch(editUser(event)), + setError: (errors: any) => dispatch(setError(errors)), saveUser: () => dispatch(postUser()), closeUserEditor: () => dispatch(cancelEdit()), deleteUser: () => dispatch(deleteUser()), resetPassword: () => dispatch(resetPassword()), resendUserInvite: () => dispatch(resendUserInvite()), - setQuery: (query) => dispatch(setSearchQuery(query)), + setQuery: (query: any) => dispatch(setSearchQuery(query)), fetchUsers: () => dispatch(fetchUsers()), - setSort: (param) => dispatch(setSort(param)), + setSort: (param: any) => dispatch(setSort(param)), toggleSortDirection: () => dispatch(toggleSortDirection()), - setProductFilter: (productId) => dispatch(setProductFilter(productId)), + setProductFilter: (productId: any) => dispatch(setProductFilter(productId)), }); export const CompanyAdminApp = connect(mapStateToProps, mapDispatchToProps)(CompanyAdminAppComponent); diff --git a/assets/company-admin/components/CompanyAdminProductSeatRequestModal.tsx b/assets/company-admin/components/CompanyAdminProductSeatRequestModal.tsx index 513499fc7..11837169d 100644 --- a/assets/company-admin/components/CompanyAdminProductSeatRequestModal.tsx +++ b/assets/company-admin/components/CompanyAdminProductSeatRequestModal.tsx @@ -70,7 +70,7 @@ class CompanyAdminProductSeatRequestModalComponent extends React.Component { _id: section._id, name: section.name, products: this.props.products.filter( - (product) => (product.product_type === section._id) + (product: any) => (product.product_type === section._id) ), }); }); @@ -101,7 +101,7 @@ class CompanyAdminProductSeatRequestModalComponent extends React.Component { closeModal={this.props.closeModal} clickOutsideToClose={true} > -
{event.preventDefault();}}> + {event.preventDefault();}}>
@@ -92,7 +92,7 @@ CompanyReportsApp.propTypes = { products: PropTypes.array, }; -const mapStateToProps = (state) => ({ +const mapStateToProps = (state: any) => ({ activeReport: state.activeReport, results: state.results, companies: state.companies, diff --git a/assets/company-reports/components/ContentActivity.tsx b/assets/company-reports/components/ContentActivity.tsx index 036e8dea4..cbce87924 100644 --- a/assets/company-reports/components/ContentActivity.tsx +++ b/assets/company-reports/components/ContentActivity.tsx @@ -153,7 +153,7 @@ class ContentActivity extends React.Component { const companies = keyBy(this.props.companies, '_id'); const results = props.results.map( - (item) => ({ + (item: any) => ({ _id: item._id, versioncreated: formatTime(get(item, 'versioncreated') || ''), headline: get(item, 'headline') || '', @@ -315,7 +315,7 @@ ContentActivity.propTypes = { apiEnabled: PropTypes.bool, }; -const mapStateToProps = (state) => ({ +const mapStateToProps = (state: any) => ({ companies: state.companies, reportParams: state.reportParams, isLoading: state.isLoading, diff --git a/assets/company-reports/components/ProductCompanies.tsx b/assets/company-reports/components/ProductCompanies.tsx index 7bec8decc..09d8199ba 100644 --- a/assets/company-reports/components/ProductCompanies.tsx +++ b/assets/company-reports/components/ProductCompanies.tsx @@ -25,7 +25,7 @@ class ProductCompanies extends React.Component { getDropdownItems(filter) { const {toggleFilterAndQuery} = this.props; - let getName = (text) => (text); + let getName = (text: any) => (text); let itemsArray = []; switch (filter.field) { case 'product': @@ -99,7 +99,7 @@ ProductCompanies.propTypes = { isLoading: PropTypes.bool, }; -const mapStateToProps = (state) => ({ +const mapStateToProps = (state: any) => ({ products: state.products, reportParams: state.reportParams, isLoading: state.isLoading, diff --git a/assets/company-reports/components/SubscriberActivity.tsx b/assets/company-reports/components/SubscriberActivity.tsx index c55f3f4d7..d6d2c1e77 100644 --- a/assets/company-reports/components/SubscriberActivity.tsx +++ b/assets/company-reports/components/SubscriberActivity.tsx @@ -49,7 +49,7 @@ class SubscriberActivity extends React.Component { getDropdownItems(filter) { const {toggleFilterAndQuery, sections, apiEnabled} = this.props; - let getName = (text) => (text); + let getName = (text: any) => (text); let itemsArray = []; // Company is not filtered, always show full list switch(filter.field) { @@ -213,7 +213,7 @@ SubscriberActivity.propTypes = { apiEnabled: PropTypes.bool, }; -const mapStateToProps = (state) => ({ +const mapStateToProps = (state: any) => ({ companies: state.companies, reportParams: state.reportParams, isLoading: state.isLoading, diff --git a/assets/components/ActionButton.tsx b/assets/components/ActionButton.tsx index 7477859a4..ca111bb3d 100644 --- a/assets/components/ActionButton.tsx +++ b/assets/components/ActionButton.tsx @@ -44,7 +44,7 @@ class ActionButton extends React.Component { } } } - ref={(elem) => this.elem = elem} + ref={(elem: any) => this.elem = elem} title={!this.props.displayName ? this.props.action.tooltip || this.props.action.name : ''} aria-label={!this.props.displayName ? this.props.action.tooltip || this.props.action.name : this.props.action.name }> diff --git a/assets/components/ActionMenu.tsx b/assets/components/ActionMenu.tsx index 9363684cc..15f4033df 100644 --- a/assets/components/ActionMenu.tsx +++ b/assets/components/ActionMenu.tsx @@ -22,8 +22,8 @@ class ActionMenu extends React.Component { return (
- {!isResetActive && !this.props.resultsFiltered ? null : ([ + {!isResetActive && !this.props.resultsFiltered ? null : ([ Date: Mon, 12 Jun 2023 18:50:09 +0200 Subject: [PATCH 17/71] add any types for arguments of simple arrow functions v2 --- assets/agenda/actions.ts | 46 ++++++++++----------- assets/agenda/components/AgendaList.tsx | 8 ++-- assets/am-news/components/AmNewsList.tsx | 4 +- assets/company-admin/actions.ts | 2 +- assets/news-api/components/EditAPIToken.tsx | 2 +- assets/search/actions.ts | 18 ++++---- assets/search/tests/actions.spec.ts | 2 +- assets/user-profile/actions.ts | 6 +-- assets/wire/actions.ts | 34 +++++++-------- 9 files changed, 61 insertions(+), 61 deletions(-) diff --git a/assets/agenda/actions.ts b/assets/agenda/actions.ts index df890aef9..b98cd538e 100644 --- a/assets/agenda/actions.ts +++ b/assets/agenda/actions.ts @@ -60,13 +60,13 @@ export function preview(item, group, plan) { } export function previewAndCopy(item) { - return (dispatch) => { + return (dispatch: any) => { dispatch(copyPreviewContents(item)); }; } export function previewItem(item, group, plan) { - return (dispatch, getState) => { + return (dispatch: any, getState: any) => { dispatch(fetchWireItemsForAgenda(item)); markItemAsRead(item, getState()); dispatch(preview(item, group, plan)); @@ -75,7 +75,7 @@ export function previewItem(item, group, plan) { } export function fetchWireItemsForAgenda(item) { - return (dispatch) => { + return (dispatch: any) => { let wireIds = []; (get(item, 'coverages') || []).forEach((c) => { if (c.coverage_type === 'text' && c.delivery_id) { @@ -115,7 +115,7 @@ export function requestCoverage(item, message) { } export function openItem(item, group, plan) { - return (dispatch, getState) => { + return (dispatch: any, getState: any) => { const state = getState(); markItemAsRead(item, state); dispatch(fetchWireItemsForAgenda(item)); @@ -159,7 +159,7 @@ export function selectDate(dateString, grouping) { export function printItem(item) { - return (dispatch, getState) => { + return (dispatch: any, getState: any) => { const map = encodeURIComponent(getMapSource(getLocations(item), 2)); window.open(`/agenda/${item._id}?print&map=${map}`, '_blank'); @@ -177,7 +177,7 @@ export function printItem(item) { * This is an initial version, should be updated with preview markup changes. */ export function copyPreviewContents(item) { - return (dispatch, getState) => { + return (dispatch: any, getState: any) => { const state = getState(); if (!state.user) { @@ -259,7 +259,7 @@ function search(state, next) { * Fetch items for current query */ export function fetchItems() { - return (dispatch, getState) => { + return (dispatch: any, getState: any) => { const start = Date.now(); dispatch(queryItems()); return search(getState()) @@ -272,7 +272,7 @@ export function fetchItems() { } export function fetchItem(id) { - return (dispatch) => { + return (dispatch: any) => { return server.get(`/agenda/${id}?format=json`) .then((data) => dispatch(recieveItem(data))) .catch(errorHandler); @@ -281,7 +281,7 @@ export function fetchItem(id) { export const WATCH_EVENTS = 'WATCH_EVENTS'; export function watchEvents(ids) { - return (dispatch, getState) => { + return (dispatch: any, getState: any) => { server.post(WATCH_URL, {items: ids}) .then(() => { dispatch({type: WATCH_EVENTS, items: ids}); @@ -293,7 +293,7 @@ export function watchEvents(ids) { export const STOP_WATCHING_EVENTS = 'STOP_WATCHING_EVENTS'; export function stopWatchingEvents(items) { - return (dispatch, getState) => { + return (dispatch: any, getState: any) => { server.del(getState().bookmarks ? `${WATCH_URL}?bookmarks=true` : WATCH_URL, {items}) .then(() => { notify.success(gettext('Stopped watching items successfully.')); @@ -316,7 +316,7 @@ export function stopWatchingEvents(items) { * @return {function} */ export function shareItems(items) { - return (dispatch, getState) => { + return (dispatch: any, getState: any) => { const user = getState().user; const company = getState().company; return server.get(`/companies/${company}/users`) @@ -337,7 +337,7 @@ export function removeBookmarkItems(items) { } export function bookmarkItems(items) { - return (dispatch, getState) => + return (dispatch: any, getState: any) => server.post('/agenda_bookmark', {items}) .then(() => { if (items.length > 1) { @@ -354,7 +354,7 @@ export function bookmarkItems(items) { } export function removeBookmarks(items) { - return (dispatch, getState) => + return (dispatch: any, getState: any) => server.del('/agenda_bookmark', {items}) .then(() => { if (items.length > 1) { @@ -414,7 +414,7 @@ export function removeNewItems(data) { * @param {Object} data */ export function pushNotification(push) { - return (dispatch, getState) => { + return (dispatch: any, getState: any) => { const user = getState().user; const company = getState().company; @@ -507,7 +507,7 @@ export function updateItem(item: any) { } export function toggleDropdownFilter(key: any, val: any) { - return (dispatch) => { + return (dispatch: any) => { dispatch(setActive(null)); dispatch(preview(null)); @@ -524,7 +524,7 @@ export function toggleDropdownFilter(key: any, val: any) { } function setLocationFilter(location: any) { - return (dispatch, getState) => { + return (dispatch: any, getState: any) => { const state = getState(); const currentFilters = cloneDeep(searchFilterSelector(state)); const currentLocation = get(currentFilters, 'location') || {}; @@ -556,7 +556,7 @@ export function recieveNextItems(data: any) { const MAX_ITEMS = 1000; // server limit export function fetchMoreItems() { - return (dispatch, getState) => { + return (dispatch: any, getState: any) => { const state = getState(); const limit = Math.min(MAX_ITEMS, state.totalItems); @@ -581,7 +581,7 @@ export function initParams(params: any) { clearAgendaDropdownFilters(); } - return (dispatch, getState) => { + return (dispatch: any, getState: any) => { const featuredParam = params.get('featured'); if (featuredParam && featuredParam !== get(getState(), 'agenda.featuredOnly', false).toString()) { dispatch(toggleFeaturedFilter(false)); @@ -607,7 +607,7 @@ export function initParams(params: any) { * @return {Promise} */ export function loadMyAgendaTopic(topicId: any) { - return (dispatch, getState) => { + return (dispatch: any, getState: any) => { // Set featured query option to false when using navigations if (get(getState(), 'agenda.featuredOnly')) { dispatch({type: TOGGLE_FEATURED_FILTER}); @@ -620,7 +620,7 @@ export function loadMyAgendaTopic(topicId: any) { export const TOGGLE_FEATURED_FILTER = 'TOGGLE_FEATURED_FILTER'; export function toggleFeaturedFilter(fetch: any = true) { - return (dispatch) => { + return (dispatch: any) => { toggleFeaturedOnlyParam(); dispatch({type: TOGGLE_FEATURED_FILTER}); if (!fetch) { @@ -638,7 +638,7 @@ export function setItemTypeFilter(value: any) { export const WATCH_COVERAGE = 'WATCH_COVERAGE'; export function watchCoverage(coverage: any, item: any) { - return (dispatch) => { + return (dispatch: any) => { server.post(WATCH_COVERAGE_URL, { coverage_id: coverage.coverage_id, item_id: item._id @@ -650,13 +650,13 @@ export function watchCoverage(coverage: any, item: any) { item }); notify.success(gettext('Started watching coverage successfully.')); - }, (error) => { errorHandler(error, dispatch);}); + }, (error: any) => { errorHandler(error, dispatch);}); }; } export const STOP_WATCHING_COVERAGE = 'STOP_WATCHING_COVERAGE'; export function stopWatchingCoverage(coverage: any, item: any) { - return (dispatch, getState) => { + return (dispatch: any, getState: any) => { server.del(WATCH_COVERAGE_URL, { coverage_id: coverage.coverage_id, item_id: item._id diff --git a/assets/agenda/components/AgendaList.tsx b/assets/agenda/components/AgendaList.tsx index 1ddd27102..40e28b78e 100644 --- a/assets/agenda/components/AgendaList.tsx +++ b/assets/agenda/components/AgendaList.tsx @@ -22,10 +22,10 @@ const CLICK_TIMEOUT = 200; // time when we wait for double click after click const itemsSelector = (state) => state.items.map((_id) => state.itemsById[_id]); -const activeDateSelector = (state) => get(state, 'agenda.activeDate'); -const activeGroupingSelector = (state) => get(state, 'agenda.activeGrouping'); -const itemsByIdSelector = (state) => get(state, 'itemsById', {}); -const featuredOnlySelector = (state) => get(state, 'agenda.featuredOnly', false); +const activeDateSelector = (state: any) => get(state, 'agenda.activeDate'); +const activeGroupingSelector = (state: any) => get(state, 'agenda.activeGrouping'); +const itemsByIdSelector = (state: any) => get(state, 'itemsById', {}); +const featuredOnlySelector = (state: any) => get(state, 'agenda.featuredOnly', false); const groupedItemsSelector = createSelector( [itemsSelector, activeDateSelector, activeGroupingSelector, featuredOnlySelector], diff --git a/assets/am-news/components/AmNewsList.tsx b/assets/am-news/components/AmNewsList.tsx index bfa9b60d0..396f060c0 100644 --- a/assets/am-news/components/AmNewsList.tsx +++ b/assets/am-news/components/AmNewsList.tsx @@ -17,8 +17,8 @@ const CLICK_TIMEOUT = 200; // time when we wait for double click after click const itemsSelector = (state) => state.items.map((_id) => state.itemsById[_id]); const groupedItemsSelector = createSelector( [itemsSelector], - (items) => { - const groupByDate = (item) => { + (items: any) => { + const groupByDate = (item: any) => { const date = moment(item.versioncreated).set({'h': 0, 'm': 0, 's': 0}); return formatDate(date); }; diff --git a/assets/company-admin/actions.ts b/assets/company-admin/actions.ts index 500e0974a..e917d4578 100644 --- a/assets/company-admin/actions.ts +++ b/assets/company-admin/actions.ts @@ -4,7 +4,7 @@ import {initViewData as initUserViewData, setError, fetchUsers} from 'users/acti export const INIT_VIEW_DATA = 'INIT_VIEW_DATA'; export function initViewData(data: any) { - return (dispatch) => { + return (dispatch: any) => { dispatch({type: INIT_VIEW_DATA, data: data}); dispatch(initUserViewData(data)); }; diff --git a/assets/news-api/components/EditAPIToken.tsx b/assets/news-api/components/EditAPIToken.tsx index 99c45dcc1..7c487c6b1 100644 --- a/assets/news-api/components/EditAPIToken.tsx +++ b/assets/news-api/components/EditAPIToken.tsx @@ -61,7 +61,7 @@ export default class EditAPIToken extends React.Component { loaded: true, creating: false, }); - }, (error) => { + }, (error: any) => { if (error.response.status === 404) { this.setState({ loaded: true, diff --git a/assets/search/actions.ts b/assets/search/actions.ts index 13c460af6..78b683902 100644 --- a/assets/search/actions.ts +++ b/assets/search/actions.ts @@ -60,7 +60,7 @@ export function setTopics(topics: any) { export const TOGGLE_NAVIGATION = 'TOGGLE_NAVIGATION'; export function toggleNavigation(navigation: any, disableSameNavigationDeselect: any) { - return (dispatch, getState) => { + return (dispatch: any, getState: any) => { const state = getState(); const currentNavigation = searchNavigationSelector(state); let newNavigation = [...currentNavigation]; @@ -74,7 +74,7 @@ export function toggleNavigation(navigation: any, disableSameNavigationDeselect: if (currentNavigation.includes(navigationId)) { // The navigation is already selected, so deselect it newNavigation = newNavigation.filter( - (navId) => navId !== navigationId + (navId: any) => navId !== navigationId ); } else { // The navigation is not selected, so select it now @@ -123,7 +123,7 @@ export function toggleFilter(key: any, value: any, single: any) { delete currentFilters[key]; } else if (single) { currentFilters[key] = currentFilters[key].filter( - (val) => val === _value + (val: any) => val === _value ); } } @@ -214,7 +214,7 @@ export function followStory(item: any, type: any) { * @param {String} navigationId */ export function toggleNavigationById(navigationId: any) { - return (dispatch, getState) => { + return (dispatch: any, getState: any) => { const navigation = (get(getState().search, 'navigations') || []).find((nav) => navigationId === nav._id); if (navigation) { dispatch(toggleNavigation(navigation)); @@ -228,7 +228,7 @@ export function toggleNavigationById(navigationId: any) { * @param {Array} navigationIds */ export function toggleNavigationByIds(navigationIds: any) { - return (dispatch, getState) => { + return (dispatch: any, getState: any) => { const navigations = (get(getState().search, 'navigations') || []); toggleNavigation(); @@ -239,7 +239,7 @@ export function toggleNavigationByIds(navigationIds: any) { } export function submitFollowTopic(data: any) { - return (dispatch, getState) => { + return (dispatch: any, getState: any) => { const user = getState().user; const userId = get(user, '_id') || user; @@ -263,7 +263,7 @@ export function submitFollowTopic(data: any) { * @param {Object} data */ export function submitShareItem(data: any) { - return (dispatch, getState) => { + return (dispatch: any, getState: any) => { const userContext = context(getState()); const type = userContext || data.items[0].topic_type; data.maps = []; @@ -292,7 +292,7 @@ export function submitShareItem(data: any) { } export function loadMyTopic(topicId: any) { - return (dispatch, getState) => { + return (dispatch: any, getState: any) => { const state = getState(); const currentTopicId = searchTopicIdSelector(state); const nextTopicId = topicId === currentTopicId ? null : topicId; @@ -466,7 +466,7 @@ export function setParams(params: any) { * @param {URLSearchParams} params */ export function initParams(params: any) { - return (dispatch, getState) => { + return (dispatch: any, getState: any) => { const custom = { query: params.get('q'), created: params.get('created') ? JSON.parse(params.get('created')) : null, diff --git a/assets/search/tests/actions.spec.ts b/assets/search/tests/actions.spec.ts index d11e881f0..c9dbe9b9b 100644 --- a/assets/search/tests/actions.spec.ts +++ b/assets/search/tests/actions.spec.ts @@ -10,7 +10,7 @@ describe('search actions', () => { let store: any; let params: any; - const updateParams = (search) => { + const updateParams = (search: any) => { params = { state: store.getState(), url: new URLSearchParams(search != null ? search : window.location.search), diff --git a/assets/user-profile/actions.ts b/assets/user-profile/actions.ts index 7b380fe66..8858ffe26 100644 --- a/assets/user-profile/actions.ts +++ b/assets/user-profile/actions.ts @@ -155,7 +155,7 @@ export function deleteTopic(topic) { * @return {function} */ export function shareTopic(items) { - return (dispatch, getState) => { + return (dispatch: any, getState: any) => { const user = getState().user; const company = getState().company; return server.get(`/companies/${company}/users`) @@ -171,7 +171,7 @@ export function shareTopic(items) { * @param {Object} data */ export function submitShareTopic(data) { - return (dispatch) => { + return (dispatch: any) => { return server.post('/topic_share', data) .then(() => { notify.success(gettext('Topic was shared successfully.')); @@ -187,7 +187,7 @@ export function submitShareTopic(data) { * */ export function submitFollowTopic(topic) { - return (dispatch) => { + return (dispatch: any) => { const url = `/topics/${topic._id}`; return server.post(url, topic) .then(() => dispatch(fetchTopics())) diff --git a/assets/wire/actions.ts b/assets/wire/actions.ts index 3232b9c42..cc6a5ad5b 100644 --- a/assets/wire/actions.ts +++ b/assets/wire/actions.ts @@ -49,14 +49,14 @@ export function preview(item) { } export function previewAndCopy(item) { - return (dispatch) => { + return (dispatch: any) => { dispatch(previewItem(item)); dispatch(copyPreviewContents(item)); }; } export function previewItem(item) { - return (dispatch, getState) => { + return (dispatch: any, getState: any) => { markItemAsRead(item, getState()); dispatch(preview(item)); recordAction(item, 'preview', getState().context, getState()); @@ -69,7 +69,7 @@ export function openItemDetails(item) { } export function openItem(item) { - return (dispatch, getState) => { + return (dispatch: any, getState: any) => { const state = getState(); markItemAsRead(item, state); dispatch(openItemDetails(item)); @@ -162,7 +162,7 @@ export function onItemsDeleted(ids) { * This is an initial version, should be updated with preview markup changes. */ export function copyPreviewContents(item) { - return (dispatch, getState) => { + return (dispatch: any, getState: any) => { const state = getState(); if (!state.user) { @@ -179,7 +179,7 @@ export function copyPreviewContents(item) { } export function printItem(item) { - return (dispatch, getState) => { + return (dispatch: any, getState: any) => { const userContext = context(getState()); let uri = `/${userContext}/${item._id}?print`; if (userContext === 'monitoring') { @@ -248,7 +248,7 @@ export function search(state, next, aggs) { * Fetch items for current query */ export function fetchItems() { - return (dispatch, getState) => { + return (dispatch: any, getState: any) => { const start = Date.now(); dispatch(queryItems()); dispatch(loadingAggregations()); @@ -269,7 +269,7 @@ export function fetchItems() { export function fetchItem(id) { - return (dispatch, getState) => { + return (dispatch: any, getState: any) => { return server.get(`/${context(getState())}/${id}?format=json&context=wire`) .then((data) => dispatch(recieveItem(data))) .catch(errorHandler); @@ -282,7 +282,7 @@ export function fetchItem(id) { * @return {function} */ export function shareItems(items) { - return (dispatch, getState) => { + return (dispatch: any, getState: any) => { const user = getState().user; const company = getState().company; return server.get(`/companies/${company}/users`) @@ -343,7 +343,7 @@ export function removeBookmarkItems(items) { } export function bookmarkItems(items) { - return (dispatch, getState) => + return (dispatch: any, getState: any) => server.post(`/${getState().context}_bookmark`, {items}) .then(() => { if (items.length > 1) { @@ -360,7 +360,7 @@ export function bookmarkItems(items) { } export function removeBookmarks(items) { - return (dispatch, getState) => + return (dispatch: any, getState: any) => server.del(`/${getState().context}_bookmark`, {items}) .then(() => { if (items.length > 1) { @@ -420,7 +420,7 @@ export function downloadItems(items) { * @param {String} params */ export function submitDownloadItems(items, params) { - return (dispatch, getState) => { + return (dispatch: any, getState: any) => { const {format, secondaryFormat} = params; const userContext = context(getState()); let uri = `/download/${items.join(',')}?format=${format}&type=${userContext}`; @@ -454,7 +454,7 @@ export function removeNewItems(data) { * @param {Object} push */ export function pushNotification(push) { - return (dispatch, getState) => { + return (dispatch: any, getState: any) => { const user = getState().user; const company = getState().company; @@ -517,7 +517,7 @@ export function setNewItems(data: any) { } export function fetchNewItems() { - return (dispatch, getState) => search(getState()) + return (dispatch: any, getState: any) => search(getState()) .then((response) => dispatch(setNewItems(response))); } @@ -533,7 +533,7 @@ export function fetchNext(item: any) { export const TOGGLE_FILTER = 'TOGGLE_FILTER'; export function toggleFilter(key: any, val: any, single: any) { - return (dispatch) => { + return (dispatch: any) => { setTimeout(() => dispatch({type: TOGGLE_FILTER, key, val, single})); }; } @@ -550,7 +550,7 @@ export function recieveNextItems(data: any) { const MAX_ITEMS = 1000; // server limit export function fetchMoreItems() { - return (dispatch, getState) => { + return (dispatch: any, getState: any) => { const state = getState(); const limit = Math.min(MAX_ITEMS, state.totalItems); @@ -566,7 +566,7 @@ export function fetchMoreItems() { } export function loadMyWireTopic(topicId: any) { - return (dispatch) => { + return (dispatch: any) => { dispatch(loadMyTopic(topicId)); return dispatch(fetchItems()); }; @@ -578,7 +578,7 @@ export function loadMyWireTopic(topicId: any) { * @param {URLSearchParams} params */ export function initParams(params: any) { - return (dispatch, getState) => { + return (dispatch: any, getState: any) => { dispatch(initSearchParams(params)); if (params.get('item')) { dispatch(fetchItem(params.get('item'))) From f17a0fdf3e91fc360e9abbc7bdc58b39a240fa98 Mon Sep 17 00:00:00 2001 From: Tomas Kikutis Date: Mon, 12 Jun 2023 18:52:11 +0200 Subject: [PATCH 18/71] add any types for arguments of simple function declarations | v3 --- assets/agenda/actions.ts | 66 ++++++++++++++--------------- assets/companies/actions.ts | 6 +-- assets/home/actions.ts | 14 +++---- assets/notifications/actions.ts | 12 +++--- assets/user-profile/actions.ts | 28 ++++++------- assets/wire/actions.ts | 74 ++++++++++++++++----------------- 6 files changed, 100 insertions(+), 100 deletions(-) diff --git a/assets/agenda/actions.ts b/assets/agenda/actions.ts index b98cd538e..23d7de92d 100644 --- a/assets/agenda/actions.ts +++ b/assets/agenda/actions.ts @@ -39,33 +39,33 @@ const WATCH_URL = '/agenda_watch'; const WATCH_COVERAGE_URL = '/agenda_coverage_watch'; export const SET_STATE = 'SET_STATE'; -export function setState(state) { +export function setState(state: any) { return {type: SET_STATE, state}; } export const SET_ITEMS = 'SET_ITEMS'; -export function setItems(items) { +export function setItems(items: any) { return {type: SET_ITEMS, items}; } export const SET_ACTIVE = 'SET_ACTIVE'; -export function setActive(item) { +export function setActive(item: any) { return {type: SET_ACTIVE, item}; } export const PREVIEW_ITEM = 'PREVIEW_ITEM'; -export function preview(item, group, plan) { +export function preview(item: any, group: any, plan: any) { return {type: PREVIEW_ITEM, item, group, plan}; } -export function previewAndCopy(item) { +export function previewAndCopy(item: any) { return (dispatch: any) => { dispatch(copyPreviewContents(item)); }; } -export function previewItem(item, group, plan) { +export function previewItem(item: any, group: any, plan: any) { return (dispatch: any, getState: any) => { dispatch(fetchWireItemsForAgenda(item)); markItemAsRead(item, getState()); @@ -74,7 +74,7 @@ export function previewItem(item, group, plan) { }; } -export function fetchWireItemsForAgenda(item) { +export function fetchWireItemsForAgenda(item: any) { return (dispatch: any) => { let wireIds = []; (get(item, 'coverages') || []).forEach((c) => { @@ -95,16 +95,16 @@ export function fetchWireItemsForAgenda(item) { } export const AGENDA_WIRE_ITEMS = 'AGENDA_WIRE_ITEMS'; -export function agendaWireItems(items) { +export function agendaWireItems(items: any) { return {type: AGENDA_WIRE_ITEMS, items}; } export const OPEN_ITEM = 'OPEN_ITEM'; -export function openItemDetails(item, group, plan) { +export function openItemDetails(item: any, group: any, plan: any) { return {type: OPEN_ITEM, item, group, plan}; } -export function requestCoverage(item, message) { +export function requestCoverage(item: any, message: any) { return () => { const url = '/agenda/request_coverage'; const data = {item: item._id, message}; @@ -114,7 +114,7 @@ export function requestCoverage(item, message) { }; } -export function openItem(item, group, plan) { +export function openItem(item: any, group: any, plan: any) { return (dispatch: any, getState: any) => { const state = getState(); markItemAsRead(item, state); @@ -138,27 +138,27 @@ export function queryItems() { } export const RECIEVE_ITEMS = 'RECIEVE_ITEMS'; -export function recieveItems(data) { +export function recieveItems(data: any) { return {type: RECIEVE_ITEMS, data}; } export const RECIEVE_ITEM = 'RECIEVE_ITEM'; -export function recieveItem(data) { +export function recieveItem(data: any) { return {type: RECIEVE_ITEM, data}; } export const INIT_DATA = 'INIT_DATA'; -export function initData(agendaData, readData, activeDate, featuredOnly) { +export function initData(agendaData: any, readData: any, activeDate: any, featuredOnly: any) { return {type: INIT_DATA, agendaData, readData, activeDate, featuredOnly}; } export const SELECT_DATE = 'SELECT_DATE'; -export function selectDate(dateString, grouping) { +export function selectDate(dateString: any, grouping: any) { return {type: SELECT_DATE, dateString, grouping}; } -export function printItem(item) { +export function printItem(item: any) { return (dispatch: any, getState: any) => { const map = encodeURIComponent(getMapSource(getLocations(item), 2)); window.open(`/agenda/${item._id}?print&map=${map}`, '_blank'); @@ -176,7 +176,7 @@ export function printItem(item) { * * This is an initial version, should be updated with preview markup changes. */ -export function copyPreviewContents(item) { +export function copyPreviewContents(item: any) { return (dispatch: any, getState: any) => { const state = getState(); @@ -200,7 +200,7 @@ export function copyPreviewContents(item) { * @param {bool} next * @return {Promise} */ -function search(state, next) { +function search(state: any, next: any) { const currentMoment = moment(); const searchParams = searchParamsSelector(state); const createdFilter = get(searchParams, 'created') || {}; @@ -271,7 +271,7 @@ export function fetchItems() { }; } -export function fetchItem(id) { +export function fetchItem(id: any) { return (dispatch: any) => { return server.get(`/agenda/${id}?format=json`) .then((data) => dispatch(recieveItem(data))) @@ -280,7 +280,7 @@ export function fetchItem(id) { } export const WATCH_EVENTS = 'WATCH_EVENTS'; -export function watchEvents(ids) { +export function watchEvents(ids: any) { return (dispatch: any, getState: any) => { server.post(WATCH_URL, {items: ids}) .then(() => { @@ -292,7 +292,7 @@ export function watchEvents(ids) { } export const STOP_WATCHING_EVENTS = 'STOP_WATCHING_EVENTS'; -export function stopWatchingEvents(items) { +export function stopWatchingEvents(items: any) { return (dispatch: any, getState: any) => { server.del(getState().bookmarks ? `${WATCH_URL}?bookmarks=true` : WATCH_URL, {items}) .then(() => { @@ -315,7 +315,7 @@ export function stopWatchingEvents(items) { * * @return {function} */ -export function shareItems(items) { +export function shareItems(items: any) { return (dispatch: any, getState: any) => { const user = getState().user; const company = getState().company; @@ -327,16 +327,16 @@ export function shareItems(items) { } export const BOOKMARK_ITEMS = 'BOOKMARK_ITEMS'; -export function setBookmarkItems(items) { +export function setBookmarkItems(items: any) { return {type: BOOKMARK_ITEMS, items}; } export const REMOVE_BOOKMARK = 'REMOVE_BOOKMARK'; -export function removeBookmarkItems(items) { +export function removeBookmarkItems(items: any) { return {type: REMOVE_BOOKMARK, items}; } -export function bookmarkItems(items) { +export function bookmarkItems(items: any) { return (dispatch: any, getState: any) => server.post('/agenda_bookmark', {items}) .then(() => { @@ -353,7 +353,7 @@ export function bookmarkItems(items) { .catch(errorHandler); } -export function removeBookmarks(items) { +export function removeBookmarks(items: any) { return (dispatch: any, getState: any) => server.del('/agenda_bookmark', {items}) .then(() => { @@ -369,27 +369,27 @@ export function removeBookmarks(items) { } export const TOGGLE_SELECTED = 'TOGGLE_SELECTED'; -export function toggleSelected(item) { +export function toggleSelected(item: any) { return {type: TOGGLE_SELECTED, item}; } export const SHARE_ITEMS = 'SHARE_ITEMS'; -export function setShareItems(items) { +export function setShareItems(items: any) { return {type: SHARE_ITEMS, items}; } export const DOWNLOAD_ITEMS = 'DOWNLOAD_ITEMS'; -export function setDownloadItems(items) { +export function setDownloadItems(items: any) { return {type: DOWNLOAD_ITEMS, items}; } export const COPY_ITEMS = 'COPY_ITEMS'; -export function setCopyItem(item) { +export function setCopyItem(item: any) { return {type: COPY_ITEMS, items: [item]}; } export const PRINT_ITEMS = 'PRINT_ITEMS'; -export function setPrintItem(item) { +export function setPrintItem(item: any) { return {type: PRINT_ITEMS, items: [item]}; } @@ -399,12 +399,12 @@ export function setPrintItem(item) { * * @param {Array} items */ -export function downloadItems(items) { +export function downloadItems(items: any) { return renderModal('downloadItems', {items}); } export const REMOVE_NEW_ITEMS = 'REMOVE_NEW_ITEMS'; -export function removeNewItems(data) { +export function removeNewItems(data: any) { return {type: REMOVE_NEW_ITEMS, data}; } diff --git a/assets/companies/actions.ts b/assets/companies/actions.ts index 2a1eb7244..0615000b3 100644 --- a/assets/companies/actions.ts +++ b/assets/companies/actions.ts @@ -21,12 +21,12 @@ export function editCompany(event: any) { } export const TOGGLE_COMPANY_SECTION = 'TOGGLE_COMPANY_SECTION'; -export function toggleCompanySection(sectionId) { +export function toggleCompanySection(sectionId: any) { return {type: TOGGLE_COMPANY_SECTION, sectionId: sectionId}; } export const TOGGLE_COMPANY_PRODUCT = 'TOGGLE_COMPANY_PRODUCT'; -export function toggleCompanyProduct(productId, sectionId, enable) { +export function toggleCompanyProduct(productId: any, sectionId: any, enable: any) { return {type: TOGGLE_COMPANY_PRODUCT, payload: { productId: productId, sectionId: sectionId, @@ -35,7 +35,7 @@ export function toggleCompanyProduct(productId, sectionId, enable) { } export const UPDATE_COMPANY_SEATS = 'UPDATE_COMPANY_SEATS'; -export function updateCompanySeats(productId, seats) { +export function updateCompanySeats(productId: any, seats: any) { return {type: UPDATE_COMPANY_SEATS, payload: { productId: productId, seats: seats, diff --git a/assets/home/actions.ts b/assets/home/actions.ts index 1aa3681e2..11e826c59 100644 --- a/assets/home/actions.ts +++ b/assets/home/actions.ts @@ -4,16 +4,16 @@ import {pushNotification as wirePushNotification} from 'wire/actions'; import {get} from 'lodash'; export const INIT_DATA = 'INIT_DATA'; -export function initData(data) { +export function initData(data: any) { return {type: INIT_DATA, data}; } -function openItem(item) { +function openItem(item: any) { return {type: OPEN_ITEM, item}; } export const OPEN_ITEM = 'OPEN_ITEM'; -export function openItemDetails(item) { +export function openItemDetails(item: any) { return (dispatch: any, getState: any) => { dispatch(openItem(item, get(getState(), 'context'))); recordAction(item, 'open'); @@ -21,17 +21,17 @@ export function openItemDetails(item) { } export const SET_ACTIVE = 'SET_ACTIVE'; -export function setActive(cardId) { +export function setActive(cardId: any) { return {type: SET_ACTIVE, cardId}; } export const SET_CARD_ITEMS = 'SET_CARD_ITEMS'; -export function setCardItems(cardLabel, items) { +export function setCardItems(cardLabel: any, items: any) { return {type: SET_CARD_ITEMS, payload: {card: cardLabel, items: items}}; } export const SET_MULTIPLE_CARD_ITEMS = 'SET_MULTIPLE_CARD_ITEMS'; -export function getMultipleCardItems(itemsByCard) { +export function getMultipleCardItems(itemsByCard: any) { return {type: SET_MULTIPLE_CARD_ITEMS, payload: itemsByCard}; } @@ -43,7 +43,7 @@ export function fetchCompanyCardItems() { }; } -export function fetchCardExternalItems(cardId, cardLabel) { +export function fetchCardExternalItems(cardId: any, cardLabel: any) { return (dispatch: any) => { return server.get(`/media_card_external/${cardId}`) .then((data) => dispatch( diff --git a/assets/notifications/actions.ts b/assets/notifications/actions.ts index 2bb0d731b..416fa2a61 100644 --- a/assets/notifications/actions.ts +++ b/assets/notifications/actions.ts @@ -3,12 +3,12 @@ import {gettext, notify, errorHandler} from 'utils'; import server from 'server'; export const UPDATE_NOTIFICATION_COUNT = 'UPDATE_NOTIFICATION_COUNT'; -export function updateNotificationCount(count) { +export function updateNotificationCount(count: any) { return {type: UPDATE_NOTIFICATION_COUNT, count}; } export const INIT_DATA = 'INIT_DATA'; -export function initData(data) { +export function initData(data: any) { return {type: INIT_DATA, data}; } @@ -20,12 +20,12 @@ export function clearAllNotifications() { export const CLEAR_NOTIFICATION = 'CLEAR_NOTIFICATION'; -export function clearNotification(id) { +export function clearNotification(id: any) { return {type: CLEAR_NOTIFICATION, id}; } export const SET_NOTIFICATIONS = 'SET_NOTIFICATIONS'; -export function setNotifications(items, notifications) { +export function setNotifications(items: any, notifications: any) { return { type: SET_NOTIFICATIONS, items: items, @@ -34,7 +34,7 @@ export function setNotifications(items, notifications) { } export const SET_NOTIFICATIONS_LOADING = 'SET_NOTIFICATIONS_LOADING'; -export function setNotificationsLoading(loading) { +export function setNotificationsLoading(loading: any) { return {type: SET_NOTIFICATIONS_LOADING, loading}; } @@ -59,7 +59,7 @@ export function loadNotifications() { * Deletes the given notification of the user * */ -export function deleteNotification(id) { +export function deleteNotification(id: any) { return function (dispatch, getState) { const user = getState().user; const url = `/users/${user}/notifications/${user}_${id}`; diff --git a/assets/user-profile/actions.ts b/assets/user-profile/actions.ts index 8858ffe26..ee3e911ed 100644 --- a/assets/user-profile/actions.ts +++ b/assets/user-profile/actions.ts @@ -7,32 +7,32 @@ import {reloadMyTopics as reloadMyAgendaTopics} from '../agenda/actions'; import {reloadMyTopics as reloadMyWireTopics} from '../wire/actions'; export const GET_TOPICS = 'GET_TOPICS'; -export function getTopics(topics) { +export function getTopics(topics: any) { return {type: GET_TOPICS, topics}; } export const GET_USER = 'GET_USER'; -export function getUser(user) { +export function getUser(user: any) { return {type: GET_USER, user}; } export const EDIT_USER = 'EDIT_USER'; -export function editUser(event) { +export function editUser(event: any) { return {type: EDIT_USER, event}; } export const INIT_DATA = 'INIT_DATA'; -export function initData(data) { +export function initData(data: any) { return {type: INIT_DATA, data}; } export const SET_ERROR = 'SET_ERROR'; -export function setError(errors) { +export function setError(errors: any) { return {type: SET_ERROR, errors}; } export const SELECT_MENU = 'SELECT_MENU'; -export function selectMenu(data) { +export function selectMenu(data: any) { return function(dispatch) { dispatch({type: SELECT_MENU, data}); dispatch(reloadMyTopics()); @@ -40,16 +40,16 @@ export function selectMenu(data) { } export const SET_TOPIC_EDITOR_FULLSCREEN = 'SET_TOPIC_EDITOR_FULLSCREEN'; -export function setTopicEditorFullscreen(fullscreen) { +export function setTopicEditorFullscreen(fullscreen: any) { return {type: SET_TOPIC_EDITOR_FULLSCREEN, payload: fullscreen}; } export const SELECT_MENU_ITEM = 'SELECT_MENU_ITEM'; -export function selectMenuItem(item) { +export function selectMenuItem(item: any) { return {type: SELECT_MENU_ITEM, item}; } -export function createOrUpdateTopic(menu, item, fullscreen) { +export function createOrUpdateTopic(menu: any, item: any, fullscreen: any) { userProfileStore.dispatch(selectMenuItem(item)); userProfileStore.dispatch(selectMenu(menu)); userProfileStore.dispatch(setTopicEditorFullscreen(fullscreen)); @@ -78,7 +78,7 @@ export function hideModal() { /** * Fetches user details */ -export function fetchUser(id) { +export function fetchUser(id: any) { return function (dispatch) { return server.get(`/users/${id}`) .then((data) => { @@ -137,7 +137,7 @@ export function fetchTopics() { * Deletes the given followed topic * */ -export function deleteTopic(topic) { +export function deleteTopic(topic: any) { return function (dispatch) { const url = `/topics/${topic._id}`; return server.del(url) @@ -154,7 +154,7 @@ export function deleteTopic(topic) { * * @return {function} */ -export function shareTopic(items) { +export function shareTopic(items: any) { return (dispatch: any, getState: any) => { const user = getState().user; const company = getState().company; @@ -170,7 +170,7 @@ export function shareTopic(items) { * * @param {Object} data */ -export function submitShareTopic(data) { +export function submitShareTopic(data: any) { return (dispatch: any) => { return server.post('/topic_share', data) .then(() => { @@ -186,7 +186,7 @@ export function submitShareTopic(data) { * Updates a followed topic * */ -export function submitFollowTopic(topic) { +export function submitFollowTopic(topic: any) { return (dispatch: any) => { const url = `/topics/${topic._id}`; return server.post(url, topic) diff --git a/assets/wire/actions.ts b/assets/wire/actions.ts index cc6a5ad5b..6ec31380a 100644 --- a/assets/wire/actions.ts +++ b/assets/wire/actions.ts @@ -29,33 +29,33 @@ import { } from 'search/actions'; export const SET_STATE = 'SET_STATE'; -export function setState(state) { +export function setState(state: any) { return {type: SET_STATE, state}; } export const SET_ITEMS = 'SET_ITEMS'; -export function setItems(items) { +export function setItems(items: any) { return {type: SET_ITEMS, items}; } export const SET_ACTIVE = 'SET_ACTIVE'; -export function setActive(item) { +export function setActive(item: any) { return {type: SET_ACTIVE, item}; } export const PREVIEW_ITEM = 'PREVIEW_ITEM'; -export function preview(item) { +export function preview(item: any) { return {type: PREVIEW_ITEM, item}; } -export function previewAndCopy(item) { +export function previewAndCopy(item: any) { return (dispatch: any) => { dispatch(previewItem(item)); dispatch(copyPreviewContents(item)); }; } -export function previewItem(item) { +export function previewItem(item: any) { return (dispatch: any, getState: any) => { markItemAsRead(item, getState()); dispatch(preview(item)); @@ -64,11 +64,11 @@ export function previewItem(item) { } export const OPEN_ITEM = 'OPEN_ITEM'; -export function openItemDetails(item) { +export function openItemDetails(item: any) { return {type: OPEN_ITEM, item}; } -export function openItem(item) { +export function openItem(item: any) { return (dispatch: any, getState: any) => { const state = getState(); markItemAsRead(item, state); @@ -83,7 +83,7 @@ export function openItem(item) { }; } -export function selectCopy(item) { +export function selectCopy(item: any) { return () => { recordAction(item, 'clipboard'); }; @@ -100,22 +100,22 @@ function loadingAggregations() { } export const RECIEVE_ITEMS = 'RECIEVE_ITEMS'; -export function recieveItems(data) { +export function recieveItems(data: any) { return {type: RECIEVE_ITEMS, data}; } export const RECIEVE_AGGS = 'RECIEVE_AGGS'; -function recieveAggs(data) { +function recieveAggs(data: any) { return {type: RECIEVE_AGGS, data}; } export const RECIEVE_ITEM = 'RECIEVE_ITEM'; -export function recieveItem(data) { +export function recieveItem(data: any) { return {type: RECIEVE_ITEM, data}; } export const INIT_DATA = 'INIT_DATA'; -export function initData(wireData, newsOnlyFilterText,readData, newsOnly, searchAllVersions) { +export function initData(wireData: any, newsOnlyFilterText: any, readData: any, newsOnly: any, searchAllVersions: any) { return {type: INIT_DATA, wireData, newsOnlyFilterText, readData, newsOnly, searchAllVersions}; } @@ -131,7 +131,7 @@ export function toggleSearchAllVersions() { return {type: TOGGLE_SEARCH_ALL_VERSIONS}; } -export function removeItems(items) { +export function removeItems(items: any) { if (confirm(gettext('Are you sure you want to permanently remove these item(s)?'))) { return server.del('/wire', {items}) .then(() => { @@ -152,7 +152,7 @@ export const WIRE_ITEM_REMOVED = 'WIRE_ITEM_REMOVED'; * Marks the items as deleted when they're removed from the system * @param {Array} ids - List of ids of items that were removed */ -export function onItemsDeleted(ids) { +export function onItemsDeleted(ids: any) { return {type: WIRE_ITEM_REMOVED, ids: ids}; } @@ -161,7 +161,7 @@ export function onItemsDeleted(ids) { * * This is an initial version, should be updated with preview markup changes. */ -export function copyPreviewContents(item) { +export function copyPreviewContents(item: any) { return (dispatch: any, getState: any) => { const state = getState(); @@ -178,7 +178,7 @@ export function copyPreviewContents(item) { }; } -export function printItem(item) { +export function printItem(item: any) { return (dispatch: any, getState: any) => { const userContext = context(getState()); let uri = `/${userContext}/${item._id}?print`; @@ -202,7 +202,7 @@ export function printItem(item) { * @param {bool} aggs * @return {Promise} */ -export function search(state, next, aggs) { +export function search(state: any, next: any, aggs: any) { const searchParams = searchParamsSelector(state); const createdFilter = get(searchParams, 'created') || {}; let created_to = createdFilter.to; @@ -268,7 +268,7 @@ export function fetchItems() { } -export function fetchItem(id) { +export function fetchItem(id: any) { return (dispatch: any, getState: any) => { return server.get(`/${context(getState())}/${id}?format=json&context=wire`) .then((data) => dispatch(recieveItem(data))) @@ -281,7 +281,7 @@ export function fetchItem(id) { * * @return {function} */ -export function shareItems(items) { +export function shareItems(items: any) { return (dispatch: any, getState: any) => { const user = getState().user; const company = getState().company; @@ -293,7 +293,7 @@ export function shareItems(items) { } export const TOGGLE_SELECTED = 'TOGGLE_SELECTED'; -export function toggleSelected(item) { +export function toggleSelected(item: any) { return {type: TOGGLE_SELECTED, item}; } @@ -308,41 +308,41 @@ export function selectNone() { } export const SHARE_ITEMS = 'SHARE_ITEMS'; -export function setShareItems(items) { +export function setShareItems(items: any) { return {type: SHARE_ITEMS, items}; } export const DOWNLOAD_ITEMS = 'DOWNLOAD_ITEMS'; -export function setDownloadItems(items) { +export function setDownloadItems(items: any) { return {type: DOWNLOAD_ITEMS, items}; } export const EXPORT_ITEMS = 'EXPORT_ITEMS'; -export function setExportItems(items) { +export function setExportItems(items: any) { return {type: EXPORT_ITEMS, items}; } export const COPY_ITEMS = 'COPY_ITEMS'; -export function setCopyItem(item) { +export function setCopyItem(item: any) { return {type: COPY_ITEMS, items: [item]}; } export const PRINT_ITEMS = 'PRINT_ITEMS'; -export function setPrintItem(item) { +export function setPrintItem(item: any) { return {type: PRINT_ITEMS, items: [item]}; } export const BOOKMARK_ITEMS = 'BOOKMARK_ITEMS'; -export function setBookmarkItems(items) { +export function setBookmarkItems(items: any) { return {type: BOOKMARK_ITEMS, items}; } export const REMOVE_BOOKMARK = 'REMOVE_BOOKMARK'; -export function removeBookmarkItems(items) { +export function removeBookmarkItems(items: any) { return {type: REMOVE_BOOKMARK, items}; } -export function bookmarkItems(items) { +export function bookmarkItems(items: any) { return (dispatch: any, getState: any) => server.post(`/${getState().context}_bookmark`, {items}) .then(() => { @@ -359,7 +359,7 @@ export function bookmarkItems(items) { .catch(errorHandler); } -export function removeBookmarks(items) { +export function removeBookmarks(items: any) { return (dispatch: any, getState: any) => server.del(`/${getState().context}_bookmark`, {items}) .then(() => { @@ -374,7 +374,7 @@ export function removeBookmarks(items) { .catch(errorHandler); } -function errorHandler(reason) { +function errorHandler(reason: any) { console.error('error', reason); } @@ -384,7 +384,7 @@ function errorHandler(reason) { * @param {Object} item * @return {Promise} */ -export function fetchVersions(item) { +export function fetchVersions(item: any) { return () => server.get(`/wire/${item._id}/versions`) .then((data) => { return data._items; @@ -397,7 +397,7 @@ export function fetchVersions(item) { * @param {string} id * @param {string} filename */ -export function downloadMedia(id, filename) { +export function downloadMedia(id: any, filename: any) { return () => { window.open(`/assets/${id}?filename=${filename}`, '_blank'); analytics.event('download-media', filename || id); @@ -409,7 +409,7 @@ export function downloadMedia(id, filename) { * * @param {Array} items */ -export function downloadItems(items) { +export function downloadItems(items: any) { return renderModal('downloadItems', {items}); } @@ -419,7 +419,7 @@ export function downloadItems(items) { * @param {Array} items * @param {String} params */ -export function submitDownloadItems(items, params) { +export function submitDownloadItems(items: any, params: any) { return (dispatch: any, getState: any) => { const {format, secondaryFormat} = params; const userContext = context(getState()); @@ -436,7 +436,7 @@ export function submitDownloadItems(items, params) { }; } -function browserDownload(url) { +function browserDownload(url: any) { const link = document.createElement('a'); link.download = ''; link.href = url; @@ -444,7 +444,7 @@ function browserDownload(url) { } export const REMOVE_NEW_ITEMS = 'REMOVE_NEW_ITEMS'; -export function removeNewItems(data) { +export function removeNewItems(data: any) { return {type: REMOVE_NEW_ITEMS, data}; } From 1280409b855c5d0c67b5f843f502b0e4dc345003 Mon Sep 17 00:00:00 2001 From: Tomas Kikutis Date: Mon, 12 Jun 2023 19:09:32 +0200 Subject: [PATCH 19/71] any types for spread props --- assets/agenda/components/AgendaAttachments.tsx | 2 +- assets/agenda/components/AgendaCoverageExistsFilter.tsx | 2 +- assets/agenda/components/AgendaCoverages.tsx | 2 +- assets/agenda/components/AgendaDateButtons.tsx | 2 +- assets/agenda/components/AgendaDateNavigation.tsx | 2 +- assets/agenda/components/AgendaDetailCoverages.tsx | 2 +- assets/agenda/components/AgendaDropdown.tsx | 2 +- assets/agenda/components/AgendaDropdownFilter.tsx | 2 +- assets/agenda/components/AgendaEdNote.tsx | 2 +- assets/agenda/components/AgendaFeaturedStoriesToogle.tsx | 2 +- assets/agenda/components/AgendaFilterButton.tsx | 2 +- assets/agenda/components/AgendaInternalNote.tsx | 2 +- assets/agenda/components/AgendaItemTypeFilter.tsx | 2 +- assets/agenda/components/AgendaListItemLabels.tsx | 2 +- assets/agenda/components/AgendaListViewControls.tsx | 2 +- assets/agenda/components/AgendaLocation.tsx | 2 +- assets/agenda/components/AgendaLongDescription.tsx | 2 +- assets/agenda/components/AgendaMap.tsx | 4 ++-- assets/agenda/components/AgendaMeta.tsx | 2 +- assets/agenda/components/AgendaMetaTime.tsx | 2 +- assets/agenda/components/AgendaName.tsx | 2 +- assets/agenda/components/AgendaPreviewAttachments.tsx | 2 +- assets/agenda/components/AgendaPreviewImage.tsx | 2 +- .../components/AgendaRegistrationInvitationDetails.tsx | 2 +- assets/agenda/components/AgendaTags.tsx | 2 +- assets/agenda/components/AgendaTime.tsx | 2 +- assets/cards/components/CardList.tsx | 2 +- assets/cards/components/CardListItem.tsx | 2 +- assets/companies/components/CompaniesApp.tsx | 2 +- assets/companies/components/CompanyList.tsx | 2 +- assets/companies/components/CompanyListItem.tsx | 2 +- assets/companies/components/CompanyPermissions.tsx | 2 +- assets/companies/components/EditCompanyDetails.tsx | 2 +- assets/company-admin/components/CompanyDetails.tsx | 6 +++--- .../company-admin/components/CompanyDetailsProductRow.tsx | 2 +- assets/company-admin/components/CompanyUserListItem.tsx | 2 +- assets/company-admin/components/CompanyUsers.tsx | 2 +- assets/company-reports/components/Company.tsx | 2 +- assets/company-reports/components/CompanyProducts.tsx | 2 +- assets/company-reports/components/CompanySavedSearches.tsx | 2 +- assets/company-reports/components/ExpiredCompanies.tsx | 2 +- assets/company-reports/components/ProductStories.tsx | 2 +- assets/company-reports/components/ReportsTable.tsx | 2 +- assets/company-reports/components/UserSavedSearches.tsx | 2 +- assets/components/ActionList.tsx | 2 +- assets/components/CheckboxInput.tsx | 2 +- assets/components/CloseButton.tsx | 2 +- assets/components/DateInput.tsx | 2 +- assets/components/Dropdown.tsx | 2 +- assets/components/DropdownFilter.tsx | 2 +- assets/components/DropdownFilterButton.tsx | 2 +- assets/components/FileInput.tsx | 2 +- assets/components/InputWrapper.tsx | 2 +- assets/components/Modal.tsx | 4 ++-- assets/components/MultiSelectDropdown.tsx | 2 +- assets/components/NotificationListItem.tsx | 2 +- assets/components/PreviewActionButtons.tsx | 2 +- assets/components/SortItems.tsx | 2 +- assets/components/Tag.tsx | 2 +- assets/components/TagList.tsx | 2 +- assets/components/TextAreaInput.tsx | 2 +- assets/components/TextInput.tsx | 2 +- assets/components/cards/edit/ConfigEvent.tsx | 2 +- assets/components/cards/edit/ConfigExternalMedia.tsx | 2 +- assets/components/cards/render/CardBody.tsx | 2 +- assets/components/cards/render/CardFooter.tsx | 2 +- assets/components/cards/render/CardMeta.tsx | 2 +- assets/components/cards/render/EventsTwoByTwoCard.tsx | 2 +- assets/components/cards/render/LargePictureTextCard.tsx | 2 +- assets/components/cards/render/LargeTextOnlyCard.tsx | 2 +- assets/components/cards/render/MediaGalleryCard.tsx | 2 +- assets/components/cards/render/MoreNewsButton.tsx | 2 +- assets/components/cards/render/NavigationSixPerRow.tsx | 2 +- assets/components/cards/render/PhotoGalleryCard.tsx | 2 +- assets/components/cards/render/PictureTextCard.tsx | 2 +- assets/components/cards/render/TextOnlyCard.tsx | 2 +- assets/components/cards/render/TopNewsOneByOneCard.tsx | 2 +- assets/components/cards/render/TopNewsTwoByTwoCard.tsx | 2 +- assets/features/dashboard/DashboardSwitch.tsx | 2 +- assets/features/sections/SectionSwitch.tsx | 2 +- assets/monitoring/components/MonitoringItem.tsx | 2 +- assets/monitoring/components/MonitoringList.tsx | 2 +- assets/navigations/components/NavigationList.tsx | 2 +- assets/navigations/components/NavigationListItem.tsx | 2 +- assets/notifications/components/BasicNotificationItem.tsx | 2 +- assets/oauth_clients/components/ClientList.tsx | 2 +- assets/oauth_clients/components/ClientListItem.tsx | 2 +- assets/products/components/ProductList.tsx | 2 +- assets/products/components/ProductListItem.tsx | 2 +- assets/search/components/AdvancedSearchPanel.tsx | 2 +- assets/search/components/TopicItem.tsx | 2 +- assets/search/components/TopicsTab.tsx | 2 +- assets/section-filters/components/SectionFilterList.tsx | 2 +- assets/section-filters/components/SectionFilterListItem.tsx | 2 +- assets/ui/components/Article.tsx | 2 +- assets/ui/components/ArticleAuthor.tsx | 2 +- assets/ui/components/ArticleEmbargoed.tsx | 2 +- assets/ui/components/ArticleHeadline.tsx | 2 +- assets/ui/components/ArticleMedia.tsx | 2 +- assets/ui/components/ArticlePicture.tsx | 2 +- assets/ui/components/ArticleSlugline.tsx | 4 ++-- assets/ui/components/MetaTime.tsx | 2 +- assets/user-profile/components/UserProfileAvatar.tsx | 2 +- assets/user-profile/components/UserProfileMenu.tsx | 2 +- assets/users/components/EditUser.tsx | 2 +- assets/users/components/EditUserProductPermission.tsx | 2 +- assets/users/components/UserListItem.tsx | 2 +- assets/users/components/UsersList.tsx | 2 +- assets/wire/components/FollowStory.tsx | 4 ++-- assets/wire/components/InfoBoxContent.tsx | 2 +- assets/wire/components/ItemDetails.tsx | 2 +- assets/wire/components/ItemVersion.tsx | 2 +- assets/wire/components/ListViewControls.tsx | 2 +- assets/wire/components/NewsOnlyControl.tsx | 2 +- assets/wire/components/PreviewEdnote.tsx | 2 +- assets/wire/components/PreviewMeta.tsx | 4 ++-- assets/wire/components/PreviewTags.tsx | 2 +- assets/wire/components/PreviewTagsLinkList.tsx | 2 +- assets/wire/components/PreviewTagsSubjects.tsx | 2 +- assets/wire/components/SearchAllVersionsControl.tsx | 2 +- assets/wire/components/WireListItemDeleted.tsx | 2 +- assets/wire/components/WireListItemIcons.tsx | 2 +- assets/wire/components/fields/Authors.tsx | 2 +- assets/wire/components/fields/CharCount.tsx | 2 +- assets/wire/components/fields/PreviousVersions.tsx | 2 +- assets/wire/components/fields/Source.tsx | 2 +- assets/wire/components/fields/UrgencyLabel.tsx | 4 ++-- assets/wire/components/fields/VersionCreated.tsx | 2 +- assets/wire/components/fields/VersionType.tsx | 2 +- assets/wire/components/fields/WordCount.tsx | 2 +- assets/wire/components/fields/index.tsx | 2 +- assets/wire/components/filters/FilterButton.tsx | 2 +- assets/wire/components/filters/FilterGroup.tsx | 2 +- assets/wire/components/filters/FilterItem.tsx | 2 +- assets/wire/components/filters/NavCreatedPicker.tsx | 2 +- assets/wire/components/filters/NavGroup.tsx | 2 +- assets/wire/components/filters/NavLink.tsx | 2 +- assets/wire/components/filters/NavigationTab.tsx | 2 +- 138 files changed, 146 insertions(+), 146 deletions(-) diff --git a/assets/agenda/components/AgendaAttachments.tsx b/assets/agenda/components/AgendaAttachments.tsx index 48d4888f1..7e17f694f 100644 --- a/assets/agenda/components/AgendaAttachments.tsx +++ b/assets/agenda/components/AgendaAttachments.tsx @@ -18,7 +18,7 @@ function filesize (size) { } } -export default function AgendaAttachments({item}) { +export default function AgendaAttachments({item}: any) { if (!hasAttachments(item)) { return null; } diff --git a/assets/agenda/components/AgendaCoverageExistsFilter.tsx b/assets/agenda/components/AgendaCoverageExistsFilter.tsx index 458abdceb..4179d965b 100644 --- a/assets/agenda/components/AgendaCoverageExistsFilter.tsx +++ b/assets/agenda/components/AgendaCoverageExistsFilter.tsx @@ -30,7 +30,7 @@ function getActiveFilterLabel(filter: any, activeFilter: any) { return filter.label; } -function AgendaCoverageExistsFilter ({toggleFilter, activeFilter}) { +function AgendaCoverageExistsFilter ({toggleFilter, activeFilter}: any) { return ( {formatNavigationDate(activeDate, activeGrouping)}, ); -function AgendaDropdownFilter({aggregations, filter, toggleFilter, activeFilter, getDropdownItems}) { +function AgendaDropdownFilter({aggregations, filter, toggleFilter, activeFilter, getDropdownItems}: any) { return (
diff --git a/assets/agenda/components/AgendaFilterButton.tsx b/assets/agenda/components/AgendaFilterButton.tsx index 8cc6e6a04..5b1980dbe 100644 --- a/assets/agenda/components/AgendaFilterButton.tsx +++ b/assets/agenda/components/AgendaFilterButton.tsx @@ -7,7 +7,7 @@ const getActiveFilterLabel = (filter: any, activeFilter: any, isActive: any) => return isActive ? gettext(activeFilter[filter.field][0]) : gettext(filter.label); }; -function AgendaFilterButton({filter, activeFilter, autoToggle, onClick, getFilterLabel}) { +function AgendaFilterButton({filter, activeFilter, autoToggle, onClick, getFilterLabel}: any) { const filterLabel = getFilterLabel ? getFilterLabel : getActiveFilterLabel; const isActive = activeFilter[filter.field]; return ()); } - getFilterLabel(filter, activeFilter) { + getFilterLabel(filter: any, activeFilter: any) { if (activeFilter[filter.field]) { return activeFilter[filter.field]; } else { diff --git a/assets/company-reports/components/SubscriberActivity.tsx b/assets/company-reports/components/SubscriberActivity.tsx index 1d4e1f296..f4931c34d 100644 --- a/assets/company-reports/components/SubscriberActivity.tsx +++ b/assets/company-reports/components/SubscriberActivity.tsx @@ -10,7 +10,7 @@ import CalendarButton from '../../components/CalendarButton'; import {toggleFilterAndQuery, fetchReport, REPORTS, runReport} from '../actions'; class SubscriberActivity extends React.Component { - constructor(props, context) { + constructor(props: any, context: any) { super(props, context); this.companies = [...this.props.companies.map((c) => ({...c, 'label': c.name}))]; @@ -40,14 +40,14 @@ class SubscriberActivity extends React.Component { this.props.runReport(); } - componentWillReceiveProps(nextProps) { + componentWillReceiveProps(nextProps: any) { if (this.props.reportParams !== nextProps.reportParams) { // Filtering done this.previousScrollTop = 0; } } - getDropdownItems(filter) { + getDropdownItems(filter: any) { const {toggleFilterAndQuery, sections, apiEnabled} = this.props; let getName = (text: any) => (text); let itemsArray = []; @@ -102,7 +102,7 @@ class SubscriberActivity extends React.Component { >{getName(item.name)})); } - getFilterLabel(filter, activeFilter) { + getFilterLabel(filter: any, activeFilter: any) { if (activeFilter[filter.field]) { if (activeFilter.action === 'api' && filter.field === 'action') return 'api retrieval'; @@ -112,7 +112,7 @@ class SubscriberActivity extends React.Component { } } - onScroll(event) { + onScroll(event: any) { if (this.props.isLoading) { return; } @@ -127,12 +127,12 @@ class SubscriberActivity extends React.Component { } } - onFromDateChange(value) { + onFromDateChange(value: any) { this.props.toggleFilterAndQuery('date_from', value); } - onEndDateChange(value) { + onEndDateChange(value: any) { this.props.toggleFilterAndQuery('date_to', value); } diff --git a/assets/components/ActionButton.tsx b/assets/components/ActionButton.tsx index c35247272..bd52a7ab6 100644 --- a/assets/components/ActionButton.tsx +++ b/assets/components/ActionButton.tsx @@ -6,7 +6,7 @@ import {isTouchDevice} from 'utils'; class ActionButton extends React.Component { - constructor(props) { + constructor(props: any) { super(props); this.tooltip = null; diff --git a/assets/components/ActionMenu.tsx b/assets/components/ActionMenu.tsx index 7c1793671..3f882fc02 100644 --- a/assets/components/ActionMenu.tsx +++ b/assets/components/ActionMenu.tsx @@ -6,12 +6,12 @@ import {Popover, PopoverBody} from 'reactstrap'; import {gettext} from 'utils'; class ActionMenu extends React.Component { - constructor(props) { + constructor(props: any) { super(props); this.onMouseLeave = this.onMouseLeave.bind(this); } - onMouseLeave(event) { + onMouseLeave(event: any) { if (this.props.showActions) { this.props.onActionList(event, this.props.item, this.props.group); } diff --git a/assets/components/AuditInformation.tsx b/assets/components/AuditInformation.tsx index 556a9f150..69cb073ed 100644 --- a/assets/components/AuditInformation.tsx +++ b/assets/components/AuditInformation.tsx @@ -14,7 +14,7 @@ class AuditInformation extends React.Component { } } - componentWillReceiveProps(nextProps) { + componentWillReceiveProps(nextProps: any) { if (!get(this.props, 'users.length') && ( get(this.props, 'item._created') !== get(nextProps, 'item._created') || get(this.props, 'item._updated') !== get(nextProps, 'item._updated') @@ -23,7 +23,7 @@ class AuditInformation extends React.Component { } } - getElement(field) { + getElement(field: any) { const {item} = this.props; const users = get(this.props, 'users.length') ? this.props.users : this.props.editUsers; const system = gettext('System'); diff --git a/assets/components/BannerDrop.tsx b/assets/components/BannerDrop.tsx index 8bfd05a9a..a1cbecbc7 100644 --- a/assets/components/BannerDrop.tsx +++ b/assets/components/BannerDrop.tsx @@ -3,13 +3,13 @@ import PropTypes from 'prop-types'; import classNames from 'classnames'; class BannerDrop extends React.Component { - constructor(props) { + constructor(props: any) { super(props); this.state = {open: this.props.isOpen}; this.toggleOpen = this.toggleOpen.bind(this); } - componentWillReceiveProps(nextProps) { + componentWillReceiveProps(nextProps: any) { if (this.props.id !== nextProps.id && this.state.open !== nextProps.isOpen) { this.setState({open: nextProps.isOpen}); diff --git a/assets/components/CalendarButton.tsx b/assets/components/CalendarButton.tsx index a29c41aa2..d7f0227ea 100644 --- a/assets/components/CalendarButton.tsx +++ b/assets/components/CalendarButton.tsx @@ -14,12 +14,12 @@ class CalendarButton extends React.Component { this.handleChange = this.handleChange.bind(this); } - handleChange(date) { + handleChange(date: any) { this.props.selectDate(date.valueOf(), 'day'); this.setState({startDate: date}); } - componentDidUpdate(prevProps) { + componentDidUpdate(prevProps: any) { prevProps.activeDate === EARLIEST_DATE && this.setState({startDate: moment(this.props.activeDate)}); } diff --git a/assets/components/CardEditor.tsx b/assets/components/CardEditor.tsx index 19969741f..43ff09a94 100644 --- a/assets/components/CardEditor.tsx +++ b/assets/components/CardEditor.tsx @@ -4,7 +4,7 @@ import PropTypes from 'prop-types'; import {gettext} from 'utils'; export default class CardEditor extends React.Component { - constructor(props) { + constructor(props: any) { super(props); this.state = {open: this.props.forceEditor}; @@ -13,7 +13,7 @@ export default class CardEditor extends React.Component { this.onSave = this.onSave.bind(this); } - componentWillReceiveProps(nextProps, nextState) { + componentWillReceiveProps(nextProps: any, nextState: any) { if (!nextState.open && nextProps.forceEditor) { this.setState({open: true}); } @@ -33,7 +33,7 @@ export default class CardEditor extends React.Component { } } - onSave(event) { + onSave(event: any) { this.props.onSave(event); this.setState({open: false}); } diff --git a/assets/components/EditPanel.tsx b/assets/components/EditPanel.tsx index 54dc34767..74d9243eb 100644 --- a/assets/components/EditPanel.tsx +++ b/assets/components/EditPanel.tsx @@ -5,7 +5,7 @@ import {isEmpty, get, pickBy, isEqual, every} from 'lodash'; import CheckboxInput from 'components/CheckboxInput'; class EditPanel extends React.Component { - constructor(props) { + constructor(props: any) { super(props); this.onItemChange = this.onItemChange.bind(this); this.toggleSelectAll = this.toggleSelectAll.bind(this); @@ -14,14 +14,14 @@ class EditPanel extends React.Component { this.state = {activeParent: props.parent._id, items: {}}; } - onItemChange(event) { + onItemChange(event: any) { const item = event.target.name; const items = Object.assign({}, this.state.items); items[item] = !items[item]; this.updateItems(items); } - toggleSelectAll(availableItems, allActive) { + toggleSelectAll(availableItems: any, allActive: any) { let items = {}; if (!allActive) { @@ -33,7 +33,7 @@ class EditPanel extends React.Component { this.updateItems(items); } - updateItems(items) { + updateItems(items: any) { this.setState({items}); if (this.props.onChange) { this.props.onChange({ @@ -45,12 +45,12 @@ class EditPanel extends React.Component { } } - saveItems(event) { + saveItems(event: any) { event.preventDefault(); this.props.onSave(Object.keys(pickBy(this.state.items))); } - initItems(props) { + initItems(props: any) { const items = {}; props.items.map((item) => items[item._id] = (props.parent[props.field] || []).includes(item._id)); @@ -62,7 +62,7 @@ class EditPanel extends React.Component { this.initItems(this.props); } - componentWillReceiveProps(nextProps) { + componentWillReceiveProps(nextProps: any) { if (this.state.activeParent !== nextProps.parent._id || get(this.props, 'items.length', 0) !== get(nextProps, 'items.length', 0)) { this.initItems(nextProps); @@ -78,7 +78,7 @@ class EditPanel extends React.Component { } - renderList(items) { + renderList(items: any) { const allActive = every(items, (item) => { return !!this.state.items[item._id]; }); diff --git a/assets/components/ExpiryDateInput.tsx b/assets/components/ExpiryDateInput.tsx index 684aa57e0..7e7e227ef 100644 --- a/assets/components/ExpiryDateInput.tsx +++ b/assets/components/ExpiryDateInput.tsx @@ -9,7 +9,7 @@ import {gettext} from '../utils'; export default class ExpiryDateInput extends React.Component { - constructor(props) { + constructor(props: any) { super(props); this.state = {value: !this.props.value ? 'never' : 'on'}; @@ -28,7 +28,7 @@ export default class ExpiryDateInput extends React.Component { this.onDateChange = this.onDateChange.bind(this); } - onSelectChange(event) { + onSelectChange(event: any) { this.setState({value: event.target.value}); let newDate: any; @@ -57,7 +57,7 @@ export default class ExpiryDateInput extends React.Component { } } - onDateChange(newExpiry) { + onDateChange(newExpiry: any) { this.setState({value: 'on'}); this.props.onChange(newExpiry.format('YYYY-MM-DD')); } diff --git a/assets/components/ListViewOptions.tsx b/assets/components/ListViewOptions.tsx index a78171f4e..33b002901 100644 --- a/assets/components/ListViewOptions.tsx +++ b/assets/components/ListViewOptions.tsx @@ -8,7 +8,7 @@ import {EXTENDED_VIEW, COMPACT_VIEW} from 'wire/defaults'; import {isTouchDevice} from 'utils'; class ListViewOptions extends React.PureComponent { - constructor(props) { + constructor(props: any) { super(props); this.state = {isOpen: false}; this.views = [ @@ -26,7 +26,7 @@ class ListViewOptions extends React.PureComponent { this.setState({isOpen: !this.state.isOpen}); } - setView(view) { + setView(view: any) { this.setState({isOpen: false}); this.props.setView(view.type); } diff --git a/assets/components/Modal.tsx b/assets/components/Modal.tsx index e9690a1e2..aca917066 100644 --- a/assets/components/Modal.tsx +++ b/assets/components/Modal.tsx @@ -74,7 +74,7 @@ function assertButtonHandler(label: any, type: any, onClick: any) { } class Modal extends React.Component { - constructor(props) { + constructor(props: any) { super(props); this.onSubmit = this.onSubmit.bind(this); this.state = {submitting: false}; @@ -103,7 +103,7 @@ class Modal extends React.Component { } } - onSubmit(e) { + onSubmit(e: any) { if (this.props.disableButtonOnSubmit) { this.setState({submitting: true}); this.props.onSubmit(e); diff --git a/assets/components/NotificationList.tsx b/assets/components/NotificationList.tsx index fbe6574bd..26a531e55 100644 --- a/assets/components/NotificationList.tsx +++ b/assets/components/NotificationList.tsx @@ -9,7 +9,7 @@ import {isTouchDevice} from '../utils'; import NotificationListItem from './NotificationListItem'; class NotificationList extends React.Component { - constructor(props) { + constructor(props: any) { super(props); this.state = { displayItems: false, @@ -49,7 +49,7 @@ class NotificationList extends React.Component { this.setState({connected: false}); } - componentDidUpdate(prevProps) { + componentDidUpdate(prevProps: any) { if (this.state.displayItems && this.props.count !== prevProps.count) { this.props.loadNotifications(); } diff --git a/assets/components/ShareItemModal.tsx b/assets/components/ShareItemModal.tsx index 0b81c1e07..2f524758a 100644 --- a/assets/components/ShareItemModal.tsx +++ b/assets/components/ShareItemModal.tsx @@ -12,7 +12,7 @@ import Modal from 'components/Modal'; import SearchBar from 'search/components/SearchBar'; class ShareItemModal extends React.Component { - constructor(props) { + constructor(props: any) { super(props); this.state = { message: '', @@ -24,14 +24,14 @@ class ShareItemModal extends React.Component { this.getUsers = this.getUsers.bind(this); } - onSubmit(event) { + onSubmit(event: any) { event.preventDefault(); if (this.state.users.length) { return this.props.submit(!!this.props.data.isTopic, omit(this.state, 'displayUsers')); } } - onChangeHandler(field) { + onChangeHandler(field: any) { return (event: any) => { this.setState({ [field]: event.target.value, @@ -39,7 +39,7 @@ class ShareItemModal extends React.Component { }; } - toggleUser(userId, all) { + toggleUser(userId: any, all: any) { let newValue: any; if (all) { newValue = this.props.data.users.length === this.state.users.length ? [] : @@ -61,14 +61,14 @@ class ShareItemModal extends React.Component { this.toggleUser(null, true); } - getUsers(q) { + getUsers(q: any) { this.setState({ displayUsers: q ? this.props.data.users.filter((u) => (this.getUserName(u).toLowerCase()).includes(q.toLowerCase())) : this.props.data.users }); } - getUserName(user) { + getUserName(user: any) { return `${user.first_name} ${user.last_name}`; } diff --git a/assets/components/SortItems.tsx b/assets/components/SortItems.tsx index 16028037c..7c0e8800e 100644 --- a/assets/components/SortItems.tsx +++ b/assets/components/SortItems.tsx @@ -5,7 +5,7 @@ import {gettext} from 'utils'; class SortItems extends React.Component { - constructor(props) { + constructor(props: any) { super(props); this.state = {items: this.props.items}; this.onSortEnd = this.onSortEnd.bind(this); @@ -13,11 +13,11 @@ class SortItems extends React.Component { this.onRemove = this.onRemove.bind(this); } - componentWillReceiveProps(nextProps) { + componentWillReceiveProps(nextProps: any) { this.setState({items: nextProps.items}); } - onRemove(itemToRemove) { + onRemove(itemToRemove: any) { const items = [...this.state.items].filter((item) => itemToRemove.value !== item.value); this.setState({items: items}); this.props.onChange(items); diff --git a/assets/components/TextListInput.tsx b/assets/components/TextListInput.tsx index 703d8c9ad..edd4af9f2 100644 --- a/assets/components/TextListInput.tsx +++ b/assets/components/TextListInput.tsx @@ -13,7 +13,7 @@ import {gettext, KEYCODES} from 'utils'; * @description Component to select tags like Keyword of a news story */ class TextListInput extends React.Component { - constructor(props) { + constructor(props: any) { super(props); this.state = {inputText: ''}; @@ -47,7 +47,7 @@ class TextListInput extends React.Component { } } - removeKeyword(index) { + removeKeyword(index: any) { const newValue = [...this.props.value]; newValue.splice(index, 1); @@ -59,7 +59,7 @@ class TextListInput extends React.Component { }); } - inputChange(event) { + inputChange(event: any) { this.setState({inputText: get(event, 'target.value')}); } diff --git a/assets/components/cards/edit/ConfigNavigation.tsx b/assets/components/cards/edit/ConfigNavigation.tsx index e1ef37d1f..e1cd444fc 100644 --- a/assets/components/cards/edit/ConfigNavigation.tsx +++ b/assets/components/cards/edit/ConfigNavigation.tsx @@ -8,7 +8,7 @@ import {gettext, notify} from 'utils'; class ConfigNavigation extends React.Component { - constructor(props) { + constructor(props: any) { super(props); this.getNavigations = this.getNavigations.bind(this); @@ -23,7 +23,7 @@ class ConfigNavigation extends React.Component { }; } - getCardNavigations(items) { + getCardNavigations(items: any) { return items ? items.map( item => ({ value: this.navigationsById[item]._id, @@ -32,7 +32,7 @@ class ConfigNavigation extends React.Component { ) : []; } - componentWillReceiveProps(nextProps) { + componentWillReceiveProps(nextProps: any) { if (nextProps.card._id !== this.props.card._id) { this.setState({items: this.getCardNavigations(get(nextProps.card, 'config.navigations') || [])}); } @@ -50,7 +50,7 @@ class ConfigNavigation extends React.Component { return navigationList; } - onAdd(navigation) { + onAdd(navigation: any) { if(!navigation) { notify.error(gettext('Select a navigation.')); return; @@ -66,11 +66,11 @@ class ConfigNavigation extends React.Component { this.onChange([...this.state.items, {text: nav.name, value:nav._id}]); } - onSelect(event) { + onSelect(event: any) { this.setState({selected: event.target.value}); } - onChange(items) { + onChange(items: any) { this.setState({items}); this.props.onChange({ target: { diff --git a/assets/components/cards/edit/ConfigProduct.tsx b/assets/components/cards/edit/ConfigProduct.tsx index 59c3e0e36..6400cb9ec 100644 --- a/assets/components/cards/edit/ConfigProduct.tsx +++ b/assets/components/cards/edit/ConfigProduct.tsx @@ -6,7 +6,7 @@ import {gettext} from 'utils'; class ConfigProduct extends React.Component { - constructor(props) { + constructor(props: any) { super(props); this.getProducts = this.getProducts.bind(this); diff --git a/assets/components/cards/render/CardRow.tsx b/assets/components/cards/render/CardRow.tsx index baaf24ba2..9c900128d 100644 --- a/assets/components/cards/render/CardRow.tsx +++ b/assets/components/cards/render/CardRow.tsx @@ -4,7 +4,7 @@ import MoreNewsButton from './MoreNewsButton'; import {connect} from 'react-redux'; class CardRow extends React.Component { - constructor(props) { + constructor(props: any) { super(props); } diff --git a/assets/general-settings/components/GeneralSettingsApp.tsx b/assets/general-settings/components/GeneralSettingsApp.tsx index fd64a4267..0fce9310a 100644 --- a/assets/general-settings/components/GeneralSettingsApp.tsx +++ b/assets/general-settings/components/GeneralSettingsApp.tsx @@ -15,7 +15,7 @@ function isInput(field: any) { } class GeneralSettingsApp extends React.Component { - constructor(props) { + constructor(props: any) { super(props); this.state = { values: {}, @@ -39,7 +39,7 @@ class GeneralSettingsApp extends React.Component { this.onSubmit = this.onSubmit.bind(this); } - componentWillReceiveProps(nextProps) { + componentWillReceiveProps(nextProps: any) { if (nextProps.updatedTime !== this.props.updatedTime) { this.setState({ _updated: nextProps.updatedTime @@ -47,17 +47,17 @@ class GeneralSettingsApp extends React.Component { } } - onChange(key, val) { + onChange(key: any, val: any) { const values = {...this.state.values, [key]: val}; this.setState({values}); } - onBooleanChange(key) { + onBooleanChange(key: any) { const values = {...this.state.values, [key]: !this.state.values[key]}; this.setState({values}); } - onSubmit(event) { + onSubmit(event: any) { event.preventDefault(); this.props.save(this.state.values); } diff --git a/assets/home/components/HomeApp.tsx b/assets/home/components/HomeApp.tsx index f3419a087..de9e191cc 100644 --- a/assets/home/components/HomeApp.tsx +++ b/assets/home/components/HomeApp.tsx @@ -27,7 +27,7 @@ const modals = { }; class HomeApp extends React.Component { - constructor(props, context) { + constructor(props: any, context: any) { super(props, context); this.getPanels = this.getPanels.bind(this); this.filterActions = this.filterActions.bind(this); @@ -56,7 +56,7 @@ class HomeApp extends React.Component { }); } - renderModal(specs) { + renderModal(specs: any) { if (specs) { const Modal = modals[specs.modal]; return ( @@ -65,7 +65,7 @@ class HomeApp extends React.Component { } } - onHomeScroll(event) { + onHomeScroll(event: any) { const container = event.target; const BUFFER = 100; if(container.scrollTop + this.height + BUFFER >= container.scrollHeight) { @@ -75,11 +75,11 @@ class HomeApp extends React.Component { } } - getProduct(card) { + getProduct(card: any) { return this.props.products.find(p => p._id === card.config.product); } - getPanels(card) { + getPanels(card: any) { if (this.state.loadingItems) { return ( @@ -126,12 +126,12 @@ class HomeApp extends React.Component { />; } - filterActions(item, config) { + filterActions(item: any, config: any) { return this.props.actions.filter((action) => (!config || isDisplayed(action.id, config)) && (!action.when || action.when(this.props, item))); } - renderContent(children) { + renderContent(children: any) { return ( {this.props.isSearchEnabled && ( diff --git a/assets/home/components/search-bar.tsx b/assets/home/components/search-bar.tsx index 0983f4975..2d776480d 100644 --- a/assets/home/components/search-bar.tsx +++ b/assets/home/components/search-bar.tsx @@ -3,7 +3,7 @@ import {gettext} from 'utils'; import classNames from 'classnames'; export class SearchBar extends React.PureComponent { - constructor(props) { + constructor(props: any) { super(props); this.state = {value: ''}; } diff --git a/assets/layout/components/BaseApp.tsx b/assets/layout/components/BaseApp.tsx index a1caa1064..b5ab2677a 100644 --- a/assets/layout/components/BaseApp.tsx +++ b/assets/layout/components/BaseApp.tsx @@ -13,7 +13,7 @@ import FiltersTab from 'wire/components/filters/FiltersTab'; import NavigationTab from 'wire/components/filters/NavigationTab'; export default class BaseApp extends React.Component { - constructor(props) { + constructor(props: any) { super(props); this.state = { @@ -54,19 +54,19 @@ export default class BaseApp extends React.Component { return null; } - setOpenRef(elem) { + setOpenRef(elem: any) { this.dom.open = elem; } - setCloseRef(elem) { + setCloseRef(elem: any) { this.dom.close = elem; } - setListRef(elem) { + setListRef(elem: any) { this.dom.list = elem; } - renderModal(specs) { + renderModal(specs: any) { if (specs) { const Modal = this.modals[specs.modal]; return ( @@ -75,7 +75,7 @@ export default class BaseApp extends React.Component { } } - renderNavBreadcrumb(navigations, activeNavigation, activeTopic, activeProduct = null, activeFilter = null) { + renderNavBreadcrumb(navigations: any, activeNavigation: any, activeTopic: any, activeProduct: any = null, activeFilter: any = null) { const dest = document.getElementById('nav-breadcrumb'); if (!dest) { return null; @@ -119,13 +119,13 @@ export default class BaseApp extends React.Component { ); } - toggleSidebar(event) { + toggleSidebar(event: any) { event.preventDefault(); this.setState({withSidebar: !this.state.withSidebar}); setFilterPanelOpenState(!this.state.withSidebar, this.props.context); } - onListScroll(event) { + onListScroll(event: any) { const BUFFER = 10; const container = event.target; @@ -152,7 +152,7 @@ export default class BaseApp extends React.Component { } } - filterActions(item, config, includeCoverages=false) { + filterActions(item: any, config: any, includeCoverages: any = false) { return this.props.actions.filter((action) => (!config || isDisplayed(action.id, config)) && (!action.when || action.when(this.props.state, item, includeCoverages))); } @@ -192,7 +192,7 @@ export default class BaseApp extends React.Component { return null; } - componentDidUpdate(nextProps) { + componentDidUpdate(nextProps: any) { if ((nextProps.activeQuery || this.props.activeQuery) && (nextProps.activeQuery !== this.props.activeQuery) && this.dom.list != null) { this.dom.list.scrollTop = 0; } diff --git a/assets/maps/components/map.tsx b/assets/maps/components/map.tsx index 6b6c712c9..1a15e4af2 100644 --- a/assets/maps/components/map.tsx +++ b/assets/maps/components/map.tsx @@ -15,7 +15,7 @@ const getMap = () => { }; export default class Map extends React.PureComponent { - constructor(props) { + constructor(props: any) { super(props); this.markers = []; diff --git a/assets/maps/components/static.tsx b/assets/maps/components/static.tsx index f4fbb6dd8..104b3475e 100644 --- a/assets/maps/components/static.tsx +++ b/assets/maps/components/static.tsx @@ -5,7 +5,7 @@ import {gettext} from '../../utils'; class StaticMap extends React.Component{ - constructor(props) { + constructor(props: any) { super(props); this.state = { mapLoaded: false diff --git a/assets/market-place/components/MarketPlaceApp.tsx b/assets/market-place/components/MarketPlaceApp.tsx index bdaca799d..97c09d4cb 100644 --- a/assets/market-place/components/MarketPlaceApp.tsx +++ b/assets/market-place/components/MarketPlaceApp.tsx @@ -16,7 +16,7 @@ import NavigationSixPerRow from 'components/cards/render/NavigationSixPerRow'; class MarketPlaceApp extends BaseApp { - constructor(props) { + constructor(props: any) { super(props); } diff --git a/assets/monitoring/components/EditMonitoringProfile.tsx b/assets/monitoring/components/EditMonitoringProfile.tsx index e5a9a8b58..e115c5c6c 100644 --- a/assets/monitoring/components/EditMonitoringProfile.tsx +++ b/assets/monitoring/components/EditMonitoringProfile.tsx @@ -17,7 +17,7 @@ import {gettext} from 'utils'; const getCompanyOptions = (companies: any) => companies.map(company => ({value: company._id, text: company.name})); class EditMonitoringProfile extends React.Component { - constructor(props) { + constructor(props: any) { super(props); this.handleTabClick = this.handleTabClick.bind(this); this.getUsers = this.getUsers.bind(this); @@ -29,7 +29,7 @@ class EditMonitoringProfile extends React.Component { ]; } - handleTabClick(event) { + handleTabClick(event: any) { this.setState({activeTab: event.target.name}); if (event.target.name === 'users' && get(this.props, 'item.company')) { this.props.fetchCompanyUsers(this.props.item.company); @@ -52,7 +52,7 @@ class EditMonitoringProfile extends React.Component { )); } - componentDidUpdate(prevProps) { + componentDidUpdate(prevProps: any) { if (this.props.item._id !== prevProps.item._id) { this.setState({activeTab: this.props.scheduleMode ? 'schedule' : 'profile'}); return; diff --git a/assets/monitoring/components/MonitoringApp.tsx b/assets/monitoring/components/MonitoringApp.tsx index c08ec6fdb..45ee4d56f 100644 --- a/assets/monitoring/components/MonitoringApp.tsx +++ b/assets/monitoring/components/MonitoringApp.tsx @@ -16,7 +16,7 @@ import DropdownFilter from 'components/DropdownFilter'; class MonitoringApp extends React.Component { - constructor(props, context) { + constructor(props: any, context: any) { super(props, context); this.onChange = this.onChange.bind(this); @@ -37,11 +37,11 @@ class MonitoringApp extends React.Component { }; } - isScheduleMode(sectionName = this.state.activeSection) { + isScheduleMode(sectionName: any = this.state.activeSection) { return sectionName === 'Schedules'; } - onSectionChange(sectionName) { + onSectionChange(sectionName: any) { if (sectionName !== this.state.activeSection) { this.setState({ activeSection: sectionName, @@ -57,7 +57,7 @@ class MonitoringApp extends React.Component { } } - getDropdownItems(filter) { + getDropdownItems(filter: any) { const companies = this.isScheduleMode() ? this.props.monitoringListCompanies : this.props.companies; return (companies).map((item, i) => (
); } -function getUsers(users: any = []) { +function getUsers(users: Array = []) { const usersInfo = users.length <= 0 ? '-' : users.map((u) => `${u.first_name} ${u.last_name} (${u.email})`).join(', '); diff --git a/assets/company-reports/components/ProductCompanies.tsx b/assets/company-reports/components/ProductCompanies.tsx index 9a936ae00..076c7f956 100644 --- a/assets/company-reports/components/ProductCompanies.tsx +++ b/assets/company-reports/components/ProductCompanies.tsx @@ -26,7 +26,7 @@ class ProductCompanies extends React.Component { getDropdownItems(filter: any) { const {toggleFilterAndQuery} = this.props; let getName = (text: any) => (text); - let itemsArray = []; + let itemsArray: Array = []; switch (filter.field) { case 'product': itemsArray = this.products; diff --git a/assets/company-reports/components/SubscriberActivity.tsx b/assets/company-reports/components/SubscriberActivity.tsx index f4931c34d..27773802a 100644 --- a/assets/company-reports/components/SubscriberActivity.tsx +++ b/assets/company-reports/components/SubscriberActivity.tsx @@ -50,7 +50,7 @@ class SubscriberActivity extends React.Component { getDropdownItems(filter: any) { const {toggleFilterAndQuery, sections, apiEnabled} = this.props; let getName = (text: any) => (text); - let itemsArray = []; + let itemsArray: Array = []; // Company is not filtered, always show full list switch(filter.field) { case 'company': diff --git a/assets/components/cards/render/TopNewsTwoByTwoCard.tsx b/assets/components/cards/render/TopNewsTwoByTwoCard.tsx index 15e5eadc1..71d123d70 100644 --- a/assets/components/cards/render/TopNewsTwoByTwoCard.tsx +++ b/assets/components/cards/render/TopNewsTwoByTwoCard.tsx @@ -56,7 +56,7 @@ const getTopNewsRightPanel = (item: any, picture: any, openItem: any, cardId: an }; const getTopNews = (items: any, openItem: any, cardId: any, listConfig: any) => { - const topNews = []; + const topNews: Array = []; for(var i=0; i = []; export function registerNotification(condition: any, component: any) { registeredNotifications.unshift({condition, component}); diff --git a/assets/search/components/TopicParameters.tsx b/assets/search/components/TopicParameters.tsx index 7c8b9369a..de1e0a2ba 100644 --- a/assets/search/components/TopicParameters.tsx +++ b/assets/search/components/TopicParameters.tsx @@ -13,7 +13,7 @@ const TopicParameters = ({topic, navigations, locators, filterGroupLabels, filte .map((navId) => get(navsById, `[${navId}].name`)); const created = getCreatedSearchParamLabel(get(topic, 'created') || {}); - const dateLabels = []; + const dateLabels: Array = []; if (created.relative) { dateLabels.push(created.relative); diff --git a/assets/ui/components/ArticleBodyHtml.tsx b/assets/ui/components/ArticleBodyHtml.tsx index 17ae15785..19b3c869b 100644 --- a/assets/ui/components/ArticleBodyHtml.tsx +++ b/assets/ui/components/ArticleBodyHtml.tsx @@ -72,7 +72,7 @@ class ArticleBodyHtml extends React.PureComponent { executeScripts() { const tree = this.bodyRef.current; - const loaded = []; + const loaded: Array = []; if (tree == null) { return; diff --git a/assets/utils.tsx b/assets/utils.tsx index f6439f7d3..54f6ad5dc 100644 --- a/assets/utils.tsx +++ b/assets/utils.tsx @@ -383,7 +383,7 @@ export function getTextFromHtml(html: any) { const div = document.createElement('div'); div.innerHTML = formatHTML(raw_html); const tree = document.createTreeWalker(div, NodeFilter.SHOW_TEXT, null, false); // ie requires all params - const text = []; + const text: Array = []; while (tree.nextNode()) { text.push(tree.currentNode.textContent); if (tree.currentNode.nextSibling) { @@ -600,7 +600,7 @@ export function getEmbargo(item: any) { return parsed.isAfter(now) ? parsed : null; } -export function getItemFromArray(value: any, items: any = [], field: any = '_id') { +export function getItemFromArray(value: any, items: Array = [], field: any = '_id') { return items.find((i) => i[field] === value); } From 9156f181c4ba192588b139b1464b083c17a784d1 Mon Sep 17 00:00:00 2001 From: Tomas Kikutis Date: Tue, 13 Jun 2023 12:48:32 +0200 Subject: [PATCH 23/71] various fixes --- assets/agenda/actions.ts | 20 +++++++++++--------- assets/agenda/utils.ts | 2 +- assets/utils.tsx | 2 +- assets/wire/components/fields/Embargo.tsx | 5 +++++ 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/assets/agenda/actions.ts b/assets/agenda/actions.ts index 23d7de92d..0d8d35980 100644 --- a/assets/agenda/actions.ts +++ b/assets/agenda/actions.ts @@ -76,8 +76,8 @@ export function previewItem(item: any, group: any, plan: any) { export function fetchWireItemsForAgenda(item: any) { return (dispatch: any) => { - let wireIds = []; - (get(item, 'coverages') || []).forEach((c) => { + let wireIds: Array = []; + (get(item, 'coverages') || []).forEach((c: any) => { if (c.coverage_type === 'text' && c.delivery_id) { wireIds.push(c.delivery_id); } @@ -110,7 +110,9 @@ export function requestCoverage(item: any, message: any) { const data = {item: item._id, message}; return server.post(url, data) .then(() => notify.success(gettext('Your inquiry has been sent successfully'))) - .catch(errorHandler); + .catch((arg) => { + errorHandler(arg); + }); }; } @@ -184,8 +186,8 @@ export function copyPreviewContents(item: any) { return; } - server.post(`/wire/${item._id}/copy?type=${state.context}`) - .then((response) => { + (server as any).post(`/wire/${item._id}/copy?type=${state.context}`) + .then((response: any) => { dispatch(setCopyItem(item._id)); copyTextToClipboard(response.data, item); }) @@ -202,10 +204,10 @@ export function copyPreviewContents(item: any) { */ function search(state: any, next: any) { const currentMoment = moment(); - const searchParams = searchParamsSelector(state); - const createdFilter = get(searchParams, 'created') || {}; - const itemTypeFilter = get(state, 'agenda.itemType'); - const eventsOnlyFilter = !state.bookmarks && itemTypeFilter === 'events'; + const searchParams: any = searchParamsSelector(state); + const createdFilter: any = get(searchParams, 'created') || {}; + const itemTypeFilter: any = get(state, 'agenda.itemType'); + const eventsOnlyFilter: any = !state.bookmarks && itemTypeFilter === 'events'; const featuredFilter = noNavigationSelected(searchParams.navigation) && !state.bookmarks && diff --git a/assets/agenda/utils.ts b/assets/agenda/utils.ts index 9621ee49a..d5313f0cb 100644 --- a/assets/agenda/utils.ts +++ b/assets/agenda/utils.ts @@ -335,7 +335,7 @@ export function getDateInputDate(dateString: any) { * @param {String} dateString * @return {String} */ -export function getMomentDate(dateString: any) { +export function getMomentDate(dateString: any): any { if (dateString) { return moment(parseInt(dateString)); } diff --git a/assets/utils.tsx b/assets/utils.tsx index 54f6ad5dc..a8fc0e2ad 100644 --- a/assets/utils.tsx +++ b/assets/utils.tsx @@ -513,7 +513,7 @@ export function formatHTML(html: any) { * @param dispatch * @param setError */ -export function errorHandler(error: any, dispatch: any, setError: any) { +export function errorHandler(error: any, dispatch?: any, setError?: any) { console.error('error', error); if (error.response.status !== 400) { diff --git a/assets/wire/components/fields/Embargo.tsx b/assets/wire/components/fields/Embargo.tsx index 66b490c67..ff8e38608 100644 --- a/assets/wire/components/fields/Embargo.tsx +++ b/assets/wire/components/fields/Embargo.tsx @@ -7,6 +7,11 @@ import {Tooltip} from 'bootstrap'; import {gettext, fullDate, getEmbargo} from 'utils'; export class Embargo extends React.Component { + static propTypes: any; + timeout: any; + tooltip: any; + elem: any; + constructor(props: any) { super(props); this.state = { From 5e581e72e0d4fe38d598c4334b7cd49f3e8d4066 Mon Sep 17 00:00:00 2001 From: Tomas Kikutis Date: Tue, 13 Jun 2023 14:07:13 +0200 Subject: [PATCH 24/71] any types to variable declarations for objects --- assets/agenda/actions.ts | 4 ++-- assets/agenda/components/AgendaFilters.tsx | 2 +- assets/agenda/components/AgendaItemTypeFilter.tsx | 2 +- assets/agenda/components/AgendaListCoverageItem.tsx | 2 +- assets/agenda/reducers.ts | 4 ++-- assets/agenda/utils.ts | 12 ++++++------ assets/am-news/components/AmNewsApp.tsx | 2 +- assets/analytics.ts | 2 +- assets/cards/actions.ts | 2 +- assets/cards/components/Cards.tsx | 4 ++-- assets/cards/components/CardsApp.tsx | 2 +- assets/cards/components/EditCard.tsx | 2 +- assets/cards/reducers.ts | 8 ++++---- assets/companies/components/CompaniesApp.tsx | 2 +- assets/companies/components/CompanyList.tsx | 2 +- assets/companies/components/EditCompany.tsx | 2 +- assets/companies/reducers.ts | 10 +++++----- assets/company-admin/components/CompanyAdminApp.tsx | 2 +- assets/company-admin/reducers.ts | 2 +- assets/company-reports/actions.ts | 2 +- .../company-reports/components/CompanyReportsApp.tsx | 2 +- .../company-reports/components/ContentActivity.tsx | 2 +- .../company-reports/components/ProductCompanies.tsx | 2 +- .../components/SubscriberActivity.tsx | 2 +- assets/company-reports/reducers.ts | 4 ++-- assets/company-reports/utils.ts | 2 +- assets/components/EditPanel.tsx | 6 +++--- assets/components/Modal.tsx | 2 +- assets/features/dashboard/DashboardSwitch.tsx | 2 +- assets/features/sections/SectionSwitch.tsx | 2 +- .../components/GeneralSettingsApp.tsx | 8 ++++---- assets/general-settings/reducers.ts | 4 ++-- assets/home/components/HomeApp.tsx | 2 +- assets/home/reducers.ts | 2 +- assets/local-store.ts | 4 ++-- assets/market-place/reducers.ts | 2 +- assets/monitoring/components/MonitoringApp.tsx | 2 +- assets/monitoring/components/MonitoringPanel.tsx | 2 +- assets/monitoring/reducers.ts | 8 ++++---- assets/navigations/components/Navigations.tsx | 4 ++-- assets/navigations/components/NavigationsApp.tsx | 2 +- assets/navigations/reducers.tsx | 6 +++--- assets/navigations/utils.ts | 2 +- assets/notifications/reducers.ts | 2 +- assets/oauth_clients/components/Clients.tsx | 4 ++-- assets/oauth_clients/components/ClientsApp.tsx | 2 +- assets/oauth_clients/reducers.ts | 10 +++++----- assets/products/components/Products.tsx | 4 ++-- assets/products/components/ProductsApp.tsx | 2 +- assets/products/reducers.ts | 10 +++++----- assets/reducers.ts | 2 +- assets/search/actions.ts | 4 ++-- assets/search/components/ContentSearchResults.tsx | 4 ++-- assets/search/components/MonitoringEditor.tsx | 2 +- assets/search/selectors.ts | 2 +- assets/search/utils.ts | 2 +- assets/section-filters/components/SectionFilters.tsx | 4 ++-- .../section-filters/components/SectionFiltersApp.tsx | 2 +- assets/section-filters/reducers.ts | 6 +++--- assets/tests/TextInput.spec.tsx | 2 +- assets/user-profile/actions.ts | 2 +- assets/user-profile/components/UserProfileApp.tsx | 2 +- .../user-profile/components/profile/UserProfile.tsx | 2 +- assets/user-profile/reducers.ts | 2 +- assets/users/actions.ts | 2 +- assets/users/components/Users.tsx | 4 ++-- assets/users/components/UsersApp.tsx | 2 +- assets/users/reducers.ts | 8 ++++---- assets/wire/actions.ts | 2 +- assets/wire/components/PreviewTagsSubjects.tsx | 2 +- assets/wire/components/SelectedItemsBar.tsx | 2 +- assets/wire/components/WireApp.tsx | 2 +- assets/wire/components/filters/FiltersTab.tsx | 4 ++-- assets/wire/components/filters/NavigationTab.tsx | 2 +- assets/wire/reducers.ts | 2 +- assets/wire/tests/WireApp.spec.tsx | 2 +- assets/wire/tests/actions.spec.ts | 8 ++++---- assets/wire/tests/utils.spec.ts | 6 +++--- assets/wire/types.ts | 2 +- assets/wire/utils.ts | 6 +++--- 80 files changed, 136 insertions(+), 136 deletions(-) diff --git a/assets/agenda/actions.ts b/assets/agenda/actions.ts index 0d8d35980..35de30b02 100644 --- a/assets/agenda/actions.ts +++ b/assets/agenda/actions.ts @@ -107,7 +107,7 @@ export function openItemDetails(item: any, group: any, plan: any) { export function requestCoverage(item: any, message: any) { return () => { const url = '/agenda/request_coverage'; - const data = {item: item._id, message}; + const data: any = {item: item._id, message}; return server.post(url, data) .then(() => notify.success(gettext('Your inquiry has been sent successfully'))) .catch((arg) => { @@ -235,7 +235,7 @@ function search(state: any, next: any) { dateTo = createdFilter.from; } - const params = { + const params: any = { q: searchParams.query, id: state.queryId, bookmarks: state.bookmarks && state.user, diff --git a/assets/agenda/components/AgendaFilters.tsx b/assets/agenda/components/AgendaFilters.tsx index 830426cd1..a44f724a7 100644 --- a/assets/agenda/components/AgendaFilters.tsx +++ b/assets/agenda/components/AgendaFilters.tsx @@ -21,7 +21,7 @@ export const transformFilterBuckets = (filter: any, aggregations: any, props: an return filter.transformBuckets(filter, aggregations, props); }; -const renderFilter = { +const renderFilter: any = { item_type: (props: any) => ( { getUpdatedState(props: any) { const watched = isWatched(props.coverage, props.user); - const state = { + const state: any = { coverageClass: `icon--coverage-${getCoverageIcon(props.coverage.coverage_type)}`, beingUpdated: isCoverageBeingUpdated(props.coverage), isWatched: watched, diff --git a/assets/agenda/reducers.ts b/assets/agenda/reducers.ts index a614e899d..4269bd002 100644 --- a/assets/agenda/reducers.ts +++ b/assets/agenda/reducers.ts @@ -19,7 +19,7 @@ import {searchReducer} from 'search/reducers'; import {defaultReducer} from '../reducers'; import {EARLIEST_DATE} from './utils'; -const initialState = { +const initialState: any = { items: [], itemsById: {}, aggregations: null, @@ -178,7 +178,7 @@ export default function agendaReducer(state: any = initialState, action: any) { case INIT_DATA: { const navigations = get(action, 'agendaData.navigations', []); const openItem = get(action, 'agendaData.item', null); - const agenda = { + const agenda: any = { ...state.agenda, activeDate: action.agendaData.bookmarks ? EARLIEST_DATE : action.activeDate || state.agenda.activeDate, eventsOnlyAccess: action.agendaData.events_only, diff --git a/assets/agenda/utils.ts b/assets/agenda/utils.ts index d5313f0cb..b385d176a 100644 --- a/assets/agenda/utils.ts +++ b/assets/agenda/utils.ts @@ -20,7 +20,7 @@ export const STATUS_CANCELED = 'cancelled'; export const STATUS_POSTPONED = 'postponed'; export const STATUS_RESCHEDULED = 'rescheduled'; -const navigationFunctions = { +const navigationFunctions: any = { 'day': { 'next': getNextDay, 'previous': getPreviousDay, @@ -39,7 +39,7 @@ const navigationFunctions = { } }; -const Groupers = { +const Groupers: any = { 'day': formatDate, 'week': formatWeek, 'month': formatMonth, @@ -456,7 +456,7 @@ export function getInternalNote(item: any, plan: any) { */ export function getDataFromCoverages(item: any) { const planningItems = get(item, 'planning_items', []); - let data = { + let data: any = { 'internal_note': {}, 'ednote': {}, 'workflow_status_reason': {}, @@ -660,7 +660,7 @@ const isBetweenDay = (day: any, start: any, end: any) => { */ export function groupItems(items: any, activeDate: any, activeGrouping: any, featuredOnly: any) { const maxStart = moment(activeDate).set({'h': 0, 'm': 0, 's': 0}); - const groupedItems = {}; + const groupedItems: any = {}; const grouper = Groupers[activeGrouping]; items @@ -750,7 +750,7 @@ export function getPlanningItemsByGroup(item: any, group: any) { formatDate(p.planning_date) === group && get(p, 'coverages.length', 0) === 0); const allPlans = keyBy(planningItems, '_id'); - const processed = {}; + const processed: any = {}; // get unique plans for that group based on the coverage. const plansWithCoverages = (item.coverages || []) @@ -824,7 +824,7 @@ export const groupRegions = (filter: any, aggregations: any, props: any) => { if (props.locators && Object.keys(props.locators).length > 0) { let regions = sortBy(props.locators.filter((l) => l.state).map((l) => ({...l, 'key': l.name, 'label': l.state})), 'label'); const others = props.locators.filter((l) => !l.state).map((l) => ({...l, 'key': l.name, 'label': l.country || l.world_region})); - const separator = {'key': 'divider'}; + const separator: any = {'key': 'divider'}; if (others.length > 0) { if (regions.length > 0) { diff --git a/assets/am-news/components/AmNewsApp.tsx b/assets/am-news/components/AmNewsApp.tsx index 8d5f8436e..23f14dd57 100644 --- a/assets/am-news/components/AmNewsApp.tsx +++ b/assets/am-news/components/AmNewsApp.tsx @@ -43,7 +43,7 @@ import { } from 'search/selectors'; -const modals = { +const modals: any = { shareItem: ShareItemModal, downloadItems: DownloadItemsModal, }; diff --git a/assets/analytics.ts b/assets/analytics.ts index 8f8bc3dac..88b08251c 100644 --- a/assets/analytics.ts +++ b/assets/analytics.ts @@ -5,7 +5,7 @@ class Analytics { if (window.gtag) { const company = get(window, 'profileData.companyName', 'none'); const user = get(window, 'profileData.user.first_name', 'unknown'); - const userParams = { + const userParams: any = { event_category: company, company: company, user: user, diff --git a/assets/cards/actions.ts b/assets/cards/actions.ts index ab7aca62d..fe5136a6e 100644 --- a/assets/cards/actions.ts +++ b/assets/cards/actions.ts @@ -77,7 +77,7 @@ export function postCard() { data.append('card', JSON.stringify(card)); if (card.type === '4-photo-gallery') { - const errors = { + const errors: any = { config: { sources: [{}, {}, {}, {}] } diff --git a/assets/cards/components/Cards.tsx b/assets/cards/components/Cards.tsx index 45e59cbb4..9eee4b448 100644 --- a/assets/cards/components/Cards.tsx +++ b/assets/cards/components/Cards.tsx @@ -31,7 +31,7 @@ class Cards extends React.Component { isFormValid() { let valid = true; - let errors = {}; + let errors: any = {}; if (!this.props.cardToEdit.label) { errors.label = [gettext('Please provide card label')]; @@ -67,7 +67,7 @@ class Cards extends React.Component { } render() { - const progressStyle = {width: '25%'}; + const progressStyle: any = {width: '25%'}; const cardFilter = (card: any) => !this.props.activeDashboard || get(card, 'dashboard', 'newsroom') === this.props.activeDashboard; diff --git a/assets/cards/components/CardsApp.tsx b/assets/cards/components/CardsApp.tsx index 912a7d177..d28d45340 100644 --- a/assets/cards/components/CardsApp.tsx +++ b/assets/cards/components/CardsApp.tsx @@ -50,7 +50,7 @@ const mapStateToProps = (state: any) => ({ activeDashboard: state.dashboards.active, }); -const mapDispatchToProps = { +const mapDispatchToProps: any = { newCard, fetchCards, setQuery: setSearchQuery, diff --git a/assets/cards/components/EditCard.tsx b/assets/cards/components/EditCard.tsx index 91a974a34..225299c7c 100644 --- a/assets/cards/components/EditCard.tsx +++ b/assets/cards/components/EditCard.tsx @@ -28,7 +28,7 @@ class EditCard extends React.Component { cardTypes.unshift({value: '', text: '', component: getCardEditComponent('')}); - const cardProps = { + const cardProps: any = { card: this.props.card, onChange: this.props.onChange, errors: this.props.errors diff --git a/assets/cards/reducers.ts b/assets/cards/reducers.ts index 507756d9c..6dbf4246c 100644 --- a/assets/cards/reducers.ts +++ b/assets/cards/reducers.ts @@ -18,7 +18,7 @@ import {searchReducer} from 'search/reducers'; import {getCard} from 'components/cards/utils'; -const initialState = { +const initialState: any = { query: null, cards: [], cardsById: {}, @@ -36,7 +36,7 @@ export default function cardReducer(state: any = initialState, action: any) { switch (action.type) { case SELECT_CARD: { - const defaultCard = { + const defaultCard: any = { label: '', type: '', config: {}, @@ -53,7 +53,7 @@ export default function cardReducer(state: any = initialState, action: any) { case EDIT_CARD: { const target = action.event.target; const field = target.name; - let card = {...state.cardToEdit}; + let card: any = {...state.cardToEdit}; let size = get(getCard(card.type), 'size', 0); if (!card.dashboard) { @@ -93,7 +93,7 @@ export default function cardReducer(state: any = initialState, action: any) { } case NEW_CARD: { - const cardToEdit = { + const cardToEdit: any = { label: '', type: '', config: {}, diff --git a/assets/companies/components/CompaniesApp.tsx b/assets/companies/components/CompaniesApp.tsx index 939ce8cb6..b72d1d7d7 100644 --- a/assets/companies/components/CompaniesApp.tsx +++ b/assets/companies/components/CompaniesApp.tsx @@ -72,7 +72,7 @@ const mapStateToProps = (state: any) => ({ companyToEdit: state.companyToEdit, }); -const mapDispatchToProps = { +const mapDispatchToProps: any = { newCompany: newCompany, fetchCompanies: fetchCompanies, setQuery: setSearchQuery, diff --git a/assets/companies/components/CompanyList.tsx b/assets/companies/components/CompanyList.tsx index ba00c7c5a..4c012d0d6 100644 --- a/assets/companies/components/CompanyList.tsx +++ b/assets/companies/components/CompanyList.tsx @@ -65,7 +65,7 @@ const mapStateToProps = (state: any) => ({ showSubscriberId: companiesSubscriberIdEnabled(state), }); -const mapDispatchToProps = { +const mapDispatchToProps: any = { selectCompany: selectCompany, }; diff --git a/assets/companies/components/EditCompany.tsx b/assets/companies/components/EditCompany.tsx index 4feb62321..9a5dbfb48 100644 --- a/assets/companies/components/EditCompany.tsx +++ b/assets/companies/components/EditCompany.tsx @@ -70,7 +70,7 @@ class EditCompany extends React.Component { isFormValid() { let valid = true; - let errors = {}; + let errors: any = {}; if (!this.props.company.name) { errors.name = [gettext('Please provide company name')]; diff --git a/assets/companies/reducers.ts b/assets/companies/reducers.ts index 31ae20e00..da34c0e2d 100644 --- a/assets/companies/reducers.ts +++ b/assets/companies/reducers.ts @@ -19,7 +19,7 @@ import {ADD_EDIT_USERS} from 'actions'; import {searchReducer} from 'search/reducers'; -const initialState = { +const initialState: any = { query: null, companies: [], companiesById: {}, @@ -35,7 +35,7 @@ const initialState = { }; function setupCompanies(companyList: any, state: any) { - const companiesById = {}; + const companiesById: any = {}; const companyOptions = []; const companies = companyList.map((company) => { companiesById[company._id] = company; @@ -57,7 +57,7 @@ export default function companyReducer(state: any = initialState, action: any) { switch (action.type) { case SELECT_COMPANY: { - const defaultCompany = { + const defaultCompany: any = { is_enabled: true, _id: null, name: '', @@ -153,7 +153,7 @@ export default function companyReducer(state: any = initialState, action: any) { company: '', }; - const newCompany = { + const newCompany: any = { name: '', sd_subscriber_id: '', account_manager: '', @@ -191,7 +191,7 @@ export default function companyReducer(state: any = initialState, action: any) { return {...state, products: action.data}; case INIT_VIEW_DATA: { - const nextState = { + const nextState: any = { ...state, services: action.data.services, products: action.data.products, diff --git a/assets/company-admin/components/CompanyAdminApp.tsx b/assets/company-admin/components/CompanyAdminApp.tsx index bbe77c1c4..210ed8410 100644 --- a/assets/company-admin/components/CompanyAdminApp.tsx +++ b/assets/company-admin/components/CompanyAdminApp.tsx @@ -57,7 +57,7 @@ class CompanyAdminAppComponent extends React.Component { isFormValid() { let valid = true; - let errors = {}; + let errors: any = {}; if (!this.props.userToEdit.email) { errors.email = [gettext('Please provide email')]; diff --git a/assets/company-admin/reducers.ts b/assets/company-admin/reducers.ts index 5a6f50706..b21377db9 100644 --- a/assets/company-admin/reducers.ts +++ b/assets/company-admin/reducers.ts @@ -5,7 +5,7 @@ import {modalReducer} from 'reducers'; import {searchReducer} from 'search/reducers'; import userReducer from 'users/reducers'; -const initialState = { +const initialState: any = { user: null, query: null, users: [], diff --git a/assets/company-reports/actions.ts b/assets/company-reports/actions.ts index d518fc083..ffd5fda6c 100644 --- a/assets/company-reports/actions.ts +++ b/assets/company-reports/actions.ts @@ -16,7 +16,7 @@ export const REPORTS_NAMES = { }; -export const REPORTS = { +export const REPORTS: any = { [REPORTS_NAMES.COMPANY_SAVED_SEARCHES]: '/reports/company-saved-searches', [REPORTS_NAMES.USER_SAVED_SEARCHES]: '/reports/user-saved-searches', [REPORTS_NAMES.COMPANY_PRODUCTS]: '/reports/company-products', diff --git a/assets/company-reports/components/CompanyReportsApp.tsx b/assets/company-reports/components/CompanyReportsApp.tsx index dc20519c5..3b98b60d8 100644 --- a/assets/company-reports/components/CompanyReportsApp.tsx +++ b/assets/company-reports/components/CompanyReportsApp.tsx @@ -103,7 +103,7 @@ const mapStateToProps = (state: any) => ({ products: state.products, }); -const mapDispatchToProps = { +const mapDispatchToProps: any = { setActiveReport, runReport, printReport, diff --git a/assets/company-reports/components/ContentActivity.tsx b/assets/company-reports/components/ContentActivity.tsx index b4e89ea9c..8e62a1714 100644 --- a/assets/company-reports/components/ContentActivity.tsx +++ b/assets/company-reports/components/ContentActivity.tsx @@ -323,7 +323,7 @@ const mapStateToProps = (state: any) => ({ aggregations: state.reportAggregations, }); -const mapDispatchToProps = { +const mapDispatchToProps: any = { toggleFilter, fetchReport, runReport, diff --git a/assets/company-reports/components/ProductCompanies.tsx b/assets/company-reports/components/ProductCompanies.tsx index 076c7f956..8a3b42b94 100644 --- a/assets/company-reports/components/ProductCompanies.tsx +++ b/assets/company-reports/components/ProductCompanies.tsx @@ -105,6 +105,6 @@ const mapStateToProps = (state: any) => ({ isLoading: state.isLoading, }); -const mapDispatchToProps = {toggleFilterAndQuery, runReport}; +const mapDispatchToProps: any = {toggleFilterAndQuery, runReport}; export default connect(mapStateToProps, mapDispatchToProps)(ProductCompanies); diff --git a/assets/company-reports/components/SubscriberActivity.tsx b/assets/company-reports/components/SubscriberActivity.tsx index 27773802a..56cc30f98 100644 --- a/assets/company-reports/components/SubscriberActivity.tsx +++ b/assets/company-reports/components/SubscriberActivity.tsx @@ -220,6 +220,6 @@ const mapStateToProps = (state: any) => ({ sections: state.sections, }); -const mapDispatchToProps = {toggleFilterAndQuery, fetchReport, runReport}; +const mapDispatchToProps: any = {toggleFilterAndQuery, fetchReport, runReport}; export default connect(mapStateToProps, mapDispatchToProps)(SubscriberActivity); diff --git a/assets/company-reports/reducers.ts b/assets/company-reports/reducers.ts index e2216dde2..98a68d796 100644 --- a/assets/company-reports/reducers.ts +++ b/assets/company-reports/reducers.ts @@ -13,7 +13,7 @@ import { GET_PRODUCTS, } from './actions'; -const initialState = { +const initialState: any = { isLoading: false, activeReport: null, results: [], @@ -97,7 +97,7 @@ export default function companyReportReducer(state: any = initialState, action: }; case GET_PRODUCTS: - return {...state, products: action.data}; + return {...state, products: action.data}; case 'RECEIVE_REPORT_AGGREGATIONS': return { diff --git a/assets/company-reports/utils.ts b/assets/company-reports/utils.ts index 6ac2de778..ead2a379a 100644 --- a/assets/company-reports/utils.ts +++ b/assets/company-reports/utils.ts @@ -10,7 +10,7 @@ import ProductCompanies from './components/ProductCompanies'; import ExpiredCompanies from './components/ExpiredCompanies'; import {REPORTS_NAMES} from './actions'; -export const panels = { +export const panels: any = { [REPORTS_NAMES.COMPANY_SAVED_SEARCHES]: CompanySavedSearches, [REPORTS_NAMES.USER_SAVED_SEARCHES]: UserSavedSearches, [REPORTS_NAMES.COMPANY_PRODUCTS]: CompanyProducts, diff --git a/assets/components/EditPanel.tsx b/assets/components/EditPanel.tsx index 74d9243eb..45c293dd0 100644 --- a/assets/components/EditPanel.tsx +++ b/assets/components/EditPanel.tsx @@ -22,7 +22,7 @@ class EditPanel extends React.Component { } toggleSelectAll(availableItems: any, allActive: any) { - let items = {}; + let items: any = {}; if (!allActive) { availableItems.forEach((item) => { @@ -51,7 +51,7 @@ class EditPanel extends React.Component { } initItems(props: any) { - const items = {}; + const items: any = {}; props.items.map((item) => items[item._id] = (props.parent[props.field] || []).includes(item._id)); @@ -69,7 +69,7 @@ class EditPanel extends React.Component { return; } - let items = {}; + let items: any = {}; nextProps.items.map((item) => items[item._id] = (nextProps.parent[nextProps.field] || []).includes(item._id)); if (!isEqual(this.state.items, items)) { diff --git a/assets/components/Modal.tsx b/assets/components/Modal.tsx index aca917066..a44496b9b 100644 --- a/assets/components/Modal.tsx +++ b/assets/components/Modal.tsx @@ -82,7 +82,7 @@ class Modal extends React.Component { } componentDidMount() { - const options = {}; + const options: any = {}; if (!this.props.clickOutsideToClose) { options.backdrop = 'static'; diff --git a/assets/features/dashboard/DashboardSwitch.tsx b/assets/features/dashboard/DashboardSwitch.tsx index 9cf83ee1c..651c4ef46 100644 --- a/assets/features/dashboard/DashboardSwitch.tsx +++ b/assets/features/dashboard/DashboardSwitch.tsx @@ -31,7 +31,7 @@ DashboardSwitch.propTypes = { selectDashboard: PropTypes.func.isRequired, }; -const mapDispatchToProps = { +const mapDispatchToProps: any = { selectDashboard, }; diff --git a/assets/features/sections/SectionSwitch.tsx b/assets/features/sections/SectionSwitch.tsx index 2bbf3ebab..41585a22d 100644 --- a/assets/features/sections/SectionSwitch.tsx +++ b/assets/features/sections/SectionSwitch.tsx @@ -26,7 +26,7 @@ SectionSwitch.propTypes = { selectSection: PropTypes.func.isRequired, }; -const mapDispatchToProps = { +const mapDispatchToProps: any = { selectSection, }; diff --git a/assets/general-settings/components/GeneralSettingsApp.tsx b/assets/general-settings/components/GeneralSettingsApp.tsx index 0fce9310a..bd149781a 100644 --- a/assets/general-settings/components/GeneralSettingsApp.tsx +++ b/assets/general-settings/components/GeneralSettingsApp.tsx @@ -48,12 +48,12 @@ class GeneralSettingsApp extends React.Component { } onChange(key: any, val: any) { - const values = {...this.state.values, [key]: val}; + const values: any = {...this.state.values, [key]: val}; this.setState({values}); } onBooleanChange(key: any) { - const values = {...this.state.values, [key]: !this.state.values[key]}; + const values: any = {...this.state.values, [key]: !this.state.values[key]}; this.setState({values}); } @@ -93,7 +93,7 @@ class GeneralSettingsApp extends React.Component { } return null; }); - const audit = { + const audit: any = { '_updated': this.props.updatedTime, 'version_creator': this.props.versionCreator }; @@ -130,7 +130,7 @@ const mapStateToProps = (state: any) => ({ versionCreator: state.version_creator, }); -const mapDispatchToProps = { +const mapDispatchToProps: any = { save, }; diff --git a/assets/general-settings/reducers.ts b/assets/general-settings/reducers.ts index 011487019..a6a5e3c5d 100644 --- a/assets/general-settings/reducers.ts +++ b/assets/general-settings/reducers.ts @@ -4,7 +4,7 @@ import { UPDATE_VALUES, } from './actions'; -const initialState = { +const initialState: any = { config: {}, }; @@ -18,7 +18,7 @@ export default function settingsReducer(state: any = initialState, action: any) _updated: action.data._updated, version_creator: action.data.version_creator, }; - + case UPDATE_VALUES: { let config = Object.assign({}, state.config); Object.keys(action.data.values).forEach((key) => { diff --git a/assets/home/components/HomeApp.tsx b/assets/home/components/HomeApp.tsx index de9e191cc..12ba13557 100644 --- a/assets/home/components/HomeApp.tsx +++ b/assets/home/components/HomeApp.tsx @@ -21,7 +21,7 @@ import {previewConfigSelector, listConfigSelector, detailsConfigSelector, isSear import {filterGroupsToLabelMap} from 'search/selectors'; import CardRow from 'components/cards/render/CardRow'; -const modals = { +const modals: any = { shareItem: ShareItemModal, downloadItems: DownloadItemsModal, }; diff --git a/assets/home/reducers.ts b/assets/home/reducers.ts index 693a5253e..93a843c7c 100644 --- a/assets/home/reducers.ts +++ b/assets/home/reducers.ts @@ -11,7 +11,7 @@ import {CLOSE_MODAL, MODAL_FORM_VALID, RENDER_MODAL} from '../actions'; import {modalReducer} from '../reducers'; import {topicsReducer} from '../topics/reducer'; -const initialState = { +const initialState: any = { cards: [], topics: [], products: [], diff --git a/assets/local-store.ts b/assets/local-store.ts index 3553f4d60..76ccebcfa 100644 --- a/assets/local-store.ts +++ b/assets/local-store.ts @@ -101,7 +101,7 @@ export function getFilterPanelOpenState(context: any) { } export function setFilterPanelOpenState(open: any, context: any) { - const filterTabs = {...store.get(FILTER_PANEL_OPEN) || {}}; + const filterTabs: any = {...store.get(FILTER_PANEL_OPEN) || {}}; filterTabs[context] = open; store.assign(FILTER_PANEL_OPEN, filterTabs); @@ -123,7 +123,7 @@ export function getActiveFilterTab(context: any) { * */ export function setActiveFilterTab(tab: any, context: any) { - let filterTabs = {...store.get(FILTER_TAB) || {}}; + let filterTabs: any = {...store.get(FILTER_TAB) || {}}; filterTabs[context] = tab; store.assign(FILTER_TAB, filterTabs); } diff --git a/assets/market-place/reducers.ts b/assets/market-place/reducers.ts index c27a915e6..5dfd92a38 100644 --- a/assets/market-place/reducers.ts +++ b/assets/market-place/reducers.ts @@ -3,7 +3,7 @@ import {get, keyBy} from 'lodash'; import {INIT_DATA} from './actions'; import {getNavigationUrlParam} from 'search/utils'; -const initialState = { +const initialState: any = { cards: [], navigations: [] }; diff --git a/assets/monitoring/components/MonitoringApp.tsx b/assets/monitoring/components/MonitoringApp.tsx index 45ee4d56f..28670e31f 100644 --- a/assets/monitoring/components/MonitoringApp.tsx +++ b/assets/monitoring/components/MonitoringApp.tsx @@ -138,7 +138,7 @@ MonitoringApp.propTypes = { fetchMonitoring: PropTypes.func, }; -const mapDispatchToProps = { +const mapDispatchToProps: any = { newMonitoringProfile, setQuery, fetchMonitoring, diff --git a/assets/monitoring/components/MonitoringPanel.tsx b/assets/monitoring/components/MonitoringPanel.tsx index 71a630dce..1d6a069c3 100644 --- a/assets/monitoring/components/MonitoringPanel.tsx +++ b/assets/monitoring/components/MonitoringPanel.tsx @@ -29,7 +29,7 @@ class MonitoringPanel extends React.Component { isFormValid() { let valid = true; - let errors = {}; + let errors: any = {}; const wl = this.props.monitoringProfileToEdit; if (!wl.name) { diff --git a/assets/monitoring/reducers.ts b/assets/monitoring/reducers.ts index 04bd941d7..8c1da28e8 100644 --- a/assets/monitoring/reducers.ts +++ b/assets/monitoring/reducers.ts @@ -17,7 +17,7 @@ import { import {GET_COMPANY_USERS} from 'companies/actions'; import {ADD_EDIT_USERS} from 'actions'; -const initialState = { +const initialState: any = { companies: [], monitoringList: [], monitoringListById: null, @@ -37,7 +37,7 @@ export default function monitoringReducer(state: any = initialState, action: any }; case SET_COMPANIES: { - const companiesById = {}; + const companiesById: any = {}; action.data.map((company) => companiesById[company._id] = company); return {...state, companies: action.data, companiesById}; @@ -123,8 +123,8 @@ export default function monitoringReducer(state: any = initialState, action: any scheduleMode: !state.scheduleMode, }; - case SET_USER_COMPANY_MONITORING_LIST: - return {...state, monitoringList: action.data}; + case SET_USER_COMPANY_MONITORING_LIST: + return {...state, monitoringList: action.data}; case ADD_EDIT_USERS: { return { diff --git a/assets/navigations/components/Navigations.tsx b/assets/navigations/components/Navigations.tsx index 838a4a0f8..d9d5bf805 100644 --- a/assets/navigations/components/Navigations.tsx +++ b/assets/navigations/components/Navigations.tsx @@ -35,7 +35,7 @@ class Navigations extends React.Component { isFormValid() { let valid = true; - let errors = {}; + let errors: any = {}; if (!this.props.navigationToEdit.name) { errors.name = [gettext('Please provide navigation name')]; @@ -65,7 +65,7 @@ class Navigations extends React.Component { } render() { - const progressStyle = {width: '25%'}; + const progressStyle: any = {width: '25%'}; const sectionFilter = (navigation: any) => !this.props.activeSection || get(navigation, 'product_type', 'wire') === this.props.activeSection; return ( diff --git a/assets/navigations/components/NavigationsApp.tsx b/assets/navigations/components/NavigationsApp.tsx index 7b9b5b86f..d608d2775 100644 --- a/assets/navigations/components/NavigationsApp.tsx +++ b/assets/navigations/components/NavigationsApp.tsx @@ -55,7 +55,7 @@ const mapStateToProps = (state: any) => ({ activeSection: activeSectionSelector(state), }); -const mapDispatchToProps = { +const mapDispatchToProps: any = { newNavigation, fetchNavigations, setQuery: setSearchQuery, diff --git a/assets/navigations/reducers.tsx b/assets/navigations/reducers.tsx index 1d7664c7f..d89c8be74 100644 --- a/assets/navigations/reducers.tsx +++ b/assets/navigations/reducers.tsx @@ -19,7 +19,7 @@ import {sectionsReducer} from 'features/sections/reducers'; import {searchReducer} from 'search/reducers'; import {ADD_EDIT_USERS} from 'actions'; -const initialState = { +const initialState: any = { query: null, navigations: [], navigationsById: {}, @@ -36,7 +36,7 @@ export default function navigationReducer(state: any = initialState, action: any switch (action.type) { case SELECT_NAVIGATION: { - const defaultNavigation = { + const defaultNavigation: any = { is_enabled: true, name: '', description: '', @@ -73,7 +73,7 @@ export default function navigationReducer(state: any = initialState, action: any } case NEW_NAVIGATION: { - const navigationToEdit = { + const navigationToEdit: any = { is_enabled: true, name: '', description: '', diff --git a/assets/navigations/utils.ts b/assets/navigations/utils.ts index aaa6e2bf5..6a01abc82 100644 --- a/assets/navigations/utils.ts +++ b/assets/navigations/utils.ts @@ -9,7 +9,7 @@ export function getProductTypes(navigation, products) { return ''; } - const productTypes = {}; + const productTypes: any = {}; products.filter((product) => (product.navigations || []).includes(navigation._id)).forEach((p) => p.product_type ? productTypes[p.product_type] = 1 : productTypes['wire'] = 1 ); diff --git a/assets/notifications/reducers.ts b/assets/notifications/reducers.ts index 570e1752d..c8b8cceae 100644 --- a/assets/notifications/reducers.ts +++ b/assets/notifications/reducers.ts @@ -7,7 +7,7 @@ import { CLEAR_ALL_NOTIFICATIONS, } from './actions'; -const initialState = { +const initialState: any = { user: null, items: {}, notifications: [], diff --git a/assets/oauth_clients/components/Clients.tsx b/assets/oauth_clients/components/Clients.tsx index 29d35d155..751d14b63 100644 --- a/assets/oauth_clients/components/Clients.tsx +++ b/assets/oauth_clients/components/Clients.tsx @@ -29,7 +29,7 @@ class Clients extends React.Component { isFormValid() { let valid = true; - let errors = {}; + let errors: any = {}; if (!this.props.clientToEdit.name) { errors.name = [gettext('Please provide client name')]; @@ -61,7 +61,7 @@ class Clients extends React.Component { } render() { - const progressStyle = {width: '25%'}; + const progressStyle: any = {width: '25%'}; const originalClientEdited = !get(this.props, 'clientToEdit._id') ? this.props.clientToEdit : this.props.clientsById[this.props.clientToEdit._id]; return ( diff --git a/assets/oauth_clients/components/ClientsApp.tsx b/assets/oauth_clients/components/ClientsApp.tsx index 9ef06a053..cc1afb7d7 100644 --- a/assets/oauth_clients/components/ClientsApp.tsx +++ b/assets/oauth_clients/components/ClientsApp.tsx @@ -50,7 +50,7 @@ ClientsApp.propTypes = { }; -const mapDispatchToProps = { +const mapDispatchToProps: any = { newClient, fetchClients, setQuery: setSearchQuery, diff --git a/assets/oauth_clients/reducers.ts b/assets/oauth_clients/reducers.ts index 9766c09a7..7def71b1b 100644 --- a/assets/oauth_clients/reducers.ts +++ b/assets/oauth_clients/reducers.ts @@ -11,7 +11,7 @@ import { import {searchReducer} from 'search/reducers'; -const initialState = { +const initialState: any = { query: null, clients: [], clientsById: {}, @@ -21,7 +21,7 @@ const initialState = { }; function setupClients(clientList: any, state: any) { - const clientsById = {}; + const clientsById: any = {}; const clients = clientList.map((client) => { clientsById[client._id] = client; return client._id; @@ -38,7 +38,7 @@ export default function clientReducer(state: any = initialState, action: any) { switch (action.type) { case SELECT_CLIENT: { - const defaultClient = { + const defaultClient: any = { name: '', }; @@ -87,7 +87,7 @@ export default function clientReducer(state: any = initialState, action: any) { } case INIT_VIEW_DATA: { - const nextState = { + const nextState: any = { ...state, products: action.data.products, sections: action.data.sections, @@ -107,5 +107,5 @@ export default function clientReducer(state: any = initialState, action: any) { return state; } - } + } } diff --git a/assets/products/components/Products.tsx b/assets/products/components/Products.tsx index 141ca8d66..2a902feea 100644 --- a/assets/products/components/Products.tsx +++ b/assets/products/components/Products.tsx @@ -39,7 +39,7 @@ class Products extends React.Component { isFormValid() { let valid = true; - let errors = {}; + let errors: any = {}; if (!this.props.productToEdit.name) { errors.name = [gettext('Please provide product name')]; @@ -69,7 +69,7 @@ class Products extends React.Component { } render() { - const progressStyle = {width: '25%'}; + const progressStyle: any = {width: '25%'}; const sectionFilter = (product: any) => !this.props.activeSection || get(product, 'product_type', 'wire') === this.props.activeSection; const getActiveSection = () => this.props.sections.filter(s => s._id === this.props.activeSection); diff --git a/assets/products/components/ProductsApp.tsx b/assets/products/components/ProductsApp.tsx index 349fcb432..3b9f2635e 100644 --- a/assets/products/components/ProductsApp.tsx +++ b/assets/products/components/ProductsApp.tsx @@ -54,7 +54,7 @@ const mapStateToProps = (state: any) => ({ activeSection: activeSectionSelector(state), }); -const mapDispatchToProps = { +const mapDispatchToProps: any = { fetchProducts, setQuery: setSearchQuery, newProduct, diff --git a/assets/products/reducers.ts b/assets/products/reducers.ts index ea91d2fd8..00b13bcea 100644 --- a/assets/products/reducers.ts +++ b/assets/products/reducers.ts @@ -16,7 +16,7 @@ import {INIT_SECTIONS, SELECT_SECTION} from 'features/sections/actions'; import {sectionsReducer} from 'features/sections/reducers'; import {searchReducer} from 'search/reducers'; -const initialState = { +const initialState: any = { query: null, products: [], productsById: {}, @@ -34,7 +34,7 @@ export default function productReducer(state: any = initialState, action: any) { switch (action.type) { case SELECT_PRODUCT: { - const defaultProduct = { + const defaultProduct: any = { is_enabled: true, name: '', description: '', @@ -57,7 +57,7 @@ export default function productReducer(state: any = initialState, action: any) { } case NEW_PRODUCT: { - const productToEdit = { + const productToEdit: any = { is_enabled: true, name: '', description: '', @@ -98,14 +98,14 @@ export default function productReducer(state: any = initialState, action: any) { } case GET_COMPANIES: { - const companiesById = {}; + const companiesById: any = {}; action.data.map((company) => companiesById[company._id] = company); return {...state, companies: action.data, companiesById}; } case GET_NAVIGATIONS: { - const navigationsById = {}; + const navigationsById: any = {}; action.data.map((navigation) => navigationsById[navigation._id] = navigation); return {...state, navigations: action.data, navigationsById}; diff --git a/assets/reducers.ts b/assets/reducers.ts index dbea74049..b81b89859 100644 --- a/assets/reducers.ts +++ b/assets/reducers.ts @@ -105,7 +105,7 @@ export function defaultReducer(state: any = {}, action: any) { switch (action.type) { case SET_ITEMS: { - const itemsById = {}; + const itemsById: any = {}; const items = []; action.items.forEach((item) => { diff --git a/assets/search/actions.ts b/assets/search/actions.ts index 052405382..7434a8f64 100644 --- a/assets/search/actions.ts +++ b/assets/search/actions.ts @@ -467,7 +467,7 @@ export function setParams(params: any) { */ export function initParams(params: any) { return (dispatch: any, getState: any) => { - const custom = { + const custom: any = { query: params.get('q'), created: params.get('created') ? JSON.parse(params.get('created')) : null, navigation: params.get('navigation') ? JSON.parse(params.get('navigation')) : null, @@ -475,7 +475,7 @@ export function initParams(params: any) { product: params.get('product'), advanced: params.get('advanced') ? JSON.parse(params.get('advanced')) : null, }; - let topic = {}; + let topic: any = {}; if (params.get('topic')) { dispatch(setSearchTopicId(params.get('topic'))); diff --git a/assets/search/components/ContentSearchResults.tsx b/assets/search/components/ContentSearchResults.tsx index 36688f5b3..acea5877c 100644 --- a/assets/search/components/ContentSearchResults.tsx +++ b/assets/search/components/ContentSearchResults.tsx @@ -75,7 +75,7 @@ class ContentSearchResultsComponent extends React.Component { this.props.fetchItems(); } else if (tag.type === 'created') { // toggle created - const params = {...tag.params}; + const params: any = {...tag.params}; switch (tag.key) { case 'published_relative': @@ -224,7 +224,7 @@ const mapStateToProps = (state: any) => ({ currentTopic: activeTopicSelector(state), }); -const mapDispatchToProps = { +const mapDispatchToProps: any = { toggleNavigation, toggleFilter, setCreatedFilter, diff --git a/assets/search/components/MonitoringEditor.tsx b/assets/search/components/MonitoringEditor.tsx index 1cfbaa8a3..78295bc79 100644 --- a/assets/search/components/MonitoringEditor.tsx +++ b/assets/search/components/MonitoringEditor.tsx @@ -112,7 +112,7 @@ class MonitoringEditor extends React.Component { return null; } - const propsToFields = { + const propsToFields: any = { 'onChange': this.onChange, 'readOnly': !isAdmin, }; diff --git a/assets/search/selectors.ts b/assets/search/selectors.ts index 64ffbe046..2cd8f905a 100644 --- a/assets/search/selectors.ts +++ b/assets/search/selectors.ts @@ -57,7 +57,7 @@ export const resultsFilteredSelector = (state: any) => state.resultsFiltered; export const searchParamsSelector = createSelector( [searchQuerySelector, searchCreatedSelector, searchNavigationSelector, searchFilterSelector, searchProductSelector, advancedSearchParamsSelector], (query: any, created: any, navigation: any, filter: any, product: any, advancedSearchParams: any) => { - const params = {}; + const params: any = {}; if (!isEmpty(query)) { params.query = query; diff --git a/assets/search/utils.ts b/assets/search/utils.ts index 33a9ea9dc..4f35bd9f3 100644 --- a/assets/search/utils.ts +++ b/assets/search/utils.ts @@ -15,7 +15,7 @@ export const getNavigationUrlParam = (activeNavigation: any, ignoreEmpty: any = }; export const getSearchParams = (custom: any, topic: any) => { - const params = {}; + const params: any = {}; ['query', 'created', 'navigation', 'filter', 'product', 'advanced'].forEach( (field: any) => { diff --git a/assets/section-filters/components/SectionFilters.tsx b/assets/section-filters/components/SectionFilters.tsx index ff8b0433f..cf8f897f3 100644 --- a/assets/section-filters/components/SectionFilters.tsx +++ b/assets/section-filters/components/SectionFilters.tsx @@ -34,7 +34,7 @@ class SectionFilters extends React.Component { isFormValid() { let valid = true; - let errors = {}; + let errors: any = {}; if (!this.props.sectionFilterToEdit.name) { errors.name = [gettext('Please provide Section Filter name')]; @@ -64,7 +64,7 @@ class SectionFilters extends React.Component { } render() { - const progressStyle = {width: '25%'}; + const progressStyle: any = {width: '25%'}; const sectionFilter = (sectionFilter: any) => !this.props.activeSection || get(sectionFilter, 'filter_type', 'wire') === this.props.activeSection; const getActiveSection = () => this.props.sections.filter(s => s._id === this.props.activeSection); diff --git a/assets/section-filters/components/SectionFiltersApp.tsx b/assets/section-filters/components/SectionFiltersApp.tsx index 9ff1d35a4..e40455801 100644 --- a/assets/section-filters/components/SectionFiltersApp.tsx +++ b/assets/section-filters/components/SectionFiltersApp.tsx @@ -58,7 +58,7 @@ const mapStateToProps = (state: any) => ({ activeSection: activeSectionSelector(state), }); -const mapDispatchToProps = { +const mapDispatchToProps: any = { fetchSectionFilters, setQuery: setSearchQuery, newSectionFilter, diff --git a/assets/section-filters/reducers.ts b/assets/section-filters/reducers.ts index 4c18ec350..9b08dc72d 100644 --- a/assets/section-filters/reducers.ts +++ b/assets/section-filters/reducers.ts @@ -13,7 +13,7 @@ import {INIT_SECTIONS, SELECT_SECTION} from 'features/sections/actions'; import {sectionsReducer} from 'features/sections/reducers'; import {searchReducer} from 'search/reducers'; -const initialState = { +const initialState: any = { query: null, sectionFilters: [], sectionFiltersById: {}, @@ -29,7 +29,7 @@ export default function sectionFiltersReducer(state: any = initialState, action: switch (action.type) { case SELECT_SECTION_FILTER: { - const defaultSectionFilter = { + const defaultSectionFilter: any = { is_enabled: true, name: '', description: '', @@ -52,7 +52,7 @@ export default function sectionFiltersReducer(state: any = initialState, action: } case NEW_SECTION_FILTER: { - const sectionFilterToEdit = { + const sectionFilterToEdit: any = { is_enabled: true, name: '', description: '', diff --git a/assets/tests/TextInput.spec.tsx b/assets/tests/TextInput.spec.tsx index 599251bd0..62b7d1864 100644 --- a/assets/tests/TextInput.spec.tsx +++ b/assets/tests/TextInput.spec.tsx @@ -9,7 +9,7 @@ import 'tests/setup'; function setup(errorStrings: any) { const handleChange = spy(); - const props = { + const props: any = { name: 'test-ctr', label: 'test label', onChange: handleChange, diff --git a/assets/user-profile/actions.ts b/assets/user-profile/actions.ts index ee3e911ed..ed4523f11 100644 --- a/assets/user-profile/actions.ts +++ b/assets/user-profile/actions.ts @@ -95,7 +95,7 @@ export function fetchUser(id: any) { export function saveUser() { return function (dispatch, getState) { - const editedUser = {...getState().editedUser}; + const editedUser: any = {...getState().editedUser}; const url = `/users/${editedUser._id}/profile`; // Remove ``sections`` and ``products`` as these aren't managed in the ``UserProfile`` app diff --git a/assets/user-profile/components/UserProfileApp.tsx b/assets/user-profile/components/UserProfileApp.tsx index 4e4ebf118..138a7e77d 100644 --- a/assets/user-profile/components/UserProfileApp.tsx +++ b/assets/user-profile/components/UserProfileApp.tsx @@ -27,7 +27,7 @@ import ProfileToggle from './ProfileToggle'; import '../style'; -const modals = {shareItem: ShareItemModal}; +const modals: any = {shareItem: ShareItemModal}; class UserProfileApp extends React.Component { constructor(props: any, context: any) { diff --git a/assets/user-profile/components/profile/UserProfile.tsx b/assets/user-profile/components/profile/UserProfile.tsx index 5e966f69d..b47be662f 100644 --- a/assets/user-profile/components/profile/UserProfile.tsx +++ b/assets/user-profile/components/profile/UserProfile.tsx @@ -23,7 +23,7 @@ class UserProfile extends React.Component { isFormValid() { let valid = true; - let errors = {}; + let errors: any = {}; if (!this.props.user.first_name) { errors.first_name = [gettext('Please provide first name')]; diff --git a/assets/user-profile/reducers.ts b/assets/user-profile/reducers.ts index d7a0753e9..b7d7d1e0b 100644 --- a/assets/user-profile/reducers.ts +++ b/assets/user-profile/reducers.ts @@ -18,7 +18,7 @@ import {modalReducer} from 'reducers'; import {GET_NAVIGATIONS, QUERY_NAVIGATIONS} from 'navigations/actions'; import {SET_TOPICS} from '../search/actions'; -const initialState = { +const initialState: any = { user: null, editedUser: null, company: null, diff --git a/assets/users/actions.ts b/assets/users/actions.ts index 40652af5f..a6f5d377a 100644 --- a/assets/users/actions.ts +++ b/assets/users/actions.ts @@ -83,7 +83,7 @@ export function fetchUsers() { dispatch(queryUsers()); const state = getState(); const query = searchQuerySelector(state) || ''; - const filterQuery = {}; + const filterQuery: any = {}; if (state.company && state.company !== '') { filterQuery.company = state.company; diff --git a/assets/users/components/Users.tsx b/assets/users/components/Users.tsx index 8f417b8cb..9f798a816 100644 --- a/assets/users/components/Users.tsx +++ b/assets/users/components/Users.tsx @@ -34,7 +34,7 @@ class Users extends React.Component { isFormValid() { let valid = true; - let errors = {}; + let errors: any = {}; if (!this.props.userToEdit.email) { errors.email = [gettext('Please provide email')]; @@ -63,7 +63,7 @@ class Users extends React.Component { } render() { - const progressStyle = {width: '25%'}; + const progressStyle: any = {width: '25%'}; return (
diff --git a/assets/users/components/UsersApp.tsx b/assets/users/components/UsersApp.tsx index 475916a66..f6ab119b5 100644 --- a/assets/users/components/UsersApp.tsx +++ b/assets/users/components/UsersApp.tsx @@ -85,7 +85,7 @@ UsersApp.propTypes = { }; -const mapDispatchToProps = { +const mapDispatchToProps: any = { newUser, fetchUsers, setQuery: setSearchQuery, diff --git a/assets/users/reducers.ts b/assets/users/reducers.ts index b9f93de04..179bd1ad1 100644 --- a/assets/users/reducers.ts +++ b/assets/users/reducers.ts @@ -19,7 +19,7 @@ import {ADD_EDIT_USERS} from 'actions'; import {searchReducer} from 'search/reducers'; -const initialState = { +const initialState: any = { user: null, query: null, users: [], @@ -46,7 +46,7 @@ export default function userReducer(state: any = initialState, action: any) { products: action.data.products, }; case SELECT_USER: { - const defaultUser = { + const defaultUser: any = { user_type: 'public', is_approved: true, is_enabled: true, @@ -78,7 +78,7 @@ export default function userReducer(state: any = initialState, action: any) { case EDIT_USER: { const target = action.event.target; const field = target.name; - let user = {...state.userToEdit}; + let user: any = {...state.userToEdit}; const value = target.type === 'checkbox' ? target.checked : target.value; if (field.startsWith('sections.')) { @@ -173,7 +173,7 @@ export default function userReducer(state: any = initialState, action: any) { } case GET_COMPANIES: { - const companiesById = {}; + const companiesById: any = {}; action.data.map((company) => companiesById[company._id] = company); return {...state, companies: action.data, companiesById}; diff --git a/assets/wire/actions.ts b/assets/wire/actions.ts index 1b39b1b8d..66dfe8538 100644 --- a/assets/wire/actions.ts +++ b/assets/wire/actions.ts @@ -215,7 +215,7 @@ export function search(state: any, next?: any, aggs?: any) { const searchAllVersions = !!get(state, 'wire.searchAllVersions'); const context = get(state, 'context', 'wire'); - const params = { + const params: any = { q: !searchParams.query ? null : encodeURIComponent(searchParams.query), bookmarks: state.bookmarks ? state.user : null, navigation: getNavigationUrlParam(searchParams.navigation, true, false), diff --git a/assets/wire/components/PreviewTagsSubjects.tsx b/assets/wire/components/PreviewTagsSubjects.tsx index b55d20d2f..d7ffa202a 100644 --- a/assets/wire/components/PreviewTagsSubjects.tsx +++ b/assets/wire/components/PreviewTagsSubjects.tsx @@ -15,7 +15,7 @@ function PreviewTagsSubjectsComponent({subjects, displayConfig, urlPrefix, filte return null; } - const subjectsByScheme = {subject: []}; + const subjectsByScheme: any = {subject: []}; const filterGroupSchemes = Object.keys(filterGroupLabels); subjects.forEach((subject) => { diff --git a/assets/wire/components/SelectedItemsBar.tsx b/assets/wire/components/SelectedItemsBar.tsx index 78313e15a..890605544 100644 --- a/assets/wire/components/SelectedItemsBar.tsx +++ b/assets/wire/components/SelectedItemsBar.tsx @@ -72,7 +72,7 @@ const mapStateToProps = (state: any) => ({ selectedItems: state.selectedItems, }); -const mapDispatchToProps = { +const mapDispatchToProps: any = { selectAll, selectNone, }; diff --git a/assets/wire/components/WireApp.tsx b/assets/wire/components/WireApp.tsx index 23891a3f7..c15a6c2d8 100644 --- a/assets/wire/components/WireApp.tsx +++ b/assets/wire/components/WireApp.tsx @@ -60,7 +60,7 @@ import { advancedSearchTabsConfigSelector, } from 'ui/selectors'; -const modals = { +const modals: any = { shareItem: ShareItemModal, downloadItems: DownloadItemsModal, itemStatistics: ItemStatisticsModal, diff --git a/assets/wire/components/filters/FiltersTab.tsx b/assets/wire/components/filters/FiltersTab.tsx index c54fb0b4a..1e3f1f859 100644 --- a/assets/wire/components/filters/FiltersTab.tsx +++ b/assets/wire/components/filters/FiltersTab.tsx @@ -42,7 +42,7 @@ class FiltersTab extends React.Component { } componentDidUpdate(prevProps: any) { - const newState = {}; + const newState: any = {}; if (!isEqual(this.props.activeFilter, prevProps.activeFilter)) { newState.activeFilter = cloneDeep(this.props.activeFilter); } @@ -179,7 +179,7 @@ const mapStateToProps = (state: any) => ({ context: state.context }); -const mapDispatchToProps = { +const mapDispatchToProps: any = { resetFilter, updateFilterStateAndURL, selectDate, diff --git a/assets/wire/components/filters/NavigationTab.tsx b/assets/wire/components/filters/NavigationTab.tsx index ec6f4adc0..42e510723 100644 --- a/assets/wire/components/filters/NavigationTab.tsx +++ b/assets/wire/components/filters/NavigationTab.tsx @@ -58,7 +58,7 @@ NavigationTab.propTypes = { NavigationTab.defaultProps = {addAllOption: true}; -const mapDispatchToProps = { +const mapDispatchToProps: any = { toggleNavigation, }; diff --git a/assets/wire/reducers.ts b/assets/wire/reducers.ts index d9b6588a0..1b325fc08 100644 --- a/assets/wire/reducers.ts +++ b/assets/wire/reducers.ts @@ -13,7 +13,7 @@ import {get, cloneDeep} from 'lodash'; import {defaultReducer} from '../reducers'; import {searchReducer} from 'search/reducers'; -const initialState = { +const initialState: any = { items: [], itemsById: {}, matchedIds: [], diff --git a/assets/wire/tests/WireApp.spec.tsx b/assets/wire/tests/WireApp.spec.tsx index 81c00520a..d41eebb85 100644 --- a/assets/wire/tests/WireApp.spec.tsx +++ b/assets/wire/tests/WireApp.spec.tsx @@ -29,7 +29,7 @@ function getNames(actions: any) { } describe('WireApp', () => { - const state = { + const state: any = { items: [], itemsById: {'foo': {}}, previewItem: 'foo', diff --git a/assets/wire/tests/actions.spec.ts b/assets/wire/tests/actions.spec.ts index d22e00792..fa907a871 100644 --- a/assets/wire/tests/actions.spec.ts +++ b/assets/wire/tests/actions.spec.ts @@ -18,7 +18,7 @@ import {initData} from '../actions'; describe('wire actions', () => { let store: any; - const response = { + const response: any = { _meta: {total: 2}, _items: [{_id: 'foo'}], }; @@ -144,7 +144,7 @@ describe('wire actions', () => { }); it('can fetch item previous versions', () => { - const item = {_id: 'foo'}; + const item: any = {_id: 'foo'}; fetchMock.get(`/wire/${item._id}/versions`, {_items: [{_id: 'bar'}, {_id: 'baz'}]}); return store.dispatch(actions.fetchVersions(item)) @@ -155,8 +155,8 @@ describe('wire actions', () => { }); it('can fetch next item version', () => { - const item = {nextversion: 'bar'}; - const next = {}; + const item: any = {nextversion: 'bar'}; + const next: any = {}; fetchMock.get('/wire/bar?format=json', next); return store.dispatch(actions.fetchNext(item)) diff --git a/assets/wire/tests/utils.spec.ts b/assets/wire/tests/utils.spec.ts index 698623915..af2b274ff 100644 --- a/assets/wire/tests/utils.spec.ts +++ b/assets/wire/tests/utils.spec.ts @@ -14,12 +14,12 @@ describe('utils', () => { }); it('can get picture from body if featured is not set', () => { - const embed = {guid: 'embed', type: 'picture'}; - const item = { + const embed: any = {guid: 'embed', type: 'picture'}; + const item: any = { associations: { embed123: embed, }, }; expect(utils.getPicture(item)).toBe(embed); - }); + }); }); diff --git a/assets/wire/types.ts b/assets/wire/types.ts index dbca14322..955ec7b3c 100644 --- a/assets/wire/types.ts +++ b/assets/wire/types.ts @@ -30,7 +30,7 @@ const previewConfig = PropTypes.shape({ }); -const types = { +const types: any = { user, item, topic, diff --git a/assets/wire/utils.ts b/assets/wire/utils.ts index d0398e801..da14c591d 100644 --- a/assets/wire/utils.ts +++ b/assets/wire/utils.ts @@ -34,8 +34,8 @@ export function getVideos(item: any) { const isMedia = (item: any) => item.type === 'audio' || item.type === 'video'; /** - * - * @param {*} item + * + * @param {*} item */ export function getItemMedia(item: any) { if (isMedia(item)) { @@ -197,7 +197,7 @@ export function getCaption(picture: any) { } export function getActiveQuery(query: any, activeFilter: any, createdFilter: any) { - const queryParams = { + const queryParams: any = { query: query || null, filter: pickBy(activeFilter), created: pickBy(createdFilter), From 9f03a6e7f70492e9a5197eb628a2fe163c700f7c Mon Sep 17 00:00:00 2001 From: Tomas Kikutis Date: Tue, 13 Jun 2023 18:03:26 +0200 Subject: [PATCH 25/71] various fixes --- assets/agenda/actions.ts | 22 +++++++++---------- .../agenda/components/AgendaItemDetails.tsx | 4 ++-- assets/agenda/components/AgendaList.tsx | 15 ++++++++----- assets/agenda/components/AgendaTags.tsx | 2 +- .../monitoring/components/MonitoringApp.tsx | 4 +++- .../navigations/components/NavigationList.tsx | 4 ++-- assets/search/actions.ts | 4 ++-- assets/search/tests/actions.spec.ts | 4 ++-- assets/ui/components/Article.tsx | 1 + 9 files changed, 34 insertions(+), 26 deletions(-) diff --git a/assets/agenda/actions.ts b/assets/agenda/actions.ts index 35de30b02..b5a9889a6 100644 --- a/assets/agenda/actions.ts +++ b/assets/agenda/actions.ts @@ -55,7 +55,7 @@ export function setActive(item: any) { export const PREVIEW_ITEM = 'PREVIEW_ITEM'; -export function preview(item: any, group: any, plan: any) { +export function preview(item: any, group?: any, plan?: any) { return {type: PREVIEW_ITEM, item, group, plan}; } @@ -65,7 +65,7 @@ export function previewAndCopy(item: any) { }; } -export function previewItem(item: any, group: any, plan: any) { +export function previewItem(item?: any, group?: any, plan?: any) { return (dispatch: any, getState: any) => { dispatch(fetchWireItemsForAgenda(item)); markItemAsRead(item, getState()); @@ -202,7 +202,7 @@ export function copyPreviewContents(item: any) { * @param {bool} next * @return {Promise} */ -function search(state: any, next: any) { +function search(state: any, next?: any) { const currentMoment = moment(); const searchParams: any = searchParamsSelector(state); const createdFilter: any = get(searchParams, 'created') || {}; @@ -288,7 +288,7 @@ export function watchEvents(ids: any) { .then(() => { dispatch({type: WATCH_EVENTS, items: ids}); notify.success(gettext('Started watching items successfully.')); - analytics.multiItemEvent('watch', ids.map((_id) => getState().itemsById[_id])); + analytics.multiItemEvent('watch', ids.map((_id: any) => getState().itemsById[_id])); }); }; } @@ -322,7 +322,7 @@ export function shareItems(items: any) { const user = getState().user; const company = getState().company; return server.get(`/companies/${company}/users`) - .then((users) => users.filter((u) => u._id !== user)) + .then((users) => users.filter((u: any) => u._id !== user)) .then((users) => dispatch(renderModal('shareItem', {items, users}))) .catch(errorHandler); }; @@ -349,7 +349,7 @@ export function bookmarkItems(items: any) { } }) .then(() => { - analytics.multiItemEvent('bookmark', items.map((_id) => getState().itemsById[_id])); + analytics.multiItemEvent('bookmark', items.map((_id: any) => getState().itemsById[_id])); }) .then(() => dispatch(setBookmarkItems(items))) .catch(errorHandler); @@ -415,7 +415,7 @@ export function removeNewItems(data: any) { * * @param {Object} data */ -export function pushNotification(push) { +export function pushNotification(push: any) { return (dispatch: any, getState: any) => { const user = getState().user; const company = getState().company; @@ -446,10 +446,10 @@ export function pushNotification(push) { } export function reloadMyTopics(reloadTopic: any = false) { - return function(dispatch) { + return function(dispatch: any) { return loadMyTopics() .then((data) => { - const agendaTopics = data.filter((topic) => topic.topic_type === 'agenda'); + const agendaTopics = data.filter((topic: any) => topic.topic_type === 'agenda'); dispatch(setTopics(agendaTopics)); if (reloadTopic) { @@ -465,7 +465,7 @@ export function reloadMyTopics(reloadTopic: any = false) { export const SET_NEW_ITEM = 'SET_NEW_ITEM'; export function setAndUpdateNewItems(data: any) { - return function(dispatch, getState) { + return function(dispatch: any, getState: any) { const item = data.item || {}; if (item.type !== 'agenda') { @@ -482,7 +482,7 @@ export function setAndUpdateNewItems(data: any) { return Promise.resolve(); } - const coveragesToCheck = (agendaItem.coverages || []).map((c) => c.coverage_id); + const coveragesToCheck = (agendaItem.coverages || []).map((c: any) => c.coverage_id); if (coveragesToCheck.includes(item.coverage_id)) { dispatch(fetchWireItemsForAgenda(agendaItem)); diff --git a/assets/agenda/components/AgendaItemDetails.tsx b/assets/agenda/components/AgendaItemDetails.tsx index 5c697e1d3..7d6c59cbe 100644 --- a/assets/agenda/components/AgendaItemDetails.tsx +++ b/assets/agenda/components/AgendaItemDetails.tsx @@ -45,7 +45,7 @@ export default function AgendaItemDetails( coverageActions, detailsConfig, restrictCoverageInfo, - }) + }: any) { const locations = getLocations(item); let map = null; @@ -60,7 +60,7 @@ export default function AgendaItemDetails( map = ; } - const plan = (get(item, 'planning_items') || []).find((p) => p.guid === planningId); + const plan = (get(item, 'planning_items') || []).find((p: any) => p.guid === planningId); const internalNotes = getInternalNote(item, plan); return ( diff --git a/assets/agenda/components/AgendaList.tsx b/assets/agenda/components/AgendaList.tsx index fea121258..8f5f19c1a 100644 --- a/assets/agenda/components/AgendaList.tsx +++ b/assets/agenda/components/AgendaList.tsx @@ -21,7 +21,7 @@ const PREVIEW_TIMEOUT = 500; // time to preview an item after selecting using kb const CLICK_TIMEOUT = 200; // time when we wait for double click after click -const itemsSelector = (state) => state.items.map((_id) => state.itemsById[_id]); +const itemsSelector = (state: any) => state.items.map((_id: any) => state.itemsById[_id]); const activeDateSelector = (state: any) => get(state, 'agenda.activeDate'); const activeGroupingSelector = (state: any) => get(state, 'agenda.activeGrouping'); const itemsByIdSelector = (state: any) => get(state, 'itemsById', {}); @@ -43,6 +43,11 @@ const listItemsSelector = createSelector( class AgendaList extends React.Component { + static propTypes: any; + previewTimeout: any; + clickTimeout: any; + elem: any; + constructor(props: any) { super(props); @@ -83,7 +88,7 @@ class AgendaList extends React.Component { event.preventDefault(); const activeItem = this.props.activeItem; - const activeIndex = this.props.activeItem ? this.props.listItems.findIndex((item) => { + const activeIndex = this.props.activeItem ? this.props.listItems.findIndex((item: any) => { return item._id === activeItem._id && item.group === activeItem.group && get(item, 'plan._id') === get(activeItem, 'plan._id'); @@ -165,7 +170,7 @@ class AgendaList extends React.Component { } filterActions(item: any, config: any) { - return this.props.actions.filter((action) => (!config || isDisplayed(action.id, config)) && + return this.props.actions.filter((action: any) => (!config || isDisplayed(action.id, config)) && (!action.when || action.when(this.props, item))); } @@ -230,14 +235,14 @@ class AgendaList extends React.Component { } = this.props; const isExtended = activeView === EXTENDED_VIEW; const showShortcutActionIcons = shouldShowListShortcutActionIcons(this.props.listConfig, isExtended); - const articleGroups = groupedItems.map((group) => + const articleGroups = groupedItems.map((group: any) => [
{this.getListGroupDate(group)}
,
- {group.items.map((_id, groupIndex) => { + {group.items.map((_id: any, groupIndex: any) => { const plans = getPlanningItemsByGroup(itemsById[_id], group.date); diff --git a/assets/agenda/components/AgendaTags.tsx b/assets/agenda/components/AgendaTags.tsx index 4389780bb..85f6a0df5 100644 --- a/assets/agenda/components/AgendaTags.tsx +++ b/assets/agenda/components/AgendaTags.tsx @@ -62,6 +62,6 @@ const mapStateToProps = (state: any) => ({ filterGroupLabels: filterGroupsToLabelMap(state), }); -const AgendaTags = connect(mapStateToProps)(AgendaTagsComponent); +const AgendaTags: React.ComponentType = connect(mapStateToProps)(AgendaTagsComponent); export default AgendaTags; diff --git a/assets/monitoring/components/MonitoringApp.tsx b/assets/monitoring/components/MonitoringApp.tsx index 28670e31f..ad544a559 100644 --- a/assets/monitoring/components/MonitoringApp.tsx +++ b/assets/monitoring/components/MonitoringApp.tsx @@ -16,6 +16,8 @@ import DropdownFilter from 'components/DropdownFilter'; class MonitoringApp extends React.Component { + sections: Array<{name: string}>; + constructor(props: any, context: any) { super(props, context); @@ -59,7 +61,7 @@ class MonitoringApp extends React.Component { getDropdownItems(filter: any) { const companies = this.isScheduleMode() ? this.props.monitoringListCompanies : this.props.companies; - return (companies).map((item, i) => (