@ui5/webcomponents-fiori 2.27.0-rc.1 → 2.27.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 (206) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +3 -0
  3. package/dist/.tsbuildinfo +1 -1
  4. package/dist/DynamicPage.d.ts +1 -0
  5. package/dist/DynamicPage.js +5 -0
  6. package/dist/DynamicPage.js.map +1 -1
  7. package/dist/DynamicPageTemplate.js +2 -2
  8. package/dist/DynamicPageTemplate.js.map +1 -1
  9. package/dist/Search.d.ts +21 -0
  10. package/dist/Search.js +49 -9
  11. package/dist/Search.js.map +1 -1
  12. package/dist/ShellBarItemTemplate.js +1 -1
  13. package/dist/ShellBarItemTemplate.js.map +1 -1
  14. package/dist/ShellBarSearch.js +1 -1
  15. package/dist/ShellBarSearch.js.map +1 -1
  16. package/dist/Timeline.d.ts +1 -0
  17. package/dist/Timeline.js +10 -0
  18. package/dist/Timeline.js.map +1 -1
  19. package/dist/UserSettingsItem.d.ts +5 -0
  20. package/dist/UserSettingsItem.js +21 -0
  21. package/dist/UserSettingsItem.js.map +1 -1
  22. package/dist/UserSettingsNotificationsView.d.ts +82 -0
  23. package/dist/UserSettingsNotificationsView.js +167 -0
  24. package/dist/UserSettingsNotificationsView.js.map +1 -0
  25. package/dist/UserSettingsNotificationsViewGroup.d.ts +29 -0
  26. package/dist/UserSettingsNotificationsViewGroup.js +49 -0
  27. package/dist/UserSettingsNotificationsViewGroup.js.map +1 -0
  28. package/dist/UserSettingsNotificationsViewItem.d.ts +100 -0
  29. package/dist/UserSettingsNotificationsViewItem.js +186 -0
  30. package/dist/UserSettingsNotificationsViewItem.js.map +1 -0
  31. package/dist/UserSettingsNotificationsViewItemTemplate.d.ts +2 -0
  32. package/dist/UserSettingsNotificationsViewItemTemplate.js +28 -0
  33. package/dist/UserSettingsNotificationsViewItemTemplate.js.map +1 -0
  34. package/dist/UserSettingsNotificationsViewTemplate.d.ts +2 -0
  35. package/dist/UserSettingsNotificationsViewTemplate.js +6 -0
  36. package/dist/UserSettingsNotificationsViewTemplate.js.map +1 -0
  37. package/dist/WizardTab.d.ts +1 -0
  38. package/dist/WizardTab.js +7 -1
  39. package/dist/WizardTab.js.map +1 -1
  40. package/dist/bundle.esm.js +3 -0
  41. package/dist/bundle.esm.js.map +1 -1
  42. package/dist/css/themes/DynamicPage.css +1 -1
  43. package/dist/css/themes/ShellBarItem.css +1 -1
  44. package/dist/css/themes/ShellBarPopover.css +1 -1
  45. package/dist/css/themes/TimelineGroupItem.css +1 -1
  46. package/dist/css/themes/TimelineItem.css +1 -1
  47. package/dist/css/themes/UserSettingsNotificationsView.css +1 -0
  48. package/dist/css/themes/UserSettingsNotificationsViewGroup.css +1 -0
  49. package/dist/css/themes/UserSettingsNotificationsViewItem.css +1 -0
  50. package/dist/css/themes/WizardTab.css +1 -1
  51. package/dist/custom-elements-internal.json +892 -8
  52. package/dist/custom-elements.json +700 -8
  53. package/dist/generated/assets/i18n/messagebundle_ar.json +1 -1
  54. package/dist/generated/assets/i18n/messagebundle_bg.json +1 -1
  55. package/dist/generated/assets/i18n/messagebundle_ca.json +1 -1
  56. package/dist/generated/assets/i18n/messagebundle_cnr.json +1 -1
  57. package/dist/generated/assets/i18n/messagebundle_cs.json +1 -1
  58. package/dist/generated/assets/i18n/messagebundle_cy.json +1 -1
  59. package/dist/generated/assets/i18n/messagebundle_da.json +1 -1
  60. package/dist/generated/assets/i18n/messagebundle_de.json +1 -1
  61. package/dist/generated/assets/i18n/messagebundle_el.json +1 -1
  62. package/dist/generated/assets/i18n/messagebundle_en.json +1 -1
  63. package/dist/generated/assets/i18n/messagebundle_en_GB.json +1 -1
  64. package/dist/generated/assets/i18n/messagebundle_en_US_sappsd.json +1 -1
  65. package/dist/generated/assets/i18n/messagebundle_en_US_saprigi.json +1 -1
  66. package/dist/generated/assets/i18n/messagebundle_en_US_saptrc.json +1 -1
  67. package/dist/generated/assets/i18n/messagebundle_es.json +1 -1
  68. package/dist/generated/assets/i18n/messagebundle_es_MX.json +1 -1
  69. package/dist/generated/assets/i18n/messagebundle_et.json +1 -1
  70. package/dist/generated/assets/i18n/messagebundle_fi.json +1 -1
  71. package/dist/generated/assets/i18n/messagebundle_fr.json +1 -1
  72. package/dist/generated/assets/i18n/messagebundle_fr_CA.json +1 -1
  73. package/dist/generated/assets/i18n/messagebundle_hi.json +1 -1
  74. package/dist/generated/assets/i18n/messagebundle_hr.json +1 -1
  75. package/dist/generated/assets/i18n/messagebundle_hu.json +1 -1
  76. package/dist/generated/assets/i18n/messagebundle_id.json +1 -1
  77. package/dist/generated/assets/i18n/messagebundle_it.json +1 -1
  78. package/dist/generated/assets/i18n/messagebundle_iw.json +1 -1
  79. package/dist/generated/assets/i18n/messagebundle_ja.json +1 -1
  80. package/dist/generated/assets/i18n/messagebundle_kk.json +1 -1
  81. package/dist/generated/assets/i18n/messagebundle_ko.json +1 -1
  82. package/dist/generated/assets/i18n/messagebundle_lt.json +1 -1
  83. package/dist/generated/assets/i18n/messagebundle_lv.json +1 -1
  84. package/dist/generated/assets/i18n/messagebundle_mk.json +1 -1
  85. package/dist/generated/assets/i18n/messagebundle_ms.json +1 -1
  86. package/dist/generated/assets/i18n/messagebundle_nl.json +1 -1
  87. package/dist/generated/assets/i18n/messagebundle_no.json +1 -1
  88. package/dist/generated/assets/i18n/messagebundle_pl.json +1 -1
  89. package/dist/generated/assets/i18n/messagebundle_pt.json +1 -1
  90. package/dist/generated/assets/i18n/messagebundle_pt_PT.json +1 -1
  91. package/dist/generated/assets/i18n/messagebundle_ro.json +1 -1
  92. package/dist/generated/assets/i18n/messagebundle_ru.json +1 -1
  93. package/dist/generated/assets/i18n/messagebundle_sh.json +1 -1
  94. package/dist/generated/assets/i18n/messagebundle_sk.json +1 -1
  95. package/dist/generated/assets/i18n/messagebundle_sl.json +1 -1
  96. package/dist/generated/assets/i18n/messagebundle_sr.json +1 -1
  97. package/dist/generated/assets/i18n/messagebundle_sv.json +1 -1
  98. package/dist/generated/assets/i18n/messagebundle_th.json +1 -1
  99. package/dist/generated/assets/i18n/messagebundle_tr.json +1 -1
  100. package/dist/generated/assets/i18n/messagebundle_uk.json +1 -1
  101. package/dist/generated/assets/i18n/messagebundle_vi.json +1 -1
  102. package/dist/generated/assets/i18n/messagebundle_zh_CN.json +1 -1
  103. package/dist/generated/assets/i18n/messagebundle_zh_TW.json +1 -1
  104. package/dist/generated/i18n/i18n-defaults.d.ts +3 -1
  105. package/dist/generated/i18n/i18n-defaults.js +3 -1
  106. package/dist/generated/i18n/i18n-defaults.js.map +1 -1
  107. package/dist/generated/themes/DynamicPage.css.d.ts +1 -1
  108. package/dist/generated/themes/DynamicPage.css.js +1 -1
  109. package/dist/generated/themes/DynamicPage.css.js.map +1 -1
  110. package/dist/generated/themes/ShellBarItem.css.d.ts +1 -1
  111. package/dist/generated/themes/ShellBarItem.css.js +1 -1
  112. package/dist/generated/themes/ShellBarItem.css.js.map +1 -1
  113. package/dist/generated/themes/ShellBarPopover.css.d.ts +1 -1
  114. package/dist/generated/themes/ShellBarPopover.css.js +1 -1
  115. package/dist/generated/themes/ShellBarPopover.css.js.map +1 -1
  116. package/dist/generated/themes/TimelineGroupItem.css.d.ts +1 -1
  117. package/dist/generated/themes/TimelineGroupItem.css.js +1 -1
  118. package/dist/generated/themes/TimelineGroupItem.css.js.map +1 -1
  119. package/dist/generated/themes/TimelineItem.css.d.ts +1 -1
  120. package/dist/generated/themes/TimelineItem.css.js +1 -1
  121. package/dist/generated/themes/TimelineItem.css.js.map +1 -1
  122. package/dist/generated/themes/UserSettingsNotificationsView.css.d.ts +2 -0
  123. package/dist/generated/themes/UserSettingsNotificationsView.css.js +8 -0
  124. package/dist/generated/themes/UserSettingsNotificationsView.css.js.map +1 -0
  125. package/dist/generated/themes/UserSettingsNotificationsViewGroup.css.d.ts +2 -0
  126. package/dist/generated/themes/UserSettingsNotificationsViewGroup.css.js +8 -0
  127. package/dist/generated/themes/UserSettingsNotificationsViewGroup.css.js.map +1 -0
  128. package/dist/generated/themes/UserSettingsNotificationsViewItem.css.d.ts +2 -0
  129. package/dist/generated/themes/UserSettingsNotificationsViewItem.css.js +8 -0
  130. package/dist/generated/themes/UserSettingsNotificationsViewItem.css.js.map +1 -0
  131. package/dist/generated/themes/WizardTab.css.d.ts +1 -1
  132. package/dist/generated/themes/WizardTab.css.js +1 -1
  133. package/dist/generated/themes/WizardTab.css.js.map +1 -1
  134. package/dist/shellbar/ShellBarSearch.d.ts +1 -0
  135. package/dist/shellbar/ShellBarSearch.js +3 -2
  136. package/dist/shellbar/ShellBarSearch.js.map +1 -1
  137. package/dist/shellbar/ShellBarSearchLegacy.js +2 -1
  138. package/dist/shellbar/ShellBarSearchLegacy.js.map +1 -1
  139. package/dist/vscode.html-custom-data.json +60 -0
  140. package/dist/web-types.json +161 -1
  141. package/package.json +7 -7
  142. package/src/DynamicPageTemplate.tsx +6 -2
  143. package/src/ShellBarItemTemplate.tsx +4 -4
  144. package/src/UserSettingsNotificationsViewItemTemplate.tsx +73 -0
  145. package/src/UserSettingsNotificationsViewTemplate.tsx +26 -0
  146. package/src/i18n/messagebundle.properties +7 -1
  147. package/src/i18n/messagebundle_ar.properties +6 -0
  148. package/src/i18n/messagebundle_bg.properties +6 -0
  149. package/src/i18n/messagebundle_ca.properties +6 -0
  150. package/src/i18n/messagebundle_cnr.properties +6 -0
  151. package/src/i18n/messagebundle_cs.properties +6 -0
  152. package/src/i18n/messagebundle_cy.properties +6 -0
  153. package/src/i18n/messagebundle_da.properties +6 -0
  154. package/src/i18n/messagebundle_de.properties +6 -0
  155. package/src/i18n/messagebundle_el.properties +6 -0
  156. package/src/i18n/messagebundle_en.properties +6 -0
  157. package/src/i18n/messagebundle_en_GB.properties +6 -0
  158. package/src/i18n/messagebundle_en_US_sappsd.properties +6 -0
  159. package/src/i18n/messagebundle_en_US_saprigi.properties +6 -0
  160. package/src/i18n/messagebundle_en_US_saptrc.properties +6 -0
  161. package/src/i18n/messagebundle_es.properties +6 -0
  162. package/src/i18n/messagebundle_es_MX.properties +6 -0
  163. package/src/i18n/messagebundle_et.properties +6 -0
  164. package/src/i18n/messagebundle_fi.properties +6 -0
  165. package/src/i18n/messagebundle_fr.properties +7 -1
  166. package/src/i18n/messagebundle_fr_CA.properties +6 -0
  167. package/src/i18n/messagebundle_hi.properties +6 -0
  168. package/src/i18n/messagebundle_hr.properties +6 -0
  169. package/src/i18n/messagebundle_hu.properties +6 -0
  170. package/src/i18n/messagebundle_id.properties +6 -0
  171. package/src/i18n/messagebundle_it.properties +6 -0
  172. package/src/i18n/messagebundle_iw.properties +6 -0
  173. package/src/i18n/messagebundle_ja.properties +6 -0
  174. package/src/i18n/messagebundle_kk.properties +6 -0
  175. package/src/i18n/messagebundle_ko.properties +6 -0
  176. package/src/i18n/messagebundle_lt.properties +6 -0
  177. package/src/i18n/messagebundle_lv.properties +6 -0
  178. package/src/i18n/messagebundle_mk.properties +6 -0
  179. package/src/i18n/messagebundle_ms.properties +6 -0
  180. package/src/i18n/messagebundle_nl.properties +6 -0
  181. package/src/i18n/messagebundle_no.properties +6 -0
  182. package/src/i18n/messagebundle_pl.properties +6 -0
  183. package/src/i18n/messagebundle_pt.properties +6 -0
  184. package/src/i18n/messagebundle_pt_PT.properties +6 -0
  185. package/src/i18n/messagebundle_ro.properties +6 -0
  186. package/src/i18n/messagebundle_ru.properties +6 -0
  187. package/src/i18n/messagebundle_sh.properties +6 -0
  188. package/src/i18n/messagebundle_sk.properties +6 -0
  189. package/src/i18n/messagebundle_sl.properties +6 -0
  190. package/src/i18n/messagebundle_sr.properties +6 -0
  191. package/src/i18n/messagebundle_sv.properties +6 -0
  192. package/src/i18n/messagebundle_th.properties +6 -0
  193. package/src/i18n/messagebundle_tr.properties +6 -0
  194. package/src/i18n/messagebundle_uk.properties +6 -0
  195. package/src/i18n/messagebundle_vi.properties +6 -0
  196. package/src/i18n/messagebundle_zh_CN.properties +6 -0
  197. package/src/i18n/messagebundle_zh_TW.properties +6 -0
  198. package/src/themes/DynamicPage.css +6 -0
  199. package/src/themes/ShellBarItem.css +34 -16
  200. package/src/themes/ShellBarPopover.css +0 -26
  201. package/src/themes/TimelineGroupItem.css +1 -0
  202. package/src/themes/TimelineItem.css +9 -0
  203. package/src/themes/UserSettingsNotificationsView.css +22 -0
  204. package/src/themes/UserSettingsNotificationsViewGroup.css +8 -0
  205. package/src/themes/UserSettingsNotificationsViewItem.css +152 -0
  206. package/src/themes/WizardTab.css +2 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ShellBarSearch.js","sourceRoot":"","sources":["../src/ShellBarSearch.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC;AACjE,OAAO,sBAAsB,MAAM,6BAA6B,CAAC;AACjE,OAAO,iBAAiB,MAAM,0CAA0C,CAAC;AAEzE,OAAO,EACN,wBAAwB,EACxB,wBAAwB,EACxB,yBAAyB,GACzB,MAAM,mCAAmC,CAAC;AAE3C;;;;;;;;GAQG;AAUH,IAAM,cAAc,sBAApB,MAAM,cAAe,SAAQ,MAAM;IAAnC;;QACC;;;;WAIG;QAEH,aAAQ,GAAG,KAAK,CAAC;IAuFlB,CAAC;IArFA,sBAAsB;QACrB,IAAI,OAAO,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YAC5B,IAAI,CAAC,kBAAkB,EAAE,CAAC;YAC1B,IAAI,CAAC,wBAAwB,EAAE,CAAC;YAChC,OAAO;QACR,CAAC;QAED,KAAK,CAAC,sBAAsB,EAAE,CAAC;QAE/B,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACpB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;QACxB,CAAC;aAAM,IAAI,CAAC,IAAI,CAAC,KAAK,EA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QAE/B,OAAO,OAAO,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,aAAa,CAAmB,gCAAgC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC;IAClH,CAAC;IAED,qBAAqB;QACpB,OAAO,IAAI,CAAC,UAAU,EAAE,aAAa,CAAc,gCAAgC,CAAC,IAAI,IAAI,CAAC;IAC9F,CAAC;IAED,UAAU;QACT,KAAK,CAAC,UAAU,EAAE,CAAC;QAEnB,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;YACjB,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;QACjC,CAAC;IACF,CAAC;IAED,iBAAiB;QAChB,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAE1B,IAAI,OAAO,EAAE,EAAE,CAAC;YACf,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACvB,CAAC;IACF,CAAC;CACD,CAAA;AAvFA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;gDACX;AAPZ,cAAc;IATnB,aAAa,CAAC;QACd,GAAG,EAAE,qBAAqB;QAC1B,QAAQ,EAAE,sBAAsB;QAChC,MAAM,EAAE;YACP,MAAM,CAAC,MAAM;YACb,iBAAiB;SACjB;KACD,CAAC;GAEI,cAAc,CA8FnB;AAED,cAAc,CAAC,MAAM,EAAE,CAAC;AAExB,eAAe,cAAc,CAAC","sourcesContent":["import property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport Search from \"./Search.js\";\nimport { isPhone } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport ShellBarSearchTemplate from \"./ShellBarSearchTemplate.js\";\nimport ShellBarSearchCss from \"./generated/themes/ShellBarSearch.css.js\";\n\nimport {\n\tSEARCH_FIELD_SEARCH_ICON,\n\tSHELLBAR_SEARCH_EXPANDED,\n\tSHELLBAR_SEARCH_COLLAPSED,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n/**\n * @class\n * Search field for the ShellBar component.\n * @constructor\n * @extends Search\n * @public\n * @since 2.10.0\n * @experimental\n */\n@customElement({\n\ttag: \"ui5-shellbar-search\",\n\ttemplate: ShellBarSearchTemplate,\n\tstyles: [\n\t\tSearch.styles,\n\t\tShellBarSearchCss,\n\t],\n})\n\nclass ShellBarSearch extends Search {\n\t/**\n\t * Indicates whether the suggestions popover should be opened on focus.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tautoOpen = false;\n\n\t_handleSearchIconPress() {\n\t\tif (isPhone() && this.open) {\n\t\t\tthis._handleSearchEvent();\n\t\t\tthis._closePopupAndResetState();\n\t\t\treturn;\n\t\t}\n\n\t\tsuper._handleSearchIconPress();\n\n\t\tif (this.collapsed) {\n\t\t\tthis.collapsed = false;\n\t\t} else if (!this.value) {\n\t\t\tthis.collapsed = true;\n\t\t}\n\t}\n\n\t_handleEnter() {\n\t\tif (!this.value && !this.collapsed) {\n\t\t\t// Fire `ui5-search` so a host ShellBar collapses in sync; also collapse\n\t\t\t// locally for standalone usage (host converges on the same state).\n\t\t\tthis._handleSearchEvent();\n\t\t\tthis.collapsed = true;\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.focus();\n\t\t\t}, 0);\n\t\t} else {\n\t\t\tsuper._handleEnter();\n\t\t}\n\t}\n\n\t_onFocusOutSearch(e: FocusEvent) {\n\t\tif (isPhone()) {\n\t\t\treturn;\n\t\t}\n\n\t\tsuper._onFocusOutSearch(e);\n\t}\n\n\t_handleInput(e: InputEvent) {\n\t\tsuper._handleInput(e);\n\n\t\tif (isPhone()) {\n\t\t\tthis._performItemSelectionOnMobile = this._shouldPerformSelectionOnMobile(e.inputType);\n\t\t}\n\t}\n\n\tget _effectiveIconTooltip() {\n\t\tif (this.collapsed) {\n\t\t\treturn ShellBarSearch.i18nBundle.getText(SHELLBAR_SEARCH_COLLAPSED);\n\t\t}\n\n\t\tif (this.value) {\n\t\t\treturn ShellBarSearch.i18nBundle.getText(SEARCH_FIELD_SEARCH_ICON);\n\t\t}\n\n\t\treturn ShellBarSearch.i18nBundle.getText(SHELLBAR_SEARCH_EXPANDED);\n\t}\n\n\tget nativeInput() {\n\t\tconst domRef = this.shadowRoot;\n\n\t\treturn isPhone() ? domRef?.querySelector<HTMLInputElement>(`[ui5-responsive-popover] input`) : super.nativeInput;\n\t}\n\n\tgetSearchButtonDomRef(): HTMLElement | null {\n\t\treturn this.shadowRoot?.querySelector<HTMLElement>(\".ui5-shell-search-field-button\") ?? null;\n\t}\n\n\t_onfocusin() {\n\t\tsuper._onfocusin();\n\n\t\tif (this.autoOpen) {\n\t\t\tthis.open = true;\n\t\t\tthis.fireDecoratorEvent(\"open\");\n\t\t}\n\t}\n\n\tonBeforeRendering(): void {\n\t\tsuper.onBeforeRendering();\n\n\t\tif (isPhone()) {\n\t\t\tthis.collapsed = true;\n\t\t}\n\t}\n}\n\nShellBarSearch.define();\n\nexport default ShellBarSearch;\n"]}
