@refinitiv-ui/elements 5.12.2 → 6.0.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/lib/accordion/index.d.ts +5 -0
- package/lib/accordion/index.js +2 -2
- package/lib/accordion/themes/halo/dark/index.js +1 -1
- package/lib/accordion/themes/halo/light/index.js +1 -1
- package/lib/accordion/themes/solar/charcoal/index.js +1 -1
- package/lib/accordion/themes/solar/pearl/index.js +1 -1
- package/lib/appstate-bar/index.d.ts +11 -0
- package/lib/appstate-bar/index.js +8 -3
- package/lib/appstate-bar/themes/halo/dark/index.js +1 -1
- package/lib/appstate-bar/themes/halo/light/index.js +1 -1
- package/lib/appstate-bar/themes/solar/charcoal/index.js +1 -1
- package/lib/appstate-bar/themes/solar/pearl/index.js +1 -1
- package/lib/autosuggest/index.d.ts +5 -0
- package/lib/autosuggest/index.js +22 -12
- package/lib/autosuggest/themes/halo/dark/index.js +3 -3
- package/lib/autosuggest/themes/halo/light/index.js +3 -3
- package/lib/autosuggest/themes/solar/charcoal/index.js +3 -3
- package/lib/autosuggest/themes/solar/pearl/index.js +3 -3
- package/lib/button/index.d.ts +7 -13
- package/lib/button/index.js +8 -43
- package/lib/button/themes/halo/dark/index.js +1 -1
- package/lib/button/themes/halo/light/index.js +1 -1
- package/lib/button/themes/solar/charcoal/index.js +1 -1
- package/lib/button/themes/solar/pearl/index.js +1 -1
- package/lib/button-bar/index.d.ts +5 -0
- package/lib/button-bar/index.js +4 -5
- package/lib/button-bar/themes/halo/dark/index.js +1 -1
- package/lib/button-bar/themes/halo/light/index.js +1 -1
- package/lib/button-bar/themes/solar/charcoal/index.js +1 -1
- package/lib/button-bar/themes/solar/pearl/index.js +1 -1
- package/lib/calendar/constants.js +1 -1
- package/lib/calendar/index.d.ts +6 -1
- package/lib/calendar/index.js +39 -15
- package/lib/calendar/locales.js +5 -5
- package/lib/calendar/themes/halo/dark/index.js +1 -1
- package/lib/calendar/themes/halo/light/index.js +1 -1
- package/lib/calendar/themes/solar/charcoal/index.js +1 -1
- package/lib/calendar/themes/solar/pearl/index.js +1 -1
- package/lib/calendar/types.d.ts +1 -1
- package/lib/calendar/utils.js +5 -5
- package/lib/canvas/index.d.ts +5 -0
- package/lib/canvas/index.js +3 -4
- package/lib/card/index.d.ts +21 -0
- package/lib/card/index.js +37 -15
- package/lib/card/themes/halo/dark/index.js +3 -3
- package/lib/card/themes/halo/light/index.js +3 -3
- package/lib/card/themes/solar/charcoal/index.js +3 -3
- package/lib/card/themes/solar/pearl/index.js +3 -3
- package/lib/chart/index.d.ts +5 -0
- package/lib/chart/index.js +18 -22
- package/lib/chart/plugins/doughnut-center-label.js +6 -11
- package/lib/chart/themes/halo/dark/index.js +2 -2
- package/lib/chart/themes/halo/light/index.js +2 -2
- package/lib/chart/themes/solar/charcoal/index.js +2 -2
- package/lib/chart/themes/solar/pearl/index.js +2 -2
- package/lib/checkbox/index.d.ts +5 -0
- package/lib/checkbox/index.js +3 -3
- package/lib/checkbox/themes/halo/dark/index.js +2 -2
- package/lib/checkbox/themes/halo/light/index.js +2 -2
- package/lib/checkbox/themes/solar/charcoal/index.js +2 -2
- package/lib/checkbox/themes/solar/pearl/index.js +2 -2
- package/lib/clock/index.d.ts +5 -0
- package/lib/clock/index.js +6 -6
- package/lib/clock/utils/TickManager.js +2 -2
- package/lib/collapse/index.d.ts +5 -0
- package/lib/collapse/index.js +7 -9
- package/lib/collapse/themes/halo/dark/index.js +3 -3
- package/lib/collapse/themes/halo/light/index.js +3 -3
- package/lib/collapse/themes/solar/charcoal/index.js +3 -3
- package/lib/collapse/themes/solar/pearl/index.js +3 -3
- package/lib/color-dialog/elements/color-palettes.d.ts +5 -0
- package/lib/color-dialog/elements/color-palettes.js +1 -1
- package/lib/color-dialog/elements/grayscale-palettes.d.ts +5 -0
- package/lib/color-dialog/elements/grayscale-palettes.js +2 -2
- package/lib/color-dialog/elements/palettes.js +4 -5
- package/lib/color-dialog/helpers/value-model.js +1 -1
- package/lib/color-dialog/index.d.ts +6 -1
- package/lib/color-dialog/index.js +17 -12
- package/lib/color-dialog/themes/halo/dark/index.js +5 -5
- package/lib/color-dialog/themes/halo/light/index.js +5 -5
- package/lib/color-dialog/themes/solar/charcoal/index.js +5 -5
- package/lib/color-dialog/themes/solar/pearl/index.js +5 -5
- package/lib/combo-box/helpers/filter.d.ts +1 -1
- package/lib/combo-box/helpers/types.d.ts +1 -1
- package/lib/combo-box/index.d.ts +9 -4
- package/lib/combo-box/index.js +31 -14
- package/lib/combo-box/themes/halo/dark/index.js +5 -5
- package/lib/combo-box/themes/halo/light/index.js +5 -5
- package/lib/combo-box/themes/solar/charcoal/index.js +5 -5
- package/lib/combo-box/themes/solar/pearl/index.js +5 -5
- package/lib/counter/index.d.ts +11 -6
- package/lib/counter/index.js +8 -8
- package/lib/counter/themes/halo/dark/index.js +1 -1
- package/lib/counter/themes/halo/light/index.js +1 -1
- package/lib/counter/themes/solar/charcoal/index.js +1 -1
- package/lib/counter/themes/solar/pearl/index.js +1 -1
- package/lib/datetime-field/constants.d.ts +4 -0
- package/lib/datetime-field/constants.js +5 -0
- package/lib/datetime-field/custom-elements.json +345 -0
- package/lib/datetime-field/custom-elements.md +61 -0
- package/lib/datetime-field/index.d.ts +322 -0
- package/lib/datetime-field/index.js +660 -0
- package/lib/datetime-field/themes/halo/dark/index.js +3 -0
- package/lib/datetime-field/themes/halo/light/index.js +3 -0
- package/lib/datetime-field/themes/solar/charcoal/index.js +3 -0
- package/lib/datetime-field/themes/solar/pearl/index.js +3 -0
- package/lib/datetime-field/types.d.ts +10 -0
- package/lib/datetime-field/types.js +1 -0
- package/lib/datetime-field/utils.d.ts +25 -0
- package/lib/datetime-field/utils.js +79 -0
- package/lib/datetime-picker/index.d.ts +5 -0
- package/lib/datetime-picker/index.js +6 -7
- package/lib/datetime-picker/themes/halo/dark/index.js +5 -5
- package/lib/datetime-picker/themes/halo/light/index.js +5 -5
- package/lib/datetime-picker/themes/solar/charcoal/index.js +5 -5
- package/lib/datetime-picker/themes/solar/pearl/index.js +5 -5
- package/lib/datetime-picker/utils.js +1 -1
- package/lib/dialog/draggable-element.js +1 -2
- package/lib/dialog/index.d.ts +6 -1
- package/lib/dialog/index.js +5 -5
- package/lib/dialog/themes/halo/dark/index.js +5 -5
- package/lib/dialog/themes/halo/light/index.js +5 -5
- package/lib/dialog/themes/solar/charcoal/index.js +5 -5
- package/lib/dialog/themes/solar/pearl/index.js +5 -5
- package/lib/email-field/index.d.ts +6 -1
- package/lib/email-field/index.js +8 -3
- package/lib/email-field/themes/halo/dark/index.js +1 -1
- package/lib/email-field/themes/halo/light/index.js +1 -1
- package/lib/email-field/themes/solar/charcoal/index.js +1 -1
- package/lib/email-field/themes/solar/pearl/index.js +1 -1
- package/lib/flag/index.d.ts +5 -0
- package/lib/flag/index.js +3 -3
- package/lib/flag/utils/FlagLoader.d.ts +1 -1
- package/lib/flag/utils/FlagLoader.js +1 -1
- package/lib/header/index.d.ts +5 -0
- package/lib/header/index.js +2 -2
- package/lib/heatmap/helpers/color.d.ts +1 -1
- package/lib/heatmap/helpers/color.js +3 -5
- package/lib/heatmap/helpers/text.d.ts +1 -7
- package/lib/heatmap/helpers/text.js +1 -18
- package/lib/heatmap/index.d.ts +5 -0
- package/lib/heatmap/index.js +22 -30
- package/lib/heatmap/themes/halo/dark/index.js +2 -2
- package/lib/heatmap/themes/halo/light/index.js +2 -2
- package/lib/heatmap/themes/solar/charcoal/index.js +2 -2
- package/lib/heatmap/themes/solar/pearl/index.js +2 -2
- package/lib/icon/index.d.ts +5 -0
- package/lib/icon/index.js +3 -3
- package/lib/icon/utils/IconLoader.d.ts +1 -1
- package/lib/icon/utils/IconLoader.js +1 -1
- package/lib/interactive-chart/helpers/types.d.ts +1 -1
- package/lib/interactive-chart/index.d.ts +5 -12
- package/lib/interactive-chart/index.js +20 -36
- package/lib/interactive-chart/themes/halo/dark/index.js +1 -1
- package/lib/interactive-chart/themes/halo/light/index.js +1 -1
- package/lib/interactive-chart/themes/solar/charcoal/index.js +1 -1
- package/lib/interactive-chart/themes/solar/pearl/index.js +1 -1
- package/lib/item/helpers/types.d.ts +1 -1
- package/lib/item/index.d.ts +24 -17
- package/lib/item/index.js +45 -48
- package/lib/item/themes/halo/dark/index.js +2 -2
- package/lib/item/themes/halo/light/index.js +2 -2
- package/lib/item/themes/solar/charcoal/index.js +2 -2
- package/lib/item/themes/solar/pearl/index.js +2 -2
- package/lib/label/index.d.ts +6 -1
- package/lib/label/index.js +6 -6
- package/lib/label/themes/halo/dark/index.js +1 -1
- package/lib/label/themes/halo/light/index.js +1 -1
- package/lib/label/themes/solar/charcoal/index.js +1 -1
- package/lib/label/themes/solar/pearl/index.js +1 -1
- package/lib/layout/index.d.ts +5 -0
- package/lib/layout/index.js +2 -2
- package/lib/led-gauge/index.d.ts +5 -0
- package/lib/led-gauge/index.js +2 -2
- package/lib/led-gauge/themes/halo/dark/index.js +1 -1
- package/lib/led-gauge/themes/halo/light/index.js +1 -1
- package/lib/led-gauge/themes/solar/charcoal/index.js +1 -1
- package/lib/led-gauge/themes/solar/pearl/index.js +1 -1
- package/lib/list/custom-elements.json +0 -13
- package/lib/list/custom-elements.md +9 -10
- package/lib/list/helpers/item-id.d.ts +8 -0
- package/lib/list/helpers/item-id.js +13 -0
- package/lib/list/helpers/{list-renderer.d.ts → renderer.d.ts} +4 -0
- package/lib/list/helpers/{list-renderer.js → renderer.js} +8 -0
- package/lib/list/helpers/types.d.ts +1 -1
- package/lib/list/index.d.ts +18 -12
- package/lib/list/index.js +30 -29
- package/lib/list/renderer.d.ts +1 -1
- package/lib/list/themes/halo/dark/index.js +2 -2
- package/lib/list/themes/halo/light/index.js +2 -2
- package/lib/list/themes/solar/charcoal/index.js +2 -2
- package/lib/list/themes/solar/pearl/index.js +2 -2
- package/lib/loader/index.d.ts +6 -0
- package/lib/loader/index.js +5 -1
- package/lib/multi-input/helpers/types.d.ts +1 -1
- package/lib/multi-input/index.d.ts +5 -0
- package/lib/multi-input/index.js +6 -7
- package/lib/multi-input/themes/halo/dark/index.js +2 -2
- package/lib/multi-input/themes/halo/light/index.js +2 -2
- package/lib/multi-input/themes/solar/charcoal/index.js +2 -2
- package/lib/multi-input/themes/solar/pearl/index.js +2 -2
- package/lib/notification/elements/notification-tray.d.ts +5 -0
- package/lib/notification/elements/notification-tray.js +4 -4
- package/lib/notification/elements/notification.d.ts +15 -0
- package/lib/notification/elements/notification.js +12 -3
- package/lib/notification/themes/halo/dark/index.js +1 -1
- package/lib/notification/themes/halo/light/index.js +1 -1
- package/lib/notification/themes/solar/charcoal/index.js +1 -1
- package/lib/notification/themes/solar/pearl/index.js +1 -1
- package/lib/number-field/index.d.ts +8 -3
- package/lib/number-field/index.js +14 -4
- package/lib/number-field/themes/halo/dark/index.js +1 -1
- package/lib/number-field/themes/halo/light/index.js +1 -1
- package/lib/number-field/themes/solar/charcoal/index.js +1 -1
- package/lib/number-field/themes/solar/pearl/index.js +1 -1
- package/lib/overlay/elements/overlay-backdrop.d.ts +5 -0
- package/lib/overlay/elements/overlay-backdrop.js +2 -2
- package/lib/overlay/elements/overlay-viewport.d.ts +5 -0
- package/lib/overlay/elements/overlay-viewport.js +1 -1
- package/lib/overlay/elements/overlay.d.ts +5 -0
- package/lib/overlay/elements/overlay.js +7 -5
- package/lib/overlay/managers/focus-manager.js +11 -6
- package/lib/overlay/managers/interaction-lock-manager.js +1 -1
- package/lib/overlay/managers/viewport-manager.js +4 -5
- package/lib/overlay/managers/zindex-manager.js +1 -1
- package/lib/overlay-menu/helpers/types.d.ts +7 -1
- package/lib/overlay-menu/helpers/types.js +7 -1
- package/lib/overlay-menu/index.d.ts +14 -4
- package/lib/overlay-menu/index.js +57 -29
- package/lib/overlay-menu/managers/menu-manager.js +2 -1
- package/lib/overlay-menu/themes/halo/dark/index.js +3 -3
- package/lib/overlay-menu/themes/halo/light/index.js +3 -3
- package/lib/overlay-menu/themes/solar/charcoal/index.js +3 -3
- package/lib/overlay-menu/themes/solar/pearl/index.js +3 -3
- package/lib/pagination/index.d.ts +79 -91
- package/lib/pagination/index.js +205 -239
- package/lib/pagination/themes/halo/dark/index.js +4 -5
- package/lib/pagination/themes/halo/light/index.js +4 -5
- package/lib/pagination/themes/solar/charcoal/index.js +4 -5
- package/lib/pagination/themes/solar/pearl/index.js +4 -5
- package/lib/panel/index.d.ts +5 -0
- package/lib/panel/index.js +2 -2
- package/lib/password-field/index.d.ts +7 -2
- package/lib/password-field/index.js +7 -4
- package/lib/password-field/themes/halo/dark/index.js +1 -1
- package/lib/password-field/themes/halo/light/index.js +1 -1
- package/lib/password-field/themes/solar/charcoal/index.js +1 -1
- package/lib/password-field/themes/solar/pearl/index.js +1 -1
- package/lib/pill/index.d.ts +21 -0
- package/lib/pill/index.js +36 -5
- package/lib/pill/themes/halo/dark/index.js +2 -2
- package/lib/pill/themes/halo/light/index.js +2 -2
- package/lib/pill/themes/solar/charcoal/index.js +2 -2
- package/lib/pill/themes/solar/pearl/index.js +2 -2
- package/lib/progress-bar/index.d.ts +5 -0
- package/lib/progress-bar/index.js +3 -3
- package/lib/radio-button/index.d.ts +5 -0
- package/lib/radio-button/index.js +3 -3
- package/lib/radio-button/radio-button-registry.d.ts +1 -1
- package/lib/radio-button/radio-button-registry.js +4 -2
- package/lib/radio-button/themes/halo/dark/index.js +1 -1
- package/lib/radio-button/themes/halo/light/index.js +1 -1
- package/lib/radio-button/themes/solar/charcoal/index.js +1 -1
- package/lib/radio-button/themes/solar/pearl/index.js +1 -1
- package/lib/rating/index.d.ts +5 -0
- package/lib/rating/index.js +4 -4
- package/lib/search-field/index.d.ts +7 -2
- package/lib/search-field/index.js +8 -4
- package/lib/search-field/themes/halo/dark/index.js +1 -1
- package/lib/search-field/themes/halo/light/index.js +1 -1
- package/lib/search-field/themes/solar/charcoal/index.js +1 -1
- package/lib/search-field/themes/solar/pearl/index.js +1 -1
- package/lib/select/index.d.ts +5 -0
- package/lib/select/index.js +11 -14
- package/lib/select/themes/halo/dark/index.js +3 -3
- package/lib/select/themes/halo/light/index.js +3 -3
- package/lib/select/themes/solar/charcoal/index.js +3 -3
- package/lib/select/themes/solar/pearl/index.js +3 -3
- package/lib/sidebar-layout/index.d.ts +5 -0
- package/lib/sidebar-layout/index.js +4 -4
- package/lib/sidebar-layout/themes/halo/dark/index.js +1 -1
- package/lib/sidebar-layout/themes/halo/light/index.js +1 -1
- package/lib/sidebar-layout/themes/solar/charcoal/index.js +1 -1
- package/lib/sidebar-layout/themes/solar/pearl/index.js +1 -1
- package/lib/slider/constants.d.ts +15 -0
- package/lib/slider/constants.js +18 -0
- package/lib/slider/index.d.ts +55 -80
- package/lib/slider/index.js +365 -460
- package/lib/slider/themes/halo/dark/index.js +1 -1
- package/lib/slider/themes/halo/light/index.js +1 -1
- package/lib/slider/themes/solar/charcoal/index.js +1 -1
- package/lib/slider/themes/solar/pearl/index.js +1 -1
- package/lib/slider/utils.d.ts +35 -0
- package/lib/slider/utils.js +54 -0
- package/lib/sparkline/index.d.ts +5 -0
- package/lib/sparkline/index.js +9 -10
- package/lib/swing-gauge/index.d.ts +5 -0
- package/lib/swing-gauge/index.js +14 -8
- package/lib/swing-gauge/themes/halo/dark/index.js +1 -1
- package/lib/swing-gauge/themes/halo/light/index.js +1 -1
- package/lib/swing-gauge/themes/solar/charcoal/index.js +1 -1
- package/lib/swing-gauge/themes/solar/pearl/index.js +1 -1
- package/lib/tab/index.d.ts +5 -0
- package/lib/tab/index.js +4 -4
- package/lib/tab/themes/halo/dark/index.js +2 -2
- package/lib/tab/themes/halo/light/index.js +2 -2
- package/lib/tab/themes/solar/charcoal/index.js +2 -2
- package/lib/tab/themes/solar/pearl/index.js +2 -2
- package/lib/tab-bar/index.d.ts +5 -0
- package/lib/tab-bar/index.js +6 -6
- package/lib/tab-bar/themes/halo/dark/index.js +2 -2
- package/lib/tab-bar/themes/halo/light/index.js +2 -2
- package/lib/tab-bar/themes/solar/charcoal/index.js +2 -2
- package/lib/tab-bar/themes/solar/pearl/index.js +2 -2
- package/lib/text-field/index.d.ts +19 -1
- package/lib/text-field/index.js +35 -11
- package/lib/text-field/themes/halo/dark/index.js +1 -1
- package/lib/text-field/themes/halo/light/index.js +1 -1
- package/lib/text-field/themes/solar/charcoal/index.js +1 -1
- package/lib/text-field/themes/solar/pearl/index.js +1 -1
- package/lib/time-picker/index.d.ts +6 -1
- package/lib/time-picker/index.js +11 -11
- package/lib/time-picker/themes/halo/dark/index.js +2 -2
- package/lib/time-picker/themes/halo/light/index.js +2 -2
- package/lib/time-picker/themes/solar/charcoal/index.js +2 -2
- package/lib/time-picker/themes/solar/pearl/index.js +2 -2
- package/lib/toggle/index.d.ts +5 -0
- package/lib/toggle/index.js +2 -2
- package/lib/tooltip/elements/tooltip-element.d.ts +1 -2
- package/lib/tooltip/index.d.ts +6 -0
- package/lib/tooltip/index.js +7 -8
- package/lib/tooltip/managers/tooltip-manager.js +2 -2
- package/lib/tooltip/themes/halo/dark/index.js +1 -1
- package/lib/tooltip/themes/halo/light/index.js +1 -1
- package/lib/tooltip/themes/solar/charcoal/index.js +1 -1
- package/lib/tooltip/themes/solar/pearl/index.js +1 -1
- package/lib/tornado-chart/elements/tornado-chart.d.ts +5 -0
- package/lib/tornado-chart/elements/tornado-chart.js +2 -2
- package/lib/tornado-chart/elements/tornado-item.d.ts +5 -0
- package/lib/tornado-chart/elements/tornado-item.js +3 -3
- package/lib/tornado-chart/themes/halo/dark/index.js +2 -2
- package/lib/tornado-chart/themes/halo/light/index.js +2 -2
- package/lib/tornado-chart/themes/solar/charcoal/index.js +2 -2
- package/lib/tornado-chart/themes/solar/pearl/index.js +2 -2
- package/lib/tree/elements/tree-item.d.ts +8 -3
- package/lib/tree/elements/tree-item.js +5 -6
- package/lib/tree/elements/tree.d.ts +7 -3
- package/lib/tree/elements/tree.js +6 -7
- package/lib/tree/helpers/renderer.d.ts +4 -0
- package/lib/tree/helpers/renderer.js +20 -13
- package/lib/tree/helpers/types.d.ts +1 -1
- package/lib/tree/managers/tree-manager.d.ts +1 -1
- package/lib/tree/themes/halo/dark/index.js +4 -4
- package/lib/tree/themes/halo/light/index.js +4 -4
- package/lib/tree/themes/solar/charcoal/index.js +4 -4
- package/lib/tree/themes/solar/pearl/index.js +4 -4
- package/lib/tree-select/index.d.ts +8 -7
- package/lib/tree-select/index.js +39 -38
- package/lib/tree-select/themes/halo/dark/index.js +9 -9
- package/lib/tree-select/themes/halo/light/index.js +9 -9
- package/lib/tree-select/themes/solar/charcoal/index.js +9 -9
- package/lib/tree-select/themes/solar/pearl/index.js +9 -9
- package/lib/version.js +1 -1
- package/package.json +35 -295
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
import { JSXInterface } from '../jsx';
|
|
2
|
+
import { PropertyValues, TemplateResult } from '@refinitiv-ui/core';
|
|
3
|
+
import { TemplateMap } from '@refinitiv-ui/core/directives/template-map.js';
|
|
4
|
+
import { Locale } from '@refinitiv-ui/utils/date.js';
|
|
5
|
+
import { TranslateDirective } from '@refinitiv-ui/translate';
|
|
6
|
+
import { NavigationKeys, DateTimeFormatPart } from './types';
|
|
7
|
+
import { TextField } from '../text-field/index.js';
|
|
8
|
+
import '@refinitiv-ui/phrasebook/locale/en/datetime-field.js';
|
|
9
|
+
/**
|
|
10
|
+
* A form control element for datetime input.
|
|
11
|
+
*
|
|
12
|
+
* @fires value-changed - Dispatched when value changes
|
|
13
|
+
* @fires error-changed - Dispatched when error state changes
|
|
14
|
+
* @fires icon-click - Dispatched when icon is clicked
|
|
15
|
+
*
|
|
16
|
+
* @attr {boolean} disabled - Set disabled state
|
|
17
|
+
* @prop {boolean} [disabled=false] - Set disabled state
|
|
18
|
+
*
|
|
19
|
+
* @attr {boolean} error - Set error state
|
|
20
|
+
* @prop {boolean} [error=false] - Set error state
|
|
21
|
+
*
|
|
22
|
+
* @attr {string} icon - Specify icon to display in input. Value can be icon name
|
|
23
|
+
* @prop {string | null} [icon=null] - Specify icon to display in input. Value can be icon name
|
|
24
|
+
*
|
|
25
|
+
* @attr {boolean} icon-has-action - Specify when icon need to be clickable
|
|
26
|
+
* @prop {boolean} [iconHasAction=false] - Specify when icon need to be clickable
|
|
27
|
+
*
|
|
28
|
+
* @attr {number} maxlength - Set character max limit
|
|
29
|
+
* @prop {number | null} [maxLength=null] - Set character max limit
|
|
30
|
+
*
|
|
31
|
+
* @attr {number} minlength - Set character min limit
|
|
32
|
+
* @prop {number | null} [minLength=null] - Set character min limit
|
|
33
|
+
*
|
|
34
|
+
* @prop {string} [pattern=""] - Set regular expression for input validation
|
|
35
|
+
*
|
|
36
|
+
* @attr {string} placeholder - Set placeholder text
|
|
37
|
+
* @prop {string} [placeholder=""] - Set placeholder text
|
|
38
|
+
*
|
|
39
|
+
* @attr {boolean} readonly - Set readonly state
|
|
40
|
+
* @prop {boolean} [readonly=false] - Set readonly state
|
|
41
|
+
*
|
|
42
|
+
* @attr {boolean} transparent - Disables all other states and border/background styles.
|
|
43
|
+
* @prop {boolean} [transparent=false] - Disables all other states and border/background styles.
|
|
44
|
+
*
|
|
45
|
+
* @attr {boolean} warning - Set warning state
|
|
46
|
+
* @prop {boolean} [warning=false] - Set warning state
|
|
47
|
+
*/
|
|
48
|
+
export declare class DatetimeField extends TextField {
|
|
49
|
+
/**
|
|
50
|
+
* Element version number
|
|
51
|
+
* @returns version number
|
|
52
|
+
*/
|
|
53
|
+
static get version(): string;
|
|
54
|
+
/**
|
|
55
|
+
* Delay selecting a part to ensure
|
|
56
|
+
* that scroll can be updated
|
|
57
|
+
*/
|
|
58
|
+
private selectPartFrame;
|
|
59
|
+
/**
|
|
60
|
+
* Set minimum date.
|
|
61
|
+
* This value must follow the `format` and be less
|
|
62
|
+
* than or equal to the value of the `max` attribute
|
|
63
|
+
*/
|
|
64
|
+
min: string | null;
|
|
65
|
+
/**
|
|
66
|
+
* Set maximum date.
|
|
67
|
+
* This value must follow the `format` and be greater
|
|
68
|
+
* than or equal to the value of the `min` attribute
|
|
69
|
+
*/
|
|
70
|
+
max: string | null;
|
|
71
|
+
private _timepicker;
|
|
72
|
+
/**
|
|
73
|
+
* Toggle to display the time picker
|
|
74
|
+
* @param timepicker true to set timepicker mode
|
|
75
|
+
* @default false
|
|
76
|
+
*/
|
|
77
|
+
set timepicker(timepicker: boolean);
|
|
78
|
+
get timepicker(): boolean;
|
|
79
|
+
private _showSeconds;
|
|
80
|
+
/**
|
|
81
|
+
* Toggle to display the seconds
|
|
82
|
+
* @param showSeconds true to show seconds
|
|
83
|
+
* @default false
|
|
84
|
+
*/
|
|
85
|
+
set showSeconds(showSeconds: boolean);
|
|
86
|
+
get showSeconds(): boolean;
|
|
87
|
+
private _amPm;
|
|
88
|
+
/**
|
|
89
|
+
* Overrides 12hr time display format
|
|
90
|
+
* @param amPm true to show 12hr time format
|
|
91
|
+
* @default false
|
|
92
|
+
*/
|
|
93
|
+
set amPm(amPm: boolean);
|
|
94
|
+
get amPm(): boolean;
|
|
95
|
+
private _formatOptions;
|
|
96
|
+
/**
|
|
97
|
+
* Set the datetime format options based on
|
|
98
|
+
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat
|
|
99
|
+
* `formatOptions` overrides `timepicker` and `showSeconds` properties.
|
|
100
|
+
* Note: time-zone is not supported
|
|
101
|
+
* @param formatOptions Format options
|
|
102
|
+
* @default - null
|
|
103
|
+
*/
|
|
104
|
+
set formatOptions(formatOptions: Intl.DateTimeFormatOptions | null);
|
|
105
|
+
get formatOptions(): Intl.DateTimeFormatOptions | null;
|
|
106
|
+
/**
|
|
107
|
+
* Used for translations
|
|
108
|
+
*/
|
|
109
|
+
protected t: TranslateDirective;
|
|
110
|
+
/**
|
|
111
|
+
* Format, which is based on locale
|
|
112
|
+
*/
|
|
113
|
+
private _locale;
|
|
114
|
+
protected get locale(): Locale;
|
|
115
|
+
private interimValueState;
|
|
116
|
+
/**
|
|
117
|
+
* Current date time value
|
|
118
|
+
* @param value Calendar value
|
|
119
|
+
* @default -
|
|
120
|
+
*/
|
|
121
|
+
set value(value: string);
|
|
122
|
+
get value(): string;
|
|
123
|
+
/**
|
|
124
|
+
* Returns the value of the element, interpreted as double number
|
|
125
|
+
*/
|
|
126
|
+
get valueAsNumber(): number;
|
|
127
|
+
/**
|
|
128
|
+
* Set the value of the element, interpreted as double number
|
|
129
|
+
* @param value number value
|
|
130
|
+
*/
|
|
131
|
+
set valueAsNumber(value: number);
|
|
132
|
+
/**
|
|
133
|
+
* Returns the value of the element, interpreted as Date
|
|
134
|
+
*/
|
|
135
|
+
get valueAsDate(): null | Date;
|
|
136
|
+
/**
|
|
137
|
+
* Set the value of the element, interpreted as Date
|
|
138
|
+
* @param value date value
|
|
139
|
+
*/
|
|
140
|
+
set valueAsDate(value: null | Date);
|
|
141
|
+
/**
|
|
142
|
+
* Currently selected part
|
|
143
|
+
*/
|
|
144
|
+
protected partLabel: string;
|
|
145
|
+
/**
|
|
146
|
+
* Transform Date object to date string
|
|
147
|
+
* @param value Date
|
|
148
|
+
* @returns dateSting
|
|
149
|
+
*/
|
|
150
|
+
protected dateToString(value: Date): string;
|
|
151
|
+
/**
|
|
152
|
+
* Returns true if the datetime field has timepicker
|
|
153
|
+
* @returns hasTimePicker
|
|
154
|
+
*/
|
|
155
|
+
protected get hasTimePicker(): boolean;
|
|
156
|
+
/**
|
|
157
|
+
* Returns true if the datetime field has seconds
|
|
158
|
+
* @returns hasSeconds
|
|
159
|
+
*/
|
|
160
|
+
protected get hasSeconds(): boolean;
|
|
161
|
+
/**
|
|
162
|
+
* Returns true if the datetime field has am-pm
|
|
163
|
+
* @returns hasAmPm
|
|
164
|
+
*/
|
|
165
|
+
protected get hasAmPm(): boolean;
|
|
166
|
+
/**
|
|
167
|
+
* Get today's date noon as the start date when the value is not set
|
|
168
|
+
*/
|
|
169
|
+
protected get startDate(): string;
|
|
170
|
+
/**
|
|
171
|
+
* Updates the element
|
|
172
|
+
* @param changedProperties Properties that has changed
|
|
173
|
+
* @returns {void}
|
|
174
|
+
*/
|
|
175
|
+
willUpdate(changedProperties: PropertyValues): void;
|
|
176
|
+
/**
|
|
177
|
+
* Check if input value should be synchronised with component value
|
|
178
|
+
* @param changedProperties Properties that has changed
|
|
179
|
+
* @returns True if input should be synchronised
|
|
180
|
+
*/
|
|
181
|
+
protected shouldSyncInputValue(changedProperties: PropertyValues): boolean;
|
|
182
|
+
/**
|
|
183
|
+
* Synchronise input value with value.
|
|
184
|
+
* Override the method if value and input value are not the same
|
|
185
|
+
* @param changedProperties Properties that has changed
|
|
186
|
+
* @returns {void}
|
|
187
|
+
*/
|
|
188
|
+
protected syncInputValue(changedProperties: PropertyValues): void;
|
|
189
|
+
protected syncInputValue(): void;
|
|
190
|
+
/**
|
|
191
|
+
* Check if input should be re-validated
|
|
192
|
+
* @param changedProperties Properties that has changed
|
|
193
|
+
* @returns True if input should be re-validated
|
|
194
|
+
*/
|
|
195
|
+
protected shouldValidateInput(changedProperties: PropertyValues): boolean;
|
|
196
|
+
/**
|
|
197
|
+
* Validate input according `pattern`, `minLength` and `maxLength` properties
|
|
198
|
+
* change state of `error` property according pattern validation
|
|
199
|
+
* @returns {void}
|
|
200
|
+
*/
|
|
201
|
+
protected validateInput(): void;
|
|
202
|
+
/**
|
|
203
|
+
* Override validation method for value
|
|
204
|
+
* @param value value
|
|
205
|
+
* @returns value validity
|
|
206
|
+
*/
|
|
207
|
+
protected isValidValue(value: string): boolean;
|
|
208
|
+
/**
|
|
209
|
+
* Used to show a warning when the value does not pass the validation
|
|
210
|
+
* @param value that is invalid
|
|
211
|
+
* @returns {void}
|
|
212
|
+
*/
|
|
213
|
+
protected warnInvalidValue(value: string): void;
|
|
214
|
+
/**
|
|
215
|
+
* Resolve locale based on element parameters
|
|
216
|
+
* @returns locale Resolved locale
|
|
217
|
+
*/
|
|
218
|
+
protected resolveLocale(): Locale;
|
|
219
|
+
/**
|
|
220
|
+
* Get Intl.DateTimeFormat object from locale
|
|
221
|
+
*/
|
|
222
|
+
protected get formatter(): Intl.DateTimeFormat;
|
|
223
|
+
/**
|
|
224
|
+
* Try to format ISO date/time/datetime string into datetime format parts
|
|
225
|
+
* Throw an error if value is invalid
|
|
226
|
+
* @param value ISO string date/time/datetime
|
|
227
|
+
* @returns parts
|
|
228
|
+
*/
|
|
229
|
+
protected formatToParts(value: string): DateTimeFormatPart[];
|
|
230
|
+
/**
|
|
231
|
+
* Format value to inputValue
|
|
232
|
+
* @param value Date string
|
|
233
|
+
* @returns inputValue
|
|
234
|
+
*/
|
|
235
|
+
protected toInputValue(value: string): string;
|
|
236
|
+
/**
|
|
237
|
+
* Format inputValue to value
|
|
238
|
+
* @param inputValue Date string
|
|
239
|
+
* @returns value
|
|
240
|
+
*/
|
|
241
|
+
protected toValue(inputValue: string): string;
|
|
242
|
+
/**
|
|
243
|
+
* On *user-interaction* set the value and notify.
|
|
244
|
+
* @param value New value
|
|
245
|
+
* @returns {void}
|
|
246
|
+
*/
|
|
247
|
+
protected setValueAndNotify(value: string): void;
|
|
248
|
+
/**
|
|
249
|
+
* Reset error state on input
|
|
250
|
+
* @returns {void}
|
|
251
|
+
*/
|
|
252
|
+
protected resetError(): void;
|
|
253
|
+
/**
|
|
254
|
+
* Returns true if an input element contains valid data.
|
|
255
|
+
* @returns true if input is valid
|
|
256
|
+
*/
|
|
257
|
+
checkValidity(): boolean;
|
|
258
|
+
/**
|
|
259
|
+
* Validate input. Mark as error if input is invalid
|
|
260
|
+
* @returns false if there is an error
|
|
261
|
+
*/
|
|
262
|
+
reportValidity(): boolean;
|
|
263
|
+
/**
|
|
264
|
+
* Select part
|
|
265
|
+
* @param index Part index
|
|
266
|
+
* @param parts The list of parts
|
|
267
|
+
* @returns {void}
|
|
268
|
+
*/
|
|
269
|
+
protected selectPart(index: number | undefined, parts: DateTimeFormatPart[]): void;
|
|
270
|
+
/**
|
|
271
|
+
* Change value or selection based on keyboard navigation
|
|
272
|
+
* @param key Navigation key
|
|
273
|
+
* @param event Keyboard event
|
|
274
|
+
* @returns {void}
|
|
275
|
+
*/
|
|
276
|
+
protected onNavigation(key: NavigationKeys, event: KeyboardEvent): void;
|
|
277
|
+
/**
|
|
278
|
+
* Check if value is changed and fire event
|
|
279
|
+
* @returns {void}
|
|
280
|
+
*/
|
|
281
|
+
protected onPossibleValueChange(event: InputEvent): void;
|
|
282
|
+
/**
|
|
283
|
+
* Handles key down input event
|
|
284
|
+
* @param event Key down event object
|
|
285
|
+
* @returns {void}
|
|
286
|
+
*/
|
|
287
|
+
protected onInputKeyDown(event: KeyboardEvent): void;
|
|
288
|
+
/**
|
|
289
|
+
* Decorate `<input>` element with common properties.
|
|
290
|
+
* @returns template map
|
|
291
|
+
*/
|
|
292
|
+
protected get decorateInputMap(): TemplateMap;
|
|
293
|
+
/**
|
|
294
|
+
* Used to announce part and value statuses
|
|
295
|
+
*/
|
|
296
|
+
protected get screenReaderTemplate(): TemplateResult | null;
|
|
297
|
+
/**
|
|
298
|
+
* A `TemplateResult` that will be used
|
|
299
|
+
* to render the updated internal template.
|
|
300
|
+
* @return Render template
|
|
301
|
+
*/
|
|
302
|
+
protected render(): TemplateResult;
|
|
303
|
+
}
|
|
304
|
+
declare global {
|
|
305
|
+
interface HTMLElementTagNameMap {
|
|
306
|
+
'ef-datetime-field': DatetimeField;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
declare global {
|
|
311
|
+
interface HTMLElementTagNameMap {
|
|
312
|
+
'ef-datetime-field': DatetimeField;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
namespace JSX {
|
|
316
|
+
interface IntrinsicElements {
|
|
317
|
+
'ef-datetime-field': Partial<DatetimeField> | JSXInterface.HTMLAttributes<DatetimeField>;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
export {};
|