@refinitiv-ui/elements 6.6.1 → 6.7.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 +22 -1
- package/lib/combo-box/index.js +1 -1
- package/lib/heatmap/helpers/text.d.ts +1 -1
- package/lib/heatmap/helpers/text.js +1 -1
- package/lib/heatmap/index.js +6 -5
- package/lib/version.js +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,12 +3,33 @@
|
|
|
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.7.0](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@6.6.2...@refinitiv-ui/elements@6.7.0) (2023-02-27)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **heatmap:** increase heatmap font-size threshold & scaling factor and decrease cell padding ([#589](https://github.com/Refinitiv/refinitiv-ui/issues/589)) ([31f5b57](https://github.com/Refinitiv/refinitiv-ui/commit/31f5b57df0ec2b1f1d25c9c27e0be35f8c7f3812))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [6.6.2](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@6.6.1...@refinitiv-ui/elements@6.6.2) (2023-02-14)
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* **combo-box:** fix value-changed event of free text mode ([#583](https://github.com/Refinitiv/refinitiv-ui/pull/583)) ([bae20f0](https://github.com/Refinitiv/refinitiv-ui/commit/bae20f0854d9f95d8c10985f8b2c5a9619922004))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
6
27
|
## [6.6.1](https://github.com/Refinitiv/refinitiv-ui/compare/@refinitiv-ui/elements@6.6.0...@refinitiv-ui/elements@6.6.1) (2023-01-27)
|
|
7
28
|
|
|
8
29
|
|
|
9
30
|
### Bug Fixes
|
|
10
31
|
|
|
11
|
-
* **list:**
|
|
32
|
+
* **list:** error custom renderer requires key ([#575](https://github.com/Refinitiv/refinitiv-ui/issues/575)) ([1a960c9](https://github.com/Refinitiv/refinitiv-ui/commit/1a960c9234fb4a370b60d3901e65b437b1444823))
|
|
12
33
|
* **pagination, tree-select:** remove unused element imports ([#572](https://github.com/Refinitiv/refinitiv-ui/issues/572)) ([0bfc2f5](https://github.com/Refinitiv/refinitiv-ui/commit/0bfc2f5eccd0a6ea50c3927d71d545df20c79d90))
|
|
13
34
|
* **select:** unset cursor of header items ([#571](https://github.com/Refinitiv/refinitiv-ui/issues/571)) ([eff8a75](https://github.com/Refinitiv/refinitiv-ui/commit/eff8a75a68f23348178f05c716db673c97acf2f1))
|
|
14
35
|
|
package/lib/combo-box/index.js
CHANGED
|
@@ -802,8 +802,8 @@ let ComboBox = class ComboBox extends FormFieldElement {
|
|
|
802
802
|
*/
|
|
803
803
|
onListValueChanged() {
|
|
804
804
|
// cascade value changed event
|
|
805
|
-
this.notifyPropertyChange('value', this.value);
|
|
806
805
|
this.onListInteraction();
|
|
806
|
+
this.notifyPropertyChange('value', this.value);
|
|
807
807
|
}
|
|
808
808
|
/**
|
|
809
809
|
* Handle popup opened event
|
package/lib/heatmap/index.js
CHANGED
|
@@ -11,7 +11,8 @@ import '../tooltip/index.js';
|
|
|
11
11
|
import { Track } from './helpers/track.js';
|
|
12
12
|
import { blend, brighten, darken, isLight, interpolate } from './helpers/color.js';
|
|
13
13
|
import { getResponsiveFontSize, getMaximumTextWidth, MIN_FONT_SIZE } from './helpers/text.js';
|
|
14
|
-
const
|
|
14
|
+
const CELL_PADDING = 0.12;
|
|
15
|
+
const CELL_MAX_TEXT_WIDTH = 1 - CELL_PADDING;
|
|
15
16
|
const DEFAULT_CANVAS_RATIO = 0.75; // ratio — 4:3
|
|
16
17
|
/**
|
|
17
18
|
* A graphical representation of data where the individual
|
|
@@ -647,7 +648,7 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
647
648
|
if (!canvas) {
|
|
648
649
|
return false;
|
|
649
650
|
}
|
|
650
|
-
const fontRatio = this.responsiveHeight ? 0.
|
|
651
|
+
const fontRatio = this.responsiveHeight ? 0.4 : 0.5;
|
|
651
652
|
const fontFamily = getComputedStyle(this).fontFamily;
|
|
652
653
|
const contentWidth = this.colTrack.getContentSize(0);
|
|
653
654
|
const contentHeight = this.rowTrack.getContentSize(0);
|
|
@@ -659,12 +660,12 @@ let Heatmap = class Heatmap extends ResponsiveElement {
|
|
|
659
660
|
canvas.textAlign = 'center';
|
|
660
661
|
canvas.textBaseline = 'middle';
|
|
661
662
|
canvas.font = `${fontSize}px ${fontFamily}`;
|
|
662
|
-
let isWithinMinCellWidth = ((this.labelWidth || getMaximumTextWidth(canvas, this.cells, this.hasCellHeader)) / contentWidth)
|
|
663
|
-
//
|
|
663
|
+
let isWithinMinCellWidth = ((this.labelWidth || getMaximumTextWidth(canvas, this.cells, this.hasCellHeader)) / contentWidth) <= CELL_MAX_TEXT_WIDTH;
|
|
664
|
+
// Tries to get the largest possible font size that is within `CELL_MAX_TEXT_WIDTH`
|
|
664
665
|
if (!isWithinMinCellWidth && fontSize !== MIN_FONT_SIZE) {
|
|
665
666
|
while (!isWithinMinCellWidth) {
|
|
666
667
|
canvas.font = `${fontSize}px ${fontFamily}`; // Should assigned new font size to canvas before calculated again.
|
|
667
|
-
isWithinMinCellWidth = ((this.labelWidth || getMaximumTextWidth(canvas, this.cells, this.hasCellHeader)) / contentWidth)
|
|
668
|
+
isWithinMinCellWidth = ((this.labelWidth || getMaximumTextWidth(canvas, this.cells, this.hasCellHeader)) / contentWidth) <= CELL_MAX_TEXT_WIDTH;
|
|
668
669
|
// Stops when reaches minimum font-size
|
|
669
670
|
if (fontSize === MIN_FONT_SIZE) {
|
|
670
671
|
break;
|
package/lib/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '6.
|
|
1
|
+
export const VERSION = '6.7.0';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@refinitiv-ui/elements",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.7.0",
|
|
4
4
|
"description": "Element Framework Elements",
|
|
5
5
|
"author": "LSEG",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -352,7 +352,7 @@
|
|
|
352
352
|
"@refinitiv-ui/i18n": "^6.0.9",
|
|
353
353
|
"@refinitiv-ui/phrasebook": "^6.3.1",
|
|
354
354
|
"@refinitiv-ui/test-helpers": "^6.0.6",
|
|
355
|
-
"@refinitiv-ui/translate": "^6.0.
|
|
355
|
+
"@refinitiv-ui/translate": "^6.0.15",
|
|
356
356
|
"@refinitiv-ui/utils": "^6.2.3",
|
|
357
357
|
"@types/d3-interpolate": "^3.0.1"
|
|
358
358
|
},
|
|
@@ -360,11 +360,11 @@
|
|
|
360
360
|
"@refinitiv-ui/core": "^6.3.0",
|
|
361
361
|
"@refinitiv-ui/i18n": "^6.0.9",
|
|
362
362
|
"@refinitiv-ui/phrasebook": "^6.3.1",
|
|
363
|
-
"@refinitiv-ui/translate": "^6.0.
|
|
363
|
+
"@refinitiv-ui/translate": "^6.0.15",
|
|
364
364
|
"@refinitiv-ui/utils": "^6.2.3"
|
|
365
365
|
},
|
|
366
366
|
"publishConfig": {
|
|
367
367
|
"access": "public"
|
|
368
368
|
},
|
|
369
|
-
"gitHead": "
|
|
369
|
+
"gitHead": "922387ffec63d1dd6b2bf735e9e8919837be2087"
|
|
370
370
|
}
|