lightning-base-components 1.13.6-alpha → 1.13.10-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 +104 -2
- package/package.json +37 -1
- package/scopedImports/@salesforce-label-LightningAlert.defaultLabel.js +1 -0
- package/scopedImports/@salesforce-label-LightningConfirm.defaultLabel.js +1 -0
- package/scopedImports/@salesforce-label-LightningDateTimePicker.selectDateFor.js +1 -0
- package/scopedImports/@salesforce-label-LightningInteractiveDialogBase.cancel.js +1 -0
- package/scopedImports/@salesforce-label-LightningInteractiveDialogBase.ok.js +1 -0
- package/scopedImports/@salesforce-label-LightningLookup.recentItems.js +1 -0
- package/scopedImports/@salesforce-label-LightningModalBase.close.js +1 -0
- package/scopedImports/@salesforce-label-LightningModalBase.waitstate.js +1 -0
- package/scopedImports/@salesforce-label-LightningPrompt.defaultLabel.js +1 -0
- package/src/lightning/baseCombobox/baseCombobox.html +50 -24
- package/src/lightning/baseCombobox/baseCombobox.js +53 -28
- package/src/lightning/card/card.html +7 -1
- package/src/lightning/card/card.js +30 -2
- package/src/lightning/card/utils.js +14 -0
- package/src/lightning/combobox/combobox.css +12 -0
- package/src/lightning/combobox/combobox.html +1 -0
- package/src/lightning/datatable/__docs__/datatable.md +40 -13
- package/src/lightning/datatable/columnWidthManager.js +8 -4
- package/src/lightning/datatable/columns-shared.js +8 -7
- package/src/lightning/datatable/columns.js +38 -4
- package/src/lightning/datatable/datatable.js +932 -727
- package/src/lightning/datatable/datatableResizeObserver.js +1 -1
- package/src/lightning/datatable/inlineEdit.js +15 -3
- package/src/lightning/datatable/keyboard.js +1078 -935
- package/src/lightning/datatable/resizer.js +92 -109
- package/src/lightning/datatable/rows.js +245 -59
- package/src/lightning/datatable/sort.js +83 -28
- package/src/lightning/datatable/{normalizer.js → state.js} +16 -28
- package/src/lightning/datatable/templates/div/div.css +53 -0
- package/src/lightning/datatable/templates/div/div.html +272 -0
- package/src/lightning/datatable/{datatable.css → templates/table/table.css} +0 -0
- package/src/lightning/datatable/templates/table/table.html +260 -0
- package/src/lightning/datatable/widthManagerShared.js +1 -1
- package/src/lightning/datepicker/datepicker.html +3 -3
- package/src/lightning/datepicker/datepicker.js +6 -2
- package/src/lightning/datetimepicker/datetimepicker.html +3 -4
- package/src/lightning/datetimepicker/datetimepicker.js +0 -2
- package/src/lightning/formattedRichText/__docs__/formattedRichText.md +1 -0
- package/src/lightning/helptext/helptext.js +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/asset_audit.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/attach.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/contract_payment.html +10 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/field_sales.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/historical_adherence.html +9 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/med_rec_recommendation.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/med_rec_statement_recommendation.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/medication_dispense.html +11 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/medication_reconciliation.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/report_type.html +9 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/story.html +2 -4
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/tour.html +9 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/tour_check.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/travel_mode.html +2 -2
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/unified_health_score.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/workforce_engagement.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/templates.js +26 -1
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/asset_audit.html +9 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/collection_alt.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/contract_doc.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/contract_payment.html +10 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/einstein.html +2 -1
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/entitlement.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/field_sales.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/signature.html +9 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/tour.html +9 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/tour_check.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/truck.html +10 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/workforce_engagement.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/asset_audit.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/attach.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/contract_payment.html +10 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/field_sales.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/historical_adherence.html +9 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/med_rec_recommendation.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/med_rec_statement_recommendation.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/medication_dispense.html +11 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/medication_reconciliation.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/report_type.html +9 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/story.html +2 -4
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/tour.html +9 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/tour_check.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/travel_mode.html +2 -2
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/unified_health_score.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/workforce_engagement.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/templates.js +26 -1
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/asset_audit.html +9 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/collection_alt.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/contract_doc.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/contract_payment.html +10 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/einstein.html +2 -1
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/entitlement.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/field_sales.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/signature.html +9 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/tour.html +9 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/tour_check.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/truck.html +10 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/workforce_engagement.html +8 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/asset_audit.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/attach.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/contract_payment.html +10 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/field_sales.html +8 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/historical_adherence.html +9 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/med_rec_recommendation.html +8 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/med_rec_statement_recommendation.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/medication_dispense.html +11 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/medication_reconciliation.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/report_type.html +9 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/story.html +2 -4
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/tour.html +9 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/tour_check.html +8 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/travel_mode.html +2 -2
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/unified_health_score.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/workforce_engagement.html +8 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/templates.js +15 -1
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/asset_audit.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/attach.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/contract_payment.html +10 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/field_sales.html +8 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/historical_adherence.html +9 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/med_rec_recommendation.html +8 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/med_rec_statement_recommendation.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/medication_dispense.html +11 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/medication_reconciliation.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/report_type.html +9 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/story.html +2 -4
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/tour.html +9 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/tour_check.html +8 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/travel_mode.html +2 -2
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/unified_health_score.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/workforce_engagement.html +8 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/templates.js +15 -1
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/templates.js +12 -1
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/asset_audit.html +9 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/collection_alt.html +8 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/contract_doc.html +8 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/contract_payment.html +10 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/einstein.html +2 -1
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/entitlement.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/field_sales.html +8 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/signature.html +9 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/tour.html +9 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/tour_check.html +8 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/truck.html +10 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/workforce_engagement.html +8 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/templates.js +12 -1
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/asset_audit.html +9 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/collection_alt.html +8 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/contract_doc.html +8 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/contract_payment.html +10 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/einstein.html +2 -1
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/entitlement.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/field_sales.html +8 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/signature.html +9 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/tour.html +9 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/tour_check.html +8 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/truck.html +10 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/workforce_engagement.html +8 -0
- package/src/lightning/input/__docs__/input.md +4 -0
- package/src/lightning/input/input.js +11 -6
- package/src/lightning/pill/link.html +1 -1
- package/src/lightning/pill/pill.js +18 -0
- package/src/lightning/pill/plainLink.html +2 -0
- package/src/lightning/pillContainer/barePillContainer.html +5 -5
- package/src/lightning/pillContainer/pillContainer.js +5 -4
- package/src/lightning/pillContainer/standardPillContainer.html +5 -5
- package/src/lightning/positionLibrary/__component__/positionLibraryBounding.spec.js +8 -6
- package/src/lightning/positionLibrary/__component__/x/bounding/bounding.html +1 -1
- package/src/lightning/positionLibrary/__component__/x/bounding/bounding.js +6 -9
- package/src/lightning/positionLibrary/direction.js +17 -5
- package/src/lightning/primitiveDatatableIeditPanel/primitiveDatatableIeditPanel.js +20 -0
- package/src/lightning/primitiveDatatableIeditTypeFactory/primitiveDatatableIeditTypeFactory.js +10 -0
- package/src/lightning/primitiveDatatableStatusBar/primitiveDatatableStatusBar.js +17 -3
- package/src/lightning/primitiveDatatableTooltip/primitiveDatatableTooltip.js +1 -0
- package/src/lightning/primitiveHeaderFactory/nonsortableHeader.html +5 -4
- package/src/lightning/primitiveHeaderFactory/primitiveHeaderFactory.js +255 -94
- package/src/lightning/primitiveHeaderFactory/selectableHeader.html +25 -23
- package/src/lightning/primitiveHeaderFactory/sortableHeader.html +13 -9
- package/src/lightning/progressIndicator/progressIndicator.js +30 -9
- package/src/lightning/progressRing/progressRing.html +6 -0
- package/src/lightning/progressRing/progressRing.js +98 -3
- package/src/lightning/progressStep/progressStep.js +6 -3
- package/src/lightning/timepicker/timepicker.html +1 -0
- package/src/lightning/utilsPrivate/aria.js +30 -0
- package/src/lightning/utilsPrivate/contentMutation.js +24 -2
- package/src/lightning/utilsPrivate/utilsPrivate.js +1 -1
- package/src/lightning/datatable/datatable.html +0 -237
- package/src/lightning/datatable/keys.js +0 -32
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/** Styles that aren't available from SLDS **/
|
|
2
|
+
|
|
3
|
+
.cell {
|
|
4
|
+
display: inline-block;
|
|
5
|
+
padding: .25rem .5rem;
|
|
6
|
+
white-space: nowrap;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.column-header {
|
|
10
|
+
color: #514f4d;
|
|
11
|
+
padding: .25rem .5rem;
|
|
12
|
+
font-weight: 700;
|
|
13
|
+
line-height: normal;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.table-header {
|
|
17
|
+
height: 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* Row borders */
|
|
21
|
+
[data-row-key-value] {
|
|
22
|
+
border-top: 1px solid #dddbda;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* Required for row numbers */
|
|
26
|
+
[role="row"] {
|
|
27
|
+
counter-increment: row-number;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* Move column header row to left;
|
|
31
|
+
TODO: See if there a better way */
|
|
32
|
+
[role="grid"] > [role="rowgroup"]:nth-child(1) {
|
|
33
|
+
margin-left: -0.5rem;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
[role="columnheader"] {
|
|
37
|
+
outline: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
[role="row"]:hover {
|
|
41
|
+
background-color: var(--sds-c-color-background, #f3f2f2);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
[role="row"].slds-is-selected {
|
|
45
|
+
background-color: var(--sds-c-color-background-dark, #ecebea);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
[role="rowheader"].slds-has-focus,
|
|
49
|
+
[role="rowheader"]:focus {
|
|
50
|
+
-webkit-box-shadow: var(--sds-c-color-border-selection, #0176d3) 0 0 0 1px inset;
|
|
51
|
+
box-shadow: var(--sds-c-color-border-selection, #0176d3) 0 0 0 1px inset;
|
|
52
|
+
outline: 0;
|
|
53
|
+
}
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!-- aria-live region to announce the keyboard navigation mode -->
|
|
3
|
+
<span aria-live="polite">
|
|
4
|
+
<!-- TODO: Look to merge this to a single span -->
|
|
5
|
+
<span data-keyboard-mode="navigation" class={computedAriaLiveClassForNavMode}>{i18n.ariaLiveNavigationMode}</span>
|
|
6
|
+
<span data-keyboard-mode="action" class={computedAriaLiveClassForActionMode}>{i18n.ariaLiveActionMode}</span>
|
|
7
|
+
</span>
|
|
8
|
+
<div lwc:dom="manual" class="dt-width-observer" style="width: 100%; height: 0px;"></div>
|
|
9
|
+
<div class="dt-outer-container" style="height: 100%; position: relative;">
|
|
10
|
+
<!-- Inline Edit Panel -->
|
|
11
|
+
<lightning-primitive-datatable-iedit-panel
|
|
12
|
+
data-iedit-panel="true"
|
|
13
|
+
visible={state.inlineEdit.isPanelVisible}
|
|
14
|
+
row-key-value={state.inlineEdit.rowKeyValue}
|
|
15
|
+
col-key-value={state.inlineEdit.colKeyValue}
|
|
16
|
+
edited-value={state.inlineEdit.editedValue}
|
|
17
|
+
column-def={state.inlineEdit.columnDef}
|
|
18
|
+
is-mass-edit-enabled={state.inlineEdit.massEditEnabled}
|
|
19
|
+
number-of-selected-rows={state.inlineEdit.massEditSelectedRows}
|
|
20
|
+
resolved-type-attributes={state.inlineEdit.resolvedTypeAttributes}
|
|
21
|
+
onieditfinished={handleInlineEditFinish}
|
|
22
|
+
onmasscheckboxchange={handleMassCheckboxChange}
|
|
23
|
+
></lightning-primitive-datatable-iedit-panel>
|
|
24
|
+
<!-- Table Container -->
|
|
25
|
+
<div class={computedTableContainerClass} onscroll={handleHorizontalScroll} style={scrollerXStyles}>
|
|
26
|
+
<div class="slds-scrollable_y" onscroll={handleVerticalScroll} style={computedScrollerStyle}>
|
|
27
|
+
<!-- Corresponds to <table> -->
|
|
28
|
+
<div class={computedTableClass}
|
|
29
|
+
role={computedTableRole}
|
|
30
|
+
style={computedTableStyle}
|
|
31
|
+
onkeydown={handleTableKeydown}
|
|
32
|
+
onclick={handleCellClick}
|
|
33
|
+
onfocusin={handleTableFocusIn}
|
|
34
|
+
onfocusout={handleTableFocusOut}
|
|
35
|
+
aria-label={ariaLabel}
|
|
36
|
+
aria-labelledby={ariaLabelledBy}
|
|
37
|
+
aria-rowcount={ariaRowCount}
|
|
38
|
+
aria-colcount={ariaColCount}>
|
|
39
|
+
<template if:false={hasValidKeyField}>
|
|
40
|
+
<!-- empty since keyField wasn't provided -->
|
|
41
|
+
</template>
|
|
42
|
+
<template if:true={hasValidKeyField}>
|
|
43
|
+
<!-- Corresponds to <thead> -->
|
|
44
|
+
<div role="rowgroup">
|
|
45
|
+
<!-- TODO: Fix aria-rowindex to not be hardcoded -->
|
|
46
|
+
<!-- TODO: might need to move the table-header class out or rename -->
|
|
47
|
+
<!-- Column Header Row -->
|
|
48
|
+
<div class="slds-line-height_reset table-header"
|
|
49
|
+
role="row"
|
|
50
|
+
aria-rowindex="1"
|
|
51
|
+
onprivateresizestart={handleResizeStart}
|
|
52
|
+
onprivateresizeend={handleResizeEnd}>
|
|
53
|
+
<template for:each={state.columns} for:item="def" for:index="colIndex">
|
|
54
|
+
<!-- Column Header -->
|
|
55
|
+
<div class="column-header cell"
|
|
56
|
+
style={def.style}
|
|
57
|
+
role="columnheader"
|
|
58
|
+
tabindex={def.tabIndex}
|
|
59
|
+
aria-label={def.ariaLabel}
|
|
60
|
+
aria-sort={def.sortAriaLabel}
|
|
61
|
+
key={def.colKeyValue}>
|
|
62
|
+
|
|
63
|
+
<template if:true={def.fixedWidth}>
|
|
64
|
+
<!-- Fixed Width Columns: Non-resizable -->
|
|
65
|
+
<lightning-primitive-header-factory
|
|
66
|
+
style={def.style}
|
|
67
|
+
def={def}
|
|
68
|
+
dt-context-id={_datatableId}
|
|
69
|
+
key={def.colKeyValue}
|
|
70
|
+
row-key-value="HEADER"
|
|
71
|
+
col-key-value={def.colKeyValue}
|
|
72
|
+
col-index={colIndex}
|
|
73
|
+
has-focus={def.hasFocus}
|
|
74
|
+
actions={def.actions}
|
|
75
|
+
sortable={def.sortable}
|
|
76
|
+
sorted={def.sorted}
|
|
77
|
+
sorted-direction={def.sortedDirection}
|
|
78
|
+
column-width={def.columnWidth}
|
|
79
|
+
show-checkbox={showSelectAllCheckbox}
|
|
80
|
+
hide-header={hideTableHeader}>
|
|
81
|
+
</lightning-primitive-header-factory>
|
|
82
|
+
</template>
|
|
83
|
+
<template if:false={def.fixedWidth}>
|
|
84
|
+
<!-- Resizable Columns (Non-Fixed-Width) -->
|
|
85
|
+
<lightning-primitive-header-factory
|
|
86
|
+
style={def.style}
|
|
87
|
+
def={def}
|
|
88
|
+
dt-context-id={_datatableId}
|
|
89
|
+
key={def.colKeyValue}
|
|
90
|
+
row-key-value="HEADER"
|
|
91
|
+
col-key-value={def.colKeyValue}
|
|
92
|
+
col-index={colIndex}
|
|
93
|
+
has-focus={def.hasFocus}
|
|
94
|
+
actions={def.actions}
|
|
95
|
+
sortable={def.sortable}
|
|
96
|
+
sorted={def.sorted}
|
|
97
|
+
sorted-direction={def.sortedDirection}
|
|
98
|
+
column-width={def.columnWidth}
|
|
99
|
+
resizable={hasResizebleColumns}
|
|
100
|
+
resizestep={widthsData.resizeStep}
|
|
101
|
+
hide-header={hideTableHeader}>
|
|
102
|
+
</lightning-primitive-header-factory>
|
|
103
|
+
</template>
|
|
104
|
+
</div>
|
|
105
|
+
</template>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
<!-- Corresponds to <tbody> -->
|
|
109
|
+
<div style={computedTbodyStyle} role="rowgroup">
|
|
110
|
+
<template for:each={renderedRows} for:item="row" for:index="rowIndex">
|
|
111
|
+
<!-- Data Rows -->
|
|
112
|
+
<div class={row.classnames}
|
|
113
|
+
role="row"
|
|
114
|
+
key={row.key}
|
|
115
|
+
onkeydown={handleKeydownOnDataRow}
|
|
116
|
+
data-row-key-value={row.key}
|
|
117
|
+
aria-selected={row.ariaSelected}
|
|
118
|
+
aria-level={row.level}
|
|
119
|
+
aria-expanded={row.isExpanded}
|
|
120
|
+
aria-setsize={row.setSize}
|
|
121
|
+
aria-posinset={row.posInSet}
|
|
122
|
+
aria-rowindex={row.ariaRowIndex}
|
|
123
|
+
tabindex={row.tabIndex}>
|
|
124
|
+
<template for:each={row.cells} for:item="cell">
|
|
125
|
+
<template if:true={cell.isCheckbox}>
|
|
126
|
+
<!-- Checkbox Cell -->
|
|
127
|
+
<div class={cell.class}
|
|
128
|
+
style={cell.style}
|
|
129
|
+
role="gridcell"
|
|
130
|
+
tabindex={cell.tabIndex}
|
|
131
|
+
data-label={cell.dataLabel}
|
|
132
|
+
key={cell.colKeyValue}>
|
|
133
|
+
<lightning-primitive-cell-checkbox
|
|
134
|
+
dt-context-id={_datatableId}
|
|
135
|
+
has-focus={cell.hasFocus}
|
|
136
|
+
data-label={cell.dataLabel}
|
|
137
|
+
key={cell.key}
|
|
138
|
+
row-key-value={row.key}
|
|
139
|
+
col-key-value={cell.colKeyValue}
|
|
140
|
+
row-index={rowIndex}
|
|
141
|
+
type={row.inputType}
|
|
142
|
+
is-selected={row.isSelected}
|
|
143
|
+
is-disabled={row.isDisabled}
|
|
144
|
+
column-header-id={computedCheckboxColumnHeaderId}>
|
|
145
|
+
</lightning-primitive-cell-checkbox>
|
|
146
|
+
</div>
|
|
147
|
+
</template>
|
|
148
|
+
<template if:true={cell.isDataTypeScope}>
|
|
149
|
+
<!-- Row Header Cell -->
|
|
150
|
+
<div class={cell.class}
|
|
151
|
+
role="rowheader"
|
|
152
|
+
style={cell.style}
|
|
153
|
+
aria-selected={cell.ariaSelected}
|
|
154
|
+
aria-readonly={cell.ariaReadOnly}
|
|
155
|
+
tabindex={cell.tabIndex}
|
|
156
|
+
data-label={cell.dataLabel}
|
|
157
|
+
key={cell.colKeyValue}>
|
|
158
|
+
<lightning-primitive-cell-factory
|
|
159
|
+
types={privateTypes}
|
|
160
|
+
aria-selected={cell.ariaSelected}
|
|
161
|
+
data-label={cell.dataLabel}
|
|
162
|
+
alignment={cell.alignment}
|
|
163
|
+
has-error={cell.hasError}
|
|
164
|
+
has-focus={cell.hasFocus}
|
|
165
|
+
column-label={cell.dataLabel}
|
|
166
|
+
column-type={cell.columnType}
|
|
167
|
+
column-sub-type={cell.columnSubType}
|
|
168
|
+
wrap-text={cell.wrapText}
|
|
169
|
+
wrap-text-max-lines={cell.wrapTextMaxLines}
|
|
170
|
+
key={cell.columnType}
|
|
171
|
+
row-key-value={row.key}
|
|
172
|
+
col-key-value={cell.colKeyValue}
|
|
173
|
+
value={cell.value}
|
|
174
|
+
icon-name={cell.iconName}
|
|
175
|
+
icon-label={cell.iconLabel}
|
|
176
|
+
icon-position={cell.iconPosition}
|
|
177
|
+
icon-alternative-text={cell.iconAlternativeText}
|
|
178
|
+
editable={cell.editable}
|
|
179
|
+
display-read-only-icon={cell.displayReadOnlyIcon}
|
|
180
|
+
type-attribute-0={cell.typeAttribute0}
|
|
181
|
+
type-attribute-1={cell.typeAttribute1}
|
|
182
|
+
type-attribute-2={cell.typeAttribute2}
|
|
183
|
+
type-attribute-3={cell.typeAttribute3}
|
|
184
|
+
type-attribute-4={cell.typeAttribute4}
|
|
185
|
+
type-attribute-5={cell.typeAttribute5}
|
|
186
|
+
type-attribute-6={cell.typeAttribute6}
|
|
187
|
+
type-attribute-7={cell.typeAttribute7}
|
|
188
|
+
type-attribute-8={cell.typeAttribute8}
|
|
189
|
+
type-attribute-9={cell.typeAttribute9}
|
|
190
|
+
type-attribute-10={cell.typeAttribute10}
|
|
191
|
+
type-attribute-21={cell.typeAttribute21}
|
|
192
|
+
type-attribute-22={cell.typeAttribute22}>
|
|
193
|
+
</lightning-primitive-cell-factory>
|
|
194
|
+
</div>
|
|
195
|
+
</template>
|
|
196
|
+
<template if:true={cell.isDataType}>
|
|
197
|
+
<!-- Non-Header Cells (Regular Data Cells) -->
|
|
198
|
+
<div class={cell.class}
|
|
199
|
+
role="gridcell"
|
|
200
|
+
style={cell.style}
|
|
201
|
+
aria-selected={cell.ariaSelected}
|
|
202
|
+
aria-readonly={cell.ariaReadOnly}
|
|
203
|
+
tabindex={cell.tabIndex}
|
|
204
|
+
data-label={cell.dataLabel}
|
|
205
|
+
key={cell.colKeyValue}>
|
|
206
|
+
<lightning-primitive-cell-factory
|
|
207
|
+
types={privateTypes}
|
|
208
|
+
aria-selected={cell.ariaSelected}
|
|
209
|
+
data-label={cell.dataLabel}
|
|
210
|
+
alignment={cell.alignment}
|
|
211
|
+
has-focus={cell.hasFocus}
|
|
212
|
+
has-error={cell.hasError}
|
|
213
|
+
column-label={cell.dataLabel}
|
|
214
|
+
column-type={cell.columnType}
|
|
215
|
+
column-sub-type={cell.columnSubType}
|
|
216
|
+
wrap-text={cell.wrapText}
|
|
217
|
+
wrap-text-max-lines={cell.wrapTextMaxLines}
|
|
218
|
+
key={cell.columnType}
|
|
219
|
+
row-key-value={row.key}
|
|
220
|
+
col-key-value={cell.colKeyValue}
|
|
221
|
+
value={cell.value}
|
|
222
|
+
icon-name={cell.iconName}
|
|
223
|
+
icon-label={cell.iconLabel}
|
|
224
|
+
icon-position={cell.iconPosition}
|
|
225
|
+
icon-alternative-text={cell.iconAlternativeText}
|
|
226
|
+
editable={cell.editable}
|
|
227
|
+
display-read-only-icon={cell.displayReadOnlyIcon}
|
|
228
|
+
type-attribute-0={cell.typeAttribute0}
|
|
229
|
+
type-attribute-1={cell.typeAttribute1}
|
|
230
|
+
type-attribute-2={cell.typeAttribute2}
|
|
231
|
+
type-attribute-3={cell.typeAttribute3}
|
|
232
|
+
type-attribute-4={cell.typeAttribute4}
|
|
233
|
+
type-attribute-5={cell.typeAttribute5}
|
|
234
|
+
type-attribute-6={cell.typeAttribute6}
|
|
235
|
+
type-attribute-7={cell.typeAttribute7}
|
|
236
|
+
type-attribute-8={cell.typeAttribute8}
|
|
237
|
+
type-attribute-9={cell.typeAttribute9}
|
|
238
|
+
type-attribute-10={cell.typeAttribute10}
|
|
239
|
+
type-attribute-21={cell.typeAttribute21}
|
|
240
|
+
type-attribute-22={cell.typeAttribute22}>
|
|
241
|
+
</lightning-primitive-cell-factory>
|
|
242
|
+
</div>
|
|
243
|
+
</template>
|
|
244
|
+
</template>
|
|
245
|
+
</div>
|
|
246
|
+
</template>
|
|
247
|
+
<!-- Loading Indicator -->
|
|
248
|
+
<template if:true={isLoading}>
|
|
249
|
+
<div>
|
|
250
|
+
<div colspan={numberOfColumns} class="slds-is-relative">
|
|
251
|
+
<lightning-primitive-datatable-loading-indicator></lightning-primitive-datatable-loading-indicator>
|
|
252
|
+
</div>
|
|
253
|
+
</div>
|
|
254
|
+
</template>
|
|
255
|
+
</div>
|
|
256
|
+
</template>
|
|
257
|
+
</div>
|
|
258
|
+
</div>
|
|
259
|
+
</div>
|
|
260
|
+
<!-- Status Bar:
|
|
261
|
+
Displays a bar at the bottom with Save and Cancel buttons
|
|
262
|
+
when inline edit is complete. Also shows errors if present.
|
|
263
|
+
-->
|
|
264
|
+
<template if:true={showStatusBar}>
|
|
265
|
+
<lightning-primitive-datatable-status-bar
|
|
266
|
+
error={tableError}
|
|
267
|
+
onprivatesave={handleInlineEditSave}
|
|
268
|
+
onprivatecancel={handleInlineEditCancel}
|
|
269
|
+
></lightning-primitive-datatable-status-bar>
|
|
270
|
+
</template>
|
|
271
|
+
</div>
|
|
272
|
+
</template>
|
|
File without changes
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!-- aria-live region to announce the keyboard navigation mode -->
|
|
3
|
+
<span aria-live="polite">
|
|
4
|
+
<span data-keyboard-mode="navigation" class={computedAriaLiveClassForNavMode}>{i18n.ariaLiveNavigationMode}</span>
|
|
5
|
+
<span data-keyboard-mode="action" class={computedAriaLiveClassForActionMode}>{i18n.ariaLiveActionMode}</span>
|
|
6
|
+
</span>
|
|
7
|
+
<div lwc:dom="manual" class="dt-width-observer" style="width: 100%; height: 0px;"></div>
|
|
8
|
+
<div class="dt-outer-container" style="height: 100%; position: relative;">
|
|
9
|
+
<!-- Inline Edit Panel -->
|
|
10
|
+
<lightning-primitive-datatable-iedit-panel
|
|
11
|
+
data-iedit-panel="true"
|
|
12
|
+
visible={state.inlineEdit.isPanelVisible}
|
|
13
|
+
row-key-value={state.inlineEdit.rowKeyValue}
|
|
14
|
+
col-key-value={state.inlineEdit.colKeyValue}
|
|
15
|
+
edited-value={state.inlineEdit.editedValue}
|
|
16
|
+
column-def={state.inlineEdit.columnDef}
|
|
17
|
+
is-mass-edit-enabled={state.inlineEdit.massEditEnabled}
|
|
18
|
+
number-of-selected-rows={state.inlineEdit.massEditSelectedRows}
|
|
19
|
+
resolved-type-attributes={state.inlineEdit.resolvedTypeAttributes}
|
|
20
|
+
onieditfinished={handleInlineEditFinish}
|
|
21
|
+
onmasscheckboxchange={handleMassCheckboxChange}>
|
|
22
|
+
</lightning-primitive-datatable-iedit-panel>
|
|
23
|
+
<!-- Table Container -->
|
|
24
|
+
<div class={computedTableContainerClass} onscroll={handleHorizontalScroll} style={scrollerXStyles}>
|
|
25
|
+
<div class="slds-scrollable_y" onscroll={handleVerticalScroll} style={computedScrollerStyle}>
|
|
26
|
+
<!-- Table -->
|
|
27
|
+
<table class={computedTableClass}
|
|
28
|
+
role={computedTableRole}
|
|
29
|
+
style={computedTableStyle}
|
|
30
|
+
onkeydown={handleTableKeydown}
|
|
31
|
+
onclick={handleCellClick}
|
|
32
|
+
onfocusin={handleTableFocusIn}
|
|
33
|
+
onfocusout={handleTableFocusOut}
|
|
34
|
+
aria-label={ariaLabel}
|
|
35
|
+
aria-labelledby={ariaLabelledBy}
|
|
36
|
+
aria-rowcount={ariaRowCount}>
|
|
37
|
+
<template if:false={hasValidKeyField}>
|
|
38
|
+
<!-- empty since keyField wasn't provided TODO: Why is this here? Test and remove! -->
|
|
39
|
+
</template>
|
|
40
|
+
<template if:true={hasValidKeyField}>
|
|
41
|
+
<thead>
|
|
42
|
+
<!-- Column Header Row -->
|
|
43
|
+
<tr class="slds-line-height_reset"
|
|
44
|
+
onprivateresizestart={handleResizeStart}
|
|
45
|
+
onprivateresizeend={handleResizeEnd}>
|
|
46
|
+
<template for:each={state.columns} for:item="def" for:index="colIndex">
|
|
47
|
+
<!-- Column Header -->
|
|
48
|
+
<th style={def.style}
|
|
49
|
+
scope="col"
|
|
50
|
+
tabindex={def.tabIndex}
|
|
51
|
+
aria-label={def.ariaLabel}
|
|
52
|
+
aria-sort={def.sortAriaLabel}
|
|
53
|
+
key={def.colKeyValue}>
|
|
54
|
+
|
|
55
|
+
<template if:true={def.fixedWidth}>
|
|
56
|
+
<!-- Fixed Width Columns: Non-resizable -->
|
|
57
|
+
<lightning-primitive-header-factory
|
|
58
|
+
style={def.style}
|
|
59
|
+
def={def}
|
|
60
|
+
dt-context-id={_datatableId}
|
|
61
|
+
key={def.colKeyValue}
|
|
62
|
+
row-key-value="HEADER"
|
|
63
|
+
col-key-value={def.colKeyValue}
|
|
64
|
+
col-index={colIndex}
|
|
65
|
+
has-focus={def.hasFocus}
|
|
66
|
+
actions={def.actions}
|
|
67
|
+
sortable={def.sortable}
|
|
68
|
+
sorted={def.sorted}
|
|
69
|
+
sorted-direction={def.sortedDirection}
|
|
70
|
+
column-width={def.columnWidth}
|
|
71
|
+
show-checkbox={showSelectAllCheckbox}
|
|
72
|
+
hide-header={hideTableHeader}>
|
|
73
|
+
</lightning-primitive-header-factory>
|
|
74
|
+
</template>
|
|
75
|
+
<template if:false={def.fixedWidth}>
|
|
76
|
+
<!-- Resizable Columns (Non-Fixed-Width) -->
|
|
77
|
+
<lightning-primitive-header-factory
|
|
78
|
+
style={def.style}
|
|
79
|
+
def={def}
|
|
80
|
+
dt-context-id={_datatableId}
|
|
81
|
+
key={def.colKeyValue}
|
|
82
|
+
row-key-value="HEADER"
|
|
83
|
+
col-key-value={def.colKeyValue}
|
|
84
|
+
col-index={colIndex}
|
|
85
|
+
has-focus={def.hasFocus}
|
|
86
|
+
actions={def.actions}
|
|
87
|
+
sortable={def.sortable}
|
|
88
|
+
sorted={def.sorted}
|
|
89
|
+
sorted-direction={def.sortedDirection}
|
|
90
|
+
column-width={def.columnWidth}
|
|
91
|
+
resizable={hasResizebleColumns}
|
|
92
|
+
resizestep={widthsData.resizeStep}
|
|
93
|
+
hide-header={hideTableHeader}>
|
|
94
|
+
</lightning-primitive-header-factory>
|
|
95
|
+
</template>
|
|
96
|
+
</th>
|
|
97
|
+
</template>
|
|
98
|
+
</tr>
|
|
99
|
+
</thead>
|
|
100
|
+
<tbody style={computedTbodyStyle}>
|
|
101
|
+
<template for:each={renderedRows} for:item="row" for:index="rowIndex">
|
|
102
|
+
<!-- Data Rows -->
|
|
103
|
+
<tr class={row.classnames}
|
|
104
|
+
onkeydown={handleKeydownOnDataRow}
|
|
105
|
+
key={row.key}
|
|
106
|
+
data-row-key-value={row.key}
|
|
107
|
+
aria-selected={row.ariaSelected}
|
|
108
|
+
aria-level={row.level}
|
|
109
|
+
aria-expanded={row.isExpanded}
|
|
110
|
+
aria-setsize={row.setSize}
|
|
111
|
+
aria-posinset={row.posInSet}
|
|
112
|
+
tabindex={row.tabIndex}>
|
|
113
|
+
<template for:each={row.cells} for:item="cell">
|
|
114
|
+
<template if:true={cell.isCheckbox}>
|
|
115
|
+
<!-- Checkbox Cell -->
|
|
116
|
+
<td class={cell.class}
|
|
117
|
+
role="gridcell"
|
|
118
|
+
tabindex={cell.tabIndex}
|
|
119
|
+
data-label={cell.dataLabel}
|
|
120
|
+
key={cell.colKeyValue}>
|
|
121
|
+
<lightning-primitive-cell-checkbox
|
|
122
|
+
dt-context-id={_datatableId}
|
|
123
|
+
has-focus={cell.hasFocus}
|
|
124
|
+
data-label={cell.dataLabel}
|
|
125
|
+
key={cell.key}
|
|
126
|
+
row-key-value={row.key}
|
|
127
|
+
col-key-value={cell.colKeyValue}
|
|
128
|
+
row-index={rowIndex}
|
|
129
|
+
type={row.inputType}
|
|
130
|
+
is-selected={row.isSelected}
|
|
131
|
+
is-disabled={row.isDisabled}
|
|
132
|
+
column-header-id={computedCheckboxColumnHeaderId}>
|
|
133
|
+
</lightning-primitive-cell-checkbox>
|
|
134
|
+
</td>
|
|
135
|
+
</template>
|
|
136
|
+
<template if:true={cell.isDataTypeScope}>
|
|
137
|
+
<!-- Row Header Cell -->
|
|
138
|
+
<th class={cell.class}
|
|
139
|
+
style={cell.style}
|
|
140
|
+
aria-selected={cell.ariaSelected}
|
|
141
|
+
aria-readonly={cell.ariaReadOnly}
|
|
142
|
+
scope="row"
|
|
143
|
+
tabindex={cell.tabIndex}
|
|
144
|
+
data-label={cell.dataLabel}
|
|
145
|
+
key={cell.colKeyValue}>
|
|
146
|
+
<lightning-primitive-cell-factory
|
|
147
|
+
types={privateTypes}
|
|
148
|
+
aria-selected={cell.ariaSelected}
|
|
149
|
+
data-label={cell.dataLabel}
|
|
150
|
+
alignment={cell.alignment}
|
|
151
|
+
has-error={cell.hasError}
|
|
152
|
+
has-focus={cell.hasFocus}
|
|
153
|
+
column-label={cell.dataLabel}
|
|
154
|
+
column-type={cell.columnType}
|
|
155
|
+
column-sub-type={cell.columnSubType}
|
|
156
|
+
wrap-text={cell.wrapText}
|
|
157
|
+
wrap-text-max-lines={cell.wrapTextMaxLines}
|
|
158
|
+
key={cell.columnType}
|
|
159
|
+
row-key-value={row.key}
|
|
160
|
+
col-key-value={cell.colKeyValue}
|
|
161
|
+
value={cell.value}
|
|
162
|
+
icon-name={cell.iconName}
|
|
163
|
+
icon-label={cell.iconLabel}
|
|
164
|
+
icon-position={cell.iconPosition}
|
|
165
|
+
icon-alternative-text={cell.iconAlternativeText}
|
|
166
|
+
editable={cell.editable}
|
|
167
|
+
display-read-only-icon={cell.displayReadOnlyIcon}
|
|
168
|
+
type-attribute-0={cell.typeAttribute0}
|
|
169
|
+
type-attribute-1={cell.typeAttribute1}
|
|
170
|
+
type-attribute-2={cell.typeAttribute2}
|
|
171
|
+
type-attribute-3={cell.typeAttribute3}
|
|
172
|
+
type-attribute-4={cell.typeAttribute4}
|
|
173
|
+
type-attribute-5={cell.typeAttribute5}
|
|
174
|
+
type-attribute-6={cell.typeAttribute6}
|
|
175
|
+
type-attribute-7={cell.typeAttribute7}
|
|
176
|
+
type-attribute-8={cell.typeAttribute8}
|
|
177
|
+
type-attribute-9={cell.typeAttribute9}
|
|
178
|
+
type-attribute-10={cell.typeAttribute10}
|
|
179
|
+
type-attribute-21={cell.typeAttribute21}
|
|
180
|
+
type-attribute-22={cell.typeAttribute22}>
|
|
181
|
+
</lightning-primitive-cell-factory>
|
|
182
|
+
</th>
|
|
183
|
+
</template>
|
|
184
|
+
<template if:true={cell.isDataType}>
|
|
185
|
+
<!-- Non-Header Cells (Regular Data Cells) -->
|
|
186
|
+
<td class={cell.class}
|
|
187
|
+
role="gridcell"
|
|
188
|
+
style={cell.style}
|
|
189
|
+
aria-selected={cell.ariaSelected}
|
|
190
|
+
aria-readonly={cell.ariaReadOnly}
|
|
191
|
+
tabindex={cell.tabIndex}
|
|
192
|
+
data-label={cell.dataLabel}
|
|
193
|
+
key={cell.colKeyValue}>
|
|
194
|
+
<lightning-primitive-cell-factory
|
|
195
|
+
types={privateTypes}
|
|
196
|
+
aria-selected={cell.ariaSelected}
|
|
197
|
+
data-label={cell.dataLabel}
|
|
198
|
+
alignment={cell.alignment}
|
|
199
|
+
has-error={cell.hasError}
|
|
200
|
+
has-focus={cell.hasFocus}
|
|
201
|
+
column-label={cell.dataLabel}
|
|
202
|
+
column-type={cell.columnType}
|
|
203
|
+
column-sub-type={cell.columnSubType}
|
|
204
|
+
wrap-text={cell.wrapText}
|
|
205
|
+
wrap-text-max-lines={cell.wrapTextMaxLines}
|
|
206
|
+
key={cell.columnType}
|
|
207
|
+
row-key-value={row.key}
|
|
208
|
+
col-key-value={cell.colKeyValue}
|
|
209
|
+
value={cell.value}
|
|
210
|
+
icon-name={cell.iconName}
|
|
211
|
+
icon-label={cell.iconLabel}
|
|
212
|
+
icon-position={cell.iconPosition}
|
|
213
|
+
icon-alternative-text={cell.iconAlternativeText}
|
|
214
|
+
editable={cell.editable}
|
|
215
|
+
display-read-only-icon={cell.displayReadOnlyIcon}
|
|
216
|
+
type-attribute-0={cell.typeAttribute0}
|
|
217
|
+
type-attribute-1={cell.typeAttribute1}
|
|
218
|
+
type-attribute-2={cell.typeAttribute2}
|
|
219
|
+
type-attribute-3={cell.typeAttribute3}
|
|
220
|
+
type-attribute-4={cell.typeAttribute4}
|
|
221
|
+
type-attribute-5={cell.typeAttribute5}
|
|
222
|
+
type-attribute-6={cell.typeAttribute6}
|
|
223
|
+
type-attribute-7={cell.typeAttribute7}
|
|
224
|
+
type-attribute-8={cell.typeAttribute8}
|
|
225
|
+
type-attribute-9={cell.typeAttribute9}
|
|
226
|
+
type-attribute-10={cell.typeAttribute10}
|
|
227
|
+
type-attribute-21={cell.typeAttribute21}
|
|
228
|
+
type-attribute-22={cell.typeAttribute22}>
|
|
229
|
+
</lightning-primitive-cell-factory>
|
|
230
|
+
</td>
|
|
231
|
+
</template>
|
|
232
|
+
</template>
|
|
233
|
+
</tr>
|
|
234
|
+
</template>
|
|
235
|
+
<!-- Loading Indicator -->
|
|
236
|
+
<template if:true={isLoading}>
|
|
237
|
+
<tr>
|
|
238
|
+
<td colspan={numberOfColumns} class="slds-is-relative">
|
|
239
|
+
<lightning-primitive-datatable-loading-indicator></lightning-primitive-datatable-loading-indicator>
|
|
240
|
+
</td>
|
|
241
|
+
</tr>
|
|
242
|
+
</template>
|
|
243
|
+
</tbody>
|
|
244
|
+
</template>
|
|
245
|
+
</table>
|
|
246
|
+
</div>
|
|
247
|
+
</div>
|
|
248
|
+
<!-- Status Bar:
|
|
249
|
+
Displays a bar at the bottom with Save and Cancel buttons
|
|
250
|
+
when inline edit is complete. Also shows errors if present.
|
|
251
|
+
-->
|
|
252
|
+
<template if:true={showStatusBar}>
|
|
253
|
+
<lightning-primitive-datatable-status-bar
|
|
254
|
+
error={tableError}
|
|
255
|
+
onprivatesave={handleInlineEditSave}
|
|
256
|
+
onprivatecancel={handleInlineEditCancel}
|
|
257
|
+
></lightning-primitive-datatable-status-bar>
|
|
258
|
+
</template>
|
|
259
|
+
</div>
|
|
260
|
+
</template>
|
|
@@ -44,6 +44,6 @@ export function getColumnWidthFromDef(column) {
|
|
|
44
44
|
return column.fixedWidth || resizedWidth || column.initialWidth;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
export function
|
|
47
|
+
export function buildCSSWidthStyle(pixels) {
|
|
48
48
|
return pixels > 0 ? `width:${pixels}px` : '';
|
|
49
49
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="slds-dropdown-trigger slds-dropdown-trigger_click slds-size_1-of-1">
|
|
2
|
+
<div class="slds-dropdown-trigger slds-dropdown-trigger_click slds-size_1-of-1" role="group">
|
|
3
3
|
<template if:false={hasExternalLabel}>
|
|
4
4
|
<label class={computedLabelClass} for="input">
|
|
5
5
|
<template if:true={required}>
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
onfocusin={onFocusIn}
|
|
37
37
|
onfocusout={onFocusOut}
|
|
38
38
|
disabled={computedIconDisabledState}
|
|
39
|
-
title={
|
|
40
|
-
alternative-text={
|
|
39
|
+
title={computedSelectDateLabel}
|
|
40
|
+
alternative-text={computedSelectDateLabel}>
|
|
41
41
|
</lightning-button-icon>
|
|
42
42
|
<template if:true={isCalendarVisible}>
|
|
43
43
|
<lightning-calendar
|
|
@@ -5,7 +5,7 @@ import labelMinRangeMessage from '@salesforce/label/LightningDateTimePicker.minR
|
|
|
5
5
|
import labelMaxRangeMessage from '@salesforce/label/LightningDateTimePicker.maxRangeMessage';
|
|
6
6
|
import labelMinAndMaxRangeMessage from '@salesforce/label/LightningDateTimePicker.minAndMaxRangeMessage';
|
|
7
7
|
import labelRequired from '@salesforce/label/LightningControl.required';
|
|
8
|
-
import
|
|
8
|
+
import labelSelectDateFor from '@salesforce/label/LightningDateTimePicker.selectDateFor';
|
|
9
9
|
import shortDateFormat from '@salesforce/i18n/dateTime.shortDateFormat';
|
|
10
10
|
import mediumDateFormat from '@salesforce/i18n/dateTime.mediumDateFormat';
|
|
11
11
|
import longDateFormat from '@salesforce/i18n/dateTime.longDateFormat';
|
|
@@ -48,7 +48,7 @@ const i18n = {
|
|
|
48
48
|
maxRangeMessage: labelMaxRangeMessage,
|
|
49
49
|
minAndMaxRangeMessage: labelMinAndMaxRangeMessage,
|
|
50
50
|
required: labelRequired,
|
|
51
|
-
|
|
51
|
+
selectDateFor: labelSelectDateFor,
|
|
52
52
|
};
|
|
53
53
|
|
|
54
54
|
const ARIA_CONTROLS = 'aria-controls';
|
|
@@ -430,6 +430,10 @@ export default class LightningDatePicker extends LightningElement {
|
|
|
430
430
|
return '';
|
|
431
431
|
}
|
|
432
432
|
|
|
433
|
+
get computedSelectDateLabel() {
|
|
434
|
+
return formatLabel(this.i18n.selectDateFor, this.label);
|
|
435
|
+
}
|
|
436
|
+
|
|
433
437
|
get rangeMessage() {
|
|
434
438
|
if (this.min && !this.max) {
|
|
435
439
|
// If only min is set
|