@sapudex/web-components 2.19.0 → 2.20.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/cypress/specs/AccordionItem.cy.tsx +6 -2
  2. package/cypress/specs/Footer.cy.tsx +2 -1
  3. package/dist/Accordion.d.ts +1 -0
  4. package/dist/Accordion.js +7 -1
  5. package/dist/Accordion.js.map +1 -1
  6. package/dist/AccordionItem.d.ts +8 -0
  7. package/dist/AccordionItem.js +11 -0
  8. package/dist/AccordionItem.js.map +1 -1
  9. package/dist/AccordionItemTemplate.js +2 -2
  10. package/dist/AccordionItemTemplate.js.map +1 -1
  11. package/dist/AccordionTemplate.js +2 -2
  12. package/dist/AccordionTemplate.js.map +1 -1
  13. package/dist/Carousel.d.ts +29 -2
  14. package/dist/Carousel.js +34 -6
  15. package/dist/Carousel.js.map +1 -1
  16. package/dist/CarouselTemplate.js +2 -2
  17. package/dist/CarouselTemplate.js.map +1 -1
  18. package/dist/DatePicker.d.ts +4 -4
  19. package/dist/DatePicker.js +3 -10
  20. package/dist/DatePicker.js.map +1 -1
  21. package/dist/DatePickerPopoverTemplate.d.ts +2 -0
  22. package/dist/DatePickerPopoverTemplate.js +13 -0
  23. package/dist/DatePickerPopoverTemplate.js.map +1 -0
  24. package/dist/DatePickerTemplate.d.ts +2 -0
  25. package/dist/DatePickerTemplate.js +7 -0
  26. package/dist/DatePickerTemplate.js.map +1 -0
  27. package/dist/MediaPlayerTemplate.js +2 -2
  28. package/dist/MediaPlayerTemplate.js.map +1 -1
  29. package/dist/MessageStripTemplate.js +3 -1
  30. package/dist/MessageStripTemplate.js.map +1 -1
  31. package/dist/RatingBarTemplate.js +1 -1
  32. package/dist/RatingBarTemplate.js.map +1 -1
  33. package/dist/Review.js +3 -6
  34. package/dist/Review.js.map +1 -1
  35. package/dist/ReviewItem.d.ts +1 -1
  36. package/dist/ReviewItem.js +15 -18
  37. package/dist/ReviewItem.js.map +1 -1
  38. package/dist/ReviewItemTemplate.d.ts +2 -0
  39. package/dist/ReviewItemTemplate.js +10 -0
  40. package/dist/ReviewItemTemplate.js.map +1 -0
  41. package/dist/ReviewTemplate.d.ts +2 -0
  42. package/dist/ReviewTemplate.js +9 -0
  43. package/dist/ReviewTemplate.js.map +1 -0
  44. package/dist/TileTemplate.js +1 -1
  45. package/dist/TileTemplate.js.map +1 -1
  46. package/dist/assets/{InputSuggestions-EAcC3wZN.js → InputSuggestions-yR1p8cXL.js} +2 -2
  47. package/dist/assets/{ListItemStandardExpandableTextTemplate-Bb5Y2JOR.js → ListItemStandardExpandableTextTemplate-BovnAV24.js} +3 -3
  48. package/dist/assets/{bundle.esm-BXDoCHfu.js → bundle.esm-C7AybWk0.js} +207 -207
  49. package/dist/assets/parameters-bundle.css-195ykfle.js +2 -0
  50. package/dist/assets/parameters-bundle.css-2XlTf-8J.js +2 -0
  51. package/dist/assets/parameters-bundle.css-7-HTnP5E.js +2 -0
  52. package/dist/assets/parameters-bundle.css-B7OzyC0l.js +2 -0
  53. package/dist/assets/parameters-bundle.css-BJjePPyo.js +2 -0
  54. package/dist/assets/parameters-bundle.css-BVsx_KaG.js +2 -0
  55. package/dist/assets/parameters-bundle.css-BbOftqiJ.js +2 -0
  56. package/dist/assets/parameters-bundle.css-BpraBfJY.js +2 -0
  57. package/dist/assets/parameters-bundle.css-Btm09-js.js +2 -0
  58. package/dist/assets/parameters-bundle.css-BtvY__7H.js +2 -0
  59. package/dist/assets/parameters-bundle.css-CAs_WpVc.js +2 -0
  60. package/dist/assets/parameters-bundle.css-Cqg5HiU_.js +2 -0
  61. package/dist/assets/parameters-bundle.css-DIUy2Etb.js +2 -0
  62. package/dist/assets/parameters-bundle.css-Dn173v0e.js +2 -0
  63. package/dist/assets/parameters-bundle.css-QEiUG73s.js +2 -0
  64. package/dist/assets/parameters-bundle.css-VUmjvCcs.js +2 -0
  65. package/dist/css/themes/Quote.css +1 -1
  66. package/dist/css/themes/RatingIndicator.css +1 -1
  67. package/dist/css/themes/Slider.css +1 -1
  68. package/dist/custom-elements-internal.json +218 -146
  69. package/dist/custom-elements.json +202 -131
  70. package/dist/generated/themes/Quote.css.d.ts +1 -1
  71. package/dist/generated/themes/Quote.css.js +1 -1
  72. package/dist/generated/themes/Quote.css.js.map +1 -1
  73. package/dist/generated/themes/RatingIndicator.css.d.ts +1 -1
  74. package/dist/generated/themes/RatingIndicator.css.js +1 -1
  75. package/dist/generated/themes/RatingIndicator.css.js.map +1 -1
  76. package/dist/generated/themes/Slider.css.d.ts +1 -1
  77. package/dist/generated/themes/Slider.css.js +1 -1
  78. package/dist/generated/themes/Slider.css.js.map +1 -1
  79. package/dist/vscode.html-custom-data.json +24 -5
  80. package/dist/web-types.json +41 -5
  81. package/package.json +8 -8
  82. package/src/Accordion.ts +9 -1
  83. package/src/AccordionItem.ts +10 -0
  84. package/src/AccordionItemTemplate.tsx +2 -2
  85. package/src/AccordionTemplate.tsx +3 -2
  86. package/src/Carousel.ts +36 -6
  87. package/src/CarouselTemplate.tsx +4 -0
  88. package/src/DatePicker.ts +7 -11
  89. package/src/DatePickerPopoverTemplate.tsx +35 -0
  90. package/src/DatePickerTemplate.tsx +27 -0
  91. package/src/MediaPlayerTemplate.tsx +20 -19
  92. package/src/MessageStripTemplate.tsx +4 -2
  93. package/src/RatingBarTemplate.tsx +1 -0
  94. package/src/Review.ts +3 -6
  95. package/src/ReviewItem.ts +15 -19
  96. package/src/ReviewItemTemplate.tsx +49 -0
  97. package/src/ReviewTemplate.tsx +69 -0
  98. package/src/TileTemplate.tsx +1 -0
  99. package/src/generated/themes/Quote.css.ts +1 -1
  100. package/src/generated/themes/RatingIndicator.css.ts +1 -1
  101. package/src/generated/themes/Slider.css.ts +1 -1
  102. package/src/themes/Quote.css +7 -2
  103. package/dist/assets/parameters-bundle.css-7tmaWxIc.js +0 -2
  104. package/dist/assets/parameters-bundle.css-BERBdAGd.js +0 -2
  105. package/dist/assets/parameters-bundle.css-B_2Jldx4.js +0 -2
  106. package/dist/assets/parameters-bundle.css-BbhFHnRW.js +0 -2
  107. package/dist/assets/parameters-bundle.css-Bg4Huwh4.js +0 -2
  108. package/dist/assets/parameters-bundle.css-BwKgmVCr.js +0 -2
  109. package/dist/assets/parameters-bundle.css-C759-AfS.js +0 -2
  110. package/dist/assets/parameters-bundle.css-CCDcKh9J.js +0 -2
  111. package/dist/assets/parameters-bundle.css-COmXsTqR.js +0 -2
  112. package/dist/assets/parameters-bundle.css-CPZYPVEO.js +0 -2
  113. package/dist/assets/parameters-bundle.css-C_z8R1zV.js +0 -2
  114. package/dist/assets/parameters-bundle.css-CuV0KqCS.js +0 -2
  115. package/dist/assets/parameters-bundle.css-DT8OC7CO.js +0 -2
  116. package/dist/assets/parameters-bundle.css-Df2zY3XY.js +0 -2
  117. package/dist/assets/parameters-bundle.css-H0NCnWYS.js +0 -2
  118. package/dist/assets/parameters-bundle.css-pC6uofhy.js +0 -2
  119. package/dist/generated/templates/DatePickerPopoverTemplate.lit.d.ts +0 -3
  120. package/dist/generated/templates/DatePickerPopoverTemplate.lit.js +0 -10
  121. package/dist/generated/templates/DatePickerPopoverTemplate.lit.js.map +0 -1
  122. package/dist/generated/templates/DatePickerTemplate.lit.d.ts +0 -3
  123. package/dist/generated/templates/DatePickerTemplate.lit.js +0 -10
  124. package/dist/generated/templates/DatePickerTemplate.lit.js.map +0 -1
  125. package/dist/generated/templates/ReviewItemTemplate.lit.d.ts +0 -3
  126. package/dist/generated/templates/ReviewItemTemplate.lit.js +0 -10
  127. package/dist/generated/templates/ReviewItemTemplate.lit.js.map +0 -1
  128. package/dist/generated/templates/ReviewTemplate.lit.d.ts +0 -3
  129. package/dist/generated/templates/ReviewTemplate.lit.js +0 -12
  130. package/dist/generated/templates/ReviewTemplate.lit.js.map +0 -1
  131. package/src/DatePicker.hbs +0 -19
  132. package/src/DatePickerPopover.hbs +0 -24
  133. package/src/Review.hbs +0 -44
  134. package/src/ReviewItem.hbs +0 -20
  135. package/src/generated/templates/DatePickerPopoverTemplate.lit.ts +0 -14
  136. package/src/generated/templates/DatePickerTemplate.lit.ts +0 -14
  137. package/src/generated/templates/ReviewItemTemplate.lit.ts +0 -14
  138. package/src/generated/templates/ReviewTemplate.lit.ts +0 -16
