lightning-base-components 1.13.1-alpha → 1.13.5-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/package.json +33 -1
- package/scopedImports/@salesforce-label-LightningInput.helptextAlternativeText.js +1 -0
- package/scopedImports/@salesforce-label-LightningOutputField.helptextAlternativeText.js +1 -0
- package/scopedImports/@salesforce-label-LightningRating.nStars.js +1 -0
- package/scopedImports/@salesforce-label-LightningRating.oneStar.js +1 -0
- package/scopedImports/@salesforce-label-LightningRating.rating.js +1 -0
- package/scopedImports/@salesforce-label-LightningRating.readOnlyAssistiveText.js +1 -0
- package/scopedImports/@salesforce-label-LightningRating.selectRating.js +1 -0
- package/scopedImports/@salesforce-label-LightningRecordForm.edit.js +1 -0
- package/src/lightning/baseCombobox/baseCombobox.js +8 -0
- package/src/lightning/baseCombobox/keyboard.js +9 -1
- package/src/lightning/datatable/datatable.html +1 -0
- package/src/lightning/datatable/datatable.js +5 -2
- package/src/lightning/datatable/infiniteLoading.js +4 -1
- package/src/lightning/datatable/inlineEdit.js +133 -2
- package/src/lightning/datatable/keyboard.js +2 -6
- package/src/lightning/datatable/selector.js +19 -3
- package/src/lightning/focusTrap/focusTrap.js +0 -2
- package/src/lightning/focusUtils/focus.js +63 -12
- package/src/lightning/formattedRichText/richTextConfig.js +1 -0
- package/src/lightning/input/input.html +4 -4
- package/src/lightning/input/input.js +8 -1
- package/src/lightning/positionLibrary/__docs__/positionLibrary.md +3 -0
- package/src/lightning/positionLibrary/__examples__/components/components.html +41 -0
- package/src/lightning/positionLibrary/__examples__/components/components.js +29 -0
- package/src/lightning/positionLibrary/__examples__/playground/playground.css +84 -0
- package/src/lightning/positionLibrary/__examples__/playground/playground.html +122 -0
- package/src/lightning/positionLibrary/__examples__/playground/playground.js +103 -0
- package/src/lightning/positionLibrary/__examples__/playgroundShadowScroll/playgroundShadowScroll.html +8 -0
- package/src/lightning/positionLibrary/__examples__/playgroundShadowScroll/playgroundShadowScroll.js +9 -0
- package/src/lightning/positionLibrary/elementProxy.js +13 -1
- package/src/lightning/primitiveDatatableIeditPanel/primitiveDatatableIeditPanel.html +1 -0
- package/src/lightning/primitiveDatatableIeditPanel/primitiveDatatableIeditPanel.js +2 -1
- package/src/lightning/primitiveDatatableIeditTypeFactory/primitiveDatatableIeditTypeFactory.js +1 -7
- package/src/lightning/primitiveDatatableLoadingIndicator/primitiveDatatableLoadingIndicator.html +1 -1
- package/src/lightning/tabBar/tabBar.js +8 -12
- package/src/lightning/tooltipLibrary/tooltipLibrary.js +2 -1
- package/src/lightning/utilsPrivate/utilsPrivate.js +10 -4
- package/src/lightning/accordion/__utam__/accordion.utam.json +0 -13
- package/src/lightning/accordionSection/__utam__/accordionSection.utam.json +0 -71
- package/src/lightning/avatar/__utam__/avatar.utam.json +0 -79
- package/src/lightning/badge/__utam__/badge.utam.json +0 -13
- package/src/lightning/baseCombobox/__utam__/baseCombobox.utam.json +0 -91
- package/src/lightning/baseComboboxItem/__utam__/baseComboboxItem.utam.json +0 -46
- package/src/lightning/breadcrumbs/__utam__/breadcrumbs.utam.json +0 -69
- package/src/lightning/button/__utam__/button.utam.json +0 -61
- package/src/lightning/buttonGroup/__utam__/buttonGroup.utam.json +0 -18
- package/src/lightning/buttonIcon/__utam__/buttonIcon.utam.json +0 -54
- package/src/lightning/buttonIconStateful/__utam__/buttonIconStateful.utam.json +0 -86
- package/src/lightning/buttonMenu/__utam__/buttonMenu.utam.json +0 -120
- package/src/lightning/buttonStateful/__utam__/buttonStateful.utam.json +0 -87
- package/src/lightning/calendar/__utam__/calendar.utam.json +0 -136
- package/src/lightning/card/__utam__/card.utam.json +0 -111
- package/src/lightning/carousel/__utam__/carousel.utam.json +0 -44
- package/src/lightning/carouselImage/__utam__/carouselImage.utam.json +0 -108
- package/src/lightning/checkboxGroup/__utam__/checkboxGroup.utam.json +0 -29
- package/src/lightning/combobox/__utam__/combobox.utam.json +0 -56
- package/src/lightning/datatable/__utam__/datatable.utam.json +0 -591
- package/src/lightning/datepicker/__utam__/datepicker.utam.json +0 -104
- package/src/lightning/datetimepicker/__utam__/datetimepicker.utam.json +0 -56
- package/src/lightning/dualListbox/__utam__/dualListbox.utam.json +0 -210
- package/src/lightning/formattedAddress/__utam__/formattedAddress.utam.json +0 -50
- package/src/lightning/formattedDateTime/__utam__/formattedDateTime.utam.json +0 -13
- package/src/lightning/formattedEmail/__utam__/formattedEmail.utam.json +0 -45
- package/src/lightning/formattedLocation/__utam__/formattedLocation.utam.json +0 -13
- package/src/lightning/formattedLookup/__utam__/formattedLookup.utam.json +0 -13
- package/src/lightning/formattedName/__utam__/formattedName.utam.json +0 -13
- package/src/lightning/formattedNumber/__utam__/formattedNumber.utam.json +0 -13
- package/src/lightning/formattedPhone/__utam__/formattedPhone.utam.json +0 -13
- package/src/lightning/formattedRichText/__utam__/formattedRichText.utam.json +0 -13
- package/src/lightning/formattedText/__utam__/formattedText.utam.json +0 -13
- package/src/lightning/formattedUrl/__utam__/formattedUrl.utam.json +0 -30
- package/src/lightning/groupedCombobox/__utam__/groupedCombobox.utam.json +0 -56
- package/src/lightning/helptext/__utam__/helptext.utam.json +0 -23
- package/src/lightning/icon/__utam__/icon.utam.json +0 -31
- package/src/lightning/input/__utam__/input.utam.json +0 -267
- package/src/lightning/inputAddress/__utam__/inputAddress.utam.json +0 -94
- package/src/lightning/inputLocation/__utam__/inputLocation.utam.json +0 -37
- package/src/lightning/inputName/__utam__/inputName.utam.json +0 -71
- package/src/lightning/layout/__utam__/layout.utam.json +0 -20
- package/src/lightning/layoutItem/__utam__/layoutItem.utam.json +0 -12
- package/src/lightning/menuItem/__utam__/menuItem.utam.json +0 -40
- package/src/lightning/menuSubheader/__utam__/menuSubHeader.utam.json +0 -22
- package/src/lightning/picklist/__utam__/picklist.utam.json +0 -24
- package/src/lightning/pill/__utam__/pill.utam.json +0 -55
- package/src/lightning/pillContainer/__utam__/pillContainer.utam.json +0 -15
- package/src/lightning/primitiveBubble/__utam__/primitiveBubble.utam.json +0 -17
- package/src/lightning/primitiveFileDroppableZone/__utam__/primitiveFileDroppableZone.utam.json +0 -40
- package/src/lightning/primitiveIcon/__utam__/primitiveIcon.utam.json +0 -25
- package/src/lightning/progressBar/__utam__/progressBar.utam.json +0 -58
- package/src/lightning/progressIndicator/__utam__/progressIndicator.utam.json +0 -69
- package/src/lightning/progressRing/__utam__/progressRing.utam.json +0 -88
- package/src/lightning/progressStep/__utam__/progressStep.utam.json +0 -47
- package/src/lightning/radioGroup/__utam__/radioGroup.utam.json +0 -50
- package/src/lightning/select/__utam__/select.utam.json +0 -118
- package/src/lightning/spinner/__utam__/spinner.utam.json +0 -41
- package/src/lightning/tabBar/__utam__/tabBar.utam.json +0 -56
- package/src/lightning/tabset/__utam__/tabset.utam.json +0 -24
- package/src/lightning/textarea/__utam__/textarea.utam.json +0 -83
- package/src/lightning/tile/__utam__/tile.utam.json +0 -105
- package/src/lightning/timepicker/__utam__/timepicker.utam.json +0 -87
- package/src/lightning/tree/__utam__/tree.utam.json +0 -12
- package/src/lightning/treeItem/__utam__/treeItem.utam.json +0 -101
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { LightningElement, api } from 'lwc';
|
|
2
|
+
|
|
3
|
+
export default class PlaygroundCompoennts extends LightningElement {
|
|
4
|
+
@api component;
|
|
5
|
+
|
|
6
|
+
get isHelpText() {
|
|
7
|
+
return this.component === 'helpText';
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
get isButtonMenu() {
|
|
11
|
+
return this.component === 'button-menu';
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
get isComboBox() {
|
|
15
|
+
return this.component === 'combobox';
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
get isDatePicker() {
|
|
19
|
+
return this.component === 'datepicker';
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
get comboBoxOptions() {
|
|
23
|
+
return [
|
|
24
|
+
{ label: 'New', value: 'new' },
|
|
25
|
+
{ label: 'In Progress', value: 'inProgress' },
|
|
26
|
+
{ label: 'Finished', value: 'finished' },
|
|
27
|
+
];
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
.config {
|
|
2
|
+
background: white;
|
|
3
|
+
border-radius: 5px;
|
|
4
|
+
padding: 8px 15px 13px 15px;
|
|
5
|
+
position: fixed;
|
|
6
|
+
width: auto;
|
|
7
|
+
left: 10px;
|
|
8
|
+
right: 10px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.config-bottom {
|
|
12
|
+
bottom: 130px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.slds-col {
|
|
16
|
+
border-left: 1px solid #eef4ff;
|
|
17
|
+
border-right: 1px solid #eef4ff;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.container {
|
|
21
|
+
width: var(--containerWidth, 300px);
|
|
22
|
+
height: var(--containerHeight, 200px);
|
|
23
|
+
border: 3.5px solid #0176d3;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.container-text {
|
|
27
|
+
position: absolute;
|
|
28
|
+
left: 50%;
|
|
29
|
+
top: 50%;
|
|
30
|
+
transform: translate(-50%, -50%);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.container-placeholder {
|
|
34
|
+
background: transparent;
|
|
35
|
+
height: 1000px;
|
|
36
|
+
/* width: 50%;
|
|
37
|
+
margin: auto; */
|
|
38
|
+
word-wrap: break-word;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.top-left {
|
|
42
|
+
position: absolute;
|
|
43
|
+
left: 0;
|
|
44
|
+
top: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.top-right {
|
|
48
|
+
position: absolute;
|
|
49
|
+
right: 0;
|
|
50
|
+
top: 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.bottom-left {
|
|
54
|
+
position: absolute;
|
|
55
|
+
left: 0;
|
|
56
|
+
bottom: 0;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.bottom-right {
|
|
60
|
+
position: absolute;
|
|
61
|
+
right: 0;
|
|
62
|
+
bottom: 0;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.viewport-placeholder {
|
|
66
|
+
height: 200vh;
|
|
67
|
+
width: 50%;
|
|
68
|
+
background: transparent;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
*::-webkit-scrollbar {
|
|
72
|
+
-webkit-appearance: none;
|
|
73
|
+
width: 6px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
*::-webkit-scrollbar-thumb {
|
|
77
|
+
border-radius: 4px;
|
|
78
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
79
|
+
box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
body {
|
|
83
|
+
overflow-y: auto;
|
|
84
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!-- Container -->
|
|
3
|
+
<div class={computedContainerClass}>
|
|
4
|
+
<p class="container-text">Container</p>
|
|
5
|
+
|
|
6
|
+
<template if:true={isUseShadowRootContainer}>
|
|
7
|
+
<positionLibrary-playground-shadow-scroll>
|
|
8
|
+
<positionLibrary-components
|
|
9
|
+
component={selectedComponent}
|
|
10
|
+
class={computedComponentClass}
|
|
11
|
+
></positionLibrary-components>
|
|
12
|
+
</positionLibrary-playground-shadow-scroll>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<template if:false={isUseShadowRootContainer}>
|
|
16
|
+
<positionLibrary-components
|
|
17
|
+
component={selectedComponent}
|
|
18
|
+
class={computedComponentClass}
|
|
19
|
+
></positionLibrary-components>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<template if:true={isContainerScroll}>
|
|
23
|
+
<div class="container-placeholder"></div>
|
|
24
|
+
</template>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<!-- Config panel -->
|
|
28
|
+
<div class={computedConfigClass}>
|
|
29
|
+
<div class="slds-text-heading_medium slds-m-bottom_x-small">
|
|
30
|
+
Configuration
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
<div class="slds-grid slds-gutters_small">
|
|
34
|
+
<div class="slds-col slds-size_1-of-5">
|
|
35
|
+
<lightning-combobox
|
|
36
|
+
name="components"
|
|
37
|
+
label="Select a component"
|
|
38
|
+
placeholder="Please select"
|
|
39
|
+
value={selectedComponent}
|
|
40
|
+
options={componentOptions}
|
|
41
|
+
onchange={handleComponentSelector}
|
|
42
|
+
>
|
|
43
|
+
</lightning-combobox>
|
|
44
|
+
</div>
|
|
45
|
+
<div class="slds-col slds-size_2-of-5">
|
|
46
|
+
<lightning-slider
|
|
47
|
+
label="Container Width(px)"
|
|
48
|
+
step="50"
|
|
49
|
+
min="100"
|
|
50
|
+
max="500"
|
|
51
|
+
value={containerWidth}
|
|
52
|
+
onchange={handleWidthSlider}
|
|
53
|
+
></lightning-slider>
|
|
54
|
+
<lightning-slider
|
|
55
|
+
label="Container Height(px)"
|
|
56
|
+
step="50"
|
|
57
|
+
min="100"
|
|
58
|
+
max="500"
|
|
59
|
+
value={containerHeight}
|
|
60
|
+
onchange={handleHeightSlider}
|
|
61
|
+
></lightning-slider>
|
|
62
|
+
</div>
|
|
63
|
+
<div class="slds-col slds-size_1-of-5">
|
|
64
|
+
<lightning-combobox
|
|
65
|
+
name="containerPosition"
|
|
66
|
+
label="Container Position"
|
|
67
|
+
placeholder="Please select"
|
|
68
|
+
value={containerPosition}
|
|
69
|
+
options={positionOptions}
|
|
70
|
+
onchange={handleContainerPosition}
|
|
71
|
+
>
|
|
72
|
+
</lightning-combobox>
|
|
73
|
+
<lightning-combobox
|
|
74
|
+
name="componentPosition"
|
|
75
|
+
label="Component Position"
|
|
76
|
+
placeholder="Please select"
|
|
77
|
+
value={componentPosition}
|
|
78
|
+
options={positionOptions}
|
|
79
|
+
onchange={handleComponentPosition}
|
|
80
|
+
>
|
|
81
|
+
</lightning-combobox>
|
|
82
|
+
</div>
|
|
83
|
+
<div class="slds-col slds-size_1-of-5">
|
|
84
|
+
<lightning-input
|
|
85
|
+
type="toggle"
|
|
86
|
+
name="container scrollbar"
|
|
87
|
+
label="Container Scrollbar"
|
|
88
|
+
message-toggle-active="Enabled"
|
|
89
|
+
message-toggle-inactive="Disabled"
|
|
90
|
+
checked={isContainerScroll}
|
|
91
|
+
onchange={handleContainerScroll}
|
|
92
|
+
disabled={isContainerScrollDisabled}
|
|
93
|
+
></lightning-input>
|
|
94
|
+
<lightning-input
|
|
95
|
+
type="toggle"
|
|
96
|
+
name="viewport scrollbar"
|
|
97
|
+
label="Viewport Scrollbar"
|
|
98
|
+
message-toggle-active="Enabled"
|
|
99
|
+
message-toggle-inactive="Disabled"
|
|
100
|
+
checked={isViewportScroll}
|
|
101
|
+
onchange={handleViewportScroll}
|
|
102
|
+
class="slds-m-top_medium"
|
|
103
|
+
></lightning-input>
|
|
104
|
+
<lightning-input
|
|
105
|
+
type="toggle"
|
|
106
|
+
name="ShadowRoot Container"
|
|
107
|
+
label="ShadowRoot Container"
|
|
108
|
+
message-toggle-active="Enabled"
|
|
109
|
+
message-toggle-inactive="Disabled"
|
|
110
|
+
checked={isUseShadowRootContainer}
|
|
111
|
+
onchange={handleShadowContainer}
|
|
112
|
+
class="slds-m-top_medium"
|
|
113
|
+
></lightning-input>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
|
|
118
|
+
<!-- Placeholder to enable scrollbar of viewport -->
|
|
119
|
+
<template if:true={isViewportScroll}>
|
|
120
|
+
<div class="viewport-placeholder"></div>
|
|
121
|
+
</template>
|
|
122
|
+
</template>
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { LightningElement } from 'lwc';
|
|
2
|
+
import { classSet } from 'lightning/utils';
|
|
3
|
+
|
|
4
|
+
export default class PositionLibraryPlayground extends LightningElement {
|
|
5
|
+
selectedComponent = 'helpText';
|
|
6
|
+
containerPosition = 'topLeft';
|
|
7
|
+
componentPosition = 'topLeft';
|
|
8
|
+
|
|
9
|
+
containerWidth = 300;
|
|
10
|
+
containerHeight = 200;
|
|
11
|
+
|
|
12
|
+
isContainerScroll = false;
|
|
13
|
+
isViewportScroll = false;
|
|
14
|
+
isUseShadowRootContainer = false;
|
|
15
|
+
|
|
16
|
+
componentOptions = [
|
|
17
|
+
{ label: 'helpText', value: 'helpText' },
|
|
18
|
+
{ label: 'button-menu', value: 'button-menu' },
|
|
19
|
+
{ label: 'combobox', value: 'combobox' },
|
|
20
|
+
{ label: 'datepicker', value: 'datepicker' },
|
|
21
|
+
];
|
|
22
|
+
|
|
23
|
+
positionOptions = [
|
|
24
|
+
{ label: 'top left', value: 'topLeft' },
|
|
25
|
+
{ label: 'top right', value: 'topRight' },
|
|
26
|
+
{ label: 'bottom left', value: 'bottomLeft' },
|
|
27
|
+
{ label: 'bottom right', value: 'bottomRight' },
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
handleComponentSelector(event) {
|
|
31
|
+
this.selectedComponent = event.detail.value;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
handleContainerPosition(event) {
|
|
35
|
+
this.containerPosition = event.detail.value;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
handleComponentPosition(event) {
|
|
39
|
+
this.componentPosition = event.detail.value;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
get computedComponentClass() {
|
|
43
|
+
return classSet().add({
|
|
44
|
+
'top-left': this.componentPosition === 'topLeft',
|
|
45
|
+
'top-right': this.componentPosition === 'topRight',
|
|
46
|
+
'bottom-left': this.componentPosition === 'bottomLeft',
|
|
47
|
+
'bottom-right': this.componentPosition === 'bottomRight',
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// container has style overflow-y:auto(slds-scrollable_y)
|
|
52
|
+
get computedContainerClass() {
|
|
53
|
+
const classnames = classSet('container slds-scrollable_y');
|
|
54
|
+
|
|
55
|
+
return classnames.add({
|
|
56
|
+
'top-left': this.containerPosition === 'topLeft',
|
|
57
|
+
'top-right': this.containerPosition === 'topRight',
|
|
58
|
+
'bottom-left': this.containerPosition === 'bottomLeft',
|
|
59
|
+
'bottom-right': this.containerPosition === 'bottomRight',
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
get computedConfigClass() {
|
|
64
|
+
const classnames = classSet('config');
|
|
65
|
+
|
|
66
|
+
return classnames.add({
|
|
67
|
+
'config-bottom':
|
|
68
|
+
this.containerPosition === 'topLeft' ||
|
|
69
|
+
this.containerPosition === 'topRight',
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
handleWidthSlider(event) {
|
|
74
|
+
this.containerWidth = event.detail.value;
|
|
75
|
+
const css = document.body.style;
|
|
76
|
+
css.setProperty('--containerWidth', `${this.containerWidth}px`);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
handleHeightSlider(event) {
|
|
80
|
+
this.containerHeight = event.detail.value;
|
|
81
|
+
const css = document.body.style;
|
|
82
|
+
css.setProperty('--containerHeight', `${this.containerHeight}px`);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
handleContainerScroll() {
|
|
86
|
+
this.isContainerScroll = !this.isContainerScroll;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
handleViewportScroll() {
|
|
90
|
+
this.isViewportScroll = !this.isViewportScroll;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
handleShadowContainer() {
|
|
94
|
+
this.isUseShadowRootContainer = !this.isUseShadowRootContainer;
|
|
95
|
+
if (this.isUseShadowRootContainer) {
|
|
96
|
+
this.isContainerScroll = false;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
get isContainerScrollDisabled() {
|
|
101
|
+
return this.isUseShadowRootContainer === true;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -142,9 +142,21 @@ export class ElementProxy {
|
|
|
142
142
|
? '0'
|
|
143
143
|
: parseInt(style.top.replace('px', ''), 10);
|
|
144
144
|
|
|
145
|
-
|
|
145
|
+
let leftDif = Math.round(this.left - (absPos.left + scrollLeft));
|
|
146
146
|
const topDif = this.top - (absPos.top + scrollTop);
|
|
147
147
|
|
|
148
|
+
const viewPortWidth = w.innerWidth || document.body.clientWidth;
|
|
149
|
+
let rightPos = parseInt(style.right, 10);
|
|
150
|
+
if (
|
|
151
|
+
originalLeft + leftDif + parseInt(style.width, 10) >
|
|
152
|
+
viewPortWidth &&
|
|
153
|
+
rightPos <= 0
|
|
154
|
+
) {
|
|
155
|
+
rightPos = rightPos < 0 ? -rightPos : leftDif;
|
|
156
|
+
this._node.style.right = -rightPos + 'px';
|
|
157
|
+
leftDif = 0;
|
|
158
|
+
}
|
|
159
|
+
|
|
148
160
|
this._node.style.left = `${originalLeft + leftDif}px`;
|
|
149
161
|
this._node.style.top = `${originalTop + topDif}px`;
|
|
150
162
|
|
|
@@ -19,6 +19,7 @@ export default class PrimitiveDatatableIeditPanel extends LightningElement {
|
|
|
19
19
|
@api columnDef;
|
|
20
20
|
@api isMassEditEnabled = false;
|
|
21
21
|
@api numberOfSelectedRows;
|
|
22
|
+
@api resolvedTypeAttributes;
|
|
22
23
|
|
|
23
24
|
connectedCallback() {
|
|
24
25
|
this.interactingState = new InteractingState({
|
|
@@ -117,7 +118,7 @@ export default class PrimitiveDatatableIeditPanel extends LightningElement {
|
|
|
117
118
|
|
|
118
119
|
@api
|
|
119
120
|
get value() {
|
|
120
|
-
return this.inputableElement.value;
|
|
121
|
+
return this.inputableElement ? this.inputableElement.value : null;
|
|
121
122
|
}
|
|
122
123
|
|
|
123
124
|
@api
|
package/src/lightning/primitiveDatatableIeditTypeFactory/primitiveDatatableIeditTypeFactory.js
CHANGED
|
@@ -31,6 +31,7 @@ export default class LightningPrimitiveDatatableIeditTypeFactory extends Lightni
|
|
|
31
31
|
columnLabel;
|
|
32
32
|
@api editedValue;
|
|
33
33
|
@api required;
|
|
34
|
+
@api typeAttributes;
|
|
34
35
|
|
|
35
36
|
@api
|
|
36
37
|
get columnDef() {
|
|
@@ -137,13 +138,6 @@ export default class LightningPrimitiveDatatableIeditTypeFactory extends Lightni
|
|
|
137
138
|
return this._columnDef.editTemplate;
|
|
138
139
|
}
|
|
139
140
|
|
|
140
|
-
/**
|
|
141
|
-
* Returns typeAttributes defined for custom type template
|
|
142
|
-
*/
|
|
143
|
-
get typeAttributes() {
|
|
144
|
-
return this._columnDef.typeAttributes;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
141
|
/**
|
|
148
142
|
* for percent, currency types use if step passed in, if not fallback to default
|
|
149
143
|
* @returns {*|string}
|
|
@@ -101,14 +101,14 @@ export default class LightningTabBar extends LightningElement {
|
|
|
101
101
|
showErrorIndicator: tab.showErrorIndicator,
|
|
102
102
|
};
|
|
103
103
|
});
|
|
104
|
-
|
|
105
|
-
let selectedTab =
|
|
104
|
+
|
|
105
|
+
let selectedTab = allTabs[0];
|
|
106
106
|
if (this._selectedTab) {
|
|
107
|
-
selectedTab =
|
|
107
|
+
selectedTab = allTabs.find(
|
|
108
108
|
(tab) => tab.value === this._selectedTab.value
|
|
109
109
|
);
|
|
110
110
|
if (!selectedTab) {
|
|
111
|
-
selectedTab =
|
|
111
|
+
selectedTab = allTabs[0];
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
if (selectedTab) {
|
|
@@ -117,6 +117,7 @@ export default class LightningTabBar extends LightningElement {
|
|
|
117
117
|
selectedTab.ariaSelected = 'true';
|
|
118
118
|
selectedTab.tabIndex = 0;
|
|
119
119
|
}
|
|
120
|
+
this._allTabs = allTabs;
|
|
120
121
|
|
|
121
122
|
this._queueSynchronizeA11 = true;
|
|
122
123
|
|
|
@@ -128,7 +129,7 @@ export default class LightningTabBar extends LightningElement {
|
|
|
128
129
|
|
|
129
130
|
@api
|
|
130
131
|
selectTabByValue(tabValue) {
|
|
131
|
-
this._selectTab(tabValue
|
|
132
|
+
this._selectTab(tabValue);
|
|
132
133
|
}
|
|
133
134
|
|
|
134
135
|
@api
|
|
@@ -276,13 +277,8 @@ export default class LightningTabBar extends LightningElement {
|
|
|
276
277
|
tab.tabIndex = 0;
|
|
277
278
|
|
|
278
279
|
this._selectedTab = tab;
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
//Case added specifically for the reactive property of active tab
|
|
282
|
-
this._selectTabAndFireSelectEvent(this._selectedTab.value);
|
|
283
|
-
if (this._hasOverflow) {
|
|
284
|
-
this._recomputeOverflow();
|
|
285
|
-
}
|
|
280
|
+
if (this._hasOverflow) {
|
|
281
|
+
this._queueOverflow();
|
|
286
282
|
}
|
|
287
283
|
}
|
|
288
284
|
|
|
@@ -10,7 +10,8 @@ import LightningPrimitiveBubble from 'lightning/primitiveBubble';
|
|
|
10
10
|
|
|
11
11
|
export { Direction } from 'lightning/positionLibrary';
|
|
12
12
|
|
|
13
|
-
const
|
|
13
|
+
export const BUBBLE_PREFIX = `salesforce-lightning-tooltip-bubble`;
|
|
14
|
+
const BUBBLE_ID = `${BUBBLE_PREFIX}_${guid()}`;
|
|
14
15
|
|
|
15
16
|
function isResizeObserverSupported() {
|
|
16
17
|
return window.ResizeObserver != null;
|
|
@@ -108,20 +108,26 @@ export function isNotUndefinedOrNull(value) {
|
|
|
108
108
|
return !isUndefinedOrNull(value);
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
const
|
|
111
|
+
const DEFAULT_MODAL_ZINDEX = 9000;
|
|
112
|
+
const DEFAULT_ZINDEX_OFFSET = 100;
|
|
113
|
+
const DEFAULT_ZINDEX_BASELINE = DEFAULT_MODAL_ZINDEX + DEFAULT_ZINDEX_OFFSET;
|
|
112
114
|
/**
|
|
113
115
|
* Returns the zIndex baseline from slds zIndex variable --lwc-zIndexModal.
|
|
114
116
|
* @returns {Number} zIndex baseline
|
|
115
117
|
*/
|
|
116
118
|
export function getZIndexBaseline() {
|
|
117
|
-
|
|
119
|
+
// When SLDS styles are present, typically on Core
|
|
120
|
+
// this currently resolves to: '9000' (string)
|
|
121
|
+
const modalZindexValueLwc = (
|
|
118
122
|
window.getComputedStyle(document.documentElement) ||
|
|
119
123
|
document.documentElement.style
|
|
120
124
|
).getPropertyValue('--lwc-zIndexModal');
|
|
121
125
|
|
|
122
|
-
const
|
|
126
|
+
const baseZindexModalLwc = parseInt(modalZindexValueLwc, 10);
|
|
123
127
|
|
|
124
|
-
return isNaN(
|
|
128
|
+
return isNaN(baseZindexModalLwc)
|
|
129
|
+
? DEFAULT_ZINDEX_BASELINE
|
|
130
|
+
: baseZindexModalLwc + DEFAULT_ZINDEX_OFFSET;
|
|
125
131
|
}
|
|
126
132
|
|
|
127
133
|
export function timeout(interval) {
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"methods": [
|
|
3
|
-
{
|
|
4
|
-
"name": "isActive",
|
|
5
|
-
"compose": [
|
|
6
|
-
{
|
|
7
|
-
"element": "sectionOpen",
|
|
8
|
-
"apply": "isPresent"
|
|
9
|
-
}
|
|
10
|
-
]
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"name": "getLabel",
|
|
14
|
-
"compose": [
|
|
15
|
-
{
|
|
16
|
-
"element": "label",
|
|
17
|
-
"apply": "getText"
|
|
18
|
-
}
|
|
19
|
-
]
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"name": "toggle",
|
|
23
|
-
"compose": [
|
|
24
|
-
{
|
|
25
|
-
"element": "label",
|
|
26
|
-
"apply": "click"
|
|
27
|
-
}
|
|
28
|
-
]
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"name": "getContent",
|
|
32
|
-
"compose": [
|
|
33
|
-
{
|
|
34
|
-
"element": "content",
|
|
35
|
-
"apply": "getText"
|
|
36
|
-
}
|
|
37
|
-
]
|
|
38
|
-
}
|
|
39
|
-
],
|
|
40
|
-
"shadow": {
|
|
41
|
-
"elements": [
|
|
42
|
-
{
|
|
43
|
-
"name": "sectionOpen",
|
|
44
|
-
"selector": {
|
|
45
|
-
"css": "section.slds-accordion__section.slds-is-open"
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"name": "section",
|
|
50
|
-
"selector": {
|
|
51
|
-
"css": "section.slds-accordion__section"
|
|
52
|
-
},
|
|
53
|
-
"elements": [
|
|
54
|
-
{
|
|
55
|
-
"name": "label",
|
|
56
|
-
"type": "clickable",
|
|
57
|
-
"selector": {
|
|
58
|
-
"css": "section.slds-accordion__section > div.slds-accordion__summary > h3 > button > span"
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
"name": "content",
|
|
63
|
-
"selector": {
|
|
64
|
-
"css": "div.slds-accordion__content"
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
]
|
|
68
|
-
}
|
|
69
|
-
]
|
|
70
|
-
}
|
|
71
|
-
}
|