@brightspace-ui/core 1.208.0 → 1.208.1

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.
@@ -15,6 +15,7 @@ import { formatDateInISO,
15
15
  parseISOTime } from '../../helpers/dateTime.js';
16
16
  import { FormElementMixin } from '../form/form-element-mixin.js';
17
17
  import { getDefaultTime } from './input-time.js';
18
+ import { getDocumentLocaleSettings } from '@brightspace-ui/intl/lib/common.js';
18
19
  import { getUniqueId } from '../../helpers/uniqueId.js';
19
20
  import { ifDefined } from 'lit-html/directives/if-defined.js';
20
21
  import { LabelledMixin } from '../../mixins/labelled-mixin.js';
@@ -119,6 +120,7 @@ class InputDateTime extends LabelledMixin(SkeletonMixin(FormElementMixin(Localiz
119
120
  this.opened = false;
120
121
  this.required = false;
121
122
  this.timeDefaultValue = 'startOfDay';
123
+ this._documentLocaleSettings = getDocumentLocaleSettings();
122
124
  this._inputId = getUniqueId();
123
125
  this._namespace = 'components.input-date-time';
124
126
  this._preventDefaultValidation = false;
@@ -190,6 +192,16 @@ class InputDateTime extends LabelledMixin(SkeletonMixin(FormElementMixin(Localiz
190
192
  return super.validationMessage;
191
193
  }
192
194
 
195
+ connectedCallback() {
196
+ super.connectedCallback();
197
+ this._documentLocaleSettings.addChangeListener(this._handleLocaleChange.bind(this));
198
+ }
199
+
200
+ disconnectedCallback() {
201
+ super.disconnectedCallback();
202
+ this._documentLocaleSettings.removeChangeListener(this._handleLocaleChange.bind(this));
203
+ }
204
+
193
205
  firstUpdated(changedProperties) {
194
206
  super.firstUpdated(changedProperties);
195
207
 
@@ -343,6 +355,10 @@ class InputDateTime extends LabelledMixin(SkeletonMixin(FormElementMixin(Localiz
343
355
  if (tooltip) tooltip.show();
344
356
  }
345
357
 
358
+ _handleLocaleChange() {
359
+ this.requestUpdate();
360
+ }
361
+
346
362
  async _handleTimeChange(e) {
347
363
  const date = this.shadowRoot.querySelector('d2l-input-date').value;
348
364
  const time = e.target.value;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "1.208.0",
3
+ "version": "1.208.1",
4
4
  "description": "A collection of accessible, free, open-source web components for building Brightspace applications",
5
5
  "repository": "https://github.com/BrightspaceUI/core.git",
6
6
  "publishConfig": {