@refinitiv-ui/elements 7.0.0-next.5 → 7.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +202 -420
- package/LICENSE +2 -2
- package/README.md +13 -11
- package/cli.mjs +5 -3
- 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 +80 -80
- 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 +156 -123
- 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 +1 -1
- 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/elements/chart.d.ts +4 -4
- package/lib/chart/elements/chart.js +39 -33
- package/lib/chart/plugins/doughnut-center-label.d.ts +3 -3
- package/lib/chart/plugins/doughnut-center-label.js +13 -9
- 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 +27 -18
- 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/elements/configuration.d.ts +1 -1
- package/lib/configuration/elements/configuration.js +2 -2
- 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 +150 -131
- 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/draggable-element.js +1 -2
- package/lib/dialog/index.d.ts +5 -5
- package/lib/dialog/index.js +51 -47
- 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/index.d.ts +1 -1
- package/lib/flag/index.js +7 -7
- 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/index.d.ts +9 -9
- package/lib/heatmap/index.js +51 -42
- 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/index.d.ts +2 -2
- package/lib/icon/index.js +9 -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/interactive-chart/helpers/types.d.ts +3 -3
- package/lib/interactive-chart/index.d.ts +29 -29
- package/lib/interactive-chart/index.js +69 -55
- 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 +10 -7
- 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 +19 -13
- package/lib/notification/helpers/status.js +1 -1
- package/lib/notification/themes/halo/dark/index.js +0 -2
- package/lib/notification/themes/halo/light/index.js +0 -2
- package/lib/notification/themes/solar/charcoal/index.js +0 -2
- package/lib/notification/themes/solar/pearl/index.js +0 -2
- package/lib/number-field/index.d.ts +5 -6
- package/lib/number-field/index.js +37 -47
- 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 +152 -96
- 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 +14 -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 +6 -3
- 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 +69 -82
- 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 +57 -45
- 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 +34 -31
- 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 +103 -89
- 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 +0 -1
- package/lib/toggle/themes/halo/light/index.js +0 -1
- package/lib/toggle/themes/solar/charcoal/index.js +0 -1
- package/lib/toggle/themes/solar/pearl/index.js +0 -1
- package/lib/tooltip/elements/title-tooltip.js +2 -2
- 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 +2 -2
- 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 +17 -16
- package/tsconfig.tsbuildinfo +1 -0
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
|
}
|
|
@@ -133,7 +133,7 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
133
133
|
*/
|
|
134
134
|
get columnCount() {
|
|
135
135
|
let result = 0;
|
|
136
|
-
this.rows?.forEach(columns => {
|
|
136
|
+
this.rows?.forEach((columns) => {
|
|
137
137
|
if (columns.length > result) {
|
|
138
138
|
result = columns.length;
|
|
139
139
|
}
|
|
@@ -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
|
/* c8 ignore start */
|
|
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 {
|
|
@@ -350,9 +351,9 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
350
351
|
this.rowTrack.margin = this.cellMargin;
|
|
351
352
|
}
|
|
352
353
|
/**
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
354
|
+
* Initialize column track
|
|
355
|
+
* @returns {void}
|
|
356
|
+
*/
|
|
356
357
|
initialiseColumnTrack() {
|
|
357
358
|
this.colTrack.init(this.offsetWidth, this.columnCount);
|
|
358
359
|
this.colTrack.margin = this.cellMargin;
|
|
@@ -644,7 +645,7 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
644
645
|
const label = typeof cell.customLabel === 'string' ? cell.customLabel : cell.label;
|
|
645
646
|
if (this.canvasContext) {
|
|
646
647
|
this.canvasContext.fillStyle = cell.customForegroundColor || cell.foregroundColor;
|
|
647
|
-
this.canvasContext.fillText(label || '', cell.x + cell.width / 2,
|
|
648
|
+
this.canvasContext.fillText(label || '', cell.x + cell.width / 2, cell.y + 1 + cell.height / 2 + margin);
|
|
648
649
|
}
|
|
649
650
|
}
|
|
650
651
|
/**
|
|
@@ -669,12 +670,15 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
669
670
|
canvas.textAlign = 'center';
|
|
670
671
|
canvas.textBaseline = 'middle';
|
|
671
672
|
canvas.font = `${fontSize}px ${fontFamily}`;
|
|
672
|
-
let isWithinMinCellWidth = (
|
|
673
|
+
let isWithinMinCellWidth = (this.labelWidth || getMaximumTextWidth(canvas, this.cells, this.hasCellHeader)) / contentWidth <=
|
|
674
|
+
CELL_MAX_TEXT_WIDTH;
|
|
673
675
|
// Tries to get the largest possible font size that is within `CELL_MAX_TEXT_WIDTH`
|
|
674
676
|
if (!isWithinMinCellWidth && fontSize !== MIN_FONT_SIZE) {
|
|
675
677
|
while (!isWithinMinCellWidth) {
|
|
676
678
|
canvas.font = `${fontSize}px ${fontFamily}`; // Should assigned new font size to canvas before calculated again.
|
|
677
|
-
isWithinMinCellWidth =
|
|
679
|
+
isWithinMinCellWidth =
|
|
680
|
+
(this.labelWidth || getMaximumTextWidth(canvas, this.cells, this.hasCellHeader)) / contentWidth <=
|
|
681
|
+
CELL_MAX_TEXT_WIDTH;
|
|
678
682
|
// Stops when reaches minimum font-size
|
|
679
683
|
if (fontSize === MIN_FONT_SIZE) {
|
|
680
684
|
break;
|
|
@@ -684,7 +688,9 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
684
688
|
}
|
|
685
689
|
}
|
|
686
690
|
}
|
|
687
|
-
const isWithinMinCellHeight = this.hasCellHeader
|
|
691
|
+
const isWithinMinCellHeight = this.hasCellHeader
|
|
692
|
+
? fontSize * 2 < contentHeight
|
|
693
|
+
: fontSize < contentHeight;
|
|
688
694
|
this.contentWithinCellBoundary = isWithinMinCellWidth && isWithinMinCellHeight;
|
|
689
695
|
return this.contentWithinCellBoundary;
|
|
690
696
|
}
|
|
@@ -738,10 +744,10 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
738
744
|
}
|
|
739
745
|
const saturateRatio = 1 - saturation;
|
|
740
746
|
if (value > this.midPoint) {
|
|
741
|
-
return ((value - this.midPoint) / (this.maxPoint - this.midPoint) * saturateRatio
|
|
747
|
+
return ((value - this.midPoint) / (this.maxPoint - this.midPoint)) * saturateRatio + saturation;
|
|
742
748
|
}
|
|
743
749
|
else {
|
|
744
|
-
return ((value - this.midPoint) / (this.midPoint - this.minPoint) * saturateRatio
|
|
750
|
+
return ((value - this.midPoint) / (this.midPoint - this.minPoint)) * saturateRatio - saturation;
|
|
745
751
|
}
|
|
746
752
|
}
|
|
747
753
|
/* c8 ignore stop */
|
|
@@ -795,7 +801,7 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
795
801
|
const margin = this.labelHidden ? 0 : this.calculateHeaderMargin(cell.height);
|
|
796
802
|
this.canvasContext.font = 'bold ' + labelFontStyle;
|
|
797
803
|
this.canvasContext.fillStyle = cell.customForegroundColor || cell.foregroundColor;
|
|
798
|
-
this.canvasContext.fillText(cell.header || '', cell.x + cell.width / 2,
|
|
804
|
+
this.canvasContext.fillText(cell.header || '', cell.x + cell.width / 2, cell.y + 1 + cell.height / 2 - margin);
|
|
799
805
|
// Reverts font style to paint label correctly
|
|
800
806
|
this.canvasContext.font = labelFontStyle;
|
|
801
807
|
}
|
|
@@ -836,10 +842,10 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
836
842
|
}
|
|
837
843
|
}
|
|
838
844
|
/**
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
845
|
+
* Paints a single cell background colour
|
|
846
|
+
* @param {HeatmapCell} cell cell to paint
|
|
847
|
+
* @returns {void}
|
|
848
|
+
*/
|
|
843
849
|
paintCellBackground(cell) {
|
|
844
850
|
if (this.canvasContext) {
|
|
845
851
|
this.canvasContext.fillStyle = cell.customBackgroundColor || cell.backgroundColor;
|
|
@@ -960,7 +966,7 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
960
966
|
yAxisElement.removeChild(yAxisElement.lastChild);
|
|
961
967
|
}
|
|
962
968
|
}
|
|
963
|
-
this.rowTrack.init(this.offsetHeight - (this.crossBox.offsetHeight +
|
|
969
|
+
this.rowTrack.init(this.offsetHeight - (this.crossBox.offsetHeight + this.cellMargin * 2), this.rowCount);
|
|
964
970
|
// Clear yAxis element before re-create yAxis
|
|
965
971
|
while (yAxisElement.children.length > laneCount) {
|
|
966
972
|
if (yAxisElement.lastChild) {
|
|
@@ -1026,20 +1032,23 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
1026
1032
|
render() {
|
|
1027
1033
|
return html `
|
|
1028
1034
|
<div id="container" @mousemove=${this.onMouseMove} @mouseleave=${this.onMouseLeave}>
|
|
1029
|
-
${this.config?.yAxis && !this.axisHidden
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1035
|
+
${this.config?.yAxis && !this.axisHidden
|
|
1036
|
+
? html ` <div id="y-axis-container">
|
|
1037
|
+
<div part="cross-box"></div>
|
|
1038
|
+
<div part="y-axis"></div>
|
|
1039
|
+
</div>`
|
|
1040
|
+
: null}
|
|
1034
1041
|
<div id="canvas-container">
|
|
1035
1042
|
${this.config?.xAxis && !this.axisHidden ? html `<div part="x-axis"></div>` : null}
|
|
1036
1043
|
<ef-canvas part="canvas" @resize=${this.onCanvasResize}></ef-canvas>
|
|
1037
1044
|
${this.tooltipCallback ? html `<div id="tooltip-overlay"></div>` : null}
|
|
1038
1045
|
</div>
|
|
1039
1046
|
</div>
|
|
1040
|
-
${this.tooltipCallback
|
|
1041
|
-
|
|
1042
|
-
|
|
1047
|
+
${this.tooltipCallback
|
|
1048
|
+
? html `
|
|
1049
|
+
<ef-tooltip .condition=${this.tooltipCondition} .renderer=${this.tooltipRenderer}></ef-tooltip>
|
|
1050
|
+
`
|
|
1051
|
+
: null}
|
|
1043
1052
|
`;
|
|
1044
1053
|
}
|
|
1045
1054
|
};
|
|
@@ -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}' }}));
|
package/lib/icon/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import { BasicElement, CSSResultGroup,
|
|
3
|
-
import {
|
|
2
|
+
import { BasicElement, CSSResultGroup, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
|
|
3
|
+
import type { Config } from '../configuration/index.js';
|
|
4
4
|
export declare class Icon extends BasicElement {
|
|
5
5
|
/**
|
|
6
6
|
* Element version number
|
package/lib/icon/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import {
|
|
2
|
+
import { consume } from '@lit-labs/context';
|
|
3
|
+
import { BasicElement, css, svg } from '@refinitiv-ui/core';
|
|
3
4
|
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
|
|
4
5
|
import { property } from '@refinitiv-ui/core/decorators/property.js';
|
|
5
6
|
import { unsafeSVG } from '@refinitiv-ui/core/directives/unsafe-svg.js';
|
|
6
|
-
import { Deferred,
|
|
7
|
+
import { Deferred, isBase64svg, isUrl } from '@refinitiv-ui/utils/loader.js';
|
|
8
|
+
import { efConfig } from '../configuration/index.js';
|
|
7
9
|
import { VERSION } from '../version.js';
|
|
8
10
|
import { IconLoader } from './utils/IconLoader.js';
|
|
9
|
-
import { consume } from '@lit-labs/context';
|
|
10
|
-
import { efConfig } from '../configuration/index.js';
|
|
11
11
|
import { SpriteLoader } from './utils/SpriteLoader.js';
|
|
12
12
|
const EmptyTemplate = svg ``;
|
|
13
13
|
/**
|
|
@@ -80,7 +80,7 @@ let Icon = class Icon extends BasicElement {
|
|
|
80
80
|
this._template = EmptyTemplate;
|
|
81
81
|
this.iconReady = new Deferred();
|
|
82
82
|
// `iconReady` resolves at this stage so that `updateComplete` would be resolvable
|
|
83
|
-
// even in the case that
|
|
83
|
+
// even in the case that `icon` attribute is missing.
|
|
84
84
|
this.iconReady.resolve();
|
|
85
85
|
}
|
|
86
86
|
/**
|
|
@@ -88,7 +88,7 @@ let Icon = class Icon extends BasicElement {
|
|
|
88
88
|
* @returns icon map if exists
|
|
89
89
|
*/
|
|
90
90
|
get iconMap() {
|
|
91
|
-
return this.icon && this.config?.icon.map[this.icon] || null;
|
|
91
|
+
return (this.icon && this.config?.icon.map[this.icon]) || null;
|
|
92
92
|
}
|
|
93
93
|
/**
|
|
94
94
|
* Called after the component is first rendered
|
|
@@ -122,7 +122,7 @@ let Icon = class Icon extends BasicElement {
|
|
|
122
122
|
if (!this._icon) {
|
|
123
123
|
return false;
|
|
124
124
|
}
|
|
125
|
-
if (this.iconMap &&
|
|
125
|
+
if (this.iconMap && !isBase64svg(this.iconMap) && !isUrl(this.iconMap)) {
|
|
126
126
|
return false;
|
|
127
127
|
}
|
|
128
128
|
return true;
|
|
@@ -155,8 +155,7 @@ let Icon = class Icon extends BasicElement {
|
|
|
155
155
|
async loadAndRenderIcon(src) {
|
|
156
156
|
const iconTemplateCacheItem = iconTemplateCache.get(src);
|
|
157
157
|
if (!iconTemplateCacheItem) {
|
|
158
|
-
iconTemplateCache.set(src, IconLoader.loadSVG(src)
|
|
159
|
-
.then(body => svg `${unsafeSVG(body)}`));
|
|
158
|
+
iconTemplateCache.set(src, IconLoader.loadSVG(src).then((body) => svg `${unsafeSVG(body)}`));
|
|
160
159
|
return this.loadAndRenderIcon(src); // Load again and await cache result
|
|
161
160
|
}
|
|
162
161
|
this.template = await iconTemplateCacheItem;
|
|
@@ -170,8 +169,7 @@ let Icon = class Icon extends BasicElement {
|
|
|
170
169
|
async loadAndRenderSpriteIcon(iconName) {
|
|
171
170
|
const iconTemplateCacheItem = iconTemplateCache.get(iconName);
|
|
172
171
|
if (!iconTemplateCacheItem) {
|
|
173
|
-
iconTemplateCache.set(iconName, SpriteLoader.loadSpriteSVG(iconName)
|
|
174
|
-
.then(body => svg `${unsafeSVG(body)}`));
|
|
172
|
+
iconTemplateCache.set(iconName, SpriteLoader.loadSpriteSVG(iconName).then((body) => svg `${unsafeSVG(body)}`));
|
|
175
173
|
return this.loadAndRenderIcon(iconName); // Load again and await cache result
|
|
176
174
|
}
|
|
177
175
|
this.template = await iconTemplateCacheItem;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
1
|
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-icon', styles: ':host{--cdn-sprite-prefix:\'https://cdn.refinitiv.com/public/libs/elf/assets/elf-theme-halo/resources/sprites/icons.svg\';--cdn-sprite-prefix:\'https://cdn.refinitiv.com/public/libs/elf/assets/elf-theme-halo/resources/sprites/icons.svg\';font-size:16px}:host circle[fill]:not([fill=none]),:host ellipse[fill]:not([fill=none]),:host g[fill]:not([fill=none]),:host line[fill]:not([fill=none]),:host path[fill]:not([fill=none]),:host polygon[fill]:not([fill=none]),:host polyline[fill]:not([fill=none]),:host rect[fill]:not([fill=none]){fill:currentColor}:host circle[stroke]:not([stroke=none]),:host ellipse[stroke]:not([stroke=none]),:host g[stroke]:not([stroke=none]),:host line[stroke]:not([stroke=none]),:host path[stroke]:not([stroke=none]),:host polygon[stroke]:not([stroke=none]),:host polyline[stroke]:not([stroke=none]),:host rect[stroke]:not([stroke=none]){stroke:currentColor}:host([icon=powerpoint]){color:#ff3535}:host([icon=excel]){color:#00a626}:host([icon=pdf]){color:#ff3535}:host([icon=word]){color:#0094c4}:host([icon=twitter]){color:#1da1f2}:host([focused=visible]){outline:#334bff solid 1px}:host([icon]) circle,:host([icon]) ellipse,:host([icon]) g,:host([icon]) line,:host([icon]) path,:host([icon]) polygon,:host([icon]) polyline,:host([icon]) rect{vector-effect:non-scaling-stroke}' }}));
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
1
|
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-icon', styles: ':host{--cdn-sprite-prefix:\'https://cdn.refinitiv.com/public/libs/elf/assets/elf-theme-halo/resources/sprites/icons.svg\';--cdn-sprite-prefix:\'https://cdn.refinitiv.com/public/libs/elf/assets/elf-theme-halo/resources/sprites/icons.svg\';font-size:16px}:host circle[fill]:not([fill=none]),:host ellipse[fill]:not([fill=none]),:host g[fill]:not([fill=none]),:host line[fill]:not([fill=none]),:host path[fill]:not([fill=none]),:host polygon[fill]:not([fill=none]),:host polyline[fill]:not([fill=none]),:host rect[fill]:not([fill=none]){fill:currentColor}:host circle[stroke]:not([stroke=none]),:host ellipse[stroke]:not([stroke=none]),:host g[stroke]:not([stroke=none]),:host line[stroke]:not([stroke=none]),:host path[stroke]:not([stroke=none]),:host polygon[stroke]:not([stroke=none]),:host polyline[stroke]:not([stroke=none]),:host rect[stroke]:not([stroke=none]){stroke:currentColor}:host([icon=powerpoint]){color:#ff3535}:host([icon=excel]){color:#00a626}:host([icon=pdf]){color:#ff3535}:host([icon=word]){color:#0094c4}:host([icon=twitter]){color:#1da1f2}:host([focused=visible]){outline:#334bff solid 1px}:host([icon]) circle,:host([icon]) ellipse,:host([icon]) g,:host([icon]) line,:host([icon]) path,:host([icon]) polygon,:host([icon]) polyline,:host([icon]) rect{vector-effect:non-scaling-stroke}' }}));
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
1
|
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-icon', styles: ':host{--cdn-sprite-prefix:\'https://cdn.refinitiv.com/public/libs/elf/assets/elf-theme-halo/resources/sprites/icons.svg\';--cdn-sprite-prefix:\'https://cdn.refinitiv.com/public/libs/elf/assets/elf-theme-solar/resources/sprites/icons.svg\'}:host circle[fill]:not([fill=none]),:host ellipse[fill]:not([fill=none]),:host g[fill]:not([fill=none]),:host line[fill]:not([fill=none]),:host path[fill]:not([fill=none]),:host polygon[fill]:not([fill=none]),:host polyline[fill]:not([fill=none]),:host rect[fill]:not([fill=none]){fill:currentColor}:host circle[stroke]:not([stroke=none]),:host ellipse[stroke]:not([stroke=none]),:host g[stroke]:not([stroke=none]),:host line[stroke]:not([stroke=none]),:host path[stroke]:not([stroke=none]),:host polygon[stroke]:not([stroke=none]),:host polyline[stroke]:not([stroke=none]),:host rect[stroke]:not([stroke=none]){stroke:currentColor}:host([icon=powerpoint]){color:#ff3535}:host([icon=excel]){color:#00a626}:host([icon=pdf]){color:#ff3535}:host([icon=word]){color:#0094c4}:host([icon=twitter]){color:#1da1f2}:host([focused=visible]){outline:#f93 solid 1px}' }}));
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
1
|
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-icon', styles: ':host{--cdn-sprite-prefix:\'https://cdn.refinitiv.com/public/libs/elf/assets/elf-theme-halo/resources/sprites/icons.svg\';--cdn-sprite-prefix:\'https://cdn.refinitiv.com/public/libs/elf/assets/elf-theme-solar/resources/sprites/icons.svg\'}:host circle[fill]:not([fill=none]),:host ellipse[fill]:not([fill=none]),:host g[fill]:not([fill=none]),:host line[fill]:not([fill=none]),:host path[fill]:not([fill=none]),:host polygon[fill]:not([fill=none]),:host polyline[fill]:not([fill=none]),:host rect[fill]:not([fill=none]){fill:currentColor}:host circle[stroke]:not([stroke=none]),:host ellipse[stroke]:not([stroke=none]),:host g[stroke]:not([stroke=none]),:host line[stroke]:not([stroke=none]),:host path[stroke]:not([stroke=none]),:host polygon[stroke]:not([stroke=none]),:host polyline[stroke]:not([stroke=none]),:host rect[stroke]:not([stroke=none]){stroke:currentColor}:host([icon=powerpoint]){color:#ff3535}:host([icon=excel]){color:#00a626}:host([icon=pdf]){color:#ff3535}:host([icon=word]){color:#0094c4}:host([icon=twitter]){color:#1da1f2}:host([focused=visible]){outline:#ffb266 solid 1px}' }}));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { HSLColor, RGBColor } from '@refinitiv-ui/utils/color.js';
|
|
2
|
+
import type { AreaSeriesPartialOptions, AreaStyleOptions, BarData, BarSeriesPartialOptions, BarStyleOptions, CandlestickSeriesPartialOptions, CandlestickStyleOptions, ChartOptions, DeepPartial, HistogramData, HistogramSeriesPartialOptions, HistogramStyleOptions, ISeriesApi, LineData, LineSeriesPartialOptions, LineStyleOptions, SeriesPartialOptions, SeriesType } from 'lightweight-charts';
|
|
3
3
|
type SeriesOptions = AreaSeriesPartialOptions | BarSeriesPartialOptions | CandlestickSeriesPartialOptions | HistogramSeriesPartialOptions | LineSeriesPartialOptions;
|
|
4
4
|
type SeriesStyleOptions = LineStyleOptions & AreaStyleOptions & BarStyleOptions & CandlestickStyleOptions & HistogramStyleOptions;
|
|
5
5
|
type SeriesData = LineData[] | BarData[] | HistogramData[];
|
|
@@ -43,4 +43,4 @@ interface InteractiveChartSeries {
|
|
|
43
43
|
data: SeriesData;
|
|
44
44
|
seriesOptions?: SeriesPartialOptions<SeriesOptions>;
|
|
45
45
|
}
|
|
46
|
-
export { InteractiveChartConfig, InteractiveChartSeries, Time, Theme, RowLegend, SeriesList, SeriesDataItem, SeriesStyleOptions, ColorToStringFunction, LegendStyle };
|
|
46
|
+
export { InteractiveChartConfig, InteractiveChartSeries, Time, Theme, RowLegend, SeriesList, SeriesData, SeriesDataItem, SeriesOptions, SeriesStyleOptions, ColorToStringFunction, LegendStyle };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import { ResponsiveElement, TemplateResult, CSSResultGroup, PropertyValues, ElementSize } from '@refinitiv-ui/core';
|
|
3
2
|
import { IChartApi, MouseEventParams } from 'lightweight-charts';
|
|
3
|
+
import { CSSResultGroup, ElementSize, PropertyValues, ResponsiveElement, TemplateResult } from '@refinitiv-ui/core';
|
|
4
4
|
import '../tooltip/index.js';
|
|
5
|
-
import type { InteractiveChartConfig, InteractiveChartSeries, RowLegend, SeriesList, SeriesDataItem } from './helpers/types';
|
|
6
5
|
import { LegendStyle } from './helpers/types.js';
|
|
7
|
-
|
|
6
|
+
import type { InteractiveChartConfig, InteractiveChartSeries, RowLegend, SeriesData, SeriesDataItem, SeriesList, SeriesOptions, SeriesStyleOptions, Theme, Time } from './helpers/types.js';
|
|
7
|
+
export type { InteractiveChartConfig, InteractiveChartSeries, Time, Theme, RowLegend, SeriesList, SeriesData, SeriesDataItem, SeriesOptions, SeriesStyleOptions, LegendStyle };
|
|
8
8
|
/**
|
|
9
9
|
* A charting component that allows you to create several use cases of financial chart.
|
|
10
10
|
* By lightweight-charts library.
|
|
@@ -26,7 +26,7 @@ export declare class InteractiveChart extends ResponsiveElement {
|
|
|
26
26
|
/**
|
|
27
27
|
* Chart configurations for init chart
|
|
28
28
|
* @type {InteractiveChartConfig}
|
|
29
|
-
|
|
29
|
+
*/
|
|
30
30
|
config: InteractiveChartConfig | null;
|
|
31
31
|
/**
|
|
32
32
|
* Hide legend
|
|
@@ -96,9 +96,9 @@ export declare class InteractiveChart extends ResponsiveElement {
|
|
|
96
96
|
*/
|
|
97
97
|
resizedCallback(size: ElementSize): void;
|
|
98
98
|
/**
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
* Legend value observer
|
|
100
|
+
* @returns {void}
|
|
101
|
+
*/
|
|
102
102
|
private onLegendChange;
|
|
103
103
|
/**
|
|
104
104
|
* Legend style observer
|
|
@@ -108,9 +108,9 @@ export declare class InteractiveChart extends ResponsiveElement {
|
|
|
108
108
|
*/
|
|
109
109
|
private onLegendStyleChange;
|
|
110
110
|
/**
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
111
|
+
* Jump last value observer
|
|
112
|
+
* @returns {void}
|
|
113
|
+
*/
|
|
114
114
|
private onJumpButtonChange;
|
|
115
115
|
/**
|
|
116
116
|
* update width and height of chart
|
|
@@ -179,15 +179,15 @@ export declare class InteractiveChart extends ResponsiveElement {
|
|
|
179
179
|
*/
|
|
180
180
|
private convertColorToString;
|
|
181
181
|
/**
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
182
|
+
* Create data configuration from theme
|
|
183
|
+
* @returns {void}
|
|
184
|
+
*/
|
|
185
185
|
private createSeriesOptions;
|
|
186
186
|
/**
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
187
|
+
* Apply Theme to chart
|
|
188
|
+
* @param config value config
|
|
189
|
+
* @returns {void}
|
|
190
|
+
*/
|
|
191
191
|
private applyTheme;
|
|
192
192
|
/**
|
|
193
193
|
* Apply text color legend from chart options
|
|
@@ -253,13 +253,13 @@ export declare class InteractiveChart extends ResponsiveElement {
|
|
|
253
253
|
*/
|
|
254
254
|
private createSpanOHLC;
|
|
255
255
|
/**
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
256
|
+
* Create text used by several series types such as bars or candlesticks
|
|
257
|
+
* @param rowLegend Legend element
|
|
258
|
+
* @param rowData Value of series
|
|
259
|
+
* @param priceColor color of series
|
|
260
|
+
* @param index Series index
|
|
261
|
+
* @returns {void}
|
|
262
|
+
*/
|
|
263
263
|
private createTextOHLC;
|
|
264
264
|
/**
|
|
265
265
|
* Create text price used by several series types
|
|
@@ -335,11 +335,11 @@ export declare class InteractiveChart extends ResponsiveElement {
|
|
|
335
335
|
*/
|
|
336
336
|
colors(): string[];
|
|
337
337
|
/**
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
338
|
+
* A `CSSResultGroup` that will be used
|
|
339
|
+
* to style the host, slotted children
|
|
340
|
+
* and the internal template of the element.
|
|
341
|
+
* @return CSS template
|
|
342
|
+
*/
|
|
343
343
|
static get styles(): CSSResultGroup;
|
|
344
344
|
/**
|
|
345
345
|
* A `TemplateResult` that will be used
|