lightning-base-components 1.19.1-alpha → 1.19.3-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/metadata/raptor.json +488 -0
  2. package/package.json +1 -1
  3. package/src/lightning/alert/__docs__/alert.md +1 -1
  4. package/src/lightning/baseCombobox/baseCombobox.js +8 -1
  5. package/src/lightning/combobox/combobox.css +2 -0
  6. package/src/lightning/combobox/combobox.html +1 -1
  7. package/src/lightning/combobox/combobox.js +0 -2
  8. package/src/lightning/confirm/__docs__/confirm.md +1 -1
  9. package/src/lightning/datepicker/datepicker.html +2 -2
  10. package/src/lightning/datepicker/datepicker.js +29 -25
  11. package/src/lightning/datetimepicker/datetimepicker.html +1 -1
  12. package/src/lightning/f6Controller/f6Controller.js +9 -9
  13. package/src/lightning/formattedAddress/formattedAddress.js +0 -4
  14. package/src/lightning/input/__docs__/input.md +11 -0
  15. package/src/lightning/input/__examples__/file/file.html +1 -1
  16. package/src/lightning/input/input.css +2 -0
  17. package/src/lightning/input/input.html +2 -1
  18. package/src/lightning/input/input.js +38 -1
  19. package/src/lightning/menuSubheader/menuSubheader.js +1 -1
  20. package/src/lightning/modal/__docs__/modal.md +10 -0
  21. package/src/lightning/overlayContainer/overlayContainer.js +5 -6
  22. package/src/lightning/overlayUtils/overlayUtils.js +59 -0
  23. package/src/lightning/primitiveInputCheckbox/primitiveInputCheckbox.html +1 -1
  24. package/src/lightning/primitiveInputCheckbox/primitiveInputCheckbox.js +2 -4
  25. package/src/lightning/primitiveInputCheckboxButton/primitiveInputCheckboxButton.html +1 -1
  26. package/src/lightning/primitiveInputCheckboxButton/primitiveInputCheckboxButton.js +2 -4
  27. package/src/lightning/primitiveInputColor/primitiveInputColor.html +1 -1
  28. package/src/lightning/primitiveInputColor/primitiveInputColor.js +2 -4
  29. package/src/lightning/primitiveInputFile/primitiveInputFile.html +1 -1
  30. package/src/lightning/primitiveInputFile/primitiveInputFile.js +2 -4
  31. package/src/lightning/primitiveInputRadio/primitiveInputRadio.html +1 -1
  32. package/src/lightning/primitiveInputSimple/primitiveInputSimple.html +2 -2
  33. package/src/lightning/primitiveInputSimple/primitiveInputSimple.js +3 -8
  34. package/src/lightning/primitiveInputToggle/primitiveInputToggle.html +1 -1
  35. package/src/lightning/primitiveInputToggle/primitiveInputToggle.js +2 -4
  36. package/src/lightning/progressBar/progressBar.html +4 -3
  37. package/src/lightning/prompt/__docs__/prompt.md +1 -1
  38. package/src/lightning/sldsGenAiUtils/sldsGenAiUtils.css +4 -0
  39. package/src/lightning/tab/tab.js +2 -4
  40. package/src/lightning/textarea/textarea.css +2 -0
  41. package/src/lightning/textarea/textarea.html +1 -1
  42. package/src/lightning/textarea/textarea.js +1 -4
  43. package/src/lightning/timepicker/timepicker.html +1 -1
  44. package/src/lightning/toast/__docs__/toast.md +18 -20
  45. package/src/lightning/toast/toast.js-meta.xml +1 -1
  46. package/src/lightning/toastContainer/toastContainer.js-meta.xml +1 -1
  47. package/src/lightning/utilsPrivate/videoUtils.js +12 -1
@@ -1,16 +1,14 @@
1
- The `LightningToast` component displays a toast notification with an icon, label, message, and links. Use a toast to convey small pieces of information to the user in a non-obtrusive way.
2
-
3
- This component is for internal use only.
1
+ The `LightningToast` component displays a toast notification with an icon, label, message, and links. Use a toast to convey small pieces of information to the user, providing feedback and confirmation after the user takes an action. Toasts can disappear after a certain duration or until the user clicks the close button.
4
2
 
5
3
  ### Show a Toast
6
4
 
7
- To show a toast, simply calls the `Toast`'s static function `show(config, comp)` with the proper toast config and a reference of the local component as parameters.
5
+ To show a toast, call the static function `show(config, comp)` from `lightning/toast` and provide a toast configuration and a reference of the local component as parameters.
8
6
  The function also creates a single page-level toast container if one does not exist.
