@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.
Files changed (209) hide show
  1. package/CHANGELOG.md +180 -433
  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.d.ts +1 -1
  54. package/lib/configuration/elements/configuration.js +2 -2
  55. package/lib/counter/index.d.ts +4 -4
  56. package/lib/counter/index.js +9 -7
  57. package/lib/datetime-field/index.d.ts +4 -5
  58. package/lib/datetime-field/index.js +32 -23
  59. package/lib/datetime-field/utils.js +11 -1
  60. package/lib/datetime-picker/index.d.ts +75 -75
  61. package/lib/datetime-picker/index.js +151 -132
  62. package/lib/datetime-picker/locales.js +5 -5
  63. package/lib/datetime-picker/utils.js +9 -9
  64. package/lib/dialog/draggable-element.js +1 -2
  65. package/lib/dialog/index.d.ts +6 -6
  66. package/lib/dialog/index.js +48 -38
  67. package/lib/email-field/index.d.ts +1 -1
  68. package/lib/email-field/index.js +6 -6
  69. package/lib/events.d.ts +1 -1
  70. package/lib/flag/index.d.ts +1 -1
  71. package/lib/flag/index.js +6 -5
  72. package/lib/flag/utils/FlagLoader.js +1 -1
  73. package/lib/header/index.d.ts +1 -1
  74. package/lib/header/index.js +2 -2
  75. package/lib/header/themes/halo/dark/index.js +1 -1
  76. package/lib/header/themes/halo/light/index.js +1 -1
  77. package/lib/header/themes/solar/charcoal/index.js +1 -1
  78. package/lib/header/themes/solar/pearl/index.js +1 -1
  79. package/lib/heatmap/helpers/color.d.ts +1 -1
  80. package/lib/heatmap/helpers/color.js +11 -5
  81. package/lib/heatmap/helpers/track.js +3 -3
  82. package/lib/heatmap/index.d.ts +9 -9
  83. package/lib/heatmap/index.js +51 -42
  84. package/lib/icon/index.d.ts +2 -2
  85. package/lib/icon/index.js +6 -8
  86. package/lib/icon/utils/IconLoader.d.ts +1 -0
  87. package/lib/icon/utils/IconLoader.js +9 -1
  88. package/lib/interactive-chart/helpers/types.d.ts +3 -3
  89. package/lib/interactive-chart/index.d.ts +34 -34
  90. package/lib/interactive-chart/index.js +72 -57
  91. package/lib/item/helpers/types.d.ts +1 -1
  92. package/lib/item/index.d.ts +3 -3
  93. package/lib/item/index.js +24 -20
  94. package/lib/jsx.d.ts +6 -4
  95. package/lib/label/index.d.ts +1 -1
  96. package/lib/label/index.js +11 -8
  97. package/lib/layout/index.d.ts +7 -7
  98. package/lib/layout/index.js +7 -7
  99. package/lib/led-gauge/index.d.ts +1 -1
  100. package/lib/led-gauge/index.js +10 -10
  101. package/lib/list/elements/list.d.ts +3 -3
  102. package/lib/list/elements/list.js +10 -12
  103. package/lib/list/helpers/renderer.js +2 -2
  104. package/lib/list/helpers/types.d.ts +1 -1
  105. package/lib/list/index.d.ts +1 -1
  106. package/lib/list/renderer.d.ts +7 -7
  107. package/lib/loader/index.js +7 -8
  108. package/lib/multi-input/index.d.ts +6 -6
  109. package/lib/multi-input/index.js +39 -45
  110. package/lib/notification/elements/notification-tray.d.ts +2 -2
  111. package/lib/notification/elements/notification-tray.js +3 -3
  112. package/lib/notification/elements/notification.d.ts +2 -2
  113. package/lib/notification/elements/notification.js +22 -14
  114. package/lib/notification/helpers/status.js +1 -1
  115. package/lib/number-field/index.d.ts +5 -6
  116. package/lib/number-field/index.js +37 -47
  117. package/lib/overlay/elements/overlay-viewport.d.ts +1 -1
  118. package/lib/overlay/elements/overlay.d.ts +2 -2
  119. package/lib/overlay/elements/overlay.js +154 -98
  120. package/lib/overlay/helpers/types.d.ts +1 -1
  121. package/lib/overlay/managers/backdrop-manager.d.ts +1 -1
  122. package/lib/overlay/managers/backdrop-manager.js +2 -2
  123. package/lib/overlay/managers/close-manager.js +2 -1
  124. package/lib/overlay/managers/focus-manager.js +23 -13
  125. package/lib/overlay/managers/interaction-lock-manager.d.ts +4 -4
  126. package/lib/overlay/managers/interaction-lock-manager.js +33 -25
  127. package/lib/overlay/managers/viewport-manager.d.ts +2 -2
  128. package/lib/overlay/managers/viewport-manager.js +3 -2
  129. package/lib/overlay/managers/zindex-manager.js +4 -2
  130. package/lib/overlay-menu/helpers/types.d.ts +2 -2
  131. package/lib/overlay-menu/index.d.ts +1 -1
  132. package/lib/overlay-menu/index.js +44 -33
  133. package/lib/overlay-menu/managers/menu-manager.d.ts +10 -10
  134. package/lib/overlay-menu/managers/menu-manager.js +15 -13
  135. package/lib/pagination/index.d.ts +4 -4
  136. package/lib/pagination/index.js +39 -14
  137. package/lib/panel/index.js +1 -1
  138. package/lib/password-field/index.d.ts +2 -2
  139. package/lib/password-field/index.js +4 -4
  140. package/lib/pill/index.d.ts +1 -1
  141. package/lib/pill/index.js +22 -19
  142. package/lib/progress-bar/index.d.ts +1 -1
  143. package/lib/progress-bar/index.js +38 -37
  144. package/lib/radio-button/index.d.ts +2 -2
  145. package/lib/radio-button/index.js +17 -12
  146. package/lib/radio-button/radio-button-registry.js +8 -5
  147. package/lib/rating/index.d.ts +1 -1
  148. package/lib/rating/index.js +2 -5
  149. package/lib/rating/utils.d.ts +6 -6
  150. package/lib/rating/utils.js +6 -6
  151. package/lib/search-field/index.d.ts +2 -2
  152. package/lib/search-field/index.js +4 -4
  153. package/lib/select/index.d.ts +34 -34
  154. package/lib/select/index.js +70 -83
  155. package/lib/sidebar-layout/index.d.ts +2 -2
  156. package/lib/sidebar-layout/index.js +7 -9
  157. package/lib/slider/index.d.ts +2 -2
  158. package/lib/slider/index.js +57 -45
  159. package/lib/slider/utils.d.ts +10 -10
  160. package/lib/slider/utils.js +10 -10
  161. package/lib/sparkline/index.d.ts +1 -1
  162. package/lib/sparkline/index.js +7 -8
  163. package/lib/swing-gauge/helpers.js +2 -2
  164. package/lib/swing-gauge/index.d.ts +19 -19
  165. package/lib/swing-gauge/index.js +91 -81
  166. package/lib/tab/index.d.ts +1 -1
  167. package/lib/tab/index.js +16 -27
  168. package/lib/tab/themes/halo/dark/index.js +1 -1
  169. package/lib/tab/themes/halo/light/index.js +1 -1
  170. package/lib/tab/themes/solar/charcoal/index.js +1 -1
  171. package/lib/tab/themes/solar/pearl/index.js +1 -1
  172. package/lib/tab-bar/helpers/animate.js +1 -1
  173. package/lib/tab-bar/index.d.ts +1 -1
  174. package/lib/tab-bar/index.js +34 -18
  175. package/lib/tab-bar/themes/halo/dark/index.js +1 -1
  176. package/lib/tab-bar/themes/halo/light/index.js +1 -1
  177. package/lib/text-field/index.d.ts +1 -1
  178. package/lib/text-field/index.js +36 -33
  179. package/lib/time-picker/index.d.ts +6 -6
  180. package/lib/time-picker/index.js +104 -90
  181. package/lib/toggle/index.d.ts +1 -1
  182. package/lib/toggle/index.js +4 -3
  183. package/lib/tooltip/elements/title-tooltip.js +2 -2
  184. package/lib/tooltip/index.d.ts +27 -27
  185. package/lib/tooltip/index.js +42 -38
  186. package/lib/tooltip/managers/tooltip-manager.d.ts +1 -1
  187. package/lib/tornado-chart/elements/tornado-chart.d.ts +1 -1
  188. package/lib/tornado-chart/elements/tornado-chart.js +1 -1
  189. package/lib/tornado-chart/elements/tornado-item.d.ts +2 -2
  190. package/lib/tornado-chart/elements/tornado-item.js +12 -10
  191. package/lib/tree/elements/tree-item.d.ts +3 -3
  192. package/lib/tree/elements/tree-item.js +21 -19
  193. package/lib/tree/elements/tree.d.ts +1 -1
  194. package/lib/tree/elements/tree.js +12 -11
  195. package/lib/tree/helpers/renderer.js +4 -3
  196. package/lib/tree/index.d.ts +1 -1
  197. package/lib/tree/managers/tree-manager.d.ts +1 -1
  198. package/lib/tree/managers/tree-manager.js +17 -18
  199. package/lib/tree/themes/solar/charcoal/index.js +1 -1
  200. package/lib/tree/themes/solar/pearl/index.js +1 -1
  201. package/lib/tree-select/index.d.ts +9 -9
  202. package/lib/tree-select/index.js +91 -82
  203. package/lib/tree-select/themes/halo/dark/index.js +1 -1
  204. package/lib/tree-select/themes/halo/light/index.js +1 -1
  205. package/lib/tree-select/themes/solar/charcoal/index.js +1 -1
  206. package/lib/tree-select/themes/solar/pearl/index.js +1 -1
  207. package/lib/version.js +1 -1
  208. package/package.json +16 -16
  209. package/tsconfig.tsbuildinfo +1 -1
