@ui5/webcomponents 2.22.0-rc.0 → 2.22.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/AvatarBadge.d.ts +15 -1
  4. package/dist/AvatarBadge.js +40 -3
  5. package/dist/AvatarBadge.js.map +1 -1
  6. package/dist/AvatarBadgeTemplate.js +1 -1
  7. package/dist/AvatarBadgeTemplate.js.map +1 -1
  8. package/dist/Breadcrumbs.js +25 -0
  9. package/dist/Breadcrumbs.js.map +1 -1
  10. package/dist/BreadcrumbsItem.d.ts +10 -0
  11. package/dist/BreadcrumbsItem.js +18 -0
  12. package/dist/BreadcrumbsItem.js.map +1 -1
  13. package/dist/Calendar.d.ts +2 -2
  14. package/dist/ColorPaletteItem.d.ts +10 -1
  15. package/dist/ColorPaletteItem.js +7 -1
  16. package/dist/ColorPaletteItem.js.map +1 -1
  17. package/dist/ColorPaletteItemTemplate.js +1 -1
  18. package/dist/ColorPaletteItemTemplate.js.map +1 -1
  19. package/dist/ComboBox.js +6 -1
  20. package/dist/ComboBox.js.map +1 -1
  21. package/dist/DateComponentBase.d.ts +3 -3
  22. package/dist/DayPicker.js.map +1 -1
  23. package/dist/Input.d.ts +5 -2
  24. package/dist/Input.js +3 -2
  25. package/dist/Input.js.map +1 -1
  26. package/dist/MessageStrip.js +1 -0
  27. package/dist/MessageStrip.js.map +1 -1
  28. package/dist/MonthPicker.d.ts +3 -3
  29. package/dist/MonthPicker.js +1 -1
  30. package/dist/MonthPicker.js.map +1 -1
  31. package/dist/MultiComboBox.js +3 -0
  32. package/dist/MultiComboBox.js.map +1 -1
  33. package/dist/StepInput.d.ts +2 -2
  34. package/dist/StepInput.js +17 -7
  35. package/dist/StepInput.js.map +1 -1
  36. package/dist/Switch.d.ts +2 -0
  37. package/dist/Switch.js +7 -1
  38. package/dist/Switch.js.map +1 -1
  39. package/dist/SwitchTemplate.js +2 -2
  40. package/dist/SwitchTemplate.js.map +1 -1
  41. package/dist/TimePicker.d.ts +2 -2
  42. package/dist/YearPicker.js +2 -4
  43. package/dist/YearPicker.js.map +1 -1
  44. package/dist/YearRangePicker.js +2 -3
  45. package/dist/YearRangePicker.js.map +1 -1
  46. package/dist/css/themes/StepInput.css +1 -1
  47. package/dist/css/themes/Switch.css +1 -1
  48. package/dist/css/themes/sap_horizon/parameters-bundle.css +1 -1
  49. package/dist/css/themes/sap_horizon_auto/parameters-bundle.css +2 -2
  50. package/dist/css/themes/sap_horizon_dark/parameters-bundle.css +1 -1
  51. package/dist/custom-elements-internal.json +105 -10
  52. package/dist/custom-elements.json +64 -10
  53. package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
  54. package/dist/generated/assets/themes/sap_horizon_auto/parameters-bundle.css.json +1 -1
  55. package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -1
  56. package/dist/generated/themes/StepInput.css.d.ts +1 -1
  57. package/dist/generated/themes/StepInput.css.js +1 -1
  58. package/dist/generated/themes/StepInput.css.js.map +1 -1
  59. package/dist/generated/themes/Switch.css.d.ts +1 -1
  60. package/dist/generated/themes/Switch.css.js +1 -1
  61. package/dist/generated/themes/Switch.css.js.map +1 -1
  62. package/dist/generated/themes/sap_horizon/parameters-bundle.css.d.ts +1 -1
  63. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -1
  64. package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
  65. package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.d.ts +1 -1
  66. package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.js +2 -2
  67. package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.js.map +1 -1
  68. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.d.ts +1 -1
  69. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +1 -1
  70. package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
  71. package/dist/vscode.html-custom-data.json +17 -7
  72. package/dist/web-types.json +46 -16
  73. package/package.json +9 -9
  74. package/src/AvatarBadgeTemplate.tsx +3 -1
  75. package/src/ColorPaletteItemTemplate.tsx +2 -2
  76. package/src/SwitchTemplate.tsx +3 -0
  77. package/src/themes/StepInput.css +2 -1
  78. package/src/themes/Switch.css +4 -2
  79. package/src/themes/sap_horizon/Select-parameters.css +2 -0
  80. package/src/themes/sap_horizon_dark/Select-parameters.css +2 -0
