@ui5/webcomponents-fiori 2.25.0-rc.0 → 2.25.0

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 (216) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/IllustratedMessage.d.ts +12 -12
  4. package/dist/IllustratedMessage.js +65 -52
  5. package/dist/IllustratedMessage.js.map +1 -1
  6. package/dist/MediaGalleryTemplate.js +1 -1
  7. package/dist/MediaGalleryTemplate.js.map +1 -1
  8. package/dist/ShellBar.js +7 -1
  9. package/dist/ShellBar.js.map +1 -1
  10. package/dist/ShellBarSearch.d.ts +1 -0
  11. package/dist/ShellBarSearch.js +6 -0
  12. package/dist/ShellBarSearch.js.map +1 -1
  13. package/dist/SideNavigation.d.ts +6 -1
  14. package/dist/SideNavigation.js +63 -0
  15. package/dist/SideNavigation.js.map +1 -1
  16. package/dist/SideNavigationItemBase.d.ts +1 -0
  17. package/dist/SideNavigationItemBase.js +4 -0
  18. package/dist/SideNavigationItemBase.js.map +1 -1
  19. package/dist/UserSettingsAccountView.js +2 -2
  20. package/dist/UserSettingsAccountView.js.map +1 -1
  21. package/dist/UserSettingsAppearanceViewItemTemplate.js +1 -1
  22. package/dist/UserSettingsAppearanceViewItemTemplate.js.map +1 -1
  23. package/dist/UserSettingsAppearanceViewTemplate.js +2 -2
  24. package/dist/UserSettingsAppearanceViewTemplate.js.map +1 -1
  25. package/dist/UserSettingsDialog.d.ts +18 -0
  26. package/dist/UserSettingsDialog.js +49 -3
  27. package/dist/UserSettingsDialog.js.map +1 -1
  28. package/dist/UserSettingsDialogTemplate.js +3 -3
  29. package/dist/UserSettingsDialogTemplate.js.map +1 -1
  30. package/dist/UserSettingsItemTemplate.js +1 -1
  31. package/dist/UserSettingsItemTemplate.js.map +1 -1
  32. package/dist/css/themes/IllustratedMessage.css +1 -1
  33. package/dist/css/themes/SideNavigation.css +1 -1
  34. package/dist/css/themes/SideNavigationGroup.css +1 -1
  35. package/dist/css/themes/SideNavigationItem.css +1 -1
  36. package/dist/css/themes/SideNavigationItemBase.css +1 -1
  37. package/dist/css/themes/SideNavigationSubItem.css +1 -1
  38. package/dist/css/themes/UserSettingsAccountView.css +1 -1
  39. package/dist/css/themes/UserSettingsAppearanceViewItem.css +1 -1
  40. package/dist/css/themes/UserSettingsDialog.css +1 -1
  41. package/dist/css/themes/UserSettingsItem.css +1 -1
  42. package/dist/css/themes/UserSettingsView.css +1 -1
  43. package/dist/css/themes/sap_horizon/parameters-bundle.css +1 -1
  44. package/dist/css/themes/sap_horizon_auto/parameters-bundle.css +2 -2
  45. package/dist/css/themes/sap_horizon_exp/parameters-bundle.css +2 -2
  46. package/dist/custom-elements-internal.json +44 -3
  47. package/dist/custom-elements.json +36 -3
  48. package/dist/generated/assets/i18n/messagebundle_ar.json +1 -1
  49. package/dist/generated/assets/i18n/messagebundle_bg.json +1 -1
  50. package/dist/generated/assets/i18n/messagebundle_ca.json +1 -1
  51. package/dist/generated/assets/i18n/messagebundle_cnr.json +1 -1
  52. package/dist/generated/assets/i18n/messagebundle_cs.json +1 -1
  53. package/dist/generated/assets/i18n/messagebundle_cy.json +1 -1
  54. package/dist/generated/assets/i18n/messagebundle_da.json +1 -1
  55. package/dist/generated/assets/i18n/messagebundle_el.json +1 -1
  56. package/dist/generated/assets/i18n/messagebundle_en.json +1 -1
  57. package/dist/generated/assets/i18n/messagebundle_en_GB.json +1 -1
  58. package/dist/generated/assets/i18n/messagebundle_en_US_sappsd.json +1 -1
  59. package/dist/generated/assets/i18n/messagebundle_en_US_saprigi.json +1 -1
  60. package/dist/generated/assets/i18n/messagebundle_en_US_saptrc.json +1 -1
  61. package/dist/generated/assets/i18n/messagebundle_es.json +1 -1
  62. package/dist/generated/assets/i18n/messagebundle_es_MX.json +1 -1
  63. package/dist/generated/assets/i18n/messagebundle_et.json +1 -1
  64. package/dist/generated/assets/i18n/messagebundle_fi.json +1 -1
  65. package/dist/generated/assets/i18n/messagebundle_fr.json +1 -1
  66. package/dist/generated/assets/i18n/messagebundle_fr_CA.json +1 -1
  67. package/dist/generated/assets/i18n/messagebundle_hi.json +1 -1
  68. package/dist/generated/assets/i18n/messagebundle_hr.json +1 -1
  69. package/dist/generated/assets/i18n/messagebundle_hu.json +1 -1
  70. package/dist/generated/assets/i18n/messagebundle_id.json +1 -1
  71. package/dist/generated/assets/i18n/messagebundle_it.json +1 -1
  72. package/dist/generated/assets/i18n/messagebundle_iw.json +1 -1
  73. package/dist/generated/assets/i18n/messagebundle_ja.json +1 -1
  74. package/dist/generated/assets/i18n/messagebundle_kk.json +1 -1
  75. package/dist/generated/assets/i18n/messagebundle_ko.json +1 -1
  76. package/dist/generated/assets/i18n/messagebundle_lt.json +1 -1
  77. package/dist/generated/assets/i18n/messagebundle_lv.json +1 -1
  78. package/dist/generated/assets/i18n/messagebundle_mk.json +1 -1
  79. package/dist/generated/assets/i18n/messagebundle_ms.json +1 -1
  80. package/dist/generated/assets/i18n/messagebundle_nl.json +1 -1
  81. package/dist/generated/assets/i18n/messagebundle_no.json +1 -1
  82. package/dist/generated/assets/i18n/messagebundle_pl.json +1 -1
  83. package/dist/generated/assets/i18n/messagebundle_pt.json +1 -1
  84. package/dist/generated/assets/i18n/messagebundle_pt_PT.json +1 -1
  85. package/dist/generated/assets/i18n/messagebundle_ro.json +1 -1
  86. package/dist/generated/assets/i18n/messagebundle_ru.json +1 -1
  87. package/dist/generated/assets/i18n/messagebundle_sh.json +1 -1
  88. package/dist/generated/assets/i18n/messagebundle_sk.json +1 -1
  89. package/dist/generated/assets/i18n/messagebundle_sl.json +1 -1
  90. package/dist/generated/assets/i18n/messagebundle_sr.json +1 -1
  91. package/dist/generated/assets/i18n/messagebundle_sv.json +1 -1
  92. package/dist/generated/assets/i18n/messagebundle_th.json +1 -1
  93. package/dist/generated/assets/i18n/messagebundle_tr.json +1 -1
  94. package/dist/generated/assets/i18n/messagebundle_uk.json +1 -1
  95. package/dist/generated/assets/i18n/messagebundle_vi.json +1 -1
  96. package/dist/generated/assets/i18n/messagebundle_zh_CN.json +1 -1
  97. package/dist/generated/assets/i18n/messagebundle_zh_TW.json +1 -1
  98. package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
  99. package/dist/generated/assets/themes/sap_horizon_auto/parameters-bundle.css.json +1 -1
  100. package/dist/generated/assets/themes/sap_horizon_exp/parameters-bundle.css.json +1 -1
  101. package/dist/generated/i18n/i18n-defaults.d.ts +3 -1
  102. package/dist/generated/i18n/i18n-defaults.js +6 -4
  103. package/dist/generated/i18n/i18n-defaults.js.map +1 -1
  104. package/dist/generated/themes/IllustratedMessage.css.d.ts +1 -1
  105. package/dist/generated/themes/IllustratedMessage.css.js +1 -1
  106. package/dist/generated/themes/IllustratedMessage.css.js.map +1 -1
  107. package/dist/generated/themes/SideNavigation.css.d.ts +1 -1
  108. package/dist/generated/themes/SideNavigation.css.js +1 -1
  109. package/dist/generated/themes/SideNavigation.css.js.map +1 -1
  110. package/dist/generated/themes/SideNavigationGroup.css.d.ts +1 -1
  111. package/dist/generated/themes/SideNavigationGroup.css.js +1 -1
  112. package/dist/generated/themes/SideNavigationGroup.css.js.map +1 -1
  113. package/dist/generated/themes/SideNavigationItem.css.d.ts +1 -1
  114. package/dist/generated/themes/SideNavigationItem.css.js +1 -1
  115. package/dist/generated/themes/SideNavigationItem.css.js.map +1 -1
  116. package/dist/generated/themes/SideNavigationItemBase.css.d.ts +1 -1
  117. package/dist/generated/themes/SideNavigationItemBase.css.js +1 -1
  118. package/dist/generated/themes/SideNavigationItemBase.css.js.map +1 -1
  119. package/dist/generated/themes/SideNavigationSubItem.css.d.ts +1 -1
  120. package/dist/generated/themes/SideNavigationSubItem.css.js +1 -1
  121. package/dist/generated/themes/SideNavigationSubItem.css.js.map +1 -1
  122. package/dist/generated/themes/UserSettingsAccountView.css.d.ts +1 -1
  123. package/dist/generated/themes/UserSettingsAccountView.css.js +1 -1
  124. package/dist/generated/themes/UserSettingsAccountView.css.js.map +1 -1
  125. package/dist/generated/themes/UserSettingsAppearanceViewItem.css.d.ts +1 -1
  126. package/dist/generated/themes/UserSettingsAppearanceViewItem.css.js +1 -1
  127. package/dist/generated/themes/UserSettingsAppearanceViewItem.css.js.map +1 -1
  128. package/dist/generated/themes/UserSettingsDialog.css.d.ts +1 -1
  129. package/dist/generated/themes/UserSettingsDialog.css.js +1 -1
  130. package/dist/generated/themes/UserSettingsDialog.css.js.map +1 -1
  131. package/dist/generated/themes/UserSettingsItem.css.d.ts +1 -1
  132. package/dist/generated/themes/UserSettingsItem.css.js +1 -1
  133. package/dist/generated/themes/UserSettingsItem.css.js.map +1 -1
  134. package/dist/generated/themes/UserSettingsView.css.d.ts +1 -1
  135. package/dist/generated/themes/UserSettingsView.css.js +1 -1
  136. package/dist/generated/themes/UserSettingsView.css.js.map +1 -1
  137. package/dist/generated/themes/sap_horizon/parameters-bundle.css.d.ts +1 -1
  138. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -1
  139. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
  140. package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.d.ts +1 -1
  141. package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.js +2 -2
  142. package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.js.map +1 -1
  143. package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.d.ts +1 -1
  144. package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.js +2 -2
  145. package/dist/generated/themes/sap_horizon_exp/parameters-bundle.css.js.map +1 -1
  146. package/dist/shellbar/ShellBarSearch.d.ts +3 -1
  147. package/dist/shellbar/ShellBarSearch.js +3 -2
  148. package/dist/shellbar/ShellBarSearch.js.map +1 -1
  149. package/dist/vscode.html-custom-data.json +6 -1
  150. package/dist/web-types.json +34 -8
  151. package/package.json +8 -8
  152. package/src/MediaGalleryTemplate.tsx +6 -2
  153. package/src/UserSettingsAppearanceViewItemTemplate.tsx +1 -3
  154. package/src/UserSettingsAppearanceViewTemplate.tsx +2 -2
  155. package/src/UserSettingsDialogTemplate.tsx +9 -2
  156. package/src/UserSettingsItemTemplate.tsx +1 -1
  157. package/src/i18n/messagebundle.properties +9 -3
  158. package/src/i18n/messagebundle_ar.properties +3 -3
  159. package/src/i18n/messagebundle_bg.properties +3 -3
  160. package/src/i18n/messagebundle_ca.properties +3 -3
  161. package/src/i18n/messagebundle_cnr.properties +3 -3
  162. package/src/i18n/messagebundle_cs.properties +3 -3
  163. package/src/i18n/messagebundle_cy.properties +3 -3
  164. package/src/i18n/messagebundle_da.properties +3 -3
  165. package/src/i18n/messagebundle_el.properties +3 -3
  166. package/src/i18n/messagebundle_en.properties +3 -3
  167. package/src/i18n/messagebundle_en_GB.properties +3 -3
  168. package/src/i18n/messagebundle_en_US_sappsd.properties +3 -3
  169. package/src/i18n/messagebundle_en_US_saprigi.properties +10 -6
  170. package/src/i18n/messagebundle_en_US_saptrc.properties +3 -3
  171. package/src/i18n/messagebundle_es.properties +3 -3
  172. package/src/i18n/messagebundle_es_MX.properties +3 -3
  173. package/src/i18n/messagebundle_et.properties +3 -3
  174. package/src/i18n/messagebundle_fi.properties +3 -3
  175. package/src/i18n/messagebundle_fr.properties +3 -3
  176. package/src/i18n/messagebundle_fr_CA.properties +2 -2
  177. package/src/i18n/messagebundle_hi.properties +3 -3
  178. package/src/i18n/messagebundle_hr.properties +3 -3
  179. package/src/i18n/messagebundle_hu.properties +3 -3
  180. package/src/i18n/messagebundle_id.properties +3 -3
  181. package/src/i18n/messagebundle_it.properties +3 -3
  182. package/src/i18n/messagebundle_iw.properties +3 -3
  183. package/src/i18n/messagebundle_ja.properties +3 -3
  184. package/src/i18n/messagebundle_kk.properties +3 -3
  185. package/src/i18n/messagebundle_ko.properties +3 -3
  186. package/src/i18n/messagebundle_lt.properties +3 -3
  187. package/src/i18n/messagebundle_lv.properties +3 -3
  188. package/src/i18n/messagebundle_mk.properties +3 -3
  189. package/src/i18n/messagebundle_ms.properties +3 -3
  190. package/src/i18n/messagebundle_nl.properties +3 -3
  191. package/src/i18n/messagebundle_no.properties +3 -3
  192. package/src/i18n/messagebundle_pl.properties +3 -3
  193. package/src/i18n/messagebundle_pt.properties +3 -3
  194. package/src/i18n/messagebundle_pt_PT.properties +3 -3
  195. package/src/i18n/messagebundle_ro.properties +3 -3
  196. package/src/i18n/messagebundle_ru.properties +3 -3
  197. package/src/i18n/messagebundle_sh.properties +3 -3
  198. package/src/i18n/messagebundle_sk.properties +3 -3
  199. package/src/i18n/messagebundle_sl.properties +3 -3
  200. package/src/i18n/messagebundle_sr.properties +3 -3
  201. package/src/i18n/messagebundle_sv.properties +3 -3
  202. package/src/i18n/messagebundle_th.properties +1 -1
  203. package/src/i18n/messagebundle_tr.properties +3 -3
  204. package/src/i18n/messagebundle_uk.properties +3 -3
  205. package/src/i18n/messagebundle_vi.properties +3 -3
  206. package/src/i18n/messagebundle_zh_CN.properties +3 -3
  207. package/src/i18n/messagebundle_zh_TW.properties +3 -3
  208. package/src/themes/IllustratedMessage.css +12 -22
  209. package/src/themes/SideNavigation.css +10 -0
  210. package/src/themes/SideNavigationItemBase.css +4 -0
  211. package/src/themes/UserSettingsAccountView.css +2 -0
  212. package/src/themes/UserSettingsAppearanceViewItem.css +3 -10
  213. package/src/themes/UserSettingsDialog.css +5 -0
  214. package/src/themes/UserSettingsItem.css +3 -2
  215. package/src/themes/UserSettingsView.css +4 -17
  216. package/src/themes/sap_horizon/HeroBanner-parameters.css +2 -2