9
7
 
10
8
  ```javascript
11
9
  // c/myComponent.js
12
10
  import { LightningElement } from 'lwc';
13
- import Toast from 'lightning/toast';
11
+ import Toast from 'lightning/toast';
14
12
 
15
13
  export default class MyComponent extends LightningElement {
16
14
  ...
@@ -42,28 +40,28 @@ export default class MyComponent extends LightningElement {
42
40
  }
43
41
  }
44
42
  ```
45
- Above shows a complete example a toast config, illustrating the two possible styles for specifying links (see note below). The container will display a sticky mode informational toast message with string stored in `label` as the toast title and string stored `message` as the toast message. The `{0}`, `{1}`, and the `{salesforceLink}`, `{slackLink} `will be replaced with their specified link.
43
+ In this example, the toast configuration uses two ways to specify links (see note below). The toast displays a sticky mode informational toast message with a `label` string as the toast title and a `message` string as the toast message. The `{0}`, `{1}`, `{salesforceLink}`, and `{slackLink}` placeholders are replaced with their `url` specified links.
46
44
 
47
- The toast component will display and be managed in a page level `LightningToastContainer` component.
45
+ A page-level [`LightningToastContainer` component](/docs/component-library/bundle/lightning-toast-container/documentation) manages and displays the toast component.
48
46
 
49
47
  **_NOTE:_** `label` can have index-based or name-based link placeholders. In the case of index-based link placeholders, `labelLinks` must be defined as an array, otherwise, `labelLinks` must be defined as a map. Same applies to `message`.
50
48
 
51
49
  ### Component Styling
52
50
 
