@refinitiv-ui/elements 5.9.0 → 5.10.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 +48 -4
- package/lib/button/themes/solar/charcoal/index.js +1 -1
- package/lib/button/themes/solar/pearl/index.js +1 -1
- package/lib/checkbox/index.js +0 -1
- 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/themes/halo/dark/index.js +1 -1
- package/lib/counter/themes/halo/light/index.js +1 -1
- package/lib/label/index.js +2 -1
- package/lib/number-field/themes/solar/charcoal/index.js +1 -1
- package/lib/pagination/custom-elements.json +16 -33
- package/lib/pagination/custom-elements.md +8 -9
- package/lib/pagination/index.d.ts +142 -74
- package/lib/pagination/index.js +356 -202
- package/lib/pagination/themes/halo/dark/index.js +1 -1
- package/lib/pagination/themes/halo/light/index.js +1 -1
- package/lib/pagination/themes/solar/charcoal/index.js +1 -1
- package/lib/pagination/themes/solar/pearl/index.js +1 -1
- package/lib/radio-button/index.js +4 -1
- package/lib/toggle/themes/halo/dark/index.js +1 -1
- package/lib/toggle/themes/halo/light/index.js +1 -1
- package/lib/toggle/themes/solar/charcoal/index.js +1 -1
- package/lib/toggle/themes/solar/pearl/index.js +1 -1
- 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/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.js +1 -1
- package/package.json +10 -10
- package/lib/pagination/helpers/types.d.ts +0 -9
- package/lib/pagination/helpers/types.js +0 -1
|
@@ -6,22 +6,14 @@
|
|
|
6
6
|
"description": "Used to control and navigate through multiple pages",
|
|
7
7
|
"attributes": [
|
|
8
8
|
{
|
|
9
|
-
"name": "
|
|
10
|
-
"description": "
|
|
11
|
-
"type": "string"
|
|
12
|
-
"default": "\"1\""
|
|
9
|
+
"name": "value",
|
|
10
|
+
"description": "Current page",
|
|
11
|
+
"type": "string"
|
|
13
12
|
},
|
|
14
13
|
{
|
|
15
|
-
"name": "
|
|
16
|
-
"description": "
|
|
17
|
-
"type": "string"
|
|
18
|
-
"default": "\"10\""
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"name": "total-items",
|
|
22
|
-
"description": "Total items",
|
|
23
|
-
"type": "string",
|
|
24
|
-
"default": "\"10\""
|
|
14
|
+
"name": "max",
|
|
15
|
+
"description": "Max page",
|
|
16
|
+
"type": "string"
|
|
25
17
|
},
|
|
26
18
|
{
|
|
27
19
|
"name": "disabled",
|
|
@@ -32,25 +24,16 @@
|
|
|
32
24
|
],
|
|
33
25
|
"properties": [
|
|
34
26
|
{
|
|
35
|
-
"name": "
|
|
36
|
-
"attribute": "
|
|
37
|
-
"description": "
|
|
38
|
-
"type": "string"
|
|
39
|
-
"default": "\"1\""
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"name": "pageSize",
|
|
43
|
-
"attribute": "page-size",
|
|
44
|
-
"description": "Number of item per page",
|
|
45
|
-
"type": "string",
|
|
46
|
-
"default": "\"10\""
|
|
27
|
+
"name": "value",
|
|
28
|
+
"attribute": "value",
|
|
29
|
+
"description": "Current page",
|
|
30
|
+
"type": "string"
|
|
47
31
|
},
|
|
48
32
|
{
|
|
49
|
-
"name": "
|
|
50
|
-
"attribute": "
|
|
51
|
-
"description": "
|
|
52
|
-
"type": "string"
|
|
53
|
-
"default": "\"10\""
|
|
33
|
+
"name": "max",
|
|
34
|
+
"attribute": "max",
|
|
35
|
+
"description": "Max page",
|
|
36
|
+
"type": "string"
|
|
54
37
|
},
|
|
55
38
|
{
|
|
56
39
|
"name": "disabled",
|
|
@@ -62,8 +45,8 @@
|
|
|
62
45
|
],
|
|
63
46
|
"events": [
|
|
64
47
|
{
|
|
65
|
-
"name": "
|
|
66
|
-
"description": "Fired when the `
|
|
48
|
+
"name": "value-changed",
|
|
49
|
+
"description": "Fired when the `value` property is changed"
|
|
67
50
|
}
|
|
68
51
|
],
|
|
69
52
|
"methods": [
|
|
@@ -4,12 +4,11 @@ Used to control and navigate through multiple pages
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
| Property
|
|
8
|
-
|
|
9
|
-
| `disabled`
|
|
10
|
-
| `
|
|
11
|
-
| `
|
|
12
|
-
| `totalItems` | `total-items` | `string` | "10" | Total items |
|
|
7
|
+
| Property | Attribute | Type | Default | Description |
|
|
8
|
+
|------------|------------|-----------|---------|----------------------|
|
|
9
|
+
| `disabled` | `disabled` | `boolean` | false | Set state to disable |
|
|
10
|
+
| `max` | `max` | `string` | | Max page |
|
|
11
|
+
| `value` | `value` | `string` | | Current page |
|
|
13
12
|
|
|
14
13
|
## Methods
|
|
15
14
|
|
|
@@ -22,6 +21,6 @@ Used to control and navigate through multiple pages
|
|
|
22
21
|
|
|
23
22
|
## Events
|
|
24
23
|
|
|
25
|
-
| Event
|
|
26
|
-
|
|
27
|
-
| `
|
|
24
|
+
| Event | Description |
|
|
25
|
+
|-----------------|--------------------------------------------|
|
|
26
|
+
| `value-changed` | Fired when the `value` property is changed |
|
|
@@ -8,7 +8,7 @@ import '@refinitiv-ui/phrasebook/lib/locale/en/pagination.js';
|
|
|
8
8
|
import { Translate } from '@refinitiv-ui/translate';
|
|
9
9
|
/**
|
|
10
10
|
* Used to control and navigate through multiple pages
|
|
11
|
-
* @fires
|
|
11
|
+
* @fires value-changed - Fired when the `value` property is changed
|
|
12
12
|
*/
|
|
13
13
|
export declare class Pagination extends BasicElement {
|
|
14
14
|
/**
|
|
@@ -17,126 +17,182 @@ export declare class Pagination extends BasicElement {
|
|
|
17
17
|
*/
|
|
18
18
|
static get version(): string;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
21
|
-
* to style the host, slotted children
|
|
22
|
-
* and the internal template of the element.
|
|
23
|
-
* @return CSS template
|
|
20
|
+
* Current page internal current page value
|
|
24
21
|
*/
|
|
25
|
-
|
|
22
|
+
private _value;
|
|
23
|
+
/**
|
|
24
|
+
* Internal current page
|
|
25
|
+
* @returns current page
|
|
26
|
+
*/
|
|
27
|
+
private get internalValue();
|
|
28
|
+
/**
|
|
29
|
+
* Current page
|
|
30
|
+
*/
|
|
31
|
+
get value(): string;
|
|
32
|
+
/**
|
|
33
|
+
* Set current page
|
|
34
|
+
* @param value current page
|
|
35
|
+
*/
|
|
36
|
+
set value(value: string);
|
|
37
|
+
/**
|
|
38
|
+
* Max page
|
|
39
|
+
*/
|
|
40
|
+
protected _max: string;
|
|
41
|
+
/**
|
|
42
|
+
* Internal max page
|
|
43
|
+
* @returns max page
|
|
44
|
+
*/
|
|
45
|
+
private get internalMax();
|
|
46
|
+
/**
|
|
47
|
+
* Max page
|
|
48
|
+
* @returns max page
|
|
49
|
+
*/
|
|
50
|
+
get max(): string;
|
|
51
|
+
/**
|
|
52
|
+
* Set max page
|
|
53
|
+
* @param value max page
|
|
54
|
+
*/
|
|
55
|
+
set max(value: string);
|
|
56
|
+
/**
|
|
57
|
+
* Current page
|
|
58
|
+
* @returns current page
|
|
59
|
+
* @deprecated
|
|
60
|
+
* @ignore
|
|
61
|
+
*/
|
|
62
|
+
get page(): string;
|
|
26
63
|
/**
|
|
27
64
|
* Set current page
|
|
65
|
+
* @param value - Set current page
|
|
66
|
+
* @deprecated
|
|
67
|
+
* @ignore
|
|
28
68
|
*/
|
|
29
|
-
page: string;
|
|
69
|
+
set page(value: string);
|
|
30
70
|
/**
|
|
31
71
|
* Number of item per page
|
|
72
|
+
* @returns number of items per page
|
|
73
|
+
* @deprecated
|
|
74
|
+
* @ignore
|
|
32
75
|
*/
|
|
33
|
-
pageSize: string;
|
|
76
|
+
get pageSize(): string;
|
|
34
77
|
/**
|
|
35
|
-
*
|
|
78
|
+
* Set number of item per page
|
|
79
|
+
* @param value - number of item per page
|
|
80
|
+
* @deprecated
|
|
81
|
+
* @ignore
|
|
36
82
|
*/
|
|
37
|
-
|
|
83
|
+
set pageSize(value: string);
|
|
38
84
|
/**
|
|
39
|
-
*
|
|
85
|
+
* Number of item per page internal value
|
|
86
|
+
* @deprecated
|
|
40
87
|
*/
|
|
41
|
-
|
|
88
|
+
private _pageSize;
|
|
42
89
|
/**
|
|
43
|
-
*
|
|
90
|
+
* Internal page size
|
|
91
|
+
* @deprecated
|
|
92
|
+
* @returns page size
|
|
44
93
|
*/
|
|
45
|
-
private
|
|
94
|
+
private get internalPageSize();
|
|
46
95
|
/**
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
96
|
+
* Total items internal value
|
|
97
|
+
* @deprecated
|
|
98
|
+
*/
|
|
99
|
+
private _totalItems;
|
|
50
100
|
/**
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
101
|
+
* Internal total items
|
|
102
|
+
* @returns total items
|
|
103
|
+
* @deprecated
|
|
104
|
+
*/
|
|
105
|
+
private get internalTotalitems();
|
|
54
106
|
/**
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
107
|
+
* Total items
|
|
108
|
+
* @returns total items
|
|
109
|
+
* @deprecated
|
|
110
|
+
* @ignore
|
|
111
|
+
*/
|
|
112
|
+
get totalItems(): string;
|
|
58
113
|
/**
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
114
|
+
* Set total items
|
|
115
|
+
* @param value total items
|
|
116
|
+
* @deprecated
|
|
117
|
+
* @ignore
|
|
118
|
+
*/
|
|
119
|
+
set totalItems(value: string);
|
|
62
120
|
/**
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
121
|
+
* Set state to disable
|
|
122
|
+
*/
|
|
123
|
+
disabled: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Get infinite pagination state
|
|
126
|
+
* @returns infinite pagination state
|
|
127
|
+
*/
|
|
128
|
+
private get infinitePaginate();
|
|
129
|
+
/**
|
|
130
|
+
* Getter for text field as input part
|
|
131
|
+
*/
|
|
132
|
+
private input;
|
|
66
133
|
/**
|
|
67
134
|
* Used for translations
|
|
68
135
|
*/
|
|
69
136
|
protected t: Translate;
|
|
70
137
|
/**
|
|
71
|
-
*
|
|
72
|
-
* @
|
|
73
|
-
* @returns {void}
|
|
138
|
+
* Getter for display text in the input
|
|
139
|
+
* @returns input text
|
|
74
140
|
*/
|
|
75
|
-
protected
|
|
141
|
+
protected get inputText(): string;
|
|
76
142
|
/**
|
|
77
|
-
*
|
|
78
|
-
* @returns {void}
|
|
143
|
+
* State for check the input focus
|
|
79
144
|
*/
|
|
80
|
-
private
|
|
145
|
+
private inputFocused;
|
|
81
146
|
/**
|
|
82
|
-
*
|
|
83
|
-
* @returns {void}
|
|
147
|
+
* State for checking the first page button is available
|
|
84
148
|
*/
|
|
85
|
-
|
|
149
|
+
protected get useFirstButton(): boolean;
|
|
86
150
|
/**
|
|
87
|
-
*
|
|
88
|
-
* @returns {void}
|
|
151
|
+
* State for checking the previous page button is available
|
|
89
152
|
*/
|
|
90
|
-
|
|
153
|
+
protected get usePreviousButton(): boolean;
|
|
91
154
|
/**
|
|
92
|
-
*
|
|
93
|
-
* First and previous should be disabled if showing first page
|
|
94
|
-
* Next and last should be disabled if showing last page
|
|
95
|
-
* @returns {void}
|
|
155
|
+
* State for checking the next page button is available
|
|
96
156
|
*/
|
|
97
|
-
|
|
157
|
+
protected get useNextButton(): boolean;
|
|
98
158
|
/**
|
|
99
|
-
*
|
|
100
|
-
* Total pages should never less than 1
|
|
101
|
-
* @returns {number} Number of total page
|
|
159
|
+
* State for checking the last page button is available
|
|
102
160
|
*/
|
|
103
|
-
|
|
161
|
+
protected get useLastButton(): boolean;
|
|
104
162
|
/**
|
|
105
|
-
*
|
|
106
|
-
* if a new page value is allow then return newPage
|
|
107
|
-
* Condition to be old value is null or NaN or undefined or string or less than 1
|
|
108
|
-
* @param oldPage a old page value
|
|
109
|
-
* @param newPage a new page value
|
|
110
|
-
* @return return a new page value
|
|
163
|
+
* @override
|
|
111
164
|
*/
|
|
112
|
-
|
|
165
|
+
protected updated(changedProperties: PropertyValues): void;
|
|
113
166
|
/**
|
|
114
|
-
*
|
|
115
|
-
* @
|
|
167
|
+
* Validate page value which returns true when value is valid
|
|
168
|
+
* @param value value
|
|
169
|
+
* @param warning show warning message when value is invalid
|
|
170
|
+
* @param propName property name to show in warning message
|
|
171
|
+
* @returns result of validation
|
|
116
172
|
*/
|
|
117
|
-
private
|
|
173
|
+
private validatePage;
|
|
118
174
|
/**
|
|
119
|
-
*
|
|
175
|
+
* Handles action when Enter and Tab key is press onto the input
|
|
176
|
+
* @param event Keyboard event
|
|
120
177
|
* @returns {void}
|
|
121
178
|
*/
|
|
122
|
-
private
|
|
179
|
+
private onInputKeyDown;
|
|
123
180
|
/**
|
|
124
|
-
*
|
|
181
|
+
* Handles action when input focused change
|
|
182
|
+
* @param event focus change event
|
|
125
183
|
* @returns {void}
|
|
126
184
|
*/
|
|
127
|
-
private
|
|
185
|
+
private onInputFocusedChanged;
|
|
128
186
|
/**
|
|
129
|
-
*
|
|
130
|
-
* @param event Event object
|
|
187
|
+
* Update page by using value from the input
|
|
131
188
|
* @returns {void}
|
|
132
189
|
*/
|
|
133
|
-
private
|
|
190
|
+
private updatePageInput;
|
|
134
191
|
/**
|
|
135
|
-
*
|
|
136
|
-
* @
|
|
137
|
-
* @returns {void}
|
|
192
|
+
* Select text in input when update element complete
|
|
193
|
+
* @returns returns a promise void
|
|
138
194
|
*/
|
|
139
|
-
private
|
|
195
|
+
private selectInput;
|
|
140
196
|
/**
|
|
141
197
|
* Updates page value depending on direction
|
|
142
198
|
* @param direction page value direction
|
|
@@ -144,6 +200,11 @@ export declare class Pagination extends BasicElement {
|
|
|
144
200
|
* @returns {void}
|
|
145
201
|
*/
|
|
146
202
|
private updatePage;
|
|
203
|
+
/**
|
|
204
|
+
* Fires event when value change
|
|
205
|
+
* @returns {void}
|
|
206
|
+
*/
|
|
207
|
+
private notifyValueChange;
|
|
147
208
|
/**
|
|
148
209
|
* Go to the next page
|
|
149
210
|
* @returns {void}
|
|
@@ -160,7 +221,7 @@ export declare class Pagination extends BasicElement {
|
|
|
160
221
|
*/
|
|
161
222
|
previous(): void;
|
|
162
223
|
/**
|
|
163
|
-
* Go to the previous page and fires
|
|
224
|
+
* Go to the previous page and fires event
|
|
164
225
|
* @returns {void}
|
|
165
226
|
*/
|
|
166
227
|
private onPreviousTap;
|
|
@@ -184,10 +245,17 @@ export declare class Pagination extends BasicElement {
|
|
|
184
245
|
* @returns {void}
|
|
185
246
|
*/
|
|
186
247
|
private onLastTap;
|
|
248
|
+
/**
|
|
249
|
+
* A `CSSResultGroup` that will be used
|
|
250
|
+
* to style the host, slotted children
|
|
251
|
+
* and the internal template of the element.
|
|
252
|
+
* @return CSS template
|
|
253
|
+
*/
|
|
254
|
+
static get styles(): CSSResultGroup;
|
|
187
255
|
/**
|
|
188
256
|
* A `TemplateResult` that will be used
|
|
189
257
|
* to render the updated internal template.
|
|
190
|
-
* @return
|
|
258
|
+
* @return Render template
|
|
191
259
|
*/
|
|
192
260
|
protected render(): TemplateResult;
|
|
193
261
|
}
|