@ids-group-ltd/ids-design-system 0.15.0 → 0.15.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/CHANGELOG.md +496 -0
- package/components.md +69 -38
- package/docs/agent/INDEX.md +3 -3
- package/docs/agent/charts/column-series-component.md +1 -1
- package/docs/agent/charts/ds-chart.md +1 -1
- package/docs/agent/charts/ds-column-chart.md +2 -1
- package/docs/agent/charts/ds-heatmap-chart.md +2 -1
- package/docs/agent/charts/ds-line-chart.md +3 -3
- package/docs/agent/charts/ds-pie-chart.md +3 -2
- package/docs/agent/charts/ds-scatter-chart.md +2 -1
- package/docs/agent/charts/ds-waterfall-chart.md +1 -1
- package/docs/agent/charts/line-series-component.md +1 -1
- package/docs/agent/feedback/ds-alert.md +1 -0
- package/docs/agent/feedback/ds-banner.md +1 -0
- package/docs/agent/feedback/ds-toast.md +2 -0
- package/docs/agent/forms/ds-autocomplete.md +1 -1
- package/docs/agent/forms/ds-button.md +1 -0
- package/docs/agent/forms/ds-checkbox.md +1 -1
- package/docs/agent/forms/ds-color-picker.md +1 -1
- package/docs/agent/forms/ds-date-picker.md +1 -1
- package/docs/agent/forms/ds-icon-button.md +1 -1
- package/docs/agent/forms/ds-input.md +1 -1
- package/docs/agent/forms/ds-multi-select.md +1 -1
- package/docs/agent/forms/ds-otp-input.md +1 -1
- package/docs/agent/forms/ds-radio-group.md +1 -1
- package/docs/agent/forms/ds-segmented.md +1 -1
- package/docs/agent/forms/ds-select.md +1 -1
- package/docs/agent/forms/ds-slider.md +1 -1
- package/docs/agent/forms/ds-switch.md +1 -1
- package/docs/agent/forms/ds-textarea.md +1 -1
- package/docs/agent/forms/ds-time-picker.md +1 -1
- package/docs/agent/forms/the-picker-family-ds-select-ds-multi-select-ds-autocomplete.md +1 -1
- package/docs/agent/foundations/global-helper-classes.md +1 -1
- package/docs/agent/foundations/tokens.md +1 -1
- package/docs/agent/navigation/ds-pagination.md +2 -1
- package/docs/agent/overlays/ds-definition-term.md +1 -1
- package/docs/agent/overlays/ds-info-hint.md +21 -2
- package/docs/agent/overlays/ds-tooltip-panel.md +1 -1
- package/docs/agent/overlays/ds-tooltip.md +1 -1
- package/docs/agent/tables/ds-table-columns.md +2 -0
- package/docs/agent/tables/ds-table.md +3 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs +6 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +10 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs +6 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +8 -9
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs +7 -17
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs +694 -77
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs +2190 -1234
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs +10 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +15 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs +44 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +22 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-message.mjs +44 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-message.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs +4 -18
- package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs +49 -20
- package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs +5 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-info-hint.mjs +76 -10
- package/fesm2022/ids-group-ltd-ids-design-system-components-info-hint.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs +11 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs +33 -44
- package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs +50 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +10 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs +10 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs +14 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs +102 -27
- package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs +5 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs +11 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs +123 -23
- package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs +10 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +10 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-show-dirty.mjs +55 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-show-dirty.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs +10 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-sparkline.mjs +3 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-sparkline.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs +10 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs +32 -14
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-resize.mjs +17 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-resize.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +259 -21
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +15 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +24 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs +17 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs +32 -12
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-waterfall-chart.mjs +10 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-waterfall-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +238 -67
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +9 -2
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
- package/migrations/0.15.0.json +43 -12
- package/migrations/0.15.1.json +745 -0
- package/migrations/0.15.2.json +164 -0
- package/migrations/0.3.0.json +16 -9
- package/package.json +9 -1
- package/schematics/check-overrides/surface.json +48 -1
- package/stylelint/deprecated-tokens.json +7 -0
- package/styles/_chart-frame.scss +14 -0
- package/styles/_chart-interactive.scss +26 -1
- package/styles/_chart-motion.scss +47 -8
- package/styles/_link.scss +30 -12
- package/styles/_tokens.scss +3 -0
- package/themes/README.md +55 -0
- package/themes/_semantic.scss +6 -7
- package/themes/dark/_theme.scss +7 -7
- package/types/ids-group-ltd-ids-design-system-components-alert.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-autocomplete.d.ts +2 -0
- package/types/ids-group-ltd-ids-design-system-components-banner.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-button.d.ts +5 -4
- package/types/ids-group-ltd-ids-design-system-components-chart-legend.d.ts +4 -4
- package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +51 -7
- package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +201 -28
- package/types/ids-group-ltd-ids-design-system-components-checkbox.d.ts +2 -0
- package/types/ids-group-ltd-ids-design-system-components-color-picker.d.ts +2 -0
- package/types/ids-group-ltd-ids-design-system-components-column-chart.d.ts +27 -2
- package/types/ids-group-ltd-ids-design-system-components-date-picker.d.ts +3 -1
- package/types/ids-group-ltd-ids-design-system-components-field-message.d.ts +19 -2
- package/types/ids-group-ltd-ids-design-system-components-funnel-chart.d.ts +0 -3
- package/types/ids-group-ltd-ids-design-system-components-heatmap-chart.d.ts +21 -8
- package/types/ids-group-ltd-ids-design-system-components-icon-button.d.ts +3 -2
- package/types/ids-group-ltd-ids-design-system-components-info-hint.d.ts +13 -4
- package/types/ids-group-ltd-ids-design-system-components-input.d.ts +2 -0
- package/types/ids-group-ltd-ids-design-system-components-line-chart.d.ts +13 -7
- package/types/ids-group-ltd-ids-design-system-components-menu.d.ts +6 -0
- package/types/ids-group-ltd-ids-design-system-components-multi-select.d.ts +2 -0
- package/types/ids-group-ltd-ids-design-system-components-otp-input.d.ts +2 -0
- package/types/ids-group-ltd-ids-design-system-components-pagination.d.ts +5 -3
- package/types/ids-group-ltd-ids-design-system-components-pie-chart.d.ts +24 -7
- package/types/ids-group-ltd-ids-design-system-components-popover.d.ts +2 -1
- package/types/ids-group-ltd-ids-design-system-components-radio-group.d.ts +2 -0
- package/types/ids-group-ltd-ids-design-system-components-scatter-chart.d.ts +39 -7
- package/types/ids-group-ltd-ids-design-system-components-segmented.d.ts +2 -0
- package/types/ids-group-ltd-ids-design-system-components-select.d.ts +2 -0
- package/types/ids-group-ltd-ids-design-system-components-show-dirty.d.ts +29 -0
- package/types/ids-group-ltd-ids-design-system-components-slider.d.ts +2 -0
- package/types/ids-group-ltd-ids-design-system-components-switch.d.ts +2 -0
- package/types/ids-group-ltd-ids-design-system-components-table-resize.d.ts +2 -0
- package/types/ids-group-ltd-ids-design-system-components-table.d.ts +51 -11
- package/types/ids-group-ltd-ids-design-system-components-textarea.d.ts +2 -0
- package/types/ids-group-ltd-ids-design-system-components-time-picker.d.ts +3 -1
- package/types/ids-group-ltd-ids-design-system-components-toast.d.ts +2 -0
- package/types/ids-group-ltd-ids-design-system-components-tooltip.d.ts +8 -6
- package/types/ids-group-ltd-ids-design-system-components-waterfall-chart.d.ts +4 -1
- package/types/ids-group-ltd-ids-design-system-components.d.ts +110 -34
- package/types/ids-group-ltd-ids-design-system-core.d.ts +44 -12
- package/types/ids-group-ltd-ids-design-system.d.ts +3 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, computed, inject, ElementRef, afterRenderEffect, ChangeDetectionStrategy, ViewEncapsulation, Component, ViewContainerRef, effect, DestroyRef, Directive, signal, InjectionToken, output, booleanAttribute } from '@angular/core';
|
|
2
|
+
import { input, computed, inject, ElementRef, afterRenderEffect, ChangeDetectionStrategy, ViewEncapsulation, Component, ViewContainerRef, effect, DestroyRef, Directive, signal, PLATFORM_ID, NgZone, InjectionToken, output, booleanAttribute } from '@angular/core';
|
|
3
3
|
import { Overlay } from '@angular/cdk/overlay';
|
|
4
4
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
5
|
-
import { forwardOverlayTokens, closeOnScroll, listenForEscape, disposeWithLeave, chartDwell, skeletonWaterfallSteps, skeletonColumnHeights, skeletonLineClip } from '@ids-group-ltd/ids-design-system/components';
|
|
6
|
-
import { NgTemplateOutlet } from '@angular/common';
|
|
5
|
+
import { forwardOverlayTokens, closeOnScroll, listenForEscape, chartTiming, CHART_GLIDE_HEAD_START_MS, disposeWithLeave, chartDwell, chartOf, afterTwoFrames, skeletonWaterfallSteps, skeletonColumnHeights, skeletonLineClip, CHART_SKELETON_COUNT } from '@ids-group-ltd/ids-design-system/components';
|
|
6
|
+
import { NgTemplateOutlet, isPlatformBrowser } from '@angular/common';
|
|
7
7
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
8
8
|
import { ICONS, DS_INTL } from '@ids-group-ltd/ids-design-system/core';
|
|
9
9
|
import { SkeletonComponent } from '@ids-group-ltd/ids-design-system/components/skeleton';
|
|
@@ -221,17 +221,11 @@ class ChartTooltipDirective {
|
|
|
221
221
|
if ((deltaX === 0 && deltaY === 0) || typeof pane.animate !== 'function') {
|
|
222
222
|
return;
|
|
223
223
|
}
|
|
224
|
-
const
|
|
225
|
-
|
|
226
|
-
if (duration <= 0) {
|
|
224
|
+
const timing = chartTiming(pane, 'tooltip-move');
|
|
225
|
+
if (!timing) {
|
|
227
226
|
return;
|
|
228
227
|
}
|
|
229
|
-
this.glide = pane.animate([{ translate: `${deltaX}px ${deltaY}px` }, { translate: '0 0' }], {
|
|
230
|
-
duration,
|
|
231
|
-
easing: style
|
|
232
|
-
.getPropertyValue('--ds-motion-chart-tooltip-move-easing')
|
|
233
|
-
.trim() || 'ease',
|
|
234
|
-
});
|
|
228
|
+
this.glide = pane.animate([{ translate: `${deltaX}px ${deltaY}px` }, { translate: '0 0' }], { ...timing, delay: -CHART_GLIDE_HEAD_START_MS });
|
|
235
229
|
}
|
|
236
230
|
strategyFor(origin) {
|
|
237
231
|
const gap = coarsePointer()
|
|
@@ -279,13 +273,6 @@ function hideWhileOffscreen(pane, chart) {
|
|
|
279
273
|
observer.observe(chart);
|
|
280
274
|
return () => observer.disconnect();
|
|
281
275
|
}
|
|
282
|
-
function milliseconds(duration) {
|
|
283
|
-
const value = parseFloat(duration);
|
|
284
|
-
if (!Number.isFinite(value)) {
|
|
285
|
-
return 0;
|
|
286
|
-
}
|
|
287
|
-
return duration.trim().endsWith('ms') ? value : value * 1000;
|
|
288
|
-
}
|
|
289
276
|
function coarsePointer() {
|
|
290
277
|
return (typeof window !== 'undefined' &&
|
|
291
278
|
window.matchMedia('(pointer: coarse)').matches);
|
|
@@ -356,17 +343,20 @@ function chartActiveMark(lingerMs = () => 0, hoverDelayMs = () => 0) {
|
|
|
356
343
|
pendingClear = null;
|
|
357
344
|
}
|
|
358
345
|
};
|
|
346
|
+
const clearHover = () => {
|
|
347
|
+
cancelPendingClear();
|
|
348
|
+
index.set(-1);
|
|
349
|
+
origin.set(null);
|
|
350
|
+
document.removeEventListener('pointerover', trackPointer, true);
|
|
351
|
+
};
|
|
359
352
|
const scheduleClear = () => {
|
|
360
353
|
cancelPendingClear();
|
|
361
|
-
pendingClear = setTimeout(()
|
|
362
|
-
pendingClear = null;
|
|
363
|
-
index.set(-1);
|
|
364
|
-
origin.set(null);
|
|
365
|
-
document.removeEventListener('pointerover', trackPointer, true);
|
|
366
|
-
}, Math.max(lingerMs(), 0));
|
|
354
|
+
pendingClear = setTimeout(clearHover, Math.max(lingerMs(), 0));
|
|
367
355
|
};
|
|
368
356
|
// `pointerover` fires per element crossed: the panel cancels the clear, anything else but the mark
|
|
369
|
-
// schedules one. Without that a panel the pointer once touched never closes.
|
|
357
|
+
// schedules one. Without that a panel the pointer once touched never closes. A pending clear is
|
|
358
|
+
// kept, not restarted, or a pointer moving over another chart holds this one open forever. The
|
|
359
|
+
// wait bridges the gaps between marks; a pointer that left the chart clears it at once.
|
|
370
360
|
const trackPointer = (event) => {
|
|
371
361
|
if (!(event.target instanceof Element)) {
|
|
372
362
|
return;
|
|
@@ -376,12 +366,20 @@ function chartActiveMark(lingerMs = () => 0, hoverDelayMs = () => 0) {
|
|
|
376
366
|
return;
|
|
377
367
|
}
|
|
378
368
|
// Host, not anchor: a legend item and the arc its panel points at are disjoint.
|
|
379
|
-
if (
|
|
369
|
+
if (host && host.contains(event.target)) {
|
|
370
|
+
return;
|
|
371
|
+
}
|
|
372
|
+
if (host && chartOf(event.target) !== chartOf(host)) {
|
|
373
|
+
clearHover();
|
|
374
|
+
}
|
|
375
|
+
else if (pendingClear === null) {
|
|
380
376
|
scheduleClear();
|
|
381
377
|
}
|
|
382
378
|
};
|
|
383
|
-
const chartOf = (element) => element ? element.closest('figure') : null;
|
|
384
379
|
const release = (event) => {
|
|
380
|
+
if (!isPrimaryPress(event)) {
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
385
383
|
if (!(event.target instanceof Element)) {
|
|
386
384
|
clear();
|
|
387
385
|
return;
|
|
@@ -398,7 +396,6 @@ function chartActiveMark(lingerMs = () => 0, hoverDelayMs = () => 0) {
|
|
|
398
396
|
};
|
|
399
397
|
if (typeof document !== 'undefined') {
|
|
400
398
|
inject(DestroyRef).onDestroy(() => {
|
|
401
|
-
dwell.cancel();
|
|
402
399
|
cancelPendingClear();
|
|
403
400
|
document.removeEventListener('pointerdown', release, true);
|
|
404
401
|
document.removeEventListener('keydown', releaseOnEscape, true);
|
|
@@ -438,9 +435,16 @@ function chartActiveMark(lingerMs = () => 0, hoverDelayMs = () => 0) {
|
|
|
438
435
|
clear();
|
|
439
436
|
}
|
|
440
437
|
},
|
|
438
|
+
pinnedAt(lookup) {
|
|
439
|
+
return computed(() => {
|
|
440
|
+
const at = index();
|
|
441
|
+
const value = pinned() ? lookup(at) : null;
|
|
442
|
+
return value ? [{ index: at, value }] : [];
|
|
443
|
+
});
|
|
444
|
+
},
|
|
441
445
|
pin(at, event, anchor, mark) {
|
|
442
446
|
dwell.cancel();
|
|
443
|
-
if (typeof document === 'undefined') {
|
|
447
|
+
if (typeof document === 'undefined' || !isPrimaryPress(event)) {
|
|
444
448
|
return;
|
|
445
449
|
}
|
|
446
450
|
if (pinned() && index() === at) {
|
|
@@ -476,6 +480,39 @@ function chartActiveMark(lingerMs = () => 0, hoverDelayMs = () => 0) {
|
|
|
476
480
|
}
|
|
477
481
|
}
|
|
478
482
|
}
|
|
483
|
+
/** Whether `event` may take or drop a pin: a key or a touch always, a mouse only by its main button.
|
|
484
|
+
*
|
|
485
|
+
* @internal */
|
|
486
|
+
function isPrimaryPress(event) {
|
|
487
|
+
return !(event instanceof MouseEvent) || event.button === 0;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* Adds `placed` to its host two frames after the host enters the DOM. A chart element that glides
|
|
492
|
+
* between positions gates its `transition` on `.placed`: the browser can compute the host's style
|
|
493
|
+
* before its position binding lands, and an ungated transition then starts it at the origin.
|
|
494
|
+
* Two frames, because after one the bound position may still be unstyled.
|
|
495
|
+
*
|
|
496
|
+
* @internal
|
|
497
|
+
*/
|
|
498
|
+
class ChartPlacedDirective {
|
|
499
|
+
constructor() {
|
|
500
|
+
if (!isPlatformBrowser(inject(PLATFORM_ID))) {
|
|
501
|
+
return;
|
|
502
|
+
}
|
|
503
|
+
const host = inject(ElementRef).nativeElement;
|
|
504
|
+
inject(DestroyRef).onDestroy(afterTwoFrames(inject(NgZone), () => host.classList.add('placed')));
|
|
505
|
+
}
|
|
506
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ChartPlacedDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
507
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: ChartPlacedDirective, isStandalone: true, selector: "[dsChartPlaced]", ngImport: i0 });
|
|
508
|
+
}
|
|
509
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ChartPlacedDirective, decorators: [{
|
|
510
|
+
type: Directive,
|
|
511
|
+
args: [{
|
|
512
|
+
selector: '[dsChartPlaced]',
|
|
513
|
+
standalone: true,
|
|
514
|
+
}]
|
|
515
|
+
}], ctorParameters: () => [] });
|
|
479
516
|
|
|
480
517
|
/** Radius of the pin disc, in plot pixels.
|
|
481
518
|
*
|
|
@@ -499,46 +536,50 @@ class ChartPinMarkerComponent {
|
|
|
499
536
|
glyphOffset = -GLYPH_SIZE / 2;
|
|
500
537
|
glyph = inject(DomSanitizer).bypassSecurityTrustHtml(ICONS.pin);
|
|
501
538
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ChartPinMarkerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
502
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: ChartPinMarkerComponent, isStandalone: true, selector: "g[dsChartPinMarker]", host: { attributes: { "aria-hidden": "true" }, classAttribute: "pin-marker" }, ngImport: i0, template: `
|
|
503
|
-
<svg:
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
539
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: ChartPinMarkerComponent, isStandalone: true, selector: "g[dsChartPinMarker]", host: { attributes: { "aria-hidden": "true" }, classAttribute: "pin-marker" }, hostDirectives: [{ directive: ChartPlacedDirective }], ngImport: i0, template: `
|
|
540
|
+
<svg:g class="pin-body">
|
|
541
|
+
<svg:circle class="pin-disc" [attr.r]="radius" />
|
|
542
|
+
|
|
543
|
+
<svg:svg
|
|
544
|
+
class="pin-glyph"
|
|
545
|
+
viewBox="0 0 24 24"
|
|
546
|
+
fill="none"
|
|
547
|
+
stroke="currentColor"
|
|
548
|
+
stroke-width="1.75"
|
|
549
|
+
stroke-linecap="round"
|
|
550
|
+
stroke-linejoin="round"
|
|
551
|
+
[attr.x]="glyphOffset"
|
|
552
|
+
[attr.y]="glyphOffset"
|
|
553
|
+
[attr.width]="glyphSize"
|
|
554
|
+
[attr.height]="glyphSize"
|
|
555
|
+
[innerHTML]="glyph" />
|
|
556
|
+
</svg:g>
|
|
557
|
+
`, isInline: true, styles: ["@keyframes ds-chart-mark-grow-y{0%{transform:scaleY(0)}}@keyframes ds-chart-mark-grow-x{0%{transform:scaleX(0)}}@keyframes ds-chart-mark-fade-in{0%{opacity:0}}@keyframes ds-chart-mark-settle{0%{opacity:0;transform:scale(.96)}}@keyframes ds-chart-line-draw{0%{stroke-dashoffset:1}}@keyframes ds-chart-mark-exit{to{opacity:0}}@keyframes ds-chart-pin-pop{0%{scale:.4;opacity:0}}@layer ds-component-base{:host{box-sizing:border-box;interpolate-size:allow-keywords}*,*:before,*:after{box-sizing:border-box}button,input,select,textarea{font-family:inherit}h1,h2,h3,h4,h5,h6{margin:0}:host(:where(:focus-visible)),:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:host(:where(:focus-visible)),:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}}:host{pointer-events:none}:host(.placed){transition:transform var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing)}.pin-body{animation:ds-chart-pin-pop var(--ds-motion-chart-mark-duration) var(--ease-spring) backwards}.pin-disc{fill:var(--surface-default);stroke:var(--border-divider);stroke-width:var(--border-width-default)}.pin-glyph{color:var(--text-primary)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
519
558
|
}
|
|
520
559
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ChartPinMarkerComponent, decorators: [{
|
|
521
560
|
type: Component,
|
|
522
|
-
args: [{ selector: 'g[dsChartPinMarker]', standalone: true, template: `
|
|
523
|
-
<svg:
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
561
|
+
args: [{ selector: 'g[dsChartPinMarker]', standalone: true, hostDirectives: [ChartPlacedDirective], template: `
|
|
562
|
+
<svg:g class="pin-body">
|
|
563
|
+
<svg:circle class="pin-disc" [attr.r]="radius" />
|
|
564
|
+
|
|
565
|
+
<svg:svg
|
|
566
|
+
class="pin-glyph"
|
|
567
|
+
viewBox="0 0 24 24"
|
|
568
|
+
fill="none"
|
|
569
|
+
stroke="currentColor"
|
|
570
|
+
stroke-width="1.75"
|
|
571
|
+
stroke-linecap="round"
|
|
572
|
+
stroke-linejoin="round"
|
|
573
|
+
[attr.x]="glyphOffset"
|
|
574
|
+
[attr.y]="glyphOffset"
|
|
575
|
+
[attr.width]="glyphSize"
|
|
576
|
+
[attr.height]="glyphSize"
|
|
577
|
+
[innerHTML]="glyph" />
|
|
578
|
+
</svg:g>
|
|
538
579
|
`, host: {
|
|
539
580
|
class: 'pin-marker',
|
|
540
581
|
'aria-hidden': 'true',
|
|
541
|
-
}, encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{pointer-events:none}.pin-disc{fill:var(--surface-default);stroke:var(--border-divider);stroke-width:var(--border-width-default)}.pin-glyph{color:var(--text-primary)}\n"] }]
|
|
582
|
+
}, encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, styles: ["@keyframes ds-chart-mark-grow-y{0%{transform:scaleY(0)}}@keyframes ds-chart-mark-grow-x{0%{transform:scaleX(0)}}@keyframes ds-chart-mark-fade-in{0%{opacity:0}}@keyframes ds-chart-mark-settle{0%{opacity:0;transform:scale(.96)}}@keyframes ds-chart-line-draw{0%{stroke-dashoffset:1}}@keyframes ds-chart-mark-exit{to{opacity:0}}@keyframes ds-chart-pin-pop{0%{scale:.4;opacity:0}}@layer ds-component-base{:host{box-sizing:border-box;interpolate-size:allow-keywords}*,*:before,*:after{box-sizing:border-box}button,input,select,textarea{font-family:inherit}h1,h2,h3,h4,h5,h6{margin:0}:host(:where(:focus-visible)),:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:host(:where(:focus-visible)),:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}}:host{pointer-events:none}:host(.placed){transition:transform var(--ds-motion-chart-mark-duration) var(--ds-motion-chart-mark-easing)}.pin-body{animation:ds-chart-pin-pop var(--ds-motion-chart-mark-duration) var(--ease-spring) backwards}.pin-disc{fill:var(--surface-default);stroke:var(--border-divider);stroke-width:var(--border-width-default)}.pin-glyph{color:var(--text-primary)}\n"] }]
|
|
542
583
|
}] });
|
|
543
584
|
|
|
544
585
|
/**
|
|
@@ -623,10 +664,11 @@ class ChartSkeletonComponent {
|
|
|
623
664
|
}
|
|
624
665
|
</div>
|
|
625
666
|
|
|
626
|
-
<div class="plot">
|
|
667
|
+
<div class="plot" data-morph="fade">
|
|
627
668
|
@if (marks() === 'line') {
|
|
628
669
|
<ds-skeleton
|
|
629
670
|
class="line"
|
|
671
|
+
data-morph="line"
|
|
630
672
|
[style.clip-path]="lineClip()"
|
|
631
673
|
[shimmer]="shimmer()" />
|
|
632
674
|
} @else {
|
|
@@ -634,6 +676,7 @@ class ChartSkeletonComponent {
|
|
|
634
676
|
<span class="band">
|
|
635
677
|
<ds-skeleton
|
|
636
678
|
class="bar"
|
|
679
|
+
data-morph="mark"
|
|
637
680
|
width="50%"
|
|
638
681
|
[height]="bar.height"
|
|
639
682
|
[style.inset-block-end]="bar.bottom"
|
|
@@ -670,10 +713,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
670
713
|
}
|
|
671
714
|
</div>
|
|
672
715
|
|
|
673
|
-
<div class="plot">
|
|
716
|
+
<div class="plot" data-morph="fade">
|
|
674
717
|
@if (marks() === 'line') {
|
|
675
718
|
<ds-skeleton
|
|
676
719
|
class="line"
|
|
720
|
+
data-morph="line"
|
|
677
721
|
[style.clip-path]="lineClip()"
|
|
678
722
|
[shimmer]="shimmer()" />
|
|
679
723
|
} @else {
|
|
@@ -681,6 +725,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
681
725
|
<span class="band">
|
|
682
726
|
<ds-skeleton
|
|
683
727
|
class="bar"
|
|
728
|
+
data-morph="mark"
|
|
684
729
|
width="50%"
|
|
685
730
|
[height]="bar.height"
|
|
686
731
|
[style.inset-block-end]="bar.bottom"
|
|
@@ -710,6 +755,434 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
710
755
|
}, encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, styles: ["@layer ds-component-base{:host{box-sizing:border-box;interpolate-size:allow-keywords}*,*:before,*:after{box-sizing:border-box}button,input,select,textarea{font-family:inherit}h1,h2,h3,h4,h5,h6{margin:0}:host(:where(:focus-visible)),:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:host(:where(:focus-visible)),:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}}:host{display:grid;grid-template-columns:var(--_chart-skeleton-axis-gutter) minmax(0,1fr);grid-template-rows:var(--_chart-skeleton-value-space) var(--_chart-skeleton-plot-height) var(--_chart-skeleton-category-band);padding-inline-end:12px}.ticks{grid-area:2/1;position:relative}.ticks .pill{position:absolute;inset-inline-end:var(--space-2);translate:0 -50%}.plot{grid-area:2/2;position:relative;display:flex;border-inline-start:1px solid var(--ds-chart-axis-line-color);border-block-end:1px solid var(--ds-chart-axis-line-color)}.band{flex:1 1 0;display:flex;justify-content:center;align-items:flex-end;min-inline-size:0}.bar{border-end-start-radius:0;border-end-end-radius:0}.line{position:absolute;inset:0;border-radius:0}.categories{grid-area:3/2;display:flex}.categories .band{align-items:flex-start;padding-block-start:var(--space-2-5)}.pill{border-radius:var(--radius-pill)}\n"] }]
|
|
711
756
|
}], propDecorators: { marks: [{ type: i0.Input, args: [{ isSignal: true, alias: "marks", required: false }] }], count: [{ type: i0.Input, args: [{ isSignal: true, alias: "count", required: true }] }], plotHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "plotHeight", required: true }] }], valueSpace: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueSpace", required: true }] }], axisGutter: [{ type: i0.Input, args: [{ isSignal: true, alias: "axisGutter", required: true }] }], shimmer: [{ type: i0.Input, args: [{ isSignal: true, alias: "shimmer", required: false }] }] } });
|
|
712
757
|
|
|
758
|
+
/** Put on the figure while the drawn chart waits, hidden, for its geometry to land. */
|
|
759
|
+
const HOLD_CLASS = 'skeleton-morph';
|
|
760
|
+
// The real mark takes over from its ghost only once the ghost has (all but) landed on it.
|
|
761
|
+
const HANDOVER_AT = 0.95;
|
|
762
|
+
const BAND_SAMPLES = 24;
|
|
763
|
+
const PATH_SAMPLES = 96;
|
|
764
|
+
const MAX_WAIT_FRAMES = 60;
|
|
765
|
+
const COPIED_STYLES = [
|
|
766
|
+
'background-color',
|
|
767
|
+
'border-radius',
|
|
768
|
+
'border-top',
|
|
769
|
+
'border-right',
|
|
770
|
+
'border-bottom',
|
|
771
|
+
'border-left',
|
|
772
|
+
'clip-path',
|
|
773
|
+
'mask-image',
|
|
774
|
+
'mask-composite',
|
|
775
|
+
'mask-size',
|
|
776
|
+
'mask-position',
|
|
777
|
+
'mask-repeat',
|
|
778
|
+
];
|
|
779
|
+
/**
|
|
780
|
+
* Turns the loading skeleton inside `host` into the chart drawn in its place, in one motion. Call
|
|
781
|
+
* while the skeleton is still in the DOM and the chart is about to replace it. Returns `null` when
|
|
782
|
+
* there is nothing to morph: a skeleton that was not loading, or motion that is off.
|
|
783
|
+
*
|
|
784
|
+
* Placeholders are the skeleton's `ds-skeleton` elements and anything marked `data-morph`; the drawn
|
|
785
|
+
* chart marks what they become with `data-morph`:
|
|
786
|
+
* - `mark`: a placeholder travels to the mark with the same `data-morph-key`, else the same order,
|
|
787
|
+
* taking its size and colour; a mark without one arrives by `growth`, a placeholder without one
|
|
788
|
+
* leaves by it; under `up`, a mark with `data-morph-from="top"` (one hanging below the zero
|
|
789
|
+
* line) grows down from its top edge;
|
|
790
|
+
* - `line`: the skeleton's band travels onto the first drawn line; the others draw on as they would;
|
|
791
|
+
* - `hold`: stays hidden until the marks have landed;
|
|
792
|
+
* - `self`: a part the chart animates from the skeleton itself, such as a ring turning its slices
|
|
793
|
+
* from the skeleton's: it skips its own entrance and travels from the `self` placeholder in the
|
|
794
|
+
* same order, which fades out on the way;
|
|
795
|
+
* - `fade` (the default for a placeholder): fades out in place while the chart fades in.
|
|
796
|
+
*
|
|
797
|
+
* @internal
|
|
798
|
+
*/
|
|
799
|
+
function startSkeletonMorph(host, growth, done) {
|
|
800
|
+
const growTiming = chartTiming(host, 'mark-grow');
|
|
801
|
+
const elements = Array.from(host.querySelectorAll('ds-skeleton, [data-morph]'));
|
|
802
|
+
const loading = elements.some((element) => element.localName === 'ds-skeleton' &&
|
|
803
|
+
!element.classList.contains('still'));
|
|
804
|
+
if (!growTiming || !loading || typeof host.animate !== 'function') {
|
|
805
|
+
return null;
|
|
806
|
+
}
|
|
807
|
+
const timing = { ...growTiming, fill: 'both' };
|
|
808
|
+
const layer = document.createElement('div');
|
|
809
|
+
layer.setAttribute('aria-hidden', 'true');
|
|
810
|
+
layer.style.cssText =
|
|
811
|
+
'position: absolute; inset: 0 auto auto 0; z-index: 1; pointer-events: none;';
|
|
812
|
+
host.append(layer);
|
|
813
|
+
const origin = layer.getBoundingClientRect();
|
|
814
|
+
const placeholders = [];
|
|
815
|
+
for (const element of elements) {
|
|
816
|
+
const rect = element.getBoundingClientRect();
|
|
817
|
+
if (rect.width === 0 && rect.height === 0) {
|
|
818
|
+
continue;
|
|
819
|
+
}
|
|
820
|
+
const style = getComputedStyle(element);
|
|
821
|
+
const shape = {
|
|
822
|
+
left: rect.left - origin.left,
|
|
823
|
+
top: rect.top - origin.top,
|
|
824
|
+
width: rect.width,
|
|
825
|
+
height: rect.height,
|
|
826
|
+
clip: parsePolygon(style.clipPath, rect),
|
|
827
|
+
color: style.backgroundColor,
|
|
828
|
+
radius: style.borderRadius,
|
|
829
|
+
};
|
|
830
|
+
const ghost = ghostAt(layer, shape);
|
|
831
|
+
for (const property of COPIED_STYLES) {
|
|
832
|
+
ghost.style.setProperty(property, style.getPropertyValue(property));
|
|
833
|
+
}
|
|
834
|
+
const role = element.dataset['morph'] ?? 'fade';
|
|
835
|
+
ghost.dataset['morph'] = role;
|
|
836
|
+
placeholders.push({
|
|
837
|
+
role,
|
|
838
|
+
key: element.dataset['morphKey'] ?? null,
|
|
839
|
+
ghost,
|
|
840
|
+
shape,
|
|
841
|
+
});
|
|
842
|
+
}
|
|
843
|
+
host.classList.add(HOLD_CLASS);
|
|
844
|
+
const animations = [];
|
|
845
|
+
let frame = 0;
|
|
846
|
+
let finished = false;
|
|
847
|
+
const finish = () => {
|
|
848
|
+
if (finished) {
|
|
849
|
+
return;
|
|
850
|
+
}
|
|
851
|
+
finished = true;
|
|
852
|
+
cancelAnimationFrame(frame);
|
|
853
|
+
for (const animation of animations) {
|
|
854
|
+
animation.cancel();
|
|
855
|
+
}
|
|
856
|
+
layer.remove();
|
|
857
|
+
host.classList.remove(HOLD_CLASS);
|
|
858
|
+
done();
|
|
859
|
+
};
|
|
860
|
+
const travel = (ghost, from, to, startOpacity = 1) => {
|
|
861
|
+
const [start, end] = matchClips(from, to);
|
|
862
|
+
animations.push(ghost.animate([
|
|
863
|
+
keyframe(start, startOpacity),
|
|
864
|
+
{ ...keyframe(end, 1), offset: HANDOVER_AT },
|
|
865
|
+
keyframe(end, 0),
|
|
866
|
+
], timing));
|
|
867
|
+
};
|
|
868
|
+
const carry = (target, placeholder, to) => {
|
|
869
|
+
const from = placeholder.shape;
|
|
870
|
+
const shift = `${from.left + from.width / 2 - (to.left + to.width / 2)}px ${from.top + from.height / 2 - (to.top + to.height / 2)}px`;
|
|
871
|
+
const scale = `${to.width ? from.width / to.width : 1} ${to.height ? from.height / to.height : 1}`;
|
|
872
|
+
animations.push(target.animate([
|
|
873
|
+
{ translate: shift, scale },
|
|
874
|
+
{ translate: '0px 0px', scale: '1 1' },
|
|
875
|
+
], timing), placeholder.ghost.animate([
|
|
876
|
+
{ ...boxFrame(from), opacity: 1 },
|
|
877
|
+
{ ...boxFrame(to), opacity: 0 },
|
|
878
|
+
], timing));
|
|
879
|
+
};
|
|
880
|
+
const play = (body) => {
|
|
881
|
+
const lineTarget = body.querySelector('[data-morph="line"]');
|
|
882
|
+
const targets = Array.from(body.querySelectorAll('[data-morph="mark"], [data-morph="hold"], [data-morph="self"]'));
|
|
883
|
+
if (lineTarget) {
|
|
884
|
+
targets.push(lineTarget);
|
|
885
|
+
}
|
|
886
|
+
for (const target of targets) {
|
|
887
|
+
for (const animation of target.getAnimations({ subtree: true })) {
|
|
888
|
+
if (animation.effect?.getTiming().iterations !== Infinity) {
|
|
889
|
+
animation.finish();
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
const keyed = new Map();
|
|
894
|
+
const ordered = [];
|
|
895
|
+
for (const placeholder of placeholders) {
|
|
896
|
+
if (placeholder.role === 'mark' && placeholder.key !== null) {
|
|
897
|
+
keyed.set(placeholder.key, placeholder);
|
|
898
|
+
}
|
|
899
|
+
else if (placeholder.role === 'mark') {
|
|
900
|
+
ordered.push(placeholder);
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
const arrived = new Set();
|
|
904
|
+
const line = placeholders.find(({ role }) => role === 'line');
|
|
905
|
+
const selves = placeholders.filter(({ role }) => role === 'self');
|
|
906
|
+
let nextOrdered = 0;
|
|
907
|
+
let nextSelf = 0;
|
|
908
|
+
for (const target of targets) {
|
|
909
|
+
const role = target.getAttribute('data-morph');
|
|
910
|
+
if (role === 'self') {
|
|
911
|
+
const placeholder = selves[nextSelf++];
|
|
912
|
+
if (placeholder) {
|
|
913
|
+
arrived.add(placeholder);
|
|
914
|
+
carry(target, placeholder, markShape(target, origin));
|
|
915
|
+
}
|
|
916
|
+
continue;
|
|
917
|
+
}
|
|
918
|
+
if (role === 'mark') {
|
|
919
|
+
const key = target.getAttribute('data-morph-key');
|
|
920
|
+
const placeholder = key === null ? ordered[nextOrdered++] : keyed.get(key);
|
|
921
|
+
const to = markShape(target, origin);
|
|
922
|
+
if (placeholder) {
|
|
923
|
+
arrived.add(placeholder);
|
|
924
|
+
travel(placeholder.ghost, placeholder.shape, to);
|
|
925
|
+
}
|
|
926
|
+
else {
|
|
927
|
+
const from = collapse(to, growth, target);
|
|
928
|
+
const ghost = ghostAt(layer, to);
|
|
929
|
+
ghost.dataset['morph'] = 'mark';
|
|
930
|
+
travel(ghost, from, to, from === to ? 0 : 1);
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
else if (role === 'line' && line) {
|
|
934
|
+
arrived.add(line);
|
|
935
|
+
travel(line.ghost, bandOfPlaceholder(line.shape), lineShape(target, origin));
|
|
936
|
+
}
|
|
937
|
+
animations.push(target.animate([{ opacity: 0 }, { opacity: 0, offset: HANDOVER_AT }, { opacity: 1 }], timing));
|
|
938
|
+
}
|
|
939
|
+
for (const placeholder of placeholders) {
|
|
940
|
+
if (arrived.has(placeholder)) {
|
|
941
|
+
continue;
|
|
942
|
+
}
|
|
943
|
+
animations.push(placeholder.ghost.animate(placeholder.role === 'mark'
|
|
944
|
+
? [
|
|
945
|
+
keyframe(placeholder.shape, 1),
|
|
946
|
+
keyframe(collapse(placeholder.shape, growth, body), 0),
|
|
947
|
+
]
|
|
948
|
+
: [{ opacity: 1 }, { opacity: 0 }], timing));
|
|
949
|
+
}
|
|
950
|
+
animations.push(body.animate([{ opacity: 0 }, { opacity: 1 }], timing));
|
|
951
|
+
host.classList.remove(HOLD_CLASS);
|
|
952
|
+
Promise.all(animations.map(({ finished }) => finished)).then(finish, () => undefined);
|
|
953
|
+
};
|
|
954
|
+
let frames = 0;
|
|
955
|
+
const waitForLanding = () => {
|
|
956
|
+
frames++;
|
|
957
|
+
const body = host.querySelector(':scope > .reload-overlay');
|
|
958
|
+
if (body &&
|
|
959
|
+
(frames >= MAX_WAIT_FRAMES ||
|
|
960
|
+
(frames >= 2 && !body.querySelector('.measuring')))) {
|
|
961
|
+
play(body);
|
|
962
|
+
}
|
|
963
|
+
else if (frames >= MAX_WAIT_FRAMES) {
|
|
964
|
+
finish();
|
|
965
|
+
}
|
|
966
|
+
else {
|
|
967
|
+
frame = requestAnimationFrame(waitForLanding);
|
|
968
|
+
}
|
|
969
|
+
};
|
|
970
|
+
frame = requestAnimationFrame(waitForLanding);
|
|
971
|
+
return finish;
|
|
972
|
+
}
|
|
973
|
+
function ghostAt(layer, shape) {
|
|
974
|
+
const ghost = document.createElement('div');
|
|
975
|
+
ghost.style.position = 'absolute';
|
|
976
|
+
ghost.style.left = `${shape.left}px`;
|
|
977
|
+
ghost.style.top = `${shape.top}px`;
|
|
978
|
+
ghost.style.width = `${shape.width}px`;
|
|
979
|
+
ghost.style.height = `${shape.height}px`;
|
|
980
|
+
if (shape.color) {
|
|
981
|
+
ghost.style.backgroundColor = shape.color;
|
|
982
|
+
}
|
|
983
|
+
layer.append(ghost);
|
|
984
|
+
return ghost;
|
|
985
|
+
}
|
|
986
|
+
function boxFrame(shape) {
|
|
987
|
+
return {
|
|
988
|
+
left: `${shape.left}px`,
|
|
989
|
+
top: `${shape.top}px`,
|
|
990
|
+
width: `${shape.width}px`,
|
|
991
|
+
height: `${shape.height}px`,
|
|
992
|
+
};
|
|
993
|
+
}
|
|
994
|
+
function keyframe(shape, opacity) {
|
|
995
|
+
return {
|
|
996
|
+
...boxFrame(shape),
|
|
997
|
+
clipPath: shape.clip
|
|
998
|
+
? `polygon(${shape.clip.map(({ x, y }) => `${x}px ${y}px`).join(', ')})`
|
|
999
|
+
: 'none',
|
|
1000
|
+
backgroundColor: shape.color ?? 'transparent',
|
|
1001
|
+
borderRadius: shape.radius ?? '0',
|
|
1002
|
+
opacity,
|
|
1003
|
+
};
|
|
1004
|
+
}
|
|
1005
|
+
// Clip paths interpolate only between polygons of as many vertices: a plain box becomes its four
|
|
1006
|
+
// corners, and two polygons that cannot pair up fall back to their boxes.
|
|
1007
|
+
function matchClips(from, to) {
|
|
1008
|
+
const color = to.color ?? from.color;
|
|
1009
|
+
const radius = to.radius ?? from.radius;
|
|
1010
|
+
if (!from.clip && !to.clip) {
|
|
1011
|
+
return [from, { ...to, color, radius }];
|
|
1012
|
+
}
|
|
1013
|
+
const fromClip = from.clip ?? corners(from);
|
|
1014
|
+
const toClip = to.clip ?? corners(to);
|
|
1015
|
+
if (fromClip.length !== toClip.length) {
|
|
1016
|
+
return [
|
|
1017
|
+
{ ...from, clip: null },
|
|
1018
|
+
{ ...to, clip: null, color, radius },
|
|
1019
|
+
];
|
|
1020
|
+
}
|
|
1021
|
+
return [
|
|
1022
|
+
{ ...from, clip: fromClip },
|
|
1023
|
+
{ ...to, clip: toClip, color, radius },
|
|
1024
|
+
];
|
|
1025
|
+
}
|
|
1026
|
+
function corners({ width, height }) {
|
|
1027
|
+
return [
|
|
1028
|
+
{ x: 0, y: 0 },
|
|
1029
|
+
{ x: width, y: 0 },
|
|
1030
|
+
{ x: width, y: height },
|
|
1031
|
+
{ x: 0, y: height },
|
|
1032
|
+
];
|
|
1033
|
+
}
|
|
1034
|
+
function collapse(shape, growth, context) {
|
|
1035
|
+
if (growth === 'up') {
|
|
1036
|
+
const fromTop = context.getAttribute('data-morph-from') === 'top';
|
|
1037
|
+
return {
|
|
1038
|
+
...shape,
|
|
1039
|
+
top: fromTop ? shape.top : shape.top + shape.height,
|
|
1040
|
+
height: 0,
|
|
1041
|
+
clip: shape.clip?.map(({ x }) => ({ x, y: 0 })) ?? null,
|
|
1042
|
+
};
|
|
1043
|
+
}
|
|
1044
|
+
if (growth === 'across') {
|
|
1045
|
+
const fromEnd = getComputedStyle(context).direction === 'rtl';
|
|
1046
|
+
return {
|
|
1047
|
+
...shape,
|
|
1048
|
+
left: fromEnd ? shape.left + shape.width : shape.left,
|
|
1049
|
+
width: 0,
|
|
1050
|
+
clip: shape.clip?.map(({ y }) => ({ x: 0, y })) ?? null,
|
|
1051
|
+
};
|
|
1052
|
+
}
|
|
1053
|
+
return shape;
|
|
1054
|
+
}
|
|
1055
|
+
function markShape(target, origin) {
|
|
1056
|
+
const rect = target.getBoundingClientRect();
|
|
1057
|
+
const style = getComputedStyle(target);
|
|
1058
|
+
let clip = null;
|
|
1059
|
+
if (target instanceof SVGPolygonElement) {
|
|
1060
|
+
const matrix = target.getScreenCTM();
|
|
1061
|
+
clip = matrix
|
|
1062
|
+
? Array.from({ length: target.points.numberOfItems }, (unused, index) => {
|
|
1063
|
+
const { x, y } = target.points.getItem(index);
|
|
1064
|
+
const point = new DOMPoint(x, y).matrixTransform(matrix);
|
|
1065
|
+
return { x: point.x - rect.left, y: point.y - rect.top };
|
|
1066
|
+
})
|
|
1067
|
+
: null;
|
|
1068
|
+
}
|
|
1069
|
+
else if (target instanceof HTMLElement) {
|
|
1070
|
+
clip = parsePolygon(style.clipPath, rect);
|
|
1071
|
+
}
|
|
1072
|
+
return {
|
|
1073
|
+
left: rect.left - origin.left,
|
|
1074
|
+
top: rect.top - origin.top,
|
|
1075
|
+
width: rect.width,
|
|
1076
|
+
height: rect.height,
|
|
1077
|
+
clip,
|
|
1078
|
+
color: markColor(target),
|
|
1079
|
+
radius: target instanceof HTMLElement ? style.borderRadius : null,
|
|
1080
|
+
};
|
|
1081
|
+
}
|
|
1082
|
+
// The colour a mark is painted in: its own fill or background, else the first part of it that has one.
|
|
1083
|
+
function markColor(target) {
|
|
1084
|
+
for (const element of [target, ...Array.from(target.querySelectorAll('*'))]) {
|
|
1085
|
+
if (element instanceof SVGGElement) {
|
|
1086
|
+
continue;
|
|
1087
|
+
}
|
|
1088
|
+
const style = getComputedStyle(element);
|
|
1089
|
+
const color = element instanceof SVGElement ? style.fill : style.backgroundColor;
|
|
1090
|
+
if (isPaint(color)) {
|
|
1091
|
+
return color;
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
return null;
|
|
1095
|
+
}
|
|
1096
|
+
function isPaint(color) {
|
|
1097
|
+
return (/^(rgb|hsl|color|lab|lch|oklab|oklch|#)/.test(color) &&
|
|
1098
|
+
!/^rgba\(\s*0,\s*0,\s*0,\s*0\s*\)$/.test(color));
|
|
1099
|
+
}
|
|
1100
|
+
// The skeleton's band as evenly spaced vertices, so it pairs up with the drawn line's whatever the counts.
|
|
1101
|
+
function bandOfPlaceholder(shape) {
|
|
1102
|
+
const vertices = (shape.clip ?? corners(shape)).map(({ x, y }) => ({
|
|
1103
|
+
x: x + shape.left,
|
|
1104
|
+
y: y + shape.top,
|
|
1105
|
+
}));
|
|
1106
|
+
const half = Math.floor(vertices.length / 2);
|
|
1107
|
+
const upper = vertices.slice(0, half);
|
|
1108
|
+
const lower = vertices.slice(half).reverse();
|
|
1109
|
+
return polygonShape(band(upper, lower), shape.color, shape.radius);
|
|
1110
|
+
}
|
|
1111
|
+
function lineShape(target, origin) {
|
|
1112
|
+
const style = getComputedStyle(target);
|
|
1113
|
+
const matrix = target instanceof SVGGeometryElement ? target.getScreenCTM() : null;
|
|
1114
|
+
if (!(target instanceof SVGGeometryElement) || !matrix) {
|
|
1115
|
+
return markShape(target, origin);
|
|
1116
|
+
}
|
|
1117
|
+
const length = target.getTotalLength();
|
|
1118
|
+
const centre = Array.from({ length: PATH_SAMPLES + 1 }, (unused, index) => {
|
|
1119
|
+
const { x, y } = target.getPointAtLength((length * index) / PATH_SAMPLES);
|
|
1120
|
+
const point = new DOMPoint(x, y).matrixTransform(matrix);
|
|
1121
|
+
return { x: point.x - origin.left, y: point.y - origin.top };
|
|
1122
|
+
}).sort((first, second) => first.x - second.x);
|
|
1123
|
+
const half = (parseFloat(style.strokeWidth) * Math.hypot(matrix.a, matrix.b)) / 2 || 1;
|
|
1124
|
+
return polygonShape(band(centre.map(({ x, y }) => ({ x, y: y - half })), centre.map(({ x, y }) => ({ x, y: y + half }))), isPaint(style.stroke) ? style.stroke : null, '0');
|
|
1125
|
+
}
|
|
1126
|
+
function band(upper, lower) {
|
|
1127
|
+
const start = upper[0]?.x ?? 0;
|
|
1128
|
+
const end = upper[upper.length - 1]?.x ?? start;
|
|
1129
|
+
const xs = Array.from({ length: BAND_SAMPLES }, (unused, index) => start + ((end - start) * index) / (BAND_SAMPLES - 1));
|
|
1130
|
+
return [
|
|
1131
|
+
...xs.map((x) => ({ x, y: yAt(upper, x) })),
|
|
1132
|
+
...xs.reverse().map((x) => ({ x, y: yAt(lower, x) })),
|
|
1133
|
+
];
|
|
1134
|
+
}
|
|
1135
|
+
function yAt(points, x) {
|
|
1136
|
+
const after = points.findIndex((point) => point.x >= x);
|
|
1137
|
+
if (after <= 0) {
|
|
1138
|
+
return points[after === 0 ? 0 : points.length - 1]?.y ?? 0;
|
|
1139
|
+
}
|
|
1140
|
+
const before = points[after - 1];
|
|
1141
|
+
const next = points[after];
|
|
1142
|
+
const span = next.x - before.x;
|
|
1143
|
+
return span
|
|
1144
|
+
? before.y + ((next.y - before.y) * (x - before.x)) / span
|
|
1145
|
+
: next.y;
|
|
1146
|
+
}
|
|
1147
|
+
function polygonShape(points, color, radius) {
|
|
1148
|
+
const left = Math.min(...points.map(({ x }) => x));
|
|
1149
|
+
const top = Math.min(...points.map(({ y }) => y));
|
|
1150
|
+
return {
|
|
1151
|
+
left,
|
|
1152
|
+
top,
|
|
1153
|
+
width: Math.max(...points.map(({ x }) => x)) - left,
|
|
1154
|
+
height: Math.max(...points.map(({ y }) => y)) - top,
|
|
1155
|
+
clip: points.map(({ x, y }) => ({ x: x - left, y: y - top })),
|
|
1156
|
+
color,
|
|
1157
|
+
radius,
|
|
1158
|
+
};
|
|
1159
|
+
}
|
|
1160
|
+
// A computed `polygon(...)` in pixels from the box's corner; lengths are `%`, `px` or a `calc()` of both.
|
|
1161
|
+
function parsePolygon(value, box) {
|
|
1162
|
+
if (!value.startsWith('polygon(')) {
|
|
1163
|
+
return null;
|
|
1164
|
+
}
|
|
1165
|
+
const vertices = value
|
|
1166
|
+
.slice('polygon('.length, -1)
|
|
1167
|
+
.split(',')
|
|
1168
|
+
.map((vertex) => vertex.trim().match(/calc\([^)]*\)|\S+/g) ?? []);
|
|
1169
|
+
if (vertices[0]?.length === 1) {
|
|
1170
|
+
vertices.shift();
|
|
1171
|
+
}
|
|
1172
|
+
return vertices.map(([x = '0', y = '0']) => ({
|
|
1173
|
+
x: resolveLength(x, box.width),
|
|
1174
|
+
y: resolveLength(y, box.height),
|
|
1175
|
+
}));
|
|
1176
|
+
}
|
|
1177
|
+
function resolveLength(length, size) {
|
|
1178
|
+
let total = 0;
|
|
1179
|
+
for (const [, sign, magnitude, unit] of length.matchAll(/([+-]?)\s*(-?[\d.]+)(%|px)?/g)) {
|
|
1180
|
+
const value = parseFloat(magnitude) * (sign === '-' ? -1 : 1);
|
|
1181
|
+
total += unit === '%' ? (value / 100) * size : value;
|
|
1182
|
+
}
|
|
1183
|
+
return total;
|
|
1184
|
+
}
|
|
1185
|
+
|
|
713
1186
|
/**
|
|
714
1187
|
* The Unpin control, caption and error / loading / empty states every chart draws, then `body`.
|
|
715
1188
|
* It sits on the chart's own `<figure>` so the caption stays the figure's direct child, which is
|
|
@@ -728,8 +1201,8 @@ class ChartStatesComponent {
|
|
|
728
1201
|
errorText = input('', ...(ngDevMode ? [{ debugName: "errorText" }] : /* istanbul ignore next */ []));
|
|
729
1202
|
/** Draws `skeleton` in place of `body`: there is nothing to draw yet. */
|
|
730
1203
|
pending = input(false, ...(ngDevMode ? [{ debugName: "pending" }] : /* istanbul ignore next */ []));
|
|
731
|
-
/** Holds the room of the chart's data-table disclosure under the skeleton
|
|
732
|
-
dataTable = input(
|
|
1204
|
+
/** Holds the room of the chart's data-table disclosure under the skeleton, open under `'visible'`. */
|
|
1205
|
+
dataTable = input('none', ...(ngDevMode ? [{ debugName: "dataTable" }] : /* istanbul ignore next */ []));
|
|
733
1206
|
/** Whether the data-table placeholder shimmers, as the chart's own skeleton does. */
|
|
734
1207
|
shimmer = input(true, ...(ngDevMode ? [{ debugName: "shimmer" }] : /* istanbul ignore next */ []));
|
|
735
1208
|
/** Keeps `body` on screen under a loading overlay bound to it, the caption left uncovered. */
|
|
@@ -742,8 +1215,44 @@ class ChartStatesComponent {
|
|
|
742
1215
|
body = input.required(...(ngDevMode ? [{ debugName: "body" }] : /* istanbul ignore next */ []));
|
|
743
1216
|
/** Replaces the default error and empty paragraph. */
|
|
744
1217
|
message = input(null, ...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
|
|
1218
|
+
/** How a mark the loading skeleton had no placeholder for arrives when the data lands. */
|
|
1219
|
+
morphGrowth = input(null, ...(ngDevMode ? [{ debugName: "morphGrowth" }] : /* istanbul ignore next */ []));
|
|
1220
|
+
placeholderRows = Array.from({
|
|
1221
|
+
length: CHART_SKELETON_COUNT,
|
|
1222
|
+
});
|
|
1223
|
+
morphingState = signal(false, ...(ngDevMode ? [{ debugName: "morphingState" }] : /* istanbul ignore next */ []));
|
|
1224
|
+
/** Whether the loading skeleton is turning into the drawn chart; a chart animating its own marks
|
|
1225
|
+
* starts them from the skeleton while it is. */
|
|
1226
|
+
morphing = this.morphingState.asReadonly();
|
|
1227
|
+
host = inject(ElementRef);
|
|
1228
|
+
zone = inject(NgZone);
|
|
1229
|
+
isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
1230
|
+
stopMorph = () => undefined;
|
|
1231
|
+
constructor() {
|
|
1232
|
+
inject(DestroyRef).onDestroy(() => this.stopMorph());
|
|
1233
|
+
}
|
|
1234
|
+
// Before the view swaps the skeleton out, while its placeholders can still be measured.
|
|
1235
|
+
ngOnChanges(changes) {
|
|
1236
|
+
const pending = changes['pending'];
|
|
1237
|
+
if (!pending || pending.firstChange) {
|
|
1238
|
+
return;
|
|
1239
|
+
}
|
|
1240
|
+
this.stopMorph();
|
|
1241
|
+
if (!pending.previousValue ||
|
|
1242
|
+
pending.currentValue ||
|
|
1243
|
+
!this.isBrowser ||
|
|
1244
|
+
this.error() ||
|
|
1245
|
+
this.empty()) {
|
|
1246
|
+
return;
|
|
1247
|
+
}
|
|
1248
|
+
const stop = this.zone.runOutsideAngular(() => startSkeletonMorph(this.host.nativeElement, this.morphGrowth(), () => this.morphingState.set(false)));
|
|
1249
|
+
if (stop) {
|
|
1250
|
+
this.stopMorph = stop;
|
|
1251
|
+
this.morphingState.set(true);
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
745
1254
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ChartStatesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
746
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ChartStatesComponent, isStandalone: true, selector: "figure[dsChartStates]", inputs: { unpin: { classPropertyName: "unpin", publicName: "unpin", isSignal: true, isRequired: false, transformFunction: null }, pinned: { classPropertyName: "pinned", publicName: "pinned", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, errorText: { classPropertyName: "errorText", publicName: "errorText", isSignal: true, isRequired: false, transformFunction: null }, pending: { classPropertyName: "pending", publicName: "pending", isSignal: true, isRequired: false, transformFunction: null }, dataTable: { classPropertyName: "dataTable", publicName: "dataTable", isSignal: true, isRequired: false, transformFunction: null }, shimmer: { classPropertyName: "shimmer", publicName: "shimmer", isSignal: true, isRequired: false, transformFunction: null }, reloading: { classPropertyName: "reloading", publicName: "reloading", isSignal: true, isRequired: false, transformFunction: null }, empty: { classPropertyName: "empty", publicName: "empty", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, messageAxes: { classPropertyName: "messageAxes", publicName: "messageAxes", isSignal: true, isRequired: false, transformFunction: null }, skeleton: { classPropertyName: "skeleton", publicName: "skeleton", isSignal: true, isRequired: true, transformFunction: null }, body: { classPropertyName: "body", publicName: "body", isSignal: true, isRequired: true, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { release: "release" }, host: { properties: { "class.message-axes": "messageAxes()" } }, ngImport: i0, template: `
|
|
1255
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: ChartStatesComponent, isStandalone: true, selector: "figure[dsChartStates]", inputs: { unpin: { classPropertyName: "unpin", publicName: "unpin", isSignal: true, isRequired: false, transformFunction: null }, pinned: { classPropertyName: "pinned", publicName: "pinned", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, errorText: { classPropertyName: "errorText", publicName: "errorText", isSignal: true, isRequired: false, transformFunction: null }, pending: { classPropertyName: "pending", publicName: "pending", isSignal: true, isRequired: false, transformFunction: null }, dataTable: { classPropertyName: "dataTable", publicName: "dataTable", isSignal: true, isRequired: false, transformFunction: null }, shimmer: { classPropertyName: "shimmer", publicName: "shimmer", isSignal: true, isRequired: false, transformFunction: null }, reloading: { classPropertyName: "reloading", publicName: "reloading", isSignal: true, isRequired: false, transformFunction: null }, empty: { classPropertyName: "empty", publicName: "empty", isSignal: true, isRequired: false, transformFunction: null }, emptyText: { classPropertyName: "emptyText", publicName: "emptyText", isSignal: true, isRequired: false, transformFunction: null }, messageAxes: { classPropertyName: "messageAxes", publicName: "messageAxes", isSignal: true, isRequired: false, transformFunction: null }, skeleton: { classPropertyName: "skeleton", publicName: "skeleton", isSignal: true, isRequired: true, transformFunction: null }, body: { classPropertyName: "body", publicName: "body", isSignal: true, isRequired: true, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, morphGrowth: { classPropertyName: "morphGrowth", publicName: "morphGrowth", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { release: "release" }, host: { properties: { "class.message-axes": "messageAxes()" } }, usesOnChanges: true, ngImport: i0, template: `
|
|
747
1256
|
@if (unpin()) {
|
|
748
1257
|
<ds-chart-unpin [pinned]="pinned()" (release)="release.emit()" />
|
|
749
1258
|
}
|
|
@@ -767,8 +1276,12 @@ class ChartStatesComponent {
|
|
|
767
1276
|
} @else if (pending()) {
|
|
768
1277
|
<ng-container [ngTemplateOutlet]="skeleton()" />
|
|
769
1278
|
|
|
770
|
-
@if (dataTable()) {
|
|
771
|
-
<details
|
|
1279
|
+
@if (dataTable() !== 'none') {
|
|
1280
|
+
<details
|
|
1281
|
+
class="data-table"
|
|
1282
|
+
aria-hidden="true"
|
|
1283
|
+
inert
|
|
1284
|
+
[open]="dataTable() === 'visible'">
|
|
772
1285
|
<summary>
|
|
773
1286
|
<ds-skeleton
|
|
774
1287
|
inline
|
|
@@ -777,6 +1290,56 @@ class ChartStatesComponent {
|
|
|
777
1290
|
height="var(--space-2)"
|
|
778
1291
|
[shimmer]="shimmer()" />
|
|
779
1292
|
</summary>
|
|
1293
|
+
|
|
1294
|
+
@if (dataTable() === 'visible') {
|
|
1295
|
+
<table>
|
|
1296
|
+
<thead>
|
|
1297
|
+
<tr>
|
|
1298
|
+
<th>
|
|
1299
|
+
<ds-skeleton
|
|
1300
|
+
inline
|
|
1301
|
+
class="data-table-label"
|
|
1302
|
+
width="var(--space-12)"
|
|
1303
|
+
height="var(--space-2)"
|
|
1304
|
+
[shimmer]="shimmer()" />
|
|
1305
|
+
</th>
|
|
1306
|
+
|
|
1307
|
+
<th>
|
|
1308
|
+
<ds-skeleton
|
|
1309
|
+
inline
|
|
1310
|
+
class="data-table-label"
|
|
1311
|
+
width="var(--space-8)"
|
|
1312
|
+
height="var(--space-2)"
|
|
1313
|
+
[shimmer]="shimmer()" />
|
|
1314
|
+
</th>
|
|
1315
|
+
</tr>
|
|
1316
|
+
</thead>
|
|
1317
|
+
|
|
1318
|
+
<tbody>
|
|
1319
|
+
@for (row of placeholderRows; track $index) {
|
|
1320
|
+
<tr>
|
|
1321
|
+
<td>
|
|
1322
|
+
<ds-skeleton
|
|
1323
|
+
inline
|
|
1324
|
+
class="data-table-label"
|
|
1325
|
+
width="var(--space-20)"
|
|
1326
|
+
height="var(--space-2)"
|
|
1327
|
+
[shimmer]="shimmer()" />
|
|
1328
|
+
</td>
|
|
1329
|
+
|
|
1330
|
+
<td>
|
|
1331
|
+
<ds-skeleton
|
|
1332
|
+
inline
|
|
1333
|
+
class="data-table-label"
|
|
1334
|
+
width="var(--space-10)"
|
|
1335
|
+
height="var(--space-2)"
|
|
1336
|
+
[shimmer]="shimmer()" />
|
|
1337
|
+
</td>
|
|
1338
|
+
</tr>
|
|
1339
|
+
}
|
|
1340
|
+
</tbody>
|
|
1341
|
+
</table>
|
|
1342
|
+
}
|
|
780
1343
|
</details>
|
|
781
1344
|
}
|
|
782
1345
|
} @else if (empty()) {
|
|
@@ -800,7 +1363,7 @@ class ChartStatesComponent {
|
|
|
800
1363
|
<ng-container [ngTemplateOutlet]="body()" />
|
|
801
1364
|
</ds-loading-overlay>
|
|
802
1365
|
}
|
|
803
|
-
`, isInline: true, styles: ["@layer ds-component-base{:host{box-sizing:border-box;interpolate-size:allow-keywords}*,*:before,*:after{box-sizing:border-box}button,input,select,textarea{font-family:inherit}h1,h2,h3,h4,h5,h6{margin:0}:host(:where(:focus-visible)),:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:host(:where(:focus-visible)),:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}}.data-table{--_chart-data-table-marker: var(--space-1);margin-block-start:var(--space-4);color:var(--text-secondary);font-size:var(--font-size-s)}.data-table>summary{display:inline-flex;align-items:center;gap:var(--space-1);padding-block:var(--space-1);color:var(--text-tertiary);font-size:var(--font-size-xs);cursor:pointer;list-style:none}.data-table>summary::-webkit-details-marker{display:none}.data-table>summary:before{content:\"\";inline-size:0;block-size:0;border-block-start:var(--_chart-data-table-marker) solid transparent;border-block-end:var(--_chart-data-table-marker) solid transparent;border-inline-start:calc(var(--_chart-data-table-marker) * 1.25) solid currentcolor;transition:transform var(--duration-fast) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.data-table>summary:before{transition:none}}.data-table[open]>summary:before{transform:rotate(90deg)}.data-table>summary{border-radius:var(--radius-sm)}.data-table caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.data-table table{inline-size:100%;margin-block-start:var(--space-2);border-collapse:collapse;font-variant-numeric:tabular-nums}.data-table th,.data-table td{padding-block:var(--space-2);border-block-end:var(--border-width-default) solid var(--ds-chart-grid-line-color);text-align:end}.data-table thead th{color:var(--text-tertiary);font-size:var(--font-size-xs);font-weight:600}.data-table th:first-child,.data-table td:first-child{text-align:start}.data-table td+td{padding-inline-start:var(--space-3)}.data-table-label{border-radius:var(--radius-pill)}figcaption{margin-block-end:var(--space-3);color:var(--text-primary);font-weight:var(--font-weight-semibold);-webkit-user-select:text;user-select:text}:host:has(>ds-chart-unpin.is-pinned)>figcaption{padding-inline-end:calc(5rem + var(--space-2))}.empty{display:grid;place-items:center;min-block-size:var(--_chart-message-height);margin:0;color:var(--text-secondary);text-align:center}.empty.is-error{color:var(--error)}:host(.message-axes) .empty{border-inline-start:1px solid var(--ds-chart-axis-line-color);border-block-end:1px solid var(--ds-chart-axis-line-color)}.reload-overlay{--ds-loading-overlay-radius: var(--radius-md);margin:calc(-1 * var(--space-2));padding:var(--space-2)}:host(.funnel-chart) .reload-overlay{margin-inline:0;padding-inline:0}\n"], dependencies: [{ kind: "component", type: ChartUnpinComponent, selector: "ds-chart-unpin", inputs: ["pinned"], outputs: ["release"] }, { kind: "component", type: LoadingOverlayComponent, selector: "ds-loading-overlay", inputs: ["loading", "label", "blur", "spinnerSize", "insetTop", "inertContent"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SkeletonComponent, selector: "ds-skeleton", inputs: ["width", "height", "circle", "inline", "shimmer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1366
|
+
`, isInline: true, styles: ["@layer ds-component-base{:host{box-sizing:border-box;interpolate-size:allow-keywords}*,*:before,*:after{box-sizing:border-box}button,input,select,textarea{font-family:inherit}h1,h2,h3,h4,h5,h6{margin:0}:host(:where(:focus-visible)),:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:host(:where(:focus-visible)),:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}}.data-table{--_chart-data-table-marker: var(--space-1);margin-block-start:var(--space-4);color:var(--text-secondary);font-size:var(--font-size-s)}.data-table>summary{display:inline-flex;align-items:center;gap:var(--space-1);padding-block:var(--space-1);color:var(--text-tertiary);font-size:var(--font-size-xs);cursor:pointer;list-style:none}.data-table>summary::-webkit-details-marker{display:none}.data-table>summary:before{content:\"\";inline-size:0;block-size:0;border-block-start:var(--_chart-data-table-marker) solid transparent;border-block-end:var(--_chart-data-table-marker) solid transparent;border-inline-start:calc(var(--_chart-data-table-marker) * 1.25) solid currentcolor;transition:transform var(--duration-fast) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.data-table>summary:before{transition:none}}.data-table[open]>summary:before{transform:rotate(90deg)}.data-table>summary{border-radius:var(--radius-sm)}.data-table caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.data-table table{inline-size:100%;margin-block-start:var(--space-2);border-collapse:collapse;font-variant-numeric:tabular-nums}.data-table th,.data-table td{padding-block:var(--space-2);border-block-end:var(--border-width-default) solid var(--ds-chart-grid-line-color);text-align:end}.data-table thead th{color:var(--text-tertiary);font-size:var(--font-size-xs);font-weight:600}.data-table th:first-child,.data-table td:first-child{text-align:start}.data-table td+td{padding-inline-start:var(--space-3)}.data-table-label{border-radius:var(--radius-pill)}.data-table>summary{min-block-size:calc(1lh + 2 * var(--space-1))}figcaption{margin-block-end:var(--space-3);color:var(--text-primary);font-weight:var(--font-weight-semibold);-webkit-user-select:text;user-select:text}:host:has(>ds-chart-unpin.is-pinned)>figcaption{padding-inline-end:calc(5rem + var(--space-2))}.empty{display:grid;place-items:center;min-block-size:var(--_chart-message-height);margin:0;color:var(--text-secondary);text-align:center}.empty.is-error{color:var(--error)}:host(.message-axes) .empty{border-inline-start:1px solid var(--ds-chart-axis-line-color);border-block-end:1px solid var(--ds-chart-axis-line-color)}.reload-overlay{--ds-loading-overlay-radius: var(--radius-md);margin:calc(-1 * var(--space-2));padding:var(--space-2)}:host(.funnel-chart) .reload-overlay{margin-inline:0;padding-inline:0}:host(.skeleton-morph)>.reload-overlay{opacity:0}\n"], dependencies: [{ kind: "component", type: ChartUnpinComponent, selector: "ds-chart-unpin", inputs: ["pinned"], outputs: ["release"] }, { kind: "component", type: LoadingOverlayComponent, selector: "ds-loading-overlay", inputs: ["loading", "label", "blur", "spinnerSize", "insetTop", "inertContent"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SkeletonComponent, selector: "ds-skeleton", inputs: ["width", "height", "circle", "inline", "shimmer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
804
1367
|
}
|
|
805
1368
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ChartStatesComponent, decorators: [{
|
|
806
1369
|
type: Component,
|
|
@@ -833,8 +1396,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
833
1396
|
} @else if (pending()) {
|
|
834
1397
|
<ng-container [ngTemplateOutlet]="skeleton()" />
|
|
835
1398
|
|
|
836
|
-
@if (dataTable()) {
|
|
837
|
-
<details
|
|
1399
|
+
@if (dataTable() !== 'none') {
|
|
1400
|
+
<details
|
|
1401
|
+
class="data-table"
|
|
1402
|
+
aria-hidden="true"
|
|
1403
|
+
inert
|
|
1404
|
+
[open]="dataTable() === 'visible'">
|
|
838
1405
|
<summary>
|
|
839
1406
|
<ds-skeleton
|
|
840
1407
|
inline
|
|
@@ -843,6 +1410,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
843
1410
|
height="var(--space-2)"
|
|
844
1411
|
[shimmer]="shimmer()" />
|
|
845
1412
|
</summary>
|
|
1413
|
+
|
|
1414
|
+
@if (dataTable() === 'visible') {
|
|
1415
|
+
<table>
|
|
1416
|
+
<thead>
|
|
1417
|
+
<tr>
|
|
1418
|
+
<th>
|
|
1419
|
+
<ds-skeleton
|
|
1420
|
+
inline
|
|
1421
|
+
class="data-table-label"
|
|
1422
|
+
width="var(--space-12)"
|
|
1423
|
+
height="var(--space-2)"
|
|
1424
|
+
[shimmer]="shimmer()" />
|
|
1425
|
+
</th>
|
|
1426
|
+
|
|
1427
|
+
<th>
|
|
1428
|
+
<ds-skeleton
|
|
1429
|
+
inline
|
|
1430
|
+
class="data-table-label"
|
|
1431
|
+
width="var(--space-8)"
|
|
1432
|
+
height="var(--space-2)"
|
|
1433
|
+
[shimmer]="shimmer()" />
|
|
1434
|
+
</th>
|
|
1435
|
+
</tr>
|
|
1436
|
+
</thead>
|
|
1437
|
+
|
|
1438
|
+
<tbody>
|
|
1439
|
+
@for (row of placeholderRows; track $index) {
|
|
1440
|
+
<tr>
|
|
1441
|
+
<td>
|
|
1442
|
+
<ds-skeleton
|
|
1443
|
+
inline
|
|
1444
|
+
class="data-table-label"
|
|
1445
|
+
width="var(--space-20)"
|
|
1446
|
+
height="var(--space-2)"
|
|
1447
|
+
[shimmer]="shimmer()" />
|
|
1448
|
+
</td>
|
|
1449
|
+
|
|
1450
|
+
<td>
|
|
1451
|
+
<ds-skeleton
|
|
1452
|
+
inline
|
|
1453
|
+
class="data-table-label"
|
|
1454
|
+
width="var(--space-10)"
|
|
1455
|
+
height="var(--space-2)"
|
|
1456
|
+
[shimmer]="shimmer()" />
|
|
1457
|
+
</td>
|
|
1458
|
+
</tr>
|
|
1459
|
+
}
|
|
1460
|
+
</tbody>
|
|
1461
|
+
</table>
|
|
1462
|
+
}
|
|
846
1463
|
</details>
|
|
847
1464
|
}
|
|
848
1465
|
} @else if (empty()) {
|
|
@@ -866,12 +1483,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
|
|
|
866
1483
|
<ng-container [ngTemplateOutlet]="body()" />
|
|
867
1484
|
</ds-loading-overlay>
|
|
868
1485
|
}
|
|
869
|
-
`, host: { '[class.message-axes]': 'messageAxes()' }, encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, styles: ["@layer ds-component-base{:host{box-sizing:border-box;interpolate-size:allow-keywords}*,*:before,*:after{box-sizing:border-box}button,input,select,textarea{font-family:inherit}h1,h2,h3,h4,h5,h6{margin:0}:host(:where(:focus-visible)),:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:host(:where(:focus-visible)),:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}}.data-table{--_chart-data-table-marker: var(--space-1);margin-block-start:var(--space-4);color:var(--text-secondary);font-size:var(--font-size-s)}.data-table>summary{display:inline-flex;align-items:center;gap:var(--space-1);padding-block:var(--space-1);color:var(--text-tertiary);font-size:var(--font-size-xs);cursor:pointer;list-style:none}.data-table>summary::-webkit-details-marker{display:none}.data-table>summary:before{content:\"\";inline-size:0;block-size:0;border-block-start:var(--_chart-data-table-marker) solid transparent;border-block-end:var(--_chart-data-table-marker) solid transparent;border-inline-start:calc(var(--_chart-data-table-marker) * 1.25) solid currentcolor;transition:transform var(--duration-fast) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.data-table>summary:before{transition:none}}.data-table[open]>summary:before{transform:rotate(90deg)}.data-table>summary{border-radius:var(--radius-sm)}.data-table caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.data-table table{inline-size:100%;margin-block-start:var(--space-2);border-collapse:collapse;font-variant-numeric:tabular-nums}.data-table th,.data-table td{padding-block:var(--space-2);border-block-end:var(--border-width-default) solid var(--ds-chart-grid-line-color);text-align:end}.data-table thead th{color:var(--text-tertiary);font-size:var(--font-size-xs);font-weight:600}.data-table th:first-child,.data-table td:first-child{text-align:start}.data-table td+td{padding-inline-start:var(--space-3)}.data-table-label{border-radius:var(--radius-pill)}figcaption{margin-block-end:var(--space-3);color:var(--text-primary);font-weight:var(--font-weight-semibold);-webkit-user-select:text;user-select:text}:host:has(>ds-chart-unpin.is-pinned)>figcaption{padding-inline-end:calc(5rem + var(--space-2))}.empty{display:grid;place-items:center;min-block-size:var(--_chart-message-height);margin:0;color:var(--text-secondary);text-align:center}.empty.is-error{color:var(--error)}:host(.message-axes) .empty{border-inline-start:1px solid var(--ds-chart-axis-line-color);border-block-end:1px solid var(--ds-chart-axis-line-color)}.reload-overlay{--ds-loading-overlay-radius: var(--radius-md);margin:calc(-1 * var(--space-2));padding:var(--space-2)}:host(.funnel-chart) .reload-overlay{margin-inline:0;padding-inline:0}\n"] }]
|
|
870
|
-
}], propDecorators: { unpin: [{ type: i0.Input, args: [{ isSignal: true, alias: "unpin", required: false }] }], pinned: [{ type: i0.Input, args: [{ isSignal: true, alias: "pinned", required: false }] }], release: [{ type: i0.Output, args: ["release"] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], errorText: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorText", required: false }] }], pending: [{ type: i0.Input, args: [{ isSignal: true, alias: "pending", required: false }] }], dataTable: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataTable", required: false }] }], shimmer: [{ type: i0.Input, args: [{ isSignal: true, alias: "shimmer", required: false }] }], reloading: [{ type: i0.Input, args: [{ isSignal: true, alias: "reloading", required: false }] }], empty: [{ type: i0.Input, args: [{ isSignal: true, alias: "empty", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], messageAxes: [{ type: i0.Input, args: [{ isSignal: true, alias: "messageAxes", required: false }] }], skeleton: [{ type: i0.Input, args: [{ isSignal: true, alias: "skeleton", required: true }] }], body: [{ type: i0.Input, args: [{ isSignal: true, alias: "body", required: true }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }] } });
|
|
1486
|
+
`, host: { '[class.message-axes]': 'messageAxes()' }, encapsulation: ViewEncapsulation.Emulated, changeDetection: ChangeDetectionStrategy.OnPush, styles: ["@layer ds-component-base{:host{box-sizing:border-box;interpolate-size:allow-keywords}*,*:before,*:after{box-sizing:border-box}button,input,select,textarea{font-family:inherit}h1,h2,h3,h4,h5,h6{margin:0}:host(:where(:focus-visible)),:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard);border-radius:var(--focus-ring-radius)}@media(forced-colors:active){:host(:where(:focus-visible)),:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}}.data-table{--_chart-data-table-marker: var(--space-1);margin-block-start:var(--space-4);color:var(--text-secondary);font-size:var(--font-size-s)}.data-table>summary{display:inline-flex;align-items:center;gap:var(--space-1);padding-block:var(--space-1);color:var(--text-tertiary);font-size:var(--font-size-xs);cursor:pointer;list-style:none}.data-table>summary::-webkit-details-marker{display:none}.data-table>summary:before{content:\"\";inline-size:0;block-size:0;border-block-start:var(--_chart-data-table-marker) solid transparent;border-block-end:var(--_chart-data-table-marker) solid transparent;border-inline-start:calc(var(--_chart-data-table-marker) * 1.25) solid currentcolor;transition:transform var(--duration-fast) var(--ease-standard)}@media(prefers-reduced-motion:reduce){.data-table>summary:before{transition:none}}.data-table[open]>summary:before{transform:rotate(90deg)}.data-table>summary{border-radius:var(--radius-sm)}.data-table caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.data-table table{inline-size:100%;margin-block-start:var(--space-2);border-collapse:collapse;font-variant-numeric:tabular-nums}.data-table th,.data-table td{padding-block:var(--space-2);border-block-end:var(--border-width-default) solid var(--ds-chart-grid-line-color);text-align:end}.data-table thead th{color:var(--text-tertiary);font-size:var(--font-size-xs);font-weight:600}.data-table th:first-child,.data-table td:first-child{text-align:start}.data-table td+td{padding-inline-start:var(--space-3)}.data-table-label{border-radius:var(--radius-pill)}.data-table>summary{min-block-size:calc(1lh + 2 * var(--space-1))}figcaption{margin-block-end:var(--space-3);color:var(--text-primary);font-weight:var(--font-weight-semibold);-webkit-user-select:text;user-select:text}:host:has(>ds-chart-unpin.is-pinned)>figcaption{padding-inline-end:calc(5rem + var(--space-2))}.empty{display:grid;place-items:center;min-block-size:var(--_chart-message-height);margin:0;color:var(--text-secondary);text-align:center}.empty.is-error{color:var(--error)}:host(.message-axes) .empty{border-inline-start:1px solid var(--ds-chart-axis-line-color);border-block-end:1px solid var(--ds-chart-axis-line-color)}.reload-overlay{--ds-loading-overlay-radius: var(--radius-md);margin:calc(-1 * var(--space-2));padding:var(--space-2)}:host(.funnel-chart) .reload-overlay{margin-inline:0;padding-inline:0}:host(.skeleton-morph)>.reload-overlay{opacity:0}\n"] }]
|
|
1487
|
+
}], ctorParameters: () => [], propDecorators: { unpin: [{ type: i0.Input, args: [{ isSignal: true, alias: "unpin", required: false }] }], pinned: [{ type: i0.Input, args: [{ isSignal: true, alias: "pinned", required: false }] }], release: [{ type: i0.Output, args: ["release"] }], caption: [{ type: i0.Input, args: [{ isSignal: true, alias: "caption", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], errorText: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorText", required: false }] }], pending: [{ type: i0.Input, args: [{ isSignal: true, alias: "pending", required: false }] }], dataTable: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataTable", required: false }] }], shimmer: [{ type: i0.Input, args: [{ isSignal: true, alias: "shimmer", required: false }] }], reloading: [{ type: i0.Input, args: [{ isSignal: true, alias: "reloading", required: false }] }], empty: [{ type: i0.Input, args: [{ isSignal: true, alias: "empty", required: false }] }], emptyText: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyText", required: false }] }], messageAxes: [{ type: i0.Input, args: [{ isSignal: true, alias: "messageAxes", required: false }] }], skeleton: [{ type: i0.Input, args: [{ isSignal: true, alias: "skeleton", required: true }] }], body: [{ type: i0.Input, args: [{ isSignal: true, alias: "body", required: true }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }], morphGrowth: [{ type: i0.Input, args: [{ isSignal: true, alias: "morphGrowth", required: false }] }] } });
|
|
871
1488
|
|
|
872
1489
|
/**
|
|
873
1490
|
* Generated bundle index. Do not edit.
|
|
874
1491
|
*/
|
|
875
1492
|
|
|
876
|
-
export { CHART_PIN_GAP, CHART_PIN_RADIUS, CHART_SKELETON_CATEGORY_BAND, CHART_UNPIN_DRAWN_BY_HOST, ChartPinMarkerComponent, ChartSkeletonComponent, ChartStatesComponent, ChartTooltipDirective, ChartUnpinComponent, chartActiveMark };
|
|
1493
|
+
export { CHART_PIN_GAP, CHART_PIN_RADIUS, CHART_SKELETON_CATEGORY_BAND, CHART_UNPIN_DRAWN_BY_HOST, ChartPinMarkerComponent, ChartPlacedDirective, ChartSkeletonComponent, ChartStatesComponent, ChartTooltipDirective, ChartUnpinComponent, chartActiveMark, isPrimaryPress };
|
|
877
1494
|
//# sourceMappingURL=ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map
|