@@ -1 +1 @@
1
- {"version":3,"file":"TileTemplate.js","sourceRoot":"","sources":["../src/TileTemplate.tsx"],"names":[],"mappings":";AAEA,MAAM,CAAC,OAAO,UAAU,YAAY;IAClC,MAAM,SAAS,GAAG,WAAW,CAAC;IAC9B,MAAM,IAAI,GAAG,MAAM,CAAC;IACpB,OAAO,CACL,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CACjB,8BACE,eAAM,SAAS,EAAC,QAAQ,EAAC,EAAE,EAAC,iBAAiB,YAAE,IAAI,CAAC,cAAc,GAAQ,EAC1E,YACE,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,IAAI,EAAC,MAAM,sBACM,iBAAiB,EAClC,SAAS,EAAE,IAAI,CAAC,UAAU,EAC1B,OAAO,EAAE,IAAI,CAAC,QAAQ,YACtB,gBAAa,GACX,IACH,CACJ,CAAC,CAAC,CAAC,CACF,cACE,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,IAAI,CAAC,QAAQ,YACtB,gBAAa,GACT,CACP,CACF,CAAC;AACJ,CAAC","sourcesContent":["import type Tile from \"./Tile.js\";\n\nexport default function TileTemplate(this: Tile) {\n const rootClass = \"udex-tile\";\n const part = \"tile\";\n return (\n this.interactive ? (\n <>\n <span className=\"hidden\" id=\"tileDescription\">{this.accessibleName}</span>\n <a\n className={rootClass}\n part={part}\n href={this.href}\n target={this.target}\n role=\"link\"\n aria-describedby=\"tileDescription\"\n onKeyDown={this._onkeydown}\n onClick={this._onclick}>\n <slot></slot>\n </a>\n </>\n ) : (\n <div\n className={rootClass}\n part={part}\n onClick={this._onclick}>\n <slot></slot>\n </div>\n )\n );\n}\n"]}
1
+ {"version":3,"file":"TileTemplate.js","sourceRoot":"","sources":["../src/TileTemplate.tsx"],"names":[],"mappings":";AAEA,MAAM,CAAC,OAAO,UAAU,YAAY;IAClC,MAAM,SAAS,GAAG,WAAW,CAAC;IAC9B,MAAM,IAAI,GAAG,MAAM,CAAC;IACpB,OAAO,CACL,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CACjB,8BACE,eAAM,SAAS,EAAC,QAAQ,EAAC,EAAE,EAAC,iBAAiB,YAAE,IAAI,CAAC,cAAc,GAAQ,EAC1E,YACE,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,CAAC,EACX,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,IAAI,EAAC,MAAM,sBACM,iBAAiB,EAClC,SAAS,EAAE,IAAI,CAAC,UAAU,EAC1B,OAAO,EAAE,IAAI,CAAC,QAAQ,YACtB,gBAAa,GACX,IACH,CACJ,CAAC,CAAC,CAAC,CACF,cACE,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,IAAI,CAAC,QAAQ,YACtB,gBAAa,GACT,CACP,CACF,CAAC;AACJ,CAAC","sourcesContent":["import type Tile from \"./Tile.js\";\n\nexport default function TileTemplate(this: Tile) {\n const rootClass = \"udex-tile\";\n const part = \"tile\";\n return (\n this.interactive ? (\n <>\n <span className=\"hidden\" id=\"tileDescription\">{this.accessibleName}</span>\n <a\n className={rootClass}\n part={part}\n tabindex={0}\n href={this.href}\n target={this.target}\n role=\"link\"\n aria-describedby=\"tileDescription\"\n onKeyDown={this._onkeydown}\n onClick={this._onclick}>\n <slot></slot>\n </a>\n </>\n ) : (\n <div\n className={rootClass}\n part={part}\n onClick={this._onclick}>\n <slot></slot>\n </div>\n )\n );\n}\n"]}
@@ -1,2 +1,2 @@
1
- import{r as w,j as l,a,p as x,d as P,b as R,s as p,m as v,u as S,v as y,w as O,x as L,D,c as A,z as G,I as b,A as I,F as H,B as f,R as E,C as V,G as $,H as B,J as N}from"./bundle.esm-BXDoCHfu.js";const F=n=>n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");function _(n,e,t,s){return n.replaceAll(new RegExp(F(e),`${s?"i":""}g`),t)}function M(n,e){if(!n||!e)return n;const t=r=>{const[c,d]=r.split("");for(;n.indexOf(r)>=0||e.indexOf(r)>=0;)r=`${c}${r}${d}`;return r},s=t("12"),i=t("34");let o=w(_(n,e,r=>`${s}${r}${i}`,!0));return[[s,"<b>"],[i,"</b>"]].forEach(([r,c])=>{o=_(o,r,c,!1)}),o}function z(n,e){const t=(n==null?void 0:n.listItemContent)||q;return l("li",{part:"native-li","data-sap-focus-ref":!0,tabindex:this._effectiveTabIndex,class:this.classes.main,draggable:this.movable,role:e==null?void 0:e.role,title:e==null?void 0:e.title,onFocusIn:this._onfocusin,onKeyUp:this._onkeyup,onKeyDown:this._onkeydown,onClick:this._onclick,children:t.call(this)})}function q(){return l("div",{part:"content",id:`${this._id}-content`,class:"ui5-li-content",children:l("div",{class:"ui5-li-text-wrapper",children:l("span",{part:"title",class:"ui5-li-title",children:l("slot",{})})})})}function U(){return[z.call(this,{listItemContent:K},{role:"option"})]}function K(){return l("div",{part:"content",id:"content",class:"ui5-li-content",children:a("div",{class:"ui5-li-text-wrapper",children:[l("span",{part:"title",className:"ui5-li-title",dangerouslySetInnerHTML:{__html:this.markupText}}),this.additionalText&&l("span",{part:"additional-text",class:"ui5-li-additional-text",children:this.additionalText})]})})}x("@ui5/webcomponents-theming","sap_horizon",async()=>P);x("@ui5/webcomponents","sap_horizon",async()=>R);const W=`:host([ui5-suggestion-item]){height:auto;min-height:var(--_ui5-v2-17-0-rc-5_list_item_base_height)}:host([ui5-suggestion-item]) .ui5-li-root{min-height:var(--_ui5-v2-17-0-rc-5_list_item_base_height)}:host([ui5-suggestion-item]) .ui5-li-content{padding-bottom:.5rem;padding-top:.5rem;box-sizing:border-box}
2
- `;var g=function(n,e,t,s){var i=arguments.length,o=i<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,t):s,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,s);else for(var c=n.length-1;c>=0;c--)(r=n[c])&&(o=(i<3?r(o):i>3?r(e,t,o):r(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o};let h=class extends S{constructor(){super(...arguments),this.markupText=""}onEnterDOM(){y()&&this.setAttribute("desktop","")}get _effectiveTabIndex(){return-1}};g([p()],h.prototype,"text",void 0);g([p()],h.prototype,"additionalText",void 0);g([p()],h.prototype,"markupText",void 0);h=g([v({tag:"ui5-suggestion-item",template:U,styles:[S.styles,W]})],h);h.define();function J(n){const e=(n==null?void 0:n.items)||X;return a("ul",{role:"group",class:"ui5-group-li-root",onDragEnter:this._ondragenter,onDragOver:this._ondragover,onDrop:this._ondrop,onDragLeave:this._ondragleave,children:[this.hasHeader&&l(L,{focused:this.focused,part:"header",accessibleRole:O.Group,children:this.hasFormattedHeader?l("slot",{name:"header"}):this.headerText}),e.call(this),l(D,{orientation:"Horizontal",ownerReference:this})]})}function X(){return l("slot",{})}var T=function(n,e,t,s){var i=arguments.length,o=i<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,t):s,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,s);else for(var c=n.length-1;c>=0;c--)(r=n[c])&&(o=(i<3?r(o):i>3?r(e,t,o):r(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o};let m=class extends G{};T([A({default:!0,invalidateOnChildChange:!0,type:HTMLElement})],m.prototype,"items",void 0);m=T([v({tag:"ui5-suggestion-item-group",template:J})],m);m.define();function j(n){const e=(n==null?void 0:n.suggestionsList)||Q,t=n==null?void 0:n.mobileHeader,s=n==null?void 0:n.valueStateMessage,i=n==null?void 0:n.valueStateMessageInputIcon;return a(E,{class:this.classes.popover,hideArrow:!0,preventFocusRestore:!0,preventInitialFocus:!0,placement:"Bottom",horizontalAlign:"Start",tabindex:-1,style:this.styles.suggestionsPopover,onOpen:this._afterOpenPicker,onClose:this._afterClosePicker,onScroll:this._scroll,open:this.open,opener:this,accessibleName:this._popupLabel,children:[this._isPhone&&l(H,{children:a("div",{slot:"header",class:"ui5-responsive-popover-header",children:[l("div",{class:"row",children:l("span",{children:this._headerTitleText})}),l("div",{class:"row",children:a("div",{class:"input-root-phone native-input-wrapper",children:[l(b,{class:"ui5-input-inner-phone",type:this.inputType,value:this.value,showClearIcon:this.showClearIcon,placeholder:this.placeholder,onInput:this._handleInput}),t==null?void 0:t.call(this)]})}),this.hasValueStateMessage&&a("div",{class:this.classes.popoverValueState,style:this.styles.suggestionPopoverHeader,children:[l(I,{class:"ui5-input-value-state-message-icon",name:i==null?void 0:i.call(this)}),this.open&&(s==null?void 0:s.call(this))]})]})}),!this._isPhone&&this.hasValueStateMessage&&a("div",{slot:"header",class:{"ui5-responsive-popover-header":!0,...this.classes.popoverValueState},style:this.styles.suggestionPopoverHeader,children:[l(I,{class:"ui5-input-value-state-message-icon",name:i==null?void 0:i.call(this)}),this.open&&(s==null?void 0:s.call(this))]}),this.showSuggestions&&e.call(this),this._isPhone&&a("div",{slot:"footer",class:"ui5-responsive-popover-footer",children:[l(f,{design:"Emphasized",onClick:this._confirmMobileValue,children:this._suggestionsOkButtonText}),l(f,{class:"ui5-responsive-popover-close-btn",design:"Transparent",onClick:this._cancelMobileValue,children:this._suggestionsCancelButtonText})]})]})}function Q(){return l($,{accessibleRole:V.ListBox,separators:this.suggestionSeparators,selectionMode:"Single",onMouseDown:this.onItemMouseDown,onItemClick:this._handleSuggestionItemPress,onSelectionChange:this._handleSelectionChange,children:l("slot",{})})}class u{get template(){return j}constructor(e,t,s,i){this.component=e,this.slotName=t,this.handleFocus=i,this.highlight=s,this.selectedItemIndex=-1}onUp(e,t){e.preventDefault();const s=!this.isOpened&&this._hasValueState&&t===-1?0:t;return this._handleItemNavigation(!1,s),!0}onDown(e,t){e.preventDefault();const s=!this.isOpened&&this._hasValueState&&t===-1?0:t;return this._handleItemNavigation(!0,s),!0}onSpace(e){return this._isItemOnTarget()?(e.preventDefault(),this.onItemSelected(this._selectedItem,!0),!0):!1}onEnter(e){return this._isGroupItem?(e.preventDefault(),!1):this._isItemOnTarget()?(this.onItemSelected(this._selectedItem,!0),!0):!1}onPageUp(e){e.preventDefault();const t=this.selectedItemIndex-10>-1;return this._moveItemSelection(this.selectedItemIndex,t?this.selectedItemIndex-=10:this.selectedItemIndex=0),!0}onPageDown(e){e.preventDefault();const t=this._getItems();if(!t)return!0;const s=t.length-1,i=this.selectedItemIndex+10<=s;return this._moveItemSelection(this.selectedItemIndex,i?this.selectedItemIndex+=10:this.selectedItemIndex=s),!0}onHome(e){return e.preventDefault(),this._moveItemSelection(this.selectedItemIndex,this.selectedItemIndex=0),!0}onEnd(e){e.preventDefault();const t=this._getItems().length-1;return t&&this._moveItemSelection(this.selectedItemIndex,this.selectedItemIndex=t),!0}onTab(){return this._isItemOnTarget()?(this.onItemSelected(this._selectedItem,!0),!0):!1}toggle(e,t){(e!==void 0?e:!this.isOpened())?this._getComponent().open=!0:this.close(t.preventFocusRestore)}get _selectedItem(){return this._getNonGroupItems().find(e=>e.selected)}_isScrollable(){const e=this._getScrollContainer();return e.offsetHeight<e.scrollHeight}close(e=!1){const t=this._getItems()&&this._getItems()[this.selectedItemIndex];this._getComponent().open=!1;const s=this._getPicker();s.preventFocusRestore=e,s.open=!1,t&&t.focused&&(t.focused=!1)}updateSelectedItemPosition(e){this.selectedItemIndex=e}onItemSelected(e,t){const s=e,i=this._getNonGroupItems();s&&(this.accInfo={isGroup:s.hasAttribute("ui5-suggestion-item-group"),currentPos:i.indexOf(s)+1,listSize:i.length,itemText:s.text||"",additionalText:s.additionalText},this._getComponent().onItemSelected(s,t),this._getComponent().open=!1)}onItemSelect(e){this._getComponent().onItemSelect(e)}onItemPress(e){let t;const s=e.type==="ui5-item-click";s&&!e.detail.item.selected||this._handledPress&&!s||(s&&e.detail.item.selected?(t=e.detail.item,this._handledPress=!0):t=e.detail.selectedItems[0],this.onItemSelected(t,!1))}_onClose(){this._handledPress=!1}_isItemOnTarget(){return this.isOpened()&&this.selectedItemIndex!==null&&this.selectedItemIndex!==-1&&!this._isGroupItem}get _isGroupItem(){const e=this._getItems();return!e||!e[this.selectedItemIndex]?!1:e[this.selectedItemIndex].hasAttribute("ui5-suggestion-item-group")}isOpened(){var e;return!!((e=this._getPicker())!=null&&e.open)}_handleItemNavigation(e,t){this.selectedItemIndex=t,this._getItems().length&&(e?this._selectNextItem():this._selectPreviousItem())}_selectNextItem(){const e=this._getItems().length,t=this.selectedItemIndex;t!==-1&&t+1>e-1||this._moveItemSelection(t,++this.selectedItemIndex)}_selectPreviousItem(){const e=this._getItems(),t=this.selectedItemIndex;if(!(t===-1||t===null)){if(t-1<0){(e[t].hasAttribute("ui5-suggestion-item")||e[t].hasAttribute("ui5-suggestion-item-custom"))&&(e[t].selected=!1),e[t].focused=!1,this.component.focused=!0,this.component.hasSuggestionItemSelected=!1,this.selectedItemIndex-=1;return}this._moveItemSelection(t,--this.selectedItemIndex)}}_moveItemSelection(e,t){const s=this._getItems(),i=s[t],o=s[e],r=this._getNonGroupItems(),c=i.hasAttribute("ui5-suggestion-item-group");if(!i)return;this.component.focused=!1;const d=this._getItems()[this.selectedItemIndex];if(this.accInfo={isGroup:c,currentPos:s.indexOf(i)+1,itemText:(c?d.headerText:d.text)||""},(i.hasAttribute("ui5-suggestion-item")||i.hasAttribute("ui5-suggestion-item-custom"))&&(this.accInfo.additionalText=i.additionalText||"",this.accInfo.currentPos=r.indexOf(i)+1,this.accInfo.listSize=r.length),o&&(o.focused=!1),(o!=null&&o.hasAttribute("ui5-suggestion-item")||o!=null&&o.hasAttribute("ui5-suggestion-item-custom"))&&(o.selected=!1),i&&(i.focused=!0,c||(i.selected=!0),this.handleFocus&&i.focus()),this.component.hasSuggestionItemSelected=!0,this.onItemSelect(i),!this._isItemIntoView(i)){const C=this._isGroupItem?i.shadowRoot.querySelector("[ui5-li-group-header]"):i;this._scrollItemIntoView(C)}}_deselectItems(){this._getItems().forEach(t=>{t.hasAttribute("ui5-suggestion-item")&&(t.selected=!1),t.focused=!1})}_clearItemFocus(){const e=this._getItems().find(t=>t.focused);e&&(e.focused=!1)}_isItemIntoView(e){const t=e.getDomRef().getBoundingClientRect(),s=this._getComponent().getDomRef().getBoundingClientRect(),i=window.innerHeight||document.documentElement.clientHeight;let o=0;return this._hasValueState&&(o=this._getPicker().querySelector("[slot=header]").getBoundingClientRect().height),t.top+u.SCROLL_STEP<=i&&t.top>=s.top+o}_scrollItemIntoView(e){e.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})}_getScrollContainer(){return this._scrollContainer||(this._scrollContainer=this._getPicker().shadowRoot.querySelector(".ui5-popup-content")),this._scrollContainer}_getItems(){return this._getComponent().getSlottedNodes("suggestionItems").flatMap(t=>t.hasAttribute("ui5-suggestion-item-group")?[t,...t.items]:[t])}_getNonGroupItems(){return this._getItems().filter(e=>!e.hasAttribute("ui5-suggestion-item-group"))}_getComponent(){return this.component}_getList(){return this._getPicker().querySelector("[ui5-list]")}_getListWidth(){var e;return(e=this._getList())==null?void 0:e.offsetWidth}_getPicker(){return this._getComponent().shadowRoot.querySelector("[ui5-responsive-popover]")}get itemSelectionAnnounce(){if(!this.accInfo)return"";if(this.accInfo.isGroup)return`${u.i18nBundle.getText(B)} ${this.accInfo.itemText}`;const e=u.i18nBundle.getText(N,this.accInfo.currentPos||0,this.accInfo.listSize||0);return`${this.accInfo.additionalText} ${e}`}hightlightInput(e,t){return M(e,t)}get _hasValueState(){return this.component.hasValueStateMessage}_clearSelectedSuggestionAndaccInfo(){this.accInfo=void 0,this.selectedItemIndex=0}}u.SCROLL_STEP=60;b.SuggestionsClass=u;export{u as default};
1
+ import{r as w,j as l,a as c,p as x,d as P,b as R,s as p,m as v,u as S,v as y,w as O,x as L,D,c as A,z as G,I as b,A as I,F as H,B as f,R as E,C as V,G as $,H as B,J as N}from"./bundle.esm-C7AybWk0.js";const F=n=>n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");function _(n,e,t,s){return n.replaceAll(new RegExp(F(e),`${s?"i":""}g`),t)}function M(n,e){if(!n||!e)return n;const t=r=>{const[a,d]=r.split("");for(;n.indexOf(r)>=0||e.indexOf(r)>=0;)r=`${a}${r}${d}`;return r},s=t("12"),i=t("34");let o=w(_(n,e,r=>`${s}${r}${i}`,!0));return[[s,"<b>"],[i,"</b>"]].forEach(([r,a])=>{o=_(o,r,a,!1)}),o}function z(n,e){const t=(n==null?void 0:n.listItemContent)||q;return l("li",{part:"native-li","data-sap-focus-ref":!0,tabindex:this._effectiveTabIndex,class:this.classes.main,draggable:this.movable,role:e==null?void 0:e.role,title:e==null?void 0:e.title,onFocusIn:this._onfocusin,onKeyUp:this._onkeyup,onKeyDown:this._onkeydown,onClick:this._onclick,children:t.call(this)})}function q(){return l("div",{part:"content",id:`${this._id}-content`,class:"ui5-li-content",children:l("div",{class:"ui5-li-text-wrapper",children:l("span",{part:"title",class:"ui5-li-title",children:l("slot",{})})})})}function U(){return[z.call(this,{listItemContent:K},{role:"option"})]}function K(){return l("div",{part:"content",id:"content",class:"ui5-li-content",children:c("div",{class:"ui5-li-text-wrapper",children:[l("span",{part:"title",className:"ui5-li-title",dangerouslySetInnerHTML:{__html:this.markupText}}),this.additionalText&&l("span",{part:"additional-text",class:"ui5-li-additional-text",children:this.additionalText})]})})}x("@ui5/webcomponents-theming","sap_horizon",async()=>P);x("@ui5/webcomponents","sap_horizon",async()=>R);const W=`:host([ui5-suggestion-item]){height:auto;min-height:var(--_ui5-v2-17-0_list_item_base_height)}:host([ui5-suggestion-item]) .ui5-li-root{min-height:var(--_ui5-v2-17-0_list_item_base_height)}:host([ui5-suggestion-item]) .ui5-li-content{padding-bottom:.5rem;padding-top:.5rem;box-sizing:border-box}
2
+ `;var g=function(n,e,t,s){var i=arguments.length,o=i<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,t):s,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,s);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(i<3?r(o):i>3?r(e,t,o):r(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o};let h=class extends S{constructor(){super(...arguments),this.markupText=""}onEnterDOM(){y()&&this.setAttribute("desktop","")}get _effectiveTabIndex(){return-1}};g([p()],h.prototype,"text",void 0);g([p()],h.prototype,"additionalText",void 0);g([p()],h.prototype,"markupText",void 0);h=g([v({tag:"ui5-suggestion-item",template:U,styles:[S.styles,W]})],h);h.define();function J(n){const e=(n==null?void 0:n.items)||X;return c("ul",{role:"group",class:"ui5-group-li-root",onDragEnter:this._ondragenter,onDragOver:this._ondragover,onDrop:this._ondrop,onDragLeave:this._ondragleave,children:[this.hasHeader&&l(L,{focused:this.focused,part:"header",accessibleRole:O.Group,children:this.hasFormattedHeader?l("slot",{name:"header"}):this.headerText}),e.call(this),l(D,{orientation:"Horizontal",ownerReference:this})]})}function X(){return l("slot",{})}var T=function(n,e,t,s){var i=arguments.length,o=i<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,t):s,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,s);else for(var a=n.length-1;a>=0;a--)(r=n[a])&&(o=(i<3?r(o):i>3?r(e,t,o):r(e,t))||o);return i>3&&o&&Object.defineProperty(e,t,o),o};let m=class extends G{};T([A({default:!0,invalidateOnChildChange:!0,type:HTMLElement})],m.prototype,"items",void 0);m=T([v({tag:"ui5-suggestion-item-group",template:J})],m);m.define();function j(n){const e=(n==null?void 0:n.suggestionsList)||Q,t=n==null?void 0:n.mobileHeader,s=n==null?void 0:n.valueStateMessage,i=n==null?void 0:n.valueStateMessageInputIcon;return c(E,{class:this.classes.popover,hideArrow:!0,preventFocusRestore:!0,preventInitialFocus:!0,placement:"Bottom",horizontalAlign:"Start",tabindex:-1,style:this.styles.suggestionsPopover,onOpen:this._afterOpenPicker,onClose:this._afterClosePicker,onScroll:this._scroll,open:this.open,opener:this,accessibleName:this._popupLabel,children:[this._isPhone&&l(H,{children:c("div",{slot:"header",class:"ui5-responsive-popover-header",children:[l("div",{class:"row",children:l("span",{children:this._headerTitleText})}),l("div",{class:"row",children:c("div",{class:"input-root-phone native-input-wrapper",children:[l(b,{class:"ui5-input-inner-phone",type:this.inputType,value:this.value,showClearIcon:this.showClearIcon,placeholder:this.placeholder,onInput:this._handleInput}),t==null?void 0:t.call(this)]})}),this.hasValueStateMessage&&c("div",{class:this.classes.popoverValueState,style:this.styles.suggestionPopoverHeader,children:[l(I,{class:"ui5-input-value-state-message-icon",name:i==null?void 0:i.call(this)}),this.open&&(s==null?void 0:s.call(this))]})]})}),!this._isPhone&&this.hasValueStateMessage&&c("div",{slot:"header",class:{"ui5-responsive-popover-header":!0,...this.classes.popoverValueState},style:this.styles.suggestionPopoverHeader,children:[l(I,{class:"ui5-input-value-state-message-icon",name:i==null?void 0:i.call(this)}),this.open&&(s==null?void 0:s.call(this))]}),this.showSuggestions&&e.call(this),this._isPhone&&c("div",{slot:"footer",class:"ui5-responsive-popover-footer",children:[l(f,{design:"Emphasized",onClick:this._confirmMobileValue,children:this._suggestionsOkButtonText}),l(f,{class:"ui5-responsive-popover-close-btn",design:"Transparent",onClick:this._cancelMobileValue,children:this._suggestionsCancelButtonText})]})]})}function Q(){return l($,{accessibleRole:V.ListBox,separators:this.suggestionSeparators,selectionMode:"Single",onMouseDown:this.onItemMouseDown,onItemClick:this._handleSuggestionItemPress,onSelectionChange:this._handleSelectionChange,children:l("slot",{})})}class u{get template(){return j}constructor(e,t,s,i){this.component=e,this.slotName=t,this.handleFocus=i,this.highlight=s,this.selectedItemIndex=-1}onUp(e,t){e.preventDefault();const s=!this.isOpened&&this._hasValueState&&t===-1?0:t;return this._handleItemNavigation(!1,s),!0}onDown(e,t){e.preventDefault();const s=!this.isOpened&&this._hasValueState&&t===-1?0:t;return this._handleItemNavigation(!0,s),!0}onSpace(e){return this._isItemOnTarget()?(e.preventDefault(),this.onItemSelected(this._selectedItem,!0),!0):!1}onEnter(e){return this._isGroupItem?(e.preventDefault(),!1):this._isItemOnTarget()?(this.onItemSelected(this._selectedItem,!0),!0):!1}onPageUp(e){e.preventDefault();const t=this.selectedItemIndex-10>-1;return this._moveItemSelection(this.selectedItemIndex,t?this.selectedItemIndex-=10:this.selectedItemIndex=0),!0}onPageDown(e){e.preventDefault();const t=this._getItems();if(!t)return!0;const s=t.length-1,i=this.selectedItemIndex+10<=s;return this._moveItemSelection(this.selectedItemIndex,i?this.selectedItemIndex+=10:this.selectedItemIndex=s),!0}onHome(e){return e.preventDefault(),this._moveItemSelection(this.selectedItemIndex,this.selectedItemIndex=0),!0}onEnd(e){e.preventDefault();const t=this._getItems().length-1;return t&&this._moveItemSelection(this.selectedItemIndex,this.selectedItemIndex=t),!0}onTab(){return this._isItemOnTarget()?(this.onItemSelected(this._selectedItem,!0),!0):!1}toggle(e,t){(e!==void 0?e:!this.isOpened())?this._getComponent().open=!0:this.close(t.preventFocusRestore)}get _selectedItem(){return this._getNonGroupItems().find(e=>e.selected)}_isScrollable(){const e=this._getScrollContainer();return e.offsetHeight<e.scrollHeight}close(e=!1){const t=this._getItems()&&this._getItems()[this.selectedItemIndex];this._getComponent().open=!1;const s=this._getPicker();s.preventFocusRestore=e,s.open=!1,t&&t.focused&&(t.focused=!1)}updateSelectedItemPosition(e){this.selectedItemIndex=e}onItemSelected(e,t){const s=e,i=this._getNonGroupItems();s&&(this.accInfo={isGroup:s.hasAttribute("ui5-suggestion-item-group"),currentPos:i.indexOf(s)+1,listSize:i.length,itemText:s.text||"",additionalText:s.additionalText},this._getComponent().onItemSelected(s,t),this._getComponent().open=!1)}onItemSelect(e){this._getComponent().onItemSelect(e)}onItemPress(e){let t;const s=e.type==="ui5-item-click";s&&!e.detail.item.selected||this._handledPress&&!s||(s&&e.detail.item.selected?(t=e.detail.item,this._handledPress=!0):t=e.detail.selectedItems[0],this.onItemSelected(t,!1))}_onClose(){this._handledPress=!1}_isItemOnTarget(){return this.isOpened()&&this.selectedItemIndex!==null&&this.selectedItemIndex!==-1&&!this._isGroupItem}get _isGroupItem(){const e=this._getItems();return!e||!e[this.selectedItemIndex]?!1:e[this.selectedItemIndex].hasAttribute("ui5-suggestion-item-group")}isOpened(){var e;return!!((e=this._getPicker())!=null&&e.open)}_handleItemNavigation(e,t){this.selectedItemIndex=t,this._getItems().length&&(e?this._selectNextItem():this._selectPreviousItem())}_selectNextItem(){const e=this._getItems().length,t=this.selectedItemIndex;t!==-1&&t+1>e-1||this._moveItemSelection(t,++this.selectedItemIndex)}_selectPreviousItem(){const e=this._getItems(),t=this.selectedItemIndex;if(!(t===-1||t===null)){if(t-1<0){(e[t].hasAttribute("ui5-suggestion-item")||e[t].hasAttribute("ui5-suggestion-item-custom"))&&(e[t].selected=!1),e[t].focused=!1,this.component.focused=!0,this.component.hasSuggestionItemSelected=!1,this.selectedItemIndex-=1;return}this._moveItemSelection(t,--this.selectedItemIndex)}}_moveItemSelection(e,t){const s=this._getItems(),i=s[t],o=s[e],r=this._getNonGroupItems(),a=i.hasAttribute("ui5-suggestion-item-group");if(!i)return;this.component.focused=!1;const d=this._getItems()[this.selectedItemIndex];if(this.accInfo={isGroup:a,currentPos:s.indexOf(i)+1,itemText:(a?d.headerText:d.text)||""},(i.hasAttribute("ui5-suggestion-item")||i.hasAttribute("ui5-suggestion-item-custom"))&&(this.accInfo.additionalText=i.additionalText||"",this.accInfo.currentPos=r.indexOf(i)+1,this.accInfo.listSize=r.length),o&&(o.focused=!1),(o!=null&&o.hasAttribute("ui5-suggestion-item")||o!=null&&o.hasAttribute("ui5-suggestion-item-custom"))&&(o.selected=!1),i&&(i.focused=!0,a||(i.selected=!0),this.handleFocus&&i.focus()),this.component.hasSuggestionItemSelected=!0,this.onItemSelect(i),!this._isItemIntoView(i)){const C=this._isGroupItem?i.shadowRoot.querySelector("[ui5-li-group-header]"):i;this._scrollItemIntoView(C)}}_deselectItems(){this._getItems().forEach(t=>{t.hasAttribute("ui5-suggestion-item")&&(t.selected=!1),t.focused=!1})}_clearItemFocus(){const e=this._getItems().find(t=>t.focused);e&&(e.focused=!1)}_isItemIntoView(e){const t=e.getDomRef().getBoundingClientRect(),s=this._getComponent().getDomRef().getBoundingClientRect(),i=window.innerHeight||document.documentElement.clientHeight;let o=0;return this._hasValueState&&(o=this._getPicker().querySelector("[slot=header]").getBoundingClientRect().height),t.top+u.SCROLL_STEP<=i&&t.top>=s.top+o}_scrollItemIntoView(e){e.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})}_getScrollContainer(){return this._scrollContainer||(this._scrollContainer=this._getPicker().shadowRoot.querySelector(".ui5-popup-content")),this._scrollContainer}_getItems(){return this._getComponent().getSlottedNodes("suggestionItems").flatMap(t=>t.hasAttribute("ui5-suggestion-item-group")?[t,...t.items]:[t])}_getNonGroupItems(){return this._getItems().filter(e=>!e.hasAttribute("ui5-suggestion-item-group"))}_getComponent(){return this.component}_getList(){return this._getPicker().querySelector("[ui5-list]")}_getListWidth(){var e;return(e=this._getList())==null?void 0:e.offsetWidth}_getPicker(){return this._getComponent().shadowRoot.querySelector("[ui5-responsive-popover]")}get itemSelectionAnnounce(){if(!this.accInfo)return"";if(this.accInfo.isGroup)return`${u.i18nBundle.getText(B)} ${this.accInfo.itemText}`;const e=u.i18nBundle.getText(N,this.accInfo.currentPos||0,this.accInfo.listSize||0);return`${this.accInfo.additionalText} ${e}`}hightlightInput(e,t){return M(e,t)}get _hasValueState(){return this.component.hasValueStateMessage}_clearSelectedSuggestionAndaccInfo(){this.accInfo=void 0,this.selectedItemIndex=0}}u.SCROLL_STEP=60;b.SuggestionsClass=u;export{u as default};
@@ -1,3 +1,3 @@
1
- import{j as o,a as _,F as y,p as m,d as b,b as E,s as x,c as C,i as P,m as O,y as B,e as w,f as I,t as A,E as L,g as R,L as S,R as M,B as N,h as F,k as D,l as X,n as j,o as z,q as k}from"./bundle.esm-BXDoCHfu.js";var T;(function(t){t.InPlace="InPlace",t.Popover="Popover"})(T||(T={}));const $=T;var g;(function(t){t.Off="Off",t.On="On"})(g||(g={}));const H=g;function W(){return o(y,{children:o("span",{children:this._renderEmptyIndicator?_(y,{children:[o("span",{className:"empty-indicator","aria-hidden":"true",children:this._emptyIndicatorSymbol}),o("span",{className:"empty-indicator-aria-label",children:this._emptyIndicatorAriaLabel})]}):o("slot",{})})})}m("@ui5/webcomponents-theming","sap_horizon",async()=>b);m("@ui5/webcomponents","sap_horizon",async()=>E);const q=`:host{max-width:100%;font-size:var(--sapFontSize);font-family:var(--sapFontFamily);color:var(--sapTextColor);line-height:normal;cursor:text;overflow:hidden}:host([max-lines="1"]){display:inline-block;text-overflow:ellipsis;white-space:nowrap}:host(:not([max-lines="1"])){display:-webkit-box;-webkit-line-clamp:var(--_ui5-v2-17-0-rc-5_text_max_lines);line-clamp:var(--_ui5-v2-17-0-rc-5_text_max_lines);-webkit-box-orient:vertical;white-space:normal;word-wrap:break-word}.empty-indicator-aria-label{position:absolute!important;clip:rect(1px,1px,1px,1px);user-select:none;left:0;top:0;font-size:0}
2
- `;var u=function(t,e,n,s){var r=arguments.length,i=r<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,n):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,s);else for(var d=t.length-1;d>=0;d--)(l=t[d])&&(i=(r<3?l(i):r>3?l(e,n,i):l(e,n))||i);return r>3&&i&&Object.defineProperty(e,n,i),i},f;let p=f=class extends w{constructor(){super(...arguments),this.maxLines=1/0,this.emptyIndicatorMode="Off"}onBeforeRendering(){this.style.setProperty(I("--_ui5_text_max_lines"),`${this.maxLines}`)}get hasText(){return A(this.text)}get _renderEmptyIndicator(){return!this.hasText&&this.emptyIndicatorMode===H.On}get _emptyIndicatorAriaLabel(){return f.i18nBundle.getText(L)}get _emptyIndicatorSymbol(){return f.i18nBundle.getText(R)}};u([x({type:Number})],p.prototype,"maxLines",void 0);u([x()],p.prototype,"emptyIndicatorMode",void 0);u([C({type:Node,default:!0})],p.prototype,"text",void 0);u([P("@ui5/webcomponents")],p,"i18nBundle",void 0);p=f=u([O({tag:"ui5-text",renderer:B,template:W,styles:q})],p);p.define();const v=p;function Y(){return _("div",{children:[o(v,{class:"ui5-exp-text-text",emptyIndicatorMode:this.emptyIndicatorMode,children:this._displayedText}),this._maxCharactersExceeded&&_(y,{children:[o("span",{class:"ui5-exp-text-ellipsis",children:this._ellipsisText}),o(S,{id:"toggle",class:"ui5-exp-text-toggle",accessibleRole:"Button",accessibleName:this._accessibleNameForToggle,accessibilityAttributes:this._accessibilityAttributesForToggle,onClick:this._handleToggleClick,children:this._textForToggle}),this._usePopover&&_(M,{open:this._expanded,opener:"toggle",accessibleNameRef:"popover-text",contentOnlyOnDesktop:!0,_hideHeader:!0,class:"ui5-exp-text-popover",onClose:this._handlePopoverClose,children:[o(v,{id:"popover-text",children:this.text}),o("div",{slot:"footer",class:"ui5-exp-text-footer",children:o(N,{design:"Transparent",onClick:this._handleCloseButtonClick,children:this._closeButtonText})})]})]})]})}m("@ui5/webcomponents-theming","sap_horizon",async()=>b);m("@ui5/webcomponents","sap_horizon",async()=>E);const V=`:host{display:inline-block;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);color:var(--sapTextColor)}:host([hidden]){display:none}.ui5-exp-text-text{display:inline}.ui5-exp-text-text,.ui5-exp-text-toggle{font-family:inherit;font-size:inherit}.ui5-exp-text-text,.ui5-exp-text-ellipsis{color:inherit}.ui5-exp-text-popover::part(content){padding-inline:1rem}.ui5-exp-text-footer{width:100%;display:flex;align-items:center;justify-content:flex-end}
3
- `;var h=function(t,e,n,s){var r=arguments.length,i=r<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,n):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,s);else for(var d=t.length-1;d>=0;d--)(l=t[d])&&(i=(r<3?l(i):r>3?l(e,n,i):l(e,n))||i);return r>3&&i&&Object.defineProperty(e,n,i),i},c;let a=c=class extends w{constructor(){super(...arguments),this.maxCharacters=100,this.overflowMode="InPlace",this.emptyIndicatorMode="Off",this._expanded=!1}getFocusDomRef(){var e,n;return this._usePopover?(e=this.shadowRoot)==null?void 0:e.querySelector("[ui5-responsive-popover]"):(n=this.shadowRoot)==null?void 0:n.querySelector("[ui5-link]")}get _displayedText(){var e;return this._expanded&&!this._usePopover?this.text:(e=this.text)==null?void 0:e.substring(0,this.maxCharacters)}get _maxCharactersExceeded(){var e;return(((e=this.text)==null?void 0:e.length)||0)>this.maxCharacters}get _usePopover(){return this.overflowMode===$.Popover}get _ellipsisText(){return this._expanded&&!this._usePopover?" ":"... "}get _textForToggle(){return this._expanded?c.i18nBundle.getText(F):c.i18nBundle.getText(D)}get _closeButtonText(){return c.i18nBundle.getText(X)}get _accessibilityAttributesForToggle(){return this._usePopover?{expanded:this._expanded,hasPopup:"dialog"}:{expanded:this._expanded}}get _accessibleNameForToggle(){if(this._usePopover)return this._expanded?c.i18nBundle.getText(j):c.i18nBundle.getText(z)}_handlePopoverClose(){k()||(this._expanded=!1)}_handleToggleClick(){this._expanded=!this._expanded}_handleCloseButtonClick(e){this._expanded=!1,e.stopPropagation()}};h([x()],a.prototype,"text",void 0);h([x({type:Number})],a.prototype,"maxCharacters",void 0);h([x()],a.prototype,"overflowMode",void 0);h([x()],a.prototype,"emptyIndicatorMode",void 0);h([x({type:Boolean})],a.prototype,"_expanded",void 0);h([P("@ui5/webcomponents")],a,"i18nBundle",void 0);a=c=h([O({tag:"ui5-expandable-text",renderer:B,styles:V,template:Y})],a);a.define();function Q(t){const{className:e,text:n,maxCharacters:s,part:r}=t;return o(a,{part:r,class:e,text:n,maxCharacters:s})}export{Q as default};
1
+ import{j as o,a as _,F as y,p as m,d as b,b as E,s as x,c as C,i as P,m as O,y as B,e as w,f as I,t as A,E as L,g as R,L as S,R as M,B as N,h as F,k as D,l as X,n as j,o as z,q as k}from"./bundle.esm-C7AybWk0.js";var T;(function(t){t.InPlace="InPlace",t.Popover="Popover"})(T||(T={}));const $=T;var g;(function(t){t.Off="Off",t.On="On"})(g||(g={}));const H=g;function W(){return o(y,{children:o("span",{children:this._renderEmptyIndicator?_(y,{children:[o("span",{className:"empty-indicator","aria-hidden":"true",children:this._emptyIndicatorSymbol}),o("span",{className:"empty-indicator-aria-label",children:this._emptyIndicatorAriaLabel})]}):o("slot",{})})})}m("@ui5/webcomponents-theming","sap_horizon",async()=>b);m("@ui5/webcomponents","sap_horizon",async()=>E);const q=`:host{max-width:100%;font-size:var(--sapFontSize);font-family:var(--sapFontFamily);color:var(--sapTextColor);line-height:normal;cursor:text;overflow:hidden}:host([max-lines="1"]){display:inline-block;text-overflow:ellipsis;white-space:nowrap}:host(:not([max-lines="1"])){display:-webkit-box;-webkit-line-clamp:var(--_ui5-v2-17-0_text_max_lines);line-clamp:var(--_ui5-v2-17-0_text_max_lines);-webkit-box-orient:vertical;white-space:normal;word-wrap:break-word}.empty-indicator-aria-label{position:absolute!important;clip:rect(1px,1px,1px,1px);user-select:none;left:0;top:0;font-size:0}
2
+ `;var u=function(t,e,n,s){var a=arguments.length,i=a<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,n):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,s);else for(var d=t.length-1;d>=0;d--)(l=t[d])&&(i=(a<3?l(i):a>3?l(e,n,i):l(e,n))||i);return a>3&&i&&Object.defineProperty(e,n,i),i},f;let p=f=class extends w{constructor(){super(...arguments),this.maxLines=1/0,this.emptyIndicatorMode="Off"}onBeforeRendering(){this.style.setProperty(I("--_ui5_text_max_lines"),`${this.maxLines}`)}get hasText(){return A(this.text)}get _renderEmptyIndicator(){return!this.hasText&&this.emptyIndicatorMode===H.On}get _emptyIndicatorAriaLabel(){return f.i18nBundle.getText(L)}get _emptyIndicatorSymbol(){return f.i18nBundle.getText(R)}};u([x({type:Number})],p.prototype,"maxLines",void 0);u([x()],p.prototype,"emptyIndicatorMode",void 0);u([C({type:Node,default:!0})],p.prototype,"text",void 0);u([P("@ui5/webcomponents")],p,"i18nBundle",void 0);p=f=u([O({tag:"ui5-text",renderer:B,template:W,styles:q})],p);p.define();const v=p;function Y(){return _("div",{children:[o(v,{class:"ui5-exp-text-text",emptyIndicatorMode:this.emptyIndicatorMode,children:this._displayedText}),this._maxCharactersExceeded&&_(y,{children:[o("span",{class:"ui5-exp-text-ellipsis",children:this._ellipsisText}),o(S,{id:"toggle",class:"ui5-exp-text-toggle",accessibleRole:"Button",accessibleName:this._accessibleNameForToggle,accessibilityAttributes:this._accessibilityAttributesForToggle,onClick:this._handleToggleClick,children:this._textForToggle}),this._usePopover&&_(M,{open:this._expanded,opener:"toggle",accessibleNameRef:"popover-text",contentOnlyOnDesktop:!0,_hideHeader:!0,class:"ui5-exp-text-popover",onClose:this._handlePopoverClose,children:[o(v,{id:"popover-text",children:this.text}),o("div",{slot:"footer",class:"ui5-exp-text-footer",children:o(N,{design:"Transparent",onClick:this._handleCloseButtonClick,children:this._closeButtonText})})]})]})]})}m("@ui5/webcomponents-theming","sap_horizon",async()=>b);m("@ui5/webcomponents","sap_horizon",async()=>E);const V=`:host{display:inline-block;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);color:var(--sapTextColor)}:host([hidden]){display:none}.ui5-exp-text-text{display:inline}.ui5-exp-text-text,.ui5-exp-text-toggle{font-family:inherit;font-size:inherit}.ui5-exp-text-text,.ui5-exp-text-ellipsis{color:inherit}.ui5-exp-text-popover::part(content){padding-inline:1rem}.ui5-exp-text-footer{width:100%;display:flex;align-items:center;justify-content:flex-end}
3
+ `;var h=function(t,e,n,s){var a=arguments.length,i=a<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,n):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,n,s);else for(var d=t.length-1;d>=0;d--)(l=t[d])&&(i=(a<3?l(i):a>3?l(e,n,i):l(e,n))||i);return a>3&&i&&Object.defineProperty(e,n,i),i},c;let r=c=class extends w{constructor(){super(...arguments),this.maxCharacters=100,this.overflowMode="InPlace",this.emptyIndicatorMode="Off",this._expanded=!1}getFocusDomRef(){var e,n;return this._usePopover?(e=this.shadowRoot)==null?void 0:e.querySelector("[ui5-responsive-popover]"):(n=this.shadowRoot)==null?void 0:n.querySelector("[ui5-link]")}get _displayedText(){var e;return this._expanded&&!this._usePopover?this.text:(e=this.text)==null?void 0:e.substring(0,this.maxCharacters)}get _maxCharactersExceeded(){var e;return(((e=this.text)==null?void 0:e.length)||0)>this.maxCharacters}get _usePopover(){return this.overflowMode===$.Popover}get _ellipsisText(){return this._expanded&&!this._usePopover?" ":"... "}get _textForToggle(){return this._expanded?c.i18nBundle.getText(F):c.i18nBundle.getText(D)}get _closeButtonText(){return c.i18nBundle.getText(X)}get _accessibilityAttributesForToggle(){return this._usePopover?{expanded:this._expanded,hasPopup:"dialog"}:{expanded:this._expanded}}get _accessibleNameForToggle(){if(this._usePopover)return this._expanded?c.i18nBundle.getText(j):c.i18nBundle.getText(z)}_handlePopoverClose(){k()||(this._expanded=!1)}_handleToggleClick(){this._expanded=!this._expanded}_handleCloseButtonClick(e){this._expanded=!1,e.stopPropagation()}};h([x()],r.prototype,"text",void 0);h([x({type:Number})],r.prototype,"maxCharacters",void 0);h([x()],r.prototype,"overflowMode",void 0);h([x()],r.prototype,"emptyIndicatorMode",void 0);h([x({type:Boolean})],r.prototype,"_expanded",void 0);h([P("@ui5/webcomponents")],r,"i18nBundle",void 0);r=c=h([O({tag:"ui5-expandable-text",renderer:B,styles:V,template:Y})],r);r.define();function Q(t){const{className:e,text:n,maxCharacters:s,part:a}=t;return o(r,{part:a,class:e,text:n,maxCharacters:s})}export{Q as default};