@refinitiv-ui/elements 6.8.8 → 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.
Files changed (208) hide show
  1. package/CHANGELOG.md +177 -442
  2. package/LICENSE +1 -1
  3. package/README.md +13 -11
  4. package/lib/accordion/index.d.ts +1 -1
  5. package/lib/accordion/index.js +4 -7
  6. package/lib/appstate-bar/index.d.ts +2 -2
  7. package/lib/appstate-bar/index.js +10 -4
  8. package/lib/autosuggest/index.d.ts +7 -7
  9. package/lib/autosuggest/index.js +85 -80
  10. package/lib/autosuggest/themes/solar/charcoal/index.js +1 -1
  11. package/lib/autosuggest/themes/solar/pearl/index.js +1 -1
  12. package/lib/button/index.js +7 -10
  13. package/lib/button-bar/index.d.ts +1 -1
  14. package/lib/button-bar/index.js +12 -12
  15. package/lib/calendar/index.d.ts +39 -39
  16. package/lib/calendar/index.js +160 -125
  17. package/lib/calendar/utils.js +2 -2
  18. package/lib/canvas/index.d.ts +1 -1
  19. package/lib/canvas/index.js +2 -4
  20. package/lib/card/helpers/types.d.ts +2 -2
  21. package/lib/card/index.d.ts +5 -5
  22. package/lib/card/index.js +34 -28
  23. package/lib/chart/helpers/legend.js +10 -8
  24. package/lib/chart/index.d.ts +3 -3
  25. package/lib/chart/index.js +17 -17
  26. package/lib/chart/plugins/doughnut-center-label.js +6 -5
  27. package/lib/checkbox/index.d.ts +1 -1
  28. package/lib/checkbox/index.js +12 -13
  29. package/lib/clock/index.d.ts +55 -55
  30. package/lib/clock/index.js +84 -95
  31. package/lib/clock/themes/halo/dark/index.js +1 -1
  32. package/lib/clock/themes/halo/light/index.js +1 -1
  33. package/lib/clock/themes/solar/charcoal/index.js +1 -1
  34. package/lib/clock/themes/solar/pearl/index.js +1 -1
  35. package/lib/collapse/index.d.ts +1 -1
  36. package/lib/collapse/index.js +28 -19
  37. package/lib/collapse/themes/halo/dark/index.js +1 -1
  38. package/lib/collapse/themes/halo/light/index.js +1 -1
  39. package/lib/color-dialog/elements/color-palettes.d.ts +1 -1
  40. package/lib/color-dialog/elements/color-palettes.js +5 -6
  41. package/lib/color-dialog/elements/grayscale-palettes.d.ts +1 -1
  42. package/lib/color-dialog/elements/grayscale-palettes.js +9 -9
  43. package/lib/color-dialog/elements/palettes.js +5 -4
  44. package/lib/color-dialog/helpers/value-model.js +7 -9
  45. package/lib/color-dialog/index.d.ts +6 -6
  46. package/lib/color-dialog/index.js +53 -37
  47. package/lib/color-picker/index.d.ts +2 -2
  48. package/lib/color-picker/index.js +40 -34
  49. package/lib/combo-box/helpers/filter.d.ts +2 -2
  50. package/lib/combo-box/helpers/types.d.ts +1 -1
  51. package/lib/combo-box/index.d.ts +9 -9
  52. package/lib/combo-box/index.js +61 -55
  53. package/lib/configuration/elements/configuration.js +2 -2
  54. package/lib/counter/index.d.ts +4 -4
  55. package/lib/counter/index.js +9 -7
  56. package/lib/datetime-field/index.d.ts +4 -5
  57. package/lib/datetime-field/index.js +32 -23
  58. package/lib/datetime-field/utils.js +11 -1
  59. package/lib/datetime-picker/index.d.ts +75 -75
  60. package/lib/datetime-picker/index.js +151 -132
  61. package/lib/datetime-picker/locales.js +5 -5
  62. package/lib/datetime-picker/utils.js +9 -9
  63. package/lib/dialog/draggable-element.js +1 -2
  64. package/lib/dialog/index.d.ts +6 -6
  65. package/lib/dialog/index.js +48 -38
  66. package/lib/email-field/index.d.ts +1 -1
  67. package/lib/email-field/index.js +6 -6
  68. package/lib/events.d.ts +1 -1
  69. package/lib/flag/index.d.ts +1 -1
  70. package/lib/flag/index.js +6 -5
  71. package/lib/flag/utils/FlagLoader.js +1 -1
  72. package/lib/header/index.d.ts +1 -1
  73. package/lib/header/index.js +2 -2
  74. package/lib/header/themes/halo/dark/index.js +1 -1
  75. package/lib/header/themes/halo/light/index.js +1 -1
  76. package/lib/header/themes/solar/charcoal/index.js +1 -1
  77. package/lib/header/themes/solar/pearl/index.js +1 -1
  78. package/lib/heatmap/helpers/color.d.ts +1 -1
  79. package/lib/heatmap/helpers/color.js +11 -5
  80. package/lib/heatmap/helpers/track.js +3 -3
  81. package/lib/heatmap/index.d.ts +9 -9
  82. package/lib/heatmap/index.js +51 -42
  83. package/lib/icon/index.d.ts +2 -2
  84. package/lib/icon/index.js +6 -8
  85. package/lib/icon/utils/IconLoader.d.ts +1 -0
  86. package/lib/icon/utils/IconLoader.js +9 -1
  87. package/lib/interactive-chart/helpers/types.d.ts +3 -3
  88. package/lib/interactive-chart/index.d.ts +34 -34
  89. package/lib/interactive-chart/index.js +72 -57
  90. package/lib/item/helpers/types.d.ts +1 -1
  91. package/lib/item/index.d.ts +3 -3
  92. package/lib/item/index.js +24 -20
  93. package/lib/jsx.d.ts +6 -4
  94. package/lib/label/index.d.ts +1 -1
  95. package/lib/label/index.js +11 -8
  96. package/lib/layout/index.d.ts +7 -7
  97. package/lib/layout/index.js +7 -7
  98. package/lib/led-gauge/index.d.ts +1 -1
  99. package/lib/led-gauge/index.js +10 -10
  100. package/lib/list/elements/list.d.ts +3 -3
  101. package/lib/list/elements/list.js +10 -12
  102. package/lib/list/helpers/renderer.js +2 -2
  103. package/lib/list/helpers/types.d.ts +1 -1
  104. package/lib/list/index.d.ts +1 -1
  105. package/lib/list/renderer.d.ts +7 -7
  106. package/lib/loader/index.js +7 -8
  107. package/lib/multi-input/index.d.ts +6 -6
  108. package/lib/multi-input/index.js +39 -45
  109. package/lib/notification/elements/notification-tray.d.ts +2 -2
  110. package/lib/notification/elements/notification-tray.js +3 -3
  111. package/lib/notification/elements/notification.d.ts +2 -2
  112. package/lib/notification/elements/notification.js +22 -14
  113. package/lib/notification/helpers/status.js +1 -1
  114. package/lib/number-field/index.d.ts +5 -6
  115. package/lib/number-field/index.js +37 -47
  116. package/lib/overlay/elements/overlay-viewport.d.ts +1 -1
  117. package/lib/overlay/elements/overlay.d.ts +2 -2
  118. package/lib/overlay/elements/overlay.js +154 -98
  119. package/lib/overlay/helpers/types.d.ts +1 -1
  120. package/lib/overlay/managers/backdrop-manager.d.ts +1 -1
  121. package/lib/overlay/managers/backdrop-manager.js +2 -2
  122. package/lib/overlay/managers/close-manager.js +2 -1
  123. package/lib/overlay/managers/focus-manager.js +23 -13
  124. package/lib/overlay/managers/interaction-lock-manager.d.ts +4 -4
  125. package/lib/overlay/managers/interaction-lock-manager.js +33 -25
  126. package/lib/overlay/managers/viewport-manager.d.ts +2 -2
  127. package/lib/overlay/managers/viewport-manager.js +3 -2
  128. package/lib/overlay/managers/zindex-manager.js +4 -2
  129. package/lib/overlay-menu/helpers/types.d.ts +2 -2
  130. package/lib/overlay-menu/index.d.ts +1 -1
  131. package/lib/overlay-menu/index.js +44 -33
  132. package/lib/overlay-menu/managers/menu-manager.d.ts +10 -10
  133. package/lib/overlay-menu/managers/menu-manager.js +15 -13
  134. package/lib/pagination/index.d.ts +4 -4
  135. package/lib/pagination/index.js +39 -14
  136. package/lib/panel/index.js +1 -1
  137. package/lib/password-field/index.d.ts +2 -2
  138. package/lib/password-field/index.js +4 -4
  139. package/lib/pill/index.d.ts +1 -1
  140. package/lib/pill/index.js +22 -19
  141. package/lib/progress-bar/index.d.ts +1 -1
  142. package/lib/progress-bar/index.js +38 -37
  143. package/lib/radio-button/index.d.ts +2 -2
  144. package/lib/radio-button/index.js +17 -12
  145. package/lib/radio-button/radio-button-registry.js +8 -5
  146. package/lib/rating/index.d.ts +1 -1
  147. package/lib/rating/index.js +2 -5
  148. package/lib/rating/utils.d.ts +6 -6
  149. package/lib/rating/utils.js +6 -6
  150. package/lib/search-field/index.d.ts +2 -2
  151. package/lib/search-field/index.js +4 -4
  152. package/lib/select/index.d.ts +34 -34
  153. package/lib/select/index.js +69 -82
  154. package/lib/sidebar-layout/index.d.ts +2 -2
  155. package/lib/sidebar-layout/index.js +7 -9
  156. package/lib/slider/index.d.ts +2 -2
  157. package/lib/slider/index.js +57 -45
  158. package/lib/slider/utils.d.ts +10 -10
  159. package/lib/slider/utils.js +10 -10
  160. package/lib/sparkline/index.d.ts +1 -1
  161. package/lib/sparkline/index.js +7 -8
  162. package/lib/swing-gauge/helpers.js +2 -2
  163. package/lib/swing-gauge/index.d.ts +19 -19
  164. package/lib/swing-gauge/index.js +91 -81
  165. package/lib/tab/index.d.ts +1 -1
  166. package/lib/tab/index.js +16 -27
  167. package/lib/tab/themes/halo/dark/index.js +1 -1
  168. package/lib/tab/themes/halo/light/index.js +1 -1
  169. package/lib/tab/themes/solar/charcoal/index.js +1 -1
  170. package/lib/tab/themes/solar/pearl/index.js +1 -1
  171. package/lib/tab-bar/helpers/animate.js +1 -1
  172. package/lib/tab-bar/index.d.ts +1 -1
  173. package/lib/tab-bar/index.js +34 -18
  174. package/lib/tab-bar/themes/halo/dark/index.js +1 -1
  175. package/lib/tab-bar/themes/halo/light/index.js +1 -1
  176. package/lib/text-field/index.d.ts +1 -1
  177. package/lib/text-field/index.js +36 -33
  178. package/lib/time-picker/index.d.ts +6 -6
  179. package/lib/time-picker/index.js +104 -90
  180. package/lib/toggle/index.d.ts +1 -1
  181. package/lib/toggle/index.js +4 -3
  182. package/lib/tooltip/elements/title-tooltip.js +2 -2
  183. package/lib/tooltip/index.d.ts +27 -27
  184. package/lib/tooltip/index.js +42 -38
  185. package/lib/tooltip/managers/tooltip-manager.d.ts +1 -1
  186. package/lib/tornado-chart/elements/tornado-chart.d.ts +1 -1
  187. package/lib/tornado-chart/elements/tornado-chart.js +1 -1
  188. package/lib/tornado-chart/elements/tornado-item.d.ts +2 -2
  189. package/lib/tornado-chart/elements/tornado-item.js +12 -10
  190. package/lib/tree/elements/tree-item.d.ts +3 -3
  191. package/lib/tree/elements/tree-item.js +21 -19
  192. package/lib/tree/elements/tree.d.ts +1 -1
  193. package/lib/tree/elements/tree.js +12 -11
  194. package/lib/tree/helpers/renderer.js +4 -3
  195. package/lib/tree/index.d.ts +1 -1
  196. package/lib/tree/managers/tree-manager.d.ts +1 -1
  197. package/lib/tree/managers/tree-manager.js +17 -18
  198. package/lib/tree/themes/solar/charcoal/index.js +1 -1
  199. package/lib/tree/themes/solar/pearl/index.js +1 -1
  200. package/lib/tree-select/index.d.ts +9 -9
  201. package/lib/tree-select/index.js +91 -82
  202. package/lib/tree-select/themes/halo/dark/index.js +1 -1
  203. package/lib/tree-select/themes/halo/light/index.js +1 -1
  204. package/lib/tree-select/themes/solar/charcoal/index.js +1 -1
  205. package/lib/tree-select/themes/solar/pearl/index.js +1 -1
  206. package/lib/version.js +1 -1
  207. package/package.json +16 -16
  208. package/tsconfig.tsbuildinfo +1 -1
