@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
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [7.8.0](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@7.7.0...@refinitiv-ui/elements@7.8.0) (2023-10-31)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **list:** `selectItem()` should always require a param ([#998](https://github.com/Refinitiv/refinitiv-ui/issues/998)) ([fef8e56](https://github.com/Refinitiv/refinitiv-ui/commit/fef8e56e9187f4b0a49962a4cd87defcdc02f103))
|
|
11
|
+
- update `@trivago/prettier-plugin-sort-imports` to fix babel vulnerable to arbitrary code execution ([#1002](https://github.com/Refinitiv/refinitiv-ui/issues/1002)) ([e96385f](https://github.com/Refinitiv/refinitiv-ui/commit/e96385f652d8e2a8c3f6dffc952fecd718c9d033))
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
- adding `type=module` to `package.json` ([#974](https://github.com/Refinitiv/refinitiv-ui/issues/974)) ([9bf21dc](https://github.com/Refinitiv/refinitiv-ui/commit/9bf21dc05cb7ed93e1d14e797c1bf6af85b659d3)), closes [#985](https://github.com/Refinitiv/refinitiv-ui/issues/985)
|
|
16
|
+
|
|
17
|
+
# [7.7.0](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@7.6.2...@refinitiv-ui/elements@7.7.0) (2023-10-24)
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
- `ITimeScaleApi` type errors in `lightweight-charts` to 4.1.0 ([#989](https://github.com/Refinitiv/refinitiv-ui/issues/989)) ([ece42d8](https://github.com/Refinitiv/refinitiv-ui/commit/ece42d8f912634cbded0961072ed9430a45bd527))
|
|
22
|
+
- **password-field, phrasebook:** improve show password announcement ([#962](https://github.com/Refinitiv/refinitiv-ui/issues/962)) ([4b6dcdc](https://github.com/Refinitiv/refinitiv-ui/commit/4b6dcdc23b4cc0f9dd7fe9e2df5314960ad65b07))
|
|
23
|
+
|
|
24
|
+
### Features
|
|
25
|
+
|
|
26
|
+
- **number-field:** support long press at spinner ([#983](https://github.com/Refinitiv/refinitiv-ui/issues/983)) ([606660d](https://github.com/Refinitiv/refinitiv-ui/commit/606660db06a265fe63a2dcf5e82ec1ec2e2c8ab5))
|
|
27
|
+
|
|
6
28
|
## [7.6.2](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@7.6.1...@refinitiv-ui/elements@7.6.2) (2023-10-09)
|
|
7
29
|
|
|
8
30
|
### Bug Fixes
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"slots": [
|
|
38
38
|
{
|
|
39
39
|
"name": "header-left",
|
|
40
|
-
"description": "Slot to add custom contents to the left side of header
|
|
40
|
+
"description": "Slot to add custom contents to the left side of header"
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
"name": "header-right",
|
|
44
|
-
"description": "Slot to add custom contents to the right side of header
|
|
44
|
+
"description": "Slot to add custom contents to the right side of header"
|
|
45
45
|
}
|
|
46
46
|
]
|
|
47
47
|
}
|
|
@@ -14,5 +14,5 @@ Only one item will be able to expand by default but you can customize its behavi
|
|
|
14
14
|
|
|
15
15
|
| Name | Description |
|
|
16
16
|
|----------------|--------------------------------------------------|
|
|
17
|
-
| `header-left` | Slot to add custom contents to the left side of header
|
|
18
|
-
| `header-right` | Slot to add custom contents to the right side of header
|
|
17
|
+
| `header-left` | Slot to add custom contents to the left side of header |
|
|
18
|
+
| `header-right` | Slot to add custom contents to the right side of header |
|
package/lib/accordion/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ import { Collapse } from '../collapse/index.js';
|
|
|
5
5
|
* Used to display a group of `Collapse` control.
|
|
6
6
|
* Only one item will be able to expand by default but you can customize its behavior.
|
|
7
7
|
*
|
|
8
|
-
* @slot header-left - Slot to add custom contents to the left side of header
|
|
9
|
-
* @slot header-right - Slot to add custom contents to the right side of header
|
|
8
|
+
* @slot header-left - Slot to add custom contents to the left side of header
|
|
9
|
+
* @slot header-right - Slot to add custom contents to the right side of header
|
|
10
10
|
*
|
|
11
11
|
*/
|
|
12
12
|
export declare class Accordion extends Collapse {
|
package/lib/accordion/index.js
CHANGED
|
@@ -25,8 +25,8 @@ const isDirectAccordionChild = (element, accordion) => {
|
|
|
25
25
|
* Used to display a group of `Collapse` control.
|
|
26
26
|
* Only one item will be able to expand by default but you can customize its behavior.
|
|
27
27
|
*
|
|
28
|
-
* @slot header-left - Slot to add custom contents to the left side of header
|
|
29
|
-
* @slot header-right - Slot to add custom contents to the right side of header
|
|
28
|
+
* @slot header-left - Slot to add custom contents to the left side of header
|
|
29
|
+
* @slot header-right - Slot to add custom contents to the right side of header
|
|
30
30
|
*
|
|
31
31
|
*/
|
|
32
32
|
let Accordion = class Accordion extends Collapse {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"name": "state",
|
|
16
|
-
"description": "
|
|
16
|
+
"description": "Type of state bar.",
|
|
17
17
|
"type": "\"info\" | \"highlight\" | null"
|
|
18
18
|
}
|
|
19
19
|
],
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
{
|
|
29
29
|
"name": "state",
|
|
30
30
|
"attribute": "state",
|
|
31
|
-
"description": "
|
|
31
|
+
"description": "Type of state bar.",
|
|
32
32
|
"type": "\"info\" | \"highlight\" | null"
|
|
33
33
|
}
|
|
34
34
|
],
|
|
@@ -4,10 +4,10 @@ Used to display at the top of application to provide a status or information.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
| Property | Attribute | Type | Default | Description
|
|
8
|
-
|
|
9
|
-
| `heading` | `heading` | `string` | "" | Text to display in heading section.
|
|
10
|
-
| `state` | `state` | `"info" \| "highlight" \| null` | null |
|
|
7
|
+
| Property | Attribute | Type | Default | Description |
|
|
8
|
+
|-----------|-----------|---------------------------------|---------|-------------------------------------|
|
|
9
|
+
| `heading` | `heading` | `string` | "" | Text to display in heading section. |
|
|
10
|
+
| `state` | `state` | `"info" \| "highlight" \| null` | null | Type of state bar. |
|
|
11
11
|
|
|
12
12
|
## Events
|
|
13
13
|
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
"attributes": [
|
|
8
8
|
{
|
|
9
9
|
"name": "attach",
|
|
10
|
-
"description": "
|
|
10
|
+
"description": "Target element to be attached with Autosuggest",
|
|
11
|
+
"type": "AutosuggestTargetElement | string | null"
|
|
11
12
|
},
|
|
12
13
|
{
|
|
13
14
|
"name": "request-on-focus",
|
|
@@ -23,9 +24,9 @@
|
|
|
23
24
|
},
|
|
24
25
|
{
|
|
25
26
|
"name": "more-search-text",
|
|
26
|
-
"description": "Custom text for More
|
|
27
|
+
"description": "Custom text for 'More results', you can use {0} to represent current query.\nFor example, 'More results for {0}'",
|
|
27
28
|
"type": "string",
|
|
28
|
-
"default": "\"
|
|
29
|
+
"default": "\"\""
|
|
29
30
|
},
|
|
30
31
|
{
|
|
31
32
|
"name": "loading",
|
|
@@ -61,7 +62,8 @@
|
|
|
61
62
|
{
|
|
62
63
|
"name": "attach",
|
|
63
64
|
"attribute": "attach",
|
|
64
|
-
"description": "
|
|
65
|
+
"description": "Target element to be attached with Autosuggest",
|
|
66
|
+
"type": "AutosuggestTargetElement | string | null"
|
|
65
67
|
},
|
|
66
68
|
{
|
|
67
69
|
"name": "requestOnFocus",
|
|
@@ -80,9 +82,9 @@
|
|
|
80
82
|
{
|
|
81
83
|
"name": "moreSearchText",
|
|
82
84
|
"attribute": "more-search-text",
|
|
83
|
-
"description": "Custom text for More
|
|
85
|
+
"description": "Custom text for 'More results', you can use {0} to represent current query.\nFor example, 'More results for {0}'",
|
|
84
86
|
"type": "string",
|
|
85
|
-
"default": "\"
|
|
87
|
+
"default": "\"\""
|
|
86
88
|
},
|
|
87
89
|
{
|
|
88
90
|
"name": "loading",
|
|
@@ -93,7 +95,8 @@
|
|
|
93
95
|
},
|
|
94
96
|
{
|
|
95
97
|
"name": "query",
|
|
96
|
-
"description": "An object that represents a query from attach target"
|
|
98
|
+
"description": "An object that represents a query from attach target",
|
|
99
|
+
"type": "AutosuggestQuery | null"
|
|
97
100
|
},
|
|
98
101
|
{
|
|
99
102
|
"name": "debounceRate",
|
|
@@ -105,17 +108,19 @@
|
|
|
105
108
|
{
|
|
106
109
|
"name": "renderer",
|
|
107
110
|
"description": "A renderer applied to suggestion.\nBy default a render maps data to item attributes",
|
|
111
|
+
"type": "AutosuggestRenderer",
|
|
108
112
|
"default": "\"renderer\""
|
|
109
113
|
},
|
|
110
114
|
{
|
|
111
115
|
"name": "highlightable",
|
|
112
116
|
"description": "A function that is applied to every suggestion during the render process\nto say whether the item can be highlighted and selected. Only items that return true are considered.\nBy default the function checks for `item` `highlightable` property.",
|
|
117
|
+
"type": "AutosuggestHighlightable",
|
|
113
118
|
"default": "\"itemHighlightable\""
|
|
114
119
|
},
|
|
115
120
|
{
|
|
116
121
|
"name": "suggestions",
|
|
117
122
|
"description": "A list of suggestion items",
|
|
118
|
-
"type": "
|
|
123
|
+
"type": "AutosuggestItem[]",
|
|
119
124
|
"default": "[]"
|
|
120
125
|
},
|
|
121
126
|
{
|
|
@@ -160,7 +165,7 @@
|
|
|
160
165
|
},
|
|
161
166
|
{
|
|
162
167
|
"name": "suggestions-query",
|
|
163
|
-
"description": "Fired when the user changes value in input control and you might need to update suggestion items accordingly."
|
|
168
|
+
"description": "Fired when the user changes value in input control and you might need to update suggestion items accordingly. The event is not triggered if `query` property is changed programmatically."
|
|
164
169
|
},
|
|
165
170
|
{
|
|
166
171
|
"name": "suggestions-changed",
|
|
@@ -8,20 +8,20 @@ custom rendering, pagination, asynchronous data request, etc.
|
|
|
8
8
|
|
|
9
9
|
## Properties
|
|
10
10
|
|
|
11
|
-
| Property | Attribute | Type
|
|
12
|
-
|
|
13
|
-
| `attach` | `attach` |
|
|
14
|
-
| `debounceRate` | `debounce-rate` | `number`
|
|
15
|
-
| `highlightable` | |
|
|
16
|
-
| `htmlRenderer` | `html-renderer` | `boolean`
|
|
17
|
-
| `loading` | `loading` | `boolean`
|
|
18
|
-
| `moreResults` | `more-results` | `boolean`
|
|
19
|
-
| `moreSearchText` | `more-search-text` | `string`
|
|
20
|
-
| `opened` | `opened` | `boolean`
|
|
21
|
-
| `query` | |
|
|
22
|
-
| `renderer` | |
|
|
23
|
-
| `requestOnFocus` | `request-on-focus` | `boolean`
|
|
24
|
-
| `suggestions` | | `
|
|
11
|
+
| Property | Attribute | Type | Default | Description |
|
|
12
|
+
|------------------|--------------------|----------------------------------------------|---------------------|--------------------------------------------------|
|
|
13
|
+
| `attach` | `attach` | `AutosuggestTargetElement \| string \| null` | null | Target element to be attached with Autosuggest |
|
|
14
|
+
| `debounceRate` | `debounce-rate` | `number` | "100" | Debounce rate in ms of the filter as a number.<br />Used to throttle the filter rate so as not to trigger unneeded filtering |
|
|
15
|
+
| `highlightable` | | `AutosuggestHighlightable` | "itemHighlightable" | A function that is applied to every suggestion during the render process<br />to say whether the item can be highlighted and selected. Only items that return true are considered.<br />By default the function checks for `item` `highlightable` property. |
|
|
16
|
+
| `htmlRenderer` | `html-renderer` | `boolean` | false | If set to true, the render function is not called. Instead the wrapper element<br />should populate and destroy suggestion elements. Rendering items manually<br />may have performance benefits in frameworks that use virtual DOM (such as `Vue`, `React`, `hyperHTML` and others) |
|
|
17
|
+
| `loading` | `loading` | `boolean` | false | If set to true show loading mask |
|
|
18
|
+
| `moreResults` | `more-results` | `boolean` | false | If set to true display 'Has more results' item |
|
|
19
|
+
| `moreSearchText` | `more-search-text` | `string` | "" | Custom text for 'More results', you can use {0} to represent current query.<br />For example, 'More results for {0}' |
|
|
20
|
+
| `opened` | `opened` | `boolean` | false | Auto suggest popup's open state |
|
|
21
|
+
| `query` | | `AutosuggestQuery \| null` | null | An object that represents a query from attach target |
|
|
22
|
+
| `renderer` | | `AutosuggestRenderer` | "renderer" | A renderer applied to suggestion.<br />By default a render maps data to item attributes |
|
|
23
|
+
| `requestOnFocus` | `request-on-focus` | `boolean` | false | Request suggestions when attach target is focused |
|
|
24
|
+
| `suggestions` | | `AutosuggestItem[]` | [] | A list of suggestion items |
|
|
25
25
|
|
|
26
26
|
## Methods
|
|
27
27
|
|
|
@@ -44,7 +44,7 @@ custom rendering, pagination, asynchronous data request, etc.
|
|
|
44
44
|
| `suggestions-changed` | Fired when suggestion items changed. |
|
|
45
45
|
| `suggestions-clear-requested` | Fired when autosuggest requests to clear the data. If used in reactive application, prevent default and set suggestions to []. |
|
|
46
46
|
| `suggestions-fetch-requested` | Fired when autosuggest requests the data. The event will be triggered when the value of the attached control has changed or when keyboard navigation is performed. |
|
|
47
|
-
| `suggestions-query` | Fired when the user changes value in input control and you might need to update suggestion items accordingly. |
|
|
47
|
+
| `suggestions-query` | Fired when the user changes value in input control and you might need to update suggestion items accordingly. The event is not triggered if `query` property is changed programmatically. |
|
|
48
48
|
|
|
49
49
|
## Slots
|
|
50
50
|
|
|
@@ -6,9 +6,9 @@ import '../item/index.js';
|
|
|
6
6
|
import '../loader/index.js';
|
|
7
7
|
import { Overlay } from '../overlay/index.js';
|
|
8
8
|
import { renderer } from './helpers/renderer.js';
|
|
9
|
-
import { escapeRegExp, itemHighlightable, queryWordSelect } from './helpers/utils.js';
|
|
10
9
|
import type { AutosuggestHighlightItemEvent, AutosuggestHighlightable, AutosuggestItem, AutosuggestMethodType, AutosuggestQuery, AutosuggestReason, AutosuggestRenderer, AutosuggestSelectItemEvent, AutosuggestTargetElement } from './helpers/types';
|
|
11
10
|
import type { AddAttachTargetEventsEvent, ItemHighlightEvent, ItemSelectEvent, RemoveAttachTargetEventsEvent, SuggestionsChangedEvent, SuggestionsClearRequestedEvent, SuggestionsFetchRequestedEvent, SuggestionsQueryEvent } from './helpers/types';
|
|
11
|
+
import { escapeRegExp, itemHighlightable, queryWordSelect } from './helpers/utils.js';
|
|
12
12
|
export type { AutosuggestTargetElement, AutosuggestHighlightable, AutosuggestMethodType, AutosuggestQuery, AutosuggestRenderer, AutosuggestReason, AutosuggestItem, ItemHighlightEvent, AddAttachTargetEventsEvent, RemoveAttachTargetEventsEvent, ItemSelectEvent, SuggestionsFetchRequestedEvent, SuggestionsClearRequestedEvent, SuggestionsQueryEvent, SuggestionsChangedEvent };
|
|
13
13
|
export { updateElementContent } from './helpers/utils.js';
|
|
14
14
|
export { itemHighlightable, escapeRegExp, queryWordSelect, renderer, renderer as itemRenderer };
|
|
@@ -25,7 +25,7 @@ export { itemHighlightable, escapeRegExp, queryWordSelect, renderer, renderer as
|
|
|
25
25
|
* @fires item-select - Fired when the user selects an item on autosuggest.
|
|
26
26
|
* @fires suggestions-fetch-requested - Fired when autosuggest requests the data. The event will be triggered when the value of the attached control has changed or when keyboard navigation is performed.
|
|
27
27
|
* @fires suggestions-clear-requested - Fired when autosuggest requests to clear the data. If used in reactive application, prevent default and set suggestions to [].
|
|
28
|
-
* @fires suggestions-query - Fired when the user changes value in input control and you might need to update suggestion items accordingly.
|
|
28
|
+
* @fires suggestions-query - Fired when the user changes value in input control and you might need to update suggestion items accordingly. The event is not triggered if `query` property is changed programmatically.
|
|
29
29
|
* @fires suggestions-changed - Fired when suggestion items changed.
|
|
30
30
|
*
|
|
31
31
|
* @attr {boolean} opened - Set to open auto suggest popup
|
|
@@ -78,7 +78,8 @@ export declare class Autosuggest extends Overlay {
|
|
|
78
78
|
static ItemHighlightable(suggestion: AutosuggestItem, target: HTMLElement): boolean;
|
|
79
79
|
static readonly defaultDebounceRate = 100;
|
|
80
80
|
/**
|
|
81
|
-
*
|
|
81
|
+
* Target element to be attached with Autosuggest
|
|
82
|
+
* @type {AutosuggestTargetElement | string | null}
|
|
82
83
|
*/
|
|
83
84
|
attach: AutosuggestTargetElement | string | null;
|
|
84
85
|
/**
|
|
@@ -90,8 +91,8 @@ export declare class Autosuggest extends Overlay {
|
|
|
90
91
|
*/
|
|
91
92
|
moreResults: boolean;
|
|
92
93
|
/**
|
|
93
|
-
* Custom text for More
|
|
94
|
-
*
|
|
94
|
+
* Custom text for 'More results', you can use {0} to represent current query.
|
|
95
|
+
* For example, 'More results for {0}'
|
|
95
96
|
*/
|
|
96
97
|
moreSearchText: string;
|
|
97
98
|
/**
|
|
@@ -100,6 +101,7 @@ export declare class Autosuggest extends Overlay {
|
|
|
100
101
|
loading: boolean;
|
|
101
102
|
/**
|
|
102
103
|
* An object that represents a query from attach target
|
|
104
|
+
* @type {AutosuggestQuery | null}
|
|
103
105
|
*/
|
|
104
106
|
query: AutosuggestQuery | null;
|
|
105
107
|
/**
|
|
@@ -111,16 +113,19 @@ export declare class Autosuggest extends Overlay {
|
|
|
111
113
|
/**
|
|
112
114
|
* A renderer applied to suggestion.
|
|
113
115
|
* By default a render maps data to item attributes
|
|
116
|
+
* @type {AutosuggestRenderer}
|
|
114
117
|
*/
|
|
115
118
|
renderer: AutosuggestRenderer;
|
|
116
119
|
/**
|
|
117
120
|
* A function that is applied to every suggestion during the render process
|
|
118
121
|
* to say whether the item can be highlighted and selected. Only items that return true are considered.
|
|
119
122
|
* By default the function checks for `item` `highlightable` property.
|
|
123
|
+
* @type {AutosuggestHighlightable}
|
|
120
124
|
*/
|
|
121
125
|
highlightable: AutosuggestHighlightable;
|
|
122
126
|
/**
|
|
123
127
|
* A list of suggestion items
|
|
128
|
+
* @type {AutosuggestItem[]}
|
|
124
129
|
*/
|
|
125
130
|
suggestions: AutosuggestItem[];
|
|
126
131
|
/**
|
package/lib/autosuggest/index.js
CHANGED
|
@@ -32,7 +32,7 @@ export { itemHighlightable, escapeRegExp, queryWordSelect, renderer, renderer as
|
|
|
32
32
|
* @fires item-select - Fired when the user selects an item on autosuggest.
|
|
33
33
|
* @fires suggestions-fetch-requested - Fired when autosuggest requests the data. The event will be triggered when the value of the attached control has changed or when keyboard navigation is performed.
|
|
34
34
|
* @fires suggestions-clear-requested - Fired when autosuggest requests to clear the data. If used in reactive application, prevent default and set suggestions to [].
|
|
35
|
-
* @fires suggestions-query - Fired when the user changes value in input control and you might need to update suggestion items accordingly.
|
|
35
|
+
* @fires suggestions-query - Fired when the user changes value in input control and you might need to update suggestion items accordingly. The event is not triggered if `query` property is changed programmatically.
|
|
36
36
|
* @fires suggestions-changed - Fired when suggestion items changed.
|
|
37
37
|
*
|
|
38
38
|
* @attr {boolean} opened - Set to open auto suggest popup
|
|
@@ -120,7 +120,8 @@ let Autosuggest = Autosuggest_1 = class Autosuggest extends Overlay {
|
|
|
120
120
|
super();
|
|
121
121
|
this.defaultRole = 'listbox';
|
|
122
122
|
/**
|
|
123
|
-
*
|
|
123
|
+
* Target element to be attached with Autosuggest
|
|
124
|
+
* @type {AutosuggestTargetElement | string | null}
|
|
124
125
|
*/
|
|
125
126
|
this.attach = null;
|
|
126
127
|
/**
|
|
@@ -132,8 +133,8 @@ let Autosuggest = Autosuggest_1 = class Autosuggest extends Overlay {
|
|
|
132
133
|
*/
|
|
133
134
|
this.moreResults = false;
|
|
134
135
|
/**
|
|
135
|
-
* Custom text for More
|
|
136
|
-
*
|
|
136
|
+
* Custom text for 'More results', you can use {0} to represent current query.
|
|
137
|
+
* For example, 'More results for {0}'
|
|
137
138
|
*/
|
|
138
139
|
this.moreSearchText = '';
|
|
139
140
|
/**
|
|
@@ -142,6 +143,7 @@ let Autosuggest = Autosuggest_1 = class Autosuggest extends Overlay {
|
|
|
142
143
|
this.loading = false;
|
|
143
144
|
/**
|
|
144
145
|
* An object that represents a query from attach target
|
|
146
|
+
* @type {AutosuggestQuery | null}
|
|
145
147
|
*/
|
|
146
148
|
this.query = null;
|
|
147
149
|
/**
|
|
@@ -153,16 +155,19 @@ let Autosuggest = Autosuggest_1 = class Autosuggest extends Overlay {
|
|
|
153
155
|
/**
|
|
154
156
|
* A renderer applied to suggestion.
|
|
155
157
|
* By default a render maps data to item attributes
|
|
158
|
+
* @type {AutosuggestRenderer}
|
|
156
159
|
*/
|
|
157
160
|
this.renderer = renderer;
|
|
158
161
|
/**
|
|
159
162
|
* A function that is applied to every suggestion during the render process
|
|
160
163
|
* to say whether the item can be highlighted and selected. Only items that return true are considered.
|
|
161
164
|
* By default the function checks for `item` `highlightable` property.
|
|
165
|
+
* @type {AutosuggestHighlightable}
|
|
162
166
|
*/
|
|
163
167
|
this.highlightable = itemHighlightable;
|
|
164
168
|
/**
|
|
165
169
|
* A list of suggestion items
|
|
170
|
+
* @type {AutosuggestItem[]}
|
|
166
171
|
*/
|
|
167
172
|
this.suggestions = [];
|
|
168
173
|
/**
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"attributes": [
|
|
8
8
|
{
|
|
9
9
|
"name": "textpos",
|
|
10
|
-
"description": "Customises text alignment when specified alongside `icon` property
|
|
10
|
+
"description": "Customises text alignment when specified alongside `icon` property",
|
|
11
11
|
"type": "\"before\" | \"after\"",
|
|
12
12
|
"default": "\"after\""
|
|
13
13
|
},
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
"name": "cta",
|
|
32
|
-
"description": "Set
|
|
32
|
+
"description": "Set call-to-action state",
|
|
33
33
|
"type": "boolean",
|
|
34
34
|
"default": "false"
|
|
35
35
|
},
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
"name": "disabled",
|
|
50
|
-
"description": "Set state
|
|
50
|
+
"description": "Set disabled state",
|
|
51
51
|
"type": "boolean",
|
|
52
52
|
"default": "false"
|
|
53
53
|
}
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
{
|
|
57
57
|
"name": "textpos",
|
|
58
58
|
"attribute": "textpos",
|
|
59
|
-
"description": "Customises text alignment when specified alongside `icon` property
|
|
59
|
+
"description": "Customises text alignment when specified alongside `icon` property",
|
|
60
60
|
"type": "\"before\" | \"after\"",
|
|
61
61
|
"default": "\"after\""
|
|
62
62
|
},
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
{
|
|
83
83
|
"name": "cta",
|
|
84
84
|
"attribute": "cta",
|
|
85
|
-
"description": "Set
|
|
85
|
+
"description": "Set call-to-action state",
|
|
86
86
|
"type": "boolean",
|
|
87
87
|
"default": "false"
|
|
88
88
|
},
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
{
|
|
104
104
|
"name": "disabled",
|
|
105
105
|
"attribute": "disabled",
|
|
106
|
-
"description": "Set state
|
|
106
|
+
"description": "Set disabled state",
|
|
107
107
|
"type": "boolean",
|
|
108
108
|
"default": "false"
|
|
109
109
|
}
|
|
@@ -8,11 +8,11 @@ and more with support for different states and styles.
|
|
|
8
8
|
| Property | Attribute | Type | Default | Description |
|
|
9
9
|
|---------------|---------------|-----------------------|---------|--------------------------------------------------|
|
|
10
10
|
| `active` | `active` | `boolean` | false | An active or inactive state, can only be used with toggles property/attribute |
|
|
11
|
-
| `cta` | `cta` | `boolean` | false | Set
|
|
12
|
-
| `disabled` | `disabled` | `boolean` | false | Set state
|
|
11
|
+
| `cta` | `cta` | `boolean` | false | Set call-to-action state |
|
|
12
|
+
| `disabled` | `disabled` | `boolean` | false | Set disabled state |
|
|
13
13
|
| `hoverIcon` | `hover-icon` | `string \| null` | null | Specify icon to display when hovering. Value can be icon name |
|
|
14
14
|
| `icon` | `icon` | `string \| null` | null | Specify icon to display in button. Value can be icon name |
|
|
15
|
-
| `textpos` | `textpos` | `"before" \| "after"` | "after" | Customises text alignment when specified alongside `icon` property
|
|
15
|
+
| `textpos` | `textpos` | `"before" \| "after"` | "after" | Customises text alignment when specified alongside `icon` property |
|
|
16
16
|
| `toggles` | `toggles` | `boolean` | false | Enable or disable ability to be toggled |
|
|
17
17
|
| `transparent` | `transparent` | `boolean` | false | Removes background when specified alongside `icon` property |
|
|
18
18
|
|
package/lib/button/index.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ import '../icon/index.js';
|
|
|
4
4
|
/**
|
|
5
5
|
* Use button for actions in forms, dialogs,
|
|
6
6
|
* and more with support for different states and styles.
|
|
7
|
-
* @attr {boolean} disabled - Set state
|
|
8
|
-
* @prop {boolean} [disabled=false] - Set state
|
|
7
|
+
* @attr {boolean} disabled - Set disabled state
|
|
8
|
+
* @prop {boolean} [disabled=false] - Set disabled state
|
|
9
9
|
* @fires active-changed - Fired when `active` property changed by user taps on toggled button. It will not be triggered if `active` state is changed programmatically.
|
|
10
10
|
*/
|
|
11
11
|
export declare class Button extends ControlElement {
|
|
@@ -17,7 +17,6 @@ export declare class Button extends ControlElement {
|
|
|
17
17
|
protected readonly defaultRole = "button";
|
|
18
18
|
/**
|
|
19
19
|
* Customises text alignment when specified alongside `icon` property
|
|
20
|
-
* Value can be `before` or `after`
|
|
21
20
|
*/
|
|
22
21
|
textpos: 'before' | 'after';
|
|
23
22
|
/**
|
|
@@ -33,7 +32,7 @@ export declare class Button extends ControlElement {
|
|
|
33
32
|
*/
|
|
34
33
|
hoverIcon: string | null;
|
|
35
34
|
/**
|
|
36
|
-
* Set
|
|
35
|
+
* Set call-to-action state
|
|
37
36
|
*/
|
|
38
37
|
cta: boolean;
|
|
39
38
|
/**
|
package/lib/button/index.js
CHANGED
|
@@ -10,8 +10,8 @@ import { VERSION } from '../version.js';
|
|
|
10
10
|
/**
|
|
11
11
|
* Use button for actions in forms, dialogs,
|
|
12
12
|
* and more with support for different states and styles.
|
|
13
|
-
* @attr {boolean} disabled - Set state
|
|
14
|
-
* @prop {boolean} [disabled=false] - Set state
|
|
13
|
+
* @attr {boolean} disabled - Set disabled state
|
|
14
|
+
* @prop {boolean} [disabled=false] - Set disabled state
|
|
15
15
|
* @fires active-changed - Fired when `active` property changed by user taps on toggled button. It will not be triggered if `active` state is changed programmatically.
|
|
16
16
|
*/
|
|
17
17
|
let Button = class Button extends ControlElement {
|
|
@@ -20,7 +20,6 @@ let Button = class Button extends ControlElement {
|
|
|
20
20
|
this.defaultRole = 'button';
|
|
21
21
|
/**
|
|
22
22
|
* Customises text alignment when specified alongside `icon` property
|
|
23
|
-
* Value can be `before` or `after`
|
|
24
23
|
*/
|
|
25
24
|
this.textpos = 'after';
|
|
26
25
|
/**
|
|
@@ -36,7 +35,7 @@ let Button = class Button extends ControlElement {
|
|
|
36
35
|
*/
|
|
37
36
|
this.hoverIcon = null;
|
|
38
37
|
/**
|
|
39
|
-
* Set
|
|
38
|
+
* Set call-to-action state
|
|
40
39
|
*/
|
|
41
40
|
this.cta = false;
|
|
42
41
|
/**
|
|
@@ -4,13 +4,6 @@
|
|
|
4
4
|
{
|
|
5
5
|
"name": "ef-chart",
|
|
6
6
|
"description": "Charting component that uses ChartJS library",
|
|
7
|
-
"attributes": [
|
|
8
|
-
{
|
|
9
|
-
"name": "config",
|
|
10
|
-
"description": "Chart configurations. Same configuration as ChartJS",
|
|
11
|
-
"type": "ChartConfiguration | null"
|
|
12
|
-
}
|
|
13
|
-
],
|
|
14
7
|
"properties": [
|
|
15
8
|
{
|
|
16
9
|
"name": "chart",
|
|
@@ -19,13 +12,12 @@
|
|
|
19
12
|
},
|
|
20
13
|
{
|
|
21
14
|
"name": "config",
|
|
22
|
-
"attribute": "config",
|
|
23
15
|
"description": "Chart configurations. Same configuration as ChartJS",
|
|
24
16
|
"type": "ChartConfiguration | null"
|
|
25
17
|
},
|
|
26
18
|
{
|
|
27
19
|
"name": "colors (readonly)",
|
|
28
|
-
"description": "List of available chart
|
|
20
|
+
"description": "List of available colors for chart styling",
|
|
29
21
|
"type": "string[]"
|
|
30
22
|
}
|
|
31
23
|
],
|
|
@@ -4,14 +4,14 @@ Charting component that uses ChartJS library
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
| Property |
|
|
8
|
-
|
|
9
|
-
| `chart` |
|
|
10
|
-
| `colors (readonly)` |
|
|
11
|
-
| `config` | `
|
|
7
|
+
| Property | Type | Default | Description |
|
|
8
|
+
|---------------------|------------------------------|---------|--------------------------------------------------|
|
|
9
|
+
| `chart` | `ChartJS \| null` | null | Chart.js object |
|
|
10
|
+
| `colors (readonly)` | `string[]` | | List of available colors for chart styling |
|
|
11
|
+
| `config` | `ChartConfiguration \| null` | null | Chart configurations. Same configuration as ChartJS |
|
|
12
12
|
|
|
13
13
|
## Methods
|
|
14
14
|
|
|
15
|
-
| Method | Type
|
|
16
|
-
|
|
17
|
-
| `updateChart` | `(updateMode?:
|
|
15
|
+
| Method | Type | Description |
|
|
16
|
+
|---------------|-----------------------------------|--------------------------------------------------|
|
|
17
|
+
| `updateChart` | `(updateMode?: UpdateMode): void` | Update all data, title, scales, legends and re-render the chart based on its config<br /><br />**updateMode**: Additional configuration for control an animation in the update process. |
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { JSXInterface } from '../../jsx';
|
|
2
2
|
import { Chart as ChartJS } from 'chart.js';
|
|
3
|
+
import type { ChartConfiguration, ChartDataset, ChartOptions, ChartType, LegendItem, UpdateMode } from 'chart.js';
|
|
3
4
|
import 'chartjs-adapter-date-fns';
|
|
4
5
|
import { BasicElement, CSSResultGroup, PropertyValues, TemplateResult, nothing } from '@refinitiv-ui/core';
|
|
5
6
|
import { Ref } from '@refinitiv-ui/core/directives/ref.js';
|
|
6
7
|
import '../../header/index.js';
|
|
7
8
|
import { DatasetColors } from '../helpers/index.js';
|
|
8
|
-
import type { ChartConfiguration, ChartDataset, ChartOptions, ChartType, LegendItem, UpdateMode } from 'chart.js';
|
|
9
9
|
declare module 'chart.js' {
|
|
10
10
|
interface PluginOptionsByType<TType extends ChartType = ChartType> {
|
|
11
11
|
'ef-chart': object;
|
|
@@ -47,9 +47,9 @@ export declare class Chart extends BasicElement {
|
|
|
47
47
|
*/
|
|
48
48
|
protected get requiredConfig(): ChartOptions;
|
|
49
49
|
/**
|
|
50
|
-
* List of available chart
|
|
50
|
+
* List of available colors for chart styling
|
|
51
51
|
* @type {string[]}
|
|
52
|
-
* @returns {string[]}List of available chart
|
|
52
|
+
* @returns {string[]} List of available colors for chart styling
|
|
53
53
|
*/
|
|
54
54
|
get colors(): string[];
|
|
55
55
|
/**
|
|
@@ -157,7 +157,7 @@ export declare class Chart extends BasicElement {
|
|
|
157
157
|
protected destroyChart(): boolean;
|
|
158
158
|
/**
|
|
159
159
|
* Update all data, title, scales, legends and re-render the chart based on its config
|
|
160
|
-
* @param updateMode
|
|
160
|
+
* @param {UpdateMode} updateMode Additional configuration for control an animation in the update process.
|
|
161
161
|
* @returns {void}
|
|
162
162
|
*/
|
|
163
163
|
updateChart(updateMode?: UpdateMode): void;
|