@refinitiv-ui/elements 7.6.2 → 7.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 +22 -0
- package/lib/accordion/custom-elements.json +2 -2
- package/lib/accordion/custom-elements.md +2 -2
- package/lib/accordion/index.d.ts +2 -2
- package/lib/accordion/index.js +2 -2
- package/lib/appstate-bar/custom-elements.json +2 -2
- package/lib/appstate-bar/custom-elements.md +4 -4
- package/lib/appstate-bar/index.d.ts +1 -1
- package/lib/appstate-bar/index.js +1 -1
- package/lib/autosuggest/custom-elements.json +14 -9
- package/lib/autosuggest/custom-elements.md +15 -15
- package/lib/autosuggest/index.d.ts +10 -5
- package/lib/autosuggest/index.js +9 -4
- package/lib/button/custom-elements.json +6 -6
- package/lib/button/custom-elements.md +3 -3
- package/lib/button/index.d.ts +3 -4
- package/lib/button/index.js +3 -4
- package/lib/chart/custom-elements.json +1 -9
- package/lib/chart/custom-elements.md +8 -8
- package/lib/chart/elements/chart.d.ts +4 -4
- package/lib/chart/elements/chart.js +4 -4
- package/lib/checkbox/custom-elements.json +2 -2
- package/lib/checkbox/custom-elements.md +6 -6
- package/lib/checkbox/index.d.ts +1 -1
- package/lib/checkbox/index.js +1 -1
- package/lib/clock/custom-elements.json +6 -17
- package/lib/clock/custom-elements.md +1 -7
- package/lib/clock/index.d.ts +4 -2
- package/lib/clock/index.js +4 -2
- package/lib/collapse/custom-elements.json +2 -2
- package/lib/collapse/custom-elements.md +2 -2
- package/lib/collapse/index.d.ts +2 -2
- package/lib/collapse/index.js +2 -2
- package/lib/color-dialog/custom-elements.json +36 -6
- package/lib/color-dialog/custom-elements.md +24 -22
- package/lib/color-dialog/index.d.ts +3 -2
- package/lib/color-dialog/index.js +3 -2
- package/lib/combo-box/custom-elements.json +10 -21
- package/lib/combo-box/custom-elements.md +3 -4
- package/lib/combo-box/helpers/filter.d.ts +1 -1
- package/lib/combo-box/helpers/types.d.ts +1 -1
- package/lib/combo-box/index.d.ts +6 -8
- package/lib/combo-box/index.js +4 -6
- package/lib/configuration/custom-elements.json +11 -1
- package/lib/configuration/custom-elements.md +3 -3
- package/lib/configuration/elements/configuration.d.ts +3 -0
- package/lib/configuration/elements/configuration.js +3 -0
- package/lib/counter/custom-elements.json +1 -1
- package/lib/counter/custom-elements.md +1 -1
- package/lib/counter/index.d.ts +1 -1
- package/lib/counter/index.js +1 -1
- package/lib/datetime-picker/custom-elements.json +5 -5
- package/lib/datetime-picker/custom-elements.md +3 -3
- package/lib/datetime-picker/index.d.ts +3 -3
- package/lib/datetime-picker/index.js +3 -3
- package/lib/header/custom-elements.json +2 -2
- package/lib/header/custom-elements.md +2 -2
- package/lib/header/index.d.ts +2 -2
- package/lib/header/index.js +2 -2
- package/lib/heatmap/custom-elements.json +1 -1
- package/lib/heatmap/custom-elements.md +3 -3
- package/lib/heatmap/index.d.ts +2 -2
- package/lib/heatmap/index.js +2 -2
- package/lib/interactive-chart/custom-elements.md +3 -3
- package/lib/interactive-chart/helpers/types.d.ts +1 -1
- package/lib/interactive-chart/index.d.ts +2 -2
- package/lib/interactive-chart/index.js +1 -1
- package/lib/item/custom-elements.json +2 -1
- package/lib/item/custom-elements.md +1 -1
- package/lib/item/index.d.ts +1 -0
- package/lib/item/index.js +1 -0
- package/lib/label/custom-elements.json +4 -4
- package/lib/label/custom-elements.md +2 -2
- package/lib/label/index.d.ts +2 -2
- package/lib/label/index.js +2 -2
- package/lib/list/custom-elements.md +8 -8
- package/lib/list/elements/list.d.ts +4 -4
- package/lib/list/elements/list.js +20 -13
- package/lib/list/helpers/types.d.ts +1 -1
- package/lib/list/renderer.d.ts +1 -1
- package/lib/multi-input/custom-elements.json +4 -4
- package/lib/multi-input/custom-elements.md +2 -2
- package/lib/multi-input/index.d.ts +2 -2
- package/lib/multi-input/index.js +2 -2
- package/lib/number-field/index.d.ts +27 -0
- package/lib/number-field/index.js +37 -7
- package/lib/overlay/custom-elements.json +10 -6
- package/lib/overlay/custom-elements.md +29 -29
- package/lib/overlay/elements/overlay.d.ts +6 -0
- package/lib/overlay/elements/overlay.js +6 -0
- package/lib/overlay/managers/backdrop-manager.d.ts +1 -1
- package/lib/overlay/managers/viewport-manager.d.ts +1 -1
- package/lib/overlay/managers/viewport-manager.js +1 -0
- package/lib/overlay-menu/custom-elements.json +4 -2
- package/lib/overlay-menu/custom-elements.md +1 -1
- package/lib/overlay-menu/helpers/types.d.ts +1 -1
- package/lib/overlay-menu/index.d.ts +1 -1
- package/lib/overlay-menu/index.js +1 -1
- package/lib/overlay-menu/managers/menu-manager.d.ts +1 -1
- package/lib/pagination/custom-elements.json +12 -8
- package/lib/pagination/custom-elements.md +5 -5
- package/lib/pagination/index.d.ts +4 -2
- package/lib/pagination/index.js +4 -2
- package/lib/password-field/index.d.ts +23 -1
- package/lib/password-field/index.js +45 -3
- package/lib/pill/custom-elements.json +2 -2
- package/lib/pill/custom-elements.md +8 -8
- package/lib/pill/index.d.ts +1 -1
- package/lib/pill/index.js +1 -1
- package/lib/select/custom-elements.json +5 -5
- package/lib/select/custom-elements.md +10 -10
- package/lib/select/index.d.ts +3 -3
- package/lib/select/index.js +3 -3
- package/lib/sidebar-layout/index.d.ts +1 -1
- package/lib/slider/custom-elements.json +2 -2
- package/lib/slider/custom-elements.md +1 -1
- package/lib/slider/index.d.ts +1 -1
- package/lib/slider/index.js +1 -1
- package/lib/swing-gauge/custom-elements.json +8 -4
- package/lib/swing-gauge/custom-elements.md +2 -2
- package/lib/swing-gauge/index.d.ts +2 -0
- package/lib/swing-gauge/index.js +2 -0
- package/lib/time-picker/custom-elements.json +6 -4
- package/lib/time-picker/custom-elements.md +3 -3
- package/lib/time-picker/index.d.ts +4 -1
- package/lib/time-picker/index.js +4 -1
- package/lib/toggle/custom-elements.json +2 -2
- package/lib/toggle/custom-elements.md +7 -7
- package/lib/toggle/index.d.ts +1 -1
- package/lib/toggle/index.js +1 -1
- package/lib/tooltip/index.d.ts +1 -1
- package/lib/tree/elements/tree-item.d.ts +1 -1
- package/lib/tree/elements/tree.d.ts +1 -1
- package/lib/tree/managers/tree-manager.d.ts +1 -1
- package/lib/tree-select/index.d.ts +3 -3
- package/lib/version.js +1 -1
- package/package.json +28 -27
- package/cli.mjs +0 -23
|
@@ -3,11 +3,21 @@
|
|
|
3
3
|
"tags": [
|
|
4
4
|
{
|
|
5
5
|
"name": "ef-configuration",
|
|
6
|
+
"attributes": [
|
|
7
|
+
{
|
|
8
|
+
"name": "-",
|
|
9
|
+
"description": "Configuration data",
|
|
10
|
+
"type": "Config",
|
|
11
|
+
"default": "\"{icon: { map: {} }}\""
|
|
12
|
+
}
|
|
13
|
+
],
|
|
6
14
|
"properties": [
|
|
7
15
|
{
|
|
8
16
|
"name": "config",
|
|
17
|
+
"attribute": "-",
|
|
9
18
|
"description": "Configuration data",
|
|
10
|
-
"
|
|
19
|
+
"type": "Config",
|
|
20
|
+
"default": "\"{icon: { map: {} }}\""
|
|
11
21
|
}
|
|
12
22
|
]
|
|
13
23
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
## Properties
|
|
4
4
|
|
|
5
|
-
| Property | Default
|
|
6
|
-
|
|
7
|
-
| `config` | "
|
|
5
|
+
| Property | Attribute | Type | Default | Description |
|
|
6
|
+
|----------|-----------|----------|-----------------------|--------------------|
|
|
7
|
+
| `config` | `-` | `Config` | "{icon: { map: {} }}" | Configuration data |
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"tags": [
|
|
4
4
|
{
|
|
5
5
|
"name": "ef-counter",
|
|
6
|
-
"description": "Counter is an item count badge,\nsupport
|
|
6
|
+
"description": "Counter is an item count badge,\nsupport maximum display number and notation of large numbers.",
|
|
7
7
|
"attributes": [
|
|
8
8
|
{
|
|
9
9
|
"name": "value",
|
package/lib/counter/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { JSXInterface } from '../jsx';
|
|
|
2
2
|
import { BasicElement, CSSResultGroup, TemplateResult } from '@refinitiv-ui/core';
|
|
3
3
|
/**
|
|
4
4
|
* Counter is an item count badge,
|
|
5
|
-
* support
|
|
5
|
+
* support maximum display number and notation of large numbers.
|
|
6
6
|
*/
|
|
7
7
|
export declare class Counter extends BasicElement {
|
|
8
8
|
/**
|
package/lib/counter/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { VERSION } from '../version.js';
|
|
|
6
6
|
import { convertToCompactNotation, truncateDecimal } from './utils.js';
|
|
7
7
|
/**
|
|
8
8
|
* Counter is an item count badge,
|
|
9
|
-
* support
|
|
9
|
+
* support maximum display number and notation of large numbers.
|
|
10
10
|
*/
|
|
11
11
|
let Counter = class Counter extends BasicElement {
|
|
12
12
|
constructor() {
|
|
@@ -78,13 +78,13 @@
|
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
"name": "error",
|
|
81
|
-
"description": "Set state
|
|
81
|
+
"description": "Set error state",
|
|
82
82
|
"type": "boolean",
|
|
83
83
|
"default": "false"
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
86
|
"name": "warning",
|
|
87
|
-
"description": "Set state
|
|
87
|
+
"description": "Set warning state",
|
|
88
88
|
"type": "boolean",
|
|
89
89
|
"default": "false"
|
|
90
90
|
},
|
|
@@ -234,14 +234,14 @@
|
|
|
234
234
|
{
|
|
235
235
|
"name": "error",
|
|
236
236
|
"attribute": "error",
|
|
237
|
-
"description": "Set state
|
|
237
|
+
"description": "Set error state",
|
|
238
238
|
"type": "boolean",
|
|
239
239
|
"default": "false"
|
|
240
240
|
},
|
|
241
241
|
{
|
|
242
242
|
"name": "warning",
|
|
243
243
|
"attribute": "warning",
|
|
244
|
-
"description": "Set state
|
|
244
|
+
"description": "Set warning state",
|
|
245
245
|
"type": "boolean",
|
|
246
246
|
"default": "false"
|
|
247
247
|
},
|
|
@@ -329,7 +329,7 @@
|
|
|
329
329
|
},
|
|
330
330
|
{
|
|
331
331
|
"name": "view-changed",
|
|
332
|
-
"description": "Fired when the user changes view in calendar e.g. change to next month view."
|
|
332
|
+
"description": "Fired when the user changes view in calendar e.g. change to next month view. The event is not triggered if `view` property is changed programmatically."
|
|
333
333
|
}
|
|
334
334
|
],
|
|
335
335
|
"slots": [
|
|
@@ -9,7 +9,7 @@ Control to pick date and time
|
|
|
9
9
|
| `amPm` | `am-pm` | `boolean` | false | Toggles 12hr time display |
|
|
10
10
|
| `disabled` | `disabled` | `boolean` | false | Set disabled state |
|
|
11
11
|
| `duplex` | `duplex` | `"" \| "consecutive" \| "split"` | null | Display two calendar pickers. |
|
|
12
|
-
| `error` | `error` | `boolean` | false | Set state
|
|
12
|
+
| `error` | `error` | `boolean` | false | Set error state |
|
|
13
13
|
| `filter` | | `DatetimePickerFilter \| null` | null | Custom filter, used for enabling/disabling certain dates |
|
|
14
14
|
| `firstDayOfWeek` | `first-day-of-week` | `number \| undefined` | | Set the first day of the week.<br />0 - for Sunday, 6 - for Saturday |
|
|
15
15
|
| `format` | `format` | `string` | "" | Set the datetime format<br />Based on dane-fns datetime formats |
|
|
@@ -28,7 +28,7 @@ Control to pick date and time
|
|
|
28
28
|
| `values` | `values` | `string[]` | [] | Set multiple selected values |
|
|
29
29
|
| `view` | `view` | `string` | "" | Set the current calendar view.<br />Accepted format: 'yyyy-MM' |
|
|
30
30
|
| `views` | | `string[]` | [] | Set the current calendar views for duplex mode<br />Accepted format: 'yyyy-MM' |
|
|
31
|
-
| `warning` | `warning` | `boolean` | false | Set state
|
|
31
|
+
| `warning` | `warning` | `boolean` | false | Set warning state |
|
|
32
32
|
| `weekdaysOnly` | `weekdays-only` | `boolean` | false | Only enable weekdays |
|
|
33
33
|
| `weekendsOnly` | `weekends-only` | `boolean` | false | Only enable weekends |
|
|
34
34
|
|
|
@@ -45,7 +45,7 @@ Control to pick date and time
|
|
|
45
45
|
| `error-changed` | Fired when the user inputs invalid value. The event is not triggered if `error` property is changed programmatically. |
|
|
46
46
|
| `opened-changed` | Fired when the user opens or closes control's popup. The event is not triggered if `opened` property is changed programmatically. |
|
|
47
47
|
| `value-changed` | Fired when the user commits a value change. The event is not triggered if `value` property is changed programmatically. |
|
|
48
|
-
| `view-changed` | Fired when the user changes view in calendar e.g. change to next month view. |
|
|
48
|
+
| `view-changed` | Fired when the user changes view in calendar e.g. change to next month view. The event is not triggered if `view` property is changed programmatically. |
|
|
49
49
|
|
|
50
50
|
## Slots
|
|
51
51
|
|
|
@@ -14,7 +14,7 @@ export type { DatetimePickerFilter, DatetimePickerDuplex };
|
|
|
14
14
|
* @fires opened-changed - Fired when the user opens or closes control's popup. The event is not triggered if `opened` property is changed programmatically.
|
|
15
15
|
* @fires value-changed - Fired when the user commits a value change. The event is not triggered if `value` property is changed programmatically.
|
|
16
16
|
* @fires error-changed - Fired when the user inputs invalid value. The event is not triggered if `error` property is changed programmatically.
|
|
17
|
-
* @fires view-changed - Fired when the user changes view in calendar e.g. change to next month view.
|
|
17
|
+
* @fires view-changed - Fired when the user changes view in calendar e.g. change to next month view. The event is not triggered if `view` property is changed programmatically.
|
|
18
18
|
*
|
|
19
19
|
* @attr {boolean} readonly - Set readonly state
|
|
20
20
|
* @prop {boolean} [readonly=false] - Set readonly state
|
|
@@ -135,11 +135,11 @@ export declare class DatetimePicker extends ControlElement implements MultiValue
|
|
|
135
135
|
*/
|
|
136
136
|
opened: boolean;
|
|
137
137
|
/**
|
|
138
|
-
* Set state
|
|
138
|
+
* Set error state
|
|
139
139
|
*/
|
|
140
140
|
error: boolean;
|
|
141
141
|
/**
|
|
142
|
-
* Set state
|
|
142
|
+
* Set warning state
|
|
143
143
|
*/
|
|
144
144
|
warning: boolean;
|
|
145
145
|
/**
|
|
@@ -30,7 +30,7 @@ const INPUT_FORMAT = {
|
|
|
30
30
|
* @fires opened-changed - Fired when the user opens or closes control's popup. The event is not triggered if `opened` property is changed programmatically.
|
|
31
31
|
* @fires value-changed - Fired when the user commits a value change. The event is not triggered if `value` property is changed programmatically.
|
|
32
32
|
* @fires error-changed - Fired when the user inputs invalid value. The event is not triggered if `error` property is changed programmatically.
|
|
33
|
-
* @fires view-changed - Fired when the user changes view in calendar e.g. change to next month view.
|
|
33
|
+
* @fires view-changed - Fired when the user changes view in calendar e.g. change to next month view. The event is not triggered if `view` property is changed programmatically.
|
|
34
34
|
*
|
|
35
35
|
* @attr {boolean} readonly - Set readonly state
|
|
36
36
|
* @prop {boolean} [readonly=false] - Set readonly state
|
|
@@ -89,11 +89,11 @@ let DatetimePicker = class DatetimePicker extends ControlElement {
|
|
|
89
89
|
*/
|
|
90
90
|
this.opened = false;
|
|
91
91
|
/**
|
|
92
|
-
* Set state
|
|
92
|
+
* Set error state
|
|
93
93
|
*/
|
|
94
94
|
this.error = false;
|
|
95
95
|
/**
|
|
96
|
-
* Set state
|
|
96
|
+
* Set warning state
|
|
97
97
|
*/
|
|
98
98
|
this.warning = false;
|
|
99
99
|
/**
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
"slots": [
|
|
25
25
|
{
|
|
26
26
|
"name": "left",
|
|
27
|
-
"description": "Slot to add custom contents to the left side of header
|
|
27
|
+
"description": "Slot to add custom contents to the left side of header"
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"name": "right",
|
|
31
|
-
"description": "Slot to add custom contents to the right side of header
|
|
31
|
+
"description": "Slot to add custom contents to the right side of header"
|
|
32
32
|
}
|
|
33
33
|
]
|
|
34
34
|
}
|
|
@@ -14,5 +14,5 @@ a sensible hierarchy and improve the user experience.
|
|
|
14
14
|
|
|
15
15
|
| Name | Description |
|
|
16
16
|
|---------|--------------------------------------------------|
|
|
17
|
-
| `left` | Slot to add custom contents to the left side of header
|
|
18
|
-
| `right` | Slot to add custom contents to the right side of header
|
|
17
|
+
| `left` | Slot to add custom contents to the left side of header |
|
|
18
|
+
| `right` | Slot to add custom contents to the right side of header |
|
package/lib/header/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ import { BasicElement, CSSResultGroup, TemplateResult } from '@refinitiv-ui/core
|
|
|
5
5
|
* Headers helps to organize the page layout content into
|
|
6
6
|
* a sensible hierarchy and improve the user experience.
|
|
7
7
|
*
|
|
8
|
-
* @slot left - Slot to add custom contents to the left side of header
|
|
9
|
-
* @slot right - Slot to add custom contents to the right side of header
|
|
8
|
+
* @slot left - Slot to add custom contents to the left side of header
|
|
9
|
+
* @slot right - Slot to add custom contents to the right side of header
|
|
10
10
|
*/
|
|
11
11
|
export declare class Header extends BasicElement {
|
|
12
12
|
/**
|
package/lib/header/index.js
CHANGED
|
@@ -8,8 +8,8 @@ import { VERSION } from '../version.js';
|
|
|
8
8
|
* Headers helps to organize the page layout content into
|
|
9
9
|
* a sensible hierarchy and improve the user experience.
|
|
10
10
|
*
|
|
11
|
-
* @slot left - Slot to add custom contents to the left side of header
|
|
12
|
-
* @slot right - Slot to add custom contents to the right side of header
|
|
11
|
+
* @slot left - Slot to add custom contents to the left side of header
|
|
12
|
+
* @slot right - Slot to add custom contents to the right side of header
|
|
13
13
|
*/
|
|
14
14
|
let Header = class Header extends BasicElement {
|
|
15
15
|
constructor() {
|
|
@@ -21,6 +21,6 @@ values contained in a matrix are represented as colors
|
|
|
21
21
|
|
|
22
22
|
## Methods
|
|
23
23
|
|
|
24
|
-
| Method | Type
|
|
25
|
-
|
|
26
|
-
| `getCellDataAtEvent` | `(event:
|
|
24
|
+
| Method | Type | Description |
|
|
25
|
+
|----------------------|--------------------------------------------|--------------------------------------------------|
|
|
26
|
+
| `getCellDataAtEvent` | `(event: MouseEvent): HeatmapCell \| null` | Returns data of interactive cell<br /><br />**event**: A MouseEvent that occurs when Heatmap is being interacted |
|
package/lib/heatmap/index.d.ts
CHANGED
|
@@ -67,8 +67,8 @@ export declare class Heatmap extends ResponsiveElement {
|
|
|
67
67
|
saturation: number;
|
|
68
68
|
/**
|
|
69
69
|
* Returns data of interactive cell
|
|
70
|
-
* @param event
|
|
71
|
-
* @returns data
|
|
70
|
+
* @param {MouseEvent} event A MouseEvent that occurs when Heatmap is being interacted
|
|
71
|
+
* @returns {HeatmapCell | null} Heatmap cell data, if event happens on a cell
|
|
72
72
|
*/
|
|
73
73
|
getCellDataAtEvent(event: MouseEvent): HeatmapCell | null;
|
|
74
74
|
/**
|
package/lib/heatmap/index.js
CHANGED
|
@@ -92,8 +92,8 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
92
92
|
}
|
|
93
93
|
/**
|
|
94
94
|
* Returns data of interactive cell
|
|
95
|
-
* @param event
|
|
96
|
-
* @returns data
|
|
95
|
+
* @param {MouseEvent} event A MouseEvent that occurs when Heatmap is being interacted
|
|
96
|
+
* @returns {HeatmapCell | null} Heatmap cell data, if event happens on a cell
|
|
97
97
|
*/
|
|
98
98
|
/* c8 ignore start */
|
|
99
99
|
getCellDataAtEvent(event) {
|
|
@@ -15,9 +15,9 @@ By lightweight-charts library.
|
|
|
15
15
|
|
|
16
16
|
## Methods
|
|
17
17
|
|
|
18
|
-
| Method | Type
|
|
19
|
-
|
|
20
|
-
| `colors` | `():
|
|
18
|
+
| Method | Type | Description |
|
|
19
|
+
|----------|----------------|------------------------------------------------|
|
|
20
|
+
| `colors` | `(): string[]` | List of available chart colors from the theme. |
|
|
21
21
|
|
|
22
22
|
## Events
|
|
23
23
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { HSLColor, RGBColor } from '@refinitiv-ui/utils/color.js';
|
|
2
1
|
import type { ChartOptions, DeepPartial, ISeriesApi, SeriesDataItemTypeMap, SeriesOptionsMap, SeriesType } from 'lightweight-charts';
|
|
2
|
+
import type { HSLColor, RGBColor } from '@refinitiv-ui/utils/color.js';
|
|
3
3
|
type UnionToIntersection<U> = (U extends unknown ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
4
4
|
type SeriesOptions = UnionToIntersection<SeriesOptionsMap[keyof SeriesOptionsMap]>;
|
|
5
5
|
type SeriesList = ISeriesApi<SeriesType>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
+
import type { IChartApi, MouseEventParams } from 'lightweight-charts';
|
|
2
3
|
import { CSSResultGroup, ElementSize, PropertyValues, ResponsiveElement, TemplateResult } from '@refinitiv-ui/core';
|
|
3
4
|
import '../tooltip/index.js';
|
|
4
5
|
import type { InteractiveChartConfig, InteractiveChartSeries, LegendStyle, RowLegend, SeriesDataItem, SeriesList, SeriesOptions, Theme } from './helpers/types.js';
|
|
5
|
-
import type { IChartApi, MouseEventParams } from 'lightweight-charts';
|
|
6
6
|
export type { InteractiveChartConfig, InteractiveChartSeries, Theme, SeriesOptions, SeriesDataItem };
|
|
7
7
|
/**
|
|
8
8
|
* A charting component that allows you to create several use cases of financial chart.
|
|
@@ -334,7 +334,7 @@ export declare class InteractiveChart extends ResponsiveElement {
|
|
|
334
334
|
private cssVarAsNumber;
|
|
335
335
|
/**
|
|
336
336
|
* List of available chart colors from the theme.
|
|
337
|
-
* @returns
|
|
337
|
+
* @returns {string[]} List of available chart colors from the theme.
|
|
338
338
|
*/
|
|
339
339
|
colors(): string[];
|
|
340
340
|
/**
|
|
@@ -978,7 +978,7 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
|
|
|
978
978
|
}
|
|
979
979
|
/**
|
|
980
980
|
* List of available chart colors from the theme.
|
|
981
|
-
* @returns
|
|
981
|
+
* @returns {string[]} List of available chart colors from the theme.
|
|
982
982
|
*/
|
|
983
983
|
colors() {
|
|
984
984
|
let color;
|
|
@@ -116,7 +116,8 @@
|
|
|
116
116
|
{
|
|
117
117
|
"name": "highlightable (readonly)",
|
|
118
118
|
"description": "Return true if the item can be highlighted. True if not disabled and type is Text",
|
|
119
|
-
"type": "boolean"
|
|
119
|
+
"type": "boolean",
|
|
120
|
+
"default": "true"
|
|
120
121
|
},
|
|
121
122
|
{
|
|
122
123
|
"name": "value",
|
|
@@ -10,7 +10,7 @@ to create simple menus or navigation panels.
|
|
|
10
10
|
|----------------------------|---------------|--------------------|---------|--------------------------------------------------|
|
|
11
11
|
| `disabled` | `disabled` | `boolean` | false | Set disabled state. |
|
|
12
12
|
| `for` | `for` | `string \| null` | null | Specifies which element an item is bound to |
|
|
13
|
-
| `highlightable (readonly)` | | `boolean` |
|
|
13
|
+
| `highlightable (readonly)` | | `boolean` | true | Return true if the item can be highlighted. True if not disabled and type is Text |
|
|
14
14
|
| `highlighted` | `highlighted` | `boolean` | false | Highlight the item |
|
|
15
15
|
| `icon` | `icon` | `string \| null` | null | Set the icon name from the ef-icon list |
|
|
16
16
|
| `label` | `label` | `string \| null` | null | The text for the label indicating the meaning of the item.<br />By having both `label` and content, content always takes priority |
|
package/lib/item/index.d.ts
CHANGED
|
@@ -164,6 +164,7 @@ export declare class Item extends ControlElement {
|
|
|
164
164
|
/**
|
|
165
165
|
* Return true if the item can be highlighted. True if not disabled and type is Text
|
|
166
166
|
* @prop {boolean} highlightable
|
|
167
|
+
* @default true
|
|
167
168
|
* @returns whether element is highlightable
|
|
168
169
|
*/
|
|
169
170
|
get highlightable(): boolean;
|
package/lib/item/index.js
CHANGED
|
@@ -266,6 +266,7 @@ let Item = class Item extends ControlElement {
|
|
|
266
266
|
/**
|
|
267
267
|
* Return true if the item can be highlighted. True if not disabled and type is Text
|
|
268
268
|
* @prop {boolean} highlightable
|
|
269
|
+
* @default true
|
|
269
270
|
* @returns whether element is highlightable
|
|
270
271
|
*/
|
|
271
272
|
get highlightable() {
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"name": "error",
|
|
16
|
-
"description": "Set state
|
|
16
|
+
"description": "Set error state",
|
|
17
17
|
"type": "boolean",
|
|
18
18
|
"default": "false"
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"name": "warning",
|
|
22
|
-
"description": "Set state
|
|
22
|
+
"description": "Set warning state",
|
|
23
23
|
"type": "boolean",
|
|
24
24
|
"default": "false"
|
|
25
25
|
}
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
{
|
|
36
36
|
"name": "error",
|
|
37
37
|
"attribute": "error",
|
|
38
|
-
"description": "Set state
|
|
38
|
+
"description": "Set error state",
|
|
39
39
|
"type": "boolean",
|
|
40
40
|
"default": "false"
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
"name": "warning",
|
|
44
44
|
"attribute": "warning",
|
|
45
|
-
"description": "Set state
|
|
45
|
+
"description": "Set warning state",
|
|
46
46
|
"type": "boolean",
|
|
47
47
|
"default": "false"
|
|
48
48
|
}
|
|
@@ -6,6 +6,6 @@ Displays a text with alternative truncation
|
|
|
6
6
|
|
|
7
7
|
| Property | Attribute | Type | Default | Description |
|
|
8
8
|
|-------------|--------------|-----------|---------|---------------------------------------------|
|
|
9
|
-
| `error` | `error` | `boolean` | false | Set state
|
|
9
|
+
| `error` | `error` | `boolean` | false | Set error state |
|
|
10
10
|
| `lineClamp` | `line-clamp` | `number` | 0 | Limit the number of lines before truncating |
|
|
11
|
-
| `warning` | `warning` | `boolean` | false | Set state
|
|
11
|
+
| `warning` | `warning` | `boolean` | false | Set warning state |
|
package/lib/label/index.d.ts
CHANGED
package/lib/label/index.js
CHANGED
|
@@ -29,11 +29,11 @@ let Label = class Label extends BasicElement {
|
|
|
29
29
|
*/
|
|
30
30
|
this.lineClamp = 0;
|
|
31
31
|
/**
|
|
32
|
-
* Set state
|
|
32
|
+
* Set error state
|
|
33
33
|
*/
|
|
34
34
|
this.error = false;
|
|
35
35
|
/**
|
|
36
|
-
* Set state
|
|
36
|
+
* Set warning state
|
|
37
37
|
*/
|
|
38
38
|
this.warning = false;
|
|
39
39
|
/**
|
|
@@ -16,14 +16,14 @@ Provides listing and immutable selection
|
|
|
16
16
|
|
|
17
17
|
## Methods
|
|
18
18
|
|
|
19
|
-
| Method | Type
|
|
20
|
-
|
|
21
|
-
| `down` | `(): void`
|
|
22
|
-
| `first` | `(): void`
|
|
23
|
-
| `last` | `(): void`
|
|
24
|
-
| `scrollToItem` | `(item: T): void`
|
|
25
|
-
| `selectItem` | `(item
|
|
26
|
-
| `up` | `(): void`
|
|
19
|
+
| Method | Type | Description |
|
|
20
|
+
|----------------|-------------------------------------|--------------------------------------------------|
|
|
21
|
+
| `down` | `(): void` | Navigate down through the list items |
|
|
22
|
+
| `first` | `(): void` | Navigate to first focusable item of the list |
|
|
23
|
+
| `last` | `(): void` | Navigate to first focusable item of the list |
|
|
24
|
+
| `scrollToItem` | `(item: T): void` | Scroll to list item element<br /><br />**item**: Data item to scroll to |
|
|
25
|
+
| `selectItem` | `(item: T \| HTMLElement): boolean` | Selects an item in the list<br /><br />**item**: Data Item or Item Element |
|
|
26
|
+
| `up` | `(): void` | Navigate up through the list items |
|
|
27
27
|
|
|
28
28
|
## Events
|
|
29
29
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { JSXInterface } from '../../jsx';
|
|
2
2
|
import { CSSResultGroup, ControlElement, PropertyValues, TapEvent, TemplateResult, WarningNotice } from '@refinitiv-ui/core';
|
|
3
3
|
import { CollectionComposer, DataItem } from '@refinitiv-ui/utils/collection.js';
|
|
4
|
-
import { ListRenderer } from '../helpers/renderer.js';
|
|
5
|
-
import './list-item.js';
|
|
6
4
|
import type { ItemData } from '../../item';
|
|
5
|
+
import { ListRenderer } from '../helpers/renderer.js';
|
|
7
6
|
import type { ListData } from '../helpers/types';
|
|
7
|
+
import './list-item.js';
|
|
8
8
|
/**
|
|
9
9
|
* Key direction
|
|
10
10
|
*/
|
|
@@ -90,10 +90,10 @@ export declare class List<T extends DataItem = ItemData> extends ControlElement
|
|
|
90
90
|
set values(values: string[]);
|
|
91
91
|
/**
|
|
92
92
|
* Selects an item in the list
|
|
93
|
-
* @param item Data Item or Item Element
|
|
93
|
+
* @param {T | HTMLElement} item Data Item or Item Element
|
|
94
94
|
* @returns If a selection has been made or not
|
|
95
95
|
*/
|
|
96
|
-
selectItem(item
|
|
96
|
+
selectItem(item: T | HTMLElement): boolean;
|
|
97
97
|
/**
|
|
98
98
|
* Navigate up through the list items
|
|
99
99
|
* @returns {void}
|
|
@@ -160,25 +160,32 @@ let List = class List extends ControlElement {
|
|
|
160
160
|
}
|
|
161
161
|
/**
|
|
162
162
|
* Selects an item in the list
|
|
163
|
-
* @param item Data Item or Item Element
|
|
163
|
+
* @param {T | HTMLElement} item Data Item or Item Element
|
|
164
164
|
* @returns If a selection has been made or not
|
|
165
165
|
*/
|
|
166
166
|
selectItem(item) {
|
|
167
|
-
if (
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
return true;
|
|
167
|
+
if (this.stateless) {
|
|
168
|
+
return false;
|
|
169
|
+
}
|
|
170
|
+
if (item instanceof HTMLElement) {
|
|
171
|
+
const itemFromElement = this.itemFromElement(item);
|
|
172
|
+
if (itemFromElement) {
|
|
173
|
+
item = itemFromElement;
|
|
175
174
|
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
this.composer.setItemPropertyValue(item, 'selected', true);
|
|
179
|
-
return true;
|
|
175
|
+
else {
|
|
176
|
+
return false;
|
|
180
177
|
}
|
|
181
178
|
}
|
|
179
|
+
if (this.multiple) {
|
|
180
|
+
const value = this.composer.getItemPropertyValue(item, 'selected');
|
|
181
|
+
this.composer.setItemPropertyValue(item, 'selected', !value);
|
|
182
|
+
return true;
|
|
183
|
+
}
|
|
184
|
+
if (this.composer.getItemPropertyValue(item, 'selected') !== true) {
|
|
185
|
+
this.clearSelection();
|
|
186
|
+
this.composer.setItemPropertyValue(item, 'selected', true);
|
|
187
|
+
return true;
|
|
188
|
+
}
|
|
182
189
|
return false;
|
|
183
190
|
}
|
|
184
191
|
/**
|
package/lib/list/renderer.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ExtensibleFunction } from './extensible-function.js';
|
|
2
1
|
import type { CollectionComposer, DataItem } from '@refinitiv-ui/utils/collection.js';
|
|
2
|
+
import { ExtensibleFunction } from './extensible-function.js';
|
|
3
3
|
/**
|
|
4
4
|
* Render function interface
|
|
5
5
|
* TODO: Move this to @refinitiv-ui/utils
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
"name": "error",
|
|
28
|
-
"description": "Set state
|
|
28
|
+
"description": "Set error state",
|
|
29
29
|
"type": "boolean",
|
|
30
30
|
"default": "false"
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
"name": "warning",
|
|
34
|
-
"description": "Set state
|
|
34
|
+
"description": "Set warning state",
|
|
35
35
|
"type": "boolean",
|
|
36
36
|
"default": "false"
|
|
37
37
|
},
|
|
@@ -95,14 +95,14 @@
|
|
|
95
95
|
{
|
|
96
96
|
"name": "error",
|
|
97
97
|
"attribute": "error",
|
|
98
|
-
"description": "Set state
|
|
98
|
+
"description": "Set error state",
|
|
99
99
|
"type": "boolean",
|
|
100
100
|
"default": "false"
|
|
101
101
|
},
|
|
102
102
|
{
|
|
103
103
|
"name": "warning",
|
|
104
104
|
"attribute": "warning",
|
|
105
|
-
"description": "Set state
|
|
105
|
+
"description": "Set warning state",
|
|
106
106
|
"type": "boolean",
|
|
107
107
|
"default": "false"
|
|
108
108
|
},
|