lightning-base-components 1.16.1-alpha → 1.16.3-alpha

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.
@@ -3389,6 +3389,20 @@
3389
3389
  }
3390
3390
  ]
3391
3391
  },
3392
+ "toast": {
3393
+ "slotNames": [
3394
+ "",
3395
+ "message"
3396
+ ],
3397
+ "properties": [
3398
+ {
3399
+ "name": "mode"
3400
+ },
3401
+ {
3402
+ "name": "variant"
3403
+ }
3404
+ ]
3405
+ },
3392
3406
  "tree": {
3393
3407
  "minVersion": "41.0",
3394
3408
  "slotNames": [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lightning-base-components",
3
- "version": "1.16.1-alpha",
3
+ "version": "1.16.3-alpha",
4
4
  "engines": {
5
5
  "node": ">=14.18.2"
6
6
  },
@@ -1,2 +1,11 @@
1
1
  @import 'lightning/sldsCommon';
2
2
  @import './color-picker-panel.slds.css';
3
+
4
+ /* Fix for footer button centering issue, for details see: W-11543875
5
+ *
6
+ * :host:not([data-render-mode]) - specifies that this style will only be applied in synthetic shadow mode
7
+ */
8
+
9
+ :host:not([data-render-mode]) .fix-slds-color-picker__selector-footer > lightning-button {
10
+ flex: 1;
11
+ }
@@ -30,9 +30,9 @@
30
30
  </div> -->
31
31
  </div>
32
32
  <footer class="slds-popover__footer">
33
- <div class="slds-color-picker__selector-footer">
33
+ <div class="slds-color-picker__selector-footer fix-slds-color-picker__selector-footer">
34
34
  <lightning-button label={i18n.cancelButton} name="cancel" stretch onclick={handleCancelClick}></lightning-button>
35
- <lightning-button variant="brand" label={i18n.doneButton} name="done" stretch onclick={handleDoneClick}></lightning-button>
35
+ <lightning-button class="slds-m-left_x-small" variant="brand" label={i18n.doneButton} name="done" stretch onclick={handleDoneClick}></lightning-button>
36
36
  </div>
37
37
  </footer>
38
38
  </section>
@@ -305,7 +305,6 @@ export default class LightningInput extends LightningElement {
305
305
  _files = null;
306
306
  _rendered;
307
307
  _selectionCache;
308
- _isConnected = false;
309
308
 
310
309
  constructor() {
311
310
  super();
@@ -330,7 +329,6 @@ export default class LightningInput extends LightningElement {
330
329
  // i.e. create an input element and pass it to showCustomOverlay
331
330
  // Remove this state and the one in AriaObserver once the issue is fixed.
332
331
  // PR: https://github.com/salesforce/lwc/pull/1798
333
- this._isConnected = true;
334
332
 
335
333
  this.classList.add('slds-form-element');
336
334
 
@@ -346,8 +344,6 @@ export default class LightningInput extends LightningElement {
346
344
  }
347
345
 
348
346
  disconnectedCallback() {
349
- this._isConnected = false;
350
-
351
347
  this._rendered = false;
352
348
  this._initialValueSet = false;
353
349
  this._cachedInputElement = undefined;
@@ -381,7 +377,9 @@ export default class LightningInput extends LightningElement {
381
377
  this._initialValueSet = true;
382
378
  }
383
379
 
384
- this.ariaObserver.sync();
380
+ if (this.isConnected) {
381
+ this.ariaObserver.sync();
382
+ }
385
383
  this._synchronizeA11y();
386
384
  }
387
385
 
@@ -1450,7 +1448,7 @@ export default class LightningInput extends LightningElement {
1450
1448
  // This will not affect the value dispatched by input via the change event, as it only dispatches a valid decimal number.
1451
1449
  // Due to the above, in integrations like input-field, the user's initial input of a symbol
1452
1450
  // like a minus sign will not be overwritten by an empty string value.
1453
- // See description in PR for more details: https://github.com/salesforce/lightning-components/pull/3843
1451
+ // See description in PR for more details: https://github.com/salesforce-experience-platform/lightning-components/pull/3843
1454
1452
  if (
1455
1453
  this._inputElement.value.length === 1 &&
1456
1454
  hasValidNumberSymbol(this._inputElement.value)
@@ -35,7 +35,7 @@ function convertAndFormatDate(date, format, timeZone) {
35
35
  * @param {String|Number|Date} value
36
36
  * @returns Date
37
37
  */
38
- function toDate(value) {
38
+ export function toDate(value) {
39
39
  if (!isDate(value) && isFinite(value)) {
40
40
  // handles timestamp as number or string
41
41
  return new Date(parseInt(value, 10));
@@ -29,6 +29,8 @@ export {
29
29
  getTimeFormatFromStyle,
30
30
  } from './datetime/dateTimeUtils';
31
31
 
32
+ export { toDate } from './datetime/intlFormat';
33
+
32
34
  export {
33
35
  isBefore,
34
36
  isAfter,
@@ -1,6 +1,7 @@
1
1
  import PrimitiveDatatableCell from 'lightning/primitiveDatatableCell';
2
2
  import { api } from 'lwc';
3
3
  import { classSet } from 'lightning/utils';
4
+ import { toDate } from 'lightning/internationalizationLibrary';
4
5
  import cellWithStandardLayout from './cellWithStandardLayout.html';
5
6
  import bareCustomCell from './bareCustomCell.html';
6
7
  import labelEdit from '@salesforce/label/LightningDatatable.edit';
@@ -325,7 +326,19 @@ export default class PrivateCellFactory extends PrimitiveDatatableCell {
325
326
  }
326
327
 
327
328
  get dateValue() {
328
- return this.value;
329
+ // Supported values can be passed directly to lightning-formatted-date-time
330
+ // but non-supported formats need to be passed through Date constructor
331
+ // to avoid customer breakages for the time being. Ideally this will be
332
+ // temporary and we can remove use of the Date constructor in the future
333
+ try {
334
+ toDate(this.value); // will throw error if value isn't supported
335
+ return this.value;
336
+ } catch (err) {
337
+ console.warn(
338
+ `'${this.value}' does not follow a supported date format. Please use either a timestamp, ISO8601 string, or Date object to avoid risking inconsistencies and breakages.`
339
+ );
340
+ return new Date(this.value);
341
+ }
329
342
  }
330
343
 
331
344
  get computedDateLocalDay() {
@@ -0,0 +1 @@
1
+ <template></template>
@@ -0,0 +1,11 @@
1
+ import { LightningElement } from 'lwc';
2
+
3
+ export default class LightningShadowBaseClass extends LightningElement {
4
+ static shadowSupportMode = 'any';
5
+
6
+ connectedCallback() {
7
+ if (!this.template.synthetic) {
8
+ this.template.host.setAttribute('data-render-mode', 'shadow');
9
+ }
10
+ }
11
+ }