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,54 +1,404 @@
|
|
|
1
|
-
|
|
1
|
+
/* LightningOverlayManager
|
|
2
|
+
* - provides shared state and methods in order for
|
|
3
|
+
* the LWC overlay system to prevent collisions with
|
|
4
|
+
* the Aura overlay system (ui:panelManager2, ui:modal, etc)
|
|
5
|
+
* - works in conjunction with LightningOverlayContainer and the Aura
|
|
6
|
+
* based overlay system
|
|
7
|
+
* - Originally, Aura overlays had z-index values
|
|
8
|
+
* incrementing by 1, starting at 9001
|
|
9
|
+
* ex: 9001, 9002, 9003, 9004
|
|
10
|
+
* - After Overlay and Modal updates, Aura overlays are
|
|
11
|
+
* only odd z-index values, *starting at 9001*
|
|
12
|
+
* ex: 9001, 9003, 9005, 9007
|
|
13
|
+
* - By default, LWC overlays stay the same value, *starting at 9000*
|
|
14
|
+
* relying upon the DOM order to determine which overlay is visible
|
|
15
|
+
* ex: 9000, 9000, 9000, 9000
|
|
16
|
+
* - When Aura AND LWC overlay systems both have active overlays present
|
|
17
|
+
* LWC z-index values are even only z-index values
|
|
18
|
+
* - incrementing by 1, when the previous highest overlay was an Aura overlay
|
|
19
|
+
* - and not incrementing for each additional LWC overlay
|
|
20
|
+
* ex 1: 9000 (LWC), 9001 (Aura), 9002 (LWC)
|
|
21
|
+
* ex 2: 9001 (Aura), 9003 (Aura), 9004 (LWC), 9004 (LWC), 9005 (Aura)
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
// LWC overlay stack constants
|
|
25
|
+
export const LWC_OVERLAY_ENGINE = 'lwc';
|
|
26
|
+
export const LWC_STARTING_ZINDEX = 9000;
|
|
27
|
+
export const LWC_ZINDEX_INCREMENT = 2;
|
|
28
|
+
export const LWC_ZINDEX_OFFSET = 1;
|
|
29
|
+
// Known overlay types with their assigned position type
|
|
30
|
+
// 'fixed' is default if not indicated
|
|
31
|
+
export const LWC_OVERLAY_TYPES = {
|
|
32
|
+
'lightning-modal': { pos: 'absolute' },
|
|
33
|
+
'lightning-alert': { pos: 'absolute' },
|
|
34
|
+
'lightning-confirm': { pos: 'absolute' },
|
|
35
|
+
'lightning-prompt': { pos: 'absolute' },
|
|
36
|
+
};
|
|
37
|
+
// Aura overlay stack constants
|
|
38
|
+
export const AURA_OVERLAY_ENGINE = 'aura';
|
|
39
|
+
export const AURA_STARTING_ZINDEX = 9001;
|
|
40
|
+
export const AURA_ZINDEX_INCREMENT = 2;
|
|
41
|
+
export const AURA_OVERLAY_TYPES = {
|
|
42
|
+
'ui:modal': { pos: 'absolute' },
|
|
43
|
+
};
|
|
44
|
+
|
|
2
45
|
const state = {
|
|
46
|
+
// track order of overlays opening
|
|
47
|
+
// [{ overlayEngine: 'lwc', overlayType: 'lightning-modal' },
|
|
48
|
+
// { overlayEngine: 'aura', overlayType: 'ui:modal', overlayDetails: { zIndex: 9001, id: '143:0' } }]
|
|
3
49
|
stack: [],
|
|
50
|
+
// callback comes from LightningOverlayContainer
|
|
4
51
|
callback: null,
|
|
5
|
-
|
|
52
|
+
// state.stack has mixed case
|
|
53
|
+
mixedOverlayPresent: false,
|
|
54
|
+
// aura stack details
|
|
55
|
+
auraHighestZindex: 9001,
|
|
56
|
+
// aura overlay is visible on top of stack
|
|
57
|
+
auraOverlayActive: false,
|
|
58
|
+
auraModalCount: 0,
|
|
59
|
+
auraAllOverlayCount: 0,
|
|
60
|
+
// lwc stack details
|
|
61
|
+
lwcModalCount: 0,
|
|
62
|
+
lwcOverlayCount: 0,
|
|
63
|
+
lwcAllOverlayCount: 0,
|
|
6
64
|
};
|
|
7
65
|
|
|
8
|
-
|
|
9
|
-
|
|
66
|
+
/**
|
|
67
|
+
* triggerLwcContainerCallback is used to callback to the
|
|
68
|
+
* LightningOverlayContainer when an update to the shared state occurs
|
|
69
|
+
* This method isn't triggered when:
|
|
70
|
+
* (A) Only Aura overlays exists so far
|
|
71
|
+
* ex: LightningOverlayContainer has not yet been created,
|
|
72
|
+
* this is when state.callback gets set initially
|
|
73
|
+
* (B) No LWC based overlays present
|
|
74
|
+
* ex: LightningOverlayContainer has been created, but the existing
|
|
75
|
+
* Lightning-based overlays have been removed and only Aura overlays
|
|
76
|
+
* remain. If another LWC overlay is added later, we start using
|
|
77
|
+
* the callback again
|
|
78
|
+
*/
|
|
79
|
+
function triggerLwcContainerCallback() {
|
|
80
|
+
if (state.callback && state.lwcAllOverlayCount > 0) {
|
|
81
|
+
state.callback(state);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* normalizeOverlayDetails is used create consistent overlay
|
|
87
|
+
* objects before adding them to state.stack
|
|
88
|
+
* This public function is used in both LWC and Aura overlay systems
|
|
89
|
+
* Examples of LWC (even z-index) and Aura (odd z-index) overlay objects
|
|
90
|
+
* { overlayEngine: 'lwc', overlayType: 'lightning-modal' },
|
|
91
|
+
* { overlayEngine: 'lwc', overlayType: 'lightning-modal', overlayDetails: { zIndex: 9004 } }
|
|
92
|
+
* { overlayEngine: 'aura', overlayType: 'ui:modal', overlayDetails: { zIndex: 9001 } }]
|
|
93
|
+
* @param {string} overlayEngine string representing the engine type: lwc, aura
|
|
94
|
+
* @param {string} overlayType string representing the type of overlay: lightning-modal, ui:modal
|
|
95
|
+
* @param {Object} overlayDetails object representing details about overlay, currently zIndex
|
|
96
|
+
* @return {Object} combined overlay details object
|
|
97
|
+
*/
|
|
98
|
+
export function normalizeOverlayDetails(
|
|
99
|
+
overlayEngine,
|
|
100
|
+
overlayType,
|
|
101
|
+
overlayDetails
|
|
102
|
+
) {
|
|
103
|
+
let overlayObject = {};
|
|
104
|
+
const missingRequiredValues = !overlayEngine || !overlayType;
|
|
105
|
+
const reqdValuesNotCorrectType =
|
|
106
|
+
(overlayEngine !== LWC_OVERLAY_ENGINE ||
|
|
107
|
+
overlayEngine !== AURA_OVERLAY_ENGINE) &&
|
|
108
|
+
typeof overlayType !== 'string';
|
|
109
|
+
if (missingRequiredValues || reqdValuesNotCorrectType) {
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
// set required values
|
|
113
|
+
overlayObject.overlayEngine = overlayEngine;
|
|
114
|
+
overlayObject.overlayType = overlayType;
|
|
115
|
+
// set optional values
|
|
116
|
+
if (overlayDetails) {
|
|
117
|
+
// acceptable values
|
|
118
|
+
const { zIndex, id, index } = overlayDetails;
|
|
119
|
+
let cleanedDetails = {};
|
|
120
|
+
if (zIndex !== undefined || zIndex !== null) {
|
|
121
|
+
// ensure that zIndex value is a number before assignment
|
|
122
|
+
const zIndexNumber = parseInt(zIndex, 10);
|
|
123
|
+
const isZIndexANumber = !Number.isNaN(zIndexNumber);
|
|
124
|
+
if (isZIndexANumber) {
|
|
125
|
+
cleanedDetails.zIndex = zIndexNumber;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
if (id && typeof id === 'string') {
|
|
129
|
+
cleanedDetails.id = id;
|
|
130
|
+
}
|
|
131
|
+
// index is zero based index (can be 0, which is falsy)
|
|
132
|
+
if (
|
|
133
|
+
index !== undefined ||
|
|
134
|
+
(index !== null && typeof index === 'number')
|
|
135
|
+
) {
|
|
136
|
+
cleanedDetails.index = index;
|
|
137
|
+
}
|
|
138
|
+
overlayObject.overlayDetails = cleanedDetails;
|
|
139
|
+
}
|
|
140
|
+
return overlayObject;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* getOverlayStackStats is used to update and reinitialize the Aura and LWC shared
|
|
145
|
+
* overlay state immediately after overlay additions and removals occur
|
|
146
|
+
*/
|
|
147
|
+
function getOverlayStackStats() {
|
|
148
|
+
const stats = {
|
|
149
|
+
// init lwc stats
|
|
150
|
+
hasLwc: false,
|
|
151
|
+
lwcOverlays: 0,
|
|
152
|
+
lwcAllOverlays: 0,
|
|
153
|
+
lwcModals: 0,
|
|
154
|
+
// init aura stats
|
|
155
|
+
hasAura: false,
|
|
156
|
+
auraModals: 0,
|
|
157
|
+
auraOverlays: 0,
|
|
158
|
+
auraAllOverlays: 0,
|
|
159
|
+
auraOverlayActive: false,
|
|
160
|
+
auraHighestZIndex: null,
|
|
161
|
+
};
|
|
162
|
+
// init one time values
|
|
163
|
+
const stackLength = state.stack.length;
|
|
164
|
+
|
|
165
|
+
state.stack.forEach(
|
|
166
|
+
({ overlayEngine, overlayType, overlayDetails }, stackIndex) => {
|
|
167
|
+
const isLwc = overlayEngine === LWC_OVERLAY_ENGINE;
|
|
168
|
+
const isAura = overlayEngine === AURA_OVERLAY_ENGINE;
|
|
169
|
+
// lwc specific details
|
|
170
|
+
if (isLwc) {
|
|
171
|
+
if (!stats.hasLwc) {
|
|
172
|
+
stats.hasLwc = true;
|
|
173
|
+
}
|
|
174
|
+
if (overlayType) {
|
|
175
|
+
const isModalType = !!LWC_OVERLAY_TYPES[overlayType];
|
|
176
|
+
if (isModalType) {
|
|
177
|
+
stats.lwcModals++;
|
|
178
|
+
} else {
|
|
179
|
+
stats.lwcOverlays++;
|
|
180
|
+
}
|
|
181
|
+
stats.lwcAllOverlays++;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
// aura specific details
|
|
185
|
+
if (isAura) {
|
|
186
|
+
if (!stats.hasAura) {
|
|
187
|
+
stats.hasAura = true;
|
|
188
|
+
}
|
|
189
|
+
if (overlayType) {
|
|
190
|
+
const isModalType = !!AURA_OVERLAY_TYPES[overlayType];
|
|
191
|
+
if (isModalType) {
|
|
192
|
+
stats.auraModals++;
|
|
193
|
+
} else {
|
|
194
|
+
stats.auraOverlays++;
|
|
195
|
+
}
|
|
196
|
+
stats.auraAllOverlays++;
|
|
197
|
+
}
|
|
198
|
+
if (overlayDetails && overlayDetails.zIndex) {
|
|
199
|
+
const { zIndex } = overlayDetails;
|
|
200
|
+
const { auraHighestZIndex } = stats;
|
|
201
|
+
const zIndexIsNumber = !isNaN(zIndex);
|
|
202
|
+
if (
|
|
203
|
+
zIndexIsNumber &&
|
|
204
|
+
(!auraHighestZIndex || zIndex > auraHighestZIndex)
|
|
205
|
+
) {
|
|
206
|
+
stats.auraHighestZIndex = zIndex;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
// check if aura overlay is last element in stack
|
|
210
|
+
// indicates aura is active
|
|
211
|
+
if (stackLength === stackIndex + 1) {
|
|
212
|
+
stats.auraOverlayActive = true;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
);
|
|
217
|
+
return stats;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* updateStateWithStackStats is used to update and reinitialize the Aura and LWC shared
|
|
222
|
+
* overlay state immediately after overlay additions and removals occur
|
|
223
|
+
*/
|
|
224
|
+
function updateStateWithStackStats(stats) {
|
|
225
|
+
if (!stats) {
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// update Aura state with collected stats
|
|
230
|
+
if (stats.hasAura) {
|
|
231
|
+
// aura settings
|
|
232
|
+
state.auraModalCount = stats.auraModals;
|
|
233
|
+
state.auraOverlayCount = stats.auraOverlays;
|
|
234
|
+
state.auraAllOverlayCount = stats.auraAllOverlays;
|
|
235
|
+
state.auraOverlayActive = stats.auraOverlayActive;
|
|
236
|
+
if (stats.auraHighestZIndex) {
|
|
237
|
+
state.auraHighestZindex = stats.auraHighestZIndex;
|
|
238
|
+
}
|
|
239
|
+
// or reset Aura state
|
|
240
|
+
} else {
|
|
241
|
+
initAuraOverlayState();
|
|
242
|
+
}
|
|
10
243
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
state.
|
|
244
|
+
// update LWC state with collected stats
|
|
245
|
+
if (stats.hasLwc) {
|
|
246
|
+
// lwc settings
|
|
247
|
+
state.lwcModalCount = stats.lwcModalCount;
|
|
248
|
+
state.lwcOverlayCount = stats.lwcOverlays;
|
|
249
|
+
state.lwcAllOverlayCount = stats.lwcAllOverlays;
|
|
250
|
+
// or reset LWC state
|
|
251
|
+
} else {
|
|
252
|
+
initLwcOverlayState();
|
|
15
253
|
}
|
|
254
|
+
// update shared Aura+LWC state
|
|
255
|
+
state.mixedOverlayPresent = stats.hasLwc && stats.hasAura;
|
|
16
256
|
}
|
|
17
257
|
|
|
18
258
|
/**
|
|
19
|
-
*
|
|
259
|
+
* updateSharedOverlayState is used to trigger updates to shared overlay state
|
|
20
260
|
*/
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
261
|
+
function updateSharedOverlayState() {
|
|
262
|
+
if (state.stack.length === 0) {
|
|
263
|
+
// don't reset all state, just aura and lwc state individually
|
|
264
|
+
// in order to avoid removing callback
|
|
265
|
+
// callback is set only once, when overlayContainer is opened
|
|
266
|
+
initAuraOverlayState();
|
|
267
|
+
initLwcOverlayState();
|
|
268
|
+
} else {
|
|
269
|
+
const stats = getOverlayStackStats();
|
|
270
|
+
updateStateWithStackStats(stats);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
function cleanOverlayDetails(details) {
|
|
275
|
+
let cleanedDetails = {};
|
|
276
|
+
const detailsKeys = {
|
|
277
|
+
id: 'string',
|
|
278
|
+
zIndex: 'number',
|
|
279
|
+
index: 'number',
|
|
280
|
+
};
|
|
281
|
+
if (!details || typeof details !== 'object') {
|
|
282
|
+
return cleanedDetails;
|
|
25
283
|
}
|
|
26
|
-
|
|
27
|
-
|
|
284
|
+
Object.entries(details).forEach(([key, value]) => {
|
|
285
|
+
if (detailsKeys[key] && typeof value === detailsKeys[key]) {
|
|
286
|
+
cleanedDetails[key] = value;
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
return cleanedDetails;
|
|
28
290
|
}
|
|
29
291
|
|
|
30
292
|
/**
|
|
31
|
-
*
|
|
293
|
+
* addOverlayToSharedState is used to push an overlay object
|
|
294
|
+
* into shared overlay state: state.stack
|
|
295
|
+
* the object should first be processed by normalizeOverlayDetails
|
|
296
|
+
* This public function is called from LWC and Aura overlay systems
|
|
297
|
+
* @param {Object} overlayObject object representing details about the overlay to add
|
|
32
298
|
*/
|
|
33
|
-
export function
|
|
34
|
-
|
|
35
|
-
|
|
299
|
+
export function addOverlayToSharedState(overlayObject) {
|
|
300
|
+
let { overlayEngine, overlayType, overlayDetails } = overlayObject;
|
|
301
|
+
const missingValues = !overlayObject || !overlayEngine || !overlayType;
|
|
302
|
+
const standardEngines =
|
|
303
|
+
overlayEngine === LWC_OVERLAY_ENGINE ||
|
|
304
|
+
overlayEngine === AURA_OVERLAY_ENGINE;
|
|
305
|
+
// disallow unknown additions
|
|
306
|
+
if (missingValues || !standardEngines) {
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
309
|
+
overlayDetails = cleanOverlayDetails(overlayDetails);
|
|
310
|
+
|
|
311
|
+
// after checks, add overlay object
|
|
312
|
+
state.stack.push({ overlayEngine, overlayType, overlayDetails });
|
|
313
|
+
// first update shared overlay state
|
|
314
|
+
updateSharedOverlayState();
|
|
315
|
+
// then trigger callback to overlayContainer
|
|
316
|
+
triggerLwcContainerCallback();
|
|
36
317
|
}
|
|
37
318
|
|
|
38
319
|
/**
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
320
|
+
* removeOverlayFromSharedState is used to remove an overlay object
|
|
321
|
+
* from shared overlay state: state.stack
|
|
322
|
+
* This public function is called from LWC and Aura overlay systems
|
|
323
|
+
* @param {Object} overlayObject object representing details about the overlay to remove
|
|
42
324
|
*/
|
|
43
|
-
export function
|
|
325
|
+
export function removeOverlayFromSharedState(overlayObject) {
|
|
326
|
+
const stackLength = state.stack.length;
|
|
327
|
+
const { overlayEngine, overlayDetails } = overlayObject;
|
|
328
|
+
const missingValues = !overlayObject || !overlayEngine;
|
|
329
|
+
const standardEngines =
|
|
330
|
+
overlayEngine === LWC_OVERLAY_ENGINE ||
|
|
331
|
+
overlayEngine === AURA_OVERLAY_ENGINE;
|
|
332
|
+
let overlayId = null;
|
|
333
|
+
let indexToRemove = null;
|
|
334
|
+
// disallow unknown removals
|
|
335
|
+
if (stackLength === 0 || missingValues || !standardEngines) {
|
|
336
|
+
return;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
if (overlayDetails && overlayDetails.id) {
|
|
340
|
+
overlayId = overlayDetails.id;
|
|
341
|
+
}
|
|
342
|
+
// Use overlay ID to find correct overlay and remove
|
|
343
|
+
// IDs may be GUID (LBC overlays) or Aura globalId (Aura overlays)
|
|
344
|
+
if (overlayId) {
|
|
345
|
+
// loop from end to the front of the stack
|
|
346
|
+
// determine which item to remove
|
|
347
|
+
for (let index = stackLength; index--; index >= 0) {
|
|
348
|
+
const {
|
|
349
|
+
overlayDetails: { id: oId },
|
|
350
|
+
} = state.stack[index];
|
|
351
|
+
if (oId && oId === overlayId) {
|
|
352
|
+
indexToRemove = index;
|
|
353
|
+
break;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
if (indexToRemove !== null) {
|
|
359
|
+
state.stack.splice(indexToRemove, 1);
|
|
360
|
+
// then update shared overlay state
|
|
361
|
+
updateSharedOverlayState();
|
|
362
|
+
// then trigger callback to overlayContainer
|
|
363
|
+
triggerLwcContainerCallback();
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* subscribeOverlay is utilized to set the state.callback function
|
|
369
|
+
* initially for LightningOverlayContainer (LOC) usage.
|
|
370
|
+
* NOTE: This function is exported and is supported for use ONLY by LOC
|
|
371
|
+
* When LOC is initialized, this callback is set, so that later updates to
|
|
372
|
+
* Aura and LWC overlay state occur, updates to LWC overlay z-index behavior
|
|
373
|
+
* can be made
|
|
374
|
+
* @param {boolean} shouldCall value to determine if call should be made
|
|
375
|
+
* @param {Function} callback function to call when an update occurs
|
|
376
|
+
*/
|
|
377
|
+
export function subscribeOverlay(shouldCall, callback) {
|
|
378
|
+
// store once for later usage
|
|
44
379
|
state.callback = callback;
|
|
45
|
-
|
|
380
|
+
if (shouldCall) {
|
|
381
|
+
triggerLwcContainerCallback();
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* initLwcOverlayState resets only LWC overlay state values
|
|
387
|
+
*/
|
|
388
|
+
function initLwcOverlayState() {
|
|
389
|
+
state.lwcModalCount = 0;
|
|
390
|
+
state.lwcOverlayCount = 0;
|
|
391
|
+
state.lwcAllOverlayCount = 0;
|
|
46
392
|
}
|
|
47
393
|
|
|
48
394
|
/**
|
|
49
|
-
*
|
|
395
|
+
* initAuraOverlayState resets only Aura overlay state values
|
|
50
396
|
*/
|
|
51
|
-
|
|
52
|
-
state.
|
|
53
|
-
state.
|
|
397
|
+
function initAuraOverlayState() {
|
|
398
|
+
state.auraModalCount = 0;
|
|
399
|
+
state.auraOverlayCount = 0;
|
|
400
|
+
state.auraAllOverlayCount = 0;
|
|
401
|
+
state.auraHighestZindex = AURA_STARTING_ZINDEX;
|
|
402
|
+
state.auraOverlayActive = false;
|
|
403
|
+
state.auraOverlayPresent = false;
|
|
54
404
|
}
|
|
@@ -31,6 +31,7 @@ export default class LightningPicklist extends LightningElement {
|
|
|
31
31
|
@api placeholder;
|
|
32
32
|
@api variant;
|
|
33
33
|
@api autocomplete = 'off';
|
|
34
|
+
@api suppressNoneOption;
|
|
34
35
|
|
|
35
36
|
set fieldLevelHelp(value) {
|
|
36
37
|
this._fieldLevelHelp = value;
|
|
@@ -86,6 +87,7 @@ export default class LightningPicklist extends LightningElement {
|
|
|
86
87
|
// reset the flag that hides the required indicator when we have no options
|
|
87
88
|
this._requiredButDisabled = false;
|
|
88
89
|
}
|
|
90
|
+
|
|
89
91
|
@api
|
|
90
92
|
get required() {
|
|
91
93
|
return this._required;
|
|
@@ -293,7 +295,10 @@ export default class LightningPicklist extends LightningElement {
|
|
|
293
295
|
// We could have set required=false if the picklist had no options, see updateDisabledState and updateRequiredState
|
|
294
296
|
const isRequiredPicklist = this.required || this._requiredButDisabled;
|
|
295
297
|
|
|
296
|
-
if (
|
|
298
|
+
if (
|
|
299
|
+
this.suppressNoneOption ||
|
|
300
|
+
(isRequiredPicklist && numberOfOptions === 1)
|
|
301
|
+
) {
|
|
297
302
|
return false;
|
|
298
303
|
}
|
|
299
304
|
|
|
@@ -325,17 +325,7 @@ export default class PrivateCellFactory extends PrimitiveDatatableCell {
|
|
|
325
325
|
}
|
|
326
326
|
|
|
327
327
|
get dateValue() {
|
|
328
|
-
|
|
329
|
-
// for undefined, '', or any other invalid values, formatted-date-time
|
|
330
|
-
// just displays ''
|
|
331
|
-
if (this.value === null) {
|
|
332
|
-
return '';
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
// this is temporary, formatted-date-time should accept
|
|
336
|
-
// date time string formats like '2017-03-01 08:45:12Z'
|
|
337
|
-
// it's accepting only timestamp and Date objects
|
|
338
|
-
return new Date(this.value);
|
|
328
|
+
return this.value;
|
|
339
329
|
}
|
|
340
330
|
|
|
341
331
|
get computedDateLocalDay() {
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
The `lightning/prompt` module lets you create an prompt modal within your component. Use `LightningPrompt` on your components to ask the user to provide information before they continue.
|
|
2
2
|
|
|
3
|
-
`lightning/prompt` is not supported on mobile devices.
|
|
4
|
-
|
|
5
3
|
Use `LightningPrompt.open()` instead of the native `window.prompt()` for a more consistent user experience. They have similar functions, but `LightningPrompt.open()` works in cross-origin iframes, where the `.prompt()` method is no longer supported in Chrome and Safari. Unlike `window.prompt()`, `LightningPrompt.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 prompt has closed.
|
|
6
4
|
|
|
7
5
|
Import `LightningPrompt` from the `lightning/prompt` module in the component that will launch the prompt modal, and call `LightningPrompt.open()` with your desired attributes.
|
|
@@ -11,7 +9,7 @@ This example creates a prompt modal with a header, message, and two buttons. If
|
|
|
11
9
|
```html
|
|
12
10
|
<!-- c/myApp.html -->
|
|
13
11
|
<template>
|
|
14
|
-
<lightning-button onclick=
|
|
12
|
+
<lightning-button onclick={handlePromptClick} label="Open Prompt Modal">
|
|
15
13
|
</lightning-button>
|
|
16
14
|
</template>
|
|
17
15
|
```
|
|
@@ -66,7 +64,7 @@ Code using `LightningPrompt` can be tested by mocking the `LightningPrompt.open(
|
|
|
66
64
|
The example below uses a button to open a prompt dialog and sets the result in a template.
|
|
67
65
|
|
|
68
66
|
```html
|
|
69
|
-
<button data-button onclick=
|
|
67
|
+
<button data-button onclick={handleClick}>Open Prompt</button>
|
|
70
68
|
<div data-result>{result}</div>
|
|
71
69
|
```
|
|
72
70
|
|
|
@@ -90,8 +90,17 @@ export default class LightningRadioGroup extends LightningElement {
|
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
+
get fieldsetElement() {
|
|
94
|
+
return this.template.querySelector('fieldset');
|
|
95
|
+
}
|
|
96
|
+
|
|
93
97
|
renderedCallback() {
|
|
94
98
|
this.synchronizeA11y();
|
|
99
|
+
synchronizeAttrs(this.fieldsetElement, {
|
|
100
|
+
'aria-describedby': getRealDOMId(
|
|
101
|
+
this.template.querySelector('[data-help-message]')
|
|
102
|
+
),
|
|
103
|
+
});
|
|
95
104
|
}
|
|
96
105
|
|
|
97
106
|
/**
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
</template>
|
|
6
6
|
{label}
|
|
7
7
|
</label>
|
|
8
|
-
<lightning-helptext content={fieldLevelHelp} if:true={fieldLevelHelp}></lightning-helptext>
|
|
8
|
+
<lightning-helptext content={fieldLevelHelp} if:true={fieldLevelHelp} alternative-text={helptextAlternativeText}></lightning-helptext>
|
|
9
9
|
|
|
10
10
|
<div class="slds-form-element__control">
|
|
11
11
|
<div class="slds-select_container">
|
|
@@ -21,7 +21,9 @@
|
|
|
21
21
|
onfocus={handleFocus}
|
|
22
22
|
required={required}
|
|
23
23
|
accesskey={accessKey}
|
|
24
|
-
size={size}
|
|
24
|
+
size={size}
|
|
25
|
+
aria-invalid={computedAriaInvalid}
|
|
26
|
+
>
|
|
25
27
|
<template for:each={options} for:item="option">
|
|
26
28
|
<template if:true={option.disabled}>
|
|
27
29
|
<option disabled key={option.value} value={option.value}>{option.label}</option>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import labelRequired from '@salesforce/label/LightningControl.required';
|
|
2
|
+
import labelHelpTextAlternativeText from '@salesforce/label/LightningInput.helptextAlternativeText';
|
|
2
3
|
import { api, LightningElement, track } from 'lwc';
|
|
3
|
-
import { classSet } from 'lightning/utils';
|
|
4
|
+
import { classSet, formatLabel } from 'lightning/utils';
|
|
4
5
|
import {
|
|
5
6
|
classListMutation,
|
|
6
7
|
getRealDOMId,
|
|
@@ -18,6 +19,7 @@ import {
|
|
|
18
19
|
|
|
19
20
|
const i18n = {
|
|
20
21
|
required: labelRequired,
|
|
22
|
+
helpTextAlternativeText: labelHelpTextAlternativeText,
|
|
21
23
|
};
|
|
22
24
|
|
|
23
25
|
export default class LightningSelect extends LightningElement {
|
|
@@ -80,11 +82,15 @@ export default class LightningSelect extends LightningElement {
|
|
|
80
82
|
}
|
|
81
83
|
synchronizeAttrs(this.selectElement, {
|
|
82
84
|
'aria-describedby': getRealDOMId(
|
|
83
|
-
this.template.querySelector('
|
|
85
|
+
this.template.querySelector('[data-help-message]')
|
|
84
86
|
),
|
|
85
87
|
});
|
|
86
88
|
}
|
|
87
89
|
|
|
90
|
+
get computedAriaInvalid() {
|
|
91
|
+
return !!this._helpMessage || undefined;
|
|
92
|
+
}
|
|
93
|
+
|
|
88
94
|
/**
|
|
89
95
|
* Help text detailing the purpose and function of the menu of options.
|
|
90
96
|
* The text is displayed in a tooltip above the menu.
|
|
@@ -399,4 +405,8 @@ export default class LightningSelect extends LightningElement {
|
|
|
399
405
|
}
|
|
400
406
|
return this.selectElement.value;
|
|
401
407
|
}
|
|
408
|
+
|
|
409
|
+
get helptextAlternativeText() {
|
|
410
|
+
return formatLabel(i18n.helpTextAlternativeText, this.label);
|
|
411
|
+
}
|
|
402
412
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<template for:each={_allTabs} for:item="tab">
|
|
7
7
|
<template if:true={tab.visible}>
|
|
8
8
|
<li data-tab key={tab.value} class={tab.class} onclick={handleTabClick}
|
|
9
|
-
title={tab.title} role="presentation" data-label={tab.label} data-tab-value={tab.value}>
|
|
9
|
+
title={tab.title} role="presentation" data-label={tab.label} data-tab-value={tab.value} data-target-selection-name={tab.targetSelectionName}>
|
|
10
10
|
<a class={tab.linkClass}
|
|
11
11
|
data-tab-value={tab.value}
|
|
12
12
|
data-label={tab.label}
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
<li data-overflow class={computedOverflowClass} style={computedOverflowVisibility}>
|
|
44
44
|
<lightning-button-menu variant="bare"
|
|
45
45
|
alternative-text={i18n.moreAlternativeText}
|
|
46
|
+
data-target-reveals={targetReveals}
|
|
46
47
|
title={i18n.moreTitle}
|
|
47
48
|
onselect={handleOverflowSelect}
|
|
48
49
|
icon-name="utility:chevrondown"
|
|
@@ -50,7 +51,7 @@
|
|
|
50
51
|
menu-alignment="right">
|
|
51
52
|
<template for:each={_allTabs} for:item="tab">
|
|
52
53
|
<template if:false={tab.visible}>
|
|
53
|
-
<lightning-menu-item key={tab.value} label={tab.label} value={tab.value}></lightning-menu-item>
|
|
54
|
+
<lightning-menu-item key={tab.value} label={tab.label} value={tab.value} data-target-selection-name={tab.targetSelectionName}></lightning-menu-item>
|
|
54
55
|
</template>
|
|
55
56
|
</template>
|
|
56
57
|
</lightning-button-menu>
|
|
@@ -17,6 +17,7 @@ const i18n = {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
const RECOMPUTE_OVERFLOW_THRESHOLD_PX = 30;
|
|
20
|
+
const TARGET_SELECTION_NAME_SUFFIX = 'Tab';
|
|
20
21
|
|
|
21
22
|
export default class LightningTabBar extends LightningElement {
|
|
22
23
|
@api disableOverflow = false;
|
|
@@ -99,6 +100,10 @@ export default class LightningTabBar extends LightningElement {
|
|
|
99
100
|
endIconName: tab.endIconName,
|
|
100
101
|
endIconAlternativeText: tab.endIconAlternativeText,
|
|
101
102
|
showErrorIndicator: tab.showErrorIndicator,
|
|
103
|
+
targetSelectionName: tab.value
|
|
104
|
+
? encodeURIComponent(tab.value) +
|
|
105
|
+
TARGET_SELECTION_NAME_SUFFIX
|
|
106
|
+
: '',
|
|
102
107
|
};
|
|
103
108
|
});
|
|
104
109
|
|
|
@@ -439,4 +444,14 @@ export default class LightningTabBar extends LightningElement {
|
|
|
439
444
|
|
|
440
445
|
this._queueSynchronizeA11 = true;
|
|
441
446
|
}
|
|
447
|
+
|
|
448
|
+
get targetReveals() {
|
|
449
|
+
const hiddenTargets = [];
|
|
450
|
+
this._allTabs.forEach((tab) => {
|
|
451
|
+
if (!tab.visible && tab.targetSelectionName) {
|
|
452
|
+
hiddenTargets.push(tab.targetSelectionName);
|
|
453
|
+
}
|
|
454
|
+
});
|
|
455
|
+
return hiddenTargets.join(',');
|
|
456
|
+
}
|
|
442
457
|
}
|
|
@@ -5,10 +5,11 @@
|
|
|
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
|
<div class="slds-form-element__control slds-grow textarea-container">
|
|
10
10
|
<textarea id="input" class="slds-textarea"
|
|
11
11
|
aria-describedby={computedUniqueHelpElementId}
|
|
12
|
+
aria-invalid={computedAriaInvalid}
|
|
12
13
|
autocomplete={autocomplete}
|
|
13
14
|
oninput={handleInput}
|
|
14
15
|
onchange={handleChange}
|