@refinitiv-ui/elements 5.12.2 → 6.0.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/lib/accordion/index.d.ts +5 -0
- package/lib/accordion/index.js +2 -2
- package/lib/accordion/themes/halo/dark/index.js +1 -1
- package/lib/accordion/themes/halo/light/index.js +1 -1
- package/lib/accordion/themes/solar/charcoal/index.js +1 -1
- package/lib/accordion/themes/solar/pearl/index.js +1 -1
- package/lib/appstate-bar/index.d.ts +11 -0
- package/lib/appstate-bar/index.js +8 -3
- package/lib/appstate-bar/themes/halo/dark/index.js +1 -1
- package/lib/appstate-bar/themes/halo/light/index.js +1 -1
- package/lib/appstate-bar/themes/solar/charcoal/index.js +1 -1
- package/lib/appstate-bar/themes/solar/pearl/index.js +1 -1
- package/lib/autosuggest/index.d.ts +5 -0
- package/lib/autosuggest/index.js +22 -12
- package/lib/autosuggest/themes/halo/dark/index.js +3 -3
- package/lib/autosuggest/themes/halo/light/index.js +3 -3
- package/lib/autosuggest/themes/solar/charcoal/index.js +3 -3
- package/lib/autosuggest/themes/solar/pearl/index.js +3 -3
- package/lib/button/index.d.ts +7 -13
- package/lib/button/index.js +8 -43
- package/lib/button/themes/halo/dark/index.js +1 -1
- package/lib/button/themes/halo/light/index.js +1 -1
- package/lib/button/themes/solar/charcoal/index.js +1 -1
- package/lib/button/themes/solar/pearl/index.js +1 -1
- package/lib/button-bar/index.d.ts +5 -0
- package/lib/button-bar/index.js +4 -5
- package/lib/button-bar/themes/halo/dark/index.js +1 -1
- package/lib/button-bar/themes/halo/light/index.js +1 -1
- package/lib/button-bar/themes/solar/charcoal/index.js +1 -1
- package/lib/button-bar/themes/solar/pearl/index.js +1 -1
- package/lib/calendar/constants.js +1 -1
- package/lib/calendar/index.d.ts +6 -1
- package/lib/calendar/index.js +39 -15
- package/lib/calendar/locales.js +5 -5
- package/lib/calendar/themes/halo/dark/index.js +1 -1
- package/lib/calendar/themes/halo/light/index.js +1 -1
- package/lib/calendar/themes/solar/charcoal/index.js +1 -1
- package/lib/calendar/themes/solar/pearl/index.js +1 -1
- package/lib/calendar/types.d.ts +1 -1
- package/lib/calendar/utils.js +5 -5
- package/lib/canvas/index.d.ts +5 -0
- package/lib/canvas/index.js +3 -4
- package/lib/card/index.d.ts +21 -0
- package/lib/card/index.js +37 -15
- package/lib/card/themes/halo/dark/index.js +3 -3
- package/lib/card/themes/halo/light/index.js +3 -3
- package/lib/card/themes/solar/charcoal/index.js +3 -3
- package/lib/card/themes/solar/pearl/index.js +3 -3
- package/lib/chart/index.d.ts +5 -0
- package/lib/chart/index.js +18 -22
- package/lib/chart/plugins/doughnut-center-label.js +6 -11
- package/lib/chart/themes/halo/dark/index.js +2 -2
- package/lib/chart/themes/halo/light/index.js +2 -2
- package/lib/chart/themes/solar/charcoal/index.js +2 -2
- package/lib/chart/themes/solar/pearl/index.js +2 -2
- package/lib/checkbox/index.d.ts +5 -0
- package/lib/checkbox/index.js +3 -3
- package/lib/checkbox/themes/halo/dark/index.js +2 -2
- package/lib/checkbox/themes/halo/light/index.js +2 -2
- package/lib/checkbox/themes/solar/charcoal/index.js +2 -2
- package/lib/checkbox/themes/solar/pearl/index.js +2 -2
- package/lib/clock/index.d.ts +5 -0
- package/lib/clock/index.js +6 -6
- package/lib/clock/utils/TickManager.js +2 -2
- package/lib/collapse/index.d.ts +5 -0
- package/lib/collapse/index.js +7 -9
- package/lib/collapse/themes/halo/dark/index.js +3 -3
- package/lib/collapse/themes/halo/light/index.js +3 -3
- package/lib/collapse/themes/solar/charcoal/index.js +3 -3
- package/lib/collapse/themes/solar/pearl/index.js +3 -3
- package/lib/color-dialog/elements/color-palettes.d.ts +5 -0
- package/lib/color-dialog/elements/color-palettes.js +1 -1
- package/lib/color-dialog/elements/grayscale-palettes.d.ts +5 -0
- package/lib/color-dialog/elements/grayscale-palettes.js +2 -2
- package/lib/color-dialog/elements/palettes.js +4 -5
- package/lib/color-dialog/helpers/value-model.js +1 -1
- package/lib/color-dialog/index.d.ts +6 -1
- package/lib/color-dialog/index.js +17 -12
- package/lib/color-dialog/themes/halo/dark/index.js +5 -5
- package/lib/color-dialog/themes/halo/light/index.js +5 -5
- package/lib/color-dialog/themes/solar/charcoal/index.js +5 -5
- package/lib/color-dialog/themes/solar/pearl/index.js +5 -5
- package/lib/combo-box/helpers/filter.d.ts +1 -1
- package/lib/combo-box/helpers/types.d.ts +1 -1
- package/lib/combo-box/index.d.ts +9 -4
- package/lib/combo-box/index.js +31 -14
- package/lib/combo-box/themes/halo/dark/index.js +5 -5
- package/lib/combo-box/themes/halo/light/index.js +5 -5
- package/lib/combo-box/themes/solar/charcoal/index.js +5 -5
- package/lib/combo-box/themes/solar/pearl/index.js +5 -5
- package/lib/counter/index.d.ts +11 -6
- package/lib/counter/index.js +8 -8
- package/lib/counter/themes/halo/dark/index.js +1 -1
- package/lib/counter/themes/halo/light/index.js +1 -1
- package/lib/counter/themes/solar/charcoal/index.js +1 -1
- package/lib/counter/themes/solar/pearl/index.js +1 -1
- package/lib/datetime-field/constants.d.ts +4 -0
- package/lib/datetime-field/constants.js +5 -0
- package/lib/datetime-field/custom-elements.json +345 -0
- package/lib/datetime-field/custom-elements.md +61 -0
- package/lib/datetime-field/index.d.ts +322 -0
- package/lib/datetime-field/index.js +660 -0
- package/lib/datetime-field/themes/halo/dark/index.js +3 -0
- package/lib/datetime-field/themes/halo/light/index.js +3 -0
- package/lib/datetime-field/themes/solar/charcoal/index.js +3 -0
- package/lib/datetime-field/themes/solar/pearl/index.js +3 -0
- package/lib/datetime-field/types.d.ts +10 -0
- package/lib/datetime-field/types.js +1 -0
- package/lib/datetime-field/utils.d.ts +25 -0
- package/lib/datetime-field/utils.js +79 -0
- package/lib/datetime-picker/index.d.ts +5 -0
- package/lib/datetime-picker/index.js +6 -7
- package/lib/datetime-picker/themes/halo/dark/index.js +5 -5
- package/lib/datetime-picker/themes/halo/light/index.js +5 -5
- package/lib/datetime-picker/themes/solar/charcoal/index.js +5 -5
- package/lib/datetime-picker/themes/solar/pearl/index.js +5 -5
- package/lib/datetime-picker/utils.js +1 -1
- package/lib/dialog/draggable-element.js +1 -2
- package/lib/dialog/index.d.ts +6 -1
- package/lib/dialog/index.js +5 -5
- package/lib/dialog/themes/halo/dark/index.js +5 -5
- package/lib/dialog/themes/halo/light/index.js +5 -5
- package/lib/dialog/themes/solar/charcoal/index.js +5 -5
- package/lib/dialog/themes/solar/pearl/index.js +5 -5
- package/lib/email-field/index.d.ts +6 -1
- package/lib/email-field/index.js +8 -3
- package/lib/email-field/themes/halo/dark/index.js +1 -1
- package/lib/email-field/themes/halo/light/index.js +1 -1
- package/lib/email-field/themes/solar/charcoal/index.js +1 -1
- package/lib/email-field/themes/solar/pearl/index.js +1 -1
- package/lib/flag/index.d.ts +5 -0
- package/lib/flag/index.js +3 -3
- package/lib/flag/utils/FlagLoader.d.ts +1 -1
- package/lib/flag/utils/FlagLoader.js +1 -1
- package/lib/header/index.d.ts +5 -0
- package/lib/header/index.js +2 -2
- package/lib/heatmap/helpers/color.d.ts +1 -1
- package/lib/heatmap/helpers/color.js +3 -5
- package/lib/heatmap/helpers/text.d.ts +1 -7
- package/lib/heatmap/helpers/text.js +1 -18
- package/lib/heatmap/index.d.ts +5 -0
- package/lib/heatmap/index.js +22 -30
- package/lib/heatmap/themes/halo/dark/index.js +2 -2
- package/lib/heatmap/themes/halo/light/index.js +2 -2
- package/lib/heatmap/themes/solar/charcoal/index.js +2 -2
- package/lib/heatmap/themes/solar/pearl/index.js +2 -2
- package/lib/icon/index.d.ts +5 -0
- package/lib/icon/index.js +3 -3
- package/lib/icon/utils/IconLoader.d.ts +1 -1
- package/lib/icon/utils/IconLoader.js +1 -1
- package/lib/interactive-chart/helpers/types.d.ts +1 -1
- package/lib/interactive-chart/index.d.ts +5 -12
- package/lib/interactive-chart/index.js +20 -36
- package/lib/interactive-chart/themes/halo/dark/index.js +1 -1
- package/lib/interactive-chart/themes/halo/light/index.js +1 -1
- package/lib/interactive-chart/themes/solar/charcoal/index.js +1 -1
- package/lib/interactive-chart/themes/solar/pearl/index.js +1 -1
- package/lib/item/helpers/types.d.ts +1 -1
- package/lib/item/index.d.ts +24 -17
- package/lib/item/index.js +45 -48
- package/lib/item/themes/halo/dark/index.js +2 -2
- package/lib/item/themes/halo/light/index.js +2 -2
- package/lib/item/themes/solar/charcoal/index.js +2 -2
- package/lib/item/themes/solar/pearl/index.js +2 -2
- package/lib/label/index.d.ts +6 -1
- package/lib/label/index.js +6 -6
- package/lib/label/themes/halo/dark/index.js +1 -1
- package/lib/label/themes/halo/light/index.js +1 -1
- package/lib/label/themes/solar/charcoal/index.js +1 -1
- package/lib/label/themes/solar/pearl/index.js +1 -1
- package/lib/layout/index.d.ts +5 -0
- package/lib/layout/index.js +2 -2
- package/lib/led-gauge/index.d.ts +5 -0
- package/lib/led-gauge/index.js +2 -2
- package/lib/led-gauge/themes/halo/dark/index.js +1 -1
- package/lib/led-gauge/themes/halo/light/index.js +1 -1
- package/lib/led-gauge/themes/solar/charcoal/index.js +1 -1
- package/lib/led-gauge/themes/solar/pearl/index.js +1 -1
- package/lib/list/custom-elements.json +0 -13
- package/lib/list/custom-elements.md +9 -10
- package/lib/list/helpers/item-id.d.ts +8 -0
- package/lib/list/helpers/item-id.js +13 -0
- package/lib/list/helpers/{list-renderer.d.ts → renderer.d.ts} +4 -0
- package/lib/list/helpers/{list-renderer.js → renderer.js} +8 -0
- package/lib/list/helpers/types.d.ts +1 -1
- package/lib/list/index.d.ts +18 -12
- package/lib/list/index.js +30 -29
- package/lib/list/renderer.d.ts +1 -1
- package/lib/list/themes/halo/dark/index.js +2 -2
- package/lib/list/themes/halo/light/index.js +2 -2
- package/lib/list/themes/solar/charcoal/index.js +2 -2
- package/lib/list/themes/solar/pearl/index.js +2 -2
- package/lib/loader/index.d.ts +6 -0
- package/lib/loader/index.js +5 -1
- package/lib/multi-input/helpers/types.d.ts +1 -1
- package/lib/multi-input/index.d.ts +5 -0
- package/lib/multi-input/index.js +6 -7
- package/lib/multi-input/themes/halo/dark/index.js +2 -2
- package/lib/multi-input/themes/halo/light/index.js +2 -2
- package/lib/multi-input/themes/solar/charcoal/index.js +2 -2
- package/lib/multi-input/themes/solar/pearl/index.js +2 -2
- package/lib/notification/elements/notification-tray.d.ts +5 -0
- package/lib/notification/elements/notification-tray.js +4 -4
- package/lib/notification/elements/notification.d.ts +15 -0
- package/lib/notification/elements/notification.js +12 -3
- package/lib/notification/themes/halo/dark/index.js +1 -1
- package/lib/notification/themes/halo/light/index.js +1 -1
- package/lib/notification/themes/solar/charcoal/index.js +1 -1
- package/lib/notification/themes/solar/pearl/index.js +1 -1
- package/lib/number-field/index.d.ts +8 -3
- package/lib/number-field/index.js +14 -4
- package/lib/number-field/themes/halo/dark/index.js +1 -1
- package/lib/number-field/themes/halo/light/index.js +1 -1
- package/lib/number-field/themes/solar/charcoal/index.js +1 -1
- package/lib/number-field/themes/solar/pearl/index.js +1 -1
- package/lib/overlay/elements/overlay-backdrop.d.ts +5 -0
- package/lib/overlay/elements/overlay-backdrop.js +2 -2
- package/lib/overlay/elements/overlay-viewport.d.ts +5 -0
- package/lib/overlay/elements/overlay-viewport.js +1 -1
- package/lib/overlay/elements/overlay.d.ts +5 -0
- package/lib/overlay/elements/overlay.js +7 -5
- package/lib/overlay/managers/focus-manager.js +11 -6
- package/lib/overlay/managers/interaction-lock-manager.js +1 -1
- package/lib/overlay/managers/viewport-manager.js +4 -5
- package/lib/overlay/managers/zindex-manager.js +1 -1
- package/lib/overlay-menu/helpers/types.d.ts +7 -1
- package/lib/overlay-menu/helpers/types.js +7 -1
- package/lib/overlay-menu/index.d.ts +14 -4
- package/lib/overlay-menu/index.js +57 -29
- package/lib/overlay-menu/managers/menu-manager.js +2 -1
- package/lib/overlay-menu/themes/halo/dark/index.js +3 -3
- package/lib/overlay-menu/themes/halo/light/index.js +3 -3
- package/lib/overlay-menu/themes/solar/charcoal/index.js +3 -3
- package/lib/overlay-menu/themes/solar/pearl/index.js +3 -3
- package/lib/pagination/index.d.ts +79 -91
- package/lib/pagination/index.js +205 -239
- package/lib/pagination/themes/halo/dark/index.js +4 -5
- package/lib/pagination/themes/halo/light/index.js +4 -5
- package/lib/pagination/themes/solar/charcoal/index.js +4 -5
- package/lib/pagination/themes/solar/pearl/index.js +4 -5
- package/lib/panel/index.d.ts +5 -0
- package/lib/panel/index.js +2 -2
- package/lib/password-field/index.d.ts +7 -2
- package/lib/password-field/index.js +7 -4
- package/lib/password-field/themes/halo/dark/index.js +1 -1
- package/lib/password-field/themes/halo/light/index.js +1 -1
- package/lib/password-field/themes/solar/charcoal/index.js +1 -1
- package/lib/password-field/themes/solar/pearl/index.js +1 -1
- package/lib/pill/index.d.ts +21 -0
- package/lib/pill/index.js +36 -5
- package/lib/pill/themes/halo/dark/index.js +2 -2
- package/lib/pill/themes/halo/light/index.js +2 -2
- package/lib/pill/themes/solar/charcoal/index.js +2 -2
- package/lib/pill/themes/solar/pearl/index.js +2 -2
- package/lib/progress-bar/index.d.ts +5 -0
- package/lib/progress-bar/index.js +3 -3
- package/lib/radio-button/index.d.ts +5 -0
- package/lib/radio-button/index.js +3 -3
- package/lib/radio-button/radio-button-registry.d.ts +1 -1
- package/lib/radio-button/radio-button-registry.js +4 -2
- package/lib/radio-button/themes/halo/dark/index.js +1 -1
- package/lib/radio-button/themes/halo/light/index.js +1 -1
- package/lib/radio-button/themes/solar/charcoal/index.js +1 -1
- package/lib/radio-button/themes/solar/pearl/index.js +1 -1
- package/lib/rating/index.d.ts +5 -0
- package/lib/rating/index.js +4 -4
- package/lib/search-field/index.d.ts +7 -2
- package/lib/search-field/index.js +8 -4
- package/lib/search-field/themes/halo/dark/index.js +1 -1
- package/lib/search-field/themes/halo/light/index.js +1 -1
- package/lib/search-field/themes/solar/charcoal/index.js +1 -1
- package/lib/search-field/themes/solar/pearl/index.js +1 -1
- package/lib/select/index.d.ts +5 -0
- package/lib/select/index.js +11 -14
- package/lib/select/themes/halo/dark/index.js +3 -3
- package/lib/select/themes/halo/light/index.js +3 -3
- package/lib/select/themes/solar/charcoal/index.js +3 -3
- package/lib/select/themes/solar/pearl/index.js +3 -3
- package/lib/sidebar-layout/index.d.ts +5 -0
- package/lib/sidebar-layout/index.js +4 -4
- package/lib/sidebar-layout/themes/halo/dark/index.js +1 -1
- package/lib/sidebar-layout/themes/halo/light/index.js +1 -1
- package/lib/sidebar-layout/themes/solar/charcoal/index.js +1 -1
- package/lib/sidebar-layout/themes/solar/pearl/index.js +1 -1
- package/lib/slider/constants.d.ts +15 -0
- package/lib/slider/constants.js +18 -0
- package/lib/slider/index.d.ts +55 -80
- package/lib/slider/index.js +365 -460
- package/lib/slider/themes/halo/dark/index.js +1 -1
- package/lib/slider/themes/halo/light/index.js +1 -1
- package/lib/slider/themes/solar/charcoal/index.js +1 -1
- package/lib/slider/themes/solar/pearl/index.js +1 -1
- package/lib/slider/utils.d.ts +35 -0
- package/lib/slider/utils.js +54 -0
- package/lib/sparkline/index.d.ts +5 -0
- package/lib/sparkline/index.js +9 -10
- package/lib/swing-gauge/index.d.ts +5 -0
- package/lib/swing-gauge/index.js +14 -8
- package/lib/swing-gauge/themes/halo/dark/index.js +1 -1
- package/lib/swing-gauge/themes/halo/light/index.js +1 -1
- package/lib/swing-gauge/themes/solar/charcoal/index.js +1 -1
- package/lib/swing-gauge/themes/solar/pearl/index.js +1 -1
- package/lib/tab/index.d.ts +5 -0
- package/lib/tab/index.js +4 -4
- package/lib/tab/themes/halo/dark/index.js +2 -2
- package/lib/tab/themes/halo/light/index.js +2 -2
- package/lib/tab/themes/solar/charcoal/index.js +2 -2
- package/lib/tab/themes/solar/pearl/index.js +2 -2
- package/lib/tab-bar/index.d.ts +5 -0
- package/lib/tab-bar/index.js +6 -6
- package/lib/tab-bar/themes/halo/dark/index.js +2 -2
- package/lib/tab-bar/themes/halo/light/index.js +2 -2
- package/lib/tab-bar/themes/solar/charcoal/index.js +2 -2
- package/lib/tab-bar/themes/solar/pearl/index.js +2 -2
- package/lib/text-field/index.d.ts +19 -1
- package/lib/text-field/index.js +35 -11
- package/lib/text-field/themes/halo/dark/index.js +1 -1
- package/lib/text-field/themes/halo/light/index.js +1 -1
- package/lib/text-field/themes/solar/charcoal/index.js +1 -1
- package/lib/text-field/themes/solar/pearl/index.js +1 -1
- package/lib/time-picker/index.d.ts +6 -1
- package/lib/time-picker/index.js +11 -11
- package/lib/time-picker/themes/halo/dark/index.js +2 -2
- package/lib/time-picker/themes/halo/light/index.js +2 -2
- package/lib/time-picker/themes/solar/charcoal/index.js +2 -2
- package/lib/time-picker/themes/solar/pearl/index.js +2 -2
- package/lib/toggle/index.d.ts +5 -0
- package/lib/toggle/index.js +2 -2
- package/lib/tooltip/elements/tooltip-element.d.ts +1 -2
- package/lib/tooltip/index.d.ts +6 -0
- package/lib/tooltip/index.js +7 -8
- package/lib/tooltip/managers/tooltip-manager.js +2 -2
- package/lib/tooltip/themes/halo/dark/index.js +1 -1
- package/lib/tooltip/themes/halo/light/index.js +1 -1
- package/lib/tooltip/themes/solar/charcoal/index.js +1 -1
- package/lib/tooltip/themes/solar/pearl/index.js +1 -1
- package/lib/tornado-chart/elements/tornado-chart.d.ts +5 -0
- package/lib/tornado-chart/elements/tornado-chart.js +2 -2
- package/lib/tornado-chart/elements/tornado-item.d.ts +5 -0
- package/lib/tornado-chart/elements/tornado-item.js +3 -3
- package/lib/tornado-chart/themes/halo/dark/index.js +2 -2
- package/lib/tornado-chart/themes/halo/light/index.js +2 -2
- package/lib/tornado-chart/themes/solar/charcoal/index.js +2 -2
- package/lib/tornado-chart/themes/solar/pearl/index.js +2 -2
- package/lib/tree/elements/tree-item.d.ts +8 -3
- package/lib/tree/elements/tree-item.js +5 -6
- package/lib/tree/elements/tree.d.ts +7 -3
- package/lib/tree/elements/tree.js +6 -7
- package/lib/tree/helpers/renderer.d.ts +4 -0
- package/lib/tree/helpers/renderer.js +20 -13
- package/lib/tree/helpers/types.d.ts +1 -1
- package/lib/tree/managers/tree-manager.d.ts +1 -1
- package/lib/tree/themes/halo/dark/index.js +4 -4
- package/lib/tree/themes/halo/light/index.js +4 -4
- package/lib/tree/themes/solar/charcoal/index.js +4 -4
- package/lib/tree/themes/solar/pearl/index.js +4 -4
- package/lib/tree-select/index.d.ts +8 -7
- package/lib/tree-select/index.js +39 -38
- package/lib/tree-select/themes/halo/dark/index.js +9 -9
- package/lib/tree-select/themes/halo/light/index.js +9 -9
- package/lib/tree-select/themes/solar/charcoal/index.js +9 -9
- package/lib/tree-select/themes/solar/pearl/index.js +9 -9
- package/lib/version.js +1 -1
- package/package.json +35 -295
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/icon/themes/solar/charcoal';
|
|
2
2
|
|
|
3
3
|
elf.customStyles.define('ef-text-field', ':host{display:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:left;font-family:inherit;font-size:13rem;font-weight:400;height:23px;width:140px;max-width:100%;padding:0 5px;margin:1px 0;outline:0;box-sizing:border-box;display:inline-flex;align-items:center;position:relative;vertical-align:middle;color:#c2c2c2;border-radius:0;text-overflow:ellipsis;background-color:#000;border:1px solid #4a4a52}:host([type=number]){padding-right:0}:host([error]),:host([error][warning]){border:1px solid #f5475b}:host([error][disabled]),:host([error][warning][disabled]){color:rgba(194,194,194,.6);border:1px solid rgba(245,71,91,.6)}:host ::-ms-clear{display:none}:host [part=input]{color:inherit;padding:0;margin:0;flex:1 1 auto;min-width:0;width:100%;height:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-overflow:ellipsis;touch-action:manipulation}:host [part=input]::-webkit-clear-button,:host [part=input]::-webkit-inner-spin-button,:host [part=input]::-webkit-search-cancel-button,:host [part=input]::-webkit-search-decoration{-webkit-appearance:none}:host [part=input]:invalid{box-shadow:none}:host [part=icon]{color:#e2e2e2;min-width:1em}:host([disabled]) [part=input]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host([disabled]){border:1px solid rgba(74,74,82,.6);color:rgba(194,194,194,.6)}:host([readonly]){border:1px solid rgba(74,74,82,.6)}:host(:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #77777d}:host([warning]){background-color:#000;border:1px solid #f93}:host([warning][disabled]){border:1px solid rgba(255,153,51,.6);color:rgba(194,194,194,.6)}:host([warning][readonly]){border:1px solid rgba(255,153,51,.6)}:host([warning]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #ffb366}:host([error]),:host([error][warning]:not([focused])){background-color:#000;border:1px solid #f5475b}:host([error][disabled]),:host([error][warning]:not([focused])[disabled]){border:1px solid rgba(245,71,91,.6);color:rgba(194,194,194,.6)}:host([error][readonly]),:host([error][warning]:not([focused])[readonly]){border:1px solid rgba(245,71,91,.6)}:host([error]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover),:host([error][warning]:not([focused]):not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #f87584}:host([highlight]){background-color:#1b252f;border:1px solid #4a4a52}:host([highlight][disabled]){border:1px solid rgba(74,74,82,.6);color:rgba(194,194,194,.6);background-color:rgba(27,37,47,.6)}:host([highlight][readonly]){border:1px solid rgba(74,74,82,.6)}:host([highlight]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #77777d}:host([indirect]){color:#0fd;background-color:#000;border:1px solid #898623}:host([indirect][disabled]){border:1px solid rgba(137,134,35,.6);color:rgba(0,255,221,.6)}:host([indirect][readonly]){border:1px solid rgba(137,134,35,.6)}:host([indirect]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #a7a45a}:host([focused]){background-size:100% 2px,100% 1px!important;background-position:center bottom!important;border-color:#f93;border-style:dotted}:host([disabled]) [part=input]::-webkit-input-placeholder{color:rgba(102,101,112,.6)}:host([disabled]) [part=input]::-moz-placeholder{color:rgba(102,101,112,.6)}:host([disabled]) [part=input]:-ms-input-placeholder{color:rgba(102,101,112,.6)}');
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/icon/themes/solar/pearl';
|
|
2
2
|
|
|
3
3
|
elf.customStyles.define('ef-text-field', ':host{display:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:left;font-family:inherit;font-size:13rem;font-weight:400;height:23px;width:140px;max-width:100%;padding:0 5px;margin:1px 0;outline:0;box-sizing:border-box;display:inline-flex;align-items:center;position:relative;vertical-align:middle;color:#484848;border-radius:0;text-overflow:ellipsis;background-color:#fff;border:1px solid #a9afba}:host([type=number]){padding-right:0}:host([error]),:host([error][warning]){border:1px solid #d94255}:host([error][disabled]),:host([error][warning][disabled]){color:rgba(72,72,72,.6);border:1px solid rgba(217,66,85,.6)}:host ::-ms-clear{display:none}:host [part=input]{color:inherit;padding:0;margin:0;flex:1 1 auto;min-width:0;width:100%;height:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-overflow:ellipsis;touch-action:manipulation}:host [part=input]::-webkit-clear-button,:host [part=input]::-webkit-inner-spin-button,:host [part=input]::-webkit-search-cancel-button,:host [part=input]::-webkit-search-decoration{-webkit-appearance:none}:host [part=input]:invalid{box-shadow:none}:host [part=icon]{color:#acafb5;min-width:1em}:host([disabled]) [part=input]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host([disabled]){border:1px solid rgba(169,175,186,.6);color:rgba(72,72,72,.6)}:host([readonly]){border:1px solid rgba(169,175,186,.6)}:host(:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #bfc3cb}:host([warning]){background-color:#fff;border:1px solid #f93}:host([warning][disabled]){border:1px solid rgba(255,153,51,.6);color:rgba(72,72,72,.6)}:host([warning][readonly]){border:1px solid rgba(255,153,51,.6)}:host([warning]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #ffb366}:host([error]),:host([error][warning]:not([focused])){background-color:#fff;border:1px solid #d94255}:host([error][disabled]),:host([error][warning]:not([focused])[disabled]){border:1px solid rgba(217,66,85,.6);color:rgba(72,72,72,.6)}:host([error][readonly]),:host([error][warning]:not([focused])[readonly]){border:1px solid rgba(217,66,85,.6)}:host([error]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover),:host([error][warning]:not([focused]):not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #e37180}:host([highlight]){background-color:#b0ffff;border:1px solid #a9afba}:host([highlight][disabled]){border:1px solid rgba(169,175,186,.6);color:rgba(72,72,72,.6);background-color:rgba(176,255,255,.6)}:host([highlight][readonly]){border:1px solid rgba(169,175,186,.6)}:host([highlight]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #bfc3cb}:host([indirect]){color:#009494;background-color:#effefe;border:1px solid #898623}:host([indirect][disabled]){border:1px solid rgba(137,134,35,.6);color:rgba(0,148,148,.6)}:host([indirect][readonly]){border:1px solid rgba(137,134,35,.6)}:host([indirect]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #a7a45a}:host([focused]){background-size:100% 2px,100% 1px!important;background-position:center bottom!important;border-color:#ffb266;border-style:dotted}:host([disabled]) [part=input]::-webkit-input-placeholder{color:rgba(102,101,112,.6)}:host([disabled]) [part=input]::-moz-placeholder{color:rgba(102,101,112,.6)}:host([disabled]) [part=input]:-ms-input-placeholder{color:rgba(102,101,112,.6)}');
|
|
@@ -2,7 +2,7 @@ import { JSXInterface } from '../jsx';
|
|
|
2
2
|
import { ControlElement, TemplateResult, CSSResultGroup, PropertyValues } from '@refinitiv-ui/core';
|
|
3
3
|
import '../number-field/index.js';
|
|
4
4
|
import { TranslateDirective } from '@refinitiv-ui/translate';
|
|
5
|
-
import '@refinitiv-ui/phrasebook/
|
|
5
|
+
import '@refinitiv-ui/phrasebook/locale/en/time-picker.js';
|
|
6
6
|
declare enum Segment {
|
|
7
7
|
HOURS = "hours",
|
|
8
8
|
MINUTES = "minutes",
|
|
@@ -395,6 +395,11 @@ export declare class TimePicker extends ControlElement {
|
|
|
395
395
|
*/
|
|
396
396
|
protected render(): TemplateResult;
|
|
397
397
|
}
|
|
398
|
+
declare global {
|
|
399
|
+
interface HTMLElementTagNameMap {
|
|
400
|
+
'ef-time-picker': TimePicker;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
398
403
|
export {};
|
|
399
404
|
|
|
400
405
|
declare global {
|
package/lib/time-picker/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
var TimePicker_1;
|
|
2
2
|
import { __decorate } from "tslib";
|
|
3
3
|
import { ControlElement, html, css } from '@refinitiv-ui/core';
|
|
4
|
-
import { ifDefined } from '@refinitiv-ui/core/
|
|
5
|
-
import { guard } from '@refinitiv-ui/core/
|
|
6
|
-
import { customElement } from '@refinitiv-ui/core/
|
|
7
|
-
import { property } from '@refinitiv-ui/core/
|
|
8
|
-
import { state } from '@refinitiv-ui/core/
|
|
9
|
-
import { query } from '@refinitiv-ui/core/
|
|
4
|
+
import { ifDefined } from '@refinitiv-ui/core/directives/if-defined.js';
|
|
5
|
+
import { guard } from '@refinitiv-ui/core/directives/guard.js';
|
|
6
|
+
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
|
|
7
|
+
import { property } from '@refinitiv-ui/core/decorators/property.js';
|
|
8
|
+
import { state } from '@refinitiv-ui/core/decorators/state.js';
|
|
9
|
+
import { query } from '@refinitiv-ui/core/decorators/query.js';
|
|
10
10
|
import { VERSION } from '../version.js';
|
|
11
|
-
import { isValidTime, toTimeSegment, TimeFormat, getFormat, format, isAM, isPM, MILLISECONDS_IN_SECOND, MILLISECONDS_IN_MINUTE, MILLISECONDS_IN_HOUR, addOffset, padNumber, parse } from '@refinitiv-ui/utils/
|
|
12
|
-
import { isIE } from '@refinitiv-ui/utils/
|
|
11
|
+
import { isValidTime, toTimeSegment, TimeFormat, getFormat, format, isAM, isPM, MILLISECONDS_IN_SECOND, MILLISECONDS_IN_MINUTE, MILLISECONDS_IN_HOUR, addOffset, padNumber, parse } from '@refinitiv-ui/utils/date.js';
|
|
12
|
+
import { isIE } from '@refinitiv-ui/utils/browser.js';
|
|
13
13
|
import '../number-field/index.js';
|
|
14
14
|
import { translate } from '@refinitiv-ui/translate';
|
|
15
|
-
import '@refinitiv-ui/phrasebook/
|
|
15
|
+
import '@refinitiv-ui/phrasebook/locale/en/time-picker.js';
|
|
16
16
|
var Segment;
|
|
17
17
|
(function (Segment) {
|
|
18
18
|
Segment["HOURS"] = "hours";
|
|
@@ -307,7 +307,6 @@ let TimePicker = TimePicker_1 = class TimePicker extends ControlElement {
|
|
|
307
307
|
* @returns returns a promise void
|
|
308
308
|
*/
|
|
309
309
|
async selectSegment() {
|
|
310
|
-
var _a;
|
|
311
310
|
await this.updateComplete;
|
|
312
311
|
switch (this.selectedSegment) {
|
|
313
312
|
case Segment.HOURS:
|
|
@@ -317,7 +316,7 @@ let TimePicker = TimePicker_1 = class TimePicker extends ControlElement {
|
|
|
317
316
|
this.minutesInput.select();
|
|
318
317
|
break;
|
|
319
318
|
case Segment.SECONDS:
|
|
320
|
-
|
|
319
|
+
this.secondsInput?.select();
|
|
321
320
|
break;
|
|
322
321
|
// no default
|
|
323
322
|
}
|
|
@@ -811,6 +810,7 @@ let TimePicker = TimePicker_1 = class TimePicker extends ControlElement {
|
|
|
811
810
|
const amPm = this.amPm;
|
|
812
811
|
return html `<div
|
|
813
812
|
part="aria-selection"
|
|
813
|
+
role="status"
|
|
814
814
|
aria-live="polite"
|
|
815
815
|
aria-label="${this.t('SELECTED', {
|
|
816
816
|
value: value ? parse(value) : null,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
2
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/number-field/themes/halo/dark';
|
|
2
|
+
import '@refinitiv-ui/elements/icon/themes/halo/dark';
|
|
3
3
|
|
|
4
4
|
elf.customStyles.define('ef-time-picker', ':host{display:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:left;font-family:inherit;font-size:12rem;font-weight:400;height:24px;max-width:100%;margin:1px 0;outline:0;box-sizing:border-box;display:inline-flex;align-items:center;position:relative;vertical-align:middle;color:#ccc;border-radius:0;background-color:#0d0d0d;text-overflow:ellipsis;border:1px solid #404040;width:auto;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content;padding:0}:host([disabled]){color:rgba(204,204,204,.5);border:1px solid rgba(64,64,64,.5)}:host([focused]){background-size:100% 2px,100% 1px!important;background-position:center bottom!important;border-color:#334bff}:host [part=input]{margin:0;text-align:center;padding:0;color:inherit;width:24px}:host [part=divider]::before{content:\':\'}:host [part=toggle]{width:20px;font-size:50%;display:flex;flex-flow:column nowrap;align-items:center;justify-content:center;line-height:1.2;outline:0;cursor:pointer;touch-action:manipulation}:host [part=input],:host [part=toggle]{height:100%;position:relative}:host [part=input]:focus::after,:host [part=input][focused]::after,:host [part=toggle]:focus::after,:host [part=toggle][focused]::after{content:\'\';border-right:8px solid transparent;border-left:8px solid transparent;position:absolute;left:calc(50% - 8px);bottom:0;border-bottom:4px solid transparent;display:none}:host [part=toggle-item]{opacity:.5}:host [part=toggle-item][active]{opacity:1}:host [part=divider]{width:2px}');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
2
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/number-field/themes/halo/light';
|
|
2
|
+
import '@refinitiv-ui/elements/icon/themes/halo/light';
|
|
3
3
|
|
|
4
4
|
elf.customStyles.define('ef-time-picker', ':host{display:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:left;font-family:inherit;font-size:12rem;font-weight:400;height:24px;max-width:100%;margin:1px 0;outline:0;box-sizing:border-box;display:inline-flex;align-items:center;position:relative;vertical-align:middle;color:#404040;border-radius:0;background-color:#fff;text-overflow:ellipsis;border:1px solid #595959;width:auto;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content;padding:0}:host([disabled]){color:rgba(64,64,64,.5);border:1px solid rgba(89,89,89,.5)}:host([focused]){background-size:100% 2px,100% 1px!important;background-position:center bottom!important;border-color:#334bff}:host [part=input]{margin:0;text-align:center;padding:0;color:inherit;width:24px}:host [part=divider]::before{content:\':\'}:host [part=toggle]{width:20px;font-size:50%;display:flex;flex-flow:column nowrap;align-items:center;justify-content:center;line-height:1.2;outline:0;cursor:pointer;touch-action:manipulation}:host [part=input],:host [part=toggle]{height:100%;position:relative}:host [part=input]:focus::after,:host [part=input][focused]::after,:host [part=toggle]:focus::after,:host [part=toggle][focused]::after{content:\'\';border-right:8px solid transparent;border-left:8px solid transparent;position:absolute;left:calc(50% - 8px);bottom:0;border-bottom:4px solid transparent;display:none}:host [part=toggle-item]{opacity:.5}:host [part=toggle-item][active]{opacity:1}:host [part=divider]{width:2px}');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
2
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/number-field/themes/solar/charcoal';
|
|
2
|
+
import '@refinitiv-ui/elements/icon/themes/solar/charcoal';
|
|
3
3
|
|
|
4
4
|
elf.customStyles.define('ef-time-picker', ':host{display:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:left;font-family:inherit;font-size:13rem;font-weight:400;height:23px;max-width:100%;margin:1px 0;outline:0;box-sizing:border-box;display:inline-flex;align-items:center;position:relative;vertical-align:middle;color:#c2c2c2;border-radius:0;text-overflow:ellipsis;width:auto;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content;background-color:#000;border:1px solid #4a4a52;padding:0}:host([focused]){background-size:100% 2px,100% 1px!important;background-position:center bottom!important;border-color:#f93;border-style:dotted}:host [part=input]{margin:0;text-align:center;padding:0;color:inherit;width:25px}:host [part=divider]::before{content:\':\'}:host [part=toggle]{width:20px;display:flex;flex-flow:column nowrap;align-items:center;justify-content:center;outline:0;cursor:pointer;touch-action:manipulation;font-size:70%;line-height:1}:host [part=input],:host [part=toggle]{height:100%;position:relative}:host [part=input]:focus::after,:host [part=input][focused]::after,:host [part=toggle]:focus::after,:host [part=toggle][focused]::after{content:\'\';border-right:8px solid transparent;border-bottom:4px solid #f93;border-left:8px solid transparent;position:absolute;content:\'\';border:none;left:calc(50% - 7px);bottom:-1px;width:14px;height:1px;background:#f93}:host [part=toggle-item]{opacity:.5}:host [part=toggle-item][active]{opacity:1}:host([disabled]){border:1px solid rgba(74,74,82,.6);color:rgba(194,194,194,.6)}:host([readonly]){border:1px solid rgba(74,74,82,.6)}:host(:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #77777d}:host([warning]){background-color:#000;border:1px solid #f93}:host([warning][disabled]){border:1px solid rgba(255,153,51,.6);color:rgba(194,194,194,.6)}:host([warning][readonly]){border:1px solid rgba(255,153,51,.6)}:host([warning]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #ffb366}:host([error]),:host([error][warning]:not([focused])){background-color:#000;border:1px solid #f5475b}:host([error][disabled]),:host([error][warning]:not([focused])[disabled]){border:1px solid rgba(245,71,91,.6);color:rgba(194,194,194,.6)}:host([error][readonly]),:host([error][warning]:not([focused])[readonly]){border:1px solid rgba(245,71,91,.6)}:host([error]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover),:host([error][warning]:not([focused]):not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #f87584}:host([highlight]){background-color:#1b252f;border:1px solid #4a4a52}:host([highlight][disabled]){border:1px solid rgba(74,74,82,.6);color:rgba(194,194,194,.6);background-color:rgba(27,37,47,.6)}:host([highlight][readonly]){border:1px solid rgba(74,74,82,.6)}:host([highlight]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #77777d}:host([indirect]){color:#0fd;background-color:#000;border:1px solid #898623}:host([indirect][disabled]){border:1px solid rgba(137,134,35,.6);color:rgba(0,255,221,.6)}:host([indirect][readonly]){border:1px solid rgba(137,134,35,.6)}:host([indirect]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #a7a45a}');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
2
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/number-field/themes/solar/pearl';
|
|
2
|
+
import '@refinitiv-ui/elements/icon/themes/solar/pearl';
|
|
3
3
|
|
|
4
4
|
elf.customStyles.define('ef-time-picker', ':host{display:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:left;font-family:inherit;font-size:13rem;font-weight:400;height:23px;max-width:100%;margin:1px 0;outline:0;box-sizing:border-box;display:inline-flex;align-items:center;position:relative;vertical-align:middle;color:#484848;border-radius:0;text-overflow:ellipsis;width:auto;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content;background-color:#fff;border:1px solid #a9afba;padding:0}:host([focused]){background-size:100% 2px,100% 1px!important;background-position:center bottom!important;border-color:#ffb266;border-style:dotted}:host [part=input]{margin:0;text-align:center;padding:0;color:inherit;width:25px}:host [part=divider]::before{content:\':\'}:host [part=toggle]{width:20px;display:flex;flex-flow:column nowrap;align-items:center;justify-content:center;outline:0;cursor:pointer;touch-action:manipulation;font-size:70%;line-height:1}:host [part=input],:host [part=toggle]{height:100%;position:relative}:host [part=input]:focus::after,:host [part=input][focused]::after,:host [part=toggle]:focus::after,:host [part=toggle][focused]::after{content:\'\';border-right:8px solid transparent;border-bottom:4px solid #ffb266;border-left:8px solid transparent;position:absolute;content:\'\';border:none;left:calc(50% - 7px);bottom:-1px;width:14px;height:1px;background:#ffb266}:host [part=toggle-item]{opacity:.5}:host [part=toggle-item][active]{opacity:1}:host([disabled]){border:1px solid rgba(169,175,186,.6);color:rgba(72,72,72,.6)}:host([readonly]){border:1px solid rgba(169,175,186,.6)}:host(:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #bfc3cb}:host([warning]){background-color:#fff;border:1px solid #f93}:host([warning][disabled]){border:1px solid rgba(255,153,51,.6);color:rgba(72,72,72,.6)}:host([warning][readonly]){border:1px solid rgba(255,153,51,.6)}:host([warning]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #ffb366}:host([error]),:host([error][warning]:not([focused])){background-color:#fff;border:1px solid #d94255}:host([error][disabled]),:host([error][warning]:not([focused])[disabled]){border:1px solid rgba(217,66,85,.6);color:rgba(72,72,72,.6)}:host([error][readonly]),:host([error][warning]:not([focused])[readonly]){border:1px solid rgba(217,66,85,.6)}:host([error]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover),:host([error][warning]:not([focused]):not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #e37180}:host([highlight]){background-color:#b0ffff;border:1px solid #a9afba}:host([highlight][disabled]){border:1px solid rgba(169,175,186,.6);color:rgba(72,72,72,.6);background-color:rgba(176,255,255,.6)}:host([highlight][readonly]){border:1px solid rgba(169,175,186,.6)}:host([highlight]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #bfc3cb}:host([indirect]){color:#009494;background-color:#effefe;border:1px solid #898623}:host([indirect][disabled]){border:1px solid rgba(137,134,35,.6);color:rgba(0,148,148,.6)}:host([indirect][readonly]){border:1px solid rgba(137,134,35,.6)}:host([indirect]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #a7a45a}');
|
package/lib/toggle/index.d.ts
CHANGED
|
@@ -71,6 +71,11 @@ export declare class Toggle extends ControlElement {
|
|
|
71
71
|
*/
|
|
72
72
|
protected render(): TemplateResult;
|
|
73
73
|
}
|
|
74
|
+
declare global {
|
|
75
|
+
interface HTMLElementTagNameMap {
|
|
76
|
+
'ef-toggle': Toggle;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
74
79
|
|
|
75
80
|
declare global {
|
|
76
81
|
interface HTMLElementTagNameMap {
|
package/lib/toggle/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { ControlElement, html, css } from '@refinitiv-ui/core';
|
|
3
|
-
import { customElement } from '@refinitiv-ui/core/
|
|
4
|
-
import { property } from '@refinitiv-ui/core/
|
|
3
|
+
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
|
|
4
|
+
import { property } from '@refinitiv-ui/core/decorators/property.js';
|
|
5
5
|
import { VERSION } from '../version.js';
|
|
6
6
|
/**
|
|
7
7
|
* Return the attribute that converted from the property
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { Tooltip } from '../index';
|
|
2
1
|
import type { TooltipCondition, TooltipRenderer } from '../helpers/types';
|
|
3
2
|
/**
|
|
4
3
|
* Add the new condition to the default tooltip
|
|
@@ -17,5 +16,5 @@ declare const removeTooltipCondition: (condition: TooltipCondition) => void;
|
|
|
17
16
|
* The default tooltip, which is used to replicate `title` attribute
|
|
18
17
|
* and to show tooltips for EF elements
|
|
19
18
|
*/
|
|
20
|
-
declare const tooltipElement: Tooltip;
|
|
19
|
+
declare const tooltipElement: import("..").Tooltip;
|
|
21
20
|
export { tooltipElement, addTooltipCondition, removeTooltipCondition };
|
package/lib/tooltip/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ declare class Tooltip extends BasicElement {
|
|
|
22
22
|
private clicked;
|
|
23
23
|
private timerTimeout?;
|
|
24
24
|
private contentNodes?;
|
|
25
|
+
protected readonly defaultRole: string | null;
|
|
25
26
|
/**
|
|
26
27
|
* A `CSSResultGroup` that will be used
|
|
27
28
|
* to style the host, slotted children
|
|
@@ -214,6 +215,11 @@ declare class Tooltip extends BasicElement {
|
|
|
214
215
|
*/
|
|
215
216
|
private get opened();
|
|
216
217
|
}
|
|
218
|
+
declare global {
|
|
219
|
+
interface HTMLElementTagNameMap {
|
|
220
|
+
'ef-tooltip': Tooltip;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
217
223
|
export * from './elements/tooltip-element.js';
|
|
218
224
|
export { registerOverflowTooltip, Tooltip, TooltipCondition, TooltipRenderer, TooltipPosition, TooltipTransitionStyle };
|
|
219
225
|
|
package/lib/tooltip/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
var Tooltip_1;
|
|
2
2
|
import { __decorate } from "tslib";
|
|
3
3
|
import { BasicElement, html, css, matches } from '@refinitiv-ui/core';
|
|
4
|
-
import { customElement } from '@refinitiv-ui/core/
|
|
5
|
-
import { property } from '@refinitiv-ui/core/
|
|
6
|
-
import { query } from '@refinitiv-ui/core/
|
|
4
|
+
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
|
|
5
|
+
import { property } from '@refinitiv-ui/core/decorators/property.js';
|
|
6
|
+
import { query } from '@refinitiv-ui/core/decorators/query.js';
|
|
7
7
|
import { VERSION } from '../version.js';
|
|
8
|
-
import { isSlotEmpty } from '@refinitiv-ui/utils/
|
|
8
|
+
import { isSlotEmpty } from '@refinitiv-ui/utils/is-slot-empty.js';
|
|
9
9
|
import '../overlay/index.js';
|
|
10
10
|
import './elements/title-tooltip.js';
|
|
11
11
|
import { register, deregister } from './managers/tooltip-manager.js';
|
|
@@ -30,6 +30,7 @@ let Tooltip = Tooltip_1 = class Tooltip extends BasicElement {
|
|
|
30
30
|
this.showDelay = 300;
|
|
31
31
|
this.hideDelay = 150;
|
|
32
32
|
this.clicked = false;
|
|
33
|
+
this.defaultRole = 'tooltip';
|
|
33
34
|
/**
|
|
34
35
|
* CSS selector to match the tooltip
|
|
35
36
|
*/
|
|
@@ -311,14 +312,12 @@ let Tooltip = Tooltip_1 = class Tooltip extends BasicElement {
|
|
|
311
312
|
* @returns {void}
|
|
312
313
|
*/
|
|
313
314
|
renderContentNode(contentNode) {
|
|
314
|
-
var _a;
|
|
315
315
|
if (contentNode instanceof Text && this.textContent === contentNode.textContent) {
|
|
316
316
|
return; /* Do not re-render the same text. Due to IE11 limitation we have to operate with text nodes */
|
|
317
317
|
}
|
|
318
|
-
if (
|
|
318
|
+
if (this.contentNodes?.length) {
|
|
319
319
|
this.contentNodes.forEach((node) => {
|
|
320
|
-
|
|
321
|
-
(_a = node.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(node);
|
|
320
|
+
node.parentNode?.removeChild(node);
|
|
322
321
|
});
|
|
323
322
|
}
|
|
324
323
|
if (contentNode instanceof DocumentFragment) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TimeoutTaskRunner } from '@refinitiv-ui/utils/
|
|
2
|
-
import { isIE } from '@refinitiv-ui/utils/
|
|
1
|
+
import { TimeoutTaskRunner } from '@refinitiv-ui/utils/async.js';
|
|
2
|
+
import { isIE } from '@refinitiv-ui/utils/browser.js';
|
|
3
3
|
/**
|
|
4
4
|
* Tooltip manager is here to avoid setting multiple
|
|
5
5
|
* events on document and do expensive pre-processing
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/overlay/themes/halo/dark';
|
|
2
2
|
|
|
3
3
|
elf.customStyles.define('ef-tooltip', ':host [part=tooltip]{--panel-background-color:#FFFFFF;pointer-events:none;border:1px solid hsla(220,12%,75%,.15);padding:4px 8px;background-color:#fff;border-radius:0;overflow:hidden;max-width:320px;overflow-wrap:break-word;word-wrap:break-word;margin:4px;border:none;min-height:18px;line-height:18px;color:#0d0d0d}:host(:not([position])) [part=tooltip],:host([position=auto]) [part=tooltip]{margin-top:20px;margin-left:0}');
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/overlay/themes/halo/light';
|
|
2
2
|
|
|
3
3
|
elf.customStyles.define('ef-tooltip', ':host [part=tooltip]{--panel-background-color:#FFF4CC;pointer-events:none;border:1px solid hsla(220,12%,75%,.15);padding:4px 8px;background-color:#fff4cc;border-radius:0;overflow:hidden;max-width:320px;overflow-wrap:break-word;word-wrap:break-word;margin:4px;border:none;min-height:18px;line-height:18px;color:#0d0d0d}:host(:not([position])) [part=tooltip],:host([position=auto]) [part=tooltip]{margin-top:20px;margin-left:0}');
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/overlay/themes/solar/charcoal';
|
|
2
2
|
|
|
3
3
|
elf.customStyles.define('ef-tooltip', ':host [part=tooltip]{--panel-background-color:#3C3C42;pointer-events:none;border:1px solid #000;padding:5px 8px;background-color:#3c3c42;border-radius:0;overflow:hidden;max-width:250px;overflow-wrap:break-word;word-wrap:break-word;margin:7px}:host(:not([position])) [part=tooltip],:host([position=auto]) [part=tooltip]{margin-top:20px;margin-left:0}');
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/overlay/themes/solar/pearl';
|
|
2
2
|
|
|
3
3
|
elf.customStyles.define('ef-tooltip', ':host [part=tooltip]{--panel-background-color:#FFFFFF;pointer-events:none;border:1px solid #a9afba;padding:5px 8px;background-color:#fff;border-radius:0;overflow:hidden;max-width:250px;overflow-wrap:break-word;word-wrap:break-word;margin:7px}:host(:not([position])) [part=tooltip],:host([position=auto]) [part=tooltip]{margin-top:20px;margin-left:0}');
|
|
@@ -62,6 +62,11 @@ export declare class TornadoChart extends ResponsiveElement {
|
|
|
62
62
|
*/
|
|
63
63
|
protected render(): TemplateResult;
|
|
64
64
|
}
|
|
65
|
+
declare global {
|
|
66
|
+
interface HTMLElementTagNameMap {
|
|
67
|
+
'ef-tornado-chart': TornadoChart;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
65
70
|
|
|
66
71
|
declare global {
|
|
67
72
|
interface HTMLElementTagNameMap {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { ResponsiveElement, html, css } from '@refinitiv-ui/core';
|
|
3
|
-
import { customElement } from '@refinitiv-ui/core/
|
|
4
|
-
import { property } from '@refinitiv-ui/core/
|
|
3
|
+
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
|
|
4
|
+
import { property } from '@refinitiv-ui/core/decorators/property.js';
|
|
5
5
|
import { VERSION } from '../../version.js';
|
|
6
6
|
import './tornado-item.js';
|
|
7
7
|
/**
|
|
@@ -94,6 +94,11 @@ export declare class TornadoItem extends BasicElement {
|
|
|
94
94
|
*/
|
|
95
95
|
protected render(): TemplateResult;
|
|
96
96
|
}
|
|
97
|
+
declare global {
|
|
98
|
+
interface HTMLElementTagNameMap {
|
|
99
|
+
'ef-tornado-item': TornadoItem;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
97
102
|
|
|
98
103
|
declare global {
|
|
99
104
|
interface HTMLElementTagNameMap {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { BasicElement, html, css } from '@refinitiv-ui/core';
|
|
3
|
-
import { customElement } from '@refinitiv-ui/core/
|
|
4
|
-
import { property } from '@refinitiv-ui/core/
|
|
5
|
-
import { ifDefined } from '@refinitiv-ui/core/
|
|
3
|
+
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
|
|
4
|
+
import { property } from '@refinitiv-ui/core/decorators/property.js';
|
|
5
|
+
import { ifDefined } from '@refinitiv-ui/core/directives/if-defined.js';
|
|
6
6
|
import { VERSION } from '../../version.js';
|
|
7
7
|
import '../../progress-bar/index.js';
|
|
8
8
|
import '../../layout/index.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
2
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/layout/themes/halo/dark';
|
|
2
|
+
import '@refinitiv-ui/elements/progress-bar/themes/halo/dark';
|
|
3
3
|
|
|
4
4
|
elf.customStyles.define('ef-tornado-chart', ':host{--primary-color:#6678FF;--secondary-color:#6678FF;--responsive-width:450;--primary-color:#6678FF;--secondary-color:#FFFFFF;font-size:12rem}:host [part=legend]{display:flex;justify-content:flex-end;margin-bottom:25px}:host [part=legend-item]{display:inline-flex;overflow:hidden;align-items:center;margin-right:10px}:host [part=legend][vertical]{justify-content:flex-start;flex-wrap:wrap}:host [part=primary-symbol],:host [part=secondary-symbol]{flex:none;width:15px;height:15px;border-radius:1px;margin-right:5px}:host [part=primary-symbol]{background-color:var(--primary-color)}:host [part=secondary-symbol]{background-color:var(--secondary-color)}:host [part=primary-label],:host [part=secondary-label]{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}');
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
2
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/layout/themes/halo/light';
|
|
2
|
+
import '@refinitiv-ui/elements/progress-bar/themes/halo/light';
|
|
3
3
|
|
|
4
4
|
elf.customStyles.define('ef-tornado-chart', ':host{--primary-color:#334BFF;--secondary-color:#6678FF;--responsive-width:450;--primary-color:#334BFF;--secondary-color:#000000;font-size:12rem}:host [part=legend]{display:flex;justify-content:flex-end;margin-bottom:25px}:host [part=legend-item]{display:inline-flex;overflow:hidden;align-items:center;margin-right:10px}:host [part=legend][vertical]{justify-content:flex-start;flex-wrap:wrap}:host [part=primary-symbol],:host [part=secondary-symbol]{flex:none;width:15px;height:15px;border-radius:1px;margin-right:5px}:host [part=primary-symbol]{background-color:var(--primary-color)}:host [part=secondary-symbol]{background-color:var(--secondary-color)}:host [part=primary-label],:host [part=secondary-label]{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}');
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
2
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/layout/themes/solar/charcoal';
|
|
2
|
+
import '@refinitiv-ui/elements/progress-bar/themes/solar/charcoal';
|
|
3
3
|
|
|
4
4
|
elf.customStyles.define('ef-tornado-chart', ':host{--primary-color:#FF9933;--secondary-color:#b35900;--responsive-width:450;--secondary-color:#BEC3CC;font-size:14rem}:host [part=legend]{display:flex;justify-content:flex-end;margin-bottom:25px}:host [part=legend-item]{display:inline-flex;overflow:hidden;align-items:center;margin-right:10px}:host [part=legend][vertical]{justify-content:flex-start;flex-wrap:wrap}:host [part=primary-symbol],:host [part=secondary-symbol]{flex:none;width:15px;height:15px;border-radius:1px;margin-right:5px}:host [part=primary-symbol]{background-color:var(--primary-color)}:host [part=secondary-symbol]{background-color:var(--secondary-color)}:host [part=primary-label],:host [part=secondary-label]{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}');
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import '@refinitiv-ui/elements/
|
|
2
|
-
import '@refinitiv-ui/elements/
|
|
1
|
+
import '@refinitiv-ui/elements/layout/themes/solar/pearl';
|
|
2
|
+
import '@refinitiv-ui/elements/progress-bar/themes/solar/pearl';
|
|
3
3
|
|
|
4
4
|
elf.customStyles.define('ef-tornado-chart', ':host{--primary-color:#EE7600;--secondary-color:#EE7600;--responsive-width:450;--secondary-color:#BEC3CC;font-size:14rem}:host [part=legend]{display:flex;justify-content:flex-end;margin-bottom:25px}:host [part=legend-item]{display:inline-flex;overflow:hidden;align-items:center;margin-right:10px}:host [part=legend][vertical]{justify-content:flex-start;flex-wrap:wrap}:host [part=primary-symbol],:host [part=secondary-symbol]{flex:none;width:15px;height:15px;border-radius:1px;margin-right:5px}:host [part=primary-symbol]{background-color:var(--primary-color)}:host [part=secondary-symbol]{background-color:var(--secondary-color)}:host [part=primary-label],:host [part=secondary-label]{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}');
|
|
5
5
|
|
|
@@ -101,11 +101,11 @@ export declare class TreeItem<T extends TreeDataItem = TreeDataItem> extends Con
|
|
|
101
101
|
*/
|
|
102
102
|
protected firstUpdated(changedProperties: PropertyValues): void;
|
|
103
103
|
/**
|
|
104
|
-
* Invoked
|
|
105
|
-
* @param changedProperties
|
|
104
|
+
* Invoked before update() to compute values needed during the update.
|
|
105
|
+
* @param changedProperties changed properties
|
|
106
106
|
* @returns {void}
|
|
107
107
|
*/
|
|
108
|
-
protected
|
|
108
|
+
protected willUpdate(changedProperties: PropertyValues): void;
|
|
109
109
|
/**
|
|
110
110
|
* A `TemplateResult` that will be used
|
|
111
111
|
* to render the updated internal template.
|
|
@@ -113,6 +113,11 @@ export declare class TreeItem<T extends TreeDataItem = TreeDataItem> extends Con
|
|
|
113
113
|
*/
|
|
114
114
|
protected render(): TemplateResult;
|
|
115
115
|
}
|
|
116
|
+
declare global {
|
|
117
|
+
interface HTMLElementTagNameMap {
|
|
118
|
+
'ef-tree-item': TreeItem;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
116
121
|
|
|
117
122
|
declare global {
|
|
118
123
|
interface HTMLElementTagNameMap {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { html, ControlElement } from '@refinitiv-ui/core';
|
|
3
|
-
import { customElement } from '@refinitiv-ui/core/
|
|
4
|
-
import { property } from '@refinitiv-ui/core/
|
|
3
|
+
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
|
|
4
|
+
import { property } from '@refinitiv-ui/core/decorators/property.js';
|
|
5
5
|
import { VERSION } from '../../version.js';
|
|
6
6
|
import '../../icon/index.js';
|
|
7
7
|
import { preload } from '../../icon/index.js';
|
|
@@ -170,12 +170,11 @@ let TreeItem = class TreeItem extends ControlElement {
|
|
|
170
170
|
this.setAttribute('aria-level', String(this.depth + 1));
|
|
171
171
|
}
|
|
172
172
|
/**
|
|
173
|
-
* Invoked
|
|
174
|
-
* @param changedProperties
|
|
173
|
+
* Invoked before update() to compute values needed during the update.
|
|
174
|
+
* @param changedProperties changed properties
|
|
175
175
|
* @returns {void}
|
|
176
176
|
*/
|
|
177
|
-
|
|
178
|
-
super.update(changedProperties);
|
|
177
|
+
willUpdate(changedProperties) {
|
|
179
178
|
if (changedProperties.has('checkedState')) {
|
|
180
179
|
this.checkedChanged();
|
|
181
180
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JSXInterface } from '../../jsx';
|
|
2
2
|
import { PropertyValues, TapEvent } from '@refinitiv-ui/core';
|
|
3
|
-
import { CollectionComposer } from '@refinitiv-ui/utils/
|
|
3
|
+
import { CollectionComposer } from '@refinitiv-ui/utils/collection.js';
|
|
4
4
|
import { List } from '../../list/index.js';
|
|
5
5
|
import { TreeRenderer } from '../helpers/renderer.js';
|
|
6
6
|
import type { TreeData, TreeDataItem, TreeFilter } from '../helpers/types';
|
|
@@ -14,7 +14,6 @@ import { TreeManagerMode } from '../managers/tree-manager.js';
|
|
|
14
14
|
*
|
|
15
15
|
* @attr {boolean} [stateless=false] - Disable selections
|
|
16
16
|
* @prop {boolean} [stateless=false] - Disable selections
|
|
17
|
-
*
|
|
18
17
|
*/
|
|
19
18
|
export declare class Tree<T extends TreeDataItem = TreeDataItem> extends List<T> {
|
|
20
19
|
/**
|
|
@@ -127,7 +126,7 @@ export declare class Tree<T extends TreeDataItem = TreeDataItem> extends List<T>
|
|
|
127
126
|
/**
|
|
128
127
|
* @override
|
|
129
128
|
*/
|
|
130
|
-
protected
|
|
129
|
+
protected willUpdate(changeProperties: PropertyValues): void;
|
|
131
130
|
/**
|
|
132
131
|
* Filter the internal items by query changes items' hidden state
|
|
133
132
|
* @returns {void}
|
|
@@ -187,6 +186,11 @@ export declare class Tree<T extends TreeDataItem = TreeDataItem> extends List<T>
|
|
|
187
186
|
*/
|
|
188
187
|
protected get mode(): TreeManagerMode;
|
|
189
188
|
}
|
|
189
|
+
declare global {
|
|
190
|
+
interface HTMLElementTagNameMap {
|
|
191
|
+
'ef-tree': Tree;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
190
194
|
|
|
191
195
|
declare global {
|
|
192
196
|
interface HTMLElementTagNameMap {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { customElement } from '@refinitiv-ui/core/
|
|
3
|
-
import { property } from '@refinitiv-ui/core/
|
|
2
|
+
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
|
|
3
|
+
import { property } from '@refinitiv-ui/core/decorators/property.js';
|
|
4
4
|
import { VERSION } from '../../version.js';
|
|
5
5
|
import { List } from '../../list/index.js';
|
|
6
6
|
import { TreeRenderer } from '../helpers/renderer.js';
|
|
@@ -16,7 +16,6 @@ const EXPAND_TOGGLE_ATTR = 'expand-toggle';
|
|
|
16
16
|
*
|
|
17
17
|
* @attr {boolean} [stateless=false] - Disable selections
|
|
18
18
|
* @prop {boolean} [stateless=false] - Disable selections
|
|
19
|
-
*
|
|
20
19
|
*/
|
|
21
20
|
let Tree = class Tree extends List {
|
|
22
21
|
constructor() {
|
|
@@ -234,14 +233,14 @@ let Tree = class Tree extends List {
|
|
|
234
233
|
/**
|
|
235
234
|
* @override
|
|
236
235
|
*/
|
|
237
|
-
|
|
238
|
-
|
|
236
|
+
willUpdate(changeProperties) {
|
|
237
|
+
super.willUpdate(changeProperties);
|
|
238
|
+
if (changeProperties.has('noRelation') || changeProperties.has('multiple')) {
|
|
239
239
|
this.manager.setMode(this.mode);
|
|
240
240
|
}
|
|
241
|
-
if (
|
|
241
|
+
if (changeProperties.has('query') || changeProperties.has('data')) {
|
|
242
242
|
this.filterItems();
|
|
243
243
|
}
|
|
244
|
-
super.update(changedProperties);
|
|
245
244
|
}
|
|
246
245
|
/**
|
|
247
246
|
* Filter the internal items by query changes items' hidden state
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { Renderer } from '../../list/renderer.js';
|
|
2
2
|
import '../elements/tree-item.js';
|
|
3
3
|
export declare class TreeRenderer extends Renderer {
|
|
4
|
+
/**
|
|
5
|
+
* Renderer key prefix, used in combination with item value to give unique id to each item
|
|
6
|
+
*/
|
|
7
|
+
key: string;
|
|
4
8
|
constructor(scope?: unknown);
|
|
5
9
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { uuid } from '@refinitiv-ui/utils/uuid.js';
|
|
1
2
|
import { TreeManager, TreeManagerMode, CheckedState } from '../managers/tree-manager.js';
|
|
2
3
|
import { Renderer } from '../../list/renderer.js';
|
|
4
|
+
import { getItemId } from '../../list/helpers/item-id.js';
|
|
3
5
|
import '../elements/tree-item.js';
|
|
4
6
|
export class TreeRenderer extends Renderer {
|
|
5
7
|
constructor(scope) {
|
|
@@ -7,7 +9,6 @@ export class TreeRenderer extends Renderer {
|
|
|
7
9
|
let currentMode;
|
|
8
10
|
let currentComposer;
|
|
9
11
|
super((item, composer, element = document.createElement('ef-tree-item')) => {
|
|
10
|
-
const el = element;
|
|
11
12
|
const multiple = !!scope && scope.multiple === true;
|
|
12
13
|
const noRelation = !!scope && scope.noRelation === true;
|
|
13
14
|
const mode = !multiple || !noRelation ? TreeManagerMode.RELATIONAL : TreeManagerMode.INDEPENDENT;
|
|
@@ -16,18 +17,24 @@ export class TreeRenderer extends Renderer {
|
|
|
16
17
|
currentComposer = composer;
|
|
17
18
|
manager = new TreeManager(composer, mode);
|
|
18
19
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
element.multiple = multiple;
|
|
21
|
+
element.item = item;
|
|
22
|
+
element.tabIndex = -1;
|
|
23
|
+
element.id = getItemId(this.key, item.value);
|
|
24
|
+
element.depth = composer.getItemDepth(item);
|
|
25
|
+
element.parent = composer.getItemChildren(item).length > 0;
|
|
26
|
+
element.expanded = manager.isItemExpanded(item);
|
|
27
|
+
element.checkedState = !multiple && element.parent ? CheckedState.UNCHECKED : manager.getItemCheckedState(item);
|
|
28
|
+
element.icon = composer.getItemPropertyValue(item, 'icon');
|
|
29
|
+
element.label = composer.getItemPropertyValue(item, 'label');
|
|
30
|
+
element.disabled = composer.getItemPropertyValue(item, 'disabled') === true;
|
|
31
|
+
element.readonly = composer.getItemPropertyValue(item, 'readonly') === true;
|
|
32
|
+
element.highlighted = composer.getItemPropertyValue(item, 'highlighted') === true;
|
|
33
|
+
return element;
|
|
31
34
|
});
|
|
35
|
+
/**
|
|
36
|
+
* Renderer key prefix, used in combination with item value to give unique id to each item
|
|
37
|
+
*/
|
|
38
|
+
this.key = uuid();
|
|
32
39
|
}
|
|
33
40
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CollectionComposer, DataItem } from '@refinitiv-ui/utils/
|
|
1
|
+
import type { CollectionComposer, DataItem } from '@refinitiv-ui/utils/collection.js';
|
|
2
2
|
export declare type TreeData<T extends TreeDataItem = TreeDataItem> = T[] | CollectionComposer<T> | null;
|
|
3
3
|
export interface TreeDataItem extends DataItem {
|
|
4
4
|
/**
|