53
- `LightningToast` implements the [toast](https://www.lightningdesignsystem.com/components/toast/) blueprint in the Salesforce Lightning Design System (SLDS).
51
+ `LightningToast` implements the [toast](https://www.lightningdesignsystem.com/components/toast/) blueprint in the Salesforce Lightning Design System (SLDS). [SLDS styling hooks](https://www.lightningdesignsystem.com/components/toast/#Styling-Hooks-Overview) aren't supported with programmatic creation of toasts via `Toast.show()`.
54
52
 
55
53
  ### `config` attributes
56
54
 
57
- Attribute | Explanation |
55
+ Attribute | Description |
58
56
  |----------| ------------ |
59
- | `label` (required) | title of the toast, it can contain placeholders in the form of `{0} ... {N}` (index-based) or `{name} ... {someOtherName}` (name-based). The placeholders are replaced with the links on `labelLinks`. |
60
- | `labelLinks` | [{url, label}], which will replace the `{0} ... {N}` indexed placeholders in `label` or `{ name: {url, label} }`, which will replace the `{name} ... {someOtherName}` named placeholders in `label`. |
61
- | `message` | description of the toast, it can contain placeholders in the form of `{0} ... {N}` (index-based) or `{name} ... {someOtherName}` (name-based). The placeholders are replaced with the links on `messageLinks`. |
62
- | `messageLinks` | [{url, label}], which will replace the `{0} ... {N}` indexed placeholders in `message` or `{ name: {url, label} }`, which will replace the `{name} ... {someOtherName}` named placeholders in `message`. |
63
- | `variant` | appearance of the toast notice. |
64
- | `mode` | persistence of the toast. |
57
+ | `label` (required) | Title of the toast, it can contain placeholders in the form of `{0} ... {N}` (index-based) or `{name} ... {someOtherName}` (name-based). The placeholders are replaced with the links on `labelLinks`. |
58
+ | `labelLinks` | [{url, label}], which replaces the `{0} ... {N}` indexed placeholders in `label` or `{ name: {url, label} }`, which replaces the `{name} ... {someOtherName}` named placeholders in `label`. |
59
+ | `message` | Description of the toast, it can contain placeholders in the form of `{0} ... {N}` (index-based) or `{name} ... {someOtherName}` (name-based). The placeholders are replaced with the links on `messageLinks`. |
60
+ | `messageLinks` | [{url, label}], which replaces the `{0} ... {N}` indexed placeholders in `message` or `{ name: {url, label} }`, which replaces the `{name} ... {someOtherName}` named placeholders in `message`. |
61
+ | `variant` | Appearance of the toast. |
62
+ | `mode` | Persistence of the toast. |
65
63
 
66
- **_NOTE:_** When `labelLinks` (or `messageLinks`) is provided in the config, the content of `label` (or `message`) will be rendered using [`lightning-formatted-rich-text`](https://developer.salesforce.com/docs/component-library/bundle/lightning-formatted-rich-text/documentation); consult the documentation for expected result when link presents.
64
+ **_NOTE:_** When `labelLinks` (or `messageLinks`) is passed to the `config` parameter, the content of `label` (or `message`) is rendered using [`lightning-formatted-rich-text`](https://developer.salesforce.com/docs/component-library/bundle/lightning-formatted-rich-text/documentation). consult the documentation for expected result when link presents.
67
65
 
68
66
  #### `variant` attribute
69
67
 
@@ -82,8 +80,8 @@ The `mode` attribute sets the component's dismissal. It supports these values.
82
80
  - `dismissible` - The component automatically disappears after a certain duration. The user can dismiss it early by clicking the close button. The time duration for `dismissible` is 4.8 seconds, or 9.6 seconds if the toast contains a link.
83
81
  - `sticky` - The component stays on screen until the user clicks the close button.
84
82
 
85
- ##### Default Mode, When Mode Not Set
86
- If no `mode` is provided, the default `mode` will be determined by the value of `variant` and whether the `toast` has a link or links present in `label` or `message`.
83
+ ##### Default Mode
84
+ If a `mode` value isn't provided, the default `mode` is determined by the value of `variant` and whether the `toast` has a link or links present in `label` or `message`.
87
85
 
88
86
  | Variant | Has link? | Default Mode |
89
87
  | --- | --- | --- |
@@ -98,6 +96,6 @@ If no `mode` is provided, the default `mode` will be determined by the value of
98
96
 
99
97
  #### Small screen / Mobile environment
100
98
 
101
- `LightningToast` is implemented to be responsive according to the screen resolution. For smaller screen or mobile environments, the toast's **icon** and **description** (i.e. text stored in `message`, and `messageLinks`) will **not be shown** due to the screen's width limitation (see [Toast blueprint screen variants](https://www.lightningdesignsystem.com/guidelines/messaging/components/toasts/#flavor-variants-screen).
99
+ `LightningToast` is responsive to your screen resolution. For smaller screens or mobile environments, the toast's **icon** and **description** (i.e. text stored in `message`, and `messageLinks`) is **not shown** due to the screen's width limitation (see [Toast blueprint screen variants](https://www.lightningdesignsystem.com/guidelines/messaging/components/toasts/#flavor-variants-screen).
102
100
 
103
- The best practice where small screen and mobile environments are the primary use case is to only provide links in the toast's title (ie `label` and `labelLinks`) in order to have links visible and interactive.
101
+ On small screens and mobile environments, we recommend that you provide links in the toast's title (ie `label` and `labelLinks`) in order to have links visible and interactive.
@@ -2,5 +2,5 @@
2
2
  <LightningComponentBundle xmlns="xmlns=http://soap.sforce.com/2006/04/metadata">
3
3
  <isExposed>true</isExposed>
4
4
  <minApiVersion>59.0</minApiVersion>
5
- <support>BETA</support>
5
+ <support>GA</support>
6
6
  </LightningComponentBundle>
@@ -2,5 +2,5 @@
2
2
  <LightningComponentBundle xmlns="xmlns=http://soap.sforce.com/2006/04/metadata">
3
3
  <isExposed>true</isExposed>
4
4
  <minApiVersion>58.0</minApiVersion>
5
- <support>BETA</support>
5
+ <support>GA</support>
6
6
  </LightningComponentBundle>
@@ -20,6 +20,7 @@ const ALLOWED_DOMAINS = new Set([
20
20
  's1.adis.ws',
21
21
  'scormanywhere.secure.force.com',
22
22
  'appiniummastertrial.secure.force.com',
23
+ 'embed.app.guidde.com',
23
24
  ]);
24
25
 
25
26
  export function hasOnlyAllowedVideoIframes(htmlString) {
@@ -44,5 +45,15 @@ function isUrlAllowed(url) {
44
45
  const anchor = document.createElement('a');
45
46
  anchor.href = url;
46
47
 
47
- return anchor.protocol === 'https:' && ALLOWED_DOMAINS.has(anchor.hostname);
48
+ if (anchor.protocol !== 'https:') {
49
+ return false;
50
+ }
51
+
52
+ if (anchor.hostname === 'vimeo.com') {
53
+ const path = anchor.pathname;
54
+ const regex = /^\/showcase\/\d+\/embed$/;
55
+ return path.match(regex) !== null;
56
+ }
57
+
58
+ return ALLOWED_DOMAINS.has(anchor.hostname);
48
59
  }