From 23b9ccb4223bb5c530234700e3b01dc4fb9ca8c2 Mon Sep 17 00:00:00 2001 From: cawecoy91 Date: Wed, 24 Dec 2025 17:44:36 -0300 Subject: [PATCH 1/8] TC with two phones (untested) --- package.json | 2 +- packages/scripts/package-lock.json | 926 ++++++++++----------- packages/scripts/package.json | 54 +- packages/scripts/src/interfaces/options.ts | 12 +- packages/scripts/src/tidycontact.ts | 205 +++-- packages/styles/package-lock.json | 2 +- packages/styles/package.json | 75 +- 7 files changed, 666 insertions(+), 610 deletions(-) diff --git a/package.json b/package.json index 7e607533..88fe9c18 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ }, "scripts": { "watch": "lerna run watch", - "build": "lerna bootstrap & lerna run build", + "build": "lerna bootstrap && lerna run build", "version": "node ./write-version.js && npm run build && git add .", "make": "lerna run build && lerna publish --yes --cd-version patch", "make-feature": "lerna run build && lerna publish --yes --cd-version minor" diff --git a/packages/scripts/package-lock.json b/packages/scripts/package-lock.json index 76c4f205..57e14796 100644 --- a/packages/scripts/package-lock.json +++ b/packages/scripts/package-lock.json @@ -1,465 +1,465 @@ { - "name": "@4site/engrid-scripts", - "version": "0.23.7", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "@4site/engrid-scripts", - "version": "0.23.4", - "license": "Unlicense", - "dependencies": { - "shuffle-seed": "^1.1.6", - "strongly-typed-events": "^2.0.9" - }, - "devDependencies": { - "nodemon": "^2.0.20" - } - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "dev": true, - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/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, - "engines": { - "node": ">=4" - } - }, - "node_modules/ignore-by-default": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", - "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", - "dev": true - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/nodemon": { - "version": "2.0.22", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.22.tgz", - "integrity": "sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ==", - "dev": true, - "dependencies": { - "chokidar": "^3.5.2", - "debug": "^3.2.7", - "ignore-by-default": "^1.0.1", - "minimatch": "^3.1.2", - "pstree.remy": "^1.1.8", - "semver": "^5.7.1", - "simple-update-notifier": "^1.0.7", - "supports-color": "^5.5.0", - "touch": "^3.1.0", - "undefsafe": "^2.0.5" - }, - "bin": { - "nodemon": "bin/nodemon.js" - }, - "engines": { - "node": ">=8.10.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/nodemon" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pstree.remy": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", - "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", - "dev": true - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/seedrandom": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-2.4.4.tgz", - "integrity": "sha512-9A+PDmgm+2du77B5i0Ip2cxOqqHjgNxnBgglxLcX78A2D6c2rTo61z4jnVABpF4cKeDMDG+cmXXvdnqse2VqMA==" - }, - "node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/shuffle-seed": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/shuffle-seed/-/shuffle-seed-1.1.6.tgz", - "integrity": "sha512-Vr9wlwMKJVUeFNGyc4aNbrzkI568gkve7ykyJ+1/cz78j3yRlJODWU0CuJ/fmk3MCjvAClpnqlycd/Y53UG3UA==", - "dependencies": { - "seedrandom": "^2.4.2" - } - }, - "node_modules/simple-update-notifier": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz", - "integrity": "sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg==", - "dev": true, - "dependencies": { - "semver": "~7.0.0" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/simple-update-notifier/node_modules/semver": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", - "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/ste-core": { - "version": "2.1.16", - "resolved": "https://registry.npmjs.org/ste-core/-/ste-core-2.1.16.tgz", - "integrity": "sha512-GgwwDFSDWbS2Ps1QliUHJPXeomvwZFfG5B10ggp+INmBD618MxwbA1qwFXdXjYGaS8JfiEC6NlpT3fp9PwfNHw==", - "engines": { - "node": ">=4.2.4" - } - }, - "node_modules/ste-events": { - "version": "2.1.16", - "resolved": "https://registry.npmjs.org/ste-events/-/ste-events-2.1.16.tgz", - "integrity": "sha512-DFTYyuiCaNC4rY8td1UB9zfsCtcUE9iy5PdKlkQJ8+7Yv/mjVKqKusfmmfbI9BfjTgawinixypInsc+LWx67HA==", - "dependencies": { - "ste-core": "^2.1.16" - }, - "engines": { - "node": ">=4.2.4" - } - }, - "node_modules/ste-promise-events": { - "version": "2.1.16", - "resolved": "https://registry.npmjs.org/ste-promise-events/-/ste-promise-events-2.1.16.tgz", - "integrity": "sha512-An/jUYfuhdj4k0ROwPi+x4UabRlCM8iN4EcmhgkKwKUA0v26dKx2eZ4NtaNEmddV77M3D01mXfE5Ddq+o69ulQ==", - "dependencies": { - "ste-core": "^2.1.16" - }, - "engines": { - "node": ">=4.2.4" - } - }, - "node_modules/ste-promise-signals": { - "version": "2.1.16", - "resolved": "https://registry.npmjs.org/ste-promise-signals/-/ste-promise-signals-2.1.16.tgz", - "integrity": "sha512-op/OvmTVeq4t4X7+5qTqcFTHgCVdRLNcqgamOfK4t1oeSVNZsxtODqJ7+fJqh4RCx27y4xMWqpB3p9vvdetzEw==", - "dependencies": { - "ste-core": "^2.1.16" - }, - "engines": { - "node": ">=4.2.4" - } - }, - "node_modules/ste-promise-simple-events": { - "version": "2.1.16", - "resolved": "https://registry.npmjs.org/ste-promise-simple-events/-/ste-promise-simple-events-2.1.16.tgz", - "integrity": "sha512-jAI0z8oCvcsVQ94kKz2pVtzskI8ODhM4jYJMP4U+K9InONcicKleA+5EKrzGzLjn0WKBd3hegJfM6Vy/Cv5HNA==", - "dependencies": { - "ste-core": "^2.1.16" - }, - "engines": { - "node": ">=4.2.4" - } - }, - "node_modules/ste-signals": { - "version": "2.1.16", - "resolved": "https://registry.npmjs.org/ste-signals/-/ste-signals-2.1.16.tgz", - "integrity": "sha512-odMJ3xG4AIKIyBCL3to4BIBgEpIzpQsyJgt9MbgOAmyUD3FZBMymM8x5QkW0qXXH9RnHnKcaEOOMw6+DUgx77w==", - "dependencies": { - "ste-core": "^2.1.16" - }, - "engines": { - "node": ">=4.2.4" - } - }, - "node_modules/ste-simple-events": { - "version": "2.1.16", - "resolved": "https://registry.npmjs.org/ste-simple-events/-/ste-simple-events-2.1.16.tgz", - "integrity": "sha512-B4gdrRg9jnbJE8sICjbx9NFb04KJn1WYWiXoon/YsD+3DWii4XyE3rMU6ZeJI6GG2s9mNExloNZMGcC9zSKh8A==", - "dependencies": { - "ste-core": "^2.1.16" - }, - "engines": { - "node": ">=4.2.4" - } - }, - "node_modules/strongly-typed-events": { - "version": "2.1.16", - "resolved": "https://registry.npmjs.org/strongly-typed-events/-/strongly-typed-events-2.1.16.tgz", - "integrity": "sha512-y3wh36XtzAg0gWEOnVGloWthmUrdLmeGSddkV1yFHrNHBGAtcjTMvp0ESRVIvKWC8+IVyqzacDPuNPmDTXly0g==", - "dependencies": { - "ste-core": "^2.1.16", - "ste-events": "^2.1.16", - "ste-promise-events": "^2.1.16", - "ste-promise-signals": "^2.1.16", - "ste-promise-simple-events": "^2.1.16", - "ste-signals": "^2.1.16", - "ste-simple-events": "^2.1.16" - }, - "engines": { - "node": ">=4.2.4" - } - }, - "node_modules/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, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/touch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.1.tgz", - "integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==", - "dev": true, - "bin": { - "nodetouch": "bin/nodetouch.js" - } - }, - "node_modules/undefsafe": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", - "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", - "dev": true - } - } + "name": "@4site/engrid-scripts", + "version": "0.23.7", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@4site/engrid-scripts", + "version": "0.23.7", + "license": "Unlicense", + "dependencies": { + "shuffle-seed": "^1.1.6", + "strongly-typed-events": "^2.0.9" + }, + "devDependencies": { + "nodemon": "^2.0.20" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/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, + "engines": { + "node": ">=4" + } + }, + "node_modules/ignore-by-default": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", + "dev": true + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/nodemon": { + "version": "2.0.22", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.22.tgz", + "integrity": "sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ==", + "dev": true, + "dependencies": { + "chokidar": "^3.5.2", + "debug": "^3.2.7", + "ignore-by-default": "^1.0.1", + "minimatch": "^3.1.2", + "pstree.remy": "^1.1.8", + "semver": "^5.7.1", + "simple-update-notifier": "^1.0.7", + "supports-color": "^5.5.0", + "touch": "^3.1.0", + "undefsafe": "^2.0.5" + }, + "bin": { + "nodemon": "bin/nodemon.js" + }, + "engines": { + "node": ">=8.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nodemon" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pstree.remy": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", + "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", + "dev": true + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/seedrandom": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-2.4.4.tgz", + "integrity": "sha512-9A+PDmgm+2du77B5i0Ip2cxOqqHjgNxnBgglxLcX78A2D6c2rTo61z4jnVABpF4cKeDMDG+cmXXvdnqse2VqMA==" + }, + "node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/shuffle-seed": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/shuffle-seed/-/shuffle-seed-1.1.6.tgz", + "integrity": "sha512-Vr9wlwMKJVUeFNGyc4aNbrzkI568gkve7ykyJ+1/cz78j3yRlJODWU0CuJ/fmk3MCjvAClpnqlycd/Y53UG3UA==", + "dependencies": { + "seedrandom": "^2.4.2" + } + }, + "node_modules/simple-update-notifier": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz", + "integrity": "sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg==", + "dev": true, + "dependencies": { + "semver": "~7.0.0" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/simple-update-notifier/node_modules/semver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/ste-core": { + "version": "2.1.16", + "resolved": "https://registry.npmjs.org/ste-core/-/ste-core-2.1.16.tgz", + "integrity": "sha512-GgwwDFSDWbS2Ps1QliUHJPXeomvwZFfG5B10ggp+INmBD618MxwbA1qwFXdXjYGaS8JfiEC6NlpT3fp9PwfNHw==", + "engines": { + "node": ">=4.2.4" + } + }, + "node_modules/ste-events": { + "version": "2.1.16", + "resolved": "https://registry.npmjs.org/ste-events/-/ste-events-2.1.16.tgz", + "integrity": "sha512-DFTYyuiCaNC4rY8td1UB9zfsCtcUE9iy5PdKlkQJ8+7Yv/mjVKqKusfmmfbI9BfjTgawinixypInsc+LWx67HA==", + "dependencies": { + "ste-core": "^2.1.16" + }, + "engines": { + "node": ">=4.2.4" + } + }, + "node_modules/ste-promise-events": { + "version": "2.1.16", + "resolved": "https://registry.npmjs.org/ste-promise-events/-/ste-promise-events-2.1.16.tgz", + "integrity": "sha512-An/jUYfuhdj4k0ROwPi+x4UabRlCM8iN4EcmhgkKwKUA0v26dKx2eZ4NtaNEmddV77M3D01mXfE5Ddq+o69ulQ==", + "dependencies": { + "ste-core": "^2.1.16" + }, + "engines": { + "node": ">=4.2.4" + } + }, + "node_modules/ste-promise-signals": { + "version": "2.1.16", + "resolved": "https://registry.npmjs.org/ste-promise-signals/-/ste-promise-signals-2.1.16.tgz", + "integrity": "sha512-op/OvmTVeq4t4X7+5qTqcFTHgCVdRLNcqgamOfK4t1oeSVNZsxtODqJ7+fJqh4RCx27y4xMWqpB3p9vvdetzEw==", + "dependencies": { + "ste-core": "^2.1.16" + }, + "engines": { + "node": ">=4.2.4" + } + }, + "node_modules/ste-promise-simple-events": { + "version": "2.1.16", + "resolved": "https://registry.npmjs.org/ste-promise-simple-events/-/ste-promise-simple-events-2.1.16.tgz", + "integrity": "sha512-jAI0z8oCvcsVQ94kKz2pVtzskI8ODhM4jYJMP4U+K9InONcicKleA+5EKrzGzLjn0WKBd3hegJfM6Vy/Cv5HNA==", + "dependencies": { + "ste-core": "^2.1.16" + }, + "engines": { + "node": ">=4.2.4" + } + }, + "node_modules/ste-signals": { + "version": "2.1.16", + "resolved": "https://registry.npmjs.org/ste-signals/-/ste-signals-2.1.16.tgz", + "integrity": "sha512-odMJ3xG4AIKIyBCL3to4BIBgEpIzpQsyJgt9MbgOAmyUD3FZBMymM8x5QkW0qXXH9RnHnKcaEOOMw6+DUgx77w==", + "dependencies": { + "ste-core": "^2.1.16" + }, + "engines": { + "node": ">=4.2.4" + } + }, + "node_modules/ste-simple-events": { + "version": "2.1.16", + "resolved": "https://registry.npmjs.org/ste-simple-events/-/ste-simple-events-2.1.16.tgz", + "integrity": "sha512-B4gdrRg9jnbJE8sICjbx9NFb04KJn1WYWiXoon/YsD+3DWii4XyE3rMU6ZeJI6GG2s9mNExloNZMGcC9zSKh8A==", + "dependencies": { + "ste-core": "^2.1.16" + }, + "engines": { + "node": ">=4.2.4" + } + }, + "node_modules/strongly-typed-events": { + "version": "2.1.16", + "resolved": "https://registry.npmjs.org/strongly-typed-events/-/strongly-typed-events-2.1.16.tgz", + "integrity": "sha512-y3wh36XtzAg0gWEOnVGloWthmUrdLmeGSddkV1yFHrNHBGAtcjTMvp0ESRVIvKWC8+IVyqzacDPuNPmDTXly0g==", + "dependencies": { + "ste-core": "^2.1.16", + "ste-events": "^2.1.16", + "ste-promise-events": "^2.1.16", + "ste-promise-signals": "^2.1.16", + "ste-promise-simple-events": "^2.1.16", + "ste-signals": "^2.1.16", + "ste-simple-events": "^2.1.16" + }, + "engines": { + "node": ">=4.2.4" + } + }, + "node_modules/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, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/touch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.1.tgz", + "integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==", + "dev": true, + "bin": { + "nodetouch": "bin/nodetouch.js" + } + }, + "node_modules/undefsafe": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", + "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", + "dev": true + } + } } diff --git a/packages/scripts/package.json b/packages/scripts/package.json index eee5f729..b8c60e48 100644 --- a/packages/scripts/package.json +++ b/packages/scripts/package.json @@ -1,32 +1,26 @@ { - "name": "@4site/engrid-scripts", - "version": "0.23.7", - "description": "Scripts for the ENGRID Project", - "main": "./dist/index.js", - "types": "./dist/index.d.ts", - "scripts": { - "build": "tsc", - "prepublishOnly": "npm run build", - "postpublish": "git push origin --tags", - "watch": "nodemon -w src -e json,ts -x npm run build" - }, - "repository": { - "type": "git", - "url": "https://github.com/4site-interactive-studios/engrid.git", - "directory": "packages/scripts" - }, - "author": "4Site Studios", - "license": "Unlicense", - "bugs": { - "url": "https://github.com/4site-interactive-studios/engrid/issues" - }, - "dependencies": { - "shuffle-seed": "^1.1.6", - "strongly-typed-events": "^2.0.9" - }, - "homepage": "https://github.com/4site-interactive-studios/engrid#readme", - "gitHead": "f72c96b7127b4aad91d5a33a2fa0a29a5122e08e", - "devDependencies": { - "nodemon": "^2.0.20" - } + "name": "@4site/engrid-scripts", + "version": "0.23.7", + "description": "Scripts for the ENGRID Project", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "repository": { + "type": "git", + "url": "https://github.com/4site-interactive-studios/engrid.git", + "directory": "packages/scripts" + }, + "author": "4Site Studios", + "license": "Unlicense", + "bugs": { + "url": "https://github.com/4site-interactive-studios/engrid/issues" + }, + "dependencies": { + "shuffle-seed": "^1.1.6", + "strongly-typed-events": "^2.0.9" + }, + "homepage": "https://github.com/4site-interactive-studios/engrid#readme", + "gitHead": "f72c96b7127b4aad91d5a33a2fa0a29a5122e08e", + "devDependencies": { + "nodemon": "^2.0.20" + } } diff --git a/packages/scripts/src/interfaces/options.ts b/packages/scripts/src/interfaces/options.ts index d2dc9a73..1b854382 100644 --- a/packages/scripts/src/interfaces/options.ts +++ b/packages/scripts/src/interfaces/options.ts @@ -72,15 +72,19 @@ export interface Options { region: string; // State field postalCode: string; // Zipcode field country: string; // Country field - phone: string; // Phone field + phone1: string; // Phone field + phone2: string; // Phone 2 field }; phone_enable?: boolean; // Enable phone field phone_flags?: boolean; // Phone flags phone_country_from_ip?: boolean; // Phone country from IP phone_preferred_countries?: string[]; // Prioritize some countries on the list - phone_record_field?: string; // TidyContact Record - phone_date_field?: string; // TidyContact Date - phone_status_field?: string; // TidyContact Status + phone1_record_field?: string; // TidyContact Record + phone1_date_field?: string; // TidyContact Date + phone1_status_field?: string; // TidyContact Status + phone2_record_field?: string; // TidyContact Record + phone2_date_field?: string; // TidyContact Date + phone2_status_field?: string; // TidyContact Status }; MobileCTA?: false | { pageType: string; label: string }[]; PageLayouts?: string[]; diff --git a/packages/scripts/src/tidycontact.ts b/packages/scripts/src/tidycontact.ts index 5b6cd01c..c46c0da7 100644 --- a/packages/scripts/src/tidycontact.ts +++ b/packages/scripts/src/tidycontact.ts @@ -292,20 +292,31 @@ export class TidyContact { this.isDirty = true; } if (this.phoneEnabled()) { - this.createPhoneFields(); this.createPhoneMarginVariable(); + this.createPhoneFields(1); + this.createPhoneFields(2); this.logger.log("Phone Standardization is enabled"); if (this.countryDropDownEnabled()) { - this.renderFlagsDropDown(); + this.renderFlagsDropDown(1); + this.renderFlagsDropDown(2); } - const phoneField = ENGrid.getField( - this.options?.address_fields?.phone as string + const phone1Field = ENGrid.getField( + this.options?.address_fields?.phone1 as string ); - if (phoneField) { - phoneField.addEventListener("keyup", (e) => { - this.handlePhoneInputKeydown(e); + const phone2Field = ENGrid.getField( + this.options?.address_fields?.phone2 as string + ); + if (phone1Field) { + phone1Field.addEventListener("keyup", (e) => { + this.handlePhoneInputKeydown(e, 1); + }); + this.setDefaultPhoneCountry(1); + } + if (phone2Field) { + phone2Field.addEventListener("keyup", (e) => { + this.handlePhoneInputKeydown(e, 2); }); - this.setDefaultPhoneCountry(); + this.setDefaultPhoneCountry(2); } } } @@ -320,7 +331,8 @@ export class TidyContact { region: "supporter.region", // State field postalCode: "supporter.postcode", // Zipcode field country: "supporter.country", // Country field - phone: "supporter.phoneNumber2", // Phone field + phone1: "supporter.phoneNumber", // Phone field + phone2: "supporter.phoneNumber2", // Phone 2 field }; } this.options.address_enable = this.options.address_enable ?? true; @@ -393,45 +405,53 @@ export class TidyContact { ); } } - private createPhoneFields() { + private createPhoneFields(phoneIndex: number = 1) { if (!this.options) return; - ENGrid.createHiddenInput("tc.phone.country", ""); - this.logger.log("Creating hidden field: tc.phone.country"); - if (this.options.phone_record_field) { - const recordField = ENGrid.getField(this.options.phone_record_field); + if (phoneIndex !== 1 && phoneIndex !== 2) { + throw new Error("phoneIndex must be an integer value of 1 or 2"); + } + ENGrid.createHiddenInput(`tc.phone${phoneIndex}.country`, ""); + this.logger.log(`Creating hidden field: tc.phone${phoneIndex}.country`); + if (this.options[`phone${phoneIndex}_record_field`]) { + const recordField = ENGrid.getField(this.options[`phone${phoneIndex}_record_field`] as string); if (!recordField) { - ENGrid.createHiddenInput(this.options.phone_record_field, ""); + ENGrid.createHiddenInput(this.options[`phone${phoneIndex}_record_field`] as string, ""); this.logger.log( - "Creating hidden field: " + this.options.phone_record_field + "Creating hidden field: " + this.options[`phone${phoneIndex}_record_field`] ); } } - if (this.options.phone_date_field) { - const dateField = ENGrid.getField(this.options.phone_date_field); + if (this.options[`phone${phoneIndex}_date_field`]) { + const dateField = ENGrid.getField(this.options[`phone${phoneIndex}_date_field`] as string); if (!dateField) { - ENGrid.createHiddenInput(this.options.phone_date_field, ""); + ENGrid.createHiddenInput(this.options[`phone${phoneIndex}_date_field`] as string, ""); this.logger.log( - "Creating hidden field: " + this.options.phone_date_field + "Creating hidden field: " + this.options[`phone${phoneIndex}_date_field`] ); } } - if (this.options.phone_status_field) { - const statusField = ENGrid.getField(this.options.phone_status_field); + if (this.options[`phone${phoneIndex}_status_field`]) { + const statusField = ENGrid.getField(this.options[`phone${phoneIndex}_status_field`] as string); if (!statusField) { - ENGrid.createHiddenInput(this.options.phone_status_field, ""); + ENGrid.createHiddenInput(this.options[`phone${phoneIndex}_status_field`] as string, ""); this.logger.log( - "Creating hidden field: " + this.options.phone_status_field + "Creating hidden field: " + this.options[`phone${phoneIndex}_status_field`] ); } } } private createPhoneMarginVariable() { if (!this.options) return; - const phone = ENGrid.getField( - this.options.address_fields?.phone as string - ) as HTMLInputElement; - if (phone) { - const phoneStyle = window.getComputedStyle(phone); + const phone1 = ENGrid.getField( + this.options.address_fields?.phone1 as string + ) as HTMLInputElement | null; + const phone2 = ENGrid.getField( + this.options.address_fields?.phone2 as string + ) as HTMLInputElement | null; + const phoneField = phone1 || phone2; + console.log('createPhoneMarginVariable', phoneField); + if (phoneField) { + const phoneStyle = window.getComputedStyle(phoneField); const marginTop = phoneStyle.marginTop; const marginBottom = phoneStyle.marginBottom; document.documentElement.style.setProperty( @@ -675,11 +695,15 @@ export class TidyContact { private canUsePhoneAPI(): boolean { if (!this.options) return false; if (this.phoneEnabled()) { - const phone = !!ENGrid.getFieldValue( - this.options.address_fields?.phone as string + const phone1 = !!ENGrid.getFieldValue( + this.options.address_fields?.phone1 as string ); - const countryPhone = !!ENGrid.getFieldValue("tc.phone.country"); - return phone && countryPhone; + const phone2 = !!ENGrid.getFieldValue( + this.options.address_fields?.phone2 as string + ); + const countryPhone1 = !!ENGrid.getFieldValue("tc.phone1.country"); + const countryPhone2 = !!ENGrid.getFieldValue("tc.phone2.country"); + return (phone1 && countryPhone1) || (phone2 && countryPhone2); } this.logger.log("Phone API is not enabled"); return false; @@ -723,10 +747,13 @@ export class TidyContact { return this.country_ip; }); } - private renderFlagsDropDown() { + private renderFlagsDropDown(phoneIndex: number = 1) { if (!this.options) return; + if (phoneIndex !== 1 && phoneIndex !== 2) { + throw new Error("phoneIndex must be an integer value of 1 or 2"); + } const phoneInput = ENGrid.getField( - this.options.address_fields?.phone as string + this.options.address_fields?.[`phone${phoneIndex}`] as string ); if (!phoneInput) return; this.countries_dropdown = document.createElement("div") as HTMLDivElement; @@ -751,7 +778,7 @@ export class TidyContact { e.preventDefault(); e.stopPropagation(); if (selectedFlag.classList.contains("tc-open")) { - this.closeCountryDropDown(); + this.closeCountryDropDown(phoneIndex); } else { this.openCountryDropDown(); } @@ -822,7 +849,7 @@ export class TidyContact { target.getAttribute("data-country-code") as string ); if (countryItem) { - this.setPhoneCountry(countryItem); + this.setPhoneCountry(countryItem, phoneIndex); } } }); @@ -863,7 +890,7 @@ export class TidyContact { } // allow navigation from dropdown to input on TAB - if (e.key === "Tab") this.closeCountryDropDown(); + if (e.key === "Tab") this.closeCountryDropDown(phoneIndex); }); document.addEventListener("keydown", (e) => { const isDropdownHidden = this.countries_dropdown @@ -883,9 +910,9 @@ export class TidyContact { ) this.handleUpDownKey(e.key); // enter to select - else if (e.key === "Enter") this.handleEnterKey(); + else if (e.key === "Enter") this.handleEnterKey(phoneIndex); // esc to close - else if (e.key === "Escape") this.closeCountryDropDown(); + else if (e.key === "Escape") this.closeCountryDropDown(phoneIndex); } }); document.addEventListener("click", (e) => { @@ -896,7 +923,7 @@ export class TidyContact { !isDropdownHidden && !(e.target as HTMLElement).closest(".tc-country-list") ) { - this.closeCountryDropDown(); + this.closeCountryDropDown(phoneIndex); } }); } @@ -921,26 +948,32 @@ export class TidyContact { } } } - private handleEnterKey() { + private handleEnterKey(phoneIndex: number = 1) { + if( phoneIndex !== 1 && phoneIndex !== 2) { + throw new Error("phoneIndex must be an integer value of 1 or 2"); + } const highlightedCountry = this.countries_dropdown?.querySelector(".tc-highlight"); if (highlightedCountry) { const countryItem = this.getCountryByCode( highlightedCountry?.getAttribute("data-country-code") as string ); - this.setPhoneCountry(countryItem); + this.setPhoneCountry(countryItem, phoneIndex); } } - private handlePhoneInputKeydown(e: Event) { + private handlePhoneInputKeydown(e: Event, phoneIndex: number = 1) { + if( phoneIndex !== 1 && phoneIndex !== 2) { + throw new Error("phoneIndex must be an integer value of 1 or 2"); + } const phoneInput = e.target as HTMLInputElement; const phoneNumber = phoneInput.value; if (phoneNumber.charAt(0) === "+") { if (phoneNumber.length > 2) { const countryItem = this.getCountryByCode(phoneNumber.substring(1, 3)); if (countryItem) { - this.setPhoneCountry(countryItem); + this.setPhoneCountry(countryItem, phoneIndex); } else { - this.setDefaultPhoneCountry(); + this.setDefaultPhoneCountry(phoneIndex); } } } @@ -958,9 +991,12 @@ export class TidyContact { selectedFlag.classList.add("tc-open"); } } - private closeCountryDropDown() { + private closeCountryDropDown(phoneIndex: number = 1) { if (!this.options) return; if (!this.countries_dropdown) return; + if (phoneIndex !== 1 && phoneIndex !== 2) { + throw new Error("phoneIndex must be an integer value of 1 or 2"); + } const countryList = this.countries_dropdown.querySelector(".tc-country-list"); const selectedFlag = @@ -972,7 +1008,7 @@ export class TidyContact { selectedFlag.classList.remove("tc-open"); } const phoneInput = ENGrid.getField( - this.options.address_fields?.phone as string + this.options.address_fields?.[`phone${phoneIndex}`] as string ) as HTMLInputElement; phoneInput.focus(); } @@ -1027,19 +1063,23 @@ export class TidyContact { } countryContainer.insertAdjacentHTML("beforeend", html); } - private setDefaultPhoneCountry() { + private setDefaultPhoneCountry(phoneIndex: number = 1) { if (!this.options) return; + if( phoneIndex !== 1 && phoneIndex !== 2) { + throw new Error("phoneIndex must be an integer value of 1 or 2"); + } // First, try to get the country from IP if (this.options.phone_country_from_ip) { this.getCountryFromIP() .then((country) => { this.logger.log("Country from IP:", country); this.setPhoneCountry( - this.getCountryByCode((country ?? "us").toLowerCase()) + this.getCountryByCode((country ?? "us").toLowerCase()), + phoneIndex ); }) .catch((error) => { - this.setPhoneCountry(this.getCountryByCode("us")); + this.setPhoneCountry(this.getCountryByCode("us"), phoneIndex); }); return; } @@ -1052,7 +1092,7 @@ export class TidyContact { // Then, get the country code from the Text const countryData = this.getCountryByCode(countryText); if (countryData) { - this.setPhoneCountry(countryData); + this.setPhoneCountry(countryData, phoneIndex); return; } else if ( (this.options.phone_preferred_countries as string[]).length > 0 @@ -1061,13 +1101,14 @@ export class TidyContact { this.setPhoneCountry( this.getCountryByCode( (this.options.phone_preferred_countries as string[])[0] - ) + ), + phoneIndex ); return; } } // If nothing works, GO USA! - this.setPhoneCountry(this.getCountryByCode("us")); + this.setPhoneCountry(this.getCountryByCode("us"), phoneIndex); } private setPhoneCountry( country: { @@ -1075,16 +1116,18 @@ export class TidyContact { code: string; dialCode: string; placeholder: string; - } | null - ) { + } | null, + phoneIndex: number = 1) { if (!this.options || !country) return; - + if( phoneIndex !== 1 && phoneIndex !== 2) { + throw new Error("phoneIndex must be an integer value of 1 or 2"); + } const countryInput = ENGrid.getField( - "tc.phone.country" + `tc.phone${phoneIndex}.country` ) as HTMLInputElement; if (countryInput.value === country.code) return; const phoneInput = ENGrid.getField( - this.options.address_fields?.phone as string + this.options.address_fields?.[`phone${phoneIndex}`] as string ) as HTMLInputElement; if (this.countryDropDownEnabled()) { const selectedFlag = @@ -1115,12 +1158,12 @@ export class TidyContact { countryListItem.classList.add("tc-highlight"); } if (selectedFlag?.classList.contains("tc-open")) - this.closeCountryDropDown(); + this.closeCountryDropDown(phoneIndex); } phoneInput.setAttribute("placeholder", country.placeholder); countryInput.value = country.code; this.logger.log( - `Setting phone country to ${country.code} - ${country.name}` + `Setting phone${phoneIndex} country to ${country.code} - ${country.name}` ); } private highlightCountry(countryCode: string | null) { @@ -1146,19 +1189,22 @@ export class TidyContact { } } } - private async setPhoneDataFromAPI(data: any, id: string) { + private async setPhoneDataFromAPI(data: any, id: string, phoneIndex: number = 1) { if (!this.options) return; + if (phoneIndex !== 1 && phoneIndex !== 2) { + throw new Error("phoneIndex must be an integer value of 1 or 2"); + } const phoneField = ENGrid.getField( - this.options.address_fields?.phone as string + this.options.address_fields?.[`phone${phoneIndex}`] as string ) as HTMLInputElement; const recordField = ENGrid.getField( - this.options.phone_record_field as string + this.options[`phone${phoneIndex}_record_field`] as string ) as HTMLInputElement; const dateField = ENGrid.getField( - this.options.phone_date_field as string + this.options[`phone${phoneIndex}_date_field`] as string ) as HTMLInputElement; const statusField = ENGrid.getField( - this.options.phone_status_field as string + this.options[`phone${phoneIndex}_status_field`] as string ) as HTMLInputElement; let record: any = {}; record["formData"] = { [phoneField.name]: phoneField.value }; @@ -1297,10 +1343,22 @@ export class TidyContact { }); } if (this.canUsePhoneAPI()) { - formData.phone = ENGrid.getFieldValue( - this.options.address_fields?.phone as string + const phone1 = ENGrid.getFieldValue( + this.options.address_fields?.phone1 as string ); - formData.phoneCountry = ENGrid.getFieldValue("tc.phone.country"); + const phone2 = ENGrid.getFieldValue( + this.options.address_fields?.phone2 as string + ); + const phone1Country = ENGrid.getFieldValue("tc.phone1.country"); + const phone2Country = ENGrid.getFieldValue("tc.phone2.country"); + if (phone1 && phone1Country) { + formData.phone1 = phone1; + formData.phone1Country = phone1Country; + } + if (phone2 && phone2Country) { + formData.phone2 = phone2; + formData.phone2Country = phone2Country; + } } this.wasCalled = true; this.logger.log("FormData", JSON.parse(JSON.stringify(formData))); @@ -1370,8 +1428,13 @@ export class TidyContact { "error" in data ? `ERROR: ` + data.error : "INVALIDADDRESS"; } } - if (this.phoneEnabled() && "phone" in data) { - await this.setPhoneDataFromAPI(data.phone, data.requestId); + if (this.phoneEnabled()) { + if("phone1" in data) { + await this.setPhoneDataFromAPI(data.phone1, data.requestId, 1); + } + if("phone2" in data) { + await this.setPhoneDataFromAPI(data.phone2, data.requestId, 2); + } } }) .catch((error) => { diff --git a/packages/styles/package-lock.json b/packages/styles/package-lock.json index 91c81b04..f2e6c262 100644 --- a/packages/styles/package-lock.json +++ b/packages/styles/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "@4site/engrid-styles", - "version": "0.22.4", + "version": "0.23.4", "license": "Unlicense", "dependencies": { "sanitize.css": "^11.0.1", diff --git a/packages/styles/package.json b/packages/styles/package.json index 97eed947..84b42a26 100644 --- a/packages/styles/package.json +++ b/packages/styles/package.json @@ -1,42 +1,37 @@ { - "name": "@4site/engrid-styles", - "version": "0.23.4", - "description": "Main SASS Styles for the ENgrid Project", - "main": "./src/main.scss", - "scripts": { - "build": "sass src:dist --load-path=node_modules", - "watch": "nodemon -e scss -x \"npm run build\"", - "postpublish": "git push origin --tags" - }, - "keywords": [ - "Engaging Networks", - "ENgrid", - "4Site Studios", - "4Site", - "Page Templates", - "Non Profit", - "Non-Profit", - "CRM" - ], - "author": "4Site Studios", - "license": "Unlicense", - "bugs": { - "url": "https://github.com/4site-interactive-studios/engrid/issues" - }, - "homepage": "https://github.com/4site-interactive-studios/engrid#readme", - "url": "https://github.com/4site-interactive-studios/engrid", - "devDependencies": { - "nodemon": "^2.0.22", - "sass": "^1.45.2" - }, - "dependencies": { - "sanitize.css": "^11.0.1", - "tippy.js": "^6.3.1" - }, - "repository": { - "type": "git", - "url": "https://github.com/4site-interactive-studios/engrid.git", - "directory": "packages/styles" - }, - "gitHead": "976e4e2380a08b9cb31a34bf3dbe1f63671b8b2c" + "name": "@4site/engrid-styles", + "version": "0.23.4", + "description": "Main SASS Styles for the ENgrid Project", + "main": "./src/main.scss", + "keywords": [ + "Engaging Networks", + "ENgrid", + "4Site Studios", + "4Site", + "Page Templates", + "Non Profit", + "Non-Profit", + "CRM" + ], + "author": "4Site Studios", + "license": "Unlicense", + "bugs": { + "url": "https://github.com/4site-interactive-studios/engrid/issues" + }, + "homepage": "https://github.com/4site-interactive-studios/engrid#readme", + "url": "https://github.com/4site-interactive-studios/engrid", + "devDependencies": { + "nodemon": "^2.0.22", + "sass": "^1.45.2" + }, + "dependencies": { + "sanitize.css": "^11.0.1", + "tippy.js": "^6.3.1" + }, + "repository": { + "type": "git", + "url": "https://github.com/4site-interactive-studios/engrid.git", + "directory": "packages/styles" + }, + "gitHead": "976e4e2380a08b9cb31a34bf3dbe1f63671b8b2c" } From 2fc1dc51ae31991811beb265d99601377c0a8601 Mon Sep 17 00:00:00 2001 From: Fernando Santos Date: Fri, 9 Jan 2026 18:27:16 -0500 Subject: [PATCH 2/8] Fix Lerna Packages --- package.json | 2 +- packages/scripts/package-lock.json | 926 ++++++++++++++--------------- packages/scripts/package.json | 54 +- packages/styles/package-lock.json | 828 +++++++++++++------------- packages/styles/package.json | 75 +-- 5 files changed, 948 insertions(+), 937 deletions(-) diff --git a/package.json b/package.json index 88fe9c18..7e607533 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ }, "scripts": { "watch": "lerna run watch", - "build": "lerna bootstrap && lerna run build", + "build": "lerna bootstrap & lerna run build", "version": "node ./write-version.js && npm run build && git add .", "make": "lerna run build && lerna publish --yes --cd-version patch", "make-feature": "lerna run build && lerna publish --yes --cd-version minor" diff --git a/packages/scripts/package-lock.json b/packages/scripts/package-lock.json index 57e14796..69aabfd2 100644 --- a/packages/scripts/package-lock.json +++ b/packages/scripts/package-lock.json @@ -1,465 +1,465 @@ { - "name": "@4site/engrid-scripts", - "version": "0.23.7", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "@4site/engrid-scripts", - "version": "0.23.7", - "license": "Unlicense", - "dependencies": { - "shuffle-seed": "^1.1.6", - "strongly-typed-events": "^2.0.9" - }, - "devDependencies": { - "nodemon": "^2.0.20" - } - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "dev": true, - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/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, - "engines": { - "node": ">=4" - } - }, - "node_modules/ignore-by-default": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", - "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", - "dev": true - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/nodemon": { - "version": "2.0.22", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.22.tgz", - "integrity": "sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ==", - "dev": true, - "dependencies": { - "chokidar": "^3.5.2", - "debug": "^3.2.7", - "ignore-by-default": "^1.0.1", - "minimatch": "^3.1.2", - "pstree.remy": "^1.1.8", - "semver": "^5.7.1", - "simple-update-notifier": "^1.0.7", - "supports-color": "^5.5.0", - "touch": "^3.1.0", - "undefsafe": "^2.0.5" - }, - "bin": { - "nodemon": "bin/nodemon.js" - }, - "engines": { - "node": ">=8.10.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/nodemon" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pstree.remy": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", - "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", - "dev": true - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/seedrandom": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-2.4.4.tgz", - "integrity": "sha512-9A+PDmgm+2du77B5i0Ip2cxOqqHjgNxnBgglxLcX78A2D6c2rTo61z4jnVABpF4cKeDMDG+cmXXvdnqse2VqMA==" - }, - "node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/shuffle-seed": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/shuffle-seed/-/shuffle-seed-1.1.6.tgz", - "integrity": "sha512-Vr9wlwMKJVUeFNGyc4aNbrzkI568gkve7ykyJ+1/cz78j3yRlJODWU0CuJ/fmk3MCjvAClpnqlycd/Y53UG3UA==", - "dependencies": { - "seedrandom": "^2.4.2" - } - }, - "node_modules/simple-update-notifier": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz", - "integrity": "sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg==", - "dev": true, - "dependencies": { - "semver": "~7.0.0" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/simple-update-notifier/node_modules/semver": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", - "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/ste-core": { - "version": "2.1.16", - "resolved": "https://registry.npmjs.org/ste-core/-/ste-core-2.1.16.tgz", - "integrity": "sha512-GgwwDFSDWbS2Ps1QliUHJPXeomvwZFfG5B10ggp+INmBD618MxwbA1qwFXdXjYGaS8JfiEC6NlpT3fp9PwfNHw==", - "engines": { - "node": ">=4.2.4" - } - }, - "node_modules/ste-events": { - "version": "2.1.16", - "resolved": "https://registry.npmjs.org/ste-events/-/ste-events-2.1.16.tgz", - "integrity": "sha512-DFTYyuiCaNC4rY8td1UB9zfsCtcUE9iy5PdKlkQJ8+7Yv/mjVKqKusfmmfbI9BfjTgawinixypInsc+LWx67HA==", - "dependencies": { - "ste-core": "^2.1.16" - }, - "engines": { - "node": ">=4.2.4" - } - }, - "node_modules/ste-promise-events": { - "version": "2.1.16", - "resolved": "https://registry.npmjs.org/ste-promise-events/-/ste-promise-events-2.1.16.tgz", - "integrity": "sha512-An/jUYfuhdj4k0ROwPi+x4UabRlCM8iN4EcmhgkKwKUA0v26dKx2eZ4NtaNEmddV77M3D01mXfE5Ddq+o69ulQ==", - "dependencies": { - "ste-core": "^2.1.16" - }, - "engines": { - "node": ">=4.2.4" - } - }, - "node_modules/ste-promise-signals": { - "version": "2.1.16", - "resolved": "https://registry.npmjs.org/ste-promise-signals/-/ste-promise-signals-2.1.16.tgz", - "integrity": "sha512-op/OvmTVeq4t4X7+5qTqcFTHgCVdRLNcqgamOfK4t1oeSVNZsxtODqJ7+fJqh4RCx27y4xMWqpB3p9vvdetzEw==", - "dependencies": { - "ste-core": "^2.1.16" - }, - "engines": { - "node": ">=4.2.4" - } - }, - "node_modules/ste-promise-simple-events": { - "version": "2.1.16", - "resolved": "https://registry.npmjs.org/ste-promise-simple-events/-/ste-promise-simple-events-2.1.16.tgz", - "integrity": "sha512-jAI0z8oCvcsVQ94kKz2pVtzskI8ODhM4jYJMP4U+K9InONcicKleA+5EKrzGzLjn0WKBd3hegJfM6Vy/Cv5HNA==", - "dependencies": { - "ste-core": "^2.1.16" - }, - "engines": { - "node": ">=4.2.4" - } - }, - "node_modules/ste-signals": { - "version": "2.1.16", - "resolved": "https://registry.npmjs.org/ste-signals/-/ste-signals-2.1.16.tgz", - "integrity": "sha512-odMJ3xG4AIKIyBCL3to4BIBgEpIzpQsyJgt9MbgOAmyUD3FZBMymM8x5QkW0qXXH9RnHnKcaEOOMw6+DUgx77w==", - "dependencies": { - "ste-core": "^2.1.16" - }, - "engines": { - "node": ">=4.2.4" - } - }, - "node_modules/ste-simple-events": { - "version": "2.1.16", - "resolved": "https://registry.npmjs.org/ste-simple-events/-/ste-simple-events-2.1.16.tgz", - "integrity": "sha512-B4gdrRg9jnbJE8sICjbx9NFb04KJn1WYWiXoon/YsD+3DWii4XyE3rMU6ZeJI6GG2s9mNExloNZMGcC9zSKh8A==", - "dependencies": { - "ste-core": "^2.1.16" - }, - "engines": { - "node": ">=4.2.4" - } - }, - "node_modules/strongly-typed-events": { - "version": "2.1.16", - "resolved": "https://registry.npmjs.org/strongly-typed-events/-/strongly-typed-events-2.1.16.tgz", - "integrity": "sha512-y3wh36XtzAg0gWEOnVGloWthmUrdLmeGSddkV1yFHrNHBGAtcjTMvp0ESRVIvKWC8+IVyqzacDPuNPmDTXly0g==", - "dependencies": { - "ste-core": "^2.1.16", - "ste-events": "^2.1.16", - "ste-promise-events": "^2.1.16", - "ste-promise-signals": "^2.1.16", - "ste-promise-simple-events": "^2.1.16", - "ste-signals": "^2.1.16", - "ste-simple-events": "^2.1.16" - }, - "engines": { - "node": ">=4.2.4" - } - }, - "node_modules/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, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/touch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.1.tgz", - "integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==", - "dev": true, - "bin": { - "nodetouch": "bin/nodetouch.js" - } - }, - "node_modules/undefsafe": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", - "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", - "dev": true - } - } + "name": "@4site/engrid-scripts", + "version": "0.23.7", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@4site/engrid-scripts", + "version": "0.23.7", + "license": "Unlicense", + "dependencies": { + "shuffle-seed": "^1.1.6", + "strongly-typed-events": "^2.0.9" + }, + "devDependencies": { + "nodemon": "^2.0.20" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/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, + "engines": { + "node": ">=4" + } + }, + "node_modules/ignore-by-default": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", + "dev": true + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/nodemon": { + "version": "2.0.22", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.22.tgz", + "integrity": "sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ==", + "dev": true, + "dependencies": { + "chokidar": "^3.5.2", + "debug": "^3.2.7", + "ignore-by-default": "^1.0.1", + "minimatch": "^3.1.2", + "pstree.remy": "^1.1.8", + "semver": "^5.7.1", + "simple-update-notifier": "^1.0.7", + "supports-color": "^5.5.0", + "touch": "^3.1.0", + "undefsafe": "^2.0.5" + }, + "bin": { + "nodemon": "bin/nodemon.js" + }, + "engines": { + "node": ">=8.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nodemon" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pstree.remy": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", + "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", + "dev": true + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/seedrandom": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-2.4.4.tgz", + "integrity": "sha512-9A+PDmgm+2du77B5i0Ip2cxOqqHjgNxnBgglxLcX78A2D6c2rTo61z4jnVABpF4cKeDMDG+cmXXvdnqse2VqMA==" + }, + "node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/shuffle-seed": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/shuffle-seed/-/shuffle-seed-1.1.6.tgz", + "integrity": "sha512-Vr9wlwMKJVUeFNGyc4aNbrzkI568gkve7ykyJ+1/cz78j3yRlJODWU0CuJ/fmk3MCjvAClpnqlycd/Y53UG3UA==", + "dependencies": { + "seedrandom": "^2.4.2" + } + }, + "node_modules/simple-update-notifier": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz", + "integrity": "sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg==", + "dev": true, + "dependencies": { + "semver": "~7.0.0" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/simple-update-notifier/node_modules/semver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/ste-core": { + "version": "2.1.16", + "resolved": "https://registry.npmjs.org/ste-core/-/ste-core-2.1.16.tgz", + "integrity": "sha512-GgwwDFSDWbS2Ps1QliUHJPXeomvwZFfG5B10ggp+INmBD618MxwbA1qwFXdXjYGaS8JfiEC6NlpT3fp9PwfNHw==", + "engines": { + "node": ">=4.2.4" + } + }, + "node_modules/ste-events": { + "version": "2.1.16", + "resolved": "https://registry.npmjs.org/ste-events/-/ste-events-2.1.16.tgz", + "integrity": "sha512-DFTYyuiCaNC4rY8td1UB9zfsCtcUE9iy5PdKlkQJ8+7Yv/mjVKqKusfmmfbI9BfjTgawinixypInsc+LWx67HA==", + "dependencies": { + "ste-core": "^2.1.16" + }, + "engines": { + "node": ">=4.2.4" + } + }, + "node_modules/ste-promise-events": { + "version": "2.1.16", + "resolved": "https://registry.npmjs.org/ste-promise-events/-/ste-promise-events-2.1.16.tgz", + "integrity": "sha512-An/jUYfuhdj4k0ROwPi+x4UabRlCM8iN4EcmhgkKwKUA0v26dKx2eZ4NtaNEmddV77M3D01mXfE5Ddq+o69ulQ==", + "dependencies": { + "ste-core": "^2.1.16" + }, + "engines": { + "node": ">=4.2.4" + } + }, + "node_modules/ste-promise-signals": { + "version": "2.1.16", + "resolved": "https://registry.npmjs.org/ste-promise-signals/-/ste-promise-signals-2.1.16.tgz", + "integrity": "sha512-op/OvmTVeq4t4X7+5qTqcFTHgCVdRLNcqgamOfK4t1oeSVNZsxtODqJ7+fJqh4RCx27y4xMWqpB3p9vvdetzEw==", + "dependencies": { + "ste-core": "^2.1.16" + }, + "engines": { + "node": ">=4.2.4" + } + }, + "node_modules/ste-promise-simple-events": { + "version": "2.1.16", + "resolved": "https://registry.npmjs.org/ste-promise-simple-events/-/ste-promise-simple-events-2.1.16.tgz", + "integrity": "sha512-jAI0z8oCvcsVQ94kKz2pVtzskI8ODhM4jYJMP4U+K9InONcicKleA+5EKrzGzLjn0WKBd3hegJfM6Vy/Cv5HNA==", + "dependencies": { + "ste-core": "^2.1.16" + }, + "engines": { + "node": ">=4.2.4" + } + }, + "node_modules/ste-signals": { + "version": "2.1.16", + "resolved": "https://registry.npmjs.org/ste-signals/-/ste-signals-2.1.16.tgz", + "integrity": "sha512-odMJ3xG4AIKIyBCL3to4BIBgEpIzpQsyJgt9MbgOAmyUD3FZBMymM8x5QkW0qXXH9RnHnKcaEOOMw6+DUgx77w==", + "dependencies": { + "ste-core": "^2.1.16" + }, + "engines": { + "node": ">=4.2.4" + } + }, + "node_modules/ste-simple-events": { + "version": "2.1.16", + "resolved": "https://registry.npmjs.org/ste-simple-events/-/ste-simple-events-2.1.16.tgz", + "integrity": "sha512-B4gdrRg9jnbJE8sICjbx9NFb04KJn1WYWiXoon/YsD+3DWii4XyE3rMU6ZeJI6GG2s9mNExloNZMGcC9zSKh8A==", + "dependencies": { + "ste-core": "^2.1.16" + }, + "engines": { + "node": ">=4.2.4" + } + }, + "node_modules/strongly-typed-events": { + "version": "2.1.16", + "resolved": "https://registry.npmjs.org/strongly-typed-events/-/strongly-typed-events-2.1.16.tgz", + "integrity": "sha512-y3wh36XtzAg0gWEOnVGloWthmUrdLmeGSddkV1yFHrNHBGAtcjTMvp0ESRVIvKWC8+IVyqzacDPuNPmDTXly0g==", + "dependencies": { + "ste-core": "^2.1.16", + "ste-events": "^2.1.16", + "ste-promise-events": "^2.1.16", + "ste-promise-signals": "^2.1.16", + "ste-promise-simple-events": "^2.1.16", + "ste-signals": "^2.1.16", + "ste-simple-events": "^2.1.16" + }, + "engines": { + "node": ">=4.2.4" + } + }, + "node_modules/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, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/touch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.1.tgz", + "integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==", + "dev": true, + "bin": { + "nodetouch": "bin/nodetouch.js" + } + }, + "node_modules/undefsafe": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", + "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", + "dev": true + } + } } diff --git a/packages/scripts/package.json b/packages/scripts/package.json index b8c60e48..eee5f729 100644 --- a/packages/scripts/package.json +++ b/packages/scripts/package.json @@ -1,26 +1,32 @@ { - "name": "@4site/engrid-scripts", - "version": "0.23.7", - "description": "Scripts for the ENGRID Project", - "main": "./dist/index.js", - "types": "./dist/index.d.ts", - "repository": { - "type": "git", - "url": "https://github.com/4site-interactive-studios/engrid.git", - "directory": "packages/scripts" - }, - "author": "4Site Studios", - "license": "Unlicense", - "bugs": { - "url": "https://github.com/4site-interactive-studios/engrid/issues" - }, - "dependencies": { - "shuffle-seed": "^1.1.6", - "strongly-typed-events": "^2.0.9" - }, - "homepage": "https://github.com/4site-interactive-studios/engrid#readme", - "gitHead": "f72c96b7127b4aad91d5a33a2fa0a29a5122e08e", - "devDependencies": { - "nodemon": "^2.0.20" - } + "name": "@4site/engrid-scripts", + "version": "0.23.7", + "description": "Scripts for the ENGRID Project", + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "scripts": { + "build": "tsc", + "prepublishOnly": "npm run build", + "postpublish": "git push origin --tags", + "watch": "nodemon -w src -e json,ts -x npm run build" + }, + "repository": { + "type": "git", + "url": "https://github.com/4site-interactive-studios/engrid.git", + "directory": "packages/scripts" + }, + "author": "4Site Studios", + "license": "Unlicense", + "bugs": { + "url": "https://github.com/4site-interactive-studios/engrid/issues" + }, + "dependencies": { + "shuffle-seed": "^1.1.6", + "strongly-typed-events": "^2.0.9" + }, + "homepage": "https://github.com/4site-interactive-studios/engrid#readme", + "gitHead": "f72c96b7127b4aad91d5a33a2fa0a29a5122e08e", + "devDependencies": { + "nodemon": "^2.0.20" + } } diff --git a/packages/styles/package-lock.json b/packages/styles/package-lock.json index f2e6c262..ffe1add4 100644 --- a/packages/styles/package-lock.json +++ b/packages/styles/package-lock.json @@ -1,416 +1,416 @@ { - "name": "@4site/engrid-styles", - "version": "0.23.4", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "@4site/engrid-styles", - "version": "0.23.4", - "license": "Unlicense", - "dependencies": { - "sanitize.css": "^11.0.1", - "tippy.js": "^6.3.1" - }, - "devDependencies": { - "nodemon": "^2.0.22", - "sass": "^1.45.2" - } - }, - "node_modules/@popperjs/core": { - "version": "2.11.8", - "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", - "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/popperjs" - } - }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "dev": true, - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/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, - "engines": { - "node": ">=4" - } - }, - "node_modules/ignore-by-default": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", - "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", - "dev": true - }, - "node_modules/immutable": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.7.tgz", - "integrity": "sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==", - "dev": true - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/nodemon": { - "version": "2.0.22", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.22.tgz", - "integrity": "sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ==", - "dev": true, - "dependencies": { - "chokidar": "^3.5.2", - "debug": "^3.2.7", - "ignore-by-default": "^1.0.1", - "minimatch": "^3.1.2", - "pstree.remy": "^1.1.8", - "semver": "^5.7.1", - "simple-update-notifier": "^1.0.7", - "supports-color": "^5.5.0", - "touch": "^3.1.0", - "undefsafe": "^2.0.5" - }, - "bin": { - "nodemon": "bin/nodemon.js" - }, - "engines": { - "node": ">=8.10.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/nodemon" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pstree.remy": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", - "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", - "dev": true - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/sanitize.css": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/sanitize.css/-/sanitize.css-11.0.1.tgz", - "integrity": "sha512-Q762QXJGHIyFLayll6zUueGKslmGxNpbEDpSB/sdaZ9Xgz+v6AYlVc5P49sorc9cPR9y47npHBfXswGo1I32tg==" - }, - "node_modules/sass": { - "version": "1.77.8", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.77.8.tgz", - "integrity": "sha512-4UHg6prsrycW20fqLGPShtEvo/WyHRVRHwOP4DzkUrObWoWI05QBSfzU71TVB7PFaL104TwNaHpjlWXAZbQiNQ==", - "dev": true, - "dependencies": { - "chokidar": ">=3.0.0 <4.0.0", - "immutable": "^4.0.0", - "source-map-js": ">=0.6.2 <2.0.0" - }, - "bin": { - "sass": "sass.js" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/simple-update-notifier": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz", - "integrity": "sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg==", - "dev": true, - "dependencies": { - "semver": "~7.0.0" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/simple-update-notifier/node_modules/semver": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", - "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "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==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/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, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/tippy.js": { - "version": "6.3.7", - "resolved": "https://registry.npmjs.org/tippy.js/-/tippy.js-6.3.7.tgz", - "integrity": "sha512-E1d3oP2emgJ9dRQZdf3Kkn0qJgI6ZLpyS5z6ZkY1DF3kaQaBsGZsndEpHwx+eC+tYM41HaSNvNtLx8tU57FzTQ==", - "dependencies": { - "@popperjs/core": "^2.9.0" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/touch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.1.tgz", - "integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==", - "dev": true, - "bin": { - "nodetouch": "bin/nodetouch.js" - } - }, - "node_modules/undefsafe": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", - "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", - "dev": true - } - } + "name": "@4site/engrid-styles", + "version": "0.23.4", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@4site/engrid-styles", + "version": "0.23.4", + "license": "Unlicense", + "dependencies": { + "sanitize.css": "^11.0.1", + "tippy.js": "^6.3.1" + }, + "devDependencies": { + "nodemon": "^2.0.22", + "sass": "^1.45.2" + } + }, + "node_modules/@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/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, + "engines": { + "node": ">=4" + } + }, + "node_modules/ignore-by-default": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", + "dev": true + }, + "node_modules/immutable": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.7.tgz", + "integrity": "sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==", + "dev": true + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/nodemon": { + "version": "2.0.22", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.22.tgz", + "integrity": "sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ==", + "dev": true, + "dependencies": { + "chokidar": "^3.5.2", + "debug": "^3.2.7", + "ignore-by-default": "^1.0.1", + "minimatch": "^3.1.2", + "pstree.remy": "^1.1.8", + "semver": "^5.7.1", + "simple-update-notifier": "^1.0.7", + "supports-color": "^5.5.0", + "touch": "^3.1.0", + "undefsafe": "^2.0.5" + }, + "bin": { + "nodemon": "bin/nodemon.js" + }, + "engines": { + "node": ">=8.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nodemon" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pstree.remy": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", + "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", + "dev": true + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/sanitize.css": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/sanitize.css/-/sanitize.css-11.0.1.tgz", + "integrity": "sha512-Q762QXJGHIyFLayll6zUueGKslmGxNpbEDpSB/sdaZ9Xgz+v6AYlVc5P49sorc9cPR9y47npHBfXswGo1I32tg==" + }, + "node_modules/sass": { + "version": "1.77.8", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.77.8.tgz", + "integrity": "sha512-4UHg6prsrycW20fqLGPShtEvo/WyHRVRHwOP4DzkUrObWoWI05QBSfzU71TVB7PFaL104TwNaHpjlWXAZbQiNQ==", + "dev": true, + "dependencies": { + "chokidar": ">=3.0.0 <4.0.0", + "immutable": "^4.0.0", + "source-map-js": ">=0.6.2 <2.0.0" + }, + "bin": { + "sass": "sass.js" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/simple-update-notifier": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz", + "integrity": "sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg==", + "dev": true, + "dependencies": { + "semver": "~7.0.0" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/simple-update-notifier/node_modules/semver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "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==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/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, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/tippy.js": { + "version": "6.3.7", + "resolved": "https://registry.npmjs.org/tippy.js/-/tippy.js-6.3.7.tgz", + "integrity": "sha512-E1d3oP2emgJ9dRQZdf3Kkn0qJgI6ZLpyS5z6ZkY1DF3kaQaBsGZsndEpHwx+eC+tYM41HaSNvNtLx8tU57FzTQ==", + "dependencies": { + "@popperjs/core": "^2.9.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/touch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.1.tgz", + "integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==", + "dev": true, + "bin": { + "nodetouch": "bin/nodetouch.js" + } + }, + "node_modules/undefsafe": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", + "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", + "dev": true + } + } } diff --git a/packages/styles/package.json b/packages/styles/package.json index 84b42a26..97eed947 100644 --- a/packages/styles/package.json +++ b/packages/styles/package.json @@ -1,37 +1,42 @@ { - "name": "@4site/engrid-styles", - "version": "0.23.4", - "description": "Main SASS Styles for the ENgrid Project", - "main": "./src/main.scss", - "keywords": [ - "Engaging Networks", - "ENgrid", - "4Site Studios", - "4Site", - "Page Templates", - "Non Profit", - "Non-Profit", - "CRM" - ], - "author": "4Site Studios", - "license": "Unlicense", - "bugs": { - "url": "https://github.com/4site-interactive-studios/engrid/issues" - }, - "homepage": "https://github.com/4site-interactive-studios/engrid#readme", - "url": "https://github.com/4site-interactive-studios/engrid", - "devDependencies": { - "nodemon": "^2.0.22", - "sass": "^1.45.2" - }, - "dependencies": { - "sanitize.css": "^11.0.1", - "tippy.js": "^6.3.1" - }, - "repository": { - "type": "git", - "url": "https://github.com/4site-interactive-studios/engrid.git", - "directory": "packages/styles" - }, - "gitHead": "976e4e2380a08b9cb31a34bf3dbe1f63671b8b2c" + "name": "@4site/engrid-styles", + "version": "0.23.4", + "description": "Main SASS Styles for the ENgrid Project", + "main": "./src/main.scss", + "scripts": { + "build": "sass src:dist --load-path=node_modules", + "watch": "nodemon -e scss -x \"npm run build\"", + "postpublish": "git push origin --tags" + }, + "keywords": [ + "Engaging Networks", + "ENgrid", + "4Site Studios", + "4Site", + "Page Templates", + "Non Profit", + "Non-Profit", + "CRM" + ], + "author": "4Site Studios", + "license": "Unlicense", + "bugs": { + "url": "https://github.com/4site-interactive-studios/engrid/issues" + }, + "homepage": "https://github.com/4site-interactive-studios/engrid#readme", + "url": "https://github.com/4site-interactive-studios/engrid", + "devDependencies": { + "nodemon": "^2.0.22", + "sass": "^1.45.2" + }, + "dependencies": { + "sanitize.css": "^11.0.1", + "tippy.js": "^6.3.1" + }, + "repository": { + "type": "git", + "url": "https://github.com/4site-interactive-studios/engrid.git", + "directory": "packages/styles" + }, + "gitHead": "976e4e2380a08b9cb31a34bf3dbe1f63671b8b2c" } From bb5f928f7f71009fef366f037d53f3198c4e0fda Mon Sep 17 00:00:00 2001 From: Fernando Santos Date: Fri, 9 Jan 2026 18:28:20 -0500 Subject: [PATCH 3/8] TidyContact Assets --- packages/scripts/dist/interfaces/options.d.ts | 12 +- packages/scripts/dist/tidycontact.js | 190 +++++++++++------- 2 files changed, 130 insertions(+), 72 deletions(-) diff --git a/packages/scripts/dist/interfaces/options.d.ts b/packages/scripts/dist/interfaces/options.d.ts index 51c41434..9f8cc324 100644 --- a/packages/scripts/dist/interfaces/options.d.ts +++ b/packages/scripts/dist/interfaces/options.d.ts @@ -66,15 +66,19 @@ export interface Options { region: string; postalCode: string; country: string; - phone: string; + phone1: string; + phone2: string; }; phone_enable?: boolean; phone_flags?: boolean; phone_country_from_ip?: boolean; phone_preferred_countries?: string[]; - phone_record_field?: string; - phone_date_field?: string; - phone_status_field?: string; + phone1_record_field?: string; + phone1_date_field?: string; + phone1_status_field?: string; + phone2_record_field?: string; + phone2_date_field?: string; + phone2_status_field?: string; }; MobileCTA?: false | { pageType: string; diff --git a/packages/scripts/dist/tidycontact.js b/packages/scripts/dist/tidycontact.js index 50e60b1b..891326a2 100644 --- a/packages/scripts/dist/tidycontact.js +++ b/packages/scripts/dist/tidycontact.js @@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge import { EnForm, ENGrid, EngridLogger } from "."; export class TidyContact { constructor() { - var _a, _b, _c, _d, _e; + var _a, _b, _c, _d, _e, _f, _g; this.logger = new EngridLogger("TidyContact", "#FFFFFF", "#4d9068", "📧"); this.endpoint = "https://api.tidycontact.io"; this.wasCalled = false; // True if the API endpoint was called @@ -283,18 +283,27 @@ export class TidyContact { this.isDirty = true; } if (this.phoneEnabled()) { - this.createPhoneFields(); this.createPhoneMarginVariable(); + this.createPhoneFields(1); + this.createPhoneFields(2); this.logger.log("Phone Standardization is enabled"); if (this.countryDropDownEnabled()) { - this.renderFlagsDropDown(); + this.renderFlagsDropDown(1); + this.renderFlagsDropDown(2); + } + const phone1Field = ENGrid.getField((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.address_fields) === null || _e === void 0 ? void 0 : _e.phone1); + const phone2Field = ENGrid.getField((_g = (_f = this.options) === null || _f === void 0 ? void 0 : _f.address_fields) === null || _g === void 0 ? void 0 : _g.phone2); + if (phone1Field) { + phone1Field.addEventListener("keyup", (e) => { + this.handlePhoneInputKeydown(e, 1); + }); + this.setDefaultPhoneCountry(1); } - const phoneField = ENGrid.getField((_e = (_d = this.options) === null || _d === void 0 ? void 0 : _d.address_fields) === null || _e === void 0 ? void 0 : _e.phone); - if (phoneField) { - phoneField.addEventListener("keyup", (e) => { - this.handlePhoneInputKeydown(e); + if (phone2Field) { + phone2Field.addEventListener("keyup", (e) => { + this.handlePhoneInputKeydown(e, 2); }); - this.setDefaultPhoneCountry(); + this.setDefaultPhoneCountry(2); } } } @@ -310,7 +319,8 @@ export class TidyContact { region: "supporter.region", postalCode: "supporter.postcode", country: "supporter.country", - phone: "supporter.phoneNumber2", // Phone field + phone1: "supporter.phoneNumber", + phone2: "supporter.phoneNumber2", // Phone 2 field }; } this.options.address_enable = (_a = this.options.address_enable) !== null && _a !== void 0 ? _a : true; @@ -369,40 +379,46 @@ export class TidyContact { this.logger.log("Creating Hidden Field: " + ((_f = this.options.address_fields) === null || _f === void 0 ? void 0 : _f.address3)); } } - createPhoneFields() { + createPhoneFields(phoneIndex = 1) { if (!this.options) return; - ENGrid.createHiddenInput("tc.phone.country", ""); - this.logger.log("Creating hidden field: tc.phone.country"); - if (this.options.phone_record_field) { - const recordField = ENGrid.getField(this.options.phone_record_field); + if (phoneIndex !== 1 && phoneIndex !== 2) { + throw new Error("phoneIndex must be an integer value of 1 or 2"); + } + ENGrid.createHiddenInput(`tc.phone${phoneIndex}.country`, ""); + this.logger.log(`Creating hidden field: tc.phone${phoneIndex}.country`); + if (this.options[`phone${phoneIndex}_record_field`]) { + const recordField = ENGrid.getField(this.options[`phone${phoneIndex}_record_field`]); if (!recordField) { - ENGrid.createHiddenInput(this.options.phone_record_field, ""); - this.logger.log("Creating hidden field: " + this.options.phone_record_field); + ENGrid.createHiddenInput(this.options[`phone${phoneIndex}_record_field`], ""); + this.logger.log("Creating hidden field: " + this.options[`phone${phoneIndex}_record_field`]); } } - if (this.options.phone_date_field) { - const dateField = ENGrid.getField(this.options.phone_date_field); + if (this.options[`phone${phoneIndex}_date_field`]) { + const dateField = ENGrid.getField(this.options[`phone${phoneIndex}_date_field`]); if (!dateField) { - ENGrid.createHiddenInput(this.options.phone_date_field, ""); - this.logger.log("Creating hidden field: " + this.options.phone_date_field); + ENGrid.createHiddenInput(this.options[`phone${phoneIndex}_date_field`], ""); + this.logger.log("Creating hidden field: " + this.options[`phone${phoneIndex}_date_field`]); } } - if (this.options.phone_status_field) { - const statusField = ENGrid.getField(this.options.phone_status_field); + if (this.options[`phone${phoneIndex}_status_field`]) { + const statusField = ENGrid.getField(this.options[`phone${phoneIndex}_status_field`]); if (!statusField) { - ENGrid.createHiddenInput(this.options.phone_status_field, ""); - this.logger.log("Creating hidden field: " + this.options.phone_status_field); + ENGrid.createHiddenInput(this.options[`phone${phoneIndex}_status_field`], ""); + this.logger.log("Creating hidden field: " + this.options[`phone${phoneIndex}_status_field`]); } } } createPhoneMarginVariable() { - var _a; + var _a, _b; if (!this.options) return; - const phone = ENGrid.getField((_a = this.options.address_fields) === null || _a === void 0 ? void 0 : _a.phone); - if (phone) { - const phoneStyle = window.getComputedStyle(phone); + const phone1 = ENGrid.getField((_a = this.options.address_fields) === null || _a === void 0 ? void 0 : _a.phone1); + const phone2 = ENGrid.getField((_b = this.options.address_fields) === null || _b === void 0 ? void 0 : _b.phone2); + const phoneField = phone1 || phone2; + console.log('createPhoneMarginVariable', phoneField); + if (phoneField) { + const phoneStyle = window.getComputedStyle(phoneField); const marginTop = phoneStyle.marginTop; const marginBottom = phoneStyle.marginBottom; document.documentElement.style.setProperty("--tc-phone-margin-top", marginTop); @@ -610,13 +626,15 @@ export class TidyContact { return false; } canUsePhoneAPI() { - var _a; + var _a, _b; if (!this.options) return false; if (this.phoneEnabled()) { - const phone = !!ENGrid.getFieldValue((_a = this.options.address_fields) === null || _a === void 0 ? void 0 : _a.phone); - const countryPhone = !!ENGrid.getFieldValue("tc.phone.country"); - return phone && countryPhone; + const phone1 = !!ENGrid.getFieldValue((_a = this.options.address_fields) === null || _a === void 0 ? void 0 : _a.phone1); + const phone2 = !!ENGrid.getFieldValue((_b = this.options.address_fields) === null || _b === void 0 ? void 0 : _b.phone2); + const countryPhone1 = !!ENGrid.getFieldValue("tc.phone1.country"); + const countryPhone2 = !!ENGrid.getFieldValue("tc.phone2.country"); + return (phone1 && countryPhone1) || (phone2 && countryPhone2); } this.logger.log("Phone API is not enabled"); return false; @@ -661,11 +679,14 @@ export class TidyContact { }); }); } - renderFlagsDropDown() { + renderFlagsDropDown(phoneIndex = 1) { var _a; if (!this.options) return; - const phoneInput = ENGrid.getField((_a = this.options.address_fields) === null || _a === void 0 ? void 0 : _a.phone); + if (phoneIndex !== 1 && phoneIndex !== 2) { + throw new Error("phoneIndex must be an integer value of 1 or 2"); + } + const phoneInput = ENGrid.getField((_a = this.options.address_fields) === null || _a === void 0 ? void 0 : _a[`phone${phoneIndex}`]); if (!phoneInput) return; this.countries_dropdown = document.createElement("div"); @@ -690,7 +711,7 @@ export class TidyContact { e.preventDefault(); e.stopPropagation(); if (selectedFlag.classList.contains("tc-open")) { - this.closeCountryDropDown(); + this.closeCountryDropDown(phoneIndex); } else { this.openCountryDropDown(); @@ -736,7 +757,7 @@ export class TidyContact { if (target.classList.contains("tc-country-list-item")) { const countryItem = this.getCountryByCode(target.getAttribute("data-country-code")); if (countryItem) { - this.setPhoneCountry(countryItem); + this.setPhoneCountry(countryItem, phoneIndex); } } }); @@ -766,7 +787,7 @@ export class TidyContact { } // allow navigation from dropdown to input on TAB if (e.key === "Tab") - this.closeCountryDropDown(); + this.closeCountryDropDown(phoneIndex); }); document.addEventListener("keydown", (e) => { var _a, _b; @@ -783,10 +804,10 @@ export class TidyContact { this.handleUpDownKey(e.key); // enter to select else if (e.key === "Enter") - this.handleEnterKey(); + this.handleEnterKey(phoneIndex); // esc to close else if (e.key === "Escape") - this.closeCountryDropDown(); + this.closeCountryDropDown(phoneIndex); } }); document.addEventListener("click", (e) => { @@ -794,7 +815,7 @@ export class TidyContact { const isDropdownHidden = (_b = (_a = this.countries_dropdown) === null || _a === void 0 ? void 0 : _a.querySelector(".tc-country-list")) === null || _b === void 0 ? void 0 : _b.classList.contains("tc-hide"); if (!isDropdownHidden && !e.target.closest(".tc-country-list")) { - this.closeCountryDropDown(); + this.closeCountryDropDown(phoneIndex); } }); } @@ -816,25 +837,31 @@ export class TidyContact { } } } - handleEnterKey() { + handleEnterKey(phoneIndex = 1) { var _a; + if (phoneIndex !== 1 && phoneIndex !== 2) { + throw new Error("phoneIndex must be an integer value of 1 or 2"); + } const highlightedCountry = (_a = this.countries_dropdown) === null || _a === void 0 ? void 0 : _a.querySelector(".tc-highlight"); if (highlightedCountry) { const countryItem = this.getCountryByCode(highlightedCountry === null || highlightedCountry === void 0 ? void 0 : highlightedCountry.getAttribute("data-country-code")); - this.setPhoneCountry(countryItem); + this.setPhoneCountry(countryItem, phoneIndex); } } - handlePhoneInputKeydown(e) { + handlePhoneInputKeydown(e, phoneIndex = 1) { + if (phoneIndex !== 1 && phoneIndex !== 2) { + throw new Error("phoneIndex must be an integer value of 1 or 2"); + } const phoneInput = e.target; const phoneNumber = phoneInput.value; if (phoneNumber.charAt(0) === "+") { if (phoneNumber.length > 2) { const countryItem = this.getCountryByCode(phoneNumber.substring(1, 3)); if (countryItem) { - this.setPhoneCountry(countryItem); + this.setPhoneCountry(countryItem, phoneIndex); } else { - this.setDefaultPhoneCountry(); + this.setDefaultPhoneCountry(phoneIndex); } } } @@ -850,12 +877,15 @@ export class TidyContact { selectedFlag.classList.add("tc-open"); } } - closeCountryDropDown() { + closeCountryDropDown(phoneIndex = 1) { var _a; if (!this.options) return; if (!this.countries_dropdown) return; + if (phoneIndex !== 1 && phoneIndex !== 2) { + throw new Error("phoneIndex must be an integer value of 1 or 2"); + } const countryList = this.countries_dropdown.querySelector(".tc-country-list"); const selectedFlag = this.countries_dropdown.querySelector(".tc-selected-flag"); if (countryList && selectedFlag) { @@ -863,7 +893,7 @@ export class TidyContact { selectedFlag.setAttribute("aria-expanded", "false"); selectedFlag.classList.remove("tc-open"); } - const phoneInput = ENGrid.getField((_a = this.options.address_fields) === null || _a === void 0 ? void 0 : _a.phone); + const phoneInput = ENGrid.getField((_a = this.options.address_fields) === null || _a === void 0 ? void 0 : _a[`phone${phoneIndex}`]); phoneInput.focus(); } getFlagImage(code, name) { @@ -905,19 +935,22 @@ export class TidyContact { } countryContainer.insertAdjacentHTML("beforeend", html); } - setDefaultPhoneCountry() { + setDefaultPhoneCountry(phoneIndex = 1) { var _a; if (!this.options) return; + if (phoneIndex !== 1 && phoneIndex !== 2) { + throw new Error("phoneIndex must be an integer value of 1 or 2"); + } // First, try to get the country from IP if (this.options.phone_country_from_ip) { this.getCountryFromIP() .then((country) => { this.logger.log("Country from IP:", country); - this.setPhoneCountry(this.getCountryByCode((country !== null && country !== void 0 ? country : "us").toLowerCase())); + this.setPhoneCountry(this.getCountryByCode((country !== null && country !== void 0 ? country : "us").toLowerCase()), phoneIndex); }) .catch((error) => { - this.setPhoneCountry(this.getCountryByCode("us")); + this.setPhoneCountry(this.getCountryByCode("us"), phoneIndex); }); return; } @@ -928,26 +961,29 @@ export class TidyContact { // Then, get the country code from the Text const countryData = this.getCountryByCode(countryText); if (countryData) { - this.setPhoneCountry(countryData); + this.setPhoneCountry(countryData, phoneIndex); return; } else if (this.options.phone_preferred_countries.length > 0) { // If no country code is found, use the first priority country - this.setPhoneCountry(this.getCountryByCode(this.options.phone_preferred_countries[0])); + this.setPhoneCountry(this.getCountryByCode(this.options.phone_preferred_countries[0]), phoneIndex); return; } } // If nothing works, GO USA! - this.setPhoneCountry(this.getCountryByCode("us")); + this.setPhoneCountry(this.getCountryByCode("us"), phoneIndex); } - setPhoneCountry(country) { + setPhoneCountry(country, phoneIndex = 1) { var _a, _b, _c, _d, _e, _f; if (!this.options || !country) return; - const countryInput = ENGrid.getField("tc.phone.country"); + if (phoneIndex !== 1 && phoneIndex !== 2) { + throw new Error("phoneIndex must be an integer value of 1 or 2"); + } + const countryInput = ENGrid.getField(`tc.phone${phoneIndex}.country`); if (countryInput.value === country.code) return; - const phoneInput = ENGrid.getField((_a = this.options.address_fields) === null || _a === void 0 ? void 0 : _a.phone); + const phoneInput = ENGrid.getField((_a = this.options.address_fields) === null || _a === void 0 ? void 0 : _a[`phone${phoneIndex}`]); if (this.countryDropDownEnabled()) { const selectedFlag = (_b = this.countries_dropdown) === null || _b === void 0 ? void 0 : _b.querySelector(".tc-selected-flag"); const flagElement = (_c = this.countries_dropdown) === null || _c === void 0 ? void 0 : _c.querySelector(".tc-flag"); @@ -971,11 +1007,11 @@ export class TidyContact { countryListItem.classList.add("tc-highlight"); } if (selectedFlag === null || selectedFlag === void 0 ? void 0 : selectedFlag.classList.contains("tc-open")) - this.closeCountryDropDown(); + this.closeCountryDropDown(phoneIndex); } phoneInput.setAttribute("placeholder", country.placeholder); countryInput.value = country.code; - this.logger.log(`Setting phone country to ${country.code} - ${country.name}`); + this.logger.log(`Setting phone${phoneIndex} country to ${country.code} - ${country.name}`); } highlightCountry(countryCode) { var _a, _b; @@ -998,15 +1034,18 @@ export class TidyContact { } } } - setPhoneDataFromAPI(data, id) { + setPhoneDataFromAPI(data, id, phoneIndex = 1) { var _a; return __awaiter(this, void 0, void 0, function* () { if (!this.options) return; - const phoneField = ENGrid.getField((_a = this.options.address_fields) === null || _a === void 0 ? void 0 : _a.phone); - const recordField = ENGrid.getField(this.options.phone_record_field); - const dateField = ENGrid.getField(this.options.phone_date_field); - const statusField = ENGrid.getField(this.options.phone_status_field); + if (phoneIndex !== 1 && phoneIndex !== 2) { + throw new Error("phoneIndex must be an integer value of 1 or 2"); + } + const phoneField = ENGrid.getField((_a = this.options.address_fields) === null || _a === void 0 ? void 0 : _a[`phone${phoneIndex}`]); + const recordField = ENGrid.getField(this.options[`phone${phoneIndex}_record_field`]); + const dateField = ENGrid.getField(this.options[`phone${phoneIndex}_date_field`]); + const statusField = ENGrid.getField(this.options[`phone${phoneIndex}_status_field`]); let record = {}; record["formData"] = { [phoneField.name]: phoneField.value }; record["formatted"] = data.formatted; @@ -1056,7 +1095,7 @@ export class TidyContact { }); } callAPI() { - var _a, _b, _c, _d, _e, _f; + var _a, _b, _c, _d, _e, _f, _g; if (!this.options) return; if (!this.isDirty || this.wasCalled) @@ -1117,8 +1156,18 @@ export class TidyContact { }); } if (this.canUsePhoneAPI()) { - formData.phone = ENGrid.getFieldValue((_f = this.options.address_fields) === null || _f === void 0 ? void 0 : _f.phone); - formData.phoneCountry = ENGrid.getFieldValue("tc.phone.country"); + const phone1 = ENGrid.getFieldValue((_f = this.options.address_fields) === null || _f === void 0 ? void 0 : _f.phone1); + const phone2 = ENGrid.getFieldValue((_g = this.options.address_fields) === null || _g === void 0 ? void 0 : _g.phone2); + const phone1Country = ENGrid.getFieldValue("tc.phone1.country"); + const phone2Country = ENGrid.getFieldValue("tc.phone2.country"); + if (phone1 && phone1Country) { + formData.phone1 = phone1; + formData.phone1Country = phone1Country; + } + if (phone2 && phone2Country) { + formData.phone2 = phone2; + formData.phone2Country = phone2Country; + } } this.wasCalled = true; this.logger.log("FormData", JSON.parse(JSON.stringify(formData))); @@ -1183,8 +1232,13 @@ export class TidyContact { "error" in data ? `ERROR: ` + data.error : "INVALIDADDRESS"; } } - if (this.phoneEnabled() && "phone" in data) { - yield this.setPhoneDataFromAPI(data.phone, data.requestId); + if (this.phoneEnabled()) { + if ("phone1" in data) { + yield this.setPhoneDataFromAPI(data.phone1, data.requestId, 1); + } + if ("phone2" in data) { + yield this.setPhoneDataFromAPI(data.phone2, data.requestId, 2); + } } })) .catch((error) => { From 19cc5afde0c5d6d9a87e00358b747f84fb7ac50e Mon Sep 17 00:00:00 2001 From: cawecoy91 Date: Sun, 11 Jan 2026 18:40:52 -0300 Subject: [PATCH 4/8] TC with two phones: fix the order in which createPhoneMarginVariable() is called --- packages/scripts/src/tidycontact.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/scripts/src/tidycontact.ts b/packages/scripts/src/tidycontact.ts index c46c0da7..c4105164 100644 --- a/packages/scripts/src/tidycontact.ts +++ b/packages/scripts/src/tidycontact.ts @@ -292,9 +292,9 @@ export class TidyContact { this.isDirty = true; } if (this.phoneEnabled()) { - this.createPhoneMarginVariable(); this.createPhoneFields(1); this.createPhoneFields(2); + this.createPhoneMarginVariable(); this.logger.log("Phone Standardization is enabled"); if (this.countryDropDownEnabled()) { this.renderFlagsDropDown(1); From 7842ef14a0fb7975eb4258cfc1c95ca679ce079c Mon Sep 17 00:00:00 2001 From: cawecoy91 Date: Sun, 11 Jan 2026 18:54:38 -0300 Subject: [PATCH 5/8] TC with two phones: keep primary phone params unchanged to avoid breaking existing integrations --- packages/scripts/dist/interfaces/options.d.ts | 6 +- packages/scripts/dist/tidycontact.js | 37 +++---- packages/scripts/src/interfaces/options.ts | 6 +- packages/scripts/src/tidycontact.ts | 99 ++++++++++++++----- 4 files changed, 101 insertions(+), 47 deletions(-) diff --git a/packages/scripts/dist/interfaces/options.d.ts b/packages/scripts/dist/interfaces/options.d.ts index 9f8cc324..aa8c7071 100644 --- a/packages/scripts/dist/interfaces/options.d.ts +++ b/packages/scripts/dist/interfaces/options.d.ts @@ -73,9 +73,9 @@ export interface Options { phone_flags?: boolean; phone_country_from_ip?: boolean; phone_preferred_countries?: string[]; - phone1_record_field?: string; - phone1_date_field?: string; - phone1_status_field?: string; + phone_record_field?: string; + phone_date_field?: string; + phone_status_field?: string; phone2_record_field?: string; phone2_date_field?: string; phone2_status_field?: string; diff --git a/packages/scripts/dist/tidycontact.js b/packages/scripts/dist/tidycontact.js index 891326a2..7a8d1642 100644 --- a/packages/scripts/dist/tidycontact.js +++ b/packages/scripts/dist/tidycontact.js @@ -283,9 +283,9 @@ export class TidyContact { this.isDirty = true; } if (this.phoneEnabled()) { - this.createPhoneMarginVariable(); this.createPhoneFields(1); this.createPhoneFields(2); + this.createPhoneMarginVariable(); this.logger.log("Phone Standardization is enabled"); if (this.countryDropDownEnabled()) { this.renderFlagsDropDown(1); @@ -387,25 +387,28 @@ export class TidyContact { } ENGrid.createHiddenInput(`tc.phone${phoneIndex}.country`, ""); this.logger.log(`Creating hidden field: tc.phone${phoneIndex}.country`); - if (this.options[`phone${phoneIndex}_record_field`]) { - const recordField = ENGrid.getField(this.options[`phone${phoneIndex}_record_field`]); + if (this.options[`phone${phoneIndex === 1 ? "" : phoneIndex}_record_field`]) { + const recordField = ENGrid.getField(this.options[`phone${phoneIndex === 1 ? "" : phoneIndex}_record_field`]); if (!recordField) { - ENGrid.createHiddenInput(this.options[`phone${phoneIndex}_record_field`], ""); - this.logger.log("Creating hidden field: " + this.options[`phone${phoneIndex}_record_field`]); + ENGrid.createHiddenInput(this.options[`phone${phoneIndex === 1 ? "" : phoneIndex}_record_field`], ""); + this.logger.log("Creating hidden field: " + + this.options[`phone${phoneIndex === 1 ? "" : phoneIndex}_record_field`]); } } - if (this.options[`phone${phoneIndex}_date_field`]) { - const dateField = ENGrid.getField(this.options[`phone${phoneIndex}_date_field`]); + if (this.options[`phone${phoneIndex === 1 ? "" : phoneIndex}_date_field`]) { + const dateField = ENGrid.getField(this.options[`phone${phoneIndex === 1 ? "" : phoneIndex}_date_field`]); if (!dateField) { - ENGrid.createHiddenInput(this.options[`phone${phoneIndex}_date_field`], ""); - this.logger.log("Creating hidden field: " + this.options[`phone${phoneIndex}_date_field`]); + ENGrid.createHiddenInput(this.options[`phone${phoneIndex === 1 ? "" : phoneIndex}_date_field`], ""); + this.logger.log("Creating hidden field: " + + this.options[`phone${phoneIndex === 1 ? "" : phoneIndex}_date_field`]); } } - if (this.options[`phone${phoneIndex}_status_field`]) { - const statusField = ENGrid.getField(this.options[`phone${phoneIndex}_status_field`]); + if (this.options[`phone${phoneIndex === 1 ? "" : phoneIndex}_status_field`]) { + const statusField = ENGrid.getField(this.options[`phone${phoneIndex === 1 ? "" : phoneIndex}_status_field`]); if (!statusField) { - ENGrid.createHiddenInput(this.options[`phone${phoneIndex}_status_field`], ""); - this.logger.log("Creating hidden field: " + this.options[`phone${phoneIndex}_status_field`]); + ENGrid.createHiddenInput(this.options[`phone${phoneIndex === 1 ? "" : phoneIndex}_status_field`], ""); + this.logger.log("Creating hidden field: " + + this.options[`phone${phoneIndex === 1 ? "" : phoneIndex}_status_field`]); } } } @@ -416,7 +419,7 @@ export class TidyContact { const phone1 = ENGrid.getField((_a = this.options.address_fields) === null || _a === void 0 ? void 0 : _a.phone1); const phone2 = ENGrid.getField((_b = this.options.address_fields) === null || _b === void 0 ? void 0 : _b.phone2); const phoneField = phone1 || phone2; - console.log('createPhoneMarginVariable', phoneField); + console.log("createPhoneMarginVariable", phoneField); if (phoneField) { const phoneStyle = window.getComputedStyle(phoneField); const marginTop = phoneStyle.marginTop; @@ -1043,9 +1046,9 @@ export class TidyContact { throw new Error("phoneIndex must be an integer value of 1 or 2"); } const phoneField = ENGrid.getField((_a = this.options.address_fields) === null || _a === void 0 ? void 0 : _a[`phone${phoneIndex}`]); - const recordField = ENGrid.getField(this.options[`phone${phoneIndex}_record_field`]); - const dateField = ENGrid.getField(this.options[`phone${phoneIndex}_date_field`]); - const statusField = ENGrid.getField(this.options[`phone${phoneIndex}_status_field`]); + const recordField = ENGrid.getField(this.options[`phone${phoneIndex === 1 ? "" : phoneIndex}_record_field`]); + const dateField = ENGrid.getField(this.options[`phone${phoneIndex === 1 ? "" : phoneIndex}_date_field`]); + const statusField = ENGrid.getField(this.options[`phone${phoneIndex === 1 ? "" : phoneIndex}_status_field`]); let record = {}; record["formData"] = { [phoneField.name]: phoneField.value }; record["formatted"] = data.formatted; diff --git a/packages/scripts/src/interfaces/options.ts b/packages/scripts/src/interfaces/options.ts index 1b854382..7500d86f 100644 --- a/packages/scripts/src/interfaces/options.ts +++ b/packages/scripts/src/interfaces/options.ts @@ -79,9 +79,9 @@ export interface Options { phone_flags?: boolean; // Phone flags phone_country_from_ip?: boolean; // Phone country from IP phone_preferred_countries?: string[]; // Prioritize some countries on the list - phone1_record_field?: string; // TidyContact Record - phone1_date_field?: string; // TidyContact Date - phone1_status_field?: string; // TidyContact Status + phone_record_field?: string; // TidyContact Record + phone_date_field?: string; // TidyContact Date + phone_status_field?: string; // TidyContact Status phone2_record_field?: string; // TidyContact Record phone2_date_field?: string; // TidyContact Date phone2_status_field?: string; // TidyContact Status diff --git a/packages/scripts/src/tidycontact.ts b/packages/scripts/src/tidycontact.ts index c4105164..86e2d8a5 100644 --- a/packages/scripts/src/tidycontact.ts +++ b/packages/scripts/src/tidycontact.ts @@ -412,30 +412,70 @@ export class TidyContact { } ENGrid.createHiddenInput(`tc.phone${phoneIndex}.country`, ""); this.logger.log(`Creating hidden field: tc.phone${phoneIndex}.country`); - if (this.options[`phone${phoneIndex}_record_field`]) { - const recordField = ENGrid.getField(this.options[`phone${phoneIndex}_record_field`] as string); + if ( + this.options[`phone${phoneIndex === 1 ? "" : phoneIndex}_record_field`] + ) { + const recordField = ENGrid.getField( + this.options[ + `phone${phoneIndex === 1 ? "" : phoneIndex}_record_field` + ] as string + ); if (!recordField) { - ENGrid.createHiddenInput(this.options[`phone${phoneIndex}_record_field`] as string, ""); + ENGrid.createHiddenInput( + this.options[ + `phone${phoneIndex === 1 ? "" : phoneIndex}_record_field` + ] as string, + "" + ); this.logger.log( - "Creating hidden field: " + this.options[`phone${phoneIndex}_record_field`] + "Creating hidden field: " + + this.options[ + `phone${phoneIndex === 1 ? "" : phoneIndex}_record_field` + ] ); } } - if (this.options[`phone${phoneIndex}_date_field`]) { - const dateField = ENGrid.getField(this.options[`phone${phoneIndex}_date_field`] as string); + if (this.options[`phone${phoneIndex === 1 ? "" : phoneIndex}_date_field`]) { + const dateField = ENGrid.getField( + this.options[ + `phone${phoneIndex === 1 ? "" : phoneIndex}_date_field` + ] as string + ); if (!dateField) { - ENGrid.createHiddenInput(this.options[`phone${phoneIndex}_date_field`] as string, ""); + ENGrid.createHiddenInput( + this.options[ + `phone${phoneIndex === 1 ? "" : phoneIndex}_date_field` + ] as string, + "" + ); this.logger.log( - "Creating hidden field: " + this.options[`phone${phoneIndex}_date_field`] + "Creating hidden field: " + + this.options[ + `phone${phoneIndex === 1 ? "" : phoneIndex}_date_field` + ] ); } } - if (this.options[`phone${phoneIndex}_status_field`]) { - const statusField = ENGrid.getField(this.options[`phone${phoneIndex}_status_field`] as string); + if ( + this.options[`phone${phoneIndex === 1 ? "" : phoneIndex}_status_field`] + ) { + const statusField = ENGrid.getField( + this.options[ + `phone${phoneIndex === 1 ? "" : phoneIndex}_status_field` + ] as string + ); if (!statusField) { - ENGrid.createHiddenInput(this.options[`phone${phoneIndex}_status_field`] as string, ""); + ENGrid.createHiddenInput( + this.options[ + `phone${phoneIndex === 1 ? "" : phoneIndex}_status_field` + ] as string, + "" + ); this.logger.log( - "Creating hidden field: " + this.options[`phone${phoneIndex}_status_field`] + "Creating hidden field: " + + this.options[ + `phone${phoneIndex === 1 ? "" : phoneIndex}_status_field` + ] ); } } @@ -449,7 +489,7 @@ export class TidyContact { this.options.address_fields?.phone2 as string ) as HTMLInputElement | null; const phoneField = phone1 || phone2; - console.log('createPhoneMarginVariable', phoneField); + console.log("createPhoneMarginVariable", phoneField); if (phoneField) { const phoneStyle = window.getComputedStyle(phoneField); const marginTop = phoneStyle.marginTop; @@ -949,7 +989,7 @@ export class TidyContact { } } private handleEnterKey(phoneIndex: number = 1) { - if( phoneIndex !== 1 && phoneIndex !== 2) { + if (phoneIndex !== 1 && phoneIndex !== 2) { throw new Error("phoneIndex must be an integer value of 1 or 2"); } const highlightedCountry = @@ -962,7 +1002,7 @@ export class TidyContact { } } private handlePhoneInputKeydown(e: Event, phoneIndex: number = 1) { - if( phoneIndex !== 1 && phoneIndex !== 2) { + if (phoneIndex !== 1 && phoneIndex !== 2) { throw new Error("phoneIndex must be an integer value of 1 or 2"); } const phoneInput = e.target as HTMLInputElement; @@ -1065,7 +1105,7 @@ export class TidyContact { } private setDefaultPhoneCountry(phoneIndex: number = 1) { if (!this.options) return; - if( phoneIndex !== 1 && phoneIndex !== 2) { + if (phoneIndex !== 1 && phoneIndex !== 2) { throw new Error("phoneIndex must be an integer value of 1 or 2"); } // First, try to get the country from IP @@ -1117,9 +1157,10 @@ export class TidyContact { dialCode: string; placeholder: string; } | null, - phoneIndex: number = 1) { + phoneIndex: number = 1 + ) { if (!this.options || !country) return; - if( phoneIndex !== 1 && phoneIndex !== 2) { + if (phoneIndex !== 1 && phoneIndex !== 2) { throw new Error("phoneIndex must be an integer value of 1 or 2"); } const countryInput = ENGrid.getField( @@ -1189,7 +1230,11 @@ export class TidyContact { } } } - private async setPhoneDataFromAPI(data: any, id: string, phoneIndex: number = 1) { + private async setPhoneDataFromAPI( + data: any, + id: string, + phoneIndex: number = 1 + ) { if (!this.options) return; if (phoneIndex !== 1 && phoneIndex !== 2) { throw new Error("phoneIndex must be an integer value of 1 or 2"); @@ -1198,13 +1243,19 @@ export class TidyContact { this.options.address_fields?.[`phone${phoneIndex}`] as string ) as HTMLInputElement; const recordField = ENGrid.getField( - this.options[`phone${phoneIndex}_record_field`] as string + this.options[ + `phone${phoneIndex === 1 ? "" : phoneIndex}_record_field` + ] as string ) as HTMLInputElement; const dateField = ENGrid.getField( - this.options[`phone${phoneIndex}_date_field`] as string + this.options[ + `phone${phoneIndex === 1 ? "" : phoneIndex}_date_field` + ] as string ) as HTMLInputElement; const statusField = ENGrid.getField( - this.options[`phone${phoneIndex}_status_field`] as string + this.options[ + `phone${phoneIndex === 1 ? "" : phoneIndex}_status_field` + ] as string ) as HTMLInputElement; let record: any = {}; record["formData"] = { [phoneField.name]: phoneField.value }; @@ -1429,10 +1480,10 @@ export class TidyContact { } } if (this.phoneEnabled()) { - if("phone1" in data) { + if ("phone1" in data) { await this.setPhoneDataFromAPI(data.phone1, data.requestId, 1); } - if("phone2" in data) { + if ("phone2" in data) { await this.setPhoneDataFromAPI(data.phone2, data.requestId, 2); } } From 6c9c8c53271bc5e97f48f633d0982c3164035019 Mon Sep 17 00:00:00 2001 From: cawecoy91 Date: Tue, 13 Jan 2026 12:59:11 -0300 Subject: [PATCH 6/8] TC with two phones: set supporter.phoneNumber2 as the primary phone --- packages/scripts/src/tidycontact.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/scripts/src/tidycontact.ts b/packages/scripts/src/tidycontact.ts index 86e2d8a5..6639c965 100644 --- a/packages/scripts/src/tidycontact.ts +++ b/packages/scripts/src/tidycontact.ts @@ -331,8 +331,8 @@ export class TidyContact { region: "supporter.region", // State field postalCode: "supporter.postcode", // Zipcode field country: "supporter.country", // Country field - phone1: "supporter.phoneNumber", // Phone field - phone2: "supporter.phoneNumber2", // Phone 2 field + phone1: "supporter.phoneNumber2", // Primary Phone field + phone2: "supporter.phoneNumber", // Secondary Phone field }; } this.options.address_enable = this.options.address_enable ?? true; From 29cd62e1564da6c4c82802d70fa46a383a6de0d7 Mon Sep 17 00:00:00 2001 From: cawecoy91 Date: Tue, 13 Jan 2026 13:00:40 -0300 Subject: [PATCH 7/8] TC with two phones: TC API integration in a backward-compatible way --- packages/scripts/src/tidycontact.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/scripts/src/tidycontact.ts b/packages/scripts/src/tidycontact.ts index 6639c965..cfbd2cd1 100644 --- a/packages/scripts/src/tidycontact.ts +++ b/packages/scripts/src/tidycontact.ts @@ -1403,8 +1403,8 @@ export class TidyContact { const phone1Country = ENGrid.getFieldValue("tc.phone1.country"); const phone2Country = ENGrid.getFieldValue("tc.phone2.country"); if (phone1 && phone1Country) { - formData.phone1 = phone1; - formData.phone1Country = phone1Country; + formData.phone = phone1; + formData.phoneCountry = phone1Country; } if (phone2 && phone2Country) { formData.phone2 = phone2; @@ -1480,8 +1480,8 @@ export class TidyContact { } } if (this.phoneEnabled()) { - if ("phone1" in data) { - await this.setPhoneDataFromAPI(data.phone1, data.requestId, 1); + if ("phone" in data) { + await this.setPhoneDataFromAPI(data.phone, data.requestId, 1); } if ("phone2" in data) { await this.setPhoneDataFromAPI(data.phone2, data.requestId, 2); From 4fa73de13fb2c465f14d27d79b7854e20b08e7db Mon Sep 17 00:00:00 2001 From: cawecoy91 Date: Tue, 13 Jan 2026 14:06:59 -0300 Subject: [PATCH 8/8] TC with two phones: support for two countries dropdown --- packages/scripts/dist/tidycontact.js | 97 ++++++++++-------- packages/scripts/src/tidycontact.ts | 143 +++++++++++++++++---------- 2 files changed, 143 insertions(+), 97 deletions(-) diff --git a/packages/scripts/dist/tidycontact.js b/packages/scripts/dist/tidycontact.js index 7a8d1642..d214382a 100644 --- a/packages/scripts/dist/tidycontact.js +++ b/packages/scripts/dist/tidycontact.js @@ -263,7 +263,7 @@ export class TidyContact { ["Zimbabwe", "zw", "263", "071 234 5678"], ["Åland Islands", "ax", "358", "041 2345678"], ]; - this.countries_dropdown = null; + this.countries_dropdown = [null, null]; this.country_ip = null; this.options = ENGrid.getOption("TidyContact"); if (this.options === false || !((_a = this.options) === null || _a === void 0 ? void 0 : _a.cid)) @@ -319,8 +319,8 @@ export class TidyContact { region: "supporter.region", postalCode: "supporter.postcode", country: "supporter.country", - phone1: "supporter.phoneNumber", - phone2: "supporter.phoneNumber2", // Phone 2 field + phone1: "supporter.phoneNumber2", + phone2: "supporter.phoneNumber", // Secondary Phone field }; } this.options.address_enable = (_a = this.options.address_enable) !== null && _a !== void 0 ? _a : true; @@ -692,8 +692,8 @@ export class TidyContact { const phoneInput = ENGrid.getField((_a = this.options.address_fields) === null || _a === void 0 ? void 0 : _a[`phone${phoneIndex}`]); if (!phoneInput) return; - this.countries_dropdown = document.createElement("div"); - this.countries_dropdown.classList.add("tc-flags-container"); + this.countries_dropdown[phoneIndex - 1] = document.createElement("div"); + this.countries_dropdown[phoneIndex - 1].classList.add("tc-flags-container"); const selectedFlag = document.createElement("div"); selectedFlag.classList.add("tc-selected-flag"); selectedFlag.setAttribute("role", "combobox"); @@ -717,7 +717,7 @@ export class TidyContact { this.closeCountryDropDown(phoneIndex); } else { - this.openCountryDropDown(); + this.openCountryDropDown(phoneIndex); } }); const countryList = document.createElement("ul"); @@ -769,19 +769,21 @@ export class TidyContact { e.stopPropagation(); const target = e.target.closest("li.tc-country-list-item"); if (target) { - this.highlightCountry(target.getAttribute("data-country-code")); + this.highlightCountry(target.getAttribute("data-country-code"), phoneIndex); } }); - this.countries_dropdown.appendChild(selectedFlag); - this.countries_dropdown.appendChild(countryList); - phoneInput.parentNode.insertBefore(this.countries_dropdown, phoneInput); + this.countries_dropdown[phoneIndex - 1].appendChild(selectedFlag); + this.countries_dropdown[phoneIndex - 1].appendChild(countryList); + const dropdown = this.countries_dropdown[phoneIndex - 1]; + if (!dropdown) + return; + phoneInput.parentNode.insertBefore(dropdown, phoneInput); phoneInput.parentNode.classList.add("tc-has-country-flags"); - this.countries_dropdown.addEventListener("keydown", (e) => { + this.countries_dropdown[phoneIndex - 1].addEventListener("keydown", (e) => { var _a, _b; - const isDropdownHidden = (_b = (_a = this.countries_dropdown) === null || _a === void 0 ? void 0 : _a.querySelector(".tc-country-list")) === null || _b === void 0 ? void 0 : _b.classList.contains("tc-hide"); + const isDropdownHidden = (_b = (_a = this.countries_dropdown[phoneIndex - 1]) === null || _a === void 0 ? void 0 : _a.querySelector(".tc-country-list")) === null || _b === void 0 ? void 0 : _b.classList.contains("tc-hide"); if (isDropdownHidden && - ["ArrowUp", "Up", "ArrowDown", "Down", " ", "Enter"].indexOf(e.key) !== - -1) { + ["ArrowUp", "Up", "ArrowDown", "Down", " ", "Enter"].indexOf(e.key) !== -1) { // prevent form from being submitted if "ENTER" was pressed e.preventDefault(); // prevent event from being handled again by document @@ -794,7 +796,7 @@ export class TidyContact { }); document.addEventListener("keydown", (e) => { var _a, _b; - const isDropdownHidden = (_b = (_a = this.countries_dropdown) === null || _a === void 0 ? void 0 : _a.querySelector(".tc-country-list")) === null || _b === void 0 ? void 0 : _b.classList.contains("tc-hide"); + const isDropdownHidden = (_b = (_a = this.countries_dropdown[phoneIndex - 1]) === null || _a === void 0 ? void 0 : _a.querySelector(".tc-country-list")) === null || _b === void 0 ? void 0 : _b.classList.contains("tc-hide"); if (!isDropdownHidden) { // prevent down key from scrolling the whole page, // and enter key from submitting a form etc @@ -804,7 +806,7 @@ export class TidyContact { e.key === "Up" || e.key === "ArrowDown" || e.key === "Down") - this.handleUpDownKey(e.key); + this.handleUpDownKey(e.key, phoneIndex); // enter to select else if (e.key === "Enter") this.handleEnterKey(phoneIndex); @@ -815,16 +817,19 @@ export class TidyContact { }); document.addEventListener("click", (e) => { var _a, _b; - const isDropdownHidden = (_b = (_a = this.countries_dropdown) === null || _a === void 0 ? void 0 : _a.querySelector(".tc-country-list")) === null || _b === void 0 ? void 0 : _b.classList.contains("tc-hide"); + const isDropdownHidden = (_b = (_a = this.countries_dropdown[phoneIndex - 1]) === null || _a === void 0 ? void 0 : _a.querySelector(".tc-country-list")) === null || _b === void 0 ? void 0 : _b.classList.contains("tc-hide"); if (!isDropdownHidden && !e.target.closest(".tc-country-list")) { this.closeCountryDropDown(phoneIndex); } }); } - handleUpDownKey(key) { + handleUpDownKey(key, phoneIndex = 1) { var _a; - const highlightedCountry = (_a = this.countries_dropdown) === null || _a === void 0 ? void 0 : _a.querySelector(".tc-highlight"); + if (phoneIndex !== 1 && phoneIndex !== 2) { + throw new Error("phoneIndex must be an integer value of 1 or 2"); + } + const highlightedCountry = (_a = this.countries_dropdown[phoneIndex - 1]) === null || _a === void 0 ? void 0 : _a.querySelector(".tc-highlight"); if (highlightedCountry) { let next = key === "ArrowUp" || key === "Up" ? highlightedCountry.previousElementSibling @@ -836,7 +841,7 @@ export class TidyContact { ? next.previousElementSibling : next.nextElementSibling; } - this.highlightCountry(next === null || next === void 0 ? void 0 : next.getAttribute("data-country-code")); + this.highlightCountry(next === null || next === void 0 ? void 0 : next.getAttribute("data-country-code"), phoneIndex); } } } @@ -845,7 +850,7 @@ export class TidyContact { if (phoneIndex !== 1 && phoneIndex !== 2) { throw new Error("phoneIndex must be an integer value of 1 or 2"); } - const highlightedCountry = (_a = this.countries_dropdown) === null || _a === void 0 ? void 0 : _a.querySelector(".tc-highlight"); + const highlightedCountry = (_a = this.countries_dropdown[phoneIndex - 1]) === null || _a === void 0 ? void 0 : _a.querySelector(".tc-highlight"); if (highlightedCountry) { const countryItem = this.getCountryByCode(highlightedCountry === null || highlightedCountry === void 0 ? void 0 : highlightedCountry.getAttribute("data-country-code")); this.setPhoneCountry(countryItem, phoneIndex); @@ -869,11 +874,14 @@ export class TidyContact { } } } - openCountryDropDown() { - if (!this.countries_dropdown) + openCountryDropDown(phoneIndex = 1) { + if (phoneIndex !== 1 && phoneIndex !== 2) { + throw new Error("phoneIndex must be an integer value of 1 or 2"); + } + if (!this.countries_dropdown[phoneIndex - 1]) return; - const countryList = this.countries_dropdown.querySelector(".tc-country-list"); - const selectedFlag = this.countries_dropdown.querySelector(".tc-selected-flag"); + const countryList = this.countries_dropdown[phoneIndex - 1].querySelector(".tc-country-list"); + const selectedFlag = this.countries_dropdown[phoneIndex - 1].querySelector(".tc-selected-flag"); if (countryList && selectedFlag) { countryList.classList.remove("tc-hide"); selectedFlag.setAttribute("aria-expanded", "true"); @@ -882,15 +890,15 @@ export class TidyContact { } closeCountryDropDown(phoneIndex = 1) { var _a; - if (!this.options) - return; - if (!this.countries_dropdown) - return; if (phoneIndex !== 1 && phoneIndex !== 2) { throw new Error("phoneIndex must be an integer value of 1 or 2"); } - const countryList = this.countries_dropdown.querySelector(".tc-country-list"); - const selectedFlag = this.countries_dropdown.querySelector(".tc-selected-flag"); + if (!this.options) + return; + if (!this.countries_dropdown[phoneIndex - 1]) + return; + const countryList = this.countries_dropdown[phoneIndex - 1].querySelector(".tc-country-list"); + const selectedFlag = this.countries_dropdown[phoneIndex - 1].querySelector(".tc-selected-flag"); if (countryList && selectedFlag) { countryList.classList.add("tc-hide"); selectedFlag.setAttribute("aria-expanded", "false"); @@ -988,22 +996,22 @@ export class TidyContact { return; const phoneInput = ENGrid.getField((_a = this.options.address_fields) === null || _a === void 0 ? void 0 : _a[`phone${phoneIndex}`]); if (this.countryDropDownEnabled()) { - const selectedFlag = (_b = this.countries_dropdown) === null || _b === void 0 ? void 0 : _b.querySelector(".tc-selected-flag"); - const flagElement = (_c = this.countries_dropdown) === null || _c === void 0 ? void 0 : _c.querySelector(".tc-flag"); + const selectedFlag = (_b = this.countries_dropdown[phoneIndex - 1]) === null || _b === void 0 ? void 0 : _b.querySelector(".tc-selected-flag"); + const flagElement = (_c = this.countries_dropdown[phoneIndex - 1]) === null || _c === void 0 ? void 0 : _c.querySelector(".tc-flag"); if (selectedFlag && flagElement) { flagElement.innerHTML = this.getFlagImage(country.code, country.name); selectedFlag.setAttribute("data-country", country.code); } - const currentSelectedCountry = (_d = this.countries_dropdown) === null || _d === void 0 ? void 0 : _d.querySelector(".tc-country-list-item[aria-selected='true']"); + const currentSelectedCountry = (_d = this.countries_dropdown[phoneIndex - 1]) === null || _d === void 0 ? void 0 : _d.querySelector(".tc-country-list-item[aria-selected='true']"); if (currentSelectedCountry) { currentSelectedCountry.classList.remove("tc-selected"); currentSelectedCountry.setAttribute("aria-selected", "false"); } - const currentHighlightedCountry = (_e = this.countries_dropdown) === null || _e === void 0 ? void 0 : _e.querySelector(".tc-highlight"); + const currentHighlightedCountry = (_e = this.countries_dropdown[phoneIndex - 1]) === null || _e === void 0 ? void 0 : _e.querySelector(".tc-highlight"); if (currentHighlightedCountry) { currentHighlightedCountry.classList.remove("tc-highlight"); } - const countryListItem = (_f = this.countries_dropdown) === null || _f === void 0 ? void 0 : _f.querySelector(`.tc-country-list-item[data-country-code='${country.code}']`); + const countryListItem = (_f = this.countries_dropdown[phoneIndex - 1]) === null || _f === void 0 ? void 0 : _f.querySelector(`.tc-country-list-item[data-country-code='${country.code}']`); if (countryListItem) { countryListItem.classList.add("tc-selected"); countryListItem.setAttribute("aria-selected", "true"); @@ -1016,15 +1024,18 @@ export class TidyContact { countryInput.value = country.code; this.logger.log(`Setting phone${phoneIndex} country to ${country.code} - ${country.name}`); } - highlightCountry(countryCode) { + highlightCountry(countryCode, phoneIndex = 1) { var _a, _b; + if (phoneIndex !== 1 && phoneIndex !== 2) { + throw new Error("phoneIndex must be an integer value of 1 or 2"); + } if (!countryCode) return; - const currentHighlightedCountry = (_a = this.countries_dropdown) === null || _a === void 0 ? void 0 : _a.querySelector(".tc-highlight"); + const currentHighlightedCountry = (_a = this.countries_dropdown[phoneIndex - 1]) === null || _a === void 0 ? void 0 : _a.querySelector(".tc-highlight"); if (currentHighlightedCountry) { currentHighlightedCountry.classList.remove("tc-highlight"); } - const countryList = (_b = this.countries_dropdown) === null || _b === void 0 ? void 0 : _b.querySelector(".tc-country-list"); + const countryList = (_b = this.countries_dropdown[phoneIndex - 1]) === null || _b === void 0 ? void 0 : _b.querySelector(".tc-country-list"); if (countryList) { const country = countryList.querySelector(`.tc-country[data-country-code='${countryCode}']`); if (country) { @@ -1164,8 +1175,8 @@ export class TidyContact { const phone1Country = ENGrid.getFieldValue("tc.phone1.country"); const phone2Country = ENGrid.getFieldValue("tc.phone2.country"); if (phone1 && phone1Country) { - formData.phone1 = phone1; - formData.phone1Country = phone1Country; + formData.phone = phone1; + formData.phoneCountry = phone1Country; } if (phone2 && phone2Country) { formData.phone2 = phone2; @@ -1236,8 +1247,8 @@ export class TidyContact { } } if (this.phoneEnabled()) { - if ("phone1" in data) { - yield this.setPhoneDataFromAPI(data.phone1, data.requestId, 1); + if ("phone" in data) { + yield this.setPhoneDataFromAPI(data.phone, data.requestId, 1); } if ("phone2" in data) { yield this.setPhoneDataFromAPI(data.phone2, data.requestId, 2); diff --git a/packages/scripts/src/tidycontact.ts b/packages/scripts/src/tidycontact.ts index cfbd2cd1..3f5cec92 100644 --- a/packages/scripts/src/tidycontact.ts +++ b/packages/scripts/src/tidycontact.ts @@ -263,7 +263,7 @@ export class TidyContact { ["Zimbabwe", "zw", "263", "071 234 5678"], ["Åland Islands", "ax", "358", "041 2345678"], ]; - private countries_dropdown: HTMLDivElement | null = null; + private countries_dropdown: Array = [null, null]; private country_ip = null; constructor() { @@ -796,8 +796,12 @@ export class TidyContact { this.options.address_fields?.[`phone${phoneIndex}`] as string ); if (!phoneInput) return; - this.countries_dropdown = document.createElement("div") as HTMLDivElement; - this.countries_dropdown.classList.add("tc-flags-container"); + this.countries_dropdown[phoneIndex - 1] = document.createElement( + "div" + ) as HTMLDivElement; + this.countries_dropdown[phoneIndex - 1]!.classList.add( + "tc-flags-container" + ); const selectedFlag = document.createElement("div"); selectedFlag.classList.add("tc-selected-flag"); selectedFlag.setAttribute("role", "combobox"); @@ -820,7 +824,7 @@ export class TidyContact { if (selectedFlag.classList.contains("tc-open")) { this.closeCountryDropDown(phoneIndex); } else { - this.openCountryDropDown(); + this.openCountryDropDown(phoneIndex); } }); const countryList = document.createElement("ul"); @@ -900,40 +904,46 @@ export class TidyContact { "li.tc-country-list-item" ) as HTMLLIElement; if (target) { - this.highlightCountry(target.getAttribute("data-country-code")); + this.highlightCountry( + target.getAttribute("data-country-code"), + phoneIndex + ); } }); - this.countries_dropdown.appendChild(selectedFlag); - this.countries_dropdown.appendChild(countryList); - (phoneInput.parentNode as HTMLElement).insertBefore( - this.countries_dropdown, - phoneInput - ); + this.countries_dropdown[phoneIndex - 1]!.appendChild(selectedFlag); + this.countries_dropdown[phoneIndex - 1]!.appendChild(countryList); + const dropdown = this.countries_dropdown[phoneIndex - 1]; + if (!dropdown) return; + (phoneInput.parentNode as HTMLElement).insertBefore(dropdown, phoneInput); (phoneInput.parentNode as HTMLElement).classList.add( "tc-has-country-flags" ); - this.countries_dropdown.addEventListener("keydown", (e) => { - const isDropdownHidden = this.countries_dropdown - ?.querySelector(".tc-country-list") - ?.classList.contains("tc-hide"); + this.countries_dropdown[phoneIndex - 1]!.addEventListener( + "keydown", + (e) => { + const isDropdownHidden = this.countries_dropdown[phoneIndex - 1] + ?.querySelector(".tc-country-list") + ?.classList.contains("tc-hide"); - if ( - isDropdownHidden && - ["ArrowUp", "Up", "ArrowDown", "Down", " ", "Enter"].indexOf(e.key) !== - -1 - ) { - // prevent form from being submitted if "ENTER" was pressed - e.preventDefault(); - // prevent event from being handled again by document - e.stopPropagation(); - this.openCountryDropDown(); - } + if ( + isDropdownHidden && + ["ArrowUp", "Up", "ArrowDown", "Down", " ", "Enter"].indexOf( + e.key + ) !== -1 + ) { + // prevent form from being submitted if "ENTER" was pressed + e.preventDefault(); + // prevent event from being handled again by document + e.stopPropagation(); + this.openCountryDropDown(); + } - // allow navigation from dropdown to input on TAB - if (e.key === "Tab") this.closeCountryDropDown(phoneIndex); - }); + // allow navigation from dropdown to input on TAB + if (e.key === "Tab") this.closeCountryDropDown(phoneIndex); + } + ); document.addEventListener("keydown", (e) => { - const isDropdownHidden = this.countries_dropdown + const isDropdownHidden = this.countries_dropdown[phoneIndex - 1] ?.querySelector(".tc-country-list") ?.classList.contains("tc-hide"); if (!isDropdownHidden) { @@ -948,7 +958,7 @@ export class TidyContact { e.key === "ArrowDown" || e.key === "Down" ) - this.handleUpDownKey(e.key); + this.handleUpDownKey(e.key, phoneIndex); // enter to select else if (e.key === "Enter") this.handleEnterKey(phoneIndex); // esc to close @@ -956,7 +966,7 @@ export class TidyContact { } }); document.addEventListener("click", (e) => { - const isDropdownHidden = this.countries_dropdown + const isDropdownHidden = this.countries_dropdown[phoneIndex - 1] ?.querySelector(".tc-country-list") ?.classList.contains("tc-hide"); if ( @@ -967,9 +977,12 @@ export class TidyContact { } }); } - private handleUpDownKey(key: string) { + private handleUpDownKey(key: string, phoneIndex: number = 1) { + if (phoneIndex !== 1 && phoneIndex !== 2) { + throw new Error("phoneIndex must be an integer value of 1 or 2"); + } const highlightedCountry = - this.countries_dropdown?.querySelector(".tc-highlight"); + this.countries_dropdown[phoneIndex - 1]?.querySelector(".tc-highlight"); if (highlightedCountry) { let next = key === "ArrowUp" || key === "Up" @@ -983,7 +996,8 @@ export class TidyContact { : next.nextElementSibling; } this.highlightCountry( - next?.getAttribute("data-country-code") as string + next?.getAttribute("data-country-code") as string, + phoneIndex ); } } @@ -993,7 +1007,7 @@ export class TidyContact { throw new Error("phoneIndex must be an integer value of 1 or 2"); } const highlightedCountry = - this.countries_dropdown?.querySelector(".tc-highlight"); + this.countries_dropdown[phoneIndex - 1]?.querySelector(".tc-highlight"); if (highlightedCountry) { const countryItem = this.getCountryByCode( highlightedCountry?.getAttribute("data-country-code") as string @@ -1018,12 +1032,19 @@ export class TidyContact { } } } - private openCountryDropDown() { - if (!this.countries_dropdown) return; + private openCountryDropDown(phoneIndex: number = 1) { + if (phoneIndex !== 1 && phoneIndex !== 2) { + throw new Error("phoneIndex must be an integer value of 1 or 2"); + } + if (!this.countries_dropdown[phoneIndex - 1]) return; const countryList = - this.countries_dropdown.querySelector(".tc-country-list"); + this.countries_dropdown[phoneIndex - 1]!.querySelector( + ".tc-country-list" + ); const selectedFlag = - this.countries_dropdown.querySelector(".tc-selected-flag"); + this.countries_dropdown[phoneIndex - 1]!.querySelector( + ".tc-selected-flag" + ); if (countryList && selectedFlag) { countryList.classList.remove("tc-hide"); @@ -1032,15 +1053,19 @@ export class TidyContact { } } private closeCountryDropDown(phoneIndex: number = 1) { - if (!this.options) return; - if (!this.countries_dropdown) return; if (phoneIndex !== 1 && phoneIndex !== 2) { throw new Error("phoneIndex must be an integer value of 1 or 2"); } + if (!this.options) return; + if (!this.countries_dropdown[phoneIndex - 1]) return; const countryList = - this.countries_dropdown.querySelector(".tc-country-list"); + this.countries_dropdown[phoneIndex - 1]!.querySelector( + ".tc-country-list" + ); const selectedFlag = - this.countries_dropdown.querySelector(".tc-selected-flag"); + this.countries_dropdown[phoneIndex - 1]!.querySelector( + ".tc-selected-flag" + ); if (countryList && selectedFlag) { countryList.classList.add("tc-hide"); @@ -1172,25 +1197,30 @@ export class TidyContact { ) as HTMLInputElement; if (this.countryDropDownEnabled()) { const selectedFlag = - this.countries_dropdown?.querySelector(".tc-selected-flag"); - const flagElement = this.countries_dropdown?.querySelector(".tc-flag"); + this.countries_dropdown[phoneIndex - 1]?.querySelector( + ".tc-selected-flag" + ); + const flagElement = + this.countries_dropdown[phoneIndex - 1]?.querySelector(".tc-flag"); if (selectedFlag && flagElement) { flagElement.innerHTML = this.getFlagImage(country.code, country.name); selectedFlag.setAttribute("data-country", country.code); } - const currentSelectedCountry = this.countries_dropdown?.querySelector( - ".tc-country-list-item[aria-selected='true']" - ); + const currentSelectedCountry = this.countries_dropdown[ + phoneIndex - 1 + ]?.querySelector(".tc-country-list-item[aria-selected='true']"); if (currentSelectedCountry) { currentSelectedCountry.classList.remove("tc-selected"); currentSelectedCountry.setAttribute("aria-selected", "false"); } const currentHighlightedCountry = - this.countries_dropdown?.querySelector(".tc-highlight"); + this.countries_dropdown[phoneIndex - 1]?.querySelector(".tc-highlight"); if (currentHighlightedCountry) { currentHighlightedCountry.classList.remove("tc-highlight"); } - const countryListItem = this.countries_dropdown?.querySelector( + const countryListItem = this.countries_dropdown[ + phoneIndex - 1 + ]?.querySelector( `.tc-country-list-item[data-country-code='${country.code}']` ); if (countryListItem) { @@ -1207,15 +1237,20 @@ export class TidyContact { `Setting phone${phoneIndex} country to ${country.code} - ${country.name}` ); } - private highlightCountry(countryCode: string | null) { + private highlightCountry(countryCode: string | null, phoneIndex: number = 1) { + if (phoneIndex !== 1 && phoneIndex !== 2) { + throw new Error("phoneIndex must be an integer value of 1 or 2"); + } if (!countryCode) return; const currentHighlightedCountry = - this.countries_dropdown?.querySelector(".tc-highlight"); + this.countries_dropdown[phoneIndex - 1]?.querySelector(".tc-highlight"); if (currentHighlightedCountry) { currentHighlightedCountry.classList.remove("tc-highlight"); } const countryList = - this.countries_dropdown?.querySelector(".tc-country-list"); + this.countries_dropdown[phoneIndex - 1]?.querySelector( + ".tc-country-list" + ); if (countryList) { const country = countryList.querySelector( `.tc-country[data-country-code='${countryCode}']`