lightning-base-components 1.21.5-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.
Files changed (379) hide show
  1. package/metadata/raptor.json +46 -4
  2. package/package.json +125 -3
  3. package/scopedImports/@salesforce-label-LightningColorPicker.a11yDefaultText.js +1 -0
  4. package/scopedImports/@salesforce-label-LightningDatatable.multiColumnSortingToast.js +1 -0
  5. package/scopedImports/@salesforce-label-LightningDatatable.sortingMenuColumns.js +1 -0
  6. package/scopedImports/@salesforce-label-LightningDatatable.sortingMenuMultiColumnSort.js +1 -0
  7. package/scopedImports/@salesforce-label-LightningDatatable.sortingMenuRows.js +1 -0
  8. package/scopedImports/@salesforce-label-LightningDatatable.sortingMenuTooltip.js +1 -0
  9. package/scopedImports/@salesforce-label-LightningForm.dependentFieldsListHeading.js +1 -1
  10. package/scopedImports/@salesforce-label-LightningLookup.advancedSearchMobile.js +1 -1
  11. package/scopedImports/@salesforce-label-LightningLookup.modalTitle.js +1 -0
  12. package/scopedImports/@salesforce-label-LightningMultiColumnSortingModal.addRule.js +1 -0
  13. package/scopedImports/@salesforce-label-LightningMultiColumnSortingModal.applyButton.js +1 -0
  14. package/scopedImports/@salesforce-label-LightningMultiColumnSortingModal.cancelButton.js +1 -0
  15. package/scopedImports/@salesforce-label-LightningMultiColumnSortingModal.clearButton.js +1 -0
  16. package/scopedImports/@salesforce-label-LightningMultiColumnSortingModal.duplicateValueValidation.js +1 -0
  17. package/scopedImports/@salesforce-label-LightningMultiColumnSortingModal.firstRuleHeading.js +1 -0
  18. package/scopedImports/@salesforce-label-LightningMultiColumnSortingModal.modalTitle.js +1 -0
  19. package/scopedImports/@salesforce-label-LightningMultiColumnSortingModal.otherRuleHeading.js +1 -0
  20. package/scopedImports/@salesforce-label-LightningMultiColumnSortingModal.ruleLimit.js +1 -0
  21. package/scopedImports/@salesforce-label-LightningMultiColumnSortingModal.ruleLimitReached.js +1 -0
  22. package/scopedImports/@salesforce-label-LightningPrimitiveColumnSorter.ascending.js +1 -0
  23. package/scopedImports/@salesforce-label-LightningPrimitiveColumnSorter.descending.js +1 -0
  24. package/scopedImports/@salesforce-label-LightningPrimitiveColumnSorter.dropdownPlaceholder.js +1 -0
  25. package/scopedImports/@salesforce-label-LightningPrimitiveColumnSorter.missingValueValidation.js +1 -0
  26. package/scopedImports/@salesforce-label-LightningPrimitiveColumnSorter.moveDownTooltip.js +1 -0
  27. package/scopedImports/@salesforce-label-LightningPrimitiveColumnSorter.moveUpTooltip.js +1 -0
  28. package/scopedImports/@salesforce-label-LightningProgressIndicator.pathCurrentStage.js +1 -0
  29. package/scopedImports/@salesforce-label-LightningRecordPicker.emptyStateNoResultText.js +1 -0
  30. package/scopedImports/@salesforce-label-LightningRecordPicker.messageWhenSearchTermTooShort.js +1 -0
  31. package/scopedImports/@salesforce-label-LightningRecordPicker.resultCountDescriptionForMoreThanOneHundredRecords.js +1 -0
  32. package/scopedImports/@salesforce-label-LightningRecordPicker.resultCountDescriptionForMultipleRecords.js +1 -0
  33. package/scopedImports/@salesforce-label-LightningRecordPicker.resultCountDescriptionForOneRecord.js +1 -0
  34. package/scopedImports/@salesforce-label-LightningRecordPicker.resultsLoading.js +1 -0
  35. package/scopedImports/@salesforce-label-LightningRecordPicker.searchInputHelp.js +1 -0
  36. package/src/lightning/accordion/accordion.js +21 -14
  37. package/src/lightning/accordionSection/button.slds.css +16 -15
  38. package/src/lightning/alert/alert.js +10 -8
  39. package/src/lightning/ariaObserver/ariaObserver.js +19 -5
  40. package/src/lightning/badge/badge.slds.css +1 -1
  41. package/src/lightning/baseCombobox/base-combobox.slds.css +1 -1
  42. package/src/lightning/baseCombobox/baseCombobox.html +2 -1
  43. package/src/lightning/baseCombobox/baseCombobox.js +21 -0
  44. package/src/lightning/baseCombobox/input-text.slds.css +5 -5
  45. package/src/lightning/button/button.js +5 -0
  46. package/src/lightning/button/button.slds.css +16 -15
  47. package/src/lightning/buttonIcon/__docs__/buttonIcon.md +4 -0
  48. package/src/lightning/buttonIcon/__examples__/basic/basic.html +17 -1
  49. package/src/lightning/buttonIcon/button-icon.slds.css +41 -25
  50. package/src/lightning/buttonIconStateful/button-icon-stateful.slds.css +33 -229
  51. package/src/lightning/buttonIconStateful/button-icon.slds.css +41 -25
  52. package/src/lightning/buttonIconStateful/button.slds.css +16 -15
  53. package/src/lightning/buttonMenu/button-icon.slds.css +41 -25
  54. package/src/lightning/buttonMenu/button-menu.slds.css +41 -15
  55. package/src/lightning/buttonMenu/button.slds.css +16 -15
  56. package/src/lightning/buttonMenu/buttonMenu.css +1 -1
  57. package/src/lightning/buttonMenu/buttonMenu.html +1 -1
  58. package/src/lightning/buttonMenu/buttonMenu.js +44 -4
  59. package/src/lightning/buttonStateful/button-stateful.slds.css +1 -4
  60. package/src/lightning/buttonStateful/button.slds.css +16 -15
  61. package/src/lightning/calendar/calendar.html +3 -4
  62. package/src/lightning/card/card.html +1 -1
  63. package/src/lightning/colorPickerCustom/colorPickerCustom.html +1 -1
  64. package/src/lightning/colorPickerCustom/colorPickerCustom.js +0 -9
  65. package/src/lightning/colorPickerCustom/input-text.slds.css +5 -5
  66. package/src/lightning/combobox/form-element.slds.css +5 -1
  67. package/src/lightning/confirm/confirm.js +10 -8
  68. package/src/lightning/datatable/__docs__/datatable.md +0 -3
  69. package/src/lightning/datatable/__examples__disabled/customComponentPopupTableWrapper/README.md +17 -0
  70. package/src/lightning/datatable/__examples__disabled/customComponentPopupTableWrapper/customComponentPopupTableWrapper.html +11 -0
  71. package/src/lightning/datatable/__examples__disabled/customComponentPopupTableWrapper/customComponentPopupTableWrapper.js +25 -0
  72. package/src/lightning/datatable/__examples__disabled/customComponentPopupTableWrapper/generateData.js +15 -0
  73. package/src/lightning/datatable/__examples__disabled/myCustomTypePopupTable/customInput.html +4 -0
  74. package/src/lightning/datatable/__examples__disabled/myCustomTypePopupTable/myCustomTypePopupTable.js +17 -0
  75. package/src/lightning/datatable/__examples__disabled/myCustomTypePopupTable/nestedSimpleComponentParent.html +7 -0
  76. package/src/lightning/datatable/__examples__disabled/simpleComponentPopupNested/simpleComponentPopupNested.html +31 -0
  77. package/src/lightning/datatable/__examples__disabled/simpleComponentPopupNested/simpleComponentPopupNested.js +36 -0
  78. package/src/lightning/datatable/columnWidthManager.js +19 -16
  79. package/src/lightning/datatable/columns.js +90 -42
  80. package/src/lightning/datatable/datatable.js +571 -148
  81. package/src/lightning/datatable/errors.js +1 -1
  82. package/src/lightning/datatable/indexes.js +32 -21
  83. package/src/lightning/datatable/infiniteLoading.js +7 -6
  84. package/src/lightning/datatable/inlineEdit.js +52 -64
  85. package/src/lightning/datatable/keyboard.js +583 -195
  86. package/src/lightning/datatable/renderManager.js +21 -27
  87. package/src/lightning/datatable/rowLevelActions.js +5 -14
  88. package/src/lightning/datatable/rowSelection.js +36 -17
  89. package/src/lightning/datatable/rowSelectionShared.js +1 -0
  90. package/src/lightning/datatable/rows.js +224 -132
  91. package/src/lightning/datatable/rowsInlining.js +473 -0
  92. package/src/lightning/datatable/sort.js +40 -15
  93. package/src/lightning/datatable/state.js +17 -4
  94. package/src/lightning/datatable/templates/div/div.html +807 -91
  95. package/src/lightning/datatable/templates/div/div.lbc.synthetic.css +29 -3
  96. package/src/lightning/datatable/templates/table/table.css +29 -1
  97. package/src/lightning/datatable/templates/table/table.html +786 -87
  98. package/src/lightning/datatable/tree.js +0 -33
  99. package/src/lightning/datatable/utils.js +50 -0
  100. package/src/lightning/datatable/virtualization.js +44 -19
  101. package/src/lightning/datatable/wrapText.js +7 -10
  102. package/src/lightning/datepicker/datepicker.html +3 -1
  103. package/src/lightning/datepicker/datepicker.js +43 -4
  104. package/src/lightning/datepicker/form-element.slds.css +5 -1
  105. package/src/lightning/datepicker/input-text.slds.css +5 -5
  106. package/src/lightning/datetimepicker/datetimepicker.html +7 -1
  107. package/src/lightning/datetimepicker/datetimepicker.js +30 -2
  108. package/src/lightning/datetimepicker/form-element.slds.css +5 -1
  109. package/src/lightning/datetimepicker/input-text.slds.css +5 -5
  110. package/src/lightning/dualListbox/form-element.slds.css +5 -1
  111. package/src/lightning/focusTrap/focusTrap.css +7 -0
  112. package/src/lightning/groupedCombobox/form-element.slds.css +5 -1
  113. package/src/lightning/groupedCombobox/input-text.slds.css +5 -5
  114. package/src/lightning/helptext/button-icon.slds.css +41 -25
  115. package/src/lightning/helptext/form-element.slds.css +5 -1
  116. package/src/lightning/icon/__docs__/icon.md +0 -2
  117. package/src/lightning/iconSvgTemplates/buildTemplates/standard/account_score.html +8 -0
  118. package/src/lightning/iconSvgTemplates/buildTemplates/standard/aggregate.html +8 -0
  119. package/src/lightning/iconSvgTemplates/buildTemplates/standard/app_form_participant.html +11 -0
  120. package/src/lightning/iconSvgTemplates/buildTemplates/standard/app_form_product_participant.html +12 -0
  121. package/src/lightning/iconSvgTemplates/buildTemplates/standard/cost_model.html +7 -0
  122. package/src/lightning/iconSvgTemplates/buildTemplates/standard/labels.html +8 -0
  123. package/src/lightning/iconSvgTemplates/buildTemplates/standard/list_fee.html +7 -0
  124. package/src/lightning/iconSvgTemplates/buildTemplates/standard/list_rate.html +7 -0
  125. package/src/lightning/iconSvgTemplates/buildTemplates/standard/party_profile.html +8 -0
  126. package/src/lightning/iconSvgTemplates/buildTemplates/standard/path_experiment.html +7 -0
  127. package/src/lightning/iconSvgTemplates/buildTemplates/standard/people_score.html +8 -0
  128. package/src/lightning/iconSvgTemplates/buildTemplates/standard/price_adjustment_schedule.html +8 -0
  129. package/src/lightning/iconSvgTemplates/buildTemplates/standard/price_adjustment_tier.html +7 -0
  130. package/src/lightning/iconSvgTemplates/buildTemplates/standard/program_cohort.html +7 -0
  131. package/src/lightning/iconSvgTemplates/buildTemplates/standard/program_cohort_member.html +7 -0
  132. package/src/lightning/iconSvgTemplates/buildTemplates/standard/rate_adjustment.html +7 -0
  133. package/src/lightning/iconSvgTemplates/buildTemplates/standard/record_consent.html +7 -0
  134. package/src/lightning/iconSvgTemplates/buildTemplates/standard/whatsapp.html +7 -0
  135. package/src/lightning/iconSvgTemplates/buildTemplates/templates.js +40 -1
  136. package/src/lightning/iconSvgTemplates/buildTemplates/utility/aggregate.html +8 -0
  137. package/src/lightning/iconSvgTemplates/buildTemplates/utility/array.html +7 -0
  138. package/src/lightning/iconSvgTemplates/buildTemplates/utility/bottom_group_alignment.html +7 -0
  139. package/src/lightning/iconSvgTemplates/buildTemplates/utility/cant_sync.html +7 -0
  140. package/src/lightning/iconSvgTemplates/buildTemplates/utility/center_group_alignment.html +8 -0
  141. package/src/lightning/iconSvgTemplates/buildTemplates/utility/columns.html +7 -0
  142. package/src/lightning/iconSvgTemplates/buildTemplates/utility/fully_synced.html +8 -0
  143. package/src/lightning/iconSvgTemplates/buildTemplates/utility/inner_join.html +7 -0
  144. package/src/lightning/iconSvgTemplates/buildTemplates/utility/join.html +8 -0
  145. package/src/lightning/iconSvgTemplates/buildTemplates/utility/left_join.html +14 -0
  146. package/src/lightning/iconSvgTemplates/buildTemplates/utility/macros.html +2 -2
  147. package/src/lightning/iconSvgTemplates/buildTemplates/utility/not_in_sync.html +7 -0
  148. package/src/lightning/iconSvgTemplates/buildTemplates/utility/not_saved.html +9 -0
  149. package/src/lightning/iconSvgTemplates/buildTemplates/utility/outer_join.html +7 -0
  150. package/src/lightning/iconSvgTemplates/buildTemplates/utility/path_experiment.html +7 -0
  151. package/src/lightning/iconSvgTemplates/buildTemplates/utility/program_cohort.html +7 -0
  152. package/src/lightning/iconSvgTemplates/buildTemplates/utility/program_cohort_member.html +7 -0
  153. package/src/lightning/iconSvgTemplates/buildTemplates/utility/record_consent.html +7 -0
  154. package/src/lightning/iconSvgTemplates/buildTemplates/utility/right_join.html +7 -0
  155. package/src/lightning/iconSvgTemplates/buildTemplates/utility/skill.html +8 -0
  156. package/src/lightning/iconSvgTemplates/buildTemplates/utility/sync_in_progress.html +7 -0
  157. package/src/lightning/iconSvgTemplates/buildTemplates/utility/top_group_alignment.html +7 -0
  158. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/account_score.html +8 -0
  159. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/aggregate.html +8 -0
  160. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/app_form_participant.html +11 -0
  161. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/app_form_product_participant.html +12 -0
  162. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/cost_model.html +7 -0
  163. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/labels.html +8 -0
  164. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/list_fee.html +7 -0
  165. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/list_rate.html +7 -0
  166. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/party_profile.html +8 -0
  167. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/path_experiment.html +7 -0
  168. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/people_score.html +8 -0
  169. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/price_adjustment_schedule.html +8 -0
  170. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/price_adjustment_tier.html +7 -0
  171. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/program_cohort.html +7 -0
  172. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/program_cohort_member.html +7 -0
  173. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/rate_adjustment.html +7 -0
  174. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/record_consent.html +7 -0
  175. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/whatsapp.html +7 -0
  176. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/templates.js +40 -1
  177. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/aggregate.html +8 -0
  178. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/array.html +7 -0
  179. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/bottom_group_alignment.html +7 -0
  180. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/cant_sync.html +7 -0
  181. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/center_group_alignment.html +8 -0
  182. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/columns.html +7 -0
  183. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/fully_synced.html +8 -0
  184. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/inner_join.html +7 -0
  185. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/join.html +8 -0
  186. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/left_join.html +14 -0
  187. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/macros.html +2 -2
  188. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/not_in_sync.html +7 -0
  189. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/not_saved.html +9 -0
  190. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/outer_join.html +7 -0
  191. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/path_experiment.html +7 -0
  192. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/program_cohort.html +7 -0
  193. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/program_cohort_member.html +7 -0
  194. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/record_consent.html +7 -0
  195. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/right_join.html +7 -0
  196. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/skill.html +8 -0
  197. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/sync_in_progress.html +7 -0
  198. package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/top_group_alignment.html +7 -0
  199. package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/account_score.html +8 -0
  200. package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/aggregate.html +8 -0
  201. package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/app_form_participant.html +11 -0
  202. package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/app_form_product_participant.html +12 -0
  203. package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/cost_model.html +7 -0
  204. package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/labels.html +8 -0
  205. package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/list_fee.html +7 -0
  206. package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/list_rate.html +7 -0
  207. package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/party_profile.html +8 -0
  208. package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/path_experiment.html +7 -0
  209. package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/people_score.html +8 -0
  210. package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/price_adjustment_schedule.html +8 -0
  211. package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/price_adjustment_tier.html +7 -0
  212. package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/program_cohort.html +7 -0
  213. package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/program_cohort_member.html +7 -0
  214. package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/rate_adjustment.html +7 -0
  215. package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/record_consent.html +7 -0
  216. package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/whatsapp.html +7 -0
  217. package/src/lightning/iconSvgTemplatesStandard/buildTemplates/templates.js +19 -1
  218. package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/account_score.html +8 -0
  219. package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/aggregate.html +8 -0
  220. package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/app_form_participant.html +11 -0
  221. package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/app_form_product_participant.html +12 -0
  222. package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/cost_model.html +7 -0
  223. package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/labels.html +8 -0
  224. package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/list_fee.html +7 -0
  225. package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/list_rate.html +7 -0
  226. package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/party_profile.html +8 -0
  227. package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/path_experiment.html +7 -0
  228. package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/people_score.html +8 -0
  229. package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/price_adjustment_schedule.html +8 -0
  230. package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/price_adjustment_tier.html +7 -0
  231. package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/program_cohort.html +7 -0
  232. package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/program_cohort_member.html +7 -0
  233. package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/rate_adjustment.html +7 -0
  234. package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/record_consent.html +7 -0
  235. package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/whatsapp.html +7 -0
  236. package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/templates.js +19 -1
  237. package/src/lightning/iconSvgTemplatesUtility/buildTemplates/templates.js +22 -1
  238. package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/aggregate.html +8 -0
  239. package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/array.html +7 -0
  240. package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/bottom_group_alignment.html +7 -0
  241. package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/cant_sync.html +7 -0
  242. package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/center_group_alignment.html +8 -0
  243. package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/columns.html +7 -0
  244. package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/fully_synced.html +8 -0
  245. package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/inner_join.html +7 -0
  246. package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/join.html +8 -0
  247. package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/left_join.html +14 -0
  248. package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/macros.html +2 -2
  249. package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/not_in_sync.html +7 -0
  250. package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/not_saved.html +9 -0
  251. package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/outer_join.html +7 -0
  252. package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/path_experiment.html +7 -0
  253. package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/program_cohort.html +7 -0
  254. package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/program_cohort_member.html +7 -0
  255. package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/record_consent.html +7 -0
  256. package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/right_join.html +7 -0
  257. package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/skill.html +8 -0
  258. package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/sync_in_progress.html +7 -0
  259. package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/top_group_alignment.html +7 -0
  260. package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/templates.js +22 -1
  261. package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/aggregate.html +8 -0
  262. package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/array.html +7 -0
  263. package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/bottom_group_alignment.html +7 -0
  264. package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/cant_sync.html +7 -0
  265. package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/center_group_alignment.html +8 -0
  266. package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/columns.html +7 -0
  267. package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/fully_synced.html +8 -0
  268. package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/inner_join.html +7 -0
  269. package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/join.html +8 -0
  270. package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/left_join.html +14 -0
  271. package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/macros.html +2 -2
  272. package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/not_in_sync.html +7 -0
  273. package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/not_saved.html +9 -0
  274. package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/outer_join.html +7 -0
  275. package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/path_experiment.html +7 -0
  276. package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/program_cohort.html +7 -0
  277. package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/program_cohort_member.html +7 -0
  278. package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/record_consent.html +7 -0
  279. package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/right_join.html +7 -0
  280. package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/skill.html +8 -0
  281. package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/sync_in_progress.html +7 -0
  282. package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/top_group_alignment.html +7 -0
  283. package/src/lightning/iconUtils/iconColors.js +1 -1
  284. package/src/lightning/input/form-element.slds.css +5 -1
  285. package/src/lightning/input/input.html +16 -2
  286. package/src/lightning/input/input.js +91 -3
  287. package/src/lightning/input/input.js-meta.xml +3 -0
  288. package/src/lightning/inputAddress/addressFormat.js +25 -11
  289. package/src/lightning/inputAddress/fieldsLayout.js +3 -0
  290. package/src/lightning/inputAddress/form-element.slds.css +5 -1
  291. package/src/lightning/inputAddress/input-text.slds.css +5 -5
  292. package/src/lightning/inputAddress/inputAddress.html +1 -1
  293. package/src/lightning/inputAddress/inputAddress.js +27 -11
  294. package/src/lightning/inputLocation/form-element.slds.css +5 -1
  295. package/src/lightning/inputLocation/input-text.slds.css +5 -5
  296. package/src/lightning/inputName/form-element.slds.css +5 -1
  297. package/src/lightning/inputName/input-text.slds.css +5 -5
  298. package/src/lightning/internationalizationLibrary/address/AddressFormat.js +2 -0
  299. package/src/lightning/layout/__docs__/layout.md +0 -2
  300. package/src/lightning/lookupAddress/form-element.slds.css +5 -1
  301. package/src/lightning/menuItem/menu-item.slds.css +3 -1
  302. package/src/lightning/modal/__modalUtils__/modalContainerTestConstants.js +7 -3
  303. package/src/lightning/modal/__modalUtils__/modalContainerTestMethods.js +18 -11
  304. package/src/lightning/modal/__modalUtils__/modalContainerTestMockData.js +1 -1
  305. package/src/lightning/modalBase/modalBase.css +4 -0
  306. package/src/lightning/modalBase/modalBase.html +16 -21
  307. package/src/lightning/modalBase/modalBase.js +51 -87
  308. package/src/lightning/modalHeader/modalHeader.html +3 -15
  309. package/src/lightning/modalHeader/modalHeader.js +14 -61
  310. package/src/lightning/multiColumnSortingModal/multiColumnSortingModal.css +14 -0
  311. package/src/lightning/multiColumnSortingModal/multiColumnSortingModal.html +55 -0
  312. package/src/lightning/multiColumnSortingModal/multiColumnSortingModal.js +430 -0
  313. package/src/lightning/multiColumnSortingModal/multiColumnSortingModal.js-meta.xml +4 -0
  314. package/src/lightning/overlayManager/overlayManager.js +16 -0
  315. package/src/lightning/pill/pill.js +19 -13
  316. package/src/lightning/pillContainer/button.slds.css +16 -15
  317. package/src/lightning/pillContainer/pillContainer.js +2 -1
  318. package/src/lightning/pillContainer/standardPillContainer.html +6 -2
  319. package/src/lightning/positionLibrary/direction.js +19 -0
  320. package/src/lightning/primitiveBubble/primitiveBubble.js +33 -11
  321. package/src/lightning/primitiveColorpickerButton/primitiveColorpickerButton.html +2 -2
  322. package/src/lightning/primitiveColorpickerButton/primitiveColorpickerButton.js +8 -0
  323. package/src/lightning/primitiveColumnSorter/primitiveColumnSorter.css +34 -0
  324. package/src/lightning/primitiveColumnSorter/primitiveColumnSorter.html +60 -0
  325. package/src/lightning/primitiveColumnSorter/primitiveColumnSorter.js +107 -0
  326. package/src/lightning/primitiveHeaderFactory/primitiveHeaderFactory.js +37 -4
  327. package/src/lightning/primitiveHeaderFactory/sortingMenuHeader.css +5 -0
  328. package/src/lightning/primitiveHeaderFactory/sortingMenuHeader.html +9 -0
  329. package/src/lightning/primitiveInputCheckbox/form-element.slds.css +5 -1
  330. package/src/lightning/primitiveInputCheckbox/input-checkbox.slds.css +3 -3
  331. package/src/lightning/primitiveInputCheckbox/primitiveInputCheckbox.html +1 -1
  332. package/src/lightning/primitiveInputCheckboxButton/form-element.slds.css +5 -1
  333. package/src/lightning/primitiveInputCheckboxButton/input-checkbox-button.slds.css +6 -5
  334. package/src/lightning/primitiveInputCheckboxButton/primitiveInputCheckboxButton.html +1 -1
  335. package/src/lightning/primitiveInputColor/form-element.slds.css +5 -1
  336. package/src/lightning/primitiveInputColor/input-text.slds.css +5 -5
  337. package/src/lightning/primitiveInputColor/primitiveInputColor.html +5 -2
  338. package/src/lightning/primitiveInputColor/primitiveInputColor.js +2 -0
  339. package/src/lightning/primitiveInputFile/button.slds.css +16 -15
  340. package/src/lightning/primitiveInputFile/form-element.slds.css +5 -1
  341. package/src/lightning/primitiveInputFile/primitiveInputFile.html +1 -1
  342. package/src/lightning/primitiveInputRadio/primitiveInputRadio.html +1 -1
  343. package/src/lightning/primitiveInputSimple/form-element.slds.css +5 -1
  344. package/src/lightning/primitiveInputSimple/input-text.slds.css +5 -5
  345. package/src/lightning/primitiveInputSimple/primitiveInputSimple.html +3 -2
  346. package/src/lightning/primitiveInputSimple/primitiveInputSimple.js +15 -0
  347. package/src/lightning/primitiveInputToggle/form-element.slds.css +5 -1
  348. package/src/lightning/primitiveInputToggle/input-toggle.slds.css +16 -14
  349. package/src/lightning/primitiveInputToggle/primitiveInputToggle.html +1 -1
  350. package/src/lightning/progressBar/progress-bar.slds.css +1 -1
  351. package/src/lightning/progressIndicator/path.html +8 -2
  352. package/src/lightning/progressIndicator/progressIndicator.js +26 -2
  353. package/src/lightning/progressRing/progress-ring.slds.css +1 -1
  354. package/src/lightning/progressStep/progressStep.js +2 -1
  355. package/src/lightning/prompt/prompt.js +11 -9
  356. package/src/lightning/radioGroup/form-element.slds.css +5 -1
  357. package/src/lightning/radioGroup/input-radio-group.slds.css +4 -10
  358. package/src/lightning/select/form-element.slds.css +5 -1
  359. package/src/lightning/select/select.js +89 -7
  360. package/src/lightning/tabBar/tab-bar.slds.css +11 -0
  361. package/src/lightning/tabset/tabset.slds.css +1 -1
  362. package/src/lightning/textarea/__examples__/various/various.html +18 -1
  363. package/src/lightning/textarea/form-element.slds.css +5 -1
  364. package/src/lightning/textarea/textarea.html +1 -0
  365. package/src/lightning/textarea/textarea.js +25 -0
  366. package/src/lightning/textarea/textarea.slds.css +2 -2
  367. package/src/lightning/timepicker/form-element.slds.css +5 -1
  368. package/src/lightning/timepicker/timepicker.html +4 -1
  369. package/src/lightning/timepicker/timepicker.js +3 -0
  370. package/src/lightning/toast/button-icon.slds.css +41 -25
  371. package/src/lightning/tooltipLibrary/tooltipLibrary.js +4 -15
  372. package/src/lightning/verticalNavigationItem/vertical-navigation-item.slds.css +1 -1
  373. package/src/lightning/verticalNavigationItemBadge/badge.slds.css +1 -1
  374. package/src/lightning/verticalNavigationItemBadge/vertical-navigation-item.slds.css +1 -1
  375. package/src/lightning/verticalNavigationItemIcon/vertical-navigation-item.slds.css +1 -1
  376. package/src/lightning/verticalNavigationOverflow/button.slds.css +16 -15
  377. package/src/lightning/verticalNavigationOverflow/vertical-navigation-item.slds.css +1 -1
  378. package/scopedImports/@salesforce-label-LightningLookup.messageWhenSearchTermTooShort.js +0 -1
  379. package/src/lightning/datatable/columns-shared.js +0 -12
