@refinitiv-ui/elements 6.13.0 → 6.13.2

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,19 @@
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
+ ## [6.13.2](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@6.13.1...@refinitiv-ui/elements@6.13.2) (2023-10-09)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **utils:** add explicit nested type to collection-item ([#984](https://github.com/Refinitiv/refinitiv-ui/issues/984)) ([cfd5935](https://github.com/Refinitiv/refinitiv-ui/commit/cfd5935935bccda8e97bb88b8f99b7009cd38437))
11
+
12
+ ## [6.13.1](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@6.13.0...@refinitiv-ui/elements@6.13.1) (2023-10-02)
13
+
14
+ ### Bug Fixes
15
+
16
+ - **list, tree:** stateless list and tree should have aria-readonly ([#980](https://github.com/Refinitiv/refinitiv-ui/issues/980)) ([5f7713f](https://github.com/Refinitiv/refinitiv-ui/commit/5f7713f1f3a6d55580c542dcf369a938e1d2f2c3))
17
+ - **tree:** parent label can't expand/collapse in stateless mode ([#970](https://github.com/Refinitiv/refinitiv-ui/issues/970)) ([7151558](https://github.com/Refinitiv/refinitiv-ui/commit/715155842be891a380fae4b79ec871d43b67016d))
18
+
6
19
  # [6.13.0](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@6.12.0...@refinitiv-ui/elements@6.13.0) (2023-09-25)
7
20
 
8
21
  ### Bug Fixes
@@ -5,6 +5,10 @@ interface CommonItem extends DataItem {
5
5
  * Type of item. Value can be `text`, `header`, `divider`
6
6
  */
7
7
  type?: ItemType;
8
+ /**
9
+ * Used for nested ItemData.
10
+ */
11
+ items?: ItemData[];
8
12
  }
9
13
  interface CommonLabelItem extends CommonItem {
10
14
  /**
@@ -575,6 +575,14 @@ let List = class List extends ControlElement {
575
575
  this.renderTimestamp.clear(); // force render of all items
576
576
  this.setAttribute('aria-multiselectable', this.multiple ? 'true' : 'false');
577
577
  }
578
+ if (changeProperties.has('stateless')) {
579
+ if (this.stateless) {
580
+ this.setAttribute('aria-readonly', 'true');
581
+ }
582
+ else {
583
+ this.removeAttribute('aria-readonly');
584
+ }
585
+ }
578
586
  }
579
587
  /**
580
588
  * A `CSSResultGroup` that will be used
@@ -96,6 +96,10 @@ let Tree = class Tree extends List {
96
96
  selectItem(item) {
97
97
  // Stateless tree
98
98
  if (this.stateless) {
99
+ // Single selection - expand/collapse group (parent)
100
+ if (!this.multiple && this.manager.isItemParent(item)) {
101
+ this.toggleExpandedState(item);
102
+ }
99
103
  return false;
100
104
  }
101
105
  // Multiple selection
@@ -14,6 +14,10 @@ export interface TreeDataItem extends DataItem {
14
14
  * If `true`, child items will be visible
15
15
  */
16
16
  expanded?: boolean;
17
+ /**
18
+ * Used for nested TreeDataItem.
19
+ */
20
+ items?: TreeDataItem[];
17
21
  }
18
22
  /**
19
23
  * Predicate callback
package/lib/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = '6.13.0';
1
+ export const VERSION = '6.13.2';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@refinitiv-ui/elements",
3
- "version": "6.13.0",
3
+ "version": "6.13.2",
4
4
  "description": "Element Framework Elements",
5
5
  "author": "LSEG",
6
6
  "license": "Apache-2.0",
@@ -349,25 +349,25 @@
349
349
  "tslib": "^2.3.1"
350
350
  },
351
351
  "devDependencies": {
352
- "@refinitiv-ui/core": "^6.5.1",
353
- "@refinitiv-ui/demo-block": "^6.1.12",
352
+ "@refinitiv-ui/core": "^6.5.2",
353
+ "@refinitiv-ui/demo-block": "^6.1.14",
354
354
  "@refinitiv-ui/i18n": "^6.0.18",
355
355
  "@refinitiv-ui/phrasebook": "^6.3.7",
356
356
  "@refinitiv-ui/test-helpers": "^6.0.15",
357
- "@refinitiv-ui/translate": "^6.0.27",
358
- "@refinitiv-ui/utils": "^6.3.0",
357
+ "@refinitiv-ui/translate": "^6.0.28",
358
+ "@refinitiv-ui/utils": "^6.3.1",
359
359
  "@types/d3-interpolate": "^3.0.1"
360
360
  },
361
361
  "peerDependencies": {
362
362
  "@refinitiv-ui/browser-sparkline": "^1.0.0 || ^2.0.0",
363
- "@refinitiv-ui/core": "^6.5.1",
363
+ "@refinitiv-ui/core": "^6.5.2",
364
364
  "@refinitiv-ui/i18n": "^6.0.18",
365
365
  "@refinitiv-ui/phrasebook": "^6.3.7",
366
- "@refinitiv-ui/translate": "^6.0.27",
367
- "@refinitiv-ui/utils": "^6.3.0"
366
+ "@refinitiv-ui/translate": "^6.0.28",
367
+ "@refinitiv-ui/utils": "^6.3.1"
368
368
  },
369
369
  "publishConfig": {
370
370
  "access": "public"
371
371
  },
372
- "gitHead": "55ebf6e2b7bc388fe8cbc4fb48e16314af3942cb"
372
+ "gitHead": "7e36942606e5a9ff60ce380f3989b7ac05076042"
373
373
  }