@@ -1,5 +1,5 @@
1
1
  import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
2
- import type { Slot, DefaultSlot } from "@ui5/webcomponents-base/dist/UI5Element.js";
2
+ import type { Slot, DefaultSlot, ChangeInfo } from "@ui5/webcomponents-base/dist/UI5Element.js";
3
3
  import type { ResizeObserverCallback } from "@ui5/webcomponents-base/dist/delegate/ResizeHandler.js";
4
4
  import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
5
5
  import type { IButton } from "@ui5/webcomponents/dist/Button.js";
@@ -199,10 +199,9 @@ declare class IllustratedMessage extends UI5Element {
199
199
  illustrationTitle?: string;
200
200
  illustrationSubtitle?: string;
201
201
  static i18nBundle: I18nBundle;
202
- _lastKnownOffsetWidthForMedia: Record<string, number>;
203
- _lastKnownOffsetHeightForMedia: Record<string, number>;
204
- _lastKnownMedia: string;
202
+ _contentHeightForMedia: Record<string, number>;
205
203
  _handleResize: ResizeObserverCallback;
204
+ _handleThemeLoaded: () => void;
206
205
  constructor();
207
206
  static get BREAKPOINTS(): {
208
207
  DIALOG: number;
@@ -210,12 +209,6 @@ declare class IllustratedMessage extends UI5Element {
210
209
  DOT: number;
211
210
  BASE: number;
212
211
  };
213
- static get BREAKPOINTS_HEIGHT(): {
214
- DIALOG: number;
215
- SPOT: number;
216
- DOT: number;
217
- BASE: number;
218
- };
219
212
  static get MEDIA(): {
220
213
  BASE: string;
221
214
  DOT: string;
@@ -226,10 +219,17 @@ declare class IllustratedMessage extends UI5Element {
226
219
  onBeforeRendering(): Promise<void>;
227
220
  onEnterDOM(): void;
228
221
  onExitDOM(): void;
222
+ onInvalidation(changeInfo: ChangeInfo): void;
229
223
  handleResize(): void;
230
- _applyMedia(heightChange?: boolean): void;
224
+ /**
225
+ * Checks if the current height of the component is enough to display the illustration, title, subtitle and actions.
226
+ * If not, the minimum required height for the current media is stored in the `_contentHeightForMedia` object.
227
+ * @private
228
+ */
229
+ _checkHeightConstraints(): void;
230
+ _applyMedia(): void;
231
+ _mediaExceedsContainerHeight(media: string): boolean;
231
232
  _setSVGAccAttrs(): void;
232
- _adjustHeightToFitContainer(): void;
233
233
  onAfterRendering(): void;
234
234
  /**
235
235
  * Modifies the IM styles in accordance to the `size` property's value.
@@ -11,6 +11,7 @@ import property from "@ui5/webcomponents-base/dist/decorators/property.js";
11
11
  import slot from "@ui5/webcomponents-base/dist/decorators/slot-strict.js";
12
12
  import i18n from "@ui5/webcomponents-base/dist/decorators/i18n.js";
13
13
  import ResizeHandler from "@ui5/webcomponents-base/dist/delegate/ResizeHandler.js";
14
+ import { attachThemeLoaded, detachThemeLoaded } from "@ui5/webcomponents-base/dist/Theming.js";
14
15
  import { getIllustrationDataSync, getIllustrationData } from "@ui5/webcomponents-base/dist/asset-registries/Illustrations.js";
15
16
  import { getEffectiveAriaLabelText } from "@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js";
16
17
  import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
@@ -122,11 +123,13 @@ let IllustratedMessage = IllustratedMessage_1 = class IllustratedMessage extends
122
123
  */
123
124
  this.decorative = false;
124
125
  this._handleResize = this.handleResize.bind(this);
125
- // this will store the last known offsetWidth of the IllustratedMessage DOM node for a given media (e.g. "Spot")
126
- this._lastKnownOffsetWidthForMedia = {};
127
- this._lastKnownOffsetHeightForMedia = {};
128
- // this will store the last known media, in order to detect if IllustratedMessage has been hidden by expand/collapse container
129
- this._lastKnownMedia = "base";
126
+ this._handleThemeLoaded = () => {
127
+ // Cached content-height are theme-dependent, so clear them when the theme changes.
128
+ // This hook is needed because `onInvalidation` does not fire when the theme changes
129
+ this._contentHeightForMedia = {};
130
+ };
131
+ // this will store the height of the inner content of the IllustratedMessage (illustration + title + subtitle + actions) for a given media (e.g. "Spot")
132
+ this._contentHeightForMedia = {};
130
133
  }
131
134
  static get BREAKPOINTS() {
132
135
  return {
@@ -136,14 +139,6 @@ let IllustratedMessage = IllustratedMessage_1 = class IllustratedMessage extends
136
139
  BASE: 160,
137
140
  };
138
141
  }
139
- static get BREAKPOINTS_HEIGHT() {
140
- return {
141
- DIALOG: 415,
142
- SPOT: 284,
143
- DOT: 207,
144
- BASE: 61,
145
- };
146
- }
147
142
  static get MEDIA() {
148
143
  return {
149
144
  BASE: "base",
@@ -199,49 +194,68 @@ let IllustratedMessage = IllustratedMessage_1 = class IllustratedMessage extends
199
194
  }
200
195
  onEnterDOM() {
201
196
  ResizeHandler.register(this, this._handleResize);
197
+ attachThemeLoaded(this._handleThemeLoaded);
202
198
  }
203
199
  onExitDOM() {
204
200
  ResizeHandler.deregister(this, this._handleResize);
201
+ detachThemeLoaded(this._handleThemeLoaded);
202
+ }
203
+ onInvalidation(changeInfo) {
204
+ if ((changeInfo.type === "property" && ["name", "titleText", "subtitleText"].includes(changeInfo.name))
205
+ || (changeInfo.type === "slot" && ["title", "subtitle", "default"].includes(changeInfo.name))) {
206
+ this._contentHeightForMedia = {};
207
+ }
205
208
  }
206
209
  handleResize() {
207
- if (this.design !== IllustrationMessageDesign.Auto) {
208
- this._adjustHeightToFitContainer();
209
- return;
210
+ if (this.design === IllustrationMessageDesign.Auto) {
211
+ this._checkHeightConstraints();
212
+ this._applyMedia();
210
213
  }
211
- this._applyMedia();
212
- window.requestAnimationFrame(this._adjustHeightToFitContainer.bind(this));
213
214
  }
214
- _applyMedia(heightChange) {
215
- const currOffsetWidth = this.offsetWidth, currOffsetHeight = this.offsetHeight;
216
- const design = heightChange ? currOffsetHeight : currOffsetWidth, oBreakpounts = heightChange ? IllustratedMessage_1.BREAKPOINTS_HEIGHT : IllustratedMessage_1.BREAKPOINTS;
217
- let newMedia = "";
218
- if (design <= oBreakpounts.BASE) {
219
- newMedia = IllustratedMessage_1.MEDIA.BASE;
215
+ /**
216
+ * Checks if the current height of the component is enough to display the illustration, title, subtitle and actions.
217
+ * If not, the minimum required height for the current media is stored in the `_contentHeightForMedia` object.
218
+ * @private
219
+ */
220
+ _checkHeightConstraints() {
221
+ // The `scrollHeight > clientHeight` guard is load-bearing: the cache must be populated ONLY
222
+ // when the content genuinely overflows the container. When the host container has
223
+ // `height: auto`, its clientHeight equals the content height and there is by definition no
224
+ // real constraint — recording that height would falsely poison `_contentHeightForMedia` and
225
+ // cause spurious downgrades on the next render (e.g. after a width shrink-and-grow).
226
+ if (this.media && this.scrollHeight > this.clientHeight) { // needs vertical responsiveness
227
+ const innerEl = this.shadowRoot.querySelector(".ui5-illustrated-message-inner");
228
+ const innerElHeight = innerEl ? innerEl.scrollHeight : 0;
229
+ innerElHeight && (this._contentHeightForMedia[this.media] = innerElHeight);
220
230
  }
221
- else if (design <= oBreakpounts.DOT) {
222
- newMedia = IllustratedMessage_1.MEDIA.DOT;
231
+ }
232
+ _applyMedia() {
233
+ const width = this.offsetWidth;
234
+ let media = "", mediaIndex = -1;
235
+ if (width <= IllustratedMessage_1.BREAKPOINTS.BASE) {
236
+ media = IllustratedMessage_1.MEDIA.BASE;
237
+ }
238
+ else if (width <= IllustratedMessage_1.BREAKPOINTS.DOT) {
239
+ media = IllustratedMessage_1.MEDIA.DOT;
223
240
  }
224
- else if (design <= oBreakpounts.SPOT) {
225
- newMedia = IllustratedMessage_1.MEDIA.SPOT;
241
+ else if (width <= IllustratedMessage_1.BREAKPOINTS.SPOT) {
242
+ media = IllustratedMessage_1.MEDIA.SPOT;
226
243
  }
227
- else if (design <= oBreakpounts.DIALOG) {
228
- newMedia = IllustratedMessage_1.MEDIA.DIALOG;
244
+ else if (width <= IllustratedMessage_1.BREAKPOINTS.DIALOG) {
245
+ media = IllustratedMessage_1.MEDIA.DIALOG;
229
246
  }
230
247
  else {
231
- newMedia = IllustratedMessage_1.MEDIA.SCENE;
248
+ media = IllustratedMessage_1.MEDIA.SCENE;
232
249
  }
233
- const lastKnownOffsetWidth = this._lastKnownOffsetWidthForMedia[newMedia], lastKnownOffsetHeight = this._lastKnownOffsetHeightForMedia[newMedia];
234
- // prevents infinite resizing, when same width is detected for the same media,
235
- // excluding the case in which, the control is placed inside expand/collapse container
236
- if (!(lastKnownOffsetWidth && currOffsetWidth === lastKnownOffsetWidth
237
- && lastKnownOffsetHeight && currOffsetHeight === lastKnownOffsetHeight)
238
- || this._lastKnownOffsetWidthForMedia[this._lastKnownMedia] === 0
239
- || this._lastKnownOffsetHeightForMedia[this._lastKnownMedia] === 0) {
240
- this.media = newMedia;
241
- this._lastKnownOffsetWidthForMedia[newMedia] = currOffsetWidth;
242
- this._lastKnownOffsetHeightForMedia[newMedia] = currOffsetHeight;
243
- this._lastKnownMedia = newMedia;
250
+ mediaIndex = Object.values(IllustratedMessage_1.MEDIA).indexOf(media);
251
+ while (mediaIndex > 0 && this._mediaExceedsContainerHeight(media)) {
252
+ mediaIndex--;
253
+ media = Object.values(IllustratedMessage_1.MEDIA)[mediaIndex];
244
254
  }
255
+ this.media = media;
256
+ }
257
+ _mediaExceedsContainerHeight(media) {
258
+ return !!this._contentHeightForMedia[media] && this.clientHeight < this._contentHeightForMedia[media];
245
259
  }
246
260
  _setSVGAccAttrs() {
247
261
  const svg = this.shadowRoot.querySelector(".ui5-illustrated-message-illustration svg");
@@ -265,18 +279,17 @@ let IllustratedMessage = IllustratedMessage_1 = class IllustratedMessage extends
265
279
  }
266
280
  }
267
281
  }
268
- _adjustHeightToFitContainer() {
269
- const illustrationWrapper = this.shadowRoot.querySelector(".ui5-illustrated-message-illustration"), illustration = illustrationWrapper.querySelector("svg");
270
- if (illustration) {
271
- illustrationWrapper.classList.toggle("ui5-illustrated-message-illustration-fit-content", false);
272
- if (this.getDomRef().scrollHeight > this.getDomRef().offsetHeight) {
273
- illustrationWrapper.classList.toggle("ui5-illustrated-message-illustration-fit-content", true);
274
- this._applyMedia(true /* height change */);
275
- }
276
- }
277
- }
278
282
  onAfterRendering() {
279
283
  this._setSVGAccAttrs();
284
+ if (this.design !== IllustrationMessageDesign.Auto) {
285
+ return;
286
+ }
287
+ const heightMeasurementNeeded = this.media && !(this.media in this._contentHeightForMedia);
288
+ const mightOverflow = this.scrollHeight > this.clientHeight;
289
+ if (heightMeasurementNeeded || mightOverflow) {
290
+ this._checkHeightConstraints();
291
+ this._applyMedia();
292
+ }
280
293
  }
281
294
  /**
282
295
  * Modifies the IM styles in accordance to the `size` property's value.
@@ -1 +1 @@
1
- {"version":3,"file":"IllustratedMessage.js","sourceRoot":"","sources":["../src/IllustratedMessage.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AAEpE,OAAO,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xB;IADC,QAAQ,EAAE;iDACI;AAWf;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;sDACT;AAUnB;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;iDACO;AAUnC;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;oDACC;AAS7B;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;mDACd;AAMxB;IADN,IAAI,CAAC,0BAA0B,CAAC;4CACH;AA7LzB,kBAAkB;IARvB,aAAa,CAAC;QACd,GAAG,EAAE,yBAAyB;QAC9B,aAAa,EAAE,IAAI;QACnB,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,qBAAqB;QAC7B,QAAQ,EAAE,0BAA0B;KACpC,CAAC;GACI,kBAAkB,CAgdvB;AAED,kBAAkB,CAAC,MAAM,EAAE,CAAC;AAE5B,eAAe,kBAAkB,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { Slot, DefaultSlot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport type { ResizeObserverCallback } from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport { getIllustrationDataSync, getIllustrationData } from \"@ui5/webcomponents-base/dist/asset-registries/Illustrations.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport executeTemplate from \"@ui5/webcomponents-base/dist/renderer/executeTemplate.js\";\nimport type { IButton } from \"@ui5/webcomponents/dist/Button.js\";\nimport IllustrationMessageDesign from \"./types/IllustrationMessageDesign.js\";\nimport IllustrationMessageType from \"./types/IllustrationMessageType.js\";\nimport \"./illustrations/BeforeSearch.js\";\n\n// Styles\nimport IllustratedMessageCss from \"./generated/themes/IllustratedMessage.css.js\";\n\n// Template\nimport IllustratedMessageTemplate from \"./IllustratedMessageTemplate.js\";\n\nconst getEffectiveIllustrationName = (name: string): string => {\n\tif (name.startsWith(\"Tnt\")) {\n\t\treturn name.replace(\"Tnt\", \"tnt/\");\n\t}\n\n\tif (name.includes(\"/\")) {\n\t\treturn name;\n\t}\n\n\treturn `fiori/${name}`;\n};\n\n/**\n * @class\n *\n * ### Overview\n * An IllustratedMessage is a recommended combination of a solution-oriented message, an engaging\n * illustration, and conversational tone to better communicate an empty or a success state than just show\n * a message alone.\n *\n * Each illustration has default internationalised title and subtitle texts. Also they can be managed with\n * `titleText` and `subtitleText` properties.\n *\n * To display the desired illustration, use the `name` property, where you can find the list of all available illustrations.\n *\n * **Note:** By default the “BeforeSearch” illustration is loaded. To use other illustrations, make sure you import them in addition, for example:\n *\n * `import \"@ui5/webcomponents-fiori/dist/illustrations/NoData.js\"`\n *\n * **Note:** Illustrations starting with the “Tnt” prefix are part of another illustration set. For example to use the “TntSuccess” illustration, add the following import::\n *\n * `import \"@ui5/webcomponents-fiori/dist/illustrations/tnt/Success.js\"`\n *\n * ### Structure\n * The IllustratedMessage consists of the following elements, which are displayed below each other in the following order:\n *\n * - Illustration\n * - Title\n * - Subtitle\n * - Actions\n *\n * ### Usage\n * `ui5-illustrated-message` is meant to be used inside container component, for example a `ui5-card`,\n * a `ui5-dialog` or a `ui5-page`\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents-fiori/dist/IllustratedMessage.js\";`\n * @csspart subtitle - Used to style the subtitle wrapper of the `ui5-illustrated-message`\n * @constructor\n * @extends UI5Element\n * @public\n * @since 1.0.0-rc.15\n */\n\n@customElement({\n\ttag: \"ui5-illustrated-message\",\n\tlanguageAware: true,\n\tthemeAware: true,\n\trenderer: jsxRenderer,\n\tstyles: IllustratedMessageCss,\n\ttemplate: IllustratedMessageTemplate,\n})\nclass IllustratedMessage extends UI5Element {\n\t/**\n\t* Defines the illustration name that will be displayed in the component.\n\t*\n\t* Example:\n\t*\n\t* `name='BeforeSearch'`, `name='UnableToUpload'`, etc..\n\t*\n\t* **Note:** To use the TNT illustrations,\n\t* you need to set the `tnt` or `Tnt` prefix in front of the icon's name.\n\t*\n\t* Example:\n\t*\n\t* `name='tnt/Avatar'` or `name='TntAvatar'`.\n\t*\n\t* **Note:** By default the `BeforeSearch` illustration is loaded.\n\t* When using an illustration type, other than the default, it should be loaded in addition:\n\t*\n\t* `import \"@ui5/webcomponents-fiori/dist/illustrations/NoData.js\";`\n\t*\n\t* For TNT illustrations:\n\t*\n\t* `import \"@ui5/webcomponents-fiori/dist/illustrations/tnt/SessionExpired.js\";`\n\t* @default \"BeforeSearch\"\n\t* @public\n\t*/\n\t@property()\n\tname = \"BeforeSearch\";\n\n\t/**\n\t* Determines which illustration breakpoint variant is used.\n\t*\n\t* As `IllustratedMessage` adapts itself around the `Illustration`, the other\n\t* elements of the component are displayed differently on the different breakpoints/illustration designs.\n\t* @default \"Auto\"\n\t* @public\n\t* @since 2.0.0\n\t*/\n\t@property()\n\tdesign: `${IllustrationMessageDesign}` = \"Auto\";\n\n\t/**\n\t* Defines the subtitle of the component.\n\t*\n\t* **Note:** Using this property, the default subtitle text of illustration will be overwritten.\n\t*\n\t* **Note:** Using `subtitle` slot, the default of this property will be overwritten.\n\t* @default undefined\n\t* @public\n\t*/\n\t@property()\n\tsubtitleText?: string;\n\n\t/**\n\t* Defines the title of the component.\n\t*\n\t* **Note:** Using this property, the default title text of illustration will be overwritten.\n\t* @default undefined\n\t* @public\n\t*/\n\t@property()\n\ttitleText?: string;\n\n\t/**\n\t* Receives id(or many ids) of the elements that label the component.\n\t* @default undefined\n\t* @public\n\t* @since 1.7.0\n\t*/\n\t@property()\n\taccessibleNameRef?: string;\n\n\t/**\n\t* Illustration breakpoint variant for the <code>Dot</code> design.\n\t*\n\t* @private\n\t* @since 1.24.0\n\t*/\n\t@property({ noAttribute: true })\n\tdotSvg?: string;\n\n\t/**\n\t* Illustration breakpoint variant for the <code>Spot</code> design.\n\t*\n\t* @private\n\t* @since 1.9.0\n\t*/\n\t@property({ noAttribute: true })\n\tspotSvg?: string;\n\n\t/**\n\t* Illustration breakpoint variant for the `Scene` design.\n\t* @private\n\t* @since 1.9.0\n\t*/\n\t@property({ noAttribute: true })\n\tsceneSvg?: string;\n\n\t/**\n\t* Illustration breakpoint variant for the `Dialog` design.\n\t* @private\n\t* @since 1.9.0\n\t*/\n\t@property({ noAttribute: true })\n\tdialogSvg?: string;\n\n\t/**\n\t* Template function for the Dot design (safe variant).\n\t* @private\n\t* @since 2.16.0\n\t*/\n\t@property({ noAttribute: true })\n\tdotTemplate?: object;\n\n\t/**\n\t* Template function for the Spot design (safe variant).\n\t* @private\n\t* @since 2.16.0\n\t*/\n\t@property({ noAttribute: true })\n\tspotTemplate?: object;\n\n\t/**\n\t* Template function for the Scene design (safe variant).\n\t* @private\n\t* @since 2.16.0\n\t*/\n\t@property({ noAttribute: true })\n\tsceneTemplate?: object;\n\n\t/**\n\t* Template function for the Dialog design (safe variant).\n\t* @private\n\t* @since 2.16.0\n\t*/\n\t@property({ noAttribute: true })\n\tdialogTemplate?: object;\n\n\t/**\n\t* Determinates what is the current media of the component based on its width.\n\t* @private\n\t*/\n\t@property()\n\tmedia?: string;\n\n\t/**\n \t* Defines whether the illustration is decorative.\n\t*\n\t* When set to `true`, the attributes `role=\"presentation\"` and `aria-hidden=\"true\"` are applied to the SVG element.\n\t* @default false\n\t* @public\n \t* @since 2.10.0\n\t*/\n\t@property({ type: Boolean })\n\tdecorative = false;\n\n\t/**\n\t* Defines the title of the component.\n\t*\n\t* **Note:** Using this slot, the default title text of illustration and the value of `title` property will be overwritten.\n\t* @public\n\t* @since 1.7.0\n\t*/\n\t@slot({ type: HTMLElement })\n\ttitle!: Slot<HTMLElement> & string;\n\n\t/**\n\t* Defines the subtitle of the component.\n\t*\n\t* **Note:** Using this slot, the default subtitle text of illustration and the value of `subtitleText` property will be overwritten.\n\t* @public\n\t* @since 1.0.0-rc.16\n\t*/\n\t@slot({ type: HTMLElement })\n\tsubtitle!: Slot<HTMLElement>;\n\n\t/**\n\t* Defines the component actions.\n\t*\n\t* **Note:** Not displayed when the `design` property is set to `Base`.\n\t* @public\n\t*/\n\t@slot({ type: HTMLElement, \"default\": true })\n\tactions!: DefaultSlot<IButton>;\n\n\tillustrationTitle?: string;\n\tillustrationSubtitle?: string;\n\n\t@i18n(\"@ui5/webcomponents-fiori\")\n\tstatic i18nBundle: I18nBundle;\n\t_lastKnownOffsetWidthForMedia: Record<string, number>;\n\t_lastKnownOffsetHeightForMedia: Record<string, number>;\n\t_lastKnownMedia: string;\n\t_handleResize: ResizeObserverCallback;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._handleResize = this.handleResize.bind(this);\n\t\t// this will store the last known offsetWidth of the IllustratedMessage DOM node for a given media (e.g. \"Spot\")\n\t\tthis._lastKnownOffsetWidthForMedia = {};\n\t\tthis._lastKnownOffsetHeightForMedia = {};\n\t\t// this will store the last known media, in order to detect if IllustratedMessage has been hidden by expand/collapse container\n\t\tthis._lastKnownMedia = \"base\";\n\t}\n\n\tstatic get BREAKPOINTS() {\n\t\treturn {\n\t\t\tDIALOG: 681,\n\t\t\tSPOT: 360,\n\t\t\tDOT: 260,\n\t\t\tBASE: 160,\n\t\t};\n\t}\n\n\tstatic get BREAKPOINTS_HEIGHT() {\n\t\treturn {\n\t\t\tDIALOG: 415,\n\t\t\tSPOT: 284,\n\t\t\tDOT: 207,\n\t\t\tBASE: 61,\n\t\t};\n\t}\n\n\tstatic get MEDIA() {\n\t\treturn {\n\t\t\tBASE: \"base\",\n\t\t\tDOT: \"dot\",\n\t\t\tSPOT: \"spot\",\n\t\t\tDIALOG: \"dialog\",\n\t\t\tSCENE: \"scene\",\n\t\t};\n\t}\n\n\tasync onBeforeRendering() {\n\t\t// Gets the current illustration name given in the \"name\" attribute\n\t\tlet effectiveName = getEffectiveIllustrationName(this.name);\n\t\tlet illustrationData = getIllustrationDataSync(effectiveName);\n\n\t\tif (this.hasAttribute(\"name\") && !this.isValidIllustration(effectiveName)) {\n\t\t\teffectiveName = getEffectiveIllustrationName(IllustrationMessageType.BeforeSearch);\n\t\t\t// eslint-disable-next-line\n\t\t\tconsole.warn(`The illustration \"${effectiveName!}\" does not exist. The default illustration \"${IllustrationMessageType.BeforeSearch}\" is loaded instead.`);\n\t\t}\n\n\t\tif (illustrationData === undefined) {\n\t\t\tillustrationData = await getIllustrationData(effectiveName);\n\t\t}\n\n\t\t// Check if illustration uses templates (safe variant)\n\t\tif (illustrationData && \"dotTemplate\" in illustrationData && illustrationData.dotTemplate) {\n\t\t\tthis.dotTemplate = executeTemplate(illustrationData.dotTemplate, this);\n\t\t}\n\t\tif (illustrationData && \"spotTemplate\" in illustrationData && illustrationData.spotTemplate) {\n\t\t\tthis.spotTemplate = executeTemplate(illustrationData.spotTemplate, this);\n\t\t}\n\t\tif (illustrationData && \"dialogTemplate\" in illustrationData && illustrationData.dialogTemplate) {\n\t\t\tthis.dialogTemplate = executeTemplate(illustrationData.dialogTemplate, this);\n\t\t}\n\t\tif (illustrationData && \"sceneTemplate\" in illustrationData && illustrationData.sceneTemplate) {\n\t\t\tthis.sceneTemplate = executeTemplate(illustrationData.sceneTemplate, this);\n\t\t}\n\n\t\t// Check if illustration uses SVG strings (unsafe variant)\n\t\tif (illustrationData && \"dotSvg\" in illustrationData) {\n\t\t\tthis.dotSvg = illustrationData.dotSvg;\n\t\t}\n\t\tif (illustrationData && \"spotSvg\" in illustrationData) {\n\t\t\tthis.spotSvg = illustrationData.spotSvg;\n\t\t}\n\t\tif (illustrationData && \"dialogSvg\" in illustrationData) {\n\t\t\tthis.dialogSvg = illustrationData.dialogSvg;\n\t\t}\n\t\tif (illustrationData && \"sceneSvg\" in illustrationData) {\n\t\t\tthis.sceneSvg = illustrationData.sceneSvg;\n\t\t}\n\n\t\tthis.illustrationTitle = IllustratedMessage.i18nBundle.getText(illustrationData!.title);\n\t\tthis.illustrationSubtitle = IllustratedMessage.i18nBundle.getText(illustrationData!.subtitle);\n\n\t\tif (this.design !== IllustrationMessageDesign.Auto) {\n\t\t\tthis._handleCustomSize();\n\t\t}\n\t}\n\n\tonEnterDOM() {\n\t\tResizeHandler.register(this, this._handleResize);\n\t}\n\n\tonExitDOM() {\n\t\tResizeHandler.deregister(this, this._handleResize);\n\t}\n\n\thandleResize() {\n\t\tif (this.design !== IllustrationMessageDesign.Auto) {\n\t\t\tthis._adjustHeightToFitContainer();\n\t\t\treturn;\n\t\t}\n\n\t\tthis._applyMedia();\n\t\twindow.requestAnimationFrame(this._adjustHeightToFitContainer.bind(this));\n\t}\n\n\t_applyMedia(heightChange?: boolean) {\n\t\tconst currOffsetWidth = this.offsetWidth,\n\t\t\tcurrOffsetHeight = this.offsetHeight;\n\n\t\tconst design = heightChange ? currOffsetHeight : currOffsetWidth,\n\t\t\toBreakpounts = heightChange ? IllustratedMessage.BREAKPOINTS_HEIGHT : IllustratedMessage.BREAKPOINTS;\n\t\tlet newMedia = \"\";\n\n\t\tif (design <= oBreakpounts.BASE) {\n\t\t\tnewMedia = IllustratedMessage.MEDIA.BASE;\n\t\t} else if (design <= oBreakpounts.DOT) {\n\t\t\tnewMedia = IllustratedMessage.MEDIA.DOT;\n\t\t} else if (design <= oBreakpounts.SPOT) {\n\t\t\tnewMedia = IllustratedMessage.MEDIA.SPOT;\n\t\t} else if (design <= oBreakpounts.DIALOG) {\n\t\t\tnewMedia = IllustratedMessage.MEDIA.DIALOG;\n\t\t} else {\n\t\t\tnewMedia = IllustratedMessage.MEDIA.SCENE;\n\t\t}\n\t\tconst lastKnownOffsetWidth = this._lastKnownOffsetWidthForMedia[newMedia],\n\t\t\tlastKnownOffsetHeight = this._lastKnownOffsetHeightForMedia[newMedia];\n\t\t // prevents infinite resizing, when same width is detected for the same media,\n\t\t // excluding the case in which, the control is placed inside expand/collapse container\n\t\tif (!(lastKnownOffsetWidth && currOffsetWidth === lastKnownOffsetWidth\n\t\t\t&& lastKnownOffsetHeight && currOffsetHeight === lastKnownOffsetHeight)\n\t\t\t|| this._lastKnownOffsetWidthForMedia[this._lastKnownMedia] === 0\n\t\t\t|| this._lastKnownOffsetHeightForMedia[this._lastKnownMedia] === 0) {\n\t\t\tthis.media = newMedia;\n\t\t\tthis._lastKnownOffsetWidthForMedia[newMedia] = currOffsetWidth;\n\t\t\tthis._lastKnownOffsetHeightForMedia[newMedia] = currOffsetHeight;\n\t\t\tthis._lastKnownMedia = newMedia;\n\t\t}\n\t}\n\n\t_setSVGAccAttrs() {\n\t\tconst svg = this.shadowRoot!.querySelector(\".ui5-illustrated-message-illustration svg\");\n\n\t\tif (!svg) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.decorative) {\n\t\t\tsvg.setAttribute(\"role\", \"presentation\");\n\t\t\tsvg.setAttribute(\"aria-hidden\", \"true\");\n\t\t\tsvg.removeAttribute(\"aria-label\");\n\t\t} else {\n\t\t\tsvg.removeAttribute(\"role\");\n\t\t\tsvg.removeAttribute(\"aria-hidden\");\n\n\t\t\t// Set aria-label only when not decorative and text exists\n\t\t\tif (this.ariaLabelText) {\n\t\t\t\tsvg.setAttribute(\"aria-label\", this.ariaLabelText);\n\t\t\t} else {\n\t\t\t\tsvg.removeAttribute(\"aria-label\");\n\t\t\t}\n\t\t}\n\t}\n\n\t_adjustHeightToFitContainer() {\n\t\tconst illustrationWrapper = <HTMLElement> this.shadowRoot!.querySelector(\".ui5-illustrated-message-illustration\"),\n\t\t\tillustration = illustrationWrapper.querySelector(\"svg\");\n\n\t\tif (illustration) {\n\t\t\tillustrationWrapper.classList.toggle(\"ui5-illustrated-message-illustration-fit-content\", false);\n\t\t\tif (this.getDomRef()!.scrollHeight > this.getDomRef()!.offsetHeight) {\n\t\t\t\tillustrationWrapper.classList.toggle(\"ui5-illustrated-message-illustration-fit-content\", true);\n\t\t\t\tthis._applyMedia(true /* height change */);\n\t\t\t}\n\t\t}\n\t}\n\n\tonAfterRendering() {\n\t\tthis._setSVGAccAttrs();\n\t}\n\n\t/**\n\t * Modifies the IM styles in accordance to the `size` property's value.\n\t * Note: The resize handler has no effect when size is different than \"Auto\".\n\t * @private\n\t * @since 1.5.0\n\t */\n\t_handleCustomSize() {\n\t\tswitch (this.design) {\n\t\tcase IllustrationMessageDesign.Base:\n\t\t\tthis.media = IllustratedMessage.MEDIA.BASE;\n\t\t\treturn;\n\t\tcase IllustrationMessageDesign.Dot:\n\t\t\tthis.media = IllustratedMessage.MEDIA.DOT;\n\t\t\treturn;\n\t\tcase IllustrationMessageDesign.Spot:\n\t\t\tthis.media = IllustratedMessage.MEDIA.SPOT;\n\t\t\treturn;\n\t\tcase IllustrationMessageDesign.Dialog:\n\t\t\tthis.media = IllustratedMessage.MEDIA.DIALOG;\n\t\t\treturn;\n\t\tcase IllustrationMessageDesign.ExtraSmall:\n\t\t\tthis.media = IllustratedMessage.MEDIA.DOT;\n\t\t\treturn;\n\t\tcase IllustrationMessageDesign.Small:\n\t\t\tthis.media = IllustratedMessage.MEDIA.SPOT;\n\t\t\treturn;\n\t\tcase IllustrationMessageDesign.Medium:\n\t\t\tthis.media = IllustratedMessage.MEDIA.DIALOG;\n\t\t\treturn;\n\t\tdefault:\n\t\t\tthis.media = IllustratedMessage.MEDIA.SCENE;\n\t\t}\n\t}\n\n\tget ariaLabelText(): string | undefined {\n\t\treturn getEffectiveAriaLabelText(this);\n\t}\n\n\tget effectiveIllustration(): string | object | undefined {\n\t\tswitch (this.media) {\n\t\tcase IllustratedMessage.MEDIA.DOT:\n\t\t\treturn this.dotTemplate || this.dotSvg;\n\t\tcase IllustratedMessage.MEDIA.SPOT:\n\t\t\treturn this.spotTemplate || this.spotSvg;\n\t\tcase IllustratedMessage.MEDIA.DIALOG:\n\t\t\treturn this.dialogTemplate || this.dialogSvg;\n\t\tcase IllustratedMessage.MEDIA.SCENE:\n\t\t\treturn this.sceneTemplate || this.sceneSvg;\n\t\tdefault:\n\t\t\treturn \"\";\n\t\t}\n\t}\n\n\tget hasFormattedSubtitle(): boolean {\n\t\treturn !!this.subtitle.length;\n\t}\n\n\tget hasFormattedTitle(): boolean {\n\t\treturn !!this.title.length;\n\t}\n\n\tget effectiveTitleText(): string | undefined {\n\t\treturn this.titleText ? this.titleText : this.illustrationTitle;\n\t}\n\n\tget effectiveSubitleText(): string | undefined {\n\t\treturn this.subtitleText ? this.subtitleText : this.illustrationSubtitle;\n\t}\n\n\tget hasTitle(): boolean {\n\t\treturn !!(this.hasFormattedTitle || this.titleText || this.illustrationTitle);\n\t}\n\n\tget hasSubtitle(): boolean {\n\t\treturn !!(this.hasFormattedSubtitle || this.subtitleText || this.illustrationSubtitle);\n\t}\n\n\tget hasActions(): boolean {\n\t\treturn !!this.actions.length && this.media !== IllustratedMessage.MEDIA.BASE;\n\t}\n\n\tisValidIllustration(currentIllustration: string): boolean {\n\t\tcurrentIllustration = currentIllustration.startsWith(\"tnt/\") ? currentIllustration.replace(\"tnt/\", \"Tnt\") : currentIllustration.replace(\"fiori/\", \"\");\n\n\t\treturn currentIllustration in IllustrationMessageType;\n\t}\n}\n\nIllustratedMessage.define();\n\nexport default IllustratedMessage;\n"]}
1
+ {"version":3,"file":"IllustratedMessage.js","sourceRoot":"","sources":["../src/IllustratedMessage.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AAEpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,wDAAwD,CAA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AAQlB;IADC,QAAQ,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;qDACb;AAQnB;IADC,QAAQ,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;uDACX;AAQrB;IADC,QAAQ,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;wDACV;AAQtB;IADC,QAAQ,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;yDACT;AAQvB;IADC,QAAQ,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;0DACR;AAOxB;IADC,QAAQ,EAAE;iDACI;AAWf;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;sDACT;AAUnB;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;iDACO;AAUnC;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;oDACC;AAS7B;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;mDACd;AAMxB;IADN,IAAI,CAAC,0BAA0B,CAAC;4CACH;AA7LzB,kBAAkB;IARvB,aAAa,CAAC;QACd,GAAG,EAAE,yBAAyB;QAC9B,aAAa,EAAE,IAAI;QACnB,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,qBAAqB;QAC7B,QAAQ,EAAE,0BAA0B;KACpC,CAAC;GACI,kBAAkB,CA2dvB;AAED,kBAAkB,CAAC,MAAM,EAAE,CAAC;AAE5B,eAAe,kBAAkB,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { Slot, DefaultSlot, ChangeInfo } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport ResizeHandler from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport type { ResizeObserverCallback } from \"@ui5/webcomponents-base/dist/delegate/ResizeHandler.js\";\nimport { attachThemeLoaded, detachThemeLoaded } from \"@ui5/webcomponents-base/dist/Theming.js\";\nimport { getIllustrationDataSync, getIllustrationData } from \"@ui5/webcomponents-base/dist/asset-registries/Illustrations.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport executeTemplate from \"@ui5/webcomponents-base/dist/renderer/executeTemplate.js\";\nimport type { IButton } from \"@ui5/webcomponents/dist/Button.js\";\nimport IllustrationMessageDesign from \"./types/IllustrationMessageDesign.js\";\nimport IllustrationMessageType from \"./types/IllustrationMessageType.js\";\nimport \"./illustrations/BeforeSearch.js\";\n\n// Styles\nimport IllustratedMessageCss from \"./generated/themes/IllustratedMessage.css.js\";\n\n// Template\nimport IllustratedMessageTemplate from \"./IllustratedMessageTemplate.js\";\n\nconst getEffectiveIllustrationName = (name: string): string => {\n\tif (name.startsWith(\"Tnt\")) {\n\t\treturn name.replace(\"Tnt\", \"tnt/\");\n\t}\n\n\tif (name.includes(\"/\")) {\n\t\treturn name;\n\t}\n\n\treturn `fiori/${name}`;\n};\n\n/**\n * @class\n *\n * ### Overview\n * An IllustratedMessage is a recommended combination of a solution-oriented message, an engaging\n * illustration, and conversational tone to better communicate an empty or a success state than just show\n * a message alone.\n *\n * Each illustration has default internationalised title and subtitle texts. Also they can be managed with\n * `titleText` and `subtitleText` properties.\n *\n * To display the desired illustration, use the `name` property, where you can find the list of all available illustrations.\n *\n * **Note:** By default the “BeforeSearch” illustration is loaded. To use other illustrations, make sure you import them in addition, for example:\n *\n * `import \"@ui5/webcomponents-fiori/dist/illustrations/NoData.js\"`\n *\n * **Note:** Illustrations starting with the “Tnt” prefix are part of another illustration set. For example to use the “TntSuccess” illustration, add the following import::\n *\n * `import \"@ui5/webcomponents-fiori/dist/illustrations/tnt/Success.js\"`\n *\n * ### Structure\n * The IllustratedMessage consists of the following elements, which are displayed below each other in the following order:\n *\n * - Illustration\n * - Title\n * - Subtitle\n * - Actions\n *\n * ### Usage\n * `ui5-illustrated-message` is meant to be used inside container component, for example a `ui5-card`,\n * a `ui5-dialog` or a `ui5-page`\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents-fiori/dist/IllustratedMessage.js\";`\n * @csspart subtitle - Used to style the subtitle wrapper of the `ui5-illustrated-message`\n * @constructor\n * @extends UI5Element\n * @public\n * @since 1.0.0-rc.15\n */\n\n@customElement({\n\ttag: \"ui5-illustrated-message\",\n\tlanguageAware: true,\n\tthemeAware: true,\n\trenderer: jsxRenderer,\n\tstyles: IllustratedMessageCss,\n\ttemplate: IllustratedMessageTemplate,\n})\nclass IllustratedMessage extends UI5Element {\n\t/**\n\t* Defines the illustration name that will be displayed in the component.\n\t*\n\t* Example:\n\t*\n\t* `name='BeforeSearch'`, `name='UnableToUpload'`, etc..\n\t*\n\t* **Note:** To use the TNT illustrations,\n\t* you need to set the `tnt` or `Tnt` prefix in front of the icon's name.\n\t*\n\t* Example:\n\t*\n\t* `name='tnt/Avatar'` or `name='TntAvatar'`.\n\t*\n\t* **Note:** By default the `BeforeSearch` illustration is loaded.\n\t* When using an illustration type, other than the default, it should be loaded in addition:\n\t*\n\t* `import \"@ui5/webcomponents-fiori/dist/illustrations/NoData.js\";`\n\t*\n\t* For TNT illustrations:\n\t*\n\t* `import \"@ui5/webcomponents-fiori/dist/illustrations/tnt/SessionExpired.js\";`\n\t* @default \"BeforeSearch\"\n\t* @public\n\t*/\n\t@property()\n\tname = \"BeforeSearch\";\n\n\t/**\n\t* Determines which illustration breakpoint variant is used.\n\t*\n\t* As `IllustratedMessage` adapts itself around the `Illustration`, the other\n\t* elements of the component are displayed differently on the different breakpoints/illustration designs.\n\t* @default \"Auto\"\n\t* @public\n\t* @since 2.0.0\n\t*/\n\t@property()\n\tdesign: `${IllustrationMessageDesign}` = \"Auto\";\n\n\t/**\n\t* Defines the subtitle of the component.\n\t*\n\t* **Note:** Using this property, the default subtitle text of illustration will be overwritten.\n\t*\n\t* **Note:** Using `subtitle` slot, the default of this property will be overwritten.\n\t* @default undefined\n\t* @public\n\t*/\n\t@property()\n\tsubtitleText?: string;\n\n\t/**\n\t* Defines the title of the component.\n\t*\n\t* **Note:** Using this property, the default title text of illustration will be overwritten.\n\t* @default undefined\n\t* @public\n\t*/\n\t@property()\n\ttitleText?: string;\n\n\t/**\n\t* Receives id(or many ids) of the elements that label the component.\n\t* @default undefined\n\t* @public\n\t* @since 1.7.0\n\t*/\n\t@property()\n\taccessibleNameRef?: string;\n\n\t/**\n\t* Illustration breakpoint variant for the <code>Dot</code> design.\n\t*\n\t* @private\n\t* @since 1.24.0\n\t*/\n\t@property({ noAttribute: true })\n\tdotSvg?: string;\n\n\t/**\n\t* Illustration breakpoint variant for the <code>Spot</code> design.\n\t*\n\t* @private\n\t* @since 1.9.0\n\t*/\n\t@property({ noAttribute: true })\n\tspotSvg?: string;\n\n\t/**\n\t* Illustration breakpoint variant for the `Scene` design.\n\t* @private\n\t* @since 1.9.0\n\t*/\n\t@property({ noAttribute: true })\n\tsceneSvg?: string;\n\n\t/**\n\t* Illustration breakpoint variant for the `Dialog` design.\n\t* @private\n\t* @since 1.9.0\n\t*/\n\t@property({ noAttribute: true })\n\tdialogSvg?: string;\n\n\t/**\n\t* Template function for the Dot design (safe variant).\n\t* @private\n\t* @since 2.16.0\n\t*/\n\t@property({ noAttribute: true })\n\tdotTemplate?: object;\n\n\t/**\n\t* Template function for the Spot design (safe variant).\n\t* @private\n\t* @since 2.16.0\n\t*/\n\t@property({ noAttribute: true })\n\tspotTemplate?: object;\n\n\t/**\n\t* Template function for the Scene design (safe variant).\n\t* @private\n\t* @since 2.16.0\n\t*/\n\t@property({ noAttribute: true })\n\tsceneTemplate?: object;\n\n\t/**\n\t* Template function for the Dialog design (safe variant).\n\t* @private\n\t* @since 2.16.0\n\t*/\n\t@property({ noAttribute: true })\n\tdialogTemplate?: object;\n\n\t/**\n\t* Determinates what is the current media of the component based on its width.\n\t* @private\n\t*/\n\t@property()\n\tmedia?: string;\n\n\t/**\n \t* Defines whether the illustration is decorative.\n\t*\n\t* When set to `true`, the attributes `role=\"presentation\"` and `aria-hidden=\"true\"` are applied to the SVG element.\n\t* @default false\n\t* @public\n \t* @since 2.10.0\n\t*/\n\t@property({ type: Boolean })\n\tdecorative = false;\n\n\t/**\n\t* Defines the title of the component.\n\t*\n\t* **Note:** Using this slot, the default title text of illustration and the value of `title` property will be overwritten.\n\t* @public\n\t* @since 1.7.0\n\t*/\n\t@slot({ type: HTMLElement })\n\ttitle!: Slot<HTMLElement> & string;\n\n\t/**\n\t* Defines the subtitle of the component.\n\t*\n\t* **Note:** Using this slot, the default subtitle text of illustration and the value of `subtitleText` property will be overwritten.\n\t* @public\n\t* @since 1.0.0-rc.16\n\t*/\n\t@slot({ type: HTMLElement })\n\tsubtitle!: Slot<HTMLElement>;\n\n\t/**\n\t* Defines the component actions.\n\t*\n\t* **Note:** Not displayed when the `design` property is set to `Base`.\n\t* @public\n\t*/\n\t@slot({ type: HTMLElement, \"default\": true })\n\tactions!: DefaultSlot<IButton>;\n\n\tillustrationTitle?: string;\n\tillustrationSubtitle?: string;\n\n\t@i18n(\"@ui5/webcomponents-fiori\")\n\tstatic i18nBundle: I18nBundle;\n\t_contentHeightForMedia: Record<string, number>;\n\t_handleResize: ResizeObserverCallback;\n\t_handleThemeLoaded: () => void;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._handleResize = this.handleResize.bind(this);\n\t\tthis._handleThemeLoaded = () => {\n\t\t\t// Cached content-height are theme-dependent, so clear them when the theme changes.\n\t\t\t// This hook is needed because `onInvalidation` does not fire when the theme changes\n\t\t\tthis._contentHeightForMedia = {};\n\t\t};\n\t\t// this will store the height of the inner content of the IllustratedMessage (illustration + title + subtitle + actions) for a given media (e.g. \"Spot\")\n\t\tthis._contentHeightForMedia = {};\n\t}\n\n\tstatic get BREAKPOINTS() {\n\t\treturn {\n\t\t\tDIALOG: 681,\n\t\t\tSPOT: 360,\n\t\t\tDOT: 260,\n\t\t\tBASE: 160,\n\t\t};\n\t}\n\n\tstatic get MEDIA() {\n\t\treturn {\n\t\t\tBASE: \"base\",\n\t\t\tDOT: \"dot\",\n\t\t\tSPOT: \"spot\",\n\t\t\tDIALOG: \"dialog\",\n\t\t\tSCENE: \"scene\",\n\t\t};\n\t}\n\n\tasync onBeforeRendering() {\n\t\t// Gets the current illustration name given in the \"name\" attribute\n\t\tlet effectiveName = getEffectiveIllustrationName(this.name);\n\t\tlet illustrationData = getIllustrationDataSync(effectiveName);\n\n\t\tif (this.hasAttribute(\"name\") && !this.isValidIllustration(effectiveName)) {\n\t\t\teffectiveName = getEffectiveIllustrationName(IllustrationMessageType.BeforeSearch);\n\t\t\t// eslint-disable-next-line\n\t\t\tconsole.warn(`The illustration \"${effectiveName!}\" does not exist. The default illustration \"${IllustrationMessageType.BeforeSearch}\" is loaded instead.`);\n\t\t}\n\n\t\tif (illustrationData === undefined) {\n\t\t\tillustrationData = await getIllustrationData(effectiveName);\n\t\t}\n\n\t\t// Check if illustration uses templates (safe variant)\n\t\tif (illustrationData && \"dotTemplate\" in illustrationData && illustrationData.dotTemplate) {\n\t\t\tthis.dotTemplate = executeTemplate(illustrationData.dotTemplate, this);\n\t\t}\n\t\tif (illustrationData && \"spotTemplate\" in illustrationData && illustrationData.spotTemplate) {\n\t\t\tthis.spotTemplate = executeTemplate(illustrationData.spotTemplate, this);\n\t\t}\n\t\tif (illustrationData && \"dialogTemplate\" in illustrationData && illustrationData.dialogTemplate) {\n\t\t\tthis.dialogTemplate = executeTemplate(illustrationData.dialogTemplate, this);\n\t\t}\n\t\tif (illustrationData && \"sceneTemplate\" in illustrationData && illustrationData.sceneTemplate) {\n\t\t\tthis.sceneTemplate = executeTemplate(illustrationData.sceneTemplate, this);\n\t\t}\n\n\t\t// Check if illustration uses SVG strings (unsafe variant)\n\t\tif (illustrationData && \"dotSvg\" in illustrationData) {\n\t\t\tthis.dotSvg = illustrationData.dotSvg;\n\t\t}\n\t\tif (illustrationData && \"spotSvg\" in illustrationData) {\n\t\t\tthis.spotSvg = illustrationData.spotSvg;\n\t\t}\n\t\tif (illustrationData && \"dialogSvg\" in illustrationData) {\n\t\t\tthis.dialogSvg = illustrationData.dialogSvg;\n\t\t}\n\t\tif (illustrationData && \"sceneSvg\" in illustrationData) {\n\t\t\tthis.sceneSvg = illustrationData.sceneSvg;\n\t\t}\n\n\t\tthis.illustrationTitle = IllustratedMessage.i18nBundle.getText(illustrationData!.title);\n\t\tthis.illustrationSubtitle = IllustratedMessage.i18nBundle.getText(illustrationData!.subtitle);\n\n\t\tif (this.design !== IllustrationMessageDesign.Auto) {\n\t\t\tthis._handleCustomSize();\n\t\t}\n\t}\n\n\tonEnterDOM() {\n\t\tResizeHandler.register(this, this._handleResize);\n\t\tattachThemeLoaded(this._handleThemeLoaded);\n\t}\n\n\tonExitDOM() {\n\t\tResizeHandler.deregister(this, this._handleResize);\n\t\tdetachThemeLoaded(this._handleThemeLoaded);\n\t}\n\n\tonInvalidation(changeInfo: ChangeInfo) {\n\t\tif (\n\t\t\t(changeInfo.type === \"property\" && [\"name\", \"titleText\", \"subtitleText\"].includes(changeInfo.name))\n\t\t\t|| (changeInfo.type === \"slot\" && [\"title\", \"subtitle\", \"default\"].includes(changeInfo.name))\n\t\t) {\n\t\t\tthis._contentHeightForMedia = {};\n\t\t}\n\t}\n\n\thandleResize() {\n\t\tif (this.design === IllustrationMessageDesign.Auto) {\n\t\t\tthis._checkHeightConstraints();\n\t\t\tthis._applyMedia();\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the current height of the component is enough to display the illustration, title, subtitle and actions.\n\t * If not, the minimum required height for the current media is stored in the `_contentHeightForMedia` object.\n\t * @private\n\t */\n\t_checkHeightConstraints() {\n\t\t// The `scrollHeight > clientHeight` guard is load-bearing: the cache must be populated ONLY\n\t\t// when the content genuinely overflows the container. When the host container has\n\t\t// `height: auto`, its clientHeight equals the content height and there is by definition no\n\t\t// real constraint — recording that height would falsely poison `_contentHeightForMedia` and\n\t\t// cause spurious downgrades on the next render (e.g. after a width shrink-and-grow).\n\t\tif (this.media && this.scrollHeight > this.clientHeight) { // needs vertical responsiveness\n\t\t\tconst innerEl = this.shadowRoot!.querySelector<HTMLElement>(\".ui5-illustrated-message-inner\");\n\t\t\tconst innerElHeight = innerEl ? innerEl.scrollHeight : 0;\n\t\t\tinnerElHeight && (this._contentHeightForMedia[this.media] = innerElHeight);\n\t\t}\n\t}\n\n\t_applyMedia() {\n\t\tconst width = this.offsetWidth;\n\t\tlet media = \"\",\n\t\t\tmediaIndex = -1;\n\n\t\tif (width <= IllustratedMessage.BREAKPOINTS.BASE) {\n\t\t\tmedia = IllustratedMessage.MEDIA.BASE;\n\t\t} else if (width <= IllustratedMessage.BREAKPOINTS.DOT) {\n\t\t\tmedia = IllustratedMessage.MEDIA.DOT;\n\t\t} else if (width <= IllustratedMessage.BREAKPOINTS.SPOT) {\n\t\t\tmedia = IllustratedMessage.MEDIA.SPOT;\n\t\t} else if (width <= IllustratedMessage.BREAKPOINTS.DIALOG) {\n\t\t\tmedia = IllustratedMessage.MEDIA.DIALOG;\n\t\t} else {\n\t\t\tmedia = IllustratedMessage.MEDIA.SCENE;\n\t\t}\n\n\t\tmediaIndex = Object.values(IllustratedMessage.MEDIA).indexOf(media);\n\n\t\twhile (mediaIndex > 0 && this._mediaExceedsContainerHeight(media)) {\n\t\t\tmediaIndex--;\n\t\t\tmedia = Object.values(IllustratedMessage.MEDIA)[mediaIndex];\n\t\t}\n\n\t\tthis.media = media;\n\t}\n\n\t_mediaExceedsContainerHeight(media: string): boolean {\n\t\treturn !!this._contentHeightForMedia[media] && this.clientHeight < this._contentHeightForMedia[media];\n\t}\n\n\t_setSVGAccAttrs() {\n\t\tconst svg = this.shadowRoot!.querySelector(\".ui5-illustrated-message-illustration svg\");\n\n\t\tif (!svg) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.decorative) {\n\t\t\tsvg.setAttribute(\"role\", \"presentation\");\n\t\t\tsvg.setAttribute(\"aria-hidden\", \"true\");\n\t\t\tsvg.removeAttribute(\"aria-label\");\n\t\t} else {\n\t\t\tsvg.removeAttribute(\"role\");\n\t\t\tsvg.removeAttribute(\"aria-hidden\");\n\n\t\t\t// Set aria-label only when not decorative and text exists\n\t\t\tif (this.ariaLabelText) {\n\t\t\t\tsvg.setAttribute(\"aria-label\", this.ariaLabelText);\n\t\t\t} else {\n\t\t\t\tsvg.removeAttribute(\"aria-label\");\n\t\t\t}\n\t\t}\n\t}\n\n\tonAfterRendering() {\n\t\tthis._setSVGAccAttrs();\n\t\tif (this.design !== IllustrationMessageDesign.Auto) {\n\t\t\treturn;\n\t\t}\n\t\tconst heightMeasurementNeeded = this.media && !(this.media in this._contentHeightForMedia);\n\t\tconst mightOverflow = this.scrollHeight > this.clientHeight;\n\t\tif (heightMeasurementNeeded || mightOverflow) {\n\t\t\tthis._checkHeightConstraints();\n\t\t\tthis._applyMedia();\n\t\t}\n\t}\n\n\t/**\n\t * Modifies the IM styles in accordance to the `size` property's value.\n\t * Note: The resize handler has no effect when size is different than \"Auto\".\n\t * @private\n\t * @since 1.5.0\n\t */\n\t_handleCustomSize() {\n\t\tswitch (this.design) {\n\t\tcase IllustrationMessageDesign.Base:\n\t\t\tthis.media = IllustratedMessage.MEDIA.BASE;\n\t\t\treturn;\n\t\tcase IllustrationMessageDesign.Dot:\n\t\t\tthis.media = IllustratedMessage.MEDIA.DOT;\n\t\t\treturn;\n\t\tcase IllustrationMessageDesign.Spot:\n\t\t\tthis.media = IllustratedMessage.MEDIA.SPOT;\n\t\t\treturn;\n\t\tcase IllustrationMessageDesign.Dialog:\n\t\t\tthis.media = IllustratedMessage.MEDIA.DIALOG;\n\t\t\treturn;\n\t\tcase IllustrationMessageDesign.ExtraSmall:\n\t\t\tthis.media = IllustratedMessage.MEDIA.DOT;\n\t\t\treturn;\n\t\tcase IllustrationMessageDesign.Small:\n\t\t\tthis.media = IllustratedMessage.MEDIA.SPOT;\n\t\t\treturn;\n\t\tcase IllustrationMessageDesign.Medium:\n\t\t\tthis.media = IllustratedMessage.MEDIA.DIALOG;\n\t\t\treturn;\n\t\tdefault:\n\t\t\tthis.media = IllustratedMessage.MEDIA.SCENE;\n\t\t}\n\t}\n\n\tget ariaLabelText(): string | undefined {\n\t\treturn getEffectiveAriaLabelText(this);\n\t}\n\n\tget effectiveIllustration(): string | object | undefined {\n\t\tswitch (this.media) {\n\t\tcase IllustratedMessage.MEDIA.DOT:\n\t\t\treturn this.dotTemplate || this.dotSvg;\n\t\tcase IllustratedMessage.MEDIA.SPOT:\n\t\t\treturn this.spotTemplate || this.spotSvg;\n\t\tcase IllustratedMessage.MEDIA.DIALOG:\n\t\t\treturn this.dialogTemplate || this.dialogSvg;\n\t\tcase IllustratedMessage.MEDIA.SCENE:\n\t\t\treturn this.sceneTemplate || this.sceneSvg;\n\t\tdefault:\n\t\t\treturn \"\";\n\t\t}\n\t}\n\n\tget hasFormattedSubtitle(): boolean {\n\t\treturn !!this.subtitle.length;\n\t}\n\n\tget hasFormattedTitle(): boolean {\n\t\treturn !!this.title.length;\n\t}\n\n\tget effectiveTitleText(): string | undefined {\n\t\treturn this.titleText ? this.titleText : this.illustrationTitle;\n\t}\n\n\tget effectiveSubitleText(): string | undefined {\n\t\treturn this.subtitleText ? this.subtitleText : this.illustrationSubtitle;\n\t}\n\n\tget hasTitle(): boolean {\n\t\treturn !!(this.hasFormattedTitle || this.titleText || this.illustrationTitle);\n\t}\n\n\tget hasSubtitle(): boolean {\n\t\treturn !!(this.hasFormattedSubtitle || this.subtitleText || this.illustrationSubtitle);\n\t}\n\n\tget hasActions(): boolean {\n\t\treturn !!this.actions.length && this.media !== IllustratedMessage.MEDIA.BASE;\n\t}\n\n\tisValidIllustration(currentIllustration: string): boolean {\n\t\tcurrentIllustration = currentIllustration.startsWith(\"tnt/\") ? currentIllustration.replace(\"tnt/\", \"Tnt\") : currentIllustration.replace(\"fiori/\", \"\");\n\n\t\treturn currentIllustration in IllustrationMessageType;\n\t}\n}\n\nIllustratedMessage.define();\n\nexport default IllustratedMessage;\n"]}
@@ -5,6 +5,6 @@ import Button from "@ui5/webcomponents/dist/Button.js";
5
5
  export default function MediaGalleryTemplate() {
6
6
  return (_jsxs("div", { class: "ui5-media-gallery-root", children: [_jsx("div", { class: "ui5-media-gallery-display-wrapper", children: _jsx("div", { class: "ui5-media-gallery-display", onClick: this._onDisplayAreaClick, children: this._isPhonePlatform
7
7
  ? _jsx(Carousel, { onNavigate: this._onCarouselNavigate, hideNavigationArrows: true, children: this._selectableItems.map(item => _jsx("slot", { name: item._individualSlot })) })
8
- : _jsx(MediaGalleryItem, { _interactive: this.interactiveDisplayArea, _square: this._shouldHaveSquareDisplay, tabIndex: this._mainItemTabIndex }) }) }), this._showThumbnails && _jsx("div", { class: "ui5-media-gallery-thumbnails-wrapper", children: _jsxs("ul", { children: [this._visibleItems.map(item => _jsx("li", { id: item.id, class: "ui5-media-gallery-thumbnail", role: "option", onClick: this._onThumbnailClick, children: _jsx("slot", { name: item._individualSlot }) })), this._showOverflowBtn && _jsx("li", { class: "ui5-media-gallery-overflow", children: _jsxs(Button, { onClick: this._onOverflowBtnClick, children: ["+", this._overflowSize] }) })] }) })] }));
8
+ : _jsx(MediaGalleryItem, { _interactive: this.interactiveDisplayArea, _square: this._shouldHaveSquareDisplay, tabIndex: this._mainItemTabIndex }) }) }), this._showThumbnails && _jsx("div", { class: "ui5-media-gallery-thumbnails-wrapper", children: _jsxs("ul", { role: "listbox", children: [this._visibleItems.map(item => _jsx("li", { id: item.id, class: "ui5-media-gallery-thumbnail", role: "option", "aria-checked": item.selected, onClick: this._onThumbnailClick, children: _jsx("slot", { name: item._individualSlot }) })), this._showOverflowBtn && _jsx("li", { class: "ui5-media-gallery-overflow", role: "option", "aria-checked": "false", children: _jsxs(Button, { onClick: this._onOverflowBtnClick, children: ["+", this._overflowSize] }) })] }) })] }));
9
9
  }
10
10
  //# sourceMappingURL=MediaGalleryTemplate.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MediaGalleryTemplate.js","sourceRoot":"","sources":["../src/MediaGalleryTemplate.tsx"],"names":[],"mappings":";AACA,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AACrD,OAAO,QAAQ,MAAM,qCAAqC,CAAC;AAC3D,OAAO,MAAM,MAAM,mCAAmC,CAAC;AAEvD,MAAM,CAAC,OAAO,UAAU,oBAAoB;IAC3C,OAAO,CACN,eAAK,KAAK,EAAC,wBAAwB,aAClC,cAAK,KAAK,EAAC,mCAAmC,YAC7C,cAAK,KAAK,EAAC,2BAA2B,EACrC,OAAO,EAAE,IAAI,CAAC,mBAAmB,YAChC,IAAI,CAAC,gBAAgB;wBACrB,CAAC,CAAC,KAAC,QAAQ,IACV,UAAU,EAAE,IAAI,CAAC,mBAAmB,EACpC,oBAAoB,EAAE,IAAI,YAEzB,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CACjC,eAAM,IAAI,EAAE,IAAI,CAAC,eAAe,GAAS,CACzC,GACS;wBACX,CAAC,CAAC,KAAC,gBAAgB,IAClB,YAAY,EAAE,IAAI,CAAC,sBAAsB,EACzC,OAAO,EAAE,IAAI,CAAC,wBAAwB,EACtC,QAAQ,EAAE,IAAI,CAAC,iBAAiB,GACb,GAEhB,GACD,EAEL,IAAI,CAAC,eAAe,IAAI,cAAK,KAAK,EAAC,sCAAsC,YACzE,yBACE,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAC9B,aAAI,EAAE,EAAE,IAAI,CAAC,EAAE,EACd,KAAK,EAAC,6BAA6B,EACnC,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,IAAI,CAAC,iBAAiB,YAE/B,eAAM,IAAI,EAAE,IAAI,CAAC,eAAe,GAAS,GACrC,CACL,EACA,IAAI,CAAC,gBAAgB,IAAI,aAAI,KAAK,EAAC,4BAA4B,YAC/D,MAAC,MAAM,IAAC,OAAO,EAAE,IAAI,CAAC,mBAAmB,kBACtC,IAAI,CAAC,aAAa,IACZ,GACL,IACD,GACA,IACD,CACN,CAAC;AACH,CAAC","sourcesContent":["import type MediaGallery from \"./MediaGallery.js\";\nimport MediaGalleryItem from \"./MediaGalleryItem.js\";\nimport Carousel from \"@ui5/webcomponents/dist/Carousel.js\";\nimport Button from \"@ui5/webcomponents/dist/Button.js\";\n\nexport default function MediaGalleryTemplate(this: MediaGallery) {\n\treturn (\n\t\t<div class=\"ui5-media-gallery-root\">\n\t\t\t<div class=\"ui5-media-gallery-display-wrapper\">\n\t\t\t\t<div class=\"ui5-media-gallery-display\"\n\t\t\t\t\tonClick={this._onDisplayAreaClick}>\n\t\t\t\t\t{this._isPhonePlatform\n\t\t\t\t\t\t? <Carousel\n\t\t\t\t\t\t\tonNavigate={this._onCarouselNavigate}\n\t\t\t\t\t\t\thideNavigationArrows={true}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{this._selectableItems.map(item =>\n\t\t\t\t\t\t\t\t<slot name={item._individualSlot}></slot>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</Carousel>\n\t\t\t\t\t\t: <MediaGalleryItem\n\t\t\t\t\t\t\t_interactive={this.interactiveDisplayArea}\n\t\t\t\t\t\t\t_square={this._shouldHaveSquareDisplay}\n\t\t\t\t\t\t\ttabIndex={this._mainItemTabIndex}\n\t\t\t\t\t\t></MediaGalleryItem>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t{this._showThumbnails && <div class=\"ui5-media-gallery-thumbnails-wrapper\">\n\t\t\t\t<ul>\n\t\t\t\t\t{this._visibleItems.map(item =>\n\t\t\t\t\t\t<li id={item.id}\n\t\t\t\t\t\t\tclass=\"ui5-media-gallery-thumbnail\"\n\t\t\t\t\t\t\trole=\"option\"\n\t\t\t\t\t\t\tonClick={this._onThumbnailClick}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<slot name={item._individualSlot}></slot>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t)}\n\t\t\t\t\t{this._showOverflowBtn && <li class=\"ui5-media-gallery-overflow\">\n\t\t\t\t\t\t<Button onClick={this._onOverflowBtnClick}>\n\t\t\t\t\t\t\t+{this._overflowSize}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</li>}\n\t\t\t\t</ul>\n\t\t\t</div>}\n\t\t</div>\n\t);\n}\n"]}
1
+ {"version":3,"file":"MediaGalleryTemplate.js","sourceRoot":"","sources":["../src/MediaGalleryTemplate.tsx"],"names":[],"mappings":";AACA,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AACrD,OAAO,QAAQ,MAAM,qCAAqC,CAAC;AAC3D,OAAO,MAAM,MAAM,mCAAmC,CAAC;AAEvD,MAAM,CAAC,OAAO,UAAU,oBAAoB;IAC3C,OAAO,CACN,eAAK,KAAK,EAAC,wBAAwB,aAClC,cAAK,KAAK,EAAC,mCAAmC,YAC7C,cAAK,KAAK,EAAC,2BAA2B,EACrC,OAAO,EAAE,IAAI,CAAC,mBAAmB,YAChC,IAAI,CAAC,gBAAgB;wBACrB,CAAC,CAAC,KAAC,QAAQ,IACV,UAAU,EAAE,IAAI,CAAC,mBAAmB,EACpC,oBAAoB,EAAE,IAAI,YAEzB,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CACjC,eAAM,IAAI,EAAE,IAAI,CAAC,eAAe,GAAS,CACzC,GACS;wBACX,CAAC,CAAC,KAAC,gBAAgB,IAClB,YAAY,EAAE,IAAI,CAAC,sBAAsB,EACzC,OAAO,EAAE,IAAI,CAAC,wBAAwB,EACtC,QAAQ,EAAE,IAAI,CAAC,iBAAiB,GACb,GAEhB,GACD,EAEL,IAAI,CAAC,eAAe,IAAI,cAAK,KAAK,EAAC,sCAAsC,YACzE,cAAI,IAAI,EAAC,SAAS,aAChB,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAC9B,aAAI,EAAE,EAAE,IAAI,CAAC,EAAE,EACd,KAAK,EAAC,6BAA6B,EACnC,IAAI,EAAC,QAAQ,kBACC,IAAI,CAAC,QAAQ,EAC3B,OAAO,EAAE,IAAI,CAAC,iBAAiB,YAE/B,eAAM,IAAI,EAAE,IAAI,CAAC,eAAe,GAAS,GACrC,CACL,EACA,IAAI,CAAC,gBAAgB,IAAI,aAAI,KAAK,EAAC,4BAA4B,EAC/D,IAAI,EAAC,QAAQ,kBACA,OAAO,YAEpB,MAAC,MAAM,IAAC,OAAO,EAAE,IAAI,CAAC,mBAAmB,kBACtC,IAAI,CAAC,aAAa,IACZ,GACL,IACD,GACA,IACD,CACN,CAAC;AACH,CAAC","sourcesContent":["import type MediaGallery from \"./MediaGallery.js\";\nimport MediaGalleryItem from \"./MediaGalleryItem.js\";\nimport Carousel from \"@ui5/webcomponents/dist/Carousel.js\";\nimport Button from \"@ui5/webcomponents/dist/Button.js\";\n\nexport default function MediaGalleryTemplate(this: MediaGallery) {\n\treturn (\n\t\t<div class=\"ui5-media-gallery-root\">\n\t\t\t<div class=\"ui5-media-gallery-display-wrapper\">\n\t\t\t\t<div class=\"ui5-media-gallery-display\"\n\t\t\t\t\tonClick={this._onDisplayAreaClick}>\n\t\t\t\t\t{this._isPhonePlatform\n\t\t\t\t\t\t? <Carousel\n\t\t\t\t\t\t\tonNavigate={this._onCarouselNavigate}\n\t\t\t\t\t\t\thideNavigationArrows={true}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{this._selectableItems.map(item =>\n\t\t\t\t\t\t\t\t<slot name={item._individualSlot}></slot>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</Carousel>\n\t\t\t\t\t\t: <MediaGalleryItem\n\t\t\t\t\t\t\t_interactive={this.interactiveDisplayArea}\n\t\t\t\t\t\t\t_square={this._shouldHaveSquareDisplay}\n\t\t\t\t\t\t\ttabIndex={this._mainItemTabIndex}\n\t\t\t\t\t\t></MediaGalleryItem>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t{this._showThumbnails && <div class=\"ui5-media-gallery-thumbnails-wrapper\">\n\t\t\t\t<ul role=\"listbox\">\n\t\t\t\t\t{this._visibleItems.map(item =>\n\t\t\t\t\t\t<li id={item.id}\n\t\t\t\t\t\t\tclass=\"ui5-media-gallery-thumbnail\"\n\t\t\t\t\t\t\trole=\"option\"\n\t\t\t\t\t\t\taria-checked={item.selected}\n\t\t\t\t\t\t\tonClick={this._onThumbnailClick}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<slot name={item._individualSlot}></slot>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t)}\n\t\t\t\t\t{this._showOverflowBtn && <li class=\"ui5-media-gallery-overflow\"\n\t\t\t\t\t\trole=\"option\"\n\t\t\t\t\t\taria-checked=\"false\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button onClick={this._onOverflowBtnClick}>\n\t\t\t\t\t\t\t+{this._overflowSize}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</li>}\n\t\t\t\t</ul>\n\t\t\t</div>}\n\t\t</div>\n\t);\n}\n"]}
package/dist/ShellBar.js CHANGED
@@ -463,6 +463,7 @@ let ShellBar = ShellBar_1 = class ShellBar extends UI5Element {
463
463
  getSearchState: () => this.enabledFeatures.search && this.showSearchField,
464
464
  getCSSVariable: (cssVar) => this.getCSSVariable(cssVar),
465
465
  setSearchState: (expanded) => this.setSearchState(expanded),
466
+ handleSearchButtonClick: () => this.handleSearchButtonClick(),
466
467
  getOverflowed: () => this.overflow.isOverflowing(this.overflowOuter, this.overflowInner),
467
468
  };
468
469
  }