package/lib/card/index.js CHANGED
@@ -1,16 +1,16 @@
1
1
  import { __decorate } from "tslib";
2
- import { BasicElement, html, css } from '@refinitiv-ui/core';
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 { query } from '@refinitiv-ui/core/decorators/query.js';
6
6
  import { state } from '@refinitiv-ui/core/decorators/state.js';
7
- import { VERSION } from '../version.js';
7
+ import '@refinitiv-ui/phrasebook/locale/en/card.js';
8
+ import { translate } from '@refinitiv-ui/translate';
8
9
  import { isSlotEmpty } from '@refinitiv-ui/utils/is-slot-empty.js';
9
- import '../label/index.js';
10
10
  import '../button/index.js';
11
+ import '../label/index.js';
11
12
  import '../overlay-menu/index.js';
12
- import '@refinitiv-ui/phrasebook/locale/en/card.js';
13
- import { translate } from '@refinitiv-ui/translate';
13
+ import { VERSION } from '../version.js';
14
14
  /**
15
15
  * A card frame component.
16
16
  *
@@ -63,14 +63,15 @@ let Card = class Card extends BasicElement {
63
63
  display: flex;
64
64
  flex-flow: column nowrap;
65
65
  }
66
- [part~=header] {
66
+ [part~='header'] {
67
67
  display: flex;
68
68
  }
69
- [part~=header-body] {
69
+ [part~='header-body'] {
70
70
  flex: 1;
71
71
  min-width: 0px;
72
72
  }
73
- [part~=footer]:not([part~="has-content"]), [part~=header]:not([part~="has-content"]) {
73
+ [part~='footer']:not([part~='has-content']),
74
+ [part~='header']:not([part~='has-content']) {
74
75
  display: none;
75
76
  }
76
77
  `;
@@ -172,24 +173,25 @@ let Card = class Card extends BasicElement {
172
173
  * @return menu template
173
174
  */