1
+ {"version":3,"file":"ShellBarSearch.js","sourceRoot":"","sources":["../src/ShellBarSearch.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC;AACjE,OAAO,sBAAsB,MAAM,6BAA6B,CAAC;AACjE,OAAO,iBAAiB,MAAM,0CAA0C,CAAC;AAEzE,OAAO,EACN,wBAAwB,EACxB,wBAAwB,EACxB,yBAAyB,GACzB,MAAM,mCAAmC,CAAC;AAE3C;;;;;;;;GAQG;AAUH,IAAM,cAAc,sBAApB,MAAM,cAAe,SAAQ,MAAM;IAAnC;;QACC;;;;WAIG;QAEH,aAAQ,GAAG,KAAK,CAAC;IAuFlB,CAAC;IArFA,sBAAsB;QAC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AC;AAExB,eAAe,cAAc,CAAC","sourcesContent":["import property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport Search from \"./Search.js\";\nimport { isPhone } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport ShellBarSearchTemplate from \"./ShellBarSearchTemplate.js\";\nimport ShellBarSearchCss from \"./generated/themes/ShellBarSearch.css.js\";\n\nimport {\n\tSEARCH_FIELD_SEARCH_ICON,\n\tSHELLBAR_SEARCH_EXPANDED,\n\tSHELLBAR_SEARCH_COLLAPSED,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n/**\n * @class\n * Search field for the ShellBar component.\n * @constructor\n * @extends Search\n * @public\n * @since 2.10.0\n * @experimental\n */\n@customElement({\n\ttag: \"ui5-shellbar-search\",\n\ttemplate: ShellBarSearchTemplate,\n\tstyles: [\n\t\tSearch.styles,\n\t\tShellBarSearchCss,\n\t],\n})\n\nclass ShellBarSearch extends Search {\n\t/**\n\t * Indicates whether the suggestions popover should be opened on focus.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tautoOpen = false;\n\n\t_handleSearchIconPress() {\n\t\tif (isPhone() && this.open) {\n\t\t\tthis._handleSearchEvent();\n\t\t\tthis._closePopupAndResetState();\n\t\t\treturn;\n\t\t}\n\n\t\tsuper._handleSearchIconPress();\n\n\t\tif (this.collapsed) {\n\t\t\tthis.collapsed = false;\n\t\t} else if (!this.value) {\n\t\t\tthis.collapsed = true;\n\t\t}\n\t}\n\n\t_handleEnter() {\n\t\tif (!this.value && !this.collapsed) {\n\t\t\t// Fire `ui5-search` so a host ShellBar collapses in sync; also collapse\n\t\t\t// locally for standalone usage (host converges on the same state).\n\t\t\tthis._handleSearchEvent();\n\t\t\tthis.collapsed = true;\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.focus();\n\t\t\t}, 0);\n\t\t} else {\n\t\t\tsuper._handleEnter();\n\t\t}\n\t}\n\n\t_onFocusOutSearch(e: FocusEvent) {\n\t\tif (isPhone()) {\n\t\t\treturn;\n\t\t}\n\n\t\tsuper._onFocusOutSearch(e);\n\t}\n\n\t_handleInput(e: InputEvent) {\n\t\tsuper._handleInput(e);\n\n\t\tif (isPhone()) {\n\t\t\tthis._performItemSelectionOnMobile = this._shouldPerformSelectionOnMobile(e.inputType);\n\t\t}\n\t}\n\n\tget _effectiveIconTooltip() {\n\t\tif (this.collapsed) {\n\t\t\treturn ShellBarSearch.i18nBundle.getText(SHELLBAR_SEARCH_COLLAPSED);\n\t\t}\n\n\t\tif (this.value) {\n\t\t\treturn ShellBarSearch.i18nBundle.getText(SEARCH_FIELD_SEARCH_ICON);\n\t\t}\n\n\t\treturn ShellBarSearch.i18nBundle.getText(SHELLBAR_SEARCH_EXPANDED);\n\t}\n\n\tget nativeInput() {\n\t\tconst domRef = this.shadowRoot;\n\n\t\treturn isPhone() ? domRef?.querySelector<HTMLInputElement>(`[ui5-responsive-popover] input`) : super.nativeInput;\n\t}\n\n\tgetSearchButtonDomRef(): HTMLElement | null {\n\t\treturn this.shadowRoot?.querySelector<HTMLElement>(\".ui5-shell-search-field-button\") ?? null;\n\t}\n\n\t_onfocusin() {\n\t\tsuper._onfocusin();\n\n\t\tif (this.autoOpen) {\n\t\t\tthis._setInternalOpen(true);\n\t\t\tthis.fireDecoratorEvent(\"open\");\n\t\t}\n\t}\n\n\tonBeforeRendering(): void {\n\t\tsuper.onBeforeRendering();\n\n\t\tif (isPhone()) {\n\t\t\tthis.collapsed = true;\n\t\t}\n\t}\n}\n\nShellBarSearch.define();\n\nexport default ShellBarSearch;\n"]}
@@ -176,6 +176,7 @@ declare class Timeline extends UI5Element {
176
176
  _onLoadMoreKeyup(e: KeyboardEvent): void;
177
177
  _onLoadMoreClick(): void;
178
178
  _onfocusin(e: FocusEvent): void;
179
+ _scrollFocusedListItemIntoView(e: FocusEvent): void;
179
180
  _onwheel(e: WheelEvent): void;
180
181
  onBeforeRendering(): void;
181
182
  _setLastItem(): void;
package/dist/Timeline.js CHANGED
@@ -232,6 +232,16 @@ let Timeline = Timeline_1 = class Timeline extends UI5Element {
232
232
  target = target.shadowRoot.querySelector("[ui5-toggle-button]");
233
233
  }
234
234
  this._itemNavigation.setCurrentItem(target);
235
+ if (this.layout === TimelineLayout.Horizontal) {
236
+ this._scrollFocusedListItemIntoView(e);
237
+ }
238
+ }
239
+ _scrollFocusedListItemIntoView(e) {
240
+ const listItem = e.composedPath().find((el) => el instanceof HTMLElement && el.classList.contains("ui5-timeline-list-item"));
241
+ listItem?.scrollIntoView({
242
+ block: "nearest",
243
+ inline: "nearest",
244
+ });
235
245
  }
236
246
  _onwheel(e) {
237
247
  // In horizontal layout, translate vertical wheel into horizontal scroll
@@ -1 +1 @@
1
- {"version":3,"file":"Timeline.js","sourceRoot":"","sources":["../src/Timeline.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,CAAC;AAC1E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAE/E,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EACN,OAAO,EACP,OAAO,EACP,IAAI,EACJ,MAAM,EACN,MAAM,EACN,OAAO,EACP,IAAI,GACJ,MAAM,sCAAsC,CAAC;AAG9C,OAAO,mBAAmB,CAAC;AAC3B,OAAO,cAAc,MAAM,yDAAyD,CAAC;AACrF,OAAO,cAAc,MAAM,sDAAsD,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,8BAA8B,EAAE,MAAM,mCAAmC,CAAC;AACxG,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,QAAQ,MAAM,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ACqB;AAG5B;IADC,KAAK,CAAC,0BAA0B,CAAC;mDACF;AAGhC;IADC,KAAK,CAAC,CAAC,iCAAiC,CAAC,CAAC;+CACf;AAG5B;IADC,KAAK,CAAC,gCAAgC,CAAC;kDACT;AAGxB;IADN,IAAI,CAAC,0BAA0B,CAAC;kCACH;AAvHzB,QAAQ;IAnBb,aAAa,CAAC;QACd,GAAG,EAAE,cAAc;QACnB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,WAAW;QACnB,QAAQ,EAAE,gBAAgB;KAC1B,CAAC;IAEF;;;;;;OAMG;;IACF,KAAK,CAAC,WAAW,EAAE;QACnB,OAAO,EAAE,IAAI;KACb,CAAC;GAEI,QAAQ,CAwbb;AAED,QAAQ,CAAC,MAAM,EAAE,CAAC;AAElB,eAAe,QAAQ,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { DefaultSlot, Slot } 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 jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport {\n\tisSpace,\n\tisEnter,\n\tisUp,\n\tisDown,\n\tisLeft,\n\tisRight,\n\tisF2,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport type { ITabbable } from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport type ToggleButton from \"@ui5/webcomponents/dist/ToggleButton.js\";\nimport \"./TimelineItem.js\";\nimport ItemNavigation from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport NavigationMode from \"@ui5/webcomponents-base/dist/types/NavigationMode.js\";\nimport { TIMELINE_ARIA_LABEL, TIMELINE_LOAD_MORE_BUTTON_TEXT } from \"./generated/i18n/i18n-defaults.js\";\nimport TimelineTemplate from \"./TimelineTemplate.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport debounce from \"@ui5/webcomponents-base/dist/util/debounce.js\";\nimport query from \"@ui5/webcomponents-base/dist/decorators/query.js\";\nimport process from \"@ui5/webcomponents-icons/dist/process.js\";\nimport drillDown from \"@ui5/webcomponents-icons/dist/drill-down.js\";\n// Styles\nimport TimelineCss from \"./generated/themes/Timeline.css.js\";\nimport TimelineLayout from \"./types/TimelineLayout.js\";\n// Mode\nimport TimelineGrowingMode from \"./types/TimelineGrowingMode.js\";\nimport { getFirstFocusableElement } from \"@ui5/webcomponents-base/dist/util/FocusableElements.js\";\nimport getActiveElement from \"@ui5/webcomponents-base/dist/util/getActiveElement.js\";\n\n/**\n * Interface for components that may be slotted inside `ui5-timeline` as items\n * @public\n */\ninterface ITimelineItem extends UI5Element, ITabbable {\n\tlayout: `${TimelineLayout}`;\n\tisGroupItem: boolean;\n\tforcedLineWidth?: string;\n\ticon?: string;\n\tnameClickable?: boolean;\n\tpositionInGroup?: number;\n\tcollapsed?: boolean;\n\titems?: Array<ITimelineItem>;\n\tfocusLink?(): void;\n\tlastItem: boolean;\n\tisNextItemGroup?: boolean;\n\tfirstItemInTimeline?: boolean;\n\teffectiveRole?: string;\n}\n\nconst SHORT_LINE_WIDTH = \"ShortLineWidth\";\nconst LARGE_LINE_WIDTH = \"LargeLineWidth\";\nconst GROWING_WITH_SCROLL_DEBOUNCE_RATE = 250; // ms\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-timeline` component shows entries (such as objects, events, or posts) in chronological order.\n * A common use case is to provide information about changes to an object, or events related to an object.\n * These entries can be generated by the system (for example, value XY changed from A to B), or added manually.\n * There are two distinct variants of the timeline: basic and social. The basic timeline is read-only,\n * while the social timeline offers a high level of interaction and collaboration, and is integrated within SAP Jam.\n *\n * ### Header and Info Bar Slots\n *\n * The Timeline exposes two named slots above the items area:\n *\n * - `header` — for a controls bar (search field, filter trigger, sort toggle, etc.).\n * The most common pattern is to place a `ui5-toolbar` containing a search input and buttons that open\n * a filter dialog or toggle sort direction. The Timeline itself performs no filtering, sorting, or\n * searching — the application listens for events from its own controls and reorders, hides, or\n * adds items in the default slot accordingly.\n *\n * - `infoBar` — for a status bar that reflects the result of the controls (active filters,\n * applied sort, current search query). Typically contains tokens, labels, or a `ui5-bar`.\n *\n * The Timeline itself does not filter, sort, or search — the application owns that logic.\n * Use `stickyHeader` to pin both bars while the Timeline's items scroll. Give the Timeline\n * a constrained height in this mode so it owns its scrollbar.\n * @constructor\n * @extends UI5Element\n * @public\n * @since 0.8.0\n */\n@customElement({\n\ttag: \"ui5-timeline\",\n\tlanguageAware: true,\n\trenderer: jsxRenderer,\n\tstyles: TimelineCss,\n\ttemplate: TimelineTemplate,\n})\n\n/**\n * Fired when the user presses the `More` button or scrolls to the Timeline's end.\n *\n * **Note:** The event will be fired if `growing` is set to `Button` or `Scroll`.\n * @public\n * @since 2.7.0\n */\n@event(\"load-more\", {\n\tbubbles: true,\n})\n\nclass Timeline extends UI5Element {\n\teventDetails!: {\n\t\t\"load-more\": void,\n\t}\n\t/**\n\t * Defines the items orientation.\n\t * @default \"Vertical\"\n\t * @since 1.0.0-rc.15\n\t * @public\n\t */\n\t@property()\n\tlayout: `${TimelineLayout}` = \"Vertical\";\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 1.2.0\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Defines if the component should display a loading indicator over the Timeline.\n\t *\n\t * @default false\n\t * @since 2.7.0\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tloading = false;\n\n\t/**\n\t * Defines the delay in milliseconds, after which the loading indicator will show up for this component.\n\t * @default 1000\n\t * @public\n\t */\n\t@property({ type: Number })\n\tloadingDelay = 1000;\n\n\t/**\n\t * Defines whether the Timeline will have growing capability either by pressing a \"More\" button,\n\t * or via user scroll. In both cases a `load-more` event is fired.\n\t *\n\t * Available options:\n\t *\n\t * `Button` - Displays a button at the end of the Timeline, which when pressed triggers the `load-more` event.\n\t *\n\t * `Scroll` -Triggers the `load-more` event when the user scrolls to the end of the Timeline.\n\t *\n\t * `None` (default) - The growing functionality is off.\n\t *\n\t * @default \"None\"\n\t * @since 2.7.0\n\t * @public\n\t */\n\t@property()\n\tgrowing: `${TimelineGrowingMode}` = \"None\";\n\n\t/**\n\t * Defines whether the content of the `header` and `infoBar` slots remains visible when the user scrolls the Timeline.\n\t *\n\t * **Note:** The bars pin to the Timeline's own scrollport. Give the Timeline a\n\t * constrained height (for example `style=\"height: 32rem\"`) so its items scroll\n\t * inside it. Placing the Timeline inside an externally scrolling ancestor while\n\t * leaving the Timeline itself unsized is not supported in this mode — the bars\n\t * will scroll away with the ancestor.\n\t *\n\t * @default false\n\t * @public\n\t * @since 2.24.0\n\t */\n\t@property({ type: Boolean })\n\tstickyHeader = false;\n\n\t/**\n\t * Defines the active state of the `More` button.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_loadMoreActive = false;\n\n\t/**\n\t * Determines the content of the `ui5-timeline`.\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, individualSlots: true, \"default\": true })\n\titems!: DefaultSlot<ITimelineItem>;\n\n\t/**\n\t * Defines the content of the Timeline's header area, displayed above the items.\n\t * Typically a `ui5-toolbar` with search, sort, and filter controls.\n\t *\n\t * @public\n\t * @since 2.24.0\n\t */\n\t@slot()\n\theader!: Slot<HTMLElement>;\n\n\t/**\n\t * Defines the content of the Timeline's info bar area, displayed below the header\n\t * and above the items. Use for status display (applied filters, sort direction, counts).\n\t *\n\t * @public\n\t * @since 2.24.0\n\t */\n\t@slot()\n\tinfoBar!: Slot<HTMLElement>;\n\n\t@query(\".ui5-timeline-end-marker\")\n\ttimelineEndMarker!: HTMLElement;\n\n\t@query((`[id=\"ui5-timeline-growing-btn\"]`))\n\tgrowingButton!: HTMLElement;\n\n\t@query(\".ui5-timeline-scroll-container\")\n\t_scrollContainer!: HTMLElement;\n\n\t@i18n(\"@ui5/webcomponents-fiori\")\n\tstatic i18nBundle: I18nBundle;\n\n\t_itemNavigation: ItemNavigation;\n\tgrowingIntersectionObserver?: IntersectionObserver | null;\n\ttimeLineEndObserved = false;\n\tinitialIntersection = true;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._itemNavigation = new ItemNavigation(this, {\n\t\t\tgetItemsCallback: () => this._navigableItems,\n\t\t});\n\t}\n\n\tget ariaLabel() {\n\t\treturn this.accessibleName\n\t\t\t? `${Timeline.i18nBundle.getText(TIMELINE_ARIA_LABEL)} ${this.accessibleName}`\n\t\t\t: Timeline.i18nBundle.getText(TIMELINE_ARIA_LABEL);\n\t}\n\n\tget _hasHeader(): boolean {\n\t\treturn this.header.length > 0;\n\t}\n\n\tget _hasInfoBar(): boolean {\n\t\treturn this.infoBar.length > 0;\n\t}\n\n\tget showBusyIndicatorOverlay() {\n\t\treturn !this.growsWithButton && this.loading;\n\t}\n\n\tget growsOnScroll(): boolean {\n\t\treturn this.growing === TimelineGrowingMode.Scroll;\n\t}\n\n\tget growingButtonIcon() {\n\t\treturn this.layout === TimelineLayout.Horizontal ? process : drillDown;\n\t}\n\n\tget growingButtonText() {\n\t\treturn Timeline.i18nBundle.getText(TIMELINE_LOAD_MORE_BUTTON_TEXT);\n\t}\n\n\tget growsWithButton(): boolean {\n\t\treturn this.growing === TimelineGrowingMode.Button;\n\t}\n\n\tonAfterRendering() {\n\t\tif (this.growsOnScroll) {\n\t\t\tthis.observeTimelineEnd();\n\t\t} else if (this.timeLineEndObserved) {\n\t\t\tthis.unobserveTimelineEnd();\n\t\t}\n\n\t\tthis.growingIntersectionObserver = this.getIntersectionObserver();\n\t}\n\n\tonExitDOM() {\n\t\tthis.unobserveTimelineEnd();\n\t}\n\n\tasync observeTimelineEnd() {\n\t\tif (!this.timeLineEndObserved) {\n\t\t\tawait renderFinished();\n\t\t\tthis.getIntersectionObserver().observe(this.timelineEndMarker);\n\t\t\tthis.timeLineEndObserved = true;\n\t\t}\n\t}\n\n\tunobserveTimelineEnd() {\n\t\tif (this.growingIntersectionObserver) {\n\t\t\tthis.growingIntersectionObserver.disconnect();\n\t\t\tthis.growingIntersectionObserver = null;\n\t\t\tthis.timeLineEndObserved = false;\n\t\t}\n\t}\n\n\tgetIntersectionObserver(): IntersectionObserver {\n\t\tif (!this.growingIntersectionObserver) {\n\t\t\tthis.growingIntersectionObserver = new IntersectionObserver(this.onIntersection.bind(this), {\n\t\t\t\troot: null,\n\t\t\t\tthreshold: 1.0,\n\t\t\t});\n\t\t}\n\n\t\treturn this.growingIntersectionObserver;\n\t}\n\n\tonIntersection(entries: Array<IntersectionObserverEntry>) {\n\t\tif (this.initialIntersection) {\n\t\t\tthis.initialIntersection = false;\n\t\t\treturn;\n\t\t}\n\n\t\tif (entries.some(entry => entry.isIntersecting)) {\n\t\t\tdebounce(this.loadMore.bind(this), GROWING_WITH_SCROLL_DEBOUNCE_RATE);\n\t\t}\n\t}\n\n\tloadMore() {\n\t\tthis.fireDecoratorEvent(\"load-more\");\n\t}\n\n\tgetFocusDomRef(): HTMLElement | undefined {\n\t\treturn this._itemNavigation._getCurrentItem();\n\t}\n\n\t_onLoadMoreKeydown(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._loadMoreActive = true;\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis._onLoadMoreClick();\n\t\t\tthis._loadMoreActive = true;\n\t\t}\n\t}\n\n\t_onLoadMoreKeyup(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\tthis._onLoadMoreClick();\n\t\t}\n\t\tthis._loadMoreActive = false;\n\t}\n\n\t_onLoadMoreClick() {\n\t\tthis.fireDecoratorEvent(\"load-more\");\n\t}\n\n\t_onfocusin(e: FocusEvent) {\n\t\tlet target = e.target as ITimelineItem | ToggleButton;\n\n\t\tif ((target as ITimelineItem).isGroupItem) {\n\t\t\ttarget = target.shadowRoot!.querySelector<ToggleButton>(\"[ui5-toggle-button]\")!;\n\t\t}\n\n\t\tthis._itemNavigation.setCurrentItem(target);\n\t}\n\n\t_onwheel(e: WheelEvent) {\n\t\t// In horizontal layout, translate vertical wheel into horizontal scroll\n\t\t// so a regular mouse wheel can scroll through items.\n\t\tif (this.layout !== TimelineLayout.Horizontal || !e.deltaY || e.deltaX) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst container = this._scrollContainer;\n\t\tif (!container) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst canScroll = container.scrollWidth > container.clientWidth;\n\t\tif (!canScroll) {\n\t\t\treturn;\n\t\t}\n\n\t\tcontainer.scrollLeft += e.deltaY;\n\t\te.preventDefault();\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._itemNavigation._navigationMode = this.layout === TimelineLayout.Horizontal ? NavigationMode.Horizontal : NavigationMode.Vertical;\n\n\t\tif (!this.items.length) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor (let i = 0; i < this.items.length; i++) {\n\t\t\tthis.items[i].layout = this.layout;\n\t\t\tif (this.hasGroupItems) {\n\t\t\t\tthis.items[i].effectiveRole = \"treeitem\";\n\t\t\t} else {\n\t\t\t\tthis.items[i].effectiveRole = \"listitem\";\n\t\t\t}\n\n\t\t\tif (this.items[i + 1] && !!this.items[i + 1].icon) {\n\t\t\t\tthis.items[i].forcedLineWidth = SHORT_LINE_WIDTH;\n\t\t\t} else if (this.items[i].icon && this.items[i + 1] && !this.items[i + 1].icon) {\n\t\t\t\tthis.items[i].forcedLineWidth = LARGE_LINE_WIDTH;\n\t\t\t}\n\t\t}\n\n\t\tthis._setLastItem();\n\t\tthis._setIsNextItemGroup();\n\t\tthis.items[0].firstItemInTimeline = true;\n\t}\n\n\t_setLastItem() {\n\t\tconst items = this.items;\n\n\t\tfor (let i = 0; i < items.length; i++) {\n\t\t\titems[i].lastItem = false;\n\t\t}\n\n\t\tif (items.length > 0) {\n\t\t\titems[items.length - 1].lastItem = true;\n\t\t}\n\t}\n\n\t_setIsNextItemGroup() {\n\t\tfor (let i = 0; i < this.items.length; i++) {\n\t\t\tthis.items[i].isNextItemGroup = false;\n\t\t}\n\n\t\tfor (let i = 0; i < this.items.length; i++) {\n\t\t\tif (this.items[i + 1] && this.items[i + 1].isGroupItem) {\n\t\t\t\tthis.items[i].isNextItemGroup = true;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync _onkeydown(e: KeyboardEvent) {\n\t\tconst target = e.target as ITimelineItem,\n\t\t\ttargetfocusDomRef = target?.getFocusDomRef(),\n\t\t\tshouldHandleCustomArrowNavigation = targetfocusDomRef === this.getFocusDomRef() || target === this.growingButton;\n\n\t\tif (shouldHandleCustomArrowNavigation && (isDown(e) || isRight(e))) {\n\t\t\tthis._handleDown();\n\t\t\te.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\tif (shouldHandleCustomArrowNavigation && (isUp(e) || isLeft(e))) {\n\t\t\tthis._handleUp(e);\n\t\t\te.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\tif (isF2(e)) {\n\t\t\te.stopImmediatePropagation();\n\t\t\tconst activeElement = getActiveElement();\n\t\t\tconst focusDomRef = this.getFocusDomRef();\n\n\t\t\tif (!focusDomRef) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (activeElement === focusDomRef) {\n\t\t\t\tconst firstFocusable = await getFirstFocusableElement(focusDomRef);\n\t\t\t\tfirstFocusable?.focus();\n\t\t\t} else {\n\t\t\t\tconst parentItem = (e.target as HTMLElement)?.closest(\"ui5-timeline-item\") as HTMLElement;\n\t\t\t\tparentItem?.focus();\n\t\t\t}\n\t\t}\n\t}\n\n\t_handleDown() {\n\t\tif (this.growsWithButton) {\n\t\t\tthis.focusGrowingButton();\n\t\t}\n\t}\n\n\tfocusGrowingButton() {\n\t\tconst items = this._navigableItems;\n\t\tconst lastIndex = items.length - 1;\n\t\tconst currentIndex = this._itemNavigation._currentIndex;\n\n\t\tif (currentIndex !== -1 && currentIndex === lastIndex) {\n\t\t\tthis.growingButton?.focus();\n\t\t}\n\t}\n\n\t_handleUp(e: KeyboardEvent) {\n\t\tif (this.growingButton === e.target) {\n\t\t\tconst items = this._navigableItems;\n\t\t\tconst lastItem = items[items.length - 1];\n\n\t\t\tthis.focusItem(lastItem);\n\n\t\t\te.preventDefault();\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\t}\n\n\t/**\n\t * Focuses a list item and sets its tabindex to \"0\" via the ItemNavigation\n\t * @protected\n\t * @param item\n\t */\n\tfocusItem(item: ITimelineItem | ToggleButton) {\n\t\tthis._itemNavigation.setCurrentItem(item);\n\t\titem.focus();\n\t}\n\n\tget hasGroupItems() {\n\t\treturn this.items.some(item => item.isGroupItem);\n\t}\n\n\tget _navigableItems() {\n\t\tconst navigatableItems: Array<ITimelineItem | ToggleButton> = [];\n\n\t\tif (!this.items.length) {\n\t\t\treturn [];\n\t\t}\n\n\t\tthis.items.forEach(item => {\n\t\t\tif (!item.isGroupItem) {\n\t\t\t\tnavigatableItems.push(item);\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst navigatableItem = item.shadowRoot!.querySelector<ToggleButton>(\"[ui5-toggle-button]\");\n\n\t\t\tif (navigatableItem) {\n\t\t\t\tnavigatableItems.push(navigatableItem);\n\t\t\t}\n\n\t\t\tif (!item.collapsed) {\n\t\t\t\titem.items?.forEach(groupItem => {\n\t\t\t\t\tnavigatableItems.push(groupItem);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\treturn navigatableItems;\n\t}\n}\n\nTimeline.define();\n\nexport default Timeline;\nexport type {\n\tITimelineItem,\n};\n"]}
1
+ {"version":3,"file":"Timeline.js","sourceRoot":"","sources":["../src/Timeline.ts"],"names":[],"mappings":";;;;;;;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;+CACf;AAG5B;IADC,KAAK,CAAC,gCAAgC,CAAC;kDACT;AAGxB;IADN,IAAI,CAAC,0BAA0B,CAAC;kCACH;AAvHzB,QAAQ;IAnBb,aAAa,CAAC;QACd,GAAG,EAAE,cAAc;QACnB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,WAAW;QACnB,QAAQ,EAAE,gBAAgB;KAC1B,CAAC;IAEF;;;;;;OAMG;;IACF,KAAK,CAAC,WAAW,EAAE;QACnB,OAAO,EAAE,IAAI;KACb,CAAC;GAEI,QAAQ,CAucb;AAED,QAAQ,CAAC,MAAM,EAAE,CAAC;AAElB,eAAe,QAAQ,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { DefaultSlot, Slot } 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 jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport {\n\tisSpace,\n\tisEnter,\n\tisUp,\n\tisDown,\n\tisLeft,\n\tisRight,\n\tisF2,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport type { ITabbable } from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport type ToggleButton from \"@ui5/webcomponents/dist/ToggleButton.js\";\nimport \"./TimelineItem.js\";\nimport ItemNavigation from \"@ui5/webcomponents-base/dist/delegate/ItemNavigation.js\";\nimport NavigationMode from \"@ui5/webcomponents-base/dist/types/NavigationMode.js\";\nimport { TIMELINE_ARIA_LABEL, TIMELINE_LOAD_MORE_BUTTON_TEXT } from \"./generated/i18n/i18n-defaults.js\";\nimport TimelineTemplate from \"./TimelineTemplate.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport debounce from \"@ui5/webcomponents-base/dist/util/debounce.js\";\nimport query from \"@ui5/webcomponents-base/dist/decorators/query.js\";\nimport process from \"@ui5/webcomponents-icons/dist/process.js\";\nimport drillDown from \"@ui5/webcomponents-icons/dist/drill-down.js\";\n// Styles\nimport TimelineCss from \"./generated/themes/Timeline.css.js\";\nimport TimelineLayout from \"./types/TimelineLayout.js\";\n// Mode\nimport TimelineGrowingMode from \"./types/TimelineGrowingMode.js\";\nimport { getFirstFocusableElement } from \"@ui5/webcomponents-base/dist/util/FocusableElements.js\";\nimport getActiveElement from \"@ui5/webcomponents-base/dist/util/getActiveElement.js\";\n\n/**\n * Interface for components that may be slotted inside `ui5-timeline` as items\n * @public\n */\ninterface ITimelineItem extends UI5Element, ITabbable {\n\tlayout: `${TimelineLayout}`;\n\tisGroupItem: boolean;\n\tforcedLineWidth?: string;\n\ticon?: string;\n\tnameClickable?: boolean;\n\tpositionInGroup?: number;\n\tcollapsed?: boolean;\n\titems?: Array<ITimelineItem>;\n\tfocusLink?(): void;\n\tlastItem: boolean;\n\tisNextItemGroup?: boolean;\n\tfirstItemInTimeline?: boolean;\n\teffectiveRole?: string;\n}\n\nconst SHORT_LINE_WIDTH = \"ShortLineWidth\";\nconst LARGE_LINE_WIDTH = \"LargeLineWidth\";\nconst GROWING_WITH_SCROLL_DEBOUNCE_RATE = 250; // ms\n\n/**\n * @class\n *\n * ### Overview\n *\n * The `ui5-timeline` component shows entries (such as objects, events, or posts) in chronological order.\n * A common use case is to provide information about changes to an object, or events related to an object.\n * These entries can be generated by the system (for example, value XY changed from A to B), or added manually.\n * There are two distinct variants of the timeline: basic and social. The basic timeline is read-only,\n * while the social timeline offers a high level of interaction and collaboration, and is integrated within SAP Jam.\n *\n * ### Header and Info Bar Slots\n *\n * The Timeline exposes two named slots above the items area:\n *\n * - `header` — for a controls bar (search field, filter trigger, sort toggle, etc.).\n * The most common pattern is to place a `ui5-toolbar` containing a search input and buttons that open\n * a filter dialog or toggle sort direction. The Timeline itself performs no filtering, sorting, or\n * searching — the application listens for events from its own controls and reorders, hides, or\n * adds items in the default slot accordingly.\n *\n * - `infoBar` — for a status bar that reflects the result of the controls (active filters,\n * applied sort, current search query). Typically contains tokens, labels, or a `ui5-bar`.\n *\n * The Timeline itself does not filter, sort, or search — the application owns that logic.\n * Use `stickyHeader` to pin both bars while the Timeline's items scroll. Give the Timeline\n * a constrained height in this mode so it owns its scrollbar.\n * @constructor\n * @extends UI5Element\n * @public\n * @since 0.8.0\n */\n@customElement({\n\ttag: \"ui5-timeline\",\n\tlanguageAware: true,\n\trenderer: jsxRenderer,\n\tstyles: TimelineCss,\n\ttemplate: TimelineTemplate,\n})\n\n/**\n * Fired when the user presses the `More` button or scrolls to the Timeline's end.\n *\n * **Note:** The event will be fired if `growing` is set to `Button` or `Scroll`.\n * @public\n * @since 2.7.0\n */\n@event(\"load-more\", {\n\tbubbles: true,\n})\n\nclass Timeline extends UI5Element {\n\teventDetails!: {\n\t\t\"load-more\": void,\n\t}\n\t/**\n\t * Defines the items orientation.\n\t * @default \"Vertical\"\n\t * @since 1.0.0-rc.15\n\t * @public\n\t */\n\t@property()\n\tlayout: `${TimelineLayout}` = \"Vertical\";\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 1.2.0\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Defines if the component should display a loading indicator over the Timeline.\n\t *\n\t * @default false\n\t * @since 2.7.0\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tloading = false;\n\n\t/**\n\t * Defines the delay in milliseconds, after which the loading indicator will show up for this component.\n\t * @default 1000\n\t * @public\n\t */\n\t@property({ type: Number })\n\tloadingDelay = 1000;\n\n\t/**\n\t * Defines whether the Timeline will have growing capability either by pressing a \"More\" button,\n\t * or via user scroll. In both cases a `load-more` event is fired.\n\t *\n\t * Available options:\n\t *\n\t * `Button` - Displays a button at the end of the Timeline, which when pressed triggers the `load-more` event.\n\t *\n\t * `Scroll` -Triggers the `load-more` event when the user scrolls to the end of the Timeline.\n\t *\n\t * `None` (default) - The growing functionality is off.\n\t *\n\t * @default \"None\"\n\t * @since 2.7.0\n\t * @public\n\t */\n\t@property()\n\tgrowing: `${TimelineGrowingMode}` = \"None\";\n\n\t/**\n\t * Defines whether the content of the `header` and `infoBar` slots remains visible when the user scrolls the Timeline.\n\t *\n\t * **Note:** The bars pin to the Timeline's own scrollport. Give the Timeline a\n\t * constrained height (for example `style=\"height: 32rem\"`) so its items scroll\n\t * inside it. Placing the Timeline inside an externally scrolling ancestor while\n\t * leaving the Timeline itself unsized is not supported in this mode — the bars\n\t * will scroll away with the ancestor.\n\t *\n\t * @default false\n\t * @public\n\t * @since 2.24.0\n\t */\n\t@property({ type: Boolean })\n\tstickyHeader = false;\n\n\t/**\n\t * Defines the active state of the `More` button.\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_loadMoreActive = false;\n\n\t/**\n\t * Determines the content of the `ui5-timeline`.\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, individualSlots: true, \"default\": true })\n\titems!: DefaultSlot<ITimelineItem>;\n\n\t/**\n\t * Defines the content of the Timeline's header area, displayed above the items.\n\t * Typically a `ui5-toolbar` with search, sort, and filter controls.\n\t *\n\t * @public\n\t * @since 2.24.0\n\t */\n\t@slot()\n\theader!: Slot<HTMLElement>;\n\n\t/**\n\t * Defines the content of the Timeline's info bar area, displayed below the header\n\t * and above the items. Use for status display (applied filters, sort direction, counts).\n\t *\n\t * @public\n\t * @since 2.24.0\n\t */\n\t@slot()\n\tinfoBar!: Slot<HTMLElement>;\n\n\t@query(\".ui5-timeline-end-marker\")\n\ttimelineEndMarker!: HTMLElement;\n\n\t@query((`[id=\"ui5-timeline-growing-btn\"]`))\n\tgrowingButton!: HTMLElement;\n\n\t@query(\".ui5-timeline-scroll-container\")\n\t_scrollContainer!: HTMLElement;\n\n\t@i18n(\"@ui5/webcomponents-fiori\")\n\tstatic i18nBundle: I18nBundle;\n\n\t_itemNavigation: ItemNavigation;\n\tgrowingIntersectionObserver?: IntersectionObserver | null;\n\ttimeLineEndObserved = false;\n\tinitialIntersection = true;\n\n\tconstructor() {\n\t\tsuper();\n\n\t\tthis._itemNavigation = new ItemNavigation(this, {\n\t\t\tgetItemsCallback: () => this._navigableItems,\n\t\t});\n\t}\n\n\tget ariaLabel() {\n\t\treturn this.accessibleName\n\t\t\t? `${Timeline.i18nBundle.getText(TIMELINE_ARIA_LABEL)} ${this.accessibleName}`\n\t\t\t: Timeline.i18nBundle.getText(TIMELINE_ARIA_LABEL);\n\t}\n\n\tget _hasHeader(): boolean {\n\t\treturn this.header.length > 0;\n\t}\n\n\tget _hasInfoBar(): boolean {\n\t\treturn this.infoBar.length > 0;\n\t}\n\n\tget showBusyIndicatorOverlay() {\n\t\treturn !this.growsWithButton && this.loading;\n\t}\n\n\tget growsOnScroll(): boolean {\n\t\treturn this.growing === TimelineGrowingMode.Scroll;\n\t}\n\n\tget growingButtonIcon() {\n\t\treturn this.layout === TimelineLayout.Horizontal ? process : drillDown;\n\t}\n\n\tget growingButtonText() {\n\t\treturn Timeline.i18nBundle.getText(TIMELINE_LOAD_MORE_BUTTON_TEXT);\n\t}\n\n\tget growsWithButton(): boolean {\n\t\treturn this.growing === TimelineGrowingMode.Button;\n\t}\n\n\tonAfterRendering() {\n\t\tif (this.growsOnScroll) {\n\t\t\tthis.observeTimelineEnd();\n\t\t} else if (this.timeLineEndObserved) {\n\t\t\tthis.unobserveTimelineEnd();\n\t\t}\n\n\t\tthis.growingIntersectionObserver = this.getIntersectionObserver();\n\t}\n\n\tonExitDOM() {\n\t\tthis.unobserveTimelineEnd();\n\t}\n\n\tasync observeTimelineEnd() {\n\t\tif (!this.timeLineEndObserved) {\n\t\t\tawait renderFinished();\n\t\t\tthis.getIntersectionObserver().observe(this.timelineEndMarker);\n\t\t\tthis.timeLineEndObserved = true;\n\t\t}\n\t}\n\n\tunobserveTimelineEnd() {\n\t\tif (this.growingIntersectionObserver) {\n\t\t\tthis.growingIntersectionObserver.disconnect();\n\t\t\tthis.growingIntersectionObserver = null;\n\t\t\tthis.timeLineEndObserved = false;\n\t\t}\n\t}\n\n\tgetIntersectionObserver(): IntersectionObserver {\n\t\tif (!this.growingIntersectionObserver) {\n\t\t\tthis.growingIntersectionObserver = new IntersectionObserver(this.onIntersection.bind(this), {\n\t\t\t\troot: null,\n\t\t\t\tthreshold: 1.0,\n\t\t\t});\n\t\t}\n\n\t\treturn this.growingIntersectionObserver;\n\t}\n\n\tonIntersection(entries: Array<IntersectionObserverEntry>) {\n\t\tif (this.initialIntersection) {\n\t\t\tthis.initialIntersection = false;\n\t\t\treturn;\n\t\t}\n\n\t\tif (entries.some(entry => entry.isIntersecting)) {\n\t\t\tdebounce(this.loadMore.bind(this), GROWING_WITH_SCROLL_DEBOUNCE_RATE);\n\t\t}\n\t}\n\n\tloadMore() {\n\t\tthis.fireDecoratorEvent(\"load-more\");\n\t}\n\n\tgetFocusDomRef(): HTMLElement | undefined {\n\t\treturn this._itemNavigation._getCurrentItem();\n\t}\n\n\t_onLoadMoreKeydown(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._loadMoreActive = true;\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tthis._onLoadMoreClick();\n\t\t\tthis._loadMoreActive = true;\n\t\t}\n\t}\n\n\t_onLoadMoreKeyup(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\tthis._onLoadMoreClick();\n\t\t}\n\t\tthis._loadMoreActive = false;\n\t}\n\n\t_onLoadMoreClick() {\n\t\tthis.fireDecoratorEvent(\"load-more\");\n\t}\n\n\t_onfocusin(e: FocusEvent) {\n\t\tlet target = e.target as ITimelineItem | ToggleButton;\n\n\t\tif ((target as ITimelineItem).isGroupItem) {\n\t\t\ttarget = target.shadowRoot!.querySelector<ToggleButton>(\"[ui5-toggle-button]\")!;\n\t\t}\n\n\t\tthis._itemNavigation.setCurrentItem(target);\n\n\t\tif (this.layout === TimelineLayout.Horizontal) {\n\t\t\tthis._scrollFocusedListItemIntoView(e);\n\t\t}\n\t}\n\n\t_scrollFocusedListItemIntoView(e: FocusEvent) {\n\t\tconst listItem = e.composedPath().find(\n\t\t\t(el): el is HTMLElement => el instanceof HTMLElement && el.classList.contains(\"ui5-timeline-list-item\"),\n\t\t);\n\n\t\tlistItem?.scrollIntoView({\n\t\t\tblock: \"nearest\",\n\t\t\tinline: \"nearest\",\n\t\t});\n\t}\n\n\t_onwheel(e: WheelEvent) {\n\t\t// In horizontal layout, translate vertical wheel into horizontal scroll\n\t\t// so a regular mouse wheel can scroll through items.\n\t\tif (this.layout !== TimelineLayout.Horizontal || !e.deltaY || e.deltaX) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst container = this._scrollContainer;\n\t\tif (!container) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst canScroll = container.scrollWidth > container.clientWidth;\n\t\tif (!canScroll) {\n\t\t\treturn;\n\t\t}\n\n\t\tcontainer.scrollLeft += e.deltaY;\n\t\te.preventDefault();\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._itemNavigation._navigationMode = this.layout === TimelineLayout.Horizontal ? NavigationMode.Horizontal : NavigationMode.Vertical;\n\n\t\tif (!this.items.length) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor (let i = 0; i < this.items.length; i++) {\n\t\t\tthis.items[i].layout = this.layout;\n\t\t\tif (this.hasGroupItems) {\n\t\t\t\tthis.items[i].effectiveRole = \"treeitem\";\n\t\t\t} else {\n\t\t\t\tthis.items[i].effectiveRole = \"listitem\";\n\t\t\t}\n\n\t\t\tif (this.items[i + 1] && !!this.items[i + 1].icon) {\n\t\t\t\tthis.items[i].forcedLineWidth = SHORT_LINE_WIDTH;\n\t\t\t} else if (this.items[i].icon && this.items[i + 1] && !this.items[i + 1].icon) {\n\t\t\t\tthis.items[i].forcedLineWidth = LARGE_LINE_WIDTH;\n\t\t\t}\n\t\t}\n\n\t\tthis._setLastItem();\n\t\tthis._setIsNextItemGroup();\n\t\tthis.items[0].firstItemInTimeline = true;\n\t}\n\n\t_setLastItem() {\n\t\tconst items = this.items;\n\n\t\tfor (let i = 0; i < items.length; i++) {\n\t\t\titems[i].lastItem = false;\n\t\t}\n\n\t\tif (items.length > 0) {\n\t\t\titems[items.length - 1].lastItem = true;\n\t\t}\n\t}\n\n\t_setIsNextItemGroup() {\n\t\tfor (let i = 0; i < this.items.length; i++) {\n\t\t\tthis.items[i].isNextItemGroup = false;\n\t\t}\n\n\t\tfor (let i = 0; i < this.items.length; i++) {\n\t\t\tif (this.items[i + 1] && this.items[i + 1].isGroupItem) {\n\t\t\t\tthis.items[i].isNextItemGroup = true;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync _onkeydown(e: KeyboardEvent) {\n\t\tconst target = e.target as ITimelineItem,\n\t\t\ttargetfocusDomRef = target?.getFocusDomRef(),\n\t\t\tshouldHandleCustomArrowNavigation = targetfocusDomRef === this.getFocusDomRef() || target === this.growingButton;\n\n\t\tif (shouldHandleCustomArrowNavigation && (isDown(e) || isRight(e))) {\n\t\t\tthis._handleDown();\n\t\t\te.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\tif (shouldHandleCustomArrowNavigation && (isUp(e) || isLeft(e))) {\n\t\t\tthis._handleUp(e);\n\t\t\te.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\tif (isF2(e)) {\n\t\t\te.stopImmediatePropagation();\n\t\t\tconst activeElement = getActiveElement();\n\t\t\tconst focusDomRef = this.getFocusDomRef();\n\n\t\t\tif (!focusDomRef) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (activeElement === focusDomRef) {\n\t\t\t\tconst firstFocusable = await getFirstFocusableElement(focusDomRef);\n\t\t\t\tfirstFocusable?.focus();\n\t\t\t} else {\n\t\t\t\tconst parentItem = (e.target as HTMLElement)?.closest(\"ui5-timeline-item\") as HTMLElement;\n\t\t\t\tparentItem?.focus();\n\t\t\t}\n\t\t}\n\t}\n\n\t_handleDown() {\n\t\tif (this.growsWithButton) {\n\t\t\tthis.focusGrowingButton();\n\t\t}\n\t}\n\n\tfocusGrowingButton() {\n\t\tconst items = this._navigableItems;\n\t\tconst lastIndex = items.length - 1;\n\t\tconst currentIndex = this._itemNavigation._currentIndex;\n\n\t\tif (currentIndex !== -1 && currentIndex === lastIndex) {\n\t\t\tthis.growingButton?.focus();\n\t\t}\n\t}\n\n\t_handleUp(e: KeyboardEvent) {\n\t\tif (this.growingButton === e.target) {\n\t\t\tconst items = this._navigableItems;\n\t\t\tconst lastItem = items[items.length - 1];\n\n\t\t\tthis.focusItem(lastItem);\n\n\t\t\te.preventDefault();\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\t}\n\n\t/**\n\t * Focuses a list item and sets its tabindex to \"0\" via the ItemNavigation\n\t * @protected\n\t * @param item\n\t */\n\tfocusItem(item: ITimelineItem | ToggleButton) {\n\t\tthis._itemNavigation.setCurrentItem(item);\n\t\titem.focus();\n\t}\n\n\tget hasGroupItems() {\n\t\treturn this.items.some(item => item.isGroupItem);\n\t}\n\n\tget _navigableItems() {\n\t\tconst navigatableItems: Array<ITimelineItem | ToggleButton> = [];\n\n\t\tif (!this.items.length) {\n\t\t\treturn [];\n\t\t}\n\n\t\tthis.items.forEach(item => {\n\t\t\tif (!item.isGroupItem) {\n\t\t\t\tnavigatableItems.push(item);\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst navigatableItem = item.shadowRoot!.querySelector<ToggleButton>(\"[ui5-toggle-button]\");\n\n\t\t\tif (navigatableItem) {\n\t\t\t\tnavigatableItems.push(navigatableItem);\n\t\t\t}\n\n\t\t\tif (!item.collapsed) {\n\t\t\t\titem.items?.forEach(groupItem => {\n\t\t\t\t\tnavigatableItems.push(groupItem);\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\treturn navigatableItems;\n\t}\n}\n\nTimeline.define();\n\nexport default Timeline;\nexport type {\n\tITimelineItem,\n};\n"]}
@@ -147,6 +147,11 @@ declare class UserSettingsItem extends UI5Element {
147
147
  focusFirstContentElement(): void;
148
148
  _focusFirstContentElementWhenReady(): Promise<void>;
149
149
  _focusFirstContentElement(): Promise<void>;
150
+ /**
151
+ * @private
152
+ * @since 2.27.0
153
+ */
154
+ _focusBackButton(): void;
150
155
  captureRef(this: UserSettingsView, ref: HTMLElement & {
151
156
  associatedSettingView?: UserSettingsView;
152
157
  } | null): void;
@@ -117,6 +117,19 @@ let UserSettingsItem = class UserSettingsItem extends UI5Element {
117
117
  });
118
118
  if (!eventPrevented) {
119
119
  selectedPageView.selected = false;
120
+ const primaryView = this.pages?.find(view => !view.secondary && view !== selectedPageView);
121
+ renderFinished().then(() => {
122
+ if (!this.isConnected) {
123
+ return;
124
+ }
125
+ const lastItem = primaryView?._lastNavigatedItem;
126
+ if (lastItem?.getFocusDomRef) {
127
+ lastItem.getFocusDomRef()?.focus();
128
+ }
129
+ else {
130
+ this._focusFirstContentElement();
131
+ }
132
+ });
120
133
  }
121
134
  }
