@ui5/webcomponents 2.19.2 → 2.20.0-rc.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 +32 -4
- package/dist/.tsbuildinfo +1 -1
- package/dist/Avatar.d.ts +23 -2
- package/dist/Avatar.js +41 -4
- package/dist/Avatar.js.map +1 -1
- package/dist/AvatarGroup.d.ts +5 -0
- package/dist/AvatarGroup.js +17 -10
- package/dist/AvatarGroup.js.map +1 -1
- package/dist/AvatarTemplate.js +1 -1
- package/dist/AvatarTemplate.js.map +1 -1
- package/dist/Breadcrumbs.d.ts +4 -1
- package/dist/Breadcrumbs.js +4 -0
- package/dist/Breadcrumbs.js.map +1 -1
- package/dist/ColorPalette.d.ts +14 -0
- package/dist/ColorPalette.js +11 -1
- package/dist/ColorPalette.js.map +1 -1
- package/dist/ColorPalettePopover.d.ts +14 -0
- package/dist/ColorPalettePopover.js +6 -0
- package/dist/ColorPalettePopover.js.map +1 -1
- package/dist/ColorPalettePopoverTemplate.js +1 -1
- package/dist/ColorPalettePopoverTemplate.js.map +1 -1
- package/dist/ColorPaletteTemplate.js +1 -1
- package/dist/ColorPaletteTemplate.js.map +1 -1
- package/dist/ColorPicker.d.ts +14 -0
- package/dist/ColorPicker.js +11 -1
- package/dist/ColorPicker.js.map +1 -1
- package/dist/ColorPickerTemplate.js +1 -1
- package/dist/ColorPickerTemplate.js.map +1 -1
- package/dist/DateComponentBase.d.ts +2 -2
- package/dist/DateComponentBase.js +1 -1
- package/dist/DateComponentBase.js.map +1 -1
- package/dist/DatePicker.d.ts +3 -2
- package/dist/DatePicker.js +6 -3
- package/dist/DatePicker.js.map +1 -1
- package/dist/DatePickerPopoverTemplate.js +8 -4
- package/dist/DatePickerPopoverTemplate.js.map +1 -1
- package/dist/List.js +6 -0
- package/dist/List.js.map +1 -1
- package/dist/ListItemCustom.d.ts +21 -1
- package/dist/ListItemCustom.js +86 -2
- package/dist/ListItemCustom.js.map +1 -1
- package/dist/ListItemGroup.d.ts +1 -0
- package/dist/ListItemGroup.js +1 -0
- package/dist/ListItemGroup.js.map +1 -1
- package/dist/ListItemGroupTemplate.js +1 -1
- package/dist/ListItemGroupTemplate.js.map +1 -1
- package/dist/Menu.d.ts +2 -1
- package/dist/Menu.js +14 -7
- package/dist/Menu.js.map +1 -1
- package/dist/MenuItem.d.ts +1 -0
- package/dist/MenuItem.js +6 -2
- package/dist/MenuItem.js.map +1 -1
- package/dist/MultiComboBoxPopoverTemplate.js +2 -1
- package/dist/MultiComboBoxPopoverTemplate.js.map +1 -1
- package/dist/MultiInputTemplate.js +2 -1
- package/dist/MultiInputTemplate.js.map +1 -1
- package/dist/Panel.d.ts +3 -0
- package/dist/Panel.js +13 -0
- package/dist/Panel.js.map +1 -1
- package/dist/PanelTemplate.js +1 -1
- package/dist/PanelTemplate.js.map +1 -1
- package/dist/RatingIndicator.d.ts +17 -0
- package/dist/RatingIndicator.js +12 -0
- package/dist/RatingIndicator.js.map +1 -1
- package/dist/RatingIndicatorTemplate.js +6 -8
- package/dist/RatingIndicatorTemplate.js.map +1 -1
- package/dist/SplitButton.d.ts +2 -0
- package/dist/SplitButton.js +5 -0
- package/dist/SplitButton.js.map +1 -1
- package/dist/StepInput.js +2 -2
- package/dist/StepInput.js.map +1 -1
- package/dist/Switch.js +2 -2
- package/dist/Switch.js.map +1 -1
- package/dist/TimePickerPopoverTemplate.js +2 -3
- package/dist/TimePickerPopoverTemplate.js.map +1 -1
- package/dist/Tokenizer.js +2 -2
- package/dist/Tokenizer.js.map +1 -1
- package/dist/Toolbar.d.ts +5 -2
- package/dist/Toolbar.js +29 -4
- package/dist/Toolbar.js.map +1 -1
- package/dist/ToolbarItem.d.ts +40 -1
- package/dist/ToolbarItem.js +97 -2
- package/dist/ToolbarItem.js.map +1 -1
- package/dist/ToolbarItemTemplate.d.ts +2 -0
- package/dist/ToolbarItemTemplate.js +5 -0
- package/dist/ToolbarItemTemplate.js.map +1 -0
- package/dist/ToolbarTemplate.js +9 -8
- package/dist/ToolbarTemplate.js.map +1 -1
- package/dist/bundle.esm.js +1 -0
- package/dist/bundle.esm.js.map +1 -1
- package/dist/css/themes/Avatar.css +1 -1
- package/dist/css/themes/Bar.css +1 -1
- package/dist/css/themes/DatePickerPopover.css +1 -1
- package/dist/css/themes/Panel.css +1 -1
- package/dist/css/themes/RatingIndicator.css +1 -1
- package/dist/css/themes/ResponsivePopoverCommon.css +1 -1
- package/dist/css/themes/TimePickerPopover.css +1 -1
- package/dist/css/themes/Toolbar.css +1 -1
- package/dist/css/themes/ToolbarItem.css +1 -0
- package/dist/css/themes/ToolbarPopover.css +1 -1
- package/dist/custom-elements-internal.json +476 -11
- package/dist/custom-elements.json +340 -7
- package/dist/features/InputSuggestionsTemplate.js +2 -1
- package/dist/features/InputSuggestionsTemplate.js.map +1 -1
- package/dist/generated/assets/i18n/messagebundle_ar.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_bg.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ca.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cnr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cs.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_cy.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_da.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_de.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_el.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_GB.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_US_sappsd.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_US_saprigi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_en_US_saptrc.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_es.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_es_MX.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_et.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_fr_CA.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_hu.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_id.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_it.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_iw.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ja.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_kk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ko.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_lt.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_lv.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_mk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ms.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_nl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_no.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pt.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_pt_PT.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ro.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_ru.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sh.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sl.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_sv.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_th.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_tr.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_uk.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_vi.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_zh_CN.json +1 -1
- package/dist/generated/assets/i18n/messagebundle_zh_TW.json +1 -1
- package/dist/generated/i18n/i18n-defaults.d.ts +2 -2
- package/dist/generated/i18n/i18n-defaults.js +2 -2
- package/dist/generated/i18n/i18n-defaults.js.map +1 -1
- package/dist/generated/themes/Avatar.css.d.ts +1 -1
- package/dist/generated/themes/Avatar.css.js +1 -1
- package/dist/generated/themes/Avatar.css.js.map +1 -1
- package/dist/generated/themes/Bar.css.d.ts +1 -1
- package/dist/generated/themes/Bar.css.js +1 -1
- package/dist/generated/themes/Bar.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/Panel.css.d.ts +1 -1
- package/dist/generated/themes/Panel.css.js +1 -1
- package/dist/generated/themes/Panel.css.js.map +1 -1
- package/dist/generated/themes/RatingIndicator.css.d.ts +1 -1
- package/dist/generated/themes/RatingIndicator.css.js +1 -1
- package/dist/generated/themes/RatingIndicator.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/TimePickerPopover.css.d.ts +1 -1
- package/dist/generated/themes/TimePickerPopover.css.js +1 -1
- package/dist/generated/themes/TimePickerPopover.css.js.map +1 -1
- package/dist/generated/themes/Toolbar.css.d.ts +1 -1
- package/dist/generated/themes/Toolbar.css.js +1 -1
- package/dist/generated/themes/Toolbar.css.js.map +1 -1
- package/dist/generated/themes/ToolbarItem.css.d.ts +2 -0
- package/dist/generated/themes/ToolbarItem.css.js +8 -0
- package/dist/generated/themes/ToolbarItem.css.js.map +1 -0
- package/dist/generated/themes/ToolbarPopover.css.d.ts +1 -1
- package/dist/generated/themes/ToolbarPopover.css.js +1 -1
- package/dist/generated/themes/ToolbarPopover.css.js.map +1 -1
- package/dist/types/AvatarMode.d.ts +30 -0
- package/dist/types/AvatarMode.js +32 -0
- package/dist/types/AvatarMode.js.map +1 -0
- package/dist/vscode.html-custom-data.json +64 -14
- package/dist/web-types.json +234 -19
- package/package.json +10 -10
- package/src/AvatarTemplate.tsx +1 -0
- package/src/ColorPalettePopoverTemplate.tsx +3 -0
- package/src/ColorPaletteTemplate.tsx +1 -1
- package/src/ColorPickerTemplate.tsx +2 -2
- package/src/DatePickerPopoverTemplate.tsx +21 -10
- package/src/ListItemGroupTemplate.tsx +9 -3
- package/src/MultiComboBoxPopoverTemplate.tsx +8 -1
- package/src/MultiInputTemplate.tsx +2 -1
- package/src/PanelTemplate.tsx +2 -0
- package/src/RatingIndicatorTemplate.tsx +10 -10
- package/src/TimePickerPopoverTemplate.tsx +1 -9
- package/src/ToolbarItemTemplate.tsx +7 -0
- package/src/ToolbarTemplate.tsx +9 -16
- package/src/features/InputSuggestionsTemplate.tsx +9 -2
- package/src/i18n/messagebundle.properties +5 -5
- package/src/i18n/messagebundle_ar.properties +14 -8
- package/src/i18n/messagebundle_bg.properties +14 -8
- package/src/i18n/messagebundle_ca.properties +14 -8
- package/src/i18n/messagebundle_cnr.properties +14 -8
- package/src/i18n/messagebundle_cs.properties +14 -8
- package/src/i18n/messagebundle_cy.properties +14 -8
- package/src/i18n/messagebundle_da.properties +14 -8
- package/src/i18n/messagebundle_de.properties +14 -8
- package/src/i18n/messagebundle_el.properties +14 -8
- package/src/i18n/messagebundle_en.properties +14 -8
- package/src/i18n/messagebundle_en_GB.properties +14 -8
- package/src/i18n/messagebundle_en_US_sappsd.properties +17 -11
- package/src/i18n/messagebundle_en_US_saprigi.properties +17 -11
- package/src/i18n/messagebundle_en_US_saptrc.properties +17 -11
- package/src/i18n/messagebundle_es.properties +16 -10
- package/src/i18n/messagebundle_es_MX.properties +15 -9
- package/src/i18n/messagebundle_et.properties +14 -8
- package/src/i18n/messagebundle_fi.properties +14 -8
- package/src/i18n/messagebundle_fr.properties +14 -8
- package/src/i18n/messagebundle_fr_CA.properties +15 -9
- package/src/i18n/messagebundle_hi.properties +14 -8
- package/src/i18n/messagebundle_hr.properties +14 -8
- package/src/i18n/messagebundle_hu.properties +14 -8
- package/src/i18n/messagebundle_id.properties +14 -8
- package/src/i18n/messagebundle_it.properties +14 -8
- package/src/i18n/messagebundle_iw.properties +14 -8
- package/src/i18n/messagebundle_ja.properties +14 -8
- package/src/i18n/messagebundle_kk.properties +14 -8
- package/src/i18n/messagebundle_ko.properties +14 -8
- package/src/i18n/messagebundle_lt.properties +14 -8
- package/src/i18n/messagebundle_lv.properties +14 -8
- package/src/i18n/messagebundle_mk.properties +14 -8
- package/src/i18n/messagebundle_ms.properties +14 -8
- package/src/i18n/messagebundle_nl.properties +14 -8
- package/src/i18n/messagebundle_no.properties +14 -8
- package/src/i18n/messagebundle_pl.properties +14 -8
- package/src/i18n/messagebundle_pt.properties +14 -8
- package/src/i18n/messagebundle_pt_PT.properties +14 -8
- package/src/i18n/messagebundle_ro.properties +14 -8
- package/src/i18n/messagebundle_ru.properties +14 -8
- package/src/i18n/messagebundle_sh.properties +14 -8
- package/src/i18n/messagebundle_sk.properties +14 -8
- package/src/i18n/messagebundle_sl.properties +14 -8
- package/src/i18n/messagebundle_sr.properties +14 -8
- package/src/i18n/messagebundle_sv.properties +14 -8
- package/src/i18n/messagebundle_th.properties +14 -8
- package/src/i18n/messagebundle_tr.properties +14 -8
- package/src/i18n/messagebundle_uk.properties +14 -8
- package/src/i18n/messagebundle_vi.properties +14 -8
- package/src/i18n/messagebundle_zh_CN.properties +14 -8
- package/src/i18n/messagebundle_zh_TW.properties +15 -9
- package/src/themes/Avatar.css +39 -14
- package/src/themes/Bar.css +1 -1
- package/src/themes/DatePickerPopover.css +24 -1
- package/src/themes/Panel.css +5 -1
- package/src/themes/RatingIndicator.css +26 -12
- package/src/themes/ResponsivePopoverCommon.css +1 -1
- package/src/themes/TimePickerPopover.css +7 -0
- package/src/themes/Toolbar.css +11 -3
- package/src/themes/ToolbarItem.css +8 -0
- package/src/themes/ToolbarPopover.css +1 -1
|
@@ -7,7 +7,7 @@ export default function ColorPaletteTemplate() {
|
|
|
7
7
|
"ui5-cp-root": true,
|
|
8
8
|
"ui5-cp-root-phone": isPhone(),
|
|
9
9
|
}, onClick: this._onclick, onKeyUp: this._onkeyup, onKeyDown: this._onkeydown, onMouseDown: this._onmousedown, children: [this.showDefaultColor &&
|
|
10
|
-
_jsxs("div", { class: "ui5-cp-default-color-button-wrapper", children: [_jsx(Button, { class: "ui5-cp-default-color-button", design: "Transparent", onClick: this._onDefaultColorClick, onKeyUp: this._onDefaultColorKeyUp, onKeyDown: this._onDefaultColorKeyDown, children: this.colorPaletteDefaultColorText }), _jsx("div", { class: "ui5-cp-separator" })] }), _jsx("div", { class: "ui5-cp-item-container", role: "
|
|
10
|
+
_jsxs("div", { class: "ui5-cp-default-color-button-wrapper", children: [_jsx(Button, { class: "ui5-cp-default-color-button", design: "Transparent", onClick: this._onDefaultColorClick, onKeyUp: this._onDefaultColorKeyUp, onKeyDown: this._onDefaultColorKeyDown, children: this.colorPaletteDefaultColorText }), _jsx("div", { class: "ui5-cp-separator" })] }), _jsx("div", { class: "ui5-cp-item-container", role: "group", "aria-label": this.colorContainerLabel, onKeyDown: this._onColorContainerKeyDown, children: this.displayedColors.map(color => _jsx("slot", { name: color._individualSlot })) }), this.showMoreColors &&
|
|
11
11
|
_jsxs("div", { class: "ui5-cp-more-colors-wrapper", children: [_jsx("div", { class: "ui5-cp-separator" }), _jsx(Button, { design: "Transparent", class: "ui5-cp-more-colors", onClick: this._openMoreColorsDialog, onKeyDown: this._onMoreColorsKeyDown, children: this.colorPaletteMoreColorsText })] }), this.showRecentColors &&
|
|
12
12
|
_jsxs("div", { class: "ui5-cp-recent-colors-wrapper", children: [_jsx("div", { class: "ui5-cp-separator" }), _jsx("div", { class: "ui5-cp-recent-colors-container", onKeyDown: this._onRecentColorsContainerKeyDown, children: this.recentColors.map(color => _jsx(ColorPaletteItem, { value: color })) })] })] }), this.showMoreColors && this.showMoreColorsTemplate?.call(this)] }));
|
|
13
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPaletteTemplate.js","sourceRoot":"","sources":["../src/ColorPaletteTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC;AAGjE,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AAErD,MAAM,CAAC,OAAO,UAAU,oBAAoB;IAC3C,OAAO,CACN,8BACC,eACC,KAAK,EAAE;oBACN,aAAa,EAAE,IAAI;oBACnB,mBAAmB,EAAE,OAAO,EAAE;iBAC9B,EACD,OAAO,EAAE,IAAI,CAAC,QAAQ,EACtB,OAAO,EAAE,IAAI,CAAC,QAAQ,EACtB,SAAS,EAAE,IAAI,CAAC,UAAU,EAC1B,WAAW,EAAE,IAAI,CAAC,YAAY,aAE7B,IAAI,CAAC,gBAAgB;wBACrB,eAAK,KAAK,EAAC,qCAAqC,aAC/C,KAAC,MAAM,IACN,KAAK,EAAC,6BAA6B,EACnC,MAAM,EAAC,aAAa,EACpB,OAAO,EAAE,IAAI,CAAC,oBAAoB,EAClC,OAAO,EAAE,IAAI,CAAC,oBAAoB,EAClC,SAAS,EAAE,IAAI,CAAC,sBAAsB,YAErC,IAAI,CAAC,4BAA4B,GAC1B,EACT,cAAK,KAAK,EAAC,kBAAkB,GAAO,IAC/B,EAEP,cAAK,KAAK,EAAC,uBAAuB,EACjC,IAAI,EAAC,
|
|
1
|
+
{"version":3,"file":"ColorPaletteTemplate.js","sourceRoot":"","sources":["../src/ColorPaletteTemplate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC;AAGjE,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AA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AAO,EACpC,cAAK,KAAK,EAAC,gCAAgC,EAAC,SAAS,EAAE,IAAI,CAAC,+BAA+B,YACzF,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAC9B,KAAC,gBAAgB,IAAC,KAAK,EAAE,KAAK,GAAG,CACjC,GACI,IACD,IAEF,EAEJ,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,sBAAsB,EAAE,IAAI,CAAC,IAAI,CAAC,IAC9D,CACH,CAAC;AACH,CAAC","sourcesContent":["import { isPhone } from \"@ui5/webcomponents-base/dist/Device.js\";\n\nimport type ColorPalette from \"./ColorPalette.js\";\nimport Button from \"./Button.js\";\nimport ColorPaletteItem from \"./ColorPaletteItem.js\";\n\nexport default function ColorPaletteTemplate(this: ColorPalette) {\n\treturn (\n\t\t<>\n\t\t\t<div\n\t\t\t\tclass={{\n\t\t\t\t\t\"ui5-cp-root\": true,\n\t\t\t\t\t\"ui5-cp-root-phone\": isPhone(),\n\t\t\t\t}}\n\t\t\t\tonClick={this._onclick}\n\t\t\t\tonKeyUp={this._onkeyup}\n\t\t\t\tonKeyDown={this._onkeydown}\n\t\t\t\tonMouseDown={this._onmousedown}\n\t\t\t>\n\t\t\t\t{this.showDefaultColor &&\n\t\t\t\t\t<div class=\"ui5-cp-default-color-button-wrapper\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclass=\"ui5-cp-default-color-button\"\n\t\t\t\t\t\t\tdesign=\"Transparent\"\n\t\t\t\t\t\t\tonClick={this._onDefaultColorClick}\n\t\t\t\t\t\t\tonKeyUp={this._onDefaultColorKeyUp}\n\t\t\t\t\t\t\tonKeyDown={this._onDefaultColorKeyDown}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{this.colorPaletteDefaultColorText}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<div class=\"ui5-cp-separator\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\t<div class=\"ui5-cp-item-container\"\n\t\t\t\t\trole=\"group\"\n\t\t\t\t\taria-label={this.colorContainerLabel}\n\t\t\t\t\tonKeyDown={this._onColorContainerKeyDown}\n\t\t\t\t>\n\t\t\t\t\t{this.displayedColors.map(color =>\n\t\t\t\t\t\t<slot name={color._individualSlot}></slot>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\n\t\t\t\t{this.showMoreColors &&\n\t\t\t\t\t<div class=\"ui5-cp-more-colors-wrapper\">\n\t\t\t\t\t\t<div class=\"ui5-cp-separator\"></div>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tdesign=\"Transparent\"\n\t\t\t\t\t\t\tclass=\"ui5-cp-more-colors\"\n\t\t\t\t\t\t\tonClick={this._openMoreColorsDialog}\n\t\t\t\t\t\t\tonKeyDown={this._onMoreColorsKeyDown}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{this.colorPaletteMoreColorsText}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\n\t\t\t\t{this.showRecentColors &&\n\t\t\t\t\t<div class=\"ui5-cp-recent-colors-wrapper\">\n\t\t\t\t\t\t<div class=\"ui5-cp-separator\"></div>\n\t\t\t\t\t\t<div class=\"ui5-cp-recent-colors-container\" onKeyDown={this._onRecentColorsContainerKeyDown}>\n\t\t\t\t\t\t\t{this.recentColors.map(color =>\n\t\t\t\t\t\t\t\t<ColorPaletteItem value={color}/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t</div>\n\n\t\t\t{ this.showMoreColors && this.showMoreColorsTemplate?.call(this) }\n\t\t</>\n\t);\n}\n"]}
|
package/dist/ColorPicker.d.ts
CHANGED
|
@@ -72,6 +72,20 @@ declare class ColorPicker extends UI5Element implements IFormInputElement {
|
|
|
72
72
|
* @since 2.5.0
|
|
73
73
|
*/
|
|
74
74
|
simplified: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Defines the accessible name of the component.
|
|
77
|
+
* @default undefined
|
|
78
|
+
* @public
|
|
79
|
+
* @since 2.20.0
|
|
80
|
+
*/
|
|
81
|
+
accessibleName?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Receives id(or many ids) of the elements that label the component.
|
|
84
|
+
* @default undefined
|
|
85
|
+
* @public
|
|
86
|
+
* @since 2.20.0
|
|
87
|
+
*/
|
|
88
|
+
accessibleNameRef?: string;
|
|
75
89
|
/**
|
|
76
90
|
* Defines the current main color which is selected via the hue slider and is shown in the main color square.
|
|
77
91
|
* @private
|
package/dist/ColorPicker.js
CHANGED
|
@@ -12,6 +12,7 @@ import event from "@ui5/webcomponents-base/dist/decorators/event-strict.js";
|
|
|
12
12
|
import { isEnter } from "@ui5/webcomponents-base/dist/Keys.js";
|
|
13
13
|
import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
|
|
14
14
|
import i18n from "@ui5/webcomponents-base/dist/decorators/i18n.js";
|
|
15
|
+
import { getEffectiveAriaLabelText } from "@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js";
|
|
15
16
|
import { getRGBColor, getAlpha, } from "@ui5/webcomponents-base/dist/util/ColorConversion.js";
|
|
16
17
|
import "@ui5/webcomponents-icons/dist/expand.js";
|
|
17
18
|
import ColorValue from "./colorpicker-utils/ColorValue.js";
|
|
@@ -389,7 +390,10 @@ let ColorPicker = ColorPicker_1 = class ColorPicker extends UI5Element {
|
|
|
389
390
|
&& this._colorValue.B === value.b;
|
|
390
391
|
}
|
|
391
392
|
get colorPickerLabel() {
|
|
392
|
-
|
|
393
|
+
const effectiveLabel = getEffectiveAriaLabelText(this);
|
|
394
|
+
return effectiveLabel
|
|
395
|
+
? `${ColorPicker_1.i18nBundle.getText(COLORPICKER_LABEL)} ${effectiveLabel}`
|
|
396
|
+
: ColorPicker_1.i18nBundle.getText(COLORPICKER_LABEL);
|
|
393
397
|
}
|
|
394
398
|
get sliderGroupLabel() {
|
|
395
399
|
return ColorPicker_1.i18nBundle.getText(COLORPICKER_SLIDER_GROUP);
|
|
@@ -516,6 +520,12 @@ __decorate([
|
|
|
516
520
|
__decorate([
|
|
517
521
|
property({ type: Boolean })
|
|
518
522
|
], ColorPicker.prototype, "simplified", void 0);
|
|
523
|
+
__decorate([
|
|
524
|
+
property()
|
|
525
|
+
], ColorPicker.prototype, "accessibleName", void 0);
|
|
526
|
+
__decorate([
|
|
527
|
+
property()
|
|
528
|
+
], ColorPicker.prototype, "accessibleNameRef", void 0);
|
|
519
529
|
__decorate([
|
|
520
530
|
property({ type: Object })
|
|
521
531
|
], ColorPicker.prototype, "_mainValue", void 0);
|
package/dist/ColorPicker.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPicker.js","sourceRoot":"","sources":["../src/ColorPicker.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,KAAK,MAAM,yDAAyD,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAC/D,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAInE,OAAO,EACN,WAAW,EACX,QAAQ,GACR,MAAM,sDAAsD,CAAC;AAK9D,OAAO,yCAAyC,CAAC;AACjD,OAAO,UAAU,MAAM,mCAAmC,CAAC;AAC3D,OAAO,mBAAmB,MAAM,0BAA0B,CAAC;AAC3D,OAAO,QAAQ,MAAM,uDAAuD,CAAC;AAC7E,OAAO,oBAAoB,MAAM,4DAA4D,CAAC;AAI9F,OAAO,EACN,iBAAiB,EACjB,wBAAwB,EACxB,wBAAwB,EACxB,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,eA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AAE,cAAc;QACtB,QAAQ,EAAE,mBAAmB;QAC7B,iBAAiB,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE;KAC3C,CAAC;IACF;;;OAGG;;IACF,KAAK,CAAC,QAAQ,EAAE;QAChB,OAAO,EAAE,IAAI;KACb,CAAC;GACI,WAAW,CAulBhB;AAED,WAAW,CAAC,MAAM,EAAE,CAAC;AAErB,eAAe,WAAW,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport { isEnter } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport type { IFormInputElement } from \"@ui5/webcomponents-base/dist/features/InputElementsFormSupport.js\";\nimport {\n\tgetRGBColor,\n\tgetAlpha,\n} from \"@ui5/webcomponents-base/dist/util/ColorConversion.js\";\nimport type {\n\tColorHSL,\n\tColorRGB,\n} from \"@ui5/webcomponents-base/dist/util/ColorConversion.js\";\nimport \"@ui5/webcomponents-icons/dist/expand.js\";\nimport ColorValue from \"./colorpicker-utils/ColorValue.js\";\nimport ColorPickerTemplate from \"./ColorPickerTemplate.js\";\nimport announce from \"@ui5/webcomponents-base/dist/util/InvisibleMessage.js\";\nimport InvisibleMessageMode from \"@ui5/webcomponents-base/dist/types/InvisibleMessageMode.js\";\nimport type Input from \"./Input.js\";\nimport type Slider from \"./Slider.js\";\n\nimport {\n\tCOLORPICKER_LABEL,\n\tCOLORPICKER_SLIDER_GROUP,\n\tCOLORPICKER_ALPHA_SLIDER,\n\tCOLORPICKER_HUE_SLIDER,\n\tCOLORPICKER_HEX,\n\tCOLORPICKER_RED,\n\tCOLORPICKER_GREEN,\n\tCOLORPICKER_BLUE,\n\tCOLORPICKER_ALPHA,\n\tCOLORPICKER_SATURATION,\n\tCOLORPICKER_LIGHT,\n\tCOLORPICKER_HUE,\n\tCOLORPICKER_TOGGLE_MODE_TOOLTIP,\n\tCOLORPICKER_PERCENTAGE,\n\tCOLORPICKER_COLOR_MODE_CHANGED,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport ColorPickerCss from \"./generated/themes/ColorPicker.css.js\";\nimport type { UI5CustomEvent } from \"@ui5/webcomponents-base/dist/index.js\";\n\nconst PICKER_POINTER_WIDTH = 6.5;\n\ntype ColorCoordinates = {\n\tx: number,\n\ty: number,\n}\n\ntype ColorChannelInput = {\n\tid: string,\n\tvalue: number,\n\taccessibleName: string\n\tlabel: string,\n\tshowPercentSymbol?: boolean,\n}\n\n/**\n * @class\n *\n * ### Overview\n * The `ui5-color-picker` allows users to choose any color and provides different input options for selecting colors.\n *\n * ### Usage\n *\n * #### When to use\n * Use the color picker if:\n *\n * - users need to select any color freely.\n *\n * #### When not to use\n *\n * - Users need to select one color from a predefined set of colors. Use the ColorPalette component instead.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/ColorPicker.js\";`\n * @constructor\n * @since 1.0.0-rc.12\n * @extends UI5Element\n * @public\n */\n\n@customElement({\n\ttag: \"ui5-color-picker\",\n\trenderer: jsxRenderer,\n\tformAssociated: true,\n\tstyles: ColorPickerCss,\n\ttemplate: ColorPickerTemplate,\n\tshadowRootOptions: { delegatesFocus: true },\n})\n/**\n * Fired when the the selected color is changed\n * @public\n */\n@event(\"change\", {\n\tbubbles: true,\n})\nclass ColorPicker extends UI5Element implements IFormInputElement {\n\teventDetails!: {\n\t\tchange: void;\n\t}\n\t/**\n\t * Defines the currently selected color of the component.\n\t *\n\t * **Note**: use HEX, RGB, RGBA, HSV formats or a CSS color name when modifying this property.\n\t * @default \"rgba(255,255,255,1)\"\n\t * @public\n\t */\n\t@property()\n\tvalue = \"rgba(255,255,255,1)\";\n\n\t/**\n\t * Determines the name by which the component will be identified upon submission in an HTML form.\n\t *\n\t * **Note:** This property is only applicable within the context of an HTML Form element.\n\t * @default undefined\n\t * @public\n\t * @since 2.0.0\n\t */\n\t@property()\n\tname?: string;\n\n\t/**\n\t * When set to `true`, the alpha slider and inputs for RGB values will not be displayed.\n\t * @default false\n\t * @public\n\t * @since 2.5.0\n\t */\n\t@property({ type: Boolean })\n\tsimplified = false;\n\n\t/**\n\t * Defines the current main color which is selected via the hue slider and is shown in the main color square.\n\t * @private\n\t */\n\t@property({ type: Object })\n\t_mainValue: ColorRGB;\n\n\t/**\n\t * Defines the currenty selected color.\n\t * @private\n\t */\n\t@property({ type: Object })\n\t_colorValue: ColorValue;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Object })\n\t_selectedCoordinates: ColorCoordinates;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Number })\n\t_alpha = 1;\n\n\t/**\n\t * this is the alpha value in the input only while editing, since it can container invalid/empty values temporarily\n\t * @private\n\t */\n\t@property()\n\t_alphaTemp?: string;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Number })\n\t_hue = 0;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_isSelectedColorChanged = false;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_isHueValueChanged = false;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_wrongHEX = false;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_displayHSL = false;\n\n\tselectedHue: number;\n\n\tmouseDown: boolean;\n\n\tmouseIn: boolean;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tasync formElementAnchor() {\n\t\treturn this.getFocusDomRefAsync();\n\t}\n\n\tget formFormattedValue() {\n\t\treturn this.value;\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._colorValue = new ColorValue();\n\n\t\t// Bottom Right corner\n\t\tthis._selectedCoordinates = {\n\t\t\tx: 256 - PICKER_POINTER_WIDTH,\n\t\t\ty: 256 - PICKER_POINTER_WIDTH,\n\t\t};\n\n\t\t// Default main color is red\n\t\tthis._mainValue = {\n\t\t\tr: 255,\n\t\t\tg: 0,\n\t\t\tb: 0,\n\t\t};\n\n\t\tthis.selectedHue = 0;\n\n\t\tthis.mouseDown = false;\n\t\tthis.mouseIn = false;\n\t}\n\n\tonBeforeRendering() {\n\t\tconst valueAsRGB = getRGBColor(this.value);\n\t\tif (!this._isColorValueEqual(valueAsRGB)) {\n\t\t\tthis._colorValue.RGB = valueAsRGB;\n\t\t}\n\t\tconst alpha = getAlpha(this.value);\n\t\tif (alpha !== this._colorValue.Alpha) {\n\t\t\tthis._colorValue.Alpha = alpha;\n\t\t\tthis._alpha = this._colorValue.Alpha;\n\t\t}\n\t\tconst tempColor = this._colorValue.toRGBString();\n\t\tthis._updateColorGrid();\n\t\tthis.style.setProperty(\"--ui5_Color_Picker_Progress_Container_Color\", tempColor);\n\t}\n\n\t_handleMouseDown(e: MouseEvent) {\n\t\tthis.mouseDown = true;\n\t\tthis.mouseIn = true;\n\t\tthis._changeSelectedColor(e.offsetX, e.offsetY);\n\t}\n\n\t_handleMouseUp() {\n\t\tthis.mouseDown = false;\n\t}\n\n\t_handleMouseOut(e: MouseEvent) {\n\t\tif (!this.mouseIn || !this.mouseDown) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst target = e.target as HTMLElement;\n\t\tconst offsetHeight: number = target.offsetHeight;\n\t\tconst offsetWidth: number = target.offsetWidth;\n\t\tconst isLeft: boolean = e.offsetX <= 0;\n\t\tconst isUp: boolean = e.offsetY <= 0;\n\t\tconst isDown: boolean = e.offsetY >= target.offsetHeight;\n\t\tconst isRight: boolean = e.offsetX >= target.offsetWidth;\n\n\t\tlet x: number,\n\t\t\ty: number;\n\n\t\tif (isLeft) {\n\t\t\tx = 0;\n\t\t} else if (isRight) {\n\t\t\t// Note: - e.offsetWidth has been changed to e.target.offsetWidth as offsetWidth does not exist on the event object\n\t\t\tx = offsetWidth;\n\t\t} else {\n\t\t\tx = e.offsetX;\n\t\t}\n\n\t\tif (isUp) {\n\t\t\ty = 0;\n\t\t} else if (isDown) {\n\t\t\t// Note: - e.offsetWidth has been changed to e.target.offsetWidth as offsetWidth does not exist on the event object\n\t\t\ty = offsetHeight;\n\t\t} else {\n\t\t\ty = e.offsetY;\n\t\t}\n\n\t\tthis._changeSelectedColor(x, y);\n\t\tthis.mouseIn = false;\n\t\tthis.mouseDown = false;\n\t}\n\n\t_handleMouseMove(e: MouseEvent) {\n\t\tif (!this.mouseDown || !this.mouseIn) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._changeSelectedColor(e.offsetX, e.offsetY);\n\t}\n\n\t_handleAlphaInput(e: UI5CustomEvent<Input, \"input\"> | UI5CustomEvent<Slider, \"input\">) {\n\t\tconst aphaInputValue = String(e.currentTarget.value);\n\t\tthis._alphaTemp = aphaInputValue;\n\t\tthis._alpha = parseFloat(aphaInputValue);\n\t\tif (Number.isNaN(this._alpha)) {\n\t\t\tthis._alpha = 1;\n\t\t}\n\t\tthis._colorValue.Alpha = this._alpha;\n\t\tthis._isHueValueChanged = true;\n\n\t\tconst color = this._colorValue.toRGBString();\n\t\tthis._setValue(color);\n\t}\n\n\t_handleHueInput(e: CustomEvent) {\n\t\tthis.selectedHue = (e.target as Slider).value;\n\t\tthis._hue = this.selectedHue;\n\t\tthis._setMainColor(this._hue);\n\t\t// Idication that changes to the hue value triggered as a result of user pressing over the hue slider.\n\t\tthis._isHueValueChanged = true;\n\t\tthis._colorValue.H = this._hue;\n\n\t\tconst color = this._colorValue.toRGBString();\n\t\tthis._setValue(color);\n\t}\n\n\t_handleHEXChange(e: CustomEvent | KeyboardEvent) {\n\t\tconst input: Input = (e.target as Input);\n\t\tlet inputValueLowerCase = input.value.toLowerCase();\n\n\t\tif (inputValueLowerCase.startsWith(\"#\")) {\n\t\t\tinputValueLowerCase = inputValueLowerCase.slice(1);\n\t\t}\n\n\t\t// Shorthand Syntax\n\t\tif (inputValueLowerCase.length === 3) {\n\t\t\tinputValueLowerCase = `${inputValueLowerCase[0]}${inputValueLowerCase[0]}${inputValueLowerCase[1]}${inputValueLowerCase[1]}${inputValueLowerCase[2]}${inputValueLowerCase[2]}`;\n\t\t}\n\n\t\tthis._colorValue.HEX = inputValueLowerCase;\n\t\tconst isValidColor = this._colorValue.isColorValueValid();\n\n\t\tif (isValidColor && input.value !== inputValueLowerCase) {\n\t\t\tthis._wrongHEX = false;\n\t\t\tinput.value = inputValueLowerCase;\n\t\t}\n\n\t\tif (!isValidColor) {\n\t\t\tthis._wrongHEX = true;\n\t\t} else {\n\t\t\tthis._wrongHEX = false;\n\n\t\t\tconst color = this._colorValue.toRGBString();\n\t\t\tthis._setValue(color);\n\t\t}\n\t}\n\n\t_togglePickerMode() {\n\t\tthis._displayHSL = !this._displayHSL;\n\n\t\t// Announce a message to screen readers\n\t\tannounce(this.colorFieldsAnnouncementText, InvisibleMessageMode.Polite);\n\t}\n\n\t_handleColorInputChange(e: Event) {\n\t\tconst target = e.target as Input;\n\t\tconst targetValue = parseInt(target.value) || 0;\n\t\tlet normalizedValue = targetValue;\n\n\t\tswitch (target.id) {\n\t\tcase \"red\":\n\t\t\tthis._colorValue.R = targetValue;\n\t\t\tnormalizedValue = this._colorValue.R;\n\t\t\tbreak;\n\n\t\tcase \"green\":\n\t\t\tthis._colorValue.G = targetValue;\n\t\t\tnormalizedValue = this._colorValue.G;\n\t\t\tbreak;\n\n\t\tcase \"blue\":\n\t\t\tthis._colorValue.B = targetValue;\n\t\t\tnormalizedValue = this._colorValue.B;\n\t\t\tbreak;\n\n\t\tcase \"hue\":\n\t\t\tthis._colorValue.H = targetValue;\n\t\t\tnormalizedValue = this._colorValue.H;\n\t\t\tbreak;\n\n\t\tcase \"saturation\":\n\t\t\tthis._colorValue.S = targetValue;\n\t\t\tnormalizedValue = this._colorValue.S;\n\t\t\tbreak;\n\n\t\tcase \"light\":\n\t\t\tthis._colorValue.L = targetValue;\n\t\t\tnormalizedValue = this._colorValue.L;\n\t\t\tbreak;\n\t\t}\n\n\t\ttarget.value = String(normalizedValue);\n\t\tconst color = this._colorValue.toRGBString();\n\t\tthis._setValue(color);\n\t\tthis._updateColorGrid();\n\t}\n\n\t_setMainColor(hueValue: number) {\n\t\tconst hueValueMod = hueValue * 4.251;\n\n\t\tif (hueValueMod <= 255) {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: 255,\n\t\t\t\tg: hueValueMod,\n\t\t\t\tb: 0,\n\t\t\t};\n\t\t} else if (hueValueMod <= 510) {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: 255 - (hueValueMod - 255),\n\t\t\t\tg: 255,\n\t\t\t\tb: 0,\n\t\t\t};\n\t\t} else if (hueValueMod <= 765) {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: 0,\n\t\t\t\tg: 255,\n\t\t\t\tb: hueValueMod - 510,\n\t\t\t};\n\t\t} else if (hueValueMod <= 1020) {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: 0,\n\t\t\t\tg: 765 - (hueValueMod - 255),\n\t\t\t\tb: 255,\n\t\t\t};\n\t\t} else if (hueValueMod <= 1275) {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: hueValueMod - 1020,\n\t\t\t\tg: 0,\n\t\t\t\tb: 255,\n\t\t\t};\n\t\t} else {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: 255,\n\t\t\t\tg: 0,\n\t\t\t\tb: 1275 - (hueValueMod - 255),\n\t\t\t};\n\t\t}\n\t}\n\n\t_handleAlphaChange() {\n\t\t// parse the input value if valid or fallback to default\n\t\tthis._alpha = this._alphaTemp ? parseFloat(this._alphaTemp) : 1;\n\t\tif (Number.isNaN(this._alpha)) {\n\t\t\tthis._alpha = 1;\n\t\t}\n\t\t// reset input value so _alpha is rendered\n\t\tthis._alphaTemp = undefined;\n\t\t// normalize range\n\t\tthis._alpha = this._alpha < 0 ? 0 : this._alpha;\n\t\tthis._alpha = this._alpha > 1 ? 1 : this._alpha;\n\n\t\tthis._colorValue.Alpha = this._alpha;\n\t}\n\n\t_changeSelectedColor(x: number, y: number) {\n\t\tthis._selectedCoordinates = {\n\t\t\tx: x - PICKER_POINTER_WIDTH, // Center the coordinates, because of the width of the circle\n\t\t\ty: y - PICKER_POINTER_WIDTH, // Center the coordinates, because of the height of the circle\n\t\t};\n\n\t\t// Idication that changes to the color settings are triggered as a result of user pressing over the main color section.\n\t\tthis._isSelectedColorChanged = true;\n\n\t\tconst tempColor = this._calculateColorFromCoordinates(x, y);\n\t\tif (tempColor) {\n\t\t\tthis._colorValue.HSL = tempColor;\n\n\t\t\tconst color = this._colorValue.toRGBString();\n\t\t\tthis._setValue(color);\n\t\t}\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (isEnter(e)) {\n\t\t\tthis._handleHEXChange(e);\n\t\t}\n\t}\n\n\t_calculateColorFromCoordinates(x: number, y: number) {\n\t\t// By using the selected coordinates(x = Lightness, y = Saturation) and hue(selected from the hue slider)\n\t\t// and HSL format, the color will be parsed to RGB\n\t\t// 0 ≤ H < 360\n\t\t// 4.251 because with 4.25 we get out of the colors range.\n\t\tconst h = this._hue;\n\t\tlet s = +(1 - (y / 256)).toFixed(2);\n\t\tlet l = +(x / 256).toFixed(2);\n\n\t\tif (Number.isNaN(s) || Number.isNaN(l)) {\n\t\t\t// The event is finished out of the main color section\n\t\t\treturn;\n\t\t}\n\n\t\t// Normalize values to be between 0 and 1 in case of rounding issues\n\t\ts = Math.max(0, Math.min(1, s));\n\t\tl = Math.max(0, Math.min(1, l));\n\n\t\treturn {\n\t\t\th: Math.round(h),\n\t\t\ts: Math.round(s * 100),\n\t\t\tl: Math.round(l * 100),\n\t\t};\n\t}\n\n\t_setValue(color: string) {\n\t\tthis.value = color;\n\t\tthis._wrongHEX = !this._colorValue.isColorValueValid();\n\t\tthis.fireDecoratorEvent(\"change\");\n\t}\n\n\t_updateColorGrid() {\n\t\tconst hslColours: ColorHSL = this._colorValue.HSL;\n\t\tthis._selectedCoordinates = {\n\t\t\tx: ((hslColours.l * 2.56)) - PICKER_POINTER_WIDTH, // Center the coordinates, because of the width of the circle\n\t\t\ty: (256 - (hslColours.s * 2.56)) - PICKER_POINTER_WIDTH, // Center the coordinates, because of the height of the circle\n\t\t};\n\n\t\tif (this._isSelectedColorChanged) { // We shouldn't update the hue value when user presses over the main color section.\n\t\t\tthis._isSelectedColorChanged = false;\n\t\t} else if (this._isHueValueChanged) { // We shouldn't recalculate the hue value when user changes the hue slider.\n\t\t\tthis._isHueValueChanged = false;\n\t\t\tthis._hue = this.selectedHue ? this.selectedHue : this._hue;\n\t\t} else {\n\t\t\tthis._hue = hslColours.h;\n\t\t}\n\n\t\tthis._setMainColor(this._hue);\n\t}\n\n\t_isColorValueEqual(value: ColorRGB): boolean {\n\t\treturn this._colorValue.R === value.r\n\t\t\t&& this._colorValue.G === value.g\n\t\t\t&& this._colorValue.B === value.b;\n\t}\n\n\tget colorPickerLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_LABEL);\n\t}\n\n\tget sliderGroupLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_SLIDER_GROUP);\n\t}\n\n\tget hueSliderLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_HUE_SLIDER);\n\t}\n\n\tget alphaSliderLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_ALPHA_SLIDER);\n\t}\n\n\tget hexInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_HEX);\n\t}\n\n\tget redInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_RED);\n\t}\n\n\tget greenInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_GREEN);\n\t}\n\n\tget blueInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_BLUE);\n\t}\n\n\tget hueInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_HUE);\n\t}\n\n\tget saturationInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_SATURATION);\n\t}\n\n\tget lightInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_LIGHT);\n\t}\n\n\tget alphaInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_ALPHA);\n\t}\n\n\tget percentageLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_PERCENTAGE);\n\t}\n\n\tget colorFieldsAnnouncementText() {\n\t\tconst mode = this._displayHSL ? \"HSL\" : \"RGB\";\n\t\tlet text = \"\";\n\n\t\tif (mode === \"RGB\") {\n\t\t\ttext = `${this.redInputLabel} ${this._colorValue.R}, `\n\t\t\t\t+ `${this.greenInputLabel} ${this._colorValue.G}, `\n\t\t\t\t+ `${this.blueInputLabel} ${this._colorValue.B}, `\n\t\t\t\t+ `${this.alphaInputLabel} ${this._colorValue.Alpha}`;\n\t\t} else {\n\t\t\ttext = `${this.hueInputLabel} ${this._colorValue.H}, `\n\t\t\t\t+ `${this.saturationInputLabel} ${this._colorValue.S} ${this.percentageLabel}, `\n\t\t\t\t+ `${this.lightInputLabel} ${this._colorValue.L} ${this.percentageLabel}, `\n\t\t\t\t+ `${this.alphaInputLabel} ${this._colorValue.Alpha}`;\n\t\t}\n\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_COLOR_MODE_CHANGED, mode, text);\n\t}\n\n\tget toggleModeTooltip() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_TOGGLE_MODE_TOOLTIP);\n\t}\n\n\tget inputsDisabled() {\n\t\treturn this._wrongHEX ? true : undefined;\n\t}\n\n\tget hexInputErrorState(): `${ValueState}` {\n\t\treturn this._wrongHEX ? \"Negative\" : \"None\";\n\t}\n\n\tget rgbInputs(): Array<ColorChannelInput> {\n\t\tconst redInput = {\n\t\t\tid: \"red\",\n\t\t\tvalue: this._colorValue.R,\n\t\t\tlabel: \"R\",\n\t\t\taccessibleName: this.redInputLabel,\n\t\t};\n\n\t\tconst greenInput = {\n\t\t\tid: \"green\",\n\t\t\tvalue: this._colorValue.G,\n\t\t\tlabel: \"G\",\n\t\t\taccessibleName: this.greenInputLabel,\n\t\t};\n\n\t\tconst blueInput = {\n\t\t\tid: \"blue\",\n\t\t\tvalue: this._colorValue.B,\n\t\t\tlabel: \"B\",\n\t\t\taccessibleName: this.blueInputLabel,\n\t\t};\n\n\t\treturn [redInput, greenInput, blueInput];\n\t}\n\n\tget hslInputs(): Array<ColorChannelInput> {\n\t\tconst hueInput = {\n\t\t\tid: \"hue\",\n\t\t\tvalue: this._colorValue.H,\n\t\t\tlabel: \"H\",\n\t\t\taccessibleName: this.hueInputLabel,\n\t\t};\n\n\t\tconst saturationInput = {\n\t\t\tid: \"saturation\",\n\t\t\tvalue: this._colorValue.S,\n\t\t\tlabel: \"S\",\n\t\t\taccessibleName: this.saturationInputLabel,\n\t\t\tshowPercentSymbol: true,\n\t\t};\n\n\t\tconst lightInput = {\n\t\t\tid: \"light\",\n\t\t\tvalue: this._colorValue.L,\n\t\t\tlabel: \"L\",\n\t\t\taccessibleName: this.lightInputLabel,\n\t\t\tshowPercentSymbol: true,\n\t\t};\n\n\t\treturn [hueInput, saturationInput, lightInput];\n\t}\n\n\tget HEX(): string {\n\t\treturn this._colorValue.HEX;\n\t}\n\n\tget colorChannelInputs() {\n\t\treturn this._displayHSL ? this.hslInputs : this.rgbInputs;\n\t}\n\n\tget _isDefaultPickerMode() {\n\t\treturn !this.simplified;\n\t}\n}\n\nColorPicker.define();\n\nexport default ColorPicker;\n"]}
|
|
1
|
+
{"version":3,"file":"ColorPicker.js","sourceRoot":"","sources":["../src/ColorPicker.ts"],"names":[],"mappings":";;;;;;;AAAA,O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AAErB,eAAe,WAAW,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport event from \"@ui5/webcomponents-base/dist/decorators/event-strict.js\";\nimport { isEnter } from \"@ui5/webcomponents-base/dist/Keys.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport type ValueState from \"@ui5/webcomponents-base/dist/types/ValueState.js\";\nimport { getEffectiveAriaLabelText } from \"@ui5/webcomponents-base/dist/util/AccessibilityTextsHelper.js\";\nimport type { IFormInputElement } from \"@ui5/webcomponents-base/dist/features/InputElementsFormSupport.js\";\nimport {\n\tgetRGBColor,\n\tgetAlpha,\n} from \"@ui5/webcomponents-base/dist/util/ColorConversion.js\";\nimport type {\n\tColorHSL,\n\tColorRGB,\n} from \"@ui5/webcomponents-base/dist/util/ColorConversion.js\";\nimport \"@ui5/webcomponents-icons/dist/expand.js\";\nimport ColorValue from \"./colorpicker-utils/ColorValue.js\";\nimport ColorPickerTemplate from \"./ColorPickerTemplate.js\";\nimport announce from \"@ui5/webcomponents-base/dist/util/InvisibleMessage.js\";\nimport InvisibleMessageMode from \"@ui5/webcomponents-base/dist/types/InvisibleMessageMode.js\";\nimport type Input from \"./Input.js\";\nimport type Slider from \"./Slider.js\";\n\nimport {\n\tCOLORPICKER_LABEL,\n\tCOLORPICKER_SLIDER_GROUP,\n\tCOLORPICKER_ALPHA_SLIDER,\n\tCOLORPICKER_HUE_SLIDER,\n\tCOLORPICKER_HEX,\n\tCOLORPICKER_RED,\n\tCOLORPICKER_GREEN,\n\tCOLORPICKER_BLUE,\n\tCOLORPICKER_ALPHA,\n\tCOLORPICKER_SATURATION,\n\tCOLORPICKER_LIGHT,\n\tCOLORPICKER_HUE,\n\tCOLORPICKER_TOGGLE_MODE_TOOLTIP,\n\tCOLORPICKER_PERCENTAGE,\n\tCOLORPICKER_COLOR_MODE_CHANGED,\n} from \"./generated/i18n/i18n-defaults.js\";\n\n// Styles\nimport ColorPickerCss from \"./generated/themes/ColorPicker.css.js\";\nimport type { UI5CustomEvent } from \"@ui5/webcomponents-base/dist/index.js\";\n\nconst PICKER_POINTER_WIDTH = 6.5;\n\ntype ColorCoordinates = {\n\tx: number,\n\ty: number,\n}\n\ntype ColorChannelInput = {\n\tid: string,\n\tvalue: number,\n\taccessibleName: string\n\tlabel: string,\n\tshowPercentSymbol?: boolean,\n}\n\n/**\n * @class\n *\n * ### Overview\n * The `ui5-color-picker` allows users to choose any color and provides different input options for selecting colors.\n *\n * ### Usage\n *\n * #### When to use\n * Use the color picker if:\n *\n * - users need to select any color freely.\n *\n * #### When not to use\n *\n * - Users need to select one color from a predefined set of colors. Use the ColorPalette component instead.\n *\n * ### ES6 Module Import\n *\n * `import \"@ui5/webcomponents/dist/ColorPicker.js\";`\n * @constructor\n * @since 1.0.0-rc.12\n * @extends UI5Element\n * @public\n */\n\n@customElement({\n\ttag: \"ui5-color-picker\",\n\trenderer: jsxRenderer,\n\tformAssociated: true,\n\tstyles: ColorPickerCss,\n\ttemplate: ColorPickerTemplate,\n\tshadowRootOptions: { delegatesFocus: true },\n})\n/**\n * Fired when the the selected color is changed\n * @public\n */\n@event(\"change\", {\n\tbubbles: true,\n})\nclass ColorPicker extends UI5Element implements IFormInputElement {\n\teventDetails!: {\n\t\tchange: void;\n\t}\n\t/**\n\t * Defines the currently selected color of the component.\n\t *\n\t * **Note**: use HEX, RGB, RGBA, HSV formats or a CSS color name when modifying this property.\n\t * @default \"rgba(255,255,255,1)\"\n\t * @public\n\t */\n\t@property()\n\tvalue = \"rgba(255,255,255,1)\";\n\n\t/**\n\t * Determines the name by which the component will be identified upon submission in an HTML form.\n\t *\n\t * **Note:** This property is only applicable within the context of an HTML Form element.\n\t * @default undefined\n\t * @public\n\t * @since 2.0.0\n\t */\n\t@property()\n\tname?: string;\n\n\t/**\n\t * When set to `true`, the alpha slider and inputs for RGB values will not be displayed.\n\t * @default false\n\t * @public\n\t * @since 2.5.0\n\t */\n\t@property({ type: Boolean })\n\tsimplified = false;\n\n\t/**\n\t * Defines the accessible name of the component.\n\t * @default undefined\n\t * @public\n\t * @since 2.20.0\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 * @default undefined\n\t * @public\n\t * @since 2.20.0\n\t */\n\t@property()\n\taccessibleNameRef?: string;\n\n\t/**\n\t * Defines the current main color which is selected via the hue slider and is shown in the main color square.\n\t * @private\n\t */\n\t@property({ type: Object })\n\t_mainValue: ColorRGB;\n\n\t/**\n\t * Defines the currenty selected color.\n\t * @private\n\t */\n\t@property({ type: Object })\n\t_colorValue: ColorValue;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Object })\n\t_selectedCoordinates: ColorCoordinates;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Number })\n\t_alpha = 1;\n\n\t/**\n\t * this is the alpha value in the input only while editing, since it can container invalid/empty values temporarily\n\t * @private\n\t */\n\t@property()\n\t_alphaTemp?: string;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Number })\n\t_hue = 0;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_isSelectedColorChanged = false;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_isHueValueChanged = false;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_wrongHEX = false;\n\n\t/**\n\t * @private\n\t */\n\t@property({ type: Boolean })\n\t_displayHSL = false;\n\n\tselectedHue: number;\n\n\tmouseDown: boolean;\n\n\tmouseIn: boolean;\n\n\t@i18n(\"@ui5/webcomponents\")\n\tstatic i18nBundle: I18nBundle;\n\n\tasync formElementAnchor() {\n\t\treturn this.getFocusDomRefAsync();\n\t}\n\n\tget formFormattedValue() {\n\t\treturn this.value;\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._colorValue = new ColorValue();\n\n\t\t// Bottom Right corner\n\t\tthis._selectedCoordinates = {\n\t\t\tx: 256 - PICKER_POINTER_WIDTH,\n\t\t\ty: 256 - PICKER_POINTER_WIDTH,\n\t\t};\n\n\t\t// Default main color is red\n\t\tthis._mainValue = {\n\t\t\tr: 255,\n\t\t\tg: 0,\n\t\t\tb: 0,\n\t\t};\n\n\t\tthis.selectedHue = 0;\n\n\t\tthis.mouseDown = false;\n\t\tthis.mouseIn = false;\n\t}\n\n\tonBeforeRendering() {\n\t\tconst valueAsRGB = getRGBColor(this.value);\n\t\tif (!this._isColorValueEqual(valueAsRGB)) {\n\t\t\tthis._colorValue.RGB = valueAsRGB;\n\t\t}\n\t\tconst alpha = getAlpha(this.value);\n\t\tif (alpha !== this._colorValue.Alpha) {\n\t\t\tthis._colorValue.Alpha = alpha;\n\t\t\tthis._alpha = this._colorValue.Alpha;\n\t\t}\n\t\tconst tempColor = this._colorValue.toRGBString();\n\t\tthis._updateColorGrid();\n\t\tthis.style.setProperty(\"--ui5_Color_Picker_Progress_Container_Color\", tempColor);\n\t}\n\n\t_handleMouseDown(e: MouseEvent) {\n\t\tthis.mouseDown = true;\n\t\tthis.mouseIn = true;\n\t\tthis._changeSelectedColor(e.offsetX, e.offsetY);\n\t}\n\n\t_handleMouseUp() {\n\t\tthis.mouseDown = false;\n\t}\n\n\t_handleMouseOut(e: MouseEvent) {\n\t\tif (!this.mouseIn || !this.mouseDown) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst target = e.target as HTMLElement;\n\t\tconst offsetHeight: number = target.offsetHeight;\n\t\tconst offsetWidth: number = target.offsetWidth;\n\t\tconst isLeft: boolean = e.offsetX <= 0;\n\t\tconst isUp: boolean = e.offsetY <= 0;\n\t\tconst isDown: boolean = e.offsetY >= target.offsetHeight;\n\t\tconst isRight: boolean = e.offsetX >= target.offsetWidth;\n\n\t\tlet x: number,\n\t\t\ty: number;\n\n\t\tif (isLeft) {\n\t\t\tx = 0;\n\t\t} else if (isRight) {\n\t\t\t// Note: - e.offsetWidth has been changed to e.target.offsetWidth as offsetWidth does not exist on the event object\n\t\t\tx = offsetWidth;\n\t\t} else {\n\t\t\tx = e.offsetX;\n\t\t}\n\n\t\tif (isUp) {\n\t\t\ty = 0;\n\t\t} else if (isDown) {\n\t\t\t// Note: - e.offsetWidth has been changed to e.target.offsetWidth as offsetWidth does not exist on the event object\n\t\t\ty = offsetHeight;\n\t\t} else {\n\t\t\ty = e.offsetY;\n\t\t}\n\n\t\tthis._changeSelectedColor(x, y);\n\t\tthis.mouseIn = false;\n\t\tthis.mouseDown = false;\n\t}\n\n\t_handleMouseMove(e: MouseEvent) {\n\t\tif (!this.mouseDown || !this.mouseIn) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._changeSelectedColor(e.offsetX, e.offsetY);\n\t}\n\n\t_handleAlphaInput(e: UI5CustomEvent<Input, \"input\"> | UI5CustomEvent<Slider, \"input\">) {\n\t\tconst aphaInputValue = String(e.currentTarget.value);\n\t\tthis._alphaTemp = aphaInputValue;\n\t\tthis._alpha = parseFloat(aphaInputValue);\n\t\tif (Number.isNaN(this._alpha)) {\n\t\t\tthis._alpha = 1;\n\t\t}\n\t\tthis._colorValue.Alpha = this._alpha;\n\t\tthis._isHueValueChanged = true;\n\n\t\tconst color = this._colorValue.toRGBString();\n\t\tthis._setValue(color);\n\t}\n\n\t_handleHueInput(e: CustomEvent) {\n\t\tthis.selectedHue = (e.target as Slider).value;\n\t\tthis._hue = this.selectedHue;\n\t\tthis._setMainColor(this._hue);\n\t\t// Idication that changes to the hue value triggered as a result of user pressing over the hue slider.\n\t\tthis._isHueValueChanged = true;\n\t\tthis._colorValue.H = this._hue;\n\n\t\tconst color = this._colorValue.toRGBString();\n\t\tthis._setValue(color);\n\t}\n\n\t_handleHEXChange(e: CustomEvent | KeyboardEvent) {\n\t\tconst input: Input = (e.target as Input);\n\t\tlet inputValueLowerCase = input.value.toLowerCase();\n\n\t\tif (inputValueLowerCase.startsWith(\"#\")) {\n\t\t\tinputValueLowerCase = inputValueLowerCase.slice(1);\n\t\t}\n\n\t\t// Shorthand Syntax\n\t\tif (inputValueLowerCase.length === 3) {\n\t\t\tinputValueLowerCase = `${inputValueLowerCase[0]}${inputValueLowerCase[0]}${inputValueLowerCase[1]}${inputValueLowerCase[1]}${inputValueLowerCase[2]}${inputValueLowerCase[2]}`;\n\t\t}\n\n\t\tthis._colorValue.HEX = inputValueLowerCase;\n\t\tconst isValidColor = this._colorValue.isColorValueValid();\n\n\t\tif (isValidColor && input.value !== inputValueLowerCase) {\n\t\t\tthis._wrongHEX = false;\n\t\t\tinput.value = inputValueLowerCase;\n\t\t}\n\n\t\tif (!isValidColor) {\n\t\t\tthis._wrongHEX = true;\n\t\t} else {\n\t\t\tthis._wrongHEX = false;\n\n\t\t\tconst color = this._colorValue.toRGBString();\n\t\t\tthis._setValue(color);\n\t\t}\n\t}\n\n\t_togglePickerMode() {\n\t\tthis._displayHSL = !this._displayHSL;\n\n\t\t// Announce a message to screen readers\n\t\tannounce(this.colorFieldsAnnouncementText, InvisibleMessageMode.Polite);\n\t}\n\n\t_handleColorInputChange(e: Event) {\n\t\tconst target = e.target as Input;\n\t\tconst targetValue = parseInt(target.value) || 0;\n\t\tlet normalizedValue = targetValue;\n\n\t\tswitch (target.id) {\n\t\tcase \"red\":\n\t\t\tthis._colorValue.R = targetValue;\n\t\t\tnormalizedValue = this._colorValue.R;\n\t\t\tbreak;\n\n\t\tcase \"green\":\n\t\t\tthis._colorValue.G = targetValue;\n\t\t\tnormalizedValue = this._colorValue.G;\n\t\t\tbreak;\n\n\t\tcase \"blue\":\n\t\t\tthis._colorValue.B = targetValue;\n\t\t\tnormalizedValue = this._colorValue.B;\n\t\t\tbreak;\n\n\t\tcase \"hue\":\n\t\t\tthis._colorValue.H = targetValue;\n\t\t\tnormalizedValue = this._colorValue.H;\n\t\t\tbreak;\n\n\t\tcase \"saturation\":\n\t\t\tthis._colorValue.S = targetValue;\n\t\t\tnormalizedValue = this._colorValue.S;\n\t\t\tbreak;\n\n\t\tcase \"light\":\n\t\t\tthis._colorValue.L = targetValue;\n\t\t\tnormalizedValue = this._colorValue.L;\n\t\t\tbreak;\n\t\t}\n\n\t\ttarget.value = String(normalizedValue);\n\t\tconst color = this._colorValue.toRGBString();\n\t\tthis._setValue(color);\n\t\tthis._updateColorGrid();\n\t}\n\n\t_setMainColor(hueValue: number) {\n\t\tconst hueValueMod = hueValue * 4.251;\n\n\t\tif (hueValueMod <= 255) {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: 255,\n\t\t\t\tg: hueValueMod,\n\t\t\t\tb: 0,\n\t\t\t};\n\t\t} else if (hueValueMod <= 510) {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: 255 - (hueValueMod - 255),\n\t\t\t\tg: 255,\n\t\t\t\tb: 0,\n\t\t\t};\n\t\t} else if (hueValueMod <= 765) {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: 0,\n\t\t\t\tg: 255,\n\t\t\t\tb: hueValueMod - 510,\n\t\t\t};\n\t\t} else if (hueValueMod <= 1020) {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: 0,\n\t\t\t\tg: 765 - (hueValueMod - 255),\n\t\t\t\tb: 255,\n\t\t\t};\n\t\t} else if (hueValueMod <= 1275) {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: hueValueMod - 1020,\n\t\t\t\tg: 0,\n\t\t\t\tb: 255,\n\t\t\t};\n\t\t} else {\n\t\t\tthis._mainValue = {\n\t\t\t\tr: 255,\n\t\t\t\tg: 0,\n\t\t\t\tb: 1275 - (hueValueMod - 255),\n\t\t\t};\n\t\t}\n\t}\n\n\t_handleAlphaChange() {\n\t\t// parse the input value if valid or fallback to default\n\t\tthis._alpha = this._alphaTemp ? parseFloat(this._alphaTemp) : 1;\n\t\tif (Number.isNaN(this._alpha)) {\n\t\t\tthis._alpha = 1;\n\t\t}\n\t\t// reset input value so _alpha is rendered\n\t\tthis._alphaTemp = undefined;\n\t\t// normalize range\n\t\tthis._alpha = this._alpha < 0 ? 0 : this._alpha;\n\t\tthis._alpha = this._alpha > 1 ? 1 : this._alpha;\n\n\t\tthis._colorValue.Alpha = this._alpha;\n\t}\n\n\t_changeSelectedColor(x: number, y: number) {\n\t\tthis._selectedCoordinates = {\n\t\t\tx: x - PICKER_POINTER_WIDTH, // Center the coordinates, because of the width of the circle\n\t\t\ty: y - PICKER_POINTER_WIDTH, // Center the coordinates, because of the height of the circle\n\t\t};\n\n\t\t// Idication that changes to the color settings are triggered as a result of user pressing over the main color section.\n\t\tthis._isSelectedColorChanged = true;\n\n\t\tconst tempColor = this._calculateColorFromCoordinates(x, y);\n\t\tif (tempColor) {\n\t\t\tthis._colorValue.HSL = tempColor;\n\n\t\t\tconst color = this._colorValue.toRGBString();\n\t\t\tthis._setValue(color);\n\t\t}\n\t}\n\n\t_onkeydown(e: KeyboardEvent) {\n\t\tif (isEnter(e)) {\n\t\t\tthis._handleHEXChange(e);\n\t\t}\n\t}\n\n\t_calculateColorFromCoordinates(x: number, y: number) {\n\t\t// By using the selected coordinates(x = Lightness, y = Saturation) and hue(selected from the hue slider)\n\t\t// and HSL format, the color will be parsed to RGB\n\t\t// 0 ≤ H < 360\n\t\t// 4.251 because with 4.25 we get out of the colors range.\n\t\tconst h = this._hue;\n\t\tlet s = +(1 - (y / 256)).toFixed(2);\n\t\tlet l = +(x / 256).toFixed(2);\n\n\t\tif (Number.isNaN(s) || Number.isNaN(l)) {\n\t\t\t// The event is finished out of the main color section\n\t\t\treturn;\n\t\t}\n\n\t\t// Normalize values to be between 0 and 1 in case of rounding issues\n\t\ts = Math.max(0, Math.min(1, s));\n\t\tl = Math.max(0, Math.min(1, l));\n\n\t\treturn {\n\t\t\th: Math.round(h),\n\t\t\ts: Math.round(s * 100),\n\t\t\tl: Math.round(l * 100),\n\t\t};\n\t}\n\n\t_setValue(color: string) {\n\t\tthis.value = color;\n\t\tthis._wrongHEX = !this._colorValue.isColorValueValid();\n\t\tthis.fireDecoratorEvent(\"change\");\n\t}\n\n\t_updateColorGrid() {\n\t\tconst hslColours: ColorHSL = this._colorValue.HSL;\n\t\tthis._selectedCoordinates = {\n\t\t\tx: ((hslColours.l * 2.56)) - PICKER_POINTER_WIDTH, // Center the coordinates, because of the width of the circle\n\t\t\ty: (256 - (hslColours.s * 2.56)) - PICKER_POINTER_WIDTH, // Center the coordinates, because of the height of the circle\n\t\t};\n\n\t\tif (this._isSelectedColorChanged) { // We shouldn't update the hue value when user presses over the main color section.\n\t\t\tthis._isSelectedColorChanged = false;\n\t\t} else if (this._isHueValueChanged) { // We shouldn't recalculate the hue value when user changes the hue slider.\n\t\t\tthis._isHueValueChanged = false;\n\t\t\tthis._hue = this.selectedHue ? this.selectedHue : this._hue;\n\t\t} else {\n\t\t\tthis._hue = hslColours.h;\n\t\t}\n\n\t\tthis._setMainColor(this._hue);\n\t}\n\n\t_isColorValueEqual(value: ColorRGB): boolean {\n\t\treturn this._colorValue.R === value.r\n\t\t\t&& this._colorValue.G === value.g\n\t\t\t&& this._colorValue.B === value.b;\n\t}\n\n\tget colorPickerLabel() {\n\t\tconst effectiveLabel = getEffectiveAriaLabelText(this);\n\t\treturn effectiveLabel\n\t\t\t? `${ColorPicker.i18nBundle.getText(COLORPICKER_LABEL)} ${effectiveLabel}`\n\t\t\t: ColorPicker.i18nBundle.getText(COLORPICKER_LABEL);\n\t}\n\n\tget sliderGroupLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_SLIDER_GROUP);\n\t}\n\n\tget hueSliderLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_HUE_SLIDER);\n\t}\n\n\tget alphaSliderLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_ALPHA_SLIDER);\n\t}\n\n\tget hexInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_HEX);\n\t}\n\n\tget redInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_RED);\n\t}\n\n\tget greenInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_GREEN);\n\t}\n\n\tget blueInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_BLUE);\n\t}\n\n\tget hueInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_HUE);\n\t}\n\n\tget saturationInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_SATURATION);\n\t}\n\n\tget lightInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_LIGHT);\n\t}\n\n\tget alphaInputLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_ALPHA);\n\t}\n\n\tget percentageLabel() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_PERCENTAGE);\n\t}\n\n\tget colorFieldsAnnouncementText() {\n\t\tconst mode = this._displayHSL ? \"HSL\" : \"RGB\";\n\t\tlet text = \"\";\n\n\t\tif (mode === \"RGB\") {\n\t\t\ttext = `${this.redInputLabel} ${this._colorValue.R}, `\n\t\t\t\t+ `${this.greenInputLabel} ${this._colorValue.G}, `\n\t\t\t\t+ `${this.blueInputLabel} ${this._colorValue.B}, `\n\t\t\t\t+ `${this.alphaInputLabel} ${this._colorValue.Alpha}`;\n\t\t} else {\n\t\t\ttext = `${this.hueInputLabel} ${this._colorValue.H}, `\n\t\t\t\t+ `${this.saturationInputLabel} ${this._colorValue.S} ${this.percentageLabel}, `\n\t\t\t\t+ `${this.lightInputLabel} ${this._colorValue.L} ${this.percentageLabel}, `\n\t\t\t\t+ `${this.alphaInputLabel} ${this._colorValue.Alpha}`;\n\t\t}\n\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_COLOR_MODE_CHANGED, mode, text);\n\t}\n\n\tget toggleModeTooltip() {\n\t\treturn ColorPicker.i18nBundle.getText(COLORPICKER_TOGGLE_MODE_TOOLTIP);\n\t}\n\n\tget inputsDisabled() {\n\t\treturn this._wrongHEX ? true : undefined;\n\t}\n\n\tget hexInputErrorState(): `${ValueState}` {\n\t\treturn this._wrongHEX ? \"Negative\" : \"None\";\n\t}\n\n\tget rgbInputs(): Array<ColorChannelInput> {\n\t\tconst redInput = {\n\t\t\tid: \"red\",\n\t\t\tvalue: this._colorValue.R,\n\t\t\tlabel: \"R\",\n\t\t\taccessibleName: this.redInputLabel,\n\t\t};\n\n\t\tconst greenInput = {\n\t\t\tid: \"green\",\n\t\t\tvalue: this._colorValue.G,\n\t\t\tlabel: \"G\",\n\t\t\taccessibleName: this.greenInputLabel,\n\t\t};\n\n\t\tconst blueInput = {\n\t\t\tid: \"blue\",\n\t\t\tvalue: this._colorValue.B,\n\t\t\tlabel: \"B\",\n\t\t\taccessibleName: this.blueInputLabel,\n\t\t};\n\n\t\treturn [redInput, greenInput, blueInput];\n\t}\n\n\tget hslInputs(): Array<ColorChannelInput> {\n\t\tconst hueInput = {\n\t\t\tid: \"hue\",\n\t\t\tvalue: this._colorValue.H,\n\t\t\tlabel: \"H\",\n\t\t\taccessibleName: this.hueInputLabel,\n\t\t};\n\n\t\tconst saturationInput = {\n\t\t\tid: \"saturation\",\n\t\t\tvalue: this._colorValue.S,\n\t\t\tlabel: \"S\",\n\t\t\taccessibleName: this.saturationInputLabel,\n\t\t\tshowPercentSymbol: true,\n\t\t};\n\n\t\tconst lightInput = {\n\t\t\tid: \"light\",\n\t\t\tvalue: this._colorValue.L,\n\t\t\tlabel: \"L\",\n\t\t\taccessibleName: this.lightInputLabel,\n\t\t\tshowPercentSymbol: true,\n\t\t};\n\n\t\treturn [hueInput, saturationInput, lightInput];\n\t}\n\n\tget HEX(): string {\n\t\treturn this._colorValue.HEX;\n\t}\n\n\tget colorChannelInputs() {\n\t\treturn this._displayHSL ? this.hslInputs : this.rgbInputs;\n\t}\n\n\tget _isDefaultPickerMode() {\n\t\treturn !this.simplified;\n\t}\n}\n\nColorPicker.define();\n\nexport default ColorPicker;\n"]}
|
|
@@ -4,7 +4,7 @@ import Slider from "./Slider.js";
|
|
|
4
4
|
import Input from "./Input.js";
|
|
5
5
|
import Button from "./Button.js";
|
|
6
6
|
export default function ColorPickerTemplate() {
|
|
7
|
-
return (_jsxs("
|
|
7
|
+
return (_jsxs("div", { class: "ui5-color-picker-root", role: "group", "aria-label": this.colorPickerLabel, children: [_jsx("div", { class: "ui5-color-picker-main-color", role: "presentation", style: { "background-color": `rgb(${this._mainValue.r}, ${this._mainValue.g}, ${this._mainValue.b})` }, onMouseDown: this._handleMouseDown, onMouseUp: this._handleMouseUp, onMouseMove: this._handleMouseMove, onMouseOut: this._handleMouseOut, children: _jsx("div", { class: "ui5-color-picker-circle", style: {
|
|
8
8
|
left: `${this._selectedCoordinates.x}px`,
|
|
9
9
|
top: `${this._selectedCoordinates.y}px`,
|
|
10
10
|
} }) }), _jsxs("div", { class: "ui5-color-picker-sliders-wrapper", role: "group", "aria-label": this.sliderGroupLabel, children: [_jsx(Slider, { disabled: this.inputsDisabled, class: "ui5-color-picker-hue-slider", min: 0, max: 360, step: 1, value: this._hue, accessibleName: this.hueSliderLabel, showTooltip: true, onInput: this._handleHueInput }), this._isDefaultPickerMode &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPickerTemplate.js","sourceRoot":"","sources":["../src/ColorPickerTemplate.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,MAAM,CAAC,OAAO,UAAU,mBAAmB;IAC1C,OAAO,CACN,
|
|
1
|
+
{"version":3,"file":"ColorPickerTemplate.js","sourceRoot":"","sources":["../src/ColorPickerTemplate.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,MAAM,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CAAC,KAAK,CAAC,KAAK,CAAC,GAAI,EAC/B,KAAC,KAAK,cAAE,KAAK,CAAC,KAAK,GAAS,IACvB,EACN,cAAK,KAAK,EAAC,oCAAoC,YAC7C,KAAK,CAAC,iBAAiB;wCACvB,KAAC,KAAK,oBAAU,GAEZ,IAAG,CACT,EAED,eAAK,KAAK,EAAC,mBAAmB,aAC7B,KAAC,KAAK,IACL,EAAE,EAAC,OAAO,EACV,QAAQ,EAAE,IAAI,CAAC,cAAc,EAC7B,KAAK,EAAC,yBAAyB,EAC/B,KAAK,EAAE,IAAI,CAAC,UAAU,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAC7C,cAAc,EAAE,IAAI,CAAC,eAAe,EACpC,QAAQ,EAAE,IAAI,CAAC,kBAAkB,EACjC,OAAO,EAAE,IAAI,CAAC,iBAAiB,GAC9B,EACF,KAAC,KAAK,oBAAU,IACX,EAEN,wBACC,KAAC,MAAM,IACN,KAAK,EAAC,0BAA0B,EAChC,EAAE,EAAC,oBAAoB,EACvB,IAAI,EAAC,QAAQ,EACb,MAAM,EAAC,aAAa,EACpB,OAAO,EAAE,IAAI,CAAC,iBAAiB,EAC/B,OAAO,EAAE,IAAI,CAAC,iBAAiB,GAC9B,GACG,IACD,IAEF,CACN,CAAC;AACH,CAAC","sourcesContent":["import type ColorPicker from \"./ColorPicker.js\";\nimport Label from \"./Label.js\";\nimport Slider from \"./Slider.js\";\nimport Input from \"./Input.js\";\nimport Button from \"./Button.js\";\n\nexport default function ColorPickerTemplate(this: ColorPicker) {\n\treturn (\n\t\t<div\n\t\t\tclass=\"ui5-color-picker-root\"\n\t\t\trole=\"group\"\n\t\t\taria-label={this.colorPickerLabel}\n\t\t>\n\t\t\t<div\n\t\t\t\tclass=\"ui5-color-picker-main-color\"\n\t\t\t\trole=\"presentation\"\n\t\t\t\tstyle={{ \"background-color\": `rgb(${this._mainValue.r}, ${this._mainValue.g}, ${this._mainValue.b})` }}\n\t\t\t\tonMouseDown={this._handleMouseDown}\n\t\t\t\tonMouseUp={this._handleMouseUp}\n\t\t\t\tonMouseMove={this._handleMouseMove}\n\t\t\t\tonMouseOut={this._handleMouseOut}\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tclass=\"ui5-color-picker-circle\"\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tleft: `${this._selectedCoordinates.x}px`,\n\t\t\t\t\t\ttop: `${this._selectedCoordinates.y}px`,\n\t\t\t\t\t}}\n\t\t\t\t></div>\n\t\t\t</div>\n\n\t\t\t<div\n\t\t\t\tclass=\"ui5-color-picker-sliders-wrapper\"\n\t\t\t\trole=\"group\"\n\t\t\t\taria-label={this.sliderGroupLabel}\n\t\t\t>\n\t\t\t\t<Slider\n\t\t\t\t\tdisabled={this.inputsDisabled}\n\t\t\t\t\tclass=\"ui5-color-picker-hue-slider\"\n\t\t\t\t\tmin={0}\n\t\t\t\t\tmax={360}\n\t\t\t\t\tstep={1}\n\t\t\t\t\tvalue={this._hue}\n\t\t\t\t\taccessibleName={this.hueSliderLabel}\n\t\t\t\t\tshowTooltip={true}\n\t\t\t\t\tonInput={this._handleHueInput}\n\t\t\t\t/>\n\n\t\t\t\t{this._isDefaultPickerMode &&\n\t\t\t\t\t<Slider\n\t\t\t\t\t\tdisabled={this.inputsDisabled}\n\t\t\t\t\t\tclass=\"ui5-color-picker-alpha-slider\"\n\t\t\t\t\t\tmin={0}\n\t\t\t\t\t\tmax={1}\n\t\t\t\t\t\tstep={0.01}\n\t\t\t\t\t\tvalue={this._alpha}\n\t\t\t\t\t\taccessibleName={this.alphaSliderLabel}\n\t\t\t\t\t\tshowTooltip={true}\n\t\t\t\t\t\tonInput={this._handleAlphaInput}\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t</div>\n\n\t\t\t<div class=\"ui5-color-picker-current-color\">\n\t\t\t\t<div class=\"ui5-color-picker-colors-wrapper\">\n\t\t\t\t\t<span class=\"ui5-color-picker-white\"></span>\n\t\t\t\t\t<span class=\"ui5-color-picker-color\">\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass=\"ui5-color-picker-color-inner\"\n\t\t\t\t\t\t\tstyle={{ \"background-color\": this._colorValue.toRGBString() }}\n\t\t\t\t\t\t></div>\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"ui5-color-picker-hex-input-wrapper\">\n\t\t\t\t\t<Label>Hex</Label>\n\t\t\t\t\t<Input\n\t\t\t\t\t\tclass=\"ui5-color-picker-hex-input\"\n\t\t\t\t\t\tvalue={this.HEX}\n\t\t\t\t\t\tonKeyDown={this._onkeydown}\n\t\t\t\t\t\taccessibleName={this.hexInputLabel}\n\t\t\t\t\t\tonChange={this._handleHEXChange}\n\t\t\t\t\t\tvalueState={this.hexInputErrorState}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t{this._isDefaultPickerMode &&\n\t\t\t\t<div\n\t\t\t\t\tclass=\"ui5-color-channel-inputs-wrapper\"\n\t\t\t\t\tonui5-change={this._handleColorInputChange}\n\t\t\t\t>\n\t\t\t\t\t{this.colorChannelInputs.map(input =>\n\t\t\t\t\t\t<><div class=\"ui5-color-channel\">\n\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\tid={input.id}\n\t\t\t\t\t\t\t\tclass=\"ui5-color-channel-input\"\n\t\t\t\t\t\t\t\tdisabled={this.inputsDisabled}\n\t\t\t\t\t\t\t\taccessibleName={input.accessibleName}\n\t\t\t\t\t\t\t\tvalue={String(input.value)} />\n\t\t\t\t\t\t\t<Label>{input.label}</Label>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"ui5-color-channel-percentage-label\">\n\t\t\t\t\t\t\t{input.showPercentSymbol &&\n\t\t\t\t\t\t\t\t<Label>%</Label>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div></>\n\t\t\t\t\t)}\n\n\t\t\t\t\t<div class=\"ui5-color-channel\">\n\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\tid=\"alpha\"\n\t\t\t\t\t\t\tdisabled={this.inputsDisabled}\n\t\t\t\t\t\t\tclass=\"ui5-color-channel-input\"\n\t\t\t\t\t\t\tvalue={this._alphaTemp ?? String(this._alpha)}\n\t\t\t\t\t\t\taccessibleName={this.alphaInputLabel}\n\t\t\t\t\t\t\tonChange={this._handleAlphaChange}\n\t\t\t\t\t\t\tonInput={this._handleAlphaInput}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Label>A</Label>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclass=\"ui5-color-channel-toggle\"\n\t\t\t\t\t\t\tid=\"toggle-picker-mode\"\n\t\t\t\t\t\t\ticon=\"expand\"\n\t\t\t\t\t\t\tdesign=\"Transparent\"\n\t\t\t\t\t\t\ttooltip={this.toggleModeTooltip}\n\t\t\t\t\t\t\tonClick={this._togglePickerMode}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t}\n\t\t</div>\n\t);\n}\n"]}
|
|
@@ -92,7 +92,7 @@ declare class DateComponentBase extends UI5Element {
|
|
|
92
92
|
get _secondaryCalendarType(): CalendarType | "Gregorian" | "Islamic" | "Japanese" | "Buddhist" | "Persian" | undefined;
|
|
93
93
|
get _minDate(): CalendarDate;
|
|
94
94
|
get _maxDate(): CalendarDate;
|
|
95
|
-
get _formatPattern(): string;
|
|
95
|
+
get _formatPattern(): string | undefined;
|
|
96
96
|
get _isPattern(): boolean;
|
|
97
97
|
get _isValueFormatPattern(): boolean;
|
|
98
98
|
get _isDisplayFormatPattern(): boolean;
|
|
@@ -106,7 +106,7 @@ declare class DateComponentBase extends UI5Element {
|
|
|
106
106
|
_getDisplayStringFromTimestamp(timestamp: number): string;
|
|
107
107
|
_getValueStringFromTimestamp(timestamp: number): string;
|
|
108
108
|
getFormat(): import("sap/ui/core/format/DateFormat").default;
|
|
109
|
-
get _displayFormat(): string;
|
|
109
|
+
get _displayFormat(): string | undefined;
|
|
110
110
|
get _valueFormat(): string;
|
|
111
111
|
getDisplayFormat(): import("sap/ui/core/format/DateFormat").default;
|
|
112
112
|
getValueFormat(): import("sap/ui/core/format/DateFormat").default;
|
|
@@ -81,7 +81,7 @@ let DateComponentBase = class DateComponentBase extends UI5Element {
|
|
|
81
81
|
return maxDate || getMaxCalendarDate(this._primaryCalendarType);
|
|
82
82
|
}
|
|
83
83
|
get _formatPattern() {
|
|
84
|
-
return this.formatPattern || this.valueFormat
|
|
84
|
+
return this.formatPattern || this.valueFormat; // get from config
|
|
85
85
|
}
|
|
86
86
|
get _isPattern() {
|
|
87
87
|
return this._formatPattern !== "medium" && this._formatPattern !== "short" && this._formatPattern !== "long";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateComponentBase.js","sourceRoot":"","sources":["../src/DateComponentBase.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,UAAU,MAAM,4CAA4C,CAAC;AACpE,OAAO,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,qDAAqD,CAAC;AAChH,OAAO,UAAU,MAAM,oDAAoD,CAAC;AAC5E,OAAO,2BAA2B,MAAM,qEAAqE,CAAC;AAE9G,OAAO,SAAS,MAAM,kDAAkD,CAAC;AACzE,OAAO,YAAY,MAAM,4DAA4D,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,4DAA4D,CAAC;AACpH,OAAO,OAAO,MAAM,uDAAuD,CAAC;AAG5E;;;;;;;;;;;;GAYG;AAMH,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,UAAU;IAyFzC;QACC,KAAK,EAAE,CAAC;QA3CT;;;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aAAa,EAAE,IAAI;gBACnB,OAAO,EAAE,IAAI,CAAC,YAAY;gBAC1B,YAAY,EAAE,IAAI,CAAC,oBAAoB;aACvC,CAAC;YACF,CAAC,CAAC,UAAU,CAAC,eAAe,CAAC;gBAC5B,aAAa,EAAE,IAAI;gBACnB,KAAK,EAAE,IAAI,CAAC,YAAY;gBACxB,YAAY,EAAE,IAAI,CAAC,oBAAoB;aACvC,CAAC,CAAC;IACL,CAAC;IAED,YAAY;QACX,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC;YAC9B,IAAI,CAAC,kBAAkB,GAAG,UAAU,CAAC,eAAe,CAAC;gBACpD,aAAa,EAAE,IAAI;gBACnB,OAAO,EAAE,YAAY;gBACrB,YAAY,EAAE,IAAI,CAAC,oBAAoB;aACvC,CAAC,CAAC;QACJ,CAAC;QACD,OAAO,IAAI,CAAC,kBAAkB,CAAC;IAChC,CAAC;CACD,CAAA;AAjRA;IADC,QAAQ,EAAE;8DAC6B;AAUxC;IADC,QAAQ,EAAE;gEAC+B;AAS1C;IADC,QAAQ,EAAE;wDACY;AASvB;IADC,QAAQ,EAAE;wDACY;AASvB;IADC,QAAQ,EAAE;sDACU;AAWrB;IADC,QAAQ,EAAE;kDACE;AAWb;IADC,QAAQ,EAAE;kDACE;AAUb;IADC,QAAQ,EAAE;gEACmD;AAGvD;IADN,IAAI,CAAC,oBAAoB,CAAC;2CACI;AAhF1B,iBAAiB;IALtB,aAAa,CAAC;QACd,aAAa,EAAE,IAAI;QACnB,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,WAAW;KACrB,CAAC;GACI,iBAAiB,CAyRtB;AAED,eAAe,iBAAiB,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { getCalendarType, getSecondaryCalendarType } 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 type 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\";\nimport UI5Date from \"@ui5/webcomponents-localization/dist/dates/UI5Date.js\";\nimport type CalendarWeekNumbering from \"./types/CalendarWeekNumbering.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 * @constructor\n * @abstract\n * @extends UI5Element\n * @public\n */\n@customElement({\n\tlanguageAware: true,\n\tcldr: true,\n\trenderer: jsxRenderer,\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 * @default undefined\n\t * @public\n\t */\n\t@property()\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 * @since 1.0.0-rc.16\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tsecondaryCalendarType?: `${CalendarType}`;\n\n\t/**\n\t * Determines the format, displayed in the input field.\n\t * @default undefined\n\t * @deprecated Use displayFormat and valueFormat instead\n\t * @public\n\t */\n\t@property()\n\tformatPattern?: string;\n\n\t/**\n\t * Determines the format, displayed in the input field.\n\t * @default undefined\n\t * @since 2.14.0\n\t * @public\n\t */\n\t@property()\n\tdisplayFormat?: string;\n\n\t/**\n\t * Determines the format, used for the value attribute.\n\t * @default undefined\n\t * @since 2.14.0\n\t * @public\n\t */\n\t@property()\n\tvalueFormat?: string;\n\n\t/**\n\t * Determines the minimum date available for selection.\n\t *\n\t * **Note:** If the formatPattern property is not set, the minDate value must be provided in the ISO date format (yyyy-MM-dd).\n\t * @default \"\"\n\t * @since 1.0.0-rc.6\n\t * @public\n\t */\n\t@property()\n\tminDate = \"\";\n\n\t/**\n\t * Determines the maximum date available for selection.\n\t *\n\t * **Note:** If the formatPattern property is not set, the maxDate value must be provided in the ISO date format (yyyy-MM-dd).\n\t * @default \"\"\n\t * @since 1.0.0-rc.6\n\t * @public\n\t */\n\t@property()\n\tmaxDate = \"\";\n\n\t/**\n\t * Defines how to calculate calendar weeks and first day of the week.\n\t * If not set, the calendar will be displayed according to the currently set global configuration.\n\t * @default \"Default\"\n\t * @since 2.2.0\n\t * @public\n\t */\n\t@property()\n\tcalendarWeekNumbering: `${CalendarWeekNumbering}` = \"Default\";\n\n\t@i18n(\"@ui5/webcomponents\")\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 * @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 _secondaryCalendarType() {\n\t\treturn this.secondaryCalendarType || getSecondaryCalendarType();\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 || this.valueFormat || \"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\tget _isValueFormatPattern() {\n\t\treturn this._valueFormat !== \"medium\" && this._valueFormat !== \"short\" && this._valueFormat !== \"long\";\n\t}\n\n\tget _isDisplayFormatPattern() {\n\t\treturn this._displayFormat !== \"medium\" && this._displayFormat !== \"short\" && this._displayFormat !== \"long\";\n\t}\n\n\tget initialFocusId(): string {\n\t\treturn `${this._id}-calendar`;\n\t}\n\n\tget hasSecondaryCalendarType() {\n\t\treturn !!this.secondaryCalendarType && this.secondaryCalendarType !== this.primaryCalendarType;\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.getValueFormat().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_getCalendarDateFromStringDisplayValue(value: string) {\n\t\tconst jsDate = this.getDisplayFormat().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\tif (!timestamp) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tconst localDate = UI5Date.getInstance(timestamp);\n\t\treturn this.getFormat().format(localDate, true);\n\t}\n\n\t_getDisplayStringFromTimestamp(timestamp: number) {\n\t\tif (!timestamp) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tconst localDate = UI5Date.getInstance(timestamp);\n\t\treturn this.getDisplayFormat().format(localDate, true);\n\t}\n\n\t_getValueStringFromTimestamp(timestamp: number) {\n\t\tif (!timestamp) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tconst localDate = UI5Date.getInstance(timestamp);\n\t\treturn this.getValueFormat().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\tget _displayFormat() {\n\t\tif (this.displayFormat) {\n\t\t\treturn this.displayFormat;\n\t\t}\n\n\t\treturn this._formatPattern;\n\t}\n\n\tget _valueFormat() {\n\t\tif (this.valueFormat) {\n\t\t\treturn this.valueFormat;\n\t\t}\n\n\t\tif (this._formatPattern) {\n\t\t\treturn this._formatPattern;\n\t\t}\n\n\t\treturn \"\";\n\t}\n\n\tgetDisplayFormat() {\n\t\treturn this._isDisplayFormatPattern\n\t\t\t? DateFormat.getDateInstance({\n\t\t\t\tstrictParsing: true,\n\t\t\t\tpattern: this._displayFormat,\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._displayFormat,\n\t\t\t\tcalendarType: this._primaryCalendarType,\n\t\t\t});\n\t}\n\n\tgetValueFormat() {\n\t\tif (!this._valueFormat) {\n\t\t\treturn this.getISOFormat();\n\t\t}\n\n\t\treturn this._isValueFormatPattern\n\t\t\t? DateFormat.getDateInstance({\n\t\t\t\tstrictParsing: true,\n\t\t\t\tpattern: this._valueFormat,\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._valueFormat,\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\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,WAAW,MAAM,sDAAsD,CAAC;AAC/E,OAAO,aAAa,MAAM,0DAA0D,CAAC;AACrF,OAAO,QAAQ,MAAM,qDAAqD,CAAC;AAC3E,OAAO,IAAI,MAAM,iDAAiD,CAAC;AAEnE,OAAO,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,qDAAqD,CAAC;AAChH,OAAO,UAAU,MAAM,oDAAoD,CAAC;AAC5E,OAAO,2BAA2B,MAAM,qEAAqE,CAAC;AAE9G,OAAO,SAAS,MAAM,kDAAkD,CAAC;AACzE,O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,CAAC;GACI,iBAAiB,CAyRtB;AAED,eAAe,iBAAiB,CAAC","sourcesContent":["import UI5Element from \"@ui5/webcomponents-base/dist/UI5Element.js\";\nimport jsxRenderer from \"@ui5/webcomponents-base/dist/renderer/JsxRenderer.js\";\nimport customElement from \"@ui5/webcomponents-base/dist/decorators/customElement.js\";\nimport property from \"@ui5/webcomponents-base/dist/decorators/property.js\";\nimport i18n from \"@ui5/webcomponents-base/dist/decorators/i18n.js\";\nimport type I18nBundle from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nimport { getCalendarType, getSecondaryCalendarType } 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 type 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\";\nimport UI5Date from \"@ui5/webcomponents-localization/dist/dates/UI5Date.js\";\nimport type CalendarWeekNumbering from \"./types/CalendarWeekNumbering.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 * @constructor\n * @abstract\n * @extends UI5Element\n * @public\n */\n@customElement({\n\tlanguageAware: true,\n\tcldr: true,\n\trenderer: jsxRenderer,\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 * @default undefined\n\t * @public\n\t */\n\t@property()\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 * @since 1.0.0-rc.16\n\t * @default undefined\n\t * @public\n\t */\n\t@property()\n\tsecondaryCalendarType?: `${CalendarType}`;\n\n\t/**\n\t * Determines the format, displayed in the input field.\n\t * @default undefined\n\t * @deprecated Use displayFormat and valueFormat instead\n\t * @public\n\t */\n\t@property()\n\tformatPattern?: string;\n\n\t/**\n\t * Determines the format, displayed in the input field.\n\t * @default undefined\n\t * @since 2.14.0\n\t * @public\n\t */\n\t@property()\n\tdisplayFormat?: string;\n\n\t/**\n\t * Determines the format, used for the value attribute.\n\t * @default undefined\n\t * @since 2.14.0\n\t * @public\n\t */\n\t@property()\n\tvalueFormat?: string;\n\n\t/**\n\t * Determines the minimum date available for selection.\n\t *\n\t * **Note:** If the formatPattern property is not set, the minDate value must be provided in the ISO date format (yyyy-MM-dd).\n\t * @default \"\"\n\t * @since 1.0.0-rc.6\n\t * @public\n\t */\n\t@property()\n\tminDate = \"\";\n\n\t/**\n\t * Determines the maximum date available for selection.\n\t *\n\t * **Note:** If the formatPattern property is not set, the maxDate value must be provided in the ISO date format (yyyy-MM-dd).\n\t * @default \"\"\n\t * @since 1.0.0-rc.6\n\t * @public\n\t */\n\t@property()\n\tmaxDate = \"\";\n\n\t/**\n\t * Defines how to calculate calendar weeks and first day of the week.\n\t * If not set, the calendar will be displayed according to the currently set global configuration.\n\t * @default \"Default\"\n\t * @since 2.2.0\n\t * @public\n\t */\n\t@property()\n\tcalendarWeekNumbering: `${CalendarWeekNumbering}` = \"Default\";\n\n\t@i18n(\"@ui5/webcomponents\")\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 * @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 _secondaryCalendarType() {\n\t\treturn this.secondaryCalendarType || getSecondaryCalendarType();\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 || this.valueFormat; // 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\tget _isValueFormatPattern() {\n\t\treturn this._valueFormat !== \"medium\" && this._valueFormat !== \"short\" && this._valueFormat !== \"long\";\n\t}\n\n\tget _isDisplayFormatPattern() {\n\t\treturn this._displayFormat !== \"medium\" && this._displayFormat !== \"short\" && this._displayFormat !== \"long\";\n\t}\n\n\tget initialFocusId(): string {\n\t\treturn `${this._id}-calendar`;\n\t}\n\n\tget hasSecondaryCalendarType() {\n\t\treturn !!this.secondaryCalendarType && this.secondaryCalendarType !== this.primaryCalendarType;\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.getValueFormat().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_getCalendarDateFromStringDisplayValue(value: string) {\n\t\tconst jsDate = this.getDisplayFormat().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\tif (!timestamp) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tconst localDate = UI5Date.getInstance(timestamp);\n\t\treturn this.getFormat().format(localDate, true);\n\t}\n\n\t_getDisplayStringFromTimestamp(timestamp: number) {\n\t\tif (!timestamp) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tconst localDate = UI5Date.getInstance(timestamp);\n\t\treturn this.getDisplayFormat().format(localDate, true);\n\t}\n\n\t_getValueStringFromTimestamp(timestamp: number) {\n\t\tif (!timestamp) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tconst localDate = UI5Date.getInstance(timestamp);\n\t\treturn this.getValueFormat().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\tget _displayFormat() {\n\t\tif (this.displayFormat) {\n\t\t\treturn this.displayFormat;\n\t\t}\n\n\t\treturn this._formatPattern;\n\t}\n\n\tget _valueFormat() {\n\t\tif (this.valueFormat) {\n\t\t\treturn this.valueFormat;\n\t\t}\n\n\t\tif (this._formatPattern) {\n\t\t\treturn this._formatPattern;\n\t\t}\n\n\t\treturn \"\";\n\t}\n\n\tgetDisplayFormat() {\n\t\treturn this._isDisplayFormatPattern\n\t\t\t? DateFormat.getDateInstance({\n\t\t\t\tstrictParsing: true,\n\t\t\t\tpattern: this._displayFormat,\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._displayFormat,\n\t\t\t\tcalendarType: this._primaryCalendarType,\n\t\t\t});\n\t}\n\n\tgetValueFormat() {\n\t\tif (!this._valueFormat) {\n\t\t\treturn this.getISOFormat();\n\t\t}\n\n\t\treturn this._isValueFormatPattern\n\t\t\t? DateFormat.getDateInstance({\n\t\t\t\tstrictParsing: true,\n\t\t\t\tpattern: this._valueFormat,\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._valueFormat,\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\nexport default DateComponentBase;\n"]}
|
package/dist/DatePicker.d.ts
CHANGED
|
@@ -56,8 +56,8 @@ type Picker = "day" | "month" | "year";
|
|
|
56
56
|
* Supported format options are pattern-based on Unicode LDML Date Format notation.
|
|
57
57
|
* For more information, see [UTS #35: Unicode Locale Data Markup Language](https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table).
|
|
58
58
|
*
|
|
59
|
-
* For example, if the
|
|
60
|
-
*
|
|
59
|
+
* For example, if the valueFormat is "yyyy-MM-dd", the displayFormat is "MMM d, y", and the used locale is English, a valid value string is "2015-07-30", which leads to an output of "Jul 30, 2015".
|
|
60
|
+
* If no placeholder is set to the DatePicker, the used displayFormat is displayed as a placeholder. If another placeholder is needed, it must be set.
|
|
61
61
|
*
|
|
62
62
|
* ### Keyboard Handling
|
|
63
63
|
* The `ui5-date-picker` provides advanced keyboard handling.
|
|
@@ -365,6 +365,7 @@ declare class DatePicker extends DateComponentBase implements IFormInputElement
|
|
|
365
365
|
get openIconName(): string;
|
|
366
366
|
get roleDescription(): string;
|
|
367
367
|
get pickerAccessibleName(): string;
|
|
368
|
+
get btnCancelLabel(): string;
|
|
368
369
|
/**
|
|
369
370
|
* Defines whether the dialog on mobile should have header
|
|
370
371
|
* @private
|
package/dist/DatePicker.js
CHANGED
|
@@ -24,7 +24,7 @@ import { isPageUp, isPageDown, isPageUpShift, isPageDownShift, isPageUpShiftCtrl
|
|
|
24
24
|
import { isPhone, isDesktop } from "@ui5/webcomponents-base/dist/Device.js";
|
|
25
25
|
import CalendarPickersMode from "./types/CalendarPickersMode.js";
|
|
26
26
|
import "@ui5/webcomponents-icons/dist/appointment-2.js";
|
|
27
|
-
import { DATEPICKER_OPEN_ICON_TITLE, DATEPICKER_OPEN_ICON_TITLE_OPENED, DATEPICKER_DATE_DESCRIPTION, DATETIME_COMPONENTS_PLACEHOLDER_PREFIX, INPUT_SUGGESTIONS_TITLE, DATEPICKER_POPOVER_ACCESSIBLE_NAME, VALUE_STATE_ERROR, VALUE_STATE_INFORMATION, VALUE_STATE_SUCCESS, VALUE_STATE_WARNING, DATEPICKER_VALUE_MISSING, DATEPICKER_PATTERN_MISSMATCH, DATEPICKER_RANGE_UNDERFLOW, DATEPICKER_RANGE_OVERFLOW, } from "./generated/i18n/i18n-defaults.js";
|
|
27
|
+
import { DATEPICKER_OPEN_ICON_TITLE, DATEPICKER_OPEN_ICON_TITLE_OPENED, DATEPICKER_DATE_DESCRIPTION, DATETIME_COMPONENTS_PLACEHOLDER_PREFIX, INPUT_SUGGESTIONS_TITLE, DATEPICKER_POPOVER_ACCESSIBLE_NAME, VALUE_STATE_ERROR, VALUE_STATE_INFORMATION, VALUE_STATE_SUCCESS, VALUE_STATE_WARNING, DATEPICKER_VALUE_MISSING, DATEPICKER_PATTERN_MISSMATCH, DATEPICKER_RANGE_UNDERFLOW, DATEPICKER_RANGE_OVERFLOW, TIMEPICKER_CANCEL_BUTTON, } from "./generated/i18n/i18n-defaults.js";
|
|
28
28
|
import DateComponentBase from "./DateComponentBase.js";
|
|
29
29
|
import InputType from "./types/InputType.js";
|
|
30
30
|
import IconMode from "./types/IconMode.js";
|
|
@@ -64,8 +64,8 @@ import ValueStateMessageCss from "./generated/themes/ValueStateMessage.css.js";
|
|
|
64
64
|
* Supported format options are pattern-based on Unicode LDML Date Format notation.
|
|
65
65
|
* For more information, see [UTS #35: Unicode Locale Data Markup Language](https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table).
|
|
66
66
|
*
|
|
67
|
-
* For example, if the
|
|
68
|
-
*
|
|
67
|
+
* For example, if the valueFormat is "yyyy-MM-dd", the displayFormat is "MMM d, y", and the used locale is English, a valid value string is "2015-07-30", which leads to an output of "Jul 30, 2015".
|
|
68
|
+
* If no placeholder is set to the DatePicker, the used displayFormat is displayed as a placeholder. If another placeholder is needed, it must be set.
|
|
69
69
|
*
|
|
70
70
|
* ### Keyboard Handling
|
|
71
71
|
* The `ui5-date-picker` provides advanced keyboard handling.
|
|
@@ -624,6 +624,9 @@ let DatePicker = DatePicker_1 = class DatePicker extends DateComponentBase {
|
|
|
624
624
|
get pickerAccessibleName() {
|
|
625
625
|
return DatePicker_1.i18nBundle.getText(DATEPICKER_POPOVER_ACCESSIBLE_NAME, this.ariaLabelText);
|
|
626
626
|
}
|
|
627
|
+
get btnCancelLabel() {
|
|
628
|
+
return DatePicker_1.i18nBundle.getText(TIMEPICKER_CANCEL_BUTTON);
|
|
629
|
+
}
|
|
627
630
|
/**
|
|
628
631
|
* Defines whether the dialog on mobile should have header
|
|
629
632
|
* @private
|