@refinitiv-ui/elements 5.7.0 → 5.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/lib/autosuggest/custom-elements.json +14 -4
- package/lib/autosuggest/custom-elements.md +21 -14
- package/lib/autosuggest/index.d.ts +4 -0
- package/lib/autosuggest/index.js +4 -0
- package/lib/calendar/custom-elements.json +4 -2
- package/lib/calendar/custom-elements.md +2 -2
- package/lib/calendar/index.d.ts +2 -0
- package/lib/calendar/index.js +2 -0
- package/lib/canvas/custom-elements.json +7 -5
- package/lib/canvas/custom-elements.md +8 -8
- package/lib/canvas/index.d.ts +1 -0
- package/lib/canvas/index.js +1 -0
- package/lib/card/custom-elements.json +3 -1
- package/lib/card/custom-elements.md +5 -5
- package/lib/card/index.d.ts +2 -0
- package/lib/card/index.js +2 -0
- package/lib/chart/custom-elements.json +1 -1
- package/lib/chart/custom-elements.md +4 -4
- package/lib/checkbox/custom-elements.json +8 -4
- package/lib/checkbox/custom-elements.md +2 -2
- package/lib/checkbox/index.d.ts +3 -1
- package/lib/checkbox/index.js +2 -0
- package/lib/clock/custom-elements.json +8 -4
- package/lib/clock/custom-elements.md +9 -9
- package/lib/clock/index.d.ts +2 -0
- package/lib/clock/index.js +2 -0
- 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/color-dialog/custom-elements.json +21 -8
- package/lib/color-dialog/custom-elements.md +22 -22
- package/lib/color-dialog/index.d.ts +8 -8
- package/lib/color-dialog/index.js +8 -8
- package/lib/combo-box/custom-elements.json +19 -10
- package/lib/combo-box/custom-elements.md +20 -20
- package/lib/combo-box/index.d.ts +10 -2
- package/lib/combo-box/index.js +10 -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/custom-elements.json +8 -4
- package/lib/counter/custom-elements.md +4 -4
- package/lib/counter/index.d.ts +2 -0
- package/lib/counter/index.js +2 -0
- package/lib/datetime-picker/custom-elements.json +48 -19
- package/lib/datetime-picker/custom-elements.md +36 -28
- package/lib/datetime-picker/index.d.ts +15 -4
- package/lib/datetime-picker/index.js +15 -4
- package/lib/dialog/custom-elements.json +30 -8
- package/lib/dialog/custom-elements.md +16 -16
- package/lib/dialog/index.d.ts +7 -10
- package/lib/dialog/index.js +7 -10
- package/lib/email-field/custom-elements.json +80 -93
- package/lib/email-field/custom-elements.md +22 -20
- package/lib/email-field/index.d.ts +43 -115
- package/lib/email-field/index.js +44 -244
- package/lib/flag/custom-elements.md +4 -4
- package/lib/flag/index.d.ts +2 -0
- package/lib/flag/index.js +2 -0
- package/lib/icon/custom-elements.md +4 -4
- package/lib/icon/index.d.ts +2 -0
- package/lib/icon/index.js +2 -0
- package/lib/interactive-chart/custom-elements.json +6 -10
- package/lib/interactive-chart/custom-elements.md +6 -7
- package/lib/interactive-chart/index.d.ts +5 -2
- package/lib/interactive-chart/index.js +5 -2
- package/lib/item/custom-elements.json +8 -6
- package/lib/item/custom-elements.md +14 -14
- package/lib/item/index.d.ts +2 -1
- package/lib/item/index.js +2 -1
- package/lib/led-gauge/custom-elements.json +4 -4
- package/lib/led-gauge/custom-elements.md +2 -2
- package/lib/led-gauge/index.d.ts +1 -0
- package/lib/led-gauge/index.js +1 -0
- package/lib/list/custom-elements.json +18 -5
- package/lib/list/custom-elements.md +12 -10
- package/lib/list/helpers/list-renderer.js +2 -0
- package/lib/list/index.d.ts +19 -2
- package/lib/list/index.js +34 -1
- package/lib/multi-input/custom-elements.json +3 -2
- package/lib/multi-input/custom-elements.md +16 -16
- package/lib/multi-input/index.d.ts +4 -0
- package/lib/multi-input/index.js +4 -0
- package/lib/number-field/custom-elements.json +97 -52
- package/lib/number-field/custom-elements.md +27 -22
- package/lib/number-field/index.d.ts +92 -47
- package/lib/number-field/index.js +113 -80
- package/lib/overlay/custom-elements.json +23 -13
- package/lib/overlay/custom-elements.md +29 -29
- package/lib/overlay/elements/overlay.d.ts +5 -0
- package/lib/overlay-menu/custom-elements.json +66 -14
- package/lib/overlay-menu/custom-elements.md +19 -19
- package/lib/overlay-menu/index.d.ts +13 -11
- package/lib/overlay-menu/index.js +13 -11
- package/lib/password-field/custom-elements.json +62 -67
- package/lib/password-field/custom-elements.md +19 -11
- package/lib/password-field/index.d.ts +42 -94
- package/lib/password-field/index.js +48 -194
- package/lib/pill/custom-elements.json +4 -2
- package/lib/pill/custom-elements.md +1 -1
- package/lib/pill/index.d.ts +1 -1
- package/lib/pill/index.js +1 -1
- package/lib/radio-button/custom-elements.json +8 -6
- package/lib/radio-button/custom-elements.md +3 -3
- package/lib/radio-button/index.d.ts +6 -5
- package/lib/radio-button/index.js +5 -4
- package/lib/search-field/custom-elements.json +70 -74
- package/lib/search-field/custom-elements.md +24 -16
- package/lib/search-field/index.d.ts +43 -100
- package/lib/search-field/index.js +46 -215
- package/lib/select/custom-elements.json +3 -2
- package/lib/select/custom-elements.md +10 -10
- package/lib/select/index.d.ts +11 -3
- package/lib/select/index.js +65 -26
- package/lib/sidebar-layout/custom-elements.json +2 -6
- package/lib/sidebar-layout/custom-elements.md +5 -6
- package/lib/sidebar-layout/index.d.ts +2 -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/sparkline/custom-elements.json +4 -4
- package/lib/sparkline/custom-elements.md +2 -2
- package/lib/sparkline/index.d.ts +3 -1
- package/lib/sparkline/index.js +2 -0
- package/lib/swing-gauge/custom-elements.json +5 -3
- package/lib/swing-gauge/custom-elements.md +11 -11
- package/lib/swing-gauge/index.d.ts +3 -1
- package/lib/swing-gauge/index.js +3 -1
- package/lib/text-field/custom-elements.json +76 -87
- package/lib/text-field/custom-elements.md +24 -26
- package/lib/text-field/index.d.ts +50 -92
- package/lib/text-field/index.js +81 -230
- package/lib/time-picker/custom-elements.md +3 -3
- package/lib/time-picker/index.d.ts +3 -0
- package/lib/time-picker/index.js +3 -0
- package/lib/toggle/custom-elements.json +4 -2
- package/lib/toggle/custom-elements.md +1 -1
- package/lib/toggle/index.d.ts +2 -1
- package/lib/toggle/index.js +1 -0
- package/lib/tree/custom-elements.json +2 -1
- package/lib/tree/custom-elements.md +1 -1
- package/lib/tree/elements/tree.d.ts +1 -0
- package/lib/tree/elements/tree.js +1 -0
- 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 +8 -4
- package/lib/tree-select/custom-elements.md +3 -3
- package/lib/tree-select/index.d.ts +5 -3
- package/lib/tree-select/index.js +3 -2
- 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/email-field/index.js
CHANGED
|
@@ -1,283 +1,83 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { ControlElement, css, html } from '@refinitiv-ui/core';
|
|
3
2
|
import { customElement } from '@refinitiv-ui/core/lib/decorators/custom-element.js';
|
|
4
3
|
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 { isIE } from '@refinitiv-ui/utils/lib/browser.js';
|
|
9
4
|
import '../icon/index.js';
|
|
10
|
-
|
|
5
|
+
import { TextField } from '../text-field/index.js';
|
|
11
6
|
/**
|
|
12
|
-
* A form control element for email
|
|
7
|
+
* A form control element for email.
|
|
13
8
|
*
|
|
14
9
|
* @fires value-changed - Dispatched when value changes
|
|
15
10
|
* @fires error-changed - Dispatched when error state changes
|
|
11
|
+
* @fires icon-click - Dispatched when icon is clicked
|
|
16
12
|
*
|
|
17
|
-
* @attr {
|
|
18
|
-
* @prop {
|
|
13
|
+
* @attr {boolean} disabled - Set disabled state
|
|
14
|
+
* @prop {boolean} [disabled=false] - Set disabled state
|
|
15
|
+
*
|
|
16
|
+
* @attr {boolean} error - Set error state
|
|
17
|
+
* @prop {boolean} [error=false] - Set error state
|
|
18
|
+
*
|
|
19
|
+
* @attr {string} icon - Specify icon to display in input. Value can be icon name
|
|
20
|
+
* @prop {string | null} [icon=null] - Specify icon to display in input. Value can be icon name
|
|
21
|
+
*
|
|
22
|
+
* @attr {boolean} icon-has-action - Specify when icon need to be clickable
|
|
23
|
+
* @prop {boolean} [iconHasAction=false] - Specify when icon need to be clickable
|
|
24
|
+
*
|
|
25
|
+
* @attr {number} maxlength - Set character max limit
|
|
26
|
+
* @prop {number | null} [maxLength=null] - Set character max limit
|
|
27
|
+
*
|
|
28
|
+
* @attr {number} minlength - Set character min limit
|
|
29
|
+
* @prop {number | null} [minLength=null] - Set character min limit
|
|
30
|
+
*
|
|
31
|
+
* @prop {string} [pattern=""] - Set regular expression for input validation
|
|
32
|
+
*
|
|
33
|
+
* @attr {string} placeholder - Set placeholder text
|
|
34
|
+
* @prop {string} [placeholder=""] - Set placeholder text
|
|
19
35
|
*
|
|
20
36
|
* @attr {boolean} readonly - Set readonly state
|
|
21
37
|
* @prop {boolean} [readonly=false] - Set readonly state
|
|
22
38
|
*
|
|
23
|
-
* @attr {boolean}
|
|
24
|
-
* @prop {boolean} [
|
|
39
|
+
* @attr {boolean} transparent - Disables all other states and border/background styles.
|
|
40
|
+
* @prop {boolean} [transparent=false] - Disables all other states and border/background styles.
|
|
41
|
+
*
|
|
42
|
+
* @attr {boolean} warning - Set warning state
|
|
43
|
+
* @prop {boolean} [warning=false] - Set warning state
|
|
44
|
+
*
|
|
45
|
+
* @attr {string} value - Input's value
|
|
46
|
+
* @prop {string} [value=""] - Input's value
|
|
25
47
|
*/
|
|
26
|
-
let EmailField = class EmailField extends
|
|
48
|
+
let EmailField = class EmailField extends TextField {
|
|
27
49
|
constructor() {
|
|
28
50
|
super(...arguments);
|
|
29
|
-
/**
|
|
30
|
-
* Set regular expression for input validation
|
|
31
|
-
*/
|
|
32
|
-
this.pattern = '';
|
|
33
|
-
/**
|
|
34
|
-
* Set placeholder text
|
|
35
|
-
*/
|
|
36
|
-
this.placeholder = '';
|
|
37
|
-
/**
|
|
38
|
-
* Set state to error
|
|
39
|
-
*/
|
|
40
|
-
this.error = false;
|
|
41
|
-
/**
|
|
42
|
-
* Set state to warning
|
|
43
|
-
*/
|
|
44
|
-
this.warning = false;
|
|
45
|
-
/**
|
|
46
|
-
* Disables all other states and border/background styles.
|
|
47
|
-
* Use with advanced composite elements requiring e.g. multi selection in
|
|
48
|
-
* combo-box when parent container handles element states.
|
|
49
|
-
*/
|
|
50
|
-
this.transparent = false;
|
|
51
|
-
/**
|
|
52
|
-
* Set character max limit
|
|
53
|
-
*/
|
|
54
|
-
this.maxLength = null;
|
|
55
|
-
/**
|
|
56
|
-
* Set character min limit
|
|
57
|
-
*/
|
|
58
|
-
this.minLength = null;
|
|
59
51
|
/**
|
|
60
52
|
* Set to multiple mode, allows multiple emails in a single input
|
|
61
53
|
*/
|
|
62
54
|
this.multiple = false;
|
|
63
|
-
/**
|
|
64
|
-
* Specify icon to display in input. Value can be icon name
|
|
65
|
-
*/
|
|
66
|
-
this.icon = '';
|
|
67
|
-
/**
|
|
68
|
-
* Specify when icon need to be clickable
|
|
69
|
-
*/
|
|
70
|
-
this.iconHasAction = false;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Element version number
|
|
74
|
-
* @returns version number
|
|
75
|
-
*/
|
|
76
|
-
static get version() {
|
|
77
|
-
return VERSION;
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* A `CSSResultGroup` that will be used
|
|
81
|
-
* to style the host, slotted children
|
|
82
|
-
* and the internal template of the element.
|
|
83
|
-
* @return CSS template
|
|
84
|
-
*/
|
|
85
|
-
static get styles() {
|
|
86
|
-
return css `
|
|
87
|
-
:host {
|
|
88
|
-
display: inline-block;
|
|
89
|
-
}
|
|
90
|
-
:host(:focus), :host input:focus {
|
|
91
|
-
outline: none;
|
|
92
|
-
}
|
|
93
|
-
[part=input] {
|
|
94
|
-
font: inherit;
|
|
95
|
-
background: none;
|
|
96
|
-
color: currentColor;
|
|
97
|
-
border: none;
|
|
98
|
-
text-align: inherit;
|
|
99
|
-
}
|
|
100
|
-
:host [part=icon]{
|
|
101
|
-
display: flex;
|
|
102
|
-
outline: none;
|
|
103
|
-
}
|
|
104
|
-
:host([transparent]) {
|
|
105
|
-
background: none !important;
|
|
106
|
-
border: none !important;
|
|
107
|
-
}
|
|
108
|
-
:host([icon][icon-has-action]) [part=icon] {
|
|
109
|
-
cursor: pointer;
|
|
110
|
-
}
|
|
111
|
-
`;
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Select the contents of input
|
|
115
|
-
* @returns {void}
|
|
116
|
-
*/
|
|
117
|
-
/* istanbul ignore next */
|
|
118
|
-
select() {
|
|
119
|
-
if (!this.disabled && !this.readonly) {
|
|
120
|
-
this.inputElement.select();
|
|
121
|
-
}
|
|
122
55
|
}
|
|
123
56
|
/**
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
57
|
+
* Decorate `<input>` element with common properties extended from text-field:
|
|
58
|
+
* type="email" - always `email`
|
|
59
|
+
* multiple - defined if supports multiple emails
|
|
60
|
+
* @returns template map
|
|
127
61
|
*/
|
|
128
|
-
|
|
129
|
-
super.
|
|
130
|
-
if (this.inputElement.value !== this.value) {
|
|
131
|
-
this.inputElement.value = this.value;
|
|
132
|
-
}
|
|
133
|
-
if (this.shouldValidateInput(changedProperties)) {
|
|
134
|
-
this.validateInput();
|
|
135
|
-
}
|
|
62
|
+
get decorateInputMap() {
|
|
63
|
+
return Object.assign(Object.assign({}, super.decorateInputMap), { 'type': 'email', 'inputmode': 'email', 'multiple': this.multiple });
|
|
136
64
|
}
|
|
137
65
|
/**
|
|
138
66
|
* Check if input should be re-validated
|
|
139
67
|
* @param changedProperties Properties that has changed
|
|
140
68
|
* @returns True if input should be re-validated
|
|
141
69
|
*/
|
|
70
|
+
/* istanbul ignore next */
|
|
142
71
|
shouldValidateInput(changedProperties) {
|
|
72
|
+
// TODO: This validation should be refactored
|
|
143
73
|
return changedProperties.has('value')
|
|
144
|
-
|| changedProperties.has('
|
|
145
|
-
||
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Check if value is changed and fire event
|
|
149
|
-
* @returns {void}
|
|
150
|
-
*/
|
|
151
|
-
onPossibleValueChange() {
|
|
152
|
-
const value = this.inputElement.value;
|
|
153
|
-
this.setValueAndNotify(value);
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* Validate input according `pattern`, `minLength` and `maxLength` properties
|
|
157
|
-
* change state of `error` property according pattern validation
|
|
158
|
-
* @returns {void}
|
|
159
|
-
*/
|
|
160
|
-
validateInput() {
|
|
161
|
-
let error = !this.inputElement.checkValidity();
|
|
162
|
-
if (this.shouldValidateForMinLength(error)) {
|
|
163
|
-
error = !!this.minLength && (this.minLength > this.value.length);
|
|
164
|
-
}
|
|
165
|
-
if (this.error !== error) {
|
|
166
|
-
this.error = error;
|
|
167
|
-
this.notifyPropertyChange('error', this.error);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* @param error existing state of error
|
|
172
|
-
* @returns true if there is no error and browser is IE11 and minLength more than 0 and value exists
|
|
173
|
-
*/
|
|
174
|
-
shouldValidateForMinLength(error) {
|
|
175
|
-
return !!(!error && isIE && this.minLength && !!this.value);
|
|
176
|
-
}
|
|
177
|
-
/**
|
|
178
|
-
* Detect `enter` and `space` keydown and fire
|
|
179
|
-
* @param event keydown event
|
|
180
|
-
* @returns {void}
|
|
181
|
-
*/
|
|
182
|
-
handleKeyDown(event) {
|
|
183
|
-
if (event.key === 'Spacebar' || event.key === ' ' || event.key === 'Enter') {
|
|
184
|
-
this.notifyIcon();
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* Process internal icon click and fire `icon-click` event
|
|
189
|
-
* @returns {void}
|
|
190
|
-
*/
|
|
191
|
-
iconClick() {
|
|
192
|
-
this.notifyIcon();
|
|
193
|
-
}
|
|
194
|
-
/**
|
|
195
|
-
* Fire event on `icon` click
|
|
196
|
-
* @returns {void}
|
|
197
|
-
*/
|
|
198
|
-
notifyIcon() {
|
|
199
|
-
if (this.iconHasAction) {
|
|
200
|
-
/**
|
|
201
|
-
* Dispatched only when element has icon-has-action attribute and icon is clicked
|
|
202
|
-
*/
|
|
203
|
-
this.dispatchEvent(new CustomEvent('icon-click', { bubbles: false }));
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
* Renders icon element if property present
|
|
208
|
-
* @returns {TemplateResult | null} Template result
|
|
209
|
-
*/
|
|
210
|
-
renderIcon() {
|
|
211
|
-
return this.icon ? html `
|
|
212
|
-
<ef-icon
|
|
213
|
-
part="icon"
|
|
214
|
-
icon="${this.icon}"
|
|
215
|
-
?readonly="${this.readonly}"
|
|
216
|
-
?disabled="${this.disabled}"
|
|
217
|
-
@tap="${this.iconClick}"
|
|
218
|
-
@keydown="${this.handleKeyDown}"
|
|
219
|
-
tabindex="${ifDefined(this.iconHasAction ? '0' : undefined)}"
|
|
220
|
-
></ef-icon>
|
|
221
|
-
` : null;
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* A `TemplateResult` that will be used
|
|
225
|
-
* to render the updated internal template.
|
|
226
|
-
* @return {TemplateResult} Render template
|
|
227
|
-
*/
|
|
228
|
-
render() {
|
|
229
|
-
return html `
|
|
230
|
-
<input
|
|
231
|
-
type="email"
|
|
232
|
-
part="input"
|
|
233
|
-
?readonly="${this.readonly}"
|
|
234
|
-
?disabled="${this.disabled}"
|
|
235
|
-
placeholder="${ifDefined(this.placeholder || undefined)}"
|
|
236
|
-
maxlength="${ifDefined(this.maxLength || undefined)}"
|
|
237
|
-
minlength="${ifDefined(this.minLength || undefined)}"
|
|
238
|
-
@input="${this.onPossibleValueChange}"
|
|
239
|
-
@change="${this.onPossibleValueChange}"
|
|
240
|
-
pattern="${ifDefined(this.pattern || undefined)}"
|
|
241
|
-
?multiple="${this.multiple}"
|
|
242
|
-
autocomplete="off"
|
|
243
|
-
/>
|
|
244
|
-
${this.renderIcon()}
|
|
245
|
-
`;
|
|
74
|
+
|| changedProperties.has('multiple')
|
|
75
|
+
|| super.shouldValidateInput(changedProperties);
|
|
246
76
|
}
|
|
247
77
|
};
|
|
248
|
-
__decorate([
|
|
249
|
-
property({ type: String, hasChanged })
|
|
250
|
-
], EmailField.prototype, "pattern", void 0);
|
|
251
|
-
__decorate([
|
|
252
|
-
property({ type: String })
|
|
253
|
-
], EmailField.prototype, "placeholder", void 0);
|
|
254
|
-
__decorate([
|
|
255
|
-
property({ type: Boolean, reflect: true })
|
|
256
|
-
], EmailField.prototype, "error", void 0);
|
|
257
|
-
__decorate([
|
|
258
|
-
property({ type: Boolean, reflect: true })
|
|
259
|
-
], EmailField.prototype, "warning", void 0);
|
|
260
|
-
__decorate([
|
|
261
|
-
property({ type: Boolean, reflect: true })
|
|
262
|
-
], EmailField.prototype, "transparent", void 0);
|
|
263
|
-
__decorate([
|
|
264
|
-
property({ type: Number, attribute: 'maxlength', reflect: true })
|
|
265
|
-
], EmailField.prototype, "maxLength", void 0);
|
|
266
|
-
__decorate([
|
|
267
|
-
property({ type: Number, attribute: 'minlength', reflect: true })
|
|
268
|
-
], EmailField.prototype, "minLength", void 0);
|
|
269
78
|
__decorate([
|
|
270
79
|
property({ type: Boolean, reflect: true })
|
|
271
80
|
], EmailField.prototype, "multiple", void 0);
|
|
272
|
-
__decorate([
|
|
273
|
-
property({ type: String, reflect: true })
|
|
274
|
-
], EmailField.prototype, "icon", void 0);
|
|
275
|
-
__decorate([
|
|
276
|
-
property({ type: Boolean, reflect: true, attribute: 'icon-has-action' })
|
|
277
|
-
], EmailField.prototype, "iconHasAction", void 0);
|
|
278
|
-
__decorate([
|
|
279
|
-
query('[part="input"]', true)
|
|
280
|
-
], EmailField.prototype, "inputElement", void 0);
|
|
281
81
|
EmailField = __decorate([
|
|
282
82
|
customElement('ef-email-field', {
|
|
283
83
|
alias: 'coral-email-field'
|
|
@@ -4,7 +4,7 @@ Provides a collection of flags.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
| Property | Attribute | Type | Description |
|
|
8
|
-
|
|
9
|
-
| `flag` | `flag` | `string \| null` | Name of a known flag to render. |
|
|
10
|
-
| `src` | `src` | `string \| null` | Src location of an svg flag. |
|
|
7
|
+
| Property | Attribute | Type | Default | Description |
|
|
8
|
+
|----------|-----------|------------------|---------|---------------------------------|
|
|
9
|
+
| `flag` | `flag` | `string \| null` | null | Name of a known flag to render. |
|
|
10
|
+
| `src` | `src` | `string \| null` | null | Src location of an svg flag. |
|
package/lib/flag/index.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export declare class Flag extends BasicElement {
|
|
|
25
25
|
/**
|
|
26
26
|
* Name of a known flag to render.
|
|
27
27
|
* @example gb
|
|
28
|
+
* @default null
|
|
28
29
|
*/
|
|
29
30
|
get flag(): string | null;
|
|
30
31
|
set flag(value: string | null);
|
|
@@ -32,6 +33,7 @@ export declare class Flag extends BasicElement {
|
|
|
32
33
|
/**
|
|
33
34
|
* Src location of an svg flag.
|
|
34
35
|
* @example https://cdn.io/flags/gb.svg
|
|
36
|
+
* @default null
|
|
35
37
|
*/
|
|
36
38
|
get src(): string | null;
|
|
37
39
|
set src(value: string | null);
|
package/lib/flag/index.js
CHANGED
|
@@ -53,6 +53,7 @@ let Flag = class Flag extends BasicElement {
|
|
|
53
53
|
/**
|
|
54
54
|
* Name of a known flag to render.
|
|
55
55
|
* @example gb
|
|
56
|
+
* @default null
|
|
56
57
|
*/
|
|
57
58
|
get flag() {
|
|
58
59
|
return this._flag;
|
|
@@ -66,6 +67,7 @@ let Flag = class Flag extends BasicElement {
|
|
|
66
67
|
/**
|
|
67
68
|
* Src location of an svg flag.
|
|
68
69
|
* @example https://cdn.io/flags/gb.svg
|
|
70
|
+
* @default null
|
|
69
71
|
*/
|
|
70
72
|
get src() {
|
|
71
73
|
return this._src;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Properties
|
|
4
4
|
|
|
5
|
-
| Property | Attribute | Type | Description |
|
|
6
|
-
|
|
7
|
-
| `icon` | `icon` | `string \| null` | Name of a known icon to render or URL of SVG icon. |
|
|
8
|
-
| `src` | `src` | `string \| null` | Src location of an svg icon. |
|
|
5
|
+
| Property | Attribute | Type | Default | Description |
|
|
6
|
+
|----------|-----------|------------------|---------|--------------------------------------------------|
|
|
7
|
+
| `icon` | `icon` | `string \| null` | null | Name of a known icon to render or URL of SVG icon. |
|
|
8
|
+
| `src` | `src` | `string \| null` | null | Src location of an svg icon. |
|
package/lib/icon/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export declare class Icon extends BasicElement {
|
|
|
18
18
|
/**
|
|
19
19
|
* Name of a known icon to render or URL of SVG icon.
|
|
20
20
|
* @example heart | https://cdn.io/icons/heart.svg
|
|
21
|
+
* @default null
|
|
21
22
|
*/
|
|
22
23
|
get icon(): string | null;
|
|
23
24
|
set icon(value: string | null);
|
|
@@ -26,6 +27,7 @@ export declare class Icon extends BasicElement {
|
|
|
26
27
|
* Src location of an svg icon.
|
|
27
28
|
* @example https://cdn.io/icons/heart.svg
|
|
28
29
|
* @deprecated Use `icon` instead
|
|
30
|
+
* @default null
|
|
29
31
|
*/
|
|
30
32
|
get src(): string | null;
|
|
31
33
|
set src(value: string | null);
|
package/lib/icon/index.js
CHANGED
|
@@ -50,6 +50,7 @@ let Icon = class Icon extends BasicElement {
|
|
|
50
50
|
/**
|
|
51
51
|
* Name of a known icon to render or URL of SVG icon.
|
|
52
52
|
* @example heart | https://cdn.io/icons/heart.svg
|
|
53
|
+
* @default null
|
|
53
54
|
*/
|
|
54
55
|
get icon() {
|
|
55
56
|
return this._icon;
|
|
@@ -66,6 +67,7 @@ let Icon = class Icon extends BasicElement {
|
|
|
66
67
|
* Src location of an svg icon.
|
|
67
68
|
* @example https://cdn.io/icons/heart.svg
|
|
68
69
|
* @deprecated Use `icon` instead
|
|
70
|
+
* @default null
|
|
69
71
|
*/
|
|
70
72
|
get src() {
|
|
71
73
|
return this._src;
|
|
@@ -24,8 +24,9 @@
|
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"name": "legend-style",
|
|
27
|
-
"description": "Set legend style i.e. `horizontal`, `vertical
|
|
28
|
-
"type": "\"vertical\" | \"horizontal\""
|
|
27
|
+
"description": "Set legend style i.e. `horizontal`, `vertical`.",
|
|
28
|
+
"type": "\"vertical\" | \"horizontal\"",
|
|
29
|
+
"default": "\"vertical\""
|
|
29
30
|
}
|
|
30
31
|
],
|
|
31
32
|
"properties": [
|
|
@@ -52,14 +53,9 @@
|
|
|
52
53
|
{
|
|
53
54
|
"name": "legendStyle",
|
|
54
55
|
"attribute": "legend-style",
|
|
55
|
-
"description": "Set legend style i.e. `horizontal`, `vertical
|
|
56
|
-
"type": "\"vertical\" | \"horizontal\""
|
|
57
|
-
|
|
58
|
-
{
|
|
59
|
-
"name": "seriesList",
|
|
60
|
-
"description": "Array of series instances in chart",
|
|
61
|
-
"type": "object",
|
|
62
|
-
"default": "[]"
|
|
56
|
+
"description": "Set legend style i.e. `horizontal`, `vertical`.",
|
|
57
|
+
"type": "\"vertical\" | \"horizontal\"",
|
|
58
|
+
"default": "\"vertical\""
|
|
63
59
|
}
|
|
64
60
|
],
|
|
65
61
|
"events": [
|
|
@@ -5,13 +5,12 @@ By lightweight-charts library.
|
|
|
5
5
|
|
|
6
6
|
## Properties
|
|
7
7
|
|
|
8
|
-
| Property | Attribute | Type | Default
|
|
9
|
-
|
|
10
|
-
| `config` | `config` | `InteractiveChartConfig` | null
|
|
11
|
-
| `disabledJumpButton` | `disabled-jump-button` | `boolean` | false
|
|
12
|
-
| `disabledLegend` | `disabled-legend` | `boolean` | false
|
|
13
|
-
| `legendStyle` | `legend-style` | `"vertical" \| "horizontal"` |
|
|
14
|
-
| `seriesList` | | `object` | [] | Array of series instances in chart |
|
|
8
|
+
| Property | Attribute | Type | Default | Description |
|
|
9
|
+
|----------------------|------------------------|------------------------------|------------|-------------------------------------------------|
|
|
10
|
+
| `config` | `config` | `InteractiveChartConfig` | null | Chart configurations for init chart |
|
|
11
|
+
| `disabledJumpButton` | `disabled-jump-button` | `boolean` | false | Hide jump to latest data button |
|
|
12
|
+
| `disabledLegend` | `disabled-legend` | `boolean` | false | Hide legend |
|
|
13
|
+
| `legendStyle` | `legend-style` | `"vertical" \| "horizontal"` | "vertical" | Set legend style i.e. `horizontal`, `vertical`. |
|
|
15
14
|
|
|
16
15
|
## Methods
|
|
17
16
|
|
|
@@ -43,9 +43,9 @@ export declare class InteractiveChart extends ResponsiveElement {
|
|
|
43
43
|
deprecatedLegendStyle: LegendStyle | undefined;
|
|
44
44
|
/**
|
|
45
45
|
* Set legend style i.e. `horizontal`, `vertical`.
|
|
46
|
-
* Default is `vertical`.
|
|
47
46
|
* @param {LegendStyle} value legend style value
|
|
48
47
|
* @type {"vertical" | "horizontal"} type of legend style
|
|
48
|
+
* @default vertical
|
|
49
49
|
**/
|
|
50
50
|
set legendStyle(value: LegendStyle);
|
|
51
51
|
get legendStyle(): LegendStyle;
|
|
@@ -54,7 +54,10 @@ export declare class InteractiveChart extends ResponsiveElement {
|
|
|
54
54
|
* when deprecated features are used.
|
|
55
55
|
*/
|
|
56
56
|
private deprecationNotice;
|
|
57
|
-
/**
|
|
57
|
+
/**
|
|
58
|
+
* @ignore
|
|
59
|
+
* Array of series instances in chart
|
|
60
|
+
*/
|
|
58
61
|
seriesList: SeriesList[];
|
|
59
62
|
private jumpButtonInitialized;
|
|
60
63
|
private legendInitialized;
|
|
@@ -39,7 +39,10 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
|
|
|
39
39
|
* when deprecated features are used.
|
|
40
40
|
*/
|
|
41
41
|
this.deprecationNotice = new DeprecationNotice('`legendstyle` attribute and property are deprecated. Use `legend-style` for attribute and `legendStyle` property instead.');
|
|
42
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* @ignore
|
|
44
|
+
* Array of series instances in chart
|
|
45
|
+
*/
|
|
43
46
|
this.seriesList = [];
|
|
44
47
|
this.jumpButtonInitialized = false;
|
|
45
48
|
this.legendInitialized = false;
|
|
@@ -116,9 +119,9 @@ let InteractiveChart = InteractiveChart_1 = class InteractiveChart extends Respo
|
|
|
116
119
|
}
|
|
117
120
|
/**
|
|
118
121
|
* Set legend style i.e. `horizontal`, `vertical`.
|
|
119
|
-
* Default is `vertical`.
|
|
120
122
|
* @param {LegendStyle} value legend style value
|
|
121
123
|
* @type {"vertical" | "horizontal"} type of legend style
|
|
124
|
+
* @default vertical
|
|
122
125
|
**/
|
|
123
126
|
set legendStyle(value) {
|
|
124
127
|
const oldValue = this.legendStyle;
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
{
|
|
24
24
|
"name": "selected",
|
|
25
25
|
"description": "Indicates that the item is selected",
|
|
26
|
-
"type": "boolean"
|
|
26
|
+
"type": "boolean",
|
|
27
|
+
"default": "false"
|
|
27
28
|
},
|
|
28
29
|
{
|
|
29
30
|
"name": "multiple",
|
|
@@ -51,7 +52,7 @@
|
|
|
51
52
|
"name": "value",
|
|
52
53
|
"description": "The content of this attribute represents the value of the item.",
|
|
53
54
|
"type": "string",
|
|
54
|
-
"default": "
|
|
55
|
+
"default": "\"\""
|
|
55
56
|
},
|
|
56
57
|
{
|
|
57
58
|
"name": "disabled",
|
|
@@ -83,7 +84,8 @@
|
|
|
83
84
|
"name": "selected",
|
|
84
85
|
"attribute": "selected",
|
|
85
86
|
"description": "Indicates that the item is selected",
|
|
86
|
-
"type": "boolean"
|
|
87
|
+
"type": "boolean",
|
|
88
|
+
"default": "false"
|
|
87
89
|
},
|
|
88
90
|
{
|
|
89
91
|
"name": "multiple",
|
|
@@ -112,12 +114,12 @@
|
|
|
112
114
|
"type": "string | null"
|
|
113
115
|
},
|
|
114
116
|
{
|
|
115
|
-
"name": "highlightable",
|
|
117
|
+
"name": "highlightable (readonly)",
|
|
116
118
|
"description": "Return true if the item can be highlighted. True if not disabled and type is Text",
|
|
117
119
|
"type": "boolean"
|
|
118
120
|
},
|
|
119
121
|
{
|
|
120
|
-
"name": "isTruncated",
|
|
122
|
+
"name": "isTruncated (readonly)",
|
|
121
123
|
"description": "Getter returning if the label is truncated",
|
|
122
124
|
"type": "boolean"
|
|
123
125
|
},
|
|
@@ -126,7 +128,7 @@
|
|
|
126
128
|
"attribute": "value",
|
|
127
129
|
"description": "The content of this attribute represents the value of the item.",
|
|
128
130
|
"type": "string",
|
|
129
|
-
"default": "
|
|
131
|
+
"default": "\"\""
|
|
130
132
|
},
|
|
131
133
|
{
|
|
132
134
|
"name": "disabled",
|
|
@@ -6,20 +6,20 @@ to create simple menus or navigation panels.
|
|
|
6
6
|
|
|
7
7
|
## Properties
|
|
8
8
|
|
|
9
|
-
| Property
|
|
10
|
-
|
|
11
|
-
| `disabled`
|
|
12
|
-
| `for`
|
|
13
|
-
| `highlightable` | |
|
|
14
|
-
| `highlighted`
|
|
15
|
-
| `icon`
|
|
16
|
-
| `isTruncated` | |
|
|
17
|
-
| `label`
|
|
18
|
-
| `multiple`
|
|
19
|
-
| `selected`
|
|
20
|
-
| `subLabel`
|
|
21
|
-
| `type`
|
|
22
|
-
| `value`
|
|
9
|
+
| Property | Attribute | Type | Default | Description |
|
|
10
|
+
|----------------------------|---------------|--------------------|---------|--------------------------------------------------|
|
|
11
|
+
| `disabled` | `disabled` | `boolean` | false | Set disabled state. |
|
|
12
|
+
| `for` | `for` | `string \| null` | null | Specifies which element an item is bound to |
|
|
13
|
+
| `highlightable (readonly)` | | `boolean` | | Return true if the item can be highlighted. True if not disabled and type is Text |
|
|
14
|
+
| `highlighted` | `highlighted` | `boolean` | false | Highlight the item |
|
|
15
|
+
| `icon` | `icon` | `string \| null` | null | Set the icon name from the ef-icon list |
|
|
16
|
+
| `isTruncated (readonly)` | | `boolean` | | Getter returning if the label is truncated |
|
|
17
|
+
| `label` | `label` | `string \| null` | null | The text for the label indicating the meaning of the item.<br />By having both `label` and content, `label` always takes priority |
|
|
18
|
+
| `multiple` | `multiple` | `boolean` | false | Is the item part of a multiple selection |
|
|
19
|
+
| `selected` | `selected` | `boolean` | false | Indicates that the item is selected |
|
|
20
|
+
| `subLabel` | `sub-label` | `string \| null` | null | The`subLabel` property represents the text beneath the label. |
|
|
21
|
+
| `type` | `type` | `ItemType \| null` | null | If defined value can be `text`, `header` or `divider` |
|
|
22
|
+
| `value` | `value` | `string` | "" | The content of this attribute represents the value of the item. |
|
|
23
23
|
|
|
24
24
|
## Slots
|
|
25
25
|
|
package/lib/item/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export * from './helpers/types';
|
|
|
10
10
|
* to create simple menus or navigation panels.
|
|
11
11
|
*
|
|
12
12
|
* @attr {string} value - The content of this attribute represents the value of the item.
|
|
13
|
-
* @prop {string} [value=] - The content of this attribute represents the value of the item.
|
|
13
|
+
* @prop {string} [value=""] - The content of this attribute represents the value of the item.
|
|
14
14
|
*
|
|
15
15
|
* @attr {boolean} disabled - Set disabled state.
|
|
16
16
|
* @prop {boolean} [disabled=false] - Set disabled state.
|
|
@@ -48,6 +48,7 @@ export declare class Item extends ControlElement {
|
|
|
48
48
|
/**
|
|
49
49
|
* Indicates that the item is selected
|
|
50
50
|
* @param value selected value
|
|
51
|
+
* @default false
|
|
51
52
|
*/
|
|
52
53
|
set selected(value: boolean);
|
|
53
54
|
get selected(): boolean;
|
package/lib/item/index.js
CHANGED
|
@@ -18,7 +18,7 @@ const isAllWhitespaceTextNode = (node) => {
|
|
|
18
18
|
* to create simple menus or navigation panels.
|
|
19
19
|
*
|
|
20
20
|
* @attr {string} value - The content of this attribute represents the value of the item.
|
|
21
|
-
* @prop {string} [value=] - The content of this attribute represents the value of the item.
|
|
21
|
+
* @prop {string} [value=""] - The content of this attribute represents the value of the item.
|
|
22
22
|
*
|
|
23
23
|
* @attr {boolean} disabled - Set disabled state.
|
|
24
24
|
* @prop {boolean} [disabled=false] - Set disabled state.
|
|
@@ -117,6 +117,7 @@ let Item = class Item extends ControlElement {
|
|
|
117
117
|
/**
|
|
118
118
|
* Indicates that the item is selected
|
|
119
119
|
* @param value selected value
|
|
120
|
+
* @default false
|
|
120
121
|
*/
|
|
121
122
|
set selected(value) {
|
|
122
123
|
const oldValue = this._selected;
|