174
175
  get menuTemplate() {
175
- return html `${this.menuData ? html `
176
- <ef-button
177
- part="menu-button"
178
- icon="more-vertical"
179
- transparent
180
- aria-label=${this.t('OPEN_MENU')}
181
- aria-haspopup="true"
182
- aria-controls="menu-popup"
183
- aria-expanded=${this.menuOpened}
184
- @tap=${this.openMenu}
185
- ></ef-button>
186
- <ef-overlay-menu
187
- id="menu-popup"
188
- part="menu-popup"
189
- .data=${this.menuData}
190
- position="bottom-end"
191
- @opened-changed=${this.onMenuOpenChanged}></ef-overlay-menu>` : undefined}
192
- `;
176
+ return html `${this.menuData
177
+ ? html ` <ef-button
178
+ part="menu-button"
179
+ icon="more-vertical"
180
+ transparent
181
+ aria-label=${this.t('OPEN_MENU')}
182
+ aria-haspopup="true"
183
+ aria-controls="menu-popup"
184
+ aria-expanded=${this.menuOpened}
185
+ @tap=${this.openMenu}
186
+ ></ef-button>
187
+ <ef-overlay-menu
188
+ id="menu-popup"
189
+ part="menu-popup"
190
+ .data=${this.menuData}
191
+ position="bottom-end"
192
+ @opened-changed=${this.onMenuOpenChanged}
193
+ ></ef-overlay-menu>`
194
+ : undefined} `;
193
195
  }
