@carbon/charts-vue 0.54.14 → 0.56.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 +24 -0
- package/charts-vue.common.js +28 -13
- package/charts-vue.common.js.map +1 -1
- package/charts-vue.umd.js +28 -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,30 @@
|
|
|
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
|
+
# [0.56.0](https://github.com/carbon-design-system/carbon-charts/compare/v0.55.1...v0.56.0) (2022-03-28)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @carbon/charts-vue
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.55.1](https://github.com/carbon-design-system/carbon-charts/compare/v0.55.0...v0.55.1) (2022-03-14)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @carbon/charts-vue
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [0.55.0](https://github.com/carbon-design-system/carbon-charts/compare/v0.54.14...v0.55.0) (2022-03-14)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @carbon/charts-vue
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
6
30
|
## [0.54.14](https://github.com/carbon-design-system/carbon-charts/compare/v0.54.13...v0.54.14) (2022-03-14)
|
|
7
31
|
|
|
8
32
|
**Note:** Version bump only for package @carbon/charts-vue
|
package/charts-vue.common.js
CHANGED
|
@@ -8535,7 +8535,7 @@ var axisChart = tools_Tools.merge({}, chart, {
|
|
|
8535
8535
|
var baseBarChart = tools_Tools.merge({}, axisChart, {
|
|
8536
8536
|
bars: {
|
|
8537
8537
|
maxWidth: 16,
|
|
8538
|
-
spacingFactor: 0.25
|
|
8538
|
+
spacingFactor: 0.25,
|
|
8539
8539
|
},
|
|
8540
8540
|
timeScale: tools_Tools.merge(timeScale, {
|
|
8541
8541
|
addSpaceOnEdges: 1,
|
|
@@ -8828,6 +8828,7 @@ var alluvialChart = tools_Tools.merge({}, chart, {
|
|
|
8828
8828
|
data: tools_Tools.merge(chart.data, {
|
|
8829
8829
|
groupMapsTo: 'source',
|
|
8830
8830
|
}),
|
|
8831
|
+
nodeAlignment: Alignments.CENTER,
|
|
8831
8832
|
nodePadding: 24,
|
|
8832
8833
|
monochrome: false,
|
|
8833
8834
|
nodes: [],
|
|
@@ -20580,12 +20581,12 @@ var essentials_modal_Modal = /** @class */ (function (_super) {
|
|
|
20580
20581
|
var options = this.model.getOptions();
|
|
20581
20582
|
var chartprefix = tools_Tools.getProperty(options, 'style', 'prefix');
|
|
20582
20583
|
var tableArray = this.model.getTabularDataArray();
|
|
20583
|
-
return "\n\t\t<div class=\"bx--modal-container\">\n\t\t\t<div class=\"bx--modal-header\">\n\t\t\t\t<p class=\"bx--modal-header__label bx--type-delta\" id=\"modal-title\">Tabular representation</p>\n\t\t\t\t<p class=\"bx--modal-header__heading bx--type-beta\" id=\"modal-description\">" + options.title + "</p>\n\t\t\t\t<button class=\"bx--modal-close\" type=\"button\" data-modal-close aria-label=\"close modal\" data-modal-primary-focus>\n\t\t\t\t\t<svg focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"currentColor\" aria-label=\"Close\" width=\"20\" height=\"20\" viewBox=\"0 0 32 32\" role=\"img\" class=\"bx--modal-close__icon\">\n\t\t\t\t\t\t<path d=\"M24 9.4L22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16 24 9.4z\"></path>\n\t\t\t\t\t</svg>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t\t<div class=\"bx--modal-content\"
|
|
20584
|
-
.map(function (heading) { return "<th scope=\"col\">\n\t\t\t\t\t\t\t\t<div class=\"bx--table-header-label\">" + heading + "</div>\n\t\t\t\t\t\t\t</th>"; })
|
|
20585
|
-
.join('') + "\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tbody>" + tableArray
|
|
20584
|
+
return "\n\t\t<div class=\"bx--modal-container cds--modal-container\">\n\t\t\t<div class=\"bx--modal-header cds--modal-header\">\n\t\t\t\t<p class=\"bx--modal-header__label bx--type-delta cds--modal-header__label cds--type-delta\" id=\"modal-title\">Tabular representation</p>\n\n\t\t\t\t<p class=\"bx--modal-header__heading bx--type-beta cds--modal-header__heading cds--type-beta\" id=\"modal-description\">" + options.title + "</p>\n\n\t\t\t\t<button class=\"bx--modal-close cds--modal-close\" type=\"button\" data-modal-close aria-label=\"close modal\" data-modal-primary-focus>\n\t\t\t\t\t<svg focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"currentColor\" aria-label=\"Close\" width=\"20\" height=\"20\" viewBox=\"0 0 32 32\" role=\"img\" class=\"bx--modal-close__icon cds--modal-close__icon\">\n\t\t\t\t\t\t<path d=\"M24 9.4L22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16 24 9.4z\"></path>\n\t\t\t\t\t</svg>\n\t\t\t\t</button>\n\t\t\t</div>\n\n\t\t\t<div class=\"bx--modal-content cds--modal-content\">\n\t\t\t\t<table class=\"bx--data-table bx--data-table--no-border cds--data-table cds--data-table--no-border\">\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t" + lodash_es_get(tableArray, 0)
|
|
20585
|
+
.map(function (heading) { return "<th scope=\"col\">\n\t\t\t\t\t\t\t\t<div class=\"bx--table-header-label cds--table-header-label\">" + heading + "</div>\n\t\t\t\t\t\t\t</th>"; })
|
|
20586
|
+
.join('') + "\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\n\t\t\t\t\t<tbody>" + tableArray
|
|
20586
20587
|
.slice(1)
|
|
20587
20588
|
.map(function (row) { return "\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t" + row.map(function (column) { return "<td>" + column + "</td>"; }).join('') + "\n\t\t\t\t\t\t\t</tr>"; })
|
|
20588
|
-
.join('') + "\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t\t<div class=\"bx--modal-footer\">\n\t\t\t <div class=\"" + js_settings.prefix + "--" + chartprefix + "-modal-footer-spacer\"></div>\n\t\t\t <button class=\"bx--btn bx--btn--primary\" type=\"button\" data-modal-primary-focus>Download as CSV</button>\n\t\t\t</div>\n\t\t</div>";
|
|
20589
|
+
.join('') + "\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t</div>\n\n\t\t\t<div class=\"bx--modal-footer cds--modal-footer\">\n\t\t\t <div class=\"" + js_settings.prefix + "--" + chartprefix + "-modal-footer-spacer\"></div>\n\t\t\t <button class=\"bx--btn bx--btn--primary cds--btn cds--btn--primary\" type=\"button\" data-modal-primary-focus>Download as CSV</button>\n\t\t\t</div>\n\t\t</div>";
|
|
20589
20590
|
};
|
|
20590
20591
|
Modal.prototype.render = function () {
|
|
20591
20592
|
var options = this.model.getOptions();
|
|
@@ -20598,7 +20599,7 @@ var essentials_modal_Modal = /** @class */ (function (_super) {
|
|
|
20598
20599
|
this.isEventListenerAdded = true;
|
|
20599
20600
|
this.modal
|
|
20600
20601
|
.attr('data-modal', true)
|
|
20601
|
-
.attr('class', 'bx--modal')
|
|
20602
|
+
.attr('class', 'bx--modal cds--modal')
|
|
20602
20603
|
.attr('role', 'dialog')
|
|
20603
20604
|
.attr('aria-modal', true)
|
|
20604
20605
|
.attr('aria-labelledby', 'modal-title')
|
|
@@ -34713,11 +34714,21 @@ var alluvial_Alluvial = /** @class */ (function (_super) {
|
|
|
34713
34714
|
if (options.alluvial.nodePadding > alluvial.minNodePadding) {
|
|
34714
34715
|
nodePadding = options.alluvial.nodePadding;
|
|
34715
34716
|
}
|
|
34717
|
+
var alignment = tools_Tools.getProperty(options, 'alluvial', 'nodeAlignment');
|
|
34718
|
+
var nodeAlignment = justify;
|
|
34719
|
+
if (alignment === Alignments.LEFT) {
|
|
34720
|
+
nodeAlignment = align_left;
|
|
34721
|
+
}
|
|
34722
|
+
else if (alignment === Alignments.RIGHT) {
|
|
34723
|
+
nodeAlignment = align_right;
|
|
34724
|
+
}
|
|
34716
34725
|
var sankey = Sankey()
|
|
34717
34726
|
.nodeId(function (d) { return d.name; })
|
|
34718
34727
|
.nodeWidth(alluvial.nodeWidth)
|
|
34719
34728
|
// Distance nodes are apart from each other
|
|
34720
34729
|
.nodePadding(nodePadding)
|
|
34730
|
+
// Alignment of nodes within chart
|
|
34731
|
+
.nodeAlign(nodeAlignment)
|
|
34721
34732
|
// Size of the chart and its padding
|
|
34722
34733
|
// Chart starts at 2 and ends at width - 2 so the outer nodes can expand from center
|
|
34723
34734
|
// Chart starts from 30 so node categories can be displayed
|
|
@@ -39586,7 +39597,7 @@ var toolbar_Toolbar = /** @class */ (function (_super) {
|
|
|
39586
39597
|
if (!this.overflowMenu) {
|
|
39587
39598
|
this.overflowMenu = container
|
|
39588
39599
|
.append('div')
|
|
39589
|
-
.attr('class', 'bx--overflow-menu-options bx--overflow-menu--flip')
|
|
39600
|
+
.attr('class', 'bx--overflow-menu-options bx--overflow-menu--flip cds--overflow-menu-options cds--overflow-menu--flip')
|
|
39590
39601
|
.attr('tabindex', -1)
|
|
39591
39602
|
.attr('role', 'menu')
|
|
39592
39603
|
.html("<ul></ul>");
|
|
@@ -39604,7 +39615,7 @@ var toolbar_Toolbar = /** @class */ (function (_super) {
|
|
|
39604
39615
|
var enteringToolbarControls = toolbarControls
|
|
39605
39616
|
.enter()
|
|
39606
39617
|
.append('div')
|
|
39607
|
-
.attr('class', 'toolbar-control bx--overflow-menu')
|
|
39618
|
+
.attr('class', 'toolbar-control bx--overflow-menu cds--overflow-menu')
|
|
39608
39619
|
.attr('role', 'button');
|
|
39609
39620
|
var self_1 = this;
|
|
39610
39621
|
var allToolbarControls = enteringToolbarControls
|
|
@@ -39612,9 +39623,9 @@ var toolbar_Toolbar = /** @class */ (function (_super) {
|
|
|
39612
39623
|
.classed('disabled', function (d) { return d.shouldBeDisabled(); })
|
|
39613
39624
|
.attr('aria-disabled', function (d) { return d.shouldBeDisabled(); })
|
|
39614
39625
|
.attr('aria-label', function (d) { return d.title; })
|
|
39615
|
-
.html(function (d) { return "\n\t\t\t<button\n\t\t\t\tclass=\"bx--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\" style=\"will-change: transform; width: " + (d.iconSVG.width !== undefined ? d.iconSVG.width : '20px') + "; height: " + (d.iconSVG.height !== undefined
|
|
39626
|
+
.html(function (d) { return "\n\t\t\t<button\n\t\t\t\tclass=\"bx--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\" style=\"will-change: transform; width: " + (d.iconSVG.width !== undefined ? d.iconSVG.width : '20px') + "; height: " + (d.iconSVG.height !== undefined
|
|
39616
39627
|
? d.iconSVG.height
|
|
39617
|
-
: '20px') + "\" xmlns=\"http://www.w3.org/2000/svg\" class=\"bx--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>"; })
|
|
39628
|
+
: '20px') + "\" xmlns=\"http://www.w3.org/2000/svg\" class=\"bx--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>"; })
|
|
39618
39629
|
.each(function (d, index) {
|
|
39619
39630
|
var _this = this;
|
|
39620
39631
|
src_select(this)
|
|
@@ -39658,15 +39669,18 @@ var toolbar_Toolbar = /** @class */ (function (_super) {
|
|
|
39658
39669
|
.attr('id', function (d) {
|
|
39659
39670
|
return _this.services.domUtils.generateElementIDString("control-" + d.id);
|
|
39660
39671
|
})
|
|
39661
|
-
.attr('class', 'bx--overflow-menu-options__option')
|
|
39672
|
+
.attr('class', 'bx--overflow-menu-options__option cds--overflow-menu-options__option')
|
|
39662
39673
|
.attr('role', 'menuitem');
|
|
39663
39674
|
enteringOverflowMenuControls
|
|
39664
39675
|
.append('button')
|
|
39665
|
-
.attr('class', 'bx--overflow-menu-options__btn');
|
|
39676
|
+
.attr('class', 'bx--overflow-menu-options__btn cds--overflow-menu-options__btn');
|
|
39666
39677
|
enteringOverflowMenuControls
|
|
39667
39678
|
.merge(overflowMenuControls)
|
|
39668
39679
|
.classed('bx--overflow-menu-options__option--disabled', function (d) {
|
|
39669
39680
|
return d.shouldBeDisabled();
|
|
39681
|
+
})
|
|
39682
|
+
.classed('cds--overflow-menu-options__option--disabled', function (d) {
|
|
39683
|
+
return d.shouldBeDisabled();
|
|
39670
39684
|
})
|
|
39671
39685
|
.attr('aria-disabled', function (d) { return d.shouldBeDisabled(); })
|
|
39672
39686
|
.selectAll('button')
|
|
@@ -39684,7 +39698,8 @@ var toolbar_Toolbar = /** @class */ (function (_super) {
|
|
|
39684
39698
|
// update overflow button background
|
|
39685
39699
|
if (this.overflowButton) {
|
|
39686
39700
|
this.overflowButton.attr('aria-expanded', show);
|
|
39687
|
-
src_select(this.overflowButton.node().parentNode)
|
|
39701
|
+
src_select(this.overflowButton.node().parentNode)
|
|
39702
|
+
.classed('bx--overflow-menu--open', show).classed('cds--overflow-menu--open', show);
|
|
39688
39703
|
}
|
|
39689
39704
|
if (show) {
|
|
39690
39705
|
this.services.events.dispatchEvent(Events.Toolbar.SHOW_OVERFLOW_MENU);
|