@ui5/webcomponents-fiori 2.26.0-rc.0 → 2.26.0-rc.1
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 +22 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/Search.js +1 -1
- package/dist/Search.js.map +1 -1
- package/dist/SearchField.d.ts +29 -0
- package/dist/SearchField.js +88 -1
- package/dist/SearchField.js.map +1 -1
- package/dist/SearchFieldScopePopoverTemplate.d.ts +2 -0
- package/dist/SearchFieldScopePopoverTemplate.js +11 -0
- package/dist/SearchFieldScopePopoverTemplate.js.map +1 -0
- package/dist/SearchFieldTemplate.js +14 -5
- package/dist/SearchFieldTemplate.js.map +1 -1
- package/dist/UserMenuTemplate.js +1 -1
- package/dist/UserMenuTemplate.js.map +1 -1
- package/dist/UserSettingsDialog.d.ts +9 -2
- package/dist/UserSettingsDialog.js +42 -3
- package/dist/UserSettingsDialog.js.map +1 -1
- package/dist/UserSettingsDialogTemplate.js +2 -2
- package/dist/UserSettingsDialogTemplate.js.map +1 -1
- package/dist/UserSettingsItem.d.ts +18 -0
- package/dist/UserSettingsItem.js +50 -0
- package/dist/UserSettingsItem.js.map +1 -1
- package/dist/css/themes/SearchField.css +1 -1
- package/dist/css/themes/ShellBarLegacy.css +1 -1
- package/dist/css/themes/sap_fiori_3/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_hcw/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_auto/parameters-bundle.css +3 -1
- package/dist/css/themes/sap_horizon_dark/parameters-bundle.css +3 -1
- package/dist/css/themes/sap_horizon_hc_auto/parameters-bundle.css +2 -0
- package/dist/css/themes/sap_horizon_hcb/parameters-bundle.css +2 -0
- package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +2 -0
- package/dist/custom-elements-internal.json +6 -6
- package/dist/custom-elements.json +6 -6
- package/dist/generated/assets/i18n/messagebundle_en.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_US_saprigi.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_auto/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hc_auto/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/i18n/i18n-defaults.d.ts +5 -1
- package/dist/generated/i18n/i18n-defaults.js +5 -1
- package/dist/generated/i18n/i18n-defaults.js.map +1 -1
- package/dist/generated/themes/SearchField.css.d.ts +1 -1
- package/dist/generated/themes/SearchField.css.js +1 -1
- package/dist/generated/themes/SearchField.css.js.map +1 -1
- package/dist/generated/themes/ShellBarLegacy.css.d.ts +1 -1
- package/dist/generated/themes/ShellBarLegacy.css.js +1 -1
- package/dist/generated/themes/ShellBarLegacy.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.js +3 -1
- package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +3 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.js +2 -0
- package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +2 -0
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +2 -0
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/vscode.html-custom-data.json +2 -2
- package/dist/web-types.json +5 -5
- package/package.json +7 -7
- package/src/SearchFieldScopePopoverTemplate.tsx +37 -0
- package/src/SearchFieldTemplate.tsx +45 -18
- package/src/UserMenuTemplate.tsx +1 -1
- package/src/UserSettingsDialogTemplate.tsx +4 -4
- package/src/i18n/messagebundle.properties +12 -0
- package/src/i18n/messagebundle_en.properties +218 -0
- package/src/i18n/messagebundle_en_US_saprigi.properties +8 -0
- package/src/themes/SearchField.css +63 -3
- package/src/themes/ShellBarLegacy.css +3 -1
- package/src/themes/base/SearchField-parameters.css +3 -1
- package/src/themes/sap_fiori_3/SearchField-parameters.css +0 -1
- package/src/themes/sap_fiori_3_dark/SearchField-parameters.css +0 -1
- package/src/themes/sap_fiori_3_hcb/SearchField-parameters.css +0 -1
- package/src/themes/sap_fiori_3_hcw/SearchField-parameters.css +0 -1
- package/src/themes/sap_horizon/SearchField-parameters.css +6 -0
- package/src/themes/sap_horizon/parameters-bundle.css +1 -2
- package/src/themes/sap_horizon_dark/SearchField-parameters.css +6 -0
- package/src/themes/sap_horizon_dark/parameters-bundle.css +1 -1
- package/src/themes/sap_horizon_hcb/SearchField-parameters.css +0 -1
- package/src/themes/sap_horizon_hcw/SearchField-parameters.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserMenuTemplate.js","sourceRoot":"","sources":["../src/UserMenuTemplate.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,MAAM,mCAAmC,CAAC;AACvD,OAAO,MAAM,MAAM,mCAAmC,CAAC;AACvD,OAAO,IAAI,MAAM,iCAAiC,CAAC;AACnD,OAAO,WAAW,MAAM,wCAAwC,CAAC;AACjE,OAAO,KAAK,MAAM,kCAAkC,CAAC;AACrD,OAAO,IAAI,MAAM,iCAAiC,CAAC;AACnD,OAAO,KAAK,MAAM,kCAAkC,CAAC;AACrD,OAAO,IAAI,MAAM,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AK,EAAC,qCAAqC,EAC3C,IAAI,EAAC,YAAY,GAAG,GAEjB,IAED,GACU,CACjB,GACK,GACL,CAAC,CAAC;AACN,CAAC","sourcesContent":["import type UserMenu from \"./UserMenu.js\";\nimport Avatar from \"@ui5/webcomponents/dist/Avatar.js\";\nimport Button from \"@ui5/webcomponents/dist/Button.js\";\nimport Icon from \"@ui5/webcomponents/dist/Icon.js\";\nimport AvatarBadge from \"@ui5/webcomponents/dist/AvatarBadge.js\";\nimport Title from \"@ui5/webcomponents/dist/Title.js\";\nimport Text from \"@ui5/webcomponents/dist/Text.js\";\nimport Label from \"@ui5/webcomponents/dist/Label.js\";\nimport List from \"@ui5/webcomponents/dist/List.js\";\nimport ListItemCustom from \"@ui5/webcomponents/dist/ListItemCustom.js\";\nimport Panel from \"@ui5/webcomponents/dist/Panel.js\";\nimport Bar from \"@ui5/webcomponents/dist/Bar.js\";\nimport ResponsivePopover from \"@ui5/webcomponents/dist/ResponsivePopover.js\";\nimport edit from \"@ui5/webcomponents-icons/dist/edit.js\";\nimport personPlaceholder from \"@ui5/webcomponents-icons/dist/person-placeholder.js\";\nimport userSettings from \"@ui5/webcomponents-icons/dist/user-settings.js\";\nimport log from \"@ui5/webcomponents-icons/dist/log.js\";\nimport decline from \"@ui5/webcomponents-icons/dist/decline.js\";\nimport userEdit from \"@ui5/webcomponents-icons/dist/user-edit.js\";\nimport selectedAccount from \"@ui5/webcomponents-icons/dist/sys-enter-2.js\";\n\nexport default function UserMenuTemplate(this: UserMenu) {\n\treturn (\n\t\t<ResponsivePopover\n\t\t\tid=\"user-menu-rp\"\n\t\t\tclass=\"ui5-user-menu-rp\"\n\t\t\tplacement=\"Bottom\"\n\t\t\tverticalAlign=\"Bottom\"\n\t\t\thorizontalAlign=\"End\"\n\t\t\ttabindex={-1}\n\t\t\taccessibleName={this.accessibleNameText}\n\t\t\taria-label={this.accessibleNameText}\n\t\t\topen={this.open}\n\t\t\topener={this.opener}\n\t\t\tonClose={this._handlePopoverAfterClose}\n\t\t\tonOpen={this._handlePopoverAfterOpen}\n\t\t\tonScroll={this._handleScroll}\n\t\t>\n\t\t\t<>\n\t\t\t\t<Bar class={{\n\t\t\t\t\t\"ui5-user-menu-fixed-header\": true,\n\t\t\t\t\t\"ui5-user-menu-rp-scrolled\": this._isScrolled || this._titleMovedToHeader\n\t\t\t\t}} slot=\"header\">\n\t\t\t\t\t{this._titleMovedToHeader &&\n\t\t\t\t\t\t<Title\n\t\t\t\t\t\t\tlevel=\"H1\"\n\t\t\t\t\t\t\twrappingType=\"None\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{this._selectedAccount.titleText}\n\t\t\t\t\t\t</Title>\n\t\t\t\t\t}\n\n\t\t\t\t\t{this._isPhone && <Button\n\t\t\t\t\t\ticon={decline}\n\t\t\t\t\t\tdesign=\"Transparent\"\n\t\t\t\t\t\taccessibleName={this._closeDialogAriaLabel}\n\t\t\t\t\t\tonClick={this._closeUserMenu}\n\t\t\t\t\t\tslot=\"endContent\"\n\t\t\t\t\t />}\n\t\t\t\t</Bar>\n\n\t\t\t\t<div class=\"ui5-user-menu-header\">\n\t\t\t\t\t{headerContent.call(this)}\n\t\t\t\t</div>\n\t\t\t</>\n\n\t\t\t{this.showOtherAccounts &&\n\t\t\t\t<>\n\t\t\t\t\t{otherAccountsContent.call(this)}\n\t\t\t\t</>\n\t\t\t}\n\n\t\t\t{this.menuItems.length > 0 &&\n\t\t\t\t\t<List\n\t\t\t\t\t\tid=\"ui5-user-menu-list\"\n\t\t\t\t\t\tclass=\"ui5-user-menu-list\"\n\t\t\t\t\t\tselectionMode=\"None\"\n\t\t\t\t\t\tseparators=\"None\"\n\t\t\t\t\t\taccessibleRole=\"Menu\"\n\t\t\t\t\t\taccessibleName={this._ariaLabelledByActions}\n\t\t\t\t\t\tonItemClick={this._handleMenuItemClick}\n\t\t\t\t\t\tonMouseOver={this._itemMouseOver}\n\t\t\t\t\t\tonui5-close-menu={this._handleMenuItemClose}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t</List>\n\t\t\t}\n\n\t\t\t{this._hasCustomFooter &&\n\t\t\t\t<div slot=\"footer\" class=\"ui5-user-menu-footer\">\n\t\t\t\t\t<slot name=\"footer\"></slot>\n\t\t\t\t</div>\n\t\t\t}\n\n\t\t\t{this._showDefaultFooter &&\n\t\t\t\t<div slot=\"footer\" class=\"ui5-user-menu-footer\">\n\t\t\t\t\t<Button class=\"ui5-user-menu-sign-out-btn\" design=\"Transparent\" icon={log} onClick={this._handleSignOutClick}>{this._signOutButtonText}</Button>\n\t\t\t\t</div>\n\t\t\t}\n\t\t</ResponsivePopover>\n\t);\n}\n\nfunction headerContent(this: UserMenu) {\n\treturn (<>\n\t\t{this._selectedAccount &&\n\t\t\t<div class=\"ui5-user-menu-selected-account\" aria-label={this._ariaLabelledByAccountInformationText}>\n\t\t\t\t<span title={this.showEditButton ? this._editAvatarTooltip : undefined}>\n\t\t\t\t\t<Avatar size=\"L\" onClick={this._isAvatarInteractive ? this._handleAvatarClick : undefined} initials={this._selectedAccount._initials} colorScheme={this._selectedAccount.avatarColorScheme} fallbackIcon={personPlaceholder} class=\"ui5-user-menu-selected-account-avatar\" mode={this._isAvatarInteractive ? \"Interactive\" : \"Image\"}>\n\t\t\t\t\t\t{this._selectedAccount.avatarSrc &&\n\t\t\t\t\t\t\t<img src={this._selectedAccount.avatarSrc}/>\n\t\t\t\t\t\t}\n\t\t\t\t\t\t{this.showEditButton &&\n\t\t\t\t\t\t<AvatarBadge slot=\"badge\" icon={edit}></AvatarBadge>\n\t\t\t\t\t\t}\n\t\t\t\t\t</Avatar>\n\t\t\t\t</span>\n\t\t\t\t{this._selectedAccount.titleText &&\n\t\t\t\t\t<Text id=\"selected-account-title\" class=\"ui5-user-menu-selected-account-title\">{this._selectedAccount.titleText}</Text>\n\t\t\t\t}\n\n\t\t\t\t{this._selectedAccount.subtitleText &&\n\t\t\t\t\t<Text class=\"ui5-user-menu-selected-account-subtitleText\">{this._selectedAccount.subtitleText}</Text>\n\t\t\t\t}\n\t\t\t\t{this._selectedAccount.description &&\n\t\t\t\t\t<Text class=\"ui5-user-menu-selected-account-description\">{this._selectedAccount.description}</Text>\n\t\t\t\t}\n\t\t\t\t{this._selectedAccount.additionalInfo &&\n\t\t\t\t\t<Text class=\"ui5-user-menu-selected-account-additional-info\">{this._selectedAccount.additionalInfo}</Text>\n\t\t\t\t}\n\n\t\t\t\t{this._hasInfoArea &&\n\t\t\t\t\t<div class=\"ui5-user-menu-info-area\">\n\t\t\t\t\t\t<slot name=\"infoArea\"></slot>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\n\t\t\t\t{this.showManageAccount &&\n\t\t\t\t\t<Button id=\"selected-account-manage-btn\" icon={userSettings} class=\"ui5-user-menu-manage-account-btn\" onClick={this._handleManageAccountClick}>{this._manageAccountButtonText}</Button>\n\t\t\t\t}\n\t\t\t</div>\n\t\t}\n\t</>);\n}\n\nfunction otherAccountsContent(this: UserMenu) {\n\treturn (<>\n\t\t<Panel collapsed={true} class=\"ui5-user-menu-other-accounts\">\n\t\t\t<div slot=\"header\" class=\"ui5-user-menu-account-header\">\n\t\t\t\t<Title slot=\"header\" level=\"H4\" wrapping-type=\"None\">{this._otherAccountsButtonText} ({this._otherAccounts.length})</Title>\n\t\t\t\t{this.showEditAccounts &&\n\t\t\t\t\t<Button slot=\"header\" class=\"ui5-user-menu-add-account-btn\" design=\"Transparent\" icon={userEdit} onClick={this._handleEditAccountsClick} tooltip={this._editAccountsTooltip}/>\n\t\t\t\t}\n\t\t\t</div>\n\t\t\t{this._otherAccounts.length > 0 &&\n\t\t\t\t<>\n\t\t\t\t\t{otherAccountsList.call(this)}\n\t\t\t\t</>\n\t\t\t}\n\t\t</Panel>\n\t</>);\n}\n\nfunction otherAccountsList(this: UserMenu) {\n\treturn (<>\n\t\t<List onItemClick={this._handleAccountSwitch} loadingDelay={0}\n\t\t\taccessibleName={`${this._otherAccountsButtonText} (${this._otherAccounts.length})`}\n\t\t\t loading={this._otherAccounts.some(account => account.loading === true)}>\n\t\t\t{this._otherAccounts.map((account, index) =>\n\t\t\t\t<ListItemCustom\n\t\t\t\t\tref={this.captureRef.bind(account)}\n\t\t\t\t\taccessibilityAttributes={{\n\t\t\t\t\t\t\"ariaPosinset\": index + 1,\n\t\t\t\t\t\t\"ariaSetsize\": this._otherAccounts.length\n\t\t\t\t\t}}\n\t\t\t\t\taccessibleName={this.getAccountDescriptionText(account)}\n\t\t\t\t>\n\t\t\t\t\t<div class=\"ui5-user-menu-other-accounts-content\">\n\t\t\t\t\t\t<Avatar slot=\"image\" size=\"S\" initials={account._initials} fallbackIcon={personPlaceholder} colorScheme={account.avatarColorScheme}>\n\t\t\t\t\t\t\t{account.avatarSrc &&\n\t\t\t\t\t\t\t\t<img src={account.avatarSrc}/>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</Avatar>\n\t\t\t\t\t\t<div class=\"ui5-user-menu-other-accounts-info\">\n\t\t\t\t\t\t\t{account.titleText &&\n\t\t\t\t\t\t\t\t<Title class=\"ui5-user-menu-other-accounts-title\">{account.titleText}</Title>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{account.subtitleText &&\n\t\t\t\t\t\t\t\t<Label class=\"ui5-user-menu-other-accounts-additional-info\">{account.subtitleText}</Label>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{account.description &&\n\t\t\t\t\t\t\t\t<Label class=\"ui5-user-menu-other-accounts-additional-info\">{account.description}</Label>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t{account.selected &&\n\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\tpart=\"icon\"\n\t\t\t\t\t\t\t\t\tname={selectedAccount}\n\t\t\t\t\t\t\t\t\tclass=\"ui5-user-menu-selected-account-icon\"\n\t\t\t\t\t\t\t\t\tmode=\"Decorative\" />\n\t\t\t\t\t\t\t}\n\t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AiB,EAAE,WAAW,EAAE,OAAO,CAAC,iBAAiB,YAChI,OAAO,CAAC,SAAS;gCACjB,cAAK,GAAG,EAAE,OAAO,CAAC,SAAS,GAAG,GAEvB,EACT,eAAK,KAAK,EAAC,mCAAmC,aAC5C,OAAO,CAAC,SAAS;oCACjB,KAAC,KAAK,IAAC,KAAK,EAAC,oCAAoC,YAAE,OAAO,CAAC,SAAS,GAAS,EAE7E,OAAO,CAAC,YAAY;oCACpB,KAAC,KAAK,IAAC,KAAK,EAAC,8CAA8C,YAAE,OAAO,CAAC,YAAY,GAAS,EAE1F,OAAO,CAAC,WAAW;oCACnB,KAAC,KAAK,IAAC,KAAK,EAAC,8CAA8C,YAAE,OAAO,CAAC,WAAW,GAAS,IAErF,EACN,wBACE,OAAO,CAAC,QAAQ;gCAChB,KAAC,IAAI,IACJ,IAAI,EAAC,MAAM,EACX,IAAI,EAAE,eAAe,EACrB,KAAK,EAAC,qCAAqC,EAC3C,IAAI,EAAC,YAAY,GAAG,GAEjB,IAED,GACU,CACjB,GACK,GACL,CAAC,CAAC;AACN,CAAC","sourcesContent":["import type UserMenu from \"./UserMenu.js\";\nimport Avatar from \"@ui5/webcomponents/dist/Avatar.js\";\nimport Button from \"@ui5/webcomponents/dist/Button.js\";\nimport Icon from \"@ui5/webcomponents/dist/Icon.js\";\nimport AvatarBadge from \"@ui5/webcomponents/dist/AvatarBadge.js\";\nimport Title from \"@ui5/webcomponents/dist/Title.js\";\nimport Text from \"@ui5/webcomponents/dist/Text.js\";\nimport Label from \"@ui5/webcomponents/dist/Label.js\";\nimport List from \"@ui5/webcomponents/dist/List.js\";\nimport ListItemCustom from \"@ui5/webcomponents/dist/ListItemCustom.js\";\nimport Panel from \"@ui5/webcomponents/dist/Panel.js\";\nimport Bar from \"@ui5/webcomponents/dist/Bar.js\";\nimport ResponsivePopover from \"@ui5/webcomponents/dist/ResponsivePopover.js\";\nimport edit from \"@ui5/webcomponents-icons/dist/edit.js\";\nimport personPlaceholder from \"@ui5/webcomponents-icons/dist/person-placeholder.js\";\nimport userSettings from \"@ui5/webcomponents-icons/dist/user-settings.js\";\nimport log from \"@ui5/webcomponents-icons/dist/log.js\";\nimport decline from \"@ui5/webcomponents-icons/dist/decline.js\";\nimport userEdit from \"@ui5/webcomponents-icons/dist/user-edit.js\";\nimport selectedAccount from \"@ui5/webcomponents-icons/dist/sys-enter-2.js\";\n\nexport default function UserMenuTemplate(this: UserMenu) {\n\treturn (\n\t\t<ResponsivePopover\n\t\t\tid=\"user-menu-rp\"\n\t\t\tclass=\"ui5-user-menu-rp\"\n\t\t\tplacement=\"Bottom\"\n\t\t\tverticalAlign=\"Bottom\"\n\t\t\thorizontalAlign=\"End\"\n\t\t\ttabindex={-1}\n\t\t\taccessibleName={this.accessibleNameText}\n\t\t\taria-label={this.accessibleNameText}\n\t\t\topen={this.open}\n\t\t\topener={this.opener}\n\t\t\tonClose={this._handlePopoverAfterClose}\n\t\t\tonOpen={this._handlePopoverAfterOpen}\n\t\t\tonScroll={this._handleScroll}\n\t\t>\n\t\t\t<>\n\t\t\t\t<Bar class={{\n\t\t\t\t\t\"ui5-user-menu-fixed-header\": true,\n\t\t\t\t\t\"ui5-user-menu-rp-scrolled\": this._isScrolled || this._titleMovedToHeader\n\t\t\t\t}} slot=\"header\">\n\t\t\t\t\t{this._titleMovedToHeader &&\n\t\t\t\t\t\t<Title\n\t\t\t\t\t\t\tlevel=\"H1\"\n\t\t\t\t\t\t\twrappingType=\"None\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{this._selectedAccount.titleText}\n\t\t\t\t\t\t</Title>\n\t\t\t\t\t}\n\n\t\t\t\t\t{this._isPhone && <Button\n\t\t\t\t\t\ticon={decline}\n\t\t\t\t\t\tdesign=\"Transparent\"\n\t\t\t\t\t\taccessibleName={this._closeDialogAriaLabel}\n\t\t\t\t\t\tonClick={this._closeUserMenu}\n\t\t\t\t\t\tslot=\"endContent\"\n\t\t\t\t\t />}\n\t\t\t\t</Bar>\n\n\t\t\t\t<div class=\"ui5-user-menu-header\">\n\t\t\t\t\t{headerContent.call(this)}\n\t\t\t\t</div>\n\t\t\t</>\n\n\t\t\t{this.showOtherAccounts &&\n\t\t\t\t<>\n\t\t\t\t\t{otherAccountsContent.call(this)}\n\t\t\t\t</>\n\t\t\t}\n\n\t\t\t{this.menuItems.length > 0 &&\n\t\t\t\t\t<List\n\t\t\t\t\t\tid=\"ui5-user-menu-list\"\n\t\t\t\t\t\tclass=\"ui5-user-menu-list\"\n\t\t\t\t\t\tselectionMode=\"None\"\n\t\t\t\t\t\tseparators=\"None\"\n\t\t\t\t\t\taccessibleRole=\"Menu\"\n\t\t\t\t\t\taccessibleName={this._ariaLabelledByActions}\n\t\t\t\t\t\tonItemClick={this._handleMenuItemClick}\n\t\t\t\t\t\tonMouseOver={this._itemMouseOver}\n\t\t\t\t\t\tonui5-close-menu={this._handleMenuItemClose}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t</List>\n\t\t\t}\n\n\t\t\t{this._hasCustomFooter &&\n\t\t\t\t<div slot=\"footer\" class=\"ui5-user-menu-footer\">\n\t\t\t\t\t<slot name=\"footer\"></slot>\n\t\t\t\t</div>\n\t\t\t}\n\n\t\t\t{this._showDefaultFooter &&\n\t\t\t\t<div slot=\"footer\" class=\"ui5-user-menu-footer\">\n\t\t\t\t\t<Button class=\"ui5-user-menu-sign-out-btn\" design=\"Transparent\" icon={log} onClick={this._handleSignOutClick}>{this._signOutButtonText}</Button>\n\t\t\t\t</div>\n\t\t\t}\n\t\t</ResponsivePopover>\n\t);\n}\n\nfunction headerContent(this: UserMenu) {\n\treturn (<>\n\t\t{this._selectedAccount &&\n\t\t\t<div class=\"ui5-user-menu-selected-account\" aria-label={this._ariaLabelledByAccountInformationText}>\n\t\t\t\t<span title={this.showEditButton ? this._editAvatarTooltip : undefined}>\n\t\t\t\t\t<Avatar size=\"L\" onClick={this._isAvatarInteractive ? this._handleAvatarClick : undefined} initials={this._selectedAccount._initials} colorScheme={this._selectedAccount.avatarColorScheme} fallbackIcon={personPlaceholder} class=\"ui5-user-menu-selected-account-avatar\" mode={this._isAvatarInteractive ? \"Interactive\" : \"Image\"}>\n\t\t\t\t\t\t{this._selectedAccount.avatarSrc &&\n\t\t\t\t\t\t\t<img src={this._selectedAccount.avatarSrc}/>\n\t\t\t\t\t\t}\n\t\t\t\t\t\t{this.showEditButton &&\n\t\t\t\t\t\t<AvatarBadge slot=\"badge\" icon={edit}></AvatarBadge>\n\t\t\t\t\t\t}\n\t\t\t\t\t</Avatar>\n\t\t\t\t</span>\n\t\t\t\t{this._selectedAccount.titleText &&\n\t\t\t\t\t<Text id=\"selected-account-title\" class=\"ui5-user-menu-selected-account-title\">{this._selectedAccount.titleText}</Text>\n\t\t\t\t}\n\n\t\t\t\t{this._selectedAccount.subtitleText &&\n\t\t\t\t\t<Text class=\"ui5-user-menu-selected-account-subtitleText\">{this._selectedAccount.subtitleText}</Text>\n\t\t\t\t}\n\t\t\t\t{this._selectedAccount.description &&\n\t\t\t\t\t<Text class=\"ui5-user-menu-selected-account-description\">{this._selectedAccount.description}</Text>\n\t\t\t\t}\n\t\t\t\t{this._selectedAccount.additionalInfo &&\n\t\t\t\t\t<Text class=\"ui5-user-menu-selected-account-additional-info\">{this._selectedAccount.additionalInfo}</Text>\n\t\t\t\t}\n\n\t\t\t\t{this._hasInfoArea &&\n\t\t\t\t\t<div class=\"ui5-user-menu-info-area\">\n\t\t\t\t\t\t<slot name=\"infoArea\"></slot>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\n\t\t\t\t{this.showManageAccount &&\n\t\t\t\t\t<Button id=\"selected-account-manage-btn\" icon={userSettings} class=\"ui5-user-menu-manage-account-btn\" onClick={this._handleManageAccountClick}>{this._manageAccountButtonText}</Button>\n\t\t\t\t}\n\t\t\t</div>\n\t\t}\n\t</>);\n}\n\nfunction otherAccountsContent(this: UserMenu) {\n\treturn (<>\n\t\t<Panel collapsed={true} class=\"ui5-user-menu-other-accounts\" accessibleName={`${this._otherAccountsButtonText} (${this._otherAccounts.length})`}>\n\t\t\t<div slot=\"header\" class=\"ui5-user-menu-account-header\">\n\t\t\t\t<Title slot=\"header\" level=\"H4\" wrapping-type=\"None\">{this._otherAccountsButtonText} ({this._otherAccounts.length})</Title>\n\t\t\t\t{this.showEditAccounts &&\n\t\t\t\t\t<Button slot=\"header\" class=\"ui5-user-menu-add-account-btn\" design=\"Transparent\" icon={userEdit} onClick={this._handleEditAccountsClick} tooltip={this._editAccountsTooltip}/>\n\t\t\t\t}\n\t\t\t</div>\n\t\t\t{this._otherAccounts.length > 0 &&\n\t\t\t\t<>\n\t\t\t\t\t{otherAccountsList.call(this)}\n\t\t\t\t</>\n\t\t\t}\n\t\t</Panel>\n\t</>);\n}\n\nfunction otherAccountsList(this: UserMenu) {\n\treturn (<>\n\t\t<List onItemClick={this._handleAccountSwitch} loadingDelay={0}\n\t\t\taccessibleName={`${this._otherAccountsButtonText} (${this._otherAccounts.length})`}\n\t\t\t loading={this._otherAccounts.some(account => account.loading === true)}>\n\t\t\t{this._otherAccounts.map((account, index) =>\n\t\t\t\t<ListItemCustom\n\t\t\t\t\tref={this.captureRef.bind(account)}\n\t\t\t\t\taccessibilityAttributes={{\n\t\t\t\t\t\t\"ariaPosinset\": index + 1,\n\t\t\t\t\t\t\"ariaSetsize\": this._otherAccounts.length\n\t\t\t\t\t}}\n\t\t\t\t\taccessibleName={this.getAccountDescriptionText(account)}\n\t\t\t\t>\n\t\t\t\t\t<div class=\"ui5-user-menu-other-accounts-content\">\n\t\t\t\t\t\t<Avatar slot=\"image\" size=\"S\" initials={account._initials} fallbackIcon={personPlaceholder} colorScheme={account.avatarColorScheme}>\n\t\t\t\t\t\t\t{account.avatarSrc &&\n\t\t\t\t\t\t\t\t<img src={account.avatarSrc}/>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</Avatar>\n\t\t\t\t\t\t<div class=\"ui5-user-menu-other-accounts-info\">\n\t\t\t\t\t\t\t{account.titleText &&\n\t\t\t\t\t\t\t\t<Title class=\"ui5-user-menu-other-accounts-title\">{account.titleText}</Title>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{account.subtitleText &&\n\t\t\t\t\t\t\t\t<Label class=\"ui5-user-menu-other-accounts-additional-info\">{account.subtitleText}</Label>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{account.description &&\n\t\t\t\t\t\t\t\t<Label class=\"ui5-user-menu-other-accounts-additional-info\">{account.description}</Label>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t{account.selected &&\n\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\tpart=\"icon\"\n\t\t\t\t\t\t\t\t\tname={selectedAccount}\n\t\t\t\t\t\t\t\t\tclass=\"ui5-user-menu-selected-account-icon\"\n\t\t\t\t\t\t\t\t\tmode=\"Decorative\" />\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t</div>\n\t\t\t\t</ListItemCustom>\n\t\t\t)}\n\t\t</List>\n\t</>);\n}\n"]}
|
|
@@ -105,6 +105,12 @@ declare class UserSettingsDialog extends UI5Element {
|
|
|
105
105
|
* @private
|
|
106
106
|
*/
|
|
107
107
|
_showNoSearchResult: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Indicates that the user changed the search value and the search
|
|
110
|
+
* results should be announced on the next rendering.
|
|
111
|
+
* @private
|
|
112
|
+
*/
|
|
113
|
+
_announceSearchResults: boolean;
|
|
108
114
|
/**
|
|
109
115
|
* Defines the current media query size.
|
|
110
116
|
* @private
|
|
@@ -112,7 +118,7 @@ declare class UserSettingsDialog extends UI5Element {
|
|
|
112
118
|
_mediaRange?: any;
|
|
113
119
|
onEnterDOM(): void;
|
|
114
120
|
onBeforeRendering(): void;
|
|
115
|
-
_handleItemClick(e: CustomEvent<ListItemClickEventDetail>): void
|
|
121
|
+
_handleItemClick(e: CustomEvent<ListItemClickEventDetail>): Promise<void>;
|
|
116
122
|
_handleDialogAfterOpen(): void;
|
|
117
123
|
_handleDialogBeforeClose(e: CustomEvent<PopupBeforeCloseEventDetail>): void;
|
|
118
124
|
_handleDialogAfterClose(): void;
|
|
@@ -122,12 +128,13 @@ declare class UserSettingsDialog extends UI5Element {
|
|
|
122
128
|
get saveButtonText(): string;
|
|
123
129
|
get cancelButtonText(): string;
|
|
124
130
|
get noSearchResultsText(): string;
|
|
131
|
+
get _searchResultsText(): string;
|
|
125
132
|
get _selectedItemSlotName(): string | undefined;
|
|
126
133
|
get _showSettingWithNavigation(): boolean;
|
|
127
134
|
_handleCloseButtonClick(): void;
|
|
128
135
|
_handleSaveButtonClick(): void;
|
|
129
136
|
_handleCancelButtonClick(): void;
|
|
130
|
-
_handleCollapseClick(): void
|
|
137
|
+
_handleCollapseClick(): Promise<void>;
|
|
131
138
|
_handleInput(e: CustomEvent<InputEventDetail>): void;
|
|
132
139
|
captureRef(ref: HTMLElement & {
|
|
133
140
|
associatedSettingItem?: UI5Element;
|
|
@@ -10,11 +10,14 @@ import { customElement, property, slotStrict as slot, eventStrict as event, } fr
|
|
|
10
10
|
import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
|
|
11
11
|
import i18n from "@ui5/webcomponents-base/dist/decorators/i18n.js";
|
|
12
12
|
import { isPhone, isTablet, isCombi } from "@ui5/webcomponents-base/dist/Device.js";
|
|
13
|
+
import { renderFinished } from "@ui5/webcomponents-base/dist/Render.js";
|
|
13
14
|
import MediaRange from "@ui5/webcomponents-base/dist/MediaRange.js";
|
|
15
|
+
import announce from "@ui5/webcomponents-base/dist/util/InvisibleMessage.js";
|
|
16
|
+
import InvisibleMessageMode from "@ui5/webcomponents-base/dist/types/InvisibleMessageMode.js";
|
|
14
17
|
import UserSettingsDialogTemplate from "./UserSettingsDialogTemplate.js";
|
|
15
18
|
import UserSettingsDialogCss from "./generated/themes/UserSettingsDialog.css.js";
|
|
16
19
|
// Texts
|
|
17
|
-
import { USER_SETTINGS_DIALOG_ACCESSIBLE_NAME, USER_SETTINGS_LIST_ARIA_ROLE_DESC, USER_SETTINGS_DIALOG_CLOSE_BUTTON_TEXT, USER_SETTINGS_DIALOG_SAVE_BUTTON_TEXT, USER_SETTINGS_DIALOG_CANCEL_BUTTON_TEXT, USER_SETTINGS_DIALOG_NO_SEARCH_RESULTS_TEXT, } from "./generated/i18n/i18n-defaults.js";
|
|
20
|
+
import { USER_SETTINGS_DIALOG_ACCESSIBLE_NAME, USER_SETTINGS_LIST_ARIA_ROLE_DESC, USER_SETTINGS_DIALOG_CLOSE_BUTTON_TEXT, USER_SETTINGS_DIALOG_SAVE_BUTTON_TEXT, USER_SETTINGS_DIALOG_CANCEL_BUTTON_TEXT, USER_SETTINGS_DIALOG_NO_SEARCH_RESULTS_TEXT, USER_SETTINGS_DIALOG_SEARCH_NO_RESULTS, USER_SETTINGS_DIALOG_SEARCH_ONE_RESULT, USER_SETTINGS_DIALOG_SEARCH_MORE_RESULTS, } from "./generated/i18n/i18n-defaults.js";
|
|
18
21
|
/**
|
|
19
22
|
* @class
|
|
20
23
|
* ### Overview
|
|
@@ -80,6 +83,12 @@ let UserSettingsDialog = UserSettingsDialog_1 = class UserSettingsDialog extends
|
|
|
80
83
|
* @private
|
|
81
84
|
*/
|
|
82
85
|
this._showNoSearchResult = false;
|
|
86
|
+
/**
|
|
87
|
+
* Indicates that the user changed the search value and the search
|
|
88
|
+
* results should be announced on the next rendering.
|
|
89
|
+
* @private
|
|
90
|
+
*/
|
|
91
|
+
this._announceSearchResults = false;
|
|
83
92
|
}
|
|
84
93
|
onEnterDOM() {
|
|
85
94
|
this.setAttribute("data-sap-ui-fastnavgroup-container", "true");
|
|
@@ -115,6 +124,10 @@ let UserSettingsDialog = UserSettingsDialog_1 = class UserSettingsDialog extends
|
|
|
115
124
|
else {
|
|
116
125
|
this._showNoSearchResult = false;
|
|
117
126
|
}
|
|
127
|
+
if (this._announceSearchResults) {
|
|
128
|
+
this._announceSearchResults = false;
|
|
129
|
+
announce(this._searchResultsText, InvisibleMessageMode.Polite);
|
|
130
|
+
}
|
|
118
131
|
if (!this._selectedSetting) {
|
|
119
132
|
this._selectedSetting = this.items[0] || this.fixedItems[0];
|
|
120
133
|
}
|
|
@@ -128,12 +141,13 @@ let UserSettingsDialog = UserSettingsDialog_1 = class UserSettingsDialog extends
|
|
|
128
141
|
}
|
|
129
142
|
});
|
|
130
143
|
}
|
|
131
|
-
_handleItemClick(e) {
|
|
144
|
+
async _handleItemClick(e) {
|
|
132
145
|
const setting = e.detail.item;
|
|
133
146
|
const settingItem = setting.associatedSettingItem;
|
|
134
147
|
const eventPrevented = !this.fireDecoratorEvent("selection-change", {
|
|
135
148
|
item: settingItem,
|
|
136
149
|
});
|
|
150
|
+
const shouldNavigate = this._showSettingWithNavigation;
|
|
137
151
|
this._collapsed = true;
|
|
138
152
|
if (!eventPrevented) {
|
|
139
153
|
this.items.forEach(item => {
|
|
@@ -144,6 +158,12 @@ let UserSettingsDialog = UserSettingsDialog_1 = class UserSettingsDialog extends
|
|
|
144
158
|
});
|
|
145
159
|
settingItem.selected = true;
|
|
146
160
|
}
|
|
161
|
+
// In navigation (single-column) mode the content replaces the list, so move the
|
|
162
|
+
// focus to the first interactive element of the content instead of losing it.
|
|
163
|
+
if (shouldNavigate) {
|
|
164
|
+
await renderFinished();
|
|
165
|
+
this._selectedSetting?.focusFirstContentElement();
|
|
166
|
+
}
|
|
147
167
|
}
|
|
148
168
|
_handleDialogAfterOpen() {
|
|
149
169
|
this.fireDecoratorEvent("open");
|
|
@@ -179,6 +199,17 @@ let UserSettingsDialog = UserSettingsDialog_1 = class UserSettingsDialog extends
|
|
|
179
199
|
get noSearchResultsText() {
|
|
180
200
|
return UserSettingsDialog_1.i18nBundle.getText(USER_SETTINGS_DIALOG_NO_SEARCH_RESULTS_TEXT);
|
|
181
201
|
}
|
|
202
|
+
get _searchResultsText() {
|
|
203
|
+
const resultsCount = this._filteredItems.length + this._filteredFixedItems.length;
|
|
204
|
+
switch (resultsCount) {
|
|
205
|
+
case 0:
|
|
206
|
+
return UserSettingsDialog_1.i18nBundle.getText(USER_SETTINGS_DIALOG_SEARCH_NO_RESULTS);
|
|
207
|
+
case 1:
|
|
208
|
+
return UserSettingsDialog_1.i18nBundle.getText(USER_SETTINGS_DIALOG_SEARCH_ONE_RESULT);
|
|
209
|
+
default:
|
|
210
|
+
return UserSettingsDialog_1.i18nBundle.getText(USER_SETTINGS_DIALOG_SEARCH_MORE_RESULTS, resultsCount);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
182
213
|
get _selectedItemSlotName() {
|
|
183
214
|
return this._selectedSetting ? this._selectedSetting._individualSlot : "";
|
|
184
215
|
}
|
|
@@ -197,11 +228,19 @@ let UserSettingsDialog = UserSettingsDialog_1 = class UserSettingsDialog extends
|
|
|
197
228
|
_handleCancelButtonClick() {
|
|
198
229
|
this.fireDecoratorEvent("cancel");
|
|
199
230
|
}
|
|
200
|
-
_handleCollapseClick() {
|
|
231
|
+
async _handleCollapseClick() {
|
|
201
232
|
this._collapsed = false;
|
|
233
|
+
// The side list replaces the content, so return the focus to the
|
|
234
|
+
// user settings item that was selected instead of losing it.
|
|
235
|
+
await renderFinished();
|
|
236
|
+
const selectedListItem = this._selectedSetting
|
|
237
|
+
? this.shadowRoot.querySelector(`#setting-${this._selectedSetting._id}`)
|
|
238
|
+
: null;
|
|
239
|
+
selectedListItem?.focus();
|
|
202
240
|
}
|
|
203
241
|
_handleInput(e) {
|
|
204
242
|
this._searchValue = e.target.value;
|
|
243
|
+
this._announceSearchResults = true;
|
|
205
244
|
}
|
|
206
245
|
captureRef(ref) {
|
|
207
246
|
if (ref) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserSettingsDialog.js","sourceRoot":"","sources":["../src/UserSettingsDialog.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AAEpE,OAAO,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KG;;IACF,KAAK,CAAC,MAAM,CAAC;IAEd;;;;;OAKG;;IACF,KAAK,CAAC,QAAQ,CAAC;GAEV,kBAAkB,CAsRvB;AAED,kBAAkB,CAAC,MAAM,EAAE,CAAC;AAE5B,eAAe,kBAAkB,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { Slot, DefaultSlot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport {\n\tcustomElement, property, 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 Input from \"@ui5/webcomponents/dist/Input.js\";\nimport type { InputEventDetail } from \"@ui5/webcomponents/dist/Input.js\";\nimport type { ListItemClickEventDetail } from \"@ui5/webcomponents/dist/List.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type ListItemBase from \"@ui5/webcomponents/dist/ListItemBase.js\";\nimport type { PopupBeforeCloseEventDetail } from \"@ui5/webcomponents/dist/Popup.js\";\nimport { isPhone, isTablet, isCombi } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport MediaRange from \"@ui5/webcomponents-base/dist/MediaRange.js\";\nimport UserSettingsDialogTemplate from \"./UserSettingsDialogTemplate.js\";\nimport type UserSettingsItem from \"./UserSettingsItem.js\";\nimport UserSettingsDialogCss from \"./generated/themes/UserSettingsDialog.css.js\";\n\n// Texts\nimport {\n\tUSER_SETTINGS_DIALOG_ACCESSIBLE_NAME,\n\tUSER_SETTINGS_LIST_ARIA_ROLE_DESC,\n\tUSER_SETTINGS_DIALOG_CLOSE_BUTTON_TEXT,\n\tUSER_SETTINGS_DIALOG_SAVE_BUTTON_TEXT,\n\tUSER_SETTINGS_DIALOG_CANCEL_BUTTON_TEXT,\n\tUSER_SETTINGS_DIALOG_NO_SEARCH_RESULTS_TEXT,\n} from \"./generated/i18n/i18n-defaults.js\";\n\ntype UserSettingsItemSelectEventDetail = {\n\titem: UserSettingsItem;\n}\n\ntype UserSettingsBeforeCloseEventDetail = PopupBeforeCloseEventDetail;\n\n/**\n * @class\n * ### Overview\n *\n * The `ui5-user-settings-dialog` is an SAP Fiori-specific web component used in the `ui5-user-menu`.\n * It allows the user to easily view information and settings for an account.\n *\n * ### ES6 Module Import\n * `import \"@ui5/webcomponents-fiori/dist/UserSettingsDialog.js\";`\n *\n * @constructor\n * @extends UI5Element\n * @public\n * @since 2.8.0\n */\n@customElement({\n\ttag: \"ui5-user-settings-dialog\",\n\trenderer: jsxRenderer,\n\ttemplate: UserSettingsDialogTemplate,\n\tstyles: [UserSettingsDialogCss],\n})\n\n/**\n * Fired when an item is selected.\n * @param {UserSettingsItem} item The selected `user settings item`.\n * @public\n */\n@event(\"selection-change\", {\n\tcancelable: true,\n})\n\n/**\n * Fired when the settings dialog is opened.\n * @public\n */\n@event(\"open\")\n\n/**\n * Fired before the settings dialog is closed.\n *\n * **Note:** This event is cancelable via `preventDefault()`, allowing the application to keep the\n * dialog open — for example, to prompt the user about unsaved changes before dismissal.\n * @public\n */\n@event(\"before-close\", {\n\tcancelable: true,\n})\n\n/**\n * Fired when the settings dialog is closed.\n * @public\n */\n@event(\"close\")\n\n/**\n * Fired when the Save button in the footer is clicked.\n * The dialog does not close automatically — the application is responsible\n * for closing it after persisting the changes.\n * @public\n */\n@event(\"save\")\n\n/**\n * Fired when the Cancel button in the footer is clicked.\n * The dialog does not close automatically — the application is responsible\n * for closing it after discarding the changes.\n * @public\n */\n@event(\"cancel\")\n\nclass UserSettingsDialog extends UI5Element {\n\teventDetails!: {\n\t\t\"selection-change\": UserSettingsItemSelectEventDetail,\n\t\t\"open\": void,\n\t\t\"before-close\": UserSettingsBeforeCloseEventDetail,\n\t\t\"close\": void,\n\t\t\"save\": void,\n\t\t\"cancel\": void,\n\t};\n\t/**\n\t * Defines, if the User Settings Dialog is opened.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\topen = false;\n\n\t/**\n\t * Defines the headerText of the item.\n\t *\n\t * @public\n\t * @default undefined\n\t */\n\t@property({ type: String })\n\theaderText?: string;\n\n\t/**\n\t * Defines if the Search Field would be displayed.\n\t *\n\t * **Note:** By default the Search Field is not displayed.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowSearchField = false;\n\n\t/**\n\t * Defines whether the dialog offers Save and Cancel actions in its footer.\n\t *\n\t * When true, the footer renders a Save (Emphasized) and a Cancel button\n\t * instead of the default Close button. Save and Cancel each fire a\n\t * corresponding event; the application is responsible for closing the\n\t * dialog (typically after persisting or discarding the changes).\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tsaveMode = false;\n\n\t/**\n\t * Defines the user settings items.\n\t *\n\t * **Note:** If no setting item is set as `selected`, the first one will be selected.\n\t * @public\n\t */\n\t@slot({\n\t\t\"default\": true,\n\t\ttype: HTMLElement,\n\t\tindividualSlots: true,\n\t\tinvalidateOnChildChange: {\n\t\t\tproperties: true,\n\t\t\tslots: true,\n\t\t},\n\t})\n\titems!: DefaultSlot<UserSettingsItem>;\n\n\t/**\n\t * Defines the fixed user settings items.\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: true,\n\t\t},\n\t})\n\tfixedItems!: Slot<UserSettingsItem>;\n\n\t@i18n(\"@ui5/webcomponents-fiori\")\n\tstatic i18nBundle: I18nBundle;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: String })\n\t_searchValue = \"\";\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_collapsed = false;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Object })\n\t_selectedSetting?: UserSettingsItem;\n\n\t/**\n\t * @private\n\t */\n\t_filteredItems: Array<UserSettingsItem> = [];\n\n\t/**\n\t * @private\n\t */\n\t_filteredFixedItems: Array<UserSettingsItem> = [];\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_showNoSearchResult = false;\n\n\t/**\n\t * Defines the current media query size.\n\t * @private\n\t */\n\t@property({ type: String })\n\t_mediaRange?: any;\n\n\tonEnterDOM() {\n\t\tthis.setAttribute(\"data-sap-ui-fastnavgroup-container\", \"true\");\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._mediaRange = MediaRange.getCurrentRange(MediaRange.RANGESETS.RANGE_4STEPS);\n\t\tconst searchValue = this._searchValue.toLowerCase();\n\t\tthis._filteredItems = [];\n\t\tthis._filteredFixedItems = [];\n\t\tconst siblingsWithIcon = this.items.some(item => !!item.icon);\n\t\tthis.items.forEach(item => {\n\t\t\tif (item.text.toLowerCase().includes(searchValue)) {\n\t\t\t\tthis._filteredItems.push(item);\n\t\t\t}\n\n\t\t\tif (item.selected) {\n\t\t\t\tthis._selectedSetting = item;\n\t\t\t}\n\t\t\titem._siblingsWithIcon = siblingsWithIcon;\n\t\t\titem._inMobileView = this._showSettingWithNavigation;\n\t\t});\n\n\t\tthis.fixedItems.forEach(item => {\n\t\t\tif (item.text.toLowerCase().includes(searchValue)) {\n\t\t\t\tthis._filteredFixedItems.push(item);\n\t\t\t}\n\n\t\t\tif (item.selected) {\n\t\t\t\tthis._selectedSetting = item;\n\t\t\t}\n\t\t\titem._inMobileView = this._showSettingWithNavigation;\n\t\t});\n\n\t\tif (this._filteredItems.length === 0 && this._filteredFixedItems.length === 0) {\n\t\t\tthis._showNoSearchResult = true;\n\t\t} else {\n\t\t\tthis._showNoSearchResult = false;\n\t\t}\n\n\t\tif (!this._selectedSetting) {\n\t\t\tthis._selectedSetting = this.items[0] || this.fixedItems[0];\n\t\t}\n\n\t\tconst allItems = [...this.items, ...this.fixedItems];\n\t\tallItems.forEach(item => {\n\t\t\tif (item === this._selectedSetting) {\n\t\t\t\titem.setAttribute(\"data-sap-ui-fastnavgroup\", \"true\");\n\t\t\t} else {\n\t\t\t\titem.removeAttribute(\"data-sap-ui-fastnavgroup\");\n\t\t\t}\n\t\t});\n\t}\n\n\t_handleItemClick(e: CustomEvent<ListItemClickEventDetail>) {\n\t\tconst setting = e.detail.item as ListItemBase & { associatedSettingItem: UserSettingsItem };\n\t\tconst settingItem = setting.associatedSettingItem;\n\t\tconst eventPrevented = !this.fireDecoratorEvent(\"selection-change\", {\n\t\t\titem: settingItem,\n\t\t});\n\t\tthis._collapsed = true;\n\n\t\tif (!eventPrevented) {\n\t\t\tthis.items.forEach(item => {\n\t\t\t\titem.selected = false;\n\t\t\t});\n\t\t\tthis.fixedItems.forEach(item => {\n\t\t\t\titem.selected = false;\n\t\t\t});\n\t\t\tsettingItem.selected = true;\n\t\t}\n\t}\n\n\t_handleDialogAfterOpen() {\n\t\tthis.fireDecoratorEvent(\"open\");\n\t}\n\n\t_handleDialogBeforeClose(e: CustomEvent<PopupBeforeCloseEventDetail>) {\n\t\tif (!e.detail.escPressed) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst eventPrevented = !this.fireDecoratorEvent(\"before-close\", e.detail);\n\n\t\tif (eventPrevented) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_handleDialogAfterClose() {\n\t\tthis.open = false;\n\t\tthis.fireDecoratorEvent(\"close\");\n\t}\n\n\tget accessibleNameText() {\n\t\treturn UserSettingsDialog.i18nBundle.getText(USER_SETTINGS_DIALOG_ACCESSIBLE_NAME);\n\t}\n\n\tget ariaRoleDescList() {\n\t\treturn UserSettingsDialog.i18nBundle.getText(USER_SETTINGS_LIST_ARIA_ROLE_DESC);\n\t}\n\n\tget closeButtonText() {\n\t\treturn UserSettingsDialog.i18nBundle.getText(USER_SETTINGS_DIALOG_CLOSE_BUTTON_TEXT);\n\t}\n\tget saveButtonText() {\n\t\treturn UserSettingsDialog.i18nBundle.getText(USER_SETTINGS_DIALOG_SAVE_BUTTON_TEXT);\n\t}\n\tget cancelButtonText() {\n\t\treturn UserSettingsDialog.i18nBundle.getText(USER_SETTINGS_DIALOG_CANCEL_BUTTON_TEXT);\n\t}\n\tget noSearchResultsText() {\n\t\treturn UserSettingsDialog.i18nBundle.getText(USER_SETTINGS_DIALOG_NO_SEARCH_RESULTS_TEXT);\n\t}\n\n\tget _selectedItemSlotName() {\n\t\treturn this._selectedSetting ? this._selectedSetting._individualSlot : \"\";\n\t}\n\n\tget _showSettingWithNavigation() {\n\t\treturn (isPhone() || (isTablet() && !isCombi())) || (this._mediaRange === \"S\" || this._mediaRange === \"M\");\n\t}\n\n\t_handleCloseButtonClick() {\n\t\tconst eventPrevented = !this.fireDecoratorEvent(\"before-close\", { escPressed: false });\n\n\t\tif (!eventPrevented) {\n\t\t\tthis.open = false;\n\t\t}\n\t}\n\n\t_handleSaveButtonClick() {\n\t\tthis.fireDecoratorEvent(\"save\");\n\t}\n\n\t_handleCancelButtonClick() {\n\t\tthis.fireDecoratorEvent(\"cancel\");\n\t}\n\n\t_handleCollapseClick() {\n\t\tthis._collapsed = false;\n\t}\n\n\t_handleInput(e: CustomEvent<InputEventDetail>) {\n\t\tthis._searchValue = (e.target as Input).value;\n\t}\n\n\tcaptureRef(ref: HTMLElement & { associatedSettingItem?: UI5Element} | null) {\n\t\tif (ref) {\n\t\t\tref.associatedSettingItem = this;\n\t\t}\n\t}\n}\n\nUserSettingsDialog.define();\n\nexport default UserSettingsDialog;\nexport type {\n\tUserSettingsItemSelectEventDetail,\n\tUserSettingsBeforeCloseEventDetail,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"UserSettingsDialog.js","sourceRoot":"","sources":["../src/UserSettingsDialog.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AAEpE,OAAO,EACN,aAAa,EAAE,QAAQ,EAAE,UAAU,IAAI,IAAI,EAAE,WAAW,IAAI,KAAK,GACjE,MAAM,4CAA4C,CAAC;AACpD,OAAO,WAAW,MAAM,sDAAsD,C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K,CAAC,OAAO,CAAC;IAEf;;;;;OAKG;;IACF,KAAK,CAAC,MAAM,CAAC;IAEd;;;;;OAKG;;IACF,KAAK,CAAC,QAAQ,CAAC;GAEV,kBAAkB,CAgUvB;AAED,kBAAkB,CAAC,MAAM,EAAE,CAAC;AAE5B,eAAe,kBAAkB,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { Slot, DefaultSlot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport {\n\tcustomElement, property, 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 Input from \"@ui5/webcomponents/dist/Input.js\";\nimport type { InputEventDetail } from \"@ui5/webcomponents/dist/Input.js\";\nimport type { ListItemClickEventDetail } from \"@ui5/webcomponents/dist/List.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type ListItemBase from \"@ui5/webcomponents/dist/ListItemBase.js\";\nimport type { PopupBeforeCloseEventDetail } from \"@ui5/webcomponents/dist/Popup.js\";\nimport { isPhone, isTablet, isCombi } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport MediaRange from \"@ui5/webcomponents-base/dist/MediaRange.js\";\nimport announce from \"@ui5/webcomponents-base/dist/util/InvisibleMessage.js\";\nimport InvisibleMessageMode from \"@ui5/webcomponents-base/dist/types/InvisibleMessageMode.js\";\nimport UserSettingsDialogTemplate from \"./UserSettingsDialogTemplate.js\";\nimport type UserSettingsItem from \"./UserSettingsItem.js\";\nimport UserSettingsDialogCss from \"./generated/themes/UserSettingsDialog.css.js\";\n\n// Texts\nimport {\n\tUSER_SETTINGS_DIALOG_ACCESSIBLE_NAME,\n\tUSER_SETTINGS_LIST_ARIA_ROLE_DESC,\n\tUSER_SETTINGS_DIALOG_CLOSE_BUTTON_TEXT,\n\tUSER_SETTINGS_DIALOG_SAVE_BUTTON_TEXT,\n\tUSER_SETTINGS_DIALOG_CANCEL_BUTTON_TEXT,\n\tUSER_SETTINGS_DIALOG_NO_SEARCH_RESULTS_TEXT,\n\tUSER_SETTINGS_DIALOG_SEARCH_NO_RESULTS,\n\tUSER_SETTINGS_DIALOG_SEARCH_ONE_RESULT,\n\tUSER_SETTINGS_DIALOG_SEARCH_MORE_RESULTS,\n} from \"./generated/i18n/i18n-defaults.js\";\n\ntype UserSettingsItemSelectEventDetail = {\n\titem: UserSettingsItem;\n}\n\ntype UserSettingsBeforeCloseEventDetail = PopupBeforeCloseEventDetail;\n\n/**\n * @class\n * ### Overview\n *\n * The `ui5-user-settings-dialog` is an SAP Fiori-specific web component used in the `ui5-user-menu`.\n * It allows the user to easily view information and settings for an account.\n *\n * ### ES6 Module Import\n * `import \"@ui5/webcomponents-fiori/dist/UserSettingsDialog.js\";`\n *\n * @constructor\n * @extends UI5Element\n * @public\n * @since 2.8.0\n */\n@customElement({\n\ttag: \"ui5-user-settings-dialog\",\n\trenderer: jsxRenderer,\n\ttemplate: UserSettingsDialogTemplate,\n\tstyles: [UserSettingsDialogCss],\n})\n\n/**\n * Fired when an item is selected.\n * @param {UserSettingsItem} item The selected `user settings item`.\n * @public\n */\n@event(\"selection-change\", {\n\tcancelable: true,\n})\n\n/**\n * Fired when the settings dialog is opened.\n * @public\n */\n@event(\"open\")\n\n/**\n * Fired before the settings dialog is closed.\n *\n * **Note:** This event is cancelable via `preventDefault()`, allowing the application to keep the\n * dialog open — for example, to prompt the user about unsaved changes before dismissal.\n * @public\n */\n@event(\"before-close\", {\n\tcancelable: true,\n})\n\n/**\n * Fired when the settings dialog is closed.\n * @public\n */\n@event(\"close\")\n\n/**\n * Fired when the Save button in the footer is clicked.\n * The dialog does not close automatically — the application is responsible\n * for closing it after persisting the changes.\n * @public\n */\n@event(\"save\")\n\n/**\n * Fired when the Cancel button in the footer is clicked.\n * The dialog does not close automatically — the application is responsible\n * for closing it after discarding the changes.\n * @public\n */\n@event(\"cancel\")\n\nclass UserSettingsDialog extends UI5Element {\n\teventDetails!: {\n\t\t\"selection-change\": UserSettingsItemSelectEventDetail,\n\t\t\"open\": void,\n\t\t\"before-close\": UserSettingsBeforeCloseEventDetail,\n\t\t\"close\": void,\n\t\t\"save\": void,\n\t\t\"cancel\": void,\n\t};\n\t/**\n\t * Defines, if the User Settings Dialog is opened.\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\topen = false;\n\n\t/**\n\t * Defines the headerText of the item.\n\t *\n\t * @public\n\t * @default undefined\n\t */\n\t@property({ type: String })\n\theaderText?: string;\n\n\t/**\n\t * Defines if the Search Field would be displayed.\n\t *\n\t * **Note:** By default the Search Field is not displayed.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tshowSearchField = false;\n\n\t/**\n\t * Defines whether the dialog offers Save and Cancel actions in its footer.\n\t *\n\t * When true, the footer renders a Save (Emphasized) and a Cancel button\n\t * instead of the default Close button. Save and Cancel each fire a\n\t * corresponding event; the application is responsible for closing the\n\t * dialog (typically after persisting or discarding the changes).\n\t *\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tsaveMode = false;\n\n\t/**\n\t * Defines the user settings items.\n\t *\n\t * **Note:** If no setting item is set as `selected`, the first one will be selected.\n\t * @public\n\t */\n\t@slot({\n\t\t\"default\": true,\n\t\ttype: HTMLElement,\n\t\tindividualSlots: true,\n\t\tinvalidateOnChildChange: {\n\t\t\tproperties: true,\n\t\t\tslots: true,\n\t\t},\n\t})\n\titems!: DefaultSlot<UserSettingsItem>;\n\n\t/**\n\t * Defines the fixed user settings items.\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: true,\n\t\t},\n\t})\n\tfixedItems!: Slot<UserSettingsItem>;\n\n\t@i18n(\"@ui5/webcomponents-fiori\")\n\tstatic i18nBundle: I18nBundle;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: String })\n\t_searchValue = \"\";\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_collapsed = false;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Object })\n\t_selectedSetting?: UserSettingsItem;\n\n\t/**\n\t * @private\n\t */\n\t_filteredItems: Array<UserSettingsItem> = [];\n\n\t/**\n\t * @private\n\t */\n\t_filteredFixedItems: Array<UserSettingsItem> = [];\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_showNoSearchResult = false;\n\n\t/**\n\t * Indicates that the user changed the search value and the search\n\t * results should be announced on the next rendering.\n\t * @private\n\t */\n\t_announceSearchResults = false;\n\n\t/**\n\t * Defines the current media query size.\n\t * @private\n\t */\n\t@property({ type: String })\n\t_mediaRange?: any;\n\n\tonEnterDOM() {\n\t\tthis.setAttribute(\"data-sap-ui-fastnavgroup-container\", \"true\");\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._mediaRange = MediaRange.getCurrentRange(MediaRange.RANGESETS.RANGE_4STEPS);\n\t\tconst searchValue = this._searchValue.toLowerCase();\n\t\tthis._filteredItems = [];\n\t\tthis._filteredFixedItems = [];\n\t\tconst siblingsWithIcon = this.items.some(item => !!item.icon);\n\t\tthis.items.forEach(item => {\n\t\t\tif (item.text.toLowerCase().includes(searchValue)) {\n\t\t\t\tthis._filteredItems.push(item);\n\t\t\t}\n\n\t\t\tif (item.selected) {\n\t\t\t\tthis._selectedSetting = item;\n\t\t\t}\n\t\t\titem._siblingsWithIcon = siblingsWithIcon;\n\t\t\titem._inMobileView = this._showSettingWithNavigation;\n\t\t});\n\n\t\tthis.fixedItems.forEach(item => {\n\t\t\tif (item.text.toLowerCase().includes(searchValue)) {\n\t\t\t\tthis._filteredFixedItems.push(item);\n\t\t\t}\n\n\t\t\tif (item.selected) {\n\t\t\t\tthis._selectedSetting = item;\n\t\t\t}\n\t\t\titem._inMobileView = this._showSettingWithNavigation;\n\t\t});\n\n\t\tif (this._filteredItems.length === 0 && this._filteredFixedItems.length === 0) {\n\t\t\tthis._showNoSearchResult = true;\n\t\t} else {\n\t\t\tthis._showNoSearchResult = false;\n\t\t}\n\n\t\tif (this._announceSearchResults) {\n\t\t\tthis._announceSearchResults = false;\n\t\t\tannounce(this._searchResultsText, InvisibleMessageMode.Polite);\n\t\t}\n\n\t\tif (!this._selectedSetting) {\n\t\t\tthis._selectedSetting = this.items[0] || this.fixedItems[0];\n\t\t}\n\n\t\tconst allItems = [...this.items, ...this.fixedItems];\n\t\tallItems.forEach(item => {\n\t\t\tif (item === this._selectedSetting) {\n\t\t\t\titem.setAttribute(\"data-sap-ui-fastnavgroup\", \"true\");\n\t\t\t} else {\n\t\t\t\titem.removeAttribute(\"data-sap-ui-fastnavgroup\");\n\t\t\t}\n\t\t});\n\t}\n\n\tasync _handleItemClick(e: CustomEvent<ListItemClickEventDetail>) {\n\t\tconst setting = e.detail.item as ListItemBase & { associatedSettingItem: UserSettingsItem };\n\t\tconst settingItem = setting.associatedSettingItem;\n\t\tconst eventPrevented = !this.fireDecoratorEvent(\"selection-change\", {\n\t\t\titem: settingItem,\n\t\t});\n\t\tconst shouldNavigate = this._showSettingWithNavigation;\n\t\tthis._collapsed = true;\n\n\t\tif (!eventPrevented) {\n\t\t\tthis.items.forEach(item => {\n\t\t\t\titem.selected = false;\n\t\t\t});\n\t\t\tthis.fixedItems.forEach(item => {\n\t\t\t\titem.selected = false;\n\t\t\t});\n\t\t\tsettingItem.selected = true;\n\t\t}\n\n\t\t// In navigation (single-column) mode the content replaces the list, so move the\n\t\t// focus to the first interactive element of the content instead of losing it.\n\t\tif (shouldNavigate) {\n\t\t\tawait renderFinished();\n\t\t\tthis._selectedSetting?.focusFirstContentElement();\n\t\t}\n\t}\n\n\t_handleDialogAfterOpen() {\n\t\tthis.fireDecoratorEvent(\"open\");\n\t}\n\n\t_handleDialogBeforeClose(e: CustomEvent<PopupBeforeCloseEventDetail>) {\n\t\tif (!e.detail.escPressed) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst eventPrevented = !this.fireDecoratorEvent(\"before-close\", e.detail);\n\n\t\tif (eventPrevented) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_handleDialogAfterClose() {\n\t\tthis.open = false;\n\t\tthis.fireDecoratorEvent(\"close\");\n\t}\n\n\tget accessibleNameText() {\n\t\treturn UserSettingsDialog.i18nBundle.getText(USER_SETTINGS_DIALOG_ACCESSIBLE_NAME);\n\t}\n\n\tget ariaRoleDescList() {\n\t\treturn UserSettingsDialog.i18nBundle.getText(USER_SETTINGS_LIST_ARIA_ROLE_DESC);\n\t}\n\n\tget closeButtonText() {\n\t\treturn UserSettingsDialog.i18nBundle.getText(USER_SETTINGS_DIALOG_CLOSE_BUTTON_TEXT);\n\t}\n\tget saveButtonText() {\n\t\treturn UserSettingsDialog.i18nBundle.getText(USER_SETTINGS_DIALOG_SAVE_BUTTON_TEXT);\n\t}\n\tget cancelButtonText() {\n\t\treturn UserSettingsDialog.i18nBundle.getText(USER_SETTINGS_DIALOG_CANCEL_BUTTON_TEXT);\n\t}\n\tget noSearchResultsText() {\n\t\treturn UserSettingsDialog.i18nBundle.getText(USER_SETTINGS_DIALOG_NO_SEARCH_RESULTS_TEXT);\n\t}\n\n\tget _searchResultsText() {\n\t\tconst resultsCount = this._filteredItems.length + this._filteredFixedItems.length;\n\n\t\tswitch (resultsCount) {\n\t\tcase 0:\n\t\t\treturn UserSettingsDialog.i18nBundle.getText(USER_SETTINGS_DIALOG_SEARCH_NO_RESULTS);\n\t\tcase 1:\n\t\t\treturn UserSettingsDialog.i18nBundle.getText(USER_SETTINGS_DIALOG_SEARCH_ONE_RESULT);\n\t\tdefault:\n\t\t\treturn UserSettingsDialog.i18nBundle.getText(USER_SETTINGS_DIALOG_SEARCH_MORE_RESULTS, resultsCount);\n\t\t}\n\t}\n\n\tget _selectedItemSlotName() {\n\t\treturn this._selectedSetting ? this._selectedSetting._individualSlot : \"\";\n\t}\n\n\tget _showSettingWithNavigation() {\n\t\treturn (isPhone() || (isTablet() && !isCombi())) || (this._mediaRange === \"S\" || this._mediaRange === \"M\");\n\t}\n\n\t_handleCloseButtonClick() {\n\t\tconst eventPrevented = !this.fireDecoratorEvent(\"before-close\", { escPressed: false });\n\n\t\tif (!eventPrevented) {\n\t\t\tthis.open = false;\n\t\t}\n\t}\n\n\t_handleSaveButtonClick() {\n\t\tthis.fireDecoratorEvent(\"save\");\n\t}\n\n\t_handleCancelButtonClick() {\n\t\tthis.fireDecoratorEvent(\"cancel\");\n\t}\n\n\tasync _handleCollapseClick() {\n\t\tthis._collapsed = false;\n\n\t\t// The side list replaces the content, so return the focus to the\n\t\t// user settings item that was selected instead of losing it.\n\t\tawait renderFinished();\n\t\tconst selectedListItem = this._selectedSetting\n\t\t\t? this.shadowRoot!.querySelector<HTMLElement>(`#setting-${this._selectedSetting._id}`)\n\t\t\t: null;\n\t\tselectedListItem?.focus();\n\t}\n\n\t_handleInput(e: CustomEvent<InputEventDetail>) {\n\t\tthis._searchValue = (e.target as Input).value;\n\t\tthis._announceSearchResults = true;\n\t}\n\n\tcaptureRef(ref: HTMLElement & { associatedSettingItem?: UI5Element} | null) {\n\t\tif (ref) {\n\t\t\tref.associatedSettingItem = this;\n\t\t}\n\t}\n}\n\nUserSettingsDialog.define();\n\nexport default UserSettingsDialog;\nexport type {\n\tUserSettingsItemSelectEventDetail,\n\tUserSettingsBeforeCloseEventDetail,\n};\n"]}
|
|
@@ -15,9 +15,9 @@ export default function UserSettingsDialogTemplate() {
|
|
|
15
15
|
_jsx(Input, { placeholder: "Search", type: "Search", class: "ui5-user-settings-side-search", onInput: this._handleInput, children: _jsx(Icon, { id: "searchFieldIcon", slot: "icon", name: search, showTooltip: true }) })] }), this._showNoSearchResult ?
|
|
16
16
|
_jsx("div", { class: "ui5-user-settings-side-search", children: _jsx(Text, { children: this.noSearchResultsText }) })
|
|
17
17
|
:
|
|
18
|
-
renderList.call(this, this._filteredItems, "ui5-user-settings-side-items"), this._filteredFixedItems.length > 0 && renderList.call(this, this._filteredFixedItems, "ui5-user-settings-side-fixedItems")] }), _jsx("div", { class: "ui5-user-settings-content", children: _jsx("slot", { name: this._selectedItemSlotName }) })] }), _jsx(Toolbar, { slot: "footer", design: "Transparent", "data-sap-ui-fastnavgroup": "true", children: this.saveMode ? (_jsxs(_Fragment, { children: [_jsx(ToolbarButton, { design: "Emphasized", text: this.saveButtonText, onClick: this._handleSaveButtonClick }), _jsx(ToolbarButton, { design: "Transparent", text: this.cancelButtonText, onClick: this._handleCancelButtonClick })] })) : (_jsx(ToolbarButton, { design: "Transparent", text: this.closeButtonText, onClick: this._handleCloseButtonClick })) })] }));
|
|
18
|
+
renderList.call(this, this._filteredItems, "ui5-user-settings-side-items"), this._filteredFixedItems.length > 0 && renderList.call(this, this._filteredFixedItems, "ui5-user-settings-side-fixedItems")] }), _jsx("div", { class: "ui5-user-settings-content", children: _jsx("slot", { name: this._selectedItemSlotName }) })] }), _jsx(Toolbar, { slot: "footer", design: "Transparent", "data-sap-ui-fastnavgroup": "true", children: this.saveMode ? (_jsxs(_Fragment, { children: [_jsx(ToolbarButton, { id: `${this._id}-save-btn`, design: "Emphasized", text: this.saveButtonText, onClick: this._handleSaveButtonClick }), _jsx(ToolbarButton, { id: `${this._id}-cancel-btn`, design: "Transparent", text: this.cancelButtonText, onClick: this._handleCancelButtonClick })] })) : (_jsx(ToolbarButton, { id: `${this._id}-close-btn`, design: "Transparent", text: this.closeButtonText, onClick: this._handleCloseButtonClick })) })] }));
|
|
19
19
|
}
|
|
20
20
|
function renderList(items = [], classes) {
|
|
21
|
-
return _jsx(List, {
|
|
21
|
+
return _jsx(List, { onItemClick: this._handleItemClick, class: classes, separators: "None", "data-sap-ui-fastnavgroup": "false", children: items.map(item => (_jsx(ListItemStandard, { class: !item._icon && item._siblingsWithIcon ? "ui5-user-settings-item-no-icon" : "", id: `setting-${item._id}`, icon: !item._icon && item._siblingsWithIcon ? undefined : item._icon, tooltip: item._tooltip, ref: this.captureRef.bind(item), selected: item.selected, disabled: item.disabled, accessibleName: item.ariaLabelledByText, type: this._showSettingWithNavigation ? "Navigation" : "Active", children: item.text }))) });
|
|
22
22
|
}
|
|
23
23
|
//# sourceMappingURL=UserSettingsDialogTemplate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserSettingsDialogTemplate.js","sourceRoot":"","sources":["../src/UserSettingsDialogTemplate.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,MAAM,mCAAmC,CAAC;AACvD,OAAO,KAAK,MAAM,kCAAkC,CAAC;AACrD,OAAO,KAAK,MAAM,kCAAkC,CAAC;AACrD,OAAO,IAAI,MAAM,iCAAiC,CAAC;AACnD,OAAO,IAAI,MAAM,iCAAiC,CAAC;AACnD,OAAO,IAAI,MAAM,iCAAiC,CAAC;AACnD,OAAO,gBAAgB,MAAM,6CAA6C,CAAC;AAC3E,OAAO,aAAa,MAAM,0CAA0C,CAAC;AACrE,OAAO,OAAO,MAAM,oCAAoC,CAAC;AACzD,OAAO,MAAM,MAAM,yCAAyC,CAAC;AAG7D,MAAM,CAAC,OAAO,UAAU,0BAA0B;IACjD,OAAO,CAEN,MAAC,MAAM,IAAC,KAAK,EAAC,0BAA0B,EACvC,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,OAAO,QACP,cAAc,EAAE,IAAI,CAAC,kBAAkB,qBACtB,IAAI,CAAC,oBAAoB,EAC1C,MAAM,EAAE,IAAI,CAAC,sBAAsB,EACnC,aAAa,EAAE,IAAI,CAAC,wBAAwB,EAC5C,OAAO,EAAE,IAAI,CAAC,uBAAuB,EACrC,YAAY,EAAE,WAAW,IAAI,CAAC,gBAAgB,EAAE,GAAG,EAAE,aAErD,eAAK,KAAK,EAAC,wBAAwB,aAClC,eAAK,KAAK,EAAC,wBAAwB,8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eAAe,EAAE,OAAO,EAAE,IAAI,CAAC,uBAAuB,GAAI,CACtI,GACQ,IACF,CACT,CAAC;AACH,CAAC;AAED,SAAS,UAAU,CAA2B,QAAiC,EAAE,EAAE,OAAe;IACjG,OAAO,KAAC,IAAI,IAAC,WAAW,EAAE,IAAI,CAAC,gBAAgB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAC,MAAM,8BAA0B,OAAO,YACjH,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAClB,KAAC,gBAAgB,IAChB,KAAK,EAAE,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,gCAAgC,CAAC,CAAC,CAAC,EAAE,EACpF,EAAE,EAAE,WAAW,IAAI,CAAC,GAAG,EAAE,EACzB,IAAI,EAAE,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,EACpE,OAAO,EAAE,IAAI,CAAC,QAAQ,EACtB,GAAG,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAC/B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,cAAc,EAAE,IAAI,CAAC,kBAAkB,EACvC,IAAI,EAAE,IAAI,CAAC,0BAA0B,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,YAE9D,IAAI,CAAC,IAAI,GACQ,CACnB,CAAC,GACI,CAAC;AACT,CAAC","sourcesContent":["import type UserSettingsDialog from \"./UserSettingsDialog.js\";\nimport Dialog from \"@ui5/webcomponents/dist/Dialog.js\";\nimport Title from \"@ui5/webcomponents/dist/Title.js\";\nimport Input from \"@ui5/webcomponents/dist/Input.js\";\nimport Text from \"@ui5/webcomponents/dist/Text.js\";\nimport Icon from \"@ui5/webcomponents/dist/Icon.js\";\nimport List from \"@ui5/webcomponents/dist/List.js\";\nimport ListItemStandard from \"@ui5/webcomponents/dist/ListItemStandard.js\";\nimport ToolbarButton from \"@ui5/webcomponents/dist/ToolbarButton.js\";\nimport Toolbar from \"@ui5/webcomponents/dist/Toolbar.js\";\nimport search from \"@ui5/webcomponents-icons/dist/search.js\";\nimport type UserSettingsItem from \"./UserSettingsItem.js\";\n\nexport default function UserSettingsDialogTemplate(this: UserSettingsDialog) {\n\treturn (\n\n\t\t<Dialog class=\"ui5-user-settings-dialog\"\n\t\t\topen={this.open}\n\t\t\tstretch\n\t\t\taccessibleName={this.accessibleNameText}\n\t\t\tonui5-_collapse={this._handleCollapseClick}\n\t\t\tonOpen={this._handleDialogAfterOpen}\n\t\t\tonBeforeClose={this._handleDialogBeforeClose}\n\t\t\tonClose={this._handleDialogAfterClose}\n\t\t\tinitialFocus={`setting-${this._selectedSetting?._id}`}\n\t\t>\n\t\t\t<div class=\"ui5-user-settings-root\">\n\t\t\t\t<div class=\"ui5-user-settings-side\" data-sap-ui-fastnavgroup=\"true\" aria-roledescription={this.ariaRoleDescList}>\n\t\t\t\t\t<div class=\"ui5-user-settings-side-header\">\n\t\t\t\t\t\t{this.headerText &&\n\t\t\t\t\t\t\t<Title level=\"H1\" size=\"H5\">{this.headerText}</Title>\n\t\t\t\t\t\t}\n\t\t\t\t\t\t{this.showSearchField &&\n\t\t\t\t\t\t\t<Input placeholder=\"Search\" type=\"Search\" class=\"ui5-user-settings-side-search\"\n\t\t\t\t\t\t\t\t onInput={this._handleInput}>\n\t\t\t\t\t\t\t\t<Icon id=\"searchFieldIcon\" slot=\"icon\" name={search} showTooltip></Icon>\n\t\t\t\t\t\t\t</Input>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t{this._showNoSearchResult ?\n\t\t\t\t\t\t<div class=\"ui5-user-settings-side-search\">\n\t\t\t\t\t\t\t<Text>{this.noSearchResultsText}</Text>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t:\n\t\t\t\t\t\trenderList.call(this, this._filteredItems, \"ui5-user-settings-side-items\")}\n\n\t\t\t\t\t{this._filteredFixedItems.length > 0 && renderList.call(this, this._filteredFixedItems, \"ui5-user-settings-side-fixedItems\")}\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"ui5-user-settings-content\">\n\t\t\t\t\t<slot name={this._selectedItemSlotName}></slot>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<Toolbar slot=\"footer\" design=\"Transparent\" data-sap-ui-fastnavgroup=\"true\">\n\t\t\t\t{this.saveMode ? (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<ToolbarButton id={`${this._id}-save-btn`} design=\"Emphasized\" text={this.saveButtonText} onClick={this._handleSaveButtonClick} />\n\t\t\t\t\t\t<ToolbarButton id={`${this._id}-cancel-btn`} design=\"Transparent\" text={this.cancelButtonText} onClick={this._handleCancelButtonClick} />\n\t\t\t\t\t</>\n\t\t\t\t) : (\n\t\t\t\t\t<ToolbarButton id={`${this._id}-close-btn`} design=\"Transparent\" text={this.closeButtonText} onClick={this._handleCloseButtonClick} />\n\t\t\t\t)}\n\t\t\t</Toolbar>\n\t\t</Dialog>\n\t);\n}\n\nfunction renderList(this: UserSettingsDialog, items: Array<UserSettingsItem> = [], classes: string) {\n\treturn <List onItemClick={this._handleItemClick} class={classes} separators=\"None\" data-sap-ui-fastnavgroup=\"false\">\n\t\t{items.map(item => (\n\t\t\t<ListItemStandard\n\t\t\t\tclass={!item._icon && item._siblingsWithIcon ? \"ui5-user-settings-item-no-icon\" : \"\"}\n\t\t\t\tid={`setting-${item._id}`}\n\t\t\t\ticon={!item._icon && item._siblingsWithIcon ? undefined : item._icon}\n\t\t\t\ttooltip={item._tooltip}\n\t\t\t\tref={this.captureRef.bind(item)}\n\t\t\t\tselected={item.selected}\n\t\t\t\tdisabled={item.disabled}\n\t\t\t\taccessibleName={item.ariaLabelledByText}\n\t\t\t\ttype={this._showSettingWithNavigation ? \"Navigation\" : \"Active\"}\n\t\t\t>\n\t\t\t\t{item.text}\n\t\t\t</ListItemStandard>\n\t\t))}\n\t</List>;\n}\n"]}
|
|
@@ -121,6 +121,13 @@ declare class UserSettingsItem extends UI5Element {
|
|
|
121
121
|
* @private
|
|
122
122
|
*/
|
|
123
123
|
_individualSlot?: string;
|
|
124
|
+
/**
|
|
125
|
+
* Indicates that focus should be moved to the first interactive content element
|
|
126
|
+
* once the content becomes available (e.g. after the loading state finishes).
|
|
127
|
+
* @private
|
|
128
|
+
*/
|
|
129
|
+
_pendingContentFocus: boolean;
|
|
130
|
+
onAfterRendering(): void;
|
|
124
131
|
get _hasSelectedPageView(): boolean;
|
|
125
132
|
get _selectedPageView(): UserSettingsView;
|
|
126
133
|
get ariaLabelledByText(): string;
|
|
@@ -129,6 +136,17 @@ declare class UserSettingsItem extends UI5Element {
|
|
|
129
136
|
_handleBackButtonClick(): void;
|
|
130
137
|
_handleTabSelect(e: CustomEvent<TabContainerTabSelectEventDetail>): void;
|
|
131
138
|
get _shouldShowBackButton(): boolean;
|
|
139
|
+
/**
|
|
140
|
+
* Moves the focus to the first interactive element of the item's content,
|
|
141
|
+
* skipping the navigation back button in the header.
|
|
142
|
+
*
|
|
143
|
+
* If the content is not yet available because the item is in loading state,
|
|
144
|
+
* the focus is deferred until the loading finishes and the content is rendered.
|
|
145
|
+
* @private
|
|
146
|
+
*/
|
|
147
|
+
focusFirstContentElement(): void;
|
|
148
|
+
_focusFirstContentElementWhenReady(): Promise<void>;
|
|
149
|
+
_focusFirstContentElement(): Promise<void>;
|
|
132
150
|
captureRef(this: UserSettingsView, ref: HTMLElement & {
|
|
133
151
|
associatedSettingView?: UserSettingsView;
|
|
134
152
|
} | null): void;
|
package/dist/UserSettingsItem.js
CHANGED
|
@@ -7,6 +7,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
8
8
|
import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
|
|
9
9
|
import { customElement, property, slotStrict as slot, eventStrict as event, } from "@ui5/webcomponents-base/dist/decorators.js";
|
|
10
|
+
import { getFirstFocusableElement } from "@ui5/webcomponents-base/dist/util/FocusableElements.js";
|
|
11
|
+
import { renderFinished } from "@ui5/webcomponents-base/dist/Render.js";
|
|
10
12
|
import UserSettingsItemTemplate from "./UserSettingsItemTemplate.js";
|
|
11
13
|
import UserSettingsItemCss from "./generated/themes/UserSettingsItem.css.js";
|
|
12
14
|
/**
|
|
@@ -79,6 +81,18 @@ let UserSettingsItem = class UserSettingsItem extends UI5Element {
|
|
|
79
81
|
*/
|
|
80
82
|
this._siblingsWithIcon = false;
|
|
81
83
|
this._inMobileView = false;
|
|
84
|
+
/**
|
|
85
|
+
* Indicates that focus should be moved to the first interactive content element
|
|
86
|
+
* once the content becomes available (e.g. after the loading state finishes).
|
|
87
|
+
* @private
|
|
88
|
+
*/
|
|
89
|
+
this._pendingContentFocus = false;
|
|
90
|
+
}
|
|
91
|
+
onAfterRendering() {
|
|
92
|
+
if (this._pendingContentFocus && !this.loading) {
|
|
93
|
+
this._pendingContentFocus = false;
|
|
94
|
+
this._focusFirstContentElementWhenReady();
|
|
95
|
+
}
|
|
82
96
|
}
|
|
83
97
|
get _hasSelectedPageView() {
|
|
84
98
|
return this.pages.some(view => view.selected);
|
|
@@ -128,6 +142,42 @@ let UserSettingsItem = class UserSettingsItem extends UI5Element {
|
|
|
128
142
|
get _shouldShowBackButton() {
|
|
129
143
|
return !!(this._inMobileView || (this._hasSelectedPageView && this._selectedPageView.secondary));
|
|
130
144
|
}
|
|
145
|
+
/**
|
|
146
|
+
* Moves the focus to the first interactive element of the item's content,
|
|
147
|
+
* skipping the navigation back button in the header.
|
|
148
|
+
*
|
|
149
|
+
* If the content is not yet available because the item is in loading state,
|
|
150
|
+
* the focus is deferred until the loading finishes and the content is rendered.
|
|
151
|
+
* @private
|
|
152
|
+
*/
|
|
153
|
+
focusFirstContentElement() {
|
|
154
|
+
if (this.loading) {
|
|
155
|
+
this._pendingContentFocus = true;
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
this._focusFirstContentElement();
|
|
159
|
+
}
|
|
160
|
+
async _focusFirstContentElementWhenReady() {
|
|
161
|
+
// The content (and its slotted views) may still be settling after the loading
|
|
162
|
+
// state clears, so wait for the render to finish before moving the focus.
|
|
163
|
+
await renderFinished();
|
|
164
|
+
this._focusFirstContentElement();
|
|
165
|
+
}
|
|
166
|
+
async _focusFirstContentElement() {
|
|
167
|
+
const root = this.getDomRef();
|
|
168
|
+
if (!root) {
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
// The content is rendered right after the header (which holds the back button),
|
|
172
|
+
// so start the focus lookup from the element following the header.
|
|
173
|
+
const header = root.querySelector(".ui5-user-settings-item-header-container");
|
|
174
|
+
const contentElement = (header?.nextElementSibling || root.firstElementChild);
|
|
175
|
+
if (!contentElement) {
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
const focusable = await getFirstFocusableElement(contentElement, true);
|
|
179
|
+
focusable?.focus();
|
|
180
|
+
}
|
|
131
181
|
captureRef(ref) {
|
|
132
182
|
if (ref) {
|
|
133
183
|
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,MAAM,sDAAsD,CAAC;AAC/E,OAAO,EACN,aAAa,EAAE,QAAQ,EAAE,UAAU,IAAI,IAAI,EAAE,WAAW,IAAI,KAAK,GACjE,MAAM,4CAA4C,CAAC;AAGpD,OAAO,wBAAwB,MAAM,+BAA+B,CAAC;AAErE,OAAO,mBAAmB,MAAM,4CAA4C,CAAC;AAU7E;;;;;;;;;;;;;;;;;;GAkBG;AAyBH,IAAM,gBAAgB,GAAtB,MAAM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ACF,KAAK,CAAC,WAAW,EAAE;QACnB,OAAO,EAAE,IAAI;KACb,CAAC;GAEI,gBAAgB,CAsMrB;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 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\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\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;;;;;;WAMG;QAEH,YAAO,GAAG,EAAE,CAAC;QAWb;;;;;WAKG;QA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B;IADC,QAAQ,EAAE;uDACY;AASvB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8CACZ;AAQf;IADC,QAAQ,EAAE;wDACa;AAqBxB;IATC,IAAI,CAAC;QACL,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,IAAI;QACf,eAAe,EAAE,IAAI;QACrB,uBAAuB,EAAE;YACxB,UAAU,EAAE,IAAI;YAChB,KAAK,EAAE,KAAK;SACZ;KACD,CAAC;+CACoC;AAetC;IARC,IAAI,CAAC;QACL,IAAI,EAAE,WAAW;QACjB,eAAe,EAAE,IAAI;QACrB,uBAAuB,EAAE;YACxB,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,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 +1 @@
|
|
|
1
|
-
:host,.ui5-shellbar-search-field-wrapper{height:2.25rem;display:flex;align-items:center}:host(:not([collapsed])),.ui5-shellbar-search-field-wrapper{min-width:18rem;max-width:36rem;margin:0;height:2.25rem;color:var(--_ui5-search-field-text-color);font-size:var(--sapFontSize);font-family:var(--sapFontFamily);font-style:normal;box-shadow:var(--sapField_Shadow);border-radius:var(--_ui5_search_input_border_radius);box-sizing:border-box;text-align:start;background:var(--sapField_BackgroundStyle);background-color:var(--_ui5-search-wrapper-background);position:relative}.ui5-search-field-busy-indicator{width:100%;height:100%;border-radius:var(--_ui5_search_input_border_radius)}.ui5-shellbar-search-field-wrapper{flex:1;min-width:auto}:host(:not([collapsed]):hover),:host(:not([collapsed]):focus-within),.ui5-shellbar-search-field-wrapper:focus-within{box-shadow:var(--sapField_Hover_Shadow);background:var(--_ui5-search-wrapper-hover-background);background-color:var(--_ui5-search-wrapper-hover-background-color)}:host([focused-inner-input]) .ui5-search-field-root{outline:var(--_ui5_search_wrapper_outline);border-radius:var(--_ui5_search_input_border_radius);outline-offset:-.125rem}.ui5-search-field-root{width:100%;height:100%;position:relative;background:transparent;display:inline-block;outline:none;box-sizing:border-box;color:inherit;transition:border-color .2s ease-in-out;border-radius:var(--_ui5_search_input_border_radius);overflow:hidden}.ui5-search-field-content{height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;overflow:hidden}[ui5-select]{outline:none;margin:var(--
|
|
1
|
+
:host,.ui5-shellbar-search-field-wrapper{height:2.25rem;display:flex;align-items:center}:host(:not([collapsed])),.ui5-shellbar-search-field-wrapper{width:var(--search_width);min-width:18rem;max-width:36rem;margin:0;height:2.25rem;color:var(--_ui5-search-field-text-color);font-size:var(--sapFontSize);font-family:var(--sapFontFamily);font-style:normal;box-shadow:var(--sapField_Shadow);border-radius:var(--_ui5_search_input_border_radius);box-sizing:border-box;text-align:start;background:var(--sapField_BackgroundStyle);background-color:var(--_ui5-search-wrapper-background);position:relative}.ui5-search-field-busy-indicator{width:100%;height:100%;border-radius:var(--_ui5_search_input_border_radius)}.ui5-shellbar-search-field-wrapper{flex:1;min-width:auto}:host(:not([collapsed]):hover),:host(:not([collapsed]):focus-within),.ui5-shellbar-search-field-wrapper:focus-within{box-shadow:var(--sapField_Hover_Shadow);background:var(--_ui5-search-wrapper-hover-background);background-color:var(--_ui5-search-wrapper-hover-background-color)}:host(:not([collapsed]):focus-within),.ui5-shellbar-search-field-wrapper:focus-within{background-color:var(--_ui5-search-wrapper-active-background-color)}:host([focused-inner-input]) .ui5-search-field-root{outline:var(--_ui5_search_wrapper_outline);border-radius:var(--_ui5_search_input_border_radius);outline-offset:-.125rem}.ui5-search-field-root{width:100%;height:100%;position:relative;background:transparent;display:inline-block;outline:none;box-sizing:border-box;color:inherit;transition:border-color .2s ease-in-out;border-radius:var(--_ui5_search_input_border_radius);overflow:hidden}.ui5-search-field-content{height:100%;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;overflow:hidden}[ui5-select]{outline:none;margin:var(--_ui5-search-scope-spacing);width:fit-content;min-width:auto;max-width:18rem;flex:0 1 auto;border-radius:var(--_ui5_search_input_border_radius);border:var(--_ui5-search-border);box-shadow:none;background:unset;background-color:var(--_ui5-search-elements-background);height:var(--_ui5-search-select-height);--_ui5_select_label_color: var(--sapShell_TextColor);--_ui5_input_focus_outline_color: transparent;--_ui5_select_bottom_border_gradient: none}[ui5-select]:hover:not(:active):not(:focus-within){box-shadow:var(--_ui5-search_input_scope_hover_shadow)}[ui5-select]:not(:active):not(:focus-within)::part(icon-wrapper):hover{box-shadow:var(--_ui5-search_input_scope_hover_shadow)}[ui5-select]:active,[ui5-select]:focus-within{box-shadow:var(--_ui5-search_input_scope_active_shadow)}[ui5-select]:active::part(icon-wrapper),[ui5-select]:focus-within::part(icon-wrapper){box-shadow:var(--_ui5-search_input_scope_active_shadow);background:var(--sapShell_Active_Background);color:var(--sapShell_Active_TextColor)}[ui5-select]::part(icon){display:flex;justify-content:center;align-items:stretch;height:100%;padding:0 .5rem;align-self:center;border-radius:var(--_ui5_search_input_border_radius);color:var(--sapShell_InteractiveTextColor)}[ui5-select]::part(popover){background-color:var(--sapShellColor)}::slotted([slot="filterButton"]){--_ui5_button_focused_border_radius: var(--_ui5_search_filter_button_border_radius);min-width:var(--_ui5_search_icon_size);height:var(--_ui5_search_icon_size);border:var(--_ui5_search_filter_button_border);border-radius:var(--_ui5_search_filter_button_border_radius);color:var(--sapShell_InteractiveTextColor);outline:none;background:var(--_ui5-search-filter_button_background_color);box-sizing:border-box;margin-inline-end:.1875rem;margin-inline-start:.25rem}::slotted([slot="filterButton"]:focus-within){background-color:var(--ui5_search_filter_button_background_active);border:var(--_ui5_search_filter_button_border)}::slotted([slot="filterButton"]:not([active]):not(:focus-within):hover){background-color:var(--sapShell_Hover_Background);border:var(--_ui5_seach_filter_button_border_hover)}.ui5-search-field-inner-input{font-size:var(--sapFontSize);font-family:var(--sapFontFamily);font-style:normal;padding:.5rem 0;height:100%;width:100%;box-sizing:border-box;background-color:var(--_ui5-search-elements-background);border:var(--_ui5-search-border);outline:none;color:inherit;padding-inline-start:var(--_ui5-search-input-start-padding);padding-inline-end:var(--_ui5_search_input_end_padding)}:host([focused-inner-input]) .ui5-search-field-inner-input{outline:var(--_ui5_search_input_outline);border-radius:var(--_ui5_search_input_border_radius);outline-offset:-.3125rem}:host(:not([mode="Scoped"])) .ui5-search-field-inner-input{padding-inline-start:.875rem}.ui5-search-field-inner-input:hover{background-color:var(--_ui5-search-elements-hover-background)}.ui5-search-field-inner-input:focus-within{background-color:var(--_ui5-search-elements-active-background)}.ui5-search-field-inner-input::placeholder{font-weight:400;font-style:italic;color:var(--sapField_PlaceholderTextColor);padding-inline-start:.125rem}:host([mode="Scoped"]) .ui5-search-field-inner-input{margin-inline-start:var(--_ui5_search_input_start_margin)}.ui5-search-field-separator{height:1.5rem;width:.0625rem;background:var(--_ui5_search_separator_background);box-sizing:border-box}.ui5-shell-search-field-button{outline:none;min-width:var(--_ui5_search_icon_size);height:var(--_ui5_search_icon_size);border-radius:var(--_ui5_search_icon_border_radius);box-sizing:border-box;cursor:pointer}.ui5-shell-search-field-button:not([design=Emphasized]){color:var(--sapShell_InteractiveTextColor);background-color:var(--_ui5-search-elements-background);min-width:var(--_ui5_search_icon_size_default);height:var(--_ui5_search_icon_size_default);border-radius:var(--_ui5_shellbar_button_border_radius)}.ui5-shell-search-field-button:not([design=Emphasized]):hover{background-color:var(--sapShell_Hover_Background);border-color:var(--sapButton_Lite_Hover_BorderColor);border-radius:var(--_ui5_shellbar_button_border_radius)}.ui5-shell-search-field-button[desktop]:not([active])::part(button):after,.ui5-shell-search-field-button:not([active])::part(button):focus-visible:after,.ui5-shell-search-field-button[desktop][active][design=Emphasized]::part(button):focus-within:after,.ui5-shell-search-field-button[active][design=Emphasized]::part(button):focus-visible:after,.ui5-shell-search-field-button[desktop][active]::part(button):focus-within:before,.ui5-shell-search-field-button[active]::part(button):focus-visible:before,.ui5-shell-search-field-button[design=Emphasized][desktop]::part(button):focus-within:before,.ui5-shell-search-field-button[design=Emphasized]::part(button):focus-visible:before{border-radius:var(--_ui5_shellbar_button_border_radius)}.ui5-shell-search-field-icon{display:flex;justify-content:center;align-items:stretch;cursor:pointer;outline:none;min-width:var(--_ui5_search_icon_size);height:var(--_ui5_search_icon_size);border-radius:var(--_ui5_search_icon_border_radius);margin-inline-end:.25rem;margin-inline-start:.1875rem;box-sizing:border-box;color:var(--sapShell_InteractiveTextColor);background-color:var(--_ui5-search-elements-background);border:var(--_ui5-search-icon-border)}.ui5-shell-search-field-icon::part(root){padding:var(--_ui5_search_icon_padding);outline-offset:-.125rem}.ui5-shell-search-field-icon:hover::part(root){padding:var(--_ui5_search_icon_hover_padding);outline-offset:-.1875rem}.ui5-shell-search-field-icon:focus::part(root){border-radius:var(--_ui5_search_icon_border_radius)}.ui5-shell-search-field-icon:hover,.ui5-shell-search-field-input-button:hover{background:var(--sapShell_Hover_Background);border:1px solid var(--sapButton_Lite_Hover_BorderColor);color:var(--sapShell_InteractiveTextColor)}.ui5-shell-search-field-search-icon{background-color:var(--sapButton_Emphasized_Background);border-color:var(--sapButton_Emphasized_BorderColor);color:var(--sapButton_Emphasized_TextColor)}.ui5-search-field-select{--_ui5_input_focus_border_radius: var(--_ui5_search_input_border_radius)}.ui5-search-field-select::part(label){padding:0 .25rem 0 .5rem}.ui5-search-field-select::part(icon-wrapper){border-radius:var(--_ui5_search_input_border_radius);height:100%}.ui5-search-field-inner-input::selection{background:var(--sapSelectedColor);color:var(--sapContent_ContrastTextColor)}.ui5-search-field-scope-button{min-width:2rem;width:2rem;height:var(--_ui5-search-select-height);margin:var(--_ui5-search-scope-spacing);border-radius:var(--_ui5_search_input_border_radius);border:var(--_ui5-search-border);box-shadow:none;background:var(--_ui5-search-elements-background);color:var(--sapShell_InteractiveTextColor)}.ui5-search-field-scope-button::part(button):before,.ui5-search-field-scope-button::part(button):after{display:none}.ui5-search-field-scope-button:hover{box-shadow:var(--_ui5-search_input_scope_hover_shadow);background-color:var(--sapShell_Hover_Background)}.ui5-search-field-scope-button:focus-within{box-shadow:var(--_ui5-search_input_scope_active_shadow);background:var(--sapShell_Active_Background);color:var(--sapShell_Active_TextColor)}.ui5-search-field-scope-popover{min-width:12rem}.ui5-search-field-scope-popover::part(content){padding:0}.ui5-search-field-scope-popover [ui5-list]{border:none}.ui5-search-field-scope-popover [ui5-li-standard][selected]{background-color:var(--sapList_SelectionBackgroundColor)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ui5-shellbar-logo{overflow:hidden;cursor:pointer;display:flex;align-items:center}.ui5-shellbar-logo-area,.ui5-shellbar-legacy-branding{overflow:hidden;display:flex;align-items:center;padding:.25rem .5rem .25rem .25rem;box-sizing:border-box;cursor:pointer;background:var(--sapButton_Lite_Background);border:1px solid var(--sapButton_Lite_BorderColor);color:var(--sapShell_TextColor);margin-inline-start:.125rem}.ui5-shellbar-logo:focus,.ui5-shellbar-logo-area:focus{outline:var(--_ui5_shellbar_logo_outline);outline-offset:calc(-1 * var(--sapContent_FocusWidth));border-radius:var(--_ui5_shellbar_logo_border_radius)}.ui5-shellbar-overflow-container>.ui5-shellbar-logo:hover,.ui5-shellbar-logo-area:hover{box-shadow:var(--_ui5_shellbar_button_box_shadow);border-radius:var(--_ui5_shellbar_logo_border_radius)}.ui5-shellbar-logo-area:active:focus{background:var(--sapShell_Active_Background);border:1px solid var(--sapButton_Lite_Active_BorderColor);color:var(--sapShell_Active_TextColor)}::slotted([slot="logo"]){max-height:
|
|
1
|
+
.ui5-shellbar-logo{overflow:hidden;cursor:pointer;display:flex;align-items:center}.ui5-shellbar-logo-area,.ui5-shellbar-legacy-branding{overflow:hidden;display:flex;align-items:center;padding:.25rem .5rem .25rem .25rem;box-sizing:border-box;cursor:pointer;background:var(--sapButton_Lite_Background);border:1px solid var(--sapButton_Lite_BorderColor);color:var(--sapShell_TextColor);margin-inline-start:.125rem}.ui5-shellbar-logo:focus,.ui5-shellbar-logo-area:focus{outline:var(--_ui5_shellbar_logo_outline);outline-offset:calc(-1 * var(--sapContent_FocusWidth));border-radius:var(--_ui5_shellbar_logo_border_radius)}.ui5-shellbar-overflow-container>.ui5-shellbar-logo:hover,.ui5-shellbar-logo-area:hover{box-shadow:var(--_ui5_shellbar_button_box_shadow);border-radius:var(--_ui5_shellbar_logo_border_radius)}.ui5-shellbar-logo-area:active:focus{background:var(--sapShell_Active_Background);border:1px solid var(--sapButton_Lite_Active_BorderColor);color:var(--sapShell_Active_TextColor)}::slotted([slot="logo"]){max-height:1.875rem;padding-block:.0625rem;padding-inline:.25rem}::slotted([slot="logo"]):active{pointer-events:none}.ui5-shellbar-headings{display:flex;flex-direction:column;justify-content:center;height:100%;overflow:hidden;margin-inline-start:.25rem}.ui5-shellbar-primary-title,.ui5-shellbar-menu-button-title,.ui5-shellbar-title{display:inline-block;font-family:var(--sapFontSemiboldDuplexFamily);margin:0;font-size:var(--_ui5_shellbar_menu_button_title_font_size);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--sapShell_SubBrand_TextColor)}.ui5-shellbar-secondary-title{display:flex;align-items:center;font-size:var(--sapFontSmallSize);color:var(--sapShell_TextColor);font-weight:400;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;text-align:start}.ui5-shellbar-menu-button{white-space:nowrap;overflow:hidden;display:flex;align-items:center;padding:.25rem .5rem;cursor:text;-webkit-user-select:text;-moz-user-select:text;user-select:text;margin-inline-start:.5rem;height:2.25rem;border:.0625rem solid var(--sapButton_Lite_BorderColor);background:var(--sapButton_Lite_Background);outline-color:var(--_ui5_shellbar_logo_outline_color);color:var(--sapShell_TextColor);box-sizing:border-box;border-radius:var(--_ui5_shellbar_button_border_radius);position:relative;font-weight:700}.ui5-shellbar-menu-button.ui5-shellbar-menu-button--interactive{-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer;background:var(--sapButton_Lite_Background);border:var(--_ui5_shellbar_button_border);color:var(--sapShell_TextColor)}.ui5-shellbar-menu-button.ui5-shellbar-menu-button--interactive:hover{background:var(--sapShell_Hover_Background);border-color:var(--sapButton_Lite_Hover_BorderColor);color:var(--sapShell_TextColor);box-shadow:var(--_ui5_shellbar_button_box_shadow)}.ui5-shellbar-menu-button.ui5-shellbar-menu-button--interactive:active{background:var(--sapShell_Active_Background);border-color:var(--sapButton_Lite_Active_BorderColor);color:var(--_ui5_shellbar_button_active_color);box-shadow:var(--_ui5_shellbar_button_box_shadow_active)}.ui5-shellbar-menu-button.ui5-shellbar-menu-button--interactive:active .ui5-shellbar-menu-button-arrow,.ui5-shellbar-menu-button.ui5-shellbar-menu-button--interactive:active .ui5-shellbar-menu-button-title{color:var(--sapShell_Active_TextColor)}:host([desktop]) .ui5-shellbar-menu-button.ui5-shellbar-menu-button--interactive:focus,.ui5-shellbar-menu-button.ui5-shellbar-menu-button--interactive:focus-visible{outline:var(--_ui5_shellbar_logo_outline);outline-offset:var(--_ui5_shellbar_outline_offset)}.ui5-shellbar-menu-button.ui5-shellbar-menu-button--interactive::-moz-focus-inner{border:none}.ui5-shellbar-menu-button .ui5-shellbar-logo:hover{box-shadow:none}.ui5-shellbar-menu-button-arrow{display:inline-block;font-family:var(--sapFontSemiboldDuplexFamily);margin:0;font-size:var(--_ui5_shellbar_menu_button_title_font_size);color:var(--sapShell_SubBrand_TextColor)}.ui5-shellbar-menu-button--interactive .ui5-shellbar-menu-button-arrow{margin-inline-start:.375rem}:host(:not([primary-title])) .ui5-shellbar-menu-button{min-width:2.25rem;justify-content:center}:host(:not([with-logo])) .ui5-shellbar-menu-button{margin-inline-start:0}:host([breakpoint-size="S"]) .ui5-shellbar-menu-button{margin-inline-start:0}
|