194
196
  /**
195
197
  * Template of header
@@ -200,7 +202,9 @@ let Card = class Card extends BasicElement {
200
202
  <div part="header${this.withHeader ? ' has-content' : ''}">
201
203
  <div part="header-body">
202
204
  <slot name="header" @slotchange="${this.onHeaderSlotChange}"></slot>
203
- ${!this.headerHasContent && this.header ? html `<ef-label line-clamp="3" part="header-text">${this.header}</ef-label>` : null}
205
+ ${!this.headerHasContent && this.header
206
+ ? html `<ef-label line-clamp="3" part="header-text">${this.header}</ef-label>`
207
+ : null}
204
208
  </div>
205
209
  ${this.menuTemplate}
206
210
  </div>
@@ -215,7 +219,9 @@ let Card = class Card extends BasicElement {
215
219
  <div part="footer${this.withFooter ? ' has-content' : ''}">
216
220
  <div part="footer-body">
217
221
  <slot name="footer" @slotchange="${this.onFooterSlotChange}"></slot>
218
- ${!this.footerHasContent && this.footer ? html `<ef-label line-clamp="3">${this.footer}</ef-label>` : undefined}
222
+ ${!this.footerHasContent && this.footer
223
+ ? html `<ef-label line-clamp="3">${this.footer}</ef-label>`
224
+ : undefined}
219
225
  </div>
220
226
  </div>
221
227
  `;
@@ -9,7 +9,7 @@ const isValidColor = (color) => {
9
9
  * Force return to string type because Chart.js doesn't support typescript
10
10
  * and some type of @types/chart.js isn't correct
11
11
  */
12
- return (color && color !== 'transparent') ? color : undefined;
12
+ return color && color !== 'transparent' ? color : undefined;
13
13
  };
