@refinitiv-ui/elements 7.11.1 → 7.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,13 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [7.12.0](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@7.11.1...@refinitiv-ui/elements@7.12.0) (2024-06-10)
7
+
8
+ ### Features
9
+
10
+ - **time-picker:** add build-in validation for partial input value ([#1165](https://github.com/Refinitiv/refinitiv-ui/issues/1165)) ([bb43ab7](https://github.com/Refinitiv/refinitiv-ui/commit/bb43ab7b5c718d7d7ae5b4f18bc4eaf3857ee5a6))
11
+ - **tree:** enable custom filter of query ([#1169](https://github.com/Refinitiv/refinitiv-ui/issues/1169)) ([c9ef6b6](https://github.com/Refinitiv/refinitiv-ui/commit/c9ef6b68683f95f31550d6371b8d0f05613f96cd))
12
+
6
13
  ## [7.11.1](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@7.11.0...@refinitiv-ui/elements@7.11.1) (2024-05-20)
7
14
 
8
15
  ### Bug Fixes
@@ -32,8 +32,6 @@ export const createDefaultFilter = (el) => {
32
32
  }
33
33
  const regex = getRegularExpressionOfQuery();
34
34
  const result = regex.test(label);
35
- // this example uses global scope, so the index needs resetting
36
- regex.lastIndex = 0;
37
35
  return result;
38
36
  };
39
37
  };
@@ -1136,10 +1136,10 @@ let ComboBox = class ComboBox extends FormFieldElement {
1136
1136
  }
1137
1137
  };
1138
1138
  __decorate([
1139
- property({ type: Function, attribute: false })
1139
+ property({ attribute: false })
1140
1140
  ], ComboBox.prototype, "filter", void 0);
1141
1141
  __decorate([
1142
- property({ type: Function, attribute: false })
1142
+ property({ attribute: false })
1143
1143
  ], ComboBox.prototype, "renderer", void 0);
1144
1144
  __decorate([
1145
1145
  property({ type: Boolean })
@@ -228,6 +228,12 @@ export declare class DatetimePicker extends FormFieldElement implements MultiVal
228
228
  * @returns promise
229
229
  */
230
230
  protected performUpdate(): Promise<void>;
231
+ /**
232
+ * if the time-picker input(s) is invalid
233
+ * it will sync time-picker value to previous valid value that store in datetime-picker
234
+ * @returns {void}
235
+ */
236
+ private syncTimePickerInput;
231
237
  /**
232
238
  * Overwrite validation method for value
233
239
  *
@@ -353,6 +353,7 @@ let DatetimePicker = class DatetimePicker extends FormFieldElement {
353
353
  update(changedProperties) {
354
354
  if (changedProperties.has('opened') && this.opened) {
355
355
  this.lazyRendered = true;
356
+ this.syncTimePickerInput();
356
357
  }
357
358
  // make sure to close popup for disabled
358
359
  if (this.opened && !this.canOpenPopup) {
@@ -392,6 +393,31 @@ let DatetimePicker = class DatetimePicker extends FormFieldElement {
392
393
  ]);
393
394
  void super.performUpdate();
394
395
  }
396
+ /**
397
+ * if the time-picker input(s) is invalid
398
+ * it will sync time-picker value to previous valid value that store in datetime-picker
399
+ * @returns {void}
400
+ */
401
+ syncTimePickerInput() {
402
+ if (!this.timepicker || !this.opened) {
403
+ return;
404
+ }
405
+ const validateAndFallback = (element, value) => {
406
+ if (!element) {
407
+ return;
408
+ }
409
+ if (!element.checkValidity() || (!element.value && value)) {
410
+ element.value = value;
411
+ }
412
+ };
413
+ if (this.range) {
414
+ validateAndFallback(this.timepickerFromEl, this.timepickerValues[0]);
415
+ validateAndFallback(this.timepickerToEl, this.timepickerValues[1]);
416
+ }
417
+ else {
418
+ validateAndFallback(this.timepickerEl, this.timepickerValues[0]);
419
+ }
420
+ }
395
421
  /**
396
422
  * Overwrite validation method for value
397
423
  *
@@ -975,6 +1001,7 @@ let DatetimePicker = class DatetimePicker extends FormFieldElement {
975
1001
  return html `<ef-time-picker
976
1002
  id="${id}"
977
1003
  part="time-picker"
1004
+ custom-validation
978
1005
  .showSeconds=${this.showSeconds}
979
1006
  .amPm=${this.amPm}
980
1007
  .value=${value}
@@ -614,7 +614,7 @@ let List = class List extends ControlElement {
614
614
  }
615
615
  };
616
616
  __decorate([
617
- property({ type: Function, attribute: false })
617
+ property({ attribute: false })
618
618
  ], List.prototype, "renderer", void 0);
619
619
  __decorate([
620
620
  property({ type: Boolean })
@@ -748,7 +748,7 @@ __decorate([
748
748
  property({ type: String, reflect: true, attribute: 'secondary-legend' })
749
749
  ], SwingGauge.prototype, "secondaryLegend", void 0);
750
750
  __decorate([
751
- property({ type: Function, attribute: false })
751
+ property({ attribute: false })
752
752
  ], SwingGauge.prototype, "valueFormatter", void 0);
753
753
  __decorate([
754
754
  state()
@@ -5,6 +5,12 @@
5
5
  "name": "ef-time-picker",
6
6
  "description": "Control the time input",
7
7
  "attributes": [
8
+ {
9
+ "name": "custom-validation",
10
+ "description": "Disable automatic build-in validation checking for partial input of hour, minute & second (if applicable) segments",
11
+ "type": "boolean",
12
+ "default": "false"
13
+ },
8
14
  {
9
15
  "name": "hours",
10
16
  "description": "Hours time segment in 24hr format",
@@ -49,9 +55,22 @@
49
55
  "description": "Set disabled state",
50
56
  "type": "boolean",
51
57
  "default": "false"
58
+ },
59
+ {
60
+ "name": "error",
61
+ "description": "Set error state",
62
+ "type": "boolean",
63
+ "default": "false"
52
64
  }
53
65
  ],
54
66
  "properties": [
67
+ {
68
+ "name": "customValidation",
69
+ "attribute": "custom-validation",
70
+ "description": "Disable automatic build-in validation checking for partial input of hour, minute & second (if applicable) segments",
71
+ "type": "boolean",
72
+ "default": "false"
73
+ },
55
74
  {
56
75
  "name": "hours",
57
76
  "attribute": "hours",
@@ -104,15 +123,36 @@
104
123
  "description": "Set disabled state",
105
124
  "type": "boolean",
106
125
  "default": "false"
126
+ },
127
+ {
128
+ "name": "error",
129
+ "attribute": "error",
130
+ "description": "Set error state",
131
+ "type": "boolean",
132
+ "default": "false"
107
133
  }
108
134
  ],
109
135
  "events": [
110
136
  {
111
137
  "name": "value-changed",
112
138
  "description": "Fired when the user commits a value change. The event is not triggered if `value` property is changed programmatically."
139
+ },
140
+ {
141
+ "name": "error-changed",
142
+ "description": "Fired when user inputs invalid value. The event is not triggered if `error` property is changed programmatically."
113
143
  }
114
144
  ],
115
145
  "methods": [
146
+ {
147
+ "name": "checkValidity",
148
+ "description": "Returns `true` if all input segments contain valid data or empty. Otherwise, returns false.",
149
+ "params": []
150
+ },
151
+ {
152
+ "name": "reportValidity",
153
+ "description": "Validate input. Mark as error if input is invalid",
154
+ "params": []
155
+ },
116
156
  {
117
157
  "name": "toggle",
118
158
  "description": "Toggles the AM/PM state",
@@ -4,25 +4,30 @@ Control the time input
4
4
 
5
5
  ## Properties
6
6
 
7
- | Property | Attribute | Type | Default | Description |
8
- |---------------|----------------|------------------|---------|--------------------------------------------------|
9
- | `amPm` | `am-pm` | `boolean` | false | Toggles 12hr time display |
10
- | `disabled` | `disabled` | `boolean` | false | Set disabled state |
11
- | `hours` | `hours` | `number \| null` | null | Hours time segment in 24hr format |
12
- | `minutes` | `minutes` | `number \| null` | null | Minutes time segment |
13
- | `readonly` | `readonly` | `boolean` | false | Set readonly state |
14
- | `seconds` | `seconds` | `number \| null` | null | Seconds time segment |
15
- | `showSeconds` | `show-seconds` | `boolean` | false | Flag to show seconds time segment in display.<br />Seconds are automatically shown when `hh:mm:ss` time format is provided as a value. |
16
- | `value` | `value` | `string` | "" | Current time value |
7
+ | Property | Attribute | Type | Default | Description |
8
+ |--------------------|---------------------|------------------|---------|--------------------------------------------------|
9
+ | `amPm` | `am-pm` | `boolean` | false | Toggles 12hr time display |
10
+ | `customValidation` | `custom-validation` | `boolean` | false | Disable automatic build-in validation checking for partial input of hour, minute & second (if applicable) segments |
11
+ | `disabled` | `disabled` | `boolean` | false | Set disabled state |
12
+ | `error` | `error` | `boolean` | false | Set error state |
13
+ | `hours` | `hours` | `number \| null` | null | Hours time segment in 24hr format |
14
+ | `minutes` | `minutes` | `number \| null` | null | Minutes time segment |
15
+ | `readonly` | `readonly` | `boolean` | false | Set readonly state |
16
+ | `seconds` | `seconds` | `number \| null` | null | Seconds time segment |
17
+ | `showSeconds` | `show-seconds` | `boolean` | false | Flag to show seconds time segment in display.<br />Seconds are automatically shown when `hh:mm:ss` time format is provided as a value. |
18
+ | `value` | `value` | `string` | "" | Current time value |
17
19
 
18
20
  ## Methods
19
21
 
20
- | Method | Type | Description |
21
- |----------|------------|-------------------------|
22
- | `toggle` | `(): void` | Toggles the AM/PM state |
22
+ | Method | Type | Description |
23
+ |------------------|---------------|--------------------------------------------------|
24
+ | `checkValidity` | `(): boolean` | Returns `true` if all input segments contain valid data or empty. Otherwise, returns false. |
25
+ | `reportValidity` | `(): boolean` | Validate input. Mark as error if input is invalid |
26
+ | `toggle` | `(): void` | Toggles the AM/PM state |
23
27
 
24
28
  ## Events
25
29
 
26
30
  | Event | Description |
27
31
  |-----------------|--------------------------------------------------|
32
+ | `error-changed` | Fired when user inputs invalid value. The event is not triggered if `error` property is changed programmatically. |
28
33
  | `value-changed` | Fired when the user commits a value change. The event is not triggered if `value` property is changed programmatically. |
@@ -1,5 +1,5 @@
1
1
  import { JSXInterface } from '../jsx';
2
- import { CSSResultGroup, ControlElement, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
2
+ import { CSSResultGroup, FormFieldElement, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
3
3
  import '@refinitiv-ui/phrasebook/locale/en/time-picker.js';
4
4
  import { TranslateDirective } from '@refinitiv-ui/translate';
5
5
  import '../number-field/index.js';
@@ -11,14 +11,18 @@ declare enum Segment {
11
11
  /**
12
12
  * Control the time input
13
13
  * @event value-changed - Fired when the user commits a value change. The event is not triggered if `value` property is changed programmatically.
14
+ * @event error-changed - Fired when user inputs invalid value. The event is not triggered if `error` property is changed programmatically.
14
15
  *
15
16
  * @attr {boolean} readonly - Set readonly state
16
17
  * @prop {boolean} [readonly=false] - Set readonly state
17
18
  *
18
19
  * @attr {boolean} disabled - Set disabled state
19
20
  * @prop {boolean} [disabled=false] - Set disabled state
21
+ *
22
+ * @attr {boolean} error - Set error state
23
+ * @prop {boolean} [error=false] - Set error state
20
24
  */
21
- export declare class TimePicker extends ControlElement {
25
+ export declare class TimePicker extends FormFieldElement {
22
26
  /**
23
27
  * Element version number
24
28
  * @returns version number
@@ -46,6 +50,10 @@ export declare class TimePicker extends ControlElement {
46
50
  * The flag is not relevant when withSecond is forced to be true
47
51
  */
48
52
  private valueWithSeconds;
53
+ /**
54
+ * Disable automatic build-in validation checking for partial input of hour, minute & second (if applicable) segments
55
+ */
56
+ customValidation: boolean;
49
57
  /**
50
58
  * Hours time segment in 24hr format
51
59
  * @param hours hours value
@@ -243,6 +251,21 @@ export declare class TimePicker extends ControlElement {
243
251
  * @returns {void}
244
252
  */
245
253
  private onInputValueChanged;
254
+ /**
255
+ * Returns `true` if all input segments contain valid data or empty. Otherwise, returns false.
256
+ * @returns true if input is valid
257
+ */
258
+ checkValidity(): boolean;
259
+ /**
260
+ * Validate input. Mark as error if input is invalid
261
+ * @returns false if there is an error
262
+ */
263
+ reportValidity(): boolean;
264
+ /**
265
+ * Handle validation on input segments
266
+ * @returns {void}
267
+ */
268
+ private onInputValidation;
246
269
  /**
247
270
  * Updates a time segment to the provided value
248
271
  * @param segment Segment id
@@ -349,6 +372,12 @@ export declare class TimePicker extends ControlElement {
349
372
  * @returns {void}
350
373
  */
351
374
  toggle(): void;
375
+ /**
376
+ * Handle tap toggle between AP and PM state
377
+ * @param userInteraction indicates whether the toggle is triggered by user interaction or not
378
+ * @returns {void}
379
+ */
380
+ private onToggle;
352
381
  /**
353
382
  * A `CSSResultGroup` that will be used
354
383
  * to style the host, slotted children
@@ -417,7 +446,7 @@ declare global {
417
446
 
418
447
  namespace JSX {
419
448
  interface IntrinsicElements {
420
- 'ef-time-picker': Partial<TimePicker> | JSXInterface.ControlHTMLAttributes<TimePicker>;
449
+ 'ef-time-picker': Partial<TimePicker> | JSXInterface.HTMLAttributes<TimePicker>;
421
450
  }
422
451
  }
423
452
  }
@@ -1,6 +1,6 @@
1
1
  var TimePicker_1;
2
2
  import { __decorate } from "tslib";
3
- import { ControlElement, css, html, nothing } from '@refinitiv-ui/core';
3
+ import { FormFieldElement, 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
6
  import { query } from '@refinitiv-ui/core/decorators/query.js';
@@ -45,14 +45,18 @@ const Placeholder = {
45
45
  /**
46
46
  * Control the time input
47
47
  * @event value-changed - Fired when the user commits a value change. The event is not triggered if `value` property is changed programmatically.
48
+ * @event error-changed - Fired when user inputs invalid value. The event is not triggered if `error` property is changed programmatically.
48
49
  *
49
50
  * @attr {boolean} readonly - Set readonly state
50
51
  * @prop {boolean} [readonly=false] - Set readonly state
51
52
  *
52
53
  * @attr {boolean} disabled - Set disabled state
53
54
  * @prop {boolean} [disabled=false] - Set disabled state
55
+ *
56
+ * @attr {boolean} error - Set error state
57
+ * @prop {boolean} [error=false] - Set error state
54
58
  */
55
- let TimePicker = TimePicker_1 = class TimePicker extends ControlElement {
59
+ let TimePicker = TimePicker_1 = class TimePicker extends FormFieldElement {
56
60
  constructor() {
57
61
  super(...arguments);
58
62
  this.defaultRole = 'group';
@@ -77,6 +81,10 @@ let TimePicker = TimePicker_1 = class TimePicker extends ControlElement {
77
81
  * The flag is not relevant when withSecond is forced to be true
78
82
  */
79
83
  this.valueWithSeconds = false;
84
+ /**
85
+ * Disable automatic build-in validation checking for partial input of hour, minute & second (if applicable) segments
86
+ */
87
+ this.customValidation = false;
80
88
  /**
81
89
  * Toggles 12hr time display
82
90
  */
@@ -459,6 +467,9 @@ let TimePicker = TimePicker_1 = class TimePicker extends ControlElement {
459
467
  this.updateTimeSegmentTo(segment, Number(value));
460
468
  }
461
469
  this.updateSegmentValue(segment);
470
+ if (!this.customValidation) {
471
+ this.reportValidity();
472
+ }
462
473
  }
463
474
  /**
464
475
  * Handles action when input value changes
@@ -480,6 +491,48 @@ let TimePicker = TimePicker_1 = class TimePicker extends ControlElement {
480
491
  }
481
492
  }
482
493
  }
494
+ /**
495
+ * Returns `true` if all input segments contain valid data or empty. Otherwise, returns false.
496
+ * @returns true if input is valid
497
+ */
498
+ checkValidity() {
499
+ const hours = this.hoursInput?.value;
500
+ const minutes = this.minutesInput?.value;
501
+ const seconds = this.secondsInput?.value;
502
+ // If no values are provided in all segment, there is no error
503
+ if (!hours && !minutes && !seconds) {
504
+ return true;
505
+ }
506
+ const checkValues = (value, maxUnit) => {
507
+ if (!value) {
508
+ return false;
509
+ }
510
+ const _value = Number(value);
511
+ return TimePicker_1.validUnit(_value, MIN_UNIT, maxUnit, null) === _value;
512
+ };
513
+ const validHour = checkValues(hours, MAX_HOURS);
514
+ const validMinute = checkValues(minutes, MAX_MINUTES);
515
+ const validSecond = checkValues(seconds, MAX_SECONDS);
516
+ // Check second only when it's enabled
517
+ return validHour && validMinute && (!this.isShowSeconds || validSecond);
518
+ }
519
+ /**
520
+ * Validate input. Mark as error if input is invalid
521
+ * @returns false if there is an error
522
+ */
523
+ reportValidity() {
524
+ return super.reportValidity();
525
+ }
526
+ /**
527
+ * Handle validation on input segments
528
+ * @returns {void}
529
+ */
530
+ onInputValidation() {
531
+ if (this.customValidation) {
532
+ return;
533
+ }
534
+ this.reportValidity();
535
+ }
483
536
  /**
484
537
  * Updates a time segment to the provided value
485
538
  * @param segment Segment id
@@ -544,7 +597,7 @@ let TimePicker = TimePicker_1 = class TimePicker extends ControlElement {
544
597
  */
545
598
  handleEnterKey(event) {
546
599
  if (event.target === this.toggleEl) {
547
- this.toggle();
600
+ void this.onToggle();
548
601
  event.preventDefault();
549
602
  }
550
603
  }
@@ -573,7 +626,7 @@ let TimePicker = TimePicker_1 = class TimePicker extends ControlElement {
573
626
  */
574
627
  toggleOrModify(amount, target) {
575
628
  if (target === this.toggleEl) {
576
- this.toggle();
629
+ void this.onToggle();
577
630
  }
578
631
  else if (target === this.hoursInput) {
579
632
  this.changeValueBy(amount, Segment.HOURS);
@@ -679,9 +732,26 @@ let TimePicker = TimePicker_1 = class TimePicker extends ControlElement {
679
732
  * @returns {void}
680
733
  */
681
734
  toggle() {
735
+ void this.onToggle(false);
736
+ }
737
+ /**
738
+ * Handle tap toggle between AP and PM state
739
+ * @param userInteraction indicates whether the toggle is triggered by user interaction or not
740
+ * @returns {void}
741
+ */
742
+ async onToggle(userInteraction = true) {
682
743
  if (this.amPm) {
683
744
  const hours = this.hours === null ? new Date().getHours() : (this.hours + HOURS_IN_DAY / 2) % HOURS_IN_DAY;
745
+ if (!userInteraction) {
746
+ this.hours = hours; // set segment without notifying value change
747
+ return;
748
+ }
684
749
  this.setSegmentAndNotify(Segment.HOURS, hours);
750
+ await this.updateComplete;
751
+ // The segment needs to be validated when its value has been changed
752
+ if (!this.customValidation) {
753
+ this.reportValidity();
754
+ }
685
755
  }
686
756
  }
687
757
  /**
@@ -730,6 +800,7 @@ let TimePicker = TimePicker_1 = class TimePicker extends ControlElement {
730
800
  ?readonly="${this.readonly}"
731
801
  @value-changed="${this.onInputValueChanged}"
732
802
  @focused-changed=${this.onInputFocusedChanged}
803
+ @input=${this.onInputValidation}
733
804
  ></ef-number-field>`;
734
805
  }
735
806
  /**
@@ -752,6 +823,7 @@ let TimePicker = TimePicker_1 = class TimePicker extends ControlElement {
752
823
  transparent
753
824
  @value-changed="${this.onInputValueChanged}"
754
825
  @focused-changed=${this.onInputFocusedChanged}
826
+ @input=${this.onInputValidation}
755
827
  ></ef-number-field>`;
756
828
  }
757
829
  /**
@@ -774,6 +846,7 @@ let TimePicker = TimePicker_1 = class TimePicker extends ControlElement {
774
846
  transparent
775
847
  @value-changed="${this.onInputValueChanged}"
776
848
  @focused-changed=${this.onInputFocusedChanged}
849
+ @input=${this.onInputValidation}
777
850
  ></ef-number-field>`;
778
851
  }
779
852
  /**
@@ -790,7 +863,7 @@ let TimePicker = TimePicker_1 = class TimePicker extends ControlElement {
790
863
  aria-activedescendant="${hasHours ? (this.isAM() ? 'toggle-am' : 'toggle-pm') : nothing}"
791
864
  id="toggle"
792
865
  part="toggle"
793
- @tap=${this.toggle}
866
+ @tap=${this.onToggle}
794
867
  tabindex="0"
795
868
  >
796
869
  <div
@@ -870,6 +943,9 @@ let TimePicker = TimePicker_1 = class TimePicker extends ControlElement {
870
943
  * @returns Divider segment
871
944
  */
872
945
  TimePicker.dividerTemplate = html `<span part="divider"></span>`;
946
+ __decorate([
947
+ property({ type: Boolean, attribute: 'custom-validation' })
948
+ ], TimePicker.prototype, "customValidation", void 0);
873
949
  __decorate([
874
950
  property({ type: Number })
875
951
  ], TimePicker.prototype, "hours", null);
@@ -1,4 +1,4 @@
1
1
  import '@refinitiv-ui/elements/number-field/themes/halo/dark';
2
2
  import '@refinitiv-ui/elements/icon/themes/halo/dark';
3
3
  import '@refinitiv-ui/elements/tooltip/themes/halo/dark';
4
- dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-time-picker', styles: ':host{display:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:left;font-family:inherit;font-size:12px;font-weight:400;height:24px;max-width:100%;margin:1px 0;outline:0;box-sizing:border-box;display:inline-flex;align-items:center;position:relative;vertical-align:middle;color:#ccc;border-radius:0;background-color:#0d0d0d;text-overflow:ellipsis;border:1px solid #404040;width:auto;min-width:-moz-max-content;min-width:max-content;padding:0}:host([disabled]){color:rgba(204,204,204,.5);border:1px solid rgba(64,64,64,.5)}:host([focused]){background-size:100% 2px,100% 1px!important;background-position:center bottom!important;border-color:#334bff}:host [part=input]{margin:0;text-align:center;padding:0;color:inherit;width:24px}:host [part=divider]::before{content:\':\'}:host [part=toggle]{width:20px;font-size:50%;display:flex;flex-flow:column nowrap;align-items:center;justify-content:center;line-height:1.2;outline:0;cursor:pointer;touch-action:manipulation}:host [part=input],:host [part=toggle]{height:100%;position:relative}:host [part=input]:focus::after,:host [part=input][focused]::after,:host [part=toggle]:focus::after,:host [part=toggle][focused]::after{content:\'\';border-right:8px solid transparent;border-left:8px solid transparent;position:absolute;left:calc(50% - 8px);bottom:0;border-bottom:4px solid transparent;display:none}:host [part=toggle-item]{opacity:.5}:host [part=toggle-item][active]{opacity:1}:host [part=divider]{width:2px}' }}));
4
+ dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-time-picker', styles: ':host{display:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:left;font-family:inherit;font-size:12px;font-weight:400;height:24px;max-width:100%;margin:1px 0;outline:0;box-sizing:border-box;display:inline-flex;align-items:center;position:relative;vertical-align:middle;color:#ccc;border-radius:0;background-color:#0d0d0d;text-overflow:ellipsis;border:1px solid #404040;width:auto;min-width:-moz-max-content;min-width:max-content;padding:0}:host([disabled]){color:rgba(204,204,204,.5);border:1px solid rgba(64,64,64,.5)}:host([error]){border:1px solid #a01c2b}:host([focused]){background-size:100% 2px,100% 1px!important;background-position:center bottom!important;border-color:#334bff}:host [part=input]{margin:0;text-align:center;padding:0;color:inherit;width:24px}:host [part=divider]::before{content:\':\'}:host [part=toggle]{width:20px;font-size:50%;display:flex;flex-flow:column nowrap;align-items:center;justify-content:center;line-height:1.2;outline:0;cursor:pointer;touch-action:manipulation}:host [part=input],:host [part=toggle]{height:100%;position:relative}:host [part=toggle-item]{opacity:.5}:host [part=toggle-item][active]{opacity:1}:host([error]) [part=input]:focus::after,:host([error]) [part=input][focused]::after,:host([error]) [part=toggle]:focus::after,:host([error]) [part=toggle][focused]::after{border-bottom-color:#a01c2b}:host [part=divider]{width:2px}:host [part=input]:focus::after,:host [part=input][focused]::after,:host [part=toggle]:focus::after,:host [part=toggle][focused]::after{content:\'\';border-right:8px solid transparent;border-left:8px solid transparent;position:absolute;left:calc(50% - 8px);bottom:0;border-bottom:4px solid transparent;display:none}:host([readonly]:not([focused])){border-color:rgba(64,64,64,.5)}:host(:hover:not([readonly]):not([focused])){border-color:grey}:host([error]:not([focused])){border-color:#f5475b}:host([error][readonly]:not([focused])){border-color:rgba(250,168,177,.5)}:host([error]:hover:not([readonly]):not([focused])){border-color:#faa8b1}' }}));
@@ -1,4 +1,4 @@
1
1
  import '@refinitiv-ui/elements/number-field/themes/halo/light';
2
2
  import '@refinitiv-ui/elements/icon/themes/halo/light';
3
3
  import '@refinitiv-ui/elements/tooltip/themes/halo/light';
4
- dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-time-picker', styles: ':host{display:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:left;font-family:inherit;font-size:12px;font-weight:400;height:24px;max-width:100%;margin:1px 0;outline:0;box-sizing:border-box;display:inline-flex;align-items:center;position:relative;vertical-align:middle;color:#404040;border-radius:0;background-color:#fff;text-overflow:ellipsis;border:1px solid #595959;width:auto;min-width:-moz-max-content;min-width:max-content;padding:0}:host([disabled]){color:rgba(64,64,64,.5);border:1px solid rgba(89,89,89,.5)}:host([focused]){background-size:100% 2px,100% 1px!important;background-position:center bottom!important;border-color:#334bff}:host [part=input]{margin:0;text-align:center;padding:0;color:inherit;width:24px}:host [part=divider]::before{content:\':\'}:host [part=toggle]{width:20px;font-size:50%;display:flex;flex-flow:column nowrap;align-items:center;justify-content:center;line-height:1.2;outline:0;cursor:pointer;touch-action:manipulation}:host [part=input],:host [part=toggle]{height:100%;position:relative}:host [part=input]:focus::after,:host [part=input][focused]::after,:host [part=toggle]:focus::after,:host [part=toggle][focused]::after{content:\'\';border-right:8px solid transparent;border-left:8px solid transparent;position:absolute;left:calc(50% - 8px);bottom:0;border-bottom:4px solid transparent;display:none}:host [part=toggle-item]{opacity:.5}:host [part=toggle-item][active]{opacity:1}:host [part=divider]{width:2px}' }}));
4
+ dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-time-picker', styles: ':host{display:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:left;font-family:inherit;font-size:12px;font-weight:400;height:24px;max-width:100%;margin:1px 0;outline:0;box-sizing:border-box;display:inline-flex;align-items:center;position:relative;vertical-align:middle;color:#404040;border-radius:0;background-color:#fff;text-overflow:ellipsis;border:1px solid #595959;width:auto;min-width:-moz-max-content;min-width:max-content;padding:0}:host([disabled]){color:rgba(64,64,64,.5);border:1px solid rgba(89,89,89,.5)}:host([error]){border:1px solid #b63243}:host([focused]){background-size:100% 2px,100% 1px!important;background-position:center bottom!important;border-color:#334bff}:host [part=input]{margin:0;text-align:center;padding:0;color:inherit;width:24px}:host [part=divider]::before{content:\':\'}:host [part=toggle]{width:20px;font-size:50%;display:flex;flex-flow:column nowrap;align-items:center;justify-content:center;line-height:1.2;outline:0;cursor:pointer;touch-action:manipulation}:host [part=input],:host [part=toggle]{height:100%;position:relative}:host [part=toggle-item]{opacity:.5}:host [part=toggle-item][active]{opacity:1}:host([error]) [part=input]:focus::after,:host([error]) [part=input][focused]::after,:host([error]) [part=toggle]:focus::after,:host([error]) [part=toggle][focused]::after{border-bottom-color:#b63243}:host [part=divider]{width:2px}:host [part=input]:focus::after,:host [part=input][focused]::after,:host [part=toggle]:focus::after,:host [part=toggle][focused]::after{content:\'\';border-right:8px solid transparent;border-left:8px solid transparent;position:absolute;left:calc(50% - 8px);bottom:0;border-bottom:4px solid transparent;display:none}:host([readonly]:not([focused])){border-color:rgba(89,89,89,.5)}:host(:hover:not([readonly]):not([focused])){border-color:#0d0d0d}:host([error]:not([focused])){border-color:#d94255}:host([error][readonly]:not([focused])){border-color:rgba(238,172,180,.5)}:host([error]:hover:not([readonly]):not([focused])){border-color:#eeacb4}' }}));
@@ -1,4 +1,4 @@
1
1
  import '@refinitiv-ui/elements/number-field/themes/solar/charcoal';
2
2
  import '@refinitiv-ui/elements/icon/themes/solar/charcoal';
3
3
  import '@refinitiv-ui/elements/tooltip/themes/solar/charcoal';
4
- dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-time-picker', styles: ':host{display:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:left;font-family:inherit;font-size:13px;font-weight:400;height:23px;max-width:100%;margin:1px 0;outline:0;box-sizing:border-box;display:inline-flex;align-items:center;position:relative;vertical-align:middle;color:#c2c2c2;border-radius:0;text-overflow:ellipsis;width:auto;min-width:-moz-max-content;min-width:max-content;background-color:#000;border:1px solid #4a4a52;padding:0}:host([focused]){background-size:100% 2px,100% 1px!important;background-position:center bottom!important;border-color:#f93;border-style:dotted}:host [part=input]{margin:0;text-align:center;padding:0;color:inherit;width:25px}:host [part=divider]::before{content:\':\'}:host [part=toggle]{width:20px;display:flex;flex-flow:column nowrap;align-items:center;justify-content:center;outline:0;cursor:pointer;touch-action:manipulation;font-size:70%;line-height:1}:host [part=input],:host [part=toggle]{height:100%;position:relative}:host [part=input]:focus::after,:host [part=input][focused]::after,:host [part=toggle]:focus::after,:host [part=toggle][focused]::after{content:\'\';border-right:8px solid transparent;border-bottom:4px solid #f93;border-left:8px solid transparent;position:absolute;content:\'\';border:none;left:calc(50% - 7px);bottom:-1px;width:14px;height:1px;background:#f93}:host [part=toggle-item]{opacity:.5}:host [part=toggle-item][active]{opacity:1}:host([disabled]){border:1px solid rgba(74,74,82,.6);color:rgba(194,194,194,.6)}:host([readonly]){border:1px solid rgba(74,74,82,.6)}:host(:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #77777d}:host([warning]){background-color:#000;border:1px solid #f93}:host([warning][disabled]){border:1px solid rgba(255,153,51,.6);color:rgba(194,194,194,.6)}:host([warning][readonly]){border:1px solid rgba(255,153,51,.6)}:host([warning]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #ffb366}:host([error]),:host([error][warning]:not([focused])){background-color:#000;border:1px solid #f5475b}:host([error][disabled]),:host([error][warning]:not([focused])[disabled]){border:1px solid rgba(245,71,91,.6);color:rgba(194,194,194,.6)}:host([error][readonly]),:host([error][warning]:not([focused])[readonly]){border:1px solid rgba(245,71,91,.6)}:host([error]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover),:host([error][warning]:not([focused]):not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #f87584}:host([highlight]){background-color:#1b252f;border:1px solid #4a4a52}:host([highlight][disabled]){border:1px solid rgba(74,74,82,.6);color:rgba(194,194,194,.6);background-color:rgba(27,37,47,.6)}:host([highlight][readonly]){border:1px solid rgba(74,74,82,.6)}:host([highlight]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #77777d}:host([indirect]){color:#0fd;background-color:#000;border:1px solid #898623}:host([indirect][disabled]){border:1px solid rgba(137,134,35,.6);color:rgba(0,255,221,.6)}:host([indirect][readonly]){border:1px solid rgba(137,134,35,.6)}:host([indirect]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #a7a45a}' }}));
4
+ dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-time-picker', styles: ':host{display:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:left;font-family:inherit;font-size:13px;font-weight:400;height:23px;max-width:100%;margin:1px 0;outline:0;box-sizing:border-box;display:inline-flex;align-items:center;position:relative;vertical-align:middle;color:#c2c2c2;border-radius:0;text-overflow:ellipsis}:host([error]){border:1px solid #f5475b}:host([focused]){background-size:100% 2px,100% 1px!important;background-position:center bottom!important;border-color:#f93;border-style:dotted}:host [part=input]{margin:0;text-align:center;padding:0;color:inherit;width:25px}:host [part=divider]::before{content:\':\'}:host [part=toggle]{width:20px;display:flex;flex-flow:column nowrap;align-items:center;justify-content:center;outline:0;cursor:pointer;touch-action:manipulation;font-size:70%;line-height:1}:host [part=input],:host [part=toggle]{height:100%;position:relative}:host [part=input]:focus::after,:host [part=input][focused]::after,:host [part=toggle]:focus::after,:host [part=toggle][focused]::after{content:\'\';border-right:8px solid transparent;border-bottom:4px solid #f93;border-left:8px solid transparent;position:absolute}:host [part=toggle-item]{opacity:.5}:host [part=toggle-item][active]{opacity:1}:host([error]) [part=input]:focus::after,:host([error]) [part=input][focused]::after,:host([error]) [part=toggle]:focus::after,:host([error]) [part=toggle][focused]::after{border-bottom-color:#f5475b}:host{width:auto;min-width:-moz-max-content;min-width:max-content;background-color:#000;border:1px solid #4a4a52;padding:0}:host([disabled]){border:1px solid rgba(74,74,82,.6);color:rgba(194,194,194,.6)}:host([readonly]){border:1px solid rgba(74,74,82,.6)}:host(:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #77777d}:host([warning]){background-color:#000;border:1px solid #f93}:host([warning][disabled]){border:1px solid rgba(255,153,51,.6);color:rgba(194,194,194,.6)}:host([warning][readonly]){border:1px solid rgba(255,153,51,.6)}:host([warning]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #ffb366}:host([error]),:host([error][warning]:not([focused])){background-color:#000;border:1px solid #f5475b}:host([error][disabled]),:host([error][warning]:not([focused])[disabled]){border:1px solid rgba(245,71,91,.6);color:rgba(194,194,194,.6)}:host([error][readonly]),:host([error][warning]:not([focused])[readonly]){border:1px solid rgba(245,71,91,.6)}:host([error]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover),:host([error][warning]:not([focused]):not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #f87584}:host([highlight]){background-color:#1b252f;border:1px solid #4a4a52}:host([highlight][disabled]){border:1px solid rgba(74,74,82,.6);color:rgba(194,194,194,.6);background-color:rgba(27,37,47,.6)}:host([highlight][readonly]){border:1px solid rgba(74,74,82,.6)}:host([highlight]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #77777d}:host([indirect]){color:#0fd;background-color:#000;border:1px solid #898623}:host([indirect][disabled]){border:1px solid rgba(137,134,35,.6);color:rgba(0,255,221,.6)}:host([indirect][readonly]){border:1px solid rgba(137,134,35,.6)}:host([indirect]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #a7a45a}:host [part=input]:focus::after,:host [part=input][focused]::after,:host [part=toggle]:focus::after,:host [part=toggle][focused]::after{content:\'\';border:none;left:calc(50% - 7px);bottom:-1px;width:14px;height:1px;background:#f93}:host([focused][readonly]:not([error])){border-color:#f93;border-style:dotted}:host([focused][error]:not([readonly])){border-color:#f93;border-style:dotted}:host([focused][error]) [part=input]:focus::after,:host([focused][error]) [part=input][focused]::after,:host([focused][error]) [part=toggle]:focus::after,:host([focused][error]) [part=toggle][focused]::after{border-bottom:none}' }}));
@@ -1,4 +1,4 @@
1
1
  import '@refinitiv-ui/elements/number-field/themes/solar/pearl';
2
2
  import '@refinitiv-ui/elements/icon/themes/solar/pearl';
3
3
  import '@refinitiv-ui/elements/tooltip/themes/solar/pearl';
4
- dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-time-picker', styles: ':host{display:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:left;font-family:inherit;font-size:13px;font-weight:400;height:23px;max-width:100%;margin:1px 0;outline:0;box-sizing:border-box;display:inline-flex;align-items:center;position:relative;vertical-align:middle;color:#484848;border-radius:0;text-overflow:ellipsis;width:auto;min-width:-moz-max-content;min-width:max-content;background-color:#fff;border:1px solid #a9afba;padding:0}:host([focused]){background-size:100% 2px,100% 1px!important;background-position:center bottom!important;border-color:#ffb266;border-style:dotted}:host [part=input]{margin:0;text-align:center;padding:0;color:inherit;width:25px}:host [part=divider]::before{content:\':\'}:host [part=toggle]{width:20px;display:flex;flex-flow:column nowrap;align-items:center;justify-content:center;outline:0;cursor:pointer;touch-action:manipulation;font-size:70%;line-height:1}:host [part=input],:host [part=toggle]{height:100%;position:relative}:host [part=input]:focus::after,:host [part=input][focused]::after,:host [part=toggle]:focus::after,:host [part=toggle][focused]::after{content:\'\';border-right:8px solid transparent;border-bottom:4px solid #ffb266;border-left:8px solid transparent;position:absolute;content:\'\';border:none;left:calc(50% - 7px);bottom:-1px;width:14px;height:1px;background:#ffb266}:host [part=toggle-item]{opacity:.5}:host [part=toggle-item][active]{opacity:1}:host([disabled]){border:1px solid rgba(169,175,186,.6);color:rgba(72,72,72,.6)}:host([readonly]){border:1px solid rgba(169,175,186,.6)}:host(:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #bfc3cb}:host([warning]){background-color:#fff;border:1px solid #f93}:host([warning][disabled]){border:1px solid rgba(255,153,51,.6);color:rgba(72,72,72,.6)}:host([warning][readonly]){border:1px solid rgba(255,153,51,.6)}:host([warning]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #ffb366}:host([error]),:host([error][warning]:not([focused])){background-color:#fff;border:1px solid #d94255}:host([error][disabled]),:host([error][warning]:not([focused])[disabled]){border:1px solid rgba(217,66,85,.6);color:rgba(72,72,72,.6)}:host([error][readonly]),:host([error][warning]:not([focused])[readonly]){border:1px solid rgba(217,66,85,.6)}:host([error]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover),:host([error][warning]:not([focused]):not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #e37180}:host([highlight]){background-color:#b0ffff;border:1px solid #a9afba}:host([highlight][disabled]){border:1px solid rgba(169,175,186,.6);color:rgba(72,72,72,.6);background-color:rgba(176,255,255,.6)}:host([highlight][readonly]){border:1px solid rgba(169,175,186,.6)}:host([highlight]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #bfc3cb}:host([indirect]){color:#009494;background-color:#effefe;border:1px solid #898623}:host([indirect][disabled]){border:1px solid rgba(137,134,35,.6);color:rgba(0,148,148,.6)}:host([indirect][readonly]){border:1px solid rgba(137,134,35,.6)}:host([indirect]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #a7a45a}' }}));
4
+ dispatchEvent(new CustomEvent('ef.customStyles.define', { detail: { name: 'ef-time-picker', styles: ':host{display:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;text-align:left;font-family:inherit;font-size:13px;font-weight:400;height:23px;max-width:100%;margin:1px 0;outline:0;box-sizing:border-box;display:inline-flex;align-items:center;position:relative;vertical-align:middle;color:#484848;border-radius:0;text-overflow:ellipsis}:host([error]){border:1px solid #d94255}:host([focused]){background-size:100% 2px,100% 1px!important;background-position:center bottom!important;border-color:#ffb266;border-style:dotted}:host [part=input]{margin:0;text-align:center;padding:0;color:inherit;width:25px}:host [part=divider]::before{content:\':\'}:host [part=toggle]{width:20px;display:flex;flex-flow:column nowrap;align-items:center;justify-content:center;outline:0;cursor:pointer;touch-action:manipulation;font-size:70%;line-height:1}:host [part=input],:host [part=toggle]{height:100%;position:relative}:host [part=input]:focus::after,:host [part=input][focused]::after,:host [part=toggle]:focus::after,:host [part=toggle][focused]::after{content:\'\';border-right:8px solid transparent;border-bottom:4px solid #ffb266;border-left:8px solid transparent;position:absolute}:host [part=toggle-item]{opacity:.5}:host [part=toggle-item][active]{opacity:1}:host([error]) [part=input]:focus::after,:host([error]) [part=input][focused]::after,:host([error]) [part=toggle]:focus::after,:host([error]) [part=toggle][focused]::after{border-bottom-color:#d94255}:host{width:auto;min-width:-moz-max-content;min-width:max-content;background-color:#fff;border:1px solid #a9afba;padding:0}:host([disabled]){border:1px solid rgba(169,175,186,.6);color:rgba(72,72,72,.6)}:host([readonly]){border:1px solid rgba(169,175,186,.6)}:host(:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #bfc3cb}:host([warning]){background-color:#fff;border:1px solid #f93}:host([warning][disabled]){border:1px solid rgba(255,153,51,.6);color:rgba(72,72,72,.6)}:host([warning][readonly]){border:1px solid rgba(255,153,51,.6)}:host([warning]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #ffb366}:host([error]),:host([error][warning]:not([focused])){background-color:#fff;border:1px solid #d94255}:host([error][disabled]),:host([error][warning]:not([focused])[disabled]){border:1px solid rgba(217,66,85,.6);color:rgba(72,72,72,.6)}:host([error][readonly]),:host([error][warning]:not([focused])[readonly]){border:1px solid rgba(217,66,85,.6)}:host([error]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover),:host([error][warning]:not([focused]):not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #e37180}:host([highlight]){background-color:#b0ffff;border:1px solid #a9afba}:host([highlight][disabled]){border:1px solid rgba(169,175,186,.6);color:rgba(72,72,72,.6);background-color:rgba(176,255,255,.6)}:host([highlight][readonly]){border:1px solid rgba(169,175,186,.6)}:host([highlight]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #bfc3cb}:host([indirect]){color:#009494;background-color:#effefe;border:1px solid #898623}:host([indirect][disabled]){border:1px solid rgba(137,134,35,.6);color:rgba(0,148,148,.6)}:host([indirect][readonly]){border:1px solid rgba(137,134,35,.6)}:host([indirect]:not([focused]):not(:focus):not([disabled]):not([readonly]):hover){border:1px solid #a7a45a}:host [part=input]:focus::after,:host [part=input][focused]::after,:host [part=toggle]:focus::after,:host [part=toggle][focused]::after{content:\'\';border:none;left:calc(50% - 7px);bottom:-1px;width:14px;height:1px;background:#ffb266}:host([focused][readonly]:not([error])){border-color:#ffb266;border-style:dotted}:host([focused][error]:not([readonly])){border-color:#ffb266;border-style:dotted}:host([focused][error]) [part=input]:focus::after,:host([focused][error]) [part=input][focused]::after,:host([focused][error]) [part=toggle]:focus::after,:host([focused][error]) [part=toggle][focused]::after{border-bottom:none}' }}));
@@ -452,10 +452,10 @@ __decorate([
452
452
  property({ type: String })
453
453
  ], Tooltip.prototype, "selector", void 0);
454
454
  __decorate([
455
- property({ type: Function, attribute: false })
455
+ property({ attribute: false })
456
456
  ], Tooltip.prototype, "condition", void 0);
457
457
  __decorate([
458
- property({ type: Function, attribute: false })
458
+ property({ attribute: false })
459
459
  ], Tooltip.prototype, "renderer", void 0);
460
460
  __decorate([
461
461
  property({ type: String })
@@ -57,6 +57,12 @@
57
57
  "type": "string",
58
58
  "default": "\"\""
59
59
  },
60
+ {
61
+ "name": "filter",
62
+ "description": "Custom filter for static data",
63
+ "type": "TreeFilter<T> | null",
64
+ "default": "\"createDefaultFilter<T>(this)\""
65
+ },
60
66
  {
61
67
  "name": "renderer",
62
68
  "description": "Renderer used for generating tree items",
@@ -5,16 +5,17 @@ to be used for menus and group selections
5
5
 
6
6
  ## Properties
7
7
 
8
- | Property | Attribute | Type | Default | Description |
9
- |----------------------|---------------|------------------|-------------------------------|--------------------------------------------------|
10
- | `data` | | `TreeData<T>` | | Data object to be used for creating tree |
11
- | `manager (readonly)` | | `TreeManager<T>` | | Tree manager used for item manipulation |
12
- | `multiple` | `multiple` | `boolean` | false | Allows multiple items to be selected |
13
- | `noRelation` | `no-relation` | `boolean` | false | Breaks the relationship when multiple<br />selection mode is enabled |
14
- | `query` | `query` | `string` | "" | Query string applied to tree |
15
- | `renderer` | | | "createTreeRenderer<T>(this)" | Renderer used for generating tree items |
16
- | `stateless` | `stateless` | `boolean` | false | Disable selections |
17
- | `values` | | `string[]` | [] | Selected items in tree |
8
+ | Property | Attribute | Type | Default | Description |
9
+ |----------------------|---------------|-------------------------|--------------------------------|--------------------------------------------------|
10
+ | `data` | | `TreeData<T>` | | Data object to be used for creating tree |
11
+ | `filter` | | `TreeFilter<T> \| null` | "createDefaultFilter<T>(this)" | Custom filter for static data |
12
+ | `manager (readonly)` | | `TreeManager<T>` | | Tree manager used for item manipulation |
13
+ | `multiple` | `multiple` | `boolean` | false | Allows multiple items to be selected |
14
+ | `noRelation` | `no-relation` | `boolean` | false | Breaks the relationship when multiple<br />selection mode is enabled |
15
+ | `query` | `query` | `string` | "" | Query string applied to tree |
16
+ | `renderer` | | | "createTreeRenderer<T>(this)" | Renderer used for generating tree items |
17
+ | `stateless` | `stateless` | `boolean` | false | Disable selections |
18
+ | `values` | | `string[]` | [] | Selected items in tree |
18
19
 
19
20
  ## Methods
20
21
 
@@ -43,9 +43,8 @@ export declare class Tree<T extends TreeDataItem = TreeDataItem> extends List<T>
43
43
  /**
44
44
  * Custom filter for static data
45
45
  * @type {TreeFilter<T> | null}
46
- * @ignore set to protected for now and need to discuss before set to public API
47
46
  */
48
- protected filter: TreeFilter<T> | null;
47
+ filter: TreeFilter<T> | null;
49
48
  /**
50
49
  * Renderer used for generating tree items
51
50
  */
@@ -39,7 +39,6 @@ let Tree = class Tree extends List {
39
39
  /**
40
40
  * Custom filter for static data
41
41
  * @type {TreeFilter<T> | null}
42
- * @ignore set to protected for now and need to discuss before set to public API
43
42
  */
44
43
  this.filter = createDefaultFilter(this);
45
44
  /**
@@ -439,6 +438,9 @@ __decorate([
439
438
  __decorate([
440
439
  property({ type: String })
441
440
  ], Tree.prototype, "query", void 0);
441
+ __decorate([
442
+ property({ attribute: false })
443
+ ], Tree.prototype, "filter", void 0);
442
444
  __decorate([
443
445
  property({ attribute: false })
444
446
  ], Tree.prototype, "renderer", void 0);
@@ -27,8 +27,6 @@ export const createDefaultFilter = (el) => {
27
27
  }
28
28
  const regex = getRegularExpressionOfQuery();
29
29
  const result = regex.test(label);
30
- // this regex uses global scope, so the index needs resetting
31
- regex.lastIndex = 0;
32
30
  return result;
33
31
  };
34
32
  };
@@ -1,7 +1,6 @@
1
- import type { TreeData, TreeDataItem } from './helpers/types';
2
1
  export * from './elements/tree.js';
3
2
  export * from './elements/tree-item.js';
4
3
  export { TreeRenderer, createTreeRenderer } from './helpers/renderer.js';
5
4
  export { TreeManager, TreeManagerMode, CheckedState } from './managers/tree-manager.js';
6
5
  export type { TreeNode } from './managers/tree-node.js';
7
- export type { TreeData, TreeDataItem };
6
+ export type { TreeData, TreeDataItem, TreeFilter } from './helpers/types';
@@ -23,6 +23,11 @@
23
23
  "type": "string | null",
24
24
  "default": "\"\""
25
25
  },
26
+ {
27
+ "name": "query-debounce-rate",
28
+ "description": "Control query rate in milliseconds",
29
+ "type": "number"
30
+ },
26
31
  {
27
32
  "name": "opened",
28
33
  "description": "Set dropdown to open",
@@ -34,6 +39,11 @@
34
39
  "description": "Set placeholder text",
35
40
  "type": "string",
36
41
  "default": "\"\""
42
+ },
43
+ {
44
+ "name": "query-debounce-rate",
45
+ "description": "Control query rate in milliseconds",
46
+ "type": "number"
37
47
  }
38
48
  ],
39
49
  "properties": [
@@ -46,7 +56,7 @@
46
56
  {
47
57
  "name": "treeManager (readonly)",
48
58
  "description": "Tree manager used for item manipulation",
49
- "type": "TreeManager<TreeSelectDataItem>"
59
+ "type": "TreeManager <TreeSelectDataItem>"
50
60
  },
51
61
  {
52
62
  "name": "noRelation",
@@ -80,6 +90,18 @@
80
90
  "type": "string | null",
81
91
  "default": "\"\""
82
92
  },
93
+ {
94
+ "name": "filter",
95
+ "description": "Custom filter for static data. Set this to null when data is filtered externally, eg XHR",
96
+ "type": "TreeSelectFilter<T> | null",
97
+ "default": "\"createDefaultFilter<T>(this)\""
98
+ },
99
+ {
100
+ "name": "queryDebounceRate",
101
+ "attribute": "query-debounce-rate",
102
+ "description": "Control query rate in milliseconds",
103
+ "type": "number"
104
+ },
83
105
  {
84
106
  "name": "opened",
85
107
  "attribute": "opened",
@@ -2,20 +2,28 @@
2
2
 
3
3
  Dropdown control that allows selection from the tree list
4
4
 
5
+ ## Attributes
6
+
7
+ | Attribute | Type | Description |
8
+ |-----------------------|----------|------------------------------------|
9
+ | `query-debounce-rate` | `number` | Control query rate in milliseconds |
10
+
5
11
  ## Properties
6
12
 
7
- | Property | Attribute | Type | Default | Description |
8
- |--------------------------|---------------|-----------------------------------|--------------------------------------------------|--------------------------------------------------|
9
- | `data` | | `TreeSelectData[]` | [] | Data object to be used for creating tree |
10
- | `filterCount` | | `number` | 0 | Tracks the number of filter matches<br /><br />Only needed if internal filtering is unused |
11
- | `max` | `max` | `string \| null` | "" | Set maximum number of selected items |
12
- | `noRelation` | `no-relation` | `boolean` | false | Breaks the relationship when multiple<br />selection mode is enabled |
13
- | `opened` | `opened` | `boolean` | false | Set dropdown to open |
14
- | `placeholder` | `placeholder` | `string` | "" | Set placeholder text |
15
- | `renderer` | | | "createTreeSelectRenderer<TreeSelectDataItem>(this)" | Renderer used to render tree item elements |
16
- | `showPills` | `show-pills` | `boolean` | false | Should the control show pills |
17
- | `treeManager (readonly)` | | `TreeManager<TreeSelectDataItem>` | | Tree manager used for item manipulation |
18
- | `values` | | `string[]` | [] | Returns a values collection of the currently<br />selected item values |
13
+ | Property | Attribute | Type | Default | Description |
14
+ |--------------------------|-----------------------|------------------------------------|--------------------------------------------------|--------------------------------------------------|
15
+ | `data` | | `TreeSelectData[]` | [] | Data object to be used for creating tree |
16
+ | `filter` | | `TreeSelectFilter<T> \| null` | "createDefaultFilter<T>(this)" | Custom filter for static data. Set this to null when data is filtered externally, eg XHR |
17
+ | `filterCount` | | `number` | 0 | Tracks the number of filter matches<br /><br />Only needed if internal filtering is unused |
18
+ | `max` | `max` | `string \| null` | "" | Set maximum number of selected items |
19
+ | `noRelation` | `no-relation` | `boolean` | false | Breaks the relationship when multiple<br />selection mode is enabled |
20
+ | `opened` | `opened` | `boolean` | false | Set dropdown to open |
21
+ | `placeholder` | `placeholder` | `string` | "" | Set placeholder text |
22
+ | `queryDebounceRate` | `query-debounce-rate` | `number` | | Control query rate in milliseconds |
23
+ | `renderer` | | | "createTreeSelectRenderer<TreeSelectDataItem>(this)" | Renderer used to render tree item elements |
24
+ | `showPills` | `show-pills` | `boolean` | false | Should the control show pills |
25
+ | `treeManager (readonly)` | | `TreeManager <TreeSelectDataItem>` | | Tree manager used for item manipulation |
26
+ | `values` | | `string[]` | [] | Returns a values collection of the currently<br />selected item values |
19
27
 
20
28
  ## Methods
21
29
 
@@ -20,6 +20,9 @@ export type { TreeSelectFilter, TreeSelectDataItem, TreeSelectData };
20
20
  /**
21
21
  * Dropdown control that allows selection from the tree list
22
22
  *
23
+ * @prop {TreeSelectFilter<T> | null} [filter=createDefaultFilter<T>(this)] - Custom filter for static data. Set this to null when data is filtered externally, eg XHR
24
+ * @attr {number} [query-debounce-rate] - Control query rate in milliseconds
25
+ * @prop {number} [queryDebounceRate] - Control query rate in milliseconds
23
26
  * @attr {boolean} [opened=false] - Set dropdown to open
24
27
  * @prop {boolean} [opened=false] - Set dropdown to open
25
28
  * @attr {string} placeholder - Set placeholder text
@@ -79,6 +82,7 @@ export declare class TreeSelect extends ComboBox<TreeSelectDataItem> {
79
82
  protected _treeManager: TreeManager<TreeSelectDataItem>;
80
83
  /**
81
84
  * Tree manager used for item manipulation
85
+ * @type {TreeManager <TreeSelectDataItem>}
82
86
  */
83
87
  get treeManager(): TreeManager<TreeSelectDataItem>;
84
88
  /**
@@ -24,6 +24,9 @@ const valueFormatWarning = new WarningNotice("The specified 'values' format does
24
24
  /**
25
25
  * Dropdown control that allows selection from the tree list
26
26
  *
27
+ * @prop {TreeSelectFilter<T> | null} [filter=createDefaultFilter<T>(this)] - Custom filter for static data. Set this to null when data is filtered externally, eg XHR
28
+ * @attr {number} [query-debounce-rate] - Control query rate in milliseconds
29
+ * @prop {number} [queryDebounceRate] - Control query rate in milliseconds
27
30
  * @attr {boolean} [opened=false] - Set dropdown to open
28
31
  * @prop {boolean} [opened=false] - Set dropdown to open
29
32
  * @attr {string} placeholder - Set placeholder text
@@ -155,8 +158,10 @@ let TreeSelect = class TreeSelect extends ComboBox {
155
158
  }
156
159
  `;
157
160
  }
161
+ // add a space in front of angle bracket for line break opportunity in EF docs with @type
158
162
  /**
159
163
  * Tree manager used for item manipulation
164
+ * @type {TreeManager <TreeSelectDataItem>}
160
165
  */
161
166
  get treeManager() {
162
167
  return this._treeManager;
@@ -971,7 +976,7 @@ __decorate([
971
976
  property({ type: Array, attribute: false })
972
977
  ], TreeSelect.prototype, "values", null);
973
978
  __decorate([
974
- property({ type: Function, attribute: false })
979
+ property({ attribute: false })
975
980
  ], TreeSelect.prototype, "renderer", void 0);
976
981
  __decorate([
977
982
  property({ type: String })
package/lib/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = '7.11.1';
1
+ export const VERSION = '7.12.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@refinitiv-ui/elements",
3
- "version": "7.11.1",
3
+ "version": "7.12.0",
4
4
  "description": "Element Framework Elements",
5
5
  "author": "LSEG",
6
6
  "license": "Apache-2.0",
@@ -342,8 +342,8 @@
342
342
  },
343
343
  "dependencies": {
344
344
  "@lit-labs/context": "^0.3.1",
345
- "@refinitiv-ui/halo-theme": "^7.3.5",
346
- "@refinitiv-ui/solar-theme": "^7.2.6",
345
+ "@refinitiv-ui/halo-theme": "^7.4.0",
346
+ "@refinitiv-ui/solar-theme": "^7.3.0",
347
347
  "chart.js": "^4.4.2",
348
348
  "chartjs-adapter-date-fns": "^3.0.0",
349
349
  "d3-interpolate": "^3.0.1",
@@ -354,7 +354,7 @@
354
354
  },
355
355
  "devDependencies": {
356
356
  "@refinitiv-ui/core": "^7.4.3",
357
- "@refinitiv-ui/demo-block": "^7.1.10",
357
+ "@refinitiv-ui/demo-block": "^7.1.11",
358
358
  "@refinitiv-ui/i18n": "^7.1.4",
359
359
  "@refinitiv-ui/phrasebook": "^7.1.1",
360
360
  "@refinitiv-ui/test-helpers": "^7.1.1",
@@ -373,5 +373,5 @@
373
373
  "publishConfig": {
374
374
  "access": "public"
375
375
  },
376
- "gitHead": "40fe09a69794fb8d964d638498b0f4fe31b50e7e"
376
+ "gitHead": "62e644e3d7f5c2bda807bb68f27ce84fde63a8e8"
377
377
  }