@refinitiv-ui/elements 7.13.3 → 7.13.5

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,18 @@
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.13.5](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@7.13.4...@refinitiv-ui/elements@7.13.5) (2024-09-23)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **tree, tree-select, combo-box:** apply filter when it's updated ([#1217](https://github.com/Refinitiv/refinitiv-ui/issues/1217)) ([3640760](https://github.com/Refinitiv/refinitiv-ui/commit/36407603d89cdf2cf22fd1ae4ee51f15f42aea9d))
11
+
12
+ ## [7.13.4](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@7.13.3...@refinitiv-ui/elements@7.13.4) (2024-08-26)
13
+
14
+ ### Bug Fixes
15
+
16
+ - **tree-select:** fix item interface doesn't sync with values ([#1206](https://github.com/Refinitiv/refinitiv-ui/issues/1206)) ([9691ff6](https://github.com/Refinitiv/refinitiv-ui/commit/9691ff6608f99af7ea47121c3f9325ea35b05e12))
17
+
6
18
  ## [7.13.3](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@7.13.2...@refinitiv-ui/elements@7.13.3) (2024-08-13)
7
19
 
8
20
  ### Bug Fixes
@@ -509,6 +509,10 @@ let ComboBox = class ComboBox extends FormFieldElement {
509
509
  if (changedProperties.has('data') && this.opened) {
510
510
  triggerResize();
511
511
  }
512
+ // If filter has been updated, filter items again with the updated filter.
513
+ if (changedProperties.has('filter')) {
514
+ this.filterItems();
515
+ }
512
516
  super.update(changedProperties);
513
517
  }
514
518
  /**
@@ -254,7 +254,7 @@ let Tree = class Tree extends List {
254
254
  if (changeProperties.has('noRelation') || changeProperties.has('multiple')) {
255
255
  this._manager.setMode(this.mode);
256
256
  }
257
- if (changeProperties.has('query') || changeProperties.has('data')) {
257
+ if (changeProperties.has('query') || changeProperties.has('data') || changeProperties.has('filter')) {
258
258
  this.filterItems();
259
259
  }
260
260
  }
@@ -116,6 +116,12 @@ export declare class TreeSelect extends ComboBox<TreeSelectDataItem> {
116
116
  */
117
117
  get values(): string[];
118
118
  set values(values: string[]);
119
+ /**
120
+ * Update composer values.
121
+ * @param newValues new values
122
+ * @returns {void}
123
+ */
124
+ protected updateComposerValues(newValues: string[]): void;
119
125
  /**
120
126
  * Renderer used to render tree item elements
121
127
  */
@@ -199,6 +199,28 @@ let TreeSelect = class TreeSelect extends ComboBox {
199
199
  this.requestUpdate('values', oldValues);
200
200
  }
201
201
  }
202
+ /**
203
+ * Update composer values.
204
+ * @param newValues new values
205
+ * @returns {void}
206
+ */
207
+ updateComposerValues(newValues) {
208
+ for (const item of this.treeManager.checkedItems) {
209
+ this.treeManager.uncheckItem(item);
210
+ }
211
+ const selectedItems = this.queryItems((item, composer) => {
212
+ return newValues.includes(composer.getItemPropertyValue(item, 'value') ?? '');
213
+ });
214
+ const sortedSelectedItem = [];
215
+ for (const item of selectedItems) {
216
+ const value = this.composer.getItemPropertyValue(item, 'value') ?? '';
217
+ const index = newValues.indexOf(value);
218
+ sortedSelectedItem[index] = item;
219
+ }
220
+ for (const item of sortedSelectedItem) {
221
+ this.treeManager.checkItem(item);
222
+ }
223
+ }
202
224
  /**
203
225
  * Set maximum number of selected items
204
226
  * @param value max value
package/lib/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = '7.13.3';
1
+ export const VERSION = '7.13.5';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@refinitiv-ui/elements",
3
- "version": "7.13.3",
3
+ "version": "7.13.5",
4
4
  "description": "Element Framework Elements",
5
5
  "author": "LSEG",
6
6
  "license": "Apache-2.0",
@@ -353,25 +353,25 @@
353
353
  "tslib": "^2.3.1"
354
354
  },
355
355
  "devDependencies": {
356
- "@refinitiv-ui/core": "^7.5.0",
357
- "@refinitiv-ui/demo-block": "^7.1.14",
358
- "@refinitiv-ui/i18n": "^7.1.4",
356
+ "@refinitiv-ui/core": "^7.5.1",
357
+ "@refinitiv-ui/demo-block": "^7.1.15",
358
+ "@refinitiv-ui/i18n": "^7.1.5",
359
359
  "@refinitiv-ui/phrasebook": "^7.1.1",
360
- "@refinitiv-ui/test-helpers": "^7.1.1",
361
- "@refinitiv-ui/translate": "^7.1.8",
360
+ "@refinitiv-ui/test-helpers": "^7.1.2",
361
+ "@refinitiv-ui/translate": "^7.1.9",
362
362
  "@refinitiv-ui/utils": "^7.3.0",
363
363
  "@types/d3-interpolate": "^3.0.1"
364
364
  },
365
365
  "peerDependencies": {
366
366
  "@refinitiv-ui/browser-sparkline": "^1.0.0 || ^2.0.0",
367
- "@refinitiv-ui/core": "^7.5.0",
368
- "@refinitiv-ui/i18n": "^7.1.4",
367
+ "@refinitiv-ui/core": "^7.5.1",
368
+ "@refinitiv-ui/i18n": "^7.1.5",
369
369
  "@refinitiv-ui/phrasebook": "^7.1.1",
370
- "@refinitiv-ui/translate": "^7.1.8",
370
+ "@refinitiv-ui/translate": "^7.1.9",
371
371
  "@refinitiv-ui/utils": "^7.3.0"
372
372
  },
373
373
  "publishConfig": {
374
374
  "access": "public"
375
375
  },
376
- "gitHead": "80088aed35c12857c850127ce3a3fad421c3445a"
376
+ "gitHead": "4fec2441736742b711f605b8b6de3c5ea19c7dba"
377
377
  }