@sapudex/web-components 2.2.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. package/bundle.esm.js +1 -0
  2. package/cypress/fixtures/event-ribbon-links.ts +5 -0
  3. package/cypress/specs/Accordion.cy.tsx +1 -2
  4. package/cypress/specs/AccordionItem.cy.tsx +1 -1
  5. package/cypress/specs/Avatar.cy.tsx +1 -1
  6. package/cypress/specs/AvatarGroup.cy.tsx +1 -2
  7. package/cypress/specs/Badge.cy.tsx +1 -1
  8. package/cypress/specs/CountrySelector.cy.tsx +10 -4
  9. package/cypress/specs/EventRibbon.cy.tsx +110 -0
  10. package/cypress/specs/Footer.cy.tsx +1 -1
  11. package/cypress/specs/ListItem.cy.tsx +1 -1
  12. package/cypress/specs/PhoneNumberField.cy.tsx +4 -2
  13. package/cypress/specs/Review.cy.tsx +1 -3
  14. package/cypress/specs/ReviewItem.cy.tsx +1 -1
  15. package/cypress/specs/SecondaryNavigationDesktop.cy.tsx +123 -116
  16. package/cypress/specs/SecondaryNavigationMobile.cy.tsx +27 -38
  17. package/cypress/specs/SelectBox.cy.tsx +93 -88
  18. package/cypress/specs/Slider.cy.tsx +1 -1
  19. package/cypress/specs/StatusBadge.cy.tsx +1 -1
  20. package/cypress/specs/StatusMessage.cy.tsx +1 -1
  21. package/cypress/specs/Switch.cy.tsx +1 -2
  22. package/cypress/specs/Table.cy.tsx +1 -9
  23. package/cypress/specs/Tag.cy.tsx +1 -1
  24. package/cypress/specs/TagGroup.cy.tsx +1 -2
  25. package/cypress/specs/TextField.cy.tsx +1 -1
  26. package/cypress/specs/Textarea.cy.tsx +1 -1
  27. package/cypress/specs/Toast.cy.tsx +1 -1
  28. package/cypress/specs/Tooltip.cy.tsx +1 -2
  29. package/cypress/specs/TruncatedText.cy.tsx +2 -1
  30. package/cypress/specs/Upload.cy.tsx +1 -2
  31. package/cypress/specs/UploadItem.cy.tsx +1 -1
  32. package/cypress/specs/Wizard.cy.tsx +7 -4
  33. package/cypress/support/component-imports.instrumented.ts +91 -0
  34. package/cypress/support/component-imports.src.ts +91 -0
  35. package/cypress/support/component.ts +1 -1
  36. package/cypress.config.ts +6 -0
  37. package/dist/AssetsVariables.js +4 -0
  38. package/dist/AssetsVariables.js.map +1 -1
  39. package/dist/Button.d.ts +7 -0
  40. package/dist/Button.js +3 -0
  41. package/dist/Button.js.map +1 -1
  42. package/dist/CountrySelector.d.ts +2 -2
  43. package/dist/CountrySelector.js +3 -1
  44. package/dist/CountrySelector.js.map +1 -1
  45. package/dist/DatePicker.js +2 -1
  46. package/dist/DatePicker.js.map +1 -1
  47. package/dist/EventRibbon.d.ts +80 -0
  48. package/dist/EventRibbon.js +111 -0
  49. package/dist/EventRibbon.js.map +1 -0
  50. package/dist/EventRibbonTemplate.d.ts +2 -0
  51. package/dist/EventRibbonTemplate.js +7 -0
  52. package/dist/EventRibbonTemplate.js.map +1 -0
  53. package/dist/HeroBanner.d.ts +1 -1
  54. package/dist/MastheadShell.d.ts +4 -1
  55. package/dist/MastheadShell.js +21 -5
  56. package/dist/MastheadShell.js.map +1 -1
  57. package/dist/Pagination.d.ts +17 -3
  58. package/dist/Pagination.js +33 -31
  59. package/dist/Pagination.js.map +1 -1
  60. package/dist/PhoneNumberField.d.ts +5 -5
  61. package/dist/PhoneNumberField.js +1 -1
  62. package/dist/PhoneNumberField.js.map +1 -1
  63. package/dist/SearchableListBase.d.ts +9 -0
  64. package/dist/SearchableListBase.js +10 -2
  65. package/dist/SearchableListBase.js.map +1 -1
  66. package/dist/TextField.d.ts +7 -0
  67. package/dist/TextField.js +3 -0
  68. package/dist/TextField.js.map +1 -1
  69. package/dist/Wizard.d.ts +20 -1
  70. package/dist/Wizard.js +22 -9
  71. package/dist/Wizard.js.map +1 -1
  72. package/dist/WizardTemplate.js +1 -1
  73. package/dist/WizardTemplate.js.map +1 -1
  74. package/dist/assets/{InputSuggestions-KGCQrV_T.js → InputSuggestions-BgbbJ4tc.js} +1 -1
  75. package/dist/assets/{ListItemStandardExpandableTextTemplate-D4zLIdLd.js → ListItemStandardExpandableTextTemplate-onAnn1Tj.js} +1 -1
  76. package/dist/assets/{bundle.esm-Diw1zQ-o.js → bundle.esm-CwUfibNQ.js} +228 -223
  77. package/dist/css/themes/Button.css +1 -1
  78. package/dist/css/themes/DatePickerPopover.css +1 -1
  79. package/dist/css/themes/EventRibbon.css +1 -0
  80. package/dist/css/themes/MastheadCountrySelector.css +1 -1
  81. package/dist/css/themes/MastheadItem.css +1 -1
  82. package/dist/css/themes/MastheadShell.css +1 -1
  83. package/dist/css/themes/Modal.css +1 -1
  84. package/dist/css/themes/Pagination.css +1 -1
  85. package/dist/css/themes/RatingIndicator.css +1 -1
  86. package/dist/css/themes/Slider.css +1 -1
  87. package/dist/css/themes/TextField.css +1 -1
  88. package/dist/custom-elements-internal.json +342 -0
  89. package/dist/custom-elements.json +341 -0
  90. package/dist/data/CountryListISO3166.d.ts +13 -4
  91. package/dist/data/CountryListISO3166.js +8 -0
  92. package/dist/data/CountryListISO3166.js.map +1 -1
  93. package/dist/generated/templates/PaginationTemplate.lit.js +1 -1
  94. package/dist/generated/templates/PaginationTemplate.lit.js.map +1 -1
  95. package/dist/generated/templates/PhoneNumberFieldTemplate.lit.js +2 -2
  96. package/dist/generated/templates/PhoneNumberFieldTemplate.lit.js.map +1 -1
  97. package/dist/generated/themes/Button.css.d.ts +1 -1
  98. package/dist/generated/themes/Button.css.js +1 -1
  99. package/dist/generated/themes/Button.css.js.map +1 -1
  100. package/dist/generated/themes/DatePickerPopover.css.d.ts +1 -1
  101. package/dist/generated/themes/DatePickerPopover.css.js +1 -1
  102. package/dist/generated/themes/DatePickerPopover.css.js.map +1 -1
  103. package/dist/generated/themes/EventRibbon.css.d.ts +2 -0
  104. package/dist/generated/themes/EventRibbon.css.js +8 -0
  105. package/dist/generated/themes/EventRibbon.css.js.map +1 -0
  106. package/dist/generated/themes/MastheadCountrySelector.css.d.ts +1 -1
  107. package/dist/generated/themes/MastheadCountrySelector.css.js +1 -1
  108. package/dist/generated/themes/MastheadCountrySelector.css.js.map +1 -1
  109. package/dist/generated/themes/MastheadItem.css.d.ts +1 -1
  110. package/dist/generated/themes/MastheadItem.css.js +1 -1
  111. package/dist/generated/themes/MastheadItem.css.js.map +1 -1
  112. package/dist/generated/themes/MastheadShell.css.d.ts +1 -1
  113. package/dist/generated/themes/MastheadShell.css.js +1 -1
  114. package/dist/generated/themes/MastheadShell.css.js.map +1 -1
  115. package/dist/generated/themes/Modal.css.d.ts +1 -1
  116. package/dist/generated/themes/Modal.css.js +1 -1
  117. package/dist/generated/themes/Modal.css.js.map +1 -1
  118. package/dist/generated/themes/Pagination.css.d.ts +1 -1
  119. package/dist/generated/themes/Pagination.css.js +1 -1
  120. package/dist/generated/themes/Pagination.css.js.map +1 -1
  121. package/dist/generated/themes/RatingIndicator.css.d.ts +1 -1
  122. package/dist/generated/themes/RatingIndicator.css.js +1 -1
  123. package/dist/generated/themes/RatingIndicator.css.js.map +1 -1
  124. package/dist/generated/themes/Slider.css.d.ts +1 -1
  125. package/dist/generated/themes/Slider.css.js +1 -1
  126. package/dist/generated/themes/Slider.css.js.map +1 -1
  127. package/dist/generated/themes/TextField.css.d.ts +1 -1
  128. package/dist/generated/themes/TextField.css.js +1 -1
  129. package/dist/generated/themes/TextField.css.js.map +1 -1
  130. package/dist/types/EventRibbon.d.ts +37 -0
  131. package/dist/types/EventRibbon.js +43 -0
  132. package/dist/types/EventRibbon.js.map +1 -0
  133. package/dist/vscode.html-custom-data.json +99 -0
  134. package/dist/web-types.json +150 -1
  135. package/filter-coverage.js +58 -0
  136. package/package.json +7 -2
  137. package/src/AssetsVariables.ts +4 -0
  138. package/src/Button.ts +9 -0
  139. package/src/CountrySelector.ts +5 -3
  140. package/src/DatePicker.ts +2 -1
  141. package/src/EventRibbon.ts +143 -0
  142. package/src/EventRibbonTemplate.tsx +18 -0
  143. package/src/MastheadShell.ts +25 -5
  144. package/src/Pagination.hbs +7 -3
  145. package/src/Pagination.ts +48 -31
  146. package/src/PhoneNumberField.hbs +1 -1
  147. package/src/PhoneNumberField.ts +7 -2
  148. package/src/SearchableListBase.ts +18 -2
  149. package/src/TextField.ts +9 -0
  150. package/src/Wizard.ts +39 -11
  151. package/src/WizardTemplate.tsx +5 -1
  152. package/src/data/CountryListISO3166.ts +10 -2
  153. package/src/generated/templates/PaginationTemplate.lit.ts +1 -1
  154. package/src/generated/templates/PhoneNumberFieldTemplate.lit.ts +1 -1
  155. package/src/generated/themes/Button.css.ts +1 -1
  156. package/src/generated/themes/DatePickerPopover.css.ts +1 -1
  157. package/src/generated/themes/EventRibbon.css.ts +9 -0
  158. package/src/generated/themes/MastheadCountrySelector.css.ts +1 -1
  159. package/src/generated/themes/MastheadItem.css.ts +1 -1
  160. package/src/generated/themes/MastheadShell.css.ts +1 -1
  161. package/src/generated/themes/Modal.css.ts +1 -1
  162. package/src/generated/themes/Pagination.css.ts +1 -1
  163. package/src/generated/themes/RatingIndicator.css.ts +1 -1
  164. package/src/generated/themes/Slider.css.ts +1 -1
  165. package/src/generated/themes/TextField.css.ts +1 -1
  166. package/src/themes/Button.css +69 -27
  167. package/src/themes/DatePickerPopover.css +64 -6
  168. package/src/themes/EventRibbon.css +411 -0
  169. package/src/themes/MastheadCountrySelector.css +8 -5
  170. package/src/themes/MastheadItem.css +12 -4
  171. package/src/themes/MastheadShell.css +3 -1
  172. package/src/themes/Modal.css +4 -0
  173. package/src/themes/Pagination.css +19 -0
  174. package/src/themes/TextField.css +2 -13
  175. package/src/types/EventRibbon.ts +51 -0
  176. package/swap-component-imports.js +18 -0
