@brightspace-ui/core 2.20.0 → 2.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -422,7 +422,7 @@ class Calendar extends LocalizeCoreElement(RtlMixin(LitElement)) {
|
|
|
422
422
|
|
|
423
423
|
this.addEventListener('blur', () => this._isInitialFocusDate = true);
|
|
424
424
|
|
|
425
|
-
this.addEventListener('d2l-localize-
|
|
425
|
+
this.addEventListener('d2l-localize-resources-change', () => {
|
|
426
426
|
calendarData = null;
|
|
427
427
|
getCalendarData(true);
|
|
428
428
|
this.requestUpdate();
|
|
@@ -200,7 +200,7 @@ class InputDate extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixin(
|
|
|
200
200
|
this._textInput = this.shadowRoot.querySelector('d2l-input-text');
|
|
201
201
|
|
|
202
202
|
this.addEventListener('blur', this._handleBlur);
|
|
203
|
-
this.addEventListener('d2l-localize-
|
|
203
|
+
this.addEventListener('d2l-localize-resources-change', () => {
|
|
204
204
|
this._dateTimeDescriptor = getDateTimeDescriptorShared(true);
|
|
205
205
|
this.requestUpdate();
|
|
206
206
|
this.updateComplete.then(() => {
|
|
@@ -308,7 +308,7 @@ class InputNumber extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixi
|
|
|
308
308
|
|
|
309
309
|
firstUpdated(changedProperties) {
|
|
310
310
|
super.firstUpdated(changedProperties);
|
|
311
|
-
this.addEventListener('d2l-localize-
|
|
311
|
+
this.addEventListener('d2l-localize-resources-change', () => {
|
|
312
312
|
this._descriptor = getNumberDescriptor();
|
|
313
313
|
if (this._formattedValue.length > 0) {
|
|
314
314
|
this._updateFormattedValue();
|
|
@@ -271,7 +271,7 @@ class InputTime extends FocusMixin(LabelledMixin(SkeletonMixin(FormElementMixin(
|
|
|
271
271
|
}
|
|
272
272
|
|
|
273
273
|
const hiddenContent = this.shadowRoot.querySelector('.d2l-input-time-hidden-content');
|
|
274
|
-
this.addEventListener('d2l-localize-
|
|
274
|
+
this.addEventListener('d2l-localize-resources-change', async() => {
|
|
275
275
|
await this.updateComplete;
|
|
276
276
|
this._formattedValue = formatTime(getDateFromISOTime(this.value));
|
|
277
277
|
INTERVALS.clear();
|
package/mixins/localize-mixin.js
CHANGED
|
@@ -35,11 +35,10 @@ export const LocalizeMixin = dedupeMixin(superclass => class extends superclass
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
this.__resources = resources;
|
|
38
|
+
this._onResourcesChange();
|
|
38
39
|
if (first) {
|
|
39
40
|
resolve();
|
|
40
41
|
first = false;
|
|
41
|
-
} else {
|
|
42
|
-
this._languageChange();
|
|
43
42
|
}
|
|
44
43
|
});
|
|
45
44
|
};
|
|
@@ -183,11 +182,9 @@ export const LocalizeMixin = dedupeMixin(superclass => class extends superclass
|
|
|
183
182
|
return this.constructor['getLocalizeResources'] !== undefined;
|
|
184
183
|
}
|
|
185
184
|
|
|
186
|
-
|
|
185
|
+
_onResourcesChange() {
|
|
187
186
|
/** @ignore */
|
|
188
|
-
this.dispatchEvent(new CustomEvent(
|
|
189
|
-
'd2l-localize-behavior-language-changed', { bubbles: true, composed: true }
|
|
190
|
-
));
|
|
187
|
+
this.dispatchEvent(new CustomEvent('d2l-localize-resources-change'));
|
|
191
188
|
}
|
|
192
189
|
|
|
193
190
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.21.0",
|
|
4
4
|
"description": "A collection of accessible, free, open-source web components for building Brightspace applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": "https://github.com/BrightspaceUI/core.git",
|