diff --git a/THIRD-PARTY-NOTICES b/THIRD-PARTY-NOTICES index c5301dda..41626aaa 100644 --- a/THIRD-PARTY-NOTICES +++ b/THIRD-PARTY-NOTICES @@ -6800,7 +6800,7 @@ Apache-2.0 The following npm package may be included in this product: - - caniuse-lite@1.0.30001660 + - caniuse-lite@1.0.30001663 This package contains the following license and notice below: @@ -8135,7 +8135,7 @@ distributed under the terms of the MIT license above. The following npm package may be included in this product: - - electron-to-chromium@1.5.25 + - electron-to-chromium@1.5.28 This package contains the following license and notice below: @@ -12403,7 +12403,7 @@ THE SOFTWARE. The following npm packages may be included in this product: - eslint-import-resolver-node@0.3.9 - - eslint-module-utils@2.11.0 + - eslint-module-utils@2.11.1 - eslint-plugin-import@2.29.1 These packages each contain the following license and notice below: @@ -13893,7 +13893,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. The following npm package may be included in this product: - - browserslist@4.23.3 + - browserslist@4.24.0 This package contains the following license and notice below: diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7c7327cc..1f1ed8f9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -274,7 +274,7 @@ packages: dependencies: '@babel/compat-data': 7.25.4 '@babel/helper-validator-option': 7.24.8 - browserslist: 4.23.3 + browserslist: 4.24.0 lru-cache: 5.1.1 semver: 6.3.1 @@ -2991,128 +2991,128 @@ packages: resolution: {integrity: sha512-A9+lCBZoaMJlVKcRBz2YByCG+Cp2t6nAnMnNba+XiWxnj6r4JUFqfsgwocMBZU9LPtdxC6wB56ySYpc7LQIoJg==} dev: false - /@rollup/rollup-android-arm-eabi@4.21.3: - resolution: {integrity: sha512-MmKSfaB9GX+zXl6E8z4koOr/xU63AMVleLEa64v7R0QF/ZloMs5vcD1sHgM64GXXS1csaJutG+ddtzcueI/BLg==} + /@rollup/rollup-android-arm-eabi@4.22.4: + resolution: {integrity: sha512-Fxamp4aEZnfPOcGA8KSNEohV8hX7zVHOemC8jVBoBUHu5zpJK/Eu3uJwt6BMgy9fkvzxDaurgj96F/NiLukF2w==} cpu: [arm] os: [android] requiresBuild: true dev: true optional: true - /@rollup/rollup-android-arm64@4.21.3: - resolution: {integrity: sha512-zrt8ecH07PE3sB4jPOggweBjJMzI1JG5xI2DIsUbkA+7K+Gkjys6eV7i9pOenNSDJH3eOr/jLb/PzqtmdwDq5g==} + /@rollup/rollup-android-arm64@4.22.4: + resolution: {integrity: sha512-VXoK5UMrgECLYaMuGuVTOx5kcuap1Jm8g/M83RnCHBKOqvPPmROFJGQaZhGccnsFtfXQ3XYa4/jMCJvZnbJBdA==} cpu: [arm64] os: [android] requiresBuild: true dev: true optional: true - /@rollup/rollup-darwin-arm64@4.21.3: - resolution: {integrity: sha512-P0UxIOrKNBFTQaXTxOH4RxuEBVCgEA5UTNV6Yz7z9QHnUJ7eLX9reOd/NYMO3+XZO2cco19mXTxDMXxit4R/eQ==} + /@rollup/rollup-darwin-arm64@4.22.4: + resolution: {integrity: sha512-xMM9ORBqu81jyMKCDP+SZDhnX2QEVQzTcC6G18KlTQEzWK8r/oNZtKuZaCcHhnsa6fEeOBionoyl5JsAbE/36Q==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /@rollup/rollup-darwin-x64@4.21.3: - resolution: {integrity: sha512-L1M0vKGO5ASKntqtsFEjTq/fD91vAqnzeaF6sfNAy55aD+Hi2pBI5DKwCO+UNDQHWsDViJLqshxOahXyLSh3EA==} + /@rollup/rollup-darwin-x64@4.22.4: + resolution: {integrity: sha512-aJJyYKQwbHuhTUrjWjxEvGnNNBCnmpHDvrb8JFDbeSH3m2XdHcxDd3jthAzvmoI8w/kSjd2y0udT+4okADsZIw==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm-gnueabihf@4.21.3: - resolution: {integrity: sha512-btVgIsCjuYFKUjopPoWiDqmoUXQDiW2A4C3Mtmp5vACm7/GnyuprqIDPNczeyR5W8rTXEbkmrJux7cJmD99D2g==} + /@rollup/rollup-linux-arm-gnueabihf@4.22.4: + resolution: {integrity: sha512-j63YtCIRAzbO+gC2L9dWXRh5BFetsv0j0va0Wi9epXDgU/XUi5dJKo4USTttVyK7fGw2nPWK0PbAvyliz50SCQ==} cpu: [arm] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm-musleabihf@4.21.3: - resolution: {integrity: sha512-zmjbSphplZlau6ZTkxd3+NMtE4UKVy7U4aVFMmHcgO5CUbw17ZP6QCgyxhzGaU/wFFdTfiojjbLG3/0p9HhAqA==} + /@rollup/rollup-linux-arm-musleabihf@4.22.4: + resolution: {integrity: sha512-dJnWUgwWBX1YBRsuKKMOlXCzh2Wu1mlHzv20TpqEsfdZLb3WoJW2kIEsGwLkroYf24IrPAvOT/ZQ2OYMV6vlrg==} cpu: [arm] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm64-gnu@4.21.3: - resolution: {integrity: sha512-nSZfcZtAnQPRZmUkUQwZq2OjQciR6tEoJaZVFvLHsj0MF6QhNMg0fQ6mUOsiCUpTqxTx0/O6gX0V/nYc7LrgPw==} + /@rollup/rollup-linux-arm64-gnu@4.22.4: + resolution: {integrity: sha512-AdPRoNi3NKVLolCN/Sp4F4N1d98c4SBnHMKoLuiG6RXgoZ4sllseuGioszumnPGmPM2O7qaAX/IJdeDU8f26Aw==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm64-musl@4.21.3: - resolution: {integrity: sha512-MnvSPGO8KJXIMGlQDYfvYS3IosFN2rKsvxRpPO2l2cum+Z3exiExLwVU+GExL96pn8IP+GdH8Tz70EpBhO0sIQ==} + /@rollup/rollup-linux-arm64-musl@4.22.4: + resolution: {integrity: sha512-Gl0AxBtDg8uoAn5CCqQDMqAx22Wx22pjDOjBdmG0VIWX3qUBHzYmOKh8KXHL4UpogfJ14G4wk16EQogF+v8hmA==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-powerpc64le-gnu@4.21.3: - resolution: {integrity: sha512-+W+p/9QNDr2vE2AXU0qIy0qQE75E8RTwTwgqS2G5CRQ11vzq0tbnfBd6brWhS9bCRjAjepJe2fvvkvS3dno+iw==} + /@rollup/rollup-linux-powerpc64le-gnu@4.22.4: + resolution: {integrity: sha512-3aVCK9xfWW1oGQpTsYJJPF6bfpWfhbRnhdlyhak2ZiyFLDaayz0EP5j9V1RVLAAxlmWKTDfS9wyRyY3hvhPoOg==} cpu: [ppc64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-riscv64-gnu@4.21.3: - resolution: {integrity: sha512-yXH6K6KfqGXaxHrtr+Uoy+JpNlUlI46BKVyonGiaD74ravdnF9BUNC+vV+SIuB96hUMGShhKV693rF9QDfO6nQ==} + /@rollup/rollup-linux-riscv64-gnu@4.22.4: + resolution: {integrity: sha512-ePYIir6VYnhgv2C5Xe9u+ico4t8sZWXschR6fMgoPUK31yQu7hTEJb7bCqivHECwIClJfKgE7zYsh1qTP3WHUA==} cpu: [riscv64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-s390x-gnu@4.21.3: - resolution: {integrity: sha512-R8cwY9wcnApN/KDYWTH4gV/ypvy9yZUHlbJvfaiXSB48JO3KpwSpjOGqO4jnGkLDSk1hgjYkTbTt6Q7uvPf8eg==} + /@rollup/rollup-linux-s390x-gnu@4.22.4: + resolution: {integrity: sha512-GqFJ9wLlbB9daxhVlrTe61vJtEY99/xB3C8e4ULVsVfflcpmR6c8UZXjtkMA6FhNONhj2eA5Tk9uAVw5orEs4Q==} cpu: [s390x] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-x64-gnu@4.21.3: - resolution: {integrity: sha512-kZPbX/NOPh0vhS5sI+dR8L1bU2cSO9FgxwM8r7wHzGydzfSjLRCFAT87GR5U9scj2rhzN3JPYVC7NoBbl4FZ0g==} + /@rollup/rollup-linux-x64-gnu@4.22.4: + resolution: {integrity: sha512-87v0ol2sH9GE3cLQLNEy0K/R0pz1nvg76o8M5nhMR0+Q+BBGLnb35P0fVz4CQxHYXaAOhE8HhlkaZfsdUOlHwg==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-x64-musl@4.21.3: - resolution: {integrity: sha512-S0Yq+xA1VEH66uiMNhijsWAafffydd2X5b77eLHfRmfLsRSpbiAWiRHV6DEpz6aOToPsgid7TI9rGd6zB1rhbg==} + /@rollup/rollup-linux-x64-musl@4.22.4: + resolution: {integrity: sha512-UV6FZMUgePDZrFjrNGIWzDo/vABebuXBhJEqrHxrGiU6HikPy0Z3LfdtciIttEUQfuDdCn8fqh7wiFJjCNwO+g==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-arm64-msvc@4.21.3: - resolution: {integrity: sha512-9isNzeL34yquCPyerog+IMCNxKR8XYmGd0tHSV+OVx0TmE0aJOo9uw4fZfUuk2qxobP5sug6vNdZR6u7Mw7Q+Q==} + /@rollup/rollup-win32-arm64-msvc@4.22.4: + resolution: {integrity: sha512-BjI+NVVEGAXjGWYHz/vv0pBqfGoUH0IGZ0cICTn7kB9PyjrATSkX+8WkguNjWoj2qSr1im/+tTGRaY+4/PdcQw==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-ia32-msvc@4.21.3: - resolution: {integrity: sha512-nMIdKnfZfzn1Vsk+RuOvl43ONTZXoAPUUxgcU0tXooqg4YrAqzfKzVenqqk2g5efWh46/D28cKFrOzDSW28gTA==} + /@rollup/rollup-win32-ia32-msvc@4.22.4: + resolution: {integrity: sha512-SiWG/1TuUdPvYmzmYnmd3IEifzR61Tragkbx9D3+R8mzQqDBz8v+BvZNDlkiTtI9T15KYZhP0ehn3Dld4n9J5g==} cpu: [ia32] os: [win32] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-x64-msvc@4.21.3: - resolution: {integrity: sha512-fOvu7PCQjAj4eWDEuD8Xz5gpzFqXzGlxHZozHP4b9Jxv9APtdxL6STqztDzMLuRXEc4UpXGGhx029Xgm91QBeA==} + /@rollup/rollup-win32-x64-msvc@4.22.4: + resolution: {integrity: sha512-j8pPKp53/lq9lMXN57S8cFz0MynJk8OWNuUnXct/9KCpKU7DgU3bYMJhwWmcqC0UU29p8Lr0/7KEVcaM6bf47Q==} cpu: [x64] os: [win32] requiresBuild: true @@ -3690,7 +3690,7 @@ packages: '@typescript-eslint/experimental-utils': 5.62.0(eslint@9.8.0)(typescript@5.5.4) '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.5.4) eslint-import-resolver-typescript: 2.7.1(eslint-plugin-import@2.29.1)(eslint@9.8.0) - eslint-module-utils: 2.11.0(@typescript-eslint/parser@8.0.1)(eslint-import-resolver-typescript@2.7.1)(eslint@9.8.0) + eslint-module-utils: 2.11.1(@typescript-eslint/parser@8.0.1)(eslint-import-resolver-typescript@2.7.1)(eslint@9.8.0) transitivePeerDependencies: - '@typescript-eslint/parser' - eslint @@ -3930,8 +3930,8 @@ packages: peerDependencies: postcss: ^8.1.0 dependencies: - browserslist: 4.23.3 - caniuse-lite: 1.0.30001660 + browserslist: 4.24.0 + caniuse-lite: 1.0.30001663 fraction.js: 4.3.7 normalize-range: 0.1.2 picocolors: 1.0.1 @@ -4074,15 +4074,15 @@ packages: dependencies: fill-range: 7.1.1 - /browserslist@4.23.3: - resolution: {integrity: sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==} + /browserslist@4.24.0: + resolution: {integrity: sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001660 - electron-to-chromium: 1.5.25 + caniuse-lite: 1.0.30001663 + electron-to-chromium: 1.5.28 node-releases: 2.0.18 - update-browserslist-db: 1.1.0(browserslist@4.23.3) + update-browserslist-db: 1.1.0(browserslist@4.24.0) /buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} @@ -4142,8 +4142,8 @@ packages: resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==} engines: {node: '>= 6'} - /caniuse-lite@1.0.30001660: - resolution: {integrity: sha512-GacvNTTuATm26qC74pt+ad1fW15mlQ/zuTzzY1ZoIzECTP8HURDfF43kNxPgf7H1jmelCBQTTbBNxdSXOA7Bqg==} + /caniuse-lite@1.0.30001663: + resolution: {integrity: sha512-o9C3X27GLKbLeTYZ6HBOLU1tsAcBZsLis28wrVzddShCS16RujjHp9GDHKZqrB3meE0YjhawvMFsGb/igqiPzA==} /capture-stack-trace@1.0.2: resolution: {integrity: sha512-X/WM2UQs6VMHUtjUDnZTRI+i1crWteJySFzr9UpGoQa4WQffXVTTXuekjl7TjZRlcF2XfjgITT0HxZ9RnxeT0w==} @@ -4322,7 +4322,7 @@ packages: /core-js-compat@3.38.1: resolution: {integrity: sha512-JRH6gfXxGmrzF3tZ57lFx97YARxCXPaMzPo6jELZhv88pBH5VXpQ+y0znKGlFnzuaihqhLbefxSJxWJMPtfDzw==} dependencies: - browserslist: 4.23.3 + browserslist: 4.24.0 dev: false /core-util-is@1.0.3: @@ -4565,8 +4565,8 @@ packages: /eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} - /electron-to-chromium@1.5.25: - resolution: {integrity: sha512-kMb204zvK3PsSlgvvwzI3wBIcAw15tRkYk+NQdsjdDtcQWTp2RABbMQ9rUBy8KNEOM+/E6ep+XC3AykiWZld4g==} + /electron-to-chromium@1.5.28: + resolution: {integrity: sha512-VufdJl+rzaKZoYVUijN13QcXVF5dWPZANeFTLNy+OSpHdDL5ynXTF35+60RSBbaQYB1ae723lQXHCrf4pyLsMw==} /emoji-regex@10.4.0: resolution: {integrity: sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==} @@ -4891,8 +4891,8 @@ packages: - supports-color dev: false - /eslint-module-utils@2.11.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.9)(eslint@9.8.0): - resolution: {integrity: sha512-gbBE5Hitek/oG6MUVj6sFuzEjA/ClzNflVrLovHi/JgLdC7fiN5gLAY1WIPW1a0V5I999MnsrvVrCOGmmVqDBQ==} + /eslint-module-utils@2.11.1(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.9)(eslint@9.8.0): + resolution: {integrity: sha512-EwcbfLOhwVMAfatfqLecR2yv3dE5+kQ8kx+Rrt0DvDXEVwW86KQ/xbMDQhtp5l42VXukD5SOF8mQQHbaNtO0CQ==} engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' @@ -4920,8 +4920,8 @@ packages: - supports-color dev: false - /eslint-module-utils@2.11.0(@typescript-eslint/parser@8.0.1)(eslint-import-resolver-node@0.3.9)(eslint@9.8.0): - resolution: {integrity: sha512-gbBE5Hitek/oG6MUVj6sFuzEjA/ClzNflVrLovHi/JgLdC7fiN5gLAY1WIPW1a0V5I999MnsrvVrCOGmmVqDBQ==} + /eslint-module-utils@2.11.1(@typescript-eslint/parser@8.0.1)(eslint-import-resolver-node@0.3.9)(eslint@9.8.0): + resolution: {integrity: sha512-EwcbfLOhwVMAfatfqLecR2yv3dE5+kQ8kx+Rrt0DvDXEVwW86KQ/xbMDQhtp5l42VXukD5SOF8mQQHbaNtO0CQ==} engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' @@ -4948,8 +4948,8 @@ packages: transitivePeerDependencies: - supports-color - /eslint-module-utils@2.11.0(@typescript-eslint/parser@8.0.1)(eslint-import-resolver-typescript@2.7.1)(eslint@9.8.0): - resolution: {integrity: sha512-gbBE5Hitek/oG6MUVj6sFuzEjA/ClzNflVrLovHi/JgLdC7fiN5gLAY1WIPW1a0V5I999MnsrvVrCOGmmVqDBQ==} + /eslint-module-utils@2.11.1(@typescript-eslint/parser@8.0.1)(eslint-import-resolver-typescript@2.7.1)(eslint@9.8.0): + resolution: {integrity: sha512-EwcbfLOhwVMAfatfqLecR2yv3dE5+kQ8kx+Rrt0DvDXEVwW86KQ/xbMDQhtp5l42VXukD5SOF8mQQHbaNtO0CQ==} engines: {node: '>=4'} peerDependencies: '@typescript-eslint/parser': '*' @@ -5011,7 +5011,7 @@ packages: doctrine: 2.1.0 eslint: 9.8.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.11.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.9)(eslint@9.8.0) + eslint-module-utils: 2.11.1(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.9)(eslint@9.8.0) hasown: 2.0.2 is-core-module: 2.15.1 is-glob: 4.0.3 @@ -5046,7 +5046,7 @@ packages: doctrine: 2.1.0 eslint: 9.8.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.11.0(@typescript-eslint/parser@8.0.1)(eslint-import-resolver-node@0.3.9)(eslint@9.8.0) + eslint-module-utils: 2.11.1(@typescript-eslint/parser@8.0.1)(eslint-import-resolver-node@0.3.9)(eslint@9.8.0) hasown: 2.0.2 is-core-module: 2.15.1 is-glob: 4.0.3 @@ -7713,29 +7713,29 @@ packages: resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==} dev: true - /rollup@4.21.3: - resolution: {integrity: sha512-7sqRtBNnEbcBtMeRVc6VRsJMmpI+JU1z9VTvW8D4gXIYQFz0aLcsE6rRkyghZkLfEgUZgVvOG7A5CVz/VW5GIA==} + /rollup@4.22.4: + resolution: {integrity: sha512-vD8HJ5raRcWOyymsR6Z3o6+RzfEPCnVLMFJ6vRslO1jt4LO6dUo5Qnpg7y4RkZFM2DMe3WUirkI5c16onjrc6A==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true dependencies: '@types/estree': 1.0.5 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.21.3 - '@rollup/rollup-android-arm64': 4.21.3 - '@rollup/rollup-darwin-arm64': 4.21.3 - '@rollup/rollup-darwin-x64': 4.21.3 - '@rollup/rollup-linux-arm-gnueabihf': 4.21.3 - '@rollup/rollup-linux-arm-musleabihf': 4.21.3 - '@rollup/rollup-linux-arm64-gnu': 4.21.3 - '@rollup/rollup-linux-arm64-musl': 4.21.3 - '@rollup/rollup-linux-powerpc64le-gnu': 4.21.3 - '@rollup/rollup-linux-riscv64-gnu': 4.21.3 - '@rollup/rollup-linux-s390x-gnu': 4.21.3 - '@rollup/rollup-linux-x64-gnu': 4.21.3 - '@rollup/rollup-linux-x64-musl': 4.21.3 - '@rollup/rollup-win32-arm64-msvc': 4.21.3 - '@rollup/rollup-win32-ia32-msvc': 4.21.3 - '@rollup/rollup-win32-x64-msvc': 4.21.3 + '@rollup/rollup-android-arm-eabi': 4.22.4 + '@rollup/rollup-android-arm64': 4.22.4 + '@rollup/rollup-darwin-arm64': 4.22.4 + '@rollup/rollup-darwin-x64': 4.22.4 + '@rollup/rollup-linux-arm-gnueabihf': 4.22.4 + '@rollup/rollup-linux-arm-musleabihf': 4.22.4 + '@rollup/rollup-linux-arm64-gnu': 4.22.4 + '@rollup/rollup-linux-arm64-musl': 4.22.4 + '@rollup/rollup-linux-powerpc64le-gnu': 4.22.4 + '@rollup/rollup-linux-riscv64-gnu': 4.22.4 + '@rollup/rollup-linux-s390x-gnu': 4.22.4 + '@rollup/rollup-linux-x64-gnu': 4.22.4 + '@rollup/rollup-linux-x64-musl': 4.22.4 + '@rollup/rollup-win32-arm64-msvc': 4.22.4 + '@rollup/rollup-win32-ia32-msvc': 4.22.4 + '@rollup/rollup-win32-x64-msvc': 4.22.4 fsevents: 2.3.3 dev: true @@ -8403,7 +8403,7 @@ packages: postcss: 8.4.39 postcss-load-config: 6.0.1(postcss@8.4.39)(tsx@4.16.3) resolve-from: 5.0.0 - rollup: 4.21.3 + rollup: 4.22.4 source-map: 0.8.0-beta.0 sucrase: 3.35.0 tree-kill: 1.2.2 @@ -8578,13 +8578,13 @@ packages: engines: {node: '>=0.10'} dev: false - /update-browserslist-db@1.1.0(browserslist@4.23.3): + /update-browserslist-db@1.1.0(browserslist@4.24.0): resolution: {integrity: sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' dependencies: - browserslist: 4.23.3 + browserslist: 4.24.0 escalade: 3.2.0 picocolors: 1.0.1 @@ -8754,7 +8754,7 @@ packages: '@types/node': 20.14.11 esbuild: 0.21.5 postcss: 8.4.39 - rollup: 4.21.3 + rollup: 4.22.4 optionalDependencies: fsevents: 2.3.3 dev: true diff --git a/src/components/README.md b/src/components/README.md index f8efa0f5..1760d073 100644 --- a/src/components/README.md +++ b/src/components/README.md @@ -68,22 +68,30 @@ import { EntityField } from "@yext/visual-editor"; ### YextEntityFieldSelector -Use this to allow Visual Editor users to choose an entity field or a constant value that will populate data into a component. +Use this to allow Visual Editor users to choose an entity field or static value that will populate data into a component. +The user can choose an entity field from a dropdown or select "Use Static Value". Regardless, the user should always +enter a static value as it will be used as a fallback value in the case that the entity is missing the selected entity field. #### Props -| Name | Type | Description | -| ------------------------- | --------------- | -------------------------------------------------------------------------------------------------------------------- | -| useDocument | function | See [@yext/pages useDocument](https://github.com/yext/pages/blob/main/packages/pages/src/util/README.md#usedocument) | -| label? | string | The user-facing label for the field. | -| filter?.types? | string[] | Determines which fields will be available based on field type. | -| filter?.includeSubfields? | boolean | | -| filter?.allowList? | types: string[] | Field names to include. Cannot be combined with disallowList. | -| filter?.disallowList? | types: string[] | Field names to exclude. Cannot be combined with allowList. | +| Name | Type | Description | +| ------------------------- | --------------- | -------------------------------------------------------------- | +| label? | string | The user-facing label for the field. | +| filter?.types? | string[] | Determines which fields will be available based on field type. | +| filter?.includeSubfields? | boolean | | +| filter?.allowList? | types: string[] | Field names to include. Cannot be combined with disallowList. | +| filter?.disallowList? | types: string[] | Field names to exclude. Cannot be combined with allowList. | -### resolveDataForEntityField +### resolveYextEntityField -Determines whether to use a constant value or an entity field. Used as [Puck's resolveData function](https://puckeditor.com/docs/api-reference/configuration/component-config#resolvedatadata-params). +Used in a component's render function to pull in the selected entity field's value from the document or use the static value. + +#### Props + +| Name | Type | +| ----------- | ------------------- | +| document | Record | +| entityField | EntityFieldType | ### Usage @@ -91,7 +99,7 @@ Determines whether to use a constant value or an entity field. Used as [Puck's r import { EntityFieldType, YextEntityFieldSelector, - resolveDataForEntityField, + resolveYextEntityField, } from "@yext/visual-editor"; import { config } from "../templates/myTemplate"; import { useDocument } from "@yext/pages/util"; @@ -109,7 +117,6 @@ const exampleFields: Fields = { objectFields: { //@ts-expect-error ts(2322) entityField: YextEntityFieldSelector({ - useDocument: useDocument, label: "Entity Field", filter: { types: ["type.string"], @@ -126,18 +133,17 @@ export const ExampleComponent: ComponentConfig = { defaultProps: { myField: { entityField: { - name: "", - value: "This is an example", // default constant value + fieldName: "", // default to Use Static Value + staticValue: "Example Text", // default static value }, }, }, label: "Example Component", - resolveData: (props, changed) => - resolveDataForEntityField("myField", props, changed), render: ({ myField }) => , }; const Example = ({ myField }: ExampleProps) => { - return

{myField.entityField.value}

; + const document = useDocument(); + return

{resolveYextEntityField(document, myField.entityField)}

; }; ``` diff --git a/src/components/YextEntityFieldSelector.tsx b/src/components/YextEntityFieldSelector.tsx index f5a33f8c..66a3f352 100644 --- a/src/components/YextEntityFieldSelector.tsx +++ b/src/components/YextEntityFieldSelector.tsx @@ -1,42 +1,24 @@ import React from "react"; -import { - AutoField, - FieldLabel, - ComponentData, - DefaultComponentProps, -} from "@measured/puck"; -import { Unlock } from "lucide-react"; +import { AutoField, FieldLabel } from "@measured/puck"; import { RenderProps } from "../utils/renderEntityFields.tsx"; import { getFilteredEntityFields, RenderEntityFieldFilter, } from "../utils/getFilteredEntityFields.ts"; -import { resolveProp } from "../utils/resolveProp.ts"; export type EntityFieldType = { - name: string; - value: string; + fieldName: string; + staticValue: string; }; export type RenderYextEntityFieldSelectorProps> = { - useDocument: (...args: any[]) => any; label: string; filter: RenderEntityFieldFilter; }; -type ResolveDataForEntityFieldProps = Omit< - ComponentData, - "type" ->; - -type ResolveDataForEntityFieldChanged = { - changed: Partial>; - lastData: Omit, "type"> | null; -}; - /** - * Allows the user to select an entity field from the document or set a constant value. + * Allows the user to select an entity field from the document and set a static value. */ export const YextEntityFieldSelector = >( props: RenderYextEntityFieldSelectorProps @@ -44,17 +26,12 @@ export const YextEntityFieldSelector = >( return { type: "custom", label: props.label, - render: ({ field, value, onChange, readOnly }: RenderProps) => { + render: ({ field, value, onChange }: RenderProps) => { const filteredEntityFields = getFilteredEntityFields(props.filter); - const document = props.useDocument(); return ( <> - + >( }), ], }} - onChange={(value) => { + onChange={(selectedEntityFieldName) => { onChange({ - name: value as unknown as string, // hack because the option value is a string so it comes back as a string even though TS thinks it's an object - value: resolveProp(document, value as unknown as string), + fieldName: selectedEntityFieldName, + staticValue: value.staticValue, }); }} - value={value?.name} - //@ts-expect-error ts(2367) - readOnly={readOnly === "name"} + value={value?.fieldName} /> - {value?.name && ( - - )} + onChange={(newStaticValue) => onChange({ - name: "", - value: value, + fieldName: value.fieldName, + staticValue: newStaticValue, }) } - value={value?.value} + value={value?.staticValue} field={{ type: "text", }} @@ -122,32 +76,3 @@ export const YextEntityFieldSelector = >( }, }; }; - -/** - * Locks or unlocks the constant value field on prop value update. - */ -export const resolveDataForEntityField = ( - fieldName: keyof T, - { props }: ResolveDataForEntityFieldProps, - { changed }: ResolveDataForEntityFieldChanged -) => { - if (props && props[fieldName] && !props[fieldName].entityField?.name) { - return { - props, - readOnly: { - [fieldName.toString() + ".entityField"]: false, - }, - }; - } - - if (!changed[fieldName]) { - return { props }; - } - - return { - props, - readOnly: { - [fieldName.toString() + ".entityField"]: "value", - }, - }; -}; diff --git a/src/components/index.css b/src/components/index.css index 2fe4a3f1..7b4e07fa 100644 --- a/src/components/index.css +++ b/src/components/index.css @@ -39,23 +39,7 @@ margin-left: -1px; } -.entityField:focus-visible { - outline: 2px solid var(--puck-color-azure-05); - outline-offset: 2px; - z-index: 1; -} - -.entityField:hover { - background: var(--puck-color-azure-12); - transition: none; - - .entityField-unlock-icon { - color: var(--puck-color-azure-04); - transition: none; - } -} - -.entityField-value { +.entityField-staticValue { margin-top: 10px; display: block; } diff --git a/src/components/index.ts b/src/components/index.ts index 6934013d..c540b229 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -1,9 +1,6 @@ export { Editor } from "./Editor.tsx"; export { EntityField } from "./EntityField.tsx"; -export { - YextEntityFieldSelector, - resolveDataForEntityField, -} from "./YextEntityFieldSelector.tsx"; +export { YextEntityFieldSelector } from "./YextEntityFieldSelector.tsx"; export type { RenderYextEntityFieldSelectorProps, EntityFieldType, diff --git a/src/utils/getFilteredEntityFields.ts b/src/utils/getFilteredEntityFields.ts index 4886c187..6dc5a333 100644 --- a/src/utils/getFilteredEntityFields.ts +++ b/src/utils/getFilteredEntityFields.ts @@ -143,6 +143,15 @@ export const getFilteredEntityFields = >( ); if (filter?.allowList) { + const streamFieldNames = filteredEntityFields.map((field) => field.name); + filter.allowList.forEach((field) => { + if (!streamFieldNames.includes(field)) { + console.warn( + `The entity field filter allowList included ${field}, which does not exist in the stream.` + ); + } + }); + filteredEntityFields = filteredEntityFields.filter((field) => filter.allowList.includes(field.name) ); diff --git a/src/utils/index.ts b/src/utils/index.ts index 3fa8c6f7..0ea749b4 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -1,3 +1,3 @@ export { renderEntityFields } from "./renderEntityFields.tsx"; export { resolveVisualEditorData } from "./resolveVisualEditorData.ts"; -export { resolveProp } from "./resolveProp.ts"; +export { resolveYextEntityField } from "./resolveYextEntityField.ts"; diff --git a/src/utils/resolveProp.ts b/src/utils/resolveProp.ts deleted file mode 100644 index 23d9a1df..00000000 --- a/src/utils/resolveProp.ts +++ /dev/null @@ -1,20 +0,0 @@ -export const resolveProp = (document: any, entityField: string): T => { - // check for the entity field in the document - const steps: string[] = entityField.split("."); - let missedStep = false; - let current = document; - for (let i = 0; i < steps.length; i++) { - if (current?.[steps[i]] !== undefined) { - current = current[steps[i]]; - } else { - missedStep = true; - break; - } - } - if (!missedStep) { - return current; - } - - // return as constant value - return entityField as T; -}; diff --git a/src/utils/resolveYextEntityField.ts b/src/utils/resolveYextEntityField.ts new file mode 100644 index 00000000..0056510d --- /dev/null +++ b/src/utils/resolveYextEntityField.ts @@ -0,0 +1,37 @@ +import { EntityFieldType } from "../components/YextEntityFieldSelector.tsx"; + +export const resolveYextEntityField = ( + document: any, + entityField: EntityFieldType +): T => { + // return static value if fieldName is not set + if (entityField.fieldName === "") { + return entityField.staticValue as T; + } + + try { + // check for the entity field in the document + const steps: string[] = entityField.fieldName.split("."); + let missedStep = false; + let current = document; + for (let i = 0; i < steps.length; i++) { + if (current?.[steps[i]] !== undefined) { + current = current[steps[i]]; + } else { + missedStep = true; + break; + } + } + if (!missedStep) { + return current; + } + } catch (e) { + console.error("Error in resolveYextEntityField:", e); + } + + // if field not found, return static value as a fallback + console.warn( + `The field ${entityField.fieldName} was not found in the document, defaulting to static value ${entityField.staticValue}.` + ); + return entityField.staticValue as T; +}; diff --git a/test/resolveProp.test.ts b/test/resolveProp.test.ts deleted file mode 100644 index d13ce819..00000000 --- a/test/resolveProp.test.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { test, assert } from "vitest"; -import { resolveProp } from "../src/utils/resolveProp.ts"; - -test("resolveProp returns value when field found in document", async () => { - assert.equal( - resolveProp( - { - address: { - city: "potato land", - }, - }, - "address.city" - ), - "potato land" - ); -}); - -test("resolveProp returns empty value when field found in document", async () => { - assert.equal( - resolveProp( - { - address: { - city: "", - }, - }, - "address.city" - ), - "" - ); -}); - -test("resolveProp returns constant value when field not found in document", async () => { - assert.equal( - resolveProp( - { - address: {}, - }, - "address.city" - ), - "address.city" - ); -}); diff --git a/test/resolveYextEntityField.test.ts b/test/resolveYextEntityField.test.ts new file mode 100644 index 00000000..bc0afa95 --- /dev/null +++ b/test/resolveYextEntityField.test.ts @@ -0,0 +1,56 @@ +import { test, assert } from "vitest"; +import { resolveYextEntityField } from "../src/utils/resolveYextEntityField.ts"; + +test("resolveYextEntityField returns value when field found in document", async () => { + assert.equal( + resolveYextEntityField( + { + address: { + city: "potato land", + }, + }, + { fieldName: "address.city", staticValue: "" } + ), + "potato land" + ); +}); + +test("resolveYextEntityField returns empty value when field found in document", async () => { + assert.equal( + resolveYextEntityField( + { + address: { + city: "", + }, + }, + { fieldName: "address.city", staticValue: "abc" } + ), + "" + ); +}); + +test("resolveYextEntityField returns static value when field not found in document", async () => { + assert.equal( + resolveYextEntityField( + { + address: {}, + }, + { fieldName: "address.city", staticValue: "City" } + ), + "City" + ); +}); + +test("resolveYextEntityField returns static value when fieldName not set", async () => { + assert.equal( + resolveYextEntityField( + { + address: { + city: "", + }, + }, + { fieldName: "", staticValue: "City" } + ), + "City" + ); +});