@sapudex/web-components 0.192.2 → 0.192.4
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/dist/Search.js +1 -0
- package/dist/Search.js.map +1 -1
- package/dist/assets/{bundle.esm-809b9769.js → bundle.esm-aa637b3f.js} +4 -4
- package/dist/css/themes/RatingIndicator.css +1 -1
- package/dist/css/themes/Slider.css +1 -1
- package/dist/css/themes/Tag.css +1 -1
- package/dist/generated/themes/RatingIndicator.css.js +1 -1
- package/dist/generated/themes/RatingIndicator.css.js.map +1 -1
- package/dist/generated/themes/Slider.css.js +1 -1
- package/dist/generated/themes/Slider.css.js.map +1 -1
- package/dist/generated/themes/Tag.css.js +1 -1
- package/dist/generated/themes/Tag.css.js.map +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +1 -1
- package/src/Search.ts +1 -0
- package/src/generated/themes/RatingIndicator.css.ts +1 -1
- package/src/generated/themes/Slider.css.ts +1 -1
- package/src/generated/themes/Tag.css.ts +1 -1
- package/src/themes/Tag.css +6 -3
|
@@ -106,13 +106,13 @@ To prevent other runtimes from defining tags that you use, consider using scopin
|
|
|
106
106
|
`};var MP=globalThis&&globalThis.__decorate||function(o,e,t,i){var r=arguments.length,a=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,e,t,i);else for(var d=o.length-1;d>=0;d--)(s=o[d])&&(a=(r<3?s(a):r>3?s(e,t,a):s(e,t))||a);return r>3&&a&&Object.defineProperty(e,t,a),a};let Oc=class extends Ts{handleHeaderPress(){this.controlled||this.handleSelectionGroupState(),this.fireHeaderPress()}handleKeyDownPress(e){M(e)&&e.preventDefault(),(M(e)||K(e))&&this.handleHeaderPress()}fireHeaderPress(){this.fireEvent("header-press",{item:this})}getHandleGroupItemsClick(){return this.modeMultiSelect&&!this.controlled?this.handleHeaderState():void 0}get sizeClass(){return this.size===rs.Large?"udex-list__group_large":""}};Oc=MP([x({tag:"udex-list-group-header",renderer:w,styles:OP,template:BP,dependencies:[W]}),f("header-press",{detail:{item:{type:HTMLElement}}})],Oc);Oc.define();const h5=Oc;function XP(o,e,t){return t?l`<ul class="udex-list__group-list"><li part="item" class="udex-list__group"><ul class="${n(this.groupListClassName)}" @ui5-item-press="${n(this.handleSelectAllGroupItemsPress)}"><${u("udex-list-item",e,t)} _tab-index="${n(this._effectiveTabIndex)}" role="list" _additional-class-name="${n(this.additionalClassName)}" class="${n(this.className)}" ?selected="${this.selected}" aria-current="${n(this.selected)}" ?indeterminate="${this.indeterminate}" mode="${n(this.multiselectMode)}" part="group-item" @click="${this.handleSelectAllPress}" ?controlled="${this.controlled}" supporting-text="${n(this.supportingText)}" @keydown="${this.handleKeyDownPress}" divider>${n(this.selectAllLabel)}</${u("udex-list-item",e,t)}><slot></slot></ul></li></ul>`:l`<ul class="udex-list__group-list"><li part="item" class="udex-list__group"><ul class="${n(this.groupListClassName)}" @ui5-item-press="${n(this.handleSelectAllGroupItemsPress)}"><udex-list-item _tab-index="${n(this._effectiveTabIndex)}" role="list" _additional-class-name="${n(this.additionalClassName)}" class="${n(this.className)}" ?selected="${this.selected}" aria-current="${n(this.selected)}" ?indeterminate="${this.indeterminate}" mode="${n(this.multiselectMode)}" part="group-item" @click="${this.handleSelectAllPress}" ?controlled="${this.controlled}" supporting-text="${n(this.supportingText)}" @keydown="${this.handleKeyDownPress}" divider>${n(this.selectAllLabel)}</udex-list-item><slot></slot></ul></li></ul>`}g("@ui5/webcomponents-theming","sap_horizon",async()=>y);g("@sapudex/web-components","sap_horizon",async()=>P);const FP={packageName:"@sapudex/web-components",fileName:"themes/ListGroupHeader.css.ts",content:`:host{--udex-list-item-group-header-padding-vertical: var(--udexSpacer8, 8px);--udex-list-item-group-header-padding-horizontal: var(--udexSpacer12, 12px);--udex-list-item-group-header-supporting-text-color: var(--sapContent_LabelColor, #223548);--udex-list-item-group-header-border-color: var(--sapList_BorderColor, #A9B4BE)}.udex-list__header{font-weight:var(--udexTypographyFontWeightMedium, 500);display:flex;flex-direction:column}.udex-list__supporting-text{font-family:var(--sapFontFamily, sans-serif);font-size:var(--udexTypographyBodyXSFontSize, 14px);line-height:var(--udexTypographyBodyLineHeight, 21px);font-weight:var(--udexTypographyFontWeightRegular, 400);color:var(--udex-list-item-group-header-supporting-text-color);padding-top:var(--udexSpacer8, 8px)}.udex-list__group-list{list-style-type:none;padding:0;margin:0}.udex-list__header,.udex-list__group-header{font-weight:var(--udexTypographyFontWeightMedium, 500)}.udex-list__group-list.udex-list__sticky{padding-top:59px}.udex-list__group-content{display:flex;border-bottom:1px solid var(--udex-list-item-group-header-border-color);padding:var(--udex-list-item-group-header-padding-vertical) var(--udex-list-item-group-header-padding-horizontal)}.udex-list__number{margin-inline-end:var(--udexSpacer8, 8px)}.udex-list__circle{display:block;min-width:20px;height:22px;position:relative}:host([mode="SingleContent"])::part(group-item){padding:var(--udexSpacer4, 4px) 0}:host([mode="MultiSelect"]) .udex-list__group-header{border-bottom:1px solid var(--udex-list-item-group-header-border-color)}.udex-list__group_large{font-size:var(--udexTypographyBodyLFontSize, 20px);line-height:var(--udexTypographyHeadingLineHeight, 22px);font-weight:var(--udexTypographyFontWeightMedium, 500)}.udex-list__group_large.udex-list__supporting-text{font-size:var(--udexTypographyBodySFontSize, 16px);line-height:var(--udexTypographyBodyLineHeight, 24px);font-weight:var(--udexTypographyFontWeightRegular, 400)}.udex-list__icon{margin-inline-end:var(--udexSpacer8, 8px);padding-top:2px;min-width:18px;height:18px}.udex-list__inactive-header{font-family:var(--sapFontFamily, sans-serif);font-size:var(--udexTypographyBodySFontSize, 16px);line-height:var(--udexTypographyBodyLineHeight, 24px);font-weight:var(--udexTypographyFontWeightMedium, 500);padding:var(--udexSpacer8, 8px) var(--udexSpacer20, 20px);border-bottom:1px solid var(--sapList_BorderColor, #A9B4BE);display:flex;flex-direction:column}
|
|
107
107
|
`};var HP=globalThis&&globalThis.__decorate||function(o,e,t,i){var r=arguments.length,a=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,e,t,i);else for(var d=o.length-1;d>=0;d--)(s=o[d])&&(a=(r<3?s(a):r>3?s(e,t,a):s(e,t))||a);return r>3&&a&&Object.defineProperty(e,t,a),a},Yl;let Mc=Yl=class extends Ts{static async onDefine(){Yl.i18nBundle=await L("@udex/web-components")}handleSelectAllPress(){this.controlled||this.handleSelectionGroupState(),this.fireEvent("select-all",{item:this})}handleSelectAllGroupItemsPress(){this.controlled||this.handleHeaderState()}handleKeyDownPress(e){M(e)&&e.preventDefault(),(M(e)||K(e))&&this.handleSelectAllPress()}get isSelectAllHeader(){return!0}get multiselectMode(){return ve.MultiSelect}get selectAllLabel(){var t;return this.label!=="undefined"&&((t=this.label)==null?void 0:t.length)>0?this.label:Yl.i18nBundle.getText(dT)}get additionalClassName(){return`udex-list__header-select-all ${this._additionalClassName}`}get groupListClassName(){const e="udex-list__group-list",t="udex--list__header-select-all";return`${e} ${this._additionalClassName} ${t}`}};Mc=Yl=HP([x({tag:"udex-list-select-all",renderer:w,styles:FP,template:XP,dependencies:[yl]}),f("select-all",{detail:{item:{type:HTMLElement}}})],Mc);Mc.define();const p5=Mc,UP="decline",_5="M86 109l22-23q5-5 12-5 6 0 11 5l124 125L380 86q5-5 11-5 7 0 12 5l22 23q12 11 0 23L301 256l124 125q11 11 0 22l-22 23q-8 5-12 5-3 0-11-5L255 301 131 426q-5 5-11 5-4 0-12-5l-22-23q-11-11 0-22l124-125L86 132q-12-12 0-23z",VP=!1,qP=V1,WP="SAP-icons-v4",GP="@ui5/webcomponents-icons";D(UP,{pathData:_5,ltr:VP,accData:qP,collection:WP,packageName:GP});const YP="decline",v5="M292 256l117 116q7 7 7 18 0 12-7.5 19t-18.5 7q-10 0-18-8L256 292 140 408q-8 8-18 8-11 0-18.5-7.5T96 390q0-10 8-18l116-116-116-116q-8-8-8-18 0-11 7.5-18.5T122 96t18 7l116 117 116-117q7-7 18-7t18.5 7.5T416 122t-7 18z",KP=!1,ZP=V1,QP="SAP-icons-v5",JP="@ui5/webcomponents-icons";D(YP,{pathData:v5,ltr:KP,accData:ZP,collection:QP,packageName:JP});oe();const eN="search",g5="M470 426q10 9 10 22.5T470 471q-9 9-22 9t-23-9L308 353q-45 31-100 31-36 0-68-13.5T84 333t-38-56-14-69q0-36 14-68t38-56 56-38 68-14 68 14 56 38 38 56 14 68q0 28-8.5 53T353 308zm-262-74q30 0 56-11t45.5-30.5 31-46T352 208t-11.5-56-31-45.5-45.5-31T208 64t-56.5 11.5-46 31T75 152t-11 56 11 56.5 30.5 46 46 30.5 56.5 11z",tN=!0,oN=Y1,iN="SAP-icons-v4",rN="@ui5/webcomponents-icons";D(eN,{pathData:g5,ltr:tN,accData:oN,collection:iN,packageName:rN});const aN="search",m5="M473 436q7 7 7 18t-7.5 18.5T454 480q-10 0-18-8l-95-95q-51 39-117 39-40 0-75-15t-61-41-41-61-15-75 15-75 41-61 61-41 75-15 75 15 61 41 41 61 15 75q0 64-39 117zM83 224q0 30 11 55.5t30 44.5 44.5 30 55.5 11 55.5-11 44.5-30 30-44.5 11-55.5-11-55.5-30-44.5-44.5-30T224 83t-55.5 11-44.5 30-30 44.5T83 224z",nN=!0,sN=Y1,dN="SAP-icons-v5",lN="@ui5/webcomponents-icons";D(aN,{pathData:m5,ltr:nN,accData:sN,collection:dN,packageName:lN});oe();const cN="microphone",b5="M160 256V96q0-42 27-69t69-27q41 0 69 27 27 28 27 69v160q0 42-27 69t-69 27q-41 0-68-28-28-27-28-68zm-80-64h48v64q0 30 10 49 10 25 28 41 17 18 41 28t49 10q27 0 50-10t40.5-27.5 27.5-41 10-49.5v-64h48q16 0 16 16t-16 16h-16v32q0 60-35.5 101.5T288 413v67h112q16 0 16 16t-16 16H112q-16 0-16-16t16-16h112v-67q-27-7-50.5-21.5t-41-35-27-46T96 256v-32H80q-16 0-16-16t16-16zm112-96v160q0 26 19 45t45 19q27 0 45.5-18.5T320 256V96q0-27-18-46-19-18-46-18-26 0-45 19t-19 45z",uN=!1,hN="SAP-icons-v4",pN="@ui5/webcomponents-icons";D(cN,{pathData:b5,ltr:uN,collection:hN,packageName:pN});const _N="microphone",f5="M256 320q-33 0-56.5-23.5T176 240V80q0-33 23.5-56.5T256 0t56.5 23.5T336 80v160q0 33-23.5 56.5T256 320zm-29-80q0 12 8.5 20.5T256 269t20.5-8.5T285 240V80q0-12-8.5-20.5T256 51t-20.5 8.5T227 80v160zm195-48q11 0 18.5 7.5T448 218q0 36-12.5 69t-35 60-53 44.5T282 414v72q0 11-7.5 18.5T256 512t-18.5-7.5T230 486v-72q-35-5-65.5-23t-53-44.5-35-59.5T64 218q0-11 7.5-18.5T90 192t18 7.5 7 18.5q0 28 11 55t30.5 47 45 32.5T256 365t54.5-12.5 45-32.5 30.5-47 11-55q0-11 7-18.5t18-7.5z",vN=!1,gN="SAP-icons-v5",mN="@ui5/webcomponents-icons";D(_N,{pathData:f5,ltr:vN,collection:gN,packageName:mN});oe();const bN="slim-arrow-down",x5="M420.5 187q11-12 23 0 5 5 5 11t-5 11l-165 165q-10 9-23 9t-22-9l-166-165q-5-5-5-11.5t5-11.5 11.5-5 11.5 5l160 160q5 6 11 0z",fN=!1,xN="SAP-icons-v4",yN="@ui5/webcomponents-icons";D(bN,{pathData:x5,ltr:fN,collection:xN,packageName:yN});const wN="slim-arrow-down",y5="M96 186q0-11 7.5-18.5T122 160q10 0 18 8l116 121 116-121q8-8 18-8 11 0 18.5 7.5T416 186q0 10-7 17L275 344q-8 8-19 8-12 0-18-8L103 203q-7-7-7-17z",kN=!1,$N="SAP-icons-v5",SN="@ui5/webcomponents-icons";D(wN,{pathData:y5,ltr:kN,collection:$N,packageName:SN});oe();const TN=(o,e=300)=>{let t;return(...i)=>{clearTimeout(t),t=setTimeout(()=>{o(i)},e)}};function CN(o,e,t){return l`<div class="udex-search__root ${n(this.searchClasses)}">${this.isShowSearchHomePrefix?IN.call(this,o,e,t):void 0}<form role="search" class="udex-search__container ${n(this.focusClasses)}${n(this.isNotEmptyClass)}">${this.labelAnimationDisabled?BN.call(this,o,e,t):AN.call(this,o,e,t)}<div class="udex-search__icons">${this.isShowResetButton?EN.call(this,o,e,t):void 0}${this.isVoiceButton?PN.call(this,o,e,t):void 0}${this.showSubmitButton?NN.call(this,o,e,t):void 0}</div></form></div>`}function IN(o,e,t){return t?l`<div class="udex-search__prefix ${n(this.prefixWrapperClasses)}"><button type="button" role="combobox" aria-expanded="${n(this._prefixDropdownExpanded)}" aria-haspopup="true" aria-controls="udex-search-prefix" class="udex-search__prefix-button" @click="${this.handleDropdownClick}"><span class="udex-search__prefix-label">${n(this.labelPrefix)}</span><${u("ui5-icon",e,t)} class="udex-search__prefix-icon" name="slim-arrow-down"></${u("ui5-icon",e,t)}></button><${u("ui5-popover",e,t)} id="udex-search-prefix" class="${n(this.prefixPopoverClasses)}" hide-arrow placement-type="Bottom" horizontal-align="Left" style="${q(this.prefixPopoverStyles)}" @after-close="${this.handleAfterClosePrefixPopover}"><slot></slot></${u("ui5-popover",e,t)}></div>`:l`<div class="udex-search__prefix ${n(this.prefixWrapperClasses)}"><button type="button" role="combobox" aria-expanded="${n(this._prefixDropdownExpanded)}" aria-haspopup="true" aria-controls="udex-search-prefix" class="udex-search__prefix-button" @click="${this.handleDropdownClick}"><span class="udex-search__prefix-label">${n(this.labelPrefix)}</span><ui5-icon class="udex-search__prefix-icon" name="slim-arrow-down"></ui5-icon></button><ui5-popover id="udex-search-prefix" class="${n(this.prefixPopoverClasses)}" hide-arrow placement-type="Bottom" horizontal-align="Left" style="${q(this.prefixPopoverStyles)}" @after-close="${this.handleAfterClosePrefixPopover}"><slot></slot></ui5-popover></div>`}function BN(o,e,t){return l`<input id="search-input" type="search" name="search" class="udex-search__field" autocomplete="off" aria-autocomplete="list" aria-haspopup="${n(this.getAriaHasPopup)}" aria-label="Search" placeholder="${n(this.label)}" .value="${n(this.value)}" @input="${this.handleSearchChange}" @keydown="${this.handleKeyDown}" @focus="${this.handleFocus}" @focusout="${this.handleFocusout}" @blur="${this.handleBlur}" @click="${this.handleInputClick}" />`}function AN(o,e,t){return l`${this.label?DN.call(this,o,e,t):void 0}<input id="search-input" type="search" name="search" class="udex-search__field" autocomplete="off" aria-autocomplete="list" aria-label="${n(this.accInfo.ariaLabel)}" aria-haspopup="${n(this.getAriaHasPopup)}" .value="${n(this.value)}" @input="${this.handleSearchChange}" @keydown="${this.handleKeyDown}" @focus="${this.handleFocus}" @focusout="${this.handleFocusout}" @blur="${this.handleBlur}" @click="${this.handleInputClick}" />`}function DN(o,e,t){return l`<label for="search-input" class="${n(this.labelClasses)}">${n(this.label)}</label>`}function EN(o,e,t){return t?l`<${u("ui5-button",e,t)} id="reset-button" class="udex-search__button udex-search__reset-button" design="Default" tooltip="${n(this.tooltipInfo.tooltipResetButton)}" @click="${this.onReset}" @keydown="${this.handleKeyDownReset}"><${u("ui5-icon",e,t)} class="udex-search__button-icon" accessible-name="${n(this.accInfo.accessibleNameResetIcon)}" accessible-role="presentation" name="decline"></${u("ui5-icon",e,t)}></${u("ui5-button",e,t)}>`:l`<ui5-button id="reset-button" class="udex-search__button udex-search__reset-button" design="Default" tooltip="${n(this.tooltipInfo.tooltipResetButton)}" @click="${this.onReset}" @keydown="${this.handleKeyDownReset}"><ui5-icon class="udex-search__button-icon" accessible-name="${n(this.accInfo.accessibleNameResetIcon)}" accessible-role="presentation" name="decline"></ui5-icon></ui5-button>`}function PN(o,e,t){return t?l`<${u("ui5-button",e,t)} id="voice-button" class="udex-search__button udex-search__voice-button ${n(this.voiceActiveClass)}" design="Default" icon="microphone" tooltip="${n(this.tooltipInfo.tooltipVoiceButton)}" @click="${this.onVoice}"></${u("ui5-button",e,t)}>`:l`<ui5-button id="voice-button" class="udex-search__button udex-search__voice-button ${n(this.voiceActiveClass)}" design="Default" icon="microphone" tooltip="${n(this.tooltipInfo.tooltipVoiceButton)}" @click="${this.onVoice}"></ui5-button>`}function NN(o,e,t){return l`${this.nonInteractiveSubmitButton?RN.call(this,o,e,t):jN.call(this,o,e,t)}`}function RN(o,e,t){return t?l`<${u("ui5-icon",e,t)} class="udex-search__icon" accessible-name="${n(this.accInfo.accessibleNameSearchIcon)}" name="search"></${u("ui5-icon",e,t)}>`:l`<ui5-icon class="udex-search__icon" accessible-name="${n(this.accInfo.accessibleNameSearchIcon)}" name="search"></ui5-icon>`}function jN(o,e,t){return t?l`<${u("ui5-button",e,t)} id="submit-button" class="udex-search__button udex-search__submit-button ${n(this.searchButtonActiveClass)}" design="Default" icon="search" tooltip="${n(this.tooltipInfo.tooltipSubmitButton)}" @click="${this.onSubmit}"></${u("ui5-button",e,t)}>`:l`<ui5-button id="submit-button" class="udex-search__button udex-search__submit-button ${n(this.searchButtonActiveClass)}" design="Default" icon="search" tooltip="${n(this.tooltipInfo.tooltipSubmitButton)}" @click="${this.onSubmit}"></ui5-button>`}function zN(o,e,t){return t?l`<${u("ui5-popover",e,t)} class="udex-search-suggestions__root ${n(this.homeSearchPopoverClass)}" hide-arrow _disable-initial-focus placement-type="Bottom" horizontal-align="Right" style="${q(this.popoverStyles)}" id="${n(this.getSuggestionsPopoverId)}" aria-orientation="vertical" accessible-role="Dialog" @keydown="${this.handleKeyPressSuggestionList}" accessible-name="${n(this.suggestionsAccessibleName)}">${this.showNoResultMessage?_m.call(this,o,e,t):vm.call(this,o,e,t)}</${u("ui5-popover",e,t)}>`:l`<ui5-popover class="udex-search-suggestions__root ${n(this.homeSearchPopoverClass)}" hide-arrow _disable-initial-focus placement-type="Bottom" horizontal-align="Right" style="${q(this.popoverStyles)}" id="${n(this.getSuggestionsPopoverId)}" aria-orientation="vertical" accessible-role="Dialog" @keydown="${this.handleKeyPressSuggestionList}" accessible-name="${n(this.suggestionsAccessibleName)}">${this.showNoResultMessage?_m.call(this,o,e,t):vm.call(this,o,e,t)}</ui5-popover>`}function _m(o,e,t){return l`<span class="udex-search-suggestions__message">${n(this.noResultMessage)}</span>`}function vm(o,e,t){return l`<div role="tree">${this.isShowSuggestedList?LN.call(this,o,e,t):void 0}${this.isShowRecommendedList?XN.call(this,o,e,t):void 0}</div>`}function LN(o,e,t){return l`<div class="udex-search-suggestions__block" role="treeitem">${this.suggestedHeading?ON.call(this,o,e,t):void 0}<div class="udex-search-suggestions__list" role="listbox" aria-labelledby="suggested-heading" tabindex="0" @keydown="${this.handleKeyDownPopover}">${T(this.suggestedList,(i,r)=>i._id||r,(i,r)=>MN.call(this,o,e,t,i,r))}</div></div>`}function ON(o,e,t){return l`<span class="udex-search-suggestions__heading" id="suggested-heading">${n(this.suggestedHeading)}</span>`}function MN(o,e,t,i,r){return t?l`<${u("ui5-button",e,t)} id="${n(i.id)}" icon="${n(i.icon)}" type="Button" design="Default" class="udex-search-suggestions__item-button" title="${n(i.title)}" tabindex="-1" role="option" @click="${i.handleSelectItem}">${st(i.text)}</${u("ui5-button",e,t)}>`:l`<ui5-button id="${n(i.id)}" icon="${n(i.icon)}" type="Button" design="Default" class="udex-search-suggestions__item-button" title="${n(i.title)}" tabindex="-1" role="option" @click="${i.handleSelectItem}">${st(i.text)}</ui5-button>`}function XN(o,e,t){return l`<div class="udex-search-suggestions__block" role="treeitem">${this.recommendedHeading?FN.call(this,o,e,t):void 0}<div class="udex-search-suggestions__list" role="listbox" aria-labelledby="recommended-heading" tabindex="0" @keydown="${this.handleKeyDownPopover}">${T(this.recommendedList,(i,r)=>i._id||r,(i,r)=>HN.call(this,o,e,t,i,r))}</div></div>`}function FN(o,e,t){return l`<span class="udex-search-suggestions__heading" id="recommended-heading">${n(this.recommendedHeading)}</span>`}function HN(o,e,t,i,r){return l`${i.hasCustomIcon?UN.call(this,o,e,t,i,r):VN.call(this,o,e,t,i,r)}`}function UN(o,e,t,i,r){return t?l`<${u("ui5-button",e,t)} id="${n(i.id)}" icon="${n(i.icon)}" type="Button" design="Default" class="udex-search-suggestions__item-button" title="${n(i.title)}" tabindex="-1" role="option" @click="${i.handleSelectItem}">${st(i.text)}</${u("ui5-button",e,t)}>`:l`<ui5-button id="${n(i.id)}" icon="${n(i.icon)}" type="Button" design="Default" class="udex-search-suggestions__item-button" title="${n(i.title)}" tabindex="-1" role="option" @click="${i.handleSelectItem}">${st(i.text)}</ui5-button>`}function VN(o,e,t,i,r){return t?l`<${u("ui5-button",e,t)} id="${n(i.id)}" type="Button" design="Default" class="udex-search-suggestions__item-button" title="${n(i.title)}" tabindex="-1" role="option" @click="${i.handleSelectItem}">${st(i.text)}</${u("ui5-button",e,t)}>`:l`<ui5-button id="${n(i.id)}" type="Button" design="Default" class="udex-search-suggestions__item-button" title="${n(i.title)}" tabindex="-1" role="option" @click="${i.handleSelectItem}">${st(i.text)}</ui5-button>`}g("@ui5/webcomponents-theming","sap_horizon",async()=>y);g("@sapudex/web-components","sap_horizon",async()=>P);const qN={packageName:"@sapudex/web-components",fileName:"themes/Search.css.ts",content:`:host{--udex-input-color-border: var(--sapField_BorderColor, var(--udexColorGrey6));--udex-input-color-label: var(--sapField_PlaceholderTextColor, var(--udexColorGrey7));--udex-input-font-family-label: var(--sapFontFamily, sans-serif);--udex-input-font-size-label: var(--sapFontLargeSize, var(--udexTypographyBodySFontSize));--udex-input-font-weight-label: var(--udexTypographyFontWeightRegular, 400);--udex-input-line-height-label: var(--udexTypographyBodyLineHeight, 24px);--udex-input-background-color: var(--sapList_Hover_Background, var(--udexColorGrey1));--udex-input-font-family-label-active: var(--sapFontFamily, sans-serif);--udex-input-font-size-label-active: var(--sapFontSmallSize, var(--udexTypographyBodyXXSFontSize));--udex-input-font-weight-label-active: var(--udexTypographyFontWeightRegular, 400);--udex-input-line-height-label-active: var(--udexTypographyBodyLineHeight, 1.5);--udex-input-color-typed-text: var(--sapField_TextColor, var(--udexCoreTextDark));--udex-input-color-background-light: var(--sapField_Background, var(--udexColorNeutralWhite));--udex-input-color-hover-border: var(--sapField_Hover_BorderColor, var(--udexColorBlue6));--udex-input-color-active-border: var(--sapField_Active_BorderColor, var(--udexColorBlue9));--udex-input-radius: var(--sapField_BorderCornerRadius, var(--udexRadiusXS));--udex-input-padding-horizontal: var(--udexSpacer12, 12px);--udex-input-padding-vertical: var(--udexSpacer8, 8px);--udex-button-size: var(--sapFontHeader2Size, 28px);--udex-button-color: var(--sapAccentColor10, var(--udexColorGrey7));--udex-button-non-interactive-icon-color: var(--sapContent_NonInteractiveIconColor, var(--udexColorGrey7));--udex-button-non-interactive-icon-size: var(--sapFontHeader5Size, 18px);--udex-dropdown-border-width: auto;--udex-search-container-padding-inline-end: var(--udexSpacer12, 12px);--udex-search-label-inset-inline-start: var(--udexSpacer12, 12px);--udex-search-icons-column-gap: var(--udexSpacer12, 12px);--udex-search-label-width: calc( 100% - var(--udex-search-label-inset-inline-start) - var(--udex-input-padding-horizontal) - var(--udex-search-container-padding-inline-end) );display:block;width:100%;position:relative}:host([mode="Standard"]) .udex-search__label.udex-search__label--active{display:none}:host(:not([mode="Home Search"])) .udex-search__label.udex-search__label--active.udex-search__label--animation-enabled,:host(:not([mode="Home Search"])) .udex-search-prefix .udex-search__label.udex-search__label--active.udex-search__label--animation-enabled{display:block;inset-block-start:9px;line-height:18px;transform:translateY(-110%);padding:0 4px;font-family:var(--udex-input-font-family-label-active);font-size:var(--udex-input-font-size-label-active);font-weight:var(--udex-input-font-weight-label-active);line-height:var(--udex-input-line-height-label-active);background-color:#fff}:host([mode="Home Search"]) .udex-search__root,:host([mode="Home Search"]) .udex-search__root.udex-search-prefix{--udex-input-radius: var(--udexRadiusXXL, 24px);position:relative;z-index:1}:host([mode="Home Search"]) .udex-search__root.udex-search-prefix{display:flex;width:100%;position:relative;z-index:1}:host([mode="Home Search"]) .udex-search-prefix .udex-search__prefix+.udex-search__container{border-start-start-radius:0;border-start-end-radius:var(--udexRadiusXXL, 24px);border-end-start-radius:0;border-end-end-radius:var(--udexRadiusXXL, 24px);flex-grow:1}:host([mode="Home Search"]) .udex-search__root.udex-search__root--show-popover:after,:host([mode="Home Search"]) .udex-search__root.udex-search-prefix.udex-search__root--show-popover:after,:host([mode="Home Search"]) .udex-search__root.udex-search__root--show-popover-top:after,:host([mode="Home Search"]) .udex-search__root.udex-search-prefix.udex-search__root--show-popover-top:after{content:"";position:absolute;z-index:-1;height:21px;inset-inline:0;inset-block-end:0;background-color:var(--udexColorNeutralWhite, #fff);border-left:1px solid var(--udexColorGrey6, #5B738B);border-right:1px solid var(--udexColorGrey6, #5B738B);box-shadow:var(--sapContent_Shadow1, 0px 2px 8px 0px rgba(34, 54, 73, .3));overflow-y:hidden}:host([mode="Home Search"]) .udex-search__root.udex-search__root--show-popover-top:after,:host([mode="Home Search"]) .udex-search__root.udex-search-prefix.udex-search__root--show-popover-top:after,.udex-search__prefix--show-popover-top:after{transform:translateY(-21px)}:host([mode="Home Search"]) .udex-search__root.udex-search-prefix.udex-search__root--show-popover:after{inset-inline-start:auto;width:50px}:host([mode="Home Search"]) .udex-search__root.udex-search-prefix.udex-search__root--show-popover-top:after{inset-inline-start:auto;width:50px}:host([mode="Home Search"]) .udex-search__container:not(.udex-search__container--has-value),:host([mode="Home Search"]) .udex-search__container:not(.udex-search__container--has-value) .udex-search__field,:host([mode="Home Search"]) .udex-search-prefix .udex-search__container:not(.udex-search__container--has-value),:host([mode="Home Search"]) .udex-search-prefix .udex-search__container:not(.udex-search__container--has-value) .udex-search__field{background-color:var(--udex-input-background-color)}:host([mode="Home Search"]) .udex-search__label.udex-search__label--active,:host([mode="Home Search"]) .udex-search-prefix .udex-search__label.udex-search__label--active{display:none}.udex-search__container{padding-inline-end:var(--udex-search-container-padding-inline-end);display:flex;align-items:center;position:relative;z-index:1;border:1px solid var(--udex-input-color-border);border-radius:var(--udex-input-radius);background-color:field}.udex-search__container:not(.udex-search__container--focus):hover{border-color:var(--udex-input-color-hover-border)}.udex-search__container--focus{border-color:var(--udex-input-color-active-border)}:host(:not([_is-touched])[active]) .udex-search__root:before{content:"";position:absolute;inset:-5px;border:2px solid var(--udexColorBlue10);border-radius:var(--udex-input-radius)}:host([mode="Home Search"]:not([_is-touched])[active]) .udex-search__root:before{z-index:-1}.udex-search__field{display:block;width:100%;color:var(--udex-input-color-typed-text);font-size:16px;line-height:24px;padding:var(--udex-input-padding-vertical) var(--udex-input-padding-horizontal);box-sizing:border-box;border:0;border-radius:var(--udex-input-radius);font-weight:var(--udexTypographyFontWeightRegular, 400);background:var(--udex-input-color-background-light)}.udex-search__field::placeholder{color:var(--udexColorGrey7);font-family:var(--sapFontFamily, sans-serif);font-size:16px}.udex-search__field:focus{outline:none}input[type=search]::-ms-clear{display:none;width:0;height:0}input[type=search]::-ms-reveal{display:none;width:0;height:0}input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}.udex-search__label{position:absolute;inset-inline-start:var(--udex-search-label-inset-inline-start);z-index:2;color:var(--udex-input-color-label);font-family:var(--udex-input-font-family-label);font-size:var(--udex-input-font-size-label);font-weight:var(--udex-input-font-weight-label);line-height:var(--udex-input-line-height-label);transition:transform .15s ease-out,font-size .15s ease-out;overflow:hidden;white-space:nowrap;max-width:var(--udex-search-label-width)}.udex-search__label-with-search-icon,.udex-search__label-with-voice-icon{max-width:calc(var(--udex-search-label-width) - var(--udex-button-size))}.udex-search__label-with-search-icon.udex-search__label-with-voice-icon{max-width:calc(var(--udex-search-label-width) - var(--udex-button-size) * 2 - var(--udex-search-icons-column-gap))}.udex-search__icons{display:flex;align-items:center;column-gap:var(--udex-search-icons-column-gap)}.udex-search__icon{margin-inline:5px;background-color:transparent;border:none;color:var(--udex-button-non-interactive-icon-color);min-width:var(--udex-button-non-interactive-icon-size);height:var(--udex-button-non-interactive-icon-size);border-radius:50%;position:relative;z-index:1;overflow:visible}.udex-search__button{background-color:transparent;border:none;color:var(--udex-button-color);min-width:var(--udex-button-size);height:var(--udex-button-size);border-radius:50%;position:relative;z-index:1;overflow:visible}[ui5-button].udex-search__voice-button--active{color:#0040b0}[ui5-button].udex-search__voice-button--active:before,[ui5-button].udex-search__button:focus:before{content:"";position:absolute;inset-block-start:0;inset-inline-start:0;width:28px;height:28px;border:2px solid #0040B0;border-radius:50%;box-sizing:border-box}[ui5-button].udex-search__button::part(button){padding:0;width:28px;height:28px;line-height:0}[ui5-icon].udex-search__button-icon{color:inherit;width:18px;height:18px}[ui5-button].udex-search__button::part(icon){width:18px;height:18px}[ui5-button].udex-search__button::part(button):after{display:none}[ui5-button].udex-search__button:hover{background:transparent;border:none;box-shadow:none}[ui5-button].udex-search__button:focus{outline:none}[ui5-button].udex-search__submit-button--active{position:relative;z-index:1;color:#fff}[ui5-button].udex-search__submit-button--active:before{content:"";position:absolute;z-index:-1;top:0;left:0;width:28px;height:28px;background-color:#0070f2;border-radius:50%}.udex-search__prefix{position:relative;z-index:1}.udex-search__prefix--show-popover:after,.udex-search__prefix--show-popover-top:after{content:"";position:absolute;z-index:-1;height:50%;width:50px;inset-inline-start:0;inset-block-end:0;background-color:var(--udexColorNeutralWhite, #fff);border-left:1px solid var(--udexColorGrey6, #5B738B);border-right:1px solid var(--udexColorGrey6, #5B738B);box-shadow:var(--sapContent_Shadow1, 0px 2px 8px 0px rgba(34, 54, 73, .3));overflow-y:hidden}.udex-search__prefix-button{padding-inline:var(--udexSpacer12) var(--udexSpacer8);display:flex;align-items:center;max-width:200px;height:100%;border:1px solid var(--udex-input-color-border);border-inline-end:0;border-start-start-radius:var(--udexRadiusXXL, 24px);border-end-start-radius:var(--udexRadiusXXL, 24px);background-color:var(--sapShell_Navigation_Active_Background, var(--udexColorGrey1));color:var(--sapContent_LabelColor, var(--udexColorGrey7));font-family:var(--sapFontFamily, sans-serif);font-size:var(--udexTypographyBodySFontSize, 16px);font-weight:var(--udexTypographyFontWeightRegular, 400);line-height:var(--udexTypographyBodyLineHeight, 1.5);text-align:start;white-space:nowrap}.udex-search__prefix-button:hover{cursor:pointer;background-color:var(--udexCoreBase);color:var(--udexColorBlue8)}.udex-search__prefix-button:focus,.udex-search__prefix-button:focus-visible{outline:2px solid var(--udexColorBlue10, #002A86);outline-offset:-2px}.udex-search__prefix-button--active{background-color:var(--udexCoreBase);color:var(--udexColorBlue10)}.udex-search__prefix-label{margin-inline-end:var(--udexSpacer4, 4px);max-width:calc(100% - 20px);overflow:hidden;text-overflow:ellipsis}.udex-search__prefix-icon{width:16px;height:16px;color:inherit;flex-shrink:1}.udex-search__prefix-popover{border-start-start-radius:0;border-start-end-radius:0;border:1px solid var(--udexCoreBorderDefault);border-block-start:0;box-shadow:var(--sapContent_Shadow1, 0px 2px 8px 0px rgba(34,54,73,.3));background-color:var(--udexColorNeutralWhite, #fff);clip-path:inset(0px -10px -10px -10px)}.udex-search__prefix-popover-top{border-end-start-radius:0;border-end-end-radius:0;border:1px solid var(--udexCoreBorderDefault);border-block-end:0;box-shadow:none;background-color:var(--udexColorNeutralWhite, #fff);clip-path:inset(0px -10px -10px -10px)}.udex-search__prefix-popover::part(content),.udex-search__prefix-popover-top::part(content){padding:0}[udex-dropdown]{--udex-dropdown-pane-max-width: 100%}
|
|
108
108
|
`};g("@ui5/webcomponents-theming","sap_horizon",async()=>y);g("@sapudex/web-components","sap_horizon",async()=>P);const WN={packageName:"@sapudex/web-components",fileName:"themes/SearchSuggestions.css.ts",content:`:host{--udex-popover-box-shadow: var(--sapContent_Shadow1, 0px 2px 8px 0px rgba(34,54,73,.3));--udex-popover-top-box-shadow: 0px -2px 8px 0px rgba(34,54,73,.3);--udex-popover-background-color: var(--udexColorNeutralWhite, #fff);--udex-popover-border-color: var(--udexColorGrey6, #5B738B);--udex-popover-border-radius: var(--sapPopover_BorderCornerRadius, var(--udexRadiusM));--udex-popover-border-color-divider: var(--udexColorGrey7, #475E75);--udex-block-padding-vertical: var(--udexSpacer24, 24px);--udex-heading-padding-horizontal: var(--udexSpacer12, 12px);--udex-heading-margin-vertical: var(--udexSpacer8, 8px);--udex-heading-font-family: var(--sapFontFamily, sans-serif);--udex-heading-font-size: var(--udexTypographyNavigationMediumMFontSize, 14px);--udex-heading-line-height: var(--udexTypographyHeadingLineHeight, 1.1);--udex-heading-font-weight: var(--udexTypographyFontWeightMedium, 500);--udex-button-padding-horizontal: var(--udexSpacer12, 12px);--udex-button-padding-vertical: var(--udexSpacer12, 12px);--udex-button-font-family: var(--sapFontFamily, sans-serif);--udex-button-font-size: var(--udexTypographyBodySFontSize, 16px);--udex-button-font-weight: var(--udexTypographyFontWeightRegular, 400);--udex-button-line-height: var(--udexTypographyBodyLineHeight, 24px);--udex-button-border-color: var(--udexColorBlue10, #002A86);--udex-button-icon-color: var(--sapButton_IconColor, #475E75);--udex-button-highlighted-font-family: var(--sapFontFamily, sans-serif);--udex-button-highlighted-font-size: var(--udexTypographyNavigationBoldXLFontSize, 16px);--udex-button-highlighted-font-weight: var(--udexTypographyFontWeightBold, 700);--udex-button-highlighted-line-height: var(--udexTypographyHeadingLineHeight, 1.1)}.udex-search-suggestions__root{background-color:var(--udex-popover-background-color);border:1px solid var(--udex-popover-border-color);border-radius:var(--udex-popover-border-radius);box-shadow:var(--udex-popover-box-shadow);clip-path:inset(0px -10px -10px -10px)}.udex-search-suggestions__root--home{border-top-left-radius:0;border-top-right-radius:0;border-top:0}.udex-search-suggestions__root-top--home{border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom:0;box-shadow:none}.udex-search-suggestions__root-top--home .udex-search-suggestions__block:last-child{margin-bottom:-5px}.udex-search-suggestions__root-top--home .udex-search-suggestions__block:first-child{margin-top:0}.udex-search-suggestions__root--home .udex-search-suggestions__block:first-child{margin-top:-5px}.udex-search-suggestions__root::part(content){padding:0}.udex-search-suggestions__block{padding-block-start:var(--udex-block-padding-vertical);border-block-end:1px solid var(--udex-popover-border-color-divider);font-family:var(--sapFontFamily, sans-serif)}.udex-search-suggestions__block:last-child{border-block-end:0}.udex-search-suggestions__heading,.udex-search-suggestions__message{margin-block-end:var(--udex-heading-margin-vertical);padding-inline:var(--udex-heading-padding-horizontal) var(--udex-heading-padding-horizontal);display:block;font-family:var(--udex-heading-font-family);font-size:var(--udex-heading-font-size);line-height:var(--udex-heading-line-height);font-weight:var(--udex-heading-font-weight);color:#475e75;text-transform:uppercase}.udex-search-suggestions__message{margin-block:var(--udex-heading-margin-vertical);text-align:center}.udex-search-suggestions__list{margin:0;padding:0;list-style:none}.udex-search-suggestions__list:focus{outline:2px solid var(--udex-button-border-color);outline-offset:-2px;border-radius:var(--udexRadiusXS)}[ui5-button].udex-search-suggestions__item-button{background-color:transparent;border:0;border-radius:0;width:100%;color:#223548;font-family:var(--udex-button-font-family);font-size:var(--udex-button-font-size);line-height:var(--udex-button-line-height);font-weight:var(--udex-button-font-weight);height:auto;cursor:pointer}[ui5-button].udex-search-suggestions__item-button:hover{box-shadow:none;background-color:#f5f6f7}[ui5-button].udex-search-suggestions__item-button:active,[ui5-button].udex-search-suggestions__item-button--active{background-color:#eaecee}[ui5-button].udex-search-suggestions__item-button::part(button){padding-inline:var(--udex-button-padding-vertical) var(--udex-button-padding-vertical);padding-block:var(--udex-button-padding-horizontal) var(--udex-button-padding-horizontal);justify-content:normal}.udex-search-suggestions__item-button [ui5-icon]{margin-inline-end:12px;width:18px;height:18px}.udex-search-suggestions__item-button::part(icon){color:var(--udex-button-icon-color)}.udex-search-suggestions__item-button b{font-family:var(--udex-button-highlighted-font-family);font-size:var(--udex-button-highlighted-font-size);font-weight:var(--udex-button-highlighted-font-weight);line-height:var(--udex-button-highlighted-line-height)}
|
|
109
|
-
`},GN=(o,e,t,i)=>new Promise((r,a)=>{let s=0;const d=()=>{s++;const h=o();h!==void 0?r(h):s<t?setTimeout(d,e):a(new Error(i))};d()});var se=globalThis&&globalThis.__decorate||function(o,e,t,i){var r=arguments.length,a=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,e,t,i);else for(var d=o.length-1;d>=0;d--)(s=o[d])&&(a=(r<3?s(a):r>3?s(e,t,a):s(e,t))||a);return r>3&&a&&Object.defineProperty(e,t,a),a},Go;const YN="sap-icon://search",KN="suggestions-popover";var Ga;(function(o){o.Standard="Standard",o.HomeSearch="Home Search"})(Ga||(Ga={}));let ne=Go=class extends A{constructor(){super(),this._labelActiveClassName="udex-search__label--active",this._labelAnimationClassName="udex-search__label--animation-enabled",this._voiceActiveClassName="udex-search__voice-button--active",this._focusActiveClassName="udex-search__container--focus",this.unsuccessfulRetryMessage="UdexSearchSuggestionsPopover couldn`t be opened",this.retryDelay=200,this.maxRetryAttempts=5,this.handleSelectItem=e=>()=>{this.value=e,this.fireDropdownItemClick(e),this.handleSubmitValue()},this.handleItemClick=e=>{const t=e.detail.item;this.labelPrefix=t.innerText,this.fireEvent("prefix-item-click",{item:t}),this.onClosePrefixPopover()},this.handleDebounce=TN(()=>{this.fireEvent("handle-value-search",{value:this.value}),this.showSuggestedPopover&&this.value.length>=2&&this.onOpenPopover(),!this.showPopoverWhenClickedIntoInput&&this.showSuggestedPopover&&this.value.length<2&&this.onClosePopover()}),this.handleKeyDown=e=>{e.stopPropagation(),this.handleEnterKey(e),this.handleTabKey(e),this.handleEscapeKey(e),this.fireEvent("search-keydown",e)},this._handleResizeBound=this._handleResize.bind(this)}static async onDefine(){Go.i18nBundle=await L("@udex/web-components")}onEnterDOM(){this.isNotMozillaFirefox=!this.isMozillaFirefox("Firefox"),this.isNotMozillaFirefoxIOS=!this.isMozillaFirefox("FxiOS"),this.initSpeechRecognition(),re.register(this,this._handleResizeBound)}onExitDOM(){re.deregister(this,this._handleResizeBound),this.removeEventListener("dropdown-trigger-event",()=>{})}initSpeechRecognition(){try{if(this.isNotMozillaFirefox||this.isNotMozillaFirefoxIOS){const e=window.SpeechRecognition||window.webkitSpeechRecognition||window.mozSpeechRecognition||window.msSpeechRecognition;this.speechRecognition=new e,this.speechRecognition.continuous=!0,this.speechRecognition.lang=this.languageVoice,this.speechRecognition.interimResults=!1,this.speechRecognition.maxAlternatives=5}}catch{console.warn("The voice button does not work in this browser")}}isMozillaFirefox(e){const i=navigator.userAgent.split(" ").find(r=>r.indexOf(e)>-1);if(i){const r=i.split("/"),a=r[r.length-1];return Number(a)>=125}return!1}onInvalidation(e){this.setNewValue(e),this.setPopoverState(e),this.setNewSuggestionList(e)}setNewValue(e){e.name==="value"&&(this.value=e.newValue,this.setSuggestedRecommendedLists(this.suggestionList),this.toggleLabelActiveClass())}toggleLabelActiveClass(){this.labelActiveClass&&!this.labelAnimationDisabled&&!this.isFocusedOnTextfield&&this.handleBlur()}setPopoverState(e){e.name==="openSuggestionPopup"&&this.handlePopoverTrigger(e.newValue)}handlePopoverTrigger(e){e?this.onOpenPopover():this.onClosePopover()}setNewSuggestionList(e){e.name==="suggestionList"&&e.newValue&&this.setSuggestedRecommendedLists(e.newValue)}setSuggestedRecommendedLists(e){if(this.showSuggestedPopover&&e){const t=JSON.parse(e),i=this.hasDataLabel(t);this.shouldShowPopover(t,i)&&(this.setDropdownLabels(i,t),this.suggestedList=this.getListWithSuggestion(this.getSuggestedList(i,t),"suggested"),this.recommendedList=this.getListWithSuggestion(this.getRecommendedList(i,t),"recommended")),this.shouldShowPopover(t,i)||(this.onClosePopover(),this.resetSuggestedRecommendedLists())}}hasDataLabel(e){return Object.values(e).some(t=>Object.prototype.hasOwnProperty.call(t,"label"))}resetSuggestedRecommendedLists(){this.suggestedList=[],this.recommendedList=[]}setDropdownLabels(e,t){this._suggestionLabel=this.getSuggestionLabel(e,t),this._recommendLabel=this.getRecommendLabel(e,t)}getRecommendLabel(e,t){return e?t.recommended.label||"":Go.i18nBundle.getText(jS)}getSuggestionLabel(e,t){return e?t.suggested.label||"":Go.i18nBundle.getText(BS)}getRecommendedList(e,t){return e?t.recommended.list:t.recommended}getSuggestedList(e,t){return e?t.suggested.list:t.suggested}shouldShowPopover(e,t){const i=this.hasSuggestedContent(t,e),r=this.hasRecommendedContent(t,e);return this.showPopoverWhenClickedIntoInput||i||r}hasSuggestedContent(e,t){return e?Object.prototype.hasOwnProperty.call(t.suggested,"list")&&t.suggested.list.length:t.suggested.length}hasRecommendedContent(e,t){return e?Object.prototype.hasOwnProperty.call(t.recommended,"list")&&t.recommended.list.length:t.recommended.length}getListWithSuggestion(e,t){return e==null?void 0:e.map((i,r)=>{const a=typeof i=="object",s=a?i.label:i;return{handleSelectItem:this.handleSelectItem(s),text:this.getTextWithSuggestion(s),title:s,icon:a?i.icon:YN,hasCustomIcon:a,id:`${t}-${r}`}})}escapeRegExp(e){const t=/[-[\]/{}()*+?.\\^$|]/g;return e.replace(t,"\\$&")}getTextWithSuggestion(e){const t=this.escapeRegExp(this.value),i=new RegExp(t,"i");return e.replace(i,"<b>$&</b>")}fireDropdownItemClick(e){this.fireEvent("dropdown-item-click",{value:e})}handleDropdownClick(){this.getPrefixPopover().opened?this.onClosePrefixPopover():this.onOpenPrefixPopover()}getPrefixWrapper(){return this.shadowRoot.querySelector(".udex-search__prefix")}getPrefixPopover(){return this.shadowRoot.querySelector("[ui5-popover]")}getPrefixButton(){return this.shadowRoot.querySelector(".udex-search__prefix-button")}onOpenPrefixPopover(){if(this.dropdownPrefix.length){const e=this.getPrefixWrapper(),t=this.getPrefixPopover(),i=this.getPrefixButton();this._prefixDropdownExpanded=!0,t.showAt(this.getPrefixButton()),t.style.width=`${i.offsetWidth+1}px`,t.classList.add(this.prefixPopoverClasses),i.classList.add("udex-search__prefix-button--active"),e.classList.add(this.prefixWrapperClasses),this.dropdownPrefix[0].addEventListener("item-press",this.handleItemClick)}}onClosePrefixPopover(){const e=this.getPrefixPopover();this.dropdownPrefix[0].removeEventListener("item-press",this.handleItemClick),e.close(),this._prefixDropdownExpanded=!1,this.handleAfterClosePrefixPopover()}handleAfterClosePrefixPopover(){const e=this.getPrefixWrapper(),t=this.getPrefixButton();e.classList.remove("udex-search__prefix--show-popover","udex-search__prefix--show-popover-top"),t.classList.remove("udex-search__prefix-button--active")}handleInputClick(){_e()||(this._isTouched=!0),this.showPopoverWhenClickedIntoInput&&this.onOpenPopover()}onSubmit(e){e.stopPropagation(),this.handleSubmitValue()}handleSubmitValue(){this.onClosePopover(),this.fireEvent("submit-search-value",{value:this.value})}handleAriaExpanded(){var t;const e=this.open.toString();(t=this.getSearchInput())==null||t.setAttribute("aria-expanded",e)}onOpenPopover(){this.showSuggestedPopover&&(this.Suggestion?(this.open=!0,this.Suggestion.open()):GN(()=>this.Suggestion,this.retryDelay,this.maxRetryAttempts,this.unsuccessfulRetryMessage).then(()=>{this.Suggestion.open()}).catch(e=>{console.warn(e.message)}),this.handleAriaExpanded())}onClosePopover(){this.showSuggestedPopover&&(this.Suggestion.close(),this.handleAriaExpanded(),this.open=!1)}handleKeyPressSuggestionList(e){var t;(t=this.Suggestion)==null||t.handleKeyPress(e)}get rootClasses(){return this.mode===Ga.HomeSearch&&this.showSuggestedPopover&&this.open?this.isSuggestionPopoverTop?"udex-search__root--show-popover-top":"udex-search__root--show-popover":""}onBeforeRendering(){if(this.showSuggestedPopover&&this.enableSuggestions(),this.isHomeSearchWithPrefixMode&&this.dropdownPrefix.length){const e=Array.from(this.dropdownPrefix[0].children),t=e.findIndex(r=>r.selected),i=t>=0?e[t]:e[0];this.labelPrefix=i.innerText}this.showResetButton=!!this.value.length,this.value&&this.labelActiveClass===""&&(this.labelActiveClass=this._labelActiveClassName),this.mode===Ga.HomeSearch&&(this.labelAnimationDisabled=!0),this.labelAnimationDisabled||(this.labelAnimationClass=this._labelAnimationClassName),this.labelClasses=`udex-search__label ${this.labelActiveClass} ${this.labelAnimationClass}`,this.isVoiceButton&&(this.labelClasses+=" udex-search__label-with-voice-icon"),this.isShowSubmitButton&&(this.labelClasses+=" udex-search__label-with-search-icon")}enableSuggestions(){if(this.Suggestion)return;const e=et("SearchInputSuggestion");if(e)this.Suggestion=new e(this);else throw new Error("You have to import '@udex/webcomponents/dist/features/SearchSuggestionsPopover.js' module to use udex-search suggestions")}_createObserver(e,t=!1){return new MutationObserver(i=>{i.forEach(r=>{const a=e==null?void 0:e.actualPlacementType,s=r.oldValue;r.attributeName==="actual-placement-type"&&a!==s&&(this._popoverPlacement=a),r.attributeName==="open"&&a!==s&&!t&&(this.open=(e==null?void 0:e.open)||!1)})})}onAfterRendering(){var e,t;if(this.showSuggestedPopover){const i=this.getPrefixPopover();if((e=this.Suggestion)!=null&&e.popover){const r=this._createObserver(this.Suggestion.popover),a=(t=this.Suggestion)==null?void 0:t.popover;r.observe(a,{attributes:!0,attributeOldValue:!0})}if(i){const r=this._createObserver(i,!0),a=i;r.observe(a,{attributes:!0,attributeOldValue:!0})}this.handleOutsideClick(),this.handleOpenSuggestionPopover(),this.setSearchWidth()}}async handleOpenSuggestionPopover(){var e;this.openSuggestionPopup&&await((e=this.Suggestion)==null?void 0:e._getSuggestionPopover().then(()=>{this.handlePopoverTrigger(this.openSuggestionPopup)}))}handleOutsideClick(){document.addEventListener("mousedown",e=>{var i,r;const t=(i=e.target.shadowRoot)==null?void 0:i.querySelector("[ui5-popover]");e.target!==this&&t!==((r=this.Suggestion)==null?void 0:r.popover)&&(this.handleBlur(),this.onClosePopover())})}handleBlur(){this._isTouched=!1,this.value?this.labelActiveClass=this._labelActiveClassName:this.labelActiveClass=""}handleSearchChange(e){var t;this.value=(t=e.target)==null?void 0:t.value,this.showResetButton=!!this.value.length,this.handleDebounce()}handleEnterKey(e){var t;K(e)&&(this.open?(t=this.Suggestion)==null||t.onEnter(e):e.preventDefault(),this.handleSubmitValue())}handleTabKey(e){var t;Bt(e)&&this.open&&((t=this.Suggestion)==null||t.onTab(e))}handleEscapeKey(e){var t;He(e)&&(this.open&&((t=this.Suggestion)==null||t.onEscape(e)),this.fireEvent("handle-close-search"))}handleKeyDownPopover(e){this.open&&(this.handleTabKeyList(e),this.handlePrevTabKeyList(e),this.handleDownKeyList(e),this.handleUpKeyList(e),this.handleEscapeKey(e))}handleTabKeyList(e){var t;Bt(e)&&((t=this.Suggestion)==null||t.onKeyTabList(e))}handlePrevTabKeyList(e){var t;nt(e)&&((t=this.Suggestion)==null||t.onPrevKeyTabList(e))}handleDownKeyList(e){var t;Ie(e)&&((t=this.Suggestion)==null||t.onKeyDown(e))}handleUpKeyList(e){var t;Ae(e)&&((t=this.Suggestion)==null||t.onKeyUp(e))}handleFocus(){this.active=!0,this.isFocusedOnTextfield=!0,this.focusClasses=this._focusActiveClassName,this.labelActiveClass=this.value||!this.labelAnimationDisabled?this._labelActiveClassName:"",this.labelAnimationClass=this.labelAnimationDisabled?"":this._labelAnimationClassName}handleFocusout(){this.active=!1,this.isFocusedOnTextfield=!1,this.focusClasses=""}onReset(e){e.stopPropagation(),this.handleReset()}handleReset(){var e,t;this.value="",this.showResetButton=!1,this.onClosePopover(),this.fireEvent("handle-value-reset"),(e=this.Suggestion)==null||e.resetFocusState(),(t=this.getSearchInput())==null||t.focus()}handleKeyDownReset(e){var t;nt(e)&&this.open&&((t=this.Suggestion)==null||t.handlePrevTabReset(e)),(K(e)||M(e))&&(e.preventDefault(),e.stopPropagation(),this.handleReset())}getSearchInput(){var e;return(e=this.shadowRoot)==null?void 0:e.querySelector("[id='search-input']")}onVoice(e){e.stopPropagation(),this.speechRecognition&&(this.onSpeechLaunch(),this.onSpeechStart(),this.onSpeechResult(),this.onSpeechEnd())}onSpeechLaunch(){this.voiceActiveClass?this.speechRecognition.stop():this.speechRecognition.start()}onSpeechStart(){this.speechRecognition.onstart=()=>{var e;this.voiceActiveClass=this._voiceActiveClassName,(e=this.getSearchInput())==null||e.focus()}}onSpeechResult(){this.speechRecognition.onresult=e=>{const t=e.results.length-1;this.value=e.results[t][0].transcript,this.speechRecognition.stop()}}onSpeechEnd(){this.speechRecognition.onend=()=>{this.voiceActiveClass="",this.handleSubmitValue(),this.onShowResetButton()}}onShowResetButton(){this.value&&(this.showResetButton=!0)}_handleResize(){this.setSearchWidth()}setSearchWidth(){var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector(".udex-search__container");e.offsetWidth!==this._searchWidth&&(this._searchWidth=e.offsetWidth)}get popoverStyles(){return{width:this._searchWidth?`${this._searchWidth}px`:""}}get prefixPopoverStyles(){return{width:this.getPrefixButton()?`${this.getPrefixButton().offsetWidth+1}px`:""}}get isShowResetButton(){return this.showResetButton&&!!this.value.length}get noResultMessage(){return this.noResultText||Go.i18nBundle.getText(E1)}get showNoResultMessage(){var e,t;return!((e=this.suggestedList)!=null&&e.length)&&!((t=this.recommendedList)!=null&&t.length)}get isShowSuggestedList(){var e;return!!((e=this.suggestedList)!=null&&e.length)}get isShowRecommendedList(){var e;return!!((e=this.recommendedList)!=null&&e.length)}get hasPopoverContent(){var e,t;return!!((e=this.suggestedList)!=null&&e.length||(t=this.recommendedList)!=null&&t.length)}get getAriaHasPopup(){return this.showSuggestedPopover?"dialog":"false"}get getSuggestionsPopoverId(){return KN}get isShowSubmitButton(){return this.showSubmitButton}get suggestedHeading(){return this._suggestionLabel}get recommendedHeading(){return this._recommendLabel}get isSuggestionPopoverTop(){var t;const e=(t=this.Suggestion)==null?void 0:t.popover;return e&&e.open&&this._popoverPlacement==="Top"}get isPrefixSuggestionPopoverTop(){const e=this.getPrefixPopover();return e&&e.open&&this._popoverPlacement==="Top"}get isShowSearchHomePrefix(){return this.isHomeSearchWithPrefixMode&&!!this.dropdownPrefix.length}get isHomeSearchMode(){return this.mode===Ga.HomeSearch}get isHomeSearchWithPrefixMode(){return this.mode===Ga.HomeSearch&&!!this.dropdownPrefix.length}get searchClasses(){return`${this.classWithPrefix} ${this.rootClasses}`}get prefixWrapperClasses(){const e=this.getPrefixPopover();return e&&e.open?this._popoverPlacement==="Top"?"udex-search__prefix--show-popover-top":"udex-search__prefix--show-popover":""}get prefixPopoverClasses(){return this.isPrefixSuggestionPopoverTop?"udex-search__prefix-popover-top":"udex-search__prefix-popover"}get classWithPrefix(){return this.isHomeSearchWithPrefixMode?"udex-search-prefix":""}get homeSearchPopoverClass(){return this.isHomeSearchMode||this.isHomeSearchWithPrefixMode?this.isSuggestionPopoverTop?"udex-search-suggestions__root-top--home":"udex-search-suggestions__root--home":""}get homeSearchWithPrefixPopoverClass(){return this.isHomeSearchWithPrefixMode?"udex-search-suggestions__root--prefix":""}get searchButtonActiveClass(){return this.isHomeSearchMode&&this.open?"udex-search__submit-button--active":""}get isNotEmptyClass(){return this.value.length>2||this.focusClasses.length?" udex-search__container--has-value":""}get isVoiceButton(){return this.showVoiceButton&&this.isNotMozillaFirefox&&this.isNotMozillaFirefoxIOS}get accInfo(){return{ariaLabel:this.accessibleName||void 0,accessibleNameResetIcon:this.accessibleNameResetIcon||Go.i18nBundle.getText(AS),accessibleNameSearchIcon:this.accessibleNameSearchIcon||Go.i18nBundle.getText(DS)}}get tooltipInfo(){return{tooltipResetButton:this.tooltipResetButton||Go.i18nBundle.getText(ES),tooltipVoiceButton:this.tooltipVoiceButton||Go.i18nBundle.getText(PS),tooltipSubmitButton:this.tooltipSubmitButton||Go.i18nBundle.getText(NS)}}get suggestionsAccessibleName(){return Go.i18nBundle.getText(RS)}};se([c({type:String})],ne.prototype,"value",void 0);se([c({type:String})],ne.prototype,"label",void 0);se([c({type:Boolean})],ne.prototype,"labelAnimationDisabled",void 0);se([c({type:Boolean,noAttribute:!0})],ne.prototype,"showResetButton",void 0);se([c({type:String,noAttribute:!0,defaultValue:"Bottom"})],ne.prototype,"_popoverPlacement",void 0);se([c({type:Boolean})],ne.prototype,"showSubmitButton",void 0);se([c({type:Boolean})],ne.prototype,"nonInteractiveSubmitButton",void 0);se([c({type:Boolean})],ne.prototype,"showVoiceButton",void 0);se([c({type:String})],ne.prototype,"suggestionList",void 0);se([c({validator:V})],ne.prototype,"_searchWidth",void 0);se([c({type:String})],ne.prototype,"labelPrefix",void 0);se([c({type:Boolean})],ne.prototype,"showSuggestedPopover",void 0);se([c({type:String,defaultValue:"en-US"})],ne.prototype,"languageVoice",void 0);se([c({type:String,defaultValue:Ga.Standard})],ne.prototype,"mode",void 0);se([c({type:Boolean})],ne.prototype,"showPopoverWhenClickedIntoInput",void 0);se([c({type:Boolean})],ne.prototype,"openSuggestionPopup",void 0);se([c()],ne.prototype,"accessibleName",void 0);se([c({type:String})],ne.prototype,"accessibleNameResetIcon",void 0);se([c({type:String})],ne.prototype,"accessibleNameSearchIcon",void 0);se([c({type:String})],ne.prototype,"tooltipResetButton",void 0);se([c({type:String})],ne.prototype,"tooltipVoiceButton",void 0);se([c({type:String})],ne.prototype,"tooltipSubmitButton",void 0);se([c({type:String,defaultValue:"No matches found."})],ne.prototype,"noResultText",void 0);se([c({type:String,noAttribute:!0,defaultValue:""})],ne.prototype,"labelActiveClass",void 0);se([c({type:String,noAttribute:!0,defaultValue:""})],ne.prototype,"labelAnimationClass",void 0);se([c({type:String,noAttribute:!0,defaultValue:""})],ne.prototype,"voiceActiveClass",void 0);se([c({type:String,noAttribute:!0,defaultValue:""})],ne.prototype,"labelClasses",void 0);se([c({type:String,noAttribute:!0,defaultValue:""})],ne.prototype,"focusClasses",void 0);se([c({type:Boolean,noAttribute:!0})],ne.prototype,"open",void 0);se([c({type:String})],ne.prototype,"_suggestionLabel",void 0);se([c({type:String})],ne.prototype,"_recommendLabel",void 0);se([c({type:String,defaultValue:"UdexSearchSuggestionsPopover couldn`t be opened"})],ne.prototype,"unsuccessfulRetryMessage",void 0);se([c({type:Number,defaultValue:200})],ne.prototype,"retryDelay",void 0);se([c({type:Number,defaultValue:5})],ne.prototype,"maxRetryAttempts",void 0);se([I({type:HTMLElement,default:!0})],ne.prototype,"dropdownPrefix",void 0);se([c({type:Boolean,noAttribute:!0})],ne.prototype,"_prefixDropdownExpanded",void 0);se([c({type:Boolean})],ne.prototype,"active",void 0);se([c({type:Boolean})],ne.prototype,"_isTouched",void 0);ne=Go=se([x({tag:"udex-search",renderer:w,styles:qN,template:CN,staticAreaStyles:WN,staticAreaTemplate:zN,get dependencies(){const o=et("SearchInputSuggestion");return[Yi].concat(o?[...o.dependencies,as]:[as])}}),f("submit-search-value",{detail:{value:{type:String}}}),f("handle-value-search",{detail:{value:{type:String}}}),f("handle-value-reset"),f("handle-close-search"),f("dropdown-item-click",{detail:{value:{type:String}}}),f("prefix-item-click",{detail:{item:{type:Ss}}})],ne);ne.define();const uv=ne;class ZN{constructor(e){this.component=e,this._getSuggestionPopover(),this.selectedItemIndex=-1}_getComponent(){return this.component}async _getSuggestionPopover(){if(this.popover)return this.popover;const e=await this._getComponent().getStaticAreaItemDomRef();return this.popover=e.querySelector("[ui5-popover]"),this.popover}_getItems(){var e;return this.popover?[...(e=this.popover)==null?void 0:e.querySelectorAll("[ui5-button]")]:[]}open(){this._getComponent().open=!0,this.popover.showAt(this._getComponent()),this.initLists(),this._focusableListItems=this._getItems(),this._letterKeyHandlerObj=this.getLetterKeyObjHandler(),this.resetFocusLetterHandlers()}setPressedKey(e){this._pressedKey=e}getPressedKey(){return this._pressedKey}setPressedCount(e){this._pressedCount=e}getPressedCount(){return this._pressedCount}setLastFoundPosition(e){this._lastFoundPosition=e}getLastFoundPosition(){return this._lastFoundPosition}resetFocusLetterHandlers(){this.setPressedCount(0),this.setPressedKey(""),this.setLastFoundPosition(0)}handleKeyPress(e){const t=e.key;cv(t)&&(e.preventDefault(),e.stopPropagation(),this.handleLetterKey(e))}getLetterKeyObjHandler(){return{getPressedKey:()=>this.getPressedKey(),setPressedKey:e=>this.setPressedKey(e),getPressedCount:()=>this.getPressedCount(),setPressedCount:e=>this.setPressedCount(e),getLastFoundPosition:()=>this.getLastFoundPosition(),setLastFoundPosition:e=>this.setLastFoundPosition(e)}}handleLetterKey(e){Ky(e.key,this._focusableListItems,this._letterKeyHandlerObj)}initLists(){var t,i;const e=(t=this.popover)!=null&&t.querySelectorAll(".udex-search-suggestions__list")?(i=this.popover)==null?void 0:i.querySelectorAll(".udex-search-suggestions__list"):[];this.lists=Array.from(e)}close(){var e;this._getComponent().open=!1,(e=this.popover)==null||e.close(!0),this.selectedItemIndex=-1}resetFocusState(){this.lists=[],this.selectedItemIndex=-1,this.focusabledList=void 0}onFocusInput(){var e,t;(t=(e=this.component.shadowRoot)==null?void 0:e.querySelector("input"))==null||t.focus()}onEnter(e){var t;e.preventDefault(),this.selectedItemIndex>=0&&(this.component.value=(t=this._getItems()[this.selectedItemIndex].getAttribute("title"))==null?void 0:t.replace(/<[^>]*>?/gm,""))}onTab(e){var t;if((t=this.lists)!=null&&t.length&&this._getComponent().open){if(e.preventDefault(),this.focusabledList&&this.selectedItemIndex===-1)return this.focusabledList.focus(),!0;if(this.focusabledList&&this.selectedItemIndex>=0)return this.getFocusableItems()[this.selectedItemIndex].querySelector("[ui5-button]").focus(),!0;this.focusabledList=this.lists[0],this.focusabledList.focus()}}getFocusableItems(){var t,i;const e=(t=this.focusabledList)!=null&&t.children?(i=this.focusabledList)==null?void 0:i.children:[];return Array.from(e)}onEscape(e){e.preventDefault(),this.close(),this.onFocusInput()}onKeyTabList(e){var t,i,r,a,s,d;e.preventDefault(),((t=this.lists)==null?void 0:t.length)===2&&(this.focusabledList===this.lists[1]&&(((r=(i=this.component)==null?void 0:i.shadowRoot)==null?void 0:r.querySelector("[ui5-button]")).focus(),this.close()),this.focusabledList===this.lists[0]&&(this.focusabledList=this.lists[1],this.focusabledList.focus(),this.selectedItemIndex=-1)),((a=this.lists)==null?void 0:a.length)===1&&(((d=(s=this.component)==null?void 0:s.shadowRoot)==null?void 0:d.querySelector("[ui5-button]")).focus(),this.close())}onPrevKeyTabList(e){var t,i;e.preventDefault(),((t=this.lists)==null?void 0:t.length)===2&&(this.focusabledList===this.lists[0]&&this.onFocusInput(),this.focusabledList===this.lists[1]&&(this.focusabledList=this.lists[0],this.focusabledList.focus(),this.selectedItemIndex=-1)),((i=this.lists)==null?void 0:i.length)===1&&this.onFocusInput()}onKeyDown(e){var a,s,d,h;e.preventDefault();const t=this.selectedItemIndex,i=this.getFocusableItems(),r=i.length-1;if((a=this.lists)!=null&&a.length){if(t===-1){const p=i[0];return p.setAttribute("aria-selected","true"),p.focus(),this.selectedItemIndex=0,(s=this.focusabledList)==null||s.setAttribute("aria-activedescendant",p.id),!0}if(t>=0&&t!==r){const p=i[t+1];return i[t].removeAttribute("aria-selected"),p.setAttribute("aria-selected","true"),p.focus(),this.selectedItemIndex=t+1,(d=this.focusabledList)==null||d.setAttribute("aria-activedescendant",p.id),!0}if(t===r&&this.focusabledList===this.lists[0]&&this.lists.length===2)return i[t].removeAttribute("aria-selected"),(h=this.focusabledList)==null||h.removeAttribute("aria-activedescendant"),this.focusabledList=this.lists[1],this.focusabledList.focus(),this.selectedItemIndex=-1,!0}}onKeyUp(e){var a,s,d,h;e.preventDefault();const t=this.getFocusableItems(),i=t.length-1,r=this.selectedItemIndex;if((a=this.lists)!=null&&a.length){if(r===-1){const p=t[0];return p.setAttribute("aria-selected","true"),p.focus(),this.selectedItemIndex=0,(s=this.focusabledList)==null||s.setAttribute("aria-activedescendant",p.id),!0}if(r>0&&r<=i){const p=t[r-1];return t[r].removeAttribute("aria-selected"),p.setAttribute("aria-selected","true"),p.focus(),this.selectedItemIndex=r-1,(d=this.focusabledList)==null||d.setAttribute("aria-activedescendant",p.id),!0}if(r===0&&this.lists.length===2&&this.focusabledList===this.lists[1])return t[r].removeAttribute("aria-selected"),(h=this.focusabledList)==null||h.removeAttribute("aria-activedescendant"),this.focusabledList=this.lists[0],this.focusabledList.focus(),this.selectedItemIndex=-1,!0}}handlePrevTabReset(e){var t;e.preventDefault(),(t=this.focusabledList)==null||t.focus()}static get dependencies(){return[Yi,Wt]}}M_("SearchInputSuggestion",ZN);var Ap;(function(o){o.Default="Default",o.Subtle="Subtle",o.Emphasized="Emphasized"})(Ap||(Ap={}));const Rd=Ap;function QN(o,e,t){return l`<a class="ui5-link-root" role="${n(this.effectiveAccRole)}" href="${n(this.parsedRef)}" target="${n(this.target)}" rel="${n(this._rel)}" tabindex="${n(this.effectiveTabIndex)}" title="${n(this.title)}" ?disabled="${this.disabled}" aria-label="${n(this.ariaLabelText)}" aria-haspopup="${n(this._hasPopup)}" aria-expanded="${n(this.accessibilityAttributes.expanded)}" @focusin=${this._onfocusin} @focusout=${this._onfocusout} @click=${this._onclick} @keydown=${this._onkeydown} @keyup=${this._onkeyup}><slot></slot>${this.hasLinkType?JN.call(this,o,e,t):void 0}</a>`}function JN(o,e,t){return l`<span class="ui5-hidden-text">${n(this.linkTypeText)}</span>`}g("@ui5/webcomponents-theming","sap_horizon",async()=>y);g("@ui5/webcomponents","sap_horizon",async()=>J);const w5={packageName:"@ui5/webcomponents",fileName:"themes/Link.css.ts",content:`.ui5-hidden-text{position:absolute;clip:rect(1px,1px,1px,1px);user-select:none;left:-1000px;top:-1000px;pointer-events:none;font-size:0}:host(:not([hidden])){display:inline-flex}:host{max-width:100%;color:var(--sapLinkColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);cursor:pointer;outline:none;text-decoration:var(--_ui5-v1-24-20_link_text_decoration);text-shadow:var(--sapContent_TextShadow);white-space:nowrap;overflow-wrap:normal}:host(:hover){color:var(--sapLink_Hover_Color);text-decoration:var(--_ui5-v1-24-20_link_hover_text_decoration)}:host(:active){color:var(--sapLink_Active_Color);text-decoration:var(--_ui5-v1-24-20_link_active_text_decoration)}:host([disabled]){pointer-events:none}:host([disabled]) .ui5-link-root{text-shadow:none;outline:none;cursor:default;pointer-events:none;opacity:var(--sapContent_DisabledOpacity)}:host([design="Emphasized"]) .ui5-link-root{font-family:var(--sapFontBoldFamily)}:host([design="Subtle"]){color:var(--sapLink_SubtleColor);text-decoration:var(--_ui5-v1-24-20_link_subtle_text_decoration)}:host([design="Subtle"]:hover:not(:active)){color:var(--sapLink_SubtleColor);text-decoration:var(--_ui5-v1-24-20_link_subtle_text_decoration_hover)}:host([wrapping-type="Normal"]){white-space:normal;overflow-wrap:break-word}.ui5-link-root{max-width:100%;display:inline-block;position:relative;overflow:hidden;text-overflow:ellipsis;outline:none;white-space:inherit;overflow-wrap:inherit;text-decoration:inherit;color:inherit}:host .ui5-link-root{outline-offset:-.0625rem;border-radius:var(--_ui5-v1-24-20_link_focus_border-radius)}:host([focused]) .ui5-link-root,:host([design="Subtle"][focused]) .ui5-link-root{background-color:var(--_ui5-v1-24-20_link_focus_background_color);outline:var(--_ui5-v1-24-20_link_outline);border-radius:var(--_ui5-v1-24-20_link_focus_border-radius);text-shadow:none}:host([focused]),:host([design="Subtle"][focused]){color:var(--_ui5-v1-24-20_link_focus_color);text-decoration:var(--_ui5-v1-24-20_link_focus_text_decoration)}:host([focused]:hover:not(:active)){color:var(--_ui5-v1-24-20_link_focused_hover_text_color);text-decoration:var(--_ui5-v1-24-20_link_focused_hover_text_decoration)}
|
|
109
|
+
`},GN=(o,e,t,i)=>new Promise((r,a)=>{let s=0;const d=()=>{s++;const h=o();h!==void 0?r(h):s<t?setTimeout(d,e):a(new Error(i))};d()});var se=globalThis&&globalThis.__decorate||function(o,e,t,i){var r=arguments.length,a=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,e,t,i);else for(var d=o.length-1;d>=0;d--)(s=o[d])&&(a=(r<3?s(a):r>3?s(e,t,a):s(e,t))||a);return r>3&&a&&Object.defineProperty(e,t,a),a},Go;const YN="sap-icon://search",KN="suggestions-popover";var Ga;(function(o){o.Standard="Standard",o.HomeSearch="Home Search"})(Ga||(Ga={}));let ne=Go=class extends A{constructor(){super(),this._labelActiveClassName="udex-search__label--active",this._labelAnimationClassName="udex-search__label--animation-enabled",this._voiceActiveClassName="udex-search__voice-button--active",this._focusActiveClassName="udex-search__container--focus",this.unsuccessfulRetryMessage="UdexSearchSuggestionsPopover couldn`t be opened",this.retryDelay=200,this.maxRetryAttempts=5,this.handleSelectItem=e=>()=>{this.value=e,this.fireDropdownItemClick(e),this.handleSubmitValue()},this.handleItemClick=e=>{const t=e.detail.item;this.labelPrefix=t.innerText,this.fireEvent("prefix-item-click",{item:t}),this.onClosePrefixPopover()},this.handleDebounce=TN(()=>{this.fireEvent("handle-value-search",{value:this.value}),this.showSuggestedPopover&&this.value.length>=2&&this.onOpenPopover(),!this.showPopoverWhenClickedIntoInput&&this.showSuggestedPopover&&this.value.length<2&&this.onClosePopover()}),this.handleKeyDown=e=>{e.stopPropagation(),this.handleEnterKey(e),this.handleTabKey(e),this.handleEscapeKey(e),this.fireEvent("search-keydown",e)},this._handleResizeBound=this._handleResize.bind(this)}static async onDefine(){Go.i18nBundle=await L("@udex/web-components")}onEnterDOM(){this.isNotMozillaFirefox=!this.isMozillaFirefox("Firefox"),this.isNotMozillaFirefoxIOS=!this.isMozillaFirefox("FxiOS"),this.initSpeechRecognition(),re.register(this,this._handleResizeBound)}onExitDOM(){re.deregister(this,this._handleResizeBound),this.removeEventListener("dropdown-trigger-event",()=>{})}initSpeechRecognition(){try{if(this.isNotMozillaFirefox||this.isNotMozillaFirefoxIOS){const e=window.SpeechRecognition||window.webkitSpeechRecognition||window.mozSpeechRecognition||window.msSpeechRecognition;this.speechRecognition=new e,this.speechRecognition.continuous=!0,this.speechRecognition.lang=this.languageVoice,this.speechRecognition.interimResults=!1,this.speechRecognition.maxAlternatives=5}}catch{console.warn("The voice button does not work in this browser")}}isMozillaFirefox(e){const i=navigator.userAgent.split(" ").find(r=>r.indexOf(e)>-1);if(i){const r=i.split("/"),a=r[r.length-1];return Number(a)>=125}return!1}onInvalidation(e){this.setNewValue(e),this.setPopoverState(e),this.setNewSuggestionList(e)}setNewValue(e){e.name==="value"&&(this.value=e.newValue,this.setSuggestedRecommendedLists(this.suggestionList),this.toggleLabelActiveClass())}toggleLabelActiveClass(){this.labelActiveClass&&!this.labelAnimationDisabled&&!this.isFocusedOnTextfield&&this.handleBlur()}setPopoverState(e){e.name==="openSuggestionPopup"&&this.handlePopoverTrigger(e.newValue)}handlePopoverTrigger(e){e?this.onOpenPopover():this.onClosePopover()}setNewSuggestionList(e){e.name==="suggestionList"&&e.newValue&&this.setSuggestedRecommendedLists(e.newValue)}setSuggestedRecommendedLists(e){if(this.showSuggestedPopover&&e){const t=JSON.parse(e),i=this.hasDataLabel(t);this.shouldShowPopover(t,i)&&(this.setDropdownLabels(i,t),this.suggestedList=this.getListWithSuggestion(this.getSuggestedList(i,t),"suggested"),this.recommendedList=this.getListWithSuggestion(this.getRecommendedList(i,t),"recommended")),this.shouldShowPopover(t,i)||(this.onClosePopover(),this.resetSuggestedRecommendedLists())}}hasDataLabel(e){return Object.values(e).some(t=>Object.prototype.hasOwnProperty.call(t,"label"))}resetSuggestedRecommendedLists(){this.suggestedList=[],this.recommendedList=[]}setDropdownLabels(e,t){this._suggestionLabel=this.getSuggestionLabel(e,t),this._recommendLabel=this.getRecommendLabel(e,t)}getRecommendLabel(e,t){return e?t.recommended.label||"":Go.i18nBundle.getText(jS)}getSuggestionLabel(e,t){return e?t.suggested.label||"":Go.i18nBundle.getText(BS)}getRecommendedList(e,t){return e?t.recommended.list:t.recommended}getSuggestedList(e,t){return e?t.suggested.list:t.suggested}shouldShowPopover(e,t){const i=this.hasSuggestedContent(t,e),r=this.hasRecommendedContent(t,e);return this.showPopoverWhenClickedIntoInput||i||r}hasSuggestedContent(e,t){return e?Object.prototype.hasOwnProperty.call(t.suggested,"list")&&t.suggested.list.length:t.suggested.length}hasRecommendedContent(e,t){return e?Object.prototype.hasOwnProperty.call(t.recommended,"list")&&t.recommended.list.length:t.recommended.length}getListWithSuggestion(e,t){return e==null?void 0:e.map((i,r)=>{const a=typeof i=="object",s=a?i.label:i;return{handleSelectItem:this.handleSelectItem(s),text:this.getTextWithSuggestion(s),title:s,icon:a?i.icon:YN,hasCustomIcon:a,id:`${t}-${r}`}})}escapeRegExp(e){const t=/[-[\]/{}()*+?.\\^$|]/g;return e.replace(t,"\\$&")}getTextWithSuggestion(e){const t=this.escapeRegExp(this.value),i=new RegExp(t,"i");return e.replace(i,"<b>$&</b>")}fireDropdownItemClick(e){this.fireEvent("dropdown-item-click",{value:e})}handleDropdownClick(){this.getPrefixPopover().opened?this.onClosePrefixPopover():this.onOpenPrefixPopover()}getPrefixWrapper(){return this.shadowRoot.querySelector(".udex-search__prefix")}getPrefixPopover(){return this.shadowRoot.querySelector("[ui5-popover]")}getPrefixButton(){return this.shadowRoot.querySelector(".udex-search__prefix-button")}onOpenPrefixPopover(){if(this.dropdownPrefix.length){const e=this.getPrefixWrapper(),t=this.getPrefixPopover(),i=this.getPrefixButton();this._prefixDropdownExpanded=!0,t.showAt(this.getPrefixButton()),t.style.width=`${i.offsetWidth+1}px`,t.classList.add(this.prefixPopoverClasses),i.classList.add("udex-search__prefix-button--active"),e.classList.add(this.prefixWrapperClasses),this.dropdownPrefix[0].addEventListener("item-press",this.handleItemClick)}}onClosePrefixPopover(){const e=this.getPrefixPopover();this.dropdownPrefix[0].removeEventListener("item-press",this.handleItemClick),e.close(),this._prefixDropdownExpanded=!1,this.handleAfterClosePrefixPopover()}handleAfterClosePrefixPopover(){const e=this.getPrefixWrapper(),t=this.getPrefixButton();e.classList.remove("udex-search__prefix--show-popover","udex-search__prefix--show-popover-top"),t.classList.remove("udex-search__prefix-button--active")}handleInputClick(){_e()||(this._isTouched=!0),this.showPopoverWhenClickedIntoInput&&this.onOpenPopover()}onSubmit(e){e.stopPropagation(),this.handleSubmitValue()}handleSubmitValue(){this.onClosePopover(),this.fireEvent("submit-search-value",{value:this.value})}handleAriaExpanded(){var t;const e=this.open.toString();(t=this.getSearchInput())==null||t.setAttribute("aria-expanded",e)}onOpenPopover(){this.showSuggestedPopover&&(this.Suggestion?(this.open=!0,this.Suggestion.open()):GN(()=>this.Suggestion,this.retryDelay,this.maxRetryAttempts,this.unsuccessfulRetryMessage).then(()=>{this.Suggestion.open()}).catch(e=>{console.warn(e.message)}),this.handleAriaExpanded())}onClosePopover(){this.showSuggestedPopover&&(this.Suggestion.close(),this.handleAriaExpanded(),this.open=!1)}handleKeyPressSuggestionList(e){var t;(t=this.Suggestion)==null||t.handleKeyPress(e)}get rootClasses(){return this.mode===Ga.HomeSearch&&this.showSuggestedPopover&&this.open?this.isSuggestionPopoverTop?"udex-search__root--show-popover-top":"udex-search__root--show-popover":""}onBeforeRendering(){if(this.showSuggestedPopover&&this.enableSuggestions(),this.isHomeSearchWithPrefixMode&&this.dropdownPrefix.length){const e=Array.from(this.dropdownPrefix[0].children),t=e.findIndex(r=>r.selected),i=t>=0?e[t]:e[0];this.labelPrefix=i.innerText}this.showResetButton=!!this.value.length,this.value&&this.labelActiveClass===""&&(this.labelActiveClass=this._labelActiveClassName),this.mode===Ga.HomeSearch&&(this.labelAnimationDisabled=!0),this.labelAnimationDisabled||(this.labelAnimationClass=this._labelAnimationClassName),this.labelClasses=`udex-search__label ${this.labelActiveClass} ${this.labelAnimationClass}`,this.isVoiceButton&&(this.labelClasses+=" udex-search__label-with-voice-icon"),this.isShowSubmitButton&&(this.labelClasses+=" udex-search__label-with-search-icon")}enableSuggestions(){if(this.Suggestion)return;const e=et("SearchInputSuggestion");if(e)this.Suggestion=new e(this);else throw new Error("You have to import '@udex/webcomponents/dist/features/SearchSuggestionsPopover.js' module to use udex-search suggestions")}_createObserver(e,t=!1){return new MutationObserver(i=>{i.forEach(r=>{const a=e==null?void 0:e.actualPlacementType,s=r.oldValue;r.attributeName==="actual-placement-type"&&a!==s&&(this._popoverPlacement=a),r.attributeName==="open"&&a!==s&&!t&&(this.open=(e==null?void 0:e.open)||!1)})})}onAfterRendering(){var e,t;if(this.showSuggestedPopover){const i=this.getPrefixPopover();if((e=this.Suggestion)!=null&&e.popover){const r=this._createObserver(this.Suggestion.popover),a=(t=this.Suggestion)==null?void 0:t.popover;r.observe(a,{attributes:!0,attributeOldValue:!0}),this.Suggestion.initLists()}if(i){const r=this._createObserver(i,!0),a=i;r.observe(a,{attributes:!0,attributeOldValue:!0})}this.handleOutsideClick(),this.handleOpenSuggestionPopover(),this.setSearchWidth()}}async handleOpenSuggestionPopover(){var e;this.openSuggestionPopup&&await((e=this.Suggestion)==null?void 0:e._getSuggestionPopover().then(()=>{this.handlePopoverTrigger(this.openSuggestionPopup)}))}handleOutsideClick(){document.addEventListener("mousedown",e=>{var i,r;const t=(i=e.target.shadowRoot)==null?void 0:i.querySelector("[ui5-popover]");e.target!==this&&t!==((r=this.Suggestion)==null?void 0:r.popover)&&(this.handleBlur(),this.onClosePopover())})}handleBlur(){this._isTouched=!1,this.value?this.labelActiveClass=this._labelActiveClassName:this.labelActiveClass=""}handleSearchChange(e){var t;this.value=(t=e.target)==null?void 0:t.value,this.showResetButton=!!this.value.length,this.handleDebounce()}handleEnterKey(e){var t;K(e)&&(this.open?(t=this.Suggestion)==null||t.onEnter(e):e.preventDefault(),this.handleSubmitValue())}handleTabKey(e){var t;Bt(e)&&this.open&&((t=this.Suggestion)==null||t.onTab(e))}handleEscapeKey(e){var t;He(e)&&(this.open&&((t=this.Suggestion)==null||t.onEscape(e)),this.fireEvent("handle-close-search"))}handleKeyDownPopover(e){this.open&&(this.handleTabKeyList(e),this.handlePrevTabKeyList(e),this.handleDownKeyList(e),this.handleUpKeyList(e),this.handleEscapeKey(e))}handleTabKeyList(e){var t;Bt(e)&&((t=this.Suggestion)==null||t.onKeyTabList(e))}handlePrevTabKeyList(e){var t;nt(e)&&((t=this.Suggestion)==null||t.onPrevKeyTabList(e))}handleDownKeyList(e){var t;Ie(e)&&((t=this.Suggestion)==null||t.onKeyDown(e))}handleUpKeyList(e){var t;Ae(e)&&((t=this.Suggestion)==null||t.onKeyUp(e))}handleFocus(){this.active=!0,this.isFocusedOnTextfield=!0,this.focusClasses=this._focusActiveClassName,this.labelActiveClass=this.value||!this.labelAnimationDisabled?this._labelActiveClassName:"",this.labelAnimationClass=this.labelAnimationDisabled?"":this._labelAnimationClassName}handleFocusout(){this.active=!1,this.isFocusedOnTextfield=!1,this.focusClasses=""}onReset(e){e.stopPropagation(),this.handleReset()}handleReset(){var e,t;this.value="",this.showResetButton=!1,this.onClosePopover(),this.fireEvent("handle-value-reset"),(e=this.Suggestion)==null||e.resetFocusState(),(t=this.getSearchInput())==null||t.focus()}handleKeyDownReset(e){var t;nt(e)&&this.open&&((t=this.Suggestion)==null||t.handlePrevTabReset(e)),(K(e)||M(e))&&(e.preventDefault(),e.stopPropagation(),this.handleReset())}getSearchInput(){var e;return(e=this.shadowRoot)==null?void 0:e.querySelector("[id='search-input']")}onVoice(e){e.stopPropagation(),this.speechRecognition&&(this.onSpeechLaunch(),this.onSpeechStart(),this.onSpeechResult(),this.onSpeechEnd())}onSpeechLaunch(){this.voiceActiveClass?this.speechRecognition.stop():this.speechRecognition.start()}onSpeechStart(){this.speechRecognition.onstart=()=>{var e;this.voiceActiveClass=this._voiceActiveClassName,(e=this.getSearchInput())==null||e.focus()}}onSpeechResult(){this.speechRecognition.onresult=e=>{const t=e.results.length-1;this.value=e.results[t][0].transcript,this.speechRecognition.stop()}}onSpeechEnd(){this.speechRecognition.onend=()=>{this.voiceActiveClass="",this.handleSubmitValue(),this.onShowResetButton()}}onShowResetButton(){this.value&&(this.showResetButton=!0)}_handleResize(){this.setSearchWidth()}setSearchWidth(){var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector(".udex-search__container");e.offsetWidth!==this._searchWidth&&(this._searchWidth=e.offsetWidth)}get popoverStyles(){return{width:this._searchWidth?`${this._searchWidth}px`:""}}get prefixPopoverStyles(){return{width:this.getPrefixButton()?`${this.getPrefixButton().offsetWidth+1}px`:""}}get isShowResetButton(){return this.showResetButton&&!!this.value.length}get noResultMessage(){return this.noResultText||Go.i18nBundle.getText(E1)}get showNoResultMessage(){var e,t;return!((e=this.suggestedList)!=null&&e.length)&&!((t=this.recommendedList)!=null&&t.length)}get isShowSuggestedList(){var e;return!!((e=this.suggestedList)!=null&&e.length)}get isShowRecommendedList(){var e;return!!((e=this.recommendedList)!=null&&e.length)}get hasPopoverContent(){var e,t;return!!((e=this.suggestedList)!=null&&e.length||(t=this.recommendedList)!=null&&t.length)}get getAriaHasPopup(){return this.showSuggestedPopover?"dialog":"false"}get getSuggestionsPopoverId(){return KN}get isShowSubmitButton(){return this.showSubmitButton}get suggestedHeading(){return this._suggestionLabel}get recommendedHeading(){return this._recommendLabel}get isSuggestionPopoverTop(){var t;const e=(t=this.Suggestion)==null?void 0:t.popover;return e&&e.open&&this._popoverPlacement==="Top"}get isPrefixSuggestionPopoverTop(){const e=this.getPrefixPopover();return e&&e.open&&this._popoverPlacement==="Top"}get isShowSearchHomePrefix(){return this.isHomeSearchWithPrefixMode&&!!this.dropdownPrefix.length}get isHomeSearchMode(){return this.mode===Ga.HomeSearch}get isHomeSearchWithPrefixMode(){return this.mode===Ga.HomeSearch&&!!this.dropdownPrefix.length}get searchClasses(){return`${this.classWithPrefix} ${this.rootClasses}`}get prefixWrapperClasses(){const e=this.getPrefixPopover();return e&&e.open?this._popoverPlacement==="Top"?"udex-search__prefix--show-popover-top":"udex-search__prefix--show-popover":""}get prefixPopoverClasses(){return this.isPrefixSuggestionPopoverTop?"udex-search__prefix-popover-top":"udex-search__prefix-popover"}get classWithPrefix(){return this.isHomeSearchWithPrefixMode?"udex-search-prefix":""}get homeSearchPopoverClass(){return this.isHomeSearchMode||this.isHomeSearchWithPrefixMode?this.isSuggestionPopoverTop?"udex-search-suggestions__root-top--home":"udex-search-suggestions__root--home":""}get homeSearchWithPrefixPopoverClass(){return this.isHomeSearchWithPrefixMode?"udex-search-suggestions__root--prefix":""}get searchButtonActiveClass(){return this.isHomeSearchMode&&this.open?"udex-search__submit-button--active":""}get isNotEmptyClass(){return this.value.length>2||this.focusClasses.length?" udex-search__container--has-value":""}get isVoiceButton(){return this.showVoiceButton&&this.isNotMozillaFirefox&&this.isNotMozillaFirefoxIOS}get accInfo(){return{ariaLabel:this.accessibleName||void 0,accessibleNameResetIcon:this.accessibleNameResetIcon||Go.i18nBundle.getText(AS),accessibleNameSearchIcon:this.accessibleNameSearchIcon||Go.i18nBundle.getText(DS)}}get tooltipInfo(){return{tooltipResetButton:this.tooltipResetButton||Go.i18nBundle.getText(ES),tooltipVoiceButton:this.tooltipVoiceButton||Go.i18nBundle.getText(PS),tooltipSubmitButton:this.tooltipSubmitButton||Go.i18nBundle.getText(NS)}}get suggestionsAccessibleName(){return Go.i18nBundle.getText(RS)}};se([c({type:String})],ne.prototype,"value",void 0);se([c({type:String})],ne.prototype,"label",void 0);se([c({type:Boolean})],ne.prototype,"labelAnimationDisabled",void 0);se([c({type:Boolean,noAttribute:!0})],ne.prototype,"showResetButton",void 0);se([c({type:String,noAttribute:!0,defaultValue:"Bottom"})],ne.prototype,"_popoverPlacement",void 0);se([c({type:Boolean})],ne.prototype,"showSubmitButton",void 0);se([c({type:Boolean})],ne.prototype,"nonInteractiveSubmitButton",void 0);se([c({type:Boolean})],ne.prototype,"showVoiceButton",void 0);se([c({type:String})],ne.prototype,"suggestionList",void 0);se([c({validator:V})],ne.prototype,"_searchWidth",void 0);se([c({type:String})],ne.prototype,"labelPrefix",void 0);se([c({type:Boolean})],ne.prototype,"showSuggestedPopover",void 0);se([c({type:String,defaultValue:"en-US"})],ne.prototype,"languageVoice",void 0);se([c({type:String,defaultValue:Ga.Standard})],ne.prototype,"mode",void 0);se([c({type:Boolean})],ne.prototype,"showPopoverWhenClickedIntoInput",void 0);se([c({type:Boolean})],ne.prototype,"openSuggestionPopup",void 0);se([c()],ne.prototype,"accessibleName",void 0);se([c({type:String})],ne.prototype,"accessibleNameResetIcon",void 0);se([c({type:String})],ne.prototype,"accessibleNameSearchIcon",void 0);se([c({type:String})],ne.prototype,"tooltipResetButton",void 0);se([c({type:String})],ne.prototype,"tooltipVoiceButton",void 0);se([c({type:String})],ne.prototype,"tooltipSubmitButton",void 0);se([c({type:String,defaultValue:"No matches found."})],ne.prototype,"noResultText",void 0);se([c({type:String,noAttribute:!0,defaultValue:""})],ne.prototype,"labelActiveClass",void 0);se([c({type:String,noAttribute:!0,defaultValue:""})],ne.prototype,"labelAnimationClass",void 0);se([c({type:String,noAttribute:!0,defaultValue:""})],ne.prototype,"voiceActiveClass",void 0);se([c({type:String,noAttribute:!0,defaultValue:""})],ne.prototype,"labelClasses",void 0);se([c({type:String,noAttribute:!0,defaultValue:""})],ne.prototype,"focusClasses",void 0);se([c({type:Boolean,noAttribute:!0})],ne.prototype,"open",void 0);se([c({type:String})],ne.prototype,"_suggestionLabel",void 0);se([c({type:String})],ne.prototype,"_recommendLabel",void 0);se([c({type:String,defaultValue:"UdexSearchSuggestionsPopover couldn`t be opened"})],ne.prototype,"unsuccessfulRetryMessage",void 0);se([c({type:Number,defaultValue:200})],ne.prototype,"retryDelay",void 0);se([c({type:Number,defaultValue:5})],ne.prototype,"maxRetryAttempts",void 0);se([I({type:HTMLElement,default:!0})],ne.prototype,"dropdownPrefix",void 0);se([c({type:Boolean,noAttribute:!0})],ne.prototype,"_prefixDropdownExpanded",void 0);se([c({type:Boolean})],ne.prototype,"active",void 0);se([c({type:Boolean})],ne.prototype,"_isTouched",void 0);ne=Go=se([x({tag:"udex-search",renderer:w,styles:qN,template:CN,staticAreaStyles:WN,staticAreaTemplate:zN,get dependencies(){const o=et("SearchInputSuggestion");return[Yi].concat(o?[...o.dependencies,as]:[as])}}),f("submit-search-value",{detail:{value:{type:String}}}),f("handle-value-search",{detail:{value:{type:String}}}),f("handle-value-reset"),f("handle-close-search"),f("dropdown-item-click",{detail:{value:{type:String}}}),f("prefix-item-click",{detail:{item:{type:Ss}}})],ne);ne.define();const uv=ne;class ZN{constructor(e){this.component=e,this._getSuggestionPopover(),this.selectedItemIndex=-1}_getComponent(){return this.component}async _getSuggestionPopover(){if(this.popover)return this.popover;const e=await this._getComponent().getStaticAreaItemDomRef();return this.popover=e.querySelector("[ui5-popover]"),this.popover}_getItems(){var e;return this.popover?[...(e=this.popover)==null?void 0:e.querySelectorAll("[ui5-button]")]:[]}open(){this._getComponent().open=!0,this.popover.showAt(this._getComponent()),this.initLists(),this._focusableListItems=this._getItems(),this._letterKeyHandlerObj=this.getLetterKeyObjHandler(),this.resetFocusLetterHandlers()}setPressedKey(e){this._pressedKey=e}getPressedKey(){return this._pressedKey}setPressedCount(e){this._pressedCount=e}getPressedCount(){return this._pressedCount}setLastFoundPosition(e){this._lastFoundPosition=e}getLastFoundPosition(){return this._lastFoundPosition}resetFocusLetterHandlers(){this.setPressedCount(0),this.setPressedKey(""),this.setLastFoundPosition(0)}handleKeyPress(e){const t=e.key;cv(t)&&(e.preventDefault(),e.stopPropagation(),this.handleLetterKey(e))}getLetterKeyObjHandler(){return{getPressedKey:()=>this.getPressedKey(),setPressedKey:e=>this.setPressedKey(e),getPressedCount:()=>this.getPressedCount(),setPressedCount:e=>this.setPressedCount(e),getLastFoundPosition:()=>this.getLastFoundPosition(),setLastFoundPosition:e=>this.setLastFoundPosition(e)}}handleLetterKey(e){Ky(e.key,this._focusableListItems,this._letterKeyHandlerObj)}initLists(){var t,i;const e=(t=this.popover)!=null&&t.querySelectorAll(".udex-search-suggestions__list")?(i=this.popover)==null?void 0:i.querySelectorAll(".udex-search-suggestions__list"):[];this.lists=Array.from(e)}close(){var e;this._getComponent().open=!1,(e=this.popover)==null||e.close(!0),this.selectedItemIndex=-1}resetFocusState(){this.lists=[],this.selectedItemIndex=-1,this.focusabledList=void 0}onFocusInput(){var e,t;(t=(e=this.component.shadowRoot)==null?void 0:e.querySelector("input"))==null||t.focus()}onEnter(e){var t;e.preventDefault(),this.selectedItemIndex>=0&&(this.component.value=(t=this._getItems()[this.selectedItemIndex].getAttribute("title"))==null?void 0:t.replace(/<[^>]*>?/gm,""))}onTab(e){var t;if((t=this.lists)!=null&&t.length&&this._getComponent().open){if(e.preventDefault(),this.focusabledList&&this.selectedItemIndex===-1)return this.focusabledList.focus(),!0;if(this.focusabledList&&this.selectedItemIndex>=0)return this.getFocusableItems()[this.selectedItemIndex].querySelector("[ui5-button]").focus(),!0;this.focusabledList=this.lists[0],this.focusabledList.focus()}}getFocusableItems(){var t,i;const e=(t=this.focusabledList)!=null&&t.children?(i=this.focusabledList)==null?void 0:i.children:[];return Array.from(e)}onEscape(e){e.preventDefault(),this.close(),this.onFocusInput()}onKeyTabList(e){var t,i,r,a,s,d;e.preventDefault(),((t=this.lists)==null?void 0:t.length)===2&&(this.focusabledList===this.lists[1]&&(((r=(i=this.component)==null?void 0:i.shadowRoot)==null?void 0:r.querySelector("[ui5-button]")).focus(),this.close()),this.focusabledList===this.lists[0]&&(this.focusabledList=this.lists[1],this.focusabledList.focus(),this.selectedItemIndex=-1)),((a=this.lists)==null?void 0:a.length)===1&&(((d=(s=this.component)==null?void 0:s.shadowRoot)==null?void 0:d.querySelector("[ui5-button]")).focus(),this.close())}onPrevKeyTabList(e){var t,i;e.preventDefault(),((t=this.lists)==null?void 0:t.length)===2&&(this.focusabledList===this.lists[0]&&this.onFocusInput(),this.focusabledList===this.lists[1]&&(this.focusabledList=this.lists[0],this.focusabledList.focus(),this.selectedItemIndex=-1)),((i=this.lists)==null?void 0:i.length)===1&&this.onFocusInput()}onKeyDown(e){var a,s,d,h;e.preventDefault();const t=this.selectedItemIndex,i=this.getFocusableItems(),r=i.length-1;if((a=this.lists)!=null&&a.length){if(t===-1){const p=i[0];return p.setAttribute("aria-selected","true"),p.focus(),this.selectedItemIndex=0,(s=this.focusabledList)==null||s.setAttribute("aria-activedescendant",p.id),!0}if(t>=0&&t!==r){const p=i[t+1];return i[t].removeAttribute("aria-selected"),p.setAttribute("aria-selected","true"),p.focus(),this.selectedItemIndex=t+1,(d=this.focusabledList)==null||d.setAttribute("aria-activedescendant",p.id),!0}if(t===r&&this.focusabledList===this.lists[0]&&this.lists.length===2)return i[t].removeAttribute("aria-selected"),(h=this.focusabledList)==null||h.removeAttribute("aria-activedescendant"),this.focusabledList=this.lists[1],this.focusabledList.focus(),this.selectedItemIndex=-1,!0}}onKeyUp(e){var a,s,d,h;e.preventDefault();const t=this.getFocusableItems(),i=t.length-1,r=this.selectedItemIndex;if((a=this.lists)!=null&&a.length){if(r===-1){const p=t[0];return p.setAttribute("aria-selected","true"),p.focus(),this.selectedItemIndex=0,(s=this.focusabledList)==null||s.setAttribute("aria-activedescendant",p.id),!0}if(r>0&&r<=i){const p=t[r-1];return t[r].removeAttribute("aria-selected"),p.setAttribute("aria-selected","true"),p.focus(),this.selectedItemIndex=r-1,(d=this.focusabledList)==null||d.setAttribute("aria-activedescendant",p.id),!0}if(r===0&&this.lists.length===2&&this.focusabledList===this.lists[1])return t[r].removeAttribute("aria-selected"),(h=this.focusabledList)==null||h.removeAttribute("aria-activedescendant"),this.focusabledList=this.lists[0],this.focusabledList.focus(),this.selectedItemIndex=-1,!0}}handlePrevTabReset(e){var t;e.preventDefault(),(t=this.focusabledList)==null||t.focus()}static get dependencies(){return[Yi,Wt]}}M_("SearchInputSuggestion",ZN);var Ap;(function(o){o.Default="Default",o.Subtle="Subtle",o.Emphasized="Emphasized"})(Ap||(Ap={}));const Rd=Ap;function QN(o,e,t){return l`<a class="ui5-link-root" role="${n(this.effectiveAccRole)}" href="${n(this.parsedRef)}" target="${n(this.target)}" rel="${n(this._rel)}" tabindex="${n(this.effectiveTabIndex)}" title="${n(this.title)}" ?disabled="${this.disabled}" aria-label="${n(this.ariaLabelText)}" aria-haspopup="${n(this._hasPopup)}" aria-expanded="${n(this.accessibilityAttributes.expanded)}" @focusin=${this._onfocusin} @focusout=${this._onfocusout} @click=${this._onclick} @keydown=${this._onkeydown} @keyup=${this._onkeyup}><slot></slot>${this.hasLinkType?JN.call(this,o,e,t):void 0}</a>`}function JN(o,e,t){return l`<span class="ui5-hidden-text">${n(this.linkTypeText)}</span>`}g("@ui5/webcomponents-theming","sap_horizon",async()=>y);g("@ui5/webcomponents","sap_horizon",async()=>J);const w5={packageName:"@ui5/webcomponents",fileName:"themes/Link.css.ts",content:`.ui5-hidden-text{position:absolute;clip:rect(1px,1px,1px,1px);user-select:none;left:-1000px;top:-1000px;pointer-events:none;font-size:0}:host(:not([hidden])){display:inline-flex}:host{max-width:100%;color:var(--sapLinkColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);cursor:pointer;outline:none;text-decoration:var(--_ui5-v1-24-20_link_text_decoration);text-shadow:var(--sapContent_TextShadow);white-space:nowrap;overflow-wrap:normal}:host(:hover){color:var(--sapLink_Hover_Color);text-decoration:var(--_ui5-v1-24-20_link_hover_text_decoration)}:host(:active){color:var(--sapLink_Active_Color);text-decoration:var(--_ui5-v1-24-20_link_active_text_decoration)}:host([disabled]){pointer-events:none}:host([disabled]) .ui5-link-root{text-shadow:none;outline:none;cursor:default;pointer-events:none;opacity:var(--sapContent_DisabledOpacity)}:host([design="Emphasized"]) .ui5-link-root{font-family:var(--sapFontBoldFamily)}:host([design="Subtle"]){color:var(--sapLink_SubtleColor);text-decoration:var(--_ui5-v1-24-20_link_subtle_text_decoration)}:host([design="Subtle"]:hover:not(:active)){color:var(--sapLink_SubtleColor);text-decoration:var(--_ui5-v1-24-20_link_subtle_text_decoration_hover)}:host([wrapping-type="Normal"]){white-space:normal;overflow-wrap:break-word}.ui5-link-root{max-width:100%;display:inline-block;position:relative;overflow:hidden;text-overflow:ellipsis;outline:none;white-space:inherit;overflow-wrap:inherit;text-decoration:inherit;color:inherit}:host .ui5-link-root{outline-offset:-.0625rem;border-radius:var(--_ui5-v1-24-20_link_focus_border-radius)}:host([focused]) .ui5-link-root,:host([design="Subtle"][focused]) .ui5-link-root{background-color:var(--_ui5-v1-24-20_link_focus_background_color);outline:var(--_ui5-v1-24-20_link_outline);border-radius:var(--_ui5-v1-24-20_link_focus_border-radius);text-shadow:none}:host([focused]),:host([design="Subtle"][focused]){color:var(--_ui5-v1-24-20_link_focus_color);text-decoration:var(--_ui5-v1-24-20_link_focus_text_decoration)}:host([focused]:hover:not(:active)){color:var(--_ui5-v1-24-20_link_focused_hover_text_color);text-decoration:var(--_ui5-v1-24-20_link_focused_hover_text_decoration)}
|
|
110
110
|
`};var So=globalThis&&globalThis.__decorate||function(o,e,t,i){var r=arguments.length,a=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,e,t,i);else for(var d=o.length-1;d>=0;d--)(s=o[d])&&(a=(r<3?s(a):r>3?s(e,t,a):s(e,t))||a);return r>3&&a&&Object.defineProperty(e,t,a),a},Qs;let Dt=Qs=class extends A{constructor(){super(),this._dummyAnchor=document.createElement("a")}onBeforeRendering(){const e=this.target!=="_self"&&this.href&&this._isCrossOrigin();this._rel=e?"noreferrer noopener":void 0}_isCrossOrigin(){const e=window.location;return this._dummyAnchor.href=this.href,!(this._dummyAnchor.hostname===e.hostname&&this._dummyAnchor.port===e.port&&this._dummyAnchor.protocol===e.protocol)}get effectiveTabIndex(){var e;return this.forcedTabIndex?this.forcedTabIndex:this.disabled||!((e=this.textContent)!=null&&e.length)?"-1":"0"}get ariaLabelText(){return ar(this)}get hasLinkType(){return this.design!==Rd.Default}static typeTextMappings(){return{Subtle:yC,Emphasized:wC}}get linkTypeText(){return Qs.i18nBundle.getText(Qs.typeTextMappings()[this.design])}get parsedRef(){return this.href&&this.href.length>0?this.href:void 0}get effectiveAccRole(){return this.accessibleRole.toLowerCase()}get _hasPopup(){var e;return(e=this.accessibilityAttributes.hasPopup)==null?void 0:e.toLowerCase()}static async onDefine(){Qs.i18nBundle=await L("@ui5/webcomponents")}_onclick(e){const{altKey:t,ctrlKey:i,metaKey:r,shiftKey:a}=e;e.stopImmediatePropagation(),Fi(e,"link"),this.fireEvent("click",{altKey:t,ctrlKey:i,metaKey:r,shiftKey:a},!0)||e.preventDefault()}_onfocusin(e){Fi(e,"link"),this.focused=!0}_onfocusout(){this.focused=!1}_onkeydown(e){K(e)&&!this.href?this._onclick(e):M(e)&&e.preventDefault(),Fi(e,"link")}_onkeyup(e){if(!M(e)){Fi(e,"link");return}if(this._onclick(e),this.href&&!e.defaultPrevented){const t=new MouseEvent("click");t.stopImmediatePropagation(),this.getDomRef().dispatchEvent(t)}}};So([c({type:Boolean})],Dt.prototype,"disabled",void 0);So([c()],Dt.prototype,"title",void 0);So([c()],Dt.prototype,"href",void 0);So([c()],Dt.prototype,"target",void 0);So([c({type:Rd,defaultValue:Rd.Default})],Dt.prototype,"design",void 0);So([c({type:bo,defaultValue:bo.None})],Dt.prototype,"wrappingType",void 0);So([c()],Dt.prototype,"accessibleName",void 0);So([c()],Dt.prototype,"accessibleNameRef",void 0);So([c({defaultValue:"link"})],Dt.prototype,"accessibleRole",void 0);So([c({type:Object})],Dt.prototype,"accessibilityAttributes",void 0);So([c({noAttribute:!0})],Dt.prototype,"_rel",void 0);So([c({noAttribute:!0})],Dt.prototype,"forcedTabIndex",void 0);So([c({type:Boolean})],Dt.prototype,"focused",void 0);Dt=Qs=So([x({tag:"ui5-link",languageAware:!0,renderer:w,template:QN,styles:w5}),f("click",{detail:{altKey:{type:Boolean},ctrlKey:{type:Boolean},metaKey:{type:Boolean},shiftKey:{type:Boolean}}})],Dt);Dt.define();const eR=Dt;function tR(o,e,t){return l`<a class="ui5-link-root ${n(this.linkClass)}" role="${n(this.effectiveAccRole)}" href="${n(this.parsedRef)}" target="${n(this.target)}" rel="${n(this._rel)}" tabindex="${n(this.effectiveTabIndex)}" title="${n(this.title)}" ?disabled="${this.disabled}" aria-label="${n(this.ariaLabelText)}" aria-haspopup="${n(this._hasPopup)}" aria-expanded="${n(this.accessibilityAttributes.expanded)}" @focusin=${this._onfocusin} @focusout=${this._onfocusout} @click=${this._onclick} @keydown=${this._onkeydown} @keyup=${this._onkeyup}>${this.startIcon?oR.call(this,o,e,t):void 0}<span class="udex-link__content"><slot></slot></span>${this.endIcon?iR.call(this,o,e,t):void 0}${this.hasLinkType?rR.call(this,o,e,t):void 0}</a>`}function oR(o,e,t){return t?l`<${u("ui5-icon",e,t)} class="udex-link__icon udex-link__icon--icon-start" name="${n(this.icon)}"></${u("ui5-icon",e,t)}>`:l`<ui5-icon class="udex-link__icon udex-link__icon--icon-start" name="${n(this.icon)}"></ui5-icon>`}function iR(o,e,t){return t?l`<${u("ui5-icon",e,t)} class="udex-link__icon udex-link__icon--icon-end" name="${n(this.icon)}"></${u("ui5-icon",e,t)}>`:l`<ui5-icon class="udex-link__icon udex-link__icon--icon-end" name="${n(this.icon)}"></ui5-icon>`}function rR(o,e,t){return l`<span class="ui5-hidden-text">${n(this.linkTypeText)}</span>`}g("@ui5/webcomponents-theming","sap_horizon",async()=>y);g("@sapudex/web-components","sap_horizon",async()=>P);const aR={packageName:"@sapudex/web-components",fileName:"themes/Link.css.ts",content:`:host{--udex-link-text-decoration: underline;--udex-link-hover-text-decoration: underline;--udex-link-focused-hover-text-decoration: underline;--udex-link-focus-text-decoration: underline;--udex-link-emphasized-text-decoration: none;--udex-link-icon-height: 24px;--udex-link-icon-width:var(--sapFontSize);--udex-link-white-space: break-spaces;white-space:normal}:host([focused]),:host([focused]:hover),:host([focused]:hover:not(:active)),:host(:hover){text-decoration:none}:host([focused]) slot{text-decoration:var(--udex-link-focus-text-decoration)}:host([focused]:hover) slot,:host([focused]:hover:not(:active)) slot{text-decoration:var(--udex-link-focused-hover-text-decoration)}:host([icon]) .udex-link__content{white-space:var(--udex-link-white-space)}:host([design="Emphasized"]){font-weight:var(--udexTypographyFontWeightBold)}.ui5-link-root{overflow:visible}[ui5-link][disabled] .linkIcon{opacity:inherit}.udex-link slot{text-decoration:var(--udex-link-text-decoration);display:inline}.udex-link:hover slot{text-decoration:var(--udex-link-hover-text-decoration)}:host([design="Emphasized"]:active),:host([design="Emphasized"][focused]) .udex-link:hover slot,:host([design="Emphasized"][focused]) .udex-link slot,:host([design="Emphasized"]) .udex-link slot,.udex-link--with-icon slot{text-decoration:var(--udex-link-emphasized-text-decoration)}.udex-link--with-icon:hover slot,.udex-link--with-icon:active slot{text-decoration:var(--udex-link-hover-text-decoration)}.udex-link--with-icon .udex-link__content{display:inline;vertical-align:middle;margin-inline-end:20px}.udex-link--with-icon .udex-link__icon--icon-start~.udex-link__content{margin-inline-end:0}.udex-link__icon{display:inline-block;vertical-align:middle;width:var(--udex-link-icon-width);height:var(--udex-link-icon-height)}[ui5-link][focused]{color:var(--sapLinkColor)}:host([focused]) .ui5-link-root,:host([design="Subtle"][focused]) .ui5-link-root{outline:var(--sapContent_FocusColor, #002A86) var(--sapContent_FocusStyle, "solid") var(--sapContent_FocusWidth, .125rem)}.udex-link__icon,[ui5-link]:active .udex-link__icon,[ui5-link][focused] .udex-link__icon{color:inherit}.udex-link__icon--icon-start{padding-inline-end:var(--udexSpacer4, 4px)}.udex-link__icon--icon-end{padding-inline-start:var(--udexSpacer4, 4px);margin-inline-start:-20px}
|
|
111
111
|
`};var hv=globalThis&&globalThis.__decorate||function(o,e,t,i){var r=arguments.length,a=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,e,t,i);else for(var d=o.length-1;d>=0;d--)(s=o[d])&&(a=(r<3?s(a):r>3?s(e,t,a):s(e,t))||a);return r>3&&a&&Object.defineProperty(e,t,a),a};let ds=class extends eR{get startIcon(){return this.icon&&this.iconPlacement===oi.Start}get endIcon(){return this.icon&&this.iconPlacement===oi.End}get linkClass(){return this.icon?"udex-link udex-link--with-icon":"udex-link"}};hv([c({type:String})],ds.prototype,"icon",void 0);hv([c({type:oi,defaultValue:oi.End})],ds.prototype,"iconPlacement",void 0);ds=hv([x({tag:"udex-link",renderer:w,styles:[w5,aR],template:tR,dependencies:[W]})],ds);ds.define();const nR=ds,sR="navigation-down-arrow",k5="M425.5 137q9-9 22.5-9t22.5 9q10 10 10 23t-10 23l-193 197q-4 2-5 3-2 1-2.5 1.5t-2.5 1.5q-6 2-11 2-2 0-3-.5t-2-.5q-4 0-6-1t-3.5-2-3.5-2q-1-1-1.5-1t-1.5-1-2-1l-192-196q-10-10-10-23t10-23q9-9 22.5-9t22.5 9l154 155q16 10 32 0z",dR=!1,lR="SAP-icons-v4",cR="@ui5/webcomponents-icons";D(sR,{pathData:k5,ltr:dR,collection:lR,packageName:cR});const uR="navigation-down-arrow",$5="M96 186q0-11 7.5-18.5T122 160q10 0 18 8l116 121 116-121q8-8 18-8 11 0 18.5 7.5T416 186q0 10-7 17L275 344q-8 8-19 8-12 0-18-8L103 203q-7-7-7-17z",hR=!1,pR="SAP-icons-v5",_R="@ui5/webcomponents-icons";D(uR,{pathData:$5,ltr:hR,collection:pR,packageName:_R});oe();function vR(o,e,t){return t?l`<div class="udex-tab-navigation__root"><div id="${n(this._id)}-header" class="udex-tab-navigation__header" part="tab-navigation-header" @keydown="${this.handleKeyDown}"><div id="${n(this._id)}-header-tabs" class="udex-tab-navigation__header-tabs" role="tablist" aria-labelledby="tablist-${n(this._id)}" part="tab-navigation-header-tabs" @click="${this.onTabClick}">${T(this.items,(i,r)=>i._id||r,(i,r)=>gm.call(this,o,e,t,i,r))}</div><button class="udex-tab-navigation__button-more" @click="${this.handleMoreButton}" @keydown="${this.handleFocusMoreButton}" tabindex="0" aria-haspopup="menu" aria-expanded="${n(this._isExpanded)}" tooltip="${n(this.moreButtonText)}" hidden>${n(this.moreButtonText)}<${u("ui5-icon",e,t)} class="udex-tab-navigation__button-more-icon" name="navigation-down-arrow"></${u("ui5-icon",e,t)}></button>${n(this.tabNavigationPopover)}</div><div class="udex-tab-navigation__content" id="udex-${n(this.__id)}-content" part="tab-navigation-content">${T(this.items,(i,r)=>i._id||r,(i,r)=>mm.call(this,o,e,t,i,r))}</div></div>`:l`<div class="udex-tab-navigation__root"><div id="${n(this._id)}-header" class="udex-tab-navigation__header" part="tab-navigation-header" @keydown="${this.handleKeyDown}"><div id="${n(this._id)}-header-tabs" class="udex-tab-navigation__header-tabs" role="tablist" aria-labelledby="tablist-${n(this._id)}" part="tab-navigation-header-tabs" @click="${this.onTabClick}">${T(this.items,(i,r)=>i._id||r,(i,r)=>gm.call(this,o,e,t,i,r))}</div><button class="udex-tab-navigation__button-more" @click="${this.handleMoreButton}" @keydown="${this.handleFocusMoreButton}" tabindex="0" aria-haspopup="menu" aria-expanded="${n(this._isExpanded)}" tooltip="${n(this.moreButtonText)}" hidden>${n(this.moreButtonText)}<ui5-icon class="udex-tab-navigation__button-more-icon" name="navigation-down-arrow"></ui5-icon></button>${n(this.tabNavigationPopover)}</div><div class="udex-tab-navigation__content" id="udex-${n(this.__id)}-content" part="tab-navigation-content">${T(this.items,(i,r)=>i._id||r,(i,r)=>mm.call(this,o,e,t,i,r))}</div></div>`}function gm(o,e,t,i,r){return l`${n(i.tabNavigation)}`}function mm(o,e,t,i,r){return l`${i.selected?gR.call(this,o,e,t,i,r):mR.call(this,o,e,t,i,r)}`}function gR(o,e,t,i,r){return l`<div class="udex-tab-navigation__content-item" id="${n(i._contentId)}" aria-labelledby="${n(i._id)}"><slot name="${n(i._slotName)}"></slot></div>`}function mR(o,e,t,i,r){return l`<div class="udex-tab-navigation__content-item" id="${n(i._contentId)}"><slot name="${n(i._slotName)}"></slot></div>`}function bR(o,e,t){return t?l`<${u("ui5-popover",e,t)} id="${n(this._id)}-overflow-popover" horizontal-align="Right" placement-type="Bottom" aria-orientation="vertical" @ui5-after-open="${n(this.onFocusFirstItemPopover)}" hide-arrow _hideHeader><div class="tab-navigation-popover" @click="${this.handleOverflowItemClick}" @keydown="${this.handleFocusPopover}" role="tablist">${T(this._overflowItems,(i,r)=>i._id||r,(i,r)=>bm.call(this,o,e,t,i,r))}</div></${u("ui5-popover",e,t)}>`:l`<ui5-popover id="${n(this._id)}-overflow-popover" horizontal-align="Right" placement-type="Bottom" aria-orientation="vertical" @ui5-after-open="${n(this.onFocusFirstItemPopover)}" hide-arrow _hideHeader><div class="tab-navigation-popover" @click="${this.handleOverflowItemClick}" @keydown="${this.handleFocusPopover}" role="tablist">${T(this._overflowItems,(i,r)=>i._id||r,(i,r)=>bm.call(this,o,e,t,i,r))}</div></ui5-popover>`}function bm(o,e,t,i,r){return l`${n(i.tabInOverflow)}`}g("@ui5/webcomponents-theming","sap_horizon",async()=>y);g("@sapudex/web-components","sap_horizon",async()=>P);const fR={packageName:"@sapudex/web-components",fileName:"themes/TabNavigation.css.ts",content:`:host{--udex-header-background-color: transparent;--udex-button-tab-vertical-gap: var(--udexSpacer32, 32px);--udex-button-tab-text-transform-first-letter: uppercase;--udex-button-tab-text-transform: none;--udex-button-tab-text-color-default: var(--sapShell_Navigation_TextColor, var(--udexColorGrey9));--udex-button-tab-text-color-hover: var(--udexColorBlue8);--udex-button-tab-text-color-active: var(--udexColorBlue8);--udex-button-tab-border-color-active: var(--udexColorBlue8);--udex-button-tab-font-size-default: var(--sapFontSize, var(--udexTypographyNavigationBoldXLFontSize));--udex-button-tab-font-family: var(--sapFontFamily, sans-serif);--udex-button-tab-font-weight: var(--sapButton_Emphasized_FontWeight, var(--udexTypographyFontWeightBold));--udex-button-tab-line-height: 1.125;--udex-button-tab-padding-vertical: var(--udexSpacer12, 12px);--udex-button-tab-padding-horizontal: var(--udexSpacer4, 4px);--udex-button-tab-with-icon-without-background-border-color-active: transparent;--udex-button-tab-with-icon-background: var(--sapList_SelectionBackgroundColor, var(--udexColorBlue1));--udex-button-tab-with-icon-background-hover: var(--sapAvatar_6_Background, var(--udexColorBlue2));--udex-button-tab-with-icon-color: var(--sapAccentColor6, var(--udexColorBlue7));--udex-button-tab-with-icon-color-hover: var(--sapContent_MarkerIconColor, var(--udexColorBlue9));--udex-button-tab-with-icon-margin-bottom: var(--udexSpacer8, 8px);--udex-button-tab-with-icon-background-active: var(--sapHighlightColor, var(--udexColorBlue7));--udex-button-tab-with-icon-color-active: var(--sapBackgroundColor, var(--udexColorNeutralWhite));--udex-button-tab-with-icon-without-background-color: var(--sapShell_Navigation_TextColor, var(--udexColorGrey9));--udex-button-tab-with-icon-without-background-color-active: var(--sapHighlightColor, var(--udexColorBlue7));--udex-button-tab-with-icon-without-background-margin-bottom: var(--udexSpacer16, 16px);--udex-button-tab-with-icon-font-weight: var(--udexTypographyFontWeightMedium, 500);--udex-button-tab-with-icon-text-color-active: var(--sapTextColor, --udexCoreNavigation);--udex-tab-navigation-tab-with-icon-without-background-color: transparent;--udex-tab-navigation-tab-with-icon-without-background-color-active: transparent;--udex-button-more-margin-inline-end: 0;--udex-button-more-s-font-size: var(--udexTypographyNavigationMediumMFontSize, 14px);--udex-button-more-s-font-family: var(--sapFontFamily, sans-serif);--udex-button-more-s-font-weight: var(--udexTypographyFontWeightMedium, 500);--udex-button-more-s-line-height: 1.07143;--udex-button-more-s-text-color: var(--sapTextColor, var(--udexColorGrey9));--udex-button-more-s-padding-vertical: var(--udexSpacer4, 4px);--udex-button-more-s-padding-horizontal: var(--udexSpacer8, 8px);--udex-button-more-s-border-color: var(--sapButton_Neutral_BorderColor, var(--udexColorGrey4));--udex-button-more-s-icon-margin-inline-start: var(--udexSpacer4, 4px);--udex-button-more-s-icon-color: var(--sapTextColor, var(--udexColorGrey9));--udex-button-more-s-border-color-toggled: var(--udexColorBlue4);--udex-button-more-s-text-color-toggled: var(--sapContent_Selected_FocusColor, var(--udexColorBlue9));--udex-button-more-s-icon-color-toggled: var(--sapContent_Selected_FocusColor, var(--udexColorBlue9));--udex-button-more-m-font-size: var(--sapFontSize, var(--udexTypographyNavigationMediumXLFontSize));--udex-button-more-m-font-family: var(--sapFontFamily, sans-serif);--udex-button-more-m-font-weight: var(--udexTypographyFontWeightMedium, 500);--udex-button-more-m-line-height: 1.125;--udex-button-more-m-padding-vertical: var(--udexSpacer8, 8px);--udex-button-more-m-padding-horizontal: var(--udexSpacer12, 12px);--udex-tab-navigation-content-padding-vertical-desktop: var(--udexSpacer40, 40px);--udex-tab-navigation-content-padding-vertical-mobile: var(--udexSpacer32, 32px);--udex-tab-navigation-content-font-family: var(--sapFontFamily, sans-serif);--udex-tab-navigation-content-font-size: var(--udexTypographyNavigationRegularMFontSize, 14px);--udex-tab-navigation-content-font-weight: var(--udexTypographyFontWeightRegular, 400);--udex-tab-navigation-content-line-height: var(--udexTypographyHeadingLineHeight, 1.1)}:host([icon-without-background]) .udex-tab-navigation__button-icon-outer{margin-bottom:var(--udex-button-tab-with-icon-without-background-margin-bottom);background-color:var(--udex-tab-navigation-tab-with-icon-without-background-color);color:var(--udex-button-tab-with-icon-without-background-color)}:host([icon-without-background]) .udex-tab-navigation__button-tab--active .udex-tab-navigation__button-icon-outer{background-color:var(--udex-tab-navigation-tab-with-icon-without-background-color-active)}:host([icon-without-background]) .udex-tab-navigation__button-icon{color:var(--udex-button-tab-with-icon-without-background-color)}:host([icon-without-background]) .udex-tab-navigation__button-tab--active .udex-tab-navigation__button-icon{color:var(--udex-button-tab-with-icon-without-background-color-active)}:host([icon-without-background]) .udex-tab-navigation__button-tab--active:before{background-color:var(--udex-button-tab-with-icon-without-background-border-color-active)}:host([mode="Dark"]){--udex-header-background-color: var(--sapList_GroupHeaderTextColor, var(--udexColorGrey10));--udex-button-tab-text-color-default: var(--sapList_GroupHeaderBackground, var(--udexColorNeutralWhite));--udex-button-tab-text-color-active: var(--sapProgress_InformationBorderColor, var(--udexColorBlue3));--udex-button-tab-border-color-active: transparent;--udex-button-tab-with-icon-background: transparent;--udex-button-tab-with-icon-color: var(--sapProgress_InformationBorderColor, var(--udexColorBlue3));--udex-button-tab-with-icon-color-active: var(--sapProgress_InformationBorderColor, var(--udexColorBlue3));--udex-button-tab-with-icon-background-active: transparent;--udex-button-tab-with-icon-margin-bottom: var(--udexSpacer8, 8px)}:host([mode="Dark"]) .udex-tab-navigation__button-icon-outer .udex-tab-navigation__button-badge,:host([icon-without-background]) .udex-tab-navigation__button-icon-outer .udex-tab-navigation__button-badge{inset-inline-end:-9px}:host([icon-without-background]) .udex-tab-navigation__button-icon-outer,:host([icon-without-background]) .udex-tab-navigation__button-icon{width:24px;height:24px}:host([icon-without-background]) .udex-tab-navigation__button-tab--with-icon{padding-block-end:var(--udex-button-tab-padding-vertical)}:host([icon-without-background]) .udex-tabs-navigation__button-tab{padding-bottom:var(--udex-button-tab-padding-vertical)}:host(:not([icon-without-background])) .udex-tab-navigation__button-tab--active .udex-tab-navigation__button-text.udex-tab-navigation__button-text--icon{color:var(--udex-button-tab-with-icon-text-color-active)}:host([mode="Dark"]) .udex-tab-navigation__button-icon-outer,:host([mode="Dark"]) .udex-tab-navigation__button-icon{width:32px;height:32px}:host([size-more-button="Medium"]) .udex-tab-navigation__button-more{padding:var(--udex-button-more-m-padding-vertical) var(--udex-button-more-m-padding-horizontal);height:34px;font-size:var(--udex-button-more-m-font-size);font-family:var(--udex-button-more-m-font-family);font-weight:var(--udex-button-more-m-font-weight);line-height:var(--udex-button-more-m-line-height)}:host([desktop]) .udex-tab-navigation__button-tab:focus .udex-tab-navigation__button-text,.udex-tab-navigation__button-tab:focus-visible .udex-tab-navigation__button-text{outline:2px solid var(--udex-button-tab-text-color-active);border-radius:var(--udexRadiusXXS, 2px)}.udex-tab-navigation__root{width:100%}.udex-tab-navigation__header{background-color:var(--udex-header-background-color);min-height:43px;display:flex;align-items:center;position:relative}.udex-tab-navigation__header:before{content:"";position:absolute;left:0;right:0;bottom:0;z-index:-1;border-bottom:1px solid var(--udexColorGrey3, #D5DADD)}.udex-tab-navigation__header-tabs{display:flex;flex:1 1 0%;overflow:hidden;white-space:nowrap}.udex-tab-navigation__button-tab,.udex-tab-navigation__button-more{padding:0;display:block;background:none;border:0;border-radius:0;cursor:pointer}.udex-tab-navigation__button-tab{padding:var(--udex-button-tab-padding-vertical) var(--udex-button-tab-padding-horizontal) calc(var(--udex-button-tab-padding-vertical) + 3px);position:relative;z-index:0;display:flex;flex-direction:column;justify-content:center;align-items:center;color:var(--udex-button-tab-text-color-default);font-size:var(--udex-button-tab-font-size-default);font-family:var(--udex-button-tab-font-family);font-weight:var(--udex-button-tab-font-weight);line-height:var(--udex-button-tab-line-height);text-decoration:none;text-align:center;text-transform:var(--udex-button-tab-text-transform);white-space:normal}.udex-tab-navigation__button-text{margin:0}.udex-tab-navigation__button-text:first-letter{text-transform:var(--udex-button-tab-text-transform-first-letter)}.udex-tab-navigation__button-tab.udex-tab-navigation__button-tab--icon{justify-content:start}.udex-tab-navigation__button-tab:not(.udex-tab-navigation__button-tab--icon-tab):hover{color:var(--udex-button-tab-text-color-hover)}.udex-tab-navigation__button-text.udex-tab-navigation__button-text--icon{font-weight:var(--udex-button-tab-with-icon-font-weight)}.udex-tab-navigation__button-tab:focus-visible{outline:none}.udex-tab-navigation__button-tab[hidden]{display:none}.udex-tab-navigation__button-tab:not(:last-child){margin-inline-end:var(--udex-button-tab-vertical-gap)}.udex-tab-navigation__button-tab--with-icon{padding-block-end:calc(var(--udex-button-tab-padding-vertical) + 2px)}.udex-tab-navigation__button-tab--active{color:var(--udex-button-tab-text-color-active)}.udex-tab-navigation__button-tab--active:before{content:"";position:absolute;inset-block-end:0;inset-inline:0 0;z-index:1;height:3px;background-color:var(--udex-button-tab-border-color-active);border-radius:2px 2px 0 0}.udex-tab-navigation__button-badge{position:absolute;inset-block-start:var(--udexSpacer12);inset-inline-end:-6px;z-index:1;width:6px;height:6px;border:1px solid #fff;border-radius:50%;background-color:var(--udexColorRed7)}.udex-tab-navigation__button-more{margin-inline-start:auto;padding:var(--udex-button-more-s-padding-vertical) var(--udex-button-more-s-padding-horizontal);display:flex;align-items:center;flex:0 0 0;font-size:var(--udex-button-more-s-font-size);font-family:var(--udex-button-more-s-font-family);font-weight:var(--udex-button-more-s-font-weight);line-height:var(--udex-button-more-s-line-height);color:var(--udex-button-more-s-text-color);border:1px solid var(--udex-button-more-s-border-color);border-radius:var(--udexRadiusM, 8px);margin-inline-end:var(--udex-button-more-margin-inline-end)}:host([desktop]) .udex-tab-navigation__button-more:focus,.udex-tab-navigation__button-more:focus-visible{outline:2px solid var(--udex-button-tab-text-color-active);outline-offset:2px}.udex-tab-navigation__button-more[hidden]{display:none}.udex-tab-navigation__button-more--lg .udex-tab-navigation__button-more-icon{width:16px;height:16px}.udex-tab-navigation__button-more-icon{margin-inline-start:var(--udex-button-more-s-icon-margin-inline-start);width:14px;height:14px;color:var(--udex-button-more-s-icon-color)}.udex-tab-navigation__button-more--toggled{border-color:var(--udex-button-more-s-border-color-toggled);color:var(--udex-button-more-s-text-color-toggled)}.udex-tab-navigation__button-more--toggled .udex-tab-navigation__button-more-icon{color:var(--udex-button-more-s-icon-color-toggled)}.udex-tab-navigation__button-icon-outer{margin-left:auto;margin-right:auto;margin-bottom:var(--udex-button-tab-with-icon-margin-bottom);display:flex;align-items:center;justify-content:center;align-self:center;width:32px;height:32px;border-radius:50%;background-color:var(--udex-button-tab-with-icon-background);color:var(--udex-button-tab-with-icon-color);position:relative;z-index:0}.udex-tab-navigation__button-icon{width:16px;height:16px;color:var(--udex-button-tab-with-icon-color)}.udex-tab-navigation__button-icon-outer .udex-tab-navigation__button-badge{inset-block-start:1px;inset-inline-end:1px}.udex-tab-navigation__button-tab--active .udex-tab-navigation__button-icon-outer{background-color:var(--udex-button-tab-with-icon-background-active)}.udex-tab-navigation__button-tab--active .udex-tab-navigation__button-icon{color:var(--udex-button-tab-with-icon-color-active)}.udex-tab-navigation__button-tab.udex-tab-navigation__button-tab--icon-tab:not(.udex-tab-navigation__button-tab--active):hover .udex-tab-navigation__button-icon-outer{background-color:var(--udex-button-tab-with-icon-background-hover)}.udex-tab-navigation__button-tab.udex-tab-navigation__button-tab--icon-tab:not(.udex-tab-navigation__button-tab--active):hover .udex-tab-navigation__button-icon{color:var(--udex-button-tab-with-icon-color-hover)}.udex-tab-navigation__content{padding-block-start:var(--udex-tab-navigation-content-padding-vertical-desktop);font-family:var(--udex-tab-navigation-content-font-family);font-size:var(--udex-tab-navigation-content-font-size);font-weight:var(--udex-tab-navigation-content-font-weight);line-height:var(--udex-tab-navigation-content-line-height)}.udex-tab-navigation__content-item:focus,.udex-tab-navigation__content-item:focus-visible{outline-offset:2px;outline:2px solid var(--udex-button-tab-text-color-active);border-radius:var(--udexRadiusXXS, 2px)}.hidden{display:none}.udex-tab-navigation__badge{margin-inline-start:var(--udexSpacer4);display:inline-flex}@media screen and (max-width: 979px){.udex-tab-navigation__content{padding-block-start:var(--udex-tab-navigation-content-padding-vertical-mobile)}}
|
|
112
112
|
`};g("@ui5/webcomponents-theming","sap_horizon",async()=>y);g("@sapudex/web-components","sap_horizon",async()=>P);const S5={packageName:"@sapudex/web-components",fileName:"themes/TabInOverflow.css.ts",content:`:host{--udex-tab-overflow-button-font-size: var(--sapFontSize, var(--udexTypographyNavigationRegularXLFontSize));--udex-tab-overflow-button-font-weight: var(--udexTypographyFontWeightRegular, 400);--udex-tab-overflow-button-badge-background: var(--sapAccentColor2, var(--udexColorRed7));--udex-tab-overflow-button-font-family: var(--sapFontFamily, sans-serif);--udex-tab-overflow-button-line-height: var(--sapContent_LineHeight, var(--udexTypographyBodyLineHeight))}[ui5-popover]{margin-top:1px;box-shadow:0 2px 8px #2235484d;border:1px solid var(--udexColorGrey6)}[ui5-popover]::part(content){padding:0}.tab-navigation-popover{display:flex;flex-direction:column;min-width:150px}.udex-tab-overflow__button{padding:var(--udexSpacer8) var(--udexSpacer12);display:flex;background:none;border:0;border-radius:0;cursor:pointer;text-align:start;color:var(--udexColorGrey9);font-family:var(--udex-tab-overflow-button-font-family);font-size:var(--udex-tab-overflow-button-font-size);font-weight:var(--udex-tab-overflow-button-font-weight);line-height:var(--udex-tab-overflow-button-line-height);text-decoration:none;text-transform:capitalize}.udex-tab-overflow__button:hover{background-color:var(--udexColorGrey1)}.udex-tab-overflow__button:focus{outline:2px solid var(--udexColorBlue7, #0070F2);outline-offset:-2px}.udex-tab-overflow__button:active{background-color:var(--udexColorBlue1)}.udex-tab-overflow__button-icon{margin-inline-end:var(--udexSpacer8);position:relative;z-index:0}.udex-tab-overflow__button-badge{margin-block-start:-2px;margin-inline-start:2px;display:inline-flex;width:6px;height:6px;border:1px solid #fff;border-radius:50%;background-color:var(--udex-tab-overflow-button-badge-background)}.udex-tab-overflow__button-icon .udex-tab-overflow__button-badge{margin-block-start:0;margin-inline-start:0;position:absolute;z-index:1;inset-block-start:-4px;inset-inline-end:-6px}
|
|
113
113
|
`};var Er=globalThis&&globalThis.__decorate||function(o,e,t,i){var r=arguments.length,a=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,e,t,i);else for(var d=o.length-1;d>=0;d--)(s=o[d])&&(a=(r<3?s(a):r>3?s(e,t,a):s(e,t))||a);return r>3&&a&&Object.defineProperty(e,t,a),a},Js,Dp;(function(o){o.Small="Small",o.Medium="Medium"})(Dp||(Dp={}));var Ep;(function(o){o.Light="Light",o.Dark="Dark"})(Ep||(Ep={}));let ii=Js=class extends A{constructor(){super(),this._isExpanded=!1,this._maxTitleLength=25,this._maxTitleLengthInSecondLines=this._maxTitleLength*2,this._handleResizeBound=this._handleResize.bind(this)}static async onDefine(){Js.i18nBundle=await L("@udex/web-components")}onEnterDOM(){re.register(this.getHeader(),this._handleResizeBound),_e()&&this.setAttribute("desktop","")}onExitDOM(){re.deregister(this.getHeader(),this._handleResizeBound)}_handleResize(){this.handleClosePopover(),this._width=this.offsetWidth}emitClickEvent(e){this.fireEvent("click",{currentPage:e})}onBeforeRendering(){this.updateOverflowItems(),this.setSelectedTab()}setSelectedTab(){this.items.length&&(this.resetSelectedTabs(),this.setCurrentSelectedTab(),this.setRealTabToItems(),this.setElementInHeader())}resetSelectedTabs(){this.items.forEach(e=>{e._selected=!1})}setCurrentSelectedTab(){const e=this.items.filter(t=>t.selected);this._selectedTab=e.length?e[0]:this.items[0],this._selectedTab._selected=!!(e.length?e.length:this.items[0])}setRealTabToItems(){this.items.forEach((e,t,i)=>{e._iconWithoutBackground=this.iconWithoutBackground,e._posinset=t+1,e._setsize=i.length,e._contentId=this.getContentId(t),e._realTab=this._selectedTab,e._width=this.tabWidth})}getContentId(e){return`udex-${e+1}-content`}getContentTabIndex(e){if(e.selected){const t=["a[href]","button","textarea","input","select","details","[tabindex]:not([tabindex='-1']"],i=this.getAllCustomTags(e,"udex"),r=this.getAllCustomTags(e,"ui5").concat(i);return Array.from(e.querySelectorAll(t.join(","))).concat(r).length?"-1":"0"}return"-1"}getAllCustomTags(e,t){const i=e.querySelectorAll("*");return Array.from(i).filter(r=>r.tagName.toLowerCase().startsWith(t.toLowerCase()))}setElementInHeader(){this.items.forEach(e=>{e.getElementInHeader=()=>this.getDomRef().querySelector(`[id="${e.__id}"]`)})}onAfterRendering(){this.items.length?(this.setItemsInHeader(),this.setVisibleTabs(),this.applyTabIndex()):console.warn("You have to add the 'udex-tab' as a default slot to the udex-tab-navigation."),this.initOutsideClick()}initOutsideClick(){var e;(e=this._popover)!=null&&e.opened&&this.handleOutsideClick()}handleOutsideClick(){document.addEventListener("click",()=>{this.getMoreButton()&&this.getMoreButton().classList.remove("udex-tab-navigation__button-more--toggled")})}onTabClick(e){const t=this.getTab(e.target);if(!t)return;e.stopPropagation(),e.preventDefault();const i=this.items.findIndex(r=>r.__id===t.id);this._selectedTab=this.items[i],this.updateSelectedTab(i),this.emitClickEvent(i+1)}getTab(e){for(;e;){if(e.localName==="button"&&e.getAttribute("role")==="tab")return e;e=e.parentElement}return!1}updateSelectedTab(e){this.items.forEach((t,i)=>{t.selected=e===i,t._selected&&(t._selected=!1)}),this.setTabsIndex(e)}setItemsInHeader(){var a,s;const e=this.getTabHeader();let t=0;if(!this._selectedTab)return;const i=this.items.map(d=>d.getTabInHeaderDomRef());(a=this.getMoreButton())==null||a.setAttribute("hidden",""),this.removeHiddenAttributeInAllTabs(i),t+=this.getTotalItemsWidth(i),e.offsetWidth<t&&((s=this.getMoreButton())==null||s.removeAttribute("hidden"),this.hideLastVisibleTab(i))}getTabHeader(){return this.shadowRoot.querySelector(`#${this.__id}-header-tabs`)}removeHiddenAttributeInAllTabs(e){var t;for(let i=0;i<e.length;i++)(t=e[i])==null||t.removeAttribute("hidden")}getTotalItemsWidth(e){let t=0;return e.forEach(i=>{t+=this.getTabWidth(i)}),t}getTabWidth(e){var r;const t=(r=this.tabWidth.match(/[^a-zA-Z\d]+/g))==null?void 0:r.join("");if(this.tabWidth==="auto"||t||!this.tabWidth)return this.getItemWidth(e);const{marginInlineEnd:i}=this.getItemIndentation(e);return e.style.width=this.tabWidth,this.convertToPx(this.tabWidth,this.getButtonFontSize(e))+i}getButtonFontSize(e){const t=window.getComputedStyle(e);return parseFloat(t.fontSize)}convertToPx(e,t){var a;const i=(a=e.match(/[a-zA-Z]+/))==null?void 0:a[0],r=parseFloat(e);return i==="px"?r:r*t}getItemWidth(e){const t=e.innerText,i=this.getItemContext(),{indentation:r,marginInlineEnd:a}=this.getItemIndentation(e);if(t.length>this._maxTitleLength&&t.length<=this._maxTitleLengthInSecondLines){const d=this.getMaxWidthItemTitle(t,i,r);return this.setItemWidth(e,d,a),d}if(t.length>this._maxTitleLengthInSecondLines){const d=this.getOverloadMaxWidthItemTitle(t,i,r);return this.setItemWidth(e,d,a),d}const s=i.measureText(t).width;return Math.ceil(s)+r}setItemWidth(e,t,i){e.style.maxWidth=`${t-i}px`}getItemContext(){const t=document.createElement("canvas").getContext("2d");return t.font="700 16px '72 Brand Variable'",t}getItemIndentation(e){const t=window.getComputedStyle(e),i=Number.parseInt(t.paddingInlineStart),r=Number.parseInt(t.paddingInlineEnd),a=Number.parseInt(t.marginInlineEnd);return{indentation:i+r+a,marginInlineEnd:a}}getMaxWidthItemTitle(e,t,i){const r=e.slice(0,this._maxTitleLength);return this.getItemTitleWidth(r,t,e,i)}getOverloadMaxWidthItemTitle(e,t,i){const r=e.slice(0,Math.ceil(e.length/2));return this.getItemTitleWidth(r,t,e,i)}getItemTitleWidth(e,t,i,r){const a=e.lastIndexOf(" "),s=e.slice(0,a),d=Math.ceil(t.measureText(s).width),h=i.slice(a,i.length),p=Math.ceil(t.measureText(h).width);return d>p?d+r:p+r}hideLastVisibleTab(e){const i=this.getRootTab(this._selectedTab).getTabInHeaderDomRef(),r=this.getTabHeader().offsetWidth,a=this.getSelectedItemWidth(e,i),s=this.findLastVisibleItem(e,r,a);this.hideInappropriateTabs(s,e)}getRootTab(e){for(;e.hasAttribute("udex-tab")&&!e.parentElement.hasAttribute("udex-tab-navigation");)e=e.parentElement;return e}getSelectedItemWidth(e,t){const i=e.indexOf(t),r=this.getTabWidth(t);return e.splice(i,1),r}findLastVisibleItem(e,t,i,r=0){let a=r-1,s=r;for(;s<e.length;s++){const d=this.getTabWidth(e[s]);if(t<i+d)break;i+=d,a=s}return a}hideInappropriateTabs(e,t){for(let i=e+1;i<t.length;i++)t[i].setAttribute("hidden","")}setVisibleTabs(){this._visibleTabs=this.items.map(e=>e.getTabInHeaderDomRef()).filter(e=>!e.hasAttribute("hidden")),this.getMoreButton().hasAttribute("hidden")||this._visibleTabs.push(this.getMoreButton())}applyTabIndex(){if(!this.shadowRoot.contains(document.activeElement)){const e=this.getRootTab(this._selectedTab),t=this.items.indexOf(e);this.setTabsIndex(t)}}setTabsIndex(e){this.items.forEach((t,i)=>{t._tabIndex=i===e?"0":"-1"})}handleOverflowItemClick(e){e.target.localName==="button"&&(e.preventDefault(),this.onItemSelect(e.target.id)),this.handleClosePopover()}onItemSelect(e){const[t]=this.items.filter(r=>r.__id===e);let i=0;this._selectedTab=t,this.items.forEach((r,a)=>{r.selected=r.__id===e,r.__id===e&&(i=a)}),this.setVisibleTabs(),this.setTabsIndex(i),this.emitClickEvent(i+1)}getMoreButton(){return this.shadowRoot.querySelector(".udex-tab-navigation__button-more")}getHeader(){return this.shadowRoot.querySelector(`#${this.__id}-header`)}handleMoreButton(e){e.stopPropagation(),this._popover=this.getResponsePopover(),this.updateOverflowItems(),this.handleTogglePopover()}updateOverflowItems(){this._overflowItems=this.items.filter(e=>{const t=e.getTabInHeaderDomRef();return t&&t.hasAttribute("hidden")})}handleTogglePopover(){var e;(e=this._popover)!=null&&e.opened?this.handleClosePopover():this.handleOpenPopover()}handleClosePopover(){var e;(e=this._popover)!=null&&e.opened&&(this._popover.close(),this.getMoreButton().classList.remove("udex-tab-navigation__button-more--toggled"),this._isExpanded=!1)}handleOpenPopover(){var e;(e=this._popover)!=null&&e.opened||(this._popover.showAt(this.getMoreButton()),this.getMoreButton().classList.add("udex-tab-navigation__button-more--toggled"),this._isExpanded=!0)}handleKeyDown(e){this.handleRightArrow(e),this.handleLeftArrow(e),this.handleHomeKey(e),this.handleEndKey(e)}handleRightArrow(e){we(e)&&(e.preventDefault(),e.stopPropagation(),this.onFocusRightItem(e.target))}onFocusRightItem(e){const t=this.getTabIndexById(e.id),i=this._visibleTabs.length,r=t+1<i?t+1:0;this._visibleTabs[r].focus()}getTabIndexById(e){return this._visibleTabs.findIndex(t=>t.id===e)}handleLeftArrow(e){$e(e)&&(e.preventDefault(),e.stopPropagation(),this.onFocusLeftItem(e.target))}onFocusLeftItem(e){const t=this.getTabIndexById(e.id),i=this._visibleTabs.length-1,r=t-1<0?i:t-1;this._visibleTabs[r].focus()}handleHomeKey(e){gt(e)&&(e.preventDefault(),this._visibleTabs[0].focus())}handleEndKey(e){mo(e)&&(e.preventDefault(),this.onEndKey())}onEndKey(){if(!this.getMoreButton().hasAttribute("hidden"))this.getMoreButton().focus();else{const e=this._visibleTabs.length-1;this._visibleTabs[e].focus()}}handleFocusMoreButton(e){this.handleDownMoreButton(e),this.handleHomeKeyMoreButton(e),this.handleEnterKeyMoreButton(e)}handleHomeKeyMoreButton(e){gt(e)&&(e.preventDefault(),e.stopPropagation(),this._visibleTabs[0].focus())}handleEnterKeyMoreButton(e){K(e)&&(e.preventDefault(),this._popover=this.getResponsePopover(),this.updateOverflowItems(),this.handleOpenPopover())}handleDownMoreButton(e){(Ie(e)||K(e))&&(this._popover=this.getResponsePopover(),this.handleOpenPopover(),this.updateOverflowItems())}onFocusFirstItemPopover(){var e;if((e=this._popover)!=null&&e.opened){const i=this.getItemsFromPopover()[0];i.setAttribute("tabindex","0"),i.focus()}}handleFocusPopover(e){e.stopPropagation(),this.handleUp(e),this.handleDown(e),this.handleEnterOrSpace(e),this.handleEscape(e),this.handleHome(e),this.handleEnd(e),this.handleTab(e)}handleTab(e){(Bt(e)||nt(e))&&this.handleClosePopover()}handleUp(e){Ae(e)&&this.onPreviousItemInPopover(e.target)}onPreviousItemInPopover(e){const t=this.getItemsFromPopover(),i=this.getPopoverTabIndexById(t,e.id),r=i-1<0?t.length-1:i-1,a=t[r];this.resetTabIndexItem(t[i]),a.setAttribute("tabIndex","0"),a.focus()}onNextItemInPopover(e){const t=this.getItemsFromPopover(),i=this.getPopoverTabIndexById(t,e.id),r=i+1>t.length-1?0:i+1,a=t[r];this.resetTabIndexItem(t[i]),a.setAttribute("tabIndex","0"),a.focus()}resetTabIndexItem(e){e.setAttribute("tabIndex","-1")}getItemsFromPopover(){const e=this.getResponsePopover(),[t]=e.content;return Array.from(t.children)}getPopoverTabIndexById(e,t){return e.findIndex(i=>i.id===t)}handleDown(e){Ie(e)&&this.onNextItemInPopover(e.target)}handleEnterOrSpace(e){(K(e)||M(e))&&(e.preventDefault(),this.onItemSelect(e.target.id),this.handleClosePopover())}handleEscape(e){He(e)&&(e.preventDefault(),this.handleClosePopover(),this._visibleTabs[this._visibleTabs.length-1].focus())}handleHome(e){gt(e)&&(e.preventDefault(),this.getItemsFromPopover()[0].focus())}handleEnd(e){if(mo(e)){e.preventDefault(),e.stopPropagation();const t=this.getItemsFromPopover();t[t.length-1].focus()}}getResponsePopover(){return this.shadowRoot.querySelector("[ui5-popover]")}get moreButtonText(){return Js.i18nBundle.getText(C1)}static registerStaticAreaTabStyles(e){}static get tabNavigationPopoverTemplate(){return bR}get tabNavigationPopover(){return wr(Js.tabNavigationPopoverTemplate,this)}};Er([c({type:Dp,defaultValue:"Small"})],ii.prototype,"sizeMoreButton",void 0);Er([c({type:Ep,defaultValue:"Light"})],ii.prototype,"mode",void 0);Er([c({type:Boolean})],ii.prototype,"iconWithoutBackground",void 0);Er([c({type:String,defaultValue:"auto"})],ii.prototype,"tabWidth",void 0);Er([c({type:Object})],ii.prototype,"_selectedTab",void 0);Er([c({validator:V,noAttribute:!0})],ii.prototype,"_width",void 0);Er([c({type:Object,multiple:!0})],ii.prototype,"_overflowItems",void 0);Er([I({type:HTMLElement,default:!0,individualSlots:!0,invalidateOnChildChange:!0})],ii.prototype,"items",void 0);ii=Js=Er([x({tag:"udex-tab-navigation",renderer:w,styles:[fR,S5],template:vR,dependencies:[Yi,W]}),f("click",{detail:{currentPage:{type:Number}}})],ii);ii.define();const xR=ii;function yR(o,e,t){return l`<slot></slot>`}function wR(o,e,t){return l`${this.hasNotHref?kR.call(this,o,e,t):CR.call(this,o,e,t)} `}function kR(o,e,t){return l`<button id="${n(this._id)}" class="udex-tab-navigation__button-tab ${n(this.selectedClass)}${n(this.classWithIconWithoutBackground)}${n(this.buttonClassWithIcon)}" tabindex="${n(this._tabIndex)}" type="button" role="tab" aria-describedby="udex-tab-navigation__${n(this._id)}__accessible-name" aria-posinset="${n(this._posinset)}" aria-setsize="${n(this._setsize)}" aria-controls="${n(this._contentId)}" aria-selected="${n(this.effectiveSelected)}" aria-labelledby="${n(this.ariaLabelledBy)}" ._realTab="${n(this)}" style="width: ${n(this._width)};">${this.hasIcon?$R.call(this,o,e,t):void 0}<p class="udex-tab-navigation__button-text ${n(this.classWithIcon)}">${n(this.text)}${this.numberBadge?SR.call(this,o,e,t):void 0}</p>${this.hasNotIcon?TR.call(this,o,e,t):void 0}<span aria-hidden="true" class="hidden" id="udex-tab-navigation__${n(this._id)}__accessible-name">${n(this.accessibleNameText)}</span></button>`}function $R(o,e,t){return t?l`<span class="udex-tab-navigation__button-icon-outer" role="presentation" aria-hidden="true"><${u("ui5-icon",e,t)} class="udex-tab-navigation__button-icon" name="${n(this.icon)}"></${u("ui5-icon",e,t)}>${this.showAttentionBadge?fm.call(this,o,e,t):void 0}</span>`:l`<span class="udex-tab-navigation__button-icon-outer" role="presentation" aria-hidden="true"><ui5-icon class="udex-tab-navigation__button-icon" name="${n(this.icon)}"></ui5-icon>${this.showAttentionBadge?fm.call(this,o,e,t):void 0}</span>`}function fm(o,e,t){return l`<span class="udex-tab-navigation__button-badge"></span>`}function SR(o,e,t){return t?l`<${u("udex-badge",e,t)} class="udex-tab-navigation__badge" type="Number" number-design="Blue" size="Large">${n(this.numberBadge)}</${u("udex-badge",e,t)}>`:l`<udex-badge class="udex-tab-navigation__badge" type="Number" number-design="Blue" size="Large">${n(this.numberBadge)}</udex-badge>`}function TR(o,e,t){return l`<span class="udex-tab-navigation__button-badge"></span>`}function CR(o,e,t){return l`<a id="${n(this._id)}" class="udex-tab-navigation__button-tab ${n(this.selectedClass)}${n(this.classWithIconWithoutBackground)}${n(this.buttonClassWithIcon)}" tabindex="${n(this.linkTabIndex)}" role="tab" aria-posinset="${n(this._posinset)}" aria-setsize="${n(this._setsize)}" href="${n(this.href)}" target="${n(this.target)}" style="max-width: ${n(this._maxWidth)}px; width: ${n(this._width)};" ._realTab="${n(this)}">${this.hasIcon?IR.call(this,o,e,t):void 0}<p class="udex-tab-navigation__button-text ${n(this.classWithIcon)}">${n(this.text)}${this.numberBadge?BR.call(this,o,e,t):void 0}</p>${this.hasNotIcon?AR.call(this,o,e,t):void 0}<span aria-hidden="true" class="hidden" id="udex-tab-navigation__${n(this._id)}__accessible-name">${n(this.accessibleNameText)}</span></a>`}function IR(o,e,t){return t?l`<span class="udex-tab-navigation__button-icon-outer" role="presentation" aria-hidden="true"><${u("ui5-icon",e,t)} class="udex-tab-navigation__button-icon" name="${n(this.icon)}"></${u("ui5-icon",e,t)}>${this.showAttentionBadge?xm.call(this,o,e,t):void 0}</span>`:l`<span class="udex-tab-navigation__button-icon-outer" role="presentation" aria-hidden="true"><ui5-icon class="udex-tab-navigation__button-icon" name="${n(this.icon)}"></ui5-icon>${this.showAttentionBadge?xm.call(this,o,e,t):void 0}</span>`}function xm(o,e,t){return l`<span class="udex-tab-navigation__button-badge"></span>`}function BR(o,e,t){return t?l`<${u("udex-badge",e,t)} class="udex-tab-navigation__badge" type="Number" number-design="Blue" size="Large">${n(this.numberBadge)}</${u("udex-badge",e,t)}>`:l`<udex-badge class="udex-tab-navigation__badge" type="Number" number-design="Blue" size="Large">${n(this.numberBadge)}</udex-badge>`}function AR(o,e,t){return l`<span class="udex-tab-navigation__button-badge"></span>`}function DR(o,e,t){return l`${this.hasNotHref?ER.call(this,o,e,t):RR.call(this,o,e,t)} `}function ER(o,e,t){return l`<button id="${n(this._id)}" class="udex-tab-overflow__button" role="tab" aria-selected="${n(this.effectiveSelected)}" tabindex="${n(this._tabIndex)}">${this.hasIcon?PR.call(this,o,e,t):void 0}${n(this.text)}${this.hasNotIcon?NR.call(this,o,e,t):void 0}</button>`}function PR(o,e,t){return t?l`<span class="udex-tab-overflow__button-icon" role="presentation" aria-hidden="true"><${u("ui5-icon",e,t)} name="${n(this.icon)}"></${u("ui5-icon",e,t)}>${this.showAttentionBadge?ym.call(this,o,e,t):void 0}</span>`:l`<span class="udex-tab-overflow__button-icon" role="presentation" aria-hidden="true"><ui5-icon name="${n(this.icon)}"></ui5-icon>${this.showAttentionBadge?ym.call(this,o,e,t):void 0}</span>`}function ym(o,e,t){return l`<span class="udex-tab-overflow__button-badge"></span>`}function NR(o,e,t){return l`<span class="udex-tab-overflow__button-badge" role="presentation" aria-hidden="true"></span>`}function RR(o,e,t){return l`<a id="${n(this._id)}" href="${n(this.href)}" target="${n(this.target)}" class="udex-tab-overflow__button" role="tab" aria-selected="${n(this.effectiveSelected)}" tabindex="${n(this._tabIndex)}">${this.hasIcon?jR.call(this,o,e,t):void 0}${n(this.text)}${this.hasNotIcon?zR.call(this,o,e,t):void 0}</a>`}function jR(o,e,t){return t?l`<span class="udex-tab-overflow__button-icon" role="presentation" aria-hidden="true"><${u("ui5-icon",e,t)} name="${n(this.icon)}"></${u("ui5-icon",e,t)}>${this.showAttentionBadge?wm.call(this,o,e,t):void 0}</span>`:l`<span class="udex-tab-overflow__button-icon" role="presentation" aria-hidden="true"><ui5-icon name="${n(this.icon)}"></ui5-icon>${this.showAttentionBadge?wm.call(this,o,e,t):void 0}</span>`}function wm(o,e,t){return l`<span class="udex-tab-overflow__button-badge"></span>`}function zR(o,e,t){return l`<span class="udex-tab-overflow__button-badge" role="presentation" aria-hidden="true"></span>`}var To=globalThis&&globalThis.__decorate||function(o,e,t,i){var r=arguments.length,a=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,e,t,i);else for(var d=o.length-1;d>=0;d--)(s=o[d])&&(a=(r<3?s(a):r>3?s(e,t,a):s(e,t))||a);return r>3&&a&&Object.defineProperty(e,t,a),a},Ln,Xc;(function(o){o._blank="_blank",o._parent="_parent",o._self="_self",o._top="_top"})(Xc||(Xc={}));let Vt=Ln=class extends A{getTabInHeaderDomRef(){return this.getElementInHeader?this.getElementInHeader():null}static async onDefine(){Ln.i18nBundle=await L("@udex/web-components")}get isOnSelectedTab(){return this._realTab===this}get _effectiveSlotName(){return this.isOnSelectedTab?this._individualSlot:`disabled-${this._individualSlot}`}get hasIcon(){return!!this.icon}get classWithIcon(){return this.hasIcon?"udex-tab-navigation__button-text--icon":""}get buttonClassWithIcon(){return this.hasIcon?" udex-tab-navigation__button-tab--icon":""}get hasNotIcon(){return!this.icon&&this.showAttentionBadge}get hasNotHref(){return!this.href}get effectiveSelected(){return this.selected||this._selected}get selectedClass(){return this.effectiveSelected?"udex-tab-navigation__button-tab--active":""}get classWithIconWithoutBackground(){return this.hasIcon&&!this._iconWithoutBackground?" udex-tab-navigation__button-tab--icon-tab":""}get _slotName(){return this.isOnSelectedTab?this._individualSlot:`disabled-${this._individualSlot}`}get ariaLabelledBy(){const e=[];return this.text&&e.push(`${this.__id}-text`),this.icon&&e.push(`${this.__id}-icon`),e.join(" ")}get accessibleNameText(){return this.accessibleName||(this.showAttentionBadge?`, ${Ln.i18nBundle.getText(I1)}`:"")}get linkTabIndex(){return this.href&&this.effectiveSelected?"1":"-1"}get tabNavigation(){return wr(Ln.headerTemplate,this)}get tabInOverflow(){return wr(Ln.overflowTemplate,this)}static get headerTemplate(){return wR}static get overflowTemplate(){return DR}};To([c({type:String})],Vt.prototype,"numberBadge",void 0);To([c({type:String})],Vt.prototype,"text",void 0);To([c({type:String})],Vt.prototype,"accessibleName",void 0);To([c({type:Boolean})],Vt.prototype,"selected",void 0);To([c({type:Boolean})],Vt.prototype,"showAttentionBadge",void 0);To([c({type:String})],Vt.prototype,"icon",void 0);To([c({type:String})],Vt.prototype,"href",void 0);To([c({type:Xc,defaultValue:Xc._self})],Vt.prototype,"target",void 0);To([c({type:Object})],Vt.prototype,"_realTab",void 0);To([c({type:Boolean})],Vt.prototype,"_selected",void 0);To([c({type:String})],Vt.prototype,"_tabIndex",void 0);To([c({type:Boolean})],Vt.prototype,"_iconWithoutBackground",void 0);To([I({type:Node,default:!0})],Vt.prototype,"content",void 0);Vt=Ln=To([x({tag:"udex-tab",renderer:w,template:yR,dependencies:[Tu]})],Vt);Vt.define();xR.registerStaticAreaTabStyles(S5);var Pp;(function(o){o.Auto="Auto",o.Vertical="Vertical",o.Horizontal="Horizontal",o.Paging="Paging"})(Pp||(Pp={}));const bi=Pp;var Np;(function(o){o.Static="Static",o.Cyclic="Cyclic"})(Np||(Np={}));const On=Np;class Ki{constructor(e,t){if(!e.isUI5Element)throw new Error("The root web component must be a UI5 Element instance");if(this.rootWebComponent=e,this.rootWebComponent.addEventListener("keydown",this._onkeydown.bind(this)),this._initBound=this._init.bind(this),this.rootWebComponent.attachComponentStateFinalized(this._initBound),typeof t.getItemsCallback!="function")throw new Error("getItemsCallback is required");this._getItems=t.getItemsCallback,this._currentIndex=t.currentIndex||0,this._rowSize=t.rowSize||1,this._behavior=t.behavior||On.Static,this._navigationMode=t.navigationMode||bi.Auto,this._affectedPropertiesNames=t.affectedPropertiesNames||[],this._skipItemsSize=t.skipItemsSize||null}setCurrentItem(e){const t=this._getItems().indexOf(e);if(t===-1){console.warn("The provided item is not managed by ItemNavigation",e);return}this._currentIndex=t,this._applyTabIndex()}setRowSize(e){this._rowSize=e}_init(){this._getItems().forEach((e,t)=>{e.forcedTabIndex=t===this._currentIndex?"0":"-1"})}_onkeydown(e){if(!this._canNavigate())return;const t=this._navigationMode===bi.Horizontal||this._navigationMode===bi.Auto,i=this._navigationMode===bi.Vertical||this._navigationMode===bi.Auto,r=this.rootWebComponent.effectiveDir==="rtl";if(r&&$e(e)&&t)this._handleRight();else if(r&&we(e)&&t)this._handleLeft();else if($e(e)&&t)this._handleLeft();else if(we(e)&&t)this._handleRight();else if(Ae(e)&&i)this._handleUp();else if(Ie(e)&&i)this._handleDown();else if(gt(e))this._handleHome();else if(mo(e))this._handleEnd();else if(Yr(e))this._handlePageUp();else if(Jn(e))this._handlePageDown();else return;e.preventDefault(),this._applyTabIndex(),this._focusCurrentItem()}_handleUp(){const e=this._getItems().length;if(this._currentIndex-this._rowSize>=0){this._currentIndex-=this._rowSize;return}if(this._behavior===On.Cyclic){const t=this._currentIndex%this._rowSize,i=t===0?this._rowSize-1:t-1,r=Math.ceil(e/this._rowSize);let a=i+(r-1)*this._rowSize;a>e-1&&(a-=this._rowSize),this._currentIndex=a}else this._currentIndex=0}_handleDown(){const e=this._getItems().length;if(this._currentIndex+this._rowSize<e){this._currentIndex+=this._rowSize;return}if(this._behavior===On.Cyclic){const i=(this._currentIndex%this._rowSize+1)%this._rowSize;this._currentIndex=i}else this._currentIndex=e-1}_handleLeft(){const e=this._getItems().length;if(this._currentIndex>0){this._currentIndex-=1;return}this._behavior===On.Cyclic&&(this._currentIndex=e-1)}_handleRight(){const e=this._getItems().length;if(this._currentIndex<e-1){this._currentIndex+=1;return}this._behavior===On.Cyclic&&(this._currentIndex=0)}_handleHome(){const e=this._rowSize>1?this._rowSize:this._getItems().length;this._currentIndex-=this._currentIndex%e}_handleEnd(){const e=this._rowSize>1?this._rowSize:this._getItems().length;this._currentIndex+=e-1-this._currentIndex%e}_handlePageUp(){this._rowSize>1||this._handlePageUpFlat()}_handlePageDown(){this._rowSize>1||this._handlePageDownFlat()}_handlePageUpFlat(){if(this._skipItemsSize===null){this._currentIndex-=this._currentIndex;return}this._currentIndex+1>this._skipItemsSize?this._currentIndex-=this._skipItemsSize:this._currentIndex-=this._currentIndex}_handlePageDownFlat(){if(this._skipItemsSize===null){this._currentIndex=this._getItems().length-1;return}this._getItems().length-this._currentIndex-1>this._skipItemsSize?this._currentIndex+=this._skipItemsSize:this._currentIndex=this._getItems().length-1}_applyTabIndex(){const e=this._getItems();for(let t=0;t<e.length;t++)e[t].forcedTabIndex=t===this._currentIndex?"0":"-1";this._affectedPropertiesNames.forEach(t=>{const i=this.rootWebComponent[t];this.rootWebComponent[t]=Array.isArray(i)?[...i]:{...i}})}_focusCurrentItem(){const e=this._getCurrentItem();e&&e.focus()}_canNavigate(){const e=this._getCurrentItem(),t=_l();return e&&e===t}_getCurrentItem(){const e=this._getItems();if(!e.length)return;for(;this._currentIndex>=e.length;)this._currentIndex-=this._rowSize;this._currentIndex<0&&(this._currentIndex=0);const t=e[this._currentIndex];if(!t)return;if(Zn(t))return t.getFocusDomRef();const i=this.rootWebComponent.getDomRef();if(i&&t.id)return i.querySelector(`[id="${t.id}"]`)}}var Rp;(function(o){o.Group="Group",o.Individual="Individual"})(Rp||(Rp={}));const Ne=Rp;g("@ui5/webcomponents-theming","sap_horizon",async()=>y);g("@ui5/webcomponents","sap_horizon",async()=>J);const T5={packageName:"@ui5/webcomponents",fileName:"themes/AvatarGroup.css.ts",content:`:host{-webkit-tap-highlight-color:rgba(0,0,0,0)}:host(:not([hidden])){display:block;width:100%}:host{--_ui5-v1-24-20_button_focused_border: var(--_ui5-v1-24-20_avatar_group_button_focus_border)}.ui5-avatar-group-items:focus{outline:none}:host([type="Group"]) .ui5-avatar-group-items:focus{outline:var(--_ui5-v1-24-20_avatar_outline);outline-offset:var(--_ui5-v1-24-20_avatar_focus_offset);border-radius:var(--_ui5-v1-24-20_avatar_group_focus_border_radius)}.ui5-avatar-group-root{display:flex}.ui5-avatar-group-items{white-space:nowrap;position:relative;display:inline-flex}:host([type="Group"]) .ui5-avatar-group-items{cursor:pointer}:host([type="Group"]) ::slotted([ui5-button]),:host([type="Group"]) ::slotted([ui5-avatar]){pointer-events:none}::slotted([ui5-button]:not([hidden])),.ui5-avatar-group-overflow-btn:not([hidden]){--_ui5-v1-24-20_button_base_padding: 0;border-radius:50%;display:inline-flex;text-overflow:initial;z-index:0}::slotted([ui5-button][focused]),.ui5-avatar-group-overflow-btn[focused]{outline:var(--_ui5-v1-24-20_avatar_outline);outline-offset:var(--_ui5-v1-24-20_avatar_focus_offset)}.ui5-avatar-group-overflow-btn.ui5-avatar-group-overflow-btn-xs{height:2rem;width:2rem;min-width:2rem;font-size:.75rem}::slotted([ui5-button]),.ui5-avatar-group-overflow-btn.ui5-avatar-group-overflow-btn-s{height:3rem;width:3rem;min-width:3rem;font-size:1.125rem}.ui5-avatar-group-overflow-btn.ui5-avatar-group-overflow-btn-m{height:4rem;width:4rem;min-width:4rem;font-size:1.625rem}.ui5-avatar-group-overflow-btn.ui5-avatar-group-overflow-btn-l{height:5rem;width:5rem;min-width:5rem;font-size:2rem}.ui5-avatar-group-overflow-btn.ui5-avatar-group-overflow-btn-xl{height:7rem;width:7rem;min-width:7rem;font-size:2.75rem}
|
|
114
114
|
`};function LR(o,e,t){return l`<div class="ui5-avatar-group-root"><div class="ui5-avatar-group-items" @keyup="${this._onkeyup}" @keydown="${this._onkeydown}" @focusin="${this._onfocusin}" tabindex="${n(this._groupTabIndex)}" @click="${this._onClick}" @ui5-click="${n(this._onUI5Click)}" aria-label="${n(this._ariaLabelText)}" role="${n(this._role)}" aria-haspopup="${n(this._containerAriaHasPopup)}"><slot></slot>${this._customOverflowButton?OR.call(this,o,e,t):MR.call(this,o,e,t)}</div></div>`}function OR(o,e,t){return l`<slot name="overflowButton"></slot>`}function MR(o,e,t){return t?l`<${u("ui5-button",e,t)} .accessibilityAttributes="${n(this._overflowButtonAccAttributes)}" aria-label="${n(this._overflowButtonAriaLabelText)}" ?hidden="${this._overflowBtnHidden}" ?non-interactive=${this._isGroup} class="${X(this.classes.overflowButton)}">${n(this._overflowButtonText)}</${u("ui5-button",e,t)}>`:l`<ui5-button .accessibilityAttributes="${n(this._overflowButtonAccAttributes)}" aria-label="${n(this._overflowButtonAriaLabelText)}" ?hidden="${this._overflowBtnHidden}" ?non-interactive=${this._isGroup} class="${X(this.classes.overflowButton)}">${n(this._overflowButtonText)}</ui5-button>`}var Cs=globalThis&&globalThis.__decorate||function(o,e,t,i){var r=arguments.length,a=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,e,t,i);else for(var d=o.length-1;d>=0;d--)(s=o[d])&&(a=(r<3?s(a):r>3?s(e,t,a):s(e,t))||a);return r>3&&a&&Object.defineProperty(e,t,a),a},Fr;const C5="ui5-avatar-group-overflow-btn",XR=`.${C5}`,FR={[vo.XS]:{[Ne.Individual]:"0.0625rem",[Ne.Group]:"-0.75rem"},[vo.S]:{[Ne.Individual]:"0.125rem",[Ne.Group]:"-1.25rem"},[vo.M]:{[Ne.Individual]:"0.125rem",[Ne.Group]:"-1.625rem"},[vo.L]:{[Ne.Individual]:"0.125rem",[Ne.Group]:" -2rem"},[vo.XL]:{[Ne.Individual]:"0.25rem",[Ne.Group]:"-2.75rem"}};let Sr=Fr=class extends A{constructor(){super(),this._itemNavigation=new Ki(this,{getItemsCallback:()=>this._isGroup?[]:this.items.slice(0,this._hiddenStartIndex)}),this._colorIndex=0,this._hiddenItems=0,this._onResizeHandler=this._onResize.bind(this)}static async onDefine(){Fr.i18nBundle=await L("@ui5/webcomponents")}get hiddenItems(){return this.items.slice(this._hiddenStartIndex)}get colorScheme(){return this.items.map(e=>e.еffectiveBackgroundColor)}get _customOverflowButton(){return this.overflowButton.length?this.overflowButton[0]:void 0}get _ariaLabelText(){const e=this.hiddenItems.length,t=this._isGroup?QT:ZT;let i=Fr.i18nBundle.getText(t);return i+=` ${Fr.i18nBundle.getText(KT,this._itemsCount-e,e)}`,this._isGroup?i+=` ${Fr.i18nBundle.getText(Tg)}`:i+=` ${Fr.i18nBundle.getText(JT)}`,i}get _overflowButtonAriaLabelText(){return this._isGroup?void 0:Fr.i18nBundle.getText(Tg)}get _containerAriaHasPopup(){return this._isGroup?this._getAriaHasPopup():void 0}get _overflowButtonAccAttributes(){return{hasPopup:this._isGroup?void 0:this._getAriaHasPopup()}}get _role(){return this._isGroup?"button":"group"}get _hiddenStartIndex(){return this._itemsCount-this._hiddenItems}get _overflowBtnHidden(){return this._hiddenItems===0}get _isGroup(){return this.type===Ne.Group}get _itemsCount(){return this.items.length}get _groupTabIndex(){return this._isGroup?"0":"-1"}get _overflowButton(){return this.shadowRoot.querySelector(XR)}get _overflowButtonEffectiveWidth(){const e=this._customOverflowButton?this._customOverflowButton:this._overflowButton;if(!e)return 0;if(this._isGroup){let t=this.items[1];const i=t.offsetLeft-this.offsetLeft;return(!t||t.hidden)&&(t=e),this.effectiveDir==="rtl"?this._getWidthToItem(t):i}return e.offsetWidth}get firstAvatarSize(){return this.items[0].size}get classes(){return{overflowButton:{"ui5-avatar-group-overflow-btn":!0,"ui5-avatar-group-overflow-btn-xs":this.firstAvatarSize===vo.XS,"ui5-avatar-group-overflow-btn-s":this.firstAvatarSize===vo.S,"ui5-avatar-group-overflow-btn-m":this.firstAvatarSize===vo.M,"ui5-avatar-group-overflow-btn-l":this.firstAvatarSize===vo.L,"ui5-avatar-group-overflow-btn-xl":this.firstAvatarSize===vo.XL}}}onAfterRendering(){this._overflowItems()}onBeforeRendering(){this._customOverflowButton&&(this._customOverflowButton.nonInteractive=this._isGroup),this._prepareAvatars()}onEnterDOM(){re.register(this,this._onResizeHandler)}onExitDOM(){re.deregister(this,this._onResizeHandler)}_onResize(){this._overflowItems()}_onkeydown(e){this._isGroup&&(K(e)?this._fireGroupEvent(e.target):M(e)&&e.preventDefault())}_onkeyup(e){!e.shiftKey&&M(e)&&this._isGroup&&(this._fireGroupEvent(e.target),e.preventDefault())}_fireGroupEvent(e){const t=e.classList.contains(C5)||e===this._customOverflowButton;this.fireEvent("click",{targetRef:e,overflowButtonClicked:t})}_onClick(e){const t=e.target,i=t.hasAttribute("ui5-button");e.stopPropagation(),(this._isGroup||i)&&this._fireGroupEvent(t)}_onUI5Click(e){const t=e.target,i=t.hasAttribute("ui5-avatar");e.stopPropagation(),i&&this._fireGroupEvent(t)}_prepareAvatars(){this._colorIndex=0,this.items.forEach((e,t)=>{const i=this._getNextBackgroundColor();e.interactive=!this._isGroup,e.getAttribute("_color-scheme")||e.setAttribute("_color-scheme",Ed[`Accent${i}`]),(t!==this._itemsCount-1||this._customOverflowButton)&&(e.style.marginInlineEnd=FR[e.effectiveSize][this.type])})}_onfocusin(e){this._itemNavigation.setCurrentItem(e.target)}_getWidthToItem(e){const t=this.effectiveDir==="rtl",i=e.offsetLeft-this.offsetLeft;if(t){const r=e.offsetParent;return r?r.offsetWidth-e.offsetLeft-e.offsetWidth:0}return i}_overflowItems(){if(this.items.length<2)return;let e=0;for(let t=0;t<this._itemsCount;t++){const i=this.items[t];i.hidden=!1;let r=this._getWidthToItem(i)+i.offsetWidth;if((t!==this._itemsCount-1||this._customOverflowButton)&&(r+=this._overflowButtonEffectiveWidth),r>this.offsetWidth){e=this._itemsCount-t;break}}this._setHiddenItems(e)}_getNextBackgroundColor(){return++this._colorIndex>10&&(this._colorIndex=1),this._colorIndex}_setHiddenItems(e){const t=this._hiddenItems!==e;this._hiddenItems=e,this.items.forEach((i,r)=>{i.hidden=r>=this._hiddenStartIndex}),this._overflowButtonText=`+${e>99?99:e}`,t&&this.fireEvent("overflow")}_getAriaHasPopup(){if(this.ariaHaspopup!=="")return this.ariaHaspopup}};Cs([c({type:Ne,defaultValue:Ne.Group})],Sr.prototype,"type",void 0);Cs([c()],Sr.prototype,"ariaHaspopup",void 0);Cs([c({noAttribute:!0})],Sr.prototype,"_overflowButtonText",void 0);Cs([I({type:HTMLElement,default:!0})],Sr.prototype,"items",void 0);Cs([I()],Sr.prototype,"overflowButton",void 0);Sr=Fr=Cs([x({tag:"ui5-avatar-group",renderer:w,template:LR,styles:T5,dependencies:[Wt]}),f("click",{detail:{targetRef:{type:HTMLElement},overflowButtonClicked:{type:Boolean}}}),f("overflow")],Sr);Sr.define();const HR=Sr;var UR=globalThis&&globalThis.__decorate||function(o,e,t,i){var r=arguments.length,a=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,e,t,i);else for(var d=o.length-1;d>=0;d--)(s=o[d])&&(a=(r<3?s(a):r>3?s(e,t,a):s(e,t))||a);return r>3&&a&&Object.defineProperty(e,t,a),a};const VR={[mi.XS]:{[Ne.Individual]:"0.0625rem",[Ne.Group]:"-0.75rem"},[mi.S]:{[Ne.Individual]:"0.125rem",[Ne.Group]:"-1.25rem"},[mi.M]:{[Ne.Individual]:"0.125rem",[Ne.Group]:"-1.625rem"},[mi.L]:{[Ne.Individual]:"0.125rem",[Ne.Group]:"-2rem"},[mi.XL]:{[Ne.Individual]:"0.25rem",[Ne.Group]:"-2.75rem"}};let jp=class extends HR{constructor(){super(),this._itemNavigation=new Ki(this,{getItemsCallback:()=>this._isGroup?[]:this.items.slice(0,this._hiddenStartIndex).map(e=>{var t;return(t=e.shadowRoot)==null?void 0:t.firstElementChild})})}onEnterDOM(){var t;super.onEnterDOM();const e=(t=this.shadowRoot)==null?void 0:t.querySelector(".ui5-avatar-group-items");e==null||e.addEventListener("mouseenter",this._onHover.bind(this,!0)),e==null||e.addEventListener("mouseleave",this._onHover.bind(this,!1))}onExitDOM(){var t;super.onExitDOM();const e=(t=this.shadowRoot)==null?void 0:t.querySelector(".ui5-avatar-group-items");e==null||e.removeEventListener("mouseenter",this._onHover.bind(this,!0)),e==null||e.removeEventListener("mouseleave",this._onHover.bind(this,!1))}_onHover(e){this._isGroup&&this.items.every(t=>(t.toggleAttribute("hover",e),!t.hidden))}_onfocusin(e){var i;const t=this._isGroup?e.currentTarget:(i=e.target.shadowRoot)==null?void 0:i.firstElementChild;this._itemNavigation.setCurrentItem(t)}_prepareAvatars(){this._colorIndex=0;const e=Object.values(Pd);this.items.forEach((t,i)=>{++this._colorIndex>e.length-3&&(this._colorIndex=1),t.interactive=!this._isGroup,t.toggleAttribute("ui5-avatar",!0),t.getAttribute("color-scheme")||t.setAttribute("color-scheme",e[this._colorIndex]),(i!==this._itemsCount-1||this._customOverflowButton)&&(t.style.marginInlineEnd=VR[t.effectiveSize][this.type])})}};jp=UR([x({tag:"udex-avatar-group",renderer:w,styles:[T5],dependencies:[d5]})],jp);jp.define();function qR(o,e,t){return t?l`<p class="udex-truncated-text"><span class="udex-truncated-text__visible-text">${n(this.visibleText)}</span><${u("udex-button",e,t)} id="toggleButton" design="Tertiary" size="Small" class="udex-truncated-text__toggle-button" @click="${this.onToggleClick}">${n(this.buttonLabel)}</${u("udex-button",e,t)}></p>`:l`<p class="udex-truncated-text"><span class="udex-truncated-text__visible-text">${n(this.visibleText)}</span><udex-button id="toggleButton" design="Tertiary" size="Small" class="udex-truncated-text__toggle-button" @click="${this.onToggleClick}">${n(this.buttonLabel)}</udex-button></p>`}g("@ui5/webcomponents-theming","sap_horizon",async()=>y);g("@sapudex/web-components","sap_horizon",async()=>P);const WR={packageName:"@sapudex/web-components",fileName:"themes/TruncatedText.css.ts",content:`:host{--udex-truncated-text-font-size: var(--udexTypographyBodySFontSize, 16px);--udex-truncated-text-line-height: var(--udexTypographyBodyLineHeight, 24px)}.udex-truncated-text{font-family:var(--sapFontFamily);font-size:var(--udex-truncated-text-font-size);line-height:var(--udex-truncated-text-line-height);font-weight:var(--udexTypographyFontWeightRegular)}.udex-truncated-text__visible-text{vertical-align:middle}.udex-truncated-text__toggle-button{--udex-button-color-tertiary-standard-hover-background: transparent;--udex-button-color-tertiary-standard-hover-border: transparent;--udex-button-color-tertiary-standard-default-text-and-icon: var(--udexColorBlue7);--udex-button-color-tertiary-standard-active-border: transparent;--udex-button-color-tertiary-standard-default-border: transparent;--udex-button-padding-small: 0 3px;--udexTypographyFontWeightMedium: 400;display:inline-block}
|
|
115
|
-
`};var wl=globalThis&&globalThis.__decorate||function(o,e,t,i){var r=arguments.length,a=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,e,t,i);else for(var d=o.length-1;d>=0;d--)(s=o[d])&&(a=(r<3?s(a):r>3?s(e,t,a):s(e,t))||a);return r>3&&a&&Object.defineProperty(e,t,a),a},ed,zp;(function(o){o.charLimit="char-limit"})(zp||(zp={}));const GR="...",YR=new RegExp(/($)|([,.]+)$|([,.]+)?\s+(\S*)$/);let nn=ed=class extends A{constructor(){super()}static async onDefine(){ed.i18nBundle=await L("@udex/web-components")}get visibleText(){return this.initiallyExpanded?`${this.text} `:this.truncatedText}get truncatedText(){return this.text.substring(0,this.cropAfter()).replace(YR,GR)}get buttonLabel(){return this.initiallyExpanded?ed.i18nBundle.getText(D1):ed.i18nBundle.getText(A1)}get validatedCharLimit(){return Number(this.charLimit)<0?0:this.charLimit}onBeforeRendering(){this.validateVariables(zp.charLimit,Number(this.charLimit))}cropAfter(){return this.text.substring(0,Number(this.validatedCharLimit)).trim().length}validateVariables(e,t){t<0&&console.warn(`The variable ${e} cannot take a negative value`)}onToggleClick(){this.initiallyExpanded=!this.initiallyExpanded}};wl([c({type:Boolean})],nn.prototype,"initiallyExpanded",void 0);wl([c({type:String})],nn.prototype,"_direction",void 0);wl([c({type:String})],nn.prototype,"text",void 0);wl([c({defaultValue:150,type:V})],nn.prototype,"charLimit",void 0);nn=ed=wl([x({tag:"udex-truncated-text",renderer:w,styles:WR,template:qR,dependencies:[si]})],nn);nn.define();function KR(o,e,t){return l`${this.readOnly?ZR.call(this,o,e,t):QR.call(this,o,e,t)} `}function ZR(o,e,t){return l`<div class="${n(this.tagClasses)}"><span class="udex-tag__text">${st(this.text)}</span></div>`}function QR(o,e,t){return l`${this.href?JR.call(this,o,e,t):o8.call(this,o,e,t)}`}function JR(o,e,t){return l`<a role="${n(this.accessibleRole)}" class="${n(this.tagClasses)}" @click="${this.tagLinkClickHandler}" href="${n(this.href)}">${this.startIcon?e8.call(this,o,e,t):void 0}<span class="udex-tag__text">${st(this.text)}</span>${this.endIcon?t8.call(this,o,e,t):void 0}</a>`}function e8(o,e,t){return t?l`<${u("ui5-icon",e,t)} class="udex-tag__icon udex-tag__icon--start" name="${n(this.icon)}"></${u("ui5-icon",e,t)}>`:l`<ui5-icon class="udex-tag__icon udex-tag__icon--start" name="${n(this.icon)}"></ui5-icon>`}function t8(o,e,t){return t?l`<${u("ui5-icon",e,t)} class="udex-tag__icon udex-tag__icon--end" name="${n(this.icon)}"></${u("ui5-icon",e,t)}>`:l`<ui5-icon class="udex-tag__icon udex-tag__icon--end" name="${n(this.icon)}"></ui5-icon>`}function o8(o,e,t){return l`${this.nonSelectable?i8.call(this,o,e,t):n8.call(this,o,e,t)}`}function i8(o,e,t){return l`<div class="${n(this.tagClasses)}">${this.startIcon?r8.call(this,o,e,t):void 0}<span class="udex-tag__text">${st(this.text)}</span>${this.endIcon?a8.call(this,o,e,t):void 0}</div>`}function r8(o,e,t){return t?l`<button class="udex-tag__btn-icon" @click="${this.iconClickHandler}" role="${n(this.accessibleRole)}" aria-label="${n(this.iconAccessibleName)}"><${u("ui5-icon",e,t)} class="udex-tag__icon udex-tag__icon--start" name="${n(this.icon)}"></${u("ui5-icon",e,t)}></button>`:l`<button class="udex-tag__btn-icon" @click="${this.iconClickHandler}" role="${n(this.accessibleRole)}" aria-label="${n(this.iconAccessibleName)}"><ui5-icon class="udex-tag__icon udex-tag__icon--start" name="${n(this.icon)}"></ui5-icon></button>`}function a8(o,e,t){return t?l`<button class="udex-tag__btn-icon" @click="${this.iconClickHandler}" role="${n(this.accessibleRole)}" aria-label="${n(this.iconAccessibleName)}"><${u("ui5-icon",e,t)} class="udex-tag__icon udex-tag__icon--end" name="${n(this.icon)}"></${u("ui5-icon",e,t)}></button>`:l`<button class="udex-tag__btn-icon" @click="${this.iconClickHandler}" role="${n(this.accessibleRole)}" aria-label="${n(this.iconAccessibleName)}"><ui5-icon class="udex-tag__icon udex-tag__icon--end" name="${n(this.icon)}"></ui5-icon></button>`}function n8(o,e,t){return l`<div tabindex="${n(this._tabIndex)}" class="${n(this.tagClasses)}" @click="${this.tagClickHandler}" @focusin="${this._focusin}" @focusout="${this._focusout}" @keydown="${this.tagKeyDown}" role="${n(this.accessibleRole)}" aria-label="${n(this.accessibleName)}" aria-pressed="${n(this.selected)}">${this.startIcon?s8.call(this,o,e,t):void 0}<span class="udex-tag__text">${st(this.text)}</span>${this.endIcon?d8.call(this,o,e,t):void 0}</div>`}function s8(o,e,t){return t?l`<${u("ui5-icon",e,t)} class="udex-tag__icon udex-tag__icon--start" name="${n(this.icon)}" @click="${this.iconClickHandler}"></${u("ui5-icon",e,t)}>`:l`<ui5-icon class="udex-tag__icon udex-tag__icon--start" name="${n(this.icon)}" @click="${this.iconClickHandler}"></ui5-icon>`}function d8(o,e,t){return t?l`<${u("ui5-icon",e,t)} class="udex-tag__icon udex-tag__icon--end" name="${n(this.icon)}" @click="${this.iconClickHandler}"></${u("ui5-icon",e,t)}>`:l`<ui5-icon class="udex-tag__icon udex-tag__icon--end" name="${n(this.icon)}" @click="${this.iconClickHandler}"></ui5-icon>`}g("@ui5/webcomponents-theming","sap_horizon",async()=>y);g("@sapudex/web-components","sap_horizon",async()=>P);const l8={packageName:"@sapudex/web-components",fileName:"themes/Tag.css.ts",content:`:host{--udex-tags-font-size: var(--udexTypographyBodyXXSFontSize, 12px);--udex-tags-medium-font-size: var(--udexTypographyBodyXSFontSize, 14px);--udex-tags-text-color: var(--udexColorGrey9, #223548);--udex-tags-min-height: 16px;--udex-tags-line-height: 18px;--udex-tags-medium-line-height: 21px;--udex-tags-icon-size: 12px;--udex-tags-medium-icon-size: 14px;--udex-tags-radius-size: 6px;--udex-tags-text-icon-gap: 3px;--udex-tags-padding-vertical: var(--udexSpacer2, 2px);--udex-tags-padding-horizontal: var(--udexSpacer8, 8px);--udex-tags-grey-default-caption-color: var(--udexColorGrey9, #223548);--udex-tags-grey-default-background-color: var(--sapButton_TokenBackground, var(--udexColorGrey2, #EAECEE));--udex-tags-grey-hover-caption-color: var(--udexColorGrey9, #223548);--udex-tags-grey-hover-background-color: var(--udexColorGrey3, #D5DADD);--udex-tags-grey-selected-caption-color: var(--udexColorBlue8, #0057D2);--udex-tags-grey-selected-background-color: var(--udexColorBlue2, #D1EFFF);--udex-tags-grey-hover-selected-caption-color: var(--udexColorBlue9, #0040B0);--udex-tags-grey-hover-selected-background-color: var(--udexColorBlue3, #A6E0FF);--udex-tags-grey-read-only-caption-color: var(--udexColorGrey6 ,#5B738B);--udex-tags-grey-read-only-background-color: var(--sapNeutralBackground, #FFFFFF);--udex-tags-outlined-default-background-color: var(--udexColorNeutralWhite, #FFFFFF);--udex-tags-outlined-default-border-color: var(--udexColorGrey4, #A9B4BE);--udex-tags-outlined-default-border-width: 1px;--udex-tags-outlined-default-caption-color: var(--udexCoreTextDark, #223548);--udex-tags-outlined-hover-background-color: var(--udexColorGrey1, #F5F6F7);--udex-tags-outlined-hover-border-color: var(--udexColorGrey4, #A9B4BE);--udex-tags-outlined-hover-caption-color: var(--udexCoreTextDark, #223548);--udex-tags-outlined-selected-background-color: var(--udexColorNeutralWhite, #FFFFFF);--udex-tags-outlined-selected-border-color: var(--udexColorBlue7, #0070F2);--udex-tags-outlined-selected-caption-color: var(--udexColorBlue7, #0070F2);--udex-tags-outlined-hover-selected-background-color: var(--udexColorBlue1 , #EBF8FF);--udex-tags-outlined-hover-selected-border-color: var(--udexColorBlue7, #0070F2);--udex-tags-outlined-hover-selected-caption-color: var(--udexColorBlue7, #0070F2);--udex-tags-outlined-read-only-background-color: var(--udexColorNeutralWhite, #FFFFFF);--udex-tags-outlined-read-only-border-color: var(--udexColorGrey4, #A9B4BE);--udex-tags-outlined-read-only-caption-color: var(--udexColorGrey6 ,#5B738B);--udex-tags-text-only-default-caption-color: var(--udexColorBlue7, #0070F2);--udex-tags-text-only-hover-caption-color: var(--udexColorBlue9, #0040B0);--udex-tags-text-only-hover-selected-caption-color: var(--udexColorBlue11, #00144A);--udex-tags-text-only-read-only-caption-color: var(--udexColorGrey6, #5B738B);--udex-tags-text-only-selected-caption-color: var(--udexColorBlue10, #002A86);--udex-tags-white-default-background-color: var(--udexColorNeutralWhite, #FFFFFF);--udex-tags-white-default-caption-color: var(--udexCoreTextDark, #223548);--udex-tags-white-hover-background-color: var(--udexColorGrey2, #EAECEE);--udex-tags-white-hover-caption-color: var(--udexCoreTextDark, #223548);--udex-tags-white-hover-selected-background-color: var(--udexColorBlue2, #D1EFFF);--udex-tags-white-hover-selected-caption-color: var(--udexColorBlue8, #0057D2);--udex-tags-white-read-only-background-color: var(--udexColorNeutralWhite, #FFFFFF);--udex-tags-white-read-only-caption-color: var(--udexColorGrey6, #5B738B);--udex-tags-white-selected-background-color: var(--udexColorBlue1, #EBF8FF);--udex-tags-white-selected-caption-color: var(--udexColorBlue7, #0070F2)}:host([desktop]:not([read-only])) .udex-tag:focus,:host([desktop]:not([read-only])) .udex-tag__btn-icon:focus,:host(:not([read-only])) .udex-tag:focus-visible{outline:solid var(--udexSpacer2, 2px) var(--udexColorBlue9, #0040B0);outline-offset:-2px}:host([read-only]) .udex-tag:focus-visible{outline:none;box-shadow:none}.udex-tag{font-family:var(--sapFontFamily, sans-serif);font-size:var(--udex-tags-font-size);line-height:var(--udex-tags-line-height);color:var(--udex-tags-text-color);border-radius:var(--udex-tags-radius-size);display:inline-flex;padding:var(--udex-tags-padding-vertical) var(--udex-tags-padding-horizontal);gap:var(--udex-tags-text-icon-gap);align-items:center;overflow:hidden;position:relative;max-width:100%;cursor:pointer}.udex-tag__btn-icon{cursor:pointer;border:none;display:flex;padding:3px 0;align-items:center;justify-content:center;border-radius:var(--udex-tags-radius-size);outline-offset:-2px;background:transparent;color:inherit}.udex-tag.udex-tag--nonselectable.udex-tag--has-icon{padding:var(--udexSpacer2) var(--udexSpacer8)}.udex-tag--medium{font-size:var(--udex-tags-medium-font-size);line-height:var(--udex-tags-medium-line-height)}.udex-tag__icon{height:var(--udex-tags-icon-size);min-width:var(--udex-tags-icon-size);color:inherit}.udex-tag--medium .udex-tag__icon{height:var(--udex-tags-medium-icon-size);min-width:var(--udex-tags-medium-icon-size)}.udex-tag-grey,.udex-tag-grey.udex-tag--nonselectable,.udex-tag-grey.udex-tag--nonselectable:hover{color:var(--udex-tags-grey-default-caption-color);background-color:var(--udex-tags-grey-default-background-color)}.udex-tag-grey.udex-tag--nonselectable .udex-tag__icon:hover{background-color:var(--udex-tags-grey-hover-background-color)}.udex-tag-grey:hover{color:var(--udex-tags-grey-hover-caption-color);background-color:var(--udex-tags-grey-hover-background-color)}.udex-tag-grey.udex-tag--selected{color:var(--udex-tags-grey-selected-caption-color);background-color:var(--udex-tags-grey-selected-background-color)}.udex-tag--nonselectable{cursor:default}.udex-tag-grey.udex-tag--nonselectable,.udex-tag-grey.udex-tag--nonselectable:hover{color:var(--udex-tags-text-color)}.udex-tag-grey.udex-tag--selected:after{content:"";position:absolute;height:2px;width:100%;bottom:0;left:0;background-color:var(--udex-tags-grey-selected-caption-color)}.udex-tag-grey.udex-tag--selected:hover{color:var(--udex-tags-grey-hover-selected-caption-color);background-color:var(--udex-tags-grey-hover-selected-background-color)}.udex-tag-grey.udex-tag--selected:hover:after{background-color:var(--udex-tags-grey-hover-selected-caption-color)}.udex-tag--readonly{cursor:default}.udex-tag-grey.udex-tag--readonly:hover,.udex-tag-grey.udex-tag--readonly{color:var(--udex-tags-grey-read-only-caption-color);background-color:var(--udex-tags-grey-read-only-background-color)}.udex-tag-outlined,.udex-tag-outlined.udex-tag--nonselectable:hover{color:var(--udex-tags-outlined-default-caption-color);background-color:var(--udex-tags-outlined-default-background-color);box-shadow:inset 0 0 0 var(--udex-tags-outlined-default-border-width) var(--udex-tags-outlined-default-border-color)}.udex-tag-outlined.udex-tag--nonselectable .udex-tag__icon:hover{background-color:var(--udex-tags-outlined-hover-background-color)}.udex-tag-outlined:hover{color:var(--udex-tags-outlined-hover-caption-color);background-color:var(--udex-tags-outlined-hover-background-color);box-shadow:inset 0 0 0 var(--udex-tags-outlined-default-border-width) var(--udex-tags-outlined-hover-border-color)}.udex-tag-outlined.udex-tag--selected{color:var(--udex-tags-outlined-selected-caption-color);background-color:var(--udex-tags-outlined-selected-background-color);box-shadow:inset 0 0 0 var(--udex-tags-outlined-default-border-width) var(--udex-tags-outlined-selected-border-color)}.udex-tag-outlined.udex-tag--selected:after{content:"";position:absolute;height:2px;width:100%;bottom:0;left:0;background-color:var(--udex-tags-outlined-selected-caption-color)}.udex-tag-outlined.udex-tag--selected:hover{color:var(--udex-tags-outlined-hover-selected-caption-color);background-color:var(--udex-tags-outlined-hover-selected-background-color);box-shadow:inset 0 0 0 var(--udex-tags-outlined-default-border-width) var(--udex-tags-outlined-hover-selected-border-color)}.udex-tag-outlined.udex-tag--readonly:hover,.udex-tag-outlined.udex-tag--readonly{color:var(--udex-tags-outlined-read-only-caption-color);background-color:var(--udex-tags-outlined-read-only-background-color);box-shadow:inset 0 0 0 var(--udex-tags-outlined-default-border-width) var(--udex-tags-outlined-read-only-border-color)}.udex-tag-text,.udex-tag-text.udex-tag--nonselectable.udex-tag--has-icon,.udex-tag-text.udex-tag--nonselectable:hover{color:var(--udex-tags-text-only-default-caption-color);padding:var(--udex-tags-padding-vertical) 0}.udex-tag-text .udex-tag__btn-icon{padding:var(--udexSpacer4) 0}.udex-tag-text.udex-tag--nonselectable .udex-tag__icon:hover,.udex-tag-text:hover{color:var(--udex-tags-text-only-hover-caption-color)}.udex-tag-text.udex-tag--selected{color:var(--udex-tags-text-only-selected-caption-color)}.udex-tag-text.udex-tag--selected:hover{color:var(--udex-tags-text-only-hover-selected-caption-color)}.udex-tag-text.udex-tag--readonly:hover,.udex-tag-text.udex-tag--readonly{color:var(--udex-tags-text-only-read-only-caption-color)}.udex-tag-white,.udex-tag-white.udex-tag--nonselectable:hover{color:var(--udex-tags-white-default-caption-color);background-color:var(--udex-tags-white-default-background-color)}.udex-tag-white.udex-tag--nonselectable .udex-tag__icon:hover{background-color:var(--udex-tags-white-hover-background-color)}.udex-tag-white:hover{color:var(--udex-tags-white-hover-caption-color);background-color:var(--udex-tags-white-hover-background-color)}.udex-tag-white.udex-tag--selected{color:var(--udex-tags-white-selected-caption-color);background-color:var(--udex-tags-white-selected-background-color)}.udex-tag-white.udex-tag--selected:after{content:"";position:absolute;height:2px;width:100%;bottom:0;left:0;background-color:var(--udex-tags-white-selected-caption-color)}.udex-tag-white.udex-tag--selected:hover{color:var(--udex-tags-white-hover-selected-caption-color);background-color:var(--udex-tags-white-hover-selected-background-color)}.udex-tag-white.udex-tag--selected:hover:after{background-color:var(--udex-tags-white-hover-selected-caption-color)}.udex-tag-white.udex-tag--readonly:hover,.udex-tag-white.udex-tag--readonly{color:var(--udex-tags-white-read-only-caption-color );background-color:var(--udex-tags-white-read-only-background-color)}.udex-tag__text b{font-weight:400}.udex-tag__text{overflow:hidden;text-overflow:ellipsis;max-width:100%;white-space:nowrap;min-height:var(--udex-tags-min-height)}.udex-tag--link{text-decoration:none}
|
|
115
|
+
`};var wl=globalThis&&globalThis.__decorate||function(o,e,t,i){var r=arguments.length,a=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,e,t,i);else for(var d=o.length-1;d>=0;d--)(s=o[d])&&(a=(r<3?s(a):r>3?s(e,t,a):s(e,t))||a);return r>3&&a&&Object.defineProperty(e,t,a),a},ed,zp;(function(o){o.charLimit="char-limit"})(zp||(zp={}));const GR="...",YR=new RegExp(/($)|([,.]+)$|([,.]+)?\s+(\S*)$/);let nn=ed=class extends A{constructor(){super()}static async onDefine(){ed.i18nBundle=await L("@udex/web-components")}get visibleText(){return this.initiallyExpanded?`${this.text} `:this.truncatedText}get truncatedText(){return this.text.substring(0,this.cropAfter()).replace(YR,GR)}get buttonLabel(){return this.initiallyExpanded?ed.i18nBundle.getText(D1):ed.i18nBundle.getText(A1)}get validatedCharLimit(){return Number(this.charLimit)<0?0:this.charLimit}onBeforeRendering(){this.validateVariables(zp.charLimit,Number(this.charLimit))}cropAfter(){return this.text.substring(0,Number(this.validatedCharLimit)).trim().length}validateVariables(e,t){t<0&&console.warn(`The variable ${e} cannot take a negative value`)}onToggleClick(){this.initiallyExpanded=!this.initiallyExpanded}};wl([c({type:Boolean})],nn.prototype,"initiallyExpanded",void 0);wl([c({type:String})],nn.prototype,"_direction",void 0);wl([c({type:String})],nn.prototype,"text",void 0);wl([c({defaultValue:150,type:V})],nn.prototype,"charLimit",void 0);nn=ed=wl([x({tag:"udex-truncated-text",renderer:w,styles:WR,template:qR,dependencies:[si]})],nn);nn.define();function KR(o,e,t){return l`${this.readOnly?ZR.call(this,o,e,t):QR.call(this,o,e,t)} `}function ZR(o,e,t){return l`<div class="${n(this.tagClasses)}"><span class="udex-tag__text">${st(this.text)}</span></div>`}function QR(o,e,t){return l`${this.href?JR.call(this,o,e,t):o8.call(this,o,e,t)}`}function JR(o,e,t){return l`<a role="${n(this.accessibleRole)}" class="${n(this.tagClasses)}" @click="${this.tagLinkClickHandler}" href="${n(this.href)}">${this.startIcon?e8.call(this,o,e,t):void 0}<span class="udex-tag__text">${st(this.text)}</span>${this.endIcon?t8.call(this,o,e,t):void 0}</a>`}function e8(o,e,t){return t?l`<${u("ui5-icon",e,t)} class="udex-tag__icon udex-tag__icon--start" name="${n(this.icon)}"></${u("ui5-icon",e,t)}>`:l`<ui5-icon class="udex-tag__icon udex-tag__icon--start" name="${n(this.icon)}"></ui5-icon>`}function t8(o,e,t){return t?l`<${u("ui5-icon",e,t)} class="udex-tag__icon udex-tag__icon--end" name="${n(this.icon)}"></${u("ui5-icon",e,t)}>`:l`<ui5-icon class="udex-tag__icon udex-tag__icon--end" name="${n(this.icon)}"></ui5-icon>`}function o8(o,e,t){return l`${this.nonSelectable?i8.call(this,o,e,t):n8.call(this,o,e,t)}`}function i8(o,e,t){return l`<div class="${n(this.tagClasses)}">${this.startIcon?r8.call(this,o,e,t):void 0}<span class="udex-tag__text">${st(this.text)}</span>${this.endIcon?a8.call(this,o,e,t):void 0}</div>`}function r8(o,e,t){return t?l`<button class="udex-tag__btn-icon" @click="${this.iconClickHandler}" role="${n(this.accessibleRole)}" aria-label="${n(this.iconAccessibleName)}"><${u("ui5-icon",e,t)} class="udex-tag__icon udex-tag__icon--start" name="${n(this.icon)}"></${u("ui5-icon",e,t)}></button>`:l`<button class="udex-tag__btn-icon" @click="${this.iconClickHandler}" role="${n(this.accessibleRole)}" aria-label="${n(this.iconAccessibleName)}"><ui5-icon class="udex-tag__icon udex-tag__icon--start" name="${n(this.icon)}"></ui5-icon></button>`}function a8(o,e,t){return t?l`<button class="udex-tag__btn-icon" @click="${this.iconClickHandler}" role="${n(this.accessibleRole)}" aria-label="${n(this.iconAccessibleName)}"><${u("ui5-icon",e,t)} class="udex-tag__icon udex-tag__icon--end" name="${n(this.icon)}"></${u("ui5-icon",e,t)}></button>`:l`<button class="udex-tag__btn-icon" @click="${this.iconClickHandler}" role="${n(this.accessibleRole)}" aria-label="${n(this.iconAccessibleName)}"><ui5-icon class="udex-tag__icon udex-tag__icon--end" name="${n(this.icon)}"></ui5-icon></button>`}function n8(o,e,t){return l`<div tabindex="${n(this._tabIndex)}" class="${n(this.tagClasses)}" @click="${this.tagClickHandler}" @focusin="${this._focusin}" @focusout="${this._focusout}" @keydown="${this.tagKeyDown}" role="${n(this.accessibleRole)}" aria-label="${n(this.accessibleName)}" aria-pressed="${n(this.selected)}">${this.startIcon?s8.call(this,o,e,t):void 0}<span class="udex-tag__text">${st(this.text)}</span>${this.endIcon?d8.call(this,o,e,t):void 0}</div>`}function s8(o,e,t){return t?l`<${u("ui5-icon",e,t)} class="udex-tag__icon udex-tag__icon--start" name="${n(this.icon)}" @click="${this.iconClickHandler}"></${u("ui5-icon",e,t)}>`:l`<ui5-icon class="udex-tag__icon udex-tag__icon--start" name="${n(this.icon)}" @click="${this.iconClickHandler}"></ui5-icon>`}function d8(o,e,t){return t?l`<${u("ui5-icon",e,t)} class="udex-tag__icon udex-tag__icon--end" name="${n(this.icon)}" @click="${this.iconClickHandler}"></${u("ui5-icon",e,t)}>`:l`<ui5-icon class="udex-tag__icon udex-tag__icon--end" name="${n(this.icon)}" @click="${this.iconClickHandler}"></ui5-icon>`}g("@ui5/webcomponents-theming","sap_horizon",async()=>y);g("@sapudex/web-components","sap_horizon",async()=>P);const l8={packageName:"@sapudex/web-components",fileName:"themes/Tag.css.ts",content:`:host{--udex-tags-font-size: var(--udexTypographyBodyXXSFontSize, 12px);--udex-tags-medium-font-size: var(--udexTypographyBodyXSFontSize, 14px);--udex-tags-text-color: var(--udexColorGrey9, #223548);--udex-tags-min-height: 16px;--udex-tags-line-height: 18px;--udex-tags-medium-line-height: 21px;--udex-tags-icon-size: 12px;--udex-tags-icon-padding: 2px;--udex-tags-medium-icon-size: 12px;--udex-tags-radius-size: 6px;--udex-tags-text-icon-gap: 3px;--udex-tags-padding-vertical: var(--udexSpacer2, 2px);--udex-tags-padding-horizontal: var(--udexSpacer8, 8px);--udex-tags-grey-default-caption-color: var(--udexColorGrey9, #223548);--udex-tags-grey-default-background-color: var(--sapButton_TokenBackground, var(--udexColorGrey2, #EAECEE));--udex-tags-grey-hover-caption-color: var(--udexColorGrey9, #223548);--udex-tags-grey-hover-background-color: var(--udexColorGrey3, #D5DADD);--udex-tags-grey-selected-caption-color: var(--udexColorBlue8, #0057D2);--udex-tags-grey-selected-background-color: var(--udexColorBlue2, #D1EFFF);--udex-tags-grey-hover-selected-caption-color: var(--udexColorBlue9, #0040B0);--udex-tags-grey-hover-selected-background-color: var(--udexColorBlue3, #A6E0FF);--udex-tags-grey-read-only-caption-color: var(--udexColorGrey6 ,#5B738B);--udex-tags-grey-read-only-background-color: var(--sapNeutralBackground, #FFFFFF);--udex-tags-outlined-default-background-color: var(--udexColorNeutralWhite, #FFFFFF);--udex-tags-outlined-default-border-color: var(--udexColorGrey4, #A9B4BE);--udex-tags-outlined-default-border-width: 1px;--udex-tags-outlined-default-caption-color: var(--udexCoreTextDark, #223548);--udex-tags-outlined-hover-background-color: var(--udexColorGrey1, #F5F6F7);--udex-tags-outlined-hover-border-color: var(--udexColorGrey4, #A9B4BE);--udex-tags-outlined-hover-caption-color: var(--udexCoreTextDark, #223548);--udex-tags-outlined-selected-background-color: var(--udexColorNeutralWhite, #FFFFFF);--udex-tags-outlined-selected-border-color: var(--udexColorBlue7, #0070F2);--udex-tags-outlined-selected-caption-color: var(--udexColorBlue7, #0070F2);--udex-tags-outlined-hover-selected-background-color: var(--udexColorBlue1 , #EBF8FF);--udex-tags-outlined-hover-selected-border-color: var(--udexColorBlue7, #0070F2);--udex-tags-outlined-hover-selected-caption-color: var(--udexColorBlue7, #0070F2);--udex-tags-outlined-read-only-background-color: var(--udexColorNeutralWhite, #FFFFFF);--udex-tags-outlined-read-only-border-color: var(--udexColorGrey4, #A9B4BE);--udex-tags-outlined-read-only-caption-color: var(--udexColorGrey6 ,#5B738B);--udex-tags-text-only-default-caption-color: var(--udexColorBlue7, #0070F2);--udex-tags-text-only-hover-caption-color: var(--udexColorBlue9, #0040B0);--udex-tags-text-only-hover-selected-caption-color: var(--udexColorBlue11, #00144A);--udex-tags-text-only-read-only-caption-color: var(--udexColorGrey6, #5B738B);--udex-tags-text-only-selected-caption-color: var(--udexColorBlue10, #002A86);--udex-tags-white-default-background-color: var(--udexColorNeutralWhite, #FFFFFF);--udex-tags-white-default-caption-color: var(--udexCoreTextDark, #223548);--udex-tags-white-hover-background-color: var(--udexColorGrey2, #EAECEE);--udex-tags-white-hover-caption-color: var(--udexCoreTextDark, #223548);--udex-tags-white-hover-selected-background-color: var(--udexColorBlue2, #D1EFFF);--udex-tags-white-hover-selected-caption-color: var(--udexColorBlue8, #0057D2);--udex-tags-white-read-only-background-color: var(--udexColorNeutralWhite, #FFFFFF);--udex-tags-white-read-only-caption-color: var(--udexColorGrey6, #5B738B);--udex-tags-white-selected-background-color: var(--udexColorBlue1, #EBF8FF);--udex-tags-white-selected-caption-color: var(--udexColorBlue7, #0070F2)}:host([desktop]:not([read-only])) .udex-tag:focus,:host([desktop]:not([read-only])) .udex-tag__btn-icon:focus,:host(:not([read-only])) .udex-tag:focus-visible{outline:solid var(--udexSpacer2, 2px) var(--udexColorBlue9, #0040B0);outline-offset:-2px}:host([read-only]) .udex-tag:focus-visible{outline:none;box-shadow:none}.udex-tag{font-family:var(--sapFontFamily, sans-serif);font-size:var(--udex-tags-font-size);line-height:var(--udex-tags-line-height);color:var(--udex-tags-text-color);border-radius:var(--udex-tags-radius-size);display:inline-flex;padding:var(--udex-tags-padding-vertical) var(--udex-tags-padding-horizontal);gap:var(--udex-tags-text-icon-gap);align-items:center;overflow:hidden;position:relative;max-width:100%;cursor:pointer}.udex-tag__btn-icon{cursor:pointer;border:none;display:flex;padding:3px 0;align-items:center;justify-content:center;border-radius:var(--udex-tags-radius-size);outline-offset:-2px;background:transparent;color:inherit}.udex-tag.udex-tag--nonselectable.udex-tag--has-icon{padding:var(--udexSpacer2) var(--udexSpacer8)}.udex-tag--medium{font-size:var(--udex-tags-medium-font-size);line-height:var(--udex-tags-medium-line-height)}.udex-tag__icon{padding:var(--udex-tags-icon-padding);height:var(--udex-tags-icon-size);width:var(--udex-tags-icon-size);color:inherit}.udex-tag--medium .udex-tag__icon{padding:var(--udex-tags-icon-padding);height:var(--udex-tags-medium-icon-size);width:var(--udex-tags-medium-icon-size)}.udex-tag-grey,.udex-tag-grey.udex-tag--nonselectable,.udex-tag-grey.udex-tag--nonselectable:hover{color:var(--udex-tags-grey-default-caption-color);background-color:var(--udex-tags-grey-default-background-color)}.udex-tag-grey.udex-tag--nonselectable .udex-tag__icon:hover{background-color:var(--udex-tags-grey-hover-background-color)}.udex-tag-grey:hover{color:var(--udex-tags-grey-hover-caption-color);background-color:var(--udex-tags-grey-hover-background-color)}.udex-tag-grey.udex-tag--selected{color:var(--udex-tags-grey-selected-caption-color);background-color:var(--udex-tags-grey-selected-background-color)}.udex-tag--nonselectable{cursor:default}.udex-tag-grey.udex-tag--nonselectable,.udex-tag-grey.udex-tag--nonselectable:hover{color:var(--udex-tags-text-color)}.udex-tag-grey.udex-tag--selected:after{content:"";position:absolute;height:2px;width:100%;bottom:0;left:0;background-color:var(--udex-tags-grey-selected-caption-color)}.udex-tag-grey.udex-tag--selected:hover{color:var(--udex-tags-grey-hover-selected-caption-color);background-color:var(--udex-tags-grey-hover-selected-background-color)}.udex-tag-grey.udex-tag--selected:hover:after{background-color:var(--udex-tags-grey-hover-selected-caption-color)}.udex-tag--readonly{cursor:default}.udex-tag-grey.udex-tag--readonly:hover,.udex-tag-grey.udex-tag--readonly{color:var(--udex-tags-grey-read-only-caption-color);background-color:var(--udex-tags-grey-read-only-background-color)}.udex-tag-outlined,.udex-tag-outlined.udex-tag--nonselectable:hover{color:var(--udex-tags-outlined-default-caption-color);background-color:var(--udex-tags-outlined-default-background-color);box-shadow:inset 0 0 0 var(--udex-tags-outlined-default-border-width) var(--udex-tags-outlined-default-border-color)}.udex-tag-outlined.udex-tag--nonselectable .udex-tag__icon:hover{background-color:var(--udex-tags-outlined-hover-background-color)}.udex-tag-outlined:hover{color:var(--udex-tags-outlined-hover-caption-color);background-color:var(--udex-tags-outlined-hover-background-color);box-shadow:inset 0 0 0 var(--udex-tags-outlined-default-border-width) var(--udex-tags-outlined-hover-border-color)}.udex-tag-outlined.udex-tag--selected{color:var(--udex-tags-outlined-selected-caption-color);background-color:var(--udex-tags-outlined-selected-background-color);box-shadow:inset 0 0 0 var(--udex-tags-outlined-default-border-width) var(--udex-tags-outlined-selected-border-color)}.udex-tag-outlined.udex-tag--selected:after{content:"";position:absolute;height:2px;width:100%;bottom:0;left:0;background-color:var(--udex-tags-outlined-selected-caption-color)}.udex-tag-outlined.udex-tag--selected:hover{color:var(--udex-tags-outlined-hover-selected-caption-color);background-color:var(--udex-tags-outlined-hover-selected-background-color);box-shadow:inset 0 0 0 var(--udex-tags-outlined-default-border-width) var(--udex-tags-outlined-hover-selected-border-color)}.udex-tag-outlined.udex-tag--readonly:hover,.udex-tag-outlined.udex-tag--readonly{color:var(--udex-tags-outlined-read-only-caption-color);background-color:var(--udex-tags-outlined-read-only-background-color);box-shadow:inset 0 0 0 var(--udex-tags-outlined-default-border-width) var(--udex-tags-outlined-read-only-border-color)}.udex-tag-text,.udex-tag-text.udex-tag--nonselectable.udex-tag--has-icon,.udex-tag-text.udex-tag--nonselectable:hover{color:var(--udex-tags-text-only-default-caption-color);padding:var(--udex-tags-padding-vertical) 0}.udex-tag-text .udex-tag__btn-icon{padding:var(--udexSpacer4) 0}.udex-tag-text.udex-tag--nonselectable .udex-tag__icon:hover,.udex-tag-text:hover{color:var(--udex-tags-text-only-hover-caption-color)}.udex-tag-text.udex-tag--selected{color:var(--udex-tags-text-only-selected-caption-color)}.udex-tag-text.udex-tag--selected:hover{color:var(--udex-tags-text-only-hover-selected-caption-color)}.udex-tag-text.udex-tag--readonly:hover,.udex-tag-text.udex-tag--readonly{color:var(--udex-tags-text-only-read-only-caption-color)}.udex-tag-white,.udex-tag-white.udex-tag--nonselectable:hover{color:var(--udex-tags-white-default-caption-color);background-color:var(--udex-tags-white-default-background-color)}.udex-tag-white.udex-tag--nonselectable .udex-tag__icon:hover{background-color:var(--udex-tags-white-hover-background-color)}.udex-tag-white:hover{color:var(--udex-tags-white-hover-caption-color);background-color:var(--udex-tags-white-hover-background-color)}.udex-tag-white.udex-tag--selected{color:var(--udex-tags-white-selected-caption-color);background-color:var(--udex-tags-white-selected-background-color)}.udex-tag-white.udex-tag--selected:after{content:"";position:absolute;height:2px;width:100%;bottom:0;left:0;background-color:var(--udex-tags-white-selected-caption-color)}.udex-tag-white.udex-tag--selected:hover{color:var(--udex-tags-white-hover-selected-caption-color);background-color:var(--udex-tags-white-hover-selected-background-color)}.udex-tag-white.udex-tag--selected:hover:after{background-color:var(--udex-tags-white-hover-selected-caption-color)}.udex-tag-white.udex-tag--readonly:hover,.udex-tag-white.udex-tag--readonly{color:var(--udex-tags-white-read-only-caption-color );background-color:var(--udex-tags-white-read-only-background-color)}.udex-tag__text b{font-weight:400}.udex-tag__text{overflow:hidden;text-overflow:ellipsis;max-width:100%;white-space:nowrap;min-height:var(--udex-tags-min-height)}.udex-tag--link{text-decoration:none}
|
|
116
116
|
`};var Gt=globalThis&&globalThis.__decorate||function(o,e,t,i){var r=arguments.length,a=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,e,t,i);else for(var d=o.length-1;d>=0;d--)(s=o[d])&&(a=(r<3?s(a):r>3?s(e,t,a):s(e,t))||a);return r>3&&a&&Object.defineProperty(e,t,a),a},Fc;(function(o){o.Text="Text",o.White="White",o.Outlined="Outlined",o.Grey="Grey"})(Fc||(Fc={}));var Hc;(function(o){o.Small="Small",o.Medium="Medium"})(Hc||(Hc={}));let dt=class extends A{onBeforeRendering(){this.toBeDeleted=!1}onEnterDOM(){var e,t;_e()&&this.setAttribute("desktop",""),this.accessibleRole!=="button"&&((t=(e=this.shadowRoot)==null?void 0:e.firstElementChild)==null||t.removeAttribute("aria-pressed"))}setSelected(){this.selected=!this.selected}iconClickHandler(e){e.stopPropagation(),this.fireEvent("iconClick")}tagClickHandler(){this.isInteractiveTag&&(this.setSelected(),this.fireEvent("selectionChange"))}tagKeyDown(e){K(e)&&this.tagClickHandler()}_focusin(){this.focused=!0}_focusout(){this.focused=!this.focused}get tagClasses(){var d;const e=this.hasIcon?"udex-tag--has-icon":"",t=this.readOnly?"udex-tag--readonly":"",i=this.nonSelectable&&!this.href?"udex-tag--nonselectable":"",r=this.href?"udex-tag--link":"",a=this.selected?"udex-tag--selected":"",s=`udex-tag-${(d=this.design)==null?void 0:d.toLowerCase()}`;return`udex-tag udex-tag--${this.size.toLocaleLowerCase()} ${s} ${e} ${t} ${i} ${r} ${a}`.trim()}get startIcon(){return this.hasIcon&&this.iconPlacement===oi.Start}get endIcon(){return this.hasIcon&&this.iconPlacement===oi.End}get _tabIndex(){return this.overflows||this.nonSelectable?-1:0}get textDom(){return this.getDomRef().querySelector(".udex-tag__text")}get isTruncatable(){return this.textDom?Math.ceil(this.textDom.getBoundingClientRect().width)<Math.ceil(this.textDom.scrollWidth):!1}get isInteractiveTag(){return!this.readOnly&&!this.toBeDeleted&&!this.nonSelectable}get hasIcon(){return!!this.icon&&!this.readOnly}get iconAccessibleName(){return this.accessibleName||this.text}tagLinkClickHandler(e){this.fireEvent("tagLinkClick",{originalEvent:e},!0)}};Gt([c()],dt.prototype,"text",void 0);Gt([c()],dt.prototype,"href",void 0);Gt([c({type:Fc,defaultValue:Fc.Grey})],dt.prototype,"design",void 0);Gt([c({type:Hc,defaultValue:Hc.Small})],dt.prototype,"size",void 0);Gt([c()],dt.prototype,"icon",void 0);Gt([c({type:oi,defaultValue:oi.End})],dt.prototype,"iconPlacement",void 0);Gt([c({type:Boolean})],dt.prototype,"readOnly",void 0);Gt([c()],dt.prototype,"accessibleName",void 0);Gt([c({defaultValue:"button"})],dt.prototype,"accessibleRole",void 0);Gt([c({type:Boolean})],dt.prototype,"selected",void 0);Gt([c({type:Boolean})],dt.prototype,"focused",void 0);Gt([c({type:Boolean})],dt.prototype,"toBeDeleted",void 0);Gt([c({type:Boolean})],dt.prototype,"overflows",void 0);Gt([c({type:Boolean})],dt.prototype,"singleToken",void 0);Gt([c({type:Boolean})],dt.prototype,"nonSelectable",void 0);dt=Gt([x({tag:"udex-tag",renderer:w,styles:l8,template:KR,dependencies:[W]}),f("selectionChange"),f("iconClick"),f("tagLinkClick")],dt);dt.define();const I5=dt,ur=new WeakMap;class gd{static get tasks(){return ur}static enqueue(e,t){ur.has(e)||ur.set(e,[]),ur.get(e).push(t)}static run(e,t){return ur.has(e)||ur.set(e,[]),t().then(()=>{const i=ur.get(e);if(i.length>0)return gd.run(e,i.shift());ur.delete(e)})}static push(e,t){ur.get(e)?gd.enqueue(e,t):gd.run(e,t)}}const c8=o=>{let e=null,t=!1,i,r,a;const s=new Promise((d,h)=>{a=p=>{e=e||p;const _=p-e,v=o.duration-_;if(_<=o.duration){const m=1-v/o.duration;o.advance(m),t||(i=requestAnimationFrame(a))}else o.advance(1),d()},r=()=>{t=!0,cancelAnimationFrame(i),h(new Error("animation stopped"))}}).catch(d=>d);return gd.push(o.element,()=>(typeof o.beforeStart=="function"&&o.beforeStart(),requestAnimationFrame(a),new Promise(d=>{s.then(()=>d())}))),{promise:()=>s,stop:()=>r}},u8=400,h8=(o,e,t)=>{let i,r;return c8({beforeStart:()=>{i=o.scrollLeft,r=o.scrollTop},duration:u8,element:o,advance:a=>{o.scrollLeft=i+a*e,o.scrollTop=r+a*t}})},p8="scroll",_8=yd()?"touchend":"mouseup";class B5 extends qi{constructor(e){super(),this.supportsTouch=yd(),this.containerComponent=e,this.mouseMove=this.ontouchmove.bind(this),this.mouseUp=this.ontouchend.bind(this),this.touchStart=this.ontouchstart.bind(this),this.supportsTouch=yd(),this.cachedValue={dragX:0,dragY:0},this.startX=0,this.startY=0,this.supportsTouch?(e.addEventListener("touchstart",this.touchStart,{passive:!0}),e.addEventListener("touchmove",this.mouseMove,{passive:!0}),e.addEventListener("touchend",this.mouseUp,{passive:!0})):e.addEventListener("mousedown",this.touchStart,{passive:!0})}set scrollContainer(e){this._container=e}get scrollContainer(){return this._container}async scrollTo(e,t,i=0,r=0){let a=this.scrollContainer.clientHeight>0&&this.scrollContainer.clientWidth>0;for(;!a&&i>0;)await new Promise(s=>{setTimeout(()=>{a=this.scrollContainer.clientHeight>0&&this.scrollContainer.clientWidth>0,i--,s()},r)});this._container.scrollLeft=e,this._container.scrollTop=t}move(e,t,i){if(i){this._container.scrollLeft+=e,this._container.scrollTop+=t;return}if(this._container)return h8(this._container,e,t)}getScrollLeft(){return this._container.scrollLeft}getScrollTop(){return this._container.scrollTop}_isTouchInside(e){let t=null;this.supportsTouch&&e instanceof TouchEvent&&(t=e.touches[0]);const i=this._container.getBoundingClientRect(),r=this.supportsTouch?t.clientX:e.x,a=this.supportsTouch?t.clientY:e.y;return r>=i.left&&r<=i.right&&a>=i.top&&a<=i.bottom}ontouchstart(e){let t=null;this.supportsTouch&&e instanceof TouchEvent&&(t=e.touches[0]),t?(this.startX=t.pageX,this.startY=t.pageY):(document.addEventListener("mouseup",this.mouseUp,{passive:!0}),document.addEventListener("mousemove",this.mouseMove,{passive:!0})),t&&(this._prevDragX=t.pageX,this._prevDragY=t.pageY),e instanceof MouseEvent&&(this._prevDragX=e.x,this._prevDragY=e.y),this._canScroll=this._isTouchInside(e)}ontouchmove(e){if(!this._canScroll)return;const t=this._container,i=this.supportsTouch?e.touches[0]:null,r=this.supportsTouch?i.pageX:e.x,a=this.supportsTouch?i.pageY:e.y;t.scrollLeft+=this._prevDragX-r,t.scrollTop+=this._prevDragY-a,this.fireEvent(p8,{isLeft:r>this._prevDragX,isRight:r<this._prevDragX}),this.cachedValue.dragX=this._prevDragX,this.cachedValue.dragY=this._prevDragY,this._prevDragX=r,this._prevDragY=a}ontouchend(e){if(this.supportsTouch){const d=Math.abs(e.changedTouches[0].pageX-this.startX),h=Math.abs(e.changedTouches[0].pageY-this.startY);if(d<10&&h<10)return}if(!this._canScroll)return;const t=this._container,i=this.supportsTouch?e.changedTouches[0].pageX:e.x,r=this.supportsTouch?e.changedTouches[0].pageY:e.y;t.scrollLeft+=this._prevDragX-i,t.scrollTop+=this._prevDragY-r;const s=i===this._prevDragX?this.cachedValue.dragX:i;this.fireEvent(_8,{isLeft:s<this._prevDragX,isRight:s>this._prevDragX}),this._prevDragX=i,this._prevDragY=r,this.supportsTouch||(document.removeEventListener("mousemove",this.mouseMove),document.removeEventListener("mouseup",this.mouseUp))}}function v8(o,e,t){return l`${this._isPhone?g8.call(this,o,e,t):y8.call(this,o,e,t)}`}function g8(o,e,t){return t?l`<${u("ui5-dialog",e,t)} accessible-name=${n(this.accessibleName)} accessible-name-ref=${n(this.accessibleNameRef)} accessible-role=${n(this.accessibleRole)} stretch ?_disable-initial-focus="${n(this._disableInitialFocus)}" initial-focus="${n(this.initialFocus)}" @ui5-before-open="${n(this._beforeDialogOpen)}" @ui5-after-open="${n(this._propagateDialogEvent)}" @ui5-before-close="${n(this._propagateDialogEvent)}" @ui5-after-close="${n(this._afterDialogClose)}" exportparts="content, header, footer">${this._hideHeader?void 0:km.call(this,o,e,t)}<slot></slot><slot slot="footer" name="footer"></slot></${u("ui5-dialog",e,t)}>`:l`<ui5-dialog accessible-name=${n(this.accessibleName)} accessible-name-ref=${n(this.accessibleNameRef)} accessible-role=${n(this.accessibleRole)} stretch ?_disable-initial-focus="${n(this._disableInitialFocus)}" initial-focus="${n(this.initialFocus)}" @ui5-before-open="${n(this._beforeDialogOpen)}" @ui5-after-open="${n(this._propagateDialogEvent)}" @ui5-before-close="${n(this._propagateDialogEvent)}" @ui5-after-close="${n(this._afterDialogClose)}" exportparts="content, header, footer">${this._hideHeader?void 0:km.call(this,o,e,t)}<slot></slot><slot slot="footer" name="footer"></slot></ui5-dialog>`}function km(o,e,t){return l`${this.header.length?m8.call(this,o,e,t):b8.call(this,o,e,t)}`}function m8(o,e,t){return l`<slot slot="header" name="header"></slot>`}function b8(o,e,t){return l`<div class="${X(this.classes.header)}" slot="header">${this.headerText?f8.call(this,o,e,t):void 0}${this._hideCloseButton?void 0:x8.call(this,o,e,t)}</div>`}function f8(o,e,t){return t?l`<${u("ui5-title",e,t)} level="H2" class="ui5-popup-header-text ui5-responsive-popover-header-text">${n(this.headerText)}</${u("ui5-title",e,t)}>`:l`<ui5-title level="H2" class="ui5-popup-header-text ui5-responsive-popover-header-text">${n(this.headerText)}</ui5-title>`}function x8(o,e,t){return t?l`<${u("ui5-button",e,t)} icon="decline" design="Transparent" aria-label="${n(this._closeDialogAriaLabel)}" @click="${this.close}"></${u("ui5-button",e,t)}>`:l`<ui5-button icon="decline" design="Transparent" aria-label="${n(this._closeDialogAriaLabel)}" @click="${this.close}"></ui5-button>`}function y8(o,e,t){return l`<section style="${q(this.styles.root)}" class="${X(this.classes.root)}" role="${n(this._role)}" aria-modal="${n(this._ariaModal)}" aria-label="${n(this._ariaLabel)}" aria-labelledby="${n(this._ariaLabelledBy)}" @keydown=${this._onkeydown} @focusout=${this._onfocusout} @mouseup=${this._onmouseup} @mousedown=${this._onmousedown}><span class="first-fe" data-ui5-focus-trap role="none" tabindex="0" @focusin=${this.forwardToLast}></span><span class="ui5-popover-arrow" style="${q(this.styles.arrow)}"></span>${this._displayHeader?w8.call(this,o,e,t):void 0}<div style="${q(this.styles.content)}" class="${X(this.classes.content)}" @scroll="${this._scroll}" part="content"><slot></slot></div>${this._displayFooter?S8.call(this,o,e,t):void 0}<span class="last-fe" data-ui5-focus-trap role="none" tabindex="0" @focusin=${this.forwardToFirst}></span></section>`}function w8(o,e,t){return l`<header class="ui5-popup-header-root" id="ui5-popup-header" part="header">${this.header.length?k8.call(this,o,e,t):$8.call(this,o,e,t)}</header>`}function k8(o,e,t){return l`<slot name="header"></slot>`}function $8(o,e,t){return l`<h1 class="ui5-popup-header-text">${n(this.headerText)}</h1>`}function S8(o,e,t){return l`${this.footer.length?T8.call(this,o,e,t):void 0}`}function T8(o,e,t){return l`<footer class="ui5-popup-footer-root" part="footer"><slot name="footer"></slot></footer>`}var Lp;(function(o){o.H1="H1",o.H2="H2",o.H3="H3",o.H4="H4",o.H5="H5",o.H6="H6"})(Lp||(Lp={}));const $m=Lp;function C8(o,e,t){return l`${this.h1?I8.call(this,o,e,t):void 0}${this.h2?B8.call(this,o,e,t):void 0}${this.h3?A8.call(this,o,e,t):void 0}${this.h4?D8.call(this,o,e,t):void 0}${this.h5?E8.call(this,o,e,t):void 0}${this.h6?P8.call(this,o,e,t):void 0}`}function I8(o,e,t){return l`<h1 class="ui5-title-root"><span id="${n(this._id)}-inner"><slot></slot></span></h1>`}function B8(o,e,t){return l`<h2 class="ui5-title-root"><span id="${n(this._id)}-inner"><slot></slot></span></h2>`}function A8(o,e,t){return l`<h3 class="ui5-title-root"><span id="${n(this._id)}-inner"><slot></slot></span></h3>`}function D8(o,e,t){return l`<h4 class="ui5-title-root"><span id="${n(this._id)}-inner"><slot></slot></span></h4>`}function E8(o,e,t){return l`<h5 class="ui5-title-root"><span id="${n(this._id)}-inner"><slot></slot></span></h5>`}function P8(o,e,t){return l`<h6 class="ui5-title-root"><span id="${n(this._id)}-inner"><slot></slot></span></h6>`}g("@ui5/webcomponents-theming","sap_horizon",async()=>y);g("@ui5/webcomponents","sap_horizon",async()=>J);const N8={packageName:"@ui5/webcomponents",fileName:"themes/Title.css.ts",content:`:host(:not([hidden])){display:block;cursor:text}:host{max-width:100%;color:var(--sapGroup_TitleTextColor);font-size:var(--sapFontHeader2Size);font-family:"72override",var(--sapFontHeaderFamily);text-shadow:var(--sapContent_TextShadow)}.ui5-title-root{display:inline-block;position:relative;font-weight:400;font-size:inherit;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;vertical-align:bottom;-webkit-margin-before:0;-webkit-margin-after:0;-webkit-margin-start:0;-webkit-margin-end:0;margin:0;cursor:inherit}:host([wrapping-type="Normal"]) .ui5-title-root,:host([wrapping-type="Normal"]) ::slotted(*){white-space:pre-line}::slotted(*){font-size:inherit;font-family:inherit;text-shadow:inherit}:host([level="H1"]){font-size:var(--sapFontHeader1Size)}:host([level="H2"]){font-size:var(--sapFontHeader2Size)}:host([level="H3"]){font-size:var(--sapFontHeader3Size)}:host([level="H4"]){font-size:var(--sapFontHeader4Size)}:host([level="H5"]){font-size:var(--sapFontHeader5Size)}:host([level="H6"]){font-size:var(--sapFontHeader6Size)}
|
|
117
117
|
`};var pv=globalThis&&globalThis.__decorate||function(o,e,t,i){var r=arguments.length,a=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,e,t,i);else for(var d=o.length-1;d>=0;d--)(s=o[d])&&(a=(r<3?s(a):r>3?s(e,t,a):s(e,t))||a);return r>3&&a&&Object.defineProperty(e,t,a),a};let ls=class extends A{get normalizedLevel(){return this.level.toLowerCase()}get h1(){return this.normalizedLevel==="h1"}get h2(){return this.normalizedLevel==="h2"}get h3(){return this.normalizedLevel==="h3"}get h4(){return this.normalizedLevel==="h4"}get h5(){return this.normalizedLevel==="h5"}get h6(){return this.normalizedLevel==="h6"}};pv([c({type:bo,defaultValue:bo.None})],ls.prototype,"wrappingType",void 0);pv([c({type:$m,defaultValue:$m.H2})],ls.prototype,"level",void 0);ls=pv([x({tag:"ui5-title",renderer:w,template:C8,styles:N8})],ls);ls.define();const A5=ls;g("@ui5/webcomponents-theming","sap_horizon",async()=>y);g("@ui5/webcomponents","sap_horizon",async()=>J);const R8={packageName:"@ui5/webcomponents",fileName:"themes/ResponsivePopover.css.ts",content:`:host{--_ui5-v1-24-20_input_width: 100%;min-width:6.25rem;min-height:2rem}:host([opened]){display:inline-block}.ui5-responsive-popover-header{height:var(--_ui5-v1-24-20-responsive_popover_header_height);display:flex;justify-content:space-between;align-items:center;width:100%}.ui5-responsive-popover-header-text{width:calc(100% - var(--_ui5-v1-24-20_button_base_min_width))}.ui5-responsive-popover-header-no-title{justify-content:flex-end}
|
|
118
118
|
`};var Bu=globalThis&&globalThis.__decorate||function(o,e,t,i){var r=arguments.length,a=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,e,t,i);else for(var d=o.length-1;d>=0;d--)(s=o[d])&&(a=(r<3?s(a):r>3?s(e,t,a):s(e,t))||a);return r>3&&a&&Object.defineProperty(e,t,a),a},Kl;let sn=Kl=class extends Yi{constructor(){super()}async showAt(e,t=!1){if(!Qe())await super.showAt(e,t);else{this.style.display="contents";const i=sv();if(!i)return;this.style.zIndex=i.toString(),await this._dialog.show(t)}}close(e=!1,t=!1,i=!1){Qe()?this._dialog.close(e,t,i):super.close(e,t,i)}toggle(e){if(this.isOpen())return this.close();this.showAt(e)}isOpen(){return Qe()&&this._dialog?this._dialog.isOpen():super.isOpen()}get classes(){const e=super.classes;return e.header={"ui5-responsive-popover-header":!0,"ui5-responsive-popover-header-no-title":!this.headerText},e}get _dialog(){return this.shadowRoot.querySelector("[ui5-dialog]")}get contentDOM(){return Qe()?this._dialog.contentDOM:super.contentDOM}get _isPhone(){return Qe()}get _displayHeader(){return(Qe()||!this.contentOnlyOnDesktop)&&super._displayHeader}get _displayFooter(){return Qe()||!this.contentOnlyOnDesktop}get _closeDialogAriaLabel(){return Kl.i18nBundle.getText(FC)}_beforeDialogOpen(e){this.open=!0,this.opened=!0,this._propagateDialogEvent(e)}_afterDialogClose(e){this.open=!1,this.opened=!1,this._propagateDialogEvent(e)}_propagateDialogEvent(e){const t=e.type.replace("ui5-","");this.fireEvent(t,e.detail)}get isModal(){return Qe()?this._dialog.isModal:super.isModal}static async onDefine(){Kl.i18nBundle=await L("@ui5/webcomponents")}};Bu([c({type:Boolean})],sn.prototype,"contentOnlyOnDesktop",void 0);Bu([c({type:Boolean})],sn.prototype,"_hideHeader",void 0);Bu([c({type:Boolean})],sn.prototype,"_hideCloseButton",void 0);sn=Kl=Bu([x({tag:"ui5-responsive-popover",styles:[Yi.styles,R8],template:v8,dependencies:[...Yi.dependencies,Wt,$y,A5]})],sn);sn.define();const Au=sn;let kl=null,Du=!1;const Op=new Set,_v=new Set,D5=o=>{!o.dataTransfer||!(o.target instanceof HTMLElement)||_v.has(o.target)||(kl=o.target)},E5=()=>{kl=null},P5=()=>{kl=null},j8=o=>{kl=o},z8=()=>kl,L8=()=>{Du||(document.body.addEventListener("dragstart",D5),document.body.addEventListener("dragend",E5),document.body.addEventListener("drop",P5))},O8=()=>{document.body.removeEventListener("dragstart",D5),document.body.removeEventListener("dragend",E5),document.body.removeEventListener("drop",P5),Du=!1},M8=o=>{Op.add(o),Du||L8()},X8=o=>{Op.delete(o),Op.size===0&&Du&&O8()},F8=o=>(_v.add(o),j8),H8=o=>{_v.delete(o)},jl={subscribe:M8,unsubscribe:X8,addSelfManagedArea:F8,removeSelfManagedArea:H8,getDraggedElement:z8};var Mp;(function(o){o.On="On",o.Before="Before",o.After="After"})(Mp||(Mp={}));const Ft=Mp;var Xp;(function(o){o.Vertical="Vertical",o.Horizontal="Horizontal"})(Xp||(Xp={}));const ea=Xp,Sm=(o,e,t,i)=>{const r=Math.abs(o-e),a=Math.abs(o-t),s=Math.abs(o-i),d=Math.min(r,a,s);let h=[];switch(d){case r:h=[Ft.Before];break;case a:h=[Ft.On,r<s?Ft.Before:Ft.After];break;case s:h=[Ft.After];break}return h},U8=(o,e,t)=>{let i=Number.POSITIVE_INFINITY,r=null;for(let m=0;m<o.length;m++){const b=o[m],{left:k,width:R,top:z,height:H}=b.getBoundingClientRect();let C;t===ea.Vertical?C=z+H/2:C=k+R/2;const B=Math.abs(e-C);B<i&&(i=B,r=b)}if(!r)return null;const{width:a,height:s,left:d,right:h,top:p,bottom:_}=r.getBoundingClientRect();let v;return t===ea.Vertical?v=Sm(e,p,p+s/2,_):v=Sm(e,d,d+a/2,h),{element:r,placements:v}},Tm=o=>{let e=o;return o.shadowRoot&&o.shadowRoot.activeElement&&(e=o.shadowRoot.activeElement),e};let zl=null;const N5=(o,e)=>{zl&&clearTimeout(zl),zl=setTimeout(()=>{zl=null,o()},e)},V8=o=>{const e=o.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)};var Fp;(function(o){o.None="None",o.SingleSelect="SingleSelect",o.SingleSelectBegin="SingleSelectBegin",o.SingleSelectEnd="SingleSelectEnd",o.SingleSelectAuto="SingleSelectAuto",o.MultiSelect="MultiSelect",o.Delete="Delete"})(Fp||(Fp={}));const Re=Fp;var Hp;(function(o){o.Button="Button",o.Scroll="Scroll",o.None="None"})(Hp||(Hp={}));const md=Hp,q8=o=>{if(!o)return!1;const e=o.nodeName.toLowerCase();if(o.hasAttribute("data-sap-no-tab-ref")||Su(o))return!1;const t=o.getAttribute("tabindex");return t!=null?parseInt(t)>=0:e==="a"||/input|select|textarea|button|object/.test(e)?!o.disabled:!1},W8=o=>Up([...o.children]),Up=(o,e)=>{const t=e||[];return o&&o.forEach(i=>{if(i.nodeType===Node.TEXT_NODE||i.nodeType===Node.COMMENT_NODE)return;let r=i;if(!r.hasAttribute("data-sap-no-tab-ref")){if(r.shadowRoot){const a=r.shadowRoot.children;r=Array.from(a).find(s=>s.tagName!=="STYLE")}r&&(q8(r)&&t.push(r),r.tagName==="SLOT"?Up(r.assignedNodes(),t):Up([...r.children],t))}}),t};g("@ui5/webcomponents-theming","sap_horizon",async()=>y);g("@ui5/webcomponents","sap_horizon",async()=>J);const G8={packageName:"@ui5/webcomponents",fileName:"themes/ListItemBase.css.ts",content:`:host(:not([hidden])){display:block}:host{height:var(--_ui5-v1-24-20_list_item_base_height);background:var(--ui5-v1-24-20-listitem-background-color);box-sizing:border-box;border-bottom:1px solid transparent}:host([selected]){background:var(--sapList_SelectionBackgroundColor);.ui5-li-additional-text{text-shadow:var(--sapContent_TextShadow)}}:host([has-border]){border-bottom:var(--ui5-v1-24-20-listitem-border-bottom)}:host([selected]){border-bottom:var(--ui5-v1-24-20-listitem-selected-border-bottom)}:host(:not([focused])[selected][has-border]){border-bottom:var(--ui5-v1-24-20-listitem-selected-border-bottom)}:host([focused][selected]){border-bottom:var(--ui5-v1-24-20-listitem-focused-selected-border-bottom)}.ui5-li-root{position:relative;display:flex;align-items:center;width:100%;height:100%;padding:0 1rem;box-sizing:border-box;background:inherit}:host([focused]) .ui5-li-root.ui5-li--focusable{outline:none}:host([focused]:not([data-moving])) .ui5-li-root.ui5-li--focusable:after{content:"";border:var(--sapContent_FocusWidth) var(--sapContent_FocusStyle) var(--sapContent_FocusColor);position:absolute;border-radius:0;inset:.125rem;pointer-events:none}:host([focused]:not(data-moving)) .ui5-li-root .ui5-li-content:focus:after{content:"";border:var(--sapContent_FocusWidth) var(--sapContent_FocusStyle) var(--sapContent_FocusColor);position:absolute;inset:0;pointer-events:none}:host([active][focused]) .ui5-li-root.ui5-li--focusable:after{border-color:var(--ui5-v1-24-20-listitem-active-border-color)}:host([disabled]){opacity:var(--_ui5-v1-24-20-listitembase_disabled_opacity);pointer-events:none}.ui5-li-content{max-width:100%;font-family:"72override",var(--sapFontFamily);color:var(--sapList_TextColor)}
|
|
@@ -136,9 +136,9 @@ To prevent other runtimes from defining tags that you use, consider using scopin
|
|
|
136
136
|
`};var Tn=globalThis&&globalThis.__decorate||function(o,e,t,i){var r=arguments.length,a=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,e,t,i);else for(var d=o.length-1;d>=0;d--)(s=o[d])&&(a=(r<3?s(a):r>3?s(e,t,a):s(e,t))||a);return r>3&&a&&Object.defineProperty(e,t,a),a},ja;let Qi=ja=class extends A{constructor(){super(),this._previousValue=0,this._transitionDuration=0}onBeforeRendering(){this._transitionDuration=Math.abs(this._previousValue-this.validatedValue)*20,this._previousValue=this.validatedValue}valueStateTextMappings(){return{Error:ja.i18nBundle.getText(ov),Warning:ja.i18nBundle.getText(iv),Success:ja.i18nBundle.getText(rv),Information:ja.i18nBundle.getText(M1)}}valueStateIconMappings(){return{Error:"status-negative",Warning:"status-critical",Success:"status-positive",Information:"information"}}get styles(){return{bar:{width:`${this.validatedValue}%`,"transition-duration":this.shouldAnimate?`${this._transitionDuration}ms`:"none"}}}get classes(){return{root:{"ui5-progress-indicator-max-value":this.validatedValue===100,"ui5-progress-indicator-min-value":this.validatedValue===0}}}get validatedValue(){return this.value<0?0:this.value>100?100:this.value}get showValueInRemainingBar(){return this.value<=50}get shouldAnimate(){return F_()!==X_.None}get valueStateText(){const e=`${this.validatedValue}%`,t=this.valueStateTextMappings()[this.valueState];return t?`${e} ${t}`:e}get showIcon(){return this.valueState!==pe.None}get valueStateIcon(){return this.valueStateIconMappings()[this.valueState]}get _ariaDisabled(){return this.disabled||void 0}static async onDefine(){ja.i18nBundle=await L("@ui5/webcomponents")}};Tn([c()],Qi.prototype,"accessibleName",void 0);Tn([c({type:Boolean})],Qi.prototype,"disabled",void 0);Tn([c({type:Boolean})],Qi.prototype,"hideValue",void 0);Tn([c({validator:V,defaultValue:0})],Qi.prototype,"value",void 0);Tn([c({defaultValue:null})],Qi.prototype,"displayValue",void 0);Tn([c({type:pe,defaultValue:pe.None})],Qi.prototype,"valueState",void 0);Qi=ja=Tn([x({tag:"ui5-progress-indicator",renderer:w,styles:Yz,template:Lz,dependencies:[W]})],Qi);Qi.define();const q5=Qi;g("@ui5/webcomponents-theming","sap_horizon",async()=>y);g("@sapudex/web-components","sap_horizon",async()=>P);const Kz={packageName:"@sapudex/web-components",fileName:"themes/ProgressBar.css.ts",content:`:host{--udex-progress-bar-point-size: .375rem}:host::part(remaining-bar):after{width:var(--udex-progress-bar-point-size, .375rem);height:var(--udex-progress-bar-point-size, .375rem)}
|
|
137
137
|
`};var Zz=globalThis&&globalThis.__decorate||function(o,e,t,i){var r=arguments.length,a=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,e,t,i);else for(var d=o.length-1;d>=0;d--)(s=o[d])&&(a=(r<3?s(a):r>3?s(e,t,a):s(e,t))||a);return r>3&&a&&Object.defineProperty(e,t,a),a};let Zp=class extends q5{};Zp=Zz([x({tag:"udex-progress-bar",renderer:w,styles:[q5.styles,Kz]})],Zp);Zp.define();const Qz="direction-arrows",W5="M507 244q5 5 5 12 0 6-5 11L394 379q-5 5-12 5-6 0-11-5t-5-11V144q0-12 10-15 2-1 6-1 8 0 12 4zM135 129q10 3 10 15v224q0 6-4.5 11t-11.5 5q-6 0-11-5L5 267q-5-5-5-11 0-7 5-12l113-112q4-4 11-4 4 0 6 1z",Jz=!1,eL="SAP-icons-v4",tL="@ui5/webcomponents-icons";D(Qz,{pathData:W5,ltr:Jz,collection:eL,packageName:tL});const oL="direction-arrows",G5="M135 128q11 0 18 7.5t7 18.5v204q0 11-8 18.5t-18 7.5-17-7L8 275q-8-8-8-19t8-19l109-102q7-7 18-7zm369 109q8 8 8 19t-8 19L395 377q-7 7-17 7t-18-7.5-8-18.5V154q0-12 8-19t19-7q9 0 16 7z",iL=!1,rL="SAP-icons-v5",aL="@ui5/webcomponents-icons";D(oL,{pathData:G5,ltr:iL,collection:rL,packageName:aL});oe();g("@ui5/webcomponents-theming","sap_horizon",async()=>y);g("@ui5/webcomponents","sap_horizon",async()=>J);const nL={packageName:"@ui5/webcomponents",fileName:"themes/SliderBase.css.ts",content:`.ui5-hidden-text{position:absolute;clip:rect(1px,1px,1px,1px);user-select:none;left:-1000px;top:-1000px;pointer-events:none;font-size:0}:host([disabled]){opacity:var(--_ui5-v1-24-20_slider_disabled_opacity);cursor:default;pointer-events:none}:host{box-sizing:border-box;cursor:pointer;vertical-align:top;width:100%}:host(:not([hidden])){display:inline-block}.ui5-slider-root{box-sizing:border-box;height:3.3125rem;outline:none;padding:var(--_ui5-v1-24-20_slider_padding);touch-action:none}.ui5-slider-inner{background-repeat:no-repeat;position:relative;min-width:var(--_ui5-v1-24-20_slider_inner_min_width);height:100%}.ui5-slider-progress-container{width:100%;background:var(--_ui5-v1-24-20_slider_progress_container_background);border:var(--_ui5-v1-24-20_slider_progress_border);border-radius:var(--_ui5-v1-24-20_slider_progress_border_radius);height:var(--_ui5-v1-24-20_slider_inner_height);position:relative;box-sizing:var(--_ui5-v1-24-20_slider_progress_box_sizing);top:var(--_ui5-v1-24-20_slider_progress_container_top)}.ui5-slider-progress-container:before,.ui5-slider-progress-container:after{display:var(--_ui5-v1-24-20_slider_progress_container_dot_display);content:"";position:absolute;border-radius:50%;width:var(--_ui5-v1-24-20_slider_start_end_point_size);height:var(--_ui5-v1-24-20_slider_start_end_point_size);top:var(--_ui5-v1-24-20_slider_start_end_point_top)}.ui5-slider-progress-container:before{inset-inline-start:var(--_ui5-v1-24-20_slider_start_end_point_left);background-color:var(--_ui5-v1-24-20_slider_progress_before_background);border:var(--_ui5-v1-24-20_slider_progress_before_border)}.ui5-slider-progress-container:after{inset-inline-end:var(--_ui5-v1-24-20_slider_start_end_point_left);background-color:var(--_ui5-v1-24-20_slider_progress_after_background);border:var(--_ui5-v1-24-20_slider_progress_after_border)}.ui5-slider-progress{background:var(--_ui5-v1-24-20_slider_progress_background);border-radius:var(--_ui5-v1-24-20_slider_progress_border_radius);height:var(--_ui5-v1-24-20_slider_progress_height);position:relative;outline:none;box-sizing:border-box;border:var(--_ui5-v1-24-20_slider_active_progress_border);left:var(--_ui5-v1-24-20_slider_active_progress_left);top:var(--_ui5-v1-24-20_slider_active_progress_top)}.ui5-slider-tickmarks{list-style:none;padding:0;margin:0;top:var(--_ui5-v1-24-20_slider_tickmark_top);display:flex;box-sizing:border-box;width:100%;justify-content:space-between;position:absolute;z-index:1}.ui5-slider-tickmarks li{height:var(--_ui5-v1-24-20_slider_tickmark_height);border-inline-start:1px solid var(--_ui5-v1-24-20_slider_tickmark_bg)}.ui5-slider-handle{background:var(--_ui5-v1-24-20_slider_handle_background);border:var(--_ui5-v1-24-20_slider_handle_border);border-radius:var(--_ui5-v1-24-20_slider_handle_border_radius);margin-inline-start:calc(-1 * var(--_ui5-v1-24-20_slider_handle_width) / 2);top:var(--_ui5-v1-24-20_slider_handle_top);position:absolute;outline:none;height:var(--_ui5-v1-24-20_slider_handle_height);width:var(--_ui5-v1-24-20_slider_handle_width);box-sizing:var(--_ui5-v1-24-20_slider_handle_box_sizing);display:flex;justify-content:center;align-items:center;z-index:2}[slider-icon]{display:var(--_ui5-v1-24-20_slider_handle_icon_display);color:var(--sapContent_Selected_ForegroundColor);width:var(--_ui5-v1-24-20_slider_handle_icon_size);height:var(--_ui5-v1-24-20_slider_handle_icon_size)}.ui5-slider-root .ui5-slider-handle:focus [slider-icon]{display:var(--_ui5-v1-24-20_range_slider_active_handle_icon_display)}.ui5-slider-progress-container:hover~.ui5-slider-handle:not(:focus),.ui5-slider-handle:hover{background:var(--_ui5-v1-24-20_slider_handle_hover_background);border:var(--_ui5-v1-24-20_slider_handle_hover_border)}.ui5-slider-root:focus .ui5-slider-inner .ui5-slider-handle,.ui5-slider-handle:focus{outline:var(--_ui5-v1-24-20_slider_handle_outline);outline-offset:var(--_ui5-v1-24-20_slider_handle_outline_offset);border:var(--_ui5-v1-24-20_slider_handle_focus_border);background:var(--_ui5-v1-24-20_slider_handle_background_focus)}.ui5-slider-handle.ui5-slider-handle--start:focus,.ui5-slider-handle--end:focus{border:var(--_ui5-v1-24-20_slider_handle_focus_border)}.ui5-slider-root:focus:hover .ui5-slider-handle,.ui5-slider-handle:focus:hover{border:var(--_ui5-v1-24-20_slider_handle_focus_border)}.ui5-slider-tooltip{display:flex;justify-content:center;align-items:center;visibility:hidden;pointer-events:none;line-height:1rem;position:absolute;left:50%;transform:translate(-50%);bottom:var(--_ui5-v1-24-20_slider_tooltip_bottom);background:var(--_ui5-v1-24-20_slider_tooltip_background);border:var(--_ui5-v1-24-20_slider_tooltip_border);border-radius:var(--_ui5-v1-24-20_slider_tooltip_border_radius);box-shadow:var(--_ui5-v1-24-20_slider_tooltip_box_shadow);font-size:var(--_ui5-v1-24-20_slider_tooltip_fontsize);color:var(--_ui5-v1-24-20_slider_tooltip_color);height:var(--_ui5-v1-24-20_slider_tooltip_height);min-width:var(--_ui5-v1-24-20_slider_tooltip_min_width);padding:var(--_ui5-v1-24-20_slider_tooltip_padding);box-sizing:var(--_ui5-v1-24-20_slider_tooltip_border_box)}.ui5-slider-tooltip-value{position:relative;display:flex;justify-content:center;align-items:center}.ui5-slider-labels{position:absolute;top:1.25rem;margin:0;padding:0;white-space:nowrap}.ui5-slider-labels li{position:relative;list-style:none;padding-top:.3125rem;height:1rem;margin:0;text-align:center;display:inline-block;color:var(--_ui5-v1-24-20_slider_label_color);font-size:var(--_ui5-v1-24-20_slider_label_fontsize);padding-top:0;box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;vertical-align:top}.ui5-slider-hidden-labels li:not(:first-child):not(:last-child){visibility:hidden}.ui5-slider-handle:focus .ui5-slider-tooltip{bottom:var(--_ui5-v1-24-20_slider_handle_focused_tooltip_distance)}.ui5-slider-tickmarks li.ui5-slider-tickmark-in-range{border-inline-start:1px solid var(--_ui5-v1-24-20_slider_tickmark_in_range_bg)}:host([show-tickmarks]) .ui5-slider-progress{height:var(--_ui5-v1-24-20_slider_no_tickmarks_progress_height);border:var(--_ui5-v1-24-20_slider_no_tickmarks_active_progress_border);left:var(--_ui5-v1-24-20_slider_no_tickmarks_active_progress_left);top:var(--_ui5-v1-24-20_slider_no_tickmarks_active_progress_top)}:host([show-tickmarks]) .ui5-slider-progress-container{top:var(--_ui5-v1-24-20_slider_no_tickmarks_progress_container_top)}.ui5-slider-handle:focus:after{content:"";display:var(--_ui5-v1-24-20_slider_handle_focus_visibility);width:calc(100% + (var(--sapContent_FocusWidth) * 2) + 2px);height:calc(100% + (var(--sapContent_FocusWidth) * 2) + 2px);border:var(--sapContent_FocusWidth) dotted var(--sapContent_FocusColor);position:absolute;border-radius:var(--_ui5-v1-24-20_slider_handle_border_radius);pointer-events:none}
|
|
138
138
|
`};var ci=globalThis&&globalThis.__decorate||function(o,e,t,i){var r=arguments.length,a=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,e,t,i);else for(var d=o.length-1;d>=0;d--)(s=o[d])&&(a=(r<3?s(a):r>3?s(e,t,a):s(e,t))||a);return r>3&&a&&Object.defineProperty(e,t,a),a},_i;let fo=_i=class extends A{constructor(){super(),this.notResized=!1,this._isUserInteraction=!1,this._isInnerElementFocusing=!1,this._labelWidth=0,this._resizeHandler=this._handleResize.bind(this),this._moveHandler=this._handleMove.bind(this),this._upHandler=this._handleUp.bind(this),this._stateStorage={step:void 0,min:void 0,max:void 0,labelInterval:void 0};const e=t=>{this._onmousedown(t)};this._ontouchstart={handleEvent:e,passive:!0}}_handleMove(e){}_handleUp(){}_onmousedown(e){}_handleActionKeyPress(e){}static get ACTION_KEYS(){return[$e,we,Ae,Ie,Vl,vd,Hn,Cd,xh,aS,gt,mo,Yr,Jn,He]}static get MIN_SPACE_BETWEEN_TICKMARKS(){return 8}static get TOOLTIP_VISIBILITY(){return{VISIBLE:"visible",HIDDEN:"hidden"}}static get render(){return w}static get styles(){return nL}get classes(){return{root:{"ui5-slider-root-phone":Qe()},labelContainer:{"ui5-slider-hidden-labels":this._labelsOverlapping}}}onEnterDOM(){re.register(this,this._resizeHandler)}onExitDOM(){re.deregister(this,this._resizeHandler)}onAfterRendering(){this.notResized&&this._resizeHandler()}_onmouseover(){this.showTooltip&&(this._tooltipVisibility=_i.TOOLTIP_VISIBILITY.VISIBLE)}_onmouseout(){this.showTooltip&&!this.shadowRoot.activeElement&&(this._tooltipVisibility=_i.TOOLTIP_VISIBILITY.HIDDEN)}_onkeydown(e){this.disabled||this._effectiveStep===0||_i._isActionKey(e)&&(e.preventDefault(),this._isUserInteraction=!0,this._handleActionKeyPress(e))}_onkeyup(){this.disabled||(this._isUserInteraction=!1)}_preserveFocus(e){this._isInnerElementFocusing=e}_isFocusing(){return this._isInnerElementFocusing}_preventFocusOut(){this.focusInnerElement()}focusInnerElement(){this.focus()}_handleResize(){if(!this.showTickmarks||(this.notResized=!1,this._spaceBetweenTickmarks()<_i.MIN_SPACE_BETWEEN_TICKMARKS?(this._hiddenTickmarks=!0,this._labelsOverlapping=!0):this._hiddenTickmarks=!1,this.labelInterval<=0||this._hiddenTickmarks))return;const t=this.shadowRoot.querySelectorAll(".ui5-slider-labels li");this._labelsOverlapping=[...t].some(i=>i.scrollWidth>i.clientWidth)}handleDownBase(e){const t=this._effectiveMin,i=this._effectiveMax,r=this.getBoundingClientRect(),a=this.directionStart,s=this._effectiveStep,d=_i.getValueFromInteraction(e,s,t,i,r,a);return this._isUserInteraction=!0,window.addEventListener("mouseup",this._upHandler),window.addEventListener("touchend",this._upHandler),yd()&&e instanceof TouchEvent?window.addEventListener("touchmove",this._moveHandler):window.addEventListener("mousemove",this._moveHandler),this._handleFocusOnMouseDown(e),d}_handleFocusOnMouseDown(e){const t=this.shadowRoot.activeElement;(!t||t!==e.target)&&(this._preserveFocus(!0),this.focusInnerElement())}handleUpBase(){window.removeEventListener("mouseup",this._upHandler),window.removeEventListener("touchend",this._upHandler),window.removeEventListener("mousemove",this._moveHandler),window.removeEventListener("touchmove",this._moveHandler),this._isUserInteraction=!1,this._preserveFocus(!1)}updateStateStorageAndFireInputEvent(e){this.storePropertyState(e),this._isUserInteraction&&this.fireEvent("input")}static _isActionKey(e){return this.ACTION_KEYS.some(t=>t(e))}static clipValue(e,t,i){return e=Math.min(Math.max(e,t),i),e}static getValueFromInteraction(e,t,i,r,a,s){const d=this.getPageXValueFromEvent(e),h=this.computedValueFromPageX(d,i,r,a,s),p=this.getSteppedValue(h,t,i);return this.clipValue(p,i,r)}static getSteppedValue(e,t,i){const r=Math.abs((e-i)%t);if(t===0||r===0)return e;e=r*2>=t?e+t-r:e-r;const a=_i._getDecimalPrecisionOfNumber(t);return Number(e.toFixed(a))}static getPageXValueFromEvent(e){return yd()&&e instanceof TouchEvent?e.targetTouches&&e.targetTouches.length>0?e.targetTouches[0].pageX:0:e.pageX}static computedValueFromPageX(e,t,i,r,a){const d=(a==="left"?e-r[a]:r[a]-e)/r.width;return t+d*(i-t)}static _getDecimalPrecisionOfNumber(e){if(Number.isInteger(e))return 0;const t=String(e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return!t||t.length<2?0:Math.max(0,(t[1]?t[1].length:0)-(t[2]?Number(t[2]):0))}isCurrentStateOutdated(){return Object.entries(this._stateStorage).some(([e,t])=>this[e]!==t)}getStoredPropertyState(e){return this._stateStorage[e]}isPropertyUpdated(...e){return e.some(t=>this.getStoredPropertyState(t)!==this[t])}storePropertyState(...e){e.forEach(t=>{this._stateStorage[t]=this[t]})}get directionStart(){return this.effectiveDir==="rtl"?"right":"left"}_createLabels(){if(!this.labelInterval||!this.showTickmarks)return;const e=this.labelInterval,t=this._effectiveStep,i=(this._effectiveMax-this._effectiveMin)/(t*e);if(i===this._oldNumberOfLabels&&this._oldMin===this._effectiveMin&&this._oldMax===this._effectiveMax)return;this._oldMin=this._effectiveMin,this._oldMax=this._effectiveMax,this._oldNumberOfLabels=i,this._labelWidth=100/i,this._labelValues=[];const r=_i._getDecimalPrecisionOfNumber(t);for(let a=0;a<=i;a++){const s=(a*t*e+this._effectiveMin).toFixed(r);this._labelValues.push(s)}}_handleActionKeyPressBase(e,t){const i=_i._isIncreaseValueAction(e,this.directionStart),r=_i._isBigStepAction(e),a=this[t],s=this._effectiveMin,d=this._effectiveMax;let h=this._effectiveStep;return h=r&&(d-s)/h>10?(d-s)/10:h,mo(e)?d-a:gt(e)?(a-s)*-1:i?h:h*-1}static _isIncreaseValueAction(e,t){return t==="right"?Ae(e)||Hn(e)||$e(e)||Vl(e)||xh(e)||Yr(e):Ae(e)||Hn(e)||we(e)||vd(e)||xh(e)||Yr(e)}static _isBigStepAction(e){return Cd(e)||Hn(e)||Vl(e)||vd(e)||Yr(e)||Jn(e)}get _tickmarksCount(){return(this._effectiveMax-this._effectiveMin)/this._effectiveStep}_spaceBetweenTickmarks(){return this.getBoundingClientRect().width/this._tickmarksCount}_validateStep(e){e===0&&console.warn("The 'step' property must be a positive float number"),e<0&&console.warn("The 'step' property must be a positive float number. The provided negative number has been converted to its positve equivalent"),Number.isNaN(e)&&console.warn("The 'step' property must be a positive float number. It has been set to its default value of 1")}get _labels(){return this._labelValues||[]}get _effectiveStep(){let e=this.step;return e<0&&(e=Math.abs(e)),Number.isNaN(e)&&(e=1),e}get _effectiveMin(){return Math.min(this.min,this.max)}get _effectiveMax(){return Math.max(this.min,this.max)}get _tabIndex(){return this.disabled?"-1":"0"}get _ariaLabelledByHandleRefs(){return[`${this._id}-accName`,`${this._id}-sliderDesc`].join(" ").trim()}};ci([c({validator:We,defaultValue:0})],fo.prototype,"min",void 0);ci([c({validator:We,defaultValue:100})],fo.prototype,"max",void 0);ci([c({validator:We,defaultValue:1})],fo.prototype,"step",void 0);ci([c({validator:V,defaultValue:0})],fo.prototype,"labelInterval",void 0);ci([c({type:Boolean})],fo.prototype,"showTickmarks",void 0);ci([c({type:Boolean})],fo.prototype,"showTooltip",void 0);ci([c({type:Boolean})],fo.prototype,"disabled",void 0);ci([c()],fo.prototype,"accessibleName",void 0);ci([c({defaultValue:"hidden"})],fo.prototype,"_tooltipVisibility",void 0);ci([c({type:Boolean})],fo.prototype,"_labelsOverlapping",void 0);ci([c({type:Boolean})],fo.prototype,"_hiddenTickmarks",void 0);fo=_i=ci([f("change"),f("input")],fo);const Qo=fo;function sL(o,e,t){return t?l`<div class="ui5-slider-root ${X(this.classes.root)}" @mousedown="${this._onmousedown}" @touchstart="${this._ontouchstart}" @mouseover="${this._onmouseover}" @mouseout="${this._onmouseout}" @keydown="${this._onkeydown}" @keyup="${this._onkeyup}" part="root-container"><span id="${n(this._id)}-startHandleDesc" class="ui5-hidden-text">${n(this._ariaHandlesText.startHandleText)}</span><span id="${n(this._id)}-endHandleDesc" class="ui5-hidden-text">${n(this._ariaHandlesText.endHandleText)}</span><div class="ui5-slider-inner">${this.step?Gm.call(this,o,e,t):void 0}<div class="ui5-slider-progress-container" part="progress-container"><div class="ui5-slider-progress" part="progress-bar" style="${q(this.styles.progress)}" @focusin="${this._onfocusin}" @focusout="${this._onfocusout}" role="slider" tabindex="${n(this._tabIndex)}" aria-orientation="horizontal" aria-valuemin="${n(this.min)}" aria-valuemax="${n(this.max)}" aria-valuenow="${n(this._ariaValueNow)}" aria-valuetext="From ${n(this.startValue)} to ${n(this.endValue)}" aria-labelledby="${n(this._ariaLabelledByProgressBarRefs)}" aria-disabled="${n(this._ariaDisabled)}"></div></div><div class="ui5-slider-handle ui5-slider-handle--start" part="handle" style="${q(this.styles.startHandle)}" @focusin="${this._onfocusin}" @focusout="${this._onfocusout}" role="slider" tabindex="${n(this._tabIndex)}" aria-orientation="horizontal" aria-valuemin="${n(this.min)}" aria-valuemax="${n(this.max)}" aria-valuenow="${n(this.startValue)}" aria-labelledby="${n(this._ariaLabelledByStartHandleRefs)}" aria-disabled="${n(this._ariaDisabled)}"><${u("ui5-icon",e,t)} name="direction-arrows" slider-icon></${u("ui5-icon",e,t)}>${this.showTooltip?Ym.call(this,o,e,t):void 0}</div><div class="ui5-slider-handle ui5-slider-handle--end" part="handle" style="${q(this.styles.endHandle)}" @focusin="${this._onfocusin}" @focusout="${this._onfocusout}" role="slider" tabindex="${n(this._tabIndex)}" aria-orientation="horizontal" aria-valuemin="${n(this.min)}" aria-valuemax="${n(this.max)}" aria-valuenow="${n(this.endValue)}" aria-labelledby="${n(this._ariaLabelledByEndHandleRefs)}" aria-disabled="${n(this._ariaDisabled)}"><${u("ui5-icon",e,t)} name="direction-arrows" slider-icon></${u("ui5-icon",e,t)}>${this.showTooltip?Km.call(this,o,e,t):void 0}</div></div><span id="${n(this._id)}-accName" class="ui5-hidden-text">${n(this.accessibleName)}</span><span id="${n(this._id)}-sliderDesc" class="ui5-hidden-text">${n(this._ariaLabelledByText)}</span></div> `:l`<div class="ui5-slider-root ${X(this.classes.root)}" @mousedown="${this._onmousedown}" @touchstart="${this._ontouchstart}" @mouseover="${this._onmouseover}" @mouseout="${this._onmouseout}" @keydown="${this._onkeydown}" @keyup="${this._onkeyup}" part="root-container"><span id="${n(this._id)}-startHandleDesc" class="ui5-hidden-text">${n(this._ariaHandlesText.startHandleText)}</span><span id="${n(this._id)}-endHandleDesc" class="ui5-hidden-text">${n(this._ariaHandlesText.endHandleText)}</span><div class="ui5-slider-inner">${this.step?Gm.call(this,o,e,t):void 0}<div class="ui5-slider-progress-container" part="progress-container"><div class="ui5-slider-progress" part="progress-bar" style="${q(this.styles.progress)}" @focusin="${this._onfocusin}" @focusout="${this._onfocusout}" role="slider" tabindex="${n(this._tabIndex)}" aria-orientation="horizontal" aria-valuemin="${n(this.min)}" aria-valuemax="${n(this.max)}" aria-valuenow="${n(this._ariaValueNow)}" aria-valuetext="From ${n(this.startValue)} to ${n(this.endValue)}" aria-labelledby="${n(this._ariaLabelledByProgressBarRefs)}" aria-disabled="${n(this._ariaDisabled)}"></div></div><div class="ui5-slider-handle ui5-slider-handle--start" part="handle" style="${q(this.styles.startHandle)}" @focusin="${this._onfocusin}" @focusout="${this._onfocusout}" role="slider" tabindex="${n(this._tabIndex)}" aria-orientation="horizontal" aria-valuemin="${n(this.min)}" aria-valuemax="${n(this.max)}" aria-valuenow="${n(this.startValue)}" aria-labelledby="${n(this._ariaLabelledByStartHandleRefs)}" aria-disabled="${n(this._ariaDisabled)}"><ui5-icon name="direction-arrows" slider-icon></ui5-icon>${this.showTooltip?Ym.call(this,o,e,t):void 0}</div><div class="ui5-slider-handle ui5-slider-handle--end" part="handle" style="${q(this.styles.endHandle)}" @focusin="${this._onfocusin}" @focusout="${this._onfocusout}" role="slider" tabindex="${n(this._tabIndex)}" aria-orientation="horizontal" aria-valuemin="${n(this.min)}" aria-valuemax="${n(this.max)}" aria-valuenow="${n(this.endValue)}" aria-labelledby="${n(this._ariaLabelledByEndHandleRefs)}" aria-disabled="${n(this._ariaDisabled)}"><ui5-icon name="direction-arrows" slider-icon></ui5-icon>${this.showTooltip?Km.call(this,o,e,t):void 0}</div></div><span id="${n(this._id)}-accName" class="ui5-hidden-text">${n(this.accessibleName)}</span><span id="${n(this._id)}-sliderDesc" class="ui5-hidden-text">${n(this._ariaLabelledByText)}</span></div> `}function Gm(o,e,t){return l`${this.showTickmarks?dL.call(this,o,e,t):void 0}`}function dL(o,e,t){return l`<ul class="ui5-slider-tickmarks">${T(this.tickmarksObject,(i,r)=>i._id||r,(i,r)=>lL.call(this,o,e,t,i,r))}</ul>${this.labelInterval?hL.call(this,o,e,t):void 0}`}function lL(o,e,t,i,r){return l`${i?cL.call(this,o,e,t,i,r):uL.call(this,o,e,t,i,r)}`}function cL(o,e,t,i,r){return l`<li class="ui5-slider-tickmark ui5-slider-tickmark-in-range"></li>`}function uL(o,e,t,i,r){return l`<li class="ui5-slider-tickmark"></li>`}function hL(o,e,t){return l`<ul class="ui5-slider-labels ${X(this.classes.labelContainer)}" style="${q(this.styles.labelContainer)}">${T(this._labels,(i,r)=>i._id||r,(i,r)=>pL.call(this,o,e,t,i,r))}</ul>`}function pL(o,e,t,i,r){return l`<li style="${q(this.styles.label)}">${n(i)}</li>`}function Ym(o,e,t){return l`<div class="ui5-slider-tooltip ui5-slider-tooltip--start" style="${q(this.styles.tooltip)}"><span class="ui5-slider-tooltip-value">${n(this.tooltipStartValue)}</span></div>`}function Km(o,e,t){return l`<div class="ui5-slider-tooltip ui5-slider-tooltip--end" style="${q(this.styles.tooltip)}"><span class="ui5-slider-tooltip-value">${n(this.tooltipEndValue)}</span></div>`}g("@ui5/webcomponents-theming","sap_horizon",async()=>y);g("@ui5/webcomponents","sap_horizon",async()=>J);const Y5={packageName:"@ui5/webcomponents",fileName:"themes/RangeSlider.css.ts",content:`:host([ui5-range-slider]) .ui5-slider-progress-container:before{background-color:var(--_ui5-v1-24-20_slider_progress_container_dot_background)}.ui5-slider-root:hover:active .ui5-slider-handle:not(:focus){background:var(--sapSlider_RangeHandleBackground)}:host([range-pressed]) .ui5-slider-root:active .ui5-slider-handle:not(:focus){background:var(--_ui5-v1-24-20_range_slider_handle_active_background);border:var(--_ui5-v1-24-20_slider_handle_focus_border);box-shadow:none}:host([range-pressed]) .ui5-slider-handle [slider-icon]{display:var(--_ui5-v1-24-20_range_slider_active_handle_icon_display)}.ui5-slider-root:not(.ui5-slider-root-phone):focus .ui5-slider-inner .ui5-slider-handle,.ui5-slider-root:not(.ui5-slider-root-phone) .ui5-slider-inner .ui5-slider-handle:focus{background:var(--_ui5-v1-24-20_range_slider_handle_background_focus)}.ui5-slider-root:not(.ui5-slider-root-phone) .ui5-slider-inner .ui5-slider-handle:focus [slider-icon]{display:none}.ui5-slider-root:not(.ui5-slider-root-phone) .ui5-slider-progress:focus:before{display:var(--_ui5-v1-24-20_range_slider_legacy_progress_focus_display);content:"";position:absolute;width:var(--_ui5-v1-24-20_range_slider_focus_outline_width);border:var(--_ui5-v1-24-20_slider_progress_outline);border-radius:var(--_ui5-v1-24-20_range_slider_focus_outline_radius);top:var(--_ui5-v1-24-20_slider_progress_outline_offset);height:var(--_ui5-v1-24-20_slider_outer_height);box-sizing:border-box;left:var(--_ui5-v1-24-20_slider_progress_outline_offset_left)}.ui5-slider-progress{position:relative}.ui5-slider-progress:focus:after{border:.125rem solid var(--sapContent_FocusColor);border-radius:.5rem;content:"";display:var(--_ui5-v1-24-20_range_slider_progress_focus_display);position:absolute;top:var(--_ui5-v1-24-20_range_slider_progress_focus_top);left:var(--_ui5-v1-24-20_range_slider_progress_focus_left);padding:var(--_ui5-v1-24-20_range_slider_progress_focus_padding);width:var(--_ui5-v1-24-20_range_slider_progress_focus_width);height:var(--_ui5-v1-24-20_range_slider_progress_focus_height);box-sizing:border-box}.ui5-slider-handle{background:var(--_ui5-v1-24-20_range_slider_handle_background)}.ui5-slider-progress-container:hover~.ui5-slider-handle:not(:focus),.ui5-slider-handle:hover{background:var(--_ui5-v1-24-20_range_slider_root_hover_handle_bg)}.ui5-slider-root:hover .ui5-slider-handle:not(:focus) [slider-icon]{display:var(--_ui5-v1-24-20_range_slider_root_hover_handle_icon_display)}:host([range-pressed]) .ui5-slider-root:active .ui5-slider-handle:not(:focus) [slider-icon]{display:var(--_ui5-v1-24-20_range_slider_root_active_handle_icon_display)}
|
|
139
|
-
`};var Pu=globalThis&&globalThis.__decorate||function(o,e,t,i){var r=arguments.length,a=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,e,t,i);else for(var d=o.length-1;d>=0;d--)(s=o[d])&&(a=(r<3?s(a):r>3?s(e,t,a):s(e,t))||a);return r>3&&a&&Object.defineProperty(e,t,a),a},Ur;let dn=Ur=class extends Qo{constructor(){super(),this._isPressInCurrentRange=!1,this._handeIsPressed=!1,this._reversedValues=!1,this._stateStorage.startValue=void 0,this._stateStorage.endValue=void 0}get tooltipStartValue(){const t=this.constructor._getDecimalPrecisionOfNumber(this._effectiveStep);return this.startValue.toFixed(t)}get tooltipEndValue(){const t=this.constructor._getDecimalPrecisionOfNumber(this._effectiveStep);return this.endValue.toFixed(t)}get _ariaDisabled(){return this.disabled||void 0}get _ariaLabelledByText(){return Ur.i18nBundle.getText(LC)}get _ariaHandlesText(){const e=this.effectiveDir==="rtl",t=this._areValuesReversed(),i={};return e&&!t||!e&&t?(i.startHandleText=Ur.i18nBundle.getText(Ig),i.endHandleText=Ur.i18nBundle.getText(Cg)):(i.startHandleText=Ur.i18nBundle.getText(Cg),i.endHandleText=Ur.i18nBundle.getText(Ig)),i}get _ariaValueNow(){return Math.abs(this.endValue-this.startValue)}onBeforeRendering(){if(this.startValue>this.endValue){const e=this._valueAffected==="startValue"?"endValue":"startValue";this._swapValues(),this._setAffectedValue(e),this.update(e,this.startValue,this.endValue)}this.isCurrentStateOutdated()&&(this.notResized=!0,this.syncUIAndState(),this._updateHandlesAndRange(0))}syncUIAndState(){if(this.isPropertyUpdated("step")&&(this._validateStep(this.step),this.storePropertyState("step")),this.isPropertyUpdated("min","max","startValue","endValue")){this.storePropertyState("min","max");const e=Qo.clipValue(this.startValue,this._effectiveMin,this._effectiveMax);this.startValue=e,this.updateStateStorageAndFireInputEvent("startValue"),this.storePropertyState("startValue");const t=Qo.clipValue(this.endValue,this._effectiveMin,this._effectiveMax);this.endValue=t,this.updateStateStorageAndFireInputEvent("endValue"),this.storePropertyState("endValue")}this.labelInterval&&this.showTickmarks&&this._createLabels(),this.isPropertyUpdated("labelInterval")&&this.storePropertyState("labelInterval")}_onfocusin(){this._endValueInitial||(this._startValueInitial=this.startValue,this._endValueInitial=this.endValue),this.showTooltip&&(this._tooltipVisibility=Qo.TOOLTIP_VISIBILITY.VISIBLE)}_onfocusout(){if(this._isFocusing()){this._preventFocusOut();return}this._setAffectedValue(void 0),this._startValueInitial=void 0,this._endValueInitial=void 0,this.showTooltip&&(this._tooltipVisibility=Qo.TOOLTIP_VISIBILITY.HIDDEN)}_onkeyup(){super._onkeyup(),this._setAffectedValue(void 0),(this.startValue!==this._startValueAtBeginningOfAction||this.endValue!==this._endValueAtBeginningOfAction)&&this.fireEvent("change"),this._startValueAtBeginningOfAction=void 0,this._endValueAtBeginningOfAction=void 0}_handleActionKeyPress(e){if(this._startValueAtBeginningOfAction=this.startValue,this._endValueAtBeginningOfAction=this.endValue,He(e)){this.update(void 0,this._startValueInitial,this._endValueInitial);return}this._setAffectedValueByFocusedElement();const t=this._effectiveMin,i=this._effectiveMax,r=this._valueAffected;if((mo(e)||gt(e))&&!r){this._homeEndForSelectedRange(e,gt(e)?"startValue":"endValue",t,i);return}const a=this._handleActionKeyPressBase(e,r);if(!a)return;const s=this.constructor;if(r&&!this._isPressInCurrentRange){const d=this[r],h=s.clipValue(a+d,t,i);this.update(r,h,void 0)}else if(a<0&&this.startValue>t||a>0&&this.endValue<i){const d=s.clipValue(a+this.startValue,t,i),h=s.clipValue(a+this.endValue,t,i);this.update(r,d,h)}}_setAffectedValueByFocusedElement(){this.shadowRoot.activeElement===this._startHandle&&this._setAffectedValue("startValue"),this.shadowRoot.activeElement===this._endHandle&&this._setAffectedValue("endValue"),this.shadowRoot.activeElement===this._progressBar&&this._setAffectedValue(void 0),this._setIsPressInCurrentRange(!this._valueAffected)}_homeEndForSelectedRange(e,t,i,r){const a=this._handleActionKeyPressBase(e,t),s=this.constructor,d=s.clipValue(a+this.startValue,i,r),h=s.clipValue(a+this.endValue,i,r);this.update(void 0,d,h)}update(e,t,i){if(!e)this.startValue=t,this.updateStateStorageAndFireInputEvent("startValue"),this.endValue=i,this.updateStateStorageAndFireInputEvent("endValue"),this._updateHandlesAndRange(0);else{const r=i&&e==="endValue"?i:t;this._updateHandlesAndRange(r||0),e==="startValue"&&(this.startValue=r,this.updateStateStorageAndFireInputEvent("startValue")),e==="endValue"&&(this.endValue=r,this.updateStateStorageAndFireInputEvent("endValue"))}}_onmousedown(e){if(this.disabled||this._effectiveStep===0)return;const t=this.handleDownBase(e);if(this._saveInteractionStartData(e,t),this.rangePressed=this._isPressInCurrentRange,this._isPressInCurrentRange||this._handeIsPressed){this._handeIsPressed=!1;return}this.update(this._valueAffected,t,void 0)}_saveInteractionStartData(e,t){const i=this.shadowRoot.querySelector(".ui5-slider-progress").getBoundingClientRect();this._startValueAtBeginningOfAction=this.startValue,this._endValueAtBeginningOfAction=this.endValue;const r=this.constructor;this._initialPageXPosition=r.getPageXValueFromEvent(e),this._pressTargetAndAffectedValue(this._initialPageXPosition,t),this._initialStartHandlePageX=this.directionStart==="left"?i.left:i.right}_handleMove(e){if(e.preventDefault(),!(this.disabled||this._effectiveStep===0)){if(!this._isPressInCurrentRange){this._updateValueOnHandleDrag(e);return}this._updateValueOnRangeDrag(e)}}_updateValueOnHandleDrag(e){const i=this.constructor.getValueFromInteraction(e,this._effectiveStep,this._effectiveMin,this._effectiveMax,this.getBoundingClientRect(),this.directionStart);this.update(this._valueAffected,i,void 0)}_updateValueOnRangeDrag(e){const i=this.constructor.getPageXValueFromEvent(e),r=this._calculateRangeOffset(i,this._initialStartHandlePageX);this._setAffectedValue(void 0),this.update(void 0,r[0],r[1])}_handleUp(){this._setAffectedValueByFocusedElement(),this._setAffectedValue(void 0),(this.startValue!==this._startValueAtBeginningOfAction||this.endValue!==this._endValueAtBeginningOfAction)&&this.fireEvent("change"),this._setIsPressInCurrentRange(!1),this.handleUpBase(),this.rangePressed=!1,this._startValueAtBeginningOfAction=void 0,this._endValueAtBeginningOfAction=void 0}_pressTargetAndAffectedValue(e,t){const i=this.shadowRoot.querySelector(".ui5-slider-handle--start"),r=this.shadowRoot.querySelector(".ui5-slider-handle--end"),a=i.getBoundingClientRect(),s=r.getBoundingClientRect(),d=e>=a.left&&e<=a.right,h=e>=s.left&&e<=s.right;(h||d)&&(this._handeIsPressed=!0),(h||t>this.endValue)&&this._setAffectedValue("endValue"),(d||t<this.startValue)&&this._setAffectedValue("startValue");const p=this._startValueAtBeginningOfAction!==void 0&&this._endValueAtBeginningOfAction!==void 0&&t>=this._startValueAtBeginningOfAction&&t<=this._endValueAtBeginningOfAction;this._setIsPressInCurrentRange(this._valueAffected||this._handeIsPressed?!1:p)}_setAffectedValue(e){this._valueAffected=e,this._areValuesReversed()&&this._setValuesAreReversed()}_setIsPressInCurrentRange(e){this._isPressInCurrentRange=e}focusInnerElement(){const e=this._areValuesReversed(),t=this._valueAffected;(this._isPressInCurrentRange||!t)&&this._progressBar.focus(),(t==="startValue"&&!e||t==="endValue"&&e)&&this._startHandle.focus(),(t==="endValue"&&!e||t==="startValue"&&e)&&this._endHandle.focus()}_calculateRangeOffset(e,t){if(this._initialPageXPosition===e)return[this.startValue,this.endValue];const i=this._effectiveMin,r=this._effectiveMax,a=this.endValue-this.startValue;let s=this._calculateStartValueByOffset(e,t);return s=this.constructor.clipValue(s,i,r-a),[s,s+a]}_calculateStartValueByOffset(e,t){const i=this._effectiveMin,r=this._effectiveMax,a=this._effectiveStep,s=this.getBoundingClientRect();let d,h,p;const _=this.constructor;return e>this._initialPageXPosition?(p=e-this._initialPageXPosition,h=t+p,d=_.computedValueFromPageX(h,i,r,s,this.directionStart),d=_.getSteppedValue(d,a,i)):(p=this._initialPageXPosition-e,h=t-p,d=_.computedValueFromPageX(h,i,r,s,this.directionStart),d=_.getSteppedValue(d,a,i)),d}_updateHandlesAndRange(e){const t=this._effectiveMax,i=this._effectiveMin,r=this.getStoredPropertyState("startValue")||0,a=this.getStoredPropertyState("endValue")||0,s=this._valueAffected;s==="startValue"?(this._selectedRange=(a-e)/(t-i),this._firstHandlePositionFromStart=(e-i)/(t-i)*100):s==="endValue"?(this._selectedRange=(e-r)/(t-i),this._secondHandlePositionFromStart=(e-i)/(t-i)*100):(this._selectedRange=(this.endValue-this.startValue)/(t-i),this._firstHandlePositionFromStart=(this.startValue-i)/(t-i)*100,this._secondHandlePositionFromStart=(this.endValue-i)/(t-i)*100)}_swapValues(){const e=this._valueAffected;if(e){if(e==="startValue"&&this.startValue>this.endValue){const t=this.endValue;this.endValue=this.startValue,this.startValue=t}if(e==="endValue"&&this.endValue<this.startValue){const t=this.startValue;this.startValue=this.endValue,this.endValue=t}this._setValuesAreReversed(),this._updateHandlesAndRange(this[e]),this.focusInnerElement(),this.syncUIAndState()}}_setValuesAreReversed(){this._reversedValues=!this._reversedValues}_areValuesReversed(){return this._reversedValues}get tickmarksObject(){const e=this._tickmarksCount,t=[];if(this._hiddenTickmarks)return[!1,!1];for(let i=0;i<=e;i++){const r=this._effectiveMin+i*this.step>=this.startValue,a=this._effectiveMin+i*this.step<=this.endValue;t.push(r&&a)}return t}get _startHandle(){return this.shadowRoot.querySelector(".ui5-slider-handle--start")}get _endHandle(){return this.shadowRoot.querySelector(".ui5-slider-handle--end")}get _progressBar(){return this.shadowRoot.querySelector(".ui5-slider-progress")}get _ariaLabelledByStartHandleRefs(){return[`${this._id}-accName`,`${this._id}-startHandleDesc`].join(" ").trim()}get _ariaLabelledByEndHandleRefs(){return[`${this._id}-accName`,`${this._id}-endHandleDesc`].join(" ").trim()}get _ariaLabelledByProgressBarRefs(){return[`${this._id}-accName`,`${this._id}-sliderDesc`].join(" ").trim()}get styles(){return{progress:{width:`${this._selectedRange*100}%`,"transform-origin":`${this.directionStart} top`,[this.directionStart]:`${this._firstHandlePositionFromStart}%`},startHandle:{[this.directionStart]:`${this._firstHandlePositionFromStart}%`},endHandle:{[this.directionStart]:`${this._secondHandlePositionFromStart}%`},label:{width:`${this._labelWidth}%`},labelContainer:{width:"100%",[this.directionStart]:`-${this._labelWidth/2}%`},tooltip:{visibility:`${this._tooltipVisibility}`}}}static async onDefine(){Ur.i18nBundle=await L("@ui5/webcomponents")}};Pu([c({validator:We,defaultValue:0})],dn.prototype,"startValue",void 0);Pu([c({validator:We,defaultValue:100})],dn.prototype,"endValue",void 0);Pu([c({type:Boolean})],dn.prototype,"rangePressed",void 0);dn=Ur=Pu([x({tag:"ui5-range-slider",languageAware:!0,template:sL,dependencies:[W],styles:[Qo.styles,Y5]})],dn);dn.define();const _L=dn;g("@ui5/webcomponents-theming","sap_horizon",async()=>y);g("@sapudex/web-components","sap_horizon",async()=>P);const K5={packageName:"@sapudex/web-components",fileName:"themes/Slider.css.ts",content:`:host{--udex-slider-color-track-start-point: var( --sapSlider_Selected_Background, #0070f2 );--udex-slider-color-track-active: var( --sapSlider_Selected_Background, #0070f2 );--udex-slider-color-handle-focus-range: var( --sapSlider_Selected_BorderColor, #0070f2 );--udex-slider-color-handle-active-background: var( --sapSlider_Active_HandleBackground, #ffffff );--udex-slider-color-handle-default-icon: var( --sapContent_Selected_ForegroundColor, #0040b0 );--udex-slider-radius-range-size: var(---udexRadiusM, .5rem)}:host{font-family:var(--sapFontFamily);font-weight:var(--udexTypographyFontWeightRegular, 400);font-size:var(--udexTypographyNavigationRegularMFontSize, 14px);line-height:var(--udexTypographyHeadingLineHeight, 1.1);color:var(--sapContent_MeasureIndicatorColor, #5b738b);height:74px}.ui5-slider-progress-container:before{background-color:var(--udex-slider-color-track-start-point)}.ui5-slider-progress{background-color:var(--udex-slider-color-track-active)}.ui5-slider-progress:focus:after{border:2px solid var(--udex-slider-color-handle-focus-range);border-radius:var(--udex-slider-radius-range-size)}:host([desktop]) .ui5-slider-handle:focus,.ui5-slider-handle:focus-visible{background-color:var(--_ui5-v0-192-2_range_slider_handle_background_focus)}:host .ui5-slider-inner .ui5-slider-labels{top:34px}:host .ui5-slider-inner .ui5-slider-labels li{height:1.375rem;font-family:var(--sapFontFamily);font-size:var(--udexTypographyNavigationRegularMFontSize, 14px)}[slider-icon]{color:var(--udex-slider-color-handle-default-icon)}
|
|
139
|
+
`};var Pu=globalThis&&globalThis.__decorate||function(o,e,t,i){var r=arguments.length,a=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,e,t,i);else for(var d=o.length-1;d>=0;d--)(s=o[d])&&(a=(r<3?s(a):r>3?s(e,t,a):s(e,t))||a);return r>3&&a&&Object.defineProperty(e,t,a),a},Ur;let dn=Ur=class extends Qo{constructor(){super(),this._isPressInCurrentRange=!1,this._handeIsPressed=!1,this._reversedValues=!1,this._stateStorage.startValue=void 0,this._stateStorage.endValue=void 0}get tooltipStartValue(){const t=this.constructor._getDecimalPrecisionOfNumber(this._effectiveStep);return this.startValue.toFixed(t)}get tooltipEndValue(){const t=this.constructor._getDecimalPrecisionOfNumber(this._effectiveStep);return this.endValue.toFixed(t)}get _ariaDisabled(){return this.disabled||void 0}get _ariaLabelledByText(){return Ur.i18nBundle.getText(LC)}get _ariaHandlesText(){const e=this.effectiveDir==="rtl",t=this._areValuesReversed(),i={};return e&&!t||!e&&t?(i.startHandleText=Ur.i18nBundle.getText(Ig),i.endHandleText=Ur.i18nBundle.getText(Cg)):(i.startHandleText=Ur.i18nBundle.getText(Cg),i.endHandleText=Ur.i18nBundle.getText(Ig)),i}get _ariaValueNow(){return Math.abs(this.endValue-this.startValue)}onBeforeRendering(){if(this.startValue>this.endValue){const e=this._valueAffected==="startValue"?"endValue":"startValue";this._swapValues(),this._setAffectedValue(e),this.update(e,this.startValue,this.endValue)}this.isCurrentStateOutdated()&&(this.notResized=!0,this.syncUIAndState(),this._updateHandlesAndRange(0))}syncUIAndState(){if(this.isPropertyUpdated("step")&&(this._validateStep(this.step),this.storePropertyState("step")),this.isPropertyUpdated("min","max","startValue","endValue")){this.storePropertyState("min","max");const e=Qo.clipValue(this.startValue,this._effectiveMin,this._effectiveMax);this.startValue=e,this.updateStateStorageAndFireInputEvent("startValue"),this.storePropertyState("startValue");const t=Qo.clipValue(this.endValue,this._effectiveMin,this._effectiveMax);this.endValue=t,this.updateStateStorageAndFireInputEvent("endValue"),this.storePropertyState("endValue")}this.labelInterval&&this.showTickmarks&&this._createLabels(),this.isPropertyUpdated("labelInterval")&&this.storePropertyState("labelInterval")}_onfocusin(){this._endValueInitial||(this._startValueInitial=this.startValue,this._endValueInitial=this.endValue),this.showTooltip&&(this._tooltipVisibility=Qo.TOOLTIP_VISIBILITY.VISIBLE)}_onfocusout(){if(this._isFocusing()){this._preventFocusOut();return}this._setAffectedValue(void 0),this._startValueInitial=void 0,this._endValueInitial=void 0,this.showTooltip&&(this._tooltipVisibility=Qo.TOOLTIP_VISIBILITY.HIDDEN)}_onkeyup(){super._onkeyup(),this._setAffectedValue(void 0),(this.startValue!==this._startValueAtBeginningOfAction||this.endValue!==this._endValueAtBeginningOfAction)&&this.fireEvent("change"),this._startValueAtBeginningOfAction=void 0,this._endValueAtBeginningOfAction=void 0}_handleActionKeyPress(e){if(this._startValueAtBeginningOfAction=this.startValue,this._endValueAtBeginningOfAction=this.endValue,He(e)){this.update(void 0,this._startValueInitial,this._endValueInitial);return}this._setAffectedValueByFocusedElement();const t=this._effectiveMin,i=this._effectiveMax,r=this._valueAffected;if((mo(e)||gt(e))&&!r){this._homeEndForSelectedRange(e,gt(e)?"startValue":"endValue",t,i);return}const a=this._handleActionKeyPressBase(e,r);if(!a)return;const s=this.constructor;if(r&&!this._isPressInCurrentRange){const d=this[r],h=s.clipValue(a+d,t,i);this.update(r,h,void 0)}else if(a<0&&this.startValue>t||a>0&&this.endValue<i){const d=s.clipValue(a+this.startValue,t,i),h=s.clipValue(a+this.endValue,t,i);this.update(r,d,h)}}_setAffectedValueByFocusedElement(){this.shadowRoot.activeElement===this._startHandle&&this._setAffectedValue("startValue"),this.shadowRoot.activeElement===this._endHandle&&this._setAffectedValue("endValue"),this.shadowRoot.activeElement===this._progressBar&&this._setAffectedValue(void 0),this._setIsPressInCurrentRange(!this._valueAffected)}_homeEndForSelectedRange(e,t,i,r){const a=this._handleActionKeyPressBase(e,t),s=this.constructor,d=s.clipValue(a+this.startValue,i,r),h=s.clipValue(a+this.endValue,i,r);this.update(void 0,d,h)}update(e,t,i){if(!e)this.startValue=t,this.updateStateStorageAndFireInputEvent("startValue"),this.endValue=i,this.updateStateStorageAndFireInputEvent("endValue"),this._updateHandlesAndRange(0);else{const r=i&&e==="endValue"?i:t;this._updateHandlesAndRange(r||0),e==="startValue"&&(this.startValue=r,this.updateStateStorageAndFireInputEvent("startValue")),e==="endValue"&&(this.endValue=r,this.updateStateStorageAndFireInputEvent("endValue"))}}_onmousedown(e){if(this.disabled||this._effectiveStep===0)return;const t=this.handleDownBase(e);if(this._saveInteractionStartData(e,t),this.rangePressed=this._isPressInCurrentRange,this._isPressInCurrentRange||this._handeIsPressed){this._handeIsPressed=!1;return}this.update(this._valueAffected,t,void 0)}_saveInteractionStartData(e,t){const i=this.shadowRoot.querySelector(".ui5-slider-progress").getBoundingClientRect();this._startValueAtBeginningOfAction=this.startValue,this._endValueAtBeginningOfAction=this.endValue;const r=this.constructor;this._initialPageXPosition=r.getPageXValueFromEvent(e),this._pressTargetAndAffectedValue(this._initialPageXPosition,t),this._initialStartHandlePageX=this.directionStart==="left"?i.left:i.right}_handleMove(e){if(e.preventDefault(),!(this.disabled||this._effectiveStep===0)){if(!this._isPressInCurrentRange){this._updateValueOnHandleDrag(e);return}this._updateValueOnRangeDrag(e)}}_updateValueOnHandleDrag(e){const i=this.constructor.getValueFromInteraction(e,this._effectiveStep,this._effectiveMin,this._effectiveMax,this.getBoundingClientRect(),this.directionStart);this.update(this._valueAffected,i,void 0)}_updateValueOnRangeDrag(e){const i=this.constructor.getPageXValueFromEvent(e),r=this._calculateRangeOffset(i,this._initialStartHandlePageX);this._setAffectedValue(void 0),this.update(void 0,r[0],r[1])}_handleUp(){this._setAffectedValueByFocusedElement(),this._setAffectedValue(void 0),(this.startValue!==this._startValueAtBeginningOfAction||this.endValue!==this._endValueAtBeginningOfAction)&&this.fireEvent("change"),this._setIsPressInCurrentRange(!1),this.handleUpBase(),this.rangePressed=!1,this._startValueAtBeginningOfAction=void 0,this._endValueAtBeginningOfAction=void 0}_pressTargetAndAffectedValue(e,t){const i=this.shadowRoot.querySelector(".ui5-slider-handle--start"),r=this.shadowRoot.querySelector(".ui5-slider-handle--end"),a=i.getBoundingClientRect(),s=r.getBoundingClientRect(),d=e>=a.left&&e<=a.right,h=e>=s.left&&e<=s.right;(h||d)&&(this._handeIsPressed=!0),(h||t>this.endValue)&&this._setAffectedValue("endValue"),(d||t<this.startValue)&&this._setAffectedValue("startValue");const p=this._startValueAtBeginningOfAction!==void 0&&this._endValueAtBeginningOfAction!==void 0&&t>=this._startValueAtBeginningOfAction&&t<=this._endValueAtBeginningOfAction;this._setIsPressInCurrentRange(this._valueAffected||this._handeIsPressed?!1:p)}_setAffectedValue(e){this._valueAffected=e,this._areValuesReversed()&&this._setValuesAreReversed()}_setIsPressInCurrentRange(e){this._isPressInCurrentRange=e}focusInnerElement(){const e=this._areValuesReversed(),t=this._valueAffected;(this._isPressInCurrentRange||!t)&&this._progressBar.focus(),(t==="startValue"&&!e||t==="endValue"&&e)&&this._startHandle.focus(),(t==="endValue"&&!e||t==="startValue"&&e)&&this._endHandle.focus()}_calculateRangeOffset(e,t){if(this._initialPageXPosition===e)return[this.startValue,this.endValue];const i=this._effectiveMin,r=this._effectiveMax,a=this.endValue-this.startValue;let s=this._calculateStartValueByOffset(e,t);return s=this.constructor.clipValue(s,i,r-a),[s,s+a]}_calculateStartValueByOffset(e,t){const i=this._effectiveMin,r=this._effectiveMax,a=this._effectiveStep,s=this.getBoundingClientRect();let d,h,p;const _=this.constructor;return e>this._initialPageXPosition?(p=e-this._initialPageXPosition,h=t+p,d=_.computedValueFromPageX(h,i,r,s,this.directionStart),d=_.getSteppedValue(d,a,i)):(p=this._initialPageXPosition-e,h=t-p,d=_.computedValueFromPageX(h,i,r,s,this.directionStart),d=_.getSteppedValue(d,a,i)),d}_updateHandlesAndRange(e){const t=this._effectiveMax,i=this._effectiveMin,r=this.getStoredPropertyState("startValue")||0,a=this.getStoredPropertyState("endValue")||0,s=this._valueAffected;s==="startValue"?(this._selectedRange=(a-e)/(t-i),this._firstHandlePositionFromStart=(e-i)/(t-i)*100):s==="endValue"?(this._selectedRange=(e-r)/(t-i),this._secondHandlePositionFromStart=(e-i)/(t-i)*100):(this._selectedRange=(this.endValue-this.startValue)/(t-i),this._firstHandlePositionFromStart=(this.startValue-i)/(t-i)*100,this._secondHandlePositionFromStart=(this.endValue-i)/(t-i)*100)}_swapValues(){const e=this._valueAffected;if(e){if(e==="startValue"&&this.startValue>this.endValue){const t=this.endValue;this.endValue=this.startValue,this.startValue=t}if(e==="endValue"&&this.endValue<this.startValue){const t=this.startValue;this.startValue=this.endValue,this.endValue=t}this._setValuesAreReversed(),this._updateHandlesAndRange(this[e]),this.focusInnerElement(),this.syncUIAndState()}}_setValuesAreReversed(){this._reversedValues=!this._reversedValues}_areValuesReversed(){return this._reversedValues}get tickmarksObject(){const e=this._tickmarksCount,t=[];if(this._hiddenTickmarks)return[!1,!1];for(let i=0;i<=e;i++){const r=this._effectiveMin+i*this.step>=this.startValue,a=this._effectiveMin+i*this.step<=this.endValue;t.push(r&&a)}return t}get _startHandle(){return this.shadowRoot.querySelector(".ui5-slider-handle--start")}get _endHandle(){return this.shadowRoot.querySelector(".ui5-slider-handle--end")}get _progressBar(){return this.shadowRoot.querySelector(".ui5-slider-progress")}get _ariaLabelledByStartHandleRefs(){return[`${this._id}-accName`,`${this._id}-startHandleDesc`].join(" ").trim()}get _ariaLabelledByEndHandleRefs(){return[`${this._id}-accName`,`${this._id}-endHandleDesc`].join(" ").trim()}get _ariaLabelledByProgressBarRefs(){return[`${this._id}-accName`,`${this._id}-sliderDesc`].join(" ").trim()}get styles(){return{progress:{width:`${this._selectedRange*100}%`,"transform-origin":`${this.directionStart} top`,[this.directionStart]:`${this._firstHandlePositionFromStart}%`},startHandle:{[this.directionStart]:`${this._firstHandlePositionFromStart}%`},endHandle:{[this.directionStart]:`${this._secondHandlePositionFromStart}%`},label:{width:`${this._labelWidth}%`},labelContainer:{width:"100%",[this.directionStart]:`-${this._labelWidth/2}%`},tooltip:{visibility:`${this._tooltipVisibility}`}}}static async onDefine(){Ur.i18nBundle=await L("@ui5/webcomponents")}};Pu([c({validator:We,defaultValue:0})],dn.prototype,"startValue",void 0);Pu([c({validator:We,defaultValue:100})],dn.prototype,"endValue",void 0);Pu([c({type:Boolean})],dn.prototype,"rangePressed",void 0);dn=Ur=Pu([x({tag:"ui5-range-slider",languageAware:!0,template:sL,dependencies:[W],styles:[Qo.styles,Y5]})],dn);dn.define();const _L=dn;g("@ui5/webcomponents-theming","sap_horizon",async()=>y);g("@sapudex/web-components","sap_horizon",async()=>P);const K5={packageName:"@sapudex/web-components",fileName:"themes/Slider.css.ts",content:`:host{--udex-slider-color-track-start-point: var( --sapSlider_Selected_Background, #0070f2 );--udex-slider-color-track-active: var( --sapSlider_Selected_Background, #0070f2 );--udex-slider-color-handle-focus-range: var( --sapSlider_Selected_BorderColor, #0070f2 );--udex-slider-color-handle-active-background: var( --sapSlider_Active_HandleBackground, #ffffff );--udex-slider-color-handle-default-icon: var( --sapContent_Selected_ForegroundColor, #0040b0 );--udex-slider-radius-range-size: var(---udexRadiusM, .5rem)}:host{font-family:var(--sapFontFamily);font-weight:var(--udexTypographyFontWeightRegular, 400);font-size:var(--udexTypographyNavigationRegularMFontSize, 14px);line-height:var(--udexTypographyHeadingLineHeight, 1.1);color:var(--sapContent_MeasureIndicatorColor, #5b738b);height:74px}.ui5-slider-progress-container:before{background-color:var(--udex-slider-color-track-start-point)}.ui5-slider-progress{background-color:var(--udex-slider-color-track-active)}.ui5-slider-progress:focus:after{border:2px solid var(--udex-slider-color-handle-focus-range);border-radius:var(--udex-slider-radius-range-size)}:host([desktop]) .ui5-slider-handle:focus,.ui5-slider-handle:focus-visible{background-color:var(--_ui5-v0-192-4_range_slider_handle_background_focus)}:host .ui5-slider-inner .ui5-slider-labels{top:34px}:host .ui5-slider-inner .ui5-slider-labels li{height:1.375rem;font-family:var(--sapFontFamily);font-size:var(--udexTypographyNavigationRegularMFontSize, 14px)}[slider-icon]{color:var(--udex-slider-color-handle-default-icon)}
|
|
140
140
|
`};var vL=globalThis&&globalThis.__decorate||function(o,e,t,i){var r=arguments.length,a=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,e,t,i);else for(var d=o.length-1;d>=0;d--)(s=o[d])&&(a=(r<3?s(a):r>3?s(e,t,a):s(e,t))||a);return r>3&&a&&Object.defineProperty(e,t,a),a};let Qp=class extends _L{onEnterDOM(){_e()&&this.setAttribute("desktop","")}};Qp=vL([x({tag:"udex-range-slider",renderer:w,styles:[Qo.styles,Y5,K5]})],Qp);Qp.define();function gL(o,e,t){return l`<div class="ui5-rating-indicator-root" role="slider" aria-roledescription="${n(this._ariaRoleDescription)}" aria-valuemin="0" aria-valuenow="${n(this.value)}" aria-valuemax="${n(this.max)}" aria-valuetext="${n(this.value)} of ${n(this.max)}" aria-orientation="horizontal" aria-disabled="${n(this._ariaDisabled)}" aria-readonly="${n(this.ariaReadonly)}" aria-description="${n(this._ariaDescription)}" tabindex="${n(this.effectiveTabIndex)}" @focusin="${this._onfocusin}" @focusout="${this._onfocusout}" @click="${this._onclick}" @keydown="${this._onkeydown}" title="${n(this.ratingTooltip)}" aria-label="${n(this._ariaLabel)}"><ul class="ui5-rating-indicator-list" aria-hidden="true">${T(this._stars,(i,r)=>i._id||r,(i,r)=>mL.call(this,o,e,t,i,r))}</ul></div>`}function mL(o,e,t,i,r){return l`${i.selected?bL.call(this,o,e,t,i,r):fL.call(this,o,e,t,i,r)}`}function bL(o,e,t,i,r){return t?l`<li data-ui5-value="${n(i.index)}" class="ui5-rating-indicator-item ui5-rating-indicator-item-sel"><${u("ui5-icon",e,t)} data-ui5-value="${n(i.index)}" name="favorite"></${u("ui5-icon",e,t)}></li>`:l`<li data-ui5-value="${n(i.index)}" class="ui5-rating-indicator-item ui5-rating-indicator-item-sel"><ui5-icon data-ui5-value="${n(i.index)}" name="favorite"></ui5-icon></li>`}function fL(o,e,t,i,r){return l`${i.halfStar?xL.call(this,o,e,t,i,r):yL.call(this,o,e,t,i,r)}`}function xL(o,e,t,i,r){return t?l`<li class="ui5-rating-indicator-item ui5-rating-indicator-item-half"><${u("ui5-icon",e,t)} data-ui5-value="${n(i.index)}" name="unfavorite"></${u("ui5-icon",e,t)}><div class="ui5-rating-indicator-half-icon-wrapper"><${u("ui5-icon",e,t)} data-ui5-value="${n(i.index)}" name="favorite" class="ui5-rating-indicator-half-icon"></${u("ui5-icon",e,t)}></div></li>`:l`<li class="ui5-rating-indicator-item ui5-rating-indicator-item-half"><ui5-icon data-ui5-value="${n(i.index)}" name="unfavorite"></ui5-icon><div class="ui5-rating-indicator-half-icon-wrapper"><ui5-icon data-ui5-value="${n(i.index)}" name="favorite" class="ui5-rating-indicator-half-icon"></ui5-icon></div></li>`}function yL(o,e,t,i,r){return l`${this.readonly?wL.call(this,o,e,t,i,r):kL.call(this,o,e,t,i,r)}`}function wL(o,e,t,i,r){return t?l`<li class="ui5-rating-indicator-item ui5-rating-indicator-item-unsel"><${u("ui5-icon",e,t)} data-ui5-value="${n(i.index)}" name="favorite"></${u("ui5-icon",e,t)}></li>`:l`<li class="ui5-rating-indicator-item ui5-rating-indicator-item-unsel"><ui5-icon data-ui5-value="${n(i.index)}" name="favorite"></ui5-icon></li>`}function kL(o,e,t,i,r){return l`${this.disabled?$L.call(this,o,e,t,i,r):SL.call(this,o,e,t,i,r)}`}function $L(o,e,t,i,r){return t?l`<li class="ui5-rating-indicator-item ui5-rating-indicator-item-unsel"><${u("ui5-icon",e,t)} data-ui5-value="${n(i.index)}" name="favorite"></${u("ui5-icon",e,t)}></li>`:l`<li class="ui5-rating-indicator-item ui5-rating-indicator-item-unsel"><ui5-icon data-ui5-value="${n(i.index)}" name="favorite"></ui5-icon></li>`}function SL(o,e,t,i,r){return t?l`<li data-ui5-value="${n(i.index)}" class="ui5-rating-indicator-item ui5-rating-indicator-item-unsel"><${u("ui5-icon",e,t)} data-ui5-value="${n(i.index)}" name="unfavorite"></${u("ui5-icon",e,t)}></li>`:l`<li data-ui5-value="${n(i.index)}" class="ui5-rating-indicator-item ui5-rating-indicator-item-unsel"><ui5-icon data-ui5-value="${n(i.index)}" name="unfavorite"></ui5-icon></li>`}const TL="favorite",Z5="M378.36 297.834q-5.996 3.998-2.998 8.995l71.96 193.892q1.999 4.997-2.499 8.995t-9.494.999l-174.903-123.93q-4.997-3-8.995 0L76.53 510.714q-4.997 2.998-9.495-1t-2.499-8.994l71.96-193.892q2-5.997-2.998-8.995L3.569 205.885q-4.997-2.998-2.998-8.495t6.996-5.497h165.908q4.997 0 7.995-4.997L248.433 4.997Q250.432 0 255.929 0t7.495 4.997l66.963 181.899q1.999 4.997 7.996 4.997H503.29q5.996 0 7.995 5.497t-2.998 8.495z",CL=!1,IL="SAP-icons-v4",BL="@ui5/webcomponents-icons";D(TL,{pathData:Z5,ltr:CL,collection:IL,packageName:BL});const AL="favorite",Q5="M0 198q0-9 6.5-16t15.5-9l148-21 63-137q7-15 23-15t23 15l64 137 147 21q10 2 16 9t6 16q0 11-7 18L399 328l26 154q1 2 1 5 0 10-7.5 17.5T400 512q-6 0-12-3l-132-74-132 74q-4 3-12 3-11 0-18.5-7.5T86 487q0-2 .5-2.5t.5-2.5l26-154L7 216q-7-7-7-18z",DL=!1,EL="SAP-icons-v5",PL="@ui5/webcomponents-icons";D(AL,{pathData:Q5,ltr:DL,collection:EL,packageName:PL});oe();const NL="unfavorite",J5="M8.569 191.946h164.954q5.998 0 7.998-4.998l66.981-181.95Q250.502 0 256.5 0q4.998 0 6.998 4.999l66.981 181.949q2 4.998 7.998 4.998h165.954q4.998 0 6.998 5.499t-3 8.498l-129.963 91.974q-4 2.999-3 8.997l71.98 193.946q2 4.999-1 7.998t-6.997 3q-3 0-4-1L260.5 386.891q-1-1-4-1-3.998 0-4.998 1L76.551 510.857q-1 1-4 1-3.999 0-6.998-2.999t-1-7.998l71.98-193.946q2-5.998-2.999-8.997L3.57 205.943q-4.998-3-2.999-8.498t7.998-5.499zm143.96 79.978q10.997 7.998 14.996 20.494t-1 25.493l-44.987 121.966L233.506 360.9q9.997-6.998 22.994-6.998 11.996 0 21.994 5.999l111.968 79.977-44.987-121.966q-4.999-12.996-1-25.493t14.996-20.494l68.98-47.986h-89.974q-26.992 0-37.99-25.993L256.5 76.979l-44.988 120.966q-10.997 25.993-37.989 25.993H84.548z",RL=!1,jL="SAP-icons-v4",zL="@ui5/webcomponents-icons";D(NL,{pathData:J5,ltr:RL,collection:jL,packageName:zL});const LL="unfavorite",e0="M400 510q-7 0-12-3l-132-74-131 74q-6 3-13 3-11 0-18.5-7T86 485q0-2 .5-2.5t.5-1.5l26-155L7 214q-7-7-7-17t6.5-17 15.5-9l148-21 63-137q7-15 23-15t23 15l64 137 147 21q10 2 16 9t6 17q0 11-7 17L399 326l26 155q1 1 1 4 0 11-7.5 18t-18.5 7zM256 379q7 0 13 3l97 54-20-114q0-7 1-12t6-10l81-85-112-16q-13-1-20-15l-46-99-46 99q-5 13-19 15L78 215l81 85q5 5 6 10t1 12l-20 114 98-54q5-3 12-3z",OL=!1,ML="SAP-icons-v5",XL="@ui5/webcomponents-icons";D(LL,{pathData:e0,ltr:OL,collection:ML,packageName:XL});oe();g("@ui5/webcomponents-theming","sap_horizon",async()=>y);g("@ui5/webcomponents","sap_horizon",async()=>J);const FL={packageName:"@ui5/webcomponents",fileName:"themes/RatingIndicator.css.ts",content:`:host(:not([hidden])){display:inline-block;font-size:24px;margin:var(--_ui5-v1-24-20_rating_indicator_component_spacing);cursor:pointer}:host([disabled]){opacity:.4;cursor:initial;outline:none}:host([readonly]){cursor:initial}:host([disabled]) .ui5-rating-indicator-item-unsel,:host([readonly]) .ui5-rating-indicator-item-unsel{padding-inline:var(--_ui5-v1-24-20_rating_indicator_readonly_item_spacing);width:var(--_ui5-v1-24-20_rating_indicator_readonly_item_width);height:var(--_ui5-v1-24-20_rating_indicator_readonly_item_height)}:host(:not([readonly]):not([disabled])) .ui5-rating-indicator-root:hover{opacity:.9}:host([_focused]){outline:var(--sapContent_FocusWidth) var(--sapContent_FocusStyle) var(--sapContent_FocusColor);outline-offset:var(--_ui5-v1-24-20_rating_indicator_outline_offset);border-radius:var(--_ui5-v1-24-20_rating_indicator_border_radius)}[ui5-icon]{display:flex;text-shadow:var(--sapContent_TextShadow)}.ui5-rating-indicator-root{outline:none;position:relative}.ui5-rating-indicator-list{list-style-type:none;display:flex;align-items:center;margin:0;padding:0}.ui5-rating-indicator-item{position:relative;width:var(--_ui5-v1-24-20_rating_indicator_item_width);height:var(--_ui5-v1-24-20_rating_indicator_item_height)}.ui5-rating-indicator-item:not(:last-child){margin-inline-end:.1875rem}.ui5-rating-indicator-item [ui5-icon]{width:100%;height:100%;color:inherit;user-select:none}.ui5-rating-indicator-item.ui5-rating-indicator-item-sel{color:var(--sapContent_RatedColor)}.ui5-rating-indicator-item.ui5-rating-indicator-item-unsel,.ui5-rating-indicator-item.ui5-rating-indicator-item-half{color:var(--sapContent_UnratedColor)}.ui5-rating-indicator-item [ui5-icon].ui5-rating-indicator-half-icon{position:absolute;inset-inline-start:50%;color:var(--sapContent_RatedColor)}.ui5-rating-indicator-half-icon-wrapper{width:100%;height:100%;position:absolute;inset-inline-start:-50%;top:0;z-index:32;overflow:hidden}
|
|
141
|
-
`};var Ei=globalThis&&globalThis.__decorate||function(o,e,t,i){var r=arguments.length,a=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,e,t,i);else for(var d=o.length-1;d>=0;d--)(s=o[d])&&(a=(r<3?s(a):r>3?s(e,t,a):s(e,t))||a);return r>3&&a&&Object.defineProperty(e,t,a),a},Mn;let xo=Mn=class extends A{static async onDefine(){Mn.i18nBundle=await L("@ui5/webcomponents")}constructor(){super()}onBeforeRendering(){this.calcState()}calcState(){this._stars=[];for(let e=1;e<this.max+1;e++){const t=Math.round((this.value-Math.floor(this.value))*10);let i=!1,r=this.value;Math.floor(this.value)+1===e&&t>2&&t<8?i=!0:t<=2?r=Math.floor(this.value):t>=8&&(r=Math.ceil(this.value)),this._stars.push({selected:e<=r,index:e,halfStar:i})}}_onclick(e){const t=e.target;if(!(t instanceof HTMLElement)||this.disabled||this.readonly)return;const i=t.getAttribute("data-ui5-value");i!==null&&(this.value=parseInt(i),this.value===1&&this._liveValue===1&&(this.value=0),this._liveValue!==this.value&&(this.fireEvent("change"),this._liveValue=this.value))}_onkeydown(e){if(this.disabled||this.readonly)return;const t=Ie(e)||$e(e),i=we(e)||Ae(e),r=M(e)||K(e),a=gt(e),s=mo(e),d=e.keyCode>=48&&e.keyCode<=57||e.keyCode>=96&&e.keyCode<=105;if(t||i||r||a||s||d){if(e.preventDefault(),t&&this.value>0)this.value=Math.round(this.value-1);else if(i&&this.value<this.max)this.value=Math.round(this.value+1);else if(r){const h=Math.round(this.value+1);this.value=h>this.max?0:h}else if(a)this.value=0;else if(s)this.value=this.max;else if(d){const h=parseInt(e.key);this.value=h>this.max?this.max:h}this.fireEvent("change")}}_onfocusin(){this.disabled||(this._focused=!0,this._liveValue=this.value)}_onfocusout(){this._focused=!1}get effectiveTabIndex(){const e=this.getAttribute("tabindex");return this.disabled?"-1":e||"0"}get ratingTooltip(){return this.tooltip?this.tooltip:np()?this.defaultTooltip:void 0}get defaultTooltip(){return Mn.i18nBundle.getText(OC)}get _ariaRoleDescription(){return Mn.i18nBundle.getText(MC)}get _ariaDisabled(){return this.disabled||void 0}get _ariaLabel(){return ar(this)}get _ariaDescription(){return this.required?Mn.i18nBundle.getText(XC):void 0}get ariaReadonly(){return this.readonly?"true":void 0}};Ei([c({validator:We,defaultValue:0})],xo.prototype,"value",void 0);Ei([c({validator:V,defaultValue:5})],xo.prototype,"max",void 0);Ei([c({type:Boolean})],xo.prototype,"disabled",void 0);Ei([c({type:Boolean})],xo.prototype,"readonly",void 0);Ei([c()],xo.prototype,"accessibleName",void 0);Ei([c({defaultValue:""})],xo.prototype,"accessibleNameRef",void 0);Ei([c({type:Boolean})],xo.prototype,"required",void 0);Ei([c()],xo.prototype,"tooltip",void 0);Ei([c({type:Object,multiple:!0})],xo.prototype,"_stars",void 0);Ei([c({type:Boolean})],xo.prototype,"_focused",void 0);xo=Mn=Ei([x({tag:"ui5-rating-indicator",languageAware:!0,renderer:w,styles:FL,template:gL,dependencies:[W]}),f("change")],xo);xo.define();const Jp=xo;function HL(o,e,t){return l`<div class="udex-rating-indicator ui5-rating-indicator-root ${n(this.classNames)}" role="slider" aria-roledescription="${n(this._ariaRoleDescription)}" aria-valuemin="0" aria-valuenow="${n(this.value)}" aria-valuemax="${n(this.max)}" aria-valuetext="${n(this.value)} of ${n(this.max)}" aria-orientation="horizontal" aria-disabled="${n(this._ariaDisabled)}" aria-readonly="${n(this.ariaReadonly)}" aria-description="${n(this._ariaDescription)}" tabindex="${n(this.effectiveTabIndex)}" @focusin="${this._onfocusin}" @focusout="${this._onfocusout}" @click="${this._onclick}" @keydown="${this._onkeydown}" title="${n(this.ratingTooltip)}" aria-label="${n(this._ariaLabel)}"><ul class="udex-rating-indicator__list ui5-rating-indicator-list" aria-hidden="true">${T(this._stars,(i,r)=>i._id||r,(i,r)=>UL.call(this,o,e,t,i,r))}</ul>${this.totalCount?JL.call(this,o,e,t):void 0}</div>`}function UL(o,e,t,i,r){return l`${i.selected?VL.call(this,o,e,t,i,r):qL.call(this,o,e,t,i,r)}`}function VL(o,e,t,i,r){return t?l`<li data-ui5-value="${n(i.index)}" class="udex-rating-indicator__item udex-rating-indicator__item-sel ui5-rating-indicator-item ui5-rating-indicator-item-sel"><${u("ui5-icon",e,t)} data-ui5-value="${n(i.index)}" name="favorite"></${u("ui5-icon",e,t)}></li>`:l`<li data-ui5-value="${n(i.index)}" class="udex-rating-indicator__item udex-rating-indicator__item-sel ui5-rating-indicator-item ui5-rating-indicator-item-sel"><ui5-icon data-ui5-value="${n(i.index)}" name="favorite"></ui5-icon></li>`}function qL(o,e,t,i,r){return l`${i.halfStar?WL.call(this,o,e,t,i,r):GL.call(this,o,e,t,i,r)}`}function WL(o,e,t,i,r){return t?l`<li class="udex-rating-indicator__item udex-rating-indicator__item-half ui5-rating-indicator-item ui5-rating-indicator-item-half"><${u("ui5-icon",e,t)} data-ui5-value="${n(i.index)}" name="unfavorite"></${u("ui5-icon",e,t)}><div class="udex-rating-indicator__half-icon-wrapper ui5-rating-indicator-half-icon-wrapper"><${u("ui5-icon",e,t)} data-ui5-value="${n(i.index)}" name="favorite" class="udex-rating-indicator__half-icon ui5-rating-indicator-half-icon"></${u("ui5-icon",e,t)}></div></li>`:l`<li class="udex-rating-indicator__item udex-rating-indicator__item-half ui5-rating-indicator-item ui5-rating-indicator-item-half"><ui5-icon data-ui5-value="${n(i.index)}" name="unfavorite"></ui5-icon><div class="udex-rating-indicator__half-icon-wrapper ui5-rating-indicator-half-icon-wrapper"><ui5-icon data-ui5-value="${n(i.index)}" name="favorite" class="udex-rating-indicator__half-icon ui5-rating-indicator-half-icon"></ui5-icon></div></li>`}function GL(o,e,t,i,r){return l`${this.readonly?YL.call(this,o,e,t,i,r):KL.call(this,o,e,t,i,r)}`}function YL(o,e,t,i,r){return t?l`<li class="udex-rating-indicator__item udex-rating-indicator__item-unsel ui5-rating-indicator-item ui5-rating-indicator-item-unsel"><${u("ui5-icon",e,t)} data-ui5-value="${n(i.index)}" name="unfavorite"></${u("ui5-icon",e,t)}></li>`:l`<li class="udex-rating-indicator__item udex-rating-indicator__item-unsel ui5-rating-indicator-item ui5-rating-indicator-item-unsel"><ui5-icon data-ui5-value="${n(i.index)}" name="unfavorite"></ui5-icon></li>`}function KL(o,e,t,i,r){return l`${this.disabled?ZL.call(this,o,e,t,i,r):QL.call(this,o,e,t,i,r)}`}function ZL(o,e,t,i,r){return t?l`<li class="udex-rating-indicator__item udex-rating-indicator__item-unsel ui5-rating-indicator-item ui5-rating-indicator-item-unsel"><${u("ui5-icon",e,t)} data-ui5-value="${n(i.index)}" name="unfavorite"></${u("ui5-icon",e,t)}></li>`:l`<li class="udex-rating-indicator__item udex-rating-indicator__item-unsel ui5-rating-indicator-item ui5-rating-indicator-item-unsel"><ui5-icon data-ui5-value="${n(i.index)}" name="unfavorite"></ui5-icon></li>`}function QL(o,e,t,i,r){return t?l`<li data-ui5-value="${n(i.index)}" class="udex-rating-indicator__item udex-rating-indicator__item-unsel ui5-rating-indicator-item ui5-rating-indicator-item-unsel"><${u("ui5-icon",e,t)} data-ui5-value="${n(i.index)}" name="unfavorite"></${u("ui5-icon",e,t)}></li>`:l`<li data-ui5-value="${n(i.index)}" class="udex-rating-indicator__item udex-rating-indicator__item-unsel ui5-rating-indicator-item ui5-rating-indicator-item-unsel"><ui5-icon data-ui5-value="${n(i.index)}" name="unfavorite"></ui5-icon></li>`}function JL(o,e,t){return l`<div class="udex-rating-indicator__total">(${n(this.totalCount)})</div>`}g("@ui5/webcomponents-theming","sap_horizon",async()=>y);g("@sapudex/web-components","sap_horizon",async()=>P);const e6={packageName:"@sapudex/web-components",fileName:"themes/RatingIndicator.css.ts",content:`:host{--udex_rating_indicator_readonly_item_width: 1.5rem;--udex_rating_indicator_readonly_item_height: 1.5rem;--udex_rating_indicator_item_width: 1.5rem;--udex_rating_indicator_item_height: 1.5rem;--udex_rating_indicator_mobile_item_padding: 10px;--udex_rating_indicator_disabled_opacity: .4;--udex-rating_indicator_items_gap: 8px;--udex-rating_indicator_mobile_items_gap: 8px;--udex-rating_indicator_rated_color: var(--sapContent_RatedColor, #E76500);--udex-rating_indicator_unrated_color: var(--sapContent_RatedColor, #E76500);--udex-rating_indicator_read-only-unrated_color: var(--udexColorGrey6 ,#5B738B);--udex-rating_indicator_disabled-unrated_color: var(--udexColorMango6, #E76500);--udex-rating_indicator_rated_hover_color: var(--udexColorMango7, #C35500);--udex-rating_indicator_unrated_hover_color: var(--udexColorMango7, #C35500)}.udex-rating-indicator{font-family:var(--sapFontFamily);font-size:var(--sapFontSize, 16px)}:host(:not([hidden])){display:inline-flex;margin:var(--_ui5-v0-192-2_rating_indicator_component_spacing);cursor:pointer}:host([disabled]){opacity:var(--udex_rating_indicator_disabled_opacity);cursor:initial;outline:none}:host([readonly]){cursor:initial}:host([disabled]) .udex-rating-indicator__item-unsel,:host([readonly]) .udex-rating-indicator__item-unsel{width:var(--udex_rating_indicator_readonly_item_width);height:var(--udex_rating_indicator_readonly_item_height);padding-inline:0}:host([disabled]) .udex-rating-indicator__item-unsel{color:var(--udex-rating_indicator_disabled-unrated_color)}:host([readonly]) .udex-rating-indicator__item-unsel{color:var(--udex-rating_indicator_read-only-unrated_color)}:host([_focused]){outline:var(--sapContent_FocusWidth) var(--sapContent_FocusStyle) var(--sapContent_FocusColor);outline-offset:.125rem;border-radius:.25rem}[ui5-icon]{display:flex;text-shadow:var(--sapContent_TextShadow)}.udex-rating-indicator{outline:none;position:relative;display:inline-flex;gap:12px;align-items:center}.udex-rating-indicator__total{color:var(--udexColorGrey6);line-height:24px}.udex-rating-indicator__list{list-style-type:none;display:flex;align-items:center;margin:0;padding:0}.udex-rating-indicator__item{position:relative;width:var(--udex_rating_indicator_item_width);height:var(--udex_rating_indicator_item_height)}.udex-rating-indicator__item:not(:last-child){margin-inline-end:var(--udex-rating_indicator_items_gap)}.udex-rating-indicator__item [ui5-icon]{width:100%;height:100%;color:inherit;user-select:none}.udex-rating-indicator__item.udex-rating-indicator__item-sel{color:var(--udex-rating_indicator_rated_color)}.udex-rating-indicator__item.udex-rating-indicator__item-unsel{color:var(--udex-rating_indicator_unrated_color)}.udex-rating-indicator__item.udex-rating-indicator__item-half{color:var(--udex-rating_indicator_rated_color)}.udex-rating-indicator__item [ui5-icon].udex-rating-indicator__half-icon{position:absolute;inset-inline-start:50%;color:var(--udex-rating_indicator_rated_color)}:host(:not([readonly]):not([disabled])) .udex-rating-indicator:hover .udex-rating-indicator__item-sel,:host(:not([readonly]):not([disabled])) .udex-rating-indicator:hover .udex-rating-indicator__half-icon,:host(:not([readonly]):not([disabled])) .udex-rating-indicator:hover .udex-rating-indicator__item-half{color:var(--udex-rating_indicator_rated_hover_color)}:host(:not([readonly]):not([disabled])) .ui5-rating-indicator-root:hover{opacity:1}:host(:not([readonly]):not([disabled])) .udex-rating-indicator:hover .udex-rating-indicator__item-unsel{color:var(--udex-rating_indicator_unrated_hover_color)}.udex-rating-indicator__half-icon-wrapper{width:100%;height:100%;position:absolute;inset-inline-start:-50%;top:0;z-index:32;overflow:hidden}.udex-rating-indicator--mobile .udex-rating-indicator__half-icon-wrapper{top:var(--udex_rating_indicator_mobile_item_padding)}.udex-rating-indicator--mobile .udex-rating-indicator__item [ui5-icon].udex-rating-indicator__half-icon{height:var(--udex_rating_indicator_item_height)}.udex-rating-indicator--mobile .udex-rating-indicator__item{padding:var(--udex_rating_indicator_mobile_item_padding)}:host([readonly]) .udex-rating-indicator--mobile .udex-rating-indicator__item-unsel,:host([disabled]) .udex-rating-indicator--mobile .udex-rating-indicator__item-unsel{padding-left:var(--udex_rating_indicator_mobile_item_padding);padding-right:var(--udex_rating_indicator_mobile_item_padding)}.udex-rating-indicator--mobile .udex-rating-indicator__item:not(:last-child){margin-inline-end:var(--udex-rating_indicator_mobile_items_gap)}
|
|
141
|
+
`};var Ei=globalThis&&globalThis.__decorate||function(o,e,t,i){var r=arguments.length,a=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,e,t,i);else for(var d=o.length-1;d>=0;d--)(s=o[d])&&(a=(r<3?s(a):r>3?s(e,t,a):s(e,t))||a);return r>3&&a&&Object.defineProperty(e,t,a),a},Mn;let xo=Mn=class extends A{static async onDefine(){Mn.i18nBundle=await L("@ui5/webcomponents")}constructor(){super()}onBeforeRendering(){this.calcState()}calcState(){this._stars=[];for(let e=1;e<this.max+1;e++){const t=Math.round((this.value-Math.floor(this.value))*10);let i=!1,r=this.value;Math.floor(this.value)+1===e&&t>2&&t<8?i=!0:t<=2?r=Math.floor(this.value):t>=8&&(r=Math.ceil(this.value)),this._stars.push({selected:e<=r,index:e,halfStar:i})}}_onclick(e){const t=e.target;if(!(t instanceof HTMLElement)||this.disabled||this.readonly)return;const i=t.getAttribute("data-ui5-value");i!==null&&(this.value=parseInt(i),this.value===1&&this._liveValue===1&&(this.value=0),this._liveValue!==this.value&&(this.fireEvent("change"),this._liveValue=this.value))}_onkeydown(e){if(this.disabled||this.readonly)return;const t=Ie(e)||$e(e),i=we(e)||Ae(e),r=M(e)||K(e),a=gt(e),s=mo(e),d=e.keyCode>=48&&e.keyCode<=57||e.keyCode>=96&&e.keyCode<=105;if(t||i||r||a||s||d){if(e.preventDefault(),t&&this.value>0)this.value=Math.round(this.value-1);else if(i&&this.value<this.max)this.value=Math.round(this.value+1);else if(r){const h=Math.round(this.value+1);this.value=h>this.max?0:h}else if(a)this.value=0;else if(s)this.value=this.max;else if(d){const h=parseInt(e.key);this.value=h>this.max?this.max:h}this.fireEvent("change")}}_onfocusin(){this.disabled||(this._focused=!0,this._liveValue=this.value)}_onfocusout(){this._focused=!1}get effectiveTabIndex(){const e=this.getAttribute("tabindex");return this.disabled?"-1":e||"0"}get ratingTooltip(){return this.tooltip?this.tooltip:np()?this.defaultTooltip:void 0}get defaultTooltip(){return Mn.i18nBundle.getText(OC)}get _ariaRoleDescription(){return Mn.i18nBundle.getText(MC)}get _ariaDisabled(){return this.disabled||void 0}get _ariaLabel(){return ar(this)}get _ariaDescription(){return this.required?Mn.i18nBundle.getText(XC):void 0}get ariaReadonly(){return this.readonly?"true":void 0}};Ei([c({validator:We,defaultValue:0})],xo.prototype,"value",void 0);Ei([c({validator:V,defaultValue:5})],xo.prototype,"max",void 0);Ei([c({type:Boolean})],xo.prototype,"disabled",void 0);Ei([c({type:Boolean})],xo.prototype,"readonly",void 0);Ei([c()],xo.prototype,"accessibleName",void 0);Ei([c({defaultValue:""})],xo.prototype,"accessibleNameRef",void 0);Ei([c({type:Boolean})],xo.prototype,"required",void 0);Ei([c()],xo.prototype,"tooltip",void 0);Ei([c({type:Object,multiple:!0})],xo.prototype,"_stars",void 0);Ei([c({type:Boolean})],xo.prototype,"_focused",void 0);xo=Mn=Ei([x({tag:"ui5-rating-indicator",languageAware:!0,renderer:w,styles:FL,template:gL,dependencies:[W]}),f("change")],xo);xo.define();const Jp=xo;function HL(o,e,t){return l`<div class="udex-rating-indicator ui5-rating-indicator-root ${n(this.classNames)}" role="slider" aria-roledescription="${n(this._ariaRoleDescription)}" aria-valuemin="0" aria-valuenow="${n(this.value)}" aria-valuemax="${n(this.max)}" aria-valuetext="${n(this.value)} of ${n(this.max)}" aria-orientation="horizontal" aria-disabled="${n(this._ariaDisabled)}" aria-readonly="${n(this.ariaReadonly)}" aria-description="${n(this._ariaDescription)}" tabindex="${n(this.effectiveTabIndex)}" @focusin="${this._onfocusin}" @focusout="${this._onfocusout}" @click="${this._onclick}" @keydown="${this._onkeydown}" title="${n(this.ratingTooltip)}" aria-label="${n(this._ariaLabel)}"><ul class="udex-rating-indicator__list ui5-rating-indicator-list" aria-hidden="true">${T(this._stars,(i,r)=>i._id||r,(i,r)=>UL.call(this,o,e,t,i,r))}</ul>${this.totalCount?JL.call(this,o,e,t):void 0}</div>`}function UL(o,e,t,i,r){return l`${i.selected?VL.call(this,o,e,t,i,r):qL.call(this,o,e,t,i,r)}`}function VL(o,e,t,i,r){return t?l`<li data-ui5-value="${n(i.index)}" class="udex-rating-indicator__item udex-rating-indicator__item-sel ui5-rating-indicator-item ui5-rating-indicator-item-sel"><${u("ui5-icon",e,t)} data-ui5-value="${n(i.index)}" name="favorite"></${u("ui5-icon",e,t)}></li>`:l`<li data-ui5-value="${n(i.index)}" class="udex-rating-indicator__item udex-rating-indicator__item-sel ui5-rating-indicator-item ui5-rating-indicator-item-sel"><ui5-icon data-ui5-value="${n(i.index)}" name="favorite"></ui5-icon></li>`}function qL(o,e,t,i,r){return l`${i.halfStar?WL.call(this,o,e,t,i,r):GL.call(this,o,e,t,i,r)}`}function WL(o,e,t,i,r){return t?l`<li class="udex-rating-indicator__item udex-rating-indicator__item-half ui5-rating-indicator-item ui5-rating-indicator-item-half"><${u("ui5-icon",e,t)} data-ui5-value="${n(i.index)}" name="unfavorite"></${u("ui5-icon",e,t)}><div class="udex-rating-indicator__half-icon-wrapper ui5-rating-indicator-half-icon-wrapper"><${u("ui5-icon",e,t)} data-ui5-value="${n(i.index)}" name="favorite" class="udex-rating-indicator__half-icon ui5-rating-indicator-half-icon"></${u("ui5-icon",e,t)}></div></li>`:l`<li class="udex-rating-indicator__item udex-rating-indicator__item-half ui5-rating-indicator-item ui5-rating-indicator-item-half"><ui5-icon data-ui5-value="${n(i.index)}" name="unfavorite"></ui5-icon><div class="udex-rating-indicator__half-icon-wrapper ui5-rating-indicator-half-icon-wrapper"><ui5-icon data-ui5-value="${n(i.index)}" name="favorite" class="udex-rating-indicator__half-icon ui5-rating-indicator-half-icon"></ui5-icon></div></li>`}function GL(o,e,t,i,r){return l`${this.readonly?YL.call(this,o,e,t,i,r):KL.call(this,o,e,t,i,r)}`}function YL(o,e,t,i,r){return t?l`<li class="udex-rating-indicator__item udex-rating-indicator__item-unsel ui5-rating-indicator-item ui5-rating-indicator-item-unsel"><${u("ui5-icon",e,t)} data-ui5-value="${n(i.index)}" name="unfavorite"></${u("ui5-icon",e,t)}></li>`:l`<li class="udex-rating-indicator__item udex-rating-indicator__item-unsel ui5-rating-indicator-item ui5-rating-indicator-item-unsel"><ui5-icon data-ui5-value="${n(i.index)}" name="unfavorite"></ui5-icon></li>`}function KL(o,e,t,i,r){return l`${this.disabled?ZL.call(this,o,e,t,i,r):QL.call(this,o,e,t,i,r)}`}function ZL(o,e,t,i,r){return t?l`<li class="udex-rating-indicator__item udex-rating-indicator__item-unsel ui5-rating-indicator-item ui5-rating-indicator-item-unsel"><${u("ui5-icon",e,t)} data-ui5-value="${n(i.index)}" name="unfavorite"></${u("ui5-icon",e,t)}></li>`:l`<li class="udex-rating-indicator__item udex-rating-indicator__item-unsel ui5-rating-indicator-item ui5-rating-indicator-item-unsel"><ui5-icon data-ui5-value="${n(i.index)}" name="unfavorite"></ui5-icon></li>`}function QL(o,e,t,i,r){return t?l`<li data-ui5-value="${n(i.index)}" class="udex-rating-indicator__item udex-rating-indicator__item-unsel ui5-rating-indicator-item ui5-rating-indicator-item-unsel"><${u("ui5-icon",e,t)} data-ui5-value="${n(i.index)}" name="unfavorite"></${u("ui5-icon",e,t)}></li>`:l`<li data-ui5-value="${n(i.index)}" class="udex-rating-indicator__item udex-rating-indicator__item-unsel ui5-rating-indicator-item ui5-rating-indicator-item-unsel"><ui5-icon data-ui5-value="${n(i.index)}" name="unfavorite"></ui5-icon></li>`}function JL(o,e,t){return l`<div class="udex-rating-indicator__total">(${n(this.totalCount)})</div>`}g("@ui5/webcomponents-theming","sap_horizon",async()=>y);g("@sapudex/web-components","sap_horizon",async()=>P);const e6={packageName:"@sapudex/web-components",fileName:"themes/RatingIndicator.css.ts",content:`:host{--udex_rating_indicator_readonly_item_width: 1.5rem;--udex_rating_indicator_readonly_item_height: 1.5rem;--udex_rating_indicator_item_width: 1.5rem;--udex_rating_indicator_item_height: 1.5rem;--udex_rating_indicator_mobile_item_padding: 10px;--udex_rating_indicator_disabled_opacity: .4;--udex-rating_indicator_items_gap: 8px;--udex-rating_indicator_mobile_items_gap: 8px;--udex-rating_indicator_rated_color: var(--sapContent_RatedColor, #E76500);--udex-rating_indicator_unrated_color: var(--sapContent_RatedColor, #E76500);--udex-rating_indicator_read-only-unrated_color: var(--udexColorGrey6 ,#5B738B);--udex-rating_indicator_disabled-unrated_color: var(--udexColorMango6, #E76500);--udex-rating_indicator_rated_hover_color: var(--udexColorMango7, #C35500);--udex-rating_indicator_unrated_hover_color: var(--udexColorMango7, #C35500)}.udex-rating-indicator{font-family:var(--sapFontFamily);font-size:var(--sapFontSize, 16px)}:host(:not([hidden])){display:inline-flex;margin:var(--_ui5-v0-192-4_rating_indicator_component_spacing);cursor:pointer}:host([disabled]){opacity:var(--udex_rating_indicator_disabled_opacity);cursor:initial;outline:none}:host([readonly]){cursor:initial}:host([disabled]) .udex-rating-indicator__item-unsel,:host([readonly]) .udex-rating-indicator__item-unsel{width:var(--udex_rating_indicator_readonly_item_width);height:var(--udex_rating_indicator_readonly_item_height);padding-inline:0}:host([disabled]) .udex-rating-indicator__item-unsel{color:var(--udex-rating_indicator_disabled-unrated_color)}:host([readonly]) .udex-rating-indicator__item-unsel{color:var(--udex-rating_indicator_read-only-unrated_color)}:host([_focused]){outline:var(--sapContent_FocusWidth) var(--sapContent_FocusStyle) var(--sapContent_FocusColor);outline-offset:.125rem;border-radius:.25rem}[ui5-icon]{display:flex;text-shadow:var(--sapContent_TextShadow)}.udex-rating-indicator{outline:none;position:relative;display:inline-flex;gap:12px;align-items:center}.udex-rating-indicator__total{color:var(--udexColorGrey6);line-height:24px}.udex-rating-indicator__list{list-style-type:none;display:flex;align-items:center;margin:0;padding:0}.udex-rating-indicator__item{position:relative;width:var(--udex_rating_indicator_item_width);height:var(--udex_rating_indicator_item_height)}.udex-rating-indicator__item:not(:last-child){margin-inline-end:var(--udex-rating_indicator_items_gap)}.udex-rating-indicator__item [ui5-icon]{width:100%;height:100%;color:inherit;user-select:none}.udex-rating-indicator__item.udex-rating-indicator__item-sel{color:var(--udex-rating_indicator_rated_color)}.udex-rating-indicator__item.udex-rating-indicator__item-unsel{color:var(--udex-rating_indicator_unrated_color)}.udex-rating-indicator__item.udex-rating-indicator__item-half{color:var(--udex-rating_indicator_rated_color)}.udex-rating-indicator__item [ui5-icon].udex-rating-indicator__half-icon{position:absolute;inset-inline-start:50%;color:var(--udex-rating_indicator_rated_color)}:host(:not([readonly]):not([disabled])) .udex-rating-indicator:hover .udex-rating-indicator__item-sel,:host(:not([readonly]):not([disabled])) .udex-rating-indicator:hover .udex-rating-indicator__half-icon,:host(:not([readonly]):not([disabled])) .udex-rating-indicator:hover .udex-rating-indicator__item-half{color:var(--udex-rating_indicator_rated_hover_color)}:host(:not([readonly]):not([disabled])) .ui5-rating-indicator-root:hover{opacity:1}:host(:not([readonly]):not([disabled])) .udex-rating-indicator:hover .udex-rating-indicator__item-unsel{color:var(--udex-rating_indicator_unrated_hover_color)}.udex-rating-indicator__half-icon-wrapper{width:100%;height:100%;position:absolute;inset-inline-start:-50%;top:0;z-index:32;overflow:hidden}.udex-rating-indicator--mobile .udex-rating-indicator__half-icon-wrapper{top:var(--udex_rating_indicator_mobile_item_padding)}.udex-rating-indicator--mobile .udex-rating-indicator__item [ui5-icon].udex-rating-indicator__half-icon{height:var(--udex_rating_indicator_item_height)}.udex-rating-indicator--mobile .udex-rating-indicator__item{padding:var(--udex_rating_indicator_mobile_item_padding)}:host([readonly]) .udex-rating-indicator--mobile .udex-rating-indicator__item-unsel,:host([disabled]) .udex-rating-indicator--mobile .udex-rating-indicator__item-unsel{padding-left:var(--udex_rating_indicator_mobile_item_padding);padding-right:var(--udex_rating_indicator_mobile_item_padding)}.udex-rating-indicator--mobile .udex-rating-indicator__item:not(:last-child){margin-inline-end:var(--udex-rating_indicator_mobile_items_gap)}
|
|
142
142
|
`};var gv=globalThis&&globalThis.__decorate||function(o,e,t,i){var r=arguments.length,a=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,e,t,i);else for(var d=o.length-1;d>=0;d--)(s=o[d])&&(a=(r<3?s(a):r>3?s(e,t,a):s(e,t))||a);return r>3&&a&&Object.defineProperty(e,t,a),a},e_;(function(o){o.Desktop="Desktop",o.Mobile="Mobile"})(e_||(e_={}));let us=class extends Jp{get classNames(){return`udex-rating-indicator--${this.display.toLowerCase()}`}get _ariaLabel(){const e=ar(this);return this.totalCount?`${e?`${e}, `:""}${Jp.i18nBundle.getText(MS)} ${this.totalCount}`:e}};gv([c({defaultValue:e_.Desktop})],us.prototype,"display",void 0);gv([c()],us.prototype,"totalCount",void 0);us=gv([x({tag:"udex-rating-indicator",renderer:w,styles:[Jp.styles,e6],template:HL,dependencies:[W]})],us);us.define();const t0=us;function t6(o,e,t){return t?l`<div class="udex-rating-bar__container"><div aria-hidden="true" class="udex-rating-bar__rating">${n(this.validatedRating)}</div><${u("ui5-icon",e,t)} role="img" aria-labelledby="ratingDescription" name="favorite" class="udex-rating__icon"></${u("ui5-icon",e,t)}><div class="udex-rating-bar__track"><div class="udex-rating-bar__progress"></div></div>${this.showPercentage?Zm.call(this,o,e,t):void 0}<span id="ratingDescription" class="hidden-text">${n(this._ratingDescription)}</span></div>`:l`<div class="udex-rating-bar__container"><div aria-hidden="true" class="udex-rating-bar__rating">${n(this.validatedRating)}</div><ui5-icon role="img" aria-labelledby="ratingDescription" name="favorite" class="udex-rating__icon"></ui5-icon><div class="udex-rating-bar__track"><div class="udex-rating-bar__progress"></div></div>${this.showPercentage?Zm.call(this,o,e,t):void 0}<span id="ratingDescription" class="hidden-text">${n(this._ratingDescription)}</span></div>`}function Zm(o,e,t){return l`<div role="note" class="udex-rating-bar__percentage" aria-label="${n(this.validatedPercentage)}">${n(this.validatedPercentage)}</div>`}g("@ui5/webcomponents-theming","sap_horizon",async()=>y);g("@sapudex/web-components","sap_horizon",async()=>P);const o6={packageName:"@sapudex/web-components",fileName:"themes/RatingBar.css.ts",content:`:host{--udex-rating-bar-progress-color: var(--udexColorMango6);--udex-rating-bar-progress-track-color: var(--udexColorGrey1);--udex-rating-bar-text-color: var(--udexColorGrey7);--udex-rating-bar-container-height: 1.5rem;--udex-rating-bar-progress: 100%;--udex-rating-bar-track-height: .75rem;--udex-rating-bar-progress-radius: var(---udexRadiusM, .5rem)}.udex-rating-bar__container{display:flex;flex-direction:row;align-items:center;gap:var(--udexSpacer4);height:var(--udex-rating-bar-container-height);font-family:var(--sapFontFamily, sans-serif)}.udex-rating-bar__percentage,.udex-rating-bar__rating{color:var(--udex-rating-bar-text-color);font-size:var(--udexTypographyBodySFontSize);font-weight:var(--udexTypographyFontWeightRegular);line-height:var(--udexTypographyBodyLineHeight)}.udex-rating-bar__track{width:100%;height:var(--udex-rating-bar-track-height);background-color:var(--udex-rating-bar-progress-track-color);border:none;overflow:hidden;border-radius:var(--udex-rating-bar-progress-radius)}.udex-rating-bar__progress{width:var(--udex-rating-bar-progress);height:100%;background-color:var(--udex-rating-bar-progress-color);border:none;border-radius:var(--udex-rating-bar-progress-radius)}.udex-rating__icon{height:.875rem;width:.875rem;color:var(--udexColorMango6)}.hidden-text{display:none}
|
|
143
143
|
`};var Nu=globalThis&&globalThis.__decorate||function(o,e,t,i){var r=arguments.length,a=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,e,t,i);else for(var d=o.length-1;d>=0;d--)(s=o[d])&&(a=(r<3?s(a):r>3?s(e,t,a):s(e,t))||a);return r>3&&a&&Object.defineProperty(e,t,a),a},Jl;let ln=Jl=class extends A{constructor(){super(...arguments),this._minRating=0,this._maxRating=5,this._minPercentage=0,this._maxPercentage=100}static async onDefine(){Jl.i18nBundle=await L("@udex/web-components")}onBeforeRendering(){this.style.setProperty("--udex-rating-bar-progress",`${this.percentage}%`)}get validatedRating(){return this.rating>this._maxRating?(console.warn("UDEx RatingBar: The rating shouldn't be more than 5."),this._maxRating):this.rating<this._minRating?(console.warn("UDEx RatingBar: The rating shouldn't be less than 0."),this._minRating):this.rating}get validatedPercentage(){return this.percentage>this._maxPercentage?(console.warn("UDEx RatingBar: The percentage shouldn't be more than 100."),`${this._maxPercentage}%`):this.percentage<this._minPercentage?(console.warn("UDEx RatingBar: The percentage shouldn't be less than 0."),`${this._minPercentage}%`):`${this.percentage}%`}get _ratingDescription(){return`${this.validatedRating} ${Jl.i18nBundle.getText(B1)}`}};Nu([c({type:Number,defaultValue:0,validator:V})],ln.prototype,"rating",void 0);Nu([c({type:Number,defaultValue:0,validator:V})],ln.prototype,"percentage",void 0);Nu([c({type:Boolean})],ln.prototype,"showPercentage",void 0);ln=Jl=Nu([x({tag:"udex-rating-bar",renderer:w,styles:o6,template:t6,dependencies:[W]})],ln);ln.define();const o0=ln;function i6(o,e,t){return l`${this.isEmpty?r6.call(this,o,e,t):a6.call(this,o,e,t)}`}function r6(o,e,t){return l`<div class="udex-review__empty-container"><slot class="udex-review__default-text" name="defaultText"></slot><slot name="reviewButton"></slot></div>`}function a6(o,e,t){return l`${this.withoutBreakdown?n6.call(this,o,e,t):s6.call(this,o,e,t)}`}function n6(o,e,t){return t?l`<div class="udex-review__container-without-breakdown"><div class="udex-review__content-without-breakdown"><div aria-level="2" role="heading" aria-hidden="true" class="udex-review__rating">${n(this.validatedRating)}</div><div class="udex-review__rating-info-without-breakdown"><${u("udex-rating-indicator",e,t)} readonly value="${n(this.validatedRating)}" max="${n(this._maxRating)}"></${u("udex-rating-indicator",e,t)}><div class="udex-review__reviews-text">${n(this.reviewsText)}</div></div></div><div class="udex-review__additional-content-without-breakdown"><slot class="udex-review__default-text" name="defaultText"></slot><slot name="reviewButton"></slot></div></div>`:l`<div class="udex-review__container-without-breakdown"><div class="udex-review__content-without-breakdown"><div aria-level="2" role="heading" aria-hidden="true" class="udex-review__rating">${n(this.validatedRating)}</div><div class="udex-review__rating-info-without-breakdown"><udex-rating-indicator readonly value="${n(this.validatedRating)}" max="${n(this._maxRating)}"></udex-rating-indicator><div class="udex-review__reviews-text">${n(this.reviewsText)}</div></div></div><div class="udex-review__additional-content-without-breakdown"><slot class="udex-review__default-text" name="defaultText"></slot><slot name="reviewButton"></slot></div></div>`}function s6(o,e,t){return t?l`<div class="udex-review__container"><div class="udex-review__content"><div class="udex-review__rating-info"><div aria-level="2" role="heading" aria-hidden="true" class="udex-review__rating">${n(this.validatedRating)}</div><${u("ui5-icon",e,t)} aria-labelledby="ratingDescription" role="img" name="favorite" class="udex-review__icon"></${u("ui5-icon",e,t)}></div><div class="udex-review__reviews-text">${n(this.reviewsText)}</div><slot name="reviewButton"></slot></div><div class="udex-review__additional-content">${T(this.validatedRatingBars,(i,r)=>i._id||r,(i,r)=>Qm.call(this,o,e,t,i,r))}</div></div><span id="ratingDescription" class="hidden-text">${n(this._ratingDescription)}</span>`:l`<div class="udex-review__container"><div class="udex-review__content"><div class="udex-review__rating-info"><div aria-level="2" role="heading" aria-hidden="true" class="udex-review__rating">${n(this.validatedRating)}</div><ui5-icon aria-labelledby="ratingDescription" role="img" name="favorite" class="udex-review__icon"></ui5-icon></div><div class="udex-review__reviews-text">${n(this.reviewsText)}</div><slot name="reviewButton"></slot></div><div class="udex-review__additional-content">${T(this.validatedRatingBars,(i,r)=>i._id||r,(i,r)=>Qm.call(this,o,e,t,i,r))}</div></div><span id="ratingDescription" class="hidden-text">${n(this._ratingDescription)}</span>`}function Qm(o,e,t,i,r){return l`<slot name="${n(i._individualSlot)}"></slot>`}g("@ui5/webcomponents-theming","sap_horizon",async()=>y);g("@sapudex/web-components","sap_horizon",async()=>P);const d6={packageName:"@sapudex/web-components",fileName:"themes/Review.css.ts",content:`:host{--udex-review-container-vertical-padding: var(--udexSpacer32);--udex-review-container-vertical-padding-xs: var(--udexSpacer24);--udex-review-xs-gutter: var(--udexSpacer40)}.udex-review__container{width:100%;display:flex;flex-direction:row;align-items:center;padding:var(--udex-review-container-vertical-padding) var(--udexGridXLMargins);font-family:var(--sapFontFamily, sans-serif);box-sizing:border-box}.udex-review__container-without-breakdown{width:100%;display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:var(--udex-review-container-vertical-padding) var(--udexGridXLMargins);font-family:var(--sapFontFamily, sans-serif);box-sizing:border-box}.udex-review__empty-container{width:100%;display:flex;flex-direction:column;align-items:center;gap:var(--udexSpacer12);padding:var(--udex-review-container-vertical-padding) 0;font-family:var(--sapFontFamily, sans-serif);box-sizing:border-box}.udex-review__rating{font-size:var(--udexTypographyDisplayBoldMFontSize);font-weight:var(--udexTypographyFontWeightBold)}.udex-review__content{font-size:var(--udexTypographyDisplayBoldMFontSize);font-weight:var(--udexTypographyFontWeightBold);display:flex;flex-direction:column;justify-content:center;align-items:center;margin-inline-end:var(--udexGridXLGutters);width:calc((100vw / var(--udexGridColumns) * 2) + var(--udexGridXLGutters))}.udex-review__content-without-breakdown{font-size:var(--udexTypographyDisplayBoldMFontSize);font-weight:var(--udexTypographyFontWeightBold);display:flex;flex-direction:row;align-items:center;margin-bottom:0}.udex-review__additional-content{display:flex;flex-direction:column;gap:var(--udexSpacer8);width:100%}.udex-review__additional-content-without-breakdown{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:var(--udexSpacer12);margin-bottom:0}.udex-review__rating-info{display:flex;flex-direction:row;align-items:center;gap:var(--udexSpacer8)}.udex-review__rating-info-without-breakdown{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding-inline-start:var(--udexSpacer16);.udex-review__reviews-text{margin-bottom:0}}.udex-review__default-text{font-size:var(--udexTypographyBodySFontSize);font-weight:var(--udexTypographyFontWeightRegular);line-height:var(--udexTypographyBodyLineHeight);margin-bottom:var(--udexSpacer12);text-align:center}.udex-review__reviews-text{font-size:var(--udexTypographyBodyXSFontSize);font-weight:var(--udexTypographyFontWeightRegular);line-height:var(--udexTypographyBodyLineHeight);color:var(--udexColorGrey7);margin-top:var(--udexSpacer8);margin-bottom:var(--udexSpacer12)}@media (max-width: 1599px){.udex-review__container{padding:var(--udex-review-container-vertical-padding) var(--udexGridLMargins)}}@media (max-width: 1279px){.udex-review__container{padding:var(--udex-review-container-vertical-padding) var(--udexGridMMargins)}.udex-review__content{width:calc((100vw / var(--udexGridColumns) * 3) + 2 * var(--udexGridMGutters))}}@media (max-width: 979px){.udex-review__container-without-breakdown{flex-direction:column;align-items:center;padding:var(--udex-review-container-vertical-padding) var(--udexGridSMargins)}.udex-review__container{padding:var(--udex-review-container-vertical-padding) var(--udexGridSMargins)}.udex-review__content{margin-inline-end:var(--udexGridSGutters);width:calc((100vw / var(--udexGridColumns) * 4) + 3 * var(--udexGridSGutters))}.udex-review__default-text{font-size:var(--udexTypographyBodyXSFontSize)}.udex-review__content-without-breakdown{margin-bottom:var(--udexSpacer16)}.udex-review__additional-content-without-breakdown{justify-content:space-between;gap:var(--udexSpacer16)}}@media (max-width: 639px){.udex-review__container{padding:var(--udex-review-container-vertical-padding-xs) var(--udexGridXSMargins);flex-direction:column;align-items:center}.udex-review__container-without-breakdown{padding:var(--udex-review-container-vertical-padding-xs) var(--udexGridXSMargins)}.udex-review__empty-container{padding:var(--udex-review-container-vertical-padding-xs) 0}.udex-review__content{margin-bottom:var(--udex-review-xs-gutter);margin-inline-end:0}}.udex-review__icon{height:1.5rem;width:1.5rem;color:var(--udexColorMango6)}[udex-rating-indicator]{--udex-rating_indicator_read-only-unrated_color: var(--udexColorMango6) }.hidden-text{display:none}
|
|
144
144
|
`};var Bs=globalThis&&globalThis.__decorate||function(o,e,t,i){var r=arguments.length,a=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,e,t,i);else for(var d=o.length-1;d>=0;d--)(s=o[d])&&(a=(r<3?s(a):r>3?s(e,t,a):s(e,t))||a);return r>3&&a&&Object.defineProperty(e,t,a),a},ec;let la=ec=class extends A{constructor(){super(...arguments),this._minRating=0,this._maxRating=5,this._maxRatingBars=5}static async onDefine(){ec.i18nBundle=await L("@udex/web-components")}get reviewsText(){return`${this.reviews} ${ec.i18nBundle.getText(OS)}`}get withoutBreakdown(){return this.bars.length===0}get isEmpty(){return this.reviews===0&&this.rating===0}get validatedRating(){return this.rating>this._maxRating?(console.warn("UDEx Review: The rating shouldn't be more than 5."),this._maxRating):this.rating<this._minRating?(console.warn("UDEx Review: The rating shouldn't be less than 0."),this._minRating):this.rating}get validatedRatingBars(){return this.bars.length>this._maxRatingBars?(console.warn("UDEx Review: There shouldn't be more than 5 RatingBars."),this.bars.slice(-this._maxRatingBars)):this.bars}get _ratingDescription(){return`${this.validatedRating} ${o0.i18nBundle.getText(B1)}`}};Bs([c({type:Number,defaultValue:0,validator:We})],la.prototype,"rating",void 0);Bs([c({type:Number,defaultValue:0,validator:V})],la.prototype,"reviews",void 0);Bs([I({type:HTMLElement})],la.prototype,"reviewButton",void 0);Bs([I({type:HTMLElement})],la.prototype,"defaultText",void 0);Bs([I({type:HTMLElement,default:!0,individualSlots:!0})],la.prototype,"bars",void 0);la=ec=Bs([x({tag:"udex-review",renderer:w,styles:d6,template:i6,dependencies:[o0,t0,W]})],la);la.define();var t_;(function(o){o.TopStart="TopStart",o.TopCenter="TopCenter",o.TopEnd="TopEnd",o.MiddleStart="MiddleStart",o.MiddleCenter="MiddleCenter",o.MiddleEnd="MiddleEnd",o.BottomStart="BottomStart",o.BottomCenter="BottomCenter",o.BottomEnd="BottomEnd"})(t_||(t_={}));const Jm=t_;function l6(o,e,t){return l`${this.domRendered?c6.call(this,o,e,t):void 0} `}function c6(o,e,t){return l`<div class="ui5-toast-root" role="alert" tabindex="${n(this._tabindex)}"><bdi><slot></slot></bdi></div>`}g("@ui5/webcomponents-theming","sap_horizon",async()=>y);g("@ui5/webcomponents","sap_horizon",async()=>J);const u6={packageName:"@ui5/webcomponents",fileName:"themes/Toast.css.ts",content:`:host{font-family:"72override",var(--sapFontFamily);color:var(--sapList_TextColor);font-size:var(--sapFontSize);position:fixed;display:none;box-sizing:border-box;max-width:15rem;overflow:hidden;background:var(--_ui5-v1-24-20_toast_background);box-shadow:var(--_ui5-v1-24-20_toast_shadow);border-radius:var(--sapElement_BorderCornerRadius);transition-property:opacity;opacity:1;word-wrap:break-word;text-align:center;text-overflow:ellipsis;white-space:pre-line;padding:1rem}.ui5-toast-root{height:100%;width:100%;padding:0;outline:none;box-sizing:border-box}:host([open]){display:block}:host(:not([placement])){bottom:var(--_ui5-v1-24-20_toast_vertical_offset);left:50%;transform:translate(-50%)}:host([placement="TopStart"]){top:var(--_ui5-v1-24-20_toast_vertical_offset);left:var(--_ui5-v1-24-20_toast_horizontal_offset)}:host([placement="MiddleStart"]){left:var(--_ui5-v1-24-20_toast_horizontal_offset);top:50%;transform:translateY(-50%)}:host([placement="BottomStart"]){left:var(--_ui5-v1-24-20_toast_horizontal_offset);bottom:var(--_ui5-v1-24-20_toast_vertical_offset)}:host([placement="TopCenter"]){top:var(--_ui5-v1-24-20_toast_vertical_offset);left:50%;transform:translate(-50%)}:host([placement="MiddleCenter"]){left:50%;top:50%;transform:translate(-50%,-50%)}:host([placement="BottomCenter"]){bottom:var(--_ui5-v1-24-20_toast_vertical_offset);left:50%;transform:translate(-50%)}:host([placement="TopEnd"]){right:var(--_ui5-v1-24-20_toast_horizontal_offset);top:var(--_ui5-v1-24-20_toast_vertical_offset)}:host([placement="MiddleEnd"]){right:var(--_ui5-v1-24-20_toast_horizontal_offset);top:50%;transform:translateY(-50%)}:host([placement="BottomEnd"]){right:var(--_ui5-v1-24-20_toast_horizontal_offset);bottom:var(--_ui5-v1-24-20_toast_vertical_offset)}:host([focused]){outline-width:var(--sapContent_FocusWidth);outline-style:var(--sapContent_FocusStyle);outline-color:var(--sapContent_FocusColor);outline-offset:var(--_ui5-v1-24-20_toast_offset_width)}
|