@refinitiv-ui/elements 7.7.0 → 7.9.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.
Files changed (50) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/lib/autosuggest/index.d.ts +1 -1
  3. package/lib/chart/elements/chart.d.ts +1 -1
  4. package/lib/color-dialog/index.d.ts +3 -1
  5. package/lib/color-dialog/index.js +3 -1
  6. package/lib/combo-box/helpers/filter.d.ts +1 -1
  7. package/lib/combo-box/helpers/filter.js +3 -2
  8. package/lib/combo-box/helpers/types.d.ts +1 -1
  9. package/lib/combo-box/index.d.ts +2 -2
  10. package/lib/email-field/custom-elements.json +33 -26
  11. package/lib/email-field/custom-elements.md +3 -5
  12. package/lib/email-field/index.d.ts +17 -8
  13. package/lib/email-field/index.js +35 -9
  14. package/lib/interactive-chart/helpers/types.d.ts +1 -1
  15. package/lib/interactive-chart/index.d.ts +1 -1
  16. package/lib/list/custom-elements.md +8 -8
  17. package/lib/list/elements/list.d.ts +3 -3
  18. package/lib/list/elements/list.js +19 -12
  19. package/lib/list/helpers/types.d.ts +1 -1
  20. package/lib/list/renderer.d.ts +1 -1
  21. package/lib/multi-input/index.js +1 -2
  22. package/lib/number-field/index.d.ts +5 -7
  23. package/lib/number-field/index.js +14 -10
  24. package/lib/overlay/managers/backdrop-manager.d.ts +1 -1
  25. package/lib/overlay/managers/viewport-manager.d.ts +1 -1
  26. package/lib/overlay/managers/viewport-manager.js +1 -0
  27. package/lib/overlay-menu/helpers/types.d.ts +1 -1
  28. package/lib/overlay-menu/managers/menu-manager.d.ts +1 -1
  29. package/lib/password-field/custom-elements.json +27 -18
  30. package/lib/password-field/custom-elements.md +3 -10
  31. package/lib/password-field/index.d.ts +9 -6
  32. package/lib/password-field/index.js +18 -6
  33. package/lib/search-field/custom-elements.json +27 -18
  34. package/lib/search-field/custom-elements.md +3 -5
  35. package/lib/search-field/index.d.ts +9 -6
  36. package/lib/search-field/index.js +21 -6
  37. package/lib/sidebar-layout/index.d.ts +1 -1
  38. package/lib/text-field/custom-elements.json +2 -2
  39. package/lib/text-field/custom-elements.md +1 -1
  40. package/lib/text-field/index.d.ts +6 -1
  41. package/lib/text-field/index.js +16 -5
  42. package/lib/tooltip/index.d.ts +1 -1
  43. package/lib/tree/elements/tree-item.d.ts +1 -1
  44. package/lib/tree/elements/tree.d.ts +1 -1
  45. package/lib/tree/helpers/filter.js +2 -1
  46. package/lib/tree/managers/tree-manager.d.ts +1 -1
  47. package/lib/tree-select/index.d.ts +3 -3
  48. package/lib/version.js +1 -1
  49. package/package.json +28 -26
  50. package/cli.mjs +0 -23
@@ -1,5 +1,5 @@
1
- import '../elements/overlay-viewport.js';
2
1
  import type { Overlay } from '../elements/overlay';
2
+ import '../elements/overlay-viewport.js';
3
3
  import type { ViewAreaInfo } from '../helpers/types';
