@ui5/webcomponents 2.21.0-rc.4 → 2.22.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/Button.d.ts +11 -0
- package/dist/Button.js +3 -0
- package/dist/Button.js.map +1 -1
- package/dist/Calendar.d.ts +39 -0
- package/dist/Calendar.js +109 -3
- package/dist/Calendar.js.map +1 -1
- package/dist/CalendarHeaderTemplate.d.ts +13 -1
- package/dist/CalendarHeaderTemplate.js +48 -12
- package/dist/CalendarHeaderTemplate.js.map +1 -1
- package/dist/CalendarTemplate.js +58 -2
- package/dist/CalendarTemplate.js.map +1 -1
- package/dist/Carousel.js +1 -1
- package/dist/Carousel.js.map +1 -1
- package/dist/DateRangePicker.d.ts +27 -0
- package/dist/DateRangePicker.js +57 -3
- package/dist/DateRangePicker.js.map +1 -1
- package/dist/DateRangePickerTemplate.js +7 -3
- package/dist/DateRangePickerTemplate.js.map +1 -1
- package/dist/DateTimePicker.js +0 -3
- package/dist/DateTimePicker.js.map +1 -1
- package/dist/Popup.js +4 -0
- package/dist/Popup.js.map +1 -1
- package/dist/SliderHandle.d.ts +0 -8
- package/dist/SliderHandle.js +0 -11
- package/dist/SliderHandle.js.map +1 -1
- package/dist/SliderTemplate.js +1 -1
- package/dist/SliderTemplate.js.map +1 -1
- package/dist/TimePicker.d.ts +3 -2
- package/dist/TimePicker.js +1 -0
- package/dist/TimePicker.js.map +1 -1
- package/dist/css/themes/Breadcrumbs.css +1 -1
- package/dist/css/themes/Calendar.css +1 -1
- package/dist/css/themes/DatePickerPopover.css +1 -1
- package/dist/css/themes/Popup.css +1 -1
- package/dist/css/themes/ResponsivePopoverCommon.css +1 -1
- package/dist/css/themes/sap_fiori_3/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_fiori_3_hcw/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_auto/parameters-bundle.css +8 -0
- package/dist/css/themes/sap_horizon_dark/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hc_auto/parameters-bundle.css +13 -1
- package/dist/css/themes/sap_horizon_hcb/parameters-bundle.css +1 -1
- package/dist/css/themes/sap_horizon_hcw/parameters-bundle.css +1 -1
- package/dist/custom-elements-internal.json +84 -23
- package/dist/custom-elements.json +76 -19
- package/dist/generated/assets/themes/sap_fiori_3/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_fiori_3_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_auto/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_dark/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hc_auto/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcb/parameters-bundle.css.json +1 -1
- package/dist/generated/assets/themes/sap_horizon_hcw/parameters-bundle.css.json +1 -1
- package/dist/generated/i18n/i18n-defaults.d.ts +3 -1
- package/dist/generated/i18n/i18n-defaults.js +3 -1
- package/dist/generated/i18n/i18n-defaults.js.map +1 -1
- package/dist/generated/themes/Breadcrumbs.css.d.ts +1 -1
- package/dist/generated/themes/Breadcrumbs.css.js +1 -1
- package/dist/generated/themes/Breadcrumbs.css.js.map +1 -1
- package/dist/generated/themes/Calendar.css.d.ts +1 -1
- package/dist/generated/themes/Calendar.css.js +1 -1
- package/dist/generated/themes/Calendar.css.js.map +1 -1
- package/dist/generated/themes/DatePickerPopover.css.d.ts +1 -1
- package/dist/generated/themes/DatePickerPopover.css.js +1 -1
- package/dist/generated/themes/DatePickerPopover.css.js.map +1 -1
- package/dist/generated/themes/Popup.css.d.ts +1 -1
- package/dist/generated/themes/Popup.css.js +1 -1
- package/dist/generated/themes/Popup.css.js.map +1 -1
- package/dist/generated/themes/ResponsivePopoverCommon.css.d.ts +1 -1
- package/dist/generated/themes/ResponsivePopoverCommon.css.js +1 -1
- package/dist/generated/themes/ResponsivePopoverCommon.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_fiori_3_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.js +8 -0
- package/dist/generated/themes/sap_horizon_auto/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_dark/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.js +13 -1
- package/dist/generated/themes/sap_horizon_hc_auto/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcb/parameters-bundle.css.js.map +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.d.ts +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js +1 -1
- package/dist/generated/themes/sap_horizon_hcw/parameters-bundle.css.js.map +1 -1
- package/dist/vscode.html-custom-data.json +20 -5
- package/dist/web-types.json +41 -11
- package/package.json +9 -9
- package/src/CalendarHeaderTemplate.tsx +148 -77
- package/src/CalendarTemplate.tsx +203 -66
- package/src/DateRangePickerTemplate.tsx +29 -1
- package/src/SliderTemplate.tsx +0 -1
- package/src/i18n/messagebundle.properties +6 -0
- package/src/themes/Breadcrumbs.css +7 -6
- package/src/themes/Calendar.css +144 -0
- package/src/themes/DatePickerPopover.css +3 -2
- package/src/themes/Popup.css +4 -0
- package/src/themes/ResponsivePopoverCommon.css +6 -1
- package/src/themes/base/CalendarHeader-parameters.css +9 -0
- package/src/themes/base/TextArea-parameters.css +1 -1
- package/src/themes/base/sizes-parameters.css +12 -0
- package/src/themes/sap_horizon/TextArea-parameters.css +0 -1
- package/src/themes/sap_horizon_dark/TextArea-parameters.css +0 -1
- package/src/themes/sap_horizon_hcb/parameters-bundle.css +1 -0
- package/src/themes/sap_horizon_hcw/parameters-bundle.css +1 -0
package/dist/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@ui5/webcomponents",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.22.0-rc.0",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -620,6 +620,11 @@
|
|
|
620
620
|
"description": "Defines the icon, displayed as graphical element within the component after the button text.\n\n**Note:** It is highly recommended to use `endIcon` property only together with `icon` and/or `text` properties.\nUsage of `endIcon` only should be avoided.\n\nThe SAP-icons font provides numerous options.\n\nExample:\nSee all the available icons within the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).",
|
|
621
621
|
"value": { "type": "string | undefined", "default": "undefined" }
|
|
622
622
|
},
|
|
623
|
+
{
|
|
624
|
+
"name": "form",
|
|
625
|
+
"description": "Associates the button with a form element by the form's `id` attribute.\nWhen set, the button can submit or reset the specified form even if the button\nis not a descendant of that form.\n\n**Note:** This property takes effect only when the button's \"type\" property is set to \"Submit\" or \"Reset\".",
|
|
626
|
+
"value": { "type": "string | undefined", "default": "undefined" }
|
|
627
|
+
},
|
|
623
628
|
{
|
|
624
629
|
"name": "icon",
|
|
625
630
|
"description": "Defines the icon, displayed as graphical element within the component.\nThe SAP-icons font provides numerous options.\n\nExample:\nSee all the available icons within the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).",
|
|
@@ -711,6 +716,11 @@
|
|
|
711
716
|
"description": "Defines the icon, displayed as graphical element within the component after the button text.\n\n**Note:** It is highly recommended to use `endIcon` property only together with `icon` and/or `text` properties.\nUsage of `endIcon` only should be avoided.\n\nThe SAP-icons font provides numerous options.\n\nExample:\nSee all the available icons within the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).",
|
|
712
717
|
"value": { "type": "string | undefined" }
|
|
713
718
|
},
|
|
719
|
+
{
|
|
720
|
+
"name": "form",
|
|
721
|
+
"description": "Associates the button with a form element by the form's `id` attribute.\nWhen set, the button can submit or reset the specified form even if the button\nis not a descendant of that form.\n\n**Note:** This property takes effect only when the button's \"type\" property is set to \"Submit\" or \"Reset\".",
|
|
722
|
+
"value": { "type": "string | undefined" }
|
|
723
|
+
},
|
|
714
724
|
{
|
|
715
725
|
"name": "icon",
|
|
716
726
|
"description": "Defines the icon, displayed as graphical element within the component.\nThe SAP-icons font provides numerous options.\n\nExample:\nSee all the available icons within the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).",
|
|
@@ -2659,6 +2669,11 @@
|
|
|
2659
2669
|
"description": "Defines whether the clear icon of the input will be shown.",
|
|
2660
2670
|
"value": { "type": "boolean", "default": "false" }
|
|
2661
2671
|
},
|
|
2672
|
+
{
|
|
2673
|
+
"name": "show-two-months",
|
|
2674
|
+
"description": "Defines whether the component displays two months side by side in the picker popup.\n\nWhen enabled, two consecutive months are shown, making it easier to select date ranges\nthat span multiple months without the need to navigate between months.\n\n**Note:** On mobile devices only a single month\nwill be displayed regardless of this setting.",
|
|
2675
|
+
"value": { "type": "boolean", "default": "false" }
|
|
2676
|
+
},
|
|
2662
2677
|
{
|
|
2663
2678
|
"name": "start-date-value",
|
|
2664
2679
|
"description": "Returns the start date of the currently selected range as JavaScript Date instance.",
|
|
@@ -2839,6 +2854,11 @@
|
|
|
2839
2854
|
"description": "Defines whether the clear icon of the input will be shown.",
|
|
2840
2855
|
"value": { "type": "boolean" }
|
|
2841
2856
|
},
|
|
2857
|
+
{
|
|
2858
|
+
"name": "show-two-months",
|
|
2859
|
+
"description": "Defines whether the component displays two months side by side in the picker popup.\n\nWhen enabled, two consecutive months are shown, making it easier to select date ranges\nthat span multiple months without the need to navigate between months.\n\n**Note:** On mobile devices only a single month\nwill be displayed regardless of this setting.",
|
|
2860
|
+
"value": { "type": "boolean" }
|
|
2861
|
+
},
|
|
2842
2862
|
{
|
|
2843
2863
|
"name": "start-date-value",
|
|
2844
2864
|
"description": "Returns the start date of the currently selected range as JavaScript Date instance.",
|
|
@@ -8814,11 +8834,6 @@
|
|
|
8814
8834
|
"description": "Defines whether the slider handle is active.\n<br><br>\n<b>Note:</b> An active slider handle is currently being interacted with.",
|
|
8815
8835
|
"value": { "type": "boolean", "default": "false" }
|
|
8816
8836
|
},
|
|
8817
|
-
{
|
|
8818
|
-
"name": "disabled",
|
|
8819
|
-
"description": "Defines whether the slider handle is disabled.\n<br><br>\n<b>Note:</b> A disabled slider handle cannot be interacted with.",
|
|
8820
|
-
"value": { "type": "boolean", "default": "false" }
|
|
8821
|
-
},
|
|
8822
8837
|
{
|
|
8823
8838
|
"name": "max",
|
|
8824
8839
|
"description": "Defines the maximum value of the slider handle.\n<br><br>\n<b>Note:</b> The value should be greater than the <code>min</code> property of the parent <code>ui5-slider</code>.",
|
|
@@ -8843,11 +8858,6 @@
|
|
|
8843
8858
|
"description": "Defines whether the slider handle is active.\n<br><br>\n<b>Note:</b> An active slider handle is currently being interacted with.",
|
|
8844
8859
|
"value": { "type": "boolean" }
|
|
8845
8860
|
},
|
|
8846
|
-
{
|
|
8847
|
-
"name": "disabled",
|
|
8848
|
-
"description": "Defines whether the slider handle is disabled.\n<br><br>\n<b>Note:</b> A disabled slider handle cannot be interacted with.",
|
|
8849
|
-
"value": { "type": "boolean" }
|
|
8850
|
-
},
|
|
8851
8861
|
{
|
|
8852
8862
|
"name": "max",
|
|
8853
8863
|
"description": "Defines the maximum value of the slider handle.\n<br><br>\n<b>Note:</b> The value should be greater than the <code>min</code> property of the parent <code>ui5-slider</code>.",
|
|
@@ -11548,6 +11558,11 @@
|
|
|
11548
11558
|
"description": "Defines the icon, displayed as graphical element within the component after the button text.\n\n**Note:** It is highly recommended to use `endIcon` property only together with `icon` and/or `text` properties.\nUsage of `endIcon` only should be avoided.\n\nThe SAP-icons font provides numerous options.\n\nExample:\nSee all the available icons within the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).",
|
|
11549
11559
|
"value": { "type": "string | undefined", "default": "undefined" }
|
|
11550
11560
|
},
|
|
11561
|
+
{
|
|
11562
|
+
"name": "form",
|
|
11563
|
+
"description": "Associates the button with a form element by the form's `id` attribute.\nWhen set, the button can submit or reset the specified form even if the button\nis not a descendant of that form.\n\n**Note:** This property takes effect only when the button's \"type\" property is set to \"Submit\" or \"Reset\".",
|
|
11564
|
+
"value": { "type": "string | undefined", "default": "undefined" }
|
|
11565
|
+
},
|
|
11551
11566
|
{
|
|
11552
11567
|
"name": "icon",
|
|
11553
11568
|
"description": "Defines the icon, displayed as graphical element within the component.\nThe SAP-icons font provides numerous options.\n\nExample:\nSee all the available icons within the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).",
|
|
@@ -11644,6 +11659,11 @@
|
|
|
11644
11659
|
"description": "Defines the icon, displayed as graphical element within the component after the button text.\n\n**Note:** It is highly recommended to use `endIcon` property only together with `icon` and/or `text` properties.\nUsage of `endIcon` only should be avoided.\n\nThe SAP-icons font provides numerous options.\n\nExample:\nSee all the available icons within the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).",
|
|
11645
11660
|
"value": { "type": "string | undefined" }
|
|
11646
11661
|
},
|
|
11662
|
+
{
|
|
11663
|
+
"name": "form",
|
|
11664
|
+
"description": "Associates the button with a form element by the form's `id` attribute.\nWhen set, the button can submit or reset the specified form even if the button\nis not a descendant of that form.\n\n**Note:** This property takes effect only when the button's \"type\" property is set to \"Submit\" or \"Reset\".",
|
|
11665
|
+
"value": { "type": "string | undefined" }
|
|
11666
|
+
},
|
|
11647
11667
|
{
|
|
11648
11668
|
"name": "icon",
|
|
11649
11669
|
"description": "Defines the icon, displayed as graphical element within the component.\nThe SAP-icons font provides numerous options.\n\nExample:\nSee all the available icons within the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).",
|
|
@@ -11742,6 +11762,11 @@
|
|
|
11742
11762
|
"description": "Defines the icon, displayed as graphical element within the component after the button text.\n\n**Note:** It is highly recommended to use `endIcon` property only together with `icon` and/or `text` properties.\nUsage of `endIcon` only should be avoided.\n\nThe SAP-icons font provides numerous options.\n\nExample:\nSee all the available icons within the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).",
|
|
11743
11763
|
"value": { "type": "string | undefined", "default": "undefined" }
|
|
11744
11764
|
},
|
|
11765
|
+
{
|
|
11766
|
+
"name": "form",
|
|
11767
|
+
"description": "Associates the button with a form element by the form's `id` attribute.\nWhen set, the button can submit or reset the specified form even if the button\nis not a descendant of that form.\n\n**Note:** This property takes effect only when the button's \"type\" property is set to \"Submit\" or \"Reset\".",
|
|
11768
|
+
"value": { "type": "string | undefined", "default": "undefined" }
|
|
11769
|
+
},
|
|
11745
11770
|
{
|
|
11746
11771
|
"name": "icon",
|
|
11747
11772
|
"description": "Defines the icon, displayed as graphical element within the component.\nThe SAP-icons font provides numerous options.\n\nExample:\nSee all the available icons within the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).",
|
|
@@ -11838,6 +11863,11 @@
|
|
|
11838
11863
|
"description": "Defines the icon, displayed as graphical element within the component after the button text.\n\n**Note:** It is highly recommended to use `endIcon` property only together with `icon` and/or `text` properties.\nUsage of `endIcon` only should be avoided.\n\nThe SAP-icons font provides numerous options.\n\nExample:\nSee all the available icons within the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).",
|
|
11839
11864
|
"value": { "type": "string | undefined" }
|
|
11840
11865
|
},
|
|
11866
|
+
{
|
|
11867
|
+
"name": "form",
|
|
11868
|
+
"description": "Associates the button with a form element by the form's `id` attribute.\nWhen set, the button can submit or reset the specified form even if the button\nis not a descendant of that form.\n\n**Note:** This property takes effect only when the button's \"type\" property is set to \"Submit\" or \"Reset\".",
|
|
11869
|
+
"value": { "type": "string | undefined" }
|
|
11870
|
+
},
|
|
11841
11871
|
{
|
|
11842
11872
|
"name": "icon",
|
|
11843
11873
|
"description": "Defines the icon, displayed as graphical element within the component.\nThe SAP-icons font provides numerous options.\n\nExample:\nSee all the available icons within the [Icon Explorer](https://sdk.openui5.org/test-resources/sap/m/demokit/iconExplorer/webapp/index.html).",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ui5/webcomponents",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.22.0-rc.0",
|
|
4
4
|
"description": "UI5 Web Components: webcomponents.main",
|
|
5
5
|
"ui5": {
|
|
6
6
|
"webComponentsPackage": true
|
|
@@ -54,22 +54,22 @@
|
|
|
54
54
|
"directory": "packages/main"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@ui5/webcomponents-base": "2.
|
|
58
|
-
"@ui5/webcomponents-icons": "2.
|
|
59
|
-
"@ui5/webcomponents-icons-business-suite": "2.
|
|
60
|
-
"@ui5/webcomponents-icons-tnt": "2.
|
|
61
|
-
"@ui5/webcomponents-localization": "2.
|
|
62
|
-
"@ui5/webcomponents-theming": "2.
|
|
57
|
+
"@ui5/webcomponents-base": "2.22.0-rc.0",
|
|
58
|
+
"@ui5/webcomponents-icons": "2.22.0-rc.0",
|
|
59
|
+
"@ui5/webcomponents-icons-business-suite": "2.22.0-rc.0",
|
|
60
|
+
"@ui5/webcomponents-icons-tnt": "2.22.0-rc.0",
|
|
61
|
+
"@ui5/webcomponents-localization": "2.22.0-rc.0",
|
|
62
|
+
"@ui5/webcomponents-theming": "2.22.0-rc.0"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@custom-elements-manifest/analyzer": "^0.10.10",
|
|
66
66
|
"@ui5/cypress-internal": "0.1.0",
|
|
67
|
-
"@ui5/webcomponents-tools": "2.
|
|
67
|
+
"@ui5/webcomponents-tools": "2.22.0-rc.0",
|
|
68
68
|
"cypress": "15.9.0",
|
|
69
69
|
"jsdom": "^26.0.0",
|
|
70
70
|
"lit": "^2.0.0",
|
|
71
71
|
"vite": "5.4.21",
|
|
72
72
|
"vitest": "^3.0.2"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "8b8cd84a2bf81d5b7affa6233f990e85c455b931"
|
|
75
75
|
}
|
|
@@ -4,91 +4,155 @@ import Icon from "./Icon.js";
|
|
|
4
4
|
import slimArowLeft from "@ui5/webcomponents-icons/dist/slim-arrow-left.js";
|
|
5
5
|
import slimArowRight from "@ui5/webcomponents-icons/dist/slim-arrow-right.js";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
interface CalendarHeaderOptions {
|
|
8
|
+
headerText?: {
|
|
9
|
+
monthText: string;
|
|
10
|
+
yearText: string;
|
|
11
|
+
secondMonthText?: string;
|
|
12
|
+
secondYearText?: string;
|
|
13
|
+
};
|
|
14
|
+
isFirst?: boolean;
|
|
15
|
+
isLast?: boolean;
|
|
16
|
+
isMultiple?: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default function CalendarHeaderTemplate(this: Calendar, options?: CalendarHeaderOptions) {
|
|
20
|
+
const headerText = options?.headerText;
|
|
21
|
+
const isFirst = options?.isFirst ?? true;
|
|
22
|
+
const isLast = options?.isLast ?? true;
|
|
23
|
+
const isMultiple = options?.isMultiple ?? false;
|
|
24
|
+
|
|
25
|
+
const monthText = headerText?.monthText ?? this._headerMonthButtonText;
|
|
26
|
+
const yearText = headerText?.yearText ?? this._headerYearButtonText;
|
|
27
|
+
const secondMonthText = headerText?.secondMonthText ?? this.secondMonthButtonText;
|
|
28
|
+
const secondYearText = headerText?.secondYearText ?? this._headerYearButtonTextSecType;
|
|
29
|
+
|
|
8
30
|
return (
|
|
9
|
-
<div class="ui5-calheader-root">
|
|
31
|
+
<div class={isMultiple ? "ui5-calheader ui5-calheader-multiple" : "ui5-calheader-root"}>
|
|
32
|
+
{renderPrevButton.call(this, isFirst, isMultiple)}
|
|
33
|
+
{renderMiddleButtons.call(this, {
|
|
34
|
+
monthText: monthText || "",
|
|
35
|
+
yearText: yearText || "",
|
|
36
|
+
secondMonthText: secondMonthText || "",
|
|
37
|
+
secondYearText: secondYearText || "",
|
|
38
|
+
})}
|
|
39
|
+
{renderNextButton.call(this, isFirst, isLast, isMultiple)}
|
|
40
|
+
</div>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function renderPrevButton(this: Calendar, isFirst: boolean, isMultiple: boolean) {
|
|
45
|
+
if (!isFirst && isMultiple) {
|
|
46
|
+
return <div class="ui5-calheader-spacer"></div>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<div
|
|
51
|
+
data-ui5-cal-header-btn-prev
|
|
52
|
+
class={{
|
|
53
|
+
"ui5-calheader-arrowbtn": true,
|
|
54
|
+
"ui5-calheader-arrowbtn-disabled": this._previousButtonDisabled,
|
|
55
|
+
}}
|
|
56
|
+
part="calendar-header-arrow-button"
|
|
57
|
+
role="button"
|
|
58
|
+
onMouseDown={this.onPrevButtonClick}
|
|
59
|
+
tabindex={this._previousButtonDisabled ? -1 : 0}
|
|
60
|
+
title={this.accInfo.tooltipPrevButton}
|
|
61
|
+
aria-label={this.accInfo.ariaLabelPrevButton}
|
|
62
|
+
aria-description={this.accInfo.ariaLabelPrevButton}
|
|
63
|
+
aria-keyshortcuts={this.accInfo.keyShortcutPrevButton}
|
|
64
|
+
>
|
|
65
|
+
<Icon class="ui5-calheader-arrowicon" name={slimArowLeft}/>
|
|
66
|
+
</div>
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function renderMiddleButtons(
|
|
71
|
+
this: Calendar,
|
|
72
|
+
headerText: {
|
|
73
|
+
monthText: string;
|
|
74
|
+
yearText: string;
|
|
75
|
+
secondMonthText?: string;
|
|
76
|
+
secondYearText?: string;
|
|
77
|
+
}
|
|
78
|
+
) {
|
|
79
|
+
return (
|
|
80
|
+
<div class="ui5-calheader-midcontainer">
|
|
10
81
|
<div
|
|
11
|
-
data-ui5-cal-header-btn-
|
|
12
|
-
class=
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
part="calendar-header-arrow-button"
|
|
82
|
+
data-ui5-cal-header-btn-month
|
|
83
|
+
class="ui5-calheader-arrowbtn ui5-calheader-middlebtn"
|
|
84
|
+
part="calendar-header-middle-button"
|
|
85
|
+
hidden={this._isHeaderMonthButtonHidden}
|
|
86
|
+
tabindex={0}
|
|
17
87
|
role="button"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
title={this.accInfo.
|
|
21
|
-
aria-
|
|
22
|
-
|
|
23
|
-
|
|
88
|
+
aria-label={this.accInfo.ariaLabelMonthButton}
|
|
89
|
+
aria-description={this.accInfo.ariaLabelMonthButton}
|
|
90
|
+
title={this.accInfo.tooltipMonthButton}
|
|
91
|
+
aria-keyshortcuts={this.accInfo.keyShortcutMonthButton}
|
|
92
|
+
onClick={this.onHeaderMonthButtonPress}
|
|
93
|
+
onKeyDown={this.onMonthButtonKeyDown}
|
|
94
|
+
onKeyUp={this.onMonthButtonKeyUp}
|
|
24
95
|
>
|
|
25
|
-
<
|
|
96
|
+
<span>{headerText.monthText}</span>
|
|
97
|
+
{this.hasSecondaryCalendarType && headerText.secondMonthText &&
|
|
98
|
+
<span class="ui5-calheader-btn-sectext">{headerText.secondMonthText}</span>
|
|
99
|
+
}
|
|
26
100
|
</div>
|
|
27
101
|
|
|
28
|
-
<div
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
>
|
|
44
|
-
|
|
45
|
-
{
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
</div>
|
|
102
|
+
<div
|
|
103
|
+
data-ui5-cal-header-btn-year
|
|
104
|
+
class="ui5-calheader-arrowbtn ui5-calheader-middlebtn"
|
|
105
|
+
part="calendar-header-middle-button"
|
|
106
|
+
hidden={this._isHeaderYearButtonHidden}
|
|
107
|
+
tabindex={0}
|
|
108
|
+
role="button"
|
|
109
|
+
aria-label={this.accInfo.ariaLabelYearButton}
|
|
110
|
+
aria-description={this.accInfo.ariaLabelYearButton}
|
|
111
|
+
onClick={this.onHeaderYearButtonPress}
|
|
112
|
+
onKeyDown={this.onYearButtonKeyDown}
|
|
113
|
+
onKeyUp={this.onYearButtonKeyUp}
|
|
114
|
+
title={this.accInfo.tooltipYearButton}
|
|
115
|
+
aria-keyshortcuts={this.accInfo.keyShortcutYearButton}
|
|
116
|
+
>
|
|
117
|
+
<span>{headerText.yearText}</span>
|
|
118
|
+
{this.hasSecondaryCalendarType && headerText.secondYearText &&
|
|
119
|
+
<span class="ui5-calheader-btn-sectext">{headerText.secondYearText}</span>
|
|
120
|
+
}
|
|
121
|
+
</div>
|
|
49
122
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
</div>
|
|
70
|
-
<div
|
|
71
|
-
data-ui5-cal-header-btn-year-range
|
|
72
|
-
class="ui5-calheader-arrowbtn ui5-calheader-middlebtn"
|
|
73
|
-
part="calendar-header-middle-button"
|
|
74
|
-
hidden={this._isHeaderYearRangeButtonHidden}
|
|
75
|
-
tabindex={0}
|
|
76
|
-
role="button"
|
|
77
|
-
aria-label={this.accInfo.ariaLabelYearRangeButton}
|
|
78
|
-
aria-description={this.accInfo.ariaLabelYearRangeButton}
|
|
79
|
-
title={this.accInfo.tooltipYearRangeButton}
|
|
80
|
-
aria-keyshortcuts={this.accInfo.keyShortcutYearRangeButton}
|
|
81
|
-
onClick={this.onHeaderYearRangeButtonPress}
|
|
82
|
-
onKeyDown={this.onYearRangeButtonKeyDown}
|
|
83
|
-
onKeyUp={this.onYearRangeButtonKeyUp}
|
|
84
|
-
>
|
|
85
|
-
<span>{this._headerYearRangeButtonText}</span>
|
|
86
|
-
{this.hasSecondaryCalendarType &&
|
|
87
|
-
<span class="ui5-calheader-btn-sectext">{this._headerYearRangeButtonTextSecType}</span>
|
|
88
|
-
}
|
|
89
|
-
</div>
|
|
123
|
+
<div
|
|
124
|
+
data-ui5-cal-header-btn-year-range
|
|
125
|
+
class="ui5-calheader-arrowbtn ui5-calheader-middlebtn"
|
|
126
|
+
part="calendar-header-middle-button"
|
|
127
|
+
hidden={this._isHeaderYearRangeButtonHidden}
|
|
128
|
+
tabindex={0}
|
|
129
|
+
role="button"
|
|
130
|
+
aria-label={this.accInfo.ariaLabelYearRangeButton}
|
|
131
|
+
aria-description={this.accInfo.ariaLabelYearRangeButton}
|
|
132
|
+
title={this.accInfo.tooltipYearRangeButton}
|
|
133
|
+
aria-keyshortcuts={this.accInfo.keyShortcutYearRangeButton}
|
|
134
|
+
onClick={this.onHeaderYearRangeButtonPress}
|
|
135
|
+
onKeyDown={this.onYearRangeButtonKeyDown}
|
|
136
|
+
onKeyUp={this.onYearRangeButtonKeyUp}
|
|
137
|
+
>
|
|
138
|
+
<span>{this._headerYearRangeButtonText}</span>
|
|
139
|
+
{this.hasSecondaryCalendarType &&
|
|
140
|
+
<span class="ui5-calheader-btn-sectext">{this._headerYearRangeButtonTextSecType}</span>
|
|
141
|
+
}
|
|
90
142
|
</div>
|
|
143
|
+
</div>
|
|
144
|
+
);
|
|
145
|
+
}
|
|
91
146
|
|
|
147
|
+
function renderNextButton(this: Calendar, isFirst: boolean, isLast: boolean, isMultiple: boolean) {
|
|
148
|
+
// In portrait or compact mode, show next button only on first calendar
|
|
149
|
+
// In landscape mode, show next button only on last calendar
|
|
150
|
+
const isVertical = this._portraitView || this._isCompactMode;
|
|
151
|
+
const shouldShowNextButton = !isMultiple || (isVertical ? isFirst : isLast);
|
|
152
|
+
const shouldShowSpacer = isMultiple && (isVertical ? isLast : !isLast);
|
|
153
|
+
|
|
154
|
+
if (shouldShowNextButton) {
|
|
155
|
+
return (
|
|
92
156
|
<div
|
|
93
157
|
data-ui5-cal-header-btn-next
|
|
94
158
|
class={{
|
|
@@ -106,5 +170,12 @@ export default function CalendarTemplate(this: Calendar) {
|
|
|
106
170
|
>
|
|
107
171
|
<Icon class="ui5-calheader-arrowicon" name={slimArowRight}/>
|
|
108
172
|
</div>
|
|
109
|
-
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
if (shouldShowSpacer) {
|
|
177
|
+
return <div class="ui5-calheader-spacer"></div>;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
return null;
|
|
110
181
|
}
|