lightning-base-components 1.13.8-alpha → 1.14.2-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 +7 -0
- package/package.json +5 -1
- package/scopedImports/@salesforce-internal-core.appVersion.js +1 -1
- package/scopedImports/@salesforce-label-LightningLookup.recentItems.js +1 -0
- package/src/lightning/ariaObserver/__component__/ariaObserver.spec.js +103 -0
- package/src/lightning/{utilsPrivate/contentMutation.js → ariaObserver/ariaObserver.js} +51 -78
- package/src/lightning/baseCombobox/baseCombobox.html +1 -0
- package/src/lightning/baseCombobox/baseCombobox.js +14 -1
- package/src/lightning/combobox/combobox.css +12 -0
- package/src/lightning/combobox/combobox.html +1 -0
- package/src/lightning/datatable/columnWidthManager.js +7 -3
- package/src/lightning/datatable/datatable.js +27 -25
- package/src/lightning/datatable/inlineEdit.js +15 -3
- package/src/lightning/datatable/keyboard.js +1077 -933
- package/src/lightning/datatable/resizer.js +91 -108
- package/src/lightning/datatable/state.js +0 -9
- package/src/lightning/datatable/templates/div/div.css +19 -0
- package/src/lightning/datatable/templates/div/div.html +10 -8
- package/src/lightning/datatable/templates/table/table.html +8 -6
- package/src/lightning/datatable/widthManagerShared.js +1 -1
- package/src/lightning/formattedRichText/__docs__/formattedRichText.md +1 -0
- package/src/lightning/helptext/helptext.js +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/templates.js +2 -1
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/contract_alt.html +1 -2
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/contract_doc.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/templates.js +2 -1
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/contract_alt.html +1 -2
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/contract_doc.html +8 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/templates.js +2 -1
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/contract_alt.html +1 -2
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/contract_doc.html +8 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/templates.js +2 -1
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/contract_alt.html +1 -2
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/contract_doc.html +8 -0
- package/src/lightning/input/input.html +0 -1
- package/src/lightning/input/input.js +69 -48
- package/src/lightning/positionLibrary/positionLibrary.js +43 -31
- package/src/lightning/primitiveDatatableIeditPanel/primitiveDatatableIeditPanel.js +20 -0
- package/src/lightning/primitiveDatatableIeditTypeFactory/primitiveDatatableIeditTypeFactory.js +10 -0
- package/src/lightning/primitiveHeaderFactory/nonsortableHeader.html +5 -4
- package/src/lightning/primitiveHeaderFactory/primitiveHeaderFactory.js +64 -47
- package/src/lightning/primitiveHeaderFactory/selectableHeader.html +25 -23
- package/src/lightning/primitiveHeaderFactory/sortableHeader.html +13 -9
- package/src/lightning/progressIndicator/progressIndicator.js +3 -5
- package/src/lightning/progressStep/progressStep.js +31 -22
- package/src/lightning/utilsPrivate/utilsPrivate.js +12 -1
|
@@ -100,18 +100,16 @@ export default class LightningProgressIndicator extends LightningElement {
|
|
|
100
100
|
const currentStepIndex = getCurrentStepIndex(steps, currentStep);
|
|
101
101
|
|
|
102
102
|
let activeStepIndex = -1;
|
|
103
|
-
|
|
104
|
-
// Set activeStep index to activeStep if provided.
|
|
103
|
+
// Set activeStepIndex to activeStep if provided.
|
|
105
104
|
// This happens when focus is updated by user using arrow keys or clicking a progress step.
|
|
106
105
|
// When component re-renders, active step is not passed from renderedCallback or handleSlotChange
|
|
107
106
|
// In this scenario, use the privateActiveStepIndex to maintain the activeStep.
|
|
108
107
|
// privateActiveStepInde will have the active step before the re-render
|
|
109
|
-
// In case of initial render, privateActiveStepIndex is
|
|
108
|
+
// In case of initial render, privateActiveStepIndex is undefined. Use privateCurrentStep as activeStepIndex for fallback.
|
|
110
109
|
// activeStep is needed to set active class and proper tabIndex for the progress step
|
|
111
|
-
|
|
112
110
|
if (activeStep) {
|
|
113
111
|
activeStepIndex = getStepIndex(steps, activeStep);
|
|
114
|
-
} else if (this.privateActiveStepIndex) {
|
|
112
|
+
} else if (this.privateActiveStepIndex !== undefined) {
|
|
115
113
|
activeStepIndex = this.privateActiveStepIndex;
|
|
116
114
|
} else {
|
|
117
115
|
activeStepIndex = getStepIndex(steps, this.privateCurrentStep);
|
|
@@ -31,6 +31,8 @@ export default class LightningProgressStep extends LightningElement {
|
|
|
31
31
|
*/
|
|
32
32
|
@api value;
|
|
33
33
|
|
|
34
|
+
_privateLabel;
|
|
35
|
+
|
|
34
36
|
@track state = {};
|
|
35
37
|
|
|
36
38
|
updateInternal(newStatus, newType, newIndex, newActive, shouldFocus) {
|
|
@@ -47,6 +49,7 @@ export default class LightningProgressStep extends LightningElement {
|
|
|
47
49
|
this.state.type = newType;
|
|
48
50
|
this.state.index = newIndex;
|
|
49
51
|
this.state.active = newActive;
|
|
52
|
+
this.initializeTooltip();
|
|
50
53
|
}
|
|
51
54
|
/**
|
|
52
55
|
* Text to display as the name or tooltip for the step.
|
|
@@ -54,30 +57,12 @@ export default class LightningProgressStep extends LightningElement {
|
|
|
54
57
|
*/
|
|
55
58
|
@api
|
|
56
59
|
set label(value) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
} else if (value && !this.isPath) {
|
|
60
|
-
// Note that because the tooltip target is a child element it may not be present in the
|
|
61
|
-
// dom during initial rendering.
|
|
62
|
-
this._tooltip = new Tooltip(value, {
|
|
63
|
-
root: this,
|
|
64
|
-
target: () => this.template.querySelector('button'),
|
|
65
|
-
type: TooltipType.Toggle,
|
|
66
|
-
align: {
|
|
67
|
-
horizontal: Direction.Center,
|
|
68
|
-
vertical: Direction.Bottom,
|
|
69
|
-
},
|
|
70
|
-
targetAlign: {
|
|
71
|
-
horizontal: Direction.Center,
|
|
72
|
-
vertical: Direction.Top,
|
|
73
|
-
},
|
|
74
|
-
});
|
|
75
|
-
this._tooltip.initialize();
|
|
76
|
-
}
|
|
60
|
+
this._privateLabel = value;
|
|
61
|
+
this.initializeTooltip();
|
|
77
62
|
}
|
|
78
63
|
|
|
79
64
|
get label() {
|
|
80
|
-
return this.
|
|
65
|
+
return this._privateLabel;
|
|
81
66
|
}
|
|
82
67
|
|
|
83
68
|
computeClassSet(type, status, isActive) {
|
|
@@ -87,7 +72,8 @@ export default class LightningProgressStep extends LightningElement {
|
|
|
87
72
|
'slds-is-completed': !isPath && status === 'completed',
|
|
88
73
|
'slds-has-error': !isPath && status === 'error',
|
|
89
74
|
'slds-is-active':
|
|
90
|
-
|
|
75
|
+
(type !== 'base' && isActive === true) ||
|
|
76
|
+
(type === 'base' && status === 'current'),
|
|
91
77
|
'slds-path__item': isPath,
|
|
92
78
|
'slds-is-complete': isPath && status === 'completed',
|
|
93
79
|
'slds-is-current':
|
|
@@ -239,4 +225,27 @@ export default class LightningProgressStep extends LightningElement {
|
|
|
239
225
|
}
|
|
240
226
|
return base;
|
|
241
227
|
}
|
|
228
|
+
|
|
229
|
+
initializeTooltip() {
|
|
230
|
+
if (this._tooltip) {
|
|
231
|
+
this._tooltip.value = this._privateLabel;
|
|
232
|
+
} else if (this._privateLabel && this.state.type && !this.isPath) {
|
|
233
|
+
// Note that because the tooltip target is a child element it may not be present in the
|
|
234
|
+
// dom during initial rendering.
|
|
235
|
+
this._tooltip = new Tooltip(this._privateLabel, {
|
|
236
|
+
root: this,
|
|
237
|
+
target: () => this.template.querySelector('button'),
|
|
238
|
+
type: TooltipType.Toggle,
|
|
239
|
+
align: {
|
|
240
|
+
horizontal: Direction.Center,
|
|
241
|
+
vertical: Direction.Bottom,
|
|
242
|
+
},
|
|
243
|
+
targetAlign: {
|
|
244
|
+
horizontal: Direction.Center,
|
|
245
|
+
vertical: Direction.Top,
|
|
246
|
+
},
|
|
247
|
+
});
|
|
248
|
+
this._tooltip.initialize();
|
|
249
|
+
}
|
|
250
|
+
}
|
|
242
251
|
}
|
|
@@ -23,7 +23,6 @@ export {
|
|
|
23
23
|
} from './keyboard';
|
|
24
24
|
export { raf } from './scroll';
|
|
25
25
|
export { isChrome, isIE11, isSafari } from './browser';
|
|
26
|
-
export { ContentMutation } from './contentMutation';
|
|
27
26
|
export { observePosition } from './observers';
|
|
28
27
|
export { hasOnlyAllowedVideoIframes } from './videoUtils';
|
|
29
28
|
export {
|
|
@@ -212,3 +211,15 @@ export function buttonGroupOrderClass(groupOrder) {
|
|
|
212
211
|
[BUTTON_GROUP_ORDER.ONLY]: 'single-button',
|
|
213
212
|
}[groupOrder];
|
|
214
213
|
}
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Checks if the given component is native
|
|
217
|
+
* @param {Object} cmp Component instance
|
|
218
|
+
* @returns {Boolean} Whether the component is native
|
|
219
|
+
*/
|
|
220
|
+
export function isNativeComponent(cmp) {
|
|
221
|
+
if (cmp && cmp.template && cmp.template.constructor) {
|
|
222
|
+
return !!String(cmp.template.constructor).match(/\[native code\]/);
|
|
223
|
+
}
|
|
224
|
+
return false;
|
|
225
|
+
}
|