@@ -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} _state - The untracked datatable state
20
+ * @param {Object} state - The datatable state
21
21
  */
22
22
  export function resetErrors(state) {
23
23
  state.errors = {
@@ -1,42 +1,53 @@
1
- import { generateColKeyValue } from './columns';
2
-
3
1
  export const HEADER_ROW_INDEX = -1;
4
2
  export const HEADER_ROW_KEY = 'HEADER';
5
3
 
6
4
  export function getCellFromIndexes(state, rowIndex, colIndex) {
7
5
  const { columns, rows } = state;
8
- if (columns.length > 0) {
9
- return {
10
- rowKeyValue:
11
- rowIndex === HEADER_ROW_INDEX
12
- ? HEADER_ROW_KEY
13
- : rows[rowIndex].key,
14
- colKeyValue: generateColKeyValue(columns[colIndex], colIndex),
15
- };
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}`];
16
11
  }
17
12
  return undefined;
18
13
  }
19
14
 
15
+ export function getCellByKeys(state, rowKeyValue, colKeyValue) {
16
+ return state.indexes[`${rowKeyValue}-${colKeyValue}`];
17
+ }
18
+
20
19
  export function getRowIndexByKey(state, rowKeyValue) {
21
20
  const row = state.indexes[rowKeyValue];
22
21
  return row ? row.rowIndex : undefined;
23
22
  }
24
23
 
25
- export function getRowByKey(state, key) {
26
- return state.rows[getRowIndexByKey(state, key)];
24
+ export function getRowByKey(state, rowKeyValue) {
25
+ return state.indexes[rowKeyValue];
27
26
  }
28
27
 
29
- export function getUserRowByCellKeys(state, rowKeyValue, colKeyValue) {
30
- const rowIndex = state.indexes[rowKeyValue][colKeyValue][0];
31
- return state.data[rowIndex];
28
+ export function getUserRowByKey(state, rowKeyValue) {
29
+ const row = state.indexes[rowKeyValue];
30
+ return row ? state.data[row.rowIndex] : undefined;
32
31
  }
33
32
 
34
33
  export function isValidCell(state, rowKeyValue, colKeyValue) {
35
- if (rowKeyValue === HEADER_ROW_KEY) {
36
- return state.headerIndexes[colKeyValue] !== undefined;
37
- }
38
- const row = getRowByKey(state, rowKeyValue);
39
- const colIndex = state.headerIndexes[colKeyValue];
34
+ return state.indexes[`${rowKeyValue}-${colKeyValue}`] !== undefined;
35
+ }
40
36
 
41
- return row && row.cells[colIndex];
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;
42
53
  }
@@ -94,7 +94,7 @@ export function handlePrefetch() {
94
94
  if (
95
95
  state.isLoading ||
96
96
  !state.enableInfiniteLoading ||
97
- (this.viewportRendering &&
97
+ (state.enableViewportRendering &&
98
98
  this._renderManager &&
99
99
  !this._renderManager.hasWrapperHeight()) ||
100
100
  !hasData(template)
@@ -137,14 +137,15 @@ function isScrollerVisible(scroller) {
137
137
  }
138
138
 
139
139
  /**
140
- * Determines if a root element has data
140
+ * Determines if a template has data
141
141
  *
142
- * @param {Element} root The parent element to check
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(root) {
145
+ function hasData(template) {
146
146
  return (
147
- root.querySelectorAll('tbody > tr, [role="rowgroup"] > [role="row"]')
148
- .length > 0
147
+ template.querySelectorAll(
148
+ 'tbody > tr, [role="rowgroup"] > [role="row"]'
149
+ ).length > 0
149
150
  );
150
151
  }
@@ -10,9 +10,9 @@ import {
10
10
  getActiveCellElement,
11
11
  isActiveCellEditable,
12
12
  NAVIGATION_DIR,
13
- isValidCell,
13
+ getCellElementFromEventTarget,
14
14
  } from './keyboard';
15
- import { updateRowsAndCellIndexes, isCellEditable } from './rows';
15
+ import { updateRowsAndCells } from './rows';
16
16
  import { getStateColumnIndex } from './columns';
17
17
  import { resetErrors } from './errors';
18
18
  import { setAriaSelectedOnCell, unsetAriaSelectedOnCell } from './rowSelection';
@@ -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 { getRowByKey, getUserRowByCellKeys } from './indexes';
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
- openInlineEdit(this, event.target);
40
+ const cellElement = getCellElementFromEventTarget(event.target);
41
+ openInlineEdit(this, cellElement);
40
42
  }
41
43
 
42
44
  /**
@@ -161,7 +163,7 @@ export function cancelInlineEdit(dt) {
161
163
  resetErrors(state);
162
164
  state.inlineEdit.dirtyValues = {};
163
165
  dt._draftValues = [];
164
- updateRowsAndCellIndexes(state, _privateTypes);
166
+ updateRowsAndCells(state, _privateTypes);
165
167
  }
166
168
 
167
169
  export function closeInlineEdit(dt) {
@@ -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 = getCellValue(state, rowKeyValue, colKeyValue);
225
+ const currentValue = getCellByKeys(
226
+ state,
227
+ rowKeyValue,
228
+ colKeyValue
229
+ ).value;
224
230
  const { isMassEditChecked: updateAllSelectedRows, value: editValue } =
225
231
  panel;
226
232
 
@@ -247,7 +253,7 @@ function processInlineEditFinish(dt, reason, rowKeyValue, colKeyValue) {
247
253
  dispatchCellChangeEvent(dt, changes);
248
254
 
249
255
  // TODO: do we need to update all rows in the dt or just the one that was modified?
250
- updateRowsAndCellIndexes(state, dt._privateTypes);
256
+ updateRowsAndCells(state, dt._privateTypes);
251
257
  }
252
258
  }
253
259
 
@@ -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, target) {
289
- startPanelPositioning(dt, target.parentElement);
294
+ function openInlineEdit(dt, cellElement) {
295
+ startPanelPositioning(dt, cellElement);
290
296
 
291
- const { state, template, privateTypes: types } = dt;
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, colKeyValue } = target;
306
- const colIndex = getStateColumnIndex(state, colKeyValue);
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 = getCellValue(state, rowKeyValue, colKeyValue);
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
- colKeyValue,
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 = null;
447
+ dt._positionRelationship = undefined;
444
448
  }
445
449
  }
446
450
 
@@ -571,9 +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 col = columns[colIndex];
575
- cellChanges[col.columnKey || col.fieldName] =
576
- colChanges[colKeyValue];
578
+ const { name: colName } = columns[colIndex];
579
+ cellChanges[colName] = colChanges[colKeyValue];
577
580
  }
578
581
  }
579
582
  result.push(cellChanges);
@@ -589,20 +592,18 @@ function getResolvedCellChanges(state, rowChanges) {
589
592
  *
590
593
  * @param {Object} state - The datatable state
591
594
  * @param {String} rowKeyValue - The row key
592
- * @param {String} colKeyValue - The column key
595
+ * @param {Number} colIndex - The column index
593
596
  * @param {Object} types - The type handling factory
594
597
  * @param {Object} typeAttributes - values of typeAttributes from column definition
595
- * @param {Number} colIndex - The column index
596
598
  *
597
599
  * @returns {Object} The resolved typeAttributes.
598
600
  */
599
601
  export function resolveNestedTypeAttributes(
600
602
  state,
601
603
  rowKeyValue,
602
- colKeyValue,
604
+ colIndex,
603
605
  types,
604
- typeAttributes,
605
- colIndex
606
+ typeAttributes
606
607
  ) {
607
608
  const col = state.columns[colIndex];
608
609
  const typeDesc = typeAttributes && types.getType(col.type);
@@ -611,16 +612,20 @@ export function resolveNestedTypeAttributes(
611
612
  if (attributeNames) {
612
613
  const resolvedTypeAttributes = {};
613
614
  const { length: attributeNamesLength } = attributeNames;
614
- const _rowData = getUserRowByCellKeys(state, rowKeyValue, colKeyValue);
615
- // We only want to resolve typeAttributes based on the custom types configuration
616
- // If the attribute is not in that configuration, the value of attrValue
617
- // for that will be undefined. This behavior is consistent with view cell.
618
- for (let i = 0; i < attributeNamesLength; i += 1) {
619
- const attrName = attributeNames[i];
620
- const attrValue = typeAttributes[attrName];
621
- if (attrValue) {
622
- resolvedTypeAttributes[attrName] =
623
- resolveNestedTypeAttributesHelper(_rowData, attrValue);
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
+ }
624
629
  }
625
630
  }
626
631
  return resolvedTypeAttributes;
@@ -646,7 +651,7 @@ export function resolveNestedTypeAttributes(
646
651
  */
647
652
  function resolveNestedTypeAttributesHelper(rowData, attrValue) {
648
653
  let resolvedTypeAttributes = {};
649
- if (!(typeof attrValue === 'object' && attrValue !== null)) {
654
+ if (!isObjectLike(attrValue)) {
650
655
  // Primitive value.
651
656
  // For example, if the typeAttributes is { count: 5},
652
657
  // 5 will be the attrValue passed in to the function.
@@ -666,7 +671,7 @@ function resolveNestedTypeAttributesHelper(rowData, attrValue) {
666
671
  // so we need to check if key is 'fieldName' or not and resolve it immediately.
667
672
  if (name === 'fieldName') {
668
673
  resolvedTypeAttributes = rowData[value];
669
- } else if (typeof value === 'object' && value !== null) {
674
+ } else if (isObjectLike(value)) {
670
675
  // This is the case when attrValue is something like {label: {fieldName: 'name'}}.
671
676
  // It's an object but the value maps a field name
672
677
  const { fieldName } = value;
@@ -710,17 +715,16 @@ function getFirstEditableCell(dt) {
710
715
  if (editableColumnsLength > 0) {
711
716
  const { rows } = state;
712
717
  for (let rowIndex = 0; rowIndex < rows.length; rowIndex += 1) {
713
- const { key: rowKeyValue } = rows[rowIndex];
718
+ const row = rows[rowIndex];
719
+ const { key: rowKeyValue } = row;
714
720
  for (let i = 0; i < editableColumnsLength; i += 1) {
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
- if (isCellEditable(rows[rowIndex], editableColumn)) {
720
- return {
721
- rowKeyValue,
722
- colKeyValue: editableColumn.colKeyValue,
723
- };
724
+ const { colKeyValue } = editableColumns[i];
725
+ const cell = getCellByKeys(state, rowKeyValue, colKeyValue);
726
+ if (cell && cell.editable) {
727
+ return cell;
724
728
  }
725
729
  }
726
730
  }
@@ -729,22 +733,6 @@ function getFirstEditableCell(dt) {
729
733
  return undefined;
730
734
  }
731
735
 
732
- /**
733
- * Returns the current value of the cell, already takes into account the dirty value
734
- *
735
- * @param {Object} state - state of the datatable
736
- * @param {String} rowKeyValue - row key
737
- * @param {String} colKeyValue - column key
738
- *
739
- * @returns {Object} the value for the current cell.
740
- */
741
- function getCellValue(state, rowKeyValue, colKeyValue) {
742
- const row = getRowByKey(state, rowKeyValue);
743
- const colIndex = getStateColumnIndex(state, colKeyValue);
744
-
745
- return row.cells[colIndex].value;
746
- }
747
-
748
736
  /**
749
737
  * Sets `aria-selected` to true on cells whose rows are selected
750
738
  * and are in the same column as the cell being currently edited