@brightspace-ui/intl
Advanced tools
Comparing version 3.21.1 to 3.21.2
@@ -237,3 +237,3 @@ import { getDocumentLocaleSettings } from '../lib/common.js'; | ||
return Boolean(documentLocaleSettings.oslo.batch) && 'CacheStorage' in window; | ||
} catch (err) { | ||
} catch { | ||
return false; | ||
@@ -240,0 +240,0 @@ } |
@@ -211,3 +211,3 @@ export const defaultLocale = 'en'; | ||
return JSON.parse(this._htmlElem.getAttribute(attrName)); | ||
} catch (e) { | ||
} catch { | ||
// swallow exception | ||
@@ -214,0 +214,0 @@ } |
@@ -38,3 +38,2 @@ import './PluralRules.js'; | ||
static documentLocaleSettings = getDocumentLocaleSettings(); | ||
static setLocalizeMarkup(localizeMarkup) { | ||
@@ -52,3 +51,2 @@ this.#localizeMarkup ??= localizeMarkup; | ||
} | ||
disconnect() { | ||
@@ -58,3 +56,2 @@ LocalizeClass.documentLocaleSettings.removeChangeListener(this.#localeChangeCallback); | ||
} | ||
localize(name, replacements) { | ||
@@ -138,3 +135,2 @@ | ||
__resourcesLoadedPromise = new Promise(r => this.#resolveResourcesLoaded = r); | ||
static _generatePossibleLanguages(config) { | ||
@@ -152,3 +148,2 @@ | ||
} | ||
static _getAllLocalizeResources(config = this.localizeConfig) { | ||
@@ -180,3 +175,2 @@ const resourcesLoadedPromises = []; | ||
} | ||
static async _getLocalizeResources(langs, { importFunc, osloCollection, useBrowserLangs }) { | ||
@@ -212,3 +206,2 @@ | ||
} | ||
_hasResources() { | ||
@@ -215,0 +208,0 @@ if (this.constructor.localizeConfig) { |
@@ -55,7 +55,5 @@ const localeData = { | ||
} | ||
resolvedOptions() { | ||
return { ...super.resolvedOptions(), ...this.#localeData?.options[this.#type] }; | ||
} | ||
select(n) { | ||
@@ -62,0 +60,0 @@ if (this.#localeData) { |
{ | ||
"name": "@brightspace-ui/intl", | ||
"version": "3.21.1", | ||
"version": "3.21.2", | ||
"description": "Internationalization APIs for number, date, time and file size formatting and parsing in D2L Brightspace.", | ||
@@ -8,3 +8,3 @@ "main": "lib/number.js", | ||
"scripts": { | ||
"lint": "eslint . --ext .js", | ||
"lint": "eslint .", | ||
"start": "web-dev-server --node-resolve --watch --open /demo/", | ||
@@ -44,4 +44,4 @@ "test:unit": "d2l-test-runner", | ||
"@brightspace-ui/testing": "^1", | ||
"eslint": "^8", | ||
"eslint-config-brightspace": "^1", | ||
"eslint": "^9", | ||
"eslint-config-brightspace": "^2", | ||
"sinon": "^19.0.2" | ||
@@ -48,0 +48,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
114329