From 2738ed3836fb529d5739b0c38886e1aceb8ebc3c Mon Sep 17 00:00:00 2001 From: Robert Date: Thu, 8 May 2025 06:53:16 -0400 Subject: [PATCH 01/13] Allow Vue 2 & 3 --- fec/fec/static/js/modules/calc-admin-fines.js | 2 +- package-lock.json | 276 +++++++++++++----- package.json | 3 +- 3 files changed, 212 insertions(+), 69 deletions(-) diff --git a/fec/fec/static/js/modules/calc-admin-fines.js b/fec/fec/static/js/modules/calc-admin-fines.js index 761fa3f7f1..c7767a9d66 100644 --- a/fec/fec/static/js/modules/calc-admin-fines.js +++ b/fec/fec/static/js/modules/calc-admin-fines.js @@ -1,7 +1,7 @@ /** // */ -import Vue from 'vue/dist/vue.esm.js'; +import Vue from 'vue-2/dist/vue.esm.js'; import { availableDates, getTotalAdminFine } from './calc-admin-fines-logic.js'; diff --git a/package-lock.json b/package-lock.json index b5a511cfd7..d0e374e3b2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -114,7 +114,8 @@ "topojson-client": "^3.1.0", "underscore": "^1.13.6", "urijs": "^1.19.11", - "vue": "^2.7.16", + "vue": "^3.5.13", + "vue-2": "npm:vue@^2.7.16", "webpack": "^5.97.1", "webpack-bundle-analyzer": "^4.10.2", "webpack-cli": "^6.0.1", @@ -521,9 +522,9 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz", - "integrity": "sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", "dev": true, "license": "MIT", "engines": { @@ -531,9 +532,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", - "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", "dev": true, "license": "MIT", "engines": { @@ -597,11 +598,14 @@ } }, "node_modules/@babel/parser": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.8.tgz", - "integrity": "sha512-WzfbgXOkGzZiXXCqk43kKwZjzwx4oulxZi3nq2TYL9mOjQv6kYwul9mz6ID36njuL7Xkp6nJEfok848Zj10j/w==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.0.tgz", + "integrity": "sha512-iaepho73/2Pz7w2eMS0Q5f83+0RKI7i4xmiYeBmDzfRVbQtTOG7Ts0S4HzJVsTMGI9keU8rNfuZr8DKfSt7Yyg==", "dev": true, "license": "MIT", + "dependencies": { + "@babel/types": "^7.27.0" + }, "bin": { "parser": "bin/babel-parser.js" }, @@ -2057,15 +2061,14 @@ } }, "node_modules/@babel/types": { - "version": "7.24.9", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.9.tgz", - "integrity": "sha512-xm8XrMKz0IlUdocVbYJe0Z9xEgidU7msskG8BbhnTPK/HZ2z/7FP7ykqPgrUH+C+r414mNfNWam1f2vqOjqjYQ==", + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.0.tgz", + "integrity": "sha512-H45s8fVLYjbhFH62dIJ3WtmJ6RSPt/3DRO0ZcT2SUiYiQyz3BLVb9ADEnLl91m74aQPS3AzzeajZHYOalWe3bg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.24.8", - "@babel/helper-validator-identifier": "^7.24.7", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -3186,47 +3189,115 @@ "dev": true, "license": "ISC" }, + "node_modules/@vue/compiler-core": { + "version": "3.5.13", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.13.tgz", + "integrity": "sha512-oOdAkwqUfW1WqpwSYJce06wvt6HljgY3fGeM9NcVA1HaYOij3mZG9Rkysn0OHuyUAGMbEbARIpsG+LPVlBJ5/Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.25.3", + "@vue/shared": "3.5.13", + "entities": "^4.5.0", + "estree-walker": "^2.0.2", + "source-map-js": "^1.2.0" + } + }, + "node_modules/@vue/compiler-dom": { + "version": "3.5.13", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.13.tgz", + "integrity": "sha512-ZOJ46sMOKUjO3e94wPdCzQ6P1Lx/vhp2RSvfaab88Ajexs0AHeV0uasYhi99WPaogmBlRHNRuly8xV75cNTMDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vue/compiler-core": "3.5.13", + "@vue/shared": "3.5.13" + } + }, "node_modules/@vue/compiler-sfc": { - "version": "2.7.16", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-2.7.16.tgz", - "integrity": "sha512-KWhJ9k5nXuNtygPU7+t1rX6baZeqOYLEforUPjgNDBnLicfHCoi48H87Q8XyLZOrNNsmhuwKqtpDQWjEFe6Ekg==", + "version": "3.5.13", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.13.tgz", + "integrity": "sha512-6VdaljMpD82w6c2749Zhf5T9u5uLBWKnVue6XWxprDobftnletJ8+oel7sexFfM3qIxNmVE7LSFGTpv6obNyaQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/parser": "^7.23.5", - "postcss": "^8.4.14", - "source-map": "^0.6.1" - }, - "optionalDependencies": { - "prettier": "^1.18.2 || ^2.0.0" + "@babel/parser": "^7.25.3", + "@vue/compiler-core": "3.5.13", + "@vue/compiler-dom": "3.5.13", + "@vue/compiler-ssr": "3.5.13", + "@vue/shared": "3.5.13", + "estree-walker": "^2.0.2", + "magic-string": "^0.30.11", + "postcss": "^8.4.48", + "source-map-js": "^1.2.0" } }, - "node_modules/@vue/compiler-sfc/node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "node_modules/@vue/compiler-ssr": { + "version": "3.5.13", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.13.tgz", + "integrity": "sha512-wMH6vrYHxQl/IybKJagqbquvxpWCuVYpoUJfCqFZwa/JY1GdATAQ+TgVtgrwwMZ0D07QhA99rs/EAAWfvG6KpA==", "dev": true, "license": "MIT", - "optional": true, - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" + "dependencies": { + "@vue/compiler-dom": "3.5.13", + "@vue/shared": "3.5.13" } }, - "node_modules/@vue/compiler-sfc/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "node_modules/@vue/reactivity": { + "version": "3.5.13", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.13.tgz", + "integrity": "sha512-NaCwtw8o48B9I6L1zl2p41OHo/2Z4wqYGGIK1Khu5T7yxrn+ATOixn/Udn2m+6kZKB/J7cuT9DbWWhRxqixACg==", "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" + "license": "MIT", + "dependencies": { + "@vue/shared": "3.5.13" } }, + "node_modules/@vue/runtime-core": { + "version": "3.5.13", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.5.13.tgz", + "integrity": "sha512-Fj4YRQ3Az0WTZw1sFe+QDb0aXCerigEpw418pw1HBUKFtnQHWzwojaukAs2X/c9DQz4MQ4bsXTGlcpGxU/RCIw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vue/reactivity": "3.5.13", + "@vue/shared": "3.5.13" + } + }, + "node_modules/@vue/runtime-dom": { + "version": "3.5.13", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.5.13.tgz", + "integrity": "sha512-dLaj94s93NYLqjLiyFzVs9X6dWhTdAlEAciC3Moq7gzAc13VJUdCnjjRurNM6uTLFATRHexHCTu/Xp3eW6yoog==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vue/reactivity": "3.5.13", + "@vue/runtime-core": "3.5.13", + "@vue/shared": "3.5.13", + "csstype": "^3.1.3" + } + }, + "node_modules/@vue/server-renderer": { + "version": "3.5.13", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.5.13.tgz", + "integrity": "sha512-wAi4IRJV/2SAW3htkTlB+dHeRmpTiVIK1OGLWV1yeStVSebSQQOwGwIq0D3ZIoBj2C2qpgz5+vX9iEBkTdk5YA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vue/compiler-ssr": "3.5.13", + "@vue/shared": "3.5.13" + }, + "peerDependencies": { + "vue": "3.5.13" + } + }, + "node_modules/@vue/shared": { + "version": "3.5.13", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.13.tgz", + "integrity": "sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==", + "dev": true, + "license": "MIT" + }, "node_modules/@webassemblyjs/ast": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz", @@ -10537,6 +10608,13 @@ "node": ">=4.0" } }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true, + "license": "MIT" + }, "node_modules/esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", @@ -16620,6 +16698,16 @@ "es5-ext": "~0.10.2" } }, + "node_modules/magic-string": { + "version": "0.30.17", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", + "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0" + } + }, "node_modules/make-dir": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", @@ -17765,9 +17853,9 @@ "optional": true }, "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", "dev": true, "funding": [ { @@ -19479,9 +19567,9 @@ } }, "node_modules/postcss": { - "version": "8.4.40", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.40.tgz", - "integrity": "sha512-YF2kKIUzAofPMpfH6hOi2cGnv/HrUlfucspc7pDyvv7kGdqXrfj8SCl/t8owkEgKEuu8ZcRjSOxFxVLqwChZ2Q==", + "version": "8.5.3", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz", + "integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==", "dev": true, "funding": [ { @@ -19499,9 +19587,9 @@ ], "license": "MIT", "dependencies": { - "nanoid": "^3.3.7", - "picocolors": "^1.0.1", - "source-map-js": "^1.2.0" + "nanoid": "^3.3.8", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" }, "engines": { "node": "^10 || ^12 || >=14" @@ -22069,9 +22157,9 @@ } }, "node_modules/source-map-js": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", - "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "dev": true, "license": "BSD-3-Clause", "engines": { @@ -23313,16 +23401,6 @@ "dev": true, "license": "MIT" }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/to-object-path": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", @@ -24467,6 +24545,29 @@ } }, "node_modules/vue": { + "version": "3.5.13", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.5.13.tgz", + "integrity": "sha512-wmeiSMxkZCSc+PM2w2VRsOYAZC8GdipNFRTsLSfodVqI9mbejKeXEGr8SckuLnrQPGe3oJN5c3K0vpoU9q/wCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vue/compiler-dom": "3.5.13", + "@vue/compiler-sfc": "3.5.13", + "@vue/runtime-dom": "3.5.13", + "@vue/server-renderer": "3.5.13", + "@vue/shared": "3.5.13" + }, + "peerDependencies": { + "typescript": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/vue-2": { + "name": "vue", "version": "2.7.16", "resolved": "https://registry.npmjs.org/vue/-/vue-2.7.16.tgz", "integrity": "sha512-4gCtFXaAA3zYZdTp5s4Hl2sozuySsgz4jy1EnpBHNfpMa9dK1ZCG7viqBPCwXtmgc8nHqUsAu3G4gtmXkkY3Sw==", @@ -24478,6 +24579,47 @@ "csstype": "^3.1.0" } }, + "node_modules/vue-2/node_modules/@vue/compiler-sfc": { + "version": "2.7.16", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-2.7.16.tgz", + "integrity": "sha512-KWhJ9k5nXuNtygPU7+t1rX6baZeqOYLEforUPjgNDBnLicfHCoi48H87Q8XyLZOrNNsmhuwKqtpDQWjEFe6Ekg==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.23.5", + "postcss": "^8.4.14", + "source-map": "^0.6.1" + }, + "optionalDependencies": { + "prettier": "^1.18.2 || ^2.0.0" + } + }, + "node_modules/vue-2/node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "license": "MIT", + "optional": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/vue-2/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/walker": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", diff --git a/package.json b/package.json index b60e46f8d0..7d858f817f 100644 --- a/package.json +++ b/package.json @@ -131,7 +131,8 @@ "topojson-client": "^3.1.0", "underscore": "^1.13.6", "urijs": "^1.19.11", - "vue": "^2.7.16", + "vue-2": "npm:vue@^2.7.16", + "vue": "^3.5.13", "webpack": "^5.97.1", "webpack-bundle-analyzer": "^4.10.2", "webpack-cli": "^6.0.1", From 52d87273ce28307a2bd84faf7e7f141352315769 Mon Sep 17 00:00:00 2001 From: Robert Date: Thu, 22 May 2025 07:27:10 -0400 Subject: [PATCH 02/13] Allow Vue 2 & 3 --- fec/webpack.config.cjs | 5 ++++- package.json | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/fec/webpack.config.cjs b/fec/webpack.config.cjs index 8a77901f99..ba38690c53 100644 --- a/fec/webpack.config.cjs +++ b/fec/webpack.config.cjs @@ -202,7 +202,10 @@ module.exports = [ }, plugins: [ new webpack.DefinePlugin({ - context: {} + context: {}, + __VUE_OPTIONS_API__: false, + __VUE_PROD_DEVTOOLS__: mode != 'production', + __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: mode != 'production' }), new webpack.ProvidePlugin({ $: 'jquery', diff --git a/package.json b/package.json index 7d858f817f..180548730d 100644 --- a/package.json +++ b/package.json @@ -131,8 +131,8 @@ "topojson-client": "^3.1.0", "underscore": "^1.13.6", "urijs": "^1.19.11", - "vue-2": "npm:vue@^2.7.16", "vue": "^3.5.13", + "vue-2": "npm:vue@^2.7.16", "webpack": "^5.97.1", "webpack-bundle-analyzer": "^4.10.2", "webpack-cli": "^6.0.1", From d6f262733649b8397268e8d50201924e96fe6598 Mon Sep 17 00:00:00 2001 From: Robert Date: Thu, 22 May 2025 07:28:25 -0400 Subject: [PATCH 03/13] Typos --- fec/fec/static/js/modules/calc-admin-fines.js | 8 ++++---- fec/gulpfile.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fec/fec/static/js/modules/calc-admin-fines.js b/fec/fec/static/js/modules/calc-admin-fines.js index c7767a9d66..81a5239461 100644 --- a/fec/fec/static/js/modules/calc-admin-fines.js +++ b/fec/fec/static/js/modules/calc-admin-fines.js @@ -355,7 +355,7 @@ Vue.component('frames', { return this[q.showIfVar1] === q.showIfVar1ExpectedValue; } }, - frameClass: function(frameIndex, addtionalClasses) { + frameClass: function(frameIndex, additionalClasses) { return [ 'frame', { @@ -363,7 +363,7 @@ Vue.component('frames', { current: frameIndex == this.currentFrameNum, 'next off-screen': frameIndex > this.currentFrameNum }, - addtionalClasses + additionalClasses // { // viewed: this.frames[navIndex].viewed || navIndex == 0, // current: navIndex == this.currentFrameNum, @@ -652,7 +652,7 @@ new Vue({ help: `

For election sensitive reports, a committee is a non-filer if it files after this point or doesn't file at all.

A committee is a late filer if it files the report after the due date, but more than four days before the date of the applicable election.

For non-election sensitive reports, a committee is a non-filer if it files its report later than that or not at all.

-

A committee will be considerered a late filer if it files its report within 30 days after the due date.

` +

A committee will be considered a late filer if it files its report within 30 days after the due date.

` } ], viewed: false @@ -871,7 +871,7 @@ new Vue({ } else if (passedTests === true) { // If the value is undefined, this is the first time it's being set so let's advance let autoStep = this[affectedVmodel] == undefined ? true : false; - // …unless we specifially shouldn't autoadvance + // …unless we specifically shouldn't autoadvance autoStep = frameShouldAutoAdvance; // this.setBreadCrumbText(frameNum, qNum, q); diff --git a/fec/gulpfile.js b/fec/gulpfile.js index 8d008edf62..b9d646ae1e 100644 --- a/fec/gulpfile.js +++ b/fec/gulpfile.js @@ -62,7 +62,7 @@ gulp.task('purgecss', () => { './home/templates/purgecss-homepage/navs.html', './home/templates/purgecss-homepage/banners.html', './home/templates/purgecss-homepage/hero.html', - './home/templates/purgecss-homepage/comissioners.html', + './home/templates/purgecss-homepage/commissioners.html', './home/templates/purgecss-homepage/toggled.html', './home/templates/purgecss-homepage/full.html' ] From bc8199239e32b6681912689a91aa3ba70e33d0cc Mon Sep 17 00:00:00 2001 From: Robert Date: Wed, 28 May 2025 12:23:57 -0400 Subject: [PATCH 04/13] Build fecfile+ eligibility widget --- fec/fec/static/js/init.js | 18 + .../static/js/widgets/fecfile-eligibility.js | 960 ++++++++++++++++++ .../scss/widgets/fecfile-eligibility.scss | 697 +++++++++++++ fec/webpack.config.cjs | 10 +- 4 files changed, 1682 insertions(+), 3 deletions(-) create mode 100644 fec/fec/static/js/widgets/fecfile-eligibility.js create mode 100644 fec/fec/static/scss/widgets/fecfile-eligibility.scss diff --git a/fec/fec/static/js/init.js b/fec/fec/static/js/init.js index 8784b9cbcc..0b8752fef9 100644 --- a/fec/fec/static/js/init.js +++ b/fec/fec/static/js/init.js @@ -59,4 +59,22 @@ $(function() { } $p.nextAll().remove(); }); + + /** + * Check for an in-page element with a classList that contains 'js-launch-fecfile-eligibility'. + * If any are found, add the js and css files for it. + * fecfile-eligibility.js will activate the launcher button + */ + let eligibilityLauncher = document.querySelector('.js-launch-fecfile-eligibility'); + if (eligibilityLauncher) { + let newScript = document.createElement('script'); + newScript.src = '/static/js/widgets/fecfile-eligibility.js'; // This could begin with 'https://www.fec.gov/' + document.body.append(newScript); + + let eligibilityStyles = document.createElement('link'); + eligibilityStyles.rel = 'stylesheet'; + eligibilityStyles.href = '/static/css/widgets/fecfile-eligibility.css'; // This could begin with 'https://www.fec.gov/' + document.body.append(eligibilityStyles); + } + eligibilityLauncher = undefined; // No reason to keep the var }); diff --git a/fec/fec/static/js/widgets/fecfile-eligibility.js b/fec/fec/static/js/widgets/fecfile-eligibility.js new file mode 100644 index 0000000000..9aa9d00df0 --- /dev/null +++ b/fec/fec/static/js/widgets/fecfile-eligibility.js @@ -0,0 +1,960 @@ +/** + * Component to direct filers to FECfile+ or other filing applications. + * Expects a button/link in the page ( @see launcherButtonSelector ), activates it, + * and may start itself in an open state if the window.location.href sets dialog=open + */ +import { createApp } from 'vue/dist/vue.esm-bundler.js'; + +// Quick-edits +// (The full data is the last and largest section of this file) +const goalHref = 'https://fecfile.fec.gov/login'; + +export default function FecFileEligibility() { + this.launcherButtonSelector = '.js-launch-fecfile-eligibility'; // How to find the button to launch this + this.appElSelector = 'gov-fec-fecfile-eligibility'; // How to name the main Vue elements, also used in the css + this.modalDialog; // The + this.app; // The
converted into this app + this.frames; // The frames of content + this.init(); +} + +/** + * Kick it off. Finds the launcher button, adds the listener, activates it, then opens the if needed + */ +FecFileEligibility.prototype.init = function() { + let launcherButton = document.querySelector(this.launcherButtonSelector); + + if (launcherButton) { + this.buildModalDialog(); + launcherButton.classList.remove('is-disabled'); + launcherButton.addEventListener('click', this.handleOpenDialogClick.bind(this)); + } + + // Should we start in the open state? + let searchParams = new URLSearchParams(window.location.search); + if (searchParams && searchParams.get('dialog') === 'open') this.handleOpenDialogClick(); +}; + +/** + * Creates this in document.body and listens for the close button's click event + */ +FecFileEligibility.prototype.buildModalDialog = function() { + this.modalDialog = document.createElement('dialog'); + this.modalDialog.setAttribute('id', `modal-${this.appElSelector}`); + this.modalDialog.innerHTML = ` +