4
4
  /**
5
5
  * Viewport manager singleton is responsible for getting
@@ -95,6 +95,7 @@ export class ViewportManager {
95
95
  // Safari does but zooming doesn't update this property value
96
96
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
97
97
  // @ts-ignore
98
+ // TODO: Remove @ts-ignore and re-test again when standardized zoom is implemented across major browsers and TypeScript, https://github.com/w3c/csswg-drafts/issues/5623
98
99
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
99
100
  const zoom = parseFloat(window.getComputedStyle(document.body).zoom);
100
101
  const screenHeight = screenRect.height / zoom;
@@ -1,6 +1,6 @@
1
+ import type { CollectionComposer } from '@refinitiv-ui/utils/collection.js';
1
2
  import type { Item, ItemData } from '../../item';
2
3
  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
- import { OverlayMenu } from '../index.js';
2
1
  import type { Item } from '../../item';
2
+ import { OverlayMenu } from '../index.js';
3
3
  /**
4
4
  * Overlay menu manager monitors menu nesting and ensures
5
5
  * that only a single menu tree can be opened
@@ -5,6 +5,16 @@
5
5
  "name": "ef-password-field",
6
6
  "description": "A form control element for password.",
7
7
  "attributes": [
8
+ {
9
+ "name": "maxlength",
10
+ "description": "Set character max limit",
11
+ "type": "number | null"
12
+ },
13
+ {
14
+ "name": "minlength",
15
+ "description": "Set character min limit",
16
+ "type": "number | null"
17
+ },
8
18
  {
9
19
  "name": "disabled",
10
20
  "description": "Set disabled state",
@@ -17,6 +27,12 @@
17
27
  "type": "boolean",
18
28
  "default": "false"
19
29
  },
30
+ {
31
+ "name": "pattern",
32
+ "description": "Set regular expression for input validation",
33
+ "type": "string",
34
+ "default": "\"\""
35
+ },
20
36
  {
21
37
  "name": "placeholder",
22
38
  "description": "Set placeholder text",
@@ -46,19 +62,21 @@
46
62
  "description": "Input's value",
47
63
  "type": "string",
48
64
  "default": "\"\""
49
- },
65
+ }
66
+ ],
67
+ "properties": [
50
68
  {
51
- "name": "maxlength",
69
+ "name": "maxLength",
70
+ "attribute": "maxlength",
52
71
  "description": "Set character max limit",
53
- "type": "number"
72
+ "type": "number | null"
54
73
  },
55
74
  {
56
- "name": "minlength",
75
+ "name": "minLength",
76
+ "attribute": "minlength",
57
77
  "description": "Set character min limit",
58
- "type": "number"
59
- }
60
- ],
61
- "properties": [
78
+ "type": "number | null"
79
+ },
62
80
  {
63
81
  "name": "disabled",
64
82
  "attribute": "disabled",
@@ -73,18 +91,9 @@
73
91
  "type": "boolean",
74
92
  "default": "false"
75
93
  },
76
- {
77
- "name": "maxLength",
78
- "description": "Set character max limit",
79
- "type": "number | null"
80
- },
81
- {
82
- "name": "minLength",
83
- "description": "Set character min limit",
84
- "type": "number | null"
85
- },
86
94
  {
87
95
  "name": "pattern",
96
+ "attribute": "pattern",
88
97
  "description": "Set regular expression for input validation",
89
98
  "type": "string",
90
99
  "default": "\"\""
@@ -2,22 +2,15 @@
2
2
 
3
3
  A form control element for password.
4
4
 
5
- ## Attributes
6
-
7
- | Attribute | Type | Description |
8
- |-------------|----------|-------------------------|
9
- | `maxlength` | `number` | Set character max limit |
10
- | `minlength` | `number` | Set character min limit |
11
-
12
5
  ## Properties
13
6
 
14
7
  | Property | Attribute | Type | Default | Description |
15
8
  |---------------|---------------|------------------|---------|--------------------------------------------------|
16
9
  | `disabled` | `disabled` | `boolean` | false | Set disabled state |
17
10
  | `error` | `error` | `boolean` | false | Set error state |
18
- | `maxLength` | | `number \| null` | null | Set character max limit |
19
- | `minLength` | | `number \| null` | null | Set character min limit |
20
- | `pattern` | | `string` | "" | Set regular expression for input validation |
11
+ | `maxLength` | `maxlength` | `number \| null` | null | Set character max limit |
12
+ | `minLength` | `minlength` | `number \| null` | null | Set character min limit |
13
+ | `pattern` | `pattern` | `string` | "" | Set regular expression for input validation |
21
14
  | `placeholder` | `placeholder` | `string` | "" | Set placeholder text |
22
15
  | `readonly` | `readonly` | `boolean` | false | Set readonly state |
23
16
  | `transparent` | `transparent` | `boolean` | false | Disables all other states and border/background styles. |
@@ -17,12 +17,7 @@ import { TextField } from '../text-field/index.js';
17
17
  * @attr {boolean} error - Set error state
18
18
  * @prop {boolean} [error=false] - Set error state
19
19
  *
20
- * @attr {number} maxlength - Set character max limit
21
- * @prop {number | null} [maxLength=null] - Set character max limit
22
- *
23
- * @attr {number} minlength - Set character min limit
24
- * @prop {number | null} [minLength=null] - Set character min limit
25
- *
20
+ * @attr {string} pattern - Set regular expression for input validation
26
21
  * @prop {string} [pattern=""] - Set regular expression for input validation
27
22
  *
28
23
  * @attr {string} placeholder - Set placeholder text
@@ -41,6 +36,14 @@ import { TextField } from '../text-field/index.js';
41
36
  * @prop {string} [value=""] - Input's value
42
37
  */
