@refinitiv-ui/elements 6.8.8 → 6.8.10
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 +181 -440
- package/LICENSE +1 -1
- package/README.md +12 -10
- package/lib/accordion/index.d.ts +1 -1
- package/lib/accordion/index.js +4 -7
- package/lib/appstate-bar/index.d.ts +2 -2
- package/lib/appstate-bar/index.js +10 -4
- package/lib/autosuggest/index.d.ts +7 -7
- package/lib/autosuggest/index.js +85 -80
- package/lib/autosuggest/themes/solar/charcoal/index.js +1 -1
- package/lib/autosuggest/themes/solar/pearl/index.js +1 -1
- package/lib/button/index.js +7 -10
- package/lib/button-bar/index.d.ts +1 -1
- package/lib/button-bar/index.js +12 -12
- package/lib/calendar/index.d.ts +39 -39
- package/lib/calendar/index.js +160 -125
- package/lib/calendar/utils.js +2 -2
- package/lib/canvas/index.d.ts +1 -1
- package/lib/canvas/index.js +2 -4
- package/lib/card/helpers/types.d.ts +2 -2
- package/lib/card/index.d.ts +5 -5
- package/lib/card/index.js +34 -28
- package/lib/chart/helpers/legend.js +10 -8
- package/lib/chart/index.d.ts +3 -3
- package/lib/chart/index.js +17 -17
- package/lib/chart/plugins/doughnut-center-label.js +6 -5
- package/lib/checkbox/index.d.ts +1 -1
- package/lib/checkbox/index.js +12 -13
- package/lib/clock/index.d.ts +55 -55
- package/lib/clock/index.js +84 -95
- 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/collapse/index.d.ts +1 -1
- package/lib/collapse/index.js +28 -19
- package/lib/collapse/themes/halo/dark/index.js +1 -1
- package/lib/collapse/themes/halo/light/index.js +1 -1
- package/lib/color-dialog/elements/color-palettes.d.ts +1 -1
- package/lib/color-dialog/elements/color-palettes.js +5 -6
- package/lib/color-dialog/elements/grayscale-palettes.d.ts +1 -1
- package/lib/color-dialog/elements/grayscale-palettes.js +9 -9
- package/lib/color-dialog/elements/palettes.js +5 -4
- package/lib/color-dialog/helpers/value-model.js +7 -9
- package/lib/color-dialog/index.d.ts +6 -6
- package/lib/color-dialog/index.js +53 -37
- package/lib/color-picker/index.d.ts +2 -2
- package/lib/color-picker/index.js +40 -34
- package/lib/combo-box/helpers/filter.d.ts +2 -2
- package/lib/combo-box/helpers/types.d.ts +1 -1
- package/lib/combo-box/index.d.ts +9 -9
- package/lib/combo-box/index.js +61 -55
- package/lib/configuration/elements/configuration.js +2 -2
- package/lib/counter/index.d.ts +4 -4
- package/lib/counter/index.js +9 -7
- package/lib/datetime-field/index.d.ts +4 -5
- package/lib/datetime-field/index.js +32 -23
- package/lib/datetime-field/utils.js +11 -1
- package/lib/datetime-picker/index.d.ts +75 -75
- package/lib/datetime-picker/index.js +151 -132
- package/lib/datetime-picker/locales.js +5 -5
- package/lib/datetime-picker/utils.js +9 -9
- package/lib/dialog/draggable-element.js +1 -2
- package/lib/dialog/index.d.ts +6 -6
- package/lib/dialog/index.js +48 -38
- package/lib/email-field/index.d.ts +1 -1
- package/lib/email-field/index.js +6 -6
- package/lib/events.d.ts +1 -1
- package/lib/flag/index.d.ts +1 -1
- package/lib/flag/index.js +6 -5
- package/lib/flag/utils/FlagLoader.js +1 -1
- package/lib/header/index.d.ts +1 -1
- package/lib/header/index.js +2 -2
- package/lib/header/themes/halo/dark/index.js +1 -1
- package/lib/header/themes/halo/light/index.js +1 -1
- package/lib/header/themes/solar/charcoal/index.js +1 -1
- package/lib/header/themes/solar/pearl/index.js +1 -1
- package/lib/heatmap/helpers/color.d.ts +1 -1
- package/lib/heatmap/helpers/color.js +11 -5
- package/lib/heatmap/helpers/track.js +3 -3
- package/lib/heatmap/index.d.ts +9 -9
- package/lib/heatmap/index.js +51 -42
- package/lib/icon/index.d.ts +2 -2
- package/lib/icon/index.js +6 -8
- package/lib/icon/utils/IconLoader.d.ts +1 -0
- package/lib/icon/utils/IconLoader.js +9 -1
- package/lib/interactive-chart/helpers/types.d.ts +3 -3
- package/lib/interactive-chart/index.d.ts +34 -34
- package/lib/interactive-chart/index.js +72 -57
- package/lib/item/helpers/types.d.ts +1 -1
- package/lib/item/index.d.ts +3 -3
- package/lib/item/index.js +24 -20
- package/lib/jsx.d.ts +6 -4
- package/lib/label/index.d.ts +1 -1
- package/lib/label/index.js +11 -8
- package/lib/layout/index.d.ts +7 -7
- package/lib/layout/index.js +7 -7
- package/lib/led-gauge/index.d.ts +1 -1
- package/lib/led-gauge/index.js +10 -10
- package/lib/list/elements/list.d.ts +3 -3
- package/lib/list/elements/list.js +10 -12
- package/lib/list/helpers/renderer.js +2 -2
- package/lib/list/helpers/types.d.ts +1 -1
- package/lib/list/index.d.ts +1 -1
- package/lib/list/renderer.d.ts +7 -7
- package/lib/loader/index.js +7 -8
- package/lib/multi-input/index.d.ts +6 -6
- package/lib/multi-input/index.js +39 -45
- package/lib/notification/elements/notification-tray.d.ts +2 -2
- package/lib/notification/elements/notification-tray.js +3 -3
- package/lib/notification/elements/notification.d.ts +2 -2
- package/lib/notification/elements/notification.js +17 -14
- package/lib/notification/helpers/status.js +1 -1
- package/lib/notification/themes/halo/dark/index.js +1 -1
- package/lib/notification/themes/halo/light/index.js +1 -1
- package/lib/notification/themes/solar/charcoal/index.js +1 -1
- package/lib/notification/themes/solar/pearl/index.js +1 -1
- package/lib/number-field/index.d.ts +5 -6
- package/lib/number-field/index.js +37 -47
- package/lib/overlay/elements/overlay-viewport.d.ts +1 -1
- package/lib/overlay/elements/overlay.d.ts +2 -2
- package/lib/overlay/elements/overlay.js +154 -98
- package/lib/overlay/helpers/types.d.ts +1 -1
- package/lib/overlay/managers/backdrop-manager.d.ts +1 -1
- package/lib/overlay/managers/backdrop-manager.js +2 -2
- package/lib/overlay/managers/close-manager.js +2 -1
- package/lib/overlay/managers/focus-manager.js +23 -13
- package/lib/overlay/managers/interaction-lock-manager.d.ts +4 -4
- package/lib/overlay/managers/interaction-lock-manager.js +33 -25
- package/lib/overlay/managers/viewport-manager.d.ts +2 -2
- package/lib/overlay/managers/viewport-manager.js +3 -2
- package/lib/overlay/managers/zindex-manager.js +4 -2
- package/lib/overlay-menu/helpers/types.d.ts +2 -2
- package/lib/overlay-menu/index.d.ts +1 -1
- package/lib/overlay-menu/index.js +44 -33
- package/lib/overlay-menu/managers/menu-manager.d.ts +10 -10
- package/lib/overlay-menu/managers/menu-manager.js +15 -13
- package/lib/pagination/index.d.ts +4 -4
- package/lib/pagination/index.js +39 -14
- package/lib/panel/index.js +1 -1
- package/lib/password-field/index.d.ts +2 -2
- package/lib/password-field/index.js +4 -4
- package/lib/pill/index.d.ts +1 -1
- package/lib/pill/index.js +22 -19
- package/lib/progress-bar/index.d.ts +1 -1
- package/lib/progress-bar/index.js +38 -37
- package/lib/radio-button/index.d.ts +2 -2
- package/lib/radio-button/index.js +17 -12
- package/lib/radio-button/radio-button-registry.js +8 -5
- package/lib/rating/index.d.ts +1 -1
- package/lib/rating/index.js +2 -5
- package/lib/rating/utils.d.ts +6 -6
- package/lib/rating/utils.js +6 -6
- package/lib/search-field/index.d.ts +2 -2
- package/lib/search-field/index.js +4 -4
- package/lib/select/index.d.ts +34 -34
- package/lib/select/index.js +69 -82
- package/lib/sidebar-layout/index.d.ts +2 -2
- package/lib/sidebar-layout/index.js +7 -9
- package/lib/slider/index.d.ts +2 -2
- package/lib/slider/index.js +57 -45
- package/lib/slider/utils.d.ts +10 -10
- package/lib/slider/utils.js +10 -10
- package/lib/sparkline/index.d.ts +1 -1
- package/lib/sparkline/index.js +7 -8
- package/lib/swing-gauge/helpers.js +2 -2
- package/lib/swing-gauge/index.d.ts +19 -19
- package/lib/swing-gauge/index.js +91 -81
- package/lib/tab/index.d.ts +1 -1
- package/lib/tab/index.js +16 -27
- package/lib/tab/themes/halo/dark/index.js +1 -1
- package/lib/tab/themes/halo/light/index.js +1 -1
- package/lib/tab/themes/solar/charcoal/index.js +1 -1
- package/lib/tab/themes/solar/pearl/index.js +1 -1
- package/lib/tab-bar/helpers/animate.js +1 -1
- package/lib/tab-bar/index.d.ts +1 -1
- package/lib/tab-bar/index.js +34 -18
- package/lib/tab-bar/themes/halo/dark/index.js +1 -1
- package/lib/tab-bar/themes/halo/light/index.js +1 -1
- package/lib/text-field/index.d.ts +1 -1
- package/lib/text-field/index.js +36 -33
- package/lib/time-picker/index.d.ts +6 -6
- package/lib/time-picker/index.js +104 -90
- package/lib/toggle/index.d.ts +1 -1
- package/lib/toggle/index.js +4 -3
- 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/tooltip/elements/title-tooltip.js +2 -2
- package/lib/tooltip/index.d.ts +27 -27
- package/lib/tooltip/index.js +42 -38
- package/lib/tooltip/managers/tooltip-manager.d.ts +1 -1
- package/lib/tornado-chart/elements/tornado-chart.d.ts +1 -1
- package/lib/tornado-chart/elements/tornado-chart.js +1 -1
- package/lib/tornado-chart/elements/tornado-item.d.ts +2 -2
- package/lib/tornado-chart/elements/tornado-item.js +12 -10
- package/lib/tree/elements/tree-item.d.ts +3 -3
- package/lib/tree/elements/tree-item.js +21 -19
- package/lib/tree/elements/tree.d.ts +1 -1
- package/lib/tree/elements/tree.js +12 -11
- package/lib/tree/helpers/renderer.js +4 -3
- package/lib/tree/index.d.ts +1 -1
- package/lib/tree/managers/tree-manager.d.ts +1 -1
- package/lib/tree/managers/tree-manager.js +17 -18
- package/lib/tree/themes/solar/charcoal/index.js +1 -1
- package/lib/tree/themes/solar/pearl/index.js +1 -1
- package/lib/tree-select/index.d.ts +9 -9
- package/lib/tree-select/index.js +91 -82
- 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 +17 -17
- package/tsconfig.tsbuildinfo +1 -1
package/lib/button-bar/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
var ButtonBar_1;
|
|
2
2
|
import { __decorate } from "tslib";
|
|
3
|
-
import { BasicElement,
|
|
3
|
+
import { BasicElement, css, html } from '@refinitiv-ui/core';
|
|
4
4
|
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
|
|
5
5
|
import { property } from '@refinitiv-ui/core/decorators/property.js';
|
|
6
|
-
import {
|
|
7
|
-
import { VERSION } from '../version.js';
|
|
6
|
+
import { createRef, ref } from '@refinitiv-ui/core/directives/ref.js';
|
|
8
7
|
import { Button } from '../button/index.js';
|
|
8
|
+
import { VERSION } from '../version.js';
|
|
9
9
|
/**
|
|
10
10
|
* Used to display multiple buttons to create a list of commands bar.
|
|
11
11
|
*/
|
|
@@ -65,7 +65,7 @@ let ButtonBar = ButtonBar_1 = class ButtonBar extends BasicElement {
|
|
|
65
65
|
:host ::slotted(ef-button:not(:hover):not(:focus)) {
|
|
66
66
|
box-shadow: none;
|
|
67
67
|
}
|
|
68
|
-
@media (pointer: coarse){
|
|
68
|
+
@media (pointer: coarse) {
|
|
69
69
|
:host ::slotted(ef-button) {
|
|
70
70
|
box-shadow: none;
|
|
71
71
|
}
|
|
@@ -151,7 +151,7 @@ let ButtonBar = ButtonBar_1 = class ButtonBar extends BasicElement {
|
|
|
151
151
|
if (buttons.length <= 0) {
|
|
152
152
|
return;
|
|
153
153
|
}
|
|
154
|
-
const focusedButtonIndex = buttons.findIndex(button => button === document.activeElement);
|
|
154
|
+
const focusedButtonIndex = buttons.findIndex((button) => button === document.activeElement);
|
|
155
155
|
const nextButton = direction === 'next'
|
|
156
156
|
? buttons[focusedButtonIndex + 1] || buttons[0]
|
|
157
157
|
: buttons[focusedButtonIndex - 1] || buttons[buttons.length - 1];
|
|
@@ -205,7 +205,7 @@ let ButtonBar = ButtonBar_1 = class ButtonBar extends BasicElement {
|
|
|
205
205
|
const buttons = this.getFocusableButtons();
|
|
206
206
|
if (buttons && buttons.length > 0) {
|
|
207
207
|
// Set tabindex=0 to previous focused button when new button added If not found set it to first button instead
|
|
208
|
-
let focusedButtonIndex = buttons.findIndex(button => document.activeElement === button);
|
|
208
|
+
let focusedButtonIndex = buttons.findIndex((button) => document.activeElement === button);
|
|
209
209
|
if (focusedButtonIndex === -1) {
|
|
210
210
|
focusedButtonIndex = 0;
|
|
211
211
|
}
|
|
@@ -243,11 +243,11 @@ let ButtonBar = ButtonBar_1 = class ButtonBar extends BasicElement {
|
|
|
243
243
|
*/
|
|
244
244
|
manageButtons(targetButton) {
|
|
245
245
|
const managedButtons = this.getManagedButtons();
|
|
246
|
-
const isTargetOfManaged = managedButtons.some(managedButton => managedButton === targetButton);
|
|
246
|
+
const isTargetOfManaged = managedButtons.some((managedButton) => managedButton === targetButton);
|
|
247
247
|
if (!isTargetOfManaged) {
|
|
248
248
|
return;
|
|
249
249
|
}
|
|
250
|
-
managedButtons.forEach(managedButton => {
|
|
250
|
+
managedButtons.forEach((managedButton) => {
|
|
251
251
|
managedButton.active = managedButton === targetButton;
|
|
252
252
|
});
|
|
253
253
|
}
|
|
@@ -256,14 +256,14 @@ let ButtonBar = ButtonBar_1 = class ButtonBar extends BasicElement {
|
|
|
256
256
|
* @returns the array of Element of the default slot
|
|
257
257
|
*/
|
|
258
258
|
getElementsOfSlot() {
|
|
259
|
-
return this.defaultSlot.value?.assignedNodes().filter(node => node instanceof Element);
|
|
259
|
+
return this.defaultSlot.value?.assignedNodes().filter((node) => node instanceof Element);
|
|
260
260
|
}
|
|
261
261
|
/**
|
|
262
262
|
* Return the array of Buttons which focusable
|
|
263
263
|
* @returns the array of focusable Buttons
|
|
264
264
|
*/
|
|
265
265
|
getFocusableButtons() {
|
|
266
|
-
return [...this.querySelectorAll('ef-button,coral-button')].filter(button => !button.disabled);
|
|
266
|
+
return [...this.querySelectorAll('ef-button,coral-button')].filter((button) => !button.disabled);
|
|
267
267
|
}
|
|
268
268
|
/**
|
|
269
269
|
* Filter Button classes by the toggles property
|
|
@@ -272,7 +272,7 @@ let ButtonBar = ButtonBar_1 = class ButtonBar extends BasicElement {
|
|
|
272
272
|
*/
|
|
273
273
|
getManagedButtons() {
|
|
274
274
|
const elements = this.getElementsOfSlot();
|
|
275
|
-
return elements.filter(element => element instanceof Button && element.toggles);
|
|
275
|
+
return elements.filter((element) => element instanceof Button && element.toggles);
|
|
276
276
|
}
|
|
277
277
|
/**
|
|
278
278
|
* A `TemplateResult` that will be used
|
|
@@ -280,7 +280,7 @@ let ButtonBar = ButtonBar_1 = class ButtonBar extends BasicElement {
|
|
|
280
280
|
* @return {TemplateResult} Render template
|
|
281
281
|
*/
|
|
282
282
|
render() {
|
|
283
|
-
return html `<slot ${ref(this.defaultSlot)}
|
|
283
|
+
return html `<slot ${ref(this.defaultSlot)}></slot>`;
|
|
284
284
|
}
|
|
285
285
|
};
|
|
286
286
|
__decorate([
|
package/lib/calendar/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import {
|
|
2
|
+
import { CSSResultGroup, ControlElement, MultiValue, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
|
|
3
|
+
import '@refinitiv-ui/phrasebook/locale/en/calendar.js';
|
|
3
4
|
import { TranslateDirective, TranslatePromise } from '@refinitiv-ui/translate';
|
|
4
|
-
import type { CalendarFilter } from './types';
|
|
5
|
-
import './locales.js';
|
|
6
5
|
import '../button/index.js';
|
|
7
|
-
import '
|
|
6
|
+
import './locales.js';
|
|
7
|
+
import type { CalendarFilter } from './types';
|
|
8
8
|
export { CalendarFilter };
|
|
9
9
|
/**
|
|
10
10
|
* Standard calendar element
|
|
@@ -40,39 +40,39 @@ export declare class Calendar extends ControlElement implements MultiValue {
|
|
|
40
40
|
private viewBtnRef;
|
|
41
41
|
private _min;
|
|
42
42
|
/**
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
* Set minimum date
|
|
44
|
+
* @param min min date
|
|
45
|
+
* @default -
|
|
46
|
+
*/
|
|
47
47
|
set min(min: string);
|
|
48
48
|
get min(): string;
|
|
49
49
|
private _max;
|
|
50
50
|
/**
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
* Set maximum date
|
|
52
|
+
* @param max max date
|
|
53
|
+
* @default -
|
|
54
|
+
*/
|
|
55
55
|
set max(max: string);
|
|
56
56
|
get max(): string;
|
|
57
57
|
/**
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
* Only enable weekdays
|
|
59
|
+
*/
|
|
60
60
|
weekdaysOnly: boolean;
|
|
61
61
|
/**
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
* Only enable weekends
|
|
63
|
+
*/
|
|
64
64
|
weekendsOnly: boolean;
|
|
65
65
|
/**
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
* Custom filter, used for enabling/disabling certain dates
|
|
67
|
+
* @type {CalendarFilter | null}
|
|
68
|
+
*/
|
|
69
69
|
filter: CalendarFilter | null;
|
|
70
70
|
private _view;
|
|
71
71
|
/**
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
* Current calendar view date
|
|
73
|
+
* @param view view date
|
|
74
|
+
* @default -
|
|
75
|
+
*/
|
|
76
76
|
set view(view: string);
|
|
77
77
|
get view(): string;
|
|
78
78
|
private localFirstDayOfWeek;
|
|
@@ -89,18 +89,18 @@ export declare class Calendar extends ControlElement implements MultiValue {
|
|
|
89
89
|
set firstDayOfWeek(firstDayOfWeek: number);
|
|
90
90
|
get firstDayOfWeek(): number;
|
|
91
91
|
/**
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
* Set to switch to range select mode
|
|
93
|
+
*/
|
|
94
94
|
range: boolean;
|
|
95
95
|
/**
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
* Set to switch to multiple select mode
|
|
97
|
+
*/
|
|
98
98
|
multiple: boolean;
|
|
99
99
|
/**
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
100
|
+
* Current date time value
|
|
101
|
+
* @param value Calendar value
|
|
102
|
+
* @default -
|
|
103
|
+
*/
|
|
104
104
|
set value(value: string);
|
|
105
105
|
get value(): string;
|
|
106
106
|
private _values;
|
|
@@ -186,10 +186,10 @@ export declare class Calendar extends ControlElement implements MultiValue {
|
|
|
186
186
|
*/
|
|
187
187
|
protected willUpdate(changedProperties: PropertyValues): void;
|
|
188
188
|
/**
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
189
|
+
* Updates the element
|
|
190
|
+
* @param changedProperties Properties that has changed
|
|
191
|
+
* @returns {void}
|
|
192
|
+
*/
|
|
193
193
|
protected update(changedProperties: PropertyValues): void;
|
|
194
194
|
/**
|
|
195
195
|
* Called after render life-cycle finished
|
|
@@ -216,10 +216,10 @@ export declare class Calendar extends ControlElement implements MultiValue {
|
|
|
216
216
|
*/
|
|
217
217
|
protected warnInvalidValue(value: string): void;
|
|
218
218
|
/**
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
219
|
+
* Validate that the value confirms the control type
|
|
220
|
+
* @param value Value to check
|
|
221
|
+
* @returns false if value is invalid
|
|
222
|
+
*/
|
|
223
223
|
protected isValidValue(value: string): boolean;
|
|
224
224
|
/**
|
|
225
225
|
* A helper method to make sure that only valid values are passed
|