sas-ui 0.8.280 → 0.8.281

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.
@@ -4286,16 +4286,6 @@ function getTimezonesForSet(zoneSet) {
4286
4286
  function isValidTimezone(iana) {
4287
4287
  return !!iana && getAllTimezones().indexOf(iana) !== -1;
4288
4288
  }
4289
- /**
4290
- * Read the locale the client is running under, e.g. `en-AU`.
4291
- * @returns A BCP-47 tag, or `null` outside a browser.
4292
- */
4293
- function getClientLocale() {
4294
- if (typeof navigator === 'undefined') {
4295
- return null;
4296
- }
4297
- return navigator.language || null;
4298
- }
4299
4289
  /**
4300
4290
  * Read the timezone the client is running in.
4301
4291
  * @returns A canonical IANA identifier, or `null` if it isn't recognised.
@@ -4376,7 +4366,6 @@ const sasTimezoneSelectCss = ":host{display:block}";
4376
4366
  let SasTimezoneSelect = class {
4377
4367
  constructor(hostRef) {
4378
4368
  index.registerInstance(this, hostRef);
4379
- this.timezoneUpdate = index.createEvent(this, "timezoneUpdate", 7);
4380
4369
  this.timezoneupdate = index.createEvent(this, "timezoneupdate", 7);
4381
4370
  this.autoSelected = false;
4382
4371
  /**
@@ -4392,10 +4381,9 @@ let SasTimezoneSelect = class {
4392
4381
  */
4393
4382
  this.defaultValue = null;
4394
4383
  /**
4395
- * Consumer locale, drives the pinned region and label localisation.
4396
- * Falls back to the client locale.
4384
+ * Consumer locale, drives the pinned region and label localisation
4397
4385
  */
4398
- this.locale = null;
4386
+ this.locale = 'en-AU';
4399
4387
  /**
4400
4388
  * Select the client's own timezone when no value is set
4401
4389
  */
@@ -4465,7 +4453,7 @@ let SasTimezoneSelect = class {
4465
4453
  event.stopPropagation();
4466
4454
  const iana = event.detail ? event.detail.value : null;
4467
4455
  this.value = iana;
4468
- this.timezoneUpdate.emit({ value: iana });
4456
+ this.emitUpdate();
4469
4457
  }
4470
4458
  componentWillLoad() {
4471
4459
  this.options = this.buildOptions();
@@ -4481,7 +4469,7 @@ let SasTimezoneSelect = class {
4481
4469
  }
4482
4470
  componentDidLoad() {
4483
4471
  if (this.autoSelected) {
4484
- this.timezoneUpdate.emit({ value: this.value });
4472
+ this.emitUpdate();
4485
4473
  }
4486
4474
  }
4487
4475
  /**
@@ -4527,6 +4515,9 @@ let SasTimezoneSelect = class {
4527
4515
  await select.resetErrorStatus();
4528
4516
  }
4529
4517
  }
4518
+ emitUpdate() {
4519
+ this.timezoneupdate.emit({ value: this.value });
4520
+ }
4530
4521
  getInnerSelect() {
4531
4522
  return this.el.shadowRoot === null ? null : this.el.shadowRoot.querySelector('sas-select');
4532
4523
  }
@@ -4552,7 +4543,7 @@ let SasTimezoneSelect = class {
4552
4543
  buildOptions() {
4553
4544
  return buildTimezoneOptions({
4554
4545
  zoneSet: this.zoneSet,
4555
- locale: this.locale || getClientLocale(),
4546
+ locale: this.locale,
4556
4547
  priorityRegions: this.resolvePriorityRegions(),
4557
4548
  displayFormat: this.displayFormat,
4558
4549
  formatter: this.formatLabel,
@@ -1,5 +1,5 @@
1
1
  import { Component, Element, Host, Method, Prop, State, Watch, Event, Listen, h, } from '@stencil/core';
2
- import { buildTimezoneOptions, getClientLocale, getClientTimezone, isValidTimezone, } from './timezones/timezone-data';
2
+ import { buildTimezoneOptions, getClientTimezone, isValidTimezone, } from './timezones/timezone-data';
3
3
  export class SasTimezoneSelect {
4
4
  constructor() {
5
5
  this.autoSelected = false;
@@ -16,10 +16,9 @@ export class SasTimezoneSelect {
16
16
  */
17
17
  this.defaultValue = null;
18
18
  /**
19
- * Consumer locale, drives the pinned region and label localisation.
20
- * Falls back to the client locale.
19
+ * Consumer locale, drives the pinned region and label localisation
21
20
  */
22
- this.locale = null;
21
+ this.locale = 'en-AU';
23
22
  /**
24
23
  * Select the client's own timezone when no value is set
25
24
  */
@@ -89,7 +88,7 @@ export class SasTimezoneSelect {
89
88
  event.stopPropagation();
90
89
  const iana = event.detail ? event.detail.value : null;
91
90
  this.value = iana;
92
- this.timezoneUpdate.emit({ value: iana });
91
+ this.emitUpdate();
93
92
  }
94
93
  componentWillLoad() {
95
94
  this.options = this.buildOptions();
@@ -105,7 +104,7 @@ export class SasTimezoneSelect {
105
104
  }
106
105
  componentDidLoad() {
107
106
  if (this.autoSelected) {
108
- this.timezoneUpdate.emit({ value: this.value });
107
+ this.emitUpdate();
109
108
  }
110
109
  }
111
110
  /**
@@ -151,6 +150,9 @@ export class SasTimezoneSelect {
151
150
  await select.resetErrorStatus();
152
151
  }
153
152
  }
153
+ emitUpdate() {
154
+ this.timezoneupdate.emit({ value: this.value });
155
+ }
154
156
  getInnerSelect() {
155
157
  return this.el.shadowRoot === null ? null : this.el.shadowRoot.querySelector('sas-select');
156
158
  }
@@ -176,7 +178,7 @@ export class SasTimezoneSelect {
176
178
  buildOptions() {
177
179
  return buildTimezoneOptions({
178
180
  zoneSet: this.zoneSet,
179
- locale: this.locale || getClientLocale(),
181
+ locale: this.locale,
180
182
  priorityRegions: this.resolvePriorityRegions(),
181
183
  displayFormat: this.displayFormat,
182
184
  formatter: this.formatLabel,
@@ -261,11 +263,11 @@ export class SasTimezoneSelect {
261
263
  "optional": false,
262
264
  "docs": {
263
265
  "tags": [],
264
- "text": "Consumer locale, drives the pinned region and label localisation.\r\nFalls back to the client locale."
266
+ "text": "Consumer locale, drives the pinned region and label localisation"
265
267
  },
266
268
  "attribute": "locale",
267
269
  "reflect": true,
268
- "defaultValue": "null"
270
+ "defaultValue": "'en-AU'"
269
271
  },
270
272
  "auto": {
271
273
  "type": "boolean",
@@ -556,21 +558,6 @@ export class SasTimezoneSelect {
556
558
  "options": {}
557
559
  }; }
558
560
  static get events() { return [{
559
- "method": "timezoneUpdate",
560
- "name": "timezoneUpdate",
561
- "bubbles": true,
562
- "cancelable": true,
563
- "composed": true,
564
- "docs": {
565
- "tags": [],
566
- "text": "Emitted when the value is changed by user interaction (will be deprecated)"
567
- },
568
- "complexType": {
569
- "original": "{ value: string }",
570
- "resolved": "{ value: string; }",
571
- "references": {}
572
- }
573
- }, {
574
561
  "method": "timezoneupdate",
575
562
  "name": "timezoneupdate",
576
563
  "bubbles": true,
@@ -578,7 +565,7 @@ export class SasTimezoneSelect {
578
565
  "composed": true,
579
566
  "docs": {
580
567
  "tags": [],
581
- "text": "Emitted when the value is changed by user interaction"
568
+ "text": "Emitted when the value is changed by user interaction or auto selection"
582
569
  },
583
570
  "complexType": {
584
571
  "original": "{ value: string }",
@@ -183,16 +183,6 @@ export function getTimezonesForSet(zoneSet) {
183
183
  export function isValidTimezone(iana) {
184
184
  return !!iana && getAllTimezones().indexOf(iana) !== -1;
185
185
  }
186
- /**
187
- * Read the locale the client is running under, e.g. `en-AU`.
188
- * @returns A BCP-47 tag, or `null` outside a browser.
189
- */
190
- export function getClientLocale() {
191
- if (typeof navigator === 'undefined') {
192
- return null;
193
- }
194
- return navigator.language || null;
195
- }
196
186
  /**
197
187
  * Read the timezone the client is running in.
198
188
  * @returns A canonical IANA identifier, or `null` if it isn't recognised.
@@ -14629,16 +14629,6 @@ function getTimezonesForSet(zoneSet) {
14629
14629
  function isValidTimezone(iana) {
14630
14630
  return !!iana && getAllTimezones().indexOf(iana) !== -1;
14631
14631
  }
14632
- /**
14633
- * Read the locale the client is running under, e.g. `en-AU`.
14634
- * @returns A BCP-47 tag, or `null` outside a browser.
14635
- */
14636
- function getClientLocale() {
14637
- if (typeof navigator === 'undefined') {
14638
- return null;
14639
- }
14640
- return navigator.language || null;
14641
- }
14642
14632
  /**
14643
14633
  * Read the timezone the client is running in.
14644
14634
  * @returns A canonical IANA identifier, or `null` if it isn't recognised.
@@ -14721,7 +14711,6 @@ let SasTimezoneSelect$1 = class extends H {
14721
14711
  super();
14722
14712
  this.__registerHost();
14723
14713
  this.__attachShadow();
14724
- this.timezoneUpdate = createEvent(this, "timezoneUpdate", 7);
14725
14714
  this.timezoneupdate = createEvent(this, "timezoneupdate", 7);
14726
14715
  this.autoSelected = false;
14727
14716
  /**
@@ -14737,10 +14726,9 @@ let SasTimezoneSelect$1 = class extends H {
14737
14726
  */
14738
14727
  this.defaultValue = null;
14739
14728
  /**
14740
- * Consumer locale, drives the pinned region and label localisation.
14741
- * Falls back to the client locale.
14729
+ * Consumer locale, drives the pinned region and label localisation
14742
14730
  */
14743
- this.locale = null;
14731
+ this.locale = 'en-AU';
14744
14732
  /**
14745
14733
  * Select the client's own timezone when no value is set
14746
14734
  */
@@ -14810,7 +14798,7 @@ let SasTimezoneSelect$1 = class extends H {
14810
14798
  event.stopPropagation();
14811
14799
  const iana = event.detail ? event.detail.value : null;
14812
14800
  this.value = iana;
14813
- this.timezoneUpdate.emit({ value: iana });
14801
+ this.emitUpdate();
14814
14802
  }
14815
14803
  componentWillLoad() {
14816
14804
  this.options = this.buildOptions();
@@ -14826,7 +14814,7 @@ let SasTimezoneSelect$1 = class extends H {
14826
14814
  }
14827
14815
  componentDidLoad() {
14828
14816
  if (this.autoSelected) {
14829
- this.timezoneUpdate.emit({ value: this.value });
14817
+ this.emitUpdate();
14830
14818
  }
14831
14819
  }
14832
14820
  /**
@@ -14872,6 +14860,9 @@ let SasTimezoneSelect$1 = class extends H {
14872
14860
  await select.resetErrorStatus();
14873
14861
  }
14874
14862
  }
14863
+ emitUpdate() {
14864
+ this.timezoneupdate.emit({ value: this.value });
14865
+ }
14875
14866
  getInnerSelect() {
14876
14867
  return this.el.shadowRoot === null ? null : this.el.shadowRoot.querySelector('sas-select');
14877
14868
  }
@@ -14897,7 +14888,7 @@ let SasTimezoneSelect$1 = class extends H {
14897
14888
  buildOptions() {
14898
14889
  return buildTimezoneOptions({
14899
14890
  zoneSet: this.zoneSet,
14900
- locale: this.locale || getClientLocale(),
14891
+ locale: this.locale,
14901
14892
  priorityRegions: this.resolvePriorityRegions(),
14902
14893
  displayFormat: this.displayFormat,
14903
14894
  formatter: this.formatLabel,
@@ -4282,16 +4282,6 @@ function getTimezonesForSet(zoneSet) {
4282
4282
  function isValidTimezone(iana) {
4283
4283
  return !!iana && getAllTimezones().indexOf(iana) !== -1;
4284
4284
  }
4285
- /**
4286
- * Read the locale the client is running under, e.g. `en-AU`.
4287
- * @returns A BCP-47 tag, or `null` outside a browser.
4288
- */
4289
- function getClientLocale() {
4290
- if (typeof navigator === 'undefined') {
4291
- return null;
4292
- }
4293
- return navigator.language || null;
4294
- }
4295
4285
  /**
4296
4286
  * Read the timezone the client is running in.
4297
4287
  * @returns A canonical IANA identifier, or `null` if it isn't recognised.
@@ -4372,7 +4362,6 @@ const sasTimezoneSelectCss = ":host{display:block}";
4372
4362
  let SasTimezoneSelect = class {
4373
4363
  constructor(hostRef) {
4374
4364
  registerInstance(this, hostRef);
4375
- this.timezoneUpdate = createEvent(this, "timezoneUpdate", 7);
4376
4365
  this.timezoneupdate = createEvent(this, "timezoneupdate", 7);
4377
4366
  this.autoSelected = false;
4378
4367
  /**
@@ -4388,10 +4377,9 @@ let SasTimezoneSelect = class {
4388
4377
  */
4389
4378
  this.defaultValue = null;
4390
4379
  /**
4391
- * Consumer locale, drives the pinned region and label localisation.
4392
- * Falls back to the client locale.
4380
+ * Consumer locale, drives the pinned region and label localisation
4393
4381
  */
4394
- this.locale = null;
4382
+ this.locale = 'en-AU';
4395
4383
  /**
4396
4384
  * Select the client's own timezone when no value is set
4397
4385
  */
@@ -4461,7 +4449,7 @@ let SasTimezoneSelect = class {
4461
4449
  event.stopPropagation();
4462
4450
  const iana = event.detail ? event.detail.value : null;
4463
4451
  this.value = iana;
4464
- this.timezoneUpdate.emit({ value: iana });
4452
+ this.emitUpdate();
4465
4453
  }
4466
4454
  componentWillLoad() {
4467
4455
  this.options = this.buildOptions();
@@ -4477,7 +4465,7 @@ let SasTimezoneSelect = class {
4477
4465
  }
4478
4466
  componentDidLoad() {
4479
4467
  if (this.autoSelected) {
4480
- this.timezoneUpdate.emit({ value: this.value });
4468
+ this.emitUpdate();
4481
4469
  }
4482
4470
  }
4483
4471
  /**
@@ -4523,6 +4511,9 @@ let SasTimezoneSelect = class {
4523
4511
  await select.resetErrorStatus();
4524
4512
  }
4525
4513
  }
4514
+ emitUpdate() {
4515
+ this.timezoneupdate.emit({ value: this.value });
4516
+ }
4526
4517
  getInnerSelect() {
4527
4518
  return this.el.shadowRoot === null ? null : this.el.shadowRoot.querySelector('sas-select');
4528
4519
  }
@@ -4548,7 +4539,7 @@ let SasTimezoneSelect = class {
4548
4539
  buildOptions() {
4549
4540
  return buildTimezoneOptions({
4550
4541
  zoneSet: this.zoneSet,
4551
- locale: this.locale || getClientLocale(),
4542
+ locale: this.locale,
4552
4543
  priorityRegions: this.resolvePriorityRegions(),
4553
4544
  displayFormat: this.displayFormat,
4554
4545
  formatter: this.formatLabel,