@refinitiv-ui/elements 5.3.4 → 5.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +89 -0
- package/lib/accordion/custom-elements.md +18 -0
- package/lib/accordion/index.d.ts +5 -5
- package/lib/accordion/index.js +8 -11
- package/lib/appstate-bar/custom-elements.md +22 -0
- package/lib/appstate-bar/index.d.ts +5 -5
- package/lib/appstate-bar/index.js +8 -11
- package/lib/autosuggest/custom-elements.json +24 -4
- package/lib/autosuggest/custom-elements.md +54 -0
- package/lib/autosuggest/helpers/types.d.ts +1 -1
- package/lib/autosuggest/helpers/utils.d.ts +2 -2
- package/lib/autosuggest/helpers/utils.js +1 -2
- package/lib/autosuggest/index.d.ts +13 -8
- package/lib/autosuggest/index.js +38 -31
- package/lib/button/custom-elements.json +2 -2
- package/lib/button/custom-elements.md +23 -0
- package/lib/button/index.d.ts +13 -13
- package/lib/button/index.js +41 -31
- package/lib/button-bar/custom-elements.md +9 -0
- package/lib/button-bar/index.d.ts +3 -3
- package/lib/button-bar/index.js +8 -10
- package/lib/calendar/constants.d.ts +22 -0
- package/lib/calendar/constants.js +23 -0
- package/lib/calendar/custom-elements.json +8 -6
- package/lib/calendar/custom-elements.md +35 -0
- package/lib/calendar/index.d.ts +9 -7
- package/lib/calendar/index.js +20 -38
- package/lib/calendar/locales.d.ts +1 -31
- package/lib/calendar/locales.js +0 -104
- package/lib/calendar/types.d.ts +1 -5
- package/lib/calendar/types.js +1 -6
- package/lib/calendar/utils.d.ts +31 -1
- package/lib/calendar/utils.js +104 -2
- package/lib/canvas/custom-elements.json +7 -5
- package/lib/canvas/custom-elements.md +27 -0
- package/lib/canvas/index.d.ts +4 -3
- package/lib/canvas/index.js +8 -10
- package/lib/card/custom-elements.json +3 -1
- package/lib/card/custom-elements.md +24 -0
- package/lib/card/helpers/types.d.ts +1 -1
- package/lib/card/index.d.ts +10 -8
- package/lib/card/index.js +14 -13
- package/lib/chart/custom-elements.json +1 -1
- package/lib/chart/custom-elements.md +16 -0
- package/lib/chart/helpers/index.d.ts +2 -2
- package/lib/chart/helpers/index.js +2 -2
- package/lib/chart/index.d.ts +6 -6
- package/lib/chart/index.js +12 -14
- package/lib/checkbox/custom-elements.json +4 -4
- package/lib/checkbox/custom-elements.md +18 -0
- package/lib/checkbox/index.d.ts +21 -13
- package/lib/checkbox/index.js +56 -31
- package/lib/clock/custom-elements.json +21 -4
- package/lib/clock/custom-elements.md +28 -0
- package/lib/clock/index.d.ts +17 -5
- package/lib/clock/index.js +37 -18
- package/lib/clock/themes/halo/dark/index.js +1 -1
- package/lib/clock/themes/halo/light/index.js +1 -1
- package/lib/clock/themes/solar/charcoal/index.js +1 -1
- package/lib/clock/themes/solar/pearl/index.js +1 -1
- package/lib/clock/utils/TickManager.js +2 -2
- package/lib/collapse/custom-elements.md +27 -0
- package/lib/collapse/index.d.ts +7 -7
- package/lib/collapse/index.js +11 -13
- package/lib/color-dialog/custom-elements.json +29 -16
- package/lib/color-dialog/custom-elements.md +39 -0
- package/lib/color-dialog/elements/color-palettes.d.ts +5 -5
- package/lib/color-dialog/elements/color-palettes.js +9 -13
- package/lib/color-dialog/elements/grayscale-palettes.d.ts +5 -5
- package/lib/color-dialog/elements/grayscale-palettes.js +10 -13
- package/lib/color-dialog/elements/palettes.d.ts +10 -3
- package/lib/color-dialog/elements/palettes.js +58 -45
- package/lib/color-dialog/helpers/color-helpers.d.ts +7 -53
- package/lib/color-dialog/helpers/color-helpers.js +12 -109
- package/lib/color-dialog/helpers/value-model.d.ts +1 -1
- package/lib/color-dialog/helpers/value-model.js +18 -16
- package/lib/color-dialog/index.d.ts +19 -19
- package/lib/color-dialog/index.js +47 -45
- package/lib/combo-box/custom-elements.json +28 -16
- package/lib/combo-box/custom-elements.md +35 -0
- package/lib/combo-box/helpers/filter.d.ts +4 -4
- package/lib/combo-box/helpers/types.d.ts +2 -2
- package/lib/combo-box/index.d.ts +26 -18
- package/lib/combo-box/index.js +36 -27
- package/lib/combo-box/themes/halo/dark/index.js +1 -1
- package/lib/combo-box/themes/halo/light/index.js +1 -1
- package/lib/combo-box/themes/solar/charcoal/index.js +1 -1
- package/lib/combo-box/themes/solar/pearl/index.js +1 -1
- package/lib/counter/custom-elements.json +8 -4
- package/lib/counter/custom-elements.md +11 -0
- package/lib/counter/index.d.ts +5 -3
- package/lib/counter/index.js +11 -12
- package/lib/datetime-picker/custom-elements.json +52 -23
- package/lib/datetime-picker/custom-elements.md +57 -0
- package/lib/datetime-picker/index.d.ts +25 -14
- package/lib/datetime-picker/index.js +46 -35
- package/lib/datetime-picker/locales.d.ts +1 -1
- package/lib/datetime-picker/locales.js +12 -1
- package/lib/datetime-picker/themes/solar/charcoal/index.js +1 -1
- package/lib/datetime-picker/themes/solar/pearl/index.js +1 -1
- package/lib/datetime-picker/types.d.ts +1 -1
- package/lib/datetime-picker/utils.js +1 -1
- package/lib/dialog/custom-elements.json +34 -12
- package/lib/dialog/custom-elements.md +47 -0
- package/lib/dialog/index.d.ts +17 -20
- package/lib/dialog/index.js +28 -31
- package/lib/email-field/custom-elements.json +81 -94
- package/lib/email-field/custom-elements.md +37 -0
- package/lib/email-field/index.d.ts +44 -116
- package/lib/email-field/index.js +48 -249
- package/lib/email-field/themes/solar/charcoal/index.js +1 -1
- package/lib/email-field/themes/solar/pearl/index.js +1 -1
- package/lib/events.d.ts +2 -2
- package/lib/events.js +1 -2
- package/lib/flag/custom-elements.md +10 -0
- package/lib/flag/index.d.ts +6 -4
- package/lib/flag/index.js +12 -12
- package/lib/flag/utils/FlagLoader.d.ts +1 -1
- package/lib/flag/utils/FlagLoader.js +1 -1
- package/lib/header/custom-elements.md +18 -0
- package/lib/header/index.d.ts +2 -2
- package/lib/header/index.js +5 -8
- package/lib/heatmap/custom-elements.md +26 -0
- package/lib/heatmap/helpers/color.d.ts +1 -1
- package/lib/heatmap/helpers/color.js +1 -1
- package/lib/heatmap/helpers/text.d.ts +1 -1
- package/lib/heatmap/index.d.ts +7 -7
- package/lib/heatmap/index.js +15 -16
- package/lib/icon/custom-elements.json +6 -4
- package/lib/icon/custom-elements.md +8 -0
- package/lib/icon/index.d.ts +9 -6
- package/lib/icon/index.js +28 -18
- package/lib/icon/utils/IconLoader.d.ts +6 -1
- package/lib/icon/utils/IconLoader.js +24 -17
- package/lib/index.d.ts +2 -1
- package/lib/index.js +2 -1
- package/lib/interactive-chart/custom-elements.json +6 -10
- package/lib/interactive-chart/custom-elements.md +31 -0
- package/lib/interactive-chart/helpers/types.d.ts +2 -2
- package/lib/interactive-chart/index.d.ts +11 -8
- package/lib/interactive-chart/index.js +17 -17
- package/lib/item/custom-elements.json +4 -4
- package/lib/item/custom-elements.md +29 -0
- package/lib/item/helpers/types.d.ts +1 -1
- package/lib/item/index.d.ts +18 -8
- package/lib/item/index.js +36 -16
- package/lib/label/custom-elements.md +11 -0
- package/lib/label/index.d.ts +3 -3
- package/lib/label/index.js +12 -20
- package/lib/layout/custom-elements.md +26 -0
- package/lib/layout/index.d.ts +3 -3
- package/lib/layout/index.js +6 -9
- package/lib/led-gauge/custom-elements.json +4 -4
- package/lib/led-gauge/custom-elements.md +17 -0
- package/lib/led-gauge/index.d.ts +5 -4
- package/lib/led-gauge/index.js +9 -11
- package/lib/list/custom-elements.json +18 -5
- package/lib/list/custom-elements.md +32 -0
- package/lib/list/helpers/list-renderer.d.ts +2 -2
- package/lib/list/helpers/list-renderer.js +4 -2
- package/lib/list/helpers/types.d.ts +2 -2
- package/lib/list/index.d.ts +27 -10
- package/lib/list/index.js +54 -25
- package/lib/list/renderer.d.ts +2 -2
- package/lib/list/renderer.js +1 -1
- package/lib/loader/custom-elements.md +5 -0
- package/lib/loader/index.js +4 -8
- package/lib/multi-input/custom-elements.json +7 -6
- package/lib/multi-input/custom-elements.md +43 -0
- package/lib/multi-input/helpers/types.d.ts +1 -1
- package/lib/multi-input/index.d.ts +11 -7
- package/lib/multi-input/index.js +20 -17
- package/lib/multi-input/themes/solar/charcoal/index.js +1 -1
- package/lib/multi-input/themes/solar/pearl/index.js +1 -1
- package/lib/notification/custom-elements.md +26 -0
- package/lib/notification/elements/notification-tray.d.ts +2 -2
- package/lib/notification/elements/notification-tray.js +6 -9
- package/lib/notification/elements/notification.d.ts +5 -5
- package/lib/notification/elements/notification.js +8 -11
- package/lib/notification/helpers/status.d.ts +1 -1
- package/lib/notification/helpers/status.js +1 -1
- package/lib/notification/helpers/types.d.ts +1 -1
- package/lib/notification/index.d.ts +2 -2
- package/lib/notification/index.js +2 -2
- package/lib/number-field/custom-elements.json +99 -54
- package/lib/number-field/custom-elements.md +42 -0
- package/lib/number-field/index.d.ts +96 -51
- package/lib/number-field/index.js +121 -89
- 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/custom-elements.json +26 -13
- package/lib/overlay/custom-elements.md +54 -0
- package/lib/overlay/elements/overlay-backdrop.d.ts +4 -4
- package/lib/overlay/elements/overlay-backdrop.js +6 -9
- package/lib/overlay/elements/overlay-viewport.d.ts +3 -3
- package/lib/overlay/elements/overlay-viewport.js +5 -9
- package/lib/overlay/elements/overlay.d.ts +10 -5
- package/lib/overlay/elements/overlay.js +27 -28
- package/lib/overlay/index.d.ts +2 -2
- package/lib/overlay/index.js +1 -1
- package/lib/overlay/managers/backdrop-manager.d.ts +1 -1
- package/lib/overlay/managers/backdrop-manager.js +2 -2
- package/lib/overlay/managers/close-manager.js +1 -1
- package/lib/overlay/managers/focus-manager.js +2 -2
- package/lib/overlay/managers/interaction-lock-manager.js +2 -2
- package/lib/overlay/managers/viewport-manager.d.ts +2 -2
- package/lib/overlay/managers/viewport-manager.js +6 -2
- package/lib/overlay/managers/zindex-manager.js +1 -1
- package/lib/overlay-menu/custom-elements.json +70 -20
- package/lib/overlay-menu/custom-elements.md +44 -0
- package/lib/overlay-menu/helpers/types.d.ts +3 -3
- package/lib/overlay-menu/index.d.ts +26 -19
- package/lib/overlay-menu/index.js +47 -33
- package/lib/overlay-menu/managers/menu-manager.d.ts +2 -2
- package/lib/overlay-menu/managers/menu-manager.js +3 -3
- package/lib/pagination/custom-elements.md +27 -0
- package/lib/pagination/index.d.ts +8 -8
- package/lib/pagination/index.js +13 -15
- package/lib/panel/custom-elements.md +11 -0
- package/lib/panel/index.d.ts +3 -3
- package/lib/panel/index.js +6 -9
- package/lib/password-field/custom-elements.json +62 -67
- package/lib/password-field/custom-elements.md +39 -0
- package/lib/password-field/index.d.ts +43 -94
- package/lib/password-field/index.js +52 -198
- 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/custom-elements.json +8 -6
- package/lib/pill/custom-elements.md +22 -0
- package/lib/pill/index.d.ts +5 -5
- package/lib/pill/index.js +9 -11
- package/lib/progress-bar/custom-elements.md +18 -0
- package/lib/progress-bar/index.d.ts +3 -3
- package/lib/progress-bar/index.js +7 -9
- package/lib/radio-button/custom-elements.json +4 -4
- package/lib/radio-button/custom-elements.md +19 -0
- package/lib/radio-button/index.d.ts +25 -8
- package/lib/radio-button/index.js +84 -21
- package/lib/radio-button/radio-button-registry.d.ts +3 -2
- package/lib/radio-button/radio-button-registry.js +57 -4
- package/lib/rating/custom-elements.md +17 -0
- package/lib/rating/index.d.ts +3 -3
- package/lib/rating/index.js +9 -10
- package/lib/search-field/custom-elements.json +70 -74
- package/lib/search-field/custom-elements.md +41 -0
- package/lib/search-field/index.d.ts +44 -101
- package/lib/search-field/index.js +50 -220
- 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/custom-elements.json +5 -4
- package/lib/select/custom-elements.md +24 -0
- package/lib/select/helpers/types.d.ts +1 -1
- package/lib/select/index.d.ts +18 -10
- package/lib/select/index.js +84 -45
- package/lib/sidebar-layout/custom-elements.json +2 -6
- package/lib/sidebar-layout/custom-elements.md +21 -0
- package/lib/sidebar-layout/index.d.ts +7 -6
- package/lib/sidebar-layout/index.js +9 -10
- package/lib/slider/custom-elements.json +4 -4
- package/lib/slider/custom-elements.md +28 -0
- package/lib/slider/index.d.ts +4 -4
- package/lib/slider/index.js +9 -10
- package/lib/sparkline/custom-elements.json +4 -4
- package/lib/sparkline/custom-elements.md +16 -0
- package/lib/sparkline/index.d.ts +6 -4
- package/lib/sparkline/index.js +10 -10
- package/lib/swing-gauge/custom-elements.json +5 -3
- package/lib/swing-gauge/custom-elements.md +17 -0
- package/lib/swing-gauge/helpers.d.ts +1 -1
- package/lib/swing-gauge/helpers.js +1 -1
- package/lib/swing-gauge/index.d.ts +9 -7
- package/lib/swing-gauge/index.js +17 -15
- package/lib/tab/custom-elements.json +2 -2
- package/lib/tab/custom-elements.md +22 -0
- package/lib/tab/index.d.ts +5 -5
- package/lib/tab/index.js +9 -12
- package/lib/tab/themes/solar/charcoal/index.js +1 -1
- package/lib/tab/themes/solar/pearl/index.js +1 -1
- package/lib/tab-bar/custom-elements.md +11 -0
- package/lib/tab-bar/index.d.ts +4 -4
- package/lib/tab-bar/index.js +9 -11
- package/lib/tab-bar/themes/solar/charcoal/index.js +1 -1
- package/lib/tab-bar/themes/solar/pearl/index.js +1 -1
- package/lib/text-field/custom-elements.json +78 -89
- package/lib/text-field/custom-elements.md +35 -0
- package/lib/text-field/index.d.ts +59 -79
- package/lib/text-field/index.js +99 -158
- 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/custom-elements.json +4 -4
- package/lib/time-picker/custom-elements.md +28 -0
- package/lib/time-picker/index.d.ts +7 -4
- package/lib/time-picker/index.js +15 -14
- package/lib/time-picker/themes/solar/charcoal/index.js +1 -1
- package/lib/time-picker/themes/solar/pearl/index.js +1 -1
- package/lib/toggle/custom-elements.json +4 -4
- package/lib/toggle/custom-elements.md +19 -0
- package/lib/toggle/index.d.ts +14 -4
- package/lib/toggle/index.js +31 -12
- package/lib/tooltip/custom-elements.md +14 -0
- package/lib/tooltip/elements/title-tooltip.js +2 -2
- package/lib/tooltip/elements/tooltip-element.d.ts +1 -1
- package/lib/tooltip/helpers/overflow-tooltip.d.ts +1 -1
- package/lib/tooltip/helpers/overflow-tooltip.js +1 -1
- package/lib/tooltip/helpers/renderer.d.ts +1 -1
- package/lib/tooltip/helpers/types.d.ts +1 -1
- package/lib/tooltip/index.d.ts +9 -9
- package/lib/tooltip/index.js +18 -20
- package/lib/tooltip/managers/tooltip-manager.d.ts +2 -2
- package/lib/tooltip/managers/tooltip-manager.js +3 -7
- package/lib/tornado-chart/custom-elements.md +18 -0
- package/lib/tornado-chart/elements/tornado-chart.d.ts +4 -4
- package/lib/tornado-chart/elements/tornado-chart.js +8 -11
- package/lib/tornado-chart/elements/tornado-item.d.ts +5 -5
- package/lib/tornado-chart/elements/tornado-item.js +10 -12
- package/lib/tornado-chart/index.d.ts +2 -2
- package/lib/tornado-chart/index.js +2 -2
- package/lib/tree/custom-elements.json +17 -3
- package/lib/tree/custom-elements.md +32 -0
- package/lib/tree/elements/tree-item.d.ts +4 -4
- package/lib/tree/elements/tree-item.js +10 -13
- package/lib/tree/elements/tree.d.ts +51 -5
- package/lib/tree/elements/tree.js +138 -11
- package/lib/tree/helpers/filter.d.ts +8 -0
- package/lib/tree/helpers/filter.js +33 -0
- package/lib/tree/helpers/renderer.d.ts +2 -2
- package/lib/tree/helpers/renderer.js +3 -3
- package/lib/tree/helpers/types.d.ts +9 -1
- package/lib/tree/index.d.ts +4 -4
- package/lib/tree/index.js +3 -3
- package/lib/tree/managers/tree-manager.d.ts +22 -10
- package/lib/tree/managers/tree-manager.js +56 -40
- package/lib/tree/themes/halo/dark/index.js +1 -1
- package/lib/tree/themes/halo/light/index.js +1 -1
- package/lib/tree/themes/solar/charcoal/index.js +1 -1
- package/lib/tree/themes/solar/pearl/index.js +1 -1
- package/lib/tree-select/custom-elements.json +10 -6
- package/lib/tree-select/custom-elements.md +26 -0
- package/lib/tree-select/helpers/types.d.ts +2 -2
- package/lib/tree-select/index.d.ts +32 -28
- package/lib/tree-select/index.js +54 -44
- package/lib/tree-select/themes/halo/dark/index.js +1 -1
- package/lib/tree-select/themes/halo/light/index.js +1 -1
- package/lib/tree-select/themes/solar/charcoal/index.js +1 -1
- package/lib/tree-select/themes/solar/pearl/index.js +1 -1
- package/lib/version.d.ts +1 -0
- package/lib/version.js +1 -0
- package/package.json +298 -15
- package/lib/autosuggest/helpers/const.d.ts +0 -2
- package/lib/autosuggest/helpers/const.js +0 -3
- package/lib/overlay-menu/helpers/uuid.d.ts +0 -7
- package/lib/overlay-menu/helpers/uuid.js +0 -13
|
@@ -15,7 +15,36 @@
|
|
|
15
15
|
"name": "opened",
|
|
16
16
|
"description": "True if the menu is currently displayed",
|
|
17
17
|
"type": "boolean",
|
|
18
|
-
"default": "
|
|
18
|
+
"default": "false"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "with-backdrop",
|
|
22
|
+
"description": "True to show backdrop",
|
|
23
|
+
"type": "boolean",
|
|
24
|
+
"default": "false"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "no-cancel-on-esc-key",
|
|
28
|
+
"description": "Set to true to disable canceling the overlay with the ESC key",
|
|
29
|
+
"type": "boolean",
|
|
30
|
+
"default": "false"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "no-cancel-on-outside-click",
|
|
34
|
+
"description": "Set to true to disable canceling the overlay by clicking outside it",
|
|
35
|
+
"type": "boolean",
|
|
36
|
+
"default": "false"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "lock-position-target",
|
|
40
|
+
"description": "Set to true to lock position target",
|
|
41
|
+
"type": "boolean",
|
|
42
|
+
"default": "false"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "transition-style",
|
|
46
|
+
"description": "Set the transition style",
|
|
47
|
+
"type": "string | null"
|
|
19
48
|
},
|
|
20
49
|
{
|
|
21
50
|
"name": "value",
|
|
@@ -26,12 +55,24 @@
|
|
|
26
55
|
{
|
|
27
56
|
"name": "x",
|
|
28
57
|
"description": "Set a specific x coordinate",
|
|
29
|
-
"type": "number"
|
|
58
|
+
"type": "number | undefined"
|
|
30
59
|
},
|
|
31
60
|
{
|
|
32
61
|
"name": "y",
|
|
33
62
|
"description": "Set a specific y coordinate",
|
|
34
|
-
"type": "number"
|
|
63
|
+
"type": "number | undefined"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "horizontal-offset",
|
|
67
|
+
"description": "A pixel value that will be added to the position calculated on the horizontal axis. The offset will be applied either to the `left` or `right` depending on the `positionTarget`",
|
|
68
|
+
"type": "number",
|
|
69
|
+
"default": "0"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "vertical-offset",
|
|
73
|
+
"description": "A pixel value that will be added to the position calculated on the vertical axis. The offset will be applied either to the `top` or `bottom` depending on the `positionTarget`",
|
|
74
|
+
"type": "number",
|
|
75
|
+
"default": "0"
|
|
35
76
|
},
|
|
36
77
|
{
|
|
37
78
|
"name": "offset",
|
|
@@ -41,7 +82,7 @@
|
|
|
41
82
|
{
|
|
42
83
|
"name": "position",
|
|
43
84
|
"description": "Set position and align against the attach target.",
|
|
44
|
-
"type": "
|
|
85
|
+
"type": "Position[] | undefined"
|
|
45
86
|
},
|
|
46
87
|
{
|
|
47
88
|
"name": "with-backdrop",
|
|
@@ -90,54 +131,59 @@
|
|
|
90
131
|
{
|
|
91
132
|
"name": "values",
|
|
92
133
|
"description": "Array of item's values",
|
|
93
|
-
"type": "string[]"
|
|
134
|
+
"type": "string[]",
|
|
135
|
+
"default": "[]"
|
|
94
136
|
},
|
|
95
137
|
{
|
|
96
138
|
"name": "data",
|
|
97
|
-
"description": "Construct the menu from data object.\nCannot be used with internal content"
|
|
139
|
+
"description": "Construct the menu from data object.\nCannot be used with internal content",
|
|
140
|
+
"type": "OverlayMenuData|undefined"
|
|
98
141
|
},
|
|
99
142
|
{
|
|
100
143
|
"name": "opened",
|
|
101
144
|
"attribute": "opened",
|
|
102
145
|
"description": "True if the menu is currently displayed",
|
|
103
146
|
"type": "boolean",
|
|
104
|
-
"default": "
|
|
147
|
+
"default": "false"
|
|
105
148
|
},
|
|
106
149
|
{
|
|
107
150
|
"name": "withBackdrop",
|
|
151
|
+
"attribute": "with-backdrop",
|
|
108
152
|
"description": "True to show backdrop",
|
|
109
153
|
"type": "boolean",
|
|
110
|
-
"default": "
|
|
154
|
+
"default": "false"
|
|
111
155
|
},
|
|
112
156
|
{
|
|
113
157
|
"name": "noCancelOnEscKey",
|
|
158
|
+
"attribute": "no-cancel-on-esc-key",
|
|
114
159
|
"description": "Set to true to disable canceling the overlay with the ESC key",
|
|
115
160
|
"type": "boolean",
|
|
116
|
-
"default": "
|
|
161
|
+
"default": "false"
|
|
117
162
|
},
|
|
118
163
|
{
|
|
119
164
|
"name": "noCancelOnOutsideClick",
|
|
165
|
+
"attribute": "no-cancel-on-outside-click",
|
|
120
166
|
"description": "Set to true to disable canceling the overlay by clicking outside it",
|
|
121
167
|
"type": "boolean",
|
|
122
|
-
"default": "
|
|
168
|
+
"default": "false"
|
|
123
169
|
},
|
|
124
170
|
{
|
|
125
171
|
"name": "lockPositionTarget",
|
|
172
|
+
"attribute": "lock-position-target",
|
|
126
173
|
"description": "Set to true to lock position target",
|
|
127
174
|
"type": "boolean",
|
|
128
|
-
"default": "
|
|
175
|
+
"default": "false"
|
|
129
176
|
},
|
|
130
177
|
{
|
|
131
178
|
"name": "positionTarget",
|
|
132
179
|
"description": "Position next to the HTML element",
|
|
133
|
-
"type": "HTMLElement|null"
|
|
134
|
-
"default": "\"null\""
|
|
180
|
+
"type": "HTMLElement | null"
|
|
135
181
|
},
|
|
136
182
|
{
|
|
137
183
|
"name": "transitionStyle",
|
|
184
|
+
"attribute": "transition-style",
|
|
138
185
|
"description": "Set the transition style",
|
|
139
|
-
"type": "string|null"
|
|
140
|
-
"default": "\"null\""
|
|
186
|
+
"type": "string | null"
|
|
141
187
|
},
|
|
142
188
|
{
|
|
143
189
|
"name": "value",
|
|
@@ -150,23 +196,27 @@
|
|
|
150
196
|
"name": "x",
|
|
151
197
|
"attribute": "x",
|
|
152
198
|
"description": "Set a specific x coordinate",
|
|
153
|
-
"type": "number"
|
|
199
|
+
"type": "number | undefined"
|
|
154
200
|
},
|
|
155
201
|
{
|
|
156
202
|
"name": "y",
|
|
157
203
|
"attribute": "y",
|
|
158
204
|
"description": "Set a specific y coordinate",
|
|
159
|
-
"type": "number"
|
|
205
|
+
"type": "number | undefined"
|
|
160
206
|
},
|
|
161
207
|
{
|
|
162
208
|
"name": "horizontalOffset",
|
|
209
|
+
"attribute": "horizontal-offset",
|
|
163
210
|
"description": "A pixel value that will be added to the position calculated on the horizontal axis. The offset will be applied either to the `left` or `right` depending on the `positionTarget`",
|
|
164
|
-
"type": "number"
|
|
211
|
+
"type": "number",
|
|
212
|
+
"default": "0"
|
|
165
213
|
},
|
|
166
214
|
{
|
|
167
215
|
"name": "verticalOffset",
|
|
216
|
+
"attribute": "vertical-offset",
|
|
168
217
|
"description": "A pixel value that will be added to the position calculated on the vertical axis. The offset will be applied either to the `top` or `bottom` depending on the `positionTarget`",
|
|
169
|
-
"type": "number"
|
|
218
|
+
"type": "number",
|
|
219
|
+
"default": "0"
|
|
170
220
|
},
|
|
171
221
|
{
|
|
172
222
|
"name": "offset",
|
|
@@ -178,7 +228,7 @@
|
|
|
178
228
|
"name": "position",
|
|
179
229
|
"attribute": "position",
|
|
180
230
|
"description": "Set position and align against the attach target.",
|
|
181
|
-
"type": "
|
|
231
|
+
"type": "Position[] | undefined"
|
|
182
232
|
}
|
|
183
233
|
],
|
|
184
234
|
"events": [
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# ef-overlay-menu
|
|
2
|
+
|
|
3
|
+
Overlay that supports single-level and multi-level menus
|
|
4
|
+
|
|
5
|
+
## Attributes
|
|
6
|
+
|
|
7
|
+
| Attribute | Type | Description |
|
|
8
|
+
|------------------------------|-----------|--------------------------------------------------|
|
|
9
|
+
| `horizontal-offset` | `number` | A pixel value that will be added to the position calculated on the horizontal axis. The offset will be applied either to the `left` or `right` depending on the `positionTarget` |
|
|
10
|
+
| `lock-position-target` | `boolean` | Set to true to lock position target |
|
|
11
|
+
| `no-cancel-on-esc-key` | `boolean` | Set to true to disable canceling the overlay with the ESC key |
|
|
12
|
+
| `no-cancel-on-outside-click` | `boolean` | Set to true to disable canceling the overlay by clicking outside it |
|
|
13
|
+
| `transition-style` | `string` | Set the transition style |
|
|
14
|
+
| `vertical-offset` | `number` | A pixel value that will be added to the position calculated on the vertical axis. The offset will be applied either to the `top` or `bottom` depending on the `positionTarget` |
|
|
15
|
+
| `with-backdrop` | `boolean` | True to show backdrop |
|
|
16
|
+
|
|
17
|
+
## Properties
|
|
18
|
+
|
|
19
|
+
| Property | Attribute | Type | Default | Description |
|
|
20
|
+
|--------------------------|------------------------------|------------------------------|---------|--------------------------------------------------|
|
|
21
|
+
| `compact` | `compact` | `boolean` | false | Switch to compact style menu |
|
|
22
|
+
| `data` | | `OverlayMenuData\|undefined` | | Construct the menu from data object.<br />Cannot be used with internal content |
|
|
23
|
+
| `horizontalOffset` | `horizontal-offset` | `number` | 0 | A pixel value that will be added to the position calculated on the horizontal axis. The offset will be applied either to the `left` or `right` depending on the `positionTarget` |
|
|
24
|
+
| `lockPositionTarget` | `lock-position-target` | `boolean` | false | Set to true to lock position target |
|
|
25
|
+
| `noCancelOnEscKey` | `no-cancel-on-esc-key` | `boolean` | false | Set to true to disable canceling the overlay with the ESC key |
|
|
26
|
+
| `noCancelOnOutsideClick` | `no-cancel-on-outside-click` | `boolean` | false | Set to true to disable canceling the overlay by clicking outside it |
|
|
27
|
+
| `offset` | `offset` | `number` | | A pixel value that will be added to the position calculated on the vertical or horizontal axis. The offset is applied dynamically depending on the `positionTarget` |
|
|
28
|
+
| `opened` | `opened` | `boolean` | false | True if the menu is currently displayed |
|
|
29
|
+
| `position` | `position` | `Position[] \| undefined` | | Set position and align against the attach target. |
|
|
30
|
+
| `positionTarget` | | `HTMLElement \| null` | null | Position next to the HTML element |
|
|
31
|
+
| `transitionStyle` | `transition-style` | `string \| null` | null | Set the transition style |
|
|
32
|
+
| `value` | `value` | `string` | "" | Returns the first selected item value. |
|
|
33
|
+
| `values` | | `string[]` | [] | Array of item's values |
|
|
34
|
+
| `verticalOffset` | `vertical-offset` | `number` | 0 | A pixel value that will be added to the position calculated on the vertical axis. The offset will be applied either to the `top` or `bottom` depending on the `positionTarget` |
|
|
35
|
+
| `withBackdrop` | `with-backdrop` | `boolean` | false | True to show backdrop |
|
|
36
|
+
| `x` | `x` | `number \| undefined` | | Set a specific x coordinate |
|
|
37
|
+
| `y` | `y` | `number \| undefined` | | Set a specific y coordinate |
|
|
38
|
+
|
|
39
|
+
## Events
|
|
40
|
+
|
|
41
|
+
| Event | Description |
|
|
42
|
+
|------------------|--------------------------------------------------|
|
|
43
|
+
| `item-trigger` | Dispatched when user clicks on item |
|
|
44
|
+
| `opened-changed` | Dispatched when when opened attribute changes internally. Prevent default to stop opening/closing pipeline |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CollectionComposer } from '@refinitiv-ui/utils';
|
|
2
|
-
import { OverlayMenu } from '../index';
|
|
3
|
-
import { Item, ItemData } from '../../item';
|
|
1
|
+
import type { CollectionComposer } from '@refinitiv-ui/utils/lib/collection';
|
|
2
|
+
import type { OverlayMenu } from '../index';
|
|
3
|
+
import type { Item, ItemData } from '../../item';
|
|
4
4
|
export declare type NestedMenu = {
|
|
5
5
|
menu: OverlayMenu;
|
|
6
6
|
item: Item;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import { TemplateResult,
|
|
3
|
-
import '../icon';
|
|
4
|
-
import '../item';
|
|
5
|
-
import { Overlay } from '../overlay';
|
|
6
|
-
import { OverlayMenuData } from './helpers/types';
|
|
7
|
-
export { OverlayMenuData };
|
|
2
|
+
import { TemplateResult, CSSResultGroup, PropertyValues } from '@refinitiv-ui/core';
|
|
3
|
+
import '../icon/index.js';
|
|
4
|
+
import '../item/index.js';
|
|
5
|
+
import { Overlay } from '../overlay/index.js';
|
|
6
|
+
import type { OverlayMenuData } from './helpers/types';
|
|
7
|
+
export type { OverlayMenuData };
|
|
8
8
|
/**
|
|
9
9
|
* Overlay that supports single-level and multi-level menus
|
|
10
10
|
* @fires item-trigger - Dispatched when user clicks on item
|
|
@@ -25,30 +25,30 @@ export { OverlayMenuData };
|
|
|
25
25
|
* @attr {boolean} lock-position-target - Set to true to lock position target
|
|
26
26
|
* @prop {boolean} [lockPositionTarget=false] - Set to true to lock position target
|
|
27
27
|
*
|
|
28
|
-
* @prop {HTMLElement|null} [positionTarget=null] - Position next to the HTML element
|
|
28
|
+
* @prop {HTMLElement | null} [positionTarget=null] - Position next to the HTML element
|
|
29
29
|
*
|
|
30
30
|
* @attr {string} transition-style - Set the transition style
|
|
31
|
-
* @prop {string|null} [transitionStyle=null] - Set the transition style
|
|
31
|
+
* @prop {string | null} [transitionStyle=null] - Set the transition style
|
|
32
32
|
*
|
|
33
|
-
* @prop {string} [value=] - Returns the first selected item from values.
|
|
33
|
+
* @prop {string} [value=""] - Returns the first selected item from values.
|
|
34
34
|
*
|
|
35
|
-
* @attr {number} x - Set a specific x coordinate
|
|
36
|
-
* @prop {number} x - Set a specific x coordinate
|
|
35
|
+
* @attr {number | undefined} x - Set a specific x coordinate
|
|
36
|
+
* @prop {number | undefined} x - Set a specific x coordinate
|
|
37
37
|
*
|
|
38
|
-
* @attr {number} y - Set a specific y coordinate
|
|
39
|
-
* @prop {number} y - Set a specific y coordinate
|
|
38
|
+
* @attr {number | undefined} y - Set a specific y coordinate
|
|
39
|
+
* @prop {number | undefined} y - Set a specific y coordinate
|
|
40
40
|
*
|
|
41
41
|
* @attr {number} horizontal-offset - A pixel value that will be added to the position calculated on the horizontal axis. The offset will be applied either to the `left` or `right` depending on the `positionTarget`
|
|
42
|
-
* @prop {number} horizontalOffset - A pixel value that will be added to the position calculated on the horizontal axis. The offset will be applied either to the `left` or `right` depending on the `positionTarget`
|
|
42
|
+
* @prop {number} [horizontalOffset=0] - A pixel value that will be added to the position calculated on the horizontal axis. The offset will be applied either to the `left` or `right` depending on the `positionTarget`
|
|
43
43
|
*
|
|
44
44
|
* @attr {number} vertical-offset - A pixel value that will be added to the position calculated on the vertical axis. The offset will be applied either to the `top` or `bottom` depending on the `positionTarget`
|
|
45
|
-
* @prop {number} verticalOffset - A pixel value that will be added to the position calculated on the vertical axis. The offset will be applied either to the `top` or `bottom` depending on the `positionTarget`
|
|
45
|
+
* @prop {number} [verticalOffset=0] - A pixel value that will be added to the position calculated on the vertical axis. The offset will be applied either to the `top` or `bottom` depending on the `positionTarget`
|
|
46
46
|
*
|
|
47
47
|
* @attr {number} offset - A pixel value that will be added to the position calculated on the vertical or horizontal axis. The offset is applied dynamically depending on the `positionTarget`
|
|
48
48
|
* @prop {number} offset - A pixel value that will be added to the position calculated on the vertical or horizontal axis. The offset is applied dynamically depending on the `positionTarget`
|
|
49
49
|
*
|
|
50
|
-
* @attr {
|
|
51
|
-
* @prop {
|
|
50
|
+
* @attr {Position[] | undefined} position - Set position and align against the attach target.
|
|
51
|
+
* @prop {Position[] | undefined} position - Set position and align against the attach target.
|
|
52
52
|
*/
|
|
53
53
|
export declare class OverlayMenu extends Overlay {
|
|
54
54
|
/**
|
|
@@ -57,12 +57,12 @@ export declare class OverlayMenu extends Overlay {
|
|
|
57
57
|
*/
|
|
58
58
|
static get version(): string;
|
|
59
59
|
/**
|
|
60
|
-
* A `
|
|
60
|
+
* A `CSSResultGroup` that will be used
|
|
61
61
|
* to style the host, slotted children
|
|
62
62
|
* and the internal template of the element.
|
|
63
63
|
* @return CSS template
|
|
64
64
|
*/
|
|
65
|
-
static get styles():
|
|
65
|
+
static get styles(): CSSResultGroup;
|
|
66
66
|
constructor();
|
|
67
67
|
private dataDisconnectThrottler;
|
|
68
68
|
private menuHighlightedItem?;
|
|
@@ -81,6 +81,7 @@ export declare class OverlayMenu extends Overlay {
|
|
|
81
81
|
/**
|
|
82
82
|
* Array of item's values
|
|
83
83
|
* @type {string[]}
|
|
84
|
+
* @default []
|
|
84
85
|
*/
|
|
85
86
|
get values(): string[];
|
|
86
87
|
set values(values: string[]);
|
|
@@ -92,6 +93,7 @@ export declare class OverlayMenu extends Overlay {
|
|
|
92
93
|
/**
|
|
93
94
|
* Construct the menu from data object.
|
|
94
95
|
* Cannot be used with internal content
|
|
96
|
+
* @type {OverlayMenuData|undefined}
|
|
95
97
|
*/
|
|
96
98
|
get data(): OverlayMenuData | undefined;
|
|
97
99
|
set data(value: OverlayMenuData | undefined);
|
|
@@ -184,6 +186,11 @@ export declare class OverlayMenu extends Overlay {
|
|
|
184
186
|
* @return {void}
|
|
185
187
|
*/
|
|
186
188
|
protected onClosed(): void;
|
|
189
|
+
/**
|
|
190
|
+
* Restore properties back to original before bounding to parent menu
|
|
191
|
+
* @returns {void}
|
|
192
|
+
*/
|
|
193
|
+
private restoreNestedProperties;
|
|
187
194
|
/**
|
|
188
195
|
* Selects all data from CollectionComposer
|
|
189
196
|
* @return all MenuItems stored in CollectionComposer
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
1
|
var OverlayMenu_1;
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import '
|
|
11
|
-
import '
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
2
|
+
import { __decorate } from "tslib";
|
|
3
|
+
import { html, css, WarningNotice } from '@refinitiv-ui/core';
|
|
4
|
+
import { customElement } from '@refinitiv-ui/core/lib/decorators/custom-element.js';
|
|
5
|
+
import { property } from '@refinitiv-ui/core/lib/decorators/property.js';
|
|
6
|
+
import { ifDefined } from '@refinitiv-ui/core/lib/directives/if-defined.js';
|
|
7
|
+
import { VERSION } from '../version.js';
|
|
8
|
+
import { AnimationTaskRunner } from '@refinitiv-ui/utils/lib/async.js';
|
|
9
|
+
import { CollectionComposer } from '@refinitiv-ui/utils/lib/collection.js';
|
|
10
|
+
import { uuid } from '@refinitiv-ui/utils/lib/uuid.js';
|
|
11
|
+
import '../icon/index.js';
|
|
12
|
+
import '../item/index.js';
|
|
13
|
+
import { Item } from '../item/index.js';
|
|
14
|
+
import { Overlay } from '../overlay/index.js';
|
|
15
|
+
import { applyLock } from '../overlay/managers/interaction-lock-manager.js';
|
|
16
|
+
import { OpenedMenusManager } from './managers/menu-manager.js';
|
|
17
17
|
/**
|
|
18
18
|
* Overlay that supports single-level and multi-level menus
|
|
19
19
|
* @fires item-trigger - Dispatched when user clicks on item
|
|
@@ -34,30 +34,30 @@ import { VERSION } from '../';
|
|
|
34
34
|
* @attr {boolean} lock-position-target - Set to true to lock position target
|
|
35
35
|
* @prop {boolean} [lockPositionTarget=false] - Set to true to lock position target
|
|
36
36
|
*
|
|
37
|
-
* @prop {HTMLElement|null} [positionTarget=null] - Position next to the HTML element
|
|
37
|
+
* @prop {HTMLElement | null} [positionTarget=null] - Position next to the HTML element
|
|
38
38
|
*
|
|
39
39
|
* @attr {string} transition-style - Set the transition style
|
|
40
|
-
* @prop {string|null} [transitionStyle=null] - Set the transition style
|
|
40
|
+
* @prop {string | null} [transitionStyle=null] - Set the transition style
|
|
41
41
|
*
|
|
42
|
-
* @prop {string} [value=] - Returns the first selected item from values.
|
|
42
|
+
* @prop {string} [value=""] - Returns the first selected item from values.
|
|
43
43
|
*
|
|
44
|
-
* @attr {number} x - Set a specific x coordinate
|
|
45
|
-
* @prop {number} x - Set a specific x coordinate
|
|
44
|
+
* @attr {number | undefined} x - Set a specific x coordinate
|
|
45
|
+
* @prop {number | undefined} x - Set a specific x coordinate
|
|
46
46
|
*
|
|
47
|
-
* @attr {number} y - Set a specific y coordinate
|
|
48
|
-
* @prop {number} y - Set a specific y coordinate
|
|
47
|
+
* @attr {number | undefined} y - Set a specific y coordinate
|
|
48
|
+
* @prop {number | undefined} y - Set a specific y coordinate
|
|
49
49
|
*
|
|
50
50
|
* @attr {number} horizontal-offset - A pixel value that will be added to the position calculated on the horizontal axis. The offset will be applied either to the `left` or `right` depending on the `positionTarget`
|
|
51
|
-
* @prop {number} horizontalOffset - A pixel value that will be added to the position calculated on the horizontal axis. The offset will be applied either to the `left` or `right` depending on the `positionTarget`
|
|
51
|
+
* @prop {number} [horizontalOffset=0] - A pixel value that will be added to the position calculated on the horizontal axis. The offset will be applied either to the `left` or `right` depending on the `positionTarget`
|
|
52
52
|
*
|
|
53
53
|
* @attr {number} vertical-offset - A pixel value that will be added to the position calculated on the vertical axis. The offset will be applied either to the `top` or `bottom` depending on the `positionTarget`
|
|
54
|
-
* @prop {number} verticalOffset - A pixel value that will be added to the position calculated on the vertical axis. The offset will be applied either to the `top` or `bottom` depending on the `positionTarget`
|
|
54
|
+
* @prop {number} [verticalOffset=0] - A pixel value that will be added to the position calculated on the vertical axis. The offset will be applied either to the `top` or `bottom` depending on the `positionTarget`
|
|
55
55
|
*
|
|
56
56
|
* @attr {number} offset - A pixel value that will be added to the position calculated on the vertical or horizontal axis. The offset is applied dynamically depending on the `positionTarget`
|
|
57
57
|
* @prop {number} offset - A pixel value that will be added to the position calculated on the vertical or horizontal axis. The offset is applied dynamically depending on the `positionTarget`
|
|
58
58
|
*
|
|
59
|
-
* @attr {
|
|
60
|
-
* @prop {
|
|
59
|
+
* @attr {Position[] | undefined} position - Set position and align against the attach target.
|
|
60
|
+
* @prop {Position[] | undefined} position - Set position and align against the attach target.
|
|
61
61
|
*/
|
|
62
62
|
let OverlayMenu = OverlayMenu_1 = class OverlayMenu extends Overlay {
|
|
63
63
|
constructor() {
|
|
@@ -109,7 +109,7 @@ let OverlayMenu = OverlayMenu_1 = class OverlayMenu extends Overlay {
|
|
|
109
109
|
return VERSION;
|
|
110
110
|
}
|
|
111
111
|
/**
|
|
112
|
-
* A `
|
|
112
|
+
* A `CSSResultGroup` that will be used
|
|
113
113
|
* to style the host, slotted children
|
|
114
114
|
* and the internal template of the element.
|
|
115
115
|
* @return CSS template
|
|
@@ -131,6 +131,7 @@ let OverlayMenu = OverlayMenu_1 = class OverlayMenu extends Overlay {
|
|
|
131
131
|
/**
|
|
132
132
|
* Array of item's values
|
|
133
133
|
* @type {string[]}
|
|
134
|
+
* @default []
|
|
134
135
|
*/
|
|
135
136
|
get values() {
|
|
136
137
|
return this.withData ? this.getDataValues() : this.getSlottedValues();
|
|
@@ -141,7 +142,7 @@ let OverlayMenu = OverlayMenu_1 = class OverlayMenu extends Overlay {
|
|
|
141
142
|
return;
|
|
142
143
|
}
|
|
143
144
|
this.withData ? this.setDataValues(values) : this.setSlottedValues(values);
|
|
144
|
-
|
|
145
|
+
this.requestUpdate('values', oldValues);
|
|
145
146
|
}
|
|
146
147
|
/**
|
|
147
148
|
* Returns the first selected item value.
|
|
@@ -156,6 +157,7 @@ let OverlayMenu = OverlayMenu_1 = class OverlayMenu extends Overlay {
|
|
|
156
157
|
/**
|
|
157
158
|
* Construct the menu from data object.
|
|
158
159
|
* Cannot be used with internal content
|
|
160
|
+
* @type {OverlayMenuData|undefined}
|
|
159
161
|
*/
|
|
160
162
|
get data() {
|
|
161
163
|
return this._data;
|
|
@@ -184,7 +186,7 @@ let OverlayMenu = OverlayMenu_1 = class OverlayMenu extends Overlay {
|
|
|
184
186
|
this.composer.on('modification', // Listen for modifications
|
|
185
187
|
this.modificationUpdate // Update the template
|
|
186
188
|
);
|
|
187
|
-
|
|
189
|
+
this.requestUpdate('data', oldValue);
|
|
188
190
|
}
|
|
189
191
|
/**
|
|
190
192
|
* Get values from data collection
|
|
@@ -368,7 +370,15 @@ let OverlayMenu = OverlayMenu_1 = class OverlayMenu extends Overlay {
|
|
|
368
370
|
this.disconnectNestedMenus();
|
|
369
371
|
});
|
|
370
372
|
this.setItemHighlight();
|
|
371
|
-
|
|
373
|
+
this.restoreNestedProperties();
|
|
374
|
+
super.onClosed();
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* Restore properties back to original before bounding to parent menu
|
|
378
|
+
* @returns {void}
|
|
379
|
+
*/
|
|
380
|
+
restoreNestedProperties() {
|
|
381
|
+
if (this.nested) {
|
|
372
382
|
this.nested = false;
|
|
373
383
|
this.position = this.oldPosition;
|
|
374
384
|
this.positionTarget = this.oldPositionTarget;
|
|
@@ -377,7 +387,6 @@ let OverlayMenu = OverlayMenu_1 = class OverlayMenu extends Overlay {
|
|
|
377
387
|
this.oldPosition = undefined;
|
|
378
388
|
this.oldInteractiveElements = [];
|
|
379
389
|
}
|
|
380
|
-
super.onClosed();
|
|
381
390
|
}
|
|
382
391
|
/**
|
|
383
392
|
* Selects all data from CollectionComposer
|
|
@@ -403,6 +412,7 @@ let OverlayMenu = OverlayMenu_1 = class OverlayMenu extends Overlay {
|
|
|
403
412
|
opening() {
|
|
404
413
|
const parentMenuItem = OpenedMenusManager.getParentMenuItem(this);
|
|
405
414
|
this.dataDisconnectThrottler.cancel();
|
|
415
|
+
this.restoreNestedProperties();
|
|
406
416
|
if (parentMenuItem) {
|
|
407
417
|
this.nested = true;
|
|
408
418
|
this.noCancelOnOutsideClick = true;
|
|
@@ -424,6 +434,10 @@ let OverlayMenu = OverlayMenu_1 = class OverlayMenu extends Overlay {
|
|
|
424
434
|
this.positionTarget = parentMenu === null || parentMenu === void 0 ? void 0 : parentMenu.positionTarget;
|
|
425
435
|
this.position = parentMenu === null || parentMenu === void 0 ? void 0 : parentMenu.position;
|
|
426
436
|
}
|
|
437
|
+
// Managers are applied in shouldUpdate lifecycles (as not every property causes re-render)
|
|
438
|
+
// The process must follow certain order (which is better not to touch)
|
|
439
|
+
// `applyLock` fixes a problem when changes in properties above where not take into account
|
|
440
|
+
applyLock();
|
|
427
441
|
}
|
|
428
442
|
this.registerMenu();
|
|
429
443
|
}
|
|
@@ -440,7 +454,7 @@ let OverlayMenu = OverlayMenu_1 = class OverlayMenu extends Overlay {
|
|
|
440
454
|
*/
|
|
441
455
|
modificationUpdate() {
|
|
442
456
|
this.constructDataMenus();
|
|
443
|
-
|
|
457
|
+
this.requestUpdate();
|
|
444
458
|
}
|
|
445
459
|
/**
|
|
446
460
|
* Construct menu items and nested menus from data object
|
|
@@ -813,7 +827,7 @@ let OverlayMenu = OverlayMenu_1 = class OverlayMenu extends Overlay {
|
|
|
813
827
|
menu.transitionStyle = this.transitionStyle;
|
|
814
828
|
menu.noCancelOnOutsideClick = true;
|
|
815
829
|
menu.compact = this.compact;
|
|
816
|
-
menu.id =
|
|
830
|
+
menu.id = uuid();
|
|
817
831
|
return menu;
|
|
818
832
|
}
|
|
819
833
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Item } from '../../item';
|
|
2
|
-
import { OverlayMenu } from '../index';
|
|
1
|
+
import type { Item } from '../../item';
|
|
2
|
+
import { OverlayMenu } from '../index.js';
|
|
3
3
|
/**
|
|
4
4
|
* Overlay menu manager monitors menu nesting and ensures
|
|
5
5
|
* that only a single menu tree can be opened
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AfterRenderTaskRunner } from '@refinitiv-ui/utils';
|
|
2
|
-
import { OverlayMenu } from '../index';
|
|
3
|
-
import { getOverlays } from '../../overlay/managers/zindex-manager';
|
|
1
|
+
import { AfterRenderTaskRunner } from '@refinitiv-ui/utils/lib/async.js';
|
|
2
|
+
import { OverlayMenu } from '../index.js';
|
|
3
|
+
import { getOverlays } from '../../overlay/managers/zindex-manager.js';
|
|
4
4
|
/**
|
|
5
5
|
* Overlay menu manager monitors menu nesting and ensures
|
|
6
6
|
* that only a single menu tree can be opened
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# ef-pagination
|
|
2
|
+
|
|
3
|
+
Used to control and navigate through multiple pages
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
| Property | Attribute | Type | Default | Description |
|
|
8
|
+
|--------------|---------------|-----------|---------|-------------------------|
|
|
9
|
+
| `disabled` | `disabled` | `boolean` | false | Set state to disable |
|
|
10
|
+
| `page` | `page` | `string` | "1" | Set current page |
|
|
11
|
+
| `pageSize` | `page-size` | `string` | "10" | Number of item per page |
|
|
12
|
+
| `totalItems` | `total-items` | `string` | "10" | Total items |
|
|
13
|
+
|
|
14
|
+
## Methods
|
|
15
|
+
|
|
16
|
+
| Method | Type | Description |
|
|
17
|
+
|------------|------------|-------------------------|
|
|
18
|
+
| `first` | `(): void` | Go to the first page |
|
|
19
|
+
| `last` | `(): void` | Go to the last page |
|
|
20
|
+
| `next` | `(): void` | Go to the next page |
|
|
21
|
+
| `previous` | `(): void` | Go to the previous page |
|
|
22
|
+
|
|
23
|
+
## Events
|
|
24
|
+
|
|
25
|
+
| Event | Description |
|
|
26
|
+
|----------------|-------------------------------------------|
|
|
27
|
+
| `page-changed` | Fired when the `page` property is changed |
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import { BasicElement, PropertyValues, TemplateResult,
|
|
3
|
-
import '
|
|
2
|
+
import { BasicElement, PropertyValues, TemplateResult, CSSResultGroup } from '@refinitiv-ui/core';
|
|
3
|
+
import '../button/index.js';
|
|
4
|
+
import '../button-bar/index.js';
|
|
5
|
+
import '../layout/index.js';
|
|
6
|
+
import '../text-field/index.js';
|
|
7
|
+
import '@refinitiv-ui/phrasebook/lib/locale/en/pagination.js';
|
|
4
8
|
import { Translate } from '@refinitiv-ui/translate';
|
|
5
|
-
import '../button';
|
|
6
|
-
import '../button-bar';
|
|
7
|
-
import '../layout';
|
|
8
|
-
import '../text-field';
|
|
9
9
|
/**
|
|
10
10
|
* Used to control and navigate through multiple pages
|
|
11
11
|
* @fires page-changed - Fired when the `page` property is changed
|
|
@@ -17,12 +17,12 @@ export declare class Pagination extends BasicElement {
|
|
|
17
17
|
*/
|
|
18
18
|
static get version(): string;
|
|
19
19
|
/**
|
|
20
|
-
* A `
|
|
20
|
+
* A `CSSResultGroup` that will be used
|
|
21
21
|
* to style the host, slotted children
|
|
22
22
|
* and the internal template of the element.
|
|
23
23
|
* @return CSS template
|
|
24
24
|
*/
|
|
25
|
-
static get styles():
|
|
25
|
+
static get styles(): CSSResultGroup;
|
|
26
26
|
/**
|
|
27
27
|
* Set current page
|
|
28
28
|
*/
|
package/lib/pagination/index.js
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
import
|
|
8
|
-
import '
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { BasicElement, html, css } from '@refinitiv-ui/core';
|
|
3
|
+
import { customElement } from '@refinitiv-ui/core/lib/decorators/custom-element.js';
|
|
4
|
+
import { property } from '@refinitiv-ui/core/lib/decorators/property.js';
|
|
5
|
+
import { query } from '@refinitiv-ui/core/lib/decorators/query.js';
|
|
6
|
+
import { VERSION } from '../version.js';
|
|
7
|
+
import '../button/index.js';
|
|
8
|
+
import '../button-bar/index.js';
|
|
9
|
+
import '../layout/index.js';
|
|
10
|
+
import '../text-field/index.js';
|
|
11
|
+
import '@refinitiv-ui/phrasebook/lib/locale/en/pagination.js';
|
|
9
12
|
import { translate } from '@refinitiv-ui/translate';
|
|
10
|
-
import '../button';
|
|
11
|
-
import '../button-bar';
|
|
12
|
-
import '../layout';
|
|
13
|
-
import '../text-field';
|
|
14
|
-
import { VERSION } from '../';
|
|
15
13
|
/**
|
|
16
14
|
* Used to control and navigate through multiple pages
|
|
17
15
|
* @fires page-changed - Fired when the `page` property is changed
|
|
@@ -44,7 +42,7 @@ let Pagination = class Pagination extends BasicElement {
|
|
|
44
42
|
return VERSION;
|
|
45
43
|
}
|
|
46
44
|
/**
|
|
47
|
-
* A `
|
|
45
|
+
* A `CSSResultGroup` that will be used
|
|
48
46
|
* to style the host, slotted children
|
|
49
47
|
* and the internal template of the element.
|
|
50
48
|
* @return CSS template
|
|
@@ -221,7 +219,7 @@ let Pagination = class Pagination extends BasicElement {
|
|
|
221
219
|
const oldPageValue = this.page;
|
|
222
220
|
this.page = this.validatePage(this.page, event.target.value);
|
|
223
221
|
// need this to update input text
|
|
224
|
-
|
|
222
|
+
this.requestUpdate();
|
|
225
223
|
if (this.page !== oldPageValue) {
|
|
226
224
|
this.notifyPropertyChange('page', this.page);
|
|
227
225
|
}
|