@refinitiv-ui/elements 5.11.0 → 5.12.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/package.json +21 -290
- package/lib/accordion/index.d.ts +0 -76
- package/lib/accordion/index.js +0 -136
- package/lib/accordion/themes/halo/dark/index.js +0 -3
- package/lib/accordion/themes/halo/light/index.js +0 -3
- package/lib/accordion/themes/solar/charcoal/index.js +0 -3
- package/lib/accordion/themes/solar/pearl/index.js +0 -3
- package/lib/appstate-bar/index.d.ts +0 -65
- package/lib/appstate-bar/index.js +0 -100
- package/lib/appstate-bar/themes/halo/dark/index.js +0 -3
- package/lib/appstate-bar/themes/halo/light/index.js +0 -3
- package/lib/appstate-bar/themes/solar/charcoal/index.js +0 -3
- package/lib/appstate-bar/themes/solar/pearl/index.js +0 -3
- package/lib/autosuggest/helpers/types.d.ts +0 -54
- package/lib/autosuggest/helpers/types.js +0 -1
- package/lib/autosuggest/helpers/utils.d.ts +0 -39
- package/lib/autosuggest/helpers/utils.js +0 -75
- package/lib/autosuggest/index.d.ts +0 -538
- package/lib/autosuggest/index.js +0 -1255
- package/lib/autosuggest/themes/halo/dark/index.js +0 -5
- package/lib/autosuggest/themes/halo/light/index.js +0 -5
- package/lib/autosuggest/themes/solar/charcoal/index.js +0 -5
- package/lib/autosuggest/themes/solar/pearl/index.js +0 -5
- package/lib/button/index.d.ts +0 -132
- package/lib/button/index.js +0 -223
- package/lib/button/themes/halo/dark/index.js +0 -3
- package/lib/button/themes/halo/light/index.js +0 -3
- package/lib/button/themes/solar/charcoal/index.js +0 -3
- package/lib/button/themes/solar/pearl/index.js +0 -3
- package/lib/button-bar/index.d.ts +0 -76
- package/lib/button-bar/index.js +0 -155
- package/lib/button-bar/themes/halo/dark/index.js +0 -3
- package/lib/button-bar/themes/halo/light/index.js +0 -3
- package/lib/button-bar/themes/solar/charcoal/index.js +0 -3
- package/lib/button-bar/themes/solar/pearl/index.js +0 -3
- package/lib/calendar/constants.d.ts +0 -26
- package/lib/calendar/constants.js +0 -28
- package/lib/calendar/index.d.ts +0 -412
- package/lib/calendar/index.js +0 -1274
- package/lib/calendar/locales.d.ts +0 -1
- package/lib/calendar/locales.js +0 -41
- package/lib/calendar/themes/halo/dark/index.js +0 -3
- package/lib/calendar/themes/halo/light/index.js +0 -3
- package/lib/calendar/themes/solar/charcoal/index.js +0 -3
- package/lib/calendar/themes/solar/pearl/index.js +0 -3
- package/lib/calendar/types.d.ts +0 -32
- package/lib/calendar/types.js +0 -1
- package/lib/calendar/utils.d.ts +0 -42
- package/lib/calendar/utils.js +0 -120
- package/lib/canvas/index.d.ts +0 -101
- package/lib/canvas/index.js +0 -173
- package/lib/canvas/themes/halo/dark/index.js +0 -2
- package/lib/canvas/themes/halo/light/index.js +0 -2
- package/lib/canvas/themes/solar/charcoal/index.js +0 -2
- package/lib/canvas/themes/solar/pearl/index.js +0 -2
- package/lib/card/helpers/types.d.ts +0 -12
- package/lib/card/helpers/types.js +0 -1
- package/lib/card/index.d.ts +0 -142
- package/lib/card/index.js +0 -248
- package/lib/card/themes/halo/dark/index.js +0 -5
- package/lib/card/themes/halo/light/index.js +0 -5
- package/lib/card/themes/solar/charcoal/index.js +0 -5
- package/lib/card/themes/solar/pearl/index.js +0 -5
- package/lib/chart/helpers/index.d.ts +0 -2
- package/lib/chart/helpers/index.js +0 -2
- package/lib/chart/helpers/legend.d.ts +0 -5
- package/lib/chart/helpers/legend.js +0 -78
- package/lib/chart/helpers/merge.d.ts +0 -15
- package/lib/chart/helpers/merge.js +0 -28
- package/lib/chart/helpers/types.d.ts +0 -69
- package/lib/chart/helpers/types.js +0 -1
- package/lib/chart/index.d.ts +0 -187
- package/lib/chart/index.js +0 -491
- package/lib/chart/plugins/doughnut-center-label.d.ts +0 -3
- package/lib/chart/plugins/doughnut-center-label.js +0 -196
- package/lib/chart/themes/halo/dark/index.js +0 -4
- package/lib/chart/themes/halo/light/index.js +0 -4
- package/lib/chart/themes/solar/charcoal/index.js +0 -4
- package/lib/chart/themes/solar/pearl/index.js +0 -4
- package/lib/checkbox/index.d.ts +0 -97
- package/lib/checkbox/index.js +0 -194
- package/lib/checkbox/themes/halo/dark/index.js +0 -4
- package/lib/checkbox/themes/halo/light/index.js +0 -4
- package/lib/checkbox/themes/solar/charcoal/index.js +0 -4
- package/lib/checkbox/themes/solar/pearl/index.js +0 -4
- package/lib/clock/index.d.ts +0 -321
- package/lib/clock/index.js +0 -583
- package/lib/clock/themes/halo/dark/index.js +0 -2
- package/lib/clock/themes/halo/light/index.js +0 -2
- package/lib/clock/themes/solar/charcoal/index.js +0 -2
- package/lib/clock/themes/solar/pearl/index.js +0 -2
- package/lib/clock/utils/TickManager.d.ts +0 -14
- package/lib/clock/utils/TickManager.js +0 -66
- package/lib/clock/utils/timestamps.d.ts +0 -6
- package/lib/clock/utils/timestamps.js +0 -6
- package/lib/collapse/index.d.ts +0 -119
- package/lib/collapse/index.js +0 -197
- package/lib/collapse/themes/halo/dark/index.js +0 -5
- package/lib/collapse/themes/halo/light/index.js +0 -5
- package/lib/collapse/themes/solar/charcoal/index.js +0 -5
- package/lib/collapse/themes/solar/pearl/index.js +0 -5
- package/lib/color-dialog/elements/color-palettes.d.ts +0 -52
- package/lib/color-dialog/elements/color-palettes.js +0 -101
- package/lib/color-dialog/elements/grayscale-palettes.d.ts +0 -67
- package/lib/color-dialog/elements/grayscale-palettes.js +0 -161
- package/lib/color-dialog/elements/palettes.d.ts +0 -65
- package/lib/color-dialog/elements/palettes.js +0 -132
- package/lib/color-dialog/helpers/color-helpers.d.ts +0 -16
- package/lib/color-dialog/helpers/color-helpers.js +0 -161
- package/lib/color-dialog/helpers/value-model.d.ts +0 -75
- package/lib/color-dialog/helpers/value-model.js +0 -141
- package/lib/color-dialog/index.d.ts +0 -232
- package/lib/color-dialog/index.js +0 -459
- package/lib/color-dialog/themes/halo/dark/index.js +0 -7
- package/lib/color-dialog/themes/halo/light/index.js +0 -7
- package/lib/color-dialog/themes/solar/charcoal/index.js +0 -7
- package/lib/color-dialog/themes/solar/pearl/index.js +0 -7
- package/lib/combo-box/helpers/filter.d.ts +0 -10
- package/lib/combo-box/helpers/filter.js +0 -29
- package/lib/combo-box/helpers/keyboard-event.d.ts +0 -17
- package/lib/combo-box/helpers/keyboard-event.js +0 -19
- package/lib/combo-box/helpers/renderer.d.ts +0 -8
- package/lib/combo-box/helpers/renderer.js +0 -24
- package/lib/combo-box/helpers/types.d.ts +0 -11
- package/lib/combo-box/helpers/types.js +0 -1
- package/lib/combo-box/index.d.ts +0 -551
- package/lib/combo-box/index.js +0 -1183
- package/lib/combo-box/themes/halo/dark/index.js +0 -7
- package/lib/combo-box/themes/halo/light/index.js +0 -7
- package/lib/combo-box/themes/solar/charcoal/index.js +0 -7
- package/lib/combo-box/themes/solar/pearl/index.js +0 -7
- package/lib/counter/index.d.ts +0 -91
- package/lib/counter/index.js +0 -154
- package/lib/counter/themes/halo/dark/index.js +0 -3
- package/lib/counter/themes/halo/light/index.js +0 -3
- package/lib/counter/themes/solar/charcoal/index.js +0 -3
- package/lib/counter/themes/solar/pearl/index.js +0 -3
- package/lib/counter/utils.d.ts +0 -13
- package/lib/counter/utils.js +0 -52
- package/lib/datetime-picker/index.d.ts +0 -509
- package/lib/datetime-picker/index.js +0 -1175
- package/lib/datetime-picker/locales.d.ts +0 -8
- package/lib/datetime-picker/locales.js +0 -57
- package/lib/datetime-picker/themes/halo/dark/index.js +0 -7
- package/lib/datetime-picker/themes/halo/light/index.js +0 -7
- package/lib/datetime-picker/themes/solar/charcoal/index.js +0 -7
- package/lib/datetime-picker/themes/solar/pearl/index.js +0 -7
- package/lib/datetime-picker/types.d.ts +0 -3
- package/lib/datetime-picker/types.js +0 -1
- package/lib/datetime-picker/utils.d.ts +0 -55
- package/lib/datetime-picker/utils.js +0 -92
- package/lib/dialog/draggable-element.d.ts +0 -14
- package/lib/dialog/draggable-element.js +0 -221
- package/lib/dialog/index.d.ts +0 -196
- package/lib/dialog/index.js +0 -328
- package/lib/dialog/themes/halo/dark/index.js +0 -7
- package/lib/dialog/themes/halo/light/index.js +0 -7
- package/lib/dialog/themes/solar/charcoal/index.js +0 -7
- package/lib/dialog/themes/solar/pearl/index.js +0 -7
- package/lib/email-field/index.d.ts +0 -80
- package/lib/email-field/index.js +0 -86
- package/lib/email-field/themes/halo/dark/index.js +0 -3
- package/lib/email-field/themes/halo/light/index.js +0 -3
- package/lib/email-field/themes/solar/charcoal/index.js +0 -3
- package/lib/email-field/themes/solar/pearl/index.js +0 -3
- package/lib/events.d.ts +0 -121
- package/lib/events.js +0 -1
- package/lib/flag/index.d.ts +0 -96
- package/lib/flag/index.js +0 -168
- package/lib/flag/themes/halo/dark/index.js +0 -2
- package/lib/flag/themes/halo/light/index.js +0 -2
- package/lib/flag/themes/solar/charcoal/index.js +0 -2
- package/lib/flag/themes/solar/pearl/index.js +0 -2
- package/lib/flag/utils/FlagLoader.d.ts +0 -47
- package/lib/flag/utils/FlagLoader.js +0 -86
- package/lib/header/index.d.ts +0 -46
- package/lib/header/index.js +0 -73
- package/lib/header/themes/halo/dark/index.js +0 -2
- package/lib/header/themes/halo/light/index.js +0 -2
- package/lib/header/themes/solar/charcoal/index.js +0 -2
- package/lib/header/themes/solar/pearl/index.js +0 -2
- package/lib/heatmap/helpers/color.d.ts +0 -30
- package/lib/heatmap/helpers/color.js +0 -68
- package/lib/heatmap/helpers/text.d.ts +0 -26
- package/lib/heatmap/helpers/text.js +0 -91
- package/lib/heatmap/helpers/track.d.ts +0 -102
- package/lib/heatmap/helpers/track.js +0 -160
- package/lib/heatmap/helpers/types.d.ts +0 -40
- package/lib/heatmap/helpers/types.js +0 -1
- package/lib/heatmap/index.d.ts +0 -453
- package/lib/heatmap/index.js +0 -1103
- package/lib/heatmap/themes/halo/dark/index.js +0 -4
- package/lib/heatmap/themes/halo/light/index.js +0 -4
- package/lib/heatmap/themes/solar/charcoal/index.js +0 -4
- package/lib/heatmap/themes/solar/pearl/index.js +0 -4
- package/lib/icon/index.d.ts +0 -90
- package/lib/icon/index.js +0 -171
- package/lib/icon/themes/halo/dark/index.js +0 -2
- package/lib/icon/themes/halo/light/index.js +0 -2
- package/lib/icon/themes/solar/charcoal/index.js +0 -2
- package/lib/icon/themes/solar/pearl/index.js +0 -2
- package/lib/icon/utils/IconLoader.d.ts +0 -52
- package/lib/icon/utils/IconLoader.js +0 -93
- package/lib/index.d.ts +0 -3
- package/lib/index.js +0 -3
- package/lib/interactive-chart/helpers/merge.d.ts +0 -15
- package/lib/interactive-chart/helpers/merge.js +0 -28
- package/lib/interactive-chart/helpers/types.d.ts +0 -45
- package/lib/interactive-chart/helpers/types.js +0 -6
- package/lib/interactive-chart/index.d.ts +0 -383
- package/lib/interactive-chart/index.js +0 -1093
- package/lib/interactive-chart/themes/halo/dark/index.js +0 -3
- package/lib/interactive-chart/themes/halo/light/index.js +0 -3
- package/lib/interactive-chart/themes/solar/charcoal/index.js +0 -3
- package/lib/interactive-chart/themes/solar/pearl/index.js +0 -3
- package/lib/item/helpers/types.d.ts +0 -57
- package/lib/item/helpers/types.js +0 -1
- package/lib/item/index.d.ts +0 -159
- package/lib/item/index.js +0 -272
- package/lib/item/themes/halo/dark/index.js +0 -4
- package/lib/item/themes/halo/light/index.js +0 -4
- package/lib/item/themes/solar/charcoal/index.js +0 -4
- package/lib/item/themes/solar/pearl/index.js +0 -4
- package/lib/label/index.d.ts +0 -102
- package/lib/label/index.js +0 -245
- package/lib/label/themes/halo/dark/index.js +0 -3
- package/lib/label/themes/halo/light/index.js +0 -3
- package/lib/label/themes/solar/charcoal/index.js +0 -3
- package/lib/label/themes/solar/pearl/index.js +0 -3
- package/lib/layout/index.d.ts +0 -107
- package/lib/layout/index.js +0 -212
- package/lib/layout/themes/halo/dark/index.js +0 -2
- package/lib/layout/themes/halo/light/index.js +0 -2
- package/lib/layout/themes/solar/charcoal/index.js +0 -2
- package/lib/layout/themes/solar/pearl/index.js +0 -2
- package/lib/led-gauge/index.d.ts +0 -144
- package/lib/led-gauge/index.js +0 -438
- package/lib/led-gauge/themes/halo/dark/index.js +0 -3
- package/lib/led-gauge/themes/halo/light/index.js +0 -3
- package/lib/led-gauge/themes/solar/charcoal/index.js +0 -3
- package/lib/led-gauge/themes/solar/pearl/index.js +0 -3
- package/lib/list/extensible-function.d.ts +0 -8
- package/lib/list/extensible-function.js +0 -13
- package/lib/list/helpers/list-renderer.d.ts +0 -9
- package/lib/list/helpers/list-renderer.js +0 -37
- package/lib/list/helpers/types.d.ts +0 -3
- package/lib/list/helpers/types.js +0 -1
- package/lib/list/index.d.ts +0 -313
- package/lib/list/index.js +0 -640
- package/lib/list/renderer.d.ts +0 -36
- package/lib/list/renderer.js +0 -9
- package/lib/list/themes/halo/dark/index.js +0 -3
- package/lib/list/themes/halo/light/index.js +0 -3
- package/lib/list/themes/solar/charcoal/index.js +0 -3
- package/lib/list/themes/solar/pearl/index.js +0 -3
- package/lib/loader/index.d.ts +0 -41
- package/lib/loader/index.js +0 -61
- package/lib/loader/themes/halo/dark/index.js +0 -2
- package/lib/loader/themes/halo/light/index.js +0 -2
- package/lib/loader/themes/solar/charcoal/index.js +0 -2
- package/lib/loader/themes/solar/pearl/index.js +0 -2
- package/lib/multi-input/helpers/types.d.ts +0 -11
- package/lib/multi-input/helpers/types.js +0 -1
- package/lib/multi-input/index.d.ts +0 -301
- package/lib/multi-input/index.js +0 -594
- package/lib/multi-input/themes/halo/dark/index.js +0 -4
- package/lib/multi-input/themes/halo/light/index.js +0 -4
- package/lib/multi-input/themes/solar/charcoal/index.js +0 -4
- package/lib/multi-input/themes/solar/pearl/index.js +0 -4
- package/lib/notification/elements/notification-tray.d.ts +0 -97
- package/lib/notification/elements/notification-tray.js +0 -167
- package/lib/notification/elements/notification.d.ts +0 -90
- package/lib/notification/elements/notification.js +0 -154
- package/lib/notification/helpers/status.d.ts +0 -30
- package/lib/notification/helpers/status.js +0 -130
- package/lib/notification/helpers/types.d.ts +0 -10
- package/lib/notification/helpers/types.js +0 -1
- package/lib/notification/index.d.ts +0 -2
- package/lib/notification/index.js +0 -2
- package/lib/notification/themes/halo/dark/index.js +0 -5
- package/lib/notification/themes/halo/light/index.js +0 -5
- package/lib/notification/themes/solar/charcoal/index.js +0 -5
- package/lib/notification/themes/solar/pearl/index.js +0 -5
- package/lib/number-field/index.d.ts +0 -339
- package/lib/number-field/index.js +0 -740
- package/lib/number-field/themes/halo/dark/index.js +0 -3
- package/lib/number-field/themes/halo/light/index.js +0 -3
- package/lib/number-field/themes/solar/charcoal/index.js +0 -3
- package/lib/number-field/themes/solar/pearl/index.js +0 -3
- package/lib/overlay/elements/overlay-backdrop.d.ts +0 -46
- package/lib/overlay/elements/overlay-backdrop.js +0 -64
- package/lib/overlay/elements/overlay-viewport.d.ts +0 -40
- package/lib/overlay/elements/overlay-viewport.js +0 -52
- package/lib/overlay/elements/overlay.d.ts +0 -408
- package/lib/overlay/elements/overlay.js +0 -1426
- package/lib/overlay/helpers/functions.d.ts +0 -13
- package/lib/overlay/helpers/functions.js +0 -16
- package/lib/overlay/helpers/types.d.ts +0 -97
- package/lib/overlay/helpers/types.js +0 -16
- package/lib/overlay/index.d.ts +0 -2
- package/lib/overlay/index.js +0 -1
- package/lib/overlay/managers/backdrop-manager.d.ts +0 -45
- package/lib/overlay/managers/backdrop-manager.js +0 -96
- package/lib/overlay/managers/close-manager.d.ts +0 -54
- package/lib/overlay/managers/close-manager.js +0 -138
- package/lib/overlay/managers/focus-manager.d.ts +0 -71
- package/lib/overlay/managers/focus-manager.js +0 -228
- package/lib/overlay/managers/interaction-lock-manager.d.ts +0 -138
- package/lib/overlay/managers/interaction-lock-manager.js +0 -375
- package/lib/overlay/managers/viewport-manager.d.ts +0 -93
- package/lib/overlay/managers/viewport-manager.js +0 -211
- package/lib/overlay/managers/zindex-manager.d.ts +0 -80
- package/lib/overlay/managers/zindex-manager.js +0 -195
- package/lib/overlay/themes/halo/dark/index.js +0 -4
- package/lib/overlay/themes/halo/light/index.js +0 -4
- package/lib/overlay/themes/solar/charcoal/index.js +0 -4
- package/lib/overlay/themes/solar/pearl/index.js +0 -4
- package/lib/overlay-menu/helpers/types.d.ts +0 -8
- package/lib/overlay-menu/helpers/types.js +0 -1
- package/lib/overlay-menu/index.d.ts +0 -387
- package/lib/overlay-menu/index.js +0 -935
- package/lib/overlay-menu/managers/menu-manager.d.ts +0 -98
- package/lib/overlay-menu/managers/menu-manager.js +0 -240
- package/lib/overlay-menu/themes/halo/dark/index.js +0 -5
- package/lib/overlay-menu/themes/halo/light/index.js +0 -5
- package/lib/overlay-menu/themes/solar/charcoal/index.js +0 -5
- package/lib/overlay-menu/themes/solar/pearl/index.js +0 -5
- package/lib/pagination/index.d.ts +0 -275
- package/lib/pagination/index.js +0 -552
- package/lib/pagination/themes/halo/dark/index.js +0 -6
- package/lib/pagination/themes/halo/light/index.js +0 -6
- package/lib/pagination/themes/solar/charcoal/index.js +0 -6
- package/lib/pagination/themes/solar/pearl/index.js +0 -6
- package/lib/panel/index.d.ts +0 -48
- package/lib/panel/index.js +0 -74
- package/lib/panel/themes/halo/dark/index.js +0 -2
- package/lib/panel/themes/halo/light/index.js +0 -2
- package/lib/panel/themes/solar/charcoal/index.js +0 -2
- package/lib/panel/themes/solar/pearl/index.js +0 -2
- package/lib/password-field/index.d.ts +0 -89
- package/lib/password-field/index.js +0 -112
- package/lib/password-field/themes/halo/dark/index.js +0 -3
- package/lib/password-field/themes/halo/light/index.js +0 -3
- package/lib/password-field/themes/solar/charcoal/index.js +0 -3
- package/lib/password-field/themes/solar/pearl/index.js +0 -3
- package/lib/pill/index.d.ts +0 -97
- package/lib/pill/index.js +0 -160
- package/lib/pill/themes/halo/dark/index.js +0 -3
- package/lib/pill/themes/halo/light/index.js +0 -3
- package/lib/pill/themes/solar/charcoal/index.js +0 -3
- package/lib/pill/themes/solar/pearl/index.js +0 -3
- package/lib/progress-bar/index.d.ts +0 -82
- package/lib/progress-bar/index.js +0 -157
- package/lib/progress-bar/themes/halo/dark/index.js +0 -2
- package/lib/progress-bar/themes/halo/light/index.js +0 -2
- package/lib/progress-bar/themes/solar/charcoal/index.js +0 -2
- package/lib/progress-bar/themes/solar/pearl/index.js +0 -2
- package/lib/radio-button/index.d.ts +0 -123
- package/lib/radio-button/index.js +0 -261
- package/lib/radio-button/radio-button-registry.d.ts +0 -22
- package/lib/radio-button/radio-button-registry.js +0 -93
- package/lib/radio-button/themes/halo/dark/index.js +0 -3
- package/lib/radio-button/themes/halo/light/index.js +0 -3
- package/lib/radio-button/themes/solar/charcoal/index.js +0 -3
- package/lib/radio-button/themes/solar/pearl/index.js +0 -3
- package/lib/rating/index.d.ts +0 -91
- package/lib/rating/index.js +0 -157
- package/lib/rating/themes/halo/dark/index.js +0 -2
- package/lib/rating/themes/halo/light/index.js +0 -2
- package/lib/rating/themes/solar/charcoal/index.js +0 -2
- package/lib/rating/themes/solar/pearl/index.js +0 -2
- package/lib/search-field/index.d.ts +0 -77
- package/lib/search-field/index.js +0 -84
- package/lib/search-field/themes/halo/dark/index.js +0 -3
- package/lib/search-field/themes/halo/light/index.js +0 -3
- package/lib/search-field/themes/solar/charcoal/index.js +0 -3
- package/lib/search-field/themes/solar/pearl/index.js +0 -3
- package/lib/select/helpers/types.d.ts +0 -3
- package/lib/select/helpers/types.js +0 -1
- package/lib/select/index.d.ts +0 -396
- package/lib/select/index.js +0 -981
- package/lib/select/themes/halo/dark/index.js +0 -5
- package/lib/select/themes/halo/light/index.js +0 -5
- package/lib/select/themes/solar/charcoal/index.js +0 -5
- package/lib/select/themes/solar/pearl/index.js +0 -5
- package/lib/sidebar-layout/index.d.ts +0 -70
- package/lib/sidebar-layout/index.js +0 -134
- package/lib/sidebar-layout/themes/halo/dark/index.js +0 -3
- package/lib/sidebar-layout/themes/halo/light/index.js +0 -3
- package/lib/sidebar-layout/themes/solar/charcoal/index.js +0 -3
- package/lib/sidebar-layout/themes/solar/pearl/index.js +0 -3
- package/lib/slider/index.d.ts +0 -409
- package/lib/slider/index.js +0 -1187
- package/lib/slider/themes/halo/dark/index.js +0 -3
- package/lib/slider/themes/halo/light/index.js +0 -3
- package/lib/slider/themes/solar/charcoal/index.js +0 -3
- package/lib/slider/themes/solar/pearl/index.js +0 -3
- package/lib/sparkline/index.d.ts +0 -109
- package/lib/sparkline/index.js +0 -188
- package/lib/sparkline/themes/halo/dark/index.js +0 -2
- package/lib/sparkline/themes/halo/light/index.js +0 -2
- package/lib/sparkline/themes/solar/charcoal/index.js +0 -2
- package/lib/sparkline/themes/solar/pearl/index.js +0 -2
- package/lib/swing-gauge/const.d.ts +0 -22
- package/lib/swing-gauge/const.js +0 -26
- package/lib/swing-gauge/helpers.d.ts +0 -8
- package/lib/swing-gauge/helpers.js +0 -105
- package/lib/swing-gauge/index.d.ts +0 -296
- package/lib/swing-gauge/index.js +0 -764
- package/lib/swing-gauge/themes/halo/dark/index.js +0 -3
- package/lib/swing-gauge/themes/halo/light/index.js +0 -3
- package/lib/swing-gauge/themes/solar/charcoal/index.js +0 -3
- package/lib/swing-gauge/themes/solar/pearl/index.js +0 -3
- package/lib/swing-gauge/types.d.ts +0 -34
- package/lib/swing-gauge/types.js +0 -1
- package/lib/tab/index.d.ts +0 -118
- package/lib/tab/index.js +0 -208
- package/lib/tab/themes/halo/dark/index.js +0 -4
- package/lib/tab/themes/halo/light/index.js +0 -4
- package/lib/tab/themes/solar/charcoal/index.js +0 -4
- package/lib/tab/themes/solar/pearl/index.js +0 -4
- package/lib/tab-bar/helpers/animate.d.ts +0 -16
- package/lib/tab-bar/helpers/animate.js +0 -53
- package/lib/tab-bar/index.d.ts +0 -108
- package/lib/tab-bar/index.js +0 -218
- package/lib/tab-bar/themes/halo/dark/index.js +0 -4
- package/lib/tab-bar/themes/halo/light/index.js +0 -4
- package/lib/tab-bar/themes/solar/charcoal/index.js +0 -4
- package/lib/tab-bar/themes/solar/pearl/index.js +0 -4
- package/lib/text-field/index.d.ts +0 -151
- package/lib/text-field/index.js +0 -260
- package/lib/text-field/themes/halo/dark/index.js +0 -3
- package/lib/text-field/themes/halo/light/index.js +0 -3
- package/lib/text-field/themes/solar/charcoal/index.js +0 -3
- package/lib/text-field/themes/solar/pearl/index.js +0 -3
- package/lib/time-picker/index.d.ts +0 -412
- package/lib/time-picker/index.js +0 -898
- package/lib/time-picker/themes/halo/dark/index.js +0 -4
- package/lib/time-picker/themes/halo/light/index.js +0 -4
- package/lib/time-picker/themes/solar/charcoal/index.js +0 -4
- package/lib/time-picker/themes/solar/pearl/index.js +0 -4
- package/lib/toggle/index.d.ts +0 -87
- package/lib/toggle/index.js +0 -153
- package/lib/toggle/themes/halo/dark/index.js +0 -2
- package/lib/toggle/themes/halo/light/index.js +0 -2
- package/lib/toggle/themes/solar/charcoal/index.js +0 -2
- package/lib/toggle/themes/solar/pearl/index.js +0 -2
- package/lib/tooltip/elements/title-tooltip.d.ts +0 -1
- package/lib/tooltip/elements/title-tooltip.js +0 -18
- package/lib/tooltip/elements/tooltip-element.d.ts +0 -21
- package/lib/tooltip/elements/tooltip-element.js +0 -54
- package/lib/tooltip/helpers/overflow-tooltip.d.ts +0 -9
- package/lib/tooltip/helpers/overflow-tooltip.js +0 -19
- package/lib/tooltip/helpers/renderer.d.ts +0 -8
- package/lib/tooltip/helpers/renderer.js +0 -11
- package/lib/tooltip/helpers/types.d.ts +0 -23
- package/lib/tooltip/helpers/types.js +0 -1
- package/lib/tooltip/index.d.ts +0 -232
- package/lib/tooltip/index.js +0 -477
- package/lib/tooltip/managers/tooltip-manager.d.ts +0 -15
- package/lib/tooltip/managers/tooltip-manager.js +0 -140
- package/lib/tooltip/themes/halo/dark/index.js +0 -3
- package/lib/tooltip/themes/halo/light/index.js +0 -3
- package/lib/tooltip/themes/solar/charcoal/index.js +0 -3
- package/lib/tooltip/themes/solar/pearl/index.js +0 -3
- package/lib/tornado-chart/elements/tornado-chart.d.ts +0 -78
- package/lib/tornado-chart/elements/tornado-chart.js +0 -122
- package/lib/tornado-chart/elements/tornado-item.d.ts +0 -110
- package/lib/tornado-chart/elements/tornado-item.js +0 -207
- package/lib/tornado-chart/index.d.ts +0 -2
- package/lib/tornado-chart/index.js +0 -2
- package/lib/tornado-chart/themes/halo/dark/index.js +0 -6
- package/lib/tornado-chart/themes/halo/light/index.js +0 -6
- package/lib/tornado-chart/themes/solar/charcoal/index.js +0 -6
- package/lib/tornado-chart/themes/solar/pearl/index.js +0 -6
- package/lib/tree/elements/tree-item.d.ts +0 -129
- package/lib/tree/elements/tree-item.js +0 -238
- package/lib/tree/elements/tree.d.ts +0 -203
- package/lib/tree/elements/tree.js +0 -414
- package/lib/tree/helpers/filter.d.ts +0 -8
- package/lib/tree/helpers/filter.js +0 -33
- package/lib/tree/helpers/renderer.d.ts +0 -5
- package/lib/tree/helpers/renderer.js +0 -33
- package/lib/tree/helpers/types.d.ts +0 -25
- package/lib/tree/helpers/types.js +0 -1
- package/lib/tree/index.d.ts +0 -4
- package/lib/tree/index.js +0 -3
- package/lib/tree/managers/tree-manager.d.ts +0 -248
- package/lib/tree/managers/tree-manager.js +0 -395
- package/lib/tree/themes/halo/dark/index.js +0 -7
- package/lib/tree/themes/halo/light/index.js +0 -7
- package/lib/tree/themes/solar/charcoal/index.js +0 -7
- package/lib/tree/themes/solar/pearl/index.js +0 -7
- package/lib/tree-select/helpers/types.d.ts +0 -4
- package/lib/tree-select/helpers/types.js +0 -1
- package/lib/tree-select/index.d.ts +0 -404
- package/lib/tree-select/index.js +0 -891
- package/lib/tree-select/themes/halo/dark/index.js +0 -11
- package/lib/tree-select/themes/halo/light/index.js +0 -11
- package/lib/tree-select/themes/solar/charcoal/index.js +0 -11
- package/lib/tree-select/themes/solar/pearl/index.js +0 -11
- package/lib/version.d.ts +0 -1
- package/lib/version.js +0 -1
|
@@ -1,414 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import { customElement } from '@refinitiv-ui/core/lib/decorators/custom-element.js';
|
|
3
|
-
import { property } from '@refinitiv-ui/core/lib/decorators/property.js';
|
|
4
|
-
import { VERSION } from '../../version.js';
|
|
5
|
-
import { List } from '../../list/index.js';
|
|
6
|
-
import { TreeRenderer } from '../helpers/renderer.js';
|
|
7
|
-
import { defaultFilter } from '../helpers/filter.js';
|
|
8
|
-
import { TreeManager, TreeManagerMode } from '../managers/tree-manager.js';
|
|
9
|
-
const EXPAND_TOGGLE_ATTR = 'expand-toggle';
|
|
10
|
-
/**
|
|
11
|
-
* Displays a tree structure
|
|
12
|
-
* to be used for menus and group selections
|
|
13
|
-
*
|
|
14
|
-
* @fires value-changed - Fired when the users changed selection item.
|
|
15
|
-
* @fires expanded-changed - Fired when an item's expanded state has changed.
|
|
16
|
-
*
|
|
17
|
-
* @attr {boolean} [stateless=false] - Disable selections
|
|
18
|
-
* @prop {boolean} [stateless=false] - Disable selections
|
|
19
|
-
*
|
|
20
|
-
*/
|
|
21
|
-
let Tree = class Tree extends List {
|
|
22
|
-
constructor() {
|
|
23
|
-
super(...arguments);
|
|
24
|
-
this.defaultRole = 'tree';
|
|
25
|
-
/**
|
|
26
|
-
* Tree manager used for manipulation
|
|
27
|
-
*/
|
|
28
|
-
this.manager = new TreeManager(this.composer);
|
|
29
|
-
/**
|
|
30
|
-
* Allows multiple items to be selected
|
|
31
|
-
*/
|
|
32
|
-
this.multiple = false;
|
|
33
|
-
/**
|
|
34
|
-
* Breaks the relationship when multiple
|
|
35
|
-
* selection mode is enabled
|
|
36
|
-
*/
|
|
37
|
-
this.noRelation = false;
|
|
38
|
-
/**
|
|
39
|
-
* Query string applied to tree
|
|
40
|
-
*/
|
|
41
|
-
this.query = '';
|
|
42
|
-
/**
|
|
43
|
-
* Custom filter for static data
|
|
44
|
-
* @type {TreeFilter<T> | null}
|
|
45
|
-
* @ignore set to protected for now and need to discuss before set to public API
|
|
46
|
-
*/
|
|
47
|
-
this.filter = defaultFilter(this);
|
|
48
|
-
/**
|
|
49
|
-
* Renderer used for generating tree items
|
|
50
|
-
* @type {TreeRenderer}
|
|
51
|
-
*/
|
|
52
|
-
this.renderer = new TreeRenderer(this);
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Element version number
|
|
56
|
-
* @returns version number
|
|
57
|
-
*/
|
|
58
|
-
static get version() {
|
|
59
|
-
return VERSION;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Expands all groups
|
|
63
|
-
* @returns {void}
|
|
64
|
-
*/
|
|
65
|
-
expandAll() {
|
|
66
|
-
this.manager.expandAllItems();
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Collapses all groups
|
|
70
|
-
* @returns {void}
|
|
71
|
-
*/
|
|
72
|
-
collapseAll() {
|
|
73
|
-
this.manager.collapseAllItems();
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Checks all editable items
|
|
77
|
-
* @returns {void}
|
|
78
|
-
*/
|
|
79
|
-
checkAll() {
|
|
80
|
-
if (!this.multiple) {
|
|
81
|
-
throw new RangeError('You cannot check all items in single selection mode');
|
|
82
|
-
}
|
|
83
|
-
this.manager.checkAllItems();
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Unchecks all editable items
|
|
87
|
-
* @returns {void}
|
|
88
|
-
*/
|
|
89
|
-
uncheckAll() {
|
|
90
|
-
this.manager.uncheckAllItems();
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* @override
|
|
94
|
-
* @ignore
|
|
95
|
-
*/
|
|
96
|
-
selectItem(item) {
|
|
97
|
-
// Stateless tree
|
|
98
|
-
if (this.stateless) {
|
|
99
|
-
return false;
|
|
100
|
-
}
|
|
101
|
-
// Multiple selection
|
|
102
|
-
if (this.multiple) {
|
|
103
|
-
return this.manager.toggleItem(item);
|
|
104
|
-
}
|
|
105
|
-
// Single selection - expand/collapse group (parent)
|
|
106
|
-
if (this.manager.isItemParent(item)) {
|
|
107
|
-
this.toggleExpandedState(item);
|
|
108
|
-
return false;
|
|
109
|
-
}
|
|
110
|
-
// Single selection - check item
|
|
111
|
-
if (this.manager.checkItem(item)) {
|
|
112
|
-
this.manager.checkedItems.forEach(checkedItem => {
|
|
113
|
-
checkedItem !== item && this.manager.uncheckItem(checkedItem);
|
|
114
|
-
});
|
|
115
|
-
return true;
|
|
116
|
-
}
|
|
117
|
-
return false;
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Dispatches an event, detailing which item has recently changed it's expanded state.
|
|
121
|
-
* @param item Data item of which the expanded property changed
|
|
122
|
-
* @returns {void}
|
|
123
|
-
*/
|
|
124
|
-
dispatchExpandedChangedEvent(item) {
|
|
125
|
-
/**
|
|
126
|
-
* Property `detail.value` is the current expanded state.
|
|
127
|
-
* Property `detail.item` is the original data item of which the property has been modified.
|
|
128
|
-
*/
|
|
129
|
-
const event = new CustomEvent('expanded-changed', {
|
|
130
|
-
bubbles: false,
|
|
131
|
-
cancelable: false,
|
|
132
|
-
composed: true,
|
|
133
|
-
detail: {
|
|
134
|
-
value: this.manager.isItemExpanded(item),
|
|
135
|
-
item
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
this.dispatchEvent(event);
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* Handles tap event when composed path contains
|
|
142
|
-
* an element with an `expand-toggle` attribute.
|
|
143
|
-
* @param event Tap event to try and handle
|
|
144
|
-
* @returns True or False depending if the event was handled
|
|
145
|
-
*/
|
|
146
|
-
handleExpandCollapse(event) {
|
|
147
|
-
const containsToggle = event.composedPath().some((target) => target instanceof HTMLElement && target.hasAttribute(EXPAND_TOGGLE_ATTR));
|
|
148
|
-
const itemElement = containsToggle && this.findItemElementFromTarget(event.target);
|
|
149
|
-
const item = itemElement && this.itemFromElement(itemElement);
|
|
150
|
-
if (item) {
|
|
151
|
-
this.toggleExpandedState(item);
|
|
152
|
-
return true;
|
|
153
|
-
}
|
|
154
|
-
return false;
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* @override
|
|
158
|
-
*/
|
|
159
|
-
onTap(event) {
|
|
160
|
-
if (this.handleExpandCollapse(event)) {
|
|
161
|
-
return;
|
|
162
|
-
}
|
|
163
|
-
super.onTap(event);
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* @override
|
|
167
|
-
*/
|
|
168
|
-
onKeyDown(event) {
|
|
169
|
-
switch (event.key) {
|
|
170
|
-
case 'Left':
|
|
171
|
-
case 'ArrowLeft':
|
|
172
|
-
this.left();
|
|
173
|
-
break;
|
|
174
|
-
case 'Right':
|
|
175
|
-
case 'ArrowRight':
|
|
176
|
-
this.right();
|
|
177
|
-
break;
|
|
178
|
-
default:
|
|
179
|
-
return super.onKeyDown(event);
|
|
180
|
-
}
|
|
181
|
-
event.preventDefault();
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* Performs left arrow keyboard action,
|
|
185
|
-
* collapsing a group item if possible.
|
|
186
|
-
* @returns {void}
|
|
187
|
-
*/
|
|
188
|
-
left() {
|
|
189
|
-
const item = this.highlightElement && this.itemFromElement(this.highlightElement);
|
|
190
|
-
if (item && this.manager.isItemExpanded(item)) {
|
|
191
|
-
this.manager.collapseItem(item);
|
|
192
|
-
this.dispatchExpandedChangedEvent(item);
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* Performs right arrow keyboard action,
|
|
197
|
-
* expanding a group item if possible.
|
|
198
|
-
* @returns {void}
|
|
199
|
-
*/
|
|
200
|
-
right() {
|
|
201
|
-
const item = this.highlightElement && this.itemFromElement(this.highlightElement);
|
|
202
|
-
if (item && !this.manager.isItemExpanded(item)) {
|
|
203
|
-
this.manager.expandItem(item);
|
|
204
|
-
this.dispatchExpandedChangedEvent(item);
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
/**
|
|
208
|
-
* Toggles the expanded state of an item.
|
|
209
|
-
* Executed when a user taps on an item to expand/collapse the group.
|
|
210
|
-
* @param item Original data item
|
|
211
|
-
* @returns {void}
|
|
212
|
-
*/
|
|
213
|
-
toggleExpandedState(item) {
|
|
214
|
-
if (this.manager.isItemExpanded(item)) {
|
|
215
|
-
this.manager.collapseItem(item);
|
|
216
|
-
}
|
|
217
|
-
else {
|
|
218
|
-
this.manager.expandItem(item);
|
|
219
|
-
}
|
|
220
|
-
this.dispatchExpandedChangedEvent(item);
|
|
221
|
-
}
|
|
222
|
-
/**
|
|
223
|
-
* @override
|
|
224
|
-
*/
|
|
225
|
-
queryItems(engine) {
|
|
226
|
-
return this.composer.queryItems(engine, Infinity);
|
|
227
|
-
}
|
|
228
|
-
/**
|
|
229
|
-
* @override
|
|
230
|
-
*/
|
|
231
|
-
queryItemsByPropertyValue(property, value) {
|
|
232
|
-
return this.composer.queryItemsByPropertyValue(property, value, Infinity);
|
|
233
|
-
}
|
|
234
|
-
/**
|
|
235
|
-
* @override
|
|
236
|
-
*/
|
|
237
|
-
update(changedProperties) {
|
|
238
|
-
if (changedProperties.has('noRelation') || changedProperties.has('multiple')) {
|
|
239
|
-
this.manager.setMode(this.mode);
|
|
240
|
-
}
|
|
241
|
-
if (changedProperties.has('query') || changedProperties.has('data')) {
|
|
242
|
-
this.filterItems();
|
|
243
|
-
}
|
|
244
|
-
super.update(changedProperties);
|
|
245
|
-
}
|
|
246
|
-
/**
|
|
247
|
-
* Filter the internal items by query changes items' hidden state
|
|
248
|
-
* @returns {void}
|
|
249
|
-
*/
|
|
250
|
-
filterItems() {
|
|
251
|
-
// if filter is null, it is off and external app is responsible
|
|
252
|
-
if (this.filter) {
|
|
253
|
-
const filter = this.filter;
|
|
254
|
-
const items = this.queryItems((item) => {
|
|
255
|
-
// Do not filter hidden items
|
|
256
|
-
if (item.hidden) {
|
|
257
|
-
return false;
|
|
258
|
-
}
|
|
259
|
-
const result = filter(item);
|
|
260
|
-
if (result) {
|
|
261
|
-
this.manager.includeItem(item);
|
|
262
|
-
}
|
|
263
|
-
else {
|
|
264
|
-
this.manager.excludeItem(item);
|
|
265
|
-
}
|
|
266
|
-
return result;
|
|
267
|
-
}).slice();
|
|
268
|
-
// Do not expand tree if there is no filter applied
|
|
269
|
-
if (this.query) {
|
|
270
|
-
/**
|
|
271
|
-
* Add all descendants of item list to make the descendants
|
|
272
|
-
* are accessible which user can navigate into the nested data
|
|
273
|
-
*/
|
|
274
|
-
this.addItemDescendantsToRender(items);
|
|
275
|
-
/**
|
|
276
|
-
* Add all parents of item list which they must be shown
|
|
277
|
-
* when some descendant is shown.
|
|
278
|
-
*/
|
|
279
|
-
this.addExpandedAncestorsToRender(items);
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
/**
|
|
284
|
-
* Utility method
|
|
285
|
-
* Adds descendants for each item passed
|
|
286
|
-
* @param items List of child items
|
|
287
|
-
* @returns {void}
|
|
288
|
-
*/
|
|
289
|
-
addItemDescendantsToRender(items) {
|
|
290
|
-
items.forEach((item) => {
|
|
291
|
-
/**
|
|
292
|
-
* Collapse an item to prevent tree show too many nested expanded
|
|
293
|
-
*/
|
|
294
|
-
if (this.manager.isItemExpanded(item)) {
|
|
295
|
-
this.manager.collapseItem(item);
|
|
296
|
-
}
|
|
297
|
-
/**
|
|
298
|
-
* show all descendants of items to make them all are selectable
|
|
299
|
-
* and user can navigate into nested data
|
|
300
|
-
*/
|
|
301
|
-
const children = this.composer.getItemChildren(item);
|
|
302
|
-
if (children.length) {
|
|
303
|
-
this.addNestedItemsToRender(children, items, false);
|
|
304
|
-
}
|
|
305
|
-
});
|
|
306
|
-
}
|
|
307
|
-
/**
|
|
308
|
-
* Utility method
|
|
309
|
-
* Add nested children of item list
|
|
310
|
-
* @param items List of items
|
|
311
|
-
* @param excludeItems List of exclude items
|
|
312
|
-
* @param [includeHidden=false] Include hidden items
|
|
313
|
-
* @returns {void}
|
|
314
|
-
*/
|
|
315
|
-
addNestedItemsToRender(items, excludeItems, includeHidden = false) {
|
|
316
|
-
items.forEach(item => {
|
|
317
|
-
// Skip hidden and exclude item
|
|
318
|
-
if (!item.hidden && !excludeItems.includes(item)) {
|
|
319
|
-
// Add item and nested children
|
|
320
|
-
this.manager.includeItem(item);
|
|
321
|
-
const children = this.manager.getItemChildren(item);
|
|
322
|
-
if (children.length) {
|
|
323
|
-
this.addNestedItemsToRender(children, excludeItems, includeHidden);
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
});
|
|
327
|
-
}
|
|
328
|
-
/**
|
|
329
|
-
* Utility method
|
|
330
|
-
* Adds ancestors for each item passed and expand
|
|
331
|
-
* @param items List of child items
|
|
332
|
-
* @returns {void}
|
|
333
|
-
*/
|
|
334
|
-
addExpandedAncestorsToRender(items) {
|
|
335
|
-
// Establish unique ancestors set
|
|
336
|
-
const ancestors = new Set();
|
|
337
|
-
// we iterate each item match so as to find ancestors
|
|
338
|
-
items.forEach((item) => {
|
|
339
|
-
// Get the ancestors
|
|
340
|
-
const parent = this.manager.getItemParent(item);
|
|
341
|
-
if (parent && !ancestors.has(parent)) {
|
|
342
|
-
this.manager.getItemAncestors(item).forEach((ancestor) => {
|
|
343
|
-
ancestors.add(ancestor); // track ancestors
|
|
344
|
-
this.addExpandedAncestorToRender(ancestor);
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
});
|
|
348
|
-
}
|
|
349
|
-
/**
|
|
350
|
-
* Utility method
|
|
351
|
-
* Adds parent and expands
|
|
352
|
-
* @param ancestor parent item
|
|
353
|
-
* @returns {void}
|
|
354
|
-
*/
|
|
355
|
-
addExpandedAncestorToRender(ancestor) {
|
|
356
|
-
this.manager.includeItem(ancestor);
|
|
357
|
-
this.manager.expandItem(ancestor);
|
|
358
|
-
}
|
|
359
|
-
/**
|
|
360
|
-
* Selected items in tree
|
|
361
|
-
* @override
|
|
362
|
-
* @type {string[]}
|
|
363
|
-
* @default []
|
|
364
|
-
*/
|
|
365
|
-
get values() {
|
|
366
|
-
return this.manager.checkedItems.map(item => {
|
|
367
|
-
return this.composer.getItemPropertyValue(item, 'value') || '';
|
|
368
|
-
});
|
|
369
|
-
}
|
|
370
|
-
set values(value) {
|
|
371
|
-
super.values = value;
|
|
372
|
-
}
|
|
373
|
-
/**
|
|
374
|
-
* Data object to be used for creating tree
|
|
375
|
-
* @override
|
|
376
|
-
* @type {TreeData<T>}
|
|
377
|
-
*/
|
|
378
|
-
get data() {
|
|
379
|
-
return super.data;
|
|
380
|
-
}
|
|
381
|
-
set data(data) {
|
|
382
|
-
super.data = data;
|
|
383
|
-
this.manager = new TreeManager(this.composer, this.mode);
|
|
384
|
-
}
|
|
385
|
-
/**
|
|
386
|
-
* @override
|
|
387
|
-
*/
|
|
388
|
-
get renderItems() {
|
|
389
|
-
return this.manager.visibleItems;
|
|
390
|
-
}
|
|
391
|
-
/**
|
|
392
|
-
* Mode to use in the tree manager
|
|
393
|
-
*/
|
|
394
|
-
get mode() {
|
|
395
|
-
return !this.multiple || !this.noRelation
|
|
396
|
-
? TreeManagerMode.RELATIONAL : TreeManagerMode.INDEPENDENT;
|
|
397
|
-
}
|
|
398
|
-
};
|
|
399
|
-
__decorate([
|
|
400
|
-
property({ type: Boolean })
|
|
401
|
-
], Tree.prototype, "multiple", void 0);
|
|
402
|
-
__decorate([
|
|
403
|
-
property({ attribute: 'no-relation', type: Boolean })
|
|
404
|
-
], Tree.prototype, "noRelation", void 0);
|
|
405
|
-
__decorate([
|
|
406
|
-
property({ type: String })
|
|
407
|
-
], Tree.prototype, "query", void 0);
|
|
408
|
-
__decorate([
|
|
409
|
-
property({ attribute: false })
|
|
410
|
-
], Tree.prototype, "renderer", void 0);
|
|
411
|
-
Tree = __decorate([
|
|
412
|
-
customElement('ef-tree')
|
|
413
|
-
], Tree);
|
|
414
|
-
export { Tree };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Tree, TreeDataItem } from '../index';
|
|
2
|
-
import type { TreeFilter } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Default filter used by tree
|
|
5
|
-
* @param el Tree instance to filter
|
|
6
|
-
* @returns Filter accepting an item
|
|
7
|
-
*/
|
|
8
|
-
export declare const defaultFilter: <T extends TreeDataItem = TreeDataItem>(el: Tree<T>) => TreeFilter<T>;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Default filter used by tree
|
|
3
|
-
* @param el Tree instance to filter
|
|
4
|
-
* @returns Filter accepting an item
|
|
5
|
-
*/
|
|
6
|
-
export const defaultFilter = (el) => {
|
|
7
|
-
// reference query string for validating queryRegExp cache state
|
|
8
|
-
let query = '';
|
|
9
|
-
// cache RegExp
|
|
10
|
-
let queryRegExp;
|
|
11
|
-
// Get current RegExp, or renew if out of date
|
|
12
|
-
// this is fetched on demand by filter/renderer
|
|
13
|
-
// only created once per query
|
|
14
|
-
const getRegularExpressionOfQuery = () => {
|
|
15
|
-
if (el.query !== query || !queryRegExp) {
|
|
16
|
-
query = el.query || '';
|
|
17
|
-
queryRegExp = new RegExp(query.replace(/(\W)/g, '\\$1'), 'i');
|
|
18
|
-
}
|
|
19
|
-
return queryRegExp;
|
|
20
|
-
};
|
|
21
|
-
// return scoped custom filter
|
|
22
|
-
return (item) => {
|
|
23
|
-
const label = item.label;
|
|
24
|
-
if (!label) {
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
const regex = getRegularExpressionOfQuery();
|
|
28
|
-
const result = regex.test(label);
|
|
29
|
-
// this regex uses global scope, so the index needs resetting
|
|
30
|
-
regex.lastIndex = 0;
|
|
31
|
-
return result;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { TreeManager, TreeManagerMode, CheckedState } from '../managers/tree-manager.js';
|
|
2
|
-
import { Renderer } from '../../list/renderer.js';
|
|
3
|
-
import '../elements/tree-item.js';
|
|
4
|
-
export class TreeRenderer extends Renderer {
|
|
5
|
-
constructor(scope) {
|
|
6
|
-
let manager;
|
|
7
|
-
let currentMode;
|
|
8
|
-
let currentComposer;
|
|
9
|
-
super((item, composer, element = document.createElement('ef-tree-item')) => {
|
|
10
|
-
const el = element;
|
|
11
|
-
const multiple = !!scope && scope.multiple === true;
|
|
12
|
-
const noRelation = !!scope && scope.noRelation === true;
|
|
13
|
-
const mode = !multiple || !noRelation ? TreeManagerMode.RELATIONAL : TreeManagerMode.INDEPENDENT;
|
|
14
|
-
if (currentComposer !== composer || currentMode !== mode) {
|
|
15
|
-
currentMode = mode;
|
|
16
|
-
currentComposer = composer;
|
|
17
|
-
manager = new TreeManager(composer, mode);
|
|
18
|
-
}
|
|
19
|
-
el.multiple = multiple;
|
|
20
|
-
el.item = item;
|
|
21
|
-
el.depth = composer.getItemDepth(item);
|
|
22
|
-
el.parent = composer.getItemChildren(item).length > 0;
|
|
23
|
-
el.expanded = manager.isItemExpanded(item);
|
|
24
|
-
el.checkedState = !multiple && el.parent ? CheckedState.UNCHECKED : manager.getItemCheckedState(item);
|
|
25
|
-
el.icon = composer.getItemPropertyValue(item, 'icon');
|
|
26
|
-
el.label = composer.getItemPropertyValue(item, 'label');
|
|
27
|
-
el.disabled = composer.getItemPropertyValue(item, 'disabled') === true;
|
|
28
|
-
el.readonly = composer.getItemPropertyValue(item, 'readonly') === true;
|
|
29
|
-
el.highlighted = composer.getItemPropertyValue(item, 'highlighted') === true;
|
|
30
|
-
return el;
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { CollectionComposer, DataItem } from '@refinitiv-ui/utils/lib/collection';
|
|
2
|
-
export declare type TreeData<T extends TreeDataItem = TreeDataItem> = T[] | CollectionComposer<T> | null;
|
|
3
|
-
export interface TreeDataItem extends DataItem {
|
|
4
|
-
/**
|
|
5
|
-
* Icon to show, when rendering the item.
|
|
6
|
-
*/
|
|
7
|
-
icon?: string;
|
|
8
|
-
/**
|
|
9
|
-
* Label to show, when rendering the item.
|
|
10
|
-
*/
|
|
11
|
-
label?: string;
|
|
12
|
-
/**
|
|
13
|
-
* Expanded state of child items.
|
|
14
|
-
* If `true`, child items will be visible
|
|
15
|
-
*/
|
|
16
|
-
expanded?: boolean;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Predicate callback
|
|
20
|
-
* Matches item against filter function
|
|
21
|
-
*
|
|
22
|
-
* @param item Item to filter
|
|
23
|
-
* @return Does item match filter
|
|
24
|
-
*/
|
|
25
|
-
export declare type TreeFilter<T extends TreeDataItem = TreeDataItem> = (item: T) => boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/tree/index.d.ts
DELETED
package/lib/tree/index.js
DELETED