@ui5/webcomponents-fiori 2.27.0-rc.0 → 2.27.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/README.md +3 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/DynamicPage.d.ts +1 -0
- package/dist/DynamicPage.js +5 -0
- package/dist/DynamicPage.js.map +1 -1
- package/dist/DynamicPageTemplate.js +2 -2
- package/dist/DynamicPageTemplate.js.map +1 -1
- package/dist/FlexibleColumnLayout.d.ts +1 -0
- package/dist/FlexibleColumnLayout.js +3 -0
- package/dist/FlexibleColumnLayout.js.map +1 -1
- package/dist/FlexibleColumnLayoutTemplate.js +3 -3
- package/dist/FlexibleColumnLayoutTemplate.js.map +1 -1
- package/dist/Search.d.ts +21 -0
- package/dist/Search.js +49 -9
- package/dist/Search.js.map +1 -1
- package/dist/ShellBarSearch.js +1 -1
- package/dist/ShellBarSearch.js.map +1 -1
- package/dist/SideNavigation.d.ts +4 -1
- package/dist/SideNavigation.js +72 -23
- package/dist/SideNavigation.js.map +1 -1
- package/dist/Timeline.d.ts +1 -0
- package/dist/Timeline.js +10 -0
- package/dist/Timeline.js.map +1 -1
- package/dist/UserMenuTemplate.js +2 -2
- package/dist/UserMenuTemplate.js.map +1 -1
- package/dist/UserSettingsItem.d.ts +5 -0
- package/dist/UserSettingsItem.js +21 -0
- package/dist/UserSettingsItem.js.map +1 -1
- package/dist/UserSettingsNotificationsView.d.ts +82 -0
- package/dist/UserSettingsNotificationsView.js +167 -0
- package/dist/UserSettingsNotificationsView.js.map +1 -0
- package/dist/UserSettingsNotificationsViewGroup.d.ts +29 -0
- package/dist/UserSettingsNotificationsViewGroup.js +49 -0
- package/dist/UserSettingsNotificationsViewGroup.js.map +1 -0
- package/dist/UserSettingsNotificationsViewItem.d.ts +100 -0
- package/dist/UserSettingsNotificationsViewItem.js +186 -0
- package/dist/UserSettingsNotificationsViewItem.js.map +1 -0
- package/dist/UserSettingsNotificationsViewItemTemplate.d.ts +2 -0
- package/dist/UserSettingsNotificationsViewItemTemplate.js +28 -0
- package/dist/UserSettingsNotificationsViewItemTemplate.js.map +1 -0
- package/dist/UserSettingsNotificationsViewTemplate.d.ts +2 -0
- package/dist/UserSettingsNotificationsViewTemplate.js +6 -0
- package/dist/UserSettingsNotificationsViewTemplate.js.map +1 -0
- package/dist/WizardTab.js +1 -1
- package/dist/WizardTab.js.map +1 -1
- package/dist/bundle.esm.js +3 -0
- package/dist/bundle.esm.js.map +1 -1
- package/dist/css/themes/DynamicPage.css +1 -1
- package/dist/css/themes/SideNavigation.css +1 -1
- package/dist/css/themes/SideNavigationGroup.css +1 -1
- package/dist/css/themes/TimelineGroupItem.css +1 -1
- package/dist/css/themes/TimelineItem.css +1 -1
- package/dist/css/themes/UserSettingsNotificationsView.css +1 -0
- package/dist/css/themes/UserSettingsNotificationsViewGroup.css +1 -0
- package/dist/css/themes/UserSettingsNotificationsViewItem.css +1 -0
- package/dist/custom-elements-internal.json +897 -13
- package/dist/custom-elements.json +705 -13
- package/dist/generated/assets/i18n/messagebundle_ar.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_bg.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ca.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cnr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cs.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cy.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_da.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_de.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_el.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_GB.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_US_sappsd.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_US_saprigi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_US_saptrc.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_es.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_es_MX.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_et.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fr_CA.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hu.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_id.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_it.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_iw.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ja.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_kk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ko.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_lt.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_lv.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_mk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ms.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_nl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_no.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pt.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pt_PT.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ro.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ru.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sh.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sv.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_th.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_tr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_uk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_vi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_zh_CN.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_zh_TW.json +1 -1
- package/dist/generated/i18n/i18n-defaults.d.ts +4 -1
- package/dist/generated/i18n/i18n-defaults.js +4 -1
- package/dist/generated/i18n/i18n-defaults.js.map +1 -1
- package/dist/generated/themes/DynamicPage.css.d.ts +1 -1
- package/dist/generated/themes/DynamicPage.css.js +1 -1
- package/dist/generated/themes/DynamicPage.css.js.map +1 -1
- package/dist/generated/themes/SideNavigation.css.d.ts +1 -1
- package/dist/generated/themes/SideNavigation.css.js +1 -1
- package/dist/generated/themes/SideNavigation.css.js.map +1 -1
- package/dist/generated/themes/SideNavigationGroup.css.d.ts +1 -1
- package/dist/generated/themes/SideNavigationGroup.css.js +1 -1
- package/dist/generated/themes/SideNavigationGroup.css.js.map +1 -1
- package/dist/generated/themes/TimelineGroupItem.css.d.ts +1 -1
- package/dist/generated/themes/TimelineGroupItem.css.js +1 -1
- package/dist/generated/themes/TimelineGroupItem.css.js.map +1 -1
- package/dist/generated/themes/TimelineItem.css.d.ts +1 -1
- package/dist/generated/themes/TimelineItem.css.js +1 -1
- package/dist/generated/themes/TimelineItem.css.js.map +1 -1
- package/dist/generated/themes/UserSettingsNotificationsView.css.d.ts +2 -0
- package/dist/generated/themes/UserSettingsNotificationsView.css.js +8 -0
- package/dist/generated/themes/UserSettingsNotificationsView.css.js.map +1 -0
- package/dist/generated/themes/UserSettingsNotificationsViewGroup.css.d.ts +2 -0
- package/dist/generated/themes/UserSettingsNotificationsViewGroup.css.js +8 -0
- package/dist/generated/themes/UserSettingsNotificationsViewGroup.css.js.map +1 -0
- package/dist/generated/themes/UserSettingsNotificationsViewItem.css.d.ts +2 -0
- package/dist/generated/themes/UserSettingsNotificationsViewItem.css.js +8 -0
- package/dist/generated/themes/UserSettingsNotificationsViewItem.css.js.map +1 -0
- package/dist/shellbar/ShellBarSearch.d.ts +1 -0
- package/dist/shellbar/ShellBarSearch.js +3 -2
- package/dist/shellbar/ShellBarSearch.js.map +1 -1
- package/dist/shellbar/ShellBarSearchLegacy.js +2 -1
- package/dist/shellbar/ShellBarSearchLegacy.js.map +1 -1
- package/dist/vscode.html-custom-data.json +60 -0
- package/dist/web-types.json +161 -1
- package/package.json +7 -7
- package/src/DynamicPageTemplate.tsx +6 -2
- package/src/FlexibleColumnLayoutTemplate.tsx +3 -2
- package/src/UserMenuTemplate.tsx +2 -2
- package/src/UserSettingsNotificationsViewItemTemplate.tsx +73 -0
- package/src/UserSettingsNotificationsViewTemplate.tsx +26 -0
- package/src/i18n/messagebundle.properties +10 -1
- package/src/i18n/messagebundle_ar.properties +6 -0
- package/src/i18n/messagebundle_bg.properties +6 -0
- package/src/i18n/messagebundle_ca.properties +6 -0
- package/src/i18n/messagebundle_cnr.properties +6 -0
- package/src/i18n/messagebundle_cs.properties +6 -0
- package/src/i18n/messagebundle_cy.properties +6 -0
- package/src/i18n/messagebundle_da.properties +6 -0
- package/src/i18n/messagebundle_de.properties +6 -0
- package/src/i18n/messagebundle_el.properties +6 -0
- package/src/i18n/messagebundle_en.properties +6 -0
- package/src/i18n/messagebundle_en_GB.properties +6 -0
- package/src/i18n/messagebundle_en_US_sappsd.properties +6 -0
- package/src/i18n/messagebundle_en_US_saprigi.properties +6 -0
- package/src/i18n/messagebundle_en_US_saptrc.properties +6 -0
- package/src/i18n/messagebundle_es.properties +6 -0
- package/src/i18n/messagebundle_es_MX.properties +6 -0
- package/src/i18n/messagebundle_et.properties +6 -0
- package/src/i18n/messagebundle_fi.properties +6 -0
- package/src/i18n/messagebundle_fr.properties +7 -1
- package/src/i18n/messagebundle_fr_CA.properties +6 -0
- package/src/i18n/messagebundle_hi.properties +6 -0
- package/src/i18n/messagebundle_hr.properties +6 -0
- package/src/i18n/messagebundle_hu.properties +6 -0
- package/src/i18n/messagebundle_id.properties +6 -0
- package/src/i18n/messagebundle_it.properties +6 -0
- package/src/i18n/messagebundle_iw.properties +6 -0
- package/src/i18n/messagebundle_ja.properties +6 -0
- package/src/i18n/messagebundle_kk.properties +6 -0
- package/src/i18n/messagebundle_ko.properties +6 -0
- package/src/i18n/messagebundle_lt.properties +6 -0
- package/src/i18n/messagebundle_lv.properties +6 -0
- package/src/i18n/messagebundle_mk.properties +6 -0
- package/src/i18n/messagebundle_ms.properties +6 -0
- package/src/i18n/messagebundle_nl.properties +6 -0
- package/src/i18n/messagebundle_no.properties +6 -0
- package/src/i18n/messagebundle_pl.properties +6 -0
- package/src/i18n/messagebundle_pt.properties +6 -0
- package/src/i18n/messagebundle_pt_PT.properties +6 -0
- package/src/i18n/messagebundle_ro.properties +6 -0
- package/src/i18n/messagebundle_ru.properties +6 -0
- package/src/i18n/messagebundle_sh.properties +6 -0
- package/src/i18n/messagebundle_sk.properties +6 -0
- package/src/i18n/messagebundle_sl.properties +6 -0
- package/src/i18n/messagebundle_sr.properties +6 -0
- package/src/i18n/messagebundle_sv.properties +6 -0
- package/src/i18n/messagebundle_th.properties +6 -0
- package/src/i18n/messagebundle_tr.properties +6 -0
- package/src/i18n/messagebundle_uk.properties +6 -0
- package/src/i18n/messagebundle_vi.properties +6 -0
- package/src/i18n/messagebundle_zh_CN.properties +6 -0
- package/src/i18n/messagebundle_zh_TW.properties +6 -0
- package/src/themes/DynamicPage.css +6 -0
- package/src/themes/SideNavigation.css +8 -0
- package/src/themes/SideNavigationGroup.css +1 -9
- package/src/themes/TimelineGroupItem.css +1 -0
- package/src/themes/TimelineItem.css +9 -0
- package/src/themes/UserSettingsNotificationsView.css +22 -0
- package/src/themes/UserSettingsNotificationsViewGroup.css +8 -0
- package/src/themes/UserSettingsNotificationsViewItem.css +152 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserSettingsItem.js","sourceRoot":"","sources":["../src/UserSettingsItem.ts"],"names":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AW,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,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,gB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xB,UAAU,EAAE,IAAI;YAChB,KAAK,EAAE,KAAK;SACZ;KACD,CAAC;8CAC4B;AAM9B;IADC,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,O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H;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;
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
import ListItemGroup from "@ui5/webcomponents/dist/ListItemGroup.js";
|
|
8
|
+
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
|
|
9
|
+
import slot from "@ui5/webcomponents-base/dist/decorators/slot-strict.js";
|
|
10
|
+
import createInstanceChecker from "@ui5/webcomponents-base/dist/util/createInstanceChecker.js";
|
|
11
|
+
import UserSettingsNotificationsViewGroupCss from "./generated/themes/UserSettingsNotificationsViewGroup.css.js";
|
|
12
|
+
/**
|
|
13
|
+
* @class
|
|
14
|
+
* ### Overview
|
|
15
|
+
*
|
|
16
|
+
* The `ui5-user-settings-notifications-view-group` groups `ui5-user-settings-notifications-view-item`
|
|
17
|
+
* elements inside a `ui5-user-settings-notifications-view`. Its header renders as a plain bold
|
|
18
|
+
* section title with a separator line below, per the notifications design spec.
|
|
19
|
+
*
|
|
20
|
+
* ### ES6 Module Import
|
|
21
|
+
* `import "@ui5/webcomponents-fiori/dist/UserSettingsNotificationsViewGroup.js";`
|
|
22
|
+
*
|
|
23
|
+
* @constructor
|
|
24
|
+
* @extends ListItemGroup
|
|
25
|
+
* @public
|
|
26
|
+
* @since 2.27.0
|
|
27
|
+
*/
|
|
28
|
+
let UserSettingsNotificationsViewGroup = class UserSettingsNotificationsViewGroup extends ListItemGroup {
|
|
29
|
+
get isUserSettingsNotificationsViewGroup() {
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
__decorate([
|
|
34
|
+
slot({
|
|
35
|
+
"default": true,
|
|
36
|
+
invalidateOnChildChange: true,
|
|
37
|
+
type: HTMLElement,
|
|
38
|
+
})
|
|
39
|
+
], UserSettingsNotificationsViewGroup.prototype, "items", void 0);
|
|
40
|
+
UserSettingsNotificationsViewGroup = __decorate([
|
|
41
|
+
customElement({
|
|
42
|
+
tag: "ui5-user-settings-notifications-view-group",
|
|
43
|
+
styles: [ListItemGroup.styles, UserSettingsNotificationsViewGroupCss],
|
|
44
|
+
})
|
|
45
|
+
], UserSettingsNotificationsViewGroup);
|
|
46
|
+
UserSettingsNotificationsViewGroup.define();
|
|
47
|
+
export const isInstanceOfUserSettingsNotificationsViewGroup = createInstanceChecker("isUserSettingsNotificationsViewGroup");
|
|
48
|
+
export default UserSettingsNotificationsViewGroup;
|
|
49
|
+
//# sourceMappingURL=UserSettingsNotificationsViewGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserSettingsNotificationsViewGroup.js","sourceRoot":"","sources":["../src/UserSettingsNotificationsViewGroup.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,aAAa,MAAM,0CAA0C,CAAC;AACrE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,IAAI,MAAM,wDAAwD,CAAC;AAC1E,OAAO,qBAAqB,MAAM,4DAA4D,CAAC;AAC/F,OAAO,qCAAqC,MAAM,8DAA8D,CAAC;AAIjH;;;;;;;;;;;;;;;GAeG;AAKH,IAAM,kCAAkC,GAAxC,MAAM,kCAAmC,SAAQ,aAAa;IAY7D,IAAI,oCAAoC;QACvC,OAAO,IAAI,CAAC;IACb,CAAC;CACD,CAAA;AALQ;IALP,IAAI,CAAC;QACL,SAAS,EAAE,IAAI;QACf,uBAAuB,EAAE,IAAI;QAC7B,IAAI,EAAE,WAAW;KACjB,CAAC;iEAC4D;AAVzD,kCAAkC;IAJvC,aAAa,CAAC;QACd,GAAG,EAAE,4CAA4C;QACjD,MAAM,EAAE,CAAC,aAAa,CAAC,MAAM,EAAE,qCAAqC,CAAC;KACrE,CAAC;GACI,kCAAkC,CAevC;AAED,kCAAkC,CAAC,MAAM,EAAE,CAAC;AAE5C,MAAM,CAAC,MAAM,8CAA8C,GAAG,qBAAqB,CAAqC,sCAAsC,CAAC,CAAC;AAChK,eAAe,kCAAkC,CAAC","sourcesContent":["import ListItemGroup from \"@ui5/webcomponents/dist/ListItemGroup.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\nimport createInstanceChecker from \"@ui5/webcomponents-base/dist/util/createInstanceChecker.js\";\nimport UserSettingsNotificationsViewGroupCss from \"./generated/themes/UserSettingsNotificationsViewGroup.css.js\";\nimport type UserSettingsNotificationsViewItem from \"./UserSettingsNotificationsViewItem.js\";\nimport type { DefaultSlot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\n\n/**\n * @class\n * ### Overview\n *\n * The `ui5-user-settings-notifications-view-group` groups `ui5-user-settings-notifications-view-item`\n * elements inside a `ui5-user-settings-notifications-view`. Its header renders as a plain bold\n * section title with a separator line below, per the notifications design spec.\n *\n * ### ES6 Module Import\n * `import \"@ui5/webcomponents-fiori/dist/UserSettingsNotificationsViewGroup.js\";`\n *\n * @constructor\n * @extends ListItemGroup\n * @public\n * @since 2.27.0\n */\n@customElement({\n\ttag: \"ui5-user-settings-notifications-view-group\",\n\tstyles: [ListItemGroup.styles, UserSettingsNotificationsViewGroupCss],\n})\nclass UserSettingsNotificationsViewGroup extends ListItemGroup {\n\t/**\n\t * Defines the items of the `ui5-user-settings-notifications-view-group`.\n\t * @public\n\t */\n\t@slot({\n\t\t\"default\": true,\n\t\tinvalidateOnChildChange: true,\n\t\ttype: HTMLElement,\n\t})\n\tdeclare items: DefaultSlot<UserSettingsNotificationsViewItem>;\n\n\tget isUserSettingsNotificationsViewGroup(): boolean {\n\t\treturn true;\n\t}\n}\n\nUserSettingsNotificationsViewGroup.define();\n\nexport const isInstanceOfUserSettingsNotificationsViewGroup = createInstanceChecker<UserSettingsNotificationsViewGroup>(\"isUserSettingsNotificationsViewGroup\");\nexport default UserSettingsNotificationsViewGroup;\n"]}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import ListItemCustom from "@ui5/webcomponents/dist/ListItemCustom.js";
|
|
2
|
+
import type { Slot } from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
3
|
+
import type { AccessibilityInfo } from "@ui5/webcomponents-base/dist/types.js";
|
|
4
|
+
type UserSettingsNotificationsViewItemSwitchChangeEventDetail = {
|
|
5
|
+
item: UserSettingsNotificationsViewItem;
|
|
6
|
+
checked: boolean;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* @class
|
|
10
|
+
* ### Overview
|
|
11
|
+
*
|
|
12
|
+
* The `ui5-user-settings-notifications-view-item` represents a single notification setting
|
|
13
|
+
* within the `ui5-user-settings-notifications-view`.
|
|
14
|
+
*
|
|
15
|
+
* It displays a title and an optional byline. By default a trailing switch reflects
|
|
16
|
+
* the `checked` state. Applications can override the trailing control by providing content
|
|
17
|
+
* in the `endContent` slot (e.g. a `ui5-select` for a value picker); the built-in switch and
|
|
18
|
+
* its `switch-change` event are then suppressed. Items can additionally be flagged as
|
|
19
|
+
* `navigable` to display a navigation arrow and behave as clickable list rows.
|
|
20
|
+
*
|
|
21
|
+
* **Note:** The default switch and the `endContent` slot are mutually exclusive.
|
|
22
|
+
* When any content is provided in `endContent`, the trailing switch is not rendered
|
|
23
|
+
* and no `switch-change` event is fired.
|
|
24
|
+
*
|
|
25
|
+
* ### ES6 Module Import
|
|
26
|
+
* `import "@ui5/webcomponents-fiori/dist/UserSettingsNotificationsViewItem.js";`
|
|
27
|
+
*
|
|
28
|
+
* @constructor
|
|
29
|
+
* @extends ListItemCustom
|
|
30
|
+
* @public
|
|
31
|
+
* @since 2.27.0
|
|
32
|
+
*/
|
|
33
|
+
declare class UserSettingsNotificationsViewItem extends ListItemCustom {
|
|
34
|
+
eventDetails: ListItemCustom["eventDetails"] & {
|
|
35
|
+
"switch-change": UserSettingsNotificationsViewItemSwitchChangeEventDetail;
|
|
36
|
+
"_form-item-click": {
|
|
37
|
+
item: UserSettingsNotificationsViewItem;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Defines the unique identifier of the item.
|
|
42
|
+
*
|
|
43
|
+
* When the item is navigable, `itemKey` is also used to route to a matching sibling
|
|
44
|
+
* `secondary` view by id.
|
|
45
|
+
*
|
|
46
|
+
* @default ""
|
|
47
|
+
* @public
|
|
48
|
+
*/
|
|
49
|
+
itemKey: string;
|
|
50
|
+
/**
|
|
51
|
+
* Defines the title text of the item.
|
|
52
|
+
* @default ""
|
|
53
|
+
* @public
|
|
54
|
+
*/
|
|
55
|
+
text: string;
|
|
56
|
+
/**
|
|
57
|
+
* Defines the byline text of the item, rendered below the title.
|
|
58
|
+
* @default ""
|
|
59
|
+
* @public
|
|
60
|
+
*/
|
|
61
|
+
bylineText: string;
|
|
62
|
+
/**
|
|
63
|
+
* Defines whether the trailing switch is on.
|
|
64
|
+
*
|
|
65
|
+
* Ignored when the `endContent` slot is used.
|
|
66
|
+
*
|
|
67
|
+
* @default false
|
|
68
|
+
* @public
|
|
69
|
+
*/
|
|
70
|
+
checked: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Defines whether the item is navigable. When true, a navigation arrow is rendered
|
|
73
|
+
* and the whole row becomes clickable (fires the parent view's `item-click` event).
|
|
74
|
+
* @default false
|
|
75
|
+
* @public
|
|
76
|
+
*/
|
|
77
|
+
navigable: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Defines custom content rendered at the trailing end of the item, replacing the
|
|
80
|
+
* default switch. Use this to place a `ui5-select`, `ui5-input`, or any other
|
|
81
|
+
* control instead of a boolean toggle.
|
|
82
|
+
*
|
|
83
|
+
* @public
|
|
84
|
+
*/
|
|
85
|
+
endContent: Slot<HTMLElement>;
|
|
86
|
+
get isUserSettingsNotificationsViewItem(): boolean;
|
|
87
|
+
get typeNavigation(): boolean;
|
|
88
|
+
get _isHeaderItem(): boolean;
|
|
89
|
+
shouldForwardTabAfter(): boolean;
|
|
90
|
+
get _hasEndContent(): boolean;
|
|
91
|
+
get _accessibleSwitchName(): string;
|
|
92
|
+
_onkeyup(e: KeyboardEvent): void;
|
|
93
|
+
_handleSwitchChange: (e: Event) => void;
|
|
94
|
+
_handleFormItemClick: (e: MouseEvent) => void;
|
|
95
|
+
_handleEndClick: (e: MouseEvent) => void;
|
|
96
|
+
get accessibilityInfo(): AccessibilityInfo;
|
|
97
|
+
}
|
|
98
|
+
export declare const isInstanceOfUserSettingsNotificationsViewItem: (object: any) => object is UserSettingsNotificationsViewItem;
|
|
99
|
+
export default UserSettingsNotificationsViewItem;
|
|
100
|
+
export type { UserSettingsNotificationsViewItemSwitchChangeEventDetail, };
|