@refinitiv-ui/elements 5.3.4 → 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 +89 -0
- 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 +9 -13
- package/lib/color-dialog/elements/grayscale-palettes.d.ts +5 -5
- package/lib/color-dialog/elements/grayscale-palettes.js +10 -13
- package/lib/color-dialog/elements/palettes.d.ts +10 -3
- package/lib/color-dialog/elements/palettes.js +58 -45
- package/lib/color-dialog/helpers/color-helpers.d.ts +7 -53
- package/lib/color-dialog/helpers/color-helpers.js +12 -109
- package/lib/color-dialog/helpers/value-model.d.ts +1 -1
- package/lib/color-dialog/helpers/value-model.js +18 -16
- package/lib/color-dialog/index.d.ts +19 -19
- package/lib/color-dialog/index.js +47 -45
- 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/themes/solar/charcoal/index.js +1 -1
- package/lib/datetime-picker/themes/solar/pearl/index.js +1 -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/email-field/themes/solar/charcoal/index.js +1 -1
- package/lib/email-field/themes/solar/pearl/index.js +1 -1
- 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/multi-input/themes/solar/charcoal/index.js +1 -1
- package/lib/multi-input/themes/solar/pearl/index.js +1 -1
- 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/number-field/themes/solar/charcoal/index.js +1 -1
- package/lib/number-field/themes/solar/pearl/index.js +1 -1
- 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 +27 -28
- 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 +26 -19
- package/lib/overlay-menu/index.js +47 -33
- 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/password-field/themes/solar/charcoal/index.js +1 -1
- package/lib/password-field/themes/solar/pearl/index.js +1 -1
- 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/search-field/themes/solar/charcoal/index.js +1 -1
- package/lib/search-field/themes/solar/pearl/index.js +1 -1
- 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/themes/solar/charcoal/index.js +1 -1
- package/lib/tab/themes/solar/pearl/index.js +1 -1
- 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/tab-bar/themes/solar/charcoal/index.js +1 -1
- package/lib/tab-bar/themes/solar/pearl/index.js +1 -1
- 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/text-field/themes/solar/charcoal/index.js +1 -1
- package/lib/text-field/themes/solar/pearl/index.js +1 -1
- 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/time-picker/themes/solar/charcoal/index.js +1 -1
- package/lib/time-picker/themes/solar/pearl/index.js +1 -1
- 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 +17 -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 +51 -5
- package/lib/tree/elements/tree.js +138 -11
- package/lib/tree/helpers/filter.d.ts +8 -0
- package/lib/tree/helpers/filter.js +33 -0
- package/lib/tree/helpers/renderer.d.ts +2 -2
- package/lib/tree/helpers/renderer.js +3 -3
- package/lib/tree/helpers/types.d.ts +9 -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 +32 -28
- package/lib/tree-select/index.js +54 -44
- 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/flag/index.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
import { FlagLoader } from './utils/FlagLoader';
|
|
10
|
-
export { preload } from './utils/FlagLoader';
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { BasicElement, svg, 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 { unsafeHTML } from '@refinitiv-ui/core/lib/directives/unsafe-html.js';
|
|
6
|
+
import { VERSION } from '../version.js';
|
|
7
|
+
import { FlagLoader } from './utils/FlagLoader.js';
|
|
8
|
+
export { preload } from './utils/FlagLoader.js';
|
|
11
9
|
const EmptyTemplate = svg ``;
|
|
12
10
|
/**
|
|
13
11
|
* Provides a collection of flags.
|
|
@@ -31,7 +29,7 @@ let Flag = class Flag extends BasicElement {
|
|
|
31
29
|
return VERSION;
|
|
32
30
|
}
|
|
33
31
|
/**
|
|
34
|
-
* A `
|
|
32
|
+
* A `CSSResultGroup` that will be used
|
|
35
33
|
* to style the host, slotted children
|
|
36
34
|
* and the internal template of the element.
|
|
37
35
|
* @returns CSS template
|
|
@@ -55,6 +53,7 @@ let Flag = class Flag extends BasicElement {
|
|
|
55
53
|
/**
|
|
56
54
|
* Name of a known flag to render.
|
|
57
55
|
* @example gb
|
|
56
|
+
* @default null
|
|
58
57
|
*/
|
|
59
58
|
get flag() {
|
|
60
59
|
return this._flag;
|
|
@@ -68,6 +67,7 @@ let Flag = class Flag extends BasicElement {
|
|
|
68
67
|
/**
|
|
69
68
|
* Src location of an svg flag.
|
|
70
69
|
* @example https://cdn.io/flags/gb.svg
|
|
70
|
+
* @default null
|
|
71
71
|
*/
|
|
72
72
|
get src() {
|
|
73
73
|
return this._src;
|
|
@@ -90,7 +90,7 @@ let Flag = class Flag extends BasicElement {
|
|
|
90
90
|
set template(value) {
|
|
91
91
|
if (this._template !== value) {
|
|
92
92
|
this._template = value;
|
|
93
|
-
|
|
93
|
+
this.requestUpdate();
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CdnLoader, Deferred } from '@refinitiv-ui/utils';
|
|
1
|
+
import { CdnLoader, Deferred } from '@refinitiv-ui/utils/lib/loader.js';
|
|
2
2
|
const isUrl = (str) => (/^https?:\/\//i).test(str);
|
|
3
3
|
/**
|
|
4
4
|
* Caches and provides flag SVGs, Loaded either by name from CDN or directly by URL.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# ef-header
|
|
2
|
+
|
|
3
|
+
Use to identify and separate different sections of a page.
|
|
4
|
+
Headers helps to organize the page layout content into
|
|
5
|
+
a sensible hierarchy and improve the user experience.
|
|
6
|
+
|
|
7
|
+
## Properties
|
|
8
|
+
|
|
9
|
+
| Property | Attribute | Type | Default | Description |
|
|
10
|
+
|----------|-----------|---------------------|---------|------------------------------|
|
|
11
|
+
| `level` | `level` | `"1" \| "2" \| "3"` | "2" | Use level styling from theme |
|
|
12
|
+
|
|
13
|
+
## Slots
|
|
14
|
+
|
|
15
|
+
| Name | Description |
|
|
16
|
+
|---------|--------------------------------------------------|
|
|
17
|
+
| `left` | Slot to add custom contents to the left side of header e.g. ef-icon, ef-checkbox |
|
|
18
|
+
| `right` | Slot to add custom contents to the right side of header e.g. ef-icon, ef-checkbox |
|
package/lib/header/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import { BasicElement, TemplateResult,
|
|
2
|
+
import { BasicElement, TemplateResult, CSSResultGroup } from '@refinitiv-ui/core';
|
|
3
3
|
/**
|
|
4
4
|
* Use to identify and separate different sections of a page.
|
|
5
5
|
* Headers helps to organize the page layout content into
|
|
@@ -18,7 +18,7 @@ export declare class Header extends BasicElement {
|
|
|
18
18
|
* Style definition
|
|
19
19
|
* @return CSS template
|
|
20
20
|
*/
|
|
21
|
-
static get styles():
|
|
21
|
+
static get styles(): CSSResultGroup;
|
|
22
22
|
/**
|
|
23
23
|
* Use level styling from theme
|
|
24
24
|
*/
|
package/lib/header/index.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
import { BasicElement, html, css, customElement, property } from '@refinitiv-ui/core';
|
|
8
|
-
import { VERSION } from '../';
|
|
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';
|
|
9
6
|
/**
|
|
10
7
|
* Use to identify and separate different sections of a page.
|
|
11
8
|
* Headers helps to organize the page layout content into
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# ef-heatmap
|
|
2
|
+
|
|
3
|
+
A graphical representation of data where the individual
|
|
4
|
+
values contained in a matrix are represented as colors
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
| Property | Attribute | Type | Default | Description |
|
|
9
|
+
|-------------------|----------------|--------------------------|---------|--------------------------------------------------|
|
|
10
|
+
| `axisHidden` | `axis-hidden` | `boolean` | false | Hide all axes |
|
|
11
|
+
| `blend` | `blend` | `boolean` | false | Enable cell color blending |
|
|
12
|
+
| `config` | `config` | `HeatmapConfig` | null | Heatmap configuration options. |
|
|
13
|
+
| `labelHidden` | `label-hidden` | `boolean` | false | Hide all labels in the cells |
|
|
14
|
+
| `labelWidth` | `label-width` | `number` | 0 | Number of maximum label width that cell can paint in pixel.<br />e.g. label-width: 30px; cell label hides when text length reaches 30px. |
|
|
15
|
+
| `maxPoint` | `max-point` | `number` | 1 | Maximum point of the cell coloring |
|
|
16
|
+
| `midPoint` | `mid-point` | `number` | 0 | Middle point of the cell coloring |
|
|
17
|
+
| `minPoint` | `min-point` | `number` | -1 | Minimum point of the cell coloring |
|
|
18
|
+
| `renderCallback` | | `HeatmapRenderCallback` | | Render callback function use for custom cell properties.<br />Accepts custom label, foreground and background color |
|
|
19
|
+
| `saturation` | `saturation` | `number` | 0.4 | Cell minimum color saturation, value can be from 0 - 1 |
|
|
20
|
+
| `tooltipCallback` | | `HeatmapTooltipCallback` | | A callback function that allows tooltip rendering on cell hover |
|
|
21
|
+
|
|
22
|
+
## Methods
|
|
23
|
+
|
|
24
|
+
| Method | Type | Description |
|
|
25
|
+
|----------------------|---------------------|--------------------------------------------------|
|
|
26
|
+
| `getCellDataAtEvent` | `(event: any): any` | Returns data of interactive cell<br /><br />**event**: an event that occur while the user interacting with element |
|
package/lib/heatmap/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import { ResponsiveElement, TemplateResult,
|
|
3
|
-
import '../canvas';
|
|
4
|
-
import '../tooltip';
|
|
5
|
-
import { HeatmapCell, HeatmapConfig, HeatmapTooltipCallback, HeatmapRenderCallback } from './helpers/types';
|
|
6
|
-
export { HeatmapCell, HeatmapXAxis, HeatmapYAxis, HeatmapConfig, HeatmapTooltipCallback, HeatmapRenderCallback, HeatmapCustomisableProperties } from './helpers/types';
|
|
2
|
+
import { ResponsiveElement, TemplateResult, CSSResultGroup, PropertyValues } from '@refinitiv-ui/core';
|
|
3
|
+
import '../canvas/index.js';
|
|
4
|
+
import '../tooltip/index.js';
|
|
5
|
+
import type { HeatmapCell, HeatmapConfig, HeatmapTooltipCallback, HeatmapRenderCallback } from './helpers/types';
|
|
6
|
+
export type { HeatmapCell, HeatmapXAxis, HeatmapYAxis, HeatmapConfig, HeatmapTooltipCallback, HeatmapRenderCallback, HeatmapCustomisableProperties } from './helpers/types';
|
|
7
7
|
/**
|
|
8
8
|
* A graphical representation of data where the individual
|
|
9
9
|
* values contained in a matrix are represented as colors
|
|
@@ -15,12 +15,12 @@ export declare class Heatmap extends ResponsiveElement {
|
|
|
15
15
|
*/
|
|
16
16
|
static get version(): string;
|
|
17
17
|
/**
|
|
18
|
-
* A `
|
|
18
|
+
* A `CSSResultGroup` that will be used
|
|
19
19
|
* to style the host, slotted children
|
|
20
20
|
* and the internal template of the element.
|
|
21
21
|
* @returns CSS template
|
|
22
22
|
*/
|
|
23
|
-
static get styles():
|
|
23
|
+
static get styles(): CSSResultGroup;
|
|
24
24
|
/**
|
|
25
25
|
* Heatmap configuration options.
|
|
26
26
|
* @type {HeatmapConfig}
|
package/lib/heatmap/index.js
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
import {
|
|
8
|
-
import { color
|
|
9
|
-
import '../canvas';
|
|
10
|
-
import '../tooltip';
|
|
11
|
-
import { Track } from './helpers/track';
|
|
12
|
-
import { blend, brighten, darken, isLight, interpolate } from './helpers/color';
|
|
13
|
-
import { getResponsiveFontSize, getMaximumTextWidth, getMaximumLabelTextWidth, MIN_FONT_SIZE } from './helpers/text';
|
|
14
|
-
import { VERSION } from '../';
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { ResponsiveElement, 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 { query } from '@refinitiv-ui/core/lib/decorators/query.js';
|
|
6
|
+
import { VERSION } from '../version.js';
|
|
7
|
+
import { MicroTaskRunner } from '@refinitiv-ui/utils/lib/async.js';
|
|
8
|
+
import { color } from '@refinitiv-ui/utils/lib/color.js';
|
|
9
|
+
import '../canvas/index.js';
|
|
10
|
+
import '../tooltip/index.js';
|
|
11
|
+
import { Track } from './helpers/track.js';
|
|
12
|
+
import { blend, brighten, darken, isLight, interpolate } from './helpers/color.js';
|
|
13
|
+
import { getResponsiveFontSize, getMaximumTextWidth, getMaximumLabelTextWidth, MIN_FONT_SIZE } from './helpers/text.js';
|
|
15
14
|
const MAX_CELL_WIDTH_RATIO = 0.85;
|
|
16
15
|
const DEFAULT_CANVAS_RATIO = 0.75; // ratio — 4:3
|
|
17
16
|
/**
|
|
@@ -144,7 +143,7 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
144
143
|
return VERSION;
|
|
145
144
|
}
|
|
146
145
|
/**
|
|
147
|
-
* A `
|
|
146
|
+
* A `CSSResultGroup` that will be used
|
|
148
147
|
* to style the host, slotted children
|
|
149
148
|
* and the internal template of the element.
|
|
150
149
|
* @returns CSS template
|
|
@@ -204,7 +203,7 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
204
203
|
const previousHoverCell = this._hoverCell;
|
|
205
204
|
this._hoverCell = hoverCell;
|
|
206
205
|
if (this._hoverCell !== previousHoverCell) {
|
|
207
|
-
|
|
206
|
+
this.requestUpdate('hoverCell', previousHoverCell);
|
|
208
207
|
this.hoverCellChanged(this._hoverCell, previousHoverCell);
|
|
209
208
|
}
|
|
210
209
|
}
|
|
@@ -6,27 +6,29 @@
|
|
|
6
6
|
"attributes": [
|
|
7
7
|
{
|
|
8
8
|
"name": "icon",
|
|
9
|
-
"description": "Name of a known icon to render.",
|
|
9
|
+
"description": "Name of a known icon to render or URL of SVG icon.",
|
|
10
10
|
"type": "string | null"
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
"name": "src",
|
|
14
14
|
"description": "Src location of an svg icon.",
|
|
15
|
-
"type": "string | null"
|
|
15
|
+
"type": "string | null",
|
|
16
|
+
"deprecatedMessage": "Use `icon` instead"
|
|
16
17
|
}
|
|
17
18
|
],
|
|
18
19
|
"properties": [
|
|
19
20
|
{
|
|
20
21
|
"name": "icon",
|
|
21
22
|
"attribute": "icon",
|
|
22
|
-
"description": "Name of a known icon to render.",
|
|
23
|
+
"description": "Name of a known icon to render or URL of SVG icon.",
|
|
23
24
|
"type": "string | null"
|
|
24
25
|
},
|
|
25
26
|
{
|
|
26
27
|
"name": "src",
|
|
27
28
|
"attribute": "src",
|
|
28
29
|
"description": "Src location of an svg icon.",
|
|
29
|
-
"type": "string | null"
|
|
30
|
+
"type": "string | null",
|
|
31
|
+
"deprecatedMessage": "Use `icon` instead"
|
|
30
32
|
}
|
|
31
33
|
]
|
|
32
34
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# ef-icon
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import { BasicElement,
|
|
3
|
-
export { preload } from './utils/IconLoader';
|
|
2
|
+
import { BasicElement, CSSResultGroup, TemplateResult, PropertyValues } from '@refinitiv-ui/core';
|
|
3
|
+
export { preload } from './utils/IconLoader.js';
|
|
4
4
|
export declare class Icon extends BasicElement {
|
|
5
5
|
/**
|
|
6
6
|
* Element version number
|
|
@@ -8,16 +8,17 @@ export declare class Icon extends BasicElement {
|
|
|
8
8
|
*/
|
|
9
9
|
static get version(): string;
|
|
10
10
|
/**
|
|
11
|
-
* A `
|
|
11
|
+
* A `CSSResultGroup` that will be used
|
|
12
12
|
* to style the host, slotted children
|
|
13
13
|
* and the internal template of the element.
|
|
14
14
|
* @return CSS template
|
|
15
15
|
*/
|
|
16
|
-
static get styles():
|
|
16
|
+
static get styles(): CSSResultGroup;
|
|
17
17
|
private _icon;
|
|
18
18
|
/**
|
|
19
|
-
* Name of a known icon to render.
|
|
20
|
-
* @example heart
|
|
19
|
+
* Name of a known icon to render or URL of SVG icon.
|
|
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);
|
|
@@ -25,6 +26,8 @@ export declare class Icon extends BasicElement {
|
|
|
25
26
|
/**
|
|
26
27
|
* Src location of an svg icon.
|
|
27
28
|
* @example https://cdn.io/icons/heart.svg
|
|
29
|
+
* @deprecated Use `icon` instead
|
|
30
|
+
* @default null
|
|
28
31
|
*/
|
|
29
32
|
get src(): string | null;
|
|
30
33
|
set src(value: string | null);
|
package/lib/icon/index.js
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
import { IconLoader } from './utils/IconLoader';
|
|
10
|
-
export { preload } from './utils/IconLoader';
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { BasicElement, svg, 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 { unsafeSVG } from '@refinitiv-ui/core/lib/directives/unsafe-svg.js';
|
|
6
|
+
import { VERSION } from '../version.js';
|
|
7
|
+
import { IconLoader } from './utils/IconLoader.js';
|
|
8
|
+
export { preload } from './utils/IconLoader.js';
|
|
11
9
|
const EmptyTemplate = svg ``;
|
|
10
|
+
/**
|
|
11
|
+
* Cache for reusing SVG template results across multiple icons.
|
|
12
|
+
* Reusing these templates increases performance dramatically when many icons are rendered.
|
|
13
|
+
* As the cache key is an absolute URL, we can assume no clashes will occur.
|
|
14
|
+
*/
|
|
15
|
+
const iconTemplateCache = new Map();
|
|
12
16
|
let Icon = class Icon extends BasicElement {
|
|
13
17
|
constructor() {
|
|
14
18
|
super(...arguments);
|
|
@@ -24,7 +28,7 @@ let Icon = class Icon extends BasicElement {
|
|
|
24
28
|
return VERSION;
|
|
25
29
|
}
|
|
26
30
|
/**
|
|
27
|
-
* A `
|
|
31
|
+
* A `CSSResultGroup` that will be used
|
|
28
32
|
* to style the host, slotted children
|
|
29
33
|
* and the internal template of the element.
|
|
30
34
|
* @return CSS template
|
|
@@ -44,8 +48,9 @@ let Icon = class Icon extends BasicElement {
|
|
|
44
48
|
`;
|
|
45
49
|
}
|
|
46
50
|
/**
|
|
47
|
-
* Name of a known icon to render.
|
|
48
|
-
* @example heart
|
|
51
|
+
* Name of a known icon to render or URL of SVG icon.
|
|
52
|
+
* @example heart | https://cdn.io/icons/heart.svg
|
|
53
|
+
* @default null
|
|
49
54
|
*/
|
|
50
55
|
get icon() {
|
|
51
56
|
return this._icon;
|
|
@@ -55,12 +60,14 @@ let Icon = class Icon extends BasicElement {
|
|
|
55
60
|
if (oldValue !== value) {
|
|
56
61
|
this._icon = value;
|
|
57
62
|
void this.setIconSrc();
|
|
58
|
-
|
|
63
|
+
this.requestUpdate('icon', oldValue);
|
|
59
64
|
}
|
|
60
65
|
}
|
|
61
66
|
/**
|
|
62
67
|
* Src location of an svg icon.
|
|
63
68
|
* @example https://cdn.io/icons/heart.svg
|
|
69
|
+
* @deprecated Use `icon` instead
|
|
70
|
+
* @default null
|
|
64
71
|
*/
|
|
65
72
|
get src() {
|
|
66
73
|
return this._src;
|
|
@@ -83,7 +90,7 @@ let Icon = class Icon extends BasicElement {
|
|
|
83
90
|
set template(value) {
|
|
84
91
|
if (this._template !== value) {
|
|
85
92
|
this._template = value;
|
|
86
|
-
|
|
93
|
+
this.requestUpdate();
|
|
87
94
|
}
|
|
88
95
|
}
|
|
89
96
|
/**
|
|
@@ -113,10 +120,13 @@ let Icon = class Icon extends BasicElement {
|
|
|
113
120
|
* @returns {void}
|
|
114
121
|
*/
|
|
115
122
|
async loadAndRenderIcon(src) {
|
|
116
|
-
const
|
|
117
|
-
if (
|
|
118
|
-
|
|
123
|
+
const iconTemplateCacheItem = iconTemplateCache.get(src);
|
|
124
|
+
if (!iconTemplateCacheItem) {
|
|
125
|
+
iconTemplateCache.set(src, IconLoader.loadSVG(src)
|
|
126
|
+
.then(body => svg `${unsafeSVG(body)}`));
|
|
127
|
+
return this.loadAndRenderIcon(src); // Load again and await cache result
|
|
119
128
|
}
|
|
129
|
+
this.template = await iconTemplateCacheItem;
|
|
120
130
|
}
|
|
121
131
|
/**
|
|
122
132
|
* Get and cache CDN prefix
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CdnLoader } from '@refinitiv-ui/utils';
|
|
1
|
+
import { CdnLoader } from '@refinitiv-ui/utils/lib/loader.js';
|
|
2
2
|
/**
|
|
3
3
|
* Caches and provides icon SVGs, Loaded either by name from CDN or directly by URL.
|
|
4
4
|
* Uses singleton pattern
|
|
@@ -33,6 +33,11 @@ declare class IconLoader extends CdnLoader {
|
|
|
33
33
|
* @returns Promise, which will be resolved with complete source.
|
|
34
34
|
*/
|
|
35
35
|
getSrc(iconName: string): Promise<string>;
|
|
36
|
+
/**
|
|
37
|
+
* Loads icon and returns the body of the SVG
|
|
38
|
+
* @param icon Icon name to load
|
|
39
|
+
* @returns SVG body of the response
|
|
40
|
+
*/
|
|
36
41
|
loadSVG(icon: string): Promise<string | undefined>;
|
|
37
42
|
}
|
|
38
43
|
declare const iconLoaderInstance: IconLoader;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CdnLoader, Deferred } from '@refinitiv-ui/utils';
|
|
2
|
-
const isUrl = (str) => (/^https
|
|
1
|
+
import { CdnLoader, Deferred } from '@refinitiv-ui/utils/lib/loader.js';
|
|
2
|
+
const isUrl = (str) => (/^(https?:\/{2}|\.?\/)/i).test(str);
|
|
3
3
|
/**
|
|
4
4
|
* Caches and provides icon SVGs, Loaded either by name from CDN or directly by URL.
|
|
5
5
|
* Uses singleton pattern
|
|
@@ -50,26 +50,33 @@ class IconLoader extends CdnLoader {
|
|
|
50
50
|
* @returns Promise, which will be resolved with complete source.
|
|
51
51
|
*/
|
|
52
52
|
async getSrc(iconName) {
|
|
53
|
+
if (isUrl(iconName)) {
|
|
54
|
+
return iconName;
|
|
55
|
+
}
|
|
53
56
|
return iconName ? `${await this.getCdnPrefix()}${iconName}.svg` : '';
|
|
54
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* Loads icon and returns the body of the SVG
|
|
60
|
+
* @param icon Icon name to load
|
|
61
|
+
* @returns SVG body of the response
|
|
62
|
+
*/
|
|
55
63
|
async loadSVG(icon) {
|
|
56
|
-
if (icon) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
return Promise.resolve(container.innerHTML);
|
|
64
|
+
if (!icon) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
icon = await this.getSrc(icon);
|
|
68
|
+
const response = await this.load(icon);
|
|
69
|
+
if (response && response.status === 200 && response.getResponseHeader('content-type') === 'image/svg+xml') {
|
|
70
|
+
const container = document.createElement('svg');
|
|
71
|
+
container.innerHTML = response.responseText;
|
|
72
|
+
this.stripUnsafeNodes(...container.children);
|
|
73
|
+
const svgRoot = container.firstElementChild;
|
|
74
|
+
if (svgRoot) {
|
|
75
|
+
svgRoot.setAttribute('focusable', 'false'); /* disable IE11 focus on SVG root element */
|
|
70
76
|
}
|
|
71
|
-
return
|
|
77
|
+
return container.innerHTML;
|
|
72
78
|
}
|
|
79
|
+
return '';
|
|
73
80
|
}
|
|
74
81
|
}
|
|
75
82
|
const iconLoaderInstance = new IconLoader();
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -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": [
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# ef-interactive-chart
|
|
2
|
+
|
|
3
|
+
A charting component that allows you to create several use cases of financial chart.
|
|
4
|
+
By lightweight-charts library.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
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`. |
|
|
14
|
+
|
|
15
|
+
## Methods
|
|
16
|
+
|
|
17
|
+
| Method | Type | Description |
|
|
18
|
+
|----------|--------------|------------------------------------------------|
|
|
19
|
+
| `colors` | `(): object` | List of available chart colors from the theme. |
|
|
20
|
+
|
|
21
|
+
## Events
|
|
22
|
+
|
|
23
|
+
| Event | Description |
|
|
24
|
+
|---------------|--------------------------------------|
|
|
25
|
+
| `initialized` | Dispatched when chart is initialized |
|
|
26
|
+
|
|
27
|
+
## Slots
|
|
28
|
+
|
|
29
|
+
| Name | Description |
|
|
30
|
+
|----------|---------------------------------------------|
|
|
31
|
+
| `legend` | Slot to use for implementing custom legend. |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { LineData, BarData, HistogramData, DeepPartial, ChartOptions, SeriesPartialOptions, LineSeriesPartialOptions, AreaSeriesPartialOptions, BarSeriesPartialOptions, CandlestickSeriesPartialOptions, HistogramSeriesPartialOptions, LineStyleOptions, AreaStyleOptions, BarStyleOptions, CandlestickStyleOptions, HistogramStyleOptions, ISeriesApi, SeriesType } from 'lightweight-charts';
|
|
2
|
-
import type { RGBColor, HSLColor } from '@refinitiv-ui/utils';
|
|
1
|
+
import type { LineData, BarData, HistogramData, DeepPartial, ChartOptions, SeriesPartialOptions, LineSeriesPartialOptions, AreaSeriesPartialOptions, BarSeriesPartialOptions, CandlestickSeriesPartialOptions, HistogramSeriesPartialOptions, LineStyleOptions, AreaStyleOptions, BarStyleOptions, CandlestickStyleOptions, HistogramStyleOptions, ISeriesApi, SeriesType } from 'lightweight-charts';
|
|
2
|
+
import type { RGBColor, HSLColor } from '@refinitiv-ui/utils/lib/color.js';
|
|
3
3
|
declare type SeriesOptions = AreaSeriesPartialOptions | BarSeriesPartialOptions | CandlestickSeriesPartialOptions | HistogramSeriesPartialOptions | LineSeriesPartialOptions;
|
|
4
4
|
declare type SeriesStyleOptions = LineStyleOptions & AreaStyleOptions & BarStyleOptions & CandlestickStyleOptions & HistogramStyleOptions;
|
|
5
5
|
declare type SeriesData = LineData[] | BarData[] | HistogramData[];
|