@refinitiv-ui/elements 5.11.0 → 5.12.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/package.json +21 -290
- package/lib/accordion/index.d.ts +0 -76
- package/lib/accordion/index.js +0 -136
- package/lib/accordion/themes/halo/dark/index.js +0 -3
- package/lib/accordion/themes/halo/light/index.js +0 -3
- package/lib/accordion/themes/solar/charcoal/index.js +0 -3
- package/lib/accordion/themes/solar/pearl/index.js +0 -3
- package/lib/appstate-bar/index.d.ts +0 -65
- package/lib/appstate-bar/index.js +0 -100
- package/lib/appstate-bar/themes/halo/dark/index.js +0 -3
- package/lib/appstate-bar/themes/halo/light/index.js +0 -3
- package/lib/appstate-bar/themes/solar/charcoal/index.js +0 -3
- package/lib/appstate-bar/themes/solar/pearl/index.js +0 -3
- package/lib/autosuggest/helpers/types.d.ts +0 -54
- package/lib/autosuggest/helpers/types.js +0 -1
- package/lib/autosuggest/helpers/utils.d.ts +0 -39
- package/lib/autosuggest/helpers/utils.js +0 -75
- package/lib/autosuggest/index.d.ts +0 -538
- package/lib/autosuggest/index.js +0 -1255
- package/lib/autosuggest/themes/halo/dark/index.js +0 -5
- package/lib/autosuggest/themes/halo/light/index.js +0 -5
- package/lib/autosuggest/themes/solar/charcoal/index.js +0 -5
- package/lib/autosuggest/themes/solar/pearl/index.js +0 -5
- package/lib/button/index.d.ts +0 -132
- package/lib/button/index.js +0 -223
- package/lib/button/themes/halo/dark/index.js +0 -3
- package/lib/button/themes/halo/light/index.js +0 -3
- package/lib/button/themes/solar/charcoal/index.js +0 -3
- package/lib/button/themes/solar/pearl/index.js +0 -3
- package/lib/button-bar/index.d.ts +0 -76
- package/lib/button-bar/index.js +0 -155
- package/lib/button-bar/themes/halo/dark/index.js +0 -3
- package/lib/button-bar/themes/halo/light/index.js +0 -3
- package/lib/button-bar/themes/solar/charcoal/index.js +0 -3
- package/lib/button-bar/themes/solar/pearl/index.js +0 -3
- package/lib/calendar/constants.d.ts +0 -26
- package/lib/calendar/constants.js +0 -28
- package/lib/calendar/index.d.ts +0 -412
- package/lib/calendar/index.js +0 -1274
- package/lib/calendar/locales.d.ts +0 -1
- package/lib/calendar/locales.js +0 -41
- package/lib/calendar/themes/halo/dark/index.js +0 -3
- package/lib/calendar/themes/halo/light/index.js +0 -3
- package/lib/calendar/themes/solar/charcoal/index.js +0 -3
- package/lib/calendar/themes/solar/pearl/index.js +0 -3
- package/lib/calendar/types.d.ts +0 -32
- package/lib/calendar/types.js +0 -1
- package/lib/calendar/utils.d.ts +0 -42
- package/lib/calendar/utils.js +0 -120
- package/lib/canvas/index.d.ts +0 -101
- package/lib/canvas/index.js +0 -173
- package/lib/canvas/themes/halo/dark/index.js +0 -2
- package/lib/canvas/themes/halo/light/index.js +0 -2
- package/lib/canvas/themes/solar/charcoal/index.js +0 -2
- package/lib/canvas/themes/solar/pearl/index.js +0 -2
- package/lib/card/helpers/types.d.ts +0 -12
- package/lib/card/helpers/types.js +0 -1
- package/lib/card/index.d.ts +0 -142
- package/lib/card/index.js +0 -248
- package/lib/card/themes/halo/dark/index.js +0 -5
- package/lib/card/themes/halo/light/index.js +0 -5
- package/lib/card/themes/solar/charcoal/index.js +0 -5
- package/lib/card/themes/solar/pearl/index.js +0 -5
- package/lib/chart/helpers/index.d.ts +0 -2
- package/lib/chart/helpers/index.js +0 -2
- package/lib/chart/helpers/legend.d.ts +0 -5
- package/lib/chart/helpers/legend.js +0 -78
- package/lib/chart/helpers/merge.d.ts +0 -15
- package/lib/chart/helpers/merge.js +0 -28
- package/lib/chart/helpers/types.d.ts +0 -69
- package/lib/chart/helpers/types.js +0 -1
- package/lib/chart/index.d.ts +0 -187
- package/lib/chart/index.js +0 -491
- package/lib/chart/plugins/doughnut-center-label.d.ts +0 -3
- package/lib/chart/plugins/doughnut-center-label.js +0 -196
- package/lib/chart/themes/halo/dark/index.js +0 -4
- package/lib/chart/themes/halo/light/index.js +0 -4
- package/lib/chart/themes/solar/charcoal/index.js +0 -4
- package/lib/chart/themes/solar/pearl/index.js +0 -4
- package/lib/checkbox/index.d.ts +0 -97
- package/lib/checkbox/index.js +0 -194
- package/lib/checkbox/themes/halo/dark/index.js +0 -4
- package/lib/checkbox/themes/halo/light/index.js +0 -4
- package/lib/checkbox/themes/solar/charcoal/index.js +0 -4
- package/lib/checkbox/themes/solar/pearl/index.js +0 -4
- package/lib/clock/index.d.ts +0 -321
- package/lib/clock/index.js +0 -583
- package/lib/clock/themes/halo/dark/index.js +0 -2
- package/lib/clock/themes/halo/light/index.js +0 -2
- package/lib/clock/themes/solar/charcoal/index.js +0 -2
- package/lib/clock/themes/solar/pearl/index.js +0 -2
- package/lib/clock/utils/TickManager.d.ts +0 -14
- package/lib/clock/utils/TickManager.js +0 -66
- package/lib/clock/utils/timestamps.d.ts +0 -6
- package/lib/clock/utils/timestamps.js +0 -6
- package/lib/collapse/index.d.ts +0 -119
- package/lib/collapse/index.js +0 -197
- package/lib/collapse/themes/halo/dark/index.js +0 -5
- package/lib/collapse/themes/halo/light/index.js +0 -5
- package/lib/collapse/themes/solar/charcoal/index.js +0 -5
- package/lib/collapse/themes/solar/pearl/index.js +0 -5
- package/lib/color-dialog/elements/color-palettes.d.ts +0 -52
- package/lib/color-dialog/elements/color-palettes.js +0 -101
- package/lib/color-dialog/elements/grayscale-palettes.d.ts +0 -67
- package/lib/color-dialog/elements/grayscale-palettes.js +0 -161
- package/lib/color-dialog/elements/palettes.d.ts +0 -65
- package/lib/color-dialog/elements/palettes.js +0 -132
- package/lib/color-dialog/helpers/color-helpers.d.ts +0 -16
- package/lib/color-dialog/helpers/color-helpers.js +0 -161
- package/lib/color-dialog/helpers/value-model.d.ts +0 -75
- package/lib/color-dialog/helpers/value-model.js +0 -141
- package/lib/color-dialog/index.d.ts +0 -232
- package/lib/color-dialog/index.js +0 -459
- package/lib/color-dialog/themes/halo/dark/index.js +0 -7
- package/lib/color-dialog/themes/halo/light/index.js +0 -7
- package/lib/color-dialog/themes/solar/charcoal/index.js +0 -7
- package/lib/color-dialog/themes/solar/pearl/index.js +0 -7
- package/lib/combo-box/helpers/filter.d.ts +0 -10
- package/lib/combo-box/helpers/filter.js +0 -29
- package/lib/combo-box/helpers/keyboard-event.d.ts +0 -17
- package/lib/combo-box/helpers/keyboard-event.js +0 -19
- package/lib/combo-box/helpers/renderer.d.ts +0 -8
- package/lib/combo-box/helpers/renderer.js +0 -24
- package/lib/combo-box/helpers/types.d.ts +0 -11
- package/lib/combo-box/helpers/types.js +0 -1
- package/lib/combo-box/index.d.ts +0 -551
- package/lib/combo-box/index.js +0 -1183
- package/lib/combo-box/themes/halo/dark/index.js +0 -7
- package/lib/combo-box/themes/halo/light/index.js +0 -7
- package/lib/combo-box/themes/solar/charcoal/index.js +0 -7
- package/lib/combo-box/themes/solar/pearl/index.js +0 -7
- package/lib/counter/index.d.ts +0 -91
- package/lib/counter/index.js +0 -154
- package/lib/counter/themes/halo/dark/index.js +0 -3
- package/lib/counter/themes/halo/light/index.js +0 -3
- package/lib/counter/themes/solar/charcoal/index.js +0 -3
- package/lib/counter/themes/solar/pearl/index.js +0 -3
- package/lib/counter/utils.d.ts +0 -13
- package/lib/counter/utils.js +0 -52
- package/lib/datetime-picker/index.d.ts +0 -509
- package/lib/datetime-picker/index.js +0 -1175
- package/lib/datetime-picker/locales.d.ts +0 -8
- package/lib/datetime-picker/locales.js +0 -57
- package/lib/datetime-picker/themes/halo/dark/index.js +0 -7
- package/lib/datetime-picker/themes/halo/light/index.js +0 -7
- package/lib/datetime-picker/themes/solar/charcoal/index.js +0 -7
- package/lib/datetime-picker/themes/solar/pearl/index.js +0 -7
- package/lib/datetime-picker/types.d.ts +0 -3
- package/lib/datetime-picker/types.js +0 -1
- package/lib/datetime-picker/utils.d.ts +0 -55
- package/lib/datetime-picker/utils.js +0 -92
- package/lib/dialog/draggable-element.d.ts +0 -14
- package/lib/dialog/draggable-element.js +0 -221
- package/lib/dialog/index.d.ts +0 -196
- package/lib/dialog/index.js +0 -328
- package/lib/dialog/themes/halo/dark/index.js +0 -7
- package/lib/dialog/themes/halo/light/index.js +0 -7
- package/lib/dialog/themes/solar/charcoal/index.js +0 -7
- package/lib/dialog/themes/solar/pearl/index.js +0 -7
- package/lib/email-field/index.d.ts +0 -80
- package/lib/email-field/index.js +0 -86
- package/lib/email-field/themes/halo/dark/index.js +0 -3
- package/lib/email-field/themes/halo/light/index.js +0 -3
- package/lib/email-field/themes/solar/charcoal/index.js +0 -3
- package/lib/email-field/themes/solar/pearl/index.js +0 -3
- package/lib/events.d.ts +0 -121
- package/lib/events.js +0 -1
- package/lib/flag/index.d.ts +0 -96
- package/lib/flag/index.js +0 -168
- package/lib/flag/themes/halo/dark/index.js +0 -2
- package/lib/flag/themes/halo/light/index.js +0 -2
- package/lib/flag/themes/solar/charcoal/index.js +0 -2
- package/lib/flag/themes/solar/pearl/index.js +0 -2
- package/lib/flag/utils/FlagLoader.d.ts +0 -47
- package/lib/flag/utils/FlagLoader.js +0 -86
- package/lib/header/index.d.ts +0 -46
- package/lib/header/index.js +0 -73
- package/lib/header/themes/halo/dark/index.js +0 -2
- package/lib/header/themes/halo/light/index.js +0 -2
- package/lib/header/themes/solar/charcoal/index.js +0 -2
- package/lib/header/themes/solar/pearl/index.js +0 -2
- package/lib/heatmap/helpers/color.d.ts +0 -30
- package/lib/heatmap/helpers/color.js +0 -68
- package/lib/heatmap/helpers/text.d.ts +0 -26
- package/lib/heatmap/helpers/text.js +0 -91
- package/lib/heatmap/helpers/track.d.ts +0 -102
- package/lib/heatmap/helpers/track.js +0 -160
- package/lib/heatmap/helpers/types.d.ts +0 -40
- package/lib/heatmap/helpers/types.js +0 -1
- package/lib/heatmap/index.d.ts +0 -453
- package/lib/heatmap/index.js +0 -1103
- package/lib/heatmap/themes/halo/dark/index.js +0 -4
- package/lib/heatmap/themes/halo/light/index.js +0 -4
- package/lib/heatmap/themes/solar/charcoal/index.js +0 -4
- package/lib/heatmap/themes/solar/pearl/index.js +0 -4
- package/lib/icon/index.d.ts +0 -90
- package/lib/icon/index.js +0 -171
- package/lib/icon/themes/halo/dark/index.js +0 -2
- package/lib/icon/themes/halo/light/index.js +0 -2
- package/lib/icon/themes/solar/charcoal/index.js +0 -2
- package/lib/icon/themes/solar/pearl/index.js +0 -2
- package/lib/icon/utils/IconLoader.d.ts +0 -52
- package/lib/icon/utils/IconLoader.js +0 -93
- package/lib/index.d.ts +0 -3
- package/lib/index.js +0 -3
- package/lib/interactive-chart/helpers/merge.d.ts +0 -15
- package/lib/interactive-chart/helpers/merge.js +0 -28
- package/lib/interactive-chart/helpers/types.d.ts +0 -45
- package/lib/interactive-chart/helpers/types.js +0 -6
- package/lib/interactive-chart/index.d.ts +0 -383
- package/lib/interactive-chart/index.js +0 -1093
- package/lib/interactive-chart/themes/halo/dark/index.js +0 -3
- package/lib/interactive-chart/themes/halo/light/index.js +0 -3
- package/lib/interactive-chart/themes/solar/charcoal/index.js +0 -3
- package/lib/interactive-chart/themes/solar/pearl/index.js +0 -3
- package/lib/item/helpers/types.d.ts +0 -57
- package/lib/item/helpers/types.js +0 -1
- package/lib/item/index.d.ts +0 -159
- package/lib/item/index.js +0 -272
- package/lib/item/themes/halo/dark/index.js +0 -4
- package/lib/item/themes/halo/light/index.js +0 -4
- package/lib/item/themes/solar/charcoal/index.js +0 -4
- package/lib/item/themes/solar/pearl/index.js +0 -4
- package/lib/label/index.d.ts +0 -102
- package/lib/label/index.js +0 -245
- package/lib/label/themes/halo/dark/index.js +0 -3
- package/lib/label/themes/halo/light/index.js +0 -3
- package/lib/label/themes/solar/charcoal/index.js +0 -3
- package/lib/label/themes/solar/pearl/index.js +0 -3
- package/lib/layout/index.d.ts +0 -107
- package/lib/layout/index.js +0 -212
- package/lib/layout/themes/halo/dark/index.js +0 -2
- package/lib/layout/themes/halo/light/index.js +0 -2
- package/lib/layout/themes/solar/charcoal/index.js +0 -2
- package/lib/layout/themes/solar/pearl/index.js +0 -2
- package/lib/led-gauge/index.d.ts +0 -144
- package/lib/led-gauge/index.js +0 -438
- package/lib/led-gauge/themes/halo/dark/index.js +0 -3
- package/lib/led-gauge/themes/halo/light/index.js +0 -3
- package/lib/led-gauge/themes/solar/charcoal/index.js +0 -3
- package/lib/led-gauge/themes/solar/pearl/index.js +0 -3
- package/lib/list/extensible-function.d.ts +0 -8
- package/lib/list/extensible-function.js +0 -13
- package/lib/list/helpers/list-renderer.d.ts +0 -9
- package/lib/list/helpers/list-renderer.js +0 -37
- package/lib/list/helpers/types.d.ts +0 -3
- package/lib/list/helpers/types.js +0 -1
- package/lib/list/index.d.ts +0 -313
- package/lib/list/index.js +0 -640
- package/lib/list/renderer.d.ts +0 -36
- package/lib/list/renderer.js +0 -9
- package/lib/list/themes/halo/dark/index.js +0 -3
- package/lib/list/themes/halo/light/index.js +0 -3
- package/lib/list/themes/solar/charcoal/index.js +0 -3
- package/lib/list/themes/solar/pearl/index.js +0 -3
- package/lib/loader/index.d.ts +0 -41
- package/lib/loader/index.js +0 -61
- package/lib/loader/themes/halo/dark/index.js +0 -2
- package/lib/loader/themes/halo/light/index.js +0 -2
- package/lib/loader/themes/solar/charcoal/index.js +0 -2
- package/lib/loader/themes/solar/pearl/index.js +0 -2
- package/lib/multi-input/helpers/types.d.ts +0 -11
- package/lib/multi-input/helpers/types.js +0 -1
- package/lib/multi-input/index.d.ts +0 -301
- package/lib/multi-input/index.js +0 -594
- package/lib/multi-input/themes/halo/dark/index.js +0 -4
- package/lib/multi-input/themes/halo/light/index.js +0 -4
- package/lib/multi-input/themes/solar/charcoal/index.js +0 -4
- package/lib/multi-input/themes/solar/pearl/index.js +0 -4
- package/lib/notification/elements/notification-tray.d.ts +0 -97
- package/lib/notification/elements/notification-tray.js +0 -167
- package/lib/notification/elements/notification.d.ts +0 -90
- package/lib/notification/elements/notification.js +0 -154
- package/lib/notification/helpers/status.d.ts +0 -30
- package/lib/notification/helpers/status.js +0 -130
- package/lib/notification/helpers/types.d.ts +0 -10
- package/lib/notification/helpers/types.js +0 -1
- package/lib/notification/index.d.ts +0 -2
- package/lib/notification/index.js +0 -2
- package/lib/notification/themes/halo/dark/index.js +0 -5
- package/lib/notification/themes/halo/light/index.js +0 -5
- package/lib/notification/themes/solar/charcoal/index.js +0 -5
- package/lib/notification/themes/solar/pearl/index.js +0 -5
- package/lib/number-field/index.d.ts +0 -339
- package/lib/number-field/index.js +0 -740
- package/lib/number-field/themes/halo/dark/index.js +0 -3
- package/lib/number-field/themes/halo/light/index.js +0 -3
- package/lib/number-field/themes/solar/charcoal/index.js +0 -3
- package/lib/number-field/themes/solar/pearl/index.js +0 -3
- package/lib/overlay/elements/overlay-backdrop.d.ts +0 -46
- package/lib/overlay/elements/overlay-backdrop.js +0 -64
- package/lib/overlay/elements/overlay-viewport.d.ts +0 -40
- package/lib/overlay/elements/overlay-viewport.js +0 -52
- package/lib/overlay/elements/overlay.d.ts +0 -408
- package/lib/overlay/elements/overlay.js +0 -1426
- package/lib/overlay/helpers/functions.d.ts +0 -13
- package/lib/overlay/helpers/functions.js +0 -16
- package/lib/overlay/helpers/types.d.ts +0 -97
- package/lib/overlay/helpers/types.js +0 -16
- package/lib/overlay/index.d.ts +0 -2
- package/lib/overlay/index.js +0 -1
- package/lib/overlay/managers/backdrop-manager.d.ts +0 -45
- package/lib/overlay/managers/backdrop-manager.js +0 -96
- package/lib/overlay/managers/close-manager.d.ts +0 -54
- package/lib/overlay/managers/close-manager.js +0 -138
- package/lib/overlay/managers/focus-manager.d.ts +0 -71
- package/lib/overlay/managers/focus-manager.js +0 -228
- package/lib/overlay/managers/interaction-lock-manager.d.ts +0 -138
- package/lib/overlay/managers/interaction-lock-manager.js +0 -375
- package/lib/overlay/managers/viewport-manager.d.ts +0 -93
- package/lib/overlay/managers/viewport-manager.js +0 -211
- package/lib/overlay/managers/zindex-manager.d.ts +0 -80
- package/lib/overlay/managers/zindex-manager.js +0 -195
- package/lib/overlay/themes/halo/dark/index.js +0 -4
- package/lib/overlay/themes/halo/light/index.js +0 -4
- package/lib/overlay/themes/solar/charcoal/index.js +0 -4
- package/lib/overlay/themes/solar/pearl/index.js +0 -4
- package/lib/overlay-menu/helpers/types.d.ts +0 -8
- package/lib/overlay-menu/helpers/types.js +0 -1
- package/lib/overlay-menu/index.d.ts +0 -387
- package/lib/overlay-menu/index.js +0 -935
- package/lib/overlay-menu/managers/menu-manager.d.ts +0 -98
- package/lib/overlay-menu/managers/menu-manager.js +0 -240
- package/lib/overlay-menu/themes/halo/dark/index.js +0 -5
- package/lib/overlay-menu/themes/halo/light/index.js +0 -5
- package/lib/overlay-menu/themes/solar/charcoal/index.js +0 -5
- package/lib/overlay-menu/themes/solar/pearl/index.js +0 -5
- package/lib/pagination/index.d.ts +0 -275
- package/lib/pagination/index.js +0 -552
- package/lib/pagination/themes/halo/dark/index.js +0 -6
- package/lib/pagination/themes/halo/light/index.js +0 -6
- package/lib/pagination/themes/solar/charcoal/index.js +0 -6
- package/lib/pagination/themes/solar/pearl/index.js +0 -6
- package/lib/panel/index.d.ts +0 -48
- package/lib/panel/index.js +0 -74
- package/lib/panel/themes/halo/dark/index.js +0 -2
- package/lib/panel/themes/halo/light/index.js +0 -2
- package/lib/panel/themes/solar/charcoal/index.js +0 -2
- package/lib/panel/themes/solar/pearl/index.js +0 -2
- package/lib/password-field/index.d.ts +0 -89
- package/lib/password-field/index.js +0 -112
- package/lib/password-field/themes/halo/dark/index.js +0 -3
- package/lib/password-field/themes/halo/light/index.js +0 -3
- package/lib/password-field/themes/solar/charcoal/index.js +0 -3
- package/lib/password-field/themes/solar/pearl/index.js +0 -3
- package/lib/pill/index.d.ts +0 -97
- package/lib/pill/index.js +0 -160
- package/lib/pill/themes/halo/dark/index.js +0 -3
- package/lib/pill/themes/halo/light/index.js +0 -3
- package/lib/pill/themes/solar/charcoal/index.js +0 -3
- package/lib/pill/themes/solar/pearl/index.js +0 -3
- package/lib/progress-bar/index.d.ts +0 -82
- package/lib/progress-bar/index.js +0 -157
- package/lib/progress-bar/themes/halo/dark/index.js +0 -2
- package/lib/progress-bar/themes/halo/light/index.js +0 -2
- package/lib/progress-bar/themes/solar/charcoal/index.js +0 -2
- package/lib/progress-bar/themes/solar/pearl/index.js +0 -2
- package/lib/radio-button/index.d.ts +0 -123
- package/lib/radio-button/index.js +0 -261
- package/lib/radio-button/radio-button-registry.d.ts +0 -22
- package/lib/radio-button/radio-button-registry.js +0 -93
- package/lib/radio-button/themes/halo/dark/index.js +0 -3
- package/lib/radio-button/themes/halo/light/index.js +0 -3
- package/lib/radio-button/themes/solar/charcoal/index.js +0 -3
- package/lib/radio-button/themes/solar/pearl/index.js +0 -3
- package/lib/rating/index.d.ts +0 -91
- package/lib/rating/index.js +0 -157
- package/lib/rating/themes/halo/dark/index.js +0 -2
- package/lib/rating/themes/halo/light/index.js +0 -2
- package/lib/rating/themes/solar/charcoal/index.js +0 -2
- package/lib/rating/themes/solar/pearl/index.js +0 -2
- package/lib/search-field/index.d.ts +0 -77
- package/lib/search-field/index.js +0 -84
- package/lib/search-field/themes/halo/dark/index.js +0 -3
- package/lib/search-field/themes/halo/light/index.js +0 -3
- package/lib/search-field/themes/solar/charcoal/index.js +0 -3
- package/lib/search-field/themes/solar/pearl/index.js +0 -3
- package/lib/select/helpers/types.d.ts +0 -3
- package/lib/select/helpers/types.js +0 -1
- package/lib/select/index.d.ts +0 -396
- package/lib/select/index.js +0 -981
- package/lib/select/themes/halo/dark/index.js +0 -5
- package/lib/select/themes/halo/light/index.js +0 -5
- package/lib/select/themes/solar/charcoal/index.js +0 -5
- package/lib/select/themes/solar/pearl/index.js +0 -5
- package/lib/sidebar-layout/index.d.ts +0 -70
- package/lib/sidebar-layout/index.js +0 -134
- package/lib/sidebar-layout/themes/halo/dark/index.js +0 -3
- package/lib/sidebar-layout/themes/halo/light/index.js +0 -3
- package/lib/sidebar-layout/themes/solar/charcoal/index.js +0 -3
- package/lib/sidebar-layout/themes/solar/pearl/index.js +0 -3
- package/lib/slider/index.d.ts +0 -409
- package/lib/slider/index.js +0 -1187
- package/lib/slider/themes/halo/dark/index.js +0 -3
- package/lib/slider/themes/halo/light/index.js +0 -3
- package/lib/slider/themes/solar/charcoal/index.js +0 -3
- package/lib/slider/themes/solar/pearl/index.js +0 -3
- package/lib/sparkline/index.d.ts +0 -109
- package/lib/sparkline/index.js +0 -188
- package/lib/sparkline/themes/halo/dark/index.js +0 -2
- package/lib/sparkline/themes/halo/light/index.js +0 -2
- package/lib/sparkline/themes/solar/charcoal/index.js +0 -2
- package/lib/sparkline/themes/solar/pearl/index.js +0 -2
- package/lib/swing-gauge/const.d.ts +0 -22
- package/lib/swing-gauge/const.js +0 -26
- package/lib/swing-gauge/helpers.d.ts +0 -8
- package/lib/swing-gauge/helpers.js +0 -105
- package/lib/swing-gauge/index.d.ts +0 -296
- package/lib/swing-gauge/index.js +0 -764
- package/lib/swing-gauge/themes/halo/dark/index.js +0 -3
- package/lib/swing-gauge/themes/halo/light/index.js +0 -3
- package/lib/swing-gauge/themes/solar/charcoal/index.js +0 -3
- package/lib/swing-gauge/themes/solar/pearl/index.js +0 -3
- package/lib/swing-gauge/types.d.ts +0 -34
- package/lib/swing-gauge/types.js +0 -1
- package/lib/tab/index.d.ts +0 -118
- package/lib/tab/index.js +0 -208
- package/lib/tab/themes/halo/dark/index.js +0 -4
- package/lib/tab/themes/halo/light/index.js +0 -4
- package/lib/tab/themes/solar/charcoal/index.js +0 -4
- package/lib/tab/themes/solar/pearl/index.js +0 -4
- package/lib/tab-bar/helpers/animate.d.ts +0 -16
- package/lib/tab-bar/helpers/animate.js +0 -53
- package/lib/tab-bar/index.d.ts +0 -108
- package/lib/tab-bar/index.js +0 -218
- package/lib/tab-bar/themes/halo/dark/index.js +0 -4
- package/lib/tab-bar/themes/halo/light/index.js +0 -4
- package/lib/tab-bar/themes/solar/charcoal/index.js +0 -4
- package/lib/tab-bar/themes/solar/pearl/index.js +0 -4
- package/lib/text-field/index.d.ts +0 -151
- package/lib/text-field/index.js +0 -260
- package/lib/text-field/themes/halo/dark/index.js +0 -3
- package/lib/text-field/themes/halo/light/index.js +0 -3
- package/lib/text-field/themes/solar/charcoal/index.js +0 -3
- package/lib/text-field/themes/solar/pearl/index.js +0 -3
- package/lib/time-picker/index.d.ts +0 -412
- package/lib/time-picker/index.js +0 -898
- package/lib/time-picker/themes/halo/dark/index.js +0 -4
- package/lib/time-picker/themes/halo/light/index.js +0 -4
- package/lib/time-picker/themes/solar/charcoal/index.js +0 -4
- package/lib/time-picker/themes/solar/pearl/index.js +0 -4
- package/lib/toggle/index.d.ts +0 -87
- package/lib/toggle/index.js +0 -153
- package/lib/toggle/themes/halo/dark/index.js +0 -2
- package/lib/toggle/themes/halo/light/index.js +0 -2
- package/lib/toggle/themes/solar/charcoal/index.js +0 -2
- package/lib/toggle/themes/solar/pearl/index.js +0 -2
- package/lib/tooltip/elements/title-tooltip.d.ts +0 -1
- package/lib/tooltip/elements/title-tooltip.js +0 -18
- package/lib/tooltip/elements/tooltip-element.d.ts +0 -21
- package/lib/tooltip/elements/tooltip-element.js +0 -54
- package/lib/tooltip/helpers/overflow-tooltip.d.ts +0 -9
- package/lib/tooltip/helpers/overflow-tooltip.js +0 -19
- package/lib/tooltip/helpers/renderer.d.ts +0 -8
- package/lib/tooltip/helpers/renderer.js +0 -11
- package/lib/tooltip/helpers/types.d.ts +0 -23
- package/lib/tooltip/helpers/types.js +0 -1
- package/lib/tooltip/index.d.ts +0 -232
- package/lib/tooltip/index.js +0 -477
- package/lib/tooltip/managers/tooltip-manager.d.ts +0 -15
- package/lib/tooltip/managers/tooltip-manager.js +0 -140
- package/lib/tooltip/themes/halo/dark/index.js +0 -3
- package/lib/tooltip/themes/halo/light/index.js +0 -3
- package/lib/tooltip/themes/solar/charcoal/index.js +0 -3
- package/lib/tooltip/themes/solar/pearl/index.js +0 -3
- package/lib/tornado-chart/elements/tornado-chart.d.ts +0 -78
- package/lib/tornado-chart/elements/tornado-chart.js +0 -122
- package/lib/tornado-chart/elements/tornado-item.d.ts +0 -110
- package/lib/tornado-chart/elements/tornado-item.js +0 -207
- package/lib/tornado-chart/index.d.ts +0 -2
- package/lib/tornado-chart/index.js +0 -2
- package/lib/tornado-chart/themes/halo/dark/index.js +0 -6
- package/lib/tornado-chart/themes/halo/light/index.js +0 -6
- package/lib/tornado-chart/themes/solar/charcoal/index.js +0 -6
- package/lib/tornado-chart/themes/solar/pearl/index.js +0 -6
- package/lib/tree/elements/tree-item.d.ts +0 -129
- package/lib/tree/elements/tree-item.js +0 -238
- package/lib/tree/elements/tree.d.ts +0 -203
- package/lib/tree/elements/tree.js +0 -414
- package/lib/tree/helpers/filter.d.ts +0 -8
- package/lib/tree/helpers/filter.js +0 -33
- package/lib/tree/helpers/renderer.d.ts +0 -5
- package/lib/tree/helpers/renderer.js +0 -33
- package/lib/tree/helpers/types.d.ts +0 -25
- package/lib/tree/helpers/types.js +0 -1
- package/lib/tree/index.d.ts +0 -4
- package/lib/tree/index.js +0 -3
- package/lib/tree/managers/tree-manager.d.ts +0 -248
- package/lib/tree/managers/tree-manager.js +0 -395
- package/lib/tree/themes/halo/dark/index.js +0 -7
- package/lib/tree/themes/halo/light/index.js +0 -7
- package/lib/tree/themes/solar/charcoal/index.js +0 -7
- package/lib/tree/themes/solar/pearl/index.js +0 -7
- package/lib/tree-select/helpers/types.d.ts +0 -4
- package/lib/tree-select/helpers/types.js +0 -1
- package/lib/tree-select/index.d.ts +0 -404
- package/lib/tree-select/index.js +0 -891
- package/lib/tree-select/themes/halo/dark/index.js +0 -11
- package/lib/tree-select/themes/halo/light/index.js +0 -11
- package/lib/tree-select/themes/solar/charcoal/index.js +0 -11
- package/lib/tree-select/themes/solar/pearl/index.js +0 -11
- package/lib/version.d.ts +0 -1
- package/lib/version.js +0 -1
package/lib/time-picker/index.js
DELETED
|
@@ -1,898 +0,0 @@
|
|
|
1
|
-
var TimePicker_1;
|
|
2
|
-
import { __decorate } from "tslib";
|
|
3
|
-
import { ControlElement, html, css } from '@refinitiv-ui/core';
|
|
4
|
-
import { ifDefined } from '@refinitiv-ui/core/lib/directives/if-defined.js';
|
|
5
|
-
import { guard } from '@refinitiv-ui/core/lib/directives/guard.js';
|
|
6
|
-
import { customElement } from '@refinitiv-ui/core/lib/decorators/custom-element.js';
|
|
7
|
-
import { property } from '@refinitiv-ui/core/lib/decorators/property.js';
|
|
8
|
-
import { state } from '@refinitiv-ui/core/lib/decorators/state.js';
|
|
9
|
-
import { query } from '@refinitiv-ui/core/lib/decorators/query.js';
|
|
10
|
-
import { VERSION } from '../version.js';
|
|
11
|
-
import { isValidTime, toTimeSegment, TimeFormat, getFormat, format, isAM, isPM, MILLISECONDS_IN_SECOND, MILLISECONDS_IN_MINUTE, MILLISECONDS_IN_HOUR, addOffset, padNumber, parse } from '@refinitiv-ui/utils/lib/date.js';
|
|
12
|
-
import { isIE } from '@refinitiv-ui/utils/lib/browser.js';
|
|
13
|
-
import '../number-field/index.js';
|
|
14
|
-
import { translate } from '@refinitiv-ui/translate';
|
|
15
|
-
import '@refinitiv-ui/phrasebook/lib/locale/en/time-picker.js';
|
|
16
|
-
var Segment;
|
|
17
|
-
(function (Segment) {
|
|
18
|
-
Segment["HOURS"] = "hours";
|
|
19
|
-
Segment["MINUTES"] = "minutes";
|
|
20
|
-
Segment["SECONDS"] = "seconds";
|
|
21
|
-
})(Segment || (Segment = {}));
|
|
22
|
-
const MIN_UNIT = 0;
|
|
23
|
-
const MAX_HOURS = 23;
|
|
24
|
-
const MAX_MINUTES = 59;
|
|
25
|
-
const MAX_SECONDS = 59;
|
|
26
|
-
const HOURS_IN_DAY = 24;
|
|
27
|
-
const HOURS_OF_NOON = 12;
|
|
28
|
-
const Placeholder = {
|
|
29
|
-
HOURS: '--',
|
|
30
|
-
MINUTES: '--',
|
|
31
|
-
SECONDS: '--'
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* Control the time input
|
|
35
|
-
* @event value-changed - Dispatched when value changes
|
|
36
|
-
*
|
|
37
|
-
* @attr {boolean} readonly - Set readonly state
|
|
38
|
-
* @prop {boolean} [readonly=false] - Set readonly state
|
|
39
|
-
*
|
|
40
|
-
* @attr {boolean} disabled - Set disabled state
|
|
41
|
-
* @prop {boolean} [disabled=false] - Set disabled state
|
|
42
|
-
*/
|
|
43
|
-
let TimePicker = TimePicker_1 = class TimePicker extends ControlElement {
|
|
44
|
-
constructor() {
|
|
45
|
-
super(...arguments);
|
|
46
|
-
this.defaultRole = 'group';
|
|
47
|
-
/**
|
|
48
|
-
* If time-picker is in mobile mode
|
|
49
|
-
*/
|
|
50
|
-
this.isMobile = false;
|
|
51
|
-
/**
|
|
52
|
-
* Internal hours value, used only in value getters and setters
|
|
53
|
-
*/
|
|
54
|
-
this._hours = null;
|
|
55
|
-
/**
|
|
56
|
-
* Internal minutes value, used only in value getters and setters
|
|
57
|
-
*/
|
|
58
|
-
this._minutes = null;
|
|
59
|
-
/**
|
|
60
|
-
* Internal seconds value, used only in value getters and setters
|
|
61
|
-
*/
|
|
62
|
-
this._seconds = null;
|
|
63
|
-
/**
|
|
64
|
-
* If external value is set with seconds, this flag is true.
|
|
65
|
-
* The flag is not relevant when withSecond is forced to be true
|
|
66
|
-
*/
|
|
67
|
-
this.valueWithSeconds = false;
|
|
68
|
-
/**
|
|
69
|
-
* Toggles 12hr time display
|
|
70
|
-
*/
|
|
71
|
-
this.amPm = false;
|
|
72
|
-
/**
|
|
73
|
-
* Flag to show seconds time segment in display.
|
|
74
|
-
* Seconds are automatically shown when `hh:mm:ss` time format is provided as a value.
|
|
75
|
-
*/
|
|
76
|
-
this.showSeconds = false;
|
|
77
|
-
this._selectedSegment = null;
|
|
78
|
-
/**
|
|
79
|
-
* Connected to role. If false, the values are not announced in the screen reader
|
|
80
|
-
*/
|
|
81
|
-
this.announceValues = true;
|
|
82
|
-
/**
|
|
83
|
-
* Handles any keydown events
|
|
84
|
-
* Used for control keys
|
|
85
|
-
* @param event Event Object
|
|
86
|
-
* @returns {void}
|
|
87
|
-
*/
|
|
88
|
-
this.onKeydown = (event) => {
|
|
89
|
-
this.manageControlKeys(event);
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Element version number
|
|
94
|
-
* @returns version number
|
|
95
|
-
*/
|
|
96
|
-
static get version() {
|
|
97
|
-
return VERSION;
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Hours time segment in 24hr format
|
|
101
|
-
* @param hours hours value
|
|
102
|
-
* @default null
|
|
103
|
-
* @returns {void}
|
|
104
|
-
*/
|
|
105
|
-
set hours(hours) {
|
|
106
|
-
const oldHours = this.hours;
|
|
107
|
-
if ((hours !== null && isNaN(hours)) || oldHours === hours) {
|
|
108
|
-
return;
|
|
109
|
-
}
|
|
110
|
-
this._hours = TimePicker_1.validUnit(hours, MIN_UNIT, MAX_HOURS, oldHours);
|
|
111
|
-
if (this._hours !== oldHours) {
|
|
112
|
-
this.requestUpdate('hours', oldHours);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Get hours value
|
|
117
|
-
* @returns hours
|
|
118
|
-
*/
|
|
119
|
-
get hours() {
|
|
120
|
-
return this._hours;
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Minutes time segment
|
|
124
|
-
* @param minutes minutes value
|
|
125
|
-
* @returns {void}
|
|
126
|
-
*/
|
|
127
|
-
set minutes(minutes) {
|
|
128
|
-
const oldMinutes = this.minutes;
|
|
129
|
-
if ((minutes !== null && isNaN(minutes)) || oldMinutes === minutes) {
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
this._minutes = TimePicker_1.validUnit(minutes, MIN_UNIT, MAX_MINUTES, oldMinutes);
|
|
133
|
-
if (this._minutes !== oldMinutes) {
|
|
134
|
-
this.requestUpdate('minutes', oldMinutes);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* Get minutes value
|
|
139
|
-
* @returns minutes
|
|
140
|
-
*/
|
|
141
|
-
get minutes() {
|
|
142
|
-
return this._minutes;
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* Seconds time segment
|
|
146
|
-
* @param seconds seconds value
|
|
147
|
-
* @returns {void}
|
|
148
|
-
*/
|
|
149
|
-
set seconds(seconds) {
|
|
150
|
-
const oldSeconds = this.seconds;
|
|
151
|
-
if ((seconds !== null && isNaN(seconds)) || oldSeconds === seconds) {
|
|
152
|
-
return;
|
|
153
|
-
}
|
|
154
|
-
this._seconds = TimePicker_1.validUnit(seconds, MIN_UNIT, MAX_SECONDS, oldSeconds);
|
|
155
|
-
if (this._seconds !== oldSeconds) {
|
|
156
|
-
this.requestUpdate('seconds', oldSeconds);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* Get seconds value
|
|
161
|
-
* @returns seconds
|
|
162
|
-
*/
|
|
163
|
-
get seconds() {
|
|
164
|
-
return this._seconds;
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* Value of the element
|
|
168
|
-
* @param value Element value
|
|
169
|
-
*/
|
|
170
|
-
set value(value) {
|
|
171
|
-
const oldValue = this.value;
|
|
172
|
-
value = this.castValue(value);
|
|
173
|
-
if (!this.isValidValue(value)) {
|
|
174
|
-
this.warnInvalidValue(value);
|
|
175
|
-
// it does not make sense to clear value here, as the value is always defined
|
|
176
|
-
return;
|
|
177
|
-
}
|
|
178
|
-
/* special case to reset hours, minutes and seconds */
|
|
179
|
-
if (value === '' && (this.hours || this.minutes || this.seconds)) {
|
|
180
|
-
this.hours = null;
|
|
181
|
-
this.minutes = null;
|
|
182
|
-
this.seconds = null;
|
|
183
|
-
return;
|
|
184
|
-
}
|
|
185
|
-
if (oldValue !== value) { /** never store actual value, instead operate with hours/minutes/seconds */
|
|
186
|
-
const info = toTimeSegment(value);
|
|
187
|
-
const format = getFormat(value);
|
|
188
|
-
this.valueWithSeconds = format === TimeFormat.HHmmss || format === TimeFormat.HHmmssSSS;
|
|
189
|
-
this.hours = info.hours;
|
|
190
|
-
this.minutes = info.minutes;
|
|
191
|
-
this.seconds = info.seconds;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
get value() {
|
|
195
|
-
if (this.hours === null || this.minutes === null || (this.isShowSeconds && this.seconds === null)) {
|
|
196
|
-
return '';
|
|
197
|
-
}
|
|
198
|
-
return this.currentTimeString;
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* State to select text in the segment
|
|
202
|
-
* Used to asynchronously select text after render cycle is complete
|
|
203
|
-
* @param segment Selected segment or null
|
|
204
|
-
*/
|
|
205
|
-
set selectedSegment(segment) {
|
|
206
|
-
const oldSelectedSegment = this._selectedSegment;
|
|
207
|
-
this._selectedSegment = segment;
|
|
208
|
-
this.requestUpdate('selectedSegment', oldSelectedSegment);
|
|
209
|
-
}
|
|
210
|
-
get selectedSegment() {
|
|
211
|
-
return this._selectedSegment;
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* Return the current time string, based on the current hours, minutes and seconds.
|
|
215
|
-
* Used internally to set the value string after updates.
|
|
216
|
-
*/
|
|
217
|
-
get currentTimeString() {
|
|
218
|
-
return format({
|
|
219
|
-
hours: this.hours || 0,
|
|
220
|
-
minutes: this.minutes || 0,
|
|
221
|
-
seconds: this.seconds || 0,
|
|
222
|
-
milliseconds: 0
|
|
223
|
-
}, this.isShowSeconds ? TimeFormat.HHmmss : TimeFormat.HHmm);
|
|
224
|
-
}
|
|
225
|
-
/**
|
|
226
|
-
* Seconds are automatically shown when `hh:mm:ss` time format is provided as a value.
|
|
227
|
-
*/
|
|
228
|
-
get isShowSeconds() {
|
|
229
|
-
return this.showSeconds || this.valueWithSeconds;
|
|
230
|
-
}
|
|
231
|
-
/**
|
|
232
|
-
* Get hours taking into account AM/PM placeholder
|
|
233
|
-
*/
|
|
234
|
-
get periodHours() {
|
|
235
|
-
const _hours = this.hours;
|
|
236
|
-
let hours = _hours;
|
|
237
|
-
if (_hours !== null) {
|
|
238
|
-
hours = this.amPm && _hours > HOURS_OF_NOON
|
|
239
|
-
? _hours - HOURS_OF_NOON : this.amPm && !_hours ? HOURS_OF_NOON : _hours;
|
|
240
|
-
}
|
|
241
|
-
return hours;
|
|
242
|
-
}
|
|
243
|
-
/**
|
|
244
|
-
* Formats the hours value
|
|
245
|
-
*/
|
|
246
|
-
get formattedHours() {
|
|
247
|
-
return TimePicker_1.formattedUnit(this.periodHours);
|
|
248
|
-
}
|
|
249
|
-
/**
|
|
250
|
-
* Formats the minutes value
|
|
251
|
-
*/
|
|
252
|
-
get formattedMinutes() {
|
|
253
|
-
return TimePicker_1.formattedUnit(this.minutes);
|
|
254
|
-
}
|
|
255
|
-
/**
|
|
256
|
-
* Formats the seconds value
|
|
257
|
-
*/
|
|
258
|
-
get formattedSeconds() {
|
|
259
|
-
return TimePicker_1.formattedUnit(this.seconds);
|
|
260
|
-
}
|
|
261
|
-
/**
|
|
262
|
-
* Observes attribute change for `attributeChangedCallback`
|
|
263
|
-
*/
|
|
264
|
-
static get observedAttributes() {
|
|
265
|
-
const observed = super.observedAttributes;
|
|
266
|
-
return ['role'].concat(observed);
|
|
267
|
-
}
|
|
268
|
-
/**
|
|
269
|
-
* Synchronizes attribute value
|
|
270
|
-
* @param name attribute name
|
|
271
|
-
* @param oldValue old attribute value
|
|
272
|
-
* @param newValue new attribute value
|
|
273
|
-
* @returns {void}
|
|
274
|
-
*/
|
|
275
|
-
attributeChangedCallback(name, oldValue, newValue) {
|
|
276
|
-
super.attributeChangedCallback(name, oldValue, newValue);
|
|
277
|
-
if (name === 'role') {
|
|
278
|
-
this.announceValues = !(!newValue || newValue === 'none' || newValue === 'presentation');
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
/**
|
|
282
|
-
* On first updated life-cycle
|
|
283
|
-
* @param changedProperties changed properties
|
|
284
|
-
* @returns {void}
|
|
285
|
-
*/
|
|
286
|
-
firstUpdated(changedProperties) {
|
|
287
|
-
super.firstUpdated(changedProperties);
|
|
288
|
-
this.renderRoot.addEventListener('keydown', this.onKeydown, true);
|
|
289
|
-
}
|
|
290
|
-
/**
|
|
291
|
-
* On updated life-cycle
|
|
292
|
-
* @param changedProperties changed properties
|
|
293
|
-
* @returns {void}
|
|
294
|
-
*/
|
|
295
|
-
updated(changedProperties) {
|
|
296
|
-
super.updated(changedProperties);
|
|
297
|
-
/* istanbul ignore next */
|
|
298
|
-
if (TimePicker_1.hasTimeChanged(changedProperties) && this.isMobile) {
|
|
299
|
-
this.updateMobileTimePickerValue();
|
|
300
|
-
}
|
|
301
|
-
if (this.selectedSegment && changedProperties.has('selectedSegment')) {
|
|
302
|
-
void this.selectSegment();
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
/**
|
|
306
|
-
* Select text in input when update element is complete
|
|
307
|
-
* @returns returns a promise void
|
|
308
|
-
*/
|
|
309
|
-
async selectSegment() {
|
|
310
|
-
var _a;
|
|
311
|
-
await this.updateComplete;
|
|
312
|
-
switch (this.selectedSegment) {
|
|
313
|
-
case Segment.HOURS:
|
|
314
|
-
this.hoursInput.select();
|
|
315
|
-
break;
|
|
316
|
-
case Segment.MINUTES:
|
|
317
|
-
this.minutesInput.select();
|
|
318
|
-
break;
|
|
319
|
-
case Segment.SECONDS:
|
|
320
|
-
(_a = this.secondsInput) === null || _a === void 0 ? void 0 : _a.select();
|
|
321
|
-
break;
|
|
322
|
-
// no default
|
|
323
|
-
}
|
|
324
|
-
// Silently clear selected segment to ensure it can be reselected
|
|
325
|
-
this._selectedSegment = null;
|
|
326
|
-
}
|
|
327
|
-
/**
|
|
328
|
-
* Overwrite validation method for value
|
|
329
|
-
* @param value value
|
|
330
|
-
* @returns True if value is valid
|
|
331
|
-
*/
|
|
332
|
-
isValidValue(value) {
|
|
333
|
-
return value === '' || isValidTime(value);
|
|
334
|
-
}
|
|
335
|
-
/**
|
|
336
|
-
* Set time segment value in consistent way
|
|
337
|
-
* @param segment Time segment
|
|
338
|
-
* @param value Value to check
|
|
339
|
-
* @returns {void}
|
|
340
|
-
*/
|
|
341
|
-
setSegmentAndNotify(segment, value) {
|
|
342
|
-
const oldValue = this.value;
|
|
343
|
-
switch (segment) {
|
|
344
|
-
case Segment.HOURS:
|
|
345
|
-
this.hours = value;
|
|
346
|
-
break;
|
|
347
|
-
case Segment.MINUTES:
|
|
348
|
-
this.minutes = value;
|
|
349
|
-
break;
|
|
350
|
-
case Segment.SECONDS:
|
|
351
|
-
this.seconds = value;
|
|
352
|
-
break;
|
|
353
|
-
// no default
|
|
354
|
-
}
|
|
355
|
-
// Pre-populate empty segments
|
|
356
|
-
if (value !== null) {
|
|
357
|
-
if (segment === Segment.HOURS && this.minutes === null) {
|
|
358
|
-
this.minutes = 0;
|
|
359
|
-
}
|
|
360
|
-
if (this.isShowSeconds && this.seconds === null && (segment === Segment.HOURS || segment === Segment.MINUTES)) {
|
|
361
|
-
this.seconds = 0;
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
// verify value again, as time segment validation
|
|
365
|
-
// might fail in setter and previous value returned
|
|
366
|
-
if (oldValue !== this.value) {
|
|
367
|
-
this.notifyPropertyChange('value', this.value);
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
/**
|
|
371
|
-
* True if time segment has changed
|
|
372
|
-
* @param changedProperties changed properties
|
|
373
|
-
* @returns True if changed
|
|
374
|
-
*/
|
|
375
|
-
static hasTimeChanged(changedProperties) {
|
|
376
|
-
return changedProperties.has('hours')
|
|
377
|
-
|| changedProperties.has('minutes')
|
|
378
|
-
|| changedProperties.has('seconds');
|
|
379
|
-
}
|
|
380
|
-
/**
|
|
381
|
-
* Validates a given unit against a min and max value, returning a fallback if invalid.
|
|
382
|
-
* @param unit Unit to validate
|
|
383
|
-
* @param min Minimum allowed
|
|
384
|
-
* @param max Maximum allowed
|
|
385
|
-
* @param fallback Fallback value to use, if unit is invalid
|
|
386
|
-
* @returns unit or fallback or 0 value
|
|
387
|
-
*/
|
|
388
|
-
static validUnit(unit, min, max, fallback) {
|
|
389
|
-
if (unit === null) {
|
|
390
|
-
return null;
|
|
391
|
-
}
|
|
392
|
-
if (isNaN(unit) || unit < min || unit > max) {
|
|
393
|
-
return fallback;
|
|
394
|
-
}
|
|
395
|
-
return unit;
|
|
396
|
-
}
|
|
397
|
-
/**
|
|
398
|
-
* Handles value change from native time picker on mobile devices
|
|
399
|
-
* @param event Event Object
|
|
400
|
-
* @returns {void}
|
|
401
|
-
*/
|
|
402
|
-
/* istanbul ignore next */
|
|
403
|
-
onMobileTimeChange(event) {
|
|
404
|
-
this.value = event.target.value;
|
|
405
|
-
}
|
|
406
|
-
/**
|
|
407
|
-
* Helper, used to update the mobile time picker value
|
|
408
|
-
* @returns {void}
|
|
409
|
-
*/
|
|
410
|
-
/* istanbul ignore next */
|
|
411
|
-
updateMobileTimePickerValue() {
|
|
412
|
-
if (this.mtpInput) {
|
|
413
|
-
this.mtpInput.value = this.value;
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
/**
|
|
417
|
-
* Handles action when input focused change
|
|
418
|
-
* @param event Focus change event
|
|
419
|
-
* @returns {void}
|
|
420
|
-
*/
|
|
421
|
-
onInputFocusedChanged(event) {
|
|
422
|
-
const target = event.target;
|
|
423
|
-
const focused = event.detail.value;
|
|
424
|
-
let segment;
|
|
425
|
-
if (target === this.hoursInput) {
|
|
426
|
-
segment = Segment.HOURS;
|
|
427
|
-
}
|
|
428
|
-
else if (target === this.minutesInput) {
|
|
429
|
-
segment = Segment.MINUTES;
|
|
430
|
-
}
|
|
431
|
-
else if (target === this.secondsInput) {
|
|
432
|
-
segment = Segment.SECONDS;
|
|
433
|
-
}
|
|
434
|
-
this.selectedSegment = focused && segment ? segment : null;
|
|
435
|
-
/* istanbul ignore next */
|
|
436
|
-
if (!segment || this.readonly) {
|
|
437
|
-
return;
|
|
438
|
-
}
|
|
439
|
-
const value = target.value;
|
|
440
|
-
if (value) {
|
|
441
|
-
this.updateTimeSegmentTo(segment, Number(value));
|
|
442
|
-
}
|
|
443
|
-
this.updateSegmentValue(segment);
|
|
444
|
-
}
|
|
445
|
-
/**
|
|
446
|
-
* Handles action when input value changes
|
|
447
|
-
* @param event Value change event
|
|
448
|
-
* @returns {void}
|
|
449
|
-
*/
|
|
450
|
-
onInputValueChanged(event) {
|
|
451
|
-
// Make sure that the value can be reset to null
|
|
452
|
-
if (!event.detail.value) {
|
|
453
|
-
const target = event.target;
|
|
454
|
-
if (target === this.hoursInput) {
|
|
455
|
-
this.setSegmentAndNotify(Segment.HOURS, null);
|
|
456
|
-
}
|
|
457
|
-
else if (target === this.minutesInput) {
|
|
458
|
-
this.setSegmentAndNotify(Segment.MINUTES, null);
|
|
459
|
-
}
|
|
460
|
-
else if (target === this.secondsInput) {
|
|
461
|
-
this.setSegmentAndNotify(Segment.SECONDS, null);
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
/**
|
|
466
|
-
* Updates a time segment to the provided value
|
|
467
|
-
* @param segment Segment id
|
|
468
|
-
* @param value Unit to change to
|
|
469
|
-
* @returns {void}
|
|
470
|
-
*/
|
|
471
|
-
updateTimeSegmentTo(segment, value) {
|
|
472
|
-
if (segment === Segment.HOURS) {
|
|
473
|
-
value = this.getHoursSegment(value);
|
|
474
|
-
}
|
|
475
|
-
this.setSegmentAndNotify(segment, value);
|
|
476
|
-
}
|
|
477
|
-
/**
|
|
478
|
-
* Updates the value of a time segment (element)
|
|
479
|
-
* @param segment Segment's name
|
|
480
|
-
* @returns {void}
|
|
481
|
-
*/
|
|
482
|
-
updateSegmentValue(segment) {
|
|
483
|
-
switch (segment) {
|
|
484
|
-
case Segment.HOURS:
|
|
485
|
-
this.updateHoursSegmentValue();
|
|
486
|
-
break;
|
|
487
|
-
case Segment.MINUTES:
|
|
488
|
-
this.updateMinutesSegmentValue();
|
|
489
|
-
break;
|
|
490
|
-
case Segment.SECONDS:
|
|
491
|
-
this.updateSecondsSegmentValue();
|
|
492
|
-
break;
|
|
493
|
-
// no default
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
/**
|
|
497
|
-
* Handle valid control keys and execute their corresponding commands
|
|
498
|
-
* Will stop when readonly is set
|
|
499
|
-
* @param event Keyboard event
|
|
500
|
-
* @returns {void}
|
|
501
|
-
*/
|
|
502
|
-
manageControlKeys(event) {
|
|
503
|
-
if (this.readonly || this.disabled || event.defaultPrevented) {
|
|
504
|
-
return;
|
|
505
|
-
}
|
|
506
|
-
switch (event.key) {
|
|
507
|
-
case 'Up': // IE
|
|
508
|
-
case 'ArrowUp':
|
|
509
|
-
this.handleUpKey(event);
|
|
510
|
-
break;
|
|
511
|
-
case 'Down': // IE
|
|
512
|
-
case 'ArrowDown':
|
|
513
|
-
this.handleDownKey(event);
|
|
514
|
-
break;
|
|
515
|
-
case 'Enter':
|
|
516
|
-
case 'Spacebar':
|
|
517
|
-
case ' ':
|
|
518
|
-
this.handleEnterKey(event);
|
|
519
|
-
break;
|
|
520
|
-
default:
|
|
521
|
-
return;
|
|
522
|
-
}
|
|
523
|
-
event.preventDefault();
|
|
524
|
-
}
|
|
525
|
-
/**
|
|
526
|
-
* Handles ENTER key press
|
|
527
|
-
* @param event Keyboard event
|
|
528
|
-
* @returns {void}
|
|
529
|
-
*/
|
|
530
|
-
handleEnterKey(event) {
|
|
531
|
-
if (event.target === this.toggleEl) {
|
|
532
|
-
this.toggle();
|
|
533
|
-
event.preventDefault();
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
/**
|
|
537
|
-
* Handles UP key press
|
|
538
|
-
* @param event Keyboard event
|
|
539
|
-
* @returns {void}
|
|
540
|
-
*/
|
|
541
|
-
handleUpKey(event) {
|
|
542
|
-
this.toggleOrModify(1, event.target);
|
|
543
|
-
}
|
|
544
|
-
/**
|
|
545
|
-
* Handle DOWN key press
|
|
546
|
-
* @param event Keyboard event
|
|
547
|
-
* @returns {void}
|
|
548
|
-
*/
|
|
549
|
-
handleDownKey(event) {
|
|
550
|
-
this.toggleOrModify(-1, event.target);
|
|
551
|
-
}
|
|
552
|
-
/**
|
|
553
|
-
* Toggles the amPm flag or updates the time segment value.
|
|
554
|
-
* Essentially a handler for user inputs on the control.
|
|
555
|
-
* @param amount to change value by
|
|
556
|
-
* @param target Segment id
|
|
557
|
-
* @returns {void}
|
|
558
|
-
*/
|
|
559
|
-
toggleOrModify(amount, target) {
|
|
560
|
-
if (target === this.toggleEl) {
|
|
561
|
-
this.toggle();
|
|
562
|
-
}
|
|
563
|
-
else if (target === this.hoursInput) {
|
|
564
|
-
this.changeValueBy(amount, Segment.HOURS);
|
|
565
|
-
}
|
|
566
|
-
else if (target === this.minutesInput) {
|
|
567
|
-
this.changeValueBy(amount, Segment.MINUTES);
|
|
568
|
-
}
|
|
569
|
-
else if (target === this.secondsInput) {
|
|
570
|
-
this.changeValueBy(amount, Segment.SECONDS);
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
/**
|
|
574
|
-
* Changes a time segment value by a specified amount.
|
|
575
|
-
* Also updates parent values when rolling through cycles.
|
|
576
|
-
* @param amount Amount to change by
|
|
577
|
-
* @param segment Segment id
|
|
578
|
-
* @returns {void}
|
|
579
|
-
*/
|
|
580
|
-
changeValueBy(amount, segment) {
|
|
581
|
-
let offset = 0;
|
|
582
|
-
switch (segment) {
|
|
583
|
-
case Segment.HOURS:
|
|
584
|
-
offset = this.hours === null ? 0 : amount * MILLISECONDS_IN_HOUR;
|
|
585
|
-
break;
|
|
586
|
-
case Segment.MINUTES:
|
|
587
|
-
offset = this.minutes === null ? 0 : amount * MILLISECONDS_IN_MINUTE;
|
|
588
|
-
break;
|
|
589
|
-
case Segment.SECONDS:
|
|
590
|
-
offset = this.seconds === null ? 0 : amount * MILLISECONDS_IN_SECOND;
|
|
591
|
-
break;
|
|
592
|
-
// no default
|
|
593
|
-
}
|
|
594
|
-
const value = addOffset(this.currentTimeString, offset);
|
|
595
|
-
this.setValueAndNotify(value);
|
|
596
|
-
this.selectedSegment = segment;
|
|
597
|
-
}
|
|
598
|
-
/**
|
|
599
|
-
* Gets the hours segment of the provided value
|
|
600
|
-
* as there is extra logic required for 12hr support
|
|
601
|
-
*
|
|
602
|
-
* @param value Unit to change to
|
|
603
|
-
* @returns updated value
|
|
604
|
-
*/
|
|
605
|
-
getHoursSegment(value) {
|
|
606
|
-
if (this.amPm) {
|
|
607
|
-
if (value === HOURS_OF_NOON && this.isAM()) {
|
|
608
|
-
value = 0;
|
|
609
|
-
}
|
|
610
|
-
if (this.isPM() && value < HOURS_OF_NOON) {
|
|
611
|
-
value += HOURS_OF_NOON;
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
return value;
|
|
615
|
-
}
|
|
616
|
-
/**
|
|
617
|
-
* Updates the value of the hours element
|
|
618
|
-
* @returns {void}
|
|
619
|
-
*/
|
|
620
|
-
updateHoursSegmentValue() {
|
|
621
|
-
if (this.hoursInput) {
|
|
622
|
-
this.hoursInput.value = this.formattedHours;
|
|
623
|
-
}
|
|
624
|
-
}
|
|
625
|
-
/**
|
|
626
|
-
* Updated the value of the minutes element
|
|
627
|
-
* @returns {void}
|
|
628
|
-
*/
|
|
629
|
-
updateMinutesSegmentValue() {
|
|
630
|
-
if (this.minutesInput) {
|
|
631
|
-
this.minutesInput.value = this.formattedMinutes;
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
/**
|
|
635
|
-
* Updates the value of the seconds element
|
|
636
|
-
* @returns {void}
|
|
637
|
-
*/
|
|
638
|
-
updateSecondsSegmentValue() {
|
|
639
|
-
if (this.secondsInput) {
|
|
640
|
-
this.secondsInput.value = this.formattedSeconds;
|
|
641
|
-
}
|
|
642
|
-
}
|
|
643
|
-
/**
|
|
644
|
-
* Formats a given number and prefixes a 0 on numbers lower than 10
|
|
645
|
-
* @param n Number to format
|
|
646
|
-
* @returns Formatted number
|
|
647
|
-
*/
|
|
648
|
-
static formattedUnit(n) {
|
|
649
|
-
return n === null ? '' : padNumber(n, 2);
|
|
650
|
-
}
|
|
651
|
-
/**
|
|
652
|
-
* Returns `true` or `false` depending on whether the hours are before, or, after noon
|
|
653
|
-
* @returns True if time is AM
|
|
654
|
-
*/
|
|
655
|
-
isAM() {
|
|
656
|
-
return isAM(this.currentTimeString);
|
|
657
|
-
}
|
|
658
|
-
/**
|
|
659
|
-
* Returns opposite of isAM
|
|
660
|
-
* @returns True if time is PM
|
|
661
|
-
*/
|
|
662
|
-
isPM() {
|
|
663
|
-
return isPM(this.currentTimeString);
|
|
664
|
-
}
|
|
665
|
-
/**
|
|
666
|
-
* Toggles the AM/PM state
|
|
667
|
-
* @returns {void}
|
|
668
|
-
*/
|
|
669
|
-
toggle() {
|
|
670
|
-
if (this.amPm) {
|
|
671
|
-
const hours = this.hours === null ? new Date().getHours() : (this.hours + HOURS_IN_DAY / 2) % HOURS_IN_DAY;
|
|
672
|
-
this.setSegmentAndNotify(Segment.HOURS, hours);
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
/**
|
|
676
|
-
* A `CSSResultGroup` that will be used
|
|
677
|
-
* to style the host, slotted children
|
|
678
|
-
* and the internal template of the element.
|
|
679
|
-
* @returns CSS template
|
|
680
|
-
*/
|
|
681
|
-
static get styles() {
|
|
682
|
-
return css `
|
|
683
|
-
:host {
|
|
684
|
-
display: inline-flex;
|
|
685
|
-
flex-flow: row nowrap;
|
|
686
|
-
align-items: center;
|
|
687
|
-
justify-content: center;
|
|
688
|
-
user-select:none;
|
|
689
|
-
position: relative;
|
|
690
|
-
}
|
|
691
|
-
input {
|
|
692
|
-
position: absolute;
|
|
693
|
-
top: 0;
|
|
694
|
-
left: 0;
|
|
695
|
-
width: 100%;
|
|
696
|
-
height: 100%;
|
|
697
|
-
opacity: 0;
|
|
698
|
-
}
|
|
699
|
-
`;
|
|
700
|
-
}
|
|
701
|
-
/**
|
|
702
|
-
* Template for Hours Segment
|
|
703
|
-
* @returns template hours segment
|
|
704
|
-
*/
|
|
705
|
-
get hoursTemplate() {
|
|
706
|
-
const hours = this.formattedHours;
|
|
707
|
-
return html `<ef-number-field
|
|
708
|
-
id="hours"
|
|
709
|
-
part="input"
|
|
710
|
-
aria-label="${ifDefined(!isIE ? this.t('SELECT_HOURS', { value: this.periodHours }) : undefined)}"
|
|
711
|
-
no-spinner
|
|
712
|
-
transparent
|
|
713
|
-
min="${this.amPm ? 1 : MIN_UNIT}"
|
|
714
|
-
max="${this.amPm ? HOURS_OF_NOON : MAX_HOURS}"
|
|
715
|
-
.value="${hours}"
|
|
716
|
-
placeholder="${ifDefined(hours ? undefined : Placeholder.HOURS)}"
|
|
717
|
-
?disabled="${this.disabled}"
|
|
718
|
-
?readonly="${this.readonly}"
|
|
719
|
-
@value-changed="${this.onInputValueChanged}"
|
|
720
|
-
@focused-changed=${this.onInputFocusedChanged}></ef-number-field>`;
|
|
721
|
-
}
|
|
722
|
-
/**
|
|
723
|
-
* Template for Minutes Segment
|
|
724
|
-
* @returns template minutes segment
|
|
725
|
-
*/
|
|
726
|
-
get minutesTemplate() {
|
|
727
|
-
const minutes = this.formattedMinutes;
|
|
728
|
-
return html `<ef-number-field
|
|
729
|
-
id="minutes"
|
|
730
|
-
aria-label="${ifDefined(!isIE ? this.t('SELECT_MINUTES', { value: this.minutes }) : undefined)}"
|
|
731
|
-
part="input"
|
|
732
|
-
no-spinner
|
|
733
|
-
min="${MIN_UNIT}"
|
|
734
|
-
max="${MAX_MINUTES}"
|
|
735
|
-
.value="${minutes}"
|
|
736
|
-
placeholder="${ifDefined(minutes ? undefined : Placeholder.MINUTES)}"
|
|
737
|
-
?readonly="${this.readonly}"
|
|
738
|
-
?disabled="${this.disabled}"
|
|
739
|
-
transparent
|
|
740
|
-
@value-changed="${this.onInputValueChanged}"
|
|
741
|
-
@focused-changed=${this.onInputFocusedChanged}></ef-number-field>`;
|
|
742
|
-
}
|
|
743
|
-
/**
|
|
744
|
-
* Template for Seconds Segment
|
|
745
|
-
* @returns template seconds segment
|
|
746
|
-
*/
|
|
747
|
-
get secondsTemplate() {
|
|
748
|
-
const seconds = this.formattedSeconds;
|
|
749
|
-
return html `
|
|
750
|
-
<ef-number-field
|
|
751
|
-
id="seconds"
|
|
752
|
-
part="input"
|
|
753
|
-
aria-label="${ifDefined(!isIE ? this.t('SELECT_SECONDS', { value: this.seconds }) : undefined)}"
|
|
754
|
-
no-spinner
|
|
755
|
-
min="${MIN_UNIT}"
|
|
756
|
-
max="${MAX_SECONDS}"
|
|
757
|
-
.value="${seconds}"
|
|
758
|
-
placeholder="${ifDefined(seconds ? undefined : Placeholder.SECONDS)}"
|
|
759
|
-
?readonly="${this.readonly}"
|
|
760
|
-
?disabled="${this.disabled}"
|
|
761
|
-
transparent
|
|
762
|
-
@value-changed="${this.onInputValueChanged}"
|
|
763
|
-
@focused-changed=${this.onInputFocusedChanged}></ef-number-field>`;
|
|
764
|
-
}
|
|
765
|
-
/**
|
|
766
|
-
* Template for AmPm Segment
|
|
767
|
-
* @returns Am/Pm segment
|
|
768
|
-
*/
|
|
769
|
-
get getAmPmHtml() {
|
|
770
|
-
const hasHours = this.hours !== null;
|
|
771
|
-
return this.amPm ? html `
|
|
772
|
-
<div role="listbox"
|
|
773
|
-
aria-label="${this.t('TOGGLE_TIME_PERIOD')}"
|
|
774
|
-
aria-activedescendant="${ifDefined(hasHours ? this.isAM() ? 'toggle-am' : 'toggle-pm' : undefined)}"
|
|
775
|
-
id="toggle"
|
|
776
|
-
part="toggle"
|
|
777
|
-
@tap=${this.toggle}
|
|
778
|
-
tabindex="0">
|
|
779
|
-
<div
|
|
780
|
-
aria-label="${this.t('BEFORE_MIDDAY')}"
|
|
781
|
-
role="option"
|
|
782
|
-
id="toggle-am"
|
|
783
|
-
part="toggle-item"
|
|
784
|
-
?active=${hasHours && this.isAM()}>AM</div>
|
|
785
|
-
<div
|
|
786
|
-
aria-label="${this.t('AFTER_MIDDAY')}"
|
|
787
|
-
role="option"
|
|
788
|
-
id="toggle-pm"
|
|
789
|
-
part="toggle-item"
|
|
790
|
-
?active=${hasHours && this.isPM()}>PM</div>
|
|
791
|
-
</div>
|
|
792
|
-
` : null;
|
|
793
|
-
}
|
|
794
|
-
/**
|
|
795
|
-
* Native input's template for mobile
|
|
796
|
-
* @returns input
|
|
797
|
-
*/
|
|
798
|
-
get nativeInputForMobile() {
|
|
799
|
-
return this.isMobile ? html `<input id="mtp" type="time" @change=${this.onMobileTimeChange}>` : null;
|
|
800
|
-
}
|
|
801
|
-
/**
|
|
802
|
-
* A template used to notify currently selected value for screen readers
|
|
803
|
-
* @returns template result
|
|
804
|
-
*/
|
|
805
|
-
get selectionTemplate() {
|
|
806
|
-
if (isIE || !this.announceValues) {
|
|
807
|
-
return;
|
|
808
|
-
}
|
|
809
|
-
const value = this.value;
|
|
810
|
-
const showSeconds = this.isShowSeconds;
|
|
811
|
-
const amPm = this.amPm;
|
|
812
|
-
return html `<div
|
|
813
|
-
part="aria-selection"
|
|
814
|
-
aria-live="polite"
|
|
815
|
-
aria-label="${this.t('SELECTED', {
|
|
816
|
-
value: value ? parse(value) : null,
|
|
817
|
-
showSeconds,
|
|
818
|
-
amPm
|
|
819
|
-
})}"></div>`;
|
|
820
|
-
}
|
|
821
|
-
/**
|
|
822
|
-
* Get time input template
|
|
823
|
-
* @returns template result
|
|
824
|
-
*/
|
|
825
|
-
get inputTemplate() {
|
|
826
|
-
return html `
|
|
827
|
-
${this.hoursTemplate}
|
|
828
|
-
${TimePicker_1.dividerTemplate}
|
|
829
|
-
${this.minutesTemplate}
|
|
830
|
-
${this.isShowSeconds ? html `${TimePicker_1.dividerTemplate}${this.secondsTemplate}` : undefined}`;
|
|
831
|
-
}
|
|
832
|
-
/**
|
|
833
|
-
* A `TemplateResult` that will be used
|
|
834
|
-
* to render the updated internal template.
|
|
835
|
-
* @returns Render template
|
|
836
|
-
*/
|
|
837
|
-
render() {
|
|
838
|
-
return html `
|
|
839
|
-
${this.inputTemplate}
|
|
840
|
-
${guard([this.value, this.lang, this.amPm], () => this.getAmPmHtml)}
|
|
841
|
-
${guard([this.isMobile], () => this.nativeInputForMobile)}
|
|
842
|
-
${guard([this.value, this.lang, this.showSeconds, this.amPm, this.announceValues], () => this.selectionTemplate)}
|
|
843
|
-
`;
|
|
844
|
-
}
|
|
845
|
-
};
|
|
846
|
-
/**
|
|
847
|
-
* Template for divider segment
|
|
848
|
-
* @returns Divider segment
|
|
849
|
-
*/
|
|
850
|
-
TimePicker.dividerTemplate = html `<span part="divider"></span>`;
|
|
851
|
-
__decorate([
|
|
852
|
-
property({ type: Number })
|
|
853
|
-
], TimePicker.prototype, "hours", null);
|
|
854
|
-
__decorate([
|
|
855
|
-
property({ type: Number })
|
|
856
|
-
], TimePicker.prototype, "minutes", null);
|
|
857
|
-
__decorate([
|
|
858
|
-
property({ type: Number })
|
|
859
|
-
], TimePicker.prototype, "seconds", null);
|
|
860
|
-
__decorate([
|
|
861
|
-
property({ type: Boolean, attribute: 'am-pm', reflect: true })
|
|
862
|
-
], TimePicker.prototype, "amPm", void 0);
|
|
863
|
-
__decorate([
|
|
864
|
-
property({ type: Boolean, attribute: 'show-seconds', reflect: true })
|
|
865
|
-
], TimePicker.prototype, "showSeconds", void 0);
|
|
866
|
-
__decorate([
|
|
867
|
-
property({ type: String })
|
|
868
|
-
], TimePicker.prototype, "value", null);
|
|
869
|
-
__decorate([
|
|
870
|
-
query('#mtp')
|
|
871
|
-
], TimePicker.prototype, "mtpInput", void 0);
|
|
872
|
-
__decorate([
|
|
873
|
-
query('#hours')
|
|
874
|
-
], TimePicker.prototype, "hoursInput", void 0);
|
|
875
|
-
__decorate([
|
|
876
|
-
query('#minutes')
|
|
877
|
-
], TimePicker.prototype, "minutesInput", void 0);
|
|
878
|
-
__decorate([
|
|
879
|
-
query('#seconds')
|
|
880
|
-
], TimePicker.prototype, "secondsInput", void 0);
|
|
881
|
-
__decorate([
|
|
882
|
-
query('#toggle')
|
|
883
|
-
], TimePicker.prototype, "toggleEl", void 0);
|
|
884
|
-
__decorate([
|
|
885
|
-
translate({ mode: 'directive', scope: 'ef-time-picker' })
|
|
886
|
-
], TimePicker.prototype, "t", void 0);
|
|
887
|
-
__decorate([
|
|
888
|
-
state()
|
|
889
|
-
], TimePicker.prototype, "selectedSegment", null);
|
|
890
|
-
__decorate([
|
|
891
|
-
state()
|
|
892
|
-
], TimePicker.prototype, "announceValues", void 0);
|
|
893
|
-
TimePicker = TimePicker_1 = __decorate([
|
|
894
|
-
customElement('ef-time-picker', {
|
|
895
|
-
alias: 'coral-time-picker'
|
|
896
|
-
})
|
|
897
|
-
], TimePicker);
|
|
898
|
-
export { TimePicker };
|