@designsystem-se/af 38.0.1-beta.0 → 38.0.1-beta.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/components/digi-bar-chart.js +170 -70
- package/components/digi-calendar-datepicker.js +6 -5
- package/components/digi-chart-line.js +12 -8
- package/components/digi-code-block.js +1 -1
- package/components/digi-code-example.js +2 -2
- package/components/digi-dialog.js +1 -0
- package/components/digi-footer.js +1 -0
- package/components/digi-form-checkbox.js +1 -1
- package/components/digi-form-error-list.js +3 -4
- package/components/digi-form-filter.js +1 -1
- package/components/digi-form-radiobutton.js +1 -1
- package/components/digi-form-receipt.js +1 -0
- package/components/digi-form-select-filter.js +1 -0
- package/components/digi-header-navigation.js +1 -0
- package/components/digi-header.js +1 -0
- package/components/digi-navigation-pagination.js +1 -0
- package/components/digi-notification-alert.js +1 -1
- package/components/digi-notification-error-page.js +1 -0
- package/components/digi-progress-circle.js +1 -6
- package/components/digi-tablist.js +5 -5
- package/components/digi-tag.js +1 -1
- package/components/digi-title-logo.js +1 -0
- package/components/digi-tools-feedback.js +1 -0
- package/components/index.js +1 -0
- package/components/{p-57a1c472.js → p-13c09880.js} +2 -2
- package/components/{p-4d2d082d.js → p-75c8d67e.js} +1 -0
- package/components/{p-b24c2842.js → p-77d8d575.js} +2 -2
- package/components/{p-195ca01d.js → p-bc5b7057.js} +1 -0
- package/components/p-be4fd246.js +7 -0
- package/dist/cjs/digi-arbetsformedlingen.cjs.js +1 -1
- package/dist/cjs/digi-bar-chart.cjs.entry.js +170 -70
- package/dist/cjs/digi-button_27.cjs.entry.js +1 -0
- package/dist/cjs/digi-calendar-datepicker.cjs.entry.js +6 -5
- package/dist/cjs/digi-chart-line.cjs.entry.js +12 -8
- package/dist/cjs/digi-code-block_3.cjs.entry.js +3 -2
- package/dist/cjs/digi-dialog.cjs.entry.js +1 -0
- package/dist/cjs/digi-form-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/digi-form-error-list.cjs.entry.js +2 -2
- package/dist/cjs/digi-form-receipt.cjs.entry.js +1 -0
- package/dist/cjs/digi-form-select-filter.cjs.entry.js +1 -0
- package/dist/cjs/digi-navigation-pagination.cjs.entry.js +1 -0
- package/dist/cjs/digi-notification-alert.cjs.entry.js +1 -0
- package/dist/cjs/digi-notification-error-page.cjs.entry.js +1 -0
- package/dist/cjs/digi-progress-circle.cjs.entry.js +4 -9
- package/dist/cjs/digi-tablist.cjs.entry.js +5 -5
- package/dist/cjs/digi-tag.cjs.entry.js +1 -1
- package/dist/cjs/digi-tools-feedback.cjs.entry.js +1 -0
- package/dist/cjs/index.cjs.js +7 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/progress-circle-role.enum-b7fdcf0c.js +7 -0
- package/dist/collection/components/_calendar/calendar-datepicker/calendar-datepicker.js +5 -5
- package/dist/collection/components/_chart/bar-chart/bar-chart.js +171 -70
- package/dist/collection/components/_chart/chart-line/chart-line.js +12 -8
- package/dist/collection/components/_form/form-checkbox/form-checkbox.js +2 -2
- package/dist/collection/components/_form/form-error-list/form-error-list.js +1 -7
- package/dist/collection/components/_form/form-radiobutton/form-radiobutton.js +2 -2
- package/dist/collection/components/_navigation/navigation-tablist/navigation-tablist.js +5 -5
- package/dist/collection/components/_tag/tag/tag.js +1 -1
- package/dist/collection/enums.js +7 -0
- package/dist/digi-arbetsformedlingen/design-tokens/components/_logo.variables.scss +0 -2
- package/dist/digi-arbetsformedlingen/digi-arbetsformedlingen.esm.js +1 -1
- package/dist/digi-arbetsformedlingen/index.esm.js +1 -1
- package/dist/digi-arbetsformedlingen/{p-60738889.entry.js → p-01874a31.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-18880083.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/{p-d71c33d8.entry.js → p-37c0ea9e.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-39468f49.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-501f9b16.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/{p-d670e0e0.entry.js → p-54d5aa93.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-59073668.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-8833044b.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-97f66789.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-9dae073c.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-a186888d.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-be4fd246.js +1 -0
- package/dist/digi-arbetsformedlingen/{p-0a6d26f7.entry.js → p-cea5ef63.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/{p-67ba87db.entry.js → p-d3e14568.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-ddd659bf.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-e5bd5a7e.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-ef689144.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-f0a405ca.entry.js +1 -0
- package/dist/esm/digi-arbetsformedlingen.js +1 -1
- package/dist/esm/digi-bar-chart.entry.js +170 -70
- package/dist/esm/digi-button_27.entry.js +1 -0
- package/dist/esm/digi-calendar-datepicker.entry.js +6 -5
- package/dist/esm/digi-chart-line.entry.js +12 -8
- package/dist/esm/digi-code-block_3.entry.js +3 -2
- package/dist/esm/digi-dialog.entry.js +1 -0
- package/dist/esm/digi-form-checkbox.entry.js +2 -2
- package/dist/esm/digi-form-error-list.entry.js +2 -2
- package/dist/esm/digi-form-receipt.entry.js +1 -0
- package/dist/esm/digi-form-select-filter.entry.js +1 -0
- package/dist/esm/digi-navigation-pagination.entry.js +1 -0
- package/dist/esm/digi-notification-alert.entry.js +1 -0
- package/dist/esm/digi-notification-error-page.entry.js +1 -0
- package/dist/esm/digi-progress-circle.entry.js +1 -6
- package/dist/esm/digi-tablist.entry.js +5 -5
- package/dist/esm/digi-tag.entry.js +1 -1
- package/dist/esm/digi-tools-feedback.entry.js +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/progress-circle-role.enum-7737a2c6.js +7 -0
- package/dist/types/components/_calendar/calendar-datepicker/calendar-datepicker.d.ts +2 -2
- package/dist/types/components/_form/form-error-list/form-error-list.d.ts +0 -1
- package/dist/types/enums.d.ts +7 -0
- package/hydrate/index.js +204 -102
- package/hydrate/index.mjs +204 -102
- package/package.json +1 -1
- package/dist/digi-arbetsformedlingen/p-20693fa2.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-3566b732.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-3cda17e1.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-4d84c470.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-50b32151.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-54b6eb3f.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-5ad6d46d.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-6324c9bf.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-9062da9b.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-9a456d55.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-a26333e9.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-e347aae8.entry.js +0 -1
|
@@ -114,7 +114,13 @@ const barChart = class {
|
|
|
114
114
|
this.defaultDuration = 400;
|
|
115
115
|
// Text and formats
|
|
116
116
|
this.fontSize = '0.875rem';
|
|
117
|
-
this.colorPalettes = [
|
|
117
|
+
this.colorPalettes = [
|
|
118
|
+
'--digi--color--background--brand-primary',
|
|
119
|
+
'--digi--color--infographic--brand--primary',
|
|
120
|
+
'--digi--color--background--sentiment--beta--primary',
|
|
121
|
+
'--digi--color--text--interactive--visited',
|
|
122
|
+
'--digi--color--icon--validation--error'
|
|
123
|
+
];
|
|
118
124
|
// Observer for watching size changes when in line chart mode
|
|
119
125
|
this.barChartObserver = new ResizeObserver((entries) => {
|
|
120
126
|
entries.forEach(() => {
|
|
@@ -124,7 +130,8 @@ const barChart = class {
|
|
|
124
130
|
});
|
|
125
131
|
});
|
|
126
132
|
this.highlightBars = (serie) => {
|
|
127
|
-
this.barChartContainer
|
|
133
|
+
this.barChartContainer
|
|
134
|
+
.selectAll('.bar')
|
|
128
135
|
.attr('fill', (barData) => this.colorFunction(barData.serie))
|
|
129
136
|
.transition('color')
|
|
130
137
|
.duration(150)
|
|
@@ -133,47 +140,78 @@ const barChart = class {
|
|
|
133
140
|
if (barData.serie === serie)
|
|
134
141
|
return this.colorFunction(barData.serie);
|
|
135
142
|
else {
|
|
136
|
-
if (((_a = this.chartData.meta) === null || _a === void 0 ? void 0 : _a.prognosisPattern) &&
|
|
143
|
+
if (((_a = this.chartData.meta) === null || _a === void 0 ? void 0 : _a.prognosisPattern) &&
|
|
144
|
+
this.series.indexOf(barData.serie) > 0) {
|
|
137
145
|
return 'url(#prognosisInactive)';
|
|
138
146
|
}
|
|
139
147
|
return this.evalColorVar('--digi--color--background--secondary-accent');
|
|
140
148
|
}
|
|
141
149
|
});
|
|
142
|
-
select(this.legendDiv)
|
|
150
|
+
select(this.legendDiv)
|
|
151
|
+
.selectAll('.legendChip')
|
|
152
|
+
.transition('colorLegend')
|
|
153
|
+
.duration(150)
|
|
154
|
+
.style('opacity', (title) => (title === serie ? 1 : 0.25));
|
|
143
155
|
};
|
|
144
156
|
this.resetBarColor = () => {
|
|
145
|
-
this.barChartContainer
|
|
146
|
-
|
|
157
|
+
this.barChartContainer
|
|
158
|
+
.selectAll('.bar')
|
|
159
|
+
.transition('color')
|
|
160
|
+
.duration(150)
|
|
161
|
+
.attr('fill', (barData) => this.colorFunction(barData.serie));
|
|
162
|
+
select(this.legendDiv)
|
|
163
|
+
.selectAll('.legendChip')
|
|
164
|
+
.transition('colorLegend')
|
|
165
|
+
.duration(150)
|
|
166
|
+
.style('opacity', 1);
|
|
147
167
|
if (this.chartData.data.averageLine) {
|
|
148
|
-
this.barChartContainer
|
|
168
|
+
this.barChartContainer
|
|
169
|
+
.selectAll('.averageLine')
|
|
170
|
+
.transition('avgLine')
|
|
171
|
+
.style('mix-blend-mode', 'plus-lighter')
|
|
149
172
|
.style('filter', 'contrast(0.5)');
|
|
150
173
|
/* this.barChartContainer.selectAll('.averageLineText').transition('avgLine').style('mix-blend-mode', 'plus-lighter')
|
|
151
174
|
.style('filter', 'contrast(0.5)'); */
|
|
152
175
|
}
|
|
153
176
|
};
|
|
154
177
|
this.highlightAverageLine = (serie) => {
|
|
155
|
-
this.barChartContainer
|
|
178
|
+
this.barChartContainer
|
|
179
|
+
.selectAll('.bar')
|
|
156
180
|
.transition('color')
|
|
157
181
|
.duration(150)
|
|
158
182
|
.attr('fill', (barData) => {
|
|
159
183
|
var _a;
|
|
160
|
-
if (((_a = this.chartData.meta) === null || _a === void 0 ? void 0 : _a.prognosisPattern) &&
|
|
184
|
+
if (((_a = this.chartData.meta) === null || _a === void 0 ? void 0 : _a.prognosisPattern) &&
|
|
185
|
+
this.series.indexOf(barData.serie) > 0) {
|
|
161
186
|
return 'url(#prognosisInactive)';
|
|
162
187
|
}
|
|
163
188
|
else
|
|
164
189
|
return this.evalColorVar('--digi--color--background--secondary-accent');
|
|
165
190
|
});
|
|
166
|
-
this.barChartContainer
|
|
167
|
-
.
|
|
191
|
+
this.barChartContainer
|
|
192
|
+
.selectAll('.averageLine')
|
|
193
|
+
.transition('avgLine')
|
|
194
|
+
.duration(150)
|
|
195
|
+
.style('mix-blend-mode', null)
|
|
196
|
+
.style('filter', null);
|
|
168
197
|
/* this.barChartContainer.selectAll('.averageLineText').transition('avgLineText')
|
|
169
198
|
.duration(150).style('mix-blend-mode', null).style('filter', null) */
|
|
170
|
-
select(this.legendDiv)
|
|
199
|
+
select(this.legendDiv)
|
|
200
|
+
.selectAll('.legendChip')
|
|
201
|
+
.transition('colorLegend')
|
|
202
|
+
.duration(150)
|
|
203
|
+
.style('opacity', (title) => (title === serie ? 1 : 0.25));
|
|
171
204
|
};
|
|
172
205
|
// Sets and resizespositions the average line
|
|
173
206
|
this.averageLine = () => {
|
|
174
207
|
if (!this.chartData.data.averageLine)
|
|
175
208
|
return;
|
|
176
|
-
const avLineGroup = this.barChartContainer
|
|
209
|
+
const avLineGroup = this.barChartContainer
|
|
210
|
+
.select('.interactiveElements')
|
|
211
|
+
.selectAll('.averageLineGroup')
|
|
212
|
+
.data([this.chartData.data.averageLine])
|
|
213
|
+
.join('g')
|
|
214
|
+
.attr('class', 'averageLineGroup');
|
|
177
215
|
/* avLineGroup.selectAll('.averageLineText')
|
|
178
216
|
.data(d => [d])
|
|
179
217
|
.join('text')
|
|
@@ -186,8 +224,9 @@ const barChart = class {
|
|
|
186
224
|
.attr('fill', 'var(--digi--color--infographic--lineart)')
|
|
187
225
|
.style('mix-blend-mode', 'plus-lighter')
|
|
188
226
|
.style('filter', 'contrast(0.5)'); */
|
|
189
|
-
avLineGroup
|
|
190
|
-
.
|
|
227
|
+
avLineGroup
|
|
228
|
+
.selectAll('.averageLine')
|
|
229
|
+
.data((d) => [d.value])
|
|
191
230
|
.join('line')
|
|
192
231
|
.attr('class', 'averageLine')
|
|
193
232
|
.attr('x1', this.xScale.range()[0])
|
|
@@ -235,11 +274,15 @@ const barChart = class {
|
|
|
235
274
|
this.highlightBarGroup = (_event, datum) => {
|
|
236
275
|
if (typeof datum === 'string') {
|
|
237
276
|
const barGroupID = '#' + this.barGroupID(datum);
|
|
238
|
-
this.barChartContainer
|
|
277
|
+
this.barChartContainer
|
|
278
|
+
.select(barGroupID)
|
|
279
|
+
.selectAll('.bar')
|
|
280
|
+
.transition('color')
|
|
239
281
|
.duration(20)
|
|
240
282
|
.attr('fill', (d) => {
|
|
241
283
|
var _a;
|
|
242
|
-
if (((_a = this.chartData.meta) === null || _a === void 0 ? void 0 : _a.prognosisPattern) &&
|
|
284
|
+
if (((_a = this.chartData.meta) === null || _a === void 0 ? void 0 : _a.prognosisPattern) &&
|
|
285
|
+
this.series.indexOf(d.serie) > 0) {
|
|
243
286
|
return 'url(#prognosisHighlight)';
|
|
244
287
|
}
|
|
245
288
|
else
|
|
@@ -248,7 +291,9 @@ const barChart = class {
|
|
|
248
291
|
}
|
|
249
292
|
};
|
|
250
293
|
this.unHighlightBarGroup = () => {
|
|
251
|
-
this.barSelection
|
|
294
|
+
this.barSelection
|
|
295
|
+
.selectAll('.bar')
|
|
296
|
+
.transition('color')
|
|
252
297
|
.duration(100)
|
|
253
298
|
.attr('fill', (d) => {
|
|
254
299
|
return this.colorFunction(d.serie);
|
|
@@ -341,13 +386,15 @@ const barChart = class {
|
|
|
341
386
|
return 'barGroup' + key.replace(/[^A-Z0-9]+/gi, '');
|
|
342
387
|
};
|
|
343
388
|
this.updateBars = () => {
|
|
344
|
-
this.barSelection = this.barChartContainer
|
|
389
|
+
this.barSelection = this.barChartContainer
|
|
390
|
+
.select('.interactiveElements')
|
|
345
391
|
.selectAll('.barGroup')
|
|
346
392
|
.data(this.mappedData)
|
|
347
393
|
.join('g')
|
|
348
394
|
.attr('class', 'barGroup')
|
|
349
395
|
.attr('id', (d) => this.barGroupID(d.key));
|
|
350
|
-
this.barSelection
|
|
396
|
+
this.barSelection
|
|
397
|
+
.selectAll('.bar')
|
|
351
398
|
.data((d) => {
|
|
352
399
|
return d.series;
|
|
353
400
|
})
|
|
@@ -426,7 +473,9 @@ const barChart = class {
|
|
|
426
473
|
key: key,
|
|
427
474
|
serie: serie.title,
|
|
428
475
|
value: serie.yValues[index],
|
|
429
|
-
len: serie.yValues[index]
|
|
476
|
+
len: serie.yValues[index]
|
|
477
|
+
? this.getTextSize(serie.yValues[index].toLocaleString())
|
|
478
|
+
: 0
|
|
430
479
|
});
|
|
431
480
|
}
|
|
432
481
|
});
|
|
@@ -442,7 +491,9 @@ const barChart = class {
|
|
|
442
491
|
key: key.toString(),
|
|
443
492
|
serie: serie.title,
|
|
444
493
|
value: serie.yValues[index],
|
|
445
|
-
len: serie.yValues[index]
|
|
494
|
+
len: serie.yValues[index]
|
|
495
|
+
? this.getTextSize(serie.yValues[index].toLocaleString())
|
|
496
|
+
: 0
|
|
446
497
|
});
|
|
447
498
|
}
|
|
448
499
|
});
|
|
@@ -453,7 +504,8 @@ const barChart = class {
|
|
|
453
504
|
return toReturn;
|
|
454
505
|
};
|
|
455
506
|
this.adjustBarSize = () => {
|
|
456
|
-
this.barSelection
|
|
507
|
+
this.barSelection
|
|
508
|
+
.selectAll('.bar')
|
|
457
509
|
.attr('x', this.xFunction)
|
|
458
510
|
.attr('y', this.yFunction)
|
|
459
511
|
.attr('width', this.widthFunction)
|
|
@@ -468,30 +520,38 @@ const barChart = class {
|
|
|
468
520
|
// Handling x positioning of bars
|
|
469
521
|
this.xFunction = (d, i) => {
|
|
470
522
|
return this.afVariation === BarChartVariation.Horizontal
|
|
471
|
-
?
|
|
472
|
-
|
|
523
|
+
? d.value > 0
|
|
524
|
+
? this.xScale(0)
|
|
525
|
+
: this.xScale(d.value)
|
|
526
|
+
: this.xScale(d.key) +
|
|
527
|
+
((this.xScale.bandwidth() / this.dataWidth) * i + this.barGap * i);
|
|
473
528
|
};
|
|
474
529
|
// Handling y positioning of bars
|
|
475
530
|
this.yFunction = (d, i) => {
|
|
476
531
|
if (!d.value)
|
|
477
532
|
return 0;
|
|
478
533
|
return this.afVariation === BarChartVariation.Horizontal
|
|
479
|
-
? this.yScale(d.key) +
|
|
480
|
-
|
|
534
|
+
? this.yScale(d.key) +
|
|
535
|
+
((this.yScale.bandwidth() / this.dataWidth) * i + this.barGap * i)
|
|
536
|
+
: d.value < 0
|
|
537
|
+
? this.yScale(0)
|
|
538
|
+
: this.yScale(d.value);
|
|
481
539
|
};
|
|
482
540
|
// Handling height for bars
|
|
483
541
|
this.heightFunction = (d) => {
|
|
484
542
|
if (!d.value)
|
|
485
543
|
return 0;
|
|
486
544
|
return this.afVariation === BarChartVariation.Horizontal
|
|
487
|
-
? this.yScale.bandwidth() / this.dataWidth -
|
|
488
|
-
:
|
|
545
|
+
? this.yScale.bandwidth() / this.dataWidth - this.barGap
|
|
546
|
+
: d.value < 0
|
|
547
|
+
? this.yScale(d.value) - this.yScale(0)
|
|
548
|
+
: this.yScale(0) - this.yScale(d.value);
|
|
489
549
|
};
|
|
490
550
|
// Handling width for bars
|
|
491
551
|
this.widthFunction = (d) => {
|
|
492
552
|
return this.afVariation === BarChartVariation.Horizontal
|
|
493
553
|
? Math.abs(this.xScale(0) - this.xScale(d.value))
|
|
494
|
-
: this.xScale.bandwidth() / this.dataWidth -
|
|
554
|
+
: this.xScale.bandwidth() / this.dataWidth - this.barGap;
|
|
495
555
|
};
|
|
496
556
|
// Setting dimension variable
|
|
497
557
|
this.setDims = (onlyHeight = false) => {
|
|
@@ -734,7 +794,8 @@ const barChart = class {
|
|
|
734
794
|
.attr('fill', (d) => {
|
|
735
795
|
var _a;
|
|
736
796
|
if (event.target.tagName === 'rect') {
|
|
737
|
-
if (((_a = this.chartData.meta) === null || _a === void 0 ? void 0 : _a.prognosisPattern) &&
|
|
797
|
+
if (((_a = this.chartData.meta) === null || _a === void 0 ? void 0 : _a.prognosisPattern) &&
|
|
798
|
+
this.series.indexOf(d.serie) > 0) {
|
|
738
799
|
return 'url(#prognosisHighlight)';
|
|
739
800
|
}
|
|
740
801
|
else
|
|
@@ -750,7 +811,9 @@ const barChart = class {
|
|
|
750
811
|
select(event.target)
|
|
751
812
|
.transition('color')
|
|
752
813
|
.duration(this.defaultDuration)
|
|
753
|
-
.attr('fill', (d) => event.target.tagName === 'rect'
|
|
814
|
+
.attr('fill', (d) => event.target.tagName === 'rect'
|
|
815
|
+
? this.colorFunction(d.serie)
|
|
816
|
+
: '#333333');
|
|
754
817
|
};
|
|
755
818
|
this.openTooltip = (...[, d]) => {
|
|
756
819
|
// If type is string, the user has clicked on a y-axis tick
|
|
@@ -762,9 +825,7 @@ const barChart = class {
|
|
|
762
825
|
else
|
|
763
826
|
this.tooltipData = d;
|
|
764
827
|
const tooltipBody = this.tooltip.select('.tooltipBody');
|
|
765
|
-
this.tooltip
|
|
766
|
-
.select('.tooltipHeading')
|
|
767
|
-
.html(this.tooltipData.key);
|
|
828
|
+
this.tooltip.select('.tooltipHeading').html(this.tooltipData.key);
|
|
768
829
|
tooltipBody
|
|
769
830
|
.selectAll('div')
|
|
770
831
|
.data(this.tooltipData.series ? this.tooltipData.series : [this.tooltipData])
|
|
@@ -803,15 +864,25 @@ const barChart = class {
|
|
|
803
864
|
.style('transform', `translate(${diff > 0 ? width / 2 - 10 : this.xScale(data.value) / 2}px,0)`);
|
|
804
865
|
}
|
|
805
866
|
else {
|
|
806
|
-
const index = (_a = this.mappedData
|
|
807
|
-
|
|
867
|
+
const index = (_a = this.mappedData
|
|
868
|
+
.find((xPoint) => xPoint.key === data.key)) === null || _a === void 0 ? void 0 : _a.series.findIndex((serie) => serie.serie === data.serie);
|
|
869
|
+
const barIndex = (this.xScale.bandwidth() / this.dataWidth) * (index ? index + 1 : 1) -
|
|
870
|
+
this.xScale.bandwidth() / this.dataWidth / 2;
|
|
808
871
|
// This should be where the x-axis starts
|
|
809
872
|
const xStart = this.margin.left + this.tickPadding + this.yTickSize;
|
|
810
873
|
// Creating adjustment for tooltip to not appear outside of chart
|
|
811
874
|
const spaceToSVGEdge = 5;
|
|
812
|
-
const inlineAdjustment =
|
|
813
|
-
|
|
814
|
-
|
|
875
|
+
const inlineAdjustment = this.dims.width - spaceToSVGEdge <
|
|
876
|
+
this.xScale(data.key) + xStart + barIndex + width / 2
|
|
877
|
+
? ((this.xScale(data.key) +
|
|
878
|
+
xStart +
|
|
879
|
+
barIndex +
|
|
880
|
+
width / 2 -
|
|
881
|
+
(this.dims.width - spaceToSVGEdge)) /
|
|
882
|
+
width) *
|
|
883
|
+
100
|
|
884
|
+
: 0;
|
|
885
|
+
this.tooltip.style('transform', `translate( calc(${this.xScale(data.key) + xStart + barIndex}px - ${50 + inlineAdjustment}%), calc(-100% + ${(data.value > 0 ? this.yScale(data.value) : this.yScale(0)) - 2}px) )`);
|
|
815
886
|
this.tooltip
|
|
816
887
|
.select('digi-icon-caret-down')
|
|
817
888
|
.style('position', 'absolute')
|
|
@@ -821,8 +892,7 @@ const barChart = class {
|
|
|
821
892
|
}
|
|
822
893
|
else {
|
|
823
894
|
if (this.afVariation === BarChartVariation.Horizontal) {
|
|
824
|
-
this.tooltip
|
|
825
|
-
.style('transform', `translate(${this.tickPadding}px, ${this.yScale(data.key) + this.series.length * this.yScale.bandwidth() + 5}px )` // 5 is for half caret size
|
|
895
|
+
this.tooltip.style('transform', `translate(${this.tickPadding}px, ${this.yScale(data.key) + this.series.length * this.yScale.bandwidth() + 5}px )` // 5 is for half caret size
|
|
826
896
|
);
|
|
827
897
|
this.tooltip
|
|
828
898
|
.select('digi-icon-caret-up')
|
|
@@ -835,12 +905,17 @@ const barChart = class {
|
|
|
835
905
|
else {
|
|
836
906
|
const xStart = this.margin.left + this.tickPadding + this.yTickSize;
|
|
837
907
|
const translatePoint = this.xScale(data.key) + xStart + this.xScale.bandwidth() / 2;
|
|
838
|
-
const yMax = max(data.series.map(elem => elem.value));
|
|
908
|
+
const yMax = max(data.series.map((elem) => elem.value));
|
|
839
909
|
// Creating adjustment for tooltip to not appear outside of chart
|
|
840
910
|
const spaceToSVGEdge = 5;
|
|
841
|
-
const inlineAdjustment =
|
|
842
|
-
|
|
843
|
-
|
|
911
|
+
const inlineAdjustment = this.dims.width - spaceToSVGEdge < translatePoint + width / 2
|
|
912
|
+
? ((translatePoint +
|
|
913
|
+
width / 2 -
|
|
914
|
+
(this.dims.width - spaceToSVGEdge)) /
|
|
915
|
+
width) *
|
|
916
|
+
100
|
|
917
|
+
: 0;
|
|
918
|
+
this.tooltip.style('transform', `translate( calc(${this.xScale(data.key) + xStart + this.xScale.bandwidth() / 2}px - ${50 + inlineAdjustment}%), calc(-100% + ${this.yScale(yMax && yMax > 0 ? yMax : 0) - 1}px) )`);
|
|
844
919
|
this.tooltip
|
|
845
920
|
.select('digi-icon-caret-down')
|
|
846
921
|
.style('position', 'absolute')
|
|
@@ -876,7 +951,10 @@ const barChart = class {
|
|
|
876
951
|
.attr('opacity', 0)
|
|
877
952
|
.on('end', () => {
|
|
878
953
|
this.svg.remove();
|
|
879
|
-
select(this.legendDiv)
|
|
954
|
+
select(this.legendDiv)
|
|
955
|
+
.select('.legend')
|
|
956
|
+
.selectAll('.legendChip')
|
|
957
|
+
.remove();
|
|
880
958
|
this.legendDiv.style['display'] = 'none';
|
|
881
959
|
this.tableDiv.style['display'] = 'block';
|
|
882
960
|
this.setTableContent();
|
|
@@ -930,12 +1008,13 @@ const barChart = class {
|
|
|
930
1008
|
this.afChartData = undefined;
|
|
931
1009
|
}
|
|
932
1010
|
afChartDataUpdate(data) {
|
|
933
|
-
if (typeof data === 'string' && Object.keys(JSON.parse(data)).length > 0 ||
|
|
1011
|
+
if ((typeof data === 'string' && Object.keys(JSON.parse(data)).length > 0) ||
|
|
1012
|
+
(typeof data !== 'string' && Object.keys(data).length > 0)) {
|
|
934
1013
|
if (typeof data != 'string')
|
|
935
1014
|
this.chartData = data;
|
|
936
1015
|
else
|
|
937
1016
|
this.chartData = JSON.parse(data);
|
|
938
|
-
this.series = this.chartData.data.series.map(serie => serie.title);
|
|
1017
|
+
this.series = this.chartData.data.series.map((serie) => serie.title);
|
|
939
1018
|
}
|
|
940
1019
|
this.mappedData = this.reshapeData();
|
|
941
1020
|
// checking for width of each tick
|
|
@@ -978,10 +1057,11 @@ const barChart = class {
|
|
|
978
1057
|
}
|
|
979
1058
|
initLegend() {
|
|
980
1059
|
const rectSize = 18;
|
|
981
|
-
const legendData = this.chartData.data.series.map(serie => serie.title);
|
|
1060
|
+
const legendData = this.chartData.data.series.map((serie) => serie.title);
|
|
982
1061
|
if (this.chartData.data.averageLine)
|
|
983
1062
|
legendData.push(this.chartData.data.averageLine.text);
|
|
984
|
-
const legendChips = select(this.legendDiv)
|
|
1063
|
+
const legendChips = select(this.legendDiv)
|
|
1064
|
+
.select('.legend')
|
|
985
1065
|
.style('margin-left', `${this.margin.left + this.tickPadding + this.yTickSize}px`)
|
|
986
1066
|
.style('margin-top', '0.5rem')
|
|
987
1067
|
.selectAll('.legendChip')
|
|
@@ -995,7 +1075,8 @@ const barChart = class {
|
|
|
995
1075
|
.style('cursor', 'default')
|
|
996
1076
|
.on('mouseenter', (_event, serie) => this.highlightBars(serie))
|
|
997
1077
|
.on('mouseleave', this.resetBarColor);
|
|
998
|
-
legendChips
|
|
1078
|
+
legendChips
|
|
1079
|
+
.append('svg')
|
|
999
1080
|
.attr('width', rectSize + 1)
|
|
1000
1081
|
.attr('height', rectSize + 1)
|
|
1001
1082
|
.append('rect')
|
|
@@ -1006,15 +1087,19 @@ const barChart = class {
|
|
|
1006
1087
|
.attr('rx', 4)
|
|
1007
1088
|
.attr('ry', 4)
|
|
1008
1089
|
.attr('fill', (title) => this.colorFunction(title));
|
|
1009
|
-
legendChips
|
|
1090
|
+
legendChips
|
|
1091
|
+
.append('span')
|
|
1092
|
+
.style('text-wrap', 'nowrap')
|
|
1093
|
+
.style('font-size', '0.875rem')
|
|
1094
|
+
.text((d) => d);
|
|
1010
1095
|
if (this.chartData.data.averageLine) {
|
|
1011
|
-
const averageLine = legendChips
|
|
1096
|
+
const averageLine = legendChips
|
|
1097
|
+
.filter(':last-child')
|
|
1012
1098
|
.on('mouseenter', (_event, serie) => this.highlightAverageLine(serie));
|
|
1013
|
-
const miniSVG = averageLine
|
|
1014
|
-
.select('svg')
|
|
1015
|
-
.attr('width', rectSize * 2);
|
|
1099
|
+
const miniSVG = averageLine.select('svg').attr('width', rectSize * 2);
|
|
1016
1100
|
miniSVG.select('rect').remove();
|
|
1017
|
-
miniSVG
|
|
1101
|
+
miniSVG
|
|
1102
|
+
.append('line')
|
|
1018
1103
|
.attr('x1', 1)
|
|
1019
1104
|
.attr('x2', rectSize * 2 - 1)
|
|
1020
1105
|
.attr('y1', rectSize / 2 + 1)
|
|
@@ -1057,7 +1142,8 @@ const barChart = class {
|
|
|
1057
1142
|
.attr('role', 'img')
|
|
1058
1143
|
.attr('aria-label', this.chartData && this.chartData.title
|
|
1059
1144
|
? 'Stapeldiagram om ' + this.chartData.title.toLowerCase()
|
|
1060
|
-
: 'Stapeldiagram')
|
|
1145
|
+
: 'Stapeldiagram')
|
|
1146
|
+
.attr('style', 'display: flex;min-width: 0;width: 100%;height: auto;');
|
|
1061
1147
|
// Hide unusable components
|
|
1062
1148
|
select(this.titleDiv)
|
|
1063
1149
|
.select(this.afHeadingLevel)
|
|
@@ -1119,7 +1205,8 @@ const barChart = class {
|
|
|
1119
1205
|
.join('g')
|
|
1120
1206
|
.attr('class', 'barGroup')
|
|
1121
1207
|
.attr('id', (d) => this.barGroupID(d.key));
|
|
1122
|
-
this.barSelection
|
|
1208
|
+
this.barSelection
|
|
1209
|
+
.selectAll('bar')
|
|
1123
1210
|
.data((d) => {
|
|
1124
1211
|
return d.series;
|
|
1125
1212
|
})
|
|
@@ -1134,13 +1221,15 @@ const barChart = class {
|
|
|
1134
1221
|
.attr('width', this.widthFunction)
|
|
1135
1222
|
.attr('height', () => 0)
|
|
1136
1223
|
.attr('fill', 'gray');
|
|
1137
|
-
this.barChartContainer
|
|
1224
|
+
this.barChartContainer
|
|
1225
|
+
.selectAll('.bar')
|
|
1138
1226
|
.transition('animateBar')
|
|
1139
1227
|
.duration(400)
|
|
1140
1228
|
.delay((...[, i]) => i * 150)
|
|
1141
1229
|
.attr('y', this.yFunction)
|
|
1142
1230
|
.attr('height', this.heightFunction);
|
|
1143
|
-
this.barChartContainer
|
|
1231
|
+
this.barChartContainer
|
|
1232
|
+
.selectAll('.bar')
|
|
1144
1233
|
.transition('animateBar')
|
|
1145
1234
|
.duration(400)
|
|
1146
1235
|
.ease(linear$1)
|
|
@@ -1250,7 +1339,8 @@ const barChart = class {
|
|
|
1250
1339
|
.join('g')
|
|
1251
1340
|
.attr('class', 'barGroup')
|
|
1252
1341
|
.attr('id', (d) => this.barGroupID(d.key));
|
|
1253
|
-
this.barSelection
|
|
1342
|
+
this.barSelection
|
|
1343
|
+
.selectAll('.barGroup')
|
|
1254
1344
|
.data((d) => {
|
|
1255
1345
|
return d.series;
|
|
1256
1346
|
})
|
|
@@ -1277,7 +1367,9 @@ const barChart = class {
|
|
|
1277
1367
|
.append('text');
|
|
1278
1368
|
this.textSelection
|
|
1279
1369
|
.text((d) => {
|
|
1280
|
-
return d.value
|
|
1370
|
+
return d.value
|
|
1371
|
+
? d.value.toLocaleString(undefined, this.numberFormat)
|
|
1372
|
+
: undefined;
|
|
1281
1373
|
})
|
|
1282
1374
|
.attr('class', 'barText')
|
|
1283
1375
|
.attr('font-size', this.fontSize)
|
|
@@ -1341,8 +1433,7 @@ const barChart = class {
|
|
|
1341
1433
|
this.setMinMax();
|
|
1342
1434
|
const newHeight = this.setDims();
|
|
1343
1435
|
this.transitionTitle();
|
|
1344
|
-
this.svg
|
|
1345
|
-
.attr('aria-label', this.chartData && this.chartData.title
|
|
1436
|
+
this.svg.attr('aria-label', this.chartData && this.chartData.title
|
|
1346
1437
|
? 'Stapeldiagram om ' + this.chartData.title.toLowerCase()
|
|
1347
1438
|
: 'Stapeldiagram');
|
|
1348
1439
|
this.setMargins();
|
|
@@ -1398,7 +1489,9 @@ const barChart = class {
|
|
|
1398
1489
|
select(this.titleDiv).select('.loadingHeader').remove();
|
|
1399
1490
|
this.loading = false;
|
|
1400
1491
|
this.barChartContainer.selectAll('.bar').interrupt('animateBar');
|
|
1401
|
-
this.barChartContainer
|
|
1492
|
+
this.barChartContainer
|
|
1493
|
+
.selectAll('.bar')
|
|
1494
|
+
.transition()
|
|
1402
1495
|
.duration(this.defaultDuration)
|
|
1403
1496
|
.attr('y', (d) => this.afVariation === BarChartVariation.Horizontal
|
|
1404
1497
|
? this.yScale(d.key)
|
|
@@ -1486,7 +1579,11 @@ const barChart = class {
|
|
|
1486
1579
|
return width;
|
|
1487
1580
|
}
|
|
1488
1581
|
adjustColor(color, amount) {
|
|
1489
|
-
return '#' +
|
|
1582
|
+
return ('#' +
|
|
1583
|
+
color
|
|
1584
|
+
.replace(/^#/, '')
|
|
1585
|
+
.replace(/../g, (color) => ('0' +
|
|
1586
|
+
Math.min(255, Math.max(0, parseInt(color, 16) + amount)).toString(16)).substr(-2)));
|
|
1490
1587
|
}
|
|
1491
1588
|
componentWillLoad() {
|
|
1492
1589
|
this.afChartDataUpdate(this.afChartData);
|
|
@@ -1549,7 +1646,10 @@ const barChart = class {
|
|
|
1549
1646
|
}
|
|
1550
1647
|
setTableDimensions() {
|
|
1551
1648
|
const table = select(this.tableDiv);
|
|
1552
|
-
table
|
|
1649
|
+
table
|
|
1650
|
+
.style('display', 'flex')
|
|
1651
|
+
.style('height', '100%')
|
|
1652
|
+
.style('width', '100%');
|
|
1553
1653
|
}
|
|
1554
1654
|
// Extracting all headings from data and returning a string with <th>-elements with headings
|
|
1555
1655
|
headings() {
|
|
@@ -1588,7 +1688,7 @@ const barChart = class {
|
|
|
1588
1688
|
if (this.chartData.infoText)
|
|
1589
1689
|
heading = `${heading}<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>`;
|
|
1590
1690
|
}
|
|
1591
|
-
return (h(Host, { key: '
|
|
1691
|
+
return (h(Host, { key: 'cb70095467051cf1142891bc63694623e707d92f', ref: (el) => (this.host = el) }, h("svg", { key: 'c040fe2f27d9a5e3de1471fe7e4d853757f6a754', xmlns: "http://www.w3.org/2000/svg", width: "0", height: "0" }, h("defs", { key: '17fd52f2cac5a3225e097aee80e8dc1a99909840' }, h("pattern", { key: '2940e729359dad1acc4635363cd5a8f3ee4d8ea1', id: "prognosis", patternUnits: "userSpaceOnUse", width: "8", height: "8", patternTransform: "rotate(45)" }, h("rect", { key: '4b47d41ea9f4699a4bcc7b0f04d00b8bbd124946', width: "8", height: "8", fill: "white" }), h("line", { key: 'd5c3a32fb715a5271a784771d9812ea599390fc3', x1: "0", y: "0", x2: "0", y2: "12", stroke: this.evalColorVar(this.colorPalettes[0]), "stroke-width": "8" })), h("pattern", { key: '8038bb4d62fd87a118e0bcf4e750165eed48f789', id: "prognosisInactive", patternUnits: "userSpaceOnUse", width: "8", height: "8", patternTransform: "rotate(45)" }, h("rect", { key: 'b1247b7d27e73836c7b5a05fb77a872e89853d3b', width: "8", height: "8", fill: "white" }), h("line", { key: '14265bcba469f08b890654315a86d6278271d64d', x1: "0", y: "0", x2: "0", y2: "12", stroke: this.evalColorVar('--digi--color--background--secondary-accent'), "stroke-width": "8" })), h("pattern", { key: '4069999fd742795379f093c83c00cca488b6139c', id: "prognosisHighlight", patternUnits: "userSpaceOnUse", width: "8", height: "8", patternTransform: "rotate(45)" }, h("rect", { key: 'c525ae39e05acf3e7522f1b92feffdfe5221e528', width: "8", height: "8", fill: "white" }), h("line", { key: 'fa183e0678f6f3794e094b97975fe96955b49e0a', x1: "0", y: "0", x2: "0", y2: "12", stroke: this.adjustColor(this.colorFunction(0), 50), "stroke-width": "8" })))), h("div", { key: 'b6e46d7f4701775a177b02a98f46ca40308e9938', class: "topWrapper", ref: (el) => (this.titleDiv = el) }, h("digi-typography", { key: '88d49833d43776a2bc23d7f73bb8cc9442350634', class: "chartTitle", innerHTML: heading }), h("digi-button", { key: '75e2ef09c3f9f91a08b3596d02ad308b244586bb', class: "buttonWrapper tableButton", "af-size": "medium", "af-variation": "function", "af-full-width": "false", onAfOnClick: this.activateTable, afAriaLabel: `Visa tabell ${((_a = this.chartData) === null || _a === void 0 ? void 0 : _a.title) ? (_b = this.chartData) === null || _b === void 0 ? void 0 : _b.title.toLowerCase() : ''}` }, h("digi-icon-table", { key: '7712b56f991bb5214aa3bebb9e380221156b6bbf', slot: "icon" }), "Visa tabell"), h("digi-button", { key: 'b9d442ea0b62303c2bf1018651ce3206063f3b35', style: { display: 'none' }, class: "buttonWrapper chartButton", "af-size": "medium", "af-variation": "function", "af-full-width": "false", onAfOnClick: this.reInitChart, afAriaLabel: `Visa diagram ${((_c = this.chartData) === null || _c === void 0 ? void 0 : _c.title) ? (_d = this.chartData) === null || _d === void 0 ? void 0 : _d.title.toLowerCase() : ''}` }, h("digi-icon-chart", { key: '260c432d04f8ea00216cd485b5ec3a29df4b4db1', slot: "icon" }), "Visa diagram"), h("div", { key: 'a7fd6276b5738e9cf040f0e9b99e983b27ec25cf', class: "scChartStatus", role: "status", ref: (el) => (this.status = el) })), h("div", { key: '705ec9e3931b91009ff565bbd8f4ba300bd8dbd7', class: "svgWrap", ref: (el) => (this.chartDiv = el) }, h("div", { key: '242fd5b7afba36df00aa7fb256bd8578712d25e7', class: "chartTooltip", id: this.afId }, h("div", { key: '6417cc30962396164fe4840ecfef62c4ef7591d6', class: "tooltipHead" }, h("digi-icon-x", { key: 'dc4edb442bfb342fbdb64b06e70f1e19ccc5ffb1', class: "tooltipClose" })), h("div", { key: 'da625c879d4c0eebffa02193dc36d794c755b768', class: "tooltipBody" }), this.afVariation === BarChartVariation.Horizontal ? (h("digi-icon-caret-up", { class: "caret" })) : (h("digi-icon-caret-down", { class: "caret" })))), h("div", { key: 'a003a616c2ee8b848d402b38009261539ebf0c50', class: "legendWrap", ref: (el) => (this.legendDiv = el) }, h("div", { key: '44a6db8daa836ccf910aafd6fd996f153c337bf4', class: "legend" })), h("div", { key: 'a872281035f2799fe8aa9128a953d0c5d9f6b2cc', class: "table", ref: (el) => (this.tableDiv = el) }, ' ')));
|
|
1592
1692
|
}
|
|
1593
1693
|
get hostElement() { return getElement(this); }
|
|
1594
1694
|
static get watchers() { return {
|
|
@@ -31,6 +31,7 @@ import './loader-spinner-size.enum-0b246fa0.js';
|
|
|
31
31
|
import './media-figure-alignment.enum-a1d36567.js';
|
|
32
32
|
import './navigation-sidebar-variation.enum-8fead764.js';
|
|
33
33
|
import './navigation-vertical-menu-variation.enum-c30b0ea9.js';
|
|
34
|
+
import './progress-circle-role.enum-7737a2c6.js';
|
|
34
35
|
import './progress-indicator-variation.enum-b12ba50a.js';
|
|
35
36
|
import './progress-list-item-variation.enum-384b9a3a.js';
|
|
36
37
|
import './progress-list-variation.enum-300bd89d.js';
|
|
@@ -31,6 +31,7 @@ import './loader-spinner-size.enum-0b246fa0.js';
|
|
|
31
31
|
import './media-figure-alignment.enum-a1d36567.js';
|
|
32
32
|
import './navigation-sidebar-variation.enum-8fead764.js';
|
|
33
33
|
import './navigation-vertical-menu-variation.enum-c30b0ea9.js';
|
|
34
|
+
import './progress-circle-role.enum-7737a2c6.js';
|
|
34
35
|
import './progress-indicator-variation.enum-b12ba50a.js';
|
|
35
36
|
import './progress-list-item-variation.enum-384b9a3a.js';
|
|
36
37
|
import './progress-list-variation.enum-300bd89d.js';
|
|
@@ -2543,7 +2544,7 @@ const CalendarDatepicker = class {
|
|
|
2543
2544
|
return this.afSelectedDates;
|
|
2544
2545
|
}
|
|
2545
2546
|
render() {
|
|
2546
|
-
return (h(Host, { key: '
|
|
2547
|
+
return (h(Host, { key: '6b080d933e012fe050aee0181f927c3252b0bb7e', tabindex: -1 }, h("div", { key: 'ec59a7f209f7a5e06c62d4443fbca980b1030d12', class: Object.assign({ 'digi-calendar-datepicker': true }, this.cssModifiers), id: `${this.afId}-datepicker` }, h("div", { key: '2bf3bd4f0a82c14c4fb04610dab19767fbba595d', class: "digi-calendar-datepicker__input-field" }, h("digi-form-input", { key: 'ebde8123611c021b60104f75c2e4085e35fb4697', ref: (el) => (this._input = el), class: 'digi-calendar-datepicker__input-component', afLabel: this.afLabel, afLabelDescription: this.afLabelDescription, afName: this.afName, afValue: this.inputValue, afValidation: this.hasBuiltInValidationError()
|
|
2547
2548
|
? FormInputValidation.ERROR
|
|
2548
2549
|
: this.afValidation, afValidationText: this.getErrorText(), afId: this.afId, afAriaDescribedby: `${this.afId}--validation-message`, afRequired: this.afRequired, afRequiredText: this.afRequiredText, onAfOnChange: (evt) => {
|
|
2549
2550
|
evt.stopImmediatePropagation();
|
|
@@ -2560,11 +2561,11 @@ const CalendarDatepicker = class {
|
|
|
2560
2561
|
e.preventDefault();
|
|
2561
2562
|
const focusableDateButton = this.hostElement.querySelector('.digi-calendar__date[tabindex="0"]');
|
|
2562
2563
|
focusableDateButton === null || focusableDateButton === void 0 ? void 0 : focusableDateButton.focus();
|
|
2563
|
-
} }, h("button", { key: '
|
|
2564
|
+
} }, h("button", { key: '04df5ccb789271d7ba2f693b740f316301f9fae0', id: this.afId + '-button', class: "digi-calendar-datepicker__input-button", slot: "button", "aria-label": this.showCalendar
|
|
2564
2565
|
? this.afCloseCalendarAriaLabel
|
|
2565
|
-
: this.afOpenCalendarAriaLabel, "aria-controls": "calendar-popup", "aria-expanded": this.showCalendar ? 'true' : 'false', onClick: () => this.toggleCalendar(), type: "button" }, h("digi-icon-calendar-alt", { key: '
|
|
2566
|
+
: this.afOpenCalendarAriaLabel, "aria-controls": "calendar-popup", "aria-expanded": this.showCalendar ? 'true' : 'false', onClick: () => this.toggleCalendar(), type: "button" }, h("digi-icon-calendar-alt", { key: '65b9a472f629bbaa46a64c8a304f358da76b0830', class: "digi-calendar-datepicker__button-icon", slot: "icon" })))), h("div", { key: 'd0df89ce680bb2a0ca7f311b2c0ead0f72dc30b6', class: "digi-calendar-datepicker__calendar", id: "calendar-popup" }, h("p", { key: '9796876e15e88b1599d772863c29fc472da24c69', role: "alert", class: "digi-calendar-datepicker__sr-instructions" }, this.showCalendar
|
|
2566
2567
|
? `${_t.calendar.screenReaderInstructions}${this.screenReaderUpdateTrigger ? '\u200B' : ''}`
|
|
2567
|
-
: ''), h("digi-calendar", { key: '
|
|
2568
|
+
: ''), h("digi-calendar", { key: 'bd5f34bcdbcb2276b5080c43479337c514861ba9', afActive: this.showCalendar, afShowWeekNumber: this.afShowWeekNumber, afMultipleDates: this.afMultipleDates, afYearSelect: this.afYearSelect, afSelectedDates: this.getSelectedDates, afMinDate: this.afMinDate, afMaxDate: this.afMaxDate, "aria-hidden": !this.showCalendar, afOpenCalendarTo: this.afOpenCalendarTo, onAfOnDateSelectedChange: (evt) => {
|
|
2568
2569
|
evt.stopImmediatePropagation();
|
|
2569
2570
|
this.parseCalendar(evt);
|
|
2570
2571
|
}, onKeyDown: (e) => {
|
|
@@ -2575,7 +2576,7 @@ const CalendarDatepicker = class {
|
|
|
2575
2576
|
return;
|
|
2576
2577
|
e.preventDefault();
|
|
2577
2578
|
this.focusOnCalendarInput();
|
|
2578
|
-
} })), this.afCloseOnSelect && !this.afMultipleDates && (h("div", { key: '
|
|
2579
|
+
} })), this.afCloseOnSelect && !this.afMultipleDates && (h("div", { key: 'fc150d20f14731e8f67f38c6042e8af4e24eae38', class: "digi-calendar-datepicker__selected-date-alert", role: this.errorMessageIsAlert ? 'alert' : null }, this.afSelectedDates.length > 0
|
|
2579
2580
|
? `${_t.calendar.datepicker.selectedDate}: ${this.datesToInputString(this.afSelectedDates)}`
|
|
2580
2581
|
: '')))));
|
|
2581
2582
|
}
|