lightning-base-components 1.14.7-alpha → 1.15.3-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 +64 -2
- package/package.json +64 -2
- package/scopedImports/@salesforce-i18n-calendarData.js +1 -0
- package/scopedImports/@salesforce-i18n-common.calendarData.js +1 -0
- package/scopedImports/@salesforce-i18n-common.digits.js +1 -0
- package/scopedImports/@salesforce-i18n-dateTime.longDateTimeFormat.js +1 -0
- package/scopedImports/@salesforce-i18n-defaultCalendar.js +1 -0
- package/scopedImports/@salesforce-i18n-defaultNumberingSystem.js +1 -0
- package/scopedImports/@salesforce-i18n-number.exponentialSign.js +1 -0
- package/scopedImports/@salesforce-i18n-number.infinity.js +1 -0
- package/scopedImports/@salesforce-i18n-number.minusSign.js +1 -0
- package/scopedImports/@salesforce-i18n-number.nan.js +1 -0
- package/scopedImports/@salesforce-i18n-number.perMilleSign.js +1 -0
- package/scopedImports/@salesforce-i18n-number.percentSign.js +1 -0
- package/scopedImports/@salesforce-i18n-number.plusSign.js +1 -0
- package/scopedImports/@salesforce-i18n-number.superscriptingExponentSign.js +1 -0
- package/scopedImports/@salesforce-internal-core.appVersion.js +1 -1
- package/scopedImports/@salesforce-label-LightningMap.defaultTitle.js +1 -0
- package/src/lightning/alert/__docs__/alert.md +4 -6
- package/src/lightning/baseCombobox/baseCombobox.html +3 -1
- package/src/lightning/baseCombobox/baseCombobox.js +44 -7
- package/src/lightning/button/__wdio__/utam/utam.html +3 -0
- package/src/lightning/button/__wdio__/utam/utam.js +3 -0
- package/src/lightning/button/__wdio__/utam/utam.spec.js +20 -0
- package/src/lightning/button/button.js +22 -1
- package/src/lightning/buttonIcon/buttonIcon.js +0 -3
- package/src/lightning/calendar/calendar.html +2 -1
- package/src/lightning/calendar/calendar.js +2 -2
- package/src/lightning/checkboxGroup/checkboxGroup.html +2 -2
- package/src/lightning/checkboxGroup/checkboxGroup.js +9 -5
- package/src/lightning/combobox/__docs__/combobox.md +3 -1
- package/src/lightning/combobox/combobox.html +1 -1
- package/src/lightning/combobox/combobox.js +7 -2
- package/src/lightning/configProvider/defaultLocalizationConfig.js +43 -6
- package/src/lightning/confirm/__docs__/confirm.md +2 -4
- package/src/lightning/datatable/__examples__/basic/basic.js +3 -4
- package/src/lightning/datatable/__examples__/basic/generateData.js +13 -0
- package/src/lightning/datatable/__examples__/withInfiniteLoading/generateDataWithDelay.js +18 -0
- package/src/lightning/datatable/__examples__/withInfiniteLoading/withInfiniteLoading.js +3 -3
- package/src/lightning/datatable/__examples__/withInlineEdit/generateData.js +13 -0
- package/src/lightning/datatable/__examples__/withInlineEdit/withInlineEdit.js +3 -4
- package/src/lightning/datatable/__examples__/withRowActions/generateData.js +13 -0
- package/src/lightning/datatable/__examples__/withRowActions/withRowActions.js +3 -4
- package/src/lightning/datatable/__examples__/withRowNumbers/generateData.js +13 -0
- package/src/lightning/datatable/__examples__/withRowNumbers/withRowNumbers.js +3 -4
- package/src/lightning/datatable/__wdio__/utam/utam.html +32 -0
- package/src/lightning/datatable/__wdio__/utam/utam.js +91 -0
- package/src/lightning/datatable/__wdio__/utam/utam.spec.js +214 -0
- package/src/lightning/datatable/datatable.js +18 -8
- package/src/lightning/datatable/inlineEdit.js +0 -5
- package/src/lightning/datatable/inlineEditShared.js +4 -2
- package/src/lightning/datatable/keyboard.js +13 -5
- package/src/lightning/datatable/rowSelection.js +8 -2
- package/src/lightning/datatable/rows.js +2 -0
- package/src/lightning/datatable/state.js +1 -0
- package/src/lightning/datatable/templates/div/div.html +6 -2
- package/src/lightning/datatable/templates/table/table.html +7 -4
- package/src/lightning/datatable/utils.js +11 -0
- package/src/lightning/datatable/virtualization.js +2 -2
- package/src/lightning/datatable/wrapText.js +1 -0
- package/src/lightning/datepicker/__perf__DISABLED/datepickerWithCalendarOpen.perf.js +55 -0
- package/src/lightning/datepicker/datepicker.html +5 -4
- package/src/lightning/datepicker/datepicker.js +35 -77
- package/src/lightning/datetimepicker/datetimepicker.html +3 -1
- package/src/lightning/datetimepicker/datetimepicker.js +44 -8
- package/src/lightning/dualListbox/dualListbox.html +1 -1
- package/src/lightning/dualListbox/dualListbox.js +8 -1
- package/src/lightning/fileDownload/fileDownload.js +15 -0
- package/src/lightning/fileDownload/fileDownload.js-meta.xml +5 -0
- package/src/lightning/fileDownload/resourceResolver.js +58 -0
- package/src/lightning/formattedAddress/__docs__/formattedAddress.md +3 -0
- package/src/lightning/formattedAddress/__examples__/customLocale/customLocale.html +22 -0
- package/src/lightning/formattedAddress/__examples__/customLocale/customLocale.js +3 -0
- package/src/lightning/formattedAddress/formattedAddress.js +7 -1
- package/src/lightning/formattedDateTime/formattedDateTime.js +1 -1
- package/src/lightning/formattedLookup/events.js +19 -0
- package/src/lightning/formattedLookup/formattedLookup.js +7 -0
- package/src/lightning/formattedRichText/__docs__/formattedRichText.md +9 -7
- package/src/lightning/formattedRichText/__examples__disabled/basic/basic.html +1 -1
- package/src/lightning/formattedTime/formattedTime.js +2 -1
- package/src/lightning/groupedCombobox/groupedCombobox.html +3 -2
- package/src/lightning/groupedCombobox/groupedCombobox.js +26 -4
- package/src/lightning/helptext/helptext.html +1 -0
- package/src/lightning/helptext/helptext.js +29 -2
- package/src/lightning/iconSvgTemplates/buildTemplates/action/scan_disabled.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/action/scan_enabled.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/ai_accelerator_card.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/connect_wallet.html +9 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/contract_line_outcome.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/contract_line_outcome_data.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/crypto_category_wallet_group.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/crypto_product.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/crypto_product_category_wallet_role.html +9 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/crypto_transaction.html +9 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/crypto_transaction_envelope.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/crypto_transaction_envelope_item.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/crypto_wallet.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/crypto_wallet_group.html +9 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/crypto_wallet_group_item.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/customer.html +10 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/customer_workspace.html +11 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/learner_program.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/nft_settings.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/nft_studio.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/prompt.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/setup_modal.html +11 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/snippet_alt.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/tax_policy.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/tax_rate.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/tax_treatment.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/travel_mode.html +2 -2
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/water.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/templates.js +48 -1
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/captions.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/contract_line_outcome.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/contract_line_outcome_data.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/customer.html +10 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/customer_workspace.html +11 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/detach.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/hazmat_equipment.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/label.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/labels.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/record_alt.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/segments.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/tax_policy.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/tax_rate.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/tax_treatment.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/tollways.html +8 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/transport_bicycle.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/transport_heavy_truck.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/transport_light_truck.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/transport_walking.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/water.html +7 -0
- package/src/lightning/iconSvgTemplatesAction/buildTemplates/action/scan_disabled.html +7 -0
- package/src/lightning/iconSvgTemplatesAction/buildTemplates/action/scan_enabled.html +7 -0
- package/src/lightning/iconSvgTemplatesAction/buildTemplates/templates.js +3 -1
- package/src/lightning/iconSvgTemplatesActionRtl/buildTemplates/action/scan_disabled.html +7 -0
- package/src/lightning/iconSvgTemplatesActionRtl/buildTemplates/action/scan_enabled.html +7 -0
- package/src/lightning/iconSvgTemplatesActionRtl/buildTemplates/templates.js +3 -1
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/action/scan_disabled.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/action/scan_enabled.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/ai_accelerator_card.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/connect_wallet.html +9 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/contract_line_outcome.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/contract_line_outcome_data.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/crypto_category_wallet_group.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/crypto_product.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/crypto_product_category_wallet_role.html +9 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/crypto_transaction.html +9 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/crypto_transaction_envelope.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/crypto_transaction_envelope_item.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/crypto_wallet.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/crypto_wallet_group.html +9 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/crypto_wallet_group_item.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/customer.html +10 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/customer_workspace.html +11 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/learner_program.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/nft_settings.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/nft_studio.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/prompt.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/setup_modal.html +11 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/snippet_alt.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/tax_policy.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/tax_rate.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/tax_treatment.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/travel_mode.html +2 -2
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/water.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/templates.js +48 -1
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/captions.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/contract_line_outcome.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/contract_line_outcome_data.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/customer.html +10 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/customer_workspace.html +11 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/detach.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/hazmat_equipment.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/label.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/labels.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/record_alt.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/segments.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/tax_policy.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/tax_rate.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/tax_treatment.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/tollways.html +8 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/transport_bicycle.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/transport_heavy_truck.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/transport_light_truck.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/transport_walking.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/water.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/ai_accelerator_card.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/connect_wallet.html +9 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/contract_line_outcome.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/contract_line_outcome_data.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/crypto_category_wallet_group.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/crypto_product.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/crypto_product_category_wallet_role.html +9 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/crypto_transaction.html +9 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/crypto_transaction_envelope.html +8 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/crypto_transaction_envelope_item.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/crypto_wallet.html +8 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/crypto_wallet_group.html +9 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/crypto_wallet_group_item.html +8 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/customer.html +10 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/customer_workspace.html +11 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/learner_program.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/nft_settings.html +8 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/nft_studio.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/prompt.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/setup_modal.html +11 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/snippet_alt.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/tax_policy.html +8 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/tax_rate.html +8 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/tax_treatment.html +8 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/travel_mode.html +2 -2
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/water.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/templates.js +26 -1
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/ai_accelerator_card.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/connect_wallet.html +9 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/contract_line_outcome.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/contract_line_outcome_data.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/crypto_category_wallet_group.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/crypto_product.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/crypto_product_category_wallet_role.html +9 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/crypto_transaction.html +9 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/crypto_transaction_envelope.html +8 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/crypto_transaction_envelope_item.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/crypto_wallet.html +8 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/crypto_wallet_group.html +9 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/crypto_wallet_group_item.html +8 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/customer.html +10 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/customer_workspace.html +11 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/learner_program.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/nft_settings.html +8 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/nft_studio.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/prompt.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/setup_modal.html +11 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/snippet_alt.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/tax_policy.html +8 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/tax_rate.html +8 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/tax_treatment.html +8 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/travel_mode.html +2 -2
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/water.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/templates.js +26 -1
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/templates.js +21 -1
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/captions.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/contract_line_outcome.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/contract_line_outcome_data.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/customer.html +10 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/customer_workspace.html +11 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/detach.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/hazmat_equipment.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/label.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/labels.html +8 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/record_alt.html +8 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/segments.html +8 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/tax_policy.html +8 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/tax_rate.html +8 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/tax_treatment.html +8 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/tollways.html +8 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/transport_bicycle.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/transport_heavy_truck.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/transport_light_truck.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/transport_walking.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/water.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/templates.js +21 -1
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/captions.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/contract_line_outcome.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/contract_line_outcome_data.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/customer.html +10 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/customer_workspace.html +11 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/detach.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/hazmat_equipment.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/label.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/labels.html +8 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/record_alt.html +8 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/segments.html +8 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/tax_policy.html +8 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/tax_rate.html +8 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/tax_treatment.html +8 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/tollways.html +8 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/transport_bicycle.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/transport_heavy_truck.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/transport_light_truck.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/transport_walking.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/water.html +7 -0
- package/src/lightning/input/dateTimeUtil.js +2 -2
- package/src/lightning/input/input.html +6 -0
- package/src/lightning/input/input.js +2 -1
- package/src/lightning/inputAddress/__docs__/inputAddress.md +5 -0
- package/src/lightning/inputAddress/__examples__/customLocale/customLocale.html +12 -0
- package/src/lightning/inputAddress/__examples__/customLocale/customLocale.js +3 -0
- package/src/lightning/inputAddress/inputAddress.html +3 -1
- package/src/lightning/inputAddress/inputAddress.js +33 -4
- package/src/lightning/inputLocation/inputLocation.html +1 -1
- package/src/lightning/inputLocation/inputLocation.js +7 -1
- package/src/lightning/inputName/__docs__/inputName.md +2 -0
- package/src/lightning/inputName/inputName.html +5 -2
- package/src/lightning/inputName/inputName.js +7 -1
- package/src/lightning/inputUtils/inputUtils.js +11 -0
- package/src/lightning/interactiveDialogBase/interactiveDialogBase.js +1 -0
- package/src/lightning/internationalizationLibrary/datetime/dateTimeOptions.js +16 -29
- package/src/lightning/internationalizationLibrary/datetime/dateTimeUtils.js +524 -135
- package/src/lightning/internationalizationLibrary/datetime/intlFormat.js +92 -72
- package/src/lightning/internationalizationLibrary/internationalizationLibrary.js +9 -4
- package/src/lightning/internationalizationLibrary/localizationService.js +1 -0
- package/src/lightning/internationalizationLibrary/number/NumberFormat.js +17 -11
- package/src/lightning/internationalizationLibrary/number/numberFormatFallback.js +3 -2
- package/src/lightning/internationalizationLibrary/number/numberOptions.js +22 -26
- package/src/lightning/internationalizationLibrary/number/utils.js +134 -131
- package/src/lightning/internationalizationLibrary/utils.js +14 -0
- package/src/lightning/iso8601Utils/iso8601Utils.js +1 -0
- package/src/lightning/modalBase/modalBase.css +0 -4
- package/src/lightning/modalBase/modalBase.html +1 -1
- package/src/lightning/modalBase/modalBase.js +0 -14
- package/src/lightning/navigation/__docs__/navigation.md +0 -2
- package/src/lightning/overlayContainer/overlayContainer.html +2 -2
- package/src/lightning/overlayContainer/overlayContainer.js +217 -49
- package/src/lightning/overlayManager/overlayManager.js +378 -28
- package/src/lightning/overlayManager/overlayManager.js-meta.xml +5 -0
- package/src/lightning/picklist/picklist.js +6 -1
- package/src/lightning/primitiveCellFactory/primitiveCellFactory.js +1 -11
- package/src/lightning/prompt/__docs__/prompt.md +2 -4
- package/src/lightning/radioGroup/radioGroup.js +9 -0
- package/src/lightning/select/select.html +4 -2
- package/src/lightning/select/select.js +12 -2
- package/src/lightning/tabBar/tabBar.html +3 -2
- package/src/lightning/tabBar/tabBar.js +15 -0
- package/src/lightning/textarea/textarea.html +2 -1
- package/src/lightning/textarea/textarea.js +12 -1
- package/src/lightning/timepicker/timepicker.html +4 -2
- package/src/lightning/timepicker/timepicker.js +49 -86
- package/src/lightning/utils/labelUtils.js +4 -1
- package/src/lightning/utilsPrivate/animation.js +0 -4
- package/src/lightning/utilsPrivate/aria.js +26 -0
- package/src/lightning/utilsPrivate/linkify.js +1 -1
- package/src/lightning/utilsPrivate/utilsPrivate.js +7 -1
- package/src/lightning/datatable/__examples__/basic/fetchDataHelper.js +0 -21
- package/src/lightning/datatable/__examples__/withInfiniteLoading/fetchDataHelper.js +0 -21
- package/src/lightning/datatable/__examples__/withInlineEdit/fetchDataHelper.js +0 -21
- package/src/lightning/datatable/__examples__/withRowActions/fetchDataHelper.js +0 -21
- package/src/lightning/datatable/__examples__/withRowNumbers/fetchDataHelper.js +0 -21
- package/src/lightning/icon/__component__/icon-spirite.spec.js +0 -59
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LightningElement } from 'lwc';
|
|
2
|
-
import
|
|
2
|
+
import generateData from './generateData';
|
|
3
3
|
|
|
4
4
|
const actions = [
|
|
5
5
|
{ label: 'Show details', name: 'show_details' },
|
|
@@ -23,9 +23,8 @@ export default class DatatableWithRowActions extends LightningElement {
|
|
|
23
23
|
columns = columns;
|
|
24
24
|
record = {};
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
this.data = await fetchDataHelper({ amountOfRecords: 100 });
|
|
26
|
+
connectedCallback() {
|
|
27
|
+
this.data = generateData({ amountOfRecords: 100 });
|
|
29
28
|
}
|
|
30
29
|
|
|
31
30
|
handleRowAction(event) {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export default function generateData({ amountOfRecords }) {
|
|
2
|
+
return [...Array(amountOfRecords)].map((_, index) => {
|
|
3
|
+
return {
|
|
4
|
+
name: `Name (${index})`,
|
|
5
|
+
website: 'www.salesforce.com',
|
|
6
|
+
amount: Math.floor(Math.random() * 100),
|
|
7
|
+
phone: Math.floor(Math.random() * 1000000000),
|
|
8
|
+
closeAt: new Date(
|
|
9
|
+
Date.now() + 86400000 * Math.ceil(Math.random() * 20)
|
|
10
|
+
),
|
|
11
|
+
};
|
|
12
|
+
});
|
|
13
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LightningElement } from 'lwc';
|
|
2
|
-
import
|
|
2
|
+
import generateData from './generateData';
|
|
3
3
|
|
|
4
4
|
const columns = [
|
|
5
5
|
{ label: 'Label', fieldName: 'name' },
|
|
@@ -14,9 +14,8 @@ export default class BasicDatatable extends LightningElement {
|
|
|
14
14
|
columns = columns;
|
|
15
15
|
rowOffset = 0;
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
this.data = await fetchDataHelper({ amountOfRecords: 100 });
|
|
17
|
+
connectedCallback() {
|
|
18
|
+
this.data = generateData({ amountOfRecords: 100 });
|
|
20
19
|
}
|
|
21
20
|
|
|
22
21
|
increaseRowOffset() {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="height:160px">
|
|
3
|
+
<lightning-datatable
|
|
4
|
+
data-render-mode="default"
|
|
5
|
+
key-field="id"
|
|
6
|
+
columns={columns}
|
|
7
|
+
data={data}
|
|
8
|
+
default-sort-direction={defaultSortDirection}
|
|
9
|
+
sorted-direction={sortDirection}
|
|
10
|
+
sorted-by={sortedBy}
|
|
11
|
+
onsort={onHandleSort}
|
|
12
|
+
is-loading={loading}>
|
|
13
|
+
</lightning-datatable>
|
|
14
|
+
</div>
|
|
15
|
+
<div style="height:160px">
|
|
16
|
+
<lightning-datatable
|
|
17
|
+
data-render-mode="role-based"
|
|
18
|
+
key-field="id"
|
|
19
|
+
columns={columns}
|
|
20
|
+
data={data}
|
|
21
|
+
default-sort-direction={defaultSortDirection}
|
|
22
|
+
sorted-direction={sortDirection}
|
|
23
|
+
sorted-by={sortedBy}
|
|
24
|
+
onsort={onHandleSort}
|
|
25
|
+
is-loading={loading}
|
|
26
|
+
render-mode="role-based">
|
|
27
|
+
</lightning-datatable>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<lightning-button label="Enable Loading State" onclick={handleLoadingClick}></lightning-button>
|
|
31
|
+
<lightning-button label="Add More Rows" onclick={handleMoreRowsClick}></lightning-button>
|
|
32
|
+
</template>
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { LightningElement } from 'lwc';
|
|
2
|
+
|
|
3
|
+
const data = [
|
|
4
|
+
{ id: 1, name: 'Billy Simmons', age: 40, email: 'billy@salesforce.com' },
|
|
5
|
+
{ id: 2, name: 'Kelsey Denesik', age: 35, email: 'kelsey@salesforce.com' },
|
|
6
|
+
{ id: 3, name: 'Kyle Ruecker', age: 50, email: 'kyle@salesforce.com' },
|
|
7
|
+
{
|
|
8
|
+
id: 4,
|
|
9
|
+
name: 'Krystina Kerluke',
|
|
10
|
+
age: 37,
|
|
11
|
+
email: 'krystina@salesforce.com',
|
|
12
|
+
},
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
const actions = [
|
|
16
|
+
{ label: 'Show details', name: 'show_details' },
|
|
17
|
+
{ label: 'Delete', name: 'delete' },
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
const columns = [
|
|
21
|
+
{ label: 'Name', fieldName: 'name' },
|
|
22
|
+
{
|
|
23
|
+
label: 'Age',
|
|
24
|
+
fieldName: 'age',
|
|
25
|
+
type: 'number',
|
|
26
|
+
sortable: true,
|
|
27
|
+
cellAttributes: { alignment: 'left' },
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
label: 'Email',
|
|
31
|
+
fieldName: 'email',
|
|
32
|
+
type: 'email',
|
|
33
|
+
hideDefaultActions: true,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
type: 'action',
|
|
37
|
+
typeAttributes: { rowActions: actions, menuAlignment: 'right' },
|
|
38
|
+
},
|
|
39
|
+
];
|
|
40
|
+
|
|
41
|
+
export default class DemoApp extends LightningElement {
|
|
42
|
+
data = data;
|
|
43
|
+
columns = columns;
|
|
44
|
+
defaultSortDirection = 'asc';
|
|
45
|
+
sortDirection = 'asc';
|
|
46
|
+
sortedBy;
|
|
47
|
+
loading = false;
|
|
48
|
+
|
|
49
|
+
// Used to sort the 'Age' column
|
|
50
|
+
sortBy(field, reverse, primer) {
|
|
51
|
+
const key = primer
|
|
52
|
+
? function (x) {
|
|
53
|
+
return primer(x[field]);
|
|
54
|
+
}
|
|
55
|
+
: function (x) {
|
|
56
|
+
return x[field];
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
return function (a, b) {
|
|
60
|
+
a = key(a);
|
|
61
|
+
b = key(b);
|
|
62
|
+
return reverse * ((a > b) - (b > a));
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
onHandleSort(event) {
|
|
67
|
+
const { fieldName: sortedBy, sortDirection } = event.detail;
|
|
68
|
+
const cloneData = [...this.data];
|
|
69
|
+
|
|
70
|
+
cloneData.sort(this.sortBy(sortedBy, sortDirection === 'asc' ? 1 : -1));
|
|
71
|
+
this.data = cloneData;
|
|
72
|
+
this.sortDirection = sortDirection;
|
|
73
|
+
this.sortedBy = sortedBy;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
handleLoadingClick() {
|
|
77
|
+
this.loading = !this.loading;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
handleMoreRowsClick() {
|
|
81
|
+
const control = [
|
|
82
|
+
{
|
|
83
|
+
id: 20,
|
|
84
|
+
name: 'Jacqueline Palmer',
|
|
85
|
+
age: 60,
|
|
86
|
+
email: 'jacqueline@salesforce.com',
|
|
87
|
+
},
|
|
88
|
+
];
|
|
89
|
+
this.data = this.data.concat(this.data).concat(control);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
const Datatable = require('pageobjects/datatable');
|
|
2
|
+
const Button = require('pageobjects/button');
|
|
3
|
+
|
|
4
|
+
const tableTypes = {
|
|
5
|
+
default: '[data-render-mode="default"]',
|
|
6
|
+
roleBased: '[data-render-mode="role-based"]',
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
describe('Datatable UTAM Page Object Tests', () => {
|
|
10
|
+
Object.keys(tableTypes).forEach((type) => {
|
|
11
|
+
describe(`${type} table`, () => {
|
|
12
|
+
const TABLE_SELECTOR = tableTypes[type];
|
|
13
|
+
|
|
14
|
+
let root;
|
|
15
|
+
|
|
16
|
+
beforeEach(async () => {
|
|
17
|
+
await browser.url('/datatable/utam');
|
|
18
|
+
root = await $('datatable-utam');
|
|
19
|
+
await root.waitForDisplayed();
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('should get the cell value by row and column index', async () => {
|
|
23
|
+
const datatable = await utam.load(Datatable, {
|
|
24
|
+
element: await root.shadow$(TABLE_SELECTOR),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const cellValue = await datatable.getCellValueByIndex(1, 2);
|
|
28
|
+
expect(cellValue).toBe('Billy Simmons');
|
|
29
|
+
});
|
|
30
|
+
it('should get the cell value by row index and column label', async () => {
|
|
31
|
+
const datatable = await utam.load(Datatable, {
|
|
32
|
+
element: await root.shadow$(TABLE_SELECTOR),
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
const cellValue = await datatable.getCellValueByLabel(2, 'Age');
|
|
36
|
+
expect(cellValue).toBe('35');
|
|
37
|
+
});
|
|
38
|
+
it('should get the number of rows in the table', async () => {
|
|
39
|
+
const datatable = await utam.load(Datatable, {
|
|
40
|
+
element: await root.shadow$(TABLE_SELECTOR),
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
const cellValue = await datatable.getNumRows();
|
|
44
|
+
expect(cellValue).toBe(4);
|
|
45
|
+
});
|
|
46
|
+
it('should tell if the table has any rows', async () => {
|
|
47
|
+
const datatable = await utam.load(Datatable, {
|
|
48
|
+
element: await root.shadow$(TABLE_SELECTOR),
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
const cellValue = await datatable.hasRows();
|
|
52
|
+
expect(cellValue).toBe(true);
|
|
53
|
+
});
|
|
54
|
+
it('should toggle selection of row - comprehensive', async () => {
|
|
55
|
+
const datatable = await utam.load(Datatable, {
|
|
56
|
+
element: await root.shadow$(TABLE_SELECTOR),
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
for (let i = 1; i <= 4; i++) {
|
|
60
|
+
expect(await datatable.isRowSelected(i)).toBe('false');
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
await datatable.toggleRowSelection(1);
|
|
64
|
+
expect(await datatable.isRowSelected(1)).toBe('true');
|
|
65
|
+
[2, 3, 4].forEach(async (i) => {
|
|
66
|
+
expect(await datatable.isRowSelected(i)).toBe('false');
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
await datatable.toggleRowSelection(2);
|
|
70
|
+
expect(await datatable.isRowSelected(2)).toBe('true');
|
|
71
|
+
[3, 4].forEach(async (i) => {
|
|
72
|
+
expect(await datatable.isRowSelected(i)).toBe('false');
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
await datatable.toggleRowSelection(3);
|
|
76
|
+
expect(await datatable.isRowSelected(3)).toBe('true');
|
|
77
|
+
expect(await datatable.isRowSelected(4)).toBe('false');
|
|
78
|
+
|
|
79
|
+
await datatable.toggleRowSelection(4);
|
|
80
|
+
expect(await datatable.isRowSelected(4)).toBe('true');
|
|
81
|
+
});
|
|
82
|
+
it('should toggle selection of row', async () => {
|
|
83
|
+
const datatable = await utam.load(Datatable, {
|
|
84
|
+
element: await root.shadow$(TABLE_SELECTOR),
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
await datatable.toggleRowSelection(3);
|
|
88
|
+
expect(await datatable.isRowSelected(3)).toBe('true');
|
|
89
|
+
|
|
90
|
+
await datatable.toggleRowSelection(3);
|
|
91
|
+
expect(await datatable.isRowSelected(3)).toBe('false');
|
|
92
|
+
});
|
|
93
|
+
it('should get the number of selected rows when not all rows are selected', async () => {
|
|
94
|
+
const datatable = await utam.load(Datatable, {
|
|
95
|
+
element: await root.shadow$(TABLE_SELECTOR),
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
await datatable.toggleRowSelection(3);
|
|
99
|
+
expect(await datatable.getNumSelectedRows()).toBe(1);
|
|
100
|
+
|
|
101
|
+
await datatable.toggleRowSelection(2);
|
|
102
|
+
expect(await datatable.getNumSelectedRows()).toBe(2);
|
|
103
|
+
});
|
|
104
|
+
it('should get the number of selected rows when all rows are selected', async () => {
|
|
105
|
+
const datatable = await utam.load(Datatable, {
|
|
106
|
+
element: await root.shadow$(TABLE_SELECTOR),
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
await datatable.clickSelectAllCheckbox();
|
|
110
|
+
expect(await datatable.getNumSelectedRows()).toBe(4);
|
|
111
|
+
});
|
|
112
|
+
it('should get the number of columns in the table', async () => {
|
|
113
|
+
const datatable = await utam.load(Datatable, {
|
|
114
|
+
element: await root.shadow$(TABLE_SELECTOR),
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
expect(await datatable.getNumColumns()).toBe(5);
|
|
118
|
+
});
|
|
119
|
+
it('should tell whether or not a column is sortable', async () => {
|
|
120
|
+
const datatable = await utam.load(Datatable, {
|
|
121
|
+
element: await root.shadow$(TABLE_SELECTOR),
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
expect(await datatable.isSortableColumn('Age')).toBe(true);
|
|
125
|
+
|
|
126
|
+
// Need to speak to UTAM (about isPresent) or find a better way to write this method
|
|
127
|
+
// If column is not sortable, the test fails with the error:
|
|
128
|
+
// "Can't find elements with locator 'lightning-primitive-header-factory.slds-is-sortable' inside its scope element."
|
|
129
|
+
// expect(await datatable.isSortableColumn('Name')).toBe(false);
|
|
130
|
+
});
|
|
131
|
+
it('should tell whether or not the row is selectable', async () => {
|
|
132
|
+
const datatable = await utam.load(Datatable, {
|
|
133
|
+
element: await root.shadow$(TABLE_SELECTOR),
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
expect(await datatable.isSelectableRow(1)).toBe(true);
|
|
137
|
+
});
|
|
138
|
+
it('should get the width of a column', async () => {
|
|
139
|
+
const datatable = await utam.load(Datatable, {
|
|
140
|
+
element: await root.shadow$(TABLE_SELECTOR),
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
const datatableElement = await root.shadow$(
|
|
144
|
+
'lightning-datatable'
|
|
145
|
+
);
|
|
146
|
+
const columnHeader = await datatableElement.shadow$(
|
|
147
|
+
'[aria-label="Name"]'
|
|
148
|
+
);
|
|
149
|
+
|
|
150
|
+
// Remove intermediate white spaces
|
|
151
|
+
let expectedWidth = await columnHeader.getAttribute('style');
|
|
152
|
+
expectedWidth = expectedWidth.replace(/\s/g, '');
|
|
153
|
+
let actualWidth = await datatable.getWidth('Name');
|
|
154
|
+
actualWidth = actualWidth.replace(/\s/g, '');
|
|
155
|
+
|
|
156
|
+
// Using indexOf in case of presence of ';'
|
|
157
|
+
expect(actualWidth.indexOf(expectedWidth) >= 0).toBe(true);
|
|
158
|
+
});
|
|
159
|
+
it('should tell whether or not a column has header actions', async () => {
|
|
160
|
+
const datatable = await utam.load(Datatable, {
|
|
161
|
+
element: await root.shadow$(TABLE_SELECTOR),
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
expect(await datatable.hasHeaderActions('Name')).toBe(true);
|
|
165
|
+
expect(await datatable.hasHeaderActions('Age')).toBe(true);
|
|
166
|
+
// false fails; need to check for true or null; check with UTAM if expected
|
|
167
|
+
expect(await datatable.hasHeaderActions('Email')).toBe(null);
|
|
168
|
+
});
|
|
169
|
+
it('should get the text of the rowheader cell of the specified row', async () => {
|
|
170
|
+
const datatable = await utam.load(Datatable, {
|
|
171
|
+
element: await root.shadow$(TABLE_SELECTOR),
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
expect(await datatable.getRowHeaderText(2)).toBe(
|
|
175
|
+
'Kelsey Denesik'
|
|
176
|
+
);
|
|
177
|
+
});
|
|
178
|
+
it('should click column header of the sortable column', async () => {
|
|
179
|
+
const datatable = await utam.load(Datatable, {
|
|
180
|
+
element: await root.shadow$(TABLE_SELECTOR),
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
let cellValue = await datatable.getCellValueByLabel(1, 'Age');
|
|
184
|
+
expect(cellValue).toBe('40');
|
|
185
|
+
|
|
186
|
+
await datatable.clickSortHeaderButton('Age');
|
|
187
|
+
|
|
188
|
+
cellValue = await datatable.getCellValueByLabel(1, 'Age');
|
|
189
|
+
expect(cellValue).toBe('35');
|
|
190
|
+
});
|
|
191
|
+
it('should tell whether the specified row has row actions or not', async () => {
|
|
192
|
+
const datatable = await utam.load(Datatable, {
|
|
193
|
+
element: await root.shadow$(TABLE_SELECTOR),
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
expect(await datatable.hasRowActionInRow(2)).toBe(true);
|
|
197
|
+
});
|
|
198
|
+
it('should tell whether or not the datatable has the loading indicator visible', async () => {
|
|
199
|
+
const datatable = await utam.load(Datatable, {
|
|
200
|
+
element: await root.shadow$(TABLE_SELECTOR),
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
expect(await datatable.isLoading()).toBe(false);
|
|
204
|
+
|
|
205
|
+
const button = await utam.load(Button, {
|
|
206
|
+
element: await root.shadow$('lightning-button'),
|
|
207
|
+
});
|
|
208
|
+
await button.click();
|
|
209
|
+
|
|
210
|
+
expect(await datatable.isLoading()).toBe(true);
|
|
211
|
+
});
|
|
212
|
+
});
|
|
213
|
+
});
|
|
214
|
+
});
|
|
@@ -206,12 +206,12 @@ export default class LightningDatatable extends LightningElement {
|
|
|
206
206
|
_datatableId = generateUniqueId('lgt-datatable');
|
|
207
207
|
_draftValues = [];
|
|
208
208
|
_isResizing = false; // Whether resizing is in progress
|
|
209
|
+
_lastRenderedRow = null; // last rendered row, used for UTAM
|
|
209
210
|
_privateTypes = {};
|
|
210
211
|
_privateWidthObserver = null; // Instance of LightningDatatableResizeObserver
|
|
211
212
|
_renderMode = 'table';
|
|
212
|
-
_shouldResetHeights = false;
|
|
213
|
-
_suppressBottomBar = false;
|
|
214
213
|
_shouldResetFocus = false; // used to ensure focus isn't lost from changes in renderedRows
|
|
214
|
+
_suppressBottomBar = false;
|
|
215
215
|
|
|
216
216
|
/************************* PUBLIC PROPERTIES *************************/
|
|
217
217
|
|
|
@@ -513,8 +513,8 @@ export default class LightningDatatable extends LightningElement {
|
|
|
513
513
|
*/
|
|
514
514
|
|
|
515
515
|
/**
|
|
516
|
-
* Reserved for internal use.
|
|
517
516
|
* Enables and configures advanced rendering modes.
|
|
517
|
+
* It supports properties 'bufferSize', 'fixedHeight', and 'rowHeight'.
|
|
518
518
|
*
|
|
519
519
|
* @type {RenderManagerConfig} value - config object for datatable rendering
|
|
520
520
|
*/
|
|
@@ -947,13 +947,16 @@ export default class LightningDatatable extends LightningElement {
|
|
|
947
947
|
if (virtualize) {
|
|
948
948
|
const { firstIndex, lastIndex } =
|
|
949
949
|
this._renderManager.getRenderedRange(this.state);
|
|
950
|
+
this._lastRenderedRow = lastIndex + 1; // UTAM rows are 1-indexed
|
|
950
951
|
// we shouldn't lose focus from re-renders caused by a change in renderedRows
|
|
951
952
|
this._shouldResetFocus = true;
|
|
952
953
|
return rows.slice(firstIndex, lastIndex);
|
|
953
954
|
}
|
|
954
955
|
if (this.viewportRendering && !isIE11) {
|
|
956
|
+
this._lastRenderedRow = renderedRowCount;
|
|
955
957
|
return rows.slice(0, renderedRowCount);
|
|
956
958
|
}
|
|
959
|
+
this._lastRenderedRow = rows.length;
|
|
957
960
|
return rows;
|
|
958
961
|
}
|
|
959
962
|
|
|
@@ -1153,7 +1156,12 @@ export default class LightningDatatable extends LightningElement {
|
|
|
1153
1156
|
if (this._shouldResetFocus) {
|
|
1154
1157
|
// since focus is now getting reset, can change this back to false
|
|
1155
1158
|
this._shouldResetFocus = false;
|
|
1156
|
-
|
|
1159
|
+
// don't return focus to active cell when inline edit panel is open
|
|
1160
|
+
if (
|
|
1161
|
+
state.activeCell &&
|
|
1162
|
+
state.activeCell.focused &&
|
|
1163
|
+
!state.inlineEdit.isPanelVisible
|
|
1164
|
+
) {
|
|
1157
1165
|
const cellElement = getActiveCellElement(template, state);
|
|
1158
1166
|
if (
|
|
1159
1167
|
cellElement &&
|
|
@@ -1376,7 +1384,7 @@ export default class LightningDatatable extends LightningElement {
|
|
|
1376
1384
|
handleResizeEnd(event) {
|
|
1377
1385
|
event.stopPropagation();
|
|
1378
1386
|
this._isResizing = false;
|
|
1379
|
-
this.
|
|
1387
|
+
this.state.shouldResetHeights = true;
|
|
1380
1388
|
}
|
|
1381
1389
|
|
|
1382
1390
|
/**
|
|
@@ -1461,7 +1469,9 @@ export default class LightningDatatable extends LightningElement {
|
|
|
1461
1469
|
*/
|
|
1462
1470
|
handleTableFocusOut(event) {
|
|
1463
1471
|
handleDatatableFocusOut.call(this, event);
|
|
1464
|
-
this.state.activeCell
|
|
1472
|
+
if (this.state.activeCell) {
|
|
1473
|
+
this.state.activeCell.focused = this._shouldResetFocus;
|
|
1474
|
+
}
|
|
1465
1475
|
}
|
|
1466
1476
|
|
|
1467
1477
|
/**
|
|
@@ -1646,9 +1656,9 @@ export default class LightningDatatable extends LightningElement {
|
|
|
1646
1656
|
|
|
1647
1657
|
// no need to handle other virtualization/row height logic
|
|
1648
1658
|
// if heights need to be reset
|
|
1649
|
-
if (this.
|
|
1659
|
+
if (this.state.shouldResetHeights) {
|
|
1650
1660
|
resetRowHeights(state);
|
|
1651
|
-
this.
|
|
1661
|
+
this.state.shouldResetHeights = false;
|
|
1652
1662
|
} else if (virtualizedRows && !state.fixedHeight) {
|
|
1653
1663
|
// if row heights aren't fixed, we need to update items
|
|
1654
1664
|
// in state to know where rows should be positioned
|
|
@@ -317,11 +317,6 @@ function openInlineEdit(dt, target) {
|
|
|
317
317
|
|
|
318
318
|
const { rowKeyValue, colKeyValue } = target;
|
|
319
319
|
|
|
320
|
-
// ensure that focus remains on inline edit panel instead of active cell
|
|
321
|
-
if (state.activeCell) {
|
|
322
|
-
state.activeCell.focused = false;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
320
|
inlineEdit.isPanelVisible = true;
|
|
326
321
|
inlineEdit.rowKeyValue = rowKeyValue;
|
|
327
322
|
inlineEdit.colKeyValue = colKeyValue;
|
|
@@ -14,8 +14,10 @@ export function getDirtyValueFromCell(state, rowKeyValue, colKeyValue) {
|
|
|
14
14
|
|
|
15
15
|
if (
|
|
16
16
|
dirtyValues &&
|
|
17
|
-
|
|
18
|
-
dirtyValues
|
|
17
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
18
|
+
dirtyValues.hasOwnProperty(rowKeyValue) &&
|
|
19
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
20
|
+
dirtyValues[rowKeyValue].hasOwnProperty(colKeyValue)
|
|
19
21
|
) {
|
|
20
22
|
return dirtyValues[rowKeyValue][colKeyValue];
|
|
21
23
|
}
|
|
@@ -12,6 +12,8 @@ import { isCellEditable, getRowByKey } from './rows';
|
|
|
12
12
|
import { isRTL, getShadowActiveElements } from 'lightning/utilsPrivate';
|
|
13
13
|
import { findFirstVisibleIndex } from './virtualization';
|
|
14
14
|
|
|
15
|
+
import { escapeDoubleQuotes } from './utils';
|
|
16
|
+
|
|
15
17
|
// Indicator/flag for a header row
|
|
16
18
|
const HEADER_ROW = 'HEADER';
|
|
17
19
|
|
|
@@ -799,7 +801,13 @@ function stillValidActiveCell(state) {
|
|
|
799
801
|
const {
|
|
800
802
|
activeCell: { rowKeyValue, colKeyValue },
|
|
801
803
|
} = state;
|
|
804
|
+
|
|
805
|
+
let sortableColumns = state.columns.filter((column) => column.sortable);
|
|
806
|
+
|
|
802
807
|
if (rowKeyValue === HEADER_ROW) {
|
|
808
|
+
if (state.rows.length && sortableColumns.length === 0) {
|
|
809
|
+
return false;
|
|
810
|
+
}
|
|
803
811
|
return state.headerIndexes[colKeyValue] !== undefined;
|
|
804
812
|
}
|
|
805
813
|
return !!(
|
|
@@ -830,9 +838,7 @@ export function setFocusActiveCell(
|
|
|
830
838
|
const { keyboardMode } = state;
|
|
831
839
|
const { rowIndex, colIndex } = getIndexesActiveCell(state);
|
|
832
840
|
|
|
833
|
-
|
|
834
|
-
state.activeCell.focused =
|
|
835
|
-
!(info && isActiveCellEditable(state)) && isActiveCellValid(state);
|
|
841
|
+
state.activeCell.focused = !(info && isActiveCellValid(state));
|
|
836
842
|
updateTabIndex(state, rowIndex, colIndex);
|
|
837
843
|
|
|
838
844
|
let cellElement = getActiveCellElement(template, state);
|
|
@@ -1314,13 +1320,15 @@ function isHeaderRow(rowIndex) {
|
|
|
1314
1320
|
}
|
|
1315
1321
|
|
|
1316
1322
|
export function getDataRow(rowKeyValue) {
|
|
1317
|
-
return `[data-row-key-value="${rowKeyValue}"]`;
|
|
1323
|
+
return `[data-row-key-value="${escapeDoubleQuotes(rowKeyValue)}"]`;
|
|
1318
1324
|
}
|
|
1319
1325
|
|
|
1320
1326
|
export function getCellElementByKeys(template, rowKeyValue, colKeyValue) {
|
|
1321
1327
|
const selector = `${getDataRow(
|
|
1322
1328
|
rowKeyValue
|
|
1323
|
-
)} [data-col-key-value="${
|
|
1329
|
+
)} [data-col-key-value="${escapeDoubleQuotes(
|
|
1330
|
+
colKeyValue
|
|
1331
|
+
)}"] > :first-child`;
|
|
1324
1332
|
return template.querySelector(selector);
|
|
1325
1333
|
}
|
|
1326
1334
|
|
|
@@ -430,7 +430,7 @@ export function setSelectedRowsKeys(state, value) {
|
|
|
430
430
|
export function syncSelectedRowsKeys(state, selectedRows) {
|
|
431
431
|
let changed = false;
|
|
432
432
|
const { selectedRowsKeys, keyField } = state;
|
|
433
|
-
|
|
433
|
+
const maxRowSelection = getMaxRowSelection(state) || getRowsTotal(state);
|
|
434
434
|
if (Object.keys(selectedRowsKeys).length !== selectedRows.length) {
|
|
435
435
|
changed = true;
|
|
436
436
|
state.selectedRowsKeys = updateSelectedRowsKeysFromSelectedRows(
|
|
@@ -446,7 +446,13 @@ export function syncSelectedRowsKeys(state, selectedRows) {
|
|
|
446
446
|
);
|
|
447
447
|
}
|
|
448
448
|
}
|
|
449
|
-
|
|
449
|
+
if (maxRowSelection > 1 && changed) {
|
|
450
|
+
if (selectedRows.length < maxRowSelection) {
|
|
451
|
+
markDeselectedRowEnabled(state);
|
|
452
|
+
} else {
|
|
453
|
+
markDeselectedRowDisabled(state);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
450
456
|
updateBulkSelectionState(state);
|
|
451
457
|
|
|
452
458
|
return {
|
|
@@ -134,6 +134,8 @@ export function updateRowsAndCellIndexes() {
|
|
|
134
134
|
state.indexes[row.key] = { rowIndex };
|
|
135
135
|
|
|
136
136
|
row.rowIndex = rowIndex;
|
|
137
|
+
row.rowNumber = rowIndex + 1; // for UTAM since methods are base-1
|
|
138
|
+
row.ariaRowIndex = rowIndex + 2; // aria attrs are base-1 and also count header as a row
|
|
137
139
|
row.inputType = getRowSelectionInputType(state);
|
|
138
140
|
row.isSelected = isSelectedRow(state, row.key);
|
|
139
141
|
row.ariaSelected = row.isSelected ? 'true' : false;
|
|
@@ -35,7 +35,10 @@
|
|
|
35
35
|
aria-label={ariaLabel}
|
|
36
36
|
aria-labelledby={ariaLabelledBy}
|
|
37
37
|
aria-rowcount={ariaRowCount}
|
|
38
|
-
aria-colcount={ariaColCount}
|
|
38
|
+
aria-colcount={ariaColCount}
|
|
39
|
+
data-num-rows={data.length}
|
|
40
|
+
data-num-selected-rows={selectedRows.length}
|
|
41
|
+
data-last-rendered-row={_lastRenderedRow}>
|
|
39
42
|
<template if:false={hasValidKeyField}>
|
|
40
43
|
<!-- empty since keyField wasn't provided -->
|
|
41
44
|
</template>
|
|
@@ -128,7 +131,8 @@
|
|
|
128
131
|
aria-posinset={row.posInSet}
|
|
129
132
|
aria-rowindex={row.ariaRowIndex}
|
|
130
133
|
style={row.style}
|
|
131
|
-
tabindex={row.tabIndex}
|
|
134
|
+
tabindex={row.tabIndex}
|
|
135
|
+
data-row-number={row.rowNumber}>
|
|
132
136
|
<template for:each={row.cells} for:item="cell">
|
|
133
137
|
<template if:true={cell.isCheckbox}>
|
|
134
138
|
<!-- Checkbox Cell -->
|
|
@@ -33,12 +33,14 @@
|
|
|
33
33
|
onfocusout={handleTableFocusOut}
|
|
34
34
|
aria-label={ariaLabel}
|
|
35
35
|
aria-labelledby={ariaLabelledBy}
|
|
36
|
-
|
|
36
|
+
data-num-rows={data.length}
|
|
37
|
+
data-num-selected-rows={selectedRows.length}
|
|
38
|
+
data-last-rendered-row={_lastRenderedRow}>
|
|
37
39
|
<template if:false={hasValidKeyField}>
|
|
38
40
|
<!-- empty since keyField wasn't provided TODO: Why is this here? Test and remove! -->
|
|
39
41
|
</template>
|
|
40
42
|
<template if:true={hasValidKeyField}>
|
|
41
|
-
<thead>
|
|
43
|
+
<thead data-rowgroup-header>
|
|
42
44
|
<!-- Column Header Row -->
|
|
43
45
|
<tr class="slds-line-height_reset"
|
|
44
46
|
data-row-key-value="HEADER"
|
|
@@ -99,7 +101,7 @@
|
|
|
99
101
|
</template>
|
|
100
102
|
</tr>
|
|
101
103
|
</thead>
|
|
102
|
-
<tbody style={computedTbodyStyle}>
|
|
104
|
+
<tbody data-rowgroup-body style={computedTbodyStyle}>
|
|
103
105
|
<template for:each={renderedRows} for:item="row" for:index="rowIndex">
|
|
104
106
|
<!-- Data Rows -->
|
|
105
107
|
<tr class={row.classnames}
|
|
@@ -111,7 +113,8 @@
|
|
|
111
113
|
aria-expanded={row.isExpanded}
|
|
112
114
|
aria-setsize={row.setSize}
|
|
113
115
|
aria-posinset={row.posInSet}
|
|
114
|
-
tabindex={row.tabIndex}
|
|
116
|
+
tabindex={row.tabIndex}
|
|
117
|
+
data-row-number={row.rowNumber}>
|
|
115
118
|
<template for:each={row.cells} for:item="cell">
|
|
116
119
|
<template if:true={cell.isCheckbox}>
|
|
117
120
|
<!-- Checkbox Cell -->
|