14
14
  /**
15
15
  * Get legend color by using point style
@@ -34,9 +34,9 @@ const getLegendColorUsePointStyle = (color1, color2) => {
34
34
  */
35
35
  const getLegendColorDontUsePointStyle = (dataset, solidFill = false) => {
36
36
  // Use background color for legend, if color of dataset or chart type is solid not opaque.
37
- return isValidColor(solidFill ? dataset.backgroundColor : dataset.borderColor)
38
- || isValidColor(dataset.pointBorderColor)
39
- || dataset.pointBackgroundColor;
37
+ return (isValidColor(solidFill ? dataset.backgroundColor : dataset.borderColor) ||
38
+ isValidColor(dataset.pointBorderColor) ||
39
+ dataset.pointBackgroundColor);
40
40
  };
41
41
  /**
42
42
  * Get stroke style legend color
@@ -47,8 +47,9 @@ const getLegendColorDontUsePointStyle = (dataset, solidFill = false) => {
47
47
  */
48
48
  const getLegendStrokeStyle = (dataset, usePointStyle) => {
49
49
  if (usePointStyle) {
50
- return getLegendColorUsePointStyle(dataset.pointBorderColor, dataset.pointBackgroundColor)
51
- || isValidColor(dataset.borderColor) || dataset.backgroundColor;
50
+ return (getLegendColorUsePointStyle(dataset.pointBorderColor, dataset.pointBackgroundColor) ||
51
+ isValidColor(dataset.borderColor) ||
52
+ dataset.backgroundColor);
52
53
  }
53
54
  else {
54
55
  return isValidColor(dataset.borderColor) || getLegendColorDontUsePointStyle(dataset);
@@ -64,8 +65,9 @@ const getLegendStrokeStyle = (dataset, usePointStyle) => {
64
65
  */
65
66
  const getLegendFillStyle = (dataset, usePointStyle, solidFill = false) => {
66
67
  if (usePointStyle) {
67
- return getLegendColorUsePointStyle(dataset.pointBackgroundColor, dataset.pointBorderColor)
68
- || isValidColor(dataset.borderColor) || dataset.backgroundColor;
68
+ return (getLegendColorUsePointStyle(dataset.pointBackgroundColor, dataset.pointBorderColor) ||
69
+ isValidColor(dataset.borderColor) ||
70
+ dataset.backgroundColor);
69
71
  }
70
72
  else {
71
73
  return getLegendColorDontUsePointStyle(dataset, solidFill);
@@ -1,11 +1,11 @@
1
1
  import { JSXInterface } from '../jsx';
2
2
  /// <reference types="chart.js" />
3
- import { BasicElement, PropertyValues, TemplateResult, CSSResultGroup } from '@refinitiv-ui/core';
4
3
  import 'chart.js/dist/Chart.bundle.min.js';
5
- import type { ChartJS, ChartConfig, ChartUpdateProps, DatasetColors } from './helpers/types';
6
- import type { Header } from '../header';
4
+ import { BasicElement, CSSResultGroup, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
7
5
  import '../header/index.js';
8
6
  import '../layout/index.js';
7
+ import type { Header } from '../header';
8
+ import type { ChartConfig, ChartJS, ChartUpdateProps, DatasetColors } from './helpers/types';
9
9
  declare global {
10
10
  interface Window {
11
11
  Chart: ChartJS;
@@ -1,16 +1,16 @@
1
1
  /* eslint @typescript-eslint/no-unsafe-call: 0 */
2
- /* eslint @typescript-eslint/no-unsafe-member-access: 0 */
3
2
  import { __decorate } from "tslib";
4
- import { BasicElement, html, css } from '@refinitiv-ui/core';
3
+ /* eslint @typescript-eslint/no-unsafe-member-access: 0 */
4
+ import 'chart.js/dist/Chart.bundle.min.js';
5
+ import { BasicElement, css, html } from '@refinitiv-ui/core';
5
6
  import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
6
7
  import { property } from '@refinitiv-ui/core/decorators/property.js';
7
8
  import { query } from '@refinitiv-ui/core/decorators/query.js';
8
- import { VERSION } from '../version.js';
9
9
  import { color as parseColor } from '@refinitiv-ui/utils/color.js';
10
- import 'chart.js/dist/Chart.bundle.min.js';
11
- import { legendHelper, merge } from './helpers/index.js';
12
10
  import '../header/index.js';
13
11
  import '../layout/index.js';
12
+ import { VERSION } from '../version.js';
13
+ import { legendHelper, merge } from './helpers/index.js';
14
14
  // Register plugins
15
15
  import doughnutCenterPlugin from './plugins/doughnut-center-label.js';
16
16
  window.Chart.pluginService.register(doughnutCenterPlugin);
@@ -61,9 +61,7 @@ let Chart = class Chart extends BasicElement {
61
61
  return [];
62
62
  }
63
63
  const chartOption = DEFAULT_CHART_CONFIG[this.config.type];
64
- if (this.datasets.length
65
- && chartOption.legend
66
- && Array.isArray(this.datasets[0].backgroundColor)) {
64
+ if (this.datasets.length && chartOption.legend && Array.isArray(this.datasets[0].backgroundColor)) {
67
65
  let legends = [];
68
66
  if (chartOption.legend.labels?.generateLabels) {
69
67
  legends = chartOption.legend.labels?.generateLabels(chart);
@@ -266,7 +264,9 @@ let Chart = class Chart extends BasicElement {
266
264
  decorateConfig() {
267
265
  this.mergeConfigs();
268
266
  const extendColorsIfRequired = (currentColors, infoColors) => {
269
- if (Array.isArray(currentColors) && Array.isArray(infoColors) && currentColors.length < infoColors.length) {
267
+ if (Array.isArray(currentColors) &&
268
+ Array.isArray(infoColors) &&
269
+ currentColors.length < infoColors.length) {
270
270
  merge(currentColors, infoColors);
271
271
  }
272
272
  };
@@ -291,7 +291,8 @@ let Chart = class Chart extends BasicElement {
291
291
  datasetInfo(dataset) {
292
292
  const type = dataset.type || this.config?.type;
293
293
  let index = this.datasets.indexOf(dataset);
294
- const isColorArray = (!!type && ['pie', 'doughnut', 'polarArea'].includes(type)) || type === 'bar' && this.datasets.length === 1;
294
+ const isColorArray = (!!type && ['pie', 'doughnut', 'polarArea'].includes(type)) ||
295
+ (type === 'bar' && this.datasets.length === 1);
295
296
  const isSolidFill = !!type && !CHART_TYPE_OPAQUE.includes(type);
296
297
  // Doughnut chart using same color sequence for each data in datasets
297
298
  let borderColor = null;
@@ -461,13 +462,12 @@ let Chart = class Chart extends BasicElement {
461
462
  * @return Render template
462
463
  */
463
464
  render() {
464
- return html `
465
- <ef-layout flex container>
466
- <ef-header></ef-header>
467
- <ef-layout part="chart" @resize="${this.onResize}">
468
- <canvas id="canvas"></canvas>
469
- </ef-layout>
470
- </ef-layout>`;
465
+ return html ` <ef-layout flex container>
466
+ <ef-header></ef-header>
467
+ <ef-layout part="chart" @resize="${this.onResize}">
468
+ <canvas id="canvas"></canvas>
469
+ </ef-layout>
470
+ </ef-layout>`;
471
471
  }
472
472
  };
473
473
  __decorate([
@@ -51,8 +51,9 @@ const plugins = {
51
51
  chart._select = [];
52
52
  }
53
53
  if (chart.active.length) {
54
- if (chart._select.length && chart._select[0]._datasetIndex === chart.active[0]._datasetIndex
55
- && chart._select[0]._index === chart.active[0]._index) {
54
+ if (chart._select.length &&
55
+ chart._select[0]._datasetIndex === chart.active[0]._datasetIndex &&
56
+ chart._select[0]._index === chart.active[0]._index) {
56
57
  // reset value if user clicked on selected segment
57
58
  chart._select = [];
58
59
  }
@@ -110,7 +111,7 @@ const plugins = {
110
111
  }
111
112
  const textAreaWidth = chart.innerRadius;
112
113
  // Base font size is 30% and minus 4% per text lines ( if text has multiple lines ) of text area
113
- const baseFontSize = textAreaWidth * (0.3 - (0.04 * (texts.length - 1)));
114
+ const baseFontSize = textAreaWidth * (0.3 - 0.04 * (texts.length - 1));
114
115
  // Keep minimum font size equal 5% of text area
115
116
  const computedFontSize = Math.max(textAreaWidth * 0.05, baseFontSize);
116
117
  // Use font size ratio from user if --doughnut-center-font-size CSS variable is provided
@@ -148,7 +149,7 @@ const plugins = {
148
149
  targetText += '...';
149
150
  }
150
151
  }
151
- ctx.fillText(targetText, centerX, offsetY + (i * fontLineHeight));
152
+ ctx.fillText(targetText, centerX, offsetY + i * fontLineHeight);
152
153
  }
153
154
  },
154
155
  afterDatasetUpdate: function (chart) {
@@ -165,7 +166,7 @@ const plugins = {
165
166
  const datasetIndex = Number(config.selected.datasetIndex || 0);
166
167
  const visibleIndex = chart.getVisibleDatasetCount() - 1;
167
168
  // Validate index and datasetIndex
168
- if (isNaN(selectedIndex) || (isNaN(datasetIndex) || datasetIndex < 0 || datasetIndex > visibleIndex)) {
169
+ if (isNaN(selectedIndex) || isNaN(datasetIndex) || datasetIndex < 0 || datasetIndex > visibleIndex) {
169
170
  return;
170
171
  }
171
172
  // Set selected item to the chart
@@ -1,5 +1,5 @@
1
1
  import { JSXInterface } from '../jsx';
2
- import { ControlElement, TemplateResult, CSSResultGroup, PropertyValues } from '@refinitiv-ui/core';
2
+ import { CSSResultGroup, ControlElement, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
3
3
  import '../icon/index.js';
4
4
  /**
5
5
  * Form control for selecting one or several options
@@ -1,11 +1,11 @@
1
1
  import { __decorate } from "tslib";
2
- import { ControlElement, html, css } from '@refinitiv-ui/core';
2
+ import { ControlElement, 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
- import { registerOverflowTooltip } from '../tooltip/index.js';
8
6
  import '../icon/index.js';
7
+ import { registerOverflowTooltip } from '../tooltip/index.js';
8
+ import { VERSION } from '../version.js';
9
9
  /**
10
10
  * Form control for selecting one or several options
11
11
  * @fires checked-changed - Fired when the user checks or unchecks the checkbox. The event is not fired if the `checked` property is changed programmatically.
@@ -47,24 +47,25 @@ let Checkbox = class Checkbox extends ControlElement {
47
47
  :host {
48
48
  display: inline-block;
49
49
  }
50
- [part=check] {
50
+ [part='check'] {
51
51
  visibility: hidden;
52
52
  }
53
- :host([checked]) [part=check],
54
- :host([indeterminate]) [part=check] {
53
+ :host([checked]) [part='check'],
54
+ :host([indeterminate]) [part='check'] {
55
55
  visibility: inherit;
56
56
  }
57
- [part=label],
58
- [part=container] {
57
+ [part='label'],
58
+ [part='container'] {
59
59
  display: inline-block;
60
60
  vertical-align: middle;
61
61
  }
62
- [part=label] {
62
+ [part='label'] {
63
63
  white-space: nowrap;
64
64
  text-overflow: ellipsis;
65
65
  overflow: hidden;
66
66
  }
67
- :host(:empty) [part=label], [part=label]:empty {
67
+ :host(:empty) [part='label'],
68
+ [part='label']:empty {
68
69
  display: none;
69
70
  }
70
71
  `;
@@ -147,9 +148,7 @@ let Checkbox = class Checkbox extends ControlElement {
147
148
  render() {
148
149
  return html `
149
150
  <div part="container">
150
- <div part="check">
151
- ${!this.indeterminate ? html `<ef-icon icon="tick"></ef-icon>` : null}
152
- </div>
151
+ <div part="check">${!this.indeterminate ? html `<ef-icon icon="tick"></ef-icon>` : null}</div>
153
152
  </div>
154
153
  <div part="label"><slot></slot></div>
155
154
  `;
@@ -1,5 +1,5 @@
1
1
  import { JSXInterface } from '../jsx';
2
- import { TemplateResult, CSSResultGroup, PropertyValues, ResponsiveElement, ElementSize } from '@refinitiv-ui/core';
2
+ import { CSSResultGroup, ElementSize, PropertyValues, ResponsiveElement, TemplateResult } from '@refinitiv-ui/core';
3
3
  import '@refinitiv-ui/phrasebook/locale/en/clock.js';
4
4
  import { TranslatePromise } from '@refinitiv-ui/translate';
5
5
  /**
@@ -92,8 +92,8 @@ export declare class Clock extends ResponsiveElement {
92
92
  */
93
93
  showSeconds: boolean;
94
94
  /**
95
- * Display clock in analogue style.
96
- */
95
+ * Display clock in analogue style.
96
+ */
97
97
  analogue: boolean;
98
98
  /**
99
99
  * Enable interactive mode. Allowing the user to offset the value.
@@ -104,16 +104,16 @@ export declare class Clock extends ResponsiveElement {
104
104
  */
105
105
  private hoursPart;
106
106
  /**
107
- * Getter for minutes part.
108
- */
107
+ * Getter for minutes part.
108
+ */
109
109
  private minutesPart;
110
110
  /**
111
- * Getter for seconds part.
112
- */
111
+ * Getter for seconds part.
112
+ */
113
113
  private secondsPart;
114
114
  /**
115
- * Size of the clock.
116
- */
115
+ * Size of the clock.
116
+ */
117
117
  private size;
118
118
  /**
119
119
  * Get the display time in seconds.
@@ -208,11 +208,11 @@ export declare class Clock extends ResponsiveElement {
208
208
  */
209
209
  private getShiftAmountFromSegment;
210
210
  /**
211
- * Returns `true` or `false` depends on the offset value's effect on giving segment
212
- *
213
- * @param segment segment
214
- * @returns Result
215
- */
211
+ * Returns `true` or `false` depends on the offset value's effect on giving segment
212
+ *
213
+ * @param segment segment
214
+ * @returns Result
215
+ */
216
216
  private isSegmentShifted;
217
217
  /**
218
218
  * Handles any keydown events
@@ -229,59 +229,59 @@ export declare class Clock extends ResponsiveElement {
229
229
  */
230
230
  private onTapStart;
231
231
  /**
232
- * Handle valid control keys and execute their corresponding commands
233
- * Will stop when readonly is set
234
- * @param event Event Object
235
- * @returns {void}
236
- */
232
+ * Handle valid control keys and execute their corresponding commands
233
+ * Will stop when readonly is set
234
+ * @param event Event Object
235
+ * @returns {void}
236
+ */
237
237
  private manageControlKeys;
238
238
  /**
239
- * Handles UP key press
240
- * @returns {void}
241
- */
239
+ * Handles UP key press
240
+ * @returns {void}
241
+ */
242
242
  private handleUpKey;
243
243
  /**
244
- * Handle DOWN key press
245
- * @returns {void}
246
- */
244
+ * Handle DOWN key press
245
+ * @returns {void}
246
+ */
247
247
  private handleDownKey;
248
248
  /**
249
- * Set aria-valuenow to display value and aria-valuetext to translated format
250
- * @param updateAriaValueText condition to update aria-valueText
251
- * @returns {void}
252
- */
249
+ * Set aria-valuenow to display value and aria-valuetext to translated format
250
+ * @param updateAriaValueText condition to update aria-valueText
251
+ * @returns {void}
252
+ */
253
253
  private updateAriaValue;
254
254
  /**
255
- * Get template of segment
256
- * @param segment segment
257
- * @param value segment's value
258
- * @returns {TemplateResult} template
259
- */
255
+ * Get template of segment
256
+ * @param segment segment
257
+ * @param value segment's value
258
+ * @returns {TemplateResult} template
259
+ */
260
260
  private generateSegmentTemplate;
261
261
  /**
262
- * Template of divider
263
- * @returns {TemplateResult} template
264
- */
262
+ * Template of divider
263
+ * @returns {TemplateResult} template
264
+ */
265
265
  private get dividerTemplate();
266
266
  /**
267
- * Template of amPm segment
268
- * @returns {TemplateResult} template
269
- */
267
+ * Template of amPm segment
268
+ * @returns {TemplateResult} template
269
+ */
270
270
  private get amPmTemplate();
271
271
  /**
272
- * Template of hours segment
273
- * @returns {TemplateResult} template
274
- */
272
+ * Template of hours segment
273
+ * @returns {TemplateResult} template
274
+ */
275
275
  private get hoursSegmentTemplate();
276
276
  /**
277
- * Template of minutes segment
278
- * @returns {TemplateResult} template
279
- */
277
+ * Template of minutes segment
278
+ * @returns {TemplateResult} template
279
+ */
280
280
  private get minutesSegmentTemplate();
281
281
  /**
282
- * Template of seconds segment
283
- * @returns {TemplateResult} template
284
- */
282
+ * Template of seconds segment
283
+ * @returns {TemplateResult} template
284
+ */
285
285
  private get secondsSegmentTemplate();
286
286
  /**
287
287
  * Called when the element's dimension have changed
@@ -317,14 +317,14 @@ export declare class Clock extends ResponsiveElement {
317
317
  */
318
318
  protected willUpdate(changedProperties: PropertyValues): void;
319
319
  /**
320
- * Template for digital clock
321
- * @returns {TemplateResult} template
322
- */
320
+ * Template for digital clock
321
+ * @returns {TemplateResult} template
322
+ */
323
323
  protected get digitalClockTemplate(): TemplateResult;
324
324
  /**
325
- * Template for analogue clock
326
- * @returns {TemplateResult} template
327
- */
325
+ * Template for analogue clock
326
+ * @returns {TemplateResult} template
327
+ */
328
328
  protected get analogueClockTemplate(): TemplateResult;
329
329
  /**
330
330
  * A `TemplateResult` that will be used