@@ -1 +1 @@
1
- {"version":3,"file":"DatePicker.js","sourceRoot":"","sources":["../src/DatePicker.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,iBAAiB,MAAM,8CAA8C,CAAC;AAC7E,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,aAAa,MAAM,0DAA0D,CAA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QACvB,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,CAAC,aAAa,EAAE,oBAAoB,CAAC;QAC7C,QAAQ,EAAE,kBAAkB;QAC5B,YAAY,EAAE,CAAC,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,iBAAiB,CAAC;KACvF,CAAC;IACF;;;;;;;OAOG;;IACF,KAAK,CAAC,kBAAkB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAE/D;;;;;;;;OAQG;;IACF,KAAK,CAAC,oBAAoB,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;GAEzC,cAAc,CAqdnB;AAED,cAAc,CAAC,MAAM,EAAE,CAAC;AAExB,eAAe,cAAc,CAAC","sourcesContent":["import DateComponentBase from \"@ui5/webcomponents/dist/DateComponentBase.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\n// eslint-disable-next-line\nimport Calendar, { CalendarSelectionChangeEventDetail } from \"@ui5/webcomponents/dist/Calendar.js\";\nimport CalendarDate from \"@ui5/webcomponents/dist/CalendarDate.js\";\nimport \"@ui5/webcomponents/dist/Icon.js\";\nimport \"@ui5/webcomponents-icons/dist/appointment-2.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { CALENDAR_ICON, DATEPICKER_DATE_DESCRIPTION } from \"./generated/i18n/i18n-defaults.js\";\nimport UDExTextField from \"./TextField.js\";\nimport UDExDropdown from \"./Dropdown.js\";\nimport UDExStatusMessage from \"./StatusMessage.js\";\nimport UDExValueState from \"./types/common.js\";\n\n// Template\nimport DatePickerTemplate from \"./generated/templates/DatePickerTemplate.lit.js\";\n\n// Styles\nimport DatePickerCss from \"./generated/themes/DatePicker.css.js\";\nimport DatePickerPopoverCss from \"./generated/themes/DatePickerPopover.css.js\";\n\nexport enum UDExDatePickerSelectionMode {\n Single = \"Single\",\n Range = \"Range\",\n}\n\nexport type UDExDatePickerSelectionChangeEventDetail = {\n selectedValues: Array<string>;\n selectedDates: Array<number | undefined>;\n timestamp: number | undefined;\n};\n\nexport type UDExDatePickerValueStateChangeEventDetail = {\n valueState: `${UDExValueState}`,\n valid: boolean\n}\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n *\n * <h3>Usage</h3>\n *\n * For the <code>udex-date-picker</code>\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@sapudex/web-components/dist/DatePicker.js\";</code>\n *\n * @constructor\n * @author SAP SE\n * @extends DateComponentBase\n * @tagname udex-date-picker\n * @public\n */\n@customElement({\n tag: \"udex-date-picker\",\n renderer: litRender,\n styles: [DatePickerCss, DatePickerPopoverCss],\n template: DatePickerTemplate,\n dependencies: [CalendarDate, Calendar, UDExTextField, UDExDropdown, UDExStatusMessage],\n})\n/**\n * Fired when the selected dates change.\n *\n * @allowPreventDefault\n * @param {Array<string>} selectedValues The selected dates\n * @param {Array<number>} selectedDates The selected dates as UTC timestamps\n * @public\n */\n@event(\"selection-change\", { cancelable: true, bubbles: true })\n\n/**\n * Fired before the value state of the component is updated internally.\n * The event is preventable, meaning that if it's default action is\n * prevented, the component will not update the value state.\n * @allowPreventDefault\n * @public\n * @param {string} UDExValueState The new `UDExValueState` that will be set.\n * @param {boolean} valid Indicator if the value is in between the min and max value.\n */\n@event(\"value-state-change\", { bubbles: true })\n\nclass UDExDatePicker extends DateComponentBase {\n eventDetails!: {\n \"selection-change\": UDExDatePickerSelectionChangeEventDetail,\n \"value-state-change\": UDExDatePickerValueStateChangeEventDetail,\n };\n /**\n * Defines selection mode of the calendar component.\n *\n * @default \"Single\"\n * @public\n */\n @property()\n selectionMode: `${UDExDatePickerSelectionMode}` = \"Single\";\n\n /**\n * Defines whether the component is read-only.\n * <br><br>\n * <b>Note:</b> A read-only component is not editable,\n * but still provides visual feedback upon user interaction.\n *\n * @default false\n * @public\n */\n @property({ type: Boolean })\n readonly!: boolean;\n\n /**\n * Defines whether the component is required.\n *\n * @default false\n * @public\n */\n @property({ type: Boolean })\n required!: boolean;\n\n /**\n * Defines whether the component is in disabled state.\n * <br><br>\n * <b>Note:</b> A disabled component is completely noninteractive.\n *\n * @default false\n * @public\n */\n @property({ type: Boolean })\n disabled!: boolean;\n\n /**\n * Defines supporting text under the input field.\n *\n * @default \"\"\n * @public\n */\n @property({ type: String })\n supportingText: string = \"\";\n\n /**\n * Defines the value of the input.\n *\n * @default \"\"\n * @public\n */\n @property({ type: String })\n value: string = \"\";\n\n /**\n * Sets the accessible ARIA name of the component.\n *\n * @default undefined\n * @public\n */\n @property({ type: String })\n accessibleName!: string;\n\n /**\n * Receives id (or many ids) of the elements that label the component.\n * @default \"\"\n * @public\n */\n @property()\n accessibleNameRef: string = \"\";\n\n /**\n * Defines label text for the input field.\n *\n * @default undefined\n * @public\n */\n @property({ type: String })\n label?: string;\n\n /**\n * Defines selected dates values.\n *\n * @default \"\"\n * @private\n */\n @property({ type: String, noAttribute: true })\n selectedDates: string = \"\";\n\n /**\n * Defines the value state of the component.\n *\n * @default \"Standard\"\n * @public\n */\n @property()\n valueState: `${UDExValueState}` = UDExValueState.Standard;\n\n /**\n * Defines the date format pattern (e.g., \\\"MMM dd, yyyy\\\" or \\\"MM/dd/yyyy\\\").\n * @default \"MMM dd, yyyy\"\n * @public\n */\n @property({ type: String })\n formatPattern: string = \"MMM dd, yyyy\";\n\n /**\n * The first date in the range during selection (this is a temporary value, not the first date in the value range)\n * @private\n */\n @property()\n _tempValue!: string;\n\n @i18n(\"@sapudex/web-components\")\n static i18nBundle: I18nBundle;\n\n responsivePopover?: UDExDropdown;\n\n private _prevDelimiter!: string | null;\n\n _getResponsePopover(): UDExDropdown {\n return this.shadowRoot!.querySelector<UDExDropdown>(`#udex-${this.__id!}-calendar__popover`)!;\n }\n\n /**\n * Getter for the interactive element that opens the overflow\n * @private\n */\n get _dropdownTrigger(): UDExTextField {\n return this.shadowRoot!.querySelector<UDExTextField>(\".udex-date-picker__input\")!;\n }\n\n _afterDropdownClose(): void {\n this._dropdownTrigger.active = false;\n this._dropdownTrigger.shadowRoot?.querySelector(\"input\")?.blur();\n this._tempValue = \"\";\n }\n\n _afterDropdownOpen(): void {\n this._dropdownTrigger.active = true;\n }\n\n _closeRespPopover(): void {\n if (this.responsivePopover) {\n this.responsivePopover.open = false;\n }\n }\n\n _openRespPopover(): void {\n this._dropdownTrigger.active = true;\n this.responsivePopover = this._getResponsePopover();\n this.responsivePopover.opener = this._dropdownTrigger;\n this.responsivePopover.open = true;\n }\n\n hideCalendar(): void {\n this._closeRespPopover();\n }\n\n showCalendar(): void {\n this._openRespPopover();\n }\n\n handleCalendarChange(e: CustomEvent<CalendarSelectionChangeEventDetail>): void {\n e.preventDefault();\n if (this.selectionMode === UDExDatePickerSelectionMode.Single) {\n const newValue = e.detail.selectedValues && e.detail.selectedValues[0];\n this._updateValueAndFireDecoratorEvents(newValue, true, e);\n }\n\n if (this.selectionMode === UDExDatePickerSelectionMode.Range) {\n const values = e.detail.selectedValues;\n\n if (values.length === 0) {\n return;\n }\n\n if (values.length === 1) { // Do nothing until the user selects 2 dates, we don't change any state at all for one date\n this._tempValue = values[0];\n return;\n }\n\n const newValue = this._buildValue(e.detail.selectedDates[0], e.detail.selectedDates[1]);\n this._updateValueAndFireDecoratorEvents(newValue, true, e);\n }\n\n this.hideCalendar();\n }\n\n get _effectiveDelimiter(): string {\n return \"-\";\n }\n\n _getInput(): HTMLInputElement | null | undefined {\n return this._dropdownTrigger.shadowRoot?.querySelector(\"input\");\n }\n\n _splitValueByDelimiter(value: string) {\n const valuesArray: Array<string> = [];\n const partsArray = value.split(this._prevDelimiter || this._effectiveDelimiter);\n\n // if format successfully parse the value, the value contains only single date\n if (this.getFormat().parse(value)) {\n valuesArray[0] = partsArray.join(this._effectiveDelimiter);\n valuesArray[1] = \"\";\n\n return valuesArray;\n }\n\n valuesArray[0] = partsArray.slice(0, partsArray.length / 2).join(this._effectiveDelimiter);\n valuesArray[1] = partsArray.slice(partsArray.length / 2).join(this._effectiveDelimiter);\n\n return valuesArray;\n }\n\n /**\n * Returns a UTC timestamp, representing the last date in the value string or undefined if the value is empty or there is just one date\n * @private\n */\n _extractLastTimestamp(value: string) {\n if (!value || !this._checkValueValidity(value)) {\n return undefined;\n }\n\n const dateStrings = this._splitValueByDelimiter(value);\n if (dateStrings[1]) {\n const parsedDate = this.getFormat().parse(dateStrings[1], true) as Date;\n return parsedDate.getTime() / 1000;\n }\n\n return undefined;\n }\n\n /**\n * Returns a UTC timestamp, representing the first date in the value string or undefined if the value is empty\n * @private\n */\n _extractFirstTimestamp(value: string) {\n if (!value || !this._checkValueValidity(value)) {\n return undefined;\n }\n\n const dateStrings = this._splitValueByDelimiter(value); // at least one item guaranteed due to the checks above (non-empty and valid)\n\n const parsedDate = this.getFormat().parse(dateStrings[0], true) as Date;\n return parsedDate.getTime() / 1000;\n }\n\n /**\n * Checks if a value is valid against the current date format of the DatePicker.\n * @public\n * @param value A value to be tested against the current date format\n */\n isValid(value: string): boolean {\n if (value === \"\" || value === undefined) {\n return true;\n }\n\n return !!this.getFormat().parse(value);\n }\n\n isValidRange(value: string): boolean {\n const parts = this._splitValueByDelimiter(value);\n return parts.length <= 2 && parts.every(dateString => this.isValid(dateString)); // must be at most 2 dates and each must be valid\n }\n\n isInValidRange(value: string): boolean {\n if (value === \"\" || value === undefined) {\n return true;\n }\n\n const calendarDate = this._getCalendarDateFromString(value);\n\n if (!calendarDate || !this._minDate || !this._maxDate) {\n return false;\n }\n\n return calendarDate.valueOf() >= this._minDate.valueOf() && calendarDate.valueOf() <= this._maxDate.valueOf();\n }\n\n /**\n * Checks if a date is between the minimum and maximum date.\n * @public\n * @param value A value to be checked\n */\n isInValidRangeRange(value: string): boolean {\n return this._splitValueByDelimiter(value).every(dateString => this.isInValidRange(dateString));\n }\n\n _checkValueValidity(value: string): boolean {\n let result = false;\n if (value === \"\") {\n return true;\n }\n if (this.selectionMode === UDExDatePickerSelectionMode.Single) {\n result = this.isValid(value) && this.isInValidRange(value);\n }\n if (this.selectionMode === UDExDatePickerSelectionMode.Range) {\n result = this.isValidRange(value) && this.isInValidRangeRange(value);\n }\n return result;\n }\n\n /**\n * Builds a string value out of two UTC timestamps - this method is the counterpart to _extractFirstTimestamp/_extractLastTimestamp\n * @private\n */\n _buildValue(firstDateTimestamp: number | undefined, lastDateTimestamp: number | undefined) {\n this._prevDelimiter = this._effectiveDelimiter;\n if (firstDateTimestamp) {\n const firstDateString = this._getStringFromTimestamp(firstDateTimestamp * 1000);\n\n if (!lastDateTimestamp) {\n return firstDateString;\n }\n\n const lastDateString = this._getStringFromTimestamp(lastDateTimestamp * 1000);\n return `${firstDateString} ${this._effectiveDelimiter} ${lastDateString}`;\n }\n\n return \"\";\n }\n\n /**\n * The parser understands many formats, but we need one format OR extract both dates as timestamps, flip if necessary, and build (which will use the desired format so we enforce the format too)\n * @protected\n */\n normalizeValue(value: string) {\n let result = \"\";\n if (this.selectionMode === UDExDatePickerSelectionMode.Single) {\n if (value === \"\") {\n return value;\n }\n result = this.getFormat().format(this.getFormat().parse(value, true), true); // it is important to both parse and format the date as UTC\n }\n if (this.selectionMode === UDExDatePickerSelectionMode.Range) {\n const firstDateTimestamp = this._extractFirstTimestamp(value);\n const lastDateTimestamp = this._extractLastTimestamp(value);\n if (firstDateTimestamp && lastDateTimestamp && firstDateTimestamp > lastDateTimestamp) { // if both are timestamps (not undefined), flip if necessary\n return this._buildValue(lastDateTimestamp, firstDateTimestamp);\n }\n result = this._buildValue(firstDateTimestamp, lastDateTimestamp);\n }\n return result;\n }\n\n _updateValueState() {\n const valid = this._checkValueValidity(this.value);\n const previousValueState = this.valueState;\n\n this.valueState = valid ? UDExValueState.Standard : UDExValueState.Error;\n\n const eventPrevented = !this.fireDecoratorEvent(\"value-state-change\", { valueState: this.valueState, valid });\n\n if (eventPrevented) {\n this.valueState = previousValueState;\n }\n }\n\n _buildEventData(value: string): UDExDatePickerSelectionChangeEventDetail {\n if (this.selectionMode === UDExDatePickerSelectionMode.Range) {\n return {\n selectedDates: [this._extractFirstTimestamp(value), this._extractLastTimestamp(value)],\n selectedValues: this._splitValueByDelimiter(this.value),\n timestamp: this._extractLastTimestamp(value),\n };\n }\n return {\n selectedDates: [this._extractFirstTimestamp(value)],\n selectedValues: [value],\n timestamp: this._extractFirstTimestamp(value),\n };\n }\n\n _updateValueAndFireDecoratorEvents(value: string, normalizeValue: boolean, e?: CustomEvent | null) {\n const valid = this._checkValueValidity(value);\n\n if (valid && normalizeValue) {\n value = this.normalizeValue(value); // transform valid values (in any format) to the correct format\n }\n\n this.value = value;\n this._updateValueState(); // Change the value state to Error/None, but only if needed\n\n if (!valid) { return; }\n\n if (e) {\n const { selectedDates, timestamp, selectedValues } = e.detail;\n\n this.fireDecoratorEvent(\n \"selection-change\",\n {\n timestamp,\n selectedDates,\n selectedValues,\n },\n );\n } else {\n this.fireDecoratorEvent(\n \"selection-change\",\n this._buildEventData(value),\n );\n }\n }\n\n _onInputChange(e: Event) {\n this._updateValueAndFireDecoratorEvents((e.target as UDExDatePicker).value, true);\n }\n\n handleInputClick(e: MouseEvent | KeyboardEvent): void {\n e.preventDefault();\n\n if (this.disabled || this.readonly) {\n return;\n }\n\n if (this.responsivePopover?.open) {\n this.hideCalendar();\n } else {\n this.showCalendar();\n }\n }\n\n /**\n * Used to provide selectedDates to the calendar based on the component's state\n * Override in derivatives to provide different rules for setting the calendar's selected dates\n * @protected\n */\n get _calendarSelectedDates(): Array<string> {\n if (this._tempValue) {\n return [this._tempValue];\n }\n\n if (this.value && this._checkValueValidity(this.value)) {\n return this.value.split(\" - \");\n }\n\n return [];\n }\n\n get startValue(): string {\n return this._calendarSelectedDates[0] || \"\";\n }\n\n get endValue(): string {\n return this._calendarSelectedDates[1] || \"\";\n }\n\n get accessibleIconName(): string {\n return UDExDatePicker.i18nBundle.getText(CALENDAR_ICON);\n }\n\n get dateAccessibleName(): string {\n return this.accessibleName || UDExDatePicker.i18nBundle.getText(DATEPICKER_DATE_DESCRIPTION);\n }\n\n get isRangeMode(): boolean {\n return this.selectionMode === UDExDatePickerSelectionMode.Range;\n }\n}\n\nUDExDatePicker.define();\n\nexport default UDExDatePicker;\n"]}
1
+ {"version":3,"file":"DatePicker.js","sourceRoot":"","sources":["../src/DatePicker.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,iBAAiB,MAAM,8CAA8C,CAAC;AAC7E,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,2BAA2B;AAC3B,OAAO,QAAgD,MAAM,qCAAqC,CAAC;AACnG,OAAO,YAAY,MAAM,yCAAyC,CAAC;AACnE,OAAO,iCAAiC,CAAC;AACzC,OAAO,gDAAgD,CAAC;AACxD,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,EAAE,aAAa,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAC/F,OAAO,aAAa,MAAM,gBAAgB,CAAC;AAC3C,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,iBAAiB,MAAM,oBAAoB,CAAC;AACnD,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAE/C,WAAW;AACX,OAAO,kBAAkB,MAAM,iDAAiD,CAAC;AAEjF,SAAS;AACT,OAAO,aAAa,MAAM,sCAAsC,CAAC;AACjE,OAAO,oBAAoB,MAAM,6CAA6C,CAAC;AAE/E,MAAM,CAAN,IAAY,2BAGX;AAHD,WAAY,2BAA2B;IACrC,gDAAiB,CAAA;IACjB,8CAAe,CAAA;AACjB,CAAC,E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QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CACN;AASnB;IADD,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sDACD;AAQxB;IADD,QAAQ,EAAE;yDACsB;AAS/B;IADD,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CACV;AASf;IADD,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;qDACjB;AAS3B;IADD,QAAQ,EAAE;kDACiD;AAQ1D;IADD,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qDACc;AAOvC;IADD,QAAQ,EAAE;kDACW;AAGf;IADN,IAAI,CAAC,yBAAyB,CAAC;wCACF;AA5H1B,cAAc;IA5BnB,aAAa,CAAC;QACb,GAAG,EAAE,kBAAkB;QACvB,QAAQ,EAAE,SAAS;QACnB,MAAM,EAAE,CAAC,aAAa,EAAE,oBAAoB,CAAC;QAC7C,QAAQ,EAAE,kBAAkB;QAC5B,YAAY,EAAE,CAAC,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,iBAAiB,CAAC;KACvF,CAAC;IACF;;;;;;;OAOG;;IACF,KAAK,CAAC,kBAAkB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAE/D;;;;;;;;OAQG;;IACF,KAAK,CAAC,oBAAoB,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;GAEzC,cAAc,CAsdnB;AAED,cAAc,CAAC,MAAM,EAAE,CAAC;AAExB,eAAe,cAAc,CAAC","sourcesContent":["import DateComponentBase from \"@ui5/webcomponents/dist/DateComponentBase.js\";\nimport litRender from \"@ui5/webcomponents-base/dist/renderer/LitRenderer.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\n// eslint-disable-next-line\nimport Calendar, { CalendarSelectionChangeEventDetail } from \"@ui5/webcomponents/dist/Calendar.js\";\nimport CalendarDate from \"@ui5/webcomponents/dist/CalendarDate.js\";\nimport \"@ui5/webcomponents/dist/Icon.js\";\nimport \"@ui5/webcomponents-icons/dist/appointment-2.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { CALENDAR_ICON, DATEPICKER_DATE_DESCRIPTION } from \"./generated/i18n/i18n-defaults.js\";\nimport UDExTextField from \"./TextField.js\";\nimport UDExDropdown from \"./Dropdown.js\";\nimport UDExStatusMessage from \"./StatusMessage.js\";\nimport UDExValueState from \"./types/common.js\";\n\n// Template\nimport DatePickerTemplate from \"./generated/templates/DatePickerTemplate.lit.js\";\n\n// Styles\nimport DatePickerCss from \"./generated/themes/DatePicker.css.js\";\nimport DatePickerPopoverCss from \"./generated/themes/DatePickerPopover.css.js\";\n\nexport enum UDExDatePickerSelectionMode {\n Single = \"Single\",\n Range = \"Range\",\n}\n\nexport type UDExDatePickerSelectionChangeEventDetail = {\n selectedValues: Array<string>;\n selectedDates: Array<number | undefined>;\n timestamp: number | undefined;\n};\n\nexport type UDExDatePickerValueStateChangeEventDetail = {\n valueState: `${UDExValueState}`,\n valid: boolean\n}\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n *\n * <h3>Usage</h3>\n *\n * For the <code>udex-date-picker</code>\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@sapudex/web-components/dist/DatePicker.js\";</code>\n *\n * @constructor\n * @author SAP SE\n * @extends DateComponentBase\n * @tagname udex-date-picker\n * @public\n */\n@customElement({\n tag: \"udex-date-picker\",\n renderer: litRender,\n styles: [DatePickerCss, DatePickerPopoverCss],\n template: DatePickerTemplate,\n dependencies: [CalendarDate, Calendar, UDExTextField, UDExDropdown, UDExStatusMessage],\n})\n/**\n * Fired when the selected dates change.\n *\n * @allowPreventDefault\n * @param {Array<string>} selectedValues The selected dates\n * @param {Array<number>} selectedDates The selected dates as UTC timestamps\n * @public\n */\n@event(\"selection-change\", { cancelable: true, bubbles: true })\n\n/**\n * Fired before the value state of the component is updated internally.\n * The event is preventable, meaning that if it's default action is\n * prevented, the component will not update the value state.\n * @allowPreventDefault\n * @public\n * @param {string} UDExValueState The new `UDExValueState` that will be set.\n * @param {boolean} valid Indicator if the value is in between the min and max value.\n */\n@event(\"value-state-change\", { bubbles: true })\n\nclass UDExDatePicker extends DateComponentBase {\n eventDetails!: {\n \"selection-change\": UDExDatePickerSelectionChangeEventDetail,\n \"value-state-change\": UDExDatePickerValueStateChangeEventDetail,\n };\n /**\n * Defines selection mode of the calendar component.\n *\n * @default \"Single\"\n * @public\n */\n @property()\n selectionMode: `${UDExDatePickerSelectionMode}` = \"Single\";\n\n /**\n * Defines whether the component is read-only.\n * <br><br>\n * <b>Note:</b> A read-only component is not editable,\n * but still provides visual feedback upon user interaction.\n *\n * @default false\n * @public\n */\n @property({ type: Boolean })\n readonly!: boolean;\n\n /**\n * Defines whether the component is required.\n *\n * @default false\n * @public\n */\n @property({ type: Boolean })\n required!: boolean;\n\n /**\n * Defines whether the component is in disabled state.\n * <br><br>\n * <b>Note:</b> A disabled component is completely noninteractive.\n *\n * @default false\n * @public\n */\n @property({ type: Boolean })\n disabled!: boolean;\n\n /**\n * Defines supporting text under the input field.\n *\n * @default \"\"\n * @public\n */\n @property({ type: String })\n supportingText: string = \"\";\n\n /**\n * Defines the value of the input.\n *\n * @default \"\"\n * @public\n */\n @property({ type: String })\n value: string = \"\";\n\n /**\n * Sets the accessible ARIA name of the component.\n *\n * @default undefined\n * @public\n */\n @property({ type: String })\n accessibleName!: string;\n\n /**\n * Receives id (or many ids) of the elements that label the component.\n * @default \"\"\n * @public\n */\n @property()\n accessibleNameRef: string = \"\";\n\n /**\n * Defines label text for the input field.\n *\n * @default undefined\n * @public\n */\n @property({ type: String })\n label?: string;\n\n /**\n * Defines selected dates values.\n *\n * @default \"\"\n * @private\n */\n @property({ type: String, noAttribute: true })\n selectedDates: string = \"\";\n\n /**\n * Defines the value state of the component.\n *\n * @default \"Standard\"\n * @public\n */\n @property()\n valueState: `${UDExValueState}` = UDExValueState.Standard;\n\n /**\n * Defines the date format pattern (e.g., \\\"MMM dd, yyyy\\\" or \\\"MM/dd/yyyy\\\").\n * @default \"MMM dd, yyyy\"\n * @public\n */\n @property({ type: String })\n formatPattern: string = \"MMM dd, yyyy\";\n\n /**\n * The first date in the range during selection (this is a temporary value, not the first date in the value range)\n * @private\n */\n @property()\n _tempValue!: string;\n\n @i18n(\"@sapudex/web-components\")\n static i18nBundle: I18nBundle;\n\n responsivePopover?: UDExDropdown;\n\n private _prevDelimiter!: string | null;\n\n _getResponsePopover(): UDExDropdown {\n return this.shadowRoot!.querySelector<UDExDropdown>(`#udex-${this.__id!}-calendar__popover`)!;\n }\n\n /**\n * Getter for the interactive element that opens the overflow\n * @private\n */\n get _dropdownTrigger(): UDExTextField {\n return this.shadowRoot!.querySelector<UDExTextField>(\".udex-date-picker__input\")!;\n }\n\n _afterDropdownClose(): void {\n this._dropdownTrigger.active = false;\n this._dropdownTrigger.iconActive = false;\n this._dropdownTrigger.shadowRoot?.querySelector(\"input\")?.blur();\n this._tempValue = \"\";\n }\n\n _afterDropdownOpen(): void {\n this._dropdownTrigger.iconActive = true;\n }\n\n _closeRespPopover(): void {\n if (this.responsivePopover) {\n this.responsivePopover.open = false;\n }\n }\n\n _openRespPopover(): void {\n this._dropdownTrigger.active = true;\n this.responsivePopover = this._getResponsePopover();\n this.responsivePopover.opener = this._dropdownTrigger;\n this.responsivePopover.open = true;\n }\n\n hideCalendar(): void {\n this._closeRespPopover();\n }\n\n showCalendar(): void {\n this._openRespPopover();\n }\n\n handleCalendarChange(e: CustomEvent<CalendarSelectionChangeEventDetail>): void {\n e.preventDefault();\n if (this.selectionMode === UDExDatePickerSelectionMode.Single) {\n const newValue = e.detail.selectedValues && e.detail.selectedValues[0];\n this._updateValueAndFireDecoratorEvents(newValue, true, e);\n }\n\n if (this.selectionMode === UDExDatePickerSelectionMode.Range) {\n const values = e.detail.selectedValues;\n\n if (values.length === 0) {\n return;\n }\n\n if (values.length === 1) { // Do nothing until the user selects 2 dates, we don't change any state at all for one date\n this._tempValue = values[0];\n return;\n }\n\n const newValue = this._buildValue(e.detail.selectedDates[0], e.detail.selectedDates[1]);\n this._updateValueAndFireDecoratorEvents(newValue, true, e);\n }\n\n this.hideCalendar();\n }\n\n get _effectiveDelimiter(): string {\n return \"-\";\n }\n\n _getInput(): HTMLInputElement | null | undefined {\n return this._dropdownTrigger.shadowRoot?.querySelector(\"input\");\n }\n\n _splitValueByDelimiter(value: string) {\n const valuesArray: Array<string> = [];\n const partsArray = value.split(this._prevDelimiter || this._effectiveDelimiter);\n\n // if format successfully parse the value, the value contains only single date\n if (this.getFormat().parse(value)) {\n valuesArray[0] = partsArray.join(this._effectiveDelimiter);\n valuesArray[1] = \"\";\n\n return valuesArray;\n }\n\n valuesArray[0] = partsArray.slice(0, partsArray.length / 2).join(this._effectiveDelimiter);\n valuesArray[1] = partsArray.slice(partsArray.length / 2).join(this._effectiveDelimiter);\n\n return valuesArray;\n }\n\n /**\n * Returns a UTC timestamp, representing the last date in the value string or undefined if the value is empty or there is just one date\n * @private\n */\n _extractLastTimestamp(value: string) {\n if (!value || !this._checkValueValidity(value)) {\n return undefined;\n }\n\n const dateStrings = this._splitValueByDelimiter(value);\n if (dateStrings[1]) {\n const parsedDate = this.getFormat().parse(dateStrings[1], true) as Date;\n return parsedDate.getTime() / 1000;\n }\n\n return undefined;\n }\n\n /**\n * Returns a UTC timestamp, representing the first date in the value string or undefined if the value is empty\n * @private\n */\n _extractFirstTimestamp(value: string) {\n if (!value || !this._checkValueValidity(value)) {\n return undefined;\n }\n\n const dateStrings = this._splitValueByDelimiter(value); // at least one item guaranteed due to the checks above (non-empty and valid)\n\n const parsedDate = this.getFormat().parse(dateStrings[0], true) as Date;\n return parsedDate.getTime() / 1000;\n }\n\n /**\n * Checks if a value is valid against the current date format of the DatePicker.\n * @public\n * @param value A value to be tested against the current date format\n */\n isValid(value: string): boolean {\n if (value === \"\" || value === undefined) {\n return true;\n }\n\n return !!this.getFormat().parse(value);\n }\n\n isValidRange(value: string): boolean {\n const parts = this._splitValueByDelimiter(value);\n return parts.length <= 2 && parts.every(dateString => this.isValid(dateString)); // must be at most 2 dates and each must be valid\n }\n\n isInValidRange(value: string): boolean {\n if (value === \"\" || value === undefined) {\n return true;\n }\n\n const calendarDate = this._getCalendarDateFromString(value);\n\n if (!calendarDate || !this._minDate || !this._maxDate) {\n return false;\n }\n\n return calendarDate.valueOf() >= this._minDate.valueOf() && calendarDate.valueOf() <= this._maxDate.valueOf();\n }\n\n /**\n * Checks if a date is between the minimum and maximum date.\n * @public\n * @param value A value to be checked\n */\n isInValidRangeRange(value: string): boolean {\n return this._splitValueByDelimiter(value).every(dateString => this.isInValidRange(dateString));\n }\n\n _checkValueValidity(value: string): boolean {\n let result = false;\n if (value === \"\") {\n return true;\n }\n if (this.selectionMode === UDExDatePickerSelectionMode.Single) {\n result = this.isValid(value) && this.isInValidRange(value);\n }\n if (this.selectionMode === UDExDatePickerSelectionMode.Range) {\n result = this.isValidRange(value) && this.isInValidRangeRange(value);\n }\n return result;\n }\n\n /**\n * Builds a string value out of two UTC timestamps - this method is the counterpart to _extractFirstTimestamp/_extractLastTimestamp\n * @private\n */\n _buildValue(firstDateTimestamp: number | undefined, lastDateTimestamp: number | undefined) {\n this._prevDelimiter = this._effectiveDelimiter;\n if (firstDateTimestamp) {\n const firstDateString = this._getStringFromTimestamp(firstDateTimestamp * 1000);\n\n if (!lastDateTimestamp) {\n return firstDateString;\n }\n\n const lastDateString = this._getStringFromTimestamp(lastDateTimestamp * 1000);\n return `${firstDateString} ${this._effectiveDelimiter} ${lastDateString}`;\n }\n\n return \"\";\n }\n\n /**\n * The parser understands many formats, but we need one format OR extract both dates as timestamps, flip if necessary, and build (which will use the desired format so we enforce the format too)\n * @protected\n */\n normalizeValue(value: string) {\n let result = \"\";\n if (this.selectionMode === UDExDatePickerSelectionMode.Single) {\n if (value === \"\") {\n return value;\n }\n result = this.getFormat().format(this.getFormat().parse(value, true), true); // it is important to both parse and format the date as UTC\n }\n if (this.selectionMode === UDExDatePickerSelectionMode.Range) {\n const firstDateTimestamp = this._extractFirstTimestamp(value);\n const lastDateTimestamp = this._extractLastTimestamp(value);\n if (firstDateTimestamp && lastDateTimestamp && firstDateTimestamp > lastDateTimestamp) { // if both are timestamps (not undefined), flip if necessary\n return this._buildValue(lastDateTimestamp, firstDateTimestamp);\n }\n result = this._buildValue(firstDateTimestamp, lastDateTimestamp);\n }\n return result;\n }\n\n _updateValueState() {\n const valid = this._checkValueValidity(this.value);\n const previousValueState = this.valueState;\n\n this.valueState = valid ? UDExValueState.Standard : UDExValueState.Error;\n\n const eventPrevented = !this.fireDecoratorEvent(\"value-state-change\", { valueState: this.valueState, valid });\n\n if (eventPrevented) {\n this.valueState = previousValueState;\n }\n }\n\n _buildEventData(value: string): UDExDatePickerSelectionChangeEventDetail {\n if (this.selectionMode === UDExDatePickerSelectionMode.Range) {\n return {\n selectedDates: [this._extractFirstTimestamp(value), this._extractLastTimestamp(value)],\n selectedValues: this._splitValueByDelimiter(this.value),\n timestamp: this._extractLastTimestamp(value),\n };\n }\n return {\n selectedDates: [this._extractFirstTimestamp(value)],\n selectedValues: [value],\n timestamp: this._extractFirstTimestamp(value),\n };\n }\n\n _updateValueAndFireDecoratorEvents(value: string, normalizeValue: boolean, e?: CustomEvent | null) {\n const valid = this._checkValueValidity(value);\n\n if (valid && normalizeValue) {\n value = this.normalizeValue(value); // transform valid values (in any format) to the correct format\n }\n\n this.value = value;\n this._updateValueState(); // Change the value state to Error/None, but only if needed\n\n if (!valid) { return; }\n\n if (e) {\n const { selectedDates, timestamp, selectedValues } = e.detail;\n\n this.fireDecoratorEvent(\n \"selection-change\",\n {\n timestamp,\n selectedDates,\n selectedValues,\n },\n );\n } else {\n this.fireDecoratorEvent(\n \"selection-change\",\n this._buildEventData(value),\n );\n }\n }\n\n _onInputChange(e: Event) {\n this._updateValueAndFireDecoratorEvents((e.target as UDExDatePicker).value, true);\n }\n\n handleInputClick(e: MouseEvent | KeyboardEvent): void {\n e.preventDefault();\n\n if (this.disabled || this.readonly) {\n return;\n }\n\n if (this.responsivePopover?.open) {\n this.hideCalendar();\n } else {\n this.showCalendar();\n }\n }\n\n /**\n * Used to provide selectedDates to the calendar based on the component's state\n * Override in derivatives to provide different rules for setting the calendar's selected dates\n * @protected\n */\n get _calendarSelectedDates(): Array<string> {\n if (this._tempValue) {\n return [this._tempValue];\n }\n\n if (this.value && this._checkValueValidity(this.value)) {\n return this.value.split(\" - \");\n }\n\n return [];\n }\n\n get startValue(): string {\n return this._calendarSelectedDates[0] || \"\";\n }\n\n get endValue(): string {\n return this._calendarSelectedDates[1] || \"\";\n }\n\n get accessibleIconName(): string {\n return UDExDatePicker.i18nBundle.getText(CALENDAR_ICON);\n }\n\n get dateAccessibleName(): string {\n return this.accessibleName || UDExDatePicker.i18nBundle.getText(DATEPICKER_DATE_DESCRIPTION);\n }\n\n get isRangeMode(): boolean {\n return this.selectionMode === UDExDatePickerSelectionMode.Range;\n }\n}\n\nUDExDatePicker.define();\n\nexport default UDExDatePicker;\n"]}
@@ -0,0 +1,80 @@
1
+ import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
2
+ import type { UDExEventRibbonColorSheme, UDExEventRibbonLink, UDExEventRibbonIcon, UDExEventRibbonLogo } from "./types/EventRibbon.js";
3
+ import { UDExEventRibbonMode } from "./types/EventRibbon.js";
4
+ import "@ui5/webcomponents-icons/add-calendar.js";
5
+ import "@ui5/webcomponents-icons/media-play.js";
6
+ /**
7
+ * @class
8
+ *
9
+ * <h3 class="comment-api-title">Overview</h3>
10
+ *
11
+ *
12
+ * <h3>Usage</h3>
13
+ *
14
+ * For the <code>udex-event-ribbon</code>
15
+ * <h3>ES6 Module Import</h3>
16
+ *
17
+ * <code>import "@sapudex/web-components/dist/EventRibbon.js";</code>
18
+ *
19
+ * @constructor
20
+ * @extends UI5Element
21
+ * @public
22
+ */
23
+ declare class UDExEventRibbon extends UI5Element {
24
+ /**
25
+ * Defines the text of the event logo.
26
+ *
27
+ * @default ""
28
+ * @public
29
+ */
30
+ eventLogo: `${UDExEventRibbonLogo}`;
31
+ /**
32
+ * Defines the link details of the event ribbon.
33
+ *
34
+ * @default "{}"
35
+ * @public
36
+ */
37
+ eventLink: string;
38
+ /**
39
+ * Defines the icon displayed next to the link.
40
+ *
41
+ * @default ""
42
+ * @public
43
+ */
44
+ eventLinkIcon: `${UDExEventRibbonIcon}`;
45
+ /**
46
+ * Defines the text displayed in event ribbon.
47
+ *
48
+ * @default ""
49
+ * @public
50
+ */
51
+ eventText: string;
52
+ /**
53
+ * Defines whether event-ribbon uses dark or light theme.
54
+ *
55
+ * @default "light"
56
+ * @public
57
+ */
58
+ mode: `${UDExEventRibbonMode}`;
59
+ /**
60
+ * Defines the solid background color.
61
+ *
62
+ * @default "Blue"
63
+ * @public
64
+ */
65
+ backgroundColorScheme: UDExEventRibbonColorSheme;
66
+ /**
67
+ * Allows control over the background image source.
68
+ *
69
+ * @public
70
+ */
71
+ backgroundImage?: string;
72
+ _eventLink: UDExEventRibbonLink;
73
+ onBeforeRendering(): void;
74
+ onAfterRendering(): void;
75
+ applyColorScheme(): void;
76
+ handleKeyDown(e: KeyboardEvent): void;
77
+ get eventLogoAlt(): string;
78
+ get eventLogoPath(): string;
79
+ }
80
+ export default UDExEventRibbon;
@@ -0,0 +1,111 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
8
+ import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
9
+ import property from "@ui5/webcomponents-base/dist/decorators/property.js";
10
+ import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
11
+ import { eventLogoText, UDExEventRibbonMode } from "./types/EventRibbon.js";
12
+ import "@ui5/webcomponents-icons/add-calendar.js";
13
+ import "@ui5/webcomponents-icons/media-play.js";
14
+ import EventRibbonTemplate from "./EventRibbonTemplate.js";
15
+ // Styles
16
+ import EventRibbonCss from "./generated/themes/EventRibbon.css.js";
17
+ import { isEnter, isSpace } from "@ui5/webcomponents-base/dist/Keys.js";
18
+ /**
19
+ * @class
20
+ *
21
+ * <h3 class="comment-api-title">Overview</h3>
22
+ *
23
+ *
24
+ * <h3>Usage</h3>
25
+ *
26
+ * For the <code>udex-event-ribbon</code>
27
+ * <h3>ES6 Module Import</h3>
28
+ *
29
+ * <code>import "@sapudex/web-components/dist/EventRibbon.js";</code>
30
+ *
31
+ * @constructor
32
+ * @extends UI5Element
33
+ * @public
34
+ */
35
+ let UDExEventRibbon = class UDExEventRibbon extends UI5Element {
36
+ constructor() {
37
+ super(...arguments);
38
+ /**
39
+ * Defines the link details of the event ribbon.
40
+ *
41
+ * @default "{}"
42
+ * @public
43
+ */
44
+ this.eventLink = "{}";
45
+ /**
46
+ * Defines whether event-ribbon uses dark or light theme.
47
+ *
48
+ * @default "light"
49
+ * @public
50
+ */
51
+ this.mode = UDExEventRibbonMode.light;
52
+ }
53
+ onBeforeRendering() {
54
+ this._eventLink = JSON.parse(this.eventLink);
55
+ }
56
+ onAfterRendering() {
57
+ this.applyColorScheme();
58
+ }
59
+ applyColorScheme() {
60
+ const backgroundColorLowercase = this.backgroundColorScheme.toLowerCase();
61
+ const backgroundColor = `var(--udex-event-ribbon-${this.mode}-${backgroundColorLowercase}-default-background-color)`;
62
+ const backgroundColorHover = `var(--udex-event-ribbon-${this.mode}-${backgroundColorLowercase}-hover-background-color)`;
63
+ this.style.setProperty("--udex-event-ribbon-background-color", backgroundColor);
64
+ this.style.setProperty("--udex-event-ribbon-hover-background-color", backgroundColorHover);
65
+ this.style.setProperty("--udex-event-ribbon-background-image", `url("${this.backgroundImage}")`);
66
+ }
67
+ handleKeyDown(e) {
68
+ if (isSpace(e) || isEnter(e)) {
69
+ e.preventDefault();
70
+ this.shadowRoot.querySelector("a")?.click();
71
+ }
72
+ }
73
+ get eventLogoAlt() {
74
+ return eventLogoText[this.eventLogo];
75
+ }
76
+ get eventLogoPath() {
77
+ return `https://cdn.udex.services.sap.com/dds/design-tokens/assets/logos/event-ribbon-logo-${this.eventLogo}.svg`;
78
+ }
79
+ };
80
+ __decorate([
81
+ property({ type: String })
82
+ ], UDExEventRibbon.prototype, "eventLogo", void 0);
83
+ __decorate([
84
+ property({ type: String })
85
+ ], UDExEventRibbon.prototype, "eventLink", void 0);
86
+ __decorate([
87
+ property({ type: String })
88
+ ], UDExEventRibbon.prototype, "eventLinkIcon", void 0);
89
+ __decorate([
90
+ property({ type: String })
91
+ ], UDExEventRibbon.prototype, "eventText", void 0);
92
+ __decorate([
93
+ property({ type: String })
94
+ ], UDExEventRibbon.prototype, "mode", void 0);
95
+ __decorate([
96
+ property({ type: String })
97
+ ], UDExEventRibbon.prototype, "backgroundColorScheme", void 0);
98
+ __decorate([
99
+ property({ type: String })
100
+ ], UDExEventRibbon.prototype, "backgroundImage", void 0);
101
+ UDExEventRibbon = __decorate([
102
+ customElement({
103
+ tag: "udex-event-ribbon",
104
+ renderer: jsxRenderer,
105
+ styles: EventRibbonCss,
106
+ template: EventRibbonTemplate,
107
+ })
108
+ ], UDExEventRibbon);
109
+ UDExEventRibbon.define();
110
+ export default UDExEventRibbon;
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,EAAE,mBAAmB;KAC9B,CAAC;GAEI,eAAe,CAkGpB;AAED,eAAe,CAAC,MAAM,EAAE,CAAC;AAEzB,eAAe,eAAe,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport type {\n UDExEventRibbonColorSheme, UDExEventRibbonLink, UDExEventRibbonIcon, UDExEventRibbonLogo,\n} from \"./types/EventRibbon.js\";\nimport { eventLogoText, UDExEventRibbonMode } from \"./types/EventRibbon.js\";\nimport \"@ui5/webcomponents-icons/add-calendar.js\";\nimport \"@ui5/webcomponents-icons/media-play.js\";\nimport EventRibbonTemplate from \"./EventRibbonTemplate.js\";\n\n// Styles\nimport EventRibbonCss from \"./generated/themes/EventRibbon.css.js\";\nimport { isEnter, isSpace } from \"@ui5/webcomponents-base/dist/Keys.js\";\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n *\n * <h3>Usage</h3>\n *\n * For the <code>udex-event-ribbon</code>\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@sapudex/web-components/dist/EventRibbon.js\";</code>\n *\n * @constructor\n * @extends UI5Element\n * @public\n */\n@customElement({\n tag: \"udex-event-ribbon\",\n renderer: jsxRenderer,\n styles: EventRibbonCss,\n template: EventRibbonTemplate,\n})\n\nclass UDExEventRibbon extends UI5Element {\n /**\n * Defines the text of the event logo.\n *\n * @default \"\"\n * @public\n */\n @property({ type: String })\n eventLogo!: `${UDExEventRibbonLogo}`;\n\n /**\n * Defines the link details of the event ribbon.\n *\n * @default \"{}\"\n * @public\n */\n @property({ type: String })\n eventLink: string = \"{}\";\n\n /**\n * Defines the icon displayed next to the link.\n *\n * @default \"\"\n * @public\n */\n @property({ type: String })\n eventLinkIcon!: `${UDExEventRibbonIcon}`;\n\n /**\n * Defines the text displayed in event ribbon.\n *\n * @default \"\"\n * @public\n */\n @property({ type: String })\n eventText!: string;\n\n /**\n * Defines whether event-ribbon uses dark or light theme.\n *\n * @default \"light\"\n * @public\n */\n @property({ type: String })\n mode: `${UDExEventRibbonMode}` = UDExEventRibbonMode.light;\n\n /**\n * Defines the solid background color.\n *\n * @default \"Blue\"\n * @public\n */\n @property({ type: String })\n backgroundColorScheme!: UDExEventRibbonColorSheme;\n\n /**\n * Allows control over the background image source.\n *\n * @public\n */\n @property({ type: String })\n backgroundImage?: string;\n\n _eventLink!: UDExEventRibbonLink;\n\n onBeforeRendering(): void {\n this._eventLink = JSON.parse(this.eventLink);\n }\n\n onAfterRendering(): void {\n this.applyColorScheme();\n }\n\n applyColorScheme(): void {\n const backgroundColorLowercase = this.backgroundColorScheme.toLowerCase();\n const backgroundColor: string = `var(--udex-event-ribbon-${this.mode}-${backgroundColorLowercase}-default-background-color)`;\n const backgroundColorHover: string = `var(--udex-event-ribbon-${this.mode}-${backgroundColorLowercase}-hover-background-color)`;\n\n this.style.setProperty(\"--udex-event-ribbon-background-color\", backgroundColor);\n this.style.setProperty(\"--udex-event-ribbon-hover-background-color\", backgroundColorHover);\n\n this.style.setProperty(\"--udex-event-ribbon-background-image\", `url(\"${this.backgroundImage}\")`);\n }\n\n handleKeyDown(e: KeyboardEvent): void {\n if (isSpace(e) || isEnter(e)) {\n e.preventDefault();\n this.shadowRoot!.querySelector(\"a\")?.click();\n }\n }\n\n get eventLogoAlt(): string {\n return eventLogoText[this.eventLogo];\n }\n\n get eventLogoPath(): string {\n return `https://cdn.udex.services.sap.com/dds/design-tokens/assets/logos/event-ribbon-logo-${this.eventLogo}.svg`;\n }\n}\n\nUDExEventRibbon.define();\n\nexport default UDExEventRibbon;\n"]}
@@ -0,0 +1,2 @@
1
+ import type UDExEventRibbon from "./EventRibbon.js";
2
+ export default function EventRibbonTemplate(this: UDExEventRibbon): import("@ui5/webcomponents-base").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@ui5/webcomponents-base/jsx-runtime";
2
+ import Icon from "@ui5/webcomponents/dist/Icon.js";
3
+ export default function EventRibbonTemplate() {
4
+ const { text, target, url } = this._eventLink;
5
+ return (_jsxs("a", { onKeyDown: this.handleKeyDown, role: "banner", "aria-label": this.eventText, class: { "udex-event-ribbon__container": true, "udex-event-ribbon__container-with-background-image": this.backgroundImage }, target: target, href: url, title: text, children: [_jsx("div", { class: "udex-event-ribbon__logo", children: _jsx("img", { src: this.eventLogoPath, alt: this.eventLogoAlt }) }), this.eventText && _jsx("p", { class: "udex-event-ribbon__text", children: this.eventText }), _jsxs("div", { class: "udex-event-ribbon__link-container", children: [this.eventLinkIcon && _jsx(Icon, { name: this.eventLinkIcon }), _jsx("span", { children: text })] })] }));
6
+ }
7
+ //# sourceMappingURL=EventRibbonTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EventRibbonTemplate.js","sourceRoot":"","sources":["../src/EventRibbonTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,iCAAiC,CAAC;AAGnD,MAAM,CAAC,OAAO,UAAU,mBAAmB;IACzC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC;IAC9C,OAAO,CACL,aAAG,SAAS,EAAE,IAAI,CAAC,aAAa,EAAE,IAAI,EAAC,QAAQ,gBAAa,IAAI,CAAC,SAAS,EAAE,KAAK,EAAG,EAAE,8BAA8B,EAAE,IAAI,EAAE,oDAAoD,EAAE,IAAI,CAAC,eAAe,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,aAC9O,cAAK,KAAK,EAAC,yBAAyB,YAClC,cAAK,GAAG,EAAE,IAAI,CAAC,aAAa,EAAE,GAAG,EAAE,IAAI,CAAC,YAAY,GAAG,GACnD,EACL,IAAI,CAAC,SAAS,IAAI,YAAG,KAAK,EAAC,yBAAyB,YAAE,IAAI,CAAC,SAAS,GAAK,EAC1E,eAAK,KAAK,EAAC,mCAAmC,aAC3C,IAAI,CAAC,aAAa,IAAI,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,CAAC,aAAa,GAAS,EAC9D,yBAAO,IAAI,GAAQ,IACf,IACJ,CACL,CAAC;AACJ,CAAC","sourcesContent":["import Icon from \"@ui5/webcomponents/dist/Icon.js\";\nimport type UDExEventRibbon from \"./EventRibbon.js\";\n\nexport default function EventRibbonTemplate(this: UDExEventRibbon) {\n const { text, target, url } = this._eventLink;\n return (\n <a onKeyDown={this.handleKeyDown} role=\"banner\" aria-label={this.eventText} class= {{ \"udex-event-ribbon__container\": true, \"udex-event-ribbon__container-with-background-image\": this.backgroundImage }} target={target} href={url} title={text}>\n <div class=\"udex-event-ribbon__logo\">\n <img src={this.eventLogoPath} alt={this.eventLogoAlt}/>\n </div>\n {this.eventText && <p class=\"udex-event-ribbon__text\">{this.eventText}</p>}\n <div class=\"udex-event-ribbon__link-container\">\n {this.eventLinkIcon && <Icon name={this.eventLinkIcon}></Icon>}\n <span>{text}</span>\n </div>\n </a>\n );\n}\n"]}
@@ -98,7 +98,7 @@ declare class UDExHeroBanner extends UI5Element {
98
98
  get heroBannerClasses(): string;
99
99
  get hasAdditionalContent(): boolean;
100
100
  get hasCustomBackgroundPicture(): boolean;
101
- get mediaButtonIconName(): "media-pause" | "media-play";
101
+ get mediaButtonIconName(): "media-play" | "media-pause";
102
102
  get _video(): HTMLVideoElement | null | undefined;
103
103
  _toggleMediaButton(): void;
104
104
  _calculateMediaButtonState(): void;
@@ -211,6 +211,7 @@ declare class UDExMastheadShell extends UI5Element {
211
211
  _rootHolder: HTMLElement | null | undefined;
212
212
  _shouldHandleResize: boolean;
213
213
  constructor();
214
+ onBeforeRendering(): void;
214
215
  onAfterRendering(): void;
215
216
  onEnterDOM(): void;
216
217
  onExitDOM(): void;
@@ -254,6 +255,7 @@ declare class UDExMastheadShell extends UI5Element {
254
255
  setOverflowBody(): void;
255
256
  removeOverflowBody(): void;
256
257
  setMobileMode(): void;
258
+ setMobileMenuHeight(): void;
257
259
  removeMobileMode(): void;
258
260
  /**
259
261
  * Close the search panel.
@@ -295,8 +297,9 @@ declare class UDExMastheadShell extends UI5Element {
295
297
  get hasCountrySelector(): boolean;
296
298
  get hasSupport(): boolean;
297
299
  get hasMobileMenuButtons(): boolean;
298
- get isBreakpointSizeM(): boolean;
300
+ get isAtMostBreakpointSizeM(): boolean;
299
301
  get isAtLeastBreakpointSizeM(): boolean;
302
+ get isMobileMenuMode(): boolean;
300
303
  get isMainMenuVisible(): boolean;
301
304
  get isSearchVisible(): boolean;
302
305
  get shouldHandleMobileView(): boolean;
@@ -106,6 +106,11 @@ let UDExMastheadShell = UDExMastheadShell_1 = class UDExMastheadShell extends UI
106
106
  this.siteLabelAriaLabel = "";
107
107
  this._handleResizeBound = this._handleResize.bind(this);
108
108
  }
109
+ onBeforeRendering() {
110
+ if (this.isMobileMenuMode) {
111
+ this.setMobileMenuHeight();
112
+ }
113
+ }
109
114
  onAfterRendering() {
110
115
  this._rootHolder = this.mastheadHolder;
111
116
  this._searchOpener = this.searchOpener;
@@ -127,7 +132,7 @@ let UDExMastheadShell = UDExMastheadShell_1 = class UDExMastheadShell extends UI
127
132
  if (this.shouldHandleMobileView) {
128
133
  this.handleMobileMode();
129
134
  }
130
- if (this.isBreakpointSizeM) {
135
+ if (this.isAtMostBreakpointSizeM) {
131
136
  this._isSearchOpened = false;
132
137
  }
133
138
  if (this._shouldHandleResize && this._isMobileMenuOpen) {
@@ -135,6 +140,9 @@ let UDExMastheadShell = UDExMastheadShell_1 = class UDExMastheadShell extends UI
135
140
  this.resetSelectedItems();
136
141
  return;
137
142
  }
143
+ if (this.isMobileMenuMode) {
144
+ this.setMobileMenuHeight();
145
+ }
138
146
  this._shouldHandleResize = true;
139
147
  }
140
148
  handleMobileMode() {
@@ -379,6 +387,11 @@ let UDExMastheadShell = UDExMastheadShell_1 = class UDExMastheadShell extends UI
379
387
  }
380
388
  });
381
389
  }
390
+ setMobileMenuHeight() {
391
+ const mastheadHeight = parseInt(window.getComputedStyle(this).getPropertyValue("--udex-masthead-shell-height"));
392
+ const mobileMenuHeight = `${window.innerHeight - mastheadHeight}px`;
393
+ this.style.setProperty("--udex-masthead-shell-mobile-menu-height", mobileMenuHeight);
394
+ }
382
395
  removeMobileMode() {
383
396
  this._isMobileMode = false;
384
397
  this.slottedItems.forEach((item) => {
@@ -399,7 +412,7 @@ let UDExMastheadShell = UDExMastheadShell_1 = class UDExMastheadShell extends UI
399
412
  */
400
413
  openSearch() {
401
414
  const shouldPreventOpeningSearch = this._isSearchOpened
402
- || (this.isBreakpointSizeM && !this.showSearchByDefault)
415
+ || (this.isAtMostBreakpointSizeM && !this.showSearchByDefault)
403
416
  || this._isMobileMode
404
417
  || (this.isAtLeastBreakpointSizeM && this.showSearchByDefault);
405
418
  if (shouldPreventOpeningSearch) {
@@ -417,7 +430,7 @@ let UDExMastheadShell = UDExMastheadShell_1 = class UDExMastheadShell extends UI
417
430
  * @public
418
431
  */
419
432
  openMobileMenu() {
420
- if (!this._isMobileMenuOpen && (this._isMobileMode || this.isBreakpointSizeM)) {
433
+ if (!this._isMobileMenuOpen && this.isMobileMenuMode) {
421
434
  this.mobileBtn?.handleSelectedChange();
422
435
  this.handleOpenMobileMenu();
423
436
  }
@@ -507,12 +520,15 @@ let UDExMastheadShell = UDExMastheadShell_1 = class UDExMastheadShell extends UI
507
520
  get hasMobileMenuButtons() {
508
521
  return !!this.mobileMenu.length;
509
522
  }
510
- get isBreakpointSizeM() {
523
+ get isAtMostBreakpointSizeM() {
511
524
  return BreakpointUtils.isAtMost("M");
512
525
  }
513
526
  get isAtLeastBreakpointSizeM() {
514
527
  return BreakpointUtils.isAtLeast("M");
515
528
  }
529
+ get isMobileMenuMode() {
530
+ return this._isMobileMode || this.isAtMostBreakpointSizeM;
531
+ }
516
532
  get isMainMenuVisible() {
517
533
  return !this.showSearchByDefault && !this._isSearchOpened;
518
534
  }
@@ -520,7 +536,7 @@ let UDExMastheadShell = UDExMastheadShell_1 = class UDExMastheadShell extends UI
520
536
  return this.showSearchByDefault || this._isSearchOpened;
521
537
  }
522
538
  get shouldHandleMobileView() {
523
- return !this.isBreakpointSizeM && !this.showSearchByDefault;
539
+ return !this.isAtMostBreakpointSizeM && !this.showSearchByDefault;
524
540
  }
525
541
  get mainNavigationAriaLabel() {
526
542
  return UDExMastheadShell_1.i18nBundle.getText(MAIN_LINKS);