@refinitiv-ui/elements 6.8.7 → 6.8.9
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 +180 -433
- package/LICENSE +1 -1
- package/README.md +13 -11
- 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.d.ts +1 -1
- 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 +22 -14
- package/lib/notification/helpers/status.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 +70 -83
- 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/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 +16 -16
- package/tsconfig.tsbuildinfo +1 -1
package/lib/dialog/index.js
CHANGED
|
@@ -3,16 +3,16 @@ import { css, html } from '@refinitiv-ui/core';
|
|
|
3
3
|
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
|
|
4
4
|
import { property } from '@refinitiv-ui/core/decorators/property.js';
|
|
5
5
|
import { query } from '@refinitiv-ui/core/decorators/query.js';
|
|
6
|
-
import
|
|
6
|
+
import '@refinitiv-ui/phrasebook/locale/en/dialog.js';
|
|
7
|
+
import { TranslatePropertyKey, translate } from '@refinitiv-ui/translate';
|
|
7
8
|
import { isIE } from '@refinitiv-ui/utils/browser.js';
|
|
8
|
-
import
|
|
9
|
-
import
|
|
9
|
+
import '../button/index.js';
|
|
10
|
+
import '../header/index.js';
|
|
10
11
|
import '../icon/index.js';
|
|
12
|
+
import { Overlay } from '../overlay/index.js';
|
|
11
13
|
import '../panel/index.js';
|
|
12
|
-
import '../
|
|
13
|
-
import '
|
|
14
|
-
import { translate, TranslatePropertyKey } from '@refinitiv-ui/translate';
|
|
15
|
-
import '@refinitiv-ui/phrasebook/locale/en/dialog.js';
|
|
14
|
+
import { VERSION } from '../version.js';
|
|
15
|
+
import { deregister as draggableDeregister, register as draggableRegister } from './draggable-element.js';
|
|
16
16
|
/**
|
|
17
17
|
* Popup window, designed to contain and show any HTML content.
|
|
18
18
|
* It provides modal and dragging functionality,
|
|
@@ -95,38 +95,38 @@ let Dialog = class Dialog extends Overlay {
|
|
|
95
95
|
return [
|
|
96
96
|
super.styles,
|
|
97
97
|
css `
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
98
|
+
:host {
|
|
99
|
+
width: 400px;
|
|
100
|
+
display: flex;
|
|
101
|
+
flex-flow: column nowrap;
|
|
102
|
+
flex-grow: 1;
|
|
103
|
+
flex-shrink: 1;
|
|
104
|
+
flex-basis: auto;
|
|
105
|
+
}
|
|
106
106
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
107
|
+
[part='content'] {
|
|
108
|
+
flex: 1 1 auto;
|
|
109
|
+
overflow-x: hidden;
|
|
110
|
+
overflow-y: auto;
|
|
111
|
+
-webkit-overflow-scrolling: touch;
|
|
112
|
+
}
|
|
113
113
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
114
|
+
[part='default-buttons'] {
|
|
115
|
+
display: flex;
|
|
116
|
+
justify-content: flex-end;
|
|
117
|
+
align-items: center;
|
|
118
|
+
}
|
|
119
119
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
120
|
+
[part='header'],
|
|
121
|
+
[part='footer'] {
|
|
122
|
+
flex: none;
|
|
123
|
+
}
|
|
124
124
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
125
|
+
[part='close'] {
|
|
126
|
+
flex: none;
|
|
127
|
+
cursor: pointer;
|
|
128
|
+
}
|
|
129
|
+
`
|
|
130
130
|
];
|
|
131
131
|
}
|
|
132
132
|
disconnectedCallback() {
|
|
@@ -159,8 +159,12 @@ let Dialog = class Dialog extends Overlay {
|
|
|
159
159
|
*/
|
|
160
160
|
shouldUpdate(changedProperties) {
|
|
161
161
|
const shouldUpdate = super.shouldUpdate(changedProperties);
|
|
162
|
-
return shouldUpdate
|
|
163
|
-
|
|
162
|
+
return (shouldUpdate ||
|
|
163
|
+
((changedProperties.has('draggable') ||
|
|
164
|
+
changedProperties.has('header') ||
|
|
165
|
+
changedProperties.has('noInteractionLock') ||
|
|
166
|
+
changedProperties.has(TranslatePropertyKey)) &&
|
|
167
|
+
this.opened));
|
|
164
168
|
}
|
|
165
169
|
/**
|
|
166
170
|
* Compute property values that depend on other properties
|
|
@@ -331,7 +335,13 @@ let Dialog = class Dialog extends Overlay {
|
|
|
331
335
|
get headerRegion() {
|
|
332
336
|
return html `
|
|
333
337
|
${this.header === null ? this.t('HEADER') : this.header}
|
|
334
|
-
<ef-icon
|
|
338
|
+
<ef-icon
|
|
339
|
+
aria-hidden="true"
|
|
340
|
+
part="close"
|
|
341
|
+
icon="cross"
|
|
342
|
+
slot="right"
|
|
343
|
+
@tap="${this.defaultCancel}"
|
|
344
|
+
></ef-icon>
|
|
335
345
|
`;
|
|
336
346
|
}
|
|
337
347
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
2
|
import { PropertyValues } from '@refinitiv-ui/core';
|
|
3
|
+
import { TemplateMap } from '@refinitiv-ui/core/directives/template-map.js';
|
|
3
4
|
import '../icon/index.js';
|
|
4
5
|
import { TextField } from '../text-field/index.js';
|
|
5
|
-
import { TemplateMap } from '@refinitiv-ui/core/directives/template-map.js';
|
|
6
6
|
/**
|
|
7
7
|
* A form control element for email.
|
|
8
8
|
*
|
package/lib/email-field/index.js
CHANGED
|
@@ -62,9 +62,9 @@ let EmailField = class EmailField extends TextField {
|
|
|
62
62
|
get decorateInputMap() {
|
|
63
63
|
return {
|
|
64
64
|
...super.decorateInputMap,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
type: 'email',
|
|
66
|
+
inputmode: 'email',
|
|
67
|
+
multiple: this.multiple
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
70
|
/**
|
|
@@ -75,9 +75,9 @@ let EmailField = class EmailField extends TextField {
|
|
|
75
75
|
/* istanbul ignore next */
|
|
76
76
|
shouldValidateInput(changedProperties) {
|
|
77
77
|
// TODO: This validation should be refactored
|
|
78
|
-
return changedProperties.has('value')
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
return (changedProperties.has('value') ||
|
|
79
|
+
changedProperties.has('multiple') ||
|
|
80
|
+
super.shouldValidateInput(changedProperties));
|
|
81
81
|
}
|
|
82
82
|
};
|
|
83
83
|
__decorate([
|
package/lib/events.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { FocusedChangedEvent, ResizeEvent, TapEvent } from '@refinitiv-ui/core';
|
|
2
2
|
/**
|
|
3
3
|
* Dispatched when `opened` state changes
|
|
4
4
|
* Prevent default to stop opening/closing pipeline
|
package/lib/flag/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import { BasicElement, CSSResultGroup,
|
|
2
|
+
import { BasicElement, CSSResultGroup, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
|
|
3
3
|
export { preload } from './utils/FlagLoader.js';
|
|
4
4
|
export declare class Flag extends BasicElement {
|
|
5
5
|
/**
|
package/lib/flag/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { BasicElement,
|
|
2
|
+
import { BasicElement, DeprecationNotice, css, svg } from '@refinitiv-ui/core';
|
|
3
3
|
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
|
|
4
4
|
import { property } from '@refinitiv-ui/core/decorators/property.js';
|
|
5
5
|
import { unsafeHTML } from '@refinitiv-ui/core/directives/unsafe-html.js';
|
|
@@ -57,9 +57,11 @@ let Flag = class Flag extends BasicElement {
|
|
|
57
57
|
return this._flag;
|
|
58
58
|
}
|
|
59
59
|
set flag(value) {
|
|
60
|
-
|
|
60
|
+
const oldValue = this._flag;
|
|
61
|
+
if (oldValue !== value) {
|
|
61
62
|
this._flag = value;
|
|
62
63
|
void this.setFlagSrc();
|
|
64
|
+
this.requestUpdate('flag', oldValue);
|
|
63
65
|
}
|
|
64
66
|
}
|
|
65
67
|
/**
|
|
@@ -140,8 +142,7 @@ let Flag = class Flag extends BasicElement {
|
|
|
140
142
|
*/
|
|
141
143
|
setPrefix() {
|
|
142
144
|
if (!FlagLoader.isPrefixSet) {
|
|
143
|
-
const CDNPrefix = this.getComputedVariable('--cdn-prefix')
|
|
144
|
-
.replace(/^('|")|('|")$/g, '');
|
|
145
|
+
const CDNPrefix = this.getComputedVariable('--cdn-prefix').replace(/^('|")|('|")$/g, '');
|
|
145
146
|
FlagLoader.setCdnPrefix(CDNPrefix);
|
|
146
147
|
}
|
|
147
148
|
}
|
|
@@ -162,7 +163,7 @@ let Flag = class Flag extends BasicElement {
|
|
|
162
163
|
}
|
|
163
164
|
};
|
|
164
165
|
__decorate([
|
|
165
|
-
property({ type: String })
|
|
166
|
+
property({ type: String, reflect: true })
|
|
166
167
|
], Flag.prototype, "flag", null);
|
|
167
168
|
__decorate([
|
|
168
169
|
property({ type: String })
|
|
@@ -15,5 +15,5 @@ export { flagLoaderInstance as FlagLoader };
|
|
|
15
15
|
* @returns Array of promises, which will be resolved with SVG bodies.
|
|
16
16
|
*/
|
|
17
17
|
export const preload = (...attrs) => {
|
|
18
|
-
return attrs.map(flag => flagLoaderInstance.loadSVG(flag));
|
|
18
|
+
return attrs.map((flag) => flagLoaderInstance.loadSVG(flag));
|
|
19
19
|
};
|
package/lib/header/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import { BasicElement,
|
|
2
|
+
import { BasicElement, CSSResultGroup, TemplateResult } 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
|
package/lib/header/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { BasicElement,
|
|
2
|
+
import { BasicElement, css, html } from '@refinitiv-ui/core';
|
|
3
3
|
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
|
|
4
4
|
import { property } from '@refinitiv-ui/core/decorators/property.js';
|
|
5
5
|
import { VERSION } from '../version.js';
|
|
@@ -40,7 +40,7 @@ let Header = class Header extends BasicElement {
|
|
|
40
40
|
margin-bottom: 0;
|
|
41
41
|
vertical-align: middle;
|
|
42
42
|
}
|
|
43
|
-
[part=
|
|
43
|
+
[part='label'] {
|
|
44
44
|
text-align: inherit;
|
|
45
45
|
}
|
|
46
46
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-header', styles: ':host{color:#ccc;padding:0 0 0 4px;height:28px;font-size:12px;font-family:inherit;white-space:nowrap;box-sizing:border-box;display:flex;align-items:center;overflow:hidden;background-color:#333;text-transform:uppercase}:host [part=spacer]{flex:none;width:4px}:host [part=label]{flex:1 1 auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-right:8px}:host ::slotted(ef-button[transparent]){color:inherit!important}:host([level
|
|
1
|
+
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-header', styles: ':host{color:#ccc;padding:0 0 0 4px;height:28px;font-size:12px;font-family:inherit;white-space:nowrap;box-sizing:border-box;display:flex;align-items:center;overflow:hidden;background-color:#333;text-transform:uppercase}:host [part=spacer]{flex:none;width:4px}:host [part=label]{flex:1 1 auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-right:8px}:host ::slotted(ef-button[transparent]){color:inherit!important}:host([level=\'1\']){background-color:#404040}:host([level=\'3\']){background-color:#262626}:host([level=\'4\']){background-color:#1a1a1a}' }}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-header', styles: ':host{color:#0d0d0d;padding:0 0 0 4px;height:28px;font-size:12px;font-family:inherit;white-space:nowrap;box-sizing:border-box;display:flex;align-items:center;overflow:hidden;background-color:#e6e6e6;text-transform:uppercase}:host [part=spacer]{flex:none;width:4px}:host [part=label]{flex:1 1 auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-right:8px}:host ::slotted(ef-button[transparent]){color:inherit!important}:host([level
|
|
1
|
+
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-header', styles: ':host{color:#0d0d0d;padding:0 0 0 4px;height:28px;font-size:12px;font-family:inherit;white-space:nowrap;box-sizing:border-box;display:flex;align-items:center;overflow:hidden;background-color:#e6e6e6;text-transform:uppercase}:host [part=spacer]{flex:none;width:4px}:host [part=label]{flex:1 1 auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-right:8px}:host ::slotted(ef-button[transparent]){color:inherit!important}:host([level=\'1\']){background-color:#d9d9d9}:host([level=\'3\']){background-color:#f2f2f2}:host([level=\'4\']){background-color:#fafafa}' }}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-header', styles: ':host{padding:0 0 0 5px;height:27px;font-size:14px;font-family:inherit;white-space:nowrap;box-sizing:border-box;display:flex;align-items:center;overflow:hidden;position:relative;color:#c2c2c2;background-color:#2e2e33}:host [part=spacer]{flex:none;width:5px}:host [part=label]{flex:1 1 auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-right:10px;font-weight:600;text-transform:uppercase}:host ::slotted(ef-button[transparent]){color:inherit!important}:host([level
|
|
1
|
+
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-header', styles: ':host{padding:0 0 0 5px;height:27px;font-size:14px;font-family:inherit;white-space:nowrap;box-sizing:border-box;display:flex;align-items:center;overflow:hidden;position:relative;color:#c2c2c2;background-color:#2e2e33}:host [part=spacer]{flex:none;width:5px}:host [part=label]{flex:1 1 auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-right:10px;font-weight:600;text-transform:uppercase}:host ::slotted(ef-button[transparent]){color:inherit!important}:host([level=\'3\']) [part=label]{text-transform:none}:host([level=\'1\']){color:#e2e2e2;background-color:#4a4a52;background-image:linear-gradient(rgba(255,255,255,.03) 0,rgba(255,255,255,0) 100%)}:host([level=\'3\']){color:#8c8c8c;background-color:#212124}' }}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-header', styles: ':host{padding:0 0 0 5px;height:27px;font-size:14px;font-family:inherit;white-space:nowrap;box-sizing:border-box;display:flex;align-items:center;overflow:hidden;position:relative;color:#505050;background-color:#d0d4db}:host [part=spacer]{flex:none;width:5px}:host [part=label]{flex:1 1 auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-right:10px;font-weight:600;text-transform:uppercase}:host ::slotted(ef-button[transparent]){color:inherit!important}:host([level
|
|
1
|
+
dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-header', styles: ':host{padding:0 0 0 5px;height:27px;font-size:14px;font-family:inherit;white-space:nowrap;box-sizing:border-box;display:flex;align-items:center;overflow:hidden;position:relative;color:#505050;background-color:#d0d4db}:host [part=spacer]{flex:none;width:5px}:host [part=label]{flex:1 1 auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-right:10px;font-weight:600;text-transform:uppercase}:host ::slotted(ef-button[transparent]){color:inherit!important}:host([level=\'3\']) [part=label]{text-transform:none}:host([level=\'1\']){color:#484848;background-color:#bec3cc;background-image:linear-gradient(rgba(255,255,255,.18) 0,rgba(255,255,255,0) 100%)}:host([level=\'3\']){color:#6e6e78;background-color:#e4e8ed}' }}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* istanbul ignore file */
|
|
2
|
-
import { color, rgb, hsl } from '@refinitiv-ui/utils/color.js';
|
|
3
2
|
import { interpolate } from 'd3-interpolate';
|
|
3
|
+
import { color, hsl, rgb } from '@refinitiv-ui/utils/color.js';
|
|
4
4
|
/**
|
|
5
5
|
* Check if the color is a light color
|
|
6
6
|
* @param col color to check
|
|
@@ -8,7 +8,7 @@ import { interpolate } from 'd3-interpolate';
|
|
|
8
8
|
*/
|
|
9
9
|
const isLight = (col) => {
|
|
10
10
|
const { r, g, b } = rgb(col);
|
|
11
|
-
return (
|
|
11
|
+
return (r * 299 + g * 587 + b * 114) / 1000 > 128;
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
14
|
* Brightens a color
|
|
@@ -58,9 +58,15 @@ const blend = (color1, color2, backgroundColor, amount) => {
|
|
|
58
58
|
mixBlueComponent = !mixBlueComponent;
|
|
59
59
|
}
|
|
60
60
|
const factor = 1 - Math.abs(amount);
|
|
61
|
-
const red = mixRedComponent
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
const red = mixRedComponent
|
|
62
|
+
? Math.round(interpolate(primaryColor.r, secondaryColor.r)(factor))
|
|
63
|
+
: primaryColor.r;
|
|
64
|
+
const green = mixGreenComponent
|
|
65
|
+
? Math.round(interpolate(primaryColor.g, secondaryColor.g)(factor))
|
|
66
|
+
: primaryColor.g;
|
|
67
|
+
const blue = mixBlueComponent
|
|
68
|
+
? Math.round(interpolate(primaryColor.b, secondaryColor.b)(factor))
|
|
69
|
+
: primaryColor.b;
|
|
64
70
|
return color(`rgb(${red}, ${green}, ${blue})`)?.toString() || '';
|
|
65
71
|
};
|
|
66
72
|
export { blend, brighten, darken, isLight, interpolate };
|
|
@@ -67,10 +67,10 @@ export class Track {
|
|
|
67
67
|
this._laneStarts[0] = 0;
|
|
68
68
|
if (trackSize && laneCount) {
|
|
69
69
|
let start = 0;
|
|
70
|
-
const laneSize =
|
|
70
|
+
const laneSize = trackSize / laneCount;
|
|
71
71
|
for (let i = 0; i < laneCount; ++i) {
|
|
72
72
|
const end = start + laneSize;
|
|
73
|
-
this._laneStarts[i] =
|
|
73
|
+
this._laneStarts[i] = start | 0;
|
|
74
74
|
this._laneSizes[i] = (end | 0) - (start | 0);
|
|
75
75
|
start = end;
|
|
76
76
|
}
|
|
@@ -121,7 +121,7 @@ export class Track {
|
|
|
121
121
|
*/
|
|
122
122
|
getContentSize(index) {
|
|
123
123
|
const contentSize = this.getLaneSize(index) - this._margin - this._margin;
|
|
124
|
-
return
|
|
124
|
+
return contentSize > 0 ? contentSize : 0;
|
|
125
125
|
}
|
|
126
126
|
/**
|
|
127
127
|
* Get content start position
|
package/lib/heatmap/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import {
|
|
2
|
+
import { CSSResultGroup, PropertyValues, ResponsiveElement, TemplateResult } from '@refinitiv-ui/core';
|
|
3
3
|
import '../canvas/index.js';
|
|
4
4
|
import '../tooltip/index.js';
|
|
5
|
-
import type {
|
|
5
|
+
import type { HeatmapCell, HeatmapConfig, HeatmapCustomisableProperties, HeatmapRenderCallback, HeatmapTooltipCallback, HeatmapXAxis, HeatmapYAxis } from './helpers/types';
|
|
6
6
|
export type { HeatmapXAxis, HeatmapCell, HeatmapConfig, HeatmapYAxis, HeatmapCustomisableProperties, HeatmapTooltipCallback, HeatmapRenderCallback };
|
|
7
7
|
/**
|
|
8
8
|
* A graphical representation of data where the individual
|
|
@@ -239,9 +239,9 @@ export declare class Heatmap extends ResponsiveElement {
|
|
|
239
239
|
*/
|
|
240
240
|
private initialiseRowTrack;
|
|
241
241
|
/**
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
242
|
+
* Initialize column track
|
|
243
|
+
* @returns {void}
|
|
244
|
+
*/
|
|
245
245
|
private initialiseColumnTrack;
|
|
246
246
|
/**
|
|
247
247
|
* Hit testing on heatmap
|
|
@@ -404,10 +404,10 @@ export declare class Heatmap extends ResponsiveElement {
|
|
|
404
404
|
*/
|
|
405
405
|
private paintAllCellBackground;
|
|
406
406
|
/**
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
407
|
+
* Paints a single cell background colour
|
|
408
|
+
* @param {HeatmapCell} cell cell to paint
|
|
409
|
+
* @returns {void}
|
|
410
|
+
*/
|
|
411
411
|
private paintCellBackground;
|
|
412
412
|
/**
|
|
413
413
|
* Construct and renders x-axis
|
package/lib/heatmap/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { ResponsiveElement,
|
|
2
|
+
import { ResponsiveElement, css, html } from '@refinitiv-ui/core';
|
|
3
3
|
import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
|
|
4
4
|
import { property } from '@refinitiv-ui/core/decorators/property.js';
|
|
5
5
|
import { query } from '@refinitiv-ui/core/decorators/query.js';
|
|
6
|
-
import { VERSION } from '../version.js';
|
|
7
6
|
import { MicroTaskRunner } from '@refinitiv-ui/utils/async.js';
|
|
8
7
|
import { color } from '@refinitiv-ui/utils/color.js';
|
|
9
8
|
import '../canvas/index.js';
|
|
10
9
|
import '../tooltip/index.js';
|
|
10
|
+
import { VERSION } from '../version.js';
|
|
11
|
+
import { blend, brighten, darken, interpolate, isLight } from './helpers/color.js';
|
|
12
|
+
import { MIN_FONT_SIZE, getMaximumTextWidth, getResponsiveFontSize } from './helpers/text.js';
|
|
11
13
|
import { Track } from './helpers/track.js';
|
|
12
|
-
import { blend, brighten, darken, isLight, interpolate } from './helpers/color.js';
|
|
13
|
-
import { getResponsiveFontSize, getMaximumTextWidth, MIN_FONT_SIZE } from './helpers/text.js';
|
|
14
14
|
const CELL_PADDING = 0.12;
|
|
15
15
|
const CELL_MAX_TEXT_WIDTH = 1 - CELL_PADDING;
|
|
16
16
|
const DEFAULT_CANVAS_RATIO = 0.75; // ratio — 4:3
|
|
@@ -37,13 +37,13 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
37
37
|
:host {
|
|
38
38
|
display: block;
|
|
39
39
|
}
|
|
40
|
-
#container{
|
|
40
|
+
#container {
|
|
41
41
|
width: 100%;
|
|
42
42
|
height: 100%;
|
|
43
43
|
display: flex;
|
|
44
44
|
}
|
|
45
45
|
#canvas-container {
|
|
46
|
-
min-width:0;
|
|
46
|
+
min-width: 0;
|
|
47
47
|
display: flex;
|
|
48
48
|
width: 100%;
|
|
49
49
|
flex-direction: column;
|
|
@@ -52,14 +52,14 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
52
52
|
#tooltip-overlay {
|
|
53
53
|
position: absolute;
|
|
54
54
|
}
|
|
55
|
-
[part=canvas] {
|
|
55
|
+
[part='canvas'] {
|
|
56
56
|
flex-grow: 1;
|
|
57
57
|
}
|
|
58
|
-
[part=x-axis] {
|
|
58
|
+
[part='x-axis'] {
|
|
59
59
|
display: flex;
|
|
60
60
|
align-items: center;
|
|
61
61
|
}
|
|
62
|
-
[part=y-axis]{
|
|
62
|
+
[part='y-axis'] {
|
|
63
63
|
display: flex;
|
|
64
64
|
flex-direction: column;
|
|
65
65
|
}
|
|
@@ -134,7 +134,7 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
134
134
|
*/
|
|
135
135
|
get columnCount() {
|
|
136
136
|
let result = 0;
|
|
137
|
-
this.rows?.forEach(columns => {
|
|
137
|
+
this.rows?.forEach((columns) => {
|
|
138
138
|
if (columns.length > result) {
|
|
139
139
|
result = columns.length;
|
|
140
140
|
}
|
|
@@ -268,14 +268,14 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
268
268
|
this.labelHiddenChanged();
|
|
269
269
|
}
|
|
270
270
|
// Re-paints whole canvas when at least one of the following properties changes
|
|
271
|
-
if (changedProperties.has('config')
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
271
|
+
if (changedProperties.has('config') ||
|
|
272
|
+
changedProperties.has('blend') ||
|
|
273
|
+
changedProperties.has('minPoint') ||
|
|
274
|
+
changedProperties.has('midPoint') ||
|
|
275
|
+
changedProperties.has('maxPoint') ||
|
|
276
|
+
changedProperties.has('saturation') ||
|
|
277
|
+
changedProperties.has('axisHidden') ||
|
|
278
|
+
changedProperties.has('labelWidth')) {
|
|
279
279
|
this.prepareAndPaint();
|
|
280
280
|
}
|
|
281
281
|
}
|
|
@@ -293,7 +293,8 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
293
293
|
*/
|
|
294
294
|
/* istanbul ignore next */
|
|
295
295
|
onMouseMove(event) {
|
|
296
|
-
if (event.composedPath().includes(this.canvas) ||
|
|
296
|
+
if (event.composedPath().includes(this.canvas) ||
|
|
297
|
+
(this.tooltipCallback && this.tooltipOverlay === event.target)) {
|
|
297
298
|
this.hoverCell = this.hitTest(event);
|
|
298
299
|
}
|
|
299
300
|
else {
|
|
@@ -348,9 +349,9 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
348
349
|
this.rowTrack.margin = this.cellMargin;
|
|
349
350
|
}
|
|
350
351
|
/**
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
352
|
+
* Initialize column track
|
|
353
|
+
* @returns {void}
|
|
354
|
+
*/
|
|
354
355
|
initialiseColumnTrack() {
|
|
355
356
|
this.colTrack.init(this.offsetWidth, this.columnCount);
|
|
356
357
|
this.colTrack.margin = this.cellMargin;
|
|
@@ -635,7 +636,7 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
635
636
|
const label = typeof cell.customLabel === 'string' ? cell.customLabel : cell.label;
|
|
636
637
|
if (this.canvasContext) {
|
|
637
638
|
this.canvasContext.fillStyle = cell.customForegroundColor || cell.foregroundColor;
|
|
638
|
-
this.canvasContext.fillText(label || '', cell.x + cell.width / 2,
|
|
639
|
+
this.canvasContext.fillText(label || '', cell.x + cell.width / 2, cell.y + 1 + cell.height / 2 + margin);
|
|
639
640
|
}
|
|
640
641
|
}
|
|
641
642
|
/**
|
|
@@ -660,12 +661,15 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
660
661
|
canvas.textAlign = 'center';
|
|
661
662
|
canvas.textBaseline = 'middle';
|
|
662
663
|
canvas.font = `${fontSize}px ${fontFamily}`;
|
|
663
|
-
let isWithinMinCellWidth = (
|
|
664
|
+
let isWithinMinCellWidth = (this.labelWidth || getMaximumTextWidth(canvas, this.cells, this.hasCellHeader)) / contentWidth <=
|
|
665
|
+
CELL_MAX_TEXT_WIDTH;
|
|
664
666
|
// Tries to get the largest possible font size that is within `CELL_MAX_TEXT_WIDTH`
|
|
665
667
|
if (!isWithinMinCellWidth && fontSize !== MIN_FONT_SIZE) {
|
|
666
668
|
while (!isWithinMinCellWidth) {
|
|
667
669
|
canvas.font = `${fontSize}px ${fontFamily}`; // Should assigned new font size to canvas before calculated again.
|
|
668
|
-
isWithinMinCellWidth =
|
|
670
|
+
isWithinMinCellWidth =
|
|
671
|
+
(this.labelWidth || getMaximumTextWidth(canvas, this.cells, this.hasCellHeader)) / contentWidth <=
|
|
672
|
+
CELL_MAX_TEXT_WIDTH;
|
|
669
673
|
// Stops when reaches minimum font-size
|
|
670
674
|
if (fontSize === MIN_FONT_SIZE) {
|
|
671
675
|
break;
|
|
@@ -675,7 +679,9 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
675
679
|
}
|
|
676
680
|
}
|
|
677
681
|
}
|
|
678
|
-
const isWithinMinCellHeight = this.hasCellHeader
|
|
682
|
+
const isWithinMinCellHeight = this.hasCellHeader
|
|
683
|
+
? fontSize * 2 < contentHeight
|
|
684
|
+
: fontSize < contentHeight;
|
|
679
685
|
this.contentWithinCellBoundary = isWithinMinCellWidth && isWithinMinCellHeight;
|
|
680
686
|
return this.contentWithinCellBoundary;
|
|
681
687
|
}
|
|
@@ -727,10 +733,10 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
727
733
|
}
|
|
728
734
|
const saturateRatio = 1 - saturation;
|
|
729
735
|
if (value > this.midPoint) {
|
|
730
|
-
return ((value - this.midPoint) / (this.maxPoint - this.midPoint) * saturateRatio
|
|
736
|
+
return ((value - this.midPoint) / (this.maxPoint - this.midPoint)) * saturateRatio + saturation;
|
|
731
737
|
}
|
|
732
738
|
else {
|
|
733
|
-
return ((value - this.midPoint) / (this.midPoint - this.minPoint) * saturateRatio
|
|
739
|
+
return ((value - this.midPoint) / (this.midPoint - this.minPoint)) * saturateRatio - saturation;
|
|
734
740
|
}
|
|
735
741
|
}
|
|
736
742
|
/**
|
|
@@ -783,7 +789,7 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
783
789
|
const margin = this.labelHidden ? 0 : this.calculateHeaderMargin(cell.height);
|
|
784
790
|
this.canvasContext.font = 'bold ' + labelFontStyle;
|
|
785
791
|
this.canvasContext.fillStyle = cell.customForegroundColor || cell.foregroundColor;
|
|
786
|
-
this.canvasContext.fillText(cell.header || '', cell.x + cell.width / 2,
|
|
792
|
+
this.canvasContext.fillText(cell.header || '', cell.x + cell.width / 2, cell.y + 1 + cell.height / 2 - margin);
|
|
787
793
|
// Reverts font style to paint label correctly
|
|
788
794
|
this.canvasContext.font = labelFontStyle;
|
|
789
795
|
}
|
|
@@ -823,10 +829,10 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
823
829
|
}
|
|
824
830
|
}
|
|
825
831
|
/**
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
832
|
+
* Paints a single cell background colour
|
|
833
|
+
* @param {HeatmapCell} cell cell to paint
|
|
834
|
+
* @returns {void}
|
|
835
|
+
*/
|
|
830
836
|
paintCellBackground(cell) {
|
|
831
837
|
if (this.canvasContext) {
|
|
832
838
|
this.canvasContext.fillStyle = cell.customBackgroundColor || cell.backgroundColor;
|
|
@@ -947,7 +953,7 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
947
953
|
yAxisElement.removeChild(yAxisElement.lastChild);
|
|
948
954
|
}
|
|
949
955
|
}
|
|
950
|
-
this.rowTrack.init(this.offsetHeight - (this.crossBox.offsetHeight +
|
|
956
|
+
this.rowTrack.init(this.offsetHeight - (this.crossBox.offsetHeight + this.cellMargin * 2), this.rowCount);
|
|
951
957
|
// Clear yAxis element before re-create yAxis
|
|
952
958
|
while (yAxisElement.children.length > laneCount) {
|
|
953
959
|
if (yAxisElement.lastChild) {
|
|
@@ -1011,20 +1017,23 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
1011
1017
|
render() {
|
|
1012
1018
|
return html `
|
|
1013
1019
|
<div id="container" @mousemove=${this.onMouseMove} @mouseleave=${this.onMouseLeave}>
|
|
1014
|
-
${this.config?.yAxis && !this.axisHidden
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1020
|
+
${this.config?.yAxis && !this.axisHidden
|
|
1021
|
+
? html ` <div id="y-axis-container">
|
|
1022
|
+
<div part="cross-box"></div>
|
|
1023
|
+
<div part="y-axis"></div>
|
|
1024
|
+
</div>`
|
|
1025
|
+
: null}
|
|
1019
1026
|
<div id="canvas-container">
|
|
1020
1027
|
${this.config?.xAxis && !this.axisHidden ? html `<div part="x-axis"></div>` : null}
|
|
1021
1028
|
<ef-canvas part="canvas" @resize=${this.onCanvasResize}></ef-canvas>
|
|
1022
1029
|
${this.tooltipCallback ? html `<div id="tooltip-overlay"></div>` : null}
|
|
1023
1030
|
</div>
|
|
1024
1031
|
</div>
|
|
1025
|
-
${this.tooltipCallback
|
|
1026
|
-
|
|
1027
|
-
|
|
1032
|
+
${this.tooltipCallback
|
|
1033
|
+
? html `
|
|
1034
|
+
<ef-tooltip .condition=${this.tooltipCondition} .renderer=${this.tooltipRenderer}></ef-tooltip>
|
|
1035
|
+
`
|
|
1036
|
+
: null}
|
|
1028
1037
|
`;
|
|
1029
1038
|
}
|
|
1030
1039
|
};
|
package/lib/icon/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { JSXInterface } from '../jsx';
|
|
2
|
-
import { BasicElement, CSSResultGroup,
|
|
2
|
+
import { BasicElement, CSSResultGroup, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
|
|
3
|
+
import type { Config } from '../configuration/index.js';
|
|
3
4
|
export { preload } from './utils/IconLoader.js';
|
|
4
|
-
import { type Config } from '../configuration/index.js';
|
|
5
5
|
export declare class Icon extends BasicElement {
|
|
6
6
|
/**
|
|
7
7
|
* Element version number
|