@refinitiv-ui/elements 6.9.0-next.0 → 6.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +218 -380
- package/LICENSE +1 -1
- package/README.md +12 -10
- package/lib/accordion/index.d.ts +1 -1
- package/lib/accordion/index.js +4 -7
- package/lib/accordion/themes/halo/dark/index.js +0 -1
- package/lib/accordion/themes/halo/light/index.js +0 -1
- package/lib/accordion/themes/solar/charcoal/index.js +0 -1
- package/lib/accordion/themes/solar/pearl/index.js +0 -1
- package/lib/appstate-bar/index.d.ts +2 -2
- package/lib/appstate-bar/index.js +10 -4
- package/lib/appstate-bar/themes/halo/dark/index.js +0 -1
- package/lib/appstate-bar/themes/halo/light/index.js +0 -1
- package/lib/appstate-bar/themes/solar/charcoal/index.js +0 -1
- package/lib/appstate-bar/themes/solar/pearl/index.js +0 -1
- package/lib/autosuggest/index.d.ts +7 -7
- package/lib/autosuggest/index.js +89 -84
- package/lib/autosuggest/themes/halo/dark/index.js +0 -1
- package/lib/autosuggest/themes/halo/light/index.js +0 -1
- package/lib/autosuggest/themes/solar/charcoal/index.js +1 -2
- package/lib/autosuggest/themes/solar/pearl/index.js +1 -2
- package/lib/button/index.js +7 -10
- package/lib/button/themes/halo/dark/index.js +0 -1
- package/lib/button/themes/halo/light/index.js +0 -1
- package/lib/button/themes/solar/charcoal/index.js +0 -1
- package/lib/button/themes/solar/pearl/index.js +0 -1
- package/lib/button-bar/index.d.ts +1 -1
- package/lib/button-bar/index.js +12 -12
- package/lib/button-bar/themes/halo/dark/index.js +0 -1
- package/lib/button-bar/themes/halo/light/index.js +0 -1
- package/lib/button-bar/themes/solar/charcoal/index.js +0 -1
- package/lib/button-bar/themes/solar/pearl/index.js +0 -1
- package/lib/calendar/index.d.ts +39 -39
- package/lib/calendar/index.js +165 -132
- package/lib/calendar/themes/halo/dark/index.js +0 -1
- package/lib/calendar/themes/halo/light/index.js +0 -1
- package/lib/calendar/themes/solar/charcoal/index.js +0 -1
- package/lib/calendar/themes/solar/pearl/index.js +0 -1
- package/lib/calendar/utils.js +2 -2
- package/lib/canvas/index.d.ts +1 -1
- package/lib/canvas/index.js +2 -4
- package/lib/canvas/themes/halo/dark/index.js +0 -1
- package/lib/canvas/themes/halo/light/index.js +0 -1
- package/lib/canvas/themes/solar/charcoal/index.js +0 -1
- package/lib/canvas/themes/solar/pearl/index.js +0 -1
- package/lib/card/helpers/types.d.ts +2 -2
- package/lib/card/index.d.ts +5 -5
- package/lib/card/index.js +34 -28
- package/lib/card/themes/halo/dark/index.js +0 -1
- package/lib/card/themes/halo/light/index.js +0 -1
- package/lib/card/themes/solar/charcoal/index.js +0 -1
- package/lib/card/themes/solar/pearl/index.js +0 -1
- package/lib/chart/helpers/legend.js +10 -8
- package/lib/chart/index.d.ts +3 -3
- package/lib/chart/index.js +17 -17
- package/lib/chart/plugins/doughnut-center-label.js +7 -6
- package/lib/chart/themes/halo/dark/index.js +0 -1
- package/lib/chart/themes/halo/light/index.js +0 -1
- package/lib/chart/themes/solar/charcoal/index.js +0 -1
- package/lib/chart/themes/solar/pearl/index.js +0 -1
- package/lib/checkbox/index.d.ts +1 -1
- package/lib/checkbox/index.js +12 -13
- package/lib/checkbox/themes/halo/dark/index.js +0 -1
- package/lib/checkbox/themes/halo/light/index.js +0 -1
- package/lib/checkbox/themes/solar/charcoal/index.js +0 -1
- package/lib/checkbox/themes/solar/pearl/index.js +0 -1
- package/lib/clock/index.d.ts +55 -55
- package/lib/clock/index.js +84 -95
- package/lib/clock/themes/halo/dark/index.js +1 -2
- package/lib/clock/themes/halo/light/index.js +1 -2
- package/lib/clock/themes/solar/charcoal/index.js +1 -2
- package/lib/clock/themes/solar/pearl/index.js +1 -2
- package/lib/collapse/index.d.ts +1 -1
- package/lib/collapse/index.js +28 -19
- package/lib/collapse/themes/halo/dark/index.js +1 -2
- package/lib/collapse/themes/halo/light/index.js +1 -2
- package/lib/collapse/themes/solar/charcoal/index.js +0 -1
- package/lib/collapse/themes/solar/pearl/index.js +0 -1
- package/lib/color-dialog/elements/color-palettes.d.ts +1 -1
- package/lib/color-dialog/elements/color-palettes.js +5 -6
- package/lib/color-dialog/elements/grayscale-palettes.d.ts +1 -1
- package/lib/color-dialog/elements/grayscale-palettes.js +9 -9
- package/lib/color-dialog/elements/palettes.js +5 -4
- package/lib/color-dialog/helpers/value-model.js +7 -9
- package/lib/color-dialog/index.d.ts +6 -6
- package/lib/color-dialog/index.js +53 -37
- package/lib/color-dialog/themes/halo/dark/index.js +0 -1
- package/lib/color-dialog/themes/halo/light/index.js +0 -1
- package/lib/color-dialog/themes/solar/charcoal/index.js +0 -1
- package/lib/color-dialog/themes/solar/pearl/index.js +0 -1
- package/lib/color-picker/index.d.ts +2 -2
- package/lib/color-picker/index.js +40 -34
- package/lib/color-picker/themes/halo/dark/index.js +0 -1
- package/lib/color-picker/themes/halo/light/index.js +0 -1
- package/lib/color-picker/themes/solar/charcoal/index.js +0 -1
- package/lib/color-picker/themes/solar/pearl/index.js +0 -1
- package/lib/combo-box/helpers/filter.d.ts +2 -2
- package/lib/combo-box/helpers/types.d.ts +1 -1
- package/lib/combo-box/index.d.ts +9 -9
- package/lib/combo-box/index.js +61 -55
- package/lib/combo-box/themes/halo/dark/index.js +0 -1
- package/lib/combo-box/themes/halo/light/index.js +0 -1
- package/lib/combo-box/themes/solar/charcoal/index.js +0 -1
- package/lib/combo-box/themes/solar/pearl/index.js +0 -1
- package/lib/configuration/custom-elements.json +15 -0
- package/lib/configuration/custom-elements.md +7 -0
- package/lib/{config/elements/config.d.ts → configuration/elements/configuration.d.ts} +14 -7
- package/lib/{config/elements/config.js → configuration/elements/configuration.js} +17 -15
- package/lib/configuration/helpers/context.d.ts +5 -0
- package/lib/configuration/helpers/context.js +3 -0
- package/lib/{config/helpers/context.d.ts → configuration/helpers/types.d.ts} +0 -3
- package/lib/configuration/helpers/types.js +1 -0
- package/lib/configuration/index.d.ts +3 -0
- package/lib/{config → configuration}/index.js +1 -1
- package/lib/counter/index.d.ts +4 -4
- package/lib/counter/index.js +9 -7
- package/lib/counter/themes/halo/dark/index.js +0 -1
- package/lib/counter/themes/halo/light/index.js +0 -1
- package/lib/counter/themes/solar/charcoal/index.js +0 -1
- package/lib/counter/themes/solar/pearl/index.js +0 -1
- package/lib/datetime-field/index.d.ts +4 -5
- package/lib/datetime-field/index.js +32 -23
- package/lib/datetime-field/themes/halo/dark/index.js +0 -1
- package/lib/datetime-field/themes/halo/light/index.js +0 -1
- package/lib/datetime-field/themes/solar/charcoal/index.js +0 -1
- package/lib/datetime-field/themes/solar/pearl/index.js +0 -1
- package/lib/datetime-field/utils.js +11 -1
- package/lib/datetime-picker/index.d.ts +75 -75
- package/lib/datetime-picker/index.js +154 -135
- package/lib/datetime-picker/locales.js +5 -5
- package/lib/datetime-picker/themes/halo/dark/index.js +0 -1
- package/lib/datetime-picker/themes/halo/light/index.js +0 -1
- package/lib/datetime-picker/themes/solar/charcoal/index.js +0 -1
- package/lib/datetime-picker/themes/solar/pearl/index.js +0 -1
- package/lib/datetime-picker/utils.js +9 -9
- package/lib/dialog/custom-elements.json +0 -11
- package/lib/dialog/custom-elements.md +3 -4
- package/lib/dialog/draggable-element.js +1 -2
- package/lib/dialog/index.d.ts +7 -7
- package/lib/dialog/index.js +48 -38
- package/lib/dialog/themes/halo/dark/index.js +0 -1
- package/lib/dialog/themes/halo/light/index.js +0 -1
- package/lib/dialog/themes/solar/charcoal/index.js +0 -1
- package/lib/dialog/themes/solar/pearl/index.js +0 -1
- package/lib/email-field/index.d.ts +1 -1
- package/lib/email-field/index.js +6 -6
- package/lib/email-field/themes/halo/dark/index.js +0 -1
- package/lib/email-field/themes/halo/light/index.js +0 -1
- package/lib/email-field/themes/solar/charcoal/index.js +0 -1
- package/lib/email-field/themes/solar/pearl/index.js +0 -1
- package/lib/events.d.ts +1 -1
- package/lib/flag/custom-elements.json +0 -12
- package/lib/flag/custom-elements.md +0 -3
- package/lib/flag/index.d.ts +12 -8
- package/lib/flag/index.js +20 -12
- package/lib/flag/themes/halo/dark/index.js +0 -1
- package/lib/flag/themes/halo/light/index.js +0 -1
- package/lib/flag/themes/solar/charcoal/index.js +0 -1
- package/lib/flag/themes/solar/pearl/index.js +0 -1
- package/lib/flag/utils/FlagLoader.js +1 -1
- package/lib/header/index.d.ts +1 -1
- package/lib/header/index.js +2 -2
- package/lib/header/themes/halo/dark/index.js +1 -2
- package/lib/header/themes/halo/light/index.js +1 -2
- package/lib/header/themes/solar/charcoal/index.js +1 -2
- package/lib/header/themes/solar/pearl/index.js +1 -2
- package/lib/heatmap/helpers/color.d.ts +1 -1
- package/lib/heatmap/helpers/color.js +11 -5
- package/lib/heatmap/helpers/track.js +3 -3
- package/lib/heatmap/helpers/types.d.ts +10 -10
- package/lib/heatmap/index.d.ts +9 -9
- package/lib/heatmap/index.js +104 -65
- package/lib/heatmap/themes/halo/dark/index.js +0 -1
- package/lib/heatmap/themes/halo/light/index.js +0 -1
- package/lib/heatmap/themes/solar/charcoal/index.js +0 -1
- package/lib/heatmap/themes/solar/pearl/index.js +0 -1
- package/lib/icon/custom-elements.json +0 -13
- package/lib/icon/custom-elements.md +0 -1
- package/lib/icon/index.d.ts +16 -6
- package/lib/icon/index.js +22 -11
- package/lib/icon/themes/halo/dark/index.js +0 -1
- package/lib/icon/themes/halo/light/index.js +0 -1
- package/lib/icon/themes/solar/charcoal/index.js +0 -1
- package/lib/icon/themes/solar/pearl/index.js +0 -1
- package/lib/icon/utils/IconLoader.d.ts +1 -0
- package/lib/icon/utils/IconLoader.js +9 -1
- package/lib/interactive-chart/custom-elements.json +5 -0
- package/lib/interactive-chart/custom-elements.md +1 -0
- package/lib/interactive-chart/helpers/types.d.ts +3 -3
- package/lib/interactive-chart/index.d.ts +40 -36
- package/lib/interactive-chart/index.js +78 -59
- package/lib/interactive-chart/themes/halo/dark/index.js +0 -1
- package/lib/interactive-chart/themes/halo/light/index.js +0 -1
- package/lib/interactive-chart/themes/solar/charcoal/index.js +0 -1
- package/lib/interactive-chart/themes/solar/pearl/index.js +0 -1
- package/lib/item/helpers/types.d.ts +1 -1
- package/lib/item/index.d.ts +3 -3
- package/lib/item/index.js +24 -20
- package/lib/item/themes/halo/dark/index.js +0 -1
- package/lib/item/themes/halo/light/index.js +0 -1
- package/lib/item/themes/solar/charcoal/index.js +0 -1
- package/lib/item/themes/solar/pearl/index.js +0 -1
- package/lib/jsx.d.ts +6 -4
- package/lib/label/index.d.ts +1 -1
- package/lib/label/index.js +11 -8
- package/lib/label/themes/halo/dark/index.js +0 -1
- package/lib/label/themes/halo/light/index.js +0 -1
- package/lib/label/themes/solar/charcoal/index.js +0 -1
- package/lib/label/themes/solar/pearl/index.js +0 -1
- package/lib/layout/index.d.ts +7 -7
- package/lib/layout/index.js +7 -7
- package/lib/layout/themes/halo/dark/index.js +0 -1
- package/lib/layout/themes/halo/light/index.js +0 -1
- package/lib/layout/themes/solar/charcoal/index.js +0 -1
- package/lib/layout/themes/solar/pearl/index.js +0 -1
- package/lib/led-gauge/index.d.ts +1 -1
- package/lib/led-gauge/index.js +10 -10
- package/lib/led-gauge/themes/halo/dark/index.js +0 -1
- package/lib/led-gauge/themes/halo/light/index.js +0 -1
- package/lib/led-gauge/themes/solar/charcoal/index.js +0 -1
- package/lib/led-gauge/themes/solar/pearl/index.js +0 -1
- package/lib/list/elements/list.d.ts +3 -3
- package/lib/list/elements/list.js +10 -12
- package/lib/list/helpers/renderer.js +2 -2
- package/lib/list/helpers/types.d.ts +1 -1
- package/lib/list/index.d.ts +1 -1
- package/lib/list/renderer.d.ts +7 -7
- package/lib/list/themes/halo/dark/index.js +0 -2
- package/lib/list/themes/halo/light/index.js +0 -2
- package/lib/list/themes/solar/charcoal/index.js +0 -2
- package/lib/list/themes/solar/pearl/index.js +0 -2
- package/lib/loader/index.js +7 -8
- package/lib/loader/themes/halo/dark/index.js +0 -1
- package/lib/loader/themes/halo/light/index.js +0 -1
- package/lib/loader/themes/solar/charcoal/index.js +0 -1
- package/lib/loader/themes/solar/pearl/index.js +0 -1
- package/lib/multi-input/index.d.ts +6 -6
- package/lib/multi-input/index.js +39 -45
- package/lib/multi-input/themes/halo/dark/index.js +0 -1
- package/lib/multi-input/themes/halo/light/index.js +0 -1
- package/lib/multi-input/themes/solar/charcoal/index.js +0 -1
- package/lib/multi-input/themes/solar/pearl/index.js +0 -1
- package/lib/notification/elements/notification-tray.d.ts +2 -2
- package/lib/notification/elements/notification-tray.js +3 -3
- package/lib/notification/elements/notification.d.ts +2 -2
- package/lib/notification/elements/notification.js +17 -14
- package/lib/notification/helpers/status.js +1 -1
- package/lib/notification/themes/halo/dark/index.js +1 -3
- package/lib/notification/themes/halo/light/index.js +1 -3
- package/lib/notification/themes/solar/charcoal/index.js +1 -3
- package/lib/notification/themes/solar/pearl/index.js +1 -3
- package/lib/number-field/index.d.ts +12 -6
- package/lib/number-field/index.js +64 -48
- package/lib/number-field/themes/halo/dark/index.js +0 -1
- package/lib/number-field/themes/halo/light/index.js +0 -1
- package/lib/number-field/themes/solar/charcoal/index.js +0 -1
- package/lib/number-field/themes/solar/pearl/index.js +0 -1
- package/lib/overlay/elements/overlay-viewport.d.ts +1 -1
- package/lib/overlay/elements/overlay.d.ts +2 -2
- package/lib/overlay/elements/overlay.js +154 -98
- package/lib/overlay/helpers/types.d.ts +1 -1
- package/lib/overlay/managers/backdrop-manager.d.ts +1 -1
- package/lib/overlay/managers/backdrop-manager.js +2 -2
- package/lib/overlay/managers/close-manager.js +2 -1
- package/lib/overlay/managers/focus-manager.js +23 -13
- package/lib/overlay/managers/interaction-lock-manager.d.ts +4 -4
- package/lib/overlay/managers/interaction-lock-manager.js +33 -25
- package/lib/overlay/managers/viewport-manager.d.ts +2 -2
- package/lib/overlay/managers/viewport-manager.js +3 -2
- package/lib/overlay/managers/zindex-manager.js +4 -2
- package/lib/overlay/themes/halo/dark/index.js +0 -2
- package/lib/overlay/themes/halo/light/index.js +0 -2
- package/lib/overlay/themes/solar/charcoal/index.js +0 -2
- package/lib/overlay/themes/solar/pearl/index.js +0 -2
- package/lib/overlay-menu/helpers/types.d.ts +2 -2
- package/lib/overlay-menu/index.d.ts +1 -1
- package/lib/overlay-menu/index.js +44 -33
- package/lib/overlay-menu/managers/menu-manager.d.ts +10 -10
- package/lib/overlay-menu/managers/menu-manager.js +15 -13
- package/lib/overlay-menu/themes/halo/dark/index.js +0 -1
- package/lib/overlay-menu/themes/halo/light/index.js +0 -1
- package/lib/overlay-menu/themes/solar/charcoal/index.js +0 -1
- package/lib/overlay-menu/themes/solar/pearl/index.js +0 -1
- package/lib/pagination/index.d.ts +4 -4
- package/lib/pagination/index.js +39 -14
- package/lib/pagination/themes/halo/dark/index.js +0 -1
- package/lib/pagination/themes/halo/light/index.js +0 -1
- package/lib/pagination/themes/solar/charcoal/index.js +0 -1
- package/lib/pagination/themes/solar/pearl/index.js +0 -1
- package/lib/panel/index.js +1 -1
- package/lib/panel/themes/halo/dark/index.js +0 -1
- package/lib/panel/themes/halo/light/index.js +0 -1
- package/lib/panel/themes/solar/charcoal/index.js +0 -1
- package/lib/panel/themes/solar/pearl/index.js +0 -1
- package/lib/password-field/index.d.ts +2 -2
- package/lib/password-field/index.js +7 -4
- package/lib/password-field/themes/halo/dark/index.js +1 -2
- package/lib/password-field/themes/halo/light/index.js +1 -2
- package/lib/password-field/themes/solar/charcoal/index.js +1 -2
- package/lib/password-field/themes/solar/pearl/index.js +1 -2
- package/lib/pill/index.d.ts +1 -1
- package/lib/pill/index.js +22 -19
- package/lib/pill/themes/halo/dark/index.js +0 -1
- package/lib/pill/themes/halo/light/index.js +0 -1
- package/lib/pill/themes/solar/charcoal/index.js +0 -1
- package/lib/pill/themes/solar/pearl/index.js +0 -1
- package/lib/progress-bar/index.d.ts +1 -1
- package/lib/progress-bar/index.js +38 -37
- package/lib/progress-bar/themes/halo/dark/index.js +0 -1
- package/lib/progress-bar/themes/halo/light/index.js +0 -1
- package/lib/progress-bar/themes/solar/charcoal/index.js +0 -1
- package/lib/progress-bar/themes/solar/pearl/index.js +0 -1
- package/lib/radio-button/index.d.ts +2 -2
- package/lib/radio-button/index.js +17 -12
- package/lib/radio-button/radio-button-registry.js +8 -5
- package/lib/radio-button/themes/halo/dark/index.js +0 -1
- package/lib/radio-button/themes/halo/light/index.js +0 -1
- package/lib/radio-button/themes/solar/charcoal/index.js +0 -1
- package/lib/radio-button/themes/solar/pearl/index.js +0 -1
- package/lib/rating/index.d.ts +1 -1
- package/lib/rating/index.js +2 -5
- package/lib/rating/themes/halo/dark/index.js +0 -1
- package/lib/rating/themes/halo/light/index.js +0 -1
- package/lib/rating/themes/solar/charcoal/index.js +0 -1
- package/lib/rating/themes/solar/pearl/index.js +0 -1
- package/lib/rating/utils.d.ts +6 -6
- package/lib/rating/utils.js +6 -6
- package/lib/search-field/index.d.ts +2 -2
- package/lib/search-field/index.js +4 -4
- package/lib/search-field/themes/halo/dark/index.js +0 -1
- package/lib/search-field/themes/halo/light/index.js +0 -1
- package/lib/search-field/themes/solar/charcoal/index.js +0 -1
- package/lib/search-field/themes/solar/pearl/index.js +0 -1
- package/lib/select/index.d.ts +34 -34
- package/lib/select/index.js +70 -83
- package/lib/select/themes/halo/dark/index.js +0 -1
- package/lib/select/themes/halo/light/index.js +0 -1
- package/lib/select/themes/solar/charcoal/index.js +0 -1
- package/lib/select/themes/solar/pearl/index.js +0 -1
- package/lib/sidebar-layout/index.d.ts +2 -2
- package/lib/sidebar-layout/index.js +7 -9
- package/lib/sidebar-layout/themes/halo/dark/index.js +0 -1
- package/lib/sidebar-layout/themes/halo/light/index.js +0 -1
- package/lib/sidebar-layout/themes/solar/charcoal/index.js +0 -1
- package/lib/sidebar-layout/themes/solar/pearl/index.js +0 -1
- package/lib/slider/index.d.ts +2 -2
- package/lib/slider/index.js +72 -49
- package/lib/slider/themes/halo/dark/index.js +0 -1
- package/lib/slider/themes/halo/light/index.js +0 -1
- package/lib/slider/themes/solar/charcoal/index.js +0 -1
- package/lib/slider/themes/solar/pearl/index.js +0 -1
- package/lib/slider/utils.d.ts +10 -10
- package/lib/slider/utils.js +10 -10
- package/lib/sparkline/index.d.ts +1 -1
- package/lib/sparkline/index.js +7 -8
- package/lib/sparkline/themes/halo/dark/index.js +0 -1
- package/lib/sparkline/themes/halo/light/index.js +0 -1
- package/lib/sparkline/themes/solar/charcoal/index.js +0 -1
- package/lib/sparkline/themes/solar/pearl/index.js +0 -1
- package/lib/swing-gauge/helpers.js +2 -2
- package/lib/swing-gauge/index.d.ts +19 -19
- package/lib/swing-gauge/index.js +91 -81
- package/lib/swing-gauge/themes/halo/dark/index.js +0 -1
- package/lib/swing-gauge/themes/halo/light/index.js +0 -1
- package/lib/swing-gauge/themes/solar/charcoal/index.js +0 -1
- package/lib/swing-gauge/themes/solar/pearl/index.js +0 -1
- package/lib/tab/index.d.ts +1 -1
- package/lib/tab/index.js +16 -27
- package/lib/tab/themes/halo/dark/index.js +1 -2
- package/lib/tab/themes/halo/light/index.js +1 -2
- package/lib/tab/themes/solar/charcoal/index.js +1 -2
- package/lib/tab/themes/solar/pearl/index.js +1 -2
- package/lib/tab-bar/helpers/animate.js +1 -1
- package/lib/tab-bar/index.d.ts +1 -1
- package/lib/tab-bar/index.js +34 -18
- package/lib/tab-bar/themes/halo/dark/index.js +1 -2
- package/lib/tab-bar/themes/halo/light/index.js +1 -2
- package/lib/tab-bar/themes/solar/charcoal/index.js +0 -1
- package/lib/tab-bar/themes/solar/pearl/index.js +0 -1
- package/lib/text-field/index.d.ts +1 -1
- package/lib/text-field/index.js +36 -33
- package/lib/text-field/themes/halo/dark/index.js +0 -1
- package/lib/text-field/themes/halo/light/index.js +0 -1
- package/lib/text-field/themes/solar/charcoal/index.js +0 -1
- package/lib/text-field/themes/solar/pearl/index.js +0 -1
- package/lib/time-picker/index.d.ts +6 -6
- package/lib/time-picker/index.js +104 -90
- package/lib/time-picker/themes/halo/dark/index.js +0 -1
- package/lib/time-picker/themes/halo/light/index.js +0 -1
- package/lib/time-picker/themes/solar/charcoal/index.js +0 -1
- package/lib/time-picker/themes/solar/pearl/index.js +0 -1
- package/lib/toggle/index.d.ts +1 -1
- package/lib/toggle/index.js +4 -3
- package/lib/toggle/themes/halo/dark/index.js +1 -2
- package/lib/toggle/themes/halo/light/index.js +1 -2
- package/lib/toggle/themes/solar/charcoal/index.js +1 -2
- package/lib/toggle/themes/solar/pearl/index.js +1 -2
- package/lib/tooltip/elements/title-tooltip.js +2 -2
- package/lib/tooltip/helpers/renderer.d.ts +1 -1
- package/lib/tooltip/helpers/renderer.js +3 -3
- package/lib/tooltip/index.d.ts +27 -27
- package/lib/tooltip/index.js +42 -38
- package/lib/tooltip/managers/tooltip-manager.d.ts +1 -1
- package/lib/tooltip/themes/halo/dark/index.js +0 -1
- package/lib/tooltip/themes/halo/light/index.js +0 -1
- package/lib/tooltip/themes/solar/charcoal/index.js +0 -1
- package/lib/tooltip/themes/solar/pearl/index.js +0 -1
- package/lib/tornado-chart/elements/tornado-chart.d.ts +1 -1
- package/lib/tornado-chart/elements/tornado-chart.js +1 -1
- package/lib/tornado-chart/elements/tornado-item.d.ts +2 -2
- package/lib/tornado-chart/elements/tornado-item.js +12 -10
- package/lib/tornado-chart/themes/halo/dark/index.js +0 -2
- package/lib/tornado-chart/themes/halo/light/index.js +0 -2
- package/lib/tornado-chart/themes/solar/charcoal/index.js +0 -2
- package/lib/tornado-chart/themes/solar/pearl/index.js +0 -2
- package/lib/tree/elements/tree-item.d.ts +3 -3
- package/lib/tree/elements/tree-item.js +21 -19
- package/lib/tree/elements/tree.d.ts +1 -1
- package/lib/tree/elements/tree.js +12 -11
- package/lib/tree/helpers/renderer.js +4 -3
- package/lib/tree/index.d.ts +1 -1
- package/lib/tree/managers/tree-manager.d.ts +1 -1
- package/lib/tree/managers/tree-manager.js +17 -18
- package/lib/tree/themes/halo/dark/index.js +0 -2
- package/lib/tree/themes/halo/light/index.js +0 -2
- package/lib/tree/themes/solar/charcoal/index.js +1 -3
- package/lib/tree/themes/solar/pearl/index.js +1 -3
- package/lib/tree-select/index.d.ts +9 -9
- package/lib/tree-select/index.js +91 -82
- package/lib/tree-select/themes/halo/dark/index.js +1 -2
- package/lib/tree-select/themes/halo/light/index.js +1 -2
- package/lib/tree-select/themes/solar/charcoal/index.js +1 -2
- package/lib/tree-select/themes/solar/pearl/index.js +1 -2
- package/lib/version.js +1 -1
- package/package.json +19 -18
- package/tsconfig.tsbuildinfo +1 -0
- package/lib/config/custom-elements.json +0 -23
- package/lib/config/custom-elements.md +0 -8
- package/lib/config/helpers/context.js +0 -2
- package/lib/config/index.d.ts +0 -2
package/lib/header/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import { BasicElement,
|
|
2
|
+
import { BasicElement, CSSResultGroup, TemplateResult } from '@refinitiv-ui/core';
|
|
3
3
|
/**
|
|
4
4
|
* Use to identify and separate different sections of a page.
|
|
5
5
|
* Headers helps to organize the page layout content into
|
package/lib/header/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { BasicElement,
|
|
2
|
+
import { BasicElement, css, html } from '@refinitiv-ui/core';
|
|
3
3
|
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
|
|
4
4
|
import { property } from '@refinitiv-ui/core/decorators/property.js';
|
|
5
5
|
import { VERSION } from '../version.js';
|
|
@@ -40,7 +40,7 @@ let Header = class Header extends BasicElement {
|
|
|
40
40
|
margin-bottom: 0;
|
|
41
41
|
vertical-align: middle;
|
|
42
42
|
}
|
|
43
|
-
[part=
|
|
43
|
+
[part='label'] {
|
|
44
44
|
text-align: inherit;
|
|
45
45
|
}
|
|
46
46
|
`;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-header', styles: ':host{color:#ccc;padding:0 0 0 4px;height:28px;font-size:12px;font-family:inherit;white-space:nowrap;box-sizing:border-box;display:flex;align-items:center;overflow:hidden;background-color:#333;text-transform:uppercase}:host [part=spacer]{flex:none;width:4px}:host [part=label]{flex:1 1 auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-right:8px}:host ::slotted(ef-button[transparent]){color:inherit!important}:host([level="1"]){background-color:#404040}:host([level="3"]){background-color:#262626}:host([level="4"]){background-color:#1a1a1a}' }}));
|
|
1
|
+
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-header', styles: ':host{color:#ccc;padding:0 0 0 4px;height:28px;font-size:12px;font-family:inherit;white-space:nowrap;box-sizing:border-box;display:flex;align-items:center;overflow:hidden;background-color:#333;text-transform:uppercase}:host [part=spacer]{flex:none;width:4px}:host [part=label]{flex:1 1 auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-right:8px}:host ::slotted(ef-button[transparent]){color:inherit!important}:host([level=\'1\']){background-color:#404040}:host([level=\'3\']){background-color:#262626}:host([level=\'4\']){background-color:#1a1a1a}' }}));
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-header', styles: ':host{color:#0d0d0d;padding:0 0 0 4px;height:28px;font-size:12px;font-family:inherit;white-space:nowrap;box-sizing:border-box;display:flex;align-items:center;overflow:hidden;background-color:#e6e6e6;text-transform:uppercase}:host [part=spacer]{flex:none;width:4px}:host [part=label]{flex:1 1 auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-right:8px}:host ::slotted(ef-button[transparent]){color:inherit!important}:host([level="1"]){background-color:#d9d9d9}:host([level="3"]){background-color:#f2f2f2}:host([level="4"]){background-color:#fafafa}' }}));
|
|
1
|
+
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-header', styles: ':host{color:#0d0d0d;padding:0 0 0 4px;height:28px;font-size:12px;font-family:inherit;white-space:nowrap;box-sizing:border-box;display:flex;align-items:center;overflow:hidden;background-color:#e6e6e6;text-transform:uppercase}:host [part=spacer]{flex:none;width:4px}:host [part=label]{flex:1 1 auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-right:8px}:host ::slotted(ef-button[transparent]){color:inherit!important}:host([level=\'1\']){background-color:#d9d9d9}:host([level=\'3\']){background-color:#f2f2f2}:host([level=\'4\']){background-color:#fafafa}' }}));
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-header', styles: ':host{padding:0 0 0 5px;height:27px;font-size:14px;font-family:inherit;white-space:nowrap;box-sizing:border-box;display:flex;align-items:center;overflow:hidden;position:relative;color:#c2c2c2;background-color:#2e2e33}:host [part=spacer]{flex:none;width:5px}:host [part=label]{flex:1 1 auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-right:10px;font-weight:600;text-transform:uppercase}:host ::slotted(ef-button[transparent]){color:inherit!important}:host([level="3"]) [part=label]{text-transform:none}:host([level="1"]){color:#e2e2e2;background-color:#4a4a52;background-image:linear-gradient(rgba(255,255,255,.03) 0,rgba(255,255,255,0) 100%)}:host([level="3"]){color:#8c8c8c;background-color:#212124}' }}));
|
|
1
|
+
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-header', styles: ':host{padding:0 0 0 5px;height:27px;font-size:14px;font-family:inherit;white-space:nowrap;box-sizing:border-box;display:flex;align-items:center;overflow:hidden;position:relative;color:#c2c2c2;background-color:#2e2e33}:host [part=spacer]{flex:none;width:5px}:host [part=label]{flex:1 1 auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-right:10px;font-weight:600;text-transform:uppercase}:host ::slotted(ef-button[transparent]){color:inherit!important}:host([level=\'3\']) [part=label]{text-transform:none}:host([level=\'1\']){color:#e2e2e2;background-color:#4a4a52;background-image:linear-gradient(rgba(255,255,255,.03) 0,rgba(255,255,255,0) 100%)}:host([level=\'3\']){color:#8c8c8c;background-color:#212124}' }}));
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-header', styles: ':host{padding:0 0 0 5px;height:27px;font-size:14px;font-family:inherit;white-space:nowrap;box-sizing:border-box;display:flex;align-items:center;overflow:hidden;position:relative;color:#505050;background-color:#d0d4db}:host [part=spacer]{flex:none;width:5px}:host [part=label]{flex:1 1 auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-right:10px;font-weight:600;text-transform:uppercase}:host ::slotted(ef-button[transparent]){color:inherit!important}:host([level="3"]) [part=label]{text-transform:none}:host([level="1"]){color:#484848;background-color:#bec3cc;background-image:linear-gradient(rgba(255,255,255,.18) 0,rgba(255,255,255,0) 100%)}:host([level="3"]){color:#6e6e78;background-color:#e4e8ed}' }}));
|
|
1
|
+
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-header', styles: ':host{padding:0 0 0 5px;height:27px;font-size:14px;font-family:inherit;white-space:nowrap;box-sizing:border-box;display:flex;align-items:center;overflow:hidden;position:relative;color:#505050;background-color:#d0d4db}:host [part=spacer]{flex:none;width:5px}:host [part=label]{flex:1 1 auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-right:10px;font-weight:600;text-transform:uppercase}:host ::slotted(ef-button[transparent]){color:inherit!important}:host([level=\'3\']) [part=label]{text-transform:none}:host([level=\'1\']){color:#484848;background-color:#bec3cc;background-image:linear-gradient(rgba(255,255,255,.18) 0,rgba(255,255,255,0) 100%)}:host([level=\'3\']){color:#6e6e78;background-color:#e4e8ed}' }}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* istanbul ignore file */
|
|
2
|
-
import { color, rgb, hsl } from '@refinitiv-ui/utils/color.js';
|
|
3
2
|
import { interpolate } from 'd3-interpolate';
|
|
3
|
+
import { color, hsl, rgb } from '@refinitiv-ui/utils/color.js';
|
|
4
4
|
/**
|
|
5
5
|
* Check if the color is a light color
|
|
6
6
|
* @param col color to check
|
|
@@ -8,7 +8,7 @@ import { interpolate } from 'd3-interpolate';
|
|
|
8
8
|
*/
|
|
9
9
|
const isLight = (col) => {
|
|
10
10
|
const { r, g, b } = rgb(col);
|
|
11
|
-
return (
|
|
11
|
+
return (r * 299 + g * 587 + b * 114) / 1000 > 128;
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
14
|
* Brightens a color
|
|
@@ -58,9 +58,15 @@ const blend = (color1, color2, backgroundColor, amount) => {
|
|
|
58
58
|
mixBlueComponent = !mixBlueComponent;
|
|
59
59
|
}
|
|
60
60
|
const factor = 1 - Math.abs(amount);
|
|
61
|
-
const red = mixRedComponent
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
const red = mixRedComponent
|
|
62
|
+
? Math.round(interpolate(primaryColor.r, secondaryColor.r)(factor))
|
|
63
|
+
: primaryColor.r;
|
|
64
|
+
const green = mixGreenComponent
|
|
65
|
+
? Math.round(interpolate(primaryColor.g, secondaryColor.g)(factor))
|
|
66
|
+
: primaryColor.g;
|
|
67
|
+
const blue = mixBlueComponent
|
|
68
|
+
? Math.round(interpolate(primaryColor.b, secondaryColor.b)(factor))
|
|
69
|
+
: primaryColor.b;
|
|
64
70
|
return color(`rgb(${red}, ${green}, ${blue})`)?.toString() || '';
|
|
65
71
|
};
|
|
66
72
|
export { blend, brighten, darken, isLight, interpolate };
|
|
@@ -67,10 +67,10 @@ export class Track {
|
|
|
67
67
|
this._laneStarts[0] = 0;
|
|
68
68
|
if (trackSize && laneCount) {
|
|
69
69
|
let start = 0;
|
|
70
|
-
const laneSize =
|
|
70
|
+
const laneSize = trackSize / laneCount;
|
|
71
71
|
for (let i = 0; i < laneCount; ++i) {
|
|
72
72
|
const end = start + laneSize;
|
|
73
|
-
this._laneStarts[i] =
|
|
73
|
+
this._laneStarts[i] = start | 0;
|
|
74
74
|
this._laneSizes[i] = (end | 0) - (start | 0);
|
|
75
75
|
start = end;
|
|
76
76
|
}
|
|
@@ -121,7 +121,7 @@ export class Track {
|
|
|
121
121
|
*/
|
|
122
122
|
getContentSize(index) {
|
|
123
123
|
const contentSize = this.getLaneSize(index) - this._margin - this._margin;
|
|
124
|
-
return
|
|
124
|
+
return contentSize > 0 ? contentSize : 0;
|
|
125
125
|
}
|
|
126
126
|
/**
|
|
127
127
|
* Get content start position
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
type HeatmapConfig = {
|
|
2
|
-
data:
|
|
2
|
+
data: HeatmapCell[][];
|
|
3
3
|
yAxis?: HeatmapYAxis;
|
|
4
4
|
xAxis?: HeatmapXAxis;
|
|
5
5
|
};
|
|
@@ -13,18 +13,18 @@ type HeatmapYAxis = {
|
|
|
13
13
|
position: 'left' | 'right';
|
|
14
14
|
};
|
|
15
15
|
type HeatmapCell = {
|
|
16
|
-
rowIndex
|
|
17
|
-
colIndex
|
|
18
|
-
x
|
|
19
|
-
y
|
|
20
|
-
width
|
|
21
|
-
height
|
|
16
|
+
rowIndex?: number;
|
|
17
|
+
colIndex?: number;
|
|
18
|
+
x?: number;
|
|
19
|
+
y?: number;
|
|
20
|
+
width?: number;
|
|
21
|
+
height?: number;
|
|
22
22
|
value: number | null;
|
|
23
23
|
header?: string;
|
|
24
24
|
label?: string;
|
|
25
|
-
foregroundColor
|
|
26
|
-
defaultBackground
|
|
27
|
-
backgroundColor
|
|
25
|
+
foregroundColor?: string;
|
|
26
|
+
defaultBackground?: string;
|
|
27
|
+
backgroundColor?: string;
|
|
28
28
|
animationFrame?: number;
|
|
29
29
|
customLabel?: string;
|
|
30
30
|
customBackgroundColor?: string;
|
package/lib/heatmap/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import {
|
|
2
|
+
import { CSSResultGroup, PropertyValues, ResponsiveElement, TemplateResult } from '@refinitiv-ui/core';
|
|
3
3
|
import '../canvas/index.js';
|
|
4
4
|
import '../tooltip/index.js';
|
|
5
|
-
import type {
|
|
5
|
+
import type { HeatmapCell, HeatmapConfig, HeatmapCustomisableProperties, HeatmapRenderCallback, HeatmapTooltipCallback, HeatmapXAxis, HeatmapYAxis } from './helpers/types';
|
|
6
6
|
export type { HeatmapXAxis, HeatmapCell, HeatmapConfig, HeatmapYAxis, HeatmapCustomisableProperties, HeatmapTooltipCallback, HeatmapRenderCallback };
|
|
7
7
|
/**
|
|
8
8
|
* A graphical representation of data where the individual
|
|
@@ -239,9 +239,9 @@ export declare class Heatmap extends ResponsiveElement {
|
|
|
239
239
|
*/
|
|
240
240
|
private initialiseRowTrack;
|
|
241
241
|
/**
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
242
|
+
* Initialize column track
|
|
243
|
+
* @returns {void}
|
|
244
|
+
*/
|
|
245
245
|
private initialiseColumnTrack;
|
|
246
246
|
/**
|
|
247
247
|
* Hit testing on heatmap
|
|
@@ -404,10 +404,10 @@ export declare class Heatmap extends ResponsiveElement {
|
|
|
404
404
|
*/
|
|
405
405
|
private paintAllCellBackground;
|
|
406
406
|
/**
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
407
|
+
* Paints a single cell background colour
|
|
408
|
+
* @param {HeatmapCell} cell cell to paint
|
|
409
|
+
* @returns {void}
|
|
410
|
+
*/
|
|
411
411
|
private paintCellBackground;
|
|
412
412
|
/**
|
|
413
413
|
* Construct and renders x-axis
|
package/lib/heatmap/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { ResponsiveElement,
|
|
2
|
+
import { ResponsiveElement, css, html } from '@refinitiv-ui/core';
|
|
3
3
|
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
|
|
4
4
|
import { property } from '@refinitiv-ui/core/decorators/property.js';
|
|
5
5
|
import { query } from '@refinitiv-ui/core/decorators/query.js';
|
|
6
|
-
import { VERSION } from '../version.js';
|
|
7
6
|
import { MicroTaskRunner } from '@refinitiv-ui/utils/async.js';
|
|
8
7
|
import { color } from '@refinitiv-ui/utils/color.js';
|
|
9
8
|
import '../canvas/index.js';
|
|
10
9
|
import '../tooltip/index.js';
|
|
10
|
+
import { VERSION } from '../version.js';
|
|
11
|
+
import { blend, brighten, darken, interpolate, isLight } from './helpers/color.js';
|
|
12
|
+
import { MIN_FONT_SIZE, getMaximumTextWidth, getResponsiveFontSize } from './helpers/text.js';
|
|
11
13
|
import { Track } from './helpers/track.js';
|
|
12
|
-
import { blend, brighten, darken, isLight, interpolate } from './helpers/color.js';
|
|
13
|
-
import { getResponsiveFontSize, getMaximumTextWidth, MIN_FONT_SIZE } from './helpers/text.js';
|
|
14
14
|
const CELL_PADDING = 0.12;
|
|
15
15
|
const CELL_MAX_TEXT_WIDTH = 1 - CELL_PADDING;
|
|
16
16
|
const DEFAULT_CANVAS_RATIO = 0.75; // ratio — 4:3
|
|
@@ -37,13 +37,13 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
37
37
|
:host {
|
|
38
38
|
display: block;
|
|
39
39
|
}
|
|
40
|
-
#container{
|
|
40
|
+
#container {
|
|
41
41
|
width: 100%;
|
|
42
42
|
height: 100%;
|
|
43
43
|
display: flex;
|
|
44
44
|
}
|
|
45
45
|
#canvas-container {
|
|
46
|
-
min-width:0;
|
|
46
|
+
min-width: 0;
|
|
47
47
|
display: flex;
|
|
48
48
|
width: 100%;
|
|
49
49
|
flex-direction: column;
|
|
@@ -52,14 +52,14 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
52
52
|
#tooltip-overlay {
|
|
53
53
|
position: absolute;
|
|
54
54
|
}
|
|
55
|
-
[part=canvas] {
|
|
55
|
+
[part='canvas'] {
|
|
56
56
|
flex-grow: 1;
|
|
57
57
|
}
|
|
58
|
-
[part=x-axis] {
|
|
58
|
+
[part='x-axis'] {
|
|
59
59
|
display: flex;
|
|
60
60
|
align-items: center;
|
|
61
61
|
}
|
|
62
|
-
[part=y-axis]{
|
|
62
|
+
[part='y-axis'] {
|
|
63
63
|
display: flex;
|
|
64
64
|
flex-direction: column;
|
|
65
65
|
}
|
|
@@ -134,7 +134,7 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
134
134
|
*/
|
|
135
135
|
get columnCount() {
|
|
136
136
|
let result = 0;
|
|
137
|
-
this.rows?.forEach(columns => {
|
|
137
|
+
this.rows?.forEach((columns) => {
|
|
138
138
|
if (columns.length > result) {
|
|
139
139
|
result = columns.length;
|
|
140
140
|
}
|
|
@@ -268,14 +268,14 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
268
268
|
this.labelHiddenChanged();
|
|
269
269
|
}
|
|
270
270
|
// Re-paints whole canvas when at least one of the following properties changes
|
|
271
|
-
if (changedProperties.has('config')
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
271
|
+
if (changedProperties.has('config') ||
|
|
272
|
+
changedProperties.has('blend') ||
|
|
273
|
+
changedProperties.has('minPoint') ||
|
|
274
|
+
changedProperties.has('midPoint') ||
|
|
275
|
+
changedProperties.has('maxPoint') ||
|
|
276
|
+
changedProperties.has('saturation') ||
|
|
277
|
+
changedProperties.has('axisHidden') ||
|
|
278
|
+
changedProperties.has('labelWidth')) {
|
|
279
279
|
this.prepareAndPaint();
|
|
280
280
|
}
|
|
281
281
|
}
|
|
@@ -293,7 +293,8 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
293
293
|
*/
|
|
294
294
|
/* istanbul ignore next */
|
|
295
295
|
onMouseMove(event) {
|
|
296
|
-
if (event.composedPath().includes(this.canvas) ||
|
|
296
|
+
if (event.composedPath().includes(this.canvas) ||
|
|
297
|
+
(this.tooltipCallback && this.tooltipOverlay === event.target)) {
|
|
297
298
|
this.hoverCell = this.hitTest(event);
|
|
298
299
|
}
|
|
299
300
|
else {
|
|
@@ -315,15 +316,13 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
315
316
|
*/
|
|
316
317
|
onResize() {
|
|
317
318
|
this.updateTimer = 0;
|
|
318
|
-
if (!this.isSizeCalculated) {
|
|
319
|
-
if (this.offsetWidth || this.offsetHeight) {
|
|
320
|
-
this.isSizeCalculated = true;
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
319
|
if (this.isSizeCalculated) {
|
|
324
320
|
const spacing = parseFloat(this.getComputedVariable('--spacing', '0'));
|
|
325
321
|
this.cellMargin = spacing / 2;
|
|
326
322
|
}
|
|
323
|
+
else {
|
|
324
|
+
this.isSizeCalculated = Boolean(this.offsetWidth || this.offsetHeight);
|
|
325
|
+
}
|
|
327
326
|
// calculate responsive height
|
|
328
327
|
if (this.responsiveHeight || !this.offsetHeight) {
|
|
329
328
|
const width = this.offsetWidth;
|
|
@@ -348,9 +347,9 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
348
347
|
this.rowTrack.margin = this.cellMargin;
|
|
349
348
|
}
|
|
350
349
|
/**
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
350
|
+
* Initialize column track
|
|
351
|
+
* @returns {void}
|
|
352
|
+
*/
|
|
354
353
|
initialiseColumnTrack() {
|
|
355
354
|
this.colTrack.init(this.offsetWidth, this.columnCount);
|
|
356
355
|
this.colTrack.margin = this.cellMargin;
|
|
@@ -392,6 +391,12 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
392
391
|
*/
|
|
393
392
|
/* istanbul ignore next */
|
|
394
393
|
updateTooltipOverlayPosition(cell) {
|
|
394
|
+
if (cell.x === undefined ||
|
|
395
|
+
cell.y === undefined ||
|
|
396
|
+
cell.width === undefined ||
|
|
397
|
+
cell.height === undefined) {
|
|
398
|
+
return;
|
|
399
|
+
}
|
|
395
400
|
// Compensate x-axis height for overlay when x-axis is at top position
|
|
396
401
|
let marginOverlayTop = 0;
|
|
397
402
|
if (this.config?.xAxis && this.xAxis?.offsetHeight) {
|
|
@@ -411,7 +416,7 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
411
416
|
*/
|
|
412
417
|
/* istanbul ignore next */
|
|
413
418
|
hoverCellChanged(cell, previousCell) {
|
|
414
|
-
if (cell && cell.value !== null) {
|
|
419
|
+
if (cell && cell.value !== null && cell.backgroundColor) {
|
|
415
420
|
if (this.tooltipCallback) {
|
|
416
421
|
this.updateTooltipOverlayPosition(cell);
|
|
417
422
|
}
|
|
@@ -421,7 +426,7 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
421
426
|
this.fade(cell, cell.backgroundColor, fadedColor, 100);
|
|
422
427
|
}
|
|
423
428
|
// returns color of previous cell to default cell color
|
|
424
|
-
if (previousCell && previousCell.value !== null) {
|
|
429
|
+
if (previousCell && previousCell.value !== null && previousCell.backgroundColor) {
|
|
425
430
|
previousCell.foregroundColor = this.foregroundColor;
|
|
426
431
|
this.fade(previousCell, previousCell.backgroundColor, this.getBackgroundColor(previousCell.value), 300);
|
|
427
432
|
}
|
|
@@ -479,6 +484,12 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
479
484
|
*/
|
|
480
485
|
/* istanbul ignore next */
|
|
481
486
|
resetCell(cell) {
|
|
487
|
+
if (cell.x === undefined ||
|
|
488
|
+
cell.y === undefined ||
|
|
489
|
+
cell.width === undefined ||
|
|
490
|
+
cell.height === undefined) {
|
|
491
|
+
return;
|
|
492
|
+
}
|
|
482
493
|
this.canvasContext?.clearRect(cell.x, cell.y, cell.width, cell.height);
|
|
483
494
|
}
|
|
484
495
|
/**
|
|
@@ -495,6 +506,9 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
495
506
|
const start = performance.now();
|
|
496
507
|
const end = start + duration;
|
|
497
508
|
const fadingAnimation = (time) => {
|
|
509
|
+
if (cell.colIndex === undefined || cell.rowIndex === undefined) {
|
|
510
|
+
return;
|
|
511
|
+
}
|
|
498
512
|
cell.x = this.colTrack.getContentStart(cell.colIndex);
|
|
499
513
|
cell.y = this.rowTrack.getContentStart(cell.rowIndex);
|
|
500
514
|
cell.width = this.colTrack.getContentSize(cell.colIndex);
|
|
@@ -631,12 +645,18 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
631
645
|
* @returns {void}
|
|
632
646
|
*/
|
|
633
647
|
paintLabel(cell) {
|
|
648
|
+
if (!this.canvasContext ||
|
|
649
|
+
cell.x === undefined ||
|
|
650
|
+
cell.y === undefined ||
|
|
651
|
+
cell.width === undefined ||
|
|
652
|
+
cell.height === undefined ||
|
|
653
|
+
cell.foregroundColor === undefined) {
|
|
654
|
+
return;
|
|
655
|
+
}
|
|
634
656
|
const margin = cell.header ? this.calculateHeaderMargin(cell.height) : 0;
|
|
635
657
|
const label = typeof cell.customLabel === 'string' ? cell.customLabel : cell.label;
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
this.canvasContext.fillText(label || '', cell.x + cell.width / 2, (cell.y + 1 + cell.height / 2) + margin);
|
|
639
|
-
}
|
|
658
|
+
this.canvasContext.fillStyle = cell.customForegroundColor || cell.foregroundColor;
|
|
659
|
+
this.canvasContext.fillText(label || '', cell.x + cell.width / 2, cell.y + 1 + cell.height / 2 + margin);
|
|
640
660
|
}
|
|
641
661
|
/**
|
|
642
662
|
* Check if the text (label / header and label) can be paint on the cell
|
|
@@ -660,12 +680,15 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
660
680
|
canvas.textAlign = 'center';
|
|
661
681
|
canvas.textBaseline = 'middle';
|
|
662
682
|
canvas.font = `${fontSize}px ${fontFamily}`;
|
|
663
|
-
let isWithinMinCellWidth = (
|
|
683
|
+
let isWithinMinCellWidth = (this.labelWidth || getMaximumTextWidth(canvas, this.cells, this.hasCellHeader)) / contentWidth <=
|
|
684
|
+
CELL_MAX_TEXT_WIDTH;
|
|
664
685
|
// Tries to get the largest possible font size that is within `CELL_MAX_TEXT_WIDTH`
|
|
665
686
|
if (!isWithinMinCellWidth && fontSize !== MIN_FONT_SIZE) {
|
|
666
687
|
while (!isWithinMinCellWidth) {
|
|
667
688
|
canvas.font = `${fontSize}px ${fontFamily}`; // Should assigned new font size to canvas before calculated again.
|
|
668
|
-
isWithinMinCellWidth =
|
|
689
|
+
isWithinMinCellWidth =
|
|
690
|
+
(this.labelWidth || getMaximumTextWidth(canvas, this.cells, this.hasCellHeader)) / contentWidth <=
|
|
691
|
+
CELL_MAX_TEXT_WIDTH;
|
|
669
692
|
// Stops when reaches minimum font-size
|
|
670
693
|
if (fontSize === MIN_FONT_SIZE) {
|
|
671
694
|
break;
|
|
@@ -675,7 +698,9 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
675
698
|
}
|
|
676
699
|
}
|
|
677
700
|
}
|
|
678
|
-
const isWithinMinCellHeight = this.hasCellHeader
|
|
701
|
+
const isWithinMinCellHeight = this.hasCellHeader
|
|
702
|
+
? fontSize * 2 < contentHeight
|
|
703
|
+
: fontSize < contentHeight;
|
|
679
704
|
this.contentWithinCellBoundary = isWithinMinCellWidth && isWithinMinCellHeight;
|
|
680
705
|
return this.contentWithinCellBoundary;
|
|
681
706
|
}
|
|
@@ -727,10 +752,10 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
727
752
|
}
|
|
728
753
|
const saturateRatio = 1 - saturation;
|
|
729
754
|
if (value > this.midPoint) {
|
|
730
|
-
return ((value - this.midPoint) / (this.maxPoint - this.midPoint) * saturateRatio
|
|
755
|
+
return ((value - this.midPoint) / (this.maxPoint - this.midPoint)) * saturateRatio + saturation;
|
|
731
756
|
}
|
|
732
757
|
else {
|
|
733
|
-
return ((value - this.midPoint) / (this.midPoint - this.minPoint) * saturateRatio
|
|
758
|
+
return ((value - this.midPoint) / (this.midPoint - this.minPoint)) * saturateRatio - saturation;
|
|
734
759
|
}
|
|
735
760
|
}
|
|
736
761
|
/**
|
|
@@ -778,15 +803,21 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
778
803
|
* @returns {void}
|
|
779
804
|
*/
|
|
780
805
|
paintHeader(cell) {
|
|
781
|
-
if (this.canvasContext
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
this.canvasContext.font = labelFontStyle;
|
|
806
|
+
if (!this.canvasContext ||
|
|
807
|
+
cell.x === undefined ||
|
|
808
|
+
cell.y === undefined ||
|
|
809
|
+
cell.width === undefined ||
|
|
810
|
+
cell.height === undefined ||
|
|
811
|
+
cell.foregroundColor === undefined) {
|
|
812
|
+
return;
|
|
789
813
|
}
|
|
814
|
+
const labelFontStyle = this.canvasContext.font;
|
|
815
|
+
const margin = this.labelHidden ? 0 : this.calculateHeaderMargin(cell.height);
|
|
816
|
+
this.canvasContext.font = 'bold ' + labelFontStyle;
|
|
817
|
+
this.canvasContext.fillStyle = cell.customForegroundColor || cell.foregroundColor;
|
|
818
|
+
this.canvasContext.fillText(cell.header || '', cell.x + cell.width / 2, cell.y + 1 + cell.height / 2 - margin);
|
|
819
|
+
// Reverts font style to paint label correctly
|
|
820
|
+
this.canvasContext.font = labelFontStyle;
|
|
790
821
|
}
|
|
791
822
|
/**
|
|
792
823
|
* Paints header to all cells
|
|
@@ -823,15 +854,21 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
823
854
|
}
|
|
824
855
|
}
|
|
825
856
|
/**
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
857
|
+
* Paints a single cell background colour
|
|
858
|
+
* @param {HeatmapCell} cell cell to paint
|
|
859
|
+
* @returns {void}
|
|
860
|
+
*/
|
|
830
861
|
paintCellBackground(cell) {
|
|
831
|
-
if (this.canvasContext
|
|
832
|
-
|
|
833
|
-
|
|
862
|
+
if (!this.canvasContext ||
|
|
863
|
+
cell.x === undefined ||
|
|
864
|
+
cell.y === undefined ||
|
|
865
|
+
cell.width === undefined ||
|
|
866
|
+
cell.height === undefined ||
|
|
867
|
+
cell.backgroundColor === undefined) {
|
|
868
|
+
return;
|
|
834
869
|
}
|
|
870
|
+
this.canvasContext.fillStyle = cell.customBackgroundColor || cell.backgroundColor;
|
|
871
|
+
this.canvasContext.fillRect(cell.x, cell.y, cell.width, cell.height);
|
|
835
872
|
}
|
|
836
873
|
/**
|
|
837
874
|
* Construct and renders x-axis
|
|
@@ -947,7 +984,7 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
947
984
|
yAxisElement.removeChild(yAxisElement.lastChild);
|
|
948
985
|
}
|
|
949
986
|
}
|
|
950
|
-
this.rowTrack.init(this.offsetHeight - (this.crossBox.offsetHeight +
|
|
987
|
+
this.rowTrack.init(this.offsetHeight - (this.crossBox.offsetHeight + this.cellMargin * 2), this.rowCount);
|
|
951
988
|
// Clear yAxis element before re-create yAxis
|
|
952
989
|
while (yAxisElement.children.length > laneCount) {
|
|
953
990
|
if (yAxisElement.lastChild) {
|
|
@@ -992,7 +1029,6 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
992
1029
|
if (this.hoverCell && this.canvasContext && this.tooltipCallback) {
|
|
993
1030
|
return this.tooltipCallback(this.hoverCell);
|
|
994
1031
|
}
|
|
995
|
-
return undefined;
|
|
996
1032
|
}
|
|
997
1033
|
/**
|
|
998
1034
|
* Checks if the tooltip should display or not
|
|
@@ -1011,20 +1047,23 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
1011
1047
|
render() {
|
|
1012
1048
|
return html `
|
|
1013
1049
|
<div id="container" @mousemove=${this.onMouseMove} @mouseleave=${this.onMouseLeave}>
|
|
1014
|
-
${this.config?.yAxis && !this.axisHidden
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1050
|
+
${this.config?.yAxis && !this.axisHidden
|
|
1051
|
+
? html ` <div id="y-axis-container">
|
|
1052
|
+
<div part="cross-box"></div>
|
|
1053
|
+
<div part="y-axis"></div>
|
|
1054
|
+
</div>`
|
|
1055
|
+
: null}
|
|
1019
1056
|
<div id="canvas-container">
|
|
1020
1057
|
${this.config?.xAxis && !this.axisHidden ? html `<div part="x-axis"></div>` : null}
|
|
1021
1058
|
<ef-canvas part="canvas" @resize=${this.onCanvasResize}></ef-canvas>
|
|
1022
1059
|
${this.tooltipCallback ? html `<div id="tooltip-overlay"></div>` : null}
|
|
1023
1060
|
</div>
|
|
1024
1061
|
</div>
|
|
1025
|
-
${this.tooltipCallback
|
|
1026
|
-
|
|
1027
|
-
|
|
1062
|
+
${this.tooltipCallback
|
|
1063
|
+
? html `
|
|
1064
|
+
<ef-tooltip .condition=${this.tooltipCondition} .renderer=${this.tooltipRenderer}></ef-tooltip>
|
|
1065
|
+
`
|
|
1066
|
+
: null}
|
|
1028
1067
|
`;
|
|
1029
1068
|
}
|
|
1030
1069
|
};
|
|
@@ -1060,10 +1099,10 @@ __decorate([
|
|
|
1060
1099
|
property({ type: Number })
|
|
1061
1100
|
], Heatmap.prototype, "saturation", void 0);
|
|
1062
1101
|
__decorate([
|
|
1063
|
-
property({
|
|
1102
|
+
property({ attribute: false })
|
|
1064
1103
|
], Heatmap.prototype, "tooltipCallback", void 0);
|
|
1065
1104
|
__decorate([
|
|
1066
|
-
property({
|
|
1105
|
+
property({ attribute: false })
|
|
1067
1106
|
], Heatmap.prototype, "renderCallback", void 0);
|
|
1068
1107
|
__decorate([
|
|
1069
1108
|
query('[part=canvas]', true)
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import '@refinitiv-ui/elements/canvas/themes/halo/dark';
|
|
2
2
|
import '@refinitiv-ui/elements/tooltip/themes/halo/dark';
|
|
3
|
-
|
|
4
3
|
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-heatmap', styles: ':host{--spacing:2;--below-point-color:#F5475B;--mid-point-color:#1A1A1A;--above-point-color:#39C46E;background-color:#1a1a1a;--below-point-color:#F5475B;--mid-point-color:#FFFFFF;--above-point-color:#39C46E}:host .x-axis-item{padding:4px 0}:host .y-axis-item{padding:0 4px}:host .x-axis-item,:host .y-axis-item,:host [part=cross-box]{color:#ccc;background-color:#1a1a1a;font-weight:600}:host [part=canvas]{color:#000}' }}));
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import '@refinitiv-ui/elements/canvas/themes/halo/light';
|
|
2
2
|
import '@refinitiv-ui/elements/tooltip/themes/halo/light';
|
|
3
|
-
|
|
4
3
|
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-heatmap', styles: ':host{--spacing:2;--below-point-color:#B63243;--mid-point-color:#FAFAFA;--above-point-color:#246B3E;background-color:#fafafa;--below-point-color:#D94255;--mid-point-color:#FFFFFF;--above-point-color:#309054}:host .x-axis-item{padding:4px 0}:host .y-axis-item{padding:0 4px}:host .x-axis-item,:host .y-axis-item,:host [part=cross-box]{color:#1a1a1a;background-color:#fff;font-weight:600}:host [part=canvas]{color:#fff}' }}));
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import '@refinitiv-ui/elements/canvas/themes/solar/charcoal';
|
|
2
2
|
import '@refinitiv-ui/elements/tooltip/themes/solar/charcoal';
|
|
3
|
-
|
|
4
3
|
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-heatmap', styles: ':host{--spacing:2;--below-point-color:#F5475B;--mid-point-color:#1A1A1C;--above-point-color:#39C46E;background-color:#1a1a1c}:host [part=canvas]{color:rgba(255,255,255,.8)}:host .x-axis-item{padding:4px 0}:host .y-axis-item{padding:0 4px}:host .x-axis-item,:host .y-axis-item,:host [part=cross-box]{background-color:#212124;color:#c2c2c2}' }}));
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import '@refinitiv-ui/elements/canvas/themes/solar/pearl';
|
|
2
2
|
import '@refinitiv-ui/elements/tooltip/themes/solar/pearl';
|
|
3
|
-
|
|
4
3
|
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-heatmap', styles: ':host{--spacing:2;--below-point-color:#D94255;--mid-point-color:#FFFFFF;--above-point-color:#309054;background-color:#fff}:host [part=canvas]{color:rgba(0,0,0,.8)}:host .x-axis-item{padding:4px 0}:host .y-axis-item{padding:0 4px}:host .x-axis-item,:host .y-axis-item,:host [part=cross-box]{background-color:#e4e8ed;color:#484848}' }}));
|
|
@@ -8,12 +8,6 @@
|
|
|
8
8
|
"name": "icon",
|
|
9
9
|
"description": "Name of a known icon to render or URL of SVG icon.",
|
|
10
10
|
"type": "string | null"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"name": "src",
|
|
14
|
-
"description": "Src location of an svg icon.",
|
|
15
|
-
"type": "string | null",
|
|
16
|
-
"deprecatedMessage": "Use `icon` instead"
|
|
17
11
|
}
|
|
18
12
|
],
|
|
19
13
|
"properties": [
|
|
@@ -22,13 +16,6 @@
|
|
|
22
16
|
"attribute": "icon",
|
|
23
17
|
"description": "Name of a known icon to render or URL of SVG icon.",
|
|
24
18
|
"type": "string | null"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"name": "src",
|
|
28
|
-
"attribute": "src",
|
|
29
|
-
"description": "Src location of an svg icon.",
|
|
30
|
-
"type": "string | null",
|
|
31
|
-
"deprecatedMessage": "Use `icon` instead"
|
|
32
19
|
}
|
|
33
20
|
]
|
|
34
21
|
}
|
|
@@ -5,4 +5,3 @@
|
|
|
5
5
|
| Property | Attribute | Type | Default | Description |
|
|
6
6
|
|----------|-----------|------------------|---------|--------------------------------------------------|
|
|
7
7
|
| `icon` | `icon` | `string \| null` | null | Name of a known icon to render or URL of SVG icon. |
|
|
8
|
-
| `src` | `src` | `string \| null` | null | Src location of an svg icon. |
|