43
38
  export declare class PasswordField extends TextField {
39
+ /**
40
+ * Set character max limit
41
+ */
42
+ maxLength: number | null;
43
+ /**
44
+ * Set character min limit
45
+ */
46
+ minLength: number | null;
44
47
  /**
45
48
  * Used for translations
46
49
  */
@@ -1,6 +1,7 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { html, unsafeCSS } from '@refinitiv-ui/core';
3
3
  import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
4
+ import { property } from '@refinitiv-ui/core/decorators/property.js';
4
5
  import { state } from '@refinitiv-ui/core/decorators/state.js';
5
6
  import '@refinitiv-ui/phrasebook/locale/en/password-field.js';
6
7
  import { translate } from '@refinitiv-ui/translate';
@@ -20,12 +21,7 @@ import { deregisterOverflowTooltip } from '../tooltip/index.js';
20
21
  * @attr {boolean} error - Set error state
21
22
  * @prop {boolean} [error=false] - Set error state
22
23
  *
23
- * @attr {number} maxlength - Set character max limit
24
- * @prop {number | null} [maxLength=null] - Set character max limit
25
- *
26
- * @attr {number} minlength - Set character min limit
27
- * @prop {number | null} [minLength=null] - Set character min limit
28
- *
24
+ * @attr {string} pattern - Set regular expression for input validation
29
25
  * @prop {string} [pattern=""] - Set regular expression for input validation
30
26
  *
31
27
  * @attr {string} placeholder - Set placeholder text
@@ -46,6 +42,16 @@ import { deregisterOverflowTooltip } from '../tooltip/index.js';
46
42
  let PasswordField = class PasswordField extends TextField {
47
43
  constructor() {
48
44
  super(...arguments);
45
+ /**
46
+ * Set character max limit
47
+ */
48
+ // override to merely fix missing attribute from component's doc
49
+ this.maxLength = null;
50
+ /**
51
+ * Set character min limit
52
+ */
53
+ // override to merely fix missing attribute from component's doc
54
+ this.minLength = null;
49
55
  /**
50
56
  * Defines whether password is visible or not
51
57
  */
@@ -150,6 +156,12 @@ let PasswordField = class PasswordField extends TextField {
150
156
  this.isPasswordVisible = !this.isPasswordVisible;
151
157
  }
152
158
  };
159
+ __decorate([
160
+ property({ type: Number, attribute: 'maxlength', reflect: true })
161
+ ], PasswordField.prototype, "maxLength", void 0);
162
+ __decorate([
163
+ property({ type: Number, attribute: 'minlength', reflect: true })
164
+ ], PasswordField.prototype, "minLength", void 0);
153
165
  __decorate([
154
166
  translate({ scope: 'ef-password-field' })
155
167
  ], PasswordField.prototype, "t", void 0);
@@ -5,6 +5,16 @@
5
5
  "name": "ef-search-field",
6
6
  "description": "Form control to get a search input from users.",
7
7
  "attributes": [
8
+ {
9
+ "name": "maxlength",
10
+ "description": "Set character max limit",
11
+ "type": "number | null"
12
+ },
13
+ {
14
+ "name": "minlength",
15
+ "description": "Set character min limit",
16
+ "type": "number | null"
17
+ },
8
18
  {
9
19
  "name": "disabled",
10
20
  "description": "Set disabled state",
@@ -23,6 +33,12 @@
23
33
  "type": "boolean",
24
34
  "default": "false"
25
35
  },
36
+ {
37
+ "name": "pattern",
38
+ "description": "Set regular expression for input validation",
39
+ "type": "string",
40
+ "default": "\"\""
41
+ },
26
42
  {
27
43
  "name": "placeholder",
28
44
  "description": "Set placeholder text",
@@ -57,19 +73,21 @@
57
73
  "name": "icon-has-action",
58
74
  "description": "Specify when icon need to be clickable",
59
75
  "type": "boolean"
60
- },
76
+ }
77
+ ],
78
+ "properties": [
61
79
  {
62
- "name": "maxlength",
80
+ "name": "maxLength",
81
+ "attribute": "maxlength",
63
82
  "description": "Set character max limit",
64
- "type": "number"
83
+ "type": "number | null"
65
84
  },
66
85
  {
67
- "name": "minlength",
86
+ "name": "minLength",
87
+ "attribute": "minlength",
68
88
  "description": "Set character min limit",
69
- "type": "number"
70
- }
71
- ],
72
- "properties": [
89
+ "type": "number | null"
90
+ },
73
91
  {
74
92
  "name": "disabled",
75
93
  "attribute": "disabled",
@@ -91,18 +109,9 @@
91
109
  "type": "boolean",
92
110
  "default": "false"
93
111
  },
94
- {
95
- "name": "maxLength",
96
- "description": "Set character max limit",
97
- "type": "number | null"
98
- },
99
- {
100
- "name": "minLength",
101
- "description": "Set character min limit",
102
- "type": "number | null"
103
- },
104
112
  {
105
113
  "name": "pattern",
114
+ "attribute": "pattern",
106
115
  "description": "Set regular expression for input validation",
107
116
  "type": "string",
108
117
  "default": "\"\""
@@ -7,8 +7,6 @@ Form control to get a search input from users.
7
7
  | Attribute | Type | Description |
8
8
  |-------------------|-----------|----------------------------------------|
9
9
  | `icon-has-action` | `boolean` | Specify when icon need to be clickable |
10
- | `maxlength` | `number` | Set character max limit |
11
- | `minlength` | `number` | Set character min limit |
12
10
 
13
11
  ## Properties
14
12
 
@@ -17,9 +15,9 @@ Form control to get a search input from users.
17
15
  | `disabled` | `disabled` | `boolean` | false | Set disabled state |
18
16
  | `error` | `error` | `boolean` | false | Set error state |
19
17
  | `iconHasAction` | `icon-has-action` | `boolean` | false | Specify when icon need to be clickable |
20
- | `maxLength` | | `number \| null` | null | Set character max limit |
21
- | `minLength` | | `number \| null` | null | Set character min limit |
22
- | `pattern` | | `string` | "" | Set regular expression for input validation |
18
+ | `maxLength` | `maxlength` | `number \| null` | null | Set character max limit |
19
+ | `minLength` | `minlength` | `number \| null` | null | Set character min limit |
20
+ | `pattern` | `pattern` | `string` | "" | Set regular expression for input validation |
23
21
  | `placeholder` | `placeholder` | `string` | "" | Set placeholder text |
24
22
  | `readonly` | `readonly` | `boolean` | false | Set readonly state |
25
23
  | `transparent` | `transparent` | `boolean` | false | Disables all other states and border/background styles. |
@@ -21,12 +21,7 @@ import { TextField } from '../text-field/index.js';
21
21
  * @attr {boolean} icon-has-action - Specify when icon need to be clickable
22
22
  * @prop {boolean} [iconHasAction=false] - Specify when icon need to be clickable
23
23
  *
24
- * @attr {number} maxlength - Set character max limit
25
- * @prop {number | null} [maxLength=null] - Set character max limit
26
- *
27
- * @attr {number} minlength - Set character min limit
28
- * @prop {number | null} [minLength=null] - Set character min limit
29
- *
24
+ * @attr {string} pattern - Set regular expression for input validation
30
25
  * @prop {string} [pattern=""] - Set regular expression for input validation
31
26
  *
32
27
  * @attr {string} placeholder - Set placeholder text
@@ -45,6 +40,14 @@ import { TextField } from '../text-field/index.js';
45
40
  * @prop {string} [value=""] - Input's value
46
41
  */
47
42
  export declare class SearchField extends TextField {
43
+ /**
44
+ * Set character max limit
45
+ */
46
+ maxLength: number | null;
47
+ /**
48
+ * Set character min limit
49
+ */
50
+ minLength: number | null;
48
51
  /**
49
52
  * Used for translations
50
53
  */
@@ -1,6 +1,7 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { html, nothing } from '@refinitiv-ui/core';
3
3
  import { customElement } from '@refinitiv-ui/core/decorators/custom-element.js';
4
+ import { property } from '@refinitiv-ui/core/decorators/property.js';
4
5
  import '@refinitiv-ui/phrasebook/locale/en/search-field.js';
5
6
  import { translate } from '@refinitiv-ui/translate';
6
7
  import '../icon/index.js';
@@ -21,12 +22,7 @@ import { TextField } from '../text-field/index.js';
21
22
  * @attr {boolean} icon-has-action - Specify when icon need to be clickable
22
23
  * @prop {boolean} [iconHasAction=false] - Specify when icon need to be clickable
23
24
  *
24
- * @attr {number} maxlength - Set character max limit
25
- * @prop {number | null} [maxLength=null] - Set character max limit
26
- *
27
- * @attr {number} minlength - Set character min limit
28
- * @prop {number | null} [minLength=null] - Set character min limit
29
- *
25
+ * @attr {string} pattern - Set regular expression for input validation
30
26
  * @prop {string} [pattern=""] - Set regular expression for input validation
31
27
  *
32
28
  * @attr {string} placeholder - Set placeholder text
@@ -45,6 +41,19 @@ import { TextField } from '../text-field/index.js';
45
41
  * @prop {string} [value=""] - Input's value
46
42
  */
47
43
  let SearchField = class SearchField extends TextField {
44
+ constructor() {
45
+ super(...arguments);
46
+ /**
47
+ * Set character max limit
48
+ */
49
+ // override to merely fix missing attribute from component's doc
50
+ this.maxLength = null;
51
+ /**
52
+ * Set character min limit
53
+ */
54
+ // override to merely fix missing attribute from component's doc
55
+ this.minLength = null;
56
+ }
48
57
  /**
49
58
  * Decorate `<input>` element with common properties extended from text-field:
50
59
  * type="search" - always `search`
@@ -90,6 +99,12 @@ let SearchField = class SearchField extends TextField {
90
99
  `;
91
100
  }
92
101
  };
102
+ __decorate([
103
+ property({ type: Number, attribute: 'maxlength', reflect: true })
104
+ ], SearchField.prototype, "maxLength", void 0);
105
+ __decorate([
106
+ property({ type: Number, attribute: 'minlength', reflect: true })
107
+ ], SearchField.prototype, "minLength", void 0);
93
108
  __decorate([
94
109
  translate({ scope: 'ef-search-field' })
95
110
  ], SearchField.prototype, "t", void 0);
@@ -1,7 +1,7 @@
1
1
  import { JSXInterface } from '../jsx';
2
2
  import { BasicElement, CSSResultGroup, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
3
- import '../layout/index.js';
4
3
  import type { Layout } from '../layout';
4
+ import '../layout/index.js';
5
5
  /**
6
6
  * Provides an app layout with sidebar.
7
7
  * There are 4 sections that can be slotted a component in.
@@ -8,7 +8,7 @@
8
8
  {
9
9
  "name": "pattern",
10
10
  "description": "Set regular expression for input validation",
11
- "type": "string",
11
+ "type": "string | null",
12
12
  "default": "\"\""
13
13
  },
14
14
  {
@@ -80,7 +80,7 @@
80
80
  "name": "pattern",
81
81
  "attribute": "pattern",
82
82
  "description": "Set regular expression for input validation",
83
- "type": "string",
83
+ "type": "string | null",
84
84
  "default": "\"\""
85
85
  },
86
86
  {
@@ -12,7 +12,7 @@ Form control element for text.
12
12
  | `iconHasAction` | `icon-has-action` | `boolean` | false | Specify when icon need to be clickable |
13
13
  | `maxLength` | `maxlength` | `number \| null` | null | Set character max limit |
14
14
  | `minLength` | `minlength` | `number \| null` | null | Set character min limit |
15
- | `pattern` | `pattern` | `string` | "" | Set regular expression for input validation |
15
+ | `pattern` | `pattern` | `string \| null` | "" | Set regular expression for input validation |
16
16
  | `placeholder` | `placeholder` | `string` | "" | Set placeholder text |
17
17
  | `readonly` | `readonly` | `boolean` | false | Set readonly state |
18
18
  | `transparent` | `transparent` | `boolean` | false | Disables all other states and border/background styles. |
@@ -45,7 +45,7 @@ export declare class TextField extends FormFieldElement {
45
45
  /**
46
46
  * Set regular expression for input validation
47
47
  */
48
- pattern: string;
48
+ pattern: string | null;
49
49
  /**
50
50
  * Specify icon to display in input. Value can be icon name
51
51
  */
@@ -80,6 +80,11 @@ export declare class TextField extends FormFieldElement {
80
80
  * @returns shouldUpdate
81
81
  */
82
82
  protected updated(changedProperties: PropertyValues): void;
83
+ /**
84
+ * Returns whether input of the element should be validated or not based on the existence of validation constraints
85
+ * @returns true if there is at least one validation constraint
86
+ */
87
+ protected shouldValidate(): boolean;
83
88
  /**
84
89
  * Returns `true` if the element input is valid; otherwise, returns `false`.
85
90
  * @returns element input validity
@@ -6,7 +6,6 @@ import { isElementOverflown } from '@refinitiv-ui/utils/element.js';
6
6
  import '../icon/index.js';
7
7
  import { registerOverflowTooltip } from '../tooltip/index.js';
8
8
  import { VERSION } from '../version.js';
9
- const hasChanged = (newVal, oldVal) => oldVal === undefined ? false : newVal !== oldVal;
10
9
  /**
11
10
  * Form control element for text.
12
11
  *
@@ -114,7 +113,7 @@ let TextField = class TextField extends FormFieldElement {
114
113
  * @returns {void}
115
114
  */
116
115
  update(changedProperties) {
117
- if (changedProperties.has(FocusedPropertyKey) && !this.focused) {
116
+ if (changedProperties.has(FocusedPropertyKey) && !this.focused && this.shouldValidate()) {
118
117
  this.reportValidity();
119
118
  }
120
119
  super.update(changedProperties);
@@ -130,6 +129,16 @@ let TextField = class TextField extends FormFieldElement {
130
129
  this.syncInputValue();
131
130
  }
132
131
  }
132
+ /**
133
+ * Returns whether input of the element should be validated or not based on the existence of validation constraints
134
+ * @returns true if there is at least one validation constraint
135
+ */
136
+ shouldValidate() {
137
+ const hasMaxLength = this.maxLength !== null;
138
+ const hasMinLength = this.minLength !== null;
139
+ const hasPattern = !!this.pattern;
140
+ return hasMaxLength || hasMinLength || hasPattern;
141
+ }
133
142
  /**
134
143
  * Returns `true` if the element input is valid; otherwise, returns `false`.
135
144
  * @returns element input validity
@@ -186,7 +195,9 @@ let TextField = class TextField extends FormFieldElement {
186
195
  onPossibleValueChange(event) {
187
196
  const value = this.inputElement?.value || '';
188
197
  this.setValueAndNotify(value);
189
- this.reportValidity();
198
+ if (this.shouldValidate()) {
199
+ this.reportValidity();
200
+ }
190
201
  }
191
202
  /**
192
203
  * Fires event on `icon` click
@@ -246,7 +257,7 @@ let TextField = class TextField extends FormFieldElement {
246
257
  }
247
258
  };
248
259
  __decorate([
249
- property({ type: String, hasChanged })
260
+ property({ type: String })
250
261
  ], TextField.prototype, "pattern", void 0);
251
262
  __decorate([
252
263
  property({ type: String, reflect: true })
@@ -258,7 +269,7 @@ __decorate([
258
269
  property({ type: Number, attribute: 'maxlength', reflect: true })
259
270
  ], TextField.prototype, "maxLength", void 0);
260
271
  __decorate([
261
- property({ type: Number, attribute: 'minlength', reflect: true, hasChanged })
272
+ property({ type: Number, attribute: 'minlength', reflect: true })
262
273
  ], TextField.prototype, "minLength", void 0);
263
274
  TextField = __decorate([
264
275
  customElement('ef-text-field')
@@ -1,10 +1,10 @@
1
1
  import { JSXInterface } from '../jsx';
2
2
  import { BasicElement, CSSResultGroup, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
3
+ import type { OverlayTransitionStyle as TooltipTransitionStyle } from '../overlay';
3
4
  import '../overlay/index.js';
4
5
  import './elements/title-tooltip.js';
5
6
  import { deregister as deregisterOverflowTooltip, register as registerOverflowTooltip } from './helpers/overflow-tooltip.js';
6
7
  import { TooltipCondition, TooltipPosition, TooltipRenderer } from './helpers/types.js';
7
- import type { OverlayTransitionStyle as TooltipTransitionStyle } from '../overlay';
8
8
  /**
9
9
  * Tooltip displays extra information when the
10
10
  * user hovers the pointer over an item.
@@ -2,8 +2,8 @@ import { JSXInterface } from '../../jsx';
2
2
  import { ControlElement, PropertyValues, TemplateResult } from '@refinitiv-ui/core';
3
3
  import '../../checkbox/index.js';
4
4
  import '../../icon/index.js';
5
- import { CheckedState } from '../managers/tree-manager.js';
6
5
  import type { TreeDataItem } from '../helpers/types';
6
+ import { CheckedState } from '../managers/tree-manager.js';
7
7
  /**
8
8
  * Displays a tree list item.
9
9
  * Groups display expansion arrows.
@@ -3,9 +3,9 @@ import { PropertyValues, TapEvent } from '@refinitiv-ui/core';
3
3
  import { CollectionComposer } from '@refinitiv-ui/utils/collection.js';
4
4
  import { List } from '../../list/index.js';
5
5
  import { TreeRenderer } from '../helpers/renderer.js';
6
+ import type { TreeData, TreeDataItem, TreeFilter } from '../helpers/types';
6
7
  import { TreeManagerMode } from '../managers/tree-manager.js';
7
8
  import './tree-item.js';
8
- import type { TreeData, TreeDataItem, TreeFilter } from '../helpers/types';
9
9
  /**
10
10
  * Displays a tree structure
11
11
  * to be used for menus and group selections
@@ -1,3 +1,4 @@
1
+ import escapeStringRegexp from 'escape-string-regexp';
1
2
  /**
2
3
  * Default filter used by tree
3
4
  * @param el Tree instance to filter
@@ -14,7 +15,7 @@ export const defaultFilter = (el) => {
14
15
  const getRegularExpressionOfQuery = () => {
15
16
  if (el.query !== query || !queryRegExp) {
16
17
  query = el.query || '';
17
- queryRegExp = new RegExp(query.replace(/(\W)/g, '\\$1'), 'i');
18
+ queryRegExp = new RegExp(escapeStringRegexp(query), 'i');
18
19
  }
19
20
  return queryRegExp;
20
21
  };
@@ -1,5 +1,5 @@
1
- import type { TreeDataItem } from '../helpers/types';
2
1
  import type { CollectionComposer } from '@refinitiv-ui/utils/collection.js';
2
+ import type { TreeDataItem } from '../helpers/types';
3
3
  export declare enum CheckedState {
4
4
  CHECKED = 1,
5
5
  UNCHECKED = 0,
@@ -7,14 +7,14 @@ import { CollectionComposer } from '@refinitiv-ui/utils/collection.js';
7
7
  import '../button/index.js';
8
8
  import '../checkbox/index.js';
9
9
  import { ComboBox, ComboBoxFilter as TreeSelectFilter } from '../combo-box/index.js';
10
+ import type { CheckChangedEvent } from '../events';
10
11
  import '../icon/index.js';
12
+ import type { Overlay } from '../overlay';
11
13
  import '../pill/index.js';
12
14
  import '../tree/index.js';
13
15
  import { TreeRenderer as TreeSelectRenderer } from '../tree/index.js';
14
- import { TreeManager, TreeManagerMode } from '../tree/managers/tree-manager.js';
15
- import type { CheckChangedEvent } from '../events';
16
- import type { Overlay } from '../overlay';
17
16
  import type { Tree } from '../tree/index.js';
17
+ import { TreeManager, TreeManagerMode } from '../tree/managers/tree-manager.js';
18
18
  import type { TreeSelectData, TreeSelectDataItem } from './helpers/types';
19
19
  export { TreeSelectRenderer };
20
20
  export type { TreeSelectFilter, TreeSelectDataItem, TreeSelectData };
package/lib/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = '7.7.0';
1
+ export const VERSION = '7.9.0';