@carbon/charts-vue 1.6.1 → 1.6.3
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 +16 -0
- package/README.md +1 -1
- package/charts-vue.common.js +32 -13
- package/charts-vue.common.js.map +1 -1
- package/charts-vue.umd.js +32 -13
- package/charts-vue.umd.js.map +1 -1
- package/charts-vue.umd.min.js +1 -1
- package/charts-vue.umd.min.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
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
|
+
## [1.6.3](https://github.com/carbon-design-system/carbon-charts/compare/v1.6.2...v1.6.3) (2022-12-23)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @carbon/charts-vue
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [1.6.2](https://github.com/carbon-design-system/carbon-charts/compare/v1.6.1...v1.6.2) (2022-12-06)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @carbon/charts-vue
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [1.6.1](https://github.com/carbon-design-system/carbon-charts/compare/v1.6.0...v1.6.1) (2022-10-20)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @carbon/charts-vue
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Notice
|
|
2
2
|
|
|
3
|
-
### This version
|
|
3
|
+
### This version relies on **Carbon v11**. If you're using Carbon v10, [see the legacy demo site](https://carbon-charts-0x.netlify.app)
|
|
4
4
|
|
|
5
5
|
## `@carbon/charts-vue`
|
|
6
6
|
|
package/charts-vue.common.js
CHANGED
|
@@ -20756,7 +20756,6 @@ var legend_Legend = /** @class */ (function (_super) {
|
|
|
20756
20756
|
var truncationThreshold = tools_Tools.getProperty(truncationOptions, 'threshold');
|
|
20757
20757
|
var truncationNumCharacter = tools_Tools.getProperty(truncationOptions, 'numCharacter');
|
|
20758
20758
|
var addedLegendItemsText = svg.selectAll('div.legend-item p');
|
|
20759
|
-
var self = this;
|
|
20760
20759
|
// Add an ID for the checkbox to use through `aria-labelledby`
|
|
20761
20760
|
addedLegendItemsText.attr('id', function (d, i) {
|
|
20762
20761
|
var elementToReference = this.parentNode.querySelector('div.checkbox') ||
|
|
@@ -20783,7 +20782,7 @@ var legend_Legend = /** @class */ (function (_super) {
|
|
|
20783
20782
|
var svg = this.getComponentContainer();
|
|
20784
20783
|
var options = this.getOptions();
|
|
20785
20784
|
var legendOptions = tools_Tools.getProperty(options, 'legend');
|
|
20786
|
-
var
|
|
20785
|
+
var truncation = tools_Tools.getProperty(legendOptions, 'truncation');
|
|
20787
20786
|
svg.selectAll('div.legend-item')
|
|
20788
20787
|
.on('mouseover', function (event) {
|
|
20789
20788
|
self.services.events.dispatchEvent(Events.Legend.ITEM_HOVER, {
|
|
@@ -20791,8 +20790,10 @@ var legend_Legend = /** @class */ (function (_super) {
|
|
|
20791
20790
|
});
|
|
20792
20791
|
var hoveredItem = src_select(this);
|
|
20793
20792
|
hoveredItem.select('div.checkbox').classed('hovered', true);
|
|
20793
|
+
// Show tooltip if character length is greater than threshold & there is no truncation
|
|
20794
20794
|
var hoveredItemData = hoveredItem.datum();
|
|
20795
|
-
if (hoveredItemData.name.length >
|
|
20795
|
+
if (hoveredItemData.name.length > truncation.threshold &&
|
|
20796
|
+
truncation.type !== TruncationTypes.NONE) {
|
|
20796
20797
|
self.services.events.dispatchEvent(Events.Tooltip.SHOW, {
|
|
20797
20798
|
event: event,
|
|
20798
20799
|
hoveredElement: hoveredItem,
|
|
@@ -20801,9 +20802,14 @@ var legend_Legend = /** @class */ (function (_super) {
|
|
|
20801
20802
|
}
|
|
20802
20803
|
})
|
|
20803
20804
|
.on('mousemove', function (event) {
|
|
20804
|
-
|
|
20805
|
-
|
|
20806
|
-
|
|
20805
|
+
// Emit tooltip move event only if tooltip is shown
|
|
20806
|
+
var hoveredItemData = src_select(this).datum();
|
|
20807
|
+
if (hoveredItemData.name.length > truncation.threshold &&
|
|
20808
|
+
truncation.type !== TruncationTypes.NONE) {
|
|
20809
|
+
self.services.events.dispatchEvent(Events.Tooltip.MOVE, {
|
|
20810
|
+
event: event,
|
|
20811
|
+
});
|
|
20812
|
+
}
|
|
20807
20813
|
})
|
|
20808
20814
|
.on('click', function () {
|
|
20809
20815
|
self.services.events.dispatchEvent(Events.Legend.ITEM_CLICK, {
|
|
@@ -20816,7 +20822,12 @@ var legend_Legend = /** @class */ (function (_super) {
|
|
|
20816
20822
|
.on('mouseout', function () {
|
|
20817
20823
|
var hoveredItem = src_select(this);
|
|
20818
20824
|
hoveredItem.select('div.checkbox').classed('hovered', false);
|
|
20819
|
-
|
|
20825
|
+
// Emit tooltip hide event only if tooltip is shown
|
|
20826
|
+
var hoveredItemData = hoveredItem.datum();
|
|
20827
|
+
if (hoveredItemData.name.length > truncation.threshold &&
|
|
20828
|
+
truncation.type !== TruncationTypes.NONE) {
|
|
20829
|
+
self.services.events.dispatchEvent(Events.Tooltip.HIDE);
|
|
20830
|
+
}
|
|
20820
20831
|
self.services.events.dispatchEvent(Events.Legend.ITEM_MOUSEOUT, {
|
|
20821
20832
|
hoveredElement: hoveredItem,
|
|
20822
20833
|
});
|
|
@@ -20844,7 +20855,7 @@ var legend_Legend = /** @class */ (function (_super) {
|
|
|
20844
20855
|
svg.selectAll('g.additional-item').on('mouseover', function (event) {
|
|
20845
20856
|
var hoveredItem = src_select(this);
|
|
20846
20857
|
var hoveredItemData = hoveredItem.datum();
|
|
20847
|
-
if (hoveredItemData.name.length >
|
|
20858
|
+
if (hoveredItemData.name.length > truncation.threshold) {
|
|
20848
20859
|
self.services.events.dispatchEvent(Events.Tooltip.SHOW, {
|
|
20849
20860
|
event: event,
|
|
20850
20861
|
hoveredElement: hoveredItem,
|
|
@@ -24241,7 +24252,8 @@ var tooltip_Tooltip = /** @class */ (function (_super) {
|
|
|
24241
24252
|
}
|
|
24242
24253
|
try {
|
|
24243
24254
|
// it's a correct ISO format Date string
|
|
24244
|
-
if (typeof value === 'string' &&
|
|
24255
|
+
if (typeof value === 'string' &&
|
|
24256
|
+
/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/.test(value)) {
|
|
24245
24257
|
return format_format(Date.parse(value), 'MMM d, yyyy');
|
|
24246
24258
|
}
|
|
24247
24259
|
}
|
|
@@ -35279,7 +35291,7 @@ var alluvial_Alluvial = /** @class */ (function (_super) {
|
|
|
35279
35291
|
links.forEach(function (element) { return _this.traverse(direction, element, visited); });
|
|
35280
35292
|
};
|
|
35281
35293
|
Alluvial.prototype.getRightArrowIcon = function () {
|
|
35282
|
-
return "\n\t\t<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"32\" height=\"32\" viewBox=\"0 0 32 32\">\n\t\t\t<polygon points=\"18 6 16.57 7.393 24.15 15 4 15 4 17 24.15 17 16.57 24.573 18 26 28 16 18 6\"/>\n\t\t\t<rect
|
|
35294
|
+
return "\n\t\t<svg xmlns=\"http://www.w3.org/2000/svg\" class=\"arrow-right\" width=\"32\" height=\"32\" viewBox=\"0 0 32 32\">\n\t\t\t<polygon points=\"18 6 16.57 7.393 24.15 15 4 15 4 17 24.15 17 16.57 24.573 18 26 28 16 18 6\"/>\n\t\t\t<rect width=\"32\" height=\"32\"/>\n\t\t</svg>";
|
|
35283
35295
|
};
|
|
35284
35296
|
// Remove event listeners
|
|
35285
35297
|
Alluvial.prototype.destroy = function () {
|
|
@@ -39754,11 +39766,18 @@ var toolbar_Toolbar = /** @class */ (function (_super) {
|
|
|
39754
39766
|
.classed('disabled', function (d) { return d.shouldBeDisabled(); })
|
|
39755
39767
|
.attr('aria-disabled', function (d) { return d.shouldBeDisabled(); })
|
|
39756
39768
|
.attr('aria-label', function (d) { return d.title; })
|
|
39757
|
-
.html(function (d) { return "\n\t\t\t<button\n\t\t\t\tclass=\"cds--overflow-menu__trigger cds--overflow-menu__trigger\"\n\t\t\t\taria-haspopup=\"true\" aria-expanded=\"false\" id=\"" + _this.services.domUtils.generateElementIDString("control-" + d.id) + "\" aria-label=\"" + d.title + "\">\n\t\t\t\t<svg focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\"
|
|
39758
|
-
? d.iconSVG.height
|
|
39759
|
-
: '20px') + "\" xmlns=\"http://www.w3.org/2000/svg\" class=\"cds--overflow-menu__icon cds--overflow-menu__icon\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t" + d.iconSVG.content + "\n\t\t\t\t</svg>\n\t\t\t</button>"; })
|
|
39769
|
+
.html(function (d) { return "\n\t\t\t<button\n\t\t\t\tclass=\"cds--overflow-menu__trigger cds--overflow-menu__trigger\"\n\t\t\t\taria-haspopup=\"true\" aria-expanded=\"false\" id=\"" + _this.services.domUtils.generateElementIDString("control-" + d.id) + "\" aria-label=\"" + d.title + "\">\n\t\t\t\t<svg focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\" xmlns=\"http://www.w3.org/2000/svg\" class=\"cds--overflow-menu__icon cds--overflow-menu__icon\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\n\t\t\t\t\t" + d.iconSVG.content + "\n\t\t\t\t</svg>\n\t\t\t</button>"; })
|
|
39760
39770
|
.each(function (d, index) {
|
|
39761
39771
|
var _this = this;
|
|
39772
|
+
src_select(this)
|
|
39773
|
+
.select('svg')
|
|
39774
|
+
.style('will-change', 'transform')
|
|
39775
|
+
.style('width', d.iconSVG.width !== undefined
|
|
39776
|
+
? d.iconSVG.width
|
|
39777
|
+
: '20px')
|
|
39778
|
+
.style('height', d.iconSVG.height !== undefined
|
|
39779
|
+
? d.iconSVG.height
|
|
39780
|
+
: '20px');
|
|
39762
39781
|
src_select(this)
|
|
39763
39782
|
.select('button')
|
|
39764
39783
|
.on('click', function (event) {
|