@refinitiv-ui/elements 5.5.0 → 5.8.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 +65 -8
- package/lib/accordion/custom-elements.md +18 -0
- package/lib/accordion/index.d.ts +5 -5
- package/lib/accordion/index.js +8 -11
- package/lib/appstate-bar/custom-elements.md +22 -0
- package/lib/appstate-bar/index.d.ts +5 -5
- package/lib/appstate-bar/index.js +8 -11
- package/lib/autosuggest/custom-elements.json +24 -4
- package/lib/autosuggest/custom-elements.md +54 -0
- package/lib/autosuggest/helpers/types.d.ts +1 -1
- package/lib/autosuggest/helpers/utils.d.ts +2 -2
- package/lib/autosuggest/helpers/utils.js +1 -2
- package/lib/autosuggest/index.d.ts +13 -8
- package/lib/autosuggest/index.js +38 -31
- package/lib/button/custom-elements.json +2 -2
- package/lib/button/custom-elements.md +23 -0
- package/lib/button/index.d.ts +13 -13
- package/lib/button/index.js +41 -31
- package/lib/button-bar/custom-elements.md +9 -0
- package/lib/button-bar/index.d.ts +3 -3
- package/lib/button-bar/index.js +8 -10
- package/lib/calendar/constants.d.ts +22 -0
- package/lib/calendar/constants.js +23 -0
- package/lib/calendar/custom-elements.json +8 -6
- package/lib/calendar/custom-elements.md +35 -0
- package/lib/calendar/index.d.ts +9 -7
- package/lib/calendar/index.js +20 -38
- package/lib/calendar/locales.d.ts +1 -31
- package/lib/calendar/locales.js +0 -104
- package/lib/calendar/types.d.ts +1 -5
- package/lib/calendar/types.js +1 -6
- package/lib/calendar/utils.d.ts +31 -1
- package/lib/calendar/utils.js +104 -2
- package/lib/canvas/custom-elements.json +7 -5
- package/lib/canvas/custom-elements.md +27 -0
- package/lib/canvas/index.d.ts +4 -3
- package/lib/canvas/index.js +8 -10
- package/lib/card/custom-elements.json +3 -1
- package/lib/card/custom-elements.md +24 -0
- package/lib/card/helpers/types.d.ts +1 -1
- package/lib/card/index.d.ts +10 -8
- package/lib/card/index.js +14 -13
- package/lib/chart/custom-elements.json +1 -1
- package/lib/chart/custom-elements.md +16 -0
- package/lib/chart/helpers/index.d.ts +2 -2
- package/lib/chart/helpers/index.js +2 -2
- package/lib/chart/index.d.ts +6 -6
- package/lib/chart/index.js +12 -14
- package/lib/checkbox/custom-elements.json +4 -4
- package/lib/checkbox/custom-elements.md +18 -0
- package/lib/checkbox/index.d.ts +21 -13
- package/lib/checkbox/index.js +56 -31
- package/lib/clock/custom-elements.json +21 -4
- package/lib/clock/custom-elements.md +28 -0
- package/lib/clock/index.d.ts +17 -5
- package/lib/clock/index.js +37 -18
- 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/clock/utils/TickManager.js +2 -2
- package/lib/collapse/custom-elements.md +27 -0
- package/lib/collapse/index.d.ts +7 -7
- package/lib/collapse/index.js +11 -13
- package/lib/color-dialog/custom-elements.json +29 -16
- package/lib/color-dialog/custom-elements.md +39 -0
- package/lib/color-dialog/elements/color-palettes.d.ts +5 -5
- package/lib/color-dialog/elements/color-palettes.js +8 -12
- package/lib/color-dialog/elements/grayscale-palettes.d.ts +5 -5
- package/lib/color-dialog/elements/grayscale-palettes.js +9 -12
- package/lib/color-dialog/elements/palettes.d.ts +3 -3
- package/lib/color-dialog/elements/palettes.js +49 -47
- package/lib/color-dialog/helpers/value-model.js +2 -2
- package/lib/color-dialog/index.d.ts +19 -19
- package/lib/color-dialog/index.js +36 -35
- package/lib/combo-box/custom-elements.json +28 -16
- package/lib/combo-box/custom-elements.md +35 -0
- package/lib/combo-box/helpers/filter.d.ts +4 -4
- package/lib/combo-box/helpers/types.d.ts +2 -2
- package/lib/combo-box/index.d.ts +26 -18
- package/lib/combo-box/index.js +36 -27
- 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 +11 -0
- package/lib/counter/index.d.ts +5 -3
- package/lib/counter/index.js +11 -12
- package/lib/datetime-picker/custom-elements.json +52 -23
- package/lib/datetime-picker/custom-elements.md +57 -0
- package/lib/datetime-picker/index.d.ts +25 -14
- package/lib/datetime-picker/index.js +46 -35
- package/lib/datetime-picker/locales.d.ts +1 -1
- package/lib/datetime-picker/locales.js +12 -1
- package/lib/datetime-picker/types.d.ts +1 -1
- package/lib/datetime-picker/utils.js +1 -1
- package/lib/dialog/custom-elements.json +34 -12
- package/lib/dialog/custom-elements.md +47 -0
- package/lib/dialog/index.d.ts +17 -20
- package/lib/dialog/index.js +28 -31
- package/lib/email-field/custom-elements.json +81 -94
- package/lib/email-field/custom-elements.md +37 -0
- package/lib/email-field/index.d.ts +44 -116
- package/lib/email-field/index.js +48 -249
- package/lib/events.d.ts +2 -2
- package/lib/events.js +1 -2
- package/lib/flag/custom-elements.md +10 -0
- package/lib/flag/index.d.ts +6 -4
- package/lib/flag/index.js +12 -12
- package/lib/flag/utils/FlagLoader.d.ts +1 -1
- package/lib/flag/utils/FlagLoader.js +1 -1
- package/lib/header/custom-elements.md +18 -0
- package/lib/header/index.d.ts +2 -2
- package/lib/header/index.js +5 -8
- package/lib/heatmap/custom-elements.md +26 -0
- package/lib/heatmap/helpers/color.d.ts +1 -1
- package/lib/heatmap/helpers/color.js +1 -1
- package/lib/heatmap/helpers/text.d.ts +1 -1
- package/lib/heatmap/index.d.ts +7 -7
- package/lib/heatmap/index.js +15 -16
- package/lib/icon/custom-elements.json +6 -4
- package/lib/icon/custom-elements.md +8 -0
- package/lib/icon/index.d.ts +9 -6
- package/lib/icon/index.js +28 -18
- package/lib/icon/utils/IconLoader.d.ts +6 -1
- package/lib/icon/utils/IconLoader.js +24 -17
- package/lib/index.d.ts +2 -1
- package/lib/index.js +2 -1
- package/lib/interactive-chart/custom-elements.json +6 -10
- package/lib/interactive-chart/custom-elements.md +31 -0
- package/lib/interactive-chart/helpers/types.d.ts +2 -2
- package/lib/interactive-chart/index.d.ts +11 -8
- package/lib/interactive-chart/index.js +17 -17
- package/lib/item/custom-elements.json +4 -4
- package/lib/item/custom-elements.md +29 -0
- package/lib/item/helpers/types.d.ts +1 -1
- package/lib/item/index.d.ts +18 -8
- package/lib/item/index.js +36 -16
- package/lib/label/custom-elements.md +11 -0
- package/lib/label/index.d.ts +3 -3
- package/lib/label/index.js +12 -20
- package/lib/layout/custom-elements.md +26 -0
- package/lib/layout/index.d.ts +3 -3
- package/lib/layout/index.js +6 -9
- package/lib/led-gauge/custom-elements.json +4 -4
- package/lib/led-gauge/custom-elements.md +17 -0
- package/lib/led-gauge/index.d.ts +5 -4
- package/lib/led-gauge/index.js +9 -11
- package/lib/list/custom-elements.json +18 -5
- package/lib/list/custom-elements.md +32 -0
- package/lib/list/helpers/list-renderer.d.ts +2 -2
- package/lib/list/helpers/list-renderer.js +4 -2
- package/lib/list/helpers/types.d.ts +2 -2
- package/lib/list/index.d.ts +27 -10
- package/lib/list/index.js +54 -25
- package/lib/list/renderer.d.ts +2 -2
- package/lib/list/renderer.js +1 -1
- package/lib/loader/custom-elements.md +5 -0
- package/lib/loader/index.js +4 -8
- package/lib/multi-input/custom-elements.json +7 -6
- package/lib/multi-input/custom-elements.md +43 -0
- package/lib/multi-input/helpers/types.d.ts +1 -1
- package/lib/multi-input/index.d.ts +11 -7
- package/lib/multi-input/index.js +20 -17
- package/lib/notification/custom-elements.md +26 -0
- package/lib/notification/elements/notification-tray.d.ts +2 -2
- package/lib/notification/elements/notification-tray.js +6 -9
- package/lib/notification/elements/notification.d.ts +5 -5
- package/lib/notification/elements/notification.js +8 -11
- package/lib/notification/helpers/status.d.ts +1 -1
- package/lib/notification/helpers/status.js +1 -1
- package/lib/notification/helpers/types.d.ts +1 -1
- package/lib/notification/index.d.ts +2 -2
- package/lib/notification/index.js +2 -2
- package/lib/number-field/custom-elements.json +99 -54
- package/lib/number-field/custom-elements.md +42 -0
- package/lib/number-field/index.d.ts +96 -51
- package/lib/number-field/index.js +121 -89
- package/lib/overlay/custom-elements.json +26 -13
- package/lib/overlay/custom-elements.md +54 -0
- package/lib/overlay/elements/overlay-backdrop.d.ts +4 -4
- package/lib/overlay/elements/overlay-backdrop.js +6 -9
- package/lib/overlay/elements/overlay-viewport.d.ts +3 -3
- package/lib/overlay/elements/overlay-viewport.js +5 -9
- package/lib/overlay/elements/overlay.d.ts +10 -5
- package/lib/overlay/elements/overlay.js +18 -23
- package/lib/overlay/index.d.ts +2 -2
- package/lib/overlay/index.js +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 +1 -1
- package/lib/overlay/managers/focus-manager.js +2 -2
- package/lib/overlay/managers/interaction-lock-manager.js +2 -2
- package/lib/overlay/managers/viewport-manager.d.ts +2 -2
- package/lib/overlay/managers/viewport-manager.js +6 -2
- package/lib/overlay/managers/zindex-manager.js +1 -1
- package/lib/overlay-menu/custom-elements.json +70 -20
- package/lib/overlay-menu/custom-elements.md +44 -0
- package/lib/overlay-menu/helpers/types.d.ts +3 -3
- package/lib/overlay-menu/index.d.ts +21 -19
- package/lib/overlay-menu/index.js +32 -31
- package/lib/overlay-menu/managers/menu-manager.d.ts +2 -2
- package/lib/overlay-menu/managers/menu-manager.js +3 -3
- package/lib/pagination/custom-elements.md +27 -0
- package/lib/pagination/index.d.ts +8 -8
- package/lib/pagination/index.js +13 -15
- package/lib/panel/custom-elements.md +11 -0
- package/lib/panel/index.d.ts +3 -3
- package/lib/panel/index.js +6 -9
- package/lib/password-field/custom-elements.json +62 -67
- package/lib/password-field/custom-elements.md +39 -0
- package/lib/password-field/index.d.ts +43 -94
- package/lib/password-field/index.js +52 -198
- package/lib/pill/custom-elements.json +8 -6
- package/lib/pill/custom-elements.md +22 -0
- package/lib/pill/index.d.ts +5 -5
- package/lib/pill/index.js +9 -11
- package/lib/progress-bar/custom-elements.md +18 -0
- package/lib/progress-bar/index.d.ts +3 -3
- package/lib/progress-bar/index.js +7 -9
- package/lib/radio-button/custom-elements.json +4 -4
- package/lib/radio-button/custom-elements.md +19 -0
- package/lib/radio-button/index.d.ts +25 -8
- package/lib/radio-button/index.js +84 -21
- package/lib/radio-button/radio-button-registry.d.ts +3 -2
- package/lib/radio-button/radio-button-registry.js +57 -4
- package/lib/rating/custom-elements.md +17 -0
- package/lib/rating/index.d.ts +3 -3
- package/lib/rating/index.js +9 -10
- package/lib/search-field/custom-elements.json +70 -74
- package/lib/search-field/custom-elements.md +41 -0
- package/lib/search-field/index.d.ts +44 -101
- package/lib/search-field/index.js +50 -220
- package/lib/select/custom-elements.json +5 -4
- package/lib/select/custom-elements.md +24 -0
- package/lib/select/helpers/types.d.ts +1 -1
- package/lib/select/index.d.ts +18 -10
- package/lib/select/index.js +84 -45
- package/lib/sidebar-layout/custom-elements.json +2 -6
- package/lib/sidebar-layout/custom-elements.md +21 -0
- package/lib/sidebar-layout/index.d.ts +7 -6
- package/lib/sidebar-layout/index.js +9 -10
- package/lib/slider/custom-elements.json +4 -4
- package/lib/slider/custom-elements.md +28 -0
- package/lib/slider/index.d.ts +4 -4
- package/lib/slider/index.js +9 -10
- package/lib/sparkline/custom-elements.json +4 -4
- package/lib/sparkline/custom-elements.md +16 -0
- package/lib/sparkline/index.d.ts +6 -4
- package/lib/sparkline/index.js +10 -10
- package/lib/swing-gauge/custom-elements.json +5 -3
- package/lib/swing-gauge/custom-elements.md +17 -0
- package/lib/swing-gauge/helpers.d.ts +1 -1
- package/lib/swing-gauge/helpers.js +1 -1
- package/lib/swing-gauge/index.d.ts +9 -7
- package/lib/swing-gauge/index.js +17 -15
- package/lib/tab/custom-elements.json +2 -2
- package/lib/tab/custom-elements.md +22 -0
- package/lib/tab/index.d.ts +5 -5
- package/lib/tab/index.js +9 -12
- package/lib/tab-bar/custom-elements.md +11 -0
- package/lib/tab-bar/index.d.ts +4 -4
- package/lib/tab-bar/index.js +9 -11
- package/lib/text-field/custom-elements.json +78 -89
- package/lib/text-field/custom-elements.md +35 -0
- package/lib/text-field/index.d.ts +59 -79
- package/lib/text-field/index.js +99 -158
- package/lib/time-picker/custom-elements.json +4 -4
- package/lib/time-picker/custom-elements.md +28 -0
- package/lib/time-picker/index.d.ts +7 -4
- package/lib/time-picker/index.js +15 -14
- package/lib/toggle/custom-elements.json +4 -4
- package/lib/toggle/custom-elements.md +19 -0
- package/lib/toggle/index.d.ts +14 -4
- package/lib/toggle/index.js +31 -12
- package/lib/tooltip/custom-elements.md +14 -0
- package/lib/tooltip/elements/title-tooltip.js +2 -2
- package/lib/tooltip/elements/tooltip-element.d.ts +1 -1
- package/lib/tooltip/helpers/overflow-tooltip.d.ts +1 -1
- package/lib/tooltip/helpers/overflow-tooltip.js +1 -1
- package/lib/tooltip/helpers/renderer.d.ts +1 -1
- package/lib/tooltip/helpers/types.d.ts +1 -1
- package/lib/tooltip/index.d.ts +9 -9
- package/lib/tooltip/index.js +18 -20
- package/lib/tooltip/managers/tooltip-manager.d.ts +2 -2
- package/lib/tooltip/managers/tooltip-manager.js +3 -7
- package/lib/tornado-chart/custom-elements.md +18 -0
- package/lib/tornado-chart/elements/tornado-chart.d.ts +4 -4
- package/lib/tornado-chart/elements/tornado-chart.js +8 -11
- package/lib/tornado-chart/elements/tornado-item.d.ts +5 -5
- package/lib/tornado-chart/elements/tornado-item.js +10 -12
- package/lib/tornado-chart/index.d.ts +2 -2
- package/lib/tornado-chart/index.js +2 -2
- package/lib/tree/custom-elements.json +4 -3
- package/lib/tree/custom-elements.md +32 -0
- package/lib/tree/elements/tree-item.d.ts +4 -4
- package/lib/tree/elements/tree-item.js +10 -13
- package/lib/tree/elements/tree.d.ts +6 -5
- package/lib/tree/elements/tree.js +9 -12
- package/lib/tree/helpers/filter.d.ts +2 -2
- package/lib/tree/helpers/renderer.d.ts +2 -2
- package/lib/tree/helpers/renderer.js +3 -3
- package/lib/tree/helpers/types.d.ts +1 -1
- package/lib/tree/index.d.ts +4 -4
- package/lib/tree/index.js +3 -3
- package/lib/tree/managers/tree-manager.d.ts +22 -10
- package/lib/tree/managers/tree-manager.js +56 -40
- 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 +10 -6
- package/lib/tree-select/custom-elements.md +26 -0
- package/lib/tree-select/helpers/types.d.ts +2 -2
- package/lib/tree-select/index.d.ts +28 -20
- package/lib/tree-select/index.js +44 -31
- 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.d.ts +1 -0
- package/lib/version.js +1 -0
- package/package.json +298 -15
- package/lib/autosuggest/helpers/const.d.ts +0 -2
- package/lib/autosuggest/helpers/const.js +0 -3
- package/lib/overlay-menu/helpers/uuid.d.ts +0 -7
- package/lib/overlay-menu/helpers/uuid.js +0 -13
package/lib/list/index.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import '../item';
|
|
10
|
-
import { ListRenderer } from './helpers/list-renderer';
|
|
11
|
-
import { VERSION } from '../';
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { ControlElement, css, html, WarningNotice } from '@refinitiv-ui/core';
|
|
3
|
+
import { customElement } from '@refinitiv-ui/core/lib/decorators/custom-element.js';
|
|
4
|
+
import { property } from '@refinitiv-ui/core/lib/decorators/property.js';
|
|
5
|
+
import { VERSION } from '../version.js';
|
|
6
|
+
import { CollectionComposer } from '@refinitiv-ui/utils/lib/collection.js';
|
|
7
|
+
import { ListRenderer } from './helpers/list-renderer.js';
|
|
8
|
+
import '../item/index.js';
|
|
12
9
|
export { ListRenderer };
|
|
13
10
|
/**
|
|
14
11
|
* Key direction
|
|
@@ -26,6 +23,7 @@ const valueFormatWarning = new WarningNotice('The specified \'values\' format do
|
|
|
26
23
|
let List = class List extends ControlElement {
|
|
27
24
|
constructor() {
|
|
28
25
|
super(...arguments);
|
|
26
|
+
this.defaultRole = 'listbox';
|
|
29
27
|
/**
|
|
30
28
|
* Used to timestamp renders.
|
|
31
29
|
* This enables diff checking against item updates,
|
|
@@ -37,7 +35,7 @@ let List = class List extends ControlElement {
|
|
|
37
35
|
* @returns Update promise.
|
|
38
36
|
*/
|
|
39
37
|
this.modificationUpdate = () => {
|
|
40
|
-
|
|
38
|
+
this.requestUpdate();
|
|
41
39
|
};
|
|
42
40
|
/**
|
|
43
41
|
* Item map; used to link element nodes to data items.
|
|
@@ -85,6 +83,7 @@ let List = class List extends ControlElement {
|
|
|
85
83
|
/**
|
|
86
84
|
* The data object, used to render the list.
|
|
87
85
|
* @type {ListData}
|
|
86
|
+
* @default null
|
|
88
87
|
*/
|
|
89
88
|
get data() {
|
|
90
89
|
return this._data;
|
|
@@ -108,11 +107,12 @@ let List = class List extends ControlElement {
|
|
|
108
107
|
);
|
|
109
108
|
this.clearMaps();
|
|
110
109
|
this._data = value;
|
|
111
|
-
|
|
110
|
+
this.requestUpdate('data', oldValue);
|
|
112
111
|
}
|
|
113
112
|
/**
|
|
114
113
|
* Returns the first selected item value.
|
|
115
114
|
* Use `values` when multiple selection mode is enabled.
|
|
115
|
+
* @default -
|
|
116
116
|
*/
|
|
117
117
|
get value() {
|
|
118
118
|
return this.values[0] || '';
|
|
@@ -125,12 +125,14 @@ let List = class List extends ControlElement {
|
|
|
125
125
|
if (item) {
|
|
126
126
|
this.composer.setItemPropertyValue(item, 'selected', true);
|
|
127
127
|
}
|
|
128
|
-
|
|
128
|
+
this.requestUpdate('value', oldValue);
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
/**
|
|
132
132
|
* Returns a values collection of the currently
|
|
133
133
|
* selected item values
|
|
134
|
+
* @type {string[]}
|
|
135
|
+
* @default []
|
|
134
136
|
* @readonly
|
|
135
137
|
*/
|
|
136
138
|
get values() {
|
|
@@ -157,7 +159,7 @@ let List = class List extends ControlElement {
|
|
|
157
159
|
matches.forEach((match) => this.composer.setItemPropertyValue(match, 'selected', true));
|
|
158
160
|
return !this.multiple; // Only set the fist value if multiple is not enabled
|
|
159
161
|
});
|
|
160
|
-
|
|
162
|
+
this.requestUpdate('values', oldValue);
|
|
161
163
|
}
|
|
162
164
|
}
|
|
163
165
|
}
|
|
@@ -192,12 +194,28 @@ let List = class List extends ControlElement {
|
|
|
192
194
|
this.highlightItem(this.getNextHighlightItem(Direction.UP), true);
|
|
193
195
|
}
|
|
194
196
|
/**
|
|
195
|
-
* Navigate
|
|
197
|
+
* Navigate down through the list items
|
|
196
198
|
* @returns {void}
|
|
197
199
|
*/
|
|
198
200
|
down() {
|
|
199
201
|
this.highlightItem(this.getNextHighlightItem(Direction.DOWN), true);
|
|
200
202
|
}
|
|
203
|
+
/**
|
|
204
|
+
* Navigate to first focusable item of the list
|
|
205
|
+
* @returns {void}
|
|
206
|
+
*/
|
|
207
|
+
first() {
|
|
208
|
+
const firstItem = this.itemMap.get(this.tabbableElements[0]);
|
|
209
|
+
this.highlightItem(firstItem, true);
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Navigate to first focusable item of the list
|
|
213
|
+
* @returns {void}
|
|
214
|
+
*/
|
|
215
|
+
last() {
|
|
216
|
+
const lastItem = this.itemMap.get(this.tabbableElements[this.tabbableElements.length - 1]);
|
|
217
|
+
this.highlightItem(lastItem, true);
|
|
218
|
+
}
|
|
201
219
|
/**
|
|
202
220
|
* Proxy for querying the composer
|
|
203
221
|
* @param engine composer querying engine
|
|
@@ -355,6 +373,12 @@ let List = class List extends ControlElement {
|
|
|
355
373
|
case 'ArrowDown':
|
|
356
374
|
this.down();
|
|
357
375
|
break;
|
|
376
|
+
case 'Home':
|
|
377
|
+
this.first();
|
|
378
|
+
break;
|
|
379
|
+
case 'End':
|
|
380
|
+
this.last();
|
|
381
|
+
break;
|
|
358
382
|
default:
|
|
359
383
|
return;
|
|
360
384
|
}
|
|
@@ -439,7 +463,7 @@ let List = class List extends ControlElement {
|
|
|
439
463
|
clearSelection() {
|
|
440
464
|
this.queryItemsByPropertyValue('selected', true)
|
|
441
465
|
.forEach((item) => this.composer.setItemPropertyValue(item, 'selected', false));
|
|
442
|
-
|
|
466
|
+
this.requestUpdate();
|
|
443
467
|
}
|
|
444
468
|
/**
|
|
445
469
|
* Queries and returns all renderable items.
|
|
@@ -525,15 +549,14 @@ let List = class List extends ControlElement {
|
|
|
525
549
|
const currentChildren = Array.from(this.children);
|
|
526
550
|
const recyclableElements = this.calculateRecyclableElements(renderItems);
|
|
527
551
|
const renderChildren = renderItems.map((item) => this.createListItem(item, recyclableElements));
|
|
528
|
-
const deletions = currentChildren.filter(
|
|
529
|
-
deletions.forEach(
|
|
530
|
-
renderChildren.forEach(
|
|
531
|
-
const index = renderChildren.indexOf(item);
|
|
552
|
+
const deletions = currentChildren.filter(element => !renderChildren.includes(element));
|
|
553
|
+
deletions.forEach(element => this.removeChild(element));
|
|
554
|
+
renderChildren.forEach((element, index) => {
|
|
532
555
|
if (this.children.length === index) {
|
|
533
|
-
this.appendChild(
|
|
556
|
+
this.appendChild(element);
|
|
534
557
|
}
|
|
535
|
-
else {
|
|
536
|
-
this.insertBefore(
|
|
558
|
+
else if (element !== this.children[index]) {
|
|
559
|
+
this.insertBefore(element, this.children[index]);
|
|
537
560
|
}
|
|
538
561
|
});
|
|
539
562
|
}
|
|
@@ -552,8 +575,14 @@ let List = class List extends ControlElement {
|
|
|
552
575
|
}
|
|
553
576
|
return super.update(changeProperties);
|
|
554
577
|
}
|
|
578
|
+
updated(changedProperties) {
|
|
579
|
+
super.updated(changedProperties);
|
|
580
|
+
if (changedProperties.has('multiple')) {
|
|
581
|
+
this.setAttribute('aria-multiselectable', this.multiple ? 'true' : 'false');
|
|
582
|
+
}
|
|
583
|
+
}
|
|
555
584
|
/**
|
|
556
|
-
* A `
|
|
585
|
+
* A `CSSResultGroup` that will be used
|
|
557
586
|
* to style the host, slotted children
|
|
558
587
|
* and the internal template of the element.
|
|
559
588
|
* @return CSS template
|
package/lib/list/renderer.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ExtensibleFunction } from './extensible-function';
|
|
2
|
-
import { DataItem, CollectionComposer } from '@refinitiv-ui/utils';
|
|
1
|
+
import { ExtensibleFunction } from './extensible-function.js';
|
|
2
|
+
import type { DataItem, CollectionComposer } from '@refinitiv-ui/utils/lib/collection.js';
|
|
3
3
|
/**
|
|
4
4
|
* Render function interface
|
|
5
5
|
* TODO: Move this to @refinitiv-ui/utils
|
package/lib/list/renderer.js
CHANGED
package/lib/loader/index.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { BasicElement, customElement, html } from '@refinitiv-ui/core';
|
|
8
|
-
import { VERSION } from '../';
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { BasicElement, html } from '@refinitiv-ui/core';
|
|
3
|
+
import { customElement } from '@refinitiv-ui/core/lib/decorators/custom-element.js';
|
|
4
|
+
import { VERSION } from '../version.js';
|
|
9
5
|
/**
|
|
10
6
|
* Global cache for loader template parts
|
|
11
7
|
*/
|
|
@@ -49,13 +49,13 @@
|
|
|
49
49
|
"name": "readonly",
|
|
50
50
|
"description": "Hides text field and clear icon from all pills",
|
|
51
51
|
"type": "boolean",
|
|
52
|
-
"default": "
|
|
52
|
+
"default": "false"
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
"name": "disabled",
|
|
56
56
|
"description": "Set disabled state",
|
|
57
57
|
"type": "boolean",
|
|
58
|
-
"default": "
|
|
58
|
+
"default": "false"
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
"name": "value",
|
|
@@ -66,9 +66,10 @@
|
|
|
66
66
|
],
|
|
67
67
|
"properties": [
|
|
68
68
|
{
|
|
69
|
-
"name": "values",
|
|
69
|
+
"name": "values (readonly)",
|
|
70
70
|
"description": "Array of item's values ( readonly )",
|
|
71
|
-
"type": "string[]"
|
|
71
|
+
"type": "string[]",
|
|
72
|
+
"default": "[]"
|
|
72
73
|
},
|
|
73
74
|
{
|
|
74
75
|
"name": "pillsOnly",
|
|
@@ -137,14 +138,14 @@
|
|
|
137
138
|
"attribute": "readonly",
|
|
138
139
|
"description": "Hides text field and clear icon from all pills",
|
|
139
140
|
"type": "boolean",
|
|
140
|
-
"default": "
|
|
141
|
+
"default": "false"
|
|
141
142
|
},
|
|
142
143
|
{
|
|
143
144
|
"name": "disabled",
|
|
144
145
|
"attribute": "disabled",
|
|
145
146
|
"description": "Set disabled state",
|
|
146
147
|
"type": "boolean",
|
|
147
|
-
"default": "
|
|
148
|
+
"default": "false"
|
|
148
149
|
},
|
|
149
150
|
{
|
|
150
151
|
"name": "value",
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# ef-multi-input
|
|
2
|
+
|
|
3
|
+
An input control component to display a selection of pills
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
| Property | Attribute | Type | Default | Description |
|
|
8
|
+
|---------------------|---------------|--------------------------|---------|------------------------------------------------|
|
|
9
|
+
| `data` | | `MultiInputData \| null` | null | The data object, used to render the list. |
|
|
10
|
+
| `disabled` | `disabled` | `boolean` | false | Set disabled state |
|
|
11
|
+
| `error` | `error` | `boolean` | false | Set state to error |
|
|
12
|
+
| `icon` | `icon` | `string` | "" | Specify icon to display inside input box |
|
|
13
|
+
| `maxLength` | `maxlength` | `number \| null` | null | Set character max limit |
|
|
14
|
+
| `minLength` | `minlength` | `number \| null` | null | Set character min limit |
|
|
15
|
+
| `pillsOnly` | `pills-only` | `boolean` | false | Hide text input box |
|
|
16
|
+
| `placeholder` | `placeholder` | `string` | "" | Placeholder text to display in input box |
|
|
17
|
+
| `readonly` | `readonly` | `boolean` | false | Hides text field and clear icon from all pills |
|
|
18
|
+
| `selectionEnd` | | `number \| null` | null | Selection end index |
|
|
19
|
+
| `selectionStart` | | `number \| null` | null | Selection start index |
|
|
20
|
+
| `value` | `value` | `string` | "" | Current value of text field |
|
|
21
|
+
| `values (readonly)` | | `string[]` | [] | Array of item's values ( readonly ) |
|
|
22
|
+
| `warning` | `warning` | `boolean` | false | Set state to warning |
|
|
23
|
+
|
|
24
|
+
## Methods
|
|
25
|
+
|
|
26
|
+
| Method | Type | Description |
|
|
27
|
+
|---------------------|--------------------------------------------------|--------------------------------------------------|
|
|
28
|
+
| `add` | `(item: any): MultiInputDataItem \| null` | Add a new item to the input. Return newly added object or null if added invalid object.<br /><br />**item**: to add. Object must have at least value and label |
|
|
29
|
+
| `removeByIndex` | `(index: number): MultiInputDataItem \| null` | Removes pill by index. Returns item that removed or null if list was empty<br /><br />**index**: of pill to be removed |
|
|
30
|
+
| `removeByValue` | `(value: string): string` | Removes the item by the value and returns array of removed items<br /><br />**value**: Value of item to remove |
|
|
31
|
+
| `removeLastItem` | `(): MultiInputDataItem \| null` | Removes last item. Returns item that removed or null if list was empty |
|
|
32
|
+
| `select` | `(): void` | Select the contents of input |
|
|
33
|
+
| `setSelectionRange` | `(startSelection: number, endSelection: number): void` | Set the selection range<br /><br />**startSelection**: Start of selection<br />**endSelection**: End of the selection |
|
|
34
|
+
|
|
35
|
+
## Events
|
|
36
|
+
|
|
37
|
+
| Event | Description |
|
|
38
|
+
|-----------------|--------------------------------------------------|
|
|
39
|
+
| `error-changed` | Dispatched when error state changes.<br />Property `detail.error` is error from validation. |
|
|
40
|
+
| `item-added` | Fired when new pill is added.<br />Property `detail.item` is new added pill.<br />Property `detail.items` is new list of all pills. |
|
|
41
|
+
| `item-error` | Fired when item that attempt to add is invalid.<br />Property `detail.item` is item with an error.<br />Property `detail.items` a current list of pills. |
|
|
42
|
+
| `item-removed` | Fired when item is removed.<br />Property `detail.item` is pill that removed.<br />Property `detail.items` is new list of all pills. |
|
|
43
|
+
| `value-changed` | Fired when new value of text field is changed.<br />Property `detail.value` will be the new value. |
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CollectionItem } from '@refinitiv-ui/utils';
|
|
1
|
+
import type { CollectionItem } from '@refinitiv-ui/utils/lib/collection.js';
|
|
2
2
|
export declare type SelectionIndex = number | null;
|
|
3
3
|
export declare type MultiInputEvents = 'item-added' | 'item-removed' | 'item-error';
|
|
4
4
|
export declare type MultiInputData = MultiInputDataItem[];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import { ControlElement,
|
|
3
|
-
import '
|
|
4
|
-
import '../
|
|
5
|
-
import
|
|
6
|
-
export { MultiInputData, MultiInputDataItem };
|
|
2
|
+
import { ControlElement, CSSResultGroup, MultiValue, TemplateResult, PropertyValues } from '@refinitiv-ui/core';
|
|
3
|
+
import type { MultiInputData, MultiInputDataItem, SelectionIndex } from './helpers/types';
|
|
4
|
+
import '../pill/index.js';
|
|
5
|
+
import '../text-field/index.js';
|
|
6
|
+
export type { MultiInputData, MultiInputDataItem };
|
|
7
7
|
/**
|
|
8
8
|
* An input control component to display a selection of pills
|
|
9
9
|
*
|
|
@@ -42,16 +42,17 @@ export declare class MultiInput extends ControlElement implements MultiValue {
|
|
|
42
42
|
*/
|
|
43
43
|
static get version(): string;
|
|
44
44
|
/**
|
|
45
|
-
* A `
|
|
45
|
+
* A `CSSResultGroup` that will be used
|
|
46
46
|
* to style the host, slotted children
|
|
47
47
|
* and the internal template of the element.
|
|
48
48
|
* @return CSS template
|
|
49
49
|
*/
|
|
50
|
-
static get styles():
|
|
50
|
+
static get styles(): CSSResultGroup;
|
|
51
51
|
/**
|
|
52
52
|
* Array of item's values ( readonly )
|
|
53
53
|
* @readonly
|
|
54
54
|
* @type {string[]}
|
|
55
|
+
* @default []
|
|
55
56
|
*/
|
|
56
57
|
get values(): string[];
|
|
57
58
|
/**
|
|
@@ -84,17 +85,20 @@ export declare class MultiInput extends ControlElement implements MultiValue {
|
|
|
84
85
|
minLength: number | null;
|
|
85
86
|
/**
|
|
86
87
|
* Selection start index
|
|
88
|
+
* @default null
|
|
87
89
|
*/
|
|
88
90
|
get selectionStart(): number | null;
|
|
89
91
|
set selectionStart(index: SelectionIndex);
|
|
90
92
|
/**
|
|
91
93
|
* Selection end index
|
|
94
|
+
* @default null
|
|
92
95
|
*/
|
|
93
96
|
get selectionEnd(): number | null;
|
|
94
97
|
set selectionEnd(index: SelectionIndex);
|
|
95
98
|
/**
|
|
96
99
|
* The data object, used to render the list.
|
|
97
100
|
* @type {MultiInputData | null}
|
|
101
|
+
* @default null
|
|
98
102
|
*/
|
|
99
103
|
get data(): MultiInputData | null;
|
|
100
104
|
set data(value: MultiInputData | null);
|
package/lib/multi-input/index.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
import {
|
|
8
|
-
import { CollectionComposer } from '@refinitiv-ui/utils';
|
|
9
|
-
import '../pill';
|
|
10
|
-
import '../text-field';
|
|
11
|
-
import { VERSION } from '../';
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { ControlElement, css, html } from '@refinitiv-ui/core';
|
|
3
|
+
import { customElement } from '@refinitiv-ui/core/lib/decorators/custom-element.js';
|
|
4
|
+
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 { CollectionComposer } from '@refinitiv-ui/utils/lib/collection.js';
|
|
9
|
+
import '../pill/index.js';
|
|
10
|
+
import '../text-field/index.js';
|
|
12
11
|
const hasChanged = (newVal, oldVal) => oldVal === undefined ? false : newVal !== oldVal;
|
|
13
12
|
/**
|
|
14
13
|
* An input control component to display a selection of pills
|
|
@@ -109,7 +108,7 @@ let MultiInput = class MultiInput extends ControlElement {
|
|
|
109
108
|
return VERSION;
|
|
110
109
|
}
|
|
111
110
|
/**
|
|
112
|
-
* A `
|
|
111
|
+
* A `CSSResultGroup` that will be used
|
|
113
112
|
* to style the host, slotted children
|
|
114
113
|
* and the internal template of the element.
|
|
115
114
|
* @return CSS template
|
|
@@ -146,12 +145,14 @@ let MultiInput = class MultiInput extends ControlElement {
|
|
|
146
145
|
* Array of item's values ( readonly )
|
|
147
146
|
* @readonly
|
|
148
147
|
* @type {string[]}
|
|
148
|
+
* @default []
|
|
149
149
|
*/
|
|
150
150
|
get values() {
|
|
151
151
|
return this.composer.queryItems(() => true).map(({ value }) => value);
|
|
152
152
|
}
|
|
153
153
|
/**
|
|
154
154
|
* Selection start index
|
|
155
|
+
* @default null
|
|
155
156
|
*/
|
|
156
157
|
get selectionStart() {
|
|
157
158
|
if (this.search) {
|
|
@@ -166,6 +167,7 @@ let MultiInput = class MultiInput extends ControlElement {
|
|
|
166
167
|
}
|
|
167
168
|
/**
|
|
168
169
|
* Selection end index
|
|
170
|
+
* @default null
|
|
169
171
|
*/
|
|
170
172
|
get selectionEnd() {
|
|
171
173
|
if (this.search) {
|
|
@@ -181,6 +183,7 @@ let MultiInput = class MultiInput extends ControlElement {
|
|
|
181
183
|
/**
|
|
182
184
|
* The data object, used to render the list.
|
|
183
185
|
* @type {MultiInputData | null}
|
|
186
|
+
* @default null
|
|
184
187
|
*/
|
|
185
188
|
get data() {
|
|
186
189
|
return this._data;
|
|
@@ -197,7 +200,7 @@ let MultiInput = class MultiInput extends ControlElement {
|
|
|
197
200
|
this.composer = new CollectionComposer([]);
|
|
198
201
|
}
|
|
199
202
|
this._data = value;
|
|
200
|
-
|
|
203
|
+
this.requestUpdate('data', oldValue);
|
|
201
204
|
}
|
|
202
205
|
/**
|
|
203
206
|
* Removes the item by the value and returns array of removed items
|
|
@@ -255,8 +258,7 @@ let MultiInput = class MultiInput extends ControlElement {
|
|
|
255
258
|
}
|
|
256
259
|
if (process) {
|
|
257
260
|
this.composer.removeItem(item);
|
|
258
|
-
|
|
259
|
-
this.focus(); /* keep focus on multi-input */
|
|
261
|
+
this.requestUpdate();
|
|
260
262
|
return item;
|
|
261
263
|
}
|
|
262
264
|
return null;
|
|
@@ -289,7 +291,7 @@ let MultiInput = class MultiInput extends ControlElement {
|
|
|
289
291
|
}
|
|
290
292
|
if (process) {
|
|
291
293
|
this.composer.addItem(item);
|
|
292
|
-
|
|
294
|
+
this.requestUpdate();
|
|
293
295
|
return item;
|
|
294
296
|
}
|
|
295
297
|
return null;
|
|
@@ -332,7 +334,7 @@ let MultiInput = class MultiInput extends ControlElement {
|
|
|
332
334
|
}
|
|
333
335
|
if (oldValue !== value) {
|
|
334
336
|
this.oldValue = value;
|
|
335
|
-
|
|
337
|
+
this.requestUpdate('value', oldValue);
|
|
336
338
|
}
|
|
337
339
|
}
|
|
338
340
|
get value() {
|
|
@@ -449,6 +451,7 @@ let MultiInput = class MultiInput extends ControlElement {
|
|
|
449
451
|
const items = this.composer.queryItems(() => true);
|
|
450
452
|
const item = items[Number(index)];
|
|
451
453
|
this.removeItem(item, true);
|
|
454
|
+
this.focus(); // keep focus on multi-input
|
|
452
455
|
}
|
|
453
456
|
/**
|
|
454
457
|
* the wrapper for item events
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# ef-notification
|
|
2
|
+
|
|
3
|
+
Used to show informative content when something happens in the application
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
| Property | Attribute | Type | Default | Description |
|
|
8
|
+
|-------------|-------------|-----------|---------|------------------------------------------|
|
|
9
|
+
| `collapsed` | `collapsed` | `boolean` | false | Toggles the collapsed state. |
|
|
10
|
+
| `confirm` | `confirm` | `boolean` | false | Notification style: Confirm |
|
|
11
|
+
| `error` | `error` | `boolean` | false | Notification style: Error |
|
|
12
|
+
| `message` | `message` | `string` | "" | The message to show in the notification. |
|
|
13
|
+
| `warning` | `warning` | `boolean` | false | Notification style: Warning |
|
|
14
|
+
|
|
15
|
+
## Methods
|
|
16
|
+
|
|
17
|
+
| Method | Type | Description |
|
|
18
|
+
|-----------|------------|--------------------------------------------------|
|
|
19
|
+
| `dismiss` | `(): void` | Dismisses the notification, firing a `dismiss` event and collapsing the notification. |
|
|
20
|
+
|
|
21
|
+
## Events
|
|
22
|
+
|
|
23
|
+
| Event | Description |
|
|
24
|
+
|-------------|-------------------------------------------|
|
|
25
|
+
| `collapsed` | Dispatched when notification is collapsed |
|
|
26
|
+
| `dismiss` | Dispatched when notification is dismissed |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { JSXInterface } from '../../jsx';
|
|
2
2
|
import { ResponsiveElement, ElementSize, TemplateResult, PropertyValues } from '@refinitiv-ui/core';
|
|
3
|
-
import { Notification } from './notification';
|
|
4
|
-
import { TaskOptions } from '../helpers/types';
|
|
3
|
+
import type { Notification } from './notification';
|
|
4
|
+
import type { TaskOptions } from '../helpers/types';
|
|
5
5
|
export declare class NotificationTray extends ResponsiveElement {
|
|
6
6
|
/**
|
|
7
7
|
* Element version number
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
import { ResponsiveElement, html, customElement, property } from '@refinitiv-ui/core';
|
|
8
|
-
import { TimeoutTaskRunner } from '@refinitiv-ui/utils';
|
|
9
|
-
import { VERSION } from '../../';
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { ResponsiveElement, html } from '@refinitiv-ui/core';
|
|
3
|
+
import { customElement } from '@refinitiv-ui/core/lib/decorators/custom-element.js';
|
|
4
|
+
import { property } from '@refinitiv-ui/core/lib/decorators/property.js';
|
|
5
|
+
import { VERSION } from '../../version.js';
|
|
6
|
+
import { TimeoutTaskRunner } from '@refinitiv-ui/utils/lib/async.js';
|
|
10
7
|
let NotificationTray = class NotificationTray extends ResponsiveElement {
|
|
11
8
|
constructor() {
|
|
12
9
|
super(...arguments);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JSXInterface } from '../../jsx';
|
|
2
|
-
import { BasicElement, TemplateResult,
|
|
3
|
-
import '../../icon';
|
|
2
|
+
import { BasicElement, TemplateResult, CSSResultGroup, PropertyValues } from '@refinitiv-ui/core';
|
|
3
|
+
import '../../icon/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* Used to show informative content when something happens in the application
|
|
6
6
|
*
|
|
@@ -59,13 +59,13 @@ export declare class Notification extends BasicElement {
|
|
|
59
59
|
*/
|
|
60
60
|
private onAnimationEnd;
|
|
61
61
|
/**
|
|
62
|
-
* A `
|
|
62
|
+
* A `CSSResultGroup` that will be used
|
|
63
63
|
* to style the host, slotted children
|
|
64
64
|
* and the internal template of the element.
|
|
65
65
|
*
|
|
66
|
-
* @returns
|
|
66
|
+
* @returns CSS template
|
|
67
67
|
*/
|
|
68
|
-
static get styles():
|
|
68
|
+
static get styles(): CSSResultGroup;
|
|
69
69
|
/**
|
|
70
70
|
* A `TemplateResult` that will be used
|
|
71
71
|
* to render the updated internal template.
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { BasicElement, html, css, customElement, property } from '@refinitiv-ui/core';
|
|
8
|
-
import { VERSION } from '../../';
|
|
9
|
-
import '../../icon';
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { BasicElement, html, css } from '@refinitiv-ui/core';
|
|
3
|
+
import { customElement } from '@refinitiv-ui/core/lib/decorators/custom-element.js';
|
|
4
|
+
import { property } from '@refinitiv-ui/core/lib/decorators/property.js';
|
|
5
|
+
import { VERSION } from '../../version.js';
|
|
6
|
+
import '../../icon/index.js';
|
|
10
7
|
/**
|
|
11
8
|
* Used to show informative content when something happens in the application
|
|
12
9
|
*
|
|
@@ -98,11 +95,11 @@ let Notification = class Notification extends BasicElement {
|
|
|
98
95
|
}
|
|
99
96
|
}
|
|
100
97
|
/**
|
|
101
|
-
* A `
|
|
98
|
+
* A `CSSResultGroup` that will be used
|
|
102
99
|
* to style the host, slotted children
|
|
103
100
|
* and the internal template of the element.
|
|
104
101
|
*
|
|
105
|
-
* @returns
|
|
102
|
+
* @returns CSS template
|
|
106
103
|
*/
|
|
107
104
|
static get styles() {
|
|
108
105
|
return css `
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './elements/notification';
|
|
2
|
-
export { info, confirm, warn, error } from './helpers/status';
|
|
1
|
+
export * from './elements/notification.js';
|
|
2
|
+
export { info, confirm, warn, error } from './helpers/status.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './elements/notification';
|
|
2
|
-
export { info, confirm, warn, error } from './helpers/status';
|
|
1
|
+
export * from './elements/notification.js';
|
|
2
|
+
export { info, confirm, warn, error } from './helpers/status.js';
|