lightning-base-components 1.21.4-alpha → 1.21.6-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.
- package/metadata/raptor.json +2 -1
- package/package.json +9 -1
- package/scopedImports/@salesforce-label-LightningLookup.messageWhenSearchTermTooShort.js +1 -0
- package/src/lightning/accordion/__docs__/accordion.md +0 -4
- package/src/lightning/accordionSection/__docs__/accordionSection.md +0 -4
- package/src/lightning/avatar/__docs__/avatar.md +0 -4
- package/src/lightning/badge/__docs__/badge.md +0 -4
- package/src/lightning/badge/badge.slds.css +1 -1
- package/src/lightning/barcodeScanner/__docs__/barcodeScanner.md +0 -4
- package/src/lightning/baseCombobox/baseCombobox.js +2 -2
- package/src/lightning/baseComboboxItem/baseComboboxItem.js +6 -10
- package/src/lightning/button/__docs__/button.md +3 -7
- package/src/lightning/buttonGroup/__docs__/buttonGroup.md +0 -4
- package/src/lightning/buttonIcon/__docs__/buttonIcon.md +0 -4
- package/src/lightning/buttonIconStateful/__docs__/buttonIconStateful.md +0 -4
- package/src/lightning/buttonMenu/__docs__/buttonMenu.md +0 -4
- package/src/lightning/buttonStateful/__docs__/buttonStateful.md +0 -4
- package/src/lightning/buttonStateful/buttonStateful.html +5 -3
- package/src/lightning/buttonStateful/buttonStateful.js +4 -0
- package/src/lightning/card/__docs__/card.md +0 -4
- package/src/lightning/card/card.js-meta.xml +3 -0
- package/src/lightning/carousel/__docs__/carousel.md +0 -4
- package/src/lightning/checkboxGroup/__docs__/checkboxGroup.md +0 -4
- package/src/lightning/combobox/__docs__/combobox.md +0 -4
- package/src/lightning/combobox/form-element.slds.css +4 -1
- package/src/lightning/datatable/columnWidthManager.js +3 -3
- package/src/lightning/datatable/columns.js +17 -18
- package/src/lightning/datatable/datatable.js +146 -84
- package/src/lightning/datatable/indexes.js +1 -3
- package/src/lightning/datatable/infiniteLoading.js +1 -1
- package/src/lightning/datatable/inlineEdit.js +10 -7
- package/src/lightning/datatable/keyboard.js +21 -44
- package/src/lightning/datatable/renderManager.js +9 -18
- package/src/lightning/datatable/rows.js +112 -128
- package/src/lightning/datatable/sort.js +35 -14
- package/src/lightning/datatable/state.js +5 -0
- package/src/lightning/datatable/tree.js +0 -33
- package/src/lightning/datatable/utils.js +15 -5
- package/src/lightning/datepicker/datepicker.js +12 -3
- package/src/lightning/datepicker/form-element.slds.css +4 -1
- package/src/lightning/datetimepicker/form-element.slds.css +4 -1
- package/src/lightning/dualListbox/__docs__/dualListbox.md +0 -4
- package/src/lightning/dualListbox/form-element.slds.css +4 -1
- package/src/lightning/dynamicIcon/__docs__/dynamicIcon.md +0 -4
- package/src/lightning/formattedDateTime/__docs__/formattedDateTime.md +0 -4
- package/src/lightning/formattedLocation/__docs__/formattedLocation.md +0 -4
- package/src/lightning/formattedName/__docs__/formattedName.md +0 -4
- package/src/lightning/formattedNumber/__docs__/formattedNumber.md +0 -4
- package/src/lightning/formattedPhone/__docs__/formattedPhone.md +0 -4
- package/src/lightning/formattedText/__docs__/formattedText.md +0 -4
- package/src/lightning/formattedTime/__docs__/formattedTime.md +0 -4
- package/src/lightning/formattedUrl/__docs__/formattedUrl.md +0 -4
- package/src/lightning/groupedCombobox/form-element.slds.css +4 -1
- package/src/lightning/helptext/form-element.slds.css +4 -1
- package/src/lightning/icon/__docs__/icon.md +0 -4
- package/src/lightning/input/form-element.slds.css +4 -1
- package/src/lightning/inputAddress/form-element.slds.css +4 -1
- package/src/lightning/inputAddress/inputAddress.js +13 -7
- package/src/lightning/inputLocation/__docs__/inputLocation.md +0 -4
- package/src/lightning/inputLocation/form-element.slds.css +4 -1
- package/src/lightning/inputName/form-element.slds.css +4 -1
- package/src/lightning/layout/__docs__/layout.md +0 -4
- package/src/lightning/layoutItem/__docs__/layoutItem.md +0 -4
- package/src/lightning/lookupAddress/form-element.slds.css +4 -1
- package/src/lightning/menuItem/__docs__/menuItem.md +0 -4
- package/src/lightning/menuSubheader/menu-subheader.slds.css +1 -1
- package/src/lightning/modalBase/modalBase.js +14 -31
- package/src/lightning/pill/__docs__/pill.md +0 -4
- package/src/lightning/pillContainer/__docs__/pillContainer.md +0 -4
- package/src/lightning/primitiveBubble/primitiveBubble.js +26 -11
- package/src/lightning/primitiveHeaderFactory/primitiveHeaderFactory.js +1 -1
- package/src/lightning/primitiveInputCheckbox/form-element.slds.css +4 -1
- package/src/lightning/primitiveInputCheckboxButton/form-element.slds.css +4 -1
- package/src/lightning/primitiveInputColor/form-element.slds.css +4 -1
- package/src/lightning/primitiveInputFile/form-element.slds.css +4 -1
- package/src/lightning/primitiveInputSimple/form-element.slds.css +4 -1
- package/src/lightning/primitiveInputToggle/form-element.slds.css +4 -1
- package/src/lightning/progressBar/progress-bar.slds.css +1 -1
- package/src/lightning/radioGroup/__docs__/radioGroup.md +0 -4
- package/src/lightning/radioGroup/form-element.slds.css +4 -1
- package/src/lightning/relativeDateTime/__docs__/relativeDateTime.md +0 -4
- package/src/lightning/select/form-element.slds.css +4 -1
- package/src/lightning/slider/__docs__/slider.md +0 -4
- package/src/lightning/spinner/__docs__/spinner.md +0 -4
- package/src/lightning/tab/__docs__/tab.md +0 -4
- package/src/lightning/tabset/__docs__/tabset.md +0 -4
- package/src/lightning/textarea/__docs__/textarea.md +0 -4
- package/src/lightning/textarea/__examples__/various/various.html +18 -1
- package/src/lightning/textarea/form-element.slds.css +4 -1
- package/src/lightning/textarea/textarea.js +25 -0
- package/src/lightning/tile/__docs__/tile.md +0 -4
- package/src/lightning/timepicker/form-element.slds.css +4 -1
- package/src/lightning/tree/__docs__/tree.md +0 -4
- package/src/lightning/tree/tree.js +5 -1
- package/src/lightning/verticalNavigation/__docs__/verticalNavigation.md +0 -4
- package/src/lightning/verticalNavigationItem/__docs__/verticalNavigationItem.md +0 -4
- package/src/lightning/verticalNavigationItem/vertical-navigation-item.slds.css +1 -1
- package/src/lightning/verticalNavigationItemBadge/__docs__/verticalNavigationItemBadge.md +0 -4
- package/src/lightning/verticalNavigationItemBadge/badge.slds.css +1 -1
- package/src/lightning/verticalNavigationItemBadge/vertical-navigation-item.slds.css +1 -1
- package/src/lightning/verticalNavigationItemIcon/__docs__/verticalNavigationItemIcon.md +0 -4
- package/src/lightning/verticalNavigationItemIcon/vertical-navigation-item.slds.css +1 -1
- package/src/lightning/verticalNavigationOverflow/vertical-navigation-item.slds.css +1 -1
- package/src/lightning/datatable/columns-shared.js +0 -12
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { assert } from 'lightning/utilsPrivate';
|
|
2
|
-
import { getColumnName } from './columns-shared';
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
4
|
* Sets the default sort direction. When clicking on a header to sort,
|
|
@@ -28,20 +27,29 @@ export function setDefaultSortDirection(state, value) {
|
|
|
28
27
|
* `sortedDirection` will be `undefined`
|
|
29
28
|
*
|
|
30
29
|
* @param {Object} state The datatable state
|
|
31
|
-
* @param {String} value The value to update the sort direction to
|
|
30
|
+
* @param {String|String[]} value The value or values to update the sort direction to
|
|
32
31
|
*/
|
|
33
32
|
export function setSortedDirection(state, value) {
|
|
34
|
-
if (value === 'asc' || value === 'desc') {
|
|
33
|
+
if (typeof value === 'string' && (value === 'asc' || value === 'desc')) {
|
|
35
34
|
state.sortedDirection = value;
|
|
36
|
-
|
|
35
|
+
} else if (Array.isArray(value)) {
|
|
36
|
+
// If value is an array, validate each item
|
|
37
|
+
value.forEach((item) => {
|
|
38
|
+
assert(
|
|
39
|
+
item === 'asc' || item === 'desc',
|
|
40
|
+
`The "sortedDirection" value passed into lightning:datatable
|
|
41
|
+
is incorrect. All values should be one of 'asc' or 'desc'.`
|
|
42
|
+
);
|
|
43
|
+
});
|
|
44
|
+
state.sortedDirection = value;
|
|
45
|
+
} else {
|
|
46
|
+
assert(
|
|
47
|
+
false,
|
|
48
|
+
`The "sortedDirection" value passed into lightning:datatable
|
|
49
|
+
is incorrect. It should be either a single value of 'asc' or 'desc'
|
|
50
|
+
or an array of such values.`
|
|
51
|
+
);
|
|
37
52
|
}
|
|
38
|
-
assert(
|
|
39
|
-
false,
|
|
40
|
-
`The "sortedDirection" value passed into lightning:datatable
|
|
41
|
-
is incorrect, "sortedDirection" value should be one of
|
|
42
|
-
'asc' or 'desc'.`
|
|
43
|
-
);
|
|
44
|
-
state.sortedDirection = undefined;
|
|
45
53
|
}
|
|
46
54
|
|
|
47
55
|
/**
|
|
@@ -51,10 +59,10 @@ export function setSortedDirection(state, value) {
|
|
|
51
59
|
* to `undefined`
|
|
52
60
|
*
|
|
53
61
|
* @param {Object} state The datatable state
|
|
54
|
-
* @param {String} value The value to update the sort state to
|
|
62
|
+
* @param {String|String[]} value The value or values to update the sort state to
|
|
55
63
|
*/
|
|
56
64
|
export function setSortedBy(state, value) {
|
|
57
|
-
if (typeof value === 'string') {
|
|
65
|
+
if (typeof value === 'string' || Array.isArray(value)) {
|
|
58
66
|
state.sortedBy = value;
|
|
59
67
|
} else {
|
|
60
68
|
state.sortedBy = undefined;
|
|
@@ -68,13 +76,26 @@ export function setSortedBy(state, value) {
|
|
|
68
76
|
*/
|
|
69
77
|
export function updateSorting(state) {
|
|
70
78
|
const { columns, defaultSortDirection, sortedBy, sortedDirection } = state;
|
|
79
|
+
|
|
80
|
+
// Determine if sortedBy is an array
|
|
81
|
+
const isSortedByArray = Array.isArray(sortedBy);
|
|
82
|
+
|
|
71
83
|
for (let i = 0, { length } = columns; i < length; i += 1) {
|
|
72
84
|
const col = columns[i];
|
|
73
|
-
if (
|
|
85
|
+
if (
|
|
86
|
+
col.sortable &&
|
|
87
|
+
(isSortedByArray
|
|
88
|
+
? sortedBy.includes(col.name)
|
|
89
|
+
: sortedBy === col.name)
|
|
90
|
+
) {
|
|
74
91
|
col.sorted = true;
|
|
75
92
|
col.sortAriaLabel =
|
|
76
93
|
sortedDirection === 'desc' ? 'descending' : 'ascending';
|
|
77
94
|
col.sortedDirection = sortedDirection;
|
|
95
|
+
|
|
96
|
+
// If sortedBy is an array, set col.sorted to the index in the array
|
|
97
|
+
// Otherwise, set it to true
|
|
98
|
+
col.sorted = isSortedByArray ? sortedBy.indexOf(col.name) : true;
|
|
78
99
|
} else {
|
|
79
100
|
col.sorted = false;
|
|
80
101
|
col.sortAriaLabel = col.sortable ? 'other' : null;
|
|
@@ -10,7 +10,9 @@ export const getDefaultState = function () {
|
|
|
10
10
|
return {
|
|
11
11
|
// columns
|
|
12
12
|
columns: [],
|
|
13
|
+
hadTreeDataTypePreviously: false,
|
|
13
14
|
hideCheckboxColumn: false,
|
|
15
|
+
treeColumn: undefined,
|
|
14
16
|
|
|
15
17
|
// rows
|
|
16
18
|
data: [],
|
|
@@ -90,5 +92,8 @@ export const getDefaultState = function () {
|
|
|
90
92
|
rows: {},
|
|
91
93
|
table: {},
|
|
92
94
|
},
|
|
95
|
+
|
|
96
|
+
// table rendered flag
|
|
97
|
+
hasRenderedFirstTime: false,
|
|
93
98
|
};
|
|
94
99
|
};
|
|
@@ -1,36 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Determines if any of the columns in the datatable are of a tree-type.
|
|
3
|
-
*
|
|
4
|
-
* @param {Object} state The datatable state
|
|
5
|
-
* @returns {Boolean} Whether any of the columns are of a tree-type
|
|
6
|
-
*/
|
|
7
|
-
export function hasTreeDataType(state) {
|
|
8
|
-
const { columns } = state;
|
|
9
|
-
for (let i = 0, { length } = columns; i < length; i += 1) {
|
|
10
|
-
if (columns[i].type === 'tree') {
|
|
11
|
-
return true;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
return false;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Retrieves the first tree-type column from the state.
|
|
19
|
-
*
|
|
20
|
-
* @param {Object} state The datatable state
|
|
21
|
-
* @returns {Object} The first tree-type column, else `null`
|
|
22
|
-
*/
|
|
23
|
-
export function getStateTreeColumn(state) {
|
|
24
|
-
const { columns } = state;
|
|
25
|
-
for (let i = 0, { length } = columns; i < length; i += 1) {
|
|
26
|
-
const col = columns[i];
|
|
27
|
-
if (col.type === 'tree') {
|
|
28
|
-
return col;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
1
|
/**
|
|
35
2
|
* Dispatches an event when a row is toggled to be expanded or collapsed.
|
|
36
3
|
*
|
|
@@ -24,6 +24,7 @@ const CLASS_SET_PROTOTYPE = {
|
|
|
24
24
|
|
|
25
25
|
const NON_NEGATIVE_INTEGER_REGEXP = /^\d+$/;
|
|
26
26
|
const POSITIVE_INTEGER_REGEXP = /^[0-9]*[1-9][0-9]*$/;
|
|
27
|
+
const RENDER_MODE_ROLE_BASED_REGEXP = /\brole-based\b/;
|
|
27
28
|
|
|
28
29
|
/**
|
|
29
30
|
* Escapes double quotes. Later can be
|
|
@@ -91,14 +92,13 @@ export function getGridContainerFromScrollerY(scrollerY) {
|
|
|
91
92
|
}
|
|
92
93
|
|
|
93
94
|
/**
|
|
94
|
-
* Gets the scrollerX element from the
|
|
95
|
+
* Gets the scrollerX element from the template.
|
|
95
96
|
*
|
|
96
|
-
* @param {Node}
|
|
97
|
+
* @param {Node} template The datatable template
|
|
97
98
|
* @returns {Node} The scrollerX element
|
|
98
99
|
*/
|
|
99
|
-
export function
|
|
100
|
-
|
|
101
|
-
return scrollerX;
|
|
100
|
+
export function getScrollerX(template) {
|
|
101
|
+
return template.querySelector('.slds-scrollable_x');
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
/**
|
|
@@ -131,6 +131,16 @@ export function isNonNegativeInteger(value) {
|
|
|
131
131
|
return NON_NEGATIVE_INTEGER_REGEXP.test(value);
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
+
/**
|
|
135
|
+
* Tests if render mode is role-based.
|
|
136
|
+
*
|
|
137
|
+
* @param {String} renderMode The render mode to test
|
|
138
|
+
* @returns {Boolean} Whether the render mode is role-based
|
|
139
|
+
*/
|
|
140
|
+
export function isRenderModeRoleBased(renderMode) {
|
|
141
|
+
return RENDER_MODE_ROLE_BASED_REGEXP.test(renderMode);
|
|
142
|
+
}
|
|
143
|
+
|
|
134
144
|
/**
|
|
135
145
|
* Accepts a value which may be an Integer or String and tests that value
|
|
136
146
|
* with respect to the numberType:
|
|
@@ -681,9 +681,14 @@ export default class LightningDatePicker extends LightningShadowBaseClass {
|
|
|
681
681
|
hideCalendarAndFocusTrigger() {
|
|
682
682
|
this.hideCalendar();
|
|
683
683
|
|
|
684
|
-
if (this.calendarTrigger)
|
|
685
|
-
this.calendarTrigger.
|
|
686
|
-
|
|
684
|
+
if (this.calendarTrigger)
|
|
685
|
+
if (this.calendarTrigger === this.calendarButtonElement) {
|
|
686
|
+
// Fix for W-14258862, focus is transferred to the input element
|
|
687
|
+
// instead of the button element when trigger is button
|
|
688
|
+
this.inputElement.focus();
|
|
689
|
+
} else {
|
|
690
|
+
this.calendarTrigger.focus();
|
|
691
|
+
}
|
|
687
692
|
}
|
|
688
693
|
|
|
689
694
|
focusCalendar() {
|
|
@@ -752,6 +757,10 @@ export default class LightningDatePicker extends LightningShadowBaseClass {
|
|
|
752
757
|
return this.template.querySelector('input');
|
|
753
758
|
}
|
|
754
759
|
|
|
760
|
+
get calendarButtonElement() {
|
|
761
|
+
return this.template.querySelector('lightning-button-icon');
|
|
762
|
+
}
|
|
763
|
+
|
|
755
764
|
dispatchChangeEvent() {
|
|
756
765
|
this.dispatchEvent(
|
|
757
766
|
new CustomEvent('change', {
|
|
@@ -187,7 +187,10 @@
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
:host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__label,:host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__control {
|
|
190
|
-
|
|
190
|
+
/* @W-14518344 The following line still exists in SLDS-internal
|
|
191
|
+
but it was removed here because it was causing the input
|
|
192
|
+
component to not display it's bottom border
|
|
193
|
+
border-bottom: 0; Remove border when using legacy version of slds-form-element */
|
|
191
194
|
padding-inline-start: 0;
|
|
192
195
|
}
|
|
193
196
|
|
|
@@ -187,7 +187,10 @@
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
:host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__label,:host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__control {
|
|
190
|
-
|
|
190
|
+
/* @W-14518344 The following line still exists in SLDS-internal
|
|
191
|
+
but it was removed here because it was causing the input
|
|
192
|
+
component to not display it's bottom border
|
|
193
|
+
border-bottom: 0; Remove border when using legacy version of slds-form-element */
|
|
191
194
|
padding-inline-start: 0;
|
|
192
195
|
}
|
|
193
196
|
|
|
@@ -176,7 +176,3 @@ The event properties are as follows.
|
|
|
176
176
|
| bubbles | true | This event bubbles up through the DOM. |
|
|
177
177
|
| cancelable | false | This event has no default behavior that can be canceled. You can't call `preventDefault()` on this event. |
|
|
178
178
|
| composed | true | This event propagates outside of the component in which it was dispatched. |
|
|
179
|
-
|
|
180
|
-
#### Source Code
|
|
181
|
-
|
|
182
|
-
`lightning-dual-listbox` is available in the [Base Components Recipes GitHub repository](https://github.com/salesforce/base-components-recipes#documentation). It's transpiled into the `c` namespace so that you can use it in your own projects.
|
|
@@ -187,7 +187,10 @@
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
:host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__label,:host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__control {
|
|
190
|
-
|
|
190
|
+
/* @W-14518344 The following line still exists in SLDS-internal
|
|
191
|
+
but it was removed here because it was causing the input
|
|
192
|
+
component to not display it's bottom border
|
|
193
|
+
border-bottom: 0; Remove border when using legacy version of slds-form-element */
|
|
191
194
|
padding-inline-start: 0;
|
|
192
195
|
}
|
|
193
196
|
|
|
@@ -60,7 +60,3 @@ However, on smaller screens and windows the `lightning-dynamic-icon` can also be
|
|
|
60
60
|
informational. In this case, include `alternative-text`. If you don't include
|
|
61
61
|
`alternative-text`, check smaller screens and windows to ensure that the
|
|
62
62
|
`lightning-dynamic-icon` is only decorative on all formats.
|
|
63
|
-
|
|
64
|
-
#### Source Code
|
|
65
|
-
|
|
66
|
-
`lightning-dynamic-icon` is available in the [Base Components Recipes GitHub repository](https://github.com/salesforce/base-components-recipes#documentation). It's transpiled into the `c` namespace so that you can use it in your own projects.
|
|
@@ -219,10 +219,6 @@ Displays: December 03, 2017, 12:00 PM
|
|
|
219
219
|
|
|
220
220
|
This component has usage differences from its Aura counterpart. See [Base Components: Aura Vs Lightning Web Components](https://developer.salesforce.com/docs/platform/lwc/guide/migrate-map-aura-lwc-components) in the Lightning Web Components Developer Guide.
|
|
221
221
|
|
|
222
|
-
#### Source Code
|
|
223
|
-
|
|
224
|
-
`lightning-formatted-date-time` is available in the [Base Components Recipes GitHub repository](https://github.com/salesforce/base-components-recipes#documentation). It's transpiled into the `c` namespace so that you can use it in your own projects.
|
|
225
|
-
|
|
226
222
|
#### LWC Recipes
|
|
227
223
|
|
|
228
224
|
The [LWC Recipes GitHub repository](https://github.com/trailheadapps/lwc-recipes) contains code examples for Lightning Web Components that you can test in an org.
|
|
@@ -27,7 +27,3 @@ longitude of -122.3948370.
|
|
|
27
27
|
</lightning-formatted-location>
|
|
28
28
|
</template>
|
|
29
29
|
```
|
|
30
|
-
|
|
31
|
-
#### Source Code
|
|
32
|
-
|
|
33
|
-
`lightning-formatted-location` is available in the [Base Components Recipes GitHub repository](https://github.com/salesforce/base-components-recipes#documentation). It's transpiled into the `c` namespace so that you can use it in your own projects.
|
|
@@ -47,7 +47,3 @@ in the Salesforce Help.
|
|
|
47
47
|
To create a form that takes in user input for names, you can use the
|
|
48
48
|
`lightning-input-name` component, which displays a name compound field that
|
|
49
49
|
supports user input for salutation, suffix, and so on.
|
|
50
|
-
|
|
51
|
-
#### Source Code
|
|
52
|
-
|
|
53
|
-
`lightning-formatted-name` is available in the [Base Components Recipes GitHub repository](https://github.com/salesforce/base-components-recipes#documentation). It's transpiled into the `c` namespace so that you can use it in your own projects.
|
|
@@ -166,10 +166,6 @@ The locale set in your Salesforce user preferences determines how numbers are fo
|
|
|
166
166
|
The `format-style` attribute is called the `style` attribute in the Aura version of this component.
|
|
167
167
|
See [Base Components: Aura Vs Lightning Web Components](https://developer.salesforce.com/docs/platform/lwc/guide/migrate-map-aura-lwc-components).
|
|
168
168
|
|
|
169
|
-
#### Source Code
|
|
170
|
-
|
|
171
|
-
`lightning-formatted-number` is available in the [Base Components Recipes GitHub repository](https://github.com/salesforce/base-components-recipes#documentation). It's transpiled into the `c` namespace so that you can use it in your own projects.
|
|
172
|
-
|
|
173
169
|
#### LWC Recipes
|
|
174
170
|
|
|
175
171
|
The [LWC Recipes GitHub repository](https://github.com/trailheadapps/lwc-recipes) contains code examples for Lightning Web Components that you can test in an org.
|
|
@@ -67,10 +67,6 @@ To display the phone number in plain text without a hyperlink, include the
|
|
|
67
67
|
</template>
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
-
#### Source Code
|
|
71
|
-
|
|
72
|
-
`lightning-formatted-phone` is available in the [Base Components Recipes GitHub repository](https://github.com/salesforce/base-components-recipes#documentation). It's transpiled into the `c` namespace so that you can use it in your own projects.
|
|
73
|
-
|
|
74
70
|
#### LWC Recipes
|
|
75
71
|
|
|
76
72
|
The [LWC Recipes GitHub repository](https://github.com/trailheadapps/lwc-recipes) contains code examples for Lightning Web Components that you can test in an org.
|
|
@@ -52,7 +52,3 @@ use `lightning-formatted-email`.
|
|
|
52
52
|
|
|
53
53
|
For rich text that uses tags beyond anchor tags, use
|
|
54
54
|
`lightning-formatted-rich-text` instead.
|
|
55
|
-
|
|
56
|
-
#### Source Code
|
|
57
|
-
|
|
58
|
-
`lightning-formatted-text` is available in the [Base Components Recipes GitHub repository](https://github.com/salesforce/base-components-recipes#documentation). It's transpiled into the `c` namespace so that you can use it in your own projects.
|
|
@@ -33,7 +33,3 @@ The following example returns `10:12:30 PM`.
|
|
|
33
33
|
Salesforce uses the format HH:mm:ss.SSSZ for time fields. The time field is a
|
|
34
34
|
timestamp without the date included. Time values in Salesforce are not
|
|
35
35
|
localized or associated with a time zone.
|
|
36
|
-
|
|
37
|
-
#### Source Code
|
|
38
|
-
|
|
39
|
-
`lightning-formatted-time` is available in the [Base Components Recipes GitHub repository](https://github.com/salesforce/base-components-recipes#documentation). It's transpiled into the `c` namespace so that you can use it in your own projects.
|
|
@@ -113,7 +113,3 @@ behavior with `lightning-formatted-url`.
|
|
|
113
113
|
To create a link with a
|
|
114
114
|
custom `onclick` event handler, use the HTML anchor tag `<a>` instead. To create a URL that navigates to another page in Salesforce, use
|
|
115
115
|
[`lightning-navigation`](bundle/lightning-navigation/documentation).
|
|
116
|
-
|
|
117
|
-
#### Source Code
|
|
118
|
-
|
|
119
|
-
`lightning-formatted-url` is available in the [Base Components Recipes GitHub repository](https://github.com/salesforce/base-components-recipes#documentation). It's transpiled into the `c` namespace so that you can use it in your own projects.
|
|
@@ -187,7 +187,10 @@
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
:host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__label,:host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__control {
|
|
190
|
-
|
|
190
|
+
/* @W-14518344 The following line still exists in SLDS-internal
|
|
191
|
+
but it was removed here because it was causing the input
|
|
192
|
+
component to not display it's bottom border
|
|
193
|
+
border-bottom: 0; Remove border when using legacy version of slds-form-element */
|
|
191
194
|
padding-inline-start: 0;
|
|
192
195
|
}
|
|
193
196
|
|
|
@@ -187,7 +187,10 @@
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
:host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__label,:host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__control {
|
|
190
|
-
|
|
190
|
+
/* @W-14518344 The following line still exists in SLDS-internal
|
|
191
|
+
but it was removed here because it was causing the input
|
|
192
|
+
component to not display it's bottom border
|
|
193
|
+
border-bottom: 0; Remove border when using legacy version of slds-form-element */
|
|
191
194
|
padding-inline-start: 0;
|
|
192
195
|
}
|
|
193
196
|
|
|
@@ -176,7 +176,3 @@ screens and windows to ensure that the icon is decorative on all formats.
|
|
|
176
176
|
Icons are not available in Lightning Out, but they are available in Lightning Components for Visualforce and other experiences.
|
|
177
177
|
|
|
178
178
|
For IE11, the custom icon feature is disabled for now due to performance issues.
|
|
179
|
-
|
|
180
|
-
#### Source Code
|
|
181
|
-
|
|
182
|
-
`lightning-icon` is available in the [Base Components Recipes GitHub repository](https://github.com/salesforce/base-components-recipes#documentation). It's transpiled into the `c` namespace so that you can use it in your own projects.
|
|
@@ -187,7 +187,10 @@
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
:host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__label,:host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__control {
|
|
190
|
-
|
|
190
|
+
/* @W-14518344 The following line still exists in SLDS-internal
|
|
191
|
+
but it was removed here because it was causing the input
|
|
192
|
+
component to not display it's bottom border
|
|
193
|
+
border-bottom: 0; Remove border when using legacy version of slds-form-element */
|
|
191
194
|
padding-inline-start: 0;
|
|
192
195
|
}
|
|
193
196
|
|
|
@@ -187,7 +187,10 @@
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
:host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__label,:host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__control {
|
|
190
|
-
|
|
190
|
+
/* @W-14518344 The following line still exists in SLDS-internal
|
|
191
|
+
but it was removed here because it was causing the input
|
|
192
|
+
component to not display it's bottom border
|
|
193
|
+
border-bottom: 0; Remove border when using legacy version of slds-form-element */
|
|
191
194
|
padding-inline-start: 0;
|
|
192
195
|
}
|
|
193
196
|
|
|
@@ -311,16 +311,18 @@ export default class LightningInputAddress extends LightningShadowBaseClass {
|
|
|
311
311
|
}
|
|
312
312
|
|
|
313
313
|
/**
|
|
314
|
-
* If present,
|
|
314
|
+
* If present, the street field is rendered as two separate inputs instead of a single textarea.
|
|
315
|
+
* In addition, the search field is no longer rendered as a separate input and its functionality
|
|
316
|
+
* is moved to the street field.
|
|
315
317
|
* @type {boolean}
|
|
316
318
|
* @default false
|
|
317
319
|
*/
|
|
318
320
|
@api
|
|
319
|
-
get
|
|
320
|
-
return this.
|
|
321
|
+
get showCompactAddress() {
|
|
322
|
+
return this._showCompactAddress;
|
|
321
323
|
}
|
|
322
|
-
set
|
|
323
|
-
this.
|
|
324
|
+
set showCompactAddress(value) {
|
|
325
|
+
this._showCompactAddress = normalizeBoolean(value);
|
|
324
326
|
}
|
|
325
327
|
|
|
326
328
|
/**
|
|
@@ -491,6 +493,10 @@ export default class LightningInputAddress extends LightningShadowBaseClass {
|
|
|
491
493
|
reflectAttribute(this, 'variant', this.variant);
|
|
492
494
|
}
|
|
493
495
|
|
|
496
|
+
get showCompactAddressLookup() {
|
|
497
|
+
return this._showAddressLookup && this._showCompactAddress;
|
|
498
|
+
}
|
|
499
|
+
|
|
494
500
|
get computedFieldsetClass() {
|
|
495
501
|
return classSet(
|
|
496
502
|
'slds-form-element slds-form-element_compound slds-form-element_address'
|
|
@@ -571,7 +577,7 @@ export default class LightningInputAddress extends LightningShadowBaseClass {
|
|
|
571
577
|
langCode,
|
|
572
578
|
countryCode,
|
|
573
579
|
hasCountryPicklist,
|
|
574
|
-
this.
|
|
580
|
+
this._showCompactAddress
|
|
575
581
|
);
|
|
576
582
|
}
|
|
577
583
|
|
|
@@ -580,7 +586,7 @@ export default class LightningInputAddress extends LightningShadowBaseClass {
|
|
|
580
586
|
return getRequiredFields(
|
|
581
587
|
langCode,
|
|
582
588
|
countryCode,
|
|
583
|
-
this.
|
|
589
|
+
this._showCompactAddress
|
|
584
590
|
);
|
|
585
591
|
}
|
|
586
592
|
|
|
@@ -81,7 +81,3 @@ The `change` event properties are as follows.
|
|
|
81
81
|
| bubbles | true | This event bubbles up through the DOM. |
|
|
82
82
|
| cancelable | false | This event has no default behavior that can be canceled. You can't call `preventDefault()` on this event. |
|
|
83
83
|
| composed | true | This event propagates outside of the component in which it was dispatched. |
|
|
84
|
-
|
|
85
|
-
#### Source Code
|
|
86
|
-
|
|
87
|
-
`lightning-input-location` is available in the [Base Components Recipes GitHub repository](https://github.com/salesforce/base-components-recipes#documentation). It's transpiled into the `c` namespace so that you can use it in your own projects.
|
|
@@ -187,7 +187,10 @@
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
:host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__label,:host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__control {
|
|
190
|
-
|
|
190
|
+
/* @W-14518344 The following line still exists in SLDS-internal
|
|
191
|
+
but it was removed here because it was causing the input
|
|
192
|
+
component to not display it's bottom border
|
|
193
|
+
border-bottom: 0; Remove border when using legacy version of slds-form-element */
|
|
191
194
|
padding-inline-start: 0;
|
|
192
195
|
}
|
|
193
196
|
|
|
@@ -187,7 +187,10 @@
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
:host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__label,:host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__control {
|
|
190
|
-
|
|
190
|
+
/* @W-14518344 The following line still exists in SLDS-internal
|
|
191
|
+
but it was removed here because it was causing the input
|
|
192
|
+
component to not display it's bottom border
|
|
193
|
+
border-bottom: 0; Remove border when using legacy version of slds-form-element */
|
|
191
194
|
padding-inline-start: 0;
|
|
192
195
|
}
|
|
193
196
|
|
|
@@ -136,7 +136,3 @@ which creates two columns with fixed widths.
|
|
|
136
136
|
<div class="slds-col slds-size_2-of-3">Columns 2 content</div>
|
|
137
137
|
</div>
|
|
138
138
|
```
|
|
139
|
-
|
|
140
|
-
#### Source Code
|
|
141
|
-
|
|
142
|
-
`lightning-layout` is available in the [Base Components Recipes GitHub repository](https://github.com/salesforce/base-components-recipes#documentation). It's transpiled into the `c` namespace so that you can use it in your own projects.
|
|
@@ -81,7 +81,3 @@ Here is an example using default values.
|
|
|
81
81
|
#### Usage Considerations
|
|
82
82
|
|
|
83
83
|
This component has usage differences from its Aura counterpart. See [Base Components: Aura Vs Lightning Web Components](https://developer.salesforce.com/docs/platform/lwc/guide/migrate-map-aura-lwc-components) in the Lightning Web Components Developer Guide.
|
|
84
|
-
|
|
85
|
-
#### Source Code
|
|
86
|
-
|
|
87
|
-
`lightning-layout-item` is available in the [Base Components Recipes GitHub repository](https://github.com/salesforce/base-components-recipes#documentation). It's transpiled into the `c` namespace so that you can use it in your own projects.
|
|
@@ -187,7 +187,10 @@
|
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
:host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__label,:host([data-render-mode="shadow"][variant='label-stacked']) .slds-form-element__control {
|
|
190
|
-
|
|
190
|
+
/* @W-14518344 The following line still exists in SLDS-internal
|
|
191
|
+
but it was removed here because it was causing the input
|
|
192
|
+
component to not display it's bottom border
|
|
193
|
+
border-bottom: 0; Remove border when using legacy version of slds-form-element */
|
|
191
194
|
padding-inline-start: 0;
|
|
192
195
|
}
|
|
193
196
|
|
|
@@ -120,7 +120,3 @@ is shown for the menu item when `is-draft` is `true`. The
|
|
|
120
120
|
reason the item is considered in a draft state. The draft state might be used
|
|
121
121
|
to show there is unsaved state or data that could be lost, for example if
|
|
122
122
|
there's a user change in a customizable menu.
|
|
123
|
-
|
|
124
|
-
#### Source Code
|
|
125
|
-
|
|
126
|
-
`lightning-menu-item` is available in the [Base Components Recipes GitHub repository](https://github.com/salesforce/base-components-recipes#documentation). It's transpiled into the `c` namespace so that you can use it in your own projects.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
|
|
4
4
|
|
|
5
5
|
:host([data-render-mode="shadow"]) .slds-dropdown__header {
|
|
6
|
-
font-size: var(--slds-g-font-
|
|
6
|
+
font-size: var(--slds-g-font-size-base);
|
|
7
7
|
font-weight: var(--slds-g-font-weight-7);
|
|
8
8
|
padding-block: var(--slds-g-spacing-2);
|
|
9
9
|
padding-inline: var(--slds-g-spacing-3);
|