@refinitiv-ui/elements 5.5.0 → 5.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +65 -8
- 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 +8 -12
- package/lib/color-dialog/elements/grayscale-palettes.d.ts +5 -5
- package/lib/color-dialog/elements/grayscale-palettes.js +9 -12
- package/lib/color-dialog/elements/palettes.d.ts +3 -3
- package/lib/color-dialog/elements/palettes.js +49 -47
- package/lib/color-dialog/helpers/value-model.js +2 -2
- package/lib/color-dialog/index.d.ts +19 -19
- package/lib/color-dialog/index.js +36 -35
- 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/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/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/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/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 +18 -23
- 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 +21 -19
- package/lib/overlay-menu/index.js +32 -31
- 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/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/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-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/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/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/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 +4 -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 +6 -5
- package/lib/tree/elements/tree.js +9 -12
- package/lib/tree/helpers/filter.d.ts +2 -2
- package/lib/tree/helpers/renderer.d.ts +2 -2
- package/lib/tree/helpers/renderer.js +3 -3
- package/lib/tree/helpers/types.d.ts +1 -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 +28 -20
- package/lib/tree-select/index.js +44 -31
- 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
package/lib/select/index.js
CHANGED
|
@@ -1,24 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
import {
|
|
8
|
-
import '../overlay';
|
|
9
|
-
import
|
|
10
|
-
import '../
|
|
11
|
-
import '../
|
|
12
|
-
import { CollectionComposer
|
|
13
|
-
import {
|
|
14
|
-
/**
|
|
15
|
-
* Key direction
|
|
16
|
-
*/
|
|
17
|
-
var Direction;
|
|
18
|
-
(function (Direction) {
|
|
19
|
-
Direction[Direction["Up"] = -1] = "Up";
|
|
20
|
-
Direction[Direction["Down"] = 1] = "Down";
|
|
21
|
-
})(Direction || (Direction = {}));
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { ControlElement, html, css, FocusedPropertyKey } 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 { styleMap } from '@refinitiv-ui/core/lib/directives/style-map.js';
|
|
7
|
+
import { VERSION } from '../version.js';
|
|
8
|
+
import '../overlay/index.js';
|
|
9
|
+
import '../item/index.js';
|
|
10
|
+
import '../icon/index.js';
|
|
11
|
+
import { Item } from '../item/index.js';
|
|
12
|
+
import { CollectionComposer } from '@refinitiv-ui/utils/lib/collection.js';
|
|
13
|
+
import { TimeoutTaskRunner, AnimationTaskRunner } from '@refinitiv-ui/utils/lib/async.js';
|
|
22
14
|
// Observer config for items
|
|
23
15
|
const observerOptions = {
|
|
24
16
|
subtree: true,
|
|
@@ -36,6 +28,13 @@ const observerOptions = {
|
|
|
36
28
|
const LABEL_SEPARATOR = ', '; // TODO: for multiselect
|
|
37
29
|
const POPUP_POSITION = ['bottom-start', 'top-start'];
|
|
38
30
|
const KEY_SEARCH_DEBOUNCER = 300;
|
|
31
|
+
var Navigation;
|
|
32
|
+
(function (Navigation) {
|
|
33
|
+
Navigation["FIRST"] = "First";
|
|
34
|
+
Navigation["LAST"] = "Last";
|
|
35
|
+
Navigation["NEXT"] = "Next";
|
|
36
|
+
Navigation["PREVIOUS"] = "Previous";
|
|
37
|
+
})(Navigation || (Navigation = {}));
|
|
39
38
|
/**
|
|
40
39
|
* Expands upon the native select element,
|
|
41
40
|
* providing a fully themeable dropdown element.
|
|
@@ -49,6 +48,7 @@ const KEY_SEARCH_DEBOUNCER = 300;
|
|
|
49
48
|
let Select = class Select extends ControlElement {
|
|
50
49
|
constructor() {
|
|
51
50
|
super(...arguments);
|
|
51
|
+
this.defaultRole = 'button';
|
|
52
52
|
this.composer = new CollectionComposer([]);
|
|
53
53
|
this._data = null;
|
|
54
54
|
this.popupDynamicStyles = {}; /* set popup min-width based on select width or CSS vars */
|
|
@@ -91,7 +91,7 @@ let Select = class Select extends ControlElement {
|
|
|
91
91
|
const hasLightDomMutations = mutations
|
|
92
92
|
.some(m => m.target.getRootNode() !== this.shadowRoot);
|
|
93
93
|
if (hasLightDomMutations) {
|
|
94
|
-
|
|
94
|
+
this.requestUpdate();
|
|
95
95
|
}
|
|
96
96
|
};
|
|
97
97
|
this.shouldOpenOnFocus = false;
|
|
@@ -111,7 +111,7 @@ let Select = class Select extends ControlElement {
|
|
|
111
111
|
return VERSION;
|
|
112
112
|
}
|
|
113
113
|
/**
|
|
114
|
-
* A `
|
|
114
|
+
* A `CSSResultGroup` that will be used
|
|
115
115
|
* to style the host, slotted children
|
|
116
116
|
* and the internal template of the element.
|
|
117
117
|
* @return CSS template
|
|
@@ -213,6 +213,7 @@ let Select = class Select extends ControlElement {
|
|
|
213
213
|
/**
|
|
214
214
|
* Construct the menu from data object. Cannot be used with slotted content
|
|
215
215
|
* @type {SelectData | null}
|
|
216
|
+
* @default null
|
|
216
217
|
*/
|
|
217
218
|
get data() {
|
|
218
219
|
return this._data;
|
|
@@ -234,11 +235,12 @@ let Select = class Select extends ControlElement {
|
|
|
234
235
|
if (!this.selectedDataItems.length) {
|
|
235
236
|
this.value = this.cachedValue;
|
|
236
237
|
}
|
|
237
|
-
|
|
238
|
+
this.requestUpdate('data', oldValue);
|
|
238
239
|
}
|
|
239
240
|
/**
|
|
240
241
|
* Value of the element
|
|
241
242
|
* @param value Element value
|
|
243
|
+
* @default -
|
|
242
244
|
*/
|
|
243
245
|
set value(value) {
|
|
244
246
|
value = this.castValue(value);
|
|
@@ -250,7 +252,7 @@ let Select = class Select extends ControlElement {
|
|
|
250
252
|
// either defined in data or by having selected as an attribute
|
|
251
253
|
this.clearSelection();
|
|
252
254
|
this.selectValue(value);
|
|
253
|
-
|
|
255
|
+
this.requestUpdate('value', oldValue);
|
|
254
256
|
}
|
|
255
257
|
}
|
|
256
258
|
get value() {
|
|
@@ -267,6 +269,15 @@ let Select = class Select extends ControlElement {
|
|
|
267
269
|
}
|
|
268
270
|
return this.selectedSlotItems.map(item => this.getItemValue(item));
|
|
269
271
|
}
|
|
272
|
+
/**
|
|
273
|
+
* Called when connected to DOM
|
|
274
|
+
* @returns {void}
|
|
275
|
+
*/
|
|
276
|
+
connectedCallback() {
|
|
277
|
+
super.connectedCallback();
|
|
278
|
+
// Indicating that this select has a popup of type listbox
|
|
279
|
+
this.setAttribute('aria-haspopup', 'listbox');
|
|
280
|
+
}
|
|
270
281
|
/**
|
|
271
282
|
* Updates the element
|
|
272
283
|
* @param changedProperties Properties that has changed
|
|
@@ -290,6 +301,10 @@ let Select = class Select extends ControlElement {
|
|
|
290
301
|
else {
|
|
291
302
|
this.closing();
|
|
292
303
|
}
|
|
304
|
+
this.setAttribute('aria-expanded', this.opened ? 'true' : 'false');
|
|
305
|
+
}
|
|
306
|
+
if (changedProperties.has('error')) {
|
|
307
|
+
this.setAttribute('aria-invalid', this.error ? 'true' : 'false');
|
|
293
308
|
}
|
|
294
309
|
super.update(changedProperties);
|
|
295
310
|
}
|
|
@@ -372,7 +387,7 @@ let Select = class Select extends ControlElement {
|
|
|
372
387
|
this.resizeThrottler.schedule(() => {
|
|
373
388
|
if (this.offsetWidth) { /* must be here to avoid infinitive loop */
|
|
374
389
|
this.restrictPopupWidth();
|
|
375
|
-
|
|
390
|
+
this.requestUpdate();
|
|
376
391
|
}
|
|
377
392
|
});
|
|
378
393
|
return;
|
|
@@ -541,14 +556,20 @@ let Select = class Select extends ControlElement {
|
|
|
541
556
|
break;
|
|
542
557
|
case 'Up':
|
|
543
558
|
case 'ArrowUp':
|
|
544
|
-
this.focusElement(
|
|
559
|
+
this.focusElement(Navigation.PREVIOUS);
|
|
545
560
|
break;
|
|
546
561
|
case 'Down':
|
|
547
562
|
case 'ArrowDown':
|
|
548
|
-
this.focusElement(
|
|
563
|
+
this.focusElement(Navigation.NEXT);
|
|
549
564
|
break;
|
|
550
565
|
case 'Tab':
|
|
551
|
-
this.focusElement(event.shiftKey ?
|
|
566
|
+
this.focusElement(event.shiftKey ? Navigation.PREVIOUS : Navigation.NEXT);
|
|
567
|
+
break;
|
|
568
|
+
case 'Home':
|
|
569
|
+
this.focusElement(Navigation.FIRST);
|
|
570
|
+
break;
|
|
571
|
+
case 'End':
|
|
572
|
+
this.focusElement(Navigation.LAST);
|
|
552
573
|
break;
|
|
553
574
|
default:
|
|
554
575
|
if (this.isValidFilterKey(event)) {
|
|
@@ -574,27 +595,42 @@ let Select = class Select extends ControlElement {
|
|
|
574
595
|
&& !event.metaKey;
|
|
575
596
|
}
|
|
576
597
|
/**
|
|
577
|
-
* Focus and highlight
|
|
578
|
-
* @param direction
|
|
598
|
+
* Focus and highlight element according to specified direction
|
|
599
|
+
* @param direction previous, next, first or last focusable element
|
|
579
600
|
* @returns {void}
|
|
580
601
|
*/
|
|
581
602
|
focusElement(direction) {
|
|
582
603
|
const highlightedItem = this.highlightedItem || this.getSelectedElements()[0];
|
|
583
|
-
const
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
if (direction === 1) {
|
|
587
|
-
focusElement = idx === -1 ? children[0] : children[idx + 1];
|
|
604
|
+
const selectableElements = this.getSelectableElements();
|
|
605
|
+
if (selectableElements.length === 0) {
|
|
606
|
+
return;
|
|
588
607
|
}
|
|
589
|
-
|
|
590
|
-
|
|
608
|
+
const index = highlightedItem ? selectableElements.indexOf(highlightedItem) : -1;
|
|
609
|
+
const firstElement = selectableElements[0];
|
|
610
|
+
const lastElement = selectableElements[selectableElements.length - 1];
|
|
611
|
+
let element;
|
|
612
|
+
switch (direction) {
|
|
613
|
+
case Navigation.PREVIOUS:
|
|
614
|
+
element = index === -1 ? lastElement : selectableElements[index - 1];
|
|
615
|
+
break;
|
|
616
|
+
case Navigation.NEXT:
|
|
617
|
+
element = index === -1 ? firstElement : selectableElements[index + 1];
|
|
618
|
+
break;
|
|
619
|
+
case Navigation.FIRST:
|
|
620
|
+
element = firstElement;
|
|
621
|
+
break;
|
|
622
|
+
case Navigation.LAST:
|
|
623
|
+
element = lastElement;
|
|
624
|
+
break;
|
|
625
|
+
default:
|
|
626
|
+
break;
|
|
591
627
|
}
|
|
592
|
-
if (!
|
|
593
|
-
|
|
628
|
+
if (!element) {
|
|
629
|
+
element = direction === Navigation.NEXT ? firstElement : lastElement;
|
|
594
630
|
}
|
|
595
|
-
if (
|
|
596
|
-
|
|
597
|
-
this.setItemHighlight(
|
|
631
|
+
if (element) {
|
|
632
|
+
element.focus();
|
|
633
|
+
this.setItemHighlight(element);
|
|
598
634
|
}
|
|
599
635
|
}
|
|
600
636
|
/**
|
|
@@ -705,7 +741,7 @@ let Select = class Select extends ControlElement {
|
|
|
705
741
|
item.selected = false;
|
|
706
742
|
});
|
|
707
743
|
}
|
|
708
|
-
|
|
744
|
+
this.requestUpdate();
|
|
709
745
|
}
|
|
710
746
|
/**
|
|
711
747
|
* Mark item as selected
|
|
@@ -805,15 +841,17 @@ let Select = class Select extends ControlElement {
|
|
|
805
841
|
toItem(item) {
|
|
806
842
|
switch (item.type) {
|
|
807
843
|
case 'divider':
|
|
808
|
-
return html `<ef-item part="item" type="divider"></ef-item>`;
|
|
844
|
+
return html `<ef-item role="presentation" part="item" type="divider"></ef-item>`;
|
|
809
845
|
case 'header':
|
|
810
846
|
return html `<ef-item
|
|
847
|
+
role="presentation"
|
|
811
848
|
part="item"
|
|
812
849
|
type="header"
|
|
813
850
|
.label=${item.label}></ef-item>`;
|
|
814
851
|
// no default
|
|
815
852
|
}
|
|
816
853
|
return html `<ef-item
|
|
854
|
+
role="option"
|
|
817
855
|
part="item"
|
|
818
856
|
.value=${item.value}
|
|
819
857
|
.label=${item.label}
|
|
@@ -865,6 +903,7 @@ let Select = class Select extends ControlElement {
|
|
|
865
903
|
tabindex="-1"
|
|
866
904
|
id="menu"
|
|
867
905
|
part="list"
|
|
906
|
+
role="listbox"
|
|
868
907
|
style=${styleMap(this.popupDynamicStyles)}
|
|
869
908
|
with-shadow
|
|
870
909
|
lock-position-target
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
{
|
|
9
9
|
"name": "sidebar-width",
|
|
10
10
|
"description": "Set the width of the sidebar. The value could be in both px or %, e.g. 300px, 30%",
|
|
11
|
-
"type": "string"
|
|
11
|
+
"type": "string | undefined"
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
"name": "collapsed",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"name": "sidebarWidth",
|
|
29
29
|
"attribute": "sidebar-width",
|
|
30
30
|
"description": "Set the width of the sidebar. The value could be in both px or %, e.g. 300px, 30%",
|
|
31
|
-
"type": "string"
|
|
31
|
+
"type": "string | undefined"
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
"name": "collapsed",
|
|
@@ -43,10 +43,6 @@
|
|
|
43
43
|
"description": "Set sidebar position to left or right",
|
|
44
44
|
"type": "\"left\" | \"right\"",
|
|
45
45
|
"default": "\"left\""
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"name": "sidebar",
|
|
49
|
-
"description": "Property to get sidebar"
|
|
50
46
|
}
|
|
51
47
|
],
|
|
52
48
|
"slots": [
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# ef-sidebar-layout
|
|
2
|
+
|
|
3
|
+
Provides an app layout with sidebar.
|
|
4
|
+
There are 4 sections that can be slotted a component in.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
| Property | Attribute | Type | Default | Description |
|
|
9
|
+
|-------------------|--------------------|-----------------------|---------|--------------------------------------------------|
|
|
10
|
+
| `collapsed` | `collapsed` | `boolean` | false | Set to hide sidebar |
|
|
11
|
+
| `sidebarPosition` | `sidebar-position` | `"left" \| "right"` | "left" | Set sidebar position to left or right |
|
|
12
|
+
| `sidebarWidth` | `sidebar-width` | `string \| undefined` | | Set the width of the sidebar. The value could be in both px or %, e.g. 300px, 30% |
|
|
13
|
+
|
|
14
|
+
## Slots
|
|
15
|
+
|
|
16
|
+
| Name | Description |
|
|
17
|
+
|-------------------|--------------------------|
|
|
18
|
+
| `main-content` | Content of main section. |
|
|
19
|
+
| `main-header` | Main header. |
|
|
20
|
+
| `sidebar-content` | Content of sidebar. |
|
|
21
|
+
| `sidebar-header` | Sidebar header. |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import { BasicElement, TemplateResult,
|
|
3
|
-
import { Layout } from '../layout';
|
|
4
|
-
import '../layout';
|
|
2
|
+
import { BasicElement, TemplateResult, CSSResultGroup, PropertyValues } from '@refinitiv-ui/core';
|
|
3
|
+
import type { Layout } from '../layout';
|
|
4
|
+
import '../layout/index.js';
|
|
5
5
|
/**
|
|
6
6
|
* Provides an app layout with sidebar.
|
|
7
7
|
* There are 4 sections that can be slotted a component in.
|
|
@@ -18,15 +18,15 @@ export declare class SidebarLayout extends BasicElement {
|
|
|
18
18
|
*/
|
|
19
19
|
static get version(): string;
|
|
20
20
|
/**
|
|
21
|
-
* A `
|
|
21
|
+
* A `CSSResultGroup` that will be used
|
|
22
22
|
* to style the host, slotted children
|
|
23
23
|
* and the internal template of the element.
|
|
24
24
|
* @return CSS template
|
|
25
25
|
*/
|
|
26
|
-
static get styles():
|
|
26
|
+
static get styles(): CSSResultGroup;
|
|
27
27
|
/**
|
|
28
28
|
* Set the width of the sidebar. The value could be in both px or %, e.g. 300px, 30%
|
|
29
|
-
* @type {string}
|
|
29
|
+
* @type {string | undefined}
|
|
30
30
|
*/
|
|
31
31
|
sidebarWidth?: string;
|
|
32
32
|
/**
|
|
@@ -39,6 +39,7 @@ export declare class SidebarLayout extends BasicElement {
|
|
|
39
39
|
sidebarPosition: 'left' | 'right';
|
|
40
40
|
/**
|
|
41
41
|
* Property to get sidebar
|
|
42
|
+
* @ignore
|
|
42
43
|
*/
|
|
43
44
|
sidebar: Layout;
|
|
44
45
|
/**
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
import {
|
|
8
|
-
import '../layout';
|
|
9
|
-
import { VERSION } from '../';
|
|
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 { ifDefined } from '@refinitiv-ui/core/lib/directives/if-defined.js';
|
|
7
|
+
import { VERSION } from '../version.js';
|
|
8
|
+
import '../layout/index.js';
|
|
10
9
|
/**
|
|
11
10
|
* Provides an app layout with sidebar.
|
|
12
11
|
* There are 4 sections that can be slotted a component in.
|
|
@@ -36,7 +35,7 @@ let SidebarLayout = class SidebarLayout extends BasicElement {
|
|
|
36
35
|
return VERSION;
|
|
37
36
|
}
|
|
38
37
|
/**
|
|
39
|
-
* A `
|
|
38
|
+
* A `CSSResultGroup` that will be used
|
|
40
39
|
* to style the host, slotted children
|
|
41
40
|
* and the internal template of the element.
|
|
42
41
|
* @return CSS template
|
|
@@ -68,13 +68,13 @@
|
|
|
68
68
|
"name": "readonly",
|
|
69
69
|
"description": "Set readonly state",
|
|
70
70
|
"type": "boolean",
|
|
71
|
-
"default": "
|
|
71
|
+
"default": "false"
|
|
72
72
|
},
|
|
73
73
|
{
|
|
74
74
|
"name": "disabled",
|
|
75
75
|
"description": "Set disabled state",
|
|
76
76
|
"type": "boolean",
|
|
77
|
-
"default": "
|
|
77
|
+
"default": "false"
|
|
78
78
|
}
|
|
79
79
|
],
|
|
80
80
|
"properties": [
|
|
@@ -152,14 +152,14 @@
|
|
|
152
152
|
"attribute": "readonly",
|
|
153
153
|
"description": "Set readonly state",
|
|
154
154
|
"type": "boolean",
|
|
155
|
-
"default": "
|
|
155
|
+
"default": "false"
|
|
156
156
|
},
|
|
157
157
|
{
|
|
158
158
|
"name": "disabled",
|
|
159
159
|
"attribute": "disabled",
|
|
160
160
|
"description": "Set disabled state",
|
|
161
161
|
"type": "boolean",
|
|
162
|
-
"default": "
|
|
162
|
+
"default": "false"
|
|
163
163
|
}
|
|
164
164
|
],
|
|
165
165
|
"events": [
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# ef-slider
|
|
2
|
+
|
|
3
|
+
Allows users to make selections from a range of values
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
| Property | Attribute | Type | Default | Description |
|
|
8
|
+
|------------------|--------------------|----------------------------|---------|--------------------------------------------------|
|
|
9
|
+
| `disabled` | `disabled` | `boolean` | false | Set disabled state |
|
|
10
|
+
| `from` | `from` | `string` | "0" | Uses with `range`. Low value of slider in range mode. |
|
|
11
|
+
| `max` | `max` | `string` | "100" | Slider maximum value of slider. |
|
|
12
|
+
| `min` | `min` | `string` | "0" | Set minimum value of slider. |
|
|
13
|
+
| `minRange` | `min-range` | `string` | "0" | Uses with `range`. Set minimum allowance value (distance) between `from` and `to`. |
|
|
14
|
+
| `range` | `range` | `boolean` | false | Set slider to range mode. Instead of a single value, slider will provide `from` and `to`. |
|
|
15
|
+
| `readonly` | `readonly` | `boolean` | false | Set readonly state |
|
|
16
|
+
| `showInputField` | `show-input-field` | `"" \| "readonly" \| null` | null | Show input number field. |
|
|
17
|
+
| `showSteps` | `show-steps` | `boolean` | false | Show steps marker on slider. |
|
|
18
|
+
| `step` | `step` | `string` | "1" | Specified size of increment or decrement jump between value. |
|
|
19
|
+
| `to` | `to` | `string` | "100" | Uses with `range`. High value of slider in range mode |
|
|
20
|
+
| `value` | `value` | `string` | "0" | Value of slider. Not applicable in range mode. |
|
|
21
|
+
|
|
22
|
+
## Events
|
|
23
|
+
|
|
24
|
+
| Event | Description |
|
|
25
|
+
|-----------------|---------------------------------|
|
|
26
|
+
| `from-changed` | Fired when the `from` changes. |
|
|
27
|
+
| `to-changed` | Fired when the `to` changes. |
|
|
28
|
+
| `value-changed` | Fired when the `value` changes. |
|
package/lib/slider/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import { ControlElement, TemplateResult,
|
|
3
|
-
import '../number-field';
|
|
2
|
+
import { ControlElement, TemplateResult, CSSResultGroup, PropertyValues } from '@refinitiv-ui/core';
|
|
3
|
+
import '../number-field/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* Allows users to make selections from a range of values
|
|
6
6
|
*
|
|
7
7
|
* @attr {string} value - Value of slider. Not applicable in range mode.
|
|
8
|
-
* @prop {string} [value=0] - Value of slider. Not applicable in range mode.
|
|
8
|
+
* @prop {string} [value="0"] - Value of slider. Not applicable in range mode.
|
|
9
9
|
*
|
|
10
10
|
* @attr {boolean} readonly - Set readonly state
|
|
11
11
|
* @prop {boolean} [readonly=false] - Set readonly state
|
|
@@ -386,7 +386,7 @@ export declare class Slider extends ControlElement {
|
|
|
386
386
|
* Define styles in a tagged template literal, using the css tag function.
|
|
387
387
|
* @returns CSS template
|
|
388
388
|
*/
|
|
389
|
-
static get styles():
|
|
389
|
+
static get styles(): CSSResultGroup;
|
|
390
390
|
/**
|
|
391
391
|
* Implement `render` slider template.
|
|
392
392
|
* @returns Slider template
|
package/lib/slider/index.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import '../number-field';
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { html, css, ControlElement, WarningNotice } 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 { styleMap } from '@refinitiv-ui/core/lib/directives/style-map.js';
|
|
7
|
+
import { VERSION } from '../version.js';
|
|
8
|
+
import '../number-field/index.js';
|
|
10
9
|
var SliderNameType;
|
|
11
10
|
(function (SliderNameType) {
|
|
12
11
|
SliderNameType["value"] = "value";
|
|
@@ -50,7 +49,7 @@ const clamp = function (value, min, max) {
|
|
|
50
49
|
* Allows users to make selections from a range of values
|
|
51
50
|
*
|
|
52
51
|
* @attr {string} value - Value of slider. Not applicable in range mode.
|
|
53
|
-
* @prop {string} [value=0] - Value of slider. Not applicable in range mode.
|
|
52
|
+
* @prop {string} [value="0"] - Value of slider. Not applicable in range mode.
|
|
54
53
|
*
|
|
55
54
|
* @attr {boolean} readonly - Set readonly state
|
|
56
55
|
* @prop {boolean} [readonly=false] - Set readonly state
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
{
|
|
8
8
|
"name": "data",
|
|
9
9
|
"description": "Chart data as an array of number.",
|
|
10
|
-
"type": "
|
|
10
|
+
"type": "number[]",
|
|
11
11
|
"default": "[]"
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
"name": "previous-data",
|
|
15
15
|
"description": "Chart previous data as an array of number.",
|
|
16
|
-
"type": "
|
|
16
|
+
"type": "number[]",
|
|
17
17
|
"default": "[]"
|
|
18
18
|
},
|
|
19
19
|
{
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
"name": "data",
|
|
28
28
|
"attribute": "data",
|
|
29
29
|
"description": "Chart data as an array of number.",
|
|
30
|
-
"type": "
|
|
30
|
+
"type": "number[]",
|
|
31
31
|
"default": "[]"
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
"name": "previousData",
|
|
35
35
|
"attribute": "previous-data",
|
|
36
36
|
"description": "Chart previous data as an array of number.",
|
|
37
|
-
"type": "
|
|
37
|
+
"type": "number[]",
|
|
38
38
|
"default": "[]"
|
|
39
39
|
},
|
|
40
40
|
{
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# ef-sparkline
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Property | Attribute | Type | Default | Description |
|
|
6
|
+
|------------------|-------------------|-----------------------|---------|--------------------------------------------------|
|
|
7
|
+
| `data` | `data` | `number[]` | [] | Chart data as an array of number. |
|
|
8
|
+
| `previousData` | `previous-data` | `number[]` | [] | Chart previous data as an array of number. |
|
|
9
|
+
| `referenceValue` | `reference-value` | `number \| undefined` | | Baseline value to show horizontal line (optional) |
|
|
10
|
+
|
|
11
|
+
## Events
|
|
12
|
+
|
|
13
|
+
| Event | Description |
|
|
14
|
+
|----------------|--------------------------------------------------|
|
|
15
|
+
| `data-changed` | Fired when data is changed |
|
|
16
|
+
| `data-error` | Fired when data has error and chart cannot be updated |
|
package/lib/sparkline/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import {
|
|
2
|
+
import { CSSResultGroup, PropertyValues, ResponsiveElement, TemplateResult, ElementSize } from '@refinitiv-ui/core';
|
|
3
3
|
import '@refinitiv-ui/browser-sparkline';
|
|
4
4
|
import type { BrowserSparklineChart } from '@refinitiv-ui/browser-sparkline';
|
|
5
5
|
import type { ThemeConfig } from '@refinitiv-ui/browser-sparkline/lib/browserSparklineCanvas';
|
|
@@ -11,12 +11,14 @@ export declare class Sparkline extends ResponsiveElement {
|
|
|
11
11
|
static get version(): string;
|
|
12
12
|
/**
|
|
13
13
|
* Chart data as an array of number.
|
|
14
|
+
* @type {number[]}
|
|
14
15
|
*/
|
|
15
16
|
data: number[];
|
|
16
17
|
/**
|
|
17
18
|
* Chart previous data as an array of number.
|
|
19
|
+
* @type {number[]}
|
|
18
20
|
*/
|
|
19
|
-
previousData:
|
|
21
|
+
previousData: number[];
|
|
20
22
|
/**
|
|
21
23
|
* Baseline value to show horizontal line (optional)
|
|
22
24
|
*/
|
|
@@ -78,12 +80,12 @@ export declare class Sparkline extends ResponsiveElement {
|
|
|
78
80
|
*/
|
|
79
81
|
protected createChart(): void;
|
|
80
82
|
/**
|
|
81
|
-
* A `
|
|
83
|
+
* A `CSSResultGroup` that will be used
|
|
82
84
|
* to style the host, slotted children
|
|
83
85
|
* and the internal template of the element.
|
|
84
86
|
* @return CSS template
|
|
85
87
|
*/
|
|
86
|
-
static get styles():
|
|
88
|
+
static get styles(): CSSResultGroup;
|
|
87
89
|
/**
|
|
88
90
|
* A `TemplateResult` that will be used
|
|
89
91
|
* to render the updated internal template.
|
package/lib/sparkline/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
import {
|
|
8
|
-
import { color } from '@refinitiv-ui/utils';
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { css, ResponsiveElement, html } 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 { color } from '@refinitiv-ui/utils/lib/color.js';
|
|
9
8
|
import '@refinitiv-ui/browser-sparkline';
|
|
10
|
-
import { VERSION } from '../';
|
|
11
9
|
let Sparkline = class Sparkline extends ResponsiveElement {
|
|
12
10
|
constructor() {
|
|
13
11
|
super(...arguments);
|
|
14
12
|
/**
|
|
15
13
|
* Chart data as an array of number.
|
|
14
|
+
* @type {number[]}
|
|
16
15
|
*/
|
|
17
16
|
this.data = [];
|
|
18
17
|
/**
|
|
19
18
|
* Chart previous data as an array of number.
|
|
19
|
+
* @type {number[]}
|
|
20
20
|
*/
|
|
21
21
|
this.previousData = [];
|
|
22
22
|
/**
|
|
@@ -133,7 +133,7 @@ let Sparkline = class Sparkline extends ResponsiveElement {
|
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
135
|
/**
|
|
136
|
-
* A `
|
|
136
|
+
* A `CSSResultGroup` that will be used
|
|
137
137
|
* to style the host, slotted children
|
|
138
138
|
* and the internal template of the element.
|
|
139
139
|
* @return CSS template
|
|
@@ -96,12 +96,14 @@
|
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
98
|
"name": "valueFormatter",
|
|
99
|
-
"description": "
|
|
99
|
+
"description": "Custom value formatter",
|
|
100
|
+
"type": "SwingGaugeValueFormatter",
|
|
100
101
|
"default": "\"defaultValueFormatter\""
|
|
101
102
|
},
|
|
102
103
|
{
|
|
103
|
-
"name": "canvasSize",
|
|
104
|
-
"description": "Getter size of component"
|
|
104
|
+
"name": "canvasSize (readonly)",
|
|
105
|
+
"description": "Getter size of component",
|
|
106
|
+
"type": "SwingGaugeCanvasSize"
|
|
105
107
|
}
|
|
106
108
|
]
|
|
107
109
|
}
|