122
135
  else {
@@ -178,6 +191,14 @@ let UserSettingsItem = class UserSettingsItem extends UI5Element {
178
191
  const focusable = await getFirstFocusableElement(contentElement, true);
179
192
  focusable?.focus();
180
193
  }
194
+ /**
195
+ * @private
196
+ * @since 2.27.0
197
+ */
198
+ _focusBackButton() {
199
+ const backButton = this.shadowRoot?.querySelector(".ui5-user-settings-item-collapse-btn");
200
+ backButton?.focus();
201
+ }
181
202
  captureRef(ref) {
182
203
  if (ref) {
183
204
  ref.associatedSettingView = this;
@@ -1 +1 @@
1
- {"version":3,"file":"UserSettingsItem.js","sourceRoot":"","sources":["../src/UserSettingsItem.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AAEpE,OAAO,WAAW,MA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,GAAG,EAAE,wBAAwB;QAC7B,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,wBAAwB;QAClC,MAAM,EAAE,CAAC,mBAAmB,CAAC;KAC7B,CAAC;IAEF;;;;OAIG;;IACF,KAAK,CAAC,kBAAkB,EAAE;QAC1B,UAAU,EAAE,IAAI;KAChB,CAAC;IAEF;;;OAGG;;IACF,KAAK,CAAC,WAAW,EAAE;QACnB,OAAO,EAAE,IAAI;KACb,CAAC;GAEI,gBAAgB,CA8PrB;AAED,gBAAgB,CAAC,MAAM,EAAE,CAAC;AAE1B,eAAe,gBAAgB,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { DefaultSlot, Slot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport {\n\tcustomElement, property, slotStrict as slot, eventStrict as event,\n} from \"@ui5/webcomponents-base/dist/decorators.js\";\nimport type { TabContainerTabSelectEventDetail } from \"@ui5/webcomponents/dist/TabContainer.js\";\nimport type Tab from \"@ui5/webcomponents/dist/Tab.js\";\nimport { getFirstFocusableElement } from \"@ui5/webcomponents-base/dist/util/FocusableElements.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport UserSettingsItemTemplate from \"./UserSettingsItemTemplate.js\";\nimport type UserSettingsView from \"./UserSettingsView.js\";\nimport UserSettingsItemCss from \"./generated/themes/UserSettingsItem.css.js\";\n\ntype UserSettingsItemViewSelectEventDetail = {\n\tview: UserSettingsView;\n}\n\ntype UserSettingsItemBackClickEventDetail = {\n\tview: UserSettingsView;\n}\n\n/**\n * @class\n * ### Overview\n *\n * The `ui5-user-settings-item` represents an item in the `ui5-user-settings-dialog`.\n *\n * ### ES6 Module Import\n * `import \"@ui5/webcomponents-fiori/dist/UserSettingsItem.js\";`\n *\n * You can disable the <code>UserSettingsItem</code> by setting the <code>enabled</code> property to <code>false</code>,\n * or use the <code>UserSettingsItem</code> in read-only mode by setting the <code>editable</code> property to false.\n *\n * <b>Note:</b> Disabled and read-only states shouldn't be used together.\n *\n * @constructor\n * @extends UI5Element\n * @public\n * @since 2.8.0\n */\n@customElement({\n\ttag: \"ui5-user-settings-item\",\n\trenderer: jsxRenderer,\n\ttemplate: UserSettingsItemTemplate,\n\tstyles: [UserSettingsItemCss],\n})\n\n/**\n * Fired when a selected view changed.\n * @param {UserSettingsView} view The selected `view`.\n * @public\n */\n@event(\"selection-change\", {\n\tcancelable: true,\n})\n\n/**\n *\n * @private\n */\n@event(\"_collapse\", {\n\tbubbles: true,\n})\n\nclass UserSettingsItem extends UI5Element {\n\teventDetails!: {\n\t\t\"_collapse\": void,\n\t\t\"selection-change\": UserSettingsItemViewSelectEventDetail,\n\t\t\"back-click\": UserSettingsItemBackClickEventDetail,\n\n\t}\n\t/**\n\t * Defines the text of the user settings item.\n\t *\n\t * @public\n\t * @default \"\"\n\t */\n\t@property({ type: String })\n\ttext = \"\";\n\n\t/**\n\t * Defines the tooltip of the component.\n\t *\n\t * A tooltip attribute should be provided to represent the meaning or function when the component is collapsed and only the icon is visible.\n\t * @default \"\"\n\t * @public\n\t */\n\t@property({ type: String })\n\ttooltip = \"\";\n\n\t/**\n\t * Defines the headerText of the item.\n\t *\n\t * @public\n\t * @default \"\"\n\t */\n\t@property({ type: String })\n\theaderText?: string;\n\n\t/**\n\t * Shows item tab.\n\t *\n\t * @public\n\t * @default false\n\t */\n\t@property({ type: Boolean })\n\tselected = false;\n\n\t/**\n\t * Defines whether the component is in disabled state.\n\t *\n\t * **Note:** A disabled component is completely noninteractive.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled = false;\n\n\t/**\n\t * Indicates whether a loading indicator should be shown.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tloading = false;\n\n\t/**\n\t * Indicates why the control is in loading state.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tloadingReason?: string;\n\n\t/**\n\t * Defines the icon of the component.\n\t *\n\t * @default \"globe\"\n\t * @public\n\t */\n\t@property({ type: String })\n\ticon = \"globe\";\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Defines the page views of the user settings item.\n\t *\n\t * If there are no tab views, the first page view will be shown unless there is selected one. If there is selected page\n\t * view it will be shown no matter if there are tab views.\n\t *\n\t * The page views are displayed by default if there is no selected tab view.\n\t *\n\t * @public\n\t */\n\t@slot({\n\t\ttype: HTMLElement,\n\t\t\"default\": true,\n\t\tindividualSlots: true,\n\t\tinvalidateOnChildChange: {\n\t\t\tproperties: true,\n\t\t\tslots: false,\n\t\t},\n\t})\n\tpages!: DefaultSlot<UserSettingsView>;\n\n\t/**\n\t * Defines the tab views of the user settings item.\n\t *\n\t * @public\n\t */\n\t@slot({\n\t\ttype: HTMLElement,\n\t\tindividualSlots: true,\n\t\tinvalidateOnChildChange: {\n\t\t\tproperties: true,\n\t\t\tslots: false,\n\t\t},\n\t})\n\ttabs!: Slot<UserSettingsView>;\n\n\t/**\n\t * Indicates whether any of the element siblings have icon.\n\t */\n\t@property({ type: Boolean, noAttribute: true })\n\t_siblingsWithIcon = false;\n\n\t@property({ type: Boolean, noAttribute: true })\n\t_inMobileView = false;\n\n\t/**\n\t * @private\n\t */\n\t_individualSlot?: string;\n\n\t/**\n\t * Indicates that focus should be moved to the first interactive content element\n\t * once the content becomes available (e.g. after the loading state finishes).\n\t * @private\n\t */\n\t_pendingContentFocus = false;\n\n\tonAfterRendering() {\n\t\tif (this._pendingContentFocus && !this.loading) {\n\t\t\tthis._pendingContentFocus = false;\n\t\t\tthis._focusFirstContentElementWhenReady();\n\t\t}\n\t}\n\n\tget _hasSelectedPageView() {\n\t\treturn this.pages.some(view => view.selected);\n\t}\n\n\tget _selectedPageView() {\n\t\treturn this.pages.find(view => view.selected) || this.pages[0];\n\t}\n\n\tget ariaLabelledByText() {\n\t\treturn `${this.text} ${this.accessibleName || \"\"}`.trim();\n\t}\n\n\tget _tooltip() {\n\t\treturn this.tooltip ? this.tooltip : this.text;\n\t}\n\n\tget _icon() {\n\t\treturn this.icon;\n\t}\n\n\t_handleBackButtonClick() {\n\t\tif (this._hasSelectedPageView && this._selectedPageView.secondary) {\n\t\t\tconst selectedPageView = this._selectedPageView;\n\t\t\tconst eventPrevented = !this.fireDecoratorEvent(\"selection-change\", {\n\t\t\t\tview: selectedPageView,\n\t\t\t});\n\n\t\t\tif (!eventPrevented) {\n\t\t\t\tselectedPageView.selected = false;\n\t\t\t}\n\t\t} else {\n\t\t\tthis.fireDecoratorEvent(\"_collapse\");\n\t\t}\n\t}\n\n\t_handleTabSelect(e: CustomEvent<TabContainerTabSelectEventDetail>) {\n\t\tconst tab = e.detail.tab as Tab & { associatedSettingView: UserSettingsView };\n\t\tconst tabView = tab.associatedSettingView;\n\t\tconst eventPrevented = !this.fireDecoratorEvent(\"selection-change\", {\n\t\t\tview: tabView,\n\t\t});\n\n\t\tif (eventPrevented) {\n\t\t\te.preventDefault();\n\t\t} else {\n\t\t\tthis.tabs.forEach(view => {\n\t\t\t\tview.selected = false;\n\t\t\t});\n\t\t\ttabView.selected = true;\n\t\t}\n\t}\n\n\tget _shouldShowBackButton() {\n\t\treturn !!(this._inMobileView || (this._hasSelectedPageView && this._selectedPageView.secondary));\n\t}\n\n\t/**\n\t * Moves the focus to the first interactive element of the item's content,\n\t * skipping the navigation back button in the header.\n\t *\n\t * If the content is not yet available because the item is in loading state,\n\t * the focus is deferred until the loading finishes and the content is rendered.\n\t * @private\n\t */\n\tfocusFirstContentElement() {\n\t\tif (this.loading) {\n\t\t\tthis._pendingContentFocus = true;\n\t\t\treturn;\n\t\t}\n\n\t\tthis._focusFirstContentElement();\n\t}\n\n\tasync _focusFirstContentElementWhenReady() {\n\t\t// The content (and its slotted views) may still be settling after the loading\n\t\t// state clears, so wait for the render to finish before moving the focus.\n\t\tawait renderFinished();\n\t\tthis._focusFirstContentElement();\n\t}\n\n\tasync _focusFirstContentElement() {\n\t\tconst root = this.getDomRef();\n\t\tif (!root) {\n\t\t\treturn;\n\t\t}\n\n\t\t// The content is rendered right after the header (which holds the back button),\n\t\t// so start the focus lookup from the element following the header.\n\t\tconst header = root.querySelector<HTMLElement>(\".ui5-user-settings-item-header-container\");\n\t\tconst contentElement = (header?.nextElementSibling || root.firstElementChild) as HTMLElement | null;\n\t\tif (!contentElement) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst focusable = await getFirstFocusableElement(contentElement, true);\n\t\tfocusable?.focus();\n\t}\n\n\tcaptureRef(this: UserSettingsView, ref: HTMLElement & { associatedSettingView?: UserSettingsView} | null) {\n\t\tif (ref) {\n\t\t\tref.associatedSettingView = this;\n\t\t}\n\t}\n}\n\nUserSettingsItem.define();\n\nexport default UserSettingsItem;\nexport type {\n\tUserSettingsItemViewSelectEventDetail,\n\tUserSettingsItemBackClickEventDetail,\n};\n"]}
1
+ {"version":3,"file":"UserSettingsItem.js","sourceRoot":"","sources":["../src/UserSettingsItem.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AAEpE,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,EACN,aAAa,EAAE,QAAQ,EAAE,UAAU,IAAI,IAAI,EAAE,WAAW,IAAI,KAAK,GACjE,MAAM,4CAA4C,CAAC;AAGpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,wDAAwD,CAAC;AAClG,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,wBAAwB,MAAM,+BAA+B,CAAC;AAErE,OAAO,mBAAmB,MAAM,4CAA4C,CAAC;AAU7E;;;;;;;;;;;;;;;;;;GAkBG;AAyBH,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,UAAU;IAAzC;;QAOC;;;;;WAKG;QAEH,SAAI,GAAG,EAAE,CAAC;QAEV;;;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QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;2DACrB;AAG1B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;uDACzB;AAlIjB,gBAAgB;IAxBrB,aAAa,CAAC;QACd,GAAG,EAAE,wBAAwB;QAC7B,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,wBAAwB;QAClC,MAAM,EAAE,CAAC,mBAAmB,CAAC;KAC7B,CAAC;IAEF;;;;OAIG;;IACF,KAAK,CAAC,kBAAkB,EAAE;QAC1B,UAAU,EAAE,IAAI;KAChB,CAAC;IAEF;;;OAGG;;IACF,KAAK,CAAC,WAAW,EAAE;QACnB,OAAO,EAAE,IAAI;KACb,CAAC;GAEI,gBAAgB,CAmRrB;AAED,gBAAgB,CAAC,MAAM,EAAE,CAAC;AAE1B,eAAe,gBAAgB,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { DefaultSlot, Slot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport {\n\tcustomElement, property, slotStrict as slot, eventStrict as event,\n} from \"@ui5/webcomponents-base/dist/decorators.js\";\nimport type { TabContainerTabSelectEventDetail } from \"@ui5/webcomponents/dist/TabContainer.js\";\nimport type Tab from \"@ui5/webcomponents/dist/Tab.js\";\nimport { getFirstFocusableElement } from \"@ui5/webcomponents-base/dist/util/FocusableElements.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport UserSettingsItemTemplate from \"./UserSettingsItemTemplate.js\";\nimport type UserSettingsView from \"./UserSettingsView.js\";\nimport UserSettingsItemCss from \"./generated/themes/UserSettingsItem.css.js\";\n\ntype UserSettingsItemViewSelectEventDetail = {\n\tview: UserSettingsView;\n}\n\ntype UserSettingsItemBackClickEventDetail = {\n\tview: UserSettingsView;\n}\n\n/**\n * @class\n * ### Overview\n *\n * The `ui5-user-settings-item` represents an item in the `ui5-user-settings-dialog`.\n *\n * ### ES6 Module Import\n * `import \"@ui5/webcomponents-fiori/dist/UserSettingsItem.js\";`\n *\n * You can disable the <code>UserSettingsItem</code> by setting the <code>enabled</code> property to <code>false</code>,\n * or use the <code>UserSettingsItem</code> in read-only mode by setting the <code>editable</code> property to false.\n *\n * <b>Note:</b> Disabled and read-only states shouldn't be used together.\n *\n * @constructor\n * @extends UI5Element\n * @public\n * @since 2.8.0\n */\n@customElement({\n\ttag: \"ui5-user-settings-item\",\n\trenderer: jsxRenderer,\n\ttemplate: UserSettingsItemTemplate,\n\tstyles: [UserSettingsItemCss],\n})\n\n/**\n * Fired when a selected view changed.\n * @param {UserSettingsView} view The selected `view`.\n * @public\n */\n@event(\"selection-change\", {\n\tcancelable: true,\n})\n\n/**\n *\n * @private\n */\n@event(\"_collapse\", {\n\tbubbles: true,\n})\n\nclass UserSettingsItem extends UI5Element {\n\teventDetails!: {\n\t\t\"_collapse\": void,\n\t\t\"selection-change\": UserSettingsItemViewSelectEventDetail,\n\t\t\"back-click\": UserSettingsItemBackClickEventDetail,\n\n\t}\n\t/**\n\t * Defines the text of the user settings item.\n\t *\n\t * @public\n\t * @default \"\"\n\t */\n\t@property({ type: String })\n\ttext = \"\";\n\n\t/**\n\t * Defines the tooltip of the component.\n\t *\n\t * A tooltip attribute should be provided to represent the meaning or function when the component is collapsed and only the icon is visible.\n\t * @default \"\"\n\t * @public\n\t */\n\t@property({ type: String })\n\ttooltip = \"\";\n\n\t/**\n\t * Defines the headerText of the item.\n\t *\n\t * @public\n\t * @default \"\"\n\t */\n\t@property({ type: String })\n\theaderText?: string;\n\n\t/**\n\t * Shows item tab.\n\t *\n\t * @public\n\t * @default false\n\t */\n\t@property({ type: Boolean })\n\tselected = false;\n\n\t/**\n\t * Defines whether the component is in disabled state.\n\t *\n\t * **Note:** A disabled component is completely noninteractive.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled = false;\n\n\t/**\n\t * Indicates whether a loading indicator should be shown.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tloading = false;\n\n\t/**\n\t * Indicates why the control is in loading state.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tloadingReason?: string;\n\n\t/**\n\t * Defines the icon of the component.\n\t *\n\t * @default \"globe\"\n\t * @public\n\t */\n\t@property({ type: String })\n\ticon = \"globe\";\n\n\t/**\n\t * Defines the accessible ARIA name of the component.\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\taccessibleName?: string;\n\n\t/**\n\t * Defines the page views of the user settings item.\n\t *\n\t * If there are no tab views, the first page view will be shown unless there is selected one. If there is selected page\n\t * view it will be shown no matter if there are tab views.\n\t *\n\t * The page views are displayed by default if there is no selected tab view.\n\t *\n\t * @public\n\t */\n\t@slot({\n\t\ttype: HTMLElement,\n\t\t\"default\": true,\n\t\tindividualSlots: true,\n\t\tinvalidateOnChildChange: {\n\t\t\tproperties: true,\n\t\t\tslots: false,\n\t\t},\n\t})\n\tpages!: DefaultSlot<UserSettingsView>;\n\n\t/**\n\t * Defines the tab views of the user settings item.\n\t *\n\t * @public\n\t */\n\t@slot({\n\t\ttype: HTMLElement,\n\t\tindividualSlots: true,\n\t\tinvalidateOnChildChange: {\n\t\t\tproperties: true,\n\t\t\tslots: false,\n\t\t},\n\t})\n\ttabs!: Slot<UserSettingsView>;\n\n\t/**\n\t * Indicates whether any of the element siblings have icon.\n\t */\n\t@property({ type: Boolean, noAttribute: true })\n\t_siblingsWithIcon = false;\n\n\t@property({ type: Boolean, noAttribute: true })\n\t_inMobileView = false;\n\n\t/**\n\t * @private\n\t */\n\t_individualSlot?: string;\n\n\t/**\n\t * Indicates that focus should be moved to the first interactive content element\n\t * once the content becomes available (e.g. after the loading state finishes).\n\t * @private\n\t */\n\t_pendingContentFocus = false;\n\n\tonAfterRendering() {\n\t\tif (this._pendingContentFocus && !this.loading) {\n\t\t\tthis._pendingContentFocus = false;\n\t\t\tthis._focusFirstContentElementWhenReady();\n\t\t}\n\t}\n\n\tget _hasSelectedPageView() {\n\t\treturn this.pages.some(view => view.selected);\n\t}\n\n\tget _selectedPageView() {\n\t\treturn this.pages.find(view => view.selected) || this.pages[0];\n\t}\n\n\tget ariaLabelledByText() {\n\t\treturn `${this.text} ${this.accessibleName || \"\"}`.trim();\n\t}\n\n\tget _tooltip() {\n\t\treturn this.tooltip ? this.tooltip : this.text;\n\t}\n\n\tget _icon() {\n\t\treturn this.icon;\n\t}\n\n\t_handleBackButtonClick() {\n\t\tif (this._hasSelectedPageView && this._selectedPageView.secondary) {\n\t\t\tconst selectedPageView = this._selectedPageView;\n\t\t\tconst eventPrevented = !this.fireDecoratorEvent(\"selection-change\", {\n\t\t\t\tview: selectedPageView,\n\t\t\t});\n\n\t\t\tif (!eventPrevented) {\n\t\t\t\tselectedPageView.selected = false;\n\t\t\t\tconst primaryView = this.pages?.find(view => !view.secondary && view !== selectedPageView);\n\t\t\t\trenderFinished().then(() => {\n\t\t\t\t\tif (!this.isConnected) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tconst lastItem = (primaryView as any)?._lastNavigatedItem;\n\t\t\t\t\tif (lastItem?.getFocusDomRef) {\n\t\t\t\t\t\tlastItem.getFocusDomRef()?.focus();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis._focusFirstContentElement();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tthis.fireDecoratorEvent(\"_collapse\");\n\t\t}\n\t}\n\n\t_handleTabSelect(e: CustomEvent<TabContainerTabSelectEventDetail>) {\n\t\tconst tab = e.detail.tab as Tab & { associatedSettingView: UserSettingsView };\n\t\tconst tabView = tab.associatedSettingView;\n\t\tconst eventPrevented = !this.fireDecoratorEvent(\"selection-change\", {\n\t\t\tview: tabView,\n\t\t});\n\n\t\tif (eventPrevented) {\n\t\t\te.preventDefault();\n\t\t} else {\n\t\t\tthis.tabs.forEach(view => {\n\t\t\t\tview.selected = false;\n\t\t\t});\n\t\t\ttabView.selected = true;\n\t\t}\n\t}\n\n\tget _shouldShowBackButton() {\n\t\treturn !!(this._inMobileView || (this._hasSelectedPageView && this._selectedPageView.secondary));\n\t}\n\n\t/**\n\t * Moves the focus to the first interactive element of the item's content,\n\t * skipping the navigation back button in the header.\n\t *\n\t * If the content is not yet available because the item is in loading state,\n\t * the focus is deferred until the loading finishes and the content is rendered.\n\t * @private\n\t */\n\tfocusFirstContentElement() {\n\t\tif (this.loading) {\n\t\t\tthis._pendingContentFocus = true;\n\t\t\treturn;\n\t\t}\n\n\t\tthis._focusFirstContentElement();\n\t}\n\n\tasync _focusFirstContentElementWhenReady() {\n\t\t// The content (and its slotted views) may still be settling after the loading\n\t\t// state clears, so wait for the render to finish before moving the focus.\n\t\tawait renderFinished();\n\t\tthis._focusFirstContentElement();\n\t}\n\n\tasync _focusFirstContentElement() {\n\t\tconst root = this.getDomRef();\n\t\tif (!root) {\n\t\t\treturn;\n\t\t}\n\n\t\t// The content is rendered right after the header (which holds the back button),\n\t\t// so start the focus lookup from the element following the header.\n\t\tconst header = root.querySelector<HTMLElement>(\".ui5-user-settings-item-header-container\");\n\t\tconst contentElement = (header?.nextElementSibling || root.firstElementChild) as HTMLElement | null;\n\t\tif (!contentElement) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst focusable = await getFirstFocusableElement(contentElement, true);\n\t\tfocusable?.focus();\n\t}\n\n\t/**\n\t * @private\n\t * @since 2.27.0\n\t */\n\t_focusBackButton() {\n\t\tconst backButton = this.shadowRoot?.querySelector<HTMLElement>(\".ui5-user-settings-item-collapse-btn\");\n\t\tbackButton?.focus();\n\t}\n\n\tcaptureRef(this: UserSettingsView, ref: HTMLElement & { associatedSettingView?: UserSettingsView} | null) {\n\t\tif (ref) {\n\t\t\tref.associatedSettingView = this;\n\t\t}\n\t}\n}\n\nUserSettingsItem.define();\n\nexport default UserSettingsItem;\nexport type {\n\tUserSettingsItemViewSelectEventDetail,\n\tUserSettingsItemBackClickEventDetail,\n};\n"]}
@@ -0,0 +1,82 @@
1
+ import UserSettingsView from "./UserSettingsView.js";
2
+ import type UserSettingsNotificationsViewItem from "./UserSettingsNotificationsViewItem.js";
3
+ import type UserSettingsNotificationsViewGroup from "./UserSettingsNotificationsViewGroup.js";
4
+ import type { ListItemClickEventDetail } from "@ui5/webcomponents/dist/List.js";
5
+ import type I18nBundle from "@ui5/webcomponents-base/dist/i18nBundle.js";
6
+ import type { DefaultSlot, Slot } from "@ui5/webcomponents-base/dist/UI5Element.js";
7
+ type UserSettingsNotificationsViewItemClickEventDetail = {
8
+ item: UserSettingsNotificationsViewItem;
9
+ };
10
+ /**
11
+ * @class
12
+ * ### Overview
13
+ *
14
+ * The `ui5-user-settings-notifications-view` represents a view displayed in the
15
+ * `ui5-user-settings-item` that lists notification preferences. Individual settings
16
+ * are represented by `ui5-user-settings-notifications-view-item` elements, optionally
17
+ * grouped by `ui5-user-settings-notifications-view-group`.
18
+ *
19
+ * When a navigable item is clicked, the view drills into a sibling secondary view of
20
+ * its parent `ui5-user-settings-item`. When an item's `item-key` matches a target
21
+ * view's `id`, that view is opened and keeps its own `text`. Otherwise the first
22
+ * sibling marked as `secondary` is opened and its `text` is set to the clicked
23
+ * item's `text` so the drill-in header reflects the origin.
24
+ *
25
+ * Apps can override this behavior by preventing the `item-click` event.
26
+ *
27
+ * Applications should listen to the item's `switch-change` event (which bubbles) to
28
+ * be notified when a switch is toggled.
29
+ *
30
+ * Additional content (e.g. an information message strip) can be placed via the
31
+ * `additionalContent` slot, which is rendered above the list.
32
+ *
33
+ * ### ES6 Module Import
34
+ * `import "@ui5/webcomponents-fiori/dist/UserSettingsNotificationsView.js";`
35
+ *
36
+ * @constructor
37
+ * @extends UserSettingsView
38
+ * @public
39
+ * @since 2.27.0
40
+ */
41
+ declare class UserSettingsNotificationsView extends UserSettingsView {
42
+ eventDetails: {
43
+ "item-click": UserSettingsNotificationsViewItemClickEventDetail;
44
+ };
45
+ /**
46
+ * Defines the items of the component. Can be a mix of
47
+ * `ui5-user-settings-notifications-view-item` and
48
+ * `ui5-user-settings-notifications-view-group` elements.
49
+ *
50
+ * @public
51
+ */
52
+ items: DefaultSlot<UserSettingsNotificationsViewGroup | UserSettingsNotificationsViewItem>;
53
+ /**
54
+ * Defines header items rendered above the grouped items list.
55
+ * Each item is wrapped in a `role="form"` landmark — a separate Tab stop.
56
+ * Use this slot for product-level toggles (e.g. "Allow Notifications") that appear
57
+ * above the notification-type groups.
58
+ *
59
+ * @public
60
+ */
61
+ headerItems: Slot<UserSettingsNotificationsViewItem>;
62
+ /**
63
+ * Defines additional content displayed above the items list.
64
+ *
65
+ * @public
66
+ */
67
+ additionalContent: Slot<HTMLElement>;
68
+ static i18nBundle: I18nBundle;
69
+ getAllItems(): Array<UserSettingsNotificationsViewItem>;
70
+ getItemByKey(itemKey: string): UserSettingsNotificationsViewItem | undefined;
71
+ get _hasHeaderItems(): boolean;
72
+ _lastNavigatedItem: UserSettingsNotificationsViewItem | null;
73
+ get _listAccessibleName(): string;
74
+ _navigateToSecondaryView(item: UserSettingsNotificationsViewItem): void;
75
+ _processItemClick(item: UserSettingsNotificationsViewItem): void;
76
+ _handleItemClick: (e: CustomEvent<ListItemClickEventDetail>) => void;
77
+ _handleFormItemClick: (e: CustomEvent<{
78
+ item: UserSettingsNotificationsViewItem;
79
+ }>) => void;
80
+ }
81
+ export default UserSettingsNotificationsView;
82
+ export type { UserSettingsNotificationsViewItemClickEventDetail, };
@@ -0,0 +1,167 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var UserSettingsNotificationsView_1;
8
+ import UserSettingsView from "./UserSettingsView.js";
9
+ import UserSettingsNotificationsViewTemplate from "./UserSettingsNotificationsViewTemplate.js";
10
+ import UserSettingViewCss from "./generated/themes/UserSettingsView.css.js";
11
+ import UserSettingsNotificationsViewCss from "./generated/themes/UserSettingsNotificationsView.css.js";
12
+ import { isInstanceOfUserSettingsNotificationsViewItem } from "./UserSettingsNotificationsViewItem.js";
13
+ import { isInstanceOfUserSettingsNotificationsViewGroup } from "./UserSettingsNotificationsViewGroup.js";
14
+ import { getFirstFocusableElement } from "@ui5/webcomponents-base/dist/util/FocusableElements.js";
15
+ import { renderFinished } from "@ui5/webcomponents-base/dist/Render.js";
16
+ import i18n from "@ui5/webcomponents-base/dist/decorators/i18n.js";
17
+ import { customElement, slotStrict as slot, eventStrict as event, } from "@ui5/webcomponents-base/dist/decorators.js";
18
+ import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
19
+ import { USER_SETTINGS_NOTIFICATIONS_LIST_LABEL, USER_SETTINGS_NOTIFICATIONS_PREFERENCES_LIST_LABEL, } from "./generated/i18n/i18n-defaults.js";
20
+ /**
21
+ * @class
22
+ * ### Overview
23
+ *
24
+ * The `ui5-user-settings-notifications-view` represents a view displayed in the
25
+ * `ui5-user-settings-item` that lists notification preferences. Individual settings
26
+ * are represented by `ui5-user-settings-notifications-view-item` elements, optionally
27
+ * grouped by `ui5-user-settings-notifications-view-group`.
28
+ *
29
+ * When a navigable item is clicked, the view drills into a sibling secondary view of
30
+ * its parent `ui5-user-settings-item`. When an item's `item-key` matches a target
31
+ * view's `id`, that view is opened and keeps its own `text`. Otherwise the first
32
+ * sibling marked as `secondary` is opened and its `text` is set to the clicked
33
+ * item's `text` so the drill-in header reflects the origin.
34
+ *
35
+ * Apps can override this behavior by preventing the `item-click` event.
36
+ *
37
+ * Applications should listen to the item's `switch-change` event (which bubbles) to
38
+ * be notified when a switch is toggled.
39
+ *
40
+ * Additional content (e.g. an information message strip) can be placed via the
41
+ * `additionalContent` slot, which is rendered above the list.
42
+ *
43
+ * ### ES6 Module Import
44
+ * `import "@ui5/webcomponents-fiori/dist/UserSettingsNotificationsView.js";`
45
+ *
46
+ * @constructor
47
+ * @extends UserSettingsView
48
+ * @public
49
+ * @since 2.27.0
50
+ */
51
+ let UserSettingsNotificationsView = UserSettingsNotificationsView_1 = class UserSettingsNotificationsView extends UserSettingsView {
52
+ constructor() {
53
+ super(...arguments);
54
+ this._lastNavigatedItem = null;
55
+ this._handleItemClick = (e) => {
56
+ this._processItemClick(e.detail.item);
57
+ };
58
+ this._handleFormItemClick = (e) => {
59
+ this._processItemClick(e.detail.item);
60
+ };
61
+ }
62
+ getAllItems() {
63
+ const allItems = [...this.headerItems];
64
+ this.items.forEach(item => {
65
+ if (isInstanceOfUserSettingsNotificationsViewGroup(item)) {
66
+ item.items.forEach(child => {
67
+ if (isInstanceOfUserSettingsNotificationsViewItem(child)) {
68
+ allItems.push(child);
69
+ }
70
+ });
71
+ }
72
+ else if (isInstanceOfUserSettingsNotificationsViewItem(item)) {
73
+ allItems.push(item);
74
+ }
75
+ });
76
+ return allItems;
77
+ }
78
+ getItemByKey(itemKey) {
79
+ return this.getAllItems().find(item => item.itemKey === itemKey);
80
+ }
81
+ get _hasHeaderItems() {
82
+ return this.headerItems.length > 0;
83
+ }
84
+ get _listAccessibleName() {
85
+ return this.secondary
86
+ ? UserSettingsNotificationsView_1.i18nBundle.getText(USER_SETTINGS_NOTIFICATIONS_PREFERENCES_LIST_LABEL)
87
+ : UserSettingsNotificationsView_1.i18nBundle.getText(USER_SETTINGS_NOTIFICATIONS_LIST_LABEL);
88
+ }
89
+ _navigateToSecondaryView(item) {
90
+ const parentItem = this.closest("[ui5-user-settings-item]");
91
+ const secondaryViews = parentItem?.pages?.filter(view => view !== this && view.secondary) ?? [];
92
+ const matched = item.itemKey ? secondaryViews.find(view => view.id === item.itemKey) : undefined;
93
+ const target = matched ?? secondaryViews[0];
94
+ if (!target) {
95
+ return;
96
+ }
97
+ if (!matched || !target.text) {
98
+ target.text = item.text;
99
+ }
100
+ this.selected = false;
101
+ this._lastNavigatedItem = item;
102
+ target.selected = true;
103
+ renderFinished().then(async () => {
104
+ if (!this.isConnected) {
105
+ return;
106
+ }
107
+ await target._waitForDomRef();
108
+ const focusable = await getFirstFocusableElement(target.getDomRef());
109
+ focusable?.focus();
110
+ });
111
+ }
112
+ _processItemClick(item) {
113
+ if (!isInstanceOfUserSettingsNotificationsViewItem(item) || !item.navigable) {
114
+ return;
115
+ }
116
+ if (!this.fireDecoratorEvent("item-click", { item })) {
117
+ return;
118
+ }
119
+ this._navigateToSecondaryView(item);
120
+ }
121
+ };
122
+ __decorate([
123
+ slot({
124
+ type: HTMLElement,
125
+ "default": true,
126
+ invalidateOnChildChange: true,
127
+ })
128
+ ], UserSettingsNotificationsView.prototype, "items", void 0);
129
+ __decorate([
130
+ slot({
131
+ type: HTMLElement,
132
+ invalidateOnChildChange: true,
133
+ individualSlots: true,
134
+ })
135
+ ], UserSettingsNotificationsView.prototype, "headerItems", void 0);
136
+ __decorate([
137
+ slot({
138
+ type: HTMLElement,
139
+ })
140
+ ], UserSettingsNotificationsView.prototype, "additionalContent", void 0);
141
+ __decorate([
142
+ i18n("@ui5/webcomponents-fiori")
143
+ ], UserSettingsNotificationsView, "i18nBundle", void 0);
144
+ UserSettingsNotificationsView = UserSettingsNotificationsView_1 = __decorate([
145
+ customElement({
146
+ tag: "ui5-user-settings-notifications-view",
147
+ renderer: jsxRenderer,
148
+ template: UserSettingsNotificationsViewTemplate,
149
+ styles: [UserSettingViewCss, UserSettingsNotificationsViewCss],
150
+ })
151
+ /**
152
+ * Fired when a navigable item in the list is clicked.
153
+ *
154
+ * The event is cancelable: preventing it skips the built-in drill-in to the
155
+ * parent's secondary view, allowing the application to take over.
156
+ *
157
+ * @param {UserSettingsNotificationsViewItem} item The clicked notifications view item.
158
+ * @public
159
+ */
160
+ ,
161
+ event("item-click", {
162
+ cancelable: true,
163
+ })
164
+ ], UserSettingsNotificationsView);
165
+ UserSettingsNotificationsView.define();
166
+ export default UserSettingsNotificationsView;
167
+ //# sourceMappingURL=UserSettingsNotificationsView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserSettingsNotificationsView.js","sourceRoot":"","sources":["../src/UserSettingsNotificationsView.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AACrD,OAAO,qCAAqC,MAAM,4CAA4C,CAAC;AAC/F,OAAO,kBAAkB,MAAM,4CAA4C,CAAC;AAC5E,OAAO,gCAAgC,MAAM,yDAAyD,CAAC;AAEvG,OAAO,EAAE,6CAA6C,EAAE,MAAM,wCAAwC,CAAC;AAEvG,OAAO,EAAE,8CAA8C,EAAE,MAAM,yCAAyC,CAAC;AAGzG,OAAO,EAAE,wBAAwB,EAAE,MAAM,wDAAwD,CAAC;AAClG,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAGnE,OAAO,EACN,aAAa,EAAE,UAAU,IAAI,IAAI,EAAE,WAAW,IAAI,KAAK,GACvD,MAAM,4CAA4C,CAAC;AACpD,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAE/E,OAAO,EACN,sCAAsC,EACtC,kDAAkD,GAClD,MAAM,mCAAmC,CAAC;AAM3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAqBH,IAAM,6BAA6B,qCAAnC,MAAM,6BAA8B,SAAQ,gBAAgB;IAA5D;;QAyEC,uBAAkB,GAA6C,IAAI,CAAC;QA+CpE,qBAAgB,GAAG,CAAC,CAAwC,EAAE,EAAE;YAC/D,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,MAAM,CAAC,IAAyC,CAAC,CAAC;QAC5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YAC7E,OAAO;QACR,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;YACtD,OAAO;QACR,CAAC;QACD,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC;CASD,CAAA;AA9GA;IALC,IAAI,CAAC;QACL,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,IAAI;QACf,uBAAuB,EAAE,IAAI;KAC7B,CAAC;4DAC0F;AAe5F;IALC,IAAI,CAAC;QACL,IAAI,EAAE,WAAW;QACjB,uBAAuB,EAAE,IAAI;QAC7B,eAAe,EAAE,IAAI;KACrB,CAAC;kEACoD;AAUtD;IAHC,IAAI,CAAC;QACL,IAAI,EAAE,WAAW;KACjB,CAAC;wEACoC;AAG/B;IADN,IAAI,CAAC,0BAA0B,CAAC;uDACH;AA7CzB,6BAA6B;IApBlC,aAAa,CAAC;QACd,GAAG,EAAE,sCAAsC;QAC3C,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,qCAAqC;QAC/C,MAAM,EAAE,CAAC,kBAAkB,EAAE,gCAAgC,CAAC;KAC9D,CAAC;IAEF;;;;;;;;OAQG;;IACF,KAAK,CAAC,YAAY,EAAE;QACpB,UAAU,EAAE,IAAI;KAChB,CAAC;GAEI,6BAA6B,CA+HlC;AAED,6BAA6B,CAAC,MAAM,EAAE,CAAC;AACvC,eAAe,6BAA6B,CAAC","sourcesContent":["import UserSettingsView from \"./UserSettingsView.js\";\nimport UserSettingsNotificationsViewTemplate from \"./UserSettingsNotificationsViewTemplate.js\";\nimport UserSettingViewCss from \"./generated/themes/UserSettingsView.css.js\";\nimport UserSettingsNotificationsViewCss from \"./generated/themes/UserSettingsNotificationsView.css.js\";\nimport type UserSettingsNotificationsViewItem from \"./UserSettingsNotificationsViewItem.js\";\nimport { isInstanceOfUserSettingsNotificationsViewItem } from \"./UserSettingsNotificationsViewItem.js\";\nimport type UserSettingsNotificationsViewGroup from \"./UserSettingsNotificationsViewGroup.js\";\nimport { isInstanceOfUserSettingsNotificationsViewGroup } from \"./UserSettingsNotificationsViewGroup.js\";\nimport type UserSettingsItem from \"./UserSettingsItem.js\";\nimport type { ListItemClickEventDetail } from \"@ui5/webcomponents/dist/List.js\";\nimport { getFirstFocusableElement } from \"@ui5/webcomponents-base/dist/util/FocusableElements.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\n\nimport {\n\tcustomElement, slotStrict as slot, eventStrict as event,\n} from \"@ui5/webcomponents-base/dist/decorators.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport type { DefaultSlot, Slot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport {\n\tUSER_SETTINGS_NOTIFICATIONS_LIST_LABEL,\n\tUSER_SETTINGS_NOTIFICATIONS_PREFERENCES_LIST_LABEL,\n} from \"./generated/i18n/i18n-defaults.js\";\n\ntype UserSettingsNotificationsViewItemClickEventDetail = {\n\titem: UserSettingsNotificationsViewItem;\n}\n\n/**\n * @class\n * ### Overview\n *\n * The `ui5-user-settings-notifications-view` represents a view displayed in the\n * `ui5-user-settings-item` that lists notification preferences. Individual settings\n * are represented by `ui5-user-settings-notifications-view-item` elements, optionally\n * grouped by `ui5-user-settings-notifications-view-group`.\n *\n * When a navigable item is clicked, the view drills into a sibling secondary view of\n * its parent `ui5-user-settings-item`. When an item's `item-key` matches a target\n * view's `id`, that view is opened and keeps its own `text`. Otherwise the first\n * sibling marked as `secondary` is opened and its `text` is set to the clicked\n * item's `text` so the drill-in header reflects the origin.\n *\n * Apps can override this behavior by preventing the `item-click` event.\n *\n * Applications should listen to the item's `switch-change` event (which bubbles) to\n * be notified when a switch is toggled.\n *\n * Additional content (e.g. an information message strip) can be placed via the\n * `additionalContent` slot, which is rendered above the list.\n *\n * ### ES6 Module Import\n * `import \"@ui5/webcomponents-fiori/dist/UserSettingsNotificationsView.js\";`\n *\n * @constructor\n * @extends UserSettingsView\n * @public\n * @since 2.27.0\n */\n@customElement({\n\ttag: \"ui5-user-settings-notifications-view\",\n\trenderer: jsxRenderer,\n\ttemplate: UserSettingsNotificationsViewTemplate,\n\tstyles: [UserSettingViewCss, UserSettingsNotificationsViewCss],\n})\n\n/**\n * Fired when a navigable item in the list is clicked.\n *\n * The event is cancelable: preventing it skips the built-in drill-in to the\n * parent's secondary view, allowing the application to take over.\n *\n * @param {UserSettingsNotificationsViewItem} item The clicked notifications view item.\n * @public\n */\n@event(\"item-click\", {\n\tcancelable: true,\n})\n\nclass UserSettingsNotificationsView extends UserSettingsView {\n\teventDetails!: {\n\t\t\"item-click\": UserSettingsNotificationsViewItemClickEventDetail;\n\t}\n\n\t/**\n\t * Defines the items of the component. Can be a mix of\n\t * `ui5-user-settings-notifications-view-item` and\n\t * `ui5-user-settings-notifications-view-group` elements.\n\t *\n\t * @public\n\t */\n\t@slot({\n\t\ttype: HTMLElement,\n\t\t\"default\": true,\n\t\tinvalidateOnChildChange: true,\n\t})\n\titems!: DefaultSlot<UserSettingsNotificationsViewGroup | UserSettingsNotificationsViewItem>;\n\n\t/**\n\t * Defines header items rendered above the grouped items list.\n\t * Each item is wrapped in a `role=\"form\"` landmark — a separate Tab stop.\n\t * Use this slot for product-level toggles (e.g. \"Allow Notifications\") that appear\n\t * above the notification-type groups.\n\t *\n\t * @public\n\t */\n\t@slot({\n\t\ttype: HTMLElement,\n\t\tinvalidateOnChildChange: true,\n\t\tindividualSlots: true,\n\t})\n\theaderItems!: Slot<UserSettingsNotificationsViewItem>;\n\n\t/**\n\t * Defines additional content displayed above the items list.\n\t *\n\t * @public\n\t */\n\t@slot({\n\t\ttype: HTMLElement,\n\t})\n\tadditionalContent!: Slot<HTMLElement>;\n\n\t@i18n(\"@ui5/webcomponents-fiori\")\n\tstatic i18nBundle: I18nBundle;\n\n\tgetAllItems(): Array<UserSettingsNotificationsViewItem> {\n\t\tconst allItems: Array<UserSettingsNotificationsViewItem> = [...this.headerItems];\n\n\t\tthis.items.forEach(item => {\n\t\t\tif (isInstanceOfUserSettingsNotificationsViewGroup(item)) {\n\t\t\t\titem.items.forEach(child => {\n\t\t\t\t\tif (isInstanceOfUserSettingsNotificationsViewItem(child)) {\n\t\t\t\t\t\tallItems.push(child);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else if (isInstanceOfUserSettingsNotificationsViewItem(item)) {\n\t\t\t\tallItems.push(item);\n\t\t\t}\n\t\t});\n\n\t\treturn allItems;\n\t}\n\n\tgetItemByKey(itemKey: string): UserSettingsNotificationsViewItem | undefined {\n\t\treturn this.getAllItems().find(item => item.itemKey === itemKey);\n\t}\n\n\tget _hasHeaderItems(): boolean {\n\t\treturn this.headerItems.length > 0;\n\t}\n\n\t_lastNavigatedItem: UserSettingsNotificationsViewItem | null = null;\n\n\tget _listAccessibleName(): string {\n\t\treturn this.secondary\n\t\t\t? UserSettingsNotificationsView.i18nBundle.getText(USER_SETTINGS_NOTIFICATIONS_PREFERENCES_LIST_LABEL)\n\t\t\t: UserSettingsNotificationsView.i18nBundle.getText(USER_SETTINGS_NOTIFICATIONS_LIST_LABEL);\n\t}\n\n\t_navigateToSecondaryView(item: UserSettingsNotificationsViewItem) {\n\t\tconst parentItem = this.closest<UserSettingsItem>(\"[ui5-user-settings-item]\");\n\t\tconst secondaryViews = parentItem?.pages?.filter(view => view !== this && view.secondary) ?? [];\n\n\t\tconst matched = item.itemKey ? secondaryViews.find(view => view.id === item.itemKey) : undefined;\n\t\tconst target = matched ?? secondaryViews[0];\n\n\t\tif (!target) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!matched || !target.text) {\n\t\t\ttarget.text = item.text;\n\t\t}\n\n\t\tthis.selected = false;\n\t\tthis._lastNavigatedItem = item;\n\t\ttarget.selected = true;\n\n\t\trenderFinished().then(async () => {\n\t\t\tif (!this.isConnected) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tawait target._waitForDomRef();\n\t\t\tconst focusable = await getFirstFocusableElement(target.getDomRef()!);\n\t\t\tfocusable?.focus();\n\t\t});\n\t}\n\n\t_processItemClick(item: UserSettingsNotificationsViewItem) {\n\t\tif (!isInstanceOfUserSettingsNotificationsViewItem(item) || !item.navigable) {\n\t\t\treturn;\n\t\t}\n\t\tif (!this.fireDecoratorEvent(\"item-click\", { item })) {\n\t\t\treturn;\n\t\t}\n\t\tthis._navigateToSecondaryView(item);\n\t}\n\n\t_handleItemClick = (e: CustomEvent<ListItemClickEventDetail>) => {\n\t\tthis._processItemClick(e.detail.item as UserSettingsNotificationsViewItem);\n\t};\n\n\t_handleFormItemClick = (e: CustomEvent<{ item: UserSettingsNotificationsViewItem }>) => {\n\t\tthis._processItemClick(e.detail.item);\n\t};\n}\n\nUserSettingsNotificationsView.define();\nexport default UserSettingsNotificationsView;\nexport type {\n\tUserSettingsNotificationsViewItemClickEventDetail,\n};\n"]}
@@ -0,0 +1,29 @@
1
+ import ListItemGroup from "@ui5/webcomponents/dist/ListItemGroup.js";
2
+ import type UserSettingsNotificationsViewItem from "./UserSettingsNotificationsViewItem.js";
3
+ import type { DefaultSlot } from "@ui5/webcomponents-base/dist/UI5Element.js";
4
+ /**
5
+ * @class
6
+ * ### Overview
7
+ *
8
+ * The `ui5-user-settings-notifications-view-group` groups `ui5-user-settings-notifications-view-item`
9
+ * elements inside a `ui5-user-settings-notifications-view`. Its header renders as a plain bold
10
+ * section title with a separator line below, per the notifications design spec.
11
+ *
12
+ * ### ES6 Module Import
13
+ * `import "@ui5/webcomponents-fiori/dist/UserSettingsNotificationsViewGroup.js";`
14
+ *
15
+ * @constructor
16
+ * @extends ListItemGroup
17
+ * @public
18
+ * @since 2.27.0
19
+ */
20
+ declare class UserSettingsNotificationsViewGroup extends ListItemGroup {
21
+ /**
22
+ * Defines the items of the `ui5-user-settings-notifications-view-group`.
23
+ * @public
24
+ */
25
+ items: DefaultSlot<UserSettingsNotificationsViewItem>;
26
+ get isUserSettingsNotificationsViewGroup(): boolean;
27
+ }
28
+ export declare const isInstanceOfUserSettingsNotificationsViewGroup: (object: any) => object is UserSettingsNotificationsViewGroup;
29
+ export default UserSettingsNotificationsViewGroup;