@@ -1 +1 @@
1
- {"version":3,"file":"MessageStrip.js","sourceRoot":"","sources":["../src/MessageStrip.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AAEpE,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,wDAAwD,CAAC;AAC1E,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AAGrF,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,oBAAoB,MAAM,2BAA2B,CAAC;AAE7D,OAAO,EACN,sCAAsC,EACtC,mCAAmC,EACnC,mCAAmC,EACnC,mCAAmC,EACnC,iCAAiC,EACjC,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,yBAAyB,EACzB,oBAAoB,GACpB,MAAM,mCAAmC,CAAC;AAE3C,SAAS;AACT,OAAO,eAAe,MAAM,wCAAwC,CAAC;AAErE,IAAK,oBAOJ;AAPD,WAAK,oBAAoB;IACxB,oEAA4C,CAAA;IAC5C,qEAA6C,CAAA;IAC7C,qEAA6C,CAAA;IAC7C,qEAA6C,CAAA;IAC7C,yEAAiD,CAAA;IACjD,yEAAiD,CAAA;AAClD,CAAC,EAPI,oBAAoB,KAApB,oBAAoB,QAOxB;AAMD;;;;;;;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C;sCACG;AA3DzB,YAAY;IAdjB,aAAa,CAAC;QACd,GAAG,EAAE,mBAAmB;QACxB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,oBAAoB;QAC9B,MAAM,EAAE,eAAe;KACvB,CAAC;IACF;;;;OAIG;;IACF,KAAK,CAAC,OAAO,CAAC;GAET,YAAY,CA0HjB;AAED,YAAY,CAAC,MAAM,EAAE,CAAC;AAEtB,eAAe,YAAY,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { Slot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type { I18nText } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type MessageStripDesign from \"./types/MessageStripDesign.js\";\nimport MessageStripTemplate from \"./MessageStripTemplate.js\";\nimport type { IIcon } from \"./Icon.js\";\nimport {\n\tMESSAGE_STRIP_CLOSE_BUTTON_INFORMATION,\n\tMESSAGE_STRIP_CLOSE_BUTTON_POSITIVE,\n\tMESSAGE_STRIP_CLOSE_BUTTON_NEGATIVE,\n\tMESSAGE_STRIP_CLOSE_BUTTON_CRITICAL,\n\tMESSAGE_STRIP_CLOSE_BUTTON_CUSTOM,\n\tMESSAGE_STRIP_CLOSABLE,\n\tMESSAGE_STRIP_ERROR,\n\tMESSAGE_STRIP_WARNING,\n\tMESSAGE_STRIP_SUCCESS,\n\tMESSAGE_STRIP_INFORMATION,\n\tMESSAGE_STRIP_CUSTOM,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport messageStripCss from \"./generated/themes/MessageStrip.css.js\";\n\nenum DesignClassesMapping {\n\tInformation = \"ui5-message-strip-root--info\",\n\tPositive = \"ui5-message-strip-root--positive\",\n\tNegative = \"ui5-message-strip-root--negative\",\n\tCritical = \"ui5-message-strip-root--critical\",\n\tColorSet1 = \"ui5-message-strip-root--color-set-1\",\n\tColorSet2 = \"ui5-message-strip-root--color-set-2\",\n}\n\ntype DesignTypeAnnouncemnt = Record<MessageStripDesign, string>;\n\ntype DesignCloseButtonTooltip = Record<MessageStripDesign, string>;\n\n/**\n * @class\n *\n * ### Overview\n *\n * The ui5-message-strip component allows for the embedding of application-related messages.\n * It supports four semantic designs, each with its own color and icon: \"Information\", \"Positive\", \"Critical\", and \"Negative\".\n * Additionally, users can choose from two color sets (\"ColorSet1\" and \"ColorSet2\"), each containing 10 predefined color schemes.\n * Each message shows a \"Close\" button, so that it can be removed from the UI, if needed.\n\n * ### Usage\n *\n * For the `ui5-message-strip` component, you can define whether it displays\n * an icon in the beginning and a close button. Moreover, its size and background\n * can be controlled with CSS.\n *\n * ### Keyboard Handling\n *\n * #### Fast Navigation\n * This component provides a build in fast navigation group which can be used via [F6] / [Shift] + [F6] / [Ctrl] + [Alt/Option] / [Down] or [Ctrl] + [Alt/Option] + [Up].\n * In order to use this functionality, you need to import the following module:\n * `import \"@ui5/webcomponents-base/dist/features/F6Navigation.js\"`\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/MessageStrip.js\";`\n * @constructor\n * @extends UI5Element\n * @public\n * @since 0.9.0\n * @slot {Array<Node>} default\n * Defines the text of the component.\n *\n * **Note:** Although this slot accepts HTML Elements, it is strongly recommended that you only use text in order to preserve the intended design.\n */\n@customElement({\n\ttag: \"ui5-message-strip\",\n\tlanguageAware: true,\n\trenderer: jsxRenderer,\n\ttemplate: MessageStripTemplate,\n\tstyles: messageStripCss,\n})\n/**\n * Fired when the close button is pressed either with a\n * click/tap or by using the Enter or Space key.\n * @public\n */\n@event(\"close\")\n\nclass MessageStrip extends UI5Element {\n\teventDetails!: {\n\t\tclose: void;\n\t}\n\t/**\n\t * Defines the component type.\n\t * @default \"Information\"\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property()\n\tdesign: `${MessageStripDesign}` = \"Information\";\n\n\t/**\n\t * Defines the color scheme of the component.\n\t * There are 10 predefined schemes.\n\t * To use one you can set a number from `\"1\"` to `\"10\"`. The `colorScheme` `\"1\"` will be set by default.\n\t *\n\t * @default \"1\"\n\t * @public\n\t * @since 2.0.0\n\t */\n\t@property()\n\tcolorScheme = \"1\"\n\n\t/**\n\t * Defines whether the MessageStrip will show an icon in the beginning.\n\t * You can directly provide an icon with the `icon` slot. Otherwise, the default icon for the type will be used.\n\t *\n\t * * **Note:** If <code>MessageStripDesign.ColorSet1</code> or <code>MessageStripDesign.ColorSet2</code> value is set to the <code>design</code> property, default icon will not be presented.\n\t *\n\t * @default false\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property({ type: Boolean })\n\thideIcon = false\n\n\t/**\n\t * Defines whether the MessageStrip renders close button.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\thideCloseButton = false;\n\n\t/**\n\t * Defines the content to be displayed as graphical element within the component.\n\t *\n\t * **Note:** If no icon is given, the default icon for the component type will be used.\n\t * The SAP-icons font provides numerous options.\n\t *\n\t * See all the available icons in the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).\n\t * @public\n\t */\n\t@slot()\n\ticon!: Slot<IIcon>;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\t_closeClick() {\n\t\tthis.fireDecoratorEvent(\"close\");\n\t}\n\n\tstatic designAnnouncementMappings(): DesignTypeAnnouncemnt {\n\t\tconst getTranslation = (text:I18nText): string => {\n\t\t\treturn MessageStrip.i18nBundle.getText(text);\n\t\t};\n\n\t\treturn {\n\t\t\tInformation: getTranslation(MESSAGE_STRIP_INFORMATION),\n\t\t\tPositive: getTranslation(MESSAGE_STRIP_SUCCESS),\n\t\t\tNegative: getTranslation(MESSAGE_STRIP_ERROR),\n\t\t\tCritical: getTranslation(MESSAGE_STRIP_WARNING),\n\t\t\tColorSet1: getTranslation(MESSAGE_STRIP_CUSTOM),\n\t\t\tColorSet2: getTranslation(MESSAGE_STRIP_CUSTOM),\n\t\t};\n\t}\n\n\tget hiddenText() {\n\t\treturn `${MessageStrip.designAnnouncementMappings()[this.design]} ${this.hideCloseButton ? \"\" : this._closableText}`;\n\t}\n\n\tget shouldHideIcon() {\n\t\tif (this.designClasses === DesignClassesMapping.ColorSet1 || this.designClasses === DesignClassesMapping.ColorSet2) {\n\t\t\treturn this.hideIcon || this.icon.length === 0;\n\t\t}\n\n\t\treturn this.hideIcon;\n\t}\n\n\tstatic closeButtonMappings(): DesignCloseButtonTooltip {\n\t\tconst getTranslation = (text:I18nText): string => {\n\t\t\treturn MessageStrip.i18nBundle.getText(text);\n\t\t};\n\n\t\treturn {\n\t\t\tInformation: getTranslation(MESSAGE_STRIP_CLOSE_BUTTON_INFORMATION),\n\t\t\tPositive: getTranslation(MESSAGE_STRIP_CLOSE_BUTTON_POSITIVE),\n\t\t\tNegative: getTranslation(MESSAGE_STRIP_CLOSE_BUTTON_NEGATIVE),\n\t\t\tCritical: getTranslation(MESSAGE_STRIP_CLOSE_BUTTON_CRITICAL),\n\t\t\tColorSet1: getTranslation(MESSAGE_STRIP_CLOSE_BUTTON_CUSTOM),\n\t\t\tColorSet2: getTranslation(MESSAGE_STRIP_CLOSE_BUTTON_CUSTOM),\n\t\t};\n\t}\n\n\tget _closeButtonText() {\n\t\treturn MessageStrip.closeButtonMappings()[this.design];\n\t}\n\n\tget _closableText() {\n\t\treturn MessageStrip.i18nBundle.getText(MESSAGE_STRIP_CLOSABLE);\n\t}\n\n\tget iconProvided() {\n\t\treturn this.icon.length > 0;\n\t}\n\n\tget designClasses() {\n\t\treturn DesignClassesMapping[this.design];\n\t}\n}\n\nMessageStrip.define();\n\nexport default MessageStrip;\n"]}
1
+ {"version":3,"file":"MessageStrip.js","sourceRoot":"","sources":["../src/MessageStrip.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AAEpE,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,wDAAwD,CAAC;AAC1E,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AAGrF,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,oBAAoB,MAAM,2BAA2B,CAAC;AAE7D,OAAO,EACN,sCAAsC,EACtC,mCAAmC,EACnC,mCAAmC,EACnC,mCAAmC,EACnC,iCAAiC,EACjC,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,yBAAyB,EACzB,oBAAoB,GACpB,MAAM,mCAAmC,CAAC;AAE3C,SAAS;AACT,OAAO,eAAe,MAAM,wCAAwC,CAAC;AAErE,IAAK,oBAOJ;AAPD,WAAK,oBAAoB;IACxB,oEAA4C,CAAA;IAC5C,qEAA6C,CAAA;IAC7C,qEAA6C,CAAA;IAC7C,qEAA6C,CAAA;IAC7C,yEAAiD,CAAA;IACjD,yEAAiD,CAAA;AAClD,CAAC,EAPI,oBAAoB,KAApB,oBAAoB,QAOxB;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAgBH,IAAM,YAAY,oBAAlB,MAAM,YAAa,SAAQ,UAAU;IAArC;;QAIC;;;;;WAKG;QAEH,WAAM,GAA4B,aAAa,CAAC;QAEhD;;;;;;;;WAQG;QAEH,gBAAW,GAAG,GAAG,CAAA;QAEjB;;;;;;;;;WASG;QAEH,aAAQ,GAAG,KAAK,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AC;GAET,YAAY,CA0HjB;AAED,YAAY,CAAC,MAAM,EAAE,CAAC;AAEtB,eAAe,YAAY,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport type { Slot } from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot-strict.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type { I18nText } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type MessageStripDesign from \"./types/MessageStripDesign.js\";\nimport MessageStripTemplate from \"./MessageStripTemplate.js\";\nimport type { IIcon } from \"./Icon.js\";\nimport {\n\tMESSAGE_STRIP_CLOSE_BUTTON_INFORMATION,\n\tMESSAGE_STRIP_CLOSE_BUTTON_POSITIVE,\n\tMESSAGE_STRIP_CLOSE_BUTTON_NEGATIVE,\n\tMESSAGE_STRIP_CLOSE_BUTTON_CRITICAL,\n\tMESSAGE_STRIP_CLOSE_BUTTON_CUSTOM,\n\tMESSAGE_STRIP_CLOSABLE,\n\tMESSAGE_STRIP_ERROR,\n\tMESSAGE_STRIP_WARNING,\n\tMESSAGE_STRIP_SUCCESS,\n\tMESSAGE_STRIP_INFORMATION,\n\tMESSAGE_STRIP_CUSTOM,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport messageStripCss from \"./generated/themes/MessageStrip.css.js\";\n\nenum DesignClassesMapping {\n\tInformation = \"ui5-message-strip-root--info\",\n\tPositive = \"ui5-message-strip-root--positive\",\n\tNegative = \"ui5-message-strip-root--negative\",\n\tCritical = \"ui5-message-strip-root--critical\",\n\tColorSet1 = \"ui5-message-strip-root--color-set-1\",\n\tColorSet2 = \"ui5-message-strip-root--color-set-2\",\n}\n\ntype DesignTypeAnnouncemnt = Record<MessageStripDesign, string>;\n\ntype DesignCloseButtonTooltip = Record<MessageStripDesign, string>;\n\n/**\n * @class\n *\n * ### Overview\n *\n * The ui5-message-strip component allows for the embedding of application-related messages.\n * It supports four semantic designs, each with its own color and icon: \"Information\", \"Positive\", \"Critical\", and \"Negative\".\n * Additionally, users can choose from two color sets (\"ColorSet1\" and \"ColorSet2\"), each containing 10 predefined color schemes.\n * Each message shows a \"Close\" button, so that it can be removed from the UI, if needed.\n\n * ### Usage\n *\n * For the `ui5-message-strip` component, you can define whether it displays\n * an icon in the beginning and a close button. Moreover, its size and background\n * can be controlled with CSS.\n *\n * ### Keyboard Handling\n *\n * #### Fast Navigation\n * This component provides a build in fast navigation group which can be used via [F6] / [Shift] + [F6] / [Ctrl] + [Alt/Option] / [Down] or [Ctrl] + [Alt/Option] + [Up].\n * In order to use this functionality, you need to import the following module:\n * `import \"@ui5/webcomponents-base/dist/features/F6Navigation.js\"`\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/MessageStrip.js\";`\n * @constructor\n * @extends UI5Element\n * @public\n * @since 0.9.0\n * @slot {Array<Node>} default\n * Defines the text of the component.\n *\n * **Note:** Although this slot accepts HTML Elements, it is strongly recommended that you only use text in order to preserve the intended design.\n */\n@customElement({\n\ttag: \"ui5-message-strip\",\n\tfastNavigation: true,\n\tlanguageAware: true,\n\trenderer: jsxRenderer,\n\ttemplate: MessageStripTemplate,\n\tstyles: messageStripCss,\n})\n/**\n * Fired when the close button is pressed either with a\n * click/tap or by using the Enter or Space key.\n * @public\n */\n@event(\"close\")\n\nclass MessageStrip extends UI5Element {\n\teventDetails!: {\n\t\tclose: void;\n\t}\n\t/**\n\t * Defines the component type.\n\t * @default \"Information\"\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property()\n\tdesign: `${MessageStripDesign}` = \"Information\";\n\n\t/**\n\t * Defines the color scheme of the component.\n\t * There are 10 predefined schemes.\n\t * To use one you can set a number from `\"1\"` to `\"10\"`. The `colorScheme` `\"1\"` will be set by default.\n\t *\n\t * @default \"1\"\n\t * @public\n\t * @since 2.0.0\n\t */\n\t@property()\n\tcolorScheme = \"1\"\n\n\t/**\n\t * Defines whether the MessageStrip will show an icon in the beginning.\n\t * You can directly provide an icon with the `icon` slot. Otherwise, the default icon for the type will be used.\n\t *\n\t * * **Note:** If <code>MessageStripDesign.ColorSet1</code> or <code>MessageStripDesign.ColorSet2</code> value is set to the <code>design</code> property, default icon will not be presented.\n\t *\n\t * @default false\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property({ type: Boolean })\n\thideIcon = false\n\n\t/**\n\t * Defines whether the MessageStrip renders close button.\n\t * @default false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\thideCloseButton = false;\n\n\t/**\n\t * Defines the content to be displayed as graphical element within the component.\n\t *\n\t * **Note:** If no icon is given, the default icon for the component type will be used.\n\t * The SAP-icons font provides numerous options.\n\t *\n\t * See all the available icons in the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).\n\t * @public\n\t */\n\t@slot()\n\ticon!: Slot<IIcon>;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\t_closeClick() {\n\t\tthis.fireDecoratorEvent(\"close\");\n\t}\n\n\tstatic designAnnouncementMappings(): DesignTypeAnnouncemnt {\n\t\tconst getTranslation = (text:I18nText): string => {\n\t\t\treturn MessageStrip.i18nBundle.getText(text);\n\t\t};\n\n\t\treturn {\n\t\t\tInformation: getTranslation(MESSAGE_STRIP_INFORMATION),\n\t\t\tPositive: getTranslation(MESSAGE_STRIP_SUCCESS),\n\t\t\tNegative: getTranslation(MESSAGE_STRIP_ERROR),\n\t\t\tCritical: getTranslation(MESSAGE_STRIP_WARNING),\n\t\t\tColorSet1: getTranslation(MESSAGE_STRIP_CUSTOM),\n\t\t\tColorSet2: getTranslation(MESSAGE_STRIP_CUSTOM),\n\t\t};\n\t}\n\n\tget hiddenText() {\n\t\treturn `${MessageStrip.designAnnouncementMappings()[this.design]} ${this.hideCloseButton ? \"\" : this._closableText}`;\n\t}\n\n\tget shouldHideIcon() {\n\t\tif (this.designClasses === DesignClassesMapping.ColorSet1 || this.designClasses === DesignClassesMapping.ColorSet2) {\n\t\t\treturn this.hideIcon || this.icon.length === 0;\n\t\t}\n\n\t\treturn this.hideIcon;\n\t}\n\n\tstatic closeButtonMappings(): DesignCloseButtonTooltip {\n\t\tconst getTranslation = (text:I18nText): string => {\n\t\t\treturn MessageStrip.i18nBundle.getText(text);\n\t\t};\n\n\t\treturn {\n\t\t\tInformation: getTranslation(MESSAGE_STRIP_CLOSE_BUTTON_INFORMATION),\n\t\t\tPositive: getTranslation(MESSAGE_STRIP_CLOSE_BUTTON_POSITIVE),\n\t\t\tNegative: getTranslation(MESSAGE_STRIP_CLOSE_BUTTON_NEGATIVE),\n\t\t\tCritical: getTranslation(MESSAGE_STRIP_CLOSE_BUTTON_CRITICAL),\n\t\t\tColorSet1: getTranslation(MESSAGE_STRIP_CLOSE_BUTTON_CUSTOM),\n\t\t\tColorSet2: getTranslation(MESSAGE_STRIP_CLOSE_BUTTON_CUSTOM),\n\t\t};\n\t}\n\n\tget _closeButtonText() {\n\t\treturn MessageStrip.closeButtonMappings()[this.design];\n\t}\n\n\tget _closableText() {\n\t\treturn MessageStrip.i18nBundle.getText(MESSAGE_STRIP_CLOSABLE);\n\t}\n\n\tget iconProvided() {\n\t\treturn this.icon.length > 0;\n\t}\n\n\tget designClasses() {\n\t\treturn DesignClassesMapping[this.design];\n\t}\n}\n\nMessageStrip.define();\n\nexport default MessageStrip;\n"]}
@@ -10,7 +10,7 @@ type Month = {
10
10
  selected: boolean;
11
11
  ariaSelected: boolean;
12
12
  name: string;
13
- nameInSecType: string;
13
+ nameInSecType: string | undefined;
14
14
  disabled: boolean;
15
15
  ariaDisabled: boolean | undefined;
16
16
  classes: string;
@@ -70,8 +70,8 @@ declare class MonthPicker extends CalendarPart implements ICalendarPicker {
70
70
  get rowSize(): 2 | 3;
71
71
  _buildMonths(): void;
72
72
  _getDisplayedSecondaryMonthText(timestamp: number): {
73
- text: any;
74
- textInfo: any;
73
+ text: string;
74
+ textInfo: string;
75
75
  };
76
76
  /**
77
77
  * Returns true if month timestamp is inside the selection range.
@@ -104,7 +104,7 @@ let MonthPicker = MonthPicker_1 = class MonthPicker extends CalendarPart {
104
104
  selected: isSelected || isSelectedBetween,
105
105
  ariaSelected: isSelected || isSelectedBetween,
106
106
  name: monthsNames[i],
107
- nameInSecType: this.hasSecondaryCalendarType && this._getDisplayedSecondaryMonthText(timestamp).text,
107
+ nameInSecType: this.hasSecondaryCalendarType ? this._getDisplayedSecondaryMonthText(timestamp).text : undefined,
108
108
  disabled: isDisabled,
109
109
  ariaDisabled: isDisabled,
110
110
  classes: "ui5-mp-item",
@@ -1 +1 @@
1
- {"version":3,"file":"MonthPicker.js","sourceRoot":"","sources":["../src/MonthPicker.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,2BAA2B,MAAM,qEAAqE,CAAC;AAC9G,OAAO,+BAA+B,MAAM,+EAA+E,CAAC;AAC5H,OAAO,4BAA4B,MAAM,4EAA4E,CAAC;AACtH,OAAO,YAAY,MAAM,4DAA4D,CAAC;AACtF,OAAO,YAAY,MAAM,oDAAoD,CAAC;AAC9E,OAAO,EACN,OAAO,EACP,OAAO,EACP,MAAM,EACN,IAAI,EACJ,MAAM,EACN,OAAO,EACP,MAAM,EACN,KAAK,EACL,UAAU,EACV,SAAS,EACT,QAAQ,EACR,UAA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,CAAC,CAAC;IAC7H,CAAC;CACD,CAAA;AAjVA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;kDACX;AAclC;IADC,QAAQ,EAAE;kDAC0C;AAGrD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;oDACT;AAGpC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;4CAC/B;AAQhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qDACD;AAGnB;IADN,IAAI,CAAC,oBAAoB,CAAC;qCACG;AA1CzB,WAAW;IAlBhB,aAAa,CAAC;QACd,GAAG,EAAE,iBAAiB;QACtB,QAAQ,EAAE,mBAAmB;QAC7B,MAAM,EAAE,iBAAiB;KACzB,CAAC;IACF;;OAEG;;IACF,KAAK,CAAC,QAAQ,EAAE;QAChB,OAAO,EAAE,IAAI;KACb,CAAC;IACF;;;OAGG;;IACF,KAAK,CAAC,UAAU,EAAE;QAClB,OAAO,EAAE,IAAI;KACb,CAAC;GACI,WAAW,CA4VhB;AAED,WAAW,CAAC,MAAM,EAAE,CAAC;AAErB,eAAe,WAAW,CAAC","sourcesContent":["import 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\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport getCachedLocaleDataInstance from \"@ui5/webcomponents-localization/dist/getCachedLocaleDataInstance.js\";\nimport convertMonthNumbersToMonthNames from \"@ui5/webcomponents-localization/dist/dates/convertMonthNumbersToMonthNames.js\";\nimport transformDateToSecondaryType from \"@ui5/webcomponents-localization/dist/dates/transformDateToSecondaryType.js\";\nimport CalendarDate from \"@ui5/webcomponents-localization/dist/dates/CalendarDate.js\";\nimport CalendarType from \"@ui5/webcomponents-base/dist/types/CalendarType.js\";\nimport {\n\tisEnter,\n\tisSpace,\n\tisDown,\n\tisUp,\n\tisLeft,\n\tisRight,\n\tisHome,\n\tisEnd,\n\tisHomeCtrl,\n\tisEndCtrl,\n\tisPageUp,\n\tisPageDown,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport getLocale from \"@ui5/webcomponents-base/dist/locale/getLocale.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport {\n\tMONTH_PICKER_DESCRIPTION,\n} from \"./generated/i18n/i18n-defaults.js\";\nimport CalendarPart from \"./CalendarPart.js\";\nimport type { ICalendarPicker } from \"./Calendar.js\";\n\n// Template\nimport MonthPickerTemplate from \"./MonthPickerTemplate.js\";\n\n// Styles\nimport monthPickerStyles from \"./generated/themes/MonthPicker.css.js\";\nimport CalendarSelectionMode from \"./types/CalendarSelectionMode.js\";\n\nconst isBetween = (x: number, num1: number, num2: number) => x > Math.min(num1, num2) && x < Math.max(num1, num2);\nconst PAGE_SIZE = 12; // total months on a single page\n\ntype Month = {\n\ttimestamp: string,\n\tfocusRef: boolean,\n\t_tabIndex: number,\n\tselected: boolean,\n\tariaSelected: boolean,\n\tname: string,\n\tnameInSecType: string,\n\tdisabled: boolean,\n\tariaDisabled: boolean | undefined,\n\tclasses: string,\n\tparts: string,\n}\n\ntype MonthInterval = Array<Array<Month>>;\n\ntype MonthPickerChangeEventDetail = {\n\tdates: Array<number>,\n\ttimestamp: number,\n}\n\ntype MonthPickerNavigateEventDetail = {\n\ttimestamp: number,\n}\n\n/**\n * Month picker component.\n * @class\n *\n * Displays months which can be selected.\n * @constructor\n * @extends CalendarPart\n * @private\n */\n@customElement({\n\ttag: \"ui5-monthpicker\",\n\ttemplate: MonthPickerTemplate,\n\tstyles: monthPickerStyles,\n})\n/**\n * Fired when the user selects a month via \"Space\", \"Enter\" or click.\n */\n@event(\"change\", {\n\tbubbles: true,\n})\n/**\n * Fired when the timestamp changes - the user navigates with the keyboard or clicks with the mouse.\n * @since 1.0.0-rc.9\n */\n@event(\"navigate\", {\n\tbubbles: true,\n})\nclass MonthPicker extends CalendarPart implements ICalendarPicker {\n\teventDetails!: CalendarPart[\"eventDetails\"] & {\n\t\tchange: MonthPickerChangeEventDetail,\n\t\tnavigate: MonthPickerNavigateEventDetail,\n\t}\n\t/**\n\t * An array of UTC timestamps representing the selected date\n\t * or dates depending on the capabilities of the picker component.\n\t * @default []\n\t */\n\t@property({ type: Array, noAttribute: true })\n\tselectedDates: Array<number> = [];\n\n\t/**\n\t * Defines the type of selection used in the month picker component.\n\t * Accepted property values are:\n\t *\n\t * - `CalendarSelectionMode.Single` - enables election of a single month.\n\t * - `CalendarSelectionMode.Range` - enables selection of a month range.\n\t *\n\t * Note that 'CalendarSelectionMode.Multiple` is not supported for Month Picker!\n\t * @default \"Single\"\n\t * @since 2.2.0\n\t */\n\t@property()\n\tselectionMode: `${CalendarSelectionMode}` = \"Single\";\n\n\t@property({ type: Array, noAttribute: true })\n\t_monthsInterval: MonthInterval = [];\n\n\t@property({ type: Boolean, noAttribute: true })\n\t_hidden = false;\n\n\t/**\n\t * When selectionMode=\"Range\" and the first month in the range is selected, this is the currently hovered or focused month.\n\t *\n\t * @private\n\t */\n\t@property({ type: Number })\n\t_secondTimestamp?: number;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tget roleDescription() {\n\t\treturn MonthPicker.i18nBundle.getText(MONTH_PICKER_DESCRIPTION);\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._buildMonths();\n\t}\n\n\tget rowSize() {\n\t\treturn (this.secondaryCalendarType === CalendarType.Islamic && this.primaryCalendarType !== CalendarType.Islamic)\n\t\t\t|| (this.secondaryCalendarType === CalendarType.Persian && this.primaryCalendarType !== CalendarType.Persian) ? 2 : 3;\n\t}\n\n\t_buildMonths() {\n\t\tif (this._hidden) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst localeData = getCachedLocaleDataInstance(getLocale());\n\t\tconst monthsNames = localeData.getMonthsStandAlone(\"wide\", this._primaryCalendarType);\n\n\t\tconst months: MonthInterval = [];\n\t\tconst calendarDate = this._calendarDate; // store the value of the expensive getter\n\t\tconst minDate = this._minDate; // store the value of the expensive getter\n\t\tconst maxDate = this._maxDate; // store the value of the expensive getter\n\t\tlet timestamp;\n\n\t\t/* eslint-disable no-loop-func */\n\t\tfor (let i = 0; i < 12; i++) {\n\t\t\tconst tempDate = new CalendarDate(calendarDate, this._primaryCalendarType);\n\t\t\ttempDate.setMonth(i);\n\n\t\t\t// If the current date of the current month is larger than this month, set the date to the last day of the previous month.\n\t\t\t// This is needed because the date object will automatically switch to the next month if larger date is set.\n\t\t\tif (tempDate.getMonth() !== i) {\n\t\t\t\ttempDate.setMonth(tempDate.getMonth() - 1);\n\t\t\t\ttempDate.setDate(this._calendarDate.getDate() - tempDate.getDate());\n\t\t\t}\n\n\t\t\ttimestamp = tempDate.valueOf() / 1000;\n\n\t\t\tconst isSelected = this.selectedDates.some(itemTimestamp => {\n\t\t\t\tconst date = CalendarDate.fromTimestamp(itemTimestamp * 1000, this._primaryCalendarType);\n\t\t\t\treturn date.getYear() === tempDate.getYear() && date.getMonth() === tempDate.getMonth();\n\t\t\t});\n\t\t\tconst isFocused = tempDate.getMonth() === calendarDate.getMonth();\n\t\t\tconst isDisabled = this._isOutOfSelectableRange(tempDate, minDate, maxDate);\n\t\t\tconst isSelectedBetween = this._isMonthInsideSelectionRange(timestamp);\n\n\t\t\tconst month: Month = {\n\t\t\t\ttimestamp: timestamp.toString(),\n\t\t\t\tfocusRef: isFocused,\n\t\t\t\t_tabIndex: isFocused ? 0 : -1,\n\t\t\t\tselected: isSelected || isSelectedBetween,\n\t\t\t\tariaSelected: isSelected || isSelectedBetween,\n\t\t\t\tname: monthsNames[i],\n\t\t\t\tnameInSecType: this.hasSecondaryCalendarType && this._getDisplayedSecondaryMonthText(timestamp).text,\n\t\t\t\tdisabled: isDisabled,\n\t\t\t\tariaDisabled: isDisabled,\n\t\t\t\tclasses: \"ui5-mp-item\",\n\t\t\t\tparts: \"month-cell\",\n\t\t\t};\n\n\t\t\tif (isSelected) {\n\t\t\t\tmonth.classes += \" ui5-mp-item--selected\";\n\t\t\t\tmonth.parts += \" month-cell-selected\";\n\t\t\t}\n\n\t\t\tif (isSelectedBetween) {\n\t\t\t\tmonth.classes += \" ui5-mp-item--selected-between\";\n\t\t\t\tmonth.parts += \" month-cell-selected-between\";\n\t\t\t}\n\n\t\t\tif (isDisabled) {\n\t\t\t\tmonth.classes += \" ui5-mp-item--disabled\";\n\t\t\t}\n\n\t\t\tconst quarterIndex = Math.floor(i / this.rowSize);\n\n\t\t\tif (months[quarterIndex]) {\n\t\t\t\tmonths[quarterIndex].push(month);\n\t\t\t} else {\n\t\t\t\tmonths[quarterIndex] = [month];\n\t\t\t}\n\t\t}\n\n\t\tthis._monthsInterval = months;\n\t}\n\n\t_getDisplayedSecondaryMonthText(timestamp: number) {\n\t\tconst monthsName = transformDateToSecondaryType(this._primaryCalendarType, this.secondaryCalendarType, timestamp);\n\t\treturn convertMonthNumbersToMonthNames(monthsName.firstDate.getMonth(), monthsName.lastDate.getMonth(), this.secondaryCalendarType);\n\t}\n\n\t/**\n\t * Returns true if month timestamp is inside the selection range.\n\t * @private\n\t */\n\t_isMonthInsideSelectionRange(timestamp: number): boolean {\n\t\tif (this.selectionMode !== CalendarSelectionMode.Range || !this.selectedDates.length) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Only one date selected - second is hovered or focused\n\t\tif (this.selectedDates.length === 1 && this._secondTimestamp) {\n\t\t\treturn isBetween(timestamp, this.selectedDates[0], this._secondTimestamp);\n\t\t}\n\n\t\treturn isBetween(timestamp, this.selectedDates[0], this.selectedDates[1]);\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tlet preventDefault = true;\n\n\t\tif (isEnter(e)) {\n\t\t\tthis._selectMonth(e);\n\t\t} else if (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t} else if (isLeft(e)) {\n\t\t\tthis._modifyTimestampBy(-1);\n\t\t} else if (isRight(e)) {\n\t\t\tthis._modifyTimestampBy(1);\n\t\t} else if (isUp(e)) {\n\t\t\tthis._modifyTimestampBy(-this.rowSize);\n\t\t} else if (isDown(e)) {\n\t\t\tthis._modifyTimestampBy(this.rowSize);\n\t\t} else if (isPageUp(e)) {\n\t\t\tthis._modifyTimestampBy(-PAGE_SIZE);\n\t\t} else if (isPageDown(e)) {\n\t\t\tthis._modifyTimestampBy(PAGE_SIZE);\n\t\t} else if (isHome(e) || isEnd(e)) {\n\t\t\tthis._onHomeOrEnd(isHome(e));\n\t\t} else if (isHomeCtrl(e)) {\n\t\t\tthis._setTimestamp(parseInt(this._monthsInterval[0][0].timestamp)); // first month of first row\n\t\t} else if (isEndCtrl(e)) {\n\t\t\tthis._setTimestamp(parseInt(this._monthsInterval[PAGE_SIZE / this.rowSize - 1][this.rowSize - 1].timestamp)); // last month of last row\n\t\t} else {\n\t\t\tpreventDefault = false;\n\t\t}\n\n\t\tif (preventDefault) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_onHomeOrEnd(homePressed: boolean) {\n\t\tthis._monthsInterval.forEach(row => {\n\t\t\tconst indexInRow = row.findIndex(item => CalendarDate.fromTimestamp(parseInt(item.timestamp) * 1000).getMonth() === this._calendarDate.getMonth());\n\t\t\tif (indexInRow !== -1) { // The current month is on this row\n\t\t\t\tconst index = homePressed ? 0 : this.rowSize - 1; // select the first (if Home) or last (if End) month on the row\n\t\t\t\tthis._setTimestamp(parseInt(row[index].timestamp));\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Sets the timestamp to an absolute value.\n\t * @param value\n\t * @private\n\t */\n\t_setTimestamp(value: number) {\n\t\tthis._safelySetTimestamp(value);\n\t\tthis.fireDecoratorEvent(\"navigate\", { timestamp: this.timestamp! });\n\t}\n\n\t/**\n\t * In range selection, the currently focused or hovered month is considered the \"second day\".\n\t * @private\n\t */\n\t_updateSecondTimestamp() {\n\t\tif (this.selectionMode === CalendarSelectionMode.Range && (this.selectedDates.length === 1 || this.selectedDates.length === 2)) {\n\t\t\tthis._secondTimestamp = this.timestamp;\n\t\t}\n\t}\n\n\t/**\n\t * Set the hovered day as the \"_secondTimestamp\".\n\t *\n\t * @param e\n\t * @private\n\t */\n\t_onmouseover(e: MouseEvent) {\n\t\tconst target = e.target as HTMLElement;\n\t\tconst hoveredItem = target.closest(\".ui5-mp-item\") as HTMLElement;\n\t\tif (hoveredItem && this.selectionMode === CalendarSelectionMode.Range && this.selectedDates.length === 1) {\n\t\t\tthis._secondTimestamp = this._getTimestampFromDom(hoveredItem);\n\t\t}\n\t}\n\n\t/**\n\t * Sets the focus reference to the month that was clicked with mousedown.\n\t * @param e\n\t * @private\n\t */\n\t_onmousedown(e: MouseEvent) {\n\t\tconst target = e.target as HTMLElement;\n\t\tconst clickedItem = target.closest(\".ui5-mp-item\") as HTMLElement;\n\n\t\tif (clickedItem) {\n\t\t\tconst timestamp = this._getTimestampFromDom(clickedItem);\n\t\t\tthis._setTimestamp(timestamp);\n\t\t}\n\t}\n\n\t/**\n\t * Modifies timestamp by a given amount of months and,\n\t * if necessary, loads the prev/next page.\n\t * @param amount\n\t * @param preserveDate whether to preserve the day of the month (f.e. 15th of March + 1 month = 15th of April)\n\t * @private\n\t */\n\t_modifyTimestampBy(amount: number, preserveDate?: boolean) {\n\t\t// Modify the current timestamp\n\t\tthis._safelyModifyTimestampBy(amount, \"month\", preserveDate);\n\t\tthis._updateSecondTimestamp();\n\n\t\t// Notify the calendar to update its timestamp\n\t\tthis.fireDecoratorEvent(\"navigate\", { timestamp: this.timestamp! });\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\tthis._selectMonth(e);\n\t\t}\n\t}\n\n\t/**\n\t * Selects a month, when user made selection with mouse or using Space/Enter.\n\t * @param e\n\t * @private\n\t */\n\t_selectMonth(e: Event) {\n\t\te.preventDefault();\n\t\tconst target = e.target as HTMLElement;\n\n\t\tif (!target.classList.contains(\"ui5-mp-item\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst timestamp = this._getTimestampFromDom(target);\n\t\tthis._safelySetTimestamp(timestamp);\n\t\tthis._updateSecondTimestamp();\n\t\tthis._updateSelectedDates(timestamp);\n\n\t\tthis.fireDecoratorEvent(\"change\", {\n\t\t\ttimestamp: this.timestamp!,\n\t\t\tdates: this.selectedDates,\n\t\t});\n\t}\n\n\t_updateSelectedDates(timestamp: number) {\n\t\tif (this.selectionMode === CalendarSelectionMode.Range && this.selectedDates.length === 1) {\n\t\t\tthis.selectedDates = [this.selectedDates[0], timestamp];\n\t\t\treturn;\n\t\t}\n\n\t\tthis.selectedDates = [timestamp];\n\t}\n\n\t/**\n\t * Called by the Calendar component.\n\t * @protected\n\t */\n\t_hasPreviousPage(): boolean {\n\t\treturn this._calendarDate.getYear() !== this._minDate.getYear();\n\t}\n\n\t/**\n\t * Called by the Calendar component.\n\t * @protected\n\t */\n\t_hasNextPage(): boolean {\n\t\treturn this._calendarDate.getYear() !== this._maxDate.getYear();\n\t}\n\n\t/**\n\t * Called by Calendar.js.\n\t *\n\t * **Note:** when the user presses the \"<\" button in the calendar header (same as \"PageUp\")\n\t * @protected\n\t */\n\t_showPreviousPage() {\n\t\tthis._modifyTimestampBy(-PAGE_SIZE, true);\n\t}\n\n\t/**\n\t * Called by Calendar.js\n\t * **Note:** when the user presses the \">\" button in the calendar header (same as \"PageDown\")\n\t * @protected\n\t */\n\t_showNextPage() {\n\t\tthis._modifyTimestampBy(PAGE_SIZE, true);\n\t}\n\n\t_isOutOfSelectableRange(date: CalendarDate, minDate: CalendarDate, maxDate: CalendarDate): boolean {\n\t\tconst month = date.getMonth();\n\t\tconst year = date.getYear();\n\t\tconst minYear = minDate.getYear();\n\t\tconst minMonth = minDate.getMonth();\n\t\tconst maxYear = maxDate.getYear();\n\t\tconst maxMonth = maxDate.getMonth();\n\n\t\treturn year < minYear || (year === minYear && month < minMonth) || year > maxYear || (year === maxYear && month > maxMonth);\n\t}\n}\n\nMonthPicker.define();\n\nexport default MonthPicker;\nexport type {\n\tMonthPickerNavigateEventDetail,\n\tMonthPickerChangeEventDetail,\n};\n"]}
1
+ {"version":3,"file":"MonthPicker.js","sourceRoot":"","sources":["../src/MonthPicker.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,2BAA2B,MAAM,qEAAqE,CAAC;AAC9G,OAAO,+BAA+B,MAAM,+EAA+E,CAAC;AAC5H,OAAO,4BAA4B,MAAM,4EAA4E,CAAC;AACtH,OAAO,YAAY,MAAM,4DAA4D,CAAC;AACtF,OAAO,YAAY,MAAM,oDAAoD,CAAC;AAC9E,OAAO,EACN,OAAO,EACP,OAAO,EACP,MAAM,EACN,IAAI,EACJ,MAAM,EACN,OAAO,EACP,MAAM,EACN,KAAK,EACL,UAAU,EACV,SAAS,EACT,QAAQ,EACR,UAAU,GACV,MAAM,sCAAsC,CAAC;AAC9C,OAAO,SAAS,MAAM,kDAAkD,CAAC;AAEzE,OAAO,EACN,wBAAwB,GACxB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAG7C,WAAW;AACX,OAAO,mBAAmB,MAAM,0BAA0B,CAAC;AAE3D,SAAS;AACT,OAAO,iBAAiB,MAAM,uCAAuC,CAAC;AACtE,OAAO,qBAAqB,MAAM,kCAAkC,CAAC;AAErE,MAAM,SAAS,GAAG,CAAC,CAAS,EAAE,IAAY,EAAE,IAAY,EAAE,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CA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GnB;IADN,IAAI,CAAC,oBAAoB,CAAC;qCACG;AA1CzB,WAAW;IAlBhB,aAAa,CAAC;QACd,GAAG,EAAE,iBAAiB;QACtB,QAAQ,EAAE,mBAAmB;QAC7B,MAAM,EAAE,iBAAiB;KACzB,CAAC;IACF;;OAEG;;IACF,KAAK,CAAC,QAAQ,EAAE;QAChB,OAAO,EAAE,IAAI;KACb,CAAC;IACF;;;OAGG;;IACF,KAAK,CAAC,UAAU,EAAE;QAClB,OAAO,EAAE,IAAI;KACb,CAAC;GACI,WAAW,CA4VhB;AAED,WAAW,CAAC,MAAM,EAAE,CAAC;AAErB,eAAe,WAAW,CAAC","sourcesContent":["import 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\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport getCachedLocaleDataInstance from \"@ui5/webcomponents-localization/dist/getCachedLocaleDataInstance.js\";\nimport convertMonthNumbersToMonthNames from \"@ui5/webcomponents-localization/dist/dates/convertMonthNumbersToMonthNames.js\";\nimport transformDateToSecondaryType from \"@ui5/webcomponents-localization/dist/dates/transformDateToSecondaryType.js\";\nimport CalendarDate from \"@ui5/webcomponents-localization/dist/dates/CalendarDate.js\";\nimport CalendarType from \"@ui5/webcomponents-base/dist/types/CalendarType.js\";\nimport {\n\tisEnter,\n\tisSpace,\n\tisDown,\n\tisUp,\n\tisLeft,\n\tisRight,\n\tisHome,\n\tisEnd,\n\tisHomeCtrl,\n\tisEndCtrl,\n\tisPageUp,\n\tisPageDown,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport getLocale from \"@ui5/webcomponents-base/dist/locale/getLocale.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport {\n\tMONTH_PICKER_DESCRIPTION,\n} from \"./generated/i18n/i18n-defaults.js\";\nimport CalendarPart from \"./CalendarPart.js\";\nimport type { ICalendarPicker } from \"./Calendar.js\";\n\n// Template\nimport MonthPickerTemplate from \"./MonthPickerTemplate.js\";\n\n// Styles\nimport monthPickerStyles from \"./generated/themes/MonthPicker.css.js\";\nimport CalendarSelectionMode from \"./types/CalendarSelectionMode.js\";\n\nconst isBetween = (x: number, num1: number, num2: number) => x > Math.min(num1, num2) && x < Math.max(num1, num2);\nconst PAGE_SIZE = 12; // total months on a single page\n\ntype Month = {\n\ttimestamp: string,\n\tfocusRef: boolean,\n\t_tabIndex: number,\n\tselected: boolean,\n\tariaSelected: boolean,\n\tname: string,\n\tnameInSecType: string | undefined,\n\tdisabled: boolean,\n\tariaDisabled: boolean | undefined,\n\tclasses: string,\n\tparts: string,\n}\n\ntype MonthInterval = Array<Array<Month>>;\n\ntype MonthPickerChangeEventDetail = {\n\tdates: Array<number>,\n\ttimestamp: number,\n}\n\ntype MonthPickerNavigateEventDetail = {\n\ttimestamp: number,\n}\n\n/**\n * Month picker component.\n * @class\n *\n * Displays months which can be selected.\n * @constructor\n * @extends CalendarPart\n * @private\n */\n@customElement({\n\ttag: \"ui5-monthpicker\",\n\ttemplate: MonthPickerTemplate,\n\tstyles: monthPickerStyles,\n})\n/**\n * Fired when the user selects a month via \"Space\", \"Enter\" or click.\n */\n@event(\"change\", {\n\tbubbles: true,\n})\n/**\n * Fired when the timestamp changes - the user navigates with the keyboard or clicks with the mouse.\n * @since 1.0.0-rc.9\n */\n@event(\"navigate\", {\n\tbubbles: true,\n})\nclass MonthPicker extends CalendarPart implements ICalendarPicker {\n\teventDetails!: CalendarPart[\"eventDetails\"] & {\n\t\tchange: MonthPickerChangeEventDetail,\n\t\tnavigate: MonthPickerNavigateEventDetail,\n\t}\n\t/**\n\t * An array of UTC timestamps representing the selected date\n\t * or dates depending on the capabilities of the picker component.\n\t * @default []\n\t */\n\t@property({ type: Array, noAttribute: true })\n\tselectedDates: Array<number> = [];\n\n\t/**\n\t * Defines the type of selection used in the month picker component.\n\t * Accepted property values are:\n\t *\n\t * - `CalendarSelectionMode.Single` - enables election of a single month.\n\t * - `CalendarSelectionMode.Range` - enables selection of a month range.\n\t *\n\t * Note that 'CalendarSelectionMode.Multiple` is not supported for Month Picker!\n\t * @default \"Single\"\n\t * @since 2.2.0\n\t */\n\t@property()\n\tselectionMode: `${CalendarSelectionMode}` = \"Single\";\n\n\t@property({ type: Array, noAttribute: true })\n\t_monthsInterval: MonthInterval = [];\n\n\t@property({ type: Boolean, noAttribute: true })\n\t_hidden = false;\n\n\t/**\n\t * When selectionMode=\"Range\" and the first month in the range is selected, this is the currently hovered or focused month.\n\t *\n\t * @private\n\t */\n\t@property({ type: Number })\n\t_secondTimestamp?: number;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tget roleDescription() {\n\t\treturn MonthPicker.i18nBundle.getText(MONTH_PICKER_DESCRIPTION);\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._buildMonths();\n\t}\n\n\tget rowSize() {\n\t\treturn (this.secondaryCalendarType === CalendarType.Islamic && this.primaryCalendarType !== CalendarType.Islamic)\n\t\t\t|| (this.secondaryCalendarType === CalendarType.Persian && this.primaryCalendarType !== CalendarType.Persian) ? 2 : 3;\n\t}\n\n\t_buildMonths() {\n\t\tif (this._hidden) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst localeData = getCachedLocaleDataInstance(getLocale());\n\t\tconst monthsNames = localeData.getMonthsStandAlone(\"wide\", this._primaryCalendarType);\n\n\t\tconst months: MonthInterval = [];\n\t\tconst calendarDate = this._calendarDate; // store the value of the expensive getter\n\t\tconst minDate = this._minDate; // store the value of the expensive getter\n\t\tconst maxDate = this._maxDate; // store the value of the expensive getter\n\t\tlet timestamp;\n\n\t\t/* eslint-disable no-loop-func */\n\t\tfor (let i = 0; i < 12; i++) {\n\t\t\tconst tempDate = new CalendarDate(calendarDate, this._primaryCalendarType);\n\t\t\ttempDate.setMonth(i);\n\n\t\t\t// If the current date of the current month is larger than this month, set the date to the last day of the previous month.\n\t\t\t// This is needed because the date object will automatically switch to the next month if larger date is set.\n\t\t\tif (tempDate.getMonth() !== i) {\n\t\t\t\ttempDate.setMonth(tempDate.getMonth() - 1);\n\t\t\t\ttempDate.setDate(this._calendarDate.getDate() - tempDate.getDate());\n\t\t\t}\n\n\t\t\ttimestamp = tempDate.valueOf() / 1000;\n\n\t\t\tconst isSelected = this.selectedDates.some(itemTimestamp => {\n\t\t\t\tconst date = CalendarDate.fromTimestamp(itemTimestamp * 1000, this._primaryCalendarType);\n\t\t\t\treturn date.getYear() === tempDate.getYear() && date.getMonth() === tempDate.getMonth();\n\t\t\t});\n\t\t\tconst isFocused = tempDate.getMonth() === calendarDate.getMonth();\n\t\t\tconst isDisabled = this._isOutOfSelectableRange(tempDate, minDate, maxDate);\n\t\t\tconst isSelectedBetween = this._isMonthInsideSelectionRange(timestamp);\n\n\t\t\tconst month: Month = {\n\t\t\t\ttimestamp: timestamp.toString(),\n\t\t\t\tfocusRef: isFocused,\n\t\t\t\t_tabIndex: isFocused ? 0 : -1,\n\t\t\t\tselected: isSelected || isSelectedBetween,\n\t\t\t\tariaSelected: isSelected || isSelectedBetween,\n\t\t\t\tname: monthsNames[i],\n\t\t\t\tnameInSecType: this.hasSecondaryCalendarType ? this._getDisplayedSecondaryMonthText(timestamp).text : undefined,\n\t\t\t\tdisabled: isDisabled,\n\t\t\t\tariaDisabled: isDisabled,\n\t\t\t\tclasses: \"ui5-mp-item\",\n\t\t\t\tparts: \"month-cell\",\n\t\t\t};\n\n\t\t\tif (isSelected) {\n\t\t\t\tmonth.classes += \" ui5-mp-item--selected\";\n\t\t\t\tmonth.parts += \" month-cell-selected\";\n\t\t\t}\n\n\t\t\tif (isSelectedBetween) {\n\t\t\t\tmonth.classes += \" ui5-mp-item--selected-between\";\n\t\t\t\tmonth.parts += \" month-cell-selected-between\";\n\t\t\t}\n\n\t\t\tif (isDisabled) {\n\t\t\t\tmonth.classes += \" ui5-mp-item--disabled\";\n\t\t\t}\n\n\t\t\tconst quarterIndex = Math.floor(i / this.rowSize);\n\n\t\t\tif (months[quarterIndex]) {\n\t\t\t\tmonths[quarterIndex].push(month);\n\t\t\t} else {\n\t\t\t\tmonths[quarterIndex] = [month];\n\t\t\t}\n\t\t}\n\n\t\tthis._monthsInterval = months;\n\t}\n\n\t_getDisplayedSecondaryMonthText(timestamp: number) {\n\t\tconst monthsName = transformDateToSecondaryType(this._primaryCalendarType, this.secondaryCalendarType, timestamp);\n\t\treturn convertMonthNumbersToMonthNames(monthsName.firstDate.getMonth(), monthsName.lastDate.getMonth(), this.secondaryCalendarType);\n\t}\n\n\t/**\n\t * Returns true if month timestamp is inside the selection range.\n\t * @private\n\t */\n\t_isMonthInsideSelectionRange(timestamp: number): boolean {\n\t\tif (this.selectionMode !== CalendarSelectionMode.Range || !this.selectedDates.length) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Only one date selected - second is hovered or focused\n\t\tif (this.selectedDates.length === 1 && this._secondTimestamp) {\n\t\t\treturn isBetween(timestamp, this.selectedDates[0], this._secondTimestamp);\n\t\t}\n\n\t\treturn isBetween(timestamp, this.selectedDates[0], this.selectedDates[1]);\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tlet preventDefault = true;\n\n\t\tif (isEnter(e)) {\n\t\t\tthis._selectMonth(e);\n\t\t} else if (isSpace(e)) {\n\t\t\te.preventDefault();\n\t\t} else if (isLeft(e)) {\n\t\t\tthis._modifyTimestampBy(-1);\n\t\t} else if (isRight(e)) {\n\t\t\tthis._modifyTimestampBy(1);\n\t\t} else if (isUp(e)) {\n\t\t\tthis._modifyTimestampBy(-this.rowSize);\n\t\t} else if (isDown(e)) {\n\t\t\tthis._modifyTimestampBy(this.rowSize);\n\t\t} else if (isPageUp(e)) {\n\t\t\tthis._modifyTimestampBy(-PAGE_SIZE);\n\t\t} else if (isPageDown(e)) {\n\t\t\tthis._modifyTimestampBy(PAGE_SIZE);\n\t\t} else if (isHome(e) || isEnd(e)) {\n\t\t\tthis._onHomeOrEnd(isHome(e));\n\t\t} else if (isHomeCtrl(e)) {\n\t\t\tthis._setTimestamp(parseInt(this._monthsInterval[0][0].timestamp)); // first month of first row\n\t\t} else if (isEndCtrl(e)) {\n\t\t\tthis._setTimestamp(parseInt(this._monthsInterval[PAGE_SIZE / this.rowSize - 1][this.rowSize - 1].timestamp)); // last month of last row\n\t\t} else {\n\t\t\tpreventDefault = false;\n\t\t}\n\n\t\tif (preventDefault) {\n\t\t\te.preventDefault();\n\t\t}\n\t}\n\n\t_onHomeOrEnd(homePressed: boolean) {\n\t\tthis._monthsInterval.forEach(row => {\n\t\t\tconst indexInRow = row.findIndex(item => CalendarDate.fromTimestamp(parseInt(item.timestamp) * 1000).getMonth() === this._calendarDate.getMonth());\n\t\t\tif (indexInRow !== -1) { // The current month is on this row\n\t\t\t\tconst index = homePressed ? 0 : this.rowSize - 1; // select the first (if Home) or last (if End) month on the row\n\t\t\t\tthis._setTimestamp(parseInt(row[index].timestamp));\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Sets the timestamp to an absolute value.\n\t * @param value\n\t * @private\n\t */\n\t_setTimestamp(value: number) {\n\t\tthis._safelySetTimestamp(value);\n\t\tthis.fireDecoratorEvent(\"navigate\", { timestamp: this.timestamp! });\n\t}\n\n\t/**\n\t * In range selection, the currently focused or hovered month is considered the \"second day\".\n\t * @private\n\t */\n\t_updateSecondTimestamp() {\n\t\tif (this.selectionMode === CalendarSelectionMode.Range && (this.selectedDates.length === 1 || this.selectedDates.length === 2)) {\n\t\t\tthis._secondTimestamp = this.timestamp;\n\t\t}\n\t}\n\n\t/**\n\t * Set the hovered day as the \"_secondTimestamp\".\n\t *\n\t * @param e\n\t * @private\n\t */\n\t_onmouseover(e: MouseEvent) {\n\t\tconst target = e.target as HTMLElement;\n\t\tconst hoveredItem = target.closest(\".ui5-mp-item\") as HTMLElement;\n\t\tif (hoveredItem && this.selectionMode === CalendarSelectionMode.Range && this.selectedDates.length === 1) {\n\t\t\tthis._secondTimestamp = this._getTimestampFromDom(hoveredItem);\n\t\t}\n\t}\n\n\t/**\n\t * Sets the focus reference to the month that was clicked with mousedown.\n\t * @param e\n\t * @private\n\t */\n\t_onmousedown(e: MouseEvent) {\n\t\tconst target = e.target as HTMLElement;\n\t\tconst clickedItem = target.closest(\".ui5-mp-item\") as HTMLElement;\n\n\t\tif (clickedItem) {\n\t\t\tconst timestamp = this._getTimestampFromDom(clickedItem);\n\t\t\tthis._setTimestamp(timestamp);\n\t\t}\n\t}\n\n\t/**\n\t * Modifies timestamp by a given amount of months and,\n\t * if necessary, loads the prev/next page.\n\t * @param amount\n\t * @param preserveDate whether to preserve the day of the month (f.e. 15th of March + 1 month = 15th of April)\n\t * @private\n\t */\n\t_modifyTimestampBy(amount: number, preserveDate?: boolean) {\n\t\t// Modify the current timestamp\n\t\tthis._safelyModifyTimestampBy(amount, \"month\", preserveDate);\n\t\tthis._updateSecondTimestamp();\n\n\t\t// Notify the calendar to update its timestamp\n\t\tthis.fireDecoratorEvent(\"navigate\", { timestamp: this.timestamp! });\n\t}\n\n\t_onkeyup(e: KeyboardEvent) {\n\t\tif (isSpace(e)) {\n\t\t\tthis._selectMonth(e);\n\t\t}\n\t}\n\n\t/**\n\t * Selects a month, when user made selection with mouse or using Space/Enter.\n\t * @param e\n\t * @private\n\t */\n\t_selectMonth(e: Event) {\n\t\te.preventDefault();\n\t\tconst target = e.target as HTMLElement;\n\n\t\tif (!target.classList.contains(\"ui5-mp-item\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst timestamp = this._getTimestampFromDom(target);\n\t\tthis._safelySetTimestamp(timestamp);\n\t\tthis._updateSecondTimestamp();\n\t\tthis._updateSelectedDates(timestamp);\n\n\t\tthis.fireDecoratorEvent(\"change\", {\n\t\t\ttimestamp: this.timestamp!,\n\t\t\tdates: this.selectedDates,\n\t\t});\n\t}\n\n\t_updateSelectedDates(timestamp: number) {\n\t\tif (this.selectionMode === CalendarSelectionMode.Range && this.selectedDates.length === 1) {\n\t\t\tthis.selectedDates = [this.selectedDates[0], timestamp];\n\t\t\treturn;\n\t\t}\n\n\t\tthis.selectedDates = [timestamp];\n\t}\n\n\t/**\n\t * Called by the Calendar component.\n\t * @protected\n\t */\n\t_hasPreviousPage(): boolean {\n\t\treturn this._calendarDate.getYear() !== this._minDate.getYear();\n\t}\n\n\t/**\n\t * Called by the Calendar component.\n\t * @protected\n\t */\n\t_hasNextPage(): boolean {\n\t\treturn this._calendarDate.getYear() !== this._maxDate.getYear();\n\t}\n\n\t/**\n\t * Called by Calendar.js.\n\t *\n\t * **Note:** when the user presses the \"<\" button in the calendar header (same as \"PageUp\")\n\t * @protected\n\t */\n\t_showPreviousPage() {\n\t\tthis._modifyTimestampBy(-PAGE_SIZE, true);\n\t}\n\n\t/**\n\t * Called by Calendar.js\n\t * **Note:** when the user presses the \">\" button in the calendar header (same as \"PageDown\")\n\t * @protected\n\t */\n\t_showNextPage() {\n\t\tthis._modifyTimestampBy(PAGE_SIZE, true);\n\t}\n\n\t_isOutOfSelectableRange(date: CalendarDate, minDate: CalendarDate, maxDate: CalendarDate): boolean {\n\t\tconst month = date.getMonth();\n\t\tconst year = date.getYear();\n\t\tconst minYear = minDate.getYear();\n\t\tconst minMonth = minDate.getMonth();\n\t\tconst maxYear = maxDate.getYear();\n\t\tconst maxMonth = maxDate.getMonth();\n\n\t\treturn year < minYear || (year === minYear && month < minMonth) || year > maxYear || (year === maxYear && month > maxMonth);\n\t}\n}\n\nMonthPicker.define();\n\nexport default MonthPicker;\nexport type {\n\tMonthPickerNavigateEventDetail,\n\tMonthPickerChangeEventDetail,\n};\n"]}
@@ -1088,6 +1088,9 @@ let MultiComboBox = MultiComboBox_1 = class MultiComboBox extends UI5Element {
1088
1088
  if (!e.detail.selectedItems.length && this.filterSelected) {
1089
1089
  this.filterSelected = false;
1090
1090
  }
1091
+ if (this.valueState === ValueState.Negative) {
1092
+ this._updateValueState(this._effectiveValueState);
1093
+ }
1091
1094
  if (!e.detail.selectionComponentPressed && !isSpace(castedEvent) && !isSpaceCtrl(castedEvent)) {
1092
1095
  this.open = false;
1093
1096
  this.value = "";