lightning-base-components 1.21.6-alpha → 1.21.8-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/breadcrumbs/breadcrumbs.slds.css +1 -1
- 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
|
@@ -17,7 +17,7 @@ export function setErrors(state, errors) {
|
|
|
17
17
|
/**
|
|
18
18
|
* Resets row-level and table-level errors in datatable state object.
|
|
19
19
|
*
|
|
20
|
-
* @param {Object}
|
|
20
|
+
* @param {Object} state - The datatable state
|
|
21
21
|
*/
|
|
22
22
|
export function resetErrors(state) {
|
|
23
23
|
state.errors = {
|
|
@@ -3,38 +3,51 @@ export const HEADER_ROW_KEY = 'HEADER';
|
|
|
3
3
|
|
|
4
4
|
export function getCellFromIndexes(state, rowIndex, colIndex) {
|
|
5
5
|
const { columns, rows } = state;
|
|
6
|
-
if (columns.length >
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
: rows[rowIndex].key,
|
|
12
|
-
colKeyValue: columns[colIndex].colKeyValue,
|
|
13
|
-
};
|
|
6
|
+
if (rows.length > rowIndex && columns.length > colIndex) {
|
|
7
|
+
const rowKeyValue =
|
|
8
|
+
rowIndex === HEADER_ROW_INDEX ? HEADER_ROW_KEY : rows[rowIndex].key;
|
|
9
|
+
const { colKeyValue } = columns[colIndex];
|
|
10
|
+
return state.indexes[`${rowKeyValue}-${colKeyValue}`];
|
|
14
11
|
}
|
|
15
12
|
return undefined;
|
|
16
13
|
}
|
|
17
14
|
|
|
15
|
+
export function getCellByKeys(state, rowKeyValue, colKeyValue) {
|
|
16
|
+
return state.indexes[`${rowKeyValue}-${colKeyValue}`];
|
|
17
|
+
}
|
|
18
|
+
|
|
18
19
|
export function getRowIndexByKey(state, rowKeyValue) {
|
|
19
20
|
const row = state.indexes[rowKeyValue];
|
|
20
21
|
return row ? row.rowIndex : undefined;
|
|
21
22
|
}
|
|
22
23
|
|
|
23
|
-
export function getRowByKey(state,
|
|
24
|
-
return state.
|
|
24
|
+
export function getRowByKey(state, rowKeyValue) {
|
|
25
|
+
return state.indexes[rowKeyValue];
|
|
25
26
|
}
|
|
26
27
|
|
|
27
|
-
export function
|
|
28
|
-
const
|
|
29
|
-
return state.data[rowIndex];
|
|
28
|
+
export function getUserRowByKey(state, rowKeyValue) {
|
|
29
|
+
const row = state.indexes[rowKeyValue];
|
|
30
|
+
return row ? state.data[row.rowIndex] : undefined;
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
export function isValidCell(state, rowKeyValue, colKeyValue) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
const row = getRowByKey(state, rowKeyValue);
|
|
37
|
-
const colIndex = state.headerIndexes[colKeyValue];
|
|
34
|
+
return state.indexes[`${rowKeyValue}-${colKeyValue}`] !== undefined;
|
|
35
|
+
}
|
|
38
36
|
|
|
39
|
-
|
|
37
|
+
export function addHeaderIndex(headerIndexes, indexes, colKeyValue, colIndex) {
|
|
38
|
+
// Add header indexes.
|
|
39
|
+
const cellKeyValue = `${HEADER_ROW_KEY}-${colKeyValue}`;
|
|
40
|
+
const headerCell = {
|
|
41
|
+
cellKeyValue,
|
|
42
|
+
colIndex,
|
|
43
|
+
colKeyValue,
|
|
44
|
+
focused: false,
|
|
45
|
+
key: colKeyValue,
|
|
46
|
+
rowIndex: HEADER_ROW_INDEX,
|
|
47
|
+
rowKeyValue: HEADER_ROW_KEY,
|
|
48
|
+
};
|
|
49
|
+
// Store in caches early so data can be referenced by other methods
|
|
50
|
+
// during initialization.
|
|
51
|
+
headerIndexes[colIndex] = headerCell;
|
|
52
|
+
indexes[cellKeyValue] = headerCell;
|
|
40
53
|
}
|
|
@@ -137,14 +137,15 @@ function isScrollerVisible(scroller) {
|
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
/**
|
|
140
|
-
* Determines if a
|
|
140
|
+
* Determines if a template has data
|
|
141
141
|
*
|
|
142
|
-
* @param {Element}
|
|
142
|
+
* @param {Element} template The parent element to check
|
|
143
143
|
* @returns {Boolean} Whether or not the element contains any data
|
|
144
144
|
*/
|
|
145
|
-
function hasData(
|
|
145
|
+
function hasData(template) {
|
|
146
146
|
return (
|
|
147
|
-
|
|
148
|
-
|
|
147
|
+
template.querySelectorAll(
|
|
148
|
+
'tbody > tr, [role="rowgroup"] > [role="row"]'
|
|
149
|
+
).length > 0
|
|
149
150
|
);
|
|
150
151
|
}
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
getActiveCellElement,
|
|
11
11
|
isActiveCellEditable,
|
|
12
12
|
NAVIGATION_DIR,
|
|
13
|
-
|
|
13
|
+
getCellElementFromEventTarget,
|
|
14
14
|
} from './keyboard';
|
|
15
15
|
import { updateRowsAndCells } from './rows';
|
|
16
16
|
import { getStateColumnIndex } from './columns';
|
|
@@ -21,8 +21,9 @@ import {
|
|
|
21
21
|
getSelectedRowsKeys,
|
|
22
22
|
isSelectedRow,
|
|
23
23
|
} from './rowSelectionShared';
|
|
24
|
+
import { isObjectLike } from './utils';
|
|
24
25
|
import { hasOwnProperties } from 'lightning/utilsPrivate';
|
|
25
|
-
import {
|
|
26
|
+
import { getCellByKeys, getUserRowByKey, isValidCell } from './indexes';
|
|
26
27
|
|
|
27
28
|
const IEDIT_PANEL_SELECTOR = '[data-iedit-panel="true"]';
|
|
28
29
|
const HIDE_PANEL_THRESHOLD = 5; // hide panel on scroll
|
|
@@ -36,7 +37,8 @@ const HIDE_PANEL_THRESHOLD = 5; // hide panel on scroll
|
|
|
36
37
|
* which to open the inline edit panel. Must be valid and truthy.
|
|
37
38
|
*/
|
|
38
39
|
export function handleEditCell(event) {
|
|
39
|
-
|
|
40
|
+
const cellElement = getCellElementFromEventTarget(event.target);
|
|
41
|
+
openInlineEdit(this, cellElement);
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
/**
|
|
@@ -220,7 +222,11 @@ function processInlineEditFinish(dt, reason, rowKeyValue, colKeyValue) {
|
|
|
220
222
|
if (shouldSaveData) {
|
|
221
223
|
const panel = template.querySelector(IEDIT_PANEL_SELECTOR);
|
|
222
224
|
const isValidEditValue = panel.validity.valid;
|
|
223
|
-
const currentValue =
|
|
225
|
+
const currentValue = getCellByKeys(
|
|
226
|
+
state,
|
|
227
|
+
rowKeyValue,
|
|
228
|
+
colKeyValue
|
|
229
|
+
).value;
|
|
224
230
|
const { isMassEditChecked: updateAllSelectedRows, value: editValue } =
|
|
225
231
|
panel;
|
|
226
232
|
|
|
@@ -285,10 +291,10 @@ function processInlineEditFinish(dt, reason, rowKeyValue, colKeyValue) {
|
|
|
285
291
|
* @param {Object} target - The LWC component instance (lightning-primitive-cell-factory) representing the cell in the
|
|
286
292
|
* datatable for which the inline edit panel is to be opened. Must be a truthy and valid reference.
|
|
287
293
|
*/
|
|
288
|
-
function openInlineEdit(dt,
|
|
289
|
-
startPanelPositioning(dt,
|
|
294
|
+
function openInlineEdit(dt, cellElement) {
|
|
295
|
+
startPanelPositioning(dt, cellElement);
|
|
290
296
|
|
|
291
|
-
const { state, template,
|
|
297
|
+
const { state, template, _privateTypes: types } = dt;
|
|
292
298
|
const { inlineEdit: inlineEditState } = state;
|
|
293
299
|
|
|
294
300
|
if (inlineEditState.isPanelVisible) {
|
|
@@ -302,15 +308,17 @@ function openInlineEdit(dt, target) {
|
|
|
302
308
|
);
|
|
303
309
|
}
|
|
304
310
|
|
|
305
|
-
const { rowKeyValue
|
|
306
|
-
const
|
|
311
|
+
const { rowKeyValue } = cellElement.parentElement.dataset;
|
|
312
|
+
const { colKeyValue } = cellElement.dataset;
|
|
313
|
+
const cell = getCellByKeys(state, rowKeyValue, colKeyValue);
|
|
314
|
+
const { colIndex } = cell;
|
|
307
315
|
const col = state.columns[colIndex];
|
|
308
316
|
|
|
309
317
|
inlineEditState.isPanelVisible = true;
|
|
310
318
|
inlineEditState.rowKeyValue = rowKeyValue;
|
|
311
319
|
inlineEditState.colKeyValue = colKeyValue;
|
|
312
320
|
inlineEditState.columnDef = col;
|
|
313
|
-
inlineEditState.editedValue =
|
|
321
|
+
inlineEditState.editedValue = cell.value;
|
|
314
322
|
inlineEditState.massEditSelectedRows = getCurrentSelectionLength(state);
|
|
315
323
|
inlineEditState.massEditEnabled =
|
|
316
324
|
inlineEditState.massEditSelectedRows > 1 &&
|
|
@@ -323,10 +331,9 @@ function openInlineEdit(dt, target) {
|
|
|
323
331
|
inlineEditState.resolvedTypeAttributes = resolveNestedTypeAttributes(
|
|
324
332
|
state,
|
|
325
333
|
rowKeyValue,
|
|
326
|
-
|
|
334
|
+
colIndex,
|
|
327
335
|
types,
|
|
328
|
-
typeAttributes
|
|
329
|
-
colIndex
|
|
336
|
+
typeAttributes
|
|
330
337
|
);
|
|
331
338
|
}
|
|
332
339
|
|
|
@@ -368,10 +375,7 @@ export function openInlineEditOnActiveCell(dt) {
|
|
|
368
375
|
if (!isActiveCellEditable(state)) {
|
|
369
376
|
const firstEditableCell = getFirstEditableCell(dt);
|
|
370
377
|
if (firstEditableCell) {
|
|
371
|
-
state.activeCell =
|
|
372
|
-
rowKeyValue: firstEditableCell.rowKeyValue,
|
|
373
|
-
colKeyValue: firstEditableCell.colKeyValue,
|
|
374
|
-
};
|
|
378
|
+
state.activeCell = firstEditableCell;
|
|
375
379
|
setFocusAndOpenInlineEdit(dt);
|
|
376
380
|
}
|
|
377
381
|
} else {
|
|
@@ -440,7 +444,7 @@ function stopPanelPositioning(dt) {
|
|
|
440
444
|
const { _positionRelationship } = dt;
|
|
441
445
|
if (_positionRelationship) {
|
|
442
446
|
stopPositioning(_positionRelationship);
|
|
443
|
-
dt._positionRelationship =
|
|
447
|
+
dt._positionRelationship = undefined;
|
|
444
448
|
}
|
|
445
449
|
}
|
|
446
450
|
|
|
@@ -571,8 +575,8 @@ function getResolvedCellChanges(state, rowChanges) {
|
|
|
571
575
|
const colKeyValue = changeColKeys[changeColIndex];
|
|
572
576
|
const colIndex = getStateColumnIndex(state, colKeyValue);
|
|
573
577
|
if (colIndex !== -1) {
|
|
574
|
-
const
|
|
575
|
-
cellChanges[
|
|
578
|
+
const { name: colName } = columns[colIndex];
|
|
579
|
+
cellChanges[colName] = colChanges[colKeyValue];
|
|
576
580
|
}
|
|
577
581
|
}
|
|
578
582
|
result.push(cellChanges);
|
|
@@ -588,20 +592,18 @@ function getResolvedCellChanges(state, rowChanges) {
|
|
|
588
592
|
*
|
|
589
593
|
* @param {Object} state - The datatable state
|
|
590
594
|
* @param {String} rowKeyValue - The row key
|
|
591
|
-
* @param {
|
|
595
|
+
* @param {Number} colIndex - The column index
|
|
592
596
|
* @param {Object} types - The type handling factory
|
|
593
597
|
* @param {Object} typeAttributes - values of typeAttributes from column definition
|
|
594
|
-
* @param {Number} colIndex - The column index
|
|
595
598
|
*
|
|
596
599
|
* @returns {Object} The resolved typeAttributes.
|
|
597
600
|
*/
|
|
598
601
|
export function resolveNestedTypeAttributes(
|
|
599
602
|
state,
|
|
600
603
|
rowKeyValue,
|
|
601
|
-
|
|
604
|
+
colIndex,
|
|
602
605
|
types,
|
|
603
|
-
typeAttributes
|
|
604
|
-
colIndex
|
|
606
|
+
typeAttributes
|
|
605
607
|
) {
|
|
606
608
|
const col = state.columns[colIndex];
|
|
607
609
|
const typeDesc = typeAttributes && types.getType(col.type);
|
|
@@ -610,16 +612,20 @@ export function resolveNestedTypeAttributes(
|
|
|
610
612
|
if (attributeNames) {
|
|
611
613
|
const resolvedTypeAttributes = {};
|
|
612
614
|
const { length: attributeNamesLength } = attributeNames;
|
|
613
|
-
const _rowData =
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
615
|
+
const _rowData = attributeNamesLength
|
|
616
|
+
? getUserRowByKey(state, rowKeyValue)
|
|
617
|
+
: undefined;
|
|
618
|
+
if (_rowData) {
|
|
619
|
+
// We only want to resolve typeAttributes based on the custom types configuration
|
|
620
|
+
// If the attribute is not in that configuration, the value of attrValue
|
|
621
|
+
// for that will be undefined. This behavior is consistent with view cell.
|
|
622
|
+
for (let i = 0; i < attributeNamesLength; i += 1) {
|
|
623
|
+
const attrName = attributeNames[i];
|
|
624
|
+
const attrValue = typeAttributes[attrName];
|
|
625
|
+
if (attrValue) {
|
|
626
|
+
resolvedTypeAttributes[attrName] =
|
|
627
|
+
resolveNestedTypeAttributesHelper(_rowData, attrValue);
|
|
628
|
+
}
|
|
623
629
|
}
|
|
624
630
|
}
|
|
625
631
|
return resolvedTypeAttributes;
|
|
@@ -645,7 +651,7 @@ export function resolveNestedTypeAttributes(
|
|
|
645
651
|
*/
|
|
646
652
|
function resolveNestedTypeAttributesHelper(rowData, attrValue) {
|
|
647
653
|
let resolvedTypeAttributes = {};
|
|
648
|
-
if (!(
|
|
654
|
+
if (!isObjectLike(attrValue)) {
|
|
649
655
|
// Primitive value.
|
|
650
656
|
// For example, if the typeAttributes is { count: 5},
|
|
651
657
|
// 5 will be the attrValue passed in to the function.
|
|
@@ -665,7 +671,7 @@ function resolveNestedTypeAttributesHelper(rowData, attrValue) {
|
|
|
665
671
|
// so we need to check if key is 'fieldName' or not and resolve it immediately.
|
|
666
672
|
if (name === 'fieldName') {
|
|
667
673
|
resolvedTypeAttributes = rowData[value];
|
|
668
|
-
} else if (
|
|
674
|
+
} else if (isObjectLike(value)) {
|
|
669
675
|
// This is the case when attrValue is something like {label: {fieldName: 'name'}}.
|
|
670
676
|
// It's an object but the value maps a field name
|
|
671
677
|
const { fieldName } = value;
|
|
@@ -715,14 +721,10 @@ function getFirstEditableCell(dt) {
|
|
|
715
721
|
// Loop through the editable columns in order and examine the
|
|
716
722
|
// corresponding cells in the current row for editability,
|
|
717
723
|
// returning the first such cell that is editable.
|
|
718
|
-
const editableColumn = editableColumns[i];
|
|
719
724
|
const { colKeyValue } = editableColumns[i];
|
|
720
|
-
const cell =
|
|
725
|
+
const cell = getCellByKeys(state, rowKeyValue, colKeyValue);
|
|
721
726
|
if (cell && cell.editable) {
|
|
722
|
-
return
|
|
723
|
-
rowKeyValue,
|
|
724
|
-
colKeyValue: editableColumn.colKeyValue,
|
|
725
|
-
};
|
|
727
|
+
return cell;
|
|
726
728
|
}
|
|
727
729
|
}
|
|
728
730
|
}
|
|
@@ -731,22 +733,6 @@ function getFirstEditableCell(dt) {
|
|
|
731
733
|
return undefined;
|
|
732
734
|
}
|
|
733
735
|
|
|
734
|
-
/**
|
|
735
|
-
* Returns the current value of the cell, already takes into account the dirty value
|
|
736
|
-
*
|
|
737
|
-
* @param {Object} state - state of the datatable
|
|
738
|
-
* @param {String} rowKeyValue - row key
|
|
739
|
-
* @param {String} colKeyValue - column key
|
|
740
|
-
*
|
|
741
|
-
* @returns {Object} the value for the current cell.
|
|
742
|
-
*/
|
|
743
|
-
function getCellValue(state, rowKeyValue, colKeyValue) {
|
|
744
|
-
const row = getRowByKey(state, rowKeyValue);
|
|
745
|
-
const colIndex = getStateColumnIndex(state, colKeyValue);
|
|
746
|
-
|
|
747
|
-
return row.cells[colIndex].value;
|
|
748
|
-
}
|
|
749
|
-
|
|
750
736
|
/**
|
|
751
737
|
* Sets `aria-selected` to true on cells whose rows are selected
|
|
752
738
|
* and are in the same column as the cell being currently edited
|