From 300ad88447d9e1eb60f6943c1c7de693db2647a9 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 15 Jan 2022 14:56:18 +0100 Subject: [PATCH] web: add polyfill for Intl.ListFormat Signed-off-by: Jens Langhammer --- web/package-lock.json | 55 +++++++++++++++++++++++++++++++++++++++++++ web/package.json | 1 + web/poly.ts | 3 +++ 3 files changed, 59 insertions(+) diff --git a/web/package-lock.json b/web/package-lock.json index 873ebf37f..c18b31433 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -14,6 +14,7 @@ "@babel/plugin-transform-runtime": "^7.16.8", "@babel/preset-env": "^7.16.8", "@babel/preset-typescript": "^7.16.7", + "@formatjs/intl-listformat": "^6.5.0", "@fortawesome/fontawesome-free": "^5.15.4", "@goauthentik/api": "^2021.12.5-1642024690", "@jackfranklin/rollup-plugin-markdown": "^0.3.0", @@ -1715,6 +1716,33 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@formatjs/ecma402-abstract": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@formatjs/ecma402-abstract/-/ecma402-abstract-1.11.1.tgz", + "integrity": "sha512-tgtNODZUGuUI6PAcnvaLZpGrZLVkXnnAvgzOiueYMzFdOdcOw4iH1WKhCe3+r6VR8rHKToJ2HksUGNCB+zt/bg==", + "dependencies": { + "@formatjs/intl-localematcher": "0.2.22", + "tslib": "^2.1.0" + } + }, + "node_modules/@formatjs/intl-listformat": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@formatjs/intl-listformat/-/intl-listformat-6.5.0.tgz", + "integrity": "sha512-gVyAV5QWWtq84MK4cAyJITW+Wb74c2+FT+wa8jhSPxXUky9B5z/k/Ff7or4Vb3KV0YYZuVBQ/vMIoD8Gr182ww==", + "dependencies": { + "@formatjs/ecma402-abstract": "1.11.1", + "@formatjs/intl-localematcher": "0.2.22", + "tslib": "^2.1.0" + } + }, + "node_modules/@formatjs/intl-localematcher": { + "version": "0.2.22", + "resolved": "https://registry.npmjs.org/@formatjs/intl-localematcher/-/intl-localematcher-0.2.22.tgz", + "integrity": "sha512-z+TvbHW8Q/g2l7/PnfUl0mV9gWxV4d0HT6GQyzkO5QI6QjCvCZGiztnmLX7zoyS16uSMvZ2PoMDfSK9xvZkRRA==", + "dependencies": { + "tslib": "^2.1.0" + } + }, "node_modules/@fortawesome/fontawesome-free": { "version": "5.15.4", "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.4.tgz", @@ -9953,6 +9981,33 @@ } } }, + "@formatjs/ecma402-abstract": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@formatjs/ecma402-abstract/-/ecma402-abstract-1.11.1.tgz", + "integrity": "sha512-tgtNODZUGuUI6PAcnvaLZpGrZLVkXnnAvgzOiueYMzFdOdcOw4iH1WKhCe3+r6VR8rHKToJ2HksUGNCB+zt/bg==", + "requires": { + "@formatjs/intl-localematcher": "0.2.22", + "tslib": "^2.1.0" + } + }, + "@formatjs/intl-listformat": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@formatjs/intl-listformat/-/intl-listformat-6.5.0.tgz", + "integrity": "sha512-gVyAV5QWWtq84MK4cAyJITW+Wb74c2+FT+wa8jhSPxXUky9B5z/k/Ff7or4Vb3KV0YYZuVBQ/vMIoD8Gr182ww==", + "requires": { + "@formatjs/ecma402-abstract": "1.11.1", + "@formatjs/intl-localematcher": "0.2.22", + "tslib": "^2.1.0" + } + }, + "@formatjs/intl-localematcher": { + "version": "0.2.22", + "resolved": "https://registry.npmjs.org/@formatjs/intl-localematcher/-/intl-localematcher-0.2.22.tgz", + "integrity": "sha512-z+TvbHW8Q/g2l7/PnfUl0mV9gWxV4d0HT6GQyzkO5QI6QjCvCZGiztnmLX7zoyS16uSMvZ2PoMDfSK9xvZkRRA==", + "requires": { + "tslib": "^2.1.0" + } + }, "@fortawesome/fontawesome-free": { "version": "5.15.4", "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.4.tgz", diff --git a/web/package.json b/web/package.json index fac723f32..624bc4326 100644 --- a/web/package.json +++ b/web/package.json @@ -51,6 +51,7 @@ "@babel/plugin-transform-runtime": "^7.16.8", "@babel/preset-env": "^7.16.8", "@babel/preset-typescript": "^7.16.7", + "@formatjs/intl-listformat": "^6.5.0", "@fortawesome/fontawesome-free": "^5.15.4", "@goauthentik/api": "^2021.12.5-1642024690", "@jackfranklin/rollup-plugin-markdown": "^0.3.0", diff --git a/web/poly.ts b/web/poly.ts index 1f2c34919..6afe749e8 100644 --- a/web/poly.ts +++ b/web/poly.ts @@ -3,3 +3,6 @@ window["polymerSkipLoadingFontRoboto"] = true; import "construct-style-sheets-polyfill"; import "@webcomponents/webcomponentsjs"; import "lit/polyfill-support.js"; + +import "@formatjs/intl-listformat/polyfill.js"; +import "@formatjs/intl-listformat/locale-data/en.js";