@designsystem-se/af 35.4.1-beta.4 → 35.4.1-beta.6

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/hydrate/index.mjs CHANGED
@@ -35809,8 +35809,6 @@ class barChart {
35809
35809
  // Resizing chart while loading
35810
35810
  this.loadingResize = () => {
35811
35811
  const newHeight = this.setDims();
35812
- this.setMargins(true);
35813
- this.svg.attr('width', this.dims.width).attr('height', this.dims.height);
35814
35812
  this.barChartContainer.attr('transform', `translate(${this.margin.left + this.tickPadding + this.yTickSize},0)`);
35815
35813
  this.margin.right =
35816
35814
  this.getTextSize(this.xScale.domain()[1].toLocaleString()) / 2 +
@@ -35835,10 +35833,8 @@ class barChart {
35835
35833
  0,
35836
35834
  this.dims.width - this.margin.right - this.margin.left
35837
35835
  ]);
35838
- this.barSelection
35839
- .attr('x', this.xFunction)
35840
- .attr('width', this.widthFunction);
35841
35836
  this.setValueTicks();
35837
+ this.adjustBarSize();
35842
35838
  };
35843
35839
  this.highlightBarGroup = (_event, datum) => {
35844
35840
  if (typeof datum === 'string') {
@@ -35949,189 +35945,33 @@ class barChart {
35949
35945
  return 'barGroup' + key.replace(/[^A-Z0-9]+/gi, '');
35950
35946
  };
35951
35947
  this.updateBars = (fromLoading) => {
35952
- this.barChartContainer
35948
+ this.barSelection = this.barChartContainer.select('.interactiveElements')
35953
35949
  .selectAll('.barGroup')
35954
35950
  .data(this.mappedData)
35955
- .join((enter) => {
35956
- var _a, _b;
35957
- const tempSelection = enter
35958
- .append('g')
35959
- .attr('class', 'barGroup')
35960
- .attr('id', (d) => 'barGroup' + d.key.replace(/[^A-Z0-9]+/gi, ''));
35961
- tempSelection
35962
- .append('rect')
35963
- .attr('class', 'bar')
35964
- .style('cursor', 'pointer')
35965
- .attr('ry', 4)
35966
- .attr('rx', 4)
35967
- .attr('y', (d) => this.afVariation === BarChartVariation.Horizontal
35968
- ? this.yScale(d.key)
35969
- : this.dims.height - this.margin.bottom)
35970
- .attr('x', (d) => this.afVariation === BarChartVariation.Horizontal
35971
- ? 2
35972
- : this.xScale(d.key))
35973
- .attr('width', () => this.afVariation === BarChartVariation.Horizontal
35974
- ? 0
35975
- : this.xScale.bandwidth())
35976
- .attr('height', () => this.afVariation === BarChartVariation.Horizontal
35977
- ? this.yScale.bandwidth()
35978
- : 0)
35979
- .on('mouseenter', this.hover)
35980
- .on('mouseleave', this.hoverOut)
35981
- .on('click', this.openTooltip)
35982
- .transition()
35983
- .duration(this.defaultDuration)
35984
- .ease(polyInOut)
35985
- .attr('width', this.widthFunction)
35986
- .attr('y', this.yFunction)
35987
- .attr('height', this.heightFunction)
35988
- .attr('fill', '#00005a');
35989
- if (!((_b = (_a = this.chartData) === null || _a === void 0 ? void 0 : _a.meta) === null || _b === void 0 ? void 0 : _b.valueLabels))
35990
- return tempSelection;
35991
- tempSelection
35992
- .append('text')
35993
- .text((d) => d.value.toLocaleString())
35994
- .attr('class', 'barText')
35995
- .attr('font-size', this.fontSize)
35996
- .attr('font-weight', '600')
35997
- .attr('text-anchor', 'end')
35998
- .style('pointer-events', 'none')
35999
- .attr('y', (d) => this.afVariation === BarChartVariation.Horizontal
36000
- ? this.yScale(d.key) + this.yScale.bandwidth() / 2
36001
- : this.dims.height - this.margin.bottom)
36002
- .attr('x', (d) => this.afVariation === BarChartVariation.Horizontal
36003
- ? 2
36004
- : this.xScale(d.key) + this.xScale.bandwidth() / 2)
36005
- .transition()
36006
- .duration(this.defaultDuration)
36007
- .ease(polyInOut)
36008
- .attr('font-size', this.fontSize)
36009
- .attr('font-weight', '600')
36010
- .attr('x', (d) => this.afVariation === BarChartVariation.Horizontal
36011
- ? this.xScale(d.value)
36012
- : this.xScale(d.key) + this.xScale.bandwidth() / 2)
36013
- .attr('y', (d) => this.afVariation === BarChartVariation.Horizontal
36014
- ? this.yScale(d.key) + this.yScale.bandwidth() / 2
36015
- : this.yScale(d.value))
36016
- .attr('text-anchor', (d) => {
36017
- if (this.afVariation === BarChartVariation.Vertical)
36018
- return 'middle';
36019
- return this.xScale(d.value) < d.len + this.tickPadding * 2
36020
- ? 'start'
36021
- : 'end';
36022
- })
36023
- .attr('dx', (d) => {
36024
- if (this.afVariation === BarChartVariation.Horizontal)
36025
- return this.xScale(d.value) < d.len + this.tickPadding * 2
36026
- ? this.tickPadding
36027
- : -this.tickPadding;
36028
- return 0;
36029
- })
36030
- .attr('fill', (d) => {
36031
- if (this.afVariation === BarChartVariation.Vertical)
36032
- return 'black';
36033
- return this.xScale(d.value) < d.len + this.tickPadding * 2
36034
- ? 'black'
36035
- : 'white';
36036
- })
36037
- .attr('dy', () => this.afVariation == BarChartVariation.Horizontal
36038
- ? '0.35em'
36039
- : '-0.25em')
36040
- .style('pointer-events', 'none')
36041
- .attrTween('text', (d, i, nodelist) => {
36042
- const oldnum = parseFloat(nodelist[i].textContent.replace(/\s/g, ''))
36043
- ? parseFloat(nodelist[i].textContent.replace(/\s/g, ''))
36044
- : 0;
36045
- const interpolatedValue = interpolate$1(oldnum, d.value);
36046
- return (t) => (nodelist[i].textContent = parseInt(interpolatedValue(t)).toLocaleString(undefined, this.numberFormat));
36047
- });
36048
- return tempSelection;
36049
- }, (update) => {
36050
- // Update ids to bars
36051
- update.attr('id', (d) => 'barGroup' + d.key.replace(/[^A-Z0-9]+/gi, ''));
36052
- // Mouse interaction to updated loading bars
36053
- if (fromLoading) {
36054
- update
36055
- .select('rect')
36056
- .on('mouseenter', this.hover)
36057
- .on('mouseleave', this.hoverOut)
36058
- .on('click', this.openTooltip)
36059
- .attr('x', this.xFunction)
36060
- .attr('y', (d) => this.afVariation === BarChartVariation.Horizontal
36061
- ? this.yScale(d.key)
36062
- : this.dims.height - this.margin.bottom)
36063
- .attr('width', this.widthFunction)
36064
- .attr('height', () => this.afVariation === BarChartVariation.Horizontal
36065
- ? this.yScale.bandwidth()
36066
- : 0)
36067
- .attr('fill', '#00005a')
36068
- .transition()
36069
- .duration(this.defaultDuration)
36070
- .ease(polyInOut)
36071
- .attr('y', this.yFunction)
36072
- .attr('height', this.heightFunction)
36073
- .on('end', () => this.barChartObserver.observe(this.chartDiv)); // Reset barchartObserver
36074
- }
36075
- else {
36076
- update
36077
- .select('rect')
36078
- .transition()
36079
- .duration(this.defaultDuration)
36080
- .ease(polyInOut)
36081
- .attr('x', this.xFunction)
36082
- .attr('y', this.yFunction)
36083
- .attr('width', this.widthFunction)
36084
- .attr('height', this.heightFunction)
36085
- .attr('fill', '#00005a');
36086
- }
36087
- return update
36088
- .select('text')
36089
- .style('display', () => { var _a, _b; return ((_b = (_a = this.chartData) === null || _a === void 0 ? void 0 : _a.meta) === null || _b === void 0 ? void 0 : _b.valueLabels) ? null : 'none'; })
36090
- .transition()
36091
- .duration(this.defaultDuration)
36092
- .ease(polyInOut)
36093
- .attr('font-size', this.fontSize)
36094
- .attr('font-weight', '600')
36095
- .attr('y', (d) => this.afVariation === BarChartVariation.Horizontal
36096
- ? this.yScale(d.key) + this.yScale.bandwidth() / 2
36097
- : this.yScale(d.value))
36098
- .attr('x', (d) => this.afVariation === BarChartVariation.Horizontal
36099
- ? this.xScale(d.value)
36100
- : this.xScale(d.key) + this.xScale.bandwidth() / 2)
36101
- .attr('text-anchor', (d) => {
36102
- if (this.afVariation === BarChartVariation.Vertical)
36103
- return 'middle';
36104
- return this.xScale(d.value) < d.len + this.tickPadding * 2
36105
- ? 'start'
36106
- : 'end';
36107
- })
36108
- .attr('dx', (d) => {
36109
- if (this.afVariation === BarChartVariation.Horizontal)
36110
- return this.xScale(d.value) < d.len + this.tickPadding * 2
36111
- ? this.tickPadding
36112
- : -this.tickPadding;
36113
- return 0;
36114
- })
36115
- .attr('fill', (d) => {
36116
- if (this.afVariation === BarChartVariation.Vertical)
36117
- return 'black';
36118
- return this.xScale(d.value) < d.len + this.tickPadding * 2
36119
- ? 'black'
36120
- : 'white';
36121
- })
36122
- .attr('dy', () => this.afVariation == BarChartVariation.Horizontal
36123
- ? '0.35em'
36124
- : '-0.25em')
36125
- .style('pointer-events', 'none')
36126
- .attrTween('text', (d, i, nodelist) => {
36127
- const oldnum = parseFloat(nodelist[i].textContent.replace(/\s/g, ''))
36128
- ? parseFloat(nodelist[i].textContent.replace(/\s/g, ''))
36129
- : 0;
36130
- const interpolatedValue = interpolate$1(oldnum, d.value);
36131
- return (t) => (nodelist[i].textContent = parseInt(interpolatedValue(t)).toLocaleString(undefined, this.numberFormat));
36132
- });
36133
- }, (exit) => exit.remove());
36134
- this.barSelection = this.barChartContainer.selectAll('rect');
35951
+ .join('g')
35952
+ .attr('class', 'barGroup')
35953
+ .attr('id', (d) => this.barGroupID(d.key));
35954
+ this.barSelection.selectAll('.bar')
35955
+ .data((d) => {
35956
+ return d.series;
35957
+ })
35958
+ .join('rect')
35959
+ .attr('class', 'bar')
35960
+ .style('cursor', 'pointer')
35961
+ .attr('x', this.xFunction)
35962
+ .attr('y', this.yFunction)
35963
+ .attr('ry', 4)
35964
+ .attr('rx', 4)
35965
+ .attr('width', this.widthFunction)
35966
+ .attr('height', this.heightFunction)
35967
+ .attr('fill', (d) => this.colorFunction(d.serie))
35968
+ .on('mouseenter', this.hover)
35969
+ .on('mouseleave', this.hoverOut)
35970
+ .on('click', this.openTooltip);
35971
+ if (fromLoading) {
35972
+ this.initLegend();
35973
+ }
35974
+ this.barSelection = this.barChartContainer.selectAll('.barGroup');
36135
35975
  this.textSelection = this.barChartContainer.selectAll('.barText');
36136
35976
  };
36137
35977
  // Setting position of text according to bar size
@@ -36170,7 +36010,7 @@ class barChart {
36170
36010
  };
36171
36011
  this.reshapeData = () => {
36172
36012
  const toReturn = [];
36173
- if (this.loading || !this.chartData) {
36013
+ if (!this.chartData) {
36174
36014
  this.placeholderTicks.forEach((key) => {
36175
36015
  const tick = { key: key, series: [] };
36176
36016
  tick.series.push({
@@ -36545,11 +36385,11 @@ class barChart {
36545
36385
  .html((d) => {
36546
36386
  return `<span>${d.serie}: <b style="font-weight:600;">${d.value.toLocaleString(undefined, this.numberFormat)}</b></span>`;
36547
36387
  });
36548
- this.tooltip.style('visibility', 'visible');
36388
+ this.tooltip.style('display', null);
36549
36389
  this.positionTooltip(this.tooltipData);
36550
36390
  };
36551
36391
  this.closeTooltip = () => {
36552
- this.tooltip.style('visibility', 'hidden');
36392
+ this.tooltip.style('display', 'none');
36553
36393
  };
36554
36394
  // Positions tooltip in horizontal mode
36555
36395
  this.positionTooltip = (data) => {
@@ -36688,12 +36528,13 @@ class barChart {
36688
36528
  this.afChartData = undefined;
36689
36529
  }
36690
36530
  afChartDataUpdate(data) {
36691
- if (typeof data != 'string')
36692
- this.chartData = data;
36693
- else
36694
- this.chartData = JSON.parse(data);
36695
- if (this.chartData)
36531
+ if (typeof data === 'string' && Object.keys(JSON.parse(data)).length > 0 || Object.keys(data).length > 0) {
36532
+ if (typeof data != 'string')
36533
+ this.chartData = data;
36534
+ else
36535
+ this.chartData = JSON.parse(data);
36696
36536
  this.series = this.chartData.data.series.map(serie => serie.title);
36537
+ }
36697
36538
  this.mappedData = this.reshapeData();
36698
36539
  // checking for width of each tick
36699
36540
  this.mappedData.forEach((elem) => {
@@ -36784,7 +36625,7 @@ class barChart {
36784
36625
  // Getting handle for tooltip
36785
36626
  this.tooltip = select('#' + this.afId);
36786
36627
  this.tooltip.select('.tooltipClose').on('click', this.closeTooltip);
36787
- // Add heading placeholder for heading
36628
+ this.tooltip.selectAll('.tooltipHeading').remove();
36788
36629
  this.tooltip
36789
36630
  .select('.tooltipHead')
36790
36631
  .insert('h' + (parseInt(this.afHeadingLevel.replace(/\D/g, '')) + 1), ':first-child') // increment heading level by one
@@ -36792,7 +36633,7 @@ class barChart {
36792
36633
  .style('font-size', '1rem')
36793
36634
  .style('margin', '0 0.75rem 0.25rem 0 ')
36794
36635
  .style('font-weight', '500');
36795
- this.tooltip.style('visibility', 'hidden');
36636
+ this.tooltip.style('display', 'none');
36796
36637
  }
36797
36638
  initEmpty() {
36798
36639
  select(this.chartDiv).select('.chartSVG').remove();
@@ -36812,20 +36653,20 @@ class barChart {
36812
36653
  .attr('role', 'img')
36813
36654
  .attr('aria-label', this.chartData && this.chartData.title
36814
36655
  ? 'Stapeldiagram om ' + this.chartData.title.toLowerCase()
36815
- : 'Stapeldiagram');
36656
+ : 'Stapeldiagram').attr('style', 'display: flex;min-width: 0;width: 100%;height: auto;');
36816
36657
  // Hide unusable components
36817
36658
  select(this.titleDiv)
36818
- .select(this.afHeadingLevel)
36659
+ .append(this.afHeadingLevel)
36660
+ .attr('class', 'loadingHeader')
36819
36661
  .html(`${_t.loading}...`);
36820
36662
  this.initYAxis(true);
36821
36663
  this.initXAxis(true);
36822
36664
  this.tooltip = select('#' + this.afId);
36823
- this.tooltip.style('visibility', 'hidden');
36665
+ this.tooltip.style('display', 'none');
36824
36666
  this.loadingState(true);
36825
36667
  }
36826
36668
  loadingState(empty) {
36827
36669
  this.loading = true;
36828
- console.log('loading!');
36829
36670
  // close potentially open tooltip
36830
36671
  if (this.tooltip)
36831
36672
  this.closeTooltip();
@@ -36865,14 +36706,17 @@ class barChart {
36865
36706
  this.xAxisHandle.attr('transform', `translate(0,${this.dims.height - this.margin.bottom})`);
36866
36707
  }
36867
36708
  const animateBars = () => {
36868
- this.barChartContainer.selectAll('.barGroup').remove();
36709
+ this.barChartContainer.selectAll('.interactiveElements').remove();
36869
36710
  this.barSelection = this.barChartContainer
36711
+ .append('g')
36712
+ .attr('class', 'interactiveElements')
36713
+ .style('isolation', 'isolate')
36870
36714
  .selectAll('barGroup')
36871
36715
  .data(this.mappedData)
36872
36716
  .join('g')
36873
36717
  .attr('class', 'barGroup')
36874
- .attr('id', (d) => 'barGroup' + d.key.replace(/[^A-Z0-9]+/gi, ''));
36875
- this.barSelection.selectAll('.barGroup')
36718
+ .attr('id', (d) => this.barGroupID(d.key));
36719
+ this.barSelection.selectAll('bar')
36876
36720
  .data((d) => {
36877
36721
  return d.series;
36878
36722
  })
@@ -36894,7 +36738,7 @@ class barChart {
36894
36738
  .attr('y', this.yFunction)
36895
36739
  .attr('height', this.heightFunction);
36896
36740
  this.barChartContainer.selectAll('.bar')
36897
- .transition()
36741
+ .transition('animateBar')
36898
36742
  .duration(400)
36899
36743
  .ease(linear$1)
36900
36744
  .delay((...[, i]) => i * 150 + 400)
@@ -36909,8 +36753,8 @@ class barChart {
36909
36753
  };
36910
36754
  const flattenBars = () => {
36911
36755
  this.barChartContainer
36912
- .selectAll('rect')
36913
- .transition()
36756
+ .selectAll('.bar')
36757
+ .transition('animateBar')
36914
36758
  .duration(200)
36915
36759
  .ease(linear$1)
36916
36760
  .attr('y', (d) => this.afVariation === BarChartVariation.Horizontal
@@ -37146,10 +36990,11 @@ class barChart {
37146
36990
  ]);
37147
36991
  this.setNamedTicks(true);
37148
36992
  // Stop animation
37149
- this.barSelection.selectAll('.barGroup').on('end', null);
36993
+ this.barChartContainer.selectAll('.barGroup').on('end', null);
36994
+ select(this.titleDiv).select('.loadingHeader').remove();
37150
36995
  this.loading = false;
37151
- this.barSelection
37152
- .transition()
36996
+ this.barChartContainer.selectAll('.bar').interrupt('animateBar');
36997
+ this.barChartContainer.selectAll('.bar').transition()
37153
36998
  .duration(this.defaultDuration)
37154
36999
  .attr('y', (d) => this.afVariation === BarChartVariation.Horizontal
37155
37000
  ? this.yScale(d.key)
@@ -37219,7 +37064,7 @@ class barChart {
37219
37064
  this.averageLine();
37220
37065
  this.adjustBarSize();
37221
37066
  this.adjustBarText();
37222
- if (this.tooltip.style('visibility') !== 'hidden')
37067
+ if (this.tooltip.style('display') !== 'none')
37223
37068
  this.positionTooltip(this.tooltipData);
37224
37069
  }
37225
37070
  // Returns the longest text from an array of strings
@@ -37339,7 +37184,7 @@ class barChart {
37339
37184
  <span style="display:block;margin-top:0.25rem;font-size:0.875rem;color:var(--digi--global--color--neutral--grayscale--darkest-3)">${this.chartData.infoText}</span></p>`;
37340
37185
  }
37341
37186
  }
37342
- return (hAsync(Host, { key: '3b919d1bdd201ddf5e4e5e2955190ed34c5aced3', ref: (el) => (this.host = el) }, hAsync("svg", { key: '380b1d30cc3c7a71bf05fa4cdf4bb00def16b090', xmlns: "http://www.w3.org/2000/svg", width: "0", height: "0" }, hAsync("defs", { key: 'd39cde898124df9b34b994d0105fcc28e486a8f4' }, hAsync("pattern", { key: '20d0ffdfa0e5310cad77ec994bf963f600de7b69', id: "prognosis", patternUnits: "userSpaceOnUse", width: "8", height: "8", patternTransform: "rotate(45)" }, hAsync("line", { key: '17d98e16afa2c42146a22a441d3dd0922ae767f5', x1: "0", y: "0", x2: "0", y2: "12", stroke: this.evalColorVar(this.colorPalettes[0]), "stroke-width": "8" })), hAsync("pattern", { key: '3dfdebb12e5f2eba8b216acd4ff846e82615ed66', id: "prognosisInactive", patternUnits: "userSpaceOnUse", width: "8", height: "8", patternTransform: "rotate(45)" }, hAsync("line", { key: 'df76dde74f8e49e600f97b81c0c50e97147b9626', x1: "0", y: "0", x2: "0", y2: "12", stroke: this.evalColorVar('--digi--color--background--secondary-accent'), "stroke-width": "8" })), hAsync("pattern", { key: '1d7a87ca509e067288af063e406d98962639560c', id: "prognosisHighlight", patternUnits: "userSpaceOnUse", width: "8", height: "8", patternTransform: "rotate(45)" }, hAsync("line", { key: '1c9618f2b783704cc0ceab0c38d8b525b9fdc520', x1: "0", y: "0", x2: "0", y2: "12", stroke: this.adjustColor(this.colorFunction(0), 50), "stroke-width": "8" })))), hAsync("div", { key: '5217e3c1b3063bcb77fee7bebf631296ea95ab6b', class: "topWrapper", ref: (el) => (this.titleDiv = el) }, hAsync("digi-typography", { key: '904c16605d7947862bbf77b7f5dcbf581284ef97', class: "chartTitle", innerHTML: heading }), hAsync("digi-button", { key: 'e285bef2d76e214a5615d4cee157bde5061e472a', class: "buttonWrapper tableButton", "af-size": "medium", "af-variation": "function", "af-full-width": "false", onAfOnClick: this.activateTable, afAriaLabel: `Visa tabell ${((_b = this.chartData) === null || _b === void 0 ? void 0 : _b.title) ? (_c = this.chartData) === null || _c === void 0 ? void 0 : _c.title.toLowerCase() : ''}` }, hAsync("digi-icon-table", { key: '2b278678de6fc8feda2f02c494c6e0dc76d1b3bb', slot: "icon" }), "Visa tabell"), hAsync("digi-button", { key: '85aa9d581cdf8332b87eebb80df10e2e654ec81e', style: { display: 'none' }, class: "buttonWrapper chartButton", "af-size": "medium", "af-variation": "function", "af-full-width": "false", onAfOnClick: this.reInitChart, afAriaLabel: `Visa diagram ${((_d = this.chartData) === null || _d === void 0 ? void 0 : _d.title) ? (_e = this.chartData) === null || _e === void 0 ? void 0 : _e.title.toLowerCase() : ''}` }, hAsync("digi-icon-chart", { key: 'e4396b006704ebd6ffad155ebb4be3ae7abaf5d0', slot: "icon" }), "Visa diagram"), hAsync("div", { key: '6c8a51169075d49b9da6f0158042c06e5d38a6e2', class: "scChartStatus", role: "status", ref: (el) => (this.status = el) })), hAsync("div", { key: '8b0b7b63ba4f8b428f6d728d48cdc05ae791a605', class: "svgWrap", ref: (el) => (this.chartDiv = el) }, hAsync("div", { key: 'fadf084df0bfcd6f39831b92983091e6c0fefbd0', class: "chartTooltip", id: this.afId }, hAsync("div", { key: '3a0258527320c1719bffec8c221bc9884d77ee1f', class: "tooltipHead" }, hAsync("digi-icon-x", { key: 'b1013c82580116f7806b2bf31b08eea205a47db1', class: "tooltipClose" })), hAsync("div", { key: 'e98e704c7f03fe0e0c1a90a9088f2962b9661a5c', class: "tooltipBody" }), this.afVariation === BarChartVariation.Horizontal ? (hAsync("digi-icon-caret-up", { class: "caret" })) : (hAsync("digi-icon-caret-down", { class: "caret" })))), hAsync("div", { key: '56da797be96540039f52ae28a2bf250d46f47f12', class: "legendWrap", ref: (el) => (this.legendDiv = el) }, hAsync("div", { key: '3f3621240d161083d114df5d02a550d1f06613fa', class: "legend" })), hAsync("div", { key: '427754c0a4b58f1cb334e89960d60c4ef22284f4', class: "table", ref: (el) => (this.tableDiv = el) }, ' ')));
37187
+ return (hAsync(Host, { key: '2e011f2838668e9d58a6b4442e2832b6e1bac21b', ref: (el) => (this.host = el) }, hAsync("svg", { key: 'a91c7bc7ed311fd10f0014d382daf46d97524087', xmlns: "http://www.w3.org/2000/svg", width: "0", height: "0" }, hAsync("defs", { key: 'b28ad4ff2f0029eecd3a7b220d97ae81c646f6d0' }, hAsync("pattern", { key: '2bb838607089932d089c05fdb568e06782cd6ef6', id: "prognosis", patternUnits: "userSpaceOnUse", width: "8", height: "8", patternTransform: "rotate(45)" }, hAsync("line", { key: '4eca3d7dbb9cd2d47bc6367a8f07808ba3767902', x1: "0", y: "0", x2: "0", y2: "12", stroke: this.evalColorVar(this.colorPalettes[0]), "stroke-width": "8" })), hAsync("pattern", { key: '87585e674cc45c2496650eb5309f4eee34f89b3a', id: "prognosisInactive", patternUnits: "userSpaceOnUse", width: "8", height: "8", patternTransform: "rotate(45)" }, hAsync("line", { key: '42bfe1a59192f618e60486105e919b2569fef753', x1: "0", y: "0", x2: "0", y2: "12", stroke: this.evalColorVar('--digi--color--background--secondary-accent'), "stroke-width": "8" })), hAsync("pattern", { key: '2ab36682ad76783cda635db815fc9f5f542fab21', id: "prognosisHighlight", patternUnits: "userSpaceOnUse", width: "8", height: "8", patternTransform: "rotate(45)" }, hAsync("line", { key: 'd5b93bf96f259cdf093a3e61c38ef61bbfd565ba', x1: "0", y: "0", x2: "0", y2: "12", stroke: this.adjustColor(this.colorFunction(0), 50), "stroke-width": "8" })))), hAsync("div", { key: 'f94c18afa372d176500c2d3844212df29c83f16b', class: "topWrapper", ref: (el) => (this.titleDiv = el) }, hAsync("digi-typography", { key: '68dca23f7fd92f024f0b3d7eebc7b7214e636090', class: "chartTitle", innerHTML: heading }), hAsync("digi-button", { key: '98d6ade579584a998a1d3e246168f42b19bd277f', class: "buttonWrapper tableButton", "af-size": "medium", "af-variation": "function", "af-full-width": "false", onAfOnClick: this.activateTable, afAriaLabel: `Visa tabell ${((_b = this.chartData) === null || _b === void 0 ? void 0 : _b.title) ? (_c = this.chartData) === null || _c === void 0 ? void 0 : _c.title.toLowerCase() : ''}` }, hAsync("digi-icon-table", { key: '36d1e6f12b90215ba6ce00b814573616772820e7', slot: "icon" }), "Visa tabell"), hAsync("digi-button", { key: 'c94200814deba4524301e7f2c07ad57e94b6381d', style: { display: 'none' }, class: "buttonWrapper chartButton", "af-size": "medium", "af-variation": "function", "af-full-width": "false", onAfOnClick: this.reInitChart, afAriaLabel: `Visa diagram ${((_d = this.chartData) === null || _d === void 0 ? void 0 : _d.title) ? (_e = this.chartData) === null || _e === void 0 ? void 0 : _e.title.toLowerCase() : ''}` }, hAsync("digi-icon-chart", { key: 'ba94cf5a4ad7e4272d78f1965cd63eee99eb9f8f', slot: "icon" }), "Visa diagram"), hAsync("div", { key: 'be79a632683428a30d01a96bf41f1e446b019061', class: "scChartStatus", role: "status", ref: (el) => (this.status = el) })), hAsync("div", { key: 'd3644914ab02ae8cb8a054a1d4c90dc854fdaede', class: "svgWrap", ref: (el) => (this.chartDiv = el) }, hAsync("div", { key: '6cb1113d71b8cd9ec156d351dc4ea402cdf3f372', class: "chartTooltip", id: this.afId }, hAsync("div", { key: '0c601e94970dd3563bec5bfe070a3e02fd339124', class: "tooltipHead" }, hAsync("digi-icon-x", { key: 'a478d1013f6630767b03029f4491222bc35dc118', class: "tooltipClose" })), hAsync("div", { key: '04de1b3898023ef79ec8c69e501d107d8039351d', class: "tooltipBody" }), this.afVariation === BarChartVariation.Horizontal ? (hAsync("digi-icon-caret-up", { class: "caret" })) : (hAsync("digi-icon-caret-down", { class: "caret" })))), hAsync("div", { key: '335550b9c1d64cadc9d72b14af008a2cffcfe58e', class: "legendWrap", ref: (el) => (this.legendDiv = el) }, hAsync("div", { key: '1bd30ebd1a5c1c6342f102f7adc131c6f85bc8d8', class: "legend" })), hAsync("div", { key: '69ddb91b0befa23212d518c27ed018f8c8912c06', class: "table", ref: (el) => (this.tableDiv = el) }, ' ')));
37343
37188
  }
37344
37189
  get hostElement() { return getElement(this); }
37345
37190
  static get watchers() { return {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@designsystem-se/af",
3
3
  "author": "Arbetsförmedlingen",
4
- "version": "35.4.1-beta.4",
4
+ "version": "35.4.1-beta.6",
5
5
  "description": "Web Components for Digi Designsystem",
6
6
  "license": "Apache-2.0",
7
7
  "main": "./dist/index.cjs.js",