lightning-base-components 1.14.6-alpha → 1.15.2-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 +31 -4
- package/package.json +13 -2
- package/scopedImports/@salesforce-internal-core.appVersion.js +1 -1
- package/scopedImports/@salesforce-label-LightningMap.defaultTitle.js +1 -0
- package/scopedImports/@salesforce-label-LightningProgressBar.progressBar.js +1 -0
- package/src/lightning/alert/__docs__/alert.md +99 -0
- package/src/lightning/alert/__examples__disabled/basic/basic.css +7 -0
- package/src/lightning/alert/__examples__disabled/basic/basic.html +8 -0
- package/src/lightning/alert/__examples__disabled/basic/basic.js +14 -0
- package/src/lightning/alert/alert.html +3 -0
- package/src/lightning/alert/alert.js +78 -0
- package/src/lightning/alert/alert.js-meta.xml +6 -0
- package/src/lightning/baseCombobox/baseCombobox.html +2 -1
- package/src/lightning/baseCombobox/baseCombobox.js +41 -6
- package/src/lightning/button/__wdio__/utam/utam.html +3 -0
- package/src/lightning/button/__wdio__/utam/utam.js +3 -0
- package/src/lightning/button/__wdio__/utam/utam.spec.js +20 -0
- package/src/lightning/button/button.js +22 -1
- package/src/lightning/buttonMenu/buttonMenu.js +12 -0
- 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.js +0 -1
- package/src/lightning/confirm/__docs__/confirm.md +98 -0
- package/src/lightning/confirm/__examples__disabled/basic/basic.css +7 -0
- package/src/lightning/confirm/__examples__disabled/basic/basic.html +8 -0
- package/src/lightning/confirm/__examples__disabled/basic/basic.js +14 -0
- package/src/lightning/confirm/confirm.html +3 -0
- package/src/lightning/confirm/confirm.js +80 -0
- package/src/lightning/confirm/confirm.js-meta.xml +6 -0
- package/src/lightning/datatable/__docs__/datatable.md +45 -0
- package/src/lightning/datatable/__wdio__/utam/utam.html +32 -0
- package/src/lightning/datatable/__wdio__/utam/utam.js +91 -0
- package/src/lightning/datatable/__wdio__/utam/utam.spec.js +214 -0
- package/src/lightning/datatable/columns.js +166 -71
- package/src/lightning/datatable/datatable.js +103 -20
- package/src/lightning/datatable/headerActions.js +2 -2
- package/src/lightning/datatable/inlineEdit.js +0 -5
- package/src/lightning/datatable/inlineEditShared.js +4 -2
- package/src/lightning/datatable/keyboard.js +17 -13
- package/src/lightning/datatable/renderManager.js +45 -13
- package/src/lightning/datatable/resizeSensor.js +11 -3
- package/src/lightning/datatable/rowSelection.js +9 -3
- package/src/lightning/datatable/rowSelectionShared.js +33 -20
- package/src/lightning/datatable/rows.js +3 -2
- package/src/lightning/datatable/sort.js +8 -8
- package/src/lightning/datatable/state.js +9 -1
- package/src/lightning/datatable/templates/div/div.html +6 -2
- package/src/lightning/datatable/templates/table/table.html +7 -4
- package/src/lightning/datatable/tree.js +25 -0
- package/src/lightning/datatable/types.js +77 -9
- package/src/lightning/datatable/utils.js +51 -24
- package/src/lightning/datatable/virtualization.js +319 -0
- package/src/lightning/datatable/wrapText.js +54 -16
- package/src/lightning/datepicker/__perf__DISABLED/datepickerWithCalendarOpen.perf.js +55 -0
- package/src/lightning/datepicker/datepicker.html +1 -0
- package/src/lightning/datepicker/datepicker.js +10 -0
- package/src/lightning/datetimepicker/datetimepicker.html +2 -0
- package/src/lightning/datetimepicker/datetimepicker.js +8 -0
- package/src/lightning/dualListbox/dualListbox.js +2 -1
- 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/groupedCombobox/groupedCombobox.html +2 -1
- package/src/lightning/groupedCombobox/groupedCombobox.js +16 -2
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/dashboard_component.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/slack.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/tableau.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/standard/travel_mode.html +2 -2
- package/src/lightning/iconSvgTemplates/buildTemplates/templates.js +8 -1
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/data_model.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/serialized_product.html +1 -1
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/serialized_product_transaction.html +2 -1
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/slack.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/tableau.html +7 -0
- package/src/lightning/iconSvgTemplates/buildTemplates/utility/video_off.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/dashboard_component.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/slack.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/tableau.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/standard/travel_mode.html +2 -2
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/templates.js +8 -1
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/data_model.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/serialized_product.html +1 -1
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/serialized_product_transaction.html +2 -1
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/slack.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/tableau.html +7 -0
- package/src/lightning/iconSvgTemplatesRtl/buildTemplates/utility/video_off.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/dashboard_component.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/slack.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/tableau.html +7 -0
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/standard/travel_mode.html +2 -2
- package/src/lightning/iconSvgTemplatesStandard/buildTemplates/templates.js +4 -1
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/dashboard_component.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/slack.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/tableau.html +7 -0
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/standard/travel_mode.html +2 -2
- package/src/lightning/iconSvgTemplatesStandardRtl/buildTemplates/templates.js +4 -1
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/templates.js +5 -1
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/data_model.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/serialized_product.html +1 -1
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/serialized_product_transaction.html +2 -1
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/slack.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/tableau.html +7 -0
- package/src/lightning/iconSvgTemplatesUtility/buildTemplates/utility/video_off.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/templates.js +5 -1
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/data_model.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/serialized_product.html +1 -1
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/serialized_product_transaction.html +2 -1
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/slack.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/tableau.html +7 -0
- package/src/lightning/iconSvgTemplatesUtilityRtl/buildTemplates/utility/video_off.html +7 -0
- package/src/lightning/input/__docs__/input.md +2 -0
- 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 +2 -0
- package/src/lightning/inputAddress/inputAddress.js +26 -3
- package/src/lightning/inputName/__docs__/inputName.md +2 -0
- package/src/lightning/inputName/inputName.html +4 -1
- package/src/lightning/inputUtils/inputUtils.js +11 -0
- package/src/lightning/interactiveDialogBase/interactiveDialogBase.css +494 -0
- package/src/lightning/interactiveDialogBase/interactiveDialogBase.html +63 -0
- package/src/lightning/interactiveDialogBase/interactiveDialogBase.js +200 -0
- package/src/lightning/menuItem/menuItem.js +4 -1
- package/src/lightning/modalBase/modalBase.css +20 -0
- package/src/lightning/modalBase/modalBase.html +54 -0
- package/src/lightning/modalBase/modalBase.js +1039 -0
- package/src/lightning/overlay/__docs__/overlay.md +90 -0
- package/src/lightning/overlay/__examples__/alert/alert.html +27 -0
- package/src/lightning/overlay/__examples__/alert/alert.js +33 -0
- package/src/lightning/overlay/__examples__/basic/basic.css +7 -0
- package/src/lightning/overlay/__examples__/basic/basic.html +18 -0
- package/src/lightning/overlay/__examples__/basic/basic.js +61 -0
- package/src/lightning/overlay/__examples__/demo/demo.html +29 -0
- package/src/lightning/overlay/__examples__/demo/demo.js +40 -0
- package/src/lightning/overlay/__examples__/panel/panel.html +17 -0
- package/src/lightning/overlay/__examples__/panel/panel.js +21 -0
- package/src/lightning/overlay/overlay.html +3 -0
- package/src/lightning/overlay/overlay.js +45 -0
- package/src/lightning/overlayContainer/__docs__/overlayContainer.md +0 -0
- package/src/lightning/overlayContainer/overlayContainer.html +3 -0
- package/src/lightning/overlayContainer/overlayContainer.js +138 -0
- package/src/lightning/overlayManager/overlayManager.js +54 -0
- package/src/lightning/overlayUtils/overlayUtils.js +17 -0
- package/src/lightning/picklist/picklist.js +6 -1
- package/src/lightning/progressBar/progressBar.html +2 -1
- package/src/lightning/progressBar/progressBar.js +18 -1
- package/src/lightning/prompt/__docs__/prompt.md +100 -0
- package/src/lightning/prompt/__examples__disabled/basic/basic.css +7 -0
- package/src/lightning/prompt/__examples__disabled/basic/basic.html +8 -0
- package/src/lightning/prompt/__examples__disabled/basic/basic.js +15 -0
- package/src/lightning/prompt/prompt.css +81 -0
- package/src/lightning/prompt/prompt.html +8 -0
- package/src/lightning/prompt/prompt.js +92 -0
- package/src/lightning/prompt/prompt.js-meta.xml +6 -0
- package/src/lightning/radioGroup/radioGroup.js +9 -0
- package/src/lightning/select/select.html +3 -1
- package/src/lightning/select/select.js +5 -1
- package/src/lightning/textarea/textarea.html +1 -0
- package/src/lightning/textarea/textarea.js +5 -0
- package/src/lightning/timepicker/timepicker.html +3 -1
- package/src/lightning/timepicker/timepicker.js +8 -0
- 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/icon/__component__/icon-spirite.spec.js +0 -59
package/metadata/raptor.json
CHANGED
|
@@ -49,9 +49,6 @@
|
|
|
49
49
|
}
|
|
50
50
|
]
|
|
51
51
|
},
|
|
52
|
-
"analyticsDataServiceApi": {
|
|
53
|
-
"minVersion": "52.0"
|
|
54
|
-
},
|
|
55
52
|
"analyticsSmartDataDiscoveryApi": {},
|
|
56
53
|
"analyticsWaveApi": {
|
|
57
54
|
"minVersion": "52.0"
|
|
@@ -159,6 +156,9 @@
|
|
|
159
156
|
{
|
|
160
157
|
"name": "name"
|
|
161
158
|
},
|
|
159
|
+
{
|
|
160
|
+
"name": "stretch"
|
|
161
|
+
},
|
|
162
162
|
{
|
|
163
163
|
"name": "type"
|
|
164
164
|
},
|
|
@@ -490,6 +490,7 @@
|
|
|
490
490
|
"minVersion": "52.0"
|
|
491
491
|
},
|
|
492
492
|
"cmsInternalDeliveryApi": {},
|
|
493
|
+
"cmsOrchestratorApi": {},
|
|
493
494
|
"cmsTypeApi": {},
|
|
494
495
|
"combobox": {
|
|
495
496
|
"minVersion": "0.0",
|
|
@@ -563,6 +564,7 @@
|
|
|
563
564
|
]
|
|
564
565
|
},
|
|
565
566
|
"commerceApi": {},
|
|
567
|
+
"communityInfoApi": {},
|
|
566
568
|
"communityMicrobatchingApi": {},
|
|
567
569
|
"communityNavigationMenuApi": {},
|
|
568
570
|
"communityRecordSeoPropertiesApi": {},
|
|
@@ -859,6 +861,7 @@
|
|
|
859
861
|
}
|
|
860
862
|
]
|
|
861
863
|
},
|
|
864
|
+
"flowBuilderApi": {},
|
|
862
865
|
"flowRuntimeApi": {},
|
|
863
866
|
"flowSupport": {
|
|
864
867
|
"minVersion": "0.0"
|
|
@@ -894,6 +897,9 @@
|
|
|
894
897
|
{
|
|
895
898
|
"name": "latitude"
|
|
896
899
|
},
|
|
900
|
+
{
|
|
901
|
+
"name": "locale"
|
|
902
|
+
},
|
|
897
903
|
{
|
|
898
904
|
"name": "longitude"
|
|
899
905
|
},
|
|
@@ -1169,6 +1175,9 @@
|
|
|
1169
1175
|
"groupedCombobox": {
|
|
1170
1176
|
"slotNames": [],
|
|
1171
1177
|
"properties": [
|
|
1178
|
+
{
|
|
1179
|
+
"name": "disableDefaultHighlight"
|
|
1180
|
+
},
|
|
1172
1181
|
{
|
|
1173
1182
|
"name": "disabled"
|
|
1174
1183
|
},
|
|
@@ -1350,10 +1359,13 @@
|
|
|
1350
1359
|
"slotNames": []
|
|
1351
1360
|
},
|
|
1352
1361
|
"iconUtils": {},
|
|
1362
|
+
"industriesActionPlanApi": {},
|
|
1353
1363
|
"industriesCibApi": {},
|
|
1364
|
+
"industriesClmApi": {},
|
|
1354
1365
|
"industriesDecisionMatrixDesignerApi": {},
|
|
1355
1366
|
"industriesEinsteinAIAcceleratorApi": {},
|
|
1356
1367
|
"industriesExplainabilityApi": {},
|
|
1368
|
+
"industriesHealthcloudApi": {},
|
|
1357
1369
|
"industriesHealthcloudHpiApi": {},
|
|
1358
1370
|
"industriesIdentityVerificationApi": {},
|
|
1359
1371
|
"industriesInterestTaggingApi": {},
|
|
@@ -1361,6 +1373,7 @@
|
|
|
1361
1373
|
"industriesPublicSectorApi": {},
|
|
1362
1374
|
"industriesRcgTenantmanagementApi": {},
|
|
1363
1375
|
"industriesRuleBuilderApi": {},
|
|
1376
|
+
"industriesServiceExcellenceApi": {},
|
|
1364
1377
|
"industriesSustainabilityBeiApi": {},
|
|
1365
1378
|
"industriesSustainabilityDgfApi": {},
|
|
1366
1379
|
"industriesSustainabilityRecalculateApi": {},
|
|
@@ -1545,6 +1558,9 @@
|
|
|
1545
1558
|
{
|
|
1546
1559
|
"name": "addressLabel"
|
|
1547
1560
|
},
|
|
1561
|
+
{
|
|
1562
|
+
"name": "addressLookupLabel"
|
|
1563
|
+
},
|
|
1548
1564
|
{
|
|
1549
1565
|
"name": "addressLookupPlaceholder"
|
|
1550
1566
|
},
|
|
@@ -1578,6 +1594,9 @@
|
|
|
1578
1594
|
{
|
|
1579
1595
|
"name": "fieldLevelHelp"
|
|
1580
1596
|
},
|
|
1597
|
+
{
|
|
1598
|
+
"name": "locale"
|
|
1599
|
+
},
|
|
1581
1600
|
{
|
|
1582
1601
|
"name": "postalCode"
|
|
1583
1602
|
},
|
|
@@ -2455,6 +2474,9 @@
|
|
|
2455
2474
|
{
|
|
2456
2475
|
"name": "size"
|
|
2457
2476
|
},
|
|
2477
|
+
{
|
|
2478
|
+
"name": "suppressNoneOption"
|
|
2479
|
+
},
|
|
2458
2480
|
{
|
|
2459
2481
|
"name": "validity"
|
|
2460
2482
|
},
|
|
@@ -2549,6 +2571,7 @@
|
|
|
2549
2571
|
}
|
|
2550
2572
|
]
|
|
2551
2573
|
},
|
|
2574
|
+
"platformNamedCredentialApi": {},
|
|
2552
2575
|
"platformNotificationUtils": {},
|
|
2553
2576
|
"platformOverlayUtils": {},
|
|
2554
2577
|
"platformResourceLoader": {
|
|
@@ -2899,6 +2922,7 @@
|
|
|
2899
2922
|
}
|
|
2900
2923
|
]
|
|
2901
2924
|
},
|
|
2925
|
+
"refresh": {},
|
|
2902
2926
|
"relativeDateTime": {
|
|
2903
2927
|
"minVersion": "0.0",
|
|
2904
2928
|
"slotNames": [],
|
|
@@ -2976,6 +3000,7 @@
|
|
|
2976
3000
|
]
|
|
2977
3001
|
},
|
|
2978
3002
|
"routingService": {},
|
|
3003
|
+
"salesEnablementProgramApi": {},
|
|
2979
3004
|
"select": {
|
|
2980
3005
|
"slotNames": [],
|
|
2981
3006
|
"properties": [
|
|
@@ -3421,9 +3446,9 @@
|
|
|
3421
3446
|
"uiRelatedListApi": {
|
|
3422
3447
|
"minVersion": "53.0"
|
|
3423
3448
|
},
|
|
3424
|
-
"unstable_analyticsDataServiceApi": {},
|
|
3425
3449
|
"unstable_analyticsSmartDataDiscoveryApi": {},
|
|
3426
3450
|
"unstable_analyticsWaveApi": {},
|
|
3451
|
+
"unstable_analyticsWavePrivateApi": {},
|
|
3427
3452
|
"unstable_cmsAuthoringApi": {},
|
|
3428
3453
|
"unstable_cmsDeliveryApi": {},
|
|
3429
3454
|
"unstable_cmsTypeApi": {},
|
|
@@ -3447,6 +3472,7 @@
|
|
|
3447
3472
|
"unstable_uiActionsApi": {},
|
|
3448
3473
|
"unstable_uiAppsApi": {},
|
|
3449
3474
|
"unstable_uiDuplicatesApi": {},
|
|
3475
|
+
"unstable_uiGraphQLApi": {},
|
|
3450
3476
|
"unstable_uiLayoutApi": {},
|
|
3451
3477
|
"unstable_uiListApi": {},
|
|
3452
3478
|
"unstable_uiListsApi": {},
|
|
@@ -3456,6 +3482,7 @@
|
|
|
3456
3482
|
"unstable_uiRecordApi": {},
|
|
3457
3483
|
"unstable_uiRecordAvatarApi": {},
|
|
3458
3484
|
"unstable_uiRelatedListApi": {},
|
|
3485
|
+
"unstable_uiSearchApi": {},
|
|
3459
3486
|
"userConsentCookie": {
|
|
3460
3487
|
"minVersion": "53.0"
|
|
3461
3488
|
},
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lightning-base-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.2-alpha",
|
|
4
4
|
"engines": {
|
|
5
|
-
"node": ">=14.
|
|
5
|
+
"node": ">=14.18.2"
|
|
6
6
|
},
|
|
7
7
|
"files": [
|
|
8
8
|
"external",
|
|
@@ -309,6 +309,10 @@
|
|
|
309
309
|
"name": "@salesforce/label/LightningProgressBar.progress",
|
|
310
310
|
"path": "scopedImports/@salesforce-label-LightningProgressBar.progress.js"
|
|
311
311
|
},
|
|
312
|
+
{
|
|
313
|
+
"name": "@salesforce/label/LightningProgressBar.progressBar",
|
|
314
|
+
"path": "scopedImports/@salesforce-label-LightningProgressBar.progressBar.js"
|
|
315
|
+
},
|
|
312
316
|
{
|
|
313
317
|
"name": "@salesforce/label/LightningClickToDial.enabled",
|
|
314
318
|
"path": "scopedImports/@salesforce-label-LightningClickToDial.enabled.js"
|
|
@@ -877,6 +881,10 @@
|
|
|
877
881
|
"name": "@salesforce/label/LightningMap.titleWithAddress",
|
|
878
882
|
"path": "scopedImports/@salesforce-label-LightningMap.titleWithAddress.js"
|
|
879
883
|
},
|
|
884
|
+
{
|
|
885
|
+
"name": "@salesforce/label/LightningMap.defaultTitle",
|
|
886
|
+
"path": "scopedImports/@salesforce-label-LightningMap.defaultTitle.js"
|
|
887
|
+
},
|
|
880
888
|
{
|
|
881
889
|
"name": "@salesforce/label/LightningPrimitiveCoordinate.selected",
|
|
882
890
|
"path": "scopedImports/@salesforce-label-LightningPrimitiveCoordinate.selected.js"
|
|
@@ -1085,6 +1093,7 @@
|
|
|
1085
1093
|
"expose": [
|
|
1086
1094
|
"lightning/accordion",
|
|
1087
1095
|
"lightning/accordionSection",
|
|
1096
|
+
"lightning/alert",
|
|
1088
1097
|
"lightning/avatar",
|
|
1089
1098
|
"lightning/badge",
|
|
1090
1099
|
"lightning/baseFormattedText",
|
|
@@ -1102,6 +1111,7 @@
|
|
|
1102
1111
|
"lightning/checkboxGroup",
|
|
1103
1112
|
"lightning/combobox",
|
|
1104
1113
|
"lightning/configProvider",
|
|
1114
|
+
"lightning/confirm",
|
|
1105
1115
|
"lightning/context",
|
|
1106
1116
|
"lightning/datatable",
|
|
1107
1117
|
"lightning/datatableKeyboardMixins",
|
|
@@ -1158,6 +1168,7 @@
|
|
|
1158
1168
|
"lightning/progressIndicator",
|
|
1159
1169
|
"lightning/progressRing",
|
|
1160
1170
|
"lightning/progressStep",
|
|
1171
|
+
"lightning/prompt",
|
|
1161
1172
|
"lightning/purifyLib",
|
|
1162
1173
|
"lightning/radioGroup",
|
|
1163
1174
|
"lightning/relativeDateTime",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '
|
|
1
|
+
export default '238';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default 'Map of {0} Markers';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default 'Progress Bar';
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
The `lightning/alert` module lets you create an alert modal within your component. Use `LightningAlert` on your components to communicate a state that affects the entire system, not just a feature or page.
|
|
2
|
+
|
|
3
|
+
Use `LightningAlert.open()` instead of the native `window.alert()` for a more consistent user experience. They have similar functions, but `LightningAlert.open()` works in cross-origin iframes, where the `.alert()` method is no longer supported in Chrome and Safari. Unlike `window.alert()`, `LightningAlert.open()` doesn't halt execution on the page, it returns a Promise. Use `async`/`await` or `.then()` for any code you want to execute after the alert has closed.
|
|
4
|
+
|
|
5
|
+
Import `LightningAlert` from the `lightning/alert` module in the component that will launch the alert modal, and call `LightningAlert.open()` with your desired attributes.
|
|
6
|
+
|
|
7
|
+
This example creates an alert modal with an error message and **OK** button. The `.open()` function returns a promise that resolves when you click **OK**.
|
|
8
|
+
|
|
9
|
+
```html
|
|
10
|
+
<!-- c/myApp.html -->
|
|
11
|
+
<template>
|
|
12
|
+
<lightning-button onclick="{handleAlertClick}" label="Open Alert Modal">
|
|
13
|
+
</lightning-button>
|
|
14
|
+
</template>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
```javascript
|
|
18
|
+
import { LightningElement } from 'lwc';
|
|
19
|
+
import LightningAlert from 'lightning/alert';
|
|
20
|
+
|
|
21
|
+
export default class MyApp extends LightningElement {
|
|
22
|
+
async handleAlertClick() {
|
|
23
|
+
await LightningAlert.open({
|
|
24
|
+
message: 'this is the alert message',
|
|
25
|
+
theme: 'error', // a red theme intended for error states
|
|
26
|
+
label: 'Error!', // this is the header text
|
|
27
|
+
});
|
|
28
|
+
//Alert has been closed
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
#### Component Styling
|
|
34
|
+
|
|
35
|
+
This component uses the Salesforce Lightning Design System (SLDS) [`prompt` blueprint](https://www.lightningdesignsystem.com/components/prompt/#site-main-content).
|
|
36
|
+
|
|
37
|
+
`LightningAlert` supports the following attributes:
|
|
38
|
+
|
|
39
|
+
- `message`: Message text that displays in the alert.
|
|
40
|
+
- `label`: Header text, also used as the `aria-label`. Default string is `Alert`.
|
|
41
|
+
- `variant`: Two values, `header` and `headerless`. Default value is `header`.
|
|
42
|
+
- `theme`: Color theme for the header. The `theme` attribute supports the following [options](https://www.lightningdesignsystem.com/utilities/themes/#site-main-content) from SLDS:
|
|
43
|
+
- `default`: white
|
|
44
|
+
- `shade`: gray
|
|
45
|
+
- `inverse`: dark blue
|
|
46
|
+
- `alt-inverse`: darker blue
|
|
47
|
+
- `success`: green
|
|
48
|
+
- `info`: gray-ish blue
|
|
49
|
+
- `warning`: yellow
|
|
50
|
+
- `error`: red
|
|
51
|
+
- `offline`: black
|
|
52
|
+
|
|
53
|
+
If an invalid value is provided, `LightningAlert` uses the `default` theme.
|
|
54
|
+
|
|
55
|
+
#### Testing Your Component's Alert
|
|
56
|
+
|
|
57
|
+
Code using `LightningAlert` can be tested by mocking the `LightningAlert.open()` method.
|
|
58
|
+
|
|
59
|
+
The example below uses a button to open an alert dialog with text that changes when the alert opens.
|
|
60
|
+
|
|
61
|
+
```html
|
|
62
|
+
<button data-button onclick="{handleClick}">Open Alert</button>
|
|
63
|
+
<template if:true="{alertViewed}">
|
|
64
|
+
<div data-text>Content Viewed</div>
|
|
65
|
+
</template>
|
|
66
|
+
<template if:false="{alertViewed}">
|
|
67
|
+
<div data-text>Click to View Content</div>
|
|
68
|
+
</template>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
```javascript
|
|
72
|
+
import LightningAlert from 'lightning/alert';
|
|
73
|
+
jest.mock('lightning/alert');
|
|
74
|
+
|
|
75
|
+
test(() => {
|
|
76
|
+
// Create and appendChild(element)
|
|
77
|
+
|
|
78
|
+
const buttonEle = element.shadowRoot.querySelector('[data-button]');
|
|
79
|
+
const textEle = element.shadowRoot.querySelector('[data-text]');
|
|
80
|
+
|
|
81
|
+
// Mock .open()
|
|
82
|
+
// No value passed since LightningAlert doesn't have a return value
|
|
83
|
+
LightningAlert.open = jest.fn().mockResolvedValue();
|
|
84
|
+
// Initial value
|
|
85
|
+
expect(textEle.textContent).toBe('Click to View Content');
|
|
86
|
+
// Click modal open button
|
|
87
|
+
buttonEle.click();
|
|
88
|
+
|
|
89
|
+
// Click handler render cycle
|
|
90
|
+
await Promise.resolve();
|
|
91
|
+
// Render cycle triggered by tracked value {result}
|
|
92
|
+
await Promise.resolve();
|
|
93
|
+
|
|
94
|
+
// Verify alertViewed has updated in template
|
|
95
|
+
expect(textEle.textContent).toBe('Content Viewed');
|
|
96
|
+
// Open triggered once
|
|
97
|
+
expect(LightningAlert.open.mock.calls).toHaveLength(1);
|
|
98
|
+
})
|
|
99
|
+
```
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LightningElement } from 'lwc';
|
|
2
|
+
import LightningAlert from 'lightning/alert';
|
|
3
|
+
|
|
4
|
+
export default class AlertBasic extends LightningElement {
|
|
5
|
+
handleAlertModal() {
|
|
6
|
+
LightningAlert.open({
|
|
7
|
+
message: 'this is the alert message',
|
|
8
|
+
//label defaults to "Alert"
|
|
9
|
+
variant: 'headerless',
|
|
10
|
+
}).then((result) => {
|
|
11
|
+
console.log('alert result', result);
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { api } from 'lwc';
|
|
2
|
+
import LightningInteractiveDialogBase from 'lightning/interactiveDialogBase';
|
|
3
|
+
import LightningOverlay from 'lightning/overlay';
|
|
4
|
+
import { parent, instanceName, secure } from 'lightning/overlayUtils';
|
|
5
|
+
import labelDefault from '@salesforce/label/LightningAlert.defaultLabel';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Create an alert modal within your component that communicates
|
|
9
|
+
* a state that affects the entire system, not just a feature or page.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
export default class LightningAlert extends LightningOverlay {
|
|
13
|
+
static [instanceName] = 'lightning-alert';
|
|
14
|
+
static [parent] = LightningInteractiveDialogBase;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* value to use for header text in "header" variant
|
|
18
|
+
* or aria-label in "headerless" variant
|
|
19
|
+
* @type {string}
|
|
20
|
+
* @default "Alert" (translated accordingly)
|
|
21
|
+
*/
|
|
22
|
+
@api label = labelDefault;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* text to display in body of modal
|
|
26
|
+
*/
|
|
27
|
+
@api message = '';
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* variant to use for alert; may be
|
|
31
|
+
* set to "header" or "headerless"
|
|
32
|
+
*/
|
|
33
|
+
@api variant = 'header';
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* theme to use when variant is "header"
|
|
37
|
+
* valid values are based on SLDS themes and are
|
|
38
|
+
* listed in "themeOptions" of interactiveDialogBase.js
|
|
39
|
+
*/
|
|
40
|
+
@api theme = 'default';
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Dispatches privateclose event
|
|
44
|
+
* and closes dialog
|
|
45
|
+
*/
|
|
46
|
+
close(result) {
|
|
47
|
+
const promise = new Promise((resolve) => {
|
|
48
|
+
this.dispatchEvent(
|
|
49
|
+
new CustomEvent('privateclose', {
|
|
50
|
+
detail: {
|
|
51
|
+
resolve,
|
|
52
|
+
[secure]: true,
|
|
53
|
+
},
|
|
54
|
+
bubbles: true,
|
|
55
|
+
})
|
|
56
|
+
);
|
|
57
|
+
});
|
|
58
|
+
super.close(result, promise);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Dispatches privatechildrender event
|
|
63
|
+
* with data parent needs to correctly render
|
|
64
|
+
*/
|
|
65
|
+
renderedCallback() {
|
|
66
|
+
const evt = new CustomEvent('privatechildrender', {
|
|
67
|
+
bubbles: true,
|
|
68
|
+
detail: {
|
|
69
|
+
message: this.message,
|
|
70
|
+
label: this.label,
|
|
71
|
+
hideCancel: true,
|
|
72
|
+
showDescription: true,
|
|
73
|
+
role: 'alertdialog',
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
this.dispatchEvent(evt);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
aria-expanded={computedAriaExpanded}
|
|
45
45
|
aria-haspopup="listbox"
|
|
46
46
|
name={name}
|
|
47
|
+
role="combobox"
|
|
47
48
|
data-value={computedInputValue}
|
|
48
49
|
disabled={disabled}
|
|
49
50
|
aria-label={computedButtonTriggerAriaLabel}
|
|
@@ -60,7 +61,7 @@
|
|
|
60
61
|
</span>
|
|
61
62
|
</button>
|
|
62
63
|
</template>
|
|
63
|
-
<template if:true={
|
|
64
|
+
<template if:true={isCloseVisible}>
|
|
64
65
|
<div class="slds-input__icon-group slds-input__icon-group_right">
|
|
65
66
|
<button onclick={handlePillRemove} type="button"
|
|
66
67
|
class="slds-button slds-button_icon slds-input__icon slds-input__icon_right"
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
normalizeBoolean,
|
|
14
14
|
normalizeString,
|
|
15
15
|
synchronizeAttrs,
|
|
16
|
+
computeAriaInvalid,
|
|
16
17
|
} from 'lightning/utilsPrivate';
|
|
17
18
|
// remove-next-line-for-c-namespace
|
|
18
19
|
import { AutoPosition, Direction } from 'lightning/positionLibrary';
|
|
@@ -39,6 +40,7 @@ const ARIA_LABELLEDBY = 'aria-labelledby';
|
|
|
39
40
|
const ARIA_DESCRIBEDBY = 'aria-describedby';
|
|
40
41
|
const ARIA_LABEL = 'aria-label';
|
|
41
42
|
const ARIA_ACTIVEDESCENDANT = 'aria-activedescendant';
|
|
43
|
+
const ARIA_INVALID = 'aria-invalid';
|
|
42
44
|
|
|
43
45
|
export default class LightningBaseCombobox extends LightningElement {
|
|
44
46
|
static delegatesFocus = true;
|
|
@@ -89,6 +91,8 @@ export default class LightningBaseCombobox extends LightningElement {
|
|
|
89
91
|
_inputAriaControls;
|
|
90
92
|
_activeElementDomId;
|
|
91
93
|
_autocomplete = 'off';
|
|
94
|
+
originDisableDefaultHighlight;
|
|
95
|
+
privateDisableDefaultHighlight;
|
|
92
96
|
|
|
93
97
|
constructor() {
|
|
94
98
|
super();
|
|
@@ -276,6 +280,21 @@ export default class LightningBaseCombobox extends LightningElement {
|
|
|
276
280
|
}
|
|
277
281
|
}
|
|
278
282
|
|
|
283
|
+
/**
|
|
284
|
+
* Whether disable the highlighting default item behavior
|
|
285
|
+
*
|
|
286
|
+
* @type {boolean}
|
|
287
|
+
* @memberof LightningBaseCombobox
|
|
288
|
+
*/
|
|
289
|
+
@api
|
|
290
|
+
get disableDefaultHighlight() {
|
|
291
|
+
return this.originDisableDefaultHighlight;
|
|
292
|
+
}
|
|
293
|
+
set disableDefaultHighlight(value) {
|
|
294
|
+
this.originDisableDefaultHighlight = value;
|
|
295
|
+
this.privateDisableDefaultHighlight = normalizeBoolean(value);
|
|
296
|
+
}
|
|
297
|
+
|
|
279
298
|
@api
|
|
280
299
|
highlightInputText() {
|
|
281
300
|
if (this._connected) {
|
|
@@ -331,6 +350,7 @@ export default class LightningBaseCombobox extends LightningElement {
|
|
|
331
350
|
[ARIA_LABEL]: this.isUserInputDisabled
|
|
332
351
|
? this.computedButtonTriggerAriaLabel
|
|
333
352
|
: this.inputLabel,
|
|
353
|
+
[ARIA_INVALID]: this.computedAriaInvalid,
|
|
334
354
|
});
|
|
335
355
|
}
|
|
336
356
|
|
|
@@ -880,6 +900,13 @@ export default class LightningBaseCombobox extends LightningElement {
|
|
|
880
900
|
return this.inputPill && Object.keys(this.inputPill).length > 0;
|
|
881
901
|
}
|
|
882
902
|
|
|
903
|
+
get isCloseVisible() {
|
|
904
|
+
if (this.disabled) {
|
|
905
|
+
return false;
|
|
906
|
+
}
|
|
907
|
+
return this.hasInputPill;
|
|
908
|
+
}
|
|
909
|
+
|
|
883
910
|
handlePillRemove() {
|
|
884
911
|
this.inputElement.focus();
|
|
885
912
|
this._events.dispatchPillRemove(this.inputPill);
|
|
@@ -924,12 +951,14 @@ export default class LightningBaseCombobox extends LightningElement {
|
|
|
924
951
|
|
|
925
952
|
highlightDefaultItem() {
|
|
926
953
|
this.removeHighlight();
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
this.
|
|
931
|
-
|
|
932
|
-
|
|
954
|
+
if (!this.privateDisableDefaultHighlight) {
|
|
955
|
+
// eslint-disable-next-line @lwc/lwc/no-async-operation
|
|
956
|
+
requestAnimationFrame(() => {
|
|
957
|
+
this.highlightOptionAndScrollIntoView(
|
|
958
|
+
this.findOptionElementByIndex(this._highlightedItemIndex)
|
|
959
|
+
);
|
|
960
|
+
});
|
|
961
|
+
}
|
|
933
962
|
}
|
|
934
963
|
|
|
935
964
|
get isDropdownEmpty() {
|
|
@@ -1012,6 +1041,12 @@ export default class LightningBaseCombobox extends LightningElement {
|
|
|
1012
1041
|
},
|
|
1013
1042
|
};
|
|
1014
1043
|
}
|
|
1044
|
+
|
|
1045
|
+
get computedAriaInvalid() {
|
|
1046
|
+
const ariaInvalid =
|
|
1047
|
+
this.template.host.getAttribute('data-aria-invalid');
|
|
1048
|
+
return computeAriaInvalid(ariaInvalid, true);
|
|
1049
|
+
}
|
|
1015
1050
|
}
|
|
1016
1051
|
|
|
1017
1052
|
function scrollIntoViewIfNeeded(element, scrollingParent) {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const Button = require('pageobjects/button');
|
|
2
|
+
|
|
3
|
+
describe('button utam test', () => {
|
|
4
|
+
let root;
|
|
5
|
+
|
|
6
|
+
beforeEach(async () => {
|
|
7
|
+
await browser.url('/button/utam');
|
|
8
|
+
root = await $('button-utam');
|
|
9
|
+
await root.waitForDisplayed();
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it('should get the button name', async () => {
|
|
13
|
+
const button = await utam.load(Button, {
|
|
14
|
+
element: await root.shadow$('lightning-button'),
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const label = await button.getButtonName();
|
|
18
|
+
expect(label).toBe('Click me');
|
|
19
|
+
});
|
|
20
|
+
});
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { api, track } from 'lwc';
|
|
2
2
|
import { classSet } from 'lightning/utils';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
normalizeString as normalize,
|
|
5
|
+
normalizeBoolean,
|
|
6
|
+
} from 'lightning/utilsPrivate';
|
|
4
7
|
import LightningPrimitiveButton from 'lightning/primitiveButton';
|
|
5
8
|
import template from './button.html';
|
|
6
9
|
|
|
@@ -9,6 +12,7 @@ import template from './button.html';
|
|
|
9
12
|
*/
|
|
10
13
|
export default class LightningButton extends LightningPrimitiveButton {
|
|
11
14
|
static delegatesFocus = true;
|
|
15
|
+
_stretch = false;
|
|
12
16
|
|
|
13
17
|
/**
|
|
14
18
|
* The name for the button element.
|
|
@@ -62,6 +66,22 @@ export default class LightningButton extends LightningPrimitiveButton {
|
|
|
62
66
|
*/
|
|
63
67
|
@api iconPosition = 'left';
|
|
64
68
|
|
|
69
|
+
/**
|
|
70
|
+
* Setting it to true allows the button to take up the entire available width.
|
|
71
|
+
* This value defaults to false.
|
|
72
|
+
*
|
|
73
|
+
* @type {boolean}
|
|
74
|
+
* @default false
|
|
75
|
+
*/
|
|
76
|
+
@api
|
|
77
|
+
get stretch() {
|
|
78
|
+
return this._stretch;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
set stretch(value) {
|
|
82
|
+
this._stretch = normalizeBoolean(value);
|
|
83
|
+
}
|
|
84
|
+
|
|
65
85
|
/**
|
|
66
86
|
* Specifies the type of button.
|
|
67
87
|
* Valid values are button, reset, and submit.
|
|
@@ -97,6 +117,7 @@ export default class LightningButton extends LightningPrimitiveButton {
|
|
|
97
117
|
this.normalizedVariant === 'destructive-text',
|
|
98
118
|
'slds-button_inverse': this.normalizedVariant === 'inverse',
|
|
99
119
|
'slds-button_success': this.normalizedVariant === 'success',
|
|
120
|
+
'slds-button_stretch': this.stretch,
|
|
100
121
|
})
|
|
101
122
|
.toString();
|
|
102
123
|
}
|
|
@@ -778,6 +778,18 @@ export default class LightningButtonMenu extends LightningElement {
|
|
|
778
778
|
}
|
|
779
779
|
|
|
780
780
|
handlePrivateBlur(event) {
|
|
781
|
+
// During navigation of menuitems, after the blur event, focus is set on a new menuitem and hence it should not trigger a blur on the menu itself which causes the menu to close.
|
|
782
|
+
// If navigation is by mouse, this is taken care of by the "handleMouseOverOnMenuItem" function which "cancels" the blur on the menu.
|
|
783
|
+
// If navigation is by touch in mobile, no equivalent handler is available for blur event hence we are using
|
|
784
|
+
// the detail.relatedTarget to know that the blur is from a menuitem and it should not cause blur on the menu itself.
|
|
785
|
+
if (event.detail.relatedTarget) {
|
|
786
|
+
const menuItem = this.findMenuItemFromEventTarget(
|
|
787
|
+
event.detail.relatedTarget
|
|
788
|
+
);
|
|
789
|
+
if (menuItem) {
|
|
790
|
+
this.cancelBlur();
|
|
791
|
+
}
|
|
792
|
+
}
|
|
781
793
|
// The event may be synthetic from the menu items
|
|
782
794
|
event.stopPropagation();
|
|
783
795
|
|