lightning-base-components 1.15.1-alpha → 1.15.4-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-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/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 +15 -0
- package/src/lightning/datatable/__wdio__/utam/utam.spec.js +208 -183
- package/src/lightning/datatable/datatable.js +13 -7
- 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/state.js +1 -0
- package/src/lightning/datatable/templates/table/table.html +2 -2
- 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/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/i18nCldrOptions/all-locales.js +1 -0
- package/src/lightning/i18nCldrOptions/i18nCldrOptions.js +4 -0
- package/src/lightning/i18nService/i18nService.js +1810 -0
- 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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default 'Map of {0} Markers';
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
The `lightning/alert` module lets you create an alert modal within your component. Use `LightningAlert` on your components to communicate a state that affects the entire system, not just a feature or page.
|
|
2
2
|
|
|
3
|
-
`lightning/alert` is not supported on mobile devices.
|
|
4
|
-
|
|
5
3
|
Use `LightningAlert.open()` instead of the native `window.alert()` for a more consistent user experience. They have similar functions, but `LightningAlert.open()` works in cross-origin iframes, where the `.alert()` method is no longer supported in Chrome and Safari. Unlike `window.alert()`, `LightningAlert.open()` doesn't halt execution on the page, it returns a Promise. Use `async`/`await` or `.then()` for any code you want to execute after the alert has closed.
|
|
6
4
|
|
|
7
5
|
Import `LightningAlert` from the `lightning/alert` module in the component that will launch the alert modal, and call `LightningAlert.open()` with your desired attributes.
|
|
@@ -11,7 +9,7 @@ This example creates an alert modal with an error message and **OK** button. The
|
|
|
11
9
|
```html
|
|
12
10
|
<!-- c/myApp.html -->
|
|
13
11
|
<template>
|
|
14
|
-
<lightning-button onclick=
|
|
12
|
+
<lightning-button onclick={handleAlertClick} label="Open Alert Modal">
|
|
15
13
|
</lightning-button>
|
|
16
14
|
</template>
|
|
17
15
|
```
|
|
@@ -61,11 +59,11 @@ Code using `LightningAlert` can be tested by mocking the `LightningAlert.open()`
|
|
|
61
59
|
The example below uses a button to open an alert dialog with text that changes when the alert opens.
|
|
62
60
|
|
|
63
61
|
```html
|
|
64
|
-
<button data-button onclick=
|
|
65
|
-
<template if:true=
|
|
62
|
+
<button data-button onclick={handleClick}>Open Alert</button>
|
|
63
|
+
<template if:true={alertViewed}>
|
|
66
64
|
<div data-text>Content Viewed</div>
|
|
67
65
|
</template>
|
|
68
|
-
<template if:false=
|
|
66
|
+
<template if:false={alertViewed}>
|
|
69
67
|
<div data-text>Click to View Content</div>
|
|
70
68
|
</template>
|
|
71
69
|
```
|
|
@@ -44,9 +44,11 @@
|
|
|
44
44
|
aria-expanded={computedAriaExpanded}
|
|
45
45
|
aria-haspopup="listbox"
|
|
46
46
|
name={name}
|
|
47
|
+
role="combobox"
|
|
47
48
|
data-value={computedInputValue}
|
|
48
49
|
disabled={disabled}
|
|
49
50
|
aria-label={computedButtonTriggerAriaLabel}
|
|
51
|
+
aria-required={required}
|
|
50
52
|
onfocus={handleFocus}
|
|
51
53
|
onkeydown={handleInputKeyDown}
|
|
52
54
|
onblur={handleBlur}>
|
|
@@ -60,7 +62,7 @@
|
|
|
60
62
|
</span>
|
|
61
63
|
</button>
|
|
62
64
|
</template>
|
|
63
|
-
<template if:true={
|
|
65
|
+
<template if:true={isCloseVisible}>
|
|
64
66
|
<div class="slds-input__icon-group slds-input__icon-group_right">
|
|
65
67
|
<button onclick={handlePillRemove} type="button"
|
|
66
68
|
class="slds-button slds-button_icon slds-input__icon slds-input__icon_right"
|
|
@@ -2,6 +2,7 @@ import labelAriaSelectedOptions from '@salesforce/label/LightningCombobox.ariaSe
|
|
|
2
2
|
import labelDeselectOptionKeyboard from '@salesforce/label/LightningCombobox.deselectOptionKeyboard';
|
|
3
3
|
import labelLoadingText from '@salesforce/label/LightningCombobox.loadingText';
|
|
4
4
|
import labelPillCloseButtonAlternativeText from '@salesforce/label/LightningCombobox.pillCloseButtonAlternativeText';
|
|
5
|
+
import labelPlaceholder from '@salesforce/label/LightningCombobox.placeholder';
|
|
5
6
|
import { api, LightningElement, track } from 'lwc';
|
|
6
7
|
import { handleKeyDownOnInput } from './keyboard';
|
|
7
8
|
import { BaseComboboxEvents } from './baseComboboxEvents';
|
|
@@ -13,6 +14,7 @@ import {
|
|
|
13
14
|
normalizeBoolean,
|
|
14
15
|
normalizeString,
|
|
15
16
|
synchronizeAttrs,
|
|
17
|
+
computeAriaInvalid,
|
|
16
18
|
} from 'lightning/utilsPrivate';
|
|
17
19
|
// remove-next-line-for-c-namespace
|
|
18
20
|
import { AutoPosition, Direction } from 'lightning/positionLibrary';
|
|
@@ -23,6 +25,7 @@ const i18n = {
|
|
|
23
25
|
deselectOptionKeyboard: labelDeselectOptionKeyboard,
|
|
24
26
|
pillCloseButtonAlternativeText: labelPillCloseButtonAlternativeText,
|
|
25
27
|
loadingText: labelLoadingText,
|
|
28
|
+
placeholder: labelPlaceholder,
|
|
26
29
|
};
|
|
27
30
|
|
|
28
31
|
const SMALL_MIN_HEIGHT = '2.25rem';
|
|
@@ -39,6 +42,7 @@ const ARIA_LABELLEDBY = 'aria-labelledby';
|
|
|
39
42
|
const ARIA_DESCRIBEDBY = 'aria-describedby';
|
|
40
43
|
const ARIA_LABEL = 'aria-label';
|
|
41
44
|
const ARIA_ACTIVEDESCENDANT = 'aria-activedescendant';
|
|
45
|
+
const ARIA_INVALID = 'aria-invalid';
|
|
42
46
|
|
|
43
47
|
export default class LightningBaseCombobox extends LightningElement {
|
|
44
48
|
static delegatesFocus = true;
|
|
@@ -66,7 +70,7 @@ export default class LightningBaseCombobox extends LightningElement {
|
|
|
66
70
|
@api showInputActivityIndicator = false;
|
|
67
71
|
@api required = false;
|
|
68
72
|
@api dropdownAlignment = 'left';
|
|
69
|
-
@api placeholder =
|
|
73
|
+
@api placeholder = i18n.placeholder;
|
|
70
74
|
@api inputLabel;
|
|
71
75
|
|
|
72
76
|
@api name;
|
|
@@ -89,6 +93,8 @@ export default class LightningBaseCombobox extends LightningElement {
|
|
|
89
93
|
_inputAriaControls;
|
|
90
94
|
_activeElementDomId;
|
|
91
95
|
_autocomplete = 'off';
|
|
96
|
+
originDisableDefaultHighlight;
|
|
97
|
+
privateDisableDefaultHighlight;
|
|
92
98
|
|
|
93
99
|
constructor() {
|
|
94
100
|
super();
|
|
@@ -276,6 +282,21 @@ export default class LightningBaseCombobox extends LightningElement {
|
|
|
276
282
|
}
|
|
277
283
|
}
|
|
278
284
|
|
|
285
|
+
/**
|
|
286
|
+
* Whether disable the highlighting default item behavior
|
|
287
|
+
*
|
|
288
|
+
* @type {boolean}
|
|
289
|
+
* @memberof LightningBaseCombobox
|
|
290
|
+
*/
|
|
291
|
+
@api
|
|
292
|
+
get disableDefaultHighlight() {
|
|
293
|
+
return this.originDisableDefaultHighlight;
|
|
294
|
+
}
|
|
295
|
+
set disableDefaultHighlight(value) {
|
|
296
|
+
this.originDisableDefaultHighlight = value;
|
|
297
|
+
this.privateDisableDefaultHighlight = normalizeBoolean(value);
|
|
298
|
+
}
|
|
299
|
+
|
|
279
300
|
@api
|
|
280
301
|
highlightInputText() {
|
|
281
302
|
if (this._connected) {
|
|
@@ -331,6 +352,7 @@ export default class LightningBaseCombobox extends LightningElement {
|
|
|
331
352
|
[ARIA_LABEL]: this.isUserInputDisabled
|
|
332
353
|
? this.computedButtonTriggerAriaLabel
|
|
333
354
|
: this.inputLabel,
|
|
355
|
+
[ARIA_INVALID]: this.computedAriaInvalid,
|
|
334
356
|
});
|
|
335
357
|
}
|
|
336
358
|
|
|
@@ -880,6 +902,13 @@ export default class LightningBaseCombobox extends LightningElement {
|
|
|
880
902
|
return this.inputPill && Object.keys(this.inputPill).length > 0;
|
|
881
903
|
}
|
|
882
904
|
|
|
905
|
+
get isCloseVisible() {
|
|
906
|
+
if (this.disabled) {
|
|
907
|
+
return false;
|
|
908
|
+
}
|
|
909
|
+
return this.hasInputPill;
|
|
910
|
+
}
|
|
911
|
+
|
|
883
912
|
handlePillRemove() {
|
|
884
913
|
this.inputElement.focus();
|
|
885
914
|
this._events.dispatchPillRemove(this.inputPill);
|
|
@@ -924,12 +953,14 @@ export default class LightningBaseCombobox extends LightningElement {
|
|
|
924
953
|
|
|
925
954
|
highlightDefaultItem() {
|
|
926
955
|
this.removeHighlight();
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
this.
|
|
931
|
-
|
|
932
|
-
|
|
956
|
+
if (!this.privateDisableDefaultHighlight) {
|
|
957
|
+
// eslint-disable-next-line @lwc/lwc/no-async-operation
|
|
958
|
+
requestAnimationFrame(() => {
|
|
959
|
+
this.highlightOptionAndScrollIntoView(
|
|
960
|
+
this.findOptionElementByIndex(this._highlightedItemIndex)
|
|
961
|
+
);
|
|
962
|
+
});
|
|
963
|
+
}
|
|
933
964
|
}
|
|
934
965
|
|
|
935
966
|
get isDropdownEmpty() {
|
|
@@ -1012,6 +1043,12 @@ export default class LightningBaseCombobox extends LightningElement {
|
|
|
1012
1043
|
},
|
|
1013
1044
|
};
|
|
1014
1045
|
}
|
|
1046
|
+
|
|
1047
|
+
get computedAriaInvalid() {
|
|
1048
|
+
const ariaInvalid =
|
|
1049
|
+
this.template.host.getAttribute('data-aria-invalid');
|
|
1050
|
+
return computeAriaInvalid(ariaInvalid, true);
|
|
1051
|
+
}
|
|
1015
1052
|
}
|
|
1016
1053
|
|
|
1017
1054
|
function scrollIntoViewIfNeeded(element, scrollingParent) {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { api, track } from 'lwc';
|
|
2
2
|
import { classSet } from 'lightning/utils';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
normalizeString as normalize,
|
|
5
|
+
normalizeBoolean,
|
|
6
|
+
} from 'lightning/utilsPrivate';
|
|
4
7
|
import LightningPrimitiveButton from 'lightning/primitiveButton';
|
|
5
8
|
import template from './button.html';
|
|
6
9
|
|
|
@@ -9,6 +12,7 @@ import template from './button.html';
|
|
|
9
12
|
*/
|
|
10
13
|
export default class LightningButton extends LightningPrimitiveButton {
|
|
11
14
|
static delegatesFocus = true;
|
|
15
|
+
_stretch = false;
|
|
12
16
|
|
|
13
17
|
/**
|
|
14
18
|
* The name for the button element.
|
|
@@ -62,6 +66,22 @@ export default class LightningButton extends LightningPrimitiveButton {
|
|
|
62
66
|
*/
|
|
63
67
|
@api iconPosition = 'left';
|
|
64
68
|
|
|
69
|
+
/**
|
|
70
|
+
* Setting it to true allows the button to take up the entire available width.
|
|
71
|
+
* This value defaults to false.
|
|
72
|
+
*
|
|
73
|
+
* @type {boolean}
|
|
74
|
+
* @default false
|
|
75
|
+
*/
|
|
76
|
+
@api
|
|
77
|
+
get stretch() {
|
|
78
|
+
return this._stretch;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
set stretch(value) {
|
|
82
|
+
this._stretch = normalizeBoolean(value);
|
|
83
|
+
}
|
|
84
|
+
|
|
65
85
|
/**
|
|
66
86
|
* Specifies the type of button.
|
|
67
87
|
* Valid values are button, reset, and submit.
|
|
@@ -97,6 +117,7 @@ export default class LightningButton extends LightningPrimitiveButton {
|
|
|
97
117
|
this.normalizedVariant === 'destructive-text',
|
|
98
118
|
'slds-button_inverse': this.normalizedVariant === 'inverse',
|
|
99
119
|
'slds-button_success': this.normalizedVariant === 'success',
|
|
120
|
+
'slds-button_stretch': this.stretch,
|
|
100
121
|
})
|
|
101
122
|
.toString();
|
|
102
123
|
}
|
|
@@ -233,9 +233,6 @@ export default class LightningButtonIcon extends LightningPrimitiveButton {
|
|
|
233
233
|
default:
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
|
-
if (this.getVariantModifier(normalizedVariant) === 'inverse') {
|
|
237
|
-
classes.add('slds-button_icon-inverse');
|
|
238
|
-
}
|
|
239
236
|
|
|
240
237
|
return classes.toString();
|
|
241
238
|
}
|
|
@@ -61,7 +61,8 @@
|
|
|
61
61
|
class={day.className}
|
|
62
62
|
key={day.dateValue}
|
|
63
63
|
tabindex={day.tabIndex}
|
|
64
|
-
data-value={day.dateValue}
|
|
64
|
+
data-value={day.dateValue}
|
|
65
|
+
aria-label={day.dateValue}>
|
|
65
66
|
<span class="slds-day" onclick={handleDateClick} tabindex="-1" role="button">{day.dayInMonth}</span>
|
|
66
67
|
</td>
|
|
67
68
|
</template>
|
|
@@ -13,7 +13,7 @@ import showJapaneseCalendar from '@salesforce/i18n/showJapaneseCalendar';
|
|
|
13
13
|
import {
|
|
14
14
|
toOtherCalendar,
|
|
15
15
|
toLocalizedDigits,
|
|
16
|
-
|
|
16
|
+
getCurrentDateString,
|
|
17
17
|
isBefore,
|
|
18
18
|
isAfter,
|
|
19
19
|
parseDateTime,
|
|
@@ -95,7 +95,7 @@ export default class LightningCalendar extends LightningElement {
|
|
|
95
95
|
connectedCallback() {
|
|
96
96
|
this._connected = true;
|
|
97
97
|
|
|
98
|
-
this.todayDate =
|
|
98
|
+
this.todayDate = getCurrentDateString();
|
|
99
99
|
const renderDate = this.getSelectedDate() || this.getTodaysDate();
|
|
100
100
|
this.renderCalendar(renderDate);
|
|
101
101
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<fieldset
|
|
2
|
+
<fieldset>
|
|
3
3
|
|
|
4
4
|
<legend class={computedLegendClass}>
|
|
5
5
|
<template if:true={required}>
|
|
@@ -32,6 +32,6 @@
|
|
|
32
32
|
<template if:true={_helpMessage}>
|
|
33
33
|
<div id="helptext" data-helptext class="slds-form-element__help">{_helpMessage}</div>
|
|
34
34
|
</template>
|
|
35
|
-
|
|
35
|
+
|
|
36
36
|
</fieldset>
|
|
37
37
|
</template>
|
|
@@ -97,8 +97,17 @@ export default class LightningCheckboxGroup extends LightningElement {
|
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
get fieldsetElement() {
|
|
101
|
+
return this.template.querySelector('fieldset');
|
|
102
|
+
}
|
|
103
|
+
|
|
100
104
|
renderedCallback() {
|
|
101
105
|
this.synchronizeA11y();
|
|
106
|
+
synchronizeAttrs(this.fieldsetElement, {
|
|
107
|
+
'aria-describedby': getRealDOMId(
|
|
108
|
+
this.template.querySelector('[data-helptext]')
|
|
109
|
+
),
|
|
110
|
+
});
|
|
102
111
|
}
|
|
103
112
|
|
|
104
113
|
/**
|
|
@@ -313,9 +322,4 @@ export default class LightningCheckboxGroup extends LightningElement {
|
|
|
313
322
|
})
|
|
314
323
|
.toString();
|
|
315
324
|
}
|
|
316
|
-
|
|
317
|
-
computearaiDescriedBy() {
|
|
318
|
-
const helpMessage = this.template.querySelector('[data-helptext]');
|
|
319
|
-
return getRealDOMId(helpMessage);
|
|
320
|
-
}
|
|
321
325
|
}
|
|
@@ -118,9 +118,11 @@ We recommend using the HTML `<select>` element on mobile instead.
|
|
|
118
118
|
|
|
119
119
|
You must provide a text label for accessibility to make the information
|
|
120
120
|
available to assistive technology. The `label` attribute creates an HTML label
|
|
121
|
-
element for your
|
|
121
|
+
element for your component. To hide a label from view and make it
|
|
122
122
|
available to assistive technology, use the `label-hidden` variant.
|
|
123
123
|
|
|
124
|
+
This component uses `button` elements for select-only comboboxes to comply with the [Lightning Design System combobox blueprint](https://www.lightningdesignsystem.com/components/combobox/#%22Input%22-markup).
|
|
125
|
+
|
|
124
126
|
#### Custom Events
|
|
125
127
|
|
|
126
128
|
**`change`**
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
</template>
|
|
6
6
|
{label}
|
|
7
7
|
</label>
|
|
8
|
-
<lightning-helptext if:true={_fieldLevelHelp} content={_fieldLevelHelp}></lightning-helptext>
|
|
8
|
+
<lightning-helptext if:true={_fieldLevelHelp} content={_fieldLevelHelp} alternative-text={helptextAlternativeText}></lightning-helptext>
|
|
9
9
|
|
|
10
10
|
<div class="slds-form-element__control">
|
|
11
11
|
<lightning-base-combobox name={name}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import labelRequired from '@salesforce/label/LightningControl.required';
|
|
2
2
|
import labelPlaceholder from '@salesforce/label/LightningCombobox.placeholder';
|
|
3
|
+
import labelHelpTextAlternativeText from '@salesforce/label/LightningInput.helptextAlternativeText';
|
|
3
4
|
import { LightningElement, api, track } from 'lwc';
|
|
4
|
-
import { classSet } from 'lightning/utils';
|
|
5
|
+
import { classSet, formatLabel } from 'lightning/utils';
|
|
5
6
|
import {
|
|
6
7
|
normalizeBoolean,
|
|
7
8
|
normalizeArray,
|
|
@@ -19,6 +20,7 @@ import {
|
|
|
19
20
|
const i18n = {
|
|
20
21
|
required: labelRequired,
|
|
21
22
|
placeholder: labelPlaceholder,
|
|
23
|
+
helpTextAlternativeText: labelHelpTextAlternativeText,
|
|
22
24
|
};
|
|
23
25
|
/**
|
|
24
26
|
* A widget that provides an input field that is readonly,
|
|
@@ -300,7 +302,6 @@ export default class LightningCombobox extends LightningElement {
|
|
|
300
302
|
/**
|
|
301
303
|
* Represents the validity states that an element can be in, with respect to constraint validation.
|
|
302
304
|
* @type {object}
|
|
303
|
-
* @required
|
|
304
305
|
*/
|
|
305
306
|
@api
|
|
306
307
|
get validity() {
|
|
@@ -494,4 +495,8 @@ export default class LightningCombobox extends LightningElement {
|
|
|
494
495
|
}
|
|
495
496
|
return this._constraintApi;
|
|
496
497
|
}
|
|
498
|
+
|
|
499
|
+
get helptextAlternativeText() {
|
|
500
|
+
return formatLabel(i18n.helpTextAlternativeText, this.label);
|
|
501
|
+
}
|
|
497
502
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// default implementation of localization service
|
|
2
|
-
// This should be removed when
|
|
1
|
+
// default implementation of localization service. This covers the current usage of the localizationService in the code base.
|
|
2
|
+
// This should be removed/heavily reworked when migrating off Aura
|
|
3
3
|
import {
|
|
4
4
|
isValidISOTimeString,
|
|
5
5
|
isValidISODateTimeString,
|
|
@@ -9,6 +9,9 @@ import {
|
|
|
9
9
|
TIME_SEPARATOR,
|
|
10
10
|
} from 'lightning/iso8601Utils';
|
|
11
11
|
import Duration from './defaultDurationConfig';
|
|
12
|
+
import locale from '@salesforce/i18n/locale';
|
|
13
|
+
import commonDigits from '@salesforce/i18n/common.digits';
|
|
14
|
+
import currentDigits from '@salesforce/i18n/defaultNumberingSystem';
|
|
12
15
|
|
|
13
16
|
const MONTH_NAMES = [
|
|
14
17
|
'January',
|
|
@@ -42,6 +45,8 @@ const TIME_FORMAT_SIMPLE = {
|
|
|
42
45
|
long: 'h:m:s a',
|
|
43
46
|
};
|
|
44
47
|
|
|
48
|
+
const BUDDHIST_YEAR_OFFSET = 543;
|
|
49
|
+
|
|
45
50
|
// Only works with dates and iso strings
|
|
46
51
|
// formats the date object by ignoring the timezone offset
|
|
47
52
|
// e.g. assume date is Mar 11 2019 00:00:00 GMT+1100:
|
|
@@ -190,23 +195,55 @@ function WallTimeToUTC(date, timezone, callback) {
|
|
|
190
195
|
callback(addTimezoneOffset(localDate));
|
|
191
196
|
}
|
|
192
197
|
|
|
193
|
-
//
|
|
198
|
+
// Similar to Aura equivalent; add years for buddhist calendar
|
|
194
199
|
function translateToOtherCalendar(date) {
|
|
200
|
+
if (locale === 'th-TH') {
|
|
201
|
+
date.setFullYear(date.getFullYear() + BUDDHIST_YEAR_OFFSET);
|
|
202
|
+
}
|
|
195
203
|
return date;
|
|
196
204
|
}
|
|
197
205
|
|
|
198
|
-
//
|
|
206
|
+
// Similar to Aura equivalent; subtract years for buddhist calendar
|
|
199
207
|
function translateFromOtherCalendar(date) {
|
|
208
|
+
if (locale === 'th-TH') {
|
|
209
|
+
date.setFullYear(date.getFullYear() - BUDDHIST_YEAR_OFFSET);
|
|
210
|
+
}
|
|
200
211
|
return date;
|
|
201
212
|
}
|
|
202
213
|
|
|
203
|
-
|
|
214
|
+
/**
|
|
215
|
+
* Converts input from 'fromDigits' numbering system
|
|
216
|
+
* to 'toDigits' numbering system
|
|
217
|
+
*/
|
|
218
|
+
function convertDigits(input, fromDigits, toDigits) {
|
|
219
|
+
if (!input || !commonDigits[fromDigits] || !commonDigits[toDigits]) {
|
|
220
|
+
return input;
|
|
221
|
+
}
|
|
222
|
+
const digitMap = {};
|
|
223
|
+
commonDigits[fromDigits].split('').forEach((digit, index) => {
|
|
224
|
+
digitMap[digit] = commonDigits[toDigits][index];
|
|
225
|
+
});
|
|
226
|
+
return input
|
|
227
|
+
.split('')
|
|
228
|
+
.map((number) => {
|
|
229
|
+
return digitMap[number];
|
|
230
|
+
})
|
|
231
|
+
.join('');
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
// Translates from latn digits to digits of current locale
|
|
204
235
|
function translateToLocalizedDigits(input) {
|
|
236
|
+
if (currentDigits !== 'latn') {
|
|
237
|
+
return convertDigits(input, 'latn', currentDigits);
|
|
238
|
+
}
|
|
205
239
|
return input;
|
|
206
240
|
}
|
|
207
241
|
|
|
208
|
-
//
|
|
242
|
+
// Translates from current locale digits to latn digits
|
|
209
243
|
function translateFromLocalizedDigits(input) {
|
|
244
|
+
if (currentDigits !== 'latn') {
|
|
245
|
+
return convertDigits(input, currentDigits, 'latn');
|
|
246
|
+
}
|
|
210
247
|
return input;
|
|
211
248
|
}
|
|
212
249
|
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
The `lightning/confirm` module lets you create a confirm modal within your component. Use `LightningConfirm` on your component to ask the user to respond before they continue.
|
|
2
2
|
|
|
3
|
-
`lightning/confirm` is not supported on mobile devices.
|
|
4
|
-
|
|
5
3
|
Use `LightningConfirm.open()` instead of the native `window.confirm()` for a more consistent user experience. They have similar functions, but `LightningConfirm.open()` works in cross-origin iframes, where the `.confirm()` method is no longer supported in Chrome and Safari. Unlike `window.confirm()`, `LightningConfirm.open()` doesn't halt execution on the page, it returns a Promise. Use `async`/`await` or `.then()` for any code you want to execute after the confirm has closed.
|
|
6
4
|
|
|
7
5
|
Import `LightningConfirm` from the `lightning/confirm` module in the component that will launch the confirm modal, and call `LightningConfirm.open()` with your desired attributes.
|
|
@@ -11,7 +9,7 @@ This example creates a headerless confirm modal with two buttons, **OK** and **C
|
|
|
11
9
|
```html
|
|
12
10
|
<!-- c/myApp.html -->
|
|
13
11
|
<template>
|
|
14
|
-
<lightning-button onclick=
|
|
12
|
+
<lightning-button onclick={handleConfirmClick} label="Open Confirm Modal">
|
|
15
13
|
</lightning-button>
|
|
16
14
|
</template>
|
|
17
15
|
```
|
|
@@ -64,7 +62,7 @@ Code using `LightningConfirm` can be tested by mocking the `LightningConfirm.ope
|
|
|
64
62
|
The example below uses a button to open a confirm dialog and sets the result in a template.
|
|
65
63
|
|
|
66
64
|
```html
|
|
67
|
-
<button data-button onclick=
|
|
65
|
+
<button data-button onclick={handleClick}>Open Confirm</button>
|
|
68
66
|
<div data-result>{result}</div>
|
|
69
67
|
```
|
|
70
68
|
|
|
@@ -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' },
|
|
@@ -13,9 +13,8 @@ export default class BasicDatatable extends LightningElement {
|
|
|
13
13
|
data = [];
|
|
14
14
|
columns = columns;
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const data = await fetchDataHelper({ amountOfRecords: 100 });
|
|
16
|
+
connectedCallback() {
|
|
17
|
+
const data = generateData({ amountOfRecords: 100 });
|
|
19
18
|
this.data = data;
|
|
20
19
|
}
|
|
21
20
|
}
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// eslint-disable-next-line @lwc/lwc/no-async-await
|
|
2
|
+
export default async function generateData({ amountOfRecords }) {
|
|
3
|
+
// Adding fake delay
|
|
4
|
+
// eslint-disable-next-line @lwc/lwc/no-async-operation
|
|
5
|
+
await new Promise((resolve) => setTimeout(resolve, 2000));
|
|
6
|
+
|
|
7
|
+
return [...Array(amountOfRecords)].map((_, index) => {
|
|
8
|
+
return {
|
|
9
|
+
name: `Name (${index})`,
|
|
10
|
+
website: 'www.salesforce.com',
|
|
11
|
+
amount: Math.floor(Math.random() * 100),
|
|
12
|
+
phone: Math.floor(Math.random() * 1000000000),
|
|
13
|
+
closeAt: new Date(
|
|
14
|
+
Date.now() + 86400000 * Math.ceil(Math.random() * 20)
|
|
15
|
+
),
|
|
16
|
+
};
|
|
17
|
+
});
|
|
18
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LightningElement } from 'lwc';
|
|
2
|
-
import
|
|
2
|
+
import generateDataWithDelay from './generateDataWithDelay';
|
|
3
3
|
|
|
4
4
|
const columns = [
|
|
5
5
|
{ label: 'Label', fieldName: 'name' },
|
|
@@ -17,7 +17,7 @@ export default class DatatableWithInfiniteLoading extends LightningElement {
|
|
|
17
17
|
|
|
18
18
|
// eslint-disable-next-line @lwc/lwc/no-async-await
|
|
19
19
|
async connectedCallback() {
|
|
20
|
-
const data = await
|
|
20
|
+
const data = await generateDataWithDelay({ amountOfRecords: 100 });
|
|
21
21
|
this.data = data;
|
|
22
22
|
}
|
|
23
23
|
|
|
@@ -29,7 +29,7 @@ export default class DatatableWithInfiniteLoading extends LightningElement {
|
|
|
29
29
|
//Displays "Loading" text when more data is being loaded
|
|
30
30
|
this.loadMoreStatus = 'Loading';
|
|
31
31
|
|
|
32
|
-
const newData = await
|
|
32
|
+
const newData = await generateDataWithDelay({ amountOfRecords: 50 });
|
|
33
33
|
if (this.data.length >= this.totalNumberOfRows) {
|
|
34
34
|
datatable.enableInfiniteLoading = false;
|
|
35
35
|
this.loadMoreStatus = 'No more data to load';
|
|
@@ -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', editable: true },
|
|
@@ -14,8 +14,7 @@ export default class DatatableWithInlineEdit 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
|
}
|
|
@@ -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 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
|
+
}
|