@@ -1,11 +1,11 @@
1
1
  import { AnimationTaskRunner } from '@refinitiv-ui/utils/async.js';
2
2
  import { getOverlays } from './zindex-manager.js';
3
3
  /**
4
- * Check if two arrays are shallow equal
5
- * @param left Left side array
6
- * @param right Right side array
7
- * @returns true if arrays are equal
8
- */
4
+ * Check if two arrays are shallow equal
5
+ * @param left Left side array
6
+ * @param right Right side array
7
+ * @returns true if arrays are equal
8
+ */
9
9
  const equal = (left, right) => {
10
10
  const length = left.length;
11
11
  if (length !== right.length) {
@@ -61,6 +61,7 @@ export class ScrollLockManager {
61
61
  */
62
62
  this.removeScrollLock = () => {
63
63
  this.scrollThrottler.schedule(() => {
64
+ /* must be the delayed task, otherwise scroll might happen in rare scenarios after mouseup */
64
65
  this.lockScroll = false;
65
66
  });
66
67
  };
@@ -82,7 +83,8 @@ export class ScrollLockManager {
82
83
  * @returns {void}
83
84
  */
84
85
  this.onTouchScroll = (event) => {
85
- if (event.cancelable && this.shouldCancelTouch(event)) { /* Not all touch events can be cancelled */
86
+ if (event.cancelable && this.shouldCancelTouch(event)) {
87
+ /* Not all touch events can be cancelled */
86
88
  event.preventDefault();
87
89
  }
88
90
  };
@@ -111,7 +113,7 @@ export class ScrollLockManager {
111
113
  * in lock management
112
114
  */
113
115
  get overlays() {
114
- return getOverlays().filter(overlay => !overlay.noInteractionLock);
116
+ return getOverlays().filter((overlay) => !overlay.noInteractionLock);
115
117
  }
116
118
  /**
117
119
  * Lock the screen and make top most overlay
@@ -337,21 +339,27 @@ export class ScrollLockManager {
337
339
  return true;
338
340
  }
339
341
  const checkSlice = path.slice(0, idx + 1);
340
- const canScroll = isVerticalScroll ? (element) => {
341
- const style = window.getComputedStyle(element);
342
- if (style.overflowY === 'scroll' || style.overflowY === 'auto') {
343
- // delta < 0 is scroll up, delta > 0 is scroll down.
344
- return deltaY < 0 ? element.scrollTop > 0 : element.scrollTop < element.scrollHeight - element.clientHeight;
345
- }
346
- return false;
347
- } : (element) => {
348
- const style = window.getComputedStyle(element);
349
- if (style.overflowX === 'scroll' || style.overflowX === 'auto') {
350
- // delta < 0 is scroll left, delta > 0 is scroll right.
351
- return deltaX < 0 ? element.scrollLeft > 0 : element.scrollLeft < element.scrollWidth - element.clientWidth;
342
+ const canScroll = isVerticalScroll
343
+ ? (element) => {
344
+ const style = window.getComputedStyle(element);
345
+ if (style.overflowY === 'scroll' || style.overflowY === 'auto') {
346
+ // delta < 0 is scroll up, delta > 0 is scroll down.
347
+ return deltaY < 0
348
+ ? element.scrollTop > 0
349
+ : element.scrollTop < element.scrollHeight - element.clientHeight;
350
+ }
351
+ return false;
352
352
  }
353
- return false;
354
- };
353
+ : (element) => {
354
+ const style = window.getComputedStyle(element);
355
+ if (style.overflowX === 'scroll' || style.overflowX === 'auto') {
356
+ // delta < 0 is scroll left, delta > 0 is scroll right.
357
+ return deltaX < 0
358
+ ? element.scrollLeft > 0
359
+ : element.scrollLeft < element.scrollWidth - element.clientWidth;
360
+ }
361
+ return false;
362
+ };
355
363
  while (checkSlice.length) {
356
364
  const node = checkSlice.shift();
357
365
  if (node && node.nodeType !== Node.ELEMENT_NODE) {
@@ -366,10 +374,10 @@ export class ScrollLockManager {
366
374
  }
367
375
  const locker = new ScrollLockManager(); /* Locker is a singleton */
368
376
  /**
369
- * Lock the screen and make top most overlay
370
- * and its position target interactive
371
- * @returns {void}
372
- */
377
+ * Lock the screen and make top most overlay
378
+ * and its position target interactive
379
+ * @returns {void}
380
+ */
373
381
  export const applyLock = () => {
374
382
  locker.applyLock();
375
383
  };
@@ -1,6 +1,6 @@
1
- import type { ViewAreaInfo } from '../helpers/types';
2
- import type { Overlay } from '../elements/overlay';
3
1
  import '../elements/overlay-viewport.js';
2
+ import type { Overlay } from '../elements/overlay';
3
+ import type { ViewAreaInfo } from '../helpers/types';
4
4
  /**
5
5
  * Viewport manager singleton is responsible for getting
6
6
  * viewport sizes and reacting on viewport changes
@@ -1,8 +1,8 @@
1
1
  import { AnimationTaskRunner } from '@refinitiv-ui/utils/async.js';
2
2
  import '../elements/overlay-viewport.js';
3
3
  /**
4
- * Default values for area info
5
- */
4
+ * Default values for area info
5
+ */
6
6
  const viewAreaInfo = {
7
7
  viewHeight: 0,
8
8
  viewWidth: 0,
@@ -32,6 +32,7 @@ export class ViewportManager {
32
32
  */
33
33
  this.callRefit = () => {
34
34
  this.refitFrame.schedule(() => {
35
+ /* must be in animation frame because of weird mobile behaviour */
35
36
  this.registry.forEach((viewport, overlay) => {
36
37
  this.resetViewportSizing(viewport);
37
38
  overlay.fit();
@@ -76,7 +76,8 @@ export class ZIndexManager {
76
76
  if (!topOverlay) {
77
77
  return ZIndex;
78
78
  }
79
- if (topOverlay.overlay === overlay) { /* do not increase z-index for self */
79
+ if (topOverlay.overlay === overlay) {
80
+ /* do not increase z-index for self */
80
81
  return topOverlay.zIndex;
81
82
  }
82
83
  return topOverlay.zIndex + 2; /* give space for backdrop z-index */
@@ -103,7 +104,8 @@ export class ZIndexManager {
103
104
  this.setZIndex(overlay, zIndex);
104
105
  overlay.addEventListener('focus', this.onFocus);
105
106
  }
106
- else if (typeof overlay.zIndex === 'number') { /* z-index has set manually. If it is removed, do nothing */
107
+ else if (typeof overlay.zIndex === 'number') {
108
+ /* z-index has set manually. If it is removed, do nothing */
107
109
  this.setZIndex(overlay, overlay.zIndex);
108
110
  }
109
111
  }
@@ -1,6 +1,6 @@
1
- import type { CollectionComposer } from '@refinitiv-ui/utils/collection.js';
2
- import type { OverlayMenu } from '../index';
3
1
  import type { Item, ItemData } from '../../item';
2
+ import type { OverlayMenu } from '../index';
3
+ import type { CollectionComposer } from '@refinitiv-ui/utils/collection.js';
4
4
  export type NestedMenu = {
5
5
  menu: OverlayMenu;
6
6
  item: Item;
@@ -1,5 +1,5 @@
1
1
  import { JSXInterface } from '../jsx';
2
- import { TemplateResult, CSSResultGroup, PropertyValues } from '@refinitiv-ui/core';
2
+ import { CSSResultGroup, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
3
3
  import '../icon/index.js';
4
4
  import '../item/index.js';
5
5
  import { Overlay } from '../overlay/index.js';
@@ -1,9 +1,8 @@
1
1
  var OverlayMenu_1;
2
2
  import { __decorate } from "tslib";
3
- import { html, css, nothing, WarningNotice } from '@refinitiv-ui/core';
3
+ import { WarningNotice, css, html, nothing } from '@refinitiv-ui/core';
4
4
  import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
5
5
  import { property } from '@refinitiv-ui/core/decorators/property.js';
6
- import { VERSION } from '../version.js';
7
6
  import { AnimationTaskRunner } from '@refinitiv-ui/utils/async.js';
8
7
  import { CollectionComposer } from '@refinitiv-ui/utils/collection.js';
9
8
  import { uuid } from '@refinitiv-ui/utils/uuid.js';
@@ -12,8 +11,9 @@ import '../item/index.js';
12
11
  import { Item } from '../item/index.js';
13
12
  import { Overlay } from '../overlay/index.js';
14
13
  import { applyLock } from '../overlay/managers/interaction-lock-manager.js';
15
- import { OpenedMenusManager } from './managers/menu-manager.js';
14
+ import { VERSION } from '../version.js';
16
15
  import { Navigation } from './helpers/constants.js';
16
+ import { OpenedMenusManager } from './managers/menu-manager.js';
17
17
  /**
18
18
  * Overlay that supports single-level and multi-level menus
19
19
  * @fires item-trigger - Fired when the user taps on item.
@@ -81,7 +81,8 @@ let OverlayMenu = OverlayMenu_1 = class OverlayMenu extends Overlay {
81
81
  overflow-y: auto;
82
82
  overflow-x: hidden;
83
83
  }
84
- :host([compact]:not([active])) { /* active is set in menu-manager */
84
+ :host([compact]:not([active])) {
85
+ /* active is set in menu-manager */
85
86
  opacity: 0;
86
87
  }
87
88
  `
@@ -108,28 +109,28 @@ let OverlayMenu = OverlayMenu_1 = class OverlayMenu extends Overlay {
108
109
  */
109
110
  this.nested = false;
110
111
  /**
111
- * @ignore
112
- */
112
+ * @ignore
113
+ */
113
114
  this.withShadow = true;
114
115
  /**
115
- * @ignore
116
- */
116
+ * @ignore
117
+ */
117
118
  this.lockPositionTarget = true;
118
119
  /**
119
- * @ignore
120
- */
120
+ * @ignore
121
+ */
121
122
  this.focusBoundary = null;
122
123
  /**
123
- * @ignore
124
- */
124
+ * @ignore
125
+ */
125
126
  this.position = ['bottom-start', 'top-start'];
126
127
  /**
127
- * @ignore
128
- */
128
+ * @ignore
129
+ */
129
130
  this.toItem = this.toItem.bind(this);
130
131
  /**
131
- * @ignore
132
- */
132
+ * @ignore
133
+ */
133
134
  this.modificationUpdate = this.modificationUpdate.bind(this);
134
135
  }
135
136
  /**
@@ -198,8 +199,8 @@ let OverlayMenu = OverlayMenu_1 = class OverlayMenu extends Overlay {
198
199
  */
199
200
  getDataValues() {
200
201
  const items = this.getDataDescendants();
201
- const selected = items.filter(item => this.composer.getItemPropertyValue(item, 'selected') === true);
202
- return selected.map(item => this.composer.getItemPropertyValue(item, 'value') || '');
202
+ const selected = items.filter((item) => this.composer.getItemPropertyValue(item, 'selected') === true);
203
+ return selected.map((item) => this.composer.getItemPropertyValue(item, 'value') || '');
203
204
  }
204
205
  /**
205
206
  * Set values to data collection
@@ -208,9 +209,9 @@ let OverlayMenu = OverlayMenu_1 = class OverlayMenu extends Overlay {
208
209
  */
209
210
  setDataValues(values) {
210
211
  const items = this.getDataDescendants();
211
- items.forEach(item => {
212
+ items.forEach((item) => {
212
213
  const value = this.composer.getItemPropertyValue(item, 'value') || '';
213
- const found = values.some(userValue => String(userValue) === value);
214
+ const found = values.some((userValue) => String(userValue) === value);
214
215
  this.composer.setItemPropertyValue(item, 'selected', found);
215
216
  });
216
217
  }
@@ -220,8 +221,8 @@ let OverlayMenu = OverlayMenu_1 = class OverlayMenu extends Overlay {
220
221
  */
221
222
  getSlottedValues() {
222
223
  const items = this.getSlottedDescendants();
223
- const selected = items.filter(item => item.selected === true);
224
- return selected.map(item => item.value);
224
+ const selected = items.filter((item) => item.selected === true);
225
+ return selected.map((item) => item.value);
225
226
  }
226
227
  /**
227
228
  * Set values to slotted elements
@@ -230,7 +231,7 @@ let OverlayMenu = OverlayMenu_1 = class OverlayMenu extends Overlay {
230
231
  */
231
232
  setSlottedValues(values) {
232
233
  const items = this.getSlottedDescendants();
233
- items.forEach(item => {
234
+ items.forEach((item) => {
234
235
  item.selected = values.includes(item.value);
235
236
  });
236
237
  }
@@ -310,12 +311,12 @@ let OverlayMenu = OverlayMenu_1 = class OverlayMenu extends Overlay {
310
311
  */
311
312
  shouldUpdate(changedProperties) {
312
313
  const shouldUpdate = super.shouldUpdate(changedProperties);
313
- return shouldUpdate
314
- || changedProperties.size === 0 /* this is to support empty requestUpdate() */
315
- || changedProperties.has('values')
316
- || changedProperties.has('data')
317
- || (this.opened && changedProperties.has('compact'))
318
- || (this.opened && changedProperties.has('modification'));
314
+ return (shouldUpdate ||
315
+ changedProperties.size === 0 /* this is to support empty requestUpdate() */ ||
316
+ changedProperties.has('values') ||
317
+ changedProperties.has('data') ||
318
+ (this.opened && changedProperties.has('compact')) ||
319
+ (this.opened && changedProperties.has('modification')));
319
320
  }
320
321
  /**
321
322
  * Compute property values that depend on other properties
@@ -744,7 +745,9 @@ let OverlayMenu = OverlayMenu_1 = class OverlayMenu extends Overlay {
744
745
  * @return {void}
745
746
  */
746
747
  setOpenedMenu(menuItem) {
747
- const menu = menuItem && menuItem.for && this.menuIndex[menuItem.for] ? this.menuIndex[menuItem.for].menu : undefined;
748
+ const menu = menuItem && menuItem.for && this.menuIndex[menuItem.for]
749
+ ? this.menuIndex[menuItem.for].menu
750
+ : undefined;
748
751
  menu && this.insertNestedMenu(menu);
749
752
  OpenedMenusManager.toggleNestedMenuFor(this, menuItem);
750
753
  }
@@ -873,7 +876,8 @@ let OverlayMenu = OverlayMenu_1 = class OverlayMenu extends Overlay {
873
876
  type="header"
874
877
  title=${tooltip || nothing}
875
878
  .label=${label}
876
- .icon=${icon}></ef-item>`;
879
+ .icon=${icon}
880
+ ></ef-item>`;
877
881
  }
878
882
  const disabled = composer.getItemPropertyValue(item, 'disabled');
879
883
  const selected = composer.getItemPropertyValue(item, 'selected');
@@ -896,7 +900,8 @@ let OverlayMenu = OverlayMenu_1 = class OverlayMenu extends Overlay {
896
900
  .subLabel=${subLabel}
897
901
  .icon=${icon}
898
902
  .value=${value || nothing}
899
- .for=${forMenu || nothing}>
903
+ .for=${forMenu || nothing}
904
+ >
900
905
  </ef-item>`;
901
906
  }
902
907
  /**
@@ -918,7 +923,13 @@ let OverlayMenu = OverlayMenu_1 = class OverlayMenu extends Overlay {
918
923
  return undefined;
919
924
  }
920
925
  return html `
921
- <ef-item part="menu-back" id="back" label="Back" @tap=${this.onBackItemTap} @mousemove=${this.onBackItemMouseMove}>
926
+ <ef-item
927
+ part="menu-back"
928
+ id="back"
929
+ label="Back"
930
+ @tap=${this.onBackItemTap}
931
+ @mousemove=${this.onBackItemMouseMove}
932
+ >
922
933
  <ef-icon slot="left" icon="left"></ef-icon>
923
934
  </ef-item>
924
935
  `;
@@ -1,5 +1,5 @@
1
- import type { Item } from '../../item';
2
1
  import { OverlayMenu } from '../index.js';
2
+ import type { Item } from '../../item';
3
3
  /**
4
4
  * Overlay menu manager monitors menu nesting and ensures
5
5
  * that only a single menu tree can be opened
@@ -46,17 +46,17 @@ declare abstract class OpenedMenusManager {
46
46
  */
47
47
  private static setOpened;
48
48
  /**
49
- * Register the menu
50
- * Can be called multiple times if menu items collection has changed
51
- * @param menu Menu
52
- * @returns {void}
53
- */
49
+ * Register the menu
50
+ * Can be called multiple times if menu items collection has changed
51
+ * @param menu Menu
52
+ * @returns {void}
53
+ */
54
54
  static register(menu: OverlayMenu): void;
55
55
  /**
56
- * Deregister the menu
57
- * @param menu Menu
58
- * @returns {void}
59
- */
56
+ * Deregister the menu
57
+ * @param menu Menu
58
+ * @returns {void}
59
+ */
60
60
  static deregister(menu: OverlayMenu): void;
61
61
  /**
62
62
  * Try to open nested menu for provided item. If no item provided, close nested menu
@@ -1,6 +1,6 @@
1
1
  import { AfterRenderTaskRunner } from '@refinitiv-ui/utils/async.js';
2
- import { OverlayMenu } from '../index.js';
3
2
  import { getOverlays } from '../../overlay/managers/zindex-manager.js';
3
+ import { OverlayMenu } from '../index.js';
4
4
  /**
5
5
  * Overlay menu manager monitors menu nesting and ensures
6
6
  * that only a single menu tree can be opened
@@ -12,7 +12,7 @@ class OpenedMenusManager {
12
12
  static get overlays() {
13
13
  const openedMenus = [];
14
14
  const overlayLayers = getOverlays();
15
- overlayLayers.forEach(overlay => {
15
+ overlayLayers.forEach((overlay) => {
16
16
  if (overlay instanceof OverlayMenu && this.registry.has(overlay)) {
17
17
  openedMenus.push(overlay);
18
18
  }
@@ -80,6 +80,7 @@ class OpenedMenusManager {
80
80
  static closeMenuFor(parent) {
81
81
  if (this._closeMenuFor(parent)) {
82
82
  this.focusThrottler.schedule(() => {
83
+ /* must be throttled for IE11 */
83
84
  parent.opened && parent.focus();
84
85
  });
85
86
  return true;
@@ -109,11 +110,11 @@ class OpenedMenusManager {
109
110
  return true;
110
111
  }
111
112
  /**
112
- * Register the menu
113
- * Can be called multiple times if menu items collection has changed
114
- * @param menu Menu
115
- * @returns {void}
116
- */
113
+ * Register the menu
114
+ * Can be called multiple times if menu items collection has changed
115
+ * @param menu Menu
116
+ * @returns {void}
117
+ */
117
118
  static register(menu) {
118
119
  if (!this.registry.size) {
119
120
  document.addEventListener('tapstart', this.closeOnOutsideOfMenuTap, {
@@ -126,10 +127,10 @@ class OpenedMenusManager {
126
127
  this.setActiveMenu();
127
128
  }
128
129
  /**
129
- * Deregister the menu
130
- * @param menu Menu
131
- * @returns {void}
132
- */
130
+ * Deregister the menu
131
+ * @param menu Menu
132
+ * @returns {void}
133
+ */
133
134
  static deregister(menu) {
134
135
  const parentMenu = this.getParentMenu(menu);
135
136
  if (!this.closeMenuFor(parentMenu || menu)) {
@@ -156,7 +157,8 @@ class OpenedMenusManager {
156
157
  static toggleNestedMenuFor(parentMenu, item) {
157
158
  const crossMenu = this.crossMenu.get(parentMenu);
158
159
  if (crossMenu) {
159
- if (crossMenu.item === item) { /* same menu */
160
+ if (crossMenu.item === item) {
161
+ /* same menu */
160
162
  return;
161
163
  }
162
164
  if (!this.closeMenuFor(parentMenu)) {
@@ -231,7 +233,7 @@ class OpenedMenusManager {
231
233
  * @returns {void}
232
234
  */
233
235
  static clear() {
234
- this.registry.forEach(menu => this.deregister(menu));
236
+ this.registry.forEach((menu) => this.deregister(menu));
235
237
  }
236
238
  }
237
239
  OpenedMenusManager.focusThrottler = new AfterRenderTaskRunner();
@@ -1,11 +1,11 @@
1
1
  import { JSXInterface } from '../jsx';
2
- import { BasicElement, PropertyValues, TemplateResult, CSSResultGroup } from '@refinitiv-ui/core';
2
+ import { BasicElement, CSSResultGroup, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
3
3
  import { Ref } from '@refinitiv-ui/core/directives/ref.js';
4
- import '../button/index.js';
5
- import '../button-bar/index.js';
6
- import '../layout/index.js';
7
4
  import '@refinitiv-ui/phrasebook/locale/en/pagination.js';
8
5
  import { Translate, TranslateDirectiveResult } from '@refinitiv-ui/translate';
6
+ import '../button-bar/index.js';
7
+ import '../button/index.js';
8
+ import '../layout/index.js';
9
9
  declare enum Direction {
10
10
  increment = "increment",
11
11
  decrement = "decrement"
@@ -1,15 +1,15 @@
1
1
  import { __decorate } from "tslib";
2
- import { BasicElement, html, css, nothing, WarningNotice } from '@refinitiv-ui/core';
2
+ import { BasicElement, WarningNotice, css, html, nothing } 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 { state } from '@refinitiv-ui/core/decorators/state.js';
6
- import { ref, createRef } from '@refinitiv-ui/core/directives/ref.js';
7
- import { VERSION } from '../version.js';
8
- import '../button/index.js';
9
- import '../button-bar/index.js';
10
- import '../layout/index.js';
6
+ import { createRef, ref } from '@refinitiv-ui/core/directives/ref.js';
11
7
  import '@refinitiv-ui/phrasebook/locale/en/pagination.js';
12
8
  import { translate } from '@refinitiv-ui/translate';
9
+ import '../button-bar/index.js';
10
+ import '../button/index.js';
11
+ import '../layout/index.js';
12
+ import { VERSION } from '../version.js';
13
13
  var Direction;
14
14
  (function (Direction) {
15
15
  Direction["increment"] = "increment";
@@ -195,7 +195,7 @@ let Pagination = class Pagination extends BasicElement {
195
195
  * @returns result of validation
196
196
  */
197
197
  validatePage(value, warning = false, propName = '') {
198
- if ((/^[1-9]([0-9]+)?$/).test(value)) {
198
+ if (/^[1-9]([0-9]+)?$/.test(value)) {
199
199
  return true;
200
200
  }
201
201
  else {
@@ -400,7 +400,8 @@ let Pagination = class Pagination extends BasicElement {
400
400
  if (inputValue.startsWith('0')) {
401
401
  this.inputElement.value = inputValue.substring(1);
402
402
  }
403
- else if (currentInput !== inputValue) { // update if found new value
403
+ else if (currentInput !== inputValue) {
404
+ // update if found new value
404
405
  this.inputElement.value = inputValue;
405
406
  }
406
407
  }
@@ -421,13 +422,17 @@ let Pagination = class Pagination extends BasicElement {
421
422
  break;
422
423
  case 'Up':
423
424
  case 'ArrowUp':
424
- this.inputElement && this.hasNextPage(Number(this.inputElement.value || 1)) && this.updateInputValue(1, Direction.increment);
425
+ this.inputElement &&
426
+ this.hasNextPage(Number(this.inputElement.value || 1)) &&
427
+ this.updateInputValue(1, Direction.increment);
425
428
  this.inputElement?.select();
426
429
  event.preventDefault();
427
430
  break;
428
431
  case 'Down':
429
432
  case 'ArrowDown':
430
- this.inputElement && this.hasPreviousPage(Number(this.inputElement.value || 1)) && this.updateInputValue(1, Direction.decrement);
433
+ this.inputElement &&
434
+ this.hasPreviousPage(Number(this.inputElement.value || 1)) &&
435
+ this.updateInputValue(1, Direction.decrement);
431
436
  this.inputElement?.select();
432
437
  event.preventDefault();
433
438
  break;
@@ -466,8 +471,18 @@ let Pagination = class Pagination extends BasicElement {
466
471
  return html `
467
472
  <ef-layout part="container" flex nowrap>
468
473
  <ef-button-bar part="buttons" aria-hidden="true" tabindex="-1">
469
- <ef-button id="first" icon="skip-to-start" @tap="${this.onFirstTap}" .disabled=${!this.useFirstButton}></ef-button>
470
- <ef-button id="previous" icon="left" @tap="${this.onPreviousTap}" .disabled=${!this.usePreviousButton}></ef-button>
474
+ <ef-button
475
+ id="first"
476
+ icon="skip-to-start"
477
+ @tap="${this.onFirstTap}"
478
+ .disabled=${!this.useFirstButton}
479
+ ></ef-button>
480
+ <ef-button
481
+ id="previous"
482
+ icon="left"
483
+ @tap="${this.onPreviousTap}"
484
+ .disabled=${!this.usePreviousButton}
485
+ ></ef-button>
471
486
  </ef-button-bar>
472
487
  <label part="label" for="input">${this.inputTextFormat}</label>
473
488
  <input
@@ -486,8 +501,18 @@ let Pagination = class Pagination extends BasicElement {
486
501
  ${ref(this.inputRef)}
487
502
  />
488
503
  <ef-button-bar part="buttons" aria-hidden="true" tabindex="-1">
489
- <ef-button id="next" icon="right" @tap="${this.onNextTap}" .disabled=${!this.useNextButton}></ef-button>
490
- <ef-button id="last" icon="skip-to-end" @tap="${this.onLastTap}" .disabled=${!this.useLastButton}></ef-button>
504
+ <ef-button
505
+ id="next"
506
+ icon="right"
507
+ @tap="${this.onNextTap}"
508
+ .disabled=${!this.useNextButton}
509
+ ></ef-button>
510
+ <ef-button
511
+ id="last"
512
+ icon="skip-to-end"
513
+ @tap="${this.onLastTap}"
514
+ .disabled=${!this.useLastButton}
515
+ ></ef-button>
491
516
  </ef-button-bar>
492
517
  </ef-layout>
493
518
  `;
@@ -1,5 +1,5 @@
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 { VERSION } from '../version.js';
@@ -1,10 +1,10 @@
1
1
  import { JSXInterface } from '../jsx';
2
2
  import { PropertyValues, TemplateResult } from '@refinitiv-ui/core';
3
3
  import { TemplateMap } from '@refinitiv-ui/core/directives/template-map.js';
4
- import { TextField } from '../text-field/index.js';
5
- import '../icon/index.js';
6
4
  import '@refinitiv-ui/phrasebook/locale/en/password-field.js';
7
5
  import { Translate } from '@refinitiv-ui/translate';
6
+ import '../icon/index.js';
7
+ import { TextField } from '../text-field/index.js';
8
8
  /**
9
9
  * A form control element for password.
10
10
  *
@@ -2,11 +2,11 @@ import { __decorate } from "tslib";
2
2
  import { html } from '@refinitiv-ui/core';
3
3
  import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
4
4
  import { state } from '@refinitiv-ui/core/decorators/state.js';
5
- import { preload } from '../icon/index.js';
6
- import { TextField } from '../text-field/index.js';
7
- import '../icon/index.js';
8
5
  import '@refinitiv-ui/phrasebook/locale/en/password-field.js';
9
6
  import { translate } from '@refinitiv-ui/translate';
7
+ import { preload } from '../icon/index.js';
8
+ import '../icon/index.js';
9
+ import { TextField } from '../text-field/index.js';
10
10
  import { deregisterOverflowTooltip } from '../tooltip/index.js';
11
11
  let isEyeOffPreloadRequested = false;
12
12
  /**
@@ -74,7 +74,7 @@ let PasswordField = class PasswordField extends TextField {
74
74
  get decorateInputMap() {
75
75
  return {
76
76
  ...super.decorateInputMap,
77
- 'type': this.isPasswordVisible ? 'text' : 'password'
77
+ type: this.isPasswordVisible ? 'text' : 'password'
78
78
  };
79
79
  }
80
80
  /**
@@ -1,5 +1,5 @@
1
1
  import { JSXInterface } from '../jsx';
2
- import { ControlElement, CSSResultGroup, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
2
+ import { CSSResultGroup, ControlElement, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
3
3
  import '../icon/index.js';
4
4
  /**
5
5
  * A small button style component