lightning-base-components 1.21.6-alpha → 1.21.7-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 +45 -4
- package/package.json +125 -3
- package/scopedImports/@salesforce-label-LightningColorPicker.a11yDefaultText.js +1 -0
- package/scopedImports/@salesforce-label-LightningDatatable.multiColumnSortingToast.js +1 -0
- package/scopedImports/@salesforce-label-LightningDatatable.sortingMenuColumns.js +1 -0
- package/scopedImports/@salesforce-label-LightningDatatable.sortingMenuMultiColumnSort.js +1 -0
- package/scopedImports/@salesforce-label-LightningDatatable.sortingMenuRows.js +1 -0
- package/scopedImports/@salesforce-label-LightningDatatable.sortingMenuTooltip.js +1 -0
- package/scopedImports/@salesforce-label-LightningForm.dependentFieldsListHeading.js +1 -1
- package/scopedImports/@salesforce-label-LightningLookup.advancedSearchMobile.js +1 -1
- package/scopedImports/@salesforce-label-LightningLookup.modalTitle.js +1 -0
- package/scopedImports/@salesforce-label-LightningMultiColumnSortingModal.addRule.js +1 -0
- package/scopedImports/@salesforce-label-LightningMultiColumnSortingModal.applyButton.js +1 -0
- package/scopedImports/@salesforce-label-LightningMultiColumnSortingModal.cancelButton.js +1 -0
- package/scopedImports/@salesforce-label-LightningMultiColumnSortingModal.clearButton.js +1 -0
- package/scopedImports/@salesforce-label-LightningMultiColumnSortingModal.duplicateValueValidation.js +1 -0
- package/scopedImports/@salesforce-label-LightningMultiColumnSortingModal.firstRuleHeading.js +1 -0
- package/scopedImports/@salesforce-label-LightningMultiColumnSortingModal.modalTitle.js +1 -0
- package/scopedImports/@salesforce-label-LightningMultiColumnSortingModal.otherRuleHeading.js +1 -0
- package/scopedImports/@salesforce-label-LightningMultiColumnSortingModal.ruleLimit.js +1 -0
- package/scopedImports/@salesforce-label-LightningMultiColumnSortingModal.ruleLimitReached.js +1 -0
- package/scopedImports/@salesforce-label-LightningPrimitiveColumnSorter.ascending.js +1 -0
- package/scopedImports/@salesforce-label-LightningPrimitiveColumnSorter.descending.js +1 -0
- package/scopedImports/@salesforce-label-LightningPrimitiveColumnSorter.dropdownPlaceholder.js +1 -0
- package/scopedImports/@salesforce-label-LightningPrimitiveColumnSorter.missingValueValidation.js +1 -0
- package/scopedImports/@salesforce-label-LightningPrimitiveColumnSorter.moveDownTooltip.js +1 -0
- package/scopedImports/@salesforce-label-LightningPrimitiveColumnSorter.moveUpTooltip.js +1 -0
- package/scopedImports/@salesforce-label-LightningProgressIndicator.pathCurrentStage.js +1 -0
- package/scopedImports/@salesforce-label-LightningRecordPicker.emptyStateNoResultText.js +1 -0
- package/scopedImports/@salesforce-label-LightningRecordPicker.messageWhenSearchTermTooShort.js +1 -0
- package/scopedImports/@salesforce-label-LightningRecordPicker.resultCountDescriptionForMoreThanOneHundredRecords.js +1 -0
- package/scopedImports/@salesforce-label-LightningRecordPicker.resultCountDescriptionForMultipleRecords.js +1 -0
- package/scopedImports/@salesforce-label-LightningRecordPicker.resultCountDescriptionForOneRecord.js +1 -0
- package/scopedImports/@salesforce-label-LightningRecordPicker.resultsLoading.js +1 -0
- package/scopedImports/@salesforce-label-LightningRecordPicker.searchInputHelp.js +1 -0
- package/src/lightning/accordion/accordion.js +21 -14
- package/src/lightning/accordionSection/button.slds.css +16 -15
- package/src/lightning/alert/alert.js +10 -8
- package/src/lightning/ariaObserver/ariaObserver.js +19 -5
- package/src/lightning/baseCombobox/base-combobox.slds.css +1 -1
- package/src/lightning/baseCombobox/baseCombobox.html +2 -1
- package/src/lightning/baseCombobox/baseCombobox.js +21 -0
- package/src/lightning/baseCombobox/input-text.slds.css +5 -5
- package/src/lightning/button/button.js +5 -0
- package/src/lightning/button/button.slds.css +16 -15
- package/src/lightning/buttonIcon/__docs__/buttonIcon.md +4 -0
- package/src/lightning/buttonIcon/__examples__/basic/basic.html +17 -1
- package/src/lightning/buttonIcon/button-icon.slds.css +41 -25
- package/src/lightning/buttonIconStateful/button-icon-stateful.slds.css +33 -229
- package/src/lightning/buttonIconStateful/button-icon.slds.css +41 -25
- package/src/lightning/buttonIconStateful/button.slds.css +16 -15
- package/src/lightning/buttonMenu/button-icon.slds.css +41 -25
- package/src/lightning/buttonMenu/button-menu.slds.css +41 -15
- package/src/lightning/buttonMenu/button.slds.css +16 -15
- package/src/lightning/buttonMenu/buttonMenu.css +1 -1
- package/src/lightning/buttonMenu/buttonMenu.html +1 -1
- package/src/lightning/buttonMenu/buttonMenu.js +44 -4
- package/src/lightning/buttonStateful/button-stateful.slds.css +1 -4
- package/src/lightning/buttonStateful/button.slds.css +16 -15
- package/src/lightning/calendar/calendar.html +3 -4
- package/src/lightning/card/card.html +1 -1
- package/src/lightning/colorPickerCustom/colorPickerCustom.html +1 -1
- package/src/lightning/colorPickerCustom/colorPickerCustom.js +0 -9
- package/src/lightning/colorPickerCustom/input-text.slds.css +5 -5
- package/src/lightning/combobox/form-element.slds.css +1 -0
- package/src/lightning/confirm/confirm.js +10 -8
- package/src/lightning/datatable/__docs__/datatable.md +0 -3
- package/src/lightning/datatable/__examples__disabled/customComponentPopupTableWrapper/README.md +17 -0
- package/src/lightning/datatable/__examples__disabled/customComponentPopupTableWrapper/customComponentPopupTableWrapper.html +11 -0
- package/src/lightning/datatable/__examples__disabled/customComponentPopupTableWrapper/customComponentPopupTableWrapper.js +25 -0
- package/src/lightning/datatable/__examples__disabled/customComponentPopupTableWrapper/generateData.js +15 -0
- package/src/lightning/datatable/__examples__disabled/myCustomTypePopupTable/customInput.html +4 -0
- package/src/lightning/datatable/__examples__disabled/myCustomTypePopupTable/myCustomTypePopupTable.js +17 -0
- package/src/lightning/datatable/__examples__disabled/myCustomTypePopupTable/nestedSimpleComponentParent.html +7 -0
- package/src/lightning/datatable/__examples__disabled/simpleComponentPopupNested/simpleComponentPopupNested.html +31 -0
- package/src/lightning/datatable/__examples__disabled/simpleComponentPopupNested/simpleComponentPopupNested.js +36 -0
- package/src/lightning/datatable/columnWidthManager.js +19 -16
- package/src/lightning/datatable/columns.js +74 -25
- package/src/lightning/datatable/datatable.js +493 -133
- package/src/lightning/datatable/errors.js +1 -1
- package/src/lightning/datatable/indexes.js +32 -19
- package/src/lightning/datatable/infiniteLoading.js +6 -5
- package/src/lightning/datatable/inlineEdit.js +45 -59
- package/src/lightning/datatable/keyboard.js +571 -160
- package/src/lightning/datatable/renderManager.js +12 -9
- package/src/lightning/datatable/rowLevelActions.js +5 -14
- package/src/lightning/datatable/rowSelection.js +36 -17
- package/src/lightning/datatable/rowSelectionShared.js +1 -0
- package/src/lightning/datatable/rows.js +132 -24
- package/src/lightning/datatable/rowsInlining.js +473 -0
- package/src/lightning/datatable/sort.js +8 -4
- package/src/lightning/datatable/state.js +12 -4
- package/src/lightning/datatable/templates/div/div.html +807 -91
- package/src/lightning/datatable/templates/div/div.lbc.synthetic.css +29 -3
- package/src/lightning/datatable/templates/table/table.css +29 -1
- package/src/lightning/datatable/templates/table/table.html +786 -87
- package/src/lightning/datatable/utils.js +39 -0
- package/src/lightning/datatable/virtualization.js +44 -19
- package/src/lightning/datatable/wrapText.js +7 -10
- package/src/lightning/datepicker/datepicker.html +3 -1
- package/src/lightning/datepicker/datepicker.js +31 -1
- package/src/lightning/datepicker/form-element.slds.css +1 -0
- package/src/lightning/datepicker/input-text.slds.css +5 -5
- package/src/lightning/datetimepicker/datetimepicker.html +7 -1
- package/src/lightning/datetimepicker/datetimepicker.js +30 -2
- package/src/lightning/datetimepicker/form-element.slds.css +1 -0
- package/src/lightning/datetimepicker/input-text.slds.css +5 -5
- package/src/lightning/dualListbox/form-element.slds.css +1 -0
- package/src/lightning/focusTrap/focusTrap.css +7 -0
- package/src/lightning/groupedCombobox/form-element.slds.css +1 -0
- package/src/lightning/groupedCombobox/input-text.slds.css +5 -5
- package/src/lightning/helptext/button-icon.slds.css +41 -25
- package/src/lightning/helptext/form-element.slds.css +1 -0
- package/src/lightning/icon/__docs__/icon.md +0 -2
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/account_score.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/aggregate.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/app_form_participant.html +11 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/app_form_product_participant.html +12 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/cost_model.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/labels.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/list_fee.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/list_rate.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/party_profile.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/path_experiment.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/people_score.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/price_adjustment_schedule.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/price_adjustment_tier.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/program_cohort.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/program_cohort_member.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/rate_adjustment.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/record_consent.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/whatsapp.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/templates.js +40 -1
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/aggregate.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/array.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/bottom_group_alignment.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/cant_sync.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/center_group_alignment.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/columns.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/fully_synced.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/inner_join.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/join.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/left_join.html +14 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/macros.html +2 -2
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/not_in_sync.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/not_saved.html +9 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/outer_join.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/path_experiment.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/program_cohort.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/program_cohort_member.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/record_consent.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/right_join.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/skill.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/sync_in_progress.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/top_group_alignment.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/account_score.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/aggregate.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/app_form_participant.html +11 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/app_form_product_participant.html +12 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/cost_model.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/labels.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/list_fee.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/list_rate.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/party_profile.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/path_experiment.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/people_score.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/price_adjustment_schedule.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/price_adjustment_tier.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/program_cohort.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/program_cohort_member.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/rate_adjustment.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/record_consent.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/whatsapp.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/templates.js +40 -1
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/aggregate.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/array.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/bottom_group_alignment.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/cant_sync.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/center_group_alignment.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/columns.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/fully_synced.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/inner_join.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/join.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/left_join.html +14 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/macros.html +2 -2
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/not_in_sync.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/not_saved.html +9 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/outer_join.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/path_experiment.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/program_cohort.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/program_cohort_member.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/record_consent.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/right_join.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/skill.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/sync_in_progress.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/top_group_alignment.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/account_score.html +8 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/aggregate.html +8 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/app_form_participant.html +11 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/app_form_product_participant.html +12 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/cost_model.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/labels.html +8 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/list_fee.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/list_rate.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/party_profile.html +8 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/path_experiment.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/people_score.html +8 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/price_adjustment_schedule.html +8 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/price_adjustment_tier.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/program_cohort.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/program_cohort_member.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/rate_adjustment.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/record_consent.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/whatsapp.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/templates.js +19 -1
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/account_score.html +8 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/aggregate.html +8 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/app_form_participant.html +11 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/app_form_product_participant.html +12 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/cost_model.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/labels.html +8 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/list_fee.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/list_rate.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/party_profile.html +8 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/path_experiment.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/people_score.html +8 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/price_adjustment_schedule.html +8 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/price_adjustment_tier.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/program_cohort.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/program_cohort_member.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/rate_adjustment.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/record_consent.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/whatsapp.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/templates.js +19 -1
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/templates.js +22 -1
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/aggregate.html +8 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/array.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/bottom_group_alignment.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/cant_sync.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/center_group_alignment.html +8 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/columns.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/fully_synced.html +8 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/inner_join.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/join.html +8 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/left_join.html +14 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/macros.html +2 -2
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/not_in_sync.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/not_saved.html +9 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/outer_join.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/path_experiment.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/program_cohort.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/program_cohort_member.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/record_consent.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/right_join.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/skill.html +8 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/sync_in_progress.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/top_group_alignment.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/templates.js +22 -1
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/aggregate.html +8 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/array.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/bottom_group_alignment.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/cant_sync.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/center_group_alignment.html +8 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/columns.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/fully_synced.html +8 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/inner_join.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/join.html +8 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/left_join.html +14 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/macros.html +2 -2
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/not_in_sync.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/not_saved.html +9 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/outer_join.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/path_experiment.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/program_cohort.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/program_cohort_member.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/record_consent.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/right_join.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/skill.html +8 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/sync_in_progress.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/top_group_alignment.html +7 -0
- package/src/lightning/iconUtils/iconColors.js +1 -1
- package/src/lightning/input/form-element.slds.css +1 -0
- package/src/lightning/input/input.html +16 -2
- package/src/lightning/input/input.js +91 -3
- package/src/lightning/input/input.js-meta.xml +3 -0
- package/src/lightning/inputAddress/addressFormat.js +25 -11
- package/src/lightning/inputAddress/fieldsLayout.js +3 -0
- package/src/lightning/inputAddress/form-element.slds.css +1 -0
- package/src/lightning/inputAddress/input-text.slds.css +5 -5
- package/src/lightning/inputAddress/inputAddress.html +1 -1
- package/src/lightning/inputAddress/inputAddress.js +27 -11
- package/src/lightning/inputLocation/form-element.slds.css +1 -0
- package/src/lightning/inputLocation/input-text.slds.css +5 -5
- package/src/lightning/inputName/form-element.slds.css +1 -0
- package/src/lightning/inputName/input-text.slds.css +5 -5
- package/src/lightning/internationalizationLibrary/address/AddressFormat.js +2 -0
- package/src/lightning/layout/__docs__/layout.md +0 -2
- package/src/lightning/lookupAddress/form-element.slds.css +1 -0
- package/src/lightning/menuItem/menu-item.slds.css +3 -1
- package/src/lightning/modal/__modalUtils__/modalContainerTestConstants.js +7 -3
- package/src/lightning/modal/__modalUtils__/modalContainerTestMethods.js +18 -11
- package/src/lightning/modal/__modalUtils__/modalContainerTestMockData.js +1 -1
- package/src/lightning/modalBase/modalBase.css +4 -0
- package/src/lightning/modalBase/modalBase.html +16 -21
- package/src/lightning/modalBase/modalBase.js +46 -65
- package/src/lightning/modalHeader/modalHeader.html +3 -15
- package/src/lightning/modalHeader/modalHeader.js +14 -61
- package/src/lightning/multiColumnSortingModal/multiColumnSortingModal.css +14 -0
- package/src/lightning/multiColumnSortingModal/multiColumnSortingModal.html +55 -0
- package/src/lightning/multiColumnSortingModal/multiColumnSortingModal.js +430 -0
- package/src/lightning/multiColumnSortingModal/multiColumnSortingModal.js-meta.xml +4 -0
- package/src/lightning/overlayManager/overlayManager.js +16 -0
- package/src/lightning/pill/pill.js +19 -13
- package/src/lightning/pillContainer/button.slds.css +16 -15
- package/src/lightning/pillContainer/pillContainer.js +2 -1
- package/src/lightning/pillContainer/standardPillContainer.html +6 -2
- package/src/lightning/positionLibrary/direction.js +19 -0
- package/src/lightning/primitiveBubble/primitiveBubble.js +7 -0
- package/src/lightning/primitiveColorpickerButton/primitiveColorpickerButton.html +2 -2
- package/src/lightning/primitiveColorpickerButton/primitiveColorpickerButton.js +8 -0
- package/src/lightning/primitiveColumnSorter/primitiveColumnSorter.css +34 -0
- package/src/lightning/primitiveColumnSorter/primitiveColumnSorter.html +60 -0
- package/src/lightning/primitiveColumnSorter/primitiveColumnSorter.js +107 -0
- package/src/lightning/primitiveHeaderFactory/primitiveHeaderFactory.js +36 -3
- package/src/lightning/primitiveHeaderFactory/sortingMenuHeader.css +5 -0
- package/src/lightning/primitiveHeaderFactory/sortingMenuHeader.html +9 -0
- package/src/lightning/primitiveInputCheckbox/form-element.slds.css +1 -0
- package/src/lightning/primitiveInputCheckbox/input-checkbox.slds.css +3 -3
- package/src/lightning/primitiveInputCheckbox/primitiveInputCheckbox.html +1 -1
- package/src/lightning/primitiveInputCheckboxButton/form-element.slds.css +1 -0
- package/src/lightning/primitiveInputCheckboxButton/input-checkbox-button.slds.css +6 -5
- package/src/lightning/primitiveInputCheckboxButton/primitiveInputCheckboxButton.html +1 -1
- package/src/lightning/primitiveInputColor/form-element.slds.css +1 -0
- package/src/lightning/primitiveInputColor/input-text.slds.css +5 -5
- package/src/lightning/primitiveInputColor/primitiveInputColor.html +5 -2
- package/src/lightning/primitiveInputColor/primitiveInputColor.js +2 -0
- package/src/lightning/primitiveInputFile/button.slds.css +16 -15
- package/src/lightning/primitiveInputFile/form-element.slds.css +1 -0
- package/src/lightning/primitiveInputFile/primitiveInputFile.html +1 -1
- package/src/lightning/primitiveInputRadio/primitiveInputRadio.html +1 -1
- package/src/lightning/primitiveInputSimple/form-element.slds.css +1 -0
- package/src/lightning/primitiveInputSimple/input-text.slds.css +5 -5
- package/src/lightning/primitiveInputSimple/primitiveInputSimple.html +3 -2
- package/src/lightning/primitiveInputSimple/primitiveInputSimple.js +15 -0
- package/src/lightning/primitiveInputToggle/form-element.slds.css +1 -0
- package/src/lightning/primitiveInputToggle/input-toggle.slds.css +16 -14
- package/src/lightning/primitiveInputToggle/primitiveInputToggle.html +1 -1
- package/src/lightning/progressIndicator/path.html +8 -2
- package/src/lightning/progressIndicator/progressIndicator.js +26 -2
- package/src/lightning/progressRing/progress-ring.slds.css +1 -1
- package/src/lightning/progressStep/progressStep.js +2 -1
- package/src/lightning/prompt/prompt.js +11 -9
- package/src/lightning/radioGroup/form-element.slds.css +1 -0
- package/src/lightning/radioGroup/input-radio-group.slds.css +4 -10
- package/src/lightning/select/form-element.slds.css +1 -0
- package/src/lightning/select/select.js +89 -7
- package/src/lightning/tabBar/tab-bar.slds.css +11 -0
- package/src/lightning/tabset/tabset.slds.css +1 -1
- package/src/lightning/textarea/form-element.slds.css +1 -0
- package/src/lightning/textarea/textarea.html +1 -0
- package/src/lightning/textarea/textarea.slds.css +2 -2
- package/src/lightning/timepicker/form-element.slds.css +1 -0
- package/src/lightning/timepicker/timepicker.html +4 -1
- package/src/lightning/timepicker/timepicker.js +3 -0
- package/src/lightning/toast/button-icon.slds.css +41 -25
- package/src/lightning/tooltipLibrary/tooltipLibrary.js +4 -15
- package/src/lightning/verticalNavigationOverflow/button.slds.css +16 -15
- package/scopedImports/@salesforce-label-LightningLookup.messageWhenSearchTermTooShort.js +0 -1
|
@@ -159,23 +159,28 @@ export class RenderManager {
|
|
|
159
159
|
const firstVisibleKey =
|
|
160
160
|
rows[firstVisibleIndex] && rows[firstVisibleIndex].key;
|
|
161
161
|
|
|
162
|
+
// if using variable heights, see if we can get more
|
|
163
|
+
// accurate estimate based on known row heights
|
|
162
164
|
if (!fixedHeight && heightCache[firstVisibleKey]) {
|
|
163
165
|
let i = firstVisibleIndex;
|
|
164
166
|
let currentHeight = 0;
|
|
165
|
-
|
|
167
|
+
let knownRowHeight = rows[i] && heightCache[rows[i].key];
|
|
166
168
|
// loop through rows until we find last row based on wrapper height
|
|
167
169
|
while (knownRowHeight && currentHeight < this.wrapperHeight) {
|
|
168
170
|
currentHeight += knownRowHeight;
|
|
169
171
|
i = i + 1;
|
|
172
|
+
knownRowHeight = rows[i] && heightCache[rows[i].key];
|
|
170
173
|
}
|
|
171
174
|
if (currentHeight >= this.wrapperHeight) {
|
|
172
|
-
// row heights were measured; i
|
|
173
|
-
lastIndex = i + bufferSize
|
|
175
|
+
// all row heights were measured; i is first non-visible index
|
|
176
|
+
lastIndex = i + bufferSize;
|
|
174
177
|
} else {
|
|
175
|
-
// row heights not yet measured
|
|
178
|
+
// at least some row heights not yet measured
|
|
179
|
+
// i is first visible index with unknown height
|
|
176
180
|
// guess lastIndex based on default row height
|
|
177
|
-
const extraRowEstimate =
|
|
178
|
-
(this.wrapperHeight - currentHeight) / rowHeight
|
|
181
|
+
const extraRowEstimate = Math.ceil(
|
|
182
|
+
(this.wrapperHeight - currentHeight) / rowHeight
|
|
183
|
+
);
|
|
179
184
|
lastIndex = i + extraRowEstimate + bufferSize;
|
|
180
185
|
}
|
|
181
186
|
}
|
|
@@ -186,7 +191,7 @@ export class RenderManager {
|
|
|
186
191
|
renderedRowCount === rows.length &&
|
|
187
192
|
lastIndex <= rows.length - bufferSize
|
|
188
193
|
) {
|
|
189
|
-
lastIndex = renderedRowCount
|
|
194
|
+
lastIndex = renderedRowCount;
|
|
190
195
|
}
|
|
191
196
|
return { firstIndex, lastIndex };
|
|
192
197
|
}
|
|
@@ -302,8 +307,6 @@ export class RenderManager {
|
|
|
302
307
|
* Used to determine how many additional rows to render
|
|
303
308
|
*/
|
|
304
309
|
getRowCountWithBuffer(state) {
|
|
305
|
-
// buffer is before and after with virtualization
|
|
306
|
-
// but only after with viewport rendering
|
|
307
310
|
const multiplier = state.virtualize ? 2 : 1;
|
|
308
311
|
return (
|
|
309
312
|
this.getRowCountInViewport(state) + state.bufferSize * multiplier
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { unwrap } from 'lwc';
|
|
2
|
-
import {
|
|
2
|
+
import { getUserRowByKey } from './indexes';
|
|
3
3
|
import { getUserColumnIndex } from './columns';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -10,12 +10,8 @@ import { getUserColumnIndex } from './columns';
|
|
|
10
10
|
export function handleRowActionTriggered(event) {
|
|
11
11
|
event.stopPropagation();
|
|
12
12
|
|
|
13
|
-
const { action,
|
|
14
|
-
const selectedRow =
|
|
15
|
-
this.state,
|
|
16
|
-
rowKeyValue,
|
|
17
|
-
colKeyValue
|
|
18
|
-
);
|
|
13
|
+
const { action, rowKeyValue } = event.detail;
|
|
14
|
+
const selectedRow = getUserRowByKey(this.state, rowKeyValue);
|
|
19
15
|
|
|
20
16
|
this.dispatchEvent(
|
|
21
17
|
new CustomEvent('rowaction', {
|
|
@@ -37,16 +33,11 @@ export function handleLoadDynamicActions(event) {
|
|
|
37
33
|
|
|
38
34
|
const {
|
|
39
35
|
actionsProviderFunction,
|
|
40
|
-
colKeyValue,
|
|
41
36
|
doneCallback,
|
|
42
37
|
rowKeyValue,
|
|
43
38
|
saveContainerPosition,
|
|
44
39
|
} = event.detail;
|
|
45
|
-
const selectedRow =
|
|
46
|
-
this.state,
|
|
47
|
-
rowKeyValue,
|
|
48
|
-
colKeyValue
|
|
49
|
-
);
|
|
40
|
+
const selectedRow = getUserRowByKey(this.state, rowKeyValue);
|
|
50
41
|
|
|
51
42
|
saveContainerPosition(this.getViewableRect());
|
|
52
43
|
actionsProviderFunction(unwrap(selectedRow), doneCallback);
|
|
@@ -62,7 +53,7 @@ export function handleCellButtonClick(event) {
|
|
|
62
53
|
|
|
63
54
|
const { state } = this;
|
|
64
55
|
const { colKeyValue, rowKeyValue } = event.detail;
|
|
65
|
-
const selectedRow =
|
|
56
|
+
const selectedRow = getUserRowByKey(state, rowKeyValue);
|
|
66
57
|
const colIndex = getUserColumnIndex(state, colKeyValue);
|
|
67
58
|
const col = this._rawColumns[colIndex];
|
|
68
59
|
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
getCellByKeys,
|
|
3
|
+
getRowByKey,
|
|
4
|
+
getRowIndexByKey,
|
|
5
|
+
HEADER_ROW_KEY,
|
|
6
|
+
} from './indexes';
|
|
3
7
|
import { isNonNegativeInteger } from './utils';
|
|
4
8
|
import {
|
|
5
9
|
getCurrentSelectionLength,
|
|
@@ -7,6 +11,7 @@ import {
|
|
|
7
11
|
isDisabledRow,
|
|
8
12
|
SELECTABLE_HEADER_TYPE,
|
|
9
13
|
} from './rowSelectionShared';
|
|
14
|
+
import { setInliningProperties } from './rowsInlining';
|
|
10
15
|
|
|
11
16
|
const MAX_ROW_SELECTION_DEFAULT = undefined;
|
|
12
17
|
|
|
@@ -494,7 +499,7 @@ function getLastRowSelection(state) {
|
|
|
494
499
|
const { lastSelectedRowKey } = state;
|
|
495
500
|
const keyIsValid =
|
|
496
501
|
lastSelectedRowKey !== undefined &&
|
|
497
|
-
|
|
502
|
+
getRowByKey(state, lastSelectedRowKey) !== undefined;
|
|
498
503
|
|
|
499
504
|
return keyIsValid ? lastSelectedRowKey : undefined;
|
|
500
505
|
}
|
|
@@ -532,15 +537,33 @@ export function inputTypeNeedsToChange(
|
|
|
532
537
|
);
|
|
533
538
|
}
|
|
534
539
|
|
|
535
|
-
export function updateRowSelectionInputType(state) {
|
|
536
|
-
const
|
|
540
|
+
export function updateRowSelectionInputType(state, datatableId) {
|
|
541
|
+
const isInputTypeCheckbox = state.maxRowSelection !== 1;
|
|
542
|
+
const type = isInputTypeCheckbox ? 'checkbox' : 'radio';
|
|
537
543
|
const { rows } = state;
|
|
538
544
|
|
|
545
|
+
// Determine if inlining props need resetting
|
|
546
|
+
// And which column to reset if so
|
|
547
|
+
let resetInliningProps = false;
|
|
548
|
+
let checkboxColIndex;
|
|
549
|
+
if (state.renderModeInline && !state.hideCheckboxColumn) {
|
|
550
|
+
resetInliningProps = true;
|
|
551
|
+
checkboxColIndex = state.showRowNumberColumn ? 1 : 0;
|
|
552
|
+
}
|
|
553
|
+
|
|
539
554
|
for (let i = 0, { length: rowCount } = rows; i < rowCount; i += 1) {
|
|
540
555
|
// Tracked state changes.
|
|
541
556
|
const row = rows[i];
|
|
542
557
|
row.inputType = type;
|
|
543
558
|
row.isDisabled = isDisabledRow(state, row.key);
|
|
559
|
+
if (resetInliningProps) {
|
|
560
|
+
setInliningProperties(
|
|
561
|
+
state,
|
|
562
|
+
row.cells[checkboxColIndex],
|
|
563
|
+
isInputTypeCheckbox,
|
|
564
|
+
datatableId
|
|
565
|
+
);
|
|
566
|
+
}
|
|
544
567
|
}
|
|
545
568
|
}
|
|
546
569
|
|
|
@@ -557,7 +580,7 @@ export function updateRowSelectionInputType(state) {
|
|
|
557
580
|
* @param {Object} state - The datatable state
|
|
558
581
|
* @param {Number | String} - value to set for maxRowSelection
|
|
559
582
|
*/
|
|
560
|
-
export function setMaxRowSelection(state, value) {
|
|
583
|
+
export function setMaxRowSelection(state, value, datatableId) {
|
|
561
584
|
const previousSelectedRowsKeys = getSelectedRowsKeys(state);
|
|
562
585
|
// Tracked state changes.
|
|
563
586
|
markAllRowsDeselected(state);
|
|
@@ -579,7 +602,7 @@ export function setMaxRowSelection(state, value) {
|
|
|
579
602
|
inputTypeNeedsToChange(previousMaxRowSelection, newMaxRowSelection)
|
|
580
603
|
) {
|
|
581
604
|
// Tracked state changes.
|
|
582
|
-
updateRowSelectionInputType(state);
|
|
605
|
+
updateRowSelectionInputType(state, datatableId);
|
|
583
606
|
updateBulkSelectionState(state);
|
|
584
607
|
}
|
|
585
608
|
} else {
|
|
@@ -662,11 +685,9 @@ function getRowIntervalIndexes(state, startRowKey, endRowKey) {
|
|
|
662
685
|
* @param {String} colKeyValue - The column key of the cell to mark selected
|
|
663
686
|
*/
|
|
664
687
|
export function setAriaSelectedOnCell(state, rowKeyValue, colKeyValue) {
|
|
665
|
-
const
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
if (row && colIndex) {
|
|
669
|
-
row.cells[colIndex].ariaSelected = 'true';
|
|
688
|
+
const cell = getCellByKeys(state, rowKeyValue, colKeyValue);
|
|
689
|
+
if (cell) {
|
|
690
|
+
cell.ariaSelected = 'true';
|
|
670
691
|
}
|
|
671
692
|
}
|
|
672
693
|
|
|
@@ -682,11 +703,9 @@ export function setAriaSelectedOnCell(state, rowKeyValue, colKeyValue) {
|
|
|
682
703
|
* @param {String} colKeyValue - The column key of the cell to select
|
|
683
704
|
*/
|
|
684
705
|
export function unsetAriaSelectedOnCell(state, rowKeyValue, colKeyValue) {
|
|
685
|
-
const
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
if (row && colIndex) {
|
|
689
|
-
row.cells[colIndex].ariaSelected = false;
|
|
706
|
+
const cell = getCellByKeys(state, rowKeyValue, colKeyValue);
|
|
707
|
+
if (cell) {
|
|
708
|
+
cell.ariaSelected = false;
|
|
690
709
|
}
|
|
691
710
|
}
|
|
692
711
|
|
|
@@ -1,16 +1,24 @@
|
|
|
1
|
-
import { assert } from 'lightning/utilsPrivate';
|
|
2
|
-
import { classSet, isObjectLike } from './utils';
|
|
3
|
-
import { getAttributesNames } from './types';
|
|
4
|
-
import {
|
|
5
|
-
getCurrentSelectionLength,
|
|
6
|
-
SELECTABLE_HEADER_TYPE,
|
|
7
|
-
} from './rowSelectionShared';
|
|
1
|
+
import { assert, isRTL } from 'lightning/utilsPrivate';
|
|
8
2
|
import {
|
|
9
3
|
getTypeAttributesValues,
|
|
10
4
|
getSubTypeAttributesValues,
|
|
11
5
|
getCellAttributesValues,
|
|
12
6
|
} from './columns';
|
|
7
|
+
import { addHeaderIndex } from './indexes';
|
|
8
|
+
import {
|
|
9
|
+
setInliningProperties,
|
|
10
|
+
updateInlineCell,
|
|
11
|
+
updateInlineClassAndStyle,
|
|
12
|
+
updateInlineCellValue,
|
|
13
|
+
} from './rowsInlining';
|
|
13
14
|
import { getRowNumberError } from './rowNumber';
|
|
15
|
+
import {
|
|
16
|
+
getCurrentSelectionLength,
|
|
17
|
+
SELECTABLE_HEADER_TYPE,
|
|
18
|
+
SORTING_MENU_HEADER_TYPE,
|
|
19
|
+
} from './rowSelectionShared';
|
|
20
|
+
import { getAttributesNames } from './types';
|
|
21
|
+
import { classSet, isObjectLike } from './utils';
|
|
14
22
|
|
|
15
23
|
const CELL_EDIT_CLASS = 'slds-cell-edit';
|
|
16
24
|
const HAS_ERROR_CLASS = 'slds-has-error';
|
|
@@ -51,21 +59,38 @@ export function setKeyField(state, value) {
|
|
|
51
59
|
* @param {Object} state - The datatable state
|
|
52
60
|
* @param {Object} types - The type handling factory
|
|
53
61
|
*/
|
|
54
|
-
export function updateRowsAndCells(state, types) {
|
|
55
|
-
const {
|
|
56
|
-
|
|
62
|
+
export function updateRowsAndCells(state, types, datatableId) {
|
|
63
|
+
const {
|
|
64
|
+
columns,
|
|
65
|
+
data,
|
|
66
|
+
keyField,
|
|
67
|
+
maxRowSelection,
|
|
68
|
+
renderModeInline,
|
|
69
|
+
rowHeight,
|
|
70
|
+
virtualize,
|
|
71
|
+
} = state;
|
|
57
72
|
const { privateCustomTypes } = types;
|
|
73
|
+
const rtl = isRTL();
|
|
58
74
|
const { length: rowCount } = data;
|
|
59
75
|
const { length: colCount } = columns;
|
|
60
76
|
const currentSelectionLength =
|
|
61
77
|
maxRowSelection === 1 ? 1 : getCurrentSelectionLength(state);
|
|
62
78
|
const inputType = maxRowSelection === 1 ? 'radio' : 'checkbox';
|
|
79
|
+
const isInputTypeCheckbox = inputType === 'checkbox';
|
|
63
80
|
|
|
64
81
|
let scopeCol;
|
|
65
82
|
let treeColTypeAttrs;
|
|
83
|
+
|
|
84
|
+
// Initializing all indexes.
|
|
85
|
+
const indexes = {};
|
|
86
|
+
const headerIndexes = Array(colCount);
|
|
87
|
+
|
|
66
88
|
for (let colIndex = 0; colIndex < colCount; colIndex += 1) {
|
|
67
89
|
const col = columns[colIndex];
|
|
68
|
-
const { type: columnType } = col;
|
|
90
|
+
const { colKeyValue, type: columnType } = col;
|
|
91
|
+
addHeaderIndex(headerIndexes, indexes, colKeyValue, colIndex);
|
|
92
|
+
|
|
93
|
+
// Find scopeCol
|
|
69
94
|
if (!scopeCol && col.isScopeCol && types.isValidType(columnType)) {
|
|
70
95
|
scopeCol = col;
|
|
71
96
|
}
|
|
@@ -74,13 +99,26 @@ export function updateRowsAndCells(state, types) {
|
|
|
74
99
|
}
|
|
75
100
|
}
|
|
76
101
|
|
|
77
|
-
//
|
|
78
|
-
|
|
79
|
-
|
|
102
|
+
// create arrays to track inlined checkbox, lookup and url cells
|
|
103
|
+
// so they can get necessary updates on re-renders
|
|
104
|
+
const checkboxCells = [];
|
|
105
|
+
const lookupCells = [];
|
|
106
|
+
const shownUrlCells = [];
|
|
80
107
|
const rows = Array(rowCount);
|
|
108
|
+
|
|
109
|
+
// Store in caches early so data can be referenced by other methods
|
|
110
|
+
// during initialization.
|
|
111
|
+
|
|
112
|
+
// Untracked state changes.
|
|
113
|
+
state.checkboxCells = checkboxCells;
|
|
114
|
+
state.headerIndexes = headerIndexes;
|
|
115
|
+
state.indexes = indexes;
|
|
116
|
+
state.lookupCells = lookupCells;
|
|
117
|
+
state.shownUrlCells = shownUrlCells;
|
|
81
118
|
// Tracked state changes.
|
|
82
119
|
state.rows = rows;
|
|
83
120
|
|
|
121
|
+
// Add row indexes.
|
|
84
122
|
for (let rowIndex = 0; rowIndex < rowCount; rowIndex += 1) {
|
|
85
123
|
const rowData = data[rowIndex];
|
|
86
124
|
const rowDataKeyField = rowData[keyField];
|
|
@@ -91,15 +129,17 @@ export function updateRowsAndCells(state, types) {
|
|
|
91
129
|
state.indexes[rowKeyValue] = { rowIndex };
|
|
92
130
|
|
|
93
131
|
const isRowSelected = !!state.selectedRowsKeys[rowKeyValue];
|
|
132
|
+
const ariaSelected = isRowSelected ? 'true' : false;
|
|
94
133
|
const rowNumber = rowIndex + 1;
|
|
95
134
|
const scopeColValue = scopeCol
|
|
96
135
|
? rowData[scopeCol.fieldName]
|
|
97
136
|
: undefined;
|
|
98
137
|
const cells = Array(colCount);
|
|
138
|
+
const checkboxHidden = state.hideCheckboxColumn;
|
|
99
139
|
|
|
100
140
|
const row = {
|
|
101
141
|
ariaRowIndex: rowIndex + 2, // aria attrs are base-1 and also count header as a row
|
|
102
|
-
ariaSelected:
|
|
142
|
+
ariaSelected: checkboxHidden ? null : ariaSelected,
|
|
103
143
|
cells,
|
|
104
144
|
classnames: `slds-hint-parent${
|
|
105
145
|
isRowSelected ? ' slds-is-selected' : ''
|
|
@@ -145,6 +185,9 @@ export function updateRowsAndCells(state, types) {
|
|
|
145
185
|
resolveAttributeValue(treeColTypeAttrs.setSize, rowData) || 1;
|
|
146
186
|
}
|
|
147
187
|
|
|
188
|
+
// Store in caches early so data can be referenced by other methods
|
|
189
|
+
// during initialization.
|
|
190
|
+
indexes[rowKeyValue] = row;
|
|
148
191
|
rows[rowIndex] = row;
|
|
149
192
|
|
|
150
193
|
// Add cell indexes.
|
|
@@ -157,6 +200,7 @@ export function updateRowsAndCells(state, types) {
|
|
|
157
200
|
type: columnType,
|
|
158
201
|
typeAttributes,
|
|
159
202
|
} = col;
|
|
203
|
+
const cellKeyValue = `${rowKeyValue}-${colKeyValue}`;
|
|
160
204
|
const columnSubType = typeAttributes
|
|
161
205
|
? typeAttributes.subType
|
|
162
206
|
: undefined;
|
|
@@ -168,30 +212,44 @@ export function updateRowsAndCells(state, types) {
|
|
|
168
212
|
: false;
|
|
169
213
|
const displayReadOnlyIcon = !!col.displayReadOnlyIcon;
|
|
170
214
|
const editable = !!resolveAttributeValue(col.editable, rowData);
|
|
215
|
+
const isEditable = editable && types.isEditableType(columnType);
|
|
171
216
|
const isValidType = types.isValidType(columnType);
|
|
172
217
|
const isCheckbox = columnType === SELECTABLE_HEADER_TYPE;
|
|
218
|
+
const isSortingMenu = columnType === SORTING_MENU_HEADER_TYPE;
|
|
173
219
|
const isCustom = privateType !== undefined;
|
|
174
220
|
const isCustomBareLayout = isCustom && !standardCellLayout;
|
|
221
|
+
const isCustomStandardLayout = isCustom && standardCellLayout;
|
|
175
222
|
const isDataType = isValidType && !isScopeCol;
|
|
176
223
|
const isDataTypeScope = isValidType && isScopeCol;
|
|
177
224
|
|
|
178
225
|
// cell object creation
|
|
179
226
|
const cell = {
|
|
180
227
|
ariaReadOnly: !editable,
|
|
228
|
+
cellKeyValue,
|
|
181
229
|
class: '',
|
|
230
|
+
colIndex,
|
|
182
231
|
colKeyValue, // unique column key value
|
|
183
232
|
columnSubType,
|
|
184
233
|
columnType,
|
|
185
234
|
dataLabel,
|
|
186
235
|
displayReadOnlyIcon,
|
|
187
236
|
displayValue: rowData.displayValue || '',
|
|
237
|
+
describedBy: null,
|
|
188
238
|
editable,
|
|
189
239
|
hasError: undefined,
|
|
240
|
+
hasTreeData,
|
|
190
241
|
isCheckbox,
|
|
242
|
+
isCustom,
|
|
191
243
|
isCustomBareLayout,
|
|
244
|
+
isCustomStandardLayout,
|
|
192
245
|
isDataType,
|
|
193
246
|
isDataTypeScope,
|
|
247
|
+
isEditable,
|
|
248
|
+
isRTL: rtl,
|
|
249
|
+
isSortingMenu,
|
|
250
|
+
rowIndex,
|
|
194
251
|
rowKeyValue, // unique row key value
|
|
252
|
+
rowNumber,
|
|
195
253
|
scopeColValue,
|
|
196
254
|
style: '',
|
|
197
255
|
tabIndex: -1,
|
|
@@ -200,6 +258,11 @@ export function updateRowsAndCells(state, types) {
|
|
|
200
258
|
wrapTextMaxLines: 0,
|
|
201
259
|
};
|
|
202
260
|
|
|
261
|
+
// Store in caches early so data can be referenced by other methods
|
|
262
|
+
// during initialization.
|
|
263
|
+
indexes[cellKeyValue] = cell;
|
|
264
|
+
cells[colIndex] = cell;
|
|
265
|
+
|
|
203
266
|
if (!col.internal) {
|
|
204
267
|
// Assign cell type or cell subType attributes.
|
|
205
268
|
let attributeNames;
|
|
@@ -208,7 +271,8 @@ export function updateRowsAndCells(state, types) {
|
|
|
208
271
|
attributeNames = getAttributesNames(columnSubType);
|
|
209
272
|
attributeValues = getSubTypeAttributesValues(col);
|
|
210
273
|
} else {
|
|
211
|
-
|
|
274
|
+
const typeDesc = types.getType(columnType);
|
|
275
|
+
attributeNames = typeDesc && typeDesc.typeAttributes;
|
|
212
276
|
attributeValues = getTypeAttributesValues(col);
|
|
213
277
|
}
|
|
214
278
|
const attributeNamesLength = attributeNames
|
|
@@ -230,7 +294,7 @@ export function updateRowsAndCells(state, types) {
|
|
|
230
294
|
// object in each row.
|
|
231
295
|
const cellAttributes = getCellAttributesValues(col);
|
|
232
296
|
const keys = Object.keys(cellAttributes);
|
|
233
|
-
for (let i = 0
|
|
297
|
+
for (let i = 0; i < keys.length; i += 1) {
|
|
234
298
|
const attrName = keys[i];
|
|
235
299
|
const attrValue = cellAttributes[attrName];
|
|
236
300
|
cell[attrName] = resolveAttributeValue(attrValue, rowData);
|
|
@@ -256,20 +320,58 @@ export function updateRowsAndCells(state, types) {
|
|
|
256
320
|
state.indexes[row.key][colKeyValue] = [rowIndex, colIndex];
|
|
257
321
|
cells[colIndex] = cell;
|
|
258
322
|
|
|
323
|
+
if (renderModeInline) {
|
|
324
|
+
setInliningProperties(
|
|
325
|
+
state,
|
|
326
|
+
cell,
|
|
327
|
+
isInputTypeCheckbox,
|
|
328
|
+
datatableId
|
|
329
|
+
);
|
|
330
|
+
}
|
|
259
331
|
// Update cell properties including class, style, and value properties.
|
|
260
332
|
updateCell(state, rowIndex, colIndex);
|
|
333
|
+
|
|
334
|
+
// Update shownUrlCells state since it's dependent on updateCell
|
|
335
|
+
if (cell.showUrlLink) {
|
|
336
|
+
shownUrlCells.push(cell);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
state.hasCalledUpdateRowsAndCells = true;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* Cells are normally updated via updateRowsAndCells().
|
|
346
|
+
* However, a smaller update can be used when modifying datatable properties
|
|
347
|
+
* such as dt.errors and dt.wrapTextMaxLines.
|
|
348
|
+
*
|
|
349
|
+
* @param {Object} state - The datatable state
|
|
350
|
+
*/
|
|
351
|
+
export function updateCells(state, types) {
|
|
352
|
+
if (!state.hasCalledUpdateRowsAndCells) {
|
|
353
|
+
updateRowsAndCells(state, types);
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
356
|
+
const { rows } = state;
|
|
357
|
+
for (let rowIndex = 0; rowIndex < rows.length; rowIndex += 1) {
|
|
358
|
+
for (
|
|
359
|
+
let colIndex = 0;
|
|
360
|
+
colIndex < rows[rowIndex].cells.length;
|
|
361
|
+
colIndex += 1
|
|
362
|
+
) {
|
|
363
|
+
updateCell(state, rowIndex, colIndex);
|
|
261
364
|
}
|
|
262
365
|
}
|
|
263
366
|
}
|
|
264
367
|
|
|
265
368
|
/**
|
|
266
369
|
* Performs a smaller update on the cell at the given rowIndex and colIndex.
|
|
267
|
-
* Used by updateCells() and
|
|
370
|
+
* Used by updateCells() and updateWrapTextAndMaxLinesValuesInCells().
|
|
268
371
|
*
|
|
269
372
|
* @param {Object} state - The tracked datatable state
|
|
270
373
|
* @param {Object} rowIndex - The cell row index
|
|
271
374
|
* @param {Object} colIndex - The cell column index
|
|
272
|
-
* @param {Object} [_state = state] - The untracked datatable state
|
|
273
375
|
*/
|
|
274
376
|
export function updateCell(state, rowIndex, colIndex) {
|
|
275
377
|
const { renderModeRoleBased } = state;
|
|
@@ -283,12 +385,11 @@ export function updateCell(state, rowIndex, colIndex) {
|
|
|
283
385
|
const errorFieldNames = rowErrors && rowErrors.fieldNames;
|
|
284
386
|
const col = state.columns[colIndex];
|
|
285
387
|
const cell = row.cells[colIndex];
|
|
286
|
-
const { colKeyValue, columnKey, fieldName
|
|
388
|
+
const { colKeyValue, columnKey, fieldName } = col;
|
|
287
389
|
const dirtyValue = dirtyRowData && dirtyRowData[colKeyValue];
|
|
288
390
|
const hasError = columnKey
|
|
289
391
|
? !!(cellErrors && cellErrors[columnKey])
|
|
290
392
|
: !!(errorFieldNames && errorFieldNames.includes(fieldName));
|
|
291
|
-
const hasTreeData = columnType === 'tree';
|
|
292
393
|
// value based on the fieldName
|
|
293
394
|
const value = dirtyValue === undefined ? rowData[fieldName] : dirtyValue;
|
|
294
395
|
const wrapText = state.wrapText[colKeyValue];
|
|
@@ -303,11 +404,11 @@ export function updateCell(state, rowIndex, colIndex) {
|
|
|
303
404
|
cell.typeAttribute0 = getRowNumberError(rowErrors, cell.scopeColValue);
|
|
304
405
|
}
|
|
305
406
|
|
|
306
|
-
let cellClass =
|
|
407
|
+
let cellClass = cell.class;
|
|
307
408
|
if (cell.displayReadOnlyIcon || cell.editable) {
|
|
308
|
-
cellClass += CELL_EDIT_CLASS;
|
|
409
|
+
cellClass += (cellClass.length ? ' ' : '') + CELL_EDIT_CLASS;
|
|
309
410
|
}
|
|
310
|
-
if (hasTreeData) {
|
|
411
|
+
if (cell.hasTreeData) {
|
|
311
412
|
cellClass += (cellClass.length ? ' ' : '') + TREE__ITEM_CLASS;
|
|
312
413
|
}
|
|
313
414
|
if (hasError) {
|
|
@@ -315,6 +416,7 @@ export function updateCell(state, rowIndex, colIndex) {
|
|
|
315
416
|
}
|
|
316
417
|
if (dirtyValue !== undefined) {
|
|
317
418
|
cellClass += (cellClass.length ? ' ' : '') + IS_EDITED_CLASS;
|
|
419
|
+
cell.describedBy = 'unsaved-cell-notification';
|
|
318
420
|
}
|
|
319
421
|
if (renderModeRoleBased) {
|
|
320
422
|
cellClass += (cellClass.length ? ' ' : '') + ROLE_BASED_CELL_CLASS;
|
|
@@ -322,6 +424,12 @@ export function updateCell(state, rowIndex, colIndex) {
|
|
|
322
424
|
|
|
323
425
|
cell.class = cellClass;
|
|
324
426
|
cell.style = computeCellStyles(cell, col, renderModeRoleBased);
|
|
427
|
+
|
|
428
|
+
if (cell.isInlined) {
|
|
429
|
+
updateInlineCell(cell);
|
|
430
|
+
updateInlineClassAndStyle(cell, cellClass);
|
|
431
|
+
updateInlineCellValue(cell, value);
|
|
432
|
+
}
|
|
325
433
|
}
|
|
326
434
|
|
|
327
435
|
/**
|