@@ -473,7 +474,9 @@ let ShellBar = ShellBar_1 = class ShellBar extends UI5Element {
473
474
  return this._searchAdaptorLegacy;
474
475
  }
475
476
  handleSearchButtonClick() {
476
- const searchButton = this.shadowRoot.querySelector(".ui5-shellbar-search-button");
477
+ const searchButton = this.isSelfCollapsibleSearch
478
+ ? this.search?.shadowRoot?.querySelector(".ui5-shell-search-field-button") ?? null
479
+ : this.shadowRoot.querySelector(".ui5-shellbar-search-button");
477
480
  const defaultPrevented = !this.fireDecoratorEvent("search-button-click", {
478
481
  targetRef: searchButton,
479
482
  searchFieldVisible: this.showSearchField,
@@ -686,6 +689,9 @@ let ShellBar = ShellBar_1 = class ShellBar extends UI5Element {
686
689
  */
687
690
  async getSearchButtonDomRef() {
688
691
  await renderFinished();
692
+ if (this.isSelfCollapsibleSearch) {
693
+ return this.search.getSearchButtonDomRef();
694
+ }
689
695
  return this.shadowRoot.querySelector(`*[data-ui5-stable="toggle-search"]`);
690
696
  }
691
697
  _fireClickEvent(eventName, domRef) {