@ui5/webcomponents 1.13.0-rc.5 → 1.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/Calendar.js +1 -3
- package/dist/Calendar.js.map +1 -1
- package/dist/DateComponentBase.js +3 -11
- package/dist/DateComponentBase.js.map +1 -1
- package/dist/DatePicker.js +4 -10
- package/dist/DatePicker.js.map +1 -1
- package/dist/DateRangePicker.js +4 -4
- package/dist/DateRangePicker.js.map +1 -1
- package/dist/DateTimePicker.js +2 -2
- package/dist/DateTimePicker.js.map +1 -1
- package/dist/TimePicker.js +1 -1
- package/dist/TimePicker.js.map +1 -1
- package/dist/TimePickerBase.js +3 -3
- package/dist/TimePickerBase.js.map +1 -1
- package/dist/TimeSelection.js +3 -3
- package/dist/TimeSelection.js.map +1 -1
- package/dist/TreeItemBase.d.ts +1 -1
- package/dist/TreeItemBase.js +1 -1
- package/dist/TreeItemBase.js.map +1 -1
- package/dist/assets/messagebundle_de.33dc33ea.js +1 -0
- package/dist/assets/test/pages/{ComboBox.html.c531b98d.js → ComboBox.html.2025a0ee.js} +1 -1
- package/dist/assets/test/pages/{Icon.html.13c36c48.js → Icon.html.9bcff6a6.js} +1 -1
- package/dist/assets/test/pages/{Label.html.576df9e6.js → Label.html.6f194c4a.js} +1 -1
- package/dist/assets/test/pages/{Popups.html.8b1c81c7.js → Popups.html.8dea1e31.js} +1 -1
- package/dist/generated/assets/i18n/messagebundle_de.json +1 -1
- package/dist/i18n/messagebundle_de.properties +1 -1
- package/dist/test/pages/72override.html +1 -1
- package/dist/test/pages/AnimanitionOff.html +1 -1
- package/dist/test/pages/Avatar.html +1 -1
- package/dist/test/pages/AvatarGroup.html +1 -1
- package/dist/test/pages/Badge.html +1 -1
- package/dist/test/pages/Breadcrumbs.html +1 -1
- package/dist/test/pages/BusyIndicator.html +1 -1
- package/dist/test/pages/Button.html +1 -1
- package/dist/test/pages/Calendar.html +1 -1
- package/dist/test/pages/Card.html +1 -1
- package/dist/test/pages/Carousel.html +1 -1
- package/dist/test/pages/CheckBox.html +1 -1
- package/dist/test/pages/ColorPalette.html +1 -1
- package/dist/test/pages/ColorPalettePopover.html +1 -1
- package/dist/test/pages/ColorPicker.html +1 -1
- package/dist/test/pages/ComboBox.html +2 -2
- package/dist/test/pages/Components.html +1 -1
- package/dist/test/pages/CoreControls.html +1 -1
- package/dist/test/pages/CoreControls_exp.html +1 -1
- package/dist/test/pages/CustomCSS.html +1 -1
- package/dist/test/pages/DatePicker.html +1 -1
- package/dist/test/pages/DatePicker_test_page.html +1 -1
- package/dist/test/pages/DateRangePicker.html +1 -1
- package/dist/test/pages/DateTimePicker.html +1 -1
- package/dist/test/pages/DateTimePicker_Timezone.html +1 -1
- package/dist/test/pages/DayPicker.html +1 -1
- package/dist/test/pages/Dialog.html +1 -1
- package/dist/test/pages/DialogLifecycle.html +1 -1
- package/dist/test/pages/DialogSemantic.html +1 -1
- package/dist/test/pages/Eventing.html +1 -1
- package/dist/test/pages/F6Test1.html +1 -1
- package/dist/test/pages/F6Test2.html +1 -1
- package/dist/test/pages/F6Test3.html +1 -1
- package/dist/test/pages/F6Test4.html +1 -1
- package/dist/test/pages/F6Test5.html +1 -1
- package/dist/test/pages/F6Test6.html +1 -1
- package/dist/test/pages/F6Test7.html +1 -1
- package/dist/test/pages/FileUploader.html +1 -1
- package/dist/test/pages/FormComponents.html +1 -1
- package/dist/test/pages/FormSupport.html +1 -1
- package/dist/test/pages/HCB.html +1 -1
- package/dist/test/pages/Icon.html +2 -2
- package/dist/test/pages/Icon_and_theming.html +1 -1
- package/dist/test/pages/Icon_custom.html +1 -1
- package/dist/test/pages/Input.html +1 -1
- package/dist/test/pages/InputFieldLabels.html +1 -1
- package/dist/test/pages/InputFieldMinWidth.html +1 -1
- package/dist/test/pages/InputIcons.html +1 -1
- package/dist/test/pages/Input_quickview.html +1 -1
- package/dist/test/pages/InputsAlignment.html +1 -1
- package/dist/test/pages/InputsLazyLoading.html +1 -1
- package/dist/test/pages/ItemNavigation.html +1 -1
- package/dist/test/pages/Kitchen.html +1 -1
- package/dist/test/pages/Kitchen.openui5.html +1 -1
- package/dist/test/pages/Label.html +2 -2
- package/dist/test/pages/Link.html +1 -1
- package/dist/test/pages/List.html +1 -1
- package/dist/test/pages/ListGrowing_Button.html +1 -1
- package/dist/test/pages/ListGrowing_Scroll.html +1 -1
- package/dist/test/pages/List_keyboard_support.html +1 -1
- package/dist/test/pages/List_test_page.html +1 -1
- package/dist/test/pages/LitKeyFunction.html +1 -1
- package/dist/test/pages/MemoryLeak.html +1 -1
- package/dist/test/pages/Menu.html +1 -1
- package/dist/test/pages/MessagePage.html +1 -1
- package/dist/test/pages/MessageStrip.html +1 -1
- package/dist/test/pages/MultiComboBox.html +1 -1
- package/dist/test/pages/MultiInput.html +1 -1
- package/dist/test/pages/MultiInput_Suggestions.html +1 -1
- package/dist/test/pages/OpenUI5-second.html +1 -1
- package/dist/test/pages/OpenUI5.html +1 -1
- package/dist/test/pages/Panel.html +1 -1
- package/dist/test/pages/Popover.html +1 -1
- package/dist/test/pages/PopoverArrowBounds.html +1 -1
- package/dist/test/pages/Popups.html +2 -2
- package/dist/test/pages/ProgressIndicator.html +1 -1
- package/dist/test/pages/RTL.html +1 -1
- package/dist/test/pages/RadioButton.html +1 -1
- package/dist/test/pages/RangeSlider.html +1 -1
- package/dist/test/pages/RatingIndicator.html +1 -1
- package/dist/test/pages/ResizeHandler.html +1 -1
- package/dist/test/pages/ResponsivePopover.html +1 -1
- package/dist/test/pages/SegmentedButton.html +1 -1
- package/dist/test/pages/Select.html +1 -1
- package/dist/test/pages/Simple.html +1 -1
- package/dist/test/pages/Slider.html +1 -1
- package/dist/test/pages/SplitButton.html +1 -1
- package/dist/test/pages/StepInput.html +1 -1
- package/dist/test/pages/Switch.html +1 -1
- package/dist/test/pages/TabContainer.html +1 -1
- package/dist/test/pages/Table-perf-pure.html +1 -1
- package/dist/test/pages/Table-perf.html +1 -1
- package/dist/test/pages/Table.html +1 -1
- package/dist/test/pages/Table2.html +1 -1
- package/dist/test/pages/TableAllPopin.html +1 -1
- package/dist/test/pages/TableCustomStyling.html +1 -1
- package/dist/test/pages/TableGrouping.html +1 -1
- package/dist/test/pages/TableGrowingWithButton.html +1 -1
- package/dist/test/pages/TableGrowingWithScroll.html +1 -1
- package/dist/test/pages/TableSelection.html +1 -1
- package/dist/test/pages/TextArea.html +1 -1
- package/dist/test/pages/TimePicker.html +1 -1
- package/dist/test/pages/TimeSelection.html +1 -1
- package/dist/test/pages/Title.html +1 -1
- package/dist/test/pages/Toast.html +1 -1
- package/dist/test/pages/ToggleButton.html +1 -1
- package/dist/test/pages/Tree.html +1 -1
- package/dist/test/pages/WheelSlider_Test_Page.html +1 -1
- package/dist/test/pages/base/AriaLabelHelper.html +1 -1
- package/dist/test/pages/base/DOMObserver.html +1 -1
- package/dist/test/pages/base/IconCollection.html +1 -1
- package/dist/test/pages/base/IconCollectionInCustomTheme.html +1 -1
- package/dist/test/pages/base/InvisibleMessage.html +1 -1
- package/dist/test/pages/form.html +1 -1
- package/dist/test/pages/i18n-defaultLang.html +1 -1
- package/dist/test/pages/i18n-demo.html +1 -1
- package/package.json +7 -7
- package/src/i18n/messagebundle_de.properties +1 -1
- package/dist/assets/messagebundle_de.07dbdade.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.13.1](https://github.com/SAP/ui5-webcomponents/compare/v1.13.0-rc.5...v1.13.1) (2023-05-11)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **ui5-tree:** rtl styling fixes ([#7019](https://github.com/SAP/ui5-webcomponents/issues/7019)) ([88a63ee](https://github.com/SAP/ui5-webcomponents/commit/88a63eefa161b0576dc635cf2b16ecb1e27afacb)), closes [#6892](https://github.com/SAP/ui5-webcomponents/issues/6892)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [1.13.0-rc.5](https://github.com/SAP/ui5-webcomponents/compare/v1.13.0-rc.4...v1.13.0-rc.5) (2023-05-11)
|
|
7
18
|
|
|
8
19
|
|
package/dist/Calendar.js
CHANGED
|
@@ -151,9 +151,7 @@ let Calendar = class Calendar extends CalendarPart {
|
|
|
151
151
|
get _selectedDatesTimestamps() {
|
|
152
152
|
return this.dates.map(date => {
|
|
153
153
|
const value = date.value;
|
|
154
|
-
|
|
155
|
-
// but has logic related to "undefined" value, so we're calling it with "undefined" and casting to "boolean".
|
|
156
|
-
const validValue = value && !!this.getFormat().parse(value, undefined, undefined);
|
|
154
|
+
const validValue = value && !!this.getFormat().parse(value);
|
|
157
155
|
return validValue ? this._getTimeStampFromString(value) / 1000 : undefined;
|
|
158
156
|
}).filter((date) => !!date);
|
|
159
157
|
}
|
package/dist/Calendar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Calendar.js","sourceRoot":"","sources":["../src/Calendar.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,4BAA4B,MAAM,4EAA4E,CAAC;AACtH,OAAO,+BAA+B,MAAM,+EAA+E,CAAC;AAC5H,OAAO,YAAY,MAAM,4DAA4D,CAAC;AACtF,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EACN,IAAI,EACJ,SAAS,GACT,MAAM,sCAAsC,CAAC;AAC9C,OAAO,2BAA2B,MAAM,qEAAqE,CAAC;AAC9G,OAAO,SAAS,MAAM,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AAQ,EAAE;wDACqB;AAGhC;IADC,QAAQ,EAAE;uDACoB;AAG/B;IADC,QAAQ,EAAE;8DAC2B;AAGtC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,mBAAmB,EAAE,YAAY,EAAE,mBAAmB,CAAC,cAAc,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;8CAC1E;AAYnC;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,uBAAuB,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;uCACtC;AArEjC,QAAQ;IAjCb,aAAa,CAAC;QACd,GAAG,EAAE,cAAc;QACnB,cAAc,EAAE,IAAI;QACpB,QAAQ,EAAE,gBAAgB;QAC1B,MAAM,EAAE,WAAW;QACnB,YAAY,EAAE;YACb,qBAAqB,CAAC,OAAO;YAC7B,cAAc;YACd,SAAS;YACT,WAAW;YACX,UAAU;SACV;KACD,CAAC;IACF;;;;;;;;;;OAUG;;IACF,KAAK,CAAC,uBAAuB,EAAE;QAC/B,MAAM,EAAE;YACP,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE;YACtB,MAAM,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE;SACvB;KACD,CAAC;IAED,KAAK,CAAC,kBAAkB,CAAC;IACzB,KAAK,CAAC,iBAAiB,CAAC;GACnB,QAAQ,CA0Tb;AAED,QAAQ,CAAC,MAAM,EAAE,CAAC;AAElB,eAAe,QAAQ,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport transformDateToSecondaryType from \"@ui5/webcomponents-localization/dist/dates/transformDateToSecondaryType.js\";\nimport convertMonthNumbersToMonthNames from \"@ui5/webcomponents-localization/dist/dates/convertMonthNumbersToMonthNames.js\";\nimport CalendarDate from \"@ui5/webcomponents-localization/dist/dates/CalendarDate.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport {\n\tisF4,\n\tisF4Shift,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport getCachedLocaleDataInstance from \"@ui5/webcomponents-localization/dist/getCachedLocaleDataInstance.js\";\nimport getLocale from \"@ui5/webcomponents-base/dist/locale/getLocale.js\";\nimport DateFormat from \"@ui5/webcomponents-localization/dist/DateFormat.js\";\nimport * as CalendarDateComponent from \"./CalendarDate.js\";\nimport type CalendarDateComponentT from \"./CalendarDate.js\";\nimport CalendarPart from \"./CalendarPart.js\";\nimport CalendarHeader from \"./CalendarHeader.js\";\nimport DayPicker from \"./DayPicker.js\";\nimport type { DayPickerChangeEventDetail } from \"./DayPicker.js\";\nimport MonthPicker from \"./MonthPicker.js\";\nimport type { MonthPickerChangeEventDetail } from \"./MonthPicker.js\";\nimport YearPicker from \"./YearPicker.js\";\nimport type { YearPickerChangeEventDetail } from \"./YearPicker.js\";\nimport CalendarSelectionMode from \"./types/CalendarSelectionMode.js\";\nimport CalendarPickersMode from \"./types/CalendarPickersMode.js\";\n\n// Default calendar for bundling\nimport \"@ui5/webcomponents-localization/dist/features/calendar/Gregorian.js\";\n\n// Template\nimport CalendarTemplate from \"./generated/templates/CalendarTemplate.lit.js\";\n\n// Styles\nimport calendarCSS from \"./generated/themes/Calendar.css.js\";\n\ninterface ICalendarPicker {\n\t_showPreviousPage: () => void,\n\t_showNextPage: () => void,\n\t_hasPreviousPage: () => boolean,\n\t_hasNextPage: () => boolean,\n\t_autoFocus?: boolean,\n\t_firstYear?: number,\n\t_lastYear?: number,\n}\n\ntype CalendarChangeEventDetail = {\n\tvalues: Array<string>,\n\tdates: Array<number>,\n\ttimestamp: number | undefined,\n}\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n * The <code>ui5-calendar</code> component allows users to select one or more dates.\n * <br><br>\n * Currently selected dates are represented with instances of <code>ui5-date</code> as\n * children of the <code>ui5-calendar</code>. The value property of each <code>ui5-date</code> must be a\n * date string, correctly formatted according to the <code>ui5-calendar</code>'s <code>formatPattern</code> property.\n * Whenever the user changes the date selection, <code>ui5-calendar</code> will automatically create/remove instances\n * of <code>ui5-date</code> in itself, unless you prevent this behavior by calling <code>preventDefault()</code> for the\n * <code>selected-dates-change</code> event. This is useful if you want to control the selected dates externally.\n * <br><br>\n *\n * <h3>Usage</h3>\n *\n * The user can navigate to a particular date by:\n * <br>\n * <ul>\n * <li>Pressing over a month inside the months view</li>\n * <li>Pressing over an year inside the years view</li>\n * </ul>\n * <br>\n * The user can confirm a date selection by pressing over a date inside the days view.\n * <br><br>\n *\n * <h3>Keyboard Handling</h3>\n * The <code>ui5-calendar</code> provides advanced keyboard handling.\n * When a picker is showed and focused the user can use the following keyboard\n * shortcuts in order to perform a navigation:\n * <br>\n * - Day picker: <br>\n * <ul>\n * <li>[F4] - Shows month picker</li>\n * <li>[SHIFT] + [F4] - Shows year picker</li>\n * <li>[PAGEUP] - Navigate to the previous month</li>\n * <li>[PAGEDOWN] - Navigate to the next month</li>\n * <li>[SHIFT] + [PAGEUP] - Navigate to the previous year</li>\n * <li>[SHIFT] + [PAGEDOWN] - Navigate to the next year</li>\n * <li>[CTRL] + [SHIFT] + [PAGEUP] - Navigate ten years backwards</li>\n * <li>[CTRL] + [SHIFT] + [PAGEDOWN] - Navigate ten years forwards</li>\n * <li>[HOME] - Navigate to the first day of the week</li>\n * <li>[END] - Navigate to the last day of the week</li>\n * <li>[CTRL] + [HOME] - Navigate to the first day of the month</li>\n * <li>[CTRL] + [END] - Navigate to the last day of the month</li>\n * </ul>\n * <br>\n * - Month picker: <br>\n * <ul>\n * <li>[PAGEUP] - Navigate to the previous year</li>\n * <li>[PAGEDOWN] - Navigate to the next year</li>\n * <li>[HOME] - Navigate to the first month of the current row</li>\n * <li>[END] - Navigate to the last month of the current row</li>\n * <li>[CTRL] + [HOME] - Navigate to the first month of the current year</li>\n * <li>[CTRL] + [END] - Navigate to the last month of the year</li>\n * </ul>\n * <br>\n * - Year picker: <br>\n * <ul>\n * <li>[PAGEUP] - Navigate to the previous year range</li>\n * <li>[PAGEDOWN] - Navigate the next year range</li>\n * <li>[HOME] - Navigate to the first year of the current row</li>\n * <li>[END] - Navigate to the last year of the current row</li>\n * <li>[CTRL] + [HOME] - Navigate to the first year of the current year range</li>\n * <li>[CTRL] + [END] - Navigate to the last year of the current year range</li>\n * </ul>\n * <br>\n *\n * <h4>Fast Navigation</h4>\n * This component provides a build in fast navigation group which can be used via <code>F6 / Shift + F6</code> or <code> Ctrl + Alt(Option) + Down / Ctrl + Alt(Option) + Up</code>.\n * In order to use this functionality, you need to import the following module:\n * <code>import \"@ui5/webcomponents-base/dist/features/F6Navigation.js\"</code>\n * <br><br>\n *\n* <h3>Calendar types</h3>\n * The component supports several calendar types - Gregorian, Buddhist, Islamic, Japanese and Persian.\n * By default the Gregorian Calendar is used. In order to use the Buddhist, Islamic, Japanese or Persian calendar,\n * you need to set the <code>primaryCalendarType</code> property and import one or more of the following modules:\n * <br><br>\n *\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Buddhist.js\";</code>\n * <br>\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Islamic.js\";</code>\n * <br>\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Japanese.js\";</code>\n * <br>\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Persian.js\";</code>\n * <br><br>\n *\n * Or, you can use the global configuration and set the <code>calendarType</code> key:\n * <br>\n * <code>\n * <script data-id=\"sap-ui-config\" type=\"application/json\">\n * {\n *\t\"calendarType\": \"Japanese\"\n * }\n * </script>\n * </code>\n *\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/Calendar\";</code>\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.Calendar\n * @extends sap.ui.webc.main.CalendarPart\n * @tagname ui5-calendar\n * @appenddocs sap.ui.webc.main.CalendarDate\n * @public\n * @since 1.0.0-rc.11\n */\n@customElement({\n\ttag: \"ui5-calendar\",\n\tfastNavigation: true,\n\ttemplate: CalendarTemplate,\n\tstyles: calendarCSS,\n\tdependencies: [\n\t\tCalendarDateComponent.default,\n\t\tCalendarHeader,\n\t\tDayPicker,\n\t\tMonthPicker,\n\t\tYearPicker,\n\t],\n})\n/**\n * Fired when the selected dates change.\n * <b>Note:</b> If you call <code>preventDefault()</code> for this event, the component will not\n * create instances of <code>ui5-date</code> for the newly selected dates. In that case you should do this manually.\n *\n * @event sap.ui.webc.main.Calendar#selected-dates-change\n * @allowPreventDefault\n * @param {Array} values The selected dates\n * @param {Array} dates The selected dates as UTC timestamps\n * @public\n */\n@event(\"selected-dates-change\", {\n\tdetail: {\n\t\tdates: { type: Array },\n\t\tvalues: { type: Array },\n\t},\n})\n\n@event(\"show-month-press\")\n@event(\"show-year-press\")\nclass Calendar extends CalendarPart {\n\t/**\n\t * Defines the type of selection used in the calendar component.\n\t * Accepted property values are:<br>\n\t * <ul>\n\t * <li><code>CalendarSelectionMode.Single</code> - enables a single date selection.(default value)</li>\n\t * <li><code>CalendarSelectionMode.Range</code> - enables selection of a date range.</li>\n\t * <li><code>CalendarSelectionMode.Multiple</code> - enables selection of multiple dates.</li>\n\t * </ul>\n\t * @type {sap.ui.webc.main.types.CalendarSelectionMode}\n\t * @name sap.ui.webc.main.Calendar.prototype.selectionMode\n\t * @defaultvalue \"Single\"\n\t * @public\n\t */\n\t@property({\n\t\ttype: CalendarSelectionMode,\n\t\tdefaultValue: CalendarSelectionMode.Single,\n\t})\n\tselectionMode!: CalendarSelectionMode;\n\n\t/**\n\t * Defines the visibility of the week numbers column.\n\t * <br><br>\n\t *\n\t * <b>Note:</b> For calendars other than Gregorian,\n\t * the week numbers are not displayed regardless of what is set.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Calendar.prototype.hideWeekNumbers\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\thideWeekNumbers!: boolean;\n\n\t/**\n\t * Which picker is currently visible to the user: day/month/year\n\t */\n\t@property({ defaultValue: \"day\" })\n\t_currentPicker!: string;\n\n\t@property({ type: Boolean })\n\t_previousButtonDisabled!: boolean;\n\n\t@property({ type: Boolean })\n\t_nextButtonDisabled!: boolean;\n\n\t@property()\n\t_headerMonthButtonText!: string;\n\n\t@property()\n\t_headerYearButtonText!: string;\n\n\t@property()\n\t_headerYearButtonTextSecType!: string;\n\n\t@property({ type: CalendarPickersMode, defaultValue: CalendarPickersMode.DAY_MONTH_YEAR, noAttribute: true })\n\t_pickersMode!: CalendarPickersMode;\n\n\t/**\n\t * Defines the selected date or dates (depending on the <code>selectionMode</code> property)\n\t * for this calendar as instances of <code>ui5-date</code>.\n\t *\n\t * @type {sap.ui.webc.main.ICalendarDate[]}\n\t * @name sap.ui.webc.main.Calendar.prototype.default\n\t * @slot dates\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, invalidateOnChildChange: true, \"default\": true })\n\tdates!: Array<CalendarDateComponentT>;\n\n\t/**\n\t * @private\n\t */\n\tget _selectedDatesTimestamps(): Array<number> {\n\t\treturn this.dates.map(date => {\n\t\t\tconst value = date.value;\n\t\t\t// <b>Note:</b> Format#parse accepts only boolean type for 2nd and 3rd params,\n\t\t\t// but has logic related to \"undefined\" value, so we're calling it with \"undefined\" and casting to \"boolean\".\n\t\t\tconst validValue = value && !!this.getFormat().parse(value, undefined as unknown as boolean, undefined as unknown as boolean);\n\t\t\treturn validValue ? this._getTimeStampFromString(value)! / 1000 : undefined;\n\t\t}).filter((date): date is number => !!date);\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_setSelectedDates(selectedDates: Array<number>) {\n\t\tconst selectedValues = selectedDates.map(timestamp => this.getFormat().format(new Date(timestamp * 1000), true)); // Format as UTC\n\t\tconst valuesInDOM = [...this.dates].map(dateElement => dateElement.value);\n\n\t\t// Remove all elements for dates that are no longer selected\n\t\tthis.dates.filter(dateElement => !selectedValues.includes(dateElement.value)).forEach(dateElement => {\n\t\t\tthis.removeChild(dateElement);\n\t\t});\n\n\t\t// Create tags for the selected dates that don't already exist in DOM\n\t\tselectedValues.filter(value => !valuesInDOM.includes(value)).forEach(value => {\n\t\t\tconst dateElement = document.createElement(CalendarDateComponent.default.getMetadata().getTag()) as CalendarDateComponentT;\n\t\t\tdateElement.value = value;\n\t\t\tthis.appendChild(dateElement);\n\t\t});\n\t}\n\n\t/**\n\t * Makes sure that _currentPicker is always set to a value, allowed by _pickersMode\n\t */\n\t_normalizeCurrentPicker() {\n\t\tif (this._currentPicker === \"day\" && this._pickersMode !== CalendarPickersMode.DAY_MONTH_YEAR) {\n\t\t\tthis._currentPicker = \"month\";\n\t\t}\n\n\t\tif (this._currentPicker === \"month\" && this._pickersMode === CalendarPickersMode.YEAR) {\n\t\t\tthis._currentPicker = \"year\";\n\t\t}\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._normalizeCurrentPicker();\n\t}\n\n\tasync onAfterRendering() {\n\t\tawait renderFinished(); // Await for the current picker to render and then ask if it has previous/next pages\n\t\tthis._previousButtonDisabled = !this._currentPickerDOM._hasPreviousPage();\n\t\tthis._nextButtonDisabled = !this._currentPickerDOM._hasNextPage();\n\n\t\tconst yearFormat = DateFormat.getDateInstance({ format: \"y\", calendarType: this.primaryCalendarType });\n\t\tconst localeData = getCachedLocaleDataInstance(getLocale());\n\t\tthis._headerMonthButtonText = localeData.getMonthsStandAlone(\"wide\", this.primaryCalendarType)[this._calendarDate.getMonth()];\n\n\t\tif (this._currentPicker === \"year\") {\n\t\t\tconst rangeStart = new CalendarDate(this._calendarDate, this._primaryCalendarType);\n\t\t\tconst rangeEnd = new CalendarDate(this._calendarDate, this._primaryCalendarType);\n\t\t\trangeStart.setYear(this._currentPickerDOM._firstYear!);\n\t\t\trangeEnd.setYear(this._currentPickerDOM._lastYear!);\n\n\t\t\tthis._headerYearButtonText = `${yearFormat.format(rangeStart.toLocalJSDate(), true)} - ${yearFormat.format(rangeEnd.toLocalJSDate(), true)}`;\n\t\t} else {\n\t\t\tthis._headerYearButtonText = String(yearFormat.format(this._localDate, true));\n\t\t}\n\n\t\tthis.secondaryCalendarType && this._setSecondaryCalendarTypeButtonText();\n\t}\n\n\t/**\n\t * The user clicked the \"month\" button in the header\n\t */\n\tonHeaderShowMonthPress(e: CustomEvent) {\n\t\tthis._currentPickerDOM._autoFocus = false;\n\t\tthis._currentPicker = \"month\";\n\t\tthis.fireEvent(\"show-month-press\", e);\n\t}\n\n\t/**\n\t * The user clicked the \"year\" button in the header\n\t */\n\tonHeaderShowYearPress(e: CustomEvent) {\n\t\tthis._currentPickerDOM._autoFocus = false;\n\t\tthis._currentPicker = \"year\";\n\t\tthis.fireEvent(\"show-year-press\", e);\n\t}\n\n\tget _currentPickerDOM() {\n\t\t// Calendar's shadowRoot and all the pickers are always present - the \"!\" is safe to be used.\n\t\treturn this.shadowRoot!.querySelector(`[ui5-${this._currentPicker}picker]`)! as unknown as ICalendarPicker;\n\t}\n\n\t/**\n\t * The year clicked the \"Previous\" button in the header\n\t */\n\tonHeaderPreviousPress() {\n\t\tthis._currentPickerDOM._showPreviousPage();\n\t}\n\n\t/**\n\t * The year clicked the \"Next\" button in the header\n\t */\n\tonHeaderNextPress() {\n\t\tthis._currentPickerDOM._showNextPage();\n\t}\n\n\t_setSecondaryCalendarTypeButtonText() {\n\t\tconst yearFormatSecType = DateFormat.getDateInstance({ format: \"y\", calendarType: this.secondaryCalendarType });\n\n\t\tif (this._currentPicker === \"year\") {\n\t\t\tconst rangeStart = new CalendarDate(this._calendarDate, this._primaryCalendarType);\n\t\t\tconst rangeEnd = new CalendarDate(this._calendarDate, this._primaryCalendarType);\n\t\t\trangeStart.setYear(this._currentPickerDOM._firstYear!);\n\t\t\trangeEnd.setYear(this._currentPickerDOM._lastYear!);\n\n\t\t\tconst rangeStartSecType = transformDateToSecondaryType(this.primaryCalendarType, this.secondaryCalendarType, rangeStart.valueOf() / 1000, true)\n\t\t\t\t.firstDate;\n\t\t\tconst rangeEndSecType = transformDateToSecondaryType(this.primaryCalendarType, this.secondaryCalendarType, rangeEnd.valueOf() / 1000, true)\n\t\t\t\t.lastDate;\n\t\t\tthis._headerYearButtonTextSecType = `${yearFormatSecType.format(rangeStartSecType.toLocalJSDate(), true)} - ${yearFormatSecType.format(rangeEndSecType.toLocalJSDate(), true)}`;\n\t\t} else {\n\t\t\tthis._headerYearButtonTextSecType = String(yearFormatSecType.format(this._localDate, true));\n\t\t}\n\t}\n\n\tget secondaryCalendarTypeButtonText() {\n\t\tif (!this.secondaryCalendarType) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst localDate = new Date(this._timestamp * 1000);\n\t\tconst secondYearFormat = DateFormat.getDateInstance({ format: \"y\", calendarType: this.secondaryCalendarType });\n\t\tconst dateInSecType = transformDateToSecondaryType(this._primaryCalendarType, this.secondaryCalendarType, this._timestamp);\n\t\tconst secondMonthInfo = convertMonthNumbersToMonthNames(dateInSecType.firstDate.getMonth(), dateInSecType.lastDate.getMonth(), this.secondaryCalendarType);\n\t\tconst secondYearText = secondYearFormat.format(localDate, true);\n\n\t\treturn {\n\t\t\tyearButtonText: secondYearText,\n\t\t\tmonthButtonText: secondMonthInfo.text,\n\t\t\tmonthButtonInfo: secondMonthInfo.textInfo,\n\t\t};\n\t}\n\n\t/**\n\t * The month button is hidden when the month picker or year picker is shown\n\t * @returns {boolean}\n\t * @private\n\t */\n\tget _isHeaderMonthButtonHidden() {\n\t\treturn this._currentPicker === \"month\" || this._currentPicker === \"year\";\n\t}\n\n\tget _isDayPickerHidden() {\n\t\treturn this._currentPicker !== \"day\";\n\t}\n\n\tget _isMonthPickerHidden() {\n\t\treturn this._currentPicker !== \"month\";\n\t}\n\n\tget _isYearPickerHidden() {\n\t\treturn this._currentPicker !== \"year\";\n\t}\n\n\t_fireEventAndUpdateSelectedDates(selectedDates: Array<number>) {\n\t\tconst datesValues = selectedDates.map(timestamp => {\n\t\t\tconst calendarDate = CalendarDate.fromTimestamp(timestamp * 1000, this._primaryCalendarType);\n\t\t\treturn this.getFormat().format(calendarDate.toUTCJSDate(), true);\n\t\t});\n\n\t\tconst defaultPrevented = !this.fireEvent<CalendarChangeEventDetail>(\"selected-dates-change\", { timestamp: this.timestamp, dates: [...selectedDates], values: datesValues }, true);\n\t\tif (!defaultPrevented) {\n\t\t\tthis._setSelectedDates(selectedDates);\n\t\t}\n\t}\n\n\tonSelectedDatesChange(e: CustomEvent<DayPickerChangeEventDetail>) {\n\t\tthis.timestamp = e.detail.timestamp;\n\t\tthis._fireEventAndUpdateSelectedDates(e.detail.dates);\n\t}\n\n\tonSelectedMonthChange(e: CustomEvent<MonthPickerChangeEventDetail>) {\n\t\tthis.timestamp = e.detail.timestamp;\n\n\t\tif (this._pickersMode === CalendarPickersMode.DAY_MONTH_YEAR) {\n\t\t\tthis._currentPicker = \"day\";\n\t\t} else {\n\t\t\tthis._fireEventAndUpdateSelectedDates([this.timestamp]);\n\t\t}\n\n\t\tthis._currentPickerDOM._autoFocus = true;\n\t}\n\n\tonSelectedYearChange(e: CustomEvent<YearPickerChangeEventDetail>) {\n\t\tthis.timestamp = e.detail.timestamp;\n\n\t\tif (this._pickersMode === CalendarPickersMode.DAY_MONTH_YEAR) {\n\t\t\tthis._currentPicker = \"day\";\n\t\t} else if (this._pickersMode === CalendarPickersMode.MONTH_YEAR) {\n\t\t\tthis._currentPicker = \"month\";\n\t\t} else {\n\t\t\tthis._fireEventAndUpdateSelectedDates([this.timestamp]);\n\t\t}\n\n\t\tthis._currentPickerDOM._autoFocus = true;\n\t}\n\n\tonNavigate(e: CustomEvent) {\n\t\tthis.timestamp = e.detail.timestamp;\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (isF4(e) && this._currentPicker !== \"month\") {\n\t\t\tthis._currentPicker = \"month\";\n\t\t}\n\n\t\tif (isF4Shift(e) && this._currentPicker !== \"year\") {\n\t\t\tthis._currentPicker = \"year\";\n\t\t}\n\t}\n\n\t/**\n\t * Returns an array of UTC timestamps, representing the selected dates.\n\t * @protected\n\t * @deprecated\n\t */\n\tget selectedDates(): Array<number> {\n\t\treturn this._selectedDatesTimestamps;\n\t}\n\n\t/**\n\t * Creates instances of <code>ui5-date</code> inside this <code>ui5-calendar</code> with values, equal to the provided UTC timestamps\n\t * @protected\n\t * @deprecated\n\t * @param { Array<number> } selectedDates Array of UTC timestamps\n\t */\n\tset selectedDates(selectedDates: Array<number>) {\n\t\tthis._setSelectedDates(selectedDates);\n\t}\n}\n\nCalendar.define();\n\nexport default Calendar;\nexport type {\n\tICalendarPicker,\n\tCalendarChangeEventDetail,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"Calendar.js","sourceRoot":"","sources":["../src/Calendar.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,KAAK,MAAM,kDAAkD,CAAC;AACrE,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,4BAA4B,MAAM,4EAA4E,CAAC;AACtH,OAAO,+BAA+B,MAAM,+EAA+E,CAAC;AAC5H,OAAO,YAAY,MAAM,4DAA4D,CAAC;AACtF,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EACN,IAAI,EACJ,SAAS,GACT,MAAM,sCAAsC,CAAC;AAC9C,OAAO,2BAA2B,MAAM,qEAAqE,CAAC;AAC9G,OAAO,SAAS,MAAM,kDAAkD,CAAC;AACzE,OAAO,UAAU,MAAM,oDAAoD,CAAC;AAC5E,OAAO,KAAK,qBAAqB,MAAM,mBAAmB,CAAC;AAE3D,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAC7C,OAAO,cAAc,MAAM,qBAAqB,CAAC;AACjD,OAAO,SAAS,MAAM,gBAAgB,CAAC;AAEvC,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAE3C,OAAO,UAAU,MAAM,iBA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QAAQ;IAjCb,aAAa,CAAC;QACd,GAAG,EAAE,cAAc;QACnB,cAAc,EAAE,IAAI;QACpB,QAAQ,EAAE,gBAAgB;QAC1B,MAAM,EAAE,WAAW;QACnB,YAAY,EAAE;YACb,qBAAqB,CAAC,OAAO;YAC7B,cAAc;YACd,SAAS;YACT,WAAW;YACX,UAAU;SACV;KACD,CAAC;IACF;;;;;;;;;;OAUG;;IACF,KAAK,CAAC,uBAAuB,EAAE;QAC/B,MAAM,EAAE;YACP,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE;YACtB,MAAM,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE;SACvB;KACD,CAAC;IAED,KAAK,CAAC,kBAAkB,CAAC;IACzB,KAAK,CAAC,iBAAiB,CAAC;GACnB,QAAQ,CAwTb;AAED,QAAQ,CAAC,MAAM,EAAE,CAAC;AAElB,eAAe,QAAQ,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport transformDateToSecondaryType from \"@ui5/webcomponents-localization/dist/dates/transformDateToSecondaryType.js\";\nimport convertMonthNumbersToMonthNames from \"@ui5/webcomponents-localization/dist/dates/convertMonthNumbersToMonthNames.js\";\nimport CalendarDate from \"@ui5/webcomponents-localization/dist/dates/CalendarDate.js\";\nimport { renderFinished } from \"@ui5/webcomponents-base/dist/Render.js\";\nimport {\n\tisF4,\n\tisF4Shift,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport getCachedLocaleDataInstance from \"@ui5/webcomponents-localization/dist/getCachedLocaleDataInstance.js\";\nimport getLocale from \"@ui5/webcomponents-base/dist/locale/getLocale.js\";\nimport DateFormat from \"@ui5/webcomponents-localization/dist/DateFormat.js\";\nimport * as CalendarDateComponent from \"./CalendarDate.js\";\nimport type CalendarDateComponentT from \"./CalendarDate.js\";\nimport CalendarPart from \"./CalendarPart.js\";\nimport CalendarHeader from \"./CalendarHeader.js\";\nimport DayPicker from \"./DayPicker.js\";\nimport type { DayPickerChangeEventDetail } from \"./DayPicker.js\";\nimport MonthPicker from \"./MonthPicker.js\";\nimport type { MonthPickerChangeEventDetail } from \"./MonthPicker.js\";\nimport YearPicker from \"./YearPicker.js\";\nimport type { YearPickerChangeEventDetail } from \"./YearPicker.js\";\nimport CalendarSelectionMode from \"./types/CalendarSelectionMode.js\";\nimport CalendarPickersMode from \"./types/CalendarPickersMode.js\";\n\n// Default calendar for bundling\nimport \"@ui5/webcomponents-localization/dist/features/calendar/Gregorian.js\";\n\n// Template\nimport CalendarTemplate from \"./generated/templates/CalendarTemplate.lit.js\";\n\n// Styles\nimport calendarCSS from \"./generated/themes/Calendar.css.js\";\n\ninterface ICalendarPicker {\n\t_showPreviousPage: () => void,\n\t_showNextPage: () => void,\n\t_hasPreviousPage: () => boolean,\n\t_hasNextPage: () => boolean,\n\t_autoFocus?: boolean,\n\t_firstYear?: number,\n\t_lastYear?: number,\n}\n\ntype CalendarChangeEventDetail = {\n\tvalues: Array<string>,\n\tdates: Array<number>,\n\ttimestamp: number | undefined,\n}\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n * The <code>ui5-calendar</code> component allows users to select one or more dates.\n * <br><br>\n * Currently selected dates are represented with instances of <code>ui5-date</code> as\n * children of the <code>ui5-calendar</code>. The value property of each <code>ui5-date</code> must be a\n * date string, correctly formatted according to the <code>ui5-calendar</code>'s <code>formatPattern</code> property.\n * Whenever the user changes the date selection, <code>ui5-calendar</code> will automatically create/remove instances\n * of <code>ui5-date</code> in itself, unless you prevent this behavior by calling <code>preventDefault()</code> for the\n * <code>selected-dates-change</code> event. This is useful if you want to control the selected dates externally.\n * <br><br>\n *\n * <h3>Usage</h3>\n *\n * The user can navigate to a particular date by:\n * <br>\n * <ul>\n * <li>Pressing over a month inside the months view</li>\n * <li>Pressing over an year inside the years view</li>\n * </ul>\n * <br>\n * The user can confirm a date selection by pressing over a date inside the days view.\n * <br><br>\n *\n * <h3>Keyboard Handling</h3>\n * The <code>ui5-calendar</code> provides advanced keyboard handling.\n * When a picker is showed and focused the user can use the following keyboard\n * shortcuts in order to perform a navigation:\n * <br>\n * - Day picker: <br>\n * <ul>\n * <li>[F4] - Shows month picker</li>\n * <li>[SHIFT] + [F4] - Shows year picker</li>\n * <li>[PAGEUP] - Navigate to the previous month</li>\n * <li>[PAGEDOWN] - Navigate to the next month</li>\n * <li>[SHIFT] + [PAGEUP] - Navigate to the previous year</li>\n * <li>[SHIFT] + [PAGEDOWN] - Navigate to the next year</li>\n * <li>[CTRL] + [SHIFT] + [PAGEUP] - Navigate ten years backwards</li>\n * <li>[CTRL] + [SHIFT] + [PAGEDOWN] - Navigate ten years forwards</li>\n * <li>[HOME] - Navigate to the first day of the week</li>\n * <li>[END] - Navigate to the last day of the week</li>\n * <li>[CTRL] + [HOME] - Navigate to the first day of the month</li>\n * <li>[CTRL] + [END] - Navigate to the last day of the month</li>\n * </ul>\n * <br>\n * - Month picker: <br>\n * <ul>\n * <li>[PAGEUP] - Navigate to the previous year</li>\n * <li>[PAGEDOWN] - Navigate to the next year</li>\n * <li>[HOME] - Navigate to the first month of the current row</li>\n * <li>[END] - Navigate to the last month of the current row</li>\n * <li>[CTRL] + [HOME] - Navigate to the first month of the current year</li>\n * <li>[CTRL] + [END] - Navigate to the last month of the year</li>\n * </ul>\n * <br>\n * - Year picker: <br>\n * <ul>\n * <li>[PAGEUP] - Navigate to the previous year range</li>\n * <li>[PAGEDOWN] - Navigate the next year range</li>\n * <li>[HOME] - Navigate to the first year of the current row</li>\n * <li>[END] - Navigate to the last year of the current row</li>\n * <li>[CTRL] + [HOME] - Navigate to the first year of the current year range</li>\n * <li>[CTRL] + [END] - Navigate to the last year of the current year range</li>\n * </ul>\n * <br>\n *\n * <h4>Fast Navigation</h4>\n * This component provides a build in fast navigation group which can be used via <code>F6 / Shift + F6</code> or <code> Ctrl + Alt(Option) + Down / Ctrl + Alt(Option) + Up</code>.\n * In order to use this functionality, you need to import the following module:\n * <code>import \"@ui5/webcomponents-base/dist/features/F6Navigation.js\"</code>\n * <br><br>\n *\n* <h3>Calendar types</h3>\n * The component supports several calendar types - Gregorian, Buddhist, Islamic, Japanese and Persian.\n * By default the Gregorian Calendar is used. In order to use the Buddhist, Islamic, Japanese or Persian calendar,\n * you need to set the <code>primaryCalendarType</code> property and import one or more of the following modules:\n * <br><br>\n *\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Buddhist.js\";</code>\n * <br>\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Islamic.js\";</code>\n * <br>\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Japanese.js\";</code>\n * <br>\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Persian.js\";</code>\n * <br><br>\n *\n * Or, you can use the global configuration and set the <code>calendarType</code> key:\n * <br>\n * <code>\n * <script data-id=\"sap-ui-config\" type=\"application/json\">\n * {\n *\t\"calendarType\": \"Japanese\"\n * }\n * </script>\n * </code>\n *\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/Calendar\";</code>\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.Calendar\n * @extends sap.ui.webc.main.CalendarPart\n * @tagname ui5-calendar\n * @appenddocs sap.ui.webc.main.CalendarDate\n * @public\n * @since 1.0.0-rc.11\n */\n@customElement({\n\ttag: \"ui5-calendar\",\n\tfastNavigation: true,\n\ttemplate: CalendarTemplate,\n\tstyles: calendarCSS,\n\tdependencies: [\n\t\tCalendarDateComponent.default,\n\t\tCalendarHeader,\n\t\tDayPicker,\n\t\tMonthPicker,\n\t\tYearPicker,\n\t],\n})\n/**\n * Fired when the selected dates change.\n * <b>Note:</b> If you call <code>preventDefault()</code> for this event, the component will not\n * create instances of <code>ui5-date</code> for the newly selected dates. In that case you should do this manually.\n *\n * @event sap.ui.webc.main.Calendar#selected-dates-change\n * @allowPreventDefault\n * @param {Array} values The selected dates\n * @param {Array} dates The selected dates as UTC timestamps\n * @public\n */\n@event(\"selected-dates-change\", {\n\tdetail: {\n\t\tdates: { type: Array },\n\t\tvalues: { type: Array },\n\t},\n})\n\n@event(\"show-month-press\")\n@event(\"show-year-press\")\nclass Calendar extends CalendarPart {\n\t/**\n\t * Defines the type of selection used in the calendar component.\n\t * Accepted property values are:<br>\n\t * <ul>\n\t * <li><code>CalendarSelectionMode.Single</code> - enables a single date selection.(default value)</li>\n\t * <li><code>CalendarSelectionMode.Range</code> - enables selection of a date range.</li>\n\t * <li><code>CalendarSelectionMode.Multiple</code> - enables selection of multiple dates.</li>\n\t * </ul>\n\t * @type {sap.ui.webc.main.types.CalendarSelectionMode}\n\t * @name sap.ui.webc.main.Calendar.prototype.selectionMode\n\t * @defaultvalue \"Single\"\n\t * @public\n\t */\n\t@property({\n\t\ttype: CalendarSelectionMode,\n\t\tdefaultValue: CalendarSelectionMode.Single,\n\t})\n\tselectionMode!: CalendarSelectionMode;\n\n\t/**\n\t * Defines the visibility of the week numbers column.\n\t * <br><br>\n\t *\n\t * <b>Note:</b> For calendars other than Gregorian,\n\t * the week numbers are not displayed regardless of what is set.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.Calendar.prototype.hideWeekNumbers\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\thideWeekNumbers!: boolean;\n\n\t/**\n\t * Which picker is currently visible to the user: day/month/year\n\t */\n\t@property({ defaultValue: \"day\" })\n\t_currentPicker!: string;\n\n\t@property({ type: Boolean })\n\t_previousButtonDisabled!: boolean;\n\n\t@property({ type: Boolean })\n\t_nextButtonDisabled!: boolean;\n\n\t@property()\n\t_headerMonthButtonText!: string;\n\n\t@property()\n\t_headerYearButtonText!: string;\n\n\t@property()\n\t_headerYearButtonTextSecType!: string;\n\n\t@property({ type: CalendarPickersMode, defaultValue: CalendarPickersMode.DAY_MONTH_YEAR, noAttribute: true })\n\t_pickersMode!: CalendarPickersMode;\n\n\t/**\n\t * Defines the selected date or dates (depending on the <code>selectionMode</code> property)\n\t * for this calendar as instances of <code>ui5-date</code>.\n\t *\n\t * @type {sap.ui.webc.main.ICalendarDate[]}\n\t * @name sap.ui.webc.main.Calendar.prototype.default\n\t * @slot dates\n\t * @public\n\t */\n\t@slot({ type: HTMLElement, invalidateOnChildChange: true, \"default\": true })\n\tdates!: Array<CalendarDateComponentT>;\n\n\t/**\n\t * @private\n\t */\n\tget _selectedDatesTimestamps(): Array<number> {\n\t\treturn this.dates.map(date => {\n\t\t\tconst value = date.value;\n\t\t\tconst validValue = value && !!this.getFormat().parse(value);\n\t\t\treturn validValue ? this._getTimeStampFromString(value)! / 1000 : undefined;\n\t\t}).filter((date): date is number => !!date);\n\t}\n\n\t/**\n\t * @private\n\t */\n\t_setSelectedDates(selectedDates: Array<number>) {\n\t\tconst selectedValues = selectedDates.map(timestamp => this.getFormat().format(new Date(timestamp * 1000), true)); // Format as UTC\n\t\tconst valuesInDOM = [...this.dates].map(dateElement => dateElement.value);\n\n\t\t// Remove all elements for dates that are no longer selected\n\t\tthis.dates.filter(dateElement => !selectedValues.includes(dateElement.value)).forEach(dateElement => {\n\t\t\tthis.removeChild(dateElement);\n\t\t});\n\n\t\t// Create tags for the selected dates that don't already exist in DOM\n\t\tselectedValues.filter(value => !valuesInDOM.includes(value)).forEach(value => {\n\t\t\tconst dateElement = document.createElement(CalendarDateComponent.default.getMetadata().getTag()) as CalendarDateComponentT;\n\t\t\tdateElement.value = value;\n\t\t\tthis.appendChild(dateElement);\n\t\t});\n\t}\n\n\t/**\n\t * Makes sure that _currentPicker is always set to a value, allowed by _pickersMode\n\t */\n\t_normalizeCurrentPicker() {\n\t\tif (this._currentPicker === \"day\" && this._pickersMode !== CalendarPickersMode.DAY_MONTH_YEAR) {\n\t\t\tthis._currentPicker = \"month\";\n\t\t}\n\n\t\tif (this._currentPicker === \"month\" && this._pickersMode === CalendarPickersMode.YEAR) {\n\t\t\tthis._currentPicker = \"year\";\n\t\t}\n\t}\n\n\tonBeforeRendering() {\n\t\tthis._normalizeCurrentPicker();\n\t}\n\n\tasync onAfterRendering() {\n\t\tawait renderFinished(); // Await for the current picker to render and then ask if it has previous/next pages\n\t\tthis._previousButtonDisabled = !this._currentPickerDOM._hasPreviousPage();\n\t\tthis._nextButtonDisabled = !this._currentPickerDOM._hasNextPage();\n\n\t\tconst yearFormat = DateFormat.getDateInstance({ format: \"y\", calendarType: this.primaryCalendarType });\n\t\tconst localeData = getCachedLocaleDataInstance(getLocale());\n\t\tthis._headerMonthButtonText = localeData.getMonthsStandAlone(\"wide\", this.primaryCalendarType)[this._calendarDate.getMonth()];\n\n\t\tif (this._currentPicker === \"year\") {\n\t\t\tconst rangeStart = new CalendarDate(this._calendarDate, this._primaryCalendarType);\n\t\t\tconst rangeEnd = new CalendarDate(this._calendarDate, this._primaryCalendarType);\n\t\t\trangeStart.setYear(this._currentPickerDOM._firstYear!);\n\t\t\trangeEnd.setYear(this._currentPickerDOM._lastYear!);\n\n\t\t\tthis._headerYearButtonText = `${yearFormat.format(rangeStart.toLocalJSDate(), true)} - ${yearFormat.format(rangeEnd.toLocalJSDate(), true)}`;\n\t\t} else {\n\t\t\tthis._headerYearButtonText = String(yearFormat.format(this._localDate, true));\n\t\t}\n\n\t\tthis.secondaryCalendarType && this._setSecondaryCalendarTypeButtonText();\n\t}\n\n\t/**\n\t * The user clicked the \"month\" button in the header\n\t */\n\tonHeaderShowMonthPress(e: CustomEvent) {\n\t\tthis._currentPickerDOM._autoFocus = false;\n\t\tthis._currentPicker = \"month\";\n\t\tthis.fireEvent(\"show-month-press\", e);\n\t}\n\n\t/**\n\t * The user clicked the \"year\" button in the header\n\t */\n\tonHeaderShowYearPress(e: CustomEvent) {\n\t\tthis._currentPickerDOM._autoFocus = false;\n\t\tthis._currentPicker = \"year\";\n\t\tthis.fireEvent(\"show-year-press\", e);\n\t}\n\n\tget _currentPickerDOM() {\n\t\t// Calendar's shadowRoot and all the pickers are always present - the \"!\" is safe to be used.\n\t\treturn this.shadowRoot!.querySelector(`[ui5-${this._currentPicker}picker]`)! as unknown as ICalendarPicker;\n\t}\n\n\t/**\n\t * The year clicked the \"Previous\" button in the header\n\t */\n\tonHeaderPreviousPress() {\n\t\tthis._currentPickerDOM._showPreviousPage();\n\t}\n\n\t/**\n\t * The year clicked the \"Next\" button in the header\n\t */\n\tonHeaderNextPress() {\n\t\tthis._currentPickerDOM._showNextPage();\n\t}\n\n\t_setSecondaryCalendarTypeButtonText() {\n\t\tconst yearFormatSecType = DateFormat.getDateInstance({ format: \"y\", calendarType: this.secondaryCalendarType });\n\n\t\tif (this._currentPicker === \"year\") {\n\t\t\tconst rangeStart = new CalendarDate(this._calendarDate, this._primaryCalendarType);\n\t\t\tconst rangeEnd = new CalendarDate(this._calendarDate, this._primaryCalendarType);\n\t\t\trangeStart.setYear(this._currentPickerDOM._firstYear!);\n\t\t\trangeEnd.setYear(this._currentPickerDOM._lastYear!);\n\n\t\t\tconst rangeStartSecType = transformDateToSecondaryType(this.primaryCalendarType, this.secondaryCalendarType, rangeStart.valueOf() / 1000, true)\n\t\t\t\t.firstDate;\n\t\t\tconst rangeEndSecType = transformDateToSecondaryType(this.primaryCalendarType, this.secondaryCalendarType, rangeEnd.valueOf() / 1000, true)\n\t\t\t\t.lastDate;\n\t\t\tthis._headerYearButtonTextSecType = `${yearFormatSecType.format(rangeStartSecType.toLocalJSDate(), true)} - ${yearFormatSecType.format(rangeEndSecType.toLocalJSDate(), true)}`;\n\t\t} else {\n\t\t\tthis._headerYearButtonTextSecType = String(yearFormatSecType.format(this._localDate, true));\n\t\t}\n\t}\n\n\tget secondaryCalendarTypeButtonText() {\n\t\tif (!this.secondaryCalendarType) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst localDate = new Date(this._timestamp * 1000);\n\t\tconst secondYearFormat = DateFormat.getDateInstance({ format: \"y\", calendarType: this.secondaryCalendarType });\n\t\tconst dateInSecType = transformDateToSecondaryType(this._primaryCalendarType, this.secondaryCalendarType, this._timestamp);\n\t\tconst secondMonthInfo = convertMonthNumbersToMonthNames(dateInSecType.firstDate.getMonth(), dateInSecType.lastDate.getMonth(), this.secondaryCalendarType);\n\t\tconst secondYearText = secondYearFormat.format(localDate, true);\n\n\t\treturn {\n\t\t\tyearButtonText: secondYearText,\n\t\t\tmonthButtonText: secondMonthInfo.text,\n\t\t\tmonthButtonInfo: secondMonthInfo.textInfo,\n\t\t};\n\t}\n\n\t/**\n\t * The month button is hidden when the month picker or year picker is shown\n\t * @returns {boolean}\n\t * @private\n\t */\n\tget _isHeaderMonthButtonHidden() {\n\t\treturn this._currentPicker === \"month\" || this._currentPicker === \"year\";\n\t}\n\n\tget _isDayPickerHidden() {\n\t\treturn this._currentPicker !== \"day\";\n\t}\n\n\tget _isMonthPickerHidden() {\n\t\treturn this._currentPicker !== \"month\";\n\t}\n\n\tget _isYearPickerHidden() {\n\t\treturn this._currentPicker !== \"year\";\n\t}\n\n\t_fireEventAndUpdateSelectedDates(selectedDates: Array<number>) {\n\t\tconst datesValues = selectedDates.map(timestamp => {\n\t\t\tconst calendarDate = CalendarDate.fromTimestamp(timestamp * 1000, this._primaryCalendarType);\n\t\t\treturn this.getFormat().format(calendarDate.toUTCJSDate(), true);\n\t\t});\n\n\t\tconst defaultPrevented = !this.fireEvent<CalendarChangeEventDetail>(\"selected-dates-change\", { timestamp: this.timestamp, dates: [...selectedDates], values: datesValues }, true);\n\t\tif (!defaultPrevented) {\n\t\t\tthis._setSelectedDates(selectedDates);\n\t\t}\n\t}\n\n\tonSelectedDatesChange(e: CustomEvent<DayPickerChangeEventDetail>) {\n\t\tthis.timestamp = e.detail.timestamp;\n\t\tthis._fireEventAndUpdateSelectedDates(e.detail.dates);\n\t}\n\n\tonSelectedMonthChange(e: CustomEvent<MonthPickerChangeEventDetail>) {\n\t\tthis.timestamp = e.detail.timestamp;\n\n\t\tif (this._pickersMode === CalendarPickersMode.DAY_MONTH_YEAR) {\n\t\t\tthis._currentPicker = \"day\";\n\t\t} else {\n\t\t\tthis._fireEventAndUpdateSelectedDates([this.timestamp]);\n\t\t}\n\n\t\tthis._currentPickerDOM._autoFocus = true;\n\t}\n\n\tonSelectedYearChange(e: CustomEvent<YearPickerChangeEventDetail>) {\n\t\tthis.timestamp = e.detail.timestamp;\n\n\t\tif (this._pickersMode === CalendarPickersMode.DAY_MONTH_YEAR) {\n\t\t\tthis._currentPicker = \"day\";\n\t\t} else if (this._pickersMode === CalendarPickersMode.MONTH_YEAR) {\n\t\t\tthis._currentPicker = \"month\";\n\t\t} else {\n\t\t\tthis._fireEventAndUpdateSelectedDates([this.timestamp]);\n\t\t}\n\n\t\tthis._currentPickerDOM._autoFocus = true;\n\t}\n\n\tonNavigate(e: CustomEvent) {\n\t\tthis.timestamp = e.detail.timestamp;\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (isF4(e) && this._currentPicker !== \"month\") {\n\t\t\tthis._currentPicker = \"month\";\n\t\t}\n\n\t\tif (isF4Shift(e) && this._currentPicker !== \"year\") {\n\t\t\tthis._currentPicker = \"year\";\n\t\t}\n\t}\n\n\t/**\n\t * Returns an array of UTC timestamps, representing the selected dates.\n\t * @protected\n\t * @deprecated\n\t */\n\tget selectedDates(): Array<number> {\n\t\treturn this._selectedDatesTimestamps;\n\t}\n\n\t/**\n\t * Creates instances of <code>ui5-date</code> inside this <code>ui5-calendar</code> with values, equal to the provided UTC timestamps\n\t * @protected\n\t * @deprecated\n\t * @param { Array<number> } selectedDates Array of UTC timestamps\n\t */\n\tset selectedDates(selectedDates: Array<number>) {\n\t\tthis._setSelectedDates(selectedDates);\n\t}\n}\n\nCalendar.define();\n\nexport default Calendar;\nexport type {\n\tICalendarPicker,\n\tCalendarChangeEventDetail,\n};\n"]}
|
|
@@ -62,24 +62,16 @@ let DateComponentBase = DateComponentBase_1 = class DateComponentBase extends UI
|
|
|
62
62
|
return this._formatPattern !== "medium" && this._formatPattern !== "short" && this._formatPattern !== "long";
|
|
63
63
|
}
|
|
64
64
|
_getMinMaxCalendarDateFromString(date) {
|
|
65
|
-
|
|
66
|
-
// but has logic related to "undefined" value, so we're calling it with "undefined" and casting to "boolean".
|
|
67
|
-
const utc = undefined;
|
|
68
|
-
const strict = undefined;
|
|
69
|
-
if (this.getFormat().parse(date, utc, strict)) {
|
|
65
|
+
if (this.getFormat().parse(date)) {
|
|
70
66
|
return this._getCalendarDateFromString(date);
|
|
71
67
|
}
|
|
72
|
-
const jsDate = this.getISOFormat().parse(date
|
|
68
|
+
const jsDate = this.getISOFormat().parse(date);
|
|
73
69
|
if (jsDate) {
|
|
74
70
|
return CalendarDate.fromLocalJSDate(jsDate, this._primaryCalendarType);
|
|
75
71
|
}
|
|
76
72
|
}
|
|
77
73
|
_getCalendarDateFromString(value) {
|
|
78
|
-
|
|
79
|
-
// but has logic related to "undefined" value, so we're calling it with "undefined" and casting to "boolean".
|
|
80
|
-
const utc = undefined;
|
|
81
|
-
const strict = undefined;
|
|
82
|
-
const jsDate = this.getFormat().parse(value, utc, strict);
|
|
74
|
+
const jsDate = this.getFormat().parse(value);
|
|
83
75
|
if (jsDate) {
|
|
84
76
|
return CalendarDate.fromLocalJSDate(jsDate, this._primaryCalendarType);
|
|
85
77
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateComponentBase.js","sourceRoot":"","sources":["../src/DateComponentBase.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,6DAA6D,CAAC;AACxF,OAAO,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAE3E,OAAO,EAAE,eAAe,EAAE,MAAM,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EAAE;wDACY;AAcvB;IADC,QAAQ,EAAE;kDACM;AAcjB;IADC,QAAQ,EAAE;kDACM;AA5DZ,iBAAiB;IAJtB,aAAa,CAAC;QACd,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,SAAS;KACnB,CAAC;GACI,iBAAiB,CAoLtB;AAED,eAAe,iBAAiB,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.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 { fetchCldr } from \"@ui5/webcomponents-base/dist/asset-registries/LocaleData.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { getCalendarType } from \"@ui5/webcomponents-base/dist/config/CalendarType.js\";\nimport DateFormat from \"@ui5/webcomponents-localization/dist/DateFormat.js\";\nimport getCachedLocaleDataInstance from \"@ui5/webcomponents-localization/dist/getCachedLocaleDataInstance.js\";\nimport CalendarType from \"@ui5/webcomponents-base/dist/types/CalendarType.js\";\nimport getLocale from \"@ui5/webcomponents-base/dist/locale/getLocale.js\";\nimport CalendarDate from \"@ui5/webcomponents-localization/dist/dates/CalendarDate.js\";\nimport { getMaxCalendarDate, getMinCalendarDate } from \"@ui5/webcomponents-localization/dist/dates/ExtremeDates.js\";\n\n/**\n * @class\n *\n * Abstract class that provides common functionality for date-related components (day picker, month picker, year picker, calendar, date picker, date range picker, date time picker)\n * This includes:\n * - \"languageAware: true\" metadata setting, CLDR fetch and i18n initialization\n * - common properties (primaryCalendar, minDate, maxDate and formatPattern) declaration and methods that operate on them\n * - additional common methods\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.DateComponentBase\n * @extends sap.ui.webc.base.UI5Element\n * @public\n */\n@customElement({\n\tlanguageAware: true,\n\trenderer: litRender,\n})\nclass DateComponentBase extends UI5Element {\n\t/**\n\t * Sets a calendar type used for display.\n\t * If not set, the calendar type of the global configuration is used.\n\t * @type {sap.ui.webc.base.types.CalendarType}\n\t * @name sap.ui.webc.main.DateComponentBase.prototype.primaryCalendarType\n\t * @public\n\t */\n\t@property({ type: CalendarType })\n\tprimaryCalendarType?: CalendarType;\n\n\t/**\n\t * Defines the secondary calendar type.\n\t * If not set, the calendar will only show the primary calendar type.\n\t * @type {sap.ui.webc.base.types.CalendarType}\n\t * @name sap.ui.webc.main.DateComponentBase.prototype.secondaryCalendarType\n\t * @since 1.0.0-rc.16\n\t * @defaultvalue undefined\n\t * @public\n\t */\n\t@property({ type: CalendarType })\n\tsecondaryCalendarType?: CalendarType;\n\n\t/**\n\t * Determines the format, displayed in the input field.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.DateComponentBase.prototype.formatPattern\n\t * @defaultvalue \"\"\n\t * @public\n\t */\n\t@property()\n\tformatPattern!: string;\n\n\t/**\n\t * Determines the minimum date available for selection.\n\t *\n\t * <b>Note:</b> If the formatPattern property is not set, the minDate value must be provided in the ISO date format (YYYY-MM-dd).\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.DateComponentBase.prototype.minDate\n\t * @defaultvalue \"\"\n\t * @since 1.0.0-rc.6\n\t * @public\n\t */\n\t@property()\n\tminDate!: string;\n\n\t/**\n\t * Determines the maximum date available for selection.\n\t *\n\t * <b>Note:</b> If the formatPattern property is not set, the maxDate value must be provided in the ISO date format (YYYY-MM-dd).\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.DateComponentBase.prototype.maxDate\n\t * @defaultvalue \"\"\n\t * @since 1.0.0-rc.6\n\t * @public\n\t */\n\t@property()\n\tmaxDate!: string;\n\n\tstatic i18nBundle?: I18nBundle;\n\n\t/**\n\t * Cached instance of DateFormat with a format pattern of \"YYYY-MM-dd\".\n\t * Used by the getISOFormat method to avoid creating a new DateFormat instance on each call.\n\t *\n\t * @type {DateFormat}\n\t * @private\n\t */\n\t_isoFormatInstance?: DateFormat;\n\n\tconstructor() {\n\t\tsuper();\n\t}\n\n\tget _primaryCalendarType() {\n\t\tconst localeData = getCachedLocaleDataInstance(getLocale());\n\t\treturn this.primaryCalendarType || getCalendarType() || localeData.getPreferredCalendarType();\n\t}\n\n\tget _minDate() {\n\t\tlet minDate;\n\n\t\tif (this.minDate) {\n\t\t\tminDate = this._getMinMaxCalendarDateFromString(this.minDate);\n\t\t}\n\n\t\treturn minDate || getMinCalendarDate(this._primaryCalendarType);\n\t}\n\n\tget _maxDate() {\n\t\tlet maxDate;\n\n\t\tif (this.maxDate) {\n\t\t\tmaxDate = this._getMinMaxCalendarDateFromString(this.maxDate)!;\n\t\t}\n\n\t\treturn maxDate || getMaxCalendarDate(this._primaryCalendarType);\n\t}\n\n\tget _formatPattern() {\n\t\treturn this.formatPattern || \"medium\"; // get from config\n\t}\n\n\tget _isPattern() {\n\t\treturn this._formatPattern !== \"medium\" && this._formatPattern !== \"short\" && this._formatPattern !== \"long\";\n\t}\n\n\t_getMinMaxCalendarDateFromString(date: string) {\n\t\t// <b>Note:</b> Format#parse accepts only boolean type for 2nd and 3rd params,\n\t\t// but has logic related to \"undefined\" value, so we're calling it with \"undefined\" and casting to \"boolean\".\n\t\tconst utc = undefined as unknown as boolean;\n\t\tconst strict = undefined as unknown as boolean;\n\n\t\tif (this.getFormat().parse(date, utc, strict)) {\n\t\t\treturn this._getCalendarDateFromString(date);\n\t\t}\n\n\t\tconst jsDate = this.getISOFormat().parse(date, utc, strict) as Date;\n\t\tif (jsDate) {\n\t\t\treturn CalendarDate.fromLocalJSDate(jsDate, this._primaryCalendarType);\n\t\t}\n\t}\n\n\t_getCalendarDateFromString(value: string) {\n\t\t// <b>Note:</b> Format#parse accepts only boolean type for 2nd and 3rd params,\n\t\t// but has logic related to \"undefined\" value, so we're calling it with \"undefined\" and casting to \"boolean\".\n\t\tconst utc = undefined as unknown as boolean;\n\t\tconst strict = undefined as unknown as boolean;\n\t\tconst jsDate = this.getFormat().parse(value, utc, strict) as Date;\n\t\tif (jsDate) {\n\t\t\treturn CalendarDate.fromLocalJSDate(jsDate, this._primaryCalendarType);\n\t\t}\n\t}\n\n\t_getTimeStampFromString(value: string) {\n\t\tconst calDate = this._getCalendarDateFromString(value);\n\t\tif (calDate) {\n\t\t\treturn calDate.toUTCJSDate().valueOf();\n\t\t}\n\t}\n\n\t_getStringFromTimestamp(timestamp: number) {\n\t\tconst localDate = new Date(timestamp);\n\t\treturn this.getFormat().format(localDate, true);\n\t}\n\n\tgetFormat() {\n\t\treturn this._isPattern\n\t\t\t? DateFormat.getDateInstance({\n\t\t\t\tstrictParsing: true,\n\t\t\t\tpattern: this._formatPattern,\n\t\t\t\tcalendarType: this._primaryCalendarType,\n\t\t\t})\n\t\t\t: DateFormat.getDateInstance({\n\t\t\t\tstrictParsing: true,\n\t\t\t\tstyle: this._formatPattern,\n\t\t\t\tcalendarType: this._primaryCalendarType,\n\t\t\t});\n\t}\n\n\tgetISOFormat() {\n\t\tif (!this._isoFormatInstance) {\n\t\t\tthis._isoFormatInstance = DateFormat.getDateInstance({\n\t\t\t\tstrictParsing: true,\n\t\t\t\tpattern: \"YYYY-MM-dd\",\n\t\t\t\tcalendarType: this._primaryCalendarType,\n\t\t\t});\n\t\t}\n\t\treturn this._isoFormatInstance;\n\t}\n\n\tstatic async onDefine() {\n\t\t[DateComponentBase.i18nBundle] = await Promise.all([\n\t\t\tgetI18nBundle(\"@ui5/webcomponents\"),\n\t\t\tfetchCldr(getLocale().getLanguage(), getLocale().getRegion(), getLocale().getScript()),\n\t\t]);\n\t}\n}\n\nexport default DateComponentBase;\n"]}
|
|
1
|
+
{"version":3,"file":"DateComponentBase.js","sourceRoot":"","sources":["../src/DateComponentBase.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,SAAS,MAAM,sDAAsD,CAAC;AAC7E,OAAO,a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AAiB;IAJtB,aAAa,CAAC;QACd,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,SAAS;KACnB,CAAC;GACI,iBAAiB,CA2KtB;AAED,eAAe,iBAAiB,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.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 { fetchCldr } from \"@ui5/webcomponents-base/dist/asset-registries/LocaleData.js\";\nimport { getI18nBundle } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { getCalendarType } from \"@ui5/webcomponents-base/dist/config/CalendarType.js\";\nimport DateFormat from \"@ui5/webcomponents-localization/dist/DateFormat.js\";\nimport getCachedLocaleDataInstance from \"@ui5/webcomponents-localization/dist/getCachedLocaleDataInstance.js\";\nimport CalendarType from \"@ui5/webcomponents-base/dist/types/CalendarType.js\";\nimport getLocale from \"@ui5/webcomponents-base/dist/locale/getLocale.js\";\nimport CalendarDate from \"@ui5/webcomponents-localization/dist/dates/CalendarDate.js\";\nimport { getMaxCalendarDate, getMinCalendarDate } from \"@ui5/webcomponents-localization/dist/dates/ExtremeDates.js\";\n\n/**\n * @class\n *\n * Abstract class that provides common functionality for date-related components (day picker, month picker, year picker, calendar, date picker, date range picker, date time picker)\n * This includes:\n * - \"languageAware: true\" metadata setting, CLDR fetch and i18n initialization\n * - common properties (primaryCalendar, minDate, maxDate and formatPattern) declaration and methods that operate on them\n * - additional common methods\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.DateComponentBase\n * @extends sap.ui.webc.base.UI5Element\n * @public\n */\n@customElement({\n\tlanguageAware: true,\n\trenderer: litRender,\n})\nclass DateComponentBase extends UI5Element {\n\t/**\n\t * Sets a calendar type used for display.\n\t * If not set, the calendar type of the global configuration is used.\n\t * @type {sap.ui.webc.base.types.CalendarType}\n\t * @name sap.ui.webc.main.DateComponentBase.prototype.primaryCalendarType\n\t * @public\n\t */\n\t@property({ type: CalendarType })\n\tprimaryCalendarType?: CalendarType;\n\n\t/**\n\t * Defines the secondary calendar type.\n\t * If not set, the calendar will only show the primary calendar type.\n\t * @type {sap.ui.webc.base.types.CalendarType}\n\t * @name sap.ui.webc.main.DateComponentBase.prototype.secondaryCalendarType\n\t * @since 1.0.0-rc.16\n\t * @defaultvalue undefined\n\t * @public\n\t */\n\t@property({ type: CalendarType })\n\tsecondaryCalendarType?: CalendarType;\n\n\t/**\n\t * Determines the format, displayed in the input field.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.DateComponentBase.prototype.formatPattern\n\t * @defaultvalue \"\"\n\t * @public\n\t */\n\t@property()\n\tformatPattern!: string;\n\n\t/**\n\t * Determines the minimum date available for selection.\n\t *\n\t * <b>Note:</b> If the formatPattern property is not set, the minDate value must be provided in the ISO date format (YYYY-MM-dd).\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.DateComponentBase.prototype.minDate\n\t * @defaultvalue \"\"\n\t * @since 1.0.0-rc.6\n\t * @public\n\t */\n\t@property()\n\tminDate!: string;\n\n\t/**\n\t * Determines the maximum date available for selection.\n\t *\n\t * <b>Note:</b> If the formatPattern property is not set, the maxDate value must be provided in the ISO date format (YYYY-MM-dd).\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.DateComponentBase.prototype.maxDate\n\t * @defaultvalue \"\"\n\t * @since 1.0.0-rc.6\n\t * @public\n\t */\n\t@property()\n\tmaxDate!: string;\n\n\tstatic i18nBundle?: I18nBundle;\n\n\t/**\n\t * Cached instance of DateFormat with a format pattern of \"YYYY-MM-dd\".\n\t * Used by the getISOFormat method to avoid creating a new DateFormat instance on each call.\n\t *\n\t * @type {DateFormat}\n\t * @private\n\t */\n\t_isoFormatInstance?: DateFormat;\n\n\tconstructor() {\n\t\tsuper();\n\t}\n\n\tget _primaryCalendarType() {\n\t\tconst localeData = getCachedLocaleDataInstance(getLocale());\n\t\treturn this.primaryCalendarType || getCalendarType() || localeData.getPreferredCalendarType();\n\t}\n\n\tget _minDate() {\n\t\tlet minDate;\n\n\t\tif (this.minDate) {\n\t\t\tminDate = this._getMinMaxCalendarDateFromString(this.minDate);\n\t\t}\n\n\t\treturn minDate || getMinCalendarDate(this._primaryCalendarType);\n\t}\n\n\tget _maxDate() {\n\t\tlet maxDate;\n\n\t\tif (this.maxDate) {\n\t\t\tmaxDate = this._getMinMaxCalendarDateFromString(this.maxDate)!;\n\t\t}\n\n\t\treturn maxDate || getMaxCalendarDate(this._primaryCalendarType);\n\t}\n\n\tget _formatPattern() {\n\t\treturn this.formatPattern || \"medium\"; // get from config\n\t}\n\n\tget _isPattern() {\n\t\treturn this._formatPattern !== \"medium\" && this._formatPattern !== \"short\" && this._formatPattern !== \"long\";\n\t}\n\n\t_getMinMaxCalendarDateFromString(date: string) {\n\t\tif (this.getFormat().parse(date)) {\n\t\t\treturn this._getCalendarDateFromString(date);\n\t\t}\n\n\t\tconst jsDate = this.getISOFormat().parse(date) as Date;\n\t\tif (jsDate) {\n\t\t\treturn CalendarDate.fromLocalJSDate(jsDate, this._primaryCalendarType);\n\t\t}\n\t}\n\n\t_getCalendarDateFromString(value: string) {\n\t\tconst jsDate = this.getFormat().parse(value) as Date;\n\t\tif (jsDate) {\n\t\t\treturn CalendarDate.fromLocalJSDate(jsDate, this._primaryCalendarType);\n\t\t}\n\t}\n\n\t_getTimeStampFromString(value: string) {\n\t\tconst calDate = this._getCalendarDateFromString(value);\n\t\tif (calDate) {\n\t\t\treturn calDate.toUTCJSDate().valueOf();\n\t\t}\n\t}\n\n\t_getStringFromTimestamp(timestamp: number) {\n\t\tconst localDate = new Date(timestamp);\n\t\treturn this.getFormat().format(localDate, true);\n\t}\n\n\tgetFormat() {\n\t\treturn this._isPattern\n\t\t\t? DateFormat.getDateInstance({\n\t\t\t\tstrictParsing: true,\n\t\t\t\tpattern: this._formatPattern,\n\t\t\t\tcalendarType: this._primaryCalendarType,\n\t\t\t})\n\t\t\t: DateFormat.getDateInstance({\n\t\t\t\tstrictParsing: true,\n\t\t\t\tstyle: this._formatPattern,\n\t\t\t\tcalendarType: this._primaryCalendarType,\n\t\t\t});\n\t}\n\n\tgetISOFormat() {\n\t\tif (!this._isoFormatInstance) {\n\t\t\tthis._isoFormatInstance = DateFormat.getDateInstance({\n\t\t\t\tstrictParsing: true,\n\t\t\t\tpattern: \"YYYY-MM-dd\",\n\t\t\t\tcalendarType: this._primaryCalendarType,\n\t\t\t});\n\t\t}\n\t\treturn this._isoFormatInstance;\n\t}\n\n\tstatic async onDefine() {\n\t\t[DateComponentBase.i18nBundle] = await Promise.all([\n\t\t\tgetI18nBundle(\"@ui5/webcomponents\"),\n\t\t\tfetchCldr(getLocale().getLanguage(), getLocale().getRegion(), getLocale().getScript()),\n\t\t]);\n\t}\n}\n\nexport default DateComponentBase;\n"]}
|
package/dist/DatePicker.js
CHANGED
|
@@ -342,9 +342,7 @@ let DatePicker = DatePicker_1 = class DatePicker extends DateComponentBase {
|
|
|
342
342
|
if (value === "") {
|
|
343
343
|
return true;
|
|
344
344
|
}
|
|
345
|
-
|
|
346
|
-
// but has logic related to "undefined" value, so we're calling it with "undefined" and casting to "boolean".
|
|
347
|
-
return !!this.getFormat().parse(value, undefined, undefined);
|
|
345
|
+
return !!this.getFormat().parse(value);
|
|
348
346
|
}
|
|
349
347
|
/**
|
|
350
348
|
* Checks if a date is between the minimum and maximum date.
|
|
@@ -372,7 +370,7 @@ let DatePicker = DatePicker_1 = class DatePicker extends DateComponentBase {
|
|
|
372
370
|
if (value === "") {
|
|
373
371
|
return value;
|
|
374
372
|
}
|
|
375
|
-
return this.getFormat().format(this.getFormat().parse(value, true
|
|
373
|
+
return this.getFormat().format(this.getFormat().parse(value, true), true); // it is important to both parse and format the date as UTC
|
|
376
374
|
}
|
|
377
375
|
get _displayFormat() {
|
|
378
376
|
// @ts-ignore oFormatOptions is a private API of DateFormat
|
|
@@ -533,14 +531,10 @@ let DatePicker = DatePicker_1 = class DatePicker extends DateComponentBase {
|
|
|
533
531
|
* @type { Date }
|
|
534
532
|
*/
|
|
535
533
|
get dateValue() {
|
|
536
|
-
|
|
537
|
-
const strict = undefined;
|
|
538
|
-
return this.liveValue ? this.getFormat().parse(this.liveValue, utc, strict) : this.getFormat().parse(this.value, utc, strict);
|
|
534
|
+
return this.liveValue ? this.getFormat().parse(this.liveValue) : this.getFormat().parse(this.value);
|
|
539
535
|
}
|
|
540
536
|
get dateValueUTC() {
|
|
541
|
-
|
|
542
|
-
const strict = undefined;
|
|
543
|
-
return this.liveValue ? this.getFormat().parse(this.liveValue, true, strict) : this.getFormat().parse(this.value, utc, strict);
|
|
537
|
+
return this.liveValue ? this.getFormat().parse(this.liveValue, true) : this.getFormat().parse(this.value);
|
|
544
538
|
}
|
|
545
539
|
get styles() {
|
|
546
540
|
return {
|
package/dist/DatePicker.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.js","sourceRoot":"","sources":["../src/DatePicker.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,KAAK,MAAM,kDAAkD,CAAC;AAErE,OAAO,EAAE,UAAU,EAAE,MAAM,kDAAkD,CAAC;AAE9E,OAAO,YAAY,MAAM,4DAA4D,CAAC;AACtF,OAAO,YAAY,MAAM,4DAA4D,CAAC;AACtF,OAAO,mBAAmB,MAAM,mEAAmE,CAAC;AACpG,OAAO,oBAAoB,MAAM,oEAAoE,CAAC;AACtG,OAAO,UAAU,MAAM,kDAAkD,CAAC;AAC1E,OAAO,EAAE,yBAAyB,EAAE,MAAM,sDAAsD,CAAC;AACjG,OAAO,EACN,QAAQ,EACR,UAAU,E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;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;+CACK;AApL5B,UAAU;IAzDf,aAAa,CAAC;QACd,GAAG,EAAE,iBAAiB;QACtB,aAAa,EAAE,IAAI;QACnB,QAAQ,EAAE,kBAAkB;QAC5B,kBAAkB,EAAE,yBAAyB;QAC7C,MAAM,EAAE,aAAa;QACrB,gBAAgB,EAAE;YACjB,0BAA0B;YAC1B,oBAAoB;SACpB;QACD,YAAY,EAAE;YACb,IAAI;YACJ,iBAAiB;YACjB,QAAQ;YACR,qBAAqB;YACrB,KAAK;YACL,MAAM;SACN;KACD,CAAC;IACF;;;;;;;;MAQE;;IACD,KAAK,CAAC,QAAQ,EAAE;QAChB,MAAM,EAAE;YACP,KAAK,EAAE;gBACN,IAAI,EAAE,MAAM;aACZ;YACD,KAAK,EAAE;gBACN,IAAI,EAAE,OAAO;aACb;SACD;KACD,CAAC;IACF;;;;;;;;MAQE;;IACD,KAAK,CAAC,OAAO,EAAE;QACf,MAAM,EAAE;YACP,KAAK,EAAE;gBACN,IAAI,EAAE,MAAM;aACZ;YACD,KAAK,EAAE;gBACN,IAAI,EAAE,OAAO;aACb;SACD;KACD,CAAC;GACI,UAAU,CAgqBf;AAED,UAAU,CAAC,MAAM,EAAE,CAAC;AAEpB,eAAe,UAAU,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { getFeature } from \"@ui5/webcomponents-base/dist/FeaturesRegistry.js\";\nimport DateFormat from \"@ui5/webcomponents-localization/dist/DateFormat.js\";\nimport CalendarDate from \"@ui5/webcomponents-localization/dist/dates/CalendarDate.js\";\nimport modifyDateBy from \"@ui5/webcomponents-localization/dist/dates/modifyDateBy.js\";\nimport getRoundedTimestamp from \"@ui5/webcomponents-localization/dist/dates/getRoundedTimestamp.js\";\nimport getTodayUTCTimestamp from \"@ui5/webcomponents-localization/dist/dates/getTodayUTCTimestamp.js\";\nimport ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AriaLabelHelper.js\";\nimport {\n\tisPageUp,\n\tisPageDown,\n\tisPageUpShift,\n\tisPageDownShift,\n\tisPageUpShiftCtrl,\n\tisPageDownShiftCtrl,\n\tisShow,\n\tisF4,\n\tisEnter,\n\tisTabNext,\n\tisTabPrevious,\n\tisF6Next,\n\tisF6Previous,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { isPhone, isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport CalendarPickersMode from \"./types/CalendarPickersMode.js\";\nimport type FormSupportT from \"./features/InputElementsFormSupport.js\";\nimport type { IFormElement } from \"./features/InputElementsFormSupport.js\";\nimport \"@ui5/webcomponents-icons/dist/appointment-2.js\";\nimport \"@ui5/webcomponents-icons/dist/decline.js\";\nimport HasPopup from \"./types/HasPopup.js\";\nimport { DATEPICKER_OPEN_ICON_TITLE, DATEPICKER_DATE_DESCRIPTION, INPUT_SUGGESTIONS_TITLE } from \"./generated/i18n/i18n-defaults.js\";\nimport DateComponentBase from \"./DateComponentBase.js\";\nimport Icon from \"./Icon.js\";\nimport Button from \"./Button.js\";\nimport ResponsivePopover from \"./ResponsivePopover.js\";\nimport Calendar from \"./Calendar.js\";\nimport type { CalendarChangeEventDetail } from \"./Calendar.js\";\nimport CalendarDateComponent from \"./CalendarDate.js\";\nimport Input from \"./Input.js\";\nimport InputType from \"./types/InputType.js\";\nimport DatePickerTemplate from \"./generated/templates/DatePickerTemplate.lit.js\";\nimport DatePickerPopoverTemplate from \"./generated/templates/DatePickerPopoverTemplate.lit.js\";\n\n// default calendar for bundling\nimport \"@ui5/webcomponents-localization/dist/features/calendar/Gregorian.js\";\n\n// Styles\nimport datePickerCss from \"./generated/themes/DatePicker.css.js\";\nimport datePickerPopoverCss from \"./generated/themes/DatePickerPopover.css.js\";\nimport ResponsivePopoverCommonCss from \"./generated/themes/ResponsivePopoverCommon.css.js\";\n\ntype DatePickerChangeEventDetail = {\n\tdates: Array<number>;\n\tvalues: Array<string>\n};\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n * The <code>ui5-date-picker</code> component provides an input field with assigned calendar which opens on user action.\n * The <code>ui5-date-picker</code> allows users to select a localized date using touch,\n * mouse, or keyboard input. It consists of two parts: the date input field and the\n * date picker.\n *\n * <h3>Usage</h3>\n *\n * The user can enter a date by:\n * <ul>\n * <li>Using the calendar that opens in a popup</li>\n * <li>Typing it in directly in the input field</li>\n * </ul>\n * <br><br>\n * When the user makes an entry and presses the enter key, the calendar shows the corresponding date.\n * When the user directly triggers the calendar display, the actual date is displayed.\n *\n * <h3>Formatting</h3>\n *\n * If a date is entered by typing it into\n * the input field, it must fit to the used date format.\n * <br><br>\n * Supported format options are pattern-based on Unicode LDML Date Format notation.\n * For more information, see <ui5-link target=\"_blank\" href=\"http://unicode.org/reports/tr35/#Date_Field_Symbol_Table\">UTS #35: Unicode Locale Data Markup Language</ui5-link>.\n * <br><br>\n * For example, if the <code>format-pattern</code> is \"yyyy-MM-dd\",\n * a valid value string is \"2015-07-30\" and the same is displayed in the input.\n *\n * <h3>Keyboard Handling</h3>\n * The <code>ui5-date-picker</code> provides advanced keyboard handling.\n * If the <code>ui5-date-picker</code> is focused,\n * you can open or close the drop-down by pressing <code>F4</code>, <code>ALT+UP</code> or <code>ALT+DOWN</code> keys.\n * Once the drop-down is opened, you can use the <code>UP</code>, <code>DOWN</code>, <code>LEFT</code>, <code>RIGHT</code> arrow keys\n * to navigate through the dates and select one by pressing the <code>Space</code> or <code>Enter</code> keys. Moreover you can\n * use TAB to reach the buttons for changing month and year.\n * <br>\n *\n * If the <code>ui5-date-picker</code> input field is focused and its corresponding picker dialog is not opened,\n * then users can increment or decrement the date referenced by <code>dateValue</code> property\n * by using the following shortcuts:\n * <br>\n * <ul>\n * <li>[PAGEDOWN] - Decrements the corresponding day of the month by one</li>\n * <li>[SHIFT] + [PAGEDOWN] - Decrements the corresponding month by one</li>\n * <li>[SHIFT] + [CTRL] + [PAGEDOWN] - Decrements the corresponding year by one</li>\n * <li>[PAGEUP] - Increments the corresponding day of the month by one</li>\n * <li>[SHIFT] + [PAGEUP] - Increments the corresponding month by one</li>\n * <li>[SHIFT] + [CTRL] + [PAGEUP] - Increments the corresponding year by one</li>\n * </ul>\n *\n * <h3>Calendar types</h3>\n * The component supports several calendar types - Gregorian, Buddhist, Islamic, Japanese and Persian.\n * By default the Gregorian Calendar is used. In order to use the Buddhist, Islamic, Japanese or Persian calendar,\n * you need to set the <code>primaryCalendarType</code> property and import one or more of the following modules:\n * <br><br>\n *\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Buddhist.js\";</code>\n * <br>\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Islamic.js\";</code>\n * <br>\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Japanese.js\";</code>\n * <br>\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Persian.js\";</code>\n * <br><br>\n *\n * Or, you can use the global configuration and set the <code>calendarType</code> key:\n * <br>\n * <pre><code><script data-id=\"sap-ui-config\" type=\"application/json\">\n * {\n *\t\"calendarType\": \"Japanese\"\n * }\n * </script></code></pre>\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/DatePicker\";</code>\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.DatePicker\n * @extends sap.ui.webc.main.DateComponentBase\n * @tagname ui5-date-picker\n * @public\n */\n\n@customElement({\n\ttag: \"ui5-date-picker\",\n\tlanguageAware: true,\n\ttemplate: DatePickerTemplate,\n\tstaticAreaTemplate: DatePickerPopoverTemplate,\n\tstyles: datePickerCss,\n\tstaticAreaStyles: [\n\t\tResponsivePopoverCommonCss,\n\t\tdatePickerPopoverCss,\n\t],\n\tdependencies: [\n\t\tIcon,\n\t\tResponsivePopover,\n\t\tCalendar,\n\t\tCalendarDateComponent,\n\t\tInput,\n\t\tButton,\n\t],\n})\n/**\n * Fired when the input operation has finished by pressing Enter or on focusout.\n *\n * @event sap.ui.webc.main.DatePicker#change\n * @allowPreventDefault\n * @public\n * @param {string} value The submitted value.\n * @param {boolean} valid Indicator if the value is in correct format pattern and in valid range.\n*/\n@event(\"change\", {\n\tdetail: {\n\t\tvalue: {\n\t\t\ttype: String,\n\t\t},\n\t\tvalid: {\n\t\t\ttype: Boolean,\n\t\t},\n\t},\n})\n/**\n * Fired when the value of the component is changed at each key stroke.\n *\n * @event sap.ui.webc.main.DatePicker#input\n * @allowPreventDefault\n * @public\n * @param {string} value The submitted value.\n * @param {boolean} valid Indicator if the value is in correct format pattern and in valid range.\n*/\n@event(\"input\", {\n\tdetail: {\n\t\tvalue: {\n\t\t\ttype: String,\n\t\t},\n\t\tvalid: {\n\t\t\ttype: Boolean,\n\t\t},\n\t},\n})\nclass DatePicker extends DateComponentBase implements IFormElement {\n\t/**\n\t * Defines a formatted date value.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.DatePicker.prototype.value\n\t * @defaultvalue \"\"\n\t * @formEvents change input\n\t * @formProperty\n\t * @public\n\t */\n\t@property()\n\tvalue!: string\n\n\t/**\n\t * Defines the value state of the component.\n\t * <br><br>\n\t * Available options are:\n\t * <ul>\n\t * <li><code>None</code></li>\n\t * <li><code>Error</code></li>\n\t * <li><code>Warning</code></li>\n\t * <li><code>Success</code></li>\n\t * <li><code>Information</code></li>\n\t * </ul>\n\t *\n\t * @type {sap.ui.webc.base.types.ValueState}\n\t * @name sap.ui.webc.main.DatePicker.prototype.valueState\n\t * @defaultvalue \"None\"\n\t * @public\n\t */\n\t@property({ type: ValueState, defaultValue: ValueState.None })\n\tvalueState!: ValueState;\n\n\t/**\n\t * Defines whether the component is required.\n\t *\n\t * @since 1.0.0-rc.9\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.DatePicker.prototype.required\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\trequired!: boolean;\n\n\t/**\n\t * Determines whether the component is displayed as disabled.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.DatePicker.prototype.disabled\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled!: boolean;\n\n\t/**\n\t * Determines whether the component is displayed as read-only.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.DatePicker.prototype.readonly\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\treadonly!: boolean;\n\n\t/**\n\t * Defines a short hint, intended to aid the user with data entry when the\n\t * component has no value.\n\t *\n\t * <br><br>\n\t * <b>Note:</b> When no placeholder is set, the format pattern is displayed as a placeholder.\n\t * Passing an empty string as the value of this property will make the component appear empty - without placeholder or format pattern.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.DatePicker.prototype.placeholder\n\t * @defaultvalue undefined\n\t * @public\n\t */\n\t@property({ defaultValue: undefined })\n\tplaceholder?: string;\n\n\t/**\n\t * Determines the name with which the component will be submitted in an HTML form.\n\t *\n\t * <br><br>\n\t * <b>Important:</b> For the <code>name</code> property to have effect, you must add the following import to your project:\n\t * <code>import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";</code>\n\t *\n\t * <br><br>\n\t * <b>Note:</b> When set, a native <code>input</code> HTML element\n\t * will be created inside the component so that it can be submitted as\n\t * part of an HTML form. Do not use this property unless you need to submit a form.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.DatePicker.prototype.name\n\t * @defaultvalue \"\"\n\t * @public\n\t */\n\t@property()\n\tname!: string;\n\n\t/**\n\t * Defines the visibility of the week numbers column.\n\t * <br><br>\n\t *\n\t * <b>Note:</b> For calendars other than Gregorian,\n\t * the week numbers are not displayed regardless of what is set.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.DatePicker.prototype.hideWeekNumbers\n\t * @defaultvalue false\n\t * @public\n\t * @since 1.0.0-rc.8\n\t */\n\t@property({ type: Boolean })\n\thideWeekNumbers!: boolean;\n\n\t/**\n\t * Defines the aria-label attribute for the component.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.DatePicker.prototype.accessibleName\n\t * @defaultvalue \"\"\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property()\n\taccessibleName!: string;\n\n\t/**\n\t * Receives id(or many ids) of the elements that label the component.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.DatePicker.prototype.accessibleNameRef\n\t * @defaultvalue \"\"\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property({ defaultValue: \"\" })\n\taccessibleNameRef!: string;\n\n\t@property({ type: Boolean, noAttribute: true })\n\t_isPickerOpen!: boolean;\n\n\t@property({ type: Object })\n\t_respPopoverConfig!: object;\n\n\t@property({ defaultValue: \"day\" })\n\t_calendarCurrentPicker!: string;\n\n\tliveValue?: string;\n\n\t/**\n\t * Defines the value state message that will be displayed as pop up under the component.\n\t * <br><br>\n\t *\n\t * <b>Note:</b> If not specified, a default text (in the respective language) will be displayed.\n\t * <br>\n\t * <b>Note:</b> The <code>valueStateMessage</code> would be displayed,\n\t * when the component is in <code>Information</code>, <code>Warning</code> or <code>Error</code> value state.\n\t * @type {HTMLElement}\n\t * @name sap.ui.webc.main.DatePicker.prototype.valueStateMessage\n\t * @since 1.0.0-rc.7\n\t * @slot\n\t * @public\n\t */\n\t@slot({ type: HTMLElement })\n\tvalueStateMessage!: Array<HTMLElement>;\n\n\t/**\n\t * The slot is used to render native <code>input</code> HTML element within Light DOM to enable form submit,\n\t * when <code>name</code> property is set.\n\t * @type {HTMLElement[]}\n\t * @slot\n\t * @private\n\t */\n\t@slot({ type: HTMLElement })\n\tformSupport!: Array<HTMLElement>;\n\n\tresponsivePopover?: ResponsivePopover;\n\n\tFormSupport?: typeof FormSupportT;\n\n\tstatic i18nBundle: I18nBundle;\n\n\t/**\n\t * @protected\n\t */\n\tonResponsivePopoverAfterClose() {\n\t\tthis._isPickerOpen = false;\n\t\tif (isPhone()) {\n\t\t\tthis.blur(); // close device's keyboard and prevent further typing\n\t\t} else {\n\t\t\tthis._getInput()?.focus();\n\t\t}\n\t}\n\n\tonBeforeRendering() {\n\t\tthis.FormSupport = getFeature<typeof FormSupportT>(\"FormSupport\");\n\n\t\t[\"minDate\", \"maxDate\"].forEach((prop: string) => {\n\t\t\tconst propValue = this[prop as keyof DatePicker] as string;\n\n\t\t\tif (!this.isValid(propValue)) {\n\t\t\t\tconsole.warn(`Invalid value for property \"${prop}\": ${propValue} is not compatible with the configured format pattern: \"${this._displayFormat}\"`); // eslint-disable-line\n\t\t\t}\n\t\t});\n\n\t\tif (this.FormSupport) {\n\t\t\tthis.FormSupport.syncNativeHiddenInput(this);\n\t\t} else if (this.name) {\n\t\t\tconsole.warn(`In order for the \"name\" property to have effect, you should also: import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";`); // eslint-disable-line\n\t\t}\n\n\t\tthis.value = this.normalizeValue(this.value) || this.value;\n\t\tthis.liveValue = this.value;\n\t}\n\n\t/**\n\t * Override in derivatives to change calendar selection mode\n\t * @returns {string}\n\t * @protected\n\t */\n\tget _calendarSelectionMode() {\n\t\treturn \"Single\";\n\t}\n\n\t/**\n\t * Used to provide a timestamp to the Calendar (to focus it to a relevant date when open) based on the component's state\n\t * Override in derivatives to provide the calendar a timestamp based on their properties\n\t * By default focus the calendar on the selected date if set, or the current day otherwise\n\t * @protected\n\t * @returns { number } the calendar timestamp\n\t */\n\tget _calendarTimestamp(): number {\n\t\tif (this.value && this.dateValueUTC && this._checkValueValidity(this.value)) {\n\t\t\tconst millisecondsUTC = this.dateValueUTC.getTime();\n\t\t\treturn getRoundedTimestamp(millisecondsUTC);\n\t\t}\n\n\t\treturn getTodayUTCTimestamp(this._primaryCalendarType);\n\t}\n\n\t/**\n\t * Used to provide selectedDates to the calendar based on the component's state\n\t * Override in derivatives to provide different rules for setting the calendar's selected dates\n\t * @protected\n\t * @returns { array } the selected dates\n\t */\n\tget _calendarSelectedDates(): Array<string> {\n\t\tif (this.value && this._checkValueValidity(this.value)) {\n\t\t\treturn [this.value];\n\t\t}\n\n\t\treturn [];\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (isShow(e)) {\n\t\t\te.preventDefault(); // Prevent scroll on Alt/Option + Arrow Up/Down\n\t\t\tif (this.isOpen()) {\n\t\t\t\tif (!isF4(e)) {\n\t\t\t\t\tthis._toggleAndFocusInput();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis._toggleAndFocusInput();\n\t\t\t}\n\t\t}\n\n\t\tif ((this._getInput().isEqualNode(e.target as Node) && this.isOpen()) && (isTabNext(e) || isTabPrevious(e) || isF6Next(e) || isF6Previous(e))) {\n\t\t\tthis.closePicker();\n\t\t}\n\n\t\tif (this.isOpen()) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tif (this.FormSupport) {\n\t\t\t\tthis.FormSupport.triggerFormSubmit(this);\n\t\t\t}\n\t\t} else if (isPageUpShiftCtrl(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyDateValue(1, \"year\");\n\t\t} else if (isPageUpShift(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyDateValue(1, \"month\");\n\t\t} else if (isPageUp(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyDateValue(1, \"day\");\n\t\t} else if (isPageDownShiftCtrl(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyDateValue(-1, \"year\");\n\t\t} else if (isPageDownShift(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyDateValue(-1, \"month\");\n\t\t} else if (isPageDown(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyDateValue(-1, \"day\");\n\t\t}\n\t}\n\n\t/**\n\t *\n\t * @param { number } amount\n\t * @param { string } unit\n\t * @protected\n\t */\n\t_modifyDateValue(amount: number, unit: string) {\n\t\tif (!this.dateValue) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst modifiedDate = modifyDateBy(CalendarDate.fromLocalJSDate(this.dateValue), amount, unit, this._minDate, this._maxDate);\n\t\tconst newValue = this.formatValue(modifiedDate.toUTCJSDate());\n\t\tthis._updateValueAndFireEvents(newValue, true, [\"change\", \"value-changed\"]);\n\t}\n\n\t_updateValueAndFireEvents(value: string, normalizeValue: boolean, events: Array<string>, updateValue = true) {\n\t\tconst valid = this._checkValueValidity(value);\n\n\t\tif (valid && normalizeValue) {\n\t\t\tvalue = this.normalizeValue(value); // transform valid values (in any format) to the correct format\n\t\t}\n\n\t\tlet executeEvent = true;\n\t\tthis.liveValue = value;\n\n\t\tconst previousValue = this.value;\n\n\t\tif (updateValue) {\n\t\t\tthis._getInput().value = value;\n\t\t\tthis.value = value;\n\t\t\tthis._updateValueState(); // Change the value state to Error/None, but only if needed\n\t\t}\n\n\t\tevents.forEach((e: string) => {\n\t\t\tif (!this.fireEvent(e, { value, valid }, true)) {\n\t\t\t\texecuteEvent = false;\n\t\t\t}\n\t\t});\n\n\t\tif (!executeEvent && updateValue) {\n\t\t\tthis._getInput().value = previousValue;\n\t\t\tthis.value = previousValue;\n\t\t\tthis._updateValueState(); // Change the value state to Error/None, but only if needed\n\t\t}\n\t}\n\n\t_updateValueState() {\n\t\tconst isValid = this._checkValueValidity(this.value);\n\t\tif (!isValid) { // If not valid - always set Error regardless of the current value state\n\t\t\tthis.valueState = ValueState.Error;\n\t\t} else if (isValid && this.valueState === ValueState.Error) { // However if valid, change only Error (but not the others) to None\n\t\t\tthis.valueState = ValueState.None;\n\t\t}\n\t}\n\n\t_toggleAndFocusInput() {\n\t\tthis.togglePicker();\n\t\tthis._getInput().focus();\n\t}\n\n\t_getInput(): Input {\n\t\treturn this.shadowRoot!.querySelector<Input>(\"[ui5-input]\")!;\n\t}\n\n\t/**\n\t * The ui5-input \"submit\" event handler - fire change event when the user presses enter\n\t * @protected\n\t */\n\t_onInputSubmit() {}\n\n\t/**\n\t * The ui5-input \"change\" event handler - fire change event when the user focuses out of the input\n\t * @protected\n\t */\n\t_onInputChange(e: Event) {\n\t\tthis._updateValueAndFireEvents((e.target as DatePicker).value, true, [\"change\", \"value-changed\"]);\n\t}\n\n\t/**\n\t * The ui5-input \"input\" event handler - fire input even when the user types\n\t * @protected\n\t */\n\t_onInputInput(e: KeyboardEvent) {\n\t\tthis._updateValueAndFireEvents((e.target as DatePicker).value, false, [\"input\"], false);\n\t}\n\n\t/**\n\t * Checks if the provided value is valid and within valid range.\n\t * @protected\n\t * @param { string } value\n\t * @returns { boolean }\n\t */\n\t_checkValueValidity(value: string): boolean {\n\t\tif (value === \"\") {\n\t\t\treturn true;\n\t\t}\n\t\treturn this.isValid(value) && this.isInValidRange(value);\n\t}\n\n\t_click(e: MouseEvent) {\n\t\tif (isPhone()) {\n\t\t\tthis.responsivePopover!.showAt(this);\n\t\t\te.preventDefault(); // prevent immediate selection of any item\n\t\t}\n\t}\n\n\t/**\n\t * Checks if a value is valid against the current date format of the DatePicker.\n\t * @public\n\t * @method\n\t * @name sap.ui.webc.main.DatePicker#isValid\n\t * @param { string } [value=\"\"] A value to be tested against the current date format\n\t * @returns { boolean }\n\t */\n\tisValid(value = \"\"): boolean {\n\t\tif (value === \"\") {\n\t\t\treturn true;\n\t\t}\n\n\t\t// <b>Note:</b> Format#parse accepts only boolean type for 2nd and 3rd params,\n\t\t// but has logic related to \"undefined\" value, so we're calling it with \"undefined\" and casting to \"boolean\".\n\t\treturn !!this.getFormat().parse(value, undefined as unknown as boolean, undefined as unknown as boolean);\n\t}\n\n\t/**\n\t * Checks if a date is between the minimum and maximum date.\n\t * @public\n\t * @method\n\t * @name sap.ui.webc.main.DatePicker#isInValidRange\n\t * @param { string } [value=\"\"] A value to be checked\n\t * @returns { boolean }\n\t */\n\tisInValidRange(value = \"\"): boolean {\n\t\tif (value === \"\") {\n\t\t\treturn true;\n\t\t}\n\n\t\tconst calendarDate = this._getCalendarDateFromString(value);\n\n\t\tif (!calendarDate || !this._minDate || !this._maxDate) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn calendarDate.valueOf() >= this._minDate.valueOf() && calendarDate.valueOf() <= this._maxDate.valueOf();\n\t}\n\n\t/**\n\t * The parser understands many formats, but we need one format\n\t * @protected\n\t */\n\tnormalizeValue(value: string) {\n\t\tif (value === \"\") {\n\t\t\treturn value;\n\t\t}\n\n\t\treturn this.getFormat().format(this.getFormat().parse(value, true, undefined as unknown as boolean), true); // it is important to both parse and format the date as UTC\n\t}\n\n\tget _displayFormat(): string {\n\t\t// @ts-ignore oFormatOptions is a private API of DateFormat\n\t\treturn this.getFormat().oFormatOptions.pattern as string;\n\t}\n\n\t/**\n\t * @protected\n\t */\n\tget _placeholder() {\n\t\treturn this.placeholder !== undefined ? this.placeholder : this._displayFormat;\n\t}\n\n\tget _headerTitleText() {\n\t\treturn DatePicker.i18nBundle.getText(INPUT_SUGGESTIONS_TITLE);\n\t}\n\n\tget phone() {\n\t\treturn isPhone();\n\t}\n\n\tget showHeader() {\n\t\treturn this.phone;\n\t}\n\n\tget showFooter() {\n\t\treturn this.phone;\n\t}\n\n\tget accInfo() {\n\t\treturn {\n\t\t\t\"ariaRoledescription\": this.dateAriaDescription,\n\t\t\t\"ariaHasPopup\": HasPopup.Grid,\n\t\t\t\"ariaAutoComplete\": \"none\",\n\t\t\t\"ariaRequired\": this.required,\n\t\t\t\"ariaLabel\": getEffectiveAriaLabelText(this),\n\t\t};\n\t}\n\n\tget openIconTitle() {\n\t\treturn DatePicker.i18nBundle.getText(DATEPICKER_OPEN_ICON_TITLE);\n\t}\n\n\tget openIconName() {\n\t\treturn \"appointment-2\";\n\t}\n\n\tget dateAriaDescription() {\n\t\treturn DatePicker.i18nBundle.getText(DATEPICKER_DATE_DESCRIPTION);\n\t}\n\n\t/**\n\t * Defines whether the dialog on mobile should have header\n\t * @private\n\t */\n\tget _shouldHideHeader() {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Defines whether the value help icon is hidden\n\t * @private\n\t */\n\tget _ariaHidden() {\n\t\treturn isDesktop();\n\t}\n\n\tasync _respPopover() {\n\t\tconst staticAreaItem = await this.getStaticAreaItemDomRef();\n\t\treturn staticAreaItem!.querySelector<ResponsivePopover>(\"[ui5-responsive-popover]\")!;\n\t}\n\n\t_canOpenPicker() {\n\t\treturn !this.disabled && !this.readonly;\n\t}\n\n\tget _calendarPickersMode() {\n\t\tconst format = this.getFormat() as DateFormat & { aFormatArray: Array<{type: string}> };\n\t\tconst patternSymbolTypes = format.aFormatArray.map(patternSymbolSettings => {\n\t\t\treturn patternSymbolSettings.type.toLowerCase();\n\t\t});\n\n\t\tif (patternSymbolTypes.includes(\"day\")) {\n\t\t\treturn CalendarPickersMode.DAY_MONTH_YEAR;\n\t\t}\n\n\t\tif (patternSymbolTypes.includes(\"month\") || patternSymbolTypes.includes(\"monthstandalone\")) {\n\t\t\treturn CalendarPickersMode.MONTH_YEAR;\n\t\t}\n\n\t\treturn CalendarPickersMode.YEAR;\n\t}\n\n\t/**\n\t * The user selected a new date in the calendar\n\t * @param event\n\t * @protected\n\t */\n\tonSelectedDatesChange(e: CustomEvent<CalendarChangeEventDetail>) {\n\t\te.preventDefault();\n\t\tconst newValue = e.detail.values && e.detail.values[0];\n\t\tthis._updateValueAndFireEvents(newValue, true, [\"change\", \"value-changed\"]);\n\n\t\tthis.closePicker();\n\t}\n\n\t/**\n\t * The user clicked the \"month\" button in the header\n\t */\n\tonHeaderShowMonthPress() {\n\t\tthis._calendarCurrentPicker = \"month\";\n\t}\n\n\t/**\n\t * The user clicked the \"year\" button in the header\n\t */\n\tonHeaderShowYearPress() {\n\t\tthis._calendarCurrentPicker = \"year\";\n\t}\n\n\t/**\n\t * Formats a Java Script date object into a string representing a locale date\n\t * according to the <code>formatPattern</code> property of the DatePicker instance\n\t * @public\n\t * @method\n\t * @name sap.ui.webc.main.DatePicker#formatValue\n\t * @param {Date} date A Java Script date object to be formatted as string\n\t * @returns {string} The date as string\n\t */\n\tformatValue(date: Date) {\n\t\treturn this.getFormat().format(date);\n\t}\n\n\t/**\n\t * Closes the picker.\n\t * @public\n\t * @method\n\t * @name sap.ui.webc.main.DatePicker#closePicker\n\t */\n\tclosePicker() {\n\t\tthis.responsivePopover!.close();\n\t}\n\n\t/**\n\t * Opens the picker.\n\t * @public\n\t * @async\n\t * @method\n\t * @name sap.ui.webc.main.DatePicker#openPicker\n\t * @returns {Promise} Resolves when the picker is open\n\t */\n\tasync openPicker() {\n\t\tthis._isPickerOpen = true;\n\t\tthis._calendarCurrentPicker = \"day\";\n\t\tthis.responsivePopover = await this._respPopover();\n\n\t\tthis.responsivePopover.showAt(this);\n\t}\n\n\ttogglePicker() {\n\t\tif (this.isOpen()) {\n\t\t\tthis.closePicker();\n\t\t} else if (this._canOpenPicker()) {\n\t\t\tthis.openPicker();\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the picker is open.\n\t * @public\n\t * @method\n\t * @name sap.ui.webc.main.DatePicker#isOpen\n\t * @returns {boolean} true if the picker is open, false otherwise\n\t */\n\tisOpen() {\n\t\treturn !!this._isPickerOpen;\n\t}\n\n\t/**\n\t * Currently selected date represented as a Local JavaScript Date instance.\n\t *\n\t * @public\n\t * @readonly\n\t * @name sap.ui.webc.main.DatePicker.prototype.dateValue\n\t * @type { Date }\n\t */\n\tget dateValue(): Date | null {\n\t\tconst utc = undefined as unknown as boolean;\n\t\tconst strict = undefined as unknown as boolean;\n\t\treturn this.liveValue ? this.getFormat().parse(this.liveValue, utc, strict) as Date : this.getFormat().parse(this.value, utc, strict) as Date;\n\t}\n\n\tget dateValueUTC(): Date | null {\n\t\tconst utc = undefined as unknown as boolean;\n\t\tconst strict = undefined as unknown as boolean;\n\t\treturn this.liveValue ? this.getFormat().parse(this.liveValue, true, strict) as Date : this.getFormat().parse(this.value, utc, strict) as Date;\n\t}\n\n\tget styles() {\n\t\treturn {\n\t\t\tmain: {\n\t\t\t\twidth: \"100%\",\n\t\t\t},\n\t\t};\n\t}\n\n\tget type() {\n\t\treturn InputType.Text;\n\t}\n}\n\nDatePicker.define();\n\nexport default DatePicker;\n\nexport type { DatePickerChangeEventDetail };\n"]}
|
|
1
|
+
{"version":3,"file":"DatePicker.js","sourceRoot":"","sources":["../src/DatePicker.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AACnE,OAAO,KAAK,MAAM,kDAAkD,CAAC;AAErE,OAAO,EAAE,UAAU,EAAE,MAAM,kDAAkD,CAAC;AAE9E,OAAO,YAAY,MAAM,4DAA4D,CAAC;AACtF,OAAO,YAAY,MAAM,4DAA4D,CAAC;AACtF,OAAO,mBAAmB,MAAM,mEAAmE,CAAC;AACpG,OAAO,oBAAoB,MAAM,oEAAoE,CAAC;AACtG,OAAO,UAAU,MAAM,kDAAkD,CAAC;AAC1E,OAAO,EAAE,yBAAyB,EAAE,MAAM,sDAAsD,CAAC;AACjG,OAAO,EACN,QAAQ,EACR,UAAU,EACV,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,MAAM,EACN,IAAI,EACJ,OAAO,EACP,SAAS,EACT,aAAa,EACb,QAAQ,EACR,YAAY,GACZ,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,mBAAmB,MAAM,gCAAgC,CAAC;AAGjE,OAAO,gDAAgD,CAAC;AACxD,OAAO,0CAA0C,CAAC;AAClD,OAAO,QAAQ,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAA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UAAU,CA0pBf;AAED,UAAU,CAAC,MAAM,EAAE,CAAC;AAEpB,eAAe,UAAU,CAAC","sourcesContent":["import customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport slot from \"@ui5/webcomponents-base/dist/decorators/slot.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { getFeature } from \"@ui5/webcomponents-base/dist/FeaturesRegistry.js\";\nimport DateFormat from \"@ui5/webcomponents-localization/dist/DateFormat.js\";\nimport CalendarDate from \"@ui5/webcomponents-localization/dist/dates/CalendarDate.js\";\nimport modifyDateBy from \"@ui5/webcomponents-localization/dist/dates/modifyDateBy.js\";\nimport getRoundedTimestamp from \"@ui5/webcomponents-localization/dist/dates/getRoundedTimestamp.js\";\nimport getTodayUTCTimestamp from \"@ui5/webcomponents-localization/dist/dates/getTodayUTCTimestamp.js\";\nimport ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AriaLabelHelper.js\";\nimport {\n\tisPageUp,\n\tisPageDown,\n\tisPageUpShift,\n\tisPageDownShift,\n\tisPageUpShiftCtrl,\n\tisPageDownShiftCtrl,\n\tisShow,\n\tisF4,\n\tisEnter,\n\tisTabNext,\n\tisTabPrevious,\n\tisF6Next,\n\tisF6Previous,\n} from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport { isPhone, isDesktop } from \"@ui5/webcomponents-base/dist/Device.js\";\nimport CalendarPickersMode from \"./types/CalendarPickersMode.js\";\nimport type FormSupportT from \"./features/InputElementsFormSupport.js\";\nimport type { IFormElement } from \"./features/InputElementsFormSupport.js\";\nimport \"@ui5/webcomponents-icons/dist/appointment-2.js\";\nimport \"@ui5/webcomponents-icons/dist/decline.js\";\nimport HasPopup from \"./types/HasPopup.js\";\nimport { DATEPICKER_OPEN_ICON_TITLE, DATEPICKER_DATE_DESCRIPTION, INPUT_SUGGESTIONS_TITLE } from \"./generated/i18n/i18n-defaults.js\";\nimport DateComponentBase from \"./DateComponentBase.js\";\nimport Icon from \"./Icon.js\";\nimport Button from \"./Button.js\";\nimport ResponsivePopover from \"./ResponsivePopover.js\";\nimport Calendar from \"./Calendar.js\";\nimport type { CalendarChangeEventDetail } from \"./Calendar.js\";\nimport CalendarDateComponent from \"./CalendarDate.js\";\nimport Input from \"./Input.js\";\nimport InputType from \"./types/InputType.js\";\nimport DatePickerTemplate from \"./generated/templates/DatePickerTemplate.lit.js\";\nimport DatePickerPopoverTemplate from \"./generated/templates/DatePickerPopoverTemplate.lit.js\";\n\n// default calendar for bundling\nimport \"@ui5/webcomponents-localization/dist/features/calendar/Gregorian.js\";\n\n// Styles\nimport datePickerCss from \"./generated/themes/DatePicker.css.js\";\nimport datePickerPopoverCss from \"./generated/themes/DatePickerPopover.css.js\";\nimport ResponsivePopoverCommonCss from \"./generated/themes/ResponsivePopoverCommon.css.js\";\n\ntype DatePickerChangeEventDetail = {\n\tdates: Array<number>;\n\tvalues: Array<string>\n};\n\n/**\n * @class\n *\n * <h3 class=\"comment-api-title\">Overview</h3>\n *\n * The <code>ui5-date-picker</code> component provides an input field with assigned calendar which opens on user action.\n * The <code>ui5-date-picker</code> allows users to select a localized date using touch,\n * mouse, or keyboard input. It consists of two parts: the date input field and the\n * date picker.\n *\n * <h3>Usage</h3>\n *\n * The user can enter a date by:\n * <ul>\n * <li>Using the calendar that opens in a popup</li>\n * <li>Typing it in directly in the input field</li>\n * </ul>\n * <br><br>\n * When the user makes an entry and presses the enter key, the calendar shows the corresponding date.\n * When the user directly triggers the calendar display, the actual date is displayed.\n *\n * <h3>Formatting</h3>\n *\n * If a date is entered by typing it into\n * the input field, it must fit to the used date format.\n * <br><br>\n * Supported format options are pattern-based on Unicode LDML Date Format notation.\n * For more information, see <ui5-link target=\"_blank\" href=\"http://unicode.org/reports/tr35/#Date_Field_Symbol_Table\">UTS #35: Unicode Locale Data Markup Language</ui5-link>.\n * <br><br>\n * For example, if the <code>format-pattern</code> is \"yyyy-MM-dd\",\n * a valid value string is \"2015-07-30\" and the same is displayed in the input.\n *\n * <h3>Keyboard Handling</h3>\n * The <code>ui5-date-picker</code> provides advanced keyboard handling.\n * If the <code>ui5-date-picker</code> is focused,\n * you can open or close the drop-down by pressing <code>F4</code>, <code>ALT+UP</code> or <code>ALT+DOWN</code> keys.\n * Once the drop-down is opened, you can use the <code>UP</code>, <code>DOWN</code>, <code>LEFT</code>, <code>RIGHT</code> arrow keys\n * to navigate through the dates and select one by pressing the <code>Space</code> or <code>Enter</code> keys. Moreover you can\n * use TAB to reach the buttons for changing month and year.\n * <br>\n *\n * If the <code>ui5-date-picker</code> input field is focused and its corresponding picker dialog is not opened,\n * then users can increment or decrement the date referenced by <code>dateValue</code> property\n * by using the following shortcuts:\n * <br>\n * <ul>\n * <li>[PAGEDOWN] - Decrements the corresponding day of the month by one</li>\n * <li>[SHIFT] + [PAGEDOWN] - Decrements the corresponding month by one</li>\n * <li>[SHIFT] + [CTRL] + [PAGEDOWN] - Decrements the corresponding year by one</li>\n * <li>[PAGEUP] - Increments the corresponding day of the month by one</li>\n * <li>[SHIFT] + [PAGEUP] - Increments the corresponding month by one</li>\n * <li>[SHIFT] + [CTRL] + [PAGEUP] - Increments the corresponding year by one</li>\n * </ul>\n *\n * <h3>Calendar types</h3>\n * The component supports several calendar types - Gregorian, Buddhist, Islamic, Japanese and Persian.\n * By default the Gregorian Calendar is used. In order to use the Buddhist, Islamic, Japanese or Persian calendar,\n * you need to set the <code>primaryCalendarType</code> property and import one or more of the following modules:\n * <br><br>\n *\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Buddhist.js\";</code>\n * <br>\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Islamic.js\";</code>\n * <br>\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Japanese.js\";</code>\n * <br>\n * <code>import \"@ui5/webcomponents-localization/dist/features/calendar/Persian.js\";</code>\n * <br><br>\n *\n * Or, you can use the global configuration and set the <code>calendarType</code> key:\n * <br>\n * <pre><code><script data-id=\"sap-ui-config\" type=\"application/json\">\n * {\n *\t\"calendarType\": \"Japanese\"\n * }\n * </script></code></pre>\n *\n * <h3>ES6 Module Import</h3>\n *\n * <code>import \"@ui5/webcomponents/dist/DatePicker\";</code>\n *\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.main.DatePicker\n * @extends sap.ui.webc.main.DateComponentBase\n * @tagname ui5-date-picker\n * @public\n */\n\n@customElement({\n\ttag: \"ui5-date-picker\",\n\tlanguageAware: true,\n\ttemplate: DatePickerTemplate,\n\tstaticAreaTemplate: DatePickerPopoverTemplate,\n\tstyles: datePickerCss,\n\tstaticAreaStyles: [\n\t\tResponsivePopoverCommonCss,\n\t\tdatePickerPopoverCss,\n\t],\n\tdependencies: [\n\t\tIcon,\n\t\tResponsivePopover,\n\t\tCalendar,\n\t\tCalendarDateComponent,\n\t\tInput,\n\t\tButton,\n\t],\n})\n/**\n * Fired when the input operation has finished by pressing Enter or on focusout.\n *\n * @event sap.ui.webc.main.DatePicker#change\n * @allowPreventDefault\n * @public\n * @param {string} value The submitted value.\n * @param {boolean} valid Indicator if the value is in correct format pattern and in valid range.\n*/\n@event(\"change\", {\n\tdetail: {\n\t\tvalue: {\n\t\t\ttype: String,\n\t\t},\n\t\tvalid: {\n\t\t\ttype: Boolean,\n\t\t},\n\t},\n})\n/**\n * Fired when the value of the component is changed at each key stroke.\n *\n * @event sap.ui.webc.main.DatePicker#input\n * @allowPreventDefault\n * @public\n * @param {string} value The submitted value.\n * @param {boolean} valid Indicator if the value is in correct format pattern and in valid range.\n*/\n@event(\"input\", {\n\tdetail: {\n\t\tvalue: {\n\t\t\ttype: String,\n\t\t},\n\t\tvalid: {\n\t\t\ttype: Boolean,\n\t\t},\n\t},\n})\nclass DatePicker extends DateComponentBase implements IFormElement {\n\t/**\n\t * Defines a formatted date value.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.DatePicker.prototype.value\n\t * @defaultvalue \"\"\n\t * @formEvents change input\n\t * @formProperty\n\t * @public\n\t */\n\t@property()\n\tvalue!: string\n\n\t/**\n\t * Defines the value state of the component.\n\t * <br><br>\n\t * Available options are:\n\t * <ul>\n\t * <li><code>None</code></li>\n\t * <li><code>Error</code></li>\n\t * <li><code>Warning</code></li>\n\t * <li><code>Success</code></li>\n\t * <li><code>Information</code></li>\n\t * </ul>\n\t *\n\t * @type {sap.ui.webc.base.types.ValueState}\n\t * @name sap.ui.webc.main.DatePicker.prototype.valueState\n\t * @defaultvalue \"None\"\n\t * @public\n\t */\n\t@property({ type: ValueState, defaultValue: ValueState.None })\n\tvalueState!: ValueState;\n\n\t/**\n\t * Defines whether the component is required.\n\t *\n\t * @since 1.0.0-rc.9\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.DatePicker.prototype.required\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\trequired!: boolean;\n\n\t/**\n\t * Determines whether the component is displayed as disabled.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.DatePicker.prototype.disabled\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\tdisabled!: boolean;\n\n\t/**\n\t * Determines whether the component is displayed as read-only.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.DatePicker.prototype.readonly\n\t * @defaultvalue false\n\t * @public\n\t */\n\t@property({ type: Boolean })\n\treadonly!: boolean;\n\n\t/**\n\t * Defines a short hint, intended to aid the user with data entry when the\n\t * component has no value.\n\t *\n\t * <br><br>\n\t * <b>Note:</b> When no placeholder is set, the format pattern is displayed as a placeholder.\n\t * Passing an empty string as the value of this property will make the component appear empty - without placeholder or format pattern.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.DatePicker.prototype.placeholder\n\t * @defaultvalue undefined\n\t * @public\n\t */\n\t@property({ defaultValue: undefined })\n\tplaceholder?: string;\n\n\t/**\n\t * Determines the name with which the component will be submitted in an HTML form.\n\t *\n\t * <br><br>\n\t * <b>Important:</b> For the <code>name</code> property to have effect, you must add the following import to your project:\n\t * <code>import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";</code>\n\t *\n\t * <br><br>\n\t * <b>Note:</b> When set, a native <code>input</code> HTML element\n\t * will be created inside the component so that it can be submitted as\n\t * part of an HTML form. Do not use this property unless you need to submit a form.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.DatePicker.prototype.name\n\t * @defaultvalue \"\"\n\t * @public\n\t */\n\t@property()\n\tname!: string;\n\n\t/**\n\t * Defines the visibility of the week numbers column.\n\t * <br><br>\n\t *\n\t * <b>Note:</b> For calendars other than Gregorian,\n\t * the week numbers are not displayed regardless of what is set.\n\t *\n\t * @type {boolean}\n\t * @name sap.ui.webc.main.DatePicker.prototype.hideWeekNumbers\n\t * @defaultvalue false\n\t * @public\n\t * @since 1.0.0-rc.8\n\t */\n\t@property({ type: Boolean })\n\thideWeekNumbers!: boolean;\n\n\t/**\n\t * Defines the aria-label attribute for the component.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.DatePicker.prototype.accessibleName\n\t * @defaultvalue \"\"\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property()\n\taccessibleName!: string;\n\n\t/**\n\t * Receives id(or many ids) of the elements that label the component.\n\t *\n\t * @type {string}\n\t * @name sap.ui.webc.main.DatePicker.prototype.accessibleNameRef\n\t * @defaultvalue \"\"\n\t * @public\n\t * @since 1.0.0-rc.15\n\t */\n\t@property({ defaultValue: \"\" })\n\taccessibleNameRef!: string;\n\n\t@property({ type: Boolean, noAttribute: true })\n\t_isPickerOpen!: boolean;\n\n\t@property({ type: Object })\n\t_respPopoverConfig!: object;\n\n\t@property({ defaultValue: \"day\" })\n\t_calendarCurrentPicker!: string;\n\n\tliveValue?: string;\n\n\t/**\n\t * Defines the value state message that will be displayed as pop up under the component.\n\t * <br><br>\n\t *\n\t * <b>Note:</b> If not specified, a default text (in the respective language) will be displayed.\n\t * <br>\n\t * <b>Note:</b> The <code>valueStateMessage</code> would be displayed,\n\t * when the component is in <code>Information</code>, <code>Warning</code> or <code>Error</code> value state.\n\t * @type {HTMLElement}\n\t * @name sap.ui.webc.main.DatePicker.prototype.valueStateMessage\n\t * @since 1.0.0-rc.7\n\t * @slot\n\t * @public\n\t */\n\t@slot({ type: HTMLElement })\n\tvalueStateMessage!: Array<HTMLElement>;\n\n\t/**\n\t * The slot is used to render native <code>input</code> HTML element within Light DOM to enable form submit,\n\t * when <code>name</code> property is set.\n\t * @type {HTMLElement[]}\n\t * @slot\n\t * @private\n\t */\n\t@slot({ type: HTMLElement })\n\tformSupport!: Array<HTMLElement>;\n\n\tresponsivePopover?: ResponsivePopover;\n\n\tFormSupport?: typeof FormSupportT;\n\n\tstatic i18nBundle: I18nBundle;\n\n\t/**\n\t * @protected\n\t */\n\tonResponsivePopoverAfterClose() {\n\t\tthis._isPickerOpen = false;\n\t\tif (isPhone()) {\n\t\t\tthis.blur(); // close device's keyboard and prevent further typing\n\t\t} else {\n\t\t\tthis._getInput()?.focus();\n\t\t}\n\t}\n\n\tonBeforeRendering() {\n\t\tthis.FormSupport = getFeature<typeof FormSupportT>(\"FormSupport\");\n\n\t\t[\"minDate\", \"maxDate\"].forEach((prop: string) => {\n\t\t\tconst propValue = this[prop as keyof DatePicker] as string;\n\n\t\t\tif (!this.isValid(propValue)) {\n\t\t\t\tconsole.warn(`Invalid value for property \"${prop}\": ${propValue} is not compatible with the configured format pattern: \"${this._displayFormat}\"`); // eslint-disable-line\n\t\t\t}\n\t\t});\n\n\t\tif (this.FormSupport) {\n\t\t\tthis.FormSupport.syncNativeHiddenInput(this);\n\t\t} else if (this.name) {\n\t\t\tconsole.warn(`In order for the \"name\" property to have effect, you should also: import \"@ui5/webcomponents/dist/features/InputElementsFormSupport.js\";`); // eslint-disable-line\n\t\t}\n\n\t\tthis.value = this.normalizeValue(this.value) || this.value;\n\t\tthis.liveValue = this.value;\n\t}\n\n\t/**\n\t * Override in derivatives to change calendar selection mode\n\t * @returns {string}\n\t * @protected\n\t */\n\tget _calendarSelectionMode() {\n\t\treturn \"Single\";\n\t}\n\n\t/**\n\t * Used to provide a timestamp to the Calendar (to focus it to a relevant date when open) based on the component's state\n\t * Override in derivatives to provide the calendar a timestamp based on their properties\n\t * By default focus the calendar on the selected date if set, or the current day otherwise\n\t * @protected\n\t * @returns { number } the calendar timestamp\n\t */\n\tget _calendarTimestamp(): number {\n\t\tif (this.value && this.dateValueUTC && this._checkValueValidity(this.value)) {\n\t\t\tconst millisecondsUTC = this.dateValueUTC.getTime();\n\t\t\treturn getRoundedTimestamp(millisecondsUTC);\n\t\t}\n\n\t\treturn getTodayUTCTimestamp(this._primaryCalendarType);\n\t}\n\n\t/**\n\t * Used to provide selectedDates to the calendar based on the component's state\n\t * Override in derivatives to provide different rules for setting the calendar's selected dates\n\t * @protected\n\t * @returns { array } the selected dates\n\t */\n\tget _calendarSelectedDates(): Array<string> {\n\t\tif (this.value && this._checkValueValidity(this.value)) {\n\t\t\treturn [this.value];\n\t\t}\n\n\t\treturn [];\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (isShow(e)) {\n\t\t\te.preventDefault(); // Prevent scroll on Alt/Option + Arrow Up/Down\n\t\t\tif (this.isOpen()) {\n\t\t\t\tif (!isF4(e)) {\n\t\t\t\t\tthis._toggleAndFocusInput();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis._toggleAndFocusInput();\n\t\t\t}\n\t\t}\n\n\t\tif ((this._getInput().isEqualNode(e.target as Node) && this.isOpen()) && (isTabNext(e) || isTabPrevious(e) || isF6Next(e) || isF6Previous(e))) {\n\t\t\tthis.closePicker();\n\t\t}\n\n\t\tif (this.isOpen()) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isEnter(e)) {\n\t\t\tif (this.FormSupport) {\n\t\t\t\tthis.FormSupport.triggerFormSubmit(this);\n\t\t\t}\n\t\t} else if (isPageUpShiftCtrl(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyDateValue(1, \"year\");\n\t\t} else if (isPageUpShift(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyDateValue(1, \"month\");\n\t\t} else if (isPageUp(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyDateValue(1, \"day\");\n\t\t} else if (isPageDownShiftCtrl(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyDateValue(-1, \"year\");\n\t\t} else if (isPageDownShift(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyDateValue(-1, \"month\");\n\t\t} else if (isPageDown(e)) {\n\t\t\te.preventDefault();\n\t\t\tthis._modifyDateValue(-1, \"day\");\n\t\t}\n\t}\n\n\t/**\n\t *\n\t * @param { number } amount\n\t * @param { string } unit\n\t * @protected\n\t */\n\t_modifyDateValue(amount: number, unit: string) {\n\t\tif (!this.dateValue) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst modifiedDate = modifyDateBy(CalendarDate.fromLocalJSDate(this.dateValue), amount, unit, this._minDate, this._maxDate);\n\t\tconst newValue = this.formatValue(modifiedDate.toUTCJSDate());\n\t\tthis._updateValueAndFireEvents(newValue, true, [\"change\", \"value-changed\"]);\n\t}\n\n\t_updateValueAndFireEvents(value: string, normalizeValue: boolean, events: Array<string>, updateValue = true) {\n\t\tconst valid = this._checkValueValidity(value);\n\n\t\tif (valid && normalizeValue) {\n\t\t\tvalue = this.normalizeValue(value); // transform valid values (in any format) to the correct format\n\t\t}\n\n\t\tlet executeEvent = true;\n\t\tthis.liveValue = value;\n\n\t\tconst previousValue = this.value;\n\n\t\tif (updateValue) {\n\t\t\tthis._getInput().value = value;\n\t\t\tthis.value = value;\n\t\t\tthis._updateValueState(); // Change the value state to Error/None, but only if needed\n\t\t}\n\n\t\tevents.forEach((e: string) => {\n\t\t\tif (!this.fireEvent(e, { value, valid }, true)) {\n\t\t\t\texecuteEvent = false;\n\t\t\t}\n\t\t});\n\n\t\tif (!executeEvent && updateValue) {\n\t\t\tthis._getInput().value = previousValue;\n\t\t\tthis.value = previousValue;\n\t\t\tthis._updateValueState(); // Change the value state to Error/None, but only if needed\n\t\t}\n\t}\n\n\t_updateValueState() {\n\t\tconst isValid = this._checkValueValidity(this.value);\n\t\tif (!isValid) { // If not valid - always set Error regardless of the current value state\n\t\t\tthis.valueState = ValueState.Error;\n\t\t} else if (isValid && this.valueState === ValueState.Error) { // However if valid, change only Error (but not the others) to None\n\t\t\tthis.valueState = ValueState.None;\n\t\t}\n\t}\n\n\t_toggleAndFocusInput() {\n\t\tthis.togglePicker();\n\t\tthis._getInput().focus();\n\t}\n\n\t_getInput(): Input {\n\t\treturn this.shadowRoot!.querySelector<Input>(\"[ui5-input]\")!;\n\t}\n\n\t/**\n\t * The ui5-input \"submit\" event handler - fire change event when the user presses enter\n\t * @protected\n\t */\n\t_onInputSubmit() {}\n\n\t/**\n\t * The ui5-input \"change\" event handler - fire change event when the user focuses out of the input\n\t * @protected\n\t */\n\t_onInputChange(e: Event) {\n\t\tthis._updateValueAndFireEvents((e.target as DatePicker).value, true, [\"change\", \"value-changed\"]);\n\t}\n\n\t/**\n\t * The ui5-input \"input\" event handler - fire input even when the user types\n\t * @protected\n\t */\n\t_onInputInput(e: KeyboardEvent) {\n\t\tthis._updateValueAndFireEvents((e.target as DatePicker).value, false, [\"input\"], false);\n\t}\n\n\t/**\n\t * Checks if the provided value is valid and within valid range.\n\t * @protected\n\t * @param { string } value\n\t * @returns { boolean }\n\t */\n\t_checkValueValidity(value: string): boolean {\n\t\tif (value === \"\") {\n\t\t\treturn true;\n\t\t}\n\t\treturn this.isValid(value) && this.isInValidRange(value);\n\t}\n\n\t_click(e: MouseEvent) {\n\t\tif (isPhone()) {\n\t\t\tthis.responsivePopover!.showAt(this);\n\t\t\te.preventDefault(); // prevent immediate selection of any item\n\t\t}\n\t}\n\n\t/**\n\t * Checks if a value is valid against the current date format of the DatePicker.\n\t * @public\n\t * @method\n\t * @name sap.ui.webc.main.DatePicker#isValid\n\t * @param { string } [value=\"\"] A value to be tested against the current date format\n\t * @returns { boolean }\n\t */\n\tisValid(value = \"\"): boolean {\n\t\tif (value === \"\") {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn !!this.getFormat().parse(value);\n\t}\n\n\t/**\n\t * Checks if a date is between the minimum and maximum date.\n\t * @public\n\t * @method\n\t * @name sap.ui.webc.main.DatePicker#isInValidRange\n\t * @param { string } [value=\"\"] A value to be checked\n\t * @returns { boolean }\n\t */\n\tisInValidRange(value = \"\"): boolean {\n\t\tif (value === \"\") {\n\t\t\treturn true;\n\t\t}\n\n\t\tconst calendarDate = this._getCalendarDateFromString(value);\n\n\t\tif (!calendarDate || !this._minDate || !this._maxDate) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn calendarDate.valueOf() >= this._minDate.valueOf() && calendarDate.valueOf() <= this._maxDate.valueOf();\n\t}\n\n\t/**\n\t * The parser understands many formats, but we need one format\n\t * @protected\n\t */\n\tnormalizeValue(value: string) {\n\t\tif (value === \"\") {\n\t\t\treturn value;\n\t\t}\n\n\t\treturn this.getFormat().format(this.getFormat().parse(value, true), true); // it is important to both parse and format the date as UTC\n\t}\n\n\tget _displayFormat(): string {\n\t\t// @ts-ignore oFormatOptions is a private API of DateFormat\n\t\treturn this.getFormat().oFormatOptions.pattern as string;\n\t}\n\n\t/**\n\t * @protected\n\t */\n\tget _placeholder() {\n\t\treturn this.placeholder !== undefined ? this.placeholder : this._displayFormat;\n\t}\n\n\tget _headerTitleText() {\n\t\treturn DatePicker.i18nBundle.getText(INPUT_SUGGESTIONS_TITLE);\n\t}\n\n\tget phone() {\n\t\treturn isPhone();\n\t}\n\n\tget showHeader() {\n\t\treturn this.phone;\n\t}\n\n\tget showFooter() {\n\t\treturn this.phone;\n\t}\n\n\tget accInfo() {\n\t\treturn {\n\t\t\t\"ariaRoledescription\": this.dateAriaDescription,\n\t\t\t\"ariaHasPopup\": HasPopup.Grid,\n\t\t\t\"ariaAutoComplete\": \"none\",\n\t\t\t\"ariaRequired\": this.required,\n\t\t\t\"ariaLabel\": getEffectiveAriaLabelText(this),\n\t\t};\n\t}\n\n\tget openIconTitle() {\n\t\treturn DatePicker.i18nBundle.getText(DATEPICKER_OPEN_ICON_TITLE);\n\t}\n\n\tget openIconName() {\n\t\treturn \"appointment-2\";\n\t}\n\n\tget dateAriaDescription() {\n\t\treturn DatePicker.i18nBundle.getText(DATEPICKER_DATE_DESCRIPTION);\n\t}\n\n\t/**\n\t * Defines whether the dialog on mobile should have header\n\t * @private\n\t */\n\tget _shouldHideHeader() {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Defines whether the value help icon is hidden\n\t * @private\n\t */\n\tget _ariaHidden() {\n\t\treturn isDesktop();\n\t}\n\n\tasync _respPopover() {\n\t\tconst staticAreaItem = await this.getStaticAreaItemDomRef();\n\t\treturn staticAreaItem!.querySelector<ResponsivePopover>(\"[ui5-responsive-popover]\")!;\n\t}\n\n\t_canOpenPicker() {\n\t\treturn !this.disabled && !this.readonly;\n\t}\n\n\tget _calendarPickersMode() {\n\t\tconst format = this.getFormat() as DateFormat & { aFormatArray: Array<{type: string}> };\n\t\tconst patternSymbolTypes = format.aFormatArray.map(patternSymbolSettings => {\n\t\t\treturn patternSymbolSettings.type.toLowerCase();\n\t\t});\n\n\t\tif (patternSymbolTypes.includes(\"day\")) {\n\t\t\treturn CalendarPickersMode.DAY_MONTH_YEAR;\n\t\t}\n\n\t\tif (patternSymbolTypes.includes(\"month\") || patternSymbolTypes.includes(\"monthstandalone\")) {\n\t\t\treturn CalendarPickersMode.MONTH_YEAR;\n\t\t}\n\n\t\treturn CalendarPickersMode.YEAR;\n\t}\n\n\t/**\n\t * The user selected a new date in the calendar\n\t * @param event\n\t * @protected\n\t */\n\tonSelectedDatesChange(e: CustomEvent<CalendarChangeEventDetail>) {\n\t\te.preventDefault();\n\t\tconst newValue = e.detail.values && e.detail.values[0];\n\t\tthis._updateValueAndFireEvents(newValue, true, [\"change\", \"value-changed\"]);\n\n\t\tthis.closePicker();\n\t}\n\n\t/**\n\t * The user clicked the \"month\" button in the header\n\t */\n\tonHeaderShowMonthPress() {\n\t\tthis._calendarCurrentPicker = \"month\";\n\t}\n\n\t/**\n\t * The user clicked the \"year\" button in the header\n\t */\n\tonHeaderShowYearPress() {\n\t\tthis._calendarCurrentPicker = \"year\";\n\t}\n\n\t/**\n\t * Formats a Java Script date object into a string representing a locale date\n\t * according to the <code>formatPattern</code> property of the DatePicker instance\n\t * @public\n\t * @method\n\t * @name sap.ui.webc.main.DatePicker#formatValue\n\t * @param {Date} date A Java Script date object to be formatted as string\n\t * @returns {string} The date as string\n\t */\n\tformatValue(date: Date) {\n\t\treturn this.getFormat().format(date);\n\t}\n\n\t/**\n\t * Closes the picker.\n\t * @public\n\t * @method\n\t * @name sap.ui.webc.main.DatePicker#closePicker\n\t */\n\tclosePicker() {\n\t\tthis.responsivePopover!.close();\n\t}\n\n\t/**\n\t * Opens the picker.\n\t * @public\n\t * @async\n\t * @method\n\t * @name sap.ui.webc.main.DatePicker#openPicker\n\t * @returns {Promise} Resolves when the picker is open\n\t */\n\tasync openPicker() {\n\t\tthis._isPickerOpen = true;\n\t\tthis._calendarCurrentPicker = \"day\";\n\t\tthis.responsivePopover = await this._respPopover();\n\n\t\tthis.responsivePopover.showAt(this);\n\t}\n\n\ttogglePicker() {\n\t\tif (this.isOpen()) {\n\t\t\tthis.closePicker();\n\t\t} else if (this._canOpenPicker()) {\n\t\t\tthis.openPicker();\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the picker is open.\n\t * @public\n\t * @method\n\t * @name sap.ui.webc.main.DatePicker#isOpen\n\t * @returns {boolean} true if the picker is open, false otherwise\n\t */\n\tisOpen() {\n\t\treturn !!this._isPickerOpen;\n\t}\n\n\t/**\n\t * Currently selected date represented as a Local JavaScript Date instance.\n\t *\n\t * @public\n\t * @readonly\n\t * @name sap.ui.webc.main.DatePicker.prototype.dateValue\n\t * @type { Date }\n\t */\n\tget dateValue(): Date | null {\n\t\treturn this.liveValue ? this.getFormat().parse(this.liveValue) as Date : this.getFormat().parse(this.value) as Date;\n\t}\n\n\tget dateValueUTC(): Date | null {\n\t\treturn this.liveValue ? this.getFormat().parse(this.liveValue, true) as Date : this.getFormat().parse(this.value) as Date;\n\t}\n\n\tget styles() {\n\t\treturn {\n\t\t\tmain: {\n\t\t\t\twidth: \"100%\",\n\t\t\t},\n\t\t};\n\t}\n\n\tget type() {\n\t\treturn InputType.Text;\n\t}\n}\n\nDatePicker.define();\n\nexport default DatePicker;\n\nexport type { DatePickerChangeEventDetail };\n"]}
|
package/dist/DateRangePicker.js
CHANGED
|
@@ -89,7 +89,7 @@ let DateRangePicker = DateRangePicker_1 = class DateRangePicker extends DatePick
|
|
|
89
89
|
return this._extractLastTimestamp(this.value);
|
|
90
90
|
}
|
|
91
91
|
get _tempTimestamp() {
|
|
92
|
-
return this._tempValue && this.getFormat().parse(this._tempValue, true
|
|
92
|
+
return this._tempValue && this.getFormat().parse(this._tempValue, true).getTime() / 1000;
|
|
93
93
|
}
|
|
94
94
|
/**
|
|
95
95
|
* Required by DatePicker.js
|
|
@@ -245,7 +245,7 @@ let DateRangePicker = DateRangePicker_1 = class DateRangePicker extends DatePick
|
|
|
245
245
|
const valuesArray = [];
|
|
246
246
|
const partsArray = value.split(this._prevDelimiter || this._effectiveDelimiter);
|
|
247
247
|
// if format successfully parse the value, the value contains only single date
|
|
248
|
-
if (this.getFormat().parse(value
|
|
248
|
+
if (this.getFormat().parse(value)) {
|
|
249
249
|
valuesArray[0] = partsArray.join(this._effectiveDelimiter);
|
|
250
250
|
valuesArray[1] = "";
|
|
251
251
|
}
|
|
@@ -264,7 +264,7 @@ let DateRangePicker = DateRangePicker_1 = class DateRangePicker extends DatePick
|
|
|
264
264
|
return undefined;
|
|
265
265
|
}
|
|
266
266
|
const dateStrings = this._splitValueByDelimiter(value); // at least one item guaranteed due to the checks above (non-empty and valid)
|
|
267
|
-
const parsedDate = this.getFormat().parse(dateStrings[0], true
|
|
267
|
+
const parsedDate = this.getFormat().parse(dateStrings[0], true);
|
|
268
268
|
return parsedDate.getTime() / 1000;
|
|
269
269
|
}
|
|
270
270
|
/**
|
|
@@ -277,7 +277,7 @@ let DateRangePicker = DateRangePicker_1 = class DateRangePicker extends DatePick
|
|
|
277
277
|
}
|
|
278
278
|
const dateStrings = this._splitValueByDelimiter(value);
|
|
279
279
|
if (dateStrings[1]) {
|
|
280
|
-
const parsedDate = this.getFormat().parse(dateStrings[1], true
|
|
280
|
+
const parsedDate = this.getFormat().parse(dateStrings[1], true);
|
|
281
281
|
return parsedDate.getTime() / 1000;
|
|
282
282
|
}
|
|
283
283
|
return undefined;
|