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
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/* eslint-disable @lwc/lwc/no-api-reassignments */
|
|
2
2
|
|
|
3
3
|
import labelRequired from '@salesforce/label/LightningControl.required';
|
|
4
|
+
import labelHelpTextAlternativeText from '@salesforce/label/LightningInput.helptextAlternativeText';
|
|
4
5
|
import { LightningElement, api, track } from 'lwc';
|
|
5
|
-
import { classSet } from 'lightning/utils';
|
|
6
|
+
import { classSet, formatLabel } from 'lightning/utils';
|
|
6
7
|
import {
|
|
7
8
|
normalizeBoolean,
|
|
8
9
|
synchronizeAttrs,
|
|
@@ -10,6 +11,7 @@ import {
|
|
|
10
11
|
classListMutation,
|
|
11
12
|
decorateInputForDragon,
|
|
12
13
|
setDecoratedDragonInputValueWithoutEvent,
|
|
14
|
+
computeAriaInvalid,
|
|
13
15
|
} from 'lightning/utilsPrivate';
|
|
14
16
|
import {
|
|
15
17
|
InteractingState,
|
|
@@ -22,6 +24,7 @@ import { TouchScroller } from 'lightning/touchScrollLibrary';
|
|
|
22
24
|
|
|
23
25
|
const i18n = {
|
|
24
26
|
required: labelRequired,
|
|
27
|
+
helpTextAlternativeText: labelHelpTextAlternativeText,
|
|
25
28
|
};
|
|
26
29
|
|
|
27
30
|
/**
|
|
@@ -478,6 +481,14 @@ export default class LightningTextarea extends LightningElement {
|
|
|
478
481
|
}
|
|
479
482
|
return this._constraintApi;
|
|
480
483
|
}
|
|
484
|
+
|
|
485
|
+
get computedAriaInvalid() {
|
|
486
|
+
return computeAriaInvalid(this._helpMessage, this.value);
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
get helptextAlternativeText() {
|
|
490
|
+
return formatLabel(i18n.helpTextAlternativeText, this.label);
|
|
491
|
+
}
|
|
481
492
|
}
|
|
482
493
|
|
|
483
494
|
LightningTextarea.interopMap = {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
</template>
|
|
7
7
|
{label}
|
|
8
8
|
</label>
|
|
9
|
-
<lightning-helptext if:true={fieldLevelHelp} content={fieldLevelHelp}></lightning-helptext>
|
|
9
|
+
<lightning-helptext if:true={fieldLevelHelp} content={fieldLevelHelp} alternative-text={helptextAlternativeText}></lightning-helptext>
|
|
10
10
|
</template>
|
|
11
11
|
<div class="slds-form-element__control">
|
|
12
12
|
<lightning-base-combobox
|
|
@@ -31,7 +31,9 @@
|
|
|
31
31
|
ondropdownopenrequest={handleDropdownOpenRequest}
|
|
32
32
|
onfocus={handleFocus}
|
|
33
33
|
onblur={handleBlur}
|
|
34
|
-
onselect={handleTimeSelect}
|
|
34
|
+
onselect={handleTimeSelect}
|
|
35
|
+
data-aria-invalid={computedAriaInvalid}
|
|
36
|
+
>
|
|
35
37
|
</lightning-base-combobox>
|
|
36
38
|
</div>
|
|
37
39
|
|
|
@@ -4,25 +4,24 @@ import labelInvalidDate from '@salesforce/label/LightningDateTimePicker.invalidD
|
|
|
4
4
|
import labelRangeOverflow from '@salesforce/label/LightningDateTimePicker.rangeOverflow';
|
|
5
5
|
import labelRangeUnderflow from '@salesforce/label/LightningDateTimePicker.rangeUnderflow';
|
|
6
6
|
import labelRequired from '@salesforce/label/LightningControl.required';
|
|
7
|
-
import
|
|
8
|
-
import mediumTimeFormat from '@salesforce/i18n/dateTime.mediumTimeFormat';
|
|
7
|
+
import labelHelpTextAlternativeText from '@salesforce/label/LightningInput.helptextAlternativeText';
|
|
9
8
|
import { LightningElement, track, api } from 'lwc';
|
|
10
9
|
import { getTimeToHighlight } from './utils';
|
|
11
10
|
import { classSet, formatLabel } from 'lightning/utils';
|
|
12
11
|
import {
|
|
13
12
|
isBefore,
|
|
14
13
|
isAfter,
|
|
15
|
-
formatTime,
|
|
16
|
-
parseTime,
|
|
17
|
-
getISOTimeString,
|
|
18
14
|
normalizeISOTime,
|
|
19
|
-
|
|
15
|
+
parseFormattedTime,
|
|
16
|
+
getTimeFormatFromStyle,
|
|
17
|
+
getISOTimeString,
|
|
20
18
|
} from 'lightning/internationalizationLibrary';
|
|
21
19
|
import { removeTimeZoneSuffix } from 'lightning/iso8601Utils';
|
|
22
20
|
import {
|
|
23
21
|
normalizeBoolean,
|
|
24
22
|
synchronizeAttrs,
|
|
25
23
|
normalizeString,
|
|
24
|
+
computeAriaInvalid,
|
|
26
25
|
} from 'lightning/utilsPrivate';
|
|
27
26
|
import { normalizeVariant, VARIANT } from 'lightning/inputUtils';
|
|
28
27
|
|
|
@@ -31,6 +30,7 @@ const i18n = {
|
|
|
31
30
|
rangeOverflow: labelRangeOverflow,
|
|
32
31
|
rangeUnderflow: labelRangeUnderflow,
|
|
33
32
|
required: labelRequired,
|
|
33
|
+
helpTextAlternativeText: labelHelpTextAlternativeText,
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
const STEP = 15; // in minutes
|
|
@@ -79,7 +79,10 @@ export default class LightningTimePicker extends LightningElement {
|
|
|
79
79
|
get messageWhenBadInput() {
|
|
80
80
|
return (
|
|
81
81
|
this._messageWhenBadInput ||
|
|
82
|
-
formatLabel(
|
|
82
|
+
formatLabel(
|
|
83
|
+
i18n.invalidDate,
|
|
84
|
+
getTimeFormatFromStyle(this.timeStyle, true)
|
|
85
|
+
)
|
|
83
86
|
);
|
|
84
87
|
}
|
|
85
88
|
set messageWhenBadInput(message) {
|
|
@@ -93,7 +96,7 @@ export default class LightningTimePicker extends LightningElement {
|
|
|
93
96
|
this._messageWhenRangeOverflow ||
|
|
94
97
|
formatLabel(
|
|
95
98
|
i18n.rangeOverflow,
|
|
96
|
-
normalizeISOTime(this.max, this.
|
|
99
|
+
normalizeISOTime(this.max, this.timeStyle).isoValue
|
|
97
100
|
)
|
|
98
101
|
);
|
|
99
102
|
}
|
|
@@ -107,7 +110,7 @@ export default class LightningTimePicker extends LightningElement {
|
|
|
107
110
|
this._messageWhenRangeUnderflow ||
|
|
108
111
|
formatLabel(
|
|
109
112
|
i18n.rangeUnderflow,
|
|
110
|
-
normalizeISOTime(this.min, this.
|
|
113
|
+
normalizeISOTime(this.min, this.timeStyle).isoValue
|
|
111
114
|
)
|
|
112
115
|
);
|
|
113
116
|
}
|
|
@@ -136,7 +139,7 @@ export default class LightningTimePicker extends LightningElement {
|
|
|
136
139
|
const normalizedValue = removeTimeZoneSuffix(newValue);
|
|
137
140
|
const normalizedTime = normalizeISOTime(
|
|
138
141
|
normalizedValue,
|
|
139
|
-
this.
|
|
142
|
+
this.timeStyle
|
|
140
143
|
);
|
|
141
144
|
|
|
142
145
|
this._value = normalizedTime.isoValue;
|
|
@@ -258,9 +261,8 @@ export default class LightningTimePicker extends LightningElement {
|
|
|
258
261
|
fallbackValue: TIME_STYLE.SHORT,
|
|
259
262
|
validValues: [TIME_STYLE.SHORT, TIME_STYLE.MEDIUM, TIME_STYLE.LONG],
|
|
260
263
|
});
|
|
261
|
-
this.timeFormat = this.getTimeFormatFromStyle(this._timeStyle);
|
|
262
264
|
|
|
263
|
-
const normalizedDate = normalizeISOTime(this._value, this.
|
|
265
|
+
const normalizedDate = normalizeISOTime(this._value, this.timeStyle);
|
|
264
266
|
this._displayValue = normalizedDate.displayValue;
|
|
265
267
|
}
|
|
266
268
|
|
|
@@ -328,12 +330,17 @@ export default class LightningTimePicker extends LightningElement {
|
|
|
328
330
|
|
|
329
331
|
buildTimeList() {
|
|
330
332
|
// We should always display the options in the short style since m/l will add an extra :00 to the options.
|
|
331
|
-
const optionsTimeFormat = shortTimeFormat;
|
|
332
333
|
const timeList = [];
|
|
333
|
-
const minTime =
|
|
334
|
+
const minTime = normalizeISOTime(
|
|
335
|
+
this.min,
|
|
336
|
+
TIME_STYLE.SHORT
|
|
337
|
+
).parsedValue;
|
|
334
338
|
const minHour = minTime ? minTime.getHours() : 0;
|
|
335
339
|
|
|
336
|
-
const maxTime =
|
|
340
|
+
const maxTime = normalizeISOTime(
|
|
341
|
+
this.max,
|
|
342
|
+
TIME_STYLE.SHORT
|
|
343
|
+
).parsedValue;
|
|
337
344
|
const maxHour = maxTime ? maxTime.getHours() + 1 : 24;
|
|
338
345
|
|
|
339
346
|
const date = new Date();
|
|
@@ -350,11 +357,16 @@ export default class LightningTimePicker extends LightningElement {
|
|
|
350
357
|
break;
|
|
351
358
|
}
|
|
352
359
|
|
|
353
|
-
|
|
360
|
+
const isoTime = getISOTimeString(date);
|
|
361
|
+
const normalizedTime = normalizeISOTime(
|
|
362
|
+
isoTime,
|
|
363
|
+
TIME_STYLE.SHORT
|
|
364
|
+
);
|
|
365
|
+
|
|
354
366
|
timeList.push({
|
|
355
367
|
type: 'option-inline',
|
|
356
|
-
text:
|
|
357
|
-
value:
|
|
368
|
+
text: normalizedTime.displayValue,
|
|
369
|
+
value: isoTime,
|
|
358
370
|
});
|
|
359
371
|
}
|
|
360
372
|
}
|
|
@@ -395,17 +407,6 @@ export default class LightningTimePicker extends LightningElement {
|
|
|
395
407
|
this._items = this.timeList;
|
|
396
408
|
}
|
|
397
409
|
|
|
398
|
-
get timeFormat() {
|
|
399
|
-
if (!this._timeFormat) {
|
|
400
|
-
this._timeFormat = this.getTimeFormatFromStyle();
|
|
401
|
-
}
|
|
402
|
-
return this._timeFormat;
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
set timeFormat(value) {
|
|
406
|
-
this._timeFormat = value;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
410
|
getCombobox() {
|
|
410
411
|
return this.template.querySelector('lightning-base-combobox');
|
|
411
412
|
}
|
|
@@ -424,7 +425,11 @@ export default class LightningTimePicker extends LightningElement {
|
|
|
424
425
|
|
|
425
426
|
// keeping the display value in sync with the element's value
|
|
426
427
|
this._displayValue = event.detail.text;
|
|
427
|
-
|
|
428
|
+
const { value, style } = parseFormattedTime(this._displayValue);
|
|
429
|
+
this._value = value;
|
|
430
|
+
if (style) {
|
|
431
|
+
this._timeStyle = style;
|
|
432
|
+
}
|
|
428
433
|
|
|
429
434
|
this._items = this.timeList;
|
|
430
435
|
|
|
@@ -450,7 +455,7 @@ export default class LightningTimePicker extends LightningElement {
|
|
|
450
455
|
this._value = event.detail.value;
|
|
451
456
|
this._displayValue = normalizeISOTime(
|
|
452
457
|
this._value,
|
|
453
|
-
this.
|
|
458
|
+
this.timeStyle
|
|
454
459
|
).displayValue;
|
|
455
460
|
|
|
456
461
|
this._items = this.timeList;
|
|
@@ -473,69 +478,16 @@ export default class LightningTimePicker extends LightningElement {
|
|
|
473
478
|
);
|
|
474
479
|
}
|
|
475
480
|
|
|
476
|
-
format(date, formatString) {
|
|
477
|
-
if (formatString) {
|
|
478
|
-
return formatTime(date, formatString);
|
|
479
|
-
}
|
|
480
|
-
return getISOTimeString(date);
|
|
481
|
-
}
|
|
482
|
-
|
|
483
481
|
isBeforeMinTime(date, minTime) {
|
|
484
|
-
const minDate = minTime ||
|
|
482
|
+
const minDate = minTime || normalizeISOTime(this.min, TIME_STYLE.SHORT);
|
|
485
483
|
return minDate ? isBefore(date, minDate, 'minute') : false;
|
|
486
484
|
}
|
|
487
485
|
|
|
488
486
|
isAfterMaxTime(date, maxTime) {
|
|
489
|
-
const maxDate = maxTime ||
|
|
487
|
+
const maxDate = maxTime || normalizeISOTime(this.max, TIME_STYLE.SHORT);
|
|
490
488
|
return maxDate ? isAfter(date, maxDate, 'minute') : false;
|
|
491
489
|
}
|
|
492
490
|
|
|
493
|
-
getTimeFormatFromStyle(timeStyle) {
|
|
494
|
-
let timeFormat;
|
|
495
|
-
switch (timeStyle) {
|
|
496
|
-
case TIME_STYLE.MEDIUM:
|
|
497
|
-
case TIME_STYLE.LONG:
|
|
498
|
-
timeFormat = mediumTimeFormat;
|
|
499
|
-
break;
|
|
500
|
-
default:
|
|
501
|
-
timeFormat = shortTimeFormat;
|
|
502
|
-
break;
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
return timeFormat;
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
get allowedTimeFormats() {
|
|
509
|
-
// the locale.timeFormat is the medium format. Locale dont supports a large
|
|
510
|
-
// time format at the moment.
|
|
511
|
-
return [mediumTimeFormat, shortTimeFormat];
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
/**
|
|
515
|
-
* Parses the input time and sets the timeFormat used to parse the displayValue
|
|
516
|
-
* if it is a valid time.
|
|
517
|
-
*
|
|
518
|
-
* @param {String} displayValue - The input date.
|
|
519
|
-
* @return {null | string} - A normalized formatted time if displayValue is valid. null otherwise.
|
|
520
|
-
*/
|
|
521
|
-
parseFormattedTime(displayValue) {
|
|
522
|
-
const allowedFormats = this.allowedTimeFormats;
|
|
523
|
-
const n = allowedFormats.length;
|
|
524
|
-
let i = 0,
|
|
525
|
-
value = null;
|
|
526
|
-
|
|
527
|
-
do {
|
|
528
|
-
value = normalizeFormattedTime(displayValue, allowedFormats[i]);
|
|
529
|
-
i++;
|
|
530
|
-
} while (value === null && i < n);
|
|
531
|
-
|
|
532
|
-
if (value !== null) {
|
|
533
|
-
this.timeFormat = allowedFormats[i - 1];
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
return value;
|
|
537
|
-
}
|
|
538
|
-
|
|
539
491
|
get hasExternalLabel() {
|
|
540
492
|
return (
|
|
541
493
|
this.variant === VARIANT.LABEL_HIDDEN &&
|
|
@@ -543,4 +495,15 @@ export default class LightningTimePicker extends LightningElement {
|
|
|
543
495
|
this.ariaLabelledByElement.length
|
|
544
496
|
);
|
|
545
497
|
}
|
|
498
|
+
|
|
499
|
+
get computedAriaInvalid() {
|
|
500
|
+
const isAriaInvalid =
|
|
501
|
+
this.template.host.getAttribute('data-aria-invalid') ||
|
|
502
|
+
this._errorMessage;
|
|
503
|
+
return computeAriaInvalid(isAriaInvalid, this.value);
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
get helptextAlternativeText() {
|
|
507
|
+
return formatLabel(i18n.helpTextAlternativeText, this.label);
|
|
508
|
+
}
|
|
546
509
|
}
|
|
@@ -13,6 +13,9 @@ export function formatLabel(str) {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
return str.replace(/{(\d+)}/g, (match, i) => {
|
|
16
|
-
|
|
16
|
+
const replacement = replacements[i];
|
|
17
|
+
return replacement !== null && replacement !== undefined
|
|
18
|
+
? replacement
|
|
19
|
+
: '';
|
|
17
20
|
});
|
|
18
21
|
}
|
|
@@ -8,10 +8,6 @@ export function hasAnimation() {
|
|
|
8
8
|
if (isIE11) {
|
|
9
9
|
return false;
|
|
10
10
|
}
|
|
11
|
-
// JEST Workaround
|
|
12
|
-
if (!window.matchMedia) {
|
|
13
|
-
return true;
|
|
14
|
-
}
|
|
15
11
|
const mediaQuery = window.matchMedia('(prefers-reduced-motion: reduce)');
|
|
16
12
|
return !(!mediaQuery || mediaQuery.matches);
|
|
17
13
|
}
|
|
@@ -135,3 +135,29 @@ export function isAriaDescriptionSupported() {
|
|
|
135
135
|
}
|
|
136
136
|
return ariaDescriptionSupported;
|
|
137
137
|
}
|
|
138
|
+
|
|
139
|
+
export function updateAriaInvalidOnElement(element, isInvalid) {
|
|
140
|
+
if (isInvalid) {
|
|
141
|
+
element.setAttribute('aria-invalid', true);
|
|
142
|
+
} else {
|
|
143
|
+
element.removeAttribute('aria-invalid');
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* If value is empty, then do no calculate aria-invalid. This is intentional for 240.
|
|
149
|
+
* In the future, we may be removing emptiness this check.
|
|
150
|
+
*
|
|
151
|
+
* Then if isInvalid is truthy, return true else return undefined to remove
|
|
152
|
+
* aria-invalid attribute.
|
|
153
|
+
*
|
|
154
|
+
* @param isInvalid
|
|
155
|
+
* @param value
|
|
156
|
+
* @returns {boolean|undefined}
|
|
157
|
+
*/
|
|
158
|
+
export function computeAriaInvalid(isInvalid, value) {
|
|
159
|
+
if (value === undefined || value === null || value === '') {
|
|
160
|
+
return undefined;
|
|
161
|
+
}
|
|
162
|
+
return !!isInvalid || undefined;
|
|
163
|
+
}
|
|
@@ -107,6 +107,6 @@ export function parseToFormattedLinkifiedParts(text, ignoreNewLines = false) {
|
|
|
107
107
|
*/
|
|
108
108
|
export function parseToFormattedParts(text) {
|
|
109
109
|
return text.split(newLineRegex).map((part, index) => {
|
|
110
|
-
return index % 2 === 0 ? getTextPart(part) : getNewlinePart();
|
|
110
|
+
return index % 2 === 0 ? getTextPart(part) : getNewlinePart(index);
|
|
111
111
|
});
|
|
112
112
|
}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
export { assert } from './assert';
|
|
2
|
-
export {
|
|
2
|
+
export {
|
|
3
|
+
ARIA,
|
|
4
|
+
ARIA_TO_CAMEL,
|
|
5
|
+
isAriaDescriptionSupported,
|
|
6
|
+
updateAriaInvalidOnElement,
|
|
7
|
+
computeAriaInvalid,
|
|
8
|
+
} from './aria';
|
|
3
9
|
export { EventEmitter } from './eventEmitter';
|
|
4
10
|
export { toNorthAmericanPhoneNumber } from './phonify';
|
|
5
11
|
export * from './linkUtils';
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
const recordMetadata = {
|
|
2
|
-
name: 'name',
|
|
3
|
-
email: 'email',
|
|
4
|
-
website: 'url',
|
|
5
|
-
amount: 'currency',
|
|
6
|
-
phone: 'phoneNumber',
|
|
7
|
-
closeAt: 'dateInFuture',
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export default function fetchDataHelper({ amountOfRecords }) {
|
|
11
|
-
return fetch('https://data-faker.herokuapp.com/collection', {
|
|
12
|
-
method: 'POST',
|
|
13
|
-
headers: {
|
|
14
|
-
'Content-Type': 'application/json; charset=utf-8',
|
|
15
|
-
},
|
|
16
|
-
body: JSON.stringify({
|
|
17
|
-
amountOfRecords,
|
|
18
|
-
recordMetadata,
|
|
19
|
-
}),
|
|
20
|
-
}).then((response) => response.json());
|
|
21
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
const recordMetadata = {
|
|
2
|
-
name: 'name',
|
|
3
|
-
email: 'email',
|
|
4
|
-
website: 'url',
|
|
5
|
-
amount: 'currency',
|
|
6
|
-
phone: 'phoneNumber',
|
|
7
|
-
closeAt: 'dateInFuture',
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export default function fetchData(amountOfRecords) {
|
|
11
|
-
return fetch('https://data-faker.herokuapp.com/collection', {
|
|
12
|
-
method: 'POST',
|
|
13
|
-
headers: {
|
|
14
|
-
'Content-Type': 'application/json; charset=utf-8',
|
|
15
|
-
},
|
|
16
|
-
body: JSON.stringify({
|
|
17
|
-
amountOfRecords,
|
|
18
|
-
recordMetadata,
|
|
19
|
-
}),
|
|
20
|
-
}).then((response) => response.json());
|
|
21
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
const recordMetadata = {
|
|
2
|
-
name: 'name',
|
|
3
|
-
email: 'email',
|
|
4
|
-
website: 'url',
|
|
5
|
-
amount: 'currency',
|
|
6
|
-
phone: 'phoneNumber',
|
|
7
|
-
closeAt: 'dateInFuture',
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export default function fetchDataHelper({ amountOfRecords }) {
|
|
11
|
-
return fetch('https://data-faker.herokuapp.com/collection', {
|
|
12
|
-
method: 'POST',
|
|
13
|
-
headers: {
|
|
14
|
-
'Content-Type': 'application/json; charset=utf-8',
|
|
15
|
-
},
|
|
16
|
-
body: JSON.stringify({
|
|
17
|
-
amountOfRecords,
|
|
18
|
-
recordMetadata,
|
|
19
|
-
}),
|
|
20
|
-
}).then((response) => response.json());
|
|
21
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
const recordMetadata = {
|
|
2
|
-
name: 'name',
|
|
3
|
-
email: 'email',
|
|
4
|
-
website: 'url',
|
|
5
|
-
amount: 'currency',
|
|
6
|
-
phone: 'phoneNumber',
|
|
7
|
-
closeAt: 'dateInFuture',
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export default function fetchDataHelper({ amountOfRecords }) {
|
|
11
|
-
return fetch('https://data-faker.herokuapp.com/collection', {
|
|
12
|
-
method: 'POST',
|
|
13
|
-
headers: {
|
|
14
|
-
'Content-Type': 'application/json; charset=utf-8',
|
|
15
|
-
},
|
|
16
|
-
body: JSON.stringify({
|
|
17
|
-
amountOfRecords,
|
|
18
|
-
recordMetadata,
|
|
19
|
-
}),
|
|
20
|
-
}).then((response) => response.json());
|
|
21
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
const recordMetadata = {
|
|
2
|
-
name: 'name',
|
|
3
|
-
email: 'email',
|
|
4
|
-
website: 'url',
|
|
5
|
-
amount: 'currency',
|
|
6
|
-
phone: 'phoneNumber',
|
|
7
|
-
closeAt: 'dateInFuture',
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export default function fetchDataHelper({ amountOfRecords }) {
|
|
11
|
-
return fetch('https://data-faker.herokuapp.com/collection', {
|
|
12
|
-
method: 'POST',
|
|
13
|
-
headers: {
|
|
14
|
-
'Content-Type': 'application/json; charset=utf-8',
|
|
15
|
-
},
|
|
16
|
-
body: JSON.stringify({
|
|
17
|
-
amountOfRecords,
|
|
18
|
-
recordMetadata,
|
|
19
|
-
}),
|
|
20
|
-
}).then((response) => response.json());
|
|
21
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { createElement } from 'lwc';
|
|
2
|
-
import Element from 'lightning/icon';
|
|
3
|
-
|
|
4
|
-
function createIcon(props = {}) {
|
|
5
|
-
const element = createElement('lightning-icon', { is: Element });
|
|
6
|
-
|
|
7
|
-
Object.assign(element, props);
|
|
8
|
-
document.body.appendChild(element);
|
|
9
|
-
return element;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function verifySvgDataKey(element, value) {
|
|
13
|
-
const primitiveIcon = element.shadowRoot.querySelector(
|
|
14
|
-
'lightning-primitive-icon'
|
|
15
|
-
);
|
|
16
|
-
const svg = primitiveIcon.shadowRoot.querySelector('svg');
|
|
17
|
-
expect(svg.getAttribute('data-key')).toBe(value);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
describe('lightning-icon', () => {
|
|
21
|
-
it('should render with prebuilt icon for utility', () => {
|
|
22
|
-
const element = createIcon({
|
|
23
|
-
iconName: 'utility:check',
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
verifySvgDataKey(element, 'check');
|
|
27
|
-
});
|
|
28
|
-
it('should render with prebuilt icon for standard', () => {
|
|
29
|
-
const element = createIcon({
|
|
30
|
-
iconName: 'standard:account',
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
verifySvgDataKey(element, 'account');
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
it('should render with prebuilt icon for action', () => {
|
|
37
|
-
const element = createIcon({
|
|
38
|
-
iconName: 'action:back',
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
verifySvgDataKey(element, 'back');
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
it('should render with prebuilt icon for doctype', () => {
|
|
45
|
-
const element = createIcon({
|
|
46
|
-
iconName: 'doctype:image',
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
verifySvgDataKey(element, 'image');
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
it('should render with prebuilt icon for custom', () => {
|
|
53
|
-
const element = createIcon({
|
|
54
|
-
iconName: 'custom:custom1',
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
verifySvgDataKey(element, 'custom1');
|
|
58
|
-
});